diff --git a/src/components/ReactTable4/BasicTable.js b/src/components/ReactTable4/BasicTable.js index 5b00ac0..2d04d36 100644 --- a/src/components/ReactTable4/BasicTable.js +++ b/src/components/ReactTable4/BasicTable.js @@ -15,6 +15,8 @@ import { GoToPage } from "./GoToPage"; import { Settings } from "./Settings"; import { Checkbox } from "./Checkbox"; +import RenderRowSubComponent from "./RenderRowSubComponent"; + import { useTable, useSortBy, @@ -129,7 +131,7 @@ const BasicTable = ({ {/* left box */} {activeTab == 0 ? (
{/* search box */} @@ -241,11 +243,17 @@ const BasicTable = ({ {row.isExpanded ? ( - {RenderRowSubComponent({ + {/* {RenderRowSubComponent({ row: row.original, columns, - })} + addTab, + })} */} {/* {RenderRowSubComponent({ row: row.values })} */} + ) : null} @@ -342,6 +350,7 @@ const BasicTable = ({ ); }; + function EditRow({ row, columns }) { console.log(row); const persian = { @@ -614,278 +623,6 @@ function EditRow({ row, columns }) {
); } -function RenderRowSubComponent({ row, columns }) { - console.log(row); - const persian = { - weight: "وزن", - pageNumber: "تعداد صفحات", - pageType: "نوع کاغذ", - bookNumber: "شماره شابک", - publisher: "انتشارات", - author: "نویسنده", - bookType: "قطع", - publishedYear: "سال انتشار", - }; - return ( -
- {/* right */} -
- {/* 1 */} -
-
-

- نام و نام خانوادگی: - {row.name} -

-
- {/* 2 */} -
-
-

- تاریخ سفارش: - {row.order_date} -

-
- {/* 3 */} -
-
-

- مبلغ سفارش: - {row.order_price} -

-
- {/* 4 */} -
-
-

- شماره سفارش: - {row.order_number} -

-
- {/* 5 */} -
-
-

- شغل کاربر: - {row.user_job} -

-
- {/* 6 */} -
-
-

- وضعیت سفارش: - - {columns[5].Cell({ value: row.order_status })} - -

-
- {/* 7 */} -
-
-

- سطح اهمیت: - - {columns[6].Cell({ value: row.order_level })} - -

-
- {/* 8 */} -
-
-

- محل تولد: - {row.birth_place} -

-
- {/* 9 */} -
-
-

- تلفن محل کار: - {row.office_phone} -

-
- {/* 10 */} -
-
-

- تحصیلات: - {row.education} -

-
- {/* 11 */} -
-
-

- تاریخ تولد: - {row.birth_day} -

-
- {/* 12 */} -
-
-

- شغل: - {row.job} -

-
- {/* 13 */} -
-
-

- دانشگاه: - {row.uni} -

-
- {/* 14 */} -
-
-

- رشته تحصیلی: - {row.field_study} -

-
- {/* 15 */} -
-
-

- اخلاق: - {row.behaviour} -

-
- {/* 16 */} -
-
-

- نشانی: - {row.address} -

-
-
- {/* left */} -
- - -
-
- ); -} export default BasicTable;