2026-08-20 14:29:57 -03:00
|
|
|
import type { WorkOrderTableRow } from "@/domain/work-orders/types/work-order-table-row";
|
2026-08-20 14:17:20 -03:00
|
|
|
|
|
|
|
|
export type VendorAssignmentFields = {
|
|
|
|
|
vendorId: string;
|
|
|
|
|
company: string;
|
|
|
|
|
tech: string;
|
|
|
|
|
techPhone: string;
|
|
|
|
|
};
|
|
|
|
|
|
2026-08-20 14:29:57 -03:00
|
|
|
export type VendorTablePatch = Pick<
|
|
|
|
|
WorkOrderTableRow,
|
|
|
|
|
"vendorId" | "company" | "tech" | "techPhone" | "primaryDispatchStatus"
|
|
|
|
|
>;
|
|
|
|
|
|
|
|
|
|
export function toVendorTablePatch(fields: VendorAssignmentFields): VendorTablePatch {
|
2026-08-20 14:17:20 -03:00
|
|
|
return {
|
|
|
|
|
vendorId: fields.vendorId,
|
|
|
|
|
company: fields.company,
|
|
|
|
|
tech: fields.tech,
|
|
|
|
|
techPhone: fields.techPhone,
|
|
|
|
|
primaryDispatchStatus: "",
|
|
|
|
|
};
|
|
|
|
|
}
|