@redneckz/wildless-cms-uni-blocks 0.14.699 → 0.14.701

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 (283) hide show
  1. package/bundle/api/RetailAPI/draftTasksKZO.d.ts +26 -0
  2. package/bundle/api/RetailAPI/getLastTaskStatus.d.ts +6 -0
  3. package/bundle/api/RetailAPI/getPaymentSystems.d.ts +2 -4
  4. package/bundle/api/RetailAPI/getTaskById.d.ts +6 -0
  5. package/bundle/api/RetailAPI/updateUserTask.d.ts +13 -9
  6. package/bundle/bundle.umd.js +271 -50
  7. package/bundle/bundle.umd.min.js +1 -1
  8. package/bundle/components/ApplicationLeadForm/LeadFormState.d.ts +8 -8
  9. package/bundle/components/ApplicationLeadForm/useSaveUserData.d.ts +9 -0
  10. package/bundle/ui-kit/DraftDialog/DraftActionButton.d.ts +7 -0
  11. package/bundle/ui-kit/DraftDialog/DraftDialog.d.ts +7 -0
  12. package/bundle/ui-kit/DraftDialog/EmptyDraftDialog.d.ts +4 -0
  13. package/bundle/ui-kit/DraftDialog/parseDraftTask.d.ts +3 -0
  14. package/bundle/ui-kit/DraftDialog/useDraftDialog.d.ts +10 -0
  15. package/bundle/ui-kit/DraftDialog/utils.d.ts +138 -0
  16. package/dist/api/RetailAPI/draftTasksKZO.d.ts +26 -0
  17. package/dist/api/RetailAPI/draftTasksKZO.js +9 -0
  18. package/dist/api/RetailAPI/draftTasksKZO.js.map +1 -0
  19. package/dist/api/RetailAPI/getLastTaskStatus.d.ts +6 -0
  20. package/dist/api/RetailAPI/getLastTaskStatus.js +9 -0
  21. package/dist/api/RetailAPI/getLastTaskStatus.js.map +1 -0
  22. package/dist/api/RetailAPI/getPaymentSystems.d.ts +2 -4
  23. package/dist/api/RetailAPI/getPaymentSystems.js +1 -4
  24. package/dist/api/RetailAPI/getPaymentSystems.js.map +1 -1
  25. package/dist/api/RetailAPI/getTaskById.d.ts +6 -0
  26. package/dist/api/RetailAPI/getTaskById.js +9 -0
  27. package/dist/api/RetailAPI/getTaskById.js.map +1 -0
  28. package/dist/api/RetailAPI/updateUserTask.d.ts +13 -9
  29. package/dist/api/RetailAPI/updateUserTask.js.map +1 -1
  30. package/dist/components/ApplicationLeadForm/LeadFormState.d.ts +8 -8
  31. package/dist/components/ApplicationLeadForm/getInitialFormState.js +1 -1
  32. package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  33. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +32 -21
  34. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  35. package/dist/components/ApplicationLeadForm/useSaveUserData.d.ts +9 -0
  36. package/dist/components/ApplicationLeadForm/useSaveUserData.js +19 -0
  37. package/dist/components/ApplicationLeadForm/useSaveUserData.js.map +1 -0
  38. package/dist/components/CreditCardForm/formStateMap.js +1 -1
  39. package/dist/components/CreditCardForm/formStateMap.js.map +1 -1
  40. package/dist/components/GrantSupport/GrantSupport.js +1 -1
  41. package/dist/components/GrantSupport/GrantSupport.js.map +1 -1
  42. package/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js +1 -1
  43. package/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js.map +1 -1
  44. package/dist/ui-kit/DraftDialog/DraftActionButton.d.ts +7 -0
  45. package/dist/ui-kit/DraftDialog/DraftActionButton.js +10 -0
  46. package/dist/ui-kit/DraftDialog/DraftActionButton.js.map +1 -0
  47. package/dist/ui-kit/DraftDialog/DraftDialog.d.ts +7 -0
  48. package/dist/ui-kit/DraftDialog/DraftDialog.js +43 -0
  49. package/dist/ui-kit/DraftDialog/DraftDialog.js.map +1 -0
  50. package/dist/ui-kit/DraftDialog/EmptyDraftDialog.d.ts +4 -0
  51. package/dist/ui-kit/DraftDialog/EmptyDraftDialog.js +22 -0
  52. package/dist/ui-kit/DraftDialog/EmptyDraftDialog.js.map +1 -0
  53. package/dist/ui-kit/DraftDialog/parseDraftTask.d.ts +3 -0
  54. package/dist/ui-kit/DraftDialog/parseDraftTask.js +65 -0
  55. package/dist/ui-kit/DraftDialog/parseDraftTask.js.map +1 -0
  56. package/dist/ui-kit/DraftDialog/useDraftDialog.d.ts +10 -0
  57. package/dist/ui-kit/DraftDialog/useDraftDialog.js +16 -0
  58. package/dist/ui-kit/DraftDialog/useDraftDialog.js.map +1 -0
  59. package/dist/ui-kit/DraftDialog/utils.d.ts +138 -0
  60. package/dist/ui-kit/DraftDialog/utils.js +85 -0
  61. package/dist/ui-kit/DraftDialog/utils.js.map +1 -0
  62. package/dist/ui-kit/FormField/Fields/CardCategoryField.js +1 -1
  63. package/dist/ui-kit/FormField/Fields/CardCategoryField.js.map +1 -1
  64. package/dist/ui-kit/FormField/Fields/PaymentSystemField.js +3 -1
  65. package/dist/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
  66. package/dist/ui-kit/FormField/getObjectValidator.js +10 -10
  67. package/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
  68. package/lib/api/RetailAPI/draftTasksKZO.d.ts +26 -0
  69. package/lib/api/RetailAPI/draftTasksKZO.js +6 -0
  70. package/lib/api/RetailAPI/draftTasksKZO.js.map +1 -0
  71. package/lib/api/RetailAPI/getLastTaskStatus.d.ts +6 -0
  72. package/lib/api/RetailAPI/getLastTaskStatus.js +6 -0
  73. package/lib/api/RetailAPI/getLastTaskStatus.js.map +1 -0
  74. package/lib/api/RetailAPI/getPaymentSystems.d.ts +2 -4
  75. package/lib/api/RetailAPI/getPaymentSystems.js +1 -4
  76. package/lib/api/RetailAPI/getPaymentSystems.js.map +1 -1
  77. package/lib/api/RetailAPI/getTaskById.d.ts +6 -0
  78. package/lib/api/RetailAPI/getTaskById.js +6 -0
  79. package/lib/api/RetailAPI/getTaskById.js.map +1 -0
  80. package/lib/api/RetailAPI/updateUserTask.d.ts +13 -9
  81. package/lib/api/RetailAPI/updateUserTask.js.map +1 -1
  82. package/lib/common.css +1 -1
  83. package/lib/components/ApplicationLeadForm/LeadFormState.d.ts +8 -8
  84. package/lib/components/ApplicationLeadForm/getInitialFormState.js +1 -1
  85. package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  86. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +32 -21
  87. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  88. package/lib/components/ApplicationLeadForm/useSaveUserData.d.ts +9 -0
  89. package/lib/components/ApplicationLeadForm/useSaveUserData.js +16 -0
  90. package/lib/components/ApplicationLeadForm/useSaveUserData.js.map +1 -0
  91. package/lib/components/CreditCardForm/formStateMap.js +1 -1
  92. package/lib/components/CreditCardForm/formStateMap.js.map +1 -1
  93. package/lib/components/GrantSupport/GrantSupport.js +1 -1
  94. package/lib/components/GrantSupport/GrantSupport.js.map +1 -1
  95. package/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js +1 -1
  96. package/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js.map +1 -1
  97. package/lib/ui-kit/DraftDialog/DraftActionButton.d.ts +7 -0
  98. package/lib/ui-kit/DraftDialog/DraftActionButton.js +8 -0
  99. package/lib/ui-kit/DraftDialog/DraftActionButton.js.map +1 -0
  100. package/lib/ui-kit/DraftDialog/DraftDialog.d.ts +7 -0
  101. package/lib/ui-kit/DraftDialog/DraftDialog.js +41 -0
  102. package/lib/ui-kit/DraftDialog/DraftDialog.js.map +1 -0
  103. package/lib/ui-kit/DraftDialog/EmptyDraftDialog.d.ts +4 -0
  104. package/lib/ui-kit/DraftDialog/EmptyDraftDialog.js +20 -0
  105. package/lib/ui-kit/DraftDialog/EmptyDraftDialog.js.map +1 -0
  106. package/lib/ui-kit/DraftDialog/parseDraftTask.d.ts +3 -0
  107. package/lib/ui-kit/DraftDialog/parseDraftTask.js +62 -0
  108. package/lib/ui-kit/DraftDialog/parseDraftTask.js.map +1 -0
  109. package/lib/ui-kit/DraftDialog/useDraftDialog.d.ts +10 -0
  110. package/lib/ui-kit/DraftDialog/useDraftDialog.js +13 -0
  111. package/lib/ui-kit/DraftDialog/useDraftDialog.js.map +1 -0
  112. package/lib/ui-kit/DraftDialog/utils.d.ts +138 -0
  113. package/lib/ui-kit/DraftDialog/utils.js +78 -0
  114. package/lib/ui-kit/DraftDialog/utils.js.map +1 -0
  115. package/lib/ui-kit/FormField/Fields/CardCategoryField.js +1 -1
  116. package/lib/ui-kit/FormField/Fields/CardCategoryField.js.map +1 -1
  117. package/lib/ui-kit/FormField/Fields/PaymentSystemField.js +4 -2
  118. package/lib/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
  119. package/lib/ui-kit/FormField/getObjectValidator.js +10 -10
  120. package/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
  121. package/mobile/bundle/api/RetailAPI/draftTasksKZO.d.ts +26 -0
  122. package/mobile/bundle/api/RetailAPI/getLastTaskStatus.d.ts +6 -0
  123. package/mobile/bundle/api/RetailAPI/getPaymentSystems.d.ts +2 -4
  124. package/mobile/bundle/api/RetailAPI/getTaskById.d.ts +6 -0
  125. package/mobile/bundle/api/RetailAPI/updateUserTask.d.ts +13 -9
  126. package/mobile/bundle/bundle.umd.js +271 -50
  127. package/mobile/bundle/bundle.umd.min.js +1 -1
  128. package/mobile/bundle/components/ApplicationLeadForm/LeadFormState.d.ts +8 -8
  129. package/mobile/bundle/components/ApplicationLeadForm/useSaveUserData.d.ts +9 -0
  130. package/mobile/bundle/ui-kit/DraftDialog/DraftActionButton.d.ts +7 -0
  131. package/mobile/bundle/ui-kit/DraftDialog/DraftDialog.d.ts +7 -0
  132. package/mobile/bundle/ui-kit/DraftDialog/EmptyDraftDialog.d.ts +4 -0
  133. package/mobile/bundle/ui-kit/DraftDialog/parseDraftTask.d.ts +3 -0
  134. package/mobile/bundle/ui-kit/DraftDialog/useDraftDialog.d.ts +10 -0
  135. package/mobile/bundle/ui-kit/DraftDialog/utils.d.ts +138 -0
  136. package/mobile/dist/api/RetailAPI/draftTasksKZO.d.ts +26 -0
  137. package/mobile/dist/api/RetailAPI/draftTasksKZO.js +9 -0
  138. package/mobile/dist/api/RetailAPI/draftTasksKZO.js.map +1 -0
  139. package/mobile/dist/api/RetailAPI/getLastTaskStatus.d.ts +6 -0
  140. package/mobile/dist/api/RetailAPI/getLastTaskStatus.js +9 -0
  141. package/mobile/dist/api/RetailAPI/getLastTaskStatus.js.map +1 -0
  142. package/mobile/dist/api/RetailAPI/getPaymentSystems.d.ts +2 -4
  143. package/mobile/dist/api/RetailAPI/getPaymentSystems.js +1 -4
  144. package/mobile/dist/api/RetailAPI/getPaymentSystems.js.map +1 -1
  145. package/mobile/dist/api/RetailAPI/getTaskById.d.ts +6 -0
  146. package/mobile/dist/api/RetailAPI/getTaskById.js +9 -0
  147. package/mobile/dist/api/RetailAPI/getTaskById.js.map +1 -0
  148. package/mobile/dist/api/RetailAPI/updateUserTask.d.ts +13 -9
  149. package/mobile/dist/api/RetailAPI/updateUserTask.js.map +1 -1
  150. package/mobile/dist/components/ApplicationLeadForm/LeadFormState.d.ts +8 -8
  151. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js +1 -1
  152. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  153. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +32 -21
  154. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  155. package/mobile/dist/components/ApplicationLeadForm/useSaveUserData.d.ts +9 -0
  156. package/mobile/dist/components/ApplicationLeadForm/useSaveUserData.js +19 -0
  157. package/mobile/dist/components/ApplicationLeadForm/useSaveUserData.js.map +1 -0
  158. package/mobile/dist/components/CreditCardForm/formStateMap.js +1 -1
  159. package/mobile/dist/components/CreditCardForm/formStateMap.js.map +1 -1
  160. package/mobile/dist/components/GrantSupport/GrantSupport.js +1 -1
  161. package/mobile/dist/components/GrantSupport/GrantSupport.js.map +1 -1
  162. package/mobile/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js +1 -1
  163. package/mobile/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js.map +1 -1
  164. package/mobile/dist/ui-kit/DraftDialog/DraftActionButton.d.ts +7 -0
  165. package/mobile/dist/ui-kit/DraftDialog/DraftActionButton.js +10 -0
  166. package/mobile/dist/ui-kit/DraftDialog/DraftActionButton.js.map +1 -0
  167. package/mobile/dist/ui-kit/DraftDialog/DraftDialog.d.ts +7 -0
  168. package/mobile/dist/ui-kit/DraftDialog/DraftDialog.js +43 -0
  169. package/mobile/dist/ui-kit/DraftDialog/DraftDialog.js.map +1 -0
  170. package/mobile/dist/ui-kit/DraftDialog/EmptyDraftDialog.d.ts +4 -0
  171. package/mobile/dist/ui-kit/DraftDialog/EmptyDraftDialog.js +22 -0
  172. package/mobile/dist/ui-kit/DraftDialog/EmptyDraftDialog.js.map +1 -0
  173. package/mobile/dist/ui-kit/DraftDialog/parseDraftTask.d.ts +3 -0
  174. package/mobile/dist/ui-kit/DraftDialog/parseDraftTask.js +65 -0
  175. package/mobile/dist/ui-kit/DraftDialog/parseDraftTask.js.map +1 -0
  176. package/mobile/dist/ui-kit/DraftDialog/useDraftDialog.d.ts +10 -0
  177. package/mobile/dist/ui-kit/DraftDialog/useDraftDialog.js +16 -0
  178. package/mobile/dist/ui-kit/DraftDialog/useDraftDialog.js.map +1 -0
  179. package/mobile/dist/ui-kit/DraftDialog/utils.d.ts +138 -0
  180. package/mobile/dist/ui-kit/DraftDialog/utils.js +85 -0
  181. package/mobile/dist/ui-kit/DraftDialog/utils.js.map +1 -0
  182. package/mobile/dist/ui-kit/FormField/Fields/CardCategoryField.js +1 -1
  183. package/mobile/dist/ui-kit/FormField/Fields/CardCategoryField.js.map +1 -1
  184. package/mobile/dist/ui-kit/FormField/Fields/PaymentSystemField.js +3 -1
  185. package/mobile/dist/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
  186. package/mobile/dist/ui-kit/FormField/getObjectValidator.js +10 -10
  187. package/mobile/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
  188. package/mobile/lib/api/RetailAPI/draftTasksKZO.d.ts +26 -0
  189. package/mobile/lib/api/RetailAPI/draftTasksKZO.js +6 -0
  190. package/mobile/lib/api/RetailAPI/draftTasksKZO.js.map +1 -0
  191. package/mobile/lib/api/RetailAPI/getLastTaskStatus.d.ts +6 -0
  192. package/mobile/lib/api/RetailAPI/getLastTaskStatus.js +6 -0
  193. package/mobile/lib/api/RetailAPI/getLastTaskStatus.js.map +1 -0
  194. package/mobile/lib/api/RetailAPI/getPaymentSystems.d.ts +2 -4
  195. package/mobile/lib/api/RetailAPI/getPaymentSystems.js +1 -4
  196. package/mobile/lib/api/RetailAPI/getPaymentSystems.js.map +1 -1
  197. package/mobile/lib/api/RetailAPI/getTaskById.d.ts +6 -0
  198. package/mobile/lib/api/RetailAPI/getTaskById.js +6 -0
  199. package/mobile/lib/api/RetailAPI/getTaskById.js.map +1 -0
  200. package/mobile/lib/api/RetailAPI/updateUserTask.d.ts +13 -9
  201. package/mobile/lib/api/RetailAPI/updateUserTask.js.map +1 -1
  202. package/mobile/lib/common.css +1 -1
  203. package/mobile/lib/components/ApplicationLeadForm/LeadFormState.d.ts +8 -8
  204. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js +1 -1
  205. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  206. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +32 -21
  207. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  208. package/mobile/lib/components/ApplicationLeadForm/useSaveUserData.d.ts +9 -0
  209. package/mobile/lib/components/ApplicationLeadForm/useSaveUserData.js +16 -0
  210. package/mobile/lib/components/ApplicationLeadForm/useSaveUserData.js.map +1 -0
  211. package/mobile/lib/components/CreditCardForm/formStateMap.js +1 -1
  212. package/mobile/lib/components/CreditCardForm/formStateMap.js.map +1 -1
  213. package/mobile/lib/components/GrantSupport/GrantSupport.js +1 -1
  214. package/mobile/lib/components/GrantSupport/GrantSupport.js.map +1 -1
  215. package/mobile/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js +1 -1
  216. package/mobile/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js.map +1 -1
  217. package/mobile/lib/ui-kit/DraftDialog/DraftActionButton.d.ts +7 -0
  218. package/mobile/lib/ui-kit/DraftDialog/DraftActionButton.js +8 -0
  219. package/mobile/lib/ui-kit/DraftDialog/DraftActionButton.js.map +1 -0
  220. package/mobile/lib/ui-kit/DraftDialog/DraftDialog.d.ts +7 -0
  221. package/mobile/lib/ui-kit/DraftDialog/DraftDialog.js +41 -0
  222. package/mobile/lib/ui-kit/DraftDialog/DraftDialog.js.map +1 -0
  223. package/mobile/lib/ui-kit/DraftDialog/EmptyDraftDialog.d.ts +4 -0
  224. package/mobile/lib/ui-kit/DraftDialog/EmptyDraftDialog.js +20 -0
  225. package/mobile/lib/ui-kit/DraftDialog/EmptyDraftDialog.js.map +1 -0
  226. package/mobile/lib/ui-kit/DraftDialog/parseDraftTask.d.ts +3 -0
  227. package/mobile/lib/ui-kit/DraftDialog/parseDraftTask.js +62 -0
  228. package/mobile/lib/ui-kit/DraftDialog/parseDraftTask.js.map +1 -0
  229. package/mobile/lib/ui-kit/DraftDialog/useDraftDialog.d.ts +10 -0
  230. package/mobile/lib/ui-kit/DraftDialog/useDraftDialog.js +13 -0
  231. package/mobile/lib/ui-kit/DraftDialog/useDraftDialog.js.map +1 -0
  232. package/mobile/lib/ui-kit/DraftDialog/utils.d.ts +138 -0
  233. package/mobile/lib/ui-kit/DraftDialog/utils.js +78 -0
  234. package/mobile/lib/ui-kit/DraftDialog/utils.js.map +1 -0
  235. package/mobile/lib/ui-kit/FormField/Fields/CardCategoryField.js +1 -1
  236. package/mobile/lib/ui-kit/FormField/Fields/CardCategoryField.js.map +1 -1
  237. package/mobile/lib/ui-kit/FormField/Fields/PaymentSystemField.js +4 -2
  238. package/mobile/lib/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -1
  239. package/mobile/lib/ui-kit/FormField/getObjectValidator.js +10 -10
  240. package/mobile/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
  241. package/mobile/src/api/RetailAPI/draftTasksKZO.ts +33 -0
  242. package/mobile/src/api/RetailAPI/getLastTaskStatus.ts +21 -0
  243. package/mobile/src/api/RetailAPI/getPaymentSystems.ts +3 -10
  244. package/mobile/src/api/RetailAPI/getTaskById.ts +12 -0
  245. package/mobile/src/api/RetailAPI/updateUserTask.ts +14 -9
  246. package/mobile/src/components/ApplicationLeadForm/LeadFormState.ts +8 -8
  247. package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +1 -1
  248. package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +31 -33
  249. package/mobile/src/components/ApplicationLeadForm/useSaveUserData.ts +29 -0
  250. package/mobile/src/components/CreditCardForm/formStateMap.tsx +1 -1
  251. package/mobile/src/components/GrantSupport/GrantSupport.tsx +1 -1
  252. package/mobile/src/ui-kit/ApplicationFormLayout/ApplicationFormLayout.tsx +1 -1
  253. package/mobile/src/ui-kit/DraftDialog/DraftActionButton.tsx +32 -0
  254. package/mobile/src/ui-kit/DraftDialog/DraftDialog.tsx +91 -0
  255. package/mobile/src/ui-kit/DraftDialog/EmptyDraftDialog.tsx +47 -0
  256. package/mobile/src/ui-kit/DraftDialog/parseDraftTask.ts +123 -0
  257. package/mobile/src/ui-kit/DraftDialog/useDraftDialog.tsx +21 -0
  258. package/mobile/src/ui-kit/DraftDialog/utils.ts +148 -0
  259. package/mobile/src/ui-kit/FormField/Fields/CardCategoryField.tsx +1 -1
  260. package/mobile/src/ui-kit/FormField/Fields/PaymentSystemField.tsx +14 -6
  261. package/mobile/src/ui-kit/FormField/getObjectValidator.tsx +10 -10
  262. package/package.json +1 -1
  263. package/src/api/RetailAPI/draftTasksKZO.ts +33 -0
  264. package/src/api/RetailAPI/getLastTaskStatus.ts +21 -0
  265. package/src/api/RetailAPI/getPaymentSystems.ts +3 -10
  266. package/src/api/RetailAPI/getTaskById.ts +12 -0
  267. package/src/api/RetailAPI/updateUserTask.ts +14 -9
  268. package/src/components/ApplicationLeadForm/LeadFormState.ts +8 -8
  269. package/src/components/ApplicationLeadForm/getInitialFormState.tsx +1 -1
  270. package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +31 -33
  271. package/src/components/ApplicationLeadForm/useSaveUserData.ts +29 -0
  272. package/src/components/CreditCardForm/formStateMap.tsx +1 -1
  273. package/src/components/GrantSupport/GrantSupport.tsx +1 -1
  274. package/src/ui-kit/ApplicationFormLayout/ApplicationFormLayout.tsx +1 -1
  275. package/src/ui-kit/DraftDialog/DraftActionButton.tsx +32 -0
  276. package/src/ui-kit/DraftDialog/DraftDialog.tsx +91 -0
  277. package/src/ui-kit/DraftDialog/EmptyDraftDialog.tsx +47 -0
  278. package/src/ui-kit/DraftDialog/parseDraftTask.ts +123 -0
  279. package/src/ui-kit/DraftDialog/useDraftDialog.tsx +21 -0
  280. package/src/ui-kit/DraftDialog/utils.ts +148 -0
  281. package/src/ui-kit/FormField/Fields/CardCategoryField.tsx +1 -1
  282. package/src/ui-kit/FormField/Fields/PaymentSystemField.tsx +14 -6
  283. package/src/ui-kit/FormField/getObjectValidator.tsx +10 -10
@@ -41,18 +41,23 @@ export type PaymentType = {
41
41
  value: string;
42
42
  };
43
43
 
44
+ export type PaymentSystem = {
45
+ name: string;
46
+ type: string;
47
+ };
48
+
44
49
  export type Participant = {
45
50
  birthDate?: string;
46
51
  id: number;
47
52
  midname?: string;
48
53
  name?: string;
49
54
  surname?: string;
50
- profile?: {
55
+ profile: {
51
56
  id: number;
52
57
  };
53
58
  armyIdFlg?: boolean;
54
59
  birthPlace?: string;
55
- childrenDependents?: number;
60
+ childrenDependents?: string;
56
61
  genderCd?: Option;
57
62
  dulIssueDate?: string;
58
63
  dulIssuedBy?: string;
@@ -63,13 +68,13 @@ export type Participant = {
63
68
  employeesNumberCd?: Option;
64
69
  employmentContractDate?: string;
65
70
  employmentTypeCd?: Option;
66
- generalSeniority?: number;
71
+ generalSeniority?: string;
67
72
  homeMatchFlg?: boolean;
68
73
  houseTypeCd?: Option;
69
74
  incomeCertificateCd?: Option;
70
75
  initiateBankruptcyFlg?: boolean;
71
- jobsNumber?: number;
72
- lastWorkDuration?: number;
76
+ jobsNumber?: string;
77
+ lastWorkDuration?: string;
73
78
  maritalStatusCd?: Option;
74
79
  militaryStatusCd?: Option;
75
80
  organizationActivityTypeCd?: Option;
@@ -77,7 +82,7 @@ export type Participant = {
77
82
  organizationKindCd?: Option;
78
83
  organizationName?: string;
79
84
  organizationTypeCd?: Option;
80
- otherDependents?: number;
85
+ otherDependents?: string;
81
86
  ownershipShare?: string;
82
87
  opf?: string;
83
88
  participantAddresses?: ParticipantAddress[];
@@ -89,14 +94,14 @@ export type Participant = {
89
94
  seniority?: string;
90
95
  seniorityInterruptionsFlg?: boolean;
91
96
  snils?: string;
92
- totalDependents?: number;
97
+ totalDependents?: string;
93
98
  bankruptcyFlg?: boolean;
94
99
  shareholderFlg?: boolean;
95
100
  nameLegalEntity?: string;
96
101
  creditInRshbCd?: Option;
97
102
  participantContacts?: Array<{
98
103
  contactTypeCd: {
99
- key: 'EMAIL' | 'MAIN_PHONE';
104
+ key: 'EMAIL' | 'MAIN_PHONE' | 'ORGANIZATION_PHONE';
100
105
  };
101
106
  value: string;
102
107
  }>;
@@ -105,7 +110,7 @@ export type Participant = {
105
110
  value: string;
106
111
  };
107
112
  currencyCode?: { key: string };
108
- paymentSystemTypeCd?: string;
113
+ paymentSystemTypeCd?: PaymentSystem;
109
114
  classCard?: Option;
110
115
  codeWord?: string;
111
116
  };
@@ -1,4 +1,4 @@
1
- import { type PaymentType } from '../../api/RetailAPI/updateUserTask';
1
+ import { type PaymentSystem, type PaymentType } from '../../api/RetailAPI/updateUserTask';
2
2
  import { type Option } from '../../ui-kit/Select/Option';
3
3
 
4
4
  export interface FormConsents {
@@ -84,9 +84,9 @@ export interface LeadFormState extends FormConsents, FormStateDeliveryType {
84
84
  legalForm?: string;
85
85
  organizationName?: string;
86
86
  generalSeniority?: string;
87
- lastJobExperience?: number;
88
- experience5Years?: number;
89
- jobsNumber?: number;
87
+ lastJobExperience?: string;
88
+ experience5Years?: string;
89
+ jobsNumber?: string;
90
90
  organizationAddress?: Address;
91
91
  beginDate?: Date | string;
92
92
  addressFact?: Address;
@@ -105,9 +105,9 @@ export interface LeadFormState extends FormConsents, FormStateDeliveryType {
105
105
  consentAssignmentClaimsFlg?: boolean;
106
106
  consentCollectionFlg?: boolean;
107
107
  familyStatus?: Option;
108
- children?: number;
109
- familyMembers?: number;
110
- dependents?: number;
108
+ children?: string;
109
+ familyMembers?: string;
110
+ dependents?: string;
111
111
  totalIncome?: number;
112
112
  expenses?: number;
113
113
  snils?: string;
@@ -132,7 +132,7 @@ export interface LeadFormState extends FormConsents, FormStateDeliveryType {
132
132
  addressMatch?: boolean;
133
133
  confirmationIncome?: Option;
134
134
  currency?: string;
135
- paymentSystem?: string;
135
+ paymentSystem?: PaymentSystem;
136
136
  cardCategory?: Option;
137
137
  codeWord?: string;
138
138
  esiaAccountTypeCd?: Option;
@@ -42,7 +42,7 @@ const initialFormState = {
42
42
  addressRegistration: '',
43
43
  participantDateRegistration: undefined,
44
44
  currency: '',
45
- paymentSystem: '',
45
+ paymentSystem: { name: '', type: '' },
46
46
  cardCategory: { key: '', text: '' },
47
47
  codeWord: '',
48
48
  addressRetail: { key: '', text: '' },
@@ -1,12 +1,14 @@
1
1
  import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
2
2
  import { createDraftTask } from '../../api/RetailAPI/createDraftTask';
3
3
  import { createUserProfile } from '../../api/RetailAPI/createUserProfile';
4
+ import { getLastTaskStatus } from '../../api/RetailAPI/getLastTaskStatus';
5
+ import { getTaskById } from '../../api/RetailAPI/getTaskById';
4
6
  import { updateUserProfile } from '../../api/RetailAPI/updateUserProfile';
5
7
  import { updateUserTask } from '../../api/RetailAPI/updateUserTask';
6
8
  import { getUpdateUserProfileData } from '../../api/RetailAPI/utils/getUpdateUserProfile';
7
- import { useSetter } from '../../hooks/useSetter';
8
9
  import { useConsentBkiDialog } from '../../ui-kit/ConsentBkiDialog/useConsentBkiDialog';
9
10
  import { useDialog } from '../../ui-kit/DialogManager/useDialog';
11
+ import { useDraftDialog } from '../../ui-kit/DraftDialog/useDraftDialog';
10
12
  import { useEsiaLoginDialog } from '../../ui-kit/EsiaLoginDialog/useEsiaLoginDialog';
11
13
  import { getObjectValidator } from '../../ui-kit/FormField/getObjectValidator';
12
14
  import { VerifyPhoneDialog } from '../../ui-kit/VerifyPhoneDialog/VerifyPhoneDialog';
@@ -17,7 +19,7 @@ import { type FieldDef } from './ApplicationLeadFormContent';
17
19
  import { CONSENTS } from './consents';
18
20
  import { getLeadFormTaskData } from './getLeadFormTaskData';
19
21
  import { type LeadFormState } from './LeadFormState';
20
- import { useLeadFormStore } from './useLeadFormStore';
22
+ import { useSaveUserData, type UserData } from './useSaveUserData';
21
23
 
22
24
  interface ApplicationLeadApiProps {
23
25
  inputs: FieldDef[];
@@ -25,37 +27,19 @@ interface ApplicationLeadApiProps {
25
27
  nextStepLink: string;
26
28
  }
27
29
 
28
- interface UserData {
29
- participantId: number;
30
- taskId: number;
31
- profileId: number;
32
- programId: string;
33
- }
34
-
35
30
  export const useApplicationLeadApi = ({
36
31
  inputs,
37
32
  programId,
38
33
  nextStepLink,
39
34
  }: ApplicationLeadApiProps) => {
40
35
  const [responseStatus, setResponseStatus] = useState<'OK' | 'Fail' | ''>('');
41
- const leadFormStore = useLeadFormStore();
42
- const saveForm = useSetter(leadFormStore, 'leadForm');
36
+ const saveUserData = useSaveUserData();
43
37
 
44
38
  const openEsiaLoginDialog = useEsiaLoginDialog(nextStepLink);
45
39
  const consentBkiDialog = useConsentBkiDialog(openEsiaLoginDialog);
46
40
  const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
41
+ const draftDialog = useDraftDialog();
47
42
 
48
- const saveUserData = useCallback(
49
- ({ participantId, taskId, profileId, programId: programNumber }: UserData) => {
50
- leadFormStore.participantId = participantId;
51
- leadFormStore.taskId = taskId;
52
- leadFormStore.profileId = profileId;
53
- leadFormStore.programId = programNumber;
54
- },
55
- [],
56
- );
57
-
58
- // eslint-disable-next-line consistent-return
59
43
  const handleSubmit = useCallback(async (formData: LeadFormState) => {
60
44
  const feedbackValidator = objectValidator(getObjectValidator(inputs));
61
45
  if (!isValidationSuccess(feedbackValidator(formData))) {
@@ -68,17 +52,34 @@ export const useApplicationLeadApi = ({
68
52
  });
69
53
 
70
54
  if (profileId && formData?.phone) {
55
+ const sendCurrentTask = async () => {
56
+ await updateUserData({
57
+ programId,
58
+ profileId,
59
+ formData,
60
+ saveUserData,
61
+ });
62
+ verifyPhoneDialog.close();
63
+ consentBkiDialog.open(formData.phone, profileId);
64
+ };
71
65
  const handleSuccessVerify = async () => {
72
66
  try {
73
- await updateUserData({
74
- programId,
67
+ const lastTaskId = await getLastTaskStatus({
75
68
  profileId,
76
- formData,
77
- saveUserData,
78
- saveForm,
69
+ programId,
79
70
  });
80
- verifyPhoneDialog.close();
81
- consentBkiDialog.open(formData.phone, profileId);
71
+
72
+ if (lastTaskId) {
73
+ const task = await getTaskById({ taskId: lastTaskId });
74
+ verifyPhoneDialog.close();
75
+ draftDialog.open({
76
+ task,
77
+ isFromLead: true,
78
+ onClose: sendCurrentTask,
79
+ });
80
+ } else {
81
+ await sendCurrentTask();
82
+ }
82
83
  } catch {
83
84
  setResponseStatus('Fail');
84
85
  }
@@ -110,13 +111,11 @@ const updateUserData = async ({
110
111
  profileId,
111
112
  formData,
112
113
  saveUserData,
113
- saveForm,
114
114
  }: {
115
115
  programId: string;
116
116
  profileId: number;
117
117
  formData: LeadFormState;
118
118
  saveUserData: (userData: UserData) => void;
119
- saveForm: (formData: LeadFormState) => void;
120
119
  }) => {
121
120
  const transformedForm = transformOtherConsentsField(formData);
122
121
 
@@ -140,8 +139,7 @@ const updateUserData = async ({
140
139
  console.log(ex);
141
140
  }
142
141
 
143
- saveUserData({ participantId, taskId, profileId, programId });
144
- saveForm(formData);
142
+ saveUserData({ participantId, taskId, profileId, programId, formData });
145
143
  };
146
144
 
147
145
  const transformOtherConsentsField = (formData: LeadFormState): LeadFormState => {
@@ -0,0 +1,29 @@
1
+ import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
2
+ import { useSetter } from '../../hooks/useSetter';
3
+ import { type LeadFormState } from './LeadFormState';
4
+ import { useLeadFormStore } from './useLeadFormStore';
5
+
6
+ export interface UserData {
7
+ participantId: number;
8
+ taskId: number;
9
+ profileId: number;
10
+ programId: string;
11
+ formData: LeadFormState;
12
+ }
13
+ export const useSaveUserData = () => {
14
+ const leadFormStore = useLeadFormStore();
15
+ const saveForm = useSetter(leadFormStore, 'leadForm');
16
+
17
+ const saveUserData = useCallback(
18
+ ({ participantId, taskId, profileId, formData, programId: programNumber }: UserData) => {
19
+ leadFormStore.participantId = participantId;
20
+ leadFormStore.taskId = taskId;
21
+ leadFormStore.profileId = profileId;
22
+ leadFormStore.programId = programNumber;
23
+ saveForm(formData);
24
+ },
25
+ [],
26
+ );
27
+
28
+ return saveUserData;
29
+ };
@@ -2,7 +2,7 @@ import { type LeadFormState } from '../ApplicationLeadForm/LeadFormState';
2
2
 
3
3
  export const formStateMap: Partial<LeadFormState>[] = [
4
4
  {
5
- paymentSystem: '',
5
+ paymentSystem: { name: '', type: '' },
6
6
  currency: '810',
7
7
  codeWord: '',
8
8
  },
@@ -26,7 +26,7 @@ export const GrantSupport = UniBlock<GrantSupportProps>(
26
26
 
27
27
  return (
28
28
  <BlockWrapper className={className} defaultPadding="p-6xl" {...rest}>
29
- <div className="container max-w-[978px] space-y-m">
29
+ <div className="container space-y-m">
30
30
  {title ? <Heading headingType="h3" title={title} className="@xl:text-center" /> : null}
31
31
  {regions ? (
32
32
  <SelectControl
@@ -11,7 +11,7 @@ export const ApplicationFormLayout = JSX<ApplicationFormProps>((props) => {
11
11
 
12
12
  return (
13
13
  <BlockWrapper className={className} defaultPadding="p-6xl" {...rest}>
14
- <div className="container max-w-[978px] space-y-lg">
14
+ <div className="container space-y-lg">
15
15
  {title ? <Heading headingType="h3" title={title} className="@xl:text-center" /> : null}
16
16
  {children}
17
17
  </div>
@@ -0,0 +1,32 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { noop } from '../../utils/noop';
3
+ import { Heading } from '../Heading/Heading';
4
+ import { Img } from '../Img/Img';
5
+ import { Paragraph } from '../Paragraph/Paragraph';
6
+
7
+ export interface DraftActionButtonProps {
8
+ title: string;
9
+ icon: string;
10
+ description?: string;
11
+ onClick?: () => void;
12
+ }
13
+
14
+ export const DraftActionButton = JSX<DraftActionButtonProps>(
15
+ ({ title, icon, description, onClick = noop }) => (
16
+ <button
17
+ className="flex gap-lg items-center border border-gray rounded-md cursor-pointer p-4 hover:border-green"
18
+ type="button"
19
+ onClick={onClick}
20
+ >
21
+ <Img image={{ src: icon }} width="78" height="78" />
22
+ <div>
23
+ <Heading className="text-left" title={title} headingType="h5" />
24
+ {description ? (
25
+ <Paragraph color="text-secondary-text" size="text-m">
26
+ {description}
27
+ </Paragraph>
28
+ ) : null}
29
+ </div>
30
+ </button>
31
+ ),
32
+ );
@@ -0,0 +1,91 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
3
+ import { type Task } from '../../api/RetailAPI/draftTasksKZO';
4
+ import { useLeadFormStore } from '../../components/ApplicationLeadForm/useLeadFormStore';
5
+ import { locationNavigator } from '../../external/locationNavigator';
6
+ import { useSetter } from '../../hooks/useSetter';
7
+ import { noop } from '../../utils/noop';
8
+ import { Button } from '../Button/Button';
9
+ import { Dialog } from '../DialogManager/Dialog';
10
+ import { Heading } from '../Heading/Heading';
11
+ import { DraftActionButton } from './DraftActionButton';
12
+ import { parseDraftTask } from './parseDraftTask';
13
+ import { creditCodesToProgrammIdMap, creditProgramCodeToProductIdMap } from './utils';
14
+
15
+ export interface DraftDialogProps {
16
+ task: Task;
17
+ isFromLead?: boolean;
18
+ onClose?: () => void;
19
+ }
20
+
21
+ export const DraftDialog = JSX<DraftDialogProps>(function ({
22
+ task,
23
+ isFromLead = false,
24
+ onClose = noop,
25
+ }) {
26
+ const leadFormStore = useLeadFormStore();
27
+ const saveForm = useSetter(leadFormStore, 'leadForm');
28
+ const navigator = locationNavigator();
29
+
30
+ const { participants, creditProgram, id: taskId } = task;
31
+
32
+ const programmId: string = creditProgramCodeToProductIdMap[creditProgram.code];
33
+ const isCredit = Boolean(creditCodesToProgrammIdMap[creditProgram.code]);
34
+ const nextStepLink = isCredit ? '/credit-lead' : '/credit-card-lead';
35
+
36
+ const { name, midname, id: participantId, profile } = participants[0];
37
+
38
+ const handleGoToDraft = useCallback(() => {
39
+ const taskFromDraft = parseDraftTask(task);
40
+ leadFormStore.participantId = participantId;
41
+ leadFormStore.taskId = taskId;
42
+ leadFormStore.profileId = profile?.id;
43
+ leadFormStore.programId = programmId;
44
+ saveForm(taskFromDraft);
45
+ navigator.assign(nextStepLink);
46
+ }, []);
47
+
48
+ const handleGoToNewTask = useCallback(() => {
49
+ navigator.assign(isCredit ? '/natural/loans/all-goals' : '/natural/creditcards/svoya');
50
+ }, []);
51
+
52
+ const handleGoToMainPage = useCallback(() => {
53
+ navigator.assign('/');
54
+ }, []);
55
+
56
+ const appeal = name && midname ? `${name} ${midname}, ` : '';
57
+
58
+ return (
59
+ <Dialog
60
+ className="my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg py-0 px-5xl"
61
+ onClose={onClose}
62
+ >
63
+ <div className="flex flex-col gap-lg">
64
+ <Heading
65
+ className="whitespace-pre-wrap"
66
+ title={`${appeal}мы нашли черновик вашей заявки.\nПродолжите заполнение?`}
67
+ headingType="h5"
68
+ />
69
+ <DraftActionButton
70
+ title="Перейти к черновику"
71
+ icon="api/v1/wcms-file-storage/72d06937-5d8b-4996-9503-52389b93919e/file.svg"
72
+ description="Продолжайте заполнять заявку из черновика"
73
+ onClick={handleGoToDraft}
74
+ />
75
+ <DraftActionButton
76
+ title={isFromLead ? 'Продолжить заполнение текущей заявки' : 'Заполнить новую заявку'}
77
+ icon="api/v1/wcms-file-storage/796c3e8d-341a-480b-b52f-3aa5784ed623/file.svg"
78
+ onClick={isFromLead ? onClose : handleGoToNewTask}
79
+ />
80
+ <Button
81
+ type="button"
82
+ version="secondary"
83
+ className="w-full text-h5"
84
+ onClick={handleGoToMainPage}
85
+ >
86
+ Вернуться на главную
87
+ </Button>
88
+ </div>
89
+ </Dialog>
90
+ );
91
+ });
@@ -0,0 +1,47 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
3
+ import { locationNavigator } from '../../external/locationNavigator';
4
+ import { noop } from '../../utils/noop';
5
+ import { Button } from '../Button/Button';
6
+ import { Dialog } from '../DialogManager/Dialog';
7
+ import { Heading } from '../Heading/Heading';
8
+ import { Paragraph } from '../Paragraph/Paragraph';
9
+
10
+ export interface EmptyDraftDialogProps {
11
+ onClose?: () => void;
12
+ }
13
+
14
+ export const EmptyDraftDialog = JSX<EmptyDraftDialogProps>(function ({ onClose = noop }) {
15
+ const navigator = locationNavigator();
16
+
17
+ const handleGoNewTask = useCallback(() => {
18
+ navigator.assign('/natural/loans/all-goals');
19
+ }, []);
20
+
21
+ const handleGoMainPage = useCallback(() => {
22
+ navigator.assign('/');
23
+ }, []);
24
+
25
+ return (
26
+ <Dialog
27
+ className="my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg py-0 px-5xl"
28
+ onClose={onClose}
29
+ >
30
+ <div className="flex flex-col gap-lg">
31
+ <Heading className="text-center" title="Заявки не найдены" headingType="h3" />
32
+ <Paragraph size="text-l" align="text-center">
33
+ По данному номеру не найдено незавершенных заявок. Вы можете заполнить новую заявку или
34
+ вернуться на главную страницу
35
+ </Paragraph>
36
+
37
+ <Button type="button" className="w-full" onClick={handleGoNewTask}>
38
+ Заполнить новую заявку
39
+ </Button>
40
+
41
+ <Button type="button" version="secondary" className="w-full" onClick={handleGoMainPage}>
42
+ Вернуться на главную
43
+ </Button>
44
+ </div>
45
+ </Dialog>
46
+ );
47
+ });
@@ -0,0 +1,123 @@
1
+ /* eslint-disable max-lines-per-function */
2
+ import { type Task } from '../../api/RetailAPI/draftTasksKZO';
3
+ import { type LeadFormState } from '../../components/ApplicationLeadForm/LeadFormState';
4
+ import {
5
+ getParticipantAddresses,
6
+ getParticipantContacts,
7
+ getParticipantGender,
8
+ getParticipantIncomes,
9
+ getSelectValue,
10
+ } from './utils';
11
+
12
+ export const parseDraftTask = (task: Task): LeadFormState => {
13
+ const participant = task.participants[0];
14
+
15
+ const { loanAmount: moneyValue, creditPeriod: monthsValue, paymentTypeCd } = task;
16
+
17
+ const {
18
+ currencyCode: currency,
19
+ paymentSystemTypeCd: paymentSystem,
20
+ classCard: cardCategory,
21
+ codeWord,
22
+ birthDate: limitedBirthday,
23
+ midname: middleName,
24
+ name,
25
+ surname,
26
+ birthPlace,
27
+ dulIssueDate: dulIssueDateField,
28
+ dulIssuedBy,
29
+ dulNumber,
30
+ dulSerie,
31
+ dulSubdivisionCode,
32
+ educationLevelCd: education,
33
+ registrationDate: participantDateRegistration,
34
+ houseTypeCd: housing,
35
+ genderCd,
36
+ participantContacts = [],
37
+ participantAddresses = [],
38
+ employmentContractDate: beginDate,
39
+ employmentTypeCd: employment,
40
+ organizationName,
41
+ organizationInn: inn,
42
+ organizationActivityTypeCd: employerActivities,
43
+ organizationTypeCd: organization,
44
+ organizationKindCd: employerOrganization,
45
+ employeesNumberCd: amountWorkers,
46
+ opf: legalForm,
47
+ seniority: generalSeniority,
48
+ generalSeniority: experience5Years,
49
+ jobsNumber,
50
+ lastWorkDuration: lastJobExperience,
51
+ positionCd: positionOrganization,
52
+ maritalStatusCd: familyStatus,
53
+ childrenDependents: children,
54
+ totalDependents: familyMembers,
55
+ otherDependents: dependents,
56
+ militaryStatusCd: conscription,
57
+ participantIncomes,
58
+ snils,
59
+ armyIdFlg,
60
+ bankruptcyFlg,
61
+ shareholderFlg,
62
+ nameLegalEntity: legalEntityName,
63
+ creditInRshbCd,
64
+ payrollCardRshbFlg: isInsurance,
65
+ consentInsuranceFlg: isSalaryClient,
66
+ } = participant;
67
+
68
+ return {
69
+ currency: currency?.key,
70
+ paymentSystem,
71
+ cardCategory: getSelectValue(cardCategory),
72
+ codeWord,
73
+ limitedBirthday,
74
+ middleName,
75
+ name,
76
+ surname,
77
+ birthPlace,
78
+ dulIssueDateField,
79
+ dulIssuedBy,
80
+ dulNumber,
81
+ dulSerie,
82
+ dulSubdivisionCode,
83
+ education: getSelectValue(education),
84
+ participantDateRegistration,
85
+ housing: getSelectValue(housing),
86
+ beginDate,
87
+ employment: getSelectValue(employment),
88
+ organizationName,
89
+ inn,
90
+ employerActivities: getSelectValue(employerActivities),
91
+ organization: getSelectValue(organization),
92
+ employerOrganization: getSelectValue(employerOrganization),
93
+ amountWorkers: getSelectValue(amountWorkers),
94
+ legalForm,
95
+ generalSeniority: generalSeniority?.toString(),
96
+ experience5Years: experience5Years?.toString(),
97
+ jobsNumber: jobsNumber?.toString(),
98
+ lastJobExperience: lastJobExperience?.toString(),
99
+ positionOrganization: getSelectValue(positionOrganization),
100
+ familyStatus: getSelectValue(familyStatus),
101
+ children: children?.toString(),
102
+ familyMembers: familyMembers?.toString(),
103
+ dependents: dependents?.toString(),
104
+ conscription: getSelectValue(conscription),
105
+ snils,
106
+ armyIdFlg,
107
+ bankruptcyFlg,
108
+ shareholderFlg,
109
+ legalEntityName,
110
+ creditInRshbCd: getSelectValue(creditInRshbCd),
111
+ calculator: {
112
+ isInsurance,
113
+ isSalaryClient,
114
+ moneyValue,
115
+ monthsValue,
116
+ isAnnuity: paymentTypeCd?.key === 'ANNUITY',
117
+ },
118
+ ...getParticipantIncomes(participantIncomes),
119
+ ...getParticipantAddresses(participantAddresses),
120
+ ...getParticipantContacts(participantContacts),
121
+ ...getParticipantGender(genderCd),
122
+ };
123
+ };
@@ -0,0 +1,21 @@
1
+ import { type Task } from '../../api/RetailAPI/draftTasksKZO';
2
+ import { useDialog } from '../DialogManager/useDialog';
3
+ import { DraftDialog } from './DraftDialog';
4
+ import { EmptyDraftDialog } from './EmptyDraftDialog';
5
+
6
+ type useDraftDialogOpenProps = {
7
+ task?: Task;
8
+ isFromLead?: boolean;
9
+ onClose?: () => void;
10
+ };
11
+
12
+ export const useDraftDialog = () => {
13
+ const { open: openDraftDialog } = useDialog(DraftDialog);
14
+ const { open: openEmptyDraftDialog } = useDialog(EmptyDraftDialog);
15
+
16
+ return {
17
+ open: ({ task, isFromLead, onClose }: useDraftDialogOpenProps) => {
18
+ task ? openDraftDialog({ task, isFromLead, onClose }) : openEmptyDraftDialog({});
19
+ },
20
+ };
21
+ };