fix: product quantity edit fix

This commit is contained in:
2025-05-12 14:57:39 +04:00
parent 4fee2da42c
commit 74665e123b

View File

@@ -14,6 +14,7 @@ import { modals } from "@mantine/modals";
import { ServiceType } from "../../../../../../shared/enums/ServiceType.ts";
import useCardProductAndServiceTabState from "../../hooks/useProductAndServiceTabState.tsx";
import { useDebouncedCallback } from "@mantine/hooks";
import { isDealLocked } from "../../../../../../pages/CardsPage/utils/isDealPaid.ts";
type Props = {
product: CardProductSchema;
@@ -47,7 +48,7 @@ const ProductView: FC<Props> = ({
if (!onChange) return;
onChange(item);
}, 200);
const isLocked = Boolean(cardState.card?.billRequests) || Boolean(cardState.card?.group?.billRequests);
const isLocked = isDealLocked(cardState.card);
const onDeleteClick = () => {
if (!onDelete) return;
onDelete(product);