refactor ListEventAlarm component by removing unused detail view handler and adjusting column widths

This commit is contained in:
2025-10-09 14:50:26 +07:00
parent 406b306275
commit dcdd8c9b8d

View File

@@ -65,11 +65,6 @@ const initialAlarmsData = [
]; ];
const ListEventAlarm = memo(function ListEventAlarm(props) { const ListEventAlarm = memo(function ListEventAlarm(props) {
const handleViewDetail = (record) => {
props.setSelectedData(record);
props.setActionMode('preview');
};
const columns = [ const columns = [
{ {
title: 'No', title: 'No',
@@ -88,7 +83,7 @@ const ListEventAlarm = memo(function ListEventAlarm(props) {
title: 'Plant Sub Section', title: 'Plant Sub Section',
dataIndex: 'plant_sub_section', dataIndex: 'plant_sub_section',
key: 'plant_sub_section', key: 'plant_sub_section',
width: '20%', width: '25%',
}, },
{ {
title: 'Device', title: 'Device',
@@ -106,18 +101,7 @@ const ListEventAlarm = memo(function ListEventAlarm(props) {
title: 'Engineer', title: 'Engineer',
dataIndex: 'engineer', dataIndex: 'engineer',
key: 'engineer', key: 'engineer',
width: '10%', width: '15%',
},
{
title: 'Action',
key: 'action',
width: '10%',
align: 'center',
render: (_, record) => (
<Button type="link" onClick={() => handleViewDetail(record)}>
Detail
</Button>
),
}, },
]; ];
const [trigerFilter, setTrigerFilter] = useState(false); const [trigerFilter, setTrigerFilter] = useState(false);