From 9ba22b9bdf3b135bee39e9f99dec880f07e35402 Mon Sep 17 00:00:00 2001 From: AlexSserb Date: Fri, 19 Sep 2025 11:55:08 +0400 Subject: [PATCH] fix: styles for deal drawer fixed --- .../DealEditorDrawer/DealEditorDrawer.tsx | 1 - .../components/DealEditorBody.tsx | 3 +- .../FulfillmentBaseTab.module.css | 44 ++++--------------- .../DealServicesTable/DealServicesTable.tsx | 18 ++++---- .../components/DealServicesTitle.tsx | 5 +-- .../components/DealServicesTotalLabel.tsx | 6 +-- .../components/ServicesActions.tsx | 5 +-- .../FulfillmentBaseTabBody.tsx | 12 +++-- .../ProductView/ProductView.module.css | 11 ----- .../components/ProductView/ProductView.tsx | 3 +- .../ProductsActions/ProductsActions.tsx | 3 +- 11 files changed, 38 insertions(+), 73 deletions(-) delete mode 100644 src/modules/dealModules/dealEditorTabs/FulfillmentBaseTab/components/ProductView/ProductView.module.css diff --git a/src/app/deals/drawers/DealEditorDrawer/DealEditorDrawer.tsx b/src/app/deals/drawers/DealEditorDrawer/DealEditorDrawer.tsx index 48e4c39..8c0ee42 100644 --- a/src/app/deals/drawers/DealEditorDrawer/DealEditorDrawer.tsx +++ b/src/app/deals/drawers/DealEditorDrawer/DealEditorDrawer.tsx @@ -38,7 +38,6 @@ const DealEditorDrawer: FC> = ({ display: "flex", flexDirection: "column", padding: isMobile ? 0 : "var(--mantine-spacing-xs)", - height: "100vh", }, header: { paddingBlock: 0, diff --git a/src/app/deals/drawers/DealEditorDrawer/components/DealEditorBody.tsx b/src/app/deals/drawers/DealEditorDrawer/components/DealEditorBody.tsx index e9b5491..855097d 100644 --- a/src/app/deals/drawers/DealEditorDrawer/components/DealEditorBody.tsx +++ b/src/app/deals/drawers/DealEditorDrawer/components/DealEditorBody.tsx @@ -62,7 +62,8 @@ const DealEditorBody: FC = props => { { return ( - - + gap={"sm"} + mah={"90vh"}> + + + gap={"sm"}> {dealServicesList.dealServices.map(dealService => ( { /> ))} - + diff --git a/src/modules/dealModules/dealEditorTabs/FulfillmentBaseTab/components/DealServicesTable/components/DealServicesTitle.tsx b/src/modules/dealModules/dealEditorTabs/FulfillmentBaseTab/components/DealServicesTable/components/DealServicesTitle.tsx index f7eae14..44e4c1c 100644 --- a/src/modules/dealModules/dealEditorTabs/FulfillmentBaseTab/components/DealServicesTable/components/DealServicesTitle.tsx +++ b/src/modules/dealModules/dealEditorTabs/FulfillmentBaseTab/components/DealServicesTable/components/DealServicesTitle.tsx @@ -1,10 +1,9 @@ -import { rem, Title } from "@mantine/core"; +import { Title } from "@mantine/core"; const DealServicesTitle = () => ( + w={"100%"}> Общие услуги ); diff --git a/src/modules/dealModules/dealEditorTabs/FulfillmentBaseTab/components/DealServicesTable/components/DealServicesTotalLabel.tsx b/src/modules/dealModules/dealEditorTabs/FulfillmentBaseTab/components/DealServicesTable/components/DealServicesTotalLabel.tsx index befa109..74b794e 100644 --- a/src/modules/dealModules/dealEditorTabs/FulfillmentBaseTab/components/DealServicesTable/components/DealServicesTotalLabel.tsx +++ b/src/modules/dealModules/dealEditorTabs/FulfillmentBaseTab/components/DealServicesTable/components/DealServicesTotalLabel.tsx @@ -1,5 +1,5 @@ import { useMemo } from "react"; -import { rem, Title } from "@mantine/core"; +import { Title } from "@mantine/core"; import { useFulfillmentBaseContext } from "@/modules/dealModules/dealEditorTabs/FulfillmentBaseTab/contexts/FulfillmentBaseContext"; const DealServicesTotalLabel = () => { @@ -16,9 +16,9 @@ const DealServicesTotalLabel = () => { return ( - Итог: {total}₽ + Итог: {total.toFixed(2)}₽ ); }; diff --git a/src/modules/dealModules/dealEditorTabs/FulfillmentBaseTab/components/DealServicesTable/components/ServicesActions.tsx b/src/modules/dealModules/dealEditorTabs/FulfillmentBaseTab/components/DealServicesTable/components/ServicesActions.tsx index a86a385..d5bf112 100644 --- a/src/modules/dealModules/dealEditorTabs/FulfillmentBaseTab/components/DealServicesTable/components/ServicesActions.tsx +++ b/src/modules/dealModules/dealEditorTabs/FulfillmentBaseTab/components/DealServicesTable/components/ServicesActions.tsx @@ -1,4 +1,4 @@ -import { Button, Flex, rem } from "@mantine/core"; +import { Button, Flex } from "@mantine/core"; import { modals } from "@mantine/modals"; import { addKitToDeal, ServicesKitSchema } from "@/lib/client"; import { useFulfillmentBaseContext } from "@/modules/dealModules/dealEditorTabs/FulfillmentBaseTab/contexts/FulfillmentBaseContext"; @@ -48,8 +48,7 @@ const ServicesActions = () => { return (