fix build

This commit is contained in:
2026-04-07 07:07:02 +03:00
parent 11db1e6941
commit 9fd7b61c5a
27 changed files with 74 additions and 64 deletions
@@ -146,14 +146,15 @@ export default function CustomerNotesPage() {
return (
<DashboardPage
header={null}
title="Notes"
toolbar={
<Button size="sm" onClick={() => setDialogOpen(true)}>
<Plus className="size-4" />
Add Note
</Button>
}
headerProps={{
title: "Notes",
actions: (
<Button size="sm" onClick={() => setDialogOpen(true)}>
<Plus className="size-4" />
Add Note
</Button>
),
}}
>
<DataTable
columns={columns}
@@ -16,7 +16,7 @@ export default function CustomerVehiclesPage({ params }: { params: Promise<{ id:
return (
<ResourcePage<VehiclesClient>
toolbar={({ invalidateQuery, selectedItem, closeDialog }) => (
tableHeader={({ invalidateQuery, selectedItem, closeDialog }) => (
<FormDialog title="Vehicle">
{(resourceId) => (
<VehicleForm
@@ -37,7 +37,7 @@ export default function CustomersPage() {
header: ({ column }) => <ColumnHeader column={column} title="Customer" />,
cell: ({ row }) => {
const customerName = row.original.first_name
const isCompany = row.original.customer_type?.name?.toLocaleLowerCase() === "company";
const isCompany = (row.original as any).customer_type?.name?.toLocaleLowerCase() === "company";
const companyName = row.original.company_name
const name = isCompany && companyName ? `${customerName} (${row.original.last_name})` : customerName
@@ -10,7 +10,7 @@ import { useAuthApi } from "@/shared/useApi"
import { confirm } from "@/shared/components/confirm-dialog"
import { Button } from "@/shared/components/ui/button"
import { Card, CardContent } from "@/shared/components/ui/card"
import { JOB_CARD_ROUTES, JobCardResponseData } from "@garage/api"
import { JOB_CARD_ROUTES } from "@garage/api"
import DashboardPage from "@/base/components/layout/dashboard/dashboard-page"
import { useJobCard } from "@/modules/job-cards/job-card-context"
import { CONSTANTS } from "@/config/constants"
@@ -47,7 +47,7 @@ export default function JobCardAttachmentsPage() {
},
})
const handleDelete = async (attachment: JobCardResponseData['attachment_files'][number]) => {
const handleDelete = async (attachment: any) => {
const confirmed = await confirm({
title: "Delete Attachment",
description: `Are you sure you want to delete "${attachment.original_name}"?`,
@@ -112,7 +112,7 @@ export default function JobCardAttachmentsPage() {
) : (
<div className="grid gap-3 sm:grid-cols-2 lg:grid-cols-3">
{attachments?.map((attachment) => {
{(attachments as any[])?.map((attachment) => {
const Icon = getFileIcon(attachment.attachment_path)
return (
<Card key={attachment.id}>
@@ -18,7 +18,7 @@ export default function VehicleEstimatesPage({ params }: { params: Promise<{ id:
return (
<>
<ResourcePage<EstimatesClient>
toolbar={({ invalidateQuery, selectedItem, closeDialog }) => (
tableHeader={({ invalidateQuery, selectedItem, closeDialog }) => (
<FormDialog title="Estimate">
{(resourceId) => (
<EstimateForm
@@ -143,14 +143,15 @@ export default function VehicleMileagePage() {
<DashboardPage
header={null}
toolbar={
<Button onClick={handleCreate}>
<Plus className="size-4" />
Add Mileage
</Button>
}
title='Milage'
headerProps={{
title: 'Mileage',
actions: (
<Button onClick={handleCreate}>
<Plus className="size-4" />
Add Mileage
</Button>
),
}}
>
<Card>
@@ -129,12 +129,15 @@ export default function VehicleOwnersPage() {
}
return (
<DashboardPage title="Owners" header={null} toolbar={
<Button className="w-full" size={'lg'} onClick={() => setLinkDialogOpen(true)}>
<Plus />
Add Owner
</Button>
}>
<DashboardPage headerProps={{
title: "Owners",
actions: (
<Button className="w-full" size={'lg'} onClick={() => setLinkDialogOpen(true)}>
<Plus />
Add Owner
</Button>
),
}}>
<Card>
<CardContent>