feat: deal create, update, delete
This commit is contained in:
@ -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>
|
||||
|
||||
Reference in New Issue
Block a user