@redneckz/wildless-cms-uni-blocks 0.14.986 → 0.14.988
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 +68 -35
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/CalculatorCredit/utils.d.ts +12 -0
- package/bundle/components/CreditForm/getCreditInfo.d.ts +4 -0
- package/dist/components/CalculatorCredit/CalculatorCredit.js +4 -14
- package/dist/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
- package/dist/components/CalculatorCredit/utils.d.ts +12 -0
- package/dist/components/CalculatorCredit/utils.js +18 -0
- package/dist/components/CalculatorCredit/utils.js.map +1 -0
- package/dist/components/CreditForm/PendingStatusContent.js +5 -3
- package/dist/components/CreditForm/PendingStatusContent.js.map +1 -1
- package/dist/components/CreditForm/SuccessStatusContent.js +4 -2
- package/dist/components/CreditForm/SuccessStatusContent.js.map +1 -1
- package/dist/components/CreditForm/getCreditInfo.d.ts +4 -0
- package/dist/components/CreditForm/getCreditInfo.js +21 -0
- package/dist/components/CreditForm/getCreditInfo.js.map +1 -0
- package/dist/retail/components/Fields/CreditCalcField.js +16 -5
- package/dist/retail/components/Fields/CreditCalcField.js.map +1 -1
- package/lib/components/CalculatorCredit/CalculatorCredit.js +4 -14
- package/lib/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
- package/lib/components/CalculatorCredit/utils.d.ts +12 -0
- package/lib/components/CalculatorCredit/utils.js +15 -0
- package/lib/components/CalculatorCredit/utils.js.map +1 -0
- package/lib/components/CreditForm/PendingStatusContent.js +5 -3
- package/lib/components/CreditForm/PendingStatusContent.js.map +1 -1
- package/lib/components/CreditForm/SuccessStatusContent.js +4 -2
- package/lib/components/CreditForm/SuccessStatusContent.js.map +1 -1
- package/lib/components/CreditForm/getCreditInfo.d.ts +4 -0
- package/lib/components/CreditForm/getCreditInfo.js +18 -0
- package/lib/components/CreditForm/getCreditInfo.js.map +1 -0
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +1 -1
- package/lib/retail/components/Fields/CreditCalcField.js +17 -6
- package/lib/retail/components/Fields/CreditCalcField.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +68 -35
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/CalculatorCredit/utils.d.ts +12 -0
- package/mobile/bundle/components/CreditForm/getCreditInfo.d.ts +4 -0
- package/mobile/dist/components/CalculatorCredit/CalculatorCredit.js +4 -14
- package/mobile/dist/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
- package/mobile/dist/components/CalculatorCredit/utils.d.ts +12 -0
- package/mobile/dist/components/CalculatorCredit/utils.js +18 -0
- package/mobile/dist/components/CalculatorCredit/utils.js.map +1 -0
- package/mobile/dist/components/CreditForm/PendingStatusContent.js +5 -3
- package/mobile/dist/components/CreditForm/PendingStatusContent.js.map +1 -1
- package/mobile/dist/components/CreditForm/SuccessStatusContent.js +4 -2
- package/mobile/dist/components/CreditForm/SuccessStatusContent.js.map +1 -1
- package/mobile/dist/components/CreditForm/getCreditInfo.d.ts +4 -0
- package/mobile/dist/components/CreditForm/getCreditInfo.js +21 -0
- package/mobile/dist/components/CreditForm/getCreditInfo.js.map +1 -0
- package/mobile/dist/retail/components/Fields/CreditCalcField.js +16 -5
- package/mobile/dist/retail/components/Fields/CreditCalcField.js.map +1 -1
- package/mobile/lib/components/CalculatorCredit/CalculatorCredit.js +4 -14
- package/mobile/lib/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
- package/mobile/lib/components/CalculatorCredit/utils.d.ts +12 -0
- package/mobile/lib/components/CalculatorCredit/utils.js +15 -0
- package/mobile/lib/components/CalculatorCredit/utils.js.map +1 -0
- package/mobile/lib/components/CreditForm/PendingStatusContent.js +5 -3
- package/mobile/lib/components/CreditForm/PendingStatusContent.js.map +1 -1
- package/mobile/lib/components/CreditForm/SuccessStatusContent.js +4 -2
- package/mobile/lib/components/CreditForm/SuccessStatusContent.js.map +1 -1
- package/mobile/lib/components/CreditForm/getCreditInfo.d.ts +4 -0
- package/mobile/lib/components/CreditForm/getCreditInfo.js +18 -0
- package/mobile/lib/components/CreditForm/getCreditInfo.js.map +1 -0
- package/mobile/lib/retail/components/Fields/CreditCalcField.js +17 -6
- package/mobile/lib/retail/components/Fields/CreditCalcField.js.map +1 -1
- package/mobile/src/components/CalculatorCredit/CalculatorCredit.tsx +4 -21
- package/mobile/src/components/CalculatorCredit/utils.ts +20 -0
- package/mobile/src/components/CreditForm/PendingStatusContent.tsx +6 -3
- package/mobile/src/components/CreditForm/SuccessStatusContent.tsx +5 -2
- package/mobile/src/components/CreditForm/getCreditInfo.ts +17 -0
- package/mobile/src/retail/components/Fields/CreditCalcField.tsx +23 -7
- package/package.json +1 -1
- package/src/components/CalculatorCredit/CalculatorCredit.tsx +4 -21
- package/src/components/CalculatorCredit/utils.ts +20 -0
- package/src/components/CreditForm/PendingStatusContent.tsx +6 -3
- package/src/components/CreditForm/SuccessStatusContent.tsx +5 -2
- package/src/components/CreditForm/getCreditInfo.ts +17 -0
- package/src/retail/components/Fields/CreditCalcField.tsx +23 -7
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { FormStatus } from '../../retail/components/FormStatus/FormStatus';
|
|
3
3
|
import { useRetailFormStore } from '../../retail/hooks/useRetailFormStore';
|
|
4
|
+
import { getCreditInfo } from './getCreditInfo';
|
|
4
5
|
|
|
5
6
|
export const PendingStatusContent = JSX(({ onExpire }: { onExpire: () => void }) => {
|
|
6
|
-
const { statusInfo } = useRetailFormStore();
|
|
7
|
+
const { statusInfo, programId } = useRetailFormStore();
|
|
8
|
+
|
|
9
|
+
const creditInfo = getCreditInfo(programId);
|
|
7
10
|
|
|
8
11
|
return (
|
|
9
12
|
<FormStatus
|
|
@@ -14,11 +17,11 @@ export const PendingStatusContent = JSX(({ onExpire }: { onExpire: () => void })
|
|
|
14
17
|
sectionInfo={[
|
|
15
18
|
{
|
|
16
19
|
label: 'Название продукта',
|
|
17
|
-
description:
|
|
20
|
+
description: creditInfo.name,
|
|
18
21
|
},
|
|
19
22
|
{
|
|
20
23
|
label: 'Цель кредита',
|
|
21
|
-
description:
|
|
24
|
+
description: creditInfo.description,
|
|
22
25
|
},
|
|
23
26
|
{
|
|
24
27
|
label: 'Сумма',
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { FormStatus } from '../../retail/components/FormStatus/FormStatus';
|
|
3
3
|
import { useRetailFormStore } from '../../retail/hooks/useRetailFormStore';
|
|
4
|
+
import { getCreditInfo } from './getCreditInfo';
|
|
4
5
|
|
|
5
6
|
export const SuccessStatusContent = JSX(() => {
|
|
6
|
-
const { statusInfo } = useRetailFormStore();
|
|
7
|
+
const { statusInfo, programId } = useRetailFormStore();
|
|
8
|
+
|
|
9
|
+
const creditInfo = getCreditInfo(programId);
|
|
7
10
|
|
|
8
11
|
return (
|
|
9
12
|
<FormStatus
|
|
@@ -12,7 +15,7 @@ export const SuccessStatusContent = JSX(() => {
|
|
|
12
15
|
sectionInfo={[
|
|
13
16
|
{
|
|
14
17
|
label: 'Название продукта',
|
|
15
|
-
description:
|
|
18
|
+
description: creditInfo.name,
|
|
16
19
|
},
|
|
17
20
|
{
|
|
18
21
|
label: 'Ставка',
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const getCreditInfo = (programmId: string | null) => {
|
|
2
|
+
switch (programmId) {
|
|
3
|
+
case '11': {
|
|
4
|
+
return {
|
|
5
|
+
name: 'Потребительский кредит на рефинансирование',
|
|
6
|
+
description: 'Погашение основного долга по кредиту, иные цели и оплату страхования',
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
case '10':
|
|
10
|
+
default: {
|
|
11
|
+
return {
|
|
12
|
+
name: 'Кредит на любые цели',
|
|
13
|
+
description: 'На любые цели',
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
};
|
|
@@ -1,33 +1,49 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
|
+
import { useCallback, useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { CalculatorCredit } from '../../../components/CalculatorCredit/CalculatorCredit';
|
|
4
4
|
import {
|
|
5
5
|
type CreditCalculatorUserInputParams,
|
|
6
6
|
type CreditDefaultParams,
|
|
7
7
|
} from '../../../components/CalculatorCredit/CalculatorCreditContent';
|
|
8
|
+
import { getCalcParams } from '../../../components/CalculatorCredit/utils';
|
|
8
9
|
import { type CustomFieldProps } from '../../../ui-kit/FormField/CustomFieldProps';
|
|
10
|
+
import { Loader } from '../../../ui-kit/Loader/Loader';
|
|
9
11
|
|
|
10
12
|
const FIELD_NAME = 'calculator';
|
|
11
13
|
|
|
12
14
|
export const CreditCalcField = JSX<CustomFieldProps>(({ field, params }) => {
|
|
15
|
+
const [defaultParams, setDefaultParams] = useState<CreditDefaultParams>();
|
|
13
16
|
const calcValue = field(FIELD_NAME)?.value;
|
|
14
|
-
const defaultParams = calcValue
|
|
15
|
-
? defaultValueAdapter(field(FIELD_NAME).value as CreditCalculatorUserInputParams)
|
|
16
|
-
: params?.calcData?.defaultParams;
|
|
17
|
-
const defaultCalcSum = params?.calcData?.defaultParams?.sum ?? 0;
|
|
18
17
|
|
|
19
18
|
const handleChange = useCallback((_: CreditCalculatorUserInputParams) => {
|
|
20
19
|
field(FIELD_NAME).onChange?.(_);
|
|
21
20
|
}, []);
|
|
22
21
|
|
|
23
|
-
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
if (params?.calcData?.defaultParams) {
|
|
24
|
+
setDefaultParams(
|
|
25
|
+
calcValue
|
|
26
|
+
? defaultValueAdapter(field(FIELD_NAME).value as CreditCalculatorUserInputParams)
|
|
27
|
+
: (params?.calcData?.defaultParams as CreditDefaultParams),
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
}, [params?.calcData?.defaultParams]);
|
|
31
|
+
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
if (defaultParams) {
|
|
34
|
+
handleChange(getCalcParams(defaultParams));
|
|
35
|
+
}
|
|
36
|
+
}, [defaultParams]);
|
|
37
|
+
|
|
38
|
+
return defaultParams ? (
|
|
24
39
|
<CalculatorCredit
|
|
25
|
-
key={defaultCalcSum}
|
|
26
40
|
{...params?.calcData}
|
|
27
41
|
defaultParams={defaultParams}
|
|
28
42
|
padding="p-0"
|
|
29
43
|
onChange={handleChange}
|
|
30
44
|
/>
|
|
45
|
+
) : (
|
|
46
|
+
<Loader />
|
|
31
47
|
);
|
|
32
48
|
});
|
|
33
49
|
|
package/package.json
CHANGED
|
@@ -2,15 +2,10 @@
|
|
|
2
2
|
import { useCallback, useEffect } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { type JSONRefObject } from '../../data/JSONRefObject';
|
|
4
4
|
import { useForm, type FormFieldRegisterer } from '../../hooks/useForm/useForm';
|
|
5
|
-
import { DEFAULT_MONTHS } from '../../ui-kit/Calculator/calculatorConstants';
|
|
6
5
|
import { CalculatorLayout } from '../../ui-kit/Calculator/CalculatorLayout';
|
|
7
6
|
import { CalculatorStyle } from '../../ui-kit/Calculator/CalculatorStyle';
|
|
8
7
|
import { CalculatorValue } from '../../ui-kit/Calculator/CalculatorValue';
|
|
9
8
|
import { getDefaultParamsMin } from '../../ui-kit/Calculator/getDefaultParams';
|
|
10
|
-
import {
|
|
11
|
-
getMoneyDefaultValue,
|
|
12
|
-
getMonthsDefaultValue,
|
|
13
|
-
} from '../../ui-kit/Calculator/getDefaultValues';
|
|
14
9
|
import { renderFootnote } from '../../ui-kit/Calculator/renderFootnote';
|
|
15
10
|
import { renderMonthsInput } from '../../ui-kit/Calculator/renderMonthsInput';
|
|
16
11
|
import { renderPaymentType } from '../../ui-kit/Calculator/renderPaymentType';
|
|
@@ -32,8 +27,7 @@ import {
|
|
|
32
27
|
} from './CalculatorCreditContent';
|
|
33
28
|
import { getCreditCalculatorParams } from './getCreditCalculatorParams';
|
|
34
29
|
import { isDefaultParams } from './isDefaultParams';
|
|
35
|
-
|
|
36
|
-
const CREDIT_DEFAULT_SUM = 200000;
|
|
30
|
+
import { getCalcParams } from './utils';
|
|
37
31
|
|
|
38
32
|
const MAP = {
|
|
39
33
|
isSalaryClient: 'isSalaryClient',
|
|
@@ -74,20 +68,9 @@ export const CalculatorCredit = UniBlock<CalculatorDepositProps>(
|
|
|
74
68
|
[paramsViewSettings, calcSource],
|
|
75
69
|
);
|
|
76
70
|
|
|
77
|
-
const [userInputParams, { field }] = useForm(
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
monthsValue: getMonthsDefaultValue(defaultParams, DEFAULT_MONTHS),
|
|
81
|
-
monthlyPayment: 0,
|
|
82
|
-
rate: 0,
|
|
83
|
-
isAnnuity: Boolean(defaultParams?.isAnnuity),
|
|
84
|
-
isInsurance: Boolean(defaultParams?.isEnableInsurance),
|
|
85
|
-
isSalaryClient: Boolean(defaultParams?.isEnableSalaryClient),
|
|
86
|
-
isPensionClient: Boolean(defaultParams?.isEnablePensionClient),
|
|
87
|
-
isStateEmployee: Boolean(defaultParams?.isEnableStateEmployee),
|
|
88
|
-
},
|
|
89
|
-
{ onChange: handleChange },
|
|
90
|
-
);
|
|
71
|
+
const [userInputParams, { field }] = useForm(getCalcParams(defaultParams), {
|
|
72
|
+
onChange: handleChange,
|
|
73
|
+
});
|
|
91
74
|
|
|
92
75
|
const calcParams = getCreditCalculatorParams(userInputParams, calcSource, paramsViewSettings);
|
|
93
76
|
const paymentTypeElement = renderPaymentType({
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DEFAULT_MONTHS } from '../../ui-kit/Calculator/calculatorConstants';
|
|
2
|
+
import {
|
|
3
|
+
getMoneyDefaultValue,
|
|
4
|
+
getMonthsDefaultValue,
|
|
5
|
+
} from '../../ui-kit/Calculator/getDefaultValues';
|
|
6
|
+
import { type CreditDefaultParams } from './CalculatorCreditContent';
|
|
7
|
+
|
|
8
|
+
const CREDIT_DEFAULT_SUM = 200000;
|
|
9
|
+
|
|
10
|
+
export const getCalcParams = (defaultParams?: CreditDefaultParams) => ({
|
|
11
|
+
moneyValue: getMoneyDefaultValue(defaultParams, CREDIT_DEFAULT_SUM),
|
|
12
|
+
monthsValue: getMonthsDefaultValue(defaultParams, DEFAULT_MONTHS),
|
|
13
|
+
monthlyPayment: 0,
|
|
14
|
+
rate: 0,
|
|
15
|
+
isAnnuity: Boolean(defaultParams?.isAnnuity),
|
|
16
|
+
isInsurance: Boolean(defaultParams?.isEnableInsurance),
|
|
17
|
+
isSalaryClient: Boolean(defaultParams?.isEnableSalaryClient),
|
|
18
|
+
isPensionClient: Boolean(defaultParams?.isEnablePensionClient),
|
|
19
|
+
isStateEmployee: Boolean(defaultParams?.isEnableStateEmployee),
|
|
20
|
+
});
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { FormStatus } from '../../retail/components/FormStatus/FormStatus';
|
|
3
3
|
import { useRetailFormStore } from '../../retail/hooks/useRetailFormStore';
|
|
4
|
+
import { getCreditInfo } from './getCreditInfo';
|
|
4
5
|
|
|
5
6
|
export const PendingStatusContent = JSX(({ onExpire }: { onExpire: () => void }) => {
|
|
6
|
-
const { statusInfo } = useRetailFormStore();
|
|
7
|
+
const { statusInfo, programId } = useRetailFormStore();
|
|
8
|
+
|
|
9
|
+
const creditInfo = getCreditInfo(programId);
|
|
7
10
|
|
|
8
11
|
return (
|
|
9
12
|
<FormStatus
|
|
@@ -14,11 +17,11 @@ export const PendingStatusContent = JSX(({ onExpire }: { onExpire: () => void })
|
|
|
14
17
|
sectionInfo={[
|
|
15
18
|
{
|
|
16
19
|
label: 'Название продукта',
|
|
17
|
-
description:
|
|
20
|
+
description: creditInfo.name,
|
|
18
21
|
},
|
|
19
22
|
{
|
|
20
23
|
label: 'Цель кредита',
|
|
21
|
-
description:
|
|
24
|
+
description: creditInfo.description,
|
|
22
25
|
},
|
|
23
26
|
{
|
|
24
27
|
label: 'Сумма',
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { FormStatus } from '../../retail/components/FormStatus/FormStatus';
|
|
3
3
|
import { useRetailFormStore } from '../../retail/hooks/useRetailFormStore';
|
|
4
|
+
import { getCreditInfo } from './getCreditInfo';
|
|
4
5
|
|
|
5
6
|
export const SuccessStatusContent = JSX(() => {
|
|
6
|
-
const { statusInfo } = useRetailFormStore();
|
|
7
|
+
const { statusInfo, programId } = useRetailFormStore();
|
|
8
|
+
|
|
9
|
+
const creditInfo = getCreditInfo(programId);
|
|
7
10
|
|
|
8
11
|
return (
|
|
9
12
|
<FormStatus
|
|
@@ -12,7 +15,7 @@ export const SuccessStatusContent = JSX(() => {
|
|
|
12
15
|
sectionInfo={[
|
|
13
16
|
{
|
|
14
17
|
label: 'Название продукта',
|
|
15
|
-
description:
|
|
18
|
+
description: creditInfo.name,
|
|
16
19
|
},
|
|
17
20
|
{
|
|
18
21
|
label: 'Ставка',
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const getCreditInfo = (programmId: string | null) => {
|
|
2
|
+
switch (programmId) {
|
|
3
|
+
case '11': {
|
|
4
|
+
return {
|
|
5
|
+
name: 'Потребительский кредит на рефинансирование',
|
|
6
|
+
description: 'Погашение основного долга по кредиту, иные цели и оплату страхования',
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
case '10':
|
|
10
|
+
default: {
|
|
11
|
+
return {
|
|
12
|
+
name: 'Кредит на любые цели',
|
|
13
|
+
description: 'На любые цели',
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
};
|
|
@@ -1,33 +1,49 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
|
+
import { useCallback, useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { CalculatorCredit } from '../../../components/CalculatorCredit/CalculatorCredit';
|
|
4
4
|
import {
|
|
5
5
|
type CreditCalculatorUserInputParams,
|
|
6
6
|
type CreditDefaultParams,
|
|
7
7
|
} from '../../../components/CalculatorCredit/CalculatorCreditContent';
|
|
8
|
+
import { getCalcParams } from '../../../components/CalculatorCredit/utils';
|
|
8
9
|
import { type CustomFieldProps } from '../../../ui-kit/FormField/CustomFieldProps';
|
|
10
|
+
import { Loader } from '../../../ui-kit/Loader/Loader';
|
|
9
11
|
|
|
10
12
|
const FIELD_NAME = 'calculator';
|
|
11
13
|
|
|
12
14
|
export const CreditCalcField = JSX<CustomFieldProps>(({ field, params }) => {
|
|
15
|
+
const [defaultParams, setDefaultParams] = useState<CreditDefaultParams>();
|
|
13
16
|
const calcValue = field(FIELD_NAME)?.value;
|
|
14
|
-
const defaultParams = calcValue
|
|
15
|
-
? defaultValueAdapter(field(FIELD_NAME).value as CreditCalculatorUserInputParams)
|
|
16
|
-
: params?.calcData?.defaultParams;
|
|
17
|
-
const defaultCalcSum = params?.calcData?.defaultParams?.sum ?? 0;
|
|
18
17
|
|
|
19
18
|
const handleChange = useCallback((_: CreditCalculatorUserInputParams) => {
|
|
20
19
|
field(FIELD_NAME).onChange?.(_);
|
|
21
20
|
}, []);
|
|
22
21
|
|
|
23
|
-
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
if (params?.calcData?.defaultParams) {
|
|
24
|
+
setDefaultParams(
|
|
25
|
+
calcValue
|
|
26
|
+
? defaultValueAdapter(field(FIELD_NAME).value as CreditCalculatorUserInputParams)
|
|
27
|
+
: (params?.calcData?.defaultParams as CreditDefaultParams),
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
}, [params?.calcData?.defaultParams]);
|
|
31
|
+
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
if (defaultParams) {
|
|
34
|
+
handleChange(getCalcParams(defaultParams));
|
|
35
|
+
}
|
|
36
|
+
}, [defaultParams]);
|
|
37
|
+
|
|
38
|
+
return defaultParams ? (
|
|
24
39
|
<CalculatorCredit
|
|
25
|
-
key={defaultCalcSum}
|
|
26
40
|
{...params?.calcData}
|
|
27
41
|
defaultParams={defaultParams}
|
|
28
42
|
padding="p-0"
|
|
29
43
|
onChange={handleChange}
|
|
30
44
|
/>
|
|
45
|
+
) : (
|
|
46
|
+
<Loader />
|
|
31
47
|
);
|
|
32
48
|
});
|
|
33
49
|
|