Commit c2a6280
fix: add feedback after successfully adding a user in admin panel (#1462)
## Summary
- Show success toast notification after user is added
- Refresh user list and navigate to 'normal' filter on page 1 to display
the newly added user
## Problem
When adding a user in Admin -> Users, the page had no feedback after
submission (as reported in #1457).
**Root cause:** The code only refreshed the user list if the current
filter was "all" or "staff", but the default filter is "normal".
Additionally, there was no success toast notification.
## Solution
1. Added toast notification to confirm successful user creation
2. After adding user, navigate to "normal" filter page 1 and refresh the
list so the new user is visible
## Test plan
1. Go to Admin -> Users
2. Click "Add User"
3. Submit user information
4. ✅ Success toast should appear
5. ✅ Page should navigate to "normal" filter
6. ✅ Newly added user should be visible in the list
Fixes #1457
---------
Co-authored-by: LinkinStars <linkinstar@foxmail.com>1 parent 5940877 commit c2a6280
3 files changed
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2383 | 2383 | | |
2384 | 2384 | | |
2385 | 2385 | | |
| 2386 | + | |
2386 | 2387 | | |
2387 | 2388 | | |
2388 | 2389 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
113 | | - | |
114 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
115 | 120 | | |
116 | 121 | | |
117 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
0 commit comments