@redneckz/wildless-cms-uni-blocks 0.14.797 → 0.14.799

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 (287) hide show
  1. package/bundle/bundle.umd.js +183 -64
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/components/ApplicationLeadForm/{pasreEsiaProfile.d.ts → parseEsiaProfile.d.ts} +1 -1
  4. package/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
  5. package/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +8 -1
  6. package/bundle/retail/api/doRequest.d.ts +3 -0
  7. package/bundle/retail/api/updateUserTask.d.ts +2 -0
  8. package/bundle/retail/api/uploadFile.d.ts +3 -0
  9. package/bundle/retail/model/LeadFormState.d.ts +13 -0
  10. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +11 -2
  11. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  12. package/dist/components/ApplicationLeadForm/{pasreEsiaProfile.d.ts → parseEsiaProfile.d.ts} +1 -1
  13. package/dist/components/ApplicationLeadForm/parseEsiaProfile.js +141 -0
  14. package/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -0
  15. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
  16. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +8 -2
  17. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  18. package/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +8 -1
  19. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +8 -4
  20. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  21. package/dist/components/CalculatorDeposit/getDepositCalculatorParams.js +3 -1
  22. package/dist/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
  23. package/dist/components/CreditCardForm/getCreditCardFormTaskData.js +1 -0
  24. package/dist/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
  25. package/dist/retail/adaptors/getCreditFormTaskData.js +1 -0
  26. package/dist/retail/adaptors/getCreditFormTaskData.js.map +1 -1
  27. package/dist/retail/api/doRequest.d.ts +3 -0
  28. package/dist/retail/api/doRequest.js +3 -2
  29. package/dist/retail/api/doRequest.js.map +1 -1
  30. package/dist/retail/api/updateUserTask.d.ts +2 -0
  31. package/dist/retail/api/updateUserTask.js.map +1 -1
  32. package/dist/retail/api/uploadFile.d.ts +3 -0
  33. package/dist/retail/api/uploadFile.js +22 -0
  34. package/dist/retail/api/uploadFile.js.map +1 -0
  35. package/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +1 -0
  36. package/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  37. package/dist/retail/components/Fields/DaDataInnField.js +10 -8
  38. package/dist/retail/components/Fields/DaDataInnField.js.map +1 -1
  39. package/dist/retail/components/Fields/Experience5YearsField.js +2 -1
  40. package/dist/retail/components/Fields/Experience5YearsField.js.map +1 -1
  41. package/dist/retail/components/Fields/GeneralSeniorityField.js +2 -1
  42. package/dist/retail/components/Fields/GeneralSeniorityField.js.map +1 -1
  43. package/dist/retail/components/Fields/JobsNumberField.js +2 -1
  44. package/dist/retail/components/Fields/JobsNumberField.js.map +1 -1
  45. package/dist/retail/components/Fields/LastJobExperienceField.js +2 -1
  46. package/dist/retail/components/Fields/LastJobExperienceField.js.map +1 -1
  47. package/dist/retail/components/Fields/OrganizationNameField.js +2 -1
  48. package/dist/retail/components/Fields/OrganizationNameField.js.map +1 -1
  49. package/dist/retail/components/Fields/WagesField.js +2 -1
  50. package/dist/retail/components/Fields/WagesField.js.map +1 -1
  51. package/dist/retail/content.js +8 -8
  52. package/dist/retail/content.js.map +1 -1
  53. package/dist/retail/model/LeadFormState.d.ts +13 -0
  54. package/dist/retail/utils/updateOrganizationFields.js +3 -1
  55. package/dist/retail/utils/updateOrganizationFields.js.map +1 -1
  56. package/dist/ui-kit/FormField/Fields/MiddleNameField.js +2 -1
  57. package/dist/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
  58. package/dist/ui-kit/FormField/Fields/NameField.js +2 -1
  59. package/dist/ui-kit/FormField/Fields/NameField.js.map +1 -1
  60. package/dist/ui-kit/FormField/Fields/SurnameField.js +2 -1
  61. package/dist/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
  62. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +11 -2
  63. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  64. package/lib/components/ApplicationLeadForm/{pasreEsiaProfile.d.ts → parseEsiaProfile.d.ts} +1 -1
  65. package/lib/components/ApplicationLeadForm/parseEsiaProfile.js +138 -0
  66. package/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -0
  67. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
  68. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +8 -2
  69. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  70. package/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +8 -1
  71. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +8 -4
  72. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  73. package/lib/components/CalculatorDeposit/getDepositCalculatorParams.js +3 -1
  74. package/lib/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
  75. package/lib/components/CreditCardForm/getCreditCardFormTaskData.js +1 -0
  76. package/lib/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
  77. package/lib/retail/adaptors/getCreditFormTaskData.js +1 -0
  78. package/lib/retail/adaptors/getCreditFormTaskData.js.map +1 -1
  79. package/lib/retail/api/doRequest.d.ts +3 -0
  80. package/lib/retail/api/doRequest.js +1 -1
  81. package/lib/retail/api/doRequest.js.map +1 -1
  82. package/lib/retail/api/updateUserTask.d.ts +2 -0
  83. package/lib/retail/api/updateUserTask.js.map +1 -1
  84. package/lib/retail/api/uploadFile.d.ts +3 -0
  85. package/lib/retail/api/uploadFile.js +19 -0
  86. package/lib/retail/api/uploadFile.js.map +1 -0
  87. package/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +1 -0
  88. package/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  89. package/lib/retail/components/Fields/DaDataInnField.js +10 -8
  90. package/lib/retail/components/Fields/DaDataInnField.js.map +1 -1
  91. package/lib/retail/components/Fields/Experience5YearsField.js +2 -1
  92. package/lib/retail/components/Fields/Experience5YearsField.js.map +1 -1
  93. package/lib/retail/components/Fields/GeneralSeniorityField.js +2 -1
  94. package/lib/retail/components/Fields/GeneralSeniorityField.js.map +1 -1
  95. package/lib/retail/components/Fields/JobsNumberField.js +2 -1
  96. package/lib/retail/components/Fields/JobsNumberField.js.map +1 -1
  97. package/lib/retail/components/Fields/LastJobExperienceField.js +2 -1
  98. package/lib/retail/components/Fields/LastJobExperienceField.js.map +1 -1
  99. package/lib/retail/components/Fields/OrganizationNameField.js +2 -1
  100. package/lib/retail/components/Fields/OrganizationNameField.js.map +1 -1
  101. package/lib/retail/components/Fields/WagesField.js +2 -1
  102. package/lib/retail/components/Fields/WagesField.js.map +1 -1
  103. package/lib/retail/content.js +8 -8
  104. package/lib/retail/content.js.map +1 -1
  105. package/lib/retail/model/LeadFormState.d.ts +13 -0
  106. package/lib/retail/utils/updateOrganizationFields.js +3 -1
  107. package/lib/retail/utils/updateOrganizationFields.js.map +1 -1
  108. package/lib/ui-kit/FormField/Fields/MiddleNameField.js +2 -1
  109. package/lib/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
  110. package/lib/ui-kit/FormField/Fields/NameField.js +2 -1
  111. package/lib/ui-kit/FormField/Fields/NameField.js.map +1 -1
  112. package/lib/ui-kit/FormField/Fields/SurnameField.js +2 -1
  113. package/lib/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
  114. package/mobile/bundle/bundle.umd.js +183 -64
  115. package/mobile/bundle/bundle.umd.min.js +1 -1
  116. package/mobile/bundle/components/ApplicationLeadForm/{pasreEsiaProfile.d.ts → parseEsiaProfile.d.ts} +1 -1
  117. package/mobile/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
  118. package/mobile/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +8 -1
  119. package/mobile/bundle/retail/api/doRequest.d.ts +3 -0
  120. package/mobile/bundle/retail/api/updateUserTask.d.ts +2 -0
  121. package/mobile/bundle/retail/api/uploadFile.d.ts +3 -0
  122. package/mobile/bundle/retail/model/LeadFormState.d.ts +13 -0
  123. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +11 -2
  124. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  125. package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.d.ts +3 -0
  126. package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js +141 -0
  127. package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -0
  128. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
  129. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +8 -2
  130. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  131. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +8 -1
  132. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +8 -4
  133. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  134. package/mobile/dist/components/CalculatorDeposit/getDepositCalculatorParams.js +3 -1
  135. package/mobile/dist/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
  136. package/mobile/dist/components/CreditCardForm/getCreditCardFormTaskData.js +1 -0
  137. package/mobile/dist/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
  138. package/mobile/dist/retail/adaptors/getCreditFormTaskData.js +1 -0
  139. package/mobile/dist/retail/adaptors/getCreditFormTaskData.js.map +1 -1
  140. package/mobile/dist/retail/api/doRequest.d.ts +3 -0
  141. package/mobile/dist/retail/api/doRequest.js +3 -2
  142. package/mobile/dist/retail/api/doRequest.js.map +1 -1
  143. package/mobile/dist/retail/api/updateUserTask.d.ts +2 -0
  144. package/mobile/dist/retail/api/updateUserTask.js.map +1 -1
  145. package/mobile/dist/retail/api/uploadFile.d.ts +3 -0
  146. package/mobile/dist/retail/api/uploadFile.js +22 -0
  147. package/mobile/dist/retail/api/uploadFile.js.map +1 -0
  148. package/mobile/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +1 -0
  149. package/mobile/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  150. package/mobile/dist/retail/components/Fields/DaDataInnField.js +10 -8
  151. package/mobile/dist/retail/components/Fields/DaDataInnField.js.map +1 -1
  152. package/mobile/dist/retail/components/Fields/Experience5YearsField.js +2 -1
  153. package/mobile/dist/retail/components/Fields/Experience5YearsField.js.map +1 -1
  154. package/mobile/dist/retail/components/Fields/GeneralSeniorityField.js +2 -1
  155. package/mobile/dist/retail/components/Fields/GeneralSeniorityField.js.map +1 -1
  156. package/mobile/dist/retail/components/Fields/JobsNumberField.js +2 -1
  157. package/mobile/dist/retail/components/Fields/JobsNumberField.js.map +1 -1
  158. package/mobile/dist/retail/components/Fields/LastJobExperienceField.js +2 -1
  159. package/mobile/dist/retail/components/Fields/LastJobExperienceField.js.map +1 -1
  160. package/mobile/dist/retail/components/Fields/OrganizationNameField.js +2 -1
  161. package/mobile/dist/retail/components/Fields/OrganizationNameField.js.map +1 -1
  162. package/mobile/dist/retail/components/Fields/WagesField.js +2 -1
  163. package/mobile/dist/retail/components/Fields/WagesField.js.map +1 -1
  164. package/mobile/dist/retail/content.js +8 -8
  165. package/mobile/dist/retail/content.js.map +1 -1
  166. package/mobile/dist/retail/model/LeadFormState.d.ts +13 -0
  167. package/mobile/dist/retail/utils/updateOrganizationFields.js +3 -1
  168. package/mobile/dist/retail/utils/updateOrganizationFields.js.map +1 -1
  169. package/mobile/dist/ui-kit/FormField/Fields/MiddleNameField.js +2 -1
  170. package/mobile/dist/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
  171. package/mobile/dist/ui-kit/FormField/Fields/NameField.js +2 -1
  172. package/mobile/dist/ui-kit/FormField/Fields/NameField.js.map +1 -1
  173. package/mobile/dist/ui-kit/FormField/Fields/SurnameField.js +2 -1
  174. package/mobile/dist/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
  175. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +11 -2
  176. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  177. package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.d.ts +3 -0
  178. package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js +138 -0
  179. package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -0
  180. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -1
  181. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +8 -2
  182. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  183. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +8 -1
  184. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +8 -4
  185. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  186. package/mobile/lib/components/CalculatorDeposit/getDepositCalculatorParams.js +3 -1
  187. package/mobile/lib/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
  188. package/mobile/lib/components/CreditCardForm/getCreditCardFormTaskData.js +1 -0
  189. package/mobile/lib/components/CreditCardForm/getCreditCardFormTaskData.js.map +1 -1
  190. package/mobile/lib/retail/adaptors/getCreditFormTaskData.js +1 -0
  191. package/mobile/lib/retail/adaptors/getCreditFormTaskData.js.map +1 -1
  192. package/mobile/lib/retail/api/doRequest.d.ts +3 -0
  193. package/mobile/lib/retail/api/doRequest.js +1 -1
  194. package/mobile/lib/retail/api/doRequest.js.map +1 -1
  195. package/mobile/lib/retail/api/updateUserTask.d.ts +2 -0
  196. package/mobile/lib/retail/api/updateUserTask.js.map +1 -1
  197. package/mobile/lib/retail/api/uploadFile.d.ts +3 -0
  198. package/mobile/lib/retail/api/uploadFile.js +19 -0
  199. package/mobile/lib/retail/api/uploadFile.js.map +1 -0
  200. package/mobile/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +1 -0
  201. package/mobile/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
  202. package/mobile/lib/retail/components/Fields/DaDataInnField.js +10 -8
  203. package/mobile/lib/retail/components/Fields/DaDataInnField.js.map +1 -1
  204. package/mobile/lib/retail/components/Fields/Experience5YearsField.js +2 -1
  205. package/mobile/lib/retail/components/Fields/Experience5YearsField.js.map +1 -1
  206. package/mobile/lib/retail/components/Fields/GeneralSeniorityField.js +2 -1
  207. package/mobile/lib/retail/components/Fields/GeneralSeniorityField.js.map +1 -1
  208. package/mobile/lib/retail/components/Fields/JobsNumberField.js +2 -1
  209. package/mobile/lib/retail/components/Fields/JobsNumberField.js.map +1 -1
  210. package/mobile/lib/retail/components/Fields/LastJobExperienceField.js +2 -1
  211. package/mobile/lib/retail/components/Fields/LastJobExperienceField.js.map +1 -1
  212. package/mobile/lib/retail/components/Fields/OrganizationNameField.js +2 -1
  213. package/mobile/lib/retail/components/Fields/OrganizationNameField.js.map +1 -1
  214. package/mobile/lib/retail/components/Fields/WagesField.js +2 -1
  215. package/mobile/lib/retail/components/Fields/WagesField.js.map +1 -1
  216. package/mobile/lib/retail/content.js +8 -8
  217. package/mobile/lib/retail/content.js.map +1 -1
  218. package/mobile/lib/retail/model/LeadFormState.d.ts +13 -0
  219. package/mobile/lib/retail/utils/updateOrganizationFields.js +3 -1
  220. package/mobile/lib/retail/utils/updateOrganizationFields.js.map +1 -1
  221. package/mobile/lib/ui-kit/FormField/Fields/MiddleNameField.js +2 -1
  222. package/mobile/lib/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
  223. package/mobile/lib/ui-kit/FormField/Fields/NameField.js +2 -1
  224. package/mobile/lib/ui-kit/FormField/Fields/NameField.js.map +1 -1
  225. package/mobile/lib/ui-kit/FormField/Fields/SurnameField.js +2 -1
  226. package/mobile/lib/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
  227. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +13 -2
  228. package/mobile/src/components/ApplicationLeadForm/parseEsiaProfile.ts +185 -0
  229. package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +64 -52
  230. package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +24 -8
  231. package/mobile/src/components/CalculatorDeposit/getDepositCalculatorParams.ts +3 -1
  232. package/mobile/src/components/CreditCardForm/getCreditCardFormTaskData.ts +1 -0
  233. package/mobile/src/retail/adaptors/getCreditFormTaskData.ts +1 -0
  234. package/mobile/src/retail/api/doRequest.ts +1 -1
  235. package/mobile/src/retail/api/updateUserTask.ts +3 -0
  236. package/mobile/src/retail/api/uploadFile.ts +28 -0
  237. package/mobile/src/retail/components/EsiaLoginDialog/EsiaLoginDialog.tsx +1 -0
  238. package/mobile/src/retail/components/Fields/DaDataInnField.tsx +12 -7
  239. package/mobile/src/retail/components/Fields/Experience5YearsField.tsx +2 -0
  240. package/mobile/src/retail/components/Fields/GeneralSeniorityField.tsx +2 -0
  241. package/mobile/src/retail/components/Fields/JobsNumberField.tsx +2 -0
  242. package/mobile/src/retail/components/Fields/LastJobExperienceField.tsx +2 -0
  243. package/mobile/src/retail/components/Fields/OrganizationNameField.tsx +2 -0
  244. package/mobile/src/retail/components/Fields/WagesField.tsx +2 -0
  245. package/mobile/src/retail/content.tsx +8 -8
  246. package/mobile/src/retail/model/LeadFormState.ts +14 -0
  247. package/mobile/src/retail/utils/updateOrganizationFields.ts +3 -1
  248. package/mobile/src/ui-kit/FormField/Fields/MiddleNameField.tsx +2 -0
  249. package/mobile/src/ui-kit/FormField/Fields/NameField.tsx +8 -1
  250. package/mobile/src/ui-kit/FormField/Fields/SurnameField.tsx +8 -1
  251. package/package.json +2 -2
  252. package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +13 -2
  253. package/src/components/ApplicationLeadForm/parseEsiaProfile.ts +185 -0
  254. package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +64 -52
  255. package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +24 -8
  256. package/src/components/CalculatorDeposit/getDepositCalculatorParams.ts +3 -1
  257. package/src/components/CreditCardForm/getCreditCardFormTaskData.ts +1 -0
  258. package/src/retail/adaptors/getCreditFormTaskData.ts +1 -0
  259. package/src/retail/api/doRequest.ts +1 -1
  260. package/src/retail/api/updateUserTask.ts +3 -0
  261. package/src/retail/api/uploadFile.ts +28 -0
  262. package/src/retail/components/EsiaLoginDialog/EsiaLoginDialog.tsx +1 -0
  263. package/src/retail/components/Fields/DaDataInnField.tsx +12 -7
  264. package/src/retail/components/Fields/Experience5YearsField.tsx +2 -0
  265. package/src/retail/components/Fields/GeneralSeniorityField.tsx +2 -0
  266. package/src/retail/components/Fields/JobsNumberField.tsx +2 -0
  267. package/src/retail/components/Fields/LastJobExperienceField.tsx +2 -0
  268. package/src/retail/components/Fields/OrganizationNameField.tsx +2 -0
  269. package/src/retail/components/Fields/WagesField.tsx +2 -0
  270. package/src/retail/content.tsx +8 -8
  271. package/src/retail/model/LeadFormState.ts +14 -0
  272. package/src/retail/utils/updateOrganizationFields.ts +3 -1
  273. package/src/ui-kit/FormField/Fields/MiddleNameField.tsx +2 -0
  274. package/src/ui-kit/FormField/Fields/NameField.tsx +8 -1
  275. package/src/ui-kit/FormField/Fields/SurnameField.tsx +8 -1
  276. package/dist/components/ApplicationLeadForm/pasreEsiaProfile.js +0 -63
  277. package/dist/components/ApplicationLeadForm/pasreEsiaProfile.js.map +0 -1
  278. package/lib/components/ApplicationLeadForm/pasreEsiaProfile.js +0 -60
  279. package/lib/components/ApplicationLeadForm/pasreEsiaProfile.js.map +0 -1
  280. package/mobile/dist/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +0 -3
  281. package/mobile/dist/components/ApplicationLeadForm/pasreEsiaProfile.js +0 -63
  282. package/mobile/dist/components/ApplicationLeadForm/pasreEsiaProfile.js.map +0 -1
  283. package/mobile/lib/components/ApplicationLeadForm/pasreEsiaProfile.d.ts +0 -3
  284. package/mobile/lib/components/ApplicationLeadForm/pasreEsiaProfile.js +0 -60
  285. package/mobile/lib/components/ApplicationLeadForm/pasreEsiaProfile.js.map +0 -1
  286. package/mobile/src/components/ApplicationLeadForm/pasreEsiaProfile.ts +0 -82
  287. package/src/components/ApplicationLeadForm/pasreEsiaProfile.ts +0 -82
@@ -1,6 +1,7 @@
1
1
  /* eslint-disable max-lines */
2
2
  import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
3
3
  import { useBool } from '@redneckz/uni-jsx/lib/hooks/useBool';
4
+ import { locationNavigator } from '../../external/locationNavigator';
4
5
  import { type AspectsProps } from '../../model/AspectsProps';
5
6
  import { createDraftTask } from '../../retail/api/createDraftTask';
6
7
  import { createUserProfile } from '../../retail/api/createUserProfile';
@@ -27,6 +28,7 @@ interface ApplicationLeadApiProps extends AspectsProps {
27
28
  programId: string;
28
29
  nextStepLink: string;
29
30
  productType: ProductType;
31
+ esiaError: boolean;
30
32
  }
31
33
 
32
34
  // eslint-disable-next-line max-lines-per-function
@@ -34,76 +36,86 @@ export const useApplicationLeadApi = ({
34
36
  programId,
35
37
  nextStepLink,
36
38
  productType,
39
+ esiaError,
37
40
  data,
38
41
  }: ApplicationLeadApiProps) => {
39
42
  const [isSending, { setTrue: startSending, setFalse: endSending }] = useBool(false);
40
43
  const [ok, setOK] = useState<boolean | undefined>();
41
44
  const saveUserData = useSaveUserData();
42
45
  const sendAspects = useSendLeadFormAspects({ data });
46
+ const navigator = locationNavigator();
43
47
 
44
48
  const openEsiaLoginDialog = useEsiaLoginDialog(nextStepLink);
45
49
  const consentBkiDialog = useConsentBkiDialog(openEsiaLoginDialog);
46
50
  const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
47
51
  const draftDialog = useDraftDialog();
48
52
 
49
- const handleSubmit = useCallback(async (formData: LeadFormState) => {
50
- try {
51
- startSending();
52
- const profileId = await createUserProfile({
53
- profile: { phone: formatPhone(formData.phone as string) },
54
- });
53
+ const handleSubmit = useCallback(
54
+ async (formData: LeadFormState) => {
55
+ if (esiaError) {
56
+ navigator.assign(nextStepLink);
55
57
 
56
- if (profileId && formData?.phone) {
57
- const sendCurrentTask = async () => {
58
- await updateUserData({
59
- programId,
60
- profileId,
61
- formData,
62
- productType,
63
- saveUserData,
64
- sendAspects,
65
- });
66
- verifyPhoneDialog.close();
67
- if (productType === 'debitCard') {
68
- openEsiaLoginDialog();
69
- } else {
70
- consentBkiDialog.open(formData.phone, profileId);
71
- }
72
- };
73
- const handleSuccessVerify = async () => {
74
- try {
75
- const lastTaskId = await getLastTaskStatus({ profileId, programId });
76
-
77
- if (lastTaskId) {
78
- const task = await getTaskById({ taskId: lastTaskId });
79
- verifyPhoneDialog.close();
80
- draftDialog.open({
81
- task,
82
- isFromLead: true,
83
- sendAspects,
84
- onClose: sendCurrentTask,
85
- });
58
+ return;
59
+ }
60
+ try {
61
+ startSending();
62
+ const profileId = await createUserProfile({
63
+ profile: { phone: formatPhone(formData.phone as string) },
64
+ });
65
+
66
+ if (profileId && formData?.phone) {
67
+ const sendCurrentTask = async () => {
68
+ await updateUserData({
69
+ programId,
70
+ profileId,
71
+ formData,
72
+ productType,
73
+ saveUserData,
74
+ sendAspects,
75
+ });
76
+ verifyPhoneDialog.close();
77
+ if (productType === 'debitCard') {
78
+ openEsiaLoginDialog();
86
79
  } else {
87
- await sendCurrentTask();
80
+ consentBkiDialog.open(formData.phone, profileId);
88
81
  }
89
- } catch {
90
- setOK(false);
91
- }
92
- };
82
+ };
83
+ const handleSuccessVerify = async () => {
84
+ try {
85
+ const lastTaskId = await getLastTaskStatus({ profileId, programId });
86
+
87
+ if (lastTaskId) {
88
+ const task = await getTaskById({ taskId: lastTaskId });
89
+ verifyPhoneDialog.close();
90
+ draftDialog.open({
91
+ task,
92
+ isFromLead: true,
93
+ sendAspects,
94
+ onClose: sendCurrentTask,
95
+ });
96
+ } else {
97
+ await sendCurrentTask();
98
+ }
99
+ } catch {
100
+ setOK(false);
101
+ }
102
+ };
93
103
 
94
- const acceptedConsents = getAcceptedConsents(formData, productType);
104
+ const acceptedConsents = getAcceptedConsents(formData, productType);
95
105
 
96
- verifyPhoneDialog.open({
97
- phone: formData?.phone,
98
- consents: acceptedConsents,
99
- onSuccess: handleSuccessVerify,
100
- });
101
- endSending();
106
+ verifyPhoneDialog.open({
107
+ phone: formData?.phone,
108
+ consents: acceptedConsents,
109
+ onSuccess: handleSuccessVerify,
110
+ });
111
+ endSending();
112
+ }
113
+ } catch {
114
+ setOK(false);
102
115
  }
103
- } catch {
104
- setOK(false);
105
- }
106
- }, []);
116
+ },
117
+ [esiaError],
118
+ );
107
119
 
108
120
  return { isSending, ok, handleSubmit };
109
121
  };
@@ -8,14 +8,22 @@ import { type FieldRetailDef } from '../../retail/model/RetailFormContent';
8
8
  import { safeJsonParse } from '../../utils/safeJsonParse';
9
9
  import { type ProductType } from './ApplicationLeadFormContent';
10
10
  import { getInitialFormState } from './getInitialFormState';
11
- import { parseEsiaProfile } from './pasreEsiaProfile';
11
+ import { parseEsiaProfile } from './parseEsiaProfile';
12
12
  import { useLeadFormStore } from './useLeadFormStore';
13
13
 
14
- export const useInitApplicationLead = (
15
- inputs: FieldRetailDef[],
16
- nextStepLink: string,
17
- productType: ProductType,
18
- ): [LeadFormState, { isLoading: boolean }] => {
14
+ type InitApplicationLeadProps = {
15
+ inputs: FieldRetailDef[];
16
+ nextStepLink: string;
17
+ productType: ProductType;
18
+ setEsiaError: () => void;
19
+ };
20
+
21
+ export const useInitApplicationLead = ({
22
+ inputs,
23
+ nextStepLink,
24
+ productType,
25
+ setEsiaError,
26
+ }: InitApplicationLeadProps): [LeadFormState, { isLoading: boolean }] => {
19
27
  const navigator = locationNavigator();
20
28
  const [isLoading, { setTrue: startLoading, setFalse: endLoading }] = useBool(false);
21
29
 
@@ -38,14 +46,22 @@ export const useInitApplicationLead = (
38
46
  redirectUri: globalThis.location?.href,
39
47
  });
40
48
 
41
- if (data) {
49
+ if (data && leadFormStore?.taskId) {
50
+ const parsedData = await parseEsiaProfile(
51
+ data,
52
+ leadFormStore.taskId.toString(),
53
+ productType === 'debitCard',
54
+ );
55
+
42
56
  saveForm((_) => ({
43
57
  ..._,
44
- ...parseEsiaProfile(data),
58
+ ...parsedData,
45
59
  }));
46
60
  }
47
61
 
48
62
  navigator.assign(nextStepLink);
63
+ } catch {
64
+ setEsiaError();
49
65
  } finally {
50
66
  endLoading();
51
67
  }
@@ -67,7 +67,9 @@ export const getDepositCalculatorParams = (
67
67
  ) || DEFAULT_DEPOSIT_CALCULATOR_PARAMS;
68
68
 
69
69
  const { rate } = depositCalculatorSourceBookParams;
70
- const income = getDepositIncome(rate, userInputParams);
70
+ const extraPercent = userInputParams?.extraPercent?.key;
71
+ const totalRate = Number(rate) + Number(extraPercent);
72
+ const income = getDepositIncome(totalRate, userInputParams);
71
73
  const finalSum = moneyValue + income;
72
74
  const sourceBookRows = rows || [DEFAULT_DEPOSIT_CALCULATOR_PARAMS];
73
75
 
@@ -52,6 +52,7 @@ export const getCreditCardFormTaskData = ({
52
52
  ],
53
53
  ...getCardOptionsData(formData),
54
54
  ...getDeliveryData(formData),
55
+ files: formData?.files,
55
56
  },
56
57
  };
57
58
  };
@@ -51,6 +51,7 @@ export const getCreditFormTaskData = ({
51
51
  esiaAccountTypeCd: {
52
52
  key: formData?.esiaAccountTypeCd?.key,
53
53
  } as UpdateUserTaskBody['task']['esiaAccountTypeCd'],
54
+ files: formData?.files,
54
55
  },
55
56
  };
56
57
  };
@@ -38,7 +38,7 @@ export async function doRequest(
38
38
  });
39
39
  }
40
40
 
41
- const getAuthorizationHeaders = () => {
41
+ export const getAuthorizationHeaders = () => {
42
42
  const token = sessionStorage.getItem('accessToken');
43
43
 
44
44
  return token ? { Authorization: `Bearer ${token}` } : null;
@@ -1,5 +1,7 @@
1
+ /* eslint-disable max-lines */
1
2
  import { type Nullable } from '@redneckz/uni-jsx/lib/utils/ts/Nullable';
2
3
  import { type Option } from '../../ui-kit/Select/Option';
4
+ import { type File } from '../model/LeadFormState';
3
5
  import { doRequest } from './doRequest';
4
6
 
5
7
  type ParticipantAddress = {
@@ -145,6 +147,7 @@ export type UpdateUserTaskBody = {
145
147
  creditPeriod?: number;
146
148
  paymentTypeCd?: PaymentType;
147
149
  marketingInfo?: MarketingInfo;
150
+ files?: File[];
148
151
  };
149
152
  };
150
153
 
@@ -0,0 +1,28 @@
1
+ import { type File } from '../model/LeadFormState';
2
+ import { getAuthorizationHeaders } from './doRequest';
3
+
4
+ export type DocumentCategory = 'CONFIRMING_EMPLOYMENT_DOC' | 'CONFIRMING_INCOME_DOC';
5
+
6
+ export const uploadFile = async (
7
+ file: Blob,
8
+ taskId: string,
9
+ documentCategory: DocumentCategory,
10
+ ): Promise<File> => {
11
+ const fd = new FormData();
12
+ fd.append('taskId', taskId);
13
+ fd.append('documentCategory', documentCategory);
14
+ fd.append('file', file, 'file.pdf');
15
+
16
+ const res = await globalThis
17
+ ?.fetch?.(`/light-api-cash/v1/file`, {
18
+ method: 'POST',
19
+ headers: {
20
+ ...getAuthorizationHeaders(),
21
+ },
22
+ credentials: 'include',
23
+ body: fd,
24
+ })
25
+ .then((response) => response.json());
26
+
27
+ return res;
28
+ };
@@ -22,6 +22,7 @@ export const EsiaLoginDialog = JSX<EsiaLoginDialogProps>(({ onClose }) => {
22
22
 
23
23
  if (resp?.link) {
24
24
  navigator.assign(resp.link);
25
+ globalThis.location.href = resp.link;
25
26
  }
26
27
  }, []);
27
28
 
@@ -4,37 +4,42 @@ import { type CustomFieldProps } from '../../../ui-kit/FormField/CustomFieldProp
4
4
  import { type DaDataSuggestion } from '../../api/dadataHints/dadataHintsType';
5
5
  import { getOrganizationFromInn } from '../../api/getOrganizationFromInn';
6
6
  import { useRetailFormStore } from '../../hooks/useRetailFormStore';
7
+ import { isEsiaAuthorize } from '../../utils/isEsiaAuthorize';
7
8
  import { updateOrganizationFields } from '../../utils/updateOrganizationFields';
8
9
  import { DaDataInputControl } from '../DaDataInputControl/DaDataInputControl';
9
10
 
10
11
  export const DaDataInnField = JSX<CustomFieldProps>(({ field, input }) => {
11
12
  const store = useRetailFormStore();
13
+ const { employerActivities, employerOrganization, organization, amountWorkers } = store;
12
14
  const esiaAccountTypeCd = field?.('esiaAccountTypeCd')?.value;
13
15
  const inn = field?.('inn')?.value;
14
16
 
15
17
  const onDaDataChange = useCallback((item: DaDataSuggestion) => {
16
- field?.('organizationName')?.onChange?.(item.data?.name?.short_with_opf);
17
18
  updateOrganizationFields(store, field, item);
18
19
  }, []);
19
20
 
20
21
  useEffect(() => {
21
- if (!esiaAccountTypeCd || !inn) {
22
+ if (
23
+ !esiaAccountTypeCd ||
24
+ !inn ||
25
+ !(employerActivities && employerOrganization && organization && amountWorkers)
26
+ ) {
22
27
  return;
23
28
  }
24
29
  (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);
30
+ const organizationData = await getOrganizationFromInn(inn as string);
31
+ if (organizationData) {
32
+ updateOrganizationFields(store, field, organizationData);
29
33
  }
30
34
  })();
31
- }, []);
35
+ }, [employerActivities, employerOrganization, organization, amountWorkers]);
32
36
 
33
37
  return (
34
38
  <DaDataInputControl
35
39
  label="ИНН"
36
40
  isInteger={true}
37
41
  maxLength={12}
42
+ disabled={input?.filledByEsia && isEsiaAuthorize(field, input.name ?? '')}
38
43
  {...input}
39
44
  {...field(input?.name ?? '')}
40
45
  onDaDataChange={onDaDataChange}
@@ -2,6 +2,7 @@ import { JSX } from '@redneckz/uni-jsx';
2
2
  import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
3
3
  import { type CustomFieldProps } from '../../../ui-kit/FormField/CustomFieldProps';
4
4
  import { clamp } from '../../../utils/clamp';
5
+ import { isEsiaAuthorize } from '../../utils/isEsiaAuthorize';
5
6
  import { DaDataInputControl } from '../DaDataInputControl/DaDataInputControl';
6
7
 
7
8
  const MAX_YEARS = 5;
@@ -19,6 +20,7 @@ export const Experience5YearsField = JSX<CustomFieldProps>(({ field, input }) =>
19
20
  label="Стаж"
20
21
  placeholder="За последние 5 лет"
21
22
  type="number"
23
+ disabled={input?.filledByEsia && isEsiaAuthorize(field, input.name ?? '')}
22
24
  {...field(input?.name ?? '')}
23
25
  {...input}
24
26
  onChange={onChange}
@@ -1,5 +1,6 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import { type CustomFieldProps } from '../../../ui-kit/FormField/CustomFieldProps';
3
+ import { isEsiaAuthorize } from '../../utils/isEsiaAuthorize';
3
4
  import { DaDataInputControl } from '../DaDataInputControl/DaDataInputControl';
4
5
 
5
6
  export const GeneralSeniorityField = JSX<CustomFieldProps>(({ field, input }) => (
@@ -8,6 +9,7 @@ export const GeneralSeniorityField = JSX<CustomFieldProps>(({ field, input }) =>
8
9
  type="number"
9
10
  maxLength={2}
10
11
  placeholder="Количество лет"
12
+ disabled={input?.filledByEsia && isEsiaAuthorize(field, input.name ?? '')}
11
13
  {...field(input?.name ?? '')}
12
14
  {...input}
13
15
  />
@@ -1,5 +1,6 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import { type CustomFieldProps } from '../../../ui-kit/FormField/CustomFieldProps';
3
+ import { isEsiaAuthorize } from '../../utils/isEsiaAuthorize';
3
4
  import { DaDataInputControl } from '../DaDataInputControl/DaDataInputControl';
4
5
 
5
6
  export const JobsNumberField = JSX<CustomFieldProps>(({ field, input }) => (
@@ -8,6 +9,7 @@ export const JobsNumberField = JSX<CustomFieldProps>(({ field, input }) => (
8
9
  placeholder="Количество мест"
9
10
  isInteger={true}
10
11
  maxLength={2}
12
+ disabled={input?.filledByEsia && isEsiaAuthorize(field, input.name ?? '')}
11
13
  {...field(input?.name ?? '')}
12
14
  {...input}
13
15
  />
@@ -1,5 +1,6 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import { type CustomFieldProps } from '../../../ui-kit/FormField/CustomFieldProps';
3
+ import { isEsiaAuthorize } from '../../utils/isEsiaAuthorize';
3
4
  import { DaDataInputControl } from '../DaDataInputControl/DaDataInputControl';
4
5
 
5
6
  export const LastJobExperienceField = JSX<CustomFieldProps>(({ field, input }) => (
@@ -8,6 +9,7 @@ export const LastJobExperienceField = JSX<CustomFieldProps>(({ field, input }) =
8
9
  placeholder="Количество лет"
9
10
  type="number"
10
11
  maxLength={2}
12
+ disabled={input?.filledByEsia && isEsiaAuthorize(field, input.name ?? '')}
11
13
  {...field(input?.name ?? '')}
12
14
  {...input}
13
15
  />
@@ -3,6 +3,7 @@ import { useCallback } 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
5
  import { useRetailFormStore } from '../../hooks/useRetailFormStore';
6
+ import { isEsiaAuthorize } from '../../utils/isEsiaAuthorize';
6
7
  import { updateOrganizationFields } from '../../utils/updateOrganizationFields';
7
8
  import { DaDataInputControl } from '../DaDataInputControl/DaDataInputControl';
8
9
 
@@ -17,6 +18,7 @@ export const OrganizationNameField = JSX<CustomFieldProps>(({ field, input }) =>
17
18
  return (
18
19
  <DaDataInputControl
19
20
  label="Наименование организации"
21
+ disabled={input?.filledByEsia && isEsiaAuthorize(field, input.name ?? '')}
20
22
  {...input}
21
23
  {...field(input?.name ?? '')}
22
24
  onDaDataChange={onDaDataChange}
@@ -1,5 +1,6 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import { type CustomFieldProps } from '../../../ui-kit/FormField/CustomFieldProps';
3
+ import { isEsiaAuthorize } from '../../utils/isEsiaAuthorize';
3
4
  import { DaDataInputControl } from '../DaDataInputControl/DaDataInputControl';
4
5
 
5
6
  export const WagesField = JSX<CustomFieldProps>(({ field, input }) => (
@@ -7,6 +8,7 @@ export const WagesField = JSX<CustomFieldProps>(({ field, input }) => (
7
8
  label="Совокупный доход в месяц после вычета налогов (зарплата, премии)"
8
9
  placeholder="Введите значение"
9
10
  isInteger={true}
11
+ disabled={input?.filledByEsia && isEsiaAuthorize(field, input.name ?? '')}
10
12
  {...field(input?.name ?? '')}
11
13
  {...input}
12
14
  />
@@ -18,7 +18,7 @@ const PERSONAL_DATA: CreditCardSectionsProps[] = [
18
18
  { name: 'sex', required: true },
19
19
  { name: 'limitedBirthday', required: true, filledByEsia: true },
20
20
  { name: 'birthPlace', required: true, filledByEsia: true },
21
- { name: 'phone', required: true, filledByEsia: true },
21
+ { name: 'phone', required: true },
22
22
  { name: 'email', required: true, dadata: true },
23
23
  ],
24
24
  },
@@ -105,13 +105,13 @@ const EMPLOYMENT_CONTENT: CreditCardSectionsProps[] = [
105
105
  {
106
106
  inputs: [
107
107
  { name: 'employment', required: true },
108
- { name: 'organizationName', required: true, dadata: true },
108
+ { name: 'organizationName', required: true, dadata: true, filledByEsia: true },
109
109
  ],
110
110
  },
111
111
  {
112
112
  columns: 2,
113
113
  inputs: [
114
- { name: 'inn', required: true, dadata: true },
114
+ { name: 'inn', required: true, dadata: true, filledByEsia: true },
115
115
  { name: 'legalForm', required: true },
116
116
  ],
117
117
  },
@@ -126,10 +126,10 @@ const EMPLOYMENT_CONTENT: CreditCardSectionsProps[] = [
126
126
  inputs: [
127
127
  { name: 'employerActivities', required: true },
128
128
  { name: 'employerOrganization', required: true },
129
- { name: 'generalSeniority', required: true },
130
- { name: 'lastJobExperience', required: true },
131
- { name: 'experience5Years', required: true },
132
- { name: 'jobsNumber', required: true },
129
+ { name: 'generalSeniority', required: true, filledByEsia: true },
130
+ { name: 'lastJobExperience', required: true, filledByEsia: true },
131
+ { name: 'experience5Years', required: true, filledByEsia: true },
132
+ { name: 'jobsNumber', required: true, filledByEsia: true },
133
133
  ],
134
134
  },
135
135
  {
@@ -194,7 +194,7 @@ const FAMILY_STATUS_AND_INCOME_CONTENT: CreditCardSectionsProps[] = [
194
194
  },
195
195
  {
196
196
  columns: 1,
197
- inputs: [{ name: 'wages', required: true }],
197
+ inputs: [{ name: 'wages', required: true, filledByEsia: true }],
198
198
  },
199
199
  {
200
200
  columns: 1,
@@ -67,6 +67,19 @@ export interface CalculatorProps {
67
67
  isStateEmployee?: boolean;
68
68
  }
69
69
 
70
+ export type File = {
71
+ fileId: number;
72
+ fileName: string;
73
+ contentType: string;
74
+ fileSize: number;
75
+ downloadLink: string;
76
+ taskId: number;
77
+ documentCategoryCd: {
78
+ key: string;
79
+ value: string;
80
+ };
81
+ };
82
+
70
83
  export type FormRetailConsents = CreditFormConsents &
71
84
  CreditCardFormConsents &
72
85
  DebitCardFormConsents;
@@ -174,4 +187,5 @@ export interface LeadFormState extends FormRetailConsents, FormStateDeliveryType
174
187
  latinName?: string;
175
188
  latinSurname?: string;
176
189
  regionHasDelivery?: boolean;
190
+ files?: File[];
177
191
  }
@@ -14,7 +14,7 @@ export const updateOrganizationFields = (
14
14
  field: FormFieldRegisterer<any>,
15
15
  item: DaDataSuggestion,
16
16
  ) => {
17
- const { okved, okopf, inn } = getOrganizationRequisites(item);
17
+ const { okved, okopf, inn, organizationName } = getOrganizationRequisites(item);
18
18
 
19
19
  field?.('legalForm')?.onChange?.(item.data?.opf?.short);
20
20
 
@@ -27,6 +27,7 @@ export const updateOrganizationFields = (
27
27
  employerActivities: getOrganizationActivityType(store?.employerActivities ?? [], okved),
28
28
  organization: getOrganizationType(store?.organization ?? [], okopf, inn),
29
29
  employerOrganization: getOrganizationKind(store?.employerOrganization ?? [], okopf),
30
+ organizationName,
30
31
  };
31
32
 
32
33
  for (const fieldName in organizationData) {
@@ -38,4 +39,5 @@ const getOrganizationRequisites = (item: DaDataSuggestion) => ({
38
39
  inn: item.data?.inn ?? '',
39
40
  okopf: Number(item.data?.opf?.code),
40
41
  okved: item.data?.okved ?? '',
42
+ organizationName: item.data?.name?.short_with_opf ?? '',
41
43
  });
@@ -1,4 +1,5 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
+ import { isEsiaAuthorize } from '../../../retail/utils/isEsiaAuthorize';
2
3
  import { InputControl } from '../../Input/InputControl';
3
4
  import { type CustomFieldProps } from '../CustomFieldProps';
4
5
 
@@ -6,6 +7,7 @@ export const MiddleNameField = JSX<CustomFieldProps>(({ field, input }) => (
6
7
  <InputControl
7
8
  label="Отчество (Обязательно, при наличии)"
8
9
  maxLength={60}
10
+ disabled={input?.filledByEsia && isEsiaAuthorize(field, input.name ?? '')}
9
11
  {...field(input?.name ?? '')}
10
12
  {...input}
11
13
  />
@@ -1,7 +1,14 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
+ import { isEsiaAuthorize } from '../../../retail/utils/isEsiaAuthorize';
2
3
  import { InputControl } from '../../Input/InputControl';
3
4
  import { type CustomFieldProps } from '../CustomFieldProps';
4
5
 
5
6
  export const NameField = JSX<CustomFieldProps>(({ field, input }) => (
6
- <InputControl label="Имя" maxLength={60} {...field(input?.name ?? '')} {...input} />
7
+ <InputControl
8
+ label="Имя"
9
+ maxLength={60}
10
+ disabled={input?.filledByEsia && isEsiaAuthorize(field, input.name ?? '')}
11
+ {...field(input?.name ?? '')}
12
+ {...input}
13
+ />
7
14
  ));
@@ -1,7 +1,14 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
+ import { isEsiaAuthorize } from '../../../retail/utils/isEsiaAuthorize';
2
3
  import { InputControl } from '../../Input/InputControl';
3
4
  import { type CustomFieldProps } from '../CustomFieldProps';
4
5
 
5
6
  export const SurnameField = JSX<CustomFieldProps>(({ field, input }) => (
6
- <InputControl label="Фамилия" maxLength={60} {...field(input?.name ?? '')} {...input} />
7
+ <InputControl
8
+ label="Фамилия"
9
+ maxLength={60}
10
+ disabled={input?.filledByEsia && isEsiaAuthorize(field, input.name ?? '')}
11
+ {...field(input?.name ?? '')}
12
+ {...input}
13
+ />
7
14
  ));
@@ -1,63 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.parseEsiaProfile = void 0;
3
- const normalizePhone_1 = require("../../ui-kit/PhoneInput/normalizePhone");
4
- const parseEsiaProfile = (esiaProfile) => {
5
- const { profile, addInfo, document, addressRegistration, addressFact, esiaAdditionalDocument } = esiaProfile;
6
- return {
7
- name: profile?.name,
8
- surname: profile?.surname,
9
- middleName: profile?.midname,
10
- limitedBirthday: profile?.birthDate,
11
- phone: (0, normalizePhone_1.normalizePhone)(profile?.phone),
12
- email: profile?.email,
13
- dulIssueDate: document?.dulIssueDate,
14
- dulIssuedBy: document?.dulIssuedBy,
15
- dulNumber: document?.dulNumber,
16
- dulSerie: document?.dulSerie,
17
- dulSubdivisionCode: document?.dulSubdivisionCode,
18
- snils: addInfo?.snils,
19
- birthPlace: addInfo?.birthPlace,
20
- addressRegistration: buildAddress(addressRegistration),
21
- addressFact: buildAddress(addressFact),
22
- esiaAccountTypeCd: profile?.esiaAccountType,
23
- inn: esiaAdditionalDocument?.inn,
24
- wages: esiaAdditionalDocument?.averageMonthlyIncome
25
- ? Math.floor(esiaAdditionalDocument.averageMonthlyIncome)?.toString()
26
- : undefined,
27
- beginDate: esiaAdditionalDocument?.startWorkDate,
28
- experience5Years: getYearFromMonth(esiaAdditionalDocument?.workLengthInFiveYears)?.toString(),
29
- generalSeniority: getYearFromMonth(esiaAdditionalDocument?.workLength)?.toString(),
30
- lastJobExperience: getYearFromMonth(esiaAdditionalDocument?.workLengthLastJob)?.toString(),
31
- jobsNumber: esiaAdditionalDocument?.jobsNumberInFiveYears?.toString(),
32
- };
33
- };
34
- exports.parseEsiaProfile = parseEsiaProfile;
35
- const concatFullAddress = (address) => {
36
- return address.reduce((acc, value) => {
37
- if (value) {
38
- return acc ? `${acc}, ${value}` : value;
39
- }
40
- return acc;
41
- }, '');
42
- };
43
- const buildAddress = (fields) => {
44
- const { postcode, region, regionCode, locality, city, street, house, building, block, apartment, } = fields;
45
- const place = locality || city;
46
- const fullAddress = concatFullAddress([
47
- postcode,
48
- region,
49
- place,
50
- street ? `ул ${street}` : undefined,
51
- house ? `д ${house}` : undefined,
52
- block ? `к ${block}` : undefined,
53
- building ? `стр ${building}` : undefined,
54
- apartment ? `кв ${apartment}` : undefined,
55
- ]);
56
- return {
57
- ...fields,
58
- regionCode: regionCode?.key,
59
- fullAddress,
60
- };
61
- };
62
- const getYearFromMonth = (month) => (month ? Math.floor(month / 12) : null);
63
- //# sourceMappingURL=pasreEsiaProfile.js.map