@redneckz/wildless-cms-uni-blocks 0.14.235 → 0.14.237
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 +16 -7
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +4 -4
- package/bundle/hooks/{usePremiumBranchesByRegions.d.ts → useBranchesByRegions.d.ts} +1 -1
- package/dist/api/LeadServiceAPI.js +2 -1
- package/dist/api/LeadServiceAPI.js.map +1 -1
- package/dist/components/ApplicationFormCustom/AddressBranchField.js +2 -2
- package/dist/components/ApplicationFormCustom/AddressBranchField.js.map +1 -1
- package/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +4 -4
- package/dist/components/ApplicationFormCustom/PosTerminalField.js +1 -1
- package/dist/components/ApplicationFormCustom/PosTerminalField.js.map +1 -1
- package/dist/components/ApplicationFormCustom/RegionPremiumField.js +2 -2
- package/dist/components/ApplicationFormCustom/RegionPremiumField.js.map +1 -1
- package/dist/components/ApplicationFormCustom/VedField.js +7 -0
- package/dist/components/ApplicationFormCustom/VedField.js.map +1 -1
- package/dist/components/ApplicationFormCustom/getField.js +1 -0
- package/dist/components/ApplicationFormCustom/getField.js.map +1 -1
- package/dist/components/ApplicationFormCustom/getInitialFormState.js +1 -0
- package/dist/components/ApplicationFormCustom/getInitialFormState.js.map +1 -1
- package/dist/hooks/{usePremiumBranchesByRegions.d.ts → useBranchesByRegions.d.ts} +1 -1
- package/{mobile/dist/hooks/usePremiumBranchesByRegions.js → dist/hooks/useBranchesByRegions.js} +5 -5
- package/dist/hooks/useBranchesByRegions.js.map +1 -0
- package/lib/api/LeadServiceAPI.js +2 -1
- package/lib/api/LeadServiceAPI.js.map +1 -1
- package/lib/components/ApplicationFormCustom/AddressBranchField.js +2 -2
- package/lib/components/ApplicationFormCustom/AddressBranchField.js.map +1 -1
- package/lib/components/ApplicationFormCustom/ApplicationFormCustom.fixture.d.ts +1 -0
- package/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +4 -4
- package/lib/components/ApplicationFormCustom/PosTerminalField.js +1 -1
- package/lib/components/ApplicationFormCustom/PosTerminalField.js.map +1 -1
- package/lib/components/ApplicationFormCustom/RegionPremiumField.js +2 -2
- package/lib/components/ApplicationFormCustom/RegionPremiumField.js.map +1 -1
- package/lib/components/ApplicationFormCustom/VedField.js +7 -0
- package/lib/components/ApplicationFormCustom/VedField.js.map +1 -1
- package/lib/components/ApplicationFormCustom/getField.js +1 -0
- package/lib/components/ApplicationFormCustom/getField.js.map +1 -1
- package/lib/components/ApplicationFormCustom/getInitialFormState.js +1 -0
- package/lib/components/ApplicationFormCustom/getInitialFormState.js.map +1 -1
- package/lib/hooks/{usePremiumBranchesByRegions.d.ts → useBranchesByRegions.d.ts} +1 -1
- package/lib/hooks/{usePremiumBranchesByRegions.js → useBranchesByRegions.js} +3 -3
- package/lib/hooks/useBranchesByRegions.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +16 -7
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +4 -4
- package/mobile/bundle/hooks/{usePremiumBranchesByRegions.d.ts → useBranchesByRegions.d.ts} +1 -1
- package/mobile/dist/api/LeadServiceAPI.js +2 -1
- package/mobile/dist/api/LeadServiceAPI.js.map +1 -1
- package/mobile/dist/components/ApplicationFormCustom/AddressBranchField.js +2 -2
- package/mobile/dist/components/ApplicationFormCustom/AddressBranchField.js.map +1 -1
- package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +4 -4
- package/mobile/dist/components/ApplicationFormCustom/PosTerminalField.js +1 -1
- package/mobile/dist/components/ApplicationFormCustom/PosTerminalField.js.map +1 -1
- package/mobile/dist/components/ApplicationFormCustom/RegionPremiumField.js +2 -2
- package/mobile/dist/components/ApplicationFormCustom/RegionPremiumField.js.map +1 -1
- package/mobile/dist/components/ApplicationFormCustom/VedField.js +7 -0
- package/mobile/dist/components/ApplicationFormCustom/VedField.js.map +1 -1
- package/mobile/dist/components/ApplicationFormCustom/getField.js +1 -0
- package/mobile/dist/components/ApplicationFormCustom/getField.js.map +1 -1
- package/mobile/dist/components/ApplicationFormCustom/getInitialFormState.js +1 -0
- package/mobile/dist/components/ApplicationFormCustom/getInitialFormState.js.map +1 -1
- package/mobile/dist/hooks/useBranchesByRegions.d.ts +8 -0
- package/{dist/hooks/usePremiumBranchesByRegions.js → mobile/dist/hooks/useBranchesByRegions.js} +5 -5
- package/mobile/dist/hooks/useBranchesByRegions.js.map +1 -0
- package/mobile/lib/api/LeadServiceAPI.js +2 -1
- package/mobile/lib/api/LeadServiceAPI.js.map +1 -1
- package/mobile/lib/components/ApplicationFormCustom/AddressBranchField.js +2 -2
- package/mobile/lib/components/ApplicationFormCustom/AddressBranchField.js.map +1 -1
- package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +4 -4
- package/mobile/lib/components/ApplicationFormCustom/PosTerminalField.js +1 -1
- package/mobile/lib/components/ApplicationFormCustom/PosTerminalField.js.map +1 -1
- package/mobile/lib/components/ApplicationFormCustom/RegionPremiumField.js +2 -2
- package/mobile/lib/components/ApplicationFormCustom/RegionPremiumField.js.map +1 -1
- package/mobile/lib/components/ApplicationFormCustom/VedField.js +7 -0
- package/mobile/lib/components/ApplicationFormCustom/VedField.js.map +1 -1
- package/mobile/lib/components/ApplicationFormCustom/getField.js +1 -0
- package/mobile/lib/components/ApplicationFormCustom/getField.js.map +1 -1
- package/mobile/lib/components/ApplicationFormCustom/getInitialFormState.js +1 -0
- package/mobile/lib/components/ApplicationFormCustom/getInitialFormState.js.map +1 -1
- package/mobile/lib/hooks/useBranchesByRegions.d.ts +8 -0
- package/mobile/lib/hooks/{usePremiumBranchesByRegions.js → useBranchesByRegions.js} +3 -3
- package/mobile/lib/hooks/useBranchesByRegions.js.map +1 -0
- package/mobile/src/api/LeadServiceAPI.ts +5 -1
- package/mobile/src/components/ApplicationFormCustom/AddressBranchField.tsx +2 -2
- package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustom.example.json +33 -0
- package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustomContent.ts +4 -2
- package/mobile/src/components/ApplicationFormCustom/PosTerminalField.tsx +1 -1
- package/mobile/src/components/ApplicationFormCustom/RegionPremiumField.tsx +2 -2
- package/mobile/src/components/ApplicationFormCustom/VedField.tsx +7 -0
- package/mobile/src/components/ApplicationFormCustom/getField.tsx +6 -0
- package/mobile/src/components/ApplicationFormCustom/getInitialFormState.tsx +1 -0
- package/mobile/src/hooks/{usePremiumBranchesByRegions.ts → useBranchesByRegions.ts} +2 -2
- package/package.json +1 -1
- package/src/api/LeadServiceAPI.ts +5 -1
- package/src/components/ApplicationFormCustom/AddressBranchField.tsx +2 -2
- package/src/components/ApplicationFormCustom/ApplicationFormCustom.example.json +33 -0
- package/src/components/ApplicationFormCustom/ApplicationFormCustom.fixture.tsx +28 -0
- package/src/components/ApplicationFormCustom/ApplicationFormCustomContent.ts +4 -2
- package/src/components/ApplicationFormCustom/PosTerminalField.tsx +1 -1
- package/src/components/ApplicationFormCustom/RegionPremiumField.tsx +2 -2
- package/src/components/ApplicationFormCustom/VedField.tsx +7 -0
- package/src/components/ApplicationFormCustom/getField.tsx +6 -0
- package/src/components/ApplicationFormCustom/getInitialFormState.tsx +1 -0
- package/src/hooks/{usePremiumBranchesByRegions.ts → useBranchesByRegions.ts} +2 -2
- package/dist/hooks/usePremiumBranchesByRegions.js.map +0 -1
- package/lib/hooks/usePremiumBranchesByRegions.js.map +0 -1
- package/mobile/dist/hooks/usePremiumBranchesByRegions.d.ts +0 -8
- package/mobile/dist/hooks/usePremiumBranchesByRegions.js.map +0 -1
- package/mobile/lib/hooks/usePremiumBranchesByRegions.d.ts +0 -8
- package/mobile/lib/hooks/usePremiumBranchesByRegions.js.map +0 -1
|
@@ -40,6 +40,39 @@
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
],
|
|
43
|
+
[
|
|
44
|
+
"Аналитика ФЛ",
|
|
45
|
+
{
|
|
46
|
+
"content": {
|
|
47
|
+
"title": "Подпишитесь на аналитику",
|
|
48
|
+
"typeForm": "ANALITIC",
|
|
49
|
+
"endpoint": "lead",
|
|
50
|
+
"sections": [
|
|
51
|
+
{
|
|
52
|
+
"title": "Получайте аналитические материалы для начинающих и профессиональных инвесторов на почту",
|
|
53
|
+
"inputs": []
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"inputs": [
|
|
57
|
+
{ "name": "name", "required": true },
|
|
58
|
+
{ "name": "email", "required": true },
|
|
59
|
+
{ "name": "consentToReceiveMaterials" },
|
|
60
|
+
{ "name": "consentDataProcessing", "required": true }
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"button": {
|
|
65
|
+
"text": "Отправить заявку",
|
|
66
|
+
"version": "primary"
|
|
67
|
+
},
|
|
68
|
+
"link": {
|
|
69
|
+
"text": "Согласен на обработку персональных данных",
|
|
70
|
+
"href": "/privacy-policy",
|
|
71
|
+
"target": "_blank"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
],
|
|
43
76
|
[
|
|
44
77
|
"Предупреждение о мошенничестве ФЛ",
|
|
45
78
|
{
|
|
@@ -21,7 +21,7 @@ export interface SubmitButtonProps {
|
|
|
21
21
|
/**
|
|
22
22
|
* @title Название поля ввода
|
|
23
23
|
* @required
|
|
24
|
-
* @enumNames ["Фамилия", "Имя", "Отчество", "Email", "Телефон", "ФИО", "ИНН", "Комментарий", "Регион", "Адрес", "Тип формы", "День рождения", "Клиент банка", "Тип эквайринга", "Онлайн касса", "POS-терминал", "Ультра/Премиум", "ВЭД", "Срок (месяцев)", "Сумма ₽", "Годовой доход", "Количество объектов инкассации", "Комментарий партнёров", "Согласие на обработку"]
|
|
24
|
+
* @enumNames ["Фамилия", "Имя", "Отчество", "Email", "Телефон", "ФИО", "ИНН", "Комментарий", "Регион", "Адрес", "Тип формы", "День рождения", "Клиент банка", "Согласие на получение материалов", "Тип эквайринга", "Онлайн касса", "POS-терминал", "Ультра/Премиум", "ВЭД", "Срок (месяцев)", "Сумма ₽", "Годовой доход", "Количество объектов инкассации", "Комментарий партнёров", "Согласие на обработку"]
|
|
25
25
|
*/
|
|
26
26
|
export type NameFieldDef =
|
|
27
27
|
| 'surname'
|
|
@@ -37,6 +37,7 @@ export type NameFieldDef =
|
|
|
37
37
|
| 'typeForm'
|
|
38
38
|
| 'birthday'
|
|
39
39
|
| 'isClient'
|
|
40
|
+
| 'consentToReceiveMaterials'
|
|
40
41
|
| 'acquiringType'
|
|
41
42
|
| 'onlineCheckout'
|
|
42
43
|
| 'posTerminal'
|
|
@@ -65,10 +66,11 @@ export type FieldDef = Required &
|
|
|
65
66
|
/**
|
|
66
67
|
* @title Тип формы
|
|
67
68
|
* @required
|
|
68
|
-
* @enumNames ["Эквайринг ЮЛ", "Мошенничество ФЛ", "Бизнес-карта ЮЛ", "Брокерское обслуживание ЮЛ", "Брокерский счет ФЛ", "Инкассация ЮЛ", "Факты коррупции ФЛ", "Кредит ЮЛ", "Депозит ЮЛ", "Консультация по продукту ФЛ", "Самоинкассация ЮЛ", "ВЭД ЮЛ", "Ультра ФЛ", "Премиум ФЛ"]
|
|
69
|
+
* @enumNames ["Эквайринг ЮЛ", "Аналитика ФЛ", "Мошенничество ФЛ", "Бизнес-карта ЮЛ", "Брокерское обслуживание ЮЛ", "Брокерский счет ФЛ", "Инкассация ЮЛ", "Факты коррупции ФЛ", "Кредит ЮЛ", "Депозит ЮЛ", "Консультация по продукту ФЛ", "Самоинкассация ЮЛ", "ВЭД ЮЛ", "Ультра ФЛ", "Премиум ФЛ"]
|
|
69
70
|
*/
|
|
70
71
|
type TypeFormFieldDef =
|
|
71
72
|
| 'ACQR'
|
|
73
|
+
| 'ANALITIC'
|
|
72
74
|
| 'ANTIFRAUD'
|
|
73
75
|
| 'BCRD'
|
|
74
76
|
| 'BROK'
|
|
@@ -5,6 +5,6 @@ import { type CustomFieldProps } from './CustomFieldProps';
|
|
|
5
5
|
|
|
6
6
|
export const PosTerminalField = JSX<CustomFieldProps>(({ field }) =>
|
|
7
7
|
isAcquiringTrade(field('acquiringType')?.value?.key as string) ? (
|
|
8
|
-
<SlideCheckbox type="radio" text="Хочу
|
|
8
|
+
<SlideCheckbox type="radio" text="Хочу POS-терминал" {...field('posTerminal')} />
|
|
9
9
|
) : null,
|
|
10
10
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useMemo } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
-
import {
|
|
3
|
+
import { useBranchesByRegions } from '../../hooks/useBranchesByRegions';
|
|
4
4
|
import { type Option } from '../../ui-kit/Select/Option';
|
|
5
5
|
import { SelectControl } from '../../ui-kit/Select/SelectControl';
|
|
6
6
|
import { type CustomFieldProps } from './CustomFieldProps';
|
|
@@ -8,7 +8,7 @@ import { validatorObj } from './getObjectValidator';
|
|
|
8
8
|
import { getValidation } from './getValidation';
|
|
9
9
|
|
|
10
10
|
export const RegionPremiumField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
11
|
-
const branchByRegions =
|
|
11
|
+
const branchByRegions = useBranchesByRegions();
|
|
12
12
|
const regions = useMemo(
|
|
13
13
|
() =>
|
|
14
14
|
branchByRegions?.map(({ region }) => ({
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useEffect } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
3
|
import { Radio } from '../../ui-kit/Radio/Radio';
|
|
3
4
|
import { type CustomFieldProps } from './CustomFieldProps';
|
|
4
5
|
|
|
@@ -11,6 +12,12 @@ export const VED_TYPES: string[] = [
|
|
|
11
12
|
|
|
12
13
|
export const VedField = JSX<CustomFieldProps>(({ field }) => {
|
|
13
14
|
const { value, onChange } = field('vedTypes');
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
if (value !== 'currencyControl') {
|
|
17
|
+
field?.('inn')?.onChange?.('');
|
|
18
|
+
field?.('region')?.onChange?.('');
|
|
19
|
+
}
|
|
20
|
+
}, [value]);
|
|
14
21
|
|
|
15
22
|
return (
|
|
16
23
|
<div className="py-m space-x-m grid @xl:flex @xl:items-center">
|
|
@@ -86,6 +86,12 @@ export const getField =
|
|
|
86
86
|
text='Являюсь клиентом банка АО "Россельхозбанк"'
|
|
87
87
|
/>
|
|
88
88
|
),
|
|
89
|
+
consentToReceiveMaterials: (
|
|
90
|
+
<CheckboxWithError
|
|
91
|
+
{...field('consentToReceiveMaterials')}
|
|
92
|
+
text="Согласен на получение информационных и аналитических материалов по электронной почте"
|
|
93
|
+
/>
|
|
94
|
+
),
|
|
89
95
|
partnerComments: (
|
|
90
96
|
<InputControl
|
|
91
97
|
{...getValidation(field('partnerComments'), validatorObj.partnerComments, required)}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useAsyncData } from '@redneckz/uni-jsx/lib/hooks/useAsyncData';
|
|
2
2
|
import { fetchJSONUnsafe, type FetchJSONUnsafeType } from '../utils/fetchJSON';
|
|
3
3
|
|
|
4
|
-
const REGIONS_URL = '/api/v1/
|
|
4
|
+
const REGIONS_URL = '/api/v1/branchesByRegions';
|
|
5
5
|
|
|
6
6
|
export interface Region {
|
|
7
7
|
region: string;
|
|
@@ -11,7 +11,7 @@ export interface Region {
|
|
|
11
11
|
}[];
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
export function
|
|
14
|
+
export function useBranchesByRegions(): Region[] {
|
|
15
15
|
const { data } = useAsyncData(REGIONS_URL, fetchJSONUnsafe as FetchJSONUnsafeType<Region[]>);
|
|
16
16
|
|
|
17
17
|
return Array.isArray(data) ? data : [];
|
package/package.json
CHANGED
|
@@ -45,8 +45,8 @@ export function LeadServiceAPI() {
|
|
|
45
45
|
const submitBody = {
|
|
46
46
|
typeForm,
|
|
47
47
|
[isIndividualType ? 'regionBranch' : 'region']: region,
|
|
48
|
-
[isIndividualType ? 'phoneNumber' : 'phone']: formatPhone(phone),
|
|
49
48
|
[isIndividualType ? 'email' : 'mail']: email,
|
|
49
|
+
...getPhone(phone),
|
|
50
50
|
...(isIndividualType ? { birthday: birthday?.toLocaleString() } : { inn, fullName }),
|
|
51
51
|
...(typeForm === 'FEEDBACK'
|
|
52
52
|
? {}
|
|
@@ -58,6 +58,7 @@ export function LeadServiceAPI() {
|
|
|
58
58
|
}),
|
|
59
59
|
...staticBody,
|
|
60
60
|
};
|
|
61
|
+
|
|
61
62
|
try {
|
|
62
63
|
const response = await fetch(url, {
|
|
63
64
|
method: 'POST',
|
|
@@ -83,6 +84,9 @@ export function LeadServiceAPI() {
|
|
|
83
84
|
};
|
|
84
85
|
}
|
|
85
86
|
|
|
87
|
+
const getPhone = (phone?: string, isIndividual?: boolean) =>
|
|
88
|
+
phone ? { [isIndividual ? 'phoneNumber' : 'phone']: formatPhone(phone) } : {};
|
|
89
|
+
|
|
86
90
|
const getSecondaryPhone = (secondaryPhone?: string) =>
|
|
87
91
|
!secondaryPhone || secondaryPhone === '+7 ('
|
|
88
92
|
? {}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useEffect } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { useBranches } from '../../hooks/useBranches';
|
|
4
|
-
import {
|
|
4
|
+
import { useBranchesByRegions } from '../../hooks/useBranchesByRegions';
|
|
5
5
|
import { SelectControl } from '../../ui-kit/Select/SelectControl';
|
|
6
6
|
import type { CustomFieldProps } from './CustomFieldProps';
|
|
7
7
|
import { validatorObj } from './getObjectValidator';
|
|
@@ -15,7 +15,7 @@ export const AddressBranchField = JSX<RegionFieldProps>(({ field, input, isPremi
|
|
|
15
15
|
const regionKey = field('region')?.value?.key as string;
|
|
16
16
|
const regionText = field('region')?.value?.text as string;
|
|
17
17
|
const addressBranch = isPremium
|
|
18
|
-
?
|
|
18
|
+
? useBranchesByRegions()?.find((_) => _?.region === regionText)?.branches
|
|
19
19
|
: useBranches(regionKey)?.filter((branch) => branch?.address);
|
|
20
20
|
useEffect(() => {
|
|
21
21
|
if (field('region')?.value?.key !== '') {
|
|
@@ -40,6 +40,39 @@
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
],
|
|
43
|
+
[
|
|
44
|
+
"Аналитика ФЛ",
|
|
45
|
+
{
|
|
46
|
+
"content": {
|
|
47
|
+
"title": "Подпишитесь на аналитику",
|
|
48
|
+
"typeForm": "ANALITIC",
|
|
49
|
+
"endpoint": "lead",
|
|
50
|
+
"sections": [
|
|
51
|
+
{
|
|
52
|
+
"title": "Получайте аналитические материалы для начинающих и профессиональных инвесторов на почту",
|
|
53
|
+
"inputs": []
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"inputs": [
|
|
57
|
+
{ "name": "name", "required": true },
|
|
58
|
+
{ "name": "email", "required": true },
|
|
59
|
+
{ "name": "consentToReceiveMaterials" },
|
|
60
|
+
{ "name": "consentDataProcessing", "required": true }
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"button": {
|
|
65
|
+
"text": "Отправить заявку",
|
|
66
|
+
"version": "primary"
|
|
67
|
+
},
|
|
68
|
+
"link": {
|
|
69
|
+
"text": "Согласен на обработку персональных данных",
|
|
70
|
+
"href": "/privacy-policy",
|
|
71
|
+
"target": "_blank"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
],
|
|
43
76
|
[
|
|
44
77
|
"Предупреждение о мошенничестве ФЛ",
|
|
45
78
|
{
|
|
@@ -80,6 +80,34 @@ export default {
|
|
|
80
80
|
<PopupManager />
|
|
81
81
|
</div>
|
|
82
82
|
),
|
|
83
|
+
analytics: (
|
|
84
|
+
<div className="container grid grid-cols-12">
|
|
85
|
+
<ApplicationFormCustom
|
|
86
|
+
className="col-span-12"
|
|
87
|
+
title="Подпишитесь на аналитику"
|
|
88
|
+
typeForm="ANALITIC"
|
|
89
|
+
endpoint="lead"
|
|
90
|
+
sections={[
|
|
91
|
+
{
|
|
92
|
+
title:
|
|
93
|
+
'Получайте аналитические материалы для начинающих и профессиональных инвесторов на почту',
|
|
94
|
+
inputs: [],
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
inputs: [
|
|
98
|
+
{ name: 'name', required: true },
|
|
99
|
+
{ name: 'email', required: true },
|
|
100
|
+
{ name: 'consentToReceiveMaterials' },
|
|
101
|
+
{ name: 'consentDataProcessing', required: true },
|
|
102
|
+
],
|
|
103
|
+
},
|
|
104
|
+
]}
|
|
105
|
+
button={button}
|
|
106
|
+
link={link}
|
|
107
|
+
/>
|
|
108
|
+
<PopupManager />
|
|
109
|
+
</div>
|
|
110
|
+
),
|
|
83
111
|
antiFraud: (
|
|
84
112
|
<div className="container grid grid-cols-12">
|
|
85
113
|
<ApplicationFormCustom
|
|
@@ -21,7 +21,7 @@ export interface SubmitButtonProps {
|
|
|
21
21
|
/**
|
|
22
22
|
* @title Название поля ввода
|
|
23
23
|
* @required
|
|
24
|
-
* @enumNames ["Фамилия", "Имя", "Отчество", "Email", "Телефон", "ФИО", "ИНН", "Комментарий", "Регион", "Адрес", "Тип формы", "День рождения", "Клиент банка", "Тип эквайринга", "Онлайн касса", "POS-терминал", "Ультра/Премиум", "ВЭД", "Срок (месяцев)", "Сумма ₽", "Годовой доход", "Количество объектов инкассации", "Комментарий партнёров", "Согласие на обработку"]
|
|
24
|
+
* @enumNames ["Фамилия", "Имя", "Отчество", "Email", "Телефон", "ФИО", "ИНН", "Комментарий", "Регион", "Адрес", "Тип формы", "День рождения", "Клиент банка", "Согласие на получение материалов", "Тип эквайринга", "Онлайн касса", "POS-терминал", "Ультра/Премиум", "ВЭД", "Срок (месяцев)", "Сумма ₽", "Годовой доход", "Количество объектов инкассации", "Комментарий партнёров", "Согласие на обработку"]
|
|
25
25
|
*/
|
|
26
26
|
export type NameFieldDef =
|
|
27
27
|
| 'surname'
|
|
@@ -37,6 +37,7 @@ export type NameFieldDef =
|
|
|
37
37
|
| 'typeForm'
|
|
38
38
|
| 'birthday'
|
|
39
39
|
| 'isClient'
|
|
40
|
+
| 'consentToReceiveMaterials'
|
|
40
41
|
| 'acquiringType'
|
|
41
42
|
| 'onlineCheckout'
|
|
42
43
|
| 'posTerminal'
|
|
@@ -65,10 +66,11 @@ export type FieldDef = Required &
|
|
|
65
66
|
/**
|
|
66
67
|
* @title Тип формы
|
|
67
68
|
* @required
|
|
68
|
-
* @enumNames ["Эквайринг ЮЛ", "Мошенничество ФЛ", "Бизнес-карта ЮЛ", "Брокерское обслуживание ЮЛ", "Брокерский счет ФЛ", "Инкассация ЮЛ", "Факты коррупции ФЛ", "Кредит ЮЛ", "Депозит ЮЛ", "Консультация по продукту ФЛ", "Самоинкассация ЮЛ", "ВЭД ЮЛ", "Ультра ФЛ", "Премиум ФЛ"]
|
|
69
|
+
* @enumNames ["Эквайринг ЮЛ", "Аналитика ФЛ", "Мошенничество ФЛ", "Бизнес-карта ЮЛ", "Брокерское обслуживание ЮЛ", "Брокерский счет ФЛ", "Инкассация ЮЛ", "Факты коррупции ФЛ", "Кредит ЮЛ", "Депозит ЮЛ", "Консультация по продукту ФЛ", "Самоинкассация ЮЛ", "ВЭД ЮЛ", "Ультра ФЛ", "Премиум ФЛ"]
|
|
69
70
|
*/
|
|
70
71
|
type TypeFormFieldDef =
|
|
71
72
|
| 'ACQR'
|
|
73
|
+
| 'ANALITIC'
|
|
72
74
|
| 'ANTIFRAUD'
|
|
73
75
|
| 'BCRD'
|
|
74
76
|
| 'BROK'
|
|
@@ -5,6 +5,6 @@ import { type CustomFieldProps } from './CustomFieldProps';
|
|
|
5
5
|
|
|
6
6
|
export const PosTerminalField = JSX<CustomFieldProps>(({ field }) =>
|
|
7
7
|
isAcquiringTrade(field('acquiringType')?.value?.key as string) ? (
|
|
8
|
-
<SlideCheckbox type="radio" text="Хочу
|
|
8
|
+
<SlideCheckbox type="radio" text="Хочу POS-терминал" {...field('posTerminal')} />
|
|
9
9
|
) : null,
|
|
10
10
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useMemo } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
-
import {
|
|
3
|
+
import { useBranchesByRegions } from '../../hooks/useBranchesByRegions';
|
|
4
4
|
import { type Option } from '../../ui-kit/Select/Option';
|
|
5
5
|
import { SelectControl } from '../../ui-kit/Select/SelectControl';
|
|
6
6
|
import { type CustomFieldProps } from './CustomFieldProps';
|
|
@@ -8,7 +8,7 @@ import { validatorObj } from './getObjectValidator';
|
|
|
8
8
|
import { getValidation } from './getValidation';
|
|
9
9
|
|
|
10
10
|
export const RegionPremiumField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
11
|
-
const branchByRegions =
|
|
11
|
+
const branchByRegions = useBranchesByRegions();
|
|
12
12
|
const regions = useMemo(
|
|
13
13
|
() =>
|
|
14
14
|
branchByRegions?.map(({ region }) => ({
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useEffect } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
3
|
import { Radio } from '../../ui-kit/Radio/Radio';
|
|
3
4
|
import { type CustomFieldProps } from './CustomFieldProps';
|
|
4
5
|
|
|
@@ -11,6 +12,12 @@ export const VED_TYPES: string[] = [
|
|
|
11
12
|
|
|
12
13
|
export const VedField = JSX<CustomFieldProps>(({ field }) => {
|
|
13
14
|
const { value, onChange } = field('vedTypes');
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
if (value !== 'currencyControl') {
|
|
17
|
+
field?.('inn')?.onChange?.('');
|
|
18
|
+
field?.('region')?.onChange?.('');
|
|
19
|
+
}
|
|
20
|
+
}, [value]);
|
|
14
21
|
|
|
15
22
|
return (
|
|
16
23
|
<div className="py-m space-x-m grid @xl:flex @xl:items-center">
|
|
@@ -86,6 +86,12 @@ export const getField =
|
|
|
86
86
|
text='Являюсь клиентом банка АО "Россельхозбанк"'
|
|
87
87
|
/>
|
|
88
88
|
),
|
|
89
|
+
consentToReceiveMaterials: (
|
|
90
|
+
<CheckboxWithError
|
|
91
|
+
{...field('consentToReceiveMaterials')}
|
|
92
|
+
text="Согласен на получение информационных и аналитических материалов по электронной почте"
|
|
93
|
+
/>
|
|
94
|
+
),
|
|
89
95
|
partnerComments: (
|
|
90
96
|
<InputControl
|
|
91
97
|
{...getValidation(field('partnerComments'), validatorObj.partnerComments, required)}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useAsyncData } from '@redneckz/uni-jsx/lib/hooks/useAsyncData';
|
|
2
2
|
import { fetchJSONUnsafe, type FetchJSONUnsafeType } from '../utils/fetchJSON';
|
|
3
3
|
|
|
4
|
-
const REGIONS_URL = '/api/v1/
|
|
4
|
+
const REGIONS_URL = '/api/v1/branchesByRegions';
|
|
5
5
|
|
|
6
6
|
export interface Region {
|
|
7
7
|
region: string;
|
|
@@ -11,7 +11,7 @@ export interface Region {
|
|
|
11
11
|
}[];
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
export function
|
|
14
|
+
export function useBranchesByRegions(): Region[] {
|
|
15
15
|
const { data } = useAsyncData(REGIONS_URL, fetchJSONUnsafe as FetchJSONUnsafeType<Region[]>);
|
|
16
16
|
|
|
17
17
|
return Array.isArray(data) ? data : [];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usePremiumBranchesByRegions.js","sourceRoot":"","sources":["../../src/hooks/usePremiumBranchesByRegions.ts"],"names":[],"mappings":";;AAAA,2EAAwE;AACxE,kDAA+E;AAE/E,MAAM,WAAW,GAAG,kCAAkC,CAAC;AAUvD,SAAgB,2BAA2B;IACzC,MAAM,EAAE,IAAI,EAAE,GAAG,IAAA,2BAAY,EAAC,WAAW,EAAE,2BAAgD,CAAC,CAAC;IAE7F,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;AACzC,CAAC;AAJD,kEAIC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usePremiumBranchesByRegions.js","sourceRoot":"","sources":["../../src/hooks/usePremiumBranchesByRegions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,eAAe,EAA4B,MAAM,oBAAoB,CAAC;AAE/E,MAAM,WAAW,GAAG,kCAAkC,CAAC;AAUvD,MAAM,UAAU,2BAA2B;IACzC,MAAM,EAAE,IAAI,EAAE,GAAG,YAAY,CAAC,WAAW,EAAE,eAAgD,CAAC,CAAC;IAE7F,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;AACzC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usePremiumBranchesByRegions.js","sourceRoot":"","sources":["../../src/hooks/usePremiumBranchesByRegions.ts"],"names":[],"mappings":";;AAAA,2EAAwE;AACxE,kDAA+E;AAE/E,MAAM,WAAW,GAAG,kCAAkC,CAAC;AAUvD,SAAgB,2BAA2B;IACzC,MAAM,EAAE,IAAI,EAAE,GAAG,IAAA,2BAAY,EAAC,WAAW,EAAE,2BAAgD,CAAC,CAAC;IAE7F,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;AACzC,CAAC;AAJD,kEAIC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usePremiumBranchesByRegions.js","sourceRoot":"","sources":["../../src/hooks/usePremiumBranchesByRegions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,eAAe,EAA4B,MAAM,oBAAoB,CAAC;AAE/E,MAAM,WAAW,GAAG,kCAAkC,CAAC;AAUvD,MAAM,UAAU,2BAA2B;IACzC,MAAM,EAAE,IAAI,EAAE,GAAG,YAAY,CAAC,WAAW,EAAE,eAAgD,CAAC,CAAC;IAE7F,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;AACzC,CAAC"}
|