handle register & retry code & edit phone number & fix bug select city and state & add basic modal to all tabs in dashboard

This commit is contained in:
Ehsan
2025-05-29 05:07:11 +03:30
parent c8e8048d6c
commit e12e6c171c
18 changed files with 313 additions and 34 deletions
@@ -4,18 +4,18 @@ 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";
import UpdateBtn from "../../components/UpdateBtn";
import ModalAddMedications from "./modal";
import { useState } from "react";
function Medications({ data }) {
const tableHead = ["ردیف", "نام دارو", "دوز مصرفی", "تعداد و زمان مصرف", ""];
const centerTable = [0];
const [open, setOpen] = useState(false);
return (
<div>
<Head text="لیست دارو های مصرفی">
<UpdateBtn />
<AddBtn />
<ModalAddMedications open={open} setOpen={setOpen} />
</Head>
<CustomTable
zeroRadius={true}
@@ -0,0 +1,44 @@
import { styleDefault } from "@/mui";
import AddBtn from "../../../components/AddBtn";
import UpdateBtn from "../../../components/UpdateBtn";
import { Button, Modal } from "@mui/material";
function ModalAddMedications({ open, setOpen }) {
const handleOpen = () => setOpen(true);
const handleClose = () => setOpen(false);
return (
<>
{/* Button Modal */}
<>
<UpdateBtn />
<AddBtn handleOpen={handleOpen} />
</>
{/* Content Modal */}
<Modal open={open} onClose={handleClose} className="w-full">
<div
style={styleDefault}
className="!px-[16px] !overflow-auto md:!min-w-[580px] md:!px-[24px] lg:!px-[32px] !py-[24px] !bg-[#FFF] !rounded-[8px] !shadow-[0px_1px_24.8px_0px_rgba(204,_204,_204,_0.18)]
!w-full md:!w-fit !h-full md:!h-fit !flex !flex-col !justify-between !max-h-screen md:!max-h-[calc(100%_-_32px)]"
>
<div>
<div className="flex justify-between w-full">
<p className="text-[#3B3B3B] text-[20px] font-bold">اضافه کردن دارو های مصرفی</p>
</div>
{/* <Content /> */}
</div>
<Button
className="!mt-[32px] md:!mt-[36px] lg:!mt-[40px] !px-3 !py-2 !text-[16px] !font-medium !w-fit !mr-auto"
onClick={handleClose}
variant="contained"
>
اعمال تغییرات
</Button>
</div>
</Modal>
</>
);
}
export default ModalAddMedications;