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