From 9a7e074863773a89b5c58a8231da33ae5edf7eb3 Mon Sep 17 00:00:00 2001 From: vchikalkin Date: Wed, 31 May 2023 16:53:42 +0300 Subject: [PATCH] ui: fix Form/InsuranceTable on laptops --- .../Form/Insurance/InsuranceTable/config.tsx | 11 +++++++---- apps/web/config/apollo.js | 11 +++++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/apps/web/Components/Calculation/Form/Insurance/InsuranceTable/config.tsx b/apps/web/Components/Calculation/Form/Insurance/InsuranceTable/config.tsx index c435f4a..1b9b9c3 100644 --- a/apps/web/Components/Calculation/Form/Insurance/InsuranceTable/config.tsx +++ b/apps/web/Components/Calculation/Form/Insurance/InsuranceTable/config.tsx @@ -37,6 +37,7 @@ export const columns: ColumnsType = [ key: 'policyType', dataIndex: 'policyType', title: 'Тип полиса', + width: '11%', }, { key: 'insuranceCompany', @@ -50,13 +51,11 @@ export const columns: ColumnsType = [ optionFilterProp="label" showSearch style={{ - width: '290px', - maxWidth: '290px', + width: '100%', }} /> ); }, - width: '290px', }, { key: 'insured', @@ -69,10 +68,12 @@ export const columns: ColumnsType = [ ); }, + width: '100px', }, { key: 'insCost', @@ -108,10 +109,12 @@ export const columns: ColumnsType = [ return ( ); }, + width: '150px', }, ]; diff --git a/apps/web/config/apollo.js b/apps/web/config/apollo.js index b98b2a6..97d45b3 100644 --- a/apps/web/config/apollo.js +++ b/apps/web/config/apollo.js @@ -21,6 +21,17 @@ const modifyDataLink = new ApolloLink((operation, forward) => { label: `${x.label} (${x.evo_start_production_year})`, })); } + + if (operation.operationName === 'GetInsuranceCompanies') { + response.data.accounts = response.data.accounts.map((x) => { + const substring = x.label.match(/"(.+)"/u); + + return { + ...x, + label: substring ? substring[1].replaceAll('"', '').trim() : x.label, + }; + }); + } } return response;