fix bugs phase 2 (excel ) , download sample feature

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-05-01 11:04:38 +03:00
co-authored by Copilot
parent e1ef6fa2ea
commit 97364f4734
24 changed files with 597 additions and 85 deletions
@@ -25,6 +25,7 @@ import { Ellipsis, Plus } from "lucide-react"
import type { ColumnDef } from "@tanstack/react-table"
import { JobCardPartForm } from "@/modules/job-cards/job-card-part-form"
import { formatDate } from "@/shared/utils/formatters"
import { JOB_CARD_ROUTES } from "@garage/api"
export default function JobCardPartsPage({
params,
@@ -35,7 +36,7 @@ export default function JobCardPartsPage({
const api = useAuthApi()
const queryClient = useQueryClient()
const router = useRouter()
const queryKey = ["job-card-parts", jobCardId]
const queryKey = [JOB_CARD_ROUTES.GET_PARTS, jobCardId]
const [dialogOpen, setDialogOpen] = useState(false)
const [editItem, setEditItem] = useState<any | null>(null)
@@ -47,7 +48,7 @@ export default function JobCardPartsPage({
const rows = (data as any)?.data ?? []
const invalidate = () => queryClient.invalidateQueries({ queryKey }).then(() => router.refresh())
const invalidate = () => queryClient.invalidateQueries({ queryKey, type: 'all', refetchType: 'all' },).then(() => router.refresh())
async function handleDelete(row: any) {
const confirmed = await confirm({