feat(users): add user type modification functionality

- Add modifyType API endpoint in userApi
- Implement user type modification in Users.vue
This commit is contained in:
2026-03-30 14:22:12 +08:00
parent ba78f77243
commit 11245a5b7f
3 changed files with 13 additions and 3 deletions

View File

@@ -140,7 +140,14 @@ export default {
loading.value = false;
}
} else if (showEditModal.value) {
showNotification('Edit user feature is not implemented yet', 'warning');
try {
await userApi.modifyType(editingUserId.value, formData.value.type);
showNotification('User type modified successfully', 'success');
closeModal();
await loadUsers();
} catch (error) {
showNotification(error.message || 'Failed to modify user type', 'error');
}
}
};