@zeniai/client-epic-state 4.12.96 → 4.12.98
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/commonPayloadTypes/commonPayload.d.ts +0 -7
- package/lib/commonPayloadTypes/v2/getSumOfBalancesGroupedByPeriod.d.ts +0 -0
- package/lib/commonPayloadTypes/v2/getSumOfBalancesGroupedByPeriod.js +1 -0
- package/lib/commonStateTypes/fileType.d.ts +2 -2
- package/lib/commonStateTypes/fileType.js +1 -1
- package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSectionWithAcOnly.d.ts +0 -0
- package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSectionWithAcOnly.js +1 -0
- package/lib/entity/company/companyPayload.d.ts +0 -4
- package/lib/entity/company/companyPayload.js +3 -8
- package/lib/entity/company/companyReducer.d.ts +1 -4
- package/lib/entity/company/companyReducer.js +2 -6
- package/lib/entity/company/companyStateTypes.d.ts +0 -4
- package/lib/entity/file/fileState.d.ts +3 -3
- package/lib/entity/file/fileState.js +0 -2
- package/lib/entity/tenant/clearAllEpic.d.ts +1 -3
- package/lib/entity/tenant/clearAllEpic.js +0 -4
- package/lib/entity/user/userPayload.d.ts +0 -1
- package/lib/entity/user/userReducer.js +8 -9
- package/lib/entity/user/userState.d.ts +0 -1
- package/lib/epic.d.ts +1 -7
- package/lib/epic.js +1 -7
- package/lib/index.d.ts +8 -16
- package/lib/index.js +8 -20
- package/lib/reducer.d.ts +0 -6
- package/lib/reducer.js +0 -6
- package/lib/view/addressView/__mocks__/json/createCompanyAddressSuccess.json +1 -7
- package/lib/view/addressView/__mocks__/json/createCompanyUserAddressSuccess.json +1 -7
- package/lib/view/addressView/addressViewState.d.ts +1 -1
- package/lib/view/addressView/toAddressViewLocalData.js +0 -5
- package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +1 -1
- package/lib/view/companyView/epic/companyPassport/updateCompanyPassportLocalStoreDataEpic.js +6 -1
- package/lib/view/companyView/selectorHelpers/getCompanyView.js +0 -4
- package/lib/view/companyView/types/companyPassport/companyUsersLocalData.d.ts +0 -2
- package/lib/view/companyView/types/companyPassport/companyUsersLocalData.js +1 -7
- package/lib/view/companyView/types/companyView.d.ts +0 -1
- package/lib/view/onboardingView/customerView/epic/customerDetails/fetchOnboardingCustomerViewEpic.d.ts +1 -8
- package/lib/view/onboardingView/customerView/epic/customerDetails/fetchOnboardingCustomerViewEpic.js +1 -3
- package/lib/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewEpic.js +4 -5
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +0 -2
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +3 -6
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.d.ts +4 -1
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +0 -2
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +0 -3
- package/lib/view/spendManagement/billPay/internationalWire/internationalWireSelector.d.ts +1 -2
- package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.d.ts +1 -1
- package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.js +6 -31
- package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.d.ts +2 -2
- package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.js +2 -5
- package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +1 -4
- package/lib/view/spendManagement/commonSetup/setupViewSelector.js +2 -6
- package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +0 -1
- package/lib/view/spendManagement/commonSetup/types/businessVerification.d.ts +0 -4
- package/lib/view/vendorFiling1099/__mock__/vendorFiling1099ListMock.js +0 -70
- package/lib/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListPayload.d.ts +0 -22
- package/lib/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListReducer.d.ts +1 -5
- package/lib/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListReducer.js +2 -29
- package/lib/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListSelector.d.ts +0 -2
- package/lib/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListSelector.js +1 -5
- package/lib/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListState.d.ts +0 -2
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardReducer.js +3 -1
- package/package.json +2 -2
- package/lib/view/countryList/countryListReducer.d.ts +0 -17
- package/lib/view/countryList/countryListReducer.js +0 -58
- package/lib/view/countryList/countryListSelector.d.ts +0 -7
- package/lib/view/countryList/countryListSelector.js +0 -13
- package/lib/view/countryList/countryListState.d.ts +0 -12
- package/lib/view/countryList/countryListState.js +0 -2
- package/lib/view/countryList/epics/fetchCountryListEpic.d.ts +0 -6
- package/lib/view/countryList/epics/fetchCountryListEpic.js +0 -19
- package/lib/view/countryList/epics/fetchNationalityCountryListEpic.d.ts +0 -7
- package/lib/view/countryList/epics/fetchNationalityCountryListEpic.js +0 -38
- package/lib/view/countryList/payloads/countryListPayload.d.ts +0 -6
- package/lib/view/countryList/payloads/countryListPayload.js +0 -10
- package/lib/view/countryList/payloads/nationalityCountryListPayload.d.ts +0 -11
- package/lib/view/countryList/payloads/nationalityCountryListPayload.js +0 -2
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.d.ts +0 -7
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.js +0 -36
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.d.ts +0 -6
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.js +0 -28
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.d.ts +0 -9
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.js +0 -67
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.d.ts +0 -26
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.js +0 -22
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.d.ts +0 -22
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.js +0 -89
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.d.ts +0 -15
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.js +0 -30
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState.d.ts +0 -20
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState.js +0 -2
- package/lib/view/vendorFiling1099/vendorFiling1099List/fetchVendorsFiling1099DownloadEpic.d.ts +0 -7
- package/lib/view/vendorFiling1099/vendorFiling1099List/fetchVendorsFiling1099DownloadEpic.js +0 -35
|
@@ -14,7 +14,7 @@ const userRoleSelector_1 = require("../../../entity/userRole/userRoleSelector");
|
|
|
14
14
|
const fileSelector_1 = require("../../../entity/file/fileSelector");
|
|
15
15
|
function getOnboardingCustomerView(state, companyId) {
|
|
16
16
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
17
|
-
const { fileState, paymentAccountState, onboardingCustomerViewState, userState, userRoleState, subscriptionPaymentAccountState, companyConfigState, cardPaymentViewState,
|
|
17
|
+
const { fileState, paymentAccountState, onboardingCustomerViewState, userState, userRoleState, subscriptionPaymentAccountState, companyConfigState, cardPaymentViewState, } = state;
|
|
18
18
|
const { companyDetails, companyOfficerUpdateStatus, primaryContactDetails, subscriptionPaymentAccountIds, paymentAccountDetails, plaidConnectionDetails, updateStatus, saveStatus, currentStep, uiState, fetchState, error, } = onboardingCustomerViewState;
|
|
19
19
|
const { paymentAccountIds } = paymentAccountDetails;
|
|
20
20
|
let subscriptionPaymentAccount;
|
|
@@ -94,12 +94,10 @@ function getOnboardingCustomerView(state, companyId) {
|
|
|
94
94
|
{ fetchState: configFetchState, error: configError },
|
|
95
95
|
{ fetchState, error },
|
|
96
96
|
]);
|
|
97
|
-
const allNationalityCountries = countryListState.byCountryListCode.nationalityCountryList.countries;
|
|
98
97
|
return {
|
|
99
98
|
companyDetailsLocalData,
|
|
100
99
|
companyOfficerLocalData,
|
|
101
100
|
companyView,
|
|
102
|
-
allNationalityCountries,
|
|
103
101
|
pendingSaveDetails: {
|
|
104
102
|
companyDetails: isCompanyDetailsSavePending(fileState, companyView, primaryContact, companyDetailsLocalData),
|
|
105
103
|
officer: isOfficerDetailsSavePending(companyOfficers, companyOfficerRoles, fileState, companyOfficerLocalData[selectedOfficerType]),
|
|
@@ -246,8 +244,8 @@ function isOfficerDetailsSavePending(companyOfficers, companyOfficerRoles, fileS
|
|
|
246
244
|
if (selectedOfficerIndex < 0) {
|
|
247
245
|
selectedOfficerIndex = 0;
|
|
248
246
|
}
|
|
249
|
-
const { userId, firstName, lastName, birthday, email, phone: userPhone, ssn,
|
|
250
|
-
const { firstName: firstNameLocalData, lastName: lastNameLocalData, birthday: birthdayLocalData, email: emailLocalData, phone, ssn: ssnLocalData,
|
|
247
|
+
const { userId, firstName, lastName, birthday, email, phone: userPhone, ssn, } = companyOfficers[selectedOfficerIndex];
|
|
248
|
+
const { firstName: firstNameLocalData, lastName: lastNameLocalData, birthday: birthdayLocalData, email: emailLocalData, phone, ssn: ssnLocalData, fileIds: officerFileIds, documentTypeSelectedForVerification, ownershipInCompany, titleAtCompany, } = officerDetails;
|
|
251
249
|
const fileIdsLocalData = (0, fileSelector_1.getFilesByFileIds)(fileState, officerFileIds).map((file) => file.fileId);
|
|
252
250
|
const userRole = companyOfficerRoles.find((userRole) => userRole.userId === userId);
|
|
253
251
|
const fileIds = (0, fileSelector_1.getFilesByFileIds)(fileState, (_a = userRole === null || userRole === void 0 ? void 0 : userRole.fileIds) !== null && _a !== void 0 ? _a : []).map((file) => file.fileId);
|
|
@@ -257,7 +255,6 @@ function isOfficerDetailsSavePending(companyOfficers, companyOfficerRoles, fileS
|
|
|
257
255
|
email != emailLocalData ||
|
|
258
256
|
userPhone != phone ||
|
|
259
257
|
ssn != ssnLocalData ||
|
|
260
|
-
nationalityCountryCode != nccLocalData ||
|
|
261
258
|
(userRole === null || userRole === void 0 ? void 0 : userRole.documentTypeSelectedForVerification) !=
|
|
262
259
|
documentTypeSelectedForVerification ||
|
|
263
260
|
(userRole === null || userRole === void 0 ? void 0 : userRole.titleAtCompany) != titleAtCompany ||
|
|
@@ -7,7 +7,7 @@ export declare const getScheduleListKey: (selectedCategory: ID, selectedTimefram
|
|
|
7
7
|
export declare type ScheduleListKey = ReturnType<typeof getScheduleListKey>;
|
|
8
8
|
export declare const toScheduleSubTabType: (v: string) => "all" | "new" | "completed" | "ongoing";
|
|
9
9
|
export declare type ScheduleSubTabType = ReturnType<typeof toScheduleSubTabType>;
|
|
10
|
-
declare const toScheduleSortKeyType: (v: string) => "status" | "user" | "months" | "amount" | "vendor" | "class" | "
|
|
10
|
+
declare const toScheduleSortKeyType: (v: string) => "status" | "user" | "months" | "amount" | "vendor" | "class" | "balanceAsOfToday" | "createTime" | "memo" | "transactionDate" | "transactionType" | "accruedExpenseCategory" | "scheduleCategory" | "expenseCategory" | "accumulatedDepreciationCategory" | "startMonth" | "endMonth" | "assetId";
|
|
11
11
|
export declare type ScheduleListSortKey = ReturnType<typeof toScheduleSortKeyType>;
|
|
12
12
|
export interface DownloadJEScheduleTabOptions {
|
|
13
13
|
timezone: string;
|
|
@@ -2,7 +2,6 @@ import { Amount, Currency } from '../../../../commonStateTypes/amount';
|
|
|
2
2
|
import { FetchedState, ID } from '../../../../commonStateTypes/common';
|
|
3
3
|
import { AccountBase } from '../../../../entity/account/accountState';
|
|
4
4
|
import { ClassBase } from '../../../../entity/class/classState';
|
|
5
|
-
import { Country } from '../../../countryList/countryListState';
|
|
6
5
|
export declare const getBillPayConfigKey: (method: string, subMethod: string) => string;
|
|
7
6
|
declare type BillPayConfigKey = ReturnType<typeof getBillPayConfigKey>;
|
|
8
7
|
export declare const getBillPayConfigMethodKey: (method: BillPaymentConfigCodeType, subMethod: BillPaymentSubConfigCodeKeyType, accType?: "depositAccount" | "paymentAccount" | undefined, internationalMethod?: "usdToLocalCurrency" | "usdToUsd" | undefined, internationalSubMethod?: "swiftOur" | "swiftSha" | undefined) => string;
|
|
@@ -28,6 +27,10 @@ export interface VendorCurrency extends Currency {
|
|
|
28
27
|
currencyName: string;
|
|
29
28
|
countryCode: string;
|
|
30
29
|
}
|
|
30
|
+
export interface Country {
|
|
31
|
+
countryCode: string;
|
|
32
|
+
countryName: string;
|
|
33
|
+
}
|
|
31
34
|
export interface BillPayConfig {
|
|
32
35
|
minPeriod: ConfigPeriod;
|
|
33
36
|
maxPeriod: ConfigPeriod;
|
|
@@ -26,7 +26,6 @@ import { AccountBase, RecommendedAccountBase } from '../../../../entity/account/
|
|
|
26
26
|
import { ClassBase, RecommendedClassBase } from '../../../../entity/class/classState';
|
|
27
27
|
import { RecurringBillState } from '../../../../entity/billPay/recurringBills/recurringBillsState';
|
|
28
28
|
import { FundingAccount } from '../../commonSetup/setupViewSelector';
|
|
29
|
-
import { AllowedValueWithCode } from '../../../../commonStateTypes/allowedValue';
|
|
30
29
|
export declare type PaymentToOption = {
|
|
31
30
|
id: ID;
|
|
32
31
|
type: PaymentModeType;
|
|
@@ -108,7 +107,6 @@ export interface EditBillDetailSelectorView extends SelectorView {
|
|
|
108
107
|
recurringConfig?: RecurringBillConfigLocalData;
|
|
109
108
|
recurringBillInstances?: RecurringBillInstance[];
|
|
110
109
|
isBillMarkedForRetry?: boolean;
|
|
111
|
-
internationalWireOnboardingStatus?: AllowedValueWithCode;
|
|
112
110
|
}
|
|
113
111
|
export interface EditBillInitialDetails {
|
|
114
112
|
vendor?: Vendor;
|
|
@@ -315,8 +315,6 @@ const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, isZeniAc
|
|
|
315
315
|
const classHierarchyList = (0, classListSelector_1.getNestedClassListHierarchy)(classListState);
|
|
316
316
|
const duplicateBills = (0, billPayReviewSelector_1.getDuplicateBills)(state, billId);
|
|
317
317
|
const isProcessing = (0, helpers_1.isBulkProcessing)((_1 = transaction === null || transaction === void 0 ? void 0 : transaction.bulkProcessingDetail) === null || _1 === void 0 ? void 0 : _1.type);
|
|
318
|
-
const companyView = (0, getCompanyView_1.getCompanyView)(state, companyId !== null && companyId !== void 0 ? companyId : '', []);
|
|
319
|
-
const internationalWireOnboardingStatus = companyView === null || companyView === void 0 ? void 0 : companyView.company.company.companyBillPayInfo.internationalWireOnboardingStatus;
|
|
320
318
|
return {
|
|
321
319
|
showVendorGptRecommendationText,
|
|
322
320
|
recommendedVendor,
|
|
@@ -366,7 +364,6 @@ const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, isZeniAc
|
|
|
366
364
|
recurringConfig,
|
|
367
365
|
isProcessing,
|
|
368
366
|
isBillMarkedForRetry,
|
|
369
|
-
internationalWireOnboardingStatus,
|
|
370
367
|
};
|
|
371
368
|
};
|
|
372
369
|
exports.getEditBillDetail = getEditBillDetail;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { SelectorView } from '../../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
2
2
|
import { RootState } from '../../../../reducer';
|
|
3
|
-
import { Country } from '
|
|
4
|
-
import { VendorCurrency } from '../billPayConfig/billPayConfigState';
|
|
3
|
+
import { Country, VendorCurrency } from '../billPayConfig/billPayConfigState';
|
|
5
4
|
import { CreateInternationalWireDetails, DynamicFormField, SupportedAccountType } from './internationalWire';
|
|
6
5
|
export interface InternationalWireSelectorView extends SelectorView {
|
|
7
6
|
dynamicForm: DynamicFormField[];
|
package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.d.ts
CHANGED
|
@@ -16,6 +16,6 @@ import { CompanyDetailsVerificationPayload, CompanyOfficerVerificationPayload, N
|
|
|
16
16
|
import { CompanyDetailsLocalData, CompanyOfficerLocalData, PrimaryContactLocalData } from '../../setupViewState';
|
|
17
17
|
export declare type ActionType = ReturnType<typeof updateBusinessVerificationDetails> | ReturnType<typeof updateAllUsers> | ReturnType<typeof updateUserRoles> | ReturnType<typeof updateCompanies> | ReturnType<typeof updateAddresses> | ReturnType<typeof updateFiles> | ReturnType<typeof updateAccounts> | ReturnType<typeof updatePaymentAccounts> | ReturnType<typeof updateSetupViewLocalStoreData> | ReturnType<typeof updateSelectedCompanyOfficer> | ReturnType<typeof openSnackbar> | ReturnType<typeof updateBusinessVerificationDetailsSuccess> | ReturnType<typeof updateBusinessVerificationDetailsFailure>;
|
|
18
18
|
export declare const updateBusinessVerificationDetailsEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
19
|
-
export declare const toBusinessVerificationCompanyDataPayload: (companyLocalData: CompanyDetailsLocalData, sendForVerification: boolean, companyAddressData?: AddressUpdatableInfo | undefined
|
|
19
|
+
export declare const toBusinessVerificationCompanyDataPayload: (companyLocalData: CompanyDetailsLocalData, sendForVerification: boolean, companyAddressData?: AddressUpdatableInfo | undefined) => Partial<CompanyDetailsVerificationPayload>;
|
|
20
20
|
export declare const toBusinessVerificationPrimaryContactDataPayload: (primaryContact: PrimaryContactLocalData, isNewPrimaryContactUser: boolean) => Partial<PrimaryContactVerificationPayload>;
|
|
21
21
|
export declare const toBusinessVerificationOfficerDataPayload: (companyOfficer: CompanyOfficerLocalData, isSubmittingAdditionalDocuments: boolean, companyOfficerAddressData?: AddressUpdatableInfo | undefined) => Partial<CompanyOfficerVerificationPayload> | Partial<NewCompanyOfficerVerificationPayload>;
|
package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.toBusinessVerificationOfficerDataPayload = exports.toBusinessVerificationPrimaryContactDataPayload = exports.toBusinessVerificationCompanyDataPayload = exports.updateBusinessVerificationDetailsEpic = void 0;
|
|
7
4
|
const rxjs_1 = require("rxjs");
|
|
@@ -18,10 +15,8 @@ const paymentAccountReducer_1 = require("../../../../../entity/paymentAccount/pa
|
|
|
18
15
|
const addressViewPayload_1 = require("../../../../addressView/addressViewPayload");
|
|
19
16
|
const getCompanyView_1 = require("../../../../companyView/selectorHelpers/getCompanyView");
|
|
20
17
|
const setupViewReducer_1 = require("../../setupViewReducer");
|
|
21
|
-
const addressViewSelector_1 = require("../../../../addressView/addressViewSelector");
|
|
22
|
-
const isEqual_1 = __importDefault(require("lodash/isEqual"));
|
|
23
18
|
const updateBusinessVerificationDetailsEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(setupViewReducer_1.updateBusinessVerificationDetails.match), (0, operators_1.mergeMap)((action) => {
|
|
24
|
-
var _a, _b, _c
|
|
19
|
+
var _a, _b, _c;
|
|
25
20
|
const { companyId, officerType, setupViewType, sendForVerification, fromBillListScreen, isSubmittingAdditionalDocuments, } = action.payload;
|
|
26
21
|
const { setupViewState } = state$.value;
|
|
27
22
|
const companyLocalData = setupViewState.companyDetails.localData;
|
|
@@ -31,15 +26,14 @@ const updateBusinessVerificationDetailsEpic = (actions$, state$, zeniAPI) => act
|
|
|
31
26
|
const companyView = (0, getCompanyView_1.getCompanyView)(state$.value, companyId, []);
|
|
32
27
|
const { newAddressState } = state$.value.addressViewState;
|
|
33
28
|
const companyAddressToCreate = (_a = newAddressState === null || newAddressState === void 0 ? void 0 : newAddressState.company_address) === null || _a === void 0 ? void 0 : _a.addressToCreate;
|
|
34
|
-
const registeredAddressToCreate = (_b = newAddressState === null || newAddressState === void 0 ? void 0 : newAddressState.company_registered_address) === null || _b === void 0 ? void 0 : _b.addressToCreate;
|
|
35
29
|
const addressType = officerType
|
|
36
30
|
.toLowerCase()
|
|
37
31
|
.concat('_address');
|
|
38
|
-
const companyOfficerAddressToCreate = (
|
|
32
|
+
const companyOfficerAddressToCreate = (_b = newAddressState === null || newAddressState === void 0 ? void 0 : newAddressState[addressType]) === null || _b === void 0 ? void 0 : _b.addressToCreate;
|
|
39
33
|
const isNewPrimaryContactUser = (primaryContactLocalData === null || primaryContactLocalData === void 0 ? void 0 : primaryContactLocalData.userId) == null ||
|
|
40
34
|
(primaryContactLocalData === null || primaryContactLocalData === void 0 ? void 0 : primaryContactLocalData.email) !==
|
|
41
|
-
((
|
|
42
|
-
const company = (0, exports.toBusinessVerificationCompanyDataPayload)(companyLocalData, sendForVerification, companyAddressToCreate
|
|
35
|
+
((_c = companyView === null || companyView === void 0 ? void 0 : companyView.primaryContact) === null || _c === void 0 ? void 0 : _c.user.email);
|
|
36
|
+
const company = (0, exports.toBusinessVerificationCompanyDataPayload)(companyLocalData, sendForVerification, companyAddressToCreate);
|
|
43
37
|
const primary_contact_user = primaryContactLocalData != null &&
|
|
44
38
|
Boolean(primaryContactLocalData.email) === true // Don't save Empty Primary Contact details
|
|
45
39
|
? (0, exports.toBusinessVerificationPrimaryContactDataPayload)(primaryContactLocalData, isNewPrimaryContactUser)
|
|
@@ -110,7 +104,7 @@ const updateBusinessVerificationDetailsEpic = (actions$, state$, zeniAPI) => act
|
|
|
110
104
|
}
|
|
111
105
|
}));
|
|
112
106
|
exports.updateBusinessVerificationDetailsEpic = updateBusinessVerificationDetailsEpic;
|
|
113
|
-
const toBusinessVerificationCompanyDataPayload = (companyLocalData, sendForVerification, companyAddressData
|
|
107
|
+
const toBusinessVerificationCompanyDataPayload = (companyLocalData, sendForVerification, companyAddressData) => {
|
|
114
108
|
const { companyDescription, companyLegalName, companyIndustry, website, incDate, taxIdOrEIN, phone, syncToken, fileIds, typeOfIncorporation, } = companyLocalData;
|
|
115
109
|
const company = {
|
|
116
110
|
is_ready_for_verification: sendForVerification,
|
|
@@ -119,19 +113,6 @@ const toBusinessVerificationCompanyDataPayload = (companyLocalData, sendForVerif
|
|
|
119
113
|
const companyAddressPayload = companyAddressData != null
|
|
120
114
|
? (0, addressViewPayload_1.toAddressUpdatableInfoPayload)(companyAddressData)
|
|
121
115
|
: undefined;
|
|
122
|
-
const registeredAddressPayload = registeredAddressData != null
|
|
123
|
-
? (0, addressViewPayload_1.toAddressUpdatableInfoPayload)(registeredAddressData)
|
|
124
|
-
: undefined;
|
|
125
|
-
if ((0, isEqual_1.default)(companyAddressData != null
|
|
126
|
-
? (0, addressViewSelector_1.getFormattedAddress)(companyAddressData)
|
|
127
|
-
: companyAddressData, registeredAddressData != null
|
|
128
|
-
? (0, addressViewSelector_1.getFormattedAddress)(registeredAddressData)
|
|
129
|
-
: registeredAddressData)) {
|
|
130
|
-
company['is_registered_address_same_as_company_address'] = true;
|
|
131
|
-
}
|
|
132
|
-
else {
|
|
133
|
-
company['is_registered_address_same_as_company_address'] = false;
|
|
134
|
-
}
|
|
135
116
|
if (companyDescription != null) {
|
|
136
117
|
company['company_description'] = companyDescription;
|
|
137
118
|
}
|
|
@@ -156,9 +137,6 @@ const toBusinessVerificationCompanyDataPayload = (companyLocalData, sendForVerif
|
|
|
156
137
|
if (companyAddressPayload != null) {
|
|
157
138
|
company['address'] = companyAddressPayload;
|
|
158
139
|
}
|
|
159
|
-
if (registeredAddressPayload != null) {
|
|
160
|
-
company['registered_address'] = registeredAddressPayload;
|
|
161
|
-
}
|
|
162
140
|
if (typeOfIncorporation != null) {
|
|
163
141
|
company['company_inc_type'] = typeOfIncorporation;
|
|
164
142
|
}
|
|
@@ -185,7 +163,7 @@ const toBusinessVerificationPrimaryContactDataPayload = (primaryContact, isNewPr
|
|
|
185
163
|
};
|
|
186
164
|
exports.toBusinessVerificationPrimaryContactDataPayload = toBusinessVerificationPrimaryContactDataPayload;
|
|
187
165
|
const toBusinessVerificationOfficerDataPayload = (companyOfficer, isSubmittingAdditionalDocuments, companyOfficerAddressData) => {
|
|
188
|
-
const { firstName, lastName, userId, email, syncToken: userSyncToken, ssn, birthday,
|
|
166
|
+
const { firstName, lastName, userId, email, syncToken: userSyncToken, ssn, birthday, phone: userPhone, otpChallenge, isPhoneVerified, titleAtCompany, ownershipInCompany, documentTypeSelectedForVerification, fileIds: userFileIds, additionalSubmittedDocumentsForVerificationFileIds, } = companyOfficer;
|
|
189
167
|
const company_officer = {
|
|
190
168
|
first_name: firstName,
|
|
191
169
|
last_name: lastName,
|
|
@@ -216,9 +194,6 @@ const toBusinessVerificationOfficerDataPayload = (companyOfficer, isSubmittingAd
|
|
|
216
194
|
if (birthday != null) {
|
|
217
195
|
company_officer['birthday'] = birthday.format('YYYY-MM-DD');
|
|
218
196
|
}
|
|
219
|
-
if (nationalityCountryCode != null) {
|
|
220
|
-
company_officer['nationality_country_code'] = nationalityCountryCode;
|
|
221
|
-
}
|
|
222
197
|
if (userPhone != null) {
|
|
223
198
|
company_officer['phone'] = userPhone;
|
|
224
199
|
}
|
package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ import { Company } from '../../../../../entity/company/companyStateTypes';
|
|
|
5
5
|
import { clearSetupViewDataInLocalStore, saveSetupViewDataInLocalStore, updateSetupViewLocalStoreData } from '../../setupViewReducer';
|
|
6
6
|
import { SetupViewLocalData } from '../../setupViewState';
|
|
7
7
|
import { UserRole } from '../../../../../entity/userRole/userRoleState';
|
|
8
|
-
import { newAddressInLocalStore,
|
|
9
|
-
export declare type ActionType = ReturnType<typeof updateSetupViewLocalStoreData> | ReturnType<typeof saveSetupViewDataInLocalStore> | ReturnType<typeof clearSetupViewDataInLocalStore> | ReturnType<typeof
|
|
8
|
+
import { newAddressInLocalStore, resetNewAddressesInLocalStore } from '../../../../addressView/addressViewReducer';
|
|
9
|
+
export declare type ActionType = ReturnType<typeof updateSetupViewLocalStoreData> | ReturnType<typeof saveSetupViewDataInLocalStore> | ReturnType<typeof clearSetupViewDataInLocalStore> | ReturnType<typeof resetNewAddressesInLocalStore> | ReturnType<typeof newAddressInLocalStore>;
|
|
10
10
|
export declare const updateSetupViewLocalStoreDataEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => import("rxjs").Observable<ActionType>;
|
|
11
11
|
/**
|
|
12
12
|
* Helpers
|
package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.js
CHANGED
|
@@ -29,8 +29,7 @@ const updateSetupViewLocalStoreDataEpic = (actions$, state$) => actions$.pipe((0
|
|
|
29
29
|
const fetchActions = [];
|
|
30
30
|
if (company != null) {
|
|
31
31
|
const setupViewLocalData = toSetupViewLocalData(company, companyOfficers, companyOfficerRoles, primaryContact);
|
|
32
|
-
fetchActions.push((0, setupViewReducer_1.clearSetupViewDataInLocalStore)(), (0, setupViewReducer_1.saveSetupViewDataInLocalStore)(setupViewLocalData));
|
|
33
|
-
fetchActions.push((0, addressViewReducer_1.resetNewAddressDataInLocalStoreForAddressTypes)(companyUsersLocalData_1.AllCompanyPassportAddressTypes));
|
|
32
|
+
fetchActions.push((0, setupViewReducer_1.clearSetupViewDataInLocalStore)(), (0, setupViewReducer_1.saveSetupViewDataInLocalStore)(setupViewLocalData), (0, addressViewReducer_1.resetNewAddressesInLocalStore)());
|
|
34
33
|
}
|
|
35
34
|
if (companyView != null) {
|
|
36
35
|
const addresses = (0, toAddressViewLocalData_1.toAddressViewLocalData)(companyView);
|
|
@@ -91,7 +90,7 @@ function toSetupViewLocalData(company, users, userRoles, primaryContact) {
|
|
|
91
90
|
}
|
|
92
91
|
const officers = companyOfficers.map((user, index) => {
|
|
93
92
|
var _a, _b, _c, _d, _e;
|
|
94
|
-
const { userId, firstName, lastName, birthday, email,
|
|
93
|
+
const { userId, firstName, lastName, birthday, email, phone: userPhone, isPhoneVerified, ssn, syncToken, } = user;
|
|
95
94
|
const userRole = userRoles.find((userRole) => userRole.userId === userId);
|
|
96
95
|
return {
|
|
97
96
|
officerType: `Officer_${index + 1}`,
|
|
@@ -100,7 +99,6 @@ function toSetupViewLocalData(company, users, userRoles, primaryContact) {
|
|
|
100
99
|
lastName,
|
|
101
100
|
birthday,
|
|
102
101
|
email,
|
|
103
|
-
nationalityCountryCode,
|
|
104
102
|
phone: userPhone,
|
|
105
103
|
isPhoneVerified,
|
|
106
104
|
ssn,
|
|
@@ -124,7 +122,6 @@ function toSetupViewLocalData(company, users, userRoles, primaryContact) {
|
|
|
124
122
|
firstName: '',
|
|
125
123
|
lastName: '',
|
|
126
124
|
email: '',
|
|
127
|
-
nationalityCountryCode: undefined,
|
|
128
125
|
fileIds: [],
|
|
129
126
|
isSelectedForVerification: false,
|
|
130
127
|
additionalDocumentTypesRequestedForVerification: [],
|
|
@@ -16,7 +16,6 @@ import { DepositAccount } from '../../../entity/depositAccount/depositAccount';
|
|
|
16
16
|
import { AllowedValueWithCode } from '../../../commonStateTypes/allowedValue';
|
|
17
17
|
import { Amount } from '../../../commonStateTypes/amount';
|
|
18
18
|
import { BalanceChange } from '../../../commonStateTypes/balance';
|
|
19
|
-
import { Country } from '../../countryList/countryListState';
|
|
20
19
|
export interface SetupView {
|
|
21
20
|
allFundingAccounts: FundingAccount[];
|
|
22
21
|
allBankAccounts: AccountBase[];
|
|
@@ -73,7 +72,6 @@ export interface CompanyDetails {
|
|
|
73
72
|
incDate?: ZeniDate;
|
|
74
73
|
syncToken?: string;
|
|
75
74
|
addressStatus?: NewAddressData;
|
|
76
|
-
registeredAddressStatus?: NewAddressData;
|
|
77
75
|
primaryContactLocalData?: PrimaryContactLocalData;
|
|
78
76
|
typeOfIncorporation?: string;
|
|
79
77
|
}
|
|
@@ -82,9 +80,8 @@ interface CompanyAndOfficerLocalData {
|
|
|
82
80
|
companyOfficerLocalData: Record<CompanyOfficerType, CompanyOfficersDetails | undefined>;
|
|
83
81
|
}
|
|
84
82
|
export interface BusinessVerificationDetails extends CompanyAndOfficerLocalData {
|
|
85
|
-
updateStatus: FetchStateAndError;
|
|
86
|
-
allNationalityCountries: Country[];
|
|
87
83
|
companyView?: CompanyView;
|
|
84
|
+
updateStatus: FetchStateAndError;
|
|
88
85
|
}
|
|
89
86
|
export declare function getCommonSetupViewDetails(state: RootState, companyId: ID, setupViewType: SetupViewType, plaidAccountKeyType: PlaidAccountKeyType): SetupView;
|
|
90
87
|
export declare function getBusinessVerificationDetails(state: RootState, companyId: ID): BusinessVerificationDetails;
|
|
@@ -82,7 +82,7 @@ function getPrimaryAccountForTheProduct(state, companyId, setupViewType) {
|
|
|
82
82
|
return primaryFundingAccount;
|
|
83
83
|
}
|
|
84
84
|
function getBusinessVerificationDetails(state, companyId) {
|
|
85
|
-
const { setupViewState
|
|
85
|
+
const { setupViewState } = state;
|
|
86
86
|
const { companyDetails, companyOfficerUpdateStatus, primaryContactDetails, updateStatus, } = setupViewState;
|
|
87
87
|
const companyView = (0, getCompanyView_1.getCompanyView)(state, companyId, []);
|
|
88
88
|
const { companyDetailsLocalData, companyOfficerLocalData } = (0, exports.getCompanyAndIdentityDetails)(state, companyId, {
|
|
@@ -90,18 +90,16 @@ function getBusinessVerificationDetails(state, companyId) {
|
|
|
90
90
|
companyOfficerUpdateStatus,
|
|
91
91
|
primaryContactDetails,
|
|
92
92
|
});
|
|
93
|
-
const allNationalityCountries = countryListState.byCountryListCode.nationalityCountryList.countries;
|
|
94
93
|
return {
|
|
95
94
|
companyDetailsLocalData,
|
|
96
95
|
companyOfficerLocalData,
|
|
97
96
|
companyView,
|
|
98
97
|
updateStatus,
|
|
99
|
-
allNationalityCountries,
|
|
100
98
|
};
|
|
101
99
|
}
|
|
102
100
|
exports.getBusinessVerificationDetails = getBusinessVerificationDetails;
|
|
103
101
|
const getCompanyAndIdentityDetails = (state, companyId, companyAndIdentityDetails) => {
|
|
104
|
-
var _a
|
|
102
|
+
var _a;
|
|
105
103
|
const { companyDetails, companyOfficerUpdateStatus, primaryContactDetails } = companyAndIdentityDetails;
|
|
106
104
|
const { fileState, addressViewState } = state;
|
|
107
105
|
const { localData: primaryContactLocalData } = primaryContactDetails;
|
|
@@ -117,7 +115,6 @@ const getCompanyAndIdentityDetails = (state, companyId, companyAndIdentityDetail
|
|
|
117
115
|
updateFileStatusById[fileId] = (0, fileViewSelector_1.getFileUpdateNameStatusById)(state, fileId);
|
|
118
116
|
});
|
|
119
117
|
const companyAddress = (_a = addressViewState.newAddressState) === null || _a === void 0 ? void 0 : _a.company_address;
|
|
120
|
-
const registeredCompanyAddress = (_b = addressViewState.newAddressState) === null || _b === void 0 ? void 0 : _b.company_registered_address;
|
|
121
118
|
companyDetailsLocalData = {
|
|
122
119
|
companyId,
|
|
123
120
|
companyDescription,
|
|
@@ -132,7 +129,6 @@ const getCompanyAndIdentityDetails = (state, companyId, companyAndIdentityDetail
|
|
|
132
129
|
deleteFileStatusById,
|
|
133
130
|
updateFileStatusById,
|
|
134
131
|
addressStatus: companyAddress,
|
|
135
|
-
registeredAddressStatus: registeredCompanyAddress,
|
|
136
132
|
primaryContactLocalData,
|
|
137
133
|
typeOfIncorporation,
|
|
138
134
|
};
|
|
@@ -8,7 +8,6 @@ export interface CompanyOfficerVerificationPayload {
|
|
|
8
8
|
sync_token: string;
|
|
9
9
|
ssn: string;
|
|
10
10
|
birthday: string;
|
|
11
|
-
nationality_country_code: string;
|
|
12
11
|
title_at_company: string;
|
|
13
12
|
company_ownership: number;
|
|
14
13
|
document_type_for_verification: string;
|
|
@@ -32,7 +31,6 @@ export interface NewCompanyOfficerVerificationPayload {
|
|
|
32
31
|
title_at_company: string;
|
|
33
32
|
company_ownership: number;
|
|
34
33
|
document_type_for_verification: string;
|
|
35
|
-
nationality_country_code: string;
|
|
36
34
|
file_ids: ID[];
|
|
37
35
|
address: AddressUpdatableInfoPayload;
|
|
38
36
|
phone_verification?: {
|
|
@@ -57,8 +55,6 @@ export interface CompanyDetailsVerificationPayload {
|
|
|
57
55
|
file_ids: ID[];
|
|
58
56
|
sync_token: string;
|
|
59
57
|
address: AddressUpdatableInfoPayload;
|
|
60
|
-
registered_address: AddressUpdatableInfoPayload;
|
|
61
|
-
is_registered_address_same_as_company_address: boolean;
|
|
62
58
|
company_inc_type: string;
|
|
63
59
|
company_inc_date: string | null;
|
|
64
60
|
is_new_company_industry_verified: boolean;
|
|
@@ -28,20 +28,6 @@ exports.vendorFiling1099ListInProgressState = {
|
|
|
28
28
|
hasValidState: vendorFiling1099ListReducer_1.initialState.hasValidState,
|
|
29
29
|
lastRefreshSuccessTime: undefined,
|
|
30
30
|
isVendor1099Populated: true,
|
|
31
|
-
vendorFiling1099DownloadData: {
|
|
32
|
-
nec: {
|
|
33
|
-
data: [],
|
|
34
|
-
customHeaders: [],
|
|
35
|
-
},
|
|
36
|
-
misc: {
|
|
37
|
-
data: [],
|
|
38
|
-
customHeaders: [],
|
|
39
|
-
},
|
|
40
|
-
int: {
|
|
41
|
-
data: [],
|
|
42
|
-
customHeaders: [],
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
31
|
};
|
|
46
32
|
exports.vendorFiling1099ListInProgressInitialState = {
|
|
47
33
|
vendorIds: [],
|
|
@@ -57,20 +43,6 @@ exports.vendorFiling1099ListInProgressInitialState = {
|
|
|
57
43
|
hasValidState: vendorFiling1099ListReducer_1.initialState.hasValidState,
|
|
58
44
|
lastRefreshSuccessTime: undefined,
|
|
59
45
|
isVendor1099Populated: false,
|
|
60
|
-
vendorFiling1099DownloadData: {
|
|
61
|
-
nec: {
|
|
62
|
-
data: [],
|
|
63
|
-
customHeaders: [],
|
|
64
|
-
},
|
|
65
|
-
misc: {
|
|
66
|
-
data: [],
|
|
67
|
-
customHeaders: [],
|
|
68
|
-
},
|
|
69
|
-
int: {
|
|
70
|
-
data: [],
|
|
71
|
-
customHeaders: [],
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
46
|
};
|
|
75
47
|
exports.vendorFiling1099ListSuccessState = {
|
|
76
48
|
vendorIds: ['vendor_j12jh1g2g12jg3jh12:12'],
|
|
@@ -86,20 +58,6 @@ exports.vendorFiling1099ListSuccessState = {
|
|
|
86
58
|
hasValidState: vendorFiling1099ListReducer_1.initialState.hasValidState,
|
|
87
59
|
lastRefreshSuccessTime: (0, zeniDayJS_1.date)('2024-09-26T07:44:02.150Z'),
|
|
88
60
|
isVendor1099Populated: true,
|
|
89
|
-
vendorFiling1099DownloadData: {
|
|
90
|
-
nec: {
|
|
91
|
-
data: [],
|
|
92
|
-
customHeaders: [],
|
|
93
|
-
},
|
|
94
|
-
misc: {
|
|
95
|
-
data: [],
|
|
96
|
-
customHeaders: [],
|
|
97
|
-
},
|
|
98
|
-
int: {
|
|
99
|
-
data: [],
|
|
100
|
-
customHeaders: [],
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
61
|
};
|
|
104
62
|
exports.vendorFiling1099ListFailureState = {
|
|
105
63
|
vendorIds: [],
|
|
@@ -118,20 +76,6 @@ exports.vendorFiling1099ListFailureState = {
|
|
|
118
76
|
},
|
|
119
77
|
hasValidState: vendorFiling1099ListReducer_1.initialState.hasValidState,
|
|
120
78
|
isVendor1099Populated: false,
|
|
121
|
-
vendorFiling1099DownloadData: {
|
|
122
|
-
nec: {
|
|
123
|
-
data: [],
|
|
124
|
-
customHeaders: [],
|
|
125
|
-
},
|
|
126
|
-
misc: {
|
|
127
|
-
data: [],
|
|
128
|
-
customHeaders: [],
|
|
129
|
-
},
|
|
130
|
-
int: {
|
|
131
|
-
data: [],
|
|
132
|
-
customHeaders: [],
|
|
133
|
-
},
|
|
134
|
-
},
|
|
135
79
|
};
|
|
136
80
|
exports.rootStateWithVendorFiling1099List = Object.assign({}, reducer_1.initialRootState, {
|
|
137
81
|
vendorState: {
|
|
@@ -153,20 +97,6 @@ exports.rootStateWithVendorFiling1099List = Object.assign({}, reducer_1.initialR
|
|
|
153
97
|
lastRefreshSuccessTime: undefined,
|
|
154
98
|
hasValidState: vendorFiling1099ListReducer_1.initialState.hasValidState,
|
|
155
99
|
isVendor1099Populated: true,
|
|
156
|
-
vendorFiling1099DownloadData: {
|
|
157
|
-
nec: {
|
|
158
|
-
data: [],
|
|
159
|
-
customHeaders: [],
|
|
160
|
-
},
|
|
161
|
-
misc: {
|
|
162
|
-
data: [],
|
|
163
|
-
customHeaders: [],
|
|
164
|
-
},
|
|
165
|
-
int: {
|
|
166
|
-
data: [],
|
|
167
|
-
customHeaders: [],
|
|
168
|
-
},
|
|
169
|
-
},
|
|
170
100
|
},
|
|
171
101
|
vendorTypeListState: {
|
|
172
102
|
fetchState: 'Completed',
|
|
@@ -11,25 +11,3 @@ export interface ReportVendorFiling1099Payload extends ReportPayload {
|
|
|
11
11
|
is_vendor_1099_populated: boolean;
|
|
12
12
|
}
|
|
13
13
|
export declare type VendorFiling1099ListResponse = ZeniAPIResponse<FetchVendorFiling1099Payload>;
|
|
14
|
-
export interface VendorFiling1099DownloadData {
|
|
15
|
-
nec?: {
|
|
16
|
-
data: DownloadData[];
|
|
17
|
-
customHeaders: CustomHeader[];
|
|
18
|
-
};
|
|
19
|
-
misc?: {
|
|
20
|
-
data: DownloadData[];
|
|
21
|
-
customHeaders: CustomHeader[];
|
|
22
|
-
};
|
|
23
|
-
int?: {
|
|
24
|
-
data: DownloadData[];
|
|
25
|
-
customHeaders: CustomHeader[];
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
export interface CustomHeader {
|
|
29
|
-
label: string;
|
|
30
|
-
key: string;
|
|
31
|
-
}
|
|
32
|
-
export interface DownloadData {
|
|
33
|
-
[key: string]: string | number;
|
|
34
|
-
}
|
|
35
|
-
export declare type VendorFiling1099DownloadResponse = ZeniAPIResponse<VendorFiling1099DownloadData>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
2
2
|
import { ZeniAPIStatus } from '../../../responsePayload';
|
|
3
|
-
import {
|
|
3
|
+
import { VendorFiling1099ListResponse } from './vendorFiling1099ListPayload';
|
|
4
4
|
import { VendorFiling1099ListState, VendorFiling1099ListViewSortKey } from './vendorFiling1099ListState';
|
|
5
|
-
import { FetchState } from '../../../commonStateTypes/common';
|
|
6
5
|
export declare const initialState: VendorFiling1099ListState;
|
|
7
6
|
export declare const fetchVendorsFiling1099All: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[cacheOverride: boolean], {
|
|
8
7
|
cacheOverride: boolean;
|
|
@@ -19,9 +18,6 @@ export declare const fetchVendorsFiling1099All: import("@reduxjs/toolkit").Actio
|
|
|
19
18
|
sortKey: VendorFiling1099ListViewSortKey;
|
|
20
19
|
}, string>, updateFiling1099SearchUIState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
21
20
|
searchString: string;
|
|
22
|
-
}, string>, fetchVendorsFiling1099Download: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, updateVendorFiling1099DownloadData: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
23
|
-
response: VendorFiling1099DownloadResponse;
|
|
24
|
-
downloadState: FetchState;
|
|
25
21
|
}, string>;
|
|
26
22
|
declare const _default: import("@reduxjs/toolkit").Reducer<VendorFiling1099ListState, import("@reduxjs/toolkit").AnyAction>;
|
|
27
23
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
4
|
+
exports.updateFiling1099SearchUIState = exports.updateFiling1099SortUIState = exports.updateFiling1099ScrollYOffset = exports.clearVendorsFiling1099List = exports.updateVendorFiling1099ListFailure = exports.updateVendorsFiling1099List = exports.fetchVendorsFiling1099List = exports.fetchVendorsFiling1099All = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const zeniDayJS_1 = require("../../../zeniDayJS");
|
|
7
7
|
exports.initialState = {
|
|
@@ -20,20 +20,6 @@ exports.initialState = {
|
|
|
20
20
|
downloadState: 'Not-Started',
|
|
21
21
|
searchString: '',
|
|
22
22
|
},
|
|
23
|
-
vendorFiling1099DownloadData: {
|
|
24
|
-
nec: {
|
|
25
|
-
data: [],
|
|
26
|
-
customHeaders: [],
|
|
27
|
-
},
|
|
28
|
-
misc: {
|
|
29
|
-
data: [],
|
|
30
|
-
customHeaders: [],
|
|
31
|
-
},
|
|
32
|
-
int: {
|
|
33
|
-
data: [],
|
|
34
|
-
customHeaders: [],
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
23
|
};
|
|
38
24
|
const vendorFiling1099List = (0, toolkit_1.createSlice)({
|
|
39
25
|
name: 'vendorFiling1099List',
|
|
@@ -88,23 +74,10 @@ const vendorFiling1099List = (0, toolkit_1.createSlice)({
|
|
|
88
74
|
draft.fetchState = 'Error';
|
|
89
75
|
draft.error = action.payload.status;
|
|
90
76
|
},
|
|
91
|
-
//Reducers for VendorFiling1099Download
|
|
92
|
-
fetchVendorsFiling1099Download(draft) {
|
|
93
|
-
draft.uiState.downloadState = 'In-Progress';
|
|
94
|
-
},
|
|
95
|
-
updateVendorFiling1099DownloadData(draft, action) {
|
|
96
|
-
var _a, _b, _c;
|
|
97
|
-
draft.vendorFiling1099DownloadData.nec =
|
|
98
|
-
(_a = action.payload.response.data) === null || _a === void 0 ? void 0 : _a.nec;
|
|
99
|
-
draft.vendorFiling1099DownloadData.misc =
|
|
100
|
-
(_b = action.payload.response.data) === null || _b === void 0 ? void 0 : _b.misc;
|
|
101
|
-
draft.vendorFiling1099DownloadData.int =
|
|
102
|
-
(_c = action.payload.response.data) === null || _c === void 0 ? void 0 : _c.int;
|
|
103
|
-
},
|
|
104
77
|
clearVendorsFiling1099List(draft) {
|
|
105
78
|
Object.assign(draft, exports.initialState);
|
|
106
79
|
},
|
|
107
80
|
},
|
|
108
81
|
});
|
|
109
|
-
_a = vendorFiling1099List.actions, exports.fetchVendorsFiling1099All = _a.fetchVendorsFiling1099All, exports.fetchVendorsFiling1099List = _a.fetchVendorsFiling1099List, exports.updateVendorsFiling1099List = _a.updateVendorsFiling1099List, exports.updateVendorFiling1099ListFailure = _a.updateVendorFiling1099ListFailure, exports.clearVendorsFiling1099List = _a.clearVendorsFiling1099List, exports.updateFiling1099ScrollYOffset = _a.updateFiling1099ScrollYOffset, exports.updateFiling1099SortUIState = _a.updateFiling1099SortUIState, exports.updateFiling1099SearchUIState = _a.updateFiling1099SearchUIState
|
|
82
|
+
_a = vendorFiling1099List.actions, exports.fetchVendorsFiling1099All = _a.fetchVendorsFiling1099All, exports.fetchVendorsFiling1099List = _a.fetchVendorsFiling1099List, exports.updateVendorsFiling1099List = _a.updateVendorsFiling1099List, exports.updateVendorFiling1099ListFailure = _a.updateVendorFiling1099ListFailure, exports.clearVendorsFiling1099List = _a.clearVendorsFiling1099List, exports.updateFiling1099ScrollYOffset = _a.updateFiling1099ScrollYOffset, exports.updateFiling1099SortUIState = _a.updateFiling1099SortUIState, exports.updateFiling1099SearchUIState = _a.updateFiling1099SearchUIState;
|
|
110
83
|
exports.default = vendorFiling1099List.reducer;
|
|
@@ -5,7 +5,6 @@ import { ZeniDate } from '../../../zeniDayJS';
|
|
|
5
5
|
import { VendorFiling1099ListViewSortKey, VendorFiling1099ViewUIState } from './vendorFiling1099ListState';
|
|
6
6
|
import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
7
7
|
import { VendorType } from '../../vendorTypeList/vendorTypeListPayload';
|
|
8
|
-
import { VendorFiling1099DownloadData } from './vendorFiling1099ListPayload';
|
|
9
8
|
export interface VendorFiling1099ListSelectorView extends SelectorView {
|
|
10
9
|
vendors: Vendor[];
|
|
11
10
|
vendorTypeList: VendorType[];
|
|
@@ -16,4 +15,3 @@ export interface VendorFiling1099ListSelectorView extends SelectorView {
|
|
|
16
15
|
}
|
|
17
16
|
export declare const getVendorFiling1099List: (state: RootState) => VendorFiling1099ListSelectorView;
|
|
18
17
|
export declare const sortedVendorFiling1099View: (vendorFiling1099List: Vendor[], sortKey: VendorFiling1099ListViewSortKey, sortOrder: SortOrder) => Vendor[];
|
|
19
|
-
export declare const getVendorFiling1099DownloadData: (state: RootState) => VendorFiling1099DownloadData;
|
|
@@ -3,7 +3,7 @@ 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.sortedVendorFiling1099View = exports.getVendorFiling1099List = void 0;
|
|
7
7
|
const vendorSelector_1 = require("../../../entity/vendor/vendorSelector");
|
|
8
8
|
const orderBy_1 = __importDefault(require("lodash/orderBy"));
|
|
9
9
|
const reduceFetchState_1 = require("../../../commonStateTypes/reduceFetchState");
|
|
@@ -63,7 +63,3 @@ const sortedVendorFiling1099View = (vendorFiling1099List, sortKey, sortOrder) =>
|
|
|
63
63
|
}, sortOrder === 'ascending' ? 'asc' : 'desc');
|
|
64
64
|
};
|
|
65
65
|
exports.sortedVendorFiling1099View = sortedVendorFiling1099View;
|
|
66
|
-
const getVendorFiling1099DownloadData = (state) => {
|
|
67
|
-
return state.vendorFiling1099ListState.vendorFiling1099DownloadData;
|
|
68
|
-
};
|
|
69
|
-
exports.getVendorFiling1099DownloadData = getVendorFiling1099DownloadData;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { FetchedState, FetchState, ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
3
3
|
import { ZeniDate } from '../../../zeniDayJS';
|
|
4
|
-
import { VendorFiling1099DownloadData } from './vendorFiling1099ListPayload';
|
|
5
4
|
export interface VendorFiling1099ViewUIState {
|
|
6
5
|
sortKey: VendorFiling1099ListViewSortKey;
|
|
7
6
|
sortOrder: SortOrder;
|
|
@@ -13,7 +12,6 @@ export interface VendorFiling1099ListState extends FetchedState {
|
|
|
13
12
|
vendorIds: ID[];
|
|
14
13
|
uiState: VendorFiling1099ViewUIState;
|
|
15
14
|
isVendor1099Populated: boolean;
|
|
16
|
-
vendorFiling1099DownloadData: VendorFiling1099DownloadData;
|
|
17
15
|
lastRefreshSuccessTime?: ZeniDate;
|
|
18
16
|
}
|
|
19
17
|
export interface VendorFiling1099ListQuery {
|