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ACH0H,EAA2BnJ,GAAKyB,EAAoBzB,GACpDmJ,EAA2B/G,OAASC,IAAyBZ,EAAoBW,OAAM,IACxF,EACD0D,KAAU,IAAM3I,KAAK4I,yBAAyBoD,EAA2BnJ,GAAImJ,EAA2BnD,QAASmD,EAA2BlD,WAAYkD,EAA2BzE,QAAK,EACxL/D,KAAQ,IAAMwI,GAElB,CAEOE,gCAAgC9I,EAAmB+I,EAAmBC,GAC3E,OAAOpM,KAAKiD,WACTqD,KAAK,GAAGtG,KAAKkD,qBAAqBkB,sEAAsEhB,eAAuB+I,aAAqBC,IAAW,MAC/J7I,QAAKC,KAASiC,GAAqBA,GACxC,WAjOW2B,0CAA8BL,MAAAC,MAAAD,MAAAE,KAAA,4BAA9BG,EAA8BF,QAA9BE,EAA8BD,YAA9BC,CAA8B","names":["getColoredYarnSetPaths","productionSchedulePathsOfColoredYarnSets","reedDensityInDentsPerMeter","map","productionSchedulePathsOfColoredYarnSet","coloredYarnSet","productionScheduleColoredYarnSet","result","toJSON","technicalWidthInDents","commercialWidthInMM","convertCommercialUnit","from","unit","Unit","METER","value","convertDentsToWidthInMeter","to","MILLIMETER","InitialPathLabel","constructor","fontSettings","labelHeightInMM","labelHeightInPicks","pathLabelType","placeholderPartsAfter","placeholderPartsBefore","pattern","this","_fontSettings","_labelHeightInMM","_labelHeightInPicks","_pathLabelType","_pathLabelInformationAfter","_pathLabelInformationBefore","_pattern","pathLabelInformationAfter","pathLabelInformationBefore","fromJSON","initialPathLabelJSON","isNil","FontSettings","PathLabelInformationForPart","Pattern","InitialOptionsForProductionOrder","initialRestZones","initialFreeZones","finishing","practicalPickDensityInPicksPerMM","initialPathLabel","initialJute","mappingForCurrentPositionOnMachine","activeMachineQualityId","activeCreelId","_initialRestZones","_initialFreeZones","_finishing","_practicalPickDensityInPicksPerMM","_initialPathLabel","_initialJute","_activeMachineQualityId","_activeCreelId","_mappingForCurrentPositionOnMachine","initialOptionsForMachineAndMachineQualityJSON","_initialOptionsForMac","_initialOptionsForMac2","InitialRestZone","InitialFreeZone","FinishingForProductionSchedule","initialPathLabelSettings","JuteInformation","initialJuteSettings","machineQuality","id","creel","HttpProductionOrdersService","_HttpProductionOrdersService","httpClient","backendConfiguration","getInitialOptionsForMachine","machineId","get","getProductionOrderEndpoint","pipe","rxjsMap","getInitialOptionsForMachineAndMachineQuality","machineQualityId","reedDensity","getCategoriesWithComponentsForProductionOrderLabel","placeholderCategoriesJSON","placeholderCategoryJSON","PlaceholderCategory","getCategoriesWithComponentsForPathLabel","getCategoriesWithComponentsForProductionOrderName","delete","getAll","getAggregatorEndpoint","productionOrdersJSON","productionOrderJSON","OverviewListProductionSchedule","getById","save","item","update","updateProductionOrder","productionScheduleId","factorForConversionFromMillimetersToDents","productionScheduleStatus","put","status","ProductionScheduleStatus","coloredYarnSetPaths","getWeavingOrderXMLForProductionOrder","productionOrderId","responseType","getWeavingOrderXSLTForProductionOrder","getReasonForFailure","response","downloadEpFiles","catchError","error","_error$errorContext","isEqual","errorContext","UnavailableArchiveError","removeMachineFiles","machineFromProductionOrderId","getSlice","gridModel","url","post","productionOrder","getPossibleValues","columnIdentifier","checkCompatibilityWithMachine","completeProductionOrder","schedule","ProductionSchedule","getReadyToQueue","i0","i1","i2","factory","ɵfac","HttpProductionSchedulesService","_HttpProductionSchedulesService","isIdentifierAvailable","name","params","HttpParams","set","productionScheduleNameAvailable","createProductionSchedule","machineSummary","coloredYarnSets","runId","productConfiguration","isSample","canAddJute","hmiVersion","addToPlanboard","preselectionId","getProductionScheduleEndpoint","machine","productionScheduleJSON","decreateProductionOrder","decreatedProductionOrder","switchMap","saveDesignsAndOrderLines","designs","orderLines","of","productionSchedule","updateWithMachineQualityChanged","isMachineQualityChanged","query","getConflicts","conflictsJSON","conflictJSON","Conflict","setProductionSchedulePlan","patch","productionSchedulePlanJSON","verifyProductionSchedule","manualSave","productionSchedulePhase","cancelTemporarySavedChanges","checkVerifyProductionSchedule","type","startDent","coloredYarnSetPathNr","completeAndPlan","completeAndQueue","process","designIds","drawing","orderLineIds","orderLine","getEndpoint","savePreselectionList","orderLinesIds","configurationIds","filter","updatePreselectionList","getDesignsAndOrderLines","designJSON","DrawingType","drawingType","BMP","BmpDrawing","EP","EpDrawing","orderLineJSON","ProductionScheduleOrderLine","getPreselectionListById","orderlinesIds","checkPossibleConflictsWithOrderLines","getDuplicatedProductionOrder","productionscheduleJSON","duplicateProductionOrder","productionOrderToDuplicate","tap","getGeneratedProductionOrderName","qualityId","creelId"],"ignoreList":[],"sourceRoot":"webpack:///","sources":["./apps/texconnect/src/app/infrastructure/http/helper/get-colored-yarn-sets-path.ts","./apps/texconnect/src/app/domain/production-schedule/initial-path-label.ts","./apps/texconnect/src/app/domain/production-schedule/initial-options-for-production-order.ts","./apps/texconnect/src/app/infrastructure/http/production-order/http-production-orders.service.ts","./apps/texconnect/src/app/infrastructure/http/production-schedule/http-production-schedules.service.ts"],"sourcesContent":["import {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {OverviewListColoredYarnSetWithStartDent} from '@domain/textile-data/creel/overview-list-colored-yarn-set-with-start-dent';\nimport {convertCommercialUnit, convertDentsToWidthInMeter, Unit} from '@vdw/angular-component-library';\nimport {map} from 'lodash-es';\n\nexport function getColoredYarnSetPaths(productionSchedulePathsOfColoredYarnSets: ProductionSchedulePathsOfColoredYarnSet[], reedDensityInDentsPerMeter: number): any {\n return map(productionSchedulePathsOfColoredYarnSets, (productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet) => {\n const coloredYarnSet: OverviewListColoredYarnSetWithStartDent = productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet;\n const result: any = productionSchedulePathsOfColoredYarnSet.toJSON();\n\n result.technicalWidthInDents = coloredYarnSet.technicalWidthInDents;\n result.commercialWidthInMM = convertCommercialUnit({\n from: {unit: Unit.METER, value: convertDentsToWidthInMeter(coloredYarnSet.technicalWidthInDents, reedDensityInDentsPerMeter)},\n to: Unit.MILLIMETER\n });\n\n return result;\n });\n}\n","import {Pattern} from '@domain/pattern';\nimport {FontSettings} from '@domain/textile-data/finishing-and-finishing-template/finishing/font-settings';\nimport {isNil} from 'lodash-es';\nimport {PathLabelInformationForPart} from './path-label-information-for-part';\nimport {PathLabelType} from './path-label-type.enum';\n\nexport class InitialPathLabel {\n private readonly _fontSettings: FontSettings;\n private readonly _labelHeightInMM: number;\n private readonly _labelHeightInPicks: number;\n private readonly _pathLabelType: PathLabelType;\n private readonly _pathLabelInformationAfter: PathLabelInformationForPart;\n private readonly _pathLabelInformationBefore: PathLabelInformationForPart;\n private readonly _pattern: Pattern;\n\n public constructor(\n fontSettings: FontSettings,\n labelHeightInMM: number,\n labelHeightInPicks: number,\n pathLabelType: PathLabelType,\n placeholderPartsAfter: PathLabelInformationForPart,\n placeholderPartsBefore: PathLabelInformationForPart,\n pattern: Pattern\n ) {\n this._fontSettings = fontSettings;\n this._labelHeightInMM = labelHeightInMM;\n this._labelHeightInPicks = labelHeightInPicks;\n this._pathLabelType = pathLabelType;\n this._pathLabelInformationAfter = placeholderPartsAfter;\n this._pathLabelInformationBefore = placeholderPartsBefore;\n this._pattern = pattern;\n }\n\n public get fontSettings(): FontSettings {\n return this._fontSettings;\n }\n\n public get labelHeightInMM(): number {\n return this._labelHeightInMM;\n }\n\n public get labelHeightInPicks(): number {\n return this._labelHeightInPicks;\n }\n\n public get pathLabelType(): PathLabelType {\n return this._pathLabelType;\n }\n\n public get pathLabelInformationAfter(): PathLabelInformationForPart {\n return this._pathLabelInformationAfter;\n }\n\n public get pathLabelInformationBefore(): PathLabelInformationForPart {\n return this._pathLabelInformationBefore;\n }\n\n public get pattern(): Pattern {\n return this._pattern;\n }\n\n public static fromJSON(initialPathLabelJSON: any): InitialPathLabel {\n return !isNil(initialPathLabelJSON)\n ? new InitialPathLabel(\n FontSettings.fromJSON(initialPathLabelJSON),\n initialPathLabelJSON.labelHeightInMM,\n initialPathLabelJSON.labelHeightInPicks,\n initialPathLabelJSON.pathLabelType,\n PathLabelInformationForPart.fromJSON(initialPathLabelJSON.placeholderPartsAfter),\n PathLabelInformationForPart.fromJSON(initialPathLabelJSON.placeholderPartsBefore),\n Pattern.fromJSON(initialPathLabelJSON.pattern)\n )\n : null;\n }\n}\n","import {FinishingForProductionSchedule} from '@domain/production-schedule/finishing-for-production-schedule';\nimport {InitialFreeZone} from '@domain/production-schedule/free-zone/initial-free-zone';\nimport {InitialRestZone} from '@domain/production-schedule/rest-zone/initial-rest-zone';\nimport {CreelMap} from '@domain/textile-data/creel/creel-map';\nimport {InitialPathLabel} from './initial-path-label';\nimport {JuteInformation} from './jute-information';\n\nexport class InitialOptionsForProductionOrder {\n private _initialRestZones: InitialRestZone;\n private _initialFreeZones: InitialFreeZone;\n private _finishing: FinishingForProductionSchedule;\n private _practicalPickDensityInPicksPerMM: number;\n private _initialPathLabel: InitialPathLabel;\n private _initialJute: JuteInformation;\n private _activeMachineQualityId: number;\n private _activeCreelId: number;\n private _mappingForCurrentPositionOnMachine: CreelMap[];\n\n public constructor(\n initialRestZones: InitialRestZone,\n initialFreeZones: InitialFreeZone,\n finishing: FinishingForProductionSchedule,\n practicalPickDensityInPicksPerMM: number,\n initialPathLabel: InitialPathLabel,\n initialJute: JuteInformation,\n mappingForCurrentPositionOnMachine: CreelMap[],\n activeMachineQualityId?: number,\n activeCreelId?: number\n ) {\n this._initialRestZones = initialRestZones;\n this._initialFreeZones = initialFreeZones;\n this._finishing = finishing;\n this._practicalPickDensityInPicksPerMM = practicalPickDensityInPicksPerMM;\n this._initialPathLabel = initialPathLabel;\n this._initialJute = initialJute;\n this._activeMachineQualityId = activeMachineQualityId;\n this._activeCreelId = activeCreelId;\n this._mappingForCurrentPositionOnMachine = mappingForCurrentPositionOnMachine;\n }\n\n public get initialRestZones(): InitialRestZone {\n return this._initialRestZones;\n }\n\n public get initialFreeZones(): InitialFreeZone {\n return this._initialFreeZones;\n }\n\n public get finishing(): FinishingForProductionSchedule {\n return this._finishing;\n }\n\n public get practicalPickDensityInPicksPerMM(): number {\n return this._practicalPickDensityInPicksPerMM;\n }\n\n public get initialPathLabel(): InitialPathLabel {\n return this._initialPathLabel;\n }\n\n public get initialJute(): JuteInformation {\n return this._initialJute;\n }\n\n public get mappingForCurrentPositionOnMachine(): CreelMap[] {\n return this._mappingForCurrentPositionOnMachine;\n }\n\n public get activeMachineQualityId(): number {\n return this._activeMachineQualityId;\n }\n\n public get activeCreelId(): number {\n return this._activeCreelId;\n }\n\n public static fromJSON(initialOptionsForMachineAndMachineQualityJSON: any): InitialOptionsForProductionOrder {\n return new InitialOptionsForProductionOrder(\n InitialRestZone.fromJSON(initialOptionsForMachineAndMachineQualityJSON.initialRestZones),\n InitialFreeZone.fromJSON(initialOptionsForMachineAndMachineQualityJSON.initialFreeZones),\n FinishingForProductionSchedule.fromJSON(initialOptionsForMachineAndMachineQualityJSON.finishing),\n initialOptionsForMachineAndMachineQualityJSON.practicalPickDensityInPicksPerMM,\n InitialPathLabel.fromJSON(initialOptionsForMachineAndMachineQualityJSON.initialPathLabelSettings),\n JuteInformation.fromJSON(initialOptionsForMachineAndMachineQualityJSON.initialJuteSettings),\n initialOptionsForMachineAndMachineQualityJSON.mappingForCurrentPositionOnMachine as CreelMap[],\n initialOptionsForMachineAndMachineQualityJSON.machineQuality?.id,\n initialOptionsForMachineAndMachineQualityJSON.creel?.id\n );\n }\n}\n","import {HttpClient} from '@angular/common/http';\nimport {Injectable} from '@angular/core';\nimport {BackendConfiguration} from '@application/configuration/backend-configuration';\nimport {InitialOptionsForProductionOrder} from '@domain/production-schedule/initial-options-for-production-order';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {ProductionScheduleStatus} from '@domain/production-schedule/production-schedule-status.enum';\nimport {PlaceholderCategory} from '@domain/textile-data/finishing-and-finishing-template/placeholder-category';\nimport {ProductionOrders} from '@infrastructure/http/production-order/production-orders';\nimport {OverviewListProductionSchedule} from '@presentation/pages/texfab/production-schedule/overview/overview-list-production-schedule';\nimport {ReasonForFailureContext} from '@presentation/pages/texfab/production-schedule/overview/reason-for-failure-context';\nimport {GridModel, UnavailableArchiveError, UnhandledBackendError} from '@vdw/angular-component-library';\nimport {isEqual, map} from 'lodash-es';\nimport {Observable} from 'rxjs';\nimport {catchError, map as rxjsMap} from 'rxjs/operators';\nimport {getColoredYarnSetPaths} from '../helper/get-colored-yarn-sets-path';\n\n@Injectable()\nexport class HttpProductionOrdersService implements ProductionOrders {\n private httpClient: HttpClient;\n private backendConfiguration: BackendConfiguration;\n\n public constructor(httpClient: HttpClient, backendConfiguration: BackendConfiguration) {\n this.httpClient = httpClient;\n this.backendConfiguration = backendConfiguration;\n }\n\n public getInitialOptionsForMachine(machineId: number): Observable {\n return this.httpClient\n .get(`${this.backendConfiguration.getProductionOrderEndpoint()}productionorders/initial-options?machine=${machineId}`)\n .pipe(rxjsMap((initialOptionsForMachineAndMachineQualityJSON: any) => InitialOptionsForProductionOrder.fromJSON(initialOptionsForMachineAndMachineQualityJSON)));\n }\n\n public getInitialOptionsForMachineAndMachineQuality(machineId: number, machineQualityId: number, reedDensity: number): Observable {\n return this.httpClient\n .get(`${this.backendConfiguration.getProductionOrderEndpoint()}productionorders/initial-options?machine-quality=${machineQualityId}&machine=${machineId}&reed-density=${reedDensity}`)\n .pipe(rxjsMap((initialOptionsForMachineAndMachineQualityJSON: any) => InitialOptionsForProductionOrder.fromJSON(initialOptionsForMachineAndMachineQualityJSON)));\n }\n\n public getCategoriesWithComponentsForProductionOrderLabel(): Observable {\n return this.httpClient\n .get(`${this.backendConfiguration.getProductionOrderEndpoint()}productionorders/categories-with-components-for-production-order-label`)\n .pipe(rxjsMap((placeholderCategoriesJSON: any) => map(placeholderCategoriesJSON, (placeholderCategoryJSON: any) => PlaceholderCategory.fromJSON(placeholderCategoryJSON))));\n }\n\n public getCategoriesWithComponentsForPathLabel(): Observable {\n return this.httpClient\n .get(`${this.backendConfiguration.getProductionOrderEndpoint()}productionorders/categories-with-components-for-path-label`)\n .pipe(rxjsMap((placeholderCategoriesJSON: any) => map(placeholderCategoriesJSON, (placeholderCategoryJSON: any) => PlaceholderCategory.fromJSON(placeholderCategoryJSON))));\n }\n\n public getCategoriesWithComponentsForProductionOrderName(): Observable {\n return this.httpClient\n .get(`${this.backendConfiguration.getProductionOrderEndpoint()}productionorders/categories-with-components-for-production-order-name`)\n .pipe(rxjsMap((placeholderCategoriesJSON: any) => map(placeholderCategoriesJSON, (placeholderCategoryJSON: any) => PlaceholderCategory.fromJSON(placeholderCategoryJSON))));\n }\n\n public delete(id: number | string): Observable {\n return undefined;\n }\n\n public getAll(): Observable {\n return this.httpClient\n .get(`${this.backendConfiguration.getAggregatorEndpoint()}productionschedules`)\n .pipe(rxjsMap((productionOrdersJSON: any) => map(productionOrdersJSON, (productionOrderJSON: any) => OverviewListProductionSchedule.fromJSON(productionOrderJSON))));\n }\n\n public getById(id: number): Observable {\n return undefined;\n }\n\n public save(item: ProductionSchedule): Observable {\n return undefined;\n }\n\n public update(item: ProductionSchedule): Observable {\n return undefined;\n }\n\n public updateProductionOrder(\n productionScheduleId: string,\n productionSchedulePathsOfColoredYarnSets: ProductionSchedulePathsOfColoredYarnSet[],\n factorForConversionFromMillimetersToDents: number,\n productionScheduleStatus: ProductionScheduleStatus\n ): Observable {\n return this.httpClient.put(`${this.backendConfiguration.getProductionOrderEndpoint()}productionorders/${productionScheduleId}`, {\n status: ProductionScheduleStatus[productionScheduleStatus],\n coloredYarnSetPaths: getColoredYarnSetPaths(productionSchedulePathsOfColoredYarnSets, factorForConversionFromMillimetersToDents)\n });\n }\n\n public getWeavingOrderXMLForProductionOrder(productionOrderId: number): Observable {\n return this.httpClient.get(`${this.backendConfiguration.getProductionOrderEndpoint()}productionorders/${productionOrderId}/weaving-order/xml`, {responseType: 'text'});\n }\n\n public getWeavingOrderXSLTForProductionOrder(productionOrderId: number): Observable {\n return this.httpClient.get(`${this.backendConfiguration.getProductionOrderEndpoint()}productionorders/${productionOrderId}/weaving-order/xslt`, {responseType: 'text'});\n }\n\n public getReasonForFailure(productionOrderId: number): Observable {\n return this.httpClient.get(`${this.backendConfiguration.getProductionOrderEndpoint()}productionorders/${productionOrderId}/failure-reason`).pipe(\n rxjsMap((response: ReasonForFailureContext) => {\n return response;\n })\n );\n }\n\n public downloadEpFiles(productionOrderId: string): Observable {\n return this.httpClient.get(`${this.backendConfiguration.getProductionOrderEndpoint()}productionorders/${productionOrderId}/download-eps`, {responseType: 'arraybuffer'}).pipe(\n catchError((error: UnhandledBackendError) => {\n if (isEqual(error.errorContext?.status, 412)) {\n throw new UnavailableArchiveError();\n } else {\n throw error;\n }\n })\n );\n }\n\n public removeMachineFiles(productionOrderId: string | number, machineFromProductionOrderId: number): Observable {\n return this.httpClient.delete(`${this.backendConfiguration.getAggregatorEndpoint()}productionorders/${productionOrderId}/files-on-machine?machineId=${machineFromProductionOrderId}`);\n }\n\n public getSlice(gridModel: GridModel): Observable {\n const url = `${this.backendConfiguration.getAggregatorEndpoint()}productionschedules/get`;\n\n return this.httpClient.post(url, gridModel.toJSON()).pipe(\n rxjsMap((productionOrdersJSON: any) => {\n return map(productionOrdersJSON, (productionOrder: any) => {\n return OverviewListProductionSchedule.fromJSON(productionOrder);\n });\n })\n );\n }\n\n public getPossibleValues(columnIdentifier: string): Observable {\n return this.httpClient\n .get(`${this.backendConfiguration.getAggregatorEndpoint()}productionschedules/${columnIdentifier}/possible-values`)\n .pipe(rxjsMap((response: string[] | number[]) => response));\n }\n\n public checkCompatibilityWithMachine(productionOrderId: number, machineId: number): Observable {\n return this.httpClient.get(`${this.backendConfiguration.getAggregatorEndpoint()}productionorders/${productionOrderId}/is-compatible-machine/${machineId}`);\n }\n\n public completeProductionOrder(productionOrderId: number | string, schedule: ProductionSchedule | ProductionScheduleStatus): Observable {\n if (schedule instanceof ProductionSchedule) {\n return this.httpClient.put(`${this.backendConfiguration.getProductionOrderEndpoint()}productionorders/${productionOrderId}`, schedule.toJSON(true));\n } else {\n const status = schedule as ProductionScheduleStatus;\n return this.httpClient.put(`${this.backendConfiguration.getProductionOrderEndpoint()}productionorders/${productionOrderId}`, {status});\n }\n }\n\n public getReadyToQueue(productionOrderId: number): Observable {\n return this.httpClient.get(`${this.backendConfiguration.getProductionOrderEndpoint()}productionorders/${productionOrderId}/ready-to-queue`);\n }\n}\n","import {HttpClient, HttpParams} from '@angular/common/http';\nimport {Injectable} from '@angular/core';\nimport {BackendConfiguration} from '@application/configuration/backend-configuration';\nimport {BmpDrawing} from '@domain/production-schedule/bmp-drawing';\nimport {CreelForProductionSchedule} from '@domain/production-schedule/creel-for-production-schedule';\nimport {Drawing} from '@domain/production-schedule/drawing';\nimport {DrawingType} from '@domain/production-schedule/drawing-type.enum';\nimport {EpDrawing} from '@domain/production-schedule/ep-drawing';\nimport {MachineQualityForProductionSchedule} from '@domain/production-schedule/machine-quality-for-production-schedule';\nimport {MachineSummary} from '@domain/production-schedule/machine-summary';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionScheduleOrderLine} from '@domain/production-schedule/production-schedule-order-line';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {ProductionSchedulePhase} from '@domain/production-schedule/production-schedule-phase.enum';\nimport {ProductionScheduleProductConfiguration} from '@domain/production-schedule/production-schedule-product-configuration';\nimport {ProductionScheduleStatus} from '@domain/production-schedule/production-schedule-status.enum';\nimport {CreelMap} from '@domain/textile-data/creel/creel-map';\nimport {OverviewListColoredYarnSetWithStartDent} from '@domain/textile-data/creel/overview-list-colored-yarn-set-with-start-dent';\nimport {ZoneType} from '@domain/zone-type.enum';\nimport {ProductionSchedules} from '@infrastructure/http/production-schedule/production-schedules';\nimport {ParametersForPreselection} from '@presentation/pages/texfab/production-schedule/add/plan/parameters-for-preselection';\nimport {ConflictedOrderLine} from '@presentation/pages/texfab/production-schedule/confirm/conflicted-order-line';\nimport {Conflict, GridModel} from '@vdw/angular-component-library';\nimport {isEqual, map} from 'lodash-es';\nimport {Observable, of} from 'rxjs';\nimport {map as rxjsMap, switchMap, tap} from 'rxjs/operators';\nimport {getColoredYarnSetPaths} from '../helper/get-colored-yarn-sets-path';\n\n@Injectable()\nexport class HttpProductionSchedulesService implements ProductionSchedules {\n private httpClient: HttpClient;\n private backendConfiguration: BackendConfiguration;\n\n public constructor(httpClient: HttpClient, backendConfiguration: BackendConfiguration) {\n this.httpClient = httpClient;\n this.backendConfiguration = backendConfiguration;\n }\n\n public isIdentifierAvailable(name: string): Observable {\n const params = new HttpParams().set('name', name);\n\n return this.httpClient.get(`${this.backendConfiguration.getAggregatorEndpoint()}productionschedules/check-name`, {params}).pipe(\n rxjsMap((response: {productionScheduleNameAvailable: boolean}) => {\n return response.productionScheduleNameAvailable;\n })\n );\n }\n\n public createProductionSchedule(\n machineSummary: MachineSummary,\n machineQuality: MachineQualityForProductionSchedule,\n practicalPickDensityInPicksPerMM: number,\n coloredYarnSets: OverviewListColoredYarnSetWithStartDent[],\n creel: CreelForProductionSchedule,\n runId: number,\n mappingForCurrentPositionOnMachine: CreelMap[],\n productConfiguration: ProductionScheduleProductConfiguration,\n isSample: boolean,\n canAddJute: boolean,\n hmiVersion: string,\n addToPlanboard: boolean,\n preselectionId: number\n ): Observable {\n return this.httpClient\n .post(`${this.backendConfiguration.getProductionScheduleEndpoint(2)}productionschedules/initial-create`, {\n machine: machineSummary.toJSON(),\n machineQuality: machineQuality.toJSON(),\n practicalPickDensityInPicksPerMM,\n coloredYarnSets: map(coloredYarnSets, (productionScheduleColoredYarnSet: OverviewListColoredYarnSetWithStartDent) => productionScheduleColoredYarnSet.toJSON()),\n creel: creel.toJSON(),\n runId,\n mappingForCurrentPositionOnMachine,\n productConfiguration: productConfiguration?.toJSON(),\n isSample,\n canAddJute,\n hmiVersion,\n addToPlanboard,\n preselectionId\n })\n .pipe(rxjsMap((productionScheduleJSON: any) => ProductionSchedule.fromJSON(productionScheduleJSON)));\n }\n\n public decreateProductionOrder(decreatedProductionOrder: ProductionSchedule): Observable {\n return this.httpClient\n .post(`${this.backendConfiguration.getProductionScheduleEndpoint(2)}productionschedules/initial-create`, decreatedProductionOrder.toJSON(true))\n .pipe(switchMap(() => this.saveDesignsAndOrderLines(decreatedProductionOrder.id, decreatedProductionOrder.designs, decreatedProductionOrder.orderLines, decreatedProductionOrder.name)));\n }\n\n public delete(id: number | string): Observable {\n return this.httpClient.delete(`${this.backendConfiguration.getAggregatorEndpoint()}productionschedules/${id}`);\n }\n\n public getAll(): Observable {\n return of([]);\n }\n\n public getById(id: number | string): Observable {\n return this.httpClient\n .get(`${this.backendConfiguration.getAggregatorEndpoint()}productionschedules/${id}`)\n .pipe(rxjsMap((productionScheduleJSON: any) => ProductionSchedule.fromJSON(productionScheduleJSON)));\n }\n\n public save(productionSchedule: ProductionSchedule): Observable {\n return of();\n }\n\n public update(productionSchedule: ProductionSchedule): Observable {\n return of();\n }\n\n public updateWithMachineQualityChanged(productionSchedule: ProductionSchedule, isMachineQualityChanged: boolean = false): Observable {\n const query = isMachineQualityChanged ? '?updatePaths=true' : '';\n\n return this.httpClient.put(\n `${this.backendConfiguration.getProductionScheduleEndpoint()}productionschedules/${productionSchedule.id}${query}`,\n productionSchedule.toJSON(false, isMachineQualityChanged)\n );\n }\n\n public getConflicts(id: number): Observable {\n return this.httpClient.get(`${this.backendConfiguration.getAggregatorEndpoint()}productionschedules/${id}/conflicts`).pipe(\n rxjsMap((conflictsJSON: any) => {\n return map(conflictsJSON, (conflictJSON: any) => {\n return Conflict.fromJSON(conflictJSON);\n });\n })\n );\n }\n\n public setProductionSchedulePlan(\n productionScheduleId: string,\n productionSchedulePathsOfColoredYarnSets: ProductionSchedulePathsOfColoredYarnSet[],\n reedDensityInDentsPerMeter: number\n ): Observable {\n return this.httpClient\n .patch(`${this.backendConfiguration.getProductionScheduleEndpoint()}productionschedules/${productionScheduleId}`, {\n coloredYarnSetPaths: getColoredYarnSetPaths(productionSchedulePathsOfColoredYarnSets, reedDensityInDentsPerMeter)\n })\n .pipe(rxjsMap((productionSchedulePlanJSON: any) => ProductionSchedule.fromJSON(productionSchedulePlanJSON)));\n }\n\n public verifyProductionSchedule(id: string, manualSave: boolean = false, productionSchedulePhase: ProductionSchedulePhase = null): Observable {\n const query = manualSave ? `?manualSave=true&step=${productionSchedulePhase}` : `?manualSave=false&step=${productionSchedulePhase}`;\n\n return this.httpClient\n .get(`${this.backendConfiguration.getAggregatorEndpoint()}productionschedules/${id}/verify${query}`)\n .pipe(rxjsMap((productionSchedulePlanJSON: any) => ProductionSchedule.fromJSON(productionSchedulePlanJSON)));\n }\n\n public cancelTemporarySavedChanges(id: string): Observable {\n return this.httpClient.delete(`${this.backendConfiguration.getProductionOrderEndpoint()}productionschedules/${id}`);\n }\n\n public checkVerifyProductionSchedule(productionScheduleId: string, type: ZoneType, startDent: number, value: number, coloredYarnSetPathNr: number): Observable {\n return this.httpClient\n .post(`${this.backendConfiguration.getProductionScheduleEndpoint()}productionschedules/${productionScheduleId}/verify/check`, {\n type,\n startDent,\n value,\n coloredYarnSetPathNr\n })\n .pipe(rxjsMap((productionSchedulePlanJSON: any) => ProductionSchedule.fromJSON(productionSchedulePlanJSON)));\n }\n\n public completeAndPlan(productionSchedule: ProductionSchedule): Observable {\n return this.httpClient.put(`${this.backendConfiguration.getAggregatorEndpoint()}productionschedules/${productionSchedule.id}/complete-and-plan`, productionSchedule.toJSON(true));\n }\n\n public completeAndQueue(productionSchedule: ProductionSchedule): Observable {\n return this.httpClient.put(`${this.backendConfiguration.getAggregatorEndpoint()}productionschedules/${productionSchedule.id}/complete-and-queue`, productionSchedule.toJSON(true));\n }\n\n public process(productionSchedule: ProductionSchedule): Observable {\n return this.httpClient.put(`${this.backendConfiguration.getAggregatorEndpoint()}productionschedules/${productionSchedule.id}/complete`, productionSchedule.toJSON(true));\n }\n\n public saveDesignsAndOrderLines(id: number | string, designs: Drawing[], orderLines: ProductionScheduleOrderLine[], name: string): Observable {\n const designIds: number[] = designs.map((drawing: Drawing) => drawing.id);\n const orderLineIds: number[] = orderLines.map((orderLine: ProductionScheduleOrderLine) => orderLine.id);\n\n return this.httpClient.post(`${this.backendConfiguration.getEndpoint()}productionschedules/${id}/designs-and-order-lines`, {designIds, orderLineIds, name});\n }\n\n public savePreselectionList(id: number | string, designIds: number[], orderLinesIds: number[], gridModel: GridModel, configurationIds: number[] = []): Observable {\n return this.httpClient\n .post(`${this.backendConfiguration.getProductionOrderEndpoint()}preselections`, {id, designIds, orderLinesIds, configurationIds, filter: gridModel})\n .pipe(rxjsMap((response: any) => response));\n }\n\n public updatePreselectionList(id: number | string, designIds: number[], orderLinesIds: number[], gridModel: GridModel, configurationIds: number[] = []): Observable {\n return this.httpClient.put(`${this.backendConfiguration.getProductionOrderEndpoint()}preselections`, {id, designIds, orderLinesIds, configurationIds, filter: gridModel});\n }\n\n public getDesignsAndOrderLines(id: number | string, status: ProductionScheduleStatus): Observable<{designs: Drawing[]; orderLines: ProductionScheduleOrderLine[]}> {\n return this.httpClient.get(`${this.backendConfiguration.getEndpoint()}productionschedules/${id}/designs-and-order-lines?status=${ProductionScheduleStatus[status]}`).pipe(\n rxjsMap((response: any) => {\n return {\n designs: map(response.designs, (designJSON: any) => {\n let result: Drawing;\n\n if (isEqual(DrawingType[designJSON.drawingType], DrawingType.BMP)) {\n result = BmpDrawing.fromJSON(designJSON);\n } else if (isEqual(DrawingType[designJSON.drawingType], DrawingType.EP)) {\n result = EpDrawing.fromJSON(designJSON);\n }\n\n return result;\n }),\n orderLines: map(response.orderLines, (orderLineJSON: any) => ProductionScheduleOrderLine.fromJSON(orderLineJSON))\n };\n })\n );\n }\n\n public getPreselectionListById(id: number | string): Observable {\n return this.httpClient.get(`${this.backendConfiguration.getProductionOrderEndpoint()}preselections/${id}`).pipe(\n rxjsMap((response: any) => {\n return {\n designIds: response.designIds,\n configurationIds: response.configurationIds,\n orderlinesIds: response.orderlinesIds,\n gridModel: response.filter\n } as ParametersForPreselection;\n })\n );\n }\n\n public checkPossibleConflictsWithOrderLines(id: string): Observable {\n return this.httpClient.get(`${this.backendConfiguration.getAggregatorEndpoint()}productionschedules/${id}/order-lines/amount-check`);\n }\n\n public getDuplicatedProductionOrder(id: number | string): Observable {\n return this.httpClient.get(`${this.backendConfiguration.getAggregatorEndpoint()}productionschedules/${id}/duplicate`).pipe(\n rxjsMap((productionscheduleJSON: any) => {\n return ProductionSchedule.fromJSON(productionscheduleJSON);\n })\n );\n }\n\n public duplicateProductionOrder(productionOrderToDuplicate: ProductionSchedule): Observable {\n return this.httpClient.post(`${this.backendConfiguration.getProductionScheduleEndpoint(2)}productionschedules/initial-create`, productionOrderToDuplicate.toJSON(true)).pipe(\n tap((productionOrderJSON: any) => {\n productionOrderToDuplicate.id = productionOrderJSON.id;\n productionOrderToDuplicate.status = ProductionScheduleStatus[productionOrderJSON.status];\n }),\n switchMap(() => this.saveDesignsAndOrderLines(productionOrderToDuplicate.id, productionOrderToDuplicate.designs, productionOrderToDuplicate.orderLines, productionOrderToDuplicate.name)),\n rxjsMap(() => productionOrderToDuplicate)\n );\n }\n\n public getGeneratedProductionOrderName(machineId: number, qualityId: number, creelId: number): Observable {\n return this.httpClient\n .post(`${this.backendConfiguration.getAggregatorEndpoint()}productionschedules/generate-name?machineId=${machineId}&qualityId=${qualityId}&creelId=${creelId}`, null)\n .pipe(rxjsMap((response: string) => response));\n }\n}\n"],"x_google_ignoreList":[]}