feat(#140): dashboard admin ch.6 — fiche parent, enfants, affiliation

Back: PATCH /parents/:id/fiche, attach/detach enfant, GET /enfants enrichi.
Front: modale parent éditable, onglet Enfants, fiche enfant, UserService.

Couvre doc 28 §6.1–6.2 ; tickets liés #115 #116 #130 #131 #137 #138.
Hors scope: fiche AM (#131), création admin (#129).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-17 00:35:00 +02:00
co-authored by Cursor
parent df776d8200
commit 1dddc67933
20 changed files with 1818 additions and 68 deletions
@@ -83,7 +83,12 @@ export class EnfantsController {
return this.enfantsService.findOne(id, currentUser);
}
@Roles(RoleType.ADMINISTRATEUR, RoleType.SUPER_ADMIN, RoleType.PARENT)
@Roles(
RoleType.PARENT,
RoleType.ADMINISTRATEUR,
RoleType.SUPER_ADMIN,
RoleType.GESTIONNAIRE,
)
@Patch(':id')
update(
@Param('id', new ParseUUIDPipe()) id: string,
@@ -78,10 +78,10 @@ export class EnfantsService {
return this.findOne(child.id, currentUser);
}
// Liste des enfants
// Liste des enfants (admin/gestionnaire)
async findAll(): Promise<Children[]> {
return this.childrenRepository.find({
relations: ['parentLinks'],
relations: ['parentLinks', 'parentLinks.parent', 'parentLinks.parent.user'],
order: { last_name: 'ASC', first_name: 'ASC' },
});
}