From a5db88b5e8574edb1908fd2a9b9fa6cf5ed2ff05 Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Wed, 6 Mar 2024 14:30:27 +0700
Subject: add approve dan reject

---
 src/lib/transaction/components/stepper.jsx | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

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

diff --git a/src/lib/transaction/components/stepper.jsx b/src/lib/transaction/components/stepper.jsx
index bc3f6fd8..a121cabd 100644
--- a/src/lib/transaction/components/stepper.jsx
+++ b/src/lib/transaction/components/stepper.jsx
@@ -53,14 +53,24 @@ const StepApproval = ({ layer, status }) => {
 
           <Box flexShrink='0'>
             <StepTitle className='md:text-xs'>{step.title}</StepTitle>
-            {layer > step.layer_approval && (
-              <StepDescription className='md:text-[8px]'>Approved</StepDescription>
-            )}
-            {layer === step.layer_approval && status === 'cancel' && (
-              <StepDescription className='md:text-[8px]'>Rejected</StepDescription>
-            )}
-            {layer < step.layer_approval && (
-              <StepDescription className='md:text-[8px]'>Pending</StepDescription>
+            {status === 'cancel' ? (
+              layer > step.layer_approval ? (
+                <StepDescription className='md:text-[8px]'>
+                  Approved
+                </StepDescription>
+              ) : (
+                <StepDescription className='md:text-[8px]'>
+                  Rejected
+                </StepDescription>
+              )
+            ) : layer > step.layer_approval ? (
+              <StepDescription className='md:text-[8px]'>
+                Approved
+              </StepDescription>
+            ) : (
+              <StepDescription className='md:text-[8px]'>
+                Pending
+              </StepDescription>
             )}
           </Box>
           <StepSeparator _horizontal={{ ml: '0' }} />
-- 
cgit v1.2.3

