From b612c0f873dbcce854aaac8abb808a2599ead595 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Veronika=20Feh=C3=A9rv=C3=ADziov=C3=A1?= <128744051+VeronikaFeherviziova@users.noreply.github.com> Date: Tue, 2 Dec 2025 20:26:14 +0100 Subject: [PATCH] feat: add validation rules for internship filter inputs --- frontend/app/components/InternshipListView.vue | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/frontend/app/components/InternshipListView.vue b/frontend/app/components/InternshipListView.vue index 03bc63c..0360206 100644 --- a/frontend/app/components/InternshipListView.vue +++ b/frontend/app/components/InternshipListView.vue @@ -25,6 +25,11 @@ const totalItems = ref(0); const deleteConfirmDialog = ref(false); const internshipToDelete = ref(null); +const rules = { + minFilterLen: (v: string) => (v.length >= 3) || 'Min. 3 znaky', + minYear: (v: number | null) => (v === null ? true : v >= 1000) || 'Min. 4-ciferné číslo' +}; + const allHeaders = [ { title: "Študent", key: "student.name", sortable: false }, { title: "Firma", key: "company.name", sortable: false }, @@ -99,16 +104,20 @@ async function confirmDeletion(confirm: boolean) { - + - + - + - +