change fields component & handle edit, delete, add data and save & change functional page doctor
This commit is contained in:
@@ -5,8 +5,7 @@ import ItemSurgeries from "./ItemSurgeries";
|
||||
import ModalAddSurgeries from "./modal";
|
||||
|
||||
function Surgeries({ data, changeData, loading, updateData }) {
|
||||
const surgeries =
|
||||
data && data.other && data.other[0] && data.other[0].surgeries;
|
||||
const surgeries = data && data.other && data.other.surgeries;
|
||||
const tableHead = [
|
||||
"ردیف",
|
||||
"نوع جراحی",
|
||||
@@ -28,13 +27,13 @@ function Surgeries({ data, changeData, loading, updateData }) {
|
||||
changeData={changeData}
|
||||
/>
|
||||
</Head>
|
||||
{surgeries.length ? (
|
||||
{surgeries?.length ? (
|
||||
<CustomTable
|
||||
zeroRadius={true}
|
||||
tableHead={tableHead}
|
||||
centerTable={centerTable}
|
||||
>
|
||||
{surgeries.map((row, idx) => (
|
||||
{surgeries?.map((row, idx) => (
|
||||
<ItemSurgeries
|
||||
key={idx}
|
||||
row={row}
|
||||
|
||||
Reference in New Issue
Block a user