mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-01 07:23:11 +00:00
fix(work-orders): narrow vendor patch type for inline drafts
Vendor assignment patch must not carry table-row status, which blocked tsc because Canceled is not a draft status.
This commit is contained in:
parent
4c9f8b7d81
commit
493104c56d
1 changed files with 7 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import type { WorkOrderTablePatch } from "@/domain/work-orders/types/work-order-table-row";
|
||||
import type { WorkOrderTableRow } from "@/domain/work-orders/types/work-order-table-row";
|
||||
|
||||
export type VendorAssignmentFields = {
|
||||
vendorId: string;
|
||||
|
|
@ -7,7 +7,12 @@ export type VendorAssignmentFields = {
|
|||
techPhone: string;
|
||||
};
|
||||
|
||||
export function toVendorTablePatch(fields: VendorAssignmentFields): WorkOrderTablePatch {
|
||||
export type VendorTablePatch = Pick<
|
||||
WorkOrderTableRow,
|
||||
"vendorId" | "company" | "tech" | "techPhone" | "primaryDispatchStatus"
|
||||
>;
|
||||
|
||||
export function toVendorTablePatch(fields: VendorAssignmentFields): VendorTablePatch {
|
||||
return {
|
||||
vendorId: fields.vendorId,
|
||||
company: fields.company,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue