@zeniai/client-epic-state 4.11.40 → 4.11.42
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.
- package/lib/entity/chargeCardTransaction/chargeCardTransactionPayload.js +2 -2
- package/lib/view/spendManagement/billPay/billList/billListSelector.js +31 -14
- package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewState.d.ts +1 -1
- package/lib/zeniDayJS.js +1 -0
- package/package.json +1 -1
|
@@ -19,10 +19,10 @@ const toChargeCardTransaction = (payload) => {
|
|
|
19
19
|
code: (0, chargeCardTransaction_1.toCardTransactionTypeCode)(payload.transaction_type.code),
|
|
20
20
|
name: payload.transaction_type.name,
|
|
21
21
|
},
|
|
22
|
-
createTime: (0, zeniDayJS_1.
|
|
22
|
+
createTime: (0, zeniDayJS_1.dateLocal)(payload.transaction_creation_time),
|
|
23
23
|
amount: (0, amount_1.toAmount)(payload.amount, payload.currency_code, payload.currency_symbol),
|
|
24
24
|
transactionTime: payload.transaction_time != null
|
|
25
|
-
? (0, zeniDayJS_1.
|
|
25
|
+
? (0, zeniDayJS_1.dateLocal)(payload.transaction_time)
|
|
26
26
|
: undefined,
|
|
27
27
|
merchant: {
|
|
28
28
|
name: payload.merchant.name,
|
|
@@ -525,7 +525,7 @@ const isBillSelectableForBulkAction = (bill, selectedTab, isBookClosedForBill, i
|
|
|
525
525
|
bulkSelectExceptionInfo: undefined,
|
|
526
526
|
};
|
|
527
527
|
if (isBookClosedForBill) {
|
|
528
|
-
if (selectedTab === 'scheduled' ||
|
|
528
|
+
if ((selectedTab === 'scheduled' && !bill.isRecurring) ||
|
|
529
529
|
(selectedTab === 'pending_approval' && !isAwaitingMyApproval)) {
|
|
530
530
|
return {
|
|
531
531
|
isSelectableForBulkAction: false,
|
|
@@ -537,15 +537,14 @@ const isBillSelectableForBulkAction = (bill, selectedTab, isBookClosedForBill, i
|
|
|
537
537
|
if (selectedTab === 'scheduled') {
|
|
538
538
|
//for cases where user attempts select all on scheduled tab
|
|
539
539
|
if (firstBillSelected == null && firstSelectableBill != null) {
|
|
540
|
+
if (bill.isRecurring) {
|
|
541
|
+
return {
|
|
542
|
+
isSelectableForBulkAction: false,
|
|
543
|
+
isSelectableForBulkActionSelectAll: false,
|
|
544
|
+
bulkSelectExceptionInfo: 'noActionRecurring',
|
|
545
|
+
};
|
|
546
|
+
}
|
|
540
547
|
if (firstSelectableBill.billPayInfo.billPaymentStatus.code === 'processing') {
|
|
541
|
-
if (bill.isRecurring &&
|
|
542
|
-
Boolean(firstSelectableBill.isRecurring) === false) {
|
|
543
|
-
return {
|
|
544
|
-
isSelectableForBulkAction: true,
|
|
545
|
-
isSelectableForBulkActionSelectAll: false,
|
|
546
|
-
bulkSelectExceptionInfo: undefined,
|
|
547
|
-
};
|
|
548
|
-
}
|
|
549
548
|
if (bill.billPayInfo.billPaymentStatus.code !== 'processing') {
|
|
550
549
|
return {
|
|
551
550
|
isSelectableForBulkAction: true,
|
|
@@ -565,15 +564,33 @@ const isBillSelectableForBulkAction = (bill, selectedTab, isBookClosedForBill, i
|
|
|
565
564
|
}
|
|
566
565
|
}
|
|
567
566
|
}
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
567
|
+
//no bulk action allowed on recurringBill in scheduled tab
|
|
568
|
+
if (bill.isRecurring) {
|
|
569
|
+
if (firstBillSelected != null) {
|
|
570
|
+
if ((firstBillSelected === null || firstBillSelected === void 0 ? void 0 : firstBillSelected.billPayInfo.billPaymentStatus.code) === 'processing') {
|
|
571
|
+
return {
|
|
572
|
+
isSelectableForBulkAction: false,
|
|
573
|
+
isSelectableForBulkActionSelectAll: false,
|
|
574
|
+
bulkSelectExceptionInfo: 'cancelRecurring',
|
|
575
|
+
};
|
|
576
|
+
}
|
|
577
|
+
else {
|
|
578
|
+
return {
|
|
579
|
+
isSelectableForBulkAction: false,
|
|
580
|
+
isSelectableForBulkActionSelectAll: false,
|
|
581
|
+
bulkSelectExceptionInfo: 'deleteRecurring',
|
|
582
|
+
};
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
else {
|
|
571
586
|
return {
|
|
572
587
|
isSelectableForBulkAction: false,
|
|
573
|
-
isSelectableForBulkActionSelectAll:
|
|
574
|
-
bulkSelectExceptionInfo: '
|
|
588
|
+
isSelectableForBulkActionSelectAll: false,
|
|
589
|
+
bulkSelectExceptionInfo: 'noActionRecurring',
|
|
575
590
|
};
|
|
576
591
|
}
|
|
592
|
+
}
|
|
593
|
+
if ((firstBillSelected === null || firstBillSelected === void 0 ? void 0 : firstBillSelected.billPayInfo.billPaymentStatus.code) === 'processing') {
|
|
577
594
|
if (bill.billPayInfo.billPaymentStatus.code !== 'processing') {
|
|
578
595
|
return {
|
|
579
596
|
isSelectableForBulkAction: false,
|
|
@@ -22,7 +22,7 @@ export interface BulkReviewState {
|
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
24
|
export declare type BulkOperationType = 'approve' | 'reject' | 'send_for_approval' | 'delete' | 'cancel' | 'review';
|
|
25
|
-
export declare type BulkSelectExceptionInfoType = 'bookCloseDateDelete' | 'bookCloseDateProcessing' | 'processingSelectTogether' | 'processingWithOthers' | 'cancelProcessing' | 'cancelRecurring';
|
|
25
|
+
export declare type BulkSelectExceptionInfoType = 'bookCloseDateDelete' | 'bookCloseDateProcessing' | 'processingSelectTogether' | 'processingWithOthers' | 'cancelProcessing' | 'cancelRecurring' | 'deleteRecurring' | 'noActionRecurring';
|
|
26
26
|
export declare const BULK_REVIEW_STATUS_CODES: readonly ["valid", "error", "warning"];
|
|
27
27
|
export declare const toBulkReviewStatusCode: (v: string) => "error" | "valid" | "warning";
|
|
28
28
|
export declare type BulkReviewStatusCode = ReturnType<typeof toBulkReviewStatusCode>;
|
package/lib/zeniDayJS.js
CHANGED
|
@@ -95,6 +95,7 @@ function dateInUTC(dateStringISO) {
|
|
|
95
95
|
return dayjs_1.default.utc(dateStringISO);
|
|
96
96
|
}
|
|
97
97
|
exports.dateInUTC = dateInUTC;
|
|
98
|
+
//use dateLocal to convert utc date coming from platform to user's local time
|
|
98
99
|
function dateLocal(dateStringISO) {
|
|
99
100
|
return dayjs_1.default.utc(dateStringISO).local();
|
|
100
101
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.11.
|
|
3
|
+
"version": "4.11.42",
|
|
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
|
"types": "lib/index.d.ts",
|