@redneckz/wildless-cms-uni-blocks 0.14.579 → 0.14.581
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/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +7 -29
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
- package/bundle/components/ApplicationForm/getInitialFormState.d.ts +0 -1
- package/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +1 -1
- package/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +0 -1
- package/bundle/hooks/useLeadFormData.d.ts +4 -1
- package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
- package/dist/components/ApplicationForm/getFormatData.js +1 -2
- package/dist/components/ApplicationForm/getFormatData.js.map +1 -1
- package/dist/components/ApplicationForm/getInitialFormState.d.ts +0 -1
- package/dist/components/ApplicationForm/getInitialFormState.js +0 -1
- package/dist/components/ApplicationForm/getInitialFormState.js.map +1 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +1 -1
- package/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +0 -1
- package/dist/components/ApplicationLeadForm/getInitialFormState.js +0 -1
- package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/dist/hooks/useLeadFormData.d.ts +4 -1
- package/dist/hooks/useLeadFormData.js +4 -1
- package/dist/hooks/useLeadFormData.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/DesiredMeetingDateField.js +1 -1
- package/dist/ui-kit/FormField/Fields/DesiredMeetingDateField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/FeedbackTypeField.d.ts +0 -2
- package/dist/ui-kit/FormField/Fields/FeedbackTypeField.js +0 -18
- package/dist/ui-kit/FormField/Fields/FeedbackTypeField.js.map +1 -1
- package/dist/ui-kit/FormField/getField.js +0 -2
- package/dist/ui-kit/FormField/getField.js.map +1 -1
- package/dist/ui-kit/FormField/getObjectValidator.js +0 -1
- package/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationForm.fixture.d.ts +1 -0
- package/lib/components/ApplicationForm/ApplicationForm.fixture.mobile.d.ts +2 -0
- package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
- package/lib/components/ApplicationForm/getFormatData.js +1 -2
- package/lib/components/ApplicationForm/getFormatData.js.map +1 -1
- package/lib/components/ApplicationForm/getInitialFormState.d.ts +0 -1
- package/lib/components/ApplicationForm/getInitialFormState.js +1 -2
- package/lib/components/ApplicationForm/getInitialFormState.js.map +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +1 -1
- package/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +0 -1
- package/lib/components/ApplicationLeadForm/getInitialFormState.js +1 -2
- package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/lib/hooks/useLeadFormData.d.ts +4 -1
- package/lib/hooks/useLeadFormData.js +4 -1
- package/lib/hooks/useLeadFormData.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/DesiredMeetingDateField.js +1 -1
- package/lib/ui-kit/FormField/Fields/DesiredMeetingDateField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/FeedbackTypeField.d.ts +0 -2
- package/lib/ui-kit/FormField/Fields/FeedbackTypeField.js +0 -16
- package/lib/ui-kit/FormField/Fields/FeedbackTypeField.js.map +1 -1
- package/lib/ui-kit/FormField/getField.js +0 -2
- package/lib/ui-kit/FormField/getField.js.map +1 -1
- package/lib/ui-kit/FormField/getObjectValidator.js +0 -1
- package/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +7 -29
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
- package/mobile/bundle/components/ApplicationForm/getInitialFormState.d.ts +0 -1
- package/mobile/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +0 -1
- package/mobile/bundle/hooks/useLeadFormData.d.ts +4 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
- package/mobile/dist/components/ApplicationForm/getFormatData.js +1 -2
- package/mobile/dist/components/ApplicationForm/getFormatData.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/getInitialFormState.d.ts +0 -1
- package/mobile/dist/components/ApplicationForm/getInitialFormState.js +0 -1
- package/mobile/dist/components/ApplicationForm/getInitialFormState.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +1 -1
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +0 -1
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js +0 -1
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/mobile/dist/hooks/useLeadFormData.d.ts +4 -1
- package/mobile/dist/hooks/useLeadFormData.js +4 -1
- package/mobile/dist/hooks/useLeadFormData.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/DesiredMeetingDateField.js +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/DesiredMeetingDateField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/FeedbackTypeField.d.ts +0 -2
- package/mobile/dist/ui-kit/FormField/Fields/FeedbackTypeField.js +0 -18
- package/mobile/dist/ui-kit/FormField/Fields/FeedbackTypeField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/getField.js +0 -2
- package/mobile/dist/ui-kit/FormField/getField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/getObjectValidator.js +0 -1
- package/mobile/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
- package/mobile/lib/components/ApplicationForm/getFormatData.js +1 -2
- package/mobile/lib/components/ApplicationForm/getFormatData.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/getInitialFormState.d.ts +0 -1
- package/mobile/lib/components/ApplicationForm/getInitialFormState.js +1 -2
- package/mobile/lib/components/ApplicationForm/getInitialFormState.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +1 -1
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +0 -1
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js +1 -2
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/mobile/lib/hooks/useLeadFormData.d.ts +4 -1
- package/mobile/lib/hooks/useLeadFormData.js +4 -1
- package/mobile/lib/hooks/useLeadFormData.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/DesiredMeetingDateField.js +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/DesiredMeetingDateField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/FeedbackTypeField.d.ts +0 -2
- package/mobile/lib/ui-kit/FormField/Fields/FeedbackTypeField.js +0 -16
- package/mobile/lib/ui-kit/FormField/Fields/FeedbackTypeField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/getField.js +0 -2
- package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/getObjectValidator.js +0 -1
- package/mobile/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationForm.example.json +377 -92
- package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +1 -1
- package/mobile/src/components/ApplicationForm/getFormatData.tsx +0 -2
- package/mobile/src/components/ApplicationForm/getInitialFormState.tsx +0 -3
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +0 -1
- package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +0 -3
- package/mobile/src/hooks/useLeadFormData.ts +10 -3
- package/mobile/src/ui-kit/FormField/Fields/DesiredMeetingDateField.tsx +2 -2
- package/mobile/src/ui-kit/FormField/Fields/FeedbackTypeField.tsx +0 -25
- package/mobile/src/ui-kit/FormField/getField.tsx +0 -2
- package/mobile/src/ui-kit/FormField/getObjectValidator.tsx +0 -1
- package/package.json +1 -1
- package/src/components/ApplicationForm/ApplicationForm.example.json +377 -92
- package/src/components/ApplicationForm/ApplicationForm.fixture.mobile.tsx +89 -50
- package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +37 -49
- package/src/components/ApplicationForm/ApplicationFormContent.ts +1 -1
- package/src/components/ApplicationForm/getFormatData.tsx +0 -2
- package/src/components/ApplicationForm/getInitialFormState.tsx +0 -3
- package/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +0 -1
- package/src/components/ApplicationLeadForm/getInitialFormState.tsx +0 -3
- package/src/hooks/useLeadFormData.ts +10 -3
- package/src/ui-kit/FormField/Fields/DesiredMeetingDateField.tsx +2 -2
- package/src/ui-kit/FormField/Fields/FeedbackTypeField.tsx +0 -25
- package/src/ui-kit/FormField/getField.tsx +0 -2
- package/src/ui-kit/FormField/getObjectValidator.tsx +0 -1
- package/bundle/ui-kit/FormField/Fields/FeedbackTypeField.d.ts +0 -2
- package/mobile/bundle/ui-kit/FormField/Fields/FeedbackTypeField.d.ts +0 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import '../../setup-fixture';
|
|
2
2
|
|
|
3
3
|
import { type LinkProps } from '../../model/LinkProps';
|
|
4
|
+
import { DialogManager } from '../../ui-kit/DialogManager/DialogManager';
|
|
4
5
|
import { PopupManager } from '../../ui-kit/PopupManager/PopupManager';
|
|
5
6
|
import { ApplicationForm } from './ApplicationForm';
|
|
6
7
|
import { type SubmitButtonProps } from './ApplicationFormContent';
|
|
@@ -43,6 +44,7 @@ export default {
|
|
|
43
44
|
link={link}
|
|
44
45
|
/>
|
|
45
46
|
<PopupManager />
|
|
47
|
+
<DialogManager />
|
|
46
48
|
</div>
|
|
47
49
|
),
|
|
48
50
|
acquiring: (
|
|
@@ -83,6 +85,7 @@ export default {
|
|
|
83
85
|
link={linkCorp}
|
|
84
86
|
/>
|
|
85
87
|
<PopupManager />
|
|
88
|
+
<DialogManager />
|
|
86
89
|
</div>
|
|
87
90
|
),
|
|
88
91
|
analytics: (
|
|
@@ -111,6 +114,7 @@ export default {
|
|
|
111
114
|
link={link}
|
|
112
115
|
/>
|
|
113
116
|
<PopupManager />
|
|
117
|
+
<DialogManager />
|
|
114
118
|
</div>
|
|
115
119
|
),
|
|
116
120
|
antiFraud: (
|
|
@@ -143,6 +147,7 @@ export default {
|
|
|
143
147
|
link={link}
|
|
144
148
|
/>
|
|
145
149
|
<PopupManager />
|
|
150
|
+
<DialogManager />
|
|
146
151
|
</div>
|
|
147
152
|
),
|
|
148
153
|
brok: (
|
|
@@ -182,6 +187,7 @@ export default {
|
|
|
182
187
|
}}
|
|
183
188
|
/>
|
|
184
189
|
<PopupManager />
|
|
190
|
+
<DialogManager />
|
|
185
191
|
</div>
|
|
186
192
|
),
|
|
187
193
|
brokAccount: (
|
|
@@ -205,6 +211,7 @@ export default {
|
|
|
205
211
|
link={link}
|
|
206
212
|
/>
|
|
207
213
|
<PopupManager />
|
|
214
|
+
<DialogManager />
|
|
208
215
|
</div>
|
|
209
216
|
),
|
|
210
217
|
businessCard: (
|
|
@@ -232,6 +239,7 @@ export default {
|
|
|
232
239
|
link={linkCorp}
|
|
233
240
|
/>
|
|
234
241
|
<PopupManager />
|
|
242
|
+
<DialogManager />
|
|
235
243
|
</div>
|
|
236
244
|
),
|
|
237
245
|
collection: (
|
|
@@ -271,6 +279,7 @@ export default {
|
|
|
271
279
|
link={linkCorp}
|
|
272
280
|
/>
|
|
273
281
|
<PopupManager />
|
|
282
|
+
<DialogManager />
|
|
274
283
|
</div>
|
|
275
284
|
),
|
|
276
285
|
credit: (
|
|
@@ -319,6 +328,7 @@ export default {
|
|
|
319
328
|
link={linkCorp}
|
|
320
329
|
/>
|
|
321
330
|
<PopupManager />
|
|
331
|
+
<DialogManager />
|
|
322
332
|
</div>
|
|
323
333
|
),
|
|
324
334
|
corruption: (
|
|
@@ -346,6 +356,7 @@ export default {
|
|
|
346
356
|
link={link}
|
|
347
357
|
/>
|
|
348
358
|
<PopupManager />
|
|
359
|
+
<DialogManager />
|
|
349
360
|
</div>
|
|
350
361
|
),
|
|
351
362
|
deposit: (
|
|
@@ -369,6 +380,7 @@ export default {
|
|
|
369
380
|
link={link}
|
|
370
381
|
/>
|
|
371
382
|
<PopupManager />
|
|
383
|
+
<DialogManager />
|
|
372
384
|
</div>
|
|
373
385
|
),
|
|
374
386
|
|
|
@@ -376,31 +388,50 @@ export default {
|
|
|
376
388
|
<div className="container grid grid-cols-12">
|
|
377
389
|
<ApplicationForm
|
|
378
390
|
className="col-span-12"
|
|
379
|
-
title="
|
|
391
|
+
title="Задать вопрос по продуктам и услугам"
|
|
380
392
|
typeForm="FEEDBACK"
|
|
381
393
|
endpoint="lead"
|
|
382
394
|
sections={[
|
|
383
395
|
{
|
|
384
396
|
inputs: [
|
|
385
|
-
{ fieldType: 'common', name: 'feedbackType', required: true },
|
|
386
|
-
{
|
|
387
|
-
fieldType: 'common',
|
|
388
|
-
name: 'serviceDirection',
|
|
389
|
-
condition: {
|
|
390
|
-
name: 'feedbackType',
|
|
391
|
-
values: ['FEEDBACK_QS'],
|
|
392
|
-
},
|
|
393
|
-
},
|
|
394
397
|
{ fieldType: 'common', name: 'region', required: true },
|
|
398
|
+
{ fieldType: 'common', name: 'surname', required: true },
|
|
399
|
+
{ fieldType: 'common', name: 'name', required: true },
|
|
400
|
+
{ fieldType: 'common', name: 'middleName' },
|
|
395
401
|
{
|
|
396
402
|
fieldType: 'common',
|
|
397
|
-
name: '
|
|
403
|
+
name: 'birthday',
|
|
398
404
|
required: true,
|
|
399
|
-
condition: {
|
|
400
|
-
name: 'feedbackType',
|
|
401
|
-
values: ['FEEDBACK_QS'],
|
|
402
|
-
},
|
|
403
405
|
},
|
|
406
|
+
{ fieldType: 'common', name: 'feedbackMethod', required: true },
|
|
407
|
+
{ fieldType: 'common', name: 'phone', required: true },
|
|
408
|
+
{ fieldType: 'common', name: 'email', required: true },
|
|
409
|
+
{ fieldType: 'common', name: 'comment', required: true },
|
|
410
|
+
{ fieldType: 'common', name: 'consentDataProcessing', required: true },
|
|
411
|
+
],
|
|
412
|
+
},
|
|
413
|
+
]}
|
|
414
|
+
button={button}
|
|
415
|
+
link={link}
|
|
416
|
+
/>
|
|
417
|
+
<PopupManager />
|
|
418
|
+
<DialogManager />
|
|
419
|
+
</div>
|
|
420
|
+
),
|
|
421
|
+
|
|
422
|
+
feedbackQs: (
|
|
423
|
+
<div className="container grid grid-cols-12">
|
|
424
|
+
<ApplicationForm
|
|
425
|
+
className="col-span-12"
|
|
426
|
+
title="Качество обслуживания"
|
|
427
|
+
typeForm="FEEDBACK_QS"
|
|
428
|
+
endpoint="lead"
|
|
429
|
+
sections={[
|
|
430
|
+
{
|
|
431
|
+
inputs: [
|
|
432
|
+
{ fieldType: 'common', name: 'serviceDirection' },
|
|
433
|
+
{ fieldType: 'common', name: 'region', required: true },
|
|
434
|
+
{ fieldType: 'common', name: 'addressBranch', required: true },
|
|
404
435
|
{ fieldType: 'common', name: 'surname', required: true },
|
|
405
436
|
{ fieldType: 'common', name: 'name', required: true },
|
|
406
437
|
{ fieldType: 'common', name: 'middleName' },
|
|
@@ -422,43 +453,12 @@ export default {
|
|
|
422
453
|
values: ['Юридическое лицо / ИП'],
|
|
423
454
|
},
|
|
424
455
|
},
|
|
425
|
-
{
|
|
426
|
-
fieldType: 'common',
|
|
427
|
-
name: 'birthday',
|
|
428
|
-
required: true,
|
|
429
|
-
condition: {
|
|
430
|
-
name: 'feedbackType',
|
|
431
|
-
values: ['FEEDBACK'],
|
|
432
|
-
},
|
|
433
|
-
},
|
|
434
456
|
{ fieldType: 'common', name: 'feedbackMethod', required: true },
|
|
435
457
|
{ fieldType: 'common', name: 'phone', required: true },
|
|
436
|
-
{
|
|
437
|
-
fieldType: 'common',
|
|
438
|
-
name: 'secondaryPhone',
|
|
439
|
-
required: true,
|
|
440
|
-
condition: {
|
|
441
|
-
name: 'feedbackType',
|
|
442
|
-
values: ['FEEDBACK_QS'],
|
|
443
|
-
},
|
|
444
|
-
},
|
|
458
|
+
{ fieldType: 'common', name: 'secondaryPhone', required: true },
|
|
445
459
|
{ fieldType: 'common', name: 'email', required: true },
|
|
446
|
-
{
|
|
447
|
-
|
|
448
|
-
name: 'bankEmpolee',
|
|
449
|
-
condition: {
|
|
450
|
-
name: 'feedbackType',
|
|
451
|
-
values: ['FEEDBACK_QS'],
|
|
452
|
-
},
|
|
453
|
-
},
|
|
454
|
-
{
|
|
455
|
-
fieldType: 'common',
|
|
456
|
-
name: 'applicationDate',
|
|
457
|
-
condition: {
|
|
458
|
-
name: 'feedbackType',
|
|
459
|
-
values: ['FEEDBACK_QS'],
|
|
460
|
-
},
|
|
461
|
-
},
|
|
460
|
+
{ fieldType: 'common', name: 'bankEmpolee' },
|
|
461
|
+
{ fieldType: 'common', name: 'applicationDate' },
|
|
462
462
|
{ fieldType: 'common', name: 'comment', required: true },
|
|
463
463
|
{ fieldType: 'common', name: 'consentDataProcessing', required: true },
|
|
464
464
|
],
|
|
@@ -468,6 +468,7 @@ export default {
|
|
|
468
468
|
link={link}
|
|
469
469
|
/>
|
|
470
470
|
<PopupManager />
|
|
471
|
+
<DialogManager />
|
|
471
472
|
</div>
|
|
472
473
|
),
|
|
473
474
|
|
|
@@ -500,6 +501,7 @@ export default {
|
|
|
500
501
|
link={link}
|
|
501
502
|
/>
|
|
502
503
|
<PopupManager />
|
|
504
|
+
<DialogManager />
|
|
503
505
|
</div>
|
|
504
506
|
),
|
|
505
507
|
|
|
@@ -524,6 +526,7 @@ export default {
|
|
|
524
526
|
link={link}
|
|
525
527
|
/>
|
|
526
528
|
<PopupManager />
|
|
529
|
+
<DialogManager />
|
|
527
530
|
</div>
|
|
528
531
|
),
|
|
529
532
|
ultraPremium: (
|
|
@@ -561,6 +564,7 @@ export default {
|
|
|
561
564
|
link={link}
|
|
562
565
|
/>
|
|
563
566
|
<PopupManager />
|
|
567
|
+
<DialogManager />
|
|
564
568
|
</div>
|
|
565
569
|
),
|
|
566
570
|
ved: (
|
|
@@ -600,7 +604,7 @@ export default {
|
|
|
600
604
|
required: true,
|
|
601
605
|
condition: {
|
|
602
606
|
name: 'vedTypes',
|
|
603
|
-
values: ['currencyControl'],
|
|
607
|
+
values: ['currencyControl', 'documentOperations'],
|
|
604
608
|
},
|
|
605
609
|
},
|
|
606
610
|
{
|
|
@@ -633,6 +637,41 @@ export default {
|
|
|
633
637
|
isContacts={true}
|
|
634
638
|
/>
|
|
635
639
|
<PopupManager />
|
|
640
|
+
<DialogManager />
|
|
641
|
+
</div>
|
|
642
|
+
),
|
|
643
|
+
outservice: (
|
|
644
|
+
<div className="container grid grid-cols-12">
|
|
645
|
+
<ApplicationForm
|
|
646
|
+
className="col-span-12"
|
|
647
|
+
title="Заявка на консультацию OUTSEVICE"
|
|
648
|
+
typeForm="OUTSERVICE"
|
|
649
|
+
endpoint="lead"
|
|
650
|
+
sections={[
|
|
651
|
+
{
|
|
652
|
+
inputs: [
|
|
653
|
+
{ fieldType: 'common', name: 'product', required: true },
|
|
654
|
+
{ fieldType: 'common', name: 'region', required: true },
|
|
655
|
+
{ fieldType: 'common', name: 'localities', required: true },
|
|
656
|
+
{ fieldType: 'common', name: 'fullName', required: true },
|
|
657
|
+
],
|
|
658
|
+
},
|
|
659
|
+
{
|
|
660
|
+
columns: 2,
|
|
661
|
+
inputs: [
|
|
662
|
+
{ fieldType: 'common', name: 'birthday', required: true },
|
|
663
|
+
{ fieldType: 'common', name: 'phone', required: true },
|
|
664
|
+
{ fieldType: 'common', name: 'email' },
|
|
665
|
+
{ fieldType: 'common', name: 'desiredMeetingDate' },
|
|
666
|
+
],
|
|
667
|
+
},
|
|
668
|
+
{ inputs: [{ fieldType: 'common', name: 'consentDataProcessing', required: true }] },
|
|
669
|
+
]}
|
|
670
|
+
button={button}
|
|
671
|
+
link={link}
|
|
672
|
+
/>
|
|
673
|
+
<PopupManager />
|
|
674
|
+
<DialogManager />
|
|
636
675
|
</div>
|
|
637
676
|
),
|
|
638
677
|
};
|
|
@@ -388,31 +388,50 @@ export default {
|
|
|
388
388
|
<div className="container grid grid-cols-12">
|
|
389
389
|
<ApplicationForm
|
|
390
390
|
className="col-span-12"
|
|
391
|
-
title="
|
|
391
|
+
title="Задать вопрос по продуктам и услугам"
|
|
392
392
|
typeForm="FEEDBACK"
|
|
393
393
|
endpoint="lead"
|
|
394
394
|
sections={[
|
|
395
395
|
{
|
|
396
396
|
inputs: [
|
|
397
|
-
{ fieldType: 'common', name: 'feedbackType', required: true },
|
|
398
|
-
{
|
|
399
|
-
fieldType: 'common',
|
|
400
|
-
name: 'serviceDirection',
|
|
401
|
-
condition: {
|
|
402
|
-
name: 'feedbackType',
|
|
403
|
-
values: ['FEEDBACK_QS'],
|
|
404
|
-
},
|
|
405
|
-
},
|
|
406
397
|
{ fieldType: 'common', name: 'region', required: true },
|
|
398
|
+
{ fieldType: 'common', name: 'surname', required: true },
|
|
399
|
+
{ fieldType: 'common', name: 'name', required: true },
|
|
400
|
+
{ fieldType: 'common', name: 'middleName' },
|
|
407
401
|
{
|
|
408
402
|
fieldType: 'common',
|
|
409
|
-
name: '
|
|
403
|
+
name: 'birthday',
|
|
410
404
|
required: true,
|
|
411
|
-
condition: {
|
|
412
|
-
name: 'feedbackType',
|
|
413
|
-
values: ['FEEDBACK_QS'],
|
|
414
|
-
},
|
|
415
405
|
},
|
|
406
|
+
{ fieldType: 'common', name: 'feedbackMethod', required: true },
|
|
407
|
+
{ fieldType: 'common', name: 'phone', required: true },
|
|
408
|
+
{ fieldType: 'common', name: 'email', required: true },
|
|
409
|
+
{ fieldType: 'common', name: 'comment', required: true },
|
|
410
|
+
{ fieldType: 'common', name: 'consentDataProcessing', required: true },
|
|
411
|
+
],
|
|
412
|
+
},
|
|
413
|
+
]}
|
|
414
|
+
button={button}
|
|
415
|
+
link={link}
|
|
416
|
+
/>
|
|
417
|
+
<PopupManager />
|
|
418
|
+
<DialogManager />
|
|
419
|
+
</div>
|
|
420
|
+
),
|
|
421
|
+
|
|
422
|
+
feedbackQs: (
|
|
423
|
+
<div className="container grid grid-cols-12">
|
|
424
|
+
<ApplicationForm
|
|
425
|
+
className="col-span-12"
|
|
426
|
+
title="Качество обслуживания"
|
|
427
|
+
typeForm="FEEDBACK_QS"
|
|
428
|
+
endpoint="lead"
|
|
429
|
+
sections={[
|
|
430
|
+
{
|
|
431
|
+
inputs: [
|
|
432
|
+
{ fieldType: 'common', name: 'serviceDirection' },
|
|
433
|
+
{ fieldType: 'common', name: 'region', required: true },
|
|
434
|
+
{ fieldType: 'common', name: 'addressBranch', required: true },
|
|
416
435
|
{ fieldType: 'common', name: 'surname', required: true },
|
|
417
436
|
{ fieldType: 'common', name: 'name', required: true },
|
|
418
437
|
{ fieldType: 'common', name: 'middleName' },
|
|
@@ -434,43 +453,12 @@ export default {
|
|
|
434
453
|
values: ['Юридическое лицо / ИП'],
|
|
435
454
|
},
|
|
436
455
|
},
|
|
437
|
-
{
|
|
438
|
-
fieldType: 'common',
|
|
439
|
-
name: 'birthday',
|
|
440
|
-
required: true,
|
|
441
|
-
condition: {
|
|
442
|
-
name: 'feedbackType',
|
|
443
|
-
values: ['FEEDBACK'],
|
|
444
|
-
},
|
|
445
|
-
},
|
|
446
456
|
{ fieldType: 'common', name: 'feedbackMethod', required: true },
|
|
447
457
|
{ fieldType: 'common', name: 'phone', required: true },
|
|
448
|
-
{
|
|
449
|
-
fieldType: 'common',
|
|
450
|
-
name: 'secondaryPhone',
|
|
451
|
-
required: true,
|
|
452
|
-
condition: {
|
|
453
|
-
name: 'feedbackType',
|
|
454
|
-
values: ['FEEDBACK_QS'],
|
|
455
|
-
},
|
|
456
|
-
},
|
|
458
|
+
{ fieldType: 'common', name: 'secondaryPhone', required: true },
|
|
457
459
|
{ fieldType: 'common', name: 'email', required: true },
|
|
458
|
-
{
|
|
459
|
-
|
|
460
|
-
name: 'bankEmpolee',
|
|
461
|
-
condition: {
|
|
462
|
-
name: 'feedbackType',
|
|
463
|
-
values: ['FEEDBACK_QS'],
|
|
464
|
-
},
|
|
465
|
-
},
|
|
466
|
-
{
|
|
467
|
-
fieldType: 'common',
|
|
468
|
-
name: 'applicationDate',
|
|
469
|
-
condition: {
|
|
470
|
-
name: 'feedbackType',
|
|
471
|
-
values: ['FEEDBACK_QS'],
|
|
472
|
-
},
|
|
473
|
-
},
|
|
460
|
+
{ fieldType: 'common', name: 'bankEmpolee' },
|
|
461
|
+
{ fieldType: 'common', name: 'applicationDate' },
|
|
474
462
|
{ fieldType: 'common', name: 'comment', required: true },
|
|
475
463
|
{ fieldType: 'common', name: 'consentDataProcessing', required: true },
|
|
476
464
|
],
|
|
@@ -47,7 +47,6 @@ export type NameFieldDef =
|
|
|
47
47
|
| 'posTerminal'
|
|
48
48
|
| 'serviceDirection'
|
|
49
49
|
| 'serviceType'
|
|
50
|
-
| 'feedbackType'
|
|
51
50
|
| 'feedbackMethod'
|
|
52
51
|
| 'bankEmpolee'
|
|
53
52
|
| 'applicationDate'
|
|
@@ -143,6 +142,7 @@ type TypeFormFieldDef =
|
|
|
143
142
|
| 'ULTRASERVICE'
|
|
144
143
|
| 'PREMIUMSERVICE'
|
|
145
144
|
| 'FEEDBACK'
|
|
145
|
+
| 'FEEDBACK_QS'
|
|
146
146
|
| 'OUTSERVICE';
|
|
147
147
|
|
|
148
148
|
/**
|
|
@@ -14,7 +14,6 @@ export const getFormatData = (data: FormState): Record<string, any> => {
|
|
|
14
14
|
term,
|
|
15
15
|
annualRevenue,
|
|
16
16
|
serviceType,
|
|
17
|
-
feedbackType,
|
|
18
17
|
vedTypes,
|
|
19
18
|
region,
|
|
20
19
|
...usedData
|
|
@@ -26,7 +25,6 @@ export const getFormatData = (data: FormState): Record<string, any> => {
|
|
|
26
25
|
...getRegion(region),
|
|
27
26
|
...(partnerComments ? { partnerComments } : {}),
|
|
28
27
|
...(serviceType ? { typeForm: serviceType } : {}),
|
|
29
|
-
...(feedbackType ? { typeForm: feedbackType } : {}),
|
|
30
28
|
};
|
|
31
29
|
|
|
32
30
|
return Object.fromEntries(
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FEEDBACK_METHOD,
|
|
3
|
-
FEEDBACK_TYPES,
|
|
4
3
|
SERVICE_DIRECTIONS,
|
|
5
4
|
SERVICE_TYPES,
|
|
6
5
|
} from '../../ui-kit/FormField/constants';
|
|
@@ -20,7 +19,6 @@ export interface FormState {
|
|
|
20
19
|
email?: string;
|
|
21
20
|
acquiringType?: Option;
|
|
22
21
|
serviceType?: Option;
|
|
23
|
-
feedbackType?: Option;
|
|
24
22
|
vedTypes?: string;
|
|
25
23
|
region?: Option;
|
|
26
24
|
onlineCheckout?: boolean;
|
|
@@ -47,7 +45,6 @@ const initialFormState = {
|
|
|
47
45
|
amount: 100000,
|
|
48
46
|
acquiringType: ACQUIRING_TYPES[0],
|
|
49
47
|
serviceType: SERVICE_TYPES[0],
|
|
50
|
-
feedbackType: FEEDBACK_TYPES[0],
|
|
51
48
|
feedbackMethod: FEEDBACK_METHOD[0],
|
|
52
49
|
serviceDirection: SERVICE_DIRECTIONS[0],
|
|
53
50
|
vedTypes: VED_TYPES[0],
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FEEDBACK_METHOD,
|
|
3
|
-
FEEDBACK_TYPES,
|
|
4
3
|
SERVICE_DIRECTIONS,
|
|
5
4
|
SERVICE_TYPES,
|
|
6
5
|
} from '../../ui-kit/FormField/constants';
|
|
@@ -29,7 +28,6 @@ export interface FormState {
|
|
|
29
28
|
email?: string;
|
|
30
29
|
acquiringType?: Option;
|
|
31
30
|
serviceType?: Option;
|
|
32
|
-
feedbackType?: Option;
|
|
33
31
|
vedTypes?: string;
|
|
34
32
|
region?: Option;
|
|
35
33
|
onlineCheckout?: boolean;
|
|
@@ -85,7 +83,6 @@ const initialFormState = {
|
|
|
85
83
|
amount: 100000,
|
|
86
84
|
acquiringType: ACQUIRING_TYPES[0],
|
|
87
85
|
serviceType: SERVICE_TYPES[0],
|
|
88
|
-
feedbackType: FEEDBACK_TYPES[0],
|
|
89
86
|
feedbackMethod: FEEDBACK_METHOD[0],
|
|
90
87
|
serviceDirection: SERVICE_DIRECTIONS[0],
|
|
91
88
|
vedTypes: VED_TYPES[0],
|
|
@@ -2,17 +2,24 @@ import { useAsyncData } from '@redneckz/uni-jsx/lib/hooks/useAsyncData';
|
|
|
2
2
|
import { type LeadProps } from '../ui-kit/FormField/SelectField';
|
|
3
3
|
import { fetchJSON } from '../utils/fetchJSON';
|
|
4
4
|
|
|
5
|
+
type ErrorProps = {
|
|
6
|
+
errorMessage?: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
5
9
|
export const useLeadFormData = (typeField: string) => {
|
|
6
10
|
const { data, error } = useAsyncData(
|
|
7
11
|
`https://portal-ui-cc.cprb.dev.rshbdev.ru/light-api-cash/v1/dictionary?dictionaryType=${typeField}`,
|
|
8
12
|
fetchData,
|
|
9
13
|
);
|
|
14
|
+
if (data && 'errorMessage' in data) {
|
|
15
|
+
return { error };
|
|
16
|
+
}
|
|
10
17
|
|
|
11
|
-
return { data, error };
|
|
18
|
+
return { data: data as LeadProps[], error };
|
|
12
19
|
};
|
|
13
20
|
|
|
14
|
-
const fetchData = async (url: string): Promise<LeadProps[]> => {
|
|
15
|
-
const result = await fetchJSON<LeadProps[]>(url, { method: 'POST' });
|
|
21
|
+
const fetchData = async (url: string): Promise<LeadProps[] | ErrorProps> => {
|
|
22
|
+
const result = await fetchJSON<LeadProps[] | ErrorProps>(url, { method: 'POST' });
|
|
16
23
|
|
|
17
24
|
return result || [];
|
|
18
25
|
};
|
|
@@ -6,7 +6,7 @@ import { getValidation } from '../getValidation';
|
|
|
6
6
|
|
|
7
7
|
export const DesiredMeetingDateField = JSX<CustomFieldProps>(({ field, input }) => (
|
|
8
8
|
<DatePickerControl
|
|
9
|
-
label="
|
|
10
|
-
{...getValidation(field('
|
|
9
|
+
label="Желаемая дата встречи"
|
|
10
|
+
{...getValidation(field('desiredMeetingDate'), validatorObj.meetingDay, input?.required)}
|
|
11
11
|
/>
|
|
12
12
|
));
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { useEffect } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
-
import { SelectControl } from '../../Select/SelectControl';
|
|
4
|
-
import { FEEDBACK_TYPES, SERVICE_DIRECTIONS } from '../constants';
|
|
5
|
-
import { type CustomFieldProps } from '../CustomFieldProps';
|
|
6
|
-
import { validatorObj } from '../getObjectValidator';
|
|
7
|
-
import { getValidation } from '../getValidation';
|
|
8
|
-
|
|
9
|
-
export const FeedbackTypeField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
10
|
-
const feedbackType = field('feedbackType');
|
|
11
|
-
useEffect(() => {
|
|
12
|
-
if (feedbackType?.value?.key === 'FEEDBACK') {
|
|
13
|
-
field('serviceDirection')?.onChange?.(SERVICE_DIRECTIONS[0]);
|
|
14
|
-
}
|
|
15
|
-
}, [feedbackType?.value]);
|
|
16
|
-
|
|
17
|
-
return (
|
|
18
|
-
<SelectControl
|
|
19
|
-
label="Тема"
|
|
20
|
-
placeholder="Выберите тему"
|
|
21
|
-
options={FEEDBACK_TYPES}
|
|
22
|
-
{...getValidation(feedbackType, validatorObj.feedbackType, input?.required)}
|
|
23
|
-
/>
|
|
24
|
-
);
|
|
25
|
-
});
|
|
@@ -27,7 +27,6 @@ import { EmployerOrganizationField } from './Fields/EmployerOrganizationField';
|
|
|
27
27
|
import { EmploymentField } from './Fields/EmploymentField';
|
|
28
28
|
import { Experience5YearsField } from './Fields/Experience5YearsField';
|
|
29
29
|
import { FeedbackMethodField } from './Fields/FeedbackMethodField';
|
|
30
|
-
import { FeedbackTypeField } from './Fields/FeedbackTypeField';
|
|
31
30
|
import { FullAddressField } from './Fields/FullAddressField';
|
|
32
31
|
import { FullNameField } from './Fields/FullNameField';
|
|
33
32
|
import { GeneralSeniorityField } from './Fields/GeneralSeniorityField';
|
|
@@ -101,7 +100,6 @@ export const getField =
|
|
|
101
100
|
amount: <AmountField field={field} />,
|
|
102
101
|
annualRevenue: <AnnualRevenueField field={field} input={input} />,
|
|
103
102
|
vedTypes: <VedField field={field} />,
|
|
104
|
-
feedbackType: <FeedbackTypeField field={field} input={input} />,
|
|
105
103
|
feedbackMethod: <FeedbackMethodField field={field} input={input} />,
|
|
106
104
|
serviceDirection: <ServiceDirectionField field={field} input={input} />,
|
|
107
105
|
bankEmpolee: <BankEmpoleeField field={field} />,
|
|
@@ -42,7 +42,6 @@ export const validatorObj: Record<string, Validator> = {
|
|
|
42
42
|
collectionCount: defaultValidator,
|
|
43
43
|
comment: defaultValidator,
|
|
44
44
|
acquiringType: defaultSelectValidator,
|
|
45
|
-
feedbackType: defaultSelectValidator,
|
|
46
45
|
feedbackMethod: defaultSelectValidator,
|
|
47
46
|
serviceType: defaultSelectValidator,
|
|
48
47
|
serviceDirection: defaultSelectValidator,
|