diff --git a/src/pages/master/plantSection/component/ListPlantSection.jsx b/src/pages/master/plantSection/component/ListPlantSection.jsx index 9ff8d4c..9de4089 100644 --- a/src/pages/master/plantSection/component/ListPlantSection.jsx +++ b/src/pages/master/plantSection/component/ListPlantSection.jsx @@ -53,10 +53,18 @@ const columns = (showPreviewModal, showEditModal, showDeleteDialog) => [ key: 'is_active', width: '10%', align: 'center', - render: (status) => ( - - {status ? 'Active' : 'Inactive'} - + render: (_, { is_active }) => ( + <> + {is_active === true ? ( + + Running + + ) : ( + + Offline + + )} + ), }, { diff --git a/src/pages/master/shift/component/ListShift.jsx b/src/pages/master/shift/component/ListShift.jsx index c810568..ae2b829 100644 --- a/src/pages/master/shift/component/ListShift.jsx +++ b/src/pages/master/shift/component/ListShift.jsx @@ -56,8 +56,18 @@ const columns = (showPreviewModal, showEditModal, showDeleteDialog) => [ key: 'is_active', width: '15%', align: 'center', - render: (status) => ( - {status ? 'Active' : 'Inactive'} + render: (_, { is_active }) => ( + <> + {is_active === true ? ( + + Running + + ) : ( + + Offline + + )} + ), }, { diff --git a/src/pages/master/tag/component/ListTag.jsx b/src/pages/master/tag/component/ListTag.jsx index 63ed7b5..ce20bac 100644 --- a/src/pages/master/tag/component/ListTag.jsx +++ b/src/pages/master/tag/component/ListTag.jsx @@ -80,15 +80,19 @@ const columns = (showPreviewModal, showEditModal, showDeleteDialog) => [ key: 'is_active', width: '8%', align: 'center', - render: (_, { is_active }) => { - const color = is_active ? 'green' : 'red'; - const text = is_active ? 'Active' : 'Inactive'; - return ( - - {text} - - ); - }, + render: (_, { is_active }) => ( + <> + {is_active === true ? ( + + Running + + ) : ( + + Offline + + )} + + ), }, { title: 'Aksi', diff --git a/src/pages/master/unit/component/ListUnit.jsx b/src/pages/master/unit/component/ListUnit.jsx index 34668de..d97d6ea 100644 --- a/src/pages/master/unit/component/ListUnit.jsx +++ b/src/pages/master/unit/component/ListUnit.jsx @@ -45,15 +45,19 @@ const columns = (showPreviewModal, showEditModal, showDeleteDialog) => [ key: 'is_active', width: '10%', align: 'center', - render: (_, { is_active }) => { - const color = is_active ? 'green' : 'red'; - const text = is_active ? 'Active' : 'Inactive'; - return ( - - {text} - - ); - }, + render: (_, { is_active }) => ( + <> + {is_active === true ? ( + + Running + + ) : ( + + Offline + + )} + + ), }, { title: 'Aksi', diff --git a/src/pages/role/component/ListRole.jsx b/src/pages/role/component/ListRole.jsx index 855f746..4cb1e63 100644 --- a/src/pages/role/component/ListRole.jsx +++ b/src/pages/role/component/ListRole.jsx @@ -46,9 +46,17 @@ const columns = (showPreviewModal, showEditModal, showDeleteDialog) => [ width: '10%', align: 'center', render: (_, { is_active }) => ( - - {is_active ? 'Active' : 'Inactive'} - + <> + {is_active === true ? ( + + Active + + ) : ( + + Inactive + + )} + ), }, { @@ -241,4 +249,4 @@ const ListRole = memo(function ListRole(props) { ); }); -export default ListRole; \ No newline at end of file +export default ListRole;