Compare commits
No commits in common. "1d31d5eb34022c2f7c28e8e10a3bb8e80c124c48" and "a05bb8b46d5d4eeb4846da90ed3d7e3883b11221" have entirely different histories.
1d31d5eb34
...
a05bb8b46d
Binary file not shown.
|
Before Width: | Height: | Size: 59 KiB |
|
|
@ -1,15 +0,0 @@
|
||||||
import { Button } from 'antd';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
import { HiOutlineTrash } from "react-icons/hi2";
|
|
||||||
|
|
||||||
const TrashButton = ({name,onClick,icon = true}:{name:string,onClick?:() =>void,icon?:boolean}) => {
|
|
||||||
const {t} = useTranslation();
|
|
||||||
return (
|
|
||||||
<Button className='trash_button' onClick={onClick}>
|
|
||||||
{ icon ? <HiOutlineTrash/> : "" }
|
|
||||||
{t(`header.${name}`)}
|
|
||||||
</Button>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default TrashButton
|
|
||||||
|
|
@ -1,26 +1,20 @@
|
||||||
|
import React from "react";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import ProtectedRouteProvider from "../../lib/ProtectedRouteProvider";
|
import ProtectedRouteProvider from "../../lib/ProtectedRouteProvider";
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import { Button } from "antd";
|
|
||||||
import { FaArrowRight } from "react-icons/fa6";
|
|
||||||
|
|
||||||
function NotFoundPage() {
|
function NotFoundPage() {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const {t} = useTranslation();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ProtectedRouteProvider className="not_found_page">
|
<ProtectedRouteProvider className="not_found_page">
|
||||||
|
<div className="container-not-found">
|
||||||
<div className="not_found_container">
|
<p>
|
||||||
<img src="/App/Error.png" alt="Error 404" width={600}/>
|
404 <h6>|</h6>This page could not be found
|
||||||
<h3>{t("practical.sorry_something_went_wrong")}</h3>
|
</p>
|
||||||
<p>{t("practical.error_404_Page_not_found._Sorry,_the_page_you_are_looking_for_does_not_exist")}</p>
|
<div>
|
||||||
<Button className="not_found_button" onClick={() => navigate("/", { replace: true })}>
|
{" "}
|
||||||
<FaArrowRight/>
|
<button onClick={() => navigate("/", { replace: true })}>Home</button>
|
||||||
{t("practical.return_to_the_dashboard")}
|
</div>
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</ProtectedRouteProvider>
|
</ProtectedRouteProvider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
import TrashButton from "../../../Components/Ui/TrashButton"
|
|
||||||
import { notifications } from "../../../types/Notifications"
|
|
||||||
|
|
||||||
|
|
||||||
const Card = ({name,date,image,id,pop,setPop}:notifications) => {
|
|
||||||
const handleDeleteOne = () => {
|
|
||||||
setPop(pop?.filter((item:any)=> item?.id !== id))
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="notification_card" key={id}>
|
|
||||||
<div>
|
|
||||||
<img src={image} alt={name} />
|
|
||||||
<div>
|
|
||||||
<h5>{name}</h5>
|
|
||||||
<p>{date}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<TrashButton
|
|
||||||
onClick={handleDeleteOne}
|
|
||||||
name="delete"
|
|
||||||
icon={false}/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Card
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
import { notifications } from "../../../types/Notifications";
|
|
||||||
|
|
||||||
export const NotificationArray:notifications[] = [
|
|
||||||
{id:1,name:"تم إضافة تحصيل جديد بواسطة شاون",date:"1/10/2010",image:"/Image/faker_user.png"},
|
|
||||||
{id:2,name:"moa",date:"منذ ساعة",image:"/Image/faker_user.png"},
|
|
||||||
{id:3,name:"moaz",date:"1/10/2010",image:"/Image/faker_user.png"},
|
|
||||||
{id:4,name:"hello",date:"1/10/2010",image:"/Image/faker_user.png"},
|
|
||||||
{id:5,name:"nop",date:"1/10/2010",image:"/Image/faker_user.png"},
|
|
||||||
{id:6,name:"hey",date:"1/10/2010",image:"/Image/faker_user.png"},
|
|
||||||
// {id:2,name:"moaz",date:"1/10/2010",image:"/Image/faker_user.png"},
|
|
||||||
// {id:2,name:"moaz",date:"1/10/2010",image:"/Image/faker_user.png"},
|
|
||||||
// {id:2,name:"moaz",date:"1/10/2010",image:"/Image/faker_user.png"},
|
|
||||||
// {id:2,name:"moaz",date:"1/10/2010",image:"/Image/faker_user.png"},
|
|
||||||
// {id:2,name:"moaz",date:"1/10/2010",image:"/Image/faker_user.png"},
|
|
||||||
|
|
||||||
]
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
import { Divider } from 'antd';
|
|
||||||
import { useTranslation } from 'react-i18next'
|
|
||||||
import { NotificationArray } from './NotificationArray';
|
|
||||||
import { notifications } from '../../../types/Notifications';
|
|
||||||
import Card from './Card';
|
|
||||||
import TrashButton from '../../../Components/Ui/TrashButton';
|
|
||||||
import { useState } from 'react';
|
|
||||||
|
|
||||||
const Page = () => {
|
|
||||||
const {t} = useTranslation();
|
|
||||||
const [pop, setPop] = useState(NotificationArray)
|
|
||||||
|
|
||||||
const handleDeleteAll = () => {
|
|
||||||
setPop([])
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className='notification_container'>
|
|
||||||
<div className='notification_header'>
|
|
||||||
<h4>{t("header.notifications")}</h4>
|
|
||||||
<TrashButton
|
|
||||||
onClick={handleDeleteAll}
|
|
||||||
name='delete_all'/>
|
|
||||||
</div>
|
|
||||||
<Divider/>
|
|
||||||
<div className="notification_body">
|
|
||||||
{pop?.map((not:notifications)=>(
|
|
||||||
<Card
|
|
||||||
id={not?.id}
|
|
||||||
name={not?.name}
|
|
||||||
date={not?.date}
|
|
||||||
pop={pop}
|
|
||||||
setPop={setPop}
|
|
||||||
image={not?.image}/>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Page
|
|
||||||
|
|
@ -34,7 +34,6 @@ const User = React.lazy(() => import("./Pages/Admin/User/Page"));
|
||||||
|
|
||||||
const Param = React.lazy(() => import("./Pages/Admin/Param/Page"));
|
const Param = React.lazy(() => import("./Pages/Admin/Param/Page"));
|
||||||
const QuestionBank = React.lazy(() => import("./Pages/Admin/QuestionBank/Page"));
|
const QuestionBank = React.lazy(() => import("./Pages/Admin/QuestionBank/Page"));
|
||||||
const Notifications = React.lazy(() => import("./Pages/Admin/Notifications/Page"));
|
|
||||||
|
|
||||||
/// RESELLER ///
|
/// RESELLER ///
|
||||||
const Student_Package = React.lazy(
|
const Student_Package = React.lazy(
|
||||||
|
|
@ -142,16 +141,6 @@ export const menuItems: TMenuItem[] = [
|
||||||
abilities_value: ABILITIES_VALUES_ENUM.INDEX,
|
abilities_value: ABILITIES_VALUES_ENUM.INDEX,
|
||||||
prevPath: 0,
|
prevPath: 0,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
header: "page_header.notifications",
|
|
||||||
element: <Notifications />,
|
|
||||||
icon: <FaSellcast />,
|
|
||||||
text: "sidebar.notifications",
|
|
||||||
path: `/${ABILITIES_ENUM?.NOTIFICATIONS}`,
|
|
||||||
abilities: ABILITIES_ENUM?.NOTIFICATIONS,
|
|
||||||
abilities_value: ABILITIES_VALUES_ENUM.INDEX,
|
|
||||||
prevPath: 0,
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
/// RESELLER /////
|
/// RESELLER /////
|
||||||
|
|
|
||||||
|
|
@ -37,66 +37,41 @@ svg {
|
||||||
}
|
}
|
||||||
|
|
||||||
.not_found_page {
|
.not_found_page {
|
||||||
|
background: black;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
text-align: center;
|
align-items: center;
|
||||||
padding-top: 30px;
|
|
||||||
.not_found_container{
|
p {
|
||||||
display: flex; flex-direction: column;
|
color: white;
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
h6 {
|
||||||
|
display: inline;
|
||||||
|
margin-inline: 20px;
|
||||||
|
height: 140px !important;
|
||||||
|
|
||||||
|
width: 20px;
|
||||||
|
}
|
||||||
|
.container-not-found {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 20px;
|
div {
|
||||||
p{
|
display: flex;
|
||||||
color: #6A7287;
|
justify-content: center;
|
||||||
font-size: 17px;
|
align-items: center;
|
||||||
}
|
}
|
||||||
h3{
|
button {
|
||||||
font-weight: 900;
|
|
||||||
}
|
|
||||||
.not_found_button{
|
|
||||||
@include Flex;
|
|
||||||
width: 240px;
|
|
||||||
padding: 24px 22px ;
|
|
||||||
background: var(--primary);
|
|
||||||
color: var(--white);
|
|
||||||
border: none;
|
border: none;
|
||||||
transition: ease-in-out .3s;
|
outline: none;
|
||||||
&:hover{
|
padding: 8px;
|
||||||
transform: scale(1.05);
|
border-radius: 10px;
|
||||||
background: var(--primary);
|
|
||||||
color: var(--white);
|
margin-inline: 30px;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// p {
|
|
||||||
// color: white;
|
|
||||||
// display: inline;
|
|
||||||
// }
|
|
||||||
// h6 {
|
|
||||||
// display: inline;
|
|
||||||
// margin-inline: 20px;
|
|
||||||
// height: 140px !important;
|
|
||||||
|
|
||||||
// width: 20px;
|
|
||||||
// }
|
|
||||||
// .container-not-found {
|
|
||||||
// display: flex;
|
|
||||||
// flex-direction: column;
|
|
||||||
// align-items: center;
|
|
||||||
// div {
|
|
||||||
// display: flex;
|
|
||||||
// justify-content: center;
|
|
||||||
// align-items: center;
|
|
||||||
// }
|
|
||||||
// button {
|
|
||||||
// border: none;
|
|
||||||
// outline: none;
|
|
||||||
// padding: 8px;
|
|
||||||
// border-radius: 10px;
|
|
||||||
|
|
||||||
// margin-inline: 30px;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Username */
|
/* Username */
|
||||||
|
|
|
||||||
|
|
@ -10,5 +10,4 @@
|
||||||
@import "./Marks.scss";
|
@import "./Marks.scss";
|
||||||
@import "./exercise.scss";
|
@import "./exercise.scss";
|
||||||
@import './reSeller.scss';
|
@import './reSeller.scss';
|
||||||
@import './InfoCard.scss';
|
@import './InfoCard.scss';
|
||||||
@import './notifications.scss';
|
|
||||||
|
|
@ -1,65 +0,0 @@
|
||||||
.notification_container{
|
|
||||||
display: flex; flex-direction: column;
|
|
||||||
width: 96%;
|
|
||||||
margin-inline: auto;
|
|
||||||
padding: 30px 20px ;
|
|
||||||
margin-block: 20px 50px;
|
|
||||||
box-shadow: 2px 2px 8px 3px rgba(0, 0, 0, 0.1);
|
|
||||||
border: 1.5px solid #E9EDF4;
|
|
||||||
border-radius: 10px;
|
|
||||||
.notification_header{
|
|
||||||
display: flex;align-items: center;justify-content: space-between;
|
|
||||||
padding-inline: 20px;
|
|
||||||
}
|
|
||||||
.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;
|
|
||||||
border-radius: 10px;
|
|
||||||
cursor: pointer;
|
|
||||||
>div{
|
|
||||||
display: flex;align-items: center;
|
|
||||||
gap: 14px;
|
|
||||||
img{
|
|
||||||
width: 70px;
|
|
||||||
}
|
|
||||||
p{
|
|
||||||
margin-top: 12px;
|
|
||||||
color: #6A7287;
|
|
||||||
}
|
|
||||||
.trash_button{
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&:hover{
|
|
||||||
.trash_button{
|
|
||||||
visibility: visible;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.trash_button{
|
|
||||||
background: #E93553;
|
|
||||||
@include Flex;
|
|
||||||
color: var(--white);
|
|
||||||
padding: 20px 23px ;
|
|
||||||
border: none !important;
|
|
||||||
svg{
|
|
||||||
font-size: 22px;
|
|
||||||
}
|
|
||||||
&:hover{
|
|
||||||
background: #E93553 !important;
|
|
||||||
color: var(--white) !important;
|
|
||||||
border: none !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -47,8 +47,7 @@ export enum ABILITIES_ENUM {
|
||||||
User = "user",
|
User = "user",
|
||||||
RE_SELLER = "reseller",
|
RE_SELLER = "reseller",
|
||||||
Student_Package = "student_package",
|
Student_Package = "student_package",
|
||||||
QUESTION_BANK = "QuestionBank",
|
QUESTION_BANK = "QuestionBank"
|
||||||
NOTIFICATIONS = "Notifications",
|
|
||||||
|
|
||||||
////
|
////
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -127,10 +127,7 @@
|
||||||
"attachment": "المرفق",
|
"attachment": "المرفق",
|
||||||
"subject_of_class": "مواد الصف",
|
"subject_of_class": "مواد الصف",
|
||||||
"this_will_un_do_all_your_changes":"سوف يؤدي هذا إلى إلغاء جميع تغييراتك",
|
"this_will_un_do_all_your_changes":"سوف يؤدي هذا إلى إلغاء جميع تغييراتك",
|
||||||
"edit_question":"تعديل سؤال",
|
"edit_question":"تعديل سؤال"
|
||||||
"notifications":"الإشعارات",
|
|
||||||
"delete_all":" حذف الكل",
|
|
||||||
"delete":"حذف"
|
|
||||||
},
|
},
|
||||||
"columns": {
|
"columns": {
|
||||||
"id": "الرقم التعريفي",
|
"id": "الرقم التعريفي",
|
||||||
|
|
@ -260,10 +257,7 @@
|
||||||
"collections":"التحصيلات",
|
"collections":"التحصيلات",
|
||||||
"collecting_an_amount":"تحصيل مبلغ",
|
"collecting_an_amount":"تحصيل مبلغ",
|
||||||
"governorate":"المحافظة",
|
"governorate":"المحافظة",
|
||||||
"id_photo":"صورة الهوية",
|
"id_photo":"صورة الهوية"
|
||||||
"sorry_something_went_wrong":"عفوا ، حدث خطأ ما",
|
|
||||||
"error_404_Page_not_found._Sorry,_the_page_you_are_looking_for_does_not_exist":"خطأ 404 لم يتم العثور على الصفحة. عذرا الصفحة التي تبحث عنها غير موجودة ",
|
|
||||||
"return_to_the_dashboard":"العودة إلى لوحة القيادة"
|
|
||||||
},
|
},
|
||||||
"Table": {
|
"Table": {
|
||||||
"header": "",
|
"header": "",
|
||||||
|
|
@ -787,8 +781,7 @@
|
||||||
"param": "معامل",
|
"param": "معامل",
|
||||||
"student_package": "حزمة الطالب",
|
"student_package": "حزمة الطالب",
|
||||||
"quiz":"الاختبارات",
|
"quiz":"الاختبارات",
|
||||||
"questionBank":"بنك الأسئلة",
|
"questionBank":"بنك الأسئلة"
|
||||||
"notifications":"الإشعارات"
|
|
||||||
},
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"some_thing_went_wrong": "حدث خطأ ما",
|
"some_thing_went_wrong": "حدث خطأ ما",
|
||||||
|
|
@ -825,8 +818,7 @@
|
||||||
"tags": "كلمات مفتاحية",
|
"tags": "كلمات مفتاحية",
|
||||||
"reseller":"البائعين",
|
"reseller":"البائعين",
|
||||||
"QuestionBank":"بنك الأسئلة",
|
"QuestionBank":"بنك الأسئلة",
|
||||||
"reseller_details":"تفاصيل البائع",
|
"reseller_details":"تفاصيل البائع"
|
||||||
"notifications":"الإشعارات"
|
|
||||||
},
|
},
|
||||||
"page_header": {
|
"page_header": {
|
||||||
"home": "لوحة القيادة",
|
"home": "لوحة القيادة",
|
||||||
|
|
@ -865,8 +857,7 @@
|
||||||
"param": "معامل",
|
"param": "معامل",
|
||||||
"student_package": "حزمة الطالب",
|
"student_package": "حزمة الطالب",
|
||||||
"QuestionBank":"بنك الأسئلة",
|
"QuestionBank":"بنك الأسئلة",
|
||||||
"reseller_details":"تفاصيل البائع",
|
"reseller_details":"تفاصيل البائع"
|
||||||
"notifications":"الإشعارات"
|
|
||||||
},
|
},
|
||||||
"table": {
|
"table": {
|
||||||
"student": "قائمة الطلاب",
|
"student": "قائمة الطلاب",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
export type notifications = {
|
|
||||||
id:number,
|
|
||||||
name:string,
|
|
||||||
date:string,
|
|
||||||
image:string
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user