fix insurance table layout
This commit is contained in:
parent
c85fb50823
commit
038a46ed66
@ -1,3 +1,4 @@
|
||||
/* eslint-disable react/forbid-component-props */
|
||||
/* eslint-disable canonical/sort-keys */
|
||||
import { buildOptionComponent, buildValueComponent } from './builders';
|
||||
import type * as Insurance from './types';
|
||||
@ -17,12 +18,21 @@ export const columns: ColumnsType<Insurance.RowValues> = [
|
||||
key: 'insuranceCompany',
|
||||
dataIndex: 'insuranceCompany',
|
||||
title: 'Страховая компания',
|
||||
width: 300,
|
||||
render: (_, record) => {
|
||||
const Component = buildOptionComponent(record.key, Select, 'insuranceCompany');
|
||||
|
||||
return <Component optionFilterProp="label" showSearch />;
|
||||
return (
|
||||
<Component
|
||||
optionFilterProp="label"
|
||||
showSearch
|
||||
style={{
|
||||
width: '290px',
|
||||
maxWidth: '290px',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
},
|
||||
width: '290px',
|
||||
},
|
||||
{
|
||||
key: 'insured',
|
||||
@ -37,7 +47,7 @@ export const columns: ColumnsType<Insurance.RowValues> = [
|
||||
{
|
||||
key: 'insCost',
|
||||
dataIndex: 'insCost',
|
||||
title: 'Стоимость за 1-й период',
|
||||
title: 'Сумма за 1-й период',
|
||||
render: (_, record) => {
|
||||
const Component = buildValueComponent(record.key, InputNumber, 'insCost');
|
||||
|
||||
@ -50,9 +60,13 @@ export const columns: ColumnsType<Insurance.RowValues> = [
|
||||
parser={parser}
|
||||
precision={2}
|
||||
step={1000}
|
||||
style={{
|
||||
width: '150px',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
},
|
||||
width: '150px',
|
||||
},
|
||||
{
|
||||
key: 'insTerm',
|
||||
|
||||
@ -13,11 +13,8 @@ export const Grid = styled(Box)`
|
||||
grid-template-columns: 2fr 1fr;
|
||||
}
|
||||
|
||||
${min('laptop-hd')} {
|
||||
grid-template-columns: 2fr 1fr 1.5fr;
|
||||
}
|
||||
|
||||
${min('desktop')} {
|
||||
grid-template-columns: 2fr 1fr 1.5fr;
|
||||
margin: 8px 5%;
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ const threshold = 0;
|
||||
const screens = {
|
||||
tablet: 768,
|
||||
laptop: 1024,
|
||||
'laptop-hd': 1280,
|
||||
'laptop-m': 1280,
|
||||
desktop: 1680,
|
||||
'desktop-xl': 1921,
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user