change fields component & handle edit, delete, add data and save & change functional page doctor
This commit is contained in:
@@ -5,8 +5,7 @@ import ModalAddHistory from "./modal";
|
||||
import ItemHistory from "./ItemHistory";
|
||||
|
||||
function FamilyHistory({ data, changeData, loading, updateData }) {
|
||||
const family_history =
|
||||
data && data.other && data.other[0] && data.other[0].family_history;
|
||||
const family_history = data && data.other && data.other.family_history;
|
||||
const tableHead = ["ردیف", "بیماری", "نسبت خانوادگی", ""];
|
||||
const centerTable = [0];
|
||||
const [open, setOpen] = useState(false);
|
||||
@@ -22,13 +21,13 @@ function FamilyHistory({ data, changeData, loading, updateData }) {
|
||||
updateData={updateData}
|
||||
/>
|
||||
</Head>
|
||||
{family_history.length ? (
|
||||
{family_history?.length ? (
|
||||
<CustomTable
|
||||
zeroRadius={true}
|
||||
tableHead={tableHead}
|
||||
centerTable={centerTable}
|
||||
>
|
||||
{family_history.map((row, idx) => (
|
||||
{family_history?.map((row, idx) => (
|
||||
<ItemHistory
|
||||
key={idx}
|
||||
row={row}
|
||||
|
||||
Reference in New Issue
Block a user