mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
refactor(FE): Add condition to hide buttons when step number is 3
This commit is contained in:
@@ -718,31 +718,33 @@ const DeliveryOrderFormModal = ({
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{step === 1 && (
|
{step === 1 &&
|
||||||
<div className='w-full px-4 py-3 grid grid-cols-2 items-center justify-between gap-3 border-t border-base-content/10'>
|
marketing?.data?.latest_approval?.step_number !== 3 && (
|
||||||
<Button
|
<div className='w-full px-4 py-3 grid grid-cols-2 items-center justify-between gap-3 border-t border-base-content/10'>
|
||||||
type='button'
|
<Button
|
||||||
variant='outline'
|
type='button'
|
||||||
color='none'
|
variant='outline'
|
||||||
onClick={() => rejectModal.openModal()}
|
color='none'
|
||||||
disabled={deliveryRejected || isPending}
|
onClick={() => rejectModal.openModal()}
|
||||||
className='p-3 border-base-content/10 shadow-button-soft rounded-lg text-sm text-base-content/50 font-semibold'
|
disabled={deliveryRejected || isPending}
|
||||||
>
|
className='p-3 border-base-content/10 shadow-button-soft rounded-lg text-sm text-base-content/50 font-semibold'
|
||||||
Reject
|
>
|
||||||
</Button>
|
Reject
|
||||||
<Button
|
</Button>
|
||||||
type='button'
|
<Button
|
||||||
color='primary'
|
type='button'
|
||||||
onClick={() => {
|
color='primary'
|
||||||
formRef.current?.requestSubmit();
|
onClick={() => {
|
||||||
}}
|
formRef.current?.requestSubmit();
|
||||||
className='p-3 shadow-button-soft text-base-100 rounded-lg text-sm font-semibold'
|
}}
|
||||||
disabled={deliveryRejected || isPending}
|
className='p-3 shadow-button-soft text-base-100 rounded-lg text-sm font-semibold'
|
||||||
>
|
disabled={deliveryRejected || isPending}
|
||||||
Approve
|
>
|
||||||
</Button>
|
Approve
|
||||||
</div>
|
</Button>
|
||||||
)}
|
</div>
|
||||||
|
)}
|
||||||
|
{step === 3 && null}
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user