lavoce #2
@@ -8,6 +8,7 @@ import {
|
||||
SearchOutlined,
|
||||
CheckOutlined,
|
||||
CloseOutlined,
|
||||
KeyOutlined,
|
||||
} from '@ant-design/icons';
|
||||
import { NotifAlert, NotifOk, NotifConfirmDialog } from '../../../components/Global/ToastNotif';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
@@ -49,7 +50,7 @@ const getRoleColor = (role_name, role_level) => {
|
||||
return 'default';
|
||||
};
|
||||
|
||||
const columns = (showPreviewModal, showEditModal, showDeleteDialog, showApproveDialog) => [
|
||||
const columns = (showPreviewModal, showEditModal, showDeleteDialog, showApproveDialog, showChangePasswordModal) => [
|
||||
{
|
||||
title: 'ID',
|
||||
dataIndex: 'user_id',
|
||||
@@ -135,7 +136,7 @@ const columns = (showPreviewModal, showEditModal, showDeleteDialog, showApproveD
|
||||
title: 'Aksi',
|
||||
key: 'aksi',
|
||||
align: 'center',
|
||||
width: '15%',
|
||||
width: '18%',
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
@@ -158,6 +159,12 @@ const columns = (showPreviewModal, showEditModal, showDeleteDialog, showApproveD
|
||||
icon={<EditOutlined style={{ color: '#faad14' }} />}
|
||||
onClick={() => showEditModal(record)}
|
||||
/>
|
||||
<Button
|
||||
type="text"
|
||||
style={{ borderColor: '#722ed1' }}
|
||||
icon={<KeyOutlined style={{ color: '#722ed1' }} />}
|
||||
onClick={() => showChangePasswordModal(record)}
|
||||
/>
|
||||
<Button
|
||||
type="text"
|
||||
danger
|
||||
@@ -255,6 +262,11 @@ const ListUser = memo(function ListUser(props) {
|
||||
});
|
||||
};
|
||||
|
||||
const showChangePasswordModal = (param) => {
|
||||
props.setSelectedUserForPassword(param);
|
||||
props.setShowChangePasswordModal(true);
|
||||
};
|
||||
|
||||
const handleApprove = async (user_id) => {
|
||||
const response = await approveUser(user_id);
|
||||
if (response.statusCode == 200) {
|
||||
@@ -366,7 +378,8 @@ const ListUser = memo(function ListUser(props) {
|
||||
showPreviewModal,
|
||||
showEditModal,
|
||||
showDeleteDialog,
|
||||
showApproveDialog
|
||||
showApproveDialog,
|
||||
showChangePasswordModal
|
||||
)}
|
||||
triger={trigerFilter}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user