Compare commits

..

No commits in common. "0171daea38a612d67f0dfd34a3f9493a821967c9" and "16fd7dd4239cdf8c32b0a6de841c66bc00ab10e8" have entirely different histories.

2 changed files with 6 additions and 6 deletions

View File

@ -124,7 +124,7 @@ export function CreateInvoiceFromEstimateButton() {
</Button> </Button>
<Dialog open={open} onOpenChange={setOpen}> <Dialog open={open} onOpenChange={setOpen}>
<DialogContent className="sm:max-w-5xl"> <DialogContent className="min-w-2xl">
<DialogHeader> <DialogHeader>
<DialogTitle>Generate Invoice from Estimate</DialogTitle> <DialogTitle>Generate Invoice from Estimate</DialogTitle>
</DialogHeader> </DialogHeader>

View File

@ -24,7 +24,6 @@ import {
import { DEPARTMENT_ROUTES } from "@garage/api" import { DEPARTMENT_ROUTES } from "@garage/api"
import { FUEL_LEVEL_OPTIONS } from "./job-card.schema" import { FUEL_LEVEL_OPTIONS } from "./job-card.schema"
import { toId } from "@/shared/lib/utils" import { toId } from "@/shared/lib/utils"
import { DepartmentInlineForm } from "@/modules/services/inline-forms/department-inline-form"
// ── Schema ── // ── Schema ──
@ -47,7 +46,7 @@ const mapLookupOption = (item: any) => ({
label: item.name, label: item.name,
}) })
const STORE_OBJECT = { getOptionValue: (o: any) => o, getOptionLabel: (o: any) => o.label } as const const STORE_OBJECT = { storeObject: true } as const
// ── Props ── // ── Props ──
@ -139,10 +138,11 @@ export function JobCardCheckInDialog({
required required
queryKey={[DEPARTMENT_ROUTES.INDEX]} queryKey={[DEPARTMENT_ROUTES.INDEX]}
listFn={() => api.departments.list()} listFn={() => api.departments.list()}
mapOption={(item: any) => ({ value: String(item.id), label: item.name ?? String(item.id) })} mapOption={(op:any)=> ({value: op.id, label: op.name})}
createForm={(props) => <DepartmentInlineForm {...props} />}
createLabel="Department"
{...STORE_OBJECT} {...STORE_OBJECT}
getOptionLabel={op=>op.label}
getOptionValue={op=>op}
/> />
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2"> <div className="grid grid-cols-1 gap-4 sm:grid-cols-2">
<RhfDateField name="delivery_date" label="Delivery Date" /> <RhfDateField name="delivery_date" label="Delivery Date" />