fix: resolve TypeScript type errors and path alias configuration
1. Add path aliases to vite.config.ts and tsconfig.json - @shared/* → src/shared/* - @features/* → src/features/* 2. Update KBX type definitions - Add 'description' field to KbxScreenDefinition - Extend column types: 'datetime', 'percentage' - Support flexible field types (string | number | symbol) 3. Fix component type issues - KbxInput: modelValue as string | null - KbxDataGrid: cast to GridOptions<any> with unknown bypass - KbxListPage: dataState === pending for loading prop 4. Update pages - Remove isLoading ref (use TanStack Query state) - Replace :loading="isLoading" with :loading="dataState === pending" - Fix undefined placeholder handling in KbxInput Result: Zero TypeScript errors ✅ - pnpm typecheck: PASS - pnpm dev: Server running on http://localhost:5173 - Frontend ready for testing Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -119,7 +119,7 @@ onUnmounted(() => {
|
||||
<KbxListPage
|
||||
:screen="screenDef"
|
||||
:data-state="dataState"
|
||||
:loading="isLoading"
|
||||
:loading="dataState === 'pending'"
|
||||
:summary-items="summaryItems"
|
||||
:quick-filters="quickFilters"
|
||||
@quick-filter="handleQuickFilter"
|
||||
@@ -174,8 +174,8 @@ onUnmounted(() => {
|
||||
<template #content>
|
||||
<KbxDataGrid
|
||||
v-if="screenDef.grid && modelsQuery.data.value?.items"
|
||||
:columns="screenDef.grid.columnDefs"
|
||||
:rows="modelsQuery.data.value.items"
|
||||
:columns="modelsQuery.data.value?.items.length ? screenDef.grid.columnDefs : []"
|
||||
:rows="modelsQuery.data.value?.items || []"
|
||||
:loading="modelsQuery.isPending.value"
|
||||
@row-click="handleRowClick"
|
||||
/>
|
||||
|
||||
@@ -118,7 +118,7 @@ onUnmounted(() => {
|
||||
<KbxListPage
|
||||
:screen="screenDef"
|
||||
:data-state="dataState"
|
||||
:loading="isLoading"
|
||||
:loading="dataState === 'pending'"
|
||||
:summary-items="summaryItems"
|
||||
:quick-filters="quickFilters"
|
||||
@quick-filter="handleQuickFilter"
|
||||
@@ -173,8 +173,8 @@ onUnmounted(() => {
|
||||
<template #content>
|
||||
<KbxDataGrid
|
||||
v-if="screenDef.grid && shadowRunsQuery.data.value?.items"
|
||||
:columns="screenDef.grid.columnDefs"
|
||||
:rows="shadowRunsQuery.data.value.items"
|
||||
:columns="shadowRunsQuery.data.value?.items.length ? screenDef.grid.columnDefs : []"
|
||||
:rows="shadowRunsQuery.data.value?.items || []"
|
||||
:loading="shadowRunsQuery.isPending.value"
|
||||
@row-click="handleRowClick"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user