From 91fae67a9fdece78f0d0fbf4230472577b6260c6 Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Thu, 11 Jul 2024 14:58:55 +0700 Subject: add key && update reject button by status quotation && add image reject --- public/images/reject.png | Bin 0 -> 1275897 bytes src/lib/transaction/components/Transaction.jsx | 149 +++++++++++++------------ 2 files changed, 79 insertions(+), 70 deletions(-) create mode 100644 public/images/reject.png diff --git a/public/images/reject.png b/public/images/reject.png new file mode 100644 index 00000000..623d02e8 Binary files /dev/null and b/public/images/reject.png differ diff --git a/src/lib/transaction/components/Transaction.jsx b/src/lib/transaction/components/Transaction.jsx index 8e7cede0..b099ffa7 100644 --- a/src/lib/transaction/components/Transaction.jsx +++ b/src/lib/transaction/components/Transaction.jsx @@ -1,4 +1,6 @@ import Spinner from '@/core/components/elements/Spinner/Spinner'; +import NextImage from 'next/image'; +import rejectImage from "../../../../public/images/reject.png" import useTransaction from '../hooks/useTransaction'; import TransactionStatusBadge from './TransactionStatusBadge'; import Divider from '@/core/components/elements/Divider/Divider'; @@ -646,85 +648,85 @@ const Transaction = ({ id }) => {
Rincian Pembelian
- {transaction?.data?.products?.length > 0? ( - - - - - {/* */} - - - - - - - - {transaction?.data?.products?.map((product) => ( - - + {/* {auth?.feature.soApproval && (auth.webRole == 2 || auth.webRole == 3) && (transaction.data.isReaject == false) && ( */} + {auth?.feature.soApproval && (auth.webRole == 2 || auth.webRole == 3) && (router.asPath.includes("/my/quotations/")) && transaction.data?.status == 'draft' && ( + + )} + + ))} + +
Nama ProdukDiskonJumlahHargaSubtotal
- - {product?.name} - -
+ {transaction?.data?.products?.length > 0? ( + + + + + {/* */} + + + + + + + + {transaction?.data?.products?.map((product) => ( + + - {/* */} - - - - {/* {auth?.feature.soApproval && (auth.webRole == 2 || auth.webRole == 3) && (transaction.data.isReaject == false) && ( */} - {auth?.feature.soApproval && (auth.webRole == 2 || auth.webRole == 3) && (router.asPath.includes("/my/quotations/")) && ( + + {/* */} + - )} - - ))} - -
Nama ProdukDiskonJumlahHargaSubtotal
- {product?.parent?.name} + {product?.name} -
- {product?.code}{' '} - {product?.attributes.length > 0 - ? `| ${product?.attributes.join(', ')}` - : ''} -
- -
- {product.price.discountPercentage > 0 - ? `${product.price.discountPercentage}%` - : ''} - {product.quantity} - {/* {product.price.discountPercentage > 0 && ( -
- {currencyFormat(product.price.price)} +
+ + {product?.parent?.name} + +
+ {product?.code}{' '} + {product?.attributes.length > 0 + ? `| ${product?.attributes.join(', ')}` + : ''} +
- )} */} -
{currencyFormat(product.price.priceDiscount)}
-
{currencyFormat(product.price.subtotal)} + {product.price.discountPercentage > 0 + ? `${product.price.discountPercentage}%` + : ''} + {product.quantity} - + {/* {product.price.discountPercentage > 0 && ( +
+ {currencyFormat(product.price.price)} +
+ )} */} +
{currencyFormat(product.price.priceDiscount)}
+
{currencyFormat(product.price.subtotal)} + +
) : (
Semua produk telah di reject
)} @@ -856,13 +858,20 @@ const Transaction = ({ id }) => { )} */}
{currencyFormat(product.price.priceDiscount)}
- {currencyFormat(product.quantity * product.price.priceDiscount)} + + + ))} )} - + -- cgit v1.2.3