From de7361718def0f6bb32294bb074841ba2c0a3ce6 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Tue, 21 Feb 2023 16:25:35 +0700
Subject: fix

---
 src/lib/transaction/components/Transactions.jsx | 133 ++++++++++++------------
 1 file changed, 66 insertions(+), 67 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 25a6076a..280e8fc5 100644
--- a/src/lib/transaction/components/Transactions.jsx
+++ b/src/lib/transaction/components/Transactions.jsx
@@ -58,79 +58,78 @@ const Transactions = () => {
   } 
 
   return (
-    <div className="p-4">
-      <div className="flex flex-col gap-y-4">
-        <form className="flex gap-x-3" onSubmit={handleSubmit}>
-          <input 
-            type="text" 
-            className="form-input" 
-            placeholder="Cari Transaksi..."
-            value={inputQuery}
-            onChange={(e) => setInputQuery(e.target.value)}
-          />
-          <button 
-            className="btn-light bg-transparent px-3"
-            type="submit"
-          >
-            <MagnifyingGlassIcon className="w-6" />
-          </button>
-        </form>
-        { transactions.isLoading && (
-          <div className="flex justify-center my-4">
-            <Spinner className="w-6 text-gray_r-12/50 fill-gray_r-12" />
-          </div>
-        ) }
+    <div className="p-4 flex flex-col gap-y-4">
+      <form className="flex gap-x-3" onSubmit={handleSubmit}>
+        <input 
+          type="text" 
+          className="form-input" 
+          placeholder="Cari Transaksi..."
+          value={inputQuery}
+          onChange={(e) => setInputQuery(e.target.value)}
+        />
+        <button 
+          className="btn-light bg-transparent px-3"
+          type="submit"
+        >
+          <MagnifyingGlassIcon className="w-6" />
+        </button>
+      </form>
+      
+      { transactions.isLoading && (
+        <div className="flex justify-center my-4">
+          <Spinner className="w-6 text-gray_r-12/50 fill-gray_r-12" />
+        </div>
+      ) }
 
-        { !transactions.isLoading && transactions.data?.saleOrders?.length === 0 && (
-          <Alert type="info" className="text-center">
-            Tidak ada data transaksi
-          </Alert>
-        ) }
+      { !transactions.isLoading && transactions.data?.saleOrders?.length === 0 && (
+        <Alert type="info" className="text-center">
+          Tidak ada data transaksi
+        </Alert>
+      ) }
 
-        { transactions.data?.saleOrders?.map((saleOrder, index) => (
-          <div className="p-4 shadow border border-gray_r-3 rounded-md" key={index}>
-            <div className="grid grid-cols-2">
-              <Link href={`/my/transaction/${saleOrder.id}`}>
-                <span className="text-caption-2 text-gray_r-11">No. Transaksi</span>
-                <h2 className="text-red_r-11 mt-1">{ saleOrder.name }</h2>
-              </Link>
-              <div className="flex gap-x-1 justify-end">
-                <TransactionStatusBadge status={saleOrder.status} />
-                <EllipsisVerticalIcon className="w-5 h-5" onClick={() => setToOthers(saleOrder)} />
+      { transactions.data?.saleOrders?.map((saleOrder, index) => (
+        <div className="p-4 shadow border border-gray_r-3 rounded-md" key={index}>
+          <div className="grid grid-cols-2">
+            <Link href={`/my/transaction/${saleOrder.id}`}>
+              <span className="text-caption-2 text-gray_r-11">No. Transaksi</span>
+              <h2 className="text-red_r-11 mt-1">{ saleOrder.name }</h2>
+            </Link>
+            <div className="flex gap-x-1 justify-end">
+              <TransactionStatusBadge status={saleOrder.status} />
+              <EllipsisVerticalIcon className="w-5 h-5" onClick={() => setToOthers(saleOrder)} />
+            </div>
+          </div>
+          <Link href={`/my/transaction/${saleOrder.id}`}>
+            <div className="grid grid-cols-2 mt-3">
+              <div>
+                <span className="text-caption-2 text-gray_r-11">No. Purchase Order</span>
+                <p className="mt-1 font-medium text-gray_r-12">{ saleOrder.purchaseOrderName || '-' }</p>
+              </div>
+              <div className="text-right">
+                <span className="text-caption-2 text-gray_r-11">Total Invoice</span>
+                <p className="mt-1 font-medium text-gray_r-12">{ saleOrder.invoiceCount } Invoice</p>
               </div>
             </div>
-            <Link href={`/my/transaction/${saleOrder.id}`}>
-              <div className="grid grid-cols-2 mt-3">
-                <div>
-                  <span className="text-caption-2 text-gray_r-11">No. Purchase Order</span>
-                  <p className="mt-1 font-medium text-gray_r-12">{ saleOrder.purchaseOrderName || '-' }</p>
-                </div>
-                <div className="text-right">
-                  <span className="text-caption-2 text-gray_r-11">Total Invoice</span>
-                  <p className="mt-1 font-medium text-gray_r-12">{ saleOrder.invoiceCount } Invoice</p>
-                </div>
+            <div className="grid grid-cols-2 mt-3">
+              <div>
+                <span className="text-caption-2 text-gray_r-11">Sales</span>
+                <p className="mt-1 font-medium text-gray_r-12">{ saleOrder.sales }</p>
               </div>
-              <div className="grid grid-cols-2 mt-3">
-                <div>
-                  <span className="text-caption-2 text-gray_r-11">Sales</span>
-                  <p className="mt-1 font-medium text-gray_r-12">{ saleOrder.sales }</p>
-                </div>
-                <div className="text-right">
-                  <span className="text-caption-2 text-gray_r-11">Total Harga</span>
-                  <p className="mt-1 font-medium text-gray_r-12">{ currencyFormat(saleOrder.amountTotal) }</p>
-                </div>
+              <div className="text-right">
+                <span className="text-caption-2 text-gray_r-11">Total Harga</span>
+                <p className="mt-1 font-medium text-gray_r-12">{ currencyFormat(saleOrder.amountTotal) }</p>
               </div>
-            </Link>
-          </div>
-        )) }
-        
-        <Pagination
-          pageCount={pageCount}
-          currentPage={parseInt(page)} 
-          url={`/my/transactions${pageQuery}`}
-          className="mt-2 mb-2"
-        />
-      </div>
+            </div>
+          </Link>
+        </div>
+      )) }
+      
+      <Pagination
+        pageCount={pageCount}
+        currentPage={parseInt(page)} 
+        url={`/my/transactions${pageQuery}`}
+        className="mt-2 mb-2"
+      />
 
       <BottomPopup title="Lainnya" active={toOthers} close={() => setToOthers(null)}>
         <div className="flex flex-col gap-y-4 mt-2">
-- 
cgit v1.2.3

