diff --git a/src/Pages/OptiFiiGifsAndVouchers/ApplyForGiftCard/ApplyForGiftCard.jsx b/src/Pages/OptiFiiGifsAndVouchers/ApplyForGiftCard/ApplyForGiftCard.jsx index efd17e7..0733547 100644 --- a/src/Pages/OptiFiiGifsAndVouchers/ApplyForGiftCard/ApplyForGiftCard.jsx +++ b/src/Pages/OptiFiiGifsAndVouchers/ApplyForGiftCard/ApplyForGiftCard.jsx @@ -7,15 +7,16 @@ import { RadioGroup, Text, VStack, - Divider, useBreakpointValue, } from "@chakra-ui/react"; import { OPACITY_ON_LOAD } from "../../../Layout/animations"; import SelectCard from "./SelectCard"; import DigiTable from "./DigiTable"; import WhereToShare from "./WhereToShare"; +import PrimaryButton from "../../../../src/Components/Buttons/PrimaryButton"; - +const Stepper = () => { + const [step, setStep] = useState(1); const handleNext = () => { if (step < steps.length) { @@ -29,79 +30,100 @@ import WhereToShare from "./WhereToShare"; } }; - const Stepper = () => { - const [step, setStep] = useState(1); - const steps = [ - { component: , description: "In Progress" }, - { - component: , - - label: "Where to share?", - description: "Pending", - }, - { - component: , - label: "Select employee", - description: "Pending", - }, - ]; + const steps = [ + { + component: , + label: "Select card type", + description: "In Progress", + }, + { + component: , + label: "Where to share?", + description: "Pending", + }, + { + component: , + label: "Select employee", + description: "Pending", + }, + ]; const currentStep = step - 1; - const isLastStep = step === steps.length; - const isFirstStep = step === 1; const circleSize = useBreakpointValue({ base: "30px", md: "40px" }); return ( - - setStep(Number(val))} - > - - {steps.map((item, index) => ( - - - {/* {index + 1} */} - - - STEP {index + 1} - - - {item.label} - - - {index + 1 === step ? "In Progress" : "Pending"} - - - ))} - - - - {/* Stepper Content */} - {steps[currentStep].component} - - {/* Navigation Buttons */} - - - {/* */} - + + {steps.map((item, index) => ( + + + + + STEP {index + 1} + + + {item.label} + + + {index + 1 === step ? "In Progress" : "Pending"} + + + + {/* Add the line between steps with conditional color */} + {index < steps.length - 1 && ( + + )} + + ))} + + + + + + + + {steps[currentStep].label} + + {/* Stepper Content */} + {steps[currentStep].component} + + + + + ); diff --git a/src/Pages/OptiFiiGifsAndVouchers/ApplyForGiftCard/DigiTable.jsx b/src/Pages/OptiFiiGifsAndVouchers/ApplyForGiftCard/DigiTable.jsx index 797269d..6eeb935 100644 --- a/src/Pages/OptiFiiGifsAndVouchers/ApplyForGiftCard/DigiTable.jsx +++ b/src/Pages/OptiFiiGifsAndVouchers/ApplyForGiftCard/DigiTable.jsx @@ -1,69 +1,67 @@ import { - Box, - Button, - Image, - Radio, - RadioGroup, - Stack, - Text, - Drawer, - DrawerBody, - DrawerFooter, - DrawerOverlay, - DrawerContent, - DrawerCloseButton, - useDisclosure, - } from "@chakra-ui/react"; - import React, { useState } from "react"; - import FileUploader from "../../../Components/FileUploader/FileUploader"; - import blackmen from "../../../assets/blackmen.png"; - import koreanpfp from "../../../assets/koreanboi.png"; - import asian from "../../../assets/asain.png"; - import goth from "../../../assets/goth.png"; - import womenpfp from "../../../assets/womenpfp1.png"; - import { useRef } from "react"; - import { OPACITY_ON_LOAD } from "../../../Layout/animations"; - import DigiTable from "./DigitalTable"; - - const BrandVoucherTable = () => { - const [selectedValue, setSelectedValue] = useState("1"); - const { isOpen, onOpen, onClose } = useDisclosure(); - const btnRef = useRef(); - - const renderContent = () => { - switch (selectedValue) { - case "1": - return Hii; - case "2": - return Heelo; - default: - return null; - } - }; - - return ( + Box, + Button, + Image, + Radio, + RadioGroup, + Stack, + Text, + Drawer, + DrawerBody, + DrawerFooter, + DrawerOverlay, + DrawerContent, + DrawerCloseButton, + useDisclosure, +} from "@chakra-ui/react"; +import React, { useState } from "react"; +import FileUploader from "../../../Components/FileUploader/FileUploader"; +import blackmen from "../../../assets/blackmen.png"; +import koreanpfp from "../../../assets/koreanboi.png"; +import asian from "../../../assets/asain.png"; +import goth from "../../../assets/goth.png"; +import womenpfp from "../../../assets/womenpfp1.png"; +import { useRef } from "react"; +import { OPACITY_ON_LOAD } from "../../../Layout/animations"; +import DigiTable from "./DigitalTable"; + +const BrandVoucherTable = () => { + const [selectedValue, setSelectedValue] = useState("1"); + const { isOpen, onOpen, onClose } = useDisclosure(); + const btnRef = useRef(); + + const renderContent = () => { + switch (selectedValue) { + case "1": + return Hii; + case "2": + return Heelo; + default: + return null; + } + }; + + return ( + - - - Select employee - - - - + + Import employee + + + + {" "} to quickly start your import - - - - ); - }; - - export default BrandVoucherTable; - \ No newline at end of file + + + + + + ); +}; + +export default BrandVoucherTable; diff --git a/src/Pages/OptiFiiGifsAndVouchers/ApplyForGiftCard/DigitalTable.jsx b/src/Pages/OptiFiiGifsAndVouchers/ApplyForGiftCard/DigitalTable.jsx index 6b48806..c6d29de 100644 --- a/src/Pages/OptiFiiGifsAndVouchers/ApplyForGiftCard/DigitalTable.jsx +++ b/src/Pages/OptiFiiGifsAndVouchers/ApplyForGiftCard/DigitalTable.jsx @@ -173,7 +173,7 @@ import { })); return ( - + - - - Import employee - - - - - - - - } - rightIcon={} - > - Sort - - - Ascending - Descending - Recently Viewed - Recently Added - - - - - - - - - setSearchTerm(e.target.value)} - /> - - - } - rightIcon={} - > - Filter - - - Ascending - Descending - Recently Viewed - Recently Added - - - - - - { }; }, [tiltRefs]); - return ( - - - Select card type - + // For check select - + const [isSelected, setIsSelected] = useState(false); + + const handleClick = () => { + setIsSelected((prevState) => !prevState); + }; + + + return ( + + {cards.map((card, index) => ( { - + {card.title} - + {card.subtitle} - + {card.description} diff --git a/src/Pages/OptiFiiGifsAndVouchers/ApplyForGiftCard/SingleAddress.jsx b/src/Pages/OptiFiiGifsAndVouchers/ApplyForGiftCard/SingleAddress.jsx index a08ea4c..362e0a6 100644 --- a/src/Pages/OptiFiiGifsAndVouchers/ApplyForGiftCard/SingleAddress.jsx +++ b/src/Pages/OptiFiiGifsAndVouchers/ApplyForGiftCard/SingleAddress.jsx @@ -1,4 +1,4 @@ -import { Box, FormControl, FormLabel, Input, Text } from "@chakra-ui/react"; +import { Box, FormControl, FormLabel, Input, Select, Text } from "@chakra-ui/react"; import { Grid, GridItem } from "@chakra-ui/react"; import React from "react"; @@ -22,19 +22,26 @@ const formsInfos = [ const SingleAddress = () => { return ( - - + + Fill address details {formsInfos.map((val) => ( - - {val.label} - + + {val.label} + {val.label === "City" ? ( + + ) : ( + + )} ))} diff --git a/src/Pages/OptiFiiGifsAndVouchers/ApplyForGiftCard/WhereToShare.jsx b/src/Pages/OptiFiiGifsAndVouchers/ApplyForGiftCard/WhereToShare.jsx index af2c71c..30c35a4 100644 --- a/src/Pages/OptiFiiGifsAndVouchers/ApplyForGiftCard/WhereToShare.jsx +++ b/src/Pages/OptiFiiGifsAndVouchers/ApplyForGiftCard/WhereToShare.jsx @@ -1,4 +1,4 @@ -import { Box, Radio, RadioGroup, Stack, Text } from "@chakra-ui/react"; +import { Box, Divider, Radio, RadioGroup, Stack, Text } from "@chakra-ui/react"; import React, { useState } from "react"; import SingleAddress from "./SingleAddress"; @@ -25,10 +25,11 @@ const WhereToShare = ({ register }) => { display="flex" flexDirection="row" borderRadius="5px" - bgColor="#F4F4F4" > - Single address + + Single address + { display="flex" flexDirection="row" borderRadius="5px" - bgColor="#F4F4F4" > - - Multiple address + + + Multiple address + + {renderContent()} ); diff --git a/src/Pages/OptiFiiGifsAndVouchers/GiftDashboard.jsx b/src/Pages/OptiFiiGifsAndVouchers/GiftDashboard.jsx index 9942be5..0321a39 100644 --- a/src/Pages/OptiFiiGifsAndVouchers/GiftDashboard.jsx +++ b/src/Pages/OptiFiiGifsAndVouchers/GiftDashboard.jsx @@ -40,7 +40,7 @@ import { } from "@chakra-ui/icons"; import info from "../../assets/info.png"; import redinfo from "../../assets/redinfo.png"; -import { NavLink } from "react-router-dom"; +import { Link, NavLink } from "react-router-dom"; import { CiCalendar } from "react-icons/ci"; import ReactApexChart from "react-apexcharts"; import { GoDotFill } from "react-icons/go"; @@ -781,6 +781,7 @@ const GiftDashboard = () => { Apply for gift card + { > -