diff --git a/confiture-web-app/src/components/audit/AuditGenerationCriterium.vue b/confiture-web-app/src/components/audit/AuditGenerationCriterium.vue index f4d40356..b6149172 100644 --- a/confiture-web-app/src/components/audit/AuditGenerationCriterium.vue +++ b/confiture-web-app/src/components/audit/AuditGenerationCriterium.vue @@ -119,7 +119,7 @@ function toggleTransverseComment() { const notify = useNotifications(); -const errorMessage: Ref = ref(null); +const errorMessage: Ref = ref(null); const criteriumNotCompliantAccordion = ref>(); diff --git a/confiture-web-app/src/components/audit/CriteriumNotCompliantAccordion.vue b/confiture-web-app/src/components/audit/CriteriumNotCompliantAccordion.vue index c544da97..55cb7320 100644 --- a/confiture-web-app/src/components/audit/CriteriumNotCompliantAccordion.vue +++ b/confiture-web-app/src/components/audit/CriteriumNotCompliantAccordion.vue @@ -14,7 +14,7 @@ import MarkdownHelpButton from "./MarkdownHelpButton.vue"; export interface Props { id: string; comment: string | null; - errorMessage?: FileErrorMessage | null; + errorMessage?: FileErrorMessage | string | null; exampleImages: AuditFile[]; quickWin?: boolean; userImpact: CriterionResultUserImpact | null; diff --git a/confiture-web-app/src/components/audit/NotesModal.vue b/confiture-web-app/src/components/audit/NotesModal.vue index 4042504c..fcd0c0e6 100644 --- a/confiture-web-app/src/components/audit/NotesModal.vue +++ b/confiture-web-app/src/components/audit/NotesModal.vue @@ -28,7 +28,7 @@ defineExpose({ hide: () => modal.value?.hide() }); -const errorMessage: Ref = ref(null); +const errorMessage: Ref = ref(null); const fileUpload = ref>(); const auditStore = useAuditStore(); diff --git a/confiture-web-app/src/components/ui/FileUpload.vue b/confiture-web-app/src/components/ui/FileUpload.vue index 2d80e179..05895812 100644 --- a/confiture-web-app/src/components/ui/FileUpload.vue +++ b/confiture-web-app/src/components/ui/FileUpload.vue @@ -10,7 +10,7 @@ import { formatBytes, getUploadUrl } from "../../utils"; export interface Props { acceptedFormats?: Array; auditFiles: AuditFile[]; - errorMessage?: FileErrorMessage | null; + errorMessage?: FileErrorMessage | string | null; maxFileSize?: string; multiple?: boolean; readonly?: boolean; diff --git a/confiture-web-app/src/utils.ts b/confiture-web-app/src/utils.ts index 489943ec..868a3804 100644 --- a/confiture-web-app/src/utils.ts +++ b/confiture-web-app/src/utils.ts @@ -245,7 +245,7 @@ export async function handleFileUploadError( error: Error ): Promise { if (error instanceof HTTPError) { - let errorType: FileErrorMessage | null = null; + let errorType: FileErrorMessage; if (error.response.status === 413) { errorType = FileErrorMessage.UPLOAD_SIZE; }