fix: product quantity edit fix
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user