mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
Add a component for picking the time to send a job
Users need to pick a time in the next 24hrs, or send a file immediately. Rationale for this is a bit lost in time-before-holiday, but generally: ‘Now’ and ‘later’ as the inital choices makes it really clear what this feature is about conceptually. The choice of times is absolute, eg ‘1pm’ not ‘in 3 hours’
This commit is contained in:
@@ -58,13 +58,15 @@ class JobApiClient(BaseAPIClient):
|
||||
|
||||
return jobs
|
||||
|
||||
def create_job(self, job_id, service_id, template_id, original_file_name, notification_count):
|
||||
def create_job(self, job_id, service_id, template_id, original_file_name, notification_count, scheduled_for=None):
|
||||
data = {
|
||||
"id": job_id,
|
||||
"template": template_id,
|
||||
"original_file_name": original_file_name,
|
||||
"notification_count": notification_count
|
||||
}
|
||||
if scheduled_for:
|
||||
data.update({'scheduled_for': scheduled_for})
|
||||
data = _attach_current_user(data)
|
||||
job = self.post(url='/service/{}/job'.format(service_id), data=data)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user