From a558147f5eaf75475b60a9f0bc05b51072293aaa Mon Sep 17 00:00:00 2001 From: tonya Date: Sun, 27 Oct 2024 22:50:35 +0000 Subject: [PATCH] chore: update pnpm to v9.12.2, merge ItemSummaryPaginationResult with PaginationResult, and handle error in label generator more gracefully --- .github/workflows/partial-frontend.yaml | 2 +- frontend/lib/api/types/non-generated.ts | 6 +----- frontend/pages/reports/label-generator.vue | 4 +++- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/partial-frontend.yaml b/.github/workflows/partial-frontend.yaml index 73ef9d65..c793c62a 100644 --- a/.github/workflows/partial-frontend.yaml +++ b/.github/workflows/partial-frontend.yaml @@ -54,7 +54,7 @@ jobs: - uses: pnpm/action-setup@v3.0.0 with: - version: 6.0.2 + version: 9.12.2 - name: Install dependencies run: pnpm install diff --git a/frontend/lib/api/types/non-generated.ts b/frontend/lib/api/types/non-generated.ts index 6dd5f433..ad6569f8 100644 --- a/frontend/lib/api/types/non-generated.ts +++ b/frontend/lib/api/types/non-generated.ts @@ -17,10 +17,6 @@ export interface PaginationResult { total: number; } -export interface ItemSummaryPaginationResult { - items: T[]; - page: number; - pageSize: number; - total: number; +export interface ItemSummaryPaginationResult extends PaginationResult { totalPrice: number; } diff --git a/frontend/pages/reports/label-generator.vue b/frontend/pages/reports/label-generator.vue index 224c0deb..bf991273 100644 --- a/frontend/pages/reports/label-generator.vue +++ b/frontend/pages/reports/label-generator.vue @@ -200,7 +200,9 @@ const { data, error } = await api.items.getAll(); if (error) { - return [] as unknown as typeof data; + return { + items: [] + } } return data;