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
@@ -3,7 +3,7 @@ import TextLoading from "@/app/component/loading/Text";
import { TableCell, TableRow } from "@mui/material";
import ModalEditItem from "@/components/dashboard/userAccount/components/modal/ModalEditItem";
import Content from "./modal/Content";
import { useState } from "react";
import { useEffect, useState } from "react";
function ItemSurgeries({ row, idx, changeData }) {
const contentData = {
@@ -14,6 +14,14 @@ function ItemSurgeries({ row, idx, changeData }) {
const [data, setData] = useState(contentData);
const resetData = () => setData(contentData);
useEffect(() => {
setData({
type: row.type,
year: row.year,
hospital: row.hospital,
});
}, [row]);
return (
<TableRow
key={idx}