mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-01 10:53:11 +00:00
Vendor assignment patch must not carry table-row status, which blocked tsc because Canceled is not a draft status.
23 lines
598 B
TypeScript
23 lines
598 B
TypeScript
import type { WorkOrderTableRow } from "@/domain/work-orders/types/work-order-table-row";
|
|
|
|
export type VendorAssignmentFields = {
|
|
vendorId: string;
|
|
company: string;
|
|
tech: string;
|
|
techPhone: string;
|
|
};
|
|
|
|
export type VendorTablePatch = Pick<
|
|
WorkOrderTableRow,
|
|
"vendorId" | "company" | "tech" | "techPhone" | "primaryDispatchStatus"
|
|
>;
|
|
|
|
export function toVendorTablePatch(fields: VendorAssignmentFields): VendorTablePatch {
|
|
return {
|
|
vendorId: fields.vendorId,
|
|
company: fields.company,
|
|
tech: fields.tech,
|
|
techPhone: fields.techPhone,
|
|
primaryDispatchStatus: "",
|
|
};
|
|
}
|