fix: fixed statuses mobile editor
This commit is contained in:
@ -30,7 +30,6 @@ const StatusesMobileEditorDrawer: FC<DrawerProps<Props>> = ({
|
||||
height: "100%",
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
gap: "xs",
|
||||
},
|
||||
}}>
|
||||
<StatusesMobileContextProvider board={board}>
|
||||
|
||||
@ -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<Props> = ({ status, board }) => {
|
||||
const { statusesCrud } = useStatusesMobileContext();
|
||||
const { groupDealsSelection } = useDealsContext();
|
||||
|
||||
const startEditing = () => {
|
||||
modals.openContextModal({
|
||||
@ -46,7 +44,6 @@ const StatusMobile: FC<Props> = ({ status, board }) => {
|
||||
statusesCrud.onUpdate(status.id, { color })
|
||||
}
|
||||
withChangeOrderButton={false}
|
||||
startDealsSelecting={groupDealsSelection.startSelecting}
|
||||
/>
|
||||
</Group>
|
||||
);
|
||||
|
||||
@ -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<Props> = ({ onClose }) => {
|
||||
statusesCrud.onUpdate(itemId, { lexorank: newLexorank });
|
||||
|
||||
return (
|
||||
<>
|
||||
<Stack gap={"xs"}>
|
||||
<Group justify={"space-between"}>
|
||||
<Box
|
||||
onClick={onClose}
|
||||
@ -47,7 +47,7 @@ const StatusesDrawerBody: FC<Props> = ({ onClose }) => {
|
||||
<IconChevronLeft />
|
||||
</Box>
|
||||
<Center>
|
||||
<Text>{board.name}</Text>
|
||||
<Title order={6}>{board.name}</Title>
|
||||
</Center>
|
||||
<Box p={"lg"} />
|
||||
</Group>
|
||||
@ -60,8 +60,9 @@ const StatusesDrawerBody: FC<Props> = ({ onClose }) => {
|
||||
dragHandleStyle={{ width: "auto" }}
|
||||
vertical
|
||||
/>
|
||||
{statuses.length > 0 && <Divider />}
|
||||
<CreateStatusButton />
|
||||
</>
|
||||
</Stack>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user