install and handle casle & prevent page dashboard & handle register and code verfication & get data in clinics page
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import PlusB from "@/components/icons/PlusB";
|
||||
import { Button } from "@mui/material";
|
||||
import React from "react";
|
||||
|
||||
function AddBtn() {
|
||||
return (
|
||||
<Button
|
||||
className="!bg-[#5559CE] !w-fit !shadow-none !rounded-[4px] !gap-[4px] !text-[#EFEFEF] !text-[14px] md:!text-[16px] !font-medium"
|
||||
variant="contained"
|
||||
>
|
||||
<PlusB />
|
||||
اضافه کردن
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
|
||||
export default AddBtn;
|
||||
@@ -1,20 +1,12 @@
|
||||
import PlusB from "@/components/icons/PlusB";
|
||||
import { Button } from "@mui/material";
|
||||
import React from "react";
|
||||
|
||||
function Head({ text }) {
|
||||
function Head({ text, children }) {
|
||||
return (
|
||||
<div className="w-full flex mb-[40px] items-center justify-between">
|
||||
<p className="text-[#525252] dark:text-[#A1A1A1] text-[20px] font-bold">
|
||||
{text}
|
||||
</p>
|
||||
<Button
|
||||
className="!bg-[#5559CE] !w-fit !shadow-none !rounded-[4px] !gap-[4px] !text-[#EFEFEF] !text-[14px] md:!text-[16px] !font-medium"
|
||||
variant="contained"
|
||||
>
|
||||
<PlusB />
|
||||
اضافه کردن
|
||||
</Button>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -36,8 +36,7 @@ function ContentTabs({
|
||||
const [tab, setTab] = useState(0);
|
||||
const data = profileData[0];
|
||||
|
||||
const handleChange = (event, newValue) => {
|
||||
// setValue(newValue);
|
||||
const handleChange = (_, newValue) => {
|
||||
setTab(newValue);
|
||||
};
|
||||
|
||||
@@ -48,16 +47,6 @@ function ContentTabs({
|
||||
}, []);
|
||||
|
||||
const components = [
|
||||
// <DetailUser user={user} />,
|
||||
// <Turns
|
||||
// user={user}
|
||||
// loading={loading}
|
||||
// setIsTurnsDetails={setIsTurnsDetails}
|
||||
// />,
|
||||
// <Transactions user={user} loading={loading} />,
|
||||
// <Comments user={user} loading={loading} />,
|
||||
// <Messages user={user} loading={loading} />,
|
||||
// <NotfoundDashboard />,
|
||||
<Disease data={data} />,
|
||||
<Allergies data={data} />,
|
||||
<Medications data={data} />,
|
||||
|
||||
@@ -4,6 +4,7 @@ import EditB from "@/components/icons/EditB";
|
||||
import TrashB from "@/components/icons/TrashB";
|
||||
import { Button, TableCell, TableRow } from "@mui/material";
|
||||
import Head from "../../components/Head";
|
||||
import AddBtn from "../../components/AddBtn";
|
||||
|
||||
function Allergies({ data }) {
|
||||
const tableHead = ["ردیف", "ماده آلرژیزا", "واکنش", "شدت", ""];
|
||||
@@ -11,7 +12,9 @@ function Allergies({ data }) {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Head text="لیست آلرژی ها" />
|
||||
<Head text="لیست آلرژی ها">
|
||||
<AddBtn />
|
||||
</Head>
|
||||
<CustomTable
|
||||
zeroRadius={true}
|
||||
tableHead={tableHead}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import CustomTable from "@/app/component/CustomTable";
|
||||
import TextLoading from "@/app/component/loading/Text";
|
||||
import EditB from "@/components/icons/EditB";
|
||||
import TrashB from "@/components/icons/TrashB";
|
||||
import { Button, Switch, TableCell, TableRow } from "@mui/material";
|
||||
import Head from "../../components/Head";
|
||||
import UpdateList from "@/components/icons/UpdateList";
|
||||
import AddBtn from "../../components/AddBtn";
|
||||
|
||||
function Disease({ data }) {
|
||||
const tableHead = ["ردیف", "اسم", "وضعیت", ""];
|
||||
@@ -11,7 +11,18 @@ function Disease({ data }) {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Head text="لیست بیماری ها" />
|
||||
<Head text="لیست بیماری ها" add={false}>
|
||||
<div className="flex items-center justify-end gap-4">
|
||||
<Button
|
||||
variant="outlined"
|
||||
className="!border-[#5559CE] !border-[2px] !flex !items-center !justify-center !gap-2 !text-[14px] md:!text-[14px] !font-medium"
|
||||
>
|
||||
<UpdateList />
|
||||
آپدیت کردن
|
||||
</Button>
|
||||
<AddBtn />
|
||||
</div>
|
||||
</Head>
|
||||
<CustomTable
|
||||
zeroRadius={true}
|
||||
tableHead={tableHead}
|
||||
@@ -37,23 +48,9 @@ function Disease({ data }) {
|
||||
</TableCell>
|
||||
<TableCell className="!pr-[18px] dark:!border-transparent !text-[#616161] dark:!text-[#A1A1A1] !text-[16px] !font-medium !text-nowrap">
|
||||
<TextLoading width={15} height={18} loading={false}>
|
||||
{/* {row.status} */}
|
||||
<Switch defaultChecked={row.status === "true"} />
|
||||
</TextLoading>
|
||||
</TableCell>
|
||||
<TableCell
|
||||
className="!pr-[18px] dark:!border-transparent !text-[#616161] dark:!text-[#A1A1A1] !text-[16px] !font-medium !text-nowrap"
|
||||
align="right"
|
||||
>
|
||||
<div className="flex items-center justify-center gap-[4px]">
|
||||
<Button className="!min-w-fit !p-1" variant="text">
|
||||
<TrashB />
|
||||
</Button>
|
||||
<Button className="!min-w-fit !p-1" variant="text">
|
||||
<EditB />
|
||||
</Button>
|
||||
</div>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
))}
|
||||
</CustomTable>
|
||||
|
||||
@@ -4,6 +4,7 @@ import EditB from "@/components/icons/EditB";
|
||||
import TrashB from "@/components/icons/TrashB";
|
||||
import { Button, TableCell, TableRow } from "@mui/material";
|
||||
import Head from "../../components/Head";
|
||||
import AddBtn from "../../components/AddBtn";
|
||||
|
||||
function FamilyHistory({ data }) {
|
||||
const tableHead = ["ردیف", "بیماری", "نسبت خانوادگی", ""];
|
||||
@@ -11,7 +12,9 @@ function FamilyHistory({ data }) {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Head text="لیست سابقه خانوادگی بیماری" />
|
||||
<Head text="لیست سابقه خانوادگی بیماری">
|
||||
<AddBtn />
|
||||
</Head>
|
||||
<CustomTable
|
||||
zeroRadius={true}
|
||||
tableHead={tableHead}
|
||||
|
||||
@@ -4,6 +4,7 @@ import EditB from "@/components/icons/EditB";
|
||||
import TrashB from "@/components/icons/TrashB";
|
||||
import { Button, TableCell, TableRow } from "@mui/material";
|
||||
import Head from "../../components/Head";
|
||||
import AddBtn from "../../components/AddBtn";
|
||||
|
||||
function Medications({ data }) {
|
||||
const tableHead = ["ردیف", "نام دارو", "دوز مصرفی", "تعداد و زمان مصرف", ""];
|
||||
@@ -11,7 +12,9 @@ function Medications({ data }) {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Head text="لیست دارو های مصرفی" />
|
||||
<Head text="لیست دارو های مصرفی">
|
||||
<AddBtn />
|
||||
</Head>
|
||||
<CustomTable
|
||||
zeroRadius={true}
|
||||
tableHead={tableHead}
|
||||
|
||||
@@ -4,14 +4,17 @@ import EditB from "@/components/icons/EditB";
|
||||
import TrashB from "@/components/icons/TrashB";
|
||||
import { Button, TableCell, TableRow, Tooltip } from "@mui/material";
|
||||
import Head from "../../components/Head";
|
||||
import AddBtn from "../../components/AddBtn";
|
||||
|
||||
function Relatives({ data }) {
|
||||
const tableHead = ["ردیف", "نام", "نسبت", "شماره تماس", "ایمیل", "آدرس", ""];
|
||||
const tableHead = ["ردیف", "نام", "نسبت", "شماره تماس", "آدرس", ""];
|
||||
const centerTable = [0];
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Head text="لیست بستگان" />
|
||||
<Head text="لیست بستگان">
|
||||
<AddBtn />
|
||||
</Head>
|
||||
<CustomTable
|
||||
zeroRadius={true}
|
||||
tableHead={tableHead}
|
||||
@@ -46,19 +49,7 @@ function Relatives({ data }) {
|
||||
</TextLoading>
|
||||
</TableCell>
|
||||
<TableCell className="!pr-[18px] dark:!border-transparent !text-[#616161] dark:!text-[#A1A1A1] !text-[16px] !font-medium !text-nowrap">
|
||||
<TextLoading width={15} height={18} loading={false}>
|
||||
{row.contact.email}
|
||||
</TextLoading>
|
||||
</TableCell>
|
||||
<TableCell className="!pr-[18px] dark:!border-transparent !text-[#616161] dark:!text-[#A1A1A1] !text-[16px] !font-medium !text-nowrap">
|
||||
<Tooltip title={row.contact.address || ""} arrow>
|
||||
<div className="truncate max-w-[150px] cursor-default">
|
||||
<TextLoading width={15} height={18} loading={false}>
|
||||
{(row.contact.address || "").substring(0, 15)}
|
||||
{row.contact.address?.length > 15 ? "…" : ""}
|
||||
</TextLoading>
|
||||
</div>
|
||||
</Tooltip>
|
||||
{row.contact.address}
|
||||
</TableCell>
|
||||
|
||||
<TableCell
|
||||
|
||||
@@ -4,6 +4,7 @@ import EditB from "@/components/icons/EditB";
|
||||
import TrashB from "@/components/icons/TrashB";
|
||||
import { Button, TableCell, TableRow } from "@mui/material";
|
||||
import Head from "../../components/Head";
|
||||
import AddBtn from "../../components/AddBtn";
|
||||
|
||||
function Surgeries({ data }) {
|
||||
const tableHead = [
|
||||
@@ -17,7 +18,9 @@ function Surgeries({ data }) {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Head text="لیست جراحی ها" />
|
||||
<Head text="لیست جراحی ها">
|
||||
<AddBtn />
|
||||
</Head>
|
||||
<CustomTable
|
||||
zeroRadius={true}
|
||||
tableHead={tableHead}
|
||||
|
||||
Reference in New Issue
Block a user