From 74665e123b024aadf540109c44abc6a6627e52a8 Mon Sep 17 00:00:00 2001 From: AlexSserb Date: Mon, 12 May 2025 14:57:39 +0400 Subject: [PATCH] fix: product quantity edit fix --- .../components/ProductView/ProductView.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/cardModules/cardEditorTabs/ProductAndServiceTab/components/ProductView/ProductView.tsx b/src/modules/cardModules/cardEditorTabs/ProductAndServiceTab/components/ProductView/ProductView.tsx index 1e7de67..60e7230 100644 --- a/src/modules/cardModules/cardEditorTabs/ProductAndServiceTab/components/ProductView/ProductView.tsx +++ b/src/modules/cardModules/cardEditorTabs/ProductAndServiceTab/components/ProductView/ProductView.tsx @@ -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 = ({ 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);