From d407cd17de86d8fb74bacd7e3be29e455a0ee6e6 Mon Sep 17 00:00:00 2001 From: "bert.hausmans" Date: Wed, 29 Apr 2026 14:11:05 +0200 Subject: [PATCH] fix(app): resolve Bucket B (type safety) lint items MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit WS-3 session 1b-ii Task 3 (audit Bucket B — 34 items: 21 absorbed via ignorePatterns + 14 real fixes; the count of 21 is the actual non-Tier-3 lint-count drop from the .eslintrc edit, slightly above the audit's predicted 20 because additional vendored-Vuexy items beyond the 23 no-explicit-any landed in those paths too). Config: - .eslintrc.cjs: add src/@core/** and src/@layouts/** to ignorePatterns. Vendored Vuexy code, precedent: src/plugins/iconify/*.js. The CLAUDE.md no-any rule remains in force for our own code under src/. Real type-safety fixes: - B.1 ref in our code (3 occurrences): * blank.vue / default.vue: AppLoadingIndicator template ref now typed as InstanceType | null. Picks up the defineExpose'd fallbackHandle / resolveHandle methods. * NavSearchBar.vue:109: useApi(...) → useApi(...) matching the existing searchResult ref type. - B.2 ShiftDetailPanel.vue: moved the Cancel-dialog ref declarations (isCancelDialogOpen, cancellingAssignment) from line 305-307 to line 248 — directly above the onCancel handler that uses them. Resolves all 7 no-use-before-define items in one move. Same-file, no logic change. - B.3 useImpersonationStore.ts:119: renamed inner 'stored' to 'storedSnapshot' to resolve shadowing of the outer 'stored' on line 18. - B.4 useFormSchemas.ts:97-99: renamed local mutationFn parameter 'confirmed_name' to camelCase 'confirmedName'. Wire-format key stays snake_case via destructure-alias: params: confirmedName ? { confirmed_name: confirmedName } : undefined No callers found in apps/app/src — safe rename. Tests + typecheck verified green. Lint baseline: 97 → 62. Co-Authored-By: Claude Opus 4.7 --- apps/app/.eslintrc.cjs | 2 ++ apps/app/src/components/shifts/ShiftDetailPanel.vue | 8 ++++---- apps/app/src/composables/api/useFormSchemas.ts | 4 ++-- apps/app/src/layouts/blank.vue | 4 +++- apps/app/src/layouts/components/NavSearchBar.vue | 2 +- apps/app/src/layouts/default.vue | 3 ++- apps/app/src/stores/useImpersonationStore.ts | 6 +++--- 7 files changed, 17 insertions(+), 12 deletions(-) diff --git a/apps/app/.eslintrc.cjs b/apps/app/.eslintrc.cjs index a3d12025..369d97a1 100644 --- a/apps/app/.eslintrc.cjs +++ b/apps/app/.eslintrc.cjs @@ -40,6 +40,8 @@ module.exports = { '*.d.ts', 'vendor', '*.json', + 'src/@core/**', + 'src/@layouts/**', ], rules: { 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', diff --git a/apps/app/src/components/shifts/ShiftDetailPanel.vue b/apps/app/src/components/shifts/ShiftDetailPanel.vue index 2821c6c4..717fbf78 100644 --- a/apps/app/src/components/shifts/ShiftDetailPanel.vue +++ b/apps/app/src/components/shifts/ShiftDetailPanel.vue @@ -245,6 +245,10 @@ function executeApprove(assignment: ShiftAssignment) { }) } +// Cancel dialog +const isCancelDialogOpen = ref(false) +const cancellingAssignment = ref(null) + function onCancel(assignment: ShiftAssignment) { cancellingAssignment.value = assignment isCancelDialogOpen.value = true @@ -302,10 +306,6 @@ function onRejectExecute() { ) } -// Cancel dialog -const isCancelDialogOpen = ref(false) -const cancellingAssignment = ref(null) - // Bulk approve dialog const isBulkApproveDialogOpen = ref(false) diff --git a/apps/app/src/composables/api/useFormSchemas.ts b/apps/app/src/composables/api/useFormSchemas.ts index 821ba253..56a12383 100644 --- a/apps/app/src/composables/api/useFormSchemas.ts +++ b/apps/app/src/composables/api/useFormSchemas.ts @@ -94,9 +94,9 @@ export function useDeleteFormSchema(orgId: Ref) { const queryClient = useQueryClient() return useMutation({ - mutationFn: async ({ id, confirmed_name }: { id: string; confirmed_name?: string }) => { + mutationFn: async ({ id, confirmedName }: { id: string; confirmedName?: string }) => { await apiClient.delete(`/organisations/${orgId.value}/forms/schemas/${id}`, { - params: confirmed_name ? { confirmed_name } : undefined, + params: confirmedName ? { confirmed_name: confirmedName } : undefined, }) }, onSuccess: () => { diff --git a/apps/app/src/layouts/blank.vue b/apps/app/src/layouts/blank.vue index c813e810..04a649a3 100644 --- a/apps/app/src/layouts/blank.vue +++ b/apps/app/src/layouts/blank.vue @@ -1,4 +1,6 @@