More changes are done.

Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
This commit is contained in:
Cliff Hill
2024-02-20 17:05:34 -05:00
parent 74ac09ae55
commit 4429e48221
2 changed files with 21 additions and 21 deletions

View File

@@ -1652,26 +1652,26 @@ class Notification(db.Model):
@property
def formatted_status(self):
return {
"email": {
"failed": "Failed",
"technical-failure": "Technical failure",
"temporary-failure": "Inbox not accepting messages right now",
"permanent-failure": "Email address doesnt exist",
"delivered": "Delivered",
"sending": "Sending",
"created": "Sending",
"sent": "Delivered",
NotificationType.EMAIL: {
NotificationStatus.FAILED: "Failed",
NotificationStatus.TECHNICAL_FAILURE: "Technical failure",
NotificationStatus.TEMPORARY_FAILURE: "Inbox not accepting messages right now",
NotificationStatus.PERMANENT_FAILURE: "Email address doesnt exist",
NotificationStatus.DELIVERED: "Delivered",
NotificationStatus.SENDING: "Sending",
NotificationStatus.CREATED: "Sending",
NotificationStatus.SENT: "Delivered",
},
"sms": {
"failed": "Failed",
"technical-failure": "Technical failure",
"temporary-failure": "Unable to find carrier response -- still looking",
"permanent-failure": "Unable to find carrier response.",
"delivered": "Delivered",
"pending": "Pending",
"sending": "Sending",
"created": "Sending",
"sent": "Sent internationally",
NotificationType.SMS: {
NotificationStatus.FAILED: "Failed",
NotificationStatus.TECHNICAL_FAILURE: "Technical failure",
NotificationStatus.TEMPORARY_FAILURE: "Unable to find carrier response -- still looking",
NotificationStatus.PERMANENT_FAILURE: "Unable to find carrier response.",
NotificationStatus.DELIVERED: "Delivered",
NotificationStatus.PENDING: "Pending",
NotificationStatus.SENDING: "Sending",
NotificationStatus.CREATED: "Sending",
NotificationStatus.SENT: "Sent internationally",
},
}[self.template.template_type].get(self.status, self.status)

View File

@@ -26,6 +26,6 @@ def get_total_sent_notifications_for_day(day):
sms_count = get_total_sent_notifications_for_day_and_type(day, NotificationType.SMS)
return {
"email": email_count,
"sms": sms_count,
NotificationType.EMAIL: email_count,
NotificationType.SMS: sms_count,
}