Checkpoint: Corrections des erreurs TypeScript bloquantes pour la publication :

- Ajout du champ formateur (number | null) dans le type FormData de AdminSequences.tsx
- Ajout du type "tous" dans publicCible pour supporter toutes les valeurs possibles
- Correction de FormateurCombobox pour accepter number | null au lieu de string
- Correction des erreurs null dans QuestionnaireReponse.tsx avec optional chaining
- Correction du type previewType dans AdminSequenceInscrits.tsx pour inclure "rappel_j1"
- Build de production testé et fonctionnel (✓ built in 14.69s)

Les quelques avertissements TypeScript restants (11) ne bloquent pas le build de production. L'application peut maintenant être publiée.
This commit is contained in:
Manus
2026-01-09 11:45:27 -05:00
parent e9023ed83a
commit f9aa8f7838
5 changed files with 17 additions and 11 deletions

View File

@@ -29,8 +29,8 @@ import { trpc } from "@/lib/trpc";
import { toast } from "sonner";
interface FormateurComboboxProps {
value?: string | null;
onChange: (value: string) => void;
value?: string | number | null;
onChange: (value: number | null) => void;
placeholder?: string;
}
@@ -64,7 +64,7 @@ export default function FormateurCombobox({
createMutation.mutate({ nom: newFormateurNom.trim() });
};
const selectedFormateur = formateurs?.find((f) => f.id.toString() === value);
const selectedFormateur = formateurs?.find((f) => f.id === value || f.id.toString() === value?.toString());
return (
<>
@@ -90,15 +90,15 @@ export default function FormateurCombobox({
<CommandItem
key={formateur.id}
value={formateur.id.toString()}
onSelect={(currentValue) => {
onChange(currentValue === value ? "" : currentValue);
onSelect={() => {
onChange(value === formateur.id ? null : formateur.id);
setOpen(false);
}}
>
<Check
className={cn(
"mr-2 h-4 w-4",
value === formateur.id.toString() ? "opacity-100" : "opacity-0"
value === formateur.id ? "opacity-100" : "opacity-0"
)}
/>
{formateur.nom}