handle change data and update data in dashboard page for all tabs

This commit is contained in:
Ehsan
2025-06-11 16:52:01 +03:30
parent 72ed07071c
commit bf64271d14
26 changed files with 235 additions and 118 deletions
@@ -4,7 +4,7 @@ import { Switch, TableCell, TableRow } from "@mui/material";
import Head from "@/components/dashboard/userAccount/components/Head";
import UpdateBtn from "@/components/dashboard/userAccount/components/UpdateBtn";
function Disease({ data, setData, updateData }) {
function Disease({ data, setData, updateData, loading }) {
const { other } = data;
const { disease } = other && other[0];
const tableHead = ["ردیف", "اسم", "وضعیت", ""];
@@ -31,7 +31,7 @@ function Disease({ data, setData, updateData }) {
return (
<div className="opacity-page">
<Head text="لیست بیماری ها" add={false}>
<UpdateBtn updateData={updateData} />
<UpdateBtn updateData={updateData} loading={loading} />
</Head>
<CustomTable
zeroRadius={true}