Chika 7b83dbb248 insurance-table: some code improvements
rename finGAP => fingap
2022-07-11 17:15:06 +03:00

123 lines
2.3 KiB
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* eslint-disable object-curly-newline */
import type * as Insurance from 'Components/Calculation/Form/Insurance/InsuranceTable/types';
export const defaultOptions: Record<Insurance.Keys, Insurance.RowOptions> = {
osago: {
insured: [
{
label: 'ЛП',
value: 100_000_000,
},
{
label: 'ЛД',
value: 100_000_001,
},
],
insTerm: [
{
label: '12 месяцев',
value: 100_000_000,
},
{
label: 'Срок ДЛ',
value: 100_000_001,
},
],
},
kasko: {
insured: [
{
label: 'ЛП',
value: 100_000_000,
},
{
label: 'ЛД',
value: 100_000_001,
},
],
insTerm: [
{
label: '12 месяцев',
value: 100_000_000,
},
{
label: 'Срок ДЛ',
value: 100_000_001,
},
],
},
fingap: {
insured: [
{
label: 'ЛП',
value: 100_000_000,
},
{
label: 'ЛД',
value: 100_000_001,
},
],
insTerm: [
{
label: '12 месяцев',
value: 100_000_000,
},
{
label: 'Срок ДЛ',
value: 100_000_001,
},
],
},
};
export const defaultValues: Insurance.RowValues[] = [
{
key: 'osago',
policyType: 'ОСАГО',
insuranceCompany: null,
insured: 100_000_000,
insCost: 0,
insTerm: 100_000_000,
},
{
key: 'kasko',
policyType: 'КАСКО',
insuranceCompany: null,
insured: 100_000_000,
insCost: 0,
insTerm: null,
},
{
key: 'fingap',
policyType: 'Safe Finance',
insuranceCompany: null,
insured: 100_000_000,
insCost: 0,
insTerm: null,
},
];
export const defaultStatuses: Record<Insurance.Keys, Insurance.RowStatuses> = {
osago: {
insTerm: 'Disabled',
insCost: 'Default',
insuranceCompany: 'Default',
insured: 'Default',
policyType: 'Default',
},
kasko: {
insTerm: 'Disabled',
insCost: 'Default',
insuranceCompany: 'Default',
insured: 'Default',
policyType: 'Default',
},
fingap: {
insCost: 'Disabled',
insuranceCompany: 'Default',
insured: 'Default',
insTerm: 'Default',
policyType: 'Default',
},
};