Compare commits
No commits in common. "0171daea38a612d67f0dfd34a3f9493a821967c9" and "16fd7dd4239cdf8c32b0a6de841c66bc00ab10e8" have entirely different histories.
0171daea38
...
16fd7dd423
@ -124,7 +124,7 @@ export function CreateInvoiceFromEstimateButton() {
|
||||
</Button>
|
||||
|
||||
<Dialog open={open} onOpenChange={setOpen}>
|
||||
<DialogContent className="sm:max-w-5xl">
|
||||
<DialogContent className="min-w-2xl">
|
||||
<DialogHeader>
|
||||
<DialogTitle>Generate Invoice from Estimate</DialogTitle>
|
||||
</DialogHeader>
|
||||
|
||||
@ -24,7 +24,6 @@ import {
|
||||
import { DEPARTMENT_ROUTES } from "@garage/api"
|
||||
import { FUEL_LEVEL_OPTIONS } from "./job-card.schema"
|
||||
import { toId } from "@/shared/lib/utils"
|
||||
import { DepartmentInlineForm } from "@/modules/services/inline-forms/department-inline-form"
|
||||
|
||||
// ── Schema ──
|
||||
|
||||
@ -47,7 +46,7 @@ const mapLookupOption = (item: any) => ({
|
||||
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 ──
|
||||
|
||||
@ -139,10 +138,11 @@ export function JobCardCheckInDialog({
|
||||
required
|
||||
queryKey={[DEPARTMENT_ROUTES.INDEX]}
|
||||
listFn={() => api.departments.list()}
|
||||
mapOption={(item: any) => ({ value: String(item.id), label: item.name ?? String(item.id) })}
|
||||
createForm={(props) => <DepartmentInlineForm {...props} />}
|
||||
createLabel="Department"
|
||||
mapOption={(op:any)=> ({value: op.id, label: op.name})}
|
||||
{...STORE_OBJECT}
|
||||
getOptionLabel={op=>op.label}
|
||||
getOptionValue={op=>op}
|
||||
|
||||
/>
|
||||
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2">
|
||||
<RhfDateField name="delivery_date" label="Delivery Date" />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user