@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.
Files changed (141) hide show
  1. package/bundle/bundle.umd.js +38 -5
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/components/Header/HeaderChatBotButton.d.ts +1 -0
  4. package/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +1 -1
  5. package/bundle/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -1
  6. package/bundle/retail/adaptors/utils.d.ts +1 -1
  7. package/bundle/retail/api/getOrganizationFromInn.d.ts +2 -0
  8. package/bundle/retail/api/updateProfileEsia.d.ts +11 -0
  9. package/bundle/retail/api/updateUserTask.d.ts +2 -2
  10. package/bundle/retail/components/DraftDialog/utils.d.ts +8 -8
  11. package/bundle/retail/model/LeadFormState.d.ts +9 -9
  12. package/dist/components/ApplicationLeadForm/pasreEsiaProfile.js +11 -1
  13. package/dist/components/ApplicationLeadForm/pasreEsiaProfile.js.map +1 -1
  14. package/dist/components/Header/HeaderChatBotButton.d.ts +1 -0
  15. package/dist/components/Header/HeaderChatBotButton.js +2 -2
  16. package/dist/components/Header/HeaderChatBotButton.js.map +1 -1
  17. package/dist/components/Header/HeaderSecondaryMenuButton.d.ts +1 -1
  18. package/dist/components/Header/HeaderSecondaryMenuButton.js +1 -0
  19. package/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
  20. package/dist/components/Header/HeaderTop.js +4 -1
  21. package/dist/components/Header/HeaderTop.js.map +1 -1
  22. package/dist/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -1
  23. package/dist/retail/adaptors/getFamilyStatusAndIncomeData.js +1 -1
  24. package/dist/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
  25. package/dist/retail/adaptors/utils.d.ts +1 -1
  26. package/dist/retail/api/getOrganizationFromInn.d.ts +2 -0
  27. package/dist/retail/api/getOrganizationFromInn.js +12 -0
  28. package/dist/retail/api/getOrganizationFromInn.js.map +1 -0
  29. package/dist/retail/api/updateProfileEsia.d.ts +11 -0
  30. package/dist/retail/api/updateProfileEsia.js.map +1 -1
  31. package/dist/retail/api/updateUserTask.d.ts +2 -2
  32. package/dist/retail/components/DraftDialog/utils.d.ts +8 -8
  33. package/dist/retail/components/Fields/DaDataInnField.js +15 -0
  34. package/dist/retail/components/Fields/DaDataInnField.js.map +1 -1
  35. package/dist/retail/model/LeadFormState.d.ts +9 -9
  36. package/lib/components/ApplicationLeadForm/pasreEsiaProfile.js +11 -1
  37. package/lib/components/ApplicationLeadForm/pasreEsiaProfile.js.map +1 -1
  38. package/lib/components/Header/HeaderChatBotButton.d.ts +1 -0
  39. package/lib/components/Header/HeaderChatBotButton.js +2 -2
  40. package/lib/components/Header/HeaderChatBotButton.js.map +1 -1
  41. package/lib/components/Header/HeaderSecondaryMenuButton.d.ts +1 -1
  42. package/lib/components/Header/HeaderSecondaryMenuButton.js +1 -0
  43. package/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
  44. package/lib/components/Header/HeaderTop.js +4 -1
  45. package/lib/components/Header/HeaderTop.js.map +1 -1
  46. package/lib/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -1
  47. package/lib/retail/adaptors/getFamilyStatusAndIncomeData.js +1 -1
  48. package/lib/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
  49. package/lib/retail/adaptors/utils.d.ts +1 -1
  50. package/lib/retail/api/getOrganizationFromInn.d.ts +2 -0
  51. package/lib/retail/api/getOrganizationFromInn.js +9 -0
  52. package/lib/retail/api/getOrganizationFromInn.js.map +1 -0
  53. package/lib/retail/api/updateProfileEsia.d.ts +11 -0
  54. package/lib/retail/api/updateProfileEsia.js.map +1 -1
  55. package/lib/retail/api/updateUserTask.d.ts +2 -2
  56. package/lib/retail/components/DraftDialog/utils.d.ts +8 -8
  57. package/lib/retail/components/Fields/DaDataInnField.js +16 -1
  58. package/lib/retail/components/Fields/DaDataInnField.js.map +1 -1
  59. package/lib/retail/model/LeadFormState.d.ts +9 -9
  60. package/mobile/bundle/bundle.umd.js +126 -4
  61. package/mobile/bundle/bundle.umd.min.js +1 -1
  62. package/mobile/bundle/components/Header/HeaderChatBotButton.d.ts +1 -0
  63. package/mobile/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +1 -1
  64. package/mobile/bundle/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -1
  65. package/mobile/bundle/retail/adaptors/utils.d.ts +1 -1
  66. package/mobile/bundle/retail/api/getOrganizationFromInn.d.ts +2 -0
  67. package/mobile/bundle/retail/api/updateProfileEsia.d.ts +11 -0
  68. package/mobile/bundle/retail/api/updateUserTask.d.ts +2 -2
  69. package/mobile/bundle/retail/components/DraftDialog/utils.d.ts +8 -8
  70. package/mobile/bundle/retail/model/LeadFormState.d.ts +9 -9
  71. package/mobile/dist/components/ApplicationLeadForm/pasreEsiaProfile.js +11 -1
  72. package/mobile/dist/components/ApplicationLeadForm/pasreEsiaProfile.js.map +1 -1
  73. package/mobile/dist/components/Header/HeaderChatBotButton.d.ts +1 -0
  74. package/mobile/dist/components/Header/HeaderChatBotButton.js +2 -2
  75. package/mobile/dist/components/Header/HeaderChatBotButton.js.map +1 -1
  76. package/mobile/dist/components/Header/HeaderSecondaryMenuButton.d.ts +1 -1
  77. package/mobile/dist/components/Header/HeaderSecondaryMenuButton.js +1 -0
  78. package/mobile/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
  79. package/mobile/dist/components/Header/HeaderTop.js +4 -1
  80. package/mobile/dist/components/Header/HeaderTop.js.map +1 -1
  81. package/mobile/dist/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -1
  82. package/mobile/dist/retail/adaptors/getFamilyStatusAndIncomeData.js +1 -1
  83. package/mobile/dist/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
  84. package/mobile/dist/retail/adaptors/utils.d.ts +1 -1
  85. package/mobile/dist/retail/api/getOrganizationFromInn.d.ts +2 -0
  86. package/mobile/dist/retail/api/getOrganizationFromInn.js +12 -0
  87. package/mobile/dist/retail/api/getOrganizationFromInn.js.map +1 -0
  88. package/mobile/dist/retail/api/updateProfileEsia.d.ts +11 -0
  89. package/mobile/dist/retail/api/updateProfileEsia.js.map +1 -1
  90. package/mobile/dist/retail/api/updateUserTask.d.ts +2 -2
  91. package/mobile/dist/retail/components/DraftDialog/utils.d.ts +8 -8
  92. package/mobile/dist/retail/components/Fields/DaDataInnField.js +15 -0
  93. package/mobile/dist/retail/components/Fields/DaDataInnField.js.map +1 -1
  94. package/mobile/dist/retail/model/LeadFormState.d.ts +9 -9
  95. package/mobile/lib/components/ApplicationLeadForm/pasreEsiaProfile.js +11 -1
  96. package/mobile/lib/components/ApplicationLeadForm/pasreEsiaProfile.js.map +1 -1
  97. package/mobile/lib/components/Header/HeaderChatBotButton.d.ts +1 -0
  98. package/mobile/lib/components/Header/HeaderChatBotButton.js +2 -2
  99. package/mobile/lib/components/Header/HeaderChatBotButton.js.map +1 -1
  100. package/mobile/lib/components/Header/HeaderSecondaryMenuButton.d.ts +1 -1
  101. package/mobile/lib/components/Header/HeaderSecondaryMenuButton.js +1 -0
  102. package/mobile/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
  103. package/mobile/lib/components/Header/HeaderTop.js +4 -1
  104. package/mobile/lib/components/Header/HeaderTop.js.map +1 -1
  105. package/mobile/lib/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -1
  106. package/mobile/lib/retail/adaptors/getFamilyStatusAndIncomeData.js +1 -1
  107. package/mobile/lib/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
  108. package/mobile/lib/retail/adaptors/utils.d.ts +1 -1
  109. package/mobile/lib/retail/api/getOrganizationFromInn.d.ts +2 -0
  110. package/mobile/lib/retail/api/getOrganizationFromInn.js +9 -0
  111. package/mobile/lib/retail/api/getOrganizationFromInn.js.map +1 -0
  112. package/mobile/lib/retail/api/updateProfileEsia.d.ts +11 -0
  113. package/mobile/lib/retail/api/updateProfileEsia.js.map +1 -1
  114. package/mobile/lib/retail/api/updateUserTask.d.ts +2 -2
  115. package/mobile/lib/retail/components/DraftDialog/utils.d.ts +8 -8
  116. package/mobile/lib/retail/components/Fields/DaDataInnField.js +16 -1
  117. package/mobile/lib/retail/components/Fields/DaDataInnField.js.map +1 -1
  118. package/mobile/lib/retail/model/LeadFormState.d.ts +9 -9
  119. package/mobile/src/components/ApplicationLeadForm/pasreEsiaProfile.ts +13 -1
  120. package/mobile/src/components/Header/HeaderChatBotButton.tsx +10 -2
  121. package/mobile/src/components/Header/HeaderSecondaryMenuButton.tsx +2 -1
  122. package/mobile/src/components/Header/HeaderTop.tsx +15 -1
  123. package/mobile/src/retail/adaptors/getFamilyStatusAndIncomeData.ts +2 -2
  124. package/mobile/src/retail/adaptors/utils.ts +1 -1
  125. package/mobile/src/retail/api/getOrganizationFromInn.ts +11 -0
  126. package/mobile/src/retail/api/updateProfileEsia.ts +11 -0
  127. package/mobile/src/retail/api/updateUserTask.ts +2 -2
  128. package/mobile/src/retail/components/Fields/DaDataInnField.tsx +17 -1
  129. package/mobile/src/retail/model/LeadFormState.ts +9 -9
  130. package/package.json +1 -1
  131. package/src/components/ApplicationLeadForm/pasreEsiaProfile.ts +13 -1
  132. package/src/components/Header/HeaderChatBotButton.tsx +10 -2
  133. package/src/components/Header/HeaderSecondaryMenuButton.tsx +2 -1
  134. package/src/components/Header/HeaderTop.tsx +15 -1
  135. package/src/retail/adaptors/getFamilyStatusAndIncomeData.ts +2 -2
  136. package/src/retail/adaptors/utils.ts +1 -1
  137. package/src/retail/api/getOrganizationFromInn.ts +11 -0
  138. package/src/retail/api/updateProfileEsia.ts +11 -0
  139. package/src/retail/api/updateUserTask.ts +2 -2
  140. package/src/retail/components/Fields/DaDataInnField.tsx +17 -1
  141. package/src/retail/model/LeadFormState.ts +9 -9
@@ -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: number;
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?: number;
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?: number;
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?: number;
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?: number;
149
- otherIncome?: number;
150
- mandatoryPayments?: number;
151
- additionalIncome?: number;
152
- otherPayments?: number;
153
- rentalIncome?: number;
154
- wages?: number;
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;