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AAAgB,YAAA,iBAFUhB,CAGZ,CAHA,CAAYA,GAAU","names":["HttpCreelsService","_HttpCreelsService","constructor","httpClient","backendConfiguration","this","getAll","get","getEndpoint","pipe","rxjsMap","creelsJSON","map","creelJSON","OverviewListCreel","fromJSON","delete","id","getById","save","item","post","toJSON","response","update","put","isIdentifierAvailable","name","params","HttpParams","set","CheckName","getAllWithNumberOfCreelPositionsAndNumberOfDents","numberOfCreelPositions","numberOfDentsForFabric","getActiveCreelForMachine","getActiveCreelMappingForMachine","creelId","machineId","creelMap","getPossibleCreelsForMachine","getConflicts","getAggregatorEndpoint","conflictsJSON","conflictJSON","Conflict","getListOfCustomSettings","hasAlreadyAdjustedCustomSettings","alreadyAdjustedCustomSettings","saveCustomSettings","chosenSettings","getNameGenerationProperties","generateName","i0","i1","i2","factory","ɵfac","Floorplan","dimensionsInPx","machines","_dimensionsInPx","_machines","addMachine","machine","push","HttpMachineOverviewService","_HttpMachineOverviewService","getMachineOverviewEndpoint","result","updateMachinePosition","coordinatesInPx","x","Math","round","y","newPositionObject","addMachineToFloorplan","getFloorplan","OverviewMachine","heightInPx","widthInPx","getMessages","start","count","filter","messages","message","Message","saveMachineFiles","files","deleteMachineFiles","options","headers","body","getRemoteAccessUrl","getRootGroup","machineGroupJSON","OverviewMachineGroup","OverviewListProductionOrderWeaving","status","weaveProduct","plannedLength","dateCreated","dueDate","actualStartDate","actualEndDate","_id","_name","_status","_weaveProduct","_machine","_plannedLength","_dateCreated","_dueDate","_actualStartDate","_actualEndDate","value","overviewListWeaveProductionOrderJSON","OverviewListWeaveProduct","OverviewListWeavingMachine","Date","canDuplicate","getReasonForPreventingDuplicate","HttpProductionOrdersWeavingService","_HttpProductionOrdersWeavingService","getProductionOrderEndpoint","weaveProductionOrdersJSON","weaveProductionOrderJSON","productionOrderWeavingJSON","ProductionOrderWeaving","saveAndPlan","runId","updateAndPlan","checkCompatibilityWithMachine","productionOrderLiteId","SignalrProductionOrderLiteService","_SignalrProductionOrderLiteService","signalrHubConnectionFactoryService","productionOrderLiteStatusChangeSubject","Subject","getProductionOrdersLiteStatusChanges","getSignalrHubEvents","getProcessingHubEndPoint","SignalrProductionOrderService","_SignalrProductionOrderService","getProductionOrdersStatusChanges","getProductionOrderCreated","ctx_r1","cellHeightInPx","creelPositionNumber_r1","creelPosition_r3","getUniqueItems","CreelPreviewTableComponent_div_5_div_3_ng_container_3_vdw_ellipsis_label_2_Template","coloredYarnSetWithStartDent_r6","coloredYarnSet","overviewListYarnSet","creelPositions","creelPositionIndex_r5","position","CreelPreviewTableComponent_div_5_div_3_ng_container_2_Template","CreelPreviewTableComponent_div_5_div_3_ng_container_3_Template","CreelPreviewTableComponent_div_5_div_3_span_4_Template","isCreelPositionDifferentFromTheoreticalCreel","index_r7","isOfPreviewTypeColor","CreelPreviewTableComponent_div_5_div_3_Template","overviewListColorSet","trackByCreelPosition","CreelPreviewTableComponent","_CreelPreviewTableComponent","BaseCreelTableComponent","_","creelPosition","ngOnChanges","getCellHeight","mappedColoredYarnSetsWithStartDent","getColoredYarnSetsWithStartDent","getCreelPositions","size","getSizeOfCreelPositions","Array","keys","index","previewMap","PreviewMap","ACTIVE","some","currentPositionOnMachine","max","coloredYarnSetsWithStartDent","previewType","PreviewType","COLOR","getMaximumAmountOfColorsInColoredYarnSet","getMaximumAmountOfYarnSetsInColoredYarnSet","colorLineHeightInPx","cellPaddingInPx","length","AssertionUtils","isNullOrUndefined","THEORETICAL","coloredYarnSetWithStartDent","reverseColoredYarnSetWithStartDentCreelPositions","_this$creelMap","_this$creelMap$index","getOriginalMappingForCurrentPositionOnMachine","getMappedColoredYarnSetWithStartDent","t","selectors","inputs","features","decls","vars","consts","template","rf","ctx","CreelPreviewTableComponent_div_4_Template","CreelPreviewTableComponent_div_5_Template"],"ignoreList":[],"sourceRoot":"webpack:///","sources":["./apps/texconnect/src/app/infrastructure/http/creel/http-creels.service.ts","./apps/texconnect/src/app/domain/machine/floorplan.ts","./apps/texconnect/src/app/infrastructure/http/machine-overview/http-machine-overview.service.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-order-lite/overview/overview-list-production-order-weaving.ts","./apps/texconnect/src/app/infrastructure/http/production-order-weaving/http-production-orders-weaving.service.ts","./apps/texconnect/src/app/infrastructure/signalr/production-order-lite/signalr-production-order-lite.service.ts","./apps/texconnect/src/app/infrastructure/signalr/production-order/signalr-production-order.service.ts","./apps/texconnect/src/app/presentation/components/creel-tables/creel-preview-table/creel-preview-table.component.html","./apps/texconnect/src/app/presentation/components/creel-tables/creel-preview-table/creel-preview-table.component.ts","./apps/texconnect/src/app/presentation/components/creel-tables/preview-map.ts"],"sourcesContent":["import {HttpClient, HttpParams} from '@angular/common/http';\nimport {Injectable} from '@angular/core';\nimport {BackendConfiguration} from '@application/configuration/backend-configuration';\nimport {PropertyValue} from '@domain/property-value';\nimport {CreelMap} from '@domain/textile-data/creel/creel-map';\nimport {Creels} from '@infrastructure/http/creel/creels';\nimport {OverviewListCreel} from '@presentation/pages/textile-data/creel/overview/overview-list-creel';\nimport {CheckName, Conflict} from '@vdw/angular-component-library';\nimport {map} from 'lodash-es';\nimport {Observable} from 'rxjs';\nimport {map as rxjsMap} from 'rxjs/operators';\n\n@Injectable()\nexport class HttpCreelsService implements Creels {\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 getAll(): Observable {\n return this.httpClient.get(`${this.backendConfiguration.getEndpoint()}creels`).pipe(rxjsMap((creelsJSON: any) => map(creelsJSON, (creelJSON: any) => OverviewListCreel.fromJSON(creelJSON))));\n }\n\n public delete(id: number): Observable {\n return this.httpClient.delete(`${this.backendConfiguration.getEndpoint()}creels/${id}`);\n }\n\n public getById(id: number): Observable {\n return this.httpClient.get(`${this.backendConfiguration.getEndpoint()}creels/${id}`).pipe(rxjsMap((creelJSON: any) => OverviewListCreel.fromJSON(creelJSON)));\n }\n\n public save(item: OverviewListCreel): Observable {\n return this.httpClient.post(`${this.backendConfiguration.getEndpoint()}creels`, item.toJSON()).pipe(rxjsMap((response: {id: number}) => response.id));\n }\n\n public update(item: OverviewListCreel): Observable {\n return this.httpClient.put(`${this.backendConfiguration.getEndpoint()}creels/${item.id}`, item.toJSON());\n }\n\n public isIdentifierAvailable(name: string): Observable {\n const params = new HttpParams().set('name', name);\n\n return this.httpClient.get(`${this.backendConfiguration.getEndpoint(2)}creels/check-name`, {params}).pipe(rxjsMap((response: any) => CheckName.fromJSON(response)));\n }\n\n public getAllWithNumberOfCreelPositionsAndNumberOfDents(numberOfCreelPositions: number, numberOfDentsForFabric: number): Observable {\n return this.httpClient\n .get(`${this.backendConfiguration.getEndpoint()}creels?creel-positions=${numberOfCreelPositions}&dents-fabric=${numberOfDentsForFabric}`)\n .pipe(rxjsMap((creelsJSON: any) => map(creelsJSON, (creelJSON: any) => OverviewListCreel.fromJSON(creelJSON))));\n }\n\n public getActiveCreelForMachine(id: number): Observable {\n return this.httpClient.get(`${this.backendConfiguration.getEndpoint()}creels/machine/${id}/active`).pipe(rxjsMap((creelJSON: any) => OverviewListCreel.fromJSON(creelJSON)));\n }\n\n public getActiveCreelMappingForMachine(creelId: number, machineId: number): Observable {\n return this.httpClient.get(`${this.backendConfiguration.getEndpoint()}creels/${creelId}/machine/${machineId}/active`).pipe(rxjsMap((creelMap: CreelMap[]) => creelMap));\n }\n\n public getPossibleCreelsForMachine(id: number): Observable {\n return this.httpClient\n .get(`${this.backendConfiguration.getEndpoint()}creels/machine/${id}/possible`)\n .pipe(rxjsMap((creelsJSON: any) => map(creelsJSON, (creelJSON: any) => OverviewListCreel.fromJSON(creelJSON))));\n }\n\n public getConflicts(id: number): Observable {\n return this.httpClient\n .get(`${this.backendConfiguration.getAggregatorEndpoint()}creels/${id}/conflicts`)\n .pipe(rxjsMap((conflictsJSON: any) => map(conflictsJSON, (conflictJSON: any) => Conflict.fromJSON(conflictJSON))));\n }\n\n public getListOfCustomSettings(): Observable {\n return this.httpClient.get(`${this.backendConfiguration.getEndpoint()}creels/custom-settings`);\n }\n\n public hasAlreadyAdjustedCustomSettings(): Observable {\n return this.httpClient.get(`${this.backendConfiguration.getEndpoint()}creels/custom-settings/already-adjusted`).pipe(\n rxjsMap((response: {alreadyAdjustedCustomSettings: boolean}) => {\n return response.alreadyAdjustedCustomSettings;\n })\n );\n }\n\n public saveCustomSettings(chosenSettings: PropertyValue[]): Observable {\n return this.httpClient.put(`${this.backendConfiguration.getEndpoint()}creels/custom-settings`, chosenSettings);\n }\n\n public getNameGenerationProperties(): Observable {\n return this.httpClient.get(`${this.backendConfiguration.getEndpoint()}creels/custom-settings/name-generation-properties`);\n }\n\n public generateName(item: OverviewListCreel): Observable {\n return this.httpClient.post(`${this.backendConfiguration.getEndpoint()}creels/custom-settings/generate-name`, item.toJSON());\n }\n}\n","import {DimensionsInPx} from '@domain/dimensions-in-px';\nimport {OverviewMachine} from '@presentation/pages/machine-overview/overview-machine';\n\nexport class Floorplan {\n private _machines: OverviewMachine[];\n private _dimensionsInPx: DimensionsInPx;\n\n public constructor(dimensionsInPx: DimensionsInPx, machines: OverviewMachine[]) {\n this._dimensionsInPx = dimensionsInPx;\n this._machines = machines;\n }\n\n public get dimensionsInPx(): DimensionsInPx {\n return this._dimensionsInPx;\n }\n\n public set dimensionsInPx(dimensionsInPx: DimensionsInPx) {\n this._dimensionsInPx = dimensionsInPx;\n }\n\n public get machines(): OverviewMachine[] {\n return this._machines;\n }\n\n public set machines(machines: OverviewMachine[]) {\n this._machines = machines;\n }\n\n public addMachine(machine: OverviewMachine): void {\n this._machines.push(machine);\n }\n}\n","import {HttpClient} from '@angular/common/http';\nimport {Injectable} from '@angular/core';\nimport {BackendConfiguration} from '@application/configuration/backend-configuration';\nimport {Floorplan} from '@domain/machine/floorplan';\nimport {MachineFile} from '@domain/machine/machine-file';\nimport {PropertyValue} from '@domain/property-value';\nimport {OverviewMachine} from '@presentation/pages/machine-overview/overview-machine';\nimport {OverviewMachineGroup} from '@presentation/pages/machine-overview/overview-machine-group';\nimport {MachineOverviewMessageFilter} from '@presentation/pages/machine-overview/sidebar/machine-overview-message-filter';\nimport {Message} from '@vdw/angular-component-library';\nimport {map} from 'lodash-es';\nimport {Observable} from 'rxjs';\nimport {map as rxjsMap} from 'rxjs/operators';\nimport {MachineOverview} from './machine-overview';\n\n@Injectable()\nexport class HttpMachineOverviewService implements MachineOverview {\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 getListOfCustomSettings(): Observable {\n return this.httpClient.get(`${this.backendConfiguration.getMachineOverviewEndpoint()}machineoverview/custom-settings`).pipe(\n rxjsMap((result: PropertyValue[]) => {\n return result;\n })\n );\n }\n\n public saveCustomSettings(chosenSettings: PropertyValue[]): Observable {\n return this.httpClient.put(`${this.backendConfiguration.getMachineOverviewEndpoint()}machineoverview/custom-settings`, chosenSettings);\n }\n\n public updateMachinePosition(machine: OverviewMachine): Observable {\n machine.coordinatesInPx.x = Math.round(machine.coordinatesInPx.x);\n machine.coordinatesInPx.y = Math.round(machine.coordinatesInPx.y);\n const newPositionObject = {\n machineId: machine.id,\n coordinatesInPx: machine.coordinatesInPx\n };\n return this.httpClient.put(`${this.backendConfiguration.getMachineOverviewEndpoint()}machineoverview/floorplan/machineposition`, newPositionObject);\n }\n\n public addMachineToFloorplan(machine: OverviewMachine): Observable {\n machine.coordinatesInPx.x = Math.round(machine.coordinatesInPx.x);\n machine.coordinatesInPx.y = Math.round(machine.coordinatesInPx.y);\n const newPositionObject = {\n machineId: machine.id,\n coordinatesInPx: machine.coordinatesInPx\n };\n return this.httpClient.post(`${this.backendConfiguration.getMachineOverviewEndpoint()}machineoverview/floorplan/machine`, newPositionObject);\n }\n\n public getFloorplan(): Observable {\n return this.httpClient.get(`${this.backendConfiguration.getMachineOverviewEndpoint()}machineoverview/floorplan`).pipe(\n rxjsMap((result: {machines}) => {\n const machines = map(result.machines, (machine: any) => {\n return OverviewMachine.fromJSON(machine);\n });\n\n return new Floorplan({heightInPx: null, widthInPx: null}, machines);\n })\n );\n }\n\n public hasAlreadyAdjustedCustomSettings(): Observable {\n return this.httpClient.get(`${this.backendConfiguration.getMachineOverviewEndpoint()}machineoverview/custom-settings/already-adjusted`).pipe(\n rxjsMap((result: {alreadyAdjustedCustomSettings}) => {\n return result.alreadyAdjustedCustomSettings;\n })\n );\n }\n\n public getMessages(start: number, count: number, filter: MachineOverviewMessageFilter): Observable {\n return this.httpClient.post(`${this.backendConfiguration.getMachineOverviewEndpoint()}machineoverview/messages?count=${count}&start=${start}`, filter).pipe(\n rxjsMap((messages: any[]) => {\n return map(messages, (message: any) => Message.fromJSON(message));\n })\n );\n }\n\n public saveMachineFiles(machineId: number, files: MachineFile[]): Observable {\n return this.httpClient.post(`${this.backendConfiguration.getMachineOverviewEndpoint()}machinefiles/machine/${machineId}`, files);\n }\n\n public deleteMachineFiles(machineId: number, files: MachineFile[]): Observable {\n const options = {\n headers: {},\n body: map(files, 'name')\n };\n\n return this.httpClient.delete(`${this.backendConfiguration.getMachineOverviewEndpoint()}machinefiles/machine/${machineId}`, options);\n }\n\n public getRemoteAccessUrl(machineId: number): Observable {\n return this.httpClient.get(`${this.backendConfiguration.getMachineOverviewEndpoint()}machineoverview/${machineId}/remote-access-url`);\n }\n\n public getRootGroup(): Observable {\n return this.httpClient\n .get(`${this.backendConfiguration.getMachineOverviewEndpoint()}machineoverview/machine-groups`)\n .pipe(rxjsMap((machineGroupJSON: any) => OverviewMachineGroup.fromJSON(machineGroupJSON)));\n }\n}\n","import {ProductionScheduleStatus} from '@domain/production-schedule/production-schedule-status.enum';\nimport {OverviewListWeaveProduct} from '@presentation/pages/textile-data/weave-product/overview/overview-list-weave-product';\nimport {OverviewListWeavingMachine} from './overview-list-weaving-machine';\n\nexport class OverviewListProductionOrderWeaving {\n private _id: number;\n private _name: string;\n private _status: ProductionScheduleStatus;\n private _weaveProduct: OverviewListWeaveProduct;\n private _machine: OverviewListWeavingMachine;\n private _plannedLength: number;\n private _dateCreated: Date;\n private _dueDate: Date;\n private _actualStartDate: Date;\n private _actualEndDate: Date;\n\n public constructor(\n id: number,\n name: string,\n status: ProductionScheduleStatus,\n weaveProduct: OverviewListWeaveProduct,\n machine: OverviewListWeavingMachine,\n plannedLength: number,\n dateCreated: Date,\n dueDate: Date,\n actualStartDate: Date,\n actualEndDate: Date\n ) {\n this._id = id;\n this._name = name;\n this._status = status;\n this._weaveProduct = weaveProduct;\n this._machine = machine;\n this._plannedLength = plannedLength;\n this._dateCreated = dateCreated;\n this._dueDate = dueDate;\n this._actualStartDate = actualStartDate;\n this._actualEndDate = actualEndDate;\n }\n\n public get id(): number {\n return this._id;\n }\n\n public get name(): string {\n return this._name;\n }\n\n public get status(): ProductionScheduleStatus {\n return this._status;\n }\n\n public set status(value: ProductionScheduleStatus) {\n this._status = value;\n }\n\n public get weaveProduct(): OverviewListWeaveProduct {\n return this._weaveProduct;\n }\n\n public get machine(): {id: number; name: string} {\n return this._machine;\n }\n\n public get plannedLength(): number {\n return this._plannedLength;\n }\n\n public get dateCreated(): Date {\n return this._dateCreated;\n }\n\n public get dueDate(): Date {\n return this._dueDate;\n }\n\n public get actualStartDate(): Date {\n return this._actualStartDate;\n }\n\n public get actualEndDate(): Date {\n return this._actualEndDate;\n }\n\n public static fromJSON(overviewListWeaveProductionOrderJSON: any): OverviewListProductionOrderWeaving {\n return new OverviewListProductionOrderWeaving(\n overviewListWeaveProductionOrderJSON.id,\n overviewListWeaveProductionOrderJSON.name,\n overviewListWeaveProductionOrderJSON.status,\n OverviewListWeaveProduct.fromJSON(overviewListWeaveProductionOrderJSON.weaveProduct),\n overviewListWeaveProductionOrderJSON.machine ? OverviewListWeavingMachine.fromJSON(overviewListWeaveProductionOrderJSON.machine) : null,\n overviewListWeaveProductionOrderJSON.plannedLength,\n new Date(overviewListWeaveProductionOrderJSON.dateCreated),\n overviewListWeaveProductionOrderJSON.dueDate ? new Date(overviewListWeaveProductionOrderJSON.dueDate) : null,\n overviewListWeaveProductionOrderJSON.actualStartDate ? new Date(overviewListWeaveProductionOrderJSON.actualStartDate) : null,\n overviewListWeaveProductionOrderJSON.actualEndDate ? new Date(overviewListWeaveProductionOrderJSON.actualEndDate) : null\n );\n }\n\n public canDuplicate(): boolean {\n return true;\n }\n\n public getReasonForPreventingDuplicate(): string {\n return '';\n }\n}\n","import {HttpClient} from '@angular/common/http';\nimport {Injectable} from '@angular/core';\nimport {BackendConfiguration} from '@application/configuration/backend-configuration';\nimport {ProductionOrderWeaving} from '@domain/production-order-lite/production-order-weaving/production-order-weaving';\nimport {PropertyValue} from '@domain/property-value';\nimport {OverviewListProductionOrderWeaving} from '@presentation/pages/texfab/production-order-lite/overview/overview-list-production-order-weaving';\nimport {Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\nimport {ProductionOrdersWeaving} from './production-orders-weaving';\n\n@Injectable()\nexport class HttpProductionOrdersWeavingService implements ProductionOrdersWeaving {\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 getAll(): Observable {\n return this.httpClient\n .get(`${this.backendConfiguration.getProductionOrderEndpoint()}production-orders/weaving`)\n .pipe(map((weaveProductionOrdersJSON: any) => weaveProductionOrdersJSON.map((weaveProductionOrderJSON: any) => OverviewListProductionOrderWeaving.fromJSON(weaveProductionOrderJSON))));\n }\n\n public getById(id: number): Observable {\n return this.httpClient\n .get(`${this.backendConfiguration.getProductionOrderEndpoint()}production-orders/weaving/${id}`)\n .pipe(map((productionOrderWeavingJSON: any) => ProductionOrderWeaving.fromJSON(productionOrderWeavingJSON)));\n }\n\n public save(item: ProductionOrderWeaving): Observable {\n return this.httpClient.post(`${this.backendConfiguration.getProductionOrderEndpoint()}production-orders/weaving`, item.toJSON()).pipe(map((response: {id: number}) => response.id));\n }\n\n public saveAndPlan(item: ProductionOrderWeaving, runId: number): Observable {\n return this.httpClient\n .post(`${this.backendConfiguration.getAggregatorEndpoint()}productionorders/lite/save-and-plan`, {...item.toJSON(), runId})\n .pipe(map((response: {id: number}) => response.id));\n }\n\n public update(item: ProductionOrderWeaving): Observable {\n return this.httpClient.put(`${this.backendConfiguration.getProductionOrderEndpoint()}production-orders/weaving/${item.id}`, item.toJSON());\n }\n\n public updateAndPlan(item: ProductionOrderWeaving, runId: number): Observable {\n return this.httpClient.put(`${this.backendConfiguration.getAggregatorEndpoint()}productionorders/lite/${item.id}/save-and-plan`, {...item.toJSON(), runId});\n }\n\n public delete(id: number): Observable {\n return this.httpClient.delete(`${this.backendConfiguration.getProductionOrderEndpoint()}production-orders/weaving/${id}`);\n }\n\n public checkCompatibilityWithMachine(productionOrderLiteId: number, machineId: number): Observable {\n return this.httpClient.get(`${this.backendConfiguration.getAggregatorEndpoint()}productionorders/lite/${productionOrderLiteId}/is-compatible-machine/${machineId}`);\n }\n\n public getListOfCustomSettings(): Observable {\n return this.httpClient.get(`${this.backendConfiguration.getProductionOrderEndpoint()}production-orders/weaving/custom-settings`);\n }\n\n public hasAlreadyAdjustedCustomSettings(): Observable {\n return this.httpClient\n .get(`${this.backendConfiguration.getProductionOrderEndpoint()}production-orders/weaving/custom-settings/already-adjusted`)\n .pipe(map((response: {alreadyAdjustedCustomSettings: boolean}) => response.alreadyAdjustedCustomSettings));\n }\n\n public saveCustomSettings(chosenSettings: PropertyValue[]): Observable {\n return this.httpClient.put(`${this.backendConfiguration.getProductionOrderEndpoint()}production-orders/weaving/custom-settings`, chosenSettings);\n }\n\n public getNameGenerationProperties(): Observable {\n return this.httpClient.get(`${this.backendConfiguration.getProductionOrderEndpoint()}production-orders/weaving/custom-settings/name-generation-properties`);\n }\n\n public generateName(item: ProductionOrderWeaving): Observable {\n return this.httpClient.post(`${this.backendConfiguration.getProductionOrderEndpoint()}production-orders/weaving/custom-settings/generate-name`, item.toJSON());\n }\n}\n","import {Injectable} from '@angular/core';\nimport {BackendConfiguration} from '@application/configuration/backend-configuration';\nimport {SignalrHubConnectionFactoryService} from '@vdw/angular-component-library';\nimport {Observable, Subject} from 'rxjs';\nimport {ProductionOrderLiteStatusChange} from './production-order-lite-status-change';\nimport {RealtimeProductionOrderLite} from './realtime-production-order-lite';\n\n@Injectable()\nexport class SignalrProductionOrderLiteService implements RealtimeProductionOrderLite {\n private readonly productionOrderLiteStatusChangeSubject = new Subject();\n\n public constructor(\n private readonly backendConfiguration: BackendConfiguration,\n private readonly signalrHubConnectionFactoryService: SignalrHubConnectionFactoryService\n ) {}\n\n public getProductionOrdersLiteStatusChanges(): Observable {\n return this.signalrHubConnectionFactoryService.getSignalrHubEvents(\n `${this.backendConfiguration.getProcessingHubEndPoint()}processing`,\n 'OnProductionOrderLiteStatusChanged'\n );\n }\n}\n","import {Injectable} from '@angular/core';\nimport {BackendConfiguration} from '@application/configuration/backend-configuration';\nimport {ProductionOrderCreated} from '@infrastructure/signalr/production-order/production-order-created';\nimport {SignalrHubConnectionFactoryService} from '@vdw/angular-component-library';\nimport {Observable} from 'rxjs';\nimport {ProductionOrderStatusChange} from './production-order-status-change';\nimport {RealtimeProductionOrder} from './realtime-production-order';\n\n@Injectable()\nexport class SignalrProductionOrderService implements RealtimeProductionOrder {\n public constructor(\n private readonly backendConfiguration: BackendConfiguration,\n private readonly signalrHubConnectionFactoryService: SignalrHubConnectionFactoryService\n ) {}\n\n public getProductionOrdersStatusChanges(): Observable {\n return this.signalrHubConnectionFactoryService.getSignalrHubEvents(\n `${this.backendConfiguration.getProcessingHubEndPoint()}processing`,\n 'OnProductionOrderStatusChanged'\n );\n }\n\n public getProductionOrderCreated(): Observable {\n return this.signalrHubConnectionFactoryService.getSignalrHubEvents(`${this.backendConfiguration.getProcessingHubEndPoint()}processing`, 'OnProductionOrderCreated');\n }\n}\n","
\n
\n
\n
\n
\n {{ creelPositionNumber }}\n
\n
\n
\n
\n

\n
\n \n
\n \n \n \n\n \n
\n \n \n
\n
\n \n {{ '(' + creelPosition.position + ')' }}\n \n
\n
\n
\n \n\n","import {ChangeDetectionStrategy, Component, Input, OnChanges} from '@angular/core';\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 {OverviewListCreelPosition} from '@domain/textile-data/creel/overview-list-creel-position';\nimport {BaseCreelTableComponent} from '@presentation/components/creel-tables/base-creel-table/base-creel-table.component';\nimport {PreviewType} from '@presentation/pages/textile-data/creel/add/preview-type';\nimport {AssertionUtils} from '@vdw/angular-component-library';\nimport {PreviewMap} from '../preview-map';\n\n@Component({\n selector: 'app-creel-preview-table',\n templateUrl: './creel-preview-table.component.html',\n styleUrls: ['../base-creel-table/base-creel-table.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class CreelPreviewTableComponent extends BaseCreelTableComponent implements OnChanges {\n @Input() public coloredYarnSetsWithStartDent: OverviewListColoredYarnSetWithStartDent[];\n @Input() public previewMap: PreviewMap;\n @Input() public creelMap: CreelMap[];\n\n public mappedColoredYarnSetsWithStartDent: OverviewListColoredYarnSetWithStartDent[];\n\n public trackByCreelPosition = (_: number, creelPosition: OverviewListCreelPosition): number => creelPosition.position;\n\n public ngOnChanges(): void {\n this.cellHeightInPx = this.getCellHeight();\n this.mappedColoredYarnSetsWithStartDent = this.getColoredYarnSetsWithStartDent();\n }\n\n public getCreelPositions(): number[] {\n const size = this.getSizeOfCreelPositions();\n return [...Array(size).keys()].map((index: number) => size - index);\n }\n\n public isCreelPositionDifferentFromTheoreticalCreel(index: number, position: number): boolean {\n if (this.previewMap !== PreviewMap.ACTIVE) {\n return false;\n }\n let coloredYarnSetCreelMap = this.creelMap[index];\n return !coloredYarnSetCreelMap.creelPositions.some(\n ({creelPosition, currentPositionOnMachine}: {creelPosition: number; currentPositionOnMachine: number}) => creelPosition === position && creelPosition === currentPositionOnMachine\n );\n }\n\n private getCellHeight(): number {\n const getMaxAmount = this.previewType === PreviewType.COLOR ? this.getMaximumAmountOfColorsInColoredYarnSet : this.getMaximumAmountOfYarnSetsInColoredYarnSet;\n const height = Math.max(1, ...this.coloredYarnSetsWithStartDent.map(getMaxAmount));\n return height * CreelPreviewTableComponent.colorLineHeightInPx + CreelPreviewTableComponent.cellPaddingInPx;\n }\n\n private getSizeOfCreelPositions(): number {\n return this.coloredYarnSetsWithStartDent[0].coloredYarnSet.overviewListColorSet.creelPositions.length;\n }\n\n private getColoredYarnSetsWithStartDent(): OverviewListColoredYarnSetWithStartDent[] {\n if (!AssertionUtils.isNullOrUndefined(this.creelMap)) {\n const getColoredYarnSets =\n this.previewMap === PreviewMap.THEORETICAL\n ? (coloredYarnSetWithStartDent: OverviewListColoredYarnSetWithStartDent): OverviewListColoredYarnSetWithStartDent =>\n this.reverseColoredYarnSetWithStartDentCreelPositions(coloredYarnSetWithStartDent)\n : (coloredYarnSetWithStartDent: OverviewListColoredYarnSetWithStartDent, index: number): OverviewListColoredYarnSetWithStartDent => {\n this.creelMap[index] ??= coloredYarnSetWithStartDent.getOriginalMappingForCurrentPositionOnMachine();\n return this.getMappedColoredYarnSetWithStartDent(coloredYarnSetWithStartDent, this.creelMap[index]);\n };\n\n return this.coloredYarnSetsWithStartDent.map(getColoredYarnSets);\n }\n }\n}\n","export enum PreviewMap {\n ACTIVE,\n THEORETICAL\n}\n"],"x_google_ignoreList":[]}