Compare commits
No commits in common. "f03af7d6905cc763e20983c70737e276bac6537a" and "21cbcc91bbdea0413a532bb08e95eede035e0370" have entirely different histories.
f03af7d690
...
21cbcc91bb
|
|
@ -1,28 +0,0 @@
|
||||||
import { Divider } from 'antd'
|
|
||||||
import { useTranslation } from 'react-i18next'
|
|
||||||
import { RxHome } from "react-icons/rx";
|
|
||||||
|
|
||||||
const AddressCard = ({ data }: { data: any }) => {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
return (
|
|
||||||
<div className='address_card'>
|
|
||||||
<h5>{t("practical.address")}</h5>
|
|
||||||
<Divider />
|
|
||||||
<div className="address_card_body">
|
|
||||||
{data?.map((address:any)=>(
|
|
||||||
<div>
|
|
||||||
<RxHome />
|
|
||||||
<span>
|
|
||||||
<h6>{t(`practical.${address?.key}`)}</h6>
|
|
||||||
<p>{address?.value}</p>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default AddressCard
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
import { Divider } from 'antd';
|
|
||||||
import { useTranslation } from 'react-i18next'
|
|
||||||
import ImageBoxField from '../CustomFields/ImageBoxField/ImageBoxField';
|
|
||||||
|
|
||||||
const AttachmentsCard = ({data}:{data?:any}) => {
|
|
||||||
const {t} = useTranslation();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className='attachments_card'>
|
|
||||||
<h5>{t("practical.address")}</h5>
|
|
||||||
<Divider />
|
|
||||||
<div className='attachments_body'>
|
|
||||||
<h5>{t("practical.id_photo")}</h5>
|
|
||||||
{/* {data?.map((address:any)=>( */}
|
|
||||||
<span>
|
|
||||||
<ImageBoxField name="image" />
|
|
||||||
</span>
|
|
||||||
{/* ))} */}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default AttachmentsCard
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
||||||
import { Button, Divider } from 'antd'
|
|
||||||
import { useTranslation } from 'react-i18next'
|
|
||||||
import { canAddReSeller } from '../../utils/hasAbilityFn';
|
|
||||||
|
|
||||||
const InfoCard = ({ data, name, status,withButton = false,handleClick}:{ data:any, name:any, status:any,withButton?:boolean,handleClick?:() => void}) => {
|
|
||||||
const {t} = useTranslation();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className='info_card'>
|
|
||||||
<div className="info_card_header">
|
|
||||||
<img src="/Image/faker_user.png " alt="" />
|
|
||||||
<div className="student_name_and_sub">
|
|
||||||
<span>{status}</span>
|
|
||||||
<h2>{name}</h2>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<Divider />
|
|
||||||
<div className="info_card_body">
|
|
||||||
{data?.map((student: any) => (
|
|
||||||
<span>
|
|
||||||
<h4>{student?.key}</h4>
|
|
||||||
<p>{student?.value}</p>
|
|
||||||
</span>
|
|
||||||
))}
|
|
||||||
{withButton ?
|
|
||||||
canAddReSeller &&
|
|
||||||
<Button onClick={handleClick} className='info_card_button'>
|
|
||||||
{t("practical.collecting_an_amount")}
|
|
||||||
</Button>
|
|
||||||
: ""}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default InfoCard
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
export const StudentParamInfo = [
|
|
||||||
{key:"الحنس" , value:"male"},
|
|
||||||
{key:"sex" , value:"male"},
|
|
||||||
{key:"sex" , value:"male"},
|
|
||||||
{key:"sex" , value:"male"},
|
|
||||||
{key:"sex" , value:"male"},
|
|
||||||
{key:"sex" , value:"male"}
|
|
||||||
]
|
|
||||||
|
|
||||||
export const ReSellerParamInfo = [
|
|
||||||
{key:"رقم الهوية" , value:"12i9128921019"},
|
|
||||||
{key:"تاريخ الإضافة", value:"1/10/2010"},
|
|
||||||
{key:"تاريخ الإضافة", value:"1/10/2010"},
|
|
||||||
{key:"تاريخ الإضافة", value:"1/10/2010"},
|
|
||||||
{key:"تاريخ الإضافة", value:"1/10/2010"},
|
|
||||||
{key:"تاريخ الإضافة", value:"1/10/2010"},
|
|
||||||
{key:"تاريخ الإضافة", value:"1/10/2010"},
|
|
||||||
]
|
|
||||||
|
|
||||||
export const StudentAddressInfo = [
|
|
||||||
{key:"address" , value:"moa moamasom aoms omaosm oasm oasm oasm asm aom"},
|
|
||||||
]
|
|
||||||
|
|
||||||
export const ReSellerAddressInfo = [
|
|
||||||
{key:"governorate" , value:"moa moamasom aoms omaosm oasm oasm oasm asm aom"},
|
|
||||||
{key:"address" , value:"moa moamasom aoms omaosm oasm oasm oasm asm aom"},
|
|
||||||
]
|
|
||||||
|
|
@ -10,7 +10,7 @@ import { generateImagePreview } from "./generateImagePreview";
|
||||||
|
|
||||||
const ImageBoxField = ({ name }: any) => {
|
const ImageBoxField = ({ name }: any) => {
|
||||||
const formik = useFormikContext<any>();
|
const formik = useFormikContext<any>();
|
||||||
const value = getNestedValue(formik?.values, name);
|
const value = getNestedValue(formik.values, name);
|
||||||
const [imagePreview, setImagePreview] = useState<string | null>(null);
|
const [imagePreview, setImagePreview] = useState<string | null>(null);
|
||||||
const fileInputRef = useRef<HTMLInputElement | null>(null);
|
const fileInputRef = useRef<HTMLInputElement | null>(null);
|
||||||
|
|
||||||
|
|
|
||||||
24
src/Components/student/AddressCard.tsx
Normal file
24
src/Components/student/AddressCard.tsx
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
import { Divider } from 'antd'
|
||||||
|
import { useTranslation } from 'react-i18next'
|
||||||
|
import { RxHome } from "react-icons/rx";
|
||||||
|
|
||||||
|
const StudentAddressCard = ({address}:{address:string}) => {
|
||||||
|
const {t} = useTranslation();
|
||||||
|
return (
|
||||||
|
<div className='student_address_card'>
|
||||||
|
<h5>{t("practical.address")}</h5>
|
||||||
|
<Divider/>
|
||||||
|
<div className="student_address_card_body">
|
||||||
|
<RxHome/>
|
||||||
|
<span>
|
||||||
|
<h6>{t("practical.address")}</h6>
|
||||||
|
<p>{address}</p>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default StudentAddressCard
|
||||||
|
|
||||||
|
|
||||||
30
src/Components/student/StudentInfoCard.tsx
Normal file
30
src/Components/student/StudentInfoCard.tsx
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
import React from 'react'
|
||||||
|
import { studentParamInfo } from './StudentParam'
|
||||||
|
import { Divider } from 'antd'
|
||||||
|
|
||||||
|
const StudentInfoCard = ({data,name,status}:any) => {
|
||||||
|
return (
|
||||||
|
<div className='student_info_card'>
|
||||||
|
<div className="student_info_card_header">
|
||||||
|
<img src="/Image/faker_user.png " alt="" />
|
||||||
|
<div className="student_name_and_sub">
|
||||||
|
<span>{status}</span>
|
||||||
|
<h2>{name}</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<Divider/>
|
||||||
|
<div className="student_info_card_body">
|
||||||
|
{data?.map((student:any)=>(
|
||||||
|
<span>
|
||||||
|
<h4>{student?.key}</h4>
|
||||||
|
<p>{student?.value}</p>
|
||||||
|
</span>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default StudentInfoCard
|
||||||
|
|
||||||
|
|
||||||
8
src/Components/student/StudentParam.ts
Normal file
8
src/Components/student/StudentParam.ts
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
export const studentParamInfo = [
|
||||||
|
{key:"الحنس" , value:"male"},
|
||||||
|
{key:"sex" , value:"male"},
|
||||||
|
{key:"sex" , value:"male"},
|
||||||
|
{key:"sex" , value:"male"},
|
||||||
|
{key:"sex" , value:"male"},
|
||||||
|
{key:"sex" , value:"male"}
|
||||||
|
]
|
||||||
|
|
@ -1,9 +1,13 @@
|
||||||
|
import { FaPlus } from "react-icons/fa";
|
||||||
|
import useModalHandler from "../../../utils/useModalHandler";
|
||||||
import { ModalEnum } from "../../../enums/Model";
|
import { ModalEnum } from "../../../enums/Model";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { lazy, Suspense } from "react";
|
import { lazy, Suspense } from "react";
|
||||||
import { Spin } from "antd";
|
import { Spin } from "antd";
|
||||||
import {
|
import {
|
||||||
|
canAddReport,
|
||||||
canAddReSeller,
|
canAddReSeller,
|
||||||
|
canAddTags,
|
||||||
} from "../../../utils/hasAbilityFn";
|
} from "../../../utils/hasAbilityFn";
|
||||||
import useSetPageTitle from "../../../Hooks/useSetPageTitle";
|
import useSetPageTitle from "../../../Hooks/useSetPageTitle";
|
||||||
import { useDeleteTag } from "../../../api/tags";
|
import { useDeleteTag } from "../../../api/tags";
|
||||||
|
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
import React from "react";
|
|
||||||
import { getInitialValues, getValidationSchema } from "./formUtil";
|
|
||||||
import { ModalEnum } from "../../../../../enums/Model";
|
|
||||||
import LayoutModel from "../../../../../Layout/Dashboard/LayoutModel";
|
|
||||||
import { QueryStatusEnum } from "../../../../../enums/QueryStatus";
|
|
||||||
import ModelForm from "./ModelForm";
|
|
||||||
import { useAddReseller } from "../../../../../api/reseller";
|
|
||||||
|
|
||||||
const AddModel: React.FC = () => {
|
|
||||||
const { mutate, status } = useAddReseller();
|
|
||||||
|
|
||||||
const handleSubmit = (values: any) => {
|
|
||||||
mutate({
|
|
||||||
...values,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<LayoutModel
|
|
||||||
status={status as QueryStatusEnum}
|
|
||||||
ModelEnum={ModalEnum.RE_SELLER_COLLECTION_ADD}
|
|
||||||
modelTitle="reseller"
|
|
||||||
handleSubmit={handleSubmit}
|
|
||||||
getInitialValues={getInitialValues({})}
|
|
||||||
getValidationSchema={getValidationSchema}
|
|
||||||
>
|
|
||||||
<ModelForm />
|
|
||||||
</LayoutModel>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default AddModel;
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
import React from "react";
|
|
||||||
import { getInitialValues, getValidationSchema } from "./formUtil";
|
|
||||||
import { ModalEnum } from "../../../../../enums/Model";
|
|
||||||
import LayoutModel from "../../../../../Layout/Dashboard/LayoutModel";
|
|
||||||
import ModelForm from "./ModelForm";
|
|
||||||
import { QueryStatusEnum } from "../../../../../enums/QueryStatus";
|
|
||||||
import { useObjectToEdit } from "../../../../../zustand/ObjectToEditState";
|
|
||||||
import { useUpdateReseller } from "../../../../../api/reseller";
|
|
||||||
|
|
||||||
const EditModel: React.FC = () => {
|
|
||||||
const { mutate, status } = useUpdateReseller();
|
|
||||||
const { objectToEdit } = useObjectToEdit((state) => state);
|
|
||||||
|
|
||||||
const handleSubmit = (values: any) => {
|
|
||||||
mutate({
|
|
||||||
...values,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<LayoutModel
|
|
||||||
status={status as QueryStatusEnum}
|
|
||||||
ModelEnum={ModalEnum.RE_SELLER_COLLECTION_EDIT}
|
|
||||||
modelTitle="collection"
|
|
||||||
handleSubmit={handleSubmit}
|
|
||||||
getInitialValues={getInitialValues(objectToEdit)}
|
|
||||||
getValidationSchema={getValidationSchema}
|
|
||||||
isAddModal={false}
|
|
||||||
>
|
|
||||||
<ModelForm />
|
|
||||||
</LayoutModel>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default EditModel;
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
import ValidationField from "../../../../../Components/ValidationField/ValidationField";
|
|
||||||
import { Col, Row } from "reactstrap";
|
|
||||||
|
|
||||||
const FilterForm = () => {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<Row>
|
|
||||||
<Col>
|
|
||||||
<ValidationField placeholder="amount_value" label="amount_value" name="amount_value" />
|
|
||||||
<ValidationField type="Date" placeholder="date_of_receipt" label="date_of_receipt" name="date_of_receipt" />
|
|
||||||
</Col>
|
|
||||||
</Row>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default FilterForm;
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
import { Col, Row } from "reactstrap";
|
|
||||||
import ValidationField from "../../../../../Components/ValidationField/ValidationField";
|
|
||||||
|
|
||||||
const Form = () => {
|
|
||||||
return (
|
|
||||||
<Row className="w-100">
|
|
||||||
<Col>
|
|
||||||
<ValidationField placeholder="amount_value" label="amount_value" name="amount_value" />
|
|
||||||
<ValidationField type="Date" placeholder="date_of_receipt" label="date_of_receipt" name="date_of_receipt" />
|
|
||||||
<ValidationField placeholder="description" label="description" name="description" />
|
|
||||||
|
|
||||||
</Col>
|
|
||||||
</Row>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default Form;
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
import * as Yup from "yup";
|
|
||||||
export const getInitialValues = (objectToEdit: any): any => {
|
|
||||||
return {
|
|
||||||
id: objectToEdit?.id ?? null,
|
|
||||||
amount_value: objectToEdit?.amount_value ?? null,
|
|
||||||
description: objectToEdit?.description ?? null,
|
|
||||||
date_of_receipt: objectToEdit?.date_of_receipt ?? null,
|
|
||||||
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getValidationSchema = () => {
|
|
||||||
return Yup.object().shape({
|
|
||||||
amount_value: Yup.string().required("validation.required"),
|
|
||||||
description: Yup.string().required("validation.required"),
|
|
||||||
date_of_receipt: Yup.string().required("validation.required"),
|
|
||||||
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
@ -1,72 +0,0 @@
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import { lazy, Suspense } from "react";
|
|
||||||
import { Spin } from "antd";
|
|
||||||
import useSetPageTitle from "../../../../Hooks/useSetPageTitle";
|
|
||||||
import PageHeader from "../../../../Layout/Dashboard/PageHeader";
|
|
||||||
import InfoCard from "../../../../Components/Cards/InfoCard";
|
|
||||||
import AddressCard from "../../../../Components/Cards/AddressCard";
|
|
||||||
import { ReSellerAddressInfo, ReSellerParamInfo } from "../../../../Components/Cards/ParamInfo";
|
|
||||||
import StudentTabs from "./ReSellerTabs";
|
|
||||||
import { useParams } from "react-router-dom";
|
|
||||||
import { ParamsEnum } from "../../../../enums/params";
|
|
||||||
import AttachmentsCard from "../../../../Components/Cards/AttachmentsCard";
|
|
||||||
import { ModalEnum } from "../../../../enums/Model";
|
|
||||||
import { useDeleteReseller } from "../../../../api/reseller";
|
|
||||||
import { useObjectToEdit } from "../../../../zustand/ObjectToEditState";
|
|
||||||
import useModalHandler from "../../../../utils/useModalHandler";
|
|
||||||
const DeleteModalForm = lazy(
|
|
||||||
() => import("../../../../Layout/Dashboard/DeleteModels"),);
|
|
||||||
const EditModalForm = lazy(() => import("./Model/EditModel"));
|
|
||||||
const AddModalForm = lazy(() => import("./Model/AddModel"));
|
|
||||||
|
|
||||||
const TableHeader = () => {
|
|
||||||
const [t] = useTranslation();
|
|
||||||
const { re_seller_id } = useParams<ParamsEnum>()
|
|
||||||
|
|
||||||
useSetPageTitle([
|
|
||||||
{ name: `${t(`page_header.home`)}`, path: "/" },
|
|
||||||
{ name: `${t(`page_header.reseller`)}`, path: "reseller" },
|
|
||||||
{ name: `${t(`page_header.reseller_details`)}`, path: `reseller/${re_seller_id}` },
|
|
||||||
]);
|
|
||||||
const { handel_open_model } = useModalHandler();
|
|
||||||
|
|
||||||
const handleOpenModel = () =>{
|
|
||||||
handel_open_model(ModalEnum?.RE_SELLER_COLLECTION_ADD);
|
|
||||||
|
|
||||||
}
|
|
||||||
const deleteMutation = useDeleteReseller();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="TableWithHeader single_student">
|
|
||||||
<Suspense fallback={<Spin />}>
|
|
||||||
<PageHeader
|
|
||||||
pageTitle="reseller_details"
|
|
||||||
/>
|
|
||||||
<div className="single_student_body">
|
|
||||||
<div className="student_info">
|
|
||||||
<InfoCard
|
|
||||||
withButton={true}
|
|
||||||
data={ReSellerParamInfo}
|
|
||||||
name={"moaz dawalibi"}
|
|
||||||
status={"subs"}
|
|
||||||
handleClick={handleOpenModel} />
|
|
||||||
<AddressCard data={ReSellerAddressInfo} />
|
|
||||||
<AttachmentsCard />
|
|
||||||
</div>
|
|
||||||
<div className="student_table">
|
|
||||||
<StudentTabs />
|
|
||||||
<DeleteModalForm
|
|
||||||
deleteMutation={deleteMutation}
|
|
||||||
ModelEnum={ModalEnum?.RE_SELLER_COLLECTION_DELETE}
|
|
||||||
/>
|
|
||||||
<AddModalForm/>
|
|
||||||
<EditModalForm/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</Suspense>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default TableHeader;
|
|
||||||
|
|
@ -1,62 +0,0 @@
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
import { Tabs } from 'antd';
|
|
||||||
import type { TabsProps } from 'antd';
|
|
||||||
import FilterLayout from '../../../../Layout/Dashboard/FilterLayout';
|
|
||||||
import FilterForm from './Model/FilterForm';
|
|
||||||
import { lazy } from 'react';
|
|
||||||
import { BsQuestionSquare } from "react-icons/bs";
|
|
||||||
import { IoStatsChartOutline } from "react-icons/io5";
|
|
||||||
import { useGetAllUser } from '../../../../api/user';
|
|
||||||
import useSearchQuery from '../../../../api/utils/useSearchQuery';
|
|
||||||
import { useFilterState } from '../../../../Components/Utils/Filter/FilterState';
|
|
||||||
import { useGetAllReseller } from '../../../../api/reseller';
|
|
||||||
|
|
||||||
const Table = lazy(() => import("./Table"));
|
|
||||||
|
|
||||||
const ReSellerTabs = () => {
|
|
||||||
const {t} = useTranslation();
|
|
||||||
|
|
||||||
const [searchQuery] = useSearchQuery("name");
|
|
||||||
const { filterState } = useFilterState();
|
|
||||||
const response = useGetAllReseller({
|
|
||||||
name: searchQuery,
|
|
||||||
pagination: true,
|
|
||||||
...filterState,
|
|
||||||
});
|
|
||||||
|
|
||||||
const items: TabsProps['items'] = [
|
|
||||||
{
|
|
||||||
key: '1',
|
|
||||||
label: t("practical.sales"),
|
|
||||||
icon:<BsQuestionSquare/>,
|
|
||||||
children:
|
|
||||||
<>
|
|
||||||
<FilterLayout
|
|
||||||
sub_children={<FilterForm />}
|
|
||||||
filterTitle="practical.sales"
|
|
||||||
/>
|
|
||||||
<Table response={response} salesTable={true}/>
|
|
||||||
</>,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: '2',
|
|
||||||
label: t("practical.collections"),
|
|
||||||
icon:<IoStatsChartOutline/>,
|
|
||||||
children:
|
|
||||||
<>
|
|
||||||
<FilterLayout
|
|
||||||
sub_children={<FilterForm />}
|
|
||||||
filterTitle="practical.collections"
|
|
||||||
/>
|
|
||||||
<Table response={response}/>
|
|
||||||
</>,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Tabs defaultActiveKey="1" items={items} />
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default ReSellerTabs
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
import DataTable from "../../../../Layout/Dashboard/Table/DataTable";
|
|
||||||
import { useColumns } from "./useTableColumns";
|
|
||||||
import { useColumnsCollection } from "./useTableColumnsCollections";
|
|
||||||
|
|
||||||
const App = ({salesTable = false ,response}:{salesTable?:boolean,response:any}) => {
|
|
||||||
if (salesTable) {
|
|
||||||
return <DataTable response={response} useColumns={useColumns} />;
|
|
||||||
} else {
|
|
||||||
return <DataTable response={response} useColumns={useColumnsCollection} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
export default App;
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
import { useColumns } from "./useTableColumns";
|
|
||||||
import Table from "./Table";
|
|
||||||
import { FaPlus } from "react-icons/fa";
|
|
||||||
|
|
||||||
export {
|
|
||||||
Table,
|
|
||||||
useColumns,
|
|
||||||
FaPlus,
|
|
||||||
};
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
import { TableColumnsType } from "antd";
|
|
||||||
import { user } from "../../../../types/Item";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import { ReSeller } from "../../../../types/ReSeller";
|
|
||||||
|
|
||||||
export const useColumns = () => {
|
|
||||||
const [t] = useTranslation();
|
|
||||||
|
|
||||||
const columns: TableColumnsType<ReSeller> = [
|
|
||||||
{
|
|
||||||
title: t("columns.student_full_name"),
|
|
||||||
dataIndex: "student_full_name",
|
|
||||||
key: "student_full_name",
|
|
||||||
align: "center",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t("columns.grade"),
|
|
||||||
dataIndex: "grade",
|
|
||||||
key: "grade",
|
|
||||||
align: "center",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t("columns.package"),
|
|
||||||
dataIndex: "package",
|
|
||||||
key: "package",
|
|
||||||
align: "center",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t("columns.amount_paid"),
|
|
||||||
dataIndex: "amount_paid",
|
|
||||||
key: "amount_paid",
|
|
||||||
align: "center",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t("columns.sale_date"),
|
|
||||||
dataIndex: "sale_date",
|
|
||||||
key: "sale_date",
|
|
||||||
align: "center",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
return columns;
|
|
||||||
};
|
|
||||||
|
|
@ -1,82 +0,0 @@
|
||||||
import { TableColumnsType } from "antd";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import ActionButtons from "../../../../Components/Table/ActionButtons";
|
|
||||||
import { canDeleteReSeller, canEditReSeller, canShowReSeller } from "../../../../utils/hasAbilityFn";
|
|
||||||
import { ReSeller } from "../../../../types/ReSeller";
|
|
||||||
import useModalHandler from "../../../../utils/useModalHandler";
|
|
||||||
import { useObjectToEdit } from "../../../../zustand/ObjectToEditState";
|
|
||||||
import { ModalEnum } from "../../../../enums/Model";
|
|
||||||
|
|
||||||
export const useColumnsCollection = () => {
|
|
||||||
const { handel_open_model } = useModalHandler();
|
|
||||||
|
|
||||||
const { setObjectToEdit } = useObjectToEdit((state) => state);
|
|
||||||
|
|
||||||
const [t] = useTranslation();
|
|
||||||
const handelDelete = (data: ReSeller) => {
|
|
||||||
setObjectToEdit(data);
|
|
||||||
handel_open_model(ModalEnum?.RE_SELLER_DELETE);
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleEdit = (record: ReSeller) => {
|
|
||||||
setObjectToEdit(record);
|
|
||||||
handel_open_model(ModalEnum?.RE_SELLER_EDIT);
|
|
||||||
};
|
|
||||||
const columns: TableColumnsType<ReSeller> = [
|
|
||||||
{
|
|
||||||
title: t("columns.ID"),
|
|
||||||
dataIndex: "ID",
|
|
||||||
key: "ID",
|
|
||||||
align: "center",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t("columns.amount"),
|
|
||||||
dataIndex: "amount",
|
|
||||||
key: "amount",
|
|
||||||
align: "center",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t("columns.date_of_receipt"),
|
|
||||||
dataIndex: "date_of_receipt",
|
|
||||||
key: "date_of_receipt",
|
|
||||||
align: "center",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t("columns.description"),
|
|
||||||
dataIndex: "description",
|
|
||||||
key: "description",
|
|
||||||
align: "center",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t("columns.residual"),
|
|
||||||
dataIndex: "residual",
|
|
||||||
key: "residual",
|
|
||||||
align: "center",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t("columns.procedure"),
|
|
||||||
dataIndex: "procedure",
|
|
||||||
key: "procedure",
|
|
||||||
align: "center",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t("columns.procedure"),
|
|
||||||
|
|
||||||
key: "actions",
|
|
||||||
align: "center",
|
|
||||||
render: (_text, record, index) => {
|
|
||||||
return (
|
|
||||||
<ActionButtons
|
|
||||||
canDelete={canDeleteReSeller}
|
|
||||||
canEdit={canEditReSeller}
|
|
||||||
index={index}
|
|
||||||
onDelete={() => handelDelete(record)}
|
|
||||||
onEdit={() => handleEdit(record)}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
return columns;
|
|
||||||
};
|
|
||||||
|
|
@ -1,16 +1,19 @@
|
||||||
import { TableColumnsType } from "antd";
|
import { TableColumnsType } from "antd";
|
||||||
import { ReSeller } from "../../../types/ReSeller";
|
import { ReSeller } from "../../../types/ReSeller";
|
||||||
|
import { FaPlus } from "react-icons/fa";
|
||||||
import useModalHandler from "../../../utils/useModalHandler";
|
import useModalHandler from "../../../utils/useModalHandler";
|
||||||
import { ModalEnum } from "../../../enums/Model";
|
import { ModalEnum } from "../../../enums/Model";
|
||||||
import { useObjectToEdit } from "../../../zustand/ObjectToEditState";
|
import { useObjectToEdit } from "../../../zustand/ObjectToEditState";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { ABILITIES_ENUM } from "../../../enums/abilities";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import {
|
import {
|
||||||
|
canAddReSeller,
|
||||||
canDeleteReSeller,
|
canDeleteReSeller,
|
||||||
canEditReSeller,
|
canEditReSeller,
|
||||||
canShowReSeller,
|
|
||||||
} from "../../../utils/hasAbilityFn";
|
} from "../../../utils/hasAbilityFn";
|
||||||
import ActionButtons from "../../../Components/Table/ActionButtons";
|
import ActionButtons from "../../../Components/Table/ActionButtons";
|
||||||
|
import ColumnsImage from "../../../Components/Columns/ColumnsImage";
|
||||||
|
|
||||||
export const useColumns = () => {
|
export const useColumns = () => {
|
||||||
const { handel_open_model } = useModalHandler();
|
const { handel_open_model } = useModalHandler();
|
||||||
|
|
@ -18,10 +21,6 @@ export const useColumns = () => {
|
||||||
const { setObjectToEdit } = useObjectToEdit((state) => state);
|
const { setObjectToEdit } = useObjectToEdit((state) => state);
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const handelShow = (record: ReSeller) => {
|
|
||||||
navigate(`${record?.id}`);
|
|
||||||
};
|
|
||||||
|
|
||||||
const handelDelete = (data: ReSeller) => {
|
const handelDelete = (data: ReSeller) => {
|
||||||
setObjectToEdit(data);
|
setObjectToEdit(data);
|
||||||
handel_open_model(ModalEnum?.RE_SELLER_DELETE);
|
handel_open_model(ModalEnum?.RE_SELLER_DELETE);
|
||||||
|
|
@ -63,7 +62,8 @@ export const useColumns = () => {
|
||||||
render: (_text, record) => record?.user?.username,
|
render: (_text, record) => record?.user?.username,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("columns.procedure"),
|
title: "",
|
||||||
|
|
||||||
key: "actions",
|
key: "actions",
|
||||||
align: "center",
|
align: "center",
|
||||||
render: (_text, record, index) => {
|
render: (_text, record, index) => {
|
||||||
|
|
@ -71,9 +71,7 @@ export const useColumns = () => {
|
||||||
<ActionButtons
|
<ActionButtons
|
||||||
canDelete={canDeleteReSeller}
|
canDelete={canDeleteReSeller}
|
||||||
canEdit={canEditReSeller}
|
canEdit={canEditReSeller}
|
||||||
canShow={canShowReSeller}
|
|
||||||
index={index}
|
index={index}
|
||||||
onShow={() => handelShow(record)}
|
|
||||||
onDelete={() => handelDelete(record)}
|
onDelete={() => handelDelete(record)}
|
||||||
onEdit={() => handleEdit(record)}
|
onEdit={() => handleEdit(record)}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -5,23 +5,21 @@ import useSetPageTitle from "../../../../Hooks/useSetPageTitle";
|
||||||
import PageHeader from "../../../../Layout/Dashboard/PageHeader";
|
import PageHeader from "../../../../Layout/Dashboard/PageHeader";
|
||||||
import FilterLayout from "../../../../Layout/Dashboard/FilterLayout";
|
import FilterLayout from "../../../../Layout/Dashboard/FilterLayout";
|
||||||
import FilterForm from "./Model/FilterForm";
|
import FilterForm from "./Model/FilterForm";
|
||||||
import InfoCard from "../../../../Components/Cards/InfoCard";
|
import StudentInfoCard from "../../../../Components/student/StudentInfoCard";
|
||||||
import AddressCard from "../../../../Components/Cards/AddressCard";
|
import StudentAddressCard from "../../../../Components/student/AddressCard";
|
||||||
import { StudentAddressInfo, StudentParamInfo } from "../../../../Components/Cards/ParamInfo";
|
import { studentParamInfo } from "../../../../Components/student/StudentParam";
|
||||||
import StudentTabs from "./StudentTabs";
|
import StudentTabs from "./StudentTabs";
|
||||||
import { useParams } from "react-router-dom";
|
|
||||||
import { ParamsEnum } from "../../../../enums/params";
|
|
||||||
|
|
||||||
const TableHeader = () => {
|
const TableHeader = () => {
|
||||||
const [t] = useTranslation();
|
const [t] = useTranslation();
|
||||||
const {student_id} = useParams<ParamsEnum>();
|
useSetPageTitle(
|
||||||
|
t(`page_header.users`) +
|
||||||
useSetPageTitle([
|
"/ " +
|
||||||
{ name: `${t(`page_header.users`)}`, path: "/" },
|
t(`PageTitle.students`)
|
||||||
{ name: `${t(`PageTitle.students`)}`, path: "students" },
|
+
|
||||||
{ name: `${t(`PageTitle.students_details`)}`, path: `reseller/${student_id}` },
|
" / " +
|
||||||
]);
|
t(`PageTitle.students_details`),
|
||||||
|
);
|
||||||
return (
|
return (
|
||||||
<div className="TableWithHeader single_student">
|
<div className="TableWithHeader single_student">
|
||||||
<Suspense fallback={<Spin />}>
|
<Suspense fallback={<Spin />}>
|
||||||
|
|
@ -30,11 +28,11 @@ const TableHeader = () => {
|
||||||
/>
|
/>
|
||||||
<div className="single_student_body">
|
<div className="single_student_body">
|
||||||
<div className="student_info">
|
<div className="student_info">
|
||||||
<InfoCard data={StudentParamInfo} name={"moaz dawalibi"} status={"subs"} />
|
<StudentInfoCard data={studentParamInfo} name={"moaz dawalibi"} status={"subs"}/>
|
||||||
<AddressCard data={StudentAddressInfo} />
|
<StudentAddressCard address={"adawi tjara dar alshfaa askn akan an aksn akn"} />
|
||||||
</div>
|
</div>
|
||||||
<div className="student_table">
|
<div className="student_table">
|
||||||
<StudentTabs />
|
<StudentTabs/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ const StudentTabs = () => {
|
||||||
const items: TabsProps['items'] = [
|
const items: TabsProps['items'] = [
|
||||||
{
|
{
|
||||||
key: '1',
|
key: '1',
|
||||||
label: t("practical.quiz"),
|
label: <span>{t("practical.quiz")} </span>,
|
||||||
icon:<BsQuestionSquare/>,
|
icon:<BsQuestionSquare/>,
|
||||||
children:
|
children:
|
||||||
<>
|
<>
|
||||||
|
|
@ -39,7 +39,7 @@ const StudentTabs = () => {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: '2',
|
key: '2',
|
||||||
label: t("practical.hightes_quiz"),
|
label: <span>{t("practical.hightes_quiz")} </span>,
|
||||||
icon:<IoStatsChartOutline/>,
|
icon:<IoStatsChartOutline/>,
|
||||||
children:
|
children:
|
||||||
<>
|
<>
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
import { TableColumnsType } from "antd";
|
import { TableColumnsType } from "antd";
|
||||||
import { Student } from "../../../types/Student";
|
import { Student } from "../../../types/Student";
|
||||||
|
import { FaPlus } from "react-icons/fa";
|
||||||
import useModalHandler from "../../../utils/useModalHandler";
|
import useModalHandler from "../../../utils/useModalHandler";
|
||||||
import { ModalEnum } from "../../../enums/Model";
|
import { ModalEnum } from "../../../enums/Model";
|
||||||
import { useObjectToEdit } from "../../../zustand/ObjectToEditState";
|
import { useObjectToEdit } from "../../../zustand/ObjectToEditState";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import {
|
import {
|
||||||
|
canAddStudent,
|
||||||
canDeleteStudent,
|
canDeleteStudent,
|
||||||
canEditStudent,
|
canEditStudent,
|
||||||
canShowStudent,
|
canShowStudent,
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ const Student = React.lazy(() => import("./Pages/Admin/Student/Page"));
|
||||||
const ShowStudent = React.lazy(() => import("./Pages/Admin/Student/show/Page"));
|
const ShowStudent = React.lazy(() => import("./Pages/Admin/Student/show/Page"));
|
||||||
|
|
||||||
const ReSeller = React.lazy(() => import("./Pages/Admin/Reseller/Page"));
|
const ReSeller = React.lazy(() => import("./Pages/Admin/Reseller/Page"));
|
||||||
const ShowReSeller = React.lazy(() => import("./Pages/Admin/Reseller/show/Page"));
|
|
||||||
const AddReSeller = React.lazy(() => import("./Pages/Admin/Reseller/Add/Page"));
|
const AddReSeller = React.lazy(() => import("./Pages/Admin/Reseller/Add/Page"));
|
||||||
const EditReSeller = React.lazy(
|
const EditReSeller = React.lazy(
|
||||||
() => import("./Pages/Admin/Reseller/Edit/Page"),
|
() => import("./Pages/Admin/Reseller/Edit/Page"),
|
||||||
|
|
@ -222,15 +221,7 @@ export const CrudRoute: TCrudRoute[] = [
|
||||||
{
|
{
|
||||||
header: "page_header.edit_reseller",
|
header: "page_header.edit_reseller",
|
||||||
element: <EditReSeller />,
|
element: <EditReSeller />,
|
||||||
path: `/${ABILITIES_ENUM?.RE_SELLER}/:${ParamsEnum?.RE_SELLER_ID}/edit`,
|
path: `/${ABILITIES_ENUM?.RE_SELLER}/:id`,
|
||||||
abilities: ABILITIES_ENUM?.RE_SELLER,
|
|
||||||
abilities_value: ABILITIES_VALUES_ENUM.INDEX,
|
|
||||||
prevPath: 0,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
header: "page_header.reSeller",
|
|
||||||
element: <ShowReSeller />,
|
|
||||||
path: `/${ABILITIES_ENUM?.RE_SELLER}/:${ParamsEnum?.RE_SELLER_ID}`,
|
|
||||||
abilities: ABILITIES_ENUM?.RE_SELLER,
|
abilities: ABILITIES_ENUM?.RE_SELLER,
|
||||||
abilities_value: ABILITIES_VALUES_ENUM.INDEX,
|
abilities_value: ABILITIES_VALUES_ENUM.INDEX,
|
||||||
prevPath: 0,
|
prevPath: 0,
|
||||||
|
|
@ -238,7 +229,7 @@ export const CrudRoute: TCrudRoute[] = [
|
||||||
{
|
{
|
||||||
header: "page_header.student",
|
header: "page_header.student",
|
||||||
element: <ShowStudent />,
|
element: <ShowStudent />,
|
||||||
path: `/${ABILITIES_ENUM?.STUDENT}/:${ParamsEnum?.STUDENT_ID}`,
|
path: `/${ABILITIES_ENUM?.STUDENT}/:id`,
|
||||||
abilities: ABILITIES_ENUM?.STUDENT,
|
abilities: ABILITIES_ENUM?.STUDENT,
|
||||||
abilities_value: ABILITIES_VALUES_ENUM.INDEX,
|
abilities_value: ABILITIES_VALUES_ENUM.INDEX,
|
||||||
prevPath: 0,
|
prevPath: 0,
|
||||||
|
|
|
||||||
|
|
@ -1,134 +0,0 @@
|
||||||
.single_student {
|
|
||||||
display: flex;
|
|
||||||
|
|
||||||
.single_student_body {
|
|
||||||
display: flex;
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
.student_info {
|
|
||||||
width: 32%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.student_table {
|
|
||||||
width: 68%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.info_card,
|
|
||||||
.address_card,
|
|
||||||
.attachments_card {
|
|
||||||
width: 24vw;
|
|
||||||
box-shadow: 2px 2px 8px 3px rgba(0, 0, 0, 0.1);
|
|
||||||
border-radius: 10px;
|
|
||||||
padding: 20px 15px;
|
|
||||||
|
|
||||||
p {
|
|
||||||
color: #6A7287;
|
|
||||||
}
|
|
||||||
|
|
||||||
.info_card_header {
|
|
||||||
display: flex;
|
|
||||||
gap: 10px;
|
|
||||||
|
|
||||||
img {
|
|
||||||
width: 24%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.student_name_and_sub {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center;
|
|
||||||
|
|
||||||
span {
|
|
||||||
color: greenyellow;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 {
|
|
||||||
font-size: 22px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.info_card_body {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 30px;
|
|
||||||
|
|
||||||
span {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
|
|
||||||
h4 {
|
|
||||||
color: #202C4B;
|
|
||||||
font-size: 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.info_card_button{
|
|
||||||
background: var(--primary);
|
|
||||||
color: var(--white);
|
|
||||||
padding: 25px 0px;
|
|
||||||
border-radius: 9px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.address_card {
|
|
||||||
margin-block: 30px;
|
|
||||||
.address_card_body {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
div{
|
|
||||||
margin-block: 20px;
|
|
||||||
gap: 15px;
|
|
||||||
display: flex !important;
|
|
||||||
}
|
|
||||||
svg {
|
|
||||||
@include Flex;
|
|
||||||
border-radius: 5px;
|
|
||||||
background: #F2F4F8;
|
|
||||||
width: 40px;
|
|
||||||
height: 40px;
|
|
||||||
padding: 7px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@media screen and (max-width:1250px) {
|
|
||||||
.single_student {
|
|
||||||
display: flex;
|
|
||||||
|
|
||||||
.single_student_body {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column !important;
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
.student_info {
|
|
||||||
display: flex;
|
|
||||||
width: 100%;
|
|
||||||
gap: 20px;
|
|
||||||
|
|
||||||
.address_card {
|
|
||||||
width: 50%;
|
|
||||||
margin-block: 0 !important;
|
|
||||||
max-height: 17vw;
|
|
||||||
}
|
|
||||||
|
|
||||||
.info_card {
|
|
||||||
width: 50%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.student_table {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
101
src/Styles/Pages/StudentInfoCard.scss
Normal file
101
src/Styles/Pages/StudentInfoCard.scss
Normal file
|
|
@ -0,0 +1,101 @@
|
||||||
|
.single_student{
|
||||||
|
display: flex;
|
||||||
|
.single_student_body{
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
.student_info{
|
||||||
|
width: 32%;
|
||||||
|
}
|
||||||
|
.student_table{
|
||||||
|
width: 68%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.student_info_card{
|
||||||
|
width: 24vw;
|
||||||
|
box-shadow: 2px 2px 8px 3px rgba(0, 0, 0, 0.1);
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 20px 15px ;
|
||||||
|
.student_info_card_header{
|
||||||
|
display: flex;
|
||||||
|
gap: 10px;
|
||||||
|
img{
|
||||||
|
width: 24%;
|
||||||
|
}
|
||||||
|
.student_name_and_sub{
|
||||||
|
display: flex; flex-direction: column;justify-content: center;
|
||||||
|
span{
|
||||||
|
color: greenyellow;
|
||||||
|
}
|
||||||
|
h2{
|
||||||
|
font-size: 22px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.student_info_card_body{
|
||||||
|
display: flex; flex-direction: column;
|
||||||
|
gap: 30px;
|
||||||
|
span{
|
||||||
|
display: flex;justify-content: space-between;
|
||||||
|
h4{
|
||||||
|
color: #202C4B;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
p{
|
||||||
|
color: #6A7287;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.student_address_card{
|
||||||
|
width: 24vw;
|
||||||
|
box-shadow: 2px 2px 8px 3px rgba(0, 0, 0, 0.1);
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 20px 15px ;
|
||||||
|
margin-top: 30px;
|
||||||
|
.student_address_card_body{
|
||||||
|
display: flex;align-items: center;
|
||||||
|
gap: 15px;
|
||||||
|
svg{
|
||||||
|
@include Flex;
|
||||||
|
border-radius: 5px;
|
||||||
|
background: #F2F4F8;
|
||||||
|
width: 40px;height: 40px;
|
||||||
|
padding: 7px;
|
||||||
|
}
|
||||||
|
p{
|
||||||
|
color: #6A7287;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@media screen and (max-width:1250px) {
|
||||||
|
.single_student{
|
||||||
|
display: flex;
|
||||||
|
.single_student_body{
|
||||||
|
display: flex;flex-direction: column !important;
|
||||||
|
width: 100%;
|
||||||
|
.student_info{
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
gap: 20px;
|
||||||
|
.student_address_card{
|
||||||
|
width: 50%;
|
||||||
|
margin-top: 0 !important;
|
||||||
|
max-height: 17vw ;
|
||||||
|
}
|
||||||
|
.student_info_card{
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.student_table{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -10,4 +10,4 @@
|
||||||
@import "./Marks.scss";
|
@import "./Marks.scss";
|
||||||
@import "./exercise.scss";
|
@import "./exercise.scss";
|
||||||
@import './reSeller.scss';
|
@import './reSeller.scss';
|
||||||
@import './InfoCard.scss';
|
@import './StudentInfoCard.scss';
|
||||||
|
|
|
||||||
|
|
@ -55,10 +55,10 @@
|
||||||
margin-left: 29px;
|
margin-left: 29px;
|
||||||
}
|
}
|
||||||
|
|
||||||
// /* Ant tabs nav list */
|
/* Ant tabs nav list */
|
||||||
// .ant-tabs-nav .ant-tabs-nav-wrap .ant-tabs-nav-list {
|
.ant-tabs-nav .ant-tabs-nav-wrap .ant-tabs-nav-list {
|
||||||
// width: 100%;
|
width: 100%;
|
||||||
// }
|
}
|
||||||
|
|
||||||
.ant-tabs > .ant-tabs-nav,
|
.ant-tabs > .ant-tabs-nav,
|
||||||
.ant-tabs > div > .ant-tabs-nav {
|
.ant-tabs > div > .ant-tabs-nav {
|
||||||
|
|
|
||||||
|
|
@ -176,11 +176,6 @@ export enum ModalEnum {
|
||||||
RE_SELLER_ADD = "ReSeller.add",
|
RE_SELLER_ADD = "ReSeller.add",
|
||||||
RE_SELLER_DELETE = "ReSeller.delete",
|
RE_SELLER_DELETE = "ReSeller.delete",
|
||||||
|
|
||||||
/// ReSeller
|
|
||||||
RE_SELLER_COLLECTION_EDIT = "ReSeller.edit",
|
|
||||||
RE_SELLER_COLLECTION_ADD = "ReSeller.add",
|
|
||||||
RE_SELLER_COLLECTION_DELETE = "ReSeller.delete",
|
|
||||||
|
|
||||||
/// Param
|
/// Param
|
||||||
Param_EDIT = "Param.edit",
|
Param_EDIT = "Param.edit",
|
||||||
Param_ADD = "Param.add",
|
Param_ADD = "Param.add",
|
||||||
|
|
|
||||||
|
|
@ -11,5 +11,4 @@ export enum ParamsEnum {
|
||||||
LESSON_ID = "lesson_id",
|
LESSON_ID = "lesson_id",
|
||||||
QUESTION_ID = "question_id",
|
QUESTION_ID = "question_id",
|
||||||
CHILDREN_QUESTION_ID = "children_question_id",
|
CHILDREN_QUESTION_ID = "children_question_id",
|
||||||
RE_SELLER_ID = "re_seller_id",
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -192,16 +192,7 @@
|
||||||
"base_question": " تمرين متعدد ",
|
"base_question": " تمرين متعدد ",
|
||||||
"normal_question": " تمرين عادي",
|
"normal_question": " تمرين عادي",
|
||||||
"hint":"شرح ",
|
"hint":"شرح ",
|
||||||
"tags":"كلمات مفتاحية",
|
"tags":"كلمات مفتاحية"
|
||||||
"student_full_name":"اسم الطالب الثلاثي",
|
|
||||||
"amount_paid":"المبلغ المدفوع",
|
|
||||||
"sale_date":"تاريخ البيع",
|
|
||||||
"grade":"الصف",
|
|
||||||
"package":"حزمة",
|
|
||||||
"ID":"ID",
|
|
||||||
"residual":"المتبقي",
|
|
||||||
"date_of_receipt":"تاريخ الاستلام",
|
|
||||||
"amount":"مبلغ"
|
|
||||||
},
|
},
|
||||||
"practical": {
|
"practical": {
|
||||||
"to_confirm_deletion_please_re_enter": "لتأكيد الحذف، يرجى إعادة الإدخال",
|
"to_confirm_deletion_please_re_enter": "لتأكيد الحذف، يرجى إعادة الإدخال",
|
||||||
|
|
@ -251,12 +242,7 @@
|
||||||
"Abbreviations": "الاختصارات",
|
"Abbreviations": "الاختصارات",
|
||||||
"address":"العنوان",
|
"address":"العنوان",
|
||||||
"quiz":"الاختبارات",
|
"quiz":"الاختبارات",
|
||||||
"hightes_quiz":"اعلى اختبار",
|
"hightes_quiz":"اعلى اختبار"
|
||||||
"sales":"المبيعات",
|
|
||||||
"collections":"التحصيلات",
|
|
||||||
"collecting_an_amount":"تحصيل مبلغ",
|
|
||||||
"governorate":"المحافظة",
|
|
||||||
"id_photo":"صورة الهوية"
|
|
||||||
},
|
},
|
||||||
"Table": {
|
"Table": {
|
||||||
"header": "",
|
"header": "",
|
||||||
|
|
@ -327,9 +313,8 @@
|
||||||
"user_details": "تفاصيل المستخدم",
|
"user_details": "تفاصيل المستخدم",
|
||||||
"reseller_details": "تفاصيل اعادة البيع",
|
"reseller_details": "تفاصيل اعادة البيع",
|
||||||
"reseller": "البائعين",
|
"reseller": "البائعين",
|
||||||
"student_package": "حزمة الطالب",
|
"student_package": "حزمة الطالب"
|
||||||
"collection":"تحصيل"
|
},
|
||||||
},
|
|
||||||
"education_class_actions": {
|
"education_class_actions": {
|
||||||
"Student_Records": "سجلات الطلاب",
|
"Student_Records": "سجلات الطلاب",
|
||||||
"Attendance": "الحضور",
|
"Attendance": "الحضور",
|
||||||
|
|
@ -443,9 +428,7 @@
|
||||||
"Seller Percentage": "نسبة البائع",
|
"Seller Percentage": "نسبة البائع",
|
||||||
"city": "المحافظة",
|
"city": "المحافظة",
|
||||||
"personal_image": "صورة شخصية",
|
"personal_image": "صورة شخصية",
|
||||||
"id_image": "صورة الهوية",
|
"id_image": "صورة الهوية"
|
||||||
"date_of_receipt":"تاريخ الاستلام",
|
|
||||||
"amount_value":"قيمة المبلغ"
|
|
||||||
},
|
},
|
||||||
"select": {
|
"select": {
|
||||||
"enums": {
|
"enums": {
|
||||||
|
|
@ -812,8 +795,7 @@
|
||||||
"report": "تقرير",
|
"report": "تقرير",
|
||||||
"tags": "كلمات مفتاحية",
|
"tags": "كلمات مفتاحية",
|
||||||
"reseller":"البائعين",
|
"reseller":"البائعين",
|
||||||
"QuestionBank":"بنك الأسئلة",
|
"QuestionBank":"بنك الأسئلة"
|
||||||
"reseller_details":"تفاصيل البائع"
|
|
||||||
},
|
},
|
||||||
"page_header": {
|
"page_header": {
|
||||||
"home": "لوحة القيادة",
|
"home": "لوحة القيادة",
|
||||||
|
|
@ -851,8 +833,7 @@
|
||||||
"add_reseller": " البائعين / إضافة بائع ",
|
"add_reseller": " البائعين / إضافة بائع ",
|
||||||
"param": "معامل",
|
"param": "معامل",
|
||||||
"student_package": "حزمة الطالب",
|
"student_package": "حزمة الطالب",
|
||||||
"QuestionBank":"بنك الأسئلة",
|
"QuestionBank":"بنك الأسئلة"
|
||||||
"reseller_details":"تفاصيل البائع"
|
|
||||||
},
|
},
|
||||||
"table": {
|
"table": {
|
||||||
"student": "قائمة الطلاب",
|
"student": "قائمة الطلاب",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user