/** * Job Template, Material Type Links */ export interface IJobTplMaterialTypeLink { id: number; jobTplId: string; consumption: number; materialTypeId: string; materials?: Partial[]; } export interface ISelectJobTplMaterialTypeLink { id: number; } /** * Job Tpl Material Links */ export interface IJobTplMaterialLink { id: number; jobTplId: string; consumption: number; materialId: string; default: boolean; } /** * Job Template */ export enum JobPriceType { fixed = 'fixed', hourly = 'hourly', custom = 'custom', } export interface IJobTplBase { id: string; unit: string; name: string; description: string; jobPriceType: JobPriceType; customScriptName: string; status: string; price: string; sortOrder: number; stageId: number; created: string; updated: string; hoursPerUom: number; } export interface IJobTpl extends IJobTplBase { // output data // materialTypes?: IMaterialTypeLinksOutput; } export interface IJobTplInput extends IJobTplBase { // input data materialTypes?: IMaterialTypeLinksInput; } export interface IMaterialTypeLinksInput { created?: Partial[]; updated?: Partial[]; deleted?: ISelectJobTplMaterialTypeLink[]; } export interface ISelectJobTpl { id: string; } export interface IRemoveJobTpl { id: string; parentId: number; } export interface IJobTplStage { id: number; jobTplId: string; stageId: number; sortOrder: number; } export interface ICopyManyJobTpl { jobTplIds: string[]; stageId: number; sortOrder: number; syncJobTpls?: boolean; }