mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 21:49:37 -04:00
Merge pull request #3333 from alphagov/uploads-page-ready
Redesign the uploads page to accommodate different kinds of uploads
This commit is contained in:
@@ -75,6 +75,9 @@ class ModelList(ABC, Sequence):
|
||||
def __add__(self, other):
|
||||
return list(self) + list(other)
|
||||
|
||||
def __radd__(self, other):
|
||||
return list(other) + list(self)
|
||||
|
||||
|
||||
class InviteTokenError(Exception):
|
||||
pass
|
||||
|
||||
@@ -30,6 +30,8 @@ class Job(JSONModel):
|
||||
'processing_started',
|
||||
'notification_count',
|
||||
'created_by',
|
||||
'template_type',
|
||||
'recipient',
|
||||
}
|
||||
|
||||
@classmethod
|
||||
@@ -56,6 +58,10 @@ class Job(JSONModel):
|
||||
def upload_type(self):
|
||||
return self._dict.get('upload_type')
|
||||
|
||||
@property
|
||||
def pdf_letter(self):
|
||||
return self.upload_type == 'letter'
|
||||
|
||||
@property
|
||||
def processing_started(self):
|
||||
if not self._dict.get('processing_started'):
|
||||
@@ -132,10 +138,6 @@ class Job(JSONModel):
|
||||
version=self.template_version,
|
||||
)['data']
|
||||
|
||||
@property
|
||||
def template_type(self):
|
||||
return self.template['template_type']
|
||||
|
||||
@property
|
||||
def percentage_complete(self):
|
||||
return self.notifications_requested / self.notification_count * 100
|
||||
|
||||
Reference in New Issue
Block a user