From 21d3c9cdc25477f5d07ff395a65f89430b7c9924 Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Tue, 21 May 2024 14:54:08 +0700
Subject: delete discount field

---
 src/lib/transaction/components/Transaction.jsx | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

(limited to 'src/lib/transaction/components/Transaction.jsx')

diff --git a/src/lib/transaction/components/Transaction.jsx b/src/lib/transaction/components/Transaction.jsx
index 8f4b2038..9b11f5bb 100644
--- a/src/lib/transaction/components/Transaction.jsx
+++ b/src/lib/transaction/components/Transaction.jsx
@@ -562,7 +562,7 @@ const Transaction = ({ id }) => {
                 <thead>
                   <tr>
                     <th>Nama Produk</th>
-                    <th>Diskon</th>
+                    {/* <th>Diskon</th> */}
                     <th>Jumlah</th>
                     <th>Harga</th>
                     <th>Subtotal</th>
@@ -605,18 +605,18 @@ const Transaction = ({ id }) => {
                           </div>
                         </div>
                       </td>
-                      <td>
+                      {/* <td>
                         {product.price.discountPercentage > 0
                           ? `${product.price.discountPercentage}%`
                           : ''}
-                      </td>
+                      </td> */}
                       <td>{product.quantity}</td>
                       <td>
-                        {product.price.discountPercentage > 0 && (
+                        {/* {product.price.discountPercentage > 0 && (
                           <div className='line-through mb-1 text-caption-1 text-gray_r-12/70'>
                             {currencyFormat(product.price.price)}
                           </div>
-                        )}
+                        )} */}
                         <div>{currencyFormat(product.price.priceDiscount)}</div>
                       </td>
                       <td>{currencyFormat(product.price.subtotal)}</td>
-- 
cgit v1.2.3


From f287fc062c4ceb5039b5ca946da2e6854c27b007 Mon Sep 17 00:00:00 2001
From: trisusilo48 <tri.susilo@altama.co.id>
Date: Tue, 2 Jul 2024 14:55:14 +0700
Subject: add site on transactions list and transaction detial

---
 src/lib/transaction/components/Transaction.jsx | 25 +++++++++++++++----------
 1 file changed, 15 insertions(+), 10 deletions(-)

(limited to 'src/lib/transaction/components/Transaction.jsx')

diff --git a/src/lib/transaction/components/Transaction.jsx b/src/lib/transaction/components/Transaction.jsx
index 9b11f5bb..30f1d902 100644
--- a/src/lib/transaction/components/Transaction.jsx
+++ b/src/lib/transaction/components/Transaction.jsx
@@ -37,7 +37,7 @@ import rejectApi from '../api/rejectApi';
 const Transaction = ({ id }) => {
   const auth = useAuth();
   const { transaction } = useTransaction({ id });
-  
+
   const statusApprovalWeb = transaction.data?.approvalStep
 
   const { queryAirwayBill } = useAirwayBill({ orderId: id });
@@ -78,7 +78,7 @@ const Transaction = ({ id }) => {
   const closeCancelTransaction = () => setCancelTransaction(false);
 
   const [rejectTransaction, setRejectTransaction] = useState(false);
-  
+
   const openRejectTransaction = () => setRejectTransaction(true);
   const closeRejectTransaction = () => setRejectTransaction(false);
   const submitCancelTransaction = async () => {
@@ -109,9 +109,9 @@ const Transaction = ({ id }) => {
   }
 
   const handleReject = async () => {
-   await rejectApi({ id });
-   closeRejectTransaction()
-   transaction.refetch();
+    await rejectApi({ id });
+    closeRejectTransaction()
+    transaction.refetch();
   }
 
   const memoizeVariantGroupCard = useMemo(
@@ -365,7 +365,7 @@ const Transaction = ({ id }) => {
                   className='btn-yellow w-full'
                   onClick={checkout}
                   disabled={
-                    transaction.data?.status === 'cancel' ? true : false  || auth?.webRole === statusApprovalWeb ? true : false
+                    transaction.data?.status === 'cancel' ? true : false || auth?.webRole === statusApprovalWeb ? true : false
                   }
                 >
                   Approve
@@ -374,7 +374,7 @@ const Transaction = ({ id }) => {
                   className='btn-solid-red px-7 w-full'
                   onClick={checkout}
                   disabled={
-                    transaction.data?.status === 'cancel' ? true : false  || auth?.webRole === statusApprovalWeb ? true : false
+                    transaction.data?.status === 'cancel' ? true : false || auth?.webRole === statusApprovalWeb ? true : false
                   }
                 >
                   Reject
@@ -454,7 +454,7 @@ const Transaction = ({ id }) => {
                         className='btn-solid-red px-7'
                         onClick={openRejectTransaction}
                         disabled={
-                          transaction.data?.status === 'cancel' ? true : false || auth?.webRole === statusApprovalWeb ? true : false  || statusApprovalWeb < 1 ? true : false
+                          transaction.data?.status === 'cancel' ? true : false || auth?.webRole === statusApprovalWeb ? true : false || statusApprovalWeb < 1 ? true : false
                         }
                       >
                         Reject
@@ -467,7 +467,7 @@ const Transaction = ({ id }) => {
                       Lanjutkan Transaksi
                     </button>
                   )}
-                {transaction.data?.status != 'draft' &&  !auth?.feature.soApproval &&  (
+                {transaction.data?.status != 'draft' && !auth?.feature.soApproval && (
                   <button
                     className='btn-light'
                     disabled={transaction.data?.status != 'waiting'}
@@ -490,7 +490,7 @@ const Transaction = ({ id }) => {
                   <div>Ketentuan Pembayaran</div>
                   <div>: {transaction?.data?.paymentTerm}</div>
 
-                  {!auth?.feature?.soApproval && (
+                  {!auth?.feature?.soApproval ? (
                     <>
                       <div>Purchase Order</div>
                       <div>
@@ -510,6 +510,11 @@ const Transaction = ({ id }) => {
                         </button>
                       </div>
                     </>
+                  ) : (
+                    <>
+                      <div>Site</div>
+                      <div>: {transaction?.data?.sitePartner}</div>
+                    </>
                   )}
                 </div>
               </div>
-- 
cgit v1.2.3

