feat: remove section name handling from DetailPlantSection and ListPlantSection components

This commit is contained in:
2025-10-17 11:13:05 +07:00
parent f049902d2c
commit c7c5a33613
2 changed files with 7 additions and 42 deletions

View File

@@ -16,25 +16,21 @@ 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',
},
];
@@ -51,13 +47,7 @@ const columns = (showPreviewModal, showEditModal, showDeleteDialog) => [
title: 'Plant Name',
dataIndex: 'plantName',
key: 'plantName',
width: '30%',
},
{
title: 'Section Name',
dataIndex: 'sectionName',
key: 'sectionName',
width: '30%',
width: '60%',
},
{
title: 'Status',
@@ -137,8 +127,7 @@ const ListPlantSection = memo(function ListPlantSection(props) {
const searchLower = searchParam.toLowerCase();
filteredPlantSections = plantSectionData.filter(
(plant) =>
plant.plantName.toLowerCase().includes(searchLower) ||
plant.sectionName.toLowerCase().includes(searchLower)
plant.plantName.toLowerCase().includes(searchLower)
);
}
@@ -210,7 +199,7 @@ const ListPlantSection = memo(function ListPlantSection(props) {
NotifConfirmDialog({
icon: 'question',
title: 'Konfirmasi',
message: 'Apakah anda yakin hapus data "' + param.plantName + ' - ' + param.sectionName + '" ?',
message: 'Apakah anda yakin hapus data "' + param.plantName + '" ?',
onConfirm: () => handleDelete(param.plant_section_id),
onCancel: () => props.setSelectedData(null),
});
@@ -227,7 +216,7 @@ const ListPlantSection = memo(function ListPlantSection(props) {
NotifAlert({
icon: 'success',
title: 'Berhasil',
message: `Data Plant Section "${plantToDelete?.plantName || ''} - ${plantToDelete?.sectionName || ''}" berhasil dihapus.`,
message: `Data Plant Section "${plantToDelete?.plantName || ''}" berhasil dihapus.`,
});
};
@@ -301,7 +290,7 @@ const ListPlantSection = memo(function ListPlantSection(props) {
mobile
cardColor={'#42AAFF'}
header={'plantName'}
subHeader={'sectionName'}
subHeader={null}
showPreviewModal={showPreviewModal}
showEditModal={showEditModal}
showDeleteDialog={showDeleteDialog}