@zeniai/client-epic-state 5.2.83-beta0UT → 5.2.83-beta1UT
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -391,6 +391,17 @@ const toNotificationSettingsLocalData = (data, loggedInUserEmail) => {
|
|
|
391
391
|
},
|
|
392
392
|
};
|
|
393
393
|
};
|
|
394
|
+
function toPendingTaskNotificationActive(data) {
|
|
395
|
+
if (data.is_pending_task_notification_active != null) {
|
|
396
|
+
return data.is_pending_task_notification_active;
|
|
397
|
+
}
|
|
398
|
+
// Rows saved before this flag existed store null. It shares the
|
|
399
|
+
// transactions-reminder scope with missing receipts and uncategorized
|
|
400
|
+
// transactions, so a set sibling means the user has access.
|
|
401
|
+
const hasTransactionReminderAccess = data.is_missing_receipt_notification_active != null ||
|
|
402
|
+
data.is_uncategorized_transaction_notification_active != null;
|
|
403
|
+
return hasTransactionReminderAccess ? false : null;
|
|
404
|
+
}
|
|
394
405
|
function toReminderNotificationSettingsDetails(isNotificationActive, remindersPayload) {
|
|
395
406
|
if (isNotificationActive != null) {
|
|
396
407
|
return {
|
|
@@ -411,7 +422,7 @@ const toNotificationSettings = (data) => {
|
|
|
411
422
|
missingReceiptNotification: toReminderNotificationSettingsDetails(data.is_missing_receipt_notification_active, data.missing_receipt_notification),
|
|
412
423
|
pendingBillApprovalNotification: toReminderNotificationSettingsDetails(data.is_pending_bill_approval_notification_active, data.pending_bill_approval_notification),
|
|
413
424
|
pendingReimbursementApprovalNotification: toReminderNotificationSettingsDetails(data.is_pending_reimbursement_approval_notification_active, data.pending_reimbursement_approval_notification),
|
|
414
|
-
pendingTaskNotification: toReminderNotificationSettingsDetails(data
|
|
425
|
+
pendingTaskNotification: toReminderNotificationSettingsDetails(toPendingTaskNotificationActive(data), data.pending_task_notification),
|
|
415
426
|
uncategorizedTransactionNotification: toReminderNotificationSettingsDetails(data.is_uncategorized_transaction_notification_active, data.uncategorized_transaction_notification),
|
|
416
427
|
},
|
|
417
428
|
monthEndInsightsNotificationSettings: {
|
|
@@ -395,6 +395,17 @@ const toNotificationSettingsLocalData = (data, loggedInUserEmail) => {
|
|
|
395
395
|
},
|
|
396
396
|
};
|
|
397
397
|
};
|
|
398
|
+
function toPendingTaskNotificationActive(data) {
|
|
399
|
+
if (data.is_pending_task_notification_active != null) {
|
|
400
|
+
return data.is_pending_task_notification_active;
|
|
401
|
+
}
|
|
402
|
+
// Rows saved before this flag existed store null. It shares the
|
|
403
|
+
// transactions-reminder scope with missing receipts and uncategorized
|
|
404
|
+
// transactions, so a set sibling means the user has access.
|
|
405
|
+
const hasTransactionReminderAccess = data.is_missing_receipt_notification_active != null ||
|
|
406
|
+
data.is_uncategorized_transaction_notification_active != null;
|
|
407
|
+
return hasTransactionReminderAccess ? false : null;
|
|
408
|
+
}
|
|
398
409
|
function toReminderNotificationSettingsDetails(isNotificationActive, remindersPayload) {
|
|
399
410
|
if (isNotificationActive != null) {
|
|
400
411
|
return {
|
|
@@ -415,7 +426,7 @@ const toNotificationSettings = (data) => {
|
|
|
415
426
|
missingReceiptNotification: toReminderNotificationSettingsDetails(data.is_missing_receipt_notification_active, data.missing_receipt_notification),
|
|
416
427
|
pendingBillApprovalNotification: toReminderNotificationSettingsDetails(data.is_pending_bill_approval_notification_active, data.pending_bill_approval_notification),
|
|
417
428
|
pendingReimbursementApprovalNotification: toReminderNotificationSettingsDetails(data.is_pending_reimbursement_approval_notification_active, data.pending_reimbursement_approval_notification),
|
|
418
|
-
pendingTaskNotification: toReminderNotificationSettingsDetails(data
|
|
429
|
+
pendingTaskNotification: toReminderNotificationSettingsDetails(toPendingTaskNotificationActive(data), data.pending_task_notification),
|
|
419
430
|
uncategorizedTransactionNotification: toReminderNotificationSettingsDetails(data.is_uncategorized_transaction_notification_active, data.uncategorized_transaction_notification),
|
|
420
431
|
},
|
|
421
432
|
monthEndInsightsNotificationSettings: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.2.83-
|
|
3
|
+
"version": "5.2.83-beta1UT",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|