From 0a548e87febeab3d25ba7d5270b73b757f130b26 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Wed, 26 Apr 2023 11:39:23 +0700
Subject: fix bug on update qty cart and create quotation page

---
 src/lib/invoice/components/Invoices.jsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'src/lib/invoice/components/Invoices.jsx')

diff --git a/src/lib/invoice/components/Invoices.jsx b/src/lib/invoice/components/Invoices.jsx
index 6f7d54a0..8918fae4 100644
--- a/src/lib/invoice/components/Invoices.jsx
+++ b/src/lib/invoice/components/Invoices.jsx
@@ -78,7 +78,7 @@ const Invoices = () => {
           {invoices.data?.invoices?.map((invoice, index) => (
             <div className='p-4 shadow border border-gray_r-3 rounded-md' key={index}>
               <div className='grid grid-cols-2'>
-                <Link href={`/my/invoice/${invoice.id}`}>
+                <Link href={`${router.pathname}/${invoice.id}`}>
                   <span className='text-caption-2 text-gray_r-11'>No. Invoice</span>
                   <h2 className='text-danger-500 mt-1'>{invoice.name}</h2>
                 </Link>
@@ -91,7 +91,7 @@ const Invoices = () => {
                   <EllipsisVerticalIcon className='w-5 h-5' onClick={() => setToOthers(invoice)} />
                 </div>
               </div>
-              <Link href={`/my/invoice/${invoice.id}`}>
+              <Link href={`${router.pathname}/${invoice.id}`}>
                 <div className='grid grid-cols-2 text-caption-2 text-gray_r-11 mt-2 font-normal'>
                   <p>{invoice.invoiceDate}</p>
                   <p className='text-right'>{invoice.paymentTerm}</p>
@@ -214,7 +214,7 @@ const Invoices = () => {
                 {invoices.data?.invoices?.map((invoice) => (
                   <tr key={invoice.id}>
                     <td>
-                      <Link href={`/my/invoice/${invoice.id}`}>{invoice.name}</Link>
+                      <Link href={`${router.pathname}/${invoice.id}`}>{invoice.name}</Link>
                     </td>
                     <td>{invoice.purchaseOrderName || '-'}</td>
                     <td>{invoice.invoiceDate}</td>
-- 
cgit v1.2.3

