From b7c9a4bc039d110f875161fbe659a457a5b8df57 Mon Sep 17 00:00:00 2001 From: morteza-mortezai Date: Fri, 26 Jun 2026 15:26:05 +0330 Subject: [PATCH] up --- src/pages/invoice/DetailPerfomaInvoice.tsx | 8 ++++++- .../invoice/components/InvoiceItemRow.tsx | 22 +------------------ 2 files changed, 8 insertions(+), 22 deletions(-) diff --git a/src/pages/invoice/DetailPerfomaInvoice.tsx b/src/pages/invoice/DetailPerfomaInvoice.tsx index 90b6b21..1a9b607 100644 --- a/src/pages/invoice/DetailPerfomaInvoice.tsx +++ b/src/pages/invoice/DetailPerfomaInvoice.tsx @@ -82,6 +82,7 @@ const DetailPerfomaInvoice: FC = () => { تخفیف (مبلغ) تخفیف (درصد) مبلغ کل + تاریخ تایید عملیات @@ -107,7 +108,12 @@ const DetailPerfomaInvoice: FC = () => { {discounts.percent} {formatAmount(lineTotal)} - {item.id && ( + {item.confirmedAt + ? moment(item.confirmedAt).format('jYYYY/jMM/jDD HH:mm') + : '-'} + + + {item.id && item.confirmedAt && ( diff --git a/src/pages/invoice/components/InvoiceItemRow.tsx b/src/pages/invoice/components/InvoiceItemRow.tsx index 505368f..fb31bfd 100644 --- a/src/pages/invoice/components/InvoiceItemRow.tsx +++ b/src/pages/invoice/components/InvoiceItemRow.tsx @@ -10,8 +10,7 @@ import { getItemSubTotal, } from "../utils/invoiceItem"; import { Trash } from "iconsax-react"; -import { Link } from "react-router-dom"; -import { Paths } from "@/config/Paths"; + type Props = { item: CreatePreInvoiceItemType; index: number; @@ -22,7 +21,6 @@ type Props = { ) => void; onRemove: () => void; canRemove: boolean; - onConvertToOrder?: () => void; error?: Partial>; }; @@ -32,18 +30,11 @@ const InvoiceItemRow: FC = ({ onChange, onRemove, canRemove, - onConvertToOrder, error, }) => { const total = getItemLineTotal(item); const subTotal = getItemSubTotal(item); const isPercentDiscount = item.discountPercent != null; - const convertToOrderUrl = item.id - ? `${Paths.convertToOrder}?${new URLSearchParams({ - invoiceItemId: item.id, - productId: item.productId, - }).toString()}` - : ""; const handleProductChange = (e: ChangeEvent) => { onChange(index, "productId", e.target.value); @@ -178,17 +169,6 @@ const InvoiceItemRow: FC = ({ )} - {item.id && ( - - - - )} );