feat: add attendee detail and stats features
- Implemented API endpoints to fetch attendee details and statistics. - Created new route for fetching attendee by ID and their attendance stats. - Added schemas for attendee statistics. - Developed frontend components to display attendee details and attendance statistics. - Integrated attendee detail provider to manage state and data fetching. - Added tests for attendee retrieval and statistics calculation.
This commit is contained in:
@@ -26,6 +26,7 @@ import { Route as AuthenticatedGroupsNewRouteImport } from './routes/_authentica
|
||||
import { Route as AuthenticatedClassSessionIdAttendanceRouteImport } from './routes/_authenticated/class/$sessionId/attendance'
|
||||
import { Route as AuthenticatedGroupsGroupIdIndexRouteImport } from './routes/_authenticated/groups/$groupId/index'
|
||||
import { Route as AuthenticatedGroupsGroupIdAnalyticsRouteImport } from './routes/_authenticated/groups/$groupId/analytics'
|
||||
import { Route as AuthenticatedGroupsGroupIdAttendeesAttendeeIdRouteImport } from './routes/_authenticated/groups/$groupId/attendees/$attendeeId'
|
||||
|
||||
const AuthenticatedRoute = AuthenticatedRouteImport.update({
|
||||
id: '/_authenticated',
|
||||
@@ -115,6 +116,12 @@ const AuthenticatedGroupsGroupIdAnalyticsRoute =
|
||||
path: '/groups/$groupId/analytics',
|
||||
getParentRoute: () => AuthenticatedRoute,
|
||||
} as any)
|
||||
const AuthenticatedGroupsGroupIdAttendeesAttendeeIdRoute =
|
||||
AuthenticatedGroupsGroupIdAttendeesAttendeeIdRouteImport.update({
|
||||
id: '/groups/$groupId/attendees/$attendeeId',
|
||||
path: '/groups/$groupId/attendees/$attendeeId',
|
||||
getParentRoute: () => AuthenticatedRoute,
|
||||
} as any)
|
||||
|
||||
export interface FileRoutesByFullPath {
|
||||
'/': typeof AuthenticatedIndexRoute
|
||||
@@ -133,6 +140,7 @@ export interface FileRoutesByFullPath {
|
||||
'/class/$sessionId/attendance': typeof AuthenticatedClassSessionIdAttendanceRoute
|
||||
'/groups/$groupId/analytics': typeof AuthenticatedGroupsGroupIdAnalyticsRoute
|
||||
'/groups/$groupId/': typeof AuthenticatedGroupsGroupIdIndexRoute
|
||||
'/groups/$groupId/attendees/$attendeeId': typeof AuthenticatedGroupsGroupIdAttendeesAttendeeIdRoute
|
||||
}
|
||||
export interface FileRoutesByTo {
|
||||
'/login': typeof LoginRoute
|
||||
@@ -151,6 +159,7 @@ export interface FileRoutesByTo {
|
||||
'/class/$sessionId/attendance': typeof AuthenticatedClassSessionIdAttendanceRoute
|
||||
'/groups/$groupId/analytics': typeof AuthenticatedGroupsGroupIdAnalyticsRoute
|
||||
'/groups/$groupId': typeof AuthenticatedGroupsGroupIdIndexRoute
|
||||
'/groups/$groupId/attendees/$attendeeId': typeof AuthenticatedGroupsGroupIdAttendeesAttendeeIdRoute
|
||||
}
|
||||
export interface FileRoutesById {
|
||||
__root__: typeof rootRouteImport
|
||||
@@ -171,6 +180,7 @@ export interface FileRoutesById {
|
||||
'/_authenticated/class/$sessionId/attendance': typeof AuthenticatedClassSessionIdAttendanceRoute
|
||||
'/_authenticated/groups/$groupId/analytics': typeof AuthenticatedGroupsGroupIdAnalyticsRoute
|
||||
'/_authenticated/groups/$groupId/': typeof AuthenticatedGroupsGroupIdIndexRoute
|
||||
'/_authenticated/groups/$groupId/attendees/$attendeeId': typeof AuthenticatedGroupsGroupIdAttendeesAttendeeIdRoute
|
||||
}
|
||||
export interface FileRouteTypes {
|
||||
fileRoutesByFullPath: FileRoutesByFullPath
|
||||
@@ -191,6 +201,7 @@ export interface FileRouteTypes {
|
||||
| '/class/$sessionId/attendance'
|
||||
| '/groups/$groupId/analytics'
|
||||
| '/groups/$groupId/'
|
||||
| '/groups/$groupId/attendees/$attendeeId'
|
||||
fileRoutesByTo: FileRoutesByTo
|
||||
to:
|
||||
| '/login'
|
||||
@@ -209,6 +220,7 @@ export interface FileRouteTypes {
|
||||
| '/class/$sessionId/attendance'
|
||||
| '/groups/$groupId/analytics'
|
||||
| '/groups/$groupId'
|
||||
| '/groups/$groupId/attendees/$attendeeId'
|
||||
id:
|
||||
| '__root__'
|
||||
| '/_authenticated'
|
||||
@@ -228,6 +240,7 @@ export interface FileRouteTypes {
|
||||
| '/_authenticated/class/$sessionId/attendance'
|
||||
| '/_authenticated/groups/$groupId/analytics'
|
||||
| '/_authenticated/groups/$groupId/'
|
||||
| '/_authenticated/groups/$groupId/attendees/$attendeeId'
|
||||
fileRoutesById: FileRoutesById
|
||||
}
|
||||
export interface RootRouteChildren {
|
||||
@@ -361,6 +374,13 @@ declare module '@tanstack/react-router' {
|
||||
preLoaderRoute: typeof AuthenticatedGroupsGroupIdAnalyticsRouteImport
|
||||
parentRoute: typeof AuthenticatedRoute
|
||||
}
|
||||
'/_authenticated/groups/$groupId/attendees/$attendeeId': {
|
||||
id: '/_authenticated/groups/$groupId/attendees/$attendeeId'
|
||||
path: '/groups/$groupId/attendees/$attendeeId'
|
||||
fullPath: '/groups/$groupId/attendees/$attendeeId'
|
||||
preLoaderRoute: typeof AuthenticatedGroupsGroupIdAttendeesAttendeeIdRouteImport
|
||||
parentRoute: typeof AuthenticatedRoute
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -375,6 +395,7 @@ interface AuthenticatedRouteChildren {
|
||||
AuthenticatedClassSessionIdAttendanceRoute: typeof AuthenticatedClassSessionIdAttendanceRoute
|
||||
AuthenticatedGroupsGroupIdAnalyticsRoute: typeof AuthenticatedGroupsGroupIdAnalyticsRoute
|
||||
AuthenticatedGroupsGroupIdIndexRoute: typeof AuthenticatedGroupsGroupIdIndexRoute
|
||||
AuthenticatedGroupsGroupIdAttendeesAttendeeIdRoute: typeof AuthenticatedGroupsGroupIdAttendeesAttendeeIdRoute
|
||||
}
|
||||
|
||||
const AuthenticatedRouteChildren: AuthenticatedRouteChildren = {
|
||||
@@ -390,6 +411,8 @@ const AuthenticatedRouteChildren: AuthenticatedRouteChildren = {
|
||||
AuthenticatedGroupsGroupIdAnalyticsRoute:
|
||||
AuthenticatedGroupsGroupIdAnalyticsRoute,
|
||||
AuthenticatedGroupsGroupIdIndexRoute: AuthenticatedGroupsGroupIdIndexRoute,
|
||||
AuthenticatedGroupsGroupIdAttendeesAttendeeIdRoute:
|
||||
AuthenticatedGroupsGroupIdAttendeesAttendeeIdRoute,
|
||||
}
|
||||
|
||||
const AuthenticatedRouteWithChildren = AuthenticatedRoute._addFileChildren(
|
||||
|
||||
Reference in New Issue
Block a user