summaryrefslogtreecommitdiff
path: root/src/lib/transaction/components/stepper.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/transaction/components/stepper.jsx')
-rw-r--r--src/lib/transaction/components/stepper.jsx26
1 files changed, 18 insertions, 8 deletions
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' }} />