feat: modules, products, services, services kits
This commit is contained in:
@ -11,7 +11,7 @@ const CreateBoardButton = () => {
|
||||
<Flex style={{ borderBottom: "2px solid gray" }}>
|
||||
<InPlaceInput
|
||||
placeholder={"Название доски"}
|
||||
onChange={boardsCrud.onCreate}
|
||||
onChange={name => boardsCrud.onCreate({ name })}
|
||||
getChildren={startEditing => (
|
||||
<Box
|
||||
onClick={startEditing}
|
||||
|
||||
@ -11,7 +11,7 @@ const CreateCardButton = () => {
|
||||
const { dealsCrud } = useDealsContext();
|
||||
|
||||
const onSubmit = (values: CreateDealForm) => {
|
||||
dealsCrud.onCreate(values.name);
|
||||
dealsCrud.onCreate(values);
|
||||
setIsCreating(prevState => !prevState);
|
||||
setIsTransitionEnded(false);
|
||||
};
|
||||
|
||||
@ -17,7 +17,7 @@ const CreateStatusButton = () => {
|
||||
className={styles["inner-container"]}>
|
||||
<InPlaceInput
|
||||
placeholder={"Название колонки"}
|
||||
onChange={statusesCrud.onCreate}
|
||||
onChange={name => statusesCrud.onCreate({ name })}
|
||||
getChildren={startEditing => (
|
||||
<Center
|
||||
p={"sm"}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { Box, Card, Group, Pill, Stack, Text } from "@mantine/core";
|
||||
import { useDealsContext } from "@/app/deals/contexts/DealsContext";
|
||||
import { useProjectsContext } from "@/app/deals/contexts/ProjectsContext";
|
||||
import { useDrawersContext } from "@/drawers/DrawersContext";
|
||||
import { DealSchema } from "@/lib/client";
|
||||
import styles from "./DealCard.module.css";
|
||||
@ -9,6 +10,7 @@ type Props = {
|
||||
};
|
||||
|
||||
const DealCard = ({ deal }: Props) => {
|
||||
const { selectedProject } = useProjectsContext();
|
||||
const { dealsCrud } = useDealsContext();
|
||||
const { openDrawer } = useDrawersContext();
|
||||
|
||||
@ -19,6 +21,7 @@ const DealCard = ({ deal }: Props) => {
|
||||
value: deal,
|
||||
onChange: deal => dealsCrud.onUpdate(deal.id, deal),
|
||||
onDelete: dealsCrud.onDelete,
|
||||
project: selectedProject,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user