From f0d166e9d35e935a02d4c872af63c97f80bfbcfa Mon Sep 17 00:00:00 2001
From: Miqdad <ahmadmiqdad27@gmail.com>
Date: Sun, 31 Aug 2025 12:24:04 +0700
Subject: <Miqdad> Finish checkout redirect to detail transaction

---
 src/lib/checkout/components/FinishCheckout.jsx | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

(limited to 'src/lib/checkout/components/FinishCheckout.jsx')

diff --git a/src/lib/checkout/components/FinishCheckout.jsx b/src/lib/checkout/components/FinishCheckout.jsx
index d533325e..0243652f 100644
--- a/src/lib/checkout/components/FinishCheckout.jsx
+++ b/src/lib/checkout/components/FinishCheckout.jsx
@@ -55,12 +55,25 @@ const FinishCheckout = ({ query }) => {
       <div className='text-title-sm md:text-title-lg text-center font-semibold'>
         Terima Kasih atas Pembelian di Indoteknik.com
       </div>
-       <p className='text-title-sm md:text-title-lg font-semibold my-2'>No. Transaksi: <span className='text-red-500'>{query?.order_id?.replaceAll('-', '/')}</span></p>
+      <p className='text-title-sm md:text-title-lg font-semibold my-2'>
+        No. Transaksi:{' '}
+        <span className='text-red-500'>
+          {query?.order_id?.replaceAll('-', '/')}
+        </span>
+      </p>
       <div className='flex flex-col justify-center items-center text-body-2 md:text-body-1 text-center mt-3 px-24 md:px-36 py-4 border-2 gap-y-2 rounded'>
-        <p className="text-title-sm md:text-title-xl text-gray-500 mt-1">Estimasi Barang Siap pada Tanggal</p>
-        <p className="text-title-sm md:text-title-xl text-red-500 font-semibold my-2">{data?.expectedReadyToShip}</p> 
+        {(data?.expectedReadyToShip ?? '').toString().trim() && (
+          <>
+            <p className='text-title-sm md:text-title-xl text-gray-500 mt-1'>
+              Estimasi Barang Siap pada Tanggal
+            </p>
+            <p className='text-title-sm md:text-title-xl text-red-500 font-semibold my-2'>
+              {data.expectedReadyToShip}
+            </p>
+          </>
+        )}
         <Link
-          href={`/my/quotations/${data?.id}`}
+          href={`/my/transactions/${data?.id}`}
           className='btn-solid-red rounded-md text-base'
         >
           Cek Detail Transaksi
-- 
cgit v1.2.3

