diff --git a/src/app/deals/components/desktop/ToolPanelAction/ToolPanelAction.module.css b/src/app/deals/components/desktop/ToolPanelAction/ToolPanelAction.module.css deleted file mode 100644 index 54ea813..0000000 --- a/src/app/deals/components/desktop/ToolPanelAction/ToolPanelAction.module.css +++ /dev/null @@ -1,6 +0,0 @@ -.container { - width: min-content; - cursor: pointer; - padding: 6px; - height: 100%; -} diff --git a/src/app/deals/components/desktop/ToolPanelAction/ToolPanelAction.tsx b/src/app/deals/components/desktop/ToolPanelAction/ToolPanelAction.tsx deleted file mode 100644 index 0fec137..0000000 --- a/src/app/deals/components/desktop/ToolPanelAction/ToolPanelAction.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import { FC, PropsWithChildren } from "react"; -import { ActionIcon, Box } from "@mantine/core"; -import style from "./ToolPanelAction.module.css"; - -type Props = { - onClick: () => void; -}; - -const ToolPanelAction: FC> = ({ - onClick, - children, -}) => { - return ( - - - {children} - - - ); -}; - -export default ToolPanelAction; diff --git a/src/app/deals/components/desktop/TopToolPanel/TopToolPanel.tsx b/src/app/deals/components/desktop/TopToolPanel/TopToolPanel.tsx index 55b1d96..bd96bd8 100644 --- a/src/app/deals/components/desktop/TopToolPanel/TopToolPanel.tsx +++ b/src/app/deals/components/desktop/TopToolPanel/TopToolPanel.tsx @@ -4,12 +4,12 @@ import { FC } from "react"; import { IconEdit, IconFilter, IconPlus } from "@tabler/icons-react"; import { Flex, Group, Indicator } from "@mantine/core"; import { modals } from "@mantine/modals"; -import ToolPanelAction from "@/app/deals/components/desktop/ToolPanelAction/ToolPanelAction"; import ViewSelector from "@/app/deals/components/desktop/ViewSelector/ViewSelector"; import { useDealsContext } from "@/app/deals/contexts/DealsContext"; import { useProjectsContext } from "@/app/deals/contexts/ProjectsContext"; import { DealsFiltersForm } from "@/app/deals/hooks/useDealsFilters"; import ProjectSelect from "@/components/selects/ProjectSelect/ProjectSelect"; +import ActionIconWithTip from "@/components/ui/ActionIconWithTip/ActionIconWithTip"; import { useDrawersContext } from "@/drawers/DrawersContext"; import useIsMobile from "@/hooks/utils/useIsMobile"; @@ -89,16 +89,16 @@ const TopToolPanel: FC = ({ view, setView }) => { disabled={!isChangedFilters} offset={3} size={8}> - + - + - + - - + + - + > = ({ return ( > = ({ body: { display: "flex", flexDirection: "column", - padding: 0, + 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 49c19b2..df14681 100644 --- a/src/app/deals/drawers/DealEditorDrawer/components/DealEditorBody.tsx +++ b/src/app/deals/drawers/DealEditorDrawer/components/DealEditorBody.tsx @@ -3,6 +3,7 @@ import { IconEdit } from "@tabler/icons-react"; import { motion } from "framer-motion"; import { Box, Tabs } from "@mantine/core"; import GeneralTab from "@/app/deals/drawers/DealEditorDrawer/tabs/GeneralTab/GeneralTab"; +import useIsMobile from "@/hooks/utils/useIsMobile"; import { DealSchema, ProjectSchema } from "@/lib/client"; import { MODULES } from "@/modules/modules"; import styles from "../DealEditorDrawer.module.css"; @@ -15,6 +16,8 @@ type Props = { }; const DealEditorBody: FC = props => { + const isMobile = useIsMobile(); + const getTabPanel = (value: string, component: ReactNode): ReactNode => ( = props => { return ( = ({ value, onDelete, onChange }) => { return (
- - - Создано: {utcDateTimeToLocalString(value.createdAt)} - - { - form.setFieldValue("board", board ?? undefined); - form.setFieldValue("status", undefined); - }} - projectId={value.board.projectId} - /> - + + + + + + { + form.setFieldValue("board", board ?? undefined); + form.setFieldValue("status", undefined); + }} + projectId={value.board.projectId} + flex={1} + /> + +