@redneckz/wildless-cms-uni-blocks 0.14.1006 → 0.14.1012
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/bundle.umd.js +101 -82
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/retail/api/apiBaseUrl.d.ts +2 -1
- package/bundle/retail/utils/getBaseUrl.d.ts +1 -0
- package/bundle/retail/validator/validators.d.ts +1 -0
- package/dist/components/CalculatorRko/CalculatorRko.js +16 -16
- package/dist/components/CalculatorRko/CalculatorRko.js.map +1 -1
- package/dist/components/DebitForm/DebitFormStatus.js +2 -2
- package/dist/components/DebitForm/DebitFormStatus.js.map +1 -1
- package/dist/components/RkoTariffCardsTable/RkoTariffCard.js +1 -1
- package/dist/components/RkoTariffCardsTable/RkoTariffCard.js.map +1 -1
- package/dist/components/RkoTariffCardsTable/RkoTariffCardsTable.js +3 -3
- package/dist/components/RkoTariffCardsTable/RkoTariffCardsTable.js.map +1 -1
- package/dist/components/RkoTariffCardsTable/constants.js +1 -1
- package/dist/retail/api/apiBaseUrl.d.ts +2 -1
- package/dist/retail/api/apiBaseUrl.js +3 -2
- package/dist/retail/api/apiBaseUrl.js.map +1 -1
- package/dist/retail/api/doRequest.js +3 -4
- package/dist/retail/api/doRequest.js.map +1 -1
- package/dist/retail/components/Fields/CodeWordField.js +12 -1
- package/dist/retail/components/Fields/CodeWordField.js.map +1 -1
- package/dist/retail/hooks/useLeadFormData.js +3 -2
- package/dist/retail/hooks/useLeadFormData.js.map +1 -1
- package/dist/retail/utils/getBaseUrl.d.ts +1 -0
- package/dist/retail/utils/getBaseUrl.js +13 -0
- package/dist/retail/utils/getBaseUrl.js.map +1 -0
- package/dist/retail/validator/validators.d.ts +1 -0
- package/dist/retail/validator/validators.js +3 -3
- package/dist/retail/validator/validators.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.fixture.d.ts +1 -0
- package/lib/components/CalculatorRko/CalculatorRko.js +16 -16
- package/lib/components/CalculatorRko/CalculatorRko.js.map +1 -1
- package/lib/components/DebitForm/DebitFormStatus.js +2 -2
- package/lib/components/DebitForm/DebitFormStatus.js.map +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +1 -1
- package/lib/components/RkoTariffCardsTable/RkoTariffCard.js +1 -1
- package/lib/components/RkoTariffCardsTable/RkoTariffCard.js.map +1 -1
- package/lib/components/RkoTariffCardsTable/RkoTariffCardsTable.js +3 -3
- package/lib/components/RkoTariffCardsTable/RkoTariffCardsTable.js.map +1 -1
- package/lib/components/RkoTariffCardsTable/constants.js +1 -1
- package/lib/retail/api/apiBaseUrl.d.ts +2 -1
- package/lib/retail/api/apiBaseUrl.js +2 -1
- package/lib/retail/api/apiBaseUrl.js.map +1 -1
- package/lib/retail/api/doRequest.js +3 -4
- package/lib/retail/api/doRequest.js.map +1 -1
- package/lib/retail/components/Fields/CodeWordField.js +12 -1
- package/lib/retail/components/Fields/CodeWordField.js.map +1 -1
- package/lib/retail/hooks/useLeadFormData.js +3 -2
- package/lib/retail/hooks/useLeadFormData.js.map +1 -1
- package/lib/retail/utils/getBaseUrl.d.ts +1 -0
- package/lib/retail/utils/getBaseUrl.js +10 -0
- package/lib/retail/utils/getBaseUrl.js.map +1 -0
- package/lib/retail/validator/validators.d.ts +1 -0
- package/lib/retail/validator/validators.js +1 -1
- package/lib/retail/validator/validators.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +101 -82
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/retail/api/apiBaseUrl.d.ts +2 -1
- package/mobile/bundle/retail/utils/getBaseUrl.d.ts +1 -0
- package/mobile/bundle/retail/validator/validators.d.ts +1 -0
- package/mobile/dist/components/CalculatorRko/CalculatorRko.js +16 -16
- package/mobile/dist/components/CalculatorRko/CalculatorRko.js.map +1 -1
- package/mobile/dist/components/DebitForm/DebitFormStatus.js +2 -2
- package/mobile/dist/components/DebitForm/DebitFormStatus.js.map +1 -1
- package/mobile/dist/components/RkoTariffCardsTable/RkoTariffCard.js +1 -1
- package/mobile/dist/components/RkoTariffCardsTable/RkoTariffCard.js.map +1 -1
- package/mobile/dist/components/RkoTariffCardsTable/RkoTariffCardsTable.js +3 -3
- package/mobile/dist/components/RkoTariffCardsTable/RkoTariffCardsTable.js.map +1 -1
- package/mobile/dist/components/RkoTariffCardsTable/constants.js +1 -1
- package/mobile/dist/retail/api/apiBaseUrl.d.ts +2 -1
- package/mobile/dist/retail/api/apiBaseUrl.js +3 -2
- package/mobile/dist/retail/api/apiBaseUrl.js.map +1 -1
- package/mobile/dist/retail/api/doRequest.js +3 -4
- package/mobile/dist/retail/api/doRequest.js.map +1 -1
- package/mobile/dist/retail/components/Fields/CodeWordField.js +12 -1
- package/mobile/dist/retail/components/Fields/CodeWordField.js.map +1 -1
- package/mobile/dist/retail/hooks/useLeadFormData.js +3 -2
- package/mobile/dist/retail/hooks/useLeadFormData.js.map +1 -1
- package/mobile/dist/retail/utils/getBaseUrl.d.ts +1 -0
- package/mobile/dist/retail/utils/getBaseUrl.js +13 -0
- package/mobile/dist/retail/utils/getBaseUrl.js.map +1 -0
- package/mobile/dist/retail/validator/validators.d.ts +1 -0
- package/mobile/dist/retail/validator/validators.js +3 -3
- package/mobile/dist/retail/validator/validators.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/CalculatorRko/CalculatorRko.js +16 -16
- package/mobile/lib/components/CalculatorRko/CalculatorRko.js.map +1 -1
- package/mobile/lib/components/DebitForm/DebitFormStatus.js +2 -2
- package/mobile/lib/components/DebitForm/DebitFormStatus.js.map +1 -1
- package/mobile/lib/components/RkoTariffCardsTable/RkoTariffCard.js +1 -1
- package/mobile/lib/components/RkoTariffCardsTable/RkoTariffCard.js.map +1 -1
- package/mobile/lib/components/RkoTariffCardsTable/RkoTariffCardsTable.js +3 -3
- package/mobile/lib/components/RkoTariffCardsTable/RkoTariffCardsTable.js.map +1 -1
- package/mobile/lib/components/RkoTariffCardsTable/constants.js +1 -1
- package/mobile/lib/retail/api/apiBaseUrl.d.ts +2 -1
- package/mobile/lib/retail/api/apiBaseUrl.js +2 -1
- package/mobile/lib/retail/api/apiBaseUrl.js.map +1 -1
- package/mobile/lib/retail/api/doRequest.js +3 -4
- package/mobile/lib/retail/api/doRequest.js.map +1 -1
- package/mobile/lib/retail/components/Fields/CodeWordField.js +12 -1
- package/mobile/lib/retail/components/Fields/CodeWordField.js.map +1 -1
- package/mobile/lib/retail/hooks/useLeadFormData.js +3 -2
- package/mobile/lib/retail/hooks/useLeadFormData.js.map +1 -1
- package/mobile/lib/retail/utils/getBaseUrl.d.ts +1 -0
- package/mobile/lib/retail/utils/getBaseUrl.js +10 -0
- package/mobile/lib/retail/utils/getBaseUrl.js.map +1 -0
- package/mobile/lib/retail/validator/validators.d.ts +1 -0
- package/mobile/lib/retail/validator/validators.js +1 -1
- package/mobile/lib/retail/validator/validators.js.map +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationForm.example.json +2 -3
- package/mobile/src/components/CalculatorRko/CalculatorRko.tsx +4 -4
- package/mobile/src/components/DebitForm/DebitFormStatus.tsx +2 -2
- package/mobile/src/components/RkoTariffCardsTable/RkoTariffCard.tsx +1 -1
- package/mobile/src/components/RkoTariffCardsTable/RkoTariffCardsTable.tsx +5 -3
- package/mobile/src/components/RkoTariffCardsTable/constants.ts +1 -1
- package/mobile/src/retail/api/apiBaseUrl.ts +2 -1
- package/mobile/src/retail/api/doRequest.ts +13 -17
- package/mobile/src/retail/components/Fields/CodeWordField.tsx +24 -8
- package/mobile/src/retail/hooks/useLeadFormData.ts +4 -3
- package/mobile/src/retail/utils/getBaseUrl.ts +17 -0
- package/mobile/src/retail/validator/validators.ts +1 -1
- package/package.json +1 -1
- package/src/components/ApplicationForm/ApplicationForm.example.json +2 -3
- package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +1 -2
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.fixture.tsx +15 -0
- package/src/components/CalculatorRko/CalculatorRko.tsx +4 -4
- package/src/components/DebitForm/DebitFormStatus.tsx +2 -2
- package/src/components/RkoTariffCardsTable/RkoTariffCard.tsx +1 -1
- package/src/components/RkoTariffCardsTable/RkoTariffCardsTable.tsx +5 -3
- package/src/components/RkoTariffCardsTable/constants.ts +1 -1
- package/src/retail/api/apiBaseUrl.ts +2 -1
- package/src/retail/api/doRequest.ts +13 -17
- package/src/retail/components/Fields/CodeWordField.tsx +24 -8
- package/src/retail/hooks/useLeadFormData.ts +4 -3
- package/src/retail/utils/getBaseUrl.ts +17 -0
- package/src/retail/validator/validators.ts +1 -1
|
@@ -110,11 +110,10 @@ export const CalculatorRko = UniBlock<RkoCalculatorProps>(
|
|
|
110
110
|
</div>
|
|
111
111
|
))}
|
|
112
112
|
</div>
|
|
113
|
-
<div className={style(CalculatorStyle.result)}>{renderFootnote(footnote)}</div>
|
|
114
113
|
</section>
|
|
115
114
|
</CalculatorLayout>
|
|
116
115
|
<BlockWrapper
|
|
117
|
-
className={style('flex flex-col
|
|
116
|
+
className={style('flex flex-col items-center', className)}
|
|
118
117
|
defaultPadding="p-4xl pt-0"
|
|
119
118
|
{...rest}
|
|
120
119
|
>
|
|
@@ -128,6 +127,7 @@ export const CalculatorRko = UniBlock<RkoCalculatorProps>(
|
|
|
128
127
|
) : (
|
|
129
128
|
<Loader position="static" />
|
|
130
129
|
)}
|
|
130
|
+
<div className={style(CalculatorStyle.result)}>{renderFootnote(footnote)}</div>
|
|
131
131
|
</BlockWrapper>
|
|
132
132
|
</div>
|
|
133
133
|
);
|
|
@@ -135,7 +135,7 @@ export const CalculatorRko = UniBlock<RkoCalculatorProps>(
|
|
|
135
135
|
);
|
|
136
136
|
|
|
137
137
|
const renderHeading = () => (
|
|
138
|
-
<Text size="text-h6" font="font-medium" align="text-center" className="block lg:mb-
|
|
139
|
-
|
|
138
|
+
<Text size="text-h6" font="font-medium" align="text-center" className="block lg:mb-xl mb-m">
|
|
139
|
+
Расчёты за один месяц по введенным выше параметрам
|
|
140
140
|
</Text>
|
|
141
141
|
);
|
|
@@ -15,7 +15,7 @@ type DebitFormStatusProps = UniBlockProps &
|
|
|
15
15
|
isDboClient?: boolean;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
const INTERNET_BANK_LINK = 'https://online.rshb.ru/
|
|
18
|
+
const INTERNET_BANK_LINK = 'https://online.rshb.ru/d?l=dcNqSvOE';
|
|
19
19
|
|
|
20
20
|
export const DebitFormStatus = JSX<DebitFormStatusProps>(
|
|
21
21
|
({ title, description: dsc, sectionInfo, buttonText, isDboClient, ...props }) => {
|
|
@@ -50,7 +50,7 @@ export const DebitFormStatus = JSX<DebitFormStatusProps>(
|
|
|
50
50
|
/>
|
|
51
51
|
<LinkButton
|
|
52
52
|
href={INTERNET_BANK_LINK}
|
|
53
|
-
text="
|
|
53
|
+
text="Выпустить карту в приложении"
|
|
54
54
|
version="primary"
|
|
55
55
|
className="w-full mt-lg"
|
|
56
56
|
/>
|
|
@@ -57,7 +57,7 @@ export const RkoTariffCard = JSX(
|
|
|
57
57
|
<div
|
|
58
58
|
className={style(
|
|
59
59
|
className,
|
|
60
|
-
'rounded-xl min-h-24 items-center min-w-0 lg:p-xl p-3xl',
|
|
60
|
+
'rounded-xl min-h-24 items-center min-w-0 lg:p-xl p-3xl lg:mb-m mb-xl',
|
|
61
61
|
isBest
|
|
62
62
|
? 'bg-primary-main text-white relative'
|
|
63
63
|
: 'bg-white text-primary-text border border-solid border-gray',
|
|
@@ -21,10 +21,12 @@ export const RkoTariffCardsTable = JSX(
|
|
|
21
21
|
const commissionTypes: CommissionKey[] = getSortedCommissionTypes(items) ?? [];
|
|
22
22
|
const columnsCount = commissionTypes.length + 4; // 2 на "Название тарифа" и 2 на кнопку
|
|
23
23
|
|
|
24
|
-
const tableLayoutStyle = `lg:grid lg:grid-cols-${String(
|
|
24
|
+
const tableLayoutStyle = `lg:grid lg:grid-cols-${String(
|
|
25
|
+
columnsCount,
|
|
26
|
+
)} gap-m lg:px-xl px-3xl order-first lg:mb-m mb-xl`;
|
|
25
27
|
|
|
26
28
|
return (
|
|
27
|
-
<div className="
|
|
29
|
+
<div className="w-full flex flex-col mt-s">
|
|
28
30
|
{isMobileMode
|
|
29
31
|
? null
|
|
30
32
|
: renderRkoTariffsTableHeader({
|
|
@@ -33,7 +35,7 @@ export const RkoTariffCardsTable = JSX(
|
|
|
33
35
|
})}
|
|
34
36
|
|
|
35
37
|
{items.map((item, index) => (
|
|
36
|
-
<div key={index}>
|
|
38
|
+
<div key={index} className={item?.isBest ? 'order-first' : ''}>
|
|
37
39
|
<RkoTariffCard
|
|
38
40
|
{...item}
|
|
39
41
|
className={tableLayoutStyle}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const RKO_COMMISSIONS_TITLE_MAP: Record<string, string> = {
|
|
2
2
|
tariffName: 'Название тарифа',
|
|
3
|
-
accountServiceFee: 'Обслуживание
|
|
3
|
+
accountServiceFee: 'Обслуживание счёта',
|
|
4
4
|
transferLegalCountCommission: 'Переводы Юрлицам и ИП',
|
|
5
5
|
flTransferSumCommission: 'Переводы физлицам',
|
|
6
6
|
cashOutSumCommission: 'Снятие наличных',
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export const RETAIL_API_BASE_URI = '/light-api-cash/v1';
|
|
2
|
-
export const
|
|
2
|
+
export const NEW_RETAIL_CREDIT_API_BASE_URI = '/api/credit-application';
|
|
3
|
+
export const NEW_RETAIL_CREDIT_CARD_API_BASE_URI = '/api/creditcard-application';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { NEW_RETAIL_API_BASE_URI, RETAIL_API_BASE_URI } from './apiBaseUrl';
|
|
1
|
+
import { getBaseUrl } from '../utils/getBaseUrl';
|
|
3
2
|
import { getTraceId } from './getTraceId';
|
|
4
3
|
|
|
5
4
|
export const fetchRetailJSON = async <R>(
|
|
@@ -23,24 +22,21 @@ export async function doRequest(
|
|
|
23
22
|
method: 'POST' | 'GET' | 'PUT',
|
|
24
23
|
body?: any,
|
|
25
24
|
): Promise<Response> {
|
|
26
|
-
const
|
|
25
|
+
const baseUrl = getBaseUrl();
|
|
27
26
|
const traceId = getTraceId();
|
|
28
27
|
|
|
29
|
-
return globalThis?.fetch?.(
|
|
30
|
-
|
|
31
|
-
{
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
'X-B3-Traceid': traceId,
|
|
38
|
-
...getAuthorizationHeaders(),
|
|
39
|
-
},
|
|
40
|
-
credentials: 'include',
|
|
41
|
-
body: body ? JSON.stringify(body) : null,
|
|
28
|
+
return globalThis?.fetch?.(`${baseUrl}${url}`, {
|
|
29
|
+
method,
|
|
30
|
+
headers: {
|
|
31
|
+
'Content-Type': 'application/json',
|
|
32
|
+
'X-B3-Sampled': '1',
|
|
33
|
+
'X-B3-Spanid': traceId,
|
|
34
|
+
'X-B3-Traceid': traceId,
|
|
35
|
+
...getAuthorizationHeaders(),
|
|
42
36
|
},
|
|
43
|
-
|
|
37
|
+
credentials: 'include',
|
|
38
|
+
body: body ? JSON.stringify(body) : null,
|
|
39
|
+
});
|
|
44
40
|
}
|
|
45
41
|
|
|
46
42
|
export const getAuthorizationHeaders = () => {
|
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
3
|
import { type CustomFieldProps } from '../../../ui-kit/FormField/CustomFieldProps';
|
|
4
|
+
import { autoLayoutKeyboard } from '../../utils/autoLayoutKeyboard';
|
|
5
|
+
import { codeWordPattern } from '../../validator/validators';
|
|
3
6
|
import { DaDataInputControl } from '../DaDataInputControl/DaDataInputControl';
|
|
4
7
|
|
|
5
|
-
export const CodeWordField = JSX<CustomFieldProps>(({ field, input }) =>
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
export const CodeWordField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
9
|
+
const onChange = useCallback(
|
|
10
|
+
(value: string) => {
|
|
11
|
+
const translatedValue = autoLayoutKeyboard(value);
|
|
12
|
+
if (codeWordPattern.test(translatedValue) || translatedValue.length === 0) {
|
|
13
|
+
field(input?.name ?? '')?.onChange?.(translatedValue);
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
[field, input],
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<DaDataInputControl
|
|
21
|
+
label="Кодовое слово"
|
|
22
|
+
maxLength={20}
|
|
23
|
+
{...field(input?.name ?? '')}
|
|
24
|
+
{...input}
|
|
25
|
+
onChange={onChange}
|
|
26
|
+
/>
|
|
27
|
+
);
|
|
28
|
+
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useAsyncData } from '@redneckz/uni-jsx/lib/hooks/useAsyncData';
|
|
2
2
|
import { fetchJSON } from '../../utils/fetchJSON';
|
|
3
|
-
import { NEW_RETAIL_API_BASE_URI, RETAIL_API_BASE_URI } from '../api/apiBaseUrl';
|
|
4
3
|
import { type DictionaryItem } from '../model/LeadFormData';
|
|
5
4
|
import { checkNewMicroservice } from '../utils/checkNewMicroservice';
|
|
5
|
+
import { getBaseUrl } from '../utils/getBaseUrl';
|
|
6
6
|
|
|
7
7
|
type ErrorProps = {
|
|
8
8
|
errorMessage?: string;
|
|
@@ -10,10 +10,11 @@ type ErrorProps = {
|
|
|
10
10
|
|
|
11
11
|
export const useLeadFormData = (typeField: string) => {
|
|
12
12
|
const isNewMicroservice = checkNewMicroservice();
|
|
13
|
+
const baseUrl = getBaseUrl();
|
|
13
14
|
|
|
14
15
|
const { data, error } = useAsyncData(
|
|
15
|
-
`${
|
|
16
|
-
isNewMicroservice ?
|
|
16
|
+
`${baseUrl}${
|
|
17
|
+
isNewMicroservice ? `/public-data` : ''
|
|
17
18
|
}/dictionary?dictionaryType=${encodeURIComponent(typeField)}`,
|
|
18
19
|
fetchData,
|
|
19
20
|
);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NEW_RETAIL_CREDIT_API_BASE_URI,
|
|
3
|
+
NEW_RETAIL_CREDIT_CARD_API_BASE_URI,
|
|
4
|
+
RETAIL_API_BASE_URI,
|
|
5
|
+
} from '../api/apiBaseUrl';
|
|
6
|
+
|
|
7
|
+
export const getBaseUrl = () => {
|
|
8
|
+
const isNewMicroservice = globalThis.sessionStorage?.getItem('isNewMicroservice');
|
|
9
|
+
const productType = globalThis.localStorage?.getItem('productType');
|
|
10
|
+
|
|
11
|
+
const newRetailApi =
|
|
12
|
+
productType === '"credit"'
|
|
13
|
+
? NEW_RETAIL_CREDIT_API_BASE_URI
|
|
14
|
+
: NEW_RETAIL_CREDIT_CARD_API_BASE_URI;
|
|
15
|
+
|
|
16
|
+
return isNewMicroservice ? newRetailApi : RETAIL_API_BASE_URI;
|
|
17
|
+
};
|
|
@@ -12,7 +12,7 @@ export interface LimitedBirthdayValidationParams {
|
|
|
12
12
|
errorMessage: string;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
const codeWordPattern = /^[
|
|
15
|
+
export const codeWordPattern = /^[а-яёА-ЯЁ\d]+$/u;
|
|
16
16
|
export const retailCyrillicPattern = /^[\u0400-\u04FF-\s]+$/u;
|
|
17
17
|
export const retailNotCyrillicPattern = /^(?!\s*$)[^\p{Script=Cyrillic}]+$/u;
|
|
18
18
|
|
package/package.json
CHANGED
|
@@ -1743,13 +1743,12 @@
|
|
|
1743
1743
|
{ "name": "university", "required": true },
|
|
1744
1744
|
{ "name": "fieldOfStudy", "required": true },
|
|
1745
1745
|
{ "name": "courseYear", "required": true },
|
|
1746
|
-
{ "name": "graduationYear", "required": true }
|
|
1747
|
-
{ "name": "averageGrade", "required": true },
|
|
1748
|
-
{ "name": "educationLevel", "required": true }
|
|
1746
|
+
{ "name": "graduationYear", "required": true }
|
|
1749
1747
|
]
|
|
1750
1748
|
},
|
|
1751
1749
|
{
|
|
1752
1750
|
"inputs": [
|
|
1751
|
+
{ "name": "educationLevel", "required": true },
|
|
1753
1752
|
{
|
|
1754
1753
|
"name": "skillsAndKnowledge",
|
|
1755
1754
|
"placeholder": "Навыки и знания. Что умеете делать?",
|
|
@@ -1058,12 +1058,11 @@ export default {
|
|
|
1058
1058
|
{ name: 'fieldOfStudy', required: true },
|
|
1059
1059
|
{ name: 'courseYear', required: true },
|
|
1060
1060
|
{ name: 'graduationYear', required: true },
|
|
1061
|
-
{ name: 'averageGrade', required: true },
|
|
1062
|
-
{ name: 'educationLevel', required: true },
|
|
1063
1061
|
],
|
|
1064
1062
|
},
|
|
1065
1063
|
{
|
|
1066
1064
|
inputs: [
|
|
1065
|
+
{ name: 'educationLevel', required: true },
|
|
1067
1066
|
{
|
|
1068
1067
|
name: 'skillsAndKnowledge',
|
|
1069
1068
|
placeholder: 'Навыки и знания. Что умеете делать?',
|
|
@@ -39,6 +39,21 @@ export default {
|
|
|
39
39
|
</div>
|
|
40
40
|
),
|
|
41
41
|
|
|
42
|
+
newMicroserviceCC: (
|
|
43
|
+
<div className="container grid grid-cols-12">
|
|
44
|
+
<ApplicationLeadForm
|
|
45
|
+
className="col-span-12"
|
|
46
|
+
title="Заявка на кредит"
|
|
47
|
+
programId="13"
|
|
48
|
+
productType="creditCard"
|
|
49
|
+
button={button}
|
|
50
|
+
isNewMicroservice={true}
|
|
51
|
+
/>
|
|
52
|
+
<PopupManager />
|
|
53
|
+
<DialogManager />
|
|
54
|
+
</div>
|
|
55
|
+
),
|
|
56
|
+
|
|
42
57
|
creditCard: (
|
|
43
58
|
<div className="container grid grid-cols-12">
|
|
44
59
|
<ApplicationLeadForm
|
|
@@ -110,11 +110,10 @@ export const CalculatorRko = UniBlock<RkoCalculatorProps>(
|
|
|
110
110
|
</div>
|
|
111
111
|
))}
|
|
112
112
|
</div>
|
|
113
|
-
<div className={style(CalculatorStyle.result)}>{renderFootnote(footnote)}</div>
|
|
114
113
|
</section>
|
|
115
114
|
</CalculatorLayout>
|
|
116
115
|
<BlockWrapper
|
|
117
|
-
className={style('flex flex-col
|
|
116
|
+
className={style('flex flex-col items-center', className)}
|
|
118
117
|
defaultPadding="p-4xl pt-0"
|
|
119
118
|
{...rest}
|
|
120
119
|
>
|
|
@@ -128,6 +127,7 @@ export const CalculatorRko = UniBlock<RkoCalculatorProps>(
|
|
|
128
127
|
) : (
|
|
129
128
|
<Loader position="static" />
|
|
130
129
|
)}
|
|
130
|
+
<div className={style(CalculatorStyle.result)}>{renderFootnote(footnote)}</div>
|
|
131
131
|
</BlockWrapper>
|
|
132
132
|
</div>
|
|
133
133
|
);
|
|
@@ -135,7 +135,7 @@ export const CalculatorRko = UniBlock<RkoCalculatorProps>(
|
|
|
135
135
|
);
|
|
136
136
|
|
|
137
137
|
const renderHeading = () => (
|
|
138
|
-
<Text size="text-h6" font="font-medium" align="text-center" className="block lg:mb-
|
|
139
|
-
|
|
138
|
+
<Text size="text-h6" font="font-medium" align="text-center" className="block lg:mb-xl mb-m">
|
|
139
|
+
Расчёты за один месяц по введенным выше параметрам
|
|
140
140
|
</Text>
|
|
141
141
|
);
|
|
@@ -15,7 +15,7 @@ type DebitFormStatusProps = UniBlockProps &
|
|
|
15
15
|
isDboClient?: boolean;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
const INTERNET_BANK_LINK = 'https://online.rshb.ru/
|
|
18
|
+
const INTERNET_BANK_LINK = 'https://online.rshb.ru/d?l=dcNqSvOE';
|
|
19
19
|
|
|
20
20
|
export const DebitFormStatus = JSX<DebitFormStatusProps>(
|
|
21
21
|
({ title, description: dsc, sectionInfo, buttonText, isDboClient, ...props }) => {
|
|
@@ -50,7 +50,7 @@ export const DebitFormStatus = JSX<DebitFormStatusProps>(
|
|
|
50
50
|
/>
|
|
51
51
|
<LinkButton
|
|
52
52
|
href={INTERNET_BANK_LINK}
|
|
53
|
-
text="
|
|
53
|
+
text="Выпустить карту в приложении"
|
|
54
54
|
version="primary"
|
|
55
55
|
className="w-full mt-lg"
|
|
56
56
|
/>
|
|
@@ -57,7 +57,7 @@ export const RkoTariffCard = JSX(
|
|
|
57
57
|
<div
|
|
58
58
|
className={style(
|
|
59
59
|
className,
|
|
60
|
-
'rounded-xl min-h-24 items-center min-w-0 lg:p-xl p-3xl',
|
|
60
|
+
'rounded-xl min-h-24 items-center min-w-0 lg:p-xl p-3xl lg:mb-m mb-xl',
|
|
61
61
|
isBest
|
|
62
62
|
? 'bg-primary-main text-white relative'
|
|
63
63
|
: 'bg-white text-primary-text border border-solid border-gray',
|
|
@@ -21,10 +21,12 @@ export const RkoTariffCardsTable = JSX(
|
|
|
21
21
|
const commissionTypes: CommissionKey[] = getSortedCommissionTypes(items) ?? [];
|
|
22
22
|
const columnsCount = commissionTypes.length + 4; // 2 на "Название тарифа" и 2 на кнопку
|
|
23
23
|
|
|
24
|
-
const tableLayoutStyle = `lg:grid lg:grid-cols-${String(
|
|
24
|
+
const tableLayoutStyle = `lg:grid lg:grid-cols-${String(
|
|
25
|
+
columnsCount,
|
|
26
|
+
)} gap-m lg:px-xl px-3xl order-first lg:mb-m mb-xl`;
|
|
25
27
|
|
|
26
28
|
return (
|
|
27
|
-
<div className="
|
|
29
|
+
<div className="w-full flex flex-col mt-s">
|
|
28
30
|
{isMobileMode
|
|
29
31
|
? null
|
|
30
32
|
: renderRkoTariffsTableHeader({
|
|
@@ -33,7 +35,7 @@ export const RkoTariffCardsTable = JSX(
|
|
|
33
35
|
})}
|
|
34
36
|
|
|
35
37
|
{items.map((item, index) => (
|
|
36
|
-
<div key={index}>
|
|
38
|
+
<div key={index} className={item?.isBest ? 'order-first' : ''}>
|
|
37
39
|
<RkoTariffCard
|
|
38
40
|
{...item}
|
|
39
41
|
className={tableLayoutStyle}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const RKO_COMMISSIONS_TITLE_MAP: Record<string, string> = {
|
|
2
2
|
tariffName: 'Название тарифа',
|
|
3
|
-
accountServiceFee: 'Обслуживание
|
|
3
|
+
accountServiceFee: 'Обслуживание счёта',
|
|
4
4
|
transferLegalCountCommission: 'Переводы Юрлицам и ИП',
|
|
5
5
|
flTransferSumCommission: 'Переводы физлицам',
|
|
6
6
|
cashOutSumCommission: 'Снятие наличных',
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export const RETAIL_API_BASE_URI = '/light-api-cash/v1';
|
|
2
|
-
export const
|
|
2
|
+
export const NEW_RETAIL_CREDIT_API_BASE_URI = '/api/credit-application';
|
|
3
|
+
export const NEW_RETAIL_CREDIT_CARD_API_BASE_URI = '/api/creditcard-application';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { NEW_RETAIL_API_BASE_URI, RETAIL_API_BASE_URI } from './apiBaseUrl';
|
|
1
|
+
import { getBaseUrl } from '../utils/getBaseUrl';
|
|
3
2
|
import { getTraceId } from './getTraceId';
|
|
4
3
|
|
|
5
4
|
export const fetchRetailJSON = async <R>(
|
|
@@ -23,24 +22,21 @@ export async function doRequest(
|
|
|
23
22
|
method: 'POST' | 'GET' | 'PUT',
|
|
24
23
|
body?: any,
|
|
25
24
|
): Promise<Response> {
|
|
26
|
-
const
|
|
25
|
+
const baseUrl = getBaseUrl();
|
|
27
26
|
const traceId = getTraceId();
|
|
28
27
|
|
|
29
|
-
return globalThis?.fetch?.(
|
|
30
|
-
|
|
31
|
-
{
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
'X-B3-Traceid': traceId,
|
|
38
|
-
...getAuthorizationHeaders(),
|
|
39
|
-
},
|
|
40
|
-
credentials: 'include',
|
|
41
|
-
body: body ? JSON.stringify(body) : null,
|
|
28
|
+
return globalThis?.fetch?.(`${baseUrl}${url}`, {
|
|
29
|
+
method,
|
|
30
|
+
headers: {
|
|
31
|
+
'Content-Type': 'application/json',
|
|
32
|
+
'X-B3-Sampled': '1',
|
|
33
|
+
'X-B3-Spanid': traceId,
|
|
34
|
+
'X-B3-Traceid': traceId,
|
|
35
|
+
...getAuthorizationHeaders(),
|
|
42
36
|
},
|
|
43
|
-
|
|
37
|
+
credentials: 'include',
|
|
38
|
+
body: body ? JSON.stringify(body) : null,
|
|
39
|
+
});
|
|
44
40
|
}
|
|
45
41
|
|
|
46
42
|
export const getAuthorizationHeaders = () => {
|
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
3
|
import { type CustomFieldProps } from '../../../ui-kit/FormField/CustomFieldProps';
|
|
4
|
+
import { autoLayoutKeyboard } from '../../utils/autoLayoutKeyboard';
|
|
5
|
+
import { codeWordPattern } from '../../validator/validators';
|
|
3
6
|
import { DaDataInputControl } from '../DaDataInputControl/DaDataInputControl';
|
|
4
7
|
|
|
5
|
-
export const CodeWordField = JSX<CustomFieldProps>(({ field, input }) =>
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
export const CodeWordField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
9
|
+
const onChange = useCallback(
|
|
10
|
+
(value: string) => {
|
|
11
|
+
const translatedValue = autoLayoutKeyboard(value);
|
|
12
|
+
if (codeWordPattern.test(translatedValue) || translatedValue.length === 0) {
|
|
13
|
+
field(input?.name ?? '')?.onChange?.(translatedValue);
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
[field, input],
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<DaDataInputControl
|
|
21
|
+
label="Кодовое слово"
|
|
22
|
+
maxLength={20}
|
|
23
|
+
{...field(input?.name ?? '')}
|
|
24
|
+
{...input}
|
|
25
|
+
onChange={onChange}
|
|
26
|
+
/>
|
|
27
|
+
);
|
|
28
|
+
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useAsyncData } from '@redneckz/uni-jsx/lib/hooks/useAsyncData';
|
|
2
2
|
import { fetchJSON } from '../../utils/fetchJSON';
|
|
3
|
-
import { NEW_RETAIL_API_BASE_URI, RETAIL_API_BASE_URI } from '../api/apiBaseUrl';
|
|
4
3
|
import { type DictionaryItem } from '../model/LeadFormData';
|
|
5
4
|
import { checkNewMicroservice } from '../utils/checkNewMicroservice';
|
|
5
|
+
import { getBaseUrl } from '../utils/getBaseUrl';
|
|
6
6
|
|
|
7
7
|
type ErrorProps = {
|
|
8
8
|
errorMessage?: string;
|
|
@@ -10,10 +10,11 @@ type ErrorProps = {
|
|
|
10
10
|
|
|
11
11
|
export const useLeadFormData = (typeField: string) => {
|
|
12
12
|
const isNewMicroservice = checkNewMicroservice();
|
|
13
|
+
const baseUrl = getBaseUrl();
|
|
13
14
|
|
|
14
15
|
const { data, error } = useAsyncData(
|
|
15
|
-
`${
|
|
16
|
-
isNewMicroservice ?
|
|
16
|
+
`${baseUrl}${
|
|
17
|
+
isNewMicroservice ? `/public-data` : ''
|
|
17
18
|
}/dictionary?dictionaryType=${encodeURIComponent(typeField)}`,
|
|
18
19
|
fetchData,
|
|
19
20
|
);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NEW_RETAIL_CREDIT_API_BASE_URI,
|
|
3
|
+
NEW_RETAIL_CREDIT_CARD_API_BASE_URI,
|
|
4
|
+
RETAIL_API_BASE_URI,
|
|
5
|
+
} from '../api/apiBaseUrl';
|
|
6
|
+
|
|
7
|
+
export const getBaseUrl = () => {
|
|
8
|
+
const isNewMicroservice = globalThis.sessionStorage?.getItem('isNewMicroservice');
|
|
9
|
+
const productType = globalThis.localStorage?.getItem('productType');
|
|
10
|
+
|
|
11
|
+
const newRetailApi =
|
|
12
|
+
productType === '"credit"'
|
|
13
|
+
? NEW_RETAIL_CREDIT_API_BASE_URI
|
|
14
|
+
: NEW_RETAIL_CREDIT_CARD_API_BASE_URI;
|
|
15
|
+
|
|
16
|
+
return isNewMicroservice ? newRetailApi : RETAIL_API_BASE_URI;
|
|
17
|
+
};
|
|
@@ -12,7 +12,7 @@ export interface LimitedBirthdayValidationParams {
|
|
|
12
12
|
errorMessage: string;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
const codeWordPattern = /^[
|
|
15
|
+
export const codeWordPattern = /^[а-яёА-ЯЁ\d]+$/u;
|
|
16
16
|
export const retailCyrillicPattern = /^[\u0400-\u04FF-\s]+$/u;
|
|
17
17
|
export const retailNotCyrillicPattern = /^(?!\s*$)[^\p{Script=Cyrillic}]+$/u;
|
|
18
18
|
|