-
-
-
-
- {!readOnly && }
-
- ,
- ]}
- destroyOnClose
- >
-
-
- );
-};
-
-export default DetailPlantSection;
+export default DetailPlantSection;
\ No newline at end of file
diff --git a/src/pages/master/plantSection/component/ListPlantSection.jsx b/src/pages/master/plantSection/component/ListPlantSection.jsx
index e8c14f8..33d34e1 100644
--- a/src/pages/master/plantSection/component/ListPlantSection.jsx
+++ b/src/pages/master/plantSection/component/ListPlantSection.jsx
@@ -1,5 +1,5 @@
-import React, { useState, useEffect } from 'react';
-import { Button, Col, Row, Space, Input, ConfigProvider, Card } from 'antd';
+import React, { memo, useState, useEffect } from 'react';
+import { Button, Col, Row, Space, Input, ConfigProvider, Card, Tag, Tabs } from 'antd';
import {
PlusOutlined,
EditOutlined,
@@ -7,156 +7,314 @@ import {
SearchOutlined,
EyeOutlined,
} from '@ant-design/icons';
+import { NotifAlert, NotifConfirmDialog } from '../../../../components/Global/ToastNotif';
+import { useNavigate } from 'react-router-dom';
import TableList from '../../../../components/Global/TableList';
-const ListPlantSection = ({
- setActionMode,
- handleEdit,
- handleDelete,
- handlePreview,
- getAllPlantSection,
- refreshList,
-}) => {
- const [searchValue, setSearchValue] = useState('');
- const [formDataFilter, setFormDataFilter] = useState({ criteria: '' });
+// Dummy data for Plant Section
+const initialPlantSectionData = [
+ {
+ plant_section_id: 1,
+ plantName: 'Assembly',
+ sectionName: 'Line 1',
+ status: 'Active',
+ },
+ {
+ plant_section_id: 2,
+ plantName: 'Assembly',
+ sectionName: 'Line 2',
+ status: 'Active',
+ },
+ {
+ plant_section_id: 3,
+ plantName: 'Painting',
+ sectionName: 'Booth A',
+ status: 'Active',
+ },
+ {
+ plant_section_id: 4,
+ plantName: 'Warehouse',
+ sectionName: 'Receiving',
+ status: 'Inactive',
+ },
+];
+
+const columns = (showPreviewModal, showEditModal, showDeleteDialog) => [
+ {
+ title: 'No',
+ key: 'no',
+ width: '5%',
+ align: 'center',
+ render: (_, __, index) => index + 1,
+ },
+ {
+ title: 'Plant Name',
+ dataIndex: 'plantName',
+ key: 'plantName',
+ width: '30%',
+ },
+ {
+ title: 'Section Name',
+ dataIndex: 'sectionName',
+ key: 'sectionName',
+ width: '30%',
+ },
+ {
+ title: 'Status',
+ dataIndex: 'status',
+ key: 'status',
+ width: '15%',
+ align: 'center',
+ render: (_, { status }) => (
+ <>
+ {status === 'Active' ? (
+