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,OAAOrM,KAAKwM,KACd,CAEA,QAAWH,CAAKA,GACdrM,KAAKwM,MAAQH,CACf,CAEA,aAAWC,GACT,OAAOtM,KAAKyM,UACd,CAEA,aAAWH,CAAUA,GACnBtM,KAAKyM,WAAaH,CACpB,EClCI,MAAOM,EAKXxN,YAAmBwG,EAAa,KAAMyG,EAAe,KAAMQ,EAAwD,IACjH7M,KAAKuM,IAAM3G,EACX5F,KAAKwM,MAAQH,EACbrM,KAAK8M,sBAAwBD,CAC/B,CAEO,eAAOH,CAASK,GACrB,OAAO,IAAIH,EACTG,EAAUnH,GACVmH,EAAUV,QACVd,KAAIwB,EAAUF,qBAAuBvH,GAAwB,IAAI8G,EAA8B9G,EAAe0H,iBAAkB1H,EAAe2H,mBAAoB3H,EAAegH,YAEtL,CAEA,MAAW1G,GACT,OAAO5F,KAAKuM,GACd,CAEA,MAAW3G,CAAGA,GACZ5F,KAAKuM,IAAM3G,CACb,CAEA,QAAWyG,GACT,OAAOrM,KAAKwM,KACd,CAEA,QAAWH,CAAKA,GACdrM,KAAKwM,MAAQH,CACf,CAEA,wBAAWQ,GACT,OAAO7M,KAAK8M,qBACd,CAEA,wBAAWD,CAAqBA,GAC9B7M,KAAK8M,sBAAwBD,CAC/B","names":["SelectCreelComponent","_SelectCreelComponent","BaseComponent","constructor","creelsService","data","dialogRef","translate","gridOptionsBuilderFactoryService","colDefBuilderFactory","navigationHelperService","_data$selectedCreels","_data$rowSelection","_data$allowEmptySelec","super","this","allowEmptySelection","selectedCreels","creels","rowSelection","AgGridRowSelection","SINGLE","numberOfCreelPositions","numberOfDentsForFabric","machineId","title","gridOptionsForListOfCreels","listOfGridOptions","ngOnInit","setGridOptionsForListOfCreels","AssertionUtils","isNullOrUndefined","getAllWithNumberOfCreelPositionsAndNumberOfDents","getPossibleCreelsForMachine","pipe","takeUntil","unSubscribeOnViewDestroy","subscribe","ngAfterViewInit","_this$creelsGrid","listOfGridApis","creelsGrid","api","selectCreels","close","cloneDeep","getSelectedRows","canSelectCreels","_this$creels","_this$creelsGrid2","length","isMultiRowSelectionAllowed","MULTIPLE","navigateToAddCreel","_this$numberOfCreelPo","_this$numberOfDentsFo","dialogComponent","equipmentId","fixedAmountOfCreelPositions","navigateToNextRouteWithPartialState","RouteUtils","paths","texStyle","creel","addCreel","absolutePath","getBuilder","getColumnDefsForListOfCreels","GridIdentifier","SELECT_CREEL","withGetRowHeight","params","getRowHeight","withRowSelection","withOnRowDoubleClicked","event","node","setSelected","withOnRowDataUpdated","setSelectedCreels","withLoadingOverlay","scale","withNoRowsOverlay","getNoRowsOverlayTitleParameters","hideDescription","withOnFirstDataRendered","withRememberStateForNavigationHelper","build","withField","withHeaderName","withComparator","StringUtils","stringComparator","withValueGetter","getNumberOfCreelPositionsForCreel","getColoredYarnSetsName","withCellRenderer","GridCreelPreviewComponent","withSortable","withoutFilter","coloredYarnSetsWithStartDent","coloredYarnSet","overviewListColorSet","creelPositions","gridApi","forEachNode","find","id","getRowHeightForCreelPreview","parameters","titleKey","titleParam","numberOfDents","object","instant","objects","count","toLowerCase","i0","CREELS","MAT_DIALOG_DATA","i1","i2","i3","selectors","viewQuery","rf","ctx","_r1","SelectMachineQualityComponent","_SelectMachineQualityComponent","machineQualities","l10nIntlService","weaveStructureColumnPipe","_data$selectedQualiti","listOfCustomSettings","BehaviorSubject","machineQualityTranslationKey","selectedMachineQualities","selectedQualities","listOfMachineQualities","filterItems","gridOptionsForListOfMachineQualities","setGridOptionsForListOfMachineQualities","filter","propertyValues","isEmpty","getMachineQualities","_this$machineQualitie","machineQualitiesGrid","canSelectMachineQualities","_this$machineQualitie2","selectMachineQualities","showOnlyLatestVersionChanged","change","navigateToAddQuality","machineQuality","addMachineQuality","getColumnDefsForListOfMachineQualities","SELECT_MACHINE_QUALITY","withOnRowSelected","updateSelectedMachineQualities","withOnGridReady","getListOfCustomSettings","next","row","isSelected","selectSelectedMachineQualities","getValueForWeaveStructureCell","withRightAlignment","buildAgGridCellTextWithUnit","getValue","Unit","DENTS_PER_MILLIMETER","withTooltipValueGetter","buildAgGridCellTooltipWithUnit","value","PICKS_PER_MILLIMETER","WEFTS_PER_MILLIMETER","hasNumberOfCreelPositions","isNil","defaultUnit","customSettingsUnitPropertyName","customSettingsUnitProperty","propertyValue","propertyName","customSettingsUnit","AgGridUtils","buildAgGridCellTextWithUnitConversion","buildAgGridCellTooltipWithUnitConversion","toLower","transform","showOnlyLatestVersion","request","getAll","getPossibleMachineQualitiesForMachine","rxjsMap","carpetWeaveQualities","map","carpetWeaveQuality","OverviewListMachineQuality","fromCarpetWeaveQuality","isMachineQualitySelected","some","currentSelectedMachineQuality","push","selectedMachineQuality","MACHINE_QUALITIES","i4","i5","$event","OverviewMachineColoredYarnSet","name","startDent","_id","_name","_startDent","fromJSON","coloredYarnSetJSON","OverviewMachineCreel","creelColoredYarnSets","_creelColoredYarnSets","creelJSON","coloredYarnSetId","coloredYarnSetName"],"ignoreList":[],"sourceRoot":"webpack:///","sources":["./apps/texconnect/src/app/presentation/components/select-creel/select-creel.component.ts","./apps/texconnect/src/app/presentation/components/select-creel/select-creel.component.html","./apps/texconnect/src/app/presentation/components/select-machine-quality/select-machine-quality.component.ts","./apps/texconnect/src/app/presentation/components/select-machine-quality/select-machine-quality.component.html","./apps/texconnect/src/app/presentation/pages/machine-overview/overview-machine-colored-yarn-set.ts","./apps/texconnect/src/app/presentation/pages/machine-overview/overview-machine-creel.ts"],"sourcesContent":["import {AfterViewInit, Component, Inject, OnInit, ViewChild} from '@angular/core';\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\nimport {GridIdentifier} from '@application/grids/grid-identifier.enum';\nimport {NavigationHelperService} from '@application/helper/navigation-helper/navigation-helper.service';\nimport {RouteUtils} from '@application/helper/routing/route-utils';\nimport {StringUtils} from '@application/helper/string-utils';\nimport {CREELS, Creels} from '@infrastructure/http/creel/creels';\nimport {NavigationMachineOverviewData} from '@presentation/pages/machine-overview/navigation-machine-overview-data.interface';\nimport {NavigationCreelData} from '@presentation/pages/textile-data/creel/add/navigation-creel-data.interface';\nimport {GridCreelPreviewComponent} from '@presentation/pages/textile-data/creel/overview/grid-creel-preview/grid-creel-preview.component';\nimport {OverviewListCreel} from '@presentation/pages/textile-data/creel/overview/overview-list-creel';\nimport {\n AgGridRowSelection,\n AssertionUtils,\n BaseComponent,\n ColDefBuilderFactoryService,\n DialogComponentData,\n GridOptionsBuilderFactoryService,\n NoDataOverlayComponentParams,\n SelectGridDialog,\n TranslateService\n} from '@vdw/angular-component-library';\nimport {AgGridAngular} from 'ag-grid-angular';\nimport {ColDef, FirstDataRenderedEvent, GridApi, GridOptions, RowDataUpdatedEvent, RowDoubleClickedEvent, RowHeightParams, RowNode, ValueGetterParams} from 'ag-grid-community';\nimport {cloneDeep} from 'lodash-es';\nimport {Observable} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\nimport {getRowHeightForCreelPreview} from './get-row-height-for-creel-preview/get-row-height-for-creel-preview';\n\n@Component({\n selector: 'app-select-creel',\n templateUrl: './select-creel.component.html',\n styleUrls: ['./select-creel.component.scss']\n})\nexport class SelectCreelComponent extends BaseComponent implements OnInit, AfterViewInit, SelectGridDialog {\n @ViewChild('creelsGrid') public creelsGrid: AgGridAngular;\n public listOfGridOptions: GridOptions[];\n public listOfGridApis: GridApi[];\n public creels: OverviewListCreel[];\n public title: string;\n private selectedCreels: OverviewListCreel[];\n private rowSelection: AgGridRowSelection;\n private numberOfCreelPositions: number;\n private numberOfDentsForFabric: number;\n private machineId: number;\n private allowEmptySelection = true;\n\n public constructor(\n @Inject(CREELS) private readonly creelsService: Creels,\n @Inject(MAT_DIALOG_DATA) public data: any,\n private readonly dialogRef: MatDialogRef,\n private readonly translate: TranslateService,\n private readonly gridOptionsBuilderFactoryService: GridOptionsBuilderFactoryService,\n private readonly colDefBuilderFactory: ColDefBuilderFactoryService,\n private readonly navigationHelperService: NavigationHelperService>\n ) {\n super();\n this.selectedCreels = data.selectedCreels ?? [];\n this.creels = data.creels;\n this.rowSelection = data.rowSelection ?? AgGridRowSelection.SINGLE;\n this.numberOfCreelPositions = data.numberOfCreelPositions;\n this.numberOfDentsForFabric = data.numberOfDentsForFabric;\n this.machineId = data.machineId;\n this.title = data.title;\n this.allowEmptySelection = data.allowEmptySelection ?? this.allowEmptySelection;\n }\n\n public get gridOptionsForListOfCreels(): GridOptions {\n return this.listOfGridOptions[0];\n }\n\n public ngOnInit(): void {\n this.setGridOptionsForListOfCreels();\n\n if (AssertionUtils.isNullOrUndefined(this.creels)) {\n const request: Observable = !AssertionUtils.isNullOrUndefined(this.machineId)\n ? this.creelsService.getPossibleCreelsForMachine(this.machineId)\n : this.creelsService.getAllWithNumberOfCreelPositionsAndNumberOfDents(this.numberOfCreelPositions, this.numberOfDentsForFabric);\n\n request.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe((creels: OverviewListCreel[]) => {\n this.creels = creels;\n });\n }\n }\n\n public ngAfterViewInit(): void {\n this.listOfGridApis = [this.creelsGrid?.api];\n }\n\n public selectCreels(): void {\n this.dialogRef.close(cloneDeep(this.creelsGrid.api.getSelectedRows()));\n }\n\n public canSelectCreels(): boolean {\n return this.allowEmptySelection ? this.creels?.length > 0 : this.creelsGrid?.api?.getSelectedRows()?.length > 0;\n }\n\n public isMultiRowSelectionAllowed(): boolean {\n return this.rowSelection === AgGridRowSelection.MULTIPLE;\n }\n\n public navigateToAddCreel(): void {\n const data = {\n dialogComponent: SelectCreelComponent,\n ...(this.machineId\n ? ({equipmentId: this.machineId} as NavigationMachineOverviewData)\n : ({fixedAmountOfCreelPositions: this.numberOfCreelPositions ?? null, numberOfDentsForFabric: this.numberOfDentsForFabric ?? null} as NavigationCreelData))\n };\n this.navigationHelperService.navigateToNextRouteWithPartialState(data, RouteUtils.paths.texStyle.creel.addCreel.absolutePath);\n }\n\n private setGridOptionsForListOfCreels(): void {\n this.listOfGridOptions = [\n this.gridOptionsBuilderFactoryService\n .getBuilder(this.getColumnDefsForListOfCreels(), GridIdentifier.SELECT_CREEL)\n .withGetRowHeight((params: RowHeightParams) => this.getRowHeight(params))\n .withRowSelection(this.isMultiRowSelectionAllowed())\n .withOnRowDoubleClicked((event: RowDoubleClickedEvent) => {\n if (!this.isMultiRowSelectionAllowed()) {\n event.node.setSelected(true);\n this.selectCreels();\n }\n })\n .withOnRowDataUpdated(({api}: RowDataUpdatedEvent) => this.setSelectedCreels(api))\n .withLoadingOverlay({\n scale: 0.7\n })\n .withNoRowsOverlay({\n scale: 0.7,\n ...this.getNoRowsOverlayTitleParameters(),\n hideDescription: true\n })\n .withOnFirstDataRendered(({api}: FirstDataRenderedEvent) => {\n this.setSelectedCreels(api);\n })\n .withRememberStateForNavigationHelper()\n .build()\n ];\n }\n\n private getColumnDefsForListOfCreels(): ColDef[] {\n return [\n this.colDefBuilderFactory.getBuilder().withField('name', true).withHeaderName('GENERAL.NAME').withComparator(StringUtils.stringComparator).build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withValueGetter((params: ValueGetterParams) => `${this.getNumberOfCreelPositionsForCreel(params.data)}`, true)\n .withHeaderName('MACHINE.DETAILS.NR_CREEL_POSITIONS')\n .build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withValueGetter((params: ValueGetterParams) => params.data.getColoredYarnSetsName(), true)\n .withHeaderName('TEXTILE_DATA.COLORED_YARN_SET.COLORED_YARN_SET')\n .build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withValueGetter('data.coloredYarnSetsWithStartDent')\n .withCellRenderer(GridCreelPreviewComponent)\n .withHeaderName('TEXTILE_DATA.COLOR_SET.COLOR_SET')\n .withSortable(false)\n .withoutFilter()\n .build()\n ];\n }\n\n private getNumberOfCreelPositionsForCreel(creel: OverviewListCreel): number {\n return creel.coloredYarnSetsWithStartDent[0].coloredYarnSet.overviewListColorSet.creelPositions.length;\n }\n\n private setSelectedCreels(gridApi: GridApi): void {\n gridApi.forEachNode((node: RowNode) => {\n if (!AssertionUtils.isNullOrUndefined(this.selectedCreels)) {\n node.setSelected(!AssertionUtils.isNullOrUndefined(this.selectedCreels.find((creel: OverviewListCreel) => creel.id === node.data.id)));\n }\n });\n }\n\n private getRowHeight(params: RowHeightParams): number {\n const creel: OverviewListCreel = params.data;\n return getRowHeightForCreelPreview(creel.coloredYarnSetsWithStartDent);\n }\n\n private getNoRowsOverlayTitleParameters(): Partial {\n const parameters: Partial = {titleKey: null, titleParam: null};\n\n if (!AssertionUtils.isNullOrUndefined(this.machineId)) {\n parameters.titleKey = 'PLANNING.ADD_ITEM.MACHINE_NO_OBJECT_SELECTED';\n parameters.titleParam = {object: this.translate.instant('GENERAL.POSSIBLE_OBJECTS', {objects: this.translate.instant('TEXTILE_DATA.CREEL.CREEL', {count: 2})}).toLowerCase()};\n } else {\n parameters.titleKey = 'TEXTILE_DATA.CREEL.OVERLAY.NO_CREELS_OF_POSITIONS_DENTS';\n parameters.titleParam = {numberOfCreelPositions: this.numberOfCreelPositions, numberOfDents: this.numberOfDentsForFabric};\n }\n\n return parameters;\n }\n}\n","
\n \n
\n \n \n
\n \n
\n","import {AfterViewInit, Component, Inject, OnInit, ViewChild} from '@angular/core';\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\nimport {GridIdentifier} from '@application/grids/grid-identifier.enum';\nimport {NavigationHelperService} from '@application/helper/navigation-helper/navigation-helper.service';\nimport {NavigationNumberOfCreelPositionsData} from '@application/helper/navigation-helper/navigation-number-of-creel-positions-data.interface';\nimport {RouteUtils} from '@application/helper/routing/route-utils';\nimport {StringUtils} from '@application/helper/string-utils';\nimport {WeaveStructureColumnPipe} from '@application/pipes/weave-structure-column.pipe';\nimport {PropertyValue} from '@domain/property-value';\nimport {CarpetWeaveQuality} from '@domain/textile-data/machine-quality/carpet-weave-quality';\nimport {GetAllMachineQualitiesParameters, MACHINE_QUALITIES, MachineQualities} from '@infrastructure/http/machine-quality/machine-qualities';\nimport {NavigationMachineOverviewData} from '@presentation/pages/machine-overview/navigation-machine-overview-data.interface';\nimport {OverviewListMachineQuality} from '@presentation/pages/textile-data/machine-quality/overview/overview-list-machine-quality';\nimport {\n AgGridRowSelection,\n AgGridUtils,\n AssertionUtils,\n BaseComponent,\n ColDefBuilderFactoryService,\n GridOptionsBuilderFactoryService,\n NoDataOverlayComponentParams,\n SelectGridDialog,\n TranslateService,\n Unit\n} from '@vdw/angular-component-library';\nimport {AgGridAngular} from 'ag-grid-angular';\nimport {\n ColDef,\n FirstDataRenderedEvent,\n GridApi,\n GridOptions,\n ICellRendererParams,\n ITooltipParams,\n RowDataUpdatedEvent,\n RowDoubleClickedEvent,\n RowNode,\n RowSelectedEvent,\n ValueGetterParams\n} from 'ag-grid-community';\nimport {L10nIntlService} from 'angular-l10n';\nimport {isEmpty, isNil, toLower} from 'lodash-es';\nimport {BehaviorSubject, Observable} from 'rxjs';\nimport {filter, map as rxjsMap, takeUntil} from 'rxjs/operators';\n\n@Component({\n selector: 'app-select-machine-quality',\n templateUrl: './select-machine-quality.component.html',\n styleUrls: ['./select-machine-quality.component.scss']\n})\nexport class SelectMachineQualityComponent extends BaseComponent implements OnInit, AfterViewInit, SelectGridDialog {\n @ViewChild('machineQualitiesGrid') public machineQualitiesGrid: AgGridAngular;\n public listOfGridOptions: GridOptions[];\n public listOfGridApis: GridApi[];\n public listOfMachineQualities: OverviewListMachineQuality[];\n public title: string;\n public selectedMachineQualities: OverviewListMachineQuality[];\n\n private readonly rowSelection = AgGridRowSelection.MULTIPLE;\n private readonly numberOfCreelPositions: number;\n private readonly allowEmptySelection: boolean;\n private readonly listOfCustomSettings = new BehaviorSubject([]);\n private readonly machineId: number;\n private readonly machineQualityTranslationKey = 'TEXTILE_DATA.MACHINE_QUALITY.MACHINE_QUALITY';\n private readonly filterItems: (overview: OverviewListMachineQuality[]) => OverviewListMachineQuality[];\n\n public constructor(\n @Inject(MACHINE_QUALITIES) public readonly machineQualities: MachineQualities,\n @Inject(MAT_DIALOG_DATA) public data: any,\n private readonly dialogRef: MatDialogRef,\n private readonly l10nIntlService: L10nIntlService,\n private readonly translate: TranslateService,\n private readonly gridOptionsBuilderFactoryService: GridOptionsBuilderFactoryService,\n private readonly colDefBuilderFactory: ColDefBuilderFactoryService,\n private readonly weaveStructureColumnPipe: WeaveStructureColumnPipe,\n private readonly navigationHelperService: NavigationHelperService\n ) {\n super();\n this.selectedMachineQualities = data.selectedQualities ?? [];\n this.listOfMachineQualities = data.machineQualities;\n this.rowSelection = data.rowSelection;\n this.numberOfCreelPositions = data.numberOfCreelPositions;\n this.title = data.title;\n this.allowEmptySelection = data.allowEmptySelection;\n this.machineId = data.machineId;\n this.filterItems = data.filterItems;\n }\n\n public get gridOptionsForListOfMachineQualities(): GridOptions {\n return this.listOfGridOptions[0];\n }\n\n public ngOnInit(): void {\n this.setGridOptionsForListOfMachineQualities();\n this.listOfCustomSettings\n .pipe(\n takeUntil(this.unSubscribeOnViewDestroy),\n filter((propertyValues: PropertyValue[]) => !AssertionUtils.isEmpty(propertyValues))\n )\n .subscribe(() => {\n this.getMachineQualities();\n });\n }\n\n public ngAfterViewInit(): void {\n this.listOfGridApis = [this.machineQualitiesGrid?.api];\n }\n\n public canSelectMachineQualities(): boolean {\n let canSelectMachineQualities = false;\n\n if (!isEmpty(this.listOfMachineQualities)) {\n if (this.allowEmptySelection) {\n canSelectMachineQualities = true;\n } else if (!AssertionUtils.isNullOrUndefined(this.machineQualitiesGrid?.api)) {\n canSelectMachineQualities = this.machineQualitiesGrid.api.getSelectedRows().length > 0;\n }\n }\n\n return canSelectMachineQualities;\n }\n\n public selectMachineQualities(): void {\n this.dialogRef.close(this.isMultiRowSelectionAllowed() ? this.selectedMachineQualities : this.machineQualitiesGrid.api.getSelectedRows());\n }\n\n public isMultiRowSelectionAllowed(): boolean {\n return this.rowSelection === AgGridRowSelection.MULTIPLE;\n }\n\n public showOnlyLatestVersionChanged(change: boolean): void {\n this.getMachineQualities(change);\n }\n\n public navigateToAddQuality(): void {\n const data = {\n dialogComponent: SelectMachineQualityComponent,\n ...(this.machineId ? ({equipmentId: this.machineId} as NavigationMachineOverviewData) : ({numberOfCreelPositions: this.numberOfCreelPositions} as NavigationNumberOfCreelPositionsData))\n };\n this.navigationHelperService.navigateToNextRouteWithPartialState(data, RouteUtils.paths.texStyle.machineQuality.addMachineQuality.absolutePath);\n }\n\n private setGridOptionsForListOfMachineQualities(): void {\n this.listOfGridOptions = [\n this.gridOptionsBuilderFactoryService\n .getBuilder(this.getColumnDefsForListOfMachineQualities(), GridIdentifier.SELECT_MACHINE_QUALITY)\n .withRowSelection(this.isMultiRowSelectionAllowed())\n .withOnRowSelected((event: RowSelectedEvent) => this.updateSelectedMachineQualities(event))\n .withOnGridReady(() => {\n this.getListOfCustomSettings().subscribe((listOfCustomSettings: PropertyValue[]) => {\n this.listOfCustomSettings.next(listOfCustomSettings);\n });\n })\n .withOnRowDoubleClicked((row: RowDoubleClickedEvent) => {\n if (!this.isMultiRowSelectionAllowed()) {\n if (!row.node.isSelected()) {\n row.node.setSelected(true);\n }\n this.selectMachineQualities();\n }\n })\n .withOnRowDataUpdated(({api}: RowDataUpdatedEvent) => this.selectSelectedMachineQualities(api))\n .withLoadingOverlay({\n scale: 0.7\n })\n .withNoRowsOverlay({\n scale: 0.7,\n ...this.getNoRowsOverlayTitleParameters(),\n hideDescription: true\n })\n .withRememberStateForNavigationHelper()\n .withOnFirstDataRendered(({api}: FirstDataRenderedEvent) => {\n this.selectSelectedMachineQualities(api);\n })\n .build()\n ];\n }\n\n private getColumnDefsForListOfMachineQualities(): ColDef[] {\n return [\n this.colDefBuilderFactory.getBuilder().withField('technicalNameWithVersion', true).withHeaderName('GENERAL.TECHNICAL_NAME').withComparator(StringUtils.stringComparator).build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withField('weaveStructure')\n .withHeaderName('TEXTILE_DATA.WEAVE_STRUCTURE.WEAVE_STRUCTURE')\n .withComparator(StringUtils.stringComparator)\n .withValueGetter((params: ValueGetterParams) => this.getValueForWeaveStructureCell(params.data), true)\n .build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withField('reedDensityInDentsPerMM')\n .withHeaderName('TEXTILE_DATA.MACHINE_QUALITY.REEDDENSITY')\n .withRightAlignment()\n .withCellRenderer((params: ICellRendererParams) => this.buildAgGridCellTextWithUnit(params.getValue(), Unit.DENTS_PER_MILLIMETER, 'reedDensityUnit'))\n .withTooltipValueGetter((params: ITooltipParams) => this.buildAgGridCellTooltipWithUnit(params.value, Unit.DENTS_PER_MILLIMETER, 'reedDensityUnit'))\n .build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withField('pickDensityInPicksPerMM')\n .withHeaderName('TEXTILE_DATA.MACHINE_QUALITY.PICKDENSITY')\n .withRightAlignment()\n .withCellRenderer((params: ICellRendererParams) => this.buildAgGridCellTextWithUnit(params.getValue(), Unit.PICKS_PER_MILLIMETER, 'pickDensityUnit'))\n .withTooltipValueGetter((params: ITooltipParams) => this.buildAgGridCellTooltipWithUnit(params.value, Unit.PICKS_PER_MILLIMETER, 'pickDensityUnit'))\n .build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withField('practicalPickDensityInPicksPerMM')\n .withHeaderName('TEXTILE_DATA.MACHINE_QUALITY.PRACTICALPICKDENSITY')\n .withRightAlignment()\n .withCellRenderer((params: ICellRendererParams) => this.buildAgGridCellTextWithUnit(params.getValue(), Unit.PICKS_PER_MILLIMETER, 'pickDensityUnit'))\n .withTooltipValueGetter((params: ITooltipParams) => this.buildAgGridCellTooltipWithUnit(params.value, Unit.PICKS_PER_MILLIMETER, 'pickDensityUnit'))\n .build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withField('weftDensityInDentsPerMM')\n .withHeaderName('TEXTILE_DATA.MACHINE_QUALITY.WEFTDENSITY')\n .withRightAlignment()\n .withCellRenderer((params: ICellRendererParams) => this.buildAgGridCellTextWithUnit(params.getValue(), Unit.WEFTS_PER_MILLIMETER, 'weftDensityUnit'))\n .withTooltipValueGetter((params: ITooltipParams) => this.buildAgGridCellTooltipWithUnit(params.value, Unit.WEFTS_PER_MILLIMETER, 'weftDensityUnit'))\n .build()\n ];\n }\n\n private hasNumberOfCreelPositions(): boolean {\n return !isNil(this.numberOfCreelPositions);\n }\n\n private getListOfCustomSettings(): Observable {\n return this.machineQualities.getListOfCustomSettings().pipe(takeUntil(this.unSubscribeOnViewDestroy));\n }\n\n private buildAgGridCellTextWithUnit(value: number, defaultUnit: Unit, customSettingsUnitPropertyName: string): string {\n const customSettingsUnitProperty: PropertyValue = this.listOfCustomSettings.value.find((propertyValue: PropertyValue) => propertyValue.propertyName === customSettingsUnitPropertyName);\n let customSettingsUnit: Unit = defaultUnit;\n if (!isNil(customSettingsUnitProperty)) {\n customSettingsUnit = Unit[customSettingsUnitProperty.propertyValue as string];\n }\n return AgGridUtils.buildAgGridCellTextWithUnitConversion(value, defaultUnit, customSettingsUnit, this.l10nIntlService);\n }\n\n private buildAgGridCellTooltipWithUnit(value: number, defaultUnit: Unit, customSettingsUnitPropertyName: string): string {\n const customSettingsUnitProperty: PropertyValue = this.listOfCustomSettings.value.find((propertyValue: PropertyValue) => propertyValue.propertyName === customSettingsUnitPropertyName);\n let customSettingsUnit: Unit = defaultUnit;\n if (!isNil(customSettingsUnitProperty)) {\n customSettingsUnit = Unit[customSettingsUnitProperty.propertyValue as string];\n }\n return AgGridUtils.buildAgGridCellTooltipWithUnitConversion(value, defaultUnit, customSettingsUnit, this.l10nIntlService);\n }\n\n private getNoRowsOverlayTitleParameters(): Partial {\n const parameters: Partial = {titleKey: null, titleParam: null};\n\n if (!AssertionUtils.isNullOrUndefined(this.machineId)) {\n parameters.titleKey = 'PLANNING.ADD_ITEM.MACHINE_NO_OBJECT_SELECTED';\n parameters.titleParam = {object: toLower(this.translate.instant('GENERAL.POSSIBLE_OBJECTS', {objects: this.translate.instant(this.machineQualityTranslationKey, {count: 2})}))};\n } else if (this.hasNumberOfCreelPositions()) {\n parameters.titleKey = 'TEXTILE_DATA.MACHINE_QUALITY.OVERLAY.NO_MACHINE_QUALITIES_OF_POSITIONS';\n parameters.titleParam = {numberOfCreelPositions: this.numberOfCreelPositions};\n } else {\n parameters.titleParam = this.machineQualityTranslationKey;\n }\n\n return parameters;\n }\n\n private getValueForWeaveStructureCell(machineQuality: OverviewListMachineQuality): string {\n return this.weaveStructureColumnPipe.transform(machineQuality);\n }\n\n private getMachineQualities(showOnlyLatestVersion: boolean = true): void {\n let request: Observable;\n\n if (!AssertionUtils.isNullOrUndefined(this.machineId)) {\n request = this.machineQualities.getPossibleMachineQualitiesForMachine(this.machineId, {showOnlyLatestVersion}).pipe(\n rxjsMap((carpetWeaveQualities: CarpetWeaveQuality[]) => {\n return carpetWeaveQualities.map((carpetWeaveQuality: CarpetWeaveQuality) => {\n return OverviewListMachineQuality.fromCarpetWeaveQuality(carpetWeaveQuality);\n });\n })\n );\n } else if (this.hasNumberOfCreelPositions()) {\n const parameters: Partial = {numberOfCreelPositions: this.numberOfCreelPositions, showOnlyLatestVersion};\n\n request = this.machineQualities.getAll(parameters);\n } else {\n const parameters: Partial = {showOnlyLatestVersion};\n\n request = this.machineQualities.getAll(parameters);\n }\n\n request.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe((machineQualities: OverviewListMachineQuality[]) => {\n this.listOfMachineQualities = this.filterItems ? this.filterItems(machineQualities) : machineQualities;\n });\n }\n\n private selectSelectedMachineQualities(gridApi: GridApi): void {\n gridApi.forEachNode((node: RowNode) => {\n node.setSelected(this.isMachineQualitySelected(node));\n });\n }\n\n private updateSelectedMachineQualities(event: RowSelectedEvent): void {\n if (!event.node.isSelected() && this.listOfMachineQualities.some((machineQuality: OverviewListMachineQuality) => machineQuality.id === event.data.id)) {\n this.selectedMachineQualities = this.selectedMachineQualities.filter((currentSelectedMachineQuality: OverviewListMachineQuality) => currentSelectedMachineQuality?.id !== event.data.id);\n } else {\n if (!this.isMachineQualitySelected(event)) {\n this.selectedMachineQualities.push(event.data);\n }\n }\n if (this.rowSelection === AgGridRowSelection.MULTIPLE) {\n this.selectSelectedMachineQualities(event.api);\n }\n }\n\n private isMachineQualitySelected(data: RowSelectedEvent | RowNode): boolean {\n return this.selectedMachineQualities.some((selectedMachineQuality: OverviewListMachineQuality) => {\n return selectedMachineQuality?.id === data.data.id;\n });\n }\n}\n\ninterface NavigationSelectMachineQualityData {\n dialogComponent: typeof SelectMachineQualityComponent;\n}\n","
\n \n \n \n
\n \n \n
\n \n
\n","export class OverviewMachineColoredYarnSet {\n private _id: number;\n private _name: string;\n private _startDent: number;\n\n public constructor(id: number = null, name: string = null, startDent: number = null) {\n this._id = id;\n this._name = name;\n this._startDent = startDent;\n }\n\n public static fromJSON(coloredYarnSetJSON: any): OverviewMachineColoredYarnSet {\n return new OverviewMachineColoredYarnSet(coloredYarnSetJSON.id, coloredYarnSetJSON.name, coloredYarnSetJSON.startDent);\n }\n\n public get id(): number {\n return this._id;\n }\n\n public set id(id: number) {\n this._id = id;\n }\n\n public get name(): string {\n return this._name;\n }\n\n public set name(name: string) {\n this._name = name;\n }\n\n public get startDent(): number {\n return this._startDent;\n }\n\n public set startDent(startDent: number) {\n this._startDent = startDent;\n }\n}\n","import {map} from 'lodash-es';\nimport {OverviewMachineColoredYarnSet} from './overview-machine-colored-yarn-set';\n\nexport class OverviewMachineCreel {\n public _id: number;\n public _name: string;\n public _creelColoredYarnSets: OverviewMachineColoredYarnSet[];\n\n public constructor(id: number = null, name: string = null, creelColoredYarnSets: OverviewMachineColoredYarnSet[] = []) {\n this._id = id;\n this._name = name;\n this._creelColoredYarnSets = creelColoredYarnSets;\n }\n\n public static fromJSON(creelJSON: any): OverviewMachineCreel {\n return new OverviewMachineCreel(\n creelJSON.id,\n creelJSON.name,\n map(creelJSON.creelColoredYarnSets, (coloredYarnSet: any) => new OverviewMachineColoredYarnSet(coloredYarnSet.coloredYarnSetId, coloredYarnSet.coloredYarnSetName, coloredYarnSet.startDent))\n );\n }\n\n public get id(): number {\n return this._id;\n }\n\n public set id(id: number) {\n this._id = id;\n }\n\n public get name(): string {\n return this._name;\n }\n\n public set name(name: string) {\n this._name = name;\n }\n\n public get creelColoredYarnSets(): OverviewMachineColoredYarnSet[] {\n return this._creelColoredYarnSets;\n }\n\n public set creelColoredYarnSets(creelColoredYarnSets: OverviewMachineColoredYarnSet[]) {\n this._creelColoredYarnSets = creelColoredYarnSets;\n }\n}\n"],"x_google_ignoreList":[]}