@zeniai/client-epic-state 4.10.49 → 4.10.50
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/billPay/recurringBills/recurringBillsPayload.d.ts +2 -1
- package/lib/entity/billPay/recurringBills/recurringBillsPayload.js +2 -1
- package/lib/entity/billPay/recurringBills/recurringBillsState.d.ts +2 -1
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +2 -1
- package/lib/view/spendManagement/billPay/editBillView/editBillViewState.d.ts +2 -1
- package/lib/view/spendManagement/helpers.js +2 -2
- package/package.json +1 -1
|
@@ -31,7 +31,8 @@ interface RecurringBillPaymentStatusPayload {
|
|
|
31
31
|
export interface RecurringBillDataPayload {
|
|
32
32
|
recurring_bill_config_id: string;
|
|
33
33
|
stage: BillStage;
|
|
34
|
-
|
|
34
|
+
total_amount: number;
|
|
35
|
+
recipient_total_amount: number;
|
|
35
36
|
instance: number;
|
|
36
37
|
payment_date: string;
|
|
37
38
|
vendor_receive_date: string;
|
|
@@ -18,7 +18,8 @@ const toRecurringBillData = (payload) => {
|
|
|
18
18
|
return ({
|
|
19
19
|
recurringBillConfigId: payload.recurring_bill_config_id,
|
|
20
20
|
stage: payload.stage,
|
|
21
|
-
|
|
21
|
+
totalAmount: payload.total_amount,
|
|
22
|
+
recipientTotalAmount: payload.recipient_total_amount,
|
|
22
23
|
instance: payload.instance,
|
|
23
24
|
paymentDate: (0, zeniDayJS_1.date)(payload.payment_date),
|
|
24
25
|
vendorReceiveDate: (0, zeniDayJS_1.date)(payload.vendor_receive_date),
|
|
@@ -25,7 +25,8 @@ export interface RecurringBillConfig {
|
|
|
25
25
|
export interface RecurringBillData {
|
|
26
26
|
recurringBillConfigId: ID;
|
|
27
27
|
stage: BillStage;
|
|
28
|
-
|
|
28
|
+
totalAmount: number;
|
|
29
|
+
recipientTotalAmount: number;
|
|
29
30
|
instance: number;
|
|
30
31
|
paymentDate: ZeniDate;
|
|
31
32
|
vendorReceiveDate: ZeniDate;
|
|
@@ -544,7 +544,8 @@ const getRecurringBillLocalData = (recurringBillState, transaction) => {
|
|
|
544
544
|
var _a;
|
|
545
545
|
return ({
|
|
546
546
|
instance: recurringBill.instance,
|
|
547
|
-
|
|
547
|
+
totalAmount: recurringBill.totalAmount,
|
|
548
|
+
recipientTotalAmount: recurringBill.recipientTotalAmount,
|
|
548
549
|
stage: recurringBill.stage,
|
|
549
550
|
paymentDate: recurringBill.paymentDate,
|
|
550
551
|
vendorReceiveDate: recurringBill.vendorReceiveDate,
|
|
@@ -35,7 +35,8 @@ export interface RecurringBillInstance {
|
|
|
35
35
|
instance: number;
|
|
36
36
|
vendorReceiveDate: ZeniDate;
|
|
37
37
|
vendorReceiveDateNotes: string;
|
|
38
|
-
|
|
38
|
+
totalAmount?: number;
|
|
39
|
+
recipientTotalAmount?: number;
|
|
39
40
|
stage?: BillStage;
|
|
40
41
|
readonly?: boolean;
|
|
41
42
|
paymentDate?: ZeniDate;
|
|
@@ -92,7 +92,7 @@ const updateRecurringBillDetails = (currentRecurringConfig, prevRecurringConfig,
|
|
|
92
92
|
currentInstance != null) {
|
|
93
93
|
const pastInstances = currentInstances.filter((bill) => bill.readonly === true);
|
|
94
94
|
const futureTotalPayments = currentTotalPayments - pastInstances.length;
|
|
95
|
-
const billAmountForFutureInstances = (_a = currentInstances[pastInstances.length + 1]) === null || _a === void 0 ? void 0 : _a.
|
|
95
|
+
const billAmountForFutureInstances = (_a = currentInstances[pastInstances.length + 1]) === null || _a === void 0 ? void 0 : _a.recipientTotalAmount;
|
|
96
96
|
updatedRecurringInstances = [
|
|
97
97
|
...pastInstances,
|
|
98
98
|
currentInstance,
|
|
@@ -188,7 +188,7 @@ function getRecurringBillInstances(startDate, frequency, totalPayments, currentI
|
|
|
188
188
|
};
|
|
189
189
|
const { offSetValue, offSetUnit } = getRecurringFrequencyWithOffset(frequency);
|
|
190
190
|
for (let i = 0; i < totalPayments; i++) {
|
|
191
|
-
updatedInstances.push(Object.assign({ instance: currentInstance + i, isDeleted: false,
|
|
191
|
+
updatedInstances.push(Object.assign({ instance: currentInstance + i, isDeleted: false, totalAmount: billAmount, recipientTotalAmount: billAmount }, checkIfHolidayAndGetNextDate(startDate.add(i * offSetValue, offSetUnit))));
|
|
192
192
|
}
|
|
193
193
|
return updatedInstances;
|
|
194
194
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.10.
|
|
3
|
+
"version": "4.10.50",
|
|
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",
|