Done on function Ban and Unban User with reason and expiration date

This commit is contained in:
2026-01-21 20:28:04 +07:00
parent e02564b5cd
commit a8745327d6
23 changed files with 511 additions and 239 deletions

View File

@@ -27,13 +27,13 @@
"exp_time": [
{
"match": {
"time=1d": "1 day",
"time=7d": "7 days",
"time=15d": "15 days",
"time=1m": "1 month",
"time=6m": "6 month",
"time=1y": "1 year",
"time=0": "Forever"
"time=1": "1 day",
"time=7": "7 days",
"time=15": "15 days",
"time=30": "1 month",
"time=180": "6 month",
"time=365": "1 year",
"time=99999": "Forever"
}
}
],
@@ -133,12 +133,23 @@
"users_page_message_update_info_success": "Edited user information successfully!",
"users_page_message_set_role_success": "Modified user role successfully!",
"users_page_message_banned_success": "Banned {name} successfully!",
"users_page_message_unbanned_success": "Unbanned {name} successfully!",
"users_page_message_select_min_one_day": "Please select expiration at least 1 day!",
"users_page_ui_form_ban_reason": "Ban reason",
"users_page_ui_form_ban_exp": "Ban expiration",
"users_page_ui_select_placeholder_language": "Select language",
"users_page_ui_select_placeholder_role": "Select role",
"users_page_ui_select_placeholder_ban_exp": "Select time",
"backend_INVALID_EMAIL_OR_PASSWORD": "Email or password incorrect!",
"backend_INVALID_PASSWORD": "Password incorrect!",
"backend_YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE": "You are not allowed to change users role"
"users_page_ui_dialog_alert_title": "Unban this user?",
"users_page_ui_dialog_alert_ban_title": "",
"users_page_ui_dialog_alert_description": "Detail: \nName: {name}. \nEmail: {email}",
"users_page_ui_dialog_alert_description_2": "Reason: {reason}. \nExpiration: {exp}",
"backend_message": [
{
"match": {
"code=INVALID_EMAIL_OR_PASSWORD": "Email or password incorrect!",
"code=INVALID_PASSWORD": "Password incorrect!",
"code=YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE": "You are not allowed to change users role"
}
}
]
}

View File

@@ -27,13 +27,13 @@
"exp_time": [
{
"match": {
"time=1d": "1 ngày",
"time=7d": "7 ngày",
"time=15d": "15 ngày",
"time=1m": "1 tháng",
"time=6m": "6 tháng",
"time=1y": "1 năm",
"time=0": "Vĩnh viễn"
"time=1": "1 ngày",
"time=7": "7 ngày",
"time=15": "15 ngày",
"time=30": "1 tháng",
"time=180": "6 tháng",
"time=365": "1 năm",
"time=99999": "Vĩnh viễn"
}
}
],
@@ -133,12 +133,23 @@
"users_page_message_update_info_success": "Chỉnh sửa thông tin người dùng thành công!",
"users_page_message_set_role_success": "Chỉnh sửa quyền hạn người dùng thành công!",
"users_page_message_banned_success": "Người dùng {name} bị cấm thành công!",
"users_page_message_unbanned_success": "Người dùng {name} bỏ cấm thành công!",
"users_page_message_select_min_one_day": "Chọn ít nhất là 1 ngày!",
"users_page_ui_form_ban_reason": "Lý do cấm",
"users_page_ui_form_ban_exp": "Thời gian cấm",
"users_page_ui_select_placeholder_language": "Hãy chọn ngôn ngữ",
"users_page_ui_select_placeholder_role": "Hãy chọn quyền hạn",
"users_page_ui_select_placeholder_ban_exp": "Hãy chọn thời gian cấm",
"backend_INVALID_EMAIL_OR_PASSWORD": "Email hoặc mật khẩu không đúng!",
"backend_INVALID_PASSWORD": "Mật khẩu hiện tại không đúng!",
"backend_YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE": "Bạn không đủ quyền để chỉnh sửa quyền hạn người dùng!"
"users_page_ui_dialog_alert_title": "Bạn muốn mở khóa người dùng này?",
"users_page_ui_dialog_alert_ban_title": "Bạn muốn khóa người dùng này?",
"users_page_ui_dialog_alert_description": "Chi tiết: \nTên: {name}. \nEmail: {email}",
"users_page_ui_dialog_alert_description_2": "\nLý do: {reason}. \nHiệu lực: {exp}",
"backend_message": [
{
"match": {
"code=INVALID_EMAIL_OR_PASSWORD": "Email hoặc mật khẩu không đúng!",
"code=INVALID_PASSWORD": "Mật khẩu hiện tại không đúng!",
"code=YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE": "Bạn không đủ quyền để chỉnh sửa quyền hạn người dùng!"
}
}
]
}