From f206924484479909cdc04c323cb76d02f76c545c Mon Sep 17 00:00:00 2001 From: dkecskes Date: Tue, 18 Nov 2025 20:49:56 +0100 Subject: [PATCH] refactor: use lazy fetching --- frontend/app/components/InternshipEditor.vue | 4 +- .../app/components/InternshipStatusEditor.vue | 4 +- .../InternshipStatusHistoryView.vue | 6 +- .../dashboard/admin/companies/edit/[id].vue | 87 +------------------ .../pages/dashboard/admin/companies/index.vue | 7 +- .../dashboard/admin/internships/edit/[id].vue | 15 +++- .../dashboard/admin/internships/index.vue | 7 +- .../dashboard/admin/students/edit/[id].vue | 2 +- .../pages/dashboard/admin/students/index.vue | 10 ++- .../company/internships/edit/[id].vue | 71 ++++++++------- .../dashboard/company/internships/index.vue | 5 +- .../app/pages/dashboard/student/companies.vue | 7 +- .../app/pages/dashboard/student/index.vue | 7 +- .../student/internship/edit/[id].vue | 63 +++++++------- 14 files changed, 122 insertions(+), 173 deletions(-) diff --git a/frontend/app/components/InternshipEditor.vue b/frontend/app/components/InternshipEditor.vue index 1bb4d03..fd13162 100644 --- a/frontend/app/components/InternshipEditor.vue +++ b/frontend/app/components/InternshipEditor.vue @@ -91,7 +91,7 @@ function yearOfStudyValueHandler(item: { title: string, subtitle: string }) { return parseInt(item.title) || 0; } -const { data, error } = await useSanctumFetch('/api/companies/simple'); +const { data, pending, error } = await useLazySanctumFetch('/api/companies/simple');