@redneckz/wildless-cms-uni-blocks 0.14.1028 → 0.14.1029

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 (272) hide show
  1. package/bundle/bundle.umd.js +94 -38
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +2 -2
  4. package/bundle/components/ApplicationLeadForm/useLeadFormStore.d.ts +4 -2
  5. package/bundle/components/ApplicationLeadForm/useSaveUserData.d.ts +3 -2
  6. package/bundle/components/ApplicationLeadForm/useSendLeadFormAspects.d.ts +1 -1
  7. package/bundle/components/CreditCardForm/getCreditCardFormTaskData.d.ts +1 -1
  8. package/bundle/components/DebitForm/getDebitCardFormTaskData.d.ts +1 -1
  9. package/bundle/retail/adaptors/getCreditFormTaskData.d.ts +1 -1
  10. package/bundle/retail/api/createDraftTask.d.ts +1 -1
  11. package/bundle/retail/api/createParticipant.d.ts +5 -1
  12. package/bundle/retail/api/draftTasksKZO.d.ts +2 -1
  13. package/bundle/retail/api/getLastTaskStatus.d.ts +2 -1
  14. package/bundle/retail/api/getUserTasks.d.ts +2 -40
  15. package/bundle/retail/api/getUserTasksCard.d.ts +2 -0
  16. package/bundle/retail/api/getUserTasksCredit.d.ts +2 -0
  17. package/bundle/retail/api/getUserTasksDebit.d.ts +2 -0
  18. package/bundle/retail/api/getUserTasksTypes.d.ts +39 -0
  19. package/bundle/retail/api/updateUserTask.d.ts +1 -1
  20. package/bundle/retail/components/ConsentBkiDialog/useConsentBkiDialog.d.ts +3 -2
  21. package/bundle/retail/components/DraftDialog/DraftDialog.d.ts +1 -1
  22. package/bundle/retail/hooks/useRetailFormStore.d.ts +2 -1
  23. package/dist/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +2 -2
  24. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +80 -31
  25. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  26. package/dist/components/ApplicationLeadForm/useLeadFormStore.d.ts +4 -2
  27. package/dist/components/ApplicationLeadForm/useLeadFormStore.js.map +1 -1
  28. package/dist/components/ApplicationLeadForm/useSaveUserData.d.ts +3 -2
  29. package/dist/components/ApplicationLeadForm/useSaveUserData.js +2 -1
  30. package/dist/components/ApplicationLeadForm/useSaveUserData.js.map +1 -1
  31. package/dist/components/ApplicationLeadForm/useSendLeadFormAspects.d.ts +1 -1
  32. package/dist/components/ApplicationLeadForm/useSendLeadFormAspects.js.map +1 -1
  33. package/dist/components/CreditCardForm/getCreditCardFormTaskData.d.ts +1 -1
  34. package/dist/components/DebitForm/getDebitCardFormTaskData.d.ts +1 -1
  35. package/dist/retail/adaptors/getCreditFormTaskData.d.ts +1 -1
  36. package/dist/retail/api/createDraftTask.d.ts +1 -1
  37. package/dist/retail/api/createParticipant.d.ts +5 -1
  38. package/dist/retail/api/createParticipant.js +1 -1
  39. package/dist/retail/api/createParticipant.js.map +1 -1
  40. package/dist/retail/api/draftTasksKZO.d.ts +2 -1
  41. package/dist/retail/api/draftTasksKZO.js.map +1 -1
  42. package/dist/retail/api/getLastTaskStatus.d.ts +2 -1
  43. package/dist/retail/api/getLastTaskStatus.js.map +1 -1
  44. package/dist/retail/api/getUserTasks.d.ts +2 -40
  45. package/dist/retail/api/getUserTasks.js +2 -6
  46. package/dist/retail/api/getUserTasks.js.map +1 -1
  47. package/dist/retail/api/getUserTasksCard.d.ts +2 -0
  48. package/dist/retail/api/getUserTasksCard.js +8 -0
  49. package/dist/retail/api/getUserTasksCard.js.map +1 -0
  50. package/dist/retail/api/getUserTasksCredit.d.ts +2 -0
  51. package/dist/retail/api/getUserTasksCredit.js +9 -0
  52. package/dist/retail/api/getUserTasksCredit.js.map +1 -0
  53. package/dist/retail/api/getUserTasksDebit.d.ts +2 -0
  54. package/dist/retail/api/getUserTasksDebit.js +8 -0
  55. package/dist/retail/api/getUserTasksDebit.js.map +1 -0
  56. package/dist/retail/api/getUserTasksTypes.d.ts +39 -0
  57. package/dist/retail/api/getUserTasksTypes.js +9 -0
  58. package/dist/retail/api/getUserTasksTypes.js.map +1 -0
  59. package/dist/retail/api/updateUserTask.d.ts +1 -1
  60. package/dist/retail/components/ConsentBkiDialog/useConsentBkiDialog.d.ts +3 -2
  61. package/dist/retail/components/ConsentBkiDialog/useConsentBkiDialog.js +2 -1
  62. package/dist/retail/components/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
  63. package/dist/retail/components/DraftDialog/DraftDialog.d.ts +1 -1
  64. package/dist/retail/components/DraftDialog/DraftDialog.js +4 -2
  65. package/dist/retail/components/DraftDialog/DraftDialog.js.map +1 -1
  66. package/dist/retail/components/DraftDialog/parseDraftTask.js +4 -1
  67. package/dist/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
  68. package/dist/retail/hooks/useRetailFormStore.d.ts +2 -1
  69. package/lib/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +2 -2
  70. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +80 -31
  71. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  72. package/lib/components/ApplicationLeadForm/useLeadFormStore.d.ts +4 -2
  73. package/lib/components/ApplicationLeadForm/useLeadFormStore.js.map +1 -1
  74. package/lib/components/ApplicationLeadForm/useSaveUserData.d.ts +3 -2
  75. package/lib/components/ApplicationLeadForm/useSaveUserData.js +2 -1
  76. package/lib/components/ApplicationLeadForm/useSaveUserData.js.map +1 -1
  77. package/lib/components/ApplicationLeadForm/useSendLeadFormAspects.d.ts +1 -1
  78. package/lib/components/ApplicationLeadForm/useSendLeadFormAspects.js.map +1 -1
  79. package/lib/components/CreditCardForm/getCreditCardFormTaskData.d.ts +1 -1
  80. package/lib/components/DebitForm/getDebitCardFormTaskData.d.ts +1 -1
  81. package/lib/retail/adaptors/getCreditFormTaskData.d.ts +1 -1
  82. package/lib/retail/api/createDraftTask.d.ts +1 -1
  83. package/lib/retail/api/createParticipant.d.ts +5 -1
  84. package/lib/retail/api/createParticipant.js +1 -1
  85. package/lib/retail/api/createParticipant.js.map +1 -1
  86. package/lib/retail/api/draftTasksKZO.d.ts +2 -1
  87. package/lib/retail/api/draftTasksKZO.js.map +1 -1
  88. package/lib/retail/api/getLastTaskStatus.d.ts +2 -1
  89. package/lib/retail/api/getLastTaskStatus.js.map +1 -1
  90. package/lib/retail/api/getUserTasks.d.ts +2 -40
  91. package/lib/retail/api/getUserTasks.js +1 -6
  92. package/lib/retail/api/getUserTasks.js.map +1 -1
  93. package/lib/retail/api/getUserTasksCard.d.ts +2 -0
  94. package/lib/retail/api/getUserTasksCard.js +5 -0
  95. package/lib/retail/api/getUserTasksCard.js.map +1 -0
  96. package/lib/retail/api/getUserTasksCredit.d.ts +2 -0
  97. package/lib/retail/api/getUserTasksCredit.js +6 -0
  98. package/lib/retail/api/getUserTasksCredit.js.map +1 -0
  99. package/lib/retail/api/getUserTasksDebit.d.ts +2 -0
  100. package/lib/retail/api/getUserTasksDebit.js +5 -0
  101. package/lib/retail/api/getUserTasksDebit.js.map +1 -0
  102. package/lib/retail/api/getUserTasksTypes.d.ts +39 -0
  103. package/lib/retail/api/getUserTasksTypes.js +7 -0
  104. package/lib/retail/api/getUserTasksTypes.js.map +1 -0
  105. package/lib/retail/api/updateUserTask.d.ts +1 -1
  106. package/lib/retail/components/ConsentBkiDialog/useConsentBkiDialog.d.ts +3 -2
  107. package/lib/retail/components/ConsentBkiDialog/useConsentBkiDialog.js +2 -1
  108. package/lib/retail/components/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
  109. package/lib/retail/components/DraftDialog/DraftDialog.d.ts +1 -1
  110. package/lib/retail/components/DraftDialog/DraftDialog.js +4 -2
  111. package/lib/retail/components/DraftDialog/DraftDialog.js.map +1 -1
  112. package/lib/retail/components/DraftDialog/parseDraftTask.js +4 -1
  113. package/lib/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
  114. package/lib/retail/hooks/useRetailFormStore.d.ts +2 -1
  115. package/mobile/bundle/bundle.umd.js +94 -38
  116. package/mobile/bundle/bundle.umd.min.js +1 -1
  117. package/mobile/bundle/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +2 -2
  118. package/mobile/bundle/components/ApplicationLeadForm/useLeadFormStore.d.ts +4 -2
  119. package/mobile/bundle/components/ApplicationLeadForm/useSaveUserData.d.ts +3 -2
  120. package/mobile/bundle/components/ApplicationLeadForm/useSendLeadFormAspects.d.ts +1 -1
  121. package/mobile/bundle/components/CreditCardForm/getCreditCardFormTaskData.d.ts +1 -1
  122. package/mobile/bundle/components/DebitForm/getDebitCardFormTaskData.d.ts +1 -1
  123. package/mobile/bundle/retail/adaptors/getCreditFormTaskData.d.ts +1 -1
  124. package/mobile/bundle/retail/api/createDraftTask.d.ts +1 -1
  125. package/mobile/bundle/retail/api/createParticipant.d.ts +5 -1
  126. package/mobile/bundle/retail/api/draftTasksKZO.d.ts +2 -1
  127. package/mobile/bundle/retail/api/getLastTaskStatus.d.ts +2 -1
  128. package/mobile/bundle/retail/api/getUserTasks.d.ts +2 -40
  129. package/mobile/bundle/retail/api/getUserTasksCard.d.ts +2 -0
  130. package/mobile/bundle/retail/api/getUserTasksCredit.d.ts +2 -0
  131. package/mobile/bundle/retail/api/getUserTasksDebit.d.ts +2 -0
  132. package/mobile/bundle/retail/api/getUserTasksTypes.d.ts +39 -0
  133. package/mobile/bundle/retail/api/updateUserTask.d.ts +1 -1
  134. package/mobile/bundle/retail/components/ConsentBkiDialog/useConsentBkiDialog.d.ts +3 -2
  135. package/mobile/bundle/retail/components/DraftDialog/DraftDialog.d.ts +1 -1
  136. package/mobile/bundle/retail/hooks/useRetailFormStore.d.ts +2 -1
  137. package/mobile/dist/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +2 -2
  138. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +80 -31
  139. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  140. package/mobile/dist/components/ApplicationLeadForm/useLeadFormStore.d.ts +4 -2
  141. package/mobile/dist/components/ApplicationLeadForm/useLeadFormStore.js.map +1 -1
  142. package/mobile/dist/components/ApplicationLeadForm/useSaveUserData.d.ts +3 -2
  143. package/mobile/dist/components/ApplicationLeadForm/useSaveUserData.js +2 -1
  144. package/mobile/dist/components/ApplicationLeadForm/useSaveUserData.js.map +1 -1
  145. package/mobile/dist/components/ApplicationLeadForm/useSendLeadFormAspects.d.ts +1 -1
  146. package/mobile/dist/components/ApplicationLeadForm/useSendLeadFormAspects.js.map +1 -1
  147. package/mobile/dist/components/CreditCardForm/getCreditCardFormTaskData.d.ts +1 -1
  148. package/mobile/dist/components/DebitForm/getDebitCardFormTaskData.d.ts +1 -1
  149. package/mobile/dist/retail/adaptors/getCreditFormTaskData.d.ts +1 -1
  150. package/mobile/dist/retail/api/createDraftTask.d.ts +1 -1
  151. package/mobile/dist/retail/api/createParticipant.d.ts +5 -1
  152. package/mobile/dist/retail/api/createParticipant.js +1 -1
  153. package/mobile/dist/retail/api/createParticipant.js.map +1 -1
  154. package/mobile/dist/retail/api/draftTasksKZO.d.ts +2 -1
  155. package/mobile/dist/retail/api/draftTasksKZO.js.map +1 -1
  156. package/mobile/dist/retail/api/getLastTaskStatus.d.ts +2 -1
  157. package/mobile/dist/retail/api/getLastTaskStatus.js.map +1 -1
  158. package/mobile/dist/retail/api/getUserTasks.d.ts +2 -40
  159. package/mobile/dist/retail/api/getUserTasks.js +2 -6
  160. package/mobile/dist/retail/api/getUserTasks.js.map +1 -1
  161. package/mobile/dist/retail/api/getUserTasksCard.d.ts +2 -0
  162. package/mobile/dist/retail/api/getUserTasksCard.js +8 -0
  163. package/mobile/dist/retail/api/getUserTasksCard.js.map +1 -0
  164. package/mobile/dist/retail/api/getUserTasksCredit.d.ts +2 -0
  165. package/mobile/dist/retail/api/getUserTasksCredit.js +9 -0
  166. package/mobile/dist/retail/api/getUserTasksCredit.js.map +1 -0
  167. package/mobile/dist/retail/api/getUserTasksDebit.d.ts +2 -0
  168. package/mobile/dist/retail/api/getUserTasksDebit.js +8 -0
  169. package/mobile/dist/retail/api/getUserTasksDebit.js.map +1 -0
  170. package/mobile/dist/retail/api/getUserTasksTypes.d.ts +39 -0
  171. package/mobile/dist/retail/api/getUserTasksTypes.js +9 -0
  172. package/mobile/dist/retail/api/getUserTasksTypes.js.map +1 -0
  173. package/mobile/dist/retail/api/updateUserTask.d.ts +1 -1
  174. package/mobile/dist/retail/components/ConsentBkiDialog/useConsentBkiDialog.d.ts +3 -2
  175. package/mobile/dist/retail/components/ConsentBkiDialog/useConsentBkiDialog.js +2 -1
  176. package/mobile/dist/retail/components/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
  177. package/mobile/dist/retail/components/DraftDialog/DraftDialog.d.ts +1 -1
  178. package/mobile/dist/retail/components/DraftDialog/DraftDialog.js +4 -2
  179. package/mobile/dist/retail/components/DraftDialog/DraftDialog.js.map +1 -1
  180. package/mobile/dist/retail/components/DraftDialog/parseDraftTask.js +4 -1
  181. package/mobile/dist/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
  182. package/mobile/dist/retail/hooks/useRetailFormStore.d.ts +2 -1
  183. package/mobile/lib/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +2 -2
  184. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +80 -31
  185. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  186. package/mobile/lib/components/ApplicationLeadForm/useLeadFormStore.d.ts +4 -2
  187. package/mobile/lib/components/ApplicationLeadForm/useLeadFormStore.js.map +1 -1
  188. package/mobile/lib/components/ApplicationLeadForm/useSaveUserData.d.ts +3 -2
  189. package/mobile/lib/components/ApplicationLeadForm/useSaveUserData.js +2 -1
  190. package/mobile/lib/components/ApplicationLeadForm/useSaveUserData.js.map +1 -1
  191. package/mobile/lib/components/ApplicationLeadForm/useSendLeadFormAspects.d.ts +1 -1
  192. package/mobile/lib/components/ApplicationLeadForm/useSendLeadFormAspects.js.map +1 -1
  193. package/mobile/lib/components/CreditCardForm/getCreditCardFormTaskData.d.ts +1 -1
  194. package/mobile/lib/components/DebitForm/getDebitCardFormTaskData.d.ts +1 -1
  195. package/mobile/lib/retail/adaptors/getCreditFormTaskData.d.ts +1 -1
  196. package/mobile/lib/retail/api/createDraftTask.d.ts +1 -1
  197. package/mobile/lib/retail/api/createParticipant.d.ts +5 -1
  198. package/mobile/lib/retail/api/createParticipant.js +1 -1
  199. package/mobile/lib/retail/api/createParticipant.js.map +1 -1
  200. package/mobile/lib/retail/api/draftTasksKZO.d.ts +2 -1
  201. package/mobile/lib/retail/api/draftTasksKZO.js.map +1 -1
  202. package/mobile/lib/retail/api/getLastTaskStatus.d.ts +2 -1
  203. package/mobile/lib/retail/api/getLastTaskStatus.js.map +1 -1
  204. package/mobile/lib/retail/api/getUserTasks.d.ts +2 -40
  205. package/mobile/lib/retail/api/getUserTasks.js +1 -6
  206. package/mobile/lib/retail/api/getUserTasks.js.map +1 -1
  207. package/mobile/lib/retail/api/getUserTasksCard.d.ts +2 -0
  208. package/mobile/lib/retail/api/getUserTasksCard.js +5 -0
  209. package/mobile/lib/retail/api/getUserTasksCard.js.map +1 -0
  210. package/mobile/lib/retail/api/getUserTasksCredit.d.ts +2 -0
  211. package/mobile/lib/retail/api/getUserTasksCredit.js +6 -0
  212. package/mobile/lib/retail/api/getUserTasksCredit.js.map +1 -0
  213. package/mobile/lib/retail/api/getUserTasksDebit.d.ts +2 -0
  214. package/mobile/lib/retail/api/getUserTasksDebit.js +5 -0
  215. package/mobile/lib/retail/api/getUserTasksDebit.js.map +1 -0
  216. package/mobile/lib/retail/api/getUserTasksTypes.d.ts +39 -0
  217. package/mobile/lib/retail/api/getUserTasksTypes.js +7 -0
  218. package/mobile/lib/retail/api/getUserTasksTypes.js.map +1 -0
  219. package/mobile/lib/retail/api/updateUserTask.d.ts +1 -1
  220. package/mobile/lib/retail/components/ConsentBkiDialog/useConsentBkiDialog.d.ts +3 -2
  221. package/mobile/lib/retail/components/ConsentBkiDialog/useConsentBkiDialog.js +2 -1
  222. package/mobile/lib/retail/components/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
  223. package/mobile/lib/retail/components/DraftDialog/DraftDialog.d.ts +1 -1
  224. package/mobile/lib/retail/components/DraftDialog/DraftDialog.js +4 -2
  225. package/mobile/lib/retail/components/DraftDialog/DraftDialog.js.map +1 -1
  226. package/mobile/lib/retail/components/DraftDialog/parseDraftTask.js +4 -1
  227. package/mobile/lib/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
  228. package/mobile/lib/retail/hooks/useRetailFormStore.d.ts +2 -1
  229. package/mobile/src/components/ApplicationLeadForm/getLeadFormTaskData.ts +2 -2
  230. package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +140 -32
  231. package/mobile/src/components/ApplicationLeadForm/useLeadFormStore.ts +2 -1
  232. package/mobile/src/components/ApplicationLeadForm/useSaveUserData.ts +11 -2
  233. package/mobile/src/components/ApplicationLeadForm/useSendLeadFormAspects.tsx +1 -1
  234. package/mobile/src/components/CreditCardForm/getCreditCardFormTaskData.ts +1 -1
  235. package/mobile/src/components/DebitForm/getDebitCardFormTaskData.ts +1 -1
  236. package/mobile/src/retail/adaptors/getCreditFormTaskData.ts +1 -1
  237. package/mobile/src/retail/api/createDraftTask.ts +1 -1
  238. package/mobile/src/retail/api/createParticipant.ts +3 -2
  239. package/mobile/src/retail/api/draftTasksKZO.ts +2 -1
  240. package/mobile/src/retail/api/getLastTaskStatus.ts +2 -1
  241. package/mobile/src/retail/api/getUserTasks.ts +2 -42
  242. package/mobile/src/retail/api/getUserTasksCard.ts +6 -0
  243. package/mobile/src/retail/api/getUserTasksCredit.ts +8 -0
  244. package/mobile/src/retail/api/getUserTasksDebit.ts +6 -0
  245. package/mobile/src/retail/api/getUserTasksTypes.ts +42 -0
  246. package/mobile/src/retail/api/updateUserTask.ts +1 -1
  247. package/mobile/src/retail/components/ConsentBkiDialog/useConsentBkiDialog.tsx +6 -3
  248. package/mobile/src/retail/components/DraftDialog/DraftDialog.tsx +5 -3
  249. package/mobile/src/retail/components/DraftDialog/parseDraftTask.ts +5 -1
  250. package/package.json +1 -1
  251. package/src/components/ApplicationLeadForm/getLeadFormTaskData.ts +2 -2
  252. package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +140 -32
  253. package/src/components/ApplicationLeadForm/useLeadFormStore.ts +2 -1
  254. package/src/components/ApplicationLeadForm/useSaveUserData.ts +11 -2
  255. package/src/components/ApplicationLeadForm/useSendLeadFormAspects.tsx +1 -1
  256. package/src/components/CreditCardForm/getCreditCardFormTaskData.ts +1 -1
  257. package/src/components/DebitForm/getDebitCardFormTaskData.ts +1 -1
  258. package/src/icons/IconName.ts +4 -4
  259. package/src/retail/adaptors/getCreditFormTaskData.ts +1 -1
  260. package/src/retail/api/createDraftTask.ts +1 -1
  261. package/src/retail/api/createParticipant.ts +3 -2
  262. package/src/retail/api/draftTasksKZO.ts +2 -1
  263. package/src/retail/api/getLastTaskStatus.ts +2 -1
  264. package/src/retail/api/getUserTasks.ts +2 -42
  265. package/src/retail/api/getUserTasksCard.ts +6 -0
  266. package/src/retail/api/getUserTasksCredit.ts +8 -0
  267. package/src/retail/api/getUserTasksDebit.ts +6 -0
  268. package/src/retail/api/getUserTasksTypes.ts +42 -0
  269. package/src/retail/api/updateUserTask.ts +1 -1
  270. package/src/retail/components/ConsentBkiDialog/useConsentBkiDialog.tsx +6 -3
  271. package/src/retail/components/DraftDialog/DraftDialog.tsx +5 -3
  272. package/src/retail/components/DraftDialog/parseDraftTask.ts +5 -1
@@ -8,7 +8,8 @@ export interface LeadFormStoreSlice {
8
8
  leadForm: LeadFormState;
9
9
  taskId: number;
10
10
  profileId: Nullable<number>;
11
- participantId: number;
11
+ userId: Nullable<string | number>;
12
+ participantId: string | number;
12
13
  programId: string;
13
14
  productType: ProductType;
14
15
  referalData: ReferalData;
@@ -4,9 +4,10 @@ import { type Nullable } from '../../utils/Nullable';
4
4
  import { useLeadFormStore } from './useLeadFormStore';
5
5
 
6
6
  export interface UserData {
7
- participantId: number;
7
+ participantId: string | number;
8
8
  taskId: number;
9
9
  profileId?: Nullable<number>;
10
+ userId?: Nullable<string | number>;
10
11
  programId: string;
11
12
  formData: LeadFormState;
12
13
  }
@@ -14,10 +15,18 @@ export const useSaveUserData = () => {
14
15
  const leadFormStore = useLeadFormStore();
15
16
 
16
17
  return useCallback(
17
- ({ participantId, taskId, profileId, programId: programNumber, formData }: UserData) => {
18
+ ({
19
+ participantId,
20
+ taskId,
21
+ userId,
22
+ profileId,
23
+ programId: programNumber,
24
+ formData,
25
+ }: UserData) => {
18
26
  leadFormStore.participantId = participantId;
19
27
  leadFormStore.taskId = taskId;
20
28
  leadFormStore.profileId = profileId;
29
+ leadFormStore.userId = userId;
21
30
  leadFormStore.programId = programNumber;
22
31
  leadFormStore.leadForm = formData;
23
32
  },
@@ -9,7 +9,7 @@ export const useSendLeadFormAspects = ({ data }: AspectsProps) => {
9
9
  const aspects = useAspects();
10
10
 
11
11
  return useCallback(
12
- (ProfileId: number, TaskId: number) => {
12
+ (ProfileId: string | number, TaskId: number) => {
13
13
  const snowplowParams = JSON.stringify({
14
14
  ProfileId,
15
15
  TaskId,
@@ -12,7 +12,7 @@ import {
12
12
  } from './getDeliveryCreditCardData';
13
13
 
14
14
  type getCreditCardFormTaskDataProps = {
15
- participantId: number;
15
+ participantId: string | number;
16
16
  taskId: number;
17
17
  profileId: number;
18
18
  formData: LeadFormState;
@@ -12,7 +12,7 @@ import {
12
12
  import { debitProgrammIdToCardCodesMap } from './utils';
13
13
 
14
14
  type getDebitFormTaskDataProps = {
15
- participantId: number;
15
+ participantId: string | number;
16
16
  taskId: number;
17
17
  formData: LeadFormState;
18
18
  programId: string;
@@ -10,7 +10,7 @@ import { getFamilyStatusAndIncomeData } from './getFamilyStatusAndIncomeData';
10
10
  import { getPersonalInfoData } from './getPersonalInfoData';
11
11
 
12
12
  type getCreditFormTaskDataProps = {
13
- participantId: Nullable<number>;
13
+ participantId: Nullable<string | number>;
14
14
  taskId: number;
15
15
  profileId: Nullable<number>;
16
16
  formData: LeadFormState;
@@ -2,7 +2,7 @@ import { fetchRetailJSON } from './doRequest';
2
2
 
3
3
  export type CreateDraftTaskBody = {
4
4
  profileId?: number;
5
- participantId?: number;
5
+ participantId?: string | number;
6
6
  programId: string;
7
7
  };
8
8
 
@@ -6,7 +6,8 @@ interface CreateParticipantType {
6
6
  }
7
7
 
8
8
  interface CreateParticipantResponseType {
9
- participantId: number;
9
+ participantId: string;
10
+ userId?: string;
10
11
  }
11
12
 
12
13
  export const createParticipant = (body: CreateParticipantType) =>
@@ -14,4 +15,4 @@ export const createParticipant = (body: CreateParticipantType) =>
14
15
  '/public-data/createParticipant',
15
16
  'POST',
16
17
  body,
17
- ).then((res) => res?.participantId || null);
18
+ ).then((res) => res || null);
@@ -24,7 +24,8 @@ export type Task = {
24
24
  office?: {
25
25
  id: string;
26
26
  };
27
- participants: Participant[];
27
+ participants?: Participant[];
28
+ participant?: Participant;
28
29
  paymentTypeCd?: PaymentType;
29
30
  taskSource?: string;
30
31
  };
@@ -1,7 +1,8 @@
1
1
  import { fetchRetailJSON } from './doRequest';
2
2
 
3
3
  type GetLastTaskStatusBody = {
4
- profileId: number;
4
+ profileId?: string | number;
5
+ userId?: string | number;
5
6
  programId: string;
6
7
  };
7
8
 
@@ -1,47 +1,7 @@
1
1
  import { fetchRetailJSON } from './doRequest';
2
+ import { type GetUserTasksResponse } from './getUserTasksTypes';
2
3
 
3
- export enum EProductType {
4
- CASH = 'CASH',
5
- CARD = 'CARD',
6
- DEBIT = 'DEBIT',
7
- }
8
-
9
- export type UserTask = {
10
- classCard?: {
11
- key: string;
12
- value: string;
13
- };
14
- createdDate?: string;
15
- creditPeriod?: number;
16
- deliveryAddress?: string;
17
- extId?: string;
18
- id?: number;
19
- loanAmount?: number;
20
- officeAddress?: string;
21
- programId?: number;
22
- programName?: string;
23
- statusCd?: {
24
- key: string;
25
- value: string;
26
- };
27
- statusDescription?: string;
28
- };
29
-
30
- type AllTasks = {
31
- productTypeCd: {
32
- key: EProductType;
33
- value: string;
34
- };
35
- tasks: Array<UserTask>;
36
- };
37
-
38
- export type GetUserTasksResponse = {
39
- allTasks?: Array<AllTasks>;
40
- user?: {
41
- name: string;
42
- midname: string;
43
- };
44
- };
4
+ export { EProductType, type GetUserTasksResponse, type UserTask } from './getUserTasksTypes';
45
5
 
46
6
  export const getUserTasks = async (): Promise<GetUserTasksResponse | undefined> => {
47
7
  const res = await fetchRetailJSON<GetUserTasksResponse>('/user-data/getUserTasks', 'GET');
@@ -0,0 +1,6 @@
1
+ import { type GetUserTasksResponse } from './getUserTasksTypes';
2
+
3
+ export const getUserTasksCard = async (): Promise<GetUserTasksResponse | undefined> => {
4
+ // TODO: Заглушка - бэкенд в разработке
5
+ return undefined;
6
+ };
@@ -0,0 +1,8 @@
1
+ import { fetchRetailJSON } from './doRequest';
2
+ import { type GetUserTasksResponse } from './getUserTasksTypes';
3
+
4
+ export const getUserTasksCredit = async (): Promise<GetUserTasksResponse | undefined> => {
5
+ const res = await fetchRetailJSON<GetUserTasksResponse>('/public-data/getUserTasksCredit', 'GET');
6
+
7
+ return res || undefined;
8
+ };
@@ -0,0 +1,6 @@
1
+ import { type GetUserTasksResponse } from './getUserTasksTypes';
2
+
3
+ export const getUserTasksDebit = async (): Promise<GetUserTasksResponse | undefined> => {
4
+ // TODO: Заглушка - бэкенд в разработке
5
+ return undefined;
6
+ };
@@ -0,0 +1,42 @@
1
+ export enum EProductType {
2
+ CASH = 'CASH',
3
+ CARD = 'CARD',
4
+ DEBIT = 'DEBIT',
5
+ }
6
+
7
+ export type UserTask = {
8
+ classCard?: {
9
+ key: string;
10
+ value: string;
11
+ };
12
+ createdDate?: string;
13
+ creditPeriod?: number;
14
+ deliveryAddress?: string;
15
+ extId?: string;
16
+ id?: number;
17
+ loanAmount?: number;
18
+ officeAddress?: string;
19
+ programId?: number;
20
+ programName?: string;
21
+ statusCd?: {
22
+ key: string;
23
+ value: string;
24
+ };
25
+ statusDescription?: string;
26
+ };
27
+
28
+ export type AllTasks = {
29
+ productTypeCd: {
30
+ key: EProductType;
31
+ value: string;
32
+ };
33
+ tasks: Array<UserTask>;
34
+ };
35
+
36
+ export type GetUserTasksResponse = {
37
+ allTasks?: Array<AllTasks>;
38
+ user?: {
39
+ name: string;
40
+ midname: string;
41
+ };
42
+ };
@@ -48,7 +48,7 @@ export type PaymentType = {
48
48
 
49
49
  export type Participant = {
50
50
  birthDate?: string;
51
- id?: Nullable<number>;
51
+ id?: Nullable<string | number>;
52
52
  midname?: string;
53
53
  name?: string;
54
54
  surname?: string;
@@ -7,9 +7,10 @@ import { ConsentBkiDialog } from './ConsentBkiDialog';
7
7
  type SubmitBkiConsentProps = {
8
8
  phone?: string;
9
9
  profileId?: number;
10
+ userId?: string | number;
10
11
  onFail?: () => void;
11
12
  taskId?: number;
12
- participantId?: number;
13
+ participantId?: string | number;
13
14
  };
14
15
 
15
16
  export const useConsentBkiDialog = (onClose: () => void) => {
@@ -17,7 +18,8 @@ export const useConsentBkiDialog = (onClose: () => void) => {
17
18
  const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
18
19
 
19
20
  const handleSuccessVerify =
20
- (profileId?: number, taskId?: number, participantId?: number) => async (smsCode?: string) => {
21
+ (profileId?: number, taskId?: number, participantId?: string | number) =>
22
+ async (smsCode?: string) => {
21
23
  try {
22
24
  if (profileId) {
23
25
  await updateUserProfile({
@@ -64,11 +66,12 @@ export const useConsentBkiDialog = (onClose: () => void) => {
64
66
  };
65
67
 
66
68
  return {
67
- open: ({ phone, profileId, onFail, taskId, participantId }: SubmitBkiConsentProps) =>
69
+ open: ({ phone, profileId, userId, onFail, taskId, participantId }: SubmitBkiConsentProps) =>
68
70
  open({
69
71
  onSubmit: handleSubmitBkiConsent({
70
72
  phone,
71
73
  profileId,
74
+ userId,
72
75
  onFail,
73
76
  taskId,
74
77
  participantId,
@@ -17,7 +17,7 @@ export interface DraftDialogProps extends OnCloseProps {
17
17
  task: Task;
18
18
  isFromLead?: boolean;
19
19
  isDebit?: boolean;
20
- sendAspects?: (profileId: number, taskId: number) => void;
20
+ sendAspects?: (userId: number, taskId: number) => void;
21
21
  }
22
22
 
23
23
  export const DraftDialog = JSX<DraftDialogProps>(function ({
@@ -30,19 +30,21 @@ export const DraftDialog = JSX<DraftDialogProps>(function ({
30
30
  const retailFormStore = useRetailFormStore();
31
31
  const navigator = locationNavigator();
32
32
 
33
- const { participants, creditProgram, createdDate = '', id: taskId } = task;
33
+ const { participants, participant, creditProgram, createdDate = '', id: taskId } = task;
34
34
 
35
35
  const programmId: string = creditProgramCodeToProductIdMap[creditProgram.code];
36
36
  const isCredit = Boolean(creditCodesToProgrammIdMap[creditProgram.code]);
37
37
  const productData = getProductData(isDebit, isCredit);
38
38
 
39
- const { id: participantId, profile } = participants[0];
39
+ const currentParticipant = participant || participants?.[0];
40
+ const { id: participantId, profile } = currentParticipant || {};
40
41
 
41
42
  const handleGoToDraft = useCallback(() => {
42
43
  const taskFromDraft = parseDraftTask(task);
43
44
  retailFormStore.participantId = participantId ?? null;
44
45
  retailFormStore.taskId = taskId;
45
46
  retailFormStore.profileId = profile?.id ?? null;
47
+ retailFormStore.userId = profile?.id ?? null;
46
48
  retailFormStore.programId = programmId;
47
49
  retailFormStore.leadForm = taskFromDraft;
48
50
 
@@ -11,7 +11,11 @@ import {
11
11
  } from './utils';
12
12
 
13
13
  export const parseDraftTask = (task: Task): LeadFormState => {
14
- const participant = task.participants[0];
14
+ const participant = task.participant || task.participants?.[0];
15
+ if (!participant) {
16
+ throw new Error('Task does not contain participant data');
17
+ }
18
+
15
19
  const {
16
20
  classCard: cardCategory,
17
21
  codeWord,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.14.1028",
3
+ "version": "0.14.1029",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -12,7 +12,7 @@ import { type Nullable } from '../../utils/Nullable';
12
12
  import { debitProgrammIdToCardCodesMap } from '../DebitForm/utils';
13
13
 
14
14
  type getCreditLeadFormTaskDataProps = {
15
- participantId: number;
15
+ participantId: string | number;
16
16
  taskId: number;
17
17
  profileId?: number;
18
18
  formData: LeadFormState;
@@ -28,7 +28,7 @@ type getDebitLeadFormTaskDataProps = {
28
28
  };
29
29
 
30
30
  type getParticipantProps = {
31
- participantId: number;
31
+ participantId: number | string;
32
32
  profileId?: number;
33
33
  formData: LeadFormState;
34
34
  consents?: FormRetailConsents;
@@ -62,6 +62,7 @@ export const useApplicationLeadApi = ({
62
62
  const consentBkiDialog = useConsentBkiDialog(goToNextStep);
63
63
  const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
64
64
  const draftDialog = useDraftDialog();
65
+
65
66
  const handleFailSendForm = () => {
66
67
  verifyPhoneDialog.close();
67
68
  changeSubmitFormStatus(false);
@@ -145,7 +146,7 @@ export const useApplicationLeadApi = ({
145
146
  try {
146
147
  startSending();
147
148
  const transformedFormData = transformFormData(formData);
148
- const participantId = await createParticipant({
149
+ const participantData = await createParticipant({
149
150
  phone: formatPhone(transformedFormData.phone as string),
150
151
  email: transformedFormData.email as string,
151
152
  });
@@ -153,38 +154,41 @@ export const useApplicationLeadApi = ({
153
154
  const referalData = leadFormStore.referalData;
154
155
  const marketingInfo = sessionStore.marketingInfo;
155
156
 
156
- if (!participantId) {
157
+ if (!participantData) {
157
158
  throw new Error();
158
159
  }
159
160
 
160
- const sendCurrentTask = async () => {
161
- const taskId = await updateUserDataNewMicroservice({
162
- programId,
163
- participantId,
164
- formData: transformedFormData,
165
- referalData,
166
- productType,
167
- marketingInfo,
168
- saveUserData,
169
- sendAspects,
170
- });
171
- verifyPhoneDialog.close();
161
+ const { participantId, userId } = participantData;
172
162
 
173
- consentBkiDialog.open({
174
- phone: transformedFormData.phone,
175
- taskId,
176
- participantId,
177
- onFail: handleFailSendForm,
178
- });
179
- };
163
+ if (!participantId) {
164
+ throw new Error();
165
+ }
180
166
 
181
- const handleSuccessVerify = async () => {
182
- try {
183
- await sendCurrentTask();
184
- } catch {
185
- handleFailSendForm();
186
- }
187
- };
167
+ const sendCurrentTask = createSendCurrentTaskNew({
168
+ programId,
169
+ participantId,
170
+ userId,
171
+ formData: transformedFormData,
172
+ referalData,
173
+ productType,
174
+ marketingInfo,
175
+ saveUserData,
176
+ sendAspects,
177
+ verifyPhoneDialog,
178
+ consentBkiDialog,
179
+ handleFailSendForm,
180
+ });
181
+
182
+ const handleSuccessVerify = createHandleSuccessVerifyNew({
183
+ userId,
184
+ programId,
185
+ productType,
186
+ verifyPhoneDialog,
187
+ draftDialog,
188
+ sendAspects,
189
+ sendCurrentTask,
190
+ handleFailSendForm,
191
+ });
188
192
 
189
193
  const acceptedConsents = getAcceptedConsents(transformedFormData, productType);
190
194
 
@@ -207,6 +211,108 @@ export const useApplicationLeadApi = ({
207
211
  };
208
212
  };
209
213
 
214
+ const createSendCurrentTaskNew =
215
+ ({
216
+ programId,
217
+ participantId,
218
+ userId,
219
+ formData,
220
+ referalData,
221
+ productType,
222
+ marketingInfo,
223
+ saveUserData,
224
+ sendAspects,
225
+ verifyPhoneDialog,
226
+ consentBkiDialog,
227
+ handleFailSendForm,
228
+ }: {
229
+ programId: string;
230
+ participantId: string | number;
231
+ userId?: string | number;
232
+ formData: LeadFormState;
233
+ referalData: ReferalData | null;
234
+ productType: ProductType;
235
+ marketingInfo: MarketingInfo | null;
236
+ saveUserData: (userData: UserData) => void;
237
+ sendAspects: (userId: string | number, taskId: number) => void;
238
+ verifyPhoneDialog: any;
239
+ consentBkiDialog: any;
240
+ handleFailSendForm: () => void;
241
+ }) =>
242
+ async () => {
243
+ const taskId = await updateUserDataNewMicroservice({
244
+ programId,
245
+ participantId,
246
+ userId,
247
+ formData,
248
+ referalData,
249
+ productType,
250
+ marketingInfo,
251
+ saveUserData,
252
+ sendAspects,
253
+ });
254
+ verifyPhoneDialog.close();
255
+
256
+ consentBkiDialog.open({
257
+ phone: formData.phone,
258
+ taskId,
259
+ userId,
260
+ participantId,
261
+ onFail: handleFailSendForm,
262
+ });
263
+ };
264
+
265
+ const createHandleSuccessVerifyNew =
266
+ ({
267
+ userId,
268
+ programId,
269
+ productType,
270
+ verifyPhoneDialog,
271
+ draftDialog,
272
+ sendAspects,
273
+ sendCurrentTask,
274
+ handleFailSendForm,
275
+ }: {
276
+ userId?: string | number;
277
+ programId: string;
278
+ productType: ProductType;
279
+ verifyPhoneDialog: any;
280
+ draftDialog: any;
281
+ sendAspects: (userId: string | number, taskId: number) => void;
282
+ sendCurrentTask: () => Promise<void>;
283
+ handleFailSendForm: () => void;
284
+ }) =>
285
+ async () => {
286
+ try {
287
+ const lastTaskId = await getLastTaskStatus({
288
+ userId,
289
+ profileId: userId,
290
+ programId,
291
+ });
292
+
293
+ if (lastTaskId) {
294
+ const task = await getTaskById({ taskId: lastTaskId });
295
+
296
+ if (task) {
297
+ verifyPhoneDialog.close();
298
+ draftDialog.open({
299
+ task,
300
+ isFromLead: true,
301
+ isDebit: productType === 'debitCard',
302
+ sendAspects,
303
+ onClose: sendCurrentTask,
304
+ });
305
+
306
+ return;
307
+ }
308
+ }
309
+
310
+ await sendCurrentTask();
311
+ } catch {
312
+ handleFailSendForm();
313
+ }
314
+ };
315
+
210
316
  const getAcceptedConsents = (formData: LeadFormState, productType: ProductType): string[] => {
211
317
  const consents = productTypeToConsentsMap[productType];
212
318
 
@@ -288,6 +394,7 @@ const updateUserData = async ({
288
394
 
289
395
  const updateUserDataNewMicroservice = async ({
290
396
  programId,
397
+ userId,
291
398
  participantId,
292
399
  formData,
293
400
  referalData,
@@ -297,13 +404,14 @@ const updateUserDataNewMicroservice = async ({
297
404
  sendAspects,
298
405
  }: {
299
406
  programId: string;
300
- participantId: number;
407
+ participantId: string | number;
408
+ userId?: string | number;
301
409
  formData: LeadFormState;
302
410
  referalData: ReferalData | null;
303
411
  productType: ProductType;
304
412
  marketingInfo: MarketingInfo | null;
305
413
  saveUserData: (userData: UserData) => void;
306
- sendAspects: (profileId: number, taskId: number) => void;
414
+ sendAspects: (userId: string | number, taskId: number) => void;
307
415
  }): Promise<number> => {
308
416
  let taskId: number;
309
417
  const transformedConsents = transformConsentsFields(formData, productType);
@@ -332,8 +440,8 @@ const updateUserDataNewMicroservice = async ({
332
440
  });
333
441
  }
334
442
 
335
- sendAspects(participantId, taskId);
336
- saveUserData({ participantId, taskId, programId, formData });
443
+ sendAspects(userId || participantId, taskId);
444
+ saveUserData({ participantId, taskId, userId, programId, formData });
337
445
 
338
446
  return taskId;
339
447
  } catch (ex) {
@@ -8,7 +8,8 @@ export interface LeadFormStoreSlice {
8
8
  leadForm: LeadFormState;
9
9
  taskId: number;
10
10
  profileId: Nullable<number>;
11
- participantId: number;
11
+ userId: Nullable<string | number>;
12
+ participantId: string | number;
12
13
  programId: string;
13
14
  productType: ProductType;
14
15
  referalData: ReferalData;
@@ -4,9 +4,10 @@ import { type Nullable } from '../../utils/Nullable';
4
4
  import { useLeadFormStore } from './useLeadFormStore';
5
5
 
6
6
  export interface UserData {
7
- participantId: number;
7
+ participantId: string | number;
8
8
  taskId: number;
9
9
  profileId?: Nullable<number>;
10
+ userId?: Nullable<string | number>;
10
11
  programId: string;
11
12
  formData: LeadFormState;
12
13
  }
@@ -14,10 +15,18 @@ export const useSaveUserData = () => {
14
15
  const leadFormStore = useLeadFormStore();
15
16
 
16
17
  return useCallback(
17
- ({ participantId, taskId, profileId, programId: programNumber, formData }: UserData) => {
18
+ ({
19
+ participantId,
20
+ taskId,
21
+ userId,
22
+ profileId,
23
+ programId: programNumber,
24
+ formData,
25
+ }: UserData) => {
18
26
  leadFormStore.participantId = participantId;
19
27
  leadFormStore.taskId = taskId;
20
28
  leadFormStore.profileId = profileId;
29
+ leadFormStore.userId = userId;
21
30
  leadFormStore.programId = programNumber;
22
31
  leadFormStore.leadForm = formData;
23
32
  },
@@ -9,7 +9,7 @@ export const useSendLeadFormAspects = ({ data }: AspectsProps) => {
9
9
  const aspects = useAspects();
10
10
 
11
11
  return useCallback(
12
- (ProfileId: number, TaskId: number) => {
12
+ (ProfileId: string | number, TaskId: number) => {
13
13
  const snowplowParams = JSON.stringify({
14
14
  ProfileId,
15
15
  TaskId,
@@ -12,7 +12,7 @@ import {
12
12
  } from './getDeliveryCreditCardData';
13
13
 
14
14
  type getCreditCardFormTaskDataProps = {
15
- participantId: number;
15
+ participantId: string | number;
16
16
  taskId: number;
17
17
  profileId: number;
18
18
  formData: LeadFormState;
@@ -12,7 +12,7 @@ import {
12
12
  import { debitProgrammIdToCardCodesMap } from './utils';
13
13
 
14
14
  type getDebitFormTaskDataProps = {
15
- participantId: number;
15
+ participantId: string | number;
16
16
  taskId: number;
17
17
  formData: LeadFormState;
18
18
  programId: string;