2.4 KiB
2.4 KiB
Management Change Import Button In Users Review
1. Summary
Moved นำเข้าพนักงาน out of the sidebar and exposed it as a page-header action on the Users page, next to the existing add-user action. The import route and protection rules remain unchanged.
2. Files Changed
src/config/nav-config.tssrc/app/dashboard/users/page.tsxdocs/management-change-import-button-in-users-review.md
3. Sidebar Changes
- Removed the root-level sidebar menu item:
นำเข้าพนักงาน
- Did not re-add it anywhere else in the sidebar.
- The
ข้อมูลหลักgroup remains:- พนักงาน
- หลักสูตร
- นโยบาย
- ประกาศ
4. Users Page Changes
- Added a new page-header button on the Users page:
นำเข้าพนักงาน
- Button links to:
/dashboard/import-employees
- Kept the existing add-user action in place.
- Header actions now render side by side on desktop and stack on mobile.
5. Permission Rules
- The Users page is already protected with HRD/Admin access, so the import button is only visible to HRD/Admin users on that page.
- Employee users do not see the button because they do not have access to the Users page.
- Direct access to
/dashboard/import-employeesremains protected by existing route/page guards.
6. Responsive Notes
- Desktop: action buttons align on the right in the page header.
- Mobile: buttons stack vertically and use full width.
- No new overflow behavior was introduced.
7. Manual Test Checklist
- Sidebar no longer shows
นำเข้าพนักงาน. - Sidebar still shows
พนักงาน. - Users page shows
นำเข้าพนักงานbutton for HRD/Admin. - Button links to
/dashboard/import-employees. - Add User button still works.
- Employee user does not see import button through existing page protection.
- Direct
/dashboard/import-employeesremains HRD/Admin only. - Mobile layout does not overflow structurally.
8. Known Limitations
- Visual QA in-browser is still recommended to confirm final spacing and button wrapping on smaller devices.
- The button is placed on the Users page, which is the active employee-management route in the current app. The legacy
/dashboard/employeesroute remains untouched.