feat: total price and products count display for deals
This commit is contained in:
@ -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>
|
||||
|
||||
Reference in New Issue
Block a user