fix: attendance shows only users with attendance.record permission
- Filter attendance admin/balances/workfund to users with attendance.record permission or admin role - New attendance_users API action for user dropdown - Fix missing prisma import in attendance route - Fix user edit: empty password no longer blocks save (preprocess to undefined) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -561,7 +561,9 @@ export default function useAttendanceAdmin({ alert }: AlertContext) {
|
||||
useEffect(() => {
|
||||
const loadUsers = async () => {
|
||||
try {
|
||||
const response = await apiFetch(`${API_BASE}/users?limit=1000`);
|
||||
const response = await apiFetch(
|
||||
`${API_BASE}/attendance?action=attendance_users`,
|
||||
);
|
||||
const result = await response.json();
|
||||
if (result.success) {
|
||||
const apiUsers: ApiUser[] = result.data;
|
||||
|
||||
Reference in New Issue
Block a user