@zeniai/client-epic-state 4.12.67 → 4.12.68
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__/vendorStateMocks.js +1 -6
- package/lib/entity/vendor/vendorPayload.d.ts +1 -2
- package/lib/entity/vendor/vendorPayload.js +4 -6
- package/lib/entity/vendor/vendorState.d.ts +0 -1
- package/lib/entity/vendor/vendorType.d.ts +1 -2
- package/lib/epic.d.ts +2 -5
- package/lib/epic.js +2 -5
- package/lib/index.d.ts +8 -15
- package/lib/index.js +16 -31
- package/lib/reducer.d.ts +1 -4
- package/lib/reducer.js +1 -4
- package/lib/view/commonVendorView/vendorView/epics/fetchVendorDetailsEpic.js +2 -2
- package/lib/view/commonVendorView/vendorView/vendorViewPayload.d.ts +0 -6
- package/lib/view/commonVendorView/vendorsTabVendorView/epics/fetchVendorsTabVendorDetailPageViewEpic.d.ts +1 -2
- package/lib/view/commonVendorView/vendorsTabVendorView/epics/fetchVendorsTabVendorDetailPageViewEpic.js +1 -6
- package/lib/view/commonVendorView/vendorsTabVendorView/epics/fetchVendorsTabVendorEpic.d.ts +2 -3
- package/lib/view/commonVendorView/vendorsTabVendorView/epics/fetchVendorsTabVendorEpic.js +2 -4
- package/lib/view/commonVendorView/vendorsTabVendorView/epics/resetVendorsTabVendorDetailLocalDataEpic.js +1 -1
- package/lib/view/commonVendorView/vendorsTabVendorView/epics/vendorsTabVendorDetailLocalDataHelpers.d.ts +1 -3
- package/lib/view/commonVendorView/vendorsTabVendorView/epics/vendorsTabVendorDetailLocalDataHelpers.js +3 -14
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewPayload.d.ts +0 -5
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewPayload.js +1 -35
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewReducer.d.ts +2 -7
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewReducer.js +3 -23
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +1 -16
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +7 -24
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewState.d.ts +0 -16
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewState.js +0 -3
- 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 +5 -8
- package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +4 -11
- package/lib/view/spendManagement/commonSetup/setupViewSelector.js +7 -16
- package/lib/view/spendManagement/zeniAccounts/paymentAccountList/fetchPaymentAccountListEpic.d.ts +2 -2
- package/lib/view/spendManagement/zeniAccounts/paymentAccountList/fetchPaymentAccountListEpic.js +6 -12
- package/lib/view/spendManagement/zeniAccounts/paymentAccountList/paymentAccountList.d.ts +0 -1
- package/lib/view/spendManagement/zeniAccounts/paymentAccountList/paymentAccountListReducer.d.ts +0 -6
- package/lib/view/spendManagement/zeniAccounts/paymentAccountList/paymentAccountListReducer.js +2 -25
- package/lib/view/spendManagement/zeniAccounts/paymentAccountList/paymentAccountListSelector.d.ts +0 -1
- package/lib/view/spendManagement/zeniAccounts/paymentAccountList/paymentAccountListSelector.js +0 -1
- package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailReducer.js +0 -8
- package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailSelector.js +1 -1
- package/lib/view/twoFactorAuthentication/sendOtpEpic.js +6 -9
- package/lib/view/{vendorFiling1099 → vendorFiling1099List}/__mock__/json/vendorFiling1099ListSuccess.json +1 -1
- package/lib/view/{vendorFiling1099 → vendorFiling1099List}/__mock__/vendorFiling1099ListMock.d.ts +3 -3
- package/lib/view/{vendorFiling1099 → vendorFiling1099List}/__mock__/vendorFiling1099ListMock.js +3 -17
- package/lib/view/{vendorFiling1099 → vendorFiling1099List}/__mock__/vendorFiling1099ListSelectorMock.d.ts +1 -1
- package/lib/view/{vendorFiling1099 → vendorFiling1099List}/__mock__/vendorFiling1099ListSelectorMock.js +1 -10
- package/lib/view/{vendorFiling1099/vendorFiling1099List → vendorFiling1099List}/fetchVendorsFiling1099ListEpic.d.ts +5 -5
- package/lib/view/{vendorFiling1099/vendorFiling1099List → vendorFiling1099List}/fetchVendorsFiling1099ListEpic.js +6 -6
- package/lib/view/{vendorFiling1099/vendorFiling1099List → vendorFiling1099List}/vendorFiling1099ListPayload.d.ts +3 -3
- package/lib/view/{vendorFiling1099/vendorFiling1099List → vendorFiling1099List}/vendorFiling1099ListReducer.d.ts +4 -8
- package/lib/view/{vendorFiling1099/vendorFiling1099List → vendorFiling1099List}/vendorFiling1099ListReducer.js +5 -18
- package/lib/view/{vendorFiling1099/vendorFiling1099List → vendorFiling1099List}/vendorFiling1099ListSelector.d.ts +6 -6
- package/lib/view/{vendorFiling1099/vendorFiling1099List → vendorFiling1099List}/vendorFiling1099ListSelector.js +3 -8
- package/lib/view/{vendorFiling1099/vendorFiling1099List → vendorFiling1099List}/vendorFiling1099ListState.d.ts +3 -3
- package/lib/view/{vendorFiling1099/vendorFiling1099List → vendorFiling1099List}/vendorFiling1099ListState.js +1 -1
- package/lib/view/vendorTabView/fetchVendorTabViewEpic.d.ts +1 -1
- package/lib/view/vendorTabView/fetchVendorTabViewEpic.js +2 -2
- package/package.json +1 -2
- package/lib/entity/vendor/__mocks__/vendorMock.d.ts +0 -7
- package/lib/entity/vendor/__mocks__/vendorMock.js +0 -339
- package/lib/view/addressView/__mocks__/addressViewMocks.d.ts +0 -34
- package/lib/view/addressView/__mocks__/addressViewMocks.js +0 -223
- package/lib/view/addressView/__mocks__/json/createAddressResponse.json +0 -23
- package/lib/view/addressView/__mocks__/json/createCompanyAddressSuccess.json +0 -218
- package/lib/view/addressView/__mocks__/json/createCompanyUserAddressSuccess.json +0 -345
- package/lib/view/addressView/__mocks__/json/fetchAddressResponse.json +0 -24
- package/lib/view/addressView/__mocks__/json/updateAddressResponse.json +0 -24
- package/lib/view/spendManagement/zeniAccounts/paymentAccountList/fetchPaymentAccountBalanceEpic.d.ts +0 -9
- package/lib/view/spendManagement/zeniAccounts/paymentAccountList/fetchPaymentAccountBalanceEpic.js +0 -48
- package/lib/view/vendorFiling1099/__mock__/vendorFiling1099UploadDetailsMock.d.ts +0 -132
- package/lib/view/vendorFiling1099/__mock__/vendorFiling1099UploadDetailsMock.js +0 -146
- package/lib/view/vendorFiling1099/vendorFiling1099List/fetchVendorsFiling1099AllEpic.d.ts +0 -8
- package/lib/view/vendorFiling1099/vendorFiling1099List/fetchVendorsFiling1099AllEpic.js +0 -30
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsPayload.d.ts +0 -20
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsPayload.js +0 -48
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsReducer.d.ts +0 -25
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsReducer.js +0 -184
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsSaveEpic.d.ts +0 -11
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsSaveEpic.js +0 -58
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsSelector.d.ts +0 -14
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsSelector.js +0 -17
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsState.d.ts +0 -26
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsState.js +0 -2
- /package/lib/view/{vendorFiling1099/vendorFiling1099List → vendorFiling1099List}/vendorFiling1099ListPayload.js +0 -0
package/lib/view/spendManagement/zeniAccounts/paymentAccountList/paymentAccountListSelector.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ 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>;
|
|
9
8
|
}
|
|
10
9
|
export declare const getAllPaymentAccounts: (paymentAccountState: PaymentAccountState, paymentAccountListState: PaymentAccountListState) => PaymentAccountListSelectorView;
|
|
11
10
|
export declare const getPrimaryPaymentAccount: (paymentAccountState: PaymentAccountState, paymentAccountListState: PaymentAccountListState) => PaymentAccount | undefined;
|
package/lib/view/spendManagement/zeniAccounts/paymentAccountList/paymentAccountListSelector.js
CHANGED
|
@@ -8,7 +8,6 @@ const getAllPaymentAccounts = (paymentAccountState, paymentAccountListState) =>
|
|
|
8
8
|
fetchState: paymentAccountListState.fetchState,
|
|
9
9
|
error: paymentAccountListState.error,
|
|
10
10
|
unlinkingAccountStatus: paymentAccountListState.unlinkingAccountStatus,
|
|
11
|
-
paymentAccountBalanceFetchStatus: paymentAccountListState.paymentAccountBalanceFetchStatus,
|
|
12
11
|
version: 0,
|
|
13
12
|
};
|
|
14
13
|
};
|
|
@@ -58,10 +58,6 @@ 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
|
-
},
|
|
65
61
|
};
|
|
66
62
|
draft.localData = Object.assign(Object.assign({}, draft.localData), { transferTo: transferMoneyParty });
|
|
67
63
|
},
|
|
@@ -72,10 +68,6 @@ const transferDetail = (0, toolkit_1.createSlice)({
|
|
|
72
68
|
label: action.payload.accountName,
|
|
73
69
|
maskedAccountNumber: action.payload.maskedAccountNumber,
|
|
74
70
|
logo: undefined,
|
|
75
|
-
balanceFetchStatus: {
|
|
76
|
-
fetchState: 'Completed',
|
|
77
|
-
error: undefined,
|
|
78
|
-
},
|
|
79
71
|
};
|
|
80
72
|
draft.localData = Object.assign(Object.assign({}, draft.localData), { transferTo: transferMoneyParty });
|
|
81
73
|
},
|
|
@@ -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);
|
|
21
21
|
}
|
|
22
22
|
const primaryPaymentAccount = (0, paymentAccountListSelector_1.getPrimaryPaymentAccount)(paymentAccountState, paymentAccountListState);
|
|
23
23
|
return {
|
|
@@ -11,26 +11,23 @@ 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, _b;
|
|
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
|
-
? (_a = tenantState.tenantsById[currentTenantId]) === null ||
|
|
20
|
+
? (_b = (_a = tenantState.tenantsById) === null || _a === void 0 ? void 0 : _a[currentTenantId]) === null || _b === void 0 ? void 0 : _b.productSettings
|
|
21
21
|
: undefined;
|
|
22
|
-
const isCardsEnabled = productSettings != null
|
|
23
|
-
? productSettings.isBookkeepingEnabled ||
|
|
24
|
-
productSettings.isCardsEnabled
|
|
25
|
-
: false;
|
|
22
|
+
const isCardsEnabled = productSettings != null ? productSettings.isBookkeepingEnabled || productSettings.isCardsEnabled : false;
|
|
26
23
|
const queryPayload = {
|
|
27
24
|
channel_type: 'phone',
|
|
28
25
|
channel_info: {
|
|
29
26
|
phone_number: phoneNumber,
|
|
30
27
|
},
|
|
31
|
-
is_for_charge_cards: twoFASource === 'ChargeCard'
|
|
32
|
-
twoFASource ===
|
|
33
|
-
(twoFASource ===
|
|
28
|
+
is_for_charge_cards: (twoFASource === 'ChargeCard'
|
|
29
|
+
|| twoFASource === "CardUserOnboarding"
|
|
30
|
+
|| (twoFASource === "MyProfile" && isCardsEnabled)),
|
|
34
31
|
};
|
|
35
32
|
switch (twoFASource) {
|
|
36
33
|
case 'SpendManagementSetup':
|
package/lib/view/{vendorFiling1099 → vendorFiling1099List}/__mock__/vendorFiling1099ListMock.d.ts
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { VendorFiling1099ListResponse } from '../
|
|
2
|
-
import { VendorFiling1099ListState } from '../
|
|
1
|
+
import { VendorFiling1099ListResponse } from '../vendorFiling1099ListPayload';
|
|
2
|
+
import { VendorFiling1099ListState } from '../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 rootStateWithVendorList: RootState;
|
package/lib/view/{vendorFiling1099 → vendorFiling1099List}/__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.rootStateWithVendorList = 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("../
|
|
9
|
+
const vendorFiling1099ListReducer_1 = require("../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.rootStateWithVendorList = Object.assign({}, reducer_1.initialRootState, {
|
|
81
81
|
vendorState: {
|
|
82
82
|
vendorByID: {
|
|
83
83
|
'vendor_j12jh1g2g12jg3jh12:12': vendorStateMocks_1.vendorStateMock1,
|
|
@@ -98,18 +98,4 @@ exports.rootStateWithVendorFiling1099List = Object.assign({}, reducer_1.initialR
|
|
|
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
|
-
},
|
|
115
101
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { VendorFiling1099ListSelectorView } from '../
|
|
1
|
+
import { VendorFiling1099ListSelectorView } from '../vendorFiling1099ListSelector';
|
|
2
2
|
export declare const vendorFiling1099ListSelectorMock: VendorFiling1099ListSelectorView;
|
|
@@ -18,14 +18,5 @@ exports.vendorFiling1099ListSelectorMock = {
|
|
|
18
18
|
searchString: '',
|
|
19
19
|
},
|
|
20
20
|
isVendor1099Populated: true,
|
|
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
|
-
],
|
|
21
|
+
vendorTypeList: [],
|
|
31
22
|
};
|
|
@@ -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) === null || _a === void 0 ? void 0 : _a.report.vendors), (0, vendorFiling1099ListReducer_1.updateVendorsFiling1099List)({
|
|
19
19
|
response,
|
|
20
20
|
}));
|
|
21
21
|
actions.push((0, vendorTypeListReducer_1.fetchVendorTypeList)());
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ReportPayload } from '
|
|
2
|
-
import { VendorPayload } from '
|
|
3
|
-
import { ZeniAPIResponse } from '
|
|
1
|
+
import { ReportPayload } from '../../commonPayloadTypes/viewAndReportPayload';
|
|
2
|
+
import { VendorPayload } from '../../entity/vendor/vendorPayload';
|
|
3
|
+
import { ZeniAPIResponse } from '../../responsePayload';
|
|
4
4
|
export interface FetchVendorFiling1099Payload {
|
|
5
5
|
report: ReportVendorFiling1099Payload;
|
|
6
6
|
query: Record<string, unknown>;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { SortOrder } from '
|
|
2
|
-
import { ZeniAPIStatus } from '
|
|
1
|
+
import { SortOrder } from '../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
2
|
+
import { ZeniAPIStatus } from '../../responsePayload';
|
|
3
3
|
import { VendorFiling1099ListResponse } from './vendorFiling1099ListPayload';
|
|
4
4
|
import { VendorFiling1099ListState, VendorFiling1099ListViewSortKey } from './vendorFiling1099ListState';
|
|
5
5
|
export declare const initialState: VendorFiling1099ListState;
|
|
6
|
-
export declare const
|
|
7
|
-
cacheOverride: boolean;
|
|
8
|
-
}, string, never, never>, fetchVendorsFiling1099List: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[], {
|
|
6
|
+
export declare const fetchVendorsFiling1099List: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[], {
|
|
9
7
|
view: undefined;
|
|
10
8
|
}, string, never, never>, updateVendorsFiling1099List: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
11
9
|
response: VendorFiling1099ListResponse;
|
|
@@ -13,11 +11,9 @@ export declare const fetchVendorsFiling1099All: import("@reduxjs/toolkit").Actio
|
|
|
13
11
|
status: ZeniAPIStatus;
|
|
14
12
|
}, string>, clearVendorsFiling1099List: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, updateFiling1099ScrollYOffset: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
15
13
|
scrollYOffset: number;
|
|
16
|
-
}, string>,
|
|
14
|
+
}, string>, updateFiling1099SortUiState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
17
15
|
sortOrder: SortOrder;
|
|
18
16
|
sortKey: VendorFiling1099ListViewSortKey;
|
|
19
|
-
}, string>, updateFiling1099SearchUIState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
20
|
-
searchString: string;
|
|
21
17
|
}, string>;
|
|
22
18
|
declare const _default: import("@reduxjs/toolkit").Reducer<VendorFiling1099ListState, import("@reduxjs/toolkit").AnyAction>;
|
|
23
19
|
export default _default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
4
|
+
exports.updateFiling1099SortUiState = exports.updateFiling1099ScrollYOffset = exports.clearVendorsFiling1099List = exports.updateVendorFiling1099ListFailure = exports.updateVendorsFiling1099List = exports.fetchVendorsFiling1099List = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
-
const zeniDayJS_1 = require("
|
|
6
|
+
const zeniDayJS_1 = require("../../zeniDayJS");
|
|
7
7
|
exports.initialState = {
|
|
8
8
|
fetchState: 'Not-Started',
|
|
9
9
|
error: undefined,
|
|
@@ -25,21 +25,11 @@ const vendorFiling1099List = (0, toolkit_1.createSlice)({
|
|
|
25
25
|
name: 'vendorFiling1099List',
|
|
26
26
|
initialState: exports.initialState,
|
|
27
27
|
reducers: {
|
|
28
|
-
fetchVendorsFiling1099All: {
|
|
29
|
-
prepare(cacheOverride) {
|
|
30
|
-
return {
|
|
31
|
-
payload: { cacheOverride },
|
|
32
|
-
};
|
|
33
|
-
},
|
|
34
|
-
reducer() {
|
|
35
|
-
// Do nothing
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
28
|
fetchVendorsFiling1099List: {
|
|
39
29
|
reducer(draft) {
|
|
40
30
|
draft.fetchState = 'In-Progress';
|
|
41
31
|
// Note: Need to reset scroll position whenever a new fetch happens, except when fetching through scroll
|
|
42
|
-
draft.uiState =
|
|
32
|
+
draft.uiState.scrollYOffset = 0;
|
|
43
33
|
draft.error = undefined;
|
|
44
34
|
},
|
|
45
35
|
prepare() {
|
|
@@ -48,12 +38,9 @@ const vendorFiling1099List = (0, toolkit_1.createSlice)({
|
|
|
48
38
|
};
|
|
49
39
|
},
|
|
50
40
|
},
|
|
51
|
-
|
|
41
|
+
updateFiling1099SortUiState(draft, action) {
|
|
52
42
|
draft.uiState = Object.assign(Object.assign({}, draft.uiState), { sortKey: action.payload.sortKey, sortOrder: action.payload.sortOrder });
|
|
53
43
|
},
|
|
54
|
-
updateFiling1099SearchUIState(draft, action) {
|
|
55
|
-
draft.uiState = Object.assign(Object.assign({}, draft.uiState), { searchString: action.payload.searchString });
|
|
56
|
-
},
|
|
57
44
|
updateVendorsFiling1099List(draft, action) {
|
|
58
45
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
59
46
|
const { response } = action.payload;
|
|
@@ -80,5 +67,5 @@ const vendorFiling1099List = (0, toolkit_1.createSlice)({
|
|
|
80
67
|
},
|
|
81
68
|
},
|
|
82
69
|
});
|
|
83
|
-
_a = vendorFiling1099List.actions, exports.
|
|
70
|
+
_a = vendorFiling1099List.actions, exports.fetchVendorsFiling1099List = _a.fetchVendorsFiling1099List, exports.updateVendorsFiling1099List = _a.updateVendorsFiling1099List, exports.updateVendorFiling1099ListFailure = _a.updateVendorFiling1099ListFailure, exports.clearVendorsFiling1099List = _a.clearVendorsFiling1099List, exports.updateFiling1099ScrollYOffset = _a.updateFiling1099ScrollYOffset, exports.updateFiling1099SortUiState = _a.updateFiling1099SortUiState;
|
|
84
71
|
exports.default = vendorFiling1099List.reducer;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { SelectorView } from '
|
|
2
|
-
import { Vendor } from '
|
|
3
|
-
import { RootState } from '
|
|
4
|
-
import { ZeniDate } from '
|
|
1
|
+
import { SelectorView } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
2
|
+
import { Vendor } from '../../entity/vendor/vendorState';
|
|
3
|
+
import { RootState } from '../../reducer';
|
|
4
|
+
import { ZeniDate } from '../../zeniDayJS';
|
|
5
5
|
import { VendorFiling1099ListViewSortKey, VendorFiling1099ViewUIState } from './vendorFiling1099ListState';
|
|
6
|
-
import { SortOrder } from '
|
|
7
|
-
import { VendorType } from '
|
|
6
|
+
import { SortOrder } from '../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
7
|
+
import { VendorType } from '../vendorTypeList/vendorTypeListPayload';
|
|
8
8
|
export interface VendorFiling1099ListSelectorView extends SelectorView {
|
|
9
9
|
vendors: Vendor[];
|
|
10
10
|
vendorTypeList: VendorType[];
|
|
@@ -4,18 +4,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.sortedVendorFiling1099View = exports.getVendorFiling1099List = void 0;
|
|
7
|
-
const vendorSelector_1 = require("
|
|
7
|
+
const vendorSelector_1 = require("../../entity/vendor/vendorSelector");
|
|
8
8
|
const orderBy_1 = __importDefault(require("lodash/orderBy"));
|
|
9
|
-
const reduceFetchState_1 = require("../../../commonStateTypes/reduceFetchState");
|
|
10
9
|
const getVendorFiling1099List = (state) => {
|
|
11
10
|
var _a;
|
|
12
11
|
const { vendorFiling1099ListState, vendorState, vendorTypeListState } = state;
|
|
13
|
-
const targetIds = vendorFiling1099ListState.vendorIds;
|
|
14
|
-
const fetchStatus = (0, reduceFetchState_1.reduceFetchState)([
|
|
15
|
-
vendorFiling1099ListState,
|
|
16
|
-
vendorTypeListState,
|
|
17
|
-
]);
|
|
18
12
|
const vendorTypeList = vendorTypeListState.vendorTypes;
|
|
13
|
+
const targetIds = vendorFiling1099ListState.vendorIds;
|
|
19
14
|
const loweredSearchText = vendorFiling1099ListState.uiState.searchString
|
|
20
15
|
.trim()
|
|
21
16
|
.toLowerCase();
|
|
@@ -30,7 +25,7 @@ const getVendorFiling1099List = (state) => {
|
|
|
30
25
|
vendorTypeList: vendorTypeList,
|
|
31
26
|
isVendor1099Populated: (_a = vendorFiling1099ListState.isVendor1099Populated) !== null && _a !== void 0 ? _a : true,
|
|
32
27
|
uiState: vendorFiling1099ListState.uiState,
|
|
33
|
-
fetchState:
|
|
28
|
+
fetchState: vendorFiling1099ListState.fetchState,
|
|
34
29
|
lastRefreshSuccessTime: vendorFiling1099ListState.lastRefreshSuccessTime,
|
|
35
30
|
error: vendorFiling1099ListState.error,
|
|
36
31
|
version: 0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FetchedState, FetchState, ID } from '
|
|
2
|
-
import { SortOrder } from '
|
|
3
|
-
import { ZeniDate } from '
|
|
1
|
+
import { FetchedState, FetchState, ID } from '../../commonStateTypes/common';
|
|
2
|
+
import { SortOrder } from '../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
3
|
+
import { ZeniDate } from '../../zeniDayJS';
|
|
4
4
|
export interface VendorFiling1099ViewUIState {
|
|
5
5
|
sortKey: VendorFiling1099ListViewSortKey;
|
|
6
6
|
sortOrder: SortOrder;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const stringToUnion_1 = require("
|
|
3
|
+
const stringToUnion_1 = require("../../commonStateTypes/stringToUnion");
|
|
4
4
|
const VENDOR_FILING_1099_LIST_VIEW_SORT_KEYS = [
|
|
5
5
|
'vendor_name',
|
|
6
6
|
'tax_classification',
|
|
@@ -5,6 +5,6 @@ import { fetchVendorTabView } from './vendorTabViewReducer';
|
|
|
5
5
|
import { fetchAccruedScheduleList, fetchScheduleList } from '../scheduleView/scheduleListView/scheduleListReducer';
|
|
6
6
|
import { fetchOpExByVendor } from '../opExByVendor/opExByVendorReducer';
|
|
7
7
|
import { fetchVendorsList } from '../vendorList/vendorListReducer';
|
|
8
|
-
import { fetchVendorsFiling1099List } from '../
|
|
8
|
+
import { fetchVendorsFiling1099List } from '../vendorFiling1099List/vendorFiling1099ListReducer';
|
|
9
9
|
export declare type ActionType = ReturnType<typeof fetchVendorTabView> | ReturnType<typeof fetchOpExByVendor> | ReturnType<typeof fetchVendorsList> | ReturnType<typeof fetchAccruedScheduleList> | ReturnType<typeof fetchScheduleList> | ReturnType<typeof fetchVendorsFiling1099List>;
|
|
10
10
|
export declare const fetchVendorTabViewEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => Observable<ActionType>;
|
|
@@ -7,12 +7,12 @@ const vendorTabViewReducer_1 = require("./vendorTabViewReducer");
|
|
|
7
7
|
const scheduleListReducer_1 = require("../scheduleView/scheduleListView/scheduleListReducer");
|
|
8
8
|
const opExByVendorReducer_1 = require("../opExByVendor/opExByVendorReducer");
|
|
9
9
|
const vendorListReducer_1 = require("../vendorList/vendorListReducer");
|
|
10
|
-
const vendorFiling1099ListReducer_1 = require("../
|
|
10
|
+
const vendorFiling1099ListReducer_1 = require("../vendorFiling1099List/vendorFiling1099ListReducer");
|
|
11
11
|
const scheduleListSelector_1 = require("../scheduleView/scheduleListView/scheduleListSelector");
|
|
12
12
|
const scheduleListHelper_1 = require("../scheduleView/scheduleListView/scheduleListHelper");
|
|
13
13
|
const opExByVendorSelector_1 = require("../opExByVendor/opExByVendorSelector");
|
|
14
14
|
const vendorListSelector_1 = require("../vendorList/vendorListSelector");
|
|
15
|
-
const vendorFiling1099ListSelector_1 = require("../
|
|
15
|
+
const vendorFiling1099ListSelector_1 = require("../vendorFiling1099List/vendorFiling1099ListSelector");
|
|
16
16
|
const fetchVendorTabViewEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(vendorTabViewReducer_1.fetchVendorTabView.match), (0, operators_1.switchMap)((action) => {
|
|
17
17
|
const { shouldFetchAccruedExpenses, shouldFetchFixedAssets, shouldFetchOpexByVendor, shouldFetchPrepaidExpenses, shouldFetchVendorsList, shouldFetchFiling1099Vendor, } = action.payload;
|
|
18
18
|
const state = state$.value;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.12.
|
|
3
|
+
"version": "4.12.68",
|
|
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",
|
|
@@ -88,7 +88,6 @@
|
|
|
88
88
|
"build": "concurrently --kill-others-on-fail \"eslint . --ext .js,.jsx,.ts,.tsx\" \"tsc\" \"jest --config jest.config.json\"",
|
|
89
89
|
"onlybuild": "concurrently --kill-others-on-fail \"eslint . --ext .js,.jsx,.ts,.tsx\" \"tsc\"",
|
|
90
90
|
"format": "prettier --write --ignore-unknown \"src/**/*\"",
|
|
91
|
-
"format-watch": "git diff --name-only --diff-filter=d | grep -E '\\.(ts|tsx)$' | xargs prettier --write",
|
|
92
91
|
"check-version": "ts-node ./scripts/check-version.ts",
|
|
93
92
|
"version": "git add -A src",
|
|
94
93
|
"postversion": "git push && git push --tags",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ID } from '../../../commonStateTypes/common';
|
|
2
|
-
import { VendorState } from '../vendorState';
|
|
3
|
-
import { VendorPayload } from '../vendorPayload';
|
|
4
|
-
export declare const vendorPaylod: VendorPayload[];
|
|
5
|
-
export declare const vendorStateWithVendors: VendorState;
|
|
6
|
-
export declare const vendorIdToBeRemoved: ID;
|
|
7
|
-
export declare const vendorStateAfterRemoval: VendorState;
|