@zeniai/client-epic-state 4.12.64 → 4.12.66
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/paymentAccount/paymentAccountPayload.d.ts +1 -1
- package/lib/entity/paymentAccount/paymentAccountPayload.js +7 -7
- package/lib/entity/tenant/clearAllEpic.d.ts +1 -1
- package/lib/entity/tenant/clearAllEpic.js +1 -1
- package/lib/entity/vendor/__mocks__/vendorMock.d.ts +7 -0
- package/lib/entity/vendor/__mocks__/vendorMock.js +339 -0
- package/lib/entity/vendor/__mocks__/vendorStateMocks.js +6 -1
- package/lib/entity/vendor/vendorPayload.d.ts +2 -1
- package/lib/entity/vendor/vendorPayload.js +6 -4
- package/lib/entity/vendor/vendorState.d.ts +1 -0
- package/lib/entity/vendor/vendorType.d.ts +2 -1
- package/lib/epic.d.ts +5 -2
- package/lib/epic.js +5 -2
- package/lib/index.d.ts +15 -8
- package/lib/index.js +31 -16
- package/lib/reducer.d.ts +4 -1
- package/lib/reducer.js +4 -1
- package/lib/view/addressView/__mocks__/addressViewMocks.d.ts +34 -0
- package/lib/view/addressView/__mocks__/addressViewMocks.js +223 -0
- package/lib/view/addressView/__mocks__/json/createAddressResponse.json +23 -0
- package/lib/view/addressView/__mocks__/json/createCompanyAddressSuccess.json +218 -0
- package/lib/view/addressView/__mocks__/json/createCompanyUserAddressSuccess.json +345 -0
- package/lib/view/addressView/__mocks__/json/fetchAddressResponse.json +24 -0
- package/lib/view/addressView/__mocks__/json/updateAddressResponse.json +24 -0
- package/lib/view/commonVendorView/vendorView/epics/fetchVendorDetailsEpic.js +2 -2
- package/lib/view/commonVendorView/vendorView/vendorViewPayload.d.ts +6 -0
- package/lib/view/commonVendorView/vendorsTabVendorView/epics/fetchVendorsTabVendorDetailPageViewEpic.d.ts +2 -1
- package/lib/view/commonVendorView/vendorsTabVendorView/epics/fetchVendorsTabVendorDetailPageViewEpic.js +6 -1
- package/lib/view/commonVendorView/vendorsTabVendorView/epics/fetchVendorsTabVendorEpic.d.ts +3 -2
- package/lib/view/commonVendorView/vendorsTabVendorView/epics/fetchVendorsTabVendorEpic.js +4 -2
- package/lib/view/commonVendorView/vendorsTabVendorView/epics/resetVendorsTabVendorDetailLocalDataEpic.js +1 -1
- package/lib/view/commonVendorView/vendorsTabVendorView/epics/vendorsTabVendorDetailLocalDataHelpers.d.ts +3 -1
- package/lib/view/commonVendorView/vendorsTabVendorView/epics/vendorsTabVendorDetailLocalDataHelpers.js +14 -3
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewPayload.d.ts +5 -0
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewPayload.js +35 -1
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewReducer.d.ts +7 -2
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewReducer.js +23 -3
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +16 -1
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +24 -7
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewState.d.ts +16 -0
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewState.js +3 -0
- package/lib/view/settingsView/settingsViewSelector.js +1 -1
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewSelector.js +2 -2
- package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +1 -1
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +5 -5
- package/lib/view/spendManagement/chargeCards/chargeCardList/issueChargeCardEpic.js +9 -4
- package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +11 -4
- package/lib/view/spendManagement/commonSetup/setupViewSelector.js +16 -7
- package/lib/view/spendManagement/zeniAccounts/paymentAccountList/fetchPaymentAccountBalanceEpic.d.ts +9 -0
- package/lib/view/spendManagement/zeniAccounts/paymentAccountList/fetchPaymentAccountBalanceEpic.js +48 -0
- package/lib/view/spendManagement/zeniAccounts/paymentAccountList/fetchPaymentAccountListEpic.d.ts +2 -2
- package/lib/view/spendManagement/zeniAccounts/paymentAccountList/fetchPaymentAccountListEpic.js +12 -6
- package/lib/view/spendManagement/zeniAccounts/paymentAccountList/paymentAccountList.d.ts +1 -0
- package/lib/view/spendManagement/zeniAccounts/paymentAccountList/paymentAccountListReducer.d.ts +6 -0
- package/lib/view/spendManagement/zeniAccounts/paymentAccountList/paymentAccountListReducer.js +25 -2
- package/lib/view/spendManagement/zeniAccounts/paymentAccountList/paymentAccountListSelector.d.ts +1 -0
- package/lib/view/spendManagement/zeniAccounts/paymentAccountList/paymentAccountListSelector.js +1 -0
- package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailReducer.js +8 -0
- package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailSelector.js +1 -1
- package/lib/view/twoFactorAuthentication/sendOtpEpic.js +9 -6
- package/lib/view/{vendorFiling1099List → vendorFiling1099}/__mock__/json/vendorFiling1099ListSuccess.json +1 -1
- package/lib/view/{vendorFiling1099List → vendorFiling1099}/__mock__/vendorFiling1099ListMock.d.ts +3 -3
- package/lib/view/{vendorFiling1099List → vendorFiling1099}/__mock__/vendorFiling1099ListMock.js +17 -3
- package/lib/view/{vendorFiling1099List → vendorFiling1099}/__mock__/vendorFiling1099ListSelectorMock.d.ts +1 -1
- package/lib/view/{vendorFiling1099List → vendorFiling1099}/__mock__/vendorFiling1099ListSelectorMock.js +10 -1
- package/lib/view/vendorFiling1099/__mock__/vendorFiling1099UploadDetailsMock.d.ts +132 -0
- package/lib/view/vendorFiling1099/__mock__/vendorFiling1099UploadDetailsMock.js +146 -0
- package/lib/view/vendorFiling1099/vendorFiling1099List/fetchVendorsFiling1099AllEpic.d.ts +8 -0
- package/lib/view/vendorFiling1099/vendorFiling1099List/fetchVendorsFiling1099AllEpic.js +30 -0
- package/lib/view/{vendorFiling1099List → vendorFiling1099/vendorFiling1099List}/fetchVendorsFiling1099ListEpic.d.ts +5 -5
- package/lib/view/{vendorFiling1099List → vendorFiling1099/vendorFiling1099List}/fetchVendorsFiling1099ListEpic.js +6 -6
- package/lib/view/{vendorFiling1099List → vendorFiling1099/vendorFiling1099List}/vendorFiling1099ListPayload.d.ts +3 -3
- package/lib/view/{vendorFiling1099List → vendorFiling1099/vendorFiling1099List}/vendorFiling1099ListReducer.d.ts +8 -4
- package/lib/view/{vendorFiling1099List → vendorFiling1099/vendorFiling1099List}/vendorFiling1099ListReducer.js +18 -5
- package/lib/view/{vendorFiling1099List → vendorFiling1099/vendorFiling1099List}/vendorFiling1099ListSelector.d.ts +6 -6
- package/lib/view/{vendorFiling1099List → vendorFiling1099/vendorFiling1099List}/vendorFiling1099ListSelector.js +8 -3
- package/lib/view/{vendorFiling1099List → vendorFiling1099/vendorFiling1099List}/vendorFiling1099ListState.d.ts +3 -3
- package/lib/view/{vendorFiling1099List → vendorFiling1099/vendorFiling1099List}/vendorFiling1099ListState.js +1 -1
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsPayload.d.ts +20 -0
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsPayload.js +48 -0
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsReducer.d.ts +25 -0
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsReducer.js +180 -0
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsSaveEpic.d.ts +11 -0
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsSaveEpic.js +58 -0
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsSelector.d.ts +14 -0
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsSelector.js +17 -0
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsState.d.ts +26 -0
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsState.js +2 -0
- package/lib/view/vendorTabView/fetchVendorTabViewEpic.d.ts +1 -1
- package/lib/view/vendorTabView/fetchVendorTabViewEpic.js +2 -2
- package/package.json +2 -1
- /package/lib/view/{vendorFiling1099List → vendorFiling1099/vendorFiling1099List}/vendorFiling1099ListPayload.js +0 -0
package/lib/view/spendManagement/zeniAccounts/paymentAccountList/fetchPaymentAccountListEpic.js
CHANGED
|
@@ -11,12 +11,18 @@ const fetchPaymentAccountListEpic = (actions$, _state$, zeniAPI) => actions$.pip
|
|
|
11
11
|
return zeniAPI
|
|
12
12
|
.getJSON(`${zeniAPI.apiEndPoints.payMicroServiceBaseUrl}/1.0/payment-accounts`)
|
|
13
13
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
15
|
+
const { payment_accounts, accounts } = response.data;
|
|
16
|
+
let paymentAccountListAction = [
|
|
17
|
+
(0, accountReducer_1.updateAccounts)(accounts, 'zeni_accounts'),
|
|
18
|
+
(0, paymentAccountReducer_1.updatePaymentAccounts)(payment_accounts),
|
|
19
|
+
(0, paymentAccountListReducer_1.updatePaymentAccountList)({
|
|
20
|
+
data: payment_accounts,
|
|
21
|
+
updateType: 'replace',
|
|
22
|
+
}),
|
|
23
|
+
];
|
|
24
|
+
paymentAccountListAction = paymentAccountListAction.concat(payment_accounts.map((paymentAcc) => (0, paymentAccountListReducer_1.fetchPaymentAccountBalance)(paymentAcc.payment_account_id)));
|
|
25
|
+
return (0, rxjs_1.concat)((0, rxjs_1.from)(paymentAccountListAction));
|
|
20
26
|
}
|
|
21
27
|
else {
|
|
22
28
|
return (0, rxjs_1.of)((0, paymentAccountListReducer_1.updatePaymentAccountListFetchStatus)({
|
|
@@ -2,4 +2,5 @@ import { FetchedState, FetchStateAndError, ID } from '../../../../commonStateTyp
|
|
|
2
2
|
export interface PaymentAccountListState extends FetchedState {
|
|
3
3
|
paymentAccountIds: ID[];
|
|
4
4
|
unlinkingAccountStatus: Record<ID, FetchStateAndError>;
|
|
5
|
+
paymentAccountBalanceFetchStatus: Record<ID, FetchStateAndError>;
|
|
5
6
|
}
|
package/lib/view/spendManagement/zeniAccounts/paymentAccountList/paymentAccountListReducer.d.ts
CHANGED
|
@@ -17,6 +17,12 @@ export declare const fetchPaymentAccountList: import("@reduxjs/toolkit").ActionC
|
|
|
17
17
|
accountId: ID;
|
|
18
18
|
fetchState: FetchState;
|
|
19
19
|
error?: ZeniAPIStatus<Record<string, unknown>> | undefined;
|
|
20
|
+
}, string>, fetchPaymentAccountBalance: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[paymentAccountId: string], {
|
|
21
|
+
paymentAccountId: string;
|
|
22
|
+
}, string, never, never>, updatePaymentAccountBalanceStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
23
|
+
paymentAccountId: ID;
|
|
24
|
+
fetchState: FetchState;
|
|
25
|
+
error?: ZeniAPIStatus<Record<string, unknown>> | undefined;
|
|
20
26
|
}, string>;
|
|
21
27
|
declare const _default: import("@reduxjs/toolkit").Reducer<PaymentAccountListState, import("@reduxjs/toolkit").AnyAction>;
|
|
22
28
|
export default _default;
|
package/lib/view/spendManagement/zeniAccounts/paymentAccountList/paymentAccountListReducer.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.unlinkPaymentAccountStatus = exports.unlinkPaymentAccount = exports.removePaymentAccountById = exports.clearPaymentAccountList = exports.updatePaymentAccountListFetchStatus = exports.updatePaymentAccountList = exports.fetchPaymentAccountList = exports.initialState = void 0;
|
|
4
|
+
exports.updatePaymentAccountBalanceStatus = exports.fetchPaymentAccountBalance = exports.unlinkPaymentAccountStatus = exports.unlinkPaymentAccount = exports.removePaymentAccountById = exports.clearPaymentAccountList = exports.updatePaymentAccountListFetchStatus = exports.updatePaymentAccountList = exports.fetchPaymentAccountList = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
exports.initialState = {
|
|
7
7
|
paymentAccountIds: [],
|
|
8
8
|
fetchState: 'Not-Started',
|
|
9
9
|
unlinkingAccountStatus: {},
|
|
10
|
+
paymentAccountBalanceFetchStatus: {},
|
|
10
11
|
error: undefined,
|
|
11
12
|
hasValidState() {
|
|
12
13
|
return this.fetchState == 'Completed';
|
|
@@ -64,10 +65,32 @@ const paymentAccountList = (0, toolkit_1.createSlice)({
|
|
|
64
65
|
draft.fetchState = action.payload.fetchState;
|
|
65
66
|
draft.error = action.payload.error;
|
|
66
67
|
},
|
|
68
|
+
fetchPaymentAccountBalance: {
|
|
69
|
+
reducer(draft, action) {
|
|
70
|
+
const { paymentAccountId } = action.payload;
|
|
71
|
+
draft.paymentAccountBalanceFetchStatus[paymentAccountId] = {
|
|
72
|
+
fetchState: 'In-Progress',
|
|
73
|
+
error: undefined,
|
|
74
|
+
};
|
|
75
|
+
},
|
|
76
|
+
prepare(paymentAccountId) {
|
|
77
|
+
return {
|
|
78
|
+
payload: {
|
|
79
|
+
paymentAccountId,
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
updatePaymentAccountBalanceStatus(draft, action) {
|
|
85
|
+
const { paymentAccountId, fetchState, error } = action.payload;
|
|
86
|
+
draft.paymentAccountBalanceFetchStatus[paymentAccountId].fetchState =
|
|
87
|
+
fetchState;
|
|
88
|
+
draft.paymentAccountBalanceFetchStatus[paymentAccountId].error = error;
|
|
89
|
+
},
|
|
67
90
|
clearPaymentAccountList(draft) {
|
|
68
91
|
Object.assign(draft, exports.initialState);
|
|
69
92
|
},
|
|
70
93
|
},
|
|
71
94
|
});
|
|
72
|
-
_a = paymentAccountList.actions, exports.fetchPaymentAccountList = _a.fetchPaymentAccountList, exports.updatePaymentAccountList = _a.updatePaymentAccountList, exports.updatePaymentAccountListFetchStatus = _a.updatePaymentAccountListFetchStatus, exports.clearPaymentAccountList = _a.clearPaymentAccountList, exports.removePaymentAccountById = _a.removePaymentAccountById, exports.unlinkPaymentAccount = _a.unlinkPaymentAccount, exports.unlinkPaymentAccountStatus = _a.unlinkPaymentAccountStatus;
|
|
95
|
+
_a = paymentAccountList.actions, exports.fetchPaymentAccountList = _a.fetchPaymentAccountList, exports.updatePaymentAccountList = _a.updatePaymentAccountList, exports.updatePaymentAccountListFetchStatus = _a.updatePaymentAccountListFetchStatus, exports.clearPaymentAccountList = _a.clearPaymentAccountList, exports.removePaymentAccountById = _a.removePaymentAccountById, exports.unlinkPaymentAccount = _a.unlinkPaymentAccount, exports.unlinkPaymentAccountStatus = _a.unlinkPaymentAccountStatus, exports.fetchPaymentAccountBalance = _a.fetchPaymentAccountBalance, exports.updatePaymentAccountBalanceStatus = _a.updatePaymentAccountBalanceStatus;
|
|
73
96
|
exports.default = paymentAccountList.reducer;
|
package/lib/view/spendManagement/zeniAccounts/paymentAccountList/paymentAccountListSelector.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { PaymentAccountListState } from './paymentAccountList';
|
|
|
5
5
|
export interface PaymentAccountListSelectorView extends SelectorView {
|
|
6
6
|
paymentAccounts: PaymentAccount[];
|
|
7
7
|
unlinkingAccountStatus: Record<ID, FetchStateAndError>;
|
|
8
|
+
paymentAccountBalanceFetchStatus: Record<ID, FetchStateAndError>;
|
|
8
9
|
}
|
|
9
10
|
export declare const getAllPaymentAccounts: (paymentAccountState: PaymentAccountState, paymentAccountListState: PaymentAccountListState) => PaymentAccountListSelectorView;
|
|
10
11
|
export declare const getPrimaryPaymentAccount: (paymentAccountState: PaymentAccountState, paymentAccountListState: PaymentAccountListState) => PaymentAccount | undefined;
|
package/lib/view/spendManagement/zeniAccounts/paymentAccountList/paymentAccountListSelector.js
CHANGED
|
@@ -8,6 +8,7 @@ const getAllPaymentAccounts = (paymentAccountState, paymentAccountListState) =>
|
|
|
8
8
|
fetchState: paymentAccountListState.fetchState,
|
|
9
9
|
error: paymentAccountListState.error,
|
|
10
10
|
unlinkingAccountStatus: paymentAccountListState.unlinkingAccountStatus,
|
|
11
|
+
paymentAccountBalanceFetchStatus: paymentAccountListState.paymentAccountBalanceFetchStatus,
|
|
11
12
|
version: 0,
|
|
12
13
|
};
|
|
13
14
|
};
|
|
@@ -58,6 +58,10 @@ const transferDetail = (0, toolkit_1.createSlice)({
|
|
|
58
58
|
accountBalance: action.payload.accountBalance,
|
|
59
59
|
logo: undefined,
|
|
60
60
|
zeniAccountId: undefined,
|
|
61
|
+
balanceFetchStatus: {
|
|
62
|
+
fetchState: 'Completed',
|
|
63
|
+
error: undefined,
|
|
64
|
+
},
|
|
61
65
|
};
|
|
62
66
|
draft.localData = Object.assign(Object.assign({}, draft.localData), { transferTo: transferMoneyParty });
|
|
63
67
|
},
|
|
@@ -68,6 +72,10 @@ const transferDetail = (0, toolkit_1.createSlice)({
|
|
|
68
72
|
label: action.payload.accountName,
|
|
69
73
|
maskedAccountNumber: action.payload.maskedAccountNumber,
|
|
70
74
|
logo: undefined,
|
|
75
|
+
balanceFetchStatus: {
|
|
76
|
+
fetchState: 'Completed',
|
|
77
|
+
error: undefined,
|
|
78
|
+
},
|
|
71
79
|
};
|
|
72
80
|
draft.localData = Object.assign(Object.assign({}, draft.localData), { transferTo: transferMoneyParty });
|
|
73
81
|
},
|
|
@@ -17,7 +17,7 @@ const getTransferDetail = (state) => {
|
|
|
17
17
|
]).fetchState;
|
|
18
18
|
if (depositAccountsView.fetchState === 'Completed' &&
|
|
19
19
|
paymentAccountsView.fetchState === 'Completed') {
|
|
20
|
-
transferParties = (0, setupViewSelector_1.getAllFundingAccounts)(depositAccountsView.depositAccounts, paymentAccountsView.paymentAccounts);
|
|
20
|
+
transferParties = (0, setupViewSelector_1.getAllFundingAccounts)(depositAccountsView.depositAccounts, paymentAccountsView.paymentAccounts, paymentAccountListState.paymentAccountBalanceFetchStatus);
|
|
21
21
|
}
|
|
22
22
|
const primaryPaymentAccount = (0, paymentAccountListSelector_1.getPrimaryPaymentAccount)(paymentAccountState, paymentAccountListState);
|
|
23
23
|
return {
|
|
@@ -11,23 +11,26 @@ const onboardingCustomerViewReducer_1 = require("../onboardingView/customerView/
|
|
|
11
11
|
const settingsViewReducer_1 = require("../settingsView/settingsViewReducer");
|
|
12
12
|
const cardUserOnboardingReducer_1 = require("../spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer");
|
|
13
13
|
const sendOtpEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(twoFactorAuthenticationReducer_1.sendOtp.match), (0, operators_1.mergeMap)((action) => {
|
|
14
|
-
var _a
|
|
14
|
+
var _a;
|
|
15
15
|
const sendOtpActions = [];
|
|
16
16
|
const { phoneNumber, twoFASource } = action.payload;
|
|
17
17
|
const tenantState = state$.value.tenantState;
|
|
18
18
|
const { currentTenantId } = tenantState;
|
|
19
19
|
const productSettings = currentTenantId != null
|
|
20
|
-
? (
|
|
20
|
+
? (_a = tenantState.tenantsById[currentTenantId]) === null || _a === void 0 ? void 0 : _a.productSettings
|
|
21
21
|
: undefined;
|
|
22
|
-
const isCardsEnabled = productSettings != null
|
|
22
|
+
const isCardsEnabled = productSettings != null
|
|
23
|
+
? productSettings.isBookkeepingEnabled ||
|
|
24
|
+
productSettings.isCardsEnabled
|
|
25
|
+
: false;
|
|
23
26
|
const queryPayload = {
|
|
24
27
|
channel_type: 'phone',
|
|
25
28
|
channel_info: {
|
|
26
29
|
phone_number: phoneNumber,
|
|
27
30
|
},
|
|
28
|
-
is_for_charge_cards:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
is_for_charge_cards: twoFASource === 'ChargeCard' ||
|
|
32
|
+
twoFASource === 'CardUserOnboarding' ||
|
|
33
|
+
(twoFASource === 'MyProfile' && isCardsEnabled),
|
|
31
34
|
};
|
|
32
35
|
switch (twoFASource) {
|
|
33
36
|
case 'SpendManagementSetup':
|
package/lib/view/{vendorFiling1099List → vendorFiling1099}/__mock__/vendorFiling1099ListMock.d.ts
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { VendorFiling1099ListResponse } from '../vendorFiling1099ListPayload';
|
|
2
|
-
import { VendorFiling1099ListState } from '../vendorFiling1099ListState';
|
|
1
|
+
import { VendorFiling1099ListResponse } from '../vendorFiling1099List/vendorFiling1099ListPayload';
|
|
2
|
+
import { VendorFiling1099ListState } from '../vendorFiling1099List/vendorFiling1099ListState';
|
|
3
3
|
import { RootState } from '../../../reducer';
|
|
4
4
|
export { vendorFiling1099ListSelectorMock } from './vendorFiling1099ListSelectorMock';
|
|
5
5
|
export declare const vendorFiling1099ListSuccessResponse: VendorFiling1099ListResponse;
|
|
@@ -8,4 +8,4 @@ export declare const vendorFiling1099ListInProgressState: VendorFiling1099ListSt
|
|
|
8
8
|
export declare const vendorFiling1099ListInProgressInitialState: VendorFiling1099ListState;
|
|
9
9
|
export declare const vendorFiling1099ListSuccessState: VendorFiling1099ListState;
|
|
10
10
|
export declare const vendorFiling1099ListFailureState: VendorFiling1099ListState;
|
|
11
|
-
export declare const
|
|
11
|
+
export declare const rootStateWithVendorFiling1099List: RootState;
|
package/lib/view/{vendorFiling1099List → vendorFiling1099}/__mock__/vendorFiling1099ListMock.js
RENAMED
|
@@ -3,10 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.rootStateWithVendorFiling1099List = exports.vendorFiling1099ListFailureState = exports.vendorFiling1099ListSuccessState = exports.vendorFiling1099ListInProgressInitialState = exports.vendorFiling1099ListInProgressState = exports.vendorFiling1099ListFailureResponse = exports.vendorFiling1099ListSuccessResponse = exports.vendorFiling1099ListSelectorMock = void 0;
|
|
7
7
|
const vendorFiling1099ListSuccess_json_1 = __importDefault(require("./json/vendorFiling1099ListSuccess.json"));
|
|
8
8
|
const apiFailure_json_1 = __importDefault(require("../../../__testHelpers__/apiFailure.json"));
|
|
9
|
-
const vendorFiling1099ListReducer_1 = require("../vendorFiling1099ListReducer");
|
|
9
|
+
const vendorFiling1099ListReducer_1 = require("../vendorFiling1099List/vendorFiling1099ListReducer");
|
|
10
10
|
const vendorStateMocks_1 = require("../../../entity/vendor/__mocks__/vendorStateMocks");
|
|
11
11
|
const reducer_1 = require("../../../reducer");
|
|
12
12
|
const zeniDayJS_1 = require("../../../zeniDayJS");
|
|
@@ -77,7 +77,7 @@ exports.vendorFiling1099ListFailureState = {
|
|
|
77
77
|
hasValidState: vendorFiling1099ListReducer_1.initialState.hasValidState,
|
|
78
78
|
isVendor1099Populated: false,
|
|
79
79
|
};
|
|
80
|
-
exports.
|
|
80
|
+
exports.rootStateWithVendorFiling1099List = Object.assign({}, reducer_1.initialRootState, {
|
|
81
81
|
vendorState: {
|
|
82
82
|
vendorByID: {
|
|
83
83
|
'vendor_j12jh1g2g12jg3jh12:12': vendorStateMocks_1.vendorStateMock1,
|
|
@@ -98,4 +98,18 @@ exports.rootStateWithVendorList = Object.assign({}, reducer_1.initialRootState,
|
|
|
98
98
|
hasValidState: vendorFiling1099ListReducer_1.initialState.hasValidState,
|
|
99
99
|
isVendor1099Populated: true,
|
|
100
100
|
},
|
|
101
|
+
vendorTypeListState: {
|
|
102
|
+
fetchState: 'Completed',
|
|
103
|
+
error: undefined,
|
|
104
|
+
vendorTypes: [
|
|
105
|
+
{
|
|
106
|
+
code: 'international_business',
|
|
107
|
+
name: 'International - Business',
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
code: 'individual',
|
|
111
|
+
name: 'Individual / Sole-Proprietor or Single-Member LLC',
|
|
112
|
+
},
|
|
113
|
+
],
|
|
114
|
+
},
|
|
101
115
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { VendorFiling1099ListSelectorView } from '../vendorFiling1099ListSelector';
|
|
1
|
+
import { VendorFiling1099ListSelectorView } from '../vendorFiling1099List/vendorFiling1099ListSelector';
|
|
2
2
|
export declare const vendorFiling1099ListSelectorMock: VendorFiling1099ListSelectorView;
|
|
@@ -18,5 +18,14 @@ exports.vendorFiling1099ListSelectorMock = {
|
|
|
18
18
|
searchString: '',
|
|
19
19
|
},
|
|
20
20
|
isVendor1099Populated: true,
|
|
21
|
-
vendorTypeList: [
|
|
21
|
+
vendorTypeList: [
|
|
22
|
+
{
|
|
23
|
+
code: 'international_business',
|
|
24
|
+
name: 'International - Business',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
code: 'individual',
|
|
28
|
+
name: 'Individual / Sole-Proprietor or Single-Member LLC',
|
|
29
|
+
},
|
|
30
|
+
],
|
|
22
31
|
};
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { RootState } from '../../../reducer';
|
|
2
|
+
import { VendorFiling1099UploadDetailsState } from '../vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsState';
|
|
3
|
+
export declare const vendorFiling1099UploadDetailsSuccessResponse: {
|
|
4
|
+
data: {
|
|
5
|
+
filter: null;
|
|
6
|
+
query: {
|
|
7
|
+
end_date: string;
|
|
8
|
+
group_by: string;
|
|
9
|
+
sort_order: string;
|
|
10
|
+
source_account_type: string;
|
|
11
|
+
start_date: string;
|
|
12
|
+
};
|
|
13
|
+
query_definitions: {};
|
|
14
|
+
report: {
|
|
15
|
+
currency: {
|
|
16
|
+
currency_code: null;
|
|
17
|
+
currency_symbol: null;
|
|
18
|
+
};
|
|
19
|
+
is_vendor_1099_populated: boolean;
|
|
20
|
+
report_id: string;
|
|
21
|
+
report_title: string;
|
|
22
|
+
status: {
|
|
23
|
+
code: number;
|
|
24
|
+
description: string;
|
|
25
|
+
is_filtered_report: boolean;
|
|
26
|
+
last_refresh_attempt_time: string;
|
|
27
|
+
last_refresh_success_time: string;
|
|
28
|
+
message: string;
|
|
29
|
+
};
|
|
30
|
+
vendors: {
|
|
31
|
+
vendor_id: string;
|
|
32
|
+
qbo_id: string;
|
|
33
|
+
vendor_name: string;
|
|
34
|
+
title: string;
|
|
35
|
+
suffix: string;
|
|
36
|
+
first_name: string;
|
|
37
|
+
middle_name: string;
|
|
38
|
+
last_name: string;
|
|
39
|
+
vendor_type: string;
|
|
40
|
+
logo: {
|
|
41
|
+
url: string;
|
|
42
|
+
base64: string;
|
|
43
|
+
};
|
|
44
|
+
owner: null;
|
|
45
|
+
balance: number;
|
|
46
|
+
is_deleted: boolean;
|
|
47
|
+
qbo_create_time: string;
|
|
48
|
+
qbo_update_time: string;
|
|
49
|
+
create_time: string;
|
|
50
|
+
update_time: string;
|
|
51
|
+
email: string;
|
|
52
|
+
phone: string;
|
|
53
|
+
website_url: string;
|
|
54
|
+
currency_code: string;
|
|
55
|
+
currency_symbol: string;
|
|
56
|
+
country_code: string;
|
|
57
|
+
billing_address_id: string;
|
|
58
|
+
billing_address: {
|
|
59
|
+
address_id: string;
|
|
60
|
+
city: string;
|
|
61
|
+
country: string;
|
|
62
|
+
country_code: null;
|
|
63
|
+
create_time: string;
|
|
64
|
+
hash_value: string;
|
|
65
|
+
latitude: null;
|
|
66
|
+
longitude: null;
|
|
67
|
+
postal_code: string;
|
|
68
|
+
state: string;
|
|
69
|
+
street: string[];
|
|
70
|
+
update_time: string;
|
|
71
|
+
};
|
|
72
|
+
documents: never[];
|
|
73
|
+
vendor_currency_code: string;
|
|
74
|
+
vendor_currency_symbol: string;
|
|
75
|
+
tin: {
|
|
76
|
+
type: string;
|
|
77
|
+
value: string;
|
|
78
|
+
};
|
|
79
|
+
vendor_1099_status: string;
|
|
80
|
+
vendor_1099_ytd_total: number;
|
|
81
|
+
w9_documents: never[];
|
|
82
|
+
}[];
|
|
83
|
+
version: string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
status: {
|
|
87
|
+
code: number;
|
|
88
|
+
message: string;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
export declare const vendorFiling1099UploadDetailsFailureResponse: {
|
|
92
|
+
status: {
|
|
93
|
+
message: string;
|
|
94
|
+
code: number;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
export declare const vendorFiling1099UploadDetailsInProgressState: VendorFiling1099UploadDetailsState;
|
|
98
|
+
export declare const vendorFiling1099UploadDetailsInProgressInitialState: VendorFiling1099UploadDetailsState;
|
|
99
|
+
export declare const vendorFiling1099UploadDetailsSuccessState: VendorFiling1099UploadDetailsState;
|
|
100
|
+
export declare const w9FormFile: {
|
|
101
|
+
checksum: string;
|
|
102
|
+
company_id: string;
|
|
103
|
+
content_type: string;
|
|
104
|
+
create_time: string;
|
|
105
|
+
create_userid: string;
|
|
106
|
+
document_side: string;
|
|
107
|
+
document_type: string;
|
|
108
|
+
extension: string;
|
|
109
|
+
file_id: string;
|
|
110
|
+
file_location: string;
|
|
111
|
+
file_name: string;
|
|
112
|
+
file_size: number;
|
|
113
|
+
file_size_unit: string;
|
|
114
|
+
image_file_ids: string[];
|
|
115
|
+
image_files: {
|
|
116
|
+
create_time: string;
|
|
117
|
+
file_location: string;
|
|
118
|
+
height: number;
|
|
119
|
+
image_format: string;
|
|
120
|
+
image_size_type: string;
|
|
121
|
+
signed_url: string;
|
|
122
|
+
update_time: string;
|
|
123
|
+
width: number;
|
|
124
|
+
}[];
|
|
125
|
+
index: string;
|
|
126
|
+
purpose_id: string;
|
|
127
|
+
signed_url: string;
|
|
128
|
+
update_time: string;
|
|
129
|
+
update_userid: string;
|
|
130
|
+
user_id: string;
|
|
131
|
+
};
|
|
132
|
+
export declare const rootStateWithVendorFiling1099UploadDetails: RootState;
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.rootStateWithVendorFiling1099UploadDetails = exports.w9FormFile = exports.vendorFiling1099UploadDetailsSuccessState = exports.vendorFiling1099UploadDetailsInProgressInitialState = exports.vendorFiling1099UploadDetailsInProgressState = exports.vendorFiling1099UploadDetailsFailureResponse = exports.vendorFiling1099UploadDetailsSuccessResponse = void 0;
|
|
7
|
+
const reducer_1 = require("../../../reducer");
|
|
8
|
+
const vendorMock_1 = require("../../../entity/vendor/__mocks__/vendorMock");
|
|
9
|
+
const addressViewMocks_1 = require("../../addressView/__mocks__/addressViewMocks");
|
|
10
|
+
const vendorFiling1099ListSuccess_json_1 = __importDefault(require("./json/vendorFiling1099ListSuccess.json"));
|
|
11
|
+
const apiFailure_json_1 = __importDefault(require("../../../__testHelpers__/apiFailure.json"));
|
|
12
|
+
exports.vendorFiling1099UploadDetailsSuccessResponse = vendorFiling1099ListSuccess_json_1.default;
|
|
13
|
+
exports.vendorFiling1099UploadDetailsFailureResponse = apiFailure_json_1.default;
|
|
14
|
+
exports.vendorFiling1099UploadDetailsInProgressState = {
|
|
15
|
+
fetchState: 'In-Progress',
|
|
16
|
+
hasValidState() {
|
|
17
|
+
return this.fetchState == 'Completed';
|
|
18
|
+
},
|
|
19
|
+
error: undefined,
|
|
20
|
+
w9FormUploadStatus: {
|
|
21
|
+
fetchState: 'Not-Started',
|
|
22
|
+
error: undefined,
|
|
23
|
+
},
|
|
24
|
+
vendor1099DetailsLocalData: {
|
|
25
|
+
vendorId: '123',
|
|
26
|
+
w9Documents: [],
|
|
27
|
+
legalName: '',
|
|
28
|
+
email: '',
|
|
29
|
+
phone: '',
|
|
30
|
+
taxClassification: '',
|
|
31
|
+
tin: {
|
|
32
|
+
type: null,
|
|
33
|
+
value: '',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
vendor1099DetailsSaveStatus: {
|
|
37
|
+
fetchState: 'Not-Started',
|
|
38
|
+
error: undefined,
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
exports.vendorFiling1099UploadDetailsInProgressInitialState = {
|
|
42
|
+
fetchState: 'Not-Started',
|
|
43
|
+
hasValidState() {
|
|
44
|
+
return this.fetchState == 'Completed';
|
|
45
|
+
},
|
|
46
|
+
error: undefined,
|
|
47
|
+
w9FormUploadStatus: {
|
|
48
|
+
fetchState: 'Not-Started',
|
|
49
|
+
error: undefined,
|
|
50
|
+
},
|
|
51
|
+
vendor1099DetailsLocalData: {
|
|
52
|
+
vendorId: '123',
|
|
53
|
+
w9Documents: [],
|
|
54
|
+
legalName: '',
|
|
55
|
+
email: '',
|
|
56
|
+
phone: '',
|
|
57
|
+
taxClassification: '',
|
|
58
|
+
tin: {
|
|
59
|
+
type: null,
|
|
60
|
+
value: '',
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
vendor1099DetailsSaveStatus: {
|
|
64
|
+
fetchState: 'Not-Started',
|
|
65
|
+
error: undefined,
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
exports.vendorFiling1099UploadDetailsSuccessState = {
|
|
69
|
+
fetchState: 'Completed',
|
|
70
|
+
hasValidState() {
|
|
71
|
+
return this.fetchState == 'Completed';
|
|
72
|
+
},
|
|
73
|
+
error: undefined,
|
|
74
|
+
w9FormUploadStatus: {
|
|
75
|
+
fetchState: 'Completed',
|
|
76
|
+
error: undefined,
|
|
77
|
+
},
|
|
78
|
+
vendor1099DetailsLocalData: {
|
|
79
|
+
vendorId: '123',
|
|
80
|
+
w9Documents: [],
|
|
81
|
+
legalName: '',
|
|
82
|
+
email: '',
|
|
83
|
+
phone: '',
|
|
84
|
+
taxClassification: '',
|
|
85
|
+
tin: {
|
|
86
|
+
type: null,
|
|
87
|
+
value: '',
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
vendor1099DetailsSaveStatus: {
|
|
91
|
+
fetchState: 'Not-Started',
|
|
92
|
+
error: undefined,
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
exports.w9FormFile = {
|
|
96
|
+
checksum: 'd41d8cd98f00b204e9800998ecf8427e',
|
|
97
|
+
company_id: 'c_c98ead41-e255-4f55-bde5-98725b21cadd',
|
|
98
|
+
content_type: 'application/pdf',
|
|
99
|
+
create_time: '2024-11-29T09:00:55.219692',
|
|
100
|
+
create_userid: 'u_f65e9b38-94fb-4a94-a2ab-27469df90bce',
|
|
101
|
+
document_side: 'front',
|
|
102
|
+
document_type: 'w9',
|
|
103
|
+
extension: '.pdf',
|
|
104
|
+
file_id: 'file_a1c42d17-e638-485a-adbc-489522132157',
|
|
105
|
+
file_location: '/duolingo3-dot-ai-b452e138-af1d-4da0-8eb5-eb6bd233cfcc/files/2024-11-29/file_a1c42d17-e638-485a-adbc-489522132157/file_a1c42d17-e638-485a-adbc-489522132157.pdf',
|
|
106
|
+
file_name: 'w9_embarc_advisors_llc__2_ (1).pdf',
|
|
107
|
+
file_size: 81400,
|
|
108
|
+
file_size_unit: 'bytes',
|
|
109
|
+
image_file_ids: ['image_file_c07dbdb6-1ae8-41ee-a5ad-7b0525f3165f'],
|
|
110
|
+
image_files: [
|
|
111
|
+
{
|
|
112
|
+
create_time: '2024-11-29T09:01:01.356171',
|
|
113
|
+
file_location: '/duolingo3-dot-ai-b452e138-af1d-4da0-8eb5-eb6bd233cfcc/files/2024-11-29/file_a1c42d17-e638-485a-adbc-489522132157/image_file_c07dbdb6-1ae8-41ee-a5ad-7b0525f3165f.jpg',
|
|
114
|
+
height: 0,
|
|
115
|
+
image_format: 'jpg',
|
|
116
|
+
image_size_type: 'thumbnail',
|
|
117
|
+
signed_url: 'https://storage.googleapis.com/duolingo3-dot-ai-b452e138-af1d-4da0-8eb5-eb6bd233cfcc/files/2024-11-29/file_a1c42d17-e638-485a-adbc-489522132157/image_file_c07dbdb6-1ae8-41ee-a5ad-7b0525f3165f.jpg?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=zeni-apis-dev%40appspot.gserviceaccount.com%2F20241129%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20241129T090101Z&X-Goog-Expires=86400&X-Goog-SignedHeaders=host&X-Goog-Signature=450342aac90b181c8e306fe938829e3f4f994fdea94dbf65689aaab497aa8b172227fdf94a411fbb77df2d2ec9d53e32d970000c719a63c05b654bf1a32f91f5a184579c1c8f85f96fad9eae4bd229db4bf788e5d118a2549a253e61050e1c20b4af5225ee7ada3b20d9dadaf283793c1482e4706adc52ef5cfedb4bf55cb649e881da2ebbd5011bf22a203ada1e5f9c859072693f393c412f738a2c179f0c10fe30dcb7d792b4b9de2753fbeb6c1eaceb05e9835d3aefb5719a9568cbc5705ff77324049349196aa36394e8a9f7aa661c50fdc34e4943900f63b9e8f42bbec1bf94a19b6dfd76182633ca03c64aadecca7fc10bf7186cb930fea78b17a210ec',
|
|
118
|
+
update_time: '2024-11-29T09:01:01.356179',
|
|
119
|
+
width: 0,
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
|
+
index: '0',
|
|
123
|
+
purpose_id: 'w9_form',
|
|
124
|
+
signed_url: 'https://storage.googleapis.com/duolingo3-dot-ai-b452e138-af1d-4da0-8eb5-eb6bd233cfcc/files/2024-11-29/file_a1c42d17-e638-485a-adbc-489522132157/file_a1c42d17-e638-485a-adbc-489522132157.pdf?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=zeni-apis-dev%40appspot.gserviceaccount.com%2F20241129%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20241129T090101Z&X-Goog-Expires=86400&X-Goog-SignedHeaders=host&X-Goog-Signature=2995e9bd18daec10482324370b012a724cf769960355f4fe48b358d8198c6256d25d47c9de6b8f9056a23d872a540c41b105979f8d9b5c3182d647c392e33f16b327983ccc3771a34e6b3923414db8f86b97f65b5ec970daa65d0686281194bd0e5bbcceb3daac4bcb14a571ee821b5886582c6b8920eb83955eee115c3ab073fd781bde9bc346c8f2d5be10dbc5ea09b5a666f3477772bbbeb2413f1374188ceb4862b2aba7ea2088df8a2d1f0830fdb0ee88fd028f8b3475403222d5fa81ebdc756f66e981369463b2b03fdc281aa5a8f5ff09a93cdb3c28651de630d41b3b42801510a601721a74ac5eecec9f4f8d5ecee2d842a7f209b199734233cc4232',
|
|
125
|
+
update_time: '2024-11-29T09:01:01.438348',
|
|
126
|
+
update_userid: 'u_f65e9b38-94fb-4a94-a2ab-27469df90bce',
|
|
127
|
+
user_id: 'u_f65e9b38-94fb-4a94-a2ab-27469df90bce',
|
|
128
|
+
};
|
|
129
|
+
exports.rootStateWithVendorFiling1099UploadDetails = Object.assign({}, reducer_1.initialRootState, {
|
|
130
|
+
vendorState: vendorMock_1.vendorStateWithVendors,
|
|
131
|
+
vendorFiling1099UploadDetailsState: exports.vendorFiling1099UploadDetailsSuccessState,
|
|
132
|
+
vendorTypeListState: {
|
|
133
|
+
vendorTypes: [],
|
|
134
|
+
},
|
|
135
|
+
addressViewState: {
|
|
136
|
+
newAddressState: {
|
|
137
|
+
vendor_address: {
|
|
138
|
+
addressToCreate: addressViewMocks_1.createAddressData,
|
|
139
|
+
addressType: 'vendor_address',
|
|
140
|
+
parentEntityId: undefined,
|
|
141
|
+
status: { fetchState: 'Not-Started', error: undefined },
|
|
142
|
+
newAddressId: undefined,
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { RootState } from '../../../reducer';
|
|
4
|
+
import { fetchVendorsFiling1099List } from './vendorFiling1099ListReducer';
|
|
5
|
+
import { fetchVendorTypeList } from '../../vendorTypeList/vendorTypeListReducer';
|
|
6
|
+
import { initializeAccountMappingView } from '../../accountMappingView/accountMappingReducer';
|
|
7
|
+
export declare type ActionType = ReturnType<typeof fetchVendorsFiling1099List> | ReturnType<typeof fetchVendorTypeList> | ReturnType<typeof initializeAccountMappingView>;
|
|
8
|
+
export declare const fetchVendorsFiling1099AllEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => Observable<ActionType>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchVendorsFiling1099AllEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const vendorFiling1099ListReducer_1 = require("./vendorFiling1099ListReducer");
|
|
7
|
+
const vendorTypeListReducer_1 = require("../../vendorTypeList/vendorTypeListReducer");
|
|
8
|
+
const accountMappingReducer_1 = require("../../accountMappingView/accountMappingReducer");
|
|
9
|
+
const fetchVendorsFiling1099AllEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(vendorFiling1099ListReducer_1.fetchVendorsFiling1099All.match), (0, operators_1.switchMap)((action) => {
|
|
10
|
+
const state = state$.value;
|
|
11
|
+
const vendorActions = [];
|
|
12
|
+
if (action.payload.cacheOverride === true) {
|
|
13
|
+
if (state.vendorTypeListState.hasValidState() === false &&
|
|
14
|
+
state.vendorTypeListState.fetchState !== 'In-Progress') {
|
|
15
|
+
vendorActions.push((0, vendorTypeListReducer_1.fetchVendorTypeList)());
|
|
16
|
+
}
|
|
17
|
+
vendorActions.push((0, accountMappingReducer_1.initializeAccountMappingView)());
|
|
18
|
+
vendorActions.push((0, vendorFiling1099ListReducer_1.fetchVendorsFiling1099List)());
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
if (state.vendorTypeListState.hasValidState() === false &&
|
|
22
|
+
state.vendorTypeListState.fetchState !== 'In-Progress') {
|
|
23
|
+
vendorActions.push((0, vendorTypeListReducer_1.fetchVendorTypeList)());
|
|
24
|
+
}
|
|
25
|
+
vendorActions.push((0, accountMappingReducer_1.initializeAccountMappingView)());
|
|
26
|
+
vendorActions.push((0, vendorFiling1099ListReducer_1.fetchVendorsFiling1099List)());
|
|
27
|
+
}
|
|
28
|
+
return (0, rxjs_1.concat)((0, rxjs_1.from)(vendorActions));
|
|
29
|
+
}));
|
|
30
|
+
exports.fetchVendorsFiling1099AllEpic = fetchVendorsFiling1099AllEpic;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { ZeniAPI } from '
|
|
4
|
-
import { RootState } from '
|
|
3
|
+
import { ZeniAPI } from '../../../zeniAPI';
|
|
4
|
+
import { RootState } from '../../../reducer';
|
|
5
5
|
import { updateVendorsFiling1099List, updateVendorFiling1099ListFailure, fetchVendorsFiling1099List } from './vendorFiling1099ListReducer';
|
|
6
|
-
import { updateVendors } from '
|
|
7
|
-
import { updateAddresses } from '
|
|
8
|
-
import { fetchVendorTypeList } from '
|
|
6
|
+
import { updateVendors } from '../../../entity/vendor/vendorReducer';
|
|
7
|
+
import { updateAddresses } from '../../../entity/address/addressReducer';
|
|
8
|
+
import { fetchVendorTypeList } from '../../vendorTypeList/vendorTypeListReducer';
|
|
9
9
|
export declare type ActionType = ReturnType<typeof fetchVendorsFiling1099List> | ReturnType<typeof updateVendorFiling1099ListFailure> | ReturnType<typeof updateVendors> | ReturnType<typeof updateVendorsFiling1099List> | ReturnType<typeof fetchVendorTypeList> | ReturnType<typeof updateAddresses>;
|
|
10
10
|
export declare const fetchVendorsFiling1099ListEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -3,19 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.fetchVendorsFiling1099ListEpic = void 0;
|
|
4
4
|
const rxjs_1 = require("rxjs");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const responsePayload_1 = require("
|
|
6
|
+
const responsePayload_1 = require("../../../responsePayload");
|
|
7
7
|
const vendorFiling1099ListReducer_1 = require("./vendorFiling1099ListReducer");
|
|
8
|
-
const vendorReducer_1 = require("
|
|
9
|
-
const addressReducer_1 = require("
|
|
10
|
-
const commonVendorViewHelper_1 = require("
|
|
11
|
-
const vendorTypeListReducer_1 = require("
|
|
8
|
+
const vendorReducer_1 = require("../../../entity/vendor/vendorReducer");
|
|
9
|
+
const addressReducer_1 = require("../../../entity/address/addressReducer");
|
|
10
|
+
const commonVendorViewHelper_1 = require("../../commonVendorView/commonVendorViewHelper");
|
|
11
|
+
const vendorTypeListReducer_1 = require("../../vendorTypeList/vendorTypeListReducer");
|
|
12
12
|
const fetchVendorsFiling1099ListEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(vendorFiling1099ListReducer_1.fetchVendorsFiling1099List.match), (0, operators_1.switchMap)(() => {
|
|
13
13
|
const apiUrl = `${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/2.0/reports/vendor_1099`;
|
|
14
14
|
return zeniAPI.getJSON(apiUrl).pipe((0, operators_1.switchMap)((response) => {
|
|
15
15
|
var _a;
|
|
16
16
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
17
17
|
const actions = [];
|
|
18
|
-
actions.push(...updateAllVendorRelatedEntities((_a = response.data)
|
|
18
|
+
actions.push(...updateAllVendorRelatedEntities((_a = response.data.report.vendors) !== null && _a !== void 0 ? _a : []), (0, vendorFiling1099ListReducer_1.updateVendorsFiling1099List)({
|
|
19
19
|
response,
|
|
20
20
|
}));
|
|
21
21
|
actions.push((0, vendorTypeListReducer_1.fetchVendorTypeList)());
|