Compare commits
2 Commits
4675311fce
...
40b0ef3ab2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
40b0ef3ab2 | ||
|
|
5b304c8952 |
|
|
@ -34,10 +34,9 @@ const SideBar = ({
|
||||||
return (
|
return (
|
||||||
<div className={isOpen ? "side_bar" : "side_bar side_bar_closed"}>
|
<div className={isOpen ? "side_bar" : "side_bar side_bar_closed"}>
|
||||||
<div className="side_bar_header">
|
<div className="side_bar_header">
|
||||||
<img src={isOpen ? "/App/Logo.svg" : "/App/Logo.svg"} alt="" />
|
<img src={"/App/Logo.svg"} alt="" />
|
||||||
<HiMenuAlt3 onClick={toggleSidebar} />
|
<HiMenuAlt3 onClick={toggleSidebar} />
|
||||||
</div>
|
</div>
|
||||||
{/* <Divider /> */}
|
|
||||||
<HiMenuAlt2
|
<HiMenuAlt2
|
||||||
className="side_bar_close_menu"
|
className="side_bar_close_menu"
|
||||||
style={isOpen ? { display: "none" } : { display: "inline" }}
|
style={isOpen ? { display: "none" } : { display: "inline" }}
|
||||||
|
|
|
||||||
|
|
@ -4,16 +4,24 @@ import { NotificationArray } from './NotificationArray';
|
||||||
import { notifications } from '../../../types/Notifications';
|
import { notifications } from '../../../types/Notifications';
|
||||||
import Card from './Card';
|
import Card from './Card';
|
||||||
import TrashButton from '../../../Components/Ui/TrashButton';
|
import TrashButton from '../../../Components/Ui/TrashButton';
|
||||||
import { useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
|
|
||||||
const Page = () => {
|
const Page = () => {
|
||||||
const {t} = useTranslation();
|
const {t} = useTranslation();
|
||||||
const [pop, setPop] = useState(NotificationArray)
|
const [pop, setPop] = useState(NotificationArray);
|
||||||
|
const [isEmpty, setIsEmpty] = useState(pop.length < 1 ? true : false);
|
||||||
|
|
||||||
const handleDeleteAll = () => {
|
const handleDeleteAll = () => {
|
||||||
setPop([])
|
setPop([])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
useEffect(()=>{
|
||||||
|
if(pop.length < 1){
|
||||||
|
setIsEmpty(true);
|
||||||
|
}else{
|
||||||
|
setIsEmpty(false);
|
||||||
|
}
|
||||||
|
},[pop])
|
||||||
return (
|
return (
|
||||||
<div className='notification_container'>
|
<div className='notification_container'>
|
||||||
<div className='notification_header'>
|
<div className='notification_header'>
|
||||||
|
|
@ -23,17 +31,26 @@ const Page = () => {
|
||||||
name='delete_all'/>
|
name='delete_all'/>
|
||||||
</div>
|
</div>
|
||||||
<Divider/>
|
<Divider/>
|
||||||
<div className="notification_body">
|
{
|
||||||
{pop?.map((not:notifications)=>(
|
isEmpty === false
|
||||||
<Card
|
?
|
||||||
id={not?.id}
|
<div className="notification_body">
|
||||||
name={not?.name}
|
{pop?.map((not:notifications)=>(
|
||||||
date={not?.date}
|
<Card
|
||||||
pop={pop}
|
id={not?.id}
|
||||||
setPop={setPop}
|
name={not?.name}
|
||||||
image={not?.image}/>
|
date={not?.date}
|
||||||
))}
|
pop={pop}
|
||||||
</div>
|
setPop={setPop}
|
||||||
|
image={not?.image}/>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
:
|
||||||
|
<div className='notification_body_empty'>
|
||||||
|
{t("practical.does_not_exist_notification")}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,17 +5,20 @@ import LayoutModel from "../../../../../Layout/Dashboard/LayoutModel";
|
||||||
import ModelForm from "./ModelForm";
|
import ModelForm from "./ModelForm";
|
||||||
import { QueryStatusEnum } from "../../../../../enums/QueryStatus";
|
import { QueryStatusEnum } from "../../../../../enums/QueryStatus";
|
||||||
import { useObjectToEdit } from "../../../../../zustand/ObjectToEditState";
|
import { useObjectToEdit } from "../../../../../zustand/ObjectToEditState";
|
||||||
import { useUpdateReseller } from "../../../../../api/reseller";
|
import { useUpdateReseller, useUpdateResellerCollection } from "../../../../../api/reseller";
|
||||||
|
import { formatDate } from "../../../../../utils/formatDate";
|
||||||
|
|
||||||
const EditModel: React.FC = () => {
|
const EditModel: React.FC = () => {
|
||||||
const { mutate, status } = useUpdateReseller();
|
const { mutate, status } = useUpdateResellerCollection();
|
||||||
const { objectToEdit } = useObjectToEdit((state) => state);
|
const { objectToEdit } = useObjectToEdit((state) => state);
|
||||||
|
|
||||||
const handleSubmit = (values: any) => {
|
const handleSubmit = (values: any) => {
|
||||||
mutate({
|
mutate({
|
||||||
...values,
|
...values,
|
||||||
|
date:formatDate(values?.date),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LayoutModel
|
<LayoutModel
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,23 @@
|
||||||
import ValidationField from "../../../../../Components/ValidationField/ValidationField";
|
|
||||||
import { Col, Row } from "reactstrap";
|
import { Col, Row } from "reactstrap";
|
||||||
|
import ValidationField from "../../../../../Components/ValidationField/ValidationField";
|
||||||
|
|
||||||
const FilterForm = () => {
|
const FilterForm = () => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Row>
|
<Row>
|
||||||
<Col>
|
<Col>
|
||||||
<ValidationField placeholder="amount_value" label="amount_value" name="amount_value" />
|
<ValidationField
|
||||||
<ValidationField type="Date" placeholder="date_of_receipt" label="date_of_receipt" name="date_of_receipt" />
|
placeholder="activation_date"
|
||||||
|
label="activation_date"
|
||||||
|
name="activation_date"
|
||||||
|
type="Date"
|
||||||
|
/>
|
||||||
|
<ValidationField
|
||||||
|
placeholder="expiration_date"
|
||||||
|
label="expiration_date"
|
||||||
|
name="expiration_date"
|
||||||
|
type="Date"
|
||||||
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
19
src/Pages/Admin/Reseller/show/Model/FilterFormCollection.tsx
Normal file
19
src/Pages/Admin/Reseller/show/Model/FilterFormCollection.tsx
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
import { Col, Row } from "reactstrap";
|
||||||
|
import ValidationField from "../../../../../Components/ValidationField/ValidationField";
|
||||||
|
|
||||||
|
const FilterFormCollection = () => {
|
||||||
|
|
||||||
|
return (
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<Row>
|
||||||
|
<Col>
|
||||||
|
<ValidationField placeholder="description" label="description" name="description" />
|
||||||
|
<ValidationField placeholder="amount" label="amount" name="amount" />
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default FilterFormCollection;
|
||||||
|
|
@ -5,9 +5,9 @@ const Form = () => {
|
||||||
return (
|
return (
|
||||||
<Row className="w-100">
|
<Row className="w-100">
|
||||||
<Col>
|
<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" />
|
<ValidationField placeholder="description" label="description" name="description" />
|
||||||
|
<ValidationField placeholder="amount" label="amount" name="amount" />
|
||||||
|
<ValidationField type="Date" placeholder="date" label="date" name="date" />
|
||||||
|
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,22 @@
|
||||||
|
import dayjs from "dayjs";
|
||||||
import * as Yup from "yup";
|
import * as Yup from "yup";
|
||||||
export const getInitialValues = (objectToEdit: any): any => {
|
export const getInitialValues = (objectToEdit: any): any => {
|
||||||
|
console.log(objectToEdit?.date);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: objectToEdit?.id ?? null,
|
id: objectToEdit?.id ?? null,
|
||||||
amount_value: objectToEdit?.amount_value ?? null,
|
amount: objectToEdit?.amount ?? null,
|
||||||
description: objectToEdit?.description ?? null,
|
description: objectToEdit?.description ?? null,
|
||||||
date_of_receipt: objectToEdit?.date_of_receipt ?? null,
|
date: objectToEdit?.date ? dayjs(objectToEdit.date) : null,
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getValidationSchema = () => {
|
export const getValidationSchema = () => {
|
||||||
return Yup.object().shape({
|
return Yup.object().shape({
|
||||||
amount_value: Yup.string().required("validation.required"),
|
amount: Yup.string().required("validation.required"),
|
||||||
description: Yup.string().required("validation.required"),
|
description: Yup.string().required("validation.required"),
|
||||||
date_of_receipt: Yup.string().required("validation.required"),
|
date: Yup.string().required("validation.required"),
|
||||||
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import { useParams } from "react-router-dom";
|
||||||
import { ParamsEnum } from "../../../../enums/params";
|
import { ParamsEnum } from "../../../../enums/params";
|
||||||
import AttachmentsCard from "../../../../Components/Cards/AttachmentsCard";
|
import AttachmentsCard from "../../../../Components/Cards/AttachmentsCard";
|
||||||
import { ModalEnum } from "../../../../enums/Model";
|
import { ModalEnum } from "../../../../enums/Model";
|
||||||
import { useDeleteReseller } from "../../../../api/reseller";
|
import { useDeleteReseller, useDeleteResellerCollection } from "../../../../api/reseller";
|
||||||
import { useObjectToEdit } from "../../../../zustand/ObjectToEditState";
|
import { useObjectToEdit } from "../../../../zustand/ObjectToEditState";
|
||||||
import useModalHandler from "../../../../utils/useModalHandler";
|
import useModalHandler from "../../../../utils/useModalHandler";
|
||||||
const DeleteModalForm = lazy(
|
const DeleteModalForm = lazy(
|
||||||
|
|
@ -21,12 +21,12 @@ const DeleteModalForm = lazy(
|
||||||
|
|
||||||
const TableHeader = () => {
|
const TableHeader = () => {
|
||||||
const [t] = useTranslation();
|
const [t] = useTranslation();
|
||||||
const { re_seller_id } = useParams<ParamsEnum>()
|
const { reseller_id } = useParams<ParamsEnum>()
|
||||||
|
|
||||||
useSetPageTitle([
|
useSetPageTitle([
|
||||||
{ name: `${t(`page_header.home`)}`, path: "/" },
|
{ name: `${t(`page_header.home`)}`, path: "/" },
|
||||||
{ name: `${t(`page_header.reseller`)}`, path: "reseller" },
|
{ name: `${t(`page_header.reseller`)}`, path: "reseller" },
|
||||||
{ name: `${t(`page_header.reseller_details`)}`, path: `reseller/${re_seller_id}` },
|
{ name: `${t(`page_header.reseller_details`)}`, path: `reseller/${reseller_id}` },
|
||||||
]);
|
]);
|
||||||
const { handel_open_model } = useModalHandler();
|
const { handel_open_model } = useModalHandler();
|
||||||
|
|
||||||
|
|
@ -34,7 +34,7 @@ const TableHeader = () => {
|
||||||
handel_open_model(ModalEnum?.RE_SELLER_COLLECTION_ADD);
|
handel_open_model(ModalEnum?.RE_SELLER_COLLECTION_ADD);
|
||||||
}
|
}
|
||||||
|
|
||||||
const deleteMutation = useDeleteReseller();
|
const deleteMutation = useDeleteResellerCollection();
|
||||||
return (
|
return (
|
||||||
<div className="TableWithHeader single_student">
|
<div className="TableWithHeader single_student">
|
||||||
<Suspense fallback={<Spin />}>
|
<Suspense fallback={<Spin />}>
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,10 @@ import { lazy } from 'react';
|
||||||
import { FaMoneyBills } from "react-icons/fa6";
|
import { FaMoneyBills } from "react-icons/fa6";
|
||||||
import useSearchQuery from '../../../../api/utils/useSearchQuery';
|
import useSearchQuery from '../../../../api/utils/useSearchQuery';
|
||||||
import { useFilterState } from '../../../../Components/Utils/Filter/FilterState';
|
import { useFilterState } from '../../../../Components/Utils/Filter/FilterState';
|
||||||
import { useGetAllReseller } from '../../../../api/reseller';
|
import { useGetAllReseller, useGetAllResellerCollection, useGetAllResellerSales } from '../../../../api/reseller';
|
||||||
|
import { useParams } from 'react-router-dom';
|
||||||
|
import { ParamsEnum } from '../../../../enums/params';
|
||||||
|
import FilterFormCollection from './Model/FilterFormCollection';
|
||||||
|
|
||||||
const Table = lazy(() => import("./Table"));
|
const Table = lazy(() => import("./Table"));
|
||||||
|
|
||||||
|
|
@ -16,11 +19,21 @@ const ReSellerTabs = () => {
|
||||||
|
|
||||||
const [searchQuery] = useSearchQuery("name");
|
const [searchQuery] = useSearchQuery("name");
|
||||||
const { filterState } = useFilterState();
|
const { filterState } = useFilterState();
|
||||||
const response = useGetAllReseller({
|
const {reseller_id} = useParams<ParamsEnum>();
|
||||||
|
|
||||||
|
const response = useGetAllResellerSales({
|
||||||
name: searchQuery,
|
name: searchQuery,
|
||||||
pagination: true,
|
pagination: true,
|
||||||
...filterState,
|
...filterState,
|
||||||
});
|
reseller_id:reseller_id,
|
||||||
|
});
|
||||||
|
|
||||||
|
const responseCollection = useGetAllResellerCollection({
|
||||||
|
name: searchQuery,
|
||||||
|
pagination: true,
|
||||||
|
...filterState,
|
||||||
|
reseller_id:reseller_id,
|
||||||
|
});
|
||||||
|
|
||||||
const items: TabsProps['items'] = [
|
const items: TabsProps['items'] = [
|
||||||
{
|
{
|
||||||
|
|
@ -43,10 +56,10 @@ const ReSellerTabs = () => {
|
||||||
children:
|
children:
|
||||||
<>
|
<>
|
||||||
<FilterLayout
|
<FilterLayout
|
||||||
sub_children={<FilterForm />}
|
sub_children={<FilterFormCollection />}
|
||||||
filterTitle="practical.collections"
|
filterTitle="practical.collections"
|
||||||
/>
|
/>
|
||||||
<Table response={response}/>
|
<Table response={responseCollection}/>
|
||||||
</>,
|
</>,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -8,32 +8,40 @@ export const useColumns = () => {
|
||||||
const columns: TableColumnsType<ReSeller> = [
|
const columns: TableColumnsType<ReSeller> = [
|
||||||
{
|
{
|
||||||
title: t("columns.student_full_name"),
|
title: t("columns.student_full_name"),
|
||||||
dataIndex: "student_full_name",
|
|
||||||
key: "student_full_name",
|
key: "student_full_name",
|
||||||
align: "center",
|
align: "center",
|
||||||
|
render: (row) => {
|
||||||
|
console.log(row);
|
||||||
|
|
||||||
|
return row?.student?.first_name +" "+ row?.student?.last_name;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("columns.grade"),
|
title: t("columns.grade"),
|
||||||
dataIndex: "grade",
|
render: (row) => {
|
||||||
key: "grade",
|
return row?.package?.name;
|
||||||
align: "center",
|
},
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t("columns.package"),
|
|
||||||
dataIndex: "package",
|
|
||||||
key: "package",
|
key: "package",
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("columns.amount_paid"),
|
title: t("columns.paid_price"),
|
||||||
dataIndex: "amount_paid",
|
render: (row) => {
|
||||||
key: "amount_paid",
|
return row?.package?.price;
|
||||||
|
},
|
||||||
|
key: "price",
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("columns.sale_date"),
|
title: t("columns.activation_date"),
|
||||||
dataIndex: "sale_date",
|
dataIndex: "activation_date",
|
||||||
key: "sale_date",
|
key: "activation_date",
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t("columns.expiration_date"),
|
||||||
|
dataIndex: "expiration_date",
|
||||||
|
key: "expiration_date",
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -29,18 +29,6 @@ export const useColumnsCollection = () => {
|
||||||
key: "ID",
|
key: "ID",
|
||||||
align: "center",
|
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"),
|
title: t("columns.description"),
|
||||||
dataIndex: "description",
|
dataIndex: "description",
|
||||||
|
|
@ -48,15 +36,15 @@ export const useColumnsCollection = () => {
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("columns.residual"),
|
title: t("columns.amount"),
|
||||||
dataIndex: "residual",
|
dataIndex: "amount",
|
||||||
key: "residual",
|
key: "amount",
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("columns.procedure"),
|
title: t("columns.date"),
|
||||||
dataIndex: "procedure",
|
dataIndex: "date",
|
||||||
key: "procedure",
|
key: "date",
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import React from 'react'
|
|
||||||
import DataTable from '../../../../Layout/Dashboard/Table/DataTable'
|
import DataTable from '../../../../Layout/Dashboard/Table/DataTable'
|
||||||
import { useColumns } from './useTableColumns'
|
import { useColumns } from './useTableColumns'
|
||||||
import { useFormikContext } from 'formik'
|
import { useFormikContext } from 'formik'
|
||||||
|
|
@ -15,14 +14,14 @@ const FormTable = ({response,...props}:IFormTable) => {
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
<DataTable
|
<DataTable
|
||||||
response={response}
|
response={response}
|
||||||
useColumns={useColumns}
|
useColumns={useColumns}
|
||||||
dataSource={values}
|
dataSource={values}
|
||||||
pagination={false}
|
pagination={false}
|
||||||
loading={false}
|
loading={false}
|
||||||
rowKey={"name"}
|
rowKey={"name"}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ const App: React.FC = () => {
|
||||||
</Suspense>
|
</Suspense>
|
||||||
),
|
),
|
||||||
size: "large",
|
size: "large",
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</Form>
|
</Form>
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,9 @@ import type { TabsProps } from 'antd';
|
||||||
import { Tabs } from 'antd';
|
import { Tabs } from 'antd';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useWindowResize } from '../../../../Hooks/useWindowResize';
|
import { useWindowResize } from '../../../../Hooks/useWindowResize';
|
||||||
const FileSetting = lazy(() => import("./FileSetting"));
|
import FileSetting from './FileSetting';
|
||||||
const SecuritySetting = lazy(() => import("./SecuritySetting"));
|
import SecuritySetting from './SecuritySetting';
|
||||||
const Notification = lazy(() => import("./Notification"));
|
import Notification from './Notification';
|
||||||
|
|
||||||
type TabPosition = 'left' | 'right' | 'top' | 'bottom';
|
type TabPosition = 'left' | 'right' | 'top' | 'bottom';
|
||||||
|
|
||||||
const SettingTabs: React.FC = () => {
|
const SettingTabs: React.FC = () => {
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ export const useColumns = () => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const handelShow = (record: Student) => {
|
const handelShow = (record: Student) => {
|
||||||
navigate(`${record?.user_id}`);
|
// navigate(`${record?.user_id}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handelDelete = (data: Student) => {
|
const handelDelete = (data: Student) => {
|
||||||
|
|
@ -56,7 +56,6 @@ export const useColumns = () => {
|
||||||
align: "center",
|
align: "center",
|
||||||
render: (_text, record) => record?.last_name,
|
render: (_text, record) => record?.last_name,
|
||||||
ellipsis:true,
|
ellipsis:true,
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: `${t("columns.sex")}`,
|
title: `${t("columns.sex")}`,
|
||||||
|
|
@ -76,7 +75,7 @@ export const useColumns = () => {
|
||||||
<ActionButtons
|
<ActionButtons
|
||||||
canDelete={canDeleteStudent}
|
canDelete={canDeleteStudent}
|
||||||
canEdit={canEditStudent}
|
canEdit={canEditStudent}
|
||||||
canShow={canShowStudent}
|
// canShow={canShowStudent}
|
||||||
index={index}
|
index={index}
|
||||||
onDelete={() => handelDelete(record)}
|
onDelete={() => handelDelete(record)}
|
||||||
onEdit={() => handleEdit(record)}
|
onEdit={() => handleEdit(record)}
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,10 @@
|
||||||
color: var(--secondary);
|
color: var(--secondary);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.notification_body_empty{
|
||||||
|
@include Flex;
|
||||||
|
}
|
||||||
|
|
||||||
.notification_body {
|
.notification_body {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
export const BaseURL = "https://nerd-back.point-dev.net/api/";
|
export const BaseURL = "https://nerd-back.point-dev.net/api/";
|
||||||
// export const BaseURL = "http://192.168.1.109:8000/api/";
|
// export const BaseURL = "http://192.168.1.106:8000/api/";
|
||||||
|
|
||||||
export const HEADER_KEY = "X-Custom-Query-Key";
|
export const HEADER_KEY = "X-Custom-Query-Key";
|
||||||
|
|
|
||||||
|
|
@ -8,14 +8,36 @@ const API = {
|
||||||
ADD: "/reseller",
|
ADD: "/reseller",
|
||||||
DELETE: "/reseller",
|
DELETE: "/reseller",
|
||||||
UPDATE: "/reseller",
|
UPDATE: "/reseller",
|
||||||
|
|
||||||
|
GET_COLLECTION: "/financialCollection",
|
||||||
|
Update_COLLECTION: "/financialCollection",
|
||||||
|
DELETE_COLLECTION : "/financialCollection",
|
||||||
|
|
||||||
|
GET_SAlES: "/reseller/getStudentPackage",
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const KEY = "reseller";
|
const KEY = "reseller";
|
||||||
|
const KEY_SALE = "reseller_sale";
|
||||||
|
const KEY_COLLECTION = "reseller_collection";
|
||||||
|
|
||||||
export const useGetAllReseller = (params?: any, options?: any) =>
|
export const useGetAllReseller = (params?: any, options?: any) =>
|
||||||
useGetQuery(KEY, API.GET, params, options);
|
useGetQuery(KEY, API.GET, params, options);
|
||||||
export const useAddReseller = () => useAddMutation(KEY, API.ADD);
|
export const useAddReseller = () => useAddMutation(KEY, API.ADD);
|
||||||
export const useUpdateReseller = (params?: any) =>
|
export const useUpdateReseller = () =>
|
||||||
useUpdateMutation(KEY, API.GET);
|
useUpdateMutation(KEY, API.GET);
|
||||||
export const useDeleteReseller = (params?: any) =>
|
export const useDeleteReseller = () =>
|
||||||
useDeleteMutation(KEY, API.DELETE);
|
useDeleteMutation(KEY, API.DELETE);
|
||||||
|
|
||||||
|
|
||||||
|
export const useGetAllResellerCollection = (params?: any, options?: any) =>
|
||||||
|
useGetQuery(KEY_COLLECTION, API.GET_COLLECTION, params, options);
|
||||||
|
export const useUpdateResellerCollection = () =>
|
||||||
|
useUpdateMutation(KEY_COLLECTION, API.Update_COLLECTION);
|
||||||
|
export const useDeleteResellerCollection = () =>
|
||||||
|
useDeleteMutation(KEY_COLLECTION, API.DELETE_COLLECTION);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export const useGetAllResellerSales = (params?: any, options?: any) =>
|
||||||
|
useGetQuery(KEY_SALE, API.GET_SAlES, params, options);
|
||||||
|
|
@ -11,11 +11,12 @@ 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",
|
RE_SELLER_ID = "reseller_id",
|
||||||
ROLE_ID = "role_id",
|
ROLE_ID = "role_id",
|
||||||
CITY_ID = "city_id",
|
CITY_ID = "city_id",
|
||||||
Collection_ID = "collection_id",
|
Collection_ID = "collection_id",
|
||||||
Manager_ID = "manager_id",
|
Manager_ID = "manager_id",
|
||||||
|
// RESELLER_ID = "reseller_id",
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -325,7 +325,8 @@
|
||||||
"Hide":"اخفاء",
|
"Hide":"اخفاء",
|
||||||
"sale":"بيع",
|
"sale":"بيع",
|
||||||
"financial_collection":"التحصيلات",
|
"financial_collection":"التحصيلات",
|
||||||
"show_collection":"حصيلة"
|
"show_collection":"حصيلة",
|
||||||
|
"does_not_exist_notification":"عذرا لا يوجد إشعارات..."
|
||||||
},
|
},
|
||||||
"Table": {
|
"Table": {
|
||||||
"header": "",
|
"header": "",
|
||||||
|
|
|
||||||
|
|
@ -2,5 +2,7 @@ export type notifications = {
|
||||||
id:number,
|
id:number,
|
||||||
name:string,
|
name:string,
|
||||||
date:string,
|
date:string,
|
||||||
image:string
|
image:string,
|
||||||
|
setPop?:any,
|
||||||
|
pop?:any,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user