From 038a46ed6643c11e57de6b46131f925b86bf1dbe Mon Sep 17 00:00:00 2001 From: vchikalkin Date: Mon, 8 May 2023 14:10:32 +0300 Subject: [PATCH] fix insurance table layout --- .../Form/Insurance/InsuranceTable/config.tsx | 20 ++++++++++++++++--- apps/web/Components/Layout/Page.jsx | 5 +---- apps/web/config/ui.js | 2 +- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/apps/web/Components/Calculation/Form/Insurance/InsuranceTable/config.tsx b/apps/web/Components/Calculation/Form/Insurance/InsuranceTable/config.tsx index e9bc447..fbff922 100644 --- a/apps/web/Components/Calculation/Form/Insurance/InsuranceTable/config.tsx +++ b/apps/web/Components/Calculation/Form/Insurance/InsuranceTable/config.tsx @@ -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 = [ key: 'insuranceCompany', dataIndex: 'insuranceCompany', title: 'Страховая компания', - width: 300, render: (_, record) => { const Component = buildOptionComponent(record.key, Select, 'insuranceCompany'); - return ; + return ( + + ); }, + width: '290px', }, { key: 'insured', @@ -37,7 +47,7 @@ export const columns: ColumnsType = [ { 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 = [ parser={parser} precision={2} step={1000} + style={{ + width: '150px', + }} /> ); }, + width: '150px', }, { key: 'insTerm', diff --git a/apps/web/Components/Layout/Page.jsx b/apps/web/Components/Layout/Page.jsx index b2a6439..6c8944f 100644 --- a/apps/web/Components/Layout/Page.jsx +++ b/apps/web/Components/Layout/Page.jsx @@ -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%; } diff --git a/apps/web/config/ui.js b/apps/web/config/ui.js index d7f907e..57d7c1a 100644 --- a/apps/web/config/ui.js +++ b/apps/web/config/ui.js @@ -4,7 +4,7 @@ const threshold = 0; const screens = { tablet: 768, laptop: 1024, - 'laptop-hd': 1280, + 'laptop-m': 1280, desktop: 1680, 'desktop-xl': 1921, };