diff --git a/src/App.jsx b/src/App.jsx index ae251bd..7eeb525 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -15,7 +15,6 @@ import IndexTag from './pages/master/tag/IndexTag'; import IndexUnit from './pages/master/unit/IndexUnit'; import IndexBrandDevice from './pages/master/brandDevice/IndexBrandDevice'; import AddBrandDevice from './pages/master/brandDevice/AddBrandDevice'; -import IndexPlantSection from './pages/master/plantSection/IndexPlantSection'; import IndexStatus from './pages/master/status/IndexStatus'; import IndexShift from './pages/master/shift/IndexShift'; @@ -41,6 +40,7 @@ import SvgAirDryerB from './pages/home/SvgAirDryerB'; import SvgAirDryerC from './pages/home/SvgAirDryerC'; import IndexHistoryAlarm from './pages/history/alarm/IndexHistoryAlarm'; import IndexHistoryEvent from './pages/history/event/IndexHistoryEvent'; +import IndexPlantSubSection from './pages/master/plantSubSection/IndexPlantSubSection'; const App = () => { return ( @@ -74,7 +74,7 @@ const App = () => { } /> } /> } /> - } /> + } /> } /> } /> diff --git a/src/layout/LayoutMenu.jsx b/src/layout/LayoutMenu.jsx index f52b424..d0d5cfc 100644 --- a/src/layout/LayoutMenu.jsx +++ b/src/layout/LayoutMenu.jsx @@ -93,9 +93,9 @@ const allItems = [ label: 'Master', children: [ { - key: 'master-plant-section', + key: 'master-plant-sub-section', icon: , - label: Plant Sub Section, + label: Plant Sub Section, }, { key: 'master-brand-device', diff --git a/src/pages/master/device/component/ListDevice.jsx b/src/pages/master/device/component/ListDevice.jsx index 70dc2dd..875deba 100644 --- a/src/pages/master/device/component/ListDevice.jsx +++ b/src/pages/master/device/component/ListDevice.jsx @@ -15,6 +15,13 @@ import { deleteDevice, getAllDevice } from '../../../../api/master-device'; import TableList from '../../../../components/Global/TableList'; const columns = (showPreviewModal, showEditModal, showDeleteDialog) => [ + { + title: 'No', + key: 'no', + width: '5%', + align: 'center', + render: (_, __, index) => index + 1, + }, { title: 'ID', dataIndex: 'device_id', @@ -27,6 +34,7 @@ const columns = (showPreviewModal, showEditModal, showDeleteDialog) => [ dataIndex: 'device_code', key: 'device_code', width: '10%', + hidden: true, }, { title: 'Device Name', diff --git a/src/pages/master/plantSection/IndexPlantSection.jsx b/src/pages/master/plantSubSection/IndexPlantSubSection.jsx similarity index 89% rename from src/pages/master/plantSection/IndexPlantSection.jsx rename to src/pages/master/plantSubSection/IndexPlantSubSection.jsx index 3ec995f..5fc44a2 100644 --- a/src/pages/master/plantSection/IndexPlantSection.jsx +++ b/src/pages/master/plantSubSection/IndexPlantSubSection.jsx @@ -1,13 +1,13 @@ import React, { memo, useState, useEffect } from 'react'; import { useNavigate } from 'react-router-dom'; -import ListPlantSection from './component/ListPlantSection'; -import DetailPlantSection from './component/DetailPlantSection'; +import ListPlantSection from './component/ListPlantSubSection'; +import DetailPlantSection from './component/DetailPlantSubSection'; import { useBreadcrumb } from '../../../layout/LayoutBreadcrumb'; import { Typography } from 'antd'; const { Text } = Typography; -const IndexPlantSection = memo(function IndexPlantSection() { +const IndexPlantSubSection = memo(function IndexPlantSubSection() { const navigate = useNavigate(); const { setBreadcrumbItems } = useBreadcrumb(); @@ -71,4 +71,4 @@ const IndexPlantSection = memo(function IndexPlantSection() { ); }); -export default IndexPlantSection; +export default IndexPlantSubSection; diff --git a/src/pages/master/plantSection/component/DetailPlantSection.jsx b/src/pages/master/plantSubSection/component/DetailPlantSubSection.jsx similarity index 99% rename from src/pages/master/plantSection/component/DetailPlantSection.jsx rename to src/pages/master/plantSubSection/component/DetailPlantSubSection.jsx index bdeef66..de45dd4 100644 --- a/src/pages/master/plantSection/component/DetailPlantSection.jsx +++ b/src/pages/master/plantSubSection/component/DetailPlantSubSection.jsx @@ -7,7 +7,7 @@ import TextArea from 'antd/es/input/TextArea'; const { Text } = Typography; -const DetailPlantSection = (props) => { +const DetailPlantSubSection = (props) => { const [confirmLoading, setConfirmLoading] = useState(false); const defaultData = { @@ -265,4 +265,4 @@ const DetailPlantSection = (props) => { ); }; -export default DetailPlantSection; +export default DetailPlantSubSection; diff --git a/src/pages/master/plantSection/component/ListPlantSection.jsx b/src/pages/master/plantSubSection/component/ListPlantSubSection.jsx similarity index 96% rename from src/pages/master/plantSection/component/ListPlantSection.jsx rename to src/pages/master/plantSubSection/component/ListPlantSubSection.jsx index 9de4089..fd18e0a 100644 --- a/src/pages/master/plantSection/component/ListPlantSection.jsx +++ b/src/pages/master/plantSubSection/component/ListPlantSubSection.jsx @@ -24,27 +24,21 @@ const columns = (showPreviewModal, showEditModal, showDeleteDialog) => [ title: 'Plant Sub Section Code', dataIndex: 'plant_sub_section_code', key: 'plant_sub_section_code', - width: '15%', + width: '10%', align: 'center', + hidden: true, }, { title: 'Plant Sub Section Name', dataIndex: 'plant_sub_section_name', key: 'plant_sub_section_name', - width: '25%', - }, - { - title: 'Table Name Value', - dataIndex: 'table_name_value', - key: 'table_name_value', - width: '20%', - render: (text) => text || '-', + width: '15%', }, { title: 'Description', dataIndex: 'plant_sub_section_description', key: 'plant_sub_section_description', - width: '20%', + width: '30%', render: (text) => text || '-', }, { @@ -101,7 +95,7 @@ const columns = (showPreviewModal, showEditModal, showDeleteDialog) => [ }, ]; -const ListPlantSection = memo(function ListPlantSection(props) { +const ListPlantSubSection = memo(function ListPlantSubSection(props) { const [trigerFilter, setTrigerFilter] = useState(false); const defaultFilter = { criteria: '' }; const [formDataFilter, setFormDataFilter] = useState(defaultFilter); @@ -259,4 +253,4 @@ const ListPlantSection = memo(function ListPlantSection(props) { ); }); -export default ListPlantSection; +export default ListPlantSubSection; diff --git a/src/pages/master/shift/component/ListShift.jsx b/src/pages/master/shift/component/ListShift.jsx index ae2b829..d177631 100644 --- a/src/pages/master/shift/component/ListShift.jsx +++ b/src/pages/master/shift/component/ListShift.jsx @@ -28,6 +28,13 @@ const formatTime = (timeValue) => { }; const columns = (showPreviewModal, showEditModal, showDeleteDialog) => [ + { + title: 'No', + key: 'no', + width: '5%', + align: 'center', + render: (_, __, index) => index + 1, + }, { title: 'Shift Name', dataIndex: 'shift_name', diff --git a/src/pages/master/status/component/DetailStatus.jsx b/src/pages/master/status/component/DetailStatus.jsx index 11b1afa..360f2f6 100644 --- a/src/pages/master/status/component/DetailStatus.jsx +++ b/src/pages/master/status/component/DetailStatus.jsx @@ -197,39 +197,43 @@ const DetailStatus = (props) => { -
- Status Color - * -
- `color hex: ${color.toHexString()}`} - allowClear={false} - format="hex" - size="large" - style={{ width: '100%' }} - presets={[ - { - label: 'Recommended', - colors: [ - '#EF4444', // Merah - '#3B82F6', // Biru - '#10B981', // Hijau - '#F59E0B', // Kuning - '#8B5CF6', // Ungu - '#EC4899', // Pink - '#F97316', // Orange - '#14B8A6', // Teal - '#6B7280', // Gray - '#000000', // Black - ], - }, - ]} - /> -
-
+ + +
+ Status Color + * +
+ `color hex: ${color.toHexString()}`} + allowClear={false} + format="hex" + style={{ width: '100%' }} + presets={[ + { + label: 'Recommended', + colors: [ + '#EF4444', // Merah + '#3B82F6', // Biru + '#10B981', // Hijau + '#F59E0B', // Kuning + '#8B5CF6', // Ungu + '#EC4899', // Pink + '#F97316', // Orange + '#14B8A6', // Teal + '#6B7280', // Gray + '#000000', // Black + ], + }, + ]} + /> +
+
+ +
+
Description