design and handle modal add, edit and delete in all tabs dashboard & change list & update data profile_other
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user