feat: boards and statuses editing and creating for mobiles

This commit is contained in:
2025-08-08 15:01:10 +04:00
parent f52fde0097
commit afad1b4605
12 changed files with 109 additions and 23 deletions

View File

@ -44,6 +44,7 @@ const Board: FC<Props> = ({ board }) => {
/>
</>
)}
modalTitle={"Редактирование доски"}
/>
</Group>
);

View File

@ -1,5 +1,6 @@
import React, { FC } from "react";
import { IconDotsVertical, IconEdit, IconTrash } from "@tabler/icons-react";
import { isMobile } from "react-device-detect";
import { Box, Group, Menu, Text } from "@mantine/core";
import { useBoardsContext } from "@/app/deals/contexts/BoardsContext";
import { BoardSchema } from "@/lib/client";
@ -19,7 +20,11 @@ const BoardMenu: FC<Props> = ({ isHovered, board, startEditing }) => {
<Box
style={{
opacity:
isHovered || selectedBoard?.id === board.id ? 1 : 0,
isMobile ||
isHovered ||
selectedBoard?.id === board.id
? 1
: 0,
cursor: "pointer",
}}
onClick={e => {

View File

@ -16,6 +16,7 @@ const CreateBoardButton = () => {
<IconPlus />
</Box>
)}
modalTitle={"Создание доски"}
/>
</Box>
);

View File

@ -26,6 +26,7 @@ const CreateStatusButton = () => {
<Text>Создать колонку</Text>
</Box>
)}
modalTitle={"Создание колонки"}
/>
</Box>
);

View File

@ -28,7 +28,10 @@ const Funnel: FC = () => {
<ScrollArea
offsetScrollbars={"x"}
scrollbarSize={"0.5rem"}>
<Group align={"start"}>
<Group
align={"start"}
wrap={"nowrap"}
gap={"sm"}>
<FunnelDnd
containers={sortedStatuses}
items={deals}

View File

@ -64,6 +64,7 @@ const StatusColumnWrapper = ({
/>
</>
)}
modalTitle={"Редактирование статуса"}
/>
</Group>
{children}