From 39b5e05a5fcc7ca26342f37e85c6585d1dacb3a5 Mon Sep 17 00:00:00 2001 From: "HATEC\\SPVDEV001" Date: Tue, 5 Mar 2024 14:37:44 +0700 Subject: add address & expedisi di page quotation - template stepper approval --- src/lib/transaction/components/stepper.jsx | 64 ++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 src/lib/transaction/components/stepper.jsx (limited to 'src/lib/transaction/components/stepper.jsx') diff --git a/src/lib/transaction/components/stepper.jsx b/src/lib/transaction/components/stepper.jsx new file mode 100644 index 00000000..54243946 --- /dev/null +++ b/src/lib/transaction/components/stepper.jsx @@ -0,0 +1,64 @@ +import { + Box, + Step, + StepDescription, + StepIcon, + StepIndicator, + StepNumber, + StepSeparator, + StepStatus, + StepTitle, + Stepper, + useSteps, +} from '@chakra-ui/react'; +import Image from 'next/image'; + +const StepApproval = ({ layer, status }) => { + const steps = [ + { title: 'Indoteknik', description: 'Contact Info', layer_approval: 1 }, + { title: 'Manager', description: 'Date & Time', layer_approval: 2 }, + { title: 'Director', description: 'Select Rooms', layer_approval: 3 }, + ]; + const { activeStep } = useSteps({ + index: layer, + count: steps.length, + }); + return ( + + {steps.map((step, index) => ( + + + { layer === step.layer_approval && status === 'cancel' ? ( + + } + incomplete={} + active={} + /> + ) : ( + } + incomplete={} + active={} + /> + )} + + + + {step.title} + {step.description} + + + ))} + + ); +}; + +export default StepApproval; -- cgit v1.2.3