feat: deal create, update, delete

This commit is contained in:
2025-08-24 12:49:19 +04:00
parent 10f50ac254
commit d5be9ce61a
23 changed files with 741 additions and 76 deletions

View File

@ -1,4 +1,6 @@
import { Card, Group, Pill, Stack, Text } from "@mantine/core";
import { useDealsContext } from "@/app/deals/contexts/DealsContext";
import { useDrawersContext } from "@/drawers/DrawersContext";
import { DealSchema } from "@/lib/client";
import styles from "./DealCard.module.css";
@ -7,8 +9,17 @@ type Props = {
};
const DealCard = ({ deal }: Props) => {
const { dealsCrud } = useDealsContext();
const { openDrawer } = useDrawersContext();
const onClick = () => {
openDrawer({ key: "dealEditorDrawer", props: { deal, dealsCrud } });
};
return (
<Card className={styles.container}>
<Card
onClick={onClick}
className={styles.container}>
<Text c={"dodgerblue"}>{deal.name}</Text>
<Stack gap={0}>
<Text>Wb электросталь</Text>