feat: client tab in deal editor
This commit is contained in:
@ -3,6 +3,7 @@ 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 { ModuleNames } from "@/modules/modules";
|
||||
import styles from "./DealCard.module.css";
|
||||
|
||||
type Props = {
|
||||
@ -10,7 +11,7 @@ type Props = {
|
||||
};
|
||||
|
||||
const DealCard = ({ deal }: Props) => {
|
||||
const { selectedProject } = useProjectsContext();
|
||||
const { selectedProject, modulesSet } = useProjectsContext();
|
||||
const { dealsCrud } = useDealsContext();
|
||||
const { openDrawer } = useDrawersContext();
|
||||
|
||||
@ -47,6 +48,9 @@ const DealCard = ({ deal }: Props) => {
|
||||
</Group>
|
||||
<Stack className={styles["deal-data"]}>
|
||||
<Stack gap={0}>
|
||||
{modulesSet.has(ModuleNames.CLIENTS) && (
|
||||
<Text>{deal.client?.name}</Text>
|
||||
)}
|
||||
<Text>Wb электросталь</Text>
|
||||
<Text>19 000 руб.</Text>
|
||||
<Text>130 тов.</Text>
|
||||
|
||||
Reference in New Issue
Block a user