mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-16 20:49:00 -04:00
Format letter statuses so they make more sense to our users
This commit is contained in:
@@ -78,8 +78,12 @@ class NotificationApiClient(NotifyAdminAPIClient):
|
||||
@staticmethod
|
||||
def map_letters_to_accepted(notifications):
|
||||
for notification in notifications['notifications']:
|
||||
if notification['notification_type'] == 'letter' and notification['status'] in ('created', 'sending'):
|
||||
notification['status'] = 'accepted'
|
||||
if notification['notification_type'] == 'letter':
|
||||
if notification['status'] in ('created', 'sending'):
|
||||
notification['status'] = 'accepted'
|
||||
|
||||
if notification['status'] in ('delivered', 'returned-letter'):
|
||||
notification['status'] = 'received'
|
||||
return notifications
|
||||
|
||||
def get_notification_letter_preview(self, service_id, notification_id, file_type, page=None):
|
||||
|
||||
Reference in New Issue
Block a user