@zeniai/client-epic-state 5.0.90-betaAS10 → 5.0.90-betaAS2
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 +4 -25
- package/lib/esm/index.js +1 -4
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.js +3 -7
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.js +41 -33
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.js +7 -2
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationFieldConstants.js +0 -8
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.js +1 -9
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.js +0 -3
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.js +7 -20
- package/lib/index.d.ts +1 -4
- package/lib/index.js +7 -15
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.d.ts +3 -3
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.js +2 -6
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.d.ts +1 -2
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.js +40 -32
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.js +7 -2
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationFieldConstants.d.ts +0 -3
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationFieldConstants.js +1 -9
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.d.ts +1 -2
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.js +1 -10
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.js +0 -3
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.js +7 -20
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState.d.ts +1 -4
- package/package.json +1 -1
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireOnboardingDetailsToLocalData.js +0 -146
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationLocalDataHelpers.js +0 -86
- package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSubmitPayload.js +0 -154
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireOnboardingDetailsToLocalData.d.ts +0 -4
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireOnboardingDetailsToLocalData.js +0 -150
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationLocalDataHelpers.d.ts +0 -27
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationLocalDataHelpers.js +0 -96
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSubmitPayload.d.ts +0 -32
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSubmitPayload.js +0 -159
|
@@ -10,31 +10,10 @@ export interface AllowedValueWithCodeOptionalPayload {
|
|
|
10
10
|
export declare function isAllowedValueWithCodePayload(allowedValueWithCodePayload: any): allowedValueWithCodePayload is AllowedValueWithCodePayload;
|
|
11
11
|
export declare function isAllowedValueWithCodeOptionalPayload(allowedValueWithCodePayload: any): allowedValueWithCodePayload is AllowedValueWithCodeOptionalPayload;
|
|
12
12
|
export declare function toAllowedValueWithCode(allowedValueWithCodePayload: AllowedValueWithCodePayload): AllowedValueWithCode;
|
|
13
|
-
export interface LabelValueCodeDescriptionPayload {
|
|
14
|
-
code: string;
|
|
15
|
-
description: string;
|
|
16
|
-
}
|
|
17
|
-
export interface LabelValueFileOptionPayload {
|
|
18
|
-
file_id: string;
|
|
19
|
-
option?: string;
|
|
20
|
-
}
|
|
21
|
-
export interface LabelValuePersonNamePayload {
|
|
22
|
-
first_name?: string;
|
|
23
|
-
last_name?: string;
|
|
24
|
-
}
|
|
25
|
-
export interface LabelValuePersonPayload {
|
|
26
|
-
company_role?: string;
|
|
27
|
-
date_of_birth?: string;
|
|
28
|
-
email?: string;
|
|
29
|
-
name?: LabelValuePersonNamePayload;
|
|
30
|
-
nationality?: string;
|
|
31
|
-
ownership_percentage?: number;
|
|
32
|
-
proof_of_address?: LabelValueFileOptionPayload[];
|
|
33
|
-
proof_of_identity?: LabelValueFileOptionPayload[];
|
|
34
|
-
ssn?: string;
|
|
35
|
-
}
|
|
36
|
-
export type LabelValueCodesValuesPayload = string | string[] | LabelValueCodeDescriptionPayload | LabelValueCodeDescriptionPayload[] | LabelValueFileOptionPayload | LabelValueFileOptionPayload[] | LabelValuePersonPayload | LabelValuePersonPayload[];
|
|
37
13
|
export interface LabelValueCodesPayload {
|
|
38
14
|
label: string;
|
|
39
|
-
values:
|
|
15
|
+
values: {
|
|
16
|
+
code: string;
|
|
17
|
+
description: string;
|
|
18
|
+
}[] | string[];
|
|
40
19
|
}
|
package/lib/esm/index.js
CHANGED
|
@@ -385,8 +385,8 @@ import { getAllTopExpenses, getTop6Expenses, getTopExpenses, } from './view/topE
|
|
|
385
385
|
*/
|
|
386
386
|
import { TOP_EX_TIME_PERIODS, } from './view/topEx/topExState';
|
|
387
387
|
import { getAccountingProviderAttachment, } from './view/transactionDetail/getAccountingProviderAttachmentSelector';
|
|
388
|
-
import { JOURNAL_ENTRY_SORT_KEYS, filterJournalEntryLinesExcludingLinked, journalEntryDefaultSortConfig, journalEntryTotalsByPostingSide, sortJournalEntryLines, sumJournalEntryAmounts, toJournalEntrySortKey, } from './view/transactionDetail/journalEntryLinesViewModel';
|
|
389
388
|
import { getChangedLineItemCountFromLocalData, isAccountUncategorized, } from './view/transactionDetail/transactionDetailLocalDataHelper';
|
|
389
|
+
import { JOURNAL_ENTRY_SORT_KEYS, filterJournalEntryLinesExcludingLinked, journalEntryDefaultSortConfig, journalEntryTotalsByPostingSide, sortJournalEntryLines, sumJournalEntryAmounts, toJournalEntrySortKey, } from './view/transactionDetail/journalEntryLinesViewModel';
|
|
390
390
|
import { clearTransactionDetailSaveStatus, deleteTransactionAttachment, downloadAccountingProviderAttachment, downloadAccountingProviderAttachmentFailure, downloadAccountingProviderAttachmentSuccess, fetchTransactionDetail, initializeTransactionDetailLocalData, markCategoryClassRecommendationsFailureForTransactionDetail, removeEntityRecommendationForLineIdForTransactionDetail, resetAllLineItemsToVendor, resetLineItemsCategoryClassInLocalData, resetSelectedCustomer, resetVendor, saveTransactionDetail, saveTransactionDetailLocalData, setAllLineItemsLocalDataIsUpdateAllChecked, setAllLineItemsToCategoryClassInLocalData, setIsVendorUpdateAllChecked, updateLatestSelectedEntity, updateLocalDataWithTransactionsUpdateWithVendorCheckbox, updateSelectedCustomer, updateSelectedVendor, updateTransactionDetail, updateVendorBulkRecommendationsFetchStatus, updateVendorToAllLineItems, uploadMissingAttachmentSuccess, } from './view/transactionDetail/transactionDetailReducer';
|
|
391
391
|
import { getInitialUpdatablePeriodsForTransactionRecommendations, getTransactionDetail, getTransactionDetailForTransaction, } from './view/transactionDetail/transactionDetailSelector';
|
|
392
392
|
import { getThirdPartyIdFromTransactionId, } from './view/transactionDetail/transactionDetailState';
|
|
@@ -638,9 +638,6 @@ export { ALL_WEEK_DAYS, SEMI_WEEKLY_REQUIRED_DAYS_COUNT, getMinAllowedEndDate, g
|
|
|
638
638
|
export { fetchCompanyTaskManagerView, fetchTaskManagerMetrics, getCompanyTaskManagerView, createTaskFromTaskGroupTemplate, };
|
|
639
639
|
export { InternationalWireVerificationFormOrder, sortVerificationFormFields, fetchInternationalVerificationForm, submitInternationalVerificationForm, updateVerificationFormLocalData, getIntlWireVerificationView, };
|
|
640
640
|
export { InternationalWireVerificationBooleanWithSubfieldsFieldNameList, InternationalWireVerificationBooleanWithSubfieldsFieldNames, InternationalWireVerificationControllingPersonFieldName, InternationalWireVerificationFormFieldNames, InternationalWireVerificationStakeHolderFieldName, InternationalWireVerificationSubfieldNames, } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationFieldConstants';
|
|
641
|
-
export { IntlWireVerificationLocalDataSuffix, toIntlWireVerificationFormDetails, toIntlWireVerificationSubmitPayload, } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSubmitPayload';
|
|
642
|
-
export { getStakeHolderOwnerIndicesFromLocalData, } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationLocalDataHelpers';
|
|
643
|
-
export { toVerificationFormLocalDataFromOnboardingDetails, } from './view/spendManagement/billPay/internationalWireVerification/internationalWireOnboardingDetailsToLocalData';
|
|
644
641
|
export { fetchExpressPayInitialDetails, updateExpressPayFormLocalData, submitExpressPay, resetExpressPayLocalData, getExpressPayView, };
|
|
645
642
|
export { acceptTreasuryTerms, fetchTreasurySetupView, clearTreasurySetupView, fetchTreasuryFunds, updatePortfolioAllocation, fetchPortfolioAllocation, updateFundAllocationLocalData, updateTreasuryPromoIntroClosedByOutsideClick, updateTreasuryPromoRemindMeLaterClicked, updateTreasuryVideoViewed, getTreasurySetupViewDetails, getTreasuryFundsMaximumYield, };
|
|
646
643
|
// ── AI Accountant Entity ──
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { from, of } from 'rxjs';
|
|
2
2
|
import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
|
|
3
3
|
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../../responsePayload';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
export const fetchIntlVerificationFormEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchInternationalVerificationForm.match), switchMap((action) => {
|
|
4
|
+
import { fetchInternationalVerificationForm, initializeIntlVerificationForm, updateInternationalVerificationForm, updateVerificationFormFailure, } from '../internationalWireVerificationReducer';
|
|
5
|
+
export const fetchIntlVerificationFormEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchInternationalVerificationForm.match), switchMap((action) => {
|
|
7
6
|
const query = {
|
|
8
7
|
region: 'US',
|
|
9
8
|
legal_type: 'BUSINESS',
|
|
@@ -12,14 +11,11 @@ export const fetchIntlVerificationFormEpic = (actions$, state$, zeniAPI) => acti
|
|
|
12
11
|
.getJSON(`${zeniAPI.apiEndPoints.payMicroServiceBaseUrl}/1.0/international-wire/onboarding-fields?query=${encodeURIComponent(JSON.stringify(query))}`)
|
|
13
12
|
.pipe(mergeMap((response) => {
|
|
14
13
|
if (isSuccessResponse(response) && response.data != null) {
|
|
15
|
-
const onboardingDataFromCompanyInfo = state$.value.companyState.companiesById[action.payload.companyId]
|
|
16
|
-
?.companyBillPayInfo?.internationalWireOnboardingDetails;
|
|
17
|
-
const localData = toVerificationFormLocalDataFromOnboardingDetails(onboardingDataFromCompanyInfo, response.data.labels);
|
|
18
14
|
return from([
|
|
19
15
|
updateInternationalVerificationForm({
|
|
20
16
|
internationalWireFormPayload: response.data.labels,
|
|
21
17
|
}),
|
|
22
|
-
|
|
18
|
+
initializeIntlVerificationForm(action.payload.companyId, response.data.labels),
|
|
23
19
|
]);
|
|
24
20
|
}
|
|
25
21
|
else {
|
|
@@ -1,38 +1,46 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { from } from 'rxjs';
|
|
2
2
|
import { filter, mergeMap } from 'rxjs/operators';
|
|
3
|
-
import { getCurrentTenant } from '../../../../../entity/tenant/tenantSelector';
|
|
4
|
-
import { fetchBillPaySetupViewSuccess } from '../../billPaySetupView/billPaySetupViewReducer';
|
|
5
|
-
import { toVerificationFormLocalDataFromOnboardingDetails } from '../internationalWireOnboardingDetailsToLocalData';
|
|
6
3
|
import { initializeIntlVerificationForm, updateVerificationFormLocalData, } from '../internationalWireVerificationReducer';
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
fetchBillPaySetupViewSuccess.match(action)), mergeMap((action) => {
|
|
4
|
+
export const initializeIntlVerificationFormEpic = (actions$, state$) => actions$.pipe(filter(initializeIntlVerificationForm.match), mergeMap((action) => {
|
|
5
|
+
const { companyId, internationalWireFormPayload } = action.payload;
|
|
6
|
+
const actions = [];
|
|
11
7
|
const state = state$.value;
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
8
|
+
const onboardingDataFromCompanyInfo = state.companyState.companiesById[companyId].companyBillPayInfo
|
|
9
|
+
.internationalWireOnboardingDetails;
|
|
10
|
+
const localData = {};
|
|
11
|
+
Object.keys(internationalWireFormPayload).forEach((formFieldKey) => {
|
|
12
|
+
const values = onboardingDataFromCompanyInfo != null
|
|
13
|
+
? onboardingDataFromCompanyInfo[formFieldKey]?.values
|
|
14
|
+
: undefined;
|
|
15
|
+
if (values != null) {
|
|
16
|
+
const fieldPayload = internationalWireFormPayload[formFieldKey];
|
|
17
|
+
if (fieldPayload.type === 'enum') {
|
|
18
|
+
localData[formFieldKey] =
|
|
19
|
+
fieldPayload.is_multiple_values_allowed === false
|
|
20
|
+
? typeof values[0] === 'object' && 'code' in values[0]
|
|
21
|
+
? values[0].code
|
|
22
|
+
: ''
|
|
23
|
+
: values.map((value) => typeof value === 'object' && 'code' in value
|
|
24
|
+
? value.code
|
|
25
|
+
: '');
|
|
26
|
+
}
|
|
27
|
+
else if (fieldPayload.type === 'file' &&
|
|
28
|
+
fieldPayload.is_multiple_values_allowed === true) {
|
|
29
|
+
localData[formFieldKey] = values.filter((value) => typeof value === 'string');
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
localData[formFieldKey] = values[0] ?? '';
|
|
33
|
+
}
|
|
30
34
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
else {
|
|
36
|
+
localData[formFieldKey] =
|
|
37
|
+
internationalWireFormPayload[formFieldKey].type === 'enum' &&
|
|
38
|
+
internationalWireFormPayload[formFieldKey]
|
|
39
|
+
.is_multiple_values_allowed === true
|
|
40
|
+
? []
|
|
41
|
+
: '';
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
actions.push(updateVerificationFormLocalData(localData));
|
|
45
|
+
return from(actions);
|
|
38
46
|
}));
|
|
@@ -3,7 +3,6 @@ import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
|
|
|
3
3
|
import { updateInternationalWireOnboardingStatus } from '../../../../../entity/company/companyReducer';
|
|
4
4
|
import { openSnackbar } from '../../../../../entity/snackbar/snackbarReducer';
|
|
5
5
|
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../../responsePayload';
|
|
6
|
-
import { toIntlWireVerificationSubmitPayload } from '../internationalWireVerificationSubmitPayload';
|
|
7
6
|
import { submitInternationalVerificationForm, updateVerificationFormSubmissionStatus, } from '../internationalWireVerificationReducer';
|
|
8
7
|
export const submitIntlVerificationEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(submitInternationalVerificationForm.match), switchMap((action) => {
|
|
9
8
|
const { internationalWireVerificationState } = state$.value;
|
|
@@ -11,7 +10,7 @@ export const submitIntlVerificationEpic = (actions$, state$, zeniAPI) => actions
|
|
|
11
10
|
const localData = internationalWireVerificationState.verificationFormLocalData;
|
|
12
11
|
if (localData != null) {
|
|
13
12
|
return zeniAPI
|
|
14
|
-
.postAndGetJSON(`${zeniAPI.apiEndPoints.payMicroServiceBaseUrl}/1.0/international-wire/onboarding`,
|
|
13
|
+
.postAndGetJSON(`${zeniAPI.apiEndPoints.payMicroServiceBaseUrl}/1.0/international-wire/onboarding`, toIntlWireVerificationPayload(localData))
|
|
15
14
|
.pipe(mergeMap((response) => {
|
|
16
15
|
const actions = [];
|
|
17
16
|
if (isSuccessResponse(response) && response.data != null) {
|
|
@@ -55,3 +54,9 @@ export const submitIntlVerificationEpic = (actions$, state$, zeniAPI) => actions
|
|
|
55
54
|
return from([]);
|
|
56
55
|
}
|
|
57
56
|
}));
|
|
57
|
+
const toIntlWireVerificationPayload = (localData) => {
|
|
58
|
+
return {
|
|
59
|
+
is_applicant_declaration: true,
|
|
60
|
+
form_details: localData,
|
|
61
|
+
};
|
|
62
|
+
};
|
|
@@ -30,11 +30,3 @@ export const InternationalWireVerificationSubfieldNames = {
|
|
|
30
30
|
proofOfAddress: 'proof_of_address',
|
|
31
31
|
ssn: 'ssn',
|
|
32
32
|
};
|
|
33
|
-
export const InternationalWireVerificationReadonlyHideableFieldNames = [
|
|
34
|
-
InternationalWireVerificationFormFieldNames.stakeHolder,
|
|
35
|
-
InternationalWireVerificationFormFieldNames.controllingPerson,
|
|
36
|
-
InternationalWireVerificationFormFieldNames.businessOwnership,
|
|
37
|
-
InternationalWireVerificationFormFieldNames.companyProofOfAddress,
|
|
38
|
-
InternationalWireVerificationFormFieldNames.companyOfficerProofOfAddress,
|
|
39
|
-
];
|
|
40
|
-
export const InternationalWireVerificationReadonlyVisibilityGateFieldName = InternationalWireVerificationFormFieldNames.businessOwnership;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { hasBusinessOwnershipValueInLocalData } from './internationalWireVerificationLocalDataHelpers';
|
|
1
|
+
import { InternationalWireVerificationFormFieldNames } from './internationalWireVerificationFieldConstants';
|
|
3
2
|
export const InternationalWireVerificationFormOrder = [
|
|
4
3
|
InternationalWireVerificationFormFieldNames.certificateOfGoodStanding,
|
|
5
4
|
InternationalWireVerificationFormFieldNames.businessOwnership,
|
|
@@ -41,13 +40,6 @@ export const toDynamicFormField = (key, payload) => ({
|
|
|
41
40
|
]))
|
|
42
41
|
: undefined,
|
|
43
42
|
});
|
|
44
|
-
const readonlyHideableVerificationFormFieldNames = new Set(InternationalWireVerificationReadonlyHideableFieldNames);
|
|
45
|
-
export const filterVerificationFormFieldsForReadonlyView = (fields, localData, isReadonly) => {
|
|
46
|
-
if (!isReadonly || hasBusinessOwnershipValueInLocalData(localData)) {
|
|
47
|
-
return fields;
|
|
48
|
-
}
|
|
49
|
-
return fields.filter((field) => !readonlyHideableVerificationFormFieldNames.has(field.name));
|
|
50
|
-
};
|
|
51
43
|
export const sortVerificationFormFields = (fields) => {
|
|
52
44
|
const orderIndex = new Map(InternationalWireVerificationFormOrder.map((name, index) => [name, index]));
|
|
53
45
|
return fields.slice().sort((a, b) => {
|
|
@@ -4,7 +4,6 @@ export const initialState = {
|
|
|
4
4
|
verificationFormFetchState: {
|
|
5
5
|
fetchState: 'Not-Started',
|
|
6
6
|
},
|
|
7
|
-
verificationFormFieldLabels: {},
|
|
8
7
|
verificationFormFields: [],
|
|
9
8
|
verificationFormLocalData: {},
|
|
10
9
|
verificationFormSubmitState: {
|
|
@@ -32,7 +31,6 @@ const internationalWireVerification = createSlice({
|
|
|
32
31
|
},
|
|
33
32
|
updateInternationalVerificationForm(draft, action) {
|
|
34
33
|
const { internationalWireFormPayload } = action.payload;
|
|
35
|
-
draft.verificationFormFieldLabels = internationalWireFormPayload;
|
|
36
34
|
draft.verificationFormFields = toVerificationFormFields(internationalWireFormPayload);
|
|
37
35
|
draft.verificationFormFetchState.fetchState = 'Completed';
|
|
38
36
|
},
|
|
@@ -43,7 +41,6 @@ const internationalWireVerification = createSlice({
|
|
|
43
41
|
},
|
|
44
42
|
updateVerificationFormLocalData(draft, action) {
|
|
45
43
|
draft.verificationFormLocalData = {
|
|
46
|
-
...draft.verificationFormLocalData,
|
|
47
44
|
...action.payload,
|
|
48
45
|
};
|
|
49
46
|
},
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { getCompanyByCompanyId } from '../../../../entity/company/companySelector';
|
|
2
1
|
import { getFilesByFileIds } from '../../../../entity/file/fileSelector';
|
|
3
|
-
import { getCurrentTenant } from '../../../../entity/tenant/tenantSelector';
|
|
4
2
|
import { getFileDeleteStatusById, getFileUpdateNameStatusById, } from '../../../fileView/fileViewSelector';
|
|
5
|
-
import { filterVerificationFormFieldsForReadonlyView } from './internationalWireVerificationPayload';
|
|
6
3
|
const collectFileIdsFromLocalData = (localData) => {
|
|
7
4
|
const fileIds = new Set();
|
|
8
5
|
Object.values(localData).forEach((value) => {
|
|
@@ -23,28 +20,18 @@ const collectFileIdsFromLocalData = (localData) => {
|
|
|
23
20
|
export const getIntlWireVerificationView = (state) => {
|
|
24
21
|
const deleteFileStatusById = {};
|
|
25
22
|
const updateFileStatusById = {};
|
|
26
|
-
const
|
|
27
|
-
const fileIds = collectFileIdsFromLocalData(verificationFormLocalData);
|
|
23
|
+
const fileIds = collectFileIdsFromLocalData(state.internationalWireVerificationState.verificationFormLocalData);
|
|
28
24
|
fileIds.forEach((fileId) => {
|
|
29
25
|
deleteFileStatusById[fileId] = getFileDeleteStatusById(state, fileId);
|
|
30
26
|
updateFileStatusById[fileId] = getFileUpdateNameStatusById(state, fileId);
|
|
31
27
|
});
|
|
32
|
-
const userFiles = fileIds.length > 0
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
?.company
|
|
38
|
-
: undefined;
|
|
39
|
-
const onboardingStatusCode = company?.companyBillPayInfo?.internationalWireOnboardingStatus?.code;
|
|
40
|
-
const isReadonly = onboardingStatusCode != null &&
|
|
41
|
-
onboardingStatusCode !== 'onboarding_status_not_started';
|
|
42
|
-
const visibleVerificationFormFields = filterVerificationFormFieldsForReadonlyView(verificationFormFields, verificationFormLocalData, isReadonly);
|
|
28
|
+
const userFiles = fileIds.length > 0
|
|
29
|
+
? getFilesByFileIds(state.fileState, fileIds)
|
|
30
|
+
: [];
|
|
31
|
+
const fetchState = state.internationalWireVerificationState.verificationFormFetchState
|
|
32
|
+
.fetchState;
|
|
43
33
|
return {
|
|
44
|
-
|
|
45
|
-
verificationFormFields: visibleVerificationFormFields,
|
|
46
|
-
verificationFormLocalData,
|
|
47
|
-
verificationFormSubmitState,
|
|
34
|
+
...state.internationalWireVerificationState,
|
|
48
35
|
deleteFileStatusById,
|
|
49
36
|
updateFileStatusById,
|
|
50
37
|
userFiles,
|
package/lib/index.d.ts
CHANGED
|
@@ -571,8 +571,8 @@ import { TopExAccount, TopExReport, TopExTimePeriodWithMetaData, TopExpenses } f
|
|
|
571
571
|
*/
|
|
572
572
|
import { TOP_EX_TIME_PERIODS, TopExTimePeriod, TopExpense } from './view/topEx/topExState';
|
|
573
573
|
import { AccountingProviderAttachmentSelector, getAccountingProviderAttachment } from './view/transactionDetail/getAccountingProviderAttachmentSelector';
|
|
574
|
-
import { JOURNAL_ENTRY_SORT_KEYS, JournalEntryRowSortConfig, JournalEntrySortAccessors, JournalEntrySortKey, filterJournalEntryLinesExcludingLinked, journalEntryDefaultSortConfig, journalEntryTotalsByPostingSide, sortJournalEntryLines, sumJournalEntryAmounts, toJournalEntrySortKey } from './view/transactionDetail/journalEntryLinesViewModel';
|
|
575
574
|
import { getChangedLineItemCountFromLocalData, isAccountUncategorized } from './view/transactionDetail/transactionDetailLocalDataHelper';
|
|
575
|
+
import { JOURNAL_ENTRY_SORT_KEYS, JournalEntryRowSortConfig, JournalEntrySortAccessors, JournalEntrySortKey, filterJournalEntryLinesExcludingLinked, journalEntryDefaultSortConfig, journalEntryTotalsByPostingSide, sortJournalEntryLines, sumJournalEntryAmounts, toJournalEntrySortKey } from './view/transactionDetail/journalEntryLinesViewModel';
|
|
576
576
|
import { clearTransactionDetailSaveStatus, deleteTransactionAttachment, downloadAccountingProviderAttachment, downloadAccountingProviderAttachmentFailure, downloadAccountingProviderAttachmentSuccess, fetchTransactionDetail, initializeTransactionDetailLocalData, markCategoryClassRecommendationsFailureForTransactionDetail, removeEntityRecommendationForLineIdForTransactionDetail, resetAllLineItemsToVendor, resetLineItemsCategoryClassInLocalData, resetSelectedCustomer, resetVendor, saveTransactionDetail, saveTransactionDetailLocalData, setAllLineItemsLocalDataIsUpdateAllChecked, setAllLineItemsToCategoryClassInLocalData, setIsVendorUpdateAllChecked, updateLatestSelectedEntity, updateLocalDataWithTransactionsUpdateWithVendorCheckbox, updateSelectedCustomer, updateSelectedVendor, updateTransactionDetail, updateVendorBulkRecommendationsFetchStatus, updateVendorToAllLineItems, uploadMissingAttachmentSuccess } from './view/transactionDetail/transactionDetailReducer';
|
|
577
577
|
import { TransactionDetailReport, VendorDetailsView, getInitialUpdatablePeriodsForTransactionRecommendations, getTransactionDetail, getTransactionDetailForTransaction } from './view/transactionDetail/transactionDetailSelector';
|
|
578
578
|
import { TransactionUpdates, getThirdPartyIdFromTransactionId } from './view/transactionDetail/transactionDetailState';
|
|
@@ -899,9 +899,6 @@ export { fetchCompanyTaskManagerView, fetchTaskManagerMetrics, CompanyTaskManage
|
|
|
899
899
|
export { Country };
|
|
900
900
|
export { InternationalWireVerificationState, VerificationFormField, VerificationFormFieldOption, VerificationFormLocalData, VerificationFormSubField, FieldValueType, InternationalWireVerificationFormOrder, sortVerificationFormFields, fetchInternationalVerificationForm, submitInternationalVerificationForm, updateVerificationFormLocalData, getIntlWireVerificationView, InternationalWireVerificationView, };
|
|
901
901
|
export { InternationalWireVerificationBooleanWithSubfieldsFieldNameList, InternationalWireVerificationBooleanWithSubfieldsFieldNames, InternationalWireVerificationControllingPersonFieldName, InternationalWireVerificationFormFieldNames, InternationalWireVerificationStakeHolderFieldName, InternationalWireVerificationSubfieldNames, } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationFieldConstants';
|
|
902
|
-
export { IntlWireVerificationLocalDataSuffix, toIntlWireVerificationFormDetails, toIntlWireVerificationSubmitPayload, } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSubmitPayload';
|
|
903
|
-
export { getStakeHolderOwnerIndicesFromLocalData, } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationLocalDataHelpers';
|
|
904
|
-
export { toVerificationFormLocalDataFromOnboardingDetails, } from './view/spendManagement/billPay/internationalWireVerification/internationalWireOnboardingDetailsToLocalData';
|
|
905
902
|
export type { InternationalWireVerificationBooleanWithSubfieldsFieldName, InternationalWireVerificationFormFieldName, InternationalWireVerificationSubfieldName, } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationFieldConstants';
|
|
906
903
|
export { fetchExpressPayInitialDetails, updateExpressPayFormLocalData, submitExpressPay, resetExpressPayLocalData, ExpressPayFormLocalData, ExpressPayView, getExpressPayView, };
|
|
907
904
|
export { acceptTreasuryTerms, fetchTreasurySetupView, clearTreasurySetupView, fetchTreasuryFunds, updatePortfolioAllocation, fetchPortfolioAllocation, updateFundAllocationLocalData, updateTreasuryPromoIntroClosedByOutsideClick, updateTreasuryPromoRemindMeLaterClicked, updateTreasuryVideoViewed, FundAllocationOption, FundComposition, FundData, TreasurySetupView, getTreasurySetupViewDetails, getTreasuryFundsMaximumYield, };
|
package/lib/index.js
CHANGED
|
@@ -69,10 +69,10 @@ exports.getDefaultSelectedTimeframeForScheduleType = exports.getFetchStateForSch
|
|
|
69
69
|
exports.getTaskDetail = exports.fetchTaskListPage = exports.getAllTasks = exports.getTaskGroupById = exports.toRecurringBillFrequencyStrict = exports.toRecurringBillFrequency = exports.updateArAgingNodeCollapseState = exports.getArAgingDetailForCustomer = exports.getArAgingReport = exports.updateArAgingDetailUIState = exports.fetchArAgingDetail = exports.updateArAgingUIState = exports.fetchArAging = exports.updateVendorGlobalReviewViewLocalData = exports.toVendorGlobalReviewColumnSortKeyType = exports.getTenantMerchantByMerchantId = exports.getVendorGlobalReviewView = exports.updateVendorGlobalReviewViewUIState = exports.updateSelectedGlobalMerchant = exports.fetchVendorGlobalReviewView = exports.rejectVendorGlobalReview = exports.approveVendorGlobalReview = exports.getGlobalMerchantView = exports.clearGlobalMerchantView = exports.updateCreateGlobalMerchantLocalData = exports.createGlobalMerchant = exports.fetchGlobalMerchantRecommendation = exports.getVendorDetailSelectorView = exports.saveVendorDetailsView = exports.updateReviewVendorDetailLocalData = exports.clearGlobalMerchantAutoCompleteResults = exports.fetchGlobalMerchantAutoCompleteView = exports.updateVendorFirstReviewSortUiState = exports.updateVendorFirstReviewViewLocalData = exports.saveVendorFirstReviewView = exports.clearRecentlySavedErroredVendorData = exports.updateVendorFirstReviewViewPageToken = exports.resetVendorFirstReviewLocalData = exports.updateVendorFirstReviewViewScrollYOffset = exports.fetchVendorFirstReviewAttachments = exports.fetchVendorFirstReviewView = exports.getVendorFirstReviewAttachmentView = exports.getVendorFirstReviewView = exports.getGlobalMerchantAutoCompleteResults = exports.toVendorFirstReviewViewColumnKeyType = exports.getVendorTabView = exports.updateVendorTabViewTab = exports.fetchVendorTabView = exports.resetMarkAsCompleteStatus = exports.markAsCompleteScheduleDetail = void 0;
|
|
70
70
|
exports.fetchPaymentSources = exports.addCardPaymentSource = exports.confirmCardSetupIntent = exports.createCardSetupIntent = exports.getAllCardsAndBankPaymentMethods = exports.deleteTag = exports.createTag = exports.fetchTagList = exports.getAllTags = exports.ALL_TASK_LIST_TABS = exports.initialTaskDetailLocalData = exports.convertHHMMStrToMinutes = exports.unsnoozeTask = exports.snoozeTask = exports.removeTaskFromList = exports.updateTaskListTab = exports.updateTaskFromListView = exports.toDueDateGroupKeyType = exports.toTaskStatusCodeType = exports.toPriorityCodeType = exports.getDueDateValueFromDueDateGroupId = exports.initialTaskDetail = exports.fetchAllTaskGroups = exports.getTaskUpdates = exports.toTaskListGroupByKeyTypeStrict = exports.toTaskListGroupByKeyType = exports.updateTaskGroupName = exports.dragNDropTasks = exports.updateTaskListLocalData = exports.deleteTaskGroup = exports.initiateTaskListLocalData = exports.createNewTaskGroup = exports.bulkUpdateTaskList = exports.discardTaskUpdatesInLocalStore = exports.deleteTask = exports.TASK_LIST_GROUP_BY_CATEGORIES = exports.TASK_LIST_FILTER_CATEGORIES = exports.updateTaskFilters = exports.allTaskPriority = exports.allTaskStatus = exports.updateTaskListUIState = exports.updateTaskListSearchText = exports.getCannedResponsesView = exports.deleteCannedResponse = exports.saveCannedResponse = exports.fetchCannedResponses = exports.archiveTask = exports.saveTaskDetail = exports.saveTaskUpdatesToLocalStore = exports.fetchTaskDetailPage = void 0;
|
|
71
71
|
exports.getInviteFormView = exports.getReferralListView = exports.getNotifications = exports.getLastNotificationTime = exports.pushToastNotification = exports.isFeatureInterestRegistered = exports.getRegisteredInterestsByFeature = exports.getRegisteredInterests = exports.getFeatureNotificationView = exports.notifyMeForFeature = exports.fetchRegisteredInterests = exports.clearFeatureNotificationView = exports.getNotificationsForSelectedSubTab = exports.getExternalNotificationsForSelectedSubTab = exports.getNotificationView = exports.updateNotificationViewUIState = exports.updateNotificationViewSubTab = exports.updateNotificationViewCurrentTabAndSubTab = exports.updateNotificationViewTabState = exports.updateNotificationViewNotificationStatus = exports.updateNotificationViewAllNotificationsStatus = exports.fetchNotificationUnreadCountSuccess = exports.fetchNotificationUnreadCount = exports.fetchNotificationView = exports.toNotificationTabTypeStrict = exports.toNotificationSubTabTypeStrict = exports.updateCommentsNotificationsStatuses = exports.updateCommentsNotifications = exports.toNotificationModeStrict = exports.parseOAuthParams = exports.getZeniOAuthApproveRedirectUrl = exports.getZeniOAuthApproveFetchState = exports.getZeniOAuthApproveError = exports.clearZeniOAuthView = exports.approveOAuthConsentSuccess = exports.approveOAuthConsentFailure = exports.approveOAuthConsent = exports.fetchZeniAccountsPromoCard = exports.getZeniAccountsPromoCard = exports.getAuthenticationView = exports.fetchCollaborationAuthToken = exports.clearAuditReportGroupViewByCompanyId = exports.saveReasonForAuditRule = exports.fetchAuditReportGroupView = exports.fetchAuditRuleGroupView = exports.getUserFromAllUsers = exports.getAuditRuleGroupViewSelectorView = exports.getAuditReportGroupViewSelectorView = exports.clearCardPaymentView = exports.resetCardPaymentErrorStatuses = void 0;
|
|
72
|
-
exports.
|
|
73
|
-
exports.applyAiCfoSidePanelHostPageTransition = exports.fetchSuggestedQuestionsFailure = exports.fetchSuggestedQuestionsSuccess = exports.fetchSuggestedQuestions = exports.updateResponseState = exports.deleteChatSession = exports.acceptMasterTOS = exports.fetchChatHistory = exports.stopSubmitQuestion = exports.stopSubmit = exports.createSessionAndSubmit = exports.clearLastContextMessage = exports.clearDeleteChatSessionStatus = exports.clearCurrentSessionId = exports.clearAiCfoView = exports.setSession = exports.clearInput = exports.updateCotCollapsedState = exports.updateCurrentInput = exports.updateAiCfoViewScrollPosition = exports.submitQuestion = exports.createSession = exports.fetchChatSessionsForUser = exports.getAiAccountantCockpitView = exports.updateAiAccountantUIState = exports.triggerAiAccountantJob = exports.setSelectedTenantIdsForJobTrigger = exports.fetchAiAccountantJobs = exports.fetchAiAccountantCustomers = exports.clearAiAccountantView = exports.cancelAiAccountantOnboarding = exports.getAiAccountantJobsByTenantId = exports.getAiAccountantCustomers = exports.updateAiAccountantJobs = exports.updateAiAccountantCustomer = exports.updateAiAccountantCustomers = exports.clearAllAiAccountantCustomers = exports.toAiAccountantJob = exports.toAiAccountantEnrollment = exports.toAiAccountantCustomer = exports.toAiAccountantOperationType = exports.toAiAccountantJobStatus = exports.toAiAccountantEnrollmentStatus = exports.getAllowedOperationsForStatus = exports.getTreasuryFundsMaximumYield =
|
|
74
|
-
exports.getAutoTransferRules = exports.clearRuleUpdateLocalData = exports.updateRuleLocalData = exports.fetchAutoTransferReviewDetail = exports.fetchAutoTransferRuleHistory = exports.deleteAutoTransferRule = exports.updateAutoTransferRule = exports.createAutoTransferRule = exports.fetchAutoTransferRules = exports.getTreasuryTaxLetters = exports.fetchTreasuryTaxLetterList = exports.getTreasuryStatements = exports.fetchTreasuryStatementList = exports.getTreasuryTransferMoney = exports.clearTreasuryTransferMoney = exports.updateTreasuryTransferMoneyLocalData = exports.executeTreasuryTransferMoney = exports.getTreasuryDetail = exports.updateTreasuryTransactionListUIState = exports.fetchTreasuryTransactionList = exports.fetchTreasuryOverviewDetail = exports.toMessageType = exports.toMessageSender = exports.toAiCfoAnswerResponseTypeStrict = exports.toAiCfoAnswerResponseType = exports.toAiCfoAnswerStateTypeStrict = exports.toAiCfoAnswerStateType = exports.toAiCfoChartTypeStrict = exports.toAiCfoChartType = exports.toAiCfoVisualizationTypeStrict = exports.toAiCfoVisualizationType = exports.ALL_AI_CFO_ANSWER_RESPONSE_TYPES = exports.ALL_AI_CFO_ANSWER_STATE_TYPES = exports.ALL_AI_CFO_VISUALIZATION_TYPES = exports.ALL_AI_CFO_CHARTS_TYPES = exports.getAiCfoSelectorView = exports.getAllQuestionsForChatSession = exports.getQuestionAnswerByIdForChatSession = exports.getAllQuestionAnswersForChatSession = exports.toAiCfoVisualization = exports.clearAiCfo = exports.clearSession = exports.addQuestionPayload = exports.upsertOrAddQuestionAnswerPayload = exports.upsertAnswerPayload =
|
|
75
|
-
exports.DEFAULT_SESSION_CONFIG = exports.SessionManager = exports.getTransactionActivityLogView =
|
|
72
|
+
exports.getTreasurySetupViewDetails = exports.updateTreasuryVideoViewed = exports.updateTreasuryPromoRemindMeLaterClicked = exports.updateTreasuryPromoIntroClosedByOutsideClick = exports.updateFundAllocationLocalData = exports.fetchPortfolioAllocation = exports.updatePortfolioAllocation = exports.fetchTreasuryFunds = exports.clearTreasurySetupView = exports.fetchTreasurySetupView = exports.acceptTreasuryTerms = exports.getExpressPayView = exports.resetExpressPayLocalData = exports.submitExpressPay = exports.updateExpressPayFormLocalData = exports.fetchExpressPayInitialDetails = exports.InternationalWireVerificationSubfieldNames = exports.InternationalWireVerificationStakeHolderFieldName = exports.InternationalWireVerificationFormFieldNames = exports.InternationalWireVerificationControllingPersonFieldName = exports.InternationalWireVerificationBooleanWithSubfieldsFieldNames = exports.InternationalWireVerificationBooleanWithSubfieldsFieldNameList = exports.getIntlWireVerificationView = exports.updateVerificationFormLocalData = exports.submitInternationalVerificationForm = exports.fetchInternationalVerificationForm = exports.sortVerificationFormFields = exports.InternationalWireVerificationFormOrder = exports.createTaskFromTaskGroupTemplate = exports.getCompanyTaskManagerView = exports.fetchTaskManagerMetrics = exports.fetchCompanyTaskManagerView = exports.toRecurringFrequency = exports.toDayOfWeek = exports.getRecurringEndDateFromCount = exports.getMinAllowedEndDate = exports.SEMI_WEEKLY_REQUIRED_DAYS_COUNT = exports.ALL_WEEK_DAYS = exports.updateReferViewed = exports.getRewardsPlanCard = exports.fetchRewardsPlan = exports.resendReferralInvite = exports.updateReferralListSortUiState = exports.saveReferralFormDataInLocalStore = exports.clearReferrals = exports.sendReferralInvite = exports.fetchReferrals = exports.AmountStatusTypes = exports.StatusTypes = exports.toReferralListViewSortKeyType = void 0;
|
|
73
|
+
exports.setSessions = exports.setNewSession = exports.getSuggestedQuestionsForPageContext = exports.getAiCfoView = exports.clearAiCfoSidePanelHostPageContext = exports.applyAiCfoSidePanelHostPageTransition = exports.fetchSuggestedQuestionsFailure = exports.fetchSuggestedQuestionsSuccess = exports.fetchSuggestedQuestions = exports.updateResponseState = exports.deleteChatSession = exports.acceptMasterTOS = exports.fetchChatHistory = exports.stopSubmitQuestion = exports.stopSubmit = exports.createSessionAndSubmit = exports.clearLastContextMessage = exports.clearDeleteChatSessionStatus = exports.clearCurrentSessionId = exports.clearAiCfoView = exports.setSession = exports.clearInput = exports.updateCotCollapsedState = exports.updateCurrentInput = exports.updateAiCfoViewScrollPosition = exports.submitQuestion = exports.createSession = exports.fetchChatSessionsForUser = exports.getAiAccountantCockpitView = exports.updateAiAccountantUIState = exports.triggerAiAccountantJob = exports.setSelectedTenantIdsForJobTrigger = exports.fetchAiAccountantJobs = exports.fetchAiAccountantCustomers = exports.clearAiAccountantView = exports.cancelAiAccountantOnboarding = exports.getAiAccountantJobsByTenantId = exports.getAiAccountantCustomers = exports.updateAiAccountantJobs = exports.updateAiAccountantCustomer = exports.updateAiAccountantCustomers = exports.clearAllAiAccountantCustomers = exports.toAiAccountantJob = exports.toAiAccountantEnrollment = exports.toAiAccountantCustomer = exports.toAiAccountantOperationType = exports.toAiAccountantJobStatus = exports.toAiAccountantEnrollmentStatus = exports.getAllowedOperationsForStatus = exports.getTreasuryFundsMaximumYield = void 0;
|
|
74
|
+
exports.fetchTransactionActivityLog = exports.BULK_UPLOAD_BAR_COMPLETE_HOLD_MS = exports.BULK_UPLOAD_AUTOMATCHING_TIMEOUT_MS = exports.getAutoTransferRuleHistory = exports.getAutoTransferRuleById = exports.getAutoTransferRules = exports.clearRuleUpdateLocalData = exports.updateRuleLocalData = exports.fetchAutoTransferReviewDetail = exports.fetchAutoTransferRuleHistory = exports.deleteAutoTransferRule = exports.updateAutoTransferRule = exports.createAutoTransferRule = exports.fetchAutoTransferRules = exports.getTreasuryTaxLetters = exports.fetchTreasuryTaxLetterList = exports.getTreasuryStatements = exports.fetchTreasuryStatementList = exports.getTreasuryTransferMoney = exports.clearTreasuryTransferMoney = exports.updateTreasuryTransferMoneyLocalData = exports.executeTreasuryTransferMoney = exports.getTreasuryDetail = exports.updateTreasuryTransactionListUIState = exports.fetchTreasuryTransactionList = exports.fetchTreasuryOverviewDetail = exports.toMessageType = exports.toMessageSender = exports.toAiCfoAnswerResponseTypeStrict = exports.toAiCfoAnswerResponseType = exports.toAiCfoAnswerStateTypeStrict = exports.toAiCfoAnswerStateType = exports.toAiCfoChartTypeStrict = exports.toAiCfoChartType = exports.toAiCfoVisualizationTypeStrict = exports.toAiCfoVisualizationType = exports.ALL_AI_CFO_ANSWER_RESPONSE_TYPES = exports.ALL_AI_CFO_ANSWER_STATE_TYPES = exports.ALL_AI_CFO_VISUALIZATION_TYPES = exports.ALL_AI_CFO_CHARTS_TYPES = exports.getAiCfoSelectorView = exports.getAllQuestionsForChatSession = exports.getQuestionAnswerByIdForChatSession = exports.getAllQuestionAnswersForChatSession = exports.toAiCfoVisualization = exports.clearAiCfo = exports.clearSession = exports.addQuestionPayload = exports.upsertOrAddQuestionAnswerPayload = exports.upsertAnswerPayload = void 0;
|
|
75
|
+
exports.DEFAULT_SESSION_CONFIG = exports.SessionManager = exports.getTransactionActivityLogView = void 0;
|
|
76
76
|
const allowedValue_1 = require("./commonStateTypes/allowedValue");
|
|
77
77
|
Object.defineProperty(exports, "isAllowedValueWithCode", { enumerable: true, get: function () { return allowedValue_1.isAllowedValueWithCode; } });
|
|
78
78
|
Object.defineProperty(exports, "isAllowedValueWithID", { enumerable: true, get: function () { return allowedValue_1.isAllowedValueWithID; } });
|
|
@@ -1943,6 +1943,9 @@ const topExState_1 = require("./view/topEx/topExState");
|
|
|
1943
1943
|
Object.defineProperty(exports, "TOP_EX_TIME_PERIODS", { enumerable: true, get: function () { return topExState_1.TOP_EX_TIME_PERIODS; } });
|
|
1944
1944
|
const getAccountingProviderAttachmentSelector_1 = require("./view/transactionDetail/getAccountingProviderAttachmentSelector");
|
|
1945
1945
|
Object.defineProperty(exports, "getAccountingProviderAttachment", { enumerable: true, get: function () { return getAccountingProviderAttachmentSelector_1.getAccountingProviderAttachment; } });
|
|
1946
|
+
const transactionDetailLocalDataHelper_1 = require("./view/transactionDetail/transactionDetailLocalDataHelper");
|
|
1947
|
+
Object.defineProperty(exports, "getChangedLineItemCountFromLocalData", { enumerable: true, get: function () { return transactionDetailLocalDataHelper_1.getChangedLineItemCountFromLocalData; } });
|
|
1948
|
+
Object.defineProperty(exports, "isAccountUncategorized", { enumerable: true, get: function () { return transactionDetailLocalDataHelper_1.isAccountUncategorized; } });
|
|
1946
1949
|
const journalEntryLinesViewModel_1 = require("./view/transactionDetail/journalEntryLinesViewModel");
|
|
1947
1950
|
Object.defineProperty(exports, "JOURNAL_ENTRY_SORT_KEYS", { enumerable: true, get: function () { return journalEntryLinesViewModel_1.JOURNAL_ENTRY_SORT_KEYS; } });
|
|
1948
1951
|
Object.defineProperty(exports, "filterJournalEntryLinesExcludingLinked", { enumerable: true, get: function () { return journalEntryLinesViewModel_1.filterJournalEntryLinesExcludingLinked; } });
|
|
@@ -1951,9 +1954,6 @@ Object.defineProperty(exports, "journalEntryTotalsByPostingSide", { enumerable:
|
|
|
1951
1954
|
Object.defineProperty(exports, "sortJournalEntryLines", { enumerable: true, get: function () { return journalEntryLinesViewModel_1.sortJournalEntryLines; } });
|
|
1952
1955
|
Object.defineProperty(exports, "sumJournalEntryAmounts", { enumerable: true, get: function () { return journalEntryLinesViewModel_1.sumJournalEntryAmounts; } });
|
|
1953
1956
|
Object.defineProperty(exports, "toJournalEntrySortKey", { enumerable: true, get: function () { return journalEntryLinesViewModel_1.toJournalEntrySortKey; } });
|
|
1954
|
-
const transactionDetailLocalDataHelper_1 = require("./view/transactionDetail/transactionDetailLocalDataHelper");
|
|
1955
|
-
Object.defineProperty(exports, "getChangedLineItemCountFromLocalData", { enumerable: true, get: function () { return transactionDetailLocalDataHelper_1.getChangedLineItemCountFromLocalData; } });
|
|
1956
|
-
Object.defineProperty(exports, "isAccountUncategorized", { enumerable: true, get: function () { return transactionDetailLocalDataHelper_1.isAccountUncategorized; } });
|
|
1957
1957
|
const transactionDetailReducer_1 = require("./view/transactionDetail/transactionDetailReducer");
|
|
1958
1958
|
Object.defineProperty(exports, "clearTransactionDetailSaveStatus", { enumerable: true, get: function () { return transactionDetailReducer_1.clearTransactionDetailSaveStatus; } });
|
|
1959
1959
|
Object.defineProperty(exports, "deleteTransactionAttachment", { enumerable: true, get: function () { return transactionDetailReducer_1.deleteTransactionAttachment; } });
|
|
@@ -2224,14 +2224,6 @@ Object.defineProperty(exports, "InternationalWireVerificationControllingPersonFi
|
|
|
2224
2224
|
Object.defineProperty(exports, "InternationalWireVerificationFormFieldNames", { enumerable: true, get: function () { return internationalWireVerificationFieldConstants_1.InternationalWireVerificationFormFieldNames; } });
|
|
2225
2225
|
Object.defineProperty(exports, "InternationalWireVerificationStakeHolderFieldName", { enumerable: true, get: function () { return internationalWireVerificationFieldConstants_1.InternationalWireVerificationStakeHolderFieldName; } });
|
|
2226
2226
|
Object.defineProperty(exports, "InternationalWireVerificationSubfieldNames", { enumerable: true, get: function () { return internationalWireVerificationFieldConstants_1.InternationalWireVerificationSubfieldNames; } });
|
|
2227
|
-
var internationalWireVerificationSubmitPayload_1 = require("./view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSubmitPayload");
|
|
2228
|
-
Object.defineProperty(exports, "IntlWireVerificationLocalDataSuffix", { enumerable: true, get: function () { return internationalWireVerificationSubmitPayload_1.IntlWireVerificationLocalDataSuffix; } });
|
|
2229
|
-
Object.defineProperty(exports, "toIntlWireVerificationFormDetails", { enumerable: true, get: function () { return internationalWireVerificationSubmitPayload_1.toIntlWireVerificationFormDetails; } });
|
|
2230
|
-
Object.defineProperty(exports, "toIntlWireVerificationSubmitPayload", { enumerable: true, get: function () { return internationalWireVerificationSubmitPayload_1.toIntlWireVerificationSubmitPayload; } });
|
|
2231
|
-
var internationalWireVerificationLocalDataHelpers_1 = require("./view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationLocalDataHelpers");
|
|
2232
|
-
Object.defineProperty(exports, "getStakeHolderOwnerIndicesFromLocalData", { enumerable: true, get: function () { return internationalWireVerificationLocalDataHelpers_1.getStakeHolderOwnerIndicesFromLocalData; } });
|
|
2233
|
-
var internationalWireOnboardingDetailsToLocalData_1 = require("./view/spendManagement/billPay/internationalWireVerification/internationalWireOnboardingDetailsToLocalData");
|
|
2234
|
-
Object.defineProperty(exports, "toVerificationFormLocalDataFromOnboardingDetails", { enumerable: true, get: function () { return internationalWireOnboardingDetailsToLocalData_1.toVerificationFormLocalDataFromOnboardingDetails; } });
|
|
2235
2227
|
// ── AI Accountant Entity ──
|
|
2236
2228
|
var aiAccountantCustomerState_1 = require("./entity/aiAccountantCustomer/aiAccountantCustomerState");
|
|
2237
2229
|
Object.defineProperty(exports, "getAllowedOperationsForStatus", { enumerable: true, get: function () { return aiAccountantCustomerState_1.getAllowedOperationsForStatus; } });
|
|
@@ -2,6 +2,6 @@ import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { RootState } from '../../../../../reducer';
|
|
4
4
|
import { ZeniAPI } from '../../../../../zeniAPI';
|
|
5
|
-
import { fetchInternationalVerificationForm, updateInternationalVerificationForm, updateVerificationFormFailure
|
|
6
|
-
export type ActionType = ReturnType<typeof fetchInternationalVerificationForm> | ReturnType<typeof updateInternationalVerificationForm> | ReturnType<typeof updateVerificationFormFailure> | ReturnType<typeof
|
|
7
|
-
export declare const fetchIntlVerificationFormEpic: (actions$: ActionsObservable<ActionType>,
|
|
5
|
+
import { fetchInternationalVerificationForm, initializeIntlVerificationForm, updateInternationalVerificationForm, updateVerificationFormFailure } from '../internationalWireVerificationReducer';
|
|
6
|
+
export type ActionType = ReturnType<typeof fetchInternationalVerificationForm> | ReturnType<typeof updateInternationalVerificationForm> | ReturnType<typeof updateVerificationFormFailure> | ReturnType<typeof initializeIntlVerificationForm>;
|
|
7
|
+
export declare const fetchIntlVerificationFormEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -4,9 +4,8 @@ exports.fetchIntlVerificationFormEpic = void 0;
|
|
|
4
4
|
const rxjs_1 = require("rxjs");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
6
|
const responsePayload_1 = require("../../../../../responsePayload");
|
|
7
|
-
const internationalWireOnboardingDetailsToLocalData_1 = require("../internationalWireOnboardingDetailsToLocalData");
|
|
8
7
|
const internationalWireVerificationReducer_1 = require("../internationalWireVerificationReducer");
|
|
9
|
-
const fetchIntlVerificationFormEpic = (actions$,
|
|
8
|
+
const fetchIntlVerificationFormEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(internationalWireVerificationReducer_1.fetchInternationalVerificationForm.match), (0, operators_1.switchMap)((action) => {
|
|
10
9
|
const query = {
|
|
11
10
|
region: 'US',
|
|
12
11
|
legal_type: 'BUSINESS',
|
|
@@ -15,14 +14,11 @@ const fetchIntlVerificationFormEpic = (actions$, state$, zeniAPI) => actions$.pi
|
|
|
15
14
|
.getJSON(`${zeniAPI.apiEndPoints.payMicroServiceBaseUrl}/1.0/international-wire/onboarding-fields?query=${encodeURIComponent(JSON.stringify(query))}`)
|
|
16
15
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
17
16
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
18
|
-
const onboardingDataFromCompanyInfo = state$.value.companyState.companiesById[action.payload.companyId]
|
|
19
|
-
?.companyBillPayInfo?.internationalWireOnboardingDetails;
|
|
20
|
-
const localData = (0, internationalWireOnboardingDetailsToLocalData_1.toVerificationFormLocalDataFromOnboardingDetails)(onboardingDataFromCompanyInfo, response.data.labels);
|
|
21
17
|
return (0, rxjs_1.from)([
|
|
22
18
|
(0, internationalWireVerificationReducer_1.updateInternationalVerificationForm)({
|
|
23
19
|
internationalWireFormPayload: response.data.labels,
|
|
24
20
|
}),
|
|
25
|
-
(0, internationalWireVerificationReducer_1.
|
|
21
|
+
(0, internationalWireVerificationReducer_1.initializeIntlVerificationForm)(action.payload.companyId, response.data.labels),
|
|
26
22
|
]);
|
|
27
23
|
}
|
|
28
24
|
else {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { RootState } from '../../../../../reducer';
|
|
4
|
-
import { fetchBillPaySetupViewSuccess } from '../../billPaySetupView/billPaySetupViewReducer';
|
|
5
4
|
import { initializeIntlVerificationForm, updateVerificationFormLocalData } from '../internationalWireVerificationReducer';
|
|
6
5
|
export type ActionType = ReturnType<typeof updateVerificationFormLocalData> | ReturnType<typeof initializeIntlVerificationForm>;
|
|
7
|
-
export declare const initializeIntlVerificationFormEpic: (actions$: ActionsObservable<ActionType
|
|
6
|
+
export declare const initializeIntlVerificationFormEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => Observable<ActionType>;
|
|
@@ -3,40 +3,48 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.initializeIntlVerificationFormEpic = void 0;
|
|
4
4
|
const rxjs_1 = require("rxjs");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const tenantSelector_1 = require("../../../../../entity/tenant/tenantSelector");
|
|
7
|
-
const billPaySetupViewReducer_1 = require("../../billPaySetupView/billPaySetupViewReducer");
|
|
8
|
-
const internationalWireOnboardingDetailsToLocalData_1 = require("../internationalWireOnboardingDetailsToLocalData");
|
|
9
6
|
const internationalWireVerificationReducer_1 = require("../internationalWireVerificationReducer");
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
billPaySetupViewReducer_1.fetchBillPaySetupViewSuccess.match(action)), (0, operators_1.mergeMap)((action) => {
|
|
7
|
+
const initializeIntlVerificationFormEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(internationalWireVerificationReducer_1.initializeIntlVerificationForm.match), (0, operators_1.mergeMap)((action) => {
|
|
8
|
+
const { companyId, internationalWireFormPayload } = action.payload;
|
|
9
|
+
const actions = [];
|
|
14
10
|
const state = state$.value;
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
11
|
+
const onboardingDataFromCompanyInfo = state.companyState.companiesById[companyId].companyBillPayInfo
|
|
12
|
+
.internationalWireOnboardingDetails;
|
|
13
|
+
const localData = {};
|
|
14
|
+
Object.keys(internationalWireFormPayload).forEach((formFieldKey) => {
|
|
15
|
+
const values = onboardingDataFromCompanyInfo != null
|
|
16
|
+
? onboardingDataFromCompanyInfo[formFieldKey]?.values
|
|
17
|
+
: undefined;
|
|
18
|
+
if (values != null) {
|
|
19
|
+
const fieldPayload = internationalWireFormPayload[formFieldKey];
|
|
20
|
+
if (fieldPayload.type === 'enum') {
|
|
21
|
+
localData[formFieldKey] =
|
|
22
|
+
fieldPayload.is_multiple_values_allowed === false
|
|
23
|
+
? typeof values[0] === 'object' && 'code' in values[0]
|
|
24
|
+
? values[0].code
|
|
25
|
+
: ''
|
|
26
|
+
: values.map((value) => typeof value === 'object' && 'code' in value
|
|
27
|
+
? value.code
|
|
28
|
+
: '');
|
|
29
|
+
}
|
|
30
|
+
else if (fieldPayload.type === 'file' &&
|
|
31
|
+
fieldPayload.is_multiple_values_allowed === true) {
|
|
32
|
+
localData[formFieldKey] = values.filter((value) => typeof value === 'string');
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
localData[formFieldKey] = values[0] ?? '';
|
|
36
|
+
}
|
|
33
37
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
else {
|
|
39
|
+
localData[formFieldKey] =
|
|
40
|
+
internationalWireFormPayload[formFieldKey].type === 'enum' &&
|
|
41
|
+
internationalWireFormPayload[formFieldKey]
|
|
42
|
+
.is_multiple_values_allowed === true
|
|
43
|
+
? []
|
|
44
|
+
: '';
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
actions.push((0, internationalWireVerificationReducer_1.updateVerificationFormLocalData)(localData));
|
|
48
|
+
return (0, rxjs_1.from)(actions);
|
|
41
49
|
}));
|
|
42
50
|
exports.initializeIntlVerificationFormEpic = initializeIntlVerificationFormEpic;
|
|
@@ -6,7 +6,6 @@ const operators_1 = require("rxjs/operators");
|
|
|
6
6
|
const companyReducer_1 = require("../../../../../entity/company/companyReducer");
|
|
7
7
|
const snackbarReducer_1 = require("../../../../../entity/snackbar/snackbarReducer");
|
|
8
8
|
const responsePayload_1 = require("../../../../../responsePayload");
|
|
9
|
-
const internationalWireVerificationSubmitPayload_1 = require("../internationalWireVerificationSubmitPayload");
|
|
10
9
|
const internationalWireVerificationReducer_1 = require("../internationalWireVerificationReducer");
|
|
11
10
|
const submitIntlVerificationEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(internationalWireVerificationReducer_1.submitInternationalVerificationForm.match), (0, operators_1.switchMap)((action) => {
|
|
12
11
|
const { internationalWireVerificationState } = state$.value;
|
|
@@ -14,7 +13,7 @@ const submitIntlVerificationEpic = (actions$, state$, zeniAPI) => actions$.pipe(
|
|
|
14
13
|
const localData = internationalWireVerificationState.verificationFormLocalData;
|
|
15
14
|
if (localData != null) {
|
|
16
15
|
return zeniAPI
|
|
17
|
-
.postAndGetJSON(`${zeniAPI.apiEndPoints.payMicroServiceBaseUrl}/1.0/international-wire/onboarding`, (
|
|
16
|
+
.postAndGetJSON(`${zeniAPI.apiEndPoints.payMicroServiceBaseUrl}/1.0/international-wire/onboarding`, toIntlWireVerificationPayload(localData))
|
|
18
17
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
19
18
|
const actions = [];
|
|
20
19
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
@@ -59,3 +58,9 @@ const submitIntlVerificationEpic = (actions$, state$, zeniAPI) => actions$.pipe(
|
|
|
59
58
|
}
|
|
60
59
|
}));
|
|
61
60
|
exports.submitIntlVerificationEpic = submitIntlVerificationEpic;
|
|
61
|
+
const toIntlWireVerificationPayload = (localData) => {
|
|
62
|
+
return {
|
|
63
|
+
is_applicant_declaration: true,
|
|
64
|
+
form_details: localData,
|
|
65
|
+
};
|
|
66
|
+
};
|
|
@@ -33,6 +33,3 @@ export declare const InternationalWireVerificationSubfieldNames: {
|
|
|
33
33
|
readonly ssn: "ssn";
|
|
34
34
|
};
|
|
35
35
|
export type InternationalWireVerificationSubfieldName = (typeof InternationalWireVerificationSubfieldNames)[keyof typeof InternationalWireVerificationSubfieldNames];
|
|
36
|
-
export declare const InternationalWireVerificationReadonlyHideableFieldNames: readonly ["stake_holder", "controlling_person", "business_ownership", "company_proof_of_address", "company_officer_proof_of_address"];
|
|
37
|
-
export type InternationalWireVerificationReadonlyHideableFieldName = (typeof InternationalWireVerificationReadonlyHideableFieldNames)[number];
|
|
38
|
-
export declare const InternationalWireVerificationReadonlyVisibilityGateFieldName: "business_ownership";
|