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/Transactions.jsx | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

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

diff --git a/src/lib/transaction/components/Transactions.jsx b/src/lib/transaction/components/Transactions.jsx
index 5a6dfb01..92bdd276 100644
--- a/src/lib/transaction/components/Transactions.jsx
+++ b/src/lib/transaction/components/Transactions.jsx
@@ -145,7 +145,7 @@ const Transactions = ({ context = '' }) => {
         siteFilter || (auth?.webRole === null && auth?.site ? auth.site : null),
     };
     const queryString = toQuery(query)
-    const data = await transactionsApi({ query : queryString });
+    const data = await transactionsApi({ query: queryString });
     return data;
   };
 
@@ -349,7 +349,7 @@ const Transactions = ({ context = '' }) => {
                       </option>
                     ))}
                   </select>
-                ):( <div></div>) }
+                ) : (<div></div>)}
 
                 <form className='flex gap-x-1' onSubmit={handleSubmit}>
                   <input
@@ -382,6 +382,9 @@ const Transactions = ({ context = '' }) => {
                   <th>No. PO</th>
                   <th>Tanggal</th>
                   <th>Created By</th>
+                  {auth?.feature?.soApproval && (
+                    <th>Site</th>
+                  )}
                   <th className='!text-left'>Salesperson</th>
                   <th className='!text-left'>Total</th>
                   <th>Status</th>
@@ -417,6 +420,9 @@ const Transactions = ({ context = '' }) => {
                     <td>{saleOrder.purchaseOrderName || '-'}</td>
                     <td>{saleOrder.dateOrder || '-'}</td>
                     <td>{saleOrder.address.customer?.name || '-'}</td>
+                    {auth?.feature?.soApproval && (
+                      <td>{saleOrder.sitePartner || '-'}</td>
+                    )}
                     <td className='!text-left'>{saleOrder.sales}</td>
                     <td className='!text-left'>
                       {currencyFormat(saleOrder.amountTotal)}
-- 
cgit v1.2.3

