@zeniai/client-epic-state 4.8.13 → 4.8.14
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/billTransaction/billTransactionPayload.d.ts +4 -2
- package/lib/entity/billPay/billTransaction/billTransactionPayload.js +24 -3
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +11 -3
- package/lib/entity/billPay/billTransaction/billTransactionState.js +12 -1
- package/lib/entity/reimbursement/reimbursementPayload.d.ts +2 -1
- package/lib/entity/reimbursement/reimbursementPayload.js +12 -3
- package/lib/entity/reimbursement/reimbursementState.d.ts +7 -3
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewPayload.d.ts +2 -0
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewReducer.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewReducer.js +2 -3
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewSelector.d.ts +6 -7
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewSelector.js +21 -26
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewState.d.ts +0 -4
- package/lib/view/spendManagement/billPay/billDetailView/epics/fetchBillDetailEpic.d.ts +2 -1
- package/lib/view/spendManagement/billPay/billDetailView/epics/fetchBillDetailEpic.js +3 -1
- package/lib/view/spendManagement/billPay/billList/billListSelector.js +4 -3
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigPayload.d.ts +10 -8
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigPayload.js +38 -38
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigReducer.js +14 -4
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.js +2 -2
- package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +8 -48
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +11 -5
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +69 -50
- package/lib/view/spendManagement/billPay/editBillView/editBillViewState.d.ts +2 -1
- package/lib/view/spendManagement/billPay/editBillView/epics/fetchEditBillDetailPageEpic.d.ts +2 -1
- package/lib/view/spendManagement/billPay/editBillView/epics/fetchEditBillDetailPageEpic.js +13 -7
- package/lib/view/spendManagement/billPay/editBillView/epics/initializeBillToLocalStoreEpic.js +6 -9
- package/lib/view/spendManagement/billPay/editBillView/epics/parseInvoiceToBillEpic.js +14 -12
- package/lib/view/spendManagement/billPay/editBillView/epics/saveBillDetailEpic.js +27 -25
- package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailSelector.d.ts +5 -0
- package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailSelector.js +41 -30
- package/lib/view/spendManagement/zeniAccounts/transferDetail/transferMoneyEpic.js +4 -4
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { VendorTransactionPayload } from '../../transaction/payloadTypes/vendorTransactionPayload';
|
|
3
|
-
import { BillPayInfo, BillStage, BillTransaction, BillAccount, BillPaymentMethod, BillPaymentStatus, BillStatus } from './billTransactionState';
|
|
3
|
+
import { BillPayInfo, BillStage, BillTransaction, BillAccount, BillPaymentMethod, BillPaymentStatus, BillStatus, FromBillAccount } from './billTransactionState';
|
|
4
4
|
export interface BillTransactionPayload extends VendorTransactionPayload {
|
|
5
5
|
bill_pay_info: BillPayInfoPayload;
|
|
6
6
|
entity_approval_id: ID;
|
|
@@ -66,14 +66,16 @@ export interface BillPaymentMethodPayload {
|
|
|
66
66
|
name: string | null;
|
|
67
67
|
}
|
|
68
68
|
export interface BillAccountPayload {
|
|
69
|
-
account_id
|
|
69
|
+
account_id?: string | null;
|
|
70
70
|
payment_instrument_id?: string | null;
|
|
71
71
|
account_type: string | null;
|
|
72
|
+
account_holder_type?: string | null;
|
|
72
73
|
}
|
|
73
74
|
export declare const toBillTransaction: (payload: BillTransactionPayload) => BillTransaction;
|
|
74
75
|
export declare const toBillPayInfo: (payload: BillPayInfoPayload) => BillPayInfo;
|
|
75
76
|
export declare const toBillStage: (payload: BillStagePayload) => BillStage;
|
|
76
77
|
export declare const toBillPaymentMethod: (payload: BillPaymentMethodPayload) => BillPaymentMethod;
|
|
77
78
|
export declare const toBillAccount: (payload: BillAccountPayload) => BillAccount;
|
|
79
|
+
export declare const toFromBillAccount: (payload: BillAccountPayload) => FromBillAccount;
|
|
78
80
|
export declare const toBillPaymentStatus: (payload: BillPaymentStatusPayload) => BillPaymentStatus;
|
|
79
81
|
export declare const toBillStatus: (payload: BillStatusPayload) => BillStatus;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toBillStatus = exports.toBillPaymentStatus = exports.toBillAccount = exports.toBillPaymentMethod = exports.toBillStage = exports.toBillPayInfo = exports.toBillTransaction = void 0;
|
|
3
|
+
exports.toBillStatus = exports.toBillPaymentStatus = exports.toFromBillAccount = exports.toBillAccount = exports.toBillPaymentMethod = exports.toBillStage = exports.toBillPayInfo = exports.toBillTransaction = void 0;
|
|
4
4
|
const amount_1 = require("../../../commonStateTypes/amount");
|
|
5
5
|
const zeniDayJS_1 = require("../../../zeniDayJS");
|
|
6
6
|
const vendorTransactionPayload_1 = require("../../transaction/payloadTypes/vendorTransactionPayload");
|
|
7
|
+
const billPayConfigState_1 = require("../../../view/spendManagement/billPay/billPayConfig/billPayConfigState");
|
|
7
8
|
const billTransactionState_1 = require("./billTransactionState");
|
|
9
|
+
const billPayConfigPayload_1 = require("../../../view/spendManagement/billPay/billPayConfig/billPayConfigPayload");
|
|
8
10
|
const toBillTransaction = (payload) => {
|
|
9
11
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
10
12
|
return (Object.assign(Object.assign({}, (0, vendorTransactionPayload_1.toVendorTransaction)(payload)), { billPayInfo: (0, exports.toBillPayInfo)(payload.bill_pay_info), classId: (_a = payload.class_id) !== null && _a !== void 0 ? _a : '', className: (_b = payload.class_name) !== null && _b !== void 0 ? _b : '', qboClassId: (_c = payload.qbo_class_id) !== null && _c !== void 0 ? _c : '', transactionReferenceId: (_d = payload.transaction_reference_id) !== null && _d !== void 0 ? _d : '', entityApprovalId: payload.entity_approval_id, updateTime: (0, zeniDayJS_1.date)(payload.update_time), createdBy: (_e = payload.created_by_user_id) !== null && _e !== void 0 ? _e : '', candidateVendorName: (_f = payload.candidate_vendor_name) !== null && _f !== void 0 ? _f : '', bookCloseDate: payload.book_close_date != null ? (0, zeniDayJS_1.date)(payload.book_close_date) : undefined, lastUpdatedByUserId: (_g = payload.last_updated_by_user_id) !== null && _g !== void 0 ? _g : '', paymentProcessingTotalFee: (0, amount_1.toAmount)((_h = payload.total_fee) !== null && _h !== void 0 ? _h : 0, payload.currency_code, payload.currency_symbol), isDeleted: payload.is_deleted, isRecurring: payload.is_recurring, recurringBillConfigId: (_j = payload.recurring_bill_config_id) !== null && _j !== void 0 ? _j : undefined, recurringBillInstance: (_k = payload.recurring_bill_instance) !== null && _k !== void 0 ? _k : undefined }));
|
|
@@ -25,7 +27,7 @@ const toBillPayInfo = (payload) => {
|
|
|
25
27
|
? (0, zeniDayJS_1.date)(payload.bill_payment_status_update_time)
|
|
26
28
|
: undefined,
|
|
27
29
|
billPaymentMethodType: (0, exports.toBillPaymentMethod)(payload.bill_payment_method_type),
|
|
28
|
-
fromAccount: (0, exports.
|
|
30
|
+
fromAccount: (0, exports.toFromBillAccount)(payload.from_account),
|
|
29
31
|
toAccount: (0, exports.toBillAccount)(payload.to_account),
|
|
30
32
|
isCancelled: payload.is_cancelled,
|
|
31
33
|
billStatus: (0, exports.toBillStatus)(payload.bill_status),
|
|
@@ -66,9 +68,28 @@ const toBillAccount = (payload) => ({
|
|
|
66
68
|
: payload.payment_instrument_id != null
|
|
67
69
|
? payload.payment_instrument_id
|
|
68
70
|
: undefined,
|
|
69
|
-
billAccountType: payload.account_type != null
|
|
71
|
+
billAccountType: payload.account_type != null
|
|
72
|
+
? (0, billTransactionState_1.toBillAccountType)(payload.account_type)
|
|
73
|
+
: undefined,
|
|
74
|
+
billAccountHolderType: payload.account_holder_type != null
|
|
75
|
+
? (0, billTransactionState_1.toBillAccountHolderType)(payload.account_holder_type)
|
|
76
|
+
: undefined,
|
|
70
77
|
});
|
|
71
78
|
exports.toBillAccount = toBillAccount;
|
|
79
|
+
const toFromBillAccount = (payload) => ({
|
|
80
|
+
billAccountId: payload.account_id != null
|
|
81
|
+
? payload.account_id
|
|
82
|
+
: payload.payment_instrument_id != null
|
|
83
|
+
? payload.payment_instrument_id
|
|
84
|
+
: undefined,
|
|
85
|
+
billAccountType: payload.account_type != null
|
|
86
|
+
? (0, billPayConfigPayload_1.getAccountTypeSubConfigCodeKey)((0, billPayConfigState_1.toAccType)(payload.account_type))
|
|
87
|
+
: undefined,
|
|
88
|
+
billAccountHolderType: payload.account_holder_type != null
|
|
89
|
+
? (0, billTransactionState_1.toBillAccountHolderType)(payload.account_holder_type)
|
|
90
|
+
: undefined,
|
|
91
|
+
});
|
|
92
|
+
exports.toFromBillAccount = toFromBillAccount;
|
|
72
93
|
const toBillPaymentStatus = (payload) => {
|
|
73
94
|
var _a;
|
|
74
95
|
return ({
|
|
@@ -3,7 +3,7 @@ import { ID } from '../../../commonStateTypes/common';
|
|
|
3
3
|
import { BillTransactionDetailKey } from '../../../view/spendManagement/billPay/billDetailView/billDetailViewState';
|
|
4
4
|
import { ZeniDate } from '../../../zeniDayJS';
|
|
5
5
|
import { VendorTransaction } from '../../transaction/stateTypes/vendorTransaction';
|
|
6
|
-
import { BillPaymentConfigCodeType, BillPaymentSubConfigCodeType } from '../../../view/spendManagement/billPay/billPayConfig/billPayConfigState';
|
|
6
|
+
import { AccountTypeSubConfigCodeKeyType, BillPaymentConfigCodeType, BillPaymentSubConfigCodeType } from '../../../view/spendManagement/billPay/billPayConfig/billPayConfigState';
|
|
7
7
|
export interface BillTransaction extends VendorTransaction {
|
|
8
8
|
billPayInfo: BillPayInfo;
|
|
9
9
|
classId: ID;
|
|
@@ -33,7 +33,7 @@ export interface BillPayInfo {
|
|
|
33
33
|
billPaymentStatusMessage: string;
|
|
34
34
|
billPaymentStatusUpdateTime?: ZeniDate;
|
|
35
35
|
billPaymentMethodType: BillPaymentMethod;
|
|
36
|
-
fromAccount:
|
|
36
|
+
fromAccount: FromBillAccount;
|
|
37
37
|
toAccount: BillAccount;
|
|
38
38
|
isCancelled: boolean;
|
|
39
39
|
billStatus: BillStatus;
|
|
@@ -70,7 +70,11 @@ export interface BillPaymentMethod {
|
|
|
70
70
|
}
|
|
71
71
|
export interface BillAccount {
|
|
72
72
|
billAccountId?: ID;
|
|
73
|
-
billAccountType
|
|
73
|
+
billAccountType?: BillAccountType;
|
|
74
|
+
billAccountHolderType?: BillAccountHolderType;
|
|
75
|
+
}
|
|
76
|
+
export interface FromBillAccount extends Omit<BillAccount, 'billAccountType'> {
|
|
77
|
+
billAccountType?: AccountTypeSubConfigCodeKeyType;
|
|
74
78
|
}
|
|
75
79
|
export interface BillTransactionState {
|
|
76
80
|
transactionById: Record<ID | BillTransactionDetailKey, BillTransaction | undefined>;
|
|
@@ -87,3 +91,7 @@ export declare const toBillPaymentStatusSummaryCodeType: (v: string) => "pending
|
|
|
87
91
|
export declare type BillPaymentStatusSummaryCodeType = ReturnType<typeof toBillPaymentStatusSummaryCodeType>;
|
|
88
92
|
export declare const toBillPaymentStatusDescriptionCodeType: (v: string) => "pending_vendor_action" | "preparing_for_payment" | "error_processing" | "bill_cancelled" | "preparing_for_payment_without_expected_deposit_date" | "destination_bank_account_closed" | "destination_bank_declined_payment" | "invalid_bank_account" | "funds_arrived";
|
|
89
93
|
export declare type BillPaymentStatusDescriptionCodeType = ReturnType<typeof toBillPaymentStatusDescriptionCodeType>;
|
|
94
|
+
export declare const toBillAccountType: (v: string) => "deposit_account" | "payment_account" | "bank_account" | "payment_instrument";
|
|
95
|
+
export declare type BillAccountType = ReturnType<typeof toBillAccountType>;
|
|
96
|
+
export declare const toBillAccountHolderType: (v: string) => "vendor" | "customer";
|
|
97
|
+
export declare type BillAccountHolderType = ReturnType<typeof toBillAccountHolderType>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toBillPaymentStatusDescriptionCodeType = exports.toBillPaymentStatusSummaryCodeType = exports.toBillStatusSummaryCodeType = exports.toBillStatusCodeType = exports.toBillPaymentStatusCodeType = exports.toBillStageCodeType = exports.toInternationalTransferFeeBearerPaymentMethod = void 0;
|
|
3
|
+
exports.toBillAccountHolderType = exports.toBillAccountType = exports.toBillPaymentStatusDescriptionCodeType = exports.toBillPaymentStatusSummaryCodeType = exports.toBillStatusSummaryCodeType = exports.toBillStatusCodeType = exports.toBillPaymentStatusCodeType = exports.toBillStageCodeType = exports.toInternationalTransferFeeBearerPaymentMethod = void 0;
|
|
4
4
|
const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
|
|
5
5
|
const ALL_INTERNATIONAL_TRANSFER_FEE_BEARER_PAYMENT_METHOD = [
|
|
6
6
|
'swift_our',
|
|
@@ -61,3 +61,14 @@ const BILL_PAYMENT_STATUS_DESCRIPTION_CODE = [
|
|
|
61
61
|
];
|
|
62
62
|
const toBillPaymentStatusDescriptionCodeType = (v) => (0, stringToUnion_1.stringToUnion)(v, BILL_PAYMENT_STATUS_DESCRIPTION_CODE);
|
|
63
63
|
exports.toBillPaymentStatusDescriptionCodeType = toBillPaymentStatusDescriptionCodeType;
|
|
64
|
+
const BILL_ACCOUNT_CODE = [
|
|
65
|
+
'deposit_account',
|
|
66
|
+
'payment_account',
|
|
67
|
+
'bank_account',
|
|
68
|
+
'payment_instrument',
|
|
69
|
+
];
|
|
70
|
+
const toBillAccountType = (v) => (0, stringToUnion_1.stringToUnion)(v, BILL_ACCOUNT_CODE);
|
|
71
|
+
exports.toBillAccountType = toBillAccountType;
|
|
72
|
+
const BILL_ACCOUNT_HOLDER_CODE = ['customer', 'vendor'];
|
|
73
|
+
const toBillAccountHolderType = (v) => (0, stringToUnion_1.stringToUnion)(v, BILL_ACCOUNT_HOLDER_CODE);
|
|
74
|
+
exports.toBillAccountHolderType = toBillAccountHolderType;
|
|
@@ -4,7 +4,7 @@ import { BillAccountPayload, BillPaymentMethodPayload, BillPaymentStatusPayload,
|
|
|
4
4
|
import { ClassBasePayload } from '../class/classPayload';
|
|
5
5
|
import { MerchantBasePayload } from '../merchant/merchantPayload';
|
|
6
6
|
import { AttachmentPayload } from '../transaction/payloadTypes/attachmentPayload';
|
|
7
|
-
import { DistanceMilage, LineDetail, MilageReimbursementLine, OutofPocketReimbursementLine, Reimbursement, ReimbursementInfo, ReimbursementLine, ReimbursementLineBase, ReimbursementTypeCode } from './reimbursementState';
|
|
7
|
+
import { DistanceMilage, LineDetail, MilageReimbursementLine, OutofPocketReimbursementLine, Reimbursement, ReimbursementInfo, ReimbursementLine, ReimbursementLineBase, ReimbursementTypeCode, RemiBillAccount } from './reimbursementState';
|
|
8
8
|
export interface ReimbursementPayload {
|
|
9
9
|
reimbursement_provider: string;
|
|
10
10
|
transaction_type: string;
|
|
@@ -99,3 +99,4 @@ export declare const toLineDetailPayload: (lineDetail: LineDetail) => LineDetail
|
|
|
99
99
|
export declare const toLineDetail: (payload: LineDetailPayload) => LineDetail;
|
|
100
100
|
export declare const toDistanceMilage: (payload: DistanceMilagePayload) => DistanceMilage;
|
|
101
101
|
export declare const toDistanceMilagePayload: (distanceMilage: DistanceMilage) => DistanceMilagePayload;
|
|
102
|
+
export declare const toRemiBillAccount: (payload: BillAccountPayload) => RemiBillAccount;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toDistanceMilagePayload = exports.toDistanceMilage = exports.toLineDetail = exports.toLineDetailPayload = exports.toReimbursementTypePayloadPayload = exports.toReimbursementLineBasePayload = exports.toReimbursementLineBase = exports.toOutofPocketReimbursementLine = exports.toMilageReimbursementLine = exports.toReimbursementLine = exports.toOutofPocketReimbursementLinePayload = exports.toMilageReimbursementLinePayload = exports.toReimbursementLinePayload = exports.toReimbursementInfo = exports.toReimbursement = exports.toReimbursementTransactionTypeStrict = exports.toReimbursementTransactionType = void 0;
|
|
3
|
+
exports.toRemiBillAccount = exports.toDistanceMilagePayload = exports.toDistanceMilage = exports.toLineDetail = exports.toLineDetailPayload = exports.toReimbursementTypePayloadPayload = exports.toReimbursementLineBasePayload = exports.toReimbursementLineBase = exports.toOutofPocketReimbursementLine = exports.toMilageReimbursementLine = exports.toReimbursementLine = exports.toOutofPocketReimbursementLinePayload = exports.toMilageReimbursementLinePayload = exports.toReimbursementLinePayload = exports.toReimbursementInfo = exports.toReimbursement = exports.toReimbursementTransactionTypeStrict = exports.toReimbursementTransactionType = void 0;
|
|
4
4
|
const urlPayload_1 = require("../../commonPayloadTypes/urlPayload");
|
|
5
5
|
const amount_1 = require("../../commonStateTypes/amount");
|
|
6
6
|
const stringToUnion_1 = require("../../commonStateTypes/stringToUnion");
|
|
@@ -56,8 +56,8 @@ const toReimbursementInfo = (payload) => {
|
|
|
56
56
|
? (0, zeniDayJS_1.date)(payload.reimbursement_payment_status_update_time)
|
|
57
57
|
: undefined,
|
|
58
58
|
billPaymentMethodType: (0, billTransactionPayload_1.toBillPaymentMethod)(payload.reimbursement_payment_method_type),
|
|
59
|
-
fromAccount: (0,
|
|
60
|
-
toAccount: (0,
|
|
59
|
+
fromAccount: (0, exports.toRemiBillAccount)(payload.from_account),
|
|
60
|
+
toAccount: (0, exports.toRemiBillAccount)(payload.to_account),
|
|
61
61
|
billStatus: (0, billTransactionPayload_1.toBillStatus)(payload.reimbursement_status),
|
|
62
62
|
expectedDepositDate: payload.expected_deposit_date != null
|
|
63
63
|
? (0, zeniDayJS_1.date)(payload.expected_deposit_date)
|
|
@@ -162,3 +162,12 @@ const toDistanceMilagePayload = (distanceMilage) => ({
|
|
|
162
162
|
value: distanceMilage.value,
|
|
163
163
|
});
|
|
164
164
|
exports.toDistanceMilagePayload = toDistanceMilagePayload;
|
|
165
|
+
const toRemiBillAccount = (payload) => ({
|
|
166
|
+
billAccountId: payload.account_id != null
|
|
167
|
+
? payload.account_id
|
|
168
|
+
: payload.payment_instrument_id != null
|
|
169
|
+
? payload.payment_instrument_id
|
|
170
|
+
: undefined,
|
|
171
|
+
billAccountType: payload.account_type != null ? payload.account_type : '',
|
|
172
|
+
});
|
|
173
|
+
exports.toRemiBillAccount = toRemiBillAccount;
|
|
@@ -5,7 +5,7 @@ import { Attachment } from '../transaction/stateTypes/attachment';
|
|
|
5
5
|
import { ZeniUrl as Url } from '../../zeniUrl';
|
|
6
6
|
import { AccountBase } from '../account/accountState';
|
|
7
7
|
import { ClassBase } from '../class/classState';
|
|
8
|
-
import {
|
|
8
|
+
import { BillPaymentStatus, BillStage, BillStatus } from '../billPay/billTransaction/billTransactionState';
|
|
9
9
|
import { BillPaymentConfigCodeType, BillPaymentSubConfigCodeType } from '../../view/spendManagement/billPay/billPayConfig/billPayConfigState';
|
|
10
10
|
import { ReimbursementTransactionType } from './reimbursementPayload';
|
|
11
11
|
import { MerchantBase } from '../merchant/merchant';
|
|
@@ -64,14 +64,18 @@ export interface ReimbursementInfo {
|
|
|
64
64
|
billPaymentStatus: BillPaymentStatus;
|
|
65
65
|
billPaymentStatusUpdateTime?: ZeniDate;
|
|
66
66
|
billPaymentMethodType: RemiPaymentMethod;
|
|
67
|
-
fromAccount:
|
|
68
|
-
toAccount:
|
|
67
|
+
fromAccount: RemiBillAccount;
|
|
68
|
+
toAccount: RemiBillAccount;
|
|
69
69
|
billStatus: BillStatus;
|
|
70
70
|
expectedDepositDate?: ZeniDate;
|
|
71
71
|
stripeInboundTransferId: string;
|
|
72
72
|
stripeOutboundPaymentId: string;
|
|
73
73
|
actualDepositDate?: ZeniDate;
|
|
74
74
|
}
|
|
75
|
+
export interface RemiBillAccount {
|
|
76
|
+
billAccountId?: ID;
|
|
77
|
+
billAccountType: string;
|
|
78
|
+
}
|
|
75
79
|
export interface ReimbursementState {
|
|
76
80
|
reimbursementById: Record<ID, Reimbursement | undefined>;
|
|
77
81
|
}
|
|
@@ -9,6 +9,7 @@ import { ZeniAPIResponse } from '../../../../responsePayload';
|
|
|
9
9
|
import { VendorPayload } from '../../../../entity/vendor/vendorPayload';
|
|
10
10
|
import { PaymentInstrumentPayload } from '../../../../entity/paymentInstrument/paymentInstrumentPayload';
|
|
11
11
|
import { RecurringBillConfigResponsePayload, RecurringBillDataPayload } from '../../../../entity/billPay/recurringBills/recurringBillsPayload';
|
|
12
|
+
import { DepositAccountPayload } from '../../../../entity/depositAccount/depositAccountPayload';
|
|
12
13
|
export interface ApproveOrRejectBillPayload {
|
|
13
14
|
approval_rules: ApprovalRulePayload[];
|
|
14
15
|
users: UserPayload[];
|
|
@@ -19,6 +20,7 @@ export interface BillDetailViewPayload extends ApproveOrRejectBillPayload {
|
|
|
19
20
|
bank_accounts: BankAccountPayload[];
|
|
20
21
|
payment_instruments: PaymentInstrumentPayload[];
|
|
21
22
|
payment_accounts: PaymentAccountPayload[];
|
|
23
|
+
deposit_accounts: DepositAccountPayload[];
|
|
22
24
|
accounts: AccountPayload[];
|
|
23
25
|
vendors: VendorPayload[];
|
|
24
26
|
recurring_bill_configs: RecurringBillConfigResponsePayload[];
|
|
@@ -5,8 +5,8 @@ import { BillDetailViewPayload } from './billDetailViewPayload';
|
|
|
5
5
|
export declare const initialState: BillDetailViewState;
|
|
6
6
|
export declare const fetchBillDetail: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[billId: string, isShowDeletedBillsEnabled: boolean, cacheOverride?: any], {
|
|
7
7
|
billId: string;
|
|
8
|
-
cacheOverride: any;
|
|
9
8
|
isShowDeletedBillsEnabled: boolean;
|
|
9
|
+
cacheOverride: any;
|
|
10
10
|
}, string, never, never>, updateBillDetail: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
11
11
|
billId: ID;
|
|
12
12
|
billDetail: BillDetailViewPayload;
|
|
@@ -29,8 +29,8 @@ const billDetailView = (0, toolkit_1.createSlice)({
|
|
|
29
29
|
return {
|
|
30
30
|
payload: {
|
|
31
31
|
billId,
|
|
32
|
-
cacheOverride,
|
|
33
32
|
isShowDeletedBillsEnabled,
|
|
33
|
+
cacheOverride,
|
|
34
34
|
},
|
|
35
35
|
};
|
|
36
36
|
},
|
|
@@ -40,10 +40,9 @@ const billDetailView = (0, toolkit_1.createSlice)({
|
|
|
40
40
|
delete draft.billDetailById[key];
|
|
41
41
|
},
|
|
42
42
|
updateBillDetail(draft, action) {
|
|
43
|
-
var _a, _b, _c, _d;
|
|
44
43
|
const { billId, billDetail } = action.payload;
|
|
45
44
|
const key = (0, billDetailViewState_1.getBillTransactionDetailKey)(billId);
|
|
46
|
-
draft.billDetailById[key] = Object.assign(Object.assign({}, draft.billDetailById[key]), {
|
|
45
|
+
draft.billDetailById[key] = Object.assign(Object.assign({}, draft.billDetailById[key]), { billId: billId, approvalRuleIds: billDetail.approval_rules.map((approvalRule) => approvalRule.approval_rule_id), entityApprovalIds: billDetail.entity_approvals.map((entityApproval) => entityApproval.entity_approval_id) });
|
|
47
46
|
},
|
|
48
47
|
updateBillDetailFetchState: {
|
|
49
48
|
reducer: (draft, action) => {
|
|
@@ -5,7 +5,6 @@ import { BankAccount } from '../../../../entity/bankAccount/bankAccount';
|
|
|
5
5
|
import { BillPayConfig } from '../billPayConfig/billPayConfigState';
|
|
6
6
|
import { BillTransaction } from '../../../../entity/billPay/billTransaction/billTransactionState';
|
|
7
7
|
import { ActivityStatus, EntityType } from '../../../../entity/entityApprovalStatus/entityApprovalStatusState';
|
|
8
|
-
import { PaymentAccount } from '../../../../entity/paymentAccount/paymentAccountState';
|
|
9
8
|
import { User } from '../../../../entity/user/userState';
|
|
10
9
|
import { RootState } from '../../../../reducer';
|
|
11
10
|
import { ZeniDate } from '../../../../zeniDayJS';
|
|
@@ -19,13 +18,13 @@ import { UserAndRole } from '../../../companyView/types/userAndRole';
|
|
|
19
18
|
import { Class } from '../../../../entity/class/classState';
|
|
20
19
|
import { PaymentInstrument } from '../../../../entity/paymentInstrument/paymentInstrument';
|
|
21
20
|
import { RecurringBillConfig, RecurringBillData } from '../../../../entity/billPay/recurringBills/recurringBillsState';
|
|
21
|
+
import { TransferMoneyParty } from '../../zeniAccounts/transferDetail/transferDetailState';
|
|
22
22
|
export interface BillDetailViewSelector extends SelectorView {
|
|
23
|
-
transactionDetails
|
|
24
|
-
createdBy
|
|
25
|
-
bankAccount
|
|
26
|
-
paymentInstrument
|
|
27
|
-
|
|
28
|
-
zeniAccountName: string;
|
|
23
|
+
transactionDetails?: BillTransaction;
|
|
24
|
+
createdBy?: User;
|
|
25
|
+
bankAccount?: BankAccount;
|
|
26
|
+
paymentInstrument?: PaymentInstrument;
|
|
27
|
+
withdrawFrom?: TransferMoneyParty;
|
|
29
28
|
previousBills: PreviousBillsSelectorView;
|
|
30
29
|
deleteStatus: FetchStateAndError;
|
|
31
30
|
cancelAndDeleteStatus: FetchStateAndError;
|
|
@@ -7,7 +7,6 @@ exports.checkApproveRejectBtnShow = exports.getBillDetailView = exports.getBillA
|
|
|
7
7
|
const get_1 = __importDefault(require("lodash/get"));
|
|
8
8
|
const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
|
|
9
9
|
const reduceFetchState_1 = require("../../../../commonStateTypes/reduceFetchState");
|
|
10
|
-
const accountSelector_1 = require("../../../../entity/account/accountSelector");
|
|
11
10
|
const approvalRuleSelector_1 = require("../../../../entity/approvalRule/approvalRuleSelector");
|
|
12
11
|
const bankAccountSelector_1 = require("../../../../entity/bankAccount/bankAccountSelector");
|
|
13
12
|
const billPayConfigSelector_1 = require("../billPayConfig/billPayConfigSelector");
|
|
@@ -25,6 +24,8 @@ const realTimeApprovalState_1 = require("../../realTimeApprovalView/realTimeAppr
|
|
|
25
24
|
const helpers_1 = require("../../helpers");
|
|
26
25
|
const paymentInstrumentSelector_1 = require("../../../../entity/paymentInstrument/paymentInstrumentSelector");
|
|
27
26
|
const billPayConfigPayload_1 = require("../billPayConfig/billPayConfigPayload");
|
|
27
|
+
const depositAccountSelector_1 = require("../../../../entity/depositAccount/depositAccountSelector");
|
|
28
|
+
const transferDetailSelector_1 = require("../../zeniAccounts/transferDetail/transferDetailSelector");
|
|
28
29
|
const getBillActivities = (state, billId, billStageCode) => {
|
|
29
30
|
const { billDetailViewState, approvalRuleState, entityApprovalStatusState, userState, } = state;
|
|
30
31
|
const key = (0, billDetailViewState_1.getBillTransactionDetailKey)(billId);
|
|
@@ -83,8 +84,8 @@ const getBillActivities = (state, billId, billStageCode) => {
|
|
|
83
84
|
};
|
|
84
85
|
exports.getBillActivities = getBillActivities;
|
|
85
86
|
const getBillDetailView = (state, billId) => {
|
|
86
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
87
|
-
const {
|
|
87
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
88
|
+
const { bankAccountState, paymentInstrumentState, billDetailViewState, billTransactionState, paymentAccountState, userState, billPayConfigState, userRoleState, classListState, classState, commonHistoryState, realTimeApprovalState, entityApprovalStatusState, billPaySetupApproverViewState, vendorState, recurringBillState, depositAccountState, } = state;
|
|
88
89
|
const { approverListState } = billPaySetupApproverViewState;
|
|
89
90
|
const detailKey = (0, billDetailViewState_1.getBillTransactionDetailKey)(billId !== null && billId !== void 0 ? billId : '');
|
|
90
91
|
const billTransactionDetails = (0, get_1.default)(billDetailViewState.billDetailById, detailKey, undefined);
|
|
@@ -93,14 +94,11 @@ const getBillDetailView = (state, billId) => {
|
|
|
93
94
|
fetchState: (_a = billTransactionDetails === null || billTransactionDetails === void 0 ? void 0 : billTransactionDetails.fetchState) !== null && _a !== void 0 ? _a : 'Not-Started',
|
|
94
95
|
error: billTransactionDetails === null || billTransactionDetails === void 0 ? void 0 : billTransactionDetails.error,
|
|
95
96
|
};
|
|
96
|
-
const bankAccount = (0, bankAccountSelector_1.getBankAccountByBankAccountId)(bankAccountState, (_b =
|
|
97
|
-
const paymentInstrument = (
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
const
|
|
101
|
-
? (0, paymentAccountSelector_1.getPaymentAccountByPaymentAccountId)(paymentAccountState, billTransactionDetails.paymentAccountId)
|
|
102
|
-
: undefined;
|
|
103
|
-
let zeniAccountName = '';
|
|
97
|
+
const bankAccount = (0, bankAccountSelector_1.getBankAccountByBankAccountId)(bankAccountState, (_b = transaction === null || transaction === void 0 ? void 0 : transaction.billPayInfo.toAccount.billAccountId) !== null && _b !== void 0 ? _b : '');
|
|
98
|
+
const paymentInstrument = (0, paymentInstrumentSelector_1.getPaymentInstrumentById)(paymentInstrumentState, (_c = transaction === null || transaction === void 0 ? void 0 : transaction.billPayInfo.toAccount.billAccountId) !== null && _c !== void 0 ? _c : '');
|
|
99
|
+
const paymentAccount = (0, paymentAccountSelector_1.getPaymentAccountByPaymentAccountId)(paymentAccountState, (_d = transaction === null || transaction === void 0 ? void 0 : transaction.billPayInfo.fromAccount.billAccountId) !== null && _d !== void 0 ? _d : '');
|
|
100
|
+
const depositAccount = (0, depositAccountSelector_1.getDepositAccountByDepositAccountId)(depositAccountState, (_e = transaction === null || transaction === void 0 ? void 0 : transaction.billPayInfo.fromAccount.billAccountId) !== null && _e !== void 0 ? _e : '');
|
|
101
|
+
const withdrawFrom = (0, transferDetailSelector_1.getTransferMoneyParties)((_f = (depositAccount && [depositAccount])) !== null && _f !== void 0 ? _f : [], (_g = (paymentAccount && [paymentAccount])) !== null && _g !== void 0 ? _g : [])[0];
|
|
104
102
|
let previousBills = {
|
|
105
103
|
bills: [],
|
|
106
104
|
fetchState: 'Not-Started',
|
|
@@ -109,9 +107,7 @@ const getBillDetailView = (state, billId) => {
|
|
|
109
107
|
};
|
|
110
108
|
if ((billTransactionDetails === null || billTransactionDetails === void 0 ? void 0 : billTransactionDetails.fetchState) === 'Completed' &&
|
|
111
109
|
transaction != null) {
|
|
112
|
-
const
|
|
113
|
-
zeniAccountName = zeniAccount != null ? zeniAccount.accountName : '';
|
|
114
|
-
const previousBillsView = (0, previousBillsSelector_1.getPreviousBills)(state, (_e = (_d = transaction.vendor) === null || _d === void 0 ? void 0 : _d.id) !== null && _e !== void 0 ? _e : '');
|
|
110
|
+
const previousBillsView = (0, previousBillsSelector_1.getPreviousBills)(state, (_j = (_h = transaction.vendor) === null || _h === void 0 ? void 0 : _h.id) !== null && _j !== void 0 ? _j : '');
|
|
115
111
|
//don't include current bill
|
|
116
112
|
previousBills = Object.assign(Object.assign({}, previousBillsView), { bills: previousBillsView.bills.filter((bill) => bill.id !== billId) });
|
|
117
113
|
fetchState = (0, reduceFetchState_1.reduceFetchState)([billTransactionDetails, previousBillsView]);
|
|
@@ -123,7 +119,7 @@ const getBillDetailView = (state, billId) => {
|
|
|
123
119
|
const allApproverIds = [
|
|
124
120
|
...new Set([
|
|
125
121
|
...approverIds,
|
|
126
|
-
...((
|
|
122
|
+
...((_k = realTimeApprovalData === null || realTimeApprovalData === void 0 ? void 0 : realTimeApprovalData.realTimeApproverIds) !== null && _k !== void 0 ? _k : []),
|
|
127
123
|
]),
|
|
128
124
|
];
|
|
129
125
|
const allApprovers = allApproverIds
|
|
@@ -136,7 +132,7 @@ const getBillDetailView = (state, billId) => {
|
|
|
136
132
|
.filter((approver) => approver.user != null);
|
|
137
133
|
const filteredAttributes = (0, cloneDeep_1.default)(attributes);
|
|
138
134
|
const filteredApprovers = (0, cloneDeep_1.default)(allApprovers);
|
|
139
|
-
const entityApprovalStatusByIds = (0, entityApprovalStatusSelector_1.getEntityApprovalStatusByIds)(entityApprovalStatusState, (
|
|
135
|
+
const entityApprovalStatusByIds = (0, entityApprovalStatusSelector_1.getEntityApprovalStatusByIds)(entityApprovalStatusState, (_l = billTransactionDetails === null || billTransactionDetails === void 0 ? void 0 : billTransactionDetails.entityApprovalIds) !== null && _l !== void 0 ? _l : []);
|
|
140
136
|
if (billActivities != null &&
|
|
141
137
|
(transaction === null || transaction === void 0 ? void 0 : transaction.billPayInfo.stage.code) !== 'draft') {
|
|
142
138
|
entityApprovalStatusByIds.forEach((approval) => {
|
|
@@ -156,18 +152,18 @@ const getBillDetailView = (state, billId) => {
|
|
|
156
152
|
}
|
|
157
153
|
});
|
|
158
154
|
}
|
|
159
|
-
const deleteStatus = (
|
|
160
|
-
const cancelStatus = (
|
|
161
|
-
const cancelAndDeleteStatus = (
|
|
162
|
-
const approvalUpdateStatus = (
|
|
155
|
+
const deleteStatus = (_m = billTransactionDetails === null || billTransactionDetails === void 0 ? void 0 : billTransactionDetails.deleteStatus) !== null && _m !== void 0 ? _m : billDetailViewState_1.initialBillDetailView.deleteStatus;
|
|
156
|
+
const cancelStatus = (_o = billTransactionDetails === null || billTransactionDetails === void 0 ? void 0 : billTransactionDetails.cancelStatus) !== null && _o !== void 0 ? _o : billDetailViewState_1.initialBillDetailView.cancelStatus;
|
|
157
|
+
const cancelAndDeleteStatus = (_p = billTransactionDetails === null || billTransactionDetails === void 0 ? void 0 : billTransactionDetails.cancelAndDeleteStatus) !== null && _p !== void 0 ? _p : billDetailViewState_1.initialBillDetailView.cancelAndDeleteStatus;
|
|
158
|
+
const approvalUpdateStatus = (_q = billTransactionDetails === null || billTransactionDetails === void 0 ? void 0 : billTransactionDetails.approvalUpdateStatus) !== null && _q !== void 0 ? _q : billDetailViewState_1.initialBillDetailView.approvalUpdateStatus;
|
|
163
159
|
const approvalType = billDetailViewState.approvalType;
|
|
164
|
-
const createdBy = (0, userSelector_1.getUserByUserId)(userState, (
|
|
160
|
+
const createdBy = (0, userSelector_1.getUserByUserId)(userState, (_r = transaction === null || transaction === void 0 ? void 0 : transaction.createdBy) !== null && _r !== void 0 ? _r : '');
|
|
165
161
|
const paymentMethodCode = transaction === null || transaction === void 0 ? void 0 : transaction.billPayInfo.billPaymentMethodType.code;
|
|
166
162
|
const paymentMethodSubCode = transaction === null || transaction === void 0 ? void 0 : transaction.billPayInfo.billPaymentMethodType.subCode;
|
|
167
163
|
const internationalTransferFeeBearerPaymentMethod = transaction === null || transaction === void 0 ? void 0 : transaction.billPayInfo.internationalTransferFeeBearerPaymentMethod;
|
|
168
164
|
const { internationalCode, internationalSubCode } = (0, billPayConfigSelector_1.getInternationalMethodCode)(paymentMethodSubCode, internationalTransferFeeBearerPaymentMethod);
|
|
169
165
|
const paymentMethodType = paymentMethodCode != null && paymentMethodSubCode != null
|
|
170
|
-
? (0, billPayConfigSelector_1.getBillPayConfigByKey)(billPayConfigState, (0, billPayConfigState_1.getBillPayConfigMethodKey)(paymentMethodCode, (0, billPayConfigState_1.toBillPaymentSubConfigCodeKeyType)((0, billPayConfigPayload_1.getBillPaymentSubConfigCodeKey)(paymentMethodSubCode)), internationalCode != null
|
|
166
|
+
? (0, billPayConfigSelector_1.getBillPayConfigByKey)(billPayConfigState, (0, billPayConfigState_1.getBillPayConfigMethodKey)(paymentMethodCode, (0, billPayConfigState_1.toBillPaymentSubConfigCodeKeyType)((0, billPayConfigPayload_1.getBillPaymentSubConfigCodeKey)(paymentMethodSubCode)), withdrawFrom === null || withdrawFrom === void 0 ? void 0 : withdrawFrom.accType, internationalCode != null
|
|
171
167
|
? (0, billPayConfigPayload_1.getInternationalWireMethodCodeKey)(internationalCode)
|
|
172
168
|
: undefined, internationalSubCode != null
|
|
173
169
|
? (0, billPayConfigPayload_1.getInternationalSubConfigCodeKey)(internationalSubCode)
|
|
@@ -183,8 +179,8 @@ const getBillDetailView = (state, billId) => {
|
|
|
183
179
|
classIds: classIds,
|
|
184
180
|
reportId: 'class_list',
|
|
185
181
|
});
|
|
186
|
-
const currentVendorDetails = (0, get_1.default)(vendorState.vendorByID, (
|
|
187
|
-
const isRecurring = (
|
|
182
|
+
const currentVendorDetails = (0, get_1.default)(vendorState.vendorByID, (_s = billTransactionDetails === null || billTransactionDetails === void 0 ? void 0 : billTransactionDetails.vendorId) !== null && _s !== void 0 ? _s : '', undefined);
|
|
183
|
+
const isRecurring = (_t = transaction === null || transaction === void 0 ? void 0 : transaction.isRecurring) !== null && _t !== void 0 ? _t : false;
|
|
188
184
|
let recurringBillConfigDetail = undefined;
|
|
189
185
|
let recurringBillInstances = undefined;
|
|
190
186
|
if (isRecurring && (transaction === null || transaction === void 0 ? void 0 : transaction.recurringBillConfigId) != null) {
|
|
@@ -200,8 +196,7 @@ const getBillDetailView = (state, billId) => {
|
|
|
200
196
|
createdBy,
|
|
201
197
|
bankAccount,
|
|
202
198
|
paymentInstrument,
|
|
203
|
-
|
|
204
|
-
zeniAccountName,
|
|
199
|
+
withdrawFrom,
|
|
205
200
|
previousBills,
|
|
206
201
|
deleteStatus,
|
|
207
202
|
cancelStatus,
|
|
@@ -8,10 +8,6 @@ export interface BillDetailView extends FetchedState {
|
|
|
8
8
|
cancelStatus: FetchStateAndError;
|
|
9
9
|
approvalUpdateStatus: FetchStateAndError;
|
|
10
10
|
billId?: ID;
|
|
11
|
-
bankAccountId?: ID;
|
|
12
|
-
paymentInstrumentId?: ID;
|
|
13
|
-
paymentAccountId?: ID;
|
|
14
|
-
zeniAccountId?: ID;
|
|
15
11
|
entityApprovalIds: ID[];
|
|
16
12
|
approvalRuleIds: ID[];
|
|
17
13
|
eventIds: ID[];
|
|
@@ -21,7 +21,8 @@ import { fetchDuplicateBill } from '../../billPayReview/billPayReviewReducer';
|
|
|
21
21
|
import { updatePaymentInstruments } from '../../../../../entity/paymentInstrument/paymentInstrumentReducer';
|
|
22
22
|
import { convertAmountToHomeCurrency } from '../../editBillView/editBillViewReducer';
|
|
23
23
|
import { updateRecurringBillConfigs, updateRecurringBills } from '../../../../../entity/billPay/recurringBills/recurringBillsReducer';
|
|
24
|
-
|
|
24
|
+
import { updateDepositAccounts } from '../../../../../entity/depositAccount/depositAccountReducer';
|
|
25
|
+
export declare type ActionType = ReturnType<typeof fetchBillDetail> | ReturnType<typeof updateBillTransaction> | ReturnType<typeof updateBankAccounts> | ReturnType<typeof updatePaymentInstruments> | ReturnType<typeof updateBillDetailFetchState> | ReturnType<typeof removeBillTransaction> | ReturnType<typeof removeBillDetail> | ReturnType<typeof updatePaymentAccounts> | ReturnType<typeof updateAccounts> | ReturnType<typeof updateAllUsers> | ReturnType<typeof updateApprovalRules> | ReturnType<typeof updateEntityApprovalStatus> | ReturnType<typeof fetchPreviousBills> | ReturnType<typeof updateBillDetail> | ReturnType<typeof updateClasses> | ReturnType<typeof updateVendors> | ReturnType<typeof updateContacts> | ReturnType<typeof updateAddresses> | ReturnType<typeof fetchEntityHistory> | ReturnType<typeof fetchVendorsList> | ReturnType<typeof fetchDuplicateBill> | ReturnType<typeof convertAmountToHomeCurrency> | ReturnType<typeof waitForVendorByNameThenUpdateBillDetail> | ReturnType<typeof updateRecurringBillConfigs> | ReturnType<typeof updateRecurringBills> | ReturnType<typeof updateDepositAccounts>;
|
|
25
26
|
export declare const fetchBillDetailEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
26
27
|
export declare const waitForVendorByNameThenUpdateBillDetailEpic: (actions$: ActionsObservable<ActionType>, _: StateObservable<RootState>) => Observable<{
|
|
27
28
|
payload: {
|
|
@@ -28,8 +28,9 @@ const vendorListReducer_1 = require("../../../../vendorList/vendorListReducer");
|
|
|
28
28
|
const billPayReviewReducer_1 = require("../../billPayReview/billPayReviewReducer");
|
|
29
29
|
const paymentInstrumentReducer_1 = require("../../../../../entity/paymentInstrument/paymentInstrumentReducer");
|
|
30
30
|
const recurringBillsReducer_1 = require("../../../../../entity/billPay/recurringBills/recurringBillsReducer");
|
|
31
|
+
const depositAccountReducer_1 = require("../../../../../entity/depositAccount/depositAccountReducer");
|
|
31
32
|
const fetchBillDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(billDetailViewReducer_1.fetchBillDetail.match), (0, operators_1.mergeMap)((action) => {
|
|
32
|
-
const { billId,
|
|
33
|
+
const { billId, isShowDeletedBillsEnabled, cacheOverride } = action.payload;
|
|
33
34
|
const detailKey = (0, billDetailViewState_1.getBillTransactionDetailKey)(billId);
|
|
34
35
|
const billActions = [];
|
|
35
36
|
const state = state$.value;
|
|
@@ -76,6 +77,7 @@ const fetchBillDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, ope
|
|
|
76
77
|
(0, recurringBillsReducer_1.updateRecurringBills)(response.data.recurring_bills),
|
|
77
78
|
(0, billTransactionReducer_1.updateBillTransaction)(response.data.transaction),
|
|
78
79
|
(0, paymentAccountReducer_1.updatePaymentAccounts)(response.data.payment_accounts),
|
|
80
|
+
(0, depositAccountReducer_1.updateDepositAccounts)(response.data.deposit_accounts),
|
|
79
81
|
(0, accountReducer_1.updateAccounts)((_j = response.data.accounts) !== null && _j !== void 0 ? _j : [], 'bill_pay'),
|
|
80
82
|
(0, userReducer_1.updateAllUsers)({ users: (_k = response.data.users) !== null && _k !== void 0 ? _k : [] }),
|
|
81
83
|
(0, approvalRuleReducer_1.updateApprovalRules)(response.data.approval_rules),
|
|
@@ -125,9 +125,10 @@ const getBillList = (state, currentTimePeriod) => {
|
|
|
125
125
|
sortKey: 'name',
|
|
126
126
|
sortOrder: 'ascending',
|
|
127
127
|
};
|
|
128
|
-
const isWireActiveForCurrentTenant = (_m = (_l = (0, billPayConfigSelector_1.getBillPayConfigByKey)(billPayConfigState, (0, billPayConfigState_1.getBillPayConfigMethodKey)('wire', 'usDomestic'
|
|
129
|
-
|
|
130
|
-
|
|
128
|
+
const isWireActiveForCurrentTenant = (_m = (_l = (0, billPayConfigSelector_1.getBillPayConfigByKey)(billPayConfigState, (0, billPayConfigState_1.getBillPayConfigMethodKey)('wire', 'usDomestic', 'paymentAccount') //TBR
|
|
129
|
+
)) === null || _l === void 0 ? void 0 : _l.isEnabled) !== null && _m !== void 0 ? _m : false;
|
|
130
|
+
const isAchActiveForCurrentTenant = ((_p = (_o = (0, billPayConfigSelector_1.getBillPayConfigByKey)(billPayConfigState, (0, billPayConfigState_1.getBillPayConfigMethodKey)('ach', 'standard', 'paymentAccount'))) === null || _o === void 0 ? void 0 : _o.isEnabled) !== null && _p !== void 0 ? _p : false) ||
|
|
131
|
+
((_r = (_q = (0, billPayConfigSelector_1.getBillPayConfigByKey)(billPayConfigState, (0, billPayConfigState_1.getBillPayConfigMethodKey)('ach', 'sameDay', 'paymentAccount'))) === null || _q === void 0 ? void 0 : _q.isEnabled) !== null && _r !== void 0 ? _r : false);
|
|
131
132
|
const allSubTabs = getAllSubTabs(billListState.currentTab, isWireActiveForCurrentTenant, isAchActiveForCurrentTenant);
|
|
132
133
|
const loweredSearchText = billListState.searchText.trim().toLowerCase();
|
|
133
134
|
transactionsView = (0, exports.getBillListOnSort)(sortKey, sortOrder, billListState.currentTab, transactionsView.filter((transaction) => {
|
|
@@ -41,8 +41,8 @@ export interface CountryPayload {
|
|
|
41
41
|
}
|
|
42
42
|
export declare type BillCurrenciesPayload = Record<BillPaymentConfigCodeType, Record<BillPaymentSubConfigCodeType, CurrencyPayload[]>>;
|
|
43
43
|
export interface PaymentTimeline {
|
|
44
|
-
ach: Record<PaymentAchSubConfigCodeType,
|
|
45
|
-
wire: Record<BillPaymentWireSubConfigCodeType,
|
|
44
|
+
ach: Record<PaymentAchSubConfigCodeType, ConfigTimelineForAccTypePayload>;
|
|
45
|
+
wire: Record<BillPaymentWireSubConfigCodeType, ConfigTimelineForAccTypePayload>;
|
|
46
46
|
}
|
|
47
47
|
export interface ClassConfig {
|
|
48
48
|
ach: Record<PaymentAchSubConfigCodeType, ClassBasePayload>;
|
|
@@ -63,13 +63,14 @@ export interface InternationalWireConfig {
|
|
|
63
63
|
'usd-to-usd': Record<InternationalSubConfigCodeType, BillPayConfigFeePayload>;
|
|
64
64
|
}
|
|
65
65
|
export interface WireConfig {
|
|
66
|
-
international: InternationalWireConfig
|
|
67
|
-
'us-domestic':
|
|
66
|
+
international: Record<AccType, InternationalWireConfig>;
|
|
67
|
+
'us-domestic': BillPayConfigFeeForAccTypePayload;
|
|
68
68
|
}
|
|
69
69
|
export interface FeesConfig {
|
|
70
|
-
ach: Record<PaymentAchSubConfigCodeType,
|
|
70
|
+
ach: Record<PaymentAchSubConfigCodeType, BillPayConfigFeeForAccTypePayload>;
|
|
71
71
|
wire: WireConfig;
|
|
72
72
|
}
|
|
73
|
+
export declare type BillPayConfigFeeForAccTypePayload = Record<AccType, BillPayConfigFeePayload>;
|
|
73
74
|
export interface BillPayConfigFeePayload {
|
|
74
75
|
amount: number;
|
|
75
76
|
description: string;
|
|
@@ -80,6 +81,7 @@ export interface BillPayConfigFeePayload {
|
|
|
80
81
|
dynamic_fee?: number | null;
|
|
81
82
|
dynamic_fee_type?: string | null;
|
|
82
83
|
}
|
|
84
|
+
export declare type ConfigTimelineForAccTypePayload = Record<AccType, ConfigTimelinePayload>;
|
|
83
85
|
export interface ConfigTimelinePayload {
|
|
84
86
|
max: ConfigTimelineFieldsPayload;
|
|
85
87
|
min: ConfigTimelineFieldsPayload;
|
|
@@ -105,15 +107,15 @@ export interface FeeDetail {
|
|
|
105
107
|
description: string;
|
|
106
108
|
internationalFee?: InternationalFee;
|
|
107
109
|
}
|
|
108
|
-
export declare const getFeeDetail: (fees: FeesConfig, code: BillPaymentConfigCodeType, subCode: BillPaymentSubConfigCodeType, internationalMethod?: "usd-to-local-currency" | "usd-to-usd" | undefined, internationalSubMethod?: "swift_our" | "swift_sha" | undefined) => FeeDetail;
|
|
110
|
+
export declare const getFeeDetail: (fees: FeesConfig, code: BillPaymentConfigCodeType, subCode: BillPaymentSubConfigCodeType, accType: AccType, internationalMethod?: "usd-to-local-currency" | "usd-to-usd" | undefined, internationalSubMethod?: "swift_our" | "swift_sha" | undefined) => FeeDetail;
|
|
109
111
|
export interface TimelineDetail {
|
|
110
112
|
minPeriod: ConfigPeriod;
|
|
111
113
|
maxPeriod: ConfigPeriod;
|
|
112
114
|
}
|
|
113
|
-
export declare const getTimelineDetail: (paymentTimeline: PaymentTimeline, code: BillPaymentConfigCodeType, subCode: BillPaymentSubConfigCodeType) => TimelineDetail;
|
|
115
|
+
export declare const getTimelineDetail: (paymentTimeline: PaymentTimeline, code: BillPaymentConfigCodeType, subCode: BillPaymentSubConfigCodeType, accType: AccType) => TimelineDetail;
|
|
114
116
|
export declare const getAccountDetail: (account: AccountConfig, code: BillPaymentConfigCodeType, subCode: BillPaymentSubConfigCodeType) => AccountBasePayload;
|
|
115
117
|
export declare const getClassDetail: (classConfig: ClassConfig, code: BillPaymentConfigCodeType, subCode: BillPaymentSubConfigCodeType) => ClassBasePayload;
|
|
116
|
-
export declare const mapBillPayConfigPayloadToBillPayConfig: (paymentProcessor: BillPayConfigPaymentProcessorPayload, isEnabled: boolean, isVerified: boolean, code: BillPaymentConfigCodeType, subCode: BillPaymentSubConfigCodeType, internationalMethod?: "usd-to-local-currency" | "usd-to-usd" | undefined, internationalSubMethod?: "swift_our" | "swift_sha" | undefined) => BillPayConfig;
|
|
118
|
+
export declare const mapBillPayConfigPayloadToBillPayConfig: (paymentProcessor: BillPayConfigPaymentProcessorPayload, isEnabled: boolean, isVerified: boolean, code: BillPaymentConfigCodeType, subCode: BillPaymentSubConfigCodeType, accType: AccType, internationalMethod?: "usd-to-local-currency" | "usd-to-usd" | undefined, internationalSubMethod?: "swift_our" | "swift_sha" | undefined) => BillPayConfig;
|
|
117
119
|
export declare const mapFeePayloadToInternationalLocalAmountFeeAmount: (fees: BillPayConfigFeePayload) => InternationalFee;
|
|
118
120
|
export declare const getCurrencies: (supportedCurrencies: SupportedCurrencyPayload, code: BillPaymentConfigCodeType, subCode: BillPaymentSubConfigCodeType) => CurrencyPayload[];
|
|
119
121
|
export declare const mapBillPayVendorConfigPayloadToBillPayVendorConfig: (payload: BillPayConfigPayload, code: BillPaymentConfigCodeType, subCode: BillPaymentSubConfigCodeType) => Currency[];
|