diff --git a/src/Contexts/GlobalStateProvider.tsx b/src/Contexts/GlobalStateProvider.tsx index 9a839de..1f2c713 100644 --- a/src/Contexts/GlobalStateProvider.tsx +++ b/src/Contexts/GlobalStateProvider.tsx @@ -5,7 +5,7 @@ import GlobalStateContext from './GlobalStateContext'; const GlobalStateProvider = ({ children }:{children:ReactNode}) => { - const [isAuthenticate, setIsAuthenticate] = useState(false); + const [isAuthenticate, setIsAuthenticate] = useState(true); return ( diff --git a/src/Pages/ManageUser/DeactivatedAccounts/DeactivatedAccounts.tsx b/src/Pages/ManageUser/DeactivatedAccounts/DeactivatedAccounts.tsx index 1b031a0..3cc0cd9 100644 --- a/src/Pages/ManageUser/DeactivatedAccounts/DeactivatedAccounts.tsx +++ b/src/Pages/ManageUser/DeactivatedAccounts/DeactivatedAccounts.tsx @@ -1,11 +1,91 @@ -import MainFrame from '../../../components/MainFrame' +import { + Box, + HStack, + Input, + Text +} from "@chakra-ui/react"; +import { LuSearch } from "react-icons/lu"; +import DataTable from "../../../components/DataTable"; +import MainFrame from "../../../components/MainFrame"; +import { InputGroup } from "../../../components/ui/input-group"; +import { + PaginationItems, + PaginationNextTrigger, + PaginationPrevTrigger, + PaginationRoot, +} from "../../../components/ui/pagination"; +import { Switch } from "../../../components/ui/switch"; + +const tableHeadRow = [ + "Sr. No", + "First Name", + "Last Name", + "Company name", + "Activate/Deactivate", +]; + +const usersData = [ + ...Array.from({ length: 10 }, (_, i) => ({ + "Sr. No": i + 1, + "First Name": "Ritesh", + "Last Name": "Joshi", + "Company name": "WDI", + "Activate/Deactivate": ( + + Yes + + No + + ), + })), +]; const DeactivatedAccounts = () => { return ( - - - ) -} + + + Registered Users + -export default DeactivatedAccounts \ No newline at end of file + + } + w="100%" + color="#000" + > + + + + + + + + + + + + + + + + ); +}; + +export default DeactivatedAccounts; diff --git a/src/Pages/ManageUser/RegisterUsers/RegisterUsers.tsx b/src/Pages/ManageUser/RegisterUsers/RegisterUsers.tsx index cfb797d..a3b40dc 100644 --- a/src/Pages/ManageUser/RegisterUsers/RegisterUsers.tsx +++ b/src/Pages/ManageUser/RegisterUsers/RegisterUsers.tsx @@ -2,26 +2,21 @@ import { Box, HStack, Input, - Stack, - Table, - Text, - VStack, + Text } from "@chakra-ui/react"; +import { CiEdit } from "react-icons/ci"; +import { FaRegEye } from "react-icons/fa"; +import { LuSearch } from "react-icons/lu"; +import { RiDeleteBin5Line } from "react-icons/ri"; +import DataTable from "../../../components/DataTable"; import MainFrame from "../../../components/MainFrame"; import { InputGroup } from "../../../components/ui/input-group"; -import { LuSearch } from "react-icons/lu"; -import DataTable from "../../../components/DataTable"; -import { Switch } from "../../../components/ui/switch"; -import { Button } from "../../../components/ui/button"; -import { FaRegEye } from "react-icons/fa"; -import { CiEdit } from "react-icons/ci"; -import { RiDeleteBin5Line } from "react-icons/ri"; import { PaginationItems, PaginationNextTrigger, - PaginationPrevTrigger, - PaginationRoot, + PaginationRoot } from "../../../components/ui/pagination"; +import { Switch } from "../../../components/ui/switch"; // Table setup const tableHeadRow = [ @@ -37,8 +32,8 @@ const tableHeadRow = [ ]; const usersData: any[] = [ - { - "Sr. No": 1, + ...Array.from({ length: 10 }, (_, i) => ({ + "Sr. No": i + 1, "First Name": "Ritesh", "Mobile number": "9876543210", Gender: "Male", @@ -59,260 +54,7 @@ const usersData: any[] = [ ), - }, - { - "Sr. No": 2, - "First Name": "Ritesh", - "Mobile number": "9876543210", - Gender: "Male", - DOB: "15-01-1990", - "Type of User": "Admin", - Language: "English", - "Activate/Deactivate": ( - - Yes - - No - - ), - Action: ( - - - - - - ), - }, - { - "Sr. No": 3, - "First Name": "Ritesh", - "Mobile number": "9876543210", - Gender: "Male", - DOB: "15-01-1990", - "Type of User": "Admin", - Language: "English", - "Activate/Deactivate": ( - - Yes - - No - - ), - Action: ( - - - - - - ), - }, - { - "Sr. No": 4, - "First Name": "Ritesh", - "Mobile number": "9876543210", - Gender: "Male", - DOB: "15-01-1990", - "Type of User": "Admin", - Language: "English", - "Activate/Deactivate": ( - - Yes - - No - - ), - Action: ( - - - - - - ), - }, - { - "Sr. No": 5, - "First Name": "Ritesh", - "Mobile number": "9876543210", - Gender: "Male", - DOB: "15-01-1990", - "Type of User": "Admin", - Language: "English", - "Activate/Deactivate": ( - - Yes - - No - - ), - Action: ( - - - - - - ), - }, - { - "Sr. No": 6, - "First Name": "Ritesh", - "Mobile number": "9876543210", - Gender: "Male", - DOB: "15-01-1990", - "Type of User": "Admin", - Language: "English", - "Activate/Deactivate": ( - - Yes - - No - - ), - Action: ( - - - - - - ), - }, - { - "Sr. No": 6, - "First Name": "Ritesh", - "Mobile number": "9876543210", - Gender: "Male", - DOB: "15-01-1990", - "Type of User": "Admin", - Language: "English", - "Activate/Deactivate": ( - - Yes - - No - - ), - Action: ( - - - - - - ), - }, - { - "Sr. No": 7, - "First Name": "Ritesh", - "Mobile number": "9876543210", - Gender: "Male", - DOB: "15-01-1990", - "Type of User": "Admin", - Language: "English", - "Activate/Deactivate": ( - - Yes - - No - - ), - Action: ( - - - - - - ), - }, - { - "Sr. No": 7, - "First Name": "Ritesh", - "Mobile number": "9876543210", - Gender: "Male", - DOB: "15-01-1990", - "Type of User": "Admin", - Language: "English", - "Activate/Deactivate": ( - - Yes - - No - - ), - Action: ( - - - - - - ), - }, - { - "Sr. No": 8, - "First Name": "Ritesh", - "Mobile number": "9876543210", - Gender: "Male", - DOB: "15-01-1990", - "Type of User": "Admin", - Language: "English", - "Activate/Deactivate": ( - - Yes - - No - - ), - Action: ( - - - - - - ), - }, - { - "Sr. No": 9, - "First Name": "Ritesh", - "Mobile number": "9876543210", - Gender: "Male", - DOB: "15-01-1990", - "Type of User": "Admin", - Language: "English", - "Activate/Deactivate": ( - - Yes - - No - - ), - Action: ( - - - - - - ), - }, - { - "Sr. No": 10, - "First Name": "Ritesh", - "Mobile number": "9876543210", - Gender: "Male", - DOB: "15-01-1990", - "Type of User": "Admin", - Language: "English", - "Activate/Deactivate": ( - - Yes - - No - - ), - Action: ( - - - - - - ), - }, + })), ]; const RegisterUsers = () => { @@ -352,13 +94,12 @@ const RegisterUsers = () => { pageSize={3} defaultPage={1} > - + {/* */} - ); }; diff --git a/src/Pages/Profile/Profile.tsx b/src/Pages/Profile/Profile.tsx index 21fce8c..0ef11fb 100644 --- a/src/Pages/Profile/Profile.tsx +++ b/src/Pages/Profile/Profile.tsx @@ -17,24 +17,27 @@ const Profile = () => { - + Jackson David - Employee ID: #1245679 + Employee ID: #1245679 - First Name + + First Name + @@ -42,7 +45,9 @@ const Profile = () => { - Last Name + + Last Name + { */} - Phone Number + + Phone Number + = ({ tableHeadRow, data }) => { - {tableHeadRow.map((item, index)=>{item})} + {tableHeadRow.map((item, index)=>{item})} @@ -22,7 +22,7 @@ const DataTable: React.FC = ({ tableHeadRow, data }) => { {data.map((item:any, index) => ( - {tableHeadRow.map((heading)=>{item[heading]} )} + {tableHeadRow.map((heading)=>{item[heading]} )} ))} diff --git a/src/components/ui/pagination.tsx b/src/components/ui/pagination.tsx index cccf059..930b004 100644 --- a/src/components/ui/pagination.tsx +++ b/src/components/ui/pagination.tsx @@ -10,11 +10,7 @@ import { usePaginationContext, } from "@chakra-ui/react"; import * as React from "react"; -import { - HiChevronLeft, - HiChevronRight, - HiMiniEllipsisHorizontal, -} from "react-icons/hi2"; +import { HiChevronLeft, HiChevronRight } from "react-icons/hi2"; import { LinkButton } from "./link-button"; interface ButtonVariantMap { @@ -43,7 +39,7 @@ export interface PaginationRootProps } const variantMap: Record = { - outline: { default: "ghost", ellipsis: "plain", current: "outline" }, + outline: { default: "ghost", ellipsis: "plain", current: "solid" }, solid: { default: "outline", ellipsis: "outline", current: "solid" }, subtle: { default: "ghost", ellipsis: "plain", current: "subtle" }, }; @@ -74,7 +70,7 @@ export const PaginationEllipsis = React.forwardRef< return ( ); @@ -92,7 +88,14 @@ export const PaginationItem = React.forwardRef< if (getHref) { return ( - + {props.value} ); @@ -101,10 +104,12 @@ export const PaginationItem = React.forwardRef< return ( @@ -125,6 +130,7 @@ export const PaginationPrevTrigger = React.forwardRef< href={previousPage != null ? getHref(previousPage) : undefined} variant={variantMap.default} size={size} + _hover={{ bg: "#02A0A0", color: "white" }} > @@ -153,8 +159,13 @@ export const PaginationNextTrigger = React.forwardRef< href={nextPage != null ? getHref(nextPage) : undefined} variant={variantMap.default} size={size} + borderRadius="94px" + bg="#02A0A0" + color="white" + w="136px" + _hover={{ bg: "#026060" }} > - + Next ); } @@ -164,11 +175,12 @@ export const PaginationNextTrigger = React.forwardRef< @@ -181,8 +193,6 @@ export const PaginationItems = (props: React.HTMLAttributes) => { {({ pages }) => pages.map((page, index) => (