From 3355c73b8b87dc56174c3084911c2356f553fa98 Mon Sep 17 00:00:00 2001 From: AlexSserb Date: Fri, 31 Oct 2025 17:45:14 +0400 Subject: [PATCH] fix: fixed statuses mobile editor --- .../StatusesMobileEditorDrawer.tsx | 1 - .../components/StatusMobile.tsx | 3 --- .../components/StatusesDrawerBody.tsx | 9 +++++---- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/app/deals/drawers/StatusesMobileEditorDrawer/StatusesMobileEditorDrawer.tsx b/src/app/deals/drawers/StatusesMobileEditorDrawer/StatusesMobileEditorDrawer.tsx index 350ea1f..4e9ccaa 100644 --- a/src/app/deals/drawers/StatusesMobileEditorDrawer/StatusesMobileEditorDrawer.tsx +++ b/src/app/deals/drawers/StatusesMobileEditorDrawer/StatusesMobileEditorDrawer.tsx @@ -30,7 +30,6 @@ const StatusesMobileEditorDrawer: FC> = ({ height: "100%", display: "flex", flexDirection: "column", - gap: "xs", }, }}> diff --git a/src/app/deals/drawers/StatusesMobileEditorDrawer/components/StatusMobile.tsx b/src/app/deals/drawers/StatusesMobileEditorDrawer/components/StatusMobile.tsx index 8a03365..41d2cb9 100644 --- a/src/app/deals/drawers/StatusesMobileEditorDrawer/components/StatusMobile.tsx +++ b/src/app/deals/drawers/StatusesMobileEditorDrawer/components/StatusMobile.tsx @@ -2,7 +2,6 @@ import React, { FC } from "react"; import { Box, Group, Text } from "@mantine/core"; import { modals } from "@mantine/modals"; import StatusMenu from "@/app/deals/components/shared/StatusMenu/StatusMenu"; -import { useDealsContext } from "@/app/deals/contexts/DealsContext"; import { useStatusesMobileContext } from "@/app/deals/drawers/StatusesMobileEditorDrawer/contexts/BoardStatusesContext"; import { BoardSchema, StatusSchema } from "@/lib/client"; @@ -13,7 +12,6 @@ type Props = { const StatusMobile: FC = ({ status, board }) => { const { statusesCrud } = useStatusesMobileContext(); - const { groupDealsSelection } = useDealsContext(); const startEditing = () => { modals.openContextModal({ @@ -46,7 +44,6 @@ const StatusMobile: FC = ({ status, board }) => { statusesCrud.onUpdate(status.id, { color }) } withChangeOrderButton={false} - startDealsSelecting={groupDealsSelection.startSelecting} /> ); diff --git a/src/app/deals/drawers/StatusesMobileEditorDrawer/components/StatusesDrawerBody.tsx b/src/app/deals/drawers/StatusesMobileEditorDrawer/components/StatusesDrawerBody.tsx index c291362..128db84 100644 --- a/src/app/deals/drawers/StatusesMobileEditorDrawer/components/StatusesDrawerBody.tsx +++ b/src/app/deals/drawers/StatusesMobileEditorDrawer/components/StatusesDrawerBody.tsx @@ -1,6 +1,6 @@ import React, { FC, ReactNode } from "react"; import { IconChevronLeft, IconGripVertical } from "@tabler/icons-react"; -import { Box, Center, Divider, Group, Text } from "@mantine/core"; +import { Box, Center, Divider, Group, Stack, Title } from "@mantine/core"; import CreateStatusButton from "@/app/deals/drawers/StatusesMobileEditorDrawer/components/CreateStatusButton"; import StatusMobile from "@/app/deals/drawers/StatusesMobileEditorDrawer/components/StatusMobile"; import { useStatusesMobileContext } from "@/app/deals/drawers/StatusesMobileEditorDrawer/contexts/BoardStatusesContext"; @@ -39,7 +39,7 @@ const StatusesDrawerBody: FC = ({ onClose }) => { statusesCrud.onUpdate(itemId, { lexorank: newLexorank }); return ( - <> + = ({ onClose }) => {
- {board.name} + {board.name}
@@ -60,8 +60,9 @@ const StatusesDrawerBody: FC = ({ onClose }) => { dragHandleStyle={{ width: "auto" }} vertical /> + {statuses.length > 0 && } - +
); };