@redneckz/wildless-cms-uni-blocks 0.14.888 → 0.14.890
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.
- package/bundle/api/LeadServiceAPI.d.ts +8 -0
- package/bundle/api/getSubmitBody.d.ts +494 -0
- package/bundle/bundle.umd.js +659 -556
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
- package/bundle/retail/api/checkCode.d.ts +9 -1
- package/bundle/retail/api/sendCode.d.ts +1 -1
- package/bundle/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +4 -0
- package/bundle/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +6 -1
- package/dist/api/LeadServiceAPI.d.ts +8 -0
- package/dist/api/LeadServiceAPI.js +41 -49
- package/dist/api/LeadServiceAPI.js.map +1 -1
- package/dist/api/getSubmitBody.d.ts +494 -0
- package/dist/api/getSubmitBody.js +59 -0
- package/dist/api/getSubmitBody.js.map +1 -0
- package/dist/components/ApplicationForm/ApplicationForm.js +30 -5
- package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
- package/dist/components/DebitForm/DebitFormProgress.js +3 -3
- package/dist/components/DebitForm/DebitFormProgress.js.map +1 -1
- package/dist/components/DebitForm/PendingStatusContent.js +1 -1
- package/dist/components/DebitForm/PendingStatusContent.js.map +1 -1
- package/dist/retail/api/checkCode.d.ts +9 -1
- package/dist/retail/api/checkCode.js +22 -1
- package/dist/retail/api/checkCode.js.map +1 -1
- package/dist/retail/api/sendCode.d.ts +1 -1
- package/dist/retail/api/sendCode.js +8 -2
- package/dist/retail/api/sendCode.js.map +1 -1
- package/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +4 -0
- package/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +10 -4
- package/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/dist/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +6 -1
- package/dist/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +7 -4
- package/dist/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
- package/dist/retail/utils/mockLocalStorage.js +2 -2
- package/dist/retail/utils/mockLocalStorage.js.map +1 -1
- package/lib/api/LeadServiceAPI.d.ts +8 -0
- package/lib/api/LeadServiceAPI.js +41 -49
- package/lib/api/LeadServiceAPI.js.map +1 -1
- package/lib/api/getSubmitBody.d.ts +494 -0
- package/lib/api/getSubmitBody.js +54 -0
- package/lib/api/getSubmitBody.js.map +1 -0
- package/lib/components/ApplicationForm/ApplicationForm.fixture.d.ts +1 -0
- package/lib/components/ApplicationForm/ApplicationForm.js +30 -5
- package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
- package/lib/components/DebitForm/DebitFormProgress.js +4 -4
- package/lib/components/DebitForm/DebitFormProgress.js.map +1 -1
- package/lib/components/DebitForm/PendingStatusContent.js +1 -1
- package/lib/components/DebitForm/PendingStatusContent.js.map +1 -1
- package/lib/retail/api/checkCode.d.ts +9 -1
- package/lib/retail/api/checkCode.js +22 -1
- package/lib/retail/api/checkCode.js.map +1 -1
- package/lib/retail/api/sendCode.d.ts +1 -1
- package/lib/retail/api/sendCode.js +7 -1
- package/lib/retail/api/sendCode.js.map +1 -1
- package/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +4 -0
- package/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +10 -4
- package/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/lib/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +6 -1
- package/lib/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +6 -3
- package/lib/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
- package/lib/retail/utils/mockLocalStorage.js +2 -2
- package/lib/retail/utils/mockLocalStorage.js.map +1 -1
- package/mobile/bundle/api/LeadServiceAPI.d.ts +8 -0
- package/mobile/bundle/api/getSubmitBody.d.ts +494 -0
- package/mobile/bundle/bundle.umd.js +659 -556
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
- package/mobile/bundle/retail/api/checkCode.d.ts +9 -1
- package/mobile/bundle/retail/api/sendCode.d.ts +1 -1
- package/mobile/bundle/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +4 -0
- package/mobile/bundle/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +6 -1
- package/mobile/dist/api/LeadServiceAPI.d.ts +8 -0
- package/mobile/dist/api/LeadServiceAPI.js +41 -49
- package/mobile/dist/api/LeadServiceAPI.js.map +1 -1
- package/mobile/dist/api/getSubmitBody.d.ts +494 -0
- package/mobile/dist/api/getSubmitBody.js +59 -0
- package/mobile/dist/api/getSubmitBody.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js +30 -5
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
- package/mobile/dist/components/DebitForm/DebitFormProgress.js +3 -3
- package/mobile/dist/components/DebitForm/DebitFormProgress.js.map +1 -1
- package/mobile/dist/components/DebitForm/PendingStatusContent.js +1 -1
- package/mobile/dist/components/DebitForm/PendingStatusContent.js.map +1 -1
- package/mobile/dist/retail/api/checkCode.d.ts +9 -1
- package/mobile/dist/retail/api/checkCode.js +22 -1
- package/mobile/dist/retail/api/checkCode.js.map +1 -1
- package/mobile/dist/retail/api/sendCode.d.ts +1 -1
- package/mobile/dist/retail/api/sendCode.js +8 -2
- package/mobile/dist/retail/api/sendCode.js.map +1 -1
- package/mobile/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +4 -0
- package/mobile/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +10 -4
- package/mobile/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/mobile/dist/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +6 -1
- package/mobile/dist/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +7 -4
- package/mobile/dist/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
- package/mobile/dist/retail/utils/mockLocalStorage.js +2 -2
- package/mobile/dist/retail/utils/mockLocalStorage.js.map +1 -1
- package/mobile/lib/api/LeadServiceAPI.d.ts +8 -0
- package/mobile/lib/api/LeadServiceAPI.js +41 -49
- package/mobile/lib/api/LeadServiceAPI.js.map +1 -1
- package/mobile/lib/api/getSubmitBody.d.ts +494 -0
- package/mobile/lib/api/getSubmitBody.js +54 -0
- package/mobile/lib/api/getSubmitBody.js.map +1 -0
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js +30 -5
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
- package/mobile/lib/components/DebitForm/DebitFormProgress.js +4 -4
- package/mobile/lib/components/DebitForm/DebitFormProgress.js.map +1 -1
- package/mobile/lib/components/DebitForm/PendingStatusContent.js +1 -1
- package/mobile/lib/components/DebitForm/PendingStatusContent.js.map +1 -1
- package/mobile/lib/retail/api/checkCode.d.ts +9 -1
- package/mobile/lib/retail/api/checkCode.js +22 -1
- package/mobile/lib/retail/api/checkCode.js.map +1 -1
- package/mobile/lib/retail/api/sendCode.d.ts +1 -1
- package/mobile/lib/retail/api/sendCode.js +7 -1
- package/mobile/lib/retail/api/sendCode.js.map +1 -1
- package/mobile/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +4 -0
- package/mobile/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +10 -4
- package/mobile/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/mobile/lib/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +6 -1
- package/mobile/lib/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +6 -3
- package/mobile/lib/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
- package/mobile/lib/retail/utils/mockLocalStorage.js +2 -2
- package/mobile/lib/retail/utils/mockLocalStorage.js.map +1 -1
- package/mobile/src/api/LeadServiceAPI.ts +64 -82
- package/mobile/src/api/getSubmitBody.ts +94 -0
- package/mobile/src/components/ApplicationForm/ApplicationForm.example.json +2 -2
- package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +33 -4
- package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +1 -1
- package/mobile/src/components/DebitForm/DebitFormProgress.tsx +4 -9
- package/mobile/src/components/DebitForm/PendingStatusContent.tsx +1 -1
- package/mobile/src/retail/api/checkCode.ts +47 -2
- package/mobile/src/retail/api/sendCode.ts +9 -1
- package/mobile/src/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.tsx +29 -8
- package/mobile/src/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx +18 -5
- package/mobile/src/retail/utils/mockLocalStorage.ts +15 -9
- package/package.json +1 -1
- package/src/api/LeadServiceAPI.ts +64 -82
- package/src/api/getSubmitBody.ts +94 -0
- package/src/components/ApplicationForm/ApplicationForm.example.json +2 -2
- package/src/components/ApplicationForm/ApplicationForm.fixture.mobile.tsx +2 -2
- package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +24 -2
- package/src/components/ApplicationForm/ApplicationForm.tsx +33 -4
- package/src/components/ApplicationForm/ApplicationFormContent.ts +1 -1
- package/src/components/DebitForm/DebitFormProgress.tsx +4 -9
- package/src/components/DebitForm/PendingStatusContent.tsx +1 -1
- package/src/retail/api/checkCode.ts +47 -2
- package/src/retail/api/sendCode.ts +9 -1
- package/src/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.tsx +29 -8
- package/src/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx +18 -5
- package/src/retail/utils/mockLocalStorage.ts +15 -9
|
@@ -0,0 +1,494 @@
|
|
|
1
|
+
import type { JSONRecord, JSONScalar } from '@redneckz/json-op';
|
|
2
|
+
import type { Router } from '../external/useRouter';
|
|
3
|
+
import { type LeadRequest } from './LeadServiceAPI';
|
|
4
|
+
export declare const getSubmitBody: (body: LeadRequest, isNaturalPerson: boolean, router?: Router) => {
|
|
5
|
+
secondaryPhoneNumber?: string | undefined;
|
|
6
|
+
inn: string | undefined;
|
|
7
|
+
region: string | undefined;
|
|
8
|
+
partnerComments: string | undefined;
|
|
9
|
+
fullname: string | undefined;
|
|
10
|
+
typeForm: string;
|
|
11
|
+
phone: string;
|
|
12
|
+
} | {
|
|
13
|
+
secondaryPhoneNumber?: string | undefined;
|
|
14
|
+
inn?: undefined;
|
|
15
|
+
region?: undefined;
|
|
16
|
+
partnerComments?: undefined;
|
|
17
|
+
fullname?: undefined;
|
|
18
|
+
typeForm: string;
|
|
19
|
+
phone: string;
|
|
20
|
+
} | {
|
|
21
|
+
secondaryPhoneNumber?: string | undefined;
|
|
22
|
+
inn: string | undefined;
|
|
23
|
+
region: string | undefined;
|
|
24
|
+
partnerComments: string | undefined;
|
|
25
|
+
fullname: string | undefined;
|
|
26
|
+
typeForm: string | undefined;
|
|
27
|
+
phone: string;
|
|
28
|
+
} | {
|
|
29
|
+
secondaryPhoneNumber?: string | undefined;
|
|
30
|
+
inn?: undefined;
|
|
31
|
+
region?: undefined;
|
|
32
|
+
partnerComments?: undefined;
|
|
33
|
+
fullname?: undefined;
|
|
34
|
+
typeForm: string | undefined;
|
|
35
|
+
phone: string;
|
|
36
|
+
} | {
|
|
37
|
+
secondaryPhoneNumber?: string | undefined;
|
|
38
|
+
inn: string | undefined;
|
|
39
|
+
region: string | undefined;
|
|
40
|
+
partnerComments: string | undefined;
|
|
41
|
+
fullname: string | undefined;
|
|
42
|
+
typeForm: string;
|
|
43
|
+
addressBranch: string | undefined;
|
|
44
|
+
bankEmpolee: JSONRecord | JSONScalar | null;
|
|
45
|
+
applicationDate: JSONRecord | JSONScalar | null;
|
|
46
|
+
phone: string;
|
|
47
|
+
} | {
|
|
48
|
+
secondaryPhoneNumber?: string | undefined;
|
|
49
|
+
inn?: undefined;
|
|
50
|
+
region?: undefined;
|
|
51
|
+
partnerComments?: undefined;
|
|
52
|
+
fullname?: undefined;
|
|
53
|
+
typeForm: string;
|
|
54
|
+
addressBranch: string | undefined;
|
|
55
|
+
bankEmpolee: JSONRecord | JSONScalar | null;
|
|
56
|
+
applicationDate: JSONRecord | JSONScalar | null;
|
|
57
|
+
phone: string;
|
|
58
|
+
} | {
|
|
59
|
+
secondaryPhoneNumber?: string | undefined;
|
|
60
|
+
inn: string | undefined;
|
|
61
|
+
region: string | undefined;
|
|
62
|
+
partnerComments: string | undefined;
|
|
63
|
+
fullname: string | undefined;
|
|
64
|
+
typeForm: string | undefined;
|
|
65
|
+
addressBranch: string | undefined;
|
|
66
|
+
bankEmpolee: JSONRecord | JSONScalar | null;
|
|
67
|
+
applicationDate: JSONRecord | JSONScalar | null;
|
|
68
|
+
phone: string;
|
|
69
|
+
} | {
|
|
70
|
+
secondaryPhoneNumber?: string | undefined;
|
|
71
|
+
inn?: undefined;
|
|
72
|
+
region?: undefined;
|
|
73
|
+
partnerComments?: undefined;
|
|
74
|
+
fullname?: undefined;
|
|
75
|
+
typeForm: string | undefined;
|
|
76
|
+
addressBranch: string | undefined;
|
|
77
|
+
bankEmpolee: JSONRecord | JSONScalar | null;
|
|
78
|
+
applicationDate: JSONRecord | JSONScalar | null;
|
|
79
|
+
phone: string;
|
|
80
|
+
} | {
|
|
81
|
+
secondaryPhoneNumber: string;
|
|
82
|
+
inn: string | undefined;
|
|
83
|
+
region: string | undefined;
|
|
84
|
+
partnerComments: string | undefined;
|
|
85
|
+
fullname: string | undefined;
|
|
86
|
+
typeForm: string;
|
|
87
|
+
addressBranch: string | undefined;
|
|
88
|
+
bankEmpolee: JSONRecord | JSONScalar | null;
|
|
89
|
+
applicationDate: JSONRecord | JSONScalar | null;
|
|
90
|
+
phone: string;
|
|
91
|
+
} | {
|
|
92
|
+
secondaryPhoneNumber: string;
|
|
93
|
+
inn?: undefined;
|
|
94
|
+
region?: undefined;
|
|
95
|
+
partnerComments?: undefined;
|
|
96
|
+
fullname?: undefined;
|
|
97
|
+
typeForm: string;
|
|
98
|
+
addressBranch: string | undefined;
|
|
99
|
+
bankEmpolee: JSONRecord | JSONScalar | null;
|
|
100
|
+
applicationDate: JSONRecord | JSONScalar | null;
|
|
101
|
+
phone: string;
|
|
102
|
+
} | {
|
|
103
|
+
secondaryPhoneNumber: string;
|
|
104
|
+
inn: string | undefined;
|
|
105
|
+
region: string | undefined;
|
|
106
|
+
partnerComments: string | undefined;
|
|
107
|
+
fullname: string | undefined;
|
|
108
|
+
typeForm: string | undefined;
|
|
109
|
+
addressBranch: string | undefined;
|
|
110
|
+
bankEmpolee: JSONRecord | JSONScalar | null;
|
|
111
|
+
applicationDate: JSONRecord | JSONScalar | null;
|
|
112
|
+
phone: string;
|
|
113
|
+
} | {
|
|
114
|
+
secondaryPhoneNumber: string;
|
|
115
|
+
inn?: undefined;
|
|
116
|
+
region?: undefined;
|
|
117
|
+
partnerComments?: undefined;
|
|
118
|
+
fullname?: undefined;
|
|
119
|
+
typeForm: string | undefined;
|
|
120
|
+
addressBranch: string | undefined;
|
|
121
|
+
bankEmpolee: JSONRecord | JSONScalar | null;
|
|
122
|
+
applicationDate: JSONRecord | JSONScalar | null;
|
|
123
|
+
phone: string;
|
|
124
|
+
} | {
|
|
125
|
+
secondaryPhoneNumber?: string | undefined;
|
|
126
|
+
inn: string | undefined;
|
|
127
|
+
region: string | undefined;
|
|
128
|
+
partnerComments: string | undefined;
|
|
129
|
+
fullname: string | undefined;
|
|
130
|
+
typeForm: string;
|
|
131
|
+
phone: string;
|
|
132
|
+
} | {
|
|
133
|
+
secondaryPhoneNumber?: string | undefined;
|
|
134
|
+
inn: string | undefined;
|
|
135
|
+
region?: undefined;
|
|
136
|
+
partnerComments?: undefined;
|
|
137
|
+
fullname?: undefined;
|
|
138
|
+
typeForm: string;
|
|
139
|
+
phone: string;
|
|
140
|
+
} | {
|
|
141
|
+
secondaryPhoneNumber?: string | undefined;
|
|
142
|
+
inn: string | undefined;
|
|
143
|
+
region: string | undefined;
|
|
144
|
+
partnerComments: string | undefined;
|
|
145
|
+
fullname: string | undefined;
|
|
146
|
+
typeForm: string | undefined;
|
|
147
|
+
phone: string;
|
|
148
|
+
} | {
|
|
149
|
+
secondaryPhoneNumber?: string | undefined;
|
|
150
|
+
inn: string | undefined;
|
|
151
|
+
region?: undefined;
|
|
152
|
+
partnerComments?: undefined;
|
|
153
|
+
fullname?: undefined;
|
|
154
|
+
typeForm: string | undefined;
|
|
155
|
+
phone: string;
|
|
156
|
+
} | {
|
|
157
|
+
secondaryPhoneNumber?: string | undefined;
|
|
158
|
+
inn: string | undefined;
|
|
159
|
+
region: string | undefined;
|
|
160
|
+
partnerComments: string | undefined;
|
|
161
|
+
fullname: string | undefined;
|
|
162
|
+
typeForm: string;
|
|
163
|
+
addressBranch: string | undefined;
|
|
164
|
+
bankEmpolee: JSONRecord | JSONScalar | null;
|
|
165
|
+
applicationDate: JSONRecord | JSONScalar | null;
|
|
166
|
+
phone: string;
|
|
167
|
+
} | {
|
|
168
|
+
secondaryPhoneNumber?: string | undefined;
|
|
169
|
+
inn: string | undefined;
|
|
170
|
+
region?: undefined;
|
|
171
|
+
partnerComments?: undefined;
|
|
172
|
+
fullname?: undefined;
|
|
173
|
+
typeForm: string;
|
|
174
|
+
addressBranch: string | undefined;
|
|
175
|
+
bankEmpolee: JSONRecord | JSONScalar | null;
|
|
176
|
+
applicationDate: JSONRecord | JSONScalar | null;
|
|
177
|
+
phone: string;
|
|
178
|
+
} | {
|
|
179
|
+
secondaryPhoneNumber?: string | undefined;
|
|
180
|
+
inn: string | undefined;
|
|
181
|
+
region: string | undefined;
|
|
182
|
+
partnerComments: string | undefined;
|
|
183
|
+
fullname: string | undefined;
|
|
184
|
+
typeForm: string | undefined;
|
|
185
|
+
addressBranch: string | undefined;
|
|
186
|
+
bankEmpolee: JSONRecord | JSONScalar | null;
|
|
187
|
+
applicationDate: JSONRecord | JSONScalar | null;
|
|
188
|
+
phone: string;
|
|
189
|
+
} | {
|
|
190
|
+
secondaryPhoneNumber?: string | undefined;
|
|
191
|
+
inn: string | undefined;
|
|
192
|
+
region?: undefined;
|
|
193
|
+
partnerComments?: undefined;
|
|
194
|
+
fullname?: undefined;
|
|
195
|
+
typeForm: string | undefined;
|
|
196
|
+
addressBranch: string | undefined;
|
|
197
|
+
bankEmpolee: JSONRecord | JSONScalar | null;
|
|
198
|
+
applicationDate: JSONRecord | JSONScalar | null;
|
|
199
|
+
phone: string;
|
|
200
|
+
} | {
|
|
201
|
+
secondaryPhoneNumber: string;
|
|
202
|
+
inn: string | undefined;
|
|
203
|
+
region: string | undefined;
|
|
204
|
+
partnerComments: string | undefined;
|
|
205
|
+
fullname: string | undefined;
|
|
206
|
+
typeForm: string;
|
|
207
|
+
addressBranch: string | undefined;
|
|
208
|
+
bankEmpolee: JSONRecord | JSONScalar | null;
|
|
209
|
+
applicationDate: JSONRecord | JSONScalar | null;
|
|
210
|
+
phone: string;
|
|
211
|
+
} | {
|
|
212
|
+
secondaryPhoneNumber: string;
|
|
213
|
+
inn: string | undefined;
|
|
214
|
+
region?: undefined;
|
|
215
|
+
partnerComments?: undefined;
|
|
216
|
+
fullname?: undefined;
|
|
217
|
+
typeForm: string;
|
|
218
|
+
addressBranch: string | undefined;
|
|
219
|
+
bankEmpolee: JSONRecord | JSONScalar | null;
|
|
220
|
+
applicationDate: JSONRecord | JSONScalar | null;
|
|
221
|
+
phone: string;
|
|
222
|
+
} | {
|
|
223
|
+
secondaryPhoneNumber: string;
|
|
224
|
+
inn: string | undefined;
|
|
225
|
+
region: string | undefined;
|
|
226
|
+
partnerComments: string | undefined;
|
|
227
|
+
fullname: string | undefined;
|
|
228
|
+
typeForm: string | undefined;
|
|
229
|
+
addressBranch: string | undefined;
|
|
230
|
+
bankEmpolee: JSONRecord | JSONScalar | null;
|
|
231
|
+
applicationDate: JSONRecord | JSONScalar | null;
|
|
232
|
+
phone: string;
|
|
233
|
+
} | {
|
|
234
|
+
secondaryPhoneNumber: string;
|
|
235
|
+
inn: string | undefined;
|
|
236
|
+
region?: undefined;
|
|
237
|
+
partnerComments?: undefined;
|
|
238
|
+
fullname?: undefined;
|
|
239
|
+
typeForm: string | undefined;
|
|
240
|
+
addressBranch: string | undefined;
|
|
241
|
+
bankEmpolee: JSONRecord | JSONScalar | null;
|
|
242
|
+
applicationDate: JSONRecord | JSONScalar | null;
|
|
243
|
+
phone: string;
|
|
244
|
+
} | {
|
|
245
|
+
secondaryPhoneNumber?: string | undefined;
|
|
246
|
+
inn: string | undefined;
|
|
247
|
+
region: string | undefined;
|
|
248
|
+
partnerComments: string | undefined;
|
|
249
|
+
fullname: string | undefined;
|
|
250
|
+
typeForm: string;
|
|
251
|
+
phone?: undefined;
|
|
252
|
+
} | {
|
|
253
|
+
secondaryPhoneNumber?: string | undefined;
|
|
254
|
+
inn?: undefined;
|
|
255
|
+
region?: undefined;
|
|
256
|
+
partnerComments?: undefined;
|
|
257
|
+
fullname?: undefined;
|
|
258
|
+
typeForm: string;
|
|
259
|
+
phone?: undefined;
|
|
260
|
+
} | {
|
|
261
|
+
secondaryPhoneNumber?: string | undefined;
|
|
262
|
+
inn: string | undefined;
|
|
263
|
+
region: string | undefined;
|
|
264
|
+
partnerComments: string | undefined;
|
|
265
|
+
fullname: string | undefined;
|
|
266
|
+
typeForm: string | undefined;
|
|
267
|
+
phone?: undefined;
|
|
268
|
+
} | {
|
|
269
|
+
secondaryPhoneNumber?: string | undefined;
|
|
270
|
+
inn?: undefined;
|
|
271
|
+
region?: undefined;
|
|
272
|
+
partnerComments?: undefined;
|
|
273
|
+
fullname?: undefined;
|
|
274
|
+
typeForm: string | undefined;
|
|
275
|
+
phone?: undefined;
|
|
276
|
+
} | {
|
|
277
|
+
secondaryPhoneNumber?: string | undefined;
|
|
278
|
+
inn: string | undefined;
|
|
279
|
+
region: string | undefined;
|
|
280
|
+
partnerComments: string | undefined;
|
|
281
|
+
fullname: string | undefined;
|
|
282
|
+
typeForm: string;
|
|
283
|
+
addressBranch: string | undefined;
|
|
284
|
+
bankEmpolee: JSONRecord | JSONScalar | null;
|
|
285
|
+
applicationDate: JSONRecord | JSONScalar | null;
|
|
286
|
+
phone?: undefined;
|
|
287
|
+
} | {
|
|
288
|
+
secondaryPhoneNumber?: string | undefined;
|
|
289
|
+
inn?: undefined;
|
|
290
|
+
region?: undefined;
|
|
291
|
+
partnerComments?: undefined;
|
|
292
|
+
fullname?: undefined;
|
|
293
|
+
typeForm: string;
|
|
294
|
+
addressBranch: string | undefined;
|
|
295
|
+
bankEmpolee: JSONRecord | JSONScalar | null;
|
|
296
|
+
applicationDate: JSONRecord | JSONScalar | null;
|
|
297
|
+
phone?: undefined;
|
|
298
|
+
} | {
|
|
299
|
+
secondaryPhoneNumber?: string | undefined;
|
|
300
|
+
inn: string | undefined;
|
|
301
|
+
region: string | undefined;
|
|
302
|
+
partnerComments: string | undefined;
|
|
303
|
+
fullname: string | undefined;
|
|
304
|
+
typeForm: string | undefined;
|
|
305
|
+
addressBranch: string | undefined;
|
|
306
|
+
bankEmpolee: JSONRecord | JSONScalar | null;
|
|
307
|
+
applicationDate: JSONRecord | JSONScalar | null;
|
|
308
|
+
phone?: undefined;
|
|
309
|
+
} | {
|
|
310
|
+
secondaryPhoneNumber?: string | undefined;
|
|
311
|
+
inn?: undefined;
|
|
312
|
+
region?: undefined;
|
|
313
|
+
partnerComments?: undefined;
|
|
314
|
+
fullname?: undefined;
|
|
315
|
+
typeForm: string | undefined;
|
|
316
|
+
addressBranch: string | undefined;
|
|
317
|
+
bankEmpolee: JSONRecord | JSONScalar | null;
|
|
318
|
+
applicationDate: JSONRecord | JSONScalar | null;
|
|
319
|
+
phone?: undefined;
|
|
320
|
+
} | {
|
|
321
|
+
secondaryPhoneNumber: string;
|
|
322
|
+
inn: string | undefined;
|
|
323
|
+
region: string | undefined;
|
|
324
|
+
partnerComments: string | undefined;
|
|
325
|
+
fullname: string | undefined;
|
|
326
|
+
typeForm: string;
|
|
327
|
+
addressBranch: string | undefined;
|
|
328
|
+
bankEmpolee: JSONRecord | JSONScalar | null;
|
|
329
|
+
applicationDate: JSONRecord | JSONScalar | null;
|
|
330
|
+
phone?: undefined;
|
|
331
|
+
} | {
|
|
332
|
+
secondaryPhoneNumber: string;
|
|
333
|
+
inn?: undefined;
|
|
334
|
+
region?: undefined;
|
|
335
|
+
partnerComments?: undefined;
|
|
336
|
+
fullname?: undefined;
|
|
337
|
+
typeForm: string;
|
|
338
|
+
addressBranch: string | undefined;
|
|
339
|
+
bankEmpolee: JSONRecord | JSONScalar | null;
|
|
340
|
+
applicationDate: JSONRecord | JSONScalar | null;
|
|
341
|
+
phone?: undefined;
|
|
342
|
+
} | {
|
|
343
|
+
secondaryPhoneNumber: string;
|
|
344
|
+
inn: string | undefined;
|
|
345
|
+
region: string | undefined;
|
|
346
|
+
partnerComments: string | undefined;
|
|
347
|
+
fullname: string | undefined;
|
|
348
|
+
typeForm: string | undefined;
|
|
349
|
+
addressBranch: string | undefined;
|
|
350
|
+
bankEmpolee: JSONRecord | JSONScalar | null;
|
|
351
|
+
applicationDate: JSONRecord | JSONScalar | null;
|
|
352
|
+
phone?: undefined;
|
|
353
|
+
} | {
|
|
354
|
+
secondaryPhoneNumber: string;
|
|
355
|
+
inn?: undefined;
|
|
356
|
+
region?: undefined;
|
|
357
|
+
partnerComments?: undefined;
|
|
358
|
+
fullname?: undefined;
|
|
359
|
+
typeForm: string | undefined;
|
|
360
|
+
addressBranch: string | undefined;
|
|
361
|
+
bankEmpolee: JSONRecord | JSONScalar | null;
|
|
362
|
+
applicationDate: JSONRecord | JSONScalar | null;
|
|
363
|
+
phone?: undefined;
|
|
364
|
+
} | {
|
|
365
|
+
secondaryPhoneNumber?: string | undefined;
|
|
366
|
+
inn: string | undefined;
|
|
367
|
+
region: string | undefined;
|
|
368
|
+
partnerComments: string | undefined;
|
|
369
|
+
fullname: string | undefined;
|
|
370
|
+
typeForm: string;
|
|
371
|
+
phone?: undefined;
|
|
372
|
+
} | {
|
|
373
|
+
secondaryPhoneNumber?: string | undefined;
|
|
374
|
+
inn: string | undefined;
|
|
375
|
+
region?: undefined;
|
|
376
|
+
partnerComments?: undefined;
|
|
377
|
+
fullname?: undefined;
|
|
378
|
+
typeForm: string;
|
|
379
|
+
phone?: undefined;
|
|
380
|
+
} | {
|
|
381
|
+
secondaryPhoneNumber?: string | undefined;
|
|
382
|
+
inn: string | undefined;
|
|
383
|
+
region: string | undefined;
|
|
384
|
+
partnerComments: string | undefined;
|
|
385
|
+
fullname: string | undefined;
|
|
386
|
+
typeForm: string | undefined;
|
|
387
|
+
phone?: undefined;
|
|
388
|
+
} | {
|
|
389
|
+
secondaryPhoneNumber?: string | undefined;
|
|
390
|
+
inn: string | undefined;
|
|
391
|
+
region?: undefined;
|
|
392
|
+
partnerComments?: undefined;
|
|
393
|
+
fullname?: undefined;
|
|
394
|
+
typeForm: string | undefined;
|
|
395
|
+
phone?: undefined;
|
|
396
|
+
} | {
|
|
397
|
+
secondaryPhoneNumber?: string | undefined;
|
|
398
|
+
inn: string | undefined;
|
|
399
|
+
region: string | undefined;
|
|
400
|
+
partnerComments: string | undefined;
|
|
401
|
+
fullname: string | undefined;
|
|
402
|
+
typeForm: string;
|
|
403
|
+
addressBranch: string | undefined;
|
|
404
|
+
bankEmpolee: JSONRecord | JSONScalar | null;
|
|
405
|
+
applicationDate: JSONRecord | JSONScalar | null;
|
|
406
|
+
phone?: undefined;
|
|
407
|
+
} | {
|
|
408
|
+
secondaryPhoneNumber?: string | undefined;
|
|
409
|
+
inn: string | undefined;
|
|
410
|
+
region?: undefined;
|
|
411
|
+
partnerComments?: undefined;
|
|
412
|
+
fullname?: undefined;
|
|
413
|
+
typeForm: string;
|
|
414
|
+
addressBranch: string | undefined;
|
|
415
|
+
bankEmpolee: JSONRecord | JSONScalar | null;
|
|
416
|
+
applicationDate: JSONRecord | JSONScalar | null;
|
|
417
|
+
phone?: undefined;
|
|
418
|
+
} | {
|
|
419
|
+
secondaryPhoneNumber?: string | undefined;
|
|
420
|
+
inn: string | undefined;
|
|
421
|
+
region: string | undefined;
|
|
422
|
+
partnerComments: string | undefined;
|
|
423
|
+
fullname: string | undefined;
|
|
424
|
+
typeForm: string | undefined;
|
|
425
|
+
addressBranch: string | undefined;
|
|
426
|
+
bankEmpolee: JSONRecord | JSONScalar | null;
|
|
427
|
+
applicationDate: JSONRecord | JSONScalar | null;
|
|
428
|
+
phone?: undefined;
|
|
429
|
+
} | {
|
|
430
|
+
secondaryPhoneNumber?: string | undefined;
|
|
431
|
+
inn: string | undefined;
|
|
432
|
+
region?: undefined;
|
|
433
|
+
partnerComments?: undefined;
|
|
434
|
+
fullname?: undefined;
|
|
435
|
+
typeForm: string | undefined;
|
|
436
|
+
addressBranch: string | undefined;
|
|
437
|
+
bankEmpolee: JSONRecord | JSONScalar | null;
|
|
438
|
+
applicationDate: JSONRecord | JSONScalar | null;
|
|
439
|
+
phone?: undefined;
|
|
440
|
+
} | {
|
|
441
|
+
secondaryPhoneNumber: string;
|
|
442
|
+
inn: string | undefined;
|
|
443
|
+
region: string | undefined;
|
|
444
|
+
partnerComments: string | undefined;
|
|
445
|
+
fullname: string | undefined;
|
|
446
|
+
typeForm: string;
|
|
447
|
+
addressBranch: string | undefined;
|
|
448
|
+
bankEmpolee: JSONRecord | JSONScalar | null;
|
|
449
|
+
applicationDate: JSONRecord | JSONScalar | null;
|
|
450
|
+
phone?: undefined;
|
|
451
|
+
} | {
|
|
452
|
+
secondaryPhoneNumber: string;
|
|
453
|
+
inn: string | undefined;
|
|
454
|
+
region?: undefined;
|
|
455
|
+
partnerComments?: undefined;
|
|
456
|
+
fullname?: undefined;
|
|
457
|
+
typeForm: string;
|
|
458
|
+
addressBranch: string | undefined;
|
|
459
|
+
bankEmpolee: JSONRecord | JSONScalar | null;
|
|
460
|
+
applicationDate: JSONRecord | JSONScalar | null;
|
|
461
|
+
phone?: undefined;
|
|
462
|
+
} | {
|
|
463
|
+
secondaryPhoneNumber: string;
|
|
464
|
+
inn: string | undefined;
|
|
465
|
+
region: string | undefined;
|
|
466
|
+
partnerComments: string | undefined;
|
|
467
|
+
fullname: string | undefined;
|
|
468
|
+
typeForm: string | undefined;
|
|
469
|
+
addressBranch: string | undefined;
|
|
470
|
+
bankEmpolee: JSONRecord | JSONScalar | null;
|
|
471
|
+
applicationDate: JSONRecord | JSONScalar | null;
|
|
472
|
+
phone?: undefined;
|
|
473
|
+
} | {
|
|
474
|
+
secondaryPhoneNumber: string;
|
|
475
|
+
inn: string | undefined;
|
|
476
|
+
region?: undefined;
|
|
477
|
+
partnerComments?: undefined;
|
|
478
|
+
fullname?: undefined;
|
|
479
|
+
typeForm: string | undefined;
|
|
480
|
+
addressBranch: string | undefined;
|
|
481
|
+
bankEmpolee: JSONRecord | JSONScalar | null;
|
|
482
|
+
applicationDate: JSONRecord | JSONScalar | null;
|
|
483
|
+
phone?: undefined;
|
|
484
|
+
};
|
|
485
|
+
export declare const getPhoneBody: (phone?: string) => {
|
|
486
|
+
phone: string;
|
|
487
|
+
} | {
|
|
488
|
+
phone?: undefined;
|
|
489
|
+
};
|
|
490
|
+
export declare const getPhone: (phone?: string) => {
|
|
491
|
+
phone: string;
|
|
492
|
+
} | {
|
|
493
|
+
phone?: undefined;
|
|
494
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { formatDate } from '../utils/formatDate.js';
|
|
2
|
+
import { formatPhone } from '../utils/formatPhone.js';
|
|
3
|
+
export const getSubmitBody = (body, isNaturalPerson, router) => {
|
|
4
|
+
const { typeForm, region, phone = '', email, birthday, desiredMeetingDate, inn, innDadata, fullRegion, addressBranch, secondaryPhone = '', bankEmpolee, applicationDate, partnerSymbolCode, companyNameByInn, ...staticBody } = body;
|
|
5
|
+
return {
|
|
6
|
+
typeForm,
|
|
7
|
+
...getRegion(region, isNaturalPerson),
|
|
8
|
+
...getEmail(email, isNaturalPerson),
|
|
9
|
+
...getPhone(phone),
|
|
10
|
+
...getFormatDate(desiredMeetingDate, 'desiredMeetingDate'),
|
|
11
|
+
...(isNaturalPerson ? getFormatDate(birthday) : { inn }),
|
|
12
|
+
...(typeForm === 'FEEDBACK'
|
|
13
|
+
? {}
|
|
14
|
+
: {
|
|
15
|
+
addressBranch,
|
|
16
|
+
bankEmpolee,
|
|
17
|
+
applicationDate,
|
|
18
|
+
...getSecondaryPhone(secondaryPhone),
|
|
19
|
+
}),
|
|
20
|
+
...addPageSlug(typeForm, router),
|
|
21
|
+
...formatPFForm(typeForm, { innDadata, fullRegion, partnerSymbolCode, companyNameByInn }),
|
|
22
|
+
...staticBody,
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export const getPhoneBody = (phone) => {
|
|
26
|
+
return {
|
|
27
|
+
...getPhone(phone),
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export const getPhone = (phone) => (phone ? { phone: formatPhone(phone) } : {});
|
|
31
|
+
const getFormatDate = (date, key = 'birthday') => date ? { [key]: formatDate(date) } : {};
|
|
32
|
+
const getRegion = (region, isNaturalPerson = true) => ({
|
|
33
|
+
[isNaturalPerson ? 'regionBranch' : 'region']: region,
|
|
34
|
+
});
|
|
35
|
+
const getEmail = (email, isNaturalPerson = true) => ({
|
|
36
|
+
[isNaturalPerson ? 'email' : 'mail']: email,
|
|
37
|
+
});
|
|
38
|
+
const getSecondaryPhone = (secondaryPhone = '') => !secondaryPhone || secondaryPhone === '+7 ('
|
|
39
|
+
? {}
|
|
40
|
+
: { secondaryPhoneNumber: formatPhone(secondaryPhone) };
|
|
41
|
+
const formatPFForm = (typeForm, data) => typeForm === 'PF'
|
|
42
|
+
? {
|
|
43
|
+
inn: data?.innDadata,
|
|
44
|
+
region: data?.fullRegion,
|
|
45
|
+
partnerComments: data?.partnerSymbolCode,
|
|
46
|
+
fullname: data?.companyNameByInn,
|
|
47
|
+
}
|
|
48
|
+
: {};
|
|
49
|
+
const addPageSlug = (typeForm, router) => typeForm === 'UNIVERSAL'
|
|
50
|
+
? {
|
|
51
|
+
typeForm: router?.pathname?.split('/')?.at(-1) || '/',
|
|
52
|
+
}
|
|
53
|
+
: {};
|
|
54
|
+
//# sourceMappingURL=getSubmitBody.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSubmitBody.js","sourceRoot":"","sources":["../../src/api/getSubmitBody.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAUnD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,IAAiB,EAAE,eAAwB,EAAE,MAAe,EAAE,EAAE;IAC5F,MAAM,EACJ,QAAQ,EACR,MAAM,EACN,KAAK,GAAG,EAAE,EACV,KAAK,EACL,QAAQ,EACR,kBAAkB,EAClB,GAAG,EACH,SAAS,EACT,UAAU,EACV,aAAa,EACb,cAAc,GAAG,EAAE,EACnB,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,GAAG,UAAU,EACd,GAAG,IAAI,CAAC;IAET,OAAO;QACL,QAAQ;QACR,GAAG,SAAS,CAAC,MAAM,EAAE,eAAe,CAAC;QACrC,GAAG,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;QACnC,GAAG,QAAQ,CAAC,KAAK,CAAC;QAClB,GAAG,aAAa,CAAC,kBAA4B,EAAE,oBAAoB,CAAC;QACpE,GAAG,CAAC,eAAe,CA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,CAAC;IAC5D,CAAC,eAAe,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK;CAC5C,CAAC,CAAC;AAEH,MAAM,iBAAiB,GAAG,CAAC,cAAc,GAAG,EAAE,EAAE,EAAE,CAChD,CAAC,cAAc,IAAI,cAAc,KAAK,MAAM;IAC1C,CAAC,CAAC,EAAE;IACJ,CAAC,CAAC,EAAE,oBAAoB,EAAE,WAAW,CAAC,cAAc,CAAC,EAAE,CAAC;AAE5D,MAAM,YAAY,GAAG,CAAC,QAAiB,EAAE,IAAiB,EAAE,EAAE,CAC5D,QAAQ,KAAK,IAAI;IACf,CAAC,CAAC;QACE,GAAG,EAAE,IAAI,EAAE,SAAS;QACpB,MAAM,EAAE,IAAI,EAAE,UAAU;QACxB,eAAe,EAAE,IAAI,EAAE,iBAAiB;QACxC,QAAQ,EAAE,IAAI,EAAE,gBAAgB;KACjC;IACH,CAAC,CAAC,EAAE,CAAC;AAET,MAAM,WAAW,GAAG,CAAC,QAAiB,EAAE,MAAe,EAAE,EAAE,CACzD,QAAQ,KAAK,WAAW;IACtB,CAAC,CAAC;QACE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG;KACtD;IACH,CAAC,CAAC,EAAE,CAAC"}
|
|
@@ -5,6 +5,7 @@ import { useRouter } from '../../external/useRouter.js';
|
|
|
5
5
|
import { handleAspects } from '../../hooks/useAspects/handleAspects.js';
|
|
6
6
|
import { useAspects } from '../../hooks/useAspects/useAspects.js';
|
|
7
7
|
import { useForm } from '../../hooks/useForm/useForm.js';
|
|
8
|
+
import { VerifyPhoneDialog } from '../../retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js';
|
|
8
9
|
import { ApplicationFormLayout } from '../../ui-kit/ApplicationFormLayout/ApplicationFormLayout.js';
|
|
9
10
|
import { useDialog } from '../../ui-kit/DialogManager/useDialog.js';
|
|
10
11
|
import { getConsentDataProcessing } from '../../ui-kit/FormField/getConsentDataProcessing.js';
|
|
@@ -20,19 +21,43 @@ import { getInitialFormState } from './getInitialFormState.js';
|
|
|
20
21
|
import { renderAgreementSubmit } from './renderAgreementSubmit.js';
|
|
21
22
|
import { renderContacts } from './renderContacts.js';
|
|
22
23
|
const API = LeadServiceAPI();
|
|
23
|
-
export const ApplicationForm = UniBlock(
|
|
24
|
+
export const ApplicationForm = UniBlock(
|
|
25
|
+
// eslint-disable-next-line max-lines-per-function
|
|
26
|
+
({ className, title, typeForm = '', sections = [], button, link, endpoint, additionalParams, isContacts, data, ...rest }) => {
|
|
24
27
|
const inputs = useMemo(() => (sections?.flatMap((_) => _?.inputs) || []), [sections]);
|
|
25
28
|
const initialFormState = useMemo(() => getInitialFormState(inputs, typeForm), [inputs, typeForm]);
|
|
26
29
|
const router = useRouter();
|
|
27
30
|
const formValidator = useMemo(() => getFormValidator(inputs), [inputs]);
|
|
28
31
|
const responseTypeDialog = useDialog(ResponseTypeDialog);
|
|
29
32
|
const aspects = useAspects();
|
|
33
|
+
const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
|
|
30
34
|
const handleSubmit = useCallback(async (formData, ev) => {
|
|
31
35
|
const formatData = getFormatData({ ...formData, ...additionalParams });
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
if (endpoint === 'initcorporatelead') {
|
|
37
|
+
const { phone } = formatData;
|
|
38
|
+
const response = await API.sendCode({ phone: String(phone) });
|
|
39
|
+
if (!response) {
|
|
40
|
+
responseTypeDialog.open({ ok: Boolean(response), typeForm });
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
verifyPhoneDialog.open({
|
|
44
|
+
phone,
|
|
45
|
+
withDescription: false,
|
|
46
|
+
formatData,
|
|
47
|
+
reqId: String(response),
|
|
48
|
+
isRetail: false,
|
|
49
|
+
onSuccess: () => {
|
|
50
|
+
verifyPhoneDialog.close();
|
|
51
|
+
responseTypeDialog.open({ ok: true, typeForm });
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
const ok = Boolean(await API.send(formatData, router, endpoint === 'lead'));
|
|
57
|
+
responseTypeDialog.open({ ok, typeForm });
|
|
58
|
+
if (ok) {
|
|
59
|
+
handleAspects({ aspectsAttributes: data, aspects, ev });
|
|
60
|
+
}
|
|
36
61
|
}
|
|
37
62
|
}, [typeForm]);
|
|
38
63
|
const [, { field, onSubmit }] = useForm(initialFormState, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationForm.js","sourceRoot":"","sources":["../../../src/components/ApplicationForm/ApplicationForm.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,OAAO,EAA4B,MAAM,6BAA6B,CAAC;AAGhF,OAAO,EAAE,qBAAqB,EAAE,MAAM,0DAA0D,CAAC;AACjG,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAC3F,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAEjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,Q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,EAAE,GAAG,CAAC,QAAQ,CAAW,KAAK,EAAE,EAAE,QAAQ,EAAE,GAAG,gBAAgB,EAAE,CAAC,CAAC,KAF7E,WAAW,CAAC,EAAE,CAGlB,CACP,CAAC,CAAC"}
|
|
@@ -32,7 +32,7 @@ export declare type FieldDef = Required & LabelProps & ConditionFieldProps & Fil
|
|
|
32
32
|
defaultValue?: string;
|
|
33
33
|
};
|
|
34
34
|
/** @hidden */
|
|
35
|
-
export declare type EndpointType = 'lead' | 'sendcorporatelead';
|
|
35
|
+
export declare type EndpointType = 'lead' | 'sendcorporatelead' | 'initcorporatelead';
|
|
36
36
|
/**
|
|
37
37
|
* @title Секция полей ввода
|
|
38
38
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
import { useMemo } from '@redneckz/uni-jsx/lib/hooks';
|
|
4
3
|
import { ProgressBar } from '../../ui-kit/ProgressBar/ProgressBar.js';
|
|
5
4
|
export const DebitFormProgress = JSX(({ step = 1, totalSteps = 2, stepsTitles = [] }) => {
|
|
6
|
-
const
|
|
7
|
-
|
|
5
|
+
const isFinalStep = step === totalSteps;
|
|
6
|
+
const progress = isFinalStep ? 100 : 85;
|
|
7
|
+
return (_jsxs("div", { className: "py-lg px-5xl bg-white col-span-12", children: [stepsTitles[step] || null, _jsx(ProgressBar, { step: progress, showPercentage: false })] }));
|
|
8
8
|
});
|
|
9
9
|
//# sourceMappingURL=DebitFormProgress.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DebitFormProgress.js","sourceRoot":"","sources":["../../../src/components/DebitForm/DebitFormProgress.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"DebitFormProgress.js","sourceRoot":"","sources":["../../../src/components/DebitForm/DebitFormProgress.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAQnE,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAClC,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,UAAU,GAAG,CAAC,EAAE,WAAW,GAAG,EAAE,EAAE,EAAE,EAAE;IACjD,MAAM,WAAW,GAAG,IAAI,KAAK,UAAU,CAAC;IACxC,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAExC,OAAO,CACL,eAAK,SAAS,EAAC,mCAAmC,aAC/C,WAAW,CAAC,IAAI,CAAC,IAAI,IAAI,EAC1B,KAAC,WAAW,IAAC,IAAI,EAAE,QAAQ,EAAE,cAAc,EAAE,KAAK,GAAI,IAClD,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
3
|
import { DebitFormStatus } from './DebitFormStatus.js';
|
|
4
|
-
export const PendingStatusContent = JSX(() => (_jsx(DebitFormStatus, { title: "\
|
|
4
|
+
export const PendingStatusContent = JSX(() => (_jsx(DebitFormStatus, { title: "\u041D\u0435 \u0437\u0430\u043A\u0440\u044B\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u044F\u0432\u043A\u0443", description: "\u0418\u0434\u0451\u0442 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 \u0434\u0430\u043D\u043D\u044B\u0445" })));
|
|
5
5
|
//# sourceMappingURL=PendingStatusContent.js.map
|