feat: Mise en place des actions pour chaque state du RF, possibilité

d'éditer le formulaire de création de RF (reste à submit un PUT)
This commit is contained in:
N3WT DE COMPET
2025-05-06 00:53:45 +02:00
parent 4fc061fc25
commit 8fc9478786
11 changed files with 351 additions and 130 deletions

View File

@ -5,7 +5,7 @@ import Table from '@/components/Table';
import { Edit3, Users, Download, Eye, Upload } from 'lucide-react';
import StatusLabel from '@/components/StatusLabel';
import FileUpload from '@/components/FileUpload';
import { FE_PARENTS_EDIT_INSCRIPTION_URL } from '@/utils/Url';
import { FE_PARENTS_EDIT_SUBSCRIPTION_URL } from '@/utils/Url';
import {
fetchChildren,
editRegisterFormWithBinaryFile,
@ -38,14 +38,14 @@ export default function ParentHomePage() {
function handleView(eleveId) {
logger.debug(`View dossier for student id: ${eleveId}`);
router.push(
`${FE_PARENTS_EDIT_INSCRIPTION_URL}?studentId=${eleveId}&enabled=false`
`${FE_PARENTS_EDIT_SUBSCRIPTION_URL}?studentId=${eleveId}&enabled=false`
);
}
function handleEdit(eleveId) {
logger.debug(`Edit dossier for student id: ${eleveId}`);
router.push(
`${FE_PARENTS_EDIT_INSCRIPTION_URL}?studentId=${eleveId}&enabled=true`
`${FE_PARENTS_EDIT_SUBSCRIPTION_URL}?studentId=${eleveId}&enabled=true`
);
}