feature/IO-2433-esignature - Add in Notifications
This commit is contained in:
@@ -16,8 +16,22 @@ const notificationScenarios = [
|
||||
"job-added-to-production",
|
||||
"job-status-change",
|
||||
"payment-collected-completed",
|
||||
"alternate-transport-changed"
|
||||
"alternate-transport-changed",
|
||||
"esign-document-opened",
|
||||
"esign-document-completed",
|
||||
"esign-document-upload-failed"
|
||||
// "supplement-imported", // Disabled for now
|
||||
];
|
||||
|
||||
export { notificationScenarios };
|
||||
/**
|
||||
* Default channel preferences for e-sign document notifications. By default, all e-sign related notifications will be
|
||||
* sent via the app, but not via email or FCM. These defaults can be overridden by user preferences.
|
||||
* @type {{"esign-document-opened": {app: boolean, email: boolean, fcm: boolean}, "esign-document-completed": {app: boolean, email: boolean, fcm: boolean}, "esign-document-upload-failed": {app: boolean, email: boolean, fcm: boolean}}}
|
||||
*/
|
||||
const notificationScenarioDefaults = {
|
||||
"esign-document-opened": { app: true, email: false, fcm: false },
|
||||
"esign-document-completed": { app: true, email: false, fcm: false },
|
||||
"esign-document-upload-failed": { app: true, email: false, fcm: false }
|
||||
};
|
||||
|
||||
export { notificationScenarios, notificationScenarioDefaults };
|
||||
|
||||
28
client/src/utils/replaceAccents.js
Normal file
28
client/src/utils/replaceAccents.js
Normal file
@@ -0,0 +1,28 @@
|
||||
export const replaceAccents = (str) => {
|
||||
// Verifies if the String has accents and replace them
|
||||
if (str.search(/[\xC0-\xFF]/g) > -1) {
|
||||
str = str
|
||||
.replace(/[\xC0-\xC5]/g, "A")
|
||||
.replace(/[\xC6]/g, "AE")
|
||||
.replace(/[\xC7]/g, "C")
|
||||
.replace(/[\xC8-\xCB]/g, "E")
|
||||
.replace(/[\xCC-\xCF]/g, "I")
|
||||
.replace(/[\xD0]/g, "D")
|
||||
.replace(/[\xD1]/g, "N")
|
||||
.replace(/[\xD2-\xD6\xD8]/g, "O")
|
||||
.replace(/[\xD9-\xDC]/g, "U")
|
||||
.replace(/[\xDD]/g, "Y")
|
||||
.replace(/[\xDE]/g, "P")
|
||||
.replace(/[\xE0-\xE5]/g, "a")
|
||||
.replace(/[\xE6]/g, "ae")
|
||||
.replace(/[\xE7]/g, "c")
|
||||
.replace(/[\xE8-\xEB]/g, "e")
|
||||
.replace(/[\xEC-\xEF]/g, "i")
|
||||
.replace(/[\xF1]/g, "n")
|
||||
.replace(/[\xF2-\xF6\xF8]/g, "o")
|
||||
.replace(/[\xF9-\xFC]/g, "u")
|
||||
.replace(/[\xFE]/g, "p")
|
||||
.replace(/[\xFD\xFF]/g, "y");
|
||||
}
|
||||
return str;
|
||||
};
|
||||
Reference in New Issue
Block a user