From d244df302b53ee92bfce8ed15848a5f4a832fcfc Mon Sep 17 00:00:00 2001 From: "Siddhesh.More" Date: Tue, 5 Nov 2024 12:12:38 +0530 Subject: [PATCH] update --- src/Components/HeaderMain.jsx | 2 +- src/Pages/Profile/Profile.jsx | 227 ++++++++++++++++++++++++++++++++++ src/Routes/Routes.js | 4 +- 3 files changed, 231 insertions(+), 2 deletions(-) create mode 100644 src/Pages/Profile/Profile.jsx diff --git a/src/Components/HeaderMain.jsx b/src/Components/HeaderMain.jsx index 63b24d3..65db972 100644 --- a/src/Components/HeaderMain.jsx +++ b/src/Components/HeaderMain.jsx @@ -63,7 +63,7 @@ const HeaderMain = ({ - + navigate('/profile')} className="web-text-medium pointer link"> Profile diff --git a/src/Pages/Profile/Profile.jsx b/src/Pages/Profile/Profile.jsx new file mode 100644 index 0000000..5add0a2 --- /dev/null +++ b/src/Pages/Profile/Profile.jsx @@ -0,0 +1,227 @@ +import { + Avatar, + Box, + ButtonGroup, + Editable, + EditableInput, + EditablePreview, + EditableTextarea, + Flex, + HStack, + Heading, + Icon, + IconButton, + Input, + Text, + VStack, + useEditableControls, +} from "@chakra-ui/react"; +import React from "react"; +import { OPACITY_ON_LOAD } from "../../Layout/animations"; +import { CheckIcon, CloseIcon, EditIcon, InfoIcon } from "@chakra-ui/icons"; +import { FaEarthAmericas } from "react-icons/fa6"; +import logoMini from "../../assets/propic.png"; + +const Profile = () => { + /* Here's a custom control */ + function EditableControls() { + const { + isEditing, + getSubmitButtonProps, + getCancelButtonProps, + getEditButtonProps, + } = useEditableControls(); + + return ( + isEditing && ( + + } + {...getSubmitButtonProps()} + /> + } + {...getCancelButtonProps()} + /> + + ) + ); + } + + + // Array of fields to render + const fields = [ + { name: "firstName", label: "First Name", defaultValue: "Faisal" }, + { name: "lastName", label: "Last Name", defaultValue: "Aljalahma" }, + { name: "email", label: "Email Address", defaultValue: "f.aljalahma@tanamicapital.com" }, + { name: "mobile", label: "Mobile Number", defaultValue: "9898767876" }, + { name: "role", label: "Role", defaultValue: "Maker" }, + ]; + + + + + return ( + + + + Profile setting + + + + Manage your personal information, and control which information other + people see and apps may access. + + + + Profile photo and role + + + + + + + + Faisal Aljalahma + + + + f.aljalahma@tanamicapital.com + + + + + + + + You can see your role below ? + + + {" "} + Maker + + + + + + + About you + + + + +{fields?.map((item) => ( + + + {item?.label} + + + + + + + +))} + + + + + + + ); +}; + +export default Profile; diff --git a/src/Routes/Routes.js b/src/Routes/Routes.js index 519daaa..205e3f5 100644 --- a/src/Routes/Routes.js +++ b/src/Routes/Routes.js @@ -45,6 +45,7 @@ import ApproveHistoryMaker from "../Pages/FawateerChecker/ApproveHistory/Approve import EmailNotification from "../Pages/EmailNotification/EmailNotification"; import User from "../Pages/User/User"; import AddUser from "../Pages/User/AddUser"; +import Profile from "../Pages/Profile/Profile"; export const RouteLink = [ // =============[ Tanami ]================ @@ -121,10 +122,11 @@ export const RouteLink = [ { path: "/bank-details", Component: BankDetails }, // { path: "/bank-details", Component: UnderConstruction }, { path: "/bank-details/edit-bank-details/:id", Component: EditBankDetails }, + { path: "/profile", Component: Profile }, - // // ===============[ fawateer ]=============== + // ===============[ fawateer ]=============== // { path: "/fawateer", Component: localStorage.getItem("role") === "Maker"? CreateRequest:ApproveRequest }, // { path: "/fawateer-history", Component: localStorage.getItem("role") === "Maker"?ApproveHistoryMaker: ApproveHistory },