Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/app/layouts/RootLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const adminWorkspaceRoutes = [
routePaths.adminInternships,
routePaths.adminCandidateFiltering,
routePaths.adminShortlists,
routePaths.adminEligibleStudents,
] as const

function isAdminWorkspacePath(pathname: string) {
Expand Down
8 changes: 7 additions & 1 deletion src/features/eligible-students/hooks/useEligibleStudents.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { keepPreviousData, useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
import { adminDashboardKeys } from '../../admin-dashboard/hooks/adminDashboardQueryKeys'
import { eligibleStudentsApi } from '../api/eligibleStudentsApi'
import type { EligibleStudentQuery, EligibleStudentRequest } from '../types/eligibleStudentTypes'

Expand All @@ -17,7 +18,12 @@ export function useEligibleStudents(query: EligibleStudentQuery) {

export function useEligibleStudentMutations() {
const queryClient = useQueryClient()
const refresh = () => queryClient.invalidateQueries({ queryKey: keys.all })
const refresh = () => {
void queryClient.invalidateQueries({ queryKey: keys.all })
// The Admin Dashboard's "Total Students" / "Registered Students" metrics are derived from the
// eligible-students roster, so they go stale the moment a roster entry is added or removed.
return queryClient.invalidateQueries({ queryKey: adminDashboardKeys.all })
}
return {
create: useMutation({
mutationFn: (values: EligibleStudentRequest) => eligibleStudentsApi.create(values),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function ProfileIdentityCard({
<dd>Level {profile.studentLevel}</dd>
</div>
<div>
<dt>Cohort / Batch</dt>
<dt>Batch</dt>
<dd>{profile.cohortYear ?? 'Not available'}</dd>
</div>
</dl>
Expand Down
17 changes: 17 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -1604,6 +1604,7 @@ body.admin-mobile-drawer-open {
.registered-students-controls,
.registered-students-toolbar-heading {
display: grid;
min-width: 0;
gap: 18px;
}

Expand All @@ -1627,6 +1628,7 @@ body.admin-mobile-drawer-open {
.registered-students-levels,
.pagination-size-control {
display: grid;
min-width: 0;
gap: 8px;
}

Expand Down Expand Up @@ -5109,6 +5111,21 @@ body.dark-mode .s5-records-page {
background: var(--color-card-muted);
}

.s5-cv-always-included-list {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin: 4px 0;
}

.s5-cv-always-included-list span {
padding: 4px 10px;
border: 1px solid var(--color-border);
border-radius: var(--radius-pill, 999px);
background: var(--color-card);
font-size: 0.85rem;
}

.s5-cv-source-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
Expand Down
2 changes: 2 additions & 0 deletions src/styles/skeleton-system.css
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,13 @@

.loading-boundary {
display: grid;
min-width: 0;
}

.loading-boundary__skeleton,
.loading-boundary__content {
grid-area: 1 / 1;
min-width: 0;
}

.loading-boundary__skeleton {
Expand Down
1 change: 1 addition & 0 deletions src/styles/sprint78-wireframe-alignment.css
Original file line number Diff line number Diff line change
Expand Up @@ -1639,6 +1639,7 @@
}

.registered-students-page .registered-students-controls {
min-width: 0;
grid-template-columns: minmax(280px, 1.35fr) minmax(220px, 0.65fr);
}

Expand Down
Loading