@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
@@ -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
+ };
@@ -0,0 +1,148 @@
1
+ /* eslint-disable camelcase */
2
+ import { type LeadProps } from '../../api/RetailAPI/model/LeadFormData';
3
+ import { type Participant } from '../../api/RetailAPI/updateUserTask';
4
+ import { type Option } from '../Select/Option';
5
+
6
+ export const enum EContactType {
7
+ MainPhone = 'MAIN_PHONE',
8
+ SecondPhone = 'SECOND_PHONE',
9
+ HomePhoneFact = 'HOME_PHONE_FACT',
10
+ HomePhoneReg = 'HOME_PHONE_REG',
11
+ OrganizationPhone = 'ORGANIZATION_PHONE',
12
+ EMail = 'EMAIL',
13
+ }
14
+
15
+ export const enum EAddressType {
16
+ REGISTRATION = 'REGISTRATION',
17
+ RESIDENTAL = 'RESIDENTAL',
18
+ WORK = 'WORK',
19
+ }
20
+
21
+ export const enum EIncomesType {
22
+ INCOME_AVERAGE = 'INCOME_AVERAGE',
23
+ MANDATORY_PAYMENTS = 'MANDATORY_PAYMENTS',
24
+ ADDITIONAL_INCOME = 'ADDITIONAL_INCOME',
25
+ OTHER_INCOME = 'OTHER_INCOME',
26
+ OTHER_PAYMENTS = 'OTHER_PAYMENTS',
27
+ RENTAL_INCOME = 'RENTAL_INCOME',
28
+ WAGES = 'WAGES',
29
+ RETIREMENT_INCOME = 'RETIREMENT_INCOME',
30
+ }
31
+
32
+ export const creditCodesToProgrammIdMap = {
33
+ credit_cash: '10',
34
+ credit_cash_single_doc: '28',
35
+ credit_mcx: '39',
36
+ family_offer_credit: '41',
37
+ gas_engine_fuel: '33',
38
+ pension_credit: '12',
39
+ ref_credit: '11',
40
+ ref_credit_single_doc: '29',
41
+ self_employed: '34',
42
+ summer_cash: '35',
43
+ summer_cash_pens: '36',
44
+ };
45
+
46
+ export const cardCodesToProgrammIdMap = {
47
+ amur_card: '14',
48
+ owner_card: '13',
49
+ travel_card: '15',
50
+ };
51
+
52
+ export const creditProgramCodeToProductIdMap = {
53
+ ...creditCodesToProgrammIdMap,
54
+ ...cardCodesToProgrammIdMap,
55
+ };
56
+
57
+ export const getParticipantIncomes = (participantIncomes: Participant['participantIncomes']) => {
58
+ const wages = participantIncomes?.find(
59
+ (contact) => contact.incomeTypeCd.key === EIncomesType.WAGES,
60
+ )?.value;
61
+ const mandatoryPayments = participantIncomes?.find(
62
+ (contact) => contact.incomeTypeCd.key === EIncomesType.MANDATORY_PAYMENTS,
63
+ )?.value;
64
+ const incomeAverage = participantIncomes?.find(
65
+ (contact) => contact.incomeTypeCd.key === EIncomesType.INCOME_AVERAGE,
66
+ )?.value;
67
+ const additionalIncome = participantIncomes?.find(
68
+ (contact) => contact.incomeTypeCd.key === EIncomesType.ADDITIONAL_INCOME,
69
+ )?.value;
70
+ const otherIncome = participantIncomes?.find(
71
+ (contact) => contact.incomeTypeCd.key === EIncomesType.OTHER_INCOME,
72
+ )?.value;
73
+ const otherPayments = participantIncomes?.find(
74
+ (contact) => contact.incomeTypeCd.key === EIncomesType.OTHER_PAYMENTS,
75
+ )?.value;
76
+ const rentalIncome = participantIncomes?.find(
77
+ (contact) => contact.incomeTypeCd.key === EIncomesType.RENTAL_INCOME,
78
+ )?.value;
79
+ const retirementIncome = participantIncomes?.find(
80
+ (contact) => contact.incomeTypeCd.key === EIncomesType.RETIREMENT_INCOME,
81
+ )?.value;
82
+
83
+ return {
84
+ wages,
85
+ mandatoryPayments,
86
+ incomeAverage,
87
+ additionalIncome,
88
+ otherIncome,
89
+ otherPayments,
90
+ rentalIncome,
91
+ retirementIncome,
92
+ };
93
+ };
94
+
95
+ export const getParticipantAddresses = (
96
+ participantAddresses: Participant['participantAddresses'],
97
+ ) => {
98
+ const addressRegistration = participantAddresses?.find(
99
+ (address) => address.addressType.key === EAddressType.REGISTRATION,
100
+ );
101
+ const addressFact = participantAddresses?.find(
102
+ (address) => address.addressType.key === EAddressType.RESIDENTAL,
103
+ );
104
+ const organizationAddress = participantAddresses?.find(
105
+ (address) => address.addressType.key === EAddressType.WORK,
106
+ );
107
+
108
+ return {
109
+ addressRegistration,
110
+ addressFact,
111
+ organizationAddress,
112
+ };
113
+ };
114
+
115
+ export const getParticipantContacts = (participantContacts: Participant['participantContacts']) => {
116
+ const email = participantContacts?.find(
117
+ (contact) => contact.contactTypeCd.key === EContactType.EMail,
118
+ )?.value;
119
+ const phone = participantContacts?.find(
120
+ (contact) => contact.contactTypeCd.key === EContactType.MainPhone,
121
+ )?.value;
122
+ const organizationPhone = participantContacts?.find(
123
+ (contact) => contact.contactTypeCd.key === EContactType.OrganizationPhone,
124
+ )?.value;
125
+
126
+ return {
127
+ email,
128
+ phone,
129
+ organizationPhone,
130
+ };
131
+ };
132
+
133
+ export const getParticipantGender = (gender: Participant['genderCd']) => {
134
+ return gender?.key
135
+ ? {
136
+ sex: gender.key === 'MAN' ? 'male' : 'female',
137
+ }
138
+ : null;
139
+ };
140
+
141
+ export const getSelectValue = (option?: LeadProps): Option | undefined => {
142
+ return option?.key
143
+ ? {
144
+ key: option.key,
145
+ text: option.value,
146
+ }
147
+ : undefined;
148
+ };
@@ -10,7 +10,7 @@ export const CardCategoryField = JSX<CustomFieldProps>(({ field, input }) => {
10
10
  const [cardTypes, setCardTypes] = useState<CardTypeData[]>([]);
11
11
  const [programId] = useLocalStorage<string>('programId');
12
12
  const { value: selectedCardCategory, onChange: cardCategoryChange } = field('cardCategory');
13
- const selectedPaymentSystem = field('paymentSystem').value;
13
+ const selectedPaymentSystem = field('paymentSystem')?.value?.type;
14
14
 
15
15
  useEffect(() => {
16
16
  if (selectedPaymentSystem && programId) {
@@ -1,8 +1,8 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import { useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
2
+ import { useCallback, useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
3
3
  import { getPaymentSystems } from '../../../api/RetailAPI/getPaymentSystems';
4
+ import { type PaymentSystem } from '../../../api/RetailAPI/updateUserTask';
4
5
  import { useLocalStorage } from '../../../hooks/useLocalStorage';
5
- import { type RadioButtonItem } from '../../RadioButtonGroup/RadioButtonGroup';
6
6
  import { RadioButtonGroupControl } from '../../RadioButtonGroup/RadioButtonGroupControl';
7
7
  import { type CustomFieldProps } from '../CustomFieldProps';
8
8
  import { validatorObj } from '../getObjectValidator';
@@ -12,7 +12,7 @@ export const PaymentSystemField = JSX<CustomFieldProps>(({ field, input }) => {
12
12
  const { value, onChange } = field('paymentSystem');
13
13
  const [programId] = useLocalStorage<string>('programId');
14
14
 
15
- const [paymentSystemOptions, setPaymentSystemOptions] = useState<RadioButtonItem[]>([]);
15
+ const [paymentSystemOptions, setPaymentSystemOptions] = useState<PaymentSystem[]>([]);
16
16
 
17
17
  useEffect(() => {
18
18
  if (programId) {
@@ -23,14 +23,22 @@ export const PaymentSystemField = JSX<CustomFieldProps>(({ field, input }) => {
23
23
  }
24
24
  }, []);
25
25
 
26
+ const handleChange = useCallback(
27
+ (type: string) => onChange?.(paymentSystemOptions?.find((_) => _.type === type)),
28
+ [paymentSystemOptions, onChange],
29
+ );
30
+
26
31
  return (
27
32
  <RadioButtonGroupControl
28
33
  label="Платежная система"
29
34
  orientation="horizontal"
30
- items={paymentSystemOptions}
31
- value={value}
32
- onChange={(_) => onChange?.(_)}
35
+ items={formatPaymentSystems(paymentSystemOptions)}
33
36
  {...getValidation(field('paymentSystem'), validatorObj.paymentSystem, input?.required)}
37
+ value={value?.type}
38
+ onChange={handleChange}
34
39
  />
35
40
  );
36
41
  });
42
+
43
+ const formatPaymentSystems = (paymentSystems: PaymentSystem[]) =>
44
+ paymentSystems?.map((_) => ({ id: _.type, text: _.name })) ?? [];
@@ -33,14 +33,14 @@ export const validatorObj: Record<string, Validator> = {
33
33
  birthday: defaultValidator('Укажите дату рождения'),
34
34
  limitedBirthday: limitedBirthdayValidator(),
35
35
  birthPlace: defaultValidator('Укажите место рождения'),
36
- education: defaultValidator('Выберите ваше образование'),
37
- housing: defaultValidator('Выберите тип жилья'),
38
- employment: defaultValidator('Выберите информацию о трудоустройстве'),
39
- organization: defaultValidator('Выберите тип организации'),
40
- amountWorkers: defaultValidator('Выберите информацию о количестве сотрудников'),
41
- employerActivities: defaultValidator('Выберите вид деятельности организации'),
42
- employerOrganization: defaultValidator('Выберите вид организации'),
43
- positionOrganization: defaultValidator('Выберите вашу должность'),
36
+ education: defaultSelectValidator('Выберите ваше образование'),
37
+ housing: defaultSelectValidator('Выберите тип жилья'),
38
+ employment: defaultSelectValidator('Выберите информацию о трудоустройстве'),
39
+ organization: defaultSelectValidator('Выберите тип организации'),
40
+ amountWorkers: defaultSelectValidator('Выберите информацию о количестве сотрудников'),
41
+ employerActivities: defaultSelectValidator('Выберите вид деятельности организации'),
42
+ employerOrganization: defaultSelectValidator('Выберите вид организации'),
43
+ positionOrganization: defaultSelectValidator('Выберите вашу должность'),
44
44
  dulSerie: serieValidator('Укажите серию паспорта'),
45
45
  dulNumber: numberValidator('Укажите номер паспорта'),
46
46
  dulIssueDateField: defaultValidator('Укажите дату выдачи паспорта'),
@@ -76,7 +76,7 @@ export const validatorObj: Record<string, Validator> = {
76
76
  consentPfrFlg: agreementValidator,
77
77
  consentOthersFlg: agreementValidator,
78
78
  consentInformFlg: agreementValidator,
79
- familyStatus: defaultValidator('Выберите семейное положение'),
79
+ familyStatus: defaultSelectValidator('Выберите семейное положение'),
80
80
  children: lengthStringValidator(2, 'Укажите количество детей'),
81
81
  familyMembers: lengthStringValidator(2, 'Укажите количество членов семьи'),
82
82
  dependents: lengthStringValidator(2, 'Укажите количество иждивенцев'),
@@ -102,7 +102,7 @@ export const validatorObj: Record<string, Validator> = {
102
102
  addressRetail: defaultSelectValidator('Выберите адрес банка'),
103
103
  addressMatch: defaultValidator(),
104
104
  codeWord: codeWordValidator('Необходимо ввести кодовое слово'),
105
- confirmationIncome: defaultValidator(),
105
+ confirmationIncome: defaultSelectValidator(),
106
106
  deliveryDate: defaultValidator('Укажите дату доставки'),
107
107
  addressCourier: addressDaDataValidator(),
108
108
  cardCategory: defaultValidator('Укажите категорию карты'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.14.699",
3
+ "version": "0.14.701",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -0,0 +1,33 @@
1
+ import { fetchRetailJSON } from './doRequest';
2
+ import { type Participant, type PaymentType } from './updateUserTask';
3
+
4
+ export type Task = {
5
+ courierDeliveryFlg?: boolean;
6
+ creditPeriod?: number;
7
+ creditProgram: {
8
+ code: string;
9
+ name: string;
10
+ };
11
+ deliveryComment?: string;
12
+ deliveryDate?: string;
13
+ deliveryTimeCd?: {
14
+ value: string;
15
+ };
16
+ id: number;
17
+ loanAmount?: number;
18
+ office?: {
19
+ id: string;
20
+ };
21
+ participants: Participant[];
22
+ paymentTypeCd?: PaymentType;
23
+ };
24
+
25
+ type DraftTaskKZOResponse = {
26
+ tasks: Array<Task>;
27
+ };
28
+
29
+ export const draftTasksKZO = async (): Promise<DraftTaskKZOResponse['tasks']> => {
30
+ const res = await fetchRetailJSON<DraftTaskKZOResponse>('/user-data/draftTasksKZO', 'GET');
31
+
32
+ return res?.tasks || [];
33
+ };
@@ -0,0 +1,21 @@
1
+ import { fetchRetailJSON } from './doRequest';
2
+
3
+ type GetLastTaskStatusBody = {
4
+ profileId: number;
5
+ programId: string;
6
+ };
7
+
8
+ type GetLastTaskStatusResponse = {
9
+ statusCd: string;
10
+ taskId: number;
11
+ };
12
+
13
+ export const getLastTaskStatus = async (body: GetLastTaskStatusBody): Promise<number | null> => {
14
+ const res = await fetchRetailJSON<GetLastTaskStatusResponse>(
15
+ '/user-data/getLastStatus',
16
+ 'POST',
17
+ body,
18
+ );
19
+
20
+ return res?.statusCd === 'DRAFT' ? res?.taskId : null;
21
+ };
@@ -1,10 +1,8 @@
1
1
  import { fetchRetailJSON } from './doRequest';
2
+ import { type PaymentSystem } from './updateUserTask';
2
3
 
3
4
  type PaymentSystemResponse = {
4
- paymentSystems?: {
5
- name: string;
6
- type: string;
7
- }[];
5
+ paymentSystems?: PaymentSystem[];
8
6
  };
9
7
 
10
8
  export const getPaymentSystems = async (creditProgramId: string) => {
@@ -16,10 +14,5 @@ export const getPaymentSystems = async (creditProgramId: string) => {
16
14
  },
17
15
  );
18
16
 
19
- return (
20
- data?.paymentSystems?.map((paymentSystem) => ({
21
- id: paymentSystem.type,
22
- text: paymentSystem.name,
23
- })) ?? []
24
- );
17
+ return data?.paymentSystems || [];
25
18
  };
@@ -0,0 +1,12 @@
1
+ import { fetchRetailJSON } from './doRequest';
2
+ import { type Task } from './draftTasksKZO';
3
+
4
+ type GetTaskByIdBody = {
5
+ taskId: number;
6
+ };
7
+
8
+ export const getTaskById = async (body: GetTaskByIdBody): Promise<Task | undefined> => {
9
+ const res = await fetchRetailJSON<Task>('/user-data/getTaskById', 'POST', body);
10
+
11
+ return res || undefined;
12
+ };