@redneckz/wildless-cms-uni-blocks 0.14.794 → 0.14.796
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/bundle/bundle.umd.js +38 -5
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Header/HeaderChatBotButton.d.ts +1 -0
- package/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +1 -1
- package/bundle/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -1
- package/bundle/retail/adaptors/utils.d.ts +1 -1
- package/bundle/retail/api/getOrganizationFromInn.d.ts +2 -0
- package/bundle/retail/api/updateProfileEsia.d.ts +11 -0
- package/bundle/retail/api/updateUserTask.d.ts +2 -2
- package/bundle/retail/components/DraftDialog/utils.d.ts +8 -8
- package/bundle/retail/model/LeadFormState.d.ts +9 -9
- package/dist/components/ApplicationLeadForm/pasreEsiaProfile.js +11 -1
- package/dist/components/ApplicationLeadForm/pasreEsiaProfile.js.map +1 -1
- package/dist/components/Header/HeaderChatBotButton.d.ts +1 -0
- package/dist/components/Header/HeaderChatBotButton.js +2 -2
- package/dist/components/Header/HeaderChatBotButton.js.map +1 -1
- package/dist/components/Header/HeaderSecondaryMenuButton.d.ts +1 -1
- package/dist/components/Header/HeaderSecondaryMenuButton.js +1 -0
- package/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/dist/components/Header/HeaderTop.js +4 -1
- package/dist/components/Header/HeaderTop.js.map +1 -1
- package/dist/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -1
- package/dist/retail/adaptors/getFamilyStatusAndIncomeData.js +1 -1
- package/dist/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
- package/dist/retail/adaptors/utils.d.ts +1 -1
- package/dist/retail/api/getOrganizationFromInn.d.ts +2 -0
- package/dist/retail/api/getOrganizationFromInn.js +12 -0
- package/dist/retail/api/getOrganizationFromInn.js.map +1 -0
- package/dist/retail/api/updateProfileEsia.d.ts +11 -0
- package/dist/retail/api/updateProfileEsia.js.map +1 -1
- package/dist/retail/api/updateUserTask.d.ts +2 -2
- package/dist/retail/components/DraftDialog/utils.d.ts +8 -8
- package/dist/retail/components/Fields/DaDataInnField.js +15 -0
- package/dist/retail/components/Fields/DaDataInnField.js.map +1 -1
- package/dist/retail/model/LeadFormState.d.ts +9 -9
- package/lib/components/ApplicationLeadForm/pasreEsiaProfile.js +11 -1
- package/lib/components/ApplicationLeadForm/pasreEsiaProfile.js.map +1 -1
- package/lib/components/Header/HeaderChatBotButton.d.ts +1 -0
- package/lib/components/Header/HeaderChatBotButton.js +2 -2
- package/lib/components/Header/HeaderChatBotButton.js.map +1 -1
- package/lib/components/Header/HeaderSecondaryMenuButton.d.ts +1 -1
- package/lib/components/Header/HeaderSecondaryMenuButton.js +1 -0
- package/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/lib/components/Header/HeaderTop.js +4 -1
- package/lib/components/Header/HeaderTop.js.map +1 -1
- package/lib/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -1
- package/lib/retail/adaptors/getFamilyStatusAndIncomeData.js +1 -1
- package/lib/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
- package/lib/retail/adaptors/utils.d.ts +1 -1
- package/lib/retail/api/getOrganizationFromInn.d.ts +2 -0
- package/lib/retail/api/getOrganizationFromInn.js +9 -0
- package/lib/retail/api/getOrganizationFromInn.js.map +1 -0
- package/lib/retail/api/updateProfileEsia.d.ts +11 -0
- package/lib/retail/api/updateProfileEsia.js.map +1 -1
- package/lib/retail/api/updateUserTask.d.ts +2 -2
- package/lib/retail/components/DraftDialog/utils.d.ts +8 -8
- package/lib/retail/components/Fields/DaDataInnField.js +16 -1
- package/lib/retail/components/Fields/DaDataInnField.js.map +1 -1
- package/lib/retail/model/LeadFormState.d.ts +9 -9
- package/mobile/bundle/bundle.umd.js +126 -4
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Header/HeaderChatBotButton.d.ts +1 -0
- package/mobile/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +1 -1
- package/mobile/bundle/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -1
- package/mobile/bundle/retail/adaptors/utils.d.ts +1 -1
- package/mobile/bundle/retail/api/getOrganizationFromInn.d.ts +2 -0
- package/mobile/bundle/retail/api/updateProfileEsia.d.ts +11 -0
- package/mobile/bundle/retail/api/updateUserTask.d.ts +2 -2
- package/mobile/bundle/retail/components/DraftDialog/utils.d.ts +8 -8
- package/mobile/bundle/retail/model/LeadFormState.d.ts +9 -9
- package/mobile/dist/components/ApplicationLeadForm/pasreEsiaProfile.js +11 -1
- package/mobile/dist/components/ApplicationLeadForm/pasreEsiaProfile.js.map +1 -1
- package/mobile/dist/components/Header/HeaderChatBotButton.d.ts +1 -0
- package/mobile/dist/components/Header/HeaderChatBotButton.js +2 -2
- package/mobile/dist/components/Header/HeaderChatBotButton.js.map +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenuButton.d.ts +1 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenuButton.js +1 -0
- package/mobile/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/mobile/dist/components/Header/HeaderTop.js +4 -1
- package/mobile/dist/components/Header/HeaderTop.js.map +1 -1
- package/mobile/dist/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -1
- package/mobile/dist/retail/adaptors/getFamilyStatusAndIncomeData.js +1 -1
- package/mobile/dist/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
- package/mobile/dist/retail/adaptors/utils.d.ts +1 -1
- package/mobile/dist/retail/api/getOrganizationFromInn.d.ts +2 -0
- package/mobile/dist/retail/api/getOrganizationFromInn.js +12 -0
- package/mobile/dist/retail/api/getOrganizationFromInn.js.map +1 -0
- package/mobile/dist/retail/api/updateProfileEsia.d.ts +11 -0
- package/mobile/dist/retail/api/updateProfileEsia.js.map +1 -1
- package/mobile/dist/retail/api/updateUserTask.d.ts +2 -2
- package/mobile/dist/retail/components/DraftDialog/utils.d.ts +8 -8
- package/mobile/dist/retail/components/Fields/DaDataInnField.js +15 -0
- package/mobile/dist/retail/components/Fields/DaDataInnField.js.map +1 -1
- package/mobile/dist/retail/model/LeadFormState.d.ts +9 -9
- package/mobile/lib/components/ApplicationLeadForm/pasreEsiaProfile.js +11 -1
- package/mobile/lib/components/ApplicationLeadForm/pasreEsiaProfile.js.map +1 -1
- package/mobile/lib/components/Header/HeaderChatBotButton.d.ts +1 -0
- package/mobile/lib/components/Header/HeaderChatBotButton.js +2 -2
- package/mobile/lib/components/Header/HeaderChatBotButton.js.map +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenuButton.d.ts +1 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenuButton.js +1 -0
- package/mobile/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/mobile/lib/components/Header/HeaderTop.js +4 -1
- package/mobile/lib/components/Header/HeaderTop.js.map +1 -1
- package/mobile/lib/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -1
- package/mobile/lib/retail/adaptors/getFamilyStatusAndIncomeData.js +1 -1
- package/mobile/lib/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
- package/mobile/lib/retail/adaptors/utils.d.ts +1 -1
- package/mobile/lib/retail/api/getOrganizationFromInn.d.ts +2 -0
- package/mobile/lib/retail/api/getOrganizationFromInn.js +9 -0
- package/mobile/lib/retail/api/getOrganizationFromInn.js.map +1 -0
- package/mobile/lib/retail/api/updateProfileEsia.d.ts +11 -0
- package/mobile/lib/retail/api/updateProfileEsia.js.map +1 -1
- package/mobile/lib/retail/api/updateUserTask.d.ts +2 -2
- package/mobile/lib/retail/components/DraftDialog/utils.d.ts +8 -8
- package/mobile/lib/retail/components/Fields/DaDataInnField.js +16 -1
- package/mobile/lib/retail/components/Fields/DaDataInnField.js.map +1 -1
- package/mobile/lib/retail/model/LeadFormState.d.ts +9 -9
- package/mobile/src/components/ApplicationLeadForm/pasreEsiaProfile.ts +13 -1
- package/mobile/src/components/Header/HeaderChatBotButton.tsx +10 -2
- package/mobile/src/components/Header/HeaderSecondaryMenuButton.tsx +2 -1
- package/mobile/src/components/Header/HeaderTop.tsx +15 -1
- package/mobile/src/retail/adaptors/getFamilyStatusAndIncomeData.ts +2 -2
- package/mobile/src/retail/adaptors/utils.ts +1 -1
- package/mobile/src/retail/api/getOrganizationFromInn.ts +11 -0
- package/mobile/src/retail/api/updateProfileEsia.ts +11 -0
- package/mobile/src/retail/api/updateUserTask.ts +2 -2
- package/mobile/src/retail/components/Fields/DaDataInnField.tsx +17 -1
- package/mobile/src/retail/model/LeadFormState.ts +9 -9
- package/package.json +1 -1
- package/src/components/ApplicationLeadForm/pasreEsiaProfile.ts +13 -1
- package/src/components/Header/HeaderChatBotButton.tsx +10 -2
- package/src/components/Header/HeaderSecondaryMenuButton.tsx +2 -1
- package/src/components/Header/HeaderTop.tsx +15 -1
- package/src/retail/adaptors/getFamilyStatusAndIncomeData.ts +2 -2
- package/src/retail/adaptors/utils.ts +1 -1
- package/src/retail/api/getOrganizationFromInn.ts +11 -0
- package/src/retail/api/updateProfileEsia.ts +11 -0
- package/src/retail/api/updateUserTask.ts +2 -2
- package/src/retail/components/Fields/DaDataInnField.tsx +17 -1
- package/src/retail/model/LeadFormState.ts +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderTop.js","sourceRoot":"","sources":["../../../src/components/Header/HeaderTop.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"HeaderTop.js","sourceRoot":"","sources":["../../../src/components/Header/HeaderTop.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAKrD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAW1D,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAC1B,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,kBAAkB,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,EAAE;IACjF,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,cAAc,GAAG,MAAM,CAAC,QAAQ,KAAK,GAAG,CAAC;IAC/C,MAAM,WAAW,GAAgB,OAAO,KAAK,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;IAE/E,6DAA6D;IAC7D,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,SAAS,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC;IAE5D,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,EAAE;QAC/B,MAAM,CAAC,IAAI,EAAE,CAAC;IAChB,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAEb,OAAO,CACL,eAAK,SAAS,EAAC,0CAA0C,aACtD,cAAc,IAAI,cAAc,CAAC,CAAC,CAAC,CAClC,wBACE,KAAC,IAAI,IACH,SAAS,EAAC,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,SAAS,EACf,IAAI,EAAE,UAAU,EAChB,SAAS,EAAE,KAAK,GAChB,GACE,CACP,CAAC,CAAC,CAAC,CACF,gBAAgB,CAAC,OAAO,EAAE,cAAc,CAAC,CAC1C,EACD,eAAK,SAAS,EAAC,0BAA0B,aACtC,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC,CAC1B,KAAC,mBAAmB,IAClB,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,eAAe,CAAC,QAAQ,EAC9B,UAAU,EAAC,QAAQ,GACnB,CACH,CAAC,CAAC,CAAC,IAAI,EACR,KAAC,kBAAkB,IAAC,OAAO,EAAE,OAAO,KAAM,kBAAkB,GAAI,IAC5D,IACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,gBAAgB,GAAG,CAAC,OAAmB,EAAE,IAAa,EAAE,EAAE,CAC9D,IAAI,CAAC,CAAC,CAAC,CACL,kBACE,SAAS,EAAC,iCAAiC,EAC3C,OAAO,EAAE,OAAO,EAChB,IAAI,EAAC,QAAQ,gBACF,qEAAc,aAEzB,KAAC,IAAI,IAAC,IAAI,EAAC,iBAAiB,EAAC,WAAW,EAAC,OAAO,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,GAAG,EACzE,IAAI,IACE,CACV,CAAC,CAAC,CAAC,IAAI,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type Participant } from '../api/updateUserTask';
|
|
2
2
|
import { type LeadFormState } from '../model/LeadFormState';
|
|
3
3
|
export declare const getFamilyStatusAndIncomeData: (formData: LeadFormState) => Partial<Participant>;
|
|
4
|
-
export declare const countIncomeAverage: (wages?:
|
|
4
|
+
export declare const countIncomeAverage: (wages?: string, retirementIncome?: string) => string;
|
|
@@ -22,5 +22,5 @@ export const getFamilyStatusAndIncomeData = (formData) => {
|
|
|
22
22
|
armyIdFlg,
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
|
-
export const countIncomeAverage = (wages, retirementIncome) => Number(wages ?? 0) + Number(retirementIncome ?? 0);
|
|
25
|
+
export const countIncomeAverage = (wages, retirementIncome) => (Number(wages ?? 0) + Number(retirementIncome ?? 0)).toString();
|
|
26
26
|
//# sourceMappingURL=getFamilyStatusAndIncomeData.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getFamilyStatusAndIncomeData.js","sourceRoot":"","sources":["../../../src/retail/adaptors/getFamilyStatusAndIncomeData.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAEhD,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,QAAuB,EAAwB,EAAE;IAC5F,MAAM,EACJ,YAAY,EACZ,aAAa,EACb,UAAU,EACV,QAAQ,EACR,kBAAkB,EAClB,KAAK,EACL,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,KAAK,EACL,SAAS,EACT,YAAY,GACb,GAAG,QAAQ,CAAC;IAEb,OAAO;QACL,eAAe,EAAE,YAAY;QAC7B,eAAe,EAAE,aAAa;QAC9B,mBAAmB,EAAE,kBAAkB;QACvC,eAAe,EAAE,UAAU;QAC3B,kBAAkB,EAAE,QAAQ;QAC5B,gBAAgB,EAAE,YAAY;QAC9B,kBAAkB,EAAE,qBAAqB,CAAC;YACxC,KAAK;YACL,iBAAiB;YACjB,aAAa,EAAE,kBAAkB,CAAC,KAAK,EAAE,gBAAgB,CAAC;YAC1D,gBAAgB;YAChB,WAAW;YACX,aAAa;YACb,YAAY;YACZ,gBAAgB;SACjB,CAAC;QACF,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;QACnC,SAAS;KACV,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAAc,EAAE,gBAAyB,EAAE,EAAE,CAC9E,MAAM,CAAC,KAAK,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,gBAAgB,IAAI,CAAC,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"getFamilyStatusAndIncomeData.js","sourceRoot":"","sources":["../../../src/retail/adaptors/getFamilyStatusAndIncomeData.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAEhD,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,QAAuB,EAAwB,EAAE;IAC5F,MAAM,EACJ,YAAY,EACZ,aAAa,EACb,UAAU,EACV,QAAQ,EACR,kBAAkB,EAClB,KAAK,EACL,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,KAAK,EACL,SAAS,EACT,YAAY,GACb,GAAG,QAAQ,CAAC;IAEb,OAAO;QACL,eAAe,EAAE,YAAY;QAC7B,eAAe,EAAE,aAAa;QAC9B,mBAAmB,EAAE,kBAAkB;QACvC,eAAe,EAAE,UAAU;QAC3B,kBAAkB,EAAE,QAAQ;QAC5B,gBAAgB,EAAE,YAAY;QAC9B,kBAAkB,EAAE,qBAAqB,CAAC;YACxC,KAAK;YACL,iBAAiB;YACjB,aAAa,EAAE,kBAAkB,CAAC,KAAK,EAAE,gBAAgB,CAAC;YAC1D,gBAAgB;YAChB,WAAW;YACX,aAAa;YACb,YAAY;YACZ,gBAAgB;SACjB,CAAC;QACF,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;QACnC,SAAS;KACV,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAAc,EAAE,gBAAyB,EAAE,EAAE,CAC9E,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,gBAAgB,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC"}
|
|
@@ -22,4 +22,4 @@ export declare const fieldsNamesToIncomeKeysMap: {
|
|
|
22
22
|
};
|
|
23
23
|
export declare const getParticipantContacts: (fields: Record<string, string | undefined>) => any[];
|
|
24
24
|
export declare const getParticipantAddresses: (fields: Record<string, Address | undefined>) => any[];
|
|
25
|
-
export declare const getParticipantIncomes: (fields: Record<string,
|
|
25
|
+
export declare const getParticipantIncomes: (fields: Record<string, string | undefined>) => any[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { getDaDataHints } from './dadataHints/dadataHints.js';
|
|
2
|
+
export const getOrganizationFromInn = async (inn) => {
|
|
3
|
+
const res = await getDaDataHints({
|
|
4
|
+
url: 'suggest/party',
|
|
5
|
+
query: inn,
|
|
6
|
+
});
|
|
7
|
+
return res?.[0];
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=getOrganizationFromInn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getOrganizationFromInn.js","sourceRoot":"","sources":["../../../src/retail/api/getOrganizationFromInn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAG3D,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,EAAE,GAAW,EAA6B,EAAE;IACrF,MAAM,GAAG,GAAG,MAAM,cAAc,CAAC;QAC/B,GAAG,EAAE,eAAe;QACpB,KAAK,EAAE,GAAG;KACX,CAAC,CAAC;IAEH,OAAO,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC"}
|
|
@@ -62,5 +62,16 @@ export declare type UpdateProfileEsiaResponse = {
|
|
|
62
62
|
block: string;
|
|
63
63
|
apartment: string;
|
|
64
64
|
};
|
|
65
|
+
esiaAdditionalDocument: {
|
|
66
|
+
averageMonthlyIncome: number;
|
|
67
|
+
inn: string;
|
|
68
|
+
jobsNumberInFiveYears: string;
|
|
69
|
+
startWorkDate: string;
|
|
70
|
+
workLength: number;
|
|
71
|
+
workLengthInFiveYears: number;
|
|
72
|
+
workLengthLastJob: number;
|
|
73
|
+
pdfFileWorkbook: string;
|
|
74
|
+
pdfFilePayout: string;
|
|
75
|
+
};
|
|
65
76
|
};
|
|
66
77
|
export declare const updateProfileEsia: (body: UpdateProfileEsiaBody) => Promise<UpdateProfileEsiaResponse | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateProfileEsia.js","sourceRoot":"","sources":["../../../src/retail/api/updateProfileEsia.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"updateProfileEsia.js","sourceRoot":"","sources":["../../../src/retail/api/updateProfileEsia.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAgF9C,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,IAA2B,EAAE,EAAE,CAC/D,eAAe,CAA4B,yBAAyB,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC"}
|
|
@@ -23,7 +23,7 @@ declare type ParticipantIncome = {
|
|
|
23
23
|
incomeTypeCd: {
|
|
24
24
|
key: 'INCOME_AVERAGE' | 'ADDITIONAL_INCOME' | 'MANDATORY_PAYMENTS' | 'OTHER_INCOME' | 'OTHER_PAYMENTS' | 'RENTAL_INCOME' | 'WAGES' | 'RETIREMENT_INCOME';
|
|
25
25
|
};
|
|
26
|
-
value:
|
|
26
|
+
value: string;
|
|
27
27
|
};
|
|
28
28
|
export declare type PaymentType = {
|
|
29
29
|
key: 'ANNUITY' | 'DIFFERENTIAL';
|
|
@@ -61,7 +61,7 @@ export declare type Participant = {
|
|
|
61
61
|
maritalStatusCd?: Option;
|
|
62
62
|
militaryStatusCd?: Option;
|
|
63
63
|
organizationActivityTypeCd?: Option;
|
|
64
|
-
organizationInn?:
|
|
64
|
+
organizationInn?: string;
|
|
65
65
|
organizationKindCd?: Option;
|
|
66
66
|
organizationName?: string;
|
|
67
67
|
organizationTypeCd?: Option;
|
|
@@ -69,14 +69,14 @@ export declare const creditProgramCodeToProductIdMap: {
|
|
|
69
69
|
summer_cash_pens: string;
|
|
70
70
|
};
|
|
71
71
|
export declare const getParticipantIncomes: (participantIncomes: Participant['participantIncomes']) => {
|
|
72
|
-
wages:
|
|
73
|
-
mandatoryPayments:
|
|
74
|
-
incomeAverage:
|
|
75
|
-
additionalIncome:
|
|
76
|
-
otherIncome:
|
|
77
|
-
otherPayments:
|
|
78
|
-
rentalIncome:
|
|
79
|
-
retirementIncome:
|
|
72
|
+
wages: string | undefined;
|
|
73
|
+
mandatoryPayments: string | undefined;
|
|
74
|
+
incomeAverage: string;
|
|
75
|
+
additionalIncome: string | undefined;
|
|
76
|
+
otherIncome: string | undefined;
|
|
77
|
+
otherPayments: string | undefined;
|
|
78
|
+
rentalIncome: string | undefined;
|
|
79
|
+
retirementIncome: string | undefined;
|
|
80
80
|
};
|
|
81
81
|
export declare const getParticipantAddresses: (participantAddresses: Participant['participantAddresses']) => {
|
|
82
82
|
addressRegistration: {
|
|
@@ -1,15 +1,30 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
+
import { useCallback, useEffect } from '@redneckz/uni-jsx/lib/hooks';
|
|
4
|
+
import { getOrganizationFromInn } from '../../api/getOrganizationFromInn.js';
|
|
4
5
|
import { useRetailFormStore } from '../../hooks/useRetailFormStore.js';
|
|
5
6
|
import { updateOrganizationFields } from '../../utils/updateOrganizationFields.js';
|
|
6
7
|
import { DaDataInputControl } from '../DaDataInputControl/DaDataInputControl.js';
|
|
7
8
|
export const DaDataInnField = JSX(({ field, input }) => {
|
|
8
9
|
const store = useRetailFormStore();
|
|
10
|
+
const esiaAccountTypeCd = field?.('esiaAccountTypeCd')?.value;
|
|
11
|
+
const inn = field?.('inn')?.value;
|
|
9
12
|
const onDaDataChange = useCallback((item) => {
|
|
10
13
|
field?.('organizationName')?.onChange?.(item.data?.name?.short_with_opf);
|
|
11
14
|
updateOrganizationFields(store, field, item);
|
|
12
15
|
}, []);
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
if (!esiaAccountTypeCd || !inn) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
(async () => {
|
|
21
|
+
const organization = await getOrganizationFromInn(inn);
|
|
22
|
+
if (organization) {
|
|
23
|
+
field?.('organizationName')?.onChange?.(organization.data?.name?.short_with_opf);
|
|
24
|
+
updateOrganizationFields(store, field, organization);
|
|
25
|
+
}
|
|
26
|
+
})();
|
|
27
|
+
}, []);
|
|
13
28
|
return (_jsx(DaDataInputControl, { label: "\u0418\u041D\u041D", isInteger: true, maxLength: 12, ...input, ...field(input?.name ?? ''), onDaDataChange: onDaDataChange }));
|
|
14
29
|
});
|
|
15
30
|
//# sourceMappingURL=DaDataInnField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DaDataInnField.js","sourceRoot":"","sources":["../../../../src/retail/components/Fields/DaDataInnField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"DaDataInnField.js","sourceRoot":"","sources":["../../../../src/retail/components/Fields/DaDataInnField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAGrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAE9E,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAmB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;IACvE,MAAM,KAAK,GAAG,kBAAkB,EAAE,CAAC;IACnC,MAAM,iBAAiB,GAAG,KAAK,EAAE,CAAC,mBAAmB,CAAC,EAAE,KAAK,CAAC;IAC9D,MAAM,GAAG,GAAG,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;IAElC,MAAM,cAAc,GAAG,WAAW,CAAC,CAAC,IAAsB,EAAE,EAAE;QAC5D,KAAK,EAAE,CAAC,kBAAkB,CAAC,EAAE,QAAQ,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;QACzE,wBAAwB,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IAC/C,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,iBAAiB,IAAI,CAAC,GAAG,EAAE;YAC9B,OAAO;SACR;QACD,CAAC,KAAK,IAAI,EAAE;YACV,MAAM,YAAY,GAAG,MAAM,sBAAsB,CAAC,GAAa,CAAC,CAAC;YACjE,IAAI,YAAY,EAAE;gBAChB,KAAK,EAAE,CAAC,kBAAkB,CAAC,EAAE,QAAQ,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;gBACjF,wBAAwB,CAAC,KAAK,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC;aACtD;QACH,CAAC,CAAC,EAAE,CAAC;IACP,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,KAAC,kBAAkB,IACjB,KAAK,EAAC,oBAAK,EACX,SAAS,EAAE,IAAI,EACf,SAAS,EAAE,EAAE,KACT,KAAK,KACL,KAAK,CAAC,KAAK,EAAE,IAAI,IAAI,EAAE,CAAC,EAC5B,cAAc,EAAE,cAAc,GAC9B,CACH,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -98,7 +98,7 @@ export interface LeadFormState extends FormRetailConsents, FormStateDeliveryType
|
|
|
98
98
|
annualRevenue?: string;
|
|
99
99
|
serviceDirection?: string;
|
|
100
100
|
desiredMeetingDate?: string;
|
|
101
|
-
inn?:
|
|
101
|
+
inn?: string;
|
|
102
102
|
legalForm?: string;
|
|
103
103
|
organizationName?: string;
|
|
104
104
|
generalSeniority?: string;
|
|
@@ -126,20 +126,20 @@ export interface LeadFormState extends FormRetailConsents, FormStateDeliveryType
|
|
|
126
126
|
familyMembers?: string;
|
|
127
127
|
children?: string;
|
|
128
128
|
dependents?: string;
|
|
129
|
-
totalIncome?:
|
|
129
|
+
totalIncome?: string;
|
|
130
130
|
expenses?: number;
|
|
131
131
|
snils?: string;
|
|
132
132
|
conscription?: Option;
|
|
133
133
|
armyIdFlg?: boolean;
|
|
134
134
|
addressRegistration?: Address;
|
|
135
135
|
participantDateRegistration?: Date | string;
|
|
136
|
-
retirementIncome?:
|
|
137
|
-
otherIncome?:
|
|
138
|
-
mandatoryPayments?:
|
|
139
|
-
additionalIncome?:
|
|
140
|
-
otherPayments?:
|
|
141
|
-
rentalIncome?:
|
|
142
|
-
wages?:
|
|
136
|
+
retirementIncome?: string;
|
|
137
|
+
otherIncome?: string;
|
|
138
|
+
mandatoryPayments?: string;
|
|
139
|
+
additionalIncome?: string;
|
|
140
|
+
otherPayments?: string;
|
|
141
|
+
rentalIncome?: string;
|
|
142
|
+
wages?: string;
|
|
143
143
|
creditInRshbCd?: Option;
|
|
144
144
|
bankruptcyFlg?: boolean;
|
|
145
145
|
shareholderFlg?: boolean;
|
|
@@ -3,7 +3,8 @@ import { type Address, type LeadFormState } from '../../retail/model/LeadFormSta
|
|
|
3
3
|
import { normalizePhone } from '../../ui-kit/PhoneInput/normalizePhone';
|
|
4
4
|
|
|
5
5
|
export const parseEsiaProfile = (esiaProfile: UpdateProfileEsiaResponse): LeadFormState => {
|
|
6
|
-
const { profile, addInfo, document, addressRegistration, addressFact } =
|
|
6
|
+
const { profile, addInfo, document, addressRegistration, addressFact, esiaAdditionalDocument } =
|
|
7
|
+
esiaProfile;
|
|
7
8
|
|
|
8
9
|
return {
|
|
9
10
|
name: profile?.name,
|
|
@@ -22,6 +23,15 @@ export const parseEsiaProfile = (esiaProfile: UpdateProfileEsiaResponse): LeadFo
|
|
|
22
23
|
addressRegistration: buildAddress(addressRegistration),
|
|
23
24
|
addressFact: buildAddress(addressFact),
|
|
24
25
|
esiaAccountTypeCd: profile?.esiaAccountType,
|
|
26
|
+
inn: esiaAdditionalDocument?.inn,
|
|
27
|
+
wages: esiaAdditionalDocument?.averageMonthlyIncome
|
|
28
|
+
? Math.floor(esiaAdditionalDocument.averageMonthlyIncome)?.toString()
|
|
29
|
+
: undefined,
|
|
30
|
+
beginDate: esiaAdditionalDocument?.startWorkDate,
|
|
31
|
+
experience5Years: getYearFromMonth(esiaAdditionalDocument?.workLengthInFiveYears)?.toString(),
|
|
32
|
+
generalSeniority: getYearFromMonth(esiaAdditionalDocument?.workLength)?.toString(),
|
|
33
|
+
lastJobExperience: getYearFromMonth(esiaAdditionalDocument?.workLengthLastJob)?.toString(),
|
|
34
|
+
jobsNumber: esiaAdditionalDocument?.jobsNumberInFiveYears?.toString(),
|
|
25
35
|
};
|
|
26
36
|
};
|
|
27
37
|
|
|
@@ -68,3 +78,5 @@ const buildAddress = (fields: UpdateProfileEsiaResponse['addressRegistration']):
|
|
|
68
78
|
fullAddress,
|
|
69
79
|
};
|
|
70
80
|
};
|
|
81
|
+
|
|
82
|
+
const getYearFromMonth = (month?: number) => (month ? Math.floor(month / 12) : null);
|
|
@@ -12,10 +12,18 @@ interface HeaderChatBotButtonProps {
|
|
|
12
12
|
onClick?: (ev: PreventableEventWithTarget) => void;
|
|
13
13
|
ariaLabel?: string;
|
|
14
14
|
version?: BlockVersion;
|
|
15
|
+
buttonSize?: 'default' | 'medium' | 'large';
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
export const HeaderChatBotButton = JSX<HeaderChatBotButtonProps>(
|
|
18
|
-
({
|
|
19
|
+
({
|
|
20
|
+
chat = 'personal',
|
|
21
|
+
iconVersion,
|
|
22
|
+
className,
|
|
23
|
+
ariaLabel = 'Чат',
|
|
24
|
+
version,
|
|
25
|
+
buttonSize = 'large',
|
|
26
|
+
}) => {
|
|
19
27
|
const { load, isLoading } = useChatBot(chat);
|
|
20
28
|
|
|
21
29
|
return (
|
|
@@ -24,7 +32,7 @@ export const HeaderChatBotButton = JSX<HeaderChatBotButtonProps>(
|
|
|
24
32
|
image={{ icon: 'HeadphonesIcon', iconVersion }}
|
|
25
33
|
ariaLabel={ariaLabel}
|
|
26
34
|
onClick={load}
|
|
27
|
-
buttonSize=
|
|
35
|
+
buttonSize={buttonSize}
|
|
28
36
|
isGrayBg={true}
|
|
29
37
|
version={version}
|
|
30
38
|
isLoading={isLoading}
|
|
@@ -10,7 +10,7 @@ import { style } from '../../utils/style';
|
|
|
10
10
|
export interface HeaderSecondaryMenuButtonProps extends ImageContent, AspectsProps {
|
|
11
11
|
className?: string;
|
|
12
12
|
isRounded?: boolean;
|
|
13
|
-
buttonSize?: 'default' | 'large';
|
|
13
|
+
buttonSize?: 'default' | 'medium' | 'large';
|
|
14
14
|
isGrayBg?: boolean;
|
|
15
15
|
disabled?: boolean;
|
|
16
16
|
ariaLabel?: string;
|
|
@@ -23,6 +23,7 @@ export interface HeaderSecondaryMenuButtonProps extends ImageContent, AspectsPro
|
|
|
23
23
|
|
|
24
24
|
const BUTTON_SIZE_STYLE = {
|
|
25
25
|
default: 'w-6 h-6',
|
|
26
|
+
medium: 'w-10 h-10',
|
|
26
27
|
large: 'w-12 h-12',
|
|
27
28
|
};
|
|
28
29
|
|
|
@@ -3,9 +3,12 @@ import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
|
3
3
|
import { useRouter } from '../../external/useRouter';
|
|
4
4
|
import { type BgColorVersion } from '../../model/BgColorVersion';
|
|
5
5
|
import { type BlockVersion } from '../../model/BlockVersion';
|
|
6
|
+
import { type IconVersion } from '../../model/IconVersion';
|
|
6
7
|
import { type LogoType } from '../../model/LogoType';
|
|
8
|
+
import { projectSettings } from '../../ProjectSettings';
|
|
7
9
|
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
8
10
|
import { Logo } from '../../ui-kit/Logo/Logo';
|
|
11
|
+
import { HeaderChatBotButton } from './HeaderChatBotButton';
|
|
9
12
|
import { type InternetButtonProps } from './HeaderProps';
|
|
10
13
|
import { InternetBankButton } from './InternetBankButton';
|
|
11
14
|
|
|
@@ -22,6 +25,7 @@ export const HeaderTop = JSX<HeaderTopProps>(
|
|
|
22
25
|
({ bgColor, logo, alwaysShowLogo, internetBankButton, version, backwardButton }) => {
|
|
23
26
|
const router = useRouter();
|
|
24
27
|
const isRootLocation = router.pathname === '/';
|
|
28
|
+
const iconVersion: IconVersion = version === 'transparent' ? 'white' : 'black';
|
|
25
29
|
|
|
26
30
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
27
31
|
const { dataFooter, dataHeader, ...logoProps } = logo ?? {};
|
|
@@ -45,7 +49,17 @@ export const HeaderTop = JSX<HeaderTopProps>(
|
|
|
45
49
|
) : (
|
|
46
50
|
renderBackButton(onClick, backwardButton)
|
|
47
51
|
)}
|
|
48
|
-
<
|
|
52
|
+
<div className="flex gap-lg items-center">
|
|
53
|
+
{projectSettings.CHAT_BOT ? (
|
|
54
|
+
<HeaderChatBotButton
|
|
55
|
+
version={version}
|
|
56
|
+
iconVersion={iconVersion}
|
|
57
|
+
chat={projectSettings.CHAT_BOT}
|
|
58
|
+
buttonSize="medium"
|
|
59
|
+
/>
|
|
60
|
+
) : null}
|
|
61
|
+
<InternetBankButton version={version} {...internetBankButton} />
|
|
62
|
+
</div>
|
|
49
63
|
</div>
|
|
50
64
|
);
|
|
51
65
|
},
|
|
@@ -43,5 +43,5 @@ export const getFamilyStatusAndIncomeData = (formData: LeadFormState): Partial<P
|
|
|
43
43
|
};
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
-
export const countIncomeAverage = (wages?:
|
|
47
|
-
Number(wages ?? 0) + Number(retirementIncome ?? 0);
|
|
46
|
+
export const countIncomeAverage = (wages?: string, retirementIncome?: string) =>
|
|
47
|
+
(Number(wages ?? 0) + Number(retirementIncome ?? 0)).toString();
|
|
@@ -64,7 +64,7 @@ export const getParticipantAddresses = (fields: Record<string, Address | undefin
|
|
|
64
64
|
return acc;
|
|
65
65
|
}, []);
|
|
66
66
|
|
|
67
|
-
export const getParticipantIncomes = (fields: Record<string,
|
|
67
|
+
export const getParticipantIncomes = (fields: Record<string, string | undefined>): any[] =>
|
|
68
68
|
Object.entries(fields).reduce((acc: any[], [key, value]) => {
|
|
69
69
|
if (key in fieldsNamesToIncomeKeysMap) {
|
|
70
70
|
return [
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { getDaDataHints } from './dadataHints/dadataHints';
|
|
2
|
+
import { type DaDataSuggestion } from './dadataHints/dadataHintsType';
|
|
3
|
+
|
|
4
|
+
export const getOrganizationFromInn = async (inn: string): Promise<DaDataSuggestion> => {
|
|
5
|
+
const res = await getDaDataHints({
|
|
6
|
+
url: 'suggest/party',
|
|
7
|
+
query: inn,
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
return res?.[0];
|
|
11
|
+
};
|
|
@@ -65,6 +65,17 @@ export type UpdateProfileEsiaResponse = {
|
|
|
65
65
|
block: string;
|
|
66
66
|
apartment: string;
|
|
67
67
|
};
|
|
68
|
+
esiaAdditionalDocument: {
|
|
69
|
+
averageMonthlyIncome: number;
|
|
70
|
+
inn: string;
|
|
71
|
+
jobsNumberInFiveYears: string;
|
|
72
|
+
startWorkDate: string;
|
|
73
|
+
workLength: number;
|
|
74
|
+
workLengthInFiveYears: number;
|
|
75
|
+
workLengthLastJob: number;
|
|
76
|
+
pdfFileWorkbook: string;
|
|
77
|
+
pdfFilePayout: string;
|
|
78
|
+
};
|
|
68
79
|
};
|
|
69
80
|
|
|
70
81
|
export const updateProfileEsia = (body: UpdateProfileEsiaBody) =>
|
|
@@ -34,7 +34,7 @@ type ParticipantIncome = {
|
|
|
34
34
|
| 'WAGES'
|
|
35
35
|
| 'RETIREMENT_INCOME';
|
|
36
36
|
};
|
|
37
|
-
value:
|
|
37
|
+
value: string;
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
export type PaymentType = {
|
|
@@ -74,7 +74,7 @@ export type Participant = {
|
|
|
74
74
|
maritalStatusCd?: Option;
|
|
75
75
|
militaryStatusCd?: Option;
|
|
76
76
|
organizationActivityTypeCd?: Option;
|
|
77
|
-
organizationInn?:
|
|
77
|
+
organizationInn?: string;
|
|
78
78
|
organizationKindCd?: Option;
|
|
79
79
|
organizationName?: string;
|
|
80
80
|
organizationTypeCd?: Option;
|
|
@@ -1,19 +1,35 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
|
+
import { useCallback, useEffect } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { type CustomFieldProps } from '../../../ui-kit/FormField/CustomFieldProps';
|
|
4
4
|
import { type DaDataSuggestion } from '../../api/dadataHints/dadataHintsType';
|
|
5
|
+
import { getOrganizationFromInn } from '../../api/getOrganizationFromInn';
|
|
5
6
|
import { useRetailFormStore } from '../../hooks/useRetailFormStore';
|
|
6
7
|
import { updateOrganizationFields } from '../../utils/updateOrganizationFields';
|
|
7
8
|
import { DaDataInputControl } from '../DaDataInputControl/DaDataInputControl';
|
|
8
9
|
|
|
9
10
|
export const DaDataInnField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
10
11
|
const store = useRetailFormStore();
|
|
12
|
+
const esiaAccountTypeCd = field?.('esiaAccountTypeCd')?.value;
|
|
13
|
+
const inn = field?.('inn')?.value;
|
|
11
14
|
|
|
12
15
|
const onDaDataChange = useCallback((item: DaDataSuggestion) => {
|
|
13
16
|
field?.('organizationName')?.onChange?.(item.data?.name?.short_with_opf);
|
|
14
17
|
updateOrganizationFields(store, field, item);
|
|
15
18
|
}, []);
|
|
16
19
|
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
if (!esiaAccountTypeCd || !inn) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
(async () => {
|
|
25
|
+
const organization = await getOrganizationFromInn(inn as string);
|
|
26
|
+
if (organization) {
|
|
27
|
+
field?.('organizationName')?.onChange?.(organization.data?.name?.short_with_opf);
|
|
28
|
+
updateOrganizationFields(store, field, organization);
|
|
29
|
+
}
|
|
30
|
+
})();
|
|
31
|
+
}, []);
|
|
32
|
+
|
|
17
33
|
return (
|
|
18
34
|
<DaDataInputControl
|
|
19
35
|
label="ИНН"
|
|
@@ -110,7 +110,7 @@ export interface LeadFormState extends FormRetailConsents, FormStateDeliveryType
|
|
|
110
110
|
annualRevenue?: string;
|
|
111
111
|
serviceDirection?: string;
|
|
112
112
|
desiredMeetingDate?: string;
|
|
113
|
-
inn?:
|
|
113
|
+
inn?: string;
|
|
114
114
|
legalForm?: string;
|
|
115
115
|
organizationName?: string;
|
|
116
116
|
generalSeniority?: string;
|
|
@@ -138,20 +138,20 @@ export interface LeadFormState extends FormRetailConsents, FormStateDeliveryType
|
|
|
138
138
|
familyMembers?: string;
|
|
139
139
|
children?: string;
|
|
140
140
|
dependents?: string;
|
|
141
|
-
totalIncome?:
|
|
141
|
+
totalIncome?: string;
|
|
142
142
|
expenses?: number;
|
|
143
143
|
snils?: string;
|
|
144
144
|
conscription?: Option;
|
|
145
145
|
armyIdFlg?: boolean;
|
|
146
146
|
addressRegistration?: Address;
|
|
147
147
|
participantDateRegistration?: Date | string;
|
|
148
|
-
retirementIncome?:
|
|
149
|
-
otherIncome?:
|
|
150
|
-
mandatoryPayments?:
|
|
151
|
-
additionalIncome?:
|
|
152
|
-
otherPayments?:
|
|
153
|
-
rentalIncome?:
|
|
154
|
-
wages?:
|
|
148
|
+
retirementIncome?: string;
|
|
149
|
+
otherIncome?: string;
|
|
150
|
+
mandatoryPayments?: string;
|
|
151
|
+
additionalIncome?: string;
|
|
152
|
+
otherPayments?: string;
|
|
153
|
+
rentalIncome?: string;
|
|
154
|
+
wages?: string;
|
|
155
155
|
creditInRshbCd?: Option;
|
|
156
156
|
bankruptcyFlg?: boolean;
|
|
157
157
|
shareholderFlg?: boolean;
|
package/package.json
CHANGED
|
@@ -3,7 +3,8 @@ import { type Address, type LeadFormState } from '../../retail/model/LeadFormSta
|
|
|
3
3
|
import { normalizePhone } from '../../ui-kit/PhoneInput/normalizePhone';
|
|
4
4
|
|
|
5
5
|
export const parseEsiaProfile = (esiaProfile: UpdateProfileEsiaResponse): LeadFormState => {
|
|
6
|
-
const { profile, addInfo, document, addressRegistration, addressFact } =
|
|
6
|
+
const { profile, addInfo, document, addressRegistration, addressFact, esiaAdditionalDocument } =
|
|
7
|
+
esiaProfile;
|
|
7
8
|
|
|
8
9
|
return {
|
|
9
10
|
name: profile?.name,
|
|
@@ -22,6 +23,15 @@ export const parseEsiaProfile = (esiaProfile: UpdateProfileEsiaResponse): LeadFo
|
|
|
22
23
|
addressRegistration: buildAddress(addressRegistration),
|
|
23
24
|
addressFact: buildAddress(addressFact),
|
|
24
25
|
esiaAccountTypeCd: profile?.esiaAccountType,
|
|
26
|
+
inn: esiaAdditionalDocument?.inn,
|
|
27
|
+
wages: esiaAdditionalDocument?.averageMonthlyIncome
|
|
28
|
+
? Math.floor(esiaAdditionalDocument.averageMonthlyIncome)?.toString()
|
|
29
|
+
: undefined,
|
|
30
|
+
beginDate: esiaAdditionalDocument?.startWorkDate,
|
|
31
|
+
experience5Years: getYearFromMonth(esiaAdditionalDocument?.workLengthInFiveYears)?.toString(),
|
|
32
|
+
generalSeniority: getYearFromMonth(esiaAdditionalDocument?.workLength)?.toString(),
|
|
33
|
+
lastJobExperience: getYearFromMonth(esiaAdditionalDocument?.workLengthLastJob)?.toString(),
|
|
34
|
+
jobsNumber: esiaAdditionalDocument?.jobsNumberInFiveYears?.toString(),
|
|
25
35
|
};
|
|
26
36
|
};
|
|
27
37
|
|
|
@@ -68,3 +78,5 @@ const buildAddress = (fields: UpdateProfileEsiaResponse['addressRegistration']):
|
|
|
68
78
|
fullAddress,
|
|
69
79
|
};
|
|
70
80
|
};
|
|
81
|
+
|
|
82
|
+
const getYearFromMonth = (month?: number) => (month ? Math.floor(month / 12) : null);
|
|
@@ -12,10 +12,18 @@ interface HeaderChatBotButtonProps {
|
|
|
12
12
|
onClick?: (ev: PreventableEventWithTarget) => void;
|
|
13
13
|
ariaLabel?: string;
|
|
14
14
|
version?: BlockVersion;
|
|
15
|
+
buttonSize?: 'default' | 'medium' | 'large';
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
export const HeaderChatBotButton = JSX<HeaderChatBotButtonProps>(
|
|
18
|
-
({
|
|
19
|
+
({
|
|
20
|
+
chat = 'personal',
|
|
21
|
+
iconVersion,
|
|
22
|
+
className,
|
|
23
|
+
ariaLabel = 'Чат',
|
|
24
|
+
version,
|
|
25
|
+
buttonSize = 'large',
|
|
26
|
+
}) => {
|
|
19
27
|
const { load, isLoading } = useChatBot(chat);
|
|
20
28
|
|
|
21
29
|
return (
|
|
@@ -24,7 +32,7 @@ export const HeaderChatBotButton = JSX<HeaderChatBotButtonProps>(
|
|
|
24
32
|
image={{ icon: 'HeadphonesIcon', iconVersion }}
|
|
25
33
|
ariaLabel={ariaLabel}
|
|
26
34
|
onClick={load}
|
|
27
|
-
buttonSize=
|
|
35
|
+
buttonSize={buttonSize}
|
|
28
36
|
isGrayBg={true}
|
|
29
37
|
version={version}
|
|
30
38
|
isLoading={isLoading}
|
|
@@ -10,7 +10,7 @@ import { style } from '../../utils/style';
|
|
|
10
10
|
export interface HeaderSecondaryMenuButtonProps extends ImageContent, AspectsProps {
|
|
11
11
|
className?: string;
|
|
12
12
|
isRounded?: boolean;
|
|
13
|
-
buttonSize?: 'default' | 'large';
|
|
13
|
+
buttonSize?: 'default' | 'medium' | 'large';
|
|
14
14
|
isGrayBg?: boolean;
|
|
15
15
|
disabled?: boolean;
|
|
16
16
|
ariaLabel?: string;
|
|
@@ -23,6 +23,7 @@ export interface HeaderSecondaryMenuButtonProps extends ImageContent, AspectsPro
|
|
|
23
23
|
|
|
24
24
|
const BUTTON_SIZE_STYLE = {
|
|
25
25
|
default: 'w-6 h-6',
|
|
26
|
+
medium: 'w-10 h-10',
|
|
26
27
|
large: 'w-12 h-12',
|
|
27
28
|
};
|
|
28
29
|
|
|
@@ -3,9 +3,12 @@ import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
|
3
3
|
import { useRouter } from '../../external/useRouter';
|
|
4
4
|
import { type BgColorVersion } from '../../model/BgColorVersion';
|
|
5
5
|
import { type BlockVersion } from '../../model/BlockVersion';
|
|
6
|
+
import { type IconVersion } from '../../model/IconVersion';
|
|
6
7
|
import { type LogoType } from '../../model/LogoType';
|
|
8
|
+
import { projectSettings } from '../../ProjectSettings';
|
|
7
9
|
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
8
10
|
import { Logo } from '../../ui-kit/Logo/Logo';
|
|
11
|
+
import { HeaderChatBotButton } from './HeaderChatBotButton';
|
|
9
12
|
import { type InternetButtonProps } from './HeaderProps';
|
|
10
13
|
import { InternetBankButton } from './InternetBankButton';
|
|
11
14
|
|
|
@@ -22,6 +25,7 @@ export const HeaderTop = JSX<HeaderTopProps>(
|
|
|
22
25
|
({ bgColor, logo, alwaysShowLogo, internetBankButton, version, backwardButton }) => {
|
|
23
26
|
const router = useRouter();
|
|
24
27
|
const isRootLocation = router.pathname === '/';
|
|
28
|
+
const iconVersion: IconVersion = version === 'transparent' ? 'white' : 'black';
|
|
25
29
|
|
|
26
30
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
27
31
|
const { dataFooter, dataHeader, ...logoProps } = logo ?? {};
|
|
@@ -45,7 +49,17 @@ export const HeaderTop = JSX<HeaderTopProps>(
|
|
|
45
49
|
) : (
|
|
46
50
|
renderBackButton(onClick, backwardButton)
|
|
47
51
|
)}
|
|
48
|
-
<
|
|
52
|
+
<div className="flex gap-lg items-center">
|
|
53
|
+
{projectSettings.CHAT_BOT ? (
|
|
54
|
+
<HeaderChatBotButton
|
|
55
|
+
version={version}
|
|
56
|
+
iconVersion={iconVersion}
|
|
57
|
+
chat={projectSettings.CHAT_BOT}
|
|
58
|
+
buttonSize="medium"
|
|
59
|
+
/>
|
|
60
|
+
) : null}
|
|
61
|
+
<InternetBankButton version={version} {...internetBankButton} />
|
|
62
|
+
</div>
|
|
49
63
|
</div>
|
|
50
64
|
);
|
|
51
65
|
},
|
|
@@ -43,5 +43,5 @@ export const getFamilyStatusAndIncomeData = (formData: LeadFormState): Partial<P
|
|
|
43
43
|
};
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
-
export const countIncomeAverage = (wages?:
|
|
47
|
-
Number(wages ?? 0) + Number(retirementIncome ?? 0);
|
|
46
|
+
export const countIncomeAverage = (wages?: string, retirementIncome?: string) =>
|
|
47
|
+
(Number(wages ?? 0) + Number(retirementIncome ?? 0)).toString();
|
|
@@ -64,7 +64,7 @@ export const getParticipantAddresses = (fields: Record<string, Address | undefin
|
|
|
64
64
|
return acc;
|
|
65
65
|
}, []);
|
|
66
66
|
|
|
67
|
-
export const getParticipantIncomes = (fields: Record<string,
|
|
67
|
+
export const getParticipantIncomes = (fields: Record<string, string | undefined>): any[] =>
|
|
68
68
|
Object.entries(fields).reduce((acc: any[], [key, value]) => {
|
|
69
69
|
if (key in fieldsNamesToIncomeKeysMap) {
|
|
70
70
|
return [
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { getDaDataHints } from './dadataHints/dadataHints';
|
|
2
|
+
import { type DaDataSuggestion } from './dadataHints/dadataHintsType';
|
|
3
|
+
|
|
4
|
+
export const getOrganizationFromInn = async (inn: string): Promise<DaDataSuggestion> => {
|
|
5
|
+
const res = await getDaDataHints({
|
|
6
|
+
url: 'suggest/party',
|
|
7
|
+
query: inn,
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
return res?.[0];
|
|
11
|
+
};
|