feat(student-portal): student account belongs to the adult in charge
- Inviting a kid with an adult in charge links the account to the adult (a legacy account linked to the kid moves to the adult and is renamed). - `linkedPersonWhere` lets the account reach the kids of a linked adult, so the adult sees and manages all their kids, including ones added later. - /me, link info and access status follow the adult; siblings share state. - Web: greeting uses the account holder, profile lists each kid's group, and the invitation sheet/message address the adult. - DB tests for the adult account flow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -9,7 +9,7 @@ import { WeekClassesList } from './WeekClassesList'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
export function StudentHomeView() {
|
||||
const { student, classes, classesPending, fees } = useStudentApp()
|
||||
const { me, student, classes, classesPending, fees } = useStudentApp()
|
||||
const { t } = useTranslation(['student', 'common'])
|
||||
if (!student) return null
|
||||
|
||||
@@ -20,7 +20,8 @@ export function StudentHomeView() {
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<h1 className="text-2xl font-bold text-primary">{t('home.greeting', { name: firstName(student.fullName) })}</h1>
|
||||
{/* The account holder: the student, or the adult in charge of several kids. */}
|
||||
<h1 className="text-2xl font-bold text-primary">{t('home.greeting', { name: firstName(me?.account.name ?? student.fullName) })}</h1>
|
||||
|
||||
{fees ? <PaymentReviewBanner reports={fees.reports} /> : null}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user