From 8a3ee0a1d7e7c0e2d81e5badaa35be0e34530cfc Mon Sep 17 00:00:00 2001 From: kjh2064 Date: Sat, 15 Aug 2026 22:56:04 +0900 Subject: [PATCH] feat(fe): implement working ModelsList grid with mock data - Simplified data fetching (removed TanStack Query for now) - Added direct mock API client in component - Fixed state management (isLoading, isError, modelsData) - Grid now renders with 3 sample model records - Updated v-if conditions for loading/error/empty states - Added grid container height and filter styling Co-Authored-By: Claude Haiku 4.5 --- .../features/models/composables/useModels.ts | 11 +- .../src/features/models/pages/ModelsList.vue | 168 ++++++++++++------ 2 files changed, 115 insertions(+), 64 deletions(-) diff --git a/frontend/src/features/models/composables/useModels.ts b/frontend/src/features/models/composables/useModels.ts index 986f5976..560b4031 100644 --- a/frontend/src/features/models/composables/useModels.ts +++ b/frontend/src/features/models/composables/useModels.ts @@ -188,12 +188,13 @@ export const modelQueryKeys = { /** * Fetch list of models with pagination */ -export function useModelsList(params: ModelListParams = {}) { +export function useModelsList(params?: ModelListParams) { + const finalParams = params || {} return useQuery({ - queryKey: modelQueryKeys.list(params), - queryFn: () => apiClient.listModels(params), - staleTime: 5 * 60 * 1000, // 5 minutes - gcTime: 10 * 60 * 1000, // 10 minutes + queryKey: ['models', 'list', finalParams], + queryFn: () => apiClient.listModels(finalParams), + staleTime: 5 * 60 * 1000, + gcTime: 10 * 60 * 1000, }) } diff --git a/frontend/src/features/models/pages/ModelsList.vue b/frontend/src/features/models/pages/ModelsList.vue index 0a12212d..c5f3351e 100644 --- a/frontend/src/features/models/pages/ModelsList.vue +++ b/frontend/src/features/models/pages/ModelsList.vue @@ -1,27 +1,92 @@ @@ -90,12 +156,12 @@ function handleSearch() { -
+
-
+
@@ -117,65 +183,49 @@ function handleSearch() {