profile page and fixes
This commit is contained in:
parent
cd6e47903b
commit
9e4c075231
|
|
@ -14,10 +14,12 @@ import { IoIosNotificationsOutline } from "react-icons/io";
|
|||
import { CiCirclePlus } from "react-icons/ci";
|
||||
import { TbWorld } from "react-icons/tb";
|
||||
import TooltipComp from "./Tooltip";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
const NavBarRightSide = () => {
|
||||
const userData = getLocalStorage(USER_KEY);
|
||||
const [t] = useTranslation();
|
||||
const Navigate = useNavigate();
|
||||
// const translateArray = translateOptions(search_array, t);
|
||||
|
||||
const { handel_open_model } = useModalHandler();
|
||||
|
|
@ -54,7 +56,7 @@ const NavBarRightSide = () => {
|
|||
<h6>{userData?.username}</h6>
|
||||
<p>{userData?.type}</p>
|
||||
</span> */}
|
||||
<Image src="/Image/faker_user.png" alt="Profile" />
|
||||
<Image onClick={()=>(Navigate('/profile'))} src="/Image/faker_user.png" alt="Profile" />
|
||||
</div>
|
||||
</article>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ const Page = () => {
|
|||
return (
|
||||
<div className='notification_container'>
|
||||
<div className='notification_header'>
|
||||
<h4>{t("header.notifications")}</h4>
|
||||
<h3>{t("header.notifications")}</h3>
|
||||
<TrashButton
|
||||
onClick={handleDeleteAll}
|
||||
name='delete_all'/>
|
||||
|
|
|
|||
25
src/Pages/Admin/Profile/Form/AttachmentForm.tsx
Normal file
25
src/Pages/Admin/Profile/Form/AttachmentForm.tsx
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { FaImage } from "react-icons/fa";
|
||||
import ImageBoxField from "./ImageBoxField/ImageBoxField";
|
||||
|
||||
const AttachmentForm = () => {
|
||||
const [t] = useTranslation();
|
||||
|
||||
return (
|
||||
<div className="AttachmentForm">
|
||||
<header className="header_form">
|
||||
<div>
|
||||
<FaImage />
|
||||
<h4>{t("header.attachments")}</h4>
|
||||
</div>
|
||||
</header>
|
||||
<main className="main_form_body">
|
||||
<ImageBoxField name="personal_image" />
|
||||
<ImageBoxField name="id_image" />
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default AttachmentForm;
|
||||
24
src/Pages/Admin/Profile/Form/HeaderForm.tsx
Normal file
24
src/Pages/Admin/Profile/Form/HeaderForm.tsx
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import { Button } from 'antd';
|
||||
import React from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
const HeaderForm = ({name,Icon,ButtonIcon, isHaveButtonIcon= true,buttonName = "edit"}:{name:string,Icon:any,ButtonIcon?:any,isHaveButtonIcon?:boolean,buttonName?:string}) => {
|
||||
const {t} = useTranslation();
|
||||
return (
|
||||
<>
|
||||
<div>
|
||||
<Icon />
|
||||
<h4>{t(`header.${name}`)}</h4>
|
||||
</div>
|
||||
<div>
|
||||
<Button className='edit_button' >
|
||||
{isHaveButtonIcon?
|
||||
<ButtonIcon/> :""}
|
||||
{t(`header.${buttonName}`)}
|
||||
</Button>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default HeaderForm
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
.ImageBoxField {
|
||||
.ImageBox {
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: max(1.5px, 0.1vw) dashed #a9c3f1;
|
||||
margin-block: 10px;
|
||||
border-radius: 5px;
|
||||
z-index: 9999999 !important;
|
||||
.ImageBoxIcon {
|
||||
cursor: pointer;
|
||||
}
|
||||
.imagePreview {
|
||||
max-width: 99%;
|
||||
height: auto;
|
||||
max-height: 99%;
|
||||
object-fit: contain;
|
||||
border-radius: 5px;
|
||||
}
|
||||
}
|
||||
.ImageHeader {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.ImageCancelIcon {
|
||||
width: 16px !important;
|
||||
height: 16px !important;
|
||||
}
|
||||
.ImageBoxIcon {
|
||||
width: 20px !important;
|
||||
height: 20px !important;
|
||||
}
|
||||
}
|
||||
87
src/Pages/Admin/Profile/Form/ImageBoxField/ImageBoxField.tsx
Normal file
87
src/Pages/Admin/Profile/Form/ImageBoxField/ImageBoxField.tsx
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
import { useFormikContext } from "formik";
|
||||
import { useState, useRef, useEffect } from "react";
|
||||
import "./ImageBoxField.scss";
|
||||
import ImageIcon from "./ImageIcon";
|
||||
import ImageCancelIcon from "./ImageCancelIcon";
|
||||
import { generateImagePreview } from "./generateImagePreview";
|
||||
import { getNestedValue } from "../../../../../utils/getNestedValue";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
// Helper function to generate image preview from a File
|
||||
|
||||
const ImageBoxField = ({ name }: any) => {
|
||||
const formik = useFormikContext<any>();
|
||||
const value = getNestedValue(formik.values, name);
|
||||
const [imagePreview, setImagePreview] = useState<string | null>(null);
|
||||
const fileInputRef = useRef<HTMLInputElement | null>(null);
|
||||
|
||||
useEffect(() => {
|
||||
if (value instanceof File) {
|
||||
generateImagePreview(value, setImagePreview);
|
||||
} else if (typeof value === "string") {
|
||||
setImagePreview(value);
|
||||
} else {
|
||||
setImagePreview(null);
|
||||
}
|
||||
}, [value]);
|
||||
|
||||
const handleFileChange = (event: any) => {
|
||||
const file = event.target.files[0];
|
||||
if (file) {
|
||||
generateImagePreview(file, setImagePreview);
|
||||
formik.setFieldValue(name, file);
|
||||
}
|
||||
};
|
||||
|
||||
const handleButtonClick = () => {
|
||||
const fileInput = fileInputRef.current;
|
||||
if (fileInput) {
|
||||
fileInput.click();
|
||||
}
|
||||
};
|
||||
|
||||
const handleCancel = () => {
|
||||
setImagePreview("");
|
||||
formik.setFieldValue(name, "");
|
||||
|
||||
if (fileInputRef.current) {
|
||||
fileInputRef.current.value = "";
|
||||
}
|
||||
};
|
||||
const [t] = useTranslation();
|
||||
return (
|
||||
<div className="ImageBoxField">
|
||||
<header>{t(`input.${name}`)}</header>
|
||||
<div className="ImageHeader">
|
||||
{imagePreview ? (
|
||||
<>
|
||||
<ImageCancelIcon
|
||||
onClick={handleCancel}
|
||||
className="ImageCancelIcon"
|
||||
/>
|
||||
<ImageIcon onClick={handleButtonClick} className="ImageBoxIcon" />
|
||||
</>
|
||||
) : (
|
||||
<div className="VisibleHidden">hidden</div>
|
||||
)}
|
||||
</div>
|
||||
<div className="ImageBox">
|
||||
{imagePreview ? (
|
||||
<img src={imagePreview} alt="Preview" className="imagePreview" />
|
||||
) : (
|
||||
<ImageIcon onClick={handleButtonClick} className="ImageBoxIcon" />
|
||||
)}
|
||||
</div>
|
||||
<input
|
||||
id={`file-input-${name}`}
|
||||
type="file"
|
||||
accept="image/png, image/jpeg, image/webp"
|
||||
style={{ display: "none" }}
|
||||
onChange={handleFileChange}
|
||||
ref={fileInputRef}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default ImageBoxField;
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
import React from "react";
|
||||
|
||||
interface ImageCancelIconProps extends React.HTMLAttributes<HTMLDivElement> {}
|
||||
|
||||
const ImageCancelIcon: React.FC<ImageCancelIconProps> = (props) => {
|
||||
return (
|
||||
<div {...props}>
|
||||
<svg viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M7 5.44469L12.4447 0L14 1.55531L8.55531 7L14 12.4447L12.4436 14L6.9989 8.55531L1.55531 14L0 12.4436L5.44469 6.9989L0 1.55421L1.55531 0.00109986L7 5.44469Z"
|
||||
fill="#515B73"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default ImageCancelIcon;
|
||||
18
src/Pages/Admin/Profile/Form/ImageBoxField/ImageIcon.tsx
Normal file
18
src/Pages/Admin/Profile/Form/ImageBoxField/ImageIcon.tsx
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import React from "react";
|
||||
|
||||
interface ImageIconProps extends React.HTMLAttributes<HTMLDivElement> {}
|
||||
|
||||
const ImageIcon: React.FC<ImageIconProps> = (props) => {
|
||||
return (
|
||||
<div {...props}>
|
||||
<svg viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M11.25 5.625C11.25 7.11684 10.6574 8.54758 9.60248 9.60248C8.54758 10.6574 7.11684 11.25 5.625 11.25C4.13316 11.25 2.70242 10.6574 1.64752 9.60248C0.592632 8.54758 0 7.11684 0 5.625C0 4.13316 0.592632 2.70242 1.64752 1.64752C2.70242 0.592632 4.13316 0 5.625 0C7.11684 0 8.54758 0.592632 9.60248 1.64752C10.6574 2.70242 11.25 4.13316 11.25 5.625ZM6.25 3.125C6.25 2.95924 6.18415 2.80027 6.06694 2.68306C5.94973 2.56585 5.79076 2.5 5.625 2.5C5.45924 2.5 5.30027 2.56585 5.18306 2.68306C5.06585 2.80027 5 2.95924 5 3.125V5H3.125C2.95924 5 2.80027 5.06585 2.68306 5.18306C2.56585 5.30027 2.5 5.45924 2.5 5.625C2.5 5.79076 2.56585 5.94973 2.68306 6.06694C2.80027 6.18415 2.95924 6.25 3.125 6.25H5V8.125C5 8.29076 5.06585 8.44973 5.18306 8.56694C5.30027 8.68415 5.45924 8.75 5.625 8.75C5.79076 8.75 5.94973 8.68415 6.06694 8.56694C6.18415 8.44973 6.25 8.29076 6.25 8.125V6.25H8.125C8.29076 6.25 8.44973 6.18415 8.56694 6.06694C8.68415 5.94973 8.75 5.79076 8.75 5.625C8.75 5.45924 8.68415 5.30027 8.56694 5.18306C8.44973 5.06585 8.29076 5 8.125 5H6.25V3.125ZM16.25 3.75H12.2413C12.1187 3.3183 11.9542 2.89964 11.75 2.5H16.25C17.2446 2.5 18.1984 2.89509 18.9017 3.59835C19.6049 4.30161 20 5.25544 20 6.25V16.25C20 17.2446 19.6049 18.1984 18.9017 18.9017C18.1984 19.6049 17.2446 20 16.25 20H6.25C5.25544 20 4.30161 19.6049 3.59835 18.9017C2.89509 18.1984 2.5 17.2446 2.5 16.25V11.75C2.89667 11.9533 3.31333 12.1171 3.75 12.2413V16.25C3.75 16.7162 3.8775 17.1525 4.1 17.525L9.93625 11.79C10.2869 11.4457 10.7586 11.2528 11.25 11.2528C11.7414 11.2528 12.2131 11.4457 12.5637 11.79L18.4012 17.525C18.6298 17.139 18.7502 16.6986 18.75 16.25V6.25C18.75 5.58696 18.4866 4.95107 18.0178 4.48223C17.5489 4.01339 16.913 3.75 16.25 3.75ZM16.25 8.125C16.25 8.37123 16.2015 8.61505 16.1073 8.84253C16.013 9.07002 15.8749 9.27672 15.7008 9.45083C15.5267 9.62494 15.32 9.76305 15.0925 9.85727C14.865 9.9515 14.6212 10 14.375 10C14.1288 10 13.885 9.9515 13.6575 9.85727C13.43 9.76305 13.2233 9.62494 13.0492 9.45083C12.8751 9.27672 12.737 9.07002 12.6427 8.84253C12.5485 8.61505 12.5 8.37123 12.5 8.125C12.5 7.62772 12.6975 7.15081 13.0492 6.79917C13.4008 6.44754 13.8777 6.25 14.375 6.25C14.8723 6.25 15.3492 6.44754 15.7008 6.79917C16.0525 7.15081 16.25 7.62772 16.25 8.125ZM15 8.125C15 7.95924 14.9342 7.80027 14.8169 7.68306C14.6997 7.56585 14.5408 7.5 14.375 7.5C14.2092 7.5 14.0503 7.56585 13.9331 7.68306C13.8158 7.80027 13.75 7.95924 13.75 8.125C13.75 8.29076 13.8158 8.44973 13.9331 8.56694C14.0503 8.68415 14.2092 8.75 14.375 8.75C14.5408 8.75 14.6997 8.68415 14.8169 8.56694C14.9342 8.44973 15 8.29076 15 8.125ZM4.985 18.4075C5.36871 18.6321 5.80538 18.7504 6.25 18.75H16.25C16.7125 18.75 17.1437 18.625 17.515 18.4075L11.6875 12.6825C11.5707 12.568 11.4136 12.5038 11.25 12.5038C11.0864 12.5038 10.9293 12.568 10.8125 12.6825L4.985 18.4075Z"
|
||||
fill="#515B73"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default ImageIcon;
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
export const generateImagePreview = (
|
||||
file: File,
|
||||
setImagePreview: (result: string) => void,
|
||||
) => {
|
||||
const reader = new FileReader();
|
||||
reader.onloadend = () => {
|
||||
setImagePreview(reader.result as string);
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
};
|
||||
26
src/Pages/Admin/Profile/Form/PasswordDetailsForm.tsx
Normal file
26
src/Pages/Admin/Profile/Form/PasswordDetailsForm.tsx
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import { useTranslation } from "react-i18next";
|
||||
import { FaStore } from "react-icons/fa";
|
||||
import ValidationField from "../../../../Components/ValidationField/ValidationField";
|
||||
import { CiEdit } from "react-icons/ci";
|
||||
import HeaderForm from "./HeaderForm";
|
||||
|
||||
const PasswordDetailsForm = () => {
|
||||
const [t] = useTranslation();
|
||||
|
||||
return (
|
||||
<div className="PasswordDetailsForm">
|
||||
<header className="header_form">
|
||||
<HeaderForm
|
||||
name="password"
|
||||
Icon={FaStore}
|
||||
isHaveButtonIcon={false}
|
||||
buttonName="change"/>
|
||||
</header>
|
||||
<main className="main_form_body">
|
||||
<ValidationField name={"password"} placeholder={"_"} label={"current_password"} />
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default PasswordDetailsForm;
|
||||
56
src/Pages/Admin/Profile/Form/PersonalDetailsForm.tsx
Normal file
56
src/Pages/Admin/Profile/Form/PersonalDetailsForm.tsx
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
import { useTranslation } from "react-i18next";
|
||||
import { FaStore } from "react-icons/fa";
|
||||
import ValidationField from "../../../../Components/ValidationField/ValidationField";
|
||||
import { statusType } from "../../../../config/statusType";
|
||||
import { Button } from "antd";
|
||||
import { CiEdit } from "react-icons/ci";
|
||||
import HeaderForm from "./HeaderForm";
|
||||
|
||||
const PersonalDetailsForm = () => {
|
||||
const [t] = useTranslation();
|
||||
return (
|
||||
<div className="PersonalDetailsForm">
|
||||
<header className="header_form">
|
||||
<HeaderForm
|
||||
name="personal_information"
|
||||
Icon={FaStore}
|
||||
ButtonIcon={CiEdit}/>
|
||||
</header>
|
||||
<main className="main_form_body">
|
||||
<ValidationField
|
||||
name={"first_name"}
|
||||
placeholder={"_"}
|
||||
label={"first_name"}
|
||||
/>
|
||||
<ValidationField
|
||||
name={"last_name"}
|
||||
placeholder={"_"}
|
||||
type="Date"
|
||||
label={"last_name"}
|
||||
/>
|
||||
|
||||
<ValidationField
|
||||
name={"email_address"}
|
||||
placeholder={"_"}
|
||||
label={"email_address"}
|
||||
type="Select"
|
||||
option={statusType}
|
||||
/>
|
||||
<ValidationField
|
||||
name={"username"}
|
||||
placeholder={"_"}
|
||||
label={"username"}
|
||||
/>
|
||||
|
||||
<ValidationField
|
||||
name={"full_name"}
|
||||
placeholder={"_"}
|
||||
label={"Phone Number"}
|
||||
/>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default PersonalDetailsForm;
|
||||
33
src/Pages/Admin/Profile/Form/TitleDetailsForm.tsx
Normal file
33
src/Pages/Admin/Profile/Form/TitleDetailsForm.tsx
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
import { useTranslation } from "react-i18next";
|
||||
import { FaStore } from "react-icons/fa";
|
||||
import ValidationField from "../../../../Components/ValidationField/ValidationField";
|
||||
import { nationalities } from "../../../../types/App";
|
||||
import { CiEdit } from "react-icons/ci";
|
||||
import HeaderForm from "./HeaderForm";
|
||||
|
||||
const TitleDetailsForm = () => {
|
||||
const [t] = useTranslation();
|
||||
|
||||
return (
|
||||
<div className="TitleDetailsForm">
|
||||
<header className="header_form">
|
||||
<HeaderForm
|
||||
name="address"
|
||||
Icon={FaStore}
|
||||
ButtonIcon={CiEdit}/>
|
||||
</header>
|
||||
<main className="main_form_body">
|
||||
<ValidationField
|
||||
name={"city_id"}
|
||||
placeholder={"_"}
|
||||
label={"city"}
|
||||
type="Select"
|
||||
option={nationalities}
|
||||
/>
|
||||
<ValidationField name={"address"} placeholder={"_"} label={"address"} />
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default TitleDetailsForm;
|
||||
13
src/Pages/Admin/Profile/Form/formUtils.ts
Normal file
13
src/Pages/Admin/Profile/Form/formUtils.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import * as Yup from "yup";
|
||||
|
||||
export const getInitialValues = (objectToEdit: Partial<any>) => {
|
||||
return {
|
||||
id: objectToEdit?.id ?? null,
|
||||
name: objectToEdit?.name ?? null,
|
||||
};
|
||||
};
|
||||
|
||||
export const getValidationSchema = () => {
|
||||
// validate input
|
||||
return Yup.object().shape({});
|
||||
};
|
||||
58
src/Pages/Admin/Profile/Page.tsx
Normal file
58
src/Pages/Admin/Profile/Page.tsx
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
import { useTranslation } from "react-i18next";
|
||||
import useSetPageTitle from "../../../Hooks/useSetPageTitle";
|
||||
import PageHeader from "../../../Layout/Dashboard/PageHeader";
|
||||
import { Suspense } from "react";
|
||||
import { Spin } from "antd";
|
||||
import { ModalEnum } from "../../../enums/Model";
|
||||
import { canAddReSeller } from "../../../utils/hasAbilityFn";
|
||||
import { Formik, Form } from "formik";
|
||||
import { getInitialValues, getValidationSchema } from "./Form/formUtils";
|
||||
import PersonalDetailsForm from "./Form/PersonalDetailsForm";
|
||||
import TitleDetailsForm from "./Form/TitleDetailsForm";
|
||||
import AttachmentForm from "./Form/AttachmentForm";
|
||||
import PasswordDetailsForm from "./Form/PasswordDetailsForm";
|
||||
|
||||
const Page = () => {
|
||||
const [t] = useTranslation();
|
||||
useSetPageTitle(t(`page_header.add_reseller`));
|
||||
const handelSubmit = (values: any) => {
|
||||
console.log(values, "values");
|
||||
};
|
||||
useSetPageTitle([
|
||||
{name:`${t(`page_header.home`)}`, path:"/"},
|
||||
{name:`${t(`page_header.profile`)}`, path:"tag"}
|
||||
]);
|
||||
return (
|
||||
<div className="TableWithHeader profile">
|
||||
<Suspense fallback={<Spin />}>
|
||||
<PageHeader
|
||||
pageTitle="profile"
|
||||
ModelAbility={ModalEnum?.RE_SELLER_ADD}
|
||||
canAdd={false}
|
||||
/>
|
||||
<div>
|
||||
<Formik
|
||||
initialValues={getInitialValues({})}
|
||||
validationSchema={getValidationSchema}
|
||||
onSubmit={handelSubmit}
|
||||
>
|
||||
<Form className="Form_details_container">
|
||||
<PersonalDetailsForm />
|
||||
<TitleDetailsForm />
|
||||
<PasswordDetailsForm/>
|
||||
<AttachmentForm />
|
||||
<div className="resellerButton">
|
||||
<button type="button">{t("practical.cancel")}</button>
|
||||
<button type="submit">
|
||||
{t("practical.add")} {t("models.reseller")}
|
||||
</button>
|
||||
</div>
|
||||
</Form>
|
||||
</Formik>
|
||||
</div>
|
||||
</Suspense>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Page;
|
||||
|
|
@ -25,13 +25,13 @@ const TableHeader = () => {
|
|||
ModelAbility={ModalEnum?.RE_SELLER_ADD}
|
||||
canAdd={false}
|
||||
/>
|
||||
<div className="bg2">
|
||||
<div>
|
||||
<Formik
|
||||
initialValues={getInitialValues({})}
|
||||
validationSchema={getValidationSchema}
|
||||
onSubmit={handelSubmit}
|
||||
>
|
||||
<Form>
|
||||
<Form className="Form_details_container">
|
||||
<PersonalDetailsForm />
|
||||
<TitleDetailsForm />
|
||||
<AttachmentForm />
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ const User = React.lazy(() => import("./Pages/Admin/User/Page"));
|
|||
const Param = React.lazy(() => import("./Pages/Admin/Param/Page"));
|
||||
const QuestionBank = React.lazy(() => import("./Pages/Admin/QuestionBank/Page"));
|
||||
const Notifications = React.lazy(() => import("./Pages/Admin/Notifications/Page"));
|
||||
const Profile = React.lazy(() => import("./Pages/Admin/Profile/Page"));
|
||||
|
||||
/// RESELLER ///
|
||||
const Student_Package = React.lazy(
|
||||
|
|
@ -253,6 +254,14 @@ export const CrudRoute: TCrudRoute[] = [
|
|||
abilities: ABILITIES_ENUM?.STUDENT,
|
||||
abilities_value: ABILITIES_VALUES_ENUM.INDEX,
|
||||
prevPath: 0,
|
||||
},
|
||||
{
|
||||
header: "page_header.profile",
|
||||
element: <Profile />,
|
||||
path: `/${ABILITIES_ENUM?.PROFILE}`,
|
||||
abilities: ABILITIES_ENUM?.PROFILE,
|
||||
abilities_value: ABILITIES_VALUES_ENUM.INDEX,
|
||||
prevPath: 0,
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
img {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
cursor: pointer;
|
||||
}
|
||||
h6 {
|
||||
font-size: 0.8vw;
|
||||
|
|
|
|||
|
|
@ -11,4 +11,5 @@
|
|||
@import "./exercise.scss";
|
||||
@import './reSeller.scss';
|
||||
@import './InfoCard.scss';
|
||||
@import './notifications.scss';
|
||||
@import './notifications.scss';
|
||||
@import './profile.scss';
|
||||
|
|
@ -7,26 +7,33 @@
|
|||
box-shadow: 2px 2px 8px 3px rgba(0, 0, 0, 0.1);
|
||||
border: 1.5px solid #E9EDF4;
|
||||
border-radius: 10px;
|
||||
background: #fff;
|
||||
.notification_header{
|
||||
display: flex;align-items: center;justify-content: space-between;
|
||||
padding-inline: 20px;
|
||||
h4{
|
||||
color: var(--secondary);
|
||||
}
|
||||
}
|
||||
.notification_body{
|
||||
display: flex; flex-direction: column;
|
||||
justify-content: center;
|
||||
padding-inline: 10px ;
|
||||
gap: 30px;
|
||||
// transition: ease-in-out .4s;
|
||||
.notification_card{
|
||||
display: flex; justify-content: space-between;
|
||||
padding: 20px 20px;
|
||||
box-shadow: 2px 2px 8px 2px rgba(0, 0, 0, .05);
|
||||
border: 1.5px solid #E9EDF4;
|
||||
@include Shadow;
|
||||
border: 2px solid #E9EDF4;
|
||||
border-radius: 10px;
|
||||
background: #fff;
|
||||
cursor: pointer;
|
||||
>div{
|
||||
display: flex;align-items: center;
|
||||
gap: 14px;
|
||||
h5{
|
||||
color: var(--secondary);
|
||||
}
|
||||
img{
|
||||
width: 70px;
|
||||
}
|
||||
|
|
|
|||
36
src/Styles/Pages/profile.scss
Normal file
36
src/Styles/Pages/profile.scss
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
.profile{
|
||||
.header_form{
|
||||
display: flex; justify-content: space-between;
|
||||
>div{
|
||||
h4{
|
||||
font-weight: 900;
|
||||
}
|
||||
display: flex;align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.header_form{
|
||||
.edit_button{
|
||||
background: var(--primary);
|
||||
@include Flex;
|
||||
color: var(--white);
|
||||
border: none !important;
|
||||
svg{
|
||||
font-size: 34px !important;
|
||||
background: transparent !important;
|
||||
color: var(--white) !important;
|
||||
}
|
||||
&:hover{
|
||||
background: var(--primary) !important;
|
||||
color: var(--white) !important;
|
||||
border: none !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,11 +1,12 @@
|
|||
.main_form_body {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 20px;
|
||||
background: var(--bg);
|
||||
padding: 40px 10px;
|
||||
> * {
|
||||
// max-width: 30%;
|
||||
flex-basis: 33%;
|
||||
flex-basis: 31%;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -41,3 +42,28 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.Form_details_container{
|
||||
display: flex; flex-direction: column;
|
||||
gap: 30px;
|
||||
}
|
||||
|
||||
.PersonalDetailsForm,
|
||||
.TitleDetailsForm,
|
||||
.AttachmentForm,
|
||||
.PasswordDetailsForm{
|
||||
box-shadow: 2px 2px 7px 2px rgba(0, 0, 0, 0.1);
|
||||
margin-bottom: 10px;
|
||||
border-radius: 10px;
|
||||
.header_form{
|
||||
background: #F2F4F8;
|
||||
border-radius: 10px;
|
||||
svg{
|
||||
border-radius: 5px;
|
||||
color: var(--secondary);
|
||||
}
|
||||
}
|
||||
.main_form_body{
|
||||
border-radius: 10px;
|
||||
}
|
||||
}
|
||||
|
|
@ -49,6 +49,7 @@ export enum ABILITIES_ENUM {
|
|||
Student_Package = "student_package",
|
||||
QUESTION_BANK = "QuestionBank",
|
||||
NOTIFICATIONS = "Notifications",
|
||||
PROFILE = "profile"
|
||||
|
||||
////
|
||||
}
|
||||
|
|
|
|||
|
|
@ -130,7 +130,11 @@
|
|||
"edit_question":"تعديل سؤال",
|
||||
"notifications":"الإشعارات",
|
||||
"delete_all":" حذف الكل",
|
||||
"delete":"حذف"
|
||||
"delete":"حذف",
|
||||
"attachments":"المرفقات",
|
||||
"password":"كلمة المرور",
|
||||
"edit":"تعديل",
|
||||
"change":"تغيير"
|
||||
},
|
||||
"columns": {
|
||||
"id": "الرقم التعريفي",
|
||||
|
|
@ -335,7 +339,8 @@
|
|||
"reseller_details": "تفاصيل اعادة البيع",
|
||||
"reseller": "البائعين",
|
||||
"student_package": "حزمة الطالب",
|
||||
"collection":"تحصيل"
|
||||
"collection":"تحصيل",
|
||||
"profile":"الملف الشخصي"
|
||||
},
|
||||
"education_class_actions": {
|
||||
"Student_Records": "سجلات الطلاب",
|
||||
|
|
@ -456,7 +461,9 @@
|
|||
"unit":"الوحدة",
|
||||
"lesson":"الدرس",
|
||||
"date_of_receipt":"تاريخ الاستلام",
|
||||
"amount_value":"قيمة المبلغ"
|
||||
"amount_value":"قيمة المبلغ",
|
||||
"email_address":"عنوان البريد الإلكتروني",
|
||||
"current_password":"كلمة المرور الحالية"
|
||||
},
|
||||
"select": {
|
||||
"enums": {
|
||||
|
|
@ -788,7 +795,8 @@
|
|||
"student_package": "حزمة الطالب",
|
||||
"quiz":"الاختبارات",
|
||||
"questionBank":"بنك الأسئلة",
|
||||
"notifications":"الإشعارات"
|
||||
"notifications":"الإشعارات",
|
||||
"profile":"الملف الشخصي"
|
||||
},
|
||||
"message": {
|
||||
"some_thing_went_wrong": "حدث خطأ ما",
|
||||
|
|
@ -826,7 +834,8 @@
|
|||
"reseller":"البائعين",
|
||||
"QuestionBank":"بنك الأسئلة",
|
||||
"reseller_details":"تفاصيل البائع",
|
||||
"notifications":"الإشعارات"
|
||||
"notifications":"الإشعارات",
|
||||
"profile":"الملف الشخصي"
|
||||
},
|
||||
"page_header": {
|
||||
"home": "لوحة القيادة",
|
||||
|
|
@ -866,7 +875,8 @@
|
|||
"student_package": "حزمة الطالب",
|
||||
"QuestionBank":"بنك الأسئلة",
|
||||
"reseller_details":"تفاصيل البائع",
|
||||
"notifications":"الإشعارات"
|
||||
"notifications":"الإشعارات",
|
||||
"profile":"الملف الشخصي"
|
||||
},
|
||||
"table": {
|
||||
"student": "قائمة الطلاب",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user