diff --git a/app/javascript/dashboard/helper/snoozeHelpers.js b/app/javascript/dashboard/helper/snoozeHelpers.js index b758a69f4..0ecdf1e3c 100644 --- a/app/javascript/dashboard/helper/snoozeHelpers.js +++ b/app/javascript/dashboard/helper/snoozeHelpers.js @@ -66,3 +66,23 @@ export const snoozedReopenTime = snoozedUntil => { } return snoozedUntil ? format(date, 'd MMM, h.mmaaa') : null; }; +export const snoozedReopenTimeToTimestamp = snoozedUntil => { + return snoozedUntil ? getUnixTime(new Date(snoozedUntil)) : null; +}; +export const shortenSnoozeTime = snoozedUntil => { + if (!snoozedUntil) { + return null; + } + const shortenTime = snoozedUntil + .replace(' minutes', 'm') + .replace(' minute', 'm') + .replace(' hours', 'h') + .replace(' hour', 'h') + .replace(' days', 'd') + .replace(' day', 'd') + .replace(' months', 'mo') + .replace(' month', 'mo') + .replace(' years', 'y') + .replace(' year', 'y'); + return shortenTime; +}; diff --git a/app/javascript/dashboard/i18n/locale/en/inbox.json b/app/javascript/dashboard/i18n/locale/en/inbox.json index 137aac54b..0addee349 100644 --- a/app/javascript/dashboard/i18n/locale/en/inbox.json +++ b/app/javascript/dashboard/i18n/locale/en/inbox.json @@ -8,9 +8,8 @@ "NO_NOTIFICATIONS": "No notifications", "NOTE": "Notifications from all subscribed inboxes", "NO_MESSAGES_AVAILABLE": "Oops! Not able to fetch messages", - "SNOOZED_UNTIL": "Snoozed until", - "SNOOZED_UNTIL_TOMORROW": "Snoozed until tomorrow", - "SNOOZED_UNTIL_NEXT_WEEK": "Snoozed until next week" + "SNOOZED_UNTIL": "We’ll remind you after ", + "SNOOZED_ENDS": "We won’t notify you again" }, "ACTION_HEADER": { "SNOOZE": "Snooze notification", @@ -18,14 +17,14 @@ "BACK": "Back" }, "TYPES": { - "CONVERSATION_MENTION": "You have been mentioned in a conversation", - "CONVERSATION_CREATION": "New conversation created", - "CONVERSATION_ASSIGNMENT": "A conversation has been assigned to you", - "ASSIGNED_CONVERSATION_NEW_MESSAGE": "New message in an assigned conversation", - "PARTICIPATING_CONVERSATION_NEW_MESSAGE": "New message in a conversation you are participating in", - "SLA_MISSED_FIRST_RESPONSE": "SLA target first response missed for conversation", - "SLA_MISSED_NEXT_RESPONSE": "SLA target next response missed for conversation", - "SLA_MISSED_RESOLUTION": "SLA target resolution missed for conversation" + "CONVERSATION_MENTION": "Mention", + "CONVERSATION_ASSIGNMENT": "Assigned to you", + "CONVERSATION_CREATION": "", + "ASSIGNED_CONVERSATION_NEW_MESSAGE": "", + "PARTICIPATING_CONVERSATION_NEW_MESSAGE": "", + "SLA_MISSED_FIRST_RESPONSE": "", + "SLA_MISSED_NEXT_RESPONSE": "", + "SLA_MISSED_RESOLUTION": "" }, "MENU_ITEM": { "MARK_AS_READ": "Mark as read", diff --git a/app/javascript/dashboard/routes/dashboard/inbox/InboxList.vue b/app/javascript/dashboard/routes/dashboard/inbox/InboxList.vue index 93ba310c3..8798af6a5 100644 --- a/app/javascript/dashboard/routes/dashboard/inbox/InboxList.vue +++ b/app/javascript/dashboard/routes/dashboard/inbox/InboxList.vue @@ -1,7 +1,7 @@