@redneckz/wildless-cms-uni-blocks 0.14.700 → 0.14.702

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 (193) 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/getTaskById.d.ts +6 -0
  4. package/bundle/api/RetailAPI/updateUserTask.d.ts +8 -8
  5. package/bundle/bundle.umd.js +252 -30
  6. package/bundle/bundle.umd.min.js +1 -1
  7. package/bundle/components/ApplicationLeadForm/LeadFormState.d.ts +6 -6
  8. package/bundle/components/ApplicationLeadForm/useSaveUserData.d.ts +9 -0
  9. package/bundle/ui-kit/DraftDialog/DraftActionButton.d.ts +7 -0
  10. package/bundle/ui-kit/DraftDialog/DraftDialog.d.ts +7 -0
  11. package/bundle/ui-kit/DraftDialog/EmptyDraftDialog.d.ts +4 -0
  12. package/bundle/ui-kit/DraftDialog/parseDraftTask.d.ts +3 -0
  13. package/bundle/ui-kit/DraftDialog/useDraftDialog.d.ts +10 -0
  14. package/bundle/ui-kit/DraftDialog/utils.d.ts +138 -0
  15. package/dist/api/RetailAPI/draftTasksKZO.d.ts +26 -0
  16. package/dist/api/RetailAPI/draftTasksKZO.js +9 -0
  17. package/dist/api/RetailAPI/draftTasksKZO.js.map +1 -0
  18. package/dist/api/RetailAPI/getLastTaskStatus.d.ts +6 -0
  19. package/dist/api/RetailAPI/getLastTaskStatus.js +9 -0
  20. package/dist/api/RetailAPI/getLastTaskStatus.js.map +1 -0
  21. package/dist/api/RetailAPI/getTaskById.d.ts +6 -0
  22. package/dist/api/RetailAPI/getTaskById.js +9 -0
  23. package/dist/api/RetailAPI/getTaskById.js.map +1 -0
  24. package/dist/api/RetailAPI/updateUserTask.d.ts +8 -8
  25. package/dist/components/ApplicationLeadForm/LeadFormState.d.ts +6 -6
  26. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +32 -21
  27. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  28. package/dist/components/ApplicationLeadForm/useSaveUserData.d.ts +9 -0
  29. package/dist/components/ApplicationLeadForm/useSaveUserData.js +19 -0
  30. package/dist/components/ApplicationLeadForm/useSaveUserData.js.map +1 -0
  31. package/dist/ui-kit/DraftDialog/DraftActionButton.d.ts +7 -0
  32. package/dist/ui-kit/DraftDialog/DraftActionButton.js +10 -0
  33. package/dist/ui-kit/DraftDialog/DraftActionButton.js.map +1 -0
  34. package/dist/ui-kit/DraftDialog/DraftDialog.d.ts +7 -0
  35. package/dist/ui-kit/DraftDialog/DraftDialog.js +43 -0
  36. package/dist/ui-kit/DraftDialog/DraftDialog.js.map +1 -0
  37. package/dist/ui-kit/DraftDialog/EmptyDraftDialog.d.ts +4 -0
  38. package/dist/ui-kit/DraftDialog/EmptyDraftDialog.js +22 -0
  39. package/dist/ui-kit/DraftDialog/EmptyDraftDialog.js.map +1 -0
  40. package/dist/ui-kit/DraftDialog/parseDraftTask.d.ts +3 -0
  41. package/dist/ui-kit/DraftDialog/parseDraftTask.js +65 -0
  42. package/dist/ui-kit/DraftDialog/parseDraftTask.js.map +1 -0
  43. package/dist/ui-kit/DraftDialog/useDraftDialog.d.ts +10 -0
  44. package/dist/ui-kit/DraftDialog/useDraftDialog.js +16 -0
  45. package/dist/ui-kit/DraftDialog/useDraftDialog.js.map +1 -0
  46. package/dist/ui-kit/DraftDialog/utils.d.ts +138 -0
  47. package/dist/ui-kit/DraftDialog/utils.js +85 -0
  48. package/dist/ui-kit/DraftDialog/utils.js.map +1 -0
  49. package/lib/api/RetailAPI/draftTasksKZO.d.ts +26 -0
  50. package/lib/api/RetailAPI/draftTasksKZO.js +6 -0
  51. package/lib/api/RetailAPI/draftTasksKZO.js.map +1 -0
  52. package/lib/api/RetailAPI/getLastTaskStatus.d.ts +6 -0
  53. package/lib/api/RetailAPI/getLastTaskStatus.js +6 -0
  54. package/lib/api/RetailAPI/getLastTaskStatus.js.map +1 -0
  55. package/lib/api/RetailAPI/getTaskById.d.ts +6 -0
  56. package/lib/api/RetailAPI/getTaskById.js +6 -0
  57. package/lib/api/RetailAPI/getTaskById.js.map +1 -0
  58. package/lib/api/RetailAPI/updateUserTask.d.ts +8 -8
  59. package/lib/common.css +1 -1
  60. package/lib/components/ApplicationLeadForm/LeadFormState.d.ts +6 -6
  61. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +32 -21
  62. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  63. package/lib/components/ApplicationLeadForm/useSaveUserData.d.ts +9 -0
  64. package/lib/components/ApplicationLeadForm/useSaveUserData.js +16 -0
  65. package/lib/components/ApplicationLeadForm/useSaveUserData.js.map +1 -0
  66. package/lib/ui-kit/DraftDialog/DraftActionButton.d.ts +7 -0
  67. package/lib/ui-kit/DraftDialog/DraftActionButton.js +8 -0
  68. package/lib/ui-kit/DraftDialog/DraftActionButton.js.map +1 -0
  69. package/lib/ui-kit/DraftDialog/DraftDialog.d.ts +7 -0
  70. package/lib/ui-kit/DraftDialog/DraftDialog.js +41 -0
  71. package/lib/ui-kit/DraftDialog/DraftDialog.js.map +1 -0
  72. package/lib/ui-kit/DraftDialog/EmptyDraftDialog.d.ts +4 -0
  73. package/lib/ui-kit/DraftDialog/EmptyDraftDialog.js +20 -0
  74. package/lib/ui-kit/DraftDialog/EmptyDraftDialog.js.map +1 -0
  75. package/lib/ui-kit/DraftDialog/parseDraftTask.d.ts +3 -0
  76. package/lib/ui-kit/DraftDialog/parseDraftTask.js +62 -0
  77. package/lib/ui-kit/DraftDialog/parseDraftTask.js.map +1 -0
  78. package/lib/ui-kit/DraftDialog/useDraftDialog.d.ts +10 -0
  79. package/lib/ui-kit/DraftDialog/useDraftDialog.js +13 -0
  80. package/lib/ui-kit/DraftDialog/useDraftDialog.js.map +1 -0
  81. package/lib/ui-kit/DraftDialog/utils.d.ts +138 -0
  82. package/lib/ui-kit/DraftDialog/utils.js +78 -0
  83. package/lib/ui-kit/DraftDialog/utils.js.map +1 -0
  84. package/mobile/bundle/api/RetailAPI/draftTasksKZO.d.ts +26 -0
  85. package/mobile/bundle/api/RetailAPI/getLastTaskStatus.d.ts +6 -0
  86. package/mobile/bundle/api/RetailAPI/getTaskById.d.ts +6 -0
  87. package/mobile/bundle/api/RetailAPI/updateUserTask.d.ts +8 -8
  88. package/mobile/bundle/bundle.umd.js +252 -30
  89. package/mobile/bundle/bundle.umd.min.js +1 -1
  90. package/mobile/bundle/components/ApplicationLeadForm/LeadFormState.d.ts +6 -6
  91. package/mobile/bundle/components/ApplicationLeadForm/useSaveUserData.d.ts +9 -0
  92. package/mobile/bundle/ui-kit/DraftDialog/DraftActionButton.d.ts +7 -0
  93. package/mobile/bundle/ui-kit/DraftDialog/DraftDialog.d.ts +7 -0
  94. package/mobile/bundle/ui-kit/DraftDialog/EmptyDraftDialog.d.ts +4 -0
  95. package/mobile/bundle/ui-kit/DraftDialog/parseDraftTask.d.ts +3 -0
  96. package/mobile/bundle/ui-kit/DraftDialog/useDraftDialog.d.ts +10 -0
  97. package/mobile/bundle/ui-kit/DraftDialog/utils.d.ts +138 -0
  98. package/mobile/dist/api/RetailAPI/draftTasksKZO.d.ts +26 -0
  99. package/mobile/dist/api/RetailAPI/draftTasksKZO.js +9 -0
  100. package/mobile/dist/api/RetailAPI/draftTasksKZO.js.map +1 -0
  101. package/mobile/dist/api/RetailAPI/getLastTaskStatus.d.ts +6 -0
  102. package/mobile/dist/api/RetailAPI/getLastTaskStatus.js +9 -0
  103. package/mobile/dist/api/RetailAPI/getLastTaskStatus.js.map +1 -0
  104. package/mobile/dist/api/RetailAPI/getTaskById.d.ts +6 -0
  105. package/mobile/dist/api/RetailAPI/getTaskById.js +9 -0
  106. package/mobile/dist/api/RetailAPI/getTaskById.js.map +1 -0
  107. package/mobile/dist/api/RetailAPI/updateUserTask.d.ts +8 -8
  108. package/mobile/dist/components/ApplicationLeadForm/LeadFormState.d.ts +6 -6
  109. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +32 -21
  110. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  111. package/mobile/dist/components/ApplicationLeadForm/useSaveUserData.d.ts +9 -0
  112. package/mobile/dist/components/ApplicationLeadForm/useSaveUserData.js +19 -0
  113. package/mobile/dist/components/ApplicationLeadForm/useSaveUserData.js.map +1 -0
  114. package/mobile/dist/ui-kit/DraftDialog/DraftActionButton.d.ts +7 -0
  115. package/mobile/dist/ui-kit/DraftDialog/DraftActionButton.js +10 -0
  116. package/mobile/dist/ui-kit/DraftDialog/DraftActionButton.js.map +1 -0
  117. package/mobile/dist/ui-kit/DraftDialog/DraftDialog.d.ts +7 -0
  118. package/mobile/dist/ui-kit/DraftDialog/DraftDialog.js +43 -0
  119. package/mobile/dist/ui-kit/DraftDialog/DraftDialog.js.map +1 -0
  120. package/mobile/dist/ui-kit/DraftDialog/EmptyDraftDialog.d.ts +4 -0
  121. package/mobile/dist/ui-kit/DraftDialog/EmptyDraftDialog.js +22 -0
  122. package/mobile/dist/ui-kit/DraftDialog/EmptyDraftDialog.js.map +1 -0
  123. package/mobile/dist/ui-kit/DraftDialog/parseDraftTask.d.ts +3 -0
  124. package/mobile/dist/ui-kit/DraftDialog/parseDraftTask.js +65 -0
  125. package/mobile/dist/ui-kit/DraftDialog/parseDraftTask.js.map +1 -0
  126. package/mobile/dist/ui-kit/DraftDialog/useDraftDialog.d.ts +10 -0
  127. package/mobile/dist/ui-kit/DraftDialog/useDraftDialog.js +16 -0
  128. package/mobile/dist/ui-kit/DraftDialog/useDraftDialog.js.map +1 -0
  129. package/mobile/dist/ui-kit/DraftDialog/utils.d.ts +138 -0
  130. package/mobile/dist/ui-kit/DraftDialog/utils.js +85 -0
  131. package/mobile/dist/ui-kit/DraftDialog/utils.js.map +1 -0
  132. package/mobile/lib/api/RetailAPI/draftTasksKZO.d.ts +26 -0
  133. package/mobile/lib/api/RetailAPI/draftTasksKZO.js +6 -0
  134. package/mobile/lib/api/RetailAPI/draftTasksKZO.js.map +1 -0
  135. package/mobile/lib/api/RetailAPI/getLastTaskStatus.d.ts +6 -0
  136. package/mobile/lib/api/RetailAPI/getLastTaskStatus.js +6 -0
  137. package/mobile/lib/api/RetailAPI/getLastTaskStatus.js.map +1 -0
  138. package/mobile/lib/api/RetailAPI/getTaskById.d.ts +6 -0
  139. package/mobile/lib/api/RetailAPI/getTaskById.js +6 -0
  140. package/mobile/lib/api/RetailAPI/getTaskById.js.map +1 -0
  141. package/mobile/lib/api/RetailAPI/updateUserTask.d.ts +8 -8
  142. package/mobile/lib/common.css +1 -1
  143. package/mobile/lib/components/ApplicationLeadForm/LeadFormState.d.ts +6 -6
  144. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +32 -21
  145. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  146. package/mobile/lib/components/ApplicationLeadForm/useSaveUserData.d.ts +9 -0
  147. package/mobile/lib/components/ApplicationLeadForm/useSaveUserData.js +16 -0
  148. package/mobile/lib/components/ApplicationLeadForm/useSaveUserData.js.map +1 -0
  149. package/mobile/lib/ui-kit/DraftDialog/DraftActionButton.d.ts +7 -0
  150. package/mobile/lib/ui-kit/DraftDialog/DraftActionButton.js +8 -0
  151. package/mobile/lib/ui-kit/DraftDialog/DraftActionButton.js.map +1 -0
  152. package/mobile/lib/ui-kit/DraftDialog/DraftDialog.d.ts +7 -0
  153. package/mobile/lib/ui-kit/DraftDialog/DraftDialog.js +41 -0
  154. package/mobile/lib/ui-kit/DraftDialog/DraftDialog.js.map +1 -0
  155. package/mobile/lib/ui-kit/DraftDialog/EmptyDraftDialog.d.ts +4 -0
  156. package/mobile/lib/ui-kit/DraftDialog/EmptyDraftDialog.js +20 -0
  157. package/mobile/lib/ui-kit/DraftDialog/EmptyDraftDialog.js.map +1 -0
  158. package/mobile/lib/ui-kit/DraftDialog/parseDraftTask.d.ts +3 -0
  159. package/mobile/lib/ui-kit/DraftDialog/parseDraftTask.js +62 -0
  160. package/mobile/lib/ui-kit/DraftDialog/parseDraftTask.js.map +1 -0
  161. package/mobile/lib/ui-kit/DraftDialog/useDraftDialog.d.ts +10 -0
  162. package/mobile/lib/ui-kit/DraftDialog/useDraftDialog.js +13 -0
  163. package/mobile/lib/ui-kit/DraftDialog/useDraftDialog.js.map +1 -0
  164. package/mobile/lib/ui-kit/DraftDialog/utils.d.ts +138 -0
  165. package/mobile/lib/ui-kit/DraftDialog/utils.js +78 -0
  166. package/mobile/lib/ui-kit/DraftDialog/utils.js.map +1 -0
  167. package/mobile/src/api/RetailAPI/draftTasksKZO.ts +33 -0
  168. package/mobile/src/api/RetailAPI/getLastTaskStatus.ts +21 -0
  169. package/mobile/src/api/RetailAPI/getTaskById.ts +12 -0
  170. package/mobile/src/api/RetailAPI/updateUserTask.ts +8 -8
  171. package/mobile/src/components/ApplicationLeadForm/LeadFormState.ts +6 -6
  172. package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +31 -33
  173. package/mobile/src/components/ApplicationLeadForm/useSaveUserData.ts +29 -0
  174. package/mobile/src/ui-kit/DraftDialog/DraftActionButton.tsx +32 -0
  175. package/mobile/src/ui-kit/DraftDialog/DraftDialog.tsx +91 -0
  176. package/mobile/src/ui-kit/DraftDialog/EmptyDraftDialog.tsx +47 -0
  177. package/mobile/src/ui-kit/DraftDialog/parseDraftTask.ts +123 -0
  178. package/mobile/src/ui-kit/DraftDialog/useDraftDialog.tsx +21 -0
  179. package/mobile/src/ui-kit/DraftDialog/utils.ts +148 -0
  180. package/package.json +1 -1
  181. package/src/api/RetailAPI/draftTasksKZO.ts +33 -0
  182. package/src/api/RetailAPI/getLastTaskStatus.ts +21 -0
  183. package/src/api/RetailAPI/getTaskById.ts +12 -0
  184. package/src/api/RetailAPI/updateUserTask.ts +8 -8
  185. package/src/components/ApplicationLeadForm/LeadFormState.ts +6 -6
  186. package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +31 -33
  187. package/src/components/ApplicationLeadForm/useSaveUserData.ts +29 -0
  188. package/src/ui-kit/DraftDialog/DraftActionButton.tsx +32 -0
  189. package/src/ui-kit/DraftDialog/DraftDialog.tsx +91 -0
  190. package/src/ui-kit/DraftDialog/EmptyDraftDialog.tsx +47 -0
  191. package/src/ui-kit/DraftDialog/parseDraftTask.ts +123 -0
  192. package/src/ui-kit/DraftDialog/useDraftDialog.tsx +21 -0
  193. package/src/ui-kit/DraftDialog/utils.ts +148 -0
@@ -79,9 +79,9 @@ export interface LeadFormState extends FormConsents, FormStateDeliveryType {
79
79
  legalForm?: string;
80
80
  organizationName?: string;
81
81
  generalSeniority?: string;
82
- lastJobExperience?: number;
83
- experience5Years?: number;
84
- jobsNumber?: number;
82
+ lastJobExperience?: string;
83
+ experience5Years?: string;
84
+ jobsNumber?: string;
85
85
  organizationAddress?: Address;
86
86
  beginDate?: Date | string;
87
87
  addressFact?: Address;
@@ -100,9 +100,9 @@ export interface LeadFormState extends FormConsents, FormStateDeliveryType {
100
100
  consentAssignmentClaimsFlg?: boolean;
101
101
  consentCollectionFlg?: boolean;
102
102
  familyStatus?: Option;
103
- children?: number;
104
- familyMembers?: number;
105
- dependents?: number;
103
+ children?: string;
104
+ familyMembers?: string;
105
+ dependents?: string;
106
106
  totalIncome?: number;
107
107
  expenses?: number;
108
108
  snils?: string;
@@ -0,0 +1,9 @@
1
+ import { type LeadFormState } from './LeadFormState';
2
+ export interface UserData {
3
+ participantId: number;
4
+ taskId: number;
5
+ profileId: number;
6
+ programId: string;
7
+ formData: LeadFormState;
8
+ }
9
+ export declare const useSaveUserData: () => ({ participantId, taskId, profileId, formData, programId: programNumber }: UserData) => void;
@@ -0,0 +1,7 @@
1
+ export interface DraftActionButtonProps {
2
+ title: string;
3
+ icon: string;
4
+ description?: string;
5
+ onClick?: () => void;
6
+ }
7
+ export declare const DraftActionButton: import("@redneckz/uni-jsx").UNIComponent<DraftActionButtonProps, any, any>;
@@ -0,0 +1,7 @@
1
+ import { type Task } from '../../api/RetailAPI/draftTasksKZO';
2
+ export interface DraftDialogProps {
3
+ task: Task;
4
+ isFromLead?: boolean;
5
+ onClose?: () => void;
6
+ }
7
+ export declare const DraftDialog: import("@redneckz/uni-jsx").UNIComponent<DraftDialogProps, any, any>;
@@ -0,0 +1,4 @@
1
+ export interface EmptyDraftDialogProps {
2
+ onClose?: () => void;
3
+ }
4
+ export declare const EmptyDraftDialog: import("@redneckz/uni-jsx").UNIComponent<EmptyDraftDialogProps, any, any>;
@@ -0,0 +1,3 @@
1
+ import { type Task } from '../../api/RetailAPI/draftTasksKZO';
2
+ import { type LeadFormState } from '../../components/ApplicationLeadForm/LeadFormState';
3
+ export declare const parseDraftTask: (task: Task) => LeadFormState;
@@ -0,0 +1,10 @@
1
+ import { type Task } from '../../api/RetailAPI/draftTasksKZO';
2
+ declare type useDraftDialogOpenProps = {
3
+ task?: Task;
4
+ isFromLead?: boolean;
5
+ onClose?: () => void;
6
+ };
7
+ export declare const useDraftDialog: () => {
8
+ open: ({ task, isFromLead, onClose }: useDraftDialogOpenProps) => void;
9
+ };
10
+ export {};
@@ -0,0 +1,138 @@
1
+ import { type LeadProps } from '../../api/RetailAPI/model/LeadFormData';
2
+ import { type Participant } from '../../api/RetailAPI/updateUserTask';
3
+ import { type Option } from '../Select/Option';
4
+ export declare const enum EContactType {
5
+ MainPhone = "MAIN_PHONE",
6
+ SecondPhone = "SECOND_PHONE",
7
+ HomePhoneFact = "HOME_PHONE_FACT",
8
+ HomePhoneReg = "HOME_PHONE_REG",
9
+ OrganizationPhone = "ORGANIZATION_PHONE",
10
+ EMail = "EMAIL"
11
+ }
12
+ export declare const enum EAddressType {
13
+ REGISTRATION = "REGISTRATION",
14
+ RESIDENTAL = "RESIDENTAL",
15
+ WORK = "WORK"
16
+ }
17
+ export declare const enum EIncomesType {
18
+ INCOME_AVERAGE = "INCOME_AVERAGE",
19
+ MANDATORY_PAYMENTS = "MANDATORY_PAYMENTS",
20
+ ADDITIONAL_INCOME = "ADDITIONAL_INCOME",
21
+ OTHER_INCOME = "OTHER_INCOME",
22
+ OTHER_PAYMENTS = "OTHER_PAYMENTS",
23
+ RENTAL_INCOME = "RENTAL_INCOME",
24
+ WAGES = "WAGES",
25
+ RETIREMENT_INCOME = "RETIREMENT_INCOME"
26
+ }
27
+ export declare const creditCodesToProgrammIdMap: {
28
+ credit_cash: string;
29
+ credit_cash_single_doc: string;
30
+ credit_mcx: string;
31
+ family_offer_credit: string;
32
+ gas_engine_fuel: string;
33
+ pension_credit: string;
34
+ ref_credit: string;
35
+ ref_credit_single_doc: string;
36
+ self_employed: string;
37
+ summer_cash: string;
38
+ summer_cash_pens: string;
39
+ };
40
+ export declare const cardCodesToProgrammIdMap: {
41
+ amur_card: string;
42
+ owner_card: string;
43
+ travel_card: string;
44
+ };
45
+ export declare const creditProgramCodeToProductIdMap: {
46
+ amur_card: string;
47
+ owner_card: string;
48
+ travel_card: string;
49
+ credit_cash: string;
50
+ credit_cash_single_doc: string;
51
+ credit_mcx: string;
52
+ family_offer_credit: string;
53
+ gas_engine_fuel: string;
54
+ pension_credit: string;
55
+ ref_credit: string;
56
+ ref_credit_single_doc: string;
57
+ self_employed: string;
58
+ summer_cash: string;
59
+ summer_cash_pens: string;
60
+ };
61
+ export declare const getParticipantIncomes: (participantIncomes: Participant['participantIncomes']) => {
62
+ wages: number | undefined;
63
+ mandatoryPayments: number | undefined;
64
+ incomeAverage: number | undefined;
65
+ additionalIncome: number | undefined;
66
+ otherIncome: number | undefined;
67
+ otherPayments: number | undefined;
68
+ rentalIncome: number | undefined;
69
+ retirementIncome: number | undefined;
70
+ };
71
+ export declare const getParticipantAddresses: (participantAddresses: Participant['participantAddresses']) => {
72
+ addressRegistration: {
73
+ addressType: {
74
+ key: "REGISTRATION" | "RESIDENTAL" | "WORK";
75
+ };
76
+ apartment: string;
77
+ block: string;
78
+ building: string;
79
+ city: string;
80
+ district: string;
81
+ fiasCode: string;
82
+ fullAddress: string;
83
+ house: string;
84
+ locality: string;
85
+ okatoRegionCode: string;
86
+ postcode: string;
87
+ region: string;
88
+ regionCode: string;
89
+ street: string;
90
+ } | undefined;
91
+ addressFact: {
92
+ addressType: {
93
+ key: "REGISTRATION" | "RESIDENTAL" | "WORK";
94
+ };
95
+ apartment: string;
96
+ block: string;
97
+ building: string;
98
+ city: string;
99
+ district: string;
100
+ fiasCode: string;
101
+ fullAddress: string;
102
+ house: string;
103
+ locality: string;
104
+ okatoRegionCode: string;
105
+ postcode: string;
106
+ region: string;
107
+ regionCode: string;
108
+ street: string;
109
+ } | undefined;
110
+ organizationAddress: {
111
+ addressType: {
112
+ key: "REGISTRATION" | "RESIDENTAL" | "WORK";
113
+ };
114
+ apartment: string;
115
+ block: string;
116
+ building: string;
117
+ city: string;
118
+ district: string;
119
+ fiasCode: string;
120
+ fullAddress: string;
121
+ house: string;
122
+ locality: string;
123
+ okatoRegionCode: string;
124
+ postcode: string;
125
+ region: string;
126
+ regionCode: string;
127
+ street: string;
128
+ } | undefined;
129
+ };
130
+ export declare const getParticipantContacts: (participantContacts: Participant['participantContacts']) => {
131
+ email: string | undefined;
132
+ phone: string | undefined;
133
+ organizationPhone: string | undefined;
134
+ };
135
+ export declare const getParticipantGender: (gender: Participant['genderCd']) => {
136
+ sex: string;
137
+ } | null;
138
+ export declare const getSelectValue: (option?: LeadProps) => Option | undefined;
@@ -0,0 +1,26 @@
1
+ import { type Participant, type PaymentType } from './updateUserTask';
2
+ export declare type Task = {
3
+ courierDeliveryFlg?: boolean;
4
+ creditPeriod?: number;
5
+ creditProgram: {
6
+ code: string;
7
+ name: string;
8
+ };
9
+ deliveryComment?: string;
10
+ deliveryDate?: string;
11
+ deliveryTimeCd?: {
12
+ value: string;
13
+ };
14
+ id: number;
15
+ loanAmount?: number;
16
+ office?: {
17
+ id: string;
18
+ };
19
+ participants: Participant[];
20
+ paymentTypeCd?: PaymentType;
21
+ };
22
+ declare type DraftTaskKZOResponse = {
23
+ tasks: Array<Task>;
24
+ };
25
+ export declare const draftTasksKZO: () => Promise<DraftTaskKZOResponse['tasks']>;
26
+ export {};
@@ -0,0 +1,9 @@
1
+ Object.defineProperty(exports, "__esModule", { value: true });
2
+ exports.draftTasksKZO = void 0;
3
+ const doRequest_1 = require("./doRequest");
4
+ const draftTasksKZO = async () => {
5
+ const res = await (0, doRequest_1.fetchRetailJSON)('/user-data/draftTasksKZO', 'GET');
6
+ return res?.tasks || [];
7
+ };
8
+ exports.draftTasksKZO = draftTasksKZO;
9
+ //# sourceMappingURL=draftTasksKZO.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"draftTasksKZO.js","sourceRoot":"","sources":["../../../src/api/RetailAPI/draftTasksKZO.ts"],"names":[],"mappings":";;AAAA,2CAA8C;AA4BvC,MAAM,aAAa,GAAG,KAAK,IAA4C,EAAE;IAC9E,MAAM,GAAG,GAAG,MAAM,IAAA,2BAAe,EAAuB,0BAA0B,EAAE,KAAK,CAAC,CAAC;IAE3F,OAAO,GAAG,EAAE,KAAK,IAAI,EAAE,CAAC;AAC1B,CAAC,CAAC;AAJW,QAAA,aAAa,iBAIxB"}
@@ -0,0 +1,6 @@
1
+ declare type GetLastTaskStatusBody = {
2
+ profileId: number;
3
+ programId: string;
4
+ };
5
+ export declare const getLastTaskStatus: (body: GetLastTaskStatusBody) => Promise<number | null>;
6
+ export {};
@@ -0,0 +1,9 @@
1
+ Object.defineProperty(exports, "__esModule", { value: true });
2
+ exports.getLastTaskStatus = void 0;
3
+ const doRequest_1 = require("./doRequest");
4
+ const getLastTaskStatus = async (body) => {
5
+ const res = await (0, doRequest_1.fetchRetailJSON)('/user-data/getLastStatus', 'POST', body);
6
+ return res?.statusCd === 'DRAFT' ? res?.taskId : null;
7
+ };
8
+ exports.getLastTaskStatus = getLastTaskStatus;
9
+ //# sourceMappingURL=getLastTaskStatus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getLastTaskStatus.js","sourceRoot":"","sources":["../../../src/api/RetailAPI/getLastTaskStatus.ts"],"names":[],"mappings":";;AAAA,2CAA8C;AAYvC,MAAM,iBAAiB,GAAG,KAAK,EAAE,IAA2B,EAA0B,EAAE;IAC7F,MAAM,GAAG,GAAG,MAAM,IAAA,2BAAe,EAC/B,0BAA0B,EAC1B,MAAM,EACN,IAAI,CACL,CAAC;IAEF,OAAO,GAAG,EAAE,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;AACxD,CAAC,CAAC;AARW,QAAA,iBAAiB,qBAQ5B"}
@@ -0,0 +1,6 @@
1
+ import { type Task } from './draftTasksKZO';
2
+ declare type GetTaskByIdBody = {
3
+ taskId: number;
4
+ };
5
+ export declare const getTaskById: (body: GetTaskByIdBody) => Promise<Task | undefined>;
6
+ export {};
@@ -0,0 +1,9 @@
1
+ Object.defineProperty(exports, "__esModule", { value: true });
2
+ exports.getTaskById = void 0;
3
+ const doRequest_1 = require("./doRequest");
4
+ const getTaskById = async (body) => {
5
+ const res = await (0, doRequest_1.fetchRetailJSON)('/user-data/getTaskById', 'POST', body);
6
+ return res || undefined;
7
+ };
8
+ exports.getTaskById = getTaskById;
9
+ //# sourceMappingURL=getTaskById.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTaskById.js","sourceRoot":"","sources":["../../../src/api/RetailAPI/getTaskById.ts"],"names":[],"mappings":";;AAAA,2CAA8C;AAOvC,MAAM,WAAW,GAAG,KAAK,EAAE,IAAqB,EAA6B,EAAE;IACpF,MAAM,GAAG,GAAG,MAAM,IAAA,2BAAe,EAAO,wBAAwB,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IAEhF,OAAO,GAAG,IAAI,SAAS,CAAC;AAC1B,CAAC,CAAC;AAJW,QAAA,WAAW,eAItB"}
@@ -38,12 +38,12 @@ export declare type Participant = {
38
38
  midname?: string;
39
39
  name?: string;
40
40
  surname?: string;
41
- profile?: {
41
+ profile: {
42
42
  id: number;
43
43
  };
44
44
  armyIdFlg?: boolean;
45
45
  birthPlace?: string;
46
- childrenDependents?: number;
46
+ childrenDependents?: string;
47
47
  genderCd?: Option;
48
48
  dulIssueDate?: string;
49
49
  dulIssuedBy?: string;
@@ -54,13 +54,13 @@ export declare type Participant = {
54
54
  employeesNumberCd?: Option;
55
55
  employmentContractDate?: string;
56
56
  employmentTypeCd?: Option;
57
- generalSeniority?: number;
57
+ generalSeniority?: string;
58
58
  homeMatchFlg?: boolean;
59
59
  houseTypeCd?: Option;
60
60
  incomeCertificateCd?: Option;
61
61
  initiateBankruptcyFlg?: boolean;
62
- jobsNumber?: number;
63
- lastWorkDuration?: number;
62
+ jobsNumber?: string;
63
+ lastWorkDuration?: string;
64
64
  maritalStatusCd?: Option;
65
65
  militaryStatusCd?: Option;
66
66
  organizationActivityTypeCd?: Option;
@@ -68,7 +68,7 @@ export declare type Participant = {
68
68
  organizationKindCd?: Option;
69
69
  organizationName?: string;
70
70
  organizationTypeCd?: Option;
71
- otherDependents?: number;
71
+ otherDependents?: string;
72
72
  ownershipShare?: string;
73
73
  opf?: string;
74
74
  participantAddresses?: ParticipantAddress[];
@@ -80,14 +80,14 @@ export declare type Participant = {
80
80
  seniority?: string;
81
81
  seniorityInterruptionsFlg?: boolean;
82
82
  snils?: string;
83
- totalDependents?: number;
83
+ totalDependents?: string;
84
84
  bankruptcyFlg?: boolean;
85
85
  shareholderFlg?: boolean;
86
86
  nameLegalEntity?: string;
87
87
  creditInRshbCd?: Option;
88
88
  participantContacts?: Array<{
89
89
  contactTypeCd: {
90
- key: 'EMAIL' | 'MAIN_PHONE';
90
+ key: 'EMAIL' | 'MAIN_PHONE' | 'ORGANIZATION_PHONE';
91
91
  };
92
92
  value: string;
93
93
  }>;
@@ -79,9 +79,9 @@ export interface LeadFormState extends FormConsents, FormStateDeliveryType {
79
79
  legalForm?: string;
80
80
  organizationName?: string;
81
81
  generalSeniority?: string;
82
- lastJobExperience?: number;
83
- experience5Years?: number;
84
- jobsNumber?: number;
82
+ lastJobExperience?: string;
83
+ experience5Years?: string;
84
+ jobsNumber?: string;
85
85
  organizationAddress?: Address;
86
86
  beginDate?: Date | string;
87
87
  addressFact?: Address;
@@ -100,9 +100,9 @@ export interface LeadFormState extends FormConsents, FormStateDeliveryType {
100
100
  consentAssignmentClaimsFlg?: boolean;
101
101
  consentCollectionFlg?: boolean;
102
102
  familyStatus?: Option;
103
- children?: number;
104
- familyMembers?: number;
105
- dependents?: number;
103
+ children?: string;
104
+ familyMembers?: string;
105
+ dependents?: string;
106
106
  totalIncome?: number;
107
107
  expenses?: number;
108
108
  snils?: string;
@@ -3,12 +3,14 @@ exports.useApplicationLeadApi = void 0;
3
3
  const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
4
4
  const createDraftTask_1 = require("../../api/RetailAPI/createDraftTask");
5
5
  const createUserProfile_1 = require("../../api/RetailAPI/createUserProfile");
6
+ const getLastTaskStatus_1 = require("../../api/RetailAPI/getLastTaskStatus");
7
+ const getTaskById_1 = require("../../api/RetailAPI/getTaskById");
6
8
  const updateUserProfile_1 = require("../../api/RetailAPI/updateUserProfile");
7
9
  const updateUserTask_1 = require("../../api/RetailAPI/updateUserTask");
8
10
  const getUpdateUserProfile_1 = require("../../api/RetailAPI/utils/getUpdateUserProfile");
9
- const useSetter_1 = require("../../hooks/useSetter");
10
11
  const useConsentBkiDialog_1 = require("../../ui-kit/ConsentBkiDialog/useConsentBkiDialog");
11
12
  const useDialog_1 = require("../../ui-kit/DialogManager/useDialog");
13
+ const useDraftDialog_1 = require("../../ui-kit/DraftDialog/useDraftDialog");
12
14
  const useEsiaLoginDialog_1 = require("../../ui-kit/EsiaLoginDialog/useEsiaLoginDialog");
13
15
  const getObjectValidator_1 = require("../../ui-kit/FormField/getObjectValidator");
14
16
  const VerifyPhoneDialog_1 = require("../../ui-kit/VerifyPhoneDialog/VerifyPhoneDialog");
@@ -17,21 +19,14 @@ const objectValidator_1 = require("../../validation/objectValidator");
17
19
  const validator_1 = require("../../validation/validator");
18
20
  const consents_1 = require("./consents");
19
21
  const getLeadFormTaskData_1 = require("./getLeadFormTaskData");
20
- const useLeadFormStore_1 = require("./useLeadFormStore");
22
+ const useSaveUserData_1 = require("./useSaveUserData");
21
23
  const useApplicationLeadApi = ({ inputs, programId, nextStepLink, }) => {
22
24
  const [responseStatus, setResponseStatus] = (0, hooks_1.useState)('');
23
- const leadFormStore = (0, useLeadFormStore_1.useLeadFormStore)();
24
- const saveForm = (0, useSetter_1.useSetter)(leadFormStore, 'leadForm');
25
+ const saveUserData = (0, useSaveUserData_1.useSaveUserData)();
25
26
  const openEsiaLoginDialog = (0, useEsiaLoginDialog_1.useEsiaLoginDialog)(nextStepLink);
26
27
  const consentBkiDialog = (0, useConsentBkiDialog_1.useConsentBkiDialog)(openEsiaLoginDialog);
27
28
  const verifyPhoneDialog = (0, useDialog_1.useDialog)(VerifyPhoneDialog_1.VerifyPhoneDialog);
28
- const saveUserData = (0, hooks_1.useCallback)(({ participantId, taskId, profileId, programId: programNumber }) => {
29
- leadFormStore.participantId = participantId;
30
- leadFormStore.taskId = taskId;
31
- leadFormStore.profileId = profileId;
32
- leadFormStore.programId = programNumber;
33
- }, []);
34
- // eslint-disable-next-line consistent-return
29
+ const draftDialog = (0, useDraftDialog_1.useDraftDialog)();
35
30
  const handleSubmit = (0, hooks_1.useCallback)(async (formData) => {
36
31
  const feedbackValidator = (0, objectValidator_1.objectValidator)((0, getObjectValidator_1.getObjectValidator)(inputs));
37
32
  if (!(0, validator_1.isValidationSuccess)(feedbackValidator(formData))) {
@@ -42,17 +37,34 @@ const useApplicationLeadApi = ({ inputs, programId, nextStepLink, }) => {
42
37
  profile: { phone: (0, formatPhone_1.formatPhone)(formData.phone) },
43
38
  });
44
39
  if (profileId && formData?.phone) {
40
+ const sendCurrentTask = async () => {
41
+ await updateUserData({
42
+ programId,
43
+ profileId,
44
+ formData,
45
+ saveUserData,
46
+ });
47
+ verifyPhoneDialog.close();
48
+ consentBkiDialog.open(formData.phone, profileId);
49
+ };
45
50
  const handleSuccessVerify = async () => {
46
51
  try {
47
- await updateUserData({
48
- programId,
52
+ const lastTaskId = await (0, getLastTaskStatus_1.getLastTaskStatus)({
49
53
  profileId,
50
- formData,
51
- saveUserData,
52
- saveForm,
54
+ programId,
53
55
  });
54
- verifyPhoneDialog.close();
55
- consentBkiDialog.open(formData.phone, profileId);
56
+ if (lastTaskId) {
57
+ const task = await (0, getTaskById_1.getTaskById)({ taskId: lastTaskId });
58
+ verifyPhoneDialog.close();
59
+ draftDialog.open({
60
+ task,
61
+ isFromLead: true,
62
+ onClose: sendCurrentTask,
63
+ });
64
+ }
65
+ else {
66
+ await sendCurrentTask();
67
+ }
56
68
  }
57
69
  catch {
58
70
  setResponseStatus('Fail');
@@ -78,7 +90,7 @@ const useApplicationLeadApi = ({ inputs, programId, nextStepLink, }) => {
78
90
  };
79
91
  };
80
92
  exports.useApplicationLeadApi = useApplicationLeadApi;
81
- const updateUserData = async ({ programId, profileId, formData, saveUserData, saveForm, }) => {
93
+ const updateUserData = async ({ programId, profileId, formData, saveUserData, }) => {
82
94
  const transformedForm = transformOtherConsentsField(formData);
83
95
  await (0, updateUserProfile_1.updateUserProfile)((0, getUpdateUserProfile_1.getUpdateUserProfileData)(profileId, transformedForm));
84
96
  const { taskId, participantId } = await (0, createDraftTask_1.createDraftTask)({
@@ -96,8 +108,7 @@ const updateUserData = async ({ programId, profileId, formData, saveUserData, sa
96
108
  catch (ex) {
97
109
  console.log(ex);
98
110
  }
99
- saveUserData({ participantId, taskId, profileId, programId });
100
- saveForm(formData);
111
+ saveUserData({ participantId, taskId, profileId, programId, formData });
101
112
  };
102
113
  const transformOtherConsentsField = (formData) => {
103
114
  const { consentOthersFlg, ...form } = formData;
@@ -1 +1 @@
1
- {"version":3,"file":"useApplicationLeadApi.js","sourceRoot":"","sources":["../../../src/components/ApplicationLeadForm/useApplicationLeadApi.tsx"],"names":[],"mappings":";;AAAA,uDAAoE;AACpE,yEAAsE;AACtE,6EAA0E;A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CAAC;AACJ,CAAC,CAAC;AAvEW,QAAA,qBAAqB,yBAuEhC;AAEF,MAAM,cAAc,GAAG,KAAK,EAAE,EAC5B,SAAS,EACT,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,QAAQ,GAOT,EAAE,EAAE;IACH,MAAM,eAAe,GAAG,2BAA2B,CAAC,QAAQ,CAAC,CAAC;IAE9D,MAAM,IAAA,qCAAiB,EAAC,IAAA,+CAAwB,EAAC,SAAS,EAAE,eAAe,CAAC,CAAC,CAAC;IAE9E,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,IAAA,iCAAe,EAAC;QACtD,SAAS;QACT,SAAS;KACV,CAAC,CAAC;IAEH,IAAI;QACF,MAAM,IAAA,+BAAc,EAClB,IAAA,yCAAmB,EAAC;YAClB,aAAa;YACb,MAAM;YACN,SAAS;YACT,QAAQ,EAAE,eAAe;SAC1B,CAAC,CACH,CAAC;KACH;IAAC,OAAO,EAAE,EAAE;QACX,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;KACjB;IAED,YAAY,CAAC,EAAE,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,CAAC;IAC9D,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACrB,CAAC,CAAC;AAEF,MAAM,2BAA2B,GAAG,CAAC,QAAuB,EAAiB,EAAE;IAC7E,MAAM,EAAE,gBAAgB,EAAE,GAAG,IAAI,EAAE,GAAG,QAAQ,CAAC;IAE/C,OAAO;QACL,GAAG,IAAI;QACP,oBAAoB,EAAE,gBAAgB;QACtC,0BAA0B,EAAE,gBAAgB;QAC5C,eAAe,EAAE,gBAAgB;KAClC,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"useApplicationLeadApi.js","sourceRoot":"","sources":["../../../src/components/ApplicationLeadForm/useApplicationLeadApi.tsx"],"names":[],"mappings":";;AAAA,uDAAoE;AACpE,yEAAsE;AACtE,6EAA0E;AAC1E,6EAA0E;A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,MAAM,CAAC,CAAC;SAC3B;IACH,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO;QACL,YAAY;QACZ,cAAc;KACf,CAAC;AACJ,CAAC,CAAC;AA7EW,QAAA,qBAAqB,yBA6EhC;AAEF,MAAM,cAAc,GAAG,KAAK,EAAE,EAC5B,SAAS,EACT,SAAS,EACT,QAAQ,EACR,YAAY,GAMb,EAAE,EAAE;IACH,MAAM,eAAe,GAAG,2BAA2B,CAAC,QAAQ,CAAC,CAAC;IAE9D,MAAM,IAAA,qCAAiB,EAAC,IAAA,+CAAwB,EAAC,SAAS,EAAE,eAAe,CAAC,CAAC,CAAC;IAE9E,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,IAAA,iCAAe,EAAC;QACtD,SAAS;QACT,SAAS;KACV,CAAC,CAAC;IAEH,IAAI;QACF,MAAM,IAAA,+BAAc,EAClB,IAAA,yCAAmB,EAAC;YAClB,aAAa;YACb,MAAM;YACN,SAAS;YACT,QAAQ,EAAE,eAAe;SAC1B,CAAC,CACH,CAAC;KACH;IAAC,OAAO,EAAE,EAAE;QACX,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;KACjB;IAED,YAAY,CAAC,EAAE,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAC;AAC1E,CAAC,CAAC;AAEF,MAAM,2BAA2B,GAAG,CAAC,QAAuB,EAAiB,EAAE;IAC7E,MAAM,EAAE,gBAAgB,EAAE,GAAG,IAAI,EAAE,GAAG,QAAQ,CAAC;IAE/C,OAAO;QACL,GAAG,IAAI;QACP,oBAAoB,EAAE,gBAAgB;QACtC,0BAA0B,EAAE,gBAAgB;QAC5C,eAAe,EAAE,gBAAgB;KAClC,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { type LeadFormState } from './LeadFormState';
2
+ export interface UserData {
3
+ participantId: number;
4
+ taskId: number;
5
+ profileId: number;
6
+ programId: string;
7
+ formData: LeadFormState;
8
+ }
9
+ export declare const useSaveUserData: () => ({ participantId, taskId, profileId, formData, programId: programNumber }: UserData) => void;
@@ -0,0 +1,19 @@
1
+ Object.defineProperty(exports, "__esModule", { value: true });
2
+ exports.useSaveUserData = void 0;
3
+ const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
4
+ const useSetter_1 = require("../../hooks/useSetter");
5
+ const useLeadFormStore_1 = require("./useLeadFormStore");
6
+ const useSaveUserData = () => {
7
+ const leadFormStore = (0, useLeadFormStore_1.useLeadFormStore)();
8
+ const saveForm = (0, useSetter_1.useSetter)(leadFormStore, 'leadForm');
9
+ const saveUserData = (0, hooks_1.useCallback)(({ participantId, taskId, profileId, formData, programId: programNumber }) => {
10
+ leadFormStore.participantId = participantId;
11
+ leadFormStore.taskId = taskId;
12
+ leadFormStore.profileId = profileId;
13
+ leadFormStore.programId = programNumber;
14
+ saveForm(formData);
15
+ }, []);
16
+ return saveUserData;
17
+ };
18
+ exports.useSaveUserData = useSaveUserData;
19
+ //# sourceMappingURL=useSaveUserData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSaveUserData.js","sourceRoot":"","sources":["../../../src/components/ApplicationLeadForm/useSaveUserData.ts"],"names":[],"mappings":";;AAAA,uDAA0D;AAC1D,qDAAkD;AAElD,yDAAsD;AAS/C,MAAM,eAAe,GAAG,GAAG,EAAE;IAClC,MAAM,aAAa,GAAG,IAAA,mCAAgB,GAAE,CAAC;IACzC,MAAM,QAAQ,GAAG,IAAA,qBAAS,EAAC,aAAa,EAAE,UAAU,CAAC,CAAC;IAEtD,MAAM,YAAY,GAAG,IAAA,mBAAW,EAC9B,CAAC,EAAE,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAY,EAAE,EAAE;QACrF,aAAa,CAAC,aAAa,GAAG,aAAa,CAAC;QAC5C,aAAa,CAAC,MAAM,GAAG,MAAM,CAAC;QAC9B,aAAa,CAAC,SAAS,GAAG,SAAS,CAAC;QACpC,aAAa,CAAC,SAAS,GAAG,aAAa,CAAC;QACxC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACrB,CAAC,EACD,EAAE,CACH,CAAC;IAEF,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC;AAhBW,QAAA,eAAe,mBAgB1B"}
@@ -0,0 +1,7 @@
1
+ export interface DraftActionButtonProps {
2
+ title: string;
3
+ icon: string;
4
+ description?: string;
5
+ onClick?: () => void;
6
+ }
7
+ export declare const DraftActionButton: import("@redneckz/uni-jsx").UNIComponent<DraftActionButtonProps, any, any>;
@@ -0,0 +1,10 @@
1
+ Object.defineProperty(exports, "__esModule", { value: true });
2
+ exports.DraftActionButton = void 0;
3
+ const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
+ const uni_jsx_1 = require("@redneckz/uni-jsx");
5
+ const noop_1 = require("../../utils/noop");
6
+ const Heading_1 = require("../Heading/Heading");
7
+ const Img_1 = require("../Img/Img");
8
+ const Paragraph_1 = require("../Paragraph/Paragraph");
9
+ exports.DraftActionButton = (0, uni_jsx_1.JSX)(({ title, icon, description, onClick = noop_1.noop }) => ((0, jsx_runtime_1.jsxs)("button", { className: "flex gap-lg items-center border border-gray rounded-md cursor-pointer p-4 hover:border-green", type: "button", onClick: onClick, children: [(0, jsx_runtime_1.jsx)(Img_1.Img, { image: { src: icon }, width: "78", height: "78" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(Heading_1.Heading, { className: "text-left", title: title, headingType: "h5" }), description ? ((0, jsx_runtime_1.jsx)(Paragraph_1.Paragraph, { color: "text-secondary-text", size: "text-m", children: description })) : null] })] })));
10
+ //# sourceMappingURL=DraftActionButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DraftActionButton.js","sourceRoot":"","sources":["../../../src/ui-kit/DraftDialog/DraftActionButton.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,2CAAwC;AACxC,gDAA6C;AAC7C,oCAAiC;AACjC,sDAAmD;AAStC,QAAA,iBAAiB,GAAG,IAAA,aAAG,EAClC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,GAAG,WAAI,EAAE,EAAE,EAAE,CAAC,CAChD,oCACE,SAAS,EAAC,8FAA8F,EACxG,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,OAAO,aAEhB,uBAAC,SAAG,IAAC,KAAK,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,GAAG,EACpD,4CACE,uBAAC,iBAAO,IAAC,SAAS,EAAC,WAAW,EAAC,KAAK,EAAE,KAAK,EAAE,WAAW,EAAC,IAAI,GAAG,EAC/D,WAAW,CAAC,CAAC,CAAC,CACb,uBAAC,qBAAS,IAAC,KAAK,EAAC,qBAAqB,EAAC,IAAI,EAAC,QAAQ,YACjD,WAAW,GACF,CACb,CAAC,CAAC,CAAC,IAAI,IACJ,IACC,CACV,CACF,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { type Task } from '../../api/RetailAPI/draftTasksKZO';
2
+ export interface DraftDialogProps {
3
+ task: Task;
4
+ isFromLead?: boolean;
5
+ onClose?: () => void;
6
+ }
7
+ export declare const DraftDialog: import("@redneckz/uni-jsx").UNIComponent<DraftDialogProps, any, any>;
@@ -0,0 +1,43 @@
1
+ Object.defineProperty(exports, "__esModule", { value: true });
2
+ exports.DraftDialog = void 0;
3
+ const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
+ const uni_jsx_1 = require("@redneckz/uni-jsx");
5
+ const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
6
+ const useLeadFormStore_1 = require("../../components/ApplicationLeadForm/useLeadFormStore");
7
+ const locationNavigator_1 = require("../../external/locationNavigator");
8
+ const useSetter_1 = require("../../hooks/useSetter");
9
+ const noop_1 = require("../../utils/noop");
10
+ const Button_1 = require("../Button/Button");
11
+ const Dialog_1 = require("../DialogManager/Dialog");
12
+ const Heading_1 = require("../Heading/Heading");
13
+ const DraftActionButton_1 = require("./DraftActionButton");
14
+ const parseDraftTask_1 = require("./parseDraftTask");
15
+ const utils_1 = require("./utils");
16
+ exports.DraftDialog = (0, uni_jsx_1.JSX)(function ({ task, isFromLead = false, onClose = noop_1.noop, }) {
17
+ const leadFormStore = (0, useLeadFormStore_1.useLeadFormStore)();
18
+ const saveForm = (0, useSetter_1.useSetter)(leadFormStore, 'leadForm');
19
+ const navigator = (0, locationNavigator_1.locationNavigator)();
20
+ const { participants, creditProgram, id: taskId } = task;
21
+ const programmId = utils_1.creditProgramCodeToProductIdMap[creditProgram.code];
22
+ const isCredit = Boolean(utils_1.creditCodesToProgrammIdMap[creditProgram.code]);
23
+ const nextStepLink = isCredit ? '/credit-lead' : '/credit-card-lead';
24
+ const { name, midname, id: participantId, profile } = participants[0];
25
+ const handleGoToDraft = (0, hooks_1.useCallback)(() => {
26
+ const taskFromDraft = (0, parseDraftTask_1.parseDraftTask)(task);
27
+ leadFormStore.participantId = participantId;
28
+ leadFormStore.taskId = taskId;
29
+ leadFormStore.profileId = profile?.id;
30
+ leadFormStore.programId = programmId;
31
+ saveForm(taskFromDraft);
32
+ navigator.assign(nextStepLink);
33
+ }, []);
34
+ const handleGoToNewTask = (0, hooks_1.useCallback)(() => {
35
+ navigator.assign(isCredit ? '/natural/loans/all-goals' : '/natural/creditcards/svoya');
36
+ }, []);
37
+ const handleGoToMainPage = (0, hooks_1.useCallback)(() => {
38
+ navigator.assign('/');
39
+ }, []);
40
+ const appeal = name && midname ? `${name} ${midname}, ` : '';
41
+ return ((0, jsx_runtime_1.jsx)(Dialog_1.Dialog, { className: "my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg py-0 px-5xl", onClose: onClose, children: (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-lg", children: [(0, jsx_runtime_1.jsx)(Heading_1.Heading, { className: "whitespace-pre-wrap", title: `${appeal}мы нашли черновик вашей заявки.\nПродолжите заполнение?`, headingType: "h5" }), (0, jsx_runtime_1.jsx)(DraftActionButton_1.DraftActionButton, { title: "\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A\u0443", icon: "api/v1/wcms-file-storage/72d06937-5d8b-4996-9503-52389b93919e/file.svg", description: "\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0430\u0439\u0442\u0435 \u0437\u0430\u043F\u043E\u043B\u043D\u044F\u0442\u044C \u0437\u0430\u044F\u0432\u043A\u0443 \u0438\u0437 \u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A\u0430", onClick: handleGoToDraft }), (0, jsx_runtime_1.jsx)(DraftActionButton_1.DraftActionButton, { title: isFromLead ? 'Продолжить заполнение текущей заявки' : 'Заполнить новую заявку', icon: "api/v1/wcms-file-storage/796c3e8d-341a-480b-b52f-3aa5784ed623/file.svg", onClick: isFromLead ? onClose : handleGoToNewTask }), (0, jsx_runtime_1.jsx)(Button_1.Button, { type: "button", version: "secondary", className: "w-full text-h5", onClick: handleGoToMainPage, children: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u0433\u043B\u0430\u0432\u043D\u0443\u044E" })] }) }));
42
+ });
43
+ //# sourceMappingURL=DraftDialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DraftDialog.js","sourceRoot":"","sources":["../../../src/ui-kit/DraftDialog/DraftDialog.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAA0D;AAE1D,4FAAyF;AACzF,wEAAqE;AACrE,qDAAkD;AAClD,2CAAwC;AACxC,6CAA0C;AAC1C,oDAAiD;AACjD,gDAA6C;AAC7C,2DAAwD;AACxD,qDAAkD;AAClD,mCAAsF;AAQzE,QAAA,WAAW,GAAG,IAAA,aAAG,EAAmB,UAAU,EACzD,IAAI,EACJ,UAAU,GAAG,KAAK,EACl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zF,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,kBAAkB,GAAG,IAAA,mBAAW,EAAC,GAAG,EAAE;QAC1C,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACxB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,MAAM,GAAG,IAAI,IAAI,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,OAAO,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;IAE7D,OAAO,CACL,uBAAC,eAAM,IACL,SAAS,EAAC,kEAAkE,EAC5E,OAAO,EAAE,OAAO,YAEhB,iCAAK,SAAS,EAAC,sBAAsB,aACnC,uBAAC,iBAAO,IACN,SAAS,EAAC,qBAAqB,EAC/B,KAAK,EAAE,GAAG,MAAM,yDAAyD,EACzE,WAAW,EAAC,IAAI,GAChB,EACF,uBAAC,qCAAiB,IAChB,KAAK,EAAC,0GAAqB,EAC3B,IAAI,EAAC,wEAAwE,EAC7E,WAAW,EAAC,oOAA2C,EACvD,OAAO,EAAE,eAAe,GACxB,EACF,uBAAC,qCAAiB,IAChB,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,sCAAsC,CAAC,CAAC,CAAC,wBAAwB,EACrF,IAAI,EAAC,wEAAwE,EAC7E,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,iBAAiB,GACjD,EACF,uBAAC,eAAM,IACL,IAAI,EAAC,QAAQ,EACb,OAAO,EAAC,WAAW,EACnB,SAAS,EAAC,gBAAgB,EAC1B,OAAO,EAAE,kBAAkB,+HAGpB,IACL,GACC,CACV,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export interface EmptyDraftDialogProps {
2
+ onClose?: () => void;
3
+ }
4
+ export declare const EmptyDraftDialog: import("@redneckz/uni-jsx").UNIComponent<EmptyDraftDialogProps, any, any>;