Skip to content

Commit 69baeea

Browse files
committed
connect to backend
1 parent 27d6155 commit 69baeea

File tree

17 files changed

+2936
-8
lines changed

17 files changed

+2936
-8
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@
88
**/.DS_Store
99
**/*.cache
1010
**/*.egg-info
11-
**/test.db
11+
**/test.db
12+
.cursor/

frontend/package-lock.json

Lines changed: 197 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,26 @@
1010
},
1111
"dependencies": {
1212
"@chakra-ui/react": "^3.13.0",
13+
"@dnd-kit/core": "^6.3.1",
14+
"@dnd-kit/modifiers": "^9.0.0",
15+
"@dnd-kit/sortable": "^10.0.0",
16+
"@dnd-kit/utilities": "^3.2.2",
1317
"axios": "^1.11.0",
1418
"firebase": "^11.10.0",
1519
"humps": "^2.0.1",
1620
"jwt-decode": "^4.0.0",
1721
"next": "^14.2.24",
1822
"next-themes": "^0.4.6",
1923
"react": "^18",
24+
"react-datepicker": "^8.7.0",
2025
"react-dom": "^18",
2126
"react-hook-form": "^7.57.0",
2227
"react-icons": "^5.5.0"
2328
},
2429
"devDependencies": {
2530
"@types/node": "^20",
2631
"@types/react": "^18",
32+
"@types/react-datepicker": "^6.2.0",
2733
"@types/react-dom": "^18",
2834
"eslint": "^8",
2935
"eslint-config-next": "14.2.13",

frontend/public/llsc-logo.png

42.9 KB
Loading

frontend/src/APIClients/authAPIClient.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,3 +386,36 @@ export const refresh = async (): Promise<boolean> => {
386386
return false;
387387
}
388388
};
389+
390+
// User types for admin and user management
391+
export interface UserResponse {
392+
id: string;
393+
firstName: string | null;
394+
lastName: string | null;
395+
email: string;
396+
roleId: number;
397+
authId: string;
398+
approved: boolean;
399+
formStatus: string;
400+
}
401+
402+
export interface UserListResponse {
403+
users: UserResponse[];
404+
total: number;
405+
}
406+
407+
/**
408+
* Get all admin users
409+
*/
410+
export const getAdmins = async (): Promise<UserListResponse> => {
411+
const response = await baseAPIClient.get<UserListResponse>('/users?admin=true');
412+
return response.data;
413+
};
414+
415+
/**
416+
* Get user by ID
417+
*/
418+
export const getUserById = async (userId: string): Promise<UserResponse> => {
419+
const response = await baseAPIClient.get<UserResponse>(`/users/${userId}`);
420+
return response.data;
421+
};

0 commit comments

Comments
 (0)