update handle reject & is_active
This commit is contained in:
@@ -219,6 +219,8 @@ const DetailUser = (props) => {
|
||||
if (FormData.user_email !== originalEmail) {
|
||||
payload.user_email = FormData.user_email;
|
||||
}
|
||||
// Add is_active for update mode
|
||||
payload.is_active = FormData.is_active;
|
||||
} else {
|
||||
// For create mode: always send email
|
||||
payload.user_email = FormData.user_email;
|
||||
@@ -233,11 +235,11 @@ const DetailUser = (props) => {
|
||||
if (!FormData.user_id) {
|
||||
payload.user_name = FormData.user_name; // Username only for create
|
||||
payload.user_password = FormData.password; // Backend expects 'user_password'
|
||||
// Don't send confirmPassword, is_sa, is_active for create
|
||||
// Don't send confirmPassword, is_sa for create
|
||||
}
|
||||
// For update mode:
|
||||
// - Don't send 'user_name' (username is immutable)
|
||||
// - Don't send 'is_active' (backend validation schema doesn't allow it)
|
||||
// - is_active is now sent for update mode
|
||||
// - Only send email if it has changed
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user