feat: total price and products count display for deals

This commit is contained in:
2025-10-11 16:21:31 +04:00
parent a899177623
commit 2052737561
6 changed files with 55 additions and 14 deletions

View File

@ -12,7 +12,7 @@ type Props = {
const DealCard = ({ deal }: Props) => {
const { selectedProject, modulesSet } = useProjectsContext();
const { dealsCrud } = useDealsContext();
const { dealsCrud, refetchDeals } = useDealsContext();
const { openDrawer } = useDrawersContext();
const onClick = () => {
@ -24,6 +24,7 @@ const DealCard = ({ deal }: Props) => {
onDelete: dealsCrud.onDelete,
project: selectedProject,
},
onClose: refetchDeals,
});
};
@ -51,9 +52,14 @@ const DealCard = ({ deal }: Props) => {
{modulesSet.has(ModuleNames.CLIENTS) && (
<Text>{deal.client?.name}</Text>
)}
<Text>Wb электросталь</Text>
<Text>19 000 руб.</Text>
<Text>130 тов.</Text>
{modulesSet.has(ModuleNames.FULFILLMENT_BASE) && (
<>
<Text key={"price"}>{deal.totalPrice} руб.</Text>
<Text key={"count"}>
{deal.productsQuantity} тов.
</Text>
</>
)}
</Stack>
<Group gap={"xs"}>
<Pill className={styles["first-tag"]}>Срочно</Pill>