design and handle modal add, edit and delete in all tabs dashboard & change list & update data profile_other

This commit is contained in:
Ehsan
2025-05-30 02:22:10 +03:30
parent e12e6c171c
commit 0969eca274
28 changed files with 1108 additions and 337 deletions
@@ -4,7 +4,7 @@ import { Switch, TableCell, TableRow } from "@mui/material";
import Head from "../../components/Head";
import UpdateBtn from "../../components/UpdateBtn";
function Disease({ data }) {
function Disease({ data, changeData }) {
const tableHead = ["ردیف", "اسم", "وضعیت", ""];
const centerTable = [0];
@@ -38,7 +38,14 @@ 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}>
<Switch defaultChecked={row.status === "true"} />
<Switch
defaultChecked={row.status === "true"}
onChange={(e) => {
const newData = row;
newData.status = JSON.stringify(e.target.checked);
changeData("update", "disease", idx, newData);
}}
/>
</TextLoading>
</TableCell>
</TableRow>