@redneckz/wildless-cms-uni-blocks 0.14.756 → 0.14.758

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 (144) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +48 -4
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/ApplicationForm/getInitialFormState.d.ts +2 -0
  5. package/bundle/model/FormTypeFieldDef.d.ts +1 -1
  6. package/bundle/ui-kit/FormField/Fields/ApplierTypeField.d.ts +2 -0
  7. package/bundle/ui-kit/FormField/Fields/RepresentativeNameField.d.ts +2 -0
  8. package/bundle/ui-kit/FormField/Fields/SituationDescriptionField.d.ts +2 -0
  9. package/bundle/ui-kit/FormField/Fields/SufferedFromField.d.ts +2 -0
  10. package/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  11. package/dist/components/ApplicationForm/getFormatData.js +5 -1
  12. package/dist/components/ApplicationForm/getFormatData.js.map +1 -1
  13. package/dist/components/ApplicationForm/getInitialFormState.d.ts +2 -0
  14. package/dist/components/ApplicationForm/getInitialFormState.js.map +1 -1
  15. package/dist/model/FormTypeFieldDef.d.ts +1 -1
  16. package/dist/ui-kit/FormField/Fields/ApplierTypeField.d.ts +2 -0
  17. package/dist/ui-kit/FormField/Fields/ApplierTypeField.js +17 -0
  18. package/dist/ui-kit/FormField/Fields/ApplierTypeField.js.map +1 -0
  19. package/dist/ui-kit/FormField/Fields/BirthdayField.js +1 -1
  20. package/dist/ui-kit/FormField/Fields/BirthdayField.js.map +1 -1
  21. package/dist/ui-kit/FormField/Fields/RegionField.js +1 -1
  22. package/dist/ui-kit/FormField/Fields/RegionField.js.map +1 -1
  23. package/dist/ui-kit/FormField/Fields/RepresentativeNameField.d.ts +2 -0
  24. package/dist/ui-kit/FormField/Fields/RepresentativeNameField.js +7 -0
  25. package/dist/ui-kit/FormField/Fields/RepresentativeNameField.js.map +1 -0
  26. package/dist/ui-kit/FormField/Fields/SituationDescriptionField.d.ts +2 -0
  27. package/dist/ui-kit/FormField/Fields/SituationDescriptionField.js +7 -0
  28. package/dist/ui-kit/FormField/Fields/SituationDescriptionField.js.map +1 -0
  29. package/dist/ui-kit/FormField/Fields/SufferedFromField.d.ts +2 -0
  30. package/dist/ui-kit/FormField/Fields/SufferedFromField.js +25 -0
  31. package/dist/ui-kit/FormField/Fields/SufferedFromField.js.map +1 -0
  32. package/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  33. package/dist/ui-kit/FormField/getField.js +8 -0
  34. package/dist/ui-kit/FormField/getField.js.map +1 -1
  35. package/lib/components/ApplicationForm/ApplicationForm.fixture.d.ts +1 -0
  36. package/lib/components/ApplicationForm/ApplicationForm.fixture.mobile.d.ts +2 -0
  37. package/lib/components/ApplicationForm/getFormatData.js +5 -1
  38. package/lib/components/ApplicationForm/getFormatData.js.map +1 -1
  39. package/lib/components/ApplicationForm/getInitialFormState.d.ts +2 -0
  40. package/lib/components/ApplicationForm/getInitialFormState.js.map +1 -1
  41. package/lib/model/FormTypeFieldDef.d.ts +1 -1
  42. package/lib/ui-kit/FormField/Fields/ApplierTypeField.d.ts +2 -0
  43. package/lib/ui-kit/FormField/Fields/ApplierTypeField.js +15 -0
  44. package/lib/ui-kit/FormField/Fields/ApplierTypeField.js.map +1 -0
  45. package/lib/ui-kit/FormField/Fields/BirthdayField.js +1 -1
  46. package/lib/ui-kit/FormField/Fields/BirthdayField.js.map +1 -1
  47. package/lib/ui-kit/FormField/Fields/RegionField.js +1 -1
  48. package/lib/ui-kit/FormField/Fields/RegionField.js.map +1 -1
  49. package/lib/ui-kit/FormField/Fields/RepresentativeNameField.d.ts +2 -0
  50. package/lib/ui-kit/FormField/Fields/RepresentativeNameField.js +5 -0
  51. package/lib/ui-kit/FormField/Fields/RepresentativeNameField.js.map +1 -0
  52. package/lib/ui-kit/FormField/Fields/SituationDescriptionField.d.ts +2 -0
  53. package/lib/ui-kit/FormField/Fields/SituationDescriptionField.js +5 -0
  54. package/lib/ui-kit/FormField/Fields/SituationDescriptionField.js.map +1 -0
  55. package/lib/ui-kit/FormField/Fields/SufferedFromField.d.ts +2 -0
  56. package/lib/ui-kit/FormField/Fields/SufferedFromField.js +23 -0
  57. package/lib/ui-kit/FormField/Fields/SufferedFromField.js.map +1 -0
  58. package/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  59. package/lib/ui-kit/FormField/getField.js +8 -0
  60. package/lib/ui-kit/FormField/getField.js.map +1 -1
  61. package/mobile/bundle/bundle.umd.js +48 -4
  62. package/mobile/bundle/bundle.umd.min.js +1 -1
  63. package/mobile/bundle/components/ApplicationForm/getInitialFormState.d.ts +2 -0
  64. package/mobile/bundle/model/FormTypeFieldDef.d.ts +1 -1
  65. package/mobile/bundle/ui-kit/FormField/Fields/ApplierTypeField.d.ts +2 -0
  66. package/mobile/bundle/ui-kit/FormField/Fields/RepresentativeNameField.d.ts +2 -0
  67. package/mobile/bundle/ui-kit/FormField/Fields/SituationDescriptionField.d.ts +2 -0
  68. package/mobile/bundle/ui-kit/FormField/Fields/SufferedFromField.d.ts +2 -0
  69. package/mobile/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  70. package/mobile/dist/components/ApplicationForm/getFormatData.js +5 -1
  71. package/mobile/dist/components/ApplicationForm/getFormatData.js.map +1 -1
  72. package/mobile/dist/components/ApplicationForm/getInitialFormState.d.ts +2 -0
  73. package/mobile/dist/components/ApplicationForm/getInitialFormState.js.map +1 -1
  74. package/mobile/dist/model/FormTypeFieldDef.d.ts +1 -1
  75. package/mobile/dist/ui-kit/FormField/Fields/ApplierTypeField.d.ts +2 -0
  76. package/mobile/dist/ui-kit/FormField/Fields/ApplierTypeField.js +17 -0
  77. package/mobile/dist/ui-kit/FormField/Fields/ApplierTypeField.js.map +1 -0
  78. package/mobile/dist/ui-kit/FormField/Fields/BirthdayField.js +1 -1
  79. package/mobile/dist/ui-kit/FormField/Fields/BirthdayField.js.map +1 -1
  80. package/mobile/dist/ui-kit/FormField/Fields/RegionField.js +1 -1
  81. package/mobile/dist/ui-kit/FormField/Fields/RegionField.js.map +1 -1
  82. package/mobile/dist/ui-kit/FormField/Fields/RepresentativeNameField.d.ts +2 -0
  83. package/mobile/dist/ui-kit/FormField/Fields/RepresentativeNameField.js +7 -0
  84. package/mobile/dist/ui-kit/FormField/Fields/RepresentativeNameField.js.map +1 -0
  85. package/mobile/dist/ui-kit/FormField/Fields/SituationDescriptionField.d.ts +2 -0
  86. package/mobile/dist/ui-kit/FormField/Fields/SituationDescriptionField.js +7 -0
  87. package/mobile/dist/ui-kit/FormField/Fields/SituationDescriptionField.js.map +1 -0
  88. package/mobile/dist/ui-kit/FormField/Fields/SufferedFromField.d.ts +2 -0
  89. package/mobile/dist/ui-kit/FormField/Fields/SufferedFromField.js +25 -0
  90. package/mobile/dist/ui-kit/FormField/Fields/SufferedFromField.js.map +1 -0
  91. package/mobile/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  92. package/mobile/dist/ui-kit/FormField/getField.js +8 -0
  93. package/mobile/dist/ui-kit/FormField/getField.js.map +1 -1
  94. package/mobile/lib/components/ApplicationForm/getFormatData.js +5 -1
  95. package/mobile/lib/components/ApplicationForm/getFormatData.js.map +1 -1
  96. package/mobile/lib/components/ApplicationForm/getInitialFormState.d.ts +2 -0
  97. package/mobile/lib/components/ApplicationForm/getInitialFormState.js.map +1 -1
  98. package/mobile/lib/model/FormTypeFieldDef.d.ts +1 -1
  99. package/mobile/lib/ui-kit/FormField/Fields/ApplierTypeField.d.ts +2 -0
  100. package/mobile/lib/ui-kit/FormField/Fields/ApplierTypeField.js +15 -0
  101. package/mobile/lib/ui-kit/FormField/Fields/ApplierTypeField.js.map +1 -0
  102. package/mobile/lib/ui-kit/FormField/Fields/BirthdayField.js +1 -1
  103. package/mobile/lib/ui-kit/FormField/Fields/BirthdayField.js.map +1 -1
  104. package/mobile/lib/ui-kit/FormField/Fields/RegionField.js +1 -1
  105. package/mobile/lib/ui-kit/FormField/Fields/RegionField.js.map +1 -1
  106. package/mobile/lib/ui-kit/FormField/Fields/RepresentativeNameField.d.ts +2 -0
  107. package/mobile/lib/ui-kit/FormField/Fields/RepresentativeNameField.js +5 -0
  108. package/mobile/lib/ui-kit/FormField/Fields/RepresentativeNameField.js.map +1 -0
  109. package/mobile/lib/ui-kit/FormField/Fields/SituationDescriptionField.d.ts +2 -0
  110. package/mobile/lib/ui-kit/FormField/Fields/SituationDescriptionField.js +5 -0
  111. package/mobile/lib/ui-kit/FormField/Fields/SituationDescriptionField.js.map +1 -0
  112. package/mobile/lib/ui-kit/FormField/Fields/SufferedFromField.d.ts +2 -0
  113. package/mobile/lib/ui-kit/FormField/Fields/SufferedFromField.js +23 -0
  114. package/mobile/lib/ui-kit/FormField/Fields/SufferedFromField.js.map +1 -0
  115. package/mobile/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  116. package/mobile/lib/ui-kit/FormField/getField.js +8 -0
  117. package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
  118. package/mobile/src/components/ApplicationForm/ApplicationForm.example.json +73 -0
  119. package/mobile/src/components/ApplicationForm/getFormatData.tsx +8 -0
  120. package/mobile/src/components/ApplicationForm/getInitialFormState.tsx +2 -0
  121. package/mobile/src/model/FormTypeFieldDef.ts +2 -1
  122. package/mobile/src/ui-kit/FormField/Fields/ApplierTypeField.tsx +24 -0
  123. package/mobile/src/ui-kit/FormField/Fields/BirthdayField.tsx +1 -1
  124. package/mobile/src/ui-kit/FormField/Fields/RegionField.tsx +1 -1
  125. package/mobile/src/ui-kit/FormField/Fields/RepresentativeNameField.tsx +7 -0
  126. package/mobile/src/ui-kit/FormField/Fields/SituationDescriptionField.tsx +7 -0
  127. package/mobile/src/ui-kit/FormField/Fields/SufferedFromField.tsx +32 -0
  128. package/mobile/src/ui-kit/FormField/NameFieldDef.ts +5 -0
  129. package/mobile/src/ui-kit/FormField/getField.tsx +8 -1
  130. package/package.json +1 -1
  131. package/src/components/ApplicationForm/ApplicationForm.example.json +73 -0
  132. package/src/components/ApplicationForm/ApplicationForm.fixture.mobile.tsx +56 -0
  133. package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +30 -0
  134. package/src/components/ApplicationForm/getFormatData.tsx +8 -0
  135. package/src/components/ApplicationForm/getInitialFormState.tsx +2 -0
  136. package/src/model/FormTypeFieldDef.ts +2 -1
  137. package/src/ui-kit/FormField/Fields/ApplierTypeField.tsx +24 -0
  138. package/src/ui-kit/FormField/Fields/BirthdayField.tsx +1 -1
  139. package/src/ui-kit/FormField/Fields/RegionField.tsx +1 -1
  140. package/src/ui-kit/FormField/Fields/RepresentativeNameField.tsx +7 -0
  141. package/src/ui-kit/FormField/Fields/SituationDescriptionField.tsx +7 -0
  142. package/src/ui-kit/FormField/Fields/SufferedFromField.tsx +32 -0
  143. package/src/ui-kit/FormField/NameFieldDef.ts +5 -0
  144. package/src/ui-kit/FormField/getField.tsx +8 -1
@@ -1093,5 +1093,78 @@
1093
1093
  }
1094
1094
  }
1095
1095
  }
1096
+ ],
1097
+ [
1098
+ "Меры поддержки",
1099
+ {
1100
+ "content": {
1101
+ "version": "primary",
1102
+ "padding": "",
1103
+ "title": "Меры поддержки",
1104
+ "typeForm": "SUPPORT",
1105
+ "endpoint": "lead",
1106
+ "sections": [
1107
+ {
1108
+ "inputs": [
1109
+ {
1110
+ "name": "fullName",
1111
+ "required": true,
1112
+ "label": "ФИО клиента"
1113
+ },
1114
+ {
1115
+ "name": "birthday",
1116
+ "required": true,
1117
+ "label": "Дата рождения клиента"
1118
+ },
1119
+ {
1120
+ "name": "applierType",
1121
+ "required": true
1122
+ },
1123
+ {
1124
+ "name": "representativeName"
1125
+ },
1126
+ {
1127
+ "name": "sufferedFrom",
1128
+ "required": true
1129
+ },
1130
+ {
1131
+ "name": "region",
1132
+ "required": true,
1133
+ "label": "Регион обслуживания кредита"
1134
+ },
1135
+ {
1136
+ "name": "situationDescription",
1137
+ "required": true
1138
+ },
1139
+ {
1140
+ "name": "phone",
1141
+ "required": true
1142
+ },
1143
+ {
1144
+ "name": "email",
1145
+ "required": true
1146
+ }
1147
+ ]
1148
+ },
1149
+ {
1150
+ "inputs": [
1151
+ {
1152
+ "name": "consentDataProcessing",
1153
+ "required": true
1154
+ }
1155
+ ]
1156
+ }
1157
+ ],
1158
+ "button": {
1159
+ "text": "Отправить заявку",
1160
+ "version": "primary"
1161
+ },
1162
+ "link": {
1163
+ "text": "Согласен на обработку персональных данных",
1164
+ "href": "/privacy-policy",
1165
+ "target": "_blank"
1166
+ }
1167
+ }
1168
+ }
1096
1169
  ]
1097
1170
  ]
@@ -17,6 +17,8 @@ export const getFormatData = (data: FormState): Record<string, any> => {
17
17
  vedTypes,
18
18
  region,
19
19
  inn,
20
+ sufferedFrom,
21
+ situationDescription,
20
22
  ...usedData
21
23
  } = data;
22
24
  const partnerComments = acquiringType || annualRevenue ? getPartnerComments(data) : null;
@@ -27,6 +29,7 @@ export const getFormatData = (data: FormState): Record<string, any> => {
27
29
  ...(inn && { inn }),
28
30
  ...(partnerComments ? { partnerComments } : {}),
29
31
  ...(serviceType ? { typeForm: serviceType } : {}),
32
+ ...getIncidentComment(sufferedFrom, situationDescription?.text),
30
33
  };
31
34
 
32
35
  return Object.fromEntries(
@@ -34,6 +37,11 @@ export const getFormatData = (data: FormState): Record<string, any> => {
34
37
  );
35
38
  };
36
39
 
40
+ const getIncidentComment = (sufferedFrom?: string, situationDescription?: string) =>
41
+ sufferedFrom || situationDescription
42
+ ? { comment: `${sufferedFrom || ''};${situationDescription || ''}` }
43
+ : {};
44
+
37
45
  const getRegion = (region?: Option): Record<string, string> =>
38
46
  region?.key || region?.text ? { region: region?.text || region?.key } : {};
39
47
 
@@ -29,6 +29,8 @@ export interface FormState {
29
29
  annualRevenue?: string;
30
30
  consentDataProcessing?: boolean;
31
31
  addressRetail?: Option;
32
+ sufferedFrom?: string;
33
+ situationDescription?: Option;
32
34
  }
33
35
 
34
36
  const initialFormState = {
@@ -18,4 +18,5 @@ export type FormTypeFieldDef =
18
18
  | 'FEEDBACK'
19
19
  | 'FEEDBACK_QS'
20
20
  | 'OUTSERVICE'
21
- | 'RFB';
21
+ | 'RFB'
22
+ | 'SUPPORT';
@@ -0,0 +1,24 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { type Option } from '../../Select/Option';
3
+ import { SelectControl } from '../../Select/SelectControl';
4
+ import { type CustomFieldProps } from '../CustomFieldProps';
5
+
6
+ const APPLIER_TYPES: Option[] = [
7
+ {
8
+ key: 'client',
9
+ text: 'Клиент',
10
+ },
11
+ {
12
+ key: 'representative',
13
+ text: 'Представитель клиента',
14
+ },
15
+ ];
16
+
17
+ export const ApplierTypeField = JSX<CustomFieldProps>(({ field, input }) => (
18
+ <SelectControl
19
+ label="Тип обратившегося"
20
+ {...input}
21
+ options={APPLIER_TYPES}
22
+ {...field('applierType')}
23
+ />
24
+ ));
@@ -3,5 +3,5 @@ import { DatePickerControl } from '../../DatePicker/DatePickerControl';
3
3
  import { type CustomFieldProps } from '../CustomFieldProps';
4
4
 
5
5
  export const BirthdayField = JSX<CustomFieldProps>(({ field, input }) => (
6
- <DatePickerControl label="Дата рождения" {...field(input?.name ?? '')} />
6
+ <DatePickerControl label={input?.label || 'Дата рождения'} {...field(input?.name ?? '')} />
7
7
  ));
@@ -11,7 +11,7 @@ export const RegionField = JSX<CustomFieldProps>(({ field, input, params }) => {
11
11
 
12
12
  return (
13
13
  <SelectControl
14
- label="Филиал"
14
+ label={input?.label || 'Филиал'}
15
15
  placeholder="Выберите филиал"
16
16
  isSearch={true}
17
17
  options={useMemo(
@@ -0,0 +1,7 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { InputControl } from '../../Input/InputControl';
3
+ import { type CustomFieldProps } from '../CustomFieldProps';
4
+
5
+ export const RepresentativeNameField = JSX<CustomFieldProps>(({ field, input }) => (
6
+ <InputControl label="ФИО представителя" {...input} {...field('representativeName')} />
7
+ ));
@@ -0,0 +1,7 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { InputControl } from '../../Input/InputControl';
3
+ import { type CustomFieldProps } from '../CustomFieldProps';
4
+
5
+ export const SituationDescriptionField = JSX<CustomFieldProps>(({ field, input }) => (
6
+ <InputControl label="Описание ситуации" {...input} {...field('situationDescription')} />
7
+ ));
@@ -0,0 +1,32 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { type Option } from '../../Select/Option';
3
+ import { SelectControl } from '../../Select/SelectControl';
4
+ import { type CustomFieldProps } from '../CustomFieldProps';
5
+
6
+ const SUFFERED_FROM_TYPES: Option[] = [
7
+ {
8
+ key: 'blg',
9
+ text: 'Белгородской области',
10
+ },
11
+ {
12
+ key: 'bshk',
13
+ text: 'Республике Башкортостан',
14
+ },
15
+ {
16
+ key: 'krsk',
17
+ text: 'Курской области',
18
+ },
19
+ {
20
+ key: 'chs',
21
+ text: 'От стихийного бедствия ЧС',
22
+ },
23
+ ];
24
+
25
+ export const SufferedFromField = JSX<CustomFieldProps>(({ field, input }) => (
26
+ <SelectControl
27
+ label="Пострадал в"
28
+ {...input}
29
+ options={SUFFERED_FROM_TYPES}
30
+ {...field('sufferedFrom')}
31
+ />
32
+ ));
@@ -31,6 +31,11 @@ type NameFieldApplicationDef =
31
31
  | 'product'
32
32
  | 'localities'
33
33
  | 'partnerComments'
34
+ | 'sufferedFrom'
35
+ | 'situationDescription'
36
+ | 'applierType'
37
+ | 'representativeName'
38
+ | 'regionBranch'
34
39
  | 'consentToReceiveMaterials'
35
40
  | 'consentDataProcessing';
36
41
 
@@ -8,6 +8,7 @@ import { AcquiringField } from './Fields/AcquiringField';
8
8
  import { AddressBranchField } from './Fields/AddressBranchField';
9
9
  import { AmountField } from './Fields/AmountField';
10
10
  import { AnnualRevenueField } from './Fields/AnnualRevenueField';
11
+ import { ApplierTypeField } from './Fields/ApplierTypeField';
11
12
  import { BankEmpoleeField } from './Fields/BankEmpoleeField';
12
13
  import { BirthdayField } from './Fields/BirthdayField';
13
14
  import { CollectionCountField } from './Fields/CollectionCountField';
@@ -29,8 +30,11 @@ import { PosTerminalField } from './Fields/PosTerminalField';
29
30
  import { ProductField } from './Fields/ProductField';
30
31
  import { RegionField } from './Fields/RegionField';
31
32
  import { RegionPremiumField } from './Fields/RegionPremiumField';
33
+ import { RepresentativeNameField } from './Fields/RepresentativeNameField';
32
34
  import { SecondaryPhoneField } from './Fields/SecondaryPhoneField';
33
35
  import { ServiceDirectionField } from './Fields/ServiceDirectionField';
36
+ import { SituationDescriptionField } from './Fields/SituationDescriptionField';
37
+ import { SufferedFromField } from './Fields/SufferedFromField';
34
38
  import { SurnameField } from './Fields/SurnameField';
35
39
  import { TermField } from './Fields/TermField';
36
40
  import { UltraPremiumField } from './Fields/UltraPremiumField';
@@ -73,7 +77,10 @@ const InputsMap = {
73
77
  <RegionField {...props} />
74
78
  ),
75
79
  consentToReceiveMaterials: ConsentToReceiveMaterialsField,
76
-
80
+ sufferedFrom: SufferedFromField,
81
+ situationDescription: SituationDescriptionField,
82
+ representativeName: RepresentativeNameField,
83
+ applierType: ApplierTypeField,
77
84
  surname: SurnameField,
78
85
  name: NameField,
79
86
  middleName: MiddleNameField,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.14.756",
3
+ "version": "0.14.758",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -1093,5 +1093,78 @@
1093
1093
  }
1094
1094
  }
1095
1095
  }
1096
+ ],
1097
+ [
1098
+ "Меры поддержки",
1099
+ {
1100
+ "content": {
1101
+ "version": "primary",
1102
+ "padding": "",
1103
+ "title": "Меры поддержки",
1104
+ "typeForm": "SUPPORT",
1105
+ "endpoint": "lead",
1106
+ "sections": [
1107
+ {
1108
+ "inputs": [
1109
+ {
1110
+ "name": "fullName",
1111
+ "required": true,
1112
+ "label": "ФИО клиента"
1113
+ },
1114
+ {
1115
+ "name": "birthday",
1116
+ "required": true,
1117
+ "label": "Дата рождения клиента"
1118
+ },
1119
+ {
1120
+ "name": "applierType",
1121
+ "required": true
1122
+ },
1123
+ {
1124
+ "name": "representativeName"
1125
+ },
1126
+ {
1127
+ "name": "sufferedFrom",
1128
+ "required": true
1129
+ },
1130
+ {
1131
+ "name": "region",
1132
+ "required": true,
1133
+ "label": "Регион обслуживания кредита"
1134
+ },
1135
+ {
1136
+ "name": "situationDescription",
1137
+ "required": true
1138
+ },
1139
+ {
1140
+ "name": "phone",
1141
+ "required": true
1142
+ },
1143
+ {
1144
+ "name": "email",
1145
+ "required": true
1146
+ }
1147
+ ]
1148
+ },
1149
+ {
1150
+ "inputs": [
1151
+ {
1152
+ "name": "consentDataProcessing",
1153
+ "required": true
1154
+ }
1155
+ ]
1156
+ }
1157
+ ],
1158
+ "button": {
1159
+ "text": "Отправить заявку",
1160
+ "version": "primary"
1161
+ },
1162
+ "link": {
1163
+ "text": "Согласен на обработку персональных данных",
1164
+ "href": "/privacy-policy",
1165
+ "target": "_blank"
1166
+ }
1167
+ }
1168
+ }
1096
1169
  ]
1097
1170
  ]
@@ -652,4 +652,60 @@ export default {
652
652
  <DialogManager />
653
653
  </div>
654
654
  ),
655
+ receiptForBusiness: (
656
+ <div className="container grid grid-cols-12">
657
+ <ApplicationForm
658
+ className="col-span-12"
659
+ title="Заявка по акции 'Рецепт для бизнеса'"
660
+ typeForm="RFB"
661
+ endpoint="sendcorporatelead"
662
+ sections={[
663
+ {
664
+ inputs: [{ name: 'name', required: true }],
665
+ },
666
+ {
667
+ columns: 2,
668
+ inputs: [
669
+ { name: 'phone', required: true },
670
+ { name: 'inn', required: true },
671
+ ],
672
+ },
673
+ ]}
674
+ button={button}
675
+ link={linkCorp}
676
+ />
677
+ <PopupManager />
678
+ <DialogManager />
679
+ </div>
680
+ ),
681
+ support: (
682
+ <div className="container grid grid-cols-12">
683
+ <ApplicationForm
684
+ className="col-span-12"
685
+ title="Меры поддержки жителей пострадавших населенных пунктов территорий Курской, Брянской и Белгородской областей"
686
+ typeForm="SUPPORT"
687
+ endpoint="lead"
688
+ sections={[
689
+ {
690
+ inputs: [
691
+ { name: 'fullName', required: true, label: 'ФИО клиента' },
692
+ { name: 'birthday', required: true, label: 'Дата рождения клиента' },
693
+ { name: 'applierType', required: true },
694
+ { name: 'representativeName' },
695
+ { name: 'sufferedFrom', required: true },
696
+ { name: 'regionBranch', required: true, label: 'Регион обслуживания кредита' },
697
+ { name: 'situationDescription', required: true },
698
+ { name: 'phone', required: true },
699
+ { name: 'email', required: true },
700
+ ],
701
+ },
702
+ { inputs: [{ name: 'consentDataProcessing', required: true }] },
703
+ ]}
704
+ button={button}
705
+ link={link}
706
+ />
707
+ <PopupManager />
708
+ <DialogManager />
709
+ </div>
710
+ ),
655
711
  };
@@ -673,4 +673,34 @@ export default {
673
673
  <DialogManager />
674
674
  </div>
675
675
  ),
676
+ support: (
677
+ <div className="container grid grid-cols-12">
678
+ <ApplicationForm
679
+ className="col-span-12"
680
+ title="Меры поддержки жителей пострадавших населенных пунктов территорий Курской, Брянской и Белгородской областей"
681
+ typeForm="SUPPORT"
682
+ endpoint="lead"
683
+ sections={[
684
+ {
685
+ inputs: [
686
+ { name: 'fullName', required: true, label: 'ФИО клиента' },
687
+ { name: 'birthday', required: true, label: 'Дата рождения клиента' },
688
+ { name: 'applierType', required: true },
689
+ { name: 'representativeName' },
690
+ { name: 'sufferedFrom', required: true },
691
+ { name: 'region', required: true, label: 'Регион обслуживания кредита' },
692
+ { name: 'situationDescription', required: true },
693
+ { name: 'phone', required: true },
694
+ { name: 'email', required: true },
695
+ ],
696
+ },
697
+ { inputs: [{ name: 'consentDataProcessing', required: true }] },
698
+ ]}
699
+ button={button}
700
+ link={link}
701
+ />
702
+ <PopupManager />
703
+ <DialogManager />
704
+ </div>
705
+ ),
676
706
  };
@@ -17,6 +17,8 @@ export const getFormatData = (data: FormState): Record<string, any> => {
17
17
  vedTypes,
18
18
  region,
19
19
  inn,
20
+ sufferedFrom,
21
+ situationDescription,
20
22
  ...usedData
21
23
  } = data;
22
24
  const partnerComments = acquiringType || annualRevenue ? getPartnerComments(data) : null;
@@ -27,6 +29,7 @@ export const getFormatData = (data: FormState): Record<string, any> => {
27
29
  ...(inn && { inn }),
28
30
  ...(partnerComments ? { partnerComments } : {}),
29
31
  ...(serviceType ? { typeForm: serviceType } : {}),
32
+ ...getIncidentComment(sufferedFrom, situationDescription?.text),
30
33
  };
31
34
 
32
35
  return Object.fromEntries(
@@ -34,6 +37,11 @@ export const getFormatData = (data: FormState): Record<string, any> => {
34
37
  );
35
38
  };
36
39
 
40
+ const getIncidentComment = (sufferedFrom?: string, situationDescription?: string) =>
41
+ sufferedFrom || situationDescription
42
+ ? { comment: `${sufferedFrom || ''};${situationDescription || ''}` }
43
+ : {};
44
+
37
45
  const getRegion = (region?: Option): Record<string, string> =>
38
46
  region?.key || region?.text ? { region: region?.text || region?.key } : {};
39
47
 
@@ -29,6 +29,8 @@ export interface FormState {
29
29
  annualRevenue?: string;
30
30
  consentDataProcessing?: boolean;
31
31
  addressRetail?: Option;
32
+ sufferedFrom?: string;
33
+ situationDescription?: Option;
32
34
  }
33
35
 
34
36
  const initialFormState = {
@@ -18,4 +18,5 @@ export type FormTypeFieldDef =
18
18
  | 'FEEDBACK'
19
19
  | 'FEEDBACK_QS'
20
20
  | 'OUTSERVICE'
21
- | 'RFB';
21
+ | 'RFB'
22
+ | 'SUPPORT';
@@ -0,0 +1,24 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { type Option } from '../../Select/Option';
3
+ import { SelectControl } from '../../Select/SelectControl';
4
+ import { type CustomFieldProps } from '../CustomFieldProps';
5
+
6
+ const APPLIER_TYPES: Option[] = [
7
+ {
8
+ key: 'client',
9
+ text: 'Клиент',
10
+ },
11
+ {
12
+ key: 'representative',
13
+ text: 'Представитель клиента',
14
+ },
15
+ ];
16
+
17
+ export const ApplierTypeField = JSX<CustomFieldProps>(({ field, input }) => (
18
+ <SelectControl
19
+ label="Тип обратившегося"
20
+ {...input}
21
+ options={APPLIER_TYPES}
22
+ {...field('applierType')}
23
+ />
24
+ ));
@@ -3,5 +3,5 @@ import { DatePickerControl } from '../../DatePicker/DatePickerControl';
3
3
  import { type CustomFieldProps } from '../CustomFieldProps';
4
4
 
5
5
  export const BirthdayField = JSX<CustomFieldProps>(({ field, input }) => (
6
- <DatePickerControl label="Дата рождения" {...field(input?.name ?? '')} />
6
+ <DatePickerControl label={input?.label || 'Дата рождения'} {...field(input?.name ?? '')} />
7
7
  ));
@@ -11,7 +11,7 @@ export const RegionField = JSX<CustomFieldProps>(({ field, input, params }) => {
11
11
 
12
12
  return (
13
13
  <SelectControl
14
- label="Филиал"
14
+ label={input?.label || 'Филиал'}
15
15
  placeholder="Выберите филиал"
16
16
  isSearch={true}
17
17
  options={useMemo(
@@ -0,0 +1,7 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { InputControl } from '../../Input/InputControl';
3
+ import { type CustomFieldProps } from '../CustomFieldProps';
4
+
5
+ export const RepresentativeNameField = JSX<CustomFieldProps>(({ field, input }) => (
6
+ <InputControl label="ФИО представителя" {...input} {...field('representativeName')} />
7
+ ));
@@ -0,0 +1,7 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { InputControl } from '../../Input/InputControl';
3
+ import { type CustomFieldProps } from '../CustomFieldProps';
4
+
5
+ export const SituationDescriptionField = JSX<CustomFieldProps>(({ field, input }) => (
6
+ <InputControl label="Описание ситуации" {...input} {...field('situationDescription')} />
7
+ ));
@@ -0,0 +1,32 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { type Option } from '../../Select/Option';
3
+ import { SelectControl } from '../../Select/SelectControl';
4
+ import { type CustomFieldProps } from '../CustomFieldProps';
5
+
6
+ const SUFFERED_FROM_TYPES: Option[] = [
7
+ {
8
+ key: 'blg',
9
+ text: 'Белгородской области',
10
+ },
11
+ {
12
+ key: 'bshk',
13
+ text: 'Республике Башкортостан',
14
+ },
15
+ {
16
+ key: 'krsk',
17
+ text: 'Курской области',
18
+ },
19
+ {
20
+ key: 'chs',
21
+ text: 'От стихийного бедствия ЧС',
22
+ },
23
+ ];
24
+
25
+ export const SufferedFromField = JSX<CustomFieldProps>(({ field, input }) => (
26
+ <SelectControl
27
+ label="Пострадал в"
28
+ {...input}
29
+ options={SUFFERED_FROM_TYPES}
30
+ {...field('sufferedFrom')}
31
+ />
32
+ ));
@@ -31,6 +31,11 @@ type NameFieldApplicationDef =
31
31
  | 'product'
32
32
  | 'localities'
33
33
  | 'partnerComments'
34
+ | 'sufferedFrom'
35
+ | 'situationDescription'
36
+ | 'applierType'
37
+ | 'representativeName'
38
+ | 'regionBranch'
34
39
  | 'consentToReceiveMaterials'
35
40
  | 'consentDataProcessing';
36
41
 
@@ -8,6 +8,7 @@ import { AcquiringField } from './Fields/AcquiringField';
8
8
  import { AddressBranchField } from './Fields/AddressBranchField';
9
9
  import { AmountField } from './Fields/AmountField';
10
10
  import { AnnualRevenueField } from './Fields/AnnualRevenueField';
11
+ import { ApplierTypeField } from './Fields/ApplierTypeField';
11
12
  import { BankEmpoleeField } from './Fields/BankEmpoleeField';
12
13
  import { BirthdayField } from './Fields/BirthdayField';
13
14
  import { CollectionCountField } from './Fields/CollectionCountField';
@@ -29,8 +30,11 @@ import { PosTerminalField } from './Fields/PosTerminalField';
29
30
  import { ProductField } from './Fields/ProductField';
30
31
  import { RegionField } from './Fields/RegionField';
31
32
  import { RegionPremiumField } from './Fields/RegionPremiumField';
33
+ import { RepresentativeNameField } from './Fields/RepresentativeNameField';
32
34
  import { SecondaryPhoneField } from './Fields/SecondaryPhoneField';
33
35
  import { ServiceDirectionField } from './Fields/ServiceDirectionField';
36
+ import { SituationDescriptionField } from './Fields/SituationDescriptionField';
37
+ import { SufferedFromField } from './Fields/SufferedFromField';
34
38
  import { SurnameField } from './Fields/SurnameField';
35
39
  import { TermField } from './Fields/TermField';
36
40
  import { UltraPremiumField } from './Fields/UltraPremiumField';
@@ -73,7 +77,10 @@ const InputsMap = {
73
77
  <RegionField {...props} />
74
78
  ),
75
79
  consentToReceiveMaterials: ConsentToReceiveMaterialsField,
76
-
80
+ sufferedFrom: SufferedFromField,
81
+ situationDescription: SituationDescriptionField,
82
+ representativeName: RepresentativeNameField,
83
+ applierType: ApplierTypeField,
77
84
  surname: SurnameField,
78
85
  name: NameField,
79
86
  middleName: MiddleNameField,