change response file & request get user-profile & change design dashboard page & handle limit page dashboard
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
import { useState } from "react";
|
||||
import CustomTable from "@/app/component/CustomTable";
|
||||
import Head from "@/components/dashboard/userAccount/components/Head";
|
||||
import ModalAddRelatives from "./modal";
|
||||
import ItemRelatives from "./ItemRelatives";
|
||||
|
||||
function Relatives({ data, changeData }) {
|
||||
const tableHead = ["ردیف", "نام", "نسبت", "شماره تماس", "آدرس", ""];
|
||||
const centerTable = [0];
|
||||
const [open, setOpen] = useState(false);
|
||||
|
||||
return (
|
||||
<div className="opacity-page">
|
||||
<Head text="لیست بستگان">
|
||||
<ModalAddRelatives
|
||||
open={open}
|
||||
setOpen={setOpen}
|
||||
changeData={changeData}
|
||||
/>
|
||||
</Head>
|
||||
{data.medications.length ? (
|
||||
<CustomTable
|
||||
zeroRadius={true}
|
||||
tableHead={tableHead}
|
||||
centerTable={centerTable}
|
||||
>
|
||||
{data.relatives.map((row, idx) => (
|
||||
<ItemRelatives
|
||||
key={idx}
|
||||
row={row}
|
||||
idx={idx}
|
||||
changeData={changeData}
|
||||
/>
|
||||
))}
|
||||
</CustomTable>
|
||||
) : (
|
||||
<p className="text-center py-10 text-gray-500">
|
||||
هیچ داروی مصرفی وجود ندارد!
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Relatives;
|
||||
Reference in New Issue
Block a user