feat: add password requirements validation and indicators in ChangePasswordModal and DetailUser components
This commit is contained in:
@@ -50,7 +50,13 @@ const getRoleColor = (role_name, role_level) => {
|
||||
return 'default';
|
||||
};
|
||||
|
||||
const columns = (showPreviewModal, showEditModal, showDeleteDialog, showApproveDialog, showChangePasswordModal) => [
|
||||
const columns = (
|
||||
showPreviewModal,
|
||||
showEditModal,
|
||||
showDeleteDialog,
|
||||
showApproveDialog,
|
||||
showChangePasswordModal
|
||||
) => [
|
||||
{
|
||||
title: 'ID',
|
||||
dataIndex: 'user_id',
|
||||
@@ -257,7 +263,7 @@ const ListUser = memo(function ListUser(props) {
|
||||
icon: 'question',
|
||||
title: 'Konfirmasi',
|
||||
message: 'Apakah anda yakin hapus user "' + param.user_fullname + '" ?',
|
||||
onConfirm: () => handleDelete(param.user_id),
|
||||
onConfirm: () => handleDelete(param.user_id, param.user_fullname),
|
||||
onCancel: () => props.setSelectedData(null),
|
||||
});
|
||||
};
|
||||
@@ -285,14 +291,14 @@ const ListUser = memo(function ListUser(props) {
|
||||
}
|
||||
};
|
||||
|
||||
const handleDelete = async (user_id) => {
|
||||
const handleDelete = async (user_id, user_fullname) => {
|
||||
const response = await deleteUser(user_id);
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
NotifAlert({
|
||||
icon: 'success',
|
||||
title: 'Berhasil',
|
||||
message: 'User "' + response.data.user_fullname + '" berhasil dihapus.',
|
||||
message: 'User "' + user_fullname + '" berhasil dihapus.',
|
||||
});
|
||||
doFilter();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user