@zeniai/client-epic-state 4.19.65 → 4.19.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/entity/company/companyPayload.d.ts +11 -11
- package/lib/entity/company/companyPayload.js +19 -19
- package/lib/entity/company/companyStateTypes.d.ts +11 -11
- package/lib/esm/entity/company/companyPayload.js +19 -19
- package/lib/esm/view/companyView/epic/companyPassport/updateCompanyDetailsEpic.js +0 -3
- package/lib/esm/view/companyView/types/companyPassport/companyPassportLocalData.js +0 -12
- package/lib/esm/view/companyView/types/companyPassportViewPayload.js +12 -55
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewSelector.js +3 -3
- package/lib/esm/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.js +2 -2
- package/lib/view/companyView/epic/companyPassport/updateCompanyDetailsEpic.js +0 -3
- package/lib/view/companyView/types/companyPassport/companyDetailsLocalData.d.ts +0 -12
- package/lib/view/companyView/types/companyPassport/companyPassportLocalData.js +0 -12
- package/lib/view/companyView/types/companyPassportViewPayload.d.ts +1 -1
- package/lib/view/companyView/types/companyPassportViewPayload.js +12 -55
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +0 -1
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +2 -3
- package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.js +2 -2
- package/package.json +1 -1
- package/lib/tsconfig.typecheck.tsbuildinfo +0 -1
|
@@ -18,17 +18,6 @@ export interface CompanyInfoPayload {
|
|
|
18
18
|
primary_email_domain: string;
|
|
19
19
|
source_of_funds: string | null;
|
|
20
20
|
update_time: string;
|
|
21
|
-
company_countries_of_operations?: string[] | null;
|
|
22
|
-
company_purpose_of_account?: string | null;
|
|
23
|
-
company_purpose_of_account_desc?: string | null;
|
|
24
|
-
company_regulated_states?: boolean | null;
|
|
25
|
-
company_regulated_states_desc?: string | null;
|
|
26
|
-
company_source_of_funds?: string | null;
|
|
27
|
-
company_source_of_funds_desc?: string | null;
|
|
28
|
-
company_transaction_vol_expectations?: string | null;
|
|
29
|
-
company_transaction_vol_expectations_desc?: string | null;
|
|
30
|
-
company_us_nexus?: boolean | null;
|
|
31
|
-
company_us_nexus_desc?: string[] | null;
|
|
32
21
|
first_month_of_fiscal_year?: string | undefined;
|
|
33
22
|
sync_token?: string | null;
|
|
34
23
|
}
|
|
@@ -47,7 +36,18 @@ export interface CompanyIncInfoPayload {
|
|
|
47
36
|
company_inc_state: string | null;
|
|
48
37
|
company_inc_state_code: string | null;
|
|
49
38
|
company_inc_type: string | null;
|
|
39
|
+
company_countries_of_operations?: string[] | null;
|
|
50
40
|
company_industry_sub_type?: string | null;
|
|
41
|
+
company_purpose_of_account?: string | null;
|
|
42
|
+
company_purpose_of_account_desc?: string | null;
|
|
43
|
+
company_regulated_states?: boolean | null;
|
|
44
|
+
company_regulated_states_desc?: string | null;
|
|
45
|
+
company_source_of_funds?: string | null;
|
|
46
|
+
company_source_of_funds_desc?: string | null;
|
|
47
|
+
company_transaction_vol_expectations?: string | null;
|
|
48
|
+
company_transaction_vol_expectations_desc?: string | null;
|
|
49
|
+
company_us_nexus?: boolean | null;
|
|
50
|
+
company_us_nexus_desc?: string[] | null;
|
|
51
51
|
file_ids?: ID[] | null;
|
|
52
52
|
}
|
|
53
53
|
export interface CompanyTaxInfoPayload {
|
|
@@ -36,25 +36,6 @@ const toCompanyInfo = (payload, companyIdTenantIdMapping, companyInStore) => {
|
|
|
36
36
|
phone: payload.phone ?? undefined,
|
|
37
37
|
firstMonthOfFY: (0, timePeriod_1.getMonthFromMonthName)(payload.first_month_of_fiscal_year) ?? 1,
|
|
38
38
|
sourceOfFunds: payload.source_of_funds ?? undefined,
|
|
39
|
-
companySourceOfFunds: payload.company_source_of_funds ?? undefined,
|
|
40
|
-
companySourceOfFundsDescription: payload.company_source_of_funds_desc ?? undefined,
|
|
41
|
-
countriesOfOperations: payload.company_countries_of_operations ?? undefined,
|
|
42
|
-
transactionVolume: payload.company_transaction_vol_expectations ?? undefined,
|
|
43
|
-
transactionVolumeDescription: payload.company_transaction_vol_expectations_desc ?? undefined,
|
|
44
|
-
purposeOfAccount: payload.company_purpose_of_account ?? undefined,
|
|
45
|
-
purposeOfAccountDescription: payload.company_purpose_of_account_desc ?? undefined,
|
|
46
|
-
regulatedStatus: payload.company_regulated_states == null
|
|
47
|
-
? undefined
|
|
48
|
-
: payload.company_regulated_states
|
|
49
|
-
? 'yes'
|
|
50
|
-
: 'no',
|
|
51
|
-
regulatedStatusDescription: payload.company_regulated_states_desc ?? undefined,
|
|
52
|
-
usNexus: payload.company_us_nexus == null
|
|
53
|
-
? undefined
|
|
54
|
-
: payload.company_us_nexus
|
|
55
|
-
? 'yes'
|
|
56
|
-
: 'no',
|
|
57
|
-
usNexusTypes: payload.company_us_nexus_desc ?? undefined,
|
|
58
39
|
};
|
|
59
40
|
};
|
|
60
41
|
const toCompanyLocaleInfo = (payload) => ({
|
|
@@ -76,6 +57,25 @@ const toCompanyIncInfo = (payload) => ({
|
|
|
76
57
|
companyIncCountryCode: payload.company_inc_country_code ?? undefined,
|
|
77
58
|
fileIds: payload.file_ids ?? [],
|
|
78
59
|
companySubIndustry: payload.company_industry_sub_type ?? undefined,
|
|
60
|
+
countriesOfOperations: payload.company_countries_of_operations ?? undefined,
|
|
61
|
+
companySourceOfFunds: payload.company_source_of_funds ?? undefined,
|
|
62
|
+
companySourceOfFundsDescription: payload.company_source_of_funds_desc ?? undefined,
|
|
63
|
+
transactionVolume: payload.company_transaction_vol_expectations ?? undefined,
|
|
64
|
+
transactionVolumeDescription: payload.company_transaction_vol_expectations_desc ?? undefined,
|
|
65
|
+
purposeOfAccount: payload.company_purpose_of_account ?? undefined,
|
|
66
|
+
purposeOfAccountDescription: payload.company_purpose_of_account_desc ?? undefined,
|
|
67
|
+
regulatedStatus: payload.company_regulated_states === true
|
|
68
|
+
? 'yes'
|
|
69
|
+
: payload.company_regulated_states === false
|
|
70
|
+
? 'no'
|
|
71
|
+
: undefined,
|
|
72
|
+
regulatedStatusDescription: payload.company_regulated_states_desc ?? undefined,
|
|
73
|
+
usNexus: payload.company_us_nexus === true
|
|
74
|
+
? 'yes'
|
|
75
|
+
: payload.company_us_nexus === false
|
|
76
|
+
? 'no'
|
|
77
|
+
: undefined,
|
|
78
|
+
usNexusTypes: payload.company_us_nexus_desc ?? undefined,
|
|
79
79
|
});
|
|
80
80
|
const toCompanyTaxInfo = (payload) => ({
|
|
81
81
|
taxesFiledDate: payload.taxes_filed_date != null
|
|
@@ -27,23 +27,12 @@ export interface CompanyInfo {
|
|
|
27
27
|
bookCloseDate?: ZeniDate;
|
|
28
28
|
companyDescription?: string;
|
|
29
29
|
companyLegalName?: string;
|
|
30
|
-
companySourceOfFunds?: string;
|
|
31
|
-
companySourceOfFundsDescription?: string;
|
|
32
30
|
companyUrl?: ZeniUrl;
|
|
33
|
-
countriesOfOperations?: string[];
|
|
34
31
|
meetingUrl?: ZeniUrl;
|
|
35
32
|
phone?: string;
|
|
36
|
-
purposeOfAccount?: string;
|
|
37
|
-
purposeOfAccountDescription?: string;
|
|
38
|
-
regulatedStatus?: string;
|
|
39
|
-
regulatedStatusDescription?: string;
|
|
40
33
|
sourceOfFunds?: string;
|
|
41
34
|
syncToken?: string;
|
|
42
35
|
tenantId?: ID;
|
|
43
|
-
transactionVolume?: string;
|
|
44
|
-
transactionVolumeDescription?: string;
|
|
45
|
-
usNexus?: string;
|
|
46
|
-
usNexusTypes?: string[];
|
|
47
36
|
}
|
|
48
37
|
export interface CompanyLocaleInfo {
|
|
49
38
|
companyIncCountryCode: string;
|
|
@@ -61,7 +50,18 @@ export interface CompanyIncInfo {
|
|
|
61
50
|
companyIncState?: string;
|
|
62
51
|
companyIncStateCode?: string;
|
|
63
52
|
companyIncType?: string;
|
|
53
|
+
companySourceOfFunds?: string;
|
|
54
|
+
companySourceOfFundsDescription?: string;
|
|
64
55
|
companySubIndustry?: string;
|
|
56
|
+
countriesOfOperations?: string[];
|
|
57
|
+
purposeOfAccount?: string;
|
|
58
|
+
purposeOfAccountDescription?: string;
|
|
59
|
+
regulatedStatus?: string;
|
|
60
|
+
regulatedStatusDescription?: string;
|
|
61
|
+
transactionVolume?: string;
|
|
62
|
+
transactionVolumeDescription?: string;
|
|
63
|
+
usNexus?: string;
|
|
64
|
+
usNexusTypes?: string[];
|
|
65
65
|
}
|
|
66
66
|
export interface CompanyTaxInfo {
|
|
67
67
|
taxesFiledYears: number[];
|
|
@@ -33,25 +33,6 @@ const toCompanyInfo = (payload, companyIdTenantIdMapping, companyInStore) => {
|
|
|
33
33
|
phone: payload.phone ?? undefined,
|
|
34
34
|
firstMonthOfFY: getMonthFromMonthName(payload.first_month_of_fiscal_year) ?? 1,
|
|
35
35
|
sourceOfFunds: payload.source_of_funds ?? undefined,
|
|
36
|
-
companySourceOfFunds: payload.company_source_of_funds ?? undefined,
|
|
37
|
-
companySourceOfFundsDescription: payload.company_source_of_funds_desc ?? undefined,
|
|
38
|
-
countriesOfOperations: payload.company_countries_of_operations ?? undefined,
|
|
39
|
-
transactionVolume: payload.company_transaction_vol_expectations ?? undefined,
|
|
40
|
-
transactionVolumeDescription: payload.company_transaction_vol_expectations_desc ?? undefined,
|
|
41
|
-
purposeOfAccount: payload.company_purpose_of_account ?? undefined,
|
|
42
|
-
purposeOfAccountDescription: payload.company_purpose_of_account_desc ?? undefined,
|
|
43
|
-
regulatedStatus: payload.company_regulated_states == null
|
|
44
|
-
? undefined
|
|
45
|
-
: payload.company_regulated_states
|
|
46
|
-
? 'yes'
|
|
47
|
-
: 'no',
|
|
48
|
-
regulatedStatusDescription: payload.company_regulated_states_desc ?? undefined,
|
|
49
|
-
usNexus: payload.company_us_nexus == null
|
|
50
|
-
? undefined
|
|
51
|
-
: payload.company_us_nexus
|
|
52
|
-
? 'yes'
|
|
53
|
-
: 'no',
|
|
54
|
-
usNexusTypes: payload.company_us_nexus_desc ?? undefined,
|
|
55
36
|
};
|
|
56
37
|
};
|
|
57
38
|
const toCompanyLocaleInfo = (payload) => ({
|
|
@@ -73,6 +54,25 @@ const toCompanyIncInfo = (payload) => ({
|
|
|
73
54
|
companyIncCountryCode: payload.company_inc_country_code ?? undefined,
|
|
74
55
|
fileIds: payload.file_ids ?? [],
|
|
75
56
|
companySubIndustry: payload.company_industry_sub_type ?? undefined,
|
|
57
|
+
countriesOfOperations: payload.company_countries_of_operations ?? undefined,
|
|
58
|
+
companySourceOfFunds: payload.company_source_of_funds ?? undefined,
|
|
59
|
+
companySourceOfFundsDescription: payload.company_source_of_funds_desc ?? undefined,
|
|
60
|
+
transactionVolume: payload.company_transaction_vol_expectations ?? undefined,
|
|
61
|
+
transactionVolumeDescription: payload.company_transaction_vol_expectations_desc ?? undefined,
|
|
62
|
+
purposeOfAccount: payload.company_purpose_of_account ?? undefined,
|
|
63
|
+
purposeOfAccountDescription: payload.company_purpose_of_account_desc ?? undefined,
|
|
64
|
+
regulatedStatus: payload.company_regulated_states === true
|
|
65
|
+
? 'yes'
|
|
66
|
+
: payload.company_regulated_states === false
|
|
67
|
+
? 'no'
|
|
68
|
+
: undefined,
|
|
69
|
+
regulatedStatusDescription: payload.company_regulated_states_desc ?? undefined,
|
|
70
|
+
usNexus: payload.company_us_nexus === true
|
|
71
|
+
? 'yes'
|
|
72
|
+
: payload.company_us_nexus === false
|
|
73
|
+
? 'no'
|
|
74
|
+
: undefined,
|
|
75
|
+
usNexusTypes: payload.company_us_nexus_desc ?? undefined,
|
|
76
76
|
});
|
|
77
77
|
const toCompanyTaxInfo = (payload) => ({
|
|
78
78
|
taxesFiledDate: payload.taxes_filed_date != null
|
|
@@ -12,9 +12,6 @@ export const updateCompanyDetailsEpic = (actions$, state$, zeniAPI) => actions$.
|
|
|
12
12
|
...toCompanyIncInfoUpdatableInfoPayload(companyDetails.incInfo),
|
|
13
13
|
...toCompanyTaxInfoUpdatableInfoPayload(companyDetails.taxDetails),
|
|
14
14
|
...toCompanyFileInfoPayload(companyDetails.incInfo, companyDetails.taxDetails),
|
|
15
|
-
...(companyDetails.companyInfo.companySubIndustry != null && {
|
|
16
|
-
company_industry_sub_type: companyDetails.companyInfo.companySubIndustry,
|
|
17
|
-
}),
|
|
18
15
|
};
|
|
19
16
|
const { newAddressState } = state$.value.addressViewState;
|
|
20
17
|
const addressToCreate = newAddressState?.company_address?.addressToCreate;
|
|
@@ -10,21 +10,9 @@ export function toCompanyPassportLocalData(companyView, companyFiles) {
|
|
|
10
10
|
website: companyInfo.companyUrl,
|
|
11
11
|
meetingLink: companyInfo.meetingUrl,
|
|
12
12
|
industry: companyQuestionaire.companyIndustry,
|
|
13
|
-
companySubIndustry: incInfo.companySubIndustry,
|
|
14
13
|
businessModel: companyQuestionaire.companyBusinessModel ?? '',
|
|
15
14
|
phone: companyInfo.phone ?? '',
|
|
16
15
|
firstMonthOfFY: companyInfo.firstMonthOfFY,
|
|
17
|
-
companySourceOfFunds: companyInfo.companySourceOfFunds,
|
|
18
|
-
companySourceOfFundsDescription: companyInfo.companySourceOfFundsDescription,
|
|
19
|
-
countriesOfOperations: companyInfo.countriesOfOperations,
|
|
20
|
-
transactionVolume: companyInfo.transactionVolume,
|
|
21
|
-
transactionVolumeDescription: companyInfo.transactionVolumeDescription,
|
|
22
|
-
purposeOfAccount: companyInfo.purposeOfAccount,
|
|
23
|
-
purposeOfAccountDescription: companyInfo.purposeOfAccountDescription,
|
|
24
|
-
regulatedStatus: companyInfo.regulatedStatus,
|
|
25
|
-
regulatedStatusDescription: companyInfo.regulatedStatusDescription,
|
|
26
|
-
usNexus: companyInfo.usNexus,
|
|
27
|
-
usNexusTypes: companyInfo.usNexusTypes,
|
|
28
16
|
},
|
|
29
17
|
incInfo: {
|
|
30
18
|
typeOfInc: incInfo.companyIncType ?? '',
|
|
@@ -1,59 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
export const toCompanyUpdatableInfoPayload = (info) => {
|
|
2
|
+
const payload = {
|
|
3
|
+
name: info.companyName,
|
|
4
|
+
company_legal_name: info.legalName,
|
|
5
|
+
phone: info.phone,
|
|
6
|
+
company_industry: info.industry,
|
|
7
|
+
company_business_model: info.businessModel,
|
|
8
|
+
company_url: info.website != null ? info.website.toString() : null,
|
|
9
|
+
meeting_url: info.meetingLink != null ? info.meetingLink.toString() : null,
|
|
10
|
+
is_new_company_industry_verified: true,
|
|
11
|
+
};
|
|
12
|
+
return payload;
|
|
7
13
|
};
|
|
8
|
-
function toUsNexusTypeKey(value) {
|
|
9
|
-
const key = US_NEXUS_LABEL_TO_KEY[value];
|
|
10
|
-
return key ?? value;
|
|
11
|
-
}
|
|
12
|
-
export const toCompanyUpdatableInfoPayload = (info) => ({
|
|
13
|
-
name: info.companyName,
|
|
14
|
-
company_legal_name: info.legalName,
|
|
15
|
-
phone: info.phone,
|
|
16
|
-
company_industry: info.industry,
|
|
17
|
-
company_business_model: info.businessModel,
|
|
18
|
-
company_url: info.website != null ? info.website.toString() : null,
|
|
19
|
-
meeting_url: info.meetingLink != null ? info.meetingLink.toString() : null,
|
|
20
|
-
is_new_company_industry_verified: true,
|
|
21
|
-
...(info.companySourceOfFunds != null && {
|
|
22
|
-
company_source_of_funds: info.companySourceOfFunds,
|
|
23
|
-
}),
|
|
24
|
-
...(info.companySourceOfFundsDescription != null && {
|
|
25
|
-
company_source_of_funds_desc: info.companySourceOfFundsDescription,
|
|
26
|
-
}),
|
|
27
|
-
...(info.countriesOfOperations != null &&
|
|
28
|
-
info.countriesOfOperations.length > 0 && {
|
|
29
|
-
company_countries_of_operations: info.countriesOfOperations,
|
|
30
|
-
}),
|
|
31
|
-
...(info.transactionVolume != null && {
|
|
32
|
-
company_transaction_vol_expectations: info.transactionVolume,
|
|
33
|
-
}),
|
|
34
|
-
...(info.transactionVolumeDescription != null && {
|
|
35
|
-
company_transaction_vol_expectations_desc: info.transactionVolumeDescription,
|
|
36
|
-
}),
|
|
37
|
-
...(info.purposeOfAccount != null && {
|
|
38
|
-
company_purpose_of_account: info.purposeOfAccount,
|
|
39
|
-
}),
|
|
40
|
-
...(info.purposeOfAccountDescription != null && {
|
|
41
|
-
company_purpose_of_account_desc: info.purposeOfAccountDescription,
|
|
42
|
-
}),
|
|
43
|
-
...(info.regulatedStatus != null && {
|
|
44
|
-
company_regulated_states: info.regulatedStatus === 'yes',
|
|
45
|
-
}),
|
|
46
|
-
...(info.regulatedStatusDescription != null && {
|
|
47
|
-
company_regulated_states_desc: info.regulatedStatusDescription,
|
|
48
|
-
}),
|
|
49
|
-
...(info.usNexus != null && {
|
|
50
|
-
company_us_nexus: info.usNexus === 'yes',
|
|
51
|
-
}),
|
|
52
|
-
...(info.usNexusTypes != null &&
|
|
53
|
-
info.usNexusTypes.length > 0 && {
|
|
54
|
-
company_us_nexus_desc: info.usNexusTypes.map(toUsNexusTypeKey),
|
|
55
|
-
}),
|
|
56
|
-
});
|
|
57
14
|
export const toCompanyIncInfoUpdatableInfoPayload = (info) => {
|
|
58
15
|
const payload = {
|
|
59
16
|
company_inc_type: info.typeOfInc,
|
|
@@ -218,13 +218,13 @@ export const onboardingStepsData = (isValidConnection, productSettings, accounti
|
|
|
218
218
|
requiredStepsData: requiredStepsData.map((step) => toOnboardingStepType(step)),
|
|
219
219
|
};
|
|
220
220
|
};
|
|
221
|
-
|
|
221
|
+
function isCompanyDetailsSavePending(fileState, company, primaryContact, companyDetailsLocalData) {
|
|
222
222
|
if (company == null || companyDetailsLocalData == null) {
|
|
223
223
|
return false;
|
|
224
224
|
}
|
|
225
225
|
const { companyInfo, incInfo, taxInfo, questionaire } = company.company.company;
|
|
226
|
-
const { companyDescription, companyLegalName, companyUrl, phone
|
|
227
|
-
const { fileIds, companyIncDate: incDate, companyIncState, companyIncType, companySubIndustry, } = incInfo;
|
|
226
|
+
const { companyDescription, companyLegalName, companyUrl, phone } = companyInfo;
|
|
227
|
+
const { fileIds, companyIncDate: incDate, companyIncState, companyIncType, companySourceOfFunds, companySourceOfFundsDescription, companySubIndustry, countriesOfOperations, transactionVolume, transactionVolumeDescription, purposeOfAccount, purposeOfAccountDescription, regulatedStatus, regulatedStatusDescription, usNexus, usNexusTypes, } = incInfo;
|
|
228
228
|
const { companyIndustry } = questionaire;
|
|
229
229
|
const { taxId } = taxInfo;
|
|
230
230
|
const companyFileIds = getFilesByFileIds(fileState, fileIds).map((file) => file.fileId);
|
package/lib/esm/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.js
CHANGED
|
@@ -43,9 +43,9 @@ export const updateSetupViewLocalStoreDataEpic = (actions$, state$) => actions$.
|
|
|
43
43
|
*/
|
|
44
44
|
export function toSetupViewLocalData(company, users, userRoles, primaryContact) {
|
|
45
45
|
const { companyInfo, incInfo, taxInfo, questionaire, companyBillPayInfo } = company;
|
|
46
|
-
const { companyId, companyDescription, companyLegalName, companyUrl, phone, syncToken, sourceOfFunds,
|
|
46
|
+
const { companyId, companyDescription, companyLegalName, companyUrl, phone, syncToken, sourceOfFunds, } = companyInfo;
|
|
47
47
|
const { usersSelectedForVerification: usersSelected } = companyBillPayInfo;
|
|
48
|
-
const { fileIds, companyIncDate: incDate, companyIncType, companyIncState, companySubIndustry, } = incInfo;
|
|
48
|
+
const { fileIds, companyIncDate: incDate, companyIncType, companyIncState, companySubIndustry, countriesOfOperations, companySourceOfFunds: incCompanySourceOfFunds, companySourceOfFundsDescription, transactionVolume, transactionVolumeDescription, purposeOfAccount, purposeOfAccountDescription, regulatedStatus, regulatedStatusDescription, usNexus, usNexusTypes, } = incInfo;
|
|
49
49
|
const { companyIndustry } = questionaire;
|
|
50
50
|
const { taxId } = taxInfo;
|
|
51
51
|
const companyDetails = {
|
|
@@ -15,9 +15,6 @@ const updateCompanyDetailsEpic = (actions$, state$, zeniAPI) => actions$.pipe((0
|
|
|
15
15
|
...(0, companyPassportViewPayload_1.toCompanyIncInfoUpdatableInfoPayload)(companyDetails.incInfo),
|
|
16
16
|
...(0, companyPassportViewPayload_1.toCompanyTaxInfoUpdatableInfoPayload)(companyDetails.taxDetails),
|
|
17
17
|
...(0, companyPassportViewPayload_1.toCompanyFileInfoPayload)(companyDetails.incInfo, companyDetails.taxDetails),
|
|
18
|
-
...(companyDetails.companyInfo.companySubIndustry != null && {
|
|
19
|
-
company_industry_sub_type: companyDetails.companyInfo.companySubIndustry,
|
|
20
|
-
}),
|
|
21
18
|
};
|
|
22
19
|
const { newAddressState } = state$.value.addressViewState;
|
|
23
20
|
const addressToCreate = newAddressState?.company_address?.addressToCreate;
|
|
@@ -8,20 +8,8 @@ export interface CompanyInfoLocalData {
|
|
|
8
8
|
firstMonthOfFY: Month;
|
|
9
9
|
legalName: string;
|
|
10
10
|
phone: string;
|
|
11
|
-
companySourceOfFunds?: string;
|
|
12
|
-
companySourceOfFundsDescription?: string;
|
|
13
|
-
companySubIndustry?: string;
|
|
14
|
-
countriesOfOperations?: string[];
|
|
15
11
|
industry?: string;
|
|
16
12
|
meetingLink?: ZeniUrl;
|
|
17
|
-
purposeOfAccount?: string;
|
|
18
|
-
purposeOfAccountDescription?: string;
|
|
19
|
-
regulatedStatus?: string;
|
|
20
|
-
regulatedStatusDescription?: string;
|
|
21
|
-
transactionVolume?: string;
|
|
22
|
-
transactionVolumeDescription?: string;
|
|
23
|
-
usNexus?: string;
|
|
24
|
-
usNexusTypes?: string[];
|
|
25
13
|
website?: ZeniUrl;
|
|
26
14
|
}
|
|
27
15
|
export interface IncInfoLocalData {
|
|
@@ -13,21 +13,9 @@ function toCompanyPassportLocalData(companyView, companyFiles) {
|
|
|
13
13
|
website: companyInfo.companyUrl,
|
|
14
14
|
meetingLink: companyInfo.meetingUrl,
|
|
15
15
|
industry: companyQuestionaire.companyIndustry,
|
|
16
|
-
companySubIndustry: incInfo.companySubIndustry,
|
|
17
16
|
businessModel: companyQuestionaire.companyBusinessModel ?? '',
|
|
18
17
|
phone: companyInfo.phone ?? '',
|
|
19
18
|
firstMonthOfFY: companyInfo.firstMonthOfFY,
|
|
20
|
-
companySourceOfFunds: companyInfo.companySourceOfFunds,
|
|
21
|
-
companySourceOfFundsDescription: companyInfo.companySourceOfFundsDescription,
|
|
22
|
-
countriesOfOperations: companyInfo.countriesOfOperations,
|
|
23
|
-
transactionVolume: companyInfo.transactionVolume,
|
|
24
|
-
transactionVolumeDescription: companyInfo.transactionVolumeDescription,
|
|
25
|
-
purposeOfAccount: companyInfo.purposeOfAccount,
|
|
26
|
-
purposeOfAccountDescription: companyInfo.purposeOfAccountDescription,
|
|
27
|
-
regulatedStatus: companyInfo.regulatedStatus,
|
|
28
|
-
regulatedStatusDescription: companyInfo.regulatedStatusDescription,
|
|
29
|
-
usNexus: companyInfo.usNexus,
|
|
30
|
-
usNexusTypes: companyInfo.usNexusTypes,
|
|
31
19
|
},
|
|
32
20
|
incInfo: {
|
|
33
21
|
typeOfInc: incInfo.companyIncType ?? '',
|
|
@@ -2,7 +2,7 @@ import { ID } from '../../../commonStateTypes/common';
|
|
|
2
2
|
import { CompanyConfigInfoPayload, CompanyIncInfoPayload, CompanyInfoPayload, CompanyQuestionairePayload, CompanyTaxInfoPayload } from '../../../entity/company/companyPayload';
|
|
3
3
|
import { UserUpdatableInfo } from '../epic/companyPassport/updatePrimaryContactEpic';
|
|
4
4
|
import { CompanyInfoLocalData, IncInfoLocalData, TaxDetailsLocalData } from './companyPassport/companyDetailsLocalData';
|
|
5
|
-
interface CompanyInfoUpdatableInfoPayload extends Pick<CompanyInfoPayload, 'name' | 'company_url' | 'meeting_url' | 'company_legal_name' | 'phone'
|
|
5
|
+
interface CompanyInfoUpdatableInfoPayload extends Pick<CompanyInfoPayload, 'name' | 'company_url' | 'meeting_url' | 'company_legal_name' | 'phone'>, Pick<CompanyQuestionairePayload, 'company_industry' | 'company_business_model'>, Pick<CompanyConfigInfoPayload, 'is_new_company_industry_verified'> {
|
|
6
6
|
}
|
|
7
7
|
type CompanyIncUpdatableInfoPayload = Pick<CompanyIncInfoPayload, 'company_inc_type' | 'company_inc_state' | 'company_inc_date'>;
|
|
8
8
|
type CompanyTaxUpdatableInfoPayload = Omit<CompanyTaxInfoPayload, 'taxes_filed_date' | 'taxes_due_date'>;
|
|
@@ -1,62 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.toUserUpdatableInfoPayload = exports.toCompanyFileInfoPayload = exports.toCompanyTaxInfoUpdatableInfoPayload = exports.toCompanyIncInfoUpdatableInfoPayload = exports.toCompanyUpdatableInfoPayload = void 0;
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
const toCompanyUpdatableInfoPayload = (info) => {
|
|
5
|
+
const payload = {
|
|
6
|
+
name: info.companyName,
|
|
7
|
+
company_legal_name: info.legalName,
|
|
8
|
+
phone: info.phone,
|
|
9
|
+
company_industry: info.industry,
|
|
10
|
+
company_business_model: info.businessModel,
|
|
11
|
+
company_url: info.website != null ? info.website.toString() : null,
|
|
12
|
+
meeting_url: info.meetingLink != null ? info.meetingLink.toString() : null,
|
|
13
|
+
is_new_company_industry_verified: true,
|
|
14
|
+
};
|
|
15
|
+
return payload;
|
|
10
16
|
};
|
|
11
|
-
function toUsNexusTypeKey(value) {
|
|
12
|
-
const key = US_NEXUS_LABEL_TO_KEY[value];
|
|
13
|
-
return key ?? value;
|
|
14
|
-
}
|
|
15
|
-
const toCompanyUpdatableInfoPayload = (info) => ({
|
|
16
|
-
name: info.companyName,
|
|
17
|
-
company_legal_name: info.legalName,
|
|
18
|
-
phone: info.phone,
|
|
19
|
-
company_industry: info.industry,
|
|
20
|
-
company_business_model: info.businessModel,
|
|
21
|
-
company_url: info.website != null ? info.website.toString() : null,
|
|
22
|
-
meeting_url: info.meetingLink != null ? info.meetingLink.toString() : null,
|
|
23
|
-
is_new_company_industry_verified: true,
|
|
24
|
-
...(info.companySourceOfFunds != null && {
|
|
25
|
-
company_source_of_funds: info.companySourceOfFunds,
|
|
26
|
-
}),
|
|
27
|
-
...(info.companySourceOfFundsDescription != null && {
|
|
28
|
-
company_source_of_funds_desc: info.companySourceOfFundsDescription,
|
|
29
|
-
}),
|
|
30
|
-
...(info.countriesOfOperations != null &&
|
|
31
|
-
info.countriesOfOperations.length > 0 && {
|
|
32
|
-
company_countries_of_operations: info.countriesOfOperations,
|
|
33
|
-
}),
|
|
34
|
-
...(info.transactionVolume != null && {
|
|
35
|
-
company_transaction_vol_expectations: info.transactionVolume,
|
|
36
|
-
}),
|
|
37
|
-
...(info.transactionVolumeDescription != null && {
|
|
38
|
-
company_transaction_vol_expectations_desc: info.transactionVolumeDescription,
|
|
39
|
-
}),
|
|
40
|
-
...(info.purposeOfAccount != null && {
|
|
41
|
-
company_purpose_of_account: info.purposeOfAccount,
|
|
42
|
-
}),
|
|
43
|
-
...(info.purposeOfAccountDescription != null && {
|
|
44
|
-
company_purpose_of_account_desc: info.purposeOfAccountDescription,
|
|
45
|
-
}),
|
|
46
|
-
...(info.regulatedStatus != null && {
|
|
47
|
-
company_regulated_states: info.regulatedStatus === 'yes',
|
|
48
|
-
}),
|
|
49
|
-
...(info.regulatedStatusDescription != null && {
|
|
50
|
-
company_regulated_states_desc: info.regulatedStatusDescription,
|
|
51
|
-
}),
|
|
52
|
-
...(info.usNexus != null && {
|
|
53
|
-
company_us_nexus: info.usNexus === 'yes',
|
|
54
|
-
}),
|
|
55
|
-
...(info.usNexusTypes != null &&
|
|
56
|
-
info.usNexusTypes.length > 0 && {
|
|
57
|
-
company_us_nexus_desc: info.usNexusTypes.map(toUsNexusTypeKey),
|
|
58
|
-
}),
|
|
59
|
-
});
|
|
60
17
|
exports.toCompanyUpdatableInfoPayload = toCompanyUpdatableInfoPayload;
|
|
61
18
|
const toCompanyIncInfoUpdatableInfoPayload = (info) => {
|
|
62
19
|
const payload = {
|
|
@@ -53,5 +53,4 @@ export declare const onboardingStepsData: (isValidConnection: boolean, productSe
|
|
|
53
53
|
allStepsData: OnboardingStep[];
|
|
54
54
|
requiredStepsData: OnboardingStep[];
|
|
55
55
|
};
|
|
56
|
-
export declare function isCompanyDetailsSavePending(fileState: FileState, company?: CompanyView, primaryContact?: User, companyDetailsLocalData?: CompanyDetails): boolean;
|
|
57
56
|
export declare const getProductSettingsString: (productSettings: TenantProductSettings | undefined) => string;
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getProductSettingsString = exports.onboardingStepsData = void 0;
|
|
4
4
|
exports.getOnboardingCustomerView = getOnboardingCustomerView;
|
|
5
5
|
exports.isOfficerDetailsCompleted = isOfficerDetailsCompleted;
|
|
6
|
-
exports.isCompanyDetailsSavePending = isCompanyDetailsSavePending;
|
|
7
6
|
const reduceFetchState_1 = require("../../../commonStateTypes/reduceFetchState");
|
|
8
7
|
const fileSelector_1 = require("../../../entity/file/fileSelector");
|
|
9
8
|
const paymentAccountSelector_1 = require("../../../entity/paymentAccount/paymentAccountSelector");
|
|
@@ -230,8 +229,8 @@ function isCompanyDetailsSavePending(fileState, company, primaryContact, company
|
|
|
230
229
|
return false;
|
|
231
230
|
}
|
|
232
231
|
const { companyInfo, incInfo, taxInfo, questionaire } = company.company.company;
|
|
233
|
-
const { companyDescription, companyLegalName, companyUrl, phone
|
|
234
|
-
const { fileIds, companyIncDate: incDate, companyIncState, companyIncType, companySubIndustry, } = incInfo;
|
|
232
|
+
const { companyDescription, companyLegalName, companyUrl, phone } = companyInfo;
|
|
233
|
+
const { fileIds, companyIncDate: incDate, companyIncState, companyIncType, companySourceOfFunds, companySourceOfFundsDescription, companySubIndustry, countriesOfOperations, transactionVolume, transactionVolumeDescription, purposeOfAccount, purposeOfAccountDescription, regulatedStatus, regulatedStatusDescription, usNexus, usNexusTypes, } = incInfo;
|
|
235
234
|
const { companyIndustry } = questionaire;
|
|
236
235
|
const { taxId } = taxInfo;
|
|
237
236
|
const companyFileIds = (0, fileSelector_1.getFilesByFileIds)(fileState, fileIds).map((file) => file.fileId);
|
package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.js
CHANGED
|
@@ -51,9 +51,9 @@ exports.updateSetupViewLocalStoreDataEpic = updateSetupViewLocalStoreDataEpic;
|
|
|
51
51
|
*/
|
|
52
52
|
function toSetupViewLocalData(company, users, userRoles, primaryContact) {
|
|
53
53
|
const { companyInfo, incInfo, taxInfo, questionaire, companyBillPayInfo } = company;
|
|
54
|
-
const { companyId, companyDescription, companyLegalName, companyUrl, phone, syncToken, sourceOfFunds,
|
|
54
|
+
const { companyId, companyDescription, companyLegalName, companyUrl, phone, syncToken, sourceOfFunds, } = companyInfo;
|
|
55
55
|
const { usersSelectedForVerification: usersSelected } = companyBillPayInfo;
|
|
56
|
-
const { fileIds, companyIncDate: incDate, companyIncType, companyIncState, companySubIndustry, } = incInfo;
|
|
56
|
+
const { fileIds, companyIncDate: incDate, companyIncType, companyIncState, companySubIndustry, countriesOfOperations, companySourceOfFunds: incCompanySourceOfFunds, companySourceOfFundsDescription, transactionVolume, transactionVolumeDescription, purposeOfAccount, purposeOfAccountDescription, regulatedStatus, regulatedStatusDescription, usNexus, usNexusTypes, } = incInfo;
|
|
57
57
|
const { companyIndustry } = questionaire;
|
|
58
58
|
const { taxId } = taxInfo;
|
|
59
59
|
const companyDetails = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.19.
|
|
3
|
+
"version": "4.19.66",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|