fix: fixed statuses mobile editor
This commit is contained in:
@ -30,7 +30,6 @@ const StatusesMobileEditorDrawer: FC<DrawerProps<Props>> = ({
|
|||||||
height: "100%",
|
height: "100%",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
gap: "xs",
|
|
||||||
},
|
},
|
||||||
}}>
|
}}>
|
||||||
<StatusesMobileContextProvider board={board}>
|
<StatusesMobileContextProvider board={board}>
|
||||||
|
|||||||
@ -2,7 +2,6 @@ import React, { FC } from "react";
|
|||||||
import { Box, Group, Text } from "@mantine/core";
|
import { Box, Group, Text } from "@mantine/core";
|
||||||
import { modals } from "@mantine/modals";
|
import { modals } from "@mantine/modals";
|
||||||
import StatusMenu from "@/app/deals/components/shared/StatusMenu/StatusMenu";
|
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 { useStatusesMobileContext } from "@/app/deals/drawers/StatusesMobileEditorDrawer/contexts/BoardStatusesContext";
|
||||||
import { BoardSchema, StatusSchema } from "@/lib/client";
|
import { BoardSchema, StatusSchema } from "@/lib/client";
|
||||||
|
|
||||||
@ -13,7 +12,6 @@ type Props = {
|
|||||||
|
|
||||||
const StatusMobile: FC<Props> = ({ status, board }) => {
|
const StatusMobile: FC<Props> = ({ status, board }) => {
|
||||||
const { statusesCrud } = useStatusesMobileContext();
|
const { statusesCrud } = useStatusesMobileContext();
|
||||||
const { groupDealsSelection } = useDealsContext();
|
|
||||||
|
|
||||||
const startEditing = () => {
|
const startEditing = () => {
|
||||||
modals.openContextModal({
|
modals.openContextModal({
|
||||||
@ -46,7 +44,6 @@ const StatusMobile: FC<Props> = ({ status, board }) => {
|
|||||||
statusesCrud.onUpdate(status.id, { color })
|
statusesCrud.onUpdate(status.id, { color })
|
||||||
}
|
}
|
||||||
withChangeOrderButton={false}
|
withChangeOrderButton={false}
|
||||||
startDealsSelecting={groupDealsSelection.startSelecting}
|
|
||||||
/>
|
/>
|
||||||
</Group>
|
</Group>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import React, { FC, ReactNode } from "react";
|
import React, { FC, ReactNode } from "react";
|
||||||
import { IconChevronLeft, IconGripVertical } from "@tabler/icons-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 CreateStatusButton from "@/app/deals/drawers/StatusesMobileEditorDrawer/components/CreateStatusButton";
|
||||||
import StatusMobile from "@/app/deals/drawers/StatusesMobileEditorDrawer/components/StatusMobile";
|
import StatusMobile from "@/app/deals/drawers/StatusesMobileEditorDrawer/components/StatusMobile";
|
||||||
import { useStatusesMobileContext } from "@/app/deals/drawers/StatusesMobileEditorDrawer/contexts/BoardStatusesContext";
|
import { useStatusesMobileContext } from "@/app/deals/drawers/StatusesMobileEditorDrawer/contexts/BoardStatusesContext";
|
||||||
@ -39,7 +39,7 @@ const StatusesDrawerBody: FC<Props> = ({ onClose }) => {
|
|||||||
statusesCrud.onUpdate(itemId, { lexorank: newLexorank });
|
statusesCrud.onUpdate(itemId, { lexorank: newLexorank });
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<Stack gap={"xs"}>
|
||||||
<Group justify={"space-between"}>
|
<Group justify={"space-between"}>
|
||||||
<Box
|
<Box
|
||||||
onClick={onClose}
|
onClick={onClose}
|
||||||
@ -47,7 +47,7 @@ const StatusesDrawerBody: FC<Props> = ({ onClose }) => {
|
|||||||
<IconChevronLeft />
|
<IconChevronLeft />
|
||||||
</Box>
|
</Box>
|
||||||
<Center>
|
<Center>
|
||||||
<Text>{board.name}</Text>
|
<Title order={6}>{board.name}</Title>
|
||||||
</Center>
|
</Center>
|
||||||
<Box p={"lg"} />
|
<Box p={"lg"} />
|
||||||
</Group>
|
</Group>
|
||||||
@ -60,8 +60,9 @@ const StatusesDrawerBody: FC<Props> = ({ onClose }) => {
|
|||||||
dragHandleStyle={{ width: "auto" }}
|
dragHandleStyle={{ width: "auto" }}
|
||||||
vertical
|
vertical
|
||||||
/>
|
/>
|
||||||
|
{statuses.length > 0 && <Divider />}
|
||||||
<CreateStatusButton />
|
<CreateStatusButton />
|
||||||
</>
|
</Stack>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user