2023-11-08 12:02:00 +03:00

214 lines
4.5 KiB
TypeScript
Raw 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 unicorn/no-unused-properties */
import { Background, Button, Content, Input } from 'ui';
const mockMeta = {
accountName: {
disable: true,
fieldType: 'STRING',
label: 'Контраген',
required: false,
visible: true,
},
ageDrivers: {
disable: true,
fieldType: 'STRING',
label: 'Ограничение лиц, допущенных к управлению',
required: false,
visible: true,
},
comment: {
disable: true,
fieldType: 'STRING',
label: 'Комментарий',
required: false,
visible: true,
},
dgoPrice: {
disable: true,
fieldType: 'DECIMAL',
label: 'ДГО',
required: false,
visible: true,
},
enginePower: {
disable: true,
fieldType: 'DECIMAL',
label: 'л.с',
required: false,
visible: true,
},
evokaskoPrice: {
disable: true,
fieldType: 'DECIMAL',
label: 'Evo_КАСКО',
required: false,
visible: true,
},
expDrivers: {
disable: true,
fieldType: 'INT',
label: 'Наименьший стаж водителей',
required: false,
visible: true,
},
franchise: {
disable: true,
fieldType: 'DECIMAL',
label: 'Франшиза',
required: false,
visible: true,
},
inn: {
disable: true,
fieldType: 'STRING',
label: 'ИНН',
required: false,
visible: true,
},
inspectionRequired: {
disable: true,
fieldType: 'CHECKBOX',
label: 'Требуется осмотр',
required: false,
visible: true,
},
insurancePrice: {
disable: true,
fieldType: 'DECIMAL',
label: 'ФинGAP',
required: false,
visible: true,
},
kaskoPrice: {
disable: false,
fieldType: 'DECIMAL',
label: 'КАСКО/СМР',
required: false,
visible: true,
},
kpp: {
disable: true,
fieldType: 'STRING',
label: 'КПП',
required: false,
visible: true,
},
leasingobjectCategory: {
disable: true,
fieldType: 'STRING',
label: 'Ктегория ТС',
required: false,
visible: true,
},
leasingobjectYear: {
disable: true,
fieldType: 'INT',
label: 'Год выпуска',
required: false,
visible: true,
},
newPolicy: {
disable: true,
fieldType: 'CHECKBOX',
label: 'Требуется оформление нового полиса',
required: false,
visible: true,
},
nsPrice: {
disable: true,
fieldType: 'DECIMAL',
label: 'НС',
required: false,
visible: true,
},
nsibPrice: {
disable: true,
fieldType: 'DECIMAL',
label: 'НСиБ',
required: false,
visible: true,
},
osagoPrice: {
disable: true,
fieldType: 'DECIMAL',
label: 'ОСАГО',
required: false,
visible: true,
},
passportBrandModel: {
disable: true,
fieldType: 'STRING',
label: 'ТС',
required: false,
visible: true,
},
polisNumber: {
disable: true,
fieldType: 'STRING',
label: 'Полис',
required: false,
visible: true,
},
risk: {
disable: true,
fieldType: 'STRING',
label: 'Риски',
required: false,
visible: true,
},
territoryPrice: {
disable: true,
fieldType: 'DECIMAL',
label: 'Расширение',
required: false,
visible: true,
},
vin: {
disable: true,
fieldType: 'STRING',
label: 'VIN/Заводской номер машины',
required: false,
visible: true,
},
};
const mockData = {
accountName: 'ООО "КУПЕР"',
ageDrivers: 'Без ограничений',
enginePower: 149,
expDrivers: 0,
franchise: 0,
leasingobjectCategory: '100000001',
leasingobjectYear: 2021,
passportBrandModel: '3008A1',
polisNumber: '0002810-0000103/23ТЮЛ',
risk: 'КАСКО, ДГО, НС',
vin: 'XZV3008A1M0000016',
};
export default function Page() {
return (
<Content>
<Background>
<div className="grid auto-rows-auto grid-cols-2 gap-2 ">
{Object.keys(mockData).map((name) => (
<Input
key={name}
id={name}
title={mockMeta[name].label}
type="text"
required={mockMeta[name].required}
defaultValue={mockData[name]}
/>
))}
</div>
<div className="grid grid-cols-3 gap-5 pt-3">
<Button>Сохранить</Button>
<Button>Возврат на доработку</Button>
<Button color="danger">Отмена</Button>
</div>
</Background>
</Content>
);
}