refactor: remove all any types, add strict GraphQL scalar typing
All checks were successful
Build Docker Image / build (push) Successful in 4m3s
All checks were successful
Build Docker Image / build (push) Successful in 4m3s
- Add strictScalars: true to codegen.ts with proper scalar mappings (Date, Decimal, JSONString, JSON, UUID, BigInt → string/Record) - Replace all ref<any[]> with proper GraphQL-derived types - Add type guards for null filtering in arrays - Fix bugs exposed by typing (locationLatitude vs latitude, etc.) - Add interfaces for external components (MapboxSearchBox) This enables end-to-end type safety from GraphQL schema to frontend.
This commit is contained in:
@@ -14,8 +14,8 @@
|
||||
>
|
||||
<template #cards>
|
||||
<Card
|
||||
v-for="order in filteredItems"
|
||||
:key="order.uuid"
|
||||
v-for="(order, index) in filteredItems"
|
||||
:key="order.uuid ?? index"
|
||||
padding="small"
|
||||
interactive
|
||||
:class="{ 'ring-2 ring-primary': selectedOrderId === order.uuid }"
|
||||
@@ -24,8 +24,8 @@
|
||||
<Stack gap="2">
|
||||
<Stack direction="row" justify="between" align="center">
|
||||
<Text weight="semibold">#{{ order.name }}</Text>
|
||||
<Badge :variant="getStatusVariant(order.status)" size="sm">
|
||||
{{ getStatusText(order.status) }}
|
||||
<Badge :variant="getStatusVariant(order.status || '')" size="sm">
|
||||
{{ getStatusText(order.status || '') }}
|
||||
</Badge>
|
||||
</Stack>
|
||||
<Text tone="muted" size="sm" class="truncate">
|
||||
@@ -74,9 +74,11 @@ await init()
|
||||
const mapRef = ref<{ flyTo: (orderId: string) => void } | null>(null)
|
||||
const selectedOrderId = ref<string | null>(null)
|
||||
|
||||
const selectOrder = (order: any) => {
|
||||
selectedOrderId.value = order.uuid
|
||||
mapRef.value?.flyTo(order.uuid)
|
||||
const selectOrder = (order: { uuid?: string | null }) => {
|
||||
if (order.uuid) {
|
||||
selectedOrderId.value = order.uuid
|
||||
mapRef.value?.flyTo(order.uuid)
|
||||
}
|
||||
}
|
||||
|
||||
const onMapSelectOrder = (uuid: string) => {
|
||||
|
||||
Reference in New Issue
Block a user