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A60B,KAAAI,KAAAD,KAAAM,GAAAC,KAAAC,KAG9CpqJ,GA0BAyqH,GAEA98G,GACA+G,GAAgD,oBAAApgC,KAAAo0K,IAAA,SA/BhD/1B,GAAiD,kBAAAr+I,UAAAC,KAAA20K,oBAAAa,MAAAZ,yBAAA/8J,UAAA49J,MAAAT,MAAAP,8BAAAiB,KAAAr1B,KAAA60B,KAAAS,GAAAC,KAAAC,KAAAC,KAEjDrqJ,GA0BAyqH,GAEA98G,GACA+G,GAAgD,oBAAApgC,KAAAo0K,IAAA,SAlBhDjiG,GAAyC,kBAAAnyE,UAAAu1K,KACzCv6E,GACAvG,GAAkD,2DC1O/C,IAAMuhF,EAA0B,UAAAC,GAAjC,MAAOD,EAHbl2L,cAIoDG,KAAAi2L,oBAAqB,aAD5DF,4CAA0B,4BAA1BA,GAA0B91K,UAAA,iCAAAqkF,SAAA,EAAAC,aAAA,SAAApkF,GAAAC,IAAA,EAAAD,IAA1Bnd,OAAA,uBAAAod,GAAA61K,uBAAAF,CAA0B","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","SignalrProductionOrderService","_SignalrProductionOrderService","signalrHubConnectionFactoryService","getProductionOrdersStatusChanges","getSignalrHubEvents","getProcessingHubEndPoint","getProductionOrderCreated","AddFreeZonePattern","_AddFreeZonePattern","patterns","execute","machineQualityId","imageData","saveFreeZonePattern","PATTERNS","AddJutePattern","_AddJutePattern","colorSetId","saveJutePattern","AddRestZonePattern","_AddRestZonePattern","saveRestZonePattern","ProductionScheduleBuilderPageStateManagerService","_ProductionScheduleBuilderPageStateManagerService","authentication","localStorageService","observableOf","getProductionScheduleBuilderPageStates","find","productionScheduleBuilderPageStates","userEmail","getCurrentEmail","getForNewBuilder","getProductionScheduleNewBuilderPageStates","state","_this$getProductionSc","filter","productionScheduleBuilderPageState","push","localStorageKeyForProductionScheduleBuilderState","updateforNewBuilder","_this$getProductionSc2","localStorageKeyForProductionScheduleNewBuilderState","productionScheduleBuilderPageStatesJSON","AUTHENTICATION","PathLayoutTemplateService","_PathLayoutTemplateService","productionSchedulePlan","checkIfTemplateHasTooMuchWidth","productionSchedule","pathLayoutTemplate","coloredYarnSetPosition","reedDensityInDentsPerMeter","pathWidths","totalWidthOfPathsInDents","pathLayoutTemplatePaths","reduce","totalWidth","pathLayoutTemplatePath","AssertionUtils","isNullOrUndefined","lookupCommercialWidthInPathWidths","widthInMM","convertWidthInMeterToDents","convertCommercialUnit","from","unit","Unit","MILLIMETER","value","to","METER","totalWidthOfPathsWithAddedRestAndFreeZones","addFreeZonesAndRestZonesToTotalWidthOfPathTemplate","coloredYarnSets","productionSchedulePathsOfColoredYarnSets","productionSchedulePathsOfColoredYarnSet","productionScheduleColoredYarnSet","machine","jacquard","isSisal","ColoredYarnSetPosition","BOTTOM","coloredYarnSet","isBottomPosition","technicalWidthInDents","TOP","dentsForFabric","checkIfTemplateHasOverlappingPaths","coloredYarnSetWidthsInDents","NumberUtils","roundAwayFromZero","result","widthInDentsCounter","forEach","pathWidthInMeter","_productionSchedule$i","totalWidthOfPathsInDentsWithAddedInBetweenFreeZones","initialFreeZones","inBetween","useAsMaximum","length","totalWidthOfPathsInDentsWithAddedLeftFreeZones","left","totalWidthOfPathsInDentsWithAddedRightFreeZones","right","initialRestZones","userDefinedRest","PRODUCTION_SCHEDULE_PLAN","providedIn","viewMode_r4","$event","_r3","ctx_r1","onSelectedViewModeChanged","DrawingLibraryListViewComponent_ng_container_2_div_3_mat_option_3_Template","selectedViewMode","viewModes","_r1","updateGrid","toggleSelectedRows","DrawingLibraryListViewComponent_ng_container_2_div_3_Template","statusBar","getSelectedRows","drawingListGridModel","tmp_7_0","drawingsGrid_r5","gridReady","api","initialToggleSelected","isNewBuilder","DrawingLibraryListViewComponent","_DrawingLibraryListViewComponent","BaseComponent","drawings","colDefBuilderFactory","translate","gridOptionsBuilderFactoryService","l10nIntlService","renderer","draggingService","dialogBuilderFactoryService","statusBarService","super","SLICE_SIZE","ROW_HEIGHT_WITH_PREVIEW","ROW_HEIGHT_WITHOUT_PREVIEW","HEADER_HEIGHT_WITH_PREVIEW","HEADER_HEIGHT_WITHOUT_PREVIEW","showSelectedItems","advancedSearchFilters","selectedDrawings","canSelectDrawings","showOnlySelectedDrawings","isProductionSchedule","isExporting","hideMissingDesigns","filterOnDrawingType","isPreSelection","drawingSelected","EventEmitter","exportComplete","advancedSearchFiltersChange","selectedViewModeChanged","exportGridOptions","exportData","ProductionScheduleDrawingViewMode","DESIGNS_LIST","ORDER_LINES","GROUPED_ORDER_LINES","selectedOrderlineIds","floatingFilters","viewMode","_viewMode","resetDrawingsList","ngOnChanges","changes","_this$drawingsGrid","_this$drawingsGrid2","drawingsGrid","setItemBackToSelected","productionScheduleItemsToBeRestored","currentValue","isEqual","previousValue","hideOverlay","refreshServerSide","purge","onRowDataUpdated","exportAllData","ngOnInit","_this$selectedDrawing","instantiateGridOptionsForDrawings","gridModel","setFilterModel","filterModel","emit","onDrawingCanceled","_this$drawingsGrid3","deselectAll","onDrawingDeleted","deletedDrawings","deletedDrawing","lodashRemove","listOfDrawings","drawing","onDrawingUpdated","updatedDrawing","forEachNode","node","data","setData","dialogBuilder","getBuilder","openAlertDialog","titleText","messageText","type","DialogType","INFORMATION","colDef","createColumnsDefinition","exportDrawingsGrid","setGridOption","endRow","getFilterModel","GridModel","fetchExportData","change","savedFilterModel","selectedRows","filterModels","values","selectedRow","createRowIDForDrawing","filterType","getStatusBarData","StatusBarTarget","DRAWING_LIBRARY","takeUntil","unSubscribeOnViewDestroy","subscribe","getAllWithoutImageDataFromGridModel","TargetForListOfDrawingsEnum","cacheBlockSize","exportDataAsCsv","columnKeys","onExportComplete","close","startRow","getServerSideDatasource","getRows","request","sortModel","isEmpty","firstTimeServerSideLoaded","PRODUCTION_ORDER","next","endRowOrderbook","undefined","getRowData","showNoRowsOverlay","success","rowData","rowCount","setSelectedDrawings","error","fail","listOfDrawingConfigurations","ListDrawingConfiguration","productionScheduleItemMultiplier","defaultGridOptionsForDrawings","getDefaultGridOptionsForDrawings","withRowDraggingOutsideGrid","onRowDrag","gridOptionsForDrawings","withSingleClickEdit","withSuppressRowClickSelection","withRowSelection","withOnCellEditingStarted","event","onCellEditingStarted","withOnRowSelected","onRowSelection","withOnRowDataUpdated","withOnGridReady","refreshCells","refreshHeader","withOnFirstDataRendered","getPreselectedDrawings","build","withOnSelectionChanged","onSelectionChanged","missingDesign","drawingType","GridIdentifier","withOnFilterChanged","Object","syncAdvancedSearchFiltersWithFloatingFilters","withGetRowHeight","designPreviewFiltered","withRowClass","HeaderClass","COMPACT","toString","withOnColumnVisible","withServerSideDataSource","withGetRowId","withNoRowsOverlay","scale","hideDescription","isAnyFilterPresent","hasActiveFilters","withLoadingOverlay","withContext","componentParent","visible","columns","column","cellClass","setRowHeight","onRowHeightChanged","headerHeight","floatingFiltersHeight","colDefs","columnDefs","headerClass","gridApi","_this$selectedDrawing2","setSelected","some","updateGridOptions","suppressRowClickSelection","rowSelection","mode","AgGridRowSelection","MULTIPLE","rowMultiSelectWithClick","getColumnDefs","index","checkboxSelection","getSelectedNodes","rowNode","isSelected","orderlineIdsSet","Set","selectedDrawingsSet","orderlineId","drawingConfigurations","drawingPropertyPrefix","nameColDef","withColId","withField","withHeaderName","withComparator","StringUtils","stringComparator","withTextMultiFilter","getPossibleColumnsValues","withLockVisible","defaultColDefs","withColIdAndField","withValueGetter","withNumericMultiFilter","withHide","withHiddenInToolPanel","withCellRenderer","DesignPreviewComponent","withCellClass","withSortable","withMinWidth","withMaxWidth","withoutFilter","PIXEL","withTooltipValueGetter","AgGridUtils","buildAgGridCellTooltipWithUnit","withRightAlignment","getShape","withDate","withDateMultiFilter","getSizeInKB","buildAgGridCellTextWithUnit","getValue","KILOBYTE","withCellRendererSelector","cellRendererSelector","GridCreelPreviewOfCreelPositionComponent","previewType","PreviewType","COLOR","showRgbValues","CENTIMETER","builderAmountColDef","withOnCellClicked","editQuantityCell","withEditable","isQuantityEditable","withCellEditor","NumberCellEditorComponent","min","withValueSetter","setQuantity","withSuppressMovable","cellRenderer","cellRendererParams","cellForMainOrBorderColor","useMainColor","configuration","creelPositionForColors","mainColor","borderColor","level","component","EmptyCellRendererComponent","FixedShape","getTranslationKeyForShape","shape","getDateModified","dateModified","sizeInKB","Math","round","_this$drawingsGrid4","_this$drawingsGrid5","_this$drawingsGrid6","_event$column","stopEditing","getColDef","editable","startEditingCell","rowIndex","colKey","getColId","newValue","amount","max","UuidUtils","generateV4Uuid","advancedSearchFiltersFromFloatingFilters","advancedSearchFilter","floatingFilterToSyncWith","floatingFilter","propertyName","propertyValue","listDrawing","configurationIndex","floor","dragPreview","createElement","setAttribute","dragEvent","dataTransfer","setDragImage","repeated","columnIdentifier","getPossibleValues","DRAWINGS","i3","i4","selectors","viewQuery","rf","ctx","DrawingLibraryListViewComponent_ng_container_2_Template","nativeMax","lodash_es_zip","zip","baseRest","unzip","array","arrayFilter","group","isArrayLikeObject","baseTimes","arrayMap","baseProperty","lodash_es_flattenDeep","flattenDeep","baseFlatten","OrderLineStatusCellRendererComponent","_OrderLineStatusCellRendererComponent","GridOrderLineStatusComponent","inScheduleTranslationKey","agInit","productionScheduleOrderLineWithQuantity","ProductionScheduleItemInPathGroup","orderline","statusLabel","getQuantityInProductionSchedule","getColor","_this$productionSched","_this$productionSched2","_this$productionSched3","article","design","getHeightLeftInMMForProductionSchedule","getProductionScheduleItemMultiplier","getAmountLeftForProductionSchedule","TagColor","SUCCESS","WARNING","_this$productionSched4","_this$productionSched5","_this$productionSched6","heightInProductionScheduleInMM","amountInProductionSchedule","t","features","decls","vars","consts","template","OrderLineStatusCellRendererComponent_Conditional_4_Template","OrderLineStatusCellRendererComponent_Conditional_5_Template","canBePlanned","ProductionScheduleItemInPathGroupStatusCellRendererComponent","_ProductionScheduleItemInPathGroupStatusCellRendererComponent","_params$data","_params$data2","pathNumber","productionSchedulePath","productionScheduleOrderLine","refresh","leftForProductionSchedule","isNil","_c0","pathWithLabel_r4","$implicit","addSelectedOrderLinesToPath","path","getInvalidQuantityIndication","hasDifferentColoredYarnSets","hasEmptySelectedOrderLines","productionSchedulePlanHasUnsavedChanges","canAddSelectedOrderLinesToPath","label","OrderLinesViewComponent_div_3_ng_container_3_div_12_div_1_Template","getVisiblePathsForSelectedOrderLines","trackByLabeledPath","_r5","openOverflowPaths","overflowPathsOpen","actionsMenu_r6","pathWithLabel_r8","_r7","OrderLinesViewComponent_div_3_ng_container_3_ng_template_16_div_0_Template","getOverflowPathsForSelectedOrderLines","addSelectedOrderLinesToNewPath","OrderLinesViewComponent_div_3_ng_container_3_div_12_Template","OrderLinesViewComponent_div_3_ng_container_3_button_13_Template","closeOverflowPaths","OrderLinesViewComponent_div_3_ng_container_3_ng_template_16_Template","canAddSelectedOrderLinesToNewPath","_c6","hasVisiblePathsForSelectedOrderLines","hasOverflowPathsForSelectedOrderLines","_r9","deleteSelectedOrderLinesOrProductionScheduleItems","isSelectingOverlappingOrderLinesAndProductionScheduleItems","OrderLinesViewComponent_div_3_ng_container_3_Template","OrderLinesViewComponent_div_3_button_4_Template","hasSelectedOrderLines","canDeleteSelectedOrderLinesOrProductionScheduleItems","_r10","orderLinesGrid_r11","OrderLinesViewComponent_ng_container_4_vdw_status_bar_1_Template","loadingForTheFirstTime","gridOptions","OrderLinesViewComponent","_OrderLinesViewComponent","orderbook","qualities","colDefBuilderFactoryService","elementRef","orderLinesGridService","orderLinesHelper","presetGridModel","gridModelOutput","selectedOrderlineIdsChanged","onlyShowSelected","qualityNames","coloredYarnSetNames","syncWithProductionScheduleSubject","Subject","booleanFalseTranslation","booleanTrueTranslation","_","labeledPath","commercialUnit","initialiseGridOptions","subscribeToProductionScheduleChanges","subscribeToElementRefSizeChanges","getPathsWithLabel","overflow","containsEmptyOrderLines","getSelectedOrderLines","createListDrawingOrderLine","machineQuality","weaveStructure","picksPerColorLine","listDrawingOrderLine","commercialLengthInMM","every","notEmpty","size","_this$orderLinesGrid$","_this$orderLinesGrid","orderLinesGrid","_this$orderLinesGrid2","_this$orderLinesGrid3","_this$orderLinesGrid4","_this$orderLinesGrid5","selectedRowIds","row","_this$orderLinesGrid6","_this$orderLinesGrid7","selectedOrderLines","listDrawingOrderLines","orderLine","overviewListColoredYarnSetWithStartDent","cys","canAddProductionScheduleItemToProductionSchedulePath","addDrawingToProductionSchedulePath","_listDrawingOrderLine","coloredYarnSetId","coloredYarnSetWithStartDent","canAddProductionScheduleItemToColoredYarnSet","startDent","canAdd","hasSelectedOrderLinesWithQuantityLesserThanMinimum","_this$orderLinesGrid8","addDrawingToColoredYarnSet","selectedOrderLineIds","productionScheduleItemsFromSelectedOrderLines","getProductionScheduleItemsInPathGroup","productionScheduleItemInPathGroup","includes","orderLineId","getSelectedProductionScheduleItems","productionScheduleItemInPathGroupWithIdentification","hasSelectedProductionScheduleItems","orderLineIds","selectedOrderLineId","_this$orderLinesGrid9","_this$orderLinesGrid10","productionScheduleItemsToRemove","removeProductionScheduleItems","getQuantity","hasUnsavedChanges","invalidQuantityIndication","instant","quantityAmount","setInitializationFilters","_this$orderLinesGrid11","canPreFilterOnQualitiesAndColoredYarnSets","_this$orderLinesGrid12","machineQualityName","getQualityById","getColoredYarnSetById","getAllPreFilterData","qualityObservable","coloredYarnSetObservables","forkJoin","mergeMap","quality","_quality$alternativeM","technicalName","alternativeQualityObservables","alternativeColoredYarnSetObservables","_quality$alternativeM2","alternativeMachineQualityIds","alternativeQualityId","_coloredYarnSet$alter","_coloredYarnSet$alter2","alternativeColoredYarnSetIds","alternativeColoredYarnSetId","concat","alternatives","alternative","CarpetWeaveQuality","ColoredYarnSet","_this$getSelectedOrde","selectedOrderLineColoredYarnSets","selectedOrderLineColoredYarnSetUniqueIds","overviewListColoredYarnSet","compatibleColoredYarnSetOfPaths","compatiblePaths","flatten","compatible","productionSchedulePaths","pathsWithLabel","compatiblePathsWithLabel","nrOfVisiblePaths","widthForPathButtonsInPx","DELETE_PATH_LABEL_BUTTON_WIDTH_IN_PX","ADD_PATH_LABEL_BUTTON_WIDTH_IN_PX","DEFAULT_PADDING_IN_PX","slice","currentUpdatedProductionSchedule","switchMap","startWith","orderLines","ProductionScheduleOrderLineWithQuantity","fromProductionScheduleOrderLine","productionScheduleOrderLinesWithQuantity","_this$orderLinesGrid13","getProductionScheduleItemsFromProductionSchedule","_this$orderLinesGrid14","hasOrderLine","key","setGroup","route","orderLineOrItemInPathGroup","ProductionScheduleItemInPathGroupWithIdentification","_this$orderLinesGrid$2","_this$orderLinesGrid15","commercialWidthInMM","pathWidth","abs","commercialInCM","actualDents","_this$lookupCommercia","image","dimensionsInPixels","widthInPx","factorForConversionFromMillimetersToDents","heightInPx","factorForConversionFromMillimetersToPicks","commercialHeightInMM","quantity","amountLeft","_productionScheduleOr","ListDrawingOrderLine","getListDrawingOrderLineAmount","heightInMM","_productionScheduleOr2","amountLeftForProductionSchedule","ceil","canExceedRequestedAmountOfOrderLineItems","_this$productionOrder","productionOrderCustomSettings","allowExceedingRequestedAmountOfOrderLineItems","_this$productionOrder2","allowPreFilterOnQualitiesAndColoredYarnSets","getAdditionalInfoColumnDefs","additionalInfoColDefs","defaultGridOptionsForOrderLines","getColumnDefinitions","ORDER_ITEMS","withHeaderHeight","withFloatingFiltersHeight","withLoadingCellRenderer","withComponents","customLoadingCellRenderer","LoadingCellOverlayComponent","titleParam","getServerSideDataSource","_params$data$id","uuid","withCompactView","withGroupEdit","nodeSelected","withAutoGroupColumnDef","getGroupColumnDefinition","withTreeData","ProductionScheduleOrderLine","updatePathButtonsAndFiltersWidth","getSlice","OrderLinesTarget","PRODUCTION_SCHEDULE","overviewListOrderLine","fromOverviewListOrderLine","groupKeys","productionScheduleInPathGroupWithIdentification","getProductionScheduleItemsInPathGroupWithIdentification","Number","parseInt","loadingCellRendererParams","onServerSideDataSourceError","productionSchedulePathIndex","pathGroups","productionScheduleItemInPathGroupIndex","flatMap","getProductionSchedulePaths","productionSchedulePathOfColoredYarnSet","getMaxQuantityToPlan","fromUnit","toUnit","NumberCellRendererComponent","showGroup","toUpperCase","getAmountInProductionSchedule","setAmountInProductionSchedule","getAmountLeft","cellRendererSelectorForOrderLinesOnly","getTotalCount","buildAgGridCellTextWithoutUnit","buildAgGridCellTooltipWithUnitConversion","DENTS","PICKS","GridTagComponent","translationKey","TagSize","SMALL","colorGetter","Priority","LOW","PRIMARY","MEDIUM","HIGH","ERROR","_params$data$article","withTooltipField","amountPlanned","amountProduced","withBooleanFilter","_this$orderLinesGrid16","_this$orderLinesGrid17","_this$orderLinesGrid18","_productionScheduleOr3","_productionScheduleOr4","DOMUtils","observeResize","nativeElement","_this$containerElemen","_this$fixedButtonsEle","_this$containerElemen2","_this$pathButtonsElem","containerElement","clientWidth","fixedButtonsElement","MIN_WIDTH_FILTER_IN_PX","widthForFilters","pathButtonsElement","WIDTH_TEXT_FILTER_IN_PX","ORDERBOOK","MACHINE_QUALITIES","COLORED_YARN_SETS","i5","i6","OrderLinesViewComponent_div_3_Template","OrderLinesViewComponent_ng_container_4_Template","onShowSelectedItemsChange","checked","onCustomSettingsChanged","customSettingsButton_r4","toggleDialog","customSettingsComponent","getCustomSettingsDialogData","open","viewMode_r5","updateFilteredDrawings","showAdvancedSearch","isCurrentProductionSchedulePhaseBuild","_r6","nameFilterTextChanged","ProductionScheduleDrawingLibraryComponent_ng_container_15_app_search_filters_4_Template","getIconForNameFilter","canUseAdvancedSearchFilters","_r8","onDrawingSelected","onDrawingDragStart","onDrawingDragEnd","onVirtualScrollerEnd","getSelectedDrawingsFromProductionScheduleForSelectedViewMode","canDragDrawings","isEditingPaths","filterOnBMPDrawingType","getOrderlinesGridModel","setPreselectedOrderlineIds","orderlinesGridModel","ProductionScheduleDrawingLibraryComponent_ng_container_18_ng_container_1_ng_container_1_ng_container_1_Template","ProductionScheduleDrawingLibraryComponent_ng_container_18_ng_container_1_ng_container_1_ng_container_2_Template","ProductionScheduleDrawingLibraryComponent_ng_container_18_ng_container_1_ng_container_1_ng_container_3_Template","isViewModeDesigns","isViewModeDesignsList","isViewModeNewOrderLines","getTitleKeyForNoDataOverlay","ProductionScheduleDrawingLibraryComponent_ng_container_18_ng_container_1_ng_container_1_Template","ProductionScheduleDrawingLibraryComponent_ng_container_18_ng_container_1_vdw_nodata_overlay_2_Template","hasDrawings","ProductionScheduleDrawingLibraryComponent_ng_container_18_ng_container_1_Template","ProductionScheduleDrawingLibraryComponent_ng_container_18_vdw_nodata_overlay_2_Template","canShowNoResultOverlay","ProductionScheduleDrawingLibraryComponent","_ProductionScheduleDrawingLibraryComponent","productionSchedulePhase","ProductionSchedulePhase","BUILD","changeDetectorRef","navigationHelperService","selectedDrawingsChanged","selectedOrderlinesChanged","listOfDrawingsTarget","unsavedAdvancedSearchFilters","itemsHaveBeenLoaded","displayTechnicalUnit","DrawingType","BMP","DESIGNS","OrderLinesCustomSettingsDialogComponent","canGetMoreItems","bmpDrawingsOnly","AdvancedSearchInput","DRAWING_TYPE","nonMissingDrawingsOnly","MISSING_DESIGN","repositionDialogClassName","nameFilterChangeSubject","SLICE_LENGTH","designTranslationKey","defaultCustomSettingsDialogData","labelTranslationKey","object","technicalDimensionsTranslationKey","advancedSearchFiltersForDesignsViewMode","NAME","DRAWING_CODE","DRAWING_SHAPE","LENGTH","WIDTH","MACHINE_QUALITY","COLOR_SET","MAIN_COLOR","BORDER_COLOR","hasFilterActive","_this$nameFilter","nameFilter","filteredText","AdvancedSearchUtils","hasValue","subscribeToEditPathChanges","setAdvancedSearchFilters","getSelectedDrawings","getFilteredDrawings","subscribeToNameFilterChanges","setNavigationHelperState","onNavigationHelperDestroy","savePartialState","drawingViewMode","filterText","entries","orderlineIds","withClass","withWidth","withMaxHeight","openDialog","RepositionDialogComponent","cloneDeep","defaultUnit","AdvancedSearchDialogComponent","sourceElement","iconElement","positionOfDialog","PositionOfDialog","tap","rxjsFilter","setNameFilterTextWithValueFromNameFilter","onSelectedViewModeChange","setNameFilterText","getSelectedDrawingsFromProductionSchedule","currentlySelectedDrawingsForSelectedViewMode","updateListOfDrawings","removedListDrawing","productionScheduleItemsToBeRemoved","getProductionScheduleItemsForListDrawing","showDialogToConfirmDrawingRemoval","objectsTranslation","count","toLowerCase","objects","clearData","getDrawings","settings","unitType","UnitType","TECHNICAL","selectedItems","_this$searchFilters","detectChanges","searchFilters","emitCheckIfFiltersAreTooBigForContainerEvent","asObservable","debounceTime","_shapeFilter$possible","_shapeFilter$possible2","shapeFilter","possiblePropertyValues","getDrawingShapes","drawingShapes","designs","items","doesAttributeValueMatchFilterText","getListDrawingConfigurationsFromDrawings","startIndex","distinctUntilChanged","oldOrderLines","newOrderLines","newOrderLine","updateOrderLinesAmountInProductionSchedule","getOrderLineQuantityInProductionSchedulePathsColoredYarnSets","designTranslation","entity","CONFIRM","AlertDialogResult","selectedDrawing","_this$nameFilter2","attributeValue","_filterText$length","_attributeValue$toLow","currentEditingPaths","emptyDrawingLibraryState","drawingLibraryState","getPartialState","keys","ObjectUtils","isDeepEqual","document","getElementsByClassName","ProductionScheduleDrawingLibraryComponent_ng_container_8_Template","ProductionScheduleDrawingLibraryComponent_vdw_dialog_button_9_Template","ProductionScheduleDrawingLibraryComponent_mat_option_12_Template","ProductionScheduleDrawingLibraryComponent_ng_container_15_Template","ProductionScheduleDrawingLibraryComponent_ng_container_18_Template","ProductionScheduleDrawingLibraryComponent_app_progress_spinner_19_Template","_r2","ctx_r2","addBuggy","addButtonEnabled","SelectBuggyComponent","_SelectBuggyComponent","dialogRef","buggies","buggyOverviewService","newBuilder","getBuggy","isPropertyValueForBuggyNameEmpty","gridOptionsForListOfBuggies","listOfGridOptions","currentSubscription","getCurrentSubscription","getBuggies","ngAfterViewInit","_this$buggiesGrid","listOfGridApis","buggiesGrid","filterBuggies","canSelectBuggy","_this$buggiesGrid2","cancel","getSelectedBuggy","selectBuggy","canAddBuggy","_this$currentSubscrip","hasPermission","Permission","EDIT_BUGGIES","navigateToNextRouteWithPartialState","dialogComponent","RouteUtils","paths","texStyle","buggy","absolutePath","listOfBuggies","BUGGY","setBuggy","withoutColumnMenu","isUndefined","getRowNode","MAT_DIALOG_DATA","SelectBuggyComponent_Conditional_5_Template","_c1","FinishingDetailsComponent","_FinishingDetailsComponent","finishing","getFinishingType","finishingType","getFinishingLabel","translation","labels","getCutbarBefore","cutbarBeforeValue","millimeterTranslationKey","picksTranslationKey","canShowLengthOfCutbarBefore","translations","lengthOfCutbarBeforeInMillimeters","getLengthOfCutbarBeforeInMillimeters","lengthOfCutbarBeforeInNumberOfPicks","getLengthOfCutbarBeforeInNumberOfPicks","getCutbarAfter","cutbarAfterValue","canShowLengthOfCutbarAfter","lengthOfCutbarAfterInMillimeters","getLengthOfCutbarAfterInMillimeters","lengthOfCutbarAfterInNumberOfPicks","getLengthOfCutbarAfterInNumberOfPicks","cutbarsInformation","hasAddedCutbarBefore","hasAddedCutbarAfter","nameWithVersion","_baseToNumber","baseToNumber","isSymbol","NaN","_createMathOperation","createMathOperation","operator","defaultValue","other","baseToString","lodash_es_multiply","multiplier","multiplicand","ProductionScheduleInitialPreparationsAdditionalOptionsComponent_Conditional_11_mat_error_12_Template","_r4","showFinishingDetails","selectFinishing","ProductionScheduleInitialPreparationsAdditionalOptionsComponent_article_12_mat_error_12_Template","ProductionScheduleInitialPreparationsAdditionalOptionsComponent_article_12_mat_icon_13_Template","finishingBaseRouterLink","hasChosenFinishing","possibleRestZonePosition_r6","getRestZonePositionTranslationKey","possibleRestZonePosition_r7","ProductionScheduleInitialPreparationsAdditionalOptionsComponent_ng_container_13_div_5_div_3_mat_option_3_Template","ProductionScheduleInitialPreparationsAdditionalOptionsComponent_ng_container_13_div_5_div_3_mat_error_9_Template","possibleRestZoneUserDefinedPositions","canShowErrorForFormControl","ProductionScheduleInitialPreparationsAdditionalOptionsComponent_ng_container_13_div_5_mat_radio_button_2_Template","ProductionScheduleInitialPreparationsAdditionalOptionsComponent_ng_container_13_div_5_div_3_Template","possibleRestZonePositions","canShowInputForUserDefinedWidthOfRestZone","restZoneLoaded","weaveQualityType","getSelectedPatternForRestZone","freeZoneLoaded","getSelectedPatternForFreeZone","ProductionScheduleInitialPreparationsAdditionalOptionsComponent_ng_container_13_div_5_Template","selectPatternForRestZone","ProductionScheduleInitialPreparationsAdditionalOptionsComponent_ng_container_13_mat_error_14_Template","ProductionScheduleInitialPreparationsAdditionalOptionsComponent_ng_container_13_app_pattern_example_15_Template","ProductionScheduleInitialPreparationsAdditionalOptionsComponent_ng_container_13_mat_error_30_Template","ProductionScheduleInitialPreparationsAdditionalOptionsComponent_ng_container_13_mat_error_43_Template","ProductionScheduleInitialPreparationsAdditionalOptionsComponent_ng_container_13_mat_error_56_Template","selectPatternForFreeZone","ProductionScheduleInitialPreparationsAdditionalOptionsComponent_ng_container_13_mat_error_68_Template","ProductionScheduleInitialPreparationsAdditionalOptionsComponent_ng_container_13_app_pattern_example_69_Template","canShowRestZonePosition","needsToShowValidationFeedback","additionalOptionsForm","PATTERN_CONDITIONAL_CHIP_VALUE_KEY","hasChosenPatternForRestZone","hasChosenPatternForFreeZone","ProductionScheduleInitialPreparationsAdditionalOptionsComponent","_ProductionScheduleInitialPreparationsAdditionalOptionsComponent","addProductionSchedule","httpBuggyCustomSettings","formBuilder","addRestZonePattern","addFreeZonePattern","FINISHING_VIEW_PERMISSION","finishingTemplate","editFinishingTemplate","requiredPermission","areAllFieldsDisabled","formValuesChanged","scheduleDueDatePermission","SCHEDULE_DUE_DATE","newBuilderPermission","TEXFAB_NEW_BUILDER","editFinishingFromQuality","formValidationHelper","FormValidationHelper","canHaveRestAndFreeZonesAndPathLabels","RestZonePosition","getRestZonePositions","getUserDefinedRestZonePositions","replace","setFormFields","isFirstChange","updateBuggyFormField","updateFinishingFormField","freeZone","updateFreeZoneFormFields","shouldUpdateRestZoneFormFields","updateFormFieldsForRestZone","checkForm","isUsingNewBuilder","_this$currentSubscrip2","VIEW_BUGGIES","onDateChange","openSelectGridDialog","creel","hasBuggyNameGenerator","removeFinishing","controls","setValue","_this$additionalOptio","SelectFinishingComponent","selectedOverviewListFinishing","FinishingForProductionSchedule","fromOverviewListFinishing","isCurrentFinishingEqualToSelectedFinishing","getSelectedFinishing","patchValue","emitEvent","markAsDirty","_this$additionalOptio2","pattern","openDialogForZone","patternType","PatternType","FREE_ZONE_PATTERNS","addPatternCommand","patternTranslationKey","allowPatternCreation","weaveStructureId","_this$additionalOptio3","restZonePatternFormControlName","first","overviewListColorSet","REST_ZONE_PATTERNS","patternItemTranslationKey","selectedMenuItemIndex","getInitialFreeZone","initialFreeZone","isAdditionalOptionsFormDefined","technicalWidthOfFreeZoneLeftInDents","leftTechnicalWidthInDents","commercialWidthOfFreeZoneLeftInMM","multiply","factorForConversionFromDentsToMillimeters","freeZoneLeftUseAsMaximum","technicalWidthOfFreeZoneInBetweenInDents","inBetweenTechnicalWidthInDents","commercialWidthOfFreeZoneInBetweenInMM","freeZoneInBetweenUseAsMaximum","technicalWidthOfFreeZoneRightInDents","rightTechnicalWidthInDents","commercialWidthOfFreeZoneRightInMM","InitialFreeZone","freeZoneRightUseAsMaximum","getInitialRestZone","initialRestZone","restZonePosition","userDefinedRestZonePosition","_this$additionalOptio4","isRestZoneConfigurable","restZonePositionFormControlName","USER_DEFINED","position","restZone","InitialRestZone","getEarliestPossibleDueDate","DateTime","now","getDueDate","_this$additionalOptio5","getRawValue","dueDate","toJSDate","getComment","comment","target","RIGHT","hasScheduleDueDatePermission","_this$currentSubscrip3","errorCode","formControlName","canShowErrorForErrorCodeAndFormControlForFormGroup","addFormFieldForBuggy","addFormFieldForFinishing","addFormFieldForDueDate","addFormFieldsForComment","addFormFieldsForFreeZone","addFormFieldsForRestZone","disable","additionalOptionsFormValueChangesSubject","valueChanges","notifyChangesToInitialPreparationsForm","addControl","control","watchValueChangesForFormFields","fromJSDate","disabled","freeZoneFormBuilderGroup","Validators","required","restZoneFormBuilderGroup","updateFormFieldsForConfigurableRestZone","removeControl","defaultInitialRestZones","userDefinedRestFormBuilderGroup","userDefinedRestTechnicalWidthInDents","userDefinedRestPosition","LEFT","setValueWatcherForRestZonePosition","controlName","userDefinedRestFormGroup","zone","dialogData","SelectPatternComponent","isCurrentPatternEqualToSelectedPattern","closed","dirty","unsubscribe","checkHasBuggyNameGenerator","buggyCustomSettings","_buggyCustomSettings$","nameGenerator","parts","ADD_PRODUCTION_SCHEDULE","DOCUMENT","inputs","customSettings","outputs","ProductionScheduleInitialPreparationsAdditionalOptionsComponent_Conditional_11_Template","ProductionScheduleInitialPreparationsAdditionalOptionsComponent_article_12_Template","ProductionScheduleInitialPreparationsAdditionalOptionsComponent_ng_container_13_Template","fromReadableToEnumEntry","readable","replaceAll","pathLabelsForm","pathLabelAfter","pathLabelNameGenerationProperties","pathLabelTypeText","pathLabelTypeQRCode","_c2","_c3","getMultipleValue","_c4","getMaxAllowedFontSize","ProductionSchedulePathLabelsComponent_Conditional_1_mat_form_field_49_mat_error_8_Template","ProductionSchedulePathLabelsComponent_Conditional_1_mat_form_field_49_mat_error_9_Template","ProductionSchedulePathLabelsComponent_Conditional_1_mat_form_field_49_mat_error_10_Template","hasError","fontFamily_r3","fontWeight_r4","fontStyle_r5","pathZoneLoaded","onLabelBeforePathTypeChange","onLabelAfterPathIsSameAsBeforeChange","ProductionSchedulePathLabelsComponent_Conditional_1_div_20_Template","ProductionSchedulePathLabelsComponent_Conditional_1_mat_error_36_Template","ProductionSchedulePathLabelsComponent_Conditional_1_mat_error_37_Template","ProductionSchedulePathLabelsComponent_Conditional_1_mat_error_46_Template","ProductionSchedulePathLabelsComponent_Conditional_1_mat_error_47_Template","ProductionSchedulePathLabelsComponent_Conditional_1_mat_error_48_Template","ProductionSchedulePathLabelsComponent_Conditional_1_mat_form_field_49_Template","ProductionSchedulePathLabelsComponent_Conditional_1_For_57_Template","ProductionSchedulePathLabelsComponent_Conditional_1_mat_error_58_Template","ProductionSchedulePathLabelsComponent_Conditional_1_For_65_Template","ProductionSchedulePathLabelsComponent_Conditional_1_mat_error_66_Template","ProductionSchedulePathLabelsComponent_Conditional_1_For_73_Template","ProductionSchedulePathLabelsComponent_Conditional_1_mat_error_74_Template","selectPattern","ProductionSchedulePathLabelsComponent_Conditional_1_mat_error_83_Template","ProductionSchedulePathLabelsComponent_Conditional_1_app_pattern_example_84_Template","pathLabelBefore","labelAfterPathIsSameAsBeforeCheckbox","shouldShowPathLabelAfterComponent","canShowMultipleError","accessAllPermission","possibleFontFamilies","possibleFontWeights","possibleFontStyles","JUTE_PATTERN_CONDITIONAL_CHIP_VALUE_KEY","hasChosenPattern","addPathLabels","ProductionSchedulePathLabelsComponent_Conditional_2_button_1_Template","ProductionSchedulePathLabelsComponent_Conditional_2_p_2_Template","addPathLabelPermission","ProductionSchedulePathLabelsComponent","_ProductionSchedulePathLabelsComponent","httpProductionOrderCustomSettings","navigationService","pathLabelInformationChange","patternId","PathLabelType","TEXT","QR_CODE","ACCESS_ALL","ADD_PATH_LABEL","EnumUtils","getEnumValues","FontFamily","FontWeight","FontStyle","MAX_ALLOWED_FONT_SIZE_FROM_BACKEND","isPathLabelAfterSameAsPathLabelBefore","setFormValues","getPathLabelNameGenerationProperties","listenToNameGeneratorChanges","listenToPathLabelTypeChanges","pathLabelInformation","setValidators","isMultipleOfValidator","sendRepeat","factorForConversionFromPicksToMillimeters","syncCommercialLabelHeightWithTechnicalLabelHeightInPicks","_this$pathLabelInform","_this$pathLabelInform2","$nameGeneratorBefore","$nameGeneratorAfter","combineLatest","nameGeneratorBefore","nameGeneratorAfter","updatePathLabelInformation","_this$pathLabelInform3","_this$pathLabelInform4","$pathLabelBeforeType","pathLabelType","pathLabelBeforeType","pathLabelAfterType","labelFontFamily","enable","labelFontWeight","labelFontStyle","getPathLabelInformation","_this$pathLabelsForm$","_this$pathLabelsForm$2","PathLabelInformation","PathLabelInformationForPart","FontSettings","_this$pathLabelInform5","_this$pathLabelInform6","_this$pathLabelInform7","_this$pathLabelInform8","_this$pathLabelInform9","_this$pathLabelInform10","separatorName","matCheckboxChange","setPathLabelAfterAsPathLabelBefore","matRadioChange","JUTE_PATTERNS","showPatternTypeFilter","_this$pathLabelsForm","_this$pathLabelsForm2","errors","multiple","navigateWithContentSwitcher","componentInfo","PatternBuilderComponent","nameGeneratorProperties","pathLabel","_nameGenerator$parts","fontFamily","fontWeight","fontStyle","commercialLabelHeightInMM","commercialLabelFontSize","fontSizeInMM","fontSettings","labelFontSizeInMM","technicalLabelHeightInPicks","labelHeightInPicks","labelHeightInMM","markAllAsTouched","getValidatorsFontSize","nameGenerationProperties","_this$pathLabelInform11","_this$pathLabelInform12","_this$pathLabelInform13","_this$pathLabelInform14","_this$pathLabelInform15","_this$pathLabelInform16","_this$pathLabelInform17","reset","getFontSizeValue","_this$pathLabelInform18","_this$pathLabelInform19","_this$customSettings","_this$syncCommercialL","_this$machineQuality$","syncCommercialLabelHeightWithTechnicalLabelHeightInPicksSubscription","FormValueHelper","syncValuesOfFormFieldsByFactor","markAsTouched","updateValueAndValidity","juteInformation","defaultPathLabelInformation","ProductionSchedulePathLabelsComponent_Conditional_1_Template","ProductionSchedulePathLabelsComponent_Conditional_2_Template","ProductionScheduleQualityLinkedSettingsComponent","_ProductionScheduleQualityLinkedSettingsComponent","juteGeneralSettings","getGeneralJuteSettings","repeatLastDesignToEndOfPath","qualityLinkedSettingsForm","addJuteSoPathsHaveEqualHeight","addAdditionalSidePattern","addConditionalDesigns","borderIndexColorToggle","hasJuteGeneralSettingsOnProductionOrder","hasJuteGeneralSettingsOnMachineQuality","addAdditionalSidePatternControl","addJuteSoPathsHaveEqualHeightControl","addConditionalDesignsControl","getAddAdditionalSidePattern","getAddJuteSoPathsHaveEqualHeight","getAddConditionalDesigns","getRepeatLastDesignToEndOfPath","isAddingProductionOrder","juteConditions","navigateToAddProductConfiguration","gridOptionsForProductConfiguration","listOfProductConfigurations","gridOptionsForProductConfigurationVersionHistory","selectedProductConfiguration","versionHistories","selectProductConfiguration","cancelSpecificVersionSelection","selectSpecificVersion","SelectProductConfigurationComponent","_SelectProductConfigurationComponent","productConfigurations","translateService","gridOptionsBuilderFactory","matDialogRef","dateTimePipe","isSelectingSpecificVersion","initializeGridOptions","getPossibleProductConfigurationsForMachine","_this$productConfigur","_this$productConfigur2","productConfigurationsGrid","productConfigurationVersionsHistoryGrid","getTitle","_this$productConfigur3","version","_this$selectedProduct","_this$selectedProduct2","versionHistory","readyForProduction","productConfiguration","equipmentId","texEdit","addProductConfiguration","getColumnDefsForProductConfiguration","SELECT_PRODUCT_CONFIGURATION","withColumnMenu","_api$getRowNode","withOnRowDoubleClicked","_this$productConfigur4","getColumnDefsForProductConfigurationVersionHistory","SELECT_PRODUCT_CONFIGURATION_VERSION_HISTORY","versionHistoryToSelectIndex","findIndex","_this$productConfigur5","withoutGetRowId","GridProductionStatusComponent","helpWeaveStructures","helpWeaveStructure","join","withFilterValueGetter","withGetQuickFilterText","transform","DateTimeFormat","DATETIME_SHORT","PRODUCT_CONFIGURATIONS","SelectProductConfigurationComponent_ng_container_4_Template","SelectProductConfigurationComponent_ag_grid_angular_5_Template","SelectProductConfigurationComponent_vdw_footer_6_Template","SelectProductConfigurationComponent_vdw_footer_7_Template","applySuggestionForProductionScheduleName","suggestionForProductionScheduleName","_c7","ProductionScheduleInitialPreparationsComponent_mat_form_field_19_mat_hint_5_Template","ProductionScheduleInitialPreparationsComponent_mat_form_field_19_mat_error_6_Template","ProductionScheduleInitialPreparationsComponent_mat_form_field_19_mat_error_7_Template","ProductionScheduleInitialPreparationsComponent_mat_form_field_19_mat_error_8_Template","canShowSuggestionForProductionScheduleName","canShowRequiredErrorForName","productionScheduleInitialPreparationsForm","selectMachine","ProductionScheduleInitialPreparationsComponent_ng_container_23_mat_error_9_Template","MACHINE_BASE_ROUTER_LINK","selectedMachineName","_c5","ProductionScheduleInitialPreparationsComponent_ng_container_26_ng_container_2_div_4_span_4_Template","canShowLabelForMachineQualityAndCreel","removeProductConfiguration","PRODUCT_CONFIGURATION_CHIP_VALUE_KEY","PRODUCT_CONFIGURATION_BASE_ROUTER_LINK","ProductionScheduleInitialPreparationsComponent_ng_container_26_ng_container_2_div_8_span_4_Template","selectAnotherMachineQuality","ProductionScheduleInitialPreparationsComponent_ng_container_26_ng_container_2_mat_form_field_9_mat_error_8_Template","QUALITY_CHIP_VALUE_KEY","QUALITY_BASE_ROUTER_LINK","ProductionScheduleInitialPreparationsComponent_ng_container_26_ng_container_2_div_4_Template","ProductionScheduleInitialPreparationsComponent_ng_container_26_ng_container_2_mat_form_field_5_Template","ProductionScheduleInitialPreparationsComponent_ng_container_26_ng_container_2_div_8_Template","ProductionScheduleInitialPreparationsComponent_ng_container_26_ng_container_2_mat_form_field_9_Template","isLoadingMachineQualityAndCreel","hasChosenMachine","ProductionScheduleInitialPreparationsComponent_ng_container_26_ng_template_3_app_disabled_form_input_0_Template","canShowProductConfigurationDisabledFormInput","technicalNameWithVersion","ProductionScheduleInitialPreparationsComponent_ng_container_26_div_6_span_4_Template","getDefaultParameterForPropertyNameOfMachineQualitySettings","_c8","ProductionScheduleInitialPreparationsComponent_ng_container_26_mat_form_field_7_span_5_Template","ProductionScheduleInitialPreparationsComponent_ng_container_26_mat_form_field_7_mat_error_6_Template","ProductionScheduleInitialPreparationsComponent_ng_container_26_mat_form_field_7_mat_error_7_Template","hasListOfMachineQualityCustomSettings","selectAnotherCreel","productionScheduleColoredYarnSet_r10","showColoredYarnSetDetails","getColorList","mappingForCurrentPositionOnMachine","coloredYarnSetIndex_r12","ProductionScheduleInitialPreparationsComponent_ng_container_26_div_12_article_2_ng_container_8_div_1_Template","canShowColoredYarnSet","ProductionScheduleInitialPreparationsComponent_ng_container_26_div_12_article_2_mat_icon_6_Template","ProductionScheduleInitialPreparationsComponent_ng_container_26_div_12_article_2_ng_container_8_Template","isProductionScheduleRelatedToRunOrBeingDecreated","_c9","canShowWarningForIncorrectSplittedCreel","ProductionScheduleInitialPreparationsComponent_ng_container_26_div_12_div_1_Template","ProductionScheduleInitialPreparationsComponent_ng_container_26_div_12_article_2_Template","canShowDetailsOfActiveCreel","_r13","openCreelMap","isRelatedToRun","ProductionScheduleInitialPreparationsComponent_ng_container_26_ng_container_2_Template","ProductionScheduleInitialPreparationsComponent_ng_container_26_ng_template_3_Template","ProductionScheduleInitialPreparationsComponent_ng_container_26_div_6_Template","ProductionScheduleInitialPreparationsComponent_ng_container_26_mat_form_field_7_Template","ProductionScheduleInitialPreparationsComponent_ng_container_26_div_8_Template","ProductionScheduleInitialPreparationsComponent_ng_container_26_div_12_Template","ProductionScheduleInitialPreparationsComponent_ng_container_26_div_13_Template","canShowDisabledFormInputs","disabledFormInputs_r14","_r15","additionalOptionsChanged","getSuggestionForProductionScheduleName","selectedMachine","getWeaveQualityType","_r16","onPathZoneLoaded","_r17","juteZoneLoaded","ProductionScheduleInitialPreparationsComponent_div_33_ng_container_7_Template","ProductionScheduleInitialPreparationsComponent_div_33_ng_container_8_Template","ProductionScheduleInitialPreparationsComponent_div_33_ng_container_10_Template","ProductionScheduleInitialPreparationsComponent_div_33_article_11_Template","canShowJuteOptions","_r18","toggleOnPlanningBoardSettingValue","ProductionScheduleInitialPreparationsComponent_div_35_app_production_schedule_quality_linked_settings_14_Template","addToPlanboard","ACCESS_ALL_PERMISSION","_r19","saveCreelMap","closeCreelMap","getCreelMap","ProductionScheduleInitialPreparationsComponent","_ProductionScheduleInitialPreparationsComponent","BaseAddProductionSchedulePageComponent","machineQualities","machines","productionSchedules","productionOrders","creels","httpProductionOrdersCustomSettings","navigationHistory","planning","planningPrototype","router","activatedRoute","listOfMachineQualityCustomSettings","hideParentHeader","texState","editMachine","editProductConfiguration","editMachineQuality","canShowAdditionalOptions","isLoadingProductionSchedule","isViewingCreelMap","dialogBuilderForBasicDialog","getPropertyValueOrGeneralPlaceholderIfEmpty","initialiseProductionSchedule","hasAddPathLabelPermission","addProductionOrderToPlanningBoard","updateCanHaveRestAndFreeZonesAndPathLabels","SelectMachineComponent","isAddingProductionOrderForProductConfiguration","allowedMachineTypes","MachineType","CARPET_LOOM","CARPET_LOOM_NO_JQ","VELVET","onMachineSelect","textileDataAmount","creelPositions","textileData","TextileDataDetailComponent","SourceElementUtils","findSourceElementForDialog","canShowWarningForNoPossibleMatchesWithCurrentMachine","possibleCreelsForCurrentMachine","possibleQualitiesForCurrentMachine","isShowingSkeletonView","selectCreelFromPossibleCreels","getPossibleMachineQualitiesForMachine","selectMachineQualityFromPossibleMachineQualities","getProductionSchedule","_this$pathLabelsCompo","_this$pathLabelsCompo2","_this$juteOptionsComp","_this$juteOptionsComp2","_this$qualityLinkedSe","_this$qualityLinkedSe2","initialPreparationsAdditionalOptionsComponent","oldFinishingForProductionSchedule","practicalPickDensityUnit","practicalPickDensityInPicksPerMM","convertUnit","practicalPickDensity","PICKS_PER_MILLIMETER","pathLabelsComponent","juteOptionsComponent","getJuteInformation","qualityLinkedSettingsComponent","adjustDefaultFinishingsForProductionScheduleItems","getConfiguredProductionSchedule","configuredProductionSchedule","valid","isNaN","isAdditionalOptionsComponentDefined","isAddingAnyTypeOfProductionOrder","navigateToCustomSettings","navigateByUrl","texFab","productionOrder","coloredYarnSetIndex","hasChosenMachineQuality","validateForms","forms","canValidateJuteForm","juteForm","checkForms","canInsertPathLabels","hasAddedPathLabelBefore","hasAddedPathLabelAfter","isBeingDecreated","_this$suggestionForPr","canGetSuggestionForProductionName","MAX_LENGTH_FOR_PRODUCTION_ORDER_NAME","canAddJute","createActiveCreelMap","activeCreelMap","_this$getCreelMap","getMappedColoredYarnSet","of","EMPTY","selectedVersionHistory","setProductConfiguration","WeaveQualityType","CARPET","_ref","_this$initialPreparat","_this$initialPreparat2","creelName","machineName","buggyName","generatedName","_this$juteOptionsComp3","beforePathLabelChecked","afterPathLabelChecked","coloredYarnSetsWithStartDent","creelPosition","currentPositionOnMachine","_this$customSettings2","SelectCreelComponent","title","selectedCreels","setCreel","assignCreelToProductionSchedule","SelectMachineQualityComponent","SINGLE","allowEmptySelection","selectedWeaveQualities","setQuality","oldMachineQuality","getAndAssignMachineQualityToProductionSchedule","isCreatingNewProductionSchedule","initialiseNewProductionSchedule","initialiseExistingProductionSchedule","ProductionSchedule","createEmptyProductionSchedule","isEditingProductionOrder","isDuplicatingProductionOrder","bmpDrawingInPathGroup","changeFinishing","setAsyncValidators","AsyncUniqueValidator","createValidator","practicalPickDensityInPicksInUnit","setTimeout","productionScheduleInitialPreparationsFormSubject","isDirty","canSelectMachine","assignMachineToProductionSchedule","hmiVersion","getInitialOptionsForMachine","initialOptionsForProductionOrder","hasOrderLines","activeMachineQuality","activeMachineQualityId","assignMachineQualityToProductionSchedule","setEmptyPropertiesFromInitialOptions","getActiveCreelFromListOfPossibleCreelsAndAssignToProductionSchedule","activeCreelId","getConversionFactorsForMachineQuality","updateMachineQualityDependentInitialSettingsForProductionSchedule","getFactorForConversionFromMillimetersToDents","getFactorForConversionFromDentsToMillimeters","getFactorForConversionFromPicksToMillimeters","getFactorForConversionFromMillimetersToPicks","getPathWidths","applyMeasurementsCalculationsFactor","adjustObjectsThatDependsOnMachineQuality","getInitialOptionsForMachineAndMachineQuality","reedDensity","CreelForProductionSchedule","isColoredYarnSplitPositionedCorrectly","checkIsColoredYarnSetSplitPositionedCorrectly","finishLoadingProductionScheduleWithSuggestion","isProductionScheduleWithEmptyContent","updateMachineQualityDependentSettingsForExistingProductionSchedule","initialPathLabel","_this$customSettings3","pathLabelInformationAfter","pathLabelInformationBefore","initialJute","isNumber","practicalPickDensityInCustomUnit","isAddingProductionOrderForRun","juteBefore","juteAfter","_request","isAddingProductionOrderForMachine","getRequestForProductionOrderForMachine","getRequestForProductionOrderForRun","getRequestForProductionOrderForProductConfiguration","isAddingProductionOrderForType","results","initialiseProductionScheduleForType","hasMachineQuality","hasCreel","_productConfiguration","_productConfiguration2","ProductionScheduleProductConfiguration","reedDensityInDentsPerMM","setAdditionalOptionsForProductionOrderForType","possibleMachineQualityFromInitialOptions","possibleMachineQuality","possibleCreelFromInitialOptions","possibleCreel","_this$possibleCreelsF","_this$possibleCreelsF2","getSummaryForMachine","snapshot","_this$authentication$","runId","getState","getCreelMapForRun","TEXFAB_PLANNINGBOARD_NEW","_forkJoin","productConfigurationObservable","isSample","finishLoadingProductionSchedule","getFunctionsBasedOnDialogComponent","Map","loadNewItem","newItemId","setNewProductConfiguration","reopenDialog","setNewQuality","setNewCreel","setNewItemOrReopenDialogIfPresent","showAdditionalOptions","weaveQuality","selectListProductConfiguration","OverviewListMachineQuality","fromCarpetWeaveQuality","_this$dialogState","dialogState","hasSelectedNewMachine","hasSelectedAnotherMachine","machineSummaryOfSelectedMachine","_this$productionSched7","currentCreel","activeWeaveQuality","_activeWeaveQuality$c","MachineQualityForProductionSchedule","fromWeaveQuality","overviewListCreel","_this$productionSched8","MACHINES","PRODUCTION_SCHEDULES","PRODUCTION_ORDERS","CREELS","PLANNING","ProductionScheduleInitialPreparationsComponent_mat_form_field_19_Template","ProductionScheduleInitialPreparationsComponent_ng_template_20_Template","ProductionScheduleInitialPreparationsComponent_ng_container_23_Template","ProductionScheduleInitialPreparationsComponent_ng_template_24_Template","ProductionScheduleInitialPreparationsComponent_ng_container_26_Template","ProductionScheduleInitialPreparationsComponent_app_production_schedule_initial_preparations_additional_options_32_Template","ProductionScheduleInitialPreparationsComponent_div_33_Template","ProductionScheduleInitialPreparationsComponent_div_35_Template","ProductionScheduleInitialPreparationsComponent_app_creel_mapping_36_Template","disabledNameFormInput_r20","disabledMachineFormInput_r21","skeletonViewAnimation","ZoneType","REST","FREE","ctx_r0","getWarningMessages","getErrorMessages","maxAllowed","EditZoneComponent","_EditZoneComponent","isVerifying","unusedDents","suggestedZone","zoneIndex","zoneType","zoneReference","getZone","setUnusedDents","canEditZone","editZoneForm","canBeModified","getLabelTranslation","getIcon","canShowErrorMessages","canShowWarningMessages","warnings","getMessagesForZoneWarningsOrErrors","MessageType","freeZones","restZones","productionSchedulePathsWidthInDents","checkVerifyProductionSchedule","getDifferenceBetweenOldAndNewTechnicalWidthInDents","getZoneErrorOrWarningTranslationKey","totalWidthTooBig","totalWidthTooLittle","freeZoneFixedWidthInDents","restZoneFixedWidthInDents","freeZoneUseAsMaximumExceeded","pathStartedAtWrongDent","userDefinedRestAdjusted","disableClose","coloredYarnSetPathNr","finalize","modifyProductionScheduleAfterVerify","dispatchNewProductionSchedule","setSelectedZone","zoneWarningsOrErrors","messages","description","Message","createMessageWithTypeAndDescription","EditZoneComponent_div_5_Template","EditZoneComponent_div_6_Template","EditZoneComponent_mat_error_16_Template","EditZoneComponent_mat_error_17_Template","EditZoneComponent_button_19_Template","lodash_es_subtract","minuend","subtrahend","ProductionScheduleZoneComponent_div_4_div_1_div_3_Template","ProductionScheduleZoneComponent_div_4_div_1_div_4_Template","zoneIndex_r2","zoneIndicatorContainerElements_r3","ctx_r3","onClickZoneIndicator","getZoneIndicatorPosition","hasZoneWarnings","zone_r5","hasZoneErrors","isZoneSelected","hasZoneBeenModified","getZoneIcon","getZoneWidth","ProductionScheduleZoneComponent_div_4_div_1_Template","productionScheduleBuilderWidth","isZonesInstanceOfFreeZone","zones","isZonesInstanceOfRestZone","ProductionScheduleZoneComponent","_ProductionScheduleZoneComponent","zoneIndicatorWidth","setZoneIndicatorsPosition","subtract","zoneIndicatorPositions","zoneIndicatorContainerElement","selectedZone","selectedZoneIndex","horizontalOffset","getSuggestedZone","getZoneType","deselectZoneInProductionScheduleBuilder","RestZone","FreeZone","canShowZoneIndicators","suggestedZones","calculateZoneIndicatorPosition","each","aspectRatio","width","sum","currentMaxRightPosition","reverse","zoneIndicatorPosition","ProductionScheduleZoneComponent_span_2_Template","ProductionScheduleZoneComponent_span_3_Template","ProductionScheduleZoneComponent_div_4_Template","calculateDrawingHeightInPicks","threadByThread","createProductionScheduleItemInPathGroupFromDrawing","finishingForProductionSchedule","_listDrawing$orderLin","_listDrawing$drawing","_listDrawing$commerci2","defaultQuantity","technicalDimensions","heightInPicks","widthInDents","calculateDrawingWidthInDents","commercialDimensions","rollLengthInMeter","_listDrawing$orderLin2","_listDrawing$orderLin3","convertHeightInMeterToPicks","pickDensity","_machineQuality$weave","technicalHeightInPicks","ListDrawingJute","convertDentsToMillimeters","valueInDents","_listDrawing$commerci","_machineQuality$weave2","commercialDimensionsInMM","_listDrawing$commerci3","_listDrawing$commerci4","BmpProductionScheduleItemInPathGroup","EP","EpProductionScheduleItemInPathGroup","cutbarsLength","MANUAL_NON_PRODUCTION_ITEM","JuteProductionScheduleItemInPathGroup","getLongestProductionSchedulePath","pathGroup","totalLengthInPicks","nativeMin","lodash_es_inRange","inRange","number","start","end","toFinite","baseInRange","toNumber","isCoordinateOutOfRangeOfOtherCoordinate","coordinates","otherCoordinates","threshold","isHorizontallyOutOfRange","x","isVerticallyOutOfRange","y","renameProductionSchedulePathsToNewPositionInColoredYarnSets","pathNumbering","ProductionScheduleDisplay","DETAILVIEW","LISTVIEW","OVERVIEW","identity","top","bottom","epsilon","translateX","translateY","d","center","offset","bandwidth","entering","__axis","axis","orient","tickArguments","tickValues","tickFormat","tickSizeInner","tickSizeOuter","tickPadding","window","devicePixelRatio","k","context","ticks","apply","domain","format","spacing","range","range0","range1","copy","selection","selectAll","tick","order","tickExit","exit","tickEnter","enter","append","attr","line","select","text","merge","insert","transition","isFinite","getAttribute","p","parentNode","remove","arguments","Array","tickSize","axisBottom","e10","sqrt","e5","e2","tickSpec","stop","step","power","log10","pow","factor","inc","tickIncrement","ascending","a","b","descending","bisector","f","compare1","compare2","delta","lo","hi","mid","zero","i","bisectRight","bisect","src_define","prototype","extend","parent","definition","create","Color","brighter","reI","reN","reP","reHex","reRgbInteger","RegExp","reRgbPercent","reRgbaInteger","reRgbaPercent","reHslPercent","reHslaPercent","named","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","color_formatHex","rgb","formatHex","color_formatRgb","formatRgb","color","m","l","trim","exec","rgbn","Rgb","rgba","hsla","hasOwnProperty","n","r","g","opacity","rgbConvert","o","rgb_formatHex","hex","rgb_formatRgb","clampa","clampi","h","s","Hsl","hslConvert","clamph","clampt","hsl2rgb","m1","m2","basis","t1","v0","v1","v2","v3","t2","t3","define","channels","assign","displayable","formatHex8","color_formatHex8","formatHsl","color_formatHsl","darker","clamp","rgb_formatHex8","hsl","src_constant","nogamma","linear","constant","rgbGamma","gamma","exponential","colorRgb","rgbSpline","spline","colors","genericArray","nb","na","c","date","Date","setTime","src_number","src_basis","basisClosed","reA","reB","source","string","am","bm","bs","bi","lastIndex","q","one","src_numberArray","isNumberArray","ArrayBuffer","isView","DataView","numberArray","isArray","valueOf","normalize","constants","bimap","interpolate","d0","d1","r0","r1","polymap","j","initRange","prefixExponent","re","formatSpecifier","specifier","match","Error","FormatSpecifier","fill","align","sign","symbol","comma","precision","formatDecimalParts","toExponential","indexOf","coefficient","exponent","formatRounded","formatTypes","%","toFixed","formatDecimal","toLocaleString","e","toPrecision","formatPrefixAuto","X","src_identity","locale","formatPrefix","prefixes","linearish","tickStep","precisionPrefix","precisionRound","precisionFixed","nice","prestep","maxIter","continuous","transformer","untransform","unknown","piecewise","output","input","interpolateValue","rescale","clamper","invert","interpolateNumber","rangeRound","interpolateRound","u","defaultLocale","grouping","thousands","formatGroup","substring","call","currencyPrefix","currency","currencySuffix","decimal","numerals","formatNumerals","String","percent","minus","nan","newFormat","prefix","test","suffix","formatType","maybeSuffix","valuePrefix","valueSuffix","valueNegative","formatTrim","out","charCodeAt","Infinity","padding","formatLocale","lodash_es_floor","createRound","MaximumBuggyLengthWarningDialogComponent","_MaximumBuggyLengthWarningDialogComponent","productionScheduleZoneComponent","getWidthInDentsWithAspectRatio","item_r3","productionSchedulePathsOfColoredYarnSet_r5","productionScheduleColoredYarnSetIndex_r6","openMaximumBuggyLengthWarningDialog","ProductionScheduleBuilderComponent_div_10_div_1_div_2_ng_container_2_ng_container_1_mat_icon_1_Template","canShowMaximumBuggyLengthWarningForProductionSchedulePath","ProductionScheduleBuilderComponent_div_10_div_1_div_2_ng_container_2_ng_container_1_Template","canShowMaximumBuggyLengthWarningForProductionSchedulePathsOfColoredYarnSet","ProductionScheduleBuilderComponent_div_10_div_1_div_2_ng_container_2_Template","permissionToViewBuggyLength","getProductionSchedulePathLabel","ProductionScheduleBuilderComponent_div_10_div_1_app_color_list_preview_with_position_1_Template","ProductionScheduleBuilderComponent_div_10_div_1_div_2_Template","ProductionScheduleBuilderComponent_div_10_div_1_div_3_Template","isProductionSchedulePath","getRestLabelForProductionSchedulePathsOfColoredYarnSet","ProductionScheduleBuilderComponent_div_10_div_1_Template","ProductionScheduleBuilderComponent_div_10_div_3_Template","getProductionScheduleColoredYarnSetWidth","isProductionSchedulePhaseVerify","ProductionScheduleBuilderComponent__svg_ng_container_16__svg_text_1_Template","ProductionScheduleBuilderComponent__svg_ng_container_16__svg_text_2_Template","canShowProductionScheduleBuilderMinBuggyLengthIndicator","canShowProductionScheduleBuilderMaxBuggyLengthIndicator","hoveredProductionSchedulePathComponent","onProductionSchedulePlanChanged","productionSchedulePathsOfColoredYarnSet_r10","productionScheduleColoredYarnSetIndex_r11","productionScheduleBuilderHeight","isEditPathsEnabled","isProductionScheduleDisplayOverview","ProductionScheduleBuilderComponent__svg_svg_17__svg_ng_container_5__svg_svg_1__svg_rect_1_Template","ProductionScheduleBuilderComponent__svg_svg_17__svg_ng_container_5__svg_svg_1__svg_line_2_Template","canShowZone","restZone_r12","ProductionScheduleBuilderComponent__svg_svg_17__svg_ng_container_5__svg_svg_1_Template","ProductionScheduleBuilderComponent__svg_svg_17__svg_ng_container_6__svg_svg_1__svg_rect_1_Template","ProductionScheduleBuilderComponent__svg_svg_17__svg_ng_container_6__svg_svg_1__svg_line_2_Template","freeZone_r13","ProductionScheduleBuilderComponent__svg_svg_17__svg_ng_container_6__svg_svg_1_Template","ProductionScheduleBuilderComponent__svg_svg_17__svg_ng_container_7__svg_g_1_Template","ProductionScheduleBuilderComponent__svg_svg_17__svg_ng_container_7__svg_g_2_Template","preventDefaultEvent","ProductionScheduleBuilderComponent__svg_svg_17__svg_svg_4_Template","ProductionScheduleBuilderComponent__svg_svg_17__svg_ng_container_5_Template","ProductionScheduleBuilderComponent__svg_svg_17__svg_ng_container_6_Template","ProductionScheduleBuilderComponent__svg_svg_17__svg_ng_container_7_Template","ProductionScheduleBuilderComponent__svg_svg_17__svg_image_8_Template","ProductionScheduleBuilderComponent__svg_svg_17__svg_image_9_Template","_c11","trackByProductionSchedulePathsOfColoredYarnSet","canShowRestZones","canShowFreeZones","canShowTopScrollIndicator","canShowBottomScrollIndicator","suggestedRestZones","getProductionScheduleBuilderWidth","suggestedFreeZones","ProductionScheduleBuilderComponent_div_25_app_production_schedule_zone_2_Template","ProductionScheduleBuilderComponent_div_25_app_production_schedule_zone_3_Template","ProductionScheduleBuilderComponent","_ProductionScheduleBuilderComponent","canZoomIn","canZoomOut","productionSchedulePlanChanged","canShowProductionScheduleBuilder","height","scrollIndicatorDimensionsInPx","productionScheduleBuilderViewportTopPosition","VIEW_MIN_MAX_BUGGY","productionScheduleBuilderMargin","horizontalAxisHeightInPx","originalProductionScheduleBuilderWidth","maxZoomLevel","buggyLengthTextOffset","zoneIndicatorLineWidthInPx","approximateHorizontalTicksCount","setOriginalProductionScheduleBuilderHeight","setAspectRatioAndUpdateProductionScheduleBuilderContainerOverflow","setProductionScheduleZones","zoomLevel","firstChange","getOriginProductionScheduleBuilderWidth","productionScheduleBuilderContainerWidth","productionScheduleBuilderContainerHeight","zoom","selectedProductionScheduleDisplay","onSelectedProductionScheduleDisplayChange","updateHorizontalAxis","updateVerticalAxis","getProductionScheduleBuilderHeight","reInitialiseProductionScheduleBuilder","currentSelectedZone","setUpDimensionsForProductionScheduleBuilder","observeElementResize","ngOnDestroy","updateEditingPaths","topScrollIndicatorListenerMouseClickFn","topScrollIndicatorListenerMouseEnterFn","bottomScrollIndicatorListenerMouseClickFn","bottomScrollIndicatorListenerMouseEnterFn","onResize","preventDefault","VERIFY","canShowZoneIndicator","getZonePosition","productionScheduleBuilderContainer","scrollLeft","isProductionScheduleDisplayDetailView","getProductionScheduleBuilderMinBuggyLengthPosition","originalProductionScheduleBuilderHeight","buggyLengthMinInPicks","getProductionScheduleBuilderMinBuggyLengthTextPositionY","buggyLengthMaxInPicks","getProductionScheduleBuilderMaxBuggyLengthPosition","getProductionScheduleBuilderMaxBuggyLengthTextPositionY","onScrollProductionScheduleBuilderContainer","scrollTop","scrollLeftOffset","verticalPositionOfBottomScrollIndicator","clientHeight","getBuilderHeaderHeight","isHoveringProductionSchedulePath","canScrollToBottom","maximumZonePosition","dentOffset","components","previousHoveredProductionSchedulePathComponent","currentHoveredProductionSchedulePathComponent","pathComponent","horizontalPositionOfScrollIndicators","calculateHorizontalPositionOfScrollIndicators","coloredYarnSetComponent","targetPositionOfTopScrollIndicator","calculateTargetPositionOfTopScrollIndicator","targetPositionOfBottomScrollIndicator","calculateTargetPositionOfBottomScrollIndicator","canScrollToTop","topScrollIndicator","setTopScrollIndicatorEventHandlers","bottomScrollIndicator","setBottomScrollIndicatorEventHandlers","getToolbarTopWidth","getContentWidth","getProductionScheduleBuilderHorizontalAxisWidth","getZoneIndicatorLineHorizontalPosition","withCustomBackdrop","canShowFreeAndRestZonesEditor","ProductionSchedulePath","_productionSchedulePa","getLabelForTechnicalDimensions","lengthInCommercialUnit","convertValueToCommercialUnit","totalLengthInMM","widthInCommercialUnit","getLabelForCommercialDimensions","_max","maxProductionSchedulePathInPicks","maxBy","productionScheduleHeightInPicks","remainingWidthInDents","getProductionSchedulePathsWidthInDents","_productionSchedulePa2","remainingWidthInMillimeters","convertDentsToWidthInMeter","getProductionSchedulePathsWidthInMillimeters","maxProductionSchedulePathInMM","buggyLengthMinInMeters","convertPicksToHeightInMeter","buggyLengthMinInMillimeters","productionScheduleHeightInMM","initialiseProductionScheduleBuilderContainerDimensions","initialiseProductionScheduleBuilder","setAspectRatio","updateHorizontalAndVerticalAxis","getActionBarHeight","getZonesContainerHeight","initialiseSelections","scrollToBottomOfProductionScheduleBuilder","getTotalProductionScheduleWidthInDents","productionSchedulePathComponent","getProductionScheduleColoredYarnSetLeft","getProductionSchedulePathLeft","getProductionSchedulePathWidth","getProductionSchedulePathTop","scrollHeight","listen","scrollTo","productionScheduleBuilderSelection","d3Select","productionScheduleBuilder","productionScheduleBuilderVerticalAxisSelection","productionScheduleBuilderVerticalAxis","productionScheduleBuilderHorizontalAxisSelection","productionScheduleBuilderHorizontalAxis","setStyle","getTickFormatForVerticalAxis","getVerticalTickFormat","valueInMeters","valueInCommercialUnit","getTickLabelTranslationWithUnit","getKeyFromValue","verticalAxis","d3ScaleLinear","verticalTicksCount","axisLeft","d3AxisLeft","getTickFormatForHorizontalAxis","numberOfTicks","getHorizontalTickFormat","tickLabelTranslationWithUnit","horizontalAxis","d3AxisBottom","resizeColorListPreviewComponents","MathUtils","divide","colorListPreviewComponents","toArray","colorListPreviewComponent","calculateCreelPositionsToShow","getMinimumProductionScheduleBuilderHeight","minProductionScheduleBuilderHeightInPicks","builderHeader","actionBarElement","longestProductionSchedulePath","resizeObserver","Observable","observer","ResizeObserver","observe","complete","disconnect","_this$zonesContainerE","_this$zonesContainerE2","zonesContainerElement","commercialWidthInCommercialUnit","commercialHeightInCommercialUnit","ProductionScheduleBuilderComponent_div_3_Template","ProductionScheduleBuilderComponent_div_10_Template","ProductionScheduleBuilderComponent__svg_ng_container_16_Template","ProductionScheduleBuilderComponent__svg_svg_17_Template","ProductionScheduleBuilderComponent_div_25_Template","ProductionScheduleColoredYarnSetErrorPopupComponent","_ProductionScheduleColoredYarnSetErrorPopupComponent","getMessages","canShowErrorTotalWidthTooBig","createErrorMessageWithDescription","canShowErrorTotalWidthTooLittle","onHoveredProductionSchedulePathComponent","productionScheduleColoredYarnSetIndex","productionSchedulePath_r3","productionSchedulePathIndex_r4","ProductionScheduleColoredYarnSetComponent_ng_container_3__svg_svg_1_Template","trackByProductionSchedulePath","productionSchedulePath_r6","productionSchedulePathIndex_r7","ProductionScheduleColoredYarnSetComponent_ng_container_4__svg_svg_1_Template","onClickProductionScheduleColoredYarnSetErrorOverlay","ProductionScheduleColoredYarnSetComponent","_ProductionScheduleColoredYarnSetComponent","initialiseProductionScheduleColoredYarnSetComponent","setProductionScheduleColoredYarnSetAttributes","baseVal","canShowProductionScheduleColoredYarnSetErrorOverlay","targetDOMRect","getBoundingClientRect","RepositionTooltipComponent","clientY","clientX","hasPermissionToNewVerifyStep","TEXFAB_VERIFY_NEW","datum","on","isDraggingOverProductionScheduleColoredYarnSet","elementFromPoint","classed","getCurrentData","addClass","productionScheduleColoredYarnSetBackground","removeClass","draggedItem","enoughWidthToAddProductionScheduleItemToColoredYarnSet","productionScheduleColoredYarnSetElement","getProductionScheduleColoredYarnSetPosition","ProductionScheduleColoredYarnSetComponent_ng_container_3_Template","ProductionScheduleColoredYarnSetComponent_ng_container_4_Template","ProductionScheduleColoredYarnSetComponent__svg_svg_5_Template","cloneProductionScheduleElement","productionScheduleElementPositionX","productionScheduleElementSelection","classList","add","productionScheduleElementNode","productionScheduleWrapperElement","insertBefore","cloneNode","nextSibling","productionScheduleElementClone","appendChild","getClosestProductionScheduleItemAndIndexRelativeToMouseCoordinates","mouseCoordinates","productionScheduleItems","indexOfClosestProductionScheduleItemInPathGroup","element","getMouseCoordinatesInProductionScheduleBuilderGroup","productionScheduleBuilderGroupElement","mouseCoordinateX","mouseCoordinateY","d3Pointer","selector","Selection","querySelectorAll","documentElement","root","getUnderlyingElement","parentClass","underlyingElementSelection","d3SelectAll","nodes","svgGraphicsElement","isInLowerHalfOfProductionScheduleItem","productionScheduleItem","heightOfClosestProductionScheduleItem","verticalCenterOfProductionScheduleItem","arrowPosition","EditProductionSchedulePathOfColoredYarnSetComponent","_EditProductionSchedulePathOfColoredYarnSetComponent","cursorOffset","matDialogPosition","repositionMatDialog","deleteProductionSchedulePathOfColoredYarnSet","canShowArrow","matCardHeight","matCardElement","matDialogPositionTop","updatePosition","setArrowPositions","matIconHeight","matIconWidth","matIconOffset","ElementRef","EditProductionSchedulePathOfColoredYarnSetComponent_mat_icon_0_Template","noop","dispatch","Dispatch","callback","typename","T","parseTypenames","typenames","types","split","that","args","src_dispatch","nonpassive","passive","nonpassivecapture","capture","nopropagation","stopImmediatePropagation","noevent","d3_drag_src_constant","DragEvent","sourceEvent","subject","identifier","active","dx","dy","defineProperties","enumerable","configurable","defaultFilter","ctrlKey","button","defaultContainer","defaultSubject","defaultTouchable","navigator","maxTouchPoints","drag","mousedownx","mousedowny","mousemoving","touchending","container","touchable","gestures","listeners","clickDistance2","mousedowned","touchstarted","touchmoved","touchended","style","gesture","beforestart","view","mousemoved","mouseupped","nodrag","__noselect","MozUserSelect","mouse","yesdrag","noclick","touches","changedTouches","clearTimeout","touch","pointer","p0","clickDistance","PathItemInfoTooltipContext","PATH_BAR","PATH_DESIGN","ColorListPreviewWithPositionComponent","_ColorListPreviewWithPositionComponent","dialogPosition","colorListPreview","creelMapping","ColorListPreviewWithPositionComponent_ng_container_1_Template","tmp_5_0","getColorByPosition","mainColorPosition","borderColorPosition","cutbarBefore","cutbarBeforeInPicks","cutbarAfter","cutbarAfterInPicks","numberOfPieces","customer","PathItemInfoTooltipComponent","_PathItemInfoTooltipComponent","pathItemInfoTooltipContext","drawingName","finishingName","finishingVersion","sales","DATE_SHORT","hasCutBarAfter","hasCutBarBefore","_this$coloredYarnSet$","canShowInfoEntry","getPopupHeight","PathItemInfoTooltipComponent_div_15_Template","PathItemInfoTooltipComponent_div_16_Template","PathItemInfoTooltipComponent_div_17_Template","PathItemInfoTooltipComponent_div_18_Template","PathItemInfoTooltipComponent_div_19_Template","PathItemInfoTooltipComponent_div_20_Template","PathItemInfoTooltipComponent_div_21_Template","PathItemInfoTooltipComponent_div_28_Template","PathItemInfoTooltipComponent_div_29_Template","PathItemInfoTooltipComponent_div_30_Template","PathItemInfoTooltipComponent_div_43_Template","PathItemInfoTooltipComponent_div_50_Template","PathItemInfoTooltipComponent_div_51_Template","tmp_14_0","EditProductionScheduleItemInPathGroupAction","DELETE","EDIT","DELETE_COMPLETING_PARTIALLY","EditProductionScheduleItemInPathGroupComponent_mat_form_field_16_mat_error_5_Template","quantityLeft","getMaximumValueForQuantity","EditProductionScheduleItemInPathGroupComponent_mat_form_field_17_mat_hint_5_Template","EditProductionScheduleItemInPathGroupComponent_mat_form_field_17_mat_error_6_Template","EditProductionScheduleItemInPathGroupComponent_mat_form_field_17_mat_error_7_Template","EditProductionScheduleItemInPathGroupComponent_mat_form_field_17_mat_error_8_Template","EditProductionScheduleItemInPathGroupComponent_div_25_mat_error_8_Template","EditProductionScheduleItemInPathGroupComponent_div_25_mat_error_9_Template","EditProductionScheduleItemInPathGroupComponent_div_25_mat_error_10_Template","EditProductionScheduleItemInPathGroupComponent_div_25_mat_error_18_Template","changeCurrentFinishing","EditProductionScheduleItemInPathGroupComponent_div_27_div_14_Template","FINISHING_CHIP_VALUE_KEY","FINISHING_BASE_ROUTER_LINK","noPermissionsToSelectFinishingHint","EditProductionScheduleItemInPathGroupComponent","_EditProductionScheduleItemInPathGroupComponent","completingPartially","editFinishing","changeFinishingPermission","CHANGE_INDIVIDUAL_FINISHING","minimumVerticalMarginInPx","pickDensityInPicksPerMeter","getOrderLineAndCalculateQuantityLeft","setDrawingTypeSpecificFormFields","canShowCode","code","canShowCommercialDimensions","canShowTechnicalDimensions","canShowFinishingField","canShowCutbarsFields","getAmountOfCarpetsBasedOnQuantity","productionScheduleItemInPathGroupForm","getCurrentFinishing","deleteFinishing","cancelEvent","deleteProductionScheduleItemInPathGroupInCompletingPartiallyProductionOrder","deleteProductionScheduleItemInPathGroup","applyChangesToProductionScheduleItemInPathGroup","canChangeCommercialDimensions","commercialHeight","technicalHeight","adjustQuantityOfDrawingsInPathGroup","status","ProductionScheduleItemInPathGroupStatus","REMOVED","applySettingsToEpProductionScheduleItemInPathGroup","applySettingsToBmpProductionScheduleItemInPathGroup","action","canEditProductionScheduleItemInPathGroup","hasChangeFinishingPermission","disableEditFinishing","validatorsForAmountProducedFormControl","subscribeToQuantityValueChanges","subscribeToCommercialHeightValueChanges","epProductionScheduleItemInPathGroup","cutbarBeforeCommercialLengthInMillimeters","cutbarBeforeCommercialLength","technicalLengthInNumberOfPicks","cutbarAfterCommercialLengthInMillimeters","cutbarAfterCommercialLength","offsetHeight","matCardWidth","offsetWidth","innerHeight","newQuantity","WINDOW","EditProductionScheduleItemInPathGroupComponent_mat_icon_0_Template","EditProductionScheduleItemInPathGroupComponent_mat_form_field_14_Template","EditProductionScheduleItemInPathGroupComponent_mat_form_field_16_Template","EditProductionScheduleItemInPathGroupComponent_mat_form_field_17_Template","EditProductionScheduleItemInPathGroupComponent_h4_23_Template","EditProductionScheduleItemInPathGroupComponent_div_25_Template","EditProductionScheduleItemInPathGroupComponent_div_26_Template","EditProductionScheduleItemInPathGroupComponent_div_27_Template","EditProductionScheduleItemInPathGroupComponent_div_28_Template","ProductionScheduleItemInPathGroupRepeatIndicatorComponent","_ProductionScheduleItemInPathGroupRepeatIndicatorComponent","verticalLineHeight","totalHeight","drawingHeight","cutbarAfterHeight","cutbarBeforeHeight","minimumAllowedHeight","getQuantityText","hostVars","hostBindings","ProductionScheduleItemInPathGroupComponent_ng_container_0__svg_svg_1_Template","ProductionScheduleItemInPathGroupComponent_ng_container_0_ng_template_2_Template","isRecolored","notRecolored_r2","ProductionScheduleItemInPathGroupComponent","_ProductionScheduleItemInPathGroupComponent","cutbarAfterVerticalPosition","drawingVerticalPosition","setCutbarAfterVerticalPosition","setProductionScheduleItemInPathGroupAttributes","getPlaceholderWidthAndHeight","drawingWidth","drawingImageHeight","getPlaceholderPosition","productionScheduleItemInPathGroupElement","getProductionScheduleItemInPathGroupHeight","getVerticalPositionOfProductionScheduleItemInPathGroup","isProductionScheduleItemInPathGroupRepetition","previousElementSibling","ProductionScheduleItemInPathGroupComponent_ng_container_0_Template","ProductionScheduleItemInPathGroupComponent_ng_template_1_Template","canBeRecolored","nonRecolorableItem_r3","RepeatProductionScheduleItemPipe","_RepeatProductionScheduleItemPipe","pure","ProductionScheduleItemInPathGroupContainerComponent_ng_container_0__svg_svg_1_Template","canShowRepeatIndicator","isOriginalProductionScheduleItem_r2","ProductionScheduleItemInPathGroupContainerComponent_ng_template_1__svg_svg_0_Template","openEditProductionScheduleItemDialog","ProductionScheduleItemInPathGroupContainerComponent","_ProductionScheduleItemInPathGroupContainerComponent","labelForProductionScheduleItem","isHoveringItemInPathGroup","dragInitializedOnCurrentProductionScheduleItem","labelForProductionScheduleBuilderGroup","labelForProductionScheduleColoredYarnSet","labelForProductionSchedulePath","labelForDraggedProductionScheduleItemElement","labelForProductionScheduleItemRepetition","dropIndicatorPositionHeight","MINIMUM_HEIGHT_FOR_CUTBAR_IN_PX","onProductionScheduleItemMouseEnter","isDraggingProductionScheduleItemInPathGroup","canEditProductionScheduleItem","onProductionScheduleItemMouseLeave","setProductionScheduleItemInPathGroupDragEventHandlers","setHeightDimensionsForOverviewViewMode","setHeightDimensionsForDetailViewMode","setVerticalPosition","editProductionScheduleItem","removeProductionScheduleItemInPathGroup","getCutbarHeight","cutbar","minimumHeight","aspectRatioHeight","getCutbarInformation","requiredHeightForSingleProductionScheduleItemRepetition","productionScheduleItemIndexInPath","getProductionSchedulePathsOfColoredYarnSetAtStartDent","removeProductionScheduleItem","d3Drag","onDragStart","onDrag","onDragEndProductionScheduleItem","runOutsideAngular","throttle","draggedNewDrawingOverProductionScheduleItem","droppedNewDrawingOnProductionScheduleItem","mouseCoordinatesOfDragStart","getMouseCoordinatesInProductionSchedulePlanView","onDragProductionScheduleItem","onDragInitializeProductionScheduleItemInPathGroup","removeDropIndicator","destinationOfDraggedProductionScheduleItem","destinationOfDraggedProductionScheduleItemElement","destinationOfDraggedProductionScheduleItemClassList","contains","handleDragOverProductionScheduleItem","handleDragOverProductionSchedulePath","handleDragOverProductionScheduleColoredYarnSet","productionScheduleItemInPathGroupSelection","sourceOfDraggedProductionScheduleItemInPathGroup","parentElement","_this$destinationOfDr","hasDraggedFarEnoughFromStartingPoint","sourceProductionSchedulePath","onDragEndOnProductionScheduleItem","onDragEndOnProductionSchedulePath","ondDragEndOnColoredYarnSet","hasDroppedOnItself","cleanProductionSchedulePlanAfterDrop","destinationProductionSchedulePathElement","destinationProductionSchedulePath","destinationPathElementSelection","productionSchedulePathPositionEnd","productionSchedulePathDropThreshold","getProductionSchedulePathDropThreshold","mouseCoordinatesInProductionSchedulePath","getMouseCoordinatesInProductionSchedulePath","targetIndexOfDraggedProductionScheduleItem","getTargetIndexOfDestinationProductionScheduleItem","moveDraggedProductionScheduleItemToProductionSchedulePath","dropDestination","moveDraggedProductionScheduleItemToColoredYarnSet","targetIndexOfDraggedProductionScheduleItemInPathGroup","canMoveProductionScheduleItemToProductionSchedulePath","sourceProductionSchedulePathsOfColoredYarnSet","destinationOfDraggedProductionScheduleItemInPathGroupElement","destinationProductionScheduleColoredYarnSet","destinationProductionSchedulePathsOfColoredYarnSet","moveProductionScheduleItemToProductionSchedulePath","canMoveProductionScheduleItemToColoredYarnSet","targetIndexInColoredYarnSet","sourceProductionScheduleColoredYarnSet","getProductionScheduleColoredYarnSetForProductionSchedulePath","sourceIndexInColoredYarnSet","hasDroppedLastItemOfSourcePath","hasDroppedBetweenPathsRightToSourcePath","adjustTargetPositionOfDraggedProductionScheduleItemInColoredYarnSetAccordingToMousePosition","moveProductionScheduleItemToColoredYarnSet","widthOfDestinationProductionSchedulePath","getBBox","isMousePositionInsideProductionSchedulePath","productionScheduleItemsInPathGroup","getProductionScheduleItemElementsInPath","closestProductionScheduleItemInPathGroup","closestProductionScheduleItemInPathGroupElement","destinationIndexInProductionSchedulePath","drawProductionSchedulePathDropIndicator","dropIndicatorPosition","raise","drawProductionScheduleItemDropIndicator","destinationPathElement","isDraggingOverRepetitionOfProductionScheduleItem","getProductionSchedulePathsOfColoredYarnSetForProductionScheduleItem","getProductionSchedulePathForProductionScheduleItem","targetPositionOfDraggedProductionScheduleItemInPath","getTargetDropIndicatorPositionOfDraggedProductionScheduleItemInPath","targetPositionOfDraggedProductionScheduleItemInColoredYarnSetPath","getTargetDropIndicatorPositionOfDraggedProductionScheduleItemInColoredYarnSetPath","handleMousePositionInsideProductionSchedulePath","lastProductionSchedulePathSelection","verticalPositionOfClosestProductionScheduleItem","indexOfDestinationProductionScheduleItem","productionScheduleItemElementsInPath","destinationProductionScheduleItemSelection","destinationProductionScheduleItemElement","verticalPositionOfDropIndicator","isForShowingDropIndicator","mouseCoordinatesInProductionSchedulePlanView","repetition","originalDestinationOfDraggedProductionScheduleItemElement","heightOfDestinationOfDraggedProductionScheduleItem","destinationOfDraggedProductionScheduleItemSelection","otherProductionScheduleItem","adjustTargetPositionOfDraggedProductionScheduleItemInPathAccordingToMousePositionForDropIndicator","adjustTargetPositionOfDraggedProductionScheduleItemInPathAccordingToMousePosition","isInUpperHalfOfProductionScheduleItem","isInSameProductionSchedulePath","isDestinationRepetition","productionSchedulePathPositionStart","destinationPath","restoreProductionScheduleItemClone","restoreProductionScheduleToNonDraggingState","draggedProductionScheduleItem","draggedProductionScheduleItemNode","productionSchedulePathOfDraggedProductionScheduleItem","cloneOfDraggedProductionScheduleItem","hasDraggedInsideProductionSchedulePath","stopPropagation","targetDropIndicatorPositionOfDestinationProductionScheduleItem","hasDroppedInsideProductionSchedulePath","targetIndexOfDestinationProductionScheduleItem","verticalPosition","ProductionScheduleItemInPathGroupContainerComponent_ng_container_0_Template","ProductionScheduleItemInPathGroupContainerComponent_ng_template_1_Template","ProductionScheduleItemInPathGroupContainerComponent__svg_svg_3_Template","detailViewMode_r4","ProductionScheduleItemInPathGroupRepeatIndicatorNewComponent","_ProductionScheduleItemInPathGroupRepeatIndicatorNewComponent","REPEAT_INDICATOR_LABEL_CONTAINER_PADDING","repeatIndicatorLabelContainerXPosition","canShowRepeatIndicatorLabel","setRepeatIndicatorLabelAttributes","setCanShowRepeatIndicatorLabel","repeatIndicatorLabel","containerWidth","repeatIndicatorLabelContainer","ProductionScheduleItemInPathGroupRepeatIndicatorNewComponent__svg_rect_1_Template","ProductionScheduleItemInPathGroupRepeatIndicatorNewComponent__svg_text_2_Template","getPathItemStyle","getPathItemHeight","ProductionScheduleItemInPathGroupNewComponent_ng_container_0__svg_svg_1__svg_rect_7_Template","ProductionScheduleItemInPathGroupNewComponent_ng_container_0__svg_svg_1__svg_rect_8_Template","ProductionScheduleItemInPathGroupNewComponent_ng_container_0__svg_svg_1__svg_rect_9_Template","ProductionScheduleItemInPathGroupNewComponent_ng_container_0__svg_svg_1__svg_rect_10_Template","ProductionScheduleItemInPathGroupNewComponent_ng_container_0__svg_svg_1__svg_text_11_Template","canShowBorder","canShowProductionScheduleItemPathLabel","ProductionScheduleItemInPathGroupNewComponent_ng_container_0__svg_svg_1_Template","ProductionScheduleItemInPathGroupNewComponent_ng_container_0_ng_template_2_Template","ProductionScheduleItemInPathGroupNewComponent_ng_template_1__svg_rect_6_Template","ProductionScheduleItemInPathGroupNewComponent_ng_template_1__svg_text_7_Template","getTooltipText","canShowProductionScheduleItemNonRecolorableLabel","ProductionScheduleItemInPathGroupNewComponent","_ProductionScheduleItemInPathGroupNewComponent","productionScheduleItemInPathGroupHeight","PRODUCTION_SCHEDULE_ITEM_LABEL_CONTAINER_PADDING","setCanShowBorder","setProductionScheduleItemInPathGroupHeight","setProductionScheduleItemLabelContainersAttributes","setCanShowProductionScheduleItemLabels","pathItem","scheduleItemType","_rgbValues$rgb","_rgbValues$rgb2","_rgbValues$rgb3","rgbValues","commercialHeightInCM","LocaleUtils","formatNumber","canShowProductionScheduleItemLabel","productionScheduleItemPathLabel","productionScheduleItemNonRecolorableLabel","getAdjustedWidth","pixels","getAdjustedHeight","setProductionScheduleItemLabelContainerAttributes","productionScheduleItemPathLabelContainer","productionScheduleItemNonRecolorableLabelContainer","convertedValue","labelBoundingBox","ProductionScheduleItemInPathGroupNewComponent_ng_container_0_Template","ProductionScheduleItemInPathGroupNewComponent_ng_template_1_Template","ProductionScheduleItemInPathGroupContainerNewComponent_ng_container_0__svg_svg_3_Template","ProductionScheduleItemInPathGroupContainerNewComponent","_ProductionScheduleItemInPathGroupContainerNewComponent","cutbarHeight","proportionalCutbarHeight","cutbarBeforeHeightInfo","cutbarAfterHeightInfo","ProductionScheduleItemInPathGroupContainerNewComponent_ng_container_0_Template","productionScheduleItemInPathGroup_r3","productionScheduleItemInPathGroupIndex_r4","ctx_r4","openHoverInfoTooltip","ctx_r5","closeHoverInfoTooltip","ProductionSchedulePathOfColoredYarnSetNewComponent_ng_container_1__svg_svg_1_Template","productionScheduleItemInPathGroupIndex_r8","productionScheduleItemInPathGroup_r7","ProductionSchedulePathOfColoredYarnSetNewComponent_ng_container_2__svg_svg_1_Template","onClickProductionSchedulePathEditOverlay","ProductionSchedulePathOfColoredYarnSetNewComponent","_ProductionSchedulePathOfColoredYarnSetNewComponent","productionSchedulePathSeparatorWidth","dragInitializedOnCurrentProductionSchedulePath","canOpenHoverInfoTooltip","DIALOG_WIDTH","REPOSITION_DIALOG_CLASSES","onDragLeaveProductionSchedulePath","initialiseProductionSchedulePathOfColoredYarnSetComponent","setProductionSchedulePathOfColoredYarnSetAttributes","setProductionSchedulePathOfColoredYarnSetEventHandlers","_this$dialogRef","listenerMouseEnter","listenerMouseLeave","listenerMouseClick","getProductionSchedulePathOfColoredYarnSetWidth","deleteProductionSchedulePath","itemInPathGroupComponents","itemInPathGroupComponent","getProductionSchedulePathSeparatorHorizontalPosition","_this$dialogRef2","_productionScheduleIt","_productionScheduleIt2","_productionScheduleIt3","_productionScheduleIt4","_productionScheduleIt5","_productionScheduleIt6","_this$getOrderlinePro","_this$getOrderlinePro2","_this$getOrderlinePro3","_this$getOrderlinePro4","_this$getOrderlinePro5","_this$getOrderlinePro6","_this$getOrderlinePro7","_productionScheduleIt7","_productionScheduleIt8","showArrow","verticalOffset","moveWithCursor","getFinishingName","getOrderlineProperty","salesOrderLineReference","salesOrderReference","customerReference","desiredDate","convertToCommercialUnitCentimeter","_this$dialogRef3","isMousePositionInLeftSideOfPath","droppedNewDrawingOnProductionSchedulePath","addDroppedDrawingToProductionSchedulePath","children","closestProductionScheduleItemInPathGroupComponent","enoughWidthToAddProductionScheduleItemToProductionSchedulePath","isInLeftSideOfPath","draggedNewDrawingOverProductionSchedulePath","_productionScheduleIt9","_bmpProductionSchedul","bmpProductionScheduleItem","drawProductionScheduleItemInPathGroupDropIndicator","last","productionSchedulePathOfColoredYarnSetElement","getProductionSchedulePathPosition","productionSchedulePathInColoredYarnSetElement","onMouseEnter","onMouseLeave","onDragEndProductionSchedulePath","isDraggingProductionSchedulePath","onDragProductionSchedulePath","onDragInitializeProductionSchedulePath","destinationOfDraggedProductionSchedulePath","destinationOfDraggedProductionSchedulePathElement","destinationOfDraggedProductionSchedulePathClassList","canMoveProductionSchedulePathToColoredYarnSet","targetPositionOfDraggedProductionSchedulePathInColoredYarnSetPath","getTargetPositionOfDraggedProductionSchedulePathInColoredYarnSetPath","restoreProductionSchedulePathClone","draggedProductionSchedulePath","draggedProductionSchedulePathNode","productionScheduleColoredYarnSetOfDraggedProductionSchedulePath","cloneOfDraggedProductionSchedulePath","getTargetIndexOfDestinationProductionSchedulePath","productionSchedulePathElementsInColoredYarnSet","getProductionSchedulePathElementsInColoredYarnSet","indexOfDestinationProductionSchedulePath","destinationColoredYarnSetElement","handleDropOnProductionSchedulePath","handleDropOnProductionScheduleColoredYarnSet","targetIndexOfDraggedProductionSchedulePath","moveDraggedProductionSchedulePathToProductionScheduleColoredYarnSet","moveProductionSchedulePathToColoredYarnSet","canRepositionProductionSchedulePathBeforeVerification","sumBy","canRepositionProductionSchedulePathAfterVerification","totalWidthInDentsOfPreviousColoredYarnSets","removeProductionSchedulePathFromProductionSchedulePathsOfColoredYarnSet","removeProductionSchedulePath","hasConfirmed","foundOrderLine","ProductionSchedulePathOfColoredYarnSetNewComponent_ng_container_1_Template","ProductionSchedulePathOfColoredYarnSetNewComponent_ng_container_2_Template","ProductionSchedulePathOfColoredYarnSetNewComponent__svg_rect_4_Template","productionScheduleItemInPathGroupIndex_r2","productionScheduleItemInPathGroup_r1","ProductionSchedulePathOfColoredYarnSetComponent","_ProductionSchedulePathOfColoredYarnSetComponent","ProductionSchedulePathOfColoredYarnSetComponent__svg_svg_1_Template","ProductionSchedulePathOfColoredYarnSetComponent__svg_rect_3_Template","ProductionScheduleListviewColumnType","STATUS","QUANTITY","HEIGHT","TOTAL_WOVEN_HEIGHT","COLOR_MAIN","COLOR_BORDER","FINISHING_AND_CUTBARS_LABEL","SHAPE","PRODUCTION","OPEN_IN_CADCAM","GetProductionScheduleColoredYarnSetPathsPipe","_GetProductionScheduleColoredYarnSetPathsPipe","hasProductionSchedulePaths","getPathNumber","productionScheduleColoredYarnSetsToIterate","CalculateDimensionsBasePipe","calculateDimensions","dimension","getUnitLabel","technicalUnit","CalculateDimensionsOfProductionScheduleItemPipe","_CalculateDimensionsOfProductionScheduleItemPipe","calculateLength","GetProductionScheduleItemColorPipe","_GetProductionScheduleItemColorPipe","isMainColor","getUniqueItems","column_r3","changeVisibleColumn","isVisibleColumn","isSelectedColumn","ColumnFilterComponent","_ColumnFilterComponent","updateVisibleColumns","updatePinnedLeftColumns","updatePinnedRightColumns","updateUnpinnedColumns","autoSizeSelectedColumn","autoSizeAllColumns","resetAllColumns","mouseEnter","timedOutCloser","trigger","openMenu","mouseLeave","closeMenu","visibleColumns","visibleColumn","selectedColumn","areAllColumnsVisible","changeAllVisibleColumns","pinLeft","pinRight","unpin","isPinnedLeft","pinnedLeftColumns","pinnedColumn","isPinnedRight","pinnedRightColumns","isNotPinned","autosizeColumn","autosizeColumns","resetColumns","getSearchedColumns","toLower","MatMenuTrigger","ColumnFilterComponent_ng_template_2_Template","ColumnFilterComponent_mat_icon_13_Template","ColumnFilterComponent_mat_icon_17_Template","ColumnFilterComponent_mat_icon_21_Template","ColumnFilterComponent_ng_template_39_Template","ColumnFilterComponent_div_46_Template","pinColumn_r5","CalculateDimensionsOfProductionSchedulePathPipe","_CalculateDimensionsOfProductionSchedulePathPipe","CalculateDimensionsOfProductionScheduleColoredYarnSetPipe","_CalculateDimensionsOfProductionScheduleColoredYarnSetPipe","CalculateRestLengthOfProductionSchedulePathPipe","_CalculateRestLengthOfProductionSchedulePathPipe","getProductionScheduleLengthInPicks","getProductionScheduleLengthInMillimeters","GetUnpinnedColumnsPipe","_GetUnpinnedColumnsPipe","unpinnedColumns","unpinnedColumn","CalculateCutbarsDimensionsForProductionScheduleItemPipe","_CalculateCutbarsDimensionsForProductionScheduleItemPipe","cutbarBeforeLength","cutbarAfterLength","GetProductionScheduleItemTotalWovenHeightPipe","_GetProductionScheduleItemTotalWovenHeightPipe","totalWovenHeightInPicks","unitTranslation","totalWovenHeightInMM","productionSchedulePathsOfColoredYarnSet_r4","showColorSetDetailsWithYarnConsumption","ProductionScheduleListviewComponent_mat_expansion_panel_7_div_18_span_5_Template","hasYarnConsumptionPermission","onProductionSchedulePathOrProductionScheduleItemDrag","productionSchedulePathElement_r10","productionSchedulePathsOfColoredYarnSetIndex_r8","onProductionSchedulePathDragStart","onProductionSchedulePathOrProductionScheduleItemDragEnd","ProductionScheduleListviewComponent_mat_expansion_panel_7_mat_expansion_panel_20_ng_container_32_div_1_Template","canShowMaximumBuggyLengthWarning","productionSchedulePath_r11","columnHeaders_r13","column_r12","column_r14","column_r15","onDraggedDrawingEntersEmptyProductionScheduleItem","onDraggedDrawingLeavesEmptyProductionScheduleItem","onDraggedProductionScheduleItemOrProductionSchedulePathDropsOnProductionSchedulePath","handleDragOverEvents","productionScheduleItemHeightInPx","classNameForProductionScheduleItem","classNameForEmptyElements","columnBody_r24","column_r19","productionScheduleItem_r21","productionScheduleItemIndex_r18","productionScheduleItemElement_r22","column_r25","column_r26","onDraggedDrawingOverProductionScheduleItem","onDraggedDrawingLeavesProductionScheduleItem","onDraggedDrawingDroppedOnProductionScheduleItem","ProductionScheduleListviewComponent_mat_expansion_panel_7_mat_expansion_panel_20_div_40_ng_container_2_Template","ProductionScheduleListviewComponent_mat_expansion_panel_7_mat_expansion_panel_20_div_40_ng_container_3_Template","ProductionScheduleListviewComponent_mat_expansion_panel_7_mat_expansion_panel_20_div_40_ng_container_5_Template","onDraggedProductionScheduleItemOrProductionSchedulePathEntersProductionSchedulePath","onDraggedProductionScheduleItemOrProductionSchedulePathLeavesProductionSchedulePath","ProductionScheduleListviewComponent_mat_expansion_panel_7_mat_expansion_panel_20_mat_icon_4_Template","ProductionScheduleListviewComponent_mat_expansion_panel_7_mat_expansion_panel_20_ng_container_32_Template","ProductionScheduleListviewComponent_mat_expansion_panel_7_mat_expansion_panel_20_ng_container_35_Template","ProductionScheduleListviewComponent_mat_expansion_panel_7_mat_expansion_panel_20_ng_container_36_Template","ProductionScheduleListviewComponent_mat_expansion_panel_7_mat_expansion_panel_20_ng_container_38_Template","ProductionScheduleListviewComponent_mat_expansion_panel_7_mat_expansion_panel_20_div_39_Template","ProductionScheduleListviewComponent_mat_expansion_panel_7_mat_expansion_panel_20_div_40_Template","classNameForPath","canShowDragHandleForProductionSchedulePath","permissionToViewBuggyLengthWarning","productionSchedulePathHasProductionScheduleItems","trackProductionScheduleItem","_r27","ProductionScheduleListviewComponent_mat_expansion_panel_7_div_18_Template","ProductionScheduleListviewComponent_mat_expansion_panel_7_mat_expansion_panel_20_Template","ProductionScheduleListviewComponent_mat_expansion_panel_7_div_22_Template","classNameForColoredYarnSet","canCalculateYarnConsumption","trackProductionSchedulePath","nameHeader_r29","column_r28","statusHeader_r30","quantityHeader_r31","widthHeader_r32","heightHeader_r33","totalWovenHeightHeader_r34","colorMainHeader_r35","colorBorderHeader_r36","finishingAndCutbarsLabelHeader_r37","shapeHeader_r38","productionHeader_r39","editHeader_r40","cadCamHeader_r41","ProductionScheduleListviewComponent_ng_template_8_Conditional_13_ng_container_0_Template","productionScheduleListviewColumnType","ProductionScheduleListviewComponent_ng_template_8_ng_container_1_Template","ProductionScheduleListviewComponent_ng_template_8_ng_container_2_Template","ProductionScheduleListviewComponent_ng_template_8_ng_container_3_Template","ProductionScheduleListviewComponent_ng_template_8_ng_container_4_Template","ProductionScheduleListviewComponent_ng_template_8_ng_container_5_Template","ProductionScheduleListviewComponent_ng_template_8_ng_container_6_Template","ProductionScheduleListviewComponent_ng_template_8_ng_container_7_Template","ProductionScheduleListviewComponent_ng_template_8_ng_container_8_Template","ProductionScheduleListviewComponent_ng_template_8_ng_container_9_Template","ProductionScheduleListviewComponent_ng_template_8_ng_container_10_Template","ProductionScheduleListviewComponent_ng_template_8_ng_container_11_Template","ProductionScheduleListviewComponent_ng_template_8_ng_container_12_Template","ProductionScheduleListviewComponent_ng_template_8_Conditional_13_Template","hasViewEpPermission","_r42","selectColumn","menu_r43","ProductionScheduleListviewComponent_ng_template_10_div_0_Template","isColumnVisible","column_r44","_r45","ProductionScheduleListviewComponent_ng_template_12_div_0_Template","column_r46","_r47","ProductionScheduleListviewComponent_ng_template_14_div_0_Template","column_r48","_r49","ProductionScheduleListviewComponent_ng_template_16_div_0_Template","column_r50","_r51","ProductionScheduleListviewComponent_ng_template_18_div_0_Template","column_r52","_r53","ProductionScheduleListviewComponent_ng_template_20_div_0_Template","column_r54","_r55","ProductionScheduleListviewComponent_ng_template_22_div_0_Template","column_r56","_r57","ProductionScheduleListviewComponent_ng_template_24_div_0_Template","column_r58","_r59","ProductionScheduleListviewComponent_ng_template_26_div_0_Template","column_r60","_r61","ProductionScheduleListviewComponent_ng_template_28_div_0_Template","column_r62","_r63","canExecuteActionsOnProductionScheduleItem","ProductionScheduleListviewComponent_ng_template_30_div_0_Template","column_r64","ProductionScheduleListviewComponent_ng_template_32_div_0_Template","column_r65","ProductionScheduleListviewComponent_ng_template_34_div_0_Template","column_r66","name_r74","column_r68","productionScheduleItem_r69","productionScheduleItemIndex_r70","productionSchedulePathIndex_r71","productionSchedulePathsOfColoredYarnSetIndex_r72","productionScheduleItemElement_r73","status_r75","quantity_r76","_c10","width_r77","height_r78","totalWovenHeight_r79","colorMain_r81","productionSchedulePathsOfColoredYarnSet_r80","colorBorder_r82","finishingAndCutbarsLabel_r83","shape_r84","production_r85","edit_r86","cadCam_r87","_c12","ProductionScheduleListviewComponent_ng_template_40_Conditional_13_ng_container_0_Template","ProductionScheduleListviewComponent_ng_template_40_ng_container_1_Template","ProductionScheduleListviewComponent_ng_template_40_ng_container_2_Template","ProductionScheduleListviewComponent_ng_template_40_ng_container_3_Template","ProductionScheduleListviewComponent_ng_template_40_ng_container_4_Template","ProductionScheduleListviewComponent_ng_template_40_ng_container_5_Template","ProductionScheduleListviewComponent_ng_template_40_ng_container_6_Template","ProductionScheduleListviewComponent_ng_template_40_ng_container_7_Template","ProductionScheduleListviewComponent_ng_template_40_ng_container_8_Template","ProductionScheduleListviewComponent_ng_template_40_ng_container_9_Template","ProductionScheduleListviewComponent_ng_template_40_ng_container_10_Template","ProductionScheduleListviewComponent_ng_template_40_ng_container_11_Template","ProductionScheduleListviewComponent_ng_template_40_ng_container_12_Template","ProductionScheduleListviewComponent_ng_template_40_Conditional_13_Template","_r88","cellElement_r89","ctx_r89","productionScheduleItem_r91","productionScheduleItemIndex_r92","productionScheduleItemIndex","productionSchedulePathIndex_r93","productionSchedulePathsOfColoredYarnSetIndex_r94","productionSchedulePathsOfColoredYarnSetIndex","productionScheduleItemElement_r95","productionScheduleItemElement","onProductionScheduleItemDragStart","ProductionScheduleListviewComponent_ng_template_42_div_0_ng_container_3_mat_icon_1_Template","canDragProductionScheduleItem","ProductionScheduleListviewComponent_ng_template_42_div_0_ng_container_3_Template","allowProductionScheduleItemsToBeEdited","ProductionScheduleListviewComponent_ng_template_42_div_0_Template","column_r96","productionScheduleItemInPathGroupStatus","productionScheduleItem_r97","getProductionScheduleItemStatusTranslationKey","ProductionScheduleListviewComponent_ng_template_44_div_0_Template","column_r98","productionScheduleItem_r100","_c13","amountIncomplete","ProductionScheduleListviewComponent_ng_template_46_div_0_ng_container_1_ng_container_2_Template","ProductionScheduleListviewComponent_ng_template_46_div_0_ng_container_1_span_5_Template","canShowAmountProduced","_r101","ctx_r101","productionScheduleItemIndex_r103","productionSchedulePathIndex_r104","productionSchedulePathsOfColoredYarnSetIndex_r105","editQuantity","incrementQuantity","decrementQuantity","getProductionScheduleItemEditableQuantityPropertyValue","_r99","toggleSelectedQuantityInput","ProductionScheduleListviewComponent_ng_template_46_div_0_ng_container_1_Template","ProductionScheduleListviewComponent_ng_template_46_div_0_mat_form_field_2_Template","canShowQuantityInput","ProductionScheduleListviewComponent_ng_template_46_div_0_Template","column_r106","productionScheduleItem_r107","ProductionScheduleListviewComponent_ng_template_48_div_0_Template","column_r108","productionScheduleItem_r109","ProductionScheduleListviewComponent_ng_template_50_div_0_Template","column_r110","productionScheduleItem_r111","ProductionScheduleListviewComponent_ng_template_52_div_0_Template","column_r112","productionScheduleItem_r114","productionSchedulePathsOfColoredYarnSet_r115","ProductionScheduleListviewComponent_ng_template_54_div_0_Template","column_r116","productionScheduleItem_r118","productionSchedulePathsOfColoredYarnSet_r119","ProductionScheduleListviewComponent_ng_template_56_div_0_Template","column_r120","_r121","productionScheduleItem_r122","ProductionScheduleListviewComponent_ng_template_58_div_0_ng_container_2_Template","ProductionScheduleListviewComponent_ng_template_58_div_0_span_3_Template","ProductionScheduleListviewComponent_ng_template_58_div_0_Template","column_r123","getLabelForProductionScheduleItemDrawingShape","productionScheduleItem_r124","ProductionScheduleListviewComponent_ng_template_60_div_0_Template","column_r125","isProductionScheduleItemOnProduction","productionScheduleItem_r126","ProductionScheduleListviewComponent_ng_template_62_div_0_Template","column_r127","_r128","ctx_r128","productionScheduleItem_r130","productionScheduleItemIndex_r131","productionSchedulePathIndex_r132","productionSchedulePathsOfColoredYarnSetIndex_r133","showEditProductionScheduleItemDialog","ProductionScheduleListviewComponent_ng_template_64_div_0_button_1_Template","ProductionScheduleListviewComponent_ng_template_64_div_0_Template","column_r134","_r135","productionScheduleItem_r136","openCadCam","ProductionScheduleListviewComponent_ng_template_66_div_0_Template","column_r137","ProductionScheduleListviewComponent","_ProductionScheduleListviewComponent","yarnConsumption","profile","getProductionScheduleColoredYarnSetPathsPipe","calculateDimensionsOfProductionScheduleItemPipe","getProductionScheduleItemColor","localStorage","cadCamService","showQuantityInput","viewEPPermission","TEXEDIT_VIEW_EP","errorContextForMissingMachineQualityParameters","classNameForDropIndicator","classNameForDraggedElement","productionScheduleItemCellPaddingInPx","viewYarnConsumption","TEXFAB_YARNCONSUMPTION","autoSizedColumns","autoSizedAll","changedElementInfo","listOfClassesThatShouldNotCloseQuantityInputOnClick","onOutsideQuantityInputMouseDown","selectedProductionScheduleItem","isClickOutsideGivenElements","closeQualityInput","initialProductionSchedule","clone","setVisibleColumns","getData","draggedListViewItem","isNewItem","scrollChangedElementIntoView","autoSizeColumn","isProductionItem","yesLabel","noLabel","canShowCutbarsRepresentingLabelForProductionScheduleItem","startDentOfColoredYarnSet","CHANGED","getExternalApplicationLink","isItemBeingDraggedAProductionSchedulePath","removeDropIndicatorClassFromElement","canShowDropIndicator","draggedProductionScheduleItemColoredYarnSetDifferentFromTargetColoredYarnSet","draggedProductionScheduleItemPathDifferentFromTargetPath","draggedProductionScheduleItemDifferentFromTargetItem","isMouseOnBottomHalfOfTarget","isMouseOnBottomHalfOfRow","isMouseOnBottomHalfOfPreviousItem","isMouseOnTopHalfOfNextItem","addProductionScheduleItemDropIndicator","relatedTarget","removeProductionScheduleItemDropIndicator","productionScheduleItemDropIndicator","openAlertDialogForNotEnoughWidth","newProductionScheduleItemIndex","getNewProductionScheduleItemIndex","removeDragPreviewElement","canShowPathDropIndicatorForDraggedPath","canShowPathDropIndicatorForDraggedDrawing","newProductionSchedulePathIndex","cellElement","dragPreviewElementDOMRect","createDragPreviewElement","dragPreviewElement","removeStyle","body","screenX","screenY","trackProductionScheduleColoredYarnSet","productionSchedulePathElement","productionSchedulePathHeaderElement","getElementById","_headerId","expandIconElement","querySelector","removeChild","colorList","calculateYarnConsumptionForProductionOrder","showErrorDialogForBackendError","showYarnConsumption","isPartiallyOrCompletelyExecuted","canShowStatusAndTotalWovenHeight","columnValue","columnType","saveVisibleColumns","setColumnSize","elementClass","elements","_this$quantityInput","quantityInput","focus","editableProductionScheduleItemQuantityValue","updateProductionScheduleItemEditableQuantityProperty","createQuantityInputSubject","quantityInputSubject","_this$quantityInputSu","storedVisibleColumns","isStatusAtleastProcessed","storedColumn","columnTitle","extraWidth","columnSize","getSizeFromValueFromColumnCell","filterIconDiscountSize","fontSize","averageCharSize","eventY","productionScheduleItemElementboundingDOMRect","yPosition","mouseYPosition","baseElementForDragPreview","dummyPreview","getListDrawingFromProductionScheduleItem","originColoredYarnSetDifferentFromTargetColoredYarnSet","originPathHasMoreThanOneProductionScheduleItem","draggedToEndOfOriginColoredYarnSet","originPathNotTheLastOfOriginColoredYarnSet","targetPathDifferentFromOriginPathAndPathBelowOrigin","draggedToSamePath","changedElementIsProductionScheduleItem","isLastPath","elementToScrollTo","emptyPathElement","nextElementSibling","listviewContainer","scrollIntoView","getExternalApplicationKey","externalApplicationKey","btoa","epId","productionScheduleItemFromInitialProductionSchedule","NORMAL","YARN_CONSUMPTION","PROFILE","ProductionScheduleListviewComponent_mat_expansion_panel_7_Template","ProductionScheduleListviewComponent_ng_template_8_Template","ProductionScheduleListviewComponent_ng_template_10_Template","ProductionScheduleListviewComponent_ng_template_12_Template","ProductionScheduleListviewComponent_ng_template_14_Template","ProductionScheduleListviewComponent_ng_template_16_Template","ProductionScheduleListviewComponent_ng_template_18_Template","ProductionScheduleListviewComponent_ng_template_20_Template","ProductionScheduleListviewComponent_ng_template_22_Template","ProductionScheduleListviewComponent_ng_template_24_Template","ProductionScheduleListviewComponent_ng_template_26_Template","ProductionScheduleListviewComponent_ng_template_28_Template","ProductionScheduleListviewComponent_ng_template_30_Template","ProductionScheduleListviewComponent_ng_template_32_Template","ProductionScheduleListviewComponent_ng_template_34_Template","ProductionScheduleListviewComponent_ng_template_40_Template","ProductionScheduleListviewComponent_ng_template_42_Template","ProductionScheduleListviewComponent_ng_template_44_Template","ProductionScheduleListviewComponent_ng_template_46_Template","ProductionScheduleListviewComponent_ng_template_48_Template","ProductionScheduleListviewComponent_ng_template_50_Template","ProductionScheduleListviewComponent_ng_template_52_Template","ProductionScheduleListviewComponent_ng_template_54_Template","ProductionScheduleListviewComponent_ng_template_56_Template","ProductionScheduleListviewComponent_ng_template_58_Template","ProductionScheduleListviewComponent_ng_template_60_Template","ProductionScheduleListviewComponent_ng_template_62_Template","ProductionScheduleListviewComponent_ng_template_64_Template","ProductionScheduleListviewComponent_ng_template_66_Template","SwitchCommercialTechnicalUnitsCustomSettingsDialogComponent","_SwitchCommercialTechnicalUnitsCustomSettingsDialogComponent","unitTypes","selectedUnitTypeChanged","commercialDimensionsTranslationKey","selectedUnitType","onUnitTypeChanged","viewAllSettings","NavigationUtils","getAbsolutePath","NavigationId","CARPET_PRODUCTION_SCHEDULE_SETTINGS","COMMERCIAL","lodash_es_assign","createAssigner","isPrototype","isArrayLike","copyObject","assignValue","selectedOrderLinesChanged","MIN_DRAWING_LIBRARY_WIDTH_IN_PX","initialDrawingLibraryWidthInPx","canShowSelectedItems","onResizerMouseDown","resizerWidthInPx","canShowWarningWithText","onEditProductionSchedulePathsInColoredYarnSetToggle","zoomOut","zoomIn","productionScheduleDisplay","ProductionSchedulePlanComponent_ng_container_32_app_progress_spinner_1_Template","ProductionSchedulePlanComponent_ng_container_32_app_progress_spinner_2_Template","canShowIsWeavePlanLoadingIcon","canShowIsWeavePlanBuildingIcon","onCanZoomInChanges","onCanZoomOutChanges","canEditProductionScheduleItems","ProductionSchedulePlanComponent","sideNavigationStateService","productionScheduleBuilderPageStateManager","preselectedOrderlineIds","returnToProductionSchedulePhase","verifiedProductionSchedule","isVerifyingProductionSchedule","isResizing","maxWarningWidth","productionScheduleHeight","hasProductionScheduleLoaded","isBuildingProductionSchedule","zoomFactor","zoomOutClickSubject","zoomInClickSubject","_productionSchedulePhase","isVerifyingFromConfigurePhase","isExecuted","getProductionScheduleBuilderPageState","builderContainer","setWarningTextVisibility","initProductionSchedulePathsForEachColoredYarnSet","initialiseProductionSchedulePlan","subscribeToZoomInChanges","subscribeToZoomOutChanges","subscribeToNavigationStateChanges","getProductionScheduleHeight","changedSelectedProductionScheduleDisplay","matSelectChange","updateProductionScheduleBuilderPageState","listDrawings","accumulatedDrawings","updateDrawingsAndOrderLinesOfProductionSchedule","canShowDetailView","canShowListView","canShowOverview","canShowDrawingLibrary","canVerifyProductionSchedule","canVerify","verifyProductionSchedule","confirmImmediately","back","removePathLabelsAndNonProductionItemsFromProductionSchedulePathsOfColoredYarnSets","cancelOngoingRecoloring","handleBackendError","PRESELECTION","canShowIsWeavePlanVerifyingIcon","scrollIntoWeavePlanSummary","expansionPanelHeader","expansionPanel","productionSchedulePlanWrapperRect","productionSchedulePlanWrapper","expansionPanelHeaderRect","behavior","canShowErrorsAndWarnings","totalLossInPercent","isCreelMappingApplied","selectedOrderLine","getProductionSchedulePracticalPickDensity","cancelMouseMoveListener","mouseMoveEvent","onResizerMouseMove","cancelMouseUpListener","updateDrawingLibraryWidth","drawingLibraryWidthInPx","drawingLibrary","hasAddedDesigns","calculateProductionScheduleHeight","setBuggyLength","didPatchProductionSchedulePlan","roleCode","buggyLengthMin","buggyLengthMinInMM","buggyLengthMax","buggyLengthMaxInMM","getZoomLevel","ErrorHandlers","navigateToOverviewAndThrowError","urlToProductionScheduleOverview","onNavigationStateChanged","productionScheduleBuilderState","_this$drawingLibrary$","_this$drawingLibrary","_this$zoomInContainer","_this$zoomInContainer2","_this$zoomOutContaine","_this$zoomOutContaine2","_this$customSettingsC","_this$customSettingsC2","_this$editPathsToggle","_this$editPathsToggle2","_this$viewSelectorCon","_this$viewSelectorCon2","errorsAndWarningsContainer","warningMargin","marginRight","zoomInWidth","zoomInContainer","zoomOutWidth","zoomOutContainer","customSettingsWidth","customSettingsContainer","staticWidth","editPathsToggleContainer","viewSelectorContainer","buttonsContainer","PADDING_WIDTH_IN_PX","_ProductionSchedulePlanComponent","MARGIN_WIDTH_IN_PX","CARPET_PRODUCTION_ORDER","MatExpansionPanel","ProductionSchedulePlanComponent_app_production_schedule_drawing_library_3_Template","ProductionSchedulePlanComponent_div_4_Template","ProductionSchedulePlanComponent_app_errors_and_warnings_14_Template","ProductionSchedulePlanComponent_mat_slide_toggle_15_Template","ProductionSchedulePlanComponent_ng_container_16_Template","customSettingsContainer_r7","ProductionSchedulePlanComponent_mat_option_24_Template","ProductionSchedulePlanComponent_mat_option_25_Template","ProductionSchedulePlanComponent_app_progress_spinner_31_Template","ProductionSchedulePlanComponent_ng_container_32_Template","ProductionSchedulePlanComponent_app_production_schedule_builder_33_Template","ProductionSchedulePlanComponent_app_production_schedule_listview_34_Template","updateProductionSchedulePathsOfColoredYarnSets","indexOfColoredYarnSet","ArrayUtils","convertFalsyValuesToZeroAndGetMaxValue","previousProductionScheduleColoredYarnSetPath","previousProductionSchedulePath","AddDrawingToColoredYarnSetCommand","commandArgs","indexInColoredYarnSet","uuidForProductionScheduleInPathGroup","getProductionScheduleColoredYarnSetAtStartDent","adjustUuid","newProductionSchedulePath","addPathToEndOfColoredYarnSet","addPathGivenPositionInColoredYarnSet","totalWidthInDentsOfProductionSchedulePaths","splice","AddDrawingToProductionSchedulePathCommand","actionArgs","indexInProductionSchedulePath","productionSchedulePathNumber","getProductionSchedulePath","EditProductionScheduleItemCommand","getProductionSchedulePathAt","setProductionScheduleItemInPathGroupAt","LoadingState","DONE","BUSY","applyChangesToNewProductionScheduleItemInPathGroup","newProductionScheduleItemInPathGroup","NotImplementedError","RemoveProductionSchedulePathCommand","RemoveProductionScheduleItemCommand","productionScheduleItemInPathGroupUuid","getProductionScheduleItemInPathGroup","indexOfProductionScheduleItemInPathGroup","MoveProductionScheduleItemToColoredYarnSetCommand","sourceProductionSchedulePathNumber","startDentOfSourceColoredYarnSet","startDentOfDestinationColoredYarnSet","dpi","recolorDrawing","mappingForDesign","MoveProductionScheduleItemToProductionSchedulePathCommand","indexInDestinationProductionSchedulePath","destinationProductionSchedulePathNumber","recoloredDrawing","MoveProductionSchedulePathToColoredYarnSetCommand","indexInProductionSchedulePathsOfColoredYarnSet","pathIndex","updateDrawingInfoOnPathGroups","productionSchedulePathStartDent","listDrawingForProductionScheduleItems","ProductionSchedulePathLabelDrawingsCache","pathlabelDrawingsMap","hasPathLabelDrawingBeenLoaded","cachedPathLabelDrawingReference","getPathLabelDrawingCachedReference","getRecoloredPathLabelDrawingReferenceId","clearNonLoadedPathLabelDrawings","UpdateDrawingsAndOrderLinesOfProductionScheduleCommand","RemoveProductionScheduleItemsCommand","removeProductionScheduleItemCommand","RecolorService","_RecolorService","recolorErrorCatch","getRecolorErrorCatch","setRecolorErrorCatch","ProductionSchedulePlanService","_ProductionSchedulePlanService","toastService","recolorService","orderlinesGridService","productionSchedulePathLabelDrawingsCache","updatedProductionScheduleSubject","editingPathsSubject","BehaviorSubject","patchProductionSchedulePlanSubject","selectedZoneSubject","addDrawingToColoredYarnSetCommand","addDrawingToProductionSchedulePathCommand","removeProductionScheduleItemsCommand","removeProductionSchedulePathCommand","editProductionScheduleItemCommand","moveProductionScheduleItemToProductionSchedulePathCommand","moveProductionScheduleItemToColoredYarnSetCommand","moveProductionSchedulePathToColoredYarnSetCommand","updateDrawingsAndOrderLinesOfProductionScheduleCommand","hasChangesThatAreNotSaved","queuedProductionSchedulePlanActions","queuedProductionScheduleItemsToRecolor","definedProductionSchedulePlanActions","parameters","updateDrawingsAndOrderLinesOfProductionScheduleOperation","cancelOngoingRecoloringSubject","operationsThatRequireProductionScheduleItemsToBeRecolored","addDrawingToColoredYarnSetOperation","addDrawingToProductionSchedulePathOperation","moveProductionScheduleItemToColoredYarnSetOperation","moveProductionScheduleItemToProductionSchedulePathOperation","moveProductionSchedulePathToColoredYarnSetOperation","discardUnsavedChanges","initializeProductionScheduleSubject","recolorProductionScheduleIfNeeded","discardTemporarySavedChanges","cancelTemporarySavedChanges","selectDrawingOrOrderLineIfNotAlreadySelected","isProcessing","operation","postExecute","at","getProductionScheduleWithAllRemainingActionsApplied","processFirstItemInQueuedProductionSchedulePlanActions","manualSaveProductionSchedule","disableUnsavedChanges","showInfoToastAndContinue","addPathLayoutTemplates","setProductionSchedulePlan","patchedProductionSchedule","updateOrderLineQuantities","updatePathLengths","cleanUpAndHandleNextItemInQueue","hasNoPaths","_productionSchedule$p","removeProductionScheduleItemOperation","onSuccess","removeProductionScheduleItemsOperation","removeProductionSchedulePathOperation","editProductionScheduleItemOperation","indexInSourceProductionSchedulePath","shouldMoveProductionScheduleItemToProductionSchedulePath","productionScheduleItemsOfProductionSchedulePath","getUniqueProductionScheduleItems","currentProductionSchedule","hasAtLeastOneProductionScheduleItemPerColoredYarnSet","setProductionSchedule","isInSamePath","isOnSamePositionOfSamePath","hasOnlyOneProductionScheduleItemInSamePath","recolorProductionScheduleItem","onProductionScheduleItemRecolored","onProductionScheduleItemRecoloredFailed","imageId","currentRatio","outputHeight","outputWidth","outputDimensionsInPx","finishingId","cleanUpAndRecolorNextProductionScheduleItemInQueue","getRecoloredImageConfiguration","drawingRecolorInformation","mainColorsCreelPosition","borderColorsCreelPosition","commercialDimensionsInMm","loadPathLabelIfNeeded","onPathLabelLoadedWhenNotCachedYet","onPathLabelAlreadyCached","onPathLabelLoadedFailed","getRecoloredPathLabelImage","firstItemInQueue","parametersWithProductionSchedule","productionScheduleToAdjust","saveDesignsAndOrderLines","recolorAllProductionScheduleItemsThatAreNotRecolored","setIsFillingPath","updateProductionOrder","adjustedProductionSchedule","itemInQueueToProcess","productionScheduleItemsWithMissingAlternativeMachineQualityOrColoredYarnSet","getNonRecoloredProductionScheduleItemsPerColoredYarnSet","nonRecoloredProductionScheduleItems","nonRecoloredProductionScheduleItem","getAmountOfNonRecoloredProductionScheduleItems","removeProductionScheduleItemsWithMissingAlternativeMachineQualityOrColoredYarnSet","BackendErrorCodeEnum","errorContext","ALTERNATIVES","getUniquePathLabelDrawingsPerColoredYarnSet","pathLabelDrawings","pathLabelDrawing","updateLoadedPathLabelDrawingInProductionSchedule","updateLoadedPathLabelDrawing","showInfo","tapToDismiss","timeOut","message","pull","processFirstItemInQueuedProductionScheduleItemsToRecolor","isRecoloring","addProductionScheduleItemToProductionScheduleItemRecolorQueue","showAlertDialog","errorMessage","zone_r2","onZoneValueChanged","$index_r4","getZoneWidthInMM","maximumTechnicalValue","getZoneInputType","ProductionScheduleZonesComponent_Conditional_0_For_2_Template","productionScheduleVerifyWidth","ProductionScheduleZonesComponent","_ProductionScheduleZonesComponent","zoneInputType","ZoneInputType","RESTZONE","FREEZONE","isDifferenceBetweenOldAndNewTechnicalWidthInDentsValid","difference","amountOfPossiblePaths","dentRepeat","isMultipleOf","ProductionScheduleZonesComponent_Conditional_0_Template","GetProductionSchedulePathsAndZonesForColoredYarnSetPipe","_GetProductionSchedulePathsAndZonesForColoredYarnSetPipe","sort","firstItem","secondItem","getProductionScheduleVerifyWidth","ProductionScheduleVerifyComponent_div_11_div_1_Conditional_1_div_1_ng_container_1_ng_container_1_mat_icon_1_Template","ProductionScheduleVerifyComponent_div_11_div_1_Conditional_1_div_1_ng_container_1_ng_container_1_mat_icon_2_Template","canShowMinimumBuggyLengthWarningForProductionSchedulePath","ProductionScheduleVerifyComponent_div_11_div_1_Conditional_1_div_1_ng_container_1_ng_container_1_Template","ProductionScheduleVerifyComponent_div_11_div_1_Conditional_1_div_1_ng_container_1_Template","ProductionScheduleVerifyComponent_div_11_div_1_Conditional_1_div_1_Template","canShowHeader","getRestZoneTooltip","ProductionScheduleVerifyComponent_div_11_div_1_Conditional_1_Template","ProductionScheduleVerifyComponent_div_11_div_1_Conditional_2_Template","ProductionScheduleVerifyComponent_div_11_div_1_div_3_Template","isRestZone","ProductionScheduleVerifyComponent_div_11_div_1_Template","ProductionScheduleVerifyComponent_div_11_div_3_Template","productionSchedulePathsOfColoredYarnSet_r9","productionScheduleColoredYarnSetIndex_r10","productionScheduleVerifyHeight","ProductionScheduleVerifyComponent__svg_svg_18__svg_ng_container_5__svg_svg_1__svg_rect_1_Template","ProductionScheduleVerifyComponent__svg_svg_18__svg_ng_container_5__svg_svg_1__svg_line_2_Template","restZone_r11","ProductionScheduleVerifyComponent__svg_svg_18__svg_ng_container_5__svg_svg_1_Template","ProductionScheduleVerifyComponent__svg_svg_18__svg_ng_container_6__svg_svg_1__svg_rect_1_Template","ProductionScheduleVerifyComponent__svg_svg_18__svg_ng_container_6__svg_svg_1__svg_line_2_Template","freeZone_r12","ProductionScheduleVerifyComponent__svg_svg_18__svg_ng_container_6__svg_svg_1_Template","ProductionScheduleVerifyComponent__svg_svg_18__svg_ng_container_7__svg_g_1_Template","ProductionScheduleVerifyComponent__svg_svg_18__svg_ng_container_7__svg_g_2_Template","canShowProductionScheduleVerifyMinBuggyLengthIndicator","canShowProductionScheduleVerifyMaxBuggyLengthIndicator","ProductionScheduleVerifyComponent__svg_svg_18__svg_svg_4_Template","ProductionScheduleVerifyComponent__svg_svg_18__svg_ng_container_5_Template","ProductionScheduleVerifyComponent__svg_svg_18__svg_ng_container_6_Template","ProductionScheduleVerifyComponent__svg_svg_18__svg_ng_container_7_Template","productionScheduleVerifyMargin","item_r13","getFlexDirection","getTotalHeight","ProductionScheduleVerifyComponent_div_26_div_1_div_2_p_1_Template","canShowTotalHeight","ProductionScheduleVerifyComponent_div_26_div_1_div_1_Template","ProductionScheduleVerifyComponent_div_26_div_1_div_2_Template","ProductionScheduleVerifyComponent_div_26_div_1_div_3_Template","ProductionScheduleVerifyComponent_div_26_div_1_Template","productionSchedulePathsOfColoredYarnSet_r14","productionScheduleColoredYarnSetIndex_r15","ProductionScheduleVerifyComponent","_ProductionScheduleVerifyComponent","distanceSpecifierOrientation","DistanceSpecifierOrientation","canShowProductionScheduleVerify","productionScheduleVerifyViewportTopPosition","originalProductionScheduleVerifyWidth","debounceSubjectInitialise","debounceSubjectReinitialise","initialiseDebounceSubjects","getOriginProductionScheduleVerifyWidth","productionScheduleVerifyContainerWidth","productionScheduleVerifyContainerHeight","reInitialiseProductionScheduleVerify","setUpDimensionsForProductionScheduleVerify","setAspectRatioAndUpdateProductionScheduleVerifyContainer","getProductionScheduleVerifyHeight","finalReInitialiseProductionScheduleVerify","productionScheduleVerifyContainer","getProductionScheduleVerifyMinBuggyLengthPosition","originalProductionScheduleVerifyHeight","getProductionScheduleVerifyMinBuggyLengthTextPositionY","getProductionScheduleVerifyMaxBuggyLengthPosition","getProductionScheduleVerifyMaxBuggyLengthTextPositionY","onScrollProductionScheduleVerifyContainer","getVerifyHeaderHeight","getProductionScheduleVerifyHorizontalAxisWidth","maxPath","currentPath","getMinimumProductionScheduleVerifyTechnicalHeight","longestPathLengthInPicks","currentAvailableSpaceForSchedule","availableSpaceInBuggyInPicks","getMinimumProductionScheduleVerifyInMM","_this$availableSpaceI","longestPathLengthInMM","getLongestPathLengthInMM","availableSpaceInMM","availableSpaceInBuggyInCommercialUnit","getProductionScheduleVerifyTechnicalWidth","getProductionScheduleVerifyCommercialWidth","_item$totalLengthInMM","totalHeightInCommercialUnit","initialiseProductionScheduleVerifyContainerDimensions","initialiseProductionScheduleVerify","scrollToBottomOfProductionScheduleVerify","setOriginalProductionScheduleVerifyHeight","productionScheduleVerify","productionScheduleVerifySelection","productionScheduleVerifyVerticalAxis","productionScheduleVerifyVerticalAxisSelection","productionScheduleVerifyHorizontalAxisSelection","verifyHeader","minProductionScheduleVerifyHeightInPicks","ProductionScheduleVerifyComponent_div_3_Template","ProductionScheduleVerifyComponent_app_production_schedule_zones_4_Template","ProductionScheduleVerifyComponent_div_11_Template","ProductionScheduleVerifyComponent__svg_svg_18_Template","ProductionScheduleVerifyComponent_app_production_schedule_zones_21_Template","ProductionScheduleVerifyComponent_div_26_Template","VERTICAL","GroupedDrawingsSelectionService","_GroupedDrawingsSelectionService","groupedDrawingsSelected","onDetailRowsSelectionChanged","selectedPath","selectedRestPathColoredYarnSet","SELECTION_STATE","PARTIAL","ALL_SELECTED","NONE_SELECTED","getGroupedDrawingsSelected","setGroupedDrawingsSelected","drawingIdsSelected","setDetailRowSelected","parentSelectionState","drawingsSelected","getdetailRowSelected","getParentSelectionState","nodeData","updateSelectedPath","updateSelectedRestPathColoredYarnSet","updateDetailCellRendererParams","GroupedDesignBaseComponent","_GroupedDesignBaseComponent","groupedDrawingsSelectionService","drawingLibraryHelper","preselectedDrawings","preselectedDesignIds","preselectedConfigurationIds","drawingIdSelected","configurationIdSelected","selectedPathOutput","selectedRestPathColoredYarnSetOutput","hasQuantitySuggestionPermission","COMMERCIAL_WIDTH_IN_CM","DETAIL_ROW_HEADER_HEIGHT","DETAIL_ROW_VERTICAL_PADDING","DETAIL_ROW_SCROLL_BAR","COLUMN_UNITS_MAP","dataFromUnit","getDisplayUnit","GROUPED_DESIGNS","showOnlyPreSelectedDrawings","readyToFetchRows","WIDTH_IN_PX","SLICE_SIZE_DETAILS","groupedGridInstance","filterViewModes","setGroupedDesignBaseComponentProperties","grid","getDetailCellRendererParams","showPreselectedItems","_settings$showPresele","onCellMouseOver","lastFocusedGroupedDrawingNodeId","parentNodeSelected","updatingFromDetails","detailDrawingConfig","configurationId","drawingIds","configurationIds","selectionState","selectThisNode","detailGrid","getDetailGridInfo","detailNode","parentState","getAndSelectDrawings","_params$node","_params$node$data$chi","initialIds","childsSelected","extraData","getGroupedServerSideDataSource","currentFilterModel","groupedGridModel","groupedBy","getGroupedByColumns","getGroupedDrawings","groupedDrawings","getGroupColumnDefinitions","getDropdownCellValue","withHeaderCheckboxSelection","withValueFormatter","_params$data$commerci","commercialDimensionsInCM","getConversionRate","_this$groupedGridInst","_this$groupedGridInst2","getPreselectedDrawingAndConfigurationIdsFilterModel","_this$groupedGridInst3","_this$groupedGridInst4","getInitializationFilterModel","selectedPathContentRowData","getTooltip","getColumn","isVisible","BackendLimitsConstants","INT32_MAX","totalGroupedRows","_this$preselectedDraw","_this$groupedGridInst5","TEXFAB_ORDERBOOK","_this$preselectedDraw2","_this$preselectedDraw3","deselectedConfigurationIds","des","deselectedDrawingIds","currentSelectedDrawings","getDrawingSet","updateSelectedDrawingAndConfigurationIds","detailGridModel","_event$node$data$qual","_event$node$data$colo","config","getDrawingConfiguration","colorSet","commercialWidthInCM","technicalWidthInPx","selectedDesignIds","selectedConfigurationIds","colorSetName","widthInCM","_drawing$configuratio","configurations","drawingConfiguration","_drawingConfiguration","DrawingConfigurationWithColorAndYarnSet","newDrawing","groupedDrawing","drawingConfiguration_r5","i_r2","selectInputContent","onFocusInput","onBlurInput","drawingConfigurationsFormArray","GroupedDesignThumbnailsDetailComponent_ng_template_2_ng_container_0_div_1_ng_container_25_Template","isFormVisible","invalid","tmp_13_0","canShowModifiedDate","GroupedDesignThumbnailsDetailComponent_ng_template_2_ng_container_0_div_1_Template","canShowDrawingConfiguration","GroupedDesignThumbnailsDetailComponent_ng_template_2_ng_container_0_Template","GroupedDesignThumbnailsDetailComponent","_GroupedDesignThumbnailsDetailComponent","dataLoaded","masterData","getDrawingConfigurations","drawingConfigurationForm","isShapeRunner","canAddProductionScheduleItemToProductionSchedulePathForNewBuilder","addDrawingToPath","addDrawingToNewPath","inputElement","getDetailServerSideDataSource","_this$masterData$colo","initializeDrawingConfigurationForms","RUNNER","_this$drawingConfigur","listDrawingConfiguration","initializeDrawingConfigurationForm","checkAndDisableRollLength","_listDrawingConfigura","getRollLengthInMeter","getSuggestedQuantityForDrawing","_config$commercialDim","_config$drawing","commercialDimensionsInCm","heightInCM","_config$commercialDim2","convertPixelsToHeightInMeter","_config$drawing2","getQuantitySuggestionForPath","GroupedDesignThumbnailsDetailComponent_div_1_Template","GroupedDesignThumbnailsDetailComponent_ng_template_2_Template","contentLoaded_r6","GroupedDesignThumbnailsViewComponent_ng_container_3_vdw_dialog_button_4_Template","GroupedDesignThumbnailsViewComponent_ng_container_3_mat_option_7_Template","tmp_6_0","groupedGrid_r6","groupedGridOptions","GroupedDesignThumbnailsViewComponent","_GroupedDesignThumbnailsViewComponent","MAX_DETAIL_ROW_HEIGHT","initialiseGroupedGridOptions","TEXFAB_QUANTITY_SUGGESTION","groupedDesignThumbnailViewMode","GROUPED_DESIGN_THUMBNAILS","groupedGrid","groupedDesignThumbnailsDetailComponent","defaultGroupedGridOptions","withMasterDetail","_Object$values","_this$groupedGrid","withOnCellMouseOver","getRowHeightForDetailRow","onColumnVisibleChange","detail","GroupedDesignThumbnailsViewComponent_ng_container_3_Template","OrderLinesNewViewComponent","_OrderLinesNewViewComponent","colorSets","creelsService","overlayActionsService","addProductionScheduleNavigationState","orderlineSelected","navigateBackOutput","rollLengthColumnId","showOnlyQueryCompatibleOrderlines","alternativeQualityNames","alternativeColorSetNames","fullQualities","colorSetNames","creelColorSetIds","quantityTranslation","noOverlayAction","titleKey","isPrimary","preFilterDataFetched","processRowSelection","subscribeToOverlayActions","_this$orderLinesNewVi2","_this$orderLinesNewVi","_this$orderLinesNewVi3","orderLinesNewViewGrid","redrawRows","setDataValue","_settings$showOnlyQue","selectedOrderlines","_this$orderLinesNewVi4","_this$orderLinesNewVi5","_this$orderLinesNewVi6","_this$orderLinesNewVi7","ORDER_ITEMS_NEW_PRESELECTION","ORDER_ITEMS_NEW_BUILDER","getNoRowsOverlayForPreselection","getNoRowsOverlayForBuilder","withStopEditingWhenCellsLoseFocus","initializeGridOptionsForBuilder","getAutoFillButtonClicked","isAutoFillingPath","autoFillPath","withOnCellValueChanged","headerName","colId","getColumnDefinitionForClickedCell","setQuantitySuggestionForPath","marginInDentsOfMissingDesigns","withOnCellEditingStopped","recalculateQuantitySuggestionWhenRollLengthIsChanged","setSelectedOrderlines","_this$addProductionSc","_this$addProductionSc2","processObservables","_coloredYarnSet$color","_coloredYarnSet$color2","_coloredYarnSet$color3","alternativeColorSetObservables","_coloredYarnSet$color4","alternativeColorSetIds","alternativeColorSetId","getColorSetById","ColorSet","selectedOrderlinesWithoutDuplicates","finalOrderlinesIdList","_this$orderLinesNewVi8","_this$orderLinesNewVi9","autoFillIndex","startingAutoFill","longestPathLength","getLongestPathLengthInPicks","availableSpaceForAutoFill","orderlinesThatAreUsedToAutoFill","isAutoFilling","_this$orderLinesNewVi10","amountToDeduct","getTotalCutbarLengthInPicks","addSelectedOrderLinesToSelectedPath","selectNextPathIfPossible","getAllDisplayedColumns","col","getFocusedCell","ProgressCellRendererComponent","isOrderline","autoSelect","isRollLengthEditable","isSmall","_params$data3","_params$data4","_params$data5","_params$data6","_this$preselectedOrde","_this$orderLinesNewVi11","_this$orderLinesNewVi12","_this$orderLinesNewVi13","actionTriggeredEmitter","actionKey","COLOR_SETS","OrderLinesNewViewComponent_vdw_dialog_button_6_Template","OrderLinesNewViewComponent_mat_option_9_Template","OrderLinesNewViewComponent_ag_grid_angular_10_Template","tmp_4_0","GroupedOrderLinesSelectionService","_GroupedOrderLinesSelectionService","groupedOrderLinesSelected","getGroupedOrderLineSelected","setGroupedOrderLinesSelected","orderlineIdsSelected","orderlinesSelected","OrderLinesGroupedDetailCellRendererComponent","_OrderLinesGroupedDetailCellRendererComponent","groupedOrderLinesSelectionService","DETAIL_ID_PREFIX","WIDTH_HEADER_NAME","masterGridApi","masterNode","setDataParams","updatedParams","_this$detailApi","detailApi","setupDetailGrid","removeDetailGridInfo","_this$detailApi2","onFirstDataRendered","_this$initialIds","_this$detailApi3","_this$detailApi4","detailGridId","_this$detailApi5","addDetailGridInfo","onRowSelected","selectedNodes","selectedNodeIds","currentlySelectedOrderLines","detailOptions","defaultDetailGridOptions","getDetailColumnDefinitions","withPopupParent","_this$detailApi6","_this$detailApi7","OrderLinesGroupedViewComponent_ng_container_3_vdw_dialog_button_4_Template","OrderLinesGroupedViewComponent_ng_container_3_mat_option_7_Template","OrderLinesGroupedViewComponent","_OrderLinesGroupedViewComponent","DETAIL_ROW_HEIGHT","detailComponent","_this$groupedGrid2","_this$groupedGrid3","lastFocusedGroupedOrderLineNodeId","_this$preselectedOrde2","deselectedIds","currentSelectedOrderLineIds","getAndSelectOrderLines","detailRowAutoHeight","isDetailRow","_this$groupedGrid4","_this$groupedGrid5","getGroupedOrderlines","groupedOrderLines","groupedOrderlines","_this$preselectedOrde3","_this$preselectedOrde4","orderLinesGroupedDetailCellRendererComponent","GROUPED_ORDER_ITEMS","withMMConversion","SQUARE_METER","withSquareMMConversion","OrderLinesGroupedViewComponent_ng_container_3_Template","DrawingsGroupedDetailCellRendererComponent","_DrawingsGroupedDetailCellRendererComponent","addingItemToPath","mainColorsSubject","ReplaySubject","borderColorsSubject","designNamesSubject","heightsInPxSubject","heightsInCMSubject","isDestroyed","GROUPED_DESIGNS_DETAIL_PRESELECTION","GROUPED_DESIGNS_DETAIL_BUILDER","force","TimeUtils","SECOND_IN_MS","currentlySelectedDrawings","endRowDrawings","getMainColors","getBorderColors","getDesignNames","getHeightsInPx","getHeightInCM","_this$detailApi8","_this$detailApi9","isSaving","_this$detailApi10","_event$column2","listDrawingConfigurations","_detailDrawingConfig$","_detailDrawingConfig$2","getFirstItem","_detailDrawingConfig$3","_detailDrawingConfig$4","_detailDrawingConfig$5","_detailDrawingConfig$6","_detailDrawingConfig$7","_detailDrawingConfig$8","DrawingsGroupedViewComponent_ng_container_3_vdw_dialog_button_4_Template","DrawingsGroupedViewComponent_ng_container_3_mat_option_7_Template","DrawingsGroupedViewComponent","_DrawingsGroupedViewComponent","drawingsGroupedDetailCellRendererComponent","DrawingsGroupedViewComponent_ng_container_3_Template","onDrawingIdsSelected","onConfigurationIdsSelected","onOrderlinesSelected","ProductionScheduleNewDrawingLibraryComponent","_ProductionScheduleNewDrawingLibraryComponent","selectedViewModeOutput","preselectedOrderlineIdsOutput","preselectedDrawingsOutput","preselectedDrawingIdsOutput","preselectedConfigurationIdsOutput","getOrderlinesTranslationKey","selectedDrawingIds","isViewModeGroupedDrawings","isViewModeNewGroupedOrderLines","isViewModeNewGroupedDesignThumbnails","ProductionScheduleNewDrawingLibraryComponent_ng_container_4_Template","ProductionScheduleNewDrawingLibraryComponent_ng_container_5_Template","ProductionScheduleNewDrawingLibraryComponent_ng_container_6_Template","ProductionScheduleNewDrawingLibraryComponent_ng_container_7_Template","ProductionScheduleNewDrawingLibraryComponent_ng_container_8_Template","JutePosition","BEFORE_AND_AFTER_PATHLABEL","BEFORE_PATHLABEL","AFTER_PATHLABEL","NO_PATHLABEL","ProductionScheduleJuteOptionsComponent_div_6_div_1_Template","ProductionScheduleJuteOptionsComponent_div_6_mat_error_11_Template","ProductionScheduleJuteOptionsComponent_div_6_mat_error_12_Template","ProductionScheduleJuteOptionsComponent_div_6_mat_error_21_Template","ProductionScheduleJuteOptionsComponent_div_6_mat_error_22_Template","ProductionScheduleJuteOptionsComponent_div_6_mat_error_23_Template","canShowAddJuteBeforeOrAfterPathLabels","ProductionScheduleJuteOptionsComponent_div_12_div_4_mat_error_10_Template","ProductionScheduleJuteOptionsComponent_div_12_div_4_mat_error_11_Template","ProductionScheduleJuteOptionsComponent_div_12_div_4_mat_error_20_Template","ProductionScheduleJuteOptionsComponent_div_12_div_4_mat_error_21_Template","ProductionScheduleJuteOptionsComponent_div_12_div_4_mat_error_22_Template","ProductionScheduleJuteOptionsComponent_div_12_div_4_div_23_Template","onJuteAfterPathIsSameAsBeforeChange","ProductionScheduleJuteOptionsComponent_div_12_div_4_Template","selectPatternForJute","ProductionScheduleJuteOptionsComponent_div_13_mat_error_8_Template","ProductionScheduleJuteOptionsComponent_div_13_app_pattern_example_9_Template","hasChosenJutePattern","ProductionScheduleJuteOptionsComponent","_ProductionScheduleJuteOptionsComponent","addJutePattern","ADD_JUTE_PERMISSION","ADD_JUTE","_this$juteInformation","_this$juteInformation2","hasPermissionToAddJute","hasJuteBefore","juteBeforePathControl","JuteInformationForPart","getJutePosition","hasJuteAfter","juteAfterPathControl","isJuteAfterPathIsSameAsBefore","JuteInformation","setJuteAfterSameAsJuteBefore","juteBeforePathChange","beforePathLabel","afterPathLabel","sameAsJuteBefore","juteAfterPathChange","canShowJutePattern","subscribeToJuteAfterPath","jutePosition","_this$juteInformation3","_this$juteInformation4","juteBeforePositionBeforePathLabel","juteBeforePositionAfterPathLabel","juteAfterPositionBeforePathLabel","juteAfterPositionAfterPathLabel","syncJutePathHeights","commercialHeightFormFieldName","technicalHeightFormFieldName","ProductionScheduleJuteOptionsComponent_span_5_Template","ProductionScheduleJuteOptionsComponent_div_6_Template","ProductionScheduleJuteOptionsComponent_span_11_Template","ProductionScheduleJuteOptionsComponent_div_12_Template","ProductionScheduleJuteOptionsComponent_div_13_Template","BuggySelectionService","_BuggySelectionService","overview","gridActionButtonsHelper","builderFactoryService","navigationHelper","removeConfirmation","BUGGY_TRANSLATION_KEY","routes","getNavigationRoute","ADD_BUGGY","EDIT_BUGGY","DUPLICATE_BUGGY","init","crudOverviewButtonConfigs","getActionButtonsWithNewRouting","PrototypeRouteUtils","getPage","_this$config$selected","selectedObjects","withEntityName","withRowData","withDefaultButtons","withCrudGridOptions","rowActionsComplete","builder","openContentSwitcherDialog","inputValue","CrudObjectSelectionDialogNewComponent","componentInputs","newClickedEntry","pageType","PageTypeEnum","ADD","productionScheduleNameGenerationView","refreshNameGeneration","ProductionScheduleInitialPreparationsNewComponent_mat_form_field_19_Conditional_5_Template","ProductionScheduleInitialPreparationsNewComponent_mat_form_field_19_mat_error_6_Template","ProductionScheduleInitialPreparationsNewComponent_mat_form_field_19_mat_error_7_Template","ProductionScheduleInitialPreparationsNewComponent_mat_form_field_19_mat_error_8_Template","ProductionScheduleInitialPreparationsNewComponent_mat_form_field_19_mat_error_9_Template","ProductionScheduleInitialPreparationsNewComponent_ng_container_23_mat_error_9_Template","ProductionScheduleInitialPreparationsNewComponent_ng_container_26_div_5_span_4_Template","ProductionScheduleInitialPreparationsNewComponent_ng_container_26_mat_form_field_6_span_5_Template","ProductionScheduleInitialPreparationsNewComponent_ng_container_26_mat_form_field_6_mat_error_6_Template","ProductionScheduleInitialPreparationsNewComponent_ng_container_26_mat_form_field_6_mat_error_7_Template","ProductionScheduleInitialPreparationsNewComponent_ng_container_26_div_8_div_1_span_4_Template","ProductionScheduleInitialPreparationsNewComponent_ng_container_26_div_8_mat_form_field_2_mat_error_8_Template","ProductionScheduleInitialPreparationsNewComponent_ng_container_26_div_8_div_1_Template","ProductionScheduleInitialPreparationsNewComponent_ng_container_26_div_8_mat_form_field_2_Template","ProductionScheduleInitialPreparationsNewComponent_ng_container_26_Conditional_13_div_0_div_1_div_1_span_4_Template","ProductionScheduleInitialPreparationsNewComponent_ng_container_26_Conditional_13_div_0_div_1_div_1_Template","ProductionScheduleInitialPreparationsNewComponent_ng_container_26_Conditional_13_div_0_div_1_mat_form_field_2_Template","tmp_10_0","ProductionScheduleInitialPreparationsNewComponent_ng_container_26_Conditional_13_div_0_ng_template_2_app_disabled_form_input_1_Template","ProductionScheduleInitialPreparationsNewComponent_ng_container_26_Conditional_13_div_0_div_1_Template","ProductionScheduleInitialPreparationsNewComponent_ng_container_26_Conditional_13_div_0_ng_template_2_Template","disabledProductConfigurationFormInputs_r7","ProductionScheduleInitialPreparationsNewComponent_ng_container_26_Conditional_13_div_0_Template","ProductionScheduleInitialPreparationsNewComponent_ng_container_26_Conditional_14_div_2_span_4_Template","removeBuggy","BUGGY_BASE_ROUTER_LINK","ProductionScheduleInitialPreparationsNewComponent_ng_container_26_Conditional_14_div_2_Template","ProductionScheduleInitialPreparationsNewComponent_ng_container_26_Conditional_14_mat_form_field_3_Template","_r11","productionScheduleColoredYarnSet_r12","getCreelMapping","ProductionScheduleInitialPreparationsNewComponent_ng_container_26_div_18_article_2_ng_container_8_div_1_Template","coloredYarnSetIndex_r13","ProductionScheduleInitialPreparationsNewComponent_ng_container_26_div_18_article_2_mat_icon_6_Template","ProductionScheduleInitialPreparationsNewComponent_ng_container_26_div_18_article_2_ng_container_8_Template","ProductionScheduleInitialPreparationsNewComponent_ng_container_26_div_18_div_1_Template","ProductionScheduleInitialPreparationsNewComponent_ng_container_26_div_18_article_2_Template","_r14","ProductionScheduleInitialPreparationsNewComponent_ng_container_26_div_5_Template","ProductionScheduleInitialPreparationsNewComponent_ng_container_26_mat_form_field_6_Template","ProductionScheduleInitialPreparationsNewComponent_ng_container_26_div_8_Template","ProductionScheduleInitialPreparationsNewComponent_ng_container_26_ng_template_9_Template","ProductionScheduleInitialPreparationsNewComponent_ng_container_26_Conditional_13_Template","ProductionScheduleInitialPreparationsNewComponent_ng_container_26_Conditional_14_Template","ProductionScheduleInitialPreparationsNewComponent_ng_container_26_div_18_Template","ProductionScheduleInitialPreparationsNewComponent_ng_container_26_div_19_Template","disabledMachineQualityFormInputs_r15","canSelectProductConfiguration","ProductionScheduleInitialPreparationsNewComponent_div_33_ng_container_7_Template","ProductionScheduleInitialPreparationsNewComponent_div_33_ng_container_8_Template","ProductionScheduleInitialPreparationsNewComponent_div_33_ng_container_10_Template","ProductionScheduleInitialPreparationsNewComponent_div_33_article_11_Template","ProductionScheduleInitialPreparationsNewComponent_div_35_app_production_schedule_quality_linked_settings_14_Template","hasPlanningBoardPermission","_r20","ProductionScheduleInitialPreparationsNewComponent","_ProductionScheduleInitialPreparationsNewComponent","BaseAddProductionScheduleNewPageComponent","buggySelectionService","editBuggy","PICKS_PER_METER_UNIT","PICKS_PER_METER","hasBuggyNameGeneration","hasAtLeastOneOfThePermissions","TEXFAB_PLANNINGBOARD","checkIfBuggyHasNameGeneration","field","enabled","_this$currentSubscrip4","_this$currentSubscrip5","TEXEDIT_CADCAM_PRODUCT_CONFIGURATION_VIEW","_this$currentSubscrip6","suggestion","_this$getCreelMap2","_this$productionSched9","_this$productionSched10","_initialOptionsForPro","_initialOptionsForPro2","updateJuteAndZones","_this$possibleCreelsF3","setNewBuggy","_this$productionSched11","_this$productionSched12","_this$productionSched13","_this$currentSubscrip7","_this$currentSubscrip8","_customSettings$nameG","i7","i8","i9","ProductionScheduleInitialPreparationsNewComponent_mat_form_field_19_Template","ProductionScheduleInitialPreparationsNewComponent_ng_template_20_Template","ProductionScheduleInitialPreparationsNewComponent_ng_container_23_Template","ProductionScheduleInitialPreparationsNewComponent_ng_template_24_Template","ProductionScheduleInitialPreparationsNewComponent_ng_container_26_Template","ProductionScheduleInitialPreparationsNewComponent_app_production_schedule_initial_preparations_additional_options_32_Template","ProductionScheduleInitialPreparationsNewComponent_div_33_Template","ProductionScheduleInitialPreparationsNewComponent_div_35_Template","ProductionScheduleInitialPreparationsNewComponent_app_creel_mapping_36_Template","disabledNameFormInput_r21","disabledMachineFormInput_r22","PathContentSettingsDialogComponent","_PathContentSettingsDialogComponent","optionChanged","pathContentPanelEnabled","onPathContentPanelEnabledChanged","isActivePhase","phase_r2","phaseClicked","ProductionScheduleProgressNewComponent_div_1_div_1_Template","ProductionScheduleProgressNewComponent_div_1_div_2_Template","isCurrentPhase","first_r4","canHoverOverItem","getIconForPhase","getPhaseTranslationKey","ProductionScheduleProgressNewComponent","_ProductionScheduleProgressNewComponent","clickEvent","productionSchedulePhaseOrderMap","BidirectionalMap","CONFIGURE","COMPLETE","productionSchedulePhases","phase","isScheduleCompleted","getWidthOfActiveTrack","widthPerPhaseInPx","nextPhase","getKey","ProductionScheduleProgressNewComponent_div_1_Template","chip_r2","url","customErrorMessage","INITIAL_DATA_NOT_LOADED_TRANSLATION_KEY","toPreselectionClicked","loadingProperties","preselectionLoading","decreateClicked","decreateLoading","cancelClicked","completeLoading","nextPhaseClicked","getLabelForNextButton","nextPhaseLoading","isRaisedButton","mouseEnterSaveButton","mouseLeaveSaveButton","saveMenu_r11","ProductionScheduleMenuItemsNewComponent_div_31_div_2_Template","getLabelForSaveButton","canShowSaveMenuTrigger","_r12","completeClicked","SAVE_TYPE","SAVE","SAVE_AND_CREATE_NEW_TYPE","SAVE_AND_CREATE_NEW","SAVE_AND_GO_TO_PRESELECTION_TYPE","SAVE_AND_GO_TO_PRESELECTION","SAVE_AND_QUIT_TYPE","SAVE_AND_QUIT","ProductionScheduleMenuItemsNewComponent","_ProductionScheduleMenuItemsNewComponent","productionSchedulePhaseClicked","pathContentSettingsDialogDataChanged","chips","canShowProductionScheduleProgress","SaveTypeForProductionSchedule","VERIFY_TRANSLATION_KEY","pathContentSettingsDialogComponent","HEADER_IDENTIFIER","HeaderIdentifier","LOCAL_STORAGE_SAVE_KEY","GAP_WIDTH_IN_PX","setHeaderChips","defaultSaveType","menuItemsElement","setMenuItemsVisibility","actionsElement","_this$loadingProperti","isLoading","waitingForInitialZonesToLoad","_this$canShowProperti","canShowProperties","canShowInvalidFormMessageError","loadProperties","initialRestZoneLoaded","initialFreeZoneLoaded","initialPathZoneLoaded","initialJuteZoneLoaded","saveButtonClicked","canShowToPreselectionButton","_this$loadingProperti2","_this$loadingProperti3","productionScheduleStatus","ProductionScheduleStatus","DRAFT","VERIFIED","VERIFIED_WITH_WARNINGS","VERIFIED_WITH_ERRORS","ProductionScheduleClickEvent","NEXT_PHASE","DECREATE","CANCEL","settingsButtonClicked","SETTINGS","saveMenuTimer","saveMenuTrigger","timer","hasSaveMenuButton","isDefaultSaveType","hasSaveAndGoToPreselectionMenuButton","hasSaveAndCreateNewMenuButton","hasSaveAndQuitMenuButton","onProductionSchedulePhaseClicked","saveType","getDialogData","_this$pathContentSett","pathContentSettingsDialogData","onOptionChanged","Equipment","MachineOverviewList","machineType","editCreel","reversedInputChips","inputChipComponents","inputChipComponent","chipsDividerElement","productionScheduleProgressElement","phaseDividerElement","inputChipElement","chipContainerElement","getAvailableWidth","includeProgressWidth","menuItemsWidth","getMenuItemsWidth","actionButtonsWidth","ProductionScheduleMenuItemsNewComponent_mat_divider_4_Template","ProductionScheduleMenuItemsNewComponent_vdw_input_chip_7_Template","customSettingsButton_r3","ProductionScheduleMenuItemsNewComponent_vdw_invalid_form_message_25_Template","ProductionScheduleMenuItemsNewComponent_vdw_invalid_form_message_26_Template","ProductionScheduleMenuItemsNewComponent_div_27_Template","ProductionScheduleMenuItemsNewComponent_vdw_progress_button_28_Template","ProductionScheduleMenuItemsNewComponent_div_29_Template","ProductionScheduleMenuItemsNewComponent_div_30_Template","ProductionScheduleMenuItemsNewComponent_div_31_Template","ProductionScheduleMenuItemsNewComponent_vdw_progress_button_32_Template","ProductionScheduleMenuItemsNewComponent_button_36_Template","ProductionScheduleMenuItemsNewComponent_button_37_Template","ProductionScheduleMenuItemsNewComponent_button_38_Template","ProductionScheduleMenuItemsNewComponent_button_39_Template","canShowDecreatedButton","canShowCancelButton","canShowNavigateToNextPhaseButton","canShowCompleteButton","VerifyType","VERIFY_AND_CONFIRM","ProductionScheduleProgressComponent_div_1_div_1_Template","ProductionScheduleProgressComponent_div_1_div_2_Template","ProductionScheduleProgressComponent","_ProductionScheduleProgressComponent","ProductionScheduleProgressComponent_div_1_Template","mouseEnterVerifyButton","mouseLeaveVerifyButton","verifyMenu_r9","ProductionScheduleMenuItemsComponent_div_29_div_2_Template","canShowVerifyMenuTrigger","verify","VERIFY_AND_CONFIRM_TRANSLATION_KEY","ProductionScheduleMenuItemsComponent","_ProductionScheduleMenuItemsComponent","LOCAL_STORAGE_KEY","defaultVerifyType","isDefaultVerifyType","verifyAndConfirmClicked","verifyMenuTimer","verifyMenuTrigger","hasVerifyMenuButton","hasVerifyAndConfirmMenuButton","verifyType","ProductionScheduleMenuItemsComponent_mat_divider_4_Template","ProductionScheduleMenuItemsComponent_vdw_input_chip_7_Template","ProductionScheduleMenuItemsComponent_vdw_invalid_form_message_25_Template","ProductionScheduleMenuItemsComponent_vdw_invalid_form_message_26_Template","ProductionScheduleMenuItemsComponent_div_27_Template","ProductionScheduleMenuItemsComponent_vdw_progress_button_28_Template","ProductionScheduleMenuItemsComponent_div_29_Template","ProductionScheduleMenuItemsComponent_vdw_progress_button_30_Template","ProductionScheduleMenuItemsComponent_button_34_Template","ProductionScheduleMenuItemsComponent_button_35_Template","Cutbar","BEFORE","AFTER","listProductionScheduleItemInPathGroup","movePath","deletePath","canMovePath","canEditPath","PathContentComponent","_PathContentComponent","selectedPathContentRowDataOutput","selectedRowIndex","selectedDragRowIndex","selectedRowData","selectedDragRowData","GENERAL_UNIT_PICKS","updateListProductionScheduleItemInPathGroup","up","_this$selectedPath","_this$selectedNodes","setNewRowIndex","selectedNode","onRowDragEnter","pathContentGrid","onRowDragEnd","getColumnDefsForListOfPathContent","LIST_OF_PATH_CONTENTS","descriptionKey","withRowDraggingInsideGrid","_params$rowNode$data","setPinnedColumn","onRowDoubleClicked","withLockPinned","getTechnicalCutbarsLengthInNumberOfPicks","withTooltipFieldForHeader","getSalesOrderLineProperty","cutbarInformation","property","findSelectedPath","foundPath","_this$selectedNodes2","getProductionSchedulePathIndex","setColumnsPinned","getRenderedNodes","PathContentComponent_ng_container_2_Template","PathContentComponent_ng_template_3_Template","showActionButtons_r4","PathLayoutTemplateMismatchComponent","_PathLayoutTemplateMismatchComponent","getMismatchIcon","getMismatchTooltip","onSelectedMenuItemChange","menuItems","selectedMenuItem","SelectPathLayoutTemplateComponent","_SelectPathLayoutTemplateComponent","pathLayoutTemplates","pathLayoutTemplateService","pathLayoutTemplateTranslationKey","setGridOptions","getPathLayoutTemplates","gridOptionsForListOfPathLayoutTemplates","_this$selectPathLayou","selectPathLayoutTemplatesGrid","menuItem","isProductionScheduleDoubleWidth","confirmOverride","confirmOverrideForDoubleWidth","selectPathLayoutTemplate","openConfirmDialog","bottomColoredYarnSet","topColoredYarnSet","navigateToAddPathLayoutTemplatePage","ADD_PATH_LAYOUT","_this$selectPathLayou2","_this$selectPathLayou3","OVERRIDE","getColumnDefsForListOfPathLayoutTemplates","SELECT_PATH_LAYOUT_TEMPLATE","withOnCellDoubleClicked","withIsRowSelectable","withRememberStateForNavigationHelper","getTotalWidth","withResizable","listOfPathLayoutTemplates","dents","totalWidthOfPathsInMilimeters","totalWidthOfPathsInDentsWithAddedRestAndFreeZones","totalWidthOfPathsInMillimetersWithAddedRestAndFreeZones","totalWidthInCM","SelectPathLayoutTemplateComponent_vdw_tabs_menu_5_Template","getQualityType","getPattern","getWeaveStructureId","getMinPatternHeight","AddJuteToPathComponent","_AddJuteToPathComponent","qualityId","juteWidthInDents","applyChangesToProductionScheduleItemsInSchedule","_this$addJuteToPathFo","hasChosenPatternOrPatternFields","ManualNonProductionItemDrawing","addJuteToPathForm","formGroup","_pattern$ySizeInColor","ySizeInColorlines","heightInPixels","patternFormControl","canLockButton","heightInCm","syncCmToPixelsFormFields","JUTE_PATTERNS_OR_DRAWINGS","virtualScrolling","_pattern$ySizeInColor2","_pattern$ySizeInColor3","AddJuteToPathComponent_mat_error_17_Template","AddJuteToPathComponent_div_18_Template","AddJuteToPathComponent_mat_error_29_Template","AddJuteToPathComponent_mat_error_30_Template","AddJuteToPathComponent_mat_error_39_Template","AddJuteToPathComponent_mat_error_40_Template","MaxLengthInfoTooltipComponent","_MaxLengthInfoTooltipComponent","buggyLengthMaxInCommercialUnit","lengthInBuggyInPicks","lengthInBuggyInCommercialUnit","getTotalBuggyLengthLabel","getCurrentLengthInBuggyLabel","AnalyticsService","_AnalyticsService","trackEvent","eventName","eventDetails","eventCategory","gtag","event_category","event_label","productionScheduleItemInPathGroup_r4","productionScheduleItemInPathGroupIndex_r5","draggingStopped","ctx_r6","ctx_r7","closeDialogIfOpen","ctx_r8","widthOfPathItems","minimumBuggyLengthIndicatorPlace","maximumBuggyLengthIndicatorPlace","PathBarComponent","_PathBarComponent","dialog","minimumBuggyLengthIndicatorPlaceOutput","maximumBuggyLengthIndicatorPlaceOutput","isDraggingProductionScheduleItemOutput","hoverPathBarOutput","editWindowOpen","TOTAL_TO_DEDUCT_FROM_PATH_ITEM_FOR_PADDING_AND_GAPS","VERTICAL_HOVER_OFFSET","HORIZONTAL_HOVER_OFFSET","MINIMAL_WIDTH_OF_PATH_BAR_ITEM","PADDING_AND_GAP_SIZE","REPOSITION_DIALOG_CLASS","WEAVE_PLAN_TRANSLATION_KEY","setTotalToDeductFromPathItemForPaddingAndGaps","initialiseDropService","resizePathBarComponent","pathBar","getPathBarBorderColor","ColorConstants","PRIMARY_COLOR_VDW_BLUE","TINT_DARKBLUE_20","canShowMinimumbuggyLengthIndicator","canShowMaxmimumbuggyLengthIndicator","originalBuggyLengthMaxInPicks","setWidthOfPathItems","setMinimumBuggyLengthIndicatorPlace","setMaximumBuggyLengthIndicatorPlace","isDraggingProductionScheduleItem","sourcePath","sourceColoredYarnSet","offsetX","closeAll","innerWidth","moveDroppedDrawingToProductionSchedulePath","_dragProperties$sourc","_dragProperties$sourc3","_dragProperties$sourc4","dragProperties","_dragProperties$sourc2","_dragProperties$sourc5","currentIndex","getDropDestinationIndexInPath","closestIndex","closestDistance","rect","distanceFromStart","distanceFromEnd","_this$pathBar","_this$pathBar2","widthPerPixel","_this$pathBar3","_this$pathBar4","_this$pathBar5","_this$pathBar6","_this$productionSched14","availableWindowSpace","availableSpaceInBuggy","_productionScheduleIt10","widthOfPathItem","productionSchedulePathLenths","_this$getTotalHeights","getTotalHeightsOfProductionSchedulePath","totalHeightInPicks","_totalHeightInPicks","_totalHeightInMM","totalHeightInMM","_item$technicalDimens","_item$commercialDimen","getCommercialCutbarsLengthInMM","PathBarComponent_div_2_Template","PathBarComponent_div_3_Template","PathBarComponent_div_4_Template","openActionsMenu","closeActionsMenu","isActionsMenuOpen","actionsMenu_r4","addCustomJuteToPath","canAddCustomDesignToPath","getUnitDimesionsForDifference","path_r8","pathSelected","PathLayoutComponent_For_36_For_3_mat_icon_8_Template","PathLayoutComponent_For_36_For_3_mat_icon_9_Template","PathLayoutComponent_For_36_For_3_span_21_Template","ctx_r9","pathIndex_r11","$index","ctx_r11","onHoverPathBarOutput","getPathBackgroundColor","isPathChecked","canShowSubceedsMinBuggyLengthError","canShowExceedsMaxBuggyLengthError","maxWidthForDataElements","getLabelForPathAndDifferenceDimensions","getUnitDimensionsForPath","canShowDifference","productionScheduleColoredYarnSetIndex_r14","getHeightOfPathInColoredYarnSet","tmp_57_0","newBuggyLengthMaxInPicks","getProductionScheduleRestPathLabel","getUnitDimensionsForPathRest","heightOfRestPathsInPercentage","tmp_40_0","PathLayoutComponent_For_36_For_3_Template","_forTrack1","PathLayoutComponent_For_36_ng_container_5_Template","heightOfColoredYarnSetsInPercentage","canShowRestPath","PathLayoutComponent","_PathLayoutComponent","analyticsService","productionSchedulePathsOfColoredYarnSetOutput","ADD_MANUAL_JUTE_PERMISSION","ADD_MANUAL_JUTE","ADD_PATH_LAYOUT_TEMPLATE","TEXFAB_PATH_LAYOUT_TEMPLATE_EDIT","HEADER_AND_PADDING_OF_PATH","heightOfPathsInPercentage","isFillingPath","savedScrollTop","getIsFillingPath","selectRestPath","setHeightOfPaths","_changes$productionSc","setMaxWidthForDataElements","selectedMenuItemState","setPathLayoutTemplate","setAutoFillButtonClicked","isAutoFillButtonDisabled","getMaxBuggyLengthOrPathThatIsLonger","_productionScheduleCo","pathsOfColoredYarnSet","_pathsOfColoredYarnSe","_productionSchedulePa3","totalPathWidthsInDents","_productionSchedulePa4","_productionSchedulePa5","_this$selectedPath2","_this$selectedPath3","_this$selectedRestPat","_productionSchedulePa6","TINT_LIGHTBLUE_20","PRIMARY_COLOR_WHITE","_this$selectedPath4","_this$selectedRestPat2","_productionSchedulePa7","_productionSchedulePa8","positionTranslation","getLongestPathLengthInCommercialUnit","amountPlannedInPicks","amountPlannedInMeter","selectedPathLayoutTemplate","addPathsOfPathLayoutTemplates","getRemainingLengthInBuggy","longestPathLengthInCommercialUnit","remainingLengthInPicks","remainingLengthInCommercialUnit","getLabelForMaxLengthOrDifference","getUnitDimensionsForPathLayout","_this$productionSched15","_this$productionSched16","_productionSchedulePa9","machineWidthInMeters","_this$productionSched17","_this$productionSched18","_productionSchedulePa10","_productionSchedulePa11","_productionSchedulePa13","_productionSchedulePa14","totalWidthOfPathsOfColoredYarnSetInDents","remainingWidthInMeter","_productionSchedulePa12","_this$productionSched19","_this$productionSched20","_productionSchedulePa15","productionScheduleBaan","differenceFromLongestPathInPicks","differenceFromLongestPathInCommercialUnit","_this$heightOfPathsIn","pathHeights","pathsContainer","numberOfGroundYarns","juteItem","addCustomJuteListItemToPath","getProductionSchedulePathsOfColoredYarnSetFromDent","_this$selectedPathLay","pathTemplateWidthsInDents","_this$productionSched21","createPathsOfPathTemplates","_this$productionSched22","_productionSchedulePa16","_this$productionSched23","_productionSchedulePa17","selectFirstPath","_productionSchedulePa18","_this$selectedPathLay2","addedStartDent","_this$productionSched24","cysIndex","_pathsOfColoredYarnSe2","_this$productionSched25","_pathsOfColoredYarnSe3","_this$heightOfPathsIn2","_pathsOfColoredYarnSe4","_this$productionSched26","_this$productionSched27","_this$productionSched28","_this$productionSched29","_this$productionSched30","_productionSchedulePa19","_this$productionSched31","_productionSchedulePa20","ifTemplateHasTooMuchWidth","ifTemplateHasOverlappingPaths","PathLayoutComponent_button_8_Template","PathLayoutComponent_ng_template_11_Template","PathLayoutComponent_button_31_Template","PathLayoutComponent_For_36_Template","_forTrack0","errorMessages","warningMessages","ErrorsAndWarningsDialogComponent","_ErrorsAndWarningsDialogComponent","hasErrorMessages","dialogIcon","dialogTitle","hasWarningMessages","ErrorsAndWarningsDialogComponent_vdw_message_container_5_Template","ErrorsAndWarningsDialogComponent_vdw_message_container_6_Template","ErrorsAndWarningsComponent_button_0_ng_template_3_ng_container_0_Template","ErrorsAndWarningsComponent_button_0_ng_template_3_ng_container_1_Template","hasErrors","hasWarnings","showAllErrorsAndWarnings","ErrorsAndWarningsComponent_button_0_ng_container_2_Template","ErrorsAndWarningsComponent_button_0_ng_template_3_Template","hasErrorsAndWarnings","noErrorsOrWarnings_r3","ErrorsAndWarningsComponent_button_1_ng_template_4_ng_container_0_ng_template_4_ng_container_0_Template","ErrorsAndWarningsComponent_button_1_ng_template_4_ng_container_0_ng_template_4_ng_container_1_Template","canShowTotalWidthTooLittle","canShowTotalWidthTooBig","ErrorsAndWarningsComponent_button_1_ng_template_4_ng_container_0_ng_container_3_Template","ErrorsAndWarningsComponent_button_1_ng_template_4_ng_container_0_ng_template_4_Template","hasMultipleErrors","noMultipleErrors_r5","ErrorsAndWarningsComponent_button_1_ng_template_4_ng_container_1_ng_container_3_Template","canShowCurrentLossFromProductionSchedule","ErrorsAndWarningsComponent_button_1_ng_template_4_ng_container_0_Template","ErrorsAndWarningsComponent_button_1_ng_template_4_ng_container_1_Template","ErrorsAndWarningsComponent_button_1_ng_container_3_Template","ErrorsAndWarningsComponent_button_1_ng_template_4_Template","canShowAllErrorsAndWarnings","noErrorsOrWarnings_r6","ErrorsAndWarningsComponent","_ErrorsAndWarningsComponent","getWarningAndErrorMessages","errorsAndWarningsButtonDOMRect","errorsAndWarningsButton","currentLossInPercent","ErrorsAndWarningsComponent_button_0_Template","ErrorsAndWarningsComponent_button_1_Template","FinishingListViewInformationComponent_div_0_ng_container_2_Template","FinishingListViewInformationComponent","_FinishingListViewInformationComponent","canShowData","FinishingListViewInformationComponent_div_0_Template","ProductionSchedulePartiallyCompletedStatusCellRendererComponent","_ProductionSchedulePartiallyCompletedStatusCellRendererComponent","getHeightForExpansionPanel","productionSchedulePath_r2","getUnitDimensionsForPathWidth","getUnitDimensionsForPathLength","getUnitDimensionsForDifference","productionSchedulePathsOfColoredYarnSetIndex_r5","gridOptionsForListView","ProductionScheduleNewListviewComponent_div_1_mat_expansion_panel_2_Template","ProductionScheduleNewListviewComponent","_ProductionScheduleNewListviewComponent","orderlines","rowHeight","scrollBarHeightInPx","_this$authentication$2","getDataForProductionScheduleItem","initialiseGridOptionsForListiew","getLabelForWidth","getLabelForLength","refreshRows","completePartially","EXECUTED_PARTIAL","completeProductionOrder","_this$expansionPanels","expanded","expansionPanels","random","getOrderlines","setDataForEveryPath","_this$listViewGrids","listViewGridsArray","listViewGrids","PRODUCTION_SCHEDULE_PATH_LIST_VIEW","withRowHeight","getValueForQuantity","priority","CellButtonComponent","buttons","icon","onClick","eGridCell","getCorrectIndex","nrClothsMultiplier","_event$api","_item$orderline","itemIndex","getMainColor","rowItem","getColoredYarnSetForPathItem","getBorderColor","productionSchedulePathOfColoredYarnSets","commercialLengthInCommercialUnit","ProductionScheduleNewListviewComponent_div_1_Template","ResizeDirection","HORIZONTAL","MIN_PATH_LAYOUT_HEIGHT_IN_PX","minPathLayoutWidthInPx","initialPathLayoutHeightInPx","getInitialPathLayoutWidthInPx","initialPathLayoutMaxHeightInPx","availableSpaceInBuggyForBuilderInPicks","availableSpaceInBuggyForBuilderInCommercialUnit","resizeDirection","resizerPx","minPathContentWidthInPx","isProductionSchedulePhasePreselection","ProductionSchedulePlanNewComponent_section_2_app_path_layout_component_3_Template","ProductionSchedulePlanNewComponent_section_2_div_4_Template","ProductionSchedulePlanNewComponent_section_2_app_path_content_component_5_Template","ProductionSchedulePlanNewComponent_section_2_app_production_schedule_new_drawing_library_7_Template","canShowPathContent","ProductionSchedulePlanNewComponent_section_3_ng_container_61_app_progress_spinner_1_Template","ProductionSchedulePlanNewComponent_section_3_ng_container_61_app_progress_spinner_2_Template","ProductionSchedulePlanNewComponent_section_3_app_errors_and_warnings_49_Template","ProductionSchedulePlanNewComponent_section_3_mat_slide_toggle_50_Template","ProductionSchedulePlanNewComponent_section_3_mat_option_54_Template","ProductionSchedulePlanNewComponent_section_3_app_progress_spinner_60_Template","ProductionSchedulePlanNewComponent_section_3_ng_container_61_Template","ProductionSchedulePlanNewComponent_section_3_app_production_schedule_verify_62_Template","ProductionSchedulePlanNewComponent_section_3_app_production_schedule_builder_63_Template","ProductionSchedulePlanNewComponent_section_3_app_production_schedule_listview_64_Template","ProductionSchedulePlanNewComponent_section_3_app_production_schedule_new_listview_65_Template","getUnitDimensionsForLengthDifferenceToBuggy","getRestWidthDimensions","getSurfaceDimensions","getNonProductionItemsDimensions","getPracticalPickDensity","_c14","ProductionSchedulePlanNewComponent","MIN_DRAWING_LIBRARY_HEIGHT_IN_PX","INITIAL_PATH_LAYOUT_HEIGHT_IN_PX","executeResizePathBarComponent","setInitialPathLayoutDimentions","ngAfterContentChecked","getQualitySettings","setAvailableSpaceInBuggy","productionScheduleNewListViewComponent","lengthInMeter","lengthInPicks","lengthDifferenceInCommercialUnit","lengthDifferenceInPicks","totalWidthInDents","getTotalWidthInDents","totalLengthInMeter","totalWidthInMeter","_ProductionScheduleVe","totalSquareMeters","totalSquareMetersOfNonProductionItems","totalSquareMetersOfPathGroup","totalPercentageOfNonProductionItems","direction","cancelListeners","initialPathLayoutWidthInPx","onPathContentSettingsDialogDataChanged","_this$pathLayoutCompo","pathLayoutComponent","_this$pathLayoutCompo2","pathBars","updatePathLabelHeight","pathLabelHeightInPx","pathLayout","updatePathLayoutWidth","pathLayoutWidthInPx","setting","pathLayoutHeightInPx","_this$pathLayout$nati","_this$pathLayout","_this$pathLayout$nati2","_this$pathLayout2","pathLabelsOrNonProductionItemsFromLongestPathLengthInPicks","pathLabelsOrNonProductionItemsFromLongestPathLengthInCommercialUnit","_ProductionSchedulePlanNewComponent","ProductionSchedulePlanNewComponent_section_2_Template","ProductionSchedulePlanNewComponent_section_3_Template","ProductionSchedulePlanNewComponent_section_4_Template","ProductionOrdersPlaceholderService","_ProductionOrdersPlaceholderService","getPlaceholderCategories","isNameGeneration","isBuggySelection","requests","getCategoriesWithComponentsForProductionOrderLabel","getCategoriesWithComponentsForProductionOrderName","getCategoriesWithComponentsForBuggyName","index_r2","updateAction","coloredYarnSetWithStartDent_r4","creelPreviewType","getColoredYarnSetCreelMap","readOnly","CreelMappingComponent","_CreelMappingComponent","newCreelMap","isCurrentViewModeYarnType","YARN_TYPE","onCreelTypeViewModeChange","matSlideToggleChange","cancelAction","matchingCreelMap","sourceIndex","saveAction","getTabAction","CreelMappingComponent_div_18_Template","ProductionScheduleModule","_ProductionScheduleModule","provide","useClass","HttpProductionSchedulesService","HttpProductionOrdersService","HttpMachineQualitiesService","FINISHINGS","HttpFinishingsService","HttpColorSetsService","COLORS","HttpColorsService","HttpColoredYarnSetsService","AddProductionScheduleService","HttpOrderbookService","ARTICLES","HttpArticlesService","HttpPlanningService","REALTIME_PRODUCTION_ORDER","HttpPatternsService","HttpProductConfigurationsService","PrintDocument","ShowReasonForFailureDialogCommand","GetPatternVisualisationByPatternId","OrderLinesGridService","CadCamService","OrderLinesHelper","DrawingLibraryHelper","ProductionScheduleOverviewService","HttpBuggyService","imports","productionScheduleDataRouting","AgGridModule","SharedModule","TextileDataSharedModule","DrawingLibrarySharedModule","ProductionScheduleSharedModule","CanShowErrorForFormControlModule","TagModule","InputChipModule","MatDividerModule","MatIconModule","ProductionScheduleOverviewPageComponent","i10","AddProductionSchedulePageComponent","i11","i12","i13","AddProductionScheduleNewPageComponent","i14","i15","i16","i17","i18","i19","i20","i21","i22","i23","i24","i25","i26","i27","i28","i29","i30","i31","i32","i33","i34","i35","RadioToggleButtonDirective","_RadioToggleButtonDirective","radioToggleButtons"],"ignoreList":[],"sourceRoot":"webpack:///","sources":["./apps/texconnect/src/app/infrastructure/http/creel/http-creels.service.ts","./apps/texconnect/src/app/infrastructure/signalr/production-order/signalr-production-order.service.ts","./apps/texconnect/src/app/application/command/add-free-zone-pattern.ts","./apps/texconnect/src/app/application/command/add-jute-pattern.ts","./apps/texconnect/src/app/application/command/add-rest-zone-pattern.ts","./apps/texconnect/src/app/infrastructure/page-state-manager/production-schedule-builder/production-schedule-builder-page-state-manager.service.ts","./apps/texconnect/src/app/presentation/components/select-path-layout-template/path-layout-template.service.ts","./apps/texconnect/src/app/presentation/pages/texedit/drawing-library/drawing-library-listview/drawing-library-listview.component.html","./apps/texconnect/src/app/presentation/pages/texedit/drawing-library/drawing-library-listview/drawing-library-listview.component.ts","./node_modules/lodash-es/unzip.js","./node_modules/lodash-es/zip.js","./node_modules/lodash-es/flattenDeep.js","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/drawing-library/views/order-lines-view/order-line-status-cell-renderer/order-line-status-cell-renderer.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/drawing-library/views/order-lines-view/order-line-status-cell-renderer/order-line-status-cell-renderer.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/drawing-library/views/order-lines-view/production-schedule-item-in-path-group-status-cell-renderer/production-schedule-item-in-path-group-status-cell-renderer.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/drawing-library/views/order-lines-view/production-schedule-item-in-path-group-status-cell-renderer/production-schedule-item-in-path-group-status-cell-renderer.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/drawing-library/views/order-lines-view/order-lines-view.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/drawing-library/views/order-lines-view/order-lines-view.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/drawing-library/production-schedule-drawing-library.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/drawing-library/production-schedule-drawing-library.component.ts","./apps/texconnect/src/app/presentation/components/select-buggy/select-buggy.component.html","./apps/texconnect/src/app/presentation/components/select-buggy/select-buggy.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/finishing-details/finishing-details.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/finishing-details/finishing-details.component.html","./node_modules/lodash-es/_baseToNumber.js","./node_modules/lodash-es/_createMathOperation.js","./node_modules/lodash-es/multiply.js","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/initial-preparations-new/additional-options/production-schedule-initial-preparations-additional-options.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/initial-preparations-new/additional-options/production-schedule-initial-preparations-additional-options.component.ts","./apps/texconnect/src/app/domain/fonts/fromReadableToEnumKey.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/initial-preparations-new/additional-options/production-schedule-path-labels/production-schedule-path-labels.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/initial-preparations-new/additional-options/production-schedule-path-labels/production-schedule-path-labels.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/initial-preparations-new/additional-options/production-schedule-quality-linked-settings/production-schedule-quality-linked-settings.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/initial-preparations-new/additional-options/production-schedule-quality-linked-settings/production-schedule-quality-linked-settings.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/initial-preparations-new/select-product-configuration/select-product-configuration.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/initial-preparations-new/select-product-configuration/select-product-configuration.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/initial-preparations/production-schedule-initial-preparations.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/initial-preparations/production-schedule-initial-preparations.component.ts","./apps/texconnect/src/app/domain/zone-type.enum.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/modals/edit-zone/edit-zone.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/modals/edit-zone/edit-zone.component.ts","./node_modules/lodash-es/subtract.js","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/free-and-rest-zones/production-schedule-zone.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/free-and-rest-zones/production-schedule-zone.component.ts","./apps/texconnect/src/app/application/helper/production-schedule-builder/calculate-drawing-height-in-picks.ts","./apps/texconnect/src/app/application/helper/production-schedule-builder/create-production-schedule-item-in-path-group-from-drawing.ts","./apps/texconnect/src/app/application/helper/production-schedule-builder/get-longest-production-schedule-path.ts","./node_modules/lodash-es/_baseInRange.js","./node_modules/lodash-es/inRange.js","./apps/texconnect/src/app/application/helper/production-schedule-builder/is-coordinate-out-of-range-of-other-coordinate.ts","./apps/texconnect/src/app/application/helper/production-schedule-builder/rename-production-schedule-path-to-new-position-in-colored-yarn-sets.ts","./apps/texconnect/src/app/domain/production-schedule/production-schedule-display.enum.ts","./node_modules/d3-axis/src/identity.js","./node_modules/d3-axis/src/axis.js","./node_modules/d3-array/src/ticks.js","./node_modules/d3-array/src/ascending.js","./node_modules/d3-array/src/descending.js","./node_modules/d3-array/src/bisector.js","./node_modules/d3-array/src/bisect.js","./node_modules/d3-array/src/number.js","./node_modules/d3-color/src/define.js","./node_modules/d3-color/src/color.js","./node_modules/d3-interpolate/src/basis.js","./node_modules/d3-interpolate/src/constant.js","./node_modules/d3-interpolate/src/color.js","./node_modules/d3-interpolate/src/rgb.js","./node_modules/d3-interpolate/src/array.js","./node_modules/d3-interpolate/src/date.js","./node_modules/d3-interpolate/src/number.js","./node_modules/d3-interpolate/src/object.js","./node_modules/d3-interpolate/src/basisClosed.js","./node_modules/d3-interpolate/src/string.js","./node_modules/d3-interpolate/src/numberArray.js","./node_modules/d3-interpolate/src/value.js","./node_modules/d3-interpolate/src/round.js","./node_modules/d3-scale/src/number.js","./node_modules/d3-scale/src/continuous.js","./node_modules/d3-scale/src/constant.js","./node_modules/d3-scale/src/init.js","./node_modules/d3-format/src/formatSpecifier.js","./node_modules/d3-format/src/formatPrefixAuto.js","./node_modules/d3-format/src/formatDecimal.js","./node_modules/d3-format/src/exponent.js","./node_modules/d3-format/src/formatRounded.js","./node_modules/d3-format/src/formatTypes.js","./node_modules/d3-format/src/identity.js","./node_modules/d3-format/src/locale.js","./node_modules/d3-format/src/defaultLocale.js","./node_modules/d3-scale/src/linear.js","./node_modules/d3-scale/src/tickFormat.js","./node_modules/d3-format/src/precisionPrefix.js","./node_modules/d3-format/src/precisionRound.js","./node_modules/d3-format/src/precisionFixed.js","./node_modules/d3-format/src/formatGroup.js","./node_modules/d3-format/src/formatNumerals.js","./node_modules/d3-format/src/formatTrim.js","./node_modules/lodash-es/floor.js","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-path-of-colored-yarn-set/maximum-buggy-length-warning-dialog/maximum-buggy-length-warning-dialog.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-path-of-colored-yarn-set/maximum-buggy-length-warning-dialog/maximum-buggy-length-warning-dialog.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-builder.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-builder.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-colored-yarn-set-error-popup/production-schedule-colored-yarn-set-error-popup.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-colored-yarn-set-error-popup/production-schedule-colored-yarn-set-error-popup.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-colored-yarn-set.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-colored-yarn-set.component.ts","./apps/texconnect/src/app/application/helper/production-schedule-builder/clone-production-schedule-element.ts","./apps/texconnect/src/app/application/helper/production-schedule-builder/get-closest-production-schedule-item-and-index-relative-to-mouse-coordinates.ts","./apps/texconnect/src/app/application/helper/production-schedule-builder/get-mouse-coordinates-in-production-schedule-builder-group.ts","./node_modules/d3-selection/src/selectAll.js","./apps/texconnect/src/app/application/helper/production-schedule-builder/get-underlying-element.ts","./apps/texconnect/src/app/application/helper/production-schedule-builder/is-in-lower-half-of-production-schedule-item.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/modals/edit-production-schedule-path-of-colored-yarn-set/edit-production-schedule-path-of-colored-yarn-set.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/modals/edit-production-schedule-path-of-colored-yarn-set/edit-production-schedule-path-of-colored-yarn-set.component.ts","./node_modules/d3-dispatch/src/dispatch.js","./node_modules/d3-drag/src/noevent.js","./node_modules/d3-drag/src/constant.js","./node_modules/d3-drag/src/event.js","./node_modules/d3-drag/src/drag.js","./node_modules/d3-drag/src/nodrag.js","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/modals/path-item-info-tooltip/path-item-info-tooltip-context.enum.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/color-list-preview-with-position/color-list-preview-with-position.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/color-list-preview-with-position/color-list-preview-with-position.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/modals/path-item-info-tooltip/path-item-info-tooltip.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/modals/path-item-info-tooltip/path-item-info-tooltip.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/modals/edit-production-schedule-item-in-path-group/edit-production-schedule-item-in-path-group-action.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/modals/edit-production-schedule-item-in-path-group/edit-production-schedule-item-in-path-group.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/modals/edit-production-schedule-item-in-path-group/edit-production-schedule-item-in-path-group.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-path-of-colored-yarn-set/production-schedule-item-in-path-group-container/production-schedule-item-in-path-group-repeat-indicator/production-schedule-item-in-path-group-repeat-indicator.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-path-of-colored-yarn-set/production-schedule-item-in-path-group-container/production-schedule-item-in-path-group-repeat-indicator/production-schedule-item-in-path-group-repeat-indicator.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-path-of-colored-yarn-set/production-schedule-item-in-path-group-container/production-schedule-item-in-path-group/production-schedule-item-in-path-group.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-path-of-colored-yarn-set/production-schedule-item-in-path-group-container/production-schedule-item-in-path-group/production-schedule-item-in-path-group.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-path-of-colored-yarn-set/repeat-production-schedule-item/repeat-production-schedule-item.pipe.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-path-of-colored-yarn-set/production-schedule-item-in-path-group-container/production-schedule-item-in-path-group-container.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-path-of-colored-yarn-set/production-schedule-item-in-path-group-container/production-schedule-item-in-path-group-container.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-path-of-colored-yarn-set/production-schedule-item-in-path-group-repeat-indicator-new/production-schedule-item-in-path-group-repeat-indicator-new.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-path-of-colored-yarn-set/production-schedule-item-in-path-group-repeat-indicator-new/production-schedule-item-in-path-group-repeat-indicator-new.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-path-of-colored-yarn-set/production-schedule-item-in-path-group-new/production-schedule-item-in-path-group-new.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-path-of-colored-yarn-set/production-schedule-item-in-path-group-new/production-schedule-item-in-path-group-new.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-path-of-colored-yarn-set/production-schedule-item-in-path-group-container-new/production-schedule-item-in-path-group-container-new.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-path-of-colored-yarn-set/production-schedule-item-in-path-group-container-new/production-schedule-item-in-path-group-container-new.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-path-of-colored-yarn-set/production-schedule-path-of-colored-yarn-set-new.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-path-of-colored-yarn-set/production-schedule-path-of-colored-yarn-set-new.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-path-of-colored-yarn-set/production-schedule-path-of-colored-yarn-set.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-path-of-colored-yarn-set/production-schedule-path-of-colored-yarn-set.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/listview/production-schedule-listview-column-type.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/new-listview/get-production-schedule-colored-yarn-set-paths/get-production-schedule-colored-yarn-set-paths.pipe.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/new-listview/calculate-dimensions-base-pipe.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/new-listview/calculate-dimensions-of-production-schedule-item/calculate-dimensions-of-production-schedule-item.pipe.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/new-listview/get-production-schedule-item-color/get-production-schedule-item-color.pipe.ts","./apps/texconnect/src/app/presentation/components/column-filter/column-filter.component.html","./apps/texconnect/src/app/presentation/components/column-filter/column-filter.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/new-listview/calculate-dimensions-of-production-schedule-path/calculate-dimensions-of-production-schedule-path.pipe.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/new-listview/calculate-dimensions-of-production-schedule-colored-yarn-set/calculate-dimensions-of-production-schedule-colored-yarn-set.pipe.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/new-listview/calculate-rest-length-of-production-schedule-path/calculate-rest-length-of-production-schedule-path.pipe.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/new-listview/get-unpinned-columns/get-unpinned-columns.pipe.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/new-listview/calculate-cutbars-dimensions-for-production-schedule-item/calculate-cutbars-dimensions-for-production-schedule-item.pipe.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/new-listview/get-production-schedule-item-total-woven-height/get-production-schedule-item-total-woven-height.pipe.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/listview/production-schedule-listview.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/listview/production-schedule-listview.component.ts","./apps/texconnect/src/app/presentation/components/dialog-button/dialog-data/switch-commercial-technical-units/switch-commercial-technical-units.component.ts","./apps/texconnect/src/app/presentation/components/dialog-button/dialog-data/switch-commercial-technical-units/switch-commercial-technical-units.component.html","./node_modules/lodash-es/assign.js","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/production-schedule-plan.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/production-schedule-plan.component.ts","./apps/texconnect/src/app/application/helper/production-schedule-builder/update-production-schedule-paths-of-colored-yarn-sets.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/add-drawing-to-colored-yarn-set-command.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/add-drawing-to-production-schedule-path-command.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/edit-production-schedule-item-command.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/loading-state.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/apply-changes-to-new-production-schedule-item-in-path-group.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/remove-production-schedule-path-command.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/remove-production-schedule-item-command.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/move-production-schedule-item-to-colored-yarn-set-command.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/move-production-schedule-item-to-production-schedule-path-command.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/move-production-schedule-path-to-colored-yarn-set-command.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/production-schedule-path-label-drawings-cache.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/update-drawings-and-order-lines-of-production-schedule-command.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/remove-production-schedule-items-command.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/drawing-library/recolor.service.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/production-schedule-plan.service.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/free-and-rest-zones/production-schedule-zones.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/free-and-rest-zones/production-schedule-zones.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/get-production-schedule-paths-and-zones-for-colored-yarn-set/get-production-schedule-paths-and-zones-for-colored-yarn-set.pipe.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/verify/production-schedule-verify.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/verify/production-schedule-verify.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/drawing-library/views/drawings-grouped-view/grouped-drawings-selection.service.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/drawing-library/views/grouped-design-base/grouped-design-base.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/drawing-library/views/grouped-design-thumbnails-view/grouped-design-thumbnails-detail/grouped-design-thumbnails-detail.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/drawing-library/views/grouped-design-thumbnails-view/grouped-design-thumbnails-detail/grouped-design-thumbnails-detail.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/drawing-library/views/grouped-design-thumbnails-view/grouped-design-thumbnails-view.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/drawing-library/views/grouped-design-thumbnails-view/grouped-design-thumbnails-view.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/drawing-library/views/order-lines-new-view/order-lines-new-view.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/drawing-library/views/order-lines-new-view/order-lines-new-view.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/drawing-library/views/order-lines-grouped-view/grouped-orderlines-selection.service.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/drawing-library/views/order-lines-grouped-view/detail-cell-renderer/order-lines-grouped-detail-cell-renderer.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/drawing-library/views/order-lines-grouped-view/detail-cell-renderer/order-lines-grouped-detail-cell-renderer.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/drawing-library/views/order-lines-grouped-view/order-lines-grouped-view.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/drawing-library/views/order-lines-grouped-view/order-lines-grouped-view.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/drawing-library/views/drawings-grouped-view/detail-cell-renderer/drawings-grouped-detail-cell-renderer.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/drawing-library/views/drawings-grouped-view/detail-cell-renderer/drawings-grouped-detail-cell-renderer.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/drawing-library/views/drawings-grouped-view/drawings-grouped-view.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/drawing-library/views/drawings-grouped-view/drawings-grouped-view.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/drawing-library/production-schedule-new-drawing-library.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/drawing-library/production-schedule-new-drawing-library.component.ts","./apps/texconnect/src/app/domain/production-schedule/jute-position.enum.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/initial-preparations-new/additional-options/production-schedule-jute-options/production-schedule-jute-options.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/initial-preparations-new/additional-options/production-schedule-jute-options/production-schedule-jute-options.component.ts","./apps/texconnect/src/app/presentation/pages/textile-data/buggy/buggy-selection.service.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/initial-preparations-new/production-schedule-initial-preparations-new.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/initial-preparations-new/production-schedule-initial-preparations-new.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/menu-items-new/path-content-settings-dialog.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/menu-items-new/path-content-settings-dialog.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/progress-new/production-schedule-progress-new.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/progress-new/production-schedule-progress-new.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/menu-items-new/production-schedule-menu-items-new.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/menu-items-new/production-schedule-menu-items-new.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/menu-items/verify-type.enum.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/progress/production-schedule-progress.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/progress/production-schedule-progress.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/menu-items/production-schedule-menu-items.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/menu-items/production-schedule-menu-items.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/cutbar.enum.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/path-content/path-content.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/path-content/path-content.component.ts","./apps/texconnect/src/app/presentation/components/select-path-layout-template/path-layout-template-mismatch/path-layout-template-mismatch.component.ts","./apps/texconnect/src/app/presentation/components/select-path-layout-template/path-layout-template-mismatch/path-layout-template-mismatch.component.html","./apps/texconnect/src/app/presentation/components/select-path-layout-template/select-path-layout-template.component.html","./apps/texconnect/src/app/presentation/components/select-path-layout-template/select-path-layout-template.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/modals/add-jute-to-path/add-jute-to-path.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/modals/add-jute-to-path/add-jute-to-path.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/path-layout/max-length-info-tooltip/max-length-info-tooltip.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/path-layout/max-length-info-tooltip/max-length-info-tooltip.component.html","./apps/texconnect/src/app/shared/analytics.service.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/path-item/path-bar.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/path-item/path-bar.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/path-layout/path-layout.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/builder/path-layout/path-layout.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/errors-and-warnings/errors-and-warnings-dialog/errors-and-warnings-dialog.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/errors-and-warnings/errors-and-warnings-dialog/errors-and-warnings-dialog.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/errors-and-warnings/errors-and-warnings.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/errors-and-warnings/errors-and-warnings.component.ts","./apps/texconnect/src/app/presentation/pages/textile-data/finishing/finishing-list-view-information/finishing-list-view-information.component.html","./apps/texconnect/src/app/presentation/pages/textile-data/finishing/finishing-list-view-information/finishing-list-view-information.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/drawing-library/views/order-lines-view/production-schedule-partially-completed-status-cell-renderer/production-schedule-partially-completed-status-cell-renderer.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/drawing-library/views/order-lines-view/production-schedule-partially-completed-status-cell-renderer/production-schedule-partially-completed-status-cell-renderer.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/new-listview/production-schedule-new-listview-column-type.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/new-listview/production-schedule-new-listview.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/new-listview/production-schedule-new-listview.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/resize-direction.enum.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/production-schedule-plan-new.component.html","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/add/plan/production-schedule-plan-new.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/shared/production-orders-placeholder.service.ts","./apps/texconnect/src/app/presentation/components/creel-mapping/creel-mapping.component.html","./apps/texconnect/src/app/presentation/components/creel-mapping/creel-mapping.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/production-schedule/production-schedule.module.ts","./libs/angular-component-library/src/lib/actions/radio-toggle-button/radio-toggle-button.directive.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 {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","import {Inject, Injectable} from '@angular/core';\nimport {AddPatternReturnType} from '@application/command/add-pattern-return-type';\nimport {Command} from '@application/command/command';\nimport {PATTERNS, Patterns} from '@infrastructure/http/patterns/patterns';\nimport {Observable} from 'rxjs';\n\n@Injectable()\nexport class AddFreeZonePattern implements Command {\n public constructor(@Inject(PATTERNS) private readonly patterns: Patterns) {}\n\n public execute(machineQualityId: number): AddPatternReturnType {\n return (name: string, imageData: string): Observable => {\n return this.patterns.saveFreeZonePattern(name, imageData, machineQualityId);\n };\n }\n}\n","import {Inject, Injectable} from '@angular/core';\nimport {AddPatternReturnType} from '@application/command/add-pattern-return-type';\nimport {Command} from '@application/command/command';\nimport {PATTERNS, Patterns} from '@infrastructure/http/patterns/patterns';\nimport {Observable} from 'rxjs';\n\ninterface AddJutePatternArguments {\n machineQualityId: number;\n colorSetId: number;\n}\n\n@Injectable()\nexport class AddJutePattern implements Command {\n public constructor(@Inject(PATTERNS) private readonly patterns: Patterns) {}\n\n public execute({machineQualityId, colorSetId}: AddJutePatternArguments): AddPatternReturnType {\n return (name: string, imageData: string): Observable => {\n return this.patterns.saveJutePattern(name, imageData, machineQualityId, colorSetId);\n };\n }\n}\n","import {Inject, Injectable} from '@angular/core';\nimport {AddPatternReturnType} from '@application/command/add-pattern-return-type';\nimport {Command} from '@application/command/command';\nimport {PATTERNS, Patterns} from '@infrastructure/http/patterns/patterns';\nimport {Observable} from 'rxjs';\n\ninterface AddRestZonePatternArguments {\n machineQualityId: number;\n colorSetId: number;\n}\n\n@Injectable()\nexport class AddRestZonePattern implements Command {\n public constructor(@Inject(PATTERNS) private readonly patterns: Patterns) {}\n\n public execute({machineQualityId, colorSetId}: AddRestZonePatternArguments): AddPatternReturnType {\n return (name: string, imageData: string): Observable => {\n return this.patterns.saveRestZonePattern(name, imageData, machineQualityId, colorSetId);\n };\n }\n}\n","import {Inject, Injectable} from '@angular/core';\nimport {AUTHENTICATION, Authentication} from '@infrastructure/http/authentication/authentication';\nimport {LocalStorageService} from '@vdw/angular-component-library';\nimport {Observable, of as observableOf} from 'rxjs';\nimport {PageStateManager} from '../page-state-manager';\nimport {ProductionScheduleBuilderPageStateWithUserEmail} from './production-schedule-builder-page-state-with-user-email.interface';\nimport {ProductionScheduleBuilderPageState} from './production-schedule-builder-page-state.interface';\nimport {ProductionScheduleNewBuilderPageStateWithUserEmail} from './production-schedule-new-builder-page-state-with-user-email.interface';\nimport {ProductionScheduleNewBuilderPageState} from './production-schedule-new-builder-page-state.interface';\n\n@Injectable()\nexport class ProductionScheduleBuilderPageStateManagerService implements PageStateManager {\n public static readonly localStorageKeyForProductionScheduleBuilderState = 'productionScheduleBuilderState';\n public static readonly localStorageKeyForProductionScheduleNewBuilderState = 'productionScheduleNewBuilderState';\n\n public constructor(\n @Inject(AUTHENTICATION) private readonly authentication: Authentication,\n private readonly localStorageService: LocalStorageService\n ) {}\n\n public get(): Observable {\n return observableOf(\n this.getProductionScheduleBuilderPageStates().find(\n (productionScheduleBuilderPageStates: ProductionScheduleBuilderPageStateWithUserEmail) => productionScheduleBuilderPageStates.userEmail === this.authentication.getCurrentEmail()\n )\n );\n }\n\n public getForNewBuilder(): Observable {\n return observableOf(\n this.getProductionScheduleNewBuilderPageStates().find(\n (productionScheduleBuilderPageStates: ProductionScheduleNewBuilderPageStateWithUserEmail) => productionScheduleBuilderPageStates.userEmail === this.authentication.getCurrentEmail()\n )\n );\n }\n\n public update(state: ProductionScheduleBuilderPageState): Observable {\n const userEmail = this.authentication.getCurrentEmail();\n\n const productionScheduleBuilderPageStates = this.getProductionScheduleBuilderPageStates()?.filter(\n (productionScheduleBuilderPageState: ProductionScheduleBuilderPageStateWithUserEmail) => productionScheduleBuilderPageState.userEmail !== userEmail\n );\n\n productionScheduleBuilderPageStates.push({userEmail, ...state});\n\n this.localStorageService.set(ProductionScheduleBuilderPageStateManagerService.localStorageKeyForProductionScheduleBuilderState, productionScheduleBuilderPageStates);\n\n return observableOf(null);\n }\n\n public updateforNewBuilder(state: ProductionScheduleNewBuilderPageState): Observable {\n const userEmail = this.authentication.getCurrentEmail();\n\n const productionScheduleBuilderPageStates = this.getProductionScheduleNewBuilderPageStates()?.filter(\n (productionScheduleBuilderPageState: ProductionScheduleNewBuilderPageStateWithUserEmail) => productionScheduleBuilderPageState.userEmail !== userEmail\n );\n\n productionScheduleBuilderPageStates.push({userEmail, ...state});\n\n this.localStorageService.set(ProductionScheduleBuilderPageStateManagerService.localStorageKeyForProductionScheduleNewBuilderState, productionScheduleBuilderPageStates);\n\n return observableOf(null);\n }\n\n private getProductionScheduleBuilderPageStates(): ProductionScheduleBuilderPageStateWithUserEmail[] {\n const productionScheduleBuilderPageStatesJSON = this.localStorageService.get(\n ProductionScheduleBuilderPageStateManagerService.localStorageKeyForProductionScheduleBuilderState\n );\n\n return productionScheduleBuilderPageStatesJSON ?? [];\n }\n\n private getProductionScheduleNewBuilderPageStates(): ProductionScheduleNewBuilderPageStateWithUserEmail[] {\n const productionScheduleBuilderPageStatesJSON = this.localStorageService.get(\n ProductionScheduleBuilderPageStateManagerService.localStorageKeyForProductionScheduleNewBuilderState\n );\n\n return productionScheduleBuilderPageStatesJSON ?? [];\n }\n}\n","import {Inject, Injectable} from '@angular/core';\nimport {PathLayoutTemplate} from '@domain/path-layout-template/path-layout-template';\nimport {PathLayoutTemplatePath} from '@domain/path-layout-template/path-layout-template-path';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {ColoredYarnSetPosition} from '@domain/textile-data/creel/colored-yarn-set-position';\nimport {OverviewListColoredYarnSetWithStartDent} from '@domain/textile-data/creel/overview-list-colored-yarn-set-with-start-dent';\nimport {PathWidth} from '@domain/textile-data/machine-quality/path-width';\nimport {ProductionSchedulePlan, PRODUCTION_SCHEDULE_PLAN} from '@presentation/pages/texfab/production-schedule/add/plan/production-schedule-plan';\nimport {AssertionUtils, convertCommercialUnit, convertWidthInMeterToDents, NumberUtils, Unit} from '@vdw/angular-component-library';\n\n@Injectable({providedIn: 'root'})\nexport class PathLayoutTemplateService {\n public constructor(@Inject(PRODUCTION_SCHEDULE_PLAN) private readonly productionSchedulePlan: ProductionSchedulePlan) {}\n\n public checkIfTemplateHasTooMuchWidth(\n productionSchedule: ProductionSchedule,\n pathLayoutTemplate: PathLayoutTemplate,\n coloredYarnSetPosition: number,\n reedDensityInDentsPerMeter: number,\n pathWidths: PathWidth[]\n ): boolean {\n const totalWidthOfPathsInDents = pathLayoutTemplate.pathLayoutTemplatePaths.reduce((totalWidth: number, pathLayoutTemplatePath: PathLayoutTemplatePath) => {\n const widthOfPathInDents = !AssertionUtils.isNullOrUndefined(this.productionSchedulePlan.lookupCommercialWidthInPathWidths(pathLayoutTemplatePath.widthInMM, pathWidths))\n ? this.productionSchedulePlan.lookupCommercialWidthInPathWidths(pathLayoutTemplatePath.widthInMM, pathWidths)\n : convertWidthInMeterToDents(convertCommercialUnit({from: {unit: Unit.MILLIMETER, value: pathLayoutTemplatePath.widthInMM}, to: Unit.METER}), reedDensityInDentsPerMeter, 0);\n\n return totalWidth + widthOfPathInDents;\n }, 0);\n\n const totalWidthOfPathsWithAddedRestAndFreeZones = this.addFreeZonesAndRestZonesToTotalWidthOfPathTemplate(productionSchedule, totalWidthOfPathsInDents, pathLayoutTemplate);\n\n const coloredYarnSets = productionSchedule.productionSchedulePathsOfColoredYarnSets.map((productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet) => {\n return productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet;\n });\n\n if (productionSchedule.machine.jacquard.isSisal) {\n if (coloredYarnSetPosition === ColoredYarnSetPosition.BOTTOM) {\n const bottomColoredYarnSet = coloredYarnSets.filter((coloredYarnSet: OverviewListColoredYarnSetWithStartDent) => coloredYarnSet.isBottomPosition());\n return bottomColoredYarnSet[0].technicalWidthInDents < totalWidthOfPathsWithAddedRestAndFreeZones;\n } else if (coloredYarnSetPosition === ColoredYarnSetPosition.TOP) {\n const topColoredYarnSet = coloredYarnSets.filter((coloredYarnSet: OverviewListColoredYarnSetWithStartDent) => !coloredYarnSet.isBottomPosition());\n return topColoredYarnSet[0].technicalWidthInDents < totalWidthOfPathsWithAddedRestAndFreeZones;\n }\n } else {\n return productionSchedule.machine.dentsForFabric < totalWidthOfPathsWithAddedRestAndFreeZones;\n }\n }\n\n public checkIfTemplateHasOverlappingPaths(productionSchedule: ProductionSchedule, pathLayoutTemplate: PathLayoutTemplate, reedDensityInDentsPerMeter: number, pathWidths: PathWidth[]): boolean {\n const coloredYarnSetWidthsInDents = productionSchedule.productionSchedulePathsOfColoredYarnSets.map((productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet) => {\n return NumberUtils.roundAwayFromZero(productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.technicalWidthInDents);\n });\n\n let widthInDentsCounter = 0;\n let result: boolean;\n\n pathLayoutTemplate.pathLayoutTemplatePaths.forEach((pathLayoutTemplatePath: PathLayoutTemplatePath) => {\n const pathWidthInMeter = convertCommercialUnit({from: {unit: Unit.MILLIMETER, value: pathLayoutTemplatePath.widthInMM}, to: Unit.METER});\n widthInDentsCounter += convertWidthInMeterToDents(pathWidthInMeter, reedDensityInDentsPerMeter, 0);\n\n if (widthInDentsCounter <= coloredYarnSetWidthsInDents[0]) {\n result = false;\n } else if (widthInDentsCounter > coloredYarnSetWidthsInDents[0]) {\n result = true;\n }\n });\n\n return result;\n }\n\n private addFreeZonesAndRestZonesToTotalWidthOfPathTemplate(productionSchedule: ProductionSchedule, totalWidthOfPathsInDents: number, pathLayoutTemplate: PathLayoutTemplate): number {\n const totalWidthOfPathsInDentsWithAddedInBetweenFreeZones = !productionSchedule.initialFreeZones.inBetween.useAsMaximum\n ? totalWidthOfPathsInDents + productionSchedule.initialFreeZones.inBetween.technicalWidthInDents * (pathLayoutTemplate.pathLayoutTemplatePaths.length - 1)\n : totalWidthOfPathsInDents;\n const totalWidthOfPathsInDentsWithAddedLeftFreeZones = !productionSchedule.initialFreeZones.left.useAsMaximum\n ? totalWidthOfPathsInDentsWithAddedInBetweenFreeZones + productionSchedule.initialFreeZones.left.technicalWidthInDents\n : totalWidthOfPathsInDentsWithAddedInBetweenFreeZones;\n const totalWidthOfPathsInDentsWithAddedRightFreeZones = !productionSchedule.initialFreeZones.right.useAsMaximum\n ? totalWidthOfPathsInDentsWithAddedLeftFreeZones + productionSchedule.initialFreeZones.right.technicalWidthInDents\n : totalWidthOfPathsInDentsWithAddedLeftFreeZones;\n\n return AssertionUtils.isNullOrUndefined(productionSchedule.initialRestZones?.userDefinedRest?.technicalWidthInDents)\n ? totalWidthOfPathsInDentsWithAddedRightFreeZones\n : totalWidthOfPathsInDentsWithAddedRightFreeZones + productionSchedule.initialRestZones.userDefinedRest.technicalWidthInDents;\n }\n}\n","
\n \n \n
\n \n \n {{ 'PRODUCTION_ORDER.DESIGN_LIBRARY.VIEW_MODES.' + viewMode | bmsTranslate }}\n \n \n
\n \n
\n\n \n \n \n
\n","import {Component, EventEmitter, Inject, Input, OnChanges, OnInit, Output, Renderer2, SimpleChanges, ViewChild} from '@angular/core';\nimport {GridIdentifier} from '@application/grids/grid-identifier.enum';\nimport {DraggingService} from '@application/services/dragging/dragging.service';\nimport {DrawingLibraryViewMode} from '@domain/drawing-library/drawing-library-view-mode.enum';\nimport {FixedShape} from '@domain/drawing-library/fixed-shape.enum';\nimport {Drawing} from '@domain/production-schedule/drawing';\nimport {DrawingType} from '@domain/production-schedule/drawing-type.enum';\nimport {ProductionScheduleDrawingViewMode} from '@domain/production-schedule/production-schedule-drawing-view-mode.enum';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {PropertyValue} from '@domain/property-value';\nimport {TargetForListOfDrawingsEnum} from '@domain/target-for-list-of-drawings.enum';\nimport {StatusBarTarget} from '@domain/textile-data/status-bar-target.constants';\nimport {DRAWINGS, Drawings} from '@infrastructure/http/drawing/drawings';\nimport {HttpStatusBarService} from '@infrastructure/http/status-bar/http-status-bar.service';\nimport {ListDrawingConfiguration} from '@presentation/components/drawing-list/list-drawing-configuration';\nimport {DesignPreviewComponent} from '@presentation/components/grid/design-preview/design-preview.component';\nimport {GridCreelPreviewOfCreelPositionComponent} from '@presentation/pages/textile-data/creel/add/grid-creel-preview-of-creel-position/grid-creel-preview-of-creel-position.component';\nimport {PreviewType} from '@presentation/pages/textile-data/creel/add/preview-type';\nimport {\n AgGridRowSelection,\n AgGridUtils,\n AssertionUtils,\n BaseComponent,\n ColDefBuilderFactoryService,\n DialogBuilder,\n DialogBuilderFactoryService,\n DialogType,\n EmptyCellRendererComponent,\n GridModel,\n GridOptionsBuilder,\n GridOptionsBuilderFactoryService,\n HeaderClass,\n NoDataOverlayComponentParams,\n NumberCellEditorComponent,\n NumberCellEditorParams,\n StatusBar,\n StringUtils,\n TranslateService,\n Unit,\n UuidUtils\n} from '@vdw/angular-component-library';\nimport {AgGridAngular} from 'ag-grid-angular';\nimport {\n CellClickedEvent,\n CellEditingStartedEvent,\n CellRendererSelectorResult,\n ColDef,\n ColumnVisibleEvent,\n EditableCallbackParams,\n FilterChangedEvent,\n GetRowIdParams,\n GridApi,\n GridOptions,\n GridReadyEvent,\n ICellRendererParams,\n IRowNode,\n IServerSideDatasource,\n IServerSideGetRowsParams,\n ITooltipParams,\n RowNode,\n RowSelectedEvent,\n SelectionChangedEvent,\n SortModelItem,\n ValueGetterParams,\n ValueSetterParams\n} from 'ag-grid-community';\nimport {L10nIntlService} from 'angular-l10n';\nimport {isEqual, remove as lodashRemove} from 'lodash-es';\nimport {Observable, takeUntil} from 'rxjs';\n\n@Component({\n selector: 'app-drawing-library-listview',\n templateUrl: './drawing-library-listview.component.html',\n styleUrls: ['./drawing-library-listview.component.scss']\n})\nexport class DrawingLibraryListViewComponent extends BaseComponent implements OnInit, OnChanges {\n private readonly SLICE_SIZE = 100;\n private readonly ROW_HEIGHT_WITH_PREVIEW = 96;\n private readonly ROW_HEIGHT_WITHOUT_PREVIEW = 24;\n private readonly HEADER_HEIGHT_WITH_PREVIEW = 56;\n private readonly HEADER_HEIGHT_WITHOUT_PREVIEW = 32;\n\n @ViewChild('drawingsGrid') public drawingsGrid: AgGridAngular;\n @ViewChild('exportDrawingsGrid') public exportDrawingsGrid: AgGridAngular;\n\n @Input() public showSelectedItems = false;\n @Input() public advancedSearchFilters: PropertyValue[] = [];\n @Input() public listOfDrawings: Drawing[] | ListDrawingConfiguration[];\n @Input() public selectedDrawings: ListDrawingConfiguration[] = [];\n @Input() public canSelectDrawings = false;\n @Input() public showOnlySelectedDrawings = false;\n @Input() public isProductionSchedule = false;\n @Input() public productionScheduleItemsToBeRestored: ProductionScheduleItemInPathGroup[];\n @Input() public productionScheduleItemMultiplier: number;\n @Input() public isExporting = false;\n @Input() public hideMissingDesigns = false;\n @Input() public filterOnDrawingType: DrawingType = null;\n @Input() public isNewBuilder = false;\n @Input() public isPreSelection = false;\n @Output() public drawingSelected: EventEmitter = new EventEmitter();\n @Output() public exportComplete: EventEmitter = new EventEmitter();\n @Output() public advancedSearchFiltersChange: EventEmitter = new EventEmitter();\n @Output() public selectedViewModeChanged = new EventEmitter();\n\n public drawingListGridModel: GridModel;\n public gridOptionsForDrawings: GridOptions;\n public exportGridOptions: GridOptions = {};\n public exportData: Drawing[] = [];\n public statusBar: StatusBar;\n public initialToggleSelected: boolean;\n public readonly viewModes: ProductionScheduleDrawingViewMode[] = [\n ProductionScheduleDrawingViewMode.DESIGNS_LIST,\n ProductionScheduleDrawingViewMode.ORDER_LINES,\n ProductionScheduleDrawingViewMode.GROUPED_ORDER_LINES\n ];\n\n public selectedViewMode = ProductionScheduleDrawingViewMode.DESIGNS_LIST;\n\n private savedFilterModel: any;\n private dialogBuilder: DialogBuilder;\n private designPreviewFiltered: boolean;\n private _viewMode: DrawingLibraryViewMode;\n private selectedOrderlineIds: number[] = [];\n private floatingFilters: PropertyValue[] = [];\n private firstTimeServerSideLoaded: boolean;\n\n public constructor(\n @Inject(DRAWINGS) private drawings: Drawings,\n private readonly colDefBuilderFactory: ColDefBuilderFactoryService,\n private readonly translate: TranslateService,\n private readonly gridOptionsBuilderFactoryService: GridOptionsBuilderFactoryService,\n private readonly l10nIntlService: L10nIntlService,\n private readonly renderer: Renderer2,\n private readonly draggingService: DraggingService,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n private readonly statusBarService: HttpStatusBarService\n ) {\n super();\n }\n\n public get viewMode(): DrawingLibraryViewMode {\n return this._viewMode;\n }\n\n @Input()\n public set viewMode(viewMode: DrawingLibraryViewMode) {\n this._viewMode = viewMode;\n\n if (!AssertionUtils.isNullOrUndefined(viewMode)) {\n this.resetDrawingsList();\n }\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if ('productionScheduleItemsToBeRestored' in changes && this.drawingsGrid?.api) {\n this.setItemBackToSelected(changes.productionScheduleItemsToBeRestored.currentValue);\n }\n\n if ('canSelectDrawings' in changes && !isEqual(changes.canSelectDrawings.previousValue, changes.canSelectDrawings.currentValue) && this.drawingsGrid?.api) {\n this.drawingsGrid.api.hideOverlay();\n this.drawingsGrid.api.refreshServerSide({purge: true});\n this.onRowDataUpdated();\n }\n\n if (this.isExporting) {\n this.exportAllData();\n }\n }\n\n public ngOnInit(): void {\n this.instantiateGridOptionsForDrawings();\n this.initialToggleSelected = this.showOnlySelectedDrawings && this.selectedDrawings?.length > 0;\n }\n\n public updateGrid(gridModel: GridModel): void {\n this.drawingsGrid.api.setFilterModel(gridModel.filterModel);\n }\n\n public getSelectedRows(): number {\n return this.selectedOrderlineIds.length;\n }\n\n public onSelectedViewModeChanged(selectedViewMode: ProductionScheduleDrawingViewMode): void {\n this.selectedViewModeChanged.emit(selectedViewMode);\n }\n\n public onDrawingCanceled(): void {\n if (!AssertionUtils.isNullOrUndefined(this.drawingsGrid?.api)) {\n this.drawingsGrid.api.deselectAll();\n }\n }\n\n public onDrawingDeleted(deletedDrawings: Drawing[]): void {\n this.onDrawingCanceled();\n deletedDrawings.forEach((deletedDrawing: Drawing) => {\n lodashRemove(this.listOfDrawings as Drawing[], (drawing: Drawing) => {\n return isEqual(drawing.id, deletedDrawing.id);\n });\n });\n\n if (!AssertionUtils.isNullOrUndefined(this.drawingsGrid) && !AssertionUtils.isNullOrUndefined(this.drawingsGrid.api)) {\n this.drawingsGrid.api.refreshServerSide();\n }\n }\n\n public onDrawingUpdated(updatedDrawing: Drawing): void {\n this.drawingsGrid.api.forEachNode((node: RowNode) => {\n if (isEqual(node.data.id, updatedDrawing.id)) {\n node.setData(updatedDrawing);\n }\n });\n }\n\n public exportAllData(): void {\n this.dialogBuilder = this.dialogBuilderFactoryService.getBuilder();\n this.dialogBuilder.openAlertDialog({\n titleText: 'AGGRID.EXPORT',\n messageText: 'AGGRID.EXPORTMESSAGE',\n type: DialogType.INFORMATION\n });\n\n const colDef = this.createColumnsDefinition();\n this.exportDrawingsGrid.api.setGridOption('columnDefs', colDef);\n const sortModel: SortModelItem[] = [];\n let startRow = 0;\n let endRow = this.SLICE_SIZE;\n const filterModel = this.drawingsGrid.api.getFilterModel();\n const gridModel: GridModel = new GridModel(startRow, endRow, sortModel, filterModel);\n\n this.fetchExportData(gridModel);\n }\n\n public toggleSelectedRows(change: boolean): void {\n if (change) {\n this.savedFilterModel = this.drawingsGrid.api.getFilterModel();\n\n this.drawingsGrid.api.setFilterModel(null);\n const selectedRows = this.drawingsGrid.api.getSelectedRows();\n if (selectedRows.length > 0) {\n const selectedRowIds = selectedRows.map((selectedRow: any) => this.createRowIDForDrawing(this.isProductionSchedule ? selectedRow.drawing : selectedRow));\n\n const filterModel = {\n id: {\n filterModels: [null, {values: selectedRowIds, filterType: 'set'}],\n filterType: 'multi'\n }\n };\n\n this.drawingsGrid.api.setFilterModel(filterModel);\n }\n } else {\n this.drawingsGrid.api.setFilterModel(this.savedFilterModel);\n\n if (AssertionUtils.isNullOrUndefined(this.savedFilterModel)) {\n this.drawingsGrid.api.refreshServerSide();\n }\n }\n }\n\n private getStatusBarData(gridModel: GridModel): void {\n this.statusBarService\n .getStatusBarData(StatusBarTarget.DRAWING_LIBRARY, gridModel)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((statusBar: StatusBar) => (this.statusBar = statusBar));\n }\n\n private fetchExportData(gridModel: GridModel): void {\n this.drawings\n .getAllWithoutImageDataFromGridModel(TargetForListOfDrawingsEnum.DRAWING_LIBRARY, gridModel)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((listOfDrawings: Drawing[]) => {\n listOfDrawings.forEach((drawing: Drawing) => {\n this.exportData.push(drawing);\n });\n\n if (listOfDrawings.length < 29) {\n this.exportDrawingsGrid.api.setGridOption('rowData', this.exportData);\n this.exportGridOptions.cacheBlockSize = this.exportData.length;\n this.exportDrawingsGrid.api.exportDataAsCsv({columnKeys: ['name', 'widthInPx', 'heightInPx', 'shape', 'dateModified', 'sizeInKB']});\n this.isExporting = false;\n this.exportData = [];\n this.onExportComplete();\n this.dialogBuilder.close();\n } else {\n gridModel.startRow += this.SLICE_SIZE;\n gridModel.endRow += this.SLICE_SIZE;\n this.fetchExportData(gridModel);\n }\n });\n }\n\n private resetDrawingsList(): void {\n this.listOfDrawings = null;\n\n this.getServerSideDatasource();\n }\n\n private getServerSideDatasource(): IServerSideDatasource {\n return {\n getRows: (params: IServerSideGetRowsParams): void => {\n const endRow = params.request.endRow;\n const startRow = params.request.startRow;\n const sortModel = params.request.sortModel;\n let filterModel: any = params.request.filterModel;\n\n if (!AssertionUtils.isEmpty(this.selectedDrawings) && !this.firstTimeServerSideLoaded && this.showOnlySelectedDrawings) {\n filterModel = {\n id: {\n filterModels: [null, {values: this.selectedDrawings.map((drawing: ListDrawingConfiguration) => drawing.drawing.id), filterType: 'set'}],\n filterType: 'multi'\n }\n };\n }\n\n this.drawingListGridModel = new GridModel(startRow, endRow, sortModel, filterModel);\n\n if (this.isProductionSchedule) {\n this.getStatusBarData(this.drawingListGridModel);\n }\n\n this.drawings\n .getAllWithoutImageDataFromGridModel(this.isProductionSchedule ? TargetForListOfDrawingsEnum.PRODUCTION_ORDER : TargetForListOfDrawingsEnum.DRAWING_LIBRARY, this.drawingListGridModel, true)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe({\n next: (listOfDrawings: Drawing[]) => {\n const endRowOrderbook = listOfDrawings.length < this.SLICE_SIZE ? startRow + listOfDrawings.length : undefined;\n const drawings = this.getRowData(listOfDrawings);\n\n if (startRow === 0) {\n if (drawings.length === 0) {\n params.api.showNoRowsOverlay();\n } else {\n params.api.hideOverlay();\n }\n }\n\n params.success({rowData: drawings, rowCount: endRowOrderbook});\n\n if (!this.firstTimeServerSideLoaded) {\n this.setSelectedDrawings(params.api);\n this.firstTimeServerSideLoaded = true;\n }\n },\n error: (error: any) => {\n params.fail();\n params.api.showNoRowsOverlay();\n throw error;\n }\n });\n }\n };\n }\n\n private onExportComplete(): void {\n this.exportComplete.emit();\n }\n\n private getRowData(listOfDrawings: Drawing[]): Drawing[] | ListDrawingConfiguration[] {\n if (this.isProductionSchedule) {\n const listOfDrawingConfigurations = listOfDrawings.map((drawing: Drawing) => new ListDrawingConfiguration(drawing, 0, this.productionScheduleItemMultiplier));\n\n return this.canSelectDrawings ? listOfDrawingConfigurations : this.selectedDrawings;\n }\n\n return listOfDrawings;\n }\n\n private instantiateGridOptionsForDrawings(): void {\n let defaultGridOptionsForDrawings = this.getDefaultGridOptionsForDrawings();\n\n if (this.isProductionSchedule && !this.isPreSelection) {\n defaultGridOptionsForDrawings = defaultGridOptionsForDrawings.withRowDraggingOutsideGrid((params: {rowNode: RowNode; dragEvent: DragEvent}) => this.onRowDrag(params));\n }\n\n if (this.isProductionSchedule) {\n this.gridOptionsForDrawings = defaultGridOptionsForDrawings\n .withSingleClickEdit()\n .withSuppressRowClickSelection()\n .withRowSelection(this.canSelectDrawings, false)\n .withOnCellEditingStarted((event: CellEditingStartedEvent) => this.onCellEditingStarted(event))\n .withOnRowSelected((event: RowSelectedEvent) => this.onRowSelection(event))\n .withOnRowDataUpdated(() => this.onRowDataUpdated())\n .withOnGridReady((event: GridReadyEvent) => {\n event.api.refreshCells();\n event.api.refreshHeader();\n })\n .withOnFirstDataRendered(() => this.getPreselectedDrawings())\n .build();\n } else {\n this.gridOptionsForDrawings = defaultGridOptionsForDrawings\n .withRowSelection(false, false)\n .withOnSelectionChanged(({api}: SelectionChangedEvent) => this.onSelectionChanged(api))\n .build();\n }\n }\n\n private getPreselectedDrawings(): void {\n const filterModel = {\n missingDesign: {\n filterModels: [null, {values: ['false'], filterType: 'set'}],\n filterType: 'multi'\n },\n drawingType: {\n filterModels: [null, {values: ['BMP'], filterType: 'set'}],\n filterType: 'multi'\n }\n };\n\n this.drawingsGrid.api.setFilterModel(filterModel);\n }\n\n private getDefaultGridOptionsForDrawings(): GridOptionsBuilder {\n return this.gridOptionsBuilderFactoryService\n .getBuilder(this.createColumnsDefinition(), GridIdentifier.DESIGNS_LIST)\n .withOnFilterChanged(({api}: FilterChangedEvent) => {\n const floatingFilters = Object.values(api.getFilterModel());\n if (this.floatingFilters !== floatingFilters) {\n this.floatingFilters = floatingFilters;\n this.syncAdvancedSearchFiltersWithFloatingFilters();\n }\n })\n .withGetRowHeight(() => (this.designPreviewFiltered ? this.ROW_HEIGHT_WITHOUT_PREVIEW : this.ROW_HEIGHT_WITH_PREVIEW))\n .withRowClass(this.designPreviewFiltered ? HeaderClass.COMPACT.toString() : '')\n .withOnColumnVisible((event: ColumnVisibleEvent) => this.withOnColumnVisible(event))\n .withServerSideDataSource(100, this.getServerSideDatasource())\n .withGetRowId((params: GetRowIdParams) => this.createRowIDForDrawing(this.isProductionSchedule ? params.data.drawing : params.data))\n .withNoRowsOverlay({\n scale: 0.7,\n hideDescription: true,\n isAnyFilterPresent: () => this.hasActiveFilters()\n } as NoDataOverlayComponentParams)\n .withLoadingOverlay()\n .withContext({componentParent: this});\n }\n\n private withOnColumnVisible(event: ColumnVisibleEvent): void {\n this.designPreviewFiltered = event.visible === false && event.columns.find((column: any) => column.colDef.cellClass === 'preview') != null;\n\n event.api.forEachNode((node: IRowNode) => (this.designPreviewFiltered ? node.setRowHeight(this.ROW_HEIGHT_WITHOUT_PREVIEW) : node.setRowHeight(this.ROW_HEIGHT_WITH_PREVIEW)));\n\n event.api.onRowHeightChanged();\n\n this.gridOptionsForDrawings.headerHeight = this.designPreviewFiltered ? this.HEADER_HEIGHT_WITHOUT_PREVIEW : this.HEADER_HEIGHT_WITH_PREVIEW;\n this.gridOptionsForDrawings.floatingFiltersHeight = this.designPreviewFiltered ? this.HEADER_HEIGHT_WITHOUT_PREVIEW : this.HEADER_HEIGHT_WITH_PREVIEW;\n\n const colDefs = this.gridOptionsForDrawings.columnDefs;\n\n for (const colDef of colDefs) {\n colDef.headerClass = this.designPreviewFiltered ? HeaderClass.COMPACT.toString() : '';\n }\n\n event.api.setGridOption('columnDefs', colDefs);\n event.api.setGridOption('headerHeight', this.gridOptionsForDrawings.headerHeight);\n event.api.setGridOption('floatingFiltersHeight', this.gridOptionsForDrawings.floatingFiltersHeight);\n event.api.setGridOption('rowClass', this.designPreviewFiltered ? HeaderClass.COMPACT.toString() : '');\n\n event.api.refreshHeader();\n }\n\n private setSelectedDrawings(gridApi: GridApi): void {\n gridApi.deselectAll();\n if (this.canSelectDrawings && this.selectedDrawings?.length > 0) {\n gridApi.forEachNode((node: RowNode) => {\n if (!AssertionUtils.isNullOrUndefined(node.data)) {\n node.setSelected(this.selectedDrawings.some((drawing: ListDrawingConfiguration) => drawing.drawing.id === node.data.drawing.id));\n }\n });\n }\n }\n\n private hasActiveFilters(): boolean {\n return Object.values(this.drawingsGrid.api.getFilterModel()).length > 0;\n }\n\n private setItemBackToSelected(productionScheduleItemsToBeRestored: ProductionScheduleItemInPathGroup[]): void {\n this.drawingsGrid.api.forEachNode((node: RowNode) => {\n if (!AssertionUtils.isNullOrUndefined(node.data) && node.data.drawing.id === productionScheduleItemsToBeRestored[0].drawing.id) {\n node.setSelected(true);\n }\n });\n }\n\n private onRowDataUpdated(): void {\n this.drawingsGrid.api.updateGridOptions({\n suppressRowClickSelection: !this.canSelectDrawings,\n rowSelection: this.canSelectDrawings ? {mode: AgGridRowSelection.MULTIPLE} : null,\n rowMultiSelectWithClick: this.canSelectDrawings,\n columnDefs: this.drawingsGrid.api.getColumnDefs().map((colDef: ColDef, index: number) => {\n if (index === 0) {\n colDef.checkboxSelection = this.canSelectDrawings;\n }\n return colDef;\n })\n });\n\n this.drawingsGrid.api.refreshCells();\n }\n\n private onRowSelection(event: RowSelectedEvent): void {\n const selectedRows = event.api.getSelectedNodes();\n\n if (this.canSelectDrawings && this.selectedDrawings.length !== selectedRows.length) {\n this.drawingSelected.emit(selectedRows.map((rowNode: RowNode) => rowNode.data));\n }\n\n const data = event.data as ListDrawingConfiguration;\n\n if (event.node.isSelected()) {\n const orderlineIdsSet = new Set([...this.selectedOrderlineIds, data.drawing.id]);\n this.selectedOrderlineIds = [...orderlineIdsSet];\n\n const selectedDrawingsSet = new Set([...this.selectedDrawings, data]);\n this.selectedDrawings = [...selectedDrawingsSet];\n } else {\n this.selectedOrderlineIds = this.selectedOrderlineIds.filter((orderlineId: number) => data.drawing.id !== orderlineId);\n this.selectedDrawings = this.selectedDrawings.filter((drawing: ListDrawingConfiguration) => data.drawing.id !== drawing.drawing.id);\n }\n }\n\n private onCellEditingStarted(event: CellEditingStartedEvent): void {\n if (this.canSelectDrawings) {\n event.node.setSelected(!event.node.isSelected());\n }\n }\n\n private onSelectionChanged(gridApi: GridApi): void {\n const drawingConfigurations = [];\n gridApi.getSelectedRows().forEach((selectedRow: any, index: number) => {\n drawingConfigurations.push(new ListDrawingConfiguration(selectedRow, index));\n });\n\n this.drawingSelected.emit(drawingConfigurations);\n }\n\n private createColumnsDefinition(): ColDef[] {\n const drawingPropertyPrefix = this.isProductionSchedule ? 'drawing.' : '';\n\n let nameColDef = this.colDefBuilderFactory\n .getBuilder()\n .withColId('name')\n .withField(`${drawingPropertyPrefix}name`, true)\n .withHeaderName('DESIGN_LIBRARY.DETAILS.NAME')\n .withComparator(StringUtils.stringComparator)\n .withTextMultiFilter(this.getPossibleColumnsValues('name'));\n\n if (!this.isProductionSchedule || this.isPreSelection) {\n nameColDef = nameColDef.withLockVisible();\n }\n\n let defaultColDefs = [\n this.colDefBuilderFactory\n .getBuilder()\n .withColIdAndField('id')\n .withValueGetter((params: ValueGetterParams) => this.createRowIDForDrawing(this.isProductionSchedule ? params.data.drawing : params.data))\n .withNumericMultiFilter(this.getPossibleColumnsValues('id'))\n .withHide()\n .withHiddenInToolPanel()\n .build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withValueGetter(this.isProductionSchedule ? 'data.drawing' : 'data')\n .withHeaderName('GENERAL.PREVIEW')\n .withCellRenderer(DesignPreviewComponent)\n .withCellClass('preview')\n .withSortable(false)\n .withMinWidth(128)\n .withMaxWidth(128)\n .withoutFilter()\n .build(),\n nameColDef.build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withColId('widthInPx')\n .withField(`${drawingPropertyPrefix}dimensionsInPixels.widthInPx`)\n .withHeaderName('GENERAL.DIMENSIONS.WIDTH', 1, false, Unit.PIXEL)\n .withTooltipValueGetter((params: ITooltipParams) => AgGridUtils.buildAgGridCellTooltipWithUnit(params.value, Unit.PIXEL, this.l10nIntlService))\n .withRightAlignment()\n .withNumericMultiFilter(this.getPossibleColumnsValues('widthInPx'))\n .build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withColId('heightInPx')\n .withField(`${drawingPropertyPrefix}dimensionsInPixels.heightInPx`)\n .withHeaderName('GENERAL.DIMENSIONS.LENGTH', 1, false, Unit.PIXEL)\n .withTooltipValueGetter((params: ITooltipParams) => AgGridUtils.buildAgGridCellTooltipWithUnit(params.value, Unit.PIXEL, this.l10nIntlService))\n .withRightAlignment()\n .withNumericMultiFilter(this.getPossibleColumnsValues('heightInPx'))\n .build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withColId('shape')\n .withField(`${drawingPropertyPrefix}shape`)\n .withHeaderName('GENERAL.SHAPE')\n .withValueGetter((params: ValueGetterParams) => this.getShape(params.data), true)\n .withComparator(StringUtils.stringComparator)\n .withTextMultiFilter(this.getPossibleColumnsValues('shape'))\n .build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withColId('dateModified')\n .withField(`${drawingPropertyPrefix}dateModified`)\n .withHeaderName('TEXTILE_DATA.LAST_MODIFIED')\n .withDate()\n .withDateMultiFilter(this.getPossibleColumnsValues('dateModified'))\n .build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withColId('sizeInKB')\n .withField(`${drawingPropertyPrefix}sizeInKB`)\n .withHeaderName('DESIGN_LIBRARY.DETAILS.SIZE')\n .withRightAlignment()\n .withValueGetter((params: ValueGetterParams) => this.getSizeInKB(params.data))\n .withCellRenderer((params: ICellRendererParams) => AgGridUtils.buildAgGridCellTextWithUnit(params.getValue(), Unit.KILOBYTE, this.l10nIntlService))\n .withTooltipValueGetter((params: ITooltipParams) => AgGridUtils.buildAgGridCellTooltipWithUnit(params.value, Unit.KILOBYTE, this.l10nIntlService))\n .withoutFilter()\n .withSortable()\n .build()\n ];\n\n if (this.isProductionSchedule) {\n defaultColDefs = [\n ...defaultColDefs,\n this.colDefBuilderFactory\n .getBuilder()\n .withColId('qualityName')\n .withField(`quality`, true)\n .withHeaderName('TEXTILE_DATA.MACHINE_QUALITY.MACHINE_QUALITY')\n .withComparator(StringUtils.stringComparator)\n .withTextMultiFilter(this.getPossibleColumnsValues('qualityName'))\n .build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withColId('colorSetName')\n .withField(`colorSet`, true)\n .withHeaderName('TEXTILE_DATA.COLOR_SET.COLOR_SET')\n .withComparator(StringUtils.stringComparator)\n .withTextMultiFilter(this.getPossibleColumnsValues('colorSetName'))\n .build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withColId('mainColor')\n .withField('mainColor.name', true)\n .withComparator(StringUtils.stringComparator)\n .withHeaderName('GENERAL.ADVANCED_SEARCH.MAIN_COLOR')\n .withTextMultiFilter(this.getPossibleColumnsValues('mainColor'))\n .withCellRendererSelector(this.cellRendererSelector(GridCreelPreviewOfCreelPositionComponent, {previewType: PreviewType.COLOR, showRgbValues: true}, true))\n .build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withColId('borderColor')\n .withField('borderColor.name', true)\n .withComparator(StringUtils.stringComparator)\n .withHeaderName('GENERAL.ADVANCED_SEARCH.BORDER_COLOR')\n .withCellRendererSelector(this.cellRendererSelector(GridCreelPreviewOfCreelPositionComponent, {previewType: PreviewType.COLOR, showRgbValues: true}, true, false))\n .withTextMultiFilter(this.getPossibleColumnsValues('borderColor'))\n .build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withColId('commercialWidthInCM')\n .withField(`commercialDimensionsInCm.widthInCM`)\n .withHeaderName('GENERAL.DIMENSIONS.WIDTH', 1, false, Unit.CENTIMETER)\n .withRightAlignment()\n .withNumericMultiFilter(this.getPossibleColumnsValues('commercialWidthInCM'))\n .build()\n ];\n }\n\n const builderAmountColDef = [\n this.colDefBuilderFactory\n .getBuilder()\n .withColIdAndField('amount')\n .withHeaderName('GENERAL.QUANTITY')\n .withRightAlignment()\n .withSortable(false)\n .withOnCellClicked((event: CellClickedEvent) => this.editQuantityCell(event))\n .withEditable((params: EditableCallbackParams) => this.isQuantityEditable(params))\n .withCellEditor(NumberCellEditorComponent, (): NumberCellEditorParams => ({min: this.productionScheduleItemMultiplier}) as NumberCellEditorParams)\n .withValueSetter((params: ValueSetterParams) => this.setQuantity(params))\n .withMinWidth(100)\n .withSuppressMovable()\n .withLockVisible()\n .withoutFilter()\n .build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withColId('heightInCM')\n .withField(`commercialDimensionsInCm.heightInCM`)\n .withHeaderName('GENERAL.DIMENSIONS.HEIGHT', 1, false, Unit.CENTIMETER)\n .withNumericMultiFilter(this.getPossibleColumnsValues('heightInCM'))\n .withRightAlignment()\n .withHiddenInToolPanel()\n .withHide(this.isPreSelection)\n .build()\n ];\n\n return this.isProductionSchedule && !this.isPreSelection ? [...builderAmountColDef, ...defaultColDefs] : defaultColDefs;\n }\n\n private cellRendererSelector(\n cellRenderer: any = null,\n cellRendererParams: any = null,\n cellForMainOrBorderColor: boolean = false,\n useMainColor: boolean = true\n ): (params: ICellRendererParams) => CellRendererSelectorResult {\n return (params: ICellRendererParams): CellRendererSelectorResult => {\n if (cellForMainOrBorderColor) {\n const configuration = params.data as ListDrawingConfiguration;\n cellRendererParams.value = {creelPositionForColors: useMainColor ? configuration.mainColor : configuration.borderColor};\n }\n return params.node.level === 0 ? {component: cellRenderer ?? params.colDef.cellRenderer, params: cellRendererParams} : {component: EmptyCellRendererComponent};\n };\n }\n\n private getShape(drawing: Drawing | ListDrawingConfiguration): string {\n const shape = drawing instanceof ListDrawingConfiguration ? drawing.drawing.shape : drawing.shape;\n return FixedShape.getTranslationKeyForShape(shape, this.translate);\n }\n\n private getDateModified(drawing: Drawing | ListDrawingConfiguration): Date {\n return drawing instanceof ListDrawingConfiguration ? drawing.drawing.dateModified : drawing.dateModified;\n }\n\n private getSizeInKB(drawing: Drawing | ListDrawingConfiguration): number {\n if (drawing instanceof ListDrawingConfiguration) {\n return drawing.drawing.sizeInKB ? Math.round(drawing.drawing.sizeInKB) : 0;\n }\n return drawing.sizeInKB ? Math.round(drawing.sizeInKB) : 0;\n }\n\n private editQuantityCell(event: CellClickedEvent): void {\n if (this.drawingsGrid?.api) {\n this.drawingsGrid?.api?.stopEditing();\n }\n\n if (event.column.getColDef().editable) {\n this.drawingsGrid?.api.startEditingCell({\n rowIndex: event?.rowIndex,\n colKey: event?.column?.getColId()\n });\n }\n }\n\n private setQuantity(params: ValueSetterParams): boolean {\n if (this.productionScheduleItemMultiplier === 2 && params.newValue % 2 !== 0) {\n params.newValue--;\n }\n params.data.amount = Math.max(this.productionScheduleItemMultiplier, params.newValue);\n return true;\n }\n\n private createRowIDForDrawing(drawing: Drawing): string {\n return AssertionUtils.isNullOrUndefined(drawing) ? `${UuidUtils.generateV4Uuid()}` : `${drawing.id}${UuidUtils.generateV4Uuid()}`;\n }\n\n private syncAdvancedSearchFiltersWithFloatingFilters(): void {\n const advancedSearchFiltersFromFloatingFilters = this.advancedSearchFilters.map((advancedSearchFilter: PropertyValue) => {\n const floatingFilterToSyncWith = this.floatingFilters.find((floatingFilter: PropertyValue) => floatingFilter.propertyName === advancedSearchFilter.propertyName);\n if (floatingFilterToSyncWith !== undefined) {\n advancedSearchFilter.propertyValue = floatingFilterToSyncWith.propertyValue;\n }\n return advancedSearchFilter;\n });\n this.advancedSearchFiltersChange.emit(advancedSearchFiltersFromFloatingFilters);\n }\n\n private onRowDrag(params: {rowNode: RowNode; dragEvent: DragEvent}): void {\n const listDrawing = new ListDrawingConfiguration(params.rowNode.data.drawing, params.rowNode.data.configurationIndex, params.rowNode.data.amount);\n listDrawing.amount = Math.floor(listDrawing.amount / this.productionScheduleItemMultiplier);\n\n this.draggingService.setData(listDrawing);\n\n const dragPreview = this.renderer.createElement('img');\n this.renderer.setAttribute(dragPreview, 'src', '/assets/images/image-placeholder.svg');\n\n params.dragEvent.dataTransfer.setDragImage(dragPreview, 0, 0);\n }\n\n private isQuantityEditable(params: EditableCallbackParams): boolean {\n return !params.data.drawing.repeated;\n }\n\n private getPossibleColumnsValues(columnIdentifier: string): Observable {\n return this.drawings.getPossibleValues(columnIdentifier).pipe(takeUntil(this.unSubscribeOnViewDestroy));\n }\n}\n","import arrayFilter from './_arrayFilter.js';\nimport arrayMap from './_arrayMap.js';\nimport baseProperty from './_baseProperty.js';\nimport baseTimes from './_baseTimes.js';\nimport isArrayLikeObject from './isArrayLikeObject.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This method is like `_.zip` except that it accepts an array of grouped\n * elements and creates an array regrouping the elements to their pre-zip\n * configuration.\n *\n * @static\n * @memberOf _\n * @since 1.2.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n *\n * _.unzip(zipped);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\nfunction unzip(array) {\n if (!(array && array.length)) {\n return [];\n }\n var length = 0;\n array = arrayFilter(array, function(group) {\n if (isArrayLikeObject(group)) {\n length = nativeMax(group.length, length);\n return true;\n }\n });\n return baseTimes(length, function(index) {\n return arrayMap(array, baseProperty(index));\n });\n}\n\nexport default unzip;\n","import baseRest from './_baseRest.js';\nimport unzip from './unzip.js';\n\n/**\n * Creates an array of grouped elements, the first of which contains the\n * first elements of the given arrays, the second of which contains the\n * second elements of the given arrays, and so on.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\nvar zip = baseRest(unzip);\n\nexport default zip;\n","import baseFlatten from './_baseFlatten.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Recursively flattens `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\n * // => [1, 2, 3, 4, 5]\n */\nfunction flattenDeep(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, INFINITY) : [];\n}\n\nexport default flattenDeep;\n","
\n \n\n @if (missingDesign) {\n \n } @else if (!canBePlanned) {\n \n }\n
\n","import {Component} from '@angular/core';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {GridOrderLineStatusComponent} from '@presentation/components/order-lines-grid/grid-order-line-status/grid-order-line-status.component';\nimport {TagColor} from '@vdw/angular-component-library';\nimport {ProductionScheduleOrderLineWithQuantity} from '../production-schedule-order-line-with-quantity';\nimport {OrderLineStatusCellRendererParams} from './order-line-status-cell-renderer-params.interface';\n\n@Component({\n templateUrl: './order-line-status-cell-renderer.component.html',\n styleUrls: ['./order-line-status-cell-renderer.component.scss']\n})\nexport class OrderLineStatusCellRendererComponent extends GridOrderLineStatusComponent {\n private readonly inScheduleTranslationKey = 'IN_SCHEDULE';\n private productionScheduleOrderLineWithQuantity: ProductionScheduleOrderLineWithQuantity;\n private productionSchedule: ProductionSchedule;\n\n public agInit(params: OrderLineStatusCellRendererParams): void {\n super.agInit(params);\n\n this.productionScheduleOrderLineWithQuantity = params.data instanceof ProductionScheduleItemInPathGroup ? params.data.orderline : params.data;\n this.productionSchedule = params.productionSchedule;\n this.statusLabel = this.getQuantityInProductionSchedule() > 0 ? this.inScheduleTranslationKey : this.statusLabel;\n }\n\n public getColor(): TagColor {\n if (this.getQuantityInProductionSchedule() === 0) {\n return super.getColor();\n }\n\n const inProductionSchedule = this.productionScheduleOrderLineWithQuantity?.article?.design?.repeated\n ? this.productionScheduleOrderLineWithQuantity?.getHeightLeftInMMForProductionSchedule(this.productionSchedule.getProductionScheduleItemMultiplier())\n : this.productionScheduleOrderLineWithQuantity?.getAmountLeftForProductionSchedule(this.productionSchedule.getProductionScheduleItemMultiplier());\n\n return inProductionSchedule <= 0 ? TagColor.SUCCESS : TagColor.WARNING;\n }\n\n private getQuantityInProductionSchedule(): number {\n return this.productionScheduleOrderLineWithQuantity?.article?.design?.repeated\n ? this.productionScheduleOrderLineWithQuantity?.heightInProductionScheduleInMM\n : this.productionScheduleOrderLineWithQuantity?.amountInProductionSchedule;\n }\n}\n","import {Component} from '@angular/core';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionScheduleOrderLine} from '@domain/production-schedule/production-schedule-order-line';\nimport {TagColor} from '@vdw/angular-component-library';\nimport {ICellRendererAngularComp} from 'ag-grid-angular';\nimport {isNil} from 'lodash-es';\nimport {ProductionScheduleItemInPathGroupStatusCellRendererParams} from './production-schedule-item-in-path-group-status-cell-renderer-params.interface';\n\n@Component({\n templateUrl: './production-schedule-item-in-path-group-status-cell-renderer.component.html'\n})\nexport class ProductionScheduleItemInPathGroupStatusCellRendererComponent implements ICellRendererAngularComp {\n public pathNumber: number;\n private productionScheduleOrderLine: ProductionScheduleOrderLine;\n private productionSchedule: ProductionSchedule;\n\n public agInit(params: ProductionScheduleItemInPathGroupStatusCellRendererParams): void {\n this.pathNumber = params?.data?.productionSchedulePath?.pathNumber;\n this.productionScheduleOrderLine = params?.data?.productionScheduleOrderLine;\n this.productionSchedule = params.productionSchedule;\n }\n\n public refresh(params: ProductionScheduleItemInPathGroupStatusCellRendererParams): boolean {\n return false;\n }\n\n public getColor(): TagColor {\n const leftForProductionSchedule = this.productionScheduleOrderLine.article.design.repeated\n ? this.productionScheduleOrderLine.getHeightLeftInMMForProductionSchedule(this.productionSchedule.getProductionScheduleItemMultiplier())\n : this.productionScheduleOrderLine.getAmountLeftForProductionSchedule(this.productionSchedule.getProductionScheduleItemMultiplier());\n\n return isNil(leftForProductionSchedule) || leftForProductionSchedule > 0 ? TagColor.WARNING : TagColor.SUCCESS;\n }\n}\n","\n","\n\n
\n
\n
\n \n
\n
{{ 'GENERAL.ACTIONS.ADD_TO' | bmsTranslate }}:
\n\n
\n \n
\n
\n\n
\n \n \n {{ 'PRODUCTION_ORDER.DESIGN_LIBRARY.ORDER_LINES.PATH_LABEL' | bmsTranslate }}{{ pathWithLabel.label }}\n \n
\n
\n\n \n \n \n\n \n \n \n \n {{ 'PRODUCTION_ORDER.DESIGN_LIBRARY.ORDER_LINES.PATH_LABEL' | bmsTranslate }}{{ pathWithLabel.label }}\n \n
\n \n \n \n\n \n \n \n
\n \n\n \n \n\n \n \n\n","import {Component, ElementRef, EventEmitter, Inject, Input, OnInit, Output, Renderer2, ViewChild, ViewEncapsulation} from '@angular/core';\nimport {GridIdentifier} from '@application/grids/grid-identifier.enum';\nimport {OrderLinesGridService} from '@application/helper/orderbook/order-lines-grid.service';\nimport {DraggingService} from '@application/services/dragging/dragging.service';\nimport {FixedShape} from '@domain/drawing-library/fixed-shape.enum';\nimport {OrderLinesTarget} from '@domain/order-lines-target.enum';\nimport {ProductionOrderCustomSettings} from '@domain/production-schedule/custom-settings/production-order-custom-settings';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {ProductionScheduleOrderLine} from '@domain/production-schedule/production-schedule-order-line';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {ColoredYarnSet} from '@domain/textile-data/colored-yarn-set/colored-yarn-set';\nimport {OverviewListColoredYarnSetWithStartDent} from '@domain/textile-data/creel/overview-list-colored-yarn-set-with-start-dent';\nimport {CarpetWeaveQuality} from '@domain/textile-data/machine-quality/carpet-weave-quality';\nimport {PathWidth} from '@domain/textile-data/machine-quality/path-width';\nimport {WeaveQuality} from '@domain/textile-data/machine-quality/weave-quality';\nimport {StatusBarTarget} from '@domain/textile-data/status-bar-target.constants';\nimport {COLORED_YARN_SETS, ColoredYarnSets} from '@infrastructure/http/colored-yarn-set/colored-yarn-sets';\nimport {MACHINE_QUALITIES, MachineQualities} from '@infrastructure/http/machine-quality/machine-qualities';\nimport {ORDERBOOK, Orderbook} from '@infrastructure/http/orderbook/orderbook';\nimport {HttpStatusBarService} from '@infrastructure/http/status-bar/http-status-bar.service';\nimport {ListDrawingOrderLine} from '@presentation/components/drawing-list/list-drawing-order-line';\nimport {SearchFiltersComponent} from '@presentation/components/search-filters/search-filters.component';\nimport {OverviewListOrderLine} from '@presentation/pages/texfab/orderbook/overview/overview-list-order-line';\nimport {PRODUCTION_SCHEDULE_PLAN, ProductionSchedulePlan} from '@presentation/pages/texfab/production-schedule/add/plan/production-schedule-plan';\nimport {OverviewListColoredYarnSet} from '@presentation/pages/textile-data/colored-yarn-set/overview/overview-list-colored-yarn-set';\nimport {\n AgGridUtils,\n AssertionUtils,\n BaseComponent,\n ColDefBuilderFactoryService,\n DOMUtils,\n EmptyCellRendererComponent,\n FilterComponent,\n GridModel,\n GridOptionsBuilderFactoryService,\n GridTagComponent,\n LoadingCellOverlayComponent,\n NoDataOverlayComponentParams,\n NumberCellEditorComponent,\n NumberCellEditorParams,\n NumberCellRendererComponent,\n Priority,\n StatusBar,\n StringUtils,\n TagColor,\n TagSize,\n TranslateService,\n Unit\n} from '@vdw/angular-component-library';\nimport {AgGridAngular} from 'ag-grid-angular';\nimport {\n CellClickedEvent,\n CellRendererSelectorResult,\n ColDef,\n DndSourceCallbackParams,\n EditableCallbackParams,\n GetRowIdParams,\n GridOptions,\n ICellEditorParams,\n ICellRendererParams,\n IServerSideDatasource,\n IServerSideGetRowsParams,\n ITooltipParams,\n RowNode,\n RowSelectedEvent,\n SortModelItem,\n ValueGetterParams,\n ValueSetterParams\n} from 'ag-grid-community';\nimport {L10nIntlService} from 'angular-l10n';\nimport {flatMap, flatten, flattenDeep, isNil, zip} from 'lodash-es';\nimport {forkJoin, Observable, Subject} from 'rxjs';\nimport {map, mergeMap, startWith, switchMap, takeUntil} from 'rxjs/operators';\nimport {OrderLinesHelper} from '../order-lines-helper';\nimport {OrderLineStatusCellRendererParams} from './order-line-status-cell-renderer/order-line-status-cell-renderer-params.interface';\nimport {OrderLineStatusCellRendererComponent} from './order-line-status-cell-renderer/order-line-status-cell-renderer.component';\nimport {ProductionScheduleItemInPathGroupStatusCellRendererComponent} from './production-schedule-item-in-path-group-status-cell-renderer/production-schedule-item-in-path-group-status-cell-renderer.component';\nimport {ProductionScheduleItemInPathGroupWithIdentification} from './production-schedule-item-in-path-group-with-identification';\nimport {ProductionScheduleOrderLineWithQuantity} from './production-schedule-order-line-with-quantity';\n\ntype RowData = ProductionScheduleOrderLineWithQuantity | ProductionScheduleItemInPathGroupWithIdentification;\n\n@Component({\n selector: 'app-drawing-library-order-lines-view',\n templateUrl: './order-lines-view.component.html',\n styleUrls: ['./order-lines-view.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class OrderLinesViewComponent extends BaseComponent implements OnInit {\n public static ADD_PATH_LABEL_BUTTON_WIDTH_IN_PX = 66;\n public static DEFAULT_PADDING_IN_PX = 16;\n public static DELETE_PATH_LABEL_BUTTON_WIDTH_IN_PX = 44;\n public static MIN_WIDTH_FILTER_IN_PX = 244;\n public static WIDTH_TEXT_FILTER_IN_PX = 184;\n\n @Input() public productionSchedule: ProductionSchedule;\n @Input() public productionOrderCustomSettings: ProductionOrderCustomSettings;\n @Input() public factorForConversionFromMillimetersToPicks: number;\n @Input() public factorForConversionFromMillimetersToDents: number;\n @Input() public pathWidths: PathWidth[] = [];\n @Input() public commercialUnit: Unit;\n @Input() public isPreSelection = false;\n @Input() public presetGridModel = null;\n @Output() public gridModelOutput: EventEmitter = new EventEmitter();\n @Output() public selectedOrderlineIdsChanged: EventEmitter = new EventEmitter();\n\n @ViewChild('container')\n public containerElement: ElementRef;\n\n @ViewChild('fixedButtons')\n public fixedButtonsElement: ElementRef;\n\n @ViewChild('pathButtons')\n public pathButtonsElement: ElementRef;\n\n @ViewChild('searchFilters')\n public searchFilters: SearchFiltersComponent;\n\n @ViewChild('filter')\n public filter: FilterComponent;\n\n @ViewChild('orderLinesGrid')\n public orderLinesGrid: AgGridAngular;\n\n public overflowPathsOpen = false;\n public widthForFilters: string;\n public statusBar: StatusBar;\n public gridOptions: GridOptions;\n public loadingForTheFirstTime = true;\n public gridModel: GridModel;\n\n private selectedOrderlineIds = [];\n private onlyShowSelected = false;\n\n private widthForPathButtonsInPx: number;\n private orderLines: ProductionScheduleOrderLineWithQuantity[];\n private savedFilterModel: any;\n private readonly SLICE_SIZE = 30;\n private qualityNames: string[] = [];\n private coloredYarnSetNames: string[] = [];\n private readonly syncWithProductionScheduleSubject = new Subject();\n private readonly booleanFalseTranslation = 'GENERAL.CONDITION.NO';\n private readonly booleanTrueTranslation = 'GENERAL.CONDITION.YES';\n\n public constructor(\n @Inject(ORDERBOOK) private readonly orderbook: Orderbook,\n @Inject(PRODUCTION_SCHEDULE_PLAN) private readonly productionSchedulePlan: ProductionSchedulePlan,\n @Inject(MACHINE_QUALITIES) private readonly qualities: MachineQualities,\n @Inject(COLORED_YARN_SETS) private readonly coloredYarnSets: ColoredYarnSets,\n private readonly gridOptionsBuilderFactoryService: GridOptionsBuilderFactoryService,\n private readonly colDefBuilderFactoryService: ColDefBuilderFactoryService,\n private readonly translate: TranslateService,\n private readonly draggingService: DraggingService,\n private readonly renderer: Renderer2,\n private readonly l10nIntlService: L10nIntlService,\n private readonly elementRef: ElementRef,\n private readonly orderLinesGridService: OrderLinesGridService,\n private readonly statusBarService: HttpStatusBarService,\n private readonly orderLinesHelper: OrderLinesHelper\n ) {\n super();\n this.orderLinesHelper.commercialUnit = this.commercialUnit;\n }\n\n public ngOnInit(): void {\n this.initialiseGridOptions();\n this.subscribeToProductionScheduleChanges();\n this.subscribeToElementRefSizeChanges();\n }\n\n public trackByLabeledPath = (_: number, labeledPath: {label: number; path: ProductionSchedulePath}): number => labeledPath.label;\n\n public getVisiblePathsForSelectedOrderLines(): {label: number; path: ProductionSchedulePath}[] {\n return this.getPathsWithLabel().visible;\n }\n\n public getOverflowPathsForSelectedOrderLines(): {label: number; path: ProductionSchedulePath}[] {\n return this.getPathsWithLabel().overflow;\n }\n\n public hasVisiblePathsForSelectedOrderLines(): boolean {\n const listDrawingOrderLines = this.getSelectedOrderLines().map((productionScheduleOrderLine: ProductionScheduleOrderLineWithQuantity) =>\n this.createListDrawingOrderLine(productionScheduleOrderLine, this.productionSchedule.machineQuality.weaveStructure.picksPerColorLine)\n );\n\n const containsEmptyOrderLines = listDrawingOrderLines\n .map(\n (listDrawingOrderLine: ListDrawingOrderLine) =>\n listDrawingOrderLine.amount >= 1 && ((listDrawingOrderLine.drawing.repeated && listDrawingOrderLine.commercialLengthInMM > 0) || !listDrawingOrderLine.drawing.repeated)\n )\n .every((notEmpty: boolean) => !notEmpty);\n\n return this.getPathsWithLabel().visible.length > 0 && !containsEmptyOrderLines;\n }\n\n public hasOverflowPathsForSelectedOrderLines(): boolean {\n return this.getPathsWithLabel().overflow.length > 0;\n }\n\n public hasSelectedOrderLines(): boolean {\n return this.getSelectedOrderLines().length > 0;\n }\n\n public hasDifferentColoredYarnSets(): boolean {\n const coloredYarnSets = this.getSelectedOrderLines().map((productionScheduleOrderLine: ProductionScheduleOrderLineWithQuantity) => productionScheduleOrderLine.article.coloredYarnSet.id);\n return new Set(coloredYarnSets).size > 1;\n }\n\n public getSelectedRows(): number {\n return this.orderLinesGrid?.api?.getSelectedRows().length ?? 0;\n }\n\n public toggleSelectedRows(change: boolean): void {\n if (change) {\n this.onlyShowSelected = true;\n this.savedFilterModel = this.orderLinesGrid?.api?.getFilterModel();\n this.orderLinesGrid?.api?.setFilterModel(null);\n const selectedRows = this.orderLinesGrid?.api?.getSelectedRows();\n if (!AssertionUtils.isEmpty(selectedRows)) {\n const selectedRowIds = [];\n selectedRows.forEach((row: any) => selectedRowIds.push(`${row.id}`));\n\n const filterModel = {\n id: {\n filterModels: [null, {values: selectedRowIds, filterType: 'set'}],\n filterType: 'multi'\n }\n };\n\n this.orderLinesGrid?.api?.setFilterModel(filterModel);\n }\n } else {\n this.onlyShowSelected = false;\n this.orderLinesGrid?.api?.setFilterModel(this.savedFilterModel);\n }\n }\n\n public openOverflowPaths(): void {\n this.overflowPathsOpen = true;\n }\n\n public closeOverflowPaths(): void {\n this.overflowPathsOpen = false;\n }\n\n public addSelectedOrderLinesToPath(path: ProductionSchedulePath): void {\n const selectedOrderLines = this.getSelectedOrderLines();\n\n this.orderLinesGrid?.api?.getSelectedNodes()?.forEach((rowNode: RowNode) => rowNode.setSelected(false));\n\n const listDrawingOrderLines = selectedOrderLines.map((productionScheduleOrderLine: ProductionScheduleOrderLineWithQuantity) =>\n this.createListDrawingOrderLine(productionScheduleOrderLine, this.productionSchedule.machineQuality.weaveStructure.picksPerColorLine)\n );\n\n for (const [orderLine, listDrawingOrderLine] of zip(selectedOrderLines, listDrawingOrderLines)) {\n const overviewListColoredYarnSetWithStartDent = this.productionSchedule.coloredYarnSets.find(\n (cys: OverviewListColoredYarnSetWithStartDent) => cys.coloredYarnSet.id === orderLine.article.coloredYarnSet.id\n );\n\n if (this.productionSchedule.canAddProductionScheduleItemToProductionSchedulePath(listDrawingOrderLine, path.pathNumber, overviewListColoredYarnSetWithStartDent)) {\n this.productionSchedulePlan.addDrawingToProductionSchedulePath(listDrawingOrderLine, path.pathNumber, overviewListColoredYarnSetWithStartDent);\n }\n }\n }\n\n public canAddSelectedOrderLinesToNewPath(): boolean {\n if (!this.canAddSelectedOrderLinesToPath()) {\n return false;\n }\n\n const selectedOrderLines = this.getSelectedOrderLines();\n\n const listDrawingOrderLines = selectedOrderLines.map((productionScheduleOrderLine: ProductionScheduleOrderLineWithQuantity) =>\n this.createListDrawingOrderLine(productionScheduleOrderLine, this.productionSchedule.machineQuality.weaveStructure.picksPerColorLine)\n );\n\n const coloredYarnSetId = listDrawingOrderLines[0]?.orderLine.article.coloredYarnSet.id;\n\n const coloredYarnSetWithStartDent = this.productionSchedule.coloredYarnSets.find(\n (overviewListColoredYarnSetWithStartDent: OverviewListColoredYarnSetWithStartDent) => overviewListColoredYarnSetWithStartDent.coloredYarnSet.id === coloredYarnSetId\n );\n\n const canAddListDrawingOrderLineToNewPath = listDrawingOrderLines.map((listDrawingOrderLine: ListDrawingOrderLine) =>\n AssertionUtils.isNullOrUndefined(coloredYarnSetWithStartDent)\n ? false\n : this.productionSchedule.canAddProductionScheduleItemToColoredYarnSet(coloredYarnSetWithStartDent.startDent, listDrawingOrderLine)\n );\n\n return canAddListDrawingOrderLineToNewPath.every((canAdd: boolean) => canAdd);\n }\n\n public canAddSelectedOrderLinesToPath(path?: ProductionSchedulePath): boolean {\n if (this.hasDifferentColoredYarnSets() || !this.hasSelectedOrderLines() || this.hasEmptySelectedOrderLines() || this.hasSelectedOrderLinesWithQuantityLesserThanMinimum()) {\n return false;\n }\n\n const selectedOrderLines = this.getSelectedOrderLines();\n\n const listDrawingOrderLines = selectedOrderLines.map((productionScheduleOrderLine: ProductionScheduleOrderLineWithQuantity) =>\n this.createListDrawingOrderLine(productionScheduleOrderLine, this.productionSchedule.machineQuality.weaveStructure.picksPerColorLine)\n );\n\n if (path) {\n const containsOrderLinesThatCanNotBeAddedToGivenPath = listDrawingOrderLines.map((listDrawingOrderLine: ListDrawingOrderLine, index: number) => {\n const coloredYarnSetWithStartDent = this.productionSchedule.coloredYarnSets.find(\n (overviewListColoredYarnSetWithStartDent: OverviewListColoredYarnSetWithStartDent) =>\n overviewListColoredYarnSetWithStartDent.coloredYarnSet.id === listDrawingOrderLines[index].orderLine.article.coloredYarnSet.id\n );\n return this.productionSchedule.canAddProductionScheduleItemToProductionSchedulePath(listDrawingOrderLine, path.pathNumber, coloredYarnSetWithStartDent);\n });\n\n if (containsOrderLinesThatCanNotBeAddedToGivenPath.some((canAdd: boolean) => !canAdd)) {\n return false;\n }\n }\n\n const containsEmptyOrderLines = listDrawingOrderLines.map(\n (listDrawingOrderLine: ListDrawingOrderLine) =>\n listDrawingOrderLine.amount >= 1 && ((listDrawingOrderLine.drawing.repeated && listDrawingOrderLine.commercialLengthInMM > 0) || !listDrawingOrderLine.drawing.repeated)\n );\n\n return containsEmptyOrderLines.every((notEmpty: boolean) => notEmpty);\n }\n\n public addSelectedOrderLinesToNewPath(): void {\n const selectedOrderLines = this.getSelectedOrderLines();\n\n this.orderLinesGrid?.api?.getSelectedNodes()?.forEach((rowNode: RowNode) => rowNode.setSelected(false));\n\n const listDrawingOrderLines = selectedOrderLines.map((productionScheduleOrderLine: ProductionScheduleOrderLineWithQuantity) =>\n this.createListDrawingOrderLine(productionScheduleOrderLine, this.productionSchedule.machineQuality.weaveStructure.picksPerColorLine)\n );\n\n const coloredYarnSetId = listDrawingOrderLines[0].orderLine.article.coloredYarnSet.id;\n\n const coloredYarnSetWithStartDent = this.productionSchedule.coloredYarnSets.find(\n (overviewListColoredYarnSetWithStartDent: OverviewListColoredYarnSetWithStartDent) => overviewListColoredYarnSetWithStartDent.coloredYarnSet.id === coloredYarnSetId\n );\n\n for (const listDrawingOrderLine of listDrawingOrderLines) {\n if (this.productionSchedule.canAddProductionScheduleItemToColoredYarnSet(coloredYarnSetWithStartDent.startDent, listDrawingOrderLine)) {\n this.productionSchedulePlan.addDrawingToColoredYarnSet(listDrawingOrderLine, coloredYarnSetWithStartDent.startDent);\n }\n }\n }\n\n public isSelectingOverlappingOrderLinesAndProductionScheduleItems(): boolean {\n const selectedOrderLineIds = this.getSelectedOrderLines().map((productionScheduleOrderLineWithQuantity: ProductionScheduleOrderLineWithQuantity) => productionScheduleOrderLineWithQuantity.id);\n\n const productionScheduleItemsFromSelectedOrderLines = this.getProductionScheduleItemsInPathGroup().filter((productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup) =>\n selectedOrderLineIds.includes(productionScheduleItemInPathGroup.orderLineId)\n );\n\n const selectedProductionScheduleItems = this.getSelectedProductionScheduleItems().map(\n (productionScheduleItemInPathGroupWithIdentification: ProductionScheduleItemInPathGroupWithIdentification) =>\n productionScheduleItemInPathGroupWithIdentification.productionScheduleItemInPathGroup\n );\n\n return selectedProductionScheduleItems.some((productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup) =>\n productionScheduleItemsFromSelectedOrderLines.includes(productionScheduleItemInPathGroup)\n );\n }\n\n public canDeleteSelectedOrderLinesOrProductionScheduleItems(): boolean {\n const hasSelectedProductionScheduleItems = this.getSelectedProductionScheduleItems().length > 0;\n\n const selectedOrderLineIds = this.getSelectedOrderLines().map((productionScheduleOrderLineWithQuantity: ProductionScheduleOrderLineWithQuantity) => productionScheduleOrderLineWithQuantity.id);\n const orderLineIds = this.getProductionScheduleItemsInPathGroup().map((productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup) => productionScheduleItemInPathGroup.orderLineId);\n\n if (hasSelectedProductionScheduleItems) {\n return selectedOrderLineIds.every((selectedOrderLineId: number) => orderLineIds.includes(selectedOrderLineId));\n } else {\n return selectedOrderLineIds.length > 0 && selectedOrderLineIds.every((selectedOrderLineId: number) => orderLineIds.includes(selectedOrderLineId));\n }\n }\n\n public updateGrid(gridModel: GridModel): void {\n this.orderLinesGrid?.api?.setFilterModel(gridModel.filterModel);\n this.orderLinesGrid?.api?.refreshServerSide();\n }\n\n public deleteSelectedOrderLinesOrProductionScheduleItems(): void {\n const selectedOrderLineIds = this.getSelectedOrderLines().map((productionScheduleOrderLineWithQuantity: ProductionScheduleOrderLineWithQuantity) => productionScheduleOrderLineWithQuantity.id);\n\n const productionScheduleItemsFromSelectedOrderLines = this.getProductionScheduleItemsInPathGroup().filter((productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup) =>\n selectedOrderLineIds.includes(productionScheduleItemInPathGroup.orderLineId)\n );\n\n const selectedProductionScheduleItems = this.getSelectedProductionScheduleItems().map(\n (productionScheduleItemInPathGroupWithIdentification: ProductionScheduleItemInPathGroupWithIdentification) =>\n productionScheduleItemInPathGroupWithIdentification.productionScheduleItemInPathGroup\n );\n\n const productionScheduleItemsToRemove = [...productionScheduleItemsFromSelectedOrderLines, ...selectedProductionScheduleItems];\n\n if (productionScheduleItemsToRemove.length > 0) {\n this.productionSchedulePlan.removeProductionScheduleItems(productionScheduleItemsToRemove);\n }\n }\n\n public hasEmptySelectedOrderLines(): boolean {\n return this.getSelectedOrderLines().some((productionScheduleOrderLineWithQuantity: ProductionScheduleOrderLineWithQuantity) => {\n return this.getQuantity(productionScheduleOrderLineWithQuantity) <= 0;\n });\n }\n\n public productionSchedulePlanHasUnsavedChanges(): boolean {\n return this.productionSchedulePlan.hasUnsavedChanges(false);\n }\n\n public getInvalidQuantityIndication(): string {\n let invalidQuantityIndication = '';\n this.getSelectedOrderLines().forEach((productionScheduleOrderLineWithQuantity: ProductionScheduleOrderLineWithQuantity) => {\n const selectedOrderLineQuantity = this.getQuantity(productionScheduleOrderLineWithQuantity);\n if (selectedOrderLineQuantity <= 1) {\n if (invalidQuantityIndication === '') {\n invalidQuantityIndication = this.translate.instant('PRODUCTION_ORDER.DESIGN_LIBRARY.ORDER_LINES.CANNOT_ADD_QUANTITY', {\n quantityAmount: this.getQuantity(productionScheduleOrderLineWithQuantity)\n });\n } else {\n invalidQuantityIndication += `, ${this.getQuantity(productionScheduleOrderLineWithQuantity)}`;\n }\n }\n });\n return invalidQuantityIndication;\n }\n\n private setInitializationFilters(): any {\n if (!AssertionUtils.isNullOrUndefined(this.presetGridModel)) {\n this.gridModel = this.presetGridModel;\n this.orderLinesGrid?.api?.setFilterModel(this.presetGridModel.filterModel);\n } else if (this.canPreFilterOnQualitiesAndColoredYarnSets()) {\n const filterModel = {\n machineQualityName: {\n filterModels: [null, {values: this.qualityNames, filterType: 'set'}],\n filterType: 'multi'\n },\n coloredYarnSet: {\n filterModels: [null, {values: this.coloredYarnSetNames, filterType: 'set'}],\n filterType: 'multi'\n }\n };\n\n this.orderLinesGrid?.api?.setFilterModel(filterModel);\n }\n }\n\n private getQualityById(id: number): Observable {\n return this.qualities.getById(id);\n }\n\n private getColoredYarnSetById(id: number): Observable {\n return this.coloredYarnSets.getById(id);\n }\n\n private getAllPreFilterData(): void {\n const qualityObservable = this.getQualityById(this.productionSchedule.machineQuality.id);\n const coloredYarnSetObservables = this.productionSchedule.coloredYarnSets.map((coloredYarnSet: OverviewListColoredYarnSetWithStartDent) => {\n return this.getColoredYarnSetById(coloredYarnSet.coloredYarnSet.id);\n });\n\n forkJoin([qualityObservable, ...coloredYarnSetObservables])\n .pipe(\n mergeMap(([quality, ...coloredYarnSets]: [CarpetWeaveQuality, ColoredYarnSet]) => {\n this.qualityNames.push(quality?.technicalName);\n\n coloredYarnSets.forEach((coloredYarnSet: ColoredYarnSet) => {\n this.coloredYarnSetNames.push(coloredYarnSet?.name);\n });\n\n let alternativeQualityObservables = [];\n let alternativeColoredYarnSetObservables = [];\n\n if (quality.alternativeMachineQualityIds?.length > 0) {\n alternativeQualityObservables = quality?.alternativeMachineQualityIds?.map((alternativeQualityId: number) => {\n return this.getQualityById(alternativeQualityId);\n });\n }\n\n coloredYarnSets?.map((coloredYarnSet: ColoredYarnSet) => {\n if (coloredYarnSet.alternativeColoredYarnSetIds?.length > 0) {\n alternativeColoredYarnSetObservables = coloredYarnSet?.alternativeColoredYarnSetIds?.map((alternativeColoredYarnSetId: number) => {\n return this.getColoredYarnSetById(alternativeColoredYarnSetId);\n });\n }\n });\n\n if (AssertionUtils.isEmpty(alternativeQualityObservables) && AssertionUtils.isEmpty(alternativeColoredYarnSetObservables)) {\n this.setInitializationFilters();\n }\n\n return forkJoin(alternativeQualityObservables.concat(alternativeColoredYarnSetObservables) as any);\n })\n )\n .subscribe((alternatives: (CarpetWeaveQuality | ColoredYarnSet)[]) => {\n alternatives.forEach((alternative: CarpetWeaveQuality | ColoredYarnSet) => {\n if (alternative instanceof CarpetWeaveQuality) {\n this.qualityNames.push(alternative.technicalName);\n } else if (alternative instanceof ColoredYarnSet) {\n this.coloredYarnSetNames.push(alternative.name);\n }\n });\n\n this.setInitializationFilters();\n });\n }\n\n private hasSelectedOrderLinesWithQuantityLesserThanMinimum(): boolean {\n return this.getSelectedOrderLines().some((productionScheduleOrderLineWithQuantity: ProductionScheduleOrderLineWithQuantity) => {\n return this.getQuantity(productionScheduleOrderLineWithQuantity) < this.productionSchedule.getProductionScheduleItemMultiplier();\n });\n }\n\n private getPathsWithLabel(): {visible: {label: number; path: ProductionSchedulePath}[]; overflow: {label: number; path: ProductionSchedulePath}[]} {\n const selectedOrderLineColoredYarnSets = this.getSelectedOrderLines()?.map(\n (productionScheduleOrderLine: ProductionScheduleOrderLineWithQuantity) => productionScheduleOrderLine.article.coloredYarnSet\n );\n const selectedOrderLineColoredYarnSetUniqueIds = [...new Set(selectedOrderLineColoredYarnSets.map((overviewListColoredYarnSet: OverviewListColoredYarnSet) => overviewListColoredYarnSet.id))];\n const coloredYarnSetOfPath = this.productionSchedule.productionSchedulePathsOfColoredYarnSets.map(\n (productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet) => productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.coloredYarnSet\n );\n const compatibleColoredYarnSetOfPaths = coloredYarnSetOfPath.map(\n (overviewListColoredYarnSet: OverviewListColoredYarnSet): boolean =>\n selectedOrderLineColoredYarnSetUniqueIds.length === 1 && overviewListColoredYarnSet.id === selectedOrderLineColoredYarnSetUniqueIds[0]\n );\n\n const compatiblePaths = flatten(\n zip(this.productionSchedule.productionSchedulePathsOfColoredYarnSets, compatibleColoredYarnSetOfPaths).map(\n ([productionSchedulePathsOfColoredYarnSet, compatible]: [ProductionSchedulePathsOfColoredYarnSet, boolean]) =>\n productionSchedulePathsOfColoredYarnSet.productionSchedulePaths.map(() => compatible)\n )\n );\n\n const paths = flatten(\n this.productionSchedule.productionSchedulePathsOfColoredYarnSets.map(\n (productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet) => productionSchedulePathsOfColoredYarnSet.productionSchedulePaths\n )\n );\n\n const pathsWithLabel = paths.map((path: ProductionSchedulePath, index: number) => ({label: index + 1, path}));\n const compatiblePathsWithLabel = zip(pathsWithLabel, compatiblePaths)\n .filter(([_, compatible]: [{label: number; path: ProductionSchedulePath}, boolean]) => compatible)\n .map(([labeledPath, _]: [{label: number; path: ProductionSchedulePath}, boolean]) => labeledPath);\n\n let nrOfVisiblePaths = Math.floor(\n (this.widthForPathButtonsInPx - OrderLinesViewComponent.DELETE_PATH_LABEL_BUTTON_WIDTH_IN_PX) /\n (OrderLinesViewComponent.ADD_PATH_LABEL_BUTTON_WIDTH_IN_PX + OrderLinesViewComponent.DEFAULT_PADDING_IN_PX)\n );\n\n if (nrOfVisiblePaths < compatiblePathsWithLabel.length) {\n nrOfVisiblePaths = Math.max(0, nrOfVisiblePaths - 1);\n }\n\n return {visible: compatiblePathsWithLabel.slice(0, nrOfVisiblePaths), overflow: compatiblePathsWithLabel.slice(nrOfVisiblePaths)};\n }\n\n private subscribeToProductionScheduleChanges(): void {\n const currentUpdatedProductionSchedule = this.syncWithProductionScheduleSubject.pipe(\n switchMap(() => this.productionSchedulePlan.currentUpdatedProductionSchedule.pipe(startWith(this.productionSchedule))),\n takeUntil(this.unSubscribeOnViewDestroy)\n );\n\n currentUpdatedProductionSchedule\n .pipe(\n map((productionSchedule: ProductionSchedule) =>\n productionSchedule.orderLines.map((productionScheduleOrderLine: ProductionScheduleOrderLine) =>\n ProductionScheduleOrderLineWithQuantity.fromProductionScheduleOrderLine(productionScheduleOrderLine)\n )\n )\n )\n .subscribe((productionScheduleOrderLinesWithQuantity: ProductionScheduleOrderLineWithQuantity[]) =>\n this.orderLinesGrid?.api?.forEachNode((rowNode: RowNode) => {\n const orderLine = productionScheduleOrderLinesWithQuantity.find(\n (productionScheduleOrderLine: ProductionScheduleOrderLineWithQuantity) =>\n rowNode.data instanceof ProductionScheduleOrderLineWithQuantity && productionScheduleOrderLine?.id === rowNode.data.id\n );\n\n if (orderLine) {\n rowNode.setData(orderLine);\n }\n })\n );\n\n currentUpdatedProductionSchedule\n .pipe(\n map((productionSchedule: ProductionSchedule) =>\n this.getProductionScheduleItemsFromProductionSchedule(productionSchedule).map(\n (productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup) => productionScheduleItemInPathGroup.orderLineId\n )\n )\n )\n .subscribe((orderLineIds: number[]) =>\n this.orderLinesGrid?.api?.forEachNode((rowNode: RowNode) => {\n if (rowNode.data instanceof ProductionScheduleOrderLineWithQuantity) {\n const productionScheduleOrderLineWithQuantity: ProductionScheduleOrderLineWithQuantity = rowNode.data;\n const hasOrderLine = !!orderLineIds.find((orderLineId: number) => orderLineId === productionScheduleOrderLineWithQuantity.id);\n\n if (hasOrderLine) {\n rowNode.key = `${productionScheduleOrderLineWithQuantity.id}`;\n }\n rowNode.setGroup(hasOrderLine);\n\n if (rowNode.key) {\n this.orderLinesGrid.api.refreshServerSide({\n route: [rowNode.key]\n });\n }\n }\n })\n );\n }\n\n private getSelectedOrderLines(): ProductionScheduleOrderLineWithQuantity[] {\n return this.getSelectedNodes().filter(\n (orderLineOrItemInPathGroup: RowData) => orderLineOrItemInPathGroup instanceof ProductionScheduleOrderLineWithQuantity\n ) as ProductionScheduleOrderLineWithQuantity[];\n }\n\n private getSelectedProductionScheduleItems(): ProductionScheduleItemInPathGroupWithIdentification[] {\n return this.getSelectedNodes().filter(\n (orderLineOrItemInPathGroup: RowData) => orderLineOrItemInPathGroup instanceof ProductionScheduleItemInPathGroupWithIdentification\n ) as ProductionScheduleItemInPathGroupWithIdentification[];\n }\n\n private getSelectedNodes(): RowData[] {\n const rowNodes = this.orderLinesGrid?.api?.getSelectedNodes() ?? [];\n const existingNodes = rowNodes.filter((rowNode: RowNode) => !isNil(rowNode.rowIndex));\n return existingNodes.map((rowNode: RowNode) => rowNode.data) as RowData[];\n }\n\n private lookupCommercialWidthInPathWidths(commercialWidthInMM: number): number | null {\n for (const pathWidth of this.pathWidths) {\n if (Math.abs(pathWidth.commercialInCM * 10 - commercialWidthInMM) < 0.5) {\n return pathWidth.actualDents;\n }\n }\n return null;\n }\n\n private onRowDrag(params: {rowNode: RowNode; dragEvent: DragEvent}): void {\n if (!(params.rowNode.data instanceof ProductionScheduleOrderLineWithQuantity)) {\n return;\n }\n const listDrawingOrderLine = this.createListDrawingOrderLine(params.rowNode.data, this.productionSchedule.machineQuality.weaveStructure.picksPerColorLine);\n if (listDrawingOrderLine.amount > 0 && (listDrawingOrderLine.drawing.repeated ? listDrawingOrderLine.commercialLengthInMM > 0 : true)) {\n if (listDrawingOrderLine.drawing.missingDesign) {\n listDrawingOrderLine.orderLine.article.design.image.data = '..assets/images/missing-design.svg';\n listDrawingOrderLine.orderLine.article.design.dimensionsInPixels = {\n widthInPx:\n this.lookupCommercialWidthInPathWidths(listDrawingOrderLine.orderLine.article.commercialWidthInMM) ??\n Math.round(this.factorForConversionFromMillimetersToDents * listDrawingOrderLine.orderLine.article.commercialWidthInMM),\n heightInPx:\n Math.round(this.factorForConversionFromMillimetersToPicks * listDrawingOrderLine.orderLine.article.commercialHeightInMM) /\n this.productionSchedule.machineQuality.weaveStructure.picksPerColorLine\n };\n }\n this.draggingService.setData(listDrawingOrderLine);\n } else {\n this.draggingService.setData({quantity: params.rowNode.data.amountLeft - params.rowNode.data.amountInProductionSchedule * this.productionSchedule.getProductionScheduleItemMultiplier()});\n }\n\n const dragPreview = this.renderer.createElement('img');\n this.renderer.setAttribute(dragPreview, 'src', '/assets/images/image-placeholder.svg');\n\n params.dragEvent.dataTransfer.setDragImage(dragPreview, 0, 0);\n }\n\n private createListDrawingOrderLine(productionScheduleOrderLine: ProductionScheduleOrderLineWithQuantity, picksPerColorLine: number): ListDrawingOrderLine {\n return ListDrawingOrderLine.fromProductionScheduleOrderLine(\n productionScheduleOrderLine,\n productionScheduleOrderLine.article.design.repeated ? 1 : this.getListDrawingOrderLineAmount(productionScheduleOrderLine),\n productionScheduleOrderLine.article.design.repeated\n ? Math.floor(\n (productionScheduleOrderLine.heightInMM ?? productionScheduleOrderLine.getHeightLeftInMMForProductionSchedule(this.productionSchedule.getProductionScheduleItemMultiplier())) /\n this.productionSchedule.getProductionScheduleItemMultiplier()\n )\n : null,\n picksPerColorLine\n );\n }\n\n private getListDrawingOrderLineAmount(productionScheduleOrderLine: ProductionScheduleOrderLineWithQuantity): number {\n const productionScheduleItemMultiplier = this.productionSchedule.getProductionScheduleItemMultiplier();\n const amountLeftForProductionSchedule = productionScheduleOrderLine.getAmountLeftForProductionSchedule(productionScheduleItemMultiplier);\n let amount = Math.ceil((productionScheduleOrderLine.quantity ?? amountLeftForProductionSchedule) / productionScheduleItemMultiplier);\n\n if (!this.canExceedRequestedAmountOfOrderLineItems() && amount * productionScheduleItemMultiplier > amountLeftForProductionSchedule) {\n return --amount;\n }\n return amount;\n }\n\n private canExceedRequestedAmountOfOrderLineItems(): boolean {\n return this.productionOrderCustomSettings?.allowExceedingRequestedAmountOfOrderLineItems;\n }\n\n private canPreFilterOnQualitiesAndColoredYarnSets(): boolean {\n return this.productionOrderCustomSettings?.allowPreFilterOnQualitiesAndColoredYarnSets;\n }\n\n private initialiseGridOptions(): void {\n this.orderLinesGridService\n .getAdditionalInfoColumnDefs()\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((additionalInfoColDefs: ColDef[]) => {\n const defaultGridOptionsForOrderLines = this.gridOptionsBuilderFactoryService\n .getBuilder(this.getColumnDefinitions(additionalInfoColDefs), GridIdentifier.ORDER_ITEMS)\n .withHeaderHeight(32)\n .withFloatingFiltersHeight(32)\n .withLoadingCellRenderer('customLoadingCellRenderer')\n .withComponents({\n customLoadingCellRenderer: LoadingCellOverlayComponent\n })\n .withNoRowsOverlay({\n scale: 0.7,\n titleParam: 'SALES_ORDERS.ORDER_LINES.ORDER_LINE',\n hideDescription: true,\n isAnyFilterPresent: () => this.orderLinesHelper.hasActiveFilters(this.orderLinesGrid)\n } as NoDataOverlayComponentParams)\n .withOnGridReady(() => this.getAllPreFilterData())\n .withOnFirstDataRendered(() => this.syncWithProductionScheduleSubject.next())\n .withServerSideDataSource(this.SLICE_SIZE, this.getServerSideDataSource())\n .withGetRowId((params: GetRowIdParams): string => `level${params.level}id${params.data.id ?? params.data.productionScheduleItemInPathGroup.uuid}`)\n .withCompactView()\n .withGroupEdit()\n .withSingleClickEdit();\n\n if (this.isPreSelection) {\n this.gridOptions = defaultGridOptionsForOrderLines\n .withRowSelection(true, false)\n .withOnRowSelected((event: RowSelectedEvent) => this.nodeSelected(event))\n .build();\n } else {\n this.gridOptions = defaultGridOptionsForOrderLines\n .withAutoGroupColumnDef(this.getGroupColumnDefinition())\n .withRowSelection(true, false)\n .withRowDraggingOutsideGrid(\n (params: {rowNode: RowNode; dragEvent: DragEvent}) => this.onRowDrag(params),\n (params: DndSourceCallbackParams) => params.node.level === 0\n )\n .withTreeData(\n (orderLineOrItemInPathGroup: ProductionScheduleOrderLine | ProductionScheduleItemInPathGroupWithIdentification): boolean =>\n orderLineOrItemInPathGroup instanceof ProductionScheduleOrderLine &&\n this.getProductionScheduleItemsInPathGroup().some(\n (productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup) => productionScheduleItemInPathGroup.orderLineId === orderLineOrItemInPathGroup.id\n ),\n (productionScheduleOrderLine: ProductionScheduleOrderLine): string => `${productionScheduleOrderLine.id}`\n )\n .withOnRowSelected(() => this.updatePathButtonsAndFiltersWidth())\n .build();\n }\n });\n }\n\n private getServerSideDataSource(): IServerSideDatasource {\n return {\n getRows: (params: IServerSideGetRowsParams): void => {\n const sortModel: SortModelItem[] = params.request.sortModel;\n const startRow: number = params.request.startRow;\n const endRow: number = params.request.endRow;\n const filterModel = params.request.filterModel;\n this.gridModel = new GridModel(startRow, endRow, sortModel, filterModel);\n\n if (!this.onlyShowSelected) {\n this.gridModelOutput.emit(this.gridModel);\n }\n\n this.getStatusBarData(this.gridModel);\n\n this.orderbook\n .getSlice(OrderLinesTarget.PRODUCTION_SCHEDULE, this.gridModel, this.productionSchedule.id.toString())\n .pipe(\n map((orderLines: OverviewListOrderLine[]) =>\n orderLines.map((overviewListOrderLine: OverviewListOrderLine) =>\n ProductionScheduleOrderLineWithQuantity.fromProductionScheduleOrderLine(ProductionScheduleOrderLine.fromOverviewListOrderLine(overviewListOrderLine))\n )\n ),\n takeUntil(this.unSubscribeOnViewDestroy)\n )\n .subscribe({\n next: (orderLines: ProductionScheduleOrderLineWithQuantity[]) => {\n let rowCount: number;\n if (params.request.groupKeys.length > 0) {\n const productionScheduleInPathGroupWithIdentification = this.getProductionScheduleItemsInPathGroupWithIdentification(Number.parseInt(params.request.groupKeys[0], 10));\n\n params.success({\n rowData: productionScheduleInPathGroupWithIdentification,\n rowCount: productionScheduleInPathGroupWithIdentification.length\n });\n } else {\n if (orderLines.length < this.SLICE_SIZE) {\n rowCount = params.request.startRow + orderLines.length;\n }\n\n if (startRow === 0) {\n if (orderLines.length === 0) {\n params.api.showNoRowsOverlay();\n } else {\n params.api.hideOverlay();\n }\n }\n\n this.loadingForTheFirstTime = false;\n this.gridOptions.loadingCellRendererParams = {\n loadingForTheFirstTime: this.loadingForTheFirstTime\n };\n\n this.orderLines = orderLines;\n\n params.success({\n rowData: this.orderLines,\n rowCount\n });\n }\n\n if (filterModel[0]) {\n this.syncWithProductionScheduleSubject.next();\n }\n },\n error: (error: any) => {\n this.orderLinesHelper.onServerSideDataSourceError(params, error);\n }\n });\n }\n };\n }\n\n private nodeSelected(event: RowSelectedEvent): void {\n if (event.node.isSelected()) {\n this.selectedOrderlineIds.push(event.data.id);\n } else {\n this.selectedOrderlineIds = this.selectedOrderlineIds.filter((orderlineId: number) => event.data.id !== orderlineId);\n }\n\n this.selectedOrderlineIdsChanged.emit(this.selectedOrderlineIds);\n }\n\n private getStatusBarData(gridModel: GridModel): void {\n this.statusBarService\n .getStatusBarData(StatusBarTarget.ORDER_LINES, gridModel)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((statusBar: StatusBar) => {\n this.statusBar = statusBar;\n });\n }\n\n private getProductionScheduleItemsInPathGroupWithIdentification(orderLineId: number): ProductionScheduleItemInPathGroupWithIdentification[] {\n const productionScheduleItemsInPathGroupWithIdentification = flattenDeep(\n this.productionSchedule.productionSchedulePathsOfColoredYarnSets.map((productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet) =>\n productionSchedulePathsOfColoredYarnSet.productionSchedulePaths.map((productionSchedulePath: ProductionSchedulePath, productionSchedulePathIndex: number) =>\n productionSchedulePath.pathGroups.map(\n (productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup, productionScheduleItemInPathGroupIndex: number) =>\n new ProductionScheduleItemInPathGroupWithIdentification(\n productionSchedulePath,\n productionScheduleItemInPathGroup,\n productionScheduleItemInPathGroupIndex,\n productionSchedulePathIndex,\n productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent,\n this.productionSchedule.orderLines.find((productionScheduleOrderLine: ProductionScheduleOrderLine) => productionScheduleOrderLine.id === orderLineId)\n )\n )\n )\n )\n );\n\n return productionScheduleItemsInPathGroupWithIdentification.filter(\n (productionScheduleItemInPathGroupWithIdentification: ProductionScheduleItemInPathGroupWithIdentification) =>\n productionScheduleItemInPathGroupWithIdentification.productionScheduleItemInPathGroup.orderLineId === orderLineId\n );\n }\n\n private getProductionScheduleItemsInPathGroup(): ProductionScheduleItemInPathGroup[] {\n return flatMap(this.getProductionSchedulePaths().map((productionSchedulePath: ProductionSchedulePath) => productionSchedulePath.pathGroups));\n }\n\n private getProductionSchedulePaths(): ProductionSchedulePath[] {\n return flatMap(\n this.productionSchedule.productionSchedulePathsOfColoredYarnSets.map(\n (productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet) => productionSchedulePathsOfColoredYarnSet.productionSchedulePaths\n )\n );\n }\n\n private getProductionScheduleItemsFromProductionSchedule(productionSchedule: ProductionSchedule): ProductionScheduleItemInPathGroup[] {\n return flattenDeep(\n productionSchedule.productionSchedulePathsOfColoredYarnSets.map((productionSchedulePathOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet) =>\n productionSchedulePathOfColoredYarnSet.productionSchedulePaths.map((productionSchedulePath: ProductionSchedulePath) => productionSchedulePath.pathGroups)\n )\n );\n }\n\n private getGroupColumnDefinition(): ColDef {\n return this.colDefBuilderFactoryService\n .getBuilder()\n .withHeaderName('ORDERBOOK.QUANTITY')\n .withRightAlignment()\n .withSortable(false)\n .withEditable((params: EditableCallbackParams) => this.isQuantityEditable(params))\n .withoutFilter()\n .withOnCellClicked((event: CellClickedEvent) => this.editQuantityCell(event))\n .withCellEditor(\n NumberCellEditorComponent,\n (params: ICellEditorParams): NumberCellEditorParams =>\n ({\n min:\n params.node.level === 0 && params.data instanceof ProductionScheduleOrderLineWithQuantity && params.data.article.design.repeated\n ? 1\n : this.productionSchedule.getProductionScheduleItemMultiplier(),\n max:\n !this.canExceedRequestedAmountOfOrderLineItems() && params.node.level === 0 && params.data instanceof ProductionScheduleOrderLineWithQuantity\n ? this.getMaxQuantityToPlan(params.data)\n : undefined,\n fromUnit: params.node.level === 0 && params.data instanceof ProductionScheduleOrderLineWithQuantity && params.data.article.design.repeated ? Unit.MILLIMETER : null,\n toUnit: params.node.level === 0 && params.data instanceof ProductionScheduleOrderLineWithQuantity && params.data.article.design.repeated ? Unit.METER : null\n }) as NumberCellEditorParams\n )\n .withValueGetter((params: ValueGetterParams) => {\n if (params.node.level !== 0 || !(params.data instanceof ProductionScheduleOrderLineWithQuantity)) {\n return null;\n }\n return this.getQuantity(params.data);\n })\n .withValueSetter((params: ValueSetterParams) => this.setQuantity(params))\n .withCellRendererSelector(\n (params: ICellRendererParams): CellRendererSelectorResult =>\n params.node.level === 0 && params.node.data instanceof ProductionScheduleOrderLineWithQuantity && params.node.data.article.design.repeated\n ? {\n component: NumberCellRendererComponent,\n params: {\n toUnit: Unit.METER,\n fromUnit: Unit.MILLIMETER,\n showGroup: true\n }\n }\n : {\n component: 'agGroupCellRenderer'\n }\n )\n .withSuppressMovable()\n .build();\n }\n\n private getColumnDefinitions(additionalInfoColDefs: ColDef[]): ColDef[] {\n return [\n this.colDefBuilderFactoryService.getBuilder().withColIdAndField('id').withNumericMultiFilter(this.getPossibleColumnsValues('id')).withHide().withHiddenInToolPanel().build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('status')\n .withHeaderName('GENERAL.STATUS')\n .withCellRendererSelector(\n (params: ICellRendererParams): CellRendererSelectorResult =>\n params.node.level === 0\n ? {\n component: OrderLineStatusCellRendererComponent,\n params: {\n productionSchedule: this.productionSchedule\n } as OrderLineStatusCellRendererParams\n }\n : {\n component: ProductionScheduleItemInPathGroupStatusCellRendererComponent,\n params: {\n productionSchedule: this.productionSchedule\n }\n }\n )\n .withLockVisible()\n .withTextMultiFilter(this.getPossibleColumnsValues('status'))\n .withTooltipValueGetter((params: ITooltipParams) =>\n params.node.level === 0\n ? this.translate.instant(`ORDERBOOK.ORDER_LINE_STATUS.${params.value}`).toUpperCase()\n : this.translate.instant('ORDERBOOK.IN_PATH', {pathNumber: params?.data?.productionSchedulePath?.pathNumber})\n )\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('amountInProductionSchedule')\n .withValueGetter((params: ValueGetterParams): number => this.orderLinesHelper.getAmountInProductionSchedule(params.data, this.productionSchedule))\n .withHeaderName('ORDERBOOK.AMOUNT_IN_PRODUCTION_SCHEDULE')\n .withRightAlignment()\n .withSortable(false)\n .withEditable((params: EditableCallbackParams) => params.node.level === 1)\n .withNumericMultiFilter(this.getPossibleColumnsValues('amountInProductionSchedule'))\n .withCellEditor(\n NumberCellEditorComponent,\n (params: ICellEditorParams) =>\n ({\n min: params.data.productionScheduleOrderLine.article.design.repeated ? 1 : this.productionSchedule.getProductionScheduleItemMultiplier(),\n max:\n !this.canExceedRequestedAmountOfOrderLineItems() && !params.data.productionScheduleOrderLine.article.design.repeated\n ? params.data.productionScheduleItemInPathGroup.quantity * this.productionSchedule.getProductionScheduleItemMultiplier() +\n params.data.productionScheduleOrderLine.getAmountLeftForProductionSchedule(this.productionSchedule.getProductionScheduleItemMultiplier())\n : undefined,\n fromUnit: params.data.productionScheduleOrderLine.article.design.repeated ? Unit.MILLIMETER : undefined,\n toUnit: params.data.productionScheduleOrderLine.article.design.repeated ? Unit.METER : undefined\n }) as NumberCellEditorParams\n )\n .withValueSetter((params: ValueSetterParams): boolean =>\n this.orderLinesHelper.setAmountInProductionSchedule(params, this.productionSchedule)\n )\n .withCellRendererSelector(\n (params: ICellRendererParams): CellRendererSelectorResult =>\n (params.node.data instanceof ProductionScheduleOrderLineWithQuantity && params.node.data.article.design.repeated) ||\n (params.node.data instanceof ProductionScheduleItemInPathGroupWithIdentification && params.node.data.productionScheduleOrderLine.article.design.repeated)\n ? {\n component: NumberCellRendererComponent,\n params: {\n toUnit: Unit.METER,\n fromUnit: Unit.MILLIMETER\n }\n }\n : {}\n )\n .withHide()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('amountLeft')\n .withValueGetter((params: ValueGetterParams): number => this.getAmountLeft(params))\n .withHeaderName('ORDERBOOK.TO_PLAN_AMOUNT')\n .withSortable(false)\n .withRightAlignment()\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withNumericMultiFilter(this.getPossibleColumnsValues('amountLeft'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('totalCount')\n .withValueGetter((params: ValueGetterParams): number => this.getTotalCount(params))\n .withHeaderName('ORDERBOOK.REQUESTED_AMOUNT')\n .withSortable(false)\n .withRightAlignment()\n .withNumericMultiFilter(this.getPossibleColumnsValues('totalCount'))\n .withCellRendererSelector(\n (params: ICellRendererParams): CellRendererSelectorResult =>\n params.node.level === 0 && params.data instanceof ProductionScheduleOrderLineWithQuantity\n ? {\n component: NumberCellRendererComponent,\n params: {\n toUnit: params.data.article.design.repeated ? Unit.METER : undefined,\n fromUnit: Unit.MILLIMETER\n }\n }\n : {component: EmptyCellRendererComponent}\n )\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('commercialWidthInCM')\n .withField('article.commercialWidthInMM')\n .withHeaderName('GENERAL.DIMENSIONS.WIDTH', 1, false, Unit.CENTIMETER)\n .withCellRenderer((params: ICellRendererParams) => AgGridUtils.buildAgGridCellTextWithoutUnit(params.data.article.commercialWidthInMM, Unit.MILLIMETER, Unit.CENTIMETER, this.l10nIntlService))\n .withTooltipValueGetter((params: ITooltipParams) => AgGridUtils.buildAgGridCellTooltipWithUnitConversion(params.value, Unit.MILLIMETER, this.commercialUnit, this.l10nIntlService))\n .withRightAlignment()\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withNumericMultiFilter(this.getPossibleColumnsValues('commercialWidthInMM'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('commercialHeightInCM')\n .withField('article.commercialHeightInMM')\n .withHeaderName('GENERAL.DIMENSIONS.HEIGHT', 1, false, Unit.CENTIMETER)\n .withCellRenderer((params: ICellRendererParams) => AgGridUtils.buildAgGridCellTextWithoutUnit(params.data.article.commercialHeightInMM, Unit.MILLIMETER, Unit.CENTIMETER, this.l10nIntlService))\n .withTooltipValueGetter((params: ITooltipParams) => AgGridUtils.buildAgGridCellTooltipWithUnitConversion(params.value, Unit.MILLIMETER, this.commercialUnit, this.l10nIntlService))\n .withRightAlignment()\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withNumericMultiFilter(this.getPossibleColumnsValues('commercialHeightInMM'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('technicalWidthInDents')\n .withField('article.technicalWidthInDents')\n .withHeaderName('GENERAL.DIMENSIONS.WIDTH', 1, false, Unit.DENTS)\n .withTooltipValueGetter((params: ITooltipParams) => AgGridUtils.buildAgGridCellTooltipWithUnit(params.value, Unit.DENTS, this.l10nIntlService))\n .withRightAlignment()\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withNumericMultiFilter(this.getPossibleColumnsValues('technicalWidthInDents'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('technicalHeightInPicks')\n .withField('article.technicalHeightInPicks')\n .withHeaderName('GENERAL.DIMENSIONS.HEIGHT', 1, false, Unit.PICKS)\n .withTooltipValueGetter((params: ITooltipParams) => AgGridUtils.buildAgGridCellTooltipWithUnit(params.value, Unit.PICKS, this.l10nIntlService))\n .withRightAlignment()\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withNumericMultiFilter(this.getPossibleColumnsValues('technicalHeightInPicks'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('priority')\n .withHeaderName('SALES_ORDERS.PRIORITY.PRIORITY')\n .withCellRenderer(GridTagComponent, {\n translationKey: 'SALES_ORDERS.PRIORITY.',\n size: TagSize.SMALL,\n colorGetter: {\n [Priority.LOW]: TagColor.PRIMARY,\n [Priority.MEDIUM]: TagColor.WARNING,\n [Priority.HIGH]: TagColor.ERROR\n }\n })\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withTextMultiFilter(this.getPossibleColumnsValues('priority'))\n .withTooltipValueGetter((params: ITooltipParams) => this.translate.instant(`SALES_ORDERS.PRIORITY.${params.value}`).toUpperCase())\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('salesOrderReference', true)\n .withHeaderName('ORDERBOOK.ORDERBOOK_REFERENCE')\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withTextMultiFilter(this.getPossibleColumnsValues('salesOrderReference'))\n .withLockVisible()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('salesOrderLineReference', true)\n .withHeaderName('ORDERBOOK.ORDERLINE_REFERENCE')\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withTextMultiFilter(this.getPossibleColumnsValues('salesOrderLineReference'))\n .withHide()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('shape')\n .withField('article.design.shape', true)\n .withHeaderName('GENERAL.SHAPE')\n .withValueGetter((params: ValueGetterParams) => this.getShape(params.data.article?.design?.shape), true)\n .withComparator(StringUtils.stringComparator)\n .withTextMultiFilter(this.getPossibleColumnsValues('shape'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('finishingName')\n .withField('article.finishing.nameWithVersion', true)\n .withHeaderName('TEXTILE_DATA.FINISHING.FINISHING')\n .withComparator(StringUtils.stringComparator)\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withTextMultiFilter(this.getPossibleColumnsValues('finishingName'))\n .withHide()\n .build(),\n ...additionalInfoColDefs,\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('customerReference', true)\n .withHeaderName('ORDERBOOK.CUSTOMER_REFERENCE')\n .withComparator(StringUtils.stringComparator)\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withTextMultiFilter(this.getPossibleColumnsValues('customerReference'))\n .withHide()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('coloredYarnSet')\n .withField('article.coloredYarnSet.name', true)\n .withHeaderName('TEXTILE_DATA.COLORED_YARN_SET.COLORED_YARN_SET')\n .withComparator(StringUtils.stringComparator)\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withTextMultiFilter(this.getPossibleColumnsValues('coloredYarnSet'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('mainColor')\n .withField('article.mainColor.name', true)\n .withHeaderName('GENERAL.ADVANCED_SEARCH.MAIN_COLOR')\n .withComparator(StringUtils.stringComparator)\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withTextMultiFilter(this.getPossibleColumnsValues('mainColor'))\n .withHide()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('borderColor')\n .withField('article.borderColor.name', true)\n .withHeaderName('GENERAL.ADVANCED_SEARCH.BORDER_COLOR')\n .withComparator(StringUtils.stringComparator)\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withTextMultiFilter(this.getPossibleColumnsValues('borderColor'))\n .withHide()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('machineQualityName')\n .withField('article.machineQuality.nameWithVersion')\n .withHeaderName('TEXTILE_DATA.MACHINE_QUALITY.MACHINE_QUALITY')\n .withTooltipField('article.machineQuality.name')\n .withComparator(StringUtils.stringComparator)\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withTextMultiFilter(this.getPossibleColumnsValues('machineQualityName'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('orderType')\n .withHeaderName('ORDERBOOK.ORDER_TYPE')\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withTextMultiFilter(this.getPossibleColumnsValues('orderType'))\n .withHide()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('amountPlanned')\n .withHeaderName('ORDERBOOK.PLANNED_AMOUNT')\n .withValueGetter((params: ValueGetterParams) => {\n return `${params.data.amountPlanned}`;\n })\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withNumericMultiFilter(this.getPossibleColumnsValues('amountPlanned'))\n .withHide()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('amountProduced')\n .withHeaderName('ORDERBOOK.PRODUCED_AMOUNT')\n .withValueGetter((params: ValueGetterParams) => {\n return `${params.data.amountProduced}`;\n })\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withNumericMultiFilter(this.getPossibleColumnsValues('amountProduced'))\n .withHide()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('desiredDate')\n .withHeaderName('SALES_ORDERS.DESIRED_DATE')\n .withDate()\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withDateMultiFilter(this.getPossibleColumnsValues('desiredDate'))\n .withHide()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('article')\n .withField('article.name', true)\n .withHeaderName('ARTICLES.ARTICLE')\n .withComparator(StringUtils.stringComparator)\n .withTextMultiFilter(this.getPossibleColumnsValues('article'))\n .withHide()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('designName')\n .withField('article.design.name', true)\n .withHeaderName('DESIGN_LIBRARY.DETAILS.DESIGN_NAME')\n .withComparator(StringUtils.stringComparator)\n .withTextMultiFilter(this.getPossibleColumnsValues('designName'))\n .withHide()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('designCode')\n .withField('article.design.code', true)\n .withHeaderName('DESIGN_LIBRARY.DETAILS.DESIGN_CODE')\n .withComparator(StringUtils.stringComparator)\n .withTextMultiFilter(this.getPossibleColumnsValues('designCode'))\n .withHide()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('missingDesign')\n .withValueGetter((params: ValueGetterParams) => (params.data.missingDesign ? this.translate.instant(this.booleanTrueTranslation) : this.translate.instant(this.booleanFalseTranslation)), true)\n .withHeaderName('ORDERBOOK.MISSING_DESIGN')\n .withBooleanFilter(this.translate.instant(this.booleanFalseTranslation), this.translate.instant(this.booleanTrueTranslation))\n .build()\n ];\n }\n\n private getTotalCount(params: ValueGetterParams): number {\n if (!(params.data instanceof ProductionScheduleOrderLineWithQuantity)) {\n return undefined;\n }\n\n return params.data.article.design.repeated ? params.data.commercialLengthInMM : params.data.amount;\n }\n\n private getPossibleColumnsValues(columnIdentifier: string): Observable {\n return this.orderbook.getPossibleValues(columnIdentifier).pipe(takeUntil(this.unSubscribeOnViewDestroy));\n }\n\n private editQuantityCell(event: CellClickedEvent): void {\n if (this.orderLinesGrid?.api) {\n this.orderLinesGrid?.api?.stopEditing();\n }\n\n if (event.column.getColDef().editable) {\n this.orderLinesGrid?.api.startEditingCell({\n rowIndex: event?.rowIndex,\n colKey: event?.column?.getColId()\n });\n }\n }\n\n private isQuantityEditable(params: EditableCallbackParams): boolean {\n if (params.node.level !== 0 || !(params.data instanceof ProductionScheduleOrderLineWithQuantity)) {\n return false;\n }\n return params.data.article.design.repeated\n ? this.canExceedRequestedAmountOfOrderLineItems() || params.data.getHeightLeftInMMForProductionSchedule(this.productionSchedule.getProductionScheduleItemMultiplier()) > 0\n : this.canExceedRequestedAmountOfOrderLineItems() ||\n params.data.getAmountLeftForProductionSchedule(this.productionSchedule.getProductionScheduleItemMultiplier()) > this.productionSchedule.getProductionScheduleItemMultiplier();\n }\n\n private getQuantity(productionScheduleOrderLineWithQuantity: ProductionScheduleOrderLineWithQuantity): number {\n return productionScheduleOrderLineWithQuantity.article.design.repeated\n ? productionScheduleOrderLineWithQuantity.heightInMM ??\n productionScheduleOrderLineWithQuantity.getHeightLeftInMMForProductionSchedule(this.productionSchedule.getProductionScheduleItemMultiplier())\n : productionScheduleOrderLineWithQuantity.quantity ?? productionScheduleOrderLineWithQuantity.getAmountLeftForProductionSchedule(this.productionSchedule.getProductionScheduleItemMultiplier());\n }\n\n private setQuantity(params: ValueSetterParams): boolean {\n if (params.data.article.design.repeated) {\n params.data.heightInMM = params.newValue;\n } else {\n params.node.data.quantity = params.newValue;\n }\n return true;\n }\n\n private getAmountLeft(params: ValueGetterParams): number {\n if (!(params.data instanceof ProductionScheduleOrderLineWithQuantity)) {\n return undefined;\n }\n return this.getMaxQuantityToPlan(params.data);\n }\n\n private getMaxQuantityToPlan(productionScheduleOrderLineWithQuantity: ProductionScheduleOrderLineWithQuantity): number {\n return productionScheduleOrderLineWithQuantity.article.design.repeated\n ? productionScheduleOrderLineWithQuantity.getHeightLeftInMMForProductionSchedule(this.productionSchedule.getProductionScheduleItemMultiplier())\n : productionScheduleOrderLineWithQuantity.getAmountLeftForProductionSchedule(this.productionSchedule.getProductionScheduleItemMultiplier());\n }\n\n private getShape(shape: string): string {\n return FixedShape.getTranslationKeyForShape(shape, this.translate);\n }\n\n private subscribeToElementRefSizeChanges(): void {\n DOMUtils.observeResize(this.elementRef.nativeElement)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe(() => this.updatePathButtonsAndFiltersWidth());\n }\n\n private updatePathButtonsAndFiltersWidth(): void {\n this.widthForPathButtonsInPx = this.containerElement?.nativeElement?.clientWidth - this.fixedButtonsElement?.nativeElement?.clientWidth - OrderLinesViewComponent.MIN_WIDTH_FILTER_IN_PX;\n\n this.widthForFilters = `${\n this.containerElement?.nativeElement?.clientWidth -\n this.pathButtonsElement?.nativeElement?.clientWidth -\n OrderLinesViewComponent.WIDTH_TEXT_FILTER_IN_PX -\n OrderLinesViewComponent.DEFAULT_PADDING_IN_PX\n }px`;\n }\n}\n","
\n \n \n \n

{{ 'PRODUCTION_ORDER.DESIGN_LIBRARY.ORDER_ITEMS' | bmsTranslate }}

\n
\n\n
\n \n \n {{ 'PRODUCTION_ORDER.DESIGN_LIBRARY.VIEW_MODES.SELECTED' | bmsTranslate }}\n \n \n\n \n \n \n\n \n \n {{ 'PRODUCTION_ORDER.DESIGN_LIBRARY.VIEW_MODES.' + viewMode | bmsTranslate }}\n \n \n
\n
\n\n \n
\n \n
\n \n
\n\n \n
\n\n
\n
\n \n \n \n \n \n \n\n \n \n \n\n \n \n \n \n \n \n \n\n \n \n \n
\n
\n
\n
\n
\n
\n","import {ChangeDetectorRef, Component, EventEmitter, HostBinding, Inject, Input, OnInit, Output, ViewChild} from '@angular/core';\nimport {AdvancedSearchUtils} from '@application/helper/advanced-search-utils';\nimport {NavigationHelperService} from '@application/helper/navigation-helper/navigation-helper.service';\nimport {DraggingService} from '@application/services/dragging/dragging.service';\nimport {PositionOfDialog} from '@domain/position-of-dialog';\nimport {ProductionOrderCustomSettings} from '@domain/production-schedule/custom-settings/production-order-custom-settings';\nimport {Drawing} from '@domain/production-schedule/drawing';\nimport {DrawingType} from '@domain/production-schedule/drawing-type.enum';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionScheduleDrawingViewMode} from '@domain/production-schedule/production-schedule-drawing-view-mode.enum';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {ProductionScheduleOrderLine} from '@domain/production-schedule/production-schedule-order-line';\nimport {ProductionSchedulePhase} from '@domain/production-schedule/production-schedule-phase.enum';\nimport {PropertyValue} from '@domain/property-value';\nimport {TargetForListOfDrawingsEnum} from '@domain/target-for-list-of-drawings.enum';\nimport {PathWidth} from '@domain/textile-data/machine-quality/path-width';\nimport {AUTHENTICATION, Authentication} from '@infrastructure/http/authentication/authentication';\nimport {DRAWINGS, Drawings} from '@infrastructure/http/drawing/drawings';\nimport {OrderLinesCustomSettingsDialogComponent} from '@presentation/components/dialog-button/dialog-data/order-lines-settings/order-lines-settings.component';\nimport {ListDrawing} from '@presentation/components/drawing-list/list-drawing';\nimport {ListDrawingConfiguration} from '@presentation/components/drawing-list/list-drawing-configuration';\nimport {ListDrawingOrderLine} from '@presentation/components/drawing-list/list-drawing-order-line';\nimport {RepositionDialogComponent} from '@presentation/components/reposition-dialog/reposition-dialog.component';\nimport {AdvancedSearchInput} from '@presentation/components/search-filters/advanced-search/advanced-search-input.enum';\nimport {AdvancedSearchDialogComponent} from '@presentation/components/search-filters/advanced-search/dialog/advanced-search-dialog.component';\nimport {SearchFiltersComponent} from '@presentation/components/search-filters/search-filters.component';\nimport {PRODUCTION_SCHEDULE_PLAN, ProductionSchedulePlan} from '@presentation/pages/texfab/production-schedule/add/plan/production-schedule-plan';\nimport {\n AlertDialogResult,\n AssertionUtils,\n BaseComponent,\n DialogBuilderFactoryService,\n DialogType,\n FilterComponent,\n GridModel,\n ObjectUtils,\n TranslateService,\n Unit,\n UnitType\n} from '@vdw/angular-component-library';\nimport {cloneDeep, find, isNil, some} from 'lodash-es';\nimport {Subject} from 'rxjs';\nimport {debounceTime, distinctUntilChanged, filter as rxjsFilter, map as rxjsMap, takeUntil, tap} from 'rxjs/operators';\nimport {ProductionDrawingLibraryData, ProductionDrawingViewData, ProductionScheduleNavigationData} from '../add-production-schedule-navigation-data.type';\n\n@Component({\n selector: 'app-production-schedule-drawing-library',\n templateUrl: './production-schedule-drawing-library.component.html',\n styleUrls: ['./production-schedule-drawing-library.component.scss']\n})\nexport class ProductionScheduleDrawingLibraryComponent extends BaseComponent implements OnInit {\n @Input() public showSelectedItems = false;\n @Input() public productionSchedule: ProductionSchedule;\n @Input() public productionSchedulePhase: ProductionSchedulePhase;\n @Input() public productionOrderCustomSettings: ProductionOrderCustomSettings;\n @Input() public canDragDrawings = false;\n @Input() public factorForConversionFromMillimetersToPicks: number;\n @Input() public factorForConversionFromMillimetersToDents: number;\n @Input() public pathWidths: PathWidth[];\n @Input() public isPreSelection = false;\n @Output() public selectedDrawingsChanged: EventEmitter = new EventEmitter();\n @Output() public selectedOrderlinesChanged: EventEmitter = new EventEmitter();\n\n @ViewChild('nameFilter') public nameFilter: FilterComponent;\n @ViewChild('searchFilters') public searchFilters: SearchFiltersComponent;\n\n @HostBinding('class.build-production-schedule-phase') public get isCurrentProductionSchedulePhaseBuild(): boolean {\n return this.productionSchedulePhase === ProductionSchedulePhase.BUILD;\n }\n\n public readonly listOfDrawingsTarget: TargetForListOfDrawingsEnum = TargetForListOfDrawingsEnum.PRODUCTION_ORDER;\n public advancedSearchFilters: PropertyValue[] = [];\n public unsavedAdvancedSearchFilters: PropertyValue[] = [];\n public itemsHaveBeenLoaded = false;\n public listOfDrawings: ListDrawing[] = [];\n public productionScheduleItemsToBeRestored: ProductionScheduleItemInPathGroup[];\n\n public isEditingPaths = false;\n public displayTechnicalUnit = true;\n public readonly filterOnBMPDrawingType = DrawingType.BMP;\n public readonly viewModes: ProductionScheduleDrawingViewMode[] = [\n ProductionScheduleDrawingViewMode.DESIGNS,\n ProductionScheduleDrawingViewMode.DESIGNS_LIST,\n ProductionScheduleDrawingViewMode.ORDER_LINES\n ];\n\n public selectedViewMode = ProductionScheduleDrawingViewMode.DESIGNS;\n public orderlinesGridModel: GridModel;\n\n public readonly customSettingsComponent = OrderLinesCustomSettingsDialogComponent;\n public readonly commercialUnit = Unit.CENTIMETER;\n\n private canGetMoreItems = true;\n\n private readonly bmpDrawingsOnly: PropertyValue = {propertyName: AdvancedSearchInput.DRAWING_TYPE, propertyValue: DrawingType.BMP};\n private readonly nonMissingDrawingsOnly: PropertyValue = {propertyName: AdvancedSearchInput.MISSING_DESIGN, propertyValue: false};\n private readonly repositionDialogClassName = 'reposition-dialog';\n private readonly nameFilterChangeSubject = new Subject();\n private readonly SLICE_LENGTH = 50;\n private readonly designTranslationKey = 'DESIGN_LIBRARY.DESIGN';\n private readonly defaultCustomSettingsDialogData = {\n labelTranslationKey: this.translate.instant('GENERAL.UNIT.LABEL', {object: this.translate.instant('PRODUCTION_ORDER.DESIGN_LIBRARY.ORDER_ITEMS')}),\n technicalDimensionsTranslationKey: 'PRODUCTION_ORDER.WEAVE_PLAN.DENTS_AND_PICKS'\n };\n\n private advancedSearchFiltersForDesignsViewMode: PropertyValue[] = [\n {propertyName: AdvancedSearchInput.NAME},\n {propertyName: AdvancedSearchInput.DRAWING_CODE},\n {propertyName: AdvancedSearchInput.DRAWING_SHAPE},\n {propertyName: AdvancedSearchInput.LENGTH},\n {propertyName: AdvancedSearchInput.WIDTH},\n {propertyName: AdvancedSearchInput.MACHINE_QUALITY},\n {propertyName: AdvancedSearchInput.COLOR_SET},\n {propertyName: AdvancedSearchInput.MAIN_COLOR},\n {propertyName: AdvancedSearchInput.BORDER_COLOR}\n ];\n\n public constructor(\n @Inject(AUTHENTICATION) private readonly authentication: Authentication,\n @Inject(DRAWINGS) private readonly drawings: Drawings,\n @Inject(PRODUCTION_SCHEDULE_PLAN) private readonly productionSchedulePlan: ProductionSchedulePlan,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n private readonly translate: TranslateService,\n private readonly changeDetectorRef: ChangeDetectorRef,\n private readonly draggingService: DraggingService,\n private readonly navigationHelperService: NavigationHelperService\n ) {\n super();\n }\n\n private get hasFilterActive(): boolean {\n return this.nameFilter?.filteredText?.length > 0 || this.advancedSearchFilters.some(AdvancedSearchUtils.hasValue);\n }\n\n public ngOnInit(): void {\n this.displayTechnicalUnit = this.isCurrentProductionSchedulePhaseBuild;\n\n this.subscribeToEditPathChanges();\n\n this.selectedViewMode = ProductionScheduleDrawingViewMode.DESIGNS;\n\n this.setAdvancedSearchFilters();\n\n if (this.showSelectedItems && this.isViewModeDesigns()) {\n this.getSelectedDrawings('');\n } else if (this.isViewModeNewOrderLines()) {\n this.itemsHaveBeenLoaded = true;\n } else {\n this.getFilteredDrawings();\n }\n\n this.subscribeToNameFilterChanges();\n this.subscribeToProductionScheduleChanges();\n\n this.setNavigationHelperState();\n }\n\n public onNavigationHelperDestroy(): void {\n this.navigationHelperService.savePartialState({\n showSelectedItems: this.showSelectedItems,\n drawingViewMode: this.selectedViewMode\n });\n }\n\n public getIconForNameFilter(): string {\n return !this.canUseAdvancedSearchFilters() ? 'search' : 'filter';\n }\n\n public nameFilterTextChanged(filterText: string): void {\n this.itemsHaveBeenLoaded = false;\n this.nameFilterChangeSubject.next(filterText);\n }\n\n public getOrderlinesGridModel(gridModel: GridModel): void {\n let key: any;\n let value: any;\n for ([key, value] of Object.entries(gridModel.filterModel)) {\n if (!AssertionUtils.isNullOrUndefined(key) && !AssertionUtils.isNullOrUndefined(value)) {\n this.orderlinesGridModel = gridModel;\n }\n }\n }\n\n public setPreselectedOrderlineIds(orderlineIds: number[]): void {\n this.selectedOrderlinesChanged.emit(orderlineIds);\n }\n\n public showAdvancedSearch(): void {\n if (this.canUseAdvancedSearchFilters()) {\n this.dialogBuilderFactoryService\n .getBuilder()\n .withClass([this.repositionDialogClassName, 'production-schedule-drawing-library-advanced-search'])\n .withWidth('896px')\n .withMaxHeight('100%')\n .openDialog(RepositionDialogComponent, {\n advancedSearchFilters: cloneDeep(this.unsavedAdvancedSearchFilters.length > 0 ? this.unsavedAdvancedSearchFilters : this.advancedSearchFilters),\n defaultUnit: this.commercialUnit,\n component: AdvancedSearchDialogComponent,\n sourceElement: this.nameFilter.iconElement.nativeElement,\n positionOfDialog: PositionOfDialog.BOTTOM\n })\n .pipe(\n tap(() => {\n if (this.unsavedAdvancedSearchFilters.length > 0) {\n this.unsavedAdvancedSearchFilters = [];\n }\n }),\n rxjsFilter((advancedSearchFilters: PropertyValue[]) => advancedSearchFilters && advancedSearchFilters.length > 0),\n takeUntil(this.unSubscribeOnViewDestroy)\n )\n .subscribe((advancedSearchFilters: PropertyValue[]) => {\n this.itemsHaveBeenLoaded = false;\n this.advancedSearchFilters = advancedSearchFilters;\n\n this.setNameFilterTextWithValueFromNameFilter();\n this.getFilteredDrawings();\n });\n }\n }\n\n public onSelectedViewModeChange(viewMode: ProductionScheduleDrawingViewMode): void {\n this.selectedViewMode = viewMode;\n this.setAdvancedSearchFilters();\n\n if (this.showSelectedItems && this.isViewModeDesigns()) {\n this.setNameFilterText('');\n this.getSelectedDrawings('');\n } else {\n if (!this.isViewModeNewOrderLines() && !this.isViewModeDesignsList()) {\n this.getFilteredDrawings();\n } else {\n this.itemsHaveBeenLoaded = true;\n }\n }\n }\n\n public getCustomSettingsDialogData(): any {\n return {\n ...this.defaultCustomSettingsDialogData\n };\n }\n\n public updateFilteredDrawings(): void {\n this.itemsHaveBeenLoaded = false;\n\n this.setNameFilterTextWithValueFromNameFilter();\n this.getFilteredDrawings();\n }\n\n public getSelectedDrawingsFromProductionScheduleForSelectedViewMode(): ListDrawing[] {\n return !isNil(this.productionSchedule) ? this.getSelectedDrawingsFromProductionSchedule() : [];\n }\n\n public onDrawingSelected(selectedDrawings: ListDrawing[]): void {\n const currentlySelectedDrawingsForSelectedViewMode = this.getSelectedDrawingsFromProductionScheduleForSelectedViewMode();\n\n if (selectedDrawings.length > currentlySelectedDrawingsForSelectedViewMode.length) {\n this.updateListOfDrawings(selectedDrawings);\n } else {\n const removedListDrawing = currentlySelectedDrawingsForSelectedViewMode.find((listDrawing: ListDrawing) => !some(selectedDrawings, {id: listDrawing.id}));\n const productionScheduleItemsToBeRemoved = this.productionSchedule.getProductionScheduleItemsForListDrawing(removedListDrawing);\n const hasProductionScheduleItemsWithRemovedDrawing = productionScheduleItemsToBeRemoved.length > 0;\n\n if (hasProductionScheduleItemsWithRemovedDrawing) {\n this.showDialogToConfirmDrawingRemoval(selectedDrawings, productionScheduleItemsToBeRemoved);\n } else {\n this.updateListOfDrawings(selectedDrawings);\n }\n }\n }\n\n public hasDrawings(): boolean {\n return this.listOfDrawings.length > 0 || this.isViewModeNewOrderLines() || this.isViewModeDesignsList();\n }\n\n public getTitleKeyForNoDataOverlay(): string {\n let result = '';\n const objectsTranslation = this.translate.instant(this.designTranslationKey, {count: 2}).toLowerCase();\n\n if (this.showSelectedItems) {\n result = this.translate.instant('PRODUCTION_ORDER.OVERLAY.NO_OBJECTS_SELECTED_YET', {objects: objectsTranslation});\n } else {\n result = this.translate.instant('OVERLAY.NO_DATA.TITLE_WITH_PARAM', {object: objectsTranslation});\n }\n\n return result;\n }\n\n public canShowNoResultOverlay(): boolean {\n return this.hasFilterActive && !this.hasDrawings();\n }\n\n public onDrawingDragStart(listDrawing: ListDrawing): void {\n listDrawing.amount = Math.floor(listDrawing.amount / this.productionSchedule.getProductionScheduleItemMultiplier());\n this.draggingService.setData(listDrawing);\n }\n\n public onDrawingDragEnd(): void {\n this.draggingService.clearData();\n }\n\n public onVirtualScrollerEnd(): void {\n if (this.canGetMoreItems && !this.showSelectedItems) {\n this.canGetMoreItems = false;\n this.getDrawings(this.listOfDrawings.length);\n }\n }\n\n public onShowSelectedItemsChange(showSelectedItems?: boolean): void {\n this.showSelectedItems = showSelectedItems ?? !this.showSelectedItems;\n\n this.setAdvancedSearchFilters();\n\n if (this.showSelectedItems && this.isViewModeDesigns()) {\n this.setNameFilterText('');\n this.getSelectedDrawings('');\n } else if (!this.isViewModeNewOrderLines() && !this.isViewModeDesignsList()) {\n this.setNameFilterTextWithValueFromNameFilter();\n this.getFilteredDrawings();\n }\n }\n\n public onCustomSettingsChanged(settings: {selectedItems: boolean; unitType: UnitType}): void {\n this.displayTechnicalUnit = settings.unitType === UnitType.TECHNICAL;\n if (this.showSelectedItems !== settings.selectedItems) {\n this.onShowSelectedItemsChange(settings.selectedItems);\n }\n }\n\n public isViewModeDesigns(): boolean {\n return this.selectedViewMode === ProductionScheduleDrawingViewMode.DESIGNS;\n }\n\n public isViewModeDesignsList(): boolean {\n return this.selectedViewMode === ProductionScheduleDrawingViewMode.DESIGNS_LIST;\n }\n\n public isViewModeNewOrderLines(): boolean {\n return this.selectedViewMode === ProductionScheduleDrawingViewMode.ORDER_LINES;\n }\n\n public canUseAdvancedSearchFilters(): boolean {\n return this.isViewModeDesigns() && !this.showSelectedItems;\n }\n\n public canSelectDrawings(): boolean {\n if (this.isViewModeDesignsList()) {\n return true;\n }\n\n return !this.isCurrentProductionSchedulePhaseBuild || (this.isCurrentProductionSchedulePhaseBuild && !this.showSelectedItems);\n }\n\n public showOnlySelectedDrawings(): boolean {\n return this.isViewModeDesignsList() && this.isCurrentProductionSchedulePhaseBuild;\n }\n\n private getFilteredDrawings(): void {\n this.listOfDrawings = [];\n this.itemsHaveBeenLoaded = false;\n this.changeDetectorRef.detectChanges();\n this.searchFilters?.emitCheckIfFiltersAreTooBigForContainerEvent();\n\n this.getDrawings(0);\n }\n\n private subscribeToNameFilterChanges(): void {\n this.nameFilterChangeSubject\n .asObservable()\n .pipe(debounceTime(500), takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((filterText: string) => {\n if (!this.showSelectedItems) {\n this.advancedSearchFilters.find((advancedSearchFilter: PropertyValue) => advancedSearchFilter.propertyName === AdvancedSearchInput.NAME).propertyValue = filterText;\n this.getFilteredDrawings();\n } else {\n this.getSelectedDrawings(filterText);\n }\n });\n }\n\n private setAdvancedSearchFilters(): void {\n if (this.isViewModeDesigns() && !this.showSelectedItems) {\n const shapeFilter = find(this.advancedSearchFiltersForDesignsViewMode, {propertyName: AdvancedSearchInput.DRAWING_SHAPE});\n\n this.advancedSearchFilters = cloneDeep(this.advancedSearchFiltersForDesignsViewMode);\n\n if ((shapeFilter?.possiblePropertyValues?.length ?? 0) === 0) {\n this.drawings\n .getDrawingShapes()\n .pipe(\n rxjsFilter((drawingShapes: string[]) => !isNil(drawingShapes)),\n takeUntil(this.unSubscribeOnViewDestroy)\n )\n .subscribe((drawingShapes: string[]) => {\n shapeFilter.possiblePropertyValues = drawingShapes;\n\n find(this.advancedSearchFilters, {propertyName: AdvancedSearchInput.DRAWING_SHAPE}).possiblePropertyValues = drawingShapes;\n });\n }\n } else {\n this.advancedSearchFilters = [];\n }\n }\n\n private getSelectedDrawings(filterText: string): void {\n this.listOfDrawings = this.productionSchedule.designs.reduce((items: ListDrawingConfiguration[], drawing: Drawing) => {\n if (this.doesAttributeValueMatchFilterText(drawing.name, filterText)) {\n items.push(new ListDrawingConfiguration(drawing, 0, this.productionSchedule.getProductionScheduleItemMultiplier()));\n }\n\n return items;\n }, []);\n\n this.itemsHaveBeenLoaded = true;\n }\n\n private getListDrawingConfigurationsFromDrawings(drawings: Drawing[]): ListDrawingConfiguration[] {\n return drawings.map((drawing: Drawing) => new ListDrawingConfiguration(drawing, 0, this.productionSchedule.getProductionScheduleItemMultiplier()));\n }\n\n private getDrawings(startIndex: number): void {\n const advancedSearchFilters: PropertyValue[] = this.advancedSearchFilters.slice();\n advancedSearchFilters.push(this.bmpDrawingsOnly);\n advancedSearchFilters.push(this.nonMissingDrawingsOnly);\n\n this.drawings\n .getSlice(startIndex, this.isViewModeDesignsList() ? 0 : this.SLICE_LENGTH, 'thumbs', false, TargetForListOfDrawingsEnum.PRODUCTION_ORDER, advancedSearchFilters)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((drawings: Drawing[]) => {\n this.listOfDrawings.push(...this.getListDrawingConfigurationsFromDrawings(drawings));\n this.canGetMoreItems = drawings.length === this.SLICE_LENGTH;\n this.itemsHaveBeenLoaded = true;\n });\n }\n\n private setNameFilterText(filteredText: string): void {\n if (!isNil(this.nameFilter)) {\n this.nameFilter.filteredText = filteredText;\n }\n }\n\n private setNameFilterTextWithValueFromNameFilter(): void {\n const filteredText = this.advancedSearchFilters.find((advancedSearchFilter: PropertyValue) => advancedSearchFilter.propertyName === AdvancedSearchInput.NAME).propertyValue;\n this.setNameFilterText(filteredText);\n }\n\n private subscribeToProductionScheduleChanges(): void {\n this.productionSchedulePlan.currentUpdatedProductionSchedule\n .pipe(\n rxjsMap((productionSchedule: ProductionSchedule) => productionSchedule.orderLines),\n distinctUntilChanged((oldOrderLines: ProductionScheduleOrderLine[], newOrderLines: ProductionScheduleOrderLine[]) =>\n newOrderLines.every((newOrderLine: ProductionScheduleOrderLine) => some(oldOrderLines, {id: newOrderLine.id, amountInProductionSchedule: newOrderLine.amountInProductionSchedule}))\n ),\n takeUntil(this.unSubscribeOnViewDestroy)\n )\n .subscribe(() => this.updateOrderLinesAmountInProductionSchedule());\n }\n\n private updateOrderLinesAmountInProductionSchedule(): void {\n this.listOfDrawings\n .filter((listDrawing: ListDrawing) => listDrawing instanceof ListDrawingOrderLine)\n .forEach((listDrawingOrderLine: ListDrawingOrderLine) => {\n listDrawingOrderLine.orderLine.amountInProductionSchedule = this.productionSchedule.getOrderLineQuantityInProductionSchedulePathsColoredYarnSets(listDrawingOrderLine.orderLine.id);\n });\n }\n\n private showDialogToConfirmDrawingRemoval(selectedDrawings: ListDrawing[], productionScheduleItemsToBeRemoved: ProductionScheduleItemInPathGroup[]): void {\n const designTranslation = this.translate.instant(this.designTranslationKey, {count: 1});\n\n this.dialogBuilderFactoryService\n .getBuilder()\n .openAlertDialog({\n titleText: this.translate.instant('PRODUCTION_ORDER.DESIGN_LIBRARY.IN_USE.TITLE', {entity: designTranslation}),\n messageText: this.translate.instant('PRODUCTION_ORDER.DESIGN_LIBRARY.IN_USE.MESSAGE', {entity: designTranslation}),\n type: DialogType.CONFIRM\n })\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((result: AlertDialogResult) => {\n if (result === AlertDialogResult.CONFIRM) {\n this.productionSchedulePlan.removeProductionScheduleItems(productionScheduleItemsToBeRemoved, () => this.updateListOfDrawings(selectedDrawings));\n } else {\n this.productionScheduleItemsToBeRestored = productionScheduleItemsToBeRemoved;\n }\n });\n }\n\n private updateListOfDrawings(selectedDrawings: ListDrawing[]): void {\n if (this.showSelectedItems) {\n this.listOfDrawings = selectedDrawings.filter(\n (selectedDrawing: ListDrawing) => selectedDrawing instanceof ListDrawingConfiguration && this.doesAttributeValueMatchFilterText(selectedDrawing.drawing.name, this.nameFilter?.filteredText)\n );\n }\n\n this.selectedDrawingsChanged.emit(selectedDrawings);\n }\n\n private doesAttributeValueMatchFilterText(attributeValue: string, filterText: string): boolean {\n if (AssertionUtils.isNullOrUndefined(this.nameFilter)) {\n return true;\n }\n\n return (filterText?.length ?? 0) === 0 || attributeValue?.toLowerCase()?.includes(filterText?.toLowerCase());\n }\n\n private getSelectedDrawingsFromProductionSchedule(): ListDrawingConfiguration[] {\n return this.getListDrawingConfigurationsFromDrawings(this.productionSchedule.designs);\n }\n\n private subscribeToEditPathChanges(): void {\n this.productionSchedulePlan.currentEditingPaths.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe((isEditingPaths: boolean) => (this.isEditingPaths = isEditingPaths));\n }\n\n private setNavigationHelperState(): void {\n const emptyDrawingLibraryState = {advancedSearchFilters: null, showSelectedItems: null, drawingViewMode: null} as ProductionDrawingLibraryData;\n const drawingLibraryState = this.navigationHelperService.getPartialState(Object.keys(emptyDrawingLibraryState));\n\n if (!AssertionUtils.isNullOrUndefined(drawingLibraryState) && !ObjectUtils.isDeepEqual(drawingLibraryState, emptyDrawingLibraryState)) {\n if (drawingLibraryState.drawingViewMode) {\n this.onSelectedViewModeChange(drawingLibraryState.drawingViewMode);\n }\n\n if (!AssertionUtils.isNullOrUndefined(drawingLibraryState.showSelectedItems)) {\n this.onShowSelectedItemsChange(drawingLibraryState.showSelectedItems);\n }\n\n if (drawingLibraryState.advancedSearchFilters) {\n this.unsavedAdvancedSearchFilters = drawingLibraryState.advancedSearchFilters;\n\n if (document.getElementsByClassName('report-dialog-content').length === 0) {\n this.showAdvancedSearch();\n }\n }\n }\n }\n}\n","
\n \n @if (canAddBuggy()) {\n
\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 {RouteUtils} from '@application/helper/routing/route-utils';\nimport {BuggyForProductionSchedule} from '@domain/production-schedule/buggy-for-production-schedule';\nimport {Permission} from '@domain/profile/permission.enum';\nimport {Subscription} from '@domain/profile/subscription';\nimport {Authentication, AUTHENTICATION} from '@infrastructure/http/authentication/authentication';\nimport {HttpBuggyService} from '@infrastructure/http/buggy/http-buggy.service';\nimport {BuggyOverviewService} from '@presentation/pages/textile-data/buggy/overview/buggy-overview.service';\nimport {\n AssertionUtils,\n BaseComponent,\n DialogComponentData,\n GridOptionsBuilderFactoryService,\n NoDataOverlayComponentParams,\n OverlayComponentParams,\n SelectGridDialog\n} from '@vdw/angular-component-library';\nimport {AgGridAngular} from 'ag-grid-angular';\nimport {GridApi, GridOptions, IRowNode, RowDataUpdatedEvent} from 'ag-grid-community';\nimport {isEqual, isNil, isUndefined} from 'lodash-es';\nimport {takeUntil} from 'rxjs/operators';\n\n@Component({\n templateUrl: './select-buggy.component.html',\n styleUrls: ['./select-buggy.component.scss']\n})\nexport class SelectBuggyComponent extends BaseComponent implements OnInit, AfterViewInit, SelectGridDialog {\n @ViewChild('buggiesGrid') public buggiesGrid: AgGridAngular;\n public listOfBuggies: BuggyForProductionSchedule[];\n public listOfGridOptions: GridOptions[];\n public listOfGridApis: GridApi[];\n\n private currentSubscription: Subscription;\n private readonly getBuggy: BuggyForProductionSchedule;\n private readonly machineId: number;\n private readonly isPropertyValueForBuggyNameEmpty: boolean;\n private newBuilder = false;\n\n public constructor(\n @Inject(MAT_DIALOG_DATA) data: any,\n @Inject(AUTHENTICATION) private readonly authentication: Authentication,\n private readonly dialogRef: MatDialogRef,\n private readonly gridOptionsBuilderFactoryService: GridOptionsBuilderFactoryService,\n private readonly buggies: HttpBuggyService,\n private readonly buggyOverviewService: BuggyOverviewService,\n private readonly navigationHelperService: NavigationHelperService>\n ) {\n super();\n\n this.dialogRef = dialogRef;\n this.gridOptionsBuilderFactoryService = gridOptionsBuilderFactoryService;\n this.getBuggy = data.getBuggy;\n this.machineId = data.machineId;\n this.isPropertyValueForBuggyNameEmpty = data.isPropertyValueForBuggyNameEmpty;\n this.newBuilder = data.newBuilder;\n }\n\n public get gridOptionsForListOfBuggies(): GridOptions {\n return this.listOfGridOptions[0];\n }\n\n public ngOnInit(): void {\n this.currentSubscription = this.authentication.getCurrentSubscription();\n\n this.getBuggies();\n this.initialiseGridOptions();\n }\n\n public ngAfterViewInit(): void {\n this.listOfGridApis = [this.buggiesGrid?.api];\n }\n\n public filterBuggies(event: string): void {\n this.buggiesGrid.api.setGridOption('quickFilterText', event);\n }\n\n public canSelectBuggy(): boolean {\n let result = false;\n if (!AssertionUtils.isNullOrUndefined(this.buggiesGrid?.api)) {\n result = this.buggiesGrid.api.getSelectedRows().length > 0;\n }\n return result;\n }\n\n public cancel(): void {\n this.dialogRef.close();\n\n if (!isEqual(this.getBuggy, this.getSelectedBuggy()) || !isNil(this.getSelectedBuggy())) {\n this.dialogRef.close(this.getBuggy);\n }\n }\n\n public selectBuggy(): void {\n this.dialogRef.close(this.getSelectedBuggy());\n }\n\n public addButtonEnabled(): boolean {\n if (this.newBuilder) {\n return !AssertionUtils.isNullOrUndefined(this.machineId);\n } else {\n return !AssertionUtils.isNullOrUndefined(this.machineId) && !this.isPropertyValueForBuggyNameEmpty;\n }\n }\n\n public canAddBuggy(): boolean {\n return this.currentSubscription?.hasPermission(Permission.EDIT_BUGGIES);\n }\n\n public addBuggy(): void {\n const data = {\n dialogComponent: SelectBuggyComponent\n };\n this.navigationHelperService.navigateToNextRouteWithPartialState(data, RouteUtils.paths.texStyle.buggy.addBuggy.absolutePath);\n }\n\n private getBuggies(): void {\n this.buggies\n .getAll()\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((buggies: BuggyForProductionSchedule[]) => {\n this.listOfBuggies = buggies;\n });\n }\n\n private initialiseGridOptions(): void {\n this.listOfGridOptions = [\n this.gridOptionsBuilderFactoryService\n .getBuilder(this.buggyOverviewService.getColumnDefs().colDefs, GridIdentifier.BUGGY)\n .withLoadingOverlay({\n scale: 0.7\n } as OverlayComponentParams)\n .withNoRowsOverlay({\n scale: 0.7,\n titleParam: 'PLANNING.BUGGY.BUGGY',\n hideDescription: true\n } as NoDataOverlayComponentParams)\n .withOnRowDataUpdated(({api}: RowDataUpdatedEvent) => this.setBuggy(api))\n .withoutColumnMenu()\n .build()\n ];\n }\n\n private setBuggy(gridApi: GridApi): void {\n if (!isUndefined(this.getBuggy) && !isNil(this.getBuggy)) {\n const rowNode: IRowNode = gridApi.getRowNode(`${this.getBuggy.id}`);\n\n if (!isNil(rowNode)) {\n rowNode.setSelected(true);\n }\n }\n }\n\n private getSelectedBuggy(): any {\n return this.buggiesGrid.api.getSelectedRows()[0];\n }\n}\n","import {Component, Inject} from '@angular/core';\nimport {MAT_DIALOG_DATA} from '@angular/material/dialog';\nimport {FinishingForProductionSchedule} from '@domain/production-schedule/finishing-for-production-schedule';\nimport {AssertionUtils, TranslateService} from '@vdw/angular-component-library';\n\n@Component({\n templateUrl: './finishing-details.component.html',\n styleUrls: ['./finishing-details.component.scss']\n})\nexport class FinishingDetailsComponent {\n public finishing: FinishingForProductionSchedule;\n private translate: TranslateService;\n\n public constructor(\n @Inject(MAT_DIALOG_DATA) public data: any,\n translate: TranslateService\n ) {\n this.finishing = data.finishing;\n this.translate = translate;\n }\n\n public getFinishingType(): string {\n return !AssertionUtils.isNullOrUndefined(this.finishing.finishingType) ? this.translate.instant(`TEXTILE_DATA.FINISHING_TEMPLATE.FINISHINGTYPE_OPTIONS.${this.finishing.finishingType}`) : '';\n }\n\n public getFinishingLabel(): string {\n const translation = !AssertionUtils.isEmpty(this.finishing.labels) ? this.translate.instant('GENERAL.CONDITION.YES') : this.translate.instant('GENERAL.CONDITION.NO');\n return !AssertionUtils.isNullOrUndefined(this.finishing.labels) ? translation : '';\n }\n\n public getCutbarBefore(): string {\n let cutbarBeforeValue = '';\n const millimeterTranslationKey = 'GENERAL.UNIT.MILLIMETER';\n const picksTranslationKey = 'GENERAL.UNIT.PICKS';\n if (this.canShowLengthOfCutbarBefore()) {\n this.translate.get([millimeterTranslationKey, picksTranslationKey]).subscribe((translations: any) => {\n const lengthOfCutbarBeforeInMillimeters = this.getLengthOfCutbarBeforeInMillimeters();\n const lengthOfCutbarBeforeInNumberOfPicks = this.getLengthOfCutbarBeforeInNumberOfPicks();\n cutbarBeforeValue = `${lengthOfCutbarBeforeInMillimeters} ${translations[millimeterTranslationKey]} / ${lengthOfCutbarBeforeInNumberOfPicks} ${translations[picksTranslationKey]}`;\n });\n }\n return cutbarBeforeValue;\n }\n\n public getCutbarAfter(): string {\n let cutbarAfterValue = '';\n const millimeterTranslationKey = 'GENERAL.UNIT.MILLIMETER';\n const picksTranslationKey = 'GENERAL.UNIT.PICKS';\n if (this.canShowLengthOfCutbarAfter()) {\n this.translate.get([millimeterTranslationKey, picksTranslationKey]).subscribe((translations: any) => {\n const lengthOfCutbarAfterInMillimeters = this.getLengthOfCutbarAfterInMillimeters();\n const lengthOfCutbarAfterInNumberOfPicks = this.getLengthOfCutbarAfterInNumberOfPicks();\n cutbarAfterValue = `${lengthOfCutbarAfterInMillimeters} ${translations[millimeterTranslationKey]} / ${lengthOfCutbarAfterInNumberOfPicks} ${translations[picksTranslationKey]}`;\n });\n }\n return cutbarAfterValue;\n }\n\n private canShowLengthOfCutbarBefore(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.finishing.cutbarsInformation) && this.finishing.cutbarsInformation.hasAddedCutbarBefore();\n }\n\n private getLengthOfCutbarBeforeInMillimeters(): number {\n return this.finishing.cutbarsInformation.getLengthOfCutbarBeforeInMillimeters();\n }\n\n private getLengthOfCutbarBeforeInNumberOfPicks(): number {\n return this.finishing.cutbarsInformation.getLengthOfCutbarBeforeInNumberOfPicks();\n }\n\n private canShowLengthOfCutbarAfter(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.finishing.cutbarsInformation) && this.finishing.cutbarsInformation.hasAddedCutbarAfter();\n }\n\n private getLengthOfCutbarAfterInMillimeters(): number {\n return this.finishing.cutbarsInformation.getLengthOfCutbarAfterInMillimeters();\n }\n\n private getLengthOfCutbarAfterInNumberOfPicks(): number {\n return this.finishing.cutbarsInformation.getLengthOfCutbarAfterInNumberOfPicks();\n }\n}\n","\n \n\n \n
\n
\n \n \n \n \n
\n
\n
\n
\n","import isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/**\n * The base implementation of `_.toNumber` which doesn't ensure correct\n * conversions of binary, hexadecimal, or octal string values.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n */\nfunction baseToNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n return +value;\n}\n\nexport default baseToNumber;\n","import baseToNumber from './_baseToNumber.js';\nimport baseToString from './_baseToString.js';\n\n/**\n * Creates a function that performs a mathematical operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @param {number} [defaultValue] The value used for `undefined` arguments.\n * @returns {Function} Returns the new mathematical operation function.\n */\nfunction createMathOperation(operator, defaultValue) {\n return function(value, other) {\n var result;\n if (value === undefined && other === undefined) {\n return defaultValue;\n }\n if (value !== undefined) {\n result = value;\n }\n if (other !== undefined) {\n if (result === undefined) {\n return other;\n }\n if (typeof value == 'string' || typeof other == 'string') {\n value = baseToString(value);\n other = baseToString(other);\n } else {\n value = baseToNumber(value);\n other = baseToNumber(other);\n }\n result = operator(value, other);\n }\n return result;\n };\n}\n\nexport default createMathOperation;\n","import createMathOperation from './_createMathOperation.js';\n\n/**\n * Multiply two numbers.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Math\n * @param {number} multiplier The first number in a multiplication.\n * @param {number} multiplicand The second number in a multiplication.\n * @returns {number} Returns the product.\n * @example\n *\n * _.multiply(6, 4);\n * // => 24\n */\nvar multiply = createMathOperation(function(multiplier, multiplicand) {\n return multiplier * multiplicand;\n}, 1);\n\nexport default multiply;\n","
\n
\n
\n \n \n {{ 'GENERAL.COMMENT' | bmsTranslate }}\n \n \n
\n\n @if (canSelectBuggy()) {\n
\n

{{ 'PLANNING.BUGGY.BUGGY' | bmsTranslate: {count: 1} }}

\n\n
\n \n {{ 'PLANNING.BUGGY.BUGGY' | bmsTranslate: {count: 1} }}\n \n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n
\n
\n }\n\n
\n

{{ 'TEXTILE_DATA.FINISHING.FINISHING' | bmsTranslate: {count: 1} }}

\n\n
\n \n {{ 'TEXTILE_DATA.FINISHING.FINISHING' | bmsTranslate: {count: 1} }}\n \n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n \n
\n
\n \n
\n

{{ 'PRODUCTION_ORDER.WEAVE_PLAN.REST_ZONE.REST_ZONE' | bmsTranslate: {count: 2} }}

\n\n
\n \n \n {{ getRestZonePositionTranslationKey(possibleRestZonePosition) | bmsTranslate }}\n \n \n\n
\n \n \n \n {{ getRestZonePositionTranslationKey(possibleRestZonePosition) | bmsTranslate }}\n \n \n \n \n \n {{ 'GENERAL.UNIT.DENTS' | bmsTranslate }}\n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n
\n
\n\n
\n \n {{ 'TEXTILE_DATA.MACHINE_QUALITY.PATTERN_OR_DRAWING' | bmsTranslate: {count: 1} }}\n \n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n \n
\n
\n\n
\n

{{ 'PRODUCTION_ORDER.WEAVE_PLAN.FREE_ZONE.FREE_ZONE' | bmsTranslate: {count: 2} }}

\n
\n
\n \n {{ 'PRODUCTION_ORDER.CUSTOM_SETTINGS.LEFT' | bmsTranslate }}\n \n {{ 'GENERAL.UNIT.DENTS' | bmsTranslate }}\n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n \n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.USE_AS_MAXIMUM' | bmsTranslate }}\n \n
\n
\n \n {{ 'PRODUCTION_ORDER.CUSTOM_SETTINGS.RIGHT' | bmsTranslate }}\n \n {{ 'GENERAL.UNIT.DENTS' | bmsTranslate }}\n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n \n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.USE_AS_MAXIMUM' | bmsTranslate }}\n \n
\n
\n \n {{ 'PRODUCTION_ORDER.CUSTOM_SETTINGS.IN_BETWEEN' | bmsTranslate }}\n \n {{ 'GENERAL.UNIT.DENTS' | bmsTranslate }}\n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n \n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.USE_AS_MAXIMUM' | bmsTranslate }}\n \n
\n
\n
\n \n {{ 'TEXTILE_DATA.MACHINE_QUALITY.PATTERN_OR_DRAWING' | bmsTranslate: {count: 1} }}\n \n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n \n
\n
\n
\n
\n
\n","import {DOCUMENT} from '@angular/common';\nimport {Component, EventEmitter, Inject, Input, OnChanges, OnInit, Output, SimpleChanges} from '@angular/core';\nimport {FormBuilder, Validators} from '@angular/forms';\nimport {AddFreeZonePattern} from '@application/command/add-free-zone-pattern';\nimport {AddRestZonePattern} from '@application/command/add-rest-zone-pattern';\nimport {RouteUtils} from '@application/helper/routing/route-utils';\nimport {CustomSettings} from '@domain/custom-settings/custom-settings';\nimport {Pattern} from '@domain/pattern';\nimport {PositionOfDialog} from '@domain/position-of-dialog';\nimport {BuggyForProductionSchedule} from '@domain/production-schedule/buggy-for-production-schedule';\nimport {CreelForProductionSchedule} from '@domain/production-schedule/creel-for-production-schedule';\nimport {ProductionOrderCustomSettings} from '@domain/production-schedule/custom-settings/production-order-custom-settings';\nimport {FinishingForProductionSchedule} from '@domain/production-schedule/finishing-for-production-schedule';\nimport {InitialFreeZone} from '@domain/production-schedule/free-zone/initial-free-zone';\nimport {MachineQualityForProductionSchedule} from '@domain/production-schedule/machine-quality-for-production-schedule';\nimport {MachineSummary} from '@domain/production-schedule/machine-summary';\nimport {InitialRestZone} from '@domain/production-schedule/rest-zone/initial-rest-zone';\nimport {RestZonePosition} from '@domain/production-schedule/rest-zone/rest-zone-position.enum';\nimport {UserDefinedRest} from '@domain/production-schedule/rest-zone/user-defined-rest';\nimport {Permission} from '@domain/profile/permission.enum';\nimport {Subscription as ProfileSubscription} from '@domain/profile/subscription';\nimport {OverviewListColoredYarnSetWithStartDent} from '@domain/textile-data/creel/overview-list-colored-yarn-set-with-start-dent';\nimport {Authentication, AUTHENTICATION} from '@infrastructure/http/authentication/authentication';\nimport {HttpBuggyCustomSettingsService} from '@infrastructure/http/buggy/http-buggy-custom-settings.service';\nimport {RepositionDialogComponent} from '@presentation/components/reposition-dialog/reposition-dialog.component';\nimport {SelectBuggyComponent} from '@presentation/components/select-buggy/select-buggy.component';\nimport {SelectFinishingComponent} from '@presentation/components/select-finishing/select-finishing.component';\nimport {PatternType} from '@presentation/components/select-pattern/pattern-type.enum';\nimport {SelectPatternComponentMatDialogConfigDataInterface} from '@presentation/components/select-pattern/select-pattern-component-mat-dialog-config.interface';\nimport {SelectPatternComponent} from '@presentation/components/select-pattern/select-pattern.component';\nimport {AddProductionSchedule} from '@presentation/pages/texfab/production-schedule/add/add-production-schedule';\nimport {ADD_PRODUCTION_SCHEDULE} from '@presentation/pages/texfab/production-schedule/add/add-production-schedule.service';\nimport {FinishingDetailsComponent} from '@presentation/pages/texfab/production-schedule/finishing-details/finishing-details.component';\nimport {OverviewListFinishing} from '@presentation/pages/textile-data/finishing/overview/overview-list-finishing';\nimport {WeaveQualityType} from '@presentation/pages/textile-data/machine-quality/overview/weave-quality-type.enum';\nimport {AssertionUtils, BaseComponent, canShowErrorForErrorCodeAndFormControlForFormGroup, DialogBuilderFactoryService, FormValidationHelper, TranslateService} from '@vdw/angular-component-library';\nimport {first, isEmpty, isEqual, isNil, isUndefined, multiply} from 'lodash-es';\nimport {DateTime} from 'luxon';\nimport {Subscription} from 'rxjs';\nimport {debounceTime, distinctUntilChanged, takeUntil} from 'rxjs/operators';\nimport {AdditionalOptionsForm, FreeZoneForm, RestZoneForm, UserDefinedRestForm} from './additional-options-form';\n\n@Component({\n selector: 'app-production-schedule-initial-preparations-additional-options, [app-production-schedule-initial-preparations-additional-options]',\n templateUrl: './production-schedule-initial-preparations-additional-options.component.html',\n styleUrls: ['./production-schedule-initial-preparations-additional-options.component.scss']\n})\nexport class ProductionScheduleInitialPreparationsAdditionalOptionsComponent extends BaseComponent implements OnChanges, OnInit {\n private static readonly restZonePatternFormControlName = 'restZone.pattern';\n private static readonly restZonePositionFormControlName = 'restZone.position';\n public readonly PATTERN_CONDITIONAL_CHIP_VALUE_KEY = `${this.translate.instant('GENERAL.PATTERN.PATTERN', {count: 1})} %(id)`;\n public readonly FINISHING_VIEW_PERMISSION = RouteUtils.paths.texStyle.finishingTemplate.editFinishingTemplate.requiredPermission;\n\n @Input() public machine: MachineSummary;\n @Input() public machineQuality: MachineQualityForProductionSchedule;\n @Input() public creel: CreelForProductionSchedule;\n @Input() public coloredYarnSets: OverviewListColoredYarnSetWithStartDent[];\n @Input() public freeZone: InitialFreeZone;\n @Input() public restZone: InitialRestZone;\n @Input() public finishing: FinishingForProductionSchedule;\n @Input() public dueDate: Date;\n @Input() public comment: string;\n @Input() public buggy: BuggyForProductionSchedule;\n @Input() public isRestZoneConfigurable: boolean;\n @Input() public factorForConversionFromDentsToMillimeters: number;\n @Input() public customSettings: ProductionOrderCustomSettings;\n @Input() public needsToShowValidationFeedback = true;\n @Input() public defaultInitialRestZones: InitialRestZone;\n @Input() public weaveQualityType: WeaveQualityType;\n @Input() public areAllFieldsDisabled: boolean = false;\n @Output() public formValuesChanged: EventEmitter = new EventEmitter();\n @Output() public restZoneLoaded = new EventEmitter();\n @Output() public freeZoneLoaded = new EventEmitter();\n @Output() public generateName = new EventEmitter();\n\n public additionalOptionsForm: AdditionalOptionsForm;\n public scheduleDueDatePermission: Permission = Permission.SCHEDULE_DUE_DATE;\n public newBuilderPermission: Permission = Permission.TEXFAB_NEW_BUILDER;\n public possibleRestZonePositions: RestZonePosition[];\n public possibleRestZoneUserDefinedPositions: RestZonePosition[];\n public finishingBaseRouterLink = RouteUtils.paths.texStyle.machineQuality.editFinishingFromQuality.absolutePath;\n\n private additionalOptionsFormValueChangesSubject: Subscription;\n private currentSubscription: ProfileSubscription;\n private hasBuggyNameGenerator: boolean;\n\n private readonly formValidationHelper = new FormValidationHelper();\n\n public constructor(\n @Inject(ADD_PRODUCTION_SCHEDULE) private readonly addProductionSchedule: AddProductionSchedule,\n @Inject(DOCUMENT) private readonly document: Document,\n @Inject(AUTHENTICATION) private readonly authentication: Authentication,\n private readonly httpBuggyCustomSettings: HttpBuggyCustomSettingsService,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n private readonly formBuilder: FormBuilder,\n private readonly translate: TranslateService,\n private readonly addRestZonePattern: AddRestZonePattern,\n private readonly addFreeZonePattern: AddFreeZonePattern\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this.currentSubscription = this.authentication.getCurrentSubscription();\n\n if (this.machine.canHaveRestAndFreeZonesAndPathLabels()) {\n this.possibleRestZonePositions = RestZonePosition.getRestZonePositions();\n this.possibleRestZoneUserDefinedPositions = RestZonePosition.getUserDefinedRestZonePositions();\n }\n\n this.finishingBaseRouterLink = RouteUtils.paths.texStyle.machineQuality.editFinishingFromQuality.absolutePath.replace(':qualityId', this.machineQuality.id.toString());\n this.setFormFields();\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (!AssertionUtils.isNullOrUndefined(this.additionalOptionsForm)) {\n if ('buggy' in changes && !changes.buggy.isFirstChange()) {\n this.updateBuggyFormField();\n }\n\n if ('finishing' in changes && !changes.finishing.isFirstChange()) {\n this.updateFinishingFormField();\n }\n\n if ('freeZone' in changes && !changes.freeZone.isFirstChange()) {\n this.updateFreeZoneFormFields();\n }\n\n if (this.shouldUpdateRestZoneFormFields(changes)) {\n this.updateFormFieldsForRestZone();\n }\n\n if (this.needsToShowValidationFeedback) {\n this.formValidationHelper.checkForm(this.additionalOptionsForm, this.document);\n }\n }\n }\n\n public isUsingNewBuilder(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.currentSubscription) && this.currentSubscription?.hasPermission(this.newBuilderPermission);\n }\n\n public canSelectBuggy(): boolean {\n return !this.isUsingNewBuilder() && this.currentSubscription?.hasPermission(Permission.VIEW_BUGGIES);\n }\n\n public onDateChange(): void {\n this.formValuesChanged.emit();\n }\n\n public selectBuggy(): void {\n this.dialogBuilderFactoryService\n .getBuilder()\n .openSelectGridDialog(SelectBuggyComponent, {\n getBuggy: this.getSelectedBuggy(),\n machineId: this.machine.id,\n machineQualityId: this.machineQuality.id,\n creelId: this.creel.id,\n isPropertyValueForBuggyNameEmpty: this.hasBuggyNameGenerator\n })\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((buggy: BuggyForProductionSchedule) => {\n if (buggy) {\n this.buggy = buggy;\n this.updateBuggyFormField();\n }\n });\n }\n\n public getSelectedBuggy(): BuggyForProductionSchedule {\n return this.additionalOptionsForm.value.buggy;\n }\n\n public removeFinishing(): void {\n this.additionalOptionsForm.controls.finishing.setValue(null);\n }\n\n public hasChosenFinishing(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.additionalOptionsForm.value?.finishing);\n }\n\n public selectFinishing(): void {\n this.dialogBuilderFactoryService\n .getBuilder()\n .openSelectGridDialog(SelectFinishingComponent, {\n machineQualityId: this.machineQuality.id\n })\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((selectedOverviewListFinishing: OverviewListFinishing) => {\n if (!isUndefined(selectedOverviewListFinishing)) {\n const finishing = FinishingForProductionSchedule.fromOverviewListFinishing(selectedOverviewListFinishing);\n const isCurrentFinishingEqualToSelectedFinishing: boolean = isEqual(this.getSelectedFinishing(), finishing);\n this.additionalOptionsForm.controls.finishing.patchValue(finishing, {emitEvent: !isCurrentFinishingEqualToSelectedFinishing});\n\n if (!isCurrentFinishingEqualToSelectedFinishing) {\n this.additionalOptionsForm.markAsDirty();\n }\n }\n });\n }\n\n public getSelectedFinishing(): FinishingForProductionSchedule {\n return !AssertionUtils.isNullOrUndefined(this.additionalOptionsForm.controls.finishing) ? this.additionalOptionsForm.value.finishing : null;\n }\n\n public hasChosenPatternForFreeZone(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.additionalOptionsForm.value?.freeZone?.pattern);\n }\n\n public selectPatternForFreeZone(): void {\n this.openDialogForZone('freeZone', {\n patternType: PatternType.FREE_ZONE_PATTERNS,\n addPatternCommand: this.addFreeZonePattern.execute(this.machineQuality.id),\n patternTranslationKey: 'TEXTILE_DATA.MACHINE_QUALITY.PATTERN_OR_DRAWING',\n allowPatternCreation: true,\n weaveStructureId: this.machineQuality.weaveStructure.id,\n machineQualityId: this.machineQuality.id\n });\n }\n\n public getSelectedPatternForFreeZone(): Pattern {\n return this.additionalOptionsForm.value?.freeZone?.pattern;\n }\n\n public hasChosenPatternForRestZone(): boolean {\n return !isEmpty(this.additionalOptionsForm.get(ProductionScheduleInitialPreparationsAdditionalOptionsComponent.restZonePatternFormControlName).value);\n }\n\n public selectPatternForRestZone(): void {\n const colorSetId: number = first(this.coloredYarnSets).coloredYarnSet.overviewListColorSet.id;\n\n this.openDialogForZone('restZone', {\n patternType: PatternType.REST_ZONE_PATTERNS,\n addPatternCommand: this.addRestZonePattern.execute({machineQualityId: this.machineQuality.id, colorSetId}),\n patternTranslationKey: 'TEXTILE_DATA.MACHINE_QUALITY.PATTERN_OR_DRAWING',\n patternItemTranslationKey: 'GENERAL.PATTERN.DRAWINGS',\n allowPatternCreation: true,\n weaveStructureId: this.machineQuality.weaveStructure.id,\n selectedMenuItemIndex: 1,\n machineQualityId: this.machineQuality.id,\n colorSetId\n });\n }\n\n public getSelectedPatternForRestZone(): Pattern {\n return this.additionalOptionsForm.get(ProductionScheduleInitialPreparationsAdditionalOptionsComponent.restZonePatternFormControlName).value;\n }\n\n public getInitialFreeZone(): InitialFreeZone {\n let initialFreeZone: InitialFreeZone;\n\n if (this.machine.canHaveRestAndFreeZonesAndPathLabels()) {\n const isAdditionalOptionsFormDefined = !isUndefined(this.additionalOptionsForm);\n\n const technicalWidthOfFreeZoneLeftInDents: number = isAdditionalOptionsFormDefined ? this.additionalOptionsForm.value.freeZone.leftTechnicalWidthInDents : null;\n const commercialWidthOfFreeZoneLeftInMM: number = multiply(technicalWidthOfFreeZoneLeftInDents, this.factorForConversionFromDentsToMillimeters);\n const freeZoneLeftUseAsMaximum: boolean = isAdditionalOptionsFormDefined && this.additionalOptionsForm.value.freeZone.freeZoneLeftUseAsMaximum;\n\n const technicalWidthOfFreeZoneInBetweenInDents: number = isAdditionalOptionsFormDefined ? this.additionalOptionsForm.value.freeZone.inBetweenTechnicalWidthInDents : null;\n const commercialWidthOfFreeZoneInBetweenInMM: number = multiply(technicalWidthOfFreeZoneInBetweenInDents, this.factorForConversionFromDentsToMillimeters);\n const freeZoneInBetweenUseAsMaximum: boolean = isAdditionalOptionsFormDefined && this.additionalOptionsForm.value.freeZone.freeZoneInBetweenUseAsMaximum;\n\n const technicalWidthOfFreeZoneRightInDents: number = isAdditionalOptionsFormDefined ? this.additionalOptionsForm.value.freeZone.rightTechnicalWidthInDents : null;\n const commercialWidthOfFreeZoneRightInMM: number = multiply(technicalWidthOfFreeZoneRightInDents, this.factorForConversionFromDentsToMillimeters);\n const freeZoneRightUseAsMaximum: boolean = isAdditionalOptionsFormDefined && this.additionalOptionsForm.value.freeZone.freeZoneRightUseAsMaximum;\n\n initialFreeZone = new InitialFreeZone(\n {\n commercialWidthInMM: commercialWidthOfFreeZoneLeftInMM,\n technicalWidthInDents: technicalWidthOfFreeZoneLeftInDents,\n useAsMaximum: freeZoneLeftUseAsMaximum\n },\n {\n commercialWidthInMM: commercialWidthOfFreeZoneInBetweenInMM,\n technicalWidthInDents: technicalWidthOfFreeZoneInBetweenInDents,\n useAsMaximum: freeZoneInBetweenUseAsMaximum\n },\n {\n commercialWidthInMM: commercialWidthOfFreeZoneRightInMM,\n technicalWidthInDents: technicalWidthOfFreeZoneRightInDents,\n useAsMaximum: freeZoneRightUseAsMaximum\n },\n this.getSelectedPatternForFreeZone()\n );\n }\n\n return initialFreeZone;\n }\n\n public getInitialRestZone(): InitialRestZone {\n let initialRestZone: InitialRestZone;\n\n if (this.machine.canHaveRestAndFreeZonesAndPathLabels()) {\n let restZonePosition: RestZonePosition;\n let userDefinedRestZonePosition: UserDefinedRest;\n\n if (this.isRestZoneConfigurable) {\n restZonePosition = this.additionalOptionsForm.get(ProductionScheduleInitialPreparationsAdditionalOptionsComponent.restZonePositionFormControlName)?.value;\n\n if (isEqual(restZonePosition, RestZonePosition.USER_DEFINED)) {\n userDefinedRestZonePosition = {\n position: this.additionalOptionsForm.value.restZone.userDefinedRest.position,\n technicalWidthInDents: this.additionalOptionsForm.value.restZone.userDefinedRest.technicalWidthInDents\n };\n }\n }\n\n initialRestZone = new InitialRestZone(restZonePosition, null, null, this.getSelectedPatternForRestZone(), userDefinedRestZonePosition);\n }\n\n return initialRestZone;\n }\n\n public canShowInputForUserDefinedWidthOfRestZone(): boolean {\n const restZonePosition = this.additionalOptionsForm.get(ProductionScheduleInitialPreparationsAdditionalOptionsComponent.restZonePositionFormControlName).value;\n return !isUndefined(this.additionalOptionsForm) && isEqual(restZonePosition, RestZonePosition.USER_DEFINED);\n }\n\n public canShowRestZonePosition(): boolean {\n return this.isRestZoneConfigurable && !isNil(this.additionalOptionsForm.get(ProductionScheduleInitialPreparationsAdditionalOptionsComponent.restZonePositionFormControlName));\n }\n\n public getEarliestPossibleDueDate(): DateTime {\n return DateTime.now();\n }\n\n public getDueDate(): Date {\n return this.additionalOptionsForm.getRawValue().dueDate?.toJSDate();\n }\n\n public getComment(): string {\n return this.additionalOptionsForm.value.comment;\n }\n\n public showFinishingDetails(event: MouseEvent): void {\n this.dialogBuilderFactoryService.getBuilder().withClass('reposition-dialog').withWidth('312px').withMaxHeight('100%').openDialog(RepositionDialogComponent, {\n finishing: this.additionalOptionsForm.value.finishing,\n component: FinishingDetailsComponent,\n sourceElement: event.target,\n positionOfDialog: PositionOfDialog.RIGHT\n });\n }\n\n public hasScheduleDueDatePermission(): boolean {\n return !isNil(this.currentSubscription) && this.currentSubscription?.hasPermission(this.scheduleDueDatePermission);\n }\n\n public canShowErrorForFormControl(errorCode: string, formControlName: string): boolean {\n return canShowErrorForErrorCodeAndFormControlForFormGroup(errorCode, formControlName, this.additionalOptionsForm);\n }\n\n public getRestZonePositionTranslationKey(restZonePosition: RestZonePosition): string {\n return `PRODUCTION_ORDER.CUSTOM_SETTINGS.${RestZonePosition[restZonePosition]}`;\n }\n\n private setFormFields(): void {\n this.additionalOptionsForm = this.formBuilder.group({});\n\n this.addFormFieldForBuggy();\n this.addFormFieldForFinishing();\n this.addFormFieldForDueDate();\n this.addFormFieldsForComment();\n\n if (this.machine.canHaveRestAndFreeZonesAndPathLabels()) {\n this.addFormFieldsForFreeZone();\n this.addFormFieldsForRestZone();\n }\n\n if (this.areAllFieldsDisabled) {\n this.additionalOptionsForm.controls.buggy.disable();\n this.additionalOptionsForm.controls.finishing.disable();\n this.additionalOptionsForm.controls.dueDate.disable();\n this.additionalOptionsForm.controls.comment.disable();\n this.additionalOptionsForm.controls.freeZone.disable();\n this.additionalOptionsForm.controls.restZone.disable();\n }\n\n this.additionalOptionsFormValueChangesSubject = this.additionalOptionsForm.valueChanges.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe(() => {\n this.notifyChangesToInitialPreparationsForm();\n });\n }\n\n private addFormFieldForBuggy(): void {\n this.additionalOptionsForm.addControl('buggy', this.formBuilder.control(null));\n this.updateBuggyFormField();\n this.watchValueChangesForFormFields('buggy', true);\n }\n\n private addFormFieldForFinishing(): void {\n this.additionalOptionsForm.addControl('finishing', this.formBuilder.control(null));\n this.updateFinishingFormField();\n this.watchValueChangesForFormFields('finishing');\n }\n\n private addFormFieldForDueDate(): void {\n const dueDate: DateTime = !isNil(this.dueDate) ? DateTime.fromJSDate(this.dueDate) : null;\n this.additionalOptionsForm.addControl('dueDate', this.formBuilder.control({value: dueDate, disabled: !this.hasScheduleDueDatePermission()}));\n }\n\n private addFormFieldsForFreeZone(): void {\n const freeZoneFormBuilderGroup: FreeZoneForm = this.formBuilder.group({\n pattern: this.formBuilder.control(null, Validators.required),\n leftTechnicalWidthInDents: this.formBuilder.control(null, Validators.required),\n freeZoneLeftUseAsMaximum: this.formBuilder.control(null),\n inBetweenTechnicalWidthInDents: this.formBuilder.control(null, Validators.required),\n freeZoneInBetweenUseAsMaximum: this.formBuilder.control(null),\n rightTechnicalWidthInDents: this.formBuilder.control(null, Validators.required),\n freeZoneRightUseAsMaximum: this.formBuilder.control(null)\n });\n\n this.additionalOptionsForm.addControl('freeZone', freeZoneFormBuilderGroup);\n this.updateFreeZoneFormFields();\n this.watchValueChangesForFormFields('freeZone');\n }\n\n private addFormFieldsForRestZone(): void {\n this.additionalOptionsForm.addControl(\n 'restZone',\n this.formBuilder.group({\n pattern: this.formBuilder.control(null, Validators.required)\n })\n );\n\n this.updateFormFieldsForRestZone();\n this.watchValueChangesForFormFields('restZone');\n }\n\n private updateFormFieldsForRestZone(): void {\n if (this.machine.canHaveRestAndFreeZonesAndPathLabels() && !isNil(this.restZone)) {\n const restZoneFormBuilderGroup = this.additionalOptionsForm.controls.restZone;\n restZoneFormBuilderGroup.controls.pattern.patchValue(this.restZone.pattern);\n\n if (this.isRestZoneConfigurable) {\n this.updateFormFieldsForConfigurableRestZone(restZoneFormBuilderGroup);\n } else if (!AssertionUtils.isNullOrUndefined(restZoneFormBuilderGroup.controls.position)) {\n restZoneFormBuilderGroup.removeControl('position');\n restZoneFormBuilderGroup.removeControl('userDefinedRest');\n }\n }\n }\n\n private updateFormFieldsForConfigurableRestZone(restZoneFormBuilderGroup: RestZoneForm): void {\n let restZonePosition: RestZonePosition;\n\n if (!isNil(this.restZone.position)) {\n restZonePosition = !isNil(this.restZone.commercialWidthInMM) ? RestZonePosition.USER_DEFINED : this.restZone.position;\n } else {\n restZonePosition = this.defaultInitialRestZones.position;\n }\n\n const userDefinedRestFormBuilderGroup: UserDefinedRestForm = this.formBuilder.group({});\n\n if (isEqual(restZonePosition, RestZonePosition.USER_DEFINED)) {\n let userDefinedRestTechnicalWidthInDents: number;\n let userDefinedRestPosition: RestZonePosition = RestZonePosition.LEFT;\n\n if (!isNil(this.restZone.userDefinedRest)) {\n userDefinedRestTechnicalWidthInDents = this.restZone.userDefinedRest.technicalWidthInDents;\n userDefinedRestPosition = this.restZone.userDefinedRest.position;\n }\n\n userDefinedRestFormBuilderGroup.addControl('technicalWidthInDents', this.formBuilder.control(userDefinedRestTechnicalWidthInDents, [Validators.required, Validators.min(0)]));\n userDefinedRestFormBuilderGroup.addControl('position', this.formBuilder.control(userDefinedRestPosition));\n }\n\n restZoneFormBuilderGroup.addControl('position', this.formBuilder.control(restZonePosition));\n restZoneFormBuilderGroup.addControl('userDefinedRest', userDefinedRestFormBuilderGroup);\n\n this.setValueWatcherForRestZonePosition();\n }\n\n private addFormFieldsForComment(): void {\n this.additionalOptionsForm.addControl('comment', this.formBuilder.control(this.comment));\n }\n\n private watchValueChangesForFormFields(controlName: string, generateName: boolean = false): void {\n this.additionalOptionsForm\n .get(controlName)\n .valueChanges.pipe(takeUntil(this.unSubscribeOnViewDestroy), distinctUntilChanged(), debounceTime(500))\n .subscribe(() => {\n this.formValuesChanged.emit();\n\n if (generateName) {\n this.generateName.emit();\n }\n });\n }\n\n private setValueWatcherForRestZonePosition(): void {\n this.additionalOptionsForm\n .get(ProductionScheduleInitialPreparationsAdditionalOptionsComponent.restZonePositionFormControlName)\n .valueChanges.pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((restZonePosition: RestZonePosition) => {\n const userDefinedRestFormGroup = this.additionalOptionsForm.controls.restZone.controls.userDefinedRest;\n\n if (restZonePosition === RestZonePosition.USER_DEFINED) {\n userDefinedRestFormGroup.addControl('technicalWidthInDents', this.formBuilder.control(null, Validators.required));\n userDefinedRestFormGroup.addControl('position', this.formBuilder.control(RestZonePosition.LEFT));\n } else {\n userDefinedRestFormGroup.removeControl('technicalWidthInDents');\n userDefinedRestFormGroup.removeControl('position');\n }\n });\n }\n\n private openDialogForZone(zone: string, dialogData: SelectPatternComponentMatDialogConfigDataInterface): void {\n this.dialogBuilderFactoryService\n .getBuilder()\n .openSelectGridDialog, Pattern>(SelectPatternComponent, dialogData)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((pattern: Pattern | undefined) => {\n if (pattern) {\n const isCurrentPatternEqualToSelectedPattern: boolean = isEqual(this.additionalOptionsForm.get(`${zone}.pattern`).value, pattern);\n\n if (zone === 'restZone') {\n this.restZoneLoaded.emit();\n } else if (zone === 'freeZone') {\n this.freeZoneLoaded.emit();\n }\n\n this.additionalOptionsForm.controls[zone].controls.pattern.setValue(pattern, {emitEvent: !isCurrentPatternEqualToSelectedPattern});\n\n if (!isCurrentPatternEqualToSelectedPattern) {\n this.additionalOptionsForm.markAsDirty();\n }\n }\n });\n }\n\n private notifyChangesToInitialPreparationsForm(): void {\n if (!this.additionalOptionsFormValueChangesSubject.closed && this.additionalOptionsForm.dirty) {\n this.addProductionSchedule.notifyChangesToInitialPreparationsForm(true);\n this.additionalOptionsFormValueChangesSubject.unsubscribe();\n }\n }\n\n private updateFreeZoneFormFields(): void {\n if (this.machine.canHaveRestAndFreeZonesAndPathLabels() && !isNil(this.freeZone)) {\n this.additionalOptionsForm.controls.freeZone.patchValue({\n pattern: this.freeZone.pattern,\n leftTechnicalWidthInDents: this.freeZone.left.technicalWidthInDents,\n freeZoneLeftUseAsMaximum: this.freeZone.left.useAsMaximum,\n inBetweenTechnicalWidthInDents: this.freeZone.inBetween.technicalWidthInDents,\n freeZoneInBetweenUseAsMaximum: this.freeZone.inBetween.useAsMaximum,\n rightTechnicalWidthInDents: this.freeZone.right.technicalWidthInDents,\n freeZoneRightUseAsMaximum: this.freeZone.right.useAsMaximum\n });\n }\n }\n\n private updateFinishingFormField(): void {\n this.additionalOptionsForm.controls.finishing.setValue(this.finishing);\n }\n\n private updateBuggyFormField(): void {\n this.additionalOptionsForm.controls.buggy.setValue(this.buggy);\n }\n\n private shouldUpdateRestZoneFormFields(changes: SimpleChanges): boolean {\n return ('restZone' in changes && !changes.restZone.isFirstChange()) || ('isRestZoneConfigurable' in changes && !changes.isRestZoneConfigurable.isFirstChange());\n }\n\n private checkHasBuggyNameGenerator(): void {\n this.httpBuggyCustomSettings\n .get()\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((buggyCustomSettings: CustomSettings) => {\n this.hasBuggyNameGenerator = buggyCustomSettings?.nameGenerator?.parts?.length > 0;\n });\n }\n}\n","// backwards compatibility layer, may be removed if backend sends enum keys instead\r\nexport function fromReadableToEnumEntry(readable: string): string {\r\n return readable?.replaceAll(' ', '_').toUpperCase();\r\n}\r\n","
\n @if (pathLabelInformation !== null) {\n
\n

{{ 'PRODUCTION_ORDER.CUSTOM_SETTINGS.PATH_LABELS.LABEL_BEFORE_PATH' | bmsTranslate }}

\n\n
\n \n\n \n \n {{ 'TEXTILE_DATA.FINISHING_TEMPLATE.LABEL.LABEL_AS_TEXT' | bmsTranslate }}\n \n \n {{ 'TEXTILE_DATA.FINISHING_TEMPLATE.LABEL.LABEL_AS_QR_CODE' | bmsTranslate }}\n \n \n
\n
\n\n
\n

{{ 'PRODUCTION_ORDER.CUSTOM_SETTINGS.PATH_LABELS.LABEL_AFTER_PATH' | bmsTranslate }}

\n\n \n {{ 'PRODUCTION_ORDER.CUSTOM_SETTINGS.PATH_LABELS.LABEL_AFTER_SAME_AS_BEFORE' | bmsTranslate }}\n \n\n
\n \n\n \n \n {{ 'TEXTILE_DATA.FINISHING_TEMPLATE.LABEL.LABEL_AS_TEXT' | bmsTranslate }}\n \n \n {{ 'TEXTILE_DATA.FINISHING_TEMPLATE.LABEL.LABEL_AS_QR_CODE' | bmsTranslate }}\n \n \n
\n
\n\n
\n

{{ 'PRODUCTION_ORDER.CUSTOM_SETTINGS.PATH_LABELS.LABEL_STYLE' | bmsTranslate }}

\n\n
\n
\n
\n \n {{ 'GENERAL.DIMENSIONS.HEIGHT' | bmsTranslate }}\n \n {{ 'GENERAL.UNIT.MILLIMETER' | bmsTranslate }}\n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n {{ 'GENERAL.ERRORS.MIN_VALUE' | bmsTranslate: {min: '1'} }}\n \n \n \n {{ 'GENERAL.DIMENSIONS.HEIGHT' | bmsTranslate }}\n \n \n {{ 'GENERAL.UNIT.PICKS' | bmsTranslate }}\n \n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n {{ 'GENERAL.ERRORS.MIN_VALUE' | bmsTranslate: {min: machineQuality.weaveStructure.picksPerColorLine} }}\n \n \n {{ 'GENERAL.ERRORS.MULTIPLE_VALUE' | bmsTranslate: {value: getMultipleValue()} }}\n \n \n \n {{ 'GENERAL.LABEL.FONT_SIZE' | bmsTranslate }}\n \n \n {{ 'GENERAL.UNIT.MILLIMETER' | bmsTranslate }}\n \n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n {{ 'GENERAL.ERRORS.MAX_VALUE' | bmsTranslate: {max: getMaxAllowedFontSize()} }}\n \n \n {{ 'GENERAL.ERRORS.MIN_VALUE' | bmsTranslate: {min: '1'} }}\n \n \n
\n\n
\n \n {{ 'GENERAL.LABEL.FONT_FAMILY' | bmsTranslate }}\n \n @for (fontFamily of possibleFontFamilies; track fontFamily) {\n \n {{ 'GENERAL.FONTS.FONT_FAMILY.' + fontFamily | bmsTranslate }}\n \n }\n \n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n \n {{ 'GENERAL.LABEL.FONT_WEIGHT' | bmsTranslate }}\n \n @for (fontWeight of possibleFontWeights; track fontWeight) {\n \n {{ 'GENERAL.FONTS.FONT_WEIGHT.' + fontWeight | bmsTranslate }}\n \n }\n \n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n \n {{ 'GENERAL.LABEL.FONT_STYLE' | bmsTranslate }}\n \n @for (fontStyle of possibleFontStyles; track fontStyle) {\n \n {{ 'GENERAL.FONTS.FONT_STYLE.' + fontStyle | bmsTranslate }}\n \n }\n \n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n
\n\n
\n \n {{ 'GENERAL.PATTERN.PATTERN' | bmsTranslate: {count: 1} }}\n \n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n \n
\n
\n
\n
\n } @else {\n
\n \n

({{ 'GENERAL.HINTS.UNAUTHORIZED' | bmsTranslate }})

\n
\n }\n
\n","import {Component, EventEmitter, Inject, Input, OnChanges, OnInit, Output, SimpleChanges} from '@angular/core';\nimport {AbstractControl, FormBuilder, FormControl, FormGroup, ValidationErrors, ValidatorFn, Validators} from '@angular/forms';\nimport {MatCheckboxChange} from '@angular/material/checkbox';\nimport {MatRadioChange} from '@angular/material/radio';\nimport {isMultipleOfValidator} from '@application/validators/is-multiple-of-validator';\nimport {NameGeneratorProperty} from '@domain/custom-settings/name-generation-property';\nimport {NameGenerator} from '@domain/custom-settings/name-generator';\nimport {FontFamily} from '@domain/fonts/font-family.enum';\nimport {FontStyle} from '@domain/fonts/font-style.enum';\nimport {FontWeight} from '@domain/fonts/font-weight.enum';\nimport {fromReadableToEnumEntry} from '@domain/fonts/fromReadableToEnumKey';\nimport {Pattern} from '@domain/pattern';\nimport {ProductionOrderCustomSettings} from '@domain/production-schedule/custom-settings/production-order-custom-settings';\nimport {InitialPathLabel} from '@domain/production-schedule/initial-path-label';\nimport {JuteInformation} from '@domain/production-schedule/jute-information';\nimport {MachineQualityForProductionSchedule} from '@domain/production-schedule/machine-quality-for-production-schedule';\nimport {PathLabelInformation} from '@domain/production-schedule/path-label-information';\nimport {PathLabelInformationForPart} from '@domain/production-schedule/path-label-information-for-part';\nimport {PathLabelType} from '@domain/production-schedule/path-label-type.enum';\nimport {Permission} from '@domain/profile/permission.enum';\nimport {Subscription} from '@domain/profile/subscription';\nimport {FontSettings} from '@domain/textile-data/finishing-and-finishing-template/finishing/font-settings';\nimport {AUTHENTICATION, Authentication} from '@infrastructure/http/authentication/authentication';\nimport {HttpProductionOrdersCustomSettingsService} from '@infrastructure/http/production-order-custom-settings/http-production-orders-custom-settings.service';\nimport {PatternBuilderInput} from '@presentation/components/name-generation-pattern-new/pattern-builder/pattern-builder-input';\nimport {PatternBuilderComponent} from '@presentation/components/name-generation-pattern-new/pattern-builder/pattern-builder.component';\nimport {PatternType} from '@presentation/components/select-pattern/pattern-type.enum';\nimport {SelectPatternComponentMatDialogConfigDataInterface} from '@presentation/components/select-pattern/select-pattern-component-mat-dialog-config.interface';\nimport {SelectPatternComponent} from '@presentation/components/select-pattern/select-pattern.component';\nimport {OverviewListColoredYarnSet} from '@presentation/pages/textile-data/colored-yarn-set/overview/overview-list-colored-yarn-set';\nimport {WeaveQualityType} from '@presentation/pages/textile-data/machine-quality/overview/weave-quality-type.enum';\nimport {\n AssertionUtils,\n BaseComponent,\n ContentSwitcherNavigationInput,\n DialogBuilderFactoryService,\n EnumUtils,\n FormValueHelper,\n NavigationHelperPrototypeService,\n ObjectUtils,\n TranslateService,\n Unit\n} from '@vdw/angular-component-library';\nimport {cloneDeep, isEqual, isNil} from 'lodash-es';\nimport {combineLatest, Subscription as RxjsSubscription} from 'rxjs';\nimport {startWith, takeUntil} from 'rxjs/operators';\nimport {AddProductionSchedule} from '../../../add-production-schedule';\nimport {ADD_PRODUCTION_SCHEDULE} from '../../../add-production-schedule.service';\n\n@Component({\n selector: 'app-production-schedule-path-labels',\n templateUrl: './production-schedule-path-labels.component.html',\n styleUrls: ['./production-schedule-path-labels.component.scss']\n})\nexport class ProductionSchedulePathLabelsComponent extends BaseComponent implements OnInit, OnChanges {\n @Input() public machineQuality: MachineQualityForProductionSchedule;\n @Input() public customSettings: ProductionOrderCustomSettings;\n @Input() public pathLabelInformation: PathLabelInformation;\n @Input() public juteInformation: JuteInformation;\n @Input() public coloredYarnSet: OverviewListColoredYarnSet;\n @Input() public needsToShowValidationFeedback: boolean;\n @Input() public factorForConversionFromPicksToMillimeters: number;\n @Input() public factorForConversionFromMillimetersToPicks: number;\n @Input() public weaveQualityType: WeaveQualityType;\n @Input() public areAllFieldsDisabled: boolean = false;\n @Input({required: true}) public readonly defaultPathLabelInformation: InitialPathLabel;\n @Output() public formValuesChanged: EventEmitter = new EventEmitter();\n @Output() public pathLabelInformationChange: EventEmitter = new EventEmitter();\n @Output() public pathZoneLoaded = new EventEmitter();\n\n public readonly JUTE_PATTERN_CONDITIONAL_CHIP_VALUE_KEY = this.translate.instant('PRODUCTION_ORDER.WEAVE_PLAN.JUTE.PATTERN_NAME', {patternId: '%(id)'});\n\n public pathLabelsForm: FormGroup<{\n technicalLabelHeightInPicks: FormControl;\n commercialLabelFontSize: FormControl;\n commercialLabelHeightInMM: FormControl;\n pathLabelBefore: FormGroup<{\n pathLabelType: FormControl;\n nameGenerator: FormControl;\n }>;\n pathLabelAfter: FormGroup<{\n pathLabelType: FormControl;\n nameGenerator: FormControl;\n }>;\n labelFontFamily: FormControl;\n labelFontWeight: FormControl;\n labelFontStyle: FormControl;\n pattern: FormControl;\n }>;\n\n public commercialUnit = Unit.MILLIMETER;\n public pathLabelNameGenerationProperties: NameGeneratorProperty[];\n\n public readonly pathLabelTypeText = PathLabelType.TEXT;\n public readonly pathLabelTypeQRCode = PathLabelType.QR_CODE;\n public readonly accessAllPermission: Permission = Permission.ACCESS_ALL;\n public readonly addPathLabelPermission: Permission = Permission.ADD_PATH_LABEL;\n public possibleFontFamilies: FontFamily[] = EnumUtils.getEnumValues(FontFamily);\n public possibleFontWeights: FontWeight[] = EnumUtils.getEnumValues(FontWeight);\n public possibleFontStyles: FontStyle[] = EnumUtils.getEnumValues(FontStyle);\n public labelAfterPathIsSameAsBeforeCheckbox: boolean;\n\n private syncCommercialLabelHeightWithTechnicalLabelHeightInPicksSubscription: RxjsSubscription;\n private readonly MAX_ALLOWED_FONT_SIZE_FROM_BACKEND = 1000;\n\n private currentSubscription: Subscription;\n\n public constructor(\n @Inject(AUTHENTICATION) private readonly authentication: Authentication,\n @Inject(ADD_PRODUCTION_SCHEDULE) private readonly addProductionSchedule: AddProductionSchedule,\n private readonly httpProductionOrderCustomSettings: HttpProductionOrdersCustomSettingsService,\n private readonly formBuilder: FormBuilder,\n private readonly translate: TranslateService,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n private readonly navigationService: NavigationHelperPrototypeService\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this.currentSubscription = this.authentication.getCurrentSubscription();\n this.labelAfterPathIsSameAsBeforeCheckbox = this.isPathLabelAfterSameAsPathLabelBefore();\n\n this.setFormFields();\n this.setFormValues();\n this.getPathLabelNameGenerationProperties();\n\n this.listenToNameGeneratorChanges();\n this.listenToPathLabelTypeChanges();\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if ('pathLabelInformation' in changes && !changes.pathLabelInformation.isFirstChange() && !isEqual(changes.pathLabelInformation.currentValue, changes.pathLabelInformation.previousValue)) {\n this.setFormValues();\n this.labelAfterPathIsSameAsBeforeCheckbox = this.isPathLabelAfterSameAsPathLabelBefore();\n }\n\n if ('machineQuality' in changes && !changes.machineQuality.isFirstChange()) {\n this.pathLabelsForm\n .get('technicalLabelHeightInPicks')\n .setValidators([\n Validators.required,\n isMultipleOfValidator(this.machineQuality.weaveStructure.picksPerColorLine),\n isMultipleOfValidator(this.machineQuality.weaveStructure.sendRepeat),\n Validators.min(this.machineQuality.weaveStructure.picksPerColorLine)\n ]);\n }\n\n if (\n ('machineQuality' in changes && !changes.machineQuality.isFirstChange()) ||\n ('factorForConversionFromPicksToMillimeters' in changes && !changes.factorForConversionFromPicksToMillimeters.isFirstChange()) ||\n ('factorForConversionFromMillimetersToPicks' in changes && !changes.factorForConversionFromMillimetersToPicks.isFirstChange())\n ) {\n this.syncCommercialLabelHeightWithTechnicalLabelHeightInPicks();\n }\n }\n\n private listenToNameGeneratorChanges(): void {\n const $nameGeneratorBefore = this.pathLabelsForm.controls.pathLabelBefore.controls.nameGenerator.valueChanges.pipe(startWith(this.pathLabelInformation?.pathLabelBefore?.nameGenerator));\n $nameGeneratorBefore.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe((nameGenerator: NameGenerator) => {\n if (!AssertionUtils.isNullOrUndefined(this.pathLabelInformation)) {\n this.pathLabelInformation.pathLabelBefore.nameGenerator = nameGenerator;\n }\n\n if (this.labelAfterPathIsSameAsBeforeCheckbox) {\n this.pathLabelsForm.controls.pathLabelAfter.controls.nameGenerator.setValue(nameGenerator);\n }\n });\n\n const $nameGeneratorAfter = this.pathLabelsForm.controls.pathLabelAfter.controls.nameGenerator.valueChanges.pipe(startWith(this.pathLabelInformation?.pathLabelAfter?.nameGenerator));\n $nameGeneratorAfter.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe((nameGenerator: NameGenerator) => {\n if (!AssertionUtils.isNullOrUndefined(this.pathLabelInformation)) {\n this.pathLabelInformation.pathLabelAfter.nameGenerator = nameGenerator;\n }\n });\n\n combineLatest([$nameGeneratorBefore, $nameGeneratorAfter])\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe(([nameGeneratorBefore, nameGeneratorAfter]: [NameGenerator, NameGenerator]) => {\n if (\n (AssertionUtils.isNullOrUndefined(nameGeneratorBefore) || nameGeneratorBefore.parts.length === 0) &&\n (AssertionUtils.isNullOrUndefined(nameGeneratorAfter) || nameGeneratorAfter.parts.length === 0)\n ) {\n this.pathLabelInformation = null;\n this.pathLabelsForm.disable({emitEvent: false});\n this.pathZoneLoaded.emit();\n }\n\n this.formValuesChanged.emit();\n this.pathLabelsForm.markAsDirty();\n this.updatePathLabelInformation();\n });\n }\n\n private listenToPathLabelTypeChanges(): void {\n const $pathLabelBeforeType = this.pathLabelsForm.controls.pathLabelBefore.controls.pathLabelType.valueChanges.pipe(startWith(this.pathLabelInformation?.pathLabelBefore?.pathLabelType));\n\n $pathLabelBeforeType.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe((pathLabelBeforeType: PathLabelType) => {\n if (this.labelAfterPathIsSameAsBeforeCheckbox) {\n this.pathLabelsForm.controls.pathLabelAfter.controls.pathLabelType.setValue(pathLabelBeforeType);\n }\n });\n\n combineLatest([$pathLabelBeforeType, this.pathLabelsForm.controls.pathLabelAfter.controls.pathLabelType.valueChanges.pipe(startWith(this.pathLabelInformation?.pathLabelAfter?.pathLabelType))])\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe(([pathLabelBeforeType, pathLabelAfterType]: [PathLabelType, PathLabelType]) => {\n if (\n (pathLabelBeforeType === PathLabelType.QR_CODE || AssertionUtils.isNullOrUndefined(pathLabelBeforeType)) &&\n (pathLabelAfterType === PathLabelType.QR_CODE || AssertionUtils.isNullOrUndefined(pathLabelAfterType))\n ) {\n this.pathLabelsForm.controls.labelFontFamily.disable();\n this.pathLabelsForm.controls.labelFontWeight.disable();\n this.pathLabelsForm.controls.labelFontStyle.disable();\n } else if (!this.areAllFieldsDisabled) {\n this.pathLabelsForm.controls.labelFontFamily.enable();\n this.pathLabelsForm.controls.labelFontWeight.enable();\n this.pathLabelsForm.controls.labelFontStyle.enable();\n }\n });\n }\n\n public getMultipleValue(): number {\n if (this.machineQuality.weaveStructure.sendRepeat !== this.machineQuality.weaveStructure.picksPerColorLine) {\n return this.machineQuality.weaveStructure.sendRepeat * this.machineQuality.weaveStructure.picksPerColorLine;\n } else {\n return this.machineQuality.weaveStructure.sendRepeat;\n }\n }\n\n public getPathLabelInformation(): PathLabelInformation {\n if (\n this.pathLabelsForm.disabled ||\n (AssertionUtils.isNullOrUndefined(this.pathLabelsForm.value.pathLabelBefore?.nameGenerator) && AssertionUtils.isNullOrUndefined(this.pathLabelsForm.value.pathLabelAfter?.nameGenerator))\n ) {\n return null;\n }\n\n return new PathLabelInformation(\n new PathLabelInformationForPart(this.pathLabelsForm.value.pathLabelBefore.nameGenerator, this.pathLabelsForm.value.pathLabelBefore.pathLabelType),\n new PathLabelInformationForPart(this.pathLabelsForm.value.pathLabelAfter.nameGenerator, this.pathLabelsForm.value.pathLabelAfter.pathLabelType),\n new FontSettings(this.pathLabelsForm.get('labelFontFamily').value, this.pathLabelsForm.get('labelFontWeight').value, this.pathLabelsForm.get('labelFontStyle').value),\n this.pathLabelsForm.get('commercialLabelHeightInMM').value,\n this.pathLabelsForm.get('technicalLabelHeightInPicks').value,\n this.pathLabelsForm.get('commercialLabelFontSize').value,\n this.pathLabelsForm.get('pattern').value\n );\n }\n\n public isPathLabelAfterSameAsPathLabelBefore(): boolean {\n return (\n this.pathLabelInformation?.pathLabelAfter?.pathLabelType === this.pathLabelInformation?.pathLabelBefore?.pathLabelType &&\n isEqual(this.pathLabelInformation?.pathLabelAfter?.nameGenerator?.parts, this.pathLabelInformation?.pathLabelBefore?.nameGenerator?.parts) &&\n this.pathLabelInformation?.pathLabelAfter?.nameGenerator?.separatorName === this.pathLabelInformation?.pathLabelBefore?.nameGenerator?.separatorName\n );\n }\n\n public shouldShowPathLabelAfterComponent(): boolean {\n return !this.labelAfterPathIsSameAsBeforeCheckbox || !this.isPathLabelAfterSameAsPathLabelBefore();\n }\n\n public onLabelAfterPathIsSameAsBeforeChange(matCheckboxChange: MatCheckboxChange): void {\n this.labelAfterPathIsSameAsBeforeCheckbox = matCheckboxChange.checked;\n if (this.labelAfterPathIsSameAsBeforeCheckbox) {\n this.setPathLabelAfterAsPathLabelBefore();\n this.updatePathLabelInformation();\n }\n }\n\n public onLabelBeforePathTypeChange(matRadioChange: MatRadioChange): void {\n this.pathLabelInformation.pathLabelBefore.pathLabelType = matRadioChange.value;\n\n if (this.labelAfterPathIsSameAsBeforeCheckbox) {\n this.setPathLabelAfterAsPathLabelBefore();\n }\n\n this.updatePathLabelInformation();\n }\n\n public hasChosenPattern(): boolean {\n return !isNil(this.pathLabelsForm.get('pattern').value);\n }\n\n public selectPattern(): void {\n this.dialogBuilderFactoryService\n .getBuilder()\n .openSelectGridDialog, Pattern>(SelectPatternComponent, {\n patternType: PatternType.JUTE_PATTERNS,\n patternTranslationKey: 'GENERAL.PATTERN.PATTERN',\n showPatternTypeFilter: true,\n allowPatternCreation: false,\n weaveStructureId: this.machineQuality.weaveStructure.id,\n machineQualityId: this.machineQuality.id,\n colorSetId: this.coloredYarnSet.overviewListColorSet.id\n })\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((pattern: Pattern | undefined) => {\n if (pattern !== undefined) {\n this.pathLabelsForm.controls.pattern.setValue(pattern);\n this.pathLabelInformation = this.getPathLabelInformation();\n }\n });\n }\n\n public getMaxAllowedFontSize(): number {\n const value = this.pathLabelsForm?.get('commercialLabelHeightInMM')?.value ? this.pathLabelsForm?.get('commercialLabelHeightInMM')?.value : 5;\n return value > this.MAX_ALLOWED_FONT_SIZE_FROM_BACKEND ? this.MAX_ALLOWED_FONT_SIZE_FROM_BACKEND : value;\n }\n\n public canShowMultipleError(): boolean {\n const errors = this.pathLabelsForm.get('technicalLabelHeightInPicks').errors;\n return errors?.multiple && !errors?.min;\n }\n\n public addPathLabels(): void {\n this.navigationService\n .navigateWithContentSwitcher({\n componentInfo: {\n component: PatternBuilderComponent\n },\n data: {\n nameGeneratorProperties: this.pathLabelNameGenerationProperties,\n nameGenerator: this.customSettings.pathLabel.nameGenerator\n } as PatternBuilderInput\n } as ContentSwitcherNavigationInput)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((nameGenerator: any) => {\n if (nameGenerator?.parts?.length > 0) {\n this.labelAfterPathIsSameAsBeforeCheckbox = true;\n this.pathLabelsForm.enable({emitEvent: false});\n\n this.pathLabelsForm.controls.pathLabelBefore.setValue(\n {\n pathLabelType: PathLabelType.TEXT,\n nameGenerator\n },\n {emitEvent: false}\n );\n this.pathLabelsForm.controls.pathLabelAfter.setValue(\n {\n pathLabelType: PathLabelType.TEXT,\n nameGenerator\n },\n {emitEvent: false}\n );\n\n if (!AssertionUtils.isNullOrUndefined(this.pathLabelInformation)) {\n this.pathLabelsForm.controls.labelFontFamily.setValue(fromReadableToEnumEntry(this.pathLabelInformation.fontSettings.fontFamily), {emitEvent: false});\n this.pathLabelsForm.controls.labelFontWeight.setValue(fromReadableToEnumEntry(this.pathLabelInformation.fontSettings.fontWeight), {emitEvent: false});\n this.pathLabelsForm.controls.labelFontStyle.setValue(fromReadableToEnumEntry(this.pathLabelInformation.fontSettings.fontStyle), {emitEvent: false});\n this.pathLabelsForm.controls.commercialLabelFontSize.setValue(this.pathLabelInformation.labelFontSizeInMM, {emitEvent: false});\n this.pathLabelsForm.controls.technicalLabelHeightInPicks.setValue(this.pathLabelInformation.labelHeightInPicks, {emitEvent: false});\n this.pathLabelsForm.controls.commercialLabelHeightInMM.setValue(this.pathLabelInformation.labelHeightInMM);\n this.pathLabelsForm.controls.pattern.setValue(this.pathLabelInformation.pattern);\n } else {\n this.pathLabelsForm.controls.labelFontFamily.setValue(this.customSettings.pathLabel.fontFamily, {emitEvent: false});\n this.pathLabelsForm.controls.labelFontWeight.setValue(this.customSettings.pathLabel.fontWeight, {emitEvent: false});\n this.pathLabelsForm.controls.labelFontStyle.setValue(this.customSettings.pathLabel.fontStyle, {emitEvent: false});\n this.pathLabelsForm.controls.commercialLabelHeightInMM.setValue(this.customSettings.pathLabel.heightInMM);\n this.pathLabelsForm.controls.commercialLabelFontSize.setValue(this.customSettings.pathLabel.fontSizeInMM, {emitEvent: false});\n this.pathLabelsForm.controls.pattern.setValue(null);\n }\n\n this.pathLabelsForm.markAllAsTouched();\n this.pathLabelInformation = this.getPathLabelInformation();\n }\n });\n }\n\n private setFormFields(): void {\n this.pathLabelsForm = this.formBuilder.group({\n technicalLabelHeightInPicks: this.formBuilder.control(null, [\n Validators.required,\n isMultipleOfValidator(this.machineQuality.weaveStructure.picksPerColorLine),\n isMultipleOfValidator(this.machineQuality.weaveStructure.sendRepeat),\n Validators.min(this.machineQuality.weaveStructure.picksPerColorLine)\n ]),\n commercialLabelFontSize: this.formBuilder.control(null, this.getValidatorsFontSize()),\n commercialLabelHeightInMM: this.formBuilder.control(null, [Validators.required, Validators.min(1)]),\n pathLabelBefore: this.formBuilder.group({\n pathLabelType: this.formBuilder.control(null),\n nameGenerator: this.formBuilder.control(null)\n }),\n pathLabelAfter: this.formBuilder.group({\n pathLabelType: this.formBuilder.control(null),\n nameGenerator: this.formBuilder.control(null)\n }),\n labelFontFamily: this.formBuilder.control(null, [Validators.required]),\n labelFontWeight: this.formBuilder.control(null, [Validators.required]),\n labelFontStyle: this.formBuilder.control(null, [Validators.required]),\n pattern: this.formBuilder.control(null, Validators.required)\n });\n\n if (this.areAllFieldsDisabled) {\n this.pathLabelsForm.disable();\n }\n\n this.syncCommercialLabelHeightWithTechnicalLabelHeightInPicks();\n }\n\n private getValidatorsFontSize(): ValidatorFn[] {\n return this.currentSubscription?.hasPermission(Permission.ACCESS_ALL)\n ? [Validators.required, Validators.min(1), (control: AbstractControl): ValidationErrors => Validators.max(this.getMaxAllowedFontSize())(control)]\n : [];\n }\n\n private setPathLabelAfterAsPathLabelBefore(): void {\n this.pathLabelInformation.pathLabelAfter = cloneDeep(this.pathLabelInformation.pathLabelBefore);\n this.pathLabelsForm.controls.pathLabelAfter.setValue(\n {\n pathLabelType: this.pathLabelInformation.pathLabelBefore.pathLabelType,\n nameGenerator: this.pathLabelInformation.pathLabelBefore.nameGenerator\n },\n {emitEvent: false}\n );\n }\n\n private getPathLabelNameGenerationProperties(): void {\n this.httpProductionOrderCustomSettings\n .getPathLabelNameGenerationProperties()\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((nameGenerationProperties: NameGeneratorProperty[]) => {\n this.pathLabelNameGenerationProperties = nameGenerationProperties;\n });\n }\n\n private updatePathLabelInformation(): void {\n this.pathLabelInformationChange.emit(this.pathLabelInformation);\n }\n\n private setFormValues(): void {\n if (!AssertionUtils.isNullOrUndefined(this.pathLabelInformation)) {\n this.pathLabelsForm.reset({\n technicalLabelHeightInPicks: this.pathLabelInformation.labelHeightInPicks,\n commercialLabelHeightInMM: this.pathLabelInformation.labelHeightInMM,\n commercialLabelFontSize: this.getFontSizeValue(),\n pathLabelBefore: {\n pathLabelType: this.pathLabelInformation.pathLabelBefore?.pathLabelType,\n nameGenerator: this.pathLabelInformation.pathLabelBefore?.nameGenerator\n },\n pathLabelAfter: {\n pathLabelType: this.pathLabelInformation.pathLabelAfter?.pathLabelType,\n nameGenerator: this.pathLabelInformation.pathLabelAfter?.nameGenerator\n },\n labelFontFamily: fromReadableToEnumEntry(this.pathLabelInformation.fontSettings?.fontFamily),\n labelFontWeight: fromReadableToEnumEntry(this.pathLabelInformation.fontSettings?.fontWeight),\n labelFontStyle: fromReadableToEnumEntry(this.pathLabelInformation.fontSettings?.fontStyle),\n pattern: this.pathLabelInformation.pattern\n });\n\n const pathLabelInformation = this.getPathLabelInformation();\n this.pathLabelsForm.valueChanges.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe(() => {\n this.updatePathLabelInformation();\n\n if (!ObjectUtils.isDeepEqual(pathLabelInformation, this.getPathLabelInformation())) {\n this.addProductionSchedule.notifyChangesToInitialPreparationsForm(true);\n }\n });\n }\n }\n\n private getFontSizeValue(): number {\n const value = this.pathLabelInformation?.labelFontSizeInMM ?? this.customSettings?.pathLabel.fontSizeInMM;\n return value > this.MAX_ALLOWED_FONT_SIZE_FROM_BACKEND ? this.MAX_ALLOWED_FONT_SIZE_FROM_BACKEND : value;\n }\n\n private syncCommercialLabelHeightWithTechnicalLabelHeightInPicks(): void {\n this.syncCommercialLabelHeightWithTechnicalLabelHeightInPicksSubscription?.unsubscribe();\n\n this.syncCommercialLabelHeightWithTechnicalLabelHeightInPicksSubscription = FormValueHelper.syncValuesOfFormFieldsByFactor(\n this.pathLabelsForm.get('commercialLabelHeightInMM'),\n this.pathLabelsForm.get('technicalLabelHeightInPicks'),\n this.factorForConversionFromMillimetersToPicks,\n this.factorForConversionFromPicksToMillimeters,\n this.machineQuality.weaveStructure.picksPerColorLine ?? null\n )\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe(() => {\n this.pathLabelsForm.get('commercialLabelFontSize').markAsTouched();\n this.pathLabelsForm.get('commercialLabelFontSize').updateValueAndValidity();\n });\n }\n}\n","import {Component, Input, OnChanges, OnInit, SimpleChanges} from '@angular/core';\nimport {FormBuilder, FormControl, FormGroup} from '@angular/forms';\nimport {MachineQualityForProductionSchedule} from '@domain/production-schedule/machine-quality-for-production-schedule';\nimport {GeneralJuteSettings} from '@domain/textile-data/machine-quality/general-jute-settings';\nimport {AssertionUtils, BaseComponent, TranslateService} from '@vdw/angular-component-library';\n\n@Component({\n selector: 'app-production-schedule-quality-linked-settings',\n templateUrl: './production-schedule-quality-linked-settings.component.html'\n})\nexport class ProductionScheduleQualityLinkedSettingsComponent extends BaseComponent implements OnInit, OnChanges {\n @Input() public isAddingProductionOrder: boolean;\n @Input() public juteGeneralSettings: GeneralJuteSettings;\n @Input() public machineQuality: MachineQualityForProductionSchedule;\n @Input() public areAllFieldsDisabled: boolean = false;\n\n public qualityLinkedSettingsForm: FormGroup<{\n repeatLastDesignToEndOfPath: FormControl;\n addJuteSoPathsHaveEqualHeight: FormControl;\n addAdditionalSidePattern: FormControl;\n addConditionalDesigns: FormControl;\n }>;\n\n public constructor(\n private readonly formBuilder: FormBuilder,\n private readonly translate: TranslateService\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this.setFormFields();\n this.setFormValues();\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (('juteGeneralSettings' in changes && !changes.juteGeneralSettings.isFirstChange()) || ('machineQuality' in changes && !changes.machineQuality.isFirstChange())) {\n this.setFormFields();\n this.setFormValues();\n }\n }\n\n public getGeneralJuteSettings(): GeneralJuteSettings {\n const repeatLastDesignToEndOfPath: boolean = this.qualityLinkedSettingsForm.get('repeatLastDesignToEndOfPath').value;\n const addJuteSoPathsHaveEqualHeight: boolean = this.qualityLinkedSettingsForm.get('addJuteSoPathsHaveEqualHeight').value;\n const addAdditionalSidePattern: boolean = this.qualityLinkedSettingsForm.get('addAdditionalSidePattern').value;\n const addConditionalDesigns: boolean = this.qualityLinkedSettingsForm.get('addConditionalDesigns').value;\n\n return {\n ...this.juteGeneralSettings,\n repeatLastDesignToEndOfPath: repeatLastDesignToEndOfPath,\n addJuteSoPathsHaveEqualHeight: addJuteSoPathsHaveEqualHeight,\n borderIndexColorToggle: addAdditionalSidePattern,\n addConditionalDesigns: addConditionalDesigns\n } as GeneralJuteSettings;\n }\n\n private setFormFields(): void {\n const hasJuteGeneralSettingsOnProductionOrder = !AssertionUtils.isNullOrUndefined(this.juteGeneralSettings);\n const hasJuteGeneralSettingsOnMachineQuality = !AssertionUtils.isNullOrUndefined(this.machineQuality.juteGeneralSettings);\n\n const addAdditionalSidePatternControl = this.formBuilder.control(false);\n const addJuteSoPathsHaveEqualHeightControl = this.formBuilder.control(false);\n const addConditionalDesignsControl = this.formBuilder.control(false);\n\n if (!this.getAddAdditionalSidePattern(hasJuteGeneralSettingsOnProductionOrder, hasJuteGeneralSettingsOnMachineQuality)) {\n addAdditionalSidePatternControl.disable();\n }\n\n if (!this.getAddJuteSoPathsHaveEqualHeight(hasJuteGeneralSettingsOnProductionOrder, hasJuteGeneralSettingsOnMachineQuality)) {\n addJuteSoPathsHaveEqualHeightControl.disable();\n }\n\n if (!this.getAddConditionalDesigns(hasJuteGeneralSettingsOnProductionOrder, hasJuteGeneralSettingsOnMachineQuality)) {\n addConditionalDesignsControl.disable();\n }\n\n this.qualityLinkedSettingsForm = this.formBuilder.group({\n repeatLastDesignToEndOfPath: this.formBuilder.control(false),\n addJuteSoPathsHaveEqualHeight: addJuteSoPathsHaveEqualHeightControl,\n addAdditionalSidePattern: addAdditionalSidePatternControl,\n addConditionalDesigns: addConditionalDesignsControl\n });\n\n if (this.areAllFieldsDisabled) {\n this.qualityLinkedSettingsForm.disable();\n }\n }\n\n private setFormValues(): void {\n const hasJuteGeneralSettingsOnProductionOrder = !AssertionUtils.isNullOrUndefined(this.juteGeneralSettings);\n const hasJuteGeneralSettingsOnMachineQuality = !AssertionUtils.isNullOrUndefined(this.machineQuality.juteGeneralSettings);\n\n this.qualityLinkedSettingsForm.reset({\n repeatLastDesignToEndOfPath: this.getRepeatLastDesignToEndOfPath(hasJuteGeneralSettingsOnProductionOrder, hasJuteGeneralSettingsOnMachineQuality),\n addJuteSoPathsHaveEqualHeight: this.getAddJuteSoPathsHaveEqualHeight(hasJuteGeneralSettingsOnProductionOrder, hasJuteGeneralSettingsOnMachineQuality),\n addAdditionalSidePattern: this.getAddAdditionalSidePattern(hasJuteGeneralSettingsOnProductionOrder, hasJuteGeneralSettingsOnMachineQuality),\n addConditionalDesigns: this.getAddConditionalDesigns(hasJuteGeneralSettingsOnProductionOrder, hasJuteGeneralSettingsOnMachineQuality)\n });\n }\n\n private getRepeatLastDesignToEndOfPath(hasJuteGeneralSettingsOnProductionOrder: boolean, hasJuteGeneralSettingsOnMachineQuality: boolean): boolean {\n if (hasJuteGeneralSettingsOnProductionOrder) {\n return this.juteGeneralSettings.repeatLastDesignToEndOfPath;\n } else if (hasJuteGeneralSettingsOnMachineQuality) {\n return this.machineQuality.juteGeneralSettings.repeatLastDesignToEndOfPath;\n } else {\n return false;\n }\n }\n\n private getAddJuteSoPathsHaveEqualHeight(hasJuteGeneralSettingsOnProductionOrder: boolean, hasJuteGeneralSettingsOnMachineQuality: boolean): boolean {\n if (hasJuteGeneralSettingsOnProductionOrder) {\n return this.juteGeneralSettings.addJuteSoPathsHaveEqualHeight;\n } else if (hasJuteGeneralSettingsOnMachineQuality) {\n return this.machineQuality.juteGeneralSettings.addJuteSoPathsHaveEqualHeight;\n } else {\n return false;\n }\n }\n\n private getAddAdditionalSidePattern(hasJuteGeneralSettingsOnProductionOrder: boolean, hasJuteGeneralSettingsOnMachineQuality: boolean): boolean {\n if (hasJuteGeneralSettingsOnProductionOrder) {\n return this.juteGeneralSettings.borderIndexColorToggle;\n } else if (hasJuteGeneralSettingsOnMachineQuality) {\n return this.machineQuality.juteGeneralSettings.borderIndexColorToggle;\n } else {\n return false;\n }\n }\n\n private getAddConditionalDesigns(hasJuteGeneralSettingsOnProductionOrder: boolean, hasJuteGeneralSettingsOnMachineQuality: boolean): boolean {\n if (this.isAddingProductionOrder && !hasJuteGeneralSettingsOnProductionOrder) {\n return this.machineQuality.juteConditions.length > 0;\n } else {\n let result = false;\n if (hasJuteGeneralSettingsOnProductionOrder) {\n result = this.juteGeneralSettings.addConditionalDesigns;\n } else if (hasJuteGeneralSettingsOnMachineQuality) {\n result = this.machineQuality.juteGeneralSettings.addConditionalDesigns ?? this.machineQuality.juteConditions.length > 0;\n }\n return result;\n }\n }\n}\n","
\n
\n

\n {{ 'PRODUCTION_ORDER.CUSTOM_SETTINGS.QUALITY_LINKED_SETTINGS.TITLE' | bmsTranslate }}\n

\n
\n
\n {{ 'PRODUCTION_ORDER.CUSTOM_SETTINGS.QUALITY_LINKED_SETTINGS.FILL_PATH_DIFFERENCE' | bmsTranslate }}\n
\n {{ 'TEXTILE_DATA.MACHINE_QUALITY.JUTE_CONDITIONS.REPEAT_LAST_DESIGN' | bmsTranslate }}\n {{ 'TEXTILE_DATA.MACHINE_QUALITY.JUTE_CONDITIONS.JUTE' | bmsTranslate }}\n
\n
\n
\n \n {{ 'GENERAL.ACTIONS.ADD' | bmsTranslate }} {{ 'TEXTILE_DATA.MACHINE_QUALITY.JUTE_CONDITIONS.ADDITIONAL_SIDE_PATTERN' | bmsTranslate }}\n \n {{ 'GENERAL.ACTIONS.ADD' | bmsTranslate }} {{ 'TEXTILE_DATA.MACHINE_QUALITY.JUTE_CONDITIONS.TITLE' | bmsTranslate }} \n
\n
\n
\n
\n","
\n \n
\n \n \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 {RouteUtils} from '@application/helper/routing/route-utils';\nimport {SelectListProductConfiguration} from '@domain/product-configuration/select-list-product-configuration';\nimport {SelectListProductConfigurationVersionHistory} from '@domain/product-configuration/select-list-product-configuration-version-history';\nimport {WeaveStructure} from '@domain/textile-data/weave-structure/weave-structure';\nimport {PRODUCT_CONFIGURATIONS, ProductConfigurations} from '@infrastructure/http/product-configuration/product-configuration.interface';\nimport {GridProductionStatusComponent} from '@presentation/components/grid-production-status/grid-production-status.component';\nimport {NavigationMachineOverviewData} from '@presentation/pages/machine-overview/navigation-machine-overview-data.interface';\nimport {\n BaseComponent,\n ColDefBuilderFactoryService,\n DateTimeFormat,\n DateTimePipe,\n DialogComponentData,\n GridOptionsBuilderFactoryService,\n SelectGridDialog,\n StringUtils,\n TranslateService\n} from '@vdw/angular-component-library';\nimport {AgGridAngular} from 'ag-grid-angular';\nimport {ColDef, FirstDataRenderedEvent, GetQuickFilterTextParams, GridApi, GridOptions, GridReadyEvent, RowDoubleClickedEvent, RowSelectedEvent, ValueGetterParams} from 'ag-grid-community';\nimport {takeUntil} from 'rxjs/operators';\n\n@Component({\n selector: 'app-select-product-configuration',\n templateUrl: './select-product-configuration.component.html',\n styleUrls: ['./select-product-configuration.component.scss']\n})\nexport class SelectProductConfigurationComponent extends BaseComponent implements OnInit, AfterViewInit, SelectGridDialog {\n @ViewChild('productConfigurationsGrid') public productConfigurationsGrid: AgGridAngular;\n @ViewChild('productConfigurationVersionsHistoryGrid') public productConfigurationVersionsHistoryGrid: AgGridAngular;\n public listOfGridOptions: GridOptions[];\n public listOfGridApis: GridApi[];\n public listOfProductConfigurations: SelectListProductConfiguration[];\n public isSelectingSpecificVersion = false;\n public selectedProductConfiguration: SelectListProductConfiguration;\n\n private machineId: number;\n\n public constructor(\n @Inject(MAT_DIALOG_DATA) {machineId}: {machineId: number},\n @Inject(PRODUCT_CONFIGURATIONS) private readonly productConfigurations: ProductConfigurations,\n private readonly translateService: TranslateService,\n private readonly gridOptionsBuilderFactory: GridOptionsBuilderFactoryService,\n private readonly colDefBuilderFactoryService: ColDefBuilderFactoryService,\n private readonly matDialogRef: MatDialogRef,\n private readonly navigationHelperService: NavigationHelperService>,\n private readonly dateTimePipe: DateTimePipe\n ) {\n super();\n this.machineId = machineId;\n }\n\n public get gridOptionsForProductConfiguration(): GridOptions {\n return this.listOfGridOptions[0];\n }\n\n public get gridOptionsForProductConfigurationVersionHistory(): GridOptions {\n return this.listOfGridOptions[1];\n }\n\n public ngOnInit(): void {\n this.initializeGridOptions();\n\n this.productConfigurations\n .getPossibleProductConfigurationsForMachine(this.machineId)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((productConfigurations: SelectListProductConfiguration[]) => {\n this.listOfProductConfigurations = productConfigurations;\n });\n }\n\n public ngAfterViewInit(): void {\n this.listOfGridApis = [this.productConfigurationsGrid?.api, this.productConfigurationVersionsHistoryGrid?.api];\n }\n\n public onNavigationHelperDestroy(): void {\n this.navigationHelperService.savePartialState>({dialogComponent: SelectProductConfigurationComponent});\n }\n\n public getTitle(): string {\n return this.isSelectingSpecificVersion\n ? this.translateService.instant('PRODUCTION_ORDER.SELECT_PRODUCT_CONFIGURATION.SELECT_VERSION_OF', {name: this.selectedProductConfiguration.name})\n : this.translateService.instant('GENERAL.ACTIONS.SELECT_OBJECT', {object: this.translateService.instant('PRODUCT_CONFIGURATION.PRODUCT_CONFIGURATION', {count: 1}).toLowerCase()});\n }\n\n public selectProductConfiguration(): void {\n let version = null;\n\n if (this.productConfigurationVersionsHistoryGrid?.api) {\n version = this.productConfigurationVersionsHistoryGrid.api.getSelectedRows()[0].version;\n } else {\n version =\n this.selectedProductConfiguration.versionHistories.find((versionHistory: SelectListProductConfigurationVersionHistory) => versionHistory.readyForProduction)?.version ??\n this.selectedProductConfiguration.versionHistories[0].version;\n }\n\n this.matDialogRef.close({productConfiguration: this.selectedProductConfiguration, version});\n }\n\n public selectSpecificVersion(): void {\n this.isSelectingSpecificVersion = true;\n }\n\n public cancelSpecificVersionSelection(): void {\n this.isSelectingSpecificVersion = false;\n }\n\n public navigateToAddProductConfiguration(): void {\n this.navigationHelperService.navigateToNextRouteWithPartialState({equipmentId: this.machineId} as NavigationMachineOverviewData, RouteUtils.paths.texEdit.addProductConfiguration.absolutePath);\n }\n\n private initializeGridOptions(): void {\n this.listOfGridOptions = [\n this.gridOptionsBuilderFactory\n .getBuilder(this.getColumnDefsForProductConfiguration(), GridIdentifier.SELECT_PRODUCT_CONFIGURATION)\n .withColumnMenu()\n .withOnFirstDataRendered(({api}: FirstDataRenderedEvent) => {\n if (this.selectedProductConfiguration) {\n api.getRowNode(`${this.selectedProductConfiguration.id}`)?.setSelected(true);\n }\n })\n .withOnRowSelected(({node}: RowSelectedEvent) => {\n this.selectedProductConfiguration = node?.data;\n })\n .withOnRowDoubleClicked((event: RowDoubleClickedEvent) => {\n event.node.setSelected(true);\n this.selectProductConfiguration();\n })\n .withLoadingOverlay({scale: 0.7})\n .withNoRowsOverlay({\n titleParam: 'PRODUCT_CONFIGURATION.PRODUCT_CONFIGURATION',\n hideDescription: true,\n isAnyFilterPresent: () => this.productConfigurationsGrid?.api?.isAnyFilterPresent(),\n scale: 0.7\n })\n .build(),\n this.gridOptionsBuilderFactory\n .getBuilder(this.getColumnDefsForProductConfigurationVersionHistory(), GridIdentifier.SELECT_PRODUCT_CONFIGURATION_VERSION_HISTORY)\n .withColumnMenu()\n .withOnGridReady(({api}: GridReadyEvent) => {\n const versionHistories = this.selectedProductConfiguration.versionHistories;\n\n let versionHistoryToSelectIndex = versionHistories.findIndex((versionHistory: SelectListProductConfigurationVersionHistory) => versionHistory.readyForProduction);\n\n versionHistoryToSelectIndex = versionHistoryToSelectIndex === -1 ? 0 : versionHistoryToSelectIndex;\n\n api.getRowNode(`${versionHistoryToSelectIndex}`).setSelected(true);\n })\n .withNoRowsOverlay({\n isAnyFilterPresent: () => this.productConfigurationVersionsHistoryGrid?.api?.isAnyFilterPresent(),\n scale: 0.7\n })\n .withoutGetRowId()\n .build()\n ];\n }\n\n private getColumnDefsForProductConfiguration(): ColDef[] {\n return [\n this.colDefBuilderFactoryService.getBuilder().withField('name').withHeaderName('GENERAL.NAME').withComparator(StringUtils.stringComparator).build(),\n this.colDefBuilderFactoryService.getBuilder().withField('machine.name', true).withHeaderName('MACHINE.MACHINE').withComparator(StringUtils.stringComparator).build(),\n this.colDefBuilderFactoryService.getBuilder().withField('weaveQuality.name').withHeaderName('TEXTILE_DATA.MACHINE_QUALITY.MACHINE_QUALITY').withComparator(StringUtils.stringComparator).build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withField('weaveQuality.weaveStructureName')\n .withHeaderName('TEXTILE_DATA.WEAVE_STRUCTURE.WEAVE_STRUCTURE')\n .withComparator(StringUtils.stringComparator)\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withField('readyForProduction')\n .withHeaderName('GENERAL.STATUS')\n .withCellRenderer(GridProductionStatusComponent)\n .withoutFilter()\n .withSortable()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withField('helpWeaveStructures')\n .withHeaderName('PRODUCT_CONFIGURATION.HELP_WEAVE_STRUCTURE')\n .withValueGetter((params: ValueGetterParams) => params.data.helpWeaveStructures.map((helpWeaveStructure: WeaveStructure) => helpWeaveStructure.name).join(', '), true)\n .withFilterValueGetter((params: ValueGetterParams) =>\n params.data.helpWeaveStructures.length > 0 ? params.data.helpWeaveStructures.map((helpWeaveStructure: WeaveStructure) => helpWeaveStructure.name) : null\n )\n .withComparator(StringUtils.stringComparator)\n .withHide()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withHeaderName('DESIGN_LIBRARY.DESIGN', 2, true)\n .withValueGetter((params: ValueGetterParams) => params.data.designs.length, true)\n .withRightAlignment()\n .withSortable(false)\n .withoutFilter()\n .build(),\n this.colDefBuilderFactoryService.getBuilder().withField('description', true).withHeaderName('GENERAL.DESCRIPTION').withComparator(StringUtils.stringComparator).build(),\n this.colDefBuilderFactoryService.getBuilder().withField('dateModified').withHeaderName('GENERAL.DATETIME.DATE').withDate().withDateMultiFilter().build(),\n this.colDefBuilderFactoryService.getBuilder().withField('colorSet.name', true).withHeaderName('TEXTILE_DATA.COLOR_SET.COLOR_SET').withHide().withComparator(StringUtils.stringComparator).build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withField('weftColorSet.name', true)\n .withHeaderName('PRODUCT_CONFIGURATION.WEFT_COLOR_SET')\n .withHide()\n .withComparator(StringUtils.stringComparator)\n .build()\n ];\n }\n\n private getColumnDefsForProductConfigurationVersionHistory(): ColDef[] {\n return [\n this.colDefBuilderFactoryService\n .getBuilder()\n .withField('dateModified')\n .withHeaderName('PRODUCTION_ORDER_LITE.VERSION_HISTORY.DATE_TIME')\n .withDate()\n .withGetQuickFilterText((params: GetQuickFilterTextParams) => this.dateTimePipe.transform(params.data.dateModified, DateTimeFormat.DATETIME_SHORT))\n .build(),\n this.colDefBuilderFactoryService.getBuilder().withField('version').withHeaderName('GENERAL.VERSION').withRightAlignment().build(),\n this.colDefBuilderFactoryService.getBuilder().withField('changes').withHeaderName('PRODUCTION_ORDER_LITE.VERSION_HISTORY.CHANGES').withComparator(StringUtils.stringComparator).build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withField('additionalInformation')\n .withHeaderName('PRODUCTION_ORDER_LITE.VERSION_HISTORY.ADDITIONAL_INFORMATION')\n .withComparator(StringUtils.stringComparator)\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withField('readyForProduction')\n .withHeaderName('GENERAL.STATUS')\n .withCellRenderer(GridProductionStatusComponent)\n .withGetQuickFilterText(() => '')\n .build()\n ];\n }\n}\n","
\n
\n
\n \n \n \n

{{ 'GENERAL.ACTIONS.CREATE_OBJECT' | bmsTranslate: {object: 'PRODUCTION_ORDER.PRODUCTION_ORDER' | bmsTranslate: {count: 1} | lowercase} }}

\n
\n
\n \n
\n
\n \n
\n
\n
\n \n {{ 'GENERAL.NAME' | bmsTranslate }}\n \n \n \n {{ 'GENERAL.ACTIONS.APPLY' | bmsTranslate }}\n \n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n {{ 'GENERAL.ERRORS.NAME_DUPLICATE' | bmsTranslate }}\n \n \n {{ 'GENERAL.ERRORS.LENGTH_LIMIT' | bmsTranslate: {max: '24'} }}\n \n \n\n \n \n \n
\n\n
\n \n \n {{ 'MACHINE.MACHINE' | bmsTranslate: {count: 1} | bmsTranslate }}\n \n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n \n
\n \n \n \n
\n\n \n
\n \n
\n
\n
\n
\n \n {{ 'PRODUCT_CONFIGURATION.PRODUCT_CONFIGURATION' | bmsTranslate: {count: 1} }}\n \n \n {{ 'GENERAL.ERRORS.NO_OBJECT_CHOSEN' | bmsTranslate: {object: 'MACHINE.MACHINE' | bmsTranslate: {count: 1} | lowercase} }}\n \n
\n\n \n \n {{ 'PRODUCT_CONFIGURATION.PRODUCT_CONFIGURATION' | bmsTranslate: {count: 1} | bmsTranslate\n }}({{ 'GENERAL.OPTIONAL' | bmsTranslate | lowercase }})\n \n \n \n
\n
\n\n
\n
\n
\n \n {{ 'TEXTILE_DATA.MACHINE_QUALITY.MACHINE_QUALITY' | bmsTranslate: {count: 1} }}\n \n \n {{ 'GENERAL.ERRORS.NO_OBJECT_CHOSEN' | bmsTranslate: {object: 'MACHINE.MACHINE' | bmsTranslate: {count: 1} | lowercase} }}\n \n
\n\n \n {{ 'TEXTILE_DATA.MACHINE_QUALITY.MACHINE_QUALITY' | bmsTranslate: {count: 1} | bmsTranslate }}\n \n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n
\n
\n
\n
\n\n \n \n \n\n \n \n \n\n
\n
\n \n {{ 'TEXTILE_DATA.MACHINE_QUALITY.PRACTICALPICKDENSITY' | bmsTranslate }}\n \n \n {{ 'GENERAL.ERRORS.NO_OBJECT_CHOSEN' | bmsTranslate: {object: 'MACHINE.MACHINE' | bmsTranslate: {count: 1} | lowercase} }}\n \n
\n \n {{ 'TEXTILE_DATA.MACHINE_QUALITY.PRACTICALPICKDENSITY' | bmsTranslate }}\n \n \n {{ 'GENERAL.UNIT.' + getDefaultParameterForPropertyNameOfMachineQualitySettings('pickDensityUnit').propertyValue | bmsTranslate }}\n \n \n {{ 'GENERAL.ERRORS.MIN_VALUE' | bmsTranslate: {min: '1'} }}\n \n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n
\n\n
\n \n {{ 'TEXTILE_DATA.COLORED_YARN_SET.COLORED_YARN_SET' | bmsTranslate: {count: 1} }}\n \n \n {{ 'GENERAL.ERRORS.NO_OBJECT_CHOSEN' | bmsTranslate: {object: 'MACHINE.MACHINE' | bmsTranslate: {count: 1} | lowercase} }}\n \n
\n
\n\n
\n
\n
\n
\n
\n \n
\n
\n
\n

\n {{ 'TEXTILE_DATA.COLORED_YARN_SET.COLORED_YARN_SET' | bmsTranslate: {count: 2} }}\n

\n
\n \n
\n
\n
\n \n
\n \n {{ productionScheduleColoredYarnSet.coloredYarnSet?.name }}\n \n \n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n \n \n {{ 'PRODUCTION_ORDER.WARNINGS.NO_POSSIBLE_MATCHES_WITH_CURRENT_MACHINE' | bmsTranslate }}\n
\n\n \n \n \n \n
\n \n\n
\n
\n
\n \n \n \n

\n \n {{ 'PRODUCTION_ORDER.CUSTOM_SETTINGS.PATH_LABELS_AND_JUTE' | bmsTranslate: {count: 2} }}\n \n \n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.JUTE.JUTE' | bmsTranslate }}\n \n

\n
\n
\n \n \n
\n \n
\n
\n
\n \n \n
\n
\n
\n
\n
\n
\n\n \n
\n
\n
\n \n \n \n

\n {{ 'SETTINGS.MENU_NAME' | bmsTranslate }}\n

\n
\n
\n \n
\n \n {{ 'PRODUCTION_ORDER.CUSTOM_SETTINGS.ADD_ON_PLANNING_BOARD' | bmsTranslate }}\n \n \n \n
\n
\n
\n
\n
\n
\n
\n
\n\n","import {DOCUMENT} from '@angular/common';\nimport {ChangeDetectorRef, Component, EventEmitter, Inject, Input, OnInit, Output, ViewChild} from '@angular/core';\nimport {FormGroup} from '@angular/forms';\nimport {ActivatedRoute, Router} from '@angular/router';\nimport {NavigationFunctionData} from '@application/helper/navigation-helper/navigation-function-data.interface';\nimport {NavigationHelperService} from '@application/helper/navigation-helper/navigation-helper.service';\nimport {NavigationNewItemData} from '@application/helper/navigation-helper/navigation-new-item-data.interface';\nimport {RouteUtils} from '@application/helper/routing/route-utils';\nimport {SourceElementUtils} from '@application/helper/source-element-utils';\nimport {StringUtils} from '@application/helper/string-utils';\nimport {getMappedColoredYarnSet} from '@application/helper/textile-data/colored-yarn-set/get-mapped-colored-yarn-set';\nimport {NavigationHistoryService} from '@application/navigation-history/navigation-history.service';\nimport {AsyncUniqueValidator} from '@application/validators/async-unique-validator';\nimport {Equipment} from '@domain/machine/equipment';\nimport {MachineType} from '@domain/machine/machine-type.enum';\nimport {PositionOfDialog} from '@domain/position-of-dialog';\nimport {ProductConfiguration} from '@domain/product-configuration/product-configuration';\nimport {SelectListProductConfiguration} from '@domain/product-configuration/select-list-product-configuration';\nimport {SelectListProductConfigurationVersionHistory} from '@domain/product-configuration/select-list-product-configuration-version-history';\nimport {VersionHistory} from '@domain/product-configuration/version-history';\nimport {BmpProductionScheduleItemInPathGroup} from '@domain/production-schedule/bmp-production-schedule-item-in-path-group';\nimport {CreelForProductionSchedule} from '@domain/production-schedule/creel-for-production-schedule';\nimport {ProductionOrderCustomSettings} from '@domain/production-schedule/custom-settings/production-order-custom-settings';\nimport {DrawingType} from '@domain/production-schedule/drawing-type.enum';\nimport {FinishingForProductionSchedule} from '@domain/production-schedule/finishing-for-production-schedule';\nimport {InitialOptionsForProductionOrder} from '@domain/production-schedule/initial-options-for-production-order';\nimport {InitialPathLabel} from '@domain/production-schedule/initial-path-label';\nimport {MachineQualityForProductionSchedule} from '@domain/production-schedule/machine-quality-for-production-schedule';\nimport {MachineSummary} from '@domain/production-schedule/machine-summary';\nimport {PathLabelInformation} from '@domain/production-schedule/path-label-information';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {ProductionScheduleProductConfiguration} from '@domain/production-schedule/production-schedule-product-configuration';\nimport {InitialRestZone} from '@domain/production-schedule/rest-zone/initial-rest-zone';\nimport {Permission} from '@domain/profile/permission.enum';\nimport {Subscription as ProfileSubscription} from '@domain/profile/subscription';\nimport {PropertyValue} from '@domain/property-value';\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 {CarpetWeaveQuality} from '@domain/textile-data/machine-quality/carpet-weave-quality';\nimport {PathWidth} from '@domain/textile-data/machine-quality/path-width';\nimport {WeaveQuality} from '@domain/textile-data/machine-quality/weave-quality';\nimport {AUTHENTICATION, Authentication} from '@infrastructure/http/authentication/authentication';\nimport {CREELS, Creels} from '@infrastructure/http/creel/creels';\nimport {MACHINE_QUALITIES, MachineQualities} from '@infrastructure/http/machine-quality/machine-qualities';\nimport {MACHINES, Machines} from '@infrastructure/http/machine/machines.interface';\nimport {HttpPlanningPrototypeService} from '@infrastructure/http/planning-prototype/http-planning-prototype.service';\nimport {PLANNING, Planning} from '@infrastructure/http/planning/planning';\nimport {PRODUCT_CONFIGURATIONS, ProductConfigurations} from '@infrastructure/http/product-configuration/product-configuration.interface';\nimport {HttpProductionOrdersCustomSettingsService} from '@infrastructure/http/production-order-custom-settings/http-production-orders-custom-settings.service';\nimport {PRODUCTION_ORDERS, ProductionOrders} from '@infrastructure/http/production-order/production-orders';\nimport {PRODUCTION_SCHEDULES, ProductionSchedules} from '@infrastructure/http/production-schedule/production-schedules';\nimport {RepositionDialogComponent} from '@presentation/components/reposition-dialog/reposition-dialog.component';\nimport {SelectCreelComponent} from '@presentation/components/select-creel/select-creel.component';\nimport {SelectFinishingComponent} from '@presentation/components/select-finishing/select-finishing.component';\nimport {SelectMachineQualityComponent} from '@presentation/components/select-machine-quality/select-machine-quality.component';\nimport {AddProductionSchedule} from '@presentation/pages/texfab/production-schedule/add/add-production-schedule';\nimport {ADD_PRODUCTION_SCHEDULE} from '@presentation/pages/texfab/production-schedule/add/add-production-schedule.service';\nimport {PRODUCTION_SCHEDULE_PLAN, ProductionSchedulePlan} from '@presentation/pages/texfab/production-schedule/add/plan/production-schedule-plan';\nimport {OverviewListColoredYarnSet} from '@presentation/pages/textile-data/colored-yarn-set/overview/overview-list-colored-yarn-set';\nimport {OverviewListCreel} from '@presentation/pages/textile-data/creel/overview/overview-list-creel';\nimport {OverviewListMachineQuality} from '@presentation/pages/textile-data/machine-quality/overview/overview-list-machine-quality';\nimport {WeaveQualityType} from '@presentation/pages/textile-data/machine-quality/overview/weave-quality-type.enum';\nimport {TextileDataDetailComponent} from '@presentation/pages/textile-data/textile-data-detail/textile-data-detail.component';\nimport {\n AgGridRowSelection,\n AssertionUtils,\n DialogBuilderFactoryService,\n DialogComponentData,\n FormValidationHelper,\n ObjectUtils,\n TranslateService,\n Unit,\n canShowErrorForErrorCodeAndFormControlForFormGroup,\n convertUnit,\n skeletonViewAnimation\n} from '@vdw/angular-component-library';\nimport {cloneDeep} from 'lodash-es';\nimport {EMPTY, Observable, Subscription, forkJoin, of} from 'rxjs';\nimport {debounceTime, distinctUntilChanged, map, switchMap, takeUntil, tap} from 'rxjs/operators';\nimport {ProductionScheduleData} from '../add-production-schedule-navigation-data.type';\nimport {BaseAddProductionSchedulePageComponent, ProductionScheduleInitialPreparationsFormGroup} from '../base-add-production-schedule-page.component';\nimport {ProductionScheduleInitialPreparationsAdditionalOptionsComponent} from '../initial-preparations-new/additional-options/production-schedule-initial-preparations-additional-options.component';\nimport {ProductionScheduleJuteOptionsComponent} from '../initial-preparations-new/additional-options/production-schedule-jute-options/production-schedule-jute-options.component';\nimport {ProductionSchedulePathLabelsComponent} from '../initial-preparations-new/additional-options/production-schedule-path-labels/production-schedule-path-labels.component';\nimport {ProductionScheduleQualityLinkedSettingsComponent} from '../initial-preparations-new/additional-options/production-schedule-quality-linked-settings/production-schedule-quality-linked-settings.component';\nimport {InitialProductionOrderForTypeRequestProperties} from '../initial-preparations-new/initial-production-order-for-type-request-properties.type';\nimport {SelectMachineComponent} from '../initial-preparations-new/select-machine/select-machine.component';\nimport {SelectProductConfigurationComponent} from '../initial-preparations-new/select-product-configuration/select-product-configuration.component';\n\n@Component({\n selector: 'app-production-schedule-initial-preparations',\n templateUrl: './production-schedule-initial-preparations.component.html',\n styleUrls: ['./production-schedule-initial-preparations.component.scss'],\n animations: [skeletonViewAnimation('.form-field-skeleton-wrapper, header .url, .warning-for-no-possible-matches-with-current-machine, .mat-expansion-panel')]\n})\nexport class ProductionScheduleInitialPreparationsComponent extends BaseAddProductionSchedulePageComponent implements OnInit {\n @Input() public customSettings: ProductionOrderCustomSettings;\n @Input() public listOfMachineQualityCustomSettings: PropertyValue[] = [];\n @Input() public productionSchedule: ProductionSchedule;\n @Input() public needsToShowValidationFeedback = false;\n @Input() public productionScheduleInitialPreparationsForm: ProductionScheduleInitialPreparationsFormGroup;\n\n @Output() public restZoneLoaded = new EventEmitter();\n @Output() public freeZoneLoaded = new EventEmitter();\n @Output() public pathZoneLoaded = new EventEmitter();\n @Output() public juteZoneLoaded = new EventEmitter();\n @Output() public formValuesChanged = new EventEmitter();\n @Output() public hideParentHeader = new EventEmitter();\n\n @ViewChild('initialPreparationsAdditionalOptionsComponent') public initialPreparationsAdditionalOptionsComponent: ProductionScheduleInitialPreparationsAdditionalOptionsComponent;\n @ViewChild('pathLabelsComponent') public pathLabelsComponent: ProductionSchedulePathLabelsComponent;\n @ViewChild('juteOptionsComponent') public juteOptionsComponent: ProductionScheduleJuteOptionsComponent;\n @ViewChild('qualityLinkedSettingsComponent') public qualityLinkedSettingsComponent: ProductionScheduleQualityLinkedSettingsComponent;\n public readonly MACHINE_BASE_ROUTER_LINK = RouteUtils.paths.texState.editMachine.absolutePath;\n public readonly PRODUCT_CONFIGURATION_CHIP_VALUE_KEY = '%(nameWithVersion)';\n public readonly PRODUCT_CONFIGURATION_BASE_ROUTER_LINK = RouteUtils.paths.texEdit.editProductConfiguration.absolutePath;\n public readonly QUALITY_CHIP_VALUE_KEY = '%(technicalNameWithVersion)';\n public readonly QUALITY_BASE_ROUTER_LINK = RouteUtils.paths.texStyle.machineQuality.editMachineQuality.absolutePath;\n public readonly ACCESS_ALL_PERMISSION = Permission.ACCESS_ALL;\n\n public factorForConversionFromMillimetersToDents: number;\n public factorForConversionFromDentsToMillimeters: number;\n public factorForConversionFromPicksToMillimeters: number;\n public factorForConversionFromMillimetersToPicks: number;\n public pathWidths: PathWidth[];\n public selectedMachine: MachineSummary = null;\n public canShowAdditionalOptions = false;\n public isLoadingMachineQualityAndCreel = false;\n public isLoadingProductionSchedule = false;\n public canShowWarningForIncorrectSplittedCreel: boolean;\n public suggestionForProductionScheduleName: string;\n public isViewingCreelMap = false;\n public defaultInitialRestZones: InitialRestZone;\n public oldMachineQuality: MachineQualityForProductionSchedule;\n public canHaveRestAndFreeZonesAndPathLabels: boolean;\n public defaultPathLabelInformation: InitialPathLabel;\n\n private readonly addPathLabelPermission: Permission = Permission.ADD_PATH_LABEL;\n private readonly dialogBuilderForBasicDialog = this.dialogBuilderFactoryService.getBuilder().withClass('basic-dialog-panel');\n private possibleQualitiesForCurrentMachine: WeaveQuality[];\n private possibleCreelsForCurrentMachine: OverviewListCreel[];\n private productionScheduleInitialPreparationsFormSubject: Subscription;\n private currentSubscription: ProfileSubscription;\n private dialogState: DialogComponentData;\n\n public constructor(\n @Inject(MACHINE_QUALITIES) private readonly machineQualities: MachineQualities,\n @Inject(MACHINES) private readonly machines: Machines,\n @Inject(PRODUCTION_SCHEDULES) private readonly productionSchedules: ProductionSchedules,\n @Inject(PRODUCTION_ORDERS) private readonly productionOrders: ProductionOrders,\n @Inject(CREELS) private readonly creels: Creels,\n @Inject(PRODUCTION_SCHEDULE_PLAN) private readonly productionSchedulePlan: ProductionSchedulePlan,\n @Inject(ADD_PRODUCTION_SCHEDULE) private readonly addProductionSchedule: AddProductionSchedule,\n private readonly httpProductionOrdersCustomSettings: HttpProductionOrdersCustomSettingsService,\n @Inject(DOCUMENT) private readonly document: Document,\n private readonly navigationHistory: NavigationHistoryService,\n @Inject(AUTHENTICATION) private readonly authentication: Authentication,\n @Inject(PLANNING) private readonly planning: Planning,\n private readonly planningPrototype: HttpPlanningPrototypeService,\n @Inject(PRODUCT_CONFIGURATIONS) private readonly productConfigurations: ProductConfigurations,\n private readonly translate: TranslateService,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n private readonly router: Router,\n private readonly changeDetectorRef: ChangeDetectorRef,\n private readonly navigationHelperService: NavigationHelperService,\n activatedRoute: ActivatedRoute\n ) {\n super(activatedRoute);\n }\n\n public get selectedMachineName(): string {\n return StringUtils.getPropertyValueOrGeneralPlaceholderIfEmpty(this.selectedMachine, 'name', this.translate);\n }\n\n public ngOnInit(): void {\n this.currentSubscription = this.authentication.getCurrentSubscription();\n this.initialiseProductionSchedule();\n\n if (!this.hasAddPathLabelPermission()) {\n this.pathZoneLoaded.emit();\n }\n\n this.productionSchedule.addToPlanboard ??= this.customSettings?.addProductionOrderToPlanningBoard;\n this.updateCanHaveRestAndFreeZonesAndPathLabels();\n }\n\n public selectMachine(): void {\n this.dialogBuilderForBasicDialog\n .openSelectGridDialog(SelectMachineComponent, {\n machineQualityId: this.isAddingProductionOrderForProductConfiguration() ? this.productionSchedule.machineQuality.id : null,\n allowedMachineTypes: [MachineType.CARPET_LOOM, MachineType.CARPET_LOOM_NO_JQ, MachineType.VELVET]\n })\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((selectedMachine: Equipment) => {\n if (!AssertionUtils.isNullOrUndefined(selectedMachine)) {\n this.onMachineSelect(selectedMachine);\n }\n });\n }\n\n public toggleOnPlanningBoardSettingValue(value: boolean): void {\n this.productionSchedule.addToPlanboard = value;\n }\n\n public showColoredYarnSetDetails(event: MouseEvent, productionScheduleColoredYarnSet: OverviewListColoredYarnSetWithStartDent): void {\n const startDent = `${this.translate.instant('GENERAL.START_DENT')}: ${productionScheduleColoredYarnSet.startDent}`;\n const widthInDents = `${this.translate.instant('GENERAL.WIDTH_IN_DENTS')}: ${productionScheduleColoredYarnSet.technicalWidthInDents}`;\n const textileDataAmount = `${startDent}, ${widthInDents}`;\n\n this.dialogBuilderFactoryService\n .getBuilder()\n .withClass(['reposition-dialog', productionScheduleColoredYarnSet.coloredYarnSet.overviewListColorSet.creelPositions.length > 8 ? 'colored-list-dialog' : ''])\n .withWidth('706px')\n .openDialog(RepositionDialogComponent, {\n textileData: productionScheduleColoredYarnSet.coloredYarnSet,\n textileDataAmount,\n component: TextileDataDetailComponent,\n sourceElement: SourceElementUtils.findSourceElementForDialog(event, 'color-list-preview-container'),\n positionOfDialog: PositionOfDialog.RIGHT,\n creelMap: this.getCreelMap().find((creelMap: CreelMap) => creelMap.coloredYarnSetId === productionScheduleColoredYarnSet.coloredYarnSet.id)\n });\n }\n\n public canShowWarningForNoPossibleMatchesWithCurrentMachine(): boolean {\n return (\n this.hasChosenMachine() &&\n ((!AssertionUtils.isNullOrUndefined(this.possibleCreelsForCurrentMachine) && this.possibleCreelsForCurrentMachine.length === 0) ||\n (!AssertionUtils.isNullOrUndefined(this.possibleQualitiesForCurrentMachine) && this.possibleQualitiesForCurrentMachine.length === 0)) &&\n !this.isShowingSkeletonView()\n );\n }\n\n public canShowDetailsOfActiveCreel(): boolean {\n return this.productionSchedule.coloredYarnSets.length > 0 || this.isShowingSkeletonView();\n }\n\n public selectAnotherCreel(): void {\n if (!this.isProductionScheduleRelatedToRunOrBeingDecreated()) {\n if (AssertionUtils.isNullOrUndefined(this.possibleCreelsForCurrentMachine)) {\n this.creels\n .getPossibleCreelsForMachine(this.selectedMachine.id)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((possibleCreelsForCurrentMachine: OverviewListCreel[]) => {\n this.possibleCreelsForCurrentMachine = possibleCreelsForCurrentMachine;\n\n this.selectCreelFromPossibleCreels();\n });\n } else {\n this.selectCreelFromPossibleCreels();\n }\n }\n }\n\n public selectAnotherMachineQuality(): void {\n if (AssertionUtils.isNullOrUndefined(this.possibleQualitiesForCurrentMachine)) {\n this.machineQualities\n .getPossibleMachineQualitiesForMachine(this.selectedMachine.id)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((possibleQualitiesForCurrentMachine: WeaveQuality[]) => {\n this.possibleQualitiesForCurrentMachine = possibleQualitiesForCurrentMachine;\n\n this.selectMachineQualityFromPossibleMachineQualities();\n });\n } else {\n this.selectMachineQualityFromPossibleMachineQualities();\n }\n }\n\n public hasChosenMachine(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.selectedMachine);\n }\n\n public getProductionSchedule(): ProductionSchedule {\n this.productionSchedule.initialFreeZones = this.initialPreparationsAdditionalOptionsComponent.getInitialFreeZone();\n this.productionSchedule.initialRestZones = this.initialPreparationsAdditionalOptionsComponent.getInitialRestZone();\n\n const oldFinishingForProductionSchedule: FinishingForProductionSchedule = this.productionSchedule.finishing;\n\n this.productionSchedule.name = this.productionScheduleInitialPreparationsForm.value.name;\n const practicalPickDensityUnit: Unit = Unit[this.getDefaultParameterForPropertyNameOfMachineQualitySettings('pickDensityUnit').propertyValue as string];\n this.productionSchedule.practicalPickDensityInPicksPerMM = convertUnit({\n from: {\n value: this.productionScheduleInitialPreparationsForm.value.practicalPickDensity,\n unit: practicalPickDensityUnit\n },\n to: Unit.PICKS_PER_MILLIMETER\n });\n this.productionSchedule.productConfiguration = this.productionScheduleInitialPreparationsForm.value.productConfiguration;\n this.productionSchedule.finishing = this.initialPreparationsAdditionalOptionsComponent.getSelectedFinishing();\n this.productionSchedule.dueDate = this.initialPreparationsAdditionalOptionsComponent.getDueDate();\n this.productionSchedule.comment = this.initialPreparationsAdditionalOptionsComponent.getComment();\n this.productionSchedule.buggy = this.initialPreparationsAdditionalOptionsComponent.getSelectedBuggy();\n this.productionSchedule.pathLabelInformation = this.pathLabelsComponent?.getPathLabelInformation() ?? null;\n this.productionSchedule.juteInformation = this.juteOptionsComponent?.getJuteInformation() ?? null;\n this.productionSchedule.juteGeneralSettings = this.qualityLinkedSettingsComponent?.getGeneralJuteSettings() ?? null;\n\n this.adjustDefaultFinishingsForProductionScheduleItems(oldFinishingForProductionSchedule);\n return this.productionSchedule;\n }\n\n public getConfiguredProductionSchedule(): ProductionSchedule {\n const configuredProductionSchedule = cloneDeep(this.productionSchedule);\n\n configuredProductionSchedule.name = this.productionScheduleInitialPreparationsForm.controls.name.valid ? this.productionScheduleInitialPreparationsForm.value.name : null;\n\n const practicalPickDensityUnit: Unit = Unit[this.getDefaultParameterForPropertyNameOfMachineQualitySettings('pickDensityUnit').propertyValue as string];\n configuredProductionSchedule.practicalPickDensityInPicksPerMM = !isNaN(this.productionScheduleInitialPreparationsForm.value.practicalPickDensity)\n ? convertUnit({\n from: {\n value: this.productionScheduleInitialPreparationsForm.value.practicalPickDensity,\n unit: practicalPickDensityUnit\n },\n to: Unit.PICKS_PER_MILLIMETER\n })\n : null;\n\n const oldFinishingForProductionSchedule: FinishingForProductionSchedule = configuredProductionSchedule.finishing;\n const isAdditionalOptionsComponentDefined = !AssertionUtils.isNullOrUndefined(this.initialPreparationsAdditionalOptionsComponent);\n\n if ((!AssertionUtils.isNullOrUndefined(configuredProductionSchedule.id) || this.isAddingAnyTypeOfProductionOrder()) && isAdditionalOptionsComponentDefined) {\n configuredProductionSchedule.initialFreeZones = this.initialPreparationsAdditionalOptionsComponent.getInitialFreeZone();\n configuredProductionSchedule.initialRestZones = this.initialPreparationsAdditionalOptionsComponent.getInitialRestZone();\n configuredProductionSchedule.finishing = this.initialPreparationsAdditionalOptionsComponent.getSelectedFinishing();\n configuredProductionSchedule.dueDate = this.initialPreparationsAdditionalOptionsComponent.getDueDate();\n configuredProductionSchedule.comment = this.initialPreparationsAdditionalOptionsComponent.getComment();\n configuredProductionSchedule.buggy = this.initialPreparationsAdditionalOptionsComponent.getSelectedBuggy();\n configuredProductionSchedule.pathLabelInformation = null;\n configuredProductionSchedule.juteInformation = null;\n configuredProductionSchedule.juteGeneralSettings = null;\n\n if (!AssertionUtils.isNullOrUndefined(this.pathLabelsComponent)) {\n const pathLabelInformation = this.pathLabelsComponent.getPathLabelInformation();\n\n configuredProductionSchedule.pathLabelInformation = pathLabelInformation;\n }\n\n if (!AssertionUtils.isNullOrUndefined(this.juteOptionsComponent)) {\n configuredProductionSchedule.juteInformation = this.juteOptionsComponent.getJuteInformation();\n }\n\n if (!AssertionUtils.isNullOrUndefined(this.qualityLinkedSettingsComponent)) {\n configuredProductionSchedule.juteGeneralSettings = this.qualityLinkedSettingsComponent.getGeneralJuteSettings();\n }\n }\n\n this.adjustDefaultFinishingsForProductionScheduleItems(oldFinishingForProductionSchedule);\n return configuredProductionSchedule;\n }\n\n public additionalOptionsChanged(): void {\n this.formValuesChanged.emit();\n }\n\n public navigateToCustomSettings(): void {\n this.router.navigateByUrl(RouteUtils.paths.texFab.productionOrder.settings.absolutePath);\n }\n\n public canShowErrorForFormControl(errorCode: string, formControlName: string): boolean {\n return canShowErrorForErrorCodeAndFormControlForFormGroup(errorCode, formControlName, this.productionScheduleInitialPreparationsForm);\n }\n\n public canShowRequiredErrorForName(): boolean {\n return this.canShowErrorForFormControl('required', 'name') && !this.canShowSuggestionForProductionScheduleName();\n }\n\n public canShowLabelForMachineQualityAndCreel(): boolean {\n return !this.hasChosenMachine() && !this.isLoadingMachineQualityAndCreel;\n }\n\n public isShowingSkeletonView(): boolean {\n return this.isLoadingMachineQualityAndCreel || this.isLoadingProductionSchedule;\n }\n\n public canShowColoredYarnSet(coloredYarnSetIndex: number): boolean {\n return (this.isShowingSkeletonView() && coloredYarnSetIndex < 1) || !this.isShowingSkeletonView();\n }\n\n public hasChosenMachineQuality(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.productionSchedule.machineQuality);\n }\n\n public hasListOfMachineQualityCustomSettings(): boolean {\n return this.listOfMachineQualityCustomSettings.length > 0;\n }\n\n public validateForms(): boolean {\n const forms: FormGroup[] = [this.productionScheduleInitialPreparationsForm];\n\n if (!AssertionUtils.isNullOrUndefined(this.initialPreparationsAdditionalOptionsComponent)) {\n forms.push(this.initialPreparationsAdditionalOptionsComponent.additionalOptionsForm);\n }\n\n if (!AssertionUtils.isNullOrUndefined(this.productionSchedule.pathLabelInformation)) {\n forms.push(this.pathLabelsComponent.pathLabelsForm);\n }\n\n if (this.canValidateJuteForm()) {\n forms.push(this.juteOptionsComponent.juteForm);\n }\n\n if (!AssertionUtils.isNullOrUndefined(this.qualityLinkedSettingsComponent)) {\n forms.push(this.qualityLinkedSettingsComponent.qualityLinkedSettingsForm);\n }\n\n return new FormValidationHelper().checkForms(forms, this.document, this.changeDetectorRef);\n }\n\n public canShowDisabledFormInputs(): boolean {\n return this.isProductionScheduleRelatedToRunOrBeingDecreated() || this.isAddingProductionOrderForProductConfiguration();\n }\n\n public canInsertPathLabels(): boolean {\n return (\n !AssertionUtils.isNullOrUndefined(this.productionSchedule.pathLabelInformation) &&\n (this.productionSchedule.pathLabelInformation.hasAddedPathLabelBefore() || this.productionSchedule.pathLabelInformation.hasAddedPathLabelAfter())\n );\n }\n\n public hasAddPathLabelPermission(): boolean {\n return this.currentSubscription?.hasPermission(this.addPathLabelPermission);\n }\n\n public isProductionScheduleRelatedToRunOrBeingDecreated(): boolean {\n return this.productionSchedule.isRelatedToRun() || this.productionSchedule.isBeingDecreated();\n }\n\n public canShowSuggestionForProductionScheduleName(): boolean {\n return (\n this.canGetSuggestionForProductionName() &&\n !AssertionUtils.isNullOrUndefined(this.suggestionForProductionScheduleName) &&\n this.suggestionForProductionScheduleName?.length <= this.MAX_LENGTH_FOR_PRODUCTION_ORDER_NAME &&\n !this.isLoadingProductionSchedule &&\n this.canShowAdditionalOptions\n );\n }\n\n public applySuggestionForProductionScheduleName(): void {\n this.productionScheduleInitialPreparationsForm.controls.name.setValue(this.suggestionForProductionScheduleName);\n }\n\n public canShowJuteOptions(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.productionSchedule.machineQuality) && this.productionSchedule.canAddJute;\n }\n\n public openCreelMap(): void {\n this.isViewingCreelMap = true;\n this.hideParentHeader.emit(true);\n }\n\n public closeCreelMap(): void {\n this.isViewingCreelMap = false;\n this.hideParentHeader.emit(false);\n }\n\n public getCreelMap(): CreelMap[] {\n return this.productionSchedule?.mappingForCurrentPositionOnMachine?.length === 0 || AssertionUtils.isNullOrUndefined(this.productionSchedule?.mappingForCurrentPositionOnMachine)\n ? this.createActiveCreelMap()\n : this.productionSchedule.mappingForCurrentPositionOnMachine;\n }\n\n public saveCreelMap(activeCreelMap: CreelMap[]): void {\n this.productionSchedule.mappingForCurrentPositionOnMachine = activeCreelMap;\n this.closeCreelMap();\n }\n\n public getColorList(coloredYarnSet: OverviewListColoredYarnSet): OverviewListColoredYarnSet {\n return getMappedColoredYarnSet(\n coloredYarnSet,\n this.getCreelMap()?.find((creelMap: CreelMap) => creelMap.coloredYarnSetId === coloredYarnSet.id),\n 'asc'\n );\n }\n\n public selectProductConfiguration(): void {\n this.dialogBuilderForBasicDialog\n .openSelectGridDialog(SelectProductConfigurationComponent, {machineId: this.selectedMachine.id})\n .pipe(\n switchMap((result: {productConfiguration: SelectListProductConfiguration; version: number}) => {\n return result\n ? forkJoin([\n this.productConfigurations.getById(result.productConfiguration.id),\n of(result.productConfiguration.versionHistories.find((versionHistory: VersionHistory) => versionHistory.version === result.version))\n ])\n : EMPTY;\n }),\n takeUntil(this.unSubscribeOnViewDestroy)\n )\n .subscribe(([productConfiguration, selectedVersionHistory]: [ProductConfiguration, SelectListProductConfigurationVersionHistory]) =>\n this.setProductConfiguration(productConfiguration, selectedVersionHistory)\n );\n }\n\n public removeProductConfiguration(): void {\n this.productionScheduleInitialPreparationsForm.controls.productConfiguration.setValue(null);\n this.productionSchedule.designs = [];\n }\n\n public canShowProductConfigurationDisabledFormInput(): boolean {\n return !this.productionSchedule.isRelatedToRun() && !AssertionUtils.isNullOrUndefined(this.productionScheduleInitialPreparationsForm.value.productConfiguration);\n }\n\n public onPathZoneLoaded(): void {\n this.pathZoneLoaded.emit();\n this.juteZoneLoaded.emit();\n }\n\n public getWeaveQualityType(): WeaveQualityType {\n return this.selectedMachine.type === MachineType.VELVET ? WeaveQualityType.VELVET : WeaveQualityType.CARPET;\n }\n\n public getSuggestionForProductionScheduleName(): void {\n if (this.canGetSuggestionForProductionName()) {\n this.httpProductionOrdersCustomSettings\n .generateName({\n creelName: this.productionSchedule.creel.name,\n machineName: this.productionSchedule.machine.name,\n machineQualityName: this.productionSchedule.machineQuality.technicalName,\n buggyName: (this.initialPreparationsAdditionalOptionsComponent?.getSelectedBuggy() ?? this.productionSchedule.buggy)?.name\n })\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((generatedName: string) => {\n this.suggestionForProductionScheduleName = generatedName;\n });\n }\n }\n\n private canValidateJuteForm(): boolean {\n const juteForm = this.juteOptionsComponent?.juteForm;\n if (AssertionUtils.isNullOrUndefined(juteForm)) {\n return false;\n }\n\n const beforePathLabelChecked = this.juteOptionsComponent.juteForm.get('hasJuteBefore').value;\n const afterPathLabelChecked = this.juteOptionsComponent.juteForm.get('hasJuteAfter').value;\n\n if (beforePathLabelChecked && afterPathLabelChecked) {\n return true;\n }\n\n if (beforePathLabelChecked || afterPathLabelChecked) {\n juteForm.markAllAsTouched();\n juteForm.get(beforePathLabelChecked ? 'juteBefore' : 'juteAfter').updateValueAndValidity();\n juteForm.get('pattern').updateValueAndValidity();\n return false;\n }\n\n return false;\n }\n\n private createActiveCreelMap(): CreelMap[] {\n return this.productionSchedule.coloredYarnSets.map((coloredYarnSetsWithStartDent: OverviewListColoredYarnSetWithStartDent) => {\n return {\n coloredYarnSetId: coloredYarnSetsWithStartDent.coloredYarnSet.id,\n creelPositions: coloredYarnSetsWithStartDent.coloredYarnSet.overviewListColorSet.creelPositions.map((creelPosition: OverviewListCreelPosition) => {\n return {\n creelPosition: creelPosition.position,\n currentPositionOnMachine: creelPosition.position\n };\n })\n } as CreelMap;\n });\n }\n\n private canGetSuggestionForProductionName(): boolean {\n return (\n this.hasChosenMachine() &&\n this.hasChosenMachineQuality() &&\n !AssertionUtils.isNullOrUndefined(this.productionSchedule.creel) &&\n this.customSettings?.nameGenerator?.parts?.length !== 0 &&\n this.suggestionForProductionScheduleName !== this.productionScheduleInitialPreparationsForm.value.name\n );\n }\n\n private selectCreelFromPossibleCreels(): void {\n this.dialogBuilderForBasicDialog\n .openSelectGridDialog(SelectCreelComponent, {\n creels: this.possibleCreelsForCurrentMachine,\n machineId: this.selectedMachine.id,\n title: this.translate.instant('GENERAL.ACTIONS.SELECT_OBJECT', {object: this.translate.instant('TEXTILE_DATA.CREEL.CREEL', {count: 1}).toLowerCase()})\n })\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((selectedCreels: OverviewListCreel[]) => {\n if (selectedCreels?.length > 0) {\n this.setCreel(selectedCreels[0]);\n }\n });\n }\n\n private setCreel(creel: OverviewListCreel): void {\n this.assignCreelToProductionSchedule(creel);\n this.formValuesChanged.emit();\n this.notifyChangesToInitialPreparationsForm(true);\n }\n\n private selectMachineQualityFromPossibleMachineQualities(): void {\n this.dialogBuilderForBasicDialog\n .openSelectGridDialog(SelectMachineQualityComponent, {\n title: this.translate.instant('GENERAL.ACTIONS.SELECT_OBJECT', {\n object: this.translate.instant('GENERAL.POSSIBLE_OBJECTS', {objects: this.translate.instant('TEXTILE_DATA.MACHINE_QUALITY.MACHINE_QUALITY', {count: 2})}).toLowerCase()\n }),\n rowSelection: AgGridRowSelection.SINGLE,\n allowEmptySelection: false,\n machineId: this.selectedMachine.id\n })\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((selectedWeaveQualities: OverviewListMachineQuality[]) => {\n if (selectedWeaveQualities?.length > 0) {\n const selectedWeaveQuality = selectedWeaveQualities[0];\n this.setQuality(selectedWeaveQuality);\n }\n });\n }\n\n private setQuality(quality: OverviewListMachineQuality): void {\n if (this.productionSchedule.machineQuality?.id !== quality.id) {\n this.oldMachineQuality = this.productionSchedule.machineQuality;\n this.productionSchedule.productionSchedulePathsOfColoredYarnSets = [];\n this.removeProductConfiguration();\n\n this.getAndAssignMachineQualityToProductionSchedule(quality.id, quality.canAddJute);\n } else {\n this.productionScheduleInitialPreparationsForm.controls.machineQuality.setValue(this.productionSchedule.machineQuality);\n }\n }\n\n private initialiseProductionSchedule(): void {\n this.isCreatingNewProductionSchedule() ? this.initialiseNewProductionSchedule() : this.initialiseExistingProductionSchedule();\n }\n\n private isCreatingNewProductionSchedule(): boolean {\n return ObjectUtils.isDeepEqual(this.productionSchedule, ProductionSchedule.createEmptyProductionSchedule()) && !this.isEditingProductionOrder() && !this.isDuplicatingProductionOrder();\n }\n\n private adjustDefaultFinishingsForProductionScheduleItems(oldFinishingForProductionSchedule: FinishingForProductionSchedule): void {\n this.productionSchedule.productionSchedulePathsOfColoredYarnSets.forEach((productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet) => {\n productionSchedulePathsOfColoredYarnSet.productionSchedulePaths.forEach((productionSchedulePath: ProductionSchedulePath) => {\n productionSchedulePath.pathGroups.forEach((productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup) => {\n if (productionScheduleItemInPathGroup.drawing.drawingType === DrawingType.BMP) {\n const bmpDrawingInPathGroup: BmpProductionScheduleItemInPathGroup = productionScheduleItemInPathGroup as any as BmpProductionScheduleItemInPathGroup;\n if (ObjectUtils.isDeepEqual(bmpDrawingInPathGroup.finishing, oldFinishingForProductionSchedule)) {\n bmpDrawingInPathGroup.changeFinishing(this.productionSchedule.finishing);\n }\n }\n });\n });\n });\n }\n\n private setFormFields(): void {\n this.productionScheduleInitialPreparationsForm.controls.name.setAsyncValidators(\n AsyncUniqueValidator.createValidator(this.productionSchedules, !this.isCreatingNewProductionSchedule() ? this.productionSchedule.name : null)\n );\n\n const practicalPickDensityUnit: Unit = Unit[this.getDefaultParameterForPropertyNameOfMachineQualitySettings('pickDensityUnit').propertyValue as string];\n const practicalPickDensityInPicksInUnit = convertUnit({\n from: {\n value: this.productionSchedule.practicalPickDensityInPicksPerMM,\n unit: Unit.PICKS_PER_MILLIMETER\n },\n to: practicalPickDensityUnit\n });\n\n this.productionScheduleInitialPreparationsForm.controls.practicalPickDensity.setValue(practicalPickDensityInPicksInUnit);\n this.productionScheduleInitialPreparationsForm.controls.productConfiguration.setValue(this.productionSchedule.productConfiguration);\n\n setTimeout(() => {\n this.productionScheduleInitialPreparationsForm.controls.name.updateValueAndValidity();\n this.productionScheduleInitialPreparationsForm.controls.name.valueChanges.pipe(takeUntil(this.unSubscribeOnViewDestroy), distinctUntilChanged(), debounceTime(500)).subscribe(() => {\n this.formValuesChanged.emit();\n });\n });\n\n this.productionScheduleInitialPreparationsFormSubject = this.productionScheduleInitialPreparationsForm.valueChanges.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe(() => {\n const isDirty: boolean = this.productionScheduleInitialPreparationsForm.dirty;\n if (isDirty) {\n this.notifyChangesToInitialPreparationsForm(isDirty);\n }\n });\n }\n\n private canSelectMachine(selectedMachine: MachineSummary): boolean {\n return !AssertionUtils.isNullOrUndefined(selectedMachine) && !ObjectUtils.isDeepEqual(this.selectedMachine, selectedMachine);\n }\n\n public assignMachineToProductionSchedule(selectedMachine: MachineSummary): void {\n if (this.canSelectMachine(selectedMachine)) {\n this.productionScheduleInitialPreparationsForm.controls.practicalPickDensity.setValue(null);\n\n this.possibleCreelsForCurrentMachine = null;\n this.possibleQualitiesForCurrentMachine = null;\n\n this.selectedMachine = selectedMachine;\n this.productionSchedule.machine = selectedMachine;\n this.productionScheduleInitialPreparationsForm.controls.machine.setValue(selectedMachine);\n this.productionSchedule.hmiVersion = selectedMachine.hmiVersion;\n\n forkJoin([\n this.productionOrders.getInitialOptionsForMachine(selectedMachine.id),\n this.creels.getPossibleCreelsForMachine(selectedMachine.id),\n this.machineQualities.getPossibleMachineQualitiesForMachine(this.selectedMachine.id)\n ])\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe(([initialOptionsForProductionOrder, creels, machineQualities]: [InitialOptionsForProductionOrder, OverviewListCreel[], WeaveQuality[]]) => {\n this.possibleCreelsForCurrentMachine = creels;\n this.possibleQualitiesForCurrentMachine = machineQualities;\n this.updateCanHaveRestAndFreeZonesAndPathLabels();\n\n if (!this.productionSchedule.hasOrderLines()) {\n const activeMachineQuality = machineQualities?.find((machineQuality: WeaveQuality) => {\n return machineQuality.id === initialOptionsForProductionOrder.activeMachineQualityId;\n });\n this.assignMachineQualityToProductionSchedule(activeMachineQuality);\n this.changeDetectorRef.detectChanges();\n }\n\n this.setEmptyPropertiesFromInitialOptions(this.productionSchedule.machineQuality, initialOptionsForProductionOrder);\n });\n }\n }\n\n private setEmptyPropertiesFromInitialOptions(machineQuality: MachineQualityForProductionSchedule, initialOptionsForProductionOrder: InitialOptionsForProductionOrder): void {\n if (!AssertionUtils.isNullOrUndefined(machineQuality)) {\n this.getConversionFactorsForMachineQuality(machineQuality).subscribe({\n next: () => {\n this.updateMachineQualityDependentInitialSettingsForProductionSchedule(initialOptionsForProductionOrder);\n },\n error: (error: Error) => {\n this.assignMachineQualityToProductionSchedule(null);\n throw error;\n }\n });\n } else {\n this.getActiveCreelFromListOfPossibleCreelsAndAssignToProductionSchedule(initialOptionsForProductionOrder?.activeCreelId, initialOptionsForProductionOrder?.mappingForCurrentPositionOnMachine);\n }\n }\n\n private getConversionFactorsForMachineQuality(machineQuality: MachineQualityForProductionSchedule): Observable {\n return forkJoin([\n this.machineQualities.getFactorForConversionFromMillimetersToDents(machineQuality.id),\n this.machineQualities.getFactorForConversionFromDentsToMillimeters(machineQuality.id),\n this.machineQualities.getFactorForConversionFromPicksToMillimeters(machineQuality.id),\n this.machineQualities.getFactorForConversionFromMillimetersToPicks(machineQuality.id),\n this.machineQualities.getPathWidths(machineQuality.id)\n ]).pipe(\n tap(\n ([factorForConversionFromMillimetersToDents, factorForConversionFromDentsToMillimeters, factorForConversionFromPicksToMillimeters, factorForConversionFromMillimetersToPicks, pathWidths]: [\n number,\n number,\n number,\n number,\n PathWidth[]\n ]) => {\n this.factorForConversionFromMillimetersToDents = factorForConversionFromMillimetersToDents;\n this.factorForConversionFromDentsToMillimeters = factorForConversionFromDentsToMillimeters;\n this.factorForConversionFromPicksToMillimeters = factorForConversionFromPicksToMillimeters;\n this.factorForConversionFromMillimetersToPicks = factorForConversionFromMillimetersToPicks;\n this.pathWidths = pathWidths;\n this.productionSchedulePlan.applyMeasurementsCalculationsFactor(factorForConversionFromMillimetersToDents);\n }\n ),\n takeUntil(this.unSubscribeOnViewDestroy)\n );\n }\n\n private adjustObjectsThatDependsOnMachineQuality(machineQuality: MachineQualityForProductionSchedule): void {\n if (!AssertionUtils.isNullOrUndefined(machineQuality)) {\n this.getConversionFactorsForMachineQuality(machineQuality)\n .pipe(\n switchMap(() => this.productionOrders.getInitialOptionsForMachineAndMachineQuality(this.selectedMachine.id, machineQuality.id, machineQuality.reedDensity)),\n takeUntil(this.unSubscribeOnViewDestroy)\n )\n .subscribe({\n next: (initialOptionsForProductionOrder: InitialOptionsForProductionOrder) => {\n this.updateMachineQualityDependentInitialSettingsForProductionSchedule(initialOptionsForProductionOrder);\n },\n error: (error: Error) => {\n this.assignMachineQualityToProductionSchedule(null);\n throw error;\n }\n });\n }\n }\n\n private assignCreelToProductionSchedule(creel: OverviewListCreel): void {\n if (!AssertionUtils.isNullOrUndefined(creel)) {\n this.productionSchedule.creel = new CreelForProductionSchedule(creel.id, creel.name, creel.isColoredYarnSplitPositionedCorrectly);\n this.productionSchedule.coloredYarnSets = creel.coloredYarnSetsWithStartDent;\n this.productionSchedule.mappingForCurrentPositionOnMachine = creel.mappingForCurrentPositionOnMachine;\n this.productionSchedule.productionSchedulePathsOfColoredYarnSets = [];\n this.productionScheduleInitialPreparationsForm.controls.creel.setValue(creel);\n this.checkIsColoredYarnSetSplitPositionedCorrectly(this.productionSchedule.creel);\n } else {\n this.productionSchedule.creel = null;\n this.productionSchedule.coloredYarnSets = [];\n this.productionSchedule.mappingForCurrentPositionOnMachine = null;\n }\n\n this.isLoadingMachineQualityAndCreel = false;\n this.finishLoadingProductionScheduleWithSuggestion();\n }\n\n private initialiseExistingProductionSchedule(): void {\n if (this.isEditingProductionOrder() || this.isDuplicatingProductionOrder()) {\n this.isLoadingProductionSchedule = true;\n this.selectedMachine = this.productionSchedule.machine;\n\n if (!this.productionSchedule.isProductionScheduleWithEmptyContent()) {\n this.setFormFields();\n this.updateMachineQualityDependentSettingsForExistingProductionSchedule();\n this.checkIsColoredYarnSetSplitPositionedCorrectly(this.productionSchedule.creel);\n } else {\n this.setFormFields();\n this.adjustObjectsThatDependsOnMachineQuality(this.productionSchedule.machineQuality);\n }\n } else {\n this.setFormFields();\n\n this.selectedMachine = this.productionSchedule.machine;\n\n if (!AssertionUtils.isNullOrUndefined(this.productionSchedule.machineQuality)) {\n this.updateMachineQualityDependentSettingsForExistingProductionSchedule();\n } else if (AssertionUtils.isNullOrUndefined(this.productionSchedule.machineQuality) && AssertionUtils.isNullOrUndefined(this.productionSchedule.creel)) {\n this.selectedMachine = null;\n this.assignMachineToProductionSchedule(this.productionSchedule.machine);\n }\n }\n }\n\n private updateMachineQualityDependentSettingsForExistingProductionSchedule(): void {\n this.getConversionFactorsForMachineQuality(this.productionSchedule.machineQuality)\n .pipe(\n switchMap(() =>\n this.productionOrders.getInitialOptionsForMachineAndMachineQuality(this.selectedMachine.id, this.productionSchedule.machineQuality.id, this.productionSchedule.machineQuality.reedDensity)\n ),\n takeUntil(this.unSubscribeOnViewDestroy)\n )\n .subscribe((initialOptionsForProductionOrder: InitialOptionsForProductionOrder) => {\n this.defaultPathLabelInformation = initialOptionsForProductionOrder.initialPathLabel;\n this.defaultInitialRestZones = initialOptionsForProductionOrder.initialRestZones;\n\n this.finishLoadingProductionScheduleWithSuggestion();\n\n if (!this.canShowJuteOptions()) {\n this.juteZoneLoaded.emit();\n }\n\n if (!this.canInsertPathLabels()) {\n this.pathZoneLoaded.emit();\n }\n\n if (!AssertionUtils.isNullOrUndefined(this.defaultInitialRestZones.pattern)) {\n this.restZoneLoaded.emit();\n }\n });\n }\n\n private updateMachineQualityDependentInitialSettingsForProductionSchedule(initialOptionsForProductionOrder: InitialOptionsForProductionOrder): void {\n this.productionSchedule.finishing = initialOptionsForProductionOrder.finishing;\n\n if (!AssertionUtils.isNullOrUndefined(initialOptionsForProductionOrder.initialPathLabel)) {\n this.productionSchedule.pathLabelInformation = new PathLabelInformation(\n initialOptionsForProductionOrder.initialPathLabel.pathLabelInformationAfter,\n initialOptionsForProductionOrder.initialPathLabel.pathLabelInformationBefore,\n initialOptionsForProductionOrder.initialPathLabel.fontSettings,\n initialOptionsForProductionOrder.initialPathLabel.labelHeightInMM,\n initialOptionsForProductionOrder.initialPathLabel.labelHeightInPicks,\n this.customSettings?.pathLabel.fontSizeInMM,\n initialOptionsForProductionOrder.initialPathLabel.pattern\n );\n\n this.defaultPathLabelInformation = initialOptionsForProductionOrder.initialPathLabel;\n } else {\n this.productionSchedule.pathLabelInformation = null;\n this.defaultPathLabelInformation = null;\n }\n\n this.productionSchedule.juteInformation = initialOptionsForProductionOrder.initialJute;\n this.productionSchedule.initialFreeZones = initialOptionsForProductionOrder.initialFreeZones;\n this.productionSchedule.initialRestZones = initialOptionsForProductionOrder.initialRestZones;\n this.defaultInitialRestZones = cloneDeep(initialOptionsForProductionOrder.initialRestZones);\n\n const practicalPickDensityUnit: Unit = Unit[this.getDefaultParameterForPropertyNameOfMachineQualitySettings('pickDensityUnit').propertyValue as string];\n const practicalPickDensityInPicksPerMM = AssertionUtils.isNumber(initialOptionsForProductionOrder.practicalPickDensityInPicksPerMM)\n ? initialOptionsForProductionOrder.practicalPickDensityInPicksPerMM\n : this.productionSchedule.machineQuality.practicalPickDensity;\n const practicalPickDensityInCustomUnit: number = convertUnit({\n from: {\n value: practicalPickDensityInPicksPerMM,\n unit: Unit.PICKS_PER_MILLIMETER\n },\n to: practicalPickDensityUnit\n });\n this.productionScheduleInitialPreparationsForm.controls.practicalPickDensity.setValue(practicalPickDensityInCustomUnit);\n\n if ((!this.isAddingProductionOrderForRun() && initialOptionsForProductionOrder.activeCreelId) || this.isAddingProductionOrderForProductConfiguration()) {\n this.productionSchedule.mappingForCurrentPositionOnMachine = initialOptionsForProductionOrder.mappingForCurrentPositionOnMachine;\n\n if (this.possibleCreelsForCurrentMachine) {\n this.getActiveCreelFromListOfPossibleCreelsAndAssignToProductionSchedule(initialOptionsForProductionOrder.activeCreelId, initialOptionsForProductionOrder.mappingForCurrentPositionOnMachine);\n }\n }\n\n this.finishLoadingProductionScheduleWithSuggestion();\n this.changeDetectorRef.detectChanges();\n\n if (!this.canInsertPathLabels()) {\n this.pathZoneLoaded.emit();\n\n const juteInformation = this.productionSchedule.juteInformation;\n\n if (AssertionUtils.isNullOrUndefined(juteInformation?.juteBefore) && AssertionUtils.isNullOrUndefined(juteInformation?.juteAfter)) {\n this.juteZoneLoaded.emit();\n }\n }\n\n if (!this.canShowJuteOptions()) {\n this.juteZoneLoaded.emit();\n }\n }\n\n private initialiseNewProductionSchedule(): void {\n this.setFormFields();\n\n let request: Observable;\n\n if (this.isAddingProductionOrderForMachine()) {\n request = this.getRequestForProductionOrderForMachine();\n } else if (this.isAddingProductionOrderForRun()) {\n request = this.getRequestForProductionOrderForRun();\n } else if (this.isAddingProductionOrderForProductConfiguration()) {\n request = this.getRequestForProductionOrderForProductConfiguration();\n }\n\n if (this.isAddingProductionOrderForType()) {\n this.isLoadingMachineQualityAndCreel = true;\n\n request?.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe((results: [MachineSummary, WeaveQuality, OverviewListCreel, ProductConfiguration]) => {\n this.initialiseProductionScheduleForType(...results);\n });\n }\n }\n\n public initialiseProductionScheduleForType(machine: MachineSummary, machineQuality: WeaveQuality, creel: OverviewListCreel, productConfiguration: ProductConfiguration): void {\n this.selectedMachine = machine;\n this.productionSchedule.machine = machine;\n this.productionScheduleInitialPreparationsForm.controls.machine.setValue(machine);\n this.productionSchedule.hmiVersion = machine.hmiVersion;\n\n const hasMachineQuality = !AssertionUtils.isNullOrUndefined(machineQuality);\n const hasCreel = !AssertionUtils.isNullOrUndefined(creel);\n\n if (hasMachineQuality) {\n this.assignMachineQualityToProductionSchedule(machineQuality);\n }\n\n if (hasCreel) {\n this.assignCreelToProductionSchedule(creel);\n }\n\n if (!AssertionUtils.isNullOrUndefined(productConfiguration)) {\n const version = productConfiguration.versionHistories.find((versionHistory: VersionHistory) => versionHistory.readyForProduction)?.version ?? productConfiguration.versionHistories[0].version;\n this.productionScheduleInitialPreparationsForm.controls.productConfiguration.setValue(new ProductionScheduleProductConfiguration(productConfiguration.id, productConfiguration.name, version));\n\n if (productConfiguration.designs) {\n this.productionSchedule.designs = productConfiguration.designs;\n }\n }\n\n forkJoin([\n this.isAddingProductionOrderForProductConfiguration() || this.isAddingProductionOrderForRun()\n ? this.productionOrders.getInitialOptionsForMachineAndMachineQuality(machine.id, machineQuality.id, machineQuality.reedDensityInDentsPerMM)\n : this.productionOrders.getInitialOptionsForMachine(machine.id),\n this.creels.getPossibleCreelsForMachine(machine.id),\n this.machineQualities.getPossibleMachineQualitiesForMachine(machine.id)\n ])\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe(([initialOptionsForProductionOrder, creels, machineQualities]: [InitialOptionsForProductionOrder, OverviewListCreel[], WeaveQuality[]]) =>\n this.setAdditionalOptionsForProductionOrderForType(hasMachineQuality, hasCreel, initialOptionsForProductionOrder, creels, machineQualities)\n );\n\n this.updateCanHaveRestAndFreeZonesAndPathLabels();\n }\n\n private setAdditionalOptionsForProductionOrderForType(\n hasMachineQuality: boolean,\n hasCreel: boolean,\n initialOptionsForProductionOrder: InitialOptionsForProductionOrder,\n creels: OverviewListCreel[],\n machineQualities: WeaveQuality[]\n ): void {\n this.possibleCreelsForCurrentMachine = creels;\n this.possibleQualitiesForCurrentMachine = machineQualities;\n\n const possibleMachineQualityFromInitialOptions = this.possibleQualitiesForCurrentMachine.find(\n (possibleMachineQuality: WeaveQuality) => possibleMachineQuality.id === initialOptionsForProductionOrder.activeMachineQualityId\n );\n if (!hasMachineQuality && !AssertionUtils.isNullOrUndefined(possibleMachineQualityFromInitialOptions)) {\n this.assignMachineQualityToProductionSchedule(possibleMachineQualityFromInitialOptions);\n }\n\n const possibleCreelFromInitialOptions = this.possibleCreelsForCurrentMachine.find((possibleCreel: OverviewListCreel) => possibleCreel.id === initialOptionsForProductionOrder.activeCreelId);\n if (!hasCreel && !AssertionUtils.isNullOrUndefined(possibleCreelFromInitialOptions)) {\n this.assignCreelToProductionSchedule(possibleCreelFromInitialOptions);\n } else if (hasCreel) {\n this.productionSchedule.coloredYarnSets =\n this.possibleCreelsForCurrentMachine.find((possibleCreel: OverviewListCreel) => possibleCreel.id === this.productionSchedule.creel.id)?.coloredYarnSetsWithStartDent ??\n this.possibleCreelsForCurrentMachine[0].coloredYarnSetsWithStartDent;\n }\n\n this.setEmptyPropertiesFromInitialOptions(this.productionSchedule.machineQuality, initialOptionsForProductionOrder);\n\n this.isLoadingMachineQualityAndCreel = false;\n }\n\n private getRequestForProductionOrderForMachine(): Observable {\n const machineId = this.activatedRoute.snapshot.params.id as number;\n\n return forkJoin([this.machines.getSummaryForMachine(machineId), of(null), of(null), of(null)]);\n }\n\n private getRequestForProductionOrderForRun(): Observable {\n const {runId, machineQualityId, creelId, machineId} = this.navigationHistory.getState() as {\n runId: number;\n machineQualityId: number;\n creelId: number;\n machineId: number;\n };\n\n if (AssertionUtils.isNullOrUndefined(runId) || AssertionUtils.isNullOrUndefined(machineQualityId) || AssertionUtils.isNullOrUndefined(machineId)) {\n this.router.navigateByUrl(RouteUtils.paths.texFab.planning.absolutePath);\n return of(null);\n }\n\n let getCreelMapForRun: Observable;\n if (this.authentication.getCurrentSubscription()?.hasPermission(Permission.TEXFAB_PLANNINGBOARD_NEW)) {\n getCreelMapForRun = this.planningPrototype.getCreelMapForRun(runId);\n } else {\n getCreelMapForRun = this.planning.getCreelMapForRun(runId);\n }\n\n return forkJoin([this.machines.getSummaryForMachine(machineId), this.machineQualities.getById(machineQualityId), this.creels.getPossibleCreelsForMachine(machineId), getCreelMapForRun]).pipe(\n map(([machine, machineQuality, creels, mappingForCurrentPositionOnMachine]: [MachineSummary, WeaveQuality, OverviewListCreel[], CreelMap[]]) => {\n const creel = creels.find((value: OverviewListCreel) => value.id === creelId);\n creel.mappingForCurrentPositionOnMachine = mappingForCurrentPositionOnMachine;\n return [machine, machineQuality, creel, null];\n }),\n tap(() => {\n this.productionSchedule.runId = runId;\n })\n ) as Observable;\n }\n\n private getRequestForProductionOrderForProductConfiguration(): Observable {\n const productConfigurationId: number = this.activatedRoute.snapshot.params.id;\n\n const productConfigurationObservable = this.productConfigurations.getById(productConfigurationId);\n\n return forkJoin([\n productConfigurationObservable.pipe(switchMap((productConfiguration: ProductConfiguration) => this.machines.getSummaryForMachine(productConfiguration.machine.id))),\n productConfigurationObservable.pipe(switchMap((productConfiguration: ProductConfiguration) => this.machineQualities.getById(productConfiguration.quality.id))),\n of(null),\n productConfigurationObservable\n ])?.pipe(\n tap(() => {\n this.productionSchedule.isSample = true;\n })\n );\n }\n\n private finishLoadingProductionScheduleWithSuggestion(): void {\n this.finishLoadingProductionSchedule();\n this.getSuggestionForProductionScheduleName();\n }\n\n private finishLoadingProductionSchedule(): void {\n this.isLoadingProductionSchedule = false;\n\n const getFunctionsBasedOnDialogComponent = new Map([\n [\n SelectProductConfigurationComponent,\n {loadNewItem: ({newItemId}: NavigationNewItemData): void => this.setNewProductConfiguration(newItemId), reopenDialog: (): void => this.selectProductConfiguration()}\n ],\n [SelectMachineQualityComponent, {loadNewItem: ({newItemId}: NavigationNewItemData): void => this.setNewQuality(newItemId), reopenDialog: (): void => this.selectAnotherMachineQuality()}],\n [SelectCreelComponent, {loadNewItem: ({newItemId}: NavigationNewItemData): void => this.setNewCreel(newItemId), reopenDialog: (): void => this.selectAnotherCreel()}]\n ]);\n\n this.navigationHelperService.setNewItemOrReopenDialogIfPresent(\n ({newItemId}: NavigationNewItemData, {dialogComponent}: DialogComponentData) => getFunctionsBasedOnDialogComponent.get(dialogComponent).loadNewItem({newItemId}),\n ({dialogComponent}: DialogComponentData) => getFunctionsBasedOnDialogComponent.get(dialogComponent).reopenDialog()\n );\n\n this.showAdditionalOptions();\n }\n\n private setProductConfiguration(productConfiguration: ProductConfiguration, selectedVersionHistory: SelectListProductConfigurationVersionHistory): void {\n if (productConfiguration.designs) {\n this.productionSchedule.designs = productConfiguration.designs;\n }\n\n this.productionScheduleInitialPreparationsForm.controls.productConfiguration.setValue(\n new ProductionScheduleProductConfiguration(productConfiguration.id, productConfiguration.name, selectedVersionHistory.version)\n );\n\n this.getAndAssignMachineQualityToProductionSchedule(selectedVersionHistory.weaveQuality.id);\n }\n\n private setNewProductConfiguration(id: number): void {\n forkJoin([this.productConfigurations.getById(id), this.productConfigurations.getPossibleProductConfigurationsForMachine(this.selectedMachine.id)])\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe(([productConfiguration, productConfigurations]: [ProductConfiguration, SelectListProductConfiguration[]]) => {\n this.setProductConfiguration(\n productConfiguration,\n productConfigurations.find((selectListProductConfiguration: SelectListProductConfiguration) => selectListProductConfiguration.id === id).versionHistories[0]\n );\n });\n }\n\n private setNewQuality(id: number): void {\n this.machineQualities\n .getPossibleMachineQualitiesForMachine(this.selectedMachine.id)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((possibleQualitiesForCurrentMachine: WeaveQuality[]) => {\n this.possibleQualitiesForCurrentMachine = possibleQualitiesForCurrentMachine;\n this.setQuality(OverviewListMachineQuality.fromCarpetWeaveQuality(possibleQualitiesForCurrentMachine.find((quality: WeaveQuality) => quality.id === id) as CarpetWeaveQuality));\n });\n }\n\n private setNewCreel(id: number): void {\n this.creels\n .getPossibleCreelsForMachine(this.selectedMachine.id)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((possibleCreelsForCurrentMachine: OverviewListCreel[]) => {\n this.possibleCreelsForCurrentMachine = possibleCreelsForCurrentMachine;\n this.setCreel(possibleCreelsForCurrentMachine.find((creel: OverviewListCreel) => creel.id === id));\n });\n }\n\n private showAdditionalOptions(): void {\n const {machineQuality, coloredYarnSets} = this.productionSchedule;\n this.canShowAdditionalOptions = !AssertionUtils.isNullOrUndefined(machineQuality) && coloredYarnSets.length > 0;\n\n if (this.canShowAdditionalOptions && this.dialogState?.dialogComponent === SelectFinishingComponent) {\n setTimeout(() => this.initialPreparationsAdditionalOptionsComponent.selectFinishing());\n }\n }\n\n private onMachineSelect(selectedMachine: Equipment): void {\n const hasSelectedNewMachine = !AssertionUtils.isNullOrUndefined(selectedMachine) && !this.hasChosenMachine();\n const hasSelectedAnotherMachine = !AssertionUtils.isNullOrUndefined(selectedMachine) && this.hasChosenMachine() && this.selectedMachine.id !== selectedMachine.id;\n\n if (!hasSelectedAnotherMachine) {\n this.productionScheduleInitialPreparationsForm.controls.machine.setValue(selectedMachine);\n }\n\n if (hasSelectedNewMachine || hasSelectedAnotherMachine) {\n this.canShowAdditionalOptions = false;\n this.possibleQualitiesForCurrentMachine = null;\n this.isLoadingMachineQualityAndCreel = true;\n\n this.machines\n .getSummaryForMachine(selectedMachine.id)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((machineSummaryOfSelectedMachine: MachineSummary) => {\n this.assignMachineToProductionSchedule(machineSummaryOfSelectedMachine);\n });\n\n this.formValuesChanged.emit();\n\n if (hasSelectedAnotherMachine && this.hasChosenMachine()) {\n this.notifyChangesToInitialPreparationsForm(true);\n }\n }\n }\n\n private notifyChangesToInitialPreparationsForm(value: boolean): void {\n if (!this.productionScheduleInitialPreparationsFormSubject?.closed) {\n this.addProductionSchedule.notifyChangesToInitialPreparationsForm(value);\n this.productionScheduleInitialPreparationsFormSubject?.unsubscribe();\n }\n }\n\n private getAndAssignMachineQualityToProductionSchedule(id: number, canAddJute: boolean = false, adjustObjectsThatDependsOnMachineQuality: boolean = true): void {\n this.machineQualities\n .getById(id)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((weaveQuality: WeaveQuality) => {\n this.assignMachineQualityToProductionSchedule(weaveQuality);\n\n this.productionSchedule.canAddJute = canAddJute ?? weaveQuality.canAddJute;\n\n if (adjustObjectsThatDependsOnMachineQuality) {\n this.adjustObjectsThatDependsOnMachineQuality(this.productionSchedule.machineQuality);\n\n this.formValuesChanged.emit();\n this.notifyChangesToInitialPreparationsForm(true);\n }\n });\n }\n\n private checkIsColoredYarnSetSplitPositionedCorrectly(currentCreel: CreelForProductionSchedule): void {\n this.canShowWarningForIncorrectSplittedCreel = !currentCreel.isColoredYarnSplitPositionedCorrectly;\n }\n\n private assignMachineQualityToProductionSchedule(activeWeaveQuality: WeaveQuality): void {\n this.productionSchedule.machineQuality = !AssertionUtils.isNullOrUndefined(activeWeaveQuality) ? MachineQualityForProductionSchedule.fromWeaveQuality(activeWeaveQuality) : null;\n this.productionScheduleInitialPreparationsForm.controls.machineQuality.setValue(activeWeaveQuality);\n this.productionSchedule.canAddJute = activeWeaveQuality?.canAddJute ?? false;\n\n if (!this.canShowJuteOptions()) {\n this.juteZoneLoaded.emit();\n }\n }\n\n private getActiveCreelFromListOfPossibleCreelsAndAssignToProductionSchedule(activeCreelId: number, mappingForCurrentPositionOnMachine: CreelMap[]): void {\n const creel = this.possibleCreelsForCurrentMachine.find((overviewListCreel: OverviewListCreel) => overviewListCreel.id === activeCreelId);\n\n if (creel) {\n creel.mappingForCurrentPositionOnMachine = mappingForCurrentPositionOnMachine;\n }\n\n this.assignCreelToProductionSchedule(creel);\n }\n\n private updateCanHaveRestAndFreeZonesAndPathLabels(): void {\n this.canHaveRestAndFreeZonesAndPathLabels = this.productionSchedule?.machine?.canHaveRestAndFreeZonesAndPathLabels();\n }\n}\n","export enum ZoneType {\n REST = 'rest',\n FREE = 'free'\n}\n","
\n \n
\n
\n
\n
\n \n
\n
\n
\n
\n \n
\n
\n\n
\n \n {{ 'TEXTILE_DATA.CREEL.NUMBER_OF_DENTS' | bmsTranslate }}\n \n \n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.NUMBER_OF_UNUSED_DENTS' | bmsTranslate: {value: unusedDents} }}\n \n\n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n\n \n {{ 'GENERAL.ERRORS.MAX_VALUE' | bmsTranslate: {max: maxAllowed} }}\n \n \n
\n
\n
\n \n \n \n
\n","import {ChangeDetectionStrategy, ChangeDetectorRef, Component, Inject, OnInit} from '@angular/core';\nimport {FormBuilder, FormControl, FormGroup, Validators} from '@angular/forms';\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {ZoneErrors} from '@domain/production-schedule/zone-errors';\nimport {ZoneWarnings} from '@domain/production-schedule/zone-warnings';\nimport {ZoneType} from '@domain/zone-type.enum';\nimport {PRODUCTION_SCHEDULES, ProductionSchedules} from '@infrastructure/http/production-schedule/production-schedules';\nimport {Zone} from '@presentation/pages/texfab/production-schedule/add/plan/builder/zone';\nimport {PRODUCTION_SCHEDULE_PLAN, ProductionSchedulePlan} from '@presentation/pages/texfab/production-schedule/add/plan/production-schedule-plan';\nimport {AssertionUtils, BaseComponent, canShowErrorForErrorCodeAndFormControlForFormGroup, Message, MessageType, TranslateService} from '@vdw/angular-component-library';\nimport {cloneDeep, keys} from 'lodash-es';\nimport {debounceTime, distinctUntilChanged, filter, finalize, takeUntil, tap} from 'rxjs/operators';\n\n@Component({\n selector: 'app-edit-zone',\n templateUrl: './edit-zone.component.html',\n styleUrls: ['./edit-zone.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class EditZoneComponent extends BaseComponent implements OnInit {\n public editZoneForm: FormGroup<{technicalWidthInDents: FormControl}>;\n public isVerifying = false;\n public unusedDents = 0;\n public maxAllowed = 0;\n public readonly zoneReference: Zone;\n public readonly suggestedZone: Zone;\n\n private zone: Zone;\n private productionSchedule: ProductionSchedule;\n private readonly zoneIndex: number;\n private readonly zoneType: ZoneType;\n\n public constructor(\n @Inject(MAT_DIALOG_DATA) public data: any,\n @Inject(PRODUCTION_SCHEDULES) private readonly productionSchedules: ProductionSchedules,\n @Inject(PRODUCTION_SCHEDULE_PLAN) private readonly productionSchedulePlan: ProductionSchedulePlan,\n private readonly translate: TranslateService,\n private readonly formBuilder: FormBuilder,\n private readonly dialogRef: MatDialogRef,\n private readonly changeDetectorRef: ChangeDetectorRef\n ) {\n super();\n const {suggestedZone, zone, productionSchedule, zoneIndex, zoneType} = data;\n this.zoneType = zoneType;\n this.suggestedZone = suggestedZone;\n this.productionSchedule = cloneDeep(productionSchedule);\n this.zone = zone;\n this.zoneIndex = zoneIndex;\n this.zoneReference = this.getZone(this.productionSchedule);\n }\n\n public ngOnInit(): void {\n this.setUnusedDents();\n this.setFormFields();\n }\n\n public canEditZone(): boolean {\n return this.editZoneForm.valid && this.productionSchedule.canBeModified();\n }\n\n public canShowErrorForFormControl(errorCode: string, formControlName: string): boolean {\n return canShowErrorForErrorCodeAndFormControlForFormGroup(errorCode, formControlName, this.editZoneForm);\n }\n\n public getLabelTranslation(): string {\n let result = 'PRODUCTION_ORDER.WEAVE_PLAN';\n\n if (this.zoneType === ZoneType.FREE) {\n result = `${result}.FREE_ZONE.FREE_ZONE`;\n } else if (this.zoneType === ZoneType.REST) {\n result = `${result}.REST_ZONE.REST_ZONE`;\n }\n\n return this.translate.instant(result, {count: 1});\n }\n\n public getIcon(): string {\n if (this.canShowErrorMessages()) {\n return 'error-full-36px';\n }\n\n if (this.canShowWarningMessages()) {\n return 'warning-full-36px';\n }\n\n return 'info-blue';\n }\n\n public canShowErrorMessages(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.zone.errors);\n }\n\n public canShowWarningMessages(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.zone.warnings);\n }\n\n public getWarningMessages(): Message[] {\n return this.getMessagesForZoneWarningsOrErrors(this.zone.warnings, MessageType.WARNING);\n }\n\n public getErrorMessages(): Message[] {\n return this.getMessagesForZoneWarningsOrErrors(this.zone.errors, MessageType.ERROR);\n }\n\n public close(): void {\n if (!this.isVerifying) {\n this.dialogRef.close();\n }\n }\n\n private getZone(productionSchedule: ProductionSchedule): Zone {\n let result: Zone;\n\n if (this.zoneType === ZoneType.FREE) {\n result = productionSchedule.freeZones[this.zoneIndex];\n } else if (this.zoneType === ZoneType.REST) {\n result = productionSchedule.restZones[this.zoneIndex];\n }\n\n return result;\n }\n\n private setFormFields(): void {\n let productionSchedulePathsWidthInDents = 0;\n this.productionSchedule.productionSchedulePathsOfColoredYarnSets\n .flatMap((path: ProductionSchedulePathsOfColoredYarnSet) => path.productionSchedulePaths)\n .forEach((path: ProductionSchedulePath) => (productionSchedulePathsWidthInDents += path.technicalWidthInDents));\n\n this.maxAllowed = this.productionSchedule.machine.dentsForFabric - productionSchedulePathsWidthInDents;\n\n this.editZoneForm = this.formBuilder.group({\n technicalWidthInDents: [{value: this.zoneReference.technicalWidthInDents, disabled: !this.productionSchedule.canBeModified()}, [Validators.required, Validators.max(this.maxAllowed)]]\n });\n\n if (this.productionSchedule.canBeModified()) {\n this.editZoneForm.controls.technicalWidthInDents.valueChanges\n .pipe(\n tap(() => this.editZoneForm.controls.technicalWidthInDents.markAsTouched()),\n debounceTime(500),\n distinctUntilChanged(),\n filter((technicalWidthInDents: number) => !AssertionUtils.isNullOrUndefined(technicalWidthInDents) && technicalWidthInDents <= this.maxAllowed),\n takeUntil(this.unSubscribeOnViewDestroy)\n )\n .subscribe((technicalWidthInDents: number) => {\n this.zoneReference.technicalWidthInDents = technicalWidthInDents;\n this.checkVerifyProductionSchedule();\n });\n }\n }\n\n private getDifferenceBetweenOldAndNewTechnicalWidthInDents(): number {\n return this.editZoneForm.getRawValue().technicalWidthInDents - this.zone.technicalWidthInDents;\n }\n\n private getZoneErrorOrWarningTranslationKey(key: string): string {\n return {\n totalWidthTooBig: 'ERRORS.TOTAL_WIDTH_TOO_BIG',\n totalWidthTooLittle: 'WARNINGS.TOTAL_WIDTH_TOO_LITTLE',\n freeZoneFixedWidthInDents: 'WARNINGS.FREE_ZONE_FIXED_WIDTH_IN_DENTS',\n restZoneFixedWidthInDents: 'WARNINGS.REST_ZONE_FIXED_WIDTH_IN_DENTS',\n freeZoneUseAsMaximumExceeded: 'ERRORS.FREE_ZONE_USE_AS_MAXIMUM_EXCEEDED',\n pathStartedAtWrongDent: 'ERRORS.PATH_STARTED_AT_WRONG_DENT',\n userDefinedRestAdjusted: 'WARNINGS.USER_DEFINED_REST_ADJUSTED'\n }[key];\n }\n\n private checkVerifyProductionSchedule(): void {\n this.isVerifying = true;\n this.dialogRef.disableClose = true;\n this.changeDetectorRef.detectChanges();\n\n this.productionSchedules\n .checkVerifyProductionSchedule(\n this.productionSchedule.id as string,\n this.zoneType,\n this.zone.startDent,\n this.getDifferenceBetweenOldAndNewTechnicalWidthInDents(),\n this.zone.coloredYarnSetPathNr\n )\n .pipe(\n finalize(() => {\n this.isVerifying = false;\n this.dialogRef.disableClose = false;\n this.changeDetectorRef.detectChanges();\n }),\n takeUntil(this.unSubscribeOnViewDestroy)\n )\n .subscribe((productionSchedule: ProductionSchedule) => {\n this.productionSchedule = ProductionSchedule.modifyProductionScheduleAfterVerify(this.productionSchedule, productionSchedule);\n this.productionSchedulePlan.dispatchNewProductionSchedule(this.productionSchedule);\n\n this.zone = this.getZone(this.productionSchedule);\n this.productionSchedulePlan.setSelectedZone(this.zone);\n\n this.setUnusedDents();\n });\n }\n\n private getMessagesForZoneWarningsOrErrors(zoneWarningsOrErrors: ZoneWarnings | ZoneErrors, type: MessageType): Message[] {\n return keys(zoneWarningsOrErrors).reduce((messages: Message[], key: string) => {\n const value = zoneWarningsOrErrors[key];\n\n if (!AssertionUtils.isNullOrUndefined(value)) {\n let description: string = this.getZoneErrorOrWarningTranslationKey(key);\n\n if (!AssertionUtils.isNullOrUndefined(description)) {\n description = this.translate.instant(`PRODUCTION_ORDER.${description}`, {value});\n }\n\n messages.push(Message.createMessageWithTypeAndDescription(type, description));\n }\n\n return messages;\n }, []);\n }\n\n private setUnusedDents(): void {\n this.unusedDents = this.productionSchedule.productionSchedulePathsOfColoredYarnSets[this.zone.coloredYarnSetPathNr - 1].errors?.totalWidthTooLittle ?? 0;\n }\n}\n","import createMathOperation from './_createMathOperation.js';\n\n/**\n * Subtract two numbers.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Math\n * @param {number} minuend The first number in a subtraction.\n * @param {number} subtrahend The second number in a subtraction.\n * @returns {number} Returns the difference.\n * @example\n *\n * _.subtract(6, 4);\n * // => 2\n */\nvar subtract = createMathOperation(function(minuend, subtrahend) {\n return minuend - subtrahend;\n}, 0);\n\nexport default subtract;\n","
\n
\n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.FREE_ZONE.FREE_ZONE' | bmsTranslate: {count: 1} }}\n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.REST_ZONE.REST_ZONE' | bmsTranslate: {count: 1} }}\n\n \n \n
\n
\n
\n\n \n
\n\n {{ getZoneWidth(zone) }}\n
\n \n \n
\n","import {Component, Inject, Input, OnChanges, SimpleChanges} from '@angular/core';\nimport {PositionOfDialog} from '@domain/position-of-dialog';\nimport {FreeZone} from '@domain/production-schedule/free-zone/free-zone';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {RestZone} from '@domain/production-schedule/rest-zone/rest-zone';\nimport {ZoneType} from '@domain/zone-type.enum';\nimport {RepositionDialogComponent} from '@presentation/components/reposition-dialog/reposition-dialog.component';\nimport {ProductionScheduleBuilderAspectRatio} from '@presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-builder-aspect-ratio';\nimport {Zone} from '@presentation/pages/texfab/production-schedule/add/plan/builder/zone';\nimport {EditZoneComponent} from '@presentation/pages/texfab/production-schedule/add/plan/modals/edit-zone/edit-zone.component';\nimport {ProductionSchedulePlan, PRODUCTION_SCHEDULE_PLAN} from '@presentation/pages/texfab/production-schedule/add/plan/production-schedule-plan';\nimport {BaseComponent, DialogBuilderFactoryService} from '@vdw/angular-component-library';\nimport {each, isEmpty, isEqual, isNil, multiply, reverse, slice, subtract, sum} from 'lodash-es';\nimport {takeUntil} from 'rxjs/operators';\n\ninterface ZoneIndicatorPosition {\n left: number;\n right: number;\n}\n\n@Component({\n selector: 'app-production-schedule-zone',\n templateUrl: './production-schedule-zone.component.html',\n styleUrls: ['./production-schedule-zone.component.scss']\n})\nexport class ProductionScheduleZoneComponent extends BaseComponent implements OnChanges {\n @Input() public productionScheduleBuilderWidth: number;\n @Input() public zones: Zone[];\n @Input() public suggestedZones: Zone[];\n @Input() public aspectRatio: ProductionScheduleBuilderAspectRatio;\n @Input() public productionSchedule: ProductionSchedule;\n\n public readonly zoneIndicatorWidth = 8;\n\n private selectedZone: Zone;\n private selectedZoneIndex: number;\n private zoneIndicatorPositions: ZoneIndicatorPosition[];\n\n public constructor(\n @Inject(PRODUCTION_SCHEDULE_PLAN) private readonly productionSchedulePlan: ProductionSchedulePlan,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService\n ) {\n super();\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if ('zones' in changes || 'aspectRatio' in changes) {\n this.setZoneIndicatorsPosition();\n }\n }\n\n public getZoneIndicatorPosition(zoneIndex: number): number {\n return subtract(this.zoneIndicatorPositions[zoneIndex].left, this.zoneIndicatorWidth);\n }\n\n public onClickZoneIndicator(zoneIndex: number, zoneIndicatorContainerElement: Element): void {\n this.selectedZone = this.zones[zoneIndex];\n this.selectedZoneIndex = zoneIndex;\n this.productionSchedulePlan.setSelectedZone(this.selectedZone);\n\n this.dialogBuilderFactoryService\n .getBuilder()\n .withClass('reposition-dialog')\n .withWidth('254px')\n .openDialog(RepositionDialogComponent, {\n component: EditZoneComponent,\n sourceElement: zoneIndicatorContainerElement,\n positionOfDialog: PositionOfDialog.TOP,\n horizontalOffset: 97,\n productionSchedule: this.productionSchedule,\n suggestedZone: this.getSuggestedZone(zoneIndex),\n zone: this.selectedZone,\n zoneIndex,\n zoneType: this.getZoneType(this.selectedZone)\n })\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe(() => {\n this.deselectZoneInProductionScheduleBuilder();\n });\n }\n\n public getZoneIcon(zoneIndex: number): string {\n const zone = this.zones[zoneIndex];\n const zoneType: ZoneType = this.getZoneType(zone);\n\n let result = `${zoneType}-zone`;\n\n if (this.isZoneSelected(zoneIndex)) {\n result = `${zoneType}-zone-selected`;\n } else if (this.hasZoneBeenModified(zone, zoneIndex)) {\n if (this.hasZoneErrors(zone) || this.hasZoneWarnings(zone)) {\n result = `${zoneType}-zone-modified-with-errors`;\n } else {\n result = `${zoneType}-zone-modified`;\n }\n }\n\n return result;\n }\n\n public isZonesInstanceOfRestZone(zone: Zone): boolean {\n return zone instanceof RestZone;\n }\n\n public isZonesInstanceOfFreeZone(zone: Zone): boolean {\n return zone instanceof FreeZone;\n }\n\n public canShowZoneIndicators(): boolean {\n return !isEmpty(this.zoneIndicatorPositions);\n }\n\n public hasZoneBeenModified(zone: Zone, zoneIndex: number): boolean {\n return !isEqual(zone.technicalWidthInDents, this.suggestedZones[zoneIndex].technicalWidthInDents);\n }\n\n public hasZoneErrors(zone: Zone): boolean {\n return !isNil(zone.errors);\n }\n\n public hasZoneWarnings(zone: Zone): boolean {\n return !isNil(zone.warnings);\n }\n\n public getZoneWidth(zone: Zone): string {\n return `${zone.technicalWidthInDents}`;\n }\n\n public isZoneSelected(zoneIndex: number): boolean {\n return isEqual(zoneIndex, this.selectedZoneIndex);\n }\n\n private calculateZoneIndicatorPosition(zone: Zone): number {\n return zone.startDent + zone.technicalWidthInDents / 2;\n }\n\n private deselectZoneInProductionScheduleBuilder(): void {\n this.selectedZone = null;\n this.selectedZoneIndex = null;\n this.productionSchedulePlan.setSelectedZone(this.selectedZone);\n }\n\n private setZoneIndicatorsPosition(): void {\n this.zoneIndicatorPositions = [];\n\n each(this.zones, (zone: Zone) => {\n const left = multiply(this.calculateZoneIndicatorPosition(zone), this.aspectRatio.width);\n const right = sum([left, this.zoneIndicatorWidth * 2]);\n this.zoneIndicatorPositions.push({left, right});\n });\n\n let currentMaxRightPosition = this.productionScheduleBuilderWidth;\n\n each(reverse(slice(this.zoneIndicatorPositions)), (zoneIndicatorPosition: ZoneIndicatorPosition) => {\n if (zoneIndicatorPosition.right > currentMaxRightPosition) {\n zoneIndicatorPosition.right = currentMaxRightPosition;\n zoneIndicatorPosition.left = zoneIndicatorPosition.right - this.zoneIndicatorWidth * 2;\n }\n\n currentMaxRightPosition = zoneIndicatorPosition.left - this.zoneIndicatorWidth;\n });\n }\n\n private getSuggestedZone(zoneIndex: number): Zone {\n return this.suggestedZones[zoneIndex];\n }\n\n private getZoneType(zone: Zone): ZoneType {\n let result: ZoneType;\n\n if (this.isZonesInstanceOfRestZone(zone)) {\n result = ZoneType.REST;\n } else if (this.isZonesInstanceOfFreeZone(zone)) {\n result = ZoneType.FREE;\n }\n\n return result;\n }\n}\n","import {Drawing} from '@domain/production-schedule/drawing';\nimport {MachineQualityForProductionSchedule} from '@domain/production-schedule/machine-quality-for-production-schedule';\n\nexport function calculateDrawingHeightInPicks(drawing: Drawing, machineQuality: MachineQualityForProductionSchedule): number {\n return drawing.threadByThread ? drawing.dimensionsInPixels.heightInPx : drawing.dimensionsInPixels.heightInPx * machineQuality.weaveStructure.picksPerColorLine;\n}\n","import {CommercialDimensions} from '@domain/commercial-dimensions';\nimport {BmpDrawing} from '@domain/production-schedule/bmp-drawing';\nimport {BmpProductionScheduleItemInPathGroup} from '@domain/production-schedule/bmp-production-schedule-item-in-path-group';\nimport {DrawingType} from '@domain/production-schedule/drawing-type.enum';\nimport {EpDrawing} from '@domain/production-schedule/ep-drawing';\nimport {EpProductionScheduleItemInPathGroup} from '@domain/production-schedule/ep-production-schedule-item-in-path-group';\nimport {FinishingForProductionSchedule} from '@domain/production-schedule/finishing-for-production-schedule';\nimport {JuteProductionScheduleItemInPathGroup} from '@domain/production-schedule/jute-production-schedule-item-in-path-group';\nimport {MachineQualityForProductionSchedule} from '@domain/production-schedule/machine-quality-for-production-schedule';\nimport {ManualNonProductionItemDrawing} from '@domain/production-schedule/manual-non-production-item-drawing';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {TechnicalDimensions} from '@domain/technical-dimensions';\nimport {ListDrawing} from '@presentation/components/drawing-list/list-drawing';\nimport {ListDrawingConfiguration} from '@presentation/components/drawing-list/list-drawing-configuration';\nimport {ListDrawingJute} from '@presentation/components/drawing-list/list-drawing-jute';\nimport {ListDrawingOrderLine} from '@presentation/components/drawing-list/list-drawing-order-line';\nimport {AssertionUtils, convertDentsToMillimeters, convertHeightInMeterToPicks} from '@vdw/angular-component-library';\nimport {calculateDrawingHeightInPicks} from './calculate-drawing-height-in-picks';\nimport {calculateDrawingWidthInDents} from './calculate-drawing-width-in-dents';\n\nexport function createProductionScheduleItemInPathGroupFromDrawing(\n finishingForProductionSchedule: FinishingForProductionSchedule,\n listDrawing: ListDrawing,\n machineQuality: MachineQualityForProductionSchedule\n): ProductionScheduleItemInPathGroup {\n let productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup;\n\n const defaultQuantity = listDrawing.amount;\n const drawing = listDrawing.drawing;\n const orderLineId = listDrawing instanceof ListDrawingOrderLine ? listDrawing.orderLine.id : null;\n\n let technicalDimensions: TechnicalDimensions = {\n heightInPicks: calculateDrawingHeightInPicks(drawing, machineQuality),\n widthInDents: calculateDrawingWidthInDents(drawing, machineQuality)\n };\n let commercialDimensions: CommercialDimensions = null;\n\n if (listDrawing instanceof ListDrawingOrderLine && listDrawing?.orderLine?.article?.design?.repeated && !AssertionUtils.isNullOrUndefined(listDrawing?.rollLengthInMeter)) {\n let heightInPicks = convertHeightInMeterToPicks(listDrawing?.rollLengthInMeter, machineQuality?.pickDensity * 1000, machineQuality?.weaveStructure);\n\n while (heightInPicks % machineQuality?.weaveStructure?.sendRepeat !== 0) {\n heightInPicks++;\n }\n\n technicalDimensions = {\n heightInPicks: heightInPicks,\n widthInDents: listDrawing?.orderLine?.article?.technicalWidthInDents\n };\n\n commercialDimensions = {\n heightInMM: listDrawing?.rollLengthInMeter * 1000,\n widthInMM: listDrawing.orderLine?.article?.commercialWidthInMM\n };\n } else if (listDrawing instanceof ListDrawingOrderLine) {\n technicalDimensions = {\n heightInPicks: listDrawing.orderLine.article.technicalHeightInPicks,\n widthInDents: listDrawing.orderLine.article.technicalWidthInDents\n };\n\n commercialDimensions = {\n heightInMM: listDrawing.orderLine.article.commercialHeightInMM,\n widthInMM: listDrawing.orderLine.article.commercialWidthInMM\n };\n } else if (listDrawing instanceof ListDrawingJute) {\n commercialDimensions = {\n heightInMM: machineQuality.pickDensity > 0.0 ? technicalDimensions.heightInPicks / machineQuality.pickDensity : 0,\n widthInMM: convertDentsToMillimeters({\n valueInDents: technicalDimensions.widthInDents,\n factorForConversionFromMillimetersToDents: machineQuality.reedDensity\n })\n };\n } else if (listDrawing instanceof ListDrawingConfiguration && listDrawing?.drawing?.repeated && !AssertionUtils.isNullOrUndefined(listDrawing?.rollLengthInMeter)) {\n let heightInPicks = convertHeightInMeterToPicks(listDrawing.rollLengthInMeter, machineQuality.pickDensity * 1000, machineQuality.weaveStructure);\n\n while (heightInPicks % machineQuality?.weaveStructure?.sendRepeat !== 0) {\n heightInPicks++;\n }\n\n commercialDimensions = {\n heightInMM: listDrawing.rollLengthInMeter * 1000,\n widthInMM: listDrawing?.commercialDimensionsInMM?.widthInMM\n };\n technicalDimensions.heightInPicks = heightInPicks;\n } else if (listDrawing instanceof ListDrawingConfiguration && !AssertionUtils.isNullOrUndefined(listDrawing?.commercialDimensionsInMM?.heightInMM)) {\n commercialDimensions = {\n heightInMM: listDrawing?.commercialDimensionsInMM?.heightInMM,\n widthInMM: listDrawing?.commercialDimensionsInMM?.widthInMM\n };\n }\n\n switch (drawing.drawingType) {\n case DrawingType.BMP:\n productionScheduleItemInPathGroup = new BmpProductionScheduleItemInPathGroup(\n drawing as BmpDrawing,\n defaultQuantity,\n commercialDimensions,\n technicalDimensions,\n finishingForProductionSchedule,\n true,\n null,\n null,\n null,\n null,\n null,\n orderLineId\n );\n\n break;\n case DrawingType.EP:\n const epDrawing: EpDrawing = drawing as EpDrawing;\n\n productionScheduleItemInPathGroup = new EpProductionScheduleItemInPathGroup(\n drawing as EpDrawing,\n defaultQuantity,\n commercialDimensions,\n technicalDimensions,\n epDrawing.cutbarsLength,\n true,\n null,\n null,\n null,\n null,\n null,\n orderLineId\n );\n break;\n case DrawingType.MANUAL_NON_PRODUCTION_ITEM:\n productionScheduleItemInPathGroup = new JuteProductionScheduleItemInPathGroup(\n drawing as ManualNonProductionItemDrawing,\n commercialDimensions,\n technicalDimensions,\n null,\n null,\n null,\n null,\n null,\n null\n );\n break;\n }\n\n return productionScheduleItemInPathGroup;\n}\n","import {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {flatMap} from 'lodash-es';\n\nexport function getLongestProductionSchedulePath(productionSchedulePathsOfColoredYarnSets: ProductionSchedulePathsOfColoredYarnSet[]): number {\n const pathGroups = flatMap(\n productionSchedulePathsOfColoredYarnSets,\n (productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet) => productionSchedulePathsOfColoredYarnSet.productionSchedulePaths\n );\n return pathGroups.length > 0 ? Math.max(...pathGroups.map((pathGroup: ProductionSchedulePath) => pathGroup.totalLengthInPicks)) : 0;\n}\n","/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * The base implementation of `_.inRange` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to check.\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n */\nfunction baseInRange(number, start, end) {\n return number >= nativeMin(start, end) && number < nativeMax(start, end);\n}\n\nexport default baseInRange;\n","import baseInRange from './_baseInRange.js';\nimport toFinite from './toFinite.js';\nimport toNumber from './toNumber.js';\n\n/**\n * Checks if `n` is between `start` and up to, but not including, `end`. If\n * `end` is not specified, it's set to `start` with `start` then set to `0`.\n * If `start` is greater than `end` the params are swapped to support\n * negative ranges.\n *\n * @static\n * @memberOf _\n * @since 3.3.0\n * @category Number\n * @param {number} number The number to check.\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n * @see _.range, _.rangeRight\n * @example\n *\n * _.inRange(3, 2, 4);\n * // => true\n *\n * _.inRange(4, 8);\n * // => true\n *\n * _.inRange(4, 2);\n * // => false\n *\n * _.inRange(2, 2);\n * // => false\n *\n * _.inRange(1.2, 2);\n * // => true\n *\n * _.inRange(5.2, 4);\n * // => false\n *\n * _.inRange(-3, -2, -6);\n * // => true\n */\nfunction inRange(number, start, end) {\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n number = toNumber(number);\n return baseInRange(number, start, end);\n}\n\nexport default inRange;\n","import {Coordinates} from '@domain/coordinates';\nimport {inRange} from 'lodash-es';\n\nexport function isCoordinateOutOfRangeOfOtherCoordinate(coordinates: Coordinates, otherCoordinates: Coordinates, threshold: number = 30): boolean {\n const isHorizontallyOutOfRange = !inRange(coordinates.x, otherCoordinates.x - threshold, otherCoordinates.x + threshold);\n const isVerticallyOutOfRange = !inRange(coordinates.y, otherCoordinates.y - threshold, otherCoordinates.y + threshold);\n\n return isHorizontallyOutOfRange || isVerticallyOutOfRange;\n}\n","import {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {each, size} from 'lodash-es';\n\nexport function renameProductionSchedulePathsToNewPositionInColoredYarnSets(productionSchedule: ProductionSchedule): ProductionSchedule {\n let pathNumbering = 1;\n\n each(productionSchedule.productionSchedulePathsOfColoredYarnSets, (productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet) => {\n if (size(productionSchedulePathsOfColoredYarnSet.productionSchedulePaths) > 0) {\n each(productionSchedulePathsOfColoredYarnSet.productionSchedulePaths, (productionSchedulePath: ProductionSchedulePath) => {\n productionSchedulePath.name = `Path ${pathNumbering}`;\n productionSchedulePath.pathNumber = pathNumbering;\n pathNumbering++;\n });\n } else {\n pathNumbering++;\n }\n });\n\n return productionSchedule;\n}\n","export enum ProductionScheduleDisplay {\n DETAILVIEW,\n LISTVIEW,\n OVERVIEW\n}\n","export default function(x) {\n return x;\n}\n","import identity from \"./identity.js\";\n\nvar top = 1,\n right = 2,\n bottom = 3,\n left = 4,\n epsilon = 1e-6;\n\nfunction translateX(x) {\n return \"translate(\" + x + \",0)\";\n}\n\nfunction translateY(y) {\n return \"translate(0,\" + y + \")\";\n}\n\nfunction number(scale) {\n return d => +scale(d);\n}\n\nfunction center(scale, offset) {\n offset = Math.max(0, scale.bandwidth() - offset * 2) / 2;\n if (scale.round()) offset = Math.round(offset);\n return d => +scale(d) + offset;\n}\n\nfunction entering() {\n return !this.__axis;\n}\n\nfunction axis(orient, scale) {\n var tickArguments = [],\n tickValues = null,\n tickFormat = null,\n tickSizeInner = 6,\n tickSizeOuter = 6,\n tickPadding = 3,\n offset = typeof window !== \"undefined\" && window.devicePixelRatio > 1 ? 0 : 0.5,\n k = orient === top || orient === left ? -1 : 1,\n x = orient === left || orient === right ? \"x\" : \"y\",\n transform = orient === top || orient === bottom ? translateX : translateY;\n\n function axis(context) {\n var values = tickValues == null ? (scale.ticks ? scale.ticks.apply(scale, tickArguments) : scale.domain()) : tickValues,\n format = tickFormat == null ? (scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments) : identity) : tickFormat,\n spacing = Math.max(tickSizeInner, 0) + tickPadding,\n range = scale.range(),\n range0 = +range[0] + offset,\n range1 = +range[range.length - 1] + offset,\n position = (scale.bandwidth ? center : number)(scale.copy(), offset),\n selection = context.selection ? context.selection() : context,\n path = selection.selectAll(\".domain\").data([null]),\n tick = selection.selectAll(\".tick\").data(values, scale).order(),\n tickExit = tick.exit(),\n tickEnter = tick.enter().append(\"g\").attr(\"class\", \"tick\"),\n line = tick.select(\"line\"),\n text = tick.select(\"text\");\n\n path = path.merge(path.enter().insert(\"path\", \".tick\")\n .attr(\"class\", \"domain\")\n .attr(\"stroke\", \"currentColor\"));\n\n tick = tick.merge(tickEnter);\n\n line = line.merge(tickEnter.append(\"line\")\n .attr(\"stroke\", \"currentColor\")\n .attr(x + \"2\", k * tickSizeInner));\n\n text = text.merge(tickEnter.append(\"text\")\n .attr(\"fill\", \"currentColor\")\n .attr(x, k * spacing)\n .attr(\"dy\", orient === top ? \"0em\" : orient === bottom ? \"0.71em\" : \"0.32em\"));\n\n if (context !== selection) {\n path = path.transition(context);\n tick = tick.transition(context);\n line = line.transition(context);\n text = text.transition(context);\n\n tickExit = tickExit.transition(context)\n .attr(\"opacity\", epsilon)\n .attr(\"transform\", function(d) { return isFinite(d = position(d)) ? transform(d + offset) : this.getAttribute(\"transform\"); });\n\n tickEnter\n .attr(\"opacity\", epsilon)\n .attr(\"transform\", function(d) { var p = this.parentNode.__axis; return transform((p && isFinite(p = p(d)) ? p : position(d)) + offset); });\n }\n\n tickExit.remove();\n\n path\n .attr(\"d\", orient === left || orient === right\n ? (tickSizeOuter ? \"M\" + k * tickSizeOuter + \",\" + range0 + \"H\" + offset + \"V\" + range1 + \"H\" + k * tickSizeOuter : \"M\" + offset + \",\" + range0 + \"V\" + range1)\n : (tickSizeOuter ? \"M\" + range0 + \",\" + k * tickSizeOuter + \"V\" + offset + \"H\" + range1 + \"V\" + k * tickSizeOuter : \"M\" + range0 + \",\" + offset + \"H\" + range1));\n\n tick\n .attr(\"opacity\", 1)\n .attr(\"transform\", function(d) { return transform(position(d) + offset); });\n\n line\n .attr(x + \"2\", k * tickSizeInner);\n\n text\n .attr(x, k * spacing)\n .text(format);\n\n selection.filter(entering)\n .attr(\"fill\", \"none\")\n .attr(\"font-size\", 10)\n .attr(\"font-family\", \"sans-serif\")\n .attr(\"text-anchor\", orient === right ? \"start\" : orient === left ? \"end\" : \"middle\");\n\n selection\n .each(function() { this.__axis = position; });\n }\n\n axis.scale = function(_) {\n return arguments.length ? (scale = _, axis) : scale;\n };\n\n axis.ticks = function() {\n return tickArguments = Array.from(arguments), axis;\n };\n\n axis.tickArguments = function(_) {\n return arguments.length ? (tickArguments = _ == null ? [] : Array.from(_), axis) : tickArguments.slice();\n };\n\n axis.tickValues = function(_) {\n return arguments.length ? (tickValues = _ == null ? null : Array.from(_), axis) : tickValues && tickValues.slice();\n };\n\n axis.tickFormat = function(_) {\n return arguments.length ? (tickFormat = _, axis) : tickFormat;\n };\n\n axis.tickSize = function(_) {\n return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis) : tickSizeInner;\n };\n\n axis.tickSizeInner = function(_) {\n return arguments.length ? (tickSizeInner = +_, axis) : tickSizeInner;\n };\n\n axis.tickSizeOuter = function(_) {\n return arguments.length ? (tickSizeOuter = +_, axis) : tickSizeOuter;\n };\n\n axis.tickPadding = function(_) {\n return arguments.length ? (tickPadding = +_, axis) : tickPadding;\n };\n\n axis.offset = function(_) {\n return arguments.length ? (offset = +_, axis) : offset;\n };\n\n return axis;\n}\n\nexport function axisTop(scale) {\n return axis(top, scale);\n}\n\nexport function axisRight(scale) {\n return axis(right, scale);\n}\n\nexport function axisBottom(scale) {\n return axis(bottom, scale);\n}\n\nexport function axisLeft(scale) {\n return axis(left, scale);\n}\n","const e10 = Math.sqrt(50),\n e5 = Math.sqrt(10),\n e2 = Math.sqrt(2);\n\nfunction tickSpec(start, stop, count) {\n const step = (stop - start) / Math.max(0, count),\n power = Math.floor(Math.log10(step)),\n error = step / Math.pow(10, power),\n factor = error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1;\n let i1, i2, inc;\n if (power < 0) {\n inc = Math.pow(10, -power) / factor;\n i1 = Math.round(start * inc);\n i2 = Math.round(stop * inc);\n if (i1 / inc < start) ++i1;\n if (i2 / inc > stop) --i2;\n inc = -inc;\n } else {\n inc = Math.pow(10, power) * factor;\n i1 = Math.round(start / inc);\n i2 = Math.round(stop / inc);\n if (i1 * inc < start) ++i1;\n if (i2 * inc > stop) --i2;\n }\n if (i2 < i1 && 0.5 <= count && count < 2) return tickSpec(start, stop, count * 2);\n return [i1, i2, inc];\n}\n\nexport default function ticks(start, stop, count) {\n stop = +stop, start = +start, count = +count;\n if (!(count > 0)) return [];\n if (start === stop) return [start];\n const reverse = stop < start, [i1, i2, inc] = reverse ? tickSpec(stop, start, count) : tickSpec(start, stop, count);\n if (!(i2 >= i1)) return [];\n const n = i2 - i1 + 1, ticks = new Array(n);\n if (reverse) {\n if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) / -inc;\n else for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) * inc;\n } else {\n if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) / -inc;\n else for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) * inc;\n }\n return ticks;\n}\n\nexport function tickIncrement(start, stop, count) {\n stop = +stop, start = +start, count = +count;\n return tickSpec(start, stop, count)[2];\n}\n\nexport function tickStep(start, stop, count) {\n stop = +stop, start = +start, count = +count;\n const reverse = stop < start, inc = reverse ? tickIncrement(stop, start, count) : tickIncrement(start, stop, count);\n return (reverse ? -1 : 1) * (inc < 0 ? 1 / -inc : inc);\n}\n","export default function ascending(a, b) {\n return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n","export default function descending(a, b) {\n return a == null || b == null ? NaN\n : b < a ? -1\n : b > a ? 1\n : b >= a ? 0\n : NaN;\n}\n","import ascending from \"./ascending.js\";\nimport descending from \"./descending.js\";\n\nexport default function bisector(f) {\n let compare1, compare2, delta;\n\n // If an accessor is specified, promote it to a comparator. In this case we\n // can test whether the search value is (self-) comparable. We can’t do this\n // for a comparator (except for specific, known comparators) because we can’t\n // tell if the comparator is symmetric, and an asymmetric comparator can’t be\n // used to test whether a single value is comparable.\n if (f.length !== 2) {\n compare1 = ascending;\n compare2 = (d, x) => ascending(f(d), x);\n delta = (d, x) => f(d) - x;\n } else {\n compare1 = f === ascending || f === descending ? f : zero;\n compare2 = f;\n delta = f;\n }\n\n function left(a, x, lo = 0, hi = a.length) {\n if (lo < hi) {\n if (compare1(x, x) !== 0) return hi;\n do {\n const mid = (lo + hi) >>> 1;\n if (compare2(a[mid], x) < 0) lo = mid + 1;\n else hi = mid;\n } while (lo < hi);\n }\n return lo;\n }\n\n function right(a, x, lo = 0, hi = a.length) {\n if (lo < hi) {\n if (compare1(x, x) !== 0) return hi;\n do {\n const mid = (lo + hi) >>> 1;\n if (compare2(a[mid], x) <= 0) lo = mid + 1;\n else hi = mid;\n } while (lo < hi);\n }\n return lo;\n }\n\n function center(a, x, lo = 0, hi = a.length) {\n const i = left(a, x, lo, hi - 1);\n return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;\n }\n\n return {left, center, right};\n}\n\nfunction zero() {\n return 0;\n}\n","import ascending from \"./ascending.js\";\nimport bisector from \"./bisector.js\";\nimport number from \"./number.js\";\n\nconst ascendingBisect = bisector(ascending);\nexport const bisectRight = ascendingBisect.right;\nexport const bisectLeft = ascendingBisect.left;\nexport const bisectCenter = bisector(number).center;\nexport default bisectRight;\n","export default function number(x) {\n return x === null ? NaN : +x;\n}\n\nexport function* numbers(values, valueof) {\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && (value = +value) >= value) {\n yield value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n yield value;\n }\n }\n }\n}\n","export default function(constructor, factory, prototype) {\n constructor.prototype = factory.prototype = prototype;\n prototype.constructor = constructor;\n}\n\nexport function extend(parent, definition) {\n var prototype = Object.create(parent.prototype);\n for (var key in definition) prototype[key] = definition[key];\n return prototype;\n}\n","import define, {extend} from \"./define.js\";\n\nexport function Color() {}\n\nexport var darker = 0.7;\nexport var brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n reN = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n reP = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n reHex = /^#([0-9a-f]{3,8})$/,\n reRgbInteger = new RegExp(`^rgb\\\\(${reI},${reI},${reI}\\\\)$`),\n reRgbPercent = new RegExp(`^rgb\\\\(${reP},${reP},${reP}\\\\)$`),\n reRgbaInteger = new RegExp(`^rgba\\\\(${reI},${reI},${reI},${reN}\\\\)$`),\n reRgbaPercent = new RegExp(`^rgba\\\\(${reP},${reP},${reP},${reN}\\\\)$`),\n reHslPercent = new RegExp(`^hsl\\\\(${reN},${reP},${reP}\\\\)$`),\n reHslaPercent = new RegExp(`^hsla\\\\(${reN},${reP},${reP},${reN}\\\\)$`);\n\nvar named = {\n aliceblue: 0xf0f8ff,\n antiquewhite: 0xfaebd7,\n aqua: 0x00ffff,\n aquamarine: 0x7fffd4,\n azure: 0xf0ffff,\n beige: 0xf5f5dc,\n bisque: 0xffe4c4,\n black: 0x000000,\n blanchedalmond: 0xffebcd,\n blue: 0x0000ff,\n blueviolet: 0x8a2be2,\n brown: 0xa52a2a,\n burlywood: 0xdeb887,\n cadetblue: 0x5f9ea0,\n chartreuse: 0x7fff00,\n chocolate: 0xd2691e,\n coral: 0xff7f50,\n cornflowerblue: 0x6495ed,\n cornsilk: 0xfff8dc,\n crimson: 0xdc143c,\n cyan: 0x00ffff,\n darkblue: 0x00008b,\n darkcyan: 0x008b8b,\n darkgoldenrod: 0xb8860b,\n darkgray: 0xa9a9a9,\n darkgreen: 0x006400,\n darkgrey: 0xa9a9a9,\n darkkhaki: 0xbdb76b,\n darkmagenta: 0x8b008b,\n darkolivegreen: 0x556b2f,\n darkorange: 0xff8c00,\n darkorchid: 0x9932cc,\n darkred: 0x8b0000,\n darksalmon: 0xe9967a,\n darkseagreen: 0x8fbc8f,\n darkslateblue: 0x483d8b,\n darkslategray: 0x2f4f4f,\n darkslategrey: 0x2f4f4f,\n darkturquoise: 0x00ced1,\n darkviolet: 0x9400d3,\n deeppink: 0xff1493,\n deepskyblue: 0x00bfff,\n dimgray: 0x696969,\n dimgrey: 0x696969,\n dodgerblue: 0x1e90ff,\n firebrick: 0xb22222,\n floralwhite: 0xfffaf0,\n forestgreen: 0x228b22,\n fuchsia: 0xff00ff,\n gainsboro: 0xdcdcdc,\n ghostwhite: 0xf8f8ff,\n gold: 0xffd700,\n goldenrod: 0xdaa520,\n gray: 0x808080,\n green: 0x008000,\n greenyellow: 0xadff2f,\n grey: 0x808080,\n honeydew: 0xf0fff0,\n hotpink: 0xff69b4,\n indianred: 0xcd5c5c,\n indigo: 0x4b0082,\n ivory: 0xfffff0,\n khaki: 0xf0e68c,\n lavender: 0xe6e6fa,\n lavenderblush: 0xfff0f5,\n lawngreen: 0x7cfc00,\n lemonchiffon: 0xfffacd,\n lightblue: 0xadd8e6,\n lightcoral: 0xf08080,\n lightcyan: 0xe0ffff,\n lightgoldenrodyellow: 0xfafad2,\n lightgray: 0xd3d3d3,\n lightgreen: 0x90ee90,\n lightgrey: 0xd3d3d3,\n lightpink: 0xffb6c1,\n lightsalmon: 0xffa07a,\n lightseagreen: 0x20b2aa,\n lightskyblue: 0x87cefa,\n lightslategray: 0x778899,\n lightslategrey: 0x778899,\n lightsteelblue: 0xb0c4de,\n lightyellow: 0xffffe0,\n lime: 0x00ff00,\n limegreen: 0x32cd32,\n linen: 0xfaf0e6,\n magenta: 0xff00ff,\n maroon: 0x800000,\n mediumaquamarine: 0x66cdaa,\n mediumblue: 0x0000cd,\n mediumorchid: 0xba55d3,\n mediumpurple: 0x9370db,\n mediumseagreen: 0x3cb371,\n mediumslateblue: 0x7b68ee,\n mediumspringgreen: 0x00fa9a,\n mediumturquoise: 0x48d1cc,\n mediumvioletred: 0xc71585,\n midnightblue: 0x191970,\n mintcream: 0xf5fffa,\n mistyrose: 0xffe4e1,\n moccasin: 0xffe4b5,\n navajowhite: 0xffdead,\n navy: 0x000080,\n oldlace: 0xfdf5e6,\n olive: 0x808000,\n olivedrab: 0x6b8e23,\n orange: 0xffa500,\n orangered: 0xff4500,\n orchid: 0xda70d6,\n palegoldenrod: 0xeee8aa,\n palegreen: 0x98fb98,\n paleturquoise: 0xafeeee,\n palevioletred: 0xdb7093,\n papayawhip: 0xffefd5,\n peachpuff: 0xffdab9,\n peru: 0xcd853f,\n pink: 0xffc0cb,\n plum: 0xdda0dd,\n powderblue: 0xb0e0e6,\n purple: 0x800080,\n rebeccapurple: 0x663399,\n red: 0xff0000,\n rosybrown: 0xbc8f8f,\n royalblue: 0x4169e1,\n saddlebrown: 0x8b4513,\n salmon: 0xfa8072,\n sandybrown: 0xf4a460,\n seagreen: 0x2e8b57,\n seashell: 0xfff5ee,\n sienna: 0xa0522d,\n silver: 0xc0c0c0,\n skyblue: 0x87ceeb,\n slateblue: 0x6a5acd,\n slategray: 0x708090,\n slategrey: 0x708090,\n snow: 0xfffafa,\n springgreen: 0x00ff7f,\n steelblue: 0x4682b4,\n tan: 0xd2b48c,\n teal: 0x008080,\n thistle: 0xd8bfd8,\n tomato: 0xff6347,\n turquoise: 0x40e0d0,\n violet: 0xee82ee,\n wheat: 0xf5deb3,\n white: 0xffffff,\n whitesmoke: 0xf5f5f5,\n yellow: 0xffff00,\n yellowgreen: 0x9acd32\n};\n\ndefine(Color, color, {\n copy(channels) {\n return Object.assign(new this.constructor, this, channels);\n },\n displayable() {\n return this.rgb().displayable();\n },\n hex: color_formatHex, // Deprecated! Use color.formatHex.\n formatHex: color_formatHex,\n formatHex8: color_formatHex8,\n formatHsl: color_formatHsl,\n formatRgb: color_formatRgb,\n toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n return this.rgb().formatHex();\n}\n\nfunction color_formatHex8() {\n return this.rgb().formatHex8();\n}\n\nfunction color_formatHsl() {\n return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n return this.rgb().formatRgb();\n}\n\nexport default function color(format) {\n var m, l;\n format = (format + \"\").trim().toLowerCase();\n return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n : null) // invalid hex\n : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n : null;\n}\n\nfunction rgbn(n) {\n return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n if (a <= 0) r = g = b = NaN;\n return new Rgb(r, g, b, a);\n}\n\nexport function rgbConvert(o) {\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Rgb;\n o = o.rgb();\n return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nexport function rgb(r, g, b, opacity) {\n return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nexport function Rgb(r, g, b, opacity) {\n this.r = +r;\n this.g = +g;\n this.b = +b;\n this.opacity = +opacity;\n}\n\ndefine(Rgb, rgb, extend(Color, {\n brighter(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n darker(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n rgb() {\n return this;\n },\n clamp() {\n return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));\n },\n displayable() {\n return (-0.5 <= this.r && this.r < 255.5)\n && (-0.5 <= this.g && this.g < 255.5)\n && (-0.5 <= this.b && this.b < 255.5)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n formatHex: rgb_formatHex,\n formatHex8: rgb_formatHex8,\n formatRgb: rgb_formatRgb,\n toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;\n}\n\nfunction rgb_formatHex8() {\n return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;\n}\n\nfunction rgb_formatRgb() {\n const a = clampa(this.opacity);\n return `${a === 1 ? \"rgb(\" : \"rgba(\"}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? \")\" : `, ${a})`}`;\n}\n\nfunction clampa(opacity) {\n return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));\n}\n\nfunction clampi(value) {\n return Math.max(0, Math.min(255, Math.round(value) || 0));\n}\n\nfunction hex(value) {\n value = clampi(value);\n return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n if (a <= 0) h = s = l = NaN;\n else if (l <= 0 || l >= 1) h = s = NaN;\n else if (s <= 0) h = NaN;\n return new Hsl(h, s, l, a);\n}\n\nexport function hslConvert(o) {\n if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Hsl;\n if (o instanceof Hsl) return o;\n o = o.rgb();\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n h = NaN,\n s = max - min,\n l = (max + min) / 2;\n if (s) {\n if (r === max) h = (g - b) / s + (g < b) * 6;\n else if (g === max) h = (b - r) / s + 2;\n else h = (r - g) / s + 4;\n s /= l < 0.5 ? max + min : 2 - max - min;\n h *= 60;\n } else {\n s = l > 0 && l < 1 ? 0 : h;\n }\n return new Hsl(h, s, l, o.opacity);\n}\n\nexport function hsl(h, s, l, opacity) {\n return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n}\n\ndefine(Hsl, hsl, extend(Color, {\n brighter(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n darker(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n rgb() {\n var h = this.h % 360 + (this.h < 0) * 360,\n s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n l = this.l,\n m2 = l + (l < 0.5 ? l : 1 - l) * s,\n m1 = 2 * l - m2;\n return new Rgb(\n hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n hsl2rgb(h, m1, m2),\n hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n this.opacity\n );\n },\n clamp() {\n return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));\n },\n displayable() {\n return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n && (0 <= this.l && this.l <= 1)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n formatHsl() {\n const a = clampa(this.opacity);\n return `${a === 1 ? \"hsl(\" : \"hsla(\"}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? \")\" : `, ${a})`}`;\n }\n}));\n\nfunction clamph(value) {\n value = (value || 0) % 360;\n return value < 0 ? value + 360 : value;\n}\n\nfunction clampt(value) {\n return Math.max(0, Math.min(1, value || 0));\n}\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n return (h < 60 ? m1 + (m2 - m1) * h / 60\n : h < 180 ? m2\n : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n : m1) * 255;\n}\n","export function basis(t1, v0, v1, v2, v3) {\n var t2 = t1 * t1, t3 = t2 * t1;\n return ((1 - 3 * t1 + 3 * t2 - t3) * v0\n + (4 - 6 * t2 + 3 * t3) * v1\n + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2\n + t3 * v3) / 6;\n}\n\nexport default function(values) {\n var n = values.length - 1;\n return function(t) {\n var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n v1 = values[i],\n v2 = values[i + 1],\n v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n","export default x => () => x;\n","import constant from \"./constant.js\";\n\nfunction linear(a, d) {\n return function(t) {\n return a + t * d;\n };\n}\n\nfunction exponential(a, b, y) {\n return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n return Math.pow(a + t * b, y);\n };\n}\n\nexport function hue(a, b) {\n var d = b - a;\n return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);\n}\n\nexport function gamma(y) {\n return (y = +y) === 1 ? nogamma : function(a, b) {\n return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n };\n}\n\nexport default function nogamma(a, b) {\n var d = b - a;\n return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n}\n","import {rgb as colorRgb} from \"d3-color\";\nimport basis from \"./basis.js\";\nimport basisClosed from \"./basisClosed.js\";\nimport nogamma, {gamma} from \"./color.js\";\n\nexport default (function rgbGamma(y) {\n var color = gamma(y);\n\n function rgb(start, end) {\n var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n g = color(start.g, end.g),\n b = color(start.b, end.b),\n opacity = nogamma(start.opacity, end.opacity);\n return function(t) {\n start.r = r(t);\n start.g = g(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n rgb.gamma = rgbGamma;\n\n return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n return function(colors) {\n var n = colors.length,\n r = new Array(n),\n g = new Array(n),\n b = new Array(n),\n i, color;\n for (i = 0; i < n; ++i) {\n color = colorRgb(colors[i]);\n r[i] = color.r || 0;\n g[i] = color.g || 0;\n b[i] = color.b || 0;\n }\n r = spline(r);\n g = spline(g);\n b = spline(b);\n color.opacity = 1;\n return function(t) {\n color.r = r(t);\n color.g = g(t);\n color.b = b(t);\n return color + \"\";\n };\n };\n}\n\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);\n","import value from \"./value.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n return (isNumberArray(b) ? numberArray : genericArray)(a, b);\n}\n\nexport function genericArray(a, b) {\n var nb = b ? b.length : 0,\n na = a ? Math.min(nb, a.length) : 0,\n x = new Array(na),\n c = new Array(nb),\n i;\n\n for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);\n for (; i < nb; ++i) c[i] = b[i];\n\n return function(t) {\n for (i = 0; i < na; ++i) c[i] = x[i](t);\n return c;\n };\n}\n","export default function(a, b) {\n var d = new Date;\n return a = +a, b = +b, function(t) {\n return d.setTime(a * (1 - t) + b * t), d;\n };\n}\n","export default function(a, b) {\n return a = +a, b = +b, function(t) {\n return a * (1 - t) + b * t;\n };\n}\n","import value from \"./value.js\";\n\nexport default function(a, b) {\n var i = {},\n c = {},\n k;\n\n if (a === null || typeof a !== \"object\") a = {};\n if (b === null || typeof b !== \"object\") b = {};\n\n for (k in b) {\n if (k in a) {\n i[k] = value(a[k], b[k]);\n } else {\n c[k] = b[k];\n }\n }\n\n return function(t) {\n for (k in i) c[k] = i[k](t);\n return c;\n };\n}\n","import {basis} from \"./basis.js\";\n\nexport default function(values) {\n var n = values.length;\n return function(t) {\n var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n v0 = values[(i + n - 1) % n],\n v1 = values[i % n],\n v2 = values[(i + 1) % n],\n v3 = values[(i + 2) % n];\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n","import number from \"./number.js\";\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n return function() {\n return b;\n };\n}\n\nfunction one(b) {\n return function(t) {\n return b(t) + \"\";\n };\n}\n\nexport default function(a, b) {\n var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n am, // current match in a\n bm, // current match in b\n bs, // string preceding current number in b, if any\n i = -1, // index in s\n s = [], // string constants and placeholders\n q = []; // number interpolators\n\n // Coerce inputs to strings.\n a = a + \"\", b = b + \"\";\n\n // Interpolate pairs of numbers in a & b.\n while ((am = reA.exec(a))\n && (bm = reB.exec(b))) {\n if ((bs = bm.index) > bi) { // a string precedes the next number in b\n bs = b.slice(bi, bs);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n if (s[i]) s[i] += bm; // coalesce with previous string\n else s[++i] = bm;\n } else { // interpolate non-matching numbers\n s[++i] = null;\n q.push({i: i, x: number(am, bm)});\n }\n bi = reB.lastIndex;\n }\n\n // Add remains of b.\n if (bi < b.length) {\n bs = b.slice(bi);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n\n // Special optimization for only a single match.\n // Otherwise, interpolate each of the numbers and rejoin the string.\n return s.length < 2 ? (q[0]\n ? one(q[0].x)\n : zero(b))\n : (b = q.length, function(t) {\n for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n });\n}\n","export default function(a, b) {\n if (!b) b = [];\n var n = a ? Math.min(b.length, a.length) : 0,\n c = b.slice(),\n i;\n return function(t) {\n for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n return c;\n };\n}\n\nexport function isNumberArray(x) {\n return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n","import {color} from \"d3-color\";\nimport rgb from \"./rgb.js\";\nimport {genericArray} from \"./array.js\";\nimport date from \"./date.js\";\nimport number from \"./number.js\";\nimport object from \"./object.js\";\nimport string from \"./string.js\";\nimport constant from \"./constant.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n var t = typeof b, c;\n return b == null || t === \"boolean\" ? constant(b)\n : (t === \"number\" ? number\n : t === \"string\" ? ((c = color(b)) ? (b = c, rgb) : string)\n : b instanceof color ? rgb\n : b instanceof Date ? date\n : isNumberArray(b) ? numberArray\n : Array.isArray(b) ? genericArray\n : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? object\n : number)(a, b);\n}\n","export default function(a, b) {\n return a = +a, b = +b, function(t) {\n return Math.round(a * (1 - t) + b * t);\n };\n}\n","export default function number(x) {\n return +x;\n}\n","import {bisect} from \"d3-array\";\nimport {interpolate as interpolateValue, interpolateNumber, interpolateRound} from \"d3-interpolate\";\nimport constant from \"./constant.js\";\nimport number from \"./number.js\";\n\nvar unit = [0, 1];\n\nexport function identity(x) {\n return x;\n}\n\nfunction normalize(a, b) {\n return (b -= (a = +a))\n ? function(x) { return (x - a) / b; }\n : constant(isNaN(b) ? NaN : 0.5);\n}\n\nfunction clamper(a, b) {\n var t;\n if (a > b) t = a, a = b, b = t;\n return function(x) { return Math.max(a, Math.min(b, x)); };\n}\n\n// normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].\n// interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b].\nfunction bimap(domain, range, interpolate) {\n var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n return function(x) { return r0(d0(x)); };\n}\n\nfunction polymap(domain, range, interpolate) {\n var j = Math.min(domain.length, range.length) - 1,\n d = new Array(j),\n r = new Array(j),\n i = -1;\n\n // Reverse descending domains.\n if (domain[j] < domain[0]) {\n domain = domain.slice().reverse();\n range = range.slice().reverse();\n }\n\n while (++i < j) {\n d[i] = normalize(domain[i], domain[i + 1]);\n r[i] = interpolate(range[i], range[i + 1]);\n }\n\n return function(x) {\n var i = bisect(domain, x, 1, j) - 1;\n return r[i](d[i](x));\n };\n}\n\nexport function copy(source, target) {\n return target\n .domain(source.domain())\n .range(source.range())\n .interpolate(source.interpolate())\n .clamp(source.clamp())\n .unknown(source.unknown());\n}\n\nexport function transformer() {\n var domain = unit,\n range = unit,\n interpolate = interpolateValue,\n transform,\n untransform,\n unknown,\n clamp = identity,\n piecewise,\n output,\n input;\n\n function rescale() {\n var n = Math.min(domain.length, range.length);\n if (clamp !== identity) clamp = clamper(domain[0], domain[n - 1]);\n piecewise = n > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return x == null || isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x)));\n }\n\n scale.invert = function(y) {\n return clamp(untransform((input || (input = piecewise(range, domain.map(transform), interpolateNumber)))(y)));\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = Array.from(_, number), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = Array.from(_), interpolate = interpolateRound, rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = _ ? true : identity, rescale()) : clamp !== identity;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n return function(t, u) {\n transform = t, untransform = u;\n return rescale();\n };\n}\n\nexport default function continuous() {\n return transformer()(identity, identity);\n}\n","export default function constants(x) {\n return function() {\n return x;\n };\n}\n","export function initRange(domain, range) {\n switch (arguments.length) {\n case 0: break;\n case 1: this.range(domain); break;\n default: this.range(range).domain(domain); break;\n }\n return this;\n}\n\nexport function initInterpolator(domain, interpolator) {\n switch (arguments.length) {\n case 0: break;\n case 1: {\n if (typeof domain === \"function\") this.interpolator(domain);\n else this.range(domain);\n break;\n }\n default: {\n this.domain(domain);\n if (typeof interpolator === \"function\") this.interpolator(interpolator);\n else this.range(interpolator);\n break;\n }\n }\n return this;\n}\n","// [[fill]align][sign][symbol][0][width][,][.precision][~][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\n\nexport default function formatSpecifier(specifier) {\n if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n var match;\n return new FormatSpecifier({\n fill: match[1],\n align: match[2],\n sign: match[3],\n symbol: match[4],\n zero: match[5],\n width: match[6],\n comma: match[7],\n precision: match[8] && match[8].slice(1),\n trim: match[9],\n type: match[10]\n });\n}\n\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nexport function FormatSpecifier(specifier) {\n this.fill = specifier.fill === undefined ? \" \" : specifier.fill + \"\";\n this.align = specifier.align === undefined ? \">\" : specifier.align + \"\";\n this.sign = specifier.sign === undefined ? \"-\" : specifier.sign + \"\";\n this.symbol = specifier.symbol === undefined ? \"\" : specifier.symbol + \"\";\n this.zero = !!specifier.zero;\n this.width = specifier.width === undefined ? undefined : +specifier.width;\n this.comma = !!specifier.comma;\n this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n this.trim = !!specifier.trim;\n this.type = specifier.type === undefined ? \"\" : specifier.type + \"\";\n}\n\nFormatSpecifier.prototype.toString = function() {\n return this.fill\n + this.align\n + this.sign\n + this.symbol\n + (this.zero ? \"0\" : \"\")\n + (this.width === undefined ? \"\" : Math.max(1, this.width | 0))\n + (this.comma ? \",\" : \"\")\n + (this.precision === undefined ? \"\" : \".\" + Math.max(0, this.precision | 0))\n + (this.trim ? \"~\" : \"\")\n + this.type;\n};\n","import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport var prefixExponent;\n\nexport default function(x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1],\n i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n n = coefficient.length;\n return i === n ? coefficient\n : i > n ? coefficient + new Array(i - n + 1).join(\"0\")\n : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i)\n : \"0.\" + new Array(1 - i).join(\"0\") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n}\n","export default function(x) {\n return Math.abs(x = Math.round(x)) >= 1e21\n ? x.toLocaleString(\"en\").replace(/,/g, \"\")\n : x.toString(10);\n}\n\n// Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimalParts(1.23) returns [\"123\", 0].\nexport function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n}\n","import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x) {\n return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;\n}\n","import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1];\n return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n}\n","import formatDecimal from \"./formatDecimal.js\";\nimport formatPrefixAuto from \"./formatPrefixAuto.js\";\nimport formatRounded from \"./formatRounded.js\";\n\nexport default {\n \"%\": (x, p) => (x * 100).toFixed(p),\n \"b\": (x) => Math.round(x).toString(2),\n \"c\": (x) => x + \"\",\n \"d\": formatDecimal,\n \"e\": (x, p) => x.toExponential(p),\n \"f\": (x, p) => x.toFixed(p),\n \"g\": (x, p) => x.toPrecision(p),\n \"o\": (x) => Math.round(x).toString(8),\n \"p\": (x, p) => formatRounded(x * 100, p),\n \"r\": formatRounded,\n \"s\": formatPrefixAuto,\n \"X\": (x) => Math.round(x).toString(16).toUpperCase(),\n \"x\": (x) => Math.round(x).toString(16)\n};\n","export default function(x) {\n return x;\n}\n","import exponent from \"./exponent.js\";\nimport formatGroup from \"./formatGroup.js\";\nimport formatNumerals from \"./formatNumerals.js\";\nimport formatSpecifier from \"./formatSpecifier.js\";\nimport formatTrim from \"./formatTrim.js\";\nimport formatTypes from \"./formatTypes.js\";\nimport {prefixExponent} from \"./formatPrefixAuto.js\";\nimport identity from \"./identity.js\";\n\nvar map = Array.prototype.map,\n prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"µ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\nexport default function(locale) {\n var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + \"\"),\n currencyPrefix = locale.currency === undefined ? \"\" : locale.currency[0] + \"\",\n currencySuffix = locale.currency === undefined ? \"\" : locale.currency[1] + \"\",\n decimal = locale.decimal === undefined ? \".\" : locale.decimal + \"\",\n numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)),\n percent = locale.percent === undefined ? \"%\" : locale.percent + \"\",\n minus = locale.minus === undefined ? \"−\" : locale.minus + \"\",\n nan = locale.nan === undefined ? \"NaN\" : locale.nan + \"\";\n\n function newFormat(specifier) {\n specifier = formatSpecifier(specifier);\n\n var fill = specifier.fill,\n align = specifier.align,\n sign = specifier.sign,\n symbol = specifier.symbol,\n zero = specifier.zero,\n width = specifier.width,\n comma = specifier.comma,\n precision = specifier.precision,\n trim = specifier.trim,\n type = specifier.type;\n\n // The \"n\" type is an alias for \",g\".\n if (type === \"n\") comma = true, type = \"g\";\n\n // The \"\" type, and any invalid type, is an alias for \".12~g\".\n else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = \"g\";\n\n // If zero fill is specified, padding goes after sign and before digits.\n if (zero || (fill === \"0\" && align === \"=\")) zero = true, fill = \"0\", align = \"=\";\n\n // Compute the prefix and suffix.\n // For SI-prefix, the suffix is lazily computed.\n var prefix = symbol === \"$\" ? currencyPrefix : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n suffix = symbol === \"$\" ? currencySuffix : /[%p]/.test(type) ? percent : \"\";\n\n // What format function should we use?\n // Is this an integer type?\n // Can this type generate exponential notation?\n var formatType = formatTypes[type],\n maybeSuffix = /[defgprs%]/.test(type);\n\n // Set the default precision if not specified,\n // or clamp the specified precision to the supported range.\n // For significant precision, it must be in [1, 21].\n // For fixed precision, it must be in [0, 20].\n precision = precision === undefined ? 6\n : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))\n : Math.max(0, Math.min(20, precision));\n\n function format(value) {\n var valuePrefix = prefix,\n valueSuffix = suffix,\n i, n, c;\n\n if (type === \"c\") {\n valueSuffix = formatType(value) + valueSuffix;\n value = \"\";\n } else {\n value = +value;\n\n // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n var valueNegative = value < 0 || 1 / value < 0;\n\n // Perform the initial formatting.\n value = isNaN(value) ? nan : formatType(Math.abs(value), precision);\n\n // Trim insignificant zeros.\n if (trim) value = formatTrim(value);\n\n // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.\n if (valueNegative && +value === 0 && sign !== \"+\") valueNegative = false;\n\n // Compute the prefix and suffix.\n valuePrefix = (valueNegative ? (sign === \"(\" ? sign : minus) : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n valueSuffix = (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n // Break the formatted value into the integer “value” part that can be\n // grouped, and fractional or exponential “suffix” part that is not.\n if (maybeSuffix) {\n i = -1, n = value.length;\n while (++i < n) {\n if (c = value.charCodeAt(i), 48 > c || c > 57) {\n valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n value = value.slice(0, i);\n break;\n }\n }\n }\n }\n\n // If the fill character is not \"0\", grouping is applied before padding.\n if (comma && !zero) value = group(value, Infinity);\n\n // Compute the padding.\n var length = valuePrefix.length + value.length + valueSuffix.length,\n padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n // If the fill character is \"0\", grouping is applied after padding.\n if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n // Reconstruct the final output based on the desired alignment.\n switch (align) {\n case \"<\": value = valuePrefix + value + valueSuffix + padding; break;\n case \"=\": value = valuePrefix + padding + value + valueSuffix; break;\n case \"^\": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;\n default: value = padding + valuePrefix + value + valueSuffix; break;\n }\n\n return numerals(value);\n }\n\n format.toString = function() {\n return specifier + \"\";\n };\n\n return format;\n }\n\n function formatPrefix(specifier, value) {\n var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = \"f\", specifier)),\n e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,\n k = Math.pow(10, -e),\n prefix = prefixes[8 + e / 3];\n return function(value) {\n return f(k * value) + prefix;\n };\n }\n\n return {\n format: newFormat,\n formatPrefix: formatPrefix\n };\n}\n","import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var format;\nexport var formatPrefix;\n\ndefaultLocale({\n thousands: \",\",\n grouping: [3],\n currency: [\"$\", \"\"]\n});\n\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n format = locale.format;\n formatPrefix = locale.formatPrefix;\n return locale;\n}\n","import {ticks, tickIncrement} from \"d3-array\";\nimport continuous, {copy} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport tickFormat from \"./tickFormat.js\";\n\nexport function linearish(scale) {\n var domain = scale.domain;\n\n scale.ticks = function(count) {\n var d = domain();\n return ticks(d[0], d[d.length - 1], count == null ? 10 : count);\n };\n\n scale.tickFormat = function(count, specifier) {\n var d = domain();\n return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier);\n };\n\n scale.nice = function(count) {\n if (count == null) count = 10;\n\n var d = domain();\n var i0 = 0;\n var i1 = d.length - 1;\n var start = d[i0];\n var stop = d[i1];\n var prestep;\n var step;\n var maxIter = 10;\n\n if (stop < start) {\n step = start, start = stop, stop = step;\n step = i0, i0 = i1, i1 = step;\n }\n \n while (maxIter-- > 0) {\n step = tickIncrement(start, stop, count);\n if (step === prestep) {\n d[i0] = start\n d[i1] = stop\n return domain(d);\n } else if (step > 0) {\n start = Math.floor(start / step) * step;\n stop = Math.ceil(stop / step) * step;\n } else if (step < 0) {\n start = Math.ceil(start * step) / step;\n stop = Math.floor(stop * step) / step;\n } else {\n break;\n }\n prestep = step;\n }\n\n return scale;\n };\n\n return scale;\n}\n\nexport default function linear() {\n var scale = continuous();\n\n scale.copy = function() {\n return copy(scale, linear());\n };\n\n initRange.apply(scale, arguments);\n\n return linearish(scale);\n}\n","import {tickStep} from \"d3-array\";\nimport {format, formatPrefix, formatSpecifier, precisionFixed, precisionPrefix, precisionRound} from \"d3-format\";\n\nexport default function tickFormat(start, stop, count, specifier) {\n var step = tickStep(start, stop, count),\n precision;\n specifier = formatSpecifier(specifier == null ? \",f\" : specifier);\n switch (specifier.type) {\n case \"s\": {\n var value = Math.max(Math.abs(start), Math.abs(stop));\n if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;\n return formatPrefix(specifier, value);\n }\n case \"\":\n case \"e\":\n case \"g\":\n case \"p\":\n case \"r\": {\n if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === \"e\");\n break;\n }\n case \"f\":\n case \"%\": {\n if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === \"%\") * 2;\n break;\n }\n }\n return format(specifier);\n}\n","import exponent from \"./exponent.js\";\n\nexport default function(step, value) {\n return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));\n}\n","import exponent from \"./exponent.js\";\n\nexport default function(step, max) {\n step = Math.abs(step), max = Math.abs(max) - step;\n return Math.max(0, exponent(max) - exponent(step)) + 1;\n}\n","import exponent from \"./exponent.js\";\n\nexport default function(step) {\n return Math.max(0, -exponent(Math.abs(step)));\n}\n","export default function(grouping, thousands) {\n return function(value, width) {\n var i = value.length,\n t = [],\n j = 0,\n g = grouping[0],\n length = 0;\n\n while (i > 0 && g > 0) {\n if (length + g + 1 > width) g = Math.max(1, width - length);\n t.push(value.substring(i -= g, i + g));\n if ((length += g + 1) > width) break;\n g = grouping[j = (j + 1) % grouping.length];\n }\n\n return t.reverse().join(thousands);\n };\n}\n","export default function(numerals) {\n return function(value) {\n return value.replace(/[0-9]/g, function(i) {\n return numerals[+i];\n });\n };\n}\n","// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.\nexport default function(s) {\n out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (s[i]) {\n case \".\": i0 = i1 = i; break;\n case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;\n }\n }\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}\n","import createRound from './_createRound.js';\n\n/**\n * Computes `number` rounded down to `precision`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Math\n * @param {number} number The number to round down.\n * @param {number} [precision=0] The precision to round down to.\n * @returns {number} Returns the rounded down number.\n * @example\n *\n * _.floor(4.006);\n * // => 4\n *\n * _.floor(0.046, 2);\n * // => 0.04\n *\n * _.floor(4060, -2);\n * // => 4000\n */\nvar floor = createRound('floor');\n\nexport default floor;\n","import {Component} from '@angular/core';\n\n@Component({\n selector: 'app-maximum-buggy-length-warning-dialog',\n templateUrl: './maximum-buggy-length-warning-dialog.component.html',\n styleUrls: ['./maximum-buggy-length-warning-dialog.component.scss']\n})\nexport class MaximumBuggyLengthWarningDialogComponent {}\n","
\n \n
\n

\n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.WARNINGS.MAXIMUM_BUGGY_LENGTH.MESSAGE' | bmsTranslate }}\n

\n
\n
\n","
\n
\n
\n
\n
\n \n\n \n
\n
\n
\n\n \n \n \n\n \n
\n \n \n \n \n \n\n \n
\n
\n\n
\n
\n\n
\n \n\n \n \n
\n \n \n\n
\n
\n \n \n\n \n \n \n {{ 'GENERAL.VALIDATION.MIN' | bmsTranslate }}\n \n \n\n \n \n {{ 'GENERAL.VALIDATION.MAX' | bmsTranslate }}\n \n \n \n \n
\n\n \n \n \n\n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \n \n \n \n\n \n \n \n \n\n \n\n \n \n \n
\n \n\n
\n
\n
\n
\n \n \n \n
\n
\n\n
\n \n \n \n \n
\n
\n \n
\n","import {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n HostListener,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n Output,\n QueryList,\n Renderer2,\n SimpleChanges,\n ViewChild,\n ViewChildren\n} from '@angular/core';\nimport {getLongestProductionSchedulePath} from '@application/helper/production-schedule-builder';\nimport {DimensionsInPx} from '@domain/dimensions-in-px';\nimport {PositionOfDialog} from '@domain/position-of-dialog';\nimport {ProductionOrderCustomSettings} from '@domain/production-schedule/custom-settings/production-order-custom-settings';\nimport {FreeZone} from '@domain/production-schedule/free-zone/free-zone';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionScheduleDisplay} from '@domain/production-schedule/production-schedule-display.enum';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {ProductionSchedulePhase} from '@domain/production-schedule/production-schedule-phase.enum';\nimport {RestZone} from '@domain/production-schedule/rest-zone/rest-zone';\nimport {Permission} from '@domain/profile/permission.enum';\nimport {PropertyValue} from '@domain/property-value';\nimport {OverviewListColoredYarnSetWithStartDent} from '@domain/textile-data/creel/overview-list-colored-yarn-set-with-start-dent';\nimport {RepositionDialogComponent} from '@presentation/components/reposition-dialog/reposition-dialog.component';\nimport {ProductionScheduleZoneComponent} from '@presentation/pages/texfab/production-schedule/add/plan/builder/free-and-rest-zones/production-schedule-zone.component';\nimport {ProductionScheduleBuilderAspectRatio} from '@presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-builder-aspect-ratio';\nimport {ProductionScheduleColoredYarnSetComponent} from '@presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-colored-yarn-set.component';\nimport {ProductionSchedulePathOfColoredYarnSetComponent} from '@presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-path-of-colored-yarn-set/production-schedule-path-of-colored-yarn-set.component';\nimport {Zone} from '@presentation/pages/texfab/production-schedule/add/plan/builder/zone';\nimport {PRODUCTION_SCHEDULE_PLAN, ProductionSchedulePlan} from '@presentation/pages/texfab/production-schedule/add/plan/production-schedule-plan';\nimport {\n AssertionUtils,\n BaseComponent,\n convertCommercialUnit,\n convertDentsToWidthInMeter,\n convertPicksToHeightInMeter,\n DialogBuilderFactoryService,\n EnumUtils,\n MathUtils,\n TranslateService,\n Unit\n} from '@vdw/angular-component-library';\nimport {axisBottom as d3AxisBottom, axisLeft as d3AxisLeft} from 'd3-axis';\nimport {scaleLinear as d3ScaleLinear} from 'd3-scale';\nimport {BaseType, select as d3Select, Selection as d3Selection} from 'd3-selection';\nimport {cloneDeep, floor, forEach, isEqual, isNil, isUndefined, max, maxBy, min, multiply, round, sum} from 'lodash-es';\nimport {Observable, Observer} from 'rxjs';\nimport {debounceTime, takeUntil} from 'rxjs/operators';\nimport {ColorListPreviewWithPositionComponent} from '../color-list-preview-with-position/color-list-preview-with-position.component';\nimport {MaximumBuggyLengthWarningDialogComponent} from './production-schedule-colored-yarn-set/production-schedule-path-of-colored-yarn-set/maximum-buggy-length-warning-dialog/maximum-buggy-length-warning-dialog.component';\n\n@Component({\n selector: 'app-production-schedule-builder',\n templateUrl: './production-schedule-builder.component.html',\n styleUrls: ['./production-schedule-builder.component.scss']\n})\nexport class ProductionScheduleBuilderComponent extends BaseComponent implements AfterViewInit, OnDestroy, OnChanges {\n public static readonly minProductionScheduleBuilderHeightInPicks = 5000;\n public static readonly dentOffset = 1;\n\n @Input() public productionSchedule: ProductionSchedule;\n @Input() public commercialUnit: Unit;\n @Input() public listOfCustomSettings: PropertyValue[];\n @Input() public productionOrderCustomSettings: ProductionOrderCustomSettings;\n @Input() public zoomLevel;\n @Input() public buggyLengthMaxInPicks: number;\n @Input() public buggyLengthMinInPicks: number;\n @Input() public productionSchedulePhase: ProductionSchedulePhase;\n @Input() public selectedProductionScheduleDisplay: ProductionScheduleDisplay;\n @Input() public displayTechnicalUnit = true;\n @Output() public canZoomIn: EventEmitter = new EventEmitter();\n @Output() public canZoomOut: EventEmitter = new EventEmitter();\n @Output() public productionSchedulePlanChanged: EventEmitter = new EventEmitter();\n\n @ViewChild('productionScheduleBuilderContainer') public productionScheduleBuilderContainer: ElementRef;\n @ViewChild('productionScheduleBuilder') public productionScheduleBuilder: ElementRef;\n @ViewChild('productionScheduleBuilderGroup') public productionScheduleBuilderGroup: ElementRef;\n @ViewChild('productionScheduleBuilderVerticalAxis') public productionScheduleBuilderVerticalAxis: ElementRef;\n @ViewChild('productionScheduleBuilderHorizontalAxis') public productionScheduleBuilderHorizontalAxis: ElementRef;\n @ViewChild(ProductionScheduleZoneComponent) public productionScheduleZoneComponent: ProductionScheduleZoneComponent;\n @ViewChild('topScrollIndicator') public topScrollIndicator: ElementRef;\n @ViewChild('bottomScrollIndicator') public bottomScrollIndicator: ElementRef;\n @ViewChild('actionBar') public actionBarElement: ElementRef;\n @ViewChild('builderHeader') public builderHeader: ElementRef;\n @ViewChild('zonesContainer') public zonesContainerElement: ElementRef;\n @ViewChildren('colorListPreviewComponents') public colorListPreviewComponents: QueryList;\n\n public selectedZone: Zone;\n public canShowProductionScheduleBuilder = false;\n public aspectRatio: ProductionScheduleBuilderAspectRatio = {width: 1, height: 1};\n public readonly scrollIndicatorDimensionsInPx: DimensionsInPx = {widthInPx: 33, heightInPx: 22};\n public horizontalPositionOfScrollIndicators: number;\n public productionScheduleBuilderViewportTopPosition = 0;\n public verticalPositionOfBottomScrollIndicator: number;\n public productionScheduleBuilderContainerHeight: number;\n public productionScheduleBuilderContainerWidth: number;\n public isEditPathsEnabled = false;\n public scrollLeftOffset: number;\n public canShowTopScrollIndicator = false;\n public canShowBottomScrollIndicator = false;\n public suggestedRestZones: RestZone[];\n public suggestedFreeZones: FreeZone[];\n public productionScheduleBuilderHeight = 0;\n public readonly permissionToViewBuggyLength = Permission.VIEW_MIN_MAX_BUGGY;\n public readonly productionScheduleBuilderMargin = {right: 50, left: 100};\n public readonly horizontalAxisHeightInPx = 35;\n\n private topScrollIndicatorListenerMouseEnterFn: () => void;\n private topScrollIndicatorListenerMouseClickFn: () => void;\n private bottomScrollIndicatorListenerMouseEnterFn: () => void;\n private bottomScrollIndicatorListenerMouseClickFn: () => void;\n private productionScheduleBuilderSelection: d3Selection;\n private productionScheduleBuilderVerticalAxisSelection: d3Selection;\n private productionScheduleBuilderHorizontalAxisSelection: d3Selection;\n\n private originalProductionScheduleBuilderHeight: number;\n private originalProductionScheduleBuilderWidth = 0;\n private currentHoveredProductionSchedulePathComponent: ProductionSchedulePathOfColoredYarnSetComponent;\n private previousHoveredProductionSchedulePathComponent: ProductionSchedulePathOfColoredYarnSetComponent;\n private targetPositionOfTopScrollIndicator;\n private targetPositionOfBottomScrollIndicator;\n private readonly maxZoomLevel = 5;\n\n private readonly buggyLengthTextOffset = 4;\n private readonly zoneIndicatorWidth = 16;\n private readonly zoneIndicatorLineWidthInPx = 2;\n private readonly approximateHorizontalTicksCount = 10;\n\n public constructor(\n private readonly elementRef: ElementRef,\n private readonly renderer: Renderer2,\n @Inject(PRODUCTION_SCHEDULE_PLAN) private readonly productionSchedulePlan: ProductionSchedulePlan,\n private readonly changeDetectorRef: ChangeDetectorRef,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n private readonly translate: TranslateService\n ) {\n super();\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if ('productionSchedule' in changes) {\n if (!changes.productionSchedule.isFirstChange()) {\n this.setOriginalProductionScheduleBuilderHeight();\n this.setAspectRatioAndUpdateProductionScheduleBuilderContainerOverflow();\n }\n this.setProductionScheduleZones();\n }\n\n if ('zoomLevel' in changes && !changes.zoomLevel.firstChange) {\n if (changes.zoomLevel.currentValue > changes.zoomLevel.previousValue) {\n this.canZoomIn.emit(!isEqual(round(this.zoomLevel), this.maxZoomLevel));\n this.canZoomOut.emit(true);\n } else {\n this.canZoomIn.emit(true);\n this.canZoomOut.emit(\n this.getOriginProductionScheduleBuilderWidth() > this.productionScheduleBuilderContainerWidth || this.productionScheduleBuilderHeight > this.productionScheduleBuilderContainerHeight\n );\n }\n\n this.zoom();\n }\n\n if ('selectedProductionScheduleDisplay' in changes && !changes.selectedProductionScheduleDisplay.isFirstChange()) {\n this.onSelectedProductionScheduleDisplayChange();\n }\n\n if ('displayTechnicalUnit' in changes && !changes.displayTechnicalUnit.isFirstChange()) {\n this.updateHorizontalAxis();\n this.updateVerticalAxis();\n }\n\n setTimeout(() => {\n this.getProductionScheduleBuilderHeight();\n this.reInitialiseProductionScheduleBuilder();\n });\n }\n\n public ngAfterViewInit(): void {\n this.reInitialiseProductionScheduleBuilder();\n\n this.productionSchedulePlan.currentSelectedZone.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe((zone: Zone) => {\n this.selectedZone = zone;\n if (isNil(this.selectedZone)) {\n this.setUpDimensionsForProductionScheduleBuilder();\n setTimeout(() => {\n this.setAspectRatioAndUpdateProductionScheduleBuilderContainerOverflow();\n });\n }\n });\n this.productionSchedulePlan.currentEditingPaths.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe((isEditingPaths: boolean) => (this.isEditPathsEnabled = isEditingPaths));\n\n this.observeElementResize();\n\n setTimeout(() => {\n this.getProductionScheduleBuilderHeight();\n this.reInitialiseProductionScheduleBuilder();\n });\n }\n\n public ngOnDestroy(): void {\n super.ngOnDestroy();\n\n this.productionSchedulePlan.updateEditingPaths(false);\n\n if (!isUndefined(this.topScrollIndicatorListenerMouseClickFn)) {\n this.topScrollIndicatorListenerMouseClickFn();\n }\n if (!isUndefined(this.topScrollIndicatorListenerMouseEnterFn)) {\n this.topScrollIndicatorListenerMouseEnterFn();\n }\n if (!isUndefined(this.bottomScrollIndicatorListenerMouseClickFn)) {\n this.bottomScrollIndicatorListenerMouseClickFn();\n }\n if (!isUndefined(this.bottomScrollIndicatorListenerMouseEnterFn)) {\n this.bottomScrollIndicatorListenerMouseEnterFn();\n }\n }\n\n @HostListener('window:resize')\n public onResize(): void {\n this.getProductionScheduleBuilderHeight();\n }\n\n public preventDefaultEvent(event: any): void {\n event.preventDefault();\n }\n\n public isProductionSchedulePhaseVerify(): boolean {\n return this.productionSchedulePhase === ProductionSchedulePhase.VERIFY;\n }\n\n public canShowRestZones(): boolean {\n return !isNil(this.suggestedRestZones);\n }\n\n public canShowFreeZones(): boolean {\n return !isNil(this.suggestedFreeZones);\n }\n\n public isZoneSelected(zone: Zone): boolean {\n return !isUndefined(zone) && isEqual(this.selectedZone, zone);\n }\n\n public canShowZoneIndicator(zone: Zone): boolean {\n return this.isZoneSelected(zone) && !isUndefined(this.productionScheduleZoneComponent);\n }\n\n public getZoneIndicatorPosition(): number {\n let result = 0;\n\n if (!isNil(this.selectedZone)) {\n result =\n this.getZonePosition(this.selectedZone) +\n (this.getZoneWidth(this.selectedZone) - this.zoneIndicatorWidth + this.zoneIndicatorLineWidthInPx) / 2 -\n this.productionScheduleBuilderContainer.nativeElement.scrollLeft;\n }\n\n return result;\n }\n\n public getProductionScheduleBuilderWidth(): number {\n let result = 0;\n\n if (this.isProductionScheduleDisplayOverview()) {\n const {left, right} = this.productionScheduleBuilderMargin;\n result = this.productionScheduleBuilderContainerWidth - left - right;\n } else if (this.isProductionScheduleDisplayDetailView()) {\n result = this.getOriginProductionScheduleBuilderWidth();\n }\n\n return Number.isFinite(result) && !Number.isNaN(result) ? result : 0;\n }\n\n public onProductionSchedulePlanChanged(): void {\n this.productionSchedulePlanChanged.emit();\n }\n\n public getProductionScheduleBuilderMinBuggyLengthPosition(): number {\n return max([0, this.originalProductionScheduleBuilderHeight - this.buggyLengthMinInPicks]) * this.aspectRatio.height;\n }\n\n public getProductionScheduleBuilderMinBuggyLengthTextPositionY(): number {\n return min([this.getProductionScheduleBuilderMinBuggyLengthPosition() + this.buggyLengthTextOffset, this.productionScheduleBuilderHeight]);\n }\n\n public canShowProductionScheduleBuilderMinBuggyLengthIndicator(): boolean {\n return !isNil(this.buggyLengthMinInPicks) && this.buggyLengthMinInPicks > 0 && this.originalProductionScheduleBuilderHeight >= this.buggyLengthMinInPicks;\n }\n\n public canShowProductionScheduleBuilderMaxBuggyLengthIndicator(): boolean {\n return !isNil(this.buggyLengthMaxInPicks) && this.buggyLengthMaxInPicks > 0 && this.originalProductionScheduleBuilderHeight > this.buggyLengthMaxInPicks;\n }\n\n public getProductionScheduleBuilderMaxBuggyLengthPosition(): number {\n return max([0, this.originalProductionScheduleBuilderHeight - this.buggyLengthMaxInPicks]) * this.aspectRatio.height;\n }\n\n public getProductionScheduleBuilderMaxBuggyLengthTextPositionY(): number {\n return min([this.getProductionScheduleBuilderMaxBuggyLengthPosition() + this.buggyLengthTextOffset, this.productionScheduleBuilderHeight]);\n }\n\n public onScrollProductionScheduleBuilderContainer(event: Event): void {\n const {scrollTop, scrollLeft} = event.target as Element;\n\n this.scrollLeftOffset = scrollLeft;\n\n this.productionScheduleBuilderViewportTopPosition = scrollTop;\n\n this.verticalPositionOfBottomScrollIndicator =\n this.productionScheduleBuilderViewportTopPosition +\n this.productionScheduleBuilderContainer.nativeElement.clientHeight -\n this.horizontalAxisHeightInPx -\n this.getBuilderHeaderHeight() -\n this.scrollIndicatorDimensionsInPx.heightInPx;\n\n this.canShowBottomScrollIndicator = this.isHoveringProductionSchedulePath() && this.canScrollToBottom();\n }\n\n public getOriginProductionScheduleBuilderWidth(): number {\n let result: number;\n if (this.isProductionScheduleDisplayOverview()) {\n const {left} = this.productionScheduleBuilderMargin;\n result = this.productionScheduleBuilderContainerWidth - left;\n } else if (this.isProductionScheduleDisplayDetailView()) {\n result = sum([multiply(this.originalProductionScheduleBuilderWidth, this.aspectRatio.width)]);\n }\n\n return isNaN(result) ? 0 : result;\n }\n\n public getProductionScheduleBuilderHeight(): void {\n let result = 0;\n\n if (this.isProductionScheduleDisplayOverview()) {\n result = this.productionScheduleBuilderContainerHeight - this.horizontalAxisHeightInPx - this.getBuilderHeaderHeight();\n } else if (this.isProductionScheduleDisplayDetailView()) {\n result = multiply(this.originalProductionScheduleBuilderHeight, this.aspectRatio.height);\n }\n\n this.productionScheduleBuilderHeight = AssertionUtils.isNumber(result) && !Number.isNaN(result) ? result : 0;\n }\n\n public canShowZone(zone: Zone): boolean {\n return this.getZoneWidth(zone) > 0;\n }\n\n public getZoneWidth(zone: Zone): number {\n return min([this.getProductionScheduleBuilderWidth() - this.getZonePosition(zone), multiply(zone.technicalWidthInDents, this.aspectRatio.width)]);\n }\n\n public getZonePosition(zone: Zone): number {\n const maximumZonePosition = this.getProductionScheduleBuilderWidth() - this.zoneIndicatorLineWidthInPx;\n return min([multiply(zone.startDent - ProductionScheduleBuilderComponent.dentOffset, this.aspectRatio.width), maximumZonePosition]);\n }\n\n public hoveredProductionSchedulePathComponent(components: {\n coloredYarnSetComponent: ProductionScheduleColoredYarnSetComponent;\n pathComponent: ProductionSchedulePathOfColoredYarnSetComponent;\n }): void {\n this.previousHoveredProductionSchedulePathComponent = this.currentHoveredProductionSchedulePathComponent;\n this.currentHoveredProductionSchedulePathComponent = components.pathComponent;\n if (!isNil(components.pathComponent)) {\n this.horizontalPositionOfScrollIndicators = this.calculateHorizontalPositionOfScrollIndicators(components.coloredYarnSetComponent, components.pathComponent);\n this.targetPositionOfTopScrollIndicator = this.calculateTargetPositionOfTopScrollIndicator(components.pathComponent);\n this.targetPositionOfBottomScrollIndicator = this.calculateTargetPositionOfBottomScrollIndicator();\n\n this.canShowTopScrollIndicator = this.isHoveringProductionSchedulePath() && this.canScrollToTop();\n\n this.changeDetectorRef.detectChanges();\n\n if (this.canShowTopScrollIndicator && !isNil(this.topScrollIndicator)) {\n this.setTopScrollIndicatorEventHandlers();\n }\n\n this.canShowBottomScrollIndicator = this.isHoveringProductionSchedulePath() && this.canScrollToBottom();\n\n if (this.canShowBottomScrollIndicator && !isNil(this.bottomScrollIndicator)) {\n this.setBottomScrollIndicatorEventHandlers();\n }\n }\n setTimeout(() => (this.previousHoveredProductionSchedulePathComponent = null));\n }\n\n public getProductionScheduleColoredYarnSetWidth(productionScheduleColoredYarnSet: OverviewListColoredYarnSetWithStartDent): number {\n return multiply(productionScheduleColoredYarnSet.technicalWidthInDents, this.aspectRatio.width);\n }\n\n public getToolbarTopWidth(): number {\n return this.getContentWidth() - this.productionScheduleBuilderMargin.left;\n }\n\n public getContentWidth(): number {\n const {left, right} = this.productionScheduleBuilderMargin;\n let result = this.getOriginProductionScheduleBuilderWidth();\n\n if (this.isProductionScheduleDisplayOverview()) {\n result += right;\n } else if (this.isProductionScheduleDisplayDetailView()) {\n result += left;\n }\n\n return result;\n }\n\n public getProductionScheduleBuilderHorizontalAxisWidth(): number {\n let result = this.getOriginProductionScheduleBuilderWidth();\n\n if (this.isProductionScheduleDisplayDetailView()) {\n result += this.productionScheduleBuilderMargin.right;\n }\n\n return !isNaN(result) ? result : 0;\n }\n\n public getZoneIndicatorLineHorizontalPosition(zone: Zone): number {\n return (this.getZoneWidth(zone) + this.zoneIndicatorLineWidthInPx) / 2;\n }\n\n public trackByProductionSchedulePathsOfColoredYarnSet = (index: number, productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet): number =>\n productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent;\n\n public canShowMaximumBuggyLengthWarningForProductionSchedulePath(productionSchedulePath: ProductionSchedulePath): boolean {\n return productionSchedulePath.totalLengthInPicks > this.buggyLengthMaxInPicks;\n }\n\n public openMaximumBuggyLengthWarningDialog(event: MouseEvent): void {\n this.dialogBuilderFactoryService.getBuilder().withClass('reposition-dialog').withWidth('400px').withCustomBackdrop('transparent-backdrop').openDialog(RepositionDialogComponent, {\n positionOfDialog: PositionOfDialog.BOTTOM,\n component: MaximumBuggyLengthWarningDialogComponent,\n sourceElement: event.target\n });\n }\n\n public canShowMaximumBuggyLengthWarningForProductionSchedulePathsOfColoredYarnSet(productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet): boolean {\n return isEqual(this.productionSchedulePhase, ProductionSchedulePhase.BUILD) || (this.isProductionSchedulePhaseVerify() && isNil(productionSchedulePathsOfColoredYarnSet.errors));\n }\n\n public canShowFreeAndRestZonesEditor(): boolean {\n return this.isProductionSchedulePhaseVerify() && this.productionSchedule.machine.canHaveRestAndFreeZonesAndPathLabels();\n }\n\n public isProductionScheduleDisplayOverview(): boolean {\n return isEqual(this.selectedProductionScheduleDisplay, ProductionScheduleDisplay.OVERVIEW);\n }\n\n public getWidthInDentsWithAspectRatio(technicalWidthInDents: number): number {\n return technicalWidthInDents * this.aspectRatio.width;\n }\n\n public isProductionSchedulePath(item: ProductionSchedulePath | RestZone | FreeZone): boolean {\n return item instanceof ProductionSchedulePath;\n }\n\n public getProductionSchedulePathLabel(productionSchedulePath: ProductionSchedulePath): string {\n let label = `P${productionSchedulePath.pathNumber} `;\n\n if (this.displayTechnicalUnit) {\n label += this.getLabelForTechnicalDimensions(productionSchedulePath.technicalWidthInDents, productionSchedulePath.totalLengthInPicks ?? 0);\n } else {\n const lengthInCommercialUnit = this.convertValueToCommercialUnit(productionSchedulePath.totalLengthInMM, Unit.MILLIMETER);\n\n const widthInCommercialUnit = this.convertValueToCommercialUnit(productionSchedulePath.commercialWidthInMM, Unit.MILLIMETER);\n\n label += this.getLabelForCommercialDimensions(widthInCommercialUnit, lengthInCommercialUnit);\n }\n\n return label;\n }\n\n public getRestLabelForProductionSchedulePathsOfColoredYarnSet(productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet): string {\n let label = `${this.translate.instant('PRODUCTION_ORDER.WEAVE_PLAN.WEAVE_PLAN_SUMMARY.REST_LENGTH')} `;\n\n if (this.displayTechnicalUnit) {\n const maxProductionSchedulePathInPicks = maxBy(productionSchedulePathsOfColoredYarnSet.productionSchedulePaths, (productionSchedulePath: ProductionSchedulePath) => {\n return productionSchedulePath.totalLengthInPicks;\n });\n\n const productionScheduleHeightInPicks = max([maxProductionSchedulePathInPicks?.totalLengthInPicks, this.buggyLengthMinInPicks]) ?? 0;\n const remainingWidthInDents =\n productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.technicalWidthInDents - productionSchedulePathsOfColoredYarnSet.getProductionSchedulePathsWidthInDents();\n\n label += this.getLabelForTechnicalDimensions(remainingWidthInDents, Math.round(productionScheduleHeightInPicks));\n } else {\n const remainingWidthInMillimeters =\n convertDentsToWidthInMeter(productionSchedulePathsOfColoredYarnSet?.productionScheduleColoredYarnSet?.technicalWidthInDents, this.productionSchedule.machineQuality.reedDensity * 1000) -\n productionSchedulePathsOfColoredYarnSet.getProductionSchedulePathsWidthInMillimeters();\n\n const maxProductionSchedulePathInMM = maxBy(\n productionSchedulePathsOfColoredYarnSet.productionSchedulePaths,\n (productionSchedulePath: ProductionSchedulePath) => productionSchedulePath.totalLengthInMM\n );\n\n const buggyLengthMinInMeters = convertPicksToHeightInMeter(this.buggyLengthMinInPicks, this.productionSchedule.machineQuality.pickDensity * 1000);\n const buggyLengthMinInMillimeters = convertCommercialUnit({from: {unit: Unit.METER, value: buggyLengthMinInMeters}, to: Unit.MILLIMETER});\n\n const productionScheduleHeightInMM = max([maxProductionSchedulePathInMM?.totalLengthInMM, buggyLengthMinInMillimeters]);\n\n const lengthInCommercialUnit = this.convertValueToCommercialUnit(productionScheduleHeightInMM, Unit.MILLIMETER);\n\n const widthInCommercialUnit = this.convertValueToCommercialUnit(remainingWidthInMillimeters, Unit.MILLIMETER);\n\n label += this.getLabelForCommercialDimensions(widthInCommercialUnit, lengthInCommercialUnit);\n }\n\n return label;\n }\n\n private reInitialiseProductionScheduleBuilder(): void {\n setTimeout(() => {\n this.initialiseProductionScheduleBuilderContainerDimensions();\n this.initialiseProductionScheduleBuilder();\n });\n }\n\n private zoom(): void {\n this.setAspectRatio();\n this.updateHorizontalAndVerticalAxis();\n }\n\n private isHoveringProductionSchedulePath(): boolean {\n return !isNil(this.currentHoveredProductionSchedulePathComponent) || !isNil(this.previousHoveredProductionSchedulePathComponent);\n }\n\n private canScrollToTop(): boolean {\n return this.productionScheduleBuilderContainer.nativeElement.scrollTop > this.targetPositionOfTopScrollIndicator;\n }\n\n private canScrollToBottom(): boolean {\n return this.productionScheduleBuilderContainer.nativeElement.scrollTop < this.targetPositionOfBottomScrollIndicator;\n }\n\n private initialiseProductionScheduleBuilderContainerDimensions(): void {\n this.productionScheduleBuilderContainerHeight = this.elementRef.nativeElement.clientHeight - this.getActionBarHeight() - this.getZonesContainerHeight();\n this.productionScheduleBuilderContainerWidth = this.elementRef.nativeElement.clientWidth;\n }\n\n private initialiseProductionScheduleBuilder(): void {\n this.setUpDimensionsForProductionScheduleBuilder();\n\n setTimeout(() => {\n this.initialiseSelections();\n this.setAspectRatioAndUpdateProductionScheduleBuilderContainerOverflow();\n this.scrollToBottomOfProductionScheduleBuilder();\n });\n }\n\n private setUpDimensionsForProductionScheduleBuilder(): void {\n this.setOriginalProductionScheduleBuilderHeight();\n\n this.originalProductionScheduleBuilderWidth = this.productionSchedule.getTotalProductionScheduleWidthInDents();\n\n this.canShowProductionScheduleBuilder = true;\n }\n\n private calculateHorizontalPositionOfScrollIndicators(\n coloredYarnSetComponent: ProductionScheduleColoredYarnSetComponent,\n productionSchedulePathComponent: ProductionSchedulePathOfColoredYarnSetComponent\n ): number {\n return (\n coloredYarnSetComponent.getProductionScheduleColoredYarnSetLeft() +\n productionSchedulePathComponent.getProductionSchedulePathLeft() +\n (productionSchedulePathComponent.getProductionSchedulePathWidth() - this.scrollIndicatorDimensionsInPx.widthInPx) / 2\n );\n }\n\n private calculateTargetPositionOfTopScrollIndicator(productionSchedulePathComponent: ProductionSchedulePathOfColoredYarnSetComponent): number {\n return floor(productionSchedulePathComponent.getProductionSchedulePathTop());\n }\n\n private calculateTargetPositionOfBottomScrollIndicator(): number {\n return this.productionScheduleBuilderContainer.nativeElement.scrollHeight - this.productionScheduleBuilderContainer.nativeElement.clientHeight;\n }\n\n private setTopScrollIndicatorEventHandlers(): void {\n this.topScrollIndicatorListenerMouseEnterFn = this.renderer.listen(this.topScrollIndicator.nativeElement, 'mouseenter', () => {\n this.currentHoveredProductionSchedulePathComponent = this.previousHoveredProductionSchedulePathComponent;\n });\n this.topScrollIndicatorListenerMouseClickFn = this.renderer.listen(this.topScrollIndicator.nativeElement, 'click', () => {\n this.productionScheduleBuilderContainer.nativeElement.scrollTo({\n left: this.productionScheduleBuilderContainer.nativeElement.scrollLeft,\n top: this.targetPositionOfTopScrollIndicator\n });\n });\n }\n\n private setBottomScrollIndicatorEventHandlers(): void {\n this.bottomScrollIndicatorListenerMouseEnterFn = this.renderer.listen(this.bottomScrollIndicator.nativeElement, 'mouseenter', () => {\n this.currentHoveredProductionSchedulePathComponent = this.previousHoveredProductionSchedulePathComponent;\n });\n this.bottomScrollIndicatorListenerMouseClickFn = this.renderer.listen(this.bottomScrollIndicator.nativeElement, 'click', () => {\n this.productionScheduleBuilderContainer.nativeElement.scrollTo({\n left: this.productionScheduleBuilderContainer.nativeElement.scrollLeft,\n top: this.targetPositionOfBottomScrollIndicator\n });\n });\n }\n\n private initialiseSelections(): void {\n this.productionScheduleBuilderSelection = d3Select(this.productionScheduleBuilder.nativeElement);\n this.productionScheduleBuilderVerticalAxisSelection = d3Select(this.productionScheduleBuilderVerticalAxis.nativeElement);\n this.productionScheduleBuilderHorizontalAxisSelection = d3Select(this.productionScheduleBuilderHorizontalAxis.nativeElement);\n }\n\n private setAspectRatioAndUpdateProductionScheduleBuilderContainerOverflow(): void {\n this.setAspectRatio();\n\n if (this.isProductionScheduleDisplayOverview()) {\n this.renderer.setStyle(this.productionScheduleBuilderContainer.nativeElement, 'overflow', 'hidden');\n } else if (this.isProductionScheduleDisplayDetailView()) {\n this.renderer.setStyle(this.productionScheduleBuilderContainer.nativeElement, 'overflow', 'auto');\n }\n\n this.updateHorizontalAndVerticalAxis();\n }\n\n private getTickFormatForVerticalAxis(value: number): string {\n if (this.displayTechnicalUnit) {\n return this.getVerticalTickFormat(value, Unit.PICKS);\n } else {\n const valueInMeters = convertPicksToHeightInMeter(value, this.productionSchedule.machineQuality.pickDensity * 1000);\n const valueInCommercialUnit = this.convertValueToCommercialUnit(valueInMeters, Unit.METER);\n return this.getVerticalTickFormat(valueInCommercialUnit, this.commercialUnit);\n }\n }\n\n private getVerticalTickFormat(value: number, unit: Unit): string {\n return this.getTickLabelTranslationWithUnit(value, unit);\n }\n\n private getTickLabelTranslationWithUnit(value: number, unit: Unit): string {\n return `${value.toString(10)} ${this.translate.instant(`GENERAL.UNIT.${EnumUtils.getKeyFromValue(Unit, unit)}`)}`;\n }\n\n private updateVerticalAxis(): void {\n const {left} = this.productionScheduleBuilderMargin;\n const height = this.productionScheduleBuilderHeight;\n const verticalAxis = d3ScaleLinear().domain([this.originalProductionScheduleBuilderHeight, 0]).range([0, height]);\n const verticalTicksCount = this.isProductionScheduleDisplayOverview() ? 10 : max([floor(height / 250), 10]);\n\n d3AxisLeft(verticalAxis)\n .tickSizeInner(10)\n .tickValues(verticalAxis.ticks(verticalTicksCount))\n .tickFormat((value: number) => this.getTickFormatForVerticalAxis(value))\n .tickPadding(8)\n .tickSizeOuter(0)(this.productionScheduleBuilderVerticalAxisSelection);\n\n this.productionScheduleBuilderVerticalAxisSelection\n .attr('transform', `translate(${left}, 0)`)\n .selectAll('.tick')\n .filter((index: number) => index === 0)\n .remove();\n }\n\n private getTickFormatForHorizontalAxis(value: number, index: number, numberOfTicks: number): string {\n if (this.displayTechnicalUnit) {\n return this.getHorizontalTickFormat(value, Unit.DENTS, numberOfTicks, index);\n } else {\n const valueInMeters = convertDentsToWidthInMeter(value, this.productionSchedule.machineQuality.reedDensity * 1000);\n const valueInCommercialUnit = this.convertValueToCommercialUnit(valueInMeters, Unit.METER);\n return this.getHorizontalTickFormat(valueInCommercialUnit, this.commercialUnit, numberOfTicks, index);\n }\n }\n\n private getHorizontalTickFormat(value: number, unit: Unit, numberOfTicks: number, index: number): string {\n const tickLabelTranslationWithUnit = this.getTickLabelTranslationWithUnit(value, unit);\n return numberOfTicks <= 1 || index === numberOfTicks - 1 ? tickLabelTranslationWithUnit : value.toString(10);\n }\n\n private updateHorizontalAxis(): void {\n let width = this.getOriginProductionScheduleBuilderWidth();\n\n if (this.isProductionScheduleDisplayOverview()) {\n width -= this.productionScheduleBuilderMargin.right;\n }\n\n const horizontalAxis = d3ScaleLinear().domain([1, this.originalProductionScheduleBuilderWidth]).range([0, width]);\n const numberOfTicks = horizontalAxis.ticks(this.approximateHorizontalTicksCount).length;\n\n d3AxisBottom(horizontalAxis)\n .tickSizeInner(10)\n .tickValues(horizontalAxis.ticks(this.approximateHorizontalTicksCount))\n .tickPadding(8)\n .tickSizeOuter(0)\n .tickFormat((value: number, index: number) => this.getTickFormatForHorizontalAxis(value, index, numberOfTicks))(this.productionScheduleBuilderHorizontalAxisSelection);\n }\n\n private updateHorizontalAndVerticalAxis(): void {\n const canUpdateHorizontalAndVerticalAxis = !isUndefined(this.productionScheduleBuilderVerticalAxisSelection) && !isUndefined(this.productionScheduleBuilderHorizontalAxisSelection);\n\n if (canUpdateHorizontalAndVerticalAxis) {\n this.updateHorizontalAxis();\n this.updateVerticalAxis();\n this.resizeColorListPreviewComponents();\n }\n }\n\n private scrollToBottomOfProductionScheduleBuilder(): void {\n this.changeDetectorRef.detectChanges();\n\n this.productionScheduleBuilderContainer.nativeElement.scrollTo({\n left: 0,\n top: this.productionScheduleBuilderContainer.nativeElement.scrollHeight\n });\n }\n\n private setAspectRatio(): void {\n if (this.isProductionScheduleDisplayOverview()) {\n this.aspectRatio = {\n width: MathUtils.divide(this.getProductionScheduleBuilderWidth(), this.originalProductionScheduleBuilderWidth),\n height: MathUtils.divide(this.productionScheduleBuilderHeight, this.originalProductionScheduleBuilderHeight)\n };\n } else if (this.isProductionScheduleDisplayDetailView()) {\n this.aspectRatio = {\n width: this.zoomLevel,\n height: this.zoomLevel\n };\n }\n }\n\n private resizeColorListPreviewComponents(): void {\n forEach(this.colorListPreviewComponents.toArray(), (colorListPreviewComponent: ColorListPreviewWithPositionComponent) => {\n colorListPreviewComponent.calculateCreelPositionsToShow();\n });\n }\n\n private isProductionScheduleDisplayDetailView(): boolean {\n return isEqual(this.selectedProductionScheduleDisplay, ProductionScheduleDisplay.DETAILVIEW);\n }\n\n private setProductionScheduleZones(): void {\n if (this.isProductionSchedulePhaseVerify()) {\n if (isNil(this.suggestedRestZones)) {\n this.suggestedRestZones = cloneDeep(this.productionSchedule.restZones);\n }\n\n if (isNil(this.suggestedFreeZones)) {\n this.suggestedFreeZones = cloneDeep(this.productionSchedule.freeZones);\n }\n } else {\n this.suggestedRestZones = null;\n this.suggestedFreeZones = null;\n }\n }\n\n private getMinimumProductionScheduleBuilderHeight(): number {\n return ProductionScheduleBuilderComponent.minProductionScheduleBuilderHeightInPicks;\n }\n\n private getBuilderHeaderHeight(): number {\n return !isNil(this.builderHeader) ? this.builderHeader.nativeElement.clientHeight : 0;\n }\n\n private getActionBarHeight(): number {\n return !isNil(this.actionBarElement) ? this.actionBarElement.nativeElement.clientHeight : 0;\n }\n\n private onSelectedProductionScheduleDisplayChange(): void {\n if (!isUndefined(this.productionScheduleBuilderSelection)) {\n this.setAspectRatio();\n this.reInitialiseProductionScheduleBuilder();\n }\n }\n\n private setOriginalProductionScheduleBuilderHeight(): void {\n const longestProductionSchedulePath = getLongestProductionSchedulePath(this.productionSchedule.productionSchedulePathsOfColoredYarnSets);\n\n this.originalProductionScheduleBuilderHeight = max([longestProductionSchedulePath, this.getMinimumProductionScheduleBuilderHeight()]);\n }\n\n private observeElementResize(): void {\n let resizeObserver: ResizeObserver;\n\n new Observable((observer: Observer) => {\n resizeObserver = new ResizeObserver(() => {\n if (this.selectedProductionScheduleDisplay === ProductionScheduleDisplay.OVERVIEW && this.canShowProductionScheduleBuilder) {\n observer.next();\n }\n });\n resizeObserver.observe(this.elementRef.nativeElement);\n })\n .pipe(debounceTime(500), takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe({\n next: () => this.onSelectedProductionScheduleDisplayChange(),\n complete: () => resizeObserver.disconnect()\n });\n }\n\n private getZonesContainerHeight(): number {\n return this.zonesContainerElement?.nativeElement.clientHeight ?? 0;\n }\n\n private convertValueToCommercialUnit(value: number, fromUnit: Unit): number {\n return round(\n convertCommercialUnit({\n from: {\n value: value ?? 0,\n unit: fromUnit\n },\n to: this.commercialUnit\n }),\n 2\n );\n }\n\n private getLabelForTechnicalDimensions(technicalWidthInDents: number, technicalHeightInPicks: number): string {\n return `(${technicalWidthInDents} ${this.translate.instant(`GENERAL.UNIT.${EnumUtils.getKeyFromValue(Unit, Unit.DENTS)}`)} X ${technicalHeightInPicks} ${this.translate.instant(\n `GENERAL.UNIT.${EnumUtils.getKeyFromValue(Unit, Unit.PICKS)}`\n )})`;\n }\n\n private getLabelForCommercialDimensions(commercialWidthInCommercialUnit: number, commercialHeightInCommercialUnit: number): string {\n return `(${commercialWidthInCommercialUnit} X ${commercialHeightInCommercialUnit} ${this.translate.instant(`GENERAL.UNIT.${EnumUtils.getKeyFromValue(Unit, this.commercialUnit)}`)})`;\n }\n}\n","import {Component, Inject} from '@angular/core';\nimport {MAT_DIALOG_DATA} from '@angular/material/dialog';\nimport {ProductionScheduleErrors} from '@domain/production-schedule/production-schedule-errors';\nimport {Message, TranslateService} from '@vdw/angular-component-library';\nimport {isNil} from 'lodash-es';\n\n@Component({\n templateUrl: './production-schedule-colored-yarn-set-error-popup.component.html',\n styleUrls: ['./production-schedule-colored-yarn-set-error-popup.component.scss']\n})\nexport class ProductionScheduleColoredYarnSetErrorPopupComponent {\n private errors: ProductionScheduleErrors;\n private translate: TranslateService;\n\n public constructor(\n @Inject(MAT_DIALOG_DATA) public data: any,\n translate: TranslateService\n ) {\n this.errors = data.errors;\n this.translate = translate;\n }\n\n public getMessages(): Message[] {\n const result = [];\n\n if (this.canShowErrorTotalWidthTooBig()) {\n const description = this.translate.instant('PRODUCTION_ORDER.ERRORS.COLORED_YARN_SET_WIDTH_TOO_BIG', {value: this.errors.totalWidthTooBig});\n result.push(Message.createErrorMessageWithDescription(description));\n }\n\n if (this.canShowErrorTotalWidthTooLittle()) {\n const description = this.translate.instant('PRODUCTION_ORDER.ERRORS.COLORED_YARN_SET_WIDTH_TOO_LITTLE', {value: this.errors.totalWidthTooLittle});\n result.push(Message.createErrorMessageWithDescription(description));\n }\n\n return result;\n }\n\n private canShowErrorTotalWidthTooBig(): boolean {\n return !isNil(this.errors.totalWidthTooBig);\n }\n\n private canShowErrorTotalWidthTooLittle(): boolean {\n return !isNil(this.errors.totalWidthTooLittle);\n }\n}\n","
\n \n
\n \n
\n
\n","\n\n\n\n\n \n\n\n\n \n\n\n\n \n \n\n","import {Component, ElementRef, EventEmitter, Inject, Input, OnChanges, OnInit, Output, Renderer2, SimpleChanges, ViewChild} from '@angular/core';\nimport {DraggingService} from '@application/services/dragging/dragging.service';\nimport {ProductionOrderCustomSettings} from '@domain/production-schedule/custom-settings/production-order-custom-settings';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {ProductionSchedulePhase} from '@domain/production-schedule/production-schedule-phase.enum';\nimport {Permission} from '@domain/profile/permission.enum';\nimport {Subscription} from '@domain/profile/subscription';\nimport {Authentication, AUTHENTICATION} from '@infrastructure/http/authentication/authentication';\nimport {ListDrawing} from '@presentation/components/drawing-list/list-drawing';\nimport {RepositionTooltipComponent} from '@presentation/components/reposition-tooltip/reposition-tooltip.component';\nimport {ProductionScheduleBuilderAspectRatio} from '@presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-builder-aspect-ratio';\nimport {ProductionScheduleColoredYarnSetErrorPopupComponent} from '@presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-colored-yarn-set-error-popup/production-schedule-colored-yarn-set-error-popup.component';\nimport {ProductionSchedulePathOfColoredYarnSetComponent} from '@presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-path-of-colored-yarn-set/production-schedule-path-of-colored-yarn-set.component';\nimport {PRODUCTION_SCHEDULE_PLAN, ProductionSchedulePlan} from '@presentation/pages/texfab/production-schedule/add/plan/production-schedule-plan';\nimport {BaseComponent, DialogBuilderFactoryService, DialogType, TranslateService, Unit} from '@vdw/angular-component-library';\nimport {select as d3Select} from 'd3-selection';\nimport {cloneDeep, isEqual, isNil} from 'lodash-es';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: '[app-production-schedule-colored-yarn-set]',\n templateUrl: './production-schedule-colored-yarn-set.component.html',\n styleUrls: ['./production-schedule-colored-yarn-set.component.scss']\n})\nexport class ProductionScheduleColoredYarnSetComponent extends BaseComponent implements OnInit, OnChanges {\n @Input() public productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet;\n @Input() public productionScheduleColoredYarnSetIndex: number;\n @Input() public commercialUnit: Unit;\n @Input() public productionSchedulePhase: ProductionSchedulePhase;\n @Input() public productionScheduleBuilderHeight: number;\n @Input() public aspectRatio: ProductionScheduleBuilderAspectRatio;\n @Input() public productionSchedule: ProductionSchedule;\n @Input() public isEditPathsEnabled: boolean;\n @Input() public productionOrderCustomSettings: ProductionOrderCustomSettings;\n @Input() public isProductionScheduleDisplayOverview: boolean;\n @Output() public hoveredProductionSchedulePathComponent: EventEmitter<{\n coloredYarnSetComponent: ProductionScheduleColoredYarnSetComponent;\n pathComponent: ProductionSchedulePathOfColoredYarnSetComponent;\n }> = new EventEmitter<{\n coloredYarnSetComponent: ProductionScheduleColoredYarnSetComponent;\n pathComponent: ProductionSchedulePathOfColoredYarnSetComponent;\n }>();\n\n @Output() public productionSchedulePlanChanged: EventEmitter = new EventEmitter();\n @ViewChild('productionScheduleColoredYarnSetBackground') public productionScheduleColoredYarnSetBackground: ElementRef;\n\n private currentSubscription: Subscription;\n\n public constructor(\n @Inject(AUTHENTICATION) private readonly authentication: Authentication,\n @Inject(PRODUCTION_SCHEDULE_PLAN) private readonly productionSchedulePlan: ProductionSchedulePlan,\n private readonly elementRef: ElementRef,\n private readonly renderer: Renderer2,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n private readonly draggingService: DraggingService,\n private readonly translate: TranslateService\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this.currentSubscription = this.authentication.getCurrentSubscription();\n this.initialiseProductionScheduleColoredYarnSetComponent();\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if ('aspectRatio' in changes || 'productionSchedule' in changes || 'productionScheduleBuilderHeight' in changes) {\n this.setProductionScheduleColoredYarnSetAttributes();\n }\n }\n\n public onHoveredProductionSchedulePathComponent(productionSchedulePathComponent: ProductionSchedulePathOfColoredYarnSetComponent): void {\n this.hoveredProductionSchedulePathComponent.emit({\n coloredYarnSetComponent: this,\n pathComponent: productionSchedulePathComponent\n });\n }\n\n public onProductionSchedulePlanChanged(): void {\n this.productionSchedulePlanChanged.emit();\n }\n\n public getProductionScheduleColoredYarnSetLeft(): number {\n return this.elementRef.nativeElement.x.baseVal.value;\n }\n\n public getProductionScheduleColoredYarnSetWidth(): number {\n return this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.technicalWidthInDents * this.aspectRatio.width;\n }\n\n public canShowProductionScheduleColoredYarnSetErrorOverlay(): boolean {\n return isEqual(this.productionSchedulePhase, ProductionSchedulePhase.VERIFY) && !isNil(this.productionSchedulePathsOfColoredYarnSet.errors);\n }\n\n public onClickProductionScheduleColoredYarnSetErrorOverlay(event: MouseEvent): void {\n const targetDOMRect: DOMRect = (event.target as HTMLElement).getBoundingClientRect();\n\n this.dialogBuilderFactoryService\n .getBuilder()\n .withClass('reposition-tooltip')\n .openDialog(RepositionTooltipComponent, {\n component: ProductionScheduleColoredYarnSetErrorPopupComponent,\n errors: this.productionSchedulePathsOfColoredYarnSet.errors,\n targetDOMRect: {\n top: event.clientY,\n bottom: targetDOMRect.bottom,\n left: event.clientX,\n right: targetDOMRect.right\n }\n });\n }\n\n public trackByProductionSchedulePath = (index: number, productionSchedulePath: ProductionSchedulePath): number => productionSchedulePath.pathNumber;\n\n public hasPermissionToNewVerifyStep(): boolean {\n return this.currentSubscription?.hasPermission(Permission.TEXFAB_VERIFY_NEW);\n }\n\n private initialiseProductionScheduleColoredYarnSetComponent(): void {\n d3Select(this.elementRef.nativeElement)\n .datum(this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet)\n .on('dragenter', (event: DragEvent) => {\n const isDraggingOverProductionScheduleColoredYarnSet: boolean = d3Select(document.elementFromPoint(event.clientX, event.clientY)).classed('production-schedule-colored-yarn-set-background');\n\n if (\n (this.draggingService.getCurrentData() && 'quantity' in this.draggingService.getCurrentData()) ||\n (!this.isEditPathsEnabled &&\n this.draggingService.getCurrentData() &&\n isDraggingOverProductionScheduleColoredYarnSet &&\n this.productionSchedule.canAddProductionScheduleItemToColoredYarnSet(\n this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent,\n this.draggingService.getCurrentData()\n ))\n ) {\n this.renderer.addClass(this.productionScheduleColoredYarnSetBackground.nativeElement, 'highlight');\n }\n })\n .on('drop', (event: DragEvent) => {\n const isDraggingOverProductionScheduleColoredYarnSet: boolean = d3Select(document.elementFromPoint(event.clientX, event.clientY)).classed('production-schedule-colored-yarn-set-background');\n\n if (this.draggingService.getCurrentData() && 'quantity' in this.draggingService.getCurrentData()) {\n this.dialogBuilderFactoryService\n .getBuilder()\n .withClass('alert-dialog')\n .openAlertDialog({\n titleText: 'PRODUCTION_ORDER.WEAVE_PLAN.WEAVE_PLAN',\n messageText: this.translate.instant('PRODUCTION_ORDER.DESIGN_LIBRARY.ORDER_LINES.CANNOT_ADD_QUANTITY', {quantityAmount: this.draggingService.getCurrentData().quantity}),\n type: DialogType.INFORMATION\n });\n\n this.renderer.removeClass(this.productionScheduleColoredYarnSetBackground.nativeElement, 'highlight');\n } else if (!this.isEditPathsEnabled && !isNil(this.draggingService.getCurrentData()) && isDraggingOverProductionScheduleColoredYarnSet) {\n const draggedItem: ListDrawing = cloneDeep(this.draggingService.getCurrentData());\n\n if (\n this.productionSchedule.canAddProductionScheduleItemToColoredYarnSet(\n this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent,\n this.draggingService.getCurrentData()\n )\n ) {\n this.productionSchedulePlan.addDrawingToColoredYarnSet(draggedItem, this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent);\n } else if (\n !this.productionSchedule.enoughWidthToAddProductionScheduleItemToColoredYarnSet(\n this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent,\n this.draggingService.getCurrentData()\n )\n ) {\n this.dialogBuilderFactoryService.getBuilder().withClass('alert-dialog').openAlertDialog({\n titleText: 'PRODUCTION_ORDER.WEAVE_PLAN.WEAVE_PLAN',\n messageText: 'PRODUCTION_ORDER.WEAVE_PLAN.WARNINGS.NOT_ENOUGH_WIDTH',\n type: DialogType.INFORMATION\n });\n }\n\n this.renderer.removeClass(this.productionScheduleColoredYarnSetBackground.nativeElement, 'highlight');\n }\n d3Select('.drawing-drag-preview').remove();\n })\n .on('dragleave', () => {\n if (!this.isEditPathsEnabled) {\n this.renderer.removeClass(this.productionScheduleColoredYarnSetBackground.nativeElement, 'highlight');\n }\n });\n }\n\n private setProductionScheduleColoredYarnSetAttributes(): void {\n const productionScheduleColoredYarnSetElement = this.elementRef.nativeElement;\n\n this.renderer.setAttribute(productionScheduleColoredYarnSetElement, 'x', `${this.getProductionScheduleColoredYarnSetPosition()}`);\n this.renderer.setAttribute(productionScheduleColoredYarnSetElement, 'width', `${this.getProductionScheduleColoredYarnSetWidth()}`);\n this.renderer.setAttribute(productionScheduleColoredYarnSetElement, 'height', `${this.productionScheduleBuilderHeight}`);\n }\n\n private getProductionScheduleColoredYarnSetPosition(): number {\n return (this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent - 1) * this.aspectRatio.width;\n }\n}\n","import {ElementRef} from '@angular/core';\nimport {select as d3Select} from 'd3-selection';\n\nexport function cloneProductionScheduleElement(elementRef: ElementRef, productionScheduleElementPositionX: number): void {\n const productionScheduleElementSelection = d3Select(elementRef.nativeElement);\n productionScheduleElementSelection.node().classList.add('dragged-production-schedule-element');\n const productionScheduleElementNode: SVGGraphicsElement = productionScheduleElementSelection.node();\n const productionScheduleWrapper = d3Select('.production-schedule-builder-group');\n const productionScheduleWrapperElement: SVGGraphicsElement = productionScheduleWrapper.node() as SVGGraphicsElement;\n productionScheduleElementNode.parentNode.insertBefore(productionScheduleElementNode.cloneNode(true), productionScheduleElementNode.nextSibling);\n const productionScheduleElementClone = productionScheduleElementSelection.attr('x', productionScheduleElementPositionX).attr('class', 'production-schedule-element-clone');\n productionScheduleWrapperElement.appendChild(productionScheduleElementClone.node());\n productionScheduleElementClone.append('rect');\n}\n","import {Coordinates} from '@domain/coordinates';\nimport {ClosestProductionScheduleItemInPathGroup} from '@domain/production-schedule/closest-production-schedule-item-in-path-group';\nimport {findIndex, isEqual, size, sum} from 'lodash-es';\n\nexport function getClosestProductionScheduleItemAndIndexRelativeToMouseCoordinates(\n mouseCoordinates: Coordinates,\n productionScheduleItems: SVGGraphicsElement[]\n): ClosestProductionScheduleItemInPathGroup {\n let indexOfClosestProductionScheduleItemInPathGroup = findIndex(productionScheduleItems, (productionScheduleItemInPathGroup: SVGGraphicsElement) => {\n const y = Number(productionScheduleItemInPathGroup.getAttribute('y'));\n const height = Number(productionScheduleItemInPathGroup.getAttribute('height'));\n\n return mouseCoordinates.y >= y && mouseCoordinates.y <= sum([y, height]);\n });\n\n if (isEqual(indexOfClosestProductionScheduleItemInPathGroup, -1)) {\n indexOfClosestProductionScheduleItemInPathGroup = size(productionScheduleItems) - 1;\n }\n\n return {\n element: productionScheduleItems[indexOfClosestProductionScheduleItemInPathGroup],\n index: indexOfClosestProductionScheduleItemInPathGroup\n };\n}\n","import {Coordinates} from '@domain/coordinates';\nimport {ContainerElement, pointer as d3Pointer, select as d3Select} from 'd3-selection';\n\nexport function getMouseCoordinatesInProductionScheduleBuilderGroup(event: DragEvent): Coordinates {\n const productionScheduleBuilderGroupElement = d3Select('.production-schedule-builder-group').node() as ContainerElement;\n const [mouseCoordinateX, mouseCoordinateY] = d3Pointer(event, productionScheduleBuilderGroupElement);\n\n return {\n x: mouseCoordinateX,\n y: mouseCoordinateY\n };\n}\n","import array from \"./array.js\";\nimport {Selection, root} from \"./selection/index.js\";\n\nexport default function(selector) {\n return typeof selector === \"string\"\n ? new Selection([document.querySelectorAll(selector)], [document.documentElement])\n : new Selection([array(selector)], root);\n}\n","import {Coordinates} from '@domain/coordinates';\nimport {BaseType, select as d3Select, selectAll as d3SelectAll, Selection as d3Selection} from 'd3-selection';\n\nexport function getUnderlyingElement({x, y}: Coordinates, parentClass: string): d3Selection {\n let underlyingElementSelection: d3Selection = null;\n\n d3SelectAll(parentClass)\n .filter('svg')\n .nodes()\n .forEach((svgGraphicsElement: SVGGraphicsElement) => {\n const {left, right, top, bottom} = svgGraphicsElement.getBoundingClientRect();\n\n if (x >= left && x <= right && y >= top && y <= bottom) {\n underlyingElementSelection = d3Select(svgGraphicsElement);\n }\n });\n\n return underlyingElementSelection;\n}\n","import {Coordinates} from '@domain/coordinates';\n\nexport function isInLowerHalfOfProductionScheduleItem(mouseCoordinates: Coordinates, productionScheduleItem: SVGGraphicsElement): boolean {\n const heightOfClosestProductionScheduleItem = Number(productionScheduleItem.getAttribute('height'));\n const verticalPositionOfClosestProductionScheduleItem = Number(productionScheduleItem.getAttribute('y'));\n const verticalCenterOfProductionScheduleItem = verticalPositionOfClosestProductionScheduleItem + heightOfClosestProductionScheduleItem / 2;\n\n return mouseCoordinates.y > verticalCenterOfProductionScheduleItem;\n}\n","\n\n
\n \n \n
\n","import {AfterViewInit, Component, ElementRef, Inject, ViewChild} from '@angular/core';\nimport {MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';\nimport {Coordinates} from '@domain/coordinates';\nimport {Unit} from '@vdw/angular-component-library';\nimport {isUndefined, subtract, sum} from 'lodash-es';\n\n@Component({\n templateUrl: './edit-production-schedule-path-of-colored-yarn-set.component.html',\n styleUrls: ['./edit-production-schedule-path-of-colored-yarn-set.component.scss']\n})\nexport class EditProductionSchedulePathOfColoredYarnSetComponent implements AfterViewInit {\n @ViewChild('matCardElement', {read: ElementRef}) public matCardElement: ElementRef;\n\n public readonly commercialUnit: Unit;\n public arrowPosition: Coordinates;\n\n private readonly dialogRef: MatDialogRef;\n private readonly matDialogPosition: Coordinates;\n private readonly cursorOffset = 16;\n\n public constructor(\n @Inject(MAT_DIALOG_DATA) public data: any,\n dialogRef: MatDialogRef\n ) {\n this.dialogRef = dialogRef;\n this.matDialogPosition = data.matDialogPosition;\n }\n\n public ngAfterViewInit(): void {\n this.repositionMatDialog();\n }\n\n public close(): void {\n this.dialogRef.close(false);\n }\n\n public deleteProductionSchedulePathOfColoredYarnSet(): void {\n this.dialogRef.close(true);\n }\n\n public canShowArrow(): boolean {\n return !isUndefined(this.arrowPosition);\n }\n\n private repositionMatDialog(): void {\n if (!isUndefined(this.matDialogPosition)) {\n const {height: matCardHeight}: DOMRect = this.matCardElement.nativeElement.getBoundingClientRect();\n const matDialogPositionTop = subtract(this.matDialogPosition.y, matCardHeight / 2);\n\n this.dialogRef.updatePosition({\n top: `${matDialogPositionTop}px`,\n left: `${sum([this.matDialogPosition.x, this.cursorOffset])}px`\n });\n\n setTimeout(() => {\n this.setArrowPositions();\n });\n }\n }\n\n private setArrowPositions(): void {\n const matIconWidth = 24;\n const matIconHeight = 24;\n const matIconOffset = 4;\n\n this.arrowPosition = {\n y: this.matDialogPosition.y - matIconHeight / 2,\n x: subtract(this.matDialogPosition.x, matIconWidth) + this.cursorOffset + matIconOffset\n };\n }\n}\n","var noop = {value: () => {}};\n\nfunction dispatch() {\n for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n if (!(t = arguments[i] + \"\") || (t in _) || /[\\s.]/.test(t)) throw new Error(\"illegal type: \" + t);\n _[t] = [];\n }\n return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n return {type: t, name: name};\n });\n}\n\nDispatch.prototype = dispatch.prototype = {\n constructor: Dispatch,\n on: function(typename, callback) {\n var _ = this._,\n T = parseTypenames(typename + \"\", _),\n t,\n i = -1,\n n = T.length;\n\n // If no callback was specified, return the callback of the given type and name.\n if (arguments.length < 2) {\n while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n return;\n }\n\n // If a type was specified, set the callback for the given type and name.\n // Otherwise, if a null callback was specified, remove callbacks of the given name.\n if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n while (++i < n) {\n if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n }\n\n return this;\n },\n copy: function() {\n var copy = {}, _ = this._;\n for (var t in _) copy[t] = _[t].slice();\n return new Dispatch(copy);\n },\n call: function(type, that) {\n if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n },\n apply: function(type, that, args) {\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n }\n};\n\nfunction get(type, name) {\n for (var i = 0, n = type.length, c; i < n; ++i) {\n if ((c = type[i]).name === name) {\n return c.value;\n }\n }\n}\n\nfunction set(type, name, callback) {\n for (var i = 0, n = type.length; i < n; ++i) {\n if (type[i].name === name) {\n type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n break;\n }\n }\n if (callback != null) type.push({name: name, value: callback});\n return type;\n}\n\nexport default dispatch;\n","// These are typically used in conjunction with noevent to ensure that we can\n// preventDefault on the event.\nexport const nonpassive = {passive: false};\nexport const nonpassivecapture = {capture: true, passive: false};\n\nexport function nopropagation(event) {\n event.stopImmediatePropagation();\n}\n\nexport default function(event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n}\n","export default x => () => x;\n","export default function DragEvent(type, {\n sourceEvent,\n subject,\n target,\n identifier,\n active,\n x, y, dx, dy,\n dispatch\n}) {\n Object.defineProperties(this, {\n type: {value: type, enumerable: true, configurable: true},\n sourceEvent: {value: sourceEvent, enumerable: true, configurable: true},\n subject: {value: subject, enumerable: true, configurable: true},\n target: {value: target, enumerable: true, configurable: true},\n identifier: {value: identifier, enumerable: true, configurable: true},\n active: {value: active, enumerable: true, configurable: true},\n x: {value: x, enumerable: true, configurable: true},\n y: {value: y, enumerable: true, configurable: true},\n dx: {value: dx, enumerable: true, configurable: true},\n dy: {value: dy, enumerable: true, configurable: true},\n _: {value: dispatch}\n });\n}\n\nDragEvent.prototype.on = function() {\n var value = this._.on.apply(this._, arguments);\n return value === this._ ? this : value;\n};\n","import {dispatch} from \"d3-dispatch\";\nimport {select, pointer} from \"d3-selection\";\nimport nodrag, {yesdrag} from \"./nodrag.js\";\nimport noevent, {nonpassive, nonpassivecapture, nopropagation} from \"./noevent.js\";\nimport constant from \"./constant.js\";\nimport DragEvent from \"./event.js\";\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter(event) {\n return !event.ctrlKey && !event.button;\n}\n\nfunction defaultContainer() {\n return this.parentNode;\n}\n\nfunction defaultSubject(event, d) {\n return d == null ? {x: event.x, y: event.y} : d;\n}\n\nfunction defaultTouchable() {\n return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\nexport default function() {\n var filter = defaultFilter,\n container = defaultContainer,\n subject = defaultSubject,\n touchable = defaultTouchable,\n gestures = {},\n listeners = dispatch(\"start\", \"drag\", \"end\"),\n active = 0,\n mousedownx,\n mousedowny,\n mousemoving,\n touchending,\n clickDistance2 = 0;\n\n function drag(selection) {\n selection\n .on(\"mousedown.drag\", mousedowned)\n .filter(touchable)\n .on(\"touchstart.drag\", touchstarted)\n .on(\"touchmove.drag\", touchmoved, nonpassive)\n .on(\"touchend.drag touchcancel.drag\", touchended)\n .style(\"touch-action\", \"none\")\n .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n\n function mousedowned(event, d) {\n if (touchending || !filter.call(this, event, d)) return;\n var gesture = beforestart(this, container.call(this, event, d), event, d, \"mouse\");\n if (!gesture) return;\n select(event.view)\n .on(\"mousemove.drag\", mousemoved, nonpassivecapture)\n .on(\"mouseup.drag\", mouseupped, nonpassivecapture);\n nodrag(event.view);\n nopropagation(event);\n mousemoving = false;\n mousedownx = event.clientX;\n mousedowny = event.clientY;\n gesture(\"start\", event);\n }\n\n function mousemoved(event) {\n noevent(event);\n if (!mousemoving) {\n var dx = event.clientX - mousedownx, dy = event.clientY - mousedowny;\n mousemoving = dx * dx + dy * dy > clickDistance2;\n }\n gestures.mouse(\"drag\", event);\n }\n\n function mouseupped(event) {\n select(event.view).on(\"mousemove.drag mouseup.drag\", null);\n yesdrag(event.view, mousemoving);\n noevent(event);\n gestures.mouse(\"end\", event);\n }\n\n function touchstarted(event, d) {\n if (!filter.call(this, event, d)) return;\n var touches = event.changedTouches,\n c = container.call(this, event, d),\n n = touches.length, i, gesture;\n\n for (i = 0; i < n; ++i) {\n if (gesture = beforestart(this, c, event, d, touches[i].identifier, touches[i])) {\n nopropagation(event);\n gesture(\"start\", event, touches[i]);\n }\n }\n }\n\n function touchmoved(event) {\n var touches = event.changedTouches,\n n = touches.length, i, gesture;\n\n for (i = 0; i < n; ++i) {\n if (gesture = gestures[touches[i].identifier]) {\n noevent(event);\n gesture(\"drag\", event, touches[i]);\n }\n }\n }\n\n function touchended(event) {\n var touches = event.changedTouches,\n n = touches.length, i, gesture;\n\n if (touchending) clearTimeout(touchending);\n touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!\n for (i = 0; i < n; ++i) {\n if (gesture = gestures[touches[i].identifier]) {\n nopropagation(event);\n gesture(\"end\", event, touches[i]);\n }\n }\n }\n\n function beforestart(that, container, event, d, identifier, touch) {\n var dispatch = listeners.copy(),\n p = pointer(touch || event, container), dx, dy,\n s;\n\n if ((s = subject.call(that, new DragEvent(\"beforestart\", {\n sourceEvent: event,\n target: drag,\n identifier,\n active,\n x: p[0],\n y: p[1],\n dx: 0,\n dy: 0,\n dispatch\n }), d)) == null) return;\n\n dx = s.x - p[0] || 0;\n dy = s.y - p[1] || 0;\n\n return function gesture(type, event, touch) {\n var p0 = p, n;\n switch (type) {\n case \"start\": gestures[identifier] = gesture, n = active++; break;\n case \"end\": delete gestures[identifier], --active; // falls through\n case \"drag\": p = pointer(touch || event, container), n = active; break;\n }\n dispatch.call(\n type,\n that,\n new DragEvent(type, {\n sourceEvent: event,\n subject: s,\n target: drag,\n identifier,\n active: n,\n x: p[0] + dx,\n y: p[1] + dy,\n dx: p[0] - p0[0],\n dy: p[1] - p0[1],\n dispatch\n }),\n d\n );\n };\n }\n\n drag.filter = function(_) {\n return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant(!!_), drag) : filter;\n };\n\n drag.container = function(_) {\n return arguments.length ? (container = typeof _ === \"function\" ? _ : constant(_), drag) : container;\n };\n\n drag.subject = function(_) {\n return arguments.length ? (subject = typeof _ === \"function\" ? _ : constant(_), drag) : subject;\n };\n\n drag.touchable = function(_) {\n return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), drag) : touchable;\n };\n\n drag.on = function() {\n var value = listeners.on.apply(listeners, arguments);\n return value === listeners ? drag : value;\n };\n\n drag.clickDistance = function(_) {\n return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2);\n };\n\n return drag;\n}\n","import {select} from \"d3-selection\";\nimport noevent, {nonpassivecapture} from \"./noevent.js\";\n\nexport default function(view) {\n var root = view.document.documentElement,\n selection = select(view).on(\"dragstart.drag\", noevent, nonpassivecapture);\n if (\"onselectstart\" in root) {\n selection.on(\"selectstart.drag\", noevent, nonpassivecapture);\n } else {\n root.__noselect = root.style.MozUserSelect;\n root.style.MozUserSelect = \"none\";\n }\n}\n\nexport function yesdrag(view, noclick) {\n var root = view.document.documentElement,\n selection = select(view).on(\"dragstart.drag\", null);\n if (noclick) {\n selection.on(\"click.drag\", noevent, nonpassivecapture);\n setTimeout(function() { selection.on(\"click.drag\", null); }, 0);\n }\n if (\"onselectstart\" in root) {\n selection.on(\"selectstart.drag\", null);\n } else {\n root.style.MozUserSelect = root.__noselect;\n delete root.__noselect;\n }\n}\n","export enum PathItemInfoTooltipContext {\n PATH_BAR,\n PATH_DESIGN\n}\n","
\n \n \n \n
\n \n \n
\n
\n","import {Component, Input, ViewChild} from '@angular/core';\nimport {getMappedColoredYarnSet} from '@application/helper/textile-data/colored-yarn-set/get-mapped-colored-yarn-set';\nimport {PositionOfDialog} from '@domain/position-of-dialog';\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 {ColorListPreviewComponent} from '@presentation/components/color-list-preview/color-list-preview.component';\nimport {OverviewListColoredYarnSet} from '@presentation/pages/textile-data/colored-yarn-set/overview/overview-list-colored-yarn-set';\n\n@Component({\n selector: 'app-color-list-preview-with-position',\n templateUrl: './color-list-preview-with-position.component.html',\n styleUrls: ['./color-list-preview-with-position.component.scss']\n})\nexport class ColorListPreviewWithPositionComponent {\n @Input() public isSisal: boolean;\n @Input() public coloredYarnSet: OverviewListColoredYarnSetWithStartDent;\n @Input() public creelMapping: CreelMap;\n @ViewChild('colorListPreview') public colorListPreview: ColorListPreviewComponent;\n\n public readonly dialogPosition = PositionOfDialog.RIGHT;\n\n public calculateCreelPositionsToShow(): void {\n this.colorListPreview.calculateCreelPositionsToShow();\n }\n\n public getColorList(coloredYarnSet: OverviewListColoredYarnSet): OverviewListColoredYarnSet {\n return getMappedColoredYarnSet(coloredYarnSet, this.creelMapping, 'asc');\n }\n}\n","
\n \n
\n\n
\n
\n
{{ 'PRODUCTION_ORDER.WEAVE_PLAN.PATH_LAYOUT.PATH_NUMBER' | bmsTranslate }}
\n
{{ number }}
\n
\n
\n
{{ 'DESIGN_LIBRARY.DETAILS.DESIGN_NAME' | bmsTranslate }}
\n
{{ drawingName }}
\n
\n
\n
{{ 'ORDERBOOK.QUANTITY' | bmsTranslate }}
\n
{{ quantity }}
\n
\n
\n
{{ 'SUPPORT.MACHINES_LIST.TABLE_HEADER.MACHINE_QUALITY' | bmsTranslate }}
\n
{{ quality }}
\n
\n
\n
{{ 'PRODUCTION_ORDER.DESIGN_LIBRARY.COLOR_SET' | bmsTranslate }}
\n
\n \n
\n
\n
\n
{{ 'DESIGN_LIBRARY.DETAILS.COLOR_MAIN' | bmsTranslate }}
\n
\n \n
\n
\n
\n
{{ 'DESIGN_LIBRARY.DETAILS.COLOR_BORDER' | bmsTranslate }}
\n
\n \n
\n
\n
\n
{{ 'GENERAL.DIMENSIONS.DIMENSIONS' | bmsTranslate }}
\n
\n {{ widthInDents }}x{{ heightInPicks }} {{ 'GENERAL.UNIT.DENTS' | bmsTranslate }}/{{ 'GENERAL.UNIT.PICKS' | bmsTranslate }}\n {{ width }}x{{ length }} cm\n
\n
\n
\n
{{ 'GENERAL.SHAPE' | bmsTranslate }}
\n
{{ shape | titlecase }}
\n
\n
\n
{{ 'TEXTILE_DATA.FINISHING.FINISHING' | bmsTranslate: {count: 1} }}
\n
{{ finishingName?.split(' ')?.join('') }}
\n
\n
\n
{{ 'TEXTILE_DATA.FINISHING_TEMPLATE.LABEL.PLACE_OPTIONS.CUTBAR_BEFORE' | bmsTranslate }}
\n
{{ cutbarBefore }}mm/{{ cutbarBeforeInPicks }}{{ 'GENERAL.UNIT.PICKS' | bmsTranslate }}
\n
\n
\n
{{ 'TEXTILE_DATA.FINISHING_TEMPLATE.LABEL.PLACE_OPTIONS.CUTBAR_AFTER' | bmsTranslate }}
\n
{{ cutbarAfter }}mm/{{ cutbarAfterInPicks }}{{ 'GENERAL.UNIT.PICKS' | bmsTranslate }}
\n
\n
\n
{{ 'ORDERBOOK.NUMBER_OF_PIECES' | bmsTranslate }}
\n
{{ numberOfPieces }}
\n
\n
\n
{{ 'SALES.TITLE' | bmsTranslate }}
\n
{{ sales }}
\n
\n
\n
{{ 'SALES_ORDERS.ORDER_LINES.ORDER_LINE' | bmsTranslate: {count: 1} }}
\n
{{ orderline }}
\n
\n
\n
{{ 'ORDERBOOK.CUSTOMER_REFERENCE_ABBREVIATION' | bmsTranslate }}
\n
{{ customer }}
\n
\n
\n
{{ 'GENERAL.DATETIME.DUE_DATE' | bmsTranslate }}
\n
{{ dueDate }}
\n
\n
\n
{{ 'GENERAL.DIMENSIONS.WIDTH' | bmsTranslate }}
\n
{{ width }} cm
\n
\n
\n
{{ 'GENERAL.DIMENSIONS.LENGTH' | bmsTranslate }}
\n
{{ length }} cm
\n
\n
\n","import {Component, Inject} from '@angular/core';\nimport {MAT_DIALOG_DATA} from '@angular/material/dialog';\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 {MaterialTypeOverviewList, OverviewListCreelPosition} from '@domain/textile-data/creel/overview-list-creel-position';\nimport {AssertionUtils, DateTimeFormat, DateTimePipe} from '@vdw/angular-component-library';\nimport {PathItemInfoTooltipContext} from './path-item-info-tooltip-context.enum';\n\n@Component({\n selector: 'app-path-item-info-tooltip',\n templateUrl: './path-item-info-tooltip.component.html',\n styleUrls: ['./path-item-info-tooltip.component.scss']\n})\nexport class PathItemInfoTooltipComponent {\n public readonly context: PathItemInfoTooltipContext;\n\n public readonly image: any;\n public readonly width: number;\n public readonly length: number;\n public readonly widthInDents: number;\n public readonly heightInPicks: number;\n public readonly number: number;\n public readonly quantity: number;\n public readonly numberOfPieces: string;\n public readonly quality: string;\n public readonly drawingName: string;\n public readonly finishingName: string;\n public readonly cutbarAfter: number;\n public readonly cutbarBefore: number;\n public readonly cutbarAfterInPicks: number;\n public readonly cutbarBeforeInPicks: number;\n\n public readonly isSisal: boolean;\n public readonly coloredYarnSet: OverviewListColoredYarnSetWithStartDent;\n public readonly creelMapping: CreelMap;\n public readonly mainColorPosition: number;\n public readonly borderColorPosition: number;\n public readonly shape: string;\n public readonly finishingVersion: number;\n\n public readonly sales: string;\n public readonly dueDate: string;\n public readonly orderline: string;\n public readonly customer: string;\n\n public readonly pathItemInfoTooltipContext = PathItemInfoTooltipContext;\n\n public constructor(\n @Inject(MAT_DIALOG_DATA) public data: any,\n dateTimePipe: DateTimePipe\n ) {\n this.context = data.context;\n\n this.image = data.image;\n this.number = data.number;\n this.drawingName = data.drawingName;\n\n this.width = Math.round(data.width * 10) / 10;\n this.length = Math.round(data.length * 10) / 10;\n this.widthInDents = data.widthInDents;\n this.heightInPicks = data.heightInPicks;\n this.quantity = data.quantity;\n this.numberOfPieces = data.numberOfPieces;\n this.quality = data.quality;\n\n this.finishingName = data.finishingName;\n this.cutbarAfter = data.cutbarAfter;\n this.cutbarBefore = data.cutbarBefore;\n this.cutbarAfterInPicks = data.cutbarAfterInPicks;\n this.cutbarBeforeInPicks = data.cutbarBeforeInPicks;\n\n this.isSisal = data.isSisal;\n this.coloredYarnSet = data.coloredYarnSet;\n this.creelMapping = data.creelMapping;\n this.mainColorPosition = data.mainColorPosition;\n this.borderColorPosition = data.borderColorPosition;\n this.shape = data.shape;\n this.finishingVersion = data?.finishingVersion;\n\n this.sales = data.sales;\n this.orderline = data.orderline;\n this.dueDate = dateTimePipe.transform(data.dueDate, DateTimeFormat.DATE_SHORT);\n this.customer = data.customer;\n }\n\n public hasCutBarAfter(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.cutbarAfter);\n }\n\n public hasCutBarBefore(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.cutbarBefore);\n }\n\n public getColorByPosition(position: number): MaterialTypeOverviewList[] {\n return this.coloredYarnSet.coloredYarnSet.overviewListColorSet.creelPositions.find((creelPosition: OverviewListCreelPosition) => creelPosition.position === position)?.items;\n }\n\n public canShowInfoEntry(context: PathItemInfoTooltipContext): boolean {\n return this.context === context;\n }\n\n public getPopupHeight(): string {\n return this.context === PathItemInfoTooltipContext.PATH_DESIGN ? '400px' : '300px';\n }\n}\n","export enum EditProductionScheduleItemInPathGroupAction {\n DELETE,\n EDIT,\n DELETE_COMPLETING_PARTIALLY\n}\n","\n\n
\n \n
\n
\n
\n
\n \n {{ 'DESIGN_LIBRARY.DETAILS.DESIGN_NAME' | bmsTranslate }}\n \n \n\n \n {{ 'DESIGN_LIBRARY.DETAILS.DESIGN_CODE' | bmsTranslate }}\n \n \n
\n\n
\n \n {{ 'GENERAL.PIECES' | bmsTranslate }}\n \n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n\n \n {{ 'GENERAL.PIECES' | bmsTranslate }}\n \n \n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.EDIT_DESIGN_IN_PATH_GROUP.QUANTITY_HINT' | bmsTranslate: {quantityLeft: quantityLeft, total: getMaximumValueForQuantity()} }}\n \n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n {{ 'GENERAL.ERRORS.MIN_VALUE' | bmsTranslate: {min: '1'} }}\n \n \n {{ 'GENERAL.ERRORS.MAX_VALUE' | bmsTranslate: {max: getMaximumValueForQuantity()} }}\n \n \n\n \n {{ 'GENERAL.REPEATS' | bmsTranslate }}\n \n \n
\n
\n\n

{{ 'GENERAL.DIMENSIONS.DIMENSIONS' | bmsTranslate }}

\n\n
\n
\n \n {{ 'GENERAL.DIMENSIONS.HEIGHT' | bmsTranslate }}\n \n {{ commercialUnit }}\n \n {{ 'GENERAL.ERRORS.INVALID_FORMAT.INVALID_FORMAT' | bmsTranslate }}\n \n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n {{ 'GENERAL.ERRORS.MIN_VALUE' | bmsTranslate: {min: '1'} }}\n \n \n\n \n {{ 'GENERAL.DIMENSIONS.WIDTH' | bmsTranslate }}\n \n {{ commercialUnit }}\n \n {{ 'GENERAL.ERRORS.INVALID_FORMAT.INVALID_FORMAT' | bmsTranslate }}\n \n \n
\n
\n \n {{ 'GENERAL.DIMENSIONS.HEIGHT' | bmsTranslate }}\n \n {{ 'GENERAL.UNIT.PICKS' | bmsTranslate }}\n \n\n \n {{ 'GENERAL.DIMENSIONS.WIDTH' | bmsTranslate }}\n \n {{ 'GENERAL.UNIT.DENTS' | bmsTranslate }}\n \n
\n
\n\n
\n \n \n {{ 'TEXTILE_DATA.FINISHING.FINISHING' | bmsTranslate: {count: 1} }}({{ 'GENERAL.OPTIONAL' | bmsTranslate | lowercase }})\n \n \n {{ noPermissionsToSelectFinishingHint() }}\n \n
\n \n
\n
\n\n
\n

{{ 'TEXTILE_DATA.FINISHING.CUTBAR.CUTBAR' | bmsTranslate: {count: 2} }}

\n
\n \n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.EDIT_DESIGN_IN_PATH_GROUP.BEFORE' | bmsTranslate }}\n \n {{ 'GENERAL.UNIT.PICKS' | bmsTranslate }}\n \n \n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.EDIT_DESIGN_IN_PATH_GROUP.AFTER' | bmsTranslate }}\n \n {{ 'GENERAL.UNIT.PICKS' | bmsTranslate }}\n \n
\n
\n
\n
\n\n \n
\n","import {AfterViewInit, Component, ElementRef, Inject, OnInit, ViewChild} from '@angular/core';\nimport {FormBuilder, FormControl, FormGroup, Validators} from '@angular/forms';\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\nimport {RouteUtils} from '@application/helper/routing/route-utils';\nimport {SourceElementUtils} from '@application/helper/source-element-utils';\nimport {Coordinates} from '@domain/coordinates';\nimport {PositionOfDialog} from '@domain/position-of-dialog';\nimport {BmpProductionScheduleItemInPathGroup} from '@domain/production-schedule/bmp-production-schedule-item-in-path-group';\nimport {DrawingType} from '@domain/production-schedule/drawing-type.enum';\nimport {EpProductionScheduleItemInPathGroup} from '@domain/production-schedule/ep-production-schedule-item-in-path-group';\nimport {FinishingForProductionSchedule} from '@domain/production-schedule/finishing-for-production-schedule';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {ProductionScheduleItemInPathGroupStatus} from '@domain/production-schedule/production-schedule-item-in-path-group-status';\nimport {ProductionScheduleOrderLine} from '@domain/production-schedule/production-schedule-order-line';\nimport {Permission} from '@domain/profile/permission.enum';\nimport {Subscription as ProfileSubscription} from '@domain/profile/subscription';\nimport {Authentication, AUTHENTICATION} from '@infrastructure/http/authentication/authentication';\nimport {RepositionDialogComponent} from '@presentation/components/reposition-dialog/reposition-dialog.component';\nimport {SelectFinishingComponent} from '@presentation/components/select-finishing/select-finishing.component';\nimport {FinishingDetailsComponent} from '@presentation/pages/texfab/production-schedule/finishing-details/finishing-details.component';\nimport {\n AssertionUtils,\n BaseComponent,\n canShowErrorForErrorCodeAndFormControlForFormGroup,\n convertCommercialUnit,\n convertHeightInMeterToPicks,\n DialogBuilderFactoryService,\n TranslateService,\n Unit,\n WINDOW\n} from '@vdw/angular-component-library';\nimport {find, isEmpty, isEqual, isNil, isUndefined, max} from 'lodash-es';\nimport {filter, takeUntil} from 'rxjs/operators';\nimport {EditProductionScheduleItemInPathGroupAction} from './edit-production-schedule-item-in-path-group-action';\n\n@Component({\n templateUrl: './edit-production-schedule-item-in-path-group.component.html',\n styleUrls: ['./edit-production-schedule-item-in-path-group.component.scss']\n})\nexport class EditProductionScheduleItemInPathGroupComponent extends BaseComponent implements OnInit, AfterViewInit {\n @ViewChild('matCardElement', {read: ElementRef}) public matCardElement: ElementRef;\n\n public productionScheduleItemInPathGroupForm: FormGroup<{\n name: FormControl;\n code: FormControl;\n quantity: FormControl;\n amountProduced: FormControl;\n commercialHeight?: FormControl;\n commercialWidth?: FormControl;\n technicalHeight?: FormControl;\n technicalWidth?: FormControl;\n cutbarBeforeCommercialLength?: FormControl;\n cutbarAfterCommercialLength?: FormControl;\n finishing?: FormControl;\n }>;\n\n public arrowPosition: Coordinates;\n public readonly commercialUnit: Unit;\n public quantityLeft: number;\n public orderLine: ProductionScheduleOrderLine;\n public completingPartially = false;\n public readonly productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup;\n public readonly FINISHING_CHIP_VALUE_KEY = '%(nameWithVersion)';\n public readonly FINISHING_BASE_ROUTER_LINK = RouteUtils.paths.texStyle.machineQuality.editFinishing.absolutePath;\n\n private readonly matDialogPosition: Coordinates;\n private readonly productionSchedule: ProductionSchedule;\n private readonly cursorOffset = 4;\n private readonly matIconWidth = 24;\n private readonly allowExceedingRequestedAmountOfOrderLineItems: boolean;\n private readonly changeFinishingPermission: Permission = Permission.CHANGE_INDIVIDUAL_FINISHING;\n private readonly minimumVerticalMarginInPx = 16;\n private currentSubscription: ProfileSubscription;\n private pickDensityInPicksPerMeter: number;\n\n public constructor(\n @Inject(MAT_DIALOG_DATA) public data: any,\n @Inject(AUTHENTICATION) private readonly authentication: Authentication,\n @Inject(WINDOW) private readonly window: Window,\n private readonly formBuilder: FormBuilder,\n private readonly dialogRef: MatDialogRef,\n private readonly translate: TranslateService,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService\n ) {\n super();\n\n this.pickDensityInPicksPerMeter = data.pickDensityInPicksPerMeter;\n this.productionScheduleItemInPathGroup = data.productionScheduleItemInPathGroup;\n this.commercialUnit = data.commercialUnit;\n this.productionSchedule = data.productionSchedule;\n this.matDialogPosition = data.matDialogPosition;\n this.completingPartially = this.productionSchedule.completingPartially;\n this.allowExceedingRequestedAmountOfOrderLineItems = data.allowExceedingRequestedAmountOfOrderLineItems;\n }\n\n public ngOnInit(): void {\n this.currentSubscription = this.authentication.getCurrentSubscription();\n if (this.productionScheduleItemInPathGroup.hasOrderLine()) {\n this.getOrderLineAndCalculateQuantityLeft();\n }\n\n this.setFormFields();\n this.setDrawingTypeSpecificFormFields();\n }\n\n public ngAfterViewInit(): void {\n this.repositionMatDialog();\n }\n\n public canShowCode(): boolean {\n return !isEmpty(this.productionScheduleItemInPathGroup.drawing.code);\n }\n\n public canShowCommercialDimensions(): boolean {\n return !isNil(this.productionScheduleItemInPathGroup.commercialDimensionsInMM);\n }\n\n public canShowTechnicalDimensions(): boolean {\n return !isNil(this.productionScheduleItemInPathGroup.technicalDimensions);\n }\n\n public canShowFinishingField(): boolean {\n return (\n this.currentSubscription?.hasPermission(RouteUtils.paths.texStyle.finishingTemplate.editFinishingTemplate.requiredPermission) &&\n this.productionScheduleItemInPathGroup.drawing.drawingType === DrawingType.BMP &&\n (!this.hasOrderLine() || (this.hasOrderLine() && this.hasChosenFinishing()))\n );\n }\n\n public canShowCutbarsFields(): boolean {\n return isEqual(this.productionScheduleItemInPathGroup.drawing.drawingType, DrawingType.EP);\n }\n\n public getMaximumValueForQuantity(): number {\n return this.orderLine.amountLeft;\n }\n\n public getAmountOfCarpetsBasedOnQuantity(): number {\n if (!this.productionScheduleItemInPathGroupForm.controls.quantity.hasError('max')) {\n return Math.floor(+this.productionScheduleItemInPathGroupForm.getRawValue().quantity / this.productionSchedule.getProductionScheduleItemMultiplier());\n }\n return Math.floor(this.getMaximumValueForQuantity() / this.productionSchedule.getProductionScheduleItemMultiplier());\n }\n\n public hasChosenFinishing(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.productionScheduleItemInPathGroupForm.getRawValue().finishing);\n }\n\n public getCurrentFinishing(): FinishingForProductionSchedule {\n return this.productionScheduleItemInPathGroupForm.getRawValue().finishing;\n }\n\n public changeCurrentFinishing(): void {\n this.dialogBuilderFactoryService\n .getBuilder()\n .openSelectGridDialog(SelectFinishingComponent, {\n machineQualityId: this.productionSchedule.machineQuality.id\n })\n .pipe(\n filter((finishing: FinishingForProductionSchedule) => !!finishing),\n takeUntil(this.unSubscribeOnViewDestroy)\n )\n .subscribe((finishing: FinishingForProductionSchedule) => this.productionScheduleItemInPathGroupForm.controls.finishing.patchValue(finishing));\n }\n\n public deleteFinishing(): void {\n if (isEqual(this.productionScheduleItemInPathGroupForm.getRawValue().finishing, this.productionSchedule.finishing)) {\n this.productionScheduleItemInPathGroupForm.controls.finishing.patchValue(null);\n } else {\n this.productionScheduleItemInPathGroupForm.controls.finishing.patchValue(this.productionSchedule.finishing);\n }\n }\n\n public cancelEvent(): void {\n this.completingPartially ? this.deleteProductionScheduleItemInPathGroupInCompletingPartiallyProductionOrder() : this.deleteProductionScheduleItemInPathGroup();\n }\n\n public applyChangesToProductionScheduleItemInPathGroup(): void {\n if (this.canChangeCommercialDimensions()) {\n this.productionScheduleItemInPathGroup.commercialDimensionsInMM.heightInMM = convertCommercialUnit({\n from: {\n unit: this.commercialUnit,\n value: this.productionScheduleItemInPathGroupForm.getRawValue().commercialHeight\n },\n to: Unit.MILLIMETER\n });\n\n this.productionScheduleItemInPathGroup.technicalDimensions.heightInPicks = this.productionScheduleItemInPathGroupForm.getRawValue().technicalHeight;\n }\n\n this.productionScheduleItemInPathGroup.adjustQuantityOfDrawingsInPathGroup(\n Math.floor(+this.productionScheduleItemInPathGroupForm.getRawValue().quantity / this.productionSchedule.getProductionScheduleItemMultiplier())\n );\n this.productionScheduleItemInPathGroup.amountProduced = this.productionScheduleItemInPathGroupForm.getRawValue().amountProduced;\n\n if (this.completingPartially && isEqual(this.productionScheduleItemInPathGroup.amountProduced, 0)) {\n this.productionScheduleItemInPathGroup.status = ProductionScheduleItemInPathGroupStatus.REMOVED;\n }\n\n switch (this.productionScheduleItemInPathGroup.drawing.drawingType) {\n case DrawingType.EP:\n this.applySettingsToEpProductionScheduleItemInPathGroup();\n break;\n\n case DrawingType.BMP:\n this.applySettingsToBmpProductionScheduleItemInPathGroup();\n }\n\n this.dialogRef.close({action: EditProductionScheduleItemInPathGroupAction.EDIT, value: this.productionScheduleItemInPathGroup});\n }\n\n public canEditProductionScheduleItemInPathGroup(): boolean {\n return this.productionScheduleItemInPathGroupForm.valid;\n }\n\n public canShowArrow(): boolean {\n return !isUndefined(this.arrowPosition);\n }\n\n public showFinishingDetails(event: MouseEvent): void {\n this.dialogBuilderFactoryService\n .getBuilder()\n .withClass('reposition-dialog')\n .withWidth('312px')\n .withMaxHeight('100%')\n .openDialog(RepositionDialogComponent, {\n finishing: this.getCurrentFinishing(),\n component: FinishingDetailsComponent,\n sourceElement: SourceElementUtils.findSourceElementForDialog(event, 'info-balloon-container'),\n positionOfDialog: PositionOfDialog.LEFT\n });\n }\n\n public canShowErrorForFormControl(formControlName: string, errorCode: string): boolean {\n return canShowErrorForErrorCodeAndFormControlForFormGroup(errorCode, formControlName, this.productionScheduleItemInPathGroupForm);\n }\n\n public hasOrderLine(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.orderLine);\n }\n\n public hasChangeFinishingPermission(): boolean {\n return this.currentSubscription?.hasPermission(this.changeFinishingPermission);\n }\n\n public disableEditFinishing(): boolean {\n return !this.hasChangeFinishingPermission() || this.completingPartially;\n }\n\n public noPermissionsToSelectFinishingHint(): string {\n return this.hasChangeFinishingPermission() ? '' : `(${this.translate.instant('GENERAL.HINTS.UNAUTHORIZED')})`;\n }\n\n private canChangeCommercialDimensions(): boolean {\n return this.productionScheduleItemInPathGroup.drawing.repeated;\n }\n\n private setFormFields(): void {\n const validatorsForAmountProducedFormControl = [Validators.required];\n\n this.productionScheduleItemInPathGroupForm = this.formBuilder.group({\n name: this.formBuilder.control({value: this.productionScheduleItemInPathGroup.drawing.name, disabled: true}),\n code: this.formBuilder.control({value: this.productionScheduleItemInPathGroup.drawing.code, disabled: true}),\n quantity: this.formBuilder.control(\n {value: this.productionScheduleItemInPathGroup.quantity * this.productionSchedule.getProductionScheduleItemMultiplier(), disabled: false},\n !this.allowExceedingRequestedAmountOfOrderLineItems && this.hasOrderLine()\n ? [Validators.min(1), Validators.required, Validators.max(this.getMaximumValueForQuantity())]\n : [Validators.min(1), Validators.required]\n ),\n amountProduced: this.formBuilder.control(this.productionScheduleItemInPathGroup.amountProduced, this.completingPartially ? validatorsForAmountProducedFormControl : null)\n });\n\n if (this.hasOrderLine()) {\n this.subscribeToQuantityValueChanges();\n }\n\n if (this.canShowCommercialDimensions()) {\n this.productionScheduleItemInPathGroupForm.addControl(\n 'commercialHeight',\n this.formBuilder.control(\n {\n value: convertCommercialUnit({\n from: {\n unit: Unit.MILLIMETER,\n value: this.productionScheduleItemInPathGroup.commercialDimensionsInMM.heightInMM\n },\n to: this.commercialUnit\n }),\n disabled: !this.canChangeCommercialDimensions()\n },\n [Validators.required, Validators.min(1)]\n )\n );\n this.productionScheduleItemInPathGroupForm.addControl(\n 'commercialWidth',\n this.formBuilder.control({\n value: convertCommercialUnit({\n from: {\n unit: Unit.MILLIMETER,\n value: this.productionScheduleItemInPathGroup.commercialDimensionsInMM.widthInMM\n },\n to: this.commercialUnit\n }),\n disabled: true\n })\n );\n }\n\n if (this.canShowTechnicalDimensions()) {\n this.productionScheduleItemInPathGroupForm.addControl(\n 'technicalHeight',\n this.formBuilder.control({value: this.productionScheduleItemInPathGroup.technicalDimensions.heightInPicks, disabled: true})\n );\n this.productionScheduleItemInPathGroupForm.addControl(\n 'technicalWidth',\n this.formBuilder.control({value: this.productionScheduleItemInPathGroup.technicalDimensions.widthInDents, disabled: true})\n );\n }\n\n if (this.canShowCommercialDimensions() && this.canShowTechnicalDimensions() && this.canChangeCommercialDimensions()) {\n this.subscribeToCommercialHeightValueChanges();\n }\n }\n\n private setDrawingTypeSpecificFormFields(): void {\n switch (this.productionScheduleItemInPathGroup.drawing.drawingType) {\n case DrawingType.EP:\n const epProductionScheduleItemInPathGroup: EpProductionScheduleItemInPathGroup = this.productionScheduleItemInPathGroup as any as EpProductionScheduleItemInPathGroup;\n this.productionScheduleItemInPathGroupForm.addControl(\n 'cutbarBeforeCommercialLength',\n this.formBuilder.control(epProductionScheduleItemInPathGroup.cutbarsLength.cutbarBefore.commercialLengthInMM)\n );\n this.productionScheduleItemInPathGroupForm.addControl(\n 'cutbarAfterCommercialLength',\n this.formBuilder.control(epProductionScheduleItemInPathGroup.cutbarsLength.cutbarAfter.commercialLengthInMM)\n );\n break;\n\n case DrawingType.BMP:\n const bmpProductionScheduleItemInPathGroup: BmpProductionScheduleItemInPathGroup = this.productionScheduleItemInPathGroup as any as BmpProductionScheduleItemInPathGroup;\n this.productionScheduleItemInPathGroupForm.addControl(\n 'finishing',\n this.formBuilder.control({value: bmpProductionScheduleItemInPathGroup.finishing, disabled: this.hasOrderLine() || this.disableEditFinishing()})\n );\n break;\n }\n }\n\n private applySettingsToBmpProductionScheduleItemInPathGroup(): void {\n const bmpProductionScheduleItemInPathGroup: BmpProductionScheduleItemInPathGroup = this.productionScheduleItemInPathGroup as any as BmpProductionScheduleItemInPathGroup;\n bmpProductionScheduleItemInPathGroup.changeFinishing(this.productionScheduleItemInPathGroupForm.getRawValue().finishing);\n }\n\n private applySettingsToEpProductionScheduleItemInPathGroup(): void {\n const epProductionScheduleItemInPathGroup: EpProductionScheduleItemInPathGroup = this.productionScheduleItemInPathGroup as any as EpProductionScheduleItemInPathGroup;\n const cutbarBeforeCommercialLengthInMillimeters: number = convertCommercialUnit({\n from: {\n unit: this.commercialUnit,\n value: this.productionScheduleItemInPathGroupForm.getRawValue().cutbarBeforeCommercialLength\n },\n to: Unit.MILLIMETER\n });\n epProductionScheduleItemInPathGroup.cutbarsLength.cutbarBefore.commercialLengthInMM = cutbarBeforeCommercialLengthInMillimeters;\n epProductionScheduleItemInPathGroup.cutbarsLength.cutbarBefore.technicalLengthInNumberOfPicks = convertHeightInMeterToPicks(\n convertCommercialUnit({\n from: {\n value: cutbarBeforeCommercialLengthInMillimeters,\n unit: Unit.MILLIMETER\n },\n to: Unit.METER\n }),\n this.pickDensityInPicksPerMeter,\n this.productionSchedule?.machineQuality?.weaveStructure\n );\n\n const cutbarAfterCommercialLengthInMillimeters: number = convertCommercialUnit({\n from: {\n unit: this.commercialUnit,\n value: this.productionScheduleItemInPathGroupForm.getRawValue().cutbarAfterCommercialLength\n },\n to: Unit.MILLIMETER\n });\n epProductionScheduleItemInPathGroup.cutbarsLength.cutbarAfter.commercialLengthInMM = cutbarAfterCommercialLengthInMillimeters;\n epProductionScheduleItemInPathGroup.cutbarsLength.cutbarAfter.technicalLengthInNumberOfPicks = convertHeightInMeterToPicks(\n convertCommercialUnit({\n from: {\n unit: Unit.MILLIMETER,\n value: cutbarAfterCommercialLengthInMillimeters\n },\n to: Unit.METER\n }),\n this.pickDensityInPicksPerMeter,\n this.productionSchedule?.machineQuality?.weaveStructure\n );\n }\n\n private repositionMatDialog(): void {\n if (!isUndefined(this.matDialogPosition)) {\n const matCardHeight = this.matCardElement.nativeElement.offsetHeight;\n const matCardWidth = this.matCardElement.nativeElement.offsetWidth;\n\n let matDialogPositionTop = max([this.matDialogPosition.y - matCardHeight / 2, this.minimumVerticalMarginInPx]);\n\n if (matDialogPositionTop + matCardHeight >= this.window.innerHeight) {\n matDialogPositionTop = this.window.innerHeight - matCardHeight - this.minimumVerticalMarginInPx;\n }\n\n this.dialogRef.updatePosition({\n top: `${matDialogPositionTop}px`,\n left: `${this.matDialogPosition.x - matCardWidth - this.matIconWidth / 2}px`\n });\n\n setTimeout(() => {\n this.setArrowPositions();\n });\n }\n }\n\n private setArrowPositions(): void {\n const matIconHeight = 24;\n const matIconOffset = 4;\n\n this.arrowPosition = {\n y: this.matDialogPosition.y - matIconHeight / 2,\n x: this.matDialogPosition.x - this.matIconWidth + matIconOffset + this.cursorOffset\n };\n }\n\n private getOrderLineAndCalculateQuantityLeft(): void {\n this.orderLine = find(this.productionSchedule.orderLines, {id: this.productionScheduleItemInPathGroup.orderLineId});\n\n if (!AssertionUtils.isNullOrUndefined(this.orderLine)) {\n this.quantityLeft = max([this.orderLine.getAmountLeftForProductionSchedule(this.productionSchedule.getProductionScheduleItemMultiplier()), 0]);\n }\n }\n\n private subscribeToQuantityValueChanges(): void {\n this.productionScheduleItemInPathGroupForm.controls.quantity.valueChanges.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe((newQuantity: number) => {\n this.quantityLeft = max([\n this.orderLine.getAmountLeftForProductionSchedule(this.productionSchedule.getProductionScheduleItemMultiplier()) +\n (this.productionScheduleItemInPathGroup.quantity - newQuantity) * this.productionSchedule.getProductionScheduleItemMultiplier(),\n 0\n ]);\n });\n }\n\n private subscribeToCommercialHeightValueChanges(): void {\n this.productionScheduleItemInPathGroupForm.controls.commercialHeight.valueChanges.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe((commercialHeight: number) => {\n let heightInPicks = convertHeightInMeterToPicks(\n convertCommercialUnit({\n from: {\n unit: this.commercialUnit,\n value: commercialHeight\n },\n to: Unit.METER\n }),\n this.pickDensityInPicksPerMeter,\n this.productionSchedule?.machineQuality?.weaveStructure\n );\n\n while (!isEqual(heightInPicks % this.productionSchedule.machineQuality.weaveStructure.sendRepeat, 0)) {\n heightInPicks++;\n }\n\n this.productionScheduleItemInPathGroupForm.controls.technicalHeight.setValue(heightInPicks);\n });\n }\n\n private deleteProductionScheduleItemInPathGroup(): void {\n this.dialogRef.close({action: EditProductionScheduleItemInPathGroupAction.DELETE});\n }\n\n private deleteProductionScheduleItemInPathGroupInCompletingPartiallyProductionOrder(): void {\n this.dialogRef.close({action: EditProductionScheduleItemInPathGroupAction.DELETE_COMPLETING_PARTIALLY, value: this.productionScheduleItemInPathGroup});\n }\n}\n","import {Component, HostBinding, Input, OnChanges} from '@angular/core';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: '[app-production-schedule-item-in-path-group-repeat-indicator]',\n templateUrl: './production-schedule-item-in-path-group-repeat-indicator.component.html',\n styleUrls: ['./production-schedule-item-in-path-group-repeat-indicator.component.scss']\n})\nexport class ProductionScheduleItemInPathGroupRepeatIndicatorComponent implements OnChanges {\n public static minimumAllowedHeight = 54;\n\n @Input() public quantity: number;\n @Input() public productionScheduleItemMultiplier: number;\n @Input() public cutbarBeforeHeight: number;\n @Input() public cutbarAfterHeight: number;\n @Input() public drawingHeight: number;\n @Input() public totalHeight: number;\n @HostBinding('attr.width') @Input() public width: number;\n @HostBinding('attr.height') public height: number;\n\n public verticalLineHeight = 0;\n\n public ngOnChanges(): void {\n this.height = Math.max(this.totalHeight - this.drawingHeight - this.cutbarAfterHeight - this.cutbarBeforeHeight, ProductionScheduleItemInPathGroupRepeatIndicatorComponent.minimumAllowedHeight);\n\n this.verticalLineHeight = this.height - 32;\n }\n\n public getQuantityText(): string {\n return `${this.productionScheduleItemMultiplier} x ${this.quantity}`;\n }\n}\n","\n\n\n\n {{ getQuantityText() }}\n\n","\n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \n \n\n\n\n \n\n","import {Component, ElementRef, HostBinding, Input, OnChanges, Renderer2} from '@angular/core';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {BaseComponent} from '@vdw/angular-component-library';\nimport {isNil} from 'lodash-es';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: '[app-production-schedule-item-in-path-group]',\n templateUrl: './production-schedule-item-in-path-group.component.html',\n styleUrls: ['./production-schedule-item-in-path-group.component.scss']\n})\nexport class ProductionScheduleItemInPathGroupComponent extends BaseComponent implements OnChanges {\n @HostBinding('class.production-schedule-item-repetition') @Input() public isProductionScheduleItemInPathGroupRepetition: boolean;\n @Input() public productionScheduleItem: ProductionScheduleItemInPathGroup;\n @Input() public cutbarBeforeHeight: number;\n @Input() public cutbarAfterHeight: number;\n @Input() public drawingHeight: number;\n @Input() public drawingImageHeight: number;\n @Input() public drawingWidth: number;\n @Input() public totalHeight: number;\n\n public cutbarAfterVerticalPosition = 0;\n public drawingVerticalPosition = 0;\n\n public constructor(\n private readonly elementRef: ElementRef,\n private readonly renderer: Renderer2\n ) {\n super();\n }\n\n public ngOnChanges(): void {\n this.setCutbarAfterVerticalPosition();\n this.setProductionScheduleItemInPathGroupAttributes();\n this.drawingVerticalPosition = this.productionScheduleItem.isRecolored ? this.cutbarBeforeHeight : 0;\n }\n\n public getPlaceholderWidthAndHeight(): number {\n return this.productionScheduleItem.technicalDimensions.heightInPicks > this.productionScheduleItem.technicalDimensions.widthInDents ? this.drawingWidth : this.drawingImageHeight;\n }\n\n public getPlaceholderPosition(): string {\n const placeholderWidthAndHeight = this.getPlaceholderWidthAndHeight();\n const position = -placeholderWidthAndHeight / 2;\n\n return `translate(${position}, ${position})`;\n }\n\n private setProductionScheduleItemInPathGroupAttributes(): void {\n const productionScheduleItemInPathGroupElement = this.elementRef.nativeElement;\n\n this.renderer.setAttribute(productionScheduleItemInPathGroupElement, 'height', `${this.getProductionScheduleItemInPathGroupHeight()}`);\n this.renderer.setAttribute(productionScheduleItemInPathGroupElement, 'width', `${this.drawingWidth}`);\n this.renderer.setAttribute(productionScheduleItemInPathGroupElement, 'y', `${this.getVerticalPositionOfProductionScheduleItemInPathGroup()}`);\n this.renderer.setAttribute(productionScheduleItemInPathGroupElement, 'x', '0');\n }\n\n private getVerticalPositionOfProductionScheduleItemInPathGroup(): number {\n if (!isNil(this.elementRef.nativeElement) && this.isProductionScheduleItemInPathGroupRepetition) {\n return this.elementRef.nativeElement.previousElementSibling.getAttribute('y') - this.getProductionScheduleItemInPathGroupHeight();\n } else {\n return this.totalHeight - this.getProductionScheduleItemInPathGroupHeight();\n }\n }\n\n private setCutbarAfterVerticalPosition(): void {\n this.cutbarAfterVerticalPosition = this.drawingHeight + this.cutbarBeforeHeight;\n }\n\n private getProductionScheduleItemInPathGroupHeight(): number {\n return this.cutbarAfterHeight + this.cutbarBeforeHeight + this.drawingHeight;\n }\n}\n","import {Pipe, PipeTransform} from '@angular/core';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {fill} from 'lodash-es';\n\n@Pipe({\n name: 'repeatProductionScheduleItem'\n})\nexport class RepeatProductionScheduleItemPipe implements PipeTransform {\n public transform(productionScheduleItem: ProductionScheduleItemInPathGroup): ProductionScheduleItemInPathGroup[] {\n return fill(Array(productionScheduleItem.quantity), productionScheduleItem);\n }\n}\n","\n \n \n\n\n\n \n\n\n \n \n\n","import {Component, ElementRef, HostBinding, HostListener, Inject, Input, NgZone, OnChanges, OnInit, SimpleChanges} from '@angular/core';\nimport {cloneProductionScheduleElement} from '@application/helper/production-schedule-builder/clone-production-schedule-element';\nimport {getClosestProductionScheduleItemAndIndexRelativeToMouseCoordinates} from '@application/helper/production-schedule-builder/get-closest-production-schedule-item-and-index-relative-to-mouse-coordinates';\nimport {getMouseCoordinatesInProductionScheduleBuilderGroup} from '@application/helper/production-schedule-builder/get-mouse-coordinates-in-production-schedule-builder-group';\nimport {getUnderlyingElement} from '@application/helper/production-schedule-builder/get-underlying-element';\nimport {isCoordinateOutOfRangeOfOtherCoordinate} from '@application/helper/production-schedule-builder/is-coordinate-out-of-range-of-other-coordinate';\nimport {isInLowerHalfOfProductionScheduleItem} from '@application/helper/production-schedule-builder/is-in-lower-half-of-production-schedule-item';\nimport {DraggingService} from '@application/services/dragging/dragging.service';\nimport {Coordinates} from '@domain/coordinates';\nimport {ClosestProductionScheduleItemInPathGroup} from '@domain/production-schedule/closest-production-schedule-item-in-path-group';\nimport {ProductionOrderCustomSettings} from '@domain/production-schedule/custom-settings/production-order-custom-settings';\nimport {Drawing} from '@domain/production-schedule/drawing';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {ProductionSchedulePhase} from '@domain/production-schedule/production-schedule-phase.enum';\nimport {OverviewListColoredYarnSetWithStartDent} from '@domain/textile-data/creel/overview-list-colored-yarn-set-with-start-dent';\nimport {ListDrawing} from '@presentation/components/drawing-list/list-drawing';\nimport {ProductionScheduleBuilderAspectRatio} from '@presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-builder-aspect-ratio';\nimport {EditProductionScheduleItemInPathGroupAction} from '@presentation/pages/texfab/production-schedule/add/plan/modals/edit-production-schedule-item-in-path-group/edit-production-schedule-item-in-path-group-action';\nimport {EditProductionScheduleItemInPathGroupComponent} from '@presentation/pages/texfab/production-schedule/add/plan/modals/edit-production-schedule-item-in-path-group/edit-production-schedule-item-in-path-group.component';\nimport {PRODUCTION_SCHEDULE_PLAN, ProductionSchedulePlan} from '@presentation/pages/texfab/production-schedule/add/plan/production-schedule-plan';\nimport {AssertionUtils, DialogBuilderFactoryService, Unit} from '@vdw/angular-component-library';\nimport {D3DragEvent, drag as d3Drag} from 'd3-drag';\nimport {BaseType, ContainerElement, pointer as d3Pointer, select as d3Select, selectAll as d3SelectAll, Selection as d3Selection} from 'd3-selection';\nimport {isEqual, isNil, throttle} from 'lodash-es';\nimport {filter} from 'rxjs/operators';\nimport {ProductionScheduleItemInPathGroupRepeatIndicatorComponent} from './production-schedule-item-in-path-group-repeat-indicator/production-schedule-item-in-path-group-repeat-indicator.component';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: '[app-production-schedule-item-in-path-group-container]',\n templateUrl: './production-schedule-item-in-path-group-container.component.html',\n styleUrls: ['./production-schedule-item-in-path-group-container.component.scss']\n})\nexport class ProductionScheduleItemInPathGroupContainerComponent implements OnInit, OnChanges {\n public static isDraggingProductionScheduleItemInPathGroup = false;\n @Input() public productionScheduleItem: ProductionScheduleItemInPathGroup;\n @Input() public productionScheduleItemIndexInPath: number;\n @Input() public productionScheduleBuilderHeight: number;\n @Input() public commercialUnit: Unit;\n @Input() public aspectRatio: ProductionScheduleBuilderAspectRatio;\n @Input() public productionSchedule: ProductionSchedule;\n @Input() public productionSchedulePathIndex: number;\n @Input() public productionScheduleColoredYarnSet: OverviewListColoredYarnSetWithStartDent;\n @Input() public productionSchedulePhase: ProductionSchedulePhase;\n @Input() public productionOrderCustomSettings: ProductionOrderCustomSettings;\n @Input() public isProductionScheduleDisplayOverview: boolean;\n @HostBinding('class') public readonly labelForProductionScheduleItem = 'production-schedule-item';\n @HostBinding('attr.y') public verticalPosition: number;\n @HostBinding('attr.height') public totalHeight: number;\n\n public cutbarBeforeHeight: number;\n public cutbarAfterHeight: number;\n public drawingImageHeight: number;\n public drawingHeight: number;\n public drawingWidth: number;\n public isHoveringItemInPathGroup = false;\n\n private mouseCoordinatesOfDragStart: Coordinates;\n private dragInitializedOnCurrentProductionScheduleItem = false;\n private sourceOfDraggedProductionScheduleItemInPathGroup: d3Selection;\n private destinationOfDraggedProductionScheduleItem: d3Selection;\n\n private readonly labelForProductionScheduleBuilderGroup = 'production-schedule-builder-group';\n private readonly labelForProductionScheduleColoredYarnSet = 'production-schedule-colored-yarn-set';\n private readonly labelForProductionSchedulePath = 'production-schedule-path-of-colored-yarn-set';\n private readonly labelForDraggedProductionScheduleItemElement = 'dragged-production-schedule-element';\n private readonly labelForProductionScheduleItemRepetition = 'production-schedule-item-repetition';\n private readonly dropIndicatorPositionHeight = 8;\n private readonly MINIMUM_HEIGHT_FOR_CUTBAR_IN_PX = 1;\n\n public constructor(\n @Inject(PRODUCTION_SCHEDULE_PLAN) private readonly productionSchedulePlan: ProductionSchedulePlan,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n private readonly zone: NgZone,\n private readonly draggingService: DraggingService,\n public readonly elementRef: ElementRef\n ) {}\n\n @HostListener('mouseenter')\n public onProductionScheduleItemMouseEnter(): void {\n if (!ProductionScheduleItemInPathGroupContainerComponent.isDraggingProductionScheduleItemInPathGroup && this.canEditProductionScheduleItem()) {\n this.isHoveringItemInPathGroup = true;\n }\n }\n\n @HostListener('mouseleave')\n public onProductionScheduleItemMouseLeave(): void {\n this.isHoveringItemInPathGroup = false;\n }\n\n public ngOnInit(): void {\n d3Select(this.elementRef.nativeElement).datum(this.productionScheduleItem);\n this.setProductionScheduleItemInPathGroupDragEventHandlers();\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if ('aspectRatio' in changes || 'productionSchedule' in changes || 'productionScheduleBuilderHeight' in changes) {\n if (this.isProductionScheduleDisplayOverview) {\n this.setHeightDimensionsForOverviewViewMode();\n } else {\n this.setHeightDimensionsForDetailViewMode();\n }\n\n this.drawingWidth = isNaN(this.aspectRatio.width) ? 0 : this.productionScheduleItem.technicalDimensions.widthInDents * this.aspectRatio.width;\n\n this.setVerticalPosition();\n }\n }\n\n public openEditProductionScheduleItemDialog(event: MouseEvent): void {\n this.dialogBuilderFactoryService\n .getBuilder()\n .withWidth('334px')\n .withClass('edit-drawing-in-path')\n .openDialog(EditProductionScheduleItemInPathGroupComponent, {\n productionScheduleItemInPathGroup: this.productionScheduleItem,\n commercialUnit: this.commercialUnit,\n productionSchedule: this.productionSchedule,\n matDialogPosition: {\n y: event.clientY,\n x: event.clientX\n },\n allowExceedingRequestedAmountOfOrderLineItems: this.productionOrderCustomSettings?.allowExceedingRequestedAmountOfOrderLineItems,\n pickDensityInPicksPerMeter: this.productionSchedule.machineQuality.pickDensity * 1000\n })\n .pipe(filter((result: {action: EditProductionScheduleItemInPathGroupAction; value: ProductionScheduleItemInPathGroup}) => !isNil(result)))\n .subscribe((result: {action: EditProductionScheduleItemInPathGroupAction; value: ProductionScheduleItemInPathGroup}) => {\n if (result.action === EditProductionScheduleItemInPathGroupAction.EDIT) {\n this.editProductionScheduleItem(result.value);\n } else {\n this.removeProductionScheduleItemInPathGroup();\n }\n });\n }\n\n public canShowRepeatIndicator(): boolean {\n return this.productionScheduleItem.quantity > 1;\n }\n\n public static getCutbarHeight(cutbar: {commercialLengthInMM: number; technicalLengthInNumberOfPicks: number}, minimumHeight: number, aspectRatioHeight: number): number {\n if (!cutbar.commercialLengthInMM || !cutbar.technicalLengthInNumberOfPicks) {\n return 0;\n } else {\n const proportionalCutbarHeight = cutbar.technicalLengthInNumberOfPicks * aspectRatioHeight;\n return Math.max(proportionalCutbarHeight, minimumHeight);\n }\n }\n\n private setHeightDimensionsForDetailViewMode(): void {\n if (!AssertionUtils.isNullOrUndefined(this.productionScheduleItem.getCutbarInformation())) {\n const {cutbarBefore, cutbarAfter} = this.productionScheduleItem.getCutbarInformation();\n\n this.cutbarBeforeHeight = ProductionScheduleItemInPathGroupContainerComponent.getCutbarHeight(cutbarBefore, this.MINIMUM_HEIGHT_FOR_CUTBAR_IN_PX, this.aspectRatio.height);\n this.cutbarAfterHeight = ProductionScheduleItemInPathGroupContainerComponent.getCutbarHeight(cutbarAfter, this.MINIMUM_HEIGHT_FOR_CUTBAR_IN_PX, this.aspectRatio.height);\n }\n this.drawingHeight = this.productionScheduleItem.technicalDimensions.heightInPicks * this.aspectRatio.height;\n this.drawingImageHeight = this.drawingHeight;\n this.totalHeight = (this.cutbarAfterHeight + this.cutbarBeforeHeight + this.drawingHeight) * this.productionScheduleItem.quantity;\n }\n\n private setHeightDimensionsForOverviewViewMode(): void {\n if (!AssertionUtils.isNullOrUndefined(this.productionScheduleItem.getCutbarInformation())) {\n const {cutbarBefore, cutbarAfter} = this.productionScheduleItem.getCutbarInformation();\n\n this.cutbarBeforeHeight = ProductionScheduleItemInPathGroupContainerComponent.getCutbarHeight(cutbarBefore, this.MINIMUM_HEIGHT_FOR_CUTBAR_IN_PX, this.aspectRatio.height);\n this.cutbarAfterHeight = ProductionScheduleItemInPathGroupContainerComponent.getCutbarHeight(cutbarAfter, this.MINIMUM_HEIGHT_FOR_CUTBAR_IN_PX, this.aspectRatio.height);\n }\n this.drawingHeight = this.productionScheduleItem.technicalDimensions.heightInPicks * this.aspectRatio.height;\n this.drawingImageHeight = this.drawingHeight;\n this.totalHeight = (this.cutbarAfterHeight + this.cutbarBeforeHeight + this.drawingHeight) * this.productionScheduleItem.quantity;\n\n let requiredHeightForSingleProductionScheduleItemRepetition = this.cutbarAfterHeight + this.cutbarBeforeHeight + this.drawingHeight;\n\n if (this.productionScheduleItem.quantity > 1) {\n requiredHeightForSingleProductionScheduleItemRepetition += ProductionScheduleItemInPathGroupRepeatIndicatorComponent.minimumAllowedHeight;\n }\n\n if (requiredHeightForSingleProductionScheduleItemRepetition > this.totalHeight) {\n this.drawingImageHeight = Math.max(0, this.drawingImageHeight - (requiredHeightForSingleProductionScheduleItemRepetition - this.totalHeight));\n this.drawingHeight = Math.max(0, this.drawingHeight - (requiredHeightForSingleProductionScheduleItemRepetition - this.totalHeight));\n }\n }\n\n private editProductionScheduleItem(productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup): void {\n this.productionScheduleItem = productionScheduleItemInPathGroup;\n\n this.productionSchedulePlan.editProductionScheduleItem(\n productionScheduleItemInPathGroup,\n this.productionScheduleItemIndexInPath,\n this.productionSchedulePathIndex,\n this.productionScheduleColoredYarnSet.startDent\n );\n }\n\n private removeProductionScheduleItemInPathGroup(): void {\n const productionSchedulePathOfColoredYarnSet = this.productionSchedule.getProductionSchedulePathsOfColoredYarnSetAtStartDent(this.productionScheduleColoredYarnSet.startDent);\n const productionSchedulePath = productionSchedulePathOfColoredYarnSet.productionSchedulePaths[this.productionSchedulePathIndex];\n\n this.productionSchedulePlan.removeProductionScheduleItem(\n this.productionScheduleItem.uuid,\n productionSchedulePath.pathNumber,\n productionSchedulePathOfColoredYarnSet.productionScheduleColoredYarnSet.startDent\n );\n }\n\n private canEditProductionScheduleItem(): boolean {\n return this.productionScheduleItem.isRecolored && this.productionSchedulePhase !== ProductionSchedulePhase.VERIFY;\n }\n\n private setProductionScheduleItemInPathGroupDragEventHandlers(): void {\n const productionScheduleItemInPathGroupElement = this.elementRef.nativeElement;\n\n d3Select(productionScheduleItemInPathGroupElement).call(\n d3Drag()\n .on('start', (event: D3DragEvent) => this.onDragStart(event.sourceEvent))\n .on('drag', (event: D3DragEvent) => this.onDrag(event.sourceEvent))\n .on('end', (event: D3DragEvent) => this.onDragEndProductionScheduleItem(event.sourceEvent))\n );\n\n this.zone.runOutsideAngular(() => {\n d3Select(productionScheduleItemInPathGroupElement)\n .on(\n 'dragover',\n throttle((event: DragEvent) => this.draggedNewDrawingOverProductionScheduleItem(event), 50)\n )\n .on('drop', (event: DragEvent) => this.droppedNewDrawingOnProductionScheduleItem(event));\n });\n }\n\n private onDragStart(event: DragEvent): void {\n this.mouseCoordinatesOfDragStart = getMouseCoordinatesInProductionScheduleBuilderGroup(event);\n }\n\n private onDrag(event: DragEvent): void {\n const {x: mouseCoordinateX, y: mouseCoordinateY} = this.getMouseCoordinatesInProductionSchedulePlanView(event);\n\n const hasDraggedFarEnoughFromStartingPoint: boolean = isCoordinateOutOfRangeOfOtherCoordinate(\n {\n x: mouseCoordinateX,\n y: mouseCoordinateY\n },\n this.mouseCoordinatesOfDragStart\n );\n if (hasDraggedFarEnoughFromStartingPoint || this.dragInitializedOnCurrentProductionScheduleItem) {\n if (this.dragInitializedOnCurrentProductionScheduleItem) {\n const productionScheduleItemInPathGroupSelection = d3Select(this.elementRef.nativeElement);\n\n productionScheduleItemInPathGroupSelection.attr('x', mouseCoordinateX).attr('y', mouseCoordinateY);\n\n this.onDragProductionScheduleItem(event);\n } else {\n this.onDragInitializeProductionScheduleItemInPathGroup(event);\n }\n }\n }\n\n private onDragProductionScheduleItem(event: DragEvent): void {\n this.removeDropIndicator();\n\n const destinationOfDraggedProductionScheduleItem = getUnderlyingElement(\n {x: event.x, y: event.y},\n `.${this.labelForProductionScheduleItem}, .${this.labelForProductionSchedulePath}, .${this.labelForProductionScheduleColoredYarnSet}`\n );\n\n if (!isNil(destinationOfDraggedProductionScheduleItem)) {\n const destinationHasChanged = !isEqual(this.destinationOfDraggedProductionScheduleItem, destinationOfDraggedProductionScheduleItem);\n if (destinationHasChanged) {\n this.destinationOfDraggedProductionScheduleItem = destinationOfDraggedProductionScheduleItem;\n }\n\n const destinationOfDraggedProductionScheduleItemElement = this.destinationOfDraggedProductionScheduleItem.node() as SVGGraphicsElement;\n const destinationOfDraggedProductionScheduleItemClassList = destinationOfDraggedProductionScheduleItemElement.classList;\n\n if (destinationOfDraggedProductionScheduleItemClassList.contains(this.labelForProductionScheduleItem)) {\n this.handleDragOverProductionScheduleItem(event, destinationOfDraggedProductionScheduleItemElement);\n } else if (destinationOfDraggedProductionScheduleItemClassList.contains(this.labelForProductionSchedulePath)) {\n this.handleDragOverProductionSchedulePath(event, destinationOfDraggedProductionScheduleItemElement);\n } else if (destinationOfDraggedProductionScheduleItemClassList.contains(this.labelForProductionScheduleColoredYarnSet)) {\n this.handleDragOverProductionScheduleColoredYarnSet(destinationOfDraggedProductionScheduleItemElement);\n }\n }\n }\n\n private onDragInitializeProductionScheduleItemInPathGroup(event: DragEvent): void {\n this.dragInitializedOnCurrentProductionScheduleItem = true;\n const productionScheduleWrapperElement = d3Select(`.${this.labelForProductionScheduleBuilderGroup}`).node() as ContainerElement;\n const [mouseCoordinateX, mouseCoordinateY] = d3Pointer(event, productionScheduleWrapperElement);\n const productionScheduleItemInPathGroupSelection = d3Select(this.elementRef.nativeElement);\n const productionScheduleItemInPathGroupElement: SVGElement = productionScheduleItemInPathGroupSelection.node();\n\n this.sourceOfDraggedProductionScheduleItemInPathGroup = d3Select(productionScheduleItemInPathGroupElement.parentElement);\n cloneProductionScheduleElement(this.elementRef, mouseCoordinateX);\n productionScheduleItemInPathGroupSelection.attr('y', mouseCoordinateY);\n ProductionScheduleItemInPathGroupContainerComponent.isDraggingProductionScheduleItemInPathGroup = true;\n this.isHoveringItemInPathGroup = false;\n }\n\n private onDragEndProductionScheduleItem(event: DragEvent): void {\n const {x: mouseCoordinateX, y: mouseCoordinateY} = this.getMouseCoordinatesInProductionSchedulePlanView(event);\n\n const hasDraggedFarEnoughFromStartingPoint: boolean =\n !isNil(this.mouseCoordinatesOfDragStart) &&\n isCoordinateOutOfRangeOfOtherCoordinate(\n {\n x: mouseCoordinateX,\n y: mouseCoordinateY\n },\n this.mouseCoordinatesOfDragStart\n );\n\n const destinationOfDraggedProductionScheduleItemElement = this.destinationOfDraggedProductionScheduleItem?.node() as SVGGraphicsElement;\n const destinationOfDraggedProductionScheduleItemClassList = destinationOfDraggedProductionScheduleItemElement?.classList;\n if (hasDraggedFarEnoughFromStartingPoint && !isNil(this.destinationOfDraggedProductionScheduleItem)) {\n const sourceProductionSchedulePath: ProductionSchedulePath = this.sourceOfDraggedProductionScheduleItemInPathGroup.datum();\n\n if (destinationOfDraggedProductionScheduleItemClassList.contains(this.labelForProductionScheduleItem)) {\n this.onDragEndOnProductionScheduleItem(event, sourceProductionSchedulePath, destinationOfDraggedProductionScheduleItemElement);\n } else if (destinationOfDraggedProductionScheduleItemClassList.contains(this.labelForProductionSchedulePath)) {\n this.onDragEndOnProductionSchedulePath(event, sourceProductionSchedulePath);\n } else if (destinationOfDraggedProductionScheduleItemClassList.contains(this.labelForProductionScheduleColoredYarnSet)) {\n this.ondDragEndOnColoredYarnSet(event, sourceProductionSchedulePath);\n }\n }\n\n const hasDroppedOnItself = destinationOfDraggedProductionScheduleItemClassList?.contains(this.labelForDraggedProductionScheduleItemElement);\n\n this.cleanProductionSchedulePlanAfterDrop();\n\n if (hasDroppedOnItself) {\n this.onProductionScheduleItemMouseEnter();\n }\n }\n\n private onDragEndOnProductionScheduleItem(event: DragEvent, sourceProductionSchedulePath: ProductionSchedulePath, destinationOfDraggedProductionScheduleItemElement: SVGGraphicsElement): void {\n const destinationProductionSchedulePathElement: SVGGraphicsElement = (this.destinationOfDraggedProductionScheduleItem.node() as SVGGraphicsElement).parentNode as SVGGraphicsElement;\n const destinationProductionSchedulePath: ProductionSchedulePath = d3Select(destinationProductionSchedulePathElement).datum() as ProductionSchedulePath;\n\n const destinationPathElementSelection = d3Select(destinationProductionSchedulePathElement);\n const productionSchedulePathPositionEnd = Number(destinationPathElementSelection.attr('width'));\n const productionSchedulePathDropThreshold = this.getProductionSchedulePathDropThreshold();\n\n const mouseCoordinatesInProductionSchedulePath: Coordinates = this.getMouseCoordinatesInProductionSchedulePath(event, destinationProductionSchedulePathElement);\n\n const isDraggingInsideProductionSchedulePath: boolean =\n mouseCoordinatesInProductionSchedulePath.x > productionSchedulePathDropThreshold &&\n mouseCoordinatesInProductionSchedulePath.x < productionSchedulePathPositionEnd - productionSchedulePathDropThreshold;\n\n if (isDraggingInsideProductionSchedulePath) {\n const targetIndexOfDraggedProductionScheduleItem: number = this.getTargetIndexOfDestinationProductionScheduleItem(\n event,\n destinationOfDraggedProductionScheduleItemElement,\n false,\n this.productionScheduleItem\n );\n\n this.moveDraggedProductionScheduleItemToProductionSchedulePath(sourceProductionSchedulePath, destinationProductionSchedulePath, targetIndexOfDraggedProductionScheduleItem);\n } else {\n const dropDestination: OverviewListColoredYarnSetWithStartDent = d3Select(destinationProductionSchedulePathElement.parentElement).datum() as OverviewListColoredYarnSetWithStartDent;\n\n this.moveDraggedProductionScheduleItemToColoredYarnSet(event, sourceProductionSchedulePath, dropDestination, destinationProductionSchedulePath, destinationProductionSchedulePathElement);\n }\n }\n\n private moveDraggedProductionScheduleItemToProductionSchedulePath(\n sourceProductionSchedulePath: ProductionSchedulePath,\n destinationProductionSchedulePath: ProductionSchedulePath,\n targetIndexOfDraggedProductionScheduleItemInPathGroup?: number\n ): void {\n const canMoveProductionScheduleItemToProductionSchedulePath: boolean = this.productionSchedule.canMoveProductionScheduleItemToProductionSchedulePath(\n this.productionScheduleItemIndexInPath,\n sourceProductionSchedulePath.pathNumber,\n null,\n destinationProductionSchedulePath.pathNumber,\n this.productionScheduleItem\n );\n\n if (canMoveProductionScheduleItemToProductionSchedulePath) {\n const sourceProductionSchedulePathsOfColoredYarnSet = this.productionSchedule.getProductionSchedulePathsOfColoredYarnSetAtStartDent(this.productionScheduleColoredYarnSet.startDent);\n\n const destinationOfDraggedProductionScheduleItemInPathGroupElement: SVGGraphicsElement = this.destinationOfDraggedProductionScheduleItem.node() as SVGGraphicsElement;\n let destinationProductionScheduleColoredYarnSet = d3Select(destinationOfDraggedProductionScheduleItemInPathGroupElement.parentElement).datum() as OverviewListColoredYarnSetWithStartDent;\n\n if (destinationProductionScheduleColoredYarnSet instanceof ProductionSchedulePath) {\n destinationProductionScheduleColoredYarnSet = d3Select(\n destinationOfDraggedProductionScheduleItemInPathGroupElement.parentElement.parentElement\n ).datum() as OverviewListColoredYarnSetWithStartDent;\n }\n\n if (destinationProductionSchedulePath instanceof ProductionScheduleItemInPathGroup) {\n const destinationProductionSchedulePathElement = destinationOfDraggedProductionScheduleItemInPathGroupElement.parentElement;\n destinationProductionSchedulePath = d3Select(destinationProductionSchedulePathElement).datum() as ProductionSchedulePath;\n\n destinationProductionScheduleColoredYarnSet = d3Select(destinationProductionSchedulePathElement.parentElement).datum() as OverviewListColoredYarnSetWithStartDent;\n }\n\n const destinationProductionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet = this.productionSchedule.getProductionSchedulePathsOfColoredYarnSetAtStartDent(\n destinationProductionScheduleColoredYarnSet.startDent\n );\n\n this.productionSchedulePlan.moveProductionScheduleItemToProductionSchedulePath(\n sourceProductionSchedulePath.pathNumber,\n this.productionScheduleItemIndexInPath,\n sourceProductionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet,\n destinationProductionSchedulePath.pathNumber,\n targetIndexOfDraggedProductionScheduleItemInPathGroup,\n destinationProductionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet,\n this.productionScheduleItem\n );\n }\n }\n\n private moveDraggedProductionScheduleItemToColoredYarnSet(\n event: DragEvent,\n sourceProductionSchedulePath: ProductionSchedulePath,\n destinationProductionScheduleColoredYarnSet: OverviewListColoredYarnSetWithStartDent,\n destinationProductionSchedulePath?: ProductionSchedulePath,\n destinationProductionSchedulePathElement?: SVGGraphicsElement\n ): void {\n const sourceProductionSchedulePathsOfColoredYarnSet = this.productionSchedule.getProductionSchedulePathsOfColoredYarnSetAtStartDent(this.productionScheduleColoredYarnSet.startDent);\n\n const canMoveProductionScheduleItemToColoredYarnSet: boolean = this.productionSchedule.canMoveProductionScheduleItemToColoredYarnSet(\n sourceProductionSchedulePath.pathNumber,\n destinationProductionScheduleColoredYarnSet.startDent,\n this.productionScheduleItem\n );\n\n if (canMoveProductionScheduleItemToColoredYarnSet) {\n let targetIndexInColoredYarnSet: number = null;\n\n if (!isNil(destinationProductionSchedulePath)) {\n targetIndexInColoredYarnSet = this.productionSchedule\n .getProductionSchedulePathsOfColoredYarnSetAtStartDent(destinationProductionScheduleColoredYarnSet.startDent)\n .productionSchedulePaths.findIndex((productionSchedulePath: ProductionSchedulePath) => {\n return productionSchedulePath.pathNumber === destinationProductionSchedulePath.pathNumber;\n });\n\n const sourceProductionScheduleColoredYarnSet: OverviewListColoredYarnSetWithStartDent =\n this.productionSchedule.getProductionScheduleColoredYarnSetForProductionSchedulePath(sourceProductionSchedulePath);\n const sourceIndexInColoredYarnSet = this.productionSchedule\n .getProductionSchedulePathsOfColoredYarnSetAtStartDent(sourceProductionScheduleColoredYarnSet.startDent)\n .productionSchedulePaths.findIndex((productionSchedulePath: ProductionSchedulePath) => {\n return productionSchedulePath.pathNumber === sourceProductionSchedulePath.pathNumber;\n });\n const hasDroppedLastItemOfSourcePath: boolean = sourceProductionSchedulePath.pathGroups.length === 1;\n const hasDroppedBetweenPathsRightToSourcePath: boolean =\n isEqual(destinationProductionScheduleColoredYarnSet.startDent, sourceProductionScheduleColoredYarnSet.startDent) && sourceIndexInColoredYarnSet < targetIndexInColoredYarnSet;\n\n if (hasDroppedLastItemOfSourcePath && hasDroppedBetweenPathsRightToSourcePath) {\n targetIndexInColoredYarnSet--;\n }\n\n targetIndexInColoredYarnSet = this.adjustTargetPositionOfDraggedProductionScheduleItemInColoredYarnSetAccordingToMousePosition(\n destinationProductionSchedulePathElement,\n this.getMouseCoordinatesInProductionSchedulePath(event, destinationProductionSchedulePathElement),\n targetIndexInColoredYarnSet\n );\n }\n\n this.productionSchedulePlan.moveProductionScheduleItemToColoredYarnSet(\n sourceProductionSchedulePath.pathNumber,\n sourceProductionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet,\n destinationProductionScheduleColoredYarnSet,\n this.productionScheduleItem,\n targetIndexInColoredYarnSet\n );\n }\n }\n\n private adjustTargetPositionOfDraggedProductionScheduleItemInColoredYarnSetAccordingToMousePosition(\n destinationProductionSchedulePathElement: SVGGraphicsElement,\n mouseCoordinatesInProductionSchedulePath: Coordinates,\n targetIndexInColoredYarnSet: number\n ): number {\n const {width: widthOfDestinationProductionSchedulePath} = destinationProductionSchedulePathElement.getBBox();\n const horizontalCenterOfDestinationProductionSchedulePath: number = widthOfDestinationProductionSchedulePath / 2;\n\n const isInRightHalfOfProductionSchedulePath: boolean = mouseCoordinatesInProductionSchedulePath.x > horizontalCenterOfDestinationProductionSchedulePath;\n if (isInRightHalfOfProductionSchedulePath) {\n targetIndexInColoredYarnSet++;\n }\n return targetIndexInColoredYarnSet;\n }\n\n private onDragEndOnProductionSchedulePath(event: DragEvent, sourceProductionSchedulePath: ProductionSchedulePath): void {\n const destinationProductionSchedulePath: ProductionSchedulePath = this.destinationOfDraggedProductionScheduleItem.datum() as ProductionSchedulePath;\n const destinationProductionSchedulePathElement: SVGGraphicsElement = this.destinationOfDraggedProductionScheduleItem.node() as SVGGraphicsElement;\n\n if (this.isMousePositionInsideProductionSchedulePath(event, destinationProductionSchedulePathElement)) {\n const productionScheduleItemsInPathGroup: SVGGraphicsElement[] = this.getProductionScheduleItemElementsInPath(destinationProductionSchedulePathElement);\n\n const closestProductionScheduleItemInPathGroup: ClosestProductionScheduleItemInPathGroup = getClosestProductionScheduleItemAndIndexRelativeToMouseCoordinates(\n this.getMouseCoordinatesInProductionSchedulePath(event, destinationProductionSchedulePathElement),\n productionScheduleItemsInPathGroup\n );\n\n const closestProductionScheduleItemInPathGroupElement: SVGGraphicsElement = closestProductionScheduleItemInPathGroup.element;\n let destinationIndexInProductionSchedulePath: number = closestProductionScheduleItemInPathGroup.index;\n\n if (\n !isNil(closestProductionScheduleItemInPathGroupElement) &&\n !isInLowerHalfOfProductionScheduleItem(this.getMouseCoordinatesInProductionSchedulePath(event, destinationProductionSchedulePathElement), closestProductionScheduleItemInPathGroupElement)\n ) {\n destinationIndexInProductionSchedulePath = destinationIndexInProductionSchedulePath + 1;\n }\n\n const destinationOfDraggedProductionScheduleItemElement: SVGGraphicsElement = productionScheduleItemsInPathGroup[destinationIndexInProductionSchedulePath];\n const targetIndexOfDraggedProductionScheduleItem: number = !isNil(destinationOfDraggedProductionScheduleItemElement)\n ? this.getTargetIndexOfDestinationProductionScheduleItem(event, destinationOfDraggedProductionScheduleItemElement, false, this.productionScheduleItem)\n : null;\n\n this.moveDraggedProductionScheduleItemToProductionSchedulePath(sourceProductionSchedulePath, destinationProductionSchedulePath, targetIndexOfDraggedProductionScheduleItem);\n } else {\n const destinationProductionScheduleColoredYarnSet = d3Select(destinationProductionSchedulePathElement.parentElement).datum() as OverviewListColoredYarnSetWithStartDent;\n this.moveDraggedProductionScheduleItemToColoredYarnSet(\n event,\n sourceProductionSchedulePath,\n destinationProductionScheduleColoredYarnSet,\n destinationProductionSchedulePath,\n destinationProductionSchedulePathElement\n );\n }\n }\n\n private ondDragEndOnColoredYarnSet(event: DragEvent, sourceProductionSchedulePath: ProductionSchedulePath): void {\n const destinationProductionScheduleColoredYarnSet = this.destinationOfDraggedProductionScheduleItem.datum() as OverviewListColoredYarnSetWithStartDent;\n\n this.moveDraggedProductionScheduleItemToColoredYarnSet(event, sourceProductionSchedulePath, destinationProductionScheduleColoredYarnSet);\n }\n\n private getMouseCoordinatesInProductionSchedulePlanView(event: DragEvent): Coordinates {\n const productionScheduleWrapperElement = d3Select(`.${this.labelForProductionScheduleBuilderGroup}`).node() as ContainerElement;\n const [mouseCoordinateX, mouseCoordinateY] = d3Pointer(event, productionScheduleWrapperElement);\n return {x: mouseCoordinateX, y: mouseCoordinateY};\n }\n\n private drawProductionSchedulePathDropIndicator(parentElement: Element, dropIndicatorPosition: number): void {\n d3Select(parentElement).append('rect').attr('class', 'production-schedule-drop-indicator vertical').attr('x', dropIndicatorPosition).raise();\n }\n\n private drawProductionScheduleItemDropIndicator(parentElement: Element, dropIndicatorPosition: number): void {\n dropIndicatorPosition = dropIndicatorPosition - this.dropIndicatorPositionHeight;\n\n d3Select(parentElement).append('rect').attr('class', 'production-schedule-drop-indicator horizontal').attr('y', dropIndicatorPosition).raise();\n }\n\n private removeDropIndicator(): void {\n d3SelectAll('.production-schedule-drop-indicator').remove();\n }\n\n private handleDragOverProductionScheduleItem(event: DragEvent, destinationOfDraggedProductionScheduleItemElement: SVGGraphicsElement): void {\n const destinationPathElement: SVGGraphicsElement = destinationOfDraggedProductionScheduleItemElement.parentElement as any as SVGGraphicsElement;\n\n if (this.isMousePositionInsideProductionSchedulePath(event, destinationPathElement)) {\n const isDraggingOverRepetitionOfProductionScheduleItem: boolean = d3Select(destinationOfDraggedProductionScheduleItemElement)\n .node()\n .classList.contains(this.labelForProductionScheduleItemRepetition);\n\n let canMoveProductionScheduleItemToProductionSchedulePath = true;\n\n const productionScheduleItem = this.destinationOfDraggedProductionScheduleItem.datum() as ProductionScheduleItemInPathGroup;\n\n if (!isNil(productionScheduleItem)) {\n const productionSchedulePathsOfColoredYarnSet = this.productionSchedule.getProductionSchedulePathsOfColoredYarnSetForProductionScheduleItem(productionScheduleItem);\n\n const destinationProductionSchedulePath = productionSchedulePathsOfColoredYarnSet.getProductionSchedulePathForProductionScheduleItem(productionScheduleItem);\n\n canMoveProductionScheduleItemToProductionSchedulePath = this.productionSchedule.canMoveProductionScheduleItemToProductionSchedulePath(\n this.productionScheduleItemIndexInPath,\n this.sourceOfDraggedProductionScheduleItemInPathGroup.datum().pathNumber,\n null,\n destinationProductionSchedulePath.pathNumber,\n this.productionScheduleItem\n );\n }\n\n if (!isDraggingOverRepetitionOfProductionScheduleItem && canMoveProductionScheduleItemToProductionSchedulePath) {\n const targetPositionOfDraggedProductionScheduleItemInPath: number = this.getTargetDropIndicatorPositionOfDraggedProductionScheduleItemInPath(\n event,\n destinationOfDraggedProductionScheduleItemElement,\n this.productionScheduleItem\n );\n\n this.drawProductionScheduleItemDropIndicator(destinationPathElement, targetPositionOfDraggedProductionScheduleItemInPath);\n }\n } else {\n const destinationProductionScheduleColoredYarnSet: OverviewListColoredYarnSetWithStartDent = d3Select(destinationPathElement.parentElement).datum() as OverviewListColoredYarnSetWithStartDent;\n\n if (\n this.productionSchedule.canMoveProductionScheduleItemToColoredYarnSet(\n this.sourceOfDraggedProductionScheduleItemInPathGroup.datum().pathNumber,\n destinationProductionScheduleColoredYarnSet.startDent,\n this.productionScheduleItem\n )\n ) {\n const targetPositionOfDraggedProductionScheduleItemInColoredYarnSetPath: number = this.getTargetDropIndicatorPositionOfDraggedProductionScheduleItemInColoredYarnSetPath(\n event,\n destinationPathElement\n );\n this.drawProductionSchedulePathDropIndicator(destinationPathElement.parentElement, targetPositionOfDraggedProductionScheduleItemInColoredYarnSetPath);\n }\n }\n }\n\n private handleDragOverProductionSchedulePath(event: DragEvent, destinationOfDraggedProductionScheduleItemElement: SVGGraphicsElement): void {\n if (this.isMousePositionInsideProductionSchedulePath(event, destinationOfDraggedProductionScheduleItemElement)) {\n const canMoveProductionScheduleItemToProductionSchedulePath: boolean = this.productionSchedule.canMoveProductionScheduleItemToProductionSchedulePath(\n this.productionScheduleItemIndexInPath,\n this.sourceOfDraggedProductionScheduleItemInPathGroup.datum().pathNumber,\n null,\n (this.destinationOfDraggedProductionScheduleItem.datum() as ProductionSchedulePath).pathNumber,\n this.productionScheduleItem\n );\n\n if (canMoveProductionScheduleItemToProductionSchedulePath) {\n this.handleMousePositionInsideProductionSchedulePath(event, destinationOfDraggedProductionScheduleItemElement);\n }\n } else {\n const destinationProductionScheduleColoredYarnSet: OverviewListColoredYarnSetWithStartDent = d3Select(\n destinationOfDraggedProductionScheduleItemElement.parentElement\n ).datum() as OverviewListColoredYarnSetWithStartDent;\n\n if (\n this.productionSchedule.canMoveProductionScheduleItemToColoredYarnSet(\n this.sourceOfDraggedProductionScheduleItemInPathGroup.datum().pathNumber,\n destinationProductionScheduleColoredYarnSet.startDent,\n this.productionScheduleItem\n )\n ) {\n const targetPositionOfDraggedProductionScheduleItemInColoredYarnSetPath: number = this.getTargetDropIndicatorPositionOfDraggedProductionScheduleItemInColoredYarnSetPath(\n event,\n destinationOfDraggedProductionScheduleItemElement\n );\n this.drawProductionSchedulePathDropIndicator(destinationOfDraggedProductionScheduleItemElement.parentElement, targetPositionOfDraggedProductionScheduleItemInColoredYarnSetPath);\n }\n }\n }\n\n private handleDragOverProductionScheduleColoredYarnSet(destinationOfDraggedProductionScheduleItemInPathGroupElement: SVGGraphicsElement): void {\n const sourceProductionSchedulePath: ProductionSchedulePath = this.sourceOfDraggedProductionScheduleItemInPathGroup.datum();\n const destinationProductionScheduleColoredYarnSet = this.destinationOfDraggedProductionScheduleItem.datum() as OverviewListColoredYarnSetWithStartDent;\n\n const canDropProductionScheduleItemOnToColoredYarnSet: boolean = this.productionSchedule.canMoveProductionScheduleItemToColoredYarnSet(\n sourceProductionSchedulePath.pathNumber,\n destinationProductionScheduleColoredYarnSet.startDent,\n this.productionScheduleItem\n );\n\n if (canDropProductionScheduleItemOnToColoredYarnSet) {\n const productionSchedulePaths = d3Select(destinationOfDraggedProductionScheduleItemInPathGroupElement).selectAll(`.${this.labelForProductionSchedulePath}`).nodes();\n\n const lastProductionSchedulePathSelection = d3Select(productionSchedulePaths[productionSchedulePaths.length - 1]);\n\n if (!isNil(lastProductionSchedulePathSelection.node())) {\n const dropIndicatorPosition = Number(lastProductionSchedulePathSelection.attr('x')) + Number(lastProductionSchedulePathSelection.attr('width'));\n this.drawProductionSchedulePathDropIndicator(destinationOfDraggedProductionScheduleItemInPathGroupElement, dropIndicatorPosition);\n }\n }\n }\n\n private handleMousePositionInsideProductionSchedulePath(event: DragEvent, destinationOfDraggedProductionScheduleItemElement: SVGGraphicsElement): void {\n const productionScheduleItemsInPathGroup: SVGGraphicsElement[] = this.getProductionScheduleItemElementsInPath(destinationOfDraggedProductionScheduleItemElement);\n const mouseCoordinates: Coordinates = this.getMouseCoordinatesInProductionSchedulePath(event, destinationOfDraggedProductionScheduleItemElement);\n\n const closestProductionScheduleItemInPathGroup: ClosestProductionScheduleItemInPathGroup = getClosestProductionScheduleItemAndIndexRelativeToMouseCoordinates(\n mouseCoordinates,\n productionScheduleItemsInPathGroup\n );\n let dropIndicatorPosition: number;\n const closestProductionScheduleItemInPathGroupElement: SVGGraphicsElement = closestProductionScheduleItemInPathGroup.element;\n let destinationIndexInProductionSchedulePath: number = closestProductionScheduleItemInPathGroup.index;\n\n if (!isNil(closestProductionScheduleItemInPathGroupElement)) {\n const heightOfClosestProductionScheduleItem = Number(closestProductionScheduleItemInPathGroupElement.getAttribute('height'));\n const verticalPositionOfClosestProductionScheduleItem = Number(closestProductionScheduleItemInPathGroupElement.getAttribute('y'));\n\n if (isInLowerHalfOfProductionScheduleItem(mouseCoordinates, closestProductionScheduleItemInPathGroupElement)) {\n dropIndicatorPosition = verticalPositionOfClosestProductionScheduleItem + heightOfClosestProductionScheduleItem;\n } else {\n dropIndicatorPosition = verticalPositionOfClosestProductionScheduleItem;\n destinationIndexInProductionSchedulePath = destinationIndexInProductionSchedulePath + 1;\n }\n } else {\n dropIndicatorPosition = Number(productionScheduleItemsInPathGroup[productionScheduleItemsInPathGroup.length - 1].getAttribute('y'));\n }\n\n if (isEqual(destinationIndexInProductionSchedulePath, 0)) {\n dropIndicatorPosition -= this.dropIndicatorPositionHeight;\n }\n\n this.drawProductionScheduleItemDropIndicator(destinationOfDraggedProductionScheduleItemElement, dropIndicatorPosition);\n }\n\n private getTargetDropIndicatorPositionOfDraggedProductionScheduleItemInPath(\n event: DragEvent,\n destinationOfDraggedProductionScheduleItemElement: SVGGraphicsElement,\n draggedItem: Drawing | ProductionScheduleItemInPathGroup\n ): number {\n const indexOfDestinationProductionScheduleItem: number = this.getTargetIndexOfDestinationProductionScheduleItem(event, destinationOfDraggedProductionScheduleItemElement, true, draggedItem);\n\n const destinationPathElement = destinationOfDraggedProductionScheduleItemElement.parentElement;\n const productionScheduleItemElementsInPath: SVGGraphicsElement[] = this.getProductionScheduleItemElementsInPath(destinationPathElement);\n\n const destinationProductionScheduleItemSelection = d3Select(productionScheduleItemElementsInPath[indexOfDestinationProductionScheduleItem]);\n const destinationProductionScheduleItemElement = destinationProductionScheduleItemSelection.node();\n let verticalPositionOfDropIndicator: number;\n\n if (isNil(destinationProductionScheduleItemElement)) {\n verticalPositionOfDropIndicator = Number(d3Select(destinationOfDraggedProductionScheduleItemElement).attr('y'));\n } else {\n verticalPositionOfDropIndicator = Math.min(\n Number(destinationProductionScheduleItemSelection.attr('y')) + Number(destinationProductionScheduleItemSelection.attr('height')),\n this.productionScheduleBuilderHeight\n );\n }\n\n return verticalPositionOfDropIndicator;\n }\n\n private getTargetIndexOfDestinationProductionScheduleItem(\n event: DragEvent,\n destinationOfDraggedProductionScheduleItemElement: SVGGraphicsElement,\n isForShowingDropIndicator: boolean,\n draggedItem: Drawing | ProductionScheduleItemInPathGroup\n ): number {\n const mouseCoordinatesInProductionSchedulePlanView: Coordinates = this.getMouseCoordinatesInProductionSchedulePlanView(event);\n\n const destinationPathElement = destinationOfDraggedProductionScheduleItemElement.parentElement;\n const productionScheduleItemElementsInPath: SVGGraphicsElement[] = this.getProductionScheduleItemElementsInPath(destinationPathElement);\n\n let indexOfDestinationProductionScheduleItem: number;\n\n if (destinationOfDraggedProductionScheduleItemElement.classList.contains(this.labelForProductionScheduleItemRepetition)) {\n const repetition: ProductionScheduleItemInPathGroup = d3Select(destinationOfDraggedProductionScheduleItemElement).datum() as ProductionScheduleItemInPathGroup;\n const originalDestinationOfDraggedProductionScheduleItemElement: SVGGraphicsElement = (\n d3SelectAll(`.${this.labelForProductionScheduleItem}.production-schedule-item-${repetition.uuid}`)\n .nodes()\n .filter((svgGraphicsElement: SVGGraphicsElement) => !svgGraphicsElement.classList.contains(this.labelForProductionScheduleItemRepetition)) as SVGGraphicsElement[]\n )[0];\n indexOfDestinationProductionScheduleItem = productionScheduleItemElementsInPath.indexOf(originalDestinationOfDraggedProductionScheduleItemElement);\n } else {\n indexOfDestinationProductionScheduleItem = productionScheduleItemElementsInPath.indexOf(destinationOfDraggedProductionScheduleItemElement);\n }\n\n const {height: heightOfDestinationOfDraggedProductionScheduleItem} = destinationOfDraggedProductionScheduleItemElement.getBBox();\n const destinationOfDraggedProductionScheduleItemSelection = d3Select(destinationOfDraggedProductionScheduleItemElement);\n const verticalPositionOfDestinationOfDraggedProductionScheduleItem = Number(destinationOfDraggedProductionScheduleItemSelection.attr('y'));\n const verticalCenterOfProductionScheduleItem = verticalPositionOfDestinationOfDraggedProductionScheduleItem + heightOfDestinationOfDraggedProductionScheduleItem / 2;\n\n const otherProductionScheduleItem: ProductionScheduleItemInPathGroup = destinationOfDraggedProductionScheduleItemSelection.datum() as ProductionScheduleItemInPathGroup;\n const isDroppingOnSameProductionScheduleItem: boolean =\n draggedItem instanceof ProductionScheduleItemInPathGroup && draggedItem.uuid === (isNil(otherProductionScheduleItem) ? draggedItem.uuid : otherProductionScheduleItem.uuid);\n if (isDroppingOnSameProductionScheduleItem) {\n indexOfDestinationProductionScheduleItem = this.productionScheduleItemIndexInPath;\n } else {\n if (isForShowingDropIndicator) {\n indexOfDestinationProductionScheduleItem = this.adjustTargetPositionOfDraggedProductionScheduleItemInPathAccordingToMousePositionForDropIndicator(\n mouseCoordinatesInProductionSchedulePlanView,\n verticalCenterOfProductionScheduleItem,\n indexOfDestinationProductionScheduleItem\n );\n } else {\n indexOfDestinationProductionScheduleItem = this.adjustTargetPositionOfDraggedProductionScheduleItemInPathAccordingToMousePosition(\n mouseCoordinatesInProductionSchedulePlanView,\n verticalCenterOfProductionScheduleItem,\n destinationOfDraggedProductionScheduleItemSelection,\n indexOfDestinationProductionScheduleItem,\n draggedItem\n );\n }\n }\n\n return indexOfDestinationProductionScheduleItem;\n }\n\n private adjustTargetPositionOfDraggedProductionScheduleItemInPathAccordingToMousePositionForDropIndicator(\n mouseCoordinatesInProductionSchedulePlanView: Coordinates,\n verticalCenterOfProductionScheduleItem: number,\n indexOfDestinationProductionScheduleItem: number\n ): number {\n const isInUpperHalfOfProductionScheduleItem: boolean = mouseCoordinatesInProductionSchedulePlanView.y <= verticalCenterOfProductionScheduleItem;\n\n if (isInUpperHalfOfProductionScheduleItem) {\n indexOfDestinationProductionScheduleItem++;\n }\n return indexOfDestinationProductionScheduleItem;\n }\n\n private adjustTargetPositionOfDraggedProductionScheduleItemInPathAccordingToMousePosition(\n mouseCoordinatesInProductionSchedulePlanView: Coordinates,\n verticalCenterOfProductionScheduleItem: number,\n destinationOfDraggedProductionScheduleItemSelection: any,\n indexOfDestinationProductionScheduleItem: number,\n draggedItem: Drawing | ProductionScheduleItemInPathGroup\n ): number {\n const isInUpperHalfOfProductionScheduleItem: boolean = mouseCoordinatesInProductionSchedulePlanView.y <= verticalCenterOfProductionScheduleItem;\n const isInSameProductionSchedulePath: boolean =\n draggedItem instanceof ProductionScheduleItemInPathGroup &&\n isEqual(this.sourceOfDraggedProductionScheduleItemInPathGroup.datum(), d3Select(destinationOfDraggedProductionScheduleItemSelection.node().parentElement).datum());\n\n const isDestinationRepetition: ProductionScheduleItemInPathGroup = destinationOfDraggedProductionScheduleItemSelection.classed(this.labelForProductionScheduleItemRepetition);\n\n if (isInSameProductionSchedulePath) {\n const isDraggingHigherThanOriginalPosition: boolean = indexOfDestinationProductionScheduleItem > this.productionScheduleItemIndexInPath;\n\n if (isDraggingHigherThanOriginalPosition) {\n if (!isInUpperHalfOfProductionScheduleItem && !isDestinationRepetition) {\n indexOfDestinationProductionScheduleItem--;\n }\n } else {\n if (isInUpperHalfOfProductionScheduleItem) {\n indexOfDestinationProductionScheduleItem++;\n }\n }\n } else {\n if (isInUpperHalfOfProductionScheduleItem) {\n indexOfDestinationProductionScheduleItem++;\n }\n }\n return indexOfDestinationProductionScheduleItem;\n }\n\n private isMousePositionInsideProductionSchedulePath(event: DragEvent, destinationPathElement: SVGGraphicsElement): boolean {\n const destinationPathElementSelection = d3Select(destinationPathElement);\n const productionSchedulePathPositionEnd = Number(destinationPathElementSelection.attr('width'));\n\n const mouseCoordinatesInProductionSchedulePath: Coordinates = this.getMouseCoordinatesInProductionSchedulePath(event, destinationPathElementSelection.node() as ContainerElement);\n const productionSchedulePathDropThreshold = this.getProductionSchedulePathDropThreshold();\n\n return (\n mouseCoordinatesInProductionSchedulePath.x > productionSchedulePathDropThreshold &&\n mouseCoordinatesInProductionSchedulePath.x < productionSchedulePathPositionEnd - productionSchedulePathDropThreshold\n );\n }\n\n private getTargetDropIndicatorPositionOfDraggedProductionScheduleItemInColoredYarnSetPath(event: DragEvent, destinationPathElement: SVGGraphicsElement): number {\n const mouseCoordinatesInProductionSchedulePlanView: Coordinates = this.getMouseCoordinatesInProductionSchedulePath(event, destinationPathElement);\n\n const destinationPathElementSelection = d3Select(destinationPathElement);\n const productionSchedulePathPositionStart = Number(destinationPathElementSelection.attr('x'));\n const productionSchedulePathPositionEnd = productionSchedulePathPositionStart + Number(destinationPathElementSelection.attr('width'));\n const productionSchedulePathDropThreshold = this.getProductionSchedulePathDropThreshold();\n\n const isInLeftSideOfPath: boolean = mouseCoordinatesInProductionSchedulePlanView.x > 0 && mouseCoordinatesInProductionSchedulePlanView.x < productionSchedulePathDropThreshold;\n\n return isInLeftSideOfPath ? productionSchedulePathPositionStart : productionSchedulePathPositionEnd;\n }\n\n private getProductionScheduleItemElementsInPath(destinationPath: BaseType): SVGGraphicsElement[] {\n return d3Select(destinationPath)\n .selectAll(`.${this.labelForProductionScheduleItem}`)\n .nodes()\n .filter((svgGraphicsElement: SVGGraphicsElement) => !svgGraphicsElement.classList.contains(this.labelForProductionScheduleItemRepetition)) as SVGGraphicsElement[];\n }\n\n private getMouseCoordinatesInProductionSchedulePath(event: DragEvent, destinationProductionSchedulePathElement: ContainerElement): Coordinates {\n const [mouseCoordinateX, mouseCoordinateY] = d3Pointer(event, destinationProductionSchedulePathElement);\n return {x: mouseCoordinateX, y: mouseCoordinateY};\n }\n\n private cleanProductionSchedulePlanAfterDrop(): void {\n this.removeDropIndicator();\n this.restoreProductionScheduleItemClone();\n this.restoreProductionScheduleToNonDraggingState();\n }\n\n private restoreProductionScheduleToNonDraggingState(): void {\n this.dragInitializedOnCurrentProductionScheduleItem = false;\n ProductionScheduleItemInPathGroupContainerComponent.isDraggingProductionScheduleItemInPathGroup = false;\n }\n\n private restoreProductionScheduleItemClone(): void {\n const draggedProductionScheduleItem = d3SelectAll(` .${this.labelForDraggedProductionScheduleItemElement}`);\n\n const draggedProductionScheduleItemNode = draggedProductionScheduleItem.node() as SVGGraphicsElement;\n if (isNil(draggedProductionScheduleItemNode)) {\n d3Select('.production-schedule-element-clone').remove();\n } else {\n const productionSchedulePathOfDraggedProductionScheduleItem = draggedProductionScheduleItemNode.parentNode;\n\n const cloneOfDraggedProductionScheduleItem = d3Select('.production-schedule-element-clone')\n .attr('x', draggedProductionScheduleItem.attr('x'))\n .attr('y', draggedProductionScheduleItem.attr('y'))\n .attr('class', this.labelForProductionScheduleItem);\n\n productionSchedulePathOfDraggedProductionScheduleItem.insertBefore(\n cloneOfDraggedProductionScheduleItem.remove().node() as SVGGraphicsElement,\n (draggedProductionScheduleItem.node() as SVGGraphicsElement).nextSibling\n );\n draggedProductionScheduleItem.remove();\n }\n }\n\n private draggedNewDrawingOverProductionScheduleItem(dragEvent: DragEvent): void {\n dragEvent.preventDefault();\n\n this.removeDropIndicator();\n const destinationOfDraggedProductionScheduleItem = d3Select(this.elementRef.nativeElement) as d3Selection<\n BaseType,\n ProductionSchedulePath | OverviewListColoredYarnSetWithStartDent | ProductionScheduleItemInPathGroup,\n BaseType,\n undefined\n >;\n\n const destinationHasChanged = !isEqual(this.destinationOfDraggedProductionScheduleItem, destinationOfDraggedProductionScheduleItem);\n\n if (destinationHasChanged) {\n this.destinationOfDraggedProductionScheduleItem = destinationOfDraggedProductionScheduleItem;\n }\n\n const mouseCoordinatesInProductionSchedulePath: Coordinates = this.getMouseCoordinatesInProductionSchedulePath(dragEvent, this.elementRef.nativeElement);\n const destinationProductionSchedulePathElement: SVGGraphicsElement = (destinationOfDraggedProductionScheduleItem.node() as SVGGraphicsElement).parentNode as SVGGraphicsElement;\n const destinationPathElementSelection = d3Select(destinationProductionSchedulePathElement);\n const destinationProductionScheduleColoredYarnSet: OverviewListColoredYarnSetWithStartDent = d3Select(\n destinationProductionSchedulePathElement.parentNode as SVGGraphicsElement\n ).datum() as OverviewListColoredYarnSetWithStartDent;\n\n const productionSchedulePathPositionEnd = Number(destinationPathElementSelection.attr('width'));\n const productionSchedulePathDropThreshold = this.getProductionSchedulePathDropThreshold();\n\n const hasDraggedInsideProductionSchedulePath: boolean =\n mouseCoordinatesInProductionSchedulePath.x > productionSchedulePathDropThreshold &&\n mouseCoordinatesInProductionSchedulePath.x < productionSchedulePathPositionEnd - productionSchedulePathDropThreshold;\n\n const destinationProductionSchedulePath = destinationPathElementSelection.datum() as ProductionSchedulePath;\n if (hasDraggedInsideProductionSchedulePath) {\n if (isEqual(dragEvent.type, 'dragover')) {\n dragEvent.stopPropagation();\n }\n if (!('quantity' in this.draggingService.getCurrentData())) {\n const draggedItem: ListDrawing = this.draggingService.getCurrentData();\n\n if (this.productionSchedule.canAddProductionScheduleItemToProductionSchedulePath(draggedItem, destinationProductionSchedulePath.pathNumber, destinationProductionScheduleColoredYarnSet)) {\n const targetDropIndicatorPositionOfDestinationProductionScheduleItem = this.getTargetDropIndicatorPositionOfDraggedProductionScheduleItemInPath(\n dragEvent,\n destinationOfDraggedProductionScheduleItem.node() as SVGGraphicsElement,\n draggedItem.drawing\n );\n\n this.drawProductionScheduleItemDropIndicator(destinationProductionSchedulePathElement, targetDropIndicatorPositionOfDestinationProductionScheduleItem);\n }\n }\n }\n }\n\n private droppedNewDrawingOnProductionScheduleItem(event: DragEvent): void {\n const destinationOfDraggedProductionScheduleItem = d3Select(this.elementRef.nativeElement);\n\n const mouseCoordinatesInProductionSchedulePath: Coordinates = this.getMouseCoordinatesInProductionSchedulePath(event, destinationOfDraggedProductionScheduleItem.node());\n const destinationProductionSchedulePathElement: SVGGraphicsElement = (destinationOfDraggedProductionScheduleItem.node() as SVGGraphicsElement).parentNode as SVGGraphicsElement;\n const destinationPathElementSelection = d3Select(destinationProductionSchedulePathElement);\n const destinationProductionScheduleColoredYarnSet: OverviewListColoredYarnSetWithStartDent = d3Select(\n destinationProductionSchedulePathElement.parentNode as SVGGraphicsElement\n ).datum() as OverviewListColoredYarnSetWithStartDent;\n const productionSchedulePathPositionEnd = Number(destinationPathElementSelection.attr('width'));\n const productionSchedulePathDropThreshold = this.getProductionSchedulePathDropThreshold();\n\n const hasDroppedInsideProductionSchedulePath: boolean =\n mouseCoordinatesInProductionSchedulePath.x > productionSchedulePathDropThreshold &&\n mouseCoordinatesInProductionSchedulePath.x < productionSchedulePathPositionEnd - productionSchedulePathDropThreshold;\n\n const destinationProductionSchedulePath = destinationPathElementSelection.datum() as ProductionSchedulePath;\n\n if (!('quantity' in this.draggingService.getCurrentData())) {\n const draggedItem: ListDrawing = this.draggingService.getCurrentData();\n\n if (\n hasDroppedInsideProductionSchedulePath &&\n this.productionSchedule.canAddProductionScheduleItemToProductionSchedulePath(draggedItem, destinationProductionSchedulePath.pathNumber, destinationProductionScheduleColoredYarnSet)\n ) {\n const targetIndexOfDestinationProductionScheduleItem = this.getTargetIndexOfDestinationProductionScheduleItem(\n event,\n destinationOfDraggedProductionScheduleItem.node() as SVGGraphicsElement,\n false,\n draggedItem.drawing\n );\n this.productionSchedulePlan.addDrawingToProductionSchedulePath(\n this.draggingService.getCurrentData(),\n destinationProductionSchedulePath.pathNumber,\n destinationProductionScheduleColoredYarnSet,\n targetIndexOfDestinationProductionScheduleItem\n );\n }\n }\n }\n\n private getProductionSchedulePathDropThreshold(): number {\n return 30 * this.aspectRatio.width;\n }\n\n private setVerticalPosition(): void {\n this.verticalPosition =\n !isNil(this.elementRef.nativeElement) && this.productionScheduleItemIndexInPath !== 0\n ? this.elementRef.nativeElement.previousElementSibling.getAttribute('y') - this.totalHeight\n : this.productionScheduleBuilderHeight - this.totalHeight;\n }\n}\n","\n \n\n \n {{ getQuantityText() }}\n \n\n","import {AfterViewInit, ChangeDetectorRef, Component, ElementRef, Input, OnChanges, Renderer2, ViewChild} from '@angular/core';\nimport {AssertionUtils, TranslateService} from '@vdw/angular-component-library';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: '[app-production-schedule-item-in-path-group-repeat-indicator-new]',\n templateUrl: './production-schedule-item-in-path-group-repeat-indicator-new.component.html',\n styleUrls: ['./production-schedule-item-in-path-group-repeat-indicator-new.component.scss']\n})\nexport class ProductionScheduleItemInPathGroupRepeatIndicatorNewComponent implements AfterViewInit, OnChanges {\n @Input() public quantity: number;\n @Input() public productionScheduleItemMultiplier: number;\n @Input() public drawingWidth: number;\n\n @ViewChild('repeatIndicatorLabel') public repeatIndicatorLabel: ElementRef;\n @ViewChild('repeatIndicatorLabelContainer') public repeatIndicatorLabelContainer: ElementRef;\n\n public readonly REPEAT_INDICATOR_LABEL_CONTAINER_PADDING: number = 8;\n\n public static minimumAllowedHeight: number = 54;\n public repeatIndicatorLabelContainerXPosition: number = 0;\n public canShowRepeatIndicatorLabel: boolean = true;\n\n public constructor(\n private readonly renderer: Renderer2,\n private readonly translate: TranslateService,\n private readonly changeDetectorRef: ChangeDetectorRef\n ) {}\n\n public ngAfterViewInit(): void {\n this.setRepeatIndicatorLabelAttributes();\n this.setCanShowRepeatIndicatorLabel();\n this.changeDetectorRef.detectChanges();\n }\n\n public ngOnChanges(): void {\n this.setRepeatIndicatorLabelAttributes();\n }\n\n public getQuantityText(): string {\n return `${this.productionScheduleItemMultiplier} x ${this.quantity} ${this.translate.instant('PRODUCTION_ORDER.PHASES.DESIGNS')}`.toLowerCase();\n }\n\n public setCanShowRepeatIndicatorLabel(): void {\n if (AssertionUtils.isNullOrUndefined(this.repeatIndicatorLabel)) {\n return;\n }\n\n const textWidth = this.repeatIndicatorLabel.nativeElement.getBBox().width;\n const containerWidth = textWidth + this.REPEAT_INDICATOR_LABEL_CONTAINER_PADDING * 2;\n this.canShowRepeatIndicatorLabel = containerWidth < this.drawingWidth;\n }\n\n private setRepeatIndicatorLabelAttributes(): void {\n if (AssertionUtils.isNullOrUndefined(this.repeatIndicatorLabel) || AssertionUtils.isNullOrUndefined(this.repeatIndicatorLabelContainer)) {\n return;\n }\n\n const textWidth = this.repeatIndicatorLabel.nativeElement.getBBox().width;\n const containerWidth = textWidth + this.REPEAT_INDICATOR_LABEL_CONTAINER_PADDING * 2;\n\n this.renderer.setAttribute(this.repeatIndicatorLabelContainer.nativeElement, 'width', `${containerWidth}px`);\n this.renderer.setAttribute(this.repeatIndicatorLabelContainer.nativeElement, 'x', `calc(100% - ${containerWidth + this.REPEAT_INDICATOR_LABEL_CONTAINER_PADDING}px)`);\n }\n}\n","\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{ productionScheduleItem.drawing.name }}\n \n {{ 'GENERAL.DIMENSIONS.HEIGHT' | bmsTranslate }}:\n {{ getPathItemHeight(productionScheduleItem) }}\n \n \n \n\n \n \n \n \n \n \n\n \n \n\n\n\n \n \n \n \n \n \n \n \n \n \n {{ 'GENERAL.DIMENSIONS.HEIGHT' | bmsTranslate }}:\n {{ getPathItemHeight(productionScheduleItem) }}\n \n \n \n\n","import {Component, ElementRef, HostBinding, Input, OnChanges, OnInit, Renderer2, ViewChild} from '@angular/core';\nimport {DrawingType} from '@domain/production-schedule/drawing-type.enum';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {OverviewListColoredYarnSetWithStartDent} from '@domain/textile-data/creel/overview-list-colored-yarn-set-with-start-dent';\nimport {AssertionUtils, BaseComponent, Color, convertUnit, LocaleUtils, TranslateService, Unit} from '@vdw/angular-component-library';\nimport {L10nIntlService} from 'angular-l10n';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: '[app-production-schedule-item-in-path-group-new]',\n templateUrl: './production-schedule-item-in-path-group-new.component.html',\n styleUrls: ['./production-schedule-item-in-path-group-new.component.scss']\n})\nexport class ProductionScheduleItemInPathGroupNewComponent extends BaseComponent implements OnInit, OnChanges {\n @HostBinding('class.production-schedule-item-repetition') @Input() public isProductionScheduleItemInPathGroupRepetition: boolean;\n @Input() public productionScheduleItem: ProductionScheduleItemInPathGroup;\n @Input() public productionScheduleColoredYarnSet: OverviewListColoredYarnSetWithStartDent;\n @Input() public cutbarBeforeHeight: number;\n @Input() public cutbarAfterHeight: number;\n @Input() public drawingHeight: number;\n @Input() public drawingImageHeight: number;\n @Input() public drawingWidth: number;\n @Input() public totalHeight: number;\n\n @ViewChild('diagonalHatch') public diagonalHatch: ElementRef;\n @ViewChild('productionScheduleItemPathLabelContainer') public productionScheduleItemPathLabelContainer: ElementRef;\n @ViewChild('productionScheduleItemPathLabel') public productionScheduleItemPathLabel: ElementRef;\n @ViewChild('productionScheduleItemNonRecolorableLabelContainer') public productionScheduleItemNonRecolorableLabelContainer: ElementRef;\n @ViewChild('productionScheduleItemNonRecolorableLabel') public productionScheduleItemNonRecolorableLabel: ElementRef;\n\n public cutbarAfterVerticalPosition: number = 0;\n public drawingVerticalPosition: number = 0;\n public productionScheduleItemInPathGroupHeight: number = 0;\n public canShowProductionScheduleItemPathLabel: boolean = true;\n public canShowProductionScheduleItemNonRecolorableLabel: boolean = true;\n public canShowBorder: boolean = false;\n\n private readonly PRODUCTION_SCHEDULE_ITEM_LABEL_CONTAINER_PADDING: number = 10;\n\n public constructor(\n private readonly elementRef: ElementRef,\n private readonly renderer: Renderer2,\n private readonly l10nIntlService: L10nIntlService,\n private readonly translate: TranslateService\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this.setCanShowBorder();\n }\n\n public ngOnChanges(): void {\n this.setProductionScheduleItemInPathGroupHeight();\n this.setCutbarAfterVerticalPosition();\n this.drawingVerticalPosition = this.productionScheduleItem.isRecolored ? this.cutbarBeforeHeight : 0;\n\n setTimeout(() => {\n this.setProductionScheduleItemInPathGroupAttributes();\n this.setProductionScheduleItemLabelContainersAttributes();\n this.setCanShowProductionScheduleItemLabels();\n });\n }\n\n public getPlaceholderWidthAndHeight(): number {\n return this.productionScheduleItem.technicalDimensions.heightInPicks > this.productionScheduleItem.technicalDimensions.widthInDents ? this.drawingWidth : this.drawingImageHeight;\n }\n\n public getPlaceholderPosition(): string {\n const placeholderWidthAndHeight = this.getPlaceholderWidthAndHeight();\n const position = -placeholderWidthAndHeight / 2;\n\n return `translate(${position}, ${position})`;\n }\n\n public getPathItemStyle(pathItem: ProductionScheduleItemInPathGroup): object {\n if (pathItem.scheduleItemType === DrawingType.MANUAL_NON_PRODUCTION_ITEM) {\n return {'background-image': 'url(\"assets/images/jute-background.svg\")'};\n } else {\n const rgbValues = this.productionScheduleColoredYarnSet?.coloredYarnSet?.overviewListColorSet?.creelPositions[pathItem.borderColorPosition - 1]?.items[0] as Color;\n return {fill: `rgb(${rgbValues?.rgb?.red}, ${rgbValues?.rgb?.green}, ${rgbValues?.rgb?.blue})`};\n }\n }\n\n public getPathItemHeight(pathItem: ProductionScheduleItemInPathGroup): string {\n const technicalHeight = pathItem.technicalDimensions.heightInPicks;\n const commercialHeightInMM = pathItem.commercialDimensionsInMM.heightInMM;\n\n const commercialHeightInCM = this.convertValueToCommercialUnit(commercialHeightInMM, Unit.MILLIMETER, Unit.CENTIMETER);\n const formattedTechnicalHeight = LocaleUtils.formatNumber(technicalHeight, this.l10nIntlService, 2);\n\n const unit = this.translate.instant('GENERAL.UNIT.PICKS');\n\n return `${formattedTechnicalHeight} ${unit} / ${commercialHeightInCM}`;\n }\n\n public setCanShowProductionScheduleItemLabels(): void {\n this.canShowProductionScheduleItemPathLabel = this.canShowProductionScheduleItemLabel(this.productionScheduleItemPathLabel);\n this.canShowProductionScheduleItemNonRecolorableLabel = this.canShowProductionScheduleItemLabel(this.productionScheduleItemNonRecolorableLabel);\n }\n\n public setCanShowBorder(): void {\n this.canShowBorder = this.productionScheduleItem.scheduleItemType === DrawingType.BMP;\n }\n\n public getTooltipText(pathItem: ProductionScheduleItemInPathGroup): string {\n return `${this.translate.instant('GENERAL.DIMENSIONS.HEIGHT')}: ${this.getPathItemHeight(pathItem)}`;\n }\n\n public getAdjustedWidth(pixels: number): string {\n return this.drawingWidth ? `${this.drawingWidth - pixels}px` : '100%';\n }\n\n public getAdjustedHeight(pixels: number): string {\n let result: number;\n if (this.productionScheduleItemInPathGroupHeight) {\n result = this.productionScheduleItemInPathGroupHeight - pixels;\n }\n\n if (!AssertionUtils.isNullOrUndefined(result)) {\n if (result < pixels) {\n return `${pixels}px`;\n } else {\n return `${result}px`;\n }\n } else {\n return '100%';\n }\n }\n\n private setProductionScheduleItemInPathGroupAttributes(): void {\n const productionScheduleItemInPathGroupElement = this.elementRef.nativeElement;\n\n this.renderer.setAttribute(productionScheduleItemInPathGroupElement, 'height', `${this.totalHeight}`);\n this.renderer.setAttribute(productionScheduleItemInPathGroupElement, 'width', `${this.drawingWidth}`);\n\n this.renderer.setAttribute(productionScheduleItemInPathGroupElement, 'y', `${this.getVerticalPositionOfProductionScheduleItemInPathGroup()}`);\n this.renderer.setAttribute(productionScheduleItemInPathGroupElement, 'x', '0');\n }\n\n private getVerticalPositionOfProductionScheduleItemInPathGroup(): number {\n if (!AssertionUtils.isNullOrUndefined(this.elementRef.nativeElement) && this.isProductionScheduleItemInPathGroupRepetition) {\n return this.elementRef.nativeElement.previousElementSibling.getAttribute('y') - this.productionScheduleItemInPathGroupHeight;\n } else {\n return 0;\n }\n }\n\n private setCutbarAfterVerticalPosition(): void {\n this.cutbarAfterVerticalPosition = this.totalHeight - this.cutbarBeforeHeight;\n }\n\n private setProductionScheduleItemInPathGroupHeight(): void {\n this.productionScheduleItemInPathGroupHeight = this.totalHeight - this.cutbarAfterHeight - this.cutbarBeforeHeight;\n }\n\n private setProductionScheduleItemLabelContainersAttributes(): void {\n this.setProductionScheduleItemLabelContainerAttributes(this.productionScheduleItemPathLabel, this.productionScheduleItemPathLabelContainer);\n this.setProductionScheduleItemLabelContainerAttributes(this.productionScheduleItemNonRecolorableLabel, this.productionScheduleItemNonRecolorableLabelContainer);\n }\n\n private setProductionScheduleItemLabelContainerAttributes(label: ElementRef, container: ElementRef): void {\n if (AssertionUtils.isNullOrUndefined(label) || AssertionUtils.isNullOrUndefined(container) || this.totalHeight === 0) {\n return;\n }\n\n const textWidth = label.nativeElement.getBBox().width;\n const containerWidth = textWidth + this.PRODUCTION_SCHEDULE_ITEM_LABEL_CONTAINER_PADDING * 2;\n\n this.renderer.setAttribute(container.nativeElement, 'width', `${containerWidth}`);\n this.renderer.setAttribute(container.nativeElement, 'x', `calc(50% - ${containerWidth / 2}px)`);\n }\n\n private convertValueToCommercialUnit(value: number, fromUnit: Unit, toUnit: Unit): string {\n const convertedValue = convertUnit({\n from: {\n value: value,\n unit: fromUnit\n },\n to: toUnit\n });\n\n const formattedNumber = LocaleUtils.formatNumber(convertedValue, this.l10nIntlService, 2);\n const unit = this.translate.instant('GENERAL.UNIT.CENTIMETER');\n\n return `${formattedNumber} ${unit}`;\n }\n\n private canShowProductionScheduleItemLabel(element: ElementRef): boolean {\n if (AssertionUtils.isNullOrUndefined(element) || this.totalHeight === 0) {\n return;\n }\n\n const labelBoundingBox = element.nativeElement.getBBox();\n const labelWidth: number = labelBoundingBox.width;\n const labelHeight = labelBoundingBox.height;\n\n const containerWidth = labelWidth + this.PRODUCTION_SCHEDULE_ITEM_LABEL_CONTAINER_PADDING * 2;\n const containerHeight = labelHeight + this.PRODUCTION_SCHEDULE_ITEM_LABEL_CONTAINER_PADDING * 2;\n\n return containerWidth < this.drawingWidth && containerHeight < this.productionScheduleItemInPathGroupHeight;\n }\n}\n","\n \n \n\n","import {Component, ElementRef, HostBinding, Inject, Input, OnChanges, OnInit, SimpleChanges} from '@angular/core';\nimport {ProductionOrderCustomSettings} from '@domain/production-schedule/custom-settings/production-order-custom-settings';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {ProductionSchedulePhase} from '@domain/production-schedule/production-schedule-phase.enum';\nimport {OverviewListColoredYarnSetWithStartDent} from '@domain/textile-data/creel/overview-list-colored-yarn-set-with-start-dent';\nimport {ProductionScheduleBuilderAspectRatio} from '@presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-builder-aspect-ratio';\nimport {EditProductionScheduleItemInPathGroupAction} from '@presentation/pages/texfab/production-schedule/add/plan/modals/edit-production-schedule-item-in-path-group/edit-production-schedule-item-in-path-group-action';\nimport {EditProductionScheduleItemInPathGroupComponent} from '@presentation/pages/texfab/production-schedule/add/plan/modals/edit-production-schedule-item-in-path-group/edit-production-schedule-item-in-path-group.component';\nimport {PRODUCTION_SCHEDULE_PLAN, ProductionSchedulePlan} from '@presentation/pages/texfab/production-schedule/add/plan/production-schedule-plan';\nimport {AssertionUtils, DialogBuilderFactoryService, Unit} from '@vdw/angular-component-library';\nimport {select as d3Select} from 'd3-selection';\nimport {isNil} from 'lodash-es';\nimport {filter} from 'rxjs/operators';\nimport {ProductionScheduleItemInPathGroupRepeatIndicatorNewComponent} from '../production-schedule-item-in-path-group-repeat-indicator-new/production-schedule-item-in-path-group-repeat-indicator-new.component';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: '[app-production-schedule-item-in-path-group-container-new]',\n templateUrl: './production-schedule-item-in-path-group-container-new.component.html',\n styleUrls: ['./production-schedule-item-in-path-group-container-new.component.scss']\n})\nexport class ProductionScheduleItemInPathGroupContainerNewComponent implements OnInit, OnChanges {\n @Input() public productionScheduleItem: ProductionScheduleItemInPathGroup;\n @Input() public productionScheduleItemIndexInPath: number;\n @Input() public productionScheduleBuilderHeight: number;\n @Input() public commercialUnit: Unit;\n @Input() public aspectRatio: ProductionScheduleBuilderAspectRatio;\n @Input() public productionSchedule: ProductionSchedule;\n @Input() public productionSchedulePathIndex: number;\n @Input() public productionScheduleColoredYarnSet: OverviewListColoredYarnSetWithStartDent;\n @Input() public productionSchedulePhase: ProductionSchedulePhase;\n @Input() public productionOrderCustomSettings: ProductionOrderCustomSettings;\n @Input() public isProductionScheduleDisplayOverview: boolean;\n @HostBinding('class') public readonly labelForProductionScheduleItem = 'production-schedule-item';\n @HostBinding('attr.y') public verticalPosition: number;\n @HostBinding('attr.height') public totalHeight: number;\n\n public cutbarBeforeHeight: number;\n public cutbarAfterHeight: number;\n public drawingImageHeight: number;\n public drawingHeight: number;\n public drawingWidth: number;\n\n private readonly MINIMUM_HEIGHT_FOR_CUTBAR_IN_PX = 1;\n\n public constructor(\n @Inject(PRODUCTION_SCHEDULE_PLAN) private readonly productionSchedulePlan: ProductionSchedulePlan,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n public readonly elementRef: ElementRef\n ) {}\n\n public ngOnInit(): void {\n d3Select(this.elementRef.nativeElement).datum(this.productionScheduleItem);\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if ('aspectRatio' in changes || 'productionSchedule' in changes || 'productionScheduleBuilderHeight' in changes) {\n this.setHeightDimensionsForOverviewViewMode();\n\n this.drawingWidth = isNaN(this.aspectRatio.width) ? 0 : this.productionScheduleItem.technicalDimensions.widthInDents * this.aspectRatio.width;\n\n this.setVerticalPosition();\n }\n }\n\n public openEditProductionScheduleItemDialog(event: MouseEvent): void {\n this.dialogBuilderFactoryService\n .getBuilder()\n .withWidth('334px')\n .withClass('edit-drawing-in-path')\n .openDialog(EditProductionScheduleItemInPathGroupComponent, {\n productionScheduleItemInPathGroup: this.productionScheduleItem,\n commercialUnit: this.commercialUnit,\n productionSchedule: this.productionSchedule,\n matDialogPosition: {\n y: event.clientY,\n x: event.clientX\n },\n allowExceedingRequestedAmountOfOrderLineItems: this.productionOrderCustomSettings?.allowExceedingRequestedAmountOfOrderLineItems,\n pickDensityInPicksPerMeter: this.productionSchedule.machineQuality.pickDensity * 1000\n })\n .pipe(filter((result: {action: EditProductionScheduleItemInPathGroupAction; value: ProductionScheduleItemInPathGroup}) => !isNil(result)))\n .subscribe((result: {action: EditProductionScheduleItemInPathGroupAction; value: ProductionScheduleItemInPathGroup}) => {\n if (result.action === EditProductionScheduleItemInPathGroupAction.EDIT) {\n this.editProductionScheduleItem(result.value);\n } else {\n this.removeProductionScheduleItemInPathGroup();\n }\n });\n }\n\n public canShowRepeatIndicator(): boolean {\n return this.productionScheduleItem.quantity > 1;\n }\n\n public static getCutbarHeight(\n cutbar: {commercialLengthInMM: number; technicalLengthInNumberOfPicks: number},\n minimumHeight: number,\n aspectRatioHeight: number\n ): {cutbarHeight: number; offsetHeight: number} {\n if (!cutbar.commercialLengthInMM || !cutbar.technicalLengthInNumberOfPicks) {\n return {cutbarHeight: 0, offsetHeight: 0};\n } else {\n const proportionalCutbarHeight = cutbar.technicalLengthInNumberOfPicks * aspectRatioHeight;\n return {cutbarHeight: Math.max(proportionalCutbarHeight, minimumHeight), offsetHeight: Math.max(0, minimumHeight - proportionalCutbarHeight)};\n }\n }\n\n private setHeightDimensionsForOverviewViewMode(): void {\n let offsetHeight = 0;\n if (!AssertionUtils.isNullOrUndefined(this.productionScheduleItem.getCutbarInformation())) {\n const {cutbarBefore, cutbarAfter} = this.productionScheduleItem.getCutbarInformation();\n\n const cutbarBeforeHeightInfo = ProductionScheduleItemInPathGroupContainerNewComponent.getCutbarHeight(cutbarBefore, this.MINIMUM_HEIGHT_FOR_CUTBAR_IN_PX, this.aspectRatio.height);\n const cutbarAfterHeightInfo = ProductionScheduleItemInPathGroupContainerNewComponent.getCutbarHeight(cutbarAfter, this.MINIMUM_HEIGHT_FOR_CUTBAR_IN_PX, this.aspectRatio.height);\n\n this.cutbarBeforeHeight = cutbarBeforeHeightInfo.cutbarHeight;\n this.cutbarAfterHeight = cutbarAfterHeightInfo.cutbarHeight;\n offsetHeight = cutbarBeforeHeightInfo.offsetHeight + cutbarAfterHeightInfo.offsetHeight;\n }\n this.drawingHeight = this.productionScheduleItem.technicalDimensions.heightInPicks * this.aspectRatio.height - offsetHeight;\n this.drawingImageHeight = this.drawingHeight;\n this.totalHeight = (this.cutbarAfterHeight + this.cutbarBeforeHeight + this.drawingHeight) * this.productionScheduleItem.quantity;\n\n let requiredHeightForSingleProductionScheduleItemRepetition = this.cutbarAfterHeight + this.cutbarBeforeHeight + this.drawingHeight;\n\n if (this.productionScheduleItem.quantity > 1) {\n requiredHeightForSingleProductionScheduleItemRepetition += ProductionScheduleItemInPathGroupRepeatIndicatorNewComponent.minimumAllowedHeight;\n }\n\n if (requiredHeightForSingleProductionScheduleItemRepetition > this.totalHeight) {\n this.drawingImageHeight = Math.max(0, this.drawingImageHeight - (requiredHeightForSingleProductionScheduleItemRepetition - this.totalHeight));\n this.drawingHeight = Math.max(0, this.drawingHeight - (requiredHeightForSingleProductionScheduleItemRepetition - this.totalHeight));\n }\n }\n\n private editProductionScheduleItem(productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup): void {\n this.productionScheduleItem = productionScheduleItemInPathGroup;\n\n this.productionSchedulePlan.editProductionScheduleItem(\n productionScheduleItemInPathGroup,\n this.productionScheduleItemIndexInPath,\n this.productionSchedulePathIndex,\n this.productionScheduleColoredYarnSet.startDent\n );\n }\n\n private removeProductionScheduleItemInPathGroup(): void {\n const productionSchedulePathOfColoredYarnSet = this.productionSchedule.getProductionSchedulePathsOfColoredYarnSetAtStartDent(this.productionScheduleColoredYarnSet.startDent);\n const productionSchedulePath = productionSchedulePathOfColoredYarnSet.productionSchedulePaths[this.productionSchedulePathIndex];\n\n this.productionSchedulePlan.removeProductionScheduleItem(\n this.productionScheduleItem.uuid,\n productionSchedulePath.pathNumber,\n productionSchedulePathOfColoredYarnSet.productionScheduleColoredYarnSet.startDent\n );\n }\n\n private setVerticalPosition(): void {\n this.verticalPosition =\n !isNil(this.elementRef.nativeElement) && this.productionScheduleItemIndexInPath !== 0\n ? this.elementRef.nativeElement.previousElementSibling.getAttribute('y') - this.totalHeight\n : this.productionScheduleBuilderHeight - this.totalHeight;\n }\n}\n","\n\n\n \n\n\n\n \n\n\n\n\n\n","import {\n AfterViewInit,\n Component,\n ElementRef,\n EventEmitter,\n HostListener,\n Inject,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n QueryList,\n Renderer2,\n SimpleChanges,\n ViewChildren\n} from '@angular/core';\nimport {MatDialogRef} from '@angular/material/dialog';\nimport {isCoordinateOutOfRangeOfOtherCoordinate} from '@application/helper/production-schedule-builder';\nimport {cloneProductionScheduleElement} from '@application/helper/production-schedule-builder/clone-production-schedule-element';\nimport {getClosestProductionScheduleItemAndIndexRelativeToMouseCoordinates} from '@application/helper/production-schedule-builder/get-closest-production-schedule-item-and-index-relative-to-mouse-coordinates';\nimport {getMouseCoordinatesInProductionScheduleBuilderGroup} from '@application/helper/production-schedule-builder/get-mouse-coordinates-in-production-schedule-builder-group';\nimport {getUnderlyingElement} from '@application/helper/production-schedule-builder/get-underlying-element';\nimport {isInLowerHalfOfProductionScheduleItem} from '@application/helper/production-schedule-builder/is-in-lower-half-of-production-schedule-item';\nimport {DraggingService} from '@application/services/dragging/dragging.service';\nimport {Coordinates} from '@domain/coordinates';\nimport {PositionOfDialog} from '@domain/position-of-dialog';\nimport {BmpProductionScheduleItemInPathGroup} from '@domain/production-schedule/bmp-production-schedule-item-in-path-group';\nimport {ClosestProductionScheduleItemInPathGroup} from '@domain/production-schedule/closest-production-schedule-item-in-path-group';\nimport {ProductionOrderCustomSettings} from '@domain/production-schedule/custom-settings/production-order-custom-settings';\nimport {DrawingType} from '@domain/production-schedule/drawing-type.enum';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {ProductionScheduleOrderLine} from '@domain/production-schedule/production-schedule-order-line';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {ProductionSchedulePhase} from '@domain/production-schedule/production-schedule-phase.enum';\nimport {Permission} from '@domain/profile/permission.enum';\nimport {Subscription} from '@domain/profile/subscription';\nimport {OverviewListColoredYarnSetWithStartDent} from '@domain/textile-data/creel/overview-list-colored-yarn-set-with-start-dent';\nimport {AUTHENTICATION, Authentication} from '@infrastructure/http/authentication/authentication';\nimport {ListDrawing} from '@presentation/components/drawing-list/list-drawing';\nimport {RepositionDialogComponent} from '@presentation/components/reposition-dialog/reposition-dialog.component';\nimport {ProductionScheduleBuilderAspectRatio} from '@presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-builder-aspect-ratio';\nimport {EditProductionSchedulePathOfColoredYarnSetComponent} from '@presentation/pages/texfab/production-schedule/add/plan/modals/edit-production-schedule-path-of-colored-yarn-set/edit-production-schedule-path-of-colored-yarn-set.component';\nimport {PRODUCTION_SCHEDULE_PLAN, ProductionSchedulePlan} from '@presentation/pages/texfab/production-schedule/add/plan/production-schedule-plan';\nimport {AlertDialogResult, AssertionUtils, BaseComponent, convertToCommercialUnitCentimeter, DialogBuilderFactoryService, DialogType, TranslateService, Unit} from '@vdw/angular-component-library';\nimport {drag as d3Drag, D3DragEvent} from 'd3-drag';\nimport {BaseType, ContainerElement, pointer as d3Pointer, select as d3Select, selectAll as d3SelectAll, Selection as d3Selection} from 'd3-selection';\nimport {cloneDeep, first, indexOf, inRange, isEmpty, isEqual, isNil, isUndefined, last, multiply, size, sum, sumBy} from 'lodash-es';\nimport {takeUntil} from 'rxjs/operators';\nimport {PathItemInfoTooltipContext} from '../../../modals/path-item-info-tooltip/path-item-info-tooltip-context.enum';\nimport {PathItemInfoTooltipComponent} from '../../../modals/path-item-info-tooltip/path-item-info-tooltip.component';\nimport {ProductionScheduleBuilderComponent} from '../../production-schedule-builder.component';\nimport {ProductionScheduleItemInPathGroupContainerComponent} from './production-schedule-item-in-path-group-container/production-schedule-item-in-path-group-container.component';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: '[app-production-schedule-path-of-colored-yarn-set-new]',\n templateUrl: './production-schedule-path-of-colored-yarn-set-new.component.html',\n styleUrls: ['./production-schedule-path-of-colored-yarn-set-new.component.scss']\n})\nexport class ProductionSchedulePathOfColoredYarnSetNewComponent extends BaseComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy {\n private static isDraggingProductionSchedulePath: boolean;\n @Input() public productionSchedulePath: ProductionSchedulePath;\n @Input() public productionSchedulePathIndex: number;\n @Input() public productionScheduleBuilderHeight: number;\n @Input() public commercialUnit: Unit;\n @Input() public productionScheduleColoredYarnSetIndex: number;\n @Input() public productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet;\n @Input() public productionSchedulePhase: ProductionSchedulePhase;\n @Input() public productionSchedule: ProductionSchedule;\n @Input() public aspectRatio: ProductionScheduleBuilderAspectRatio;\n @Input() public isEditPathsEnabled: boolean;\n @Input() public productionOrderCustomSettings: ProductionOrderCustomSettings;\n @Input() public isProductionScheduleDisplayOverview: boolean;\n @Output() public hoveredProductionSchedulePathComponent: EventEmitter = new EventEmitter();\n @Output() public productionSchedulePlanChanged: EventEmitter = new EventEmitter();\n @ViewChildren('itemsInPathGroup') public itemInPathGroupComponents: QueryList;\n\n public readonly productionSchedulePathSeparatorWidth = 1;\n\n private mouseCoordinatesOfDragStart: Coordinates;\n private destinationOfDraggedProductionSchedulePath: d3Selection;\n private listenerMouseEnter: () => void;\n private listenerMouseLeave: () => void;\n private listenerMouseClick: () => void;\n private dragInitializedOnCurrentProductionSchedulePath: boolean = false;\n private canOpenHoverInfoTooltip: boolean = false;\n private currentSubscription: Subscription;\n\n private readonly labelForProductionScheduleBuilderGroup = 'production-schedule-builder-group';\n private readonly labelForProductionScheduleColoredYarnSet = 'production-schedule-colored-yarn-set';\n private readonly labelForProductionSchedulePath = 'production-schedule-path-of-colored-yarn-set';\n private readonly dropIndicatorPositionHeight = 8;\n private dialogRef: MatDialogRef;\n private readonly DIALOG_WIDTH = 334;\n private readonly REPOSITION_DIALOG_CLASSES = ['reposition-dialog', 'reposition-dialog-colored-yarn-set'];\n\n public constructor(\n @Inject(AUTHENTICATION) private readonly authentication: Authentication,\n @Inject(PRODUCTION_SCHEDULE_PLAN) private readonly productionSchedulePlan: ProductionSchedulePlan,\n private readonly elementRef: ElementRef,\n private readonly renderer: Renderer2,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n private readonly translate: TranslateService,\n private readonly zone: NgZone,\n private readonly draggingService: DraggingService\n ) {\n super();\n }\n\n @HostListener('dragleave', ['$event'])\n public onDragLeaveProductionSchedulePath(event: any): void {\n event.stopPropagation();\n }\n\n public ngOnInit(): void {\n this.currentSubscription = this.authentication.getCurrentSubscription();\n this.initialiseProductionSchedulePathOfColoredYarnSetComponent();\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if ('aspectRatio' in changes || 'productionSchedule' in changes || 'productionScheduleBuilderHeight' in changes) {\n this.setProductionSchedulePathOfColoredYarnSetAttributes();\n }\n }\n\n public ngAfterViewInit(): void {\n this.setProductionSchedulePathOfColoredYarnSetEventHandlers();\n\n setTimeout(() => {\n this.canOpenHoverInfoTooltip = true;\n }, 1000);\n }\n\n public ngOnDestroy(): void {\n super.ngOnDestroy();\n\n if (!isUndefined(this.listenerMouseEnter)) {\n this.listenerMouseEnter();\n }\n if (!isUndefined(this.listenerMouseLeave)) {\n this.listenerMouseLeave();\n }\n if (!isUndefined(this.listenerMouseClick)) {\n this.listenerMouseClick();\n }\n this.dialogRef?.close();\n }\n\n public getProductionSchedulePathOfColoredYarnSetWidth(): number {\n return multiply(this.productionSchedulePath.technicalWidthInDents, this.aspectRatio.width);\n }\n\n public onProductionSchedulePlanChanged(): void {\n this.productionSchedulePlanChanged.emit();\n }\n\n public onClickProductionSchedulePathEditOverlay(event: MouseEvent): void {\n if (this.isEditPathsEnabled) {\n const parentElement: Element = (event.target as Element).parentElement;\n\n this.renderer.addClass(parentElement, 'active');\n\n this.dialogBuilderFactoryService\n .getBuilder()\n .withClass('edit-drawing-in-path')\n .withWidth('268px')\n .openDialog(EditProductionSchedulePathOfColoredYarnSetComponent, {\n matDialogPosition: {\n y: event.clientY,\n x: event.clientX\n }\n })\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((deleteProductionSchedulePathOfColoredYarnSet: boolean) => {\n if (deleteProductionSchedulePathOfColoredYarnSet) {\n this.deleteProductionSchedulePath();\n }\n\n this.renderer.removeClass(parentElement, 'active');\n });\n }\n }\n\n public getProductionSchedulePathLeft(): number {\n return this.elementRef.nativeElement.x.baseVal.value;\n }\n\n public getProductionSchedulePathWidth(): number {\n return Math.max(\n ...this.itemInPathGroupComponents.toArray().map((itemInPathGroupComponent: ProductionScheduleItemInPathGroupContainerComponent) => {\n return itemInPathGroupComponent.drawingWidth;\n })\n );\n }\n\n public getProductionSchedulePathTop(): number {\n return Math.min(\n ...this.itemInPathGroupComponents.toArray().map((itemInPathGroupComponent: ProductionScheduleItemInPathGroupContainerComponent) => {\n return itemInPathGroupComponent.elementRef.nativeElement.y.baseVal.value;\n })\n );\n }\n\n public getProductionSchedulePathSeparatorHorizontalPosition(): number {\n return this.getProductionSchedulePathOfColoredYarnSetWidth() - this.productionSchedulePathSeparatorWidth;\n }\n\n public hasPermissionToNewVerifyStep(): boolean {\n return this.currentSubscription?.hasPermission(Permission.TEXFAB_VERIFY_NEW);\n }\n\n public openHoverInfoTooltip(event: MouseEvent, productionScheduleItem: ProductionScheduleItemInPathGroup, index: number): void {\n if (!productionScheduleItem.canBeRecolored() || !this.canOpenHoverInfoTooltip) {\n return;\n }\n\n this.zone.runOutsideAngular(() => {\n this.dialogRef?.close();\n this.dialogRef = this.dialogBuilderFactoryService\n .getBuilder()\n .withWidth(`${this.DIALOG_WIDTH}px`)\n .withClass(this.REPOSITION_DIALOG_CLASSES)\n .withCustomBackdrop('no-pointer-events-backdrop')\n .open(RepositionDialogComponent, {\n showArrow: false,\n event,\n sourceElement: event.target,\n component: PathItemInfoTooltipComponent,\n positionOfDialog: PositionOfDialog.LEFT,\n verticalOffset: 0,\n horizontalOffset: 0,\n moveWithCursor: false,\n context: PathItemInfoTooltipContext.PATH_DESIGN,\n number: index + 1,\n drawingName: productionScheduleItem.drawing?.name,\n image: productionScheduleItem.scheduleItemType === DrawingType.MANUAL_NON_PRODUCTION_ITEM ? {data: 'assets/images/jute-background.svg'} : productionScheduleItem.drawing?.image,\n finishingName: this.getFinishingName(productionScheduleItem),\n cutbarBefore: productionScheduleItem.getCutbarInformation()?.cutbarBefore?.commercialLengthInMM,\n cutbarAfter: productionScheduleItem.getCutbarInformation()?.cutbarAfter?.commercialLengthInMM,\n cutbarBeforeInPicks: productionScheduleItem.getCutbarInformation()?.cutbarBefore?.technicalLengthInNumberOfPicks,\n cutbarAfterInPicks: productionScheduleItem.getCutbarInformation()?.cutbarAfter?.technicalLengthInNumberOfPicks,\n numberOfPieces: this.productionSchedule.machine.jacquard.isSisal\n ? `${productionScheduleItem.quantity}`\n : `${productionScheduleItem.quantity}x${this.productionSchedule.getProductionScheduleItemMultiplier()}`,\n quantity: this.productionSchedule.machine.jacquard.isSisal\n ? productionScheduleItem.quantity\n : productionScheduleItem.quantity * this.productionSchedule.getProductionScheduleItemMultiplier(),\n quality: this.productionSchedule.machineQuality.technicalName,\n orderline: this.getOrderlineProperty(productionScheduleItem.orderLineId)?.salesOrderLineReference ?? '',\n sales: this.getOrderlineProperty(productionScheduleItem.orderLineId)?.salesOrderReference ?? '',\n customer: this.getOrderlineProperty(productionScheduleItem.orderLineId)?.customerReference ?? '',\n dueDate: this.getOrderlineProperty(productionScheduleItem.orderLineId)?.desiredDate,\n width: convertToCommercialUnitCentimeter({\n unit: Unit.MILLIMETER,\n value: productionScheduleItem?.commercialDimensionsInMM?.widthInMM\n }),\n length: convertToCommercialUnitCentimeter({\n unit: Unit.MILLIMETER,\n value: productionScheduleItem?.commercialDimensionsInMM?.heightInMM\n }),\n widthInDents: productionScheduleItem.technicalDimensions.widthInDents,\n heightInPicks: productionScheduleItem.technicalDimensions.heightInPicks,\n isSisal: this.productionSchedule.machine.jacquard.isSisal,\n coloredYarnSet: this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet,\n creelMapping: this.productionSchedule.mappingForCurrentPositionOnMachine ? this.productionSchedule.mappingForCurrentPositionOnMachine[this.productionScheduleColoredYarnSetIndex] : null,\n mainColorPosition: productionScheduleItem.mainColorPosition,\n borderColorPosition: productionScheduleItem.borderColorPosition,\n shape: productionScheduleItem.drawing.shape\n });\n });\n }\n\n public closeHoverInfoTooltip(): void {\n this.dialogRef?.close();\n }\n\n private isMousePositionInsideProductionSchedulePath(event: DragEvent, destinationOfDraggedProductionScheduleItem: d3Selection): boolean {\n const productionSchedulePathPositionStart = 0;\n const productionSchedulePathPositionEnd = Number(destinationOfDraggedProductionScheduleItem.attr('width'));\n\n const mouseCoordinatesInProductionSchedulePlanView: Coordinates = this.getMouseCoordinatesInProductionSchedulePath(event);\n\n const productionSchedulePathDropThreshold = multiply(30, this.aspectRatio.width);\n\n return inRange(\n mouseCoordinatesInProductionSchedulePlanView.x,\n productionSchedulePathPositionStart + productionSchedulePathDropThreshold,\n productionSchedulePathPositionEnd - productionSchedulePathDropThreshold\n );\n }\n\n private isMousePositionInLeftSideOfPath(event: DragEvent): boolean {\n const mouseCoordinatesInProductionSchedulePlanView: Coordinates = this.getMouseCoordinatesInProductionSchedulePath(event);\n\n const productionSchedulePathDropThreshold = multiply(30, this.aspectRatio.width);\n\n return inRange(mouseCoordinatesInProductionSchedulePlanView.x, 0, productionSchedulePathDropThreshold);\n }\n\n private droppedNewDrawingOnProductionSchedulePath(event: DragEvent): void {\n if (!this.isEditPathsEnabled && !isNil(this.draggingService.getCurrentData()) && !('quantity' in this.draggingService.getCurrentData())) {\n const draggedItem: ListDrawing = cloneDeep(this.draggingService.getCurrentData());\n\n const destinationOfDraggedProductionScheduleItem = d3Select(this.elementRef.nativeElement) as d3Selection;\n\n if (!isNil(destinationOfDraggedProductionScheduleItem)) {\n this.addDroppedDrawingToProductionSchedulePath(event, draggedItem, destinationOfDraggedProductionScheduleItem);\n }\n\n this.renderer.removeClass(first(this.elementRef.nativeElement.children), 'highlight');\n d3Select('.drawing-drag-preview').remove();\n\n this.removeDropIndicator();\n }\n }\n\n private addDroppedDrawingToProductionSchedulePath(\n event: DragEvent,\n draggedItem: ListDrawing,\n destinationOfDraggedProductionScheduleItem: d3Selection\n ): void {\n if (this.isMousePositionInsideProductionSchedulePath(event, destinationOfDraggedProductionScheduleItem)) {\n const isDraggingOverProductionSchedulePath: boolean = d3Select(document.elementFromPoint(event.clientX, event.clientY)).classed('production-schedule-path-background');\n\n if (\n isDraggingOverProductionSchedulePath &&\n this.productionSchedule.canAddProductionScheduleItemToProductionSchedulePath(\n draggedItem,\n this.productionSchedulePath.pathNumber,\n this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet\n )\n ) {\n const productionSchedulePathsOfColoredYarnSet = this.productionSchedule.getProductionSchedulePathsOfColoredYarnSetAtStartDent(\n this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent\n );\n const productionScheduleItemsInPathGroup: SVGGraphicsElement[] = this.itemInPathGroupComponents\n .toArray()\n .map((productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroupContainerComponent) => productionScheduleItemInPathGroup.elementRef.nativeElement) as SVGGraphicsElement[];\n\n const closestProductionScheduleItemInPathGroup: ClosestProductionScheduleItemInPathGroup = getClosestProductionScheduleItemAndIndexRelativeToMouseCoordinates(\n this.getMouseCoordinatesInProductionSchedulePath(event),\n productionScheduleItemsInPathGroup\n );\n let destinationIndexInProductionSchedulePath: number = closestProductionScheduleItemInPathGroup.index;\n const closestProductionScheduleItemInPathGroupComponent: SVGGraphicsElement = closestProductionScheduleItemInPathGroup.element;\n\n if (\n !isUndefined(closestProductionScheduleItemInPathGroupComponent) &&\n !isInLowerHalfOfProductionScheduleItem(this.getMouseCoordinatesInProductionSchedulePath(event), closestProductionScheduleItemInPathGroupComponent)\n ) {\n destinationIndexInProductionSchedulePath = destinationIndexInProductionSchedulePath + 1;\n }\n\n this.productionSchedulePlan.addDrawingToProductionSchedulePath(\n draggedItem,\n this.productionSchedulePath.pathNumber,\n productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet,\n !isNil(destinationIndexInProductionSchedulePath) ? destinationIndexInProductionSchedulePath : null\n );\n } else if (\n !this.productionSchedule.enoughWidthToAddProductionScheduleItemToProductionSchedulePath(\n draggedItem,\n this.productionSchedulePath.pathNumber,\n this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet\n )\n ) {\n this.dialogBuilderFactoryService.getBuilder().openAlertDialog({\n titleText: 'PRODUCTION_ORDER.WEAVE_PLAN.WEAVE_PLAN',\n messageText: 'PRODUCTION_ORDER.WEAVE_PLAN.WARNINGS.NOT_ENOUGH_WIDTH',\n type: DialogType.INFORMATION\n });\n }\n } else if (this.productionSchedule.canAddProductionScheduleItemToColoredYarnSet(this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent, draggedItem)) {\n const isInLeftSideOfPath: boolean = this.isMousePositionInLeftSideOfPath(event);\n const productionSchedulePathsOfColoredYarnSet = this.productionSchedule.getProductionSchedulePathsOfColoredYarnSetAtStartDent(\n this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent\n );\n this.productionSchedulePlan.addDrawingToColoredYarnSet(\n draggedItem,\n this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent,\n isInLeftSideOfPath\n ? indexOf(productionSchedulePathsOfColoredYarnSet.productionSchedulePaths, this.productionSchedulePath)\n : indexOf(productionSchedulePathsOfColoredYarnSet.productionSchedulePaths, this.productionSchedulePath) + 1\n );\n }\n }\n\n private initialiseProductionSchedulePathOfColoredYarnSetComponent(): void {\n d3Select(this.elementRef.nativeElement).datum(this.productionSchedulePath);\n this.zone.runOutsideAngular(() => {\n d3Select(this.elementRef.nativeElement)\n .on('drop', (event: DragEvent) => this.droppedNewDrawingOnProductionSchedulePath(event))\n .on('dragover', (event: DragEvent) => this.draggedNewDrawingOverProductionSchedulePath(event))\n .on('dragenter', (event: DragEvent) => event.stopPropagation())\n .on('dragleave', (event: DragEvent) => {\n event.stopPropagation();\n this.removeDropIndicator();\n });\n });\n }\n\n private getFinishingName(productionScheduleItem: ProductionScheduleItemInPathGroup): string {\n let name = '';\n\n if (!AssertionUtils.isNullOrUndefined(productionScheduleItem.orderline?.article?.finishing?.nameWithVersion)) {\n name = productionScheduleItem.orderline.article.finishing.nameWithVersion;\n } else if (!AssertionUtils.isNullOrUndefined(productionScheduleItem.drawing) && productionScheduleItem.drawing.drawingType === DrawingType.BMP) {\n const bmpProductionScheduleItem = productionScheduleItem as any as BmpProductionScheduleItemInPathGroup;\n if (!AssertionUtils.isNullOrUndefined(bmpProductionScheduleItem?.finishing?.nameWithVersion)) {\n name = bmpProductionScheduleItem.finishing.nameWithVersion;\n }\n }\n\n return name;\n }\n\n private draggedNewDrawingOverProductionSchedulePath(event: DragEvent): void {\n event.preventDefault();\n event.stopPropagation();\n\n const draggedItem: ListDrawing = this.draggingService.getCurrentData();\n\n if (!this.isEditPathsEnabled && !isNil(draggedItem) && !('quantity' in draggedItem)) {\n this.removeDropIndicator();\n const destinationOfDraggedProductionScheduleItem: d3Selection = d3Select(this.elementRef.nativeElement);\n const hasDraggedInsideProductionSchedulePath: boolean = this.isMousePositionInsideProductionSchedulePath(event, destinationOfDraggedProductionScheduleItem);\n\n if (\n hasDraggedInsideProductionSchedulePath &&\n this.productionSchedule.canAddProductionScheduleItemToProductionSchedulePath(\n draggedItem,\n this.productionSchedulePath.pathNumber,\n this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet\n )\n ) {\n this.drawProductionScheduleItemInPathGroupDropIndicator(\n d3Select(this.elementRef.nativeElement).node(),\n Number(last(this.itemInPathGroupComponents.toArray()).elementRef.nativeElement.getAttribute('y')) - this.dropIndicatorPositionHeight\n );\n } else if (\n !hasDraggedInsideProductionSchedulePath &&\n this.productionSchedule.canAddProductionScheduleItemToColoredYarnSet(this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent, draggedItem)\n ) {\n let dropIndicatorPosition = Number(destinationOfDraggedProductionScheduleItem.attr('x'));\n\n if (!this.isMousePositionInLeftSideOfPath(event)) {\n dropIndicatorPosition += Number(destinationOfDraggedProductionScheduleItem.attr('width'));\n }\n\n this.drawProductionSchedulePathDropIndicator((destinationOfDraggedProductionScheduleItem.node() as SVGGraphicsElement).parentElement, dropIndicatorPosition);\n }\n }\n }\n\n private removeDropIndicator(): void {\n d3SelectAll('.production-schedule-drop-indicator').remove();\n }\n\n private setProductionSchedulePathOfColoredYarnSetAttributes(): void {\n const productionSchedulePathOfColoredYarnSetElement = this.elementRef.nativeElement;\n\n this.renderer.setAttribute(productionSchedulePathOfColoredYarnSetElement, 'x', `${this.getProductionSchedulePathPosition()}`);\n this.renderer.setAttribute(productionSchedulePathOfColoredYarnSetElement, 'width', `${this.getProductionSchedulePathOfColoredYarnSetWidth()}`);\n }\n\n private setProductionSchedulePathOfColoredYarnSetEventHandlers(): void {\n const productionSchedulePathInColoredYarnSetElement = this.elementRef.nativeElement;\n\n this.listenerMouseEnter = this.renderer.listen(productionSchedulePathInColoredYarnSetElement, 'mouseenter', () => this.onMouseEnter());\n this.listenerMouseLeave = this.renderer.listen(productionSchedulePathInColoredYarnSetElement, 'mouseleave', () => this.onMouseLeave());\n\n d3Select(productionSchedulePathInColoredYarnSetElement).call(\n d3Drag()\n .on('start', (event: D3DragEvent) => this.onDragStart(event.sourceEvent))\n .on('drag', (event: D3DragEvent) => this.onDrag(event.sourceEvent))\n .on('end', (event: D3DragEvent) => this.onDragEndProductionSchedulePath(event.sourceEvent))\n );\n }\n\n private onMouseEnter(): void {\n if (!ProductionSchedulePathOfColoredYarnSetNewComponent.isDraggingProductionSchedulePath && !ProductionScheduleItemInPathGroupContainerComponent.isDraggingProductionScheduleItemInPathGroup) {\n this.hoveredProductionSchedulePathComponent.emit(this);\n }\n }\n\n private onMouseLeave(): void {\n if (!ProductionSchedulePathOfColoredYarnSetNewComponent.isDraggingProductionSchedulePath && !ProductionScheduleItemInPathGroupContainerComponent.isDraggingProductionScheduleItemInPathGroup) {\n this.hoveredProductionSchedulePathComponent.emit(null);\n }\n }\n\n private onDragStart(event: DragEvent): void {\n this.mouseCoordinatesOfDragStart = getMouseCoordinatesInProductionScheduleBuilderGroup(event);\n }\n\n private onDrag(event: DragEvent): void {\n if (this.isEditPathsEnabled) {\n const {x: mouseCoordinateX, y: mouseCoordinateY} = this.getMouseCoordinatesInProductionSchedulePlanView(event);\n\n const hasDraggedFarEnoughFromStartingPoint: boolean = isCoordinateOutOfRangeOfOtherCoordinate(\n {\n x: mouseCoordinateX,\n y: mouseCoordinateY\n },\n this.mouseCoordinatesOfDragStart\n );\n if (hasDraggedFarEnoughFromStartingPoint || this.dragInitializedOnCurrentProductionSchedulePath) {\n if (this.dragInitializedOnCurrentProductionSchedulePath) {\n const productionSchedulePathSelection = d3Select(this.elementRef.nativeElement);\n\n productionSchedulePathSelection.attr('x', mouseCoordinateX).attr('y', mouseCoordinateY);\n\n this.onDragProductionSchedulePath(event);\n } else {\n this.onDragInitializeProductionSchedulePath(event);\n }\n }\n }\n }\n\n private onDragInitializeProductionSchedulePath(event: DragEvent): void {\n this.dragInitializedOnCurrentProductionSchedulePath = true;\n this.mouseCoordinatesOfDragStart = getMouseCoordinatesInProductionScheduleBuilderGroup(event);\n const productionScheduleWrapperElement = d3Select(`.${this.labelForProductionScheduleBuilderGroup}`).node() as ContainerElement;\n const [mouseCoordinateX] = d3Pointer(event, productionScheduleWrapperElement);\n cloneProductionScheduleElement(this.elementRef, mouseCoordinateX);\n ProductionSchedulePathOfColoredYarnSetNewComponent.isDraggingProductionSchedulePath = true;\n }\n\n private onDragProductionSchedulePath(event: DragEvent): void {\n this.removeDropIndicator();\n d3SelectAll('.background').classed('highlight', false);\n\n const destinationOfDraggedProductionSchedulePath = getUnderlyingElement({x: event.x, y: event.y}, `.${this.labelForProductionScheduleColoredYarnSet}, .${this.labelForProductionSchedulePath}`);\n\n if (!isNil(destinationOfDraggedProductionSchedulePath)) {\n const destinationHasChanged = !isEqual(this.destinationOfDraggedProductionSchedulePath, destinationOfDraggedProductionSchedulePath);\n if (destinationHasChanged) {\n this.destinationOfDraggedProductionSchedulePath = destinationOfDraggedProductionSchedulePath;\n }\n\n const destinationOfDraggedProductionSchedulePathElement: SVGGraphicsElement = this.destinationOfDraggedProductionSchedulePath.node() as SVGGraphicsElement;\n const destinationOfDraggedProductionSchedulePathClassList = destinationOfDraggedProductionSchedulePathElement.classList;\n\n if (destinationOfDraggedProductionSchedulePathClassList.contains(this.labelForProductionSchedulePath)) {\n this.handleDragOverProductionSchedulePath(event, destinationOfDraggedProductionSchedulePathElement);\n } else if (destinationOfDraggedProductionSchedulePathClassList.contains(this.labelForProductionScheduleColoredYarnSet)) {\n this.handleDragOverProductionScheduleColoredYarnSet(destinationOfDraggedProductionSchedulePathElement);\n }\n }\n }\n\n private handleDragOverProductionScheduleColoredYarnSet(destinationOfDraggedProductionSchedulePathElement: SVGGraphicsElement): void {\n const destinationOfDraggedProductionSchedulePath: OverviewListColoredYarnSetWithStartDent = this.destinationOfDraggedProductionSchedulePath.datum() as OverviewListColoredYarnSetWithStartDent;\n\n if (\n this.productionSchedule.canMoveProductionSchedulePathToColoredYarnSet(\n this.productionSchedulePath.pathNumber,\n this.productionSchedule.getProductionScheduleColoredYarnSetForProductionSchedulePath(this.productionSchedulePath).startDent,\n destinationOfDraggedProductionSchedulePath.startDent\n )\n ) {\n const productionSchedulePaths = d3Select(destinationOfDraggedProductionSchedulePathElement).selectAll(`.${this.labelForProductionSchedulePath}`).nodes();\n\n const lastProductionSchedulePathSelection = d3Select(last(productionSchedulePaths));\n const dropIndicatorPosition = isEmpty(productionSchedulePaths) ? 0 : sum([Number(lastProductionSchedulePathSelection.attr('x')), Number(lastProductionSchedulePathSelection.attr('width'))]);\n\n this.drawProductionSchedulePathDropIndicator(destinationOfDraggedProductionSchedulePathElement, dropIndicatorPosition);\n }\n }\n\n private handleDragOverProductionSchedulePath(event: DragEvent, destinationOfDraggedProductionSchedulePathElement: SVGGraphicsElement): void {\n let destinationOfDraggedProductionSchedulePath: ProductionSchedulePath = this.destinationOfDraggedProductionSchedulePath.datum() as ProductionSchedulePath;\n\n if (isUndefined(destinationOfDraggedProductionSchedulePath)) {\n destinationOfDraggedProductionSchedulePath = this.productionSchedulePath;\n }\n\n if (\n this.productionSchedule.canMoveProductionSchedulePathToColoredYarnSet(\n this.productionSchedulePath.pathNumber,\n this.productionSchedule.getProductionScheduleColoredYarnSetForProductionSchedulePath(this.productionSchedulePath).startDent,\n this.productionSchedule.getProductionScheduleColoredYarnSetForProductionSchedulePath(destinationOfDraggedProductionSchedulePath).startDent\n )\n ) {\n const targetPositionOfDraggedProductionSchedulePathInColoredYarnSetPath: number = this.getTargetPositionOfDraggedProductionSchedulePathInColoredYarnSetPath(\n event,\n destinationOfDraggedProductionSchedulePathElement\n );\n this.drawProductionSchedulePathDropIndicator(destinationOfDraggedProductionSchedulePathElement.parentElement, targetPositionOfDraggedProductionSchedulePathInColoredYarnSetPath);\n }\n }\n\n private cleanProductionSchedulePlanAfterDrop(): void {\n this.removeDropIndicator();\n this.restoreProductionSchedulePathClone();\n this.restoreProductionScheduleToNonDraggingState();\n }\n\n private restoreProductionSchedulePathClone(): void {\n const draggedProductionSchedulePath = d3SelectAll('.dragged-production-schedule-element');\n\n const draggedProductionSchedulePathNode = draggedProductionSchedulePath.node() as SVGGraphicsElement;\n if (isNil(draggedProductionSchedulePathNode)) {\n d3Select('.production-schedule-element-clone').remove();\n } else {\n const productionScheduleColoredYarnSetOfDraggedProductionSchedulePath = draggedProductionSchedulePathNode.parentNode;\n\n const cloneOfDraggedProductionSchedulePath = d3Select('.production-schedule-element-clone')\n .attr('x', draggedProductionSchedulePath.attr('x'))\n .attr('y', draggedProductionSchedulePath.attr('y'))\n .attr('class', this.labelForProductionSchedulePath);\n\n productionScheduleColoredYarnSetOfDraggedProductionSchedulePath.insertBefore(\n cloneOfDraggedProductionSchedulePath.remove().node() as SVGGraphicsElement,\n (draggedProductionSchedulePath.node() as SVGGraphicsElement).nextSibling\n );\n draggedProductionSchedulePath.remove();\n }\n }\n\n private restoreProductionScheduleToNonDraggingState(): void {\n this.dragInitializedOnCurrentProductionSchedulePath = false;\n ProductionSchedulePathOfColoredYarnSetNewComponent.isDraggingProductionSchedulePath = false;\n }\n\n private getTargetIndexOfDestinationProductionSchedulePath(event: DragEvent, destinationOfDraggedProductionSchedulePathElement: SVGGraphicsElement): number {\n const mouseCoordinatesInProductionSchedulePlanView: Coordinates = this.getMouseCoordinatesInProductionSchedulePlanView(event);\n const destinationColoredYarnSetPathElement = destinationOfDraggedProductionSchedulePathElement.parentElement;\n const productionSchedulePathElementsInColoredYarnSet: SVGGraphicsElement[] = this.getProductionSchedulePathElementsInColoredYarnSet(destinationColoredYarnSetPathElement);\n const indexOfDestinationProductionSchedulePath: number = indexOf(productionSchedulePathElementsInColoredYarnSet, destinationOfDraggedProductionSchedulePathElement);\n\n const destinationPathElementSelection = d3Select(destinationOfDraggedProductionSchedulePathElement);\n const productionSchedulePathPositionStart = Number(destinationPathElementSelection.attr('x'));\n const productionSchedulePathPositionEnd = sum([productionSchedulePathPositionStart, Number(destinationPathElementSelection.attr('width'))]);\n const productionSchedulePathDropThreshold = (productionSchedulePathPositionEnd - productionSchedulePathPositionStart) / 2;\n\n const isInLeftSideOfPath: boolean = inRange(\n mouseCoordinatesInProductionSchedulePlanView.x,\n productionSchedulePathPositionStart,\n productionSchedulePathPositionStart + productionSchedulePathDropThreshold\n );\n\n return isInLeftSideOfPath ? indexOfDestinationProductionSchedulePath : indexOfDestinationProductionSchedulePath + 1;\n }\n\n private getProductionSchedulePathElementsInColoredYarnSet(destinationColoredYarnSetElement: HTMLElement): SVGGraphicsElement[] {\n return d3Select(destinationColoredYarnSetElement).selectAll(`.${this.labelForProductionSchedulePath}`).nodes() as SVGGraphicsElement[];\n }\n\n private getTargetPositionOfDraggedProductionSchedulePathInColoredYarnSetPath(event: DragEvent, destinationPathElement: SVGGraphicsElement): number {\n const mouseCoordinatesInProductionSchedulePlanView: Coordinates = this.getMouseCoordinatesInProductionSchedulePlanView(event);\n\n const destinationPathElementSelection = d3Select(destinationPathElement);\n const productionSchedulePathPositionStart = Number(destinationPathElementSelection.attr('x'));\n const productionSchedulePathPositionEnd = sum([productionSchedulePathPositionStart, Number(destinationPathElementSelection.attr('width'))]);\n const productionSchedulePathDropThreshold = (productionSchedulePathPositionEnd - productionSchedulePathPositionStart) / 2;\n\n const isInLeftSideOfPath: boolean = inRange(\n mouseCoordinatesInProductionSchedulePlanView.x,\n productionSchedulePathPositionStart,\n productionSchedulePathPositionStart + productionSchedulePathDropThreshold\n );\n return isInLeftSideOfPath ? productionSchedulePathPositionStart : productionSchedulePathPositionEnd;\n }\n\n private drawProductionSchedulePathDropIndicator(parentElement: Element, dropIndicatorPosition: number): void {\n d3Select(parentElement).append('rect').attr('class', 'production-schedule-drop-indicator vertical').attr('x', dropIndicatorPosition).raise();\n }\n\n private drawProductionScheduleItemInPathGroupDropIndicator(element: Element, dropIndicatorPosition: number): void {\n d3Select(element).append('rect').attr('class', 'production-schedule-drop-indicator horizontal').attr('y', dropIndicatorPosition).raise();\n }\n\n private onDragEndProductionSchedulePath(event: DragEvent): void {\n if (this.isEditPathsEnabled) {\n const {x: mouseCoordinateX, y: mouseCoordinateY} = this.getMouseCoordinatesInProductionSchedulePlanView(event);\n\n const hasDraggedFarEnoughFromStartingPoint: boolean = isUndefined(this.mouseCoordinatesOfDragStart)\n ? false\n : isCoordinateOutOfRangeOfOtherCoordinate(\n {\n x: mouseCoordinateX,\n y: mouseCoordinateY\n },\n this.mouseCoordinatesOfDragStart\n );\n\n if (hasDraggedFarEnoughFromStartingPoint && !isUndefined(this.destinationOfDraggedProductionSchedulePath)) {\n const destinationOfDraggedProductionSchedulePathElement: SVGGraphicsElement = this.destinationOfDraggedProductionSchedulePath.node() as SVGGraphicsElement;\n const destinationOfDraggedProductionSchedulePathClassList = destinationOfDraggedProductionSchedulePathElement.classList;\n\n if (destinationOfDraggedProductionSchedulePathClassList.contains(this.labelForProductionSchedulePath)) {\n this.handleDropOnProductionSchedulePath(event);\n } else if (destinationOfDraggedProductionSchedulePathClassList.contains(this.labelForProductionScheduleColoredYarnSet)) {\n this.handleDropOnProductionScheduleColoredYarnSet();\n }\n }\n }\n\n this.cleanProductionSchedulePlanAfterDrop();\n }\n\n private handleDropOnProductionSchedulePath(event: DragEvent): void {\n let destinationOfDraggedProductionSchedulePath: ProductionSchedulePath = this.destinationOfDraggedProductionSchedulePath.datum() as ProductionSchedulePath;\n\n if (isUndefined(destinationOfDraggedProductionSchedulePath)) {\n destinationOfDraggedProductionSchedulePath = this.productionSchedulePath;\n }\n\n const targetIndexOfDraggedProductionSchedulePath: number = this.getTargetIndexOfDestinationProductionSchedulePath(\n event,\n this.destinationOfDraggedProductionSchedulePath.node() as SVGGraphicsElement\n );\n this.moveDraggedProductionSchedulePathToProductionScheduleColoredYarnSet(\n this.productionSchedule.getProductionScheduleColoredYarnSetForProductionSchedulePath(destinationOfDraggedProductionSchedulePath),\n targetIndexOfDraggedProductionSchedulePath\n );\n }\n\n private handleDropOnProductionScheduleColoredYarnSet(): void {\n const destinationOfDraggedProductionSchedulePath: OverviewListColoredYarnSetWithStartDent = this.destinationOfDraggedProductionSchedulePath.datum() as OverviewListColoredYarnSetWithStartDent;\n this.moveDraggedProductionSchedulePathToProductionScheduleColoredYarnSet(destinationOfDraggedProductionSchedulePath);\n }\n\n private moveDraggedProductionSchedulePathToProductionScheduleColoredYarnSet(\n destinationProductionScheduleColoredYarnSet: OverviewListColoredYarnSetWithStartDent,\n targetIndexOfDraggedProductionSchedulePath?: number\n ): void {\n const canMoveProductionSchedulePathToColoredYarnSet: boolean = this.productionSchedule.canMoveProductionSchedulePathToColoredYarnSet(\n this.productionSchedulePath.pathNumber,\n this.productionSchedule.getProductionScheduleColoredYarnSetForProductionSchedulePath(this.productionSchedulePath).startDent,\n destinationProductionScheduleColoredYarnSet.startDent\n );\n\n if (canMoveProductionSchedulePathToColoredYarnSet) {\n this.productionSchedulePlan.moveProductionSchedulePathToColoredYarnSet(\n this.productionSchedulePath,\n this.productionSchedule.getProductionScheduleColoredYarnSetForProductionSchedulePath(this.productionSchedulePath),\n destinationProductionScheduleColoredYarnSet,\n targetIndexOfDraggedProductionSchedulePath\n );\n }\n }\n\n private getProductionSchedulePathPosition(): number {\n let result = this.productionSchedulePath.startDent - ProductionScheduleBuilderComponent.dentOffset;\n\n if (this.canRepositionProductionSchedulePathBeforeVerification()) {\n result = sumBy(this.productionSchedulePathsOfColoredYarnSet.productionSchedulePaths.slice(0, this.productionSchedulePathIndex), 'technicalWidthInDents');\n } else if (this.canRepositionProductionSchedulePathAfterVerification()) {\n const totalWidthInDentsOfPreviousColoredYarnSets = sumBy(this.productionSchedule.coloredYarnSets.slice(0, this.productionScheduleColoredYarnSetIndex), 'technicalWidthInDents');\n result -= totalWidthInDentsOfPreviousColoredYarnSets;\n }\n\n return multiply(result, this.aspectRatio.width);\n }\n\n private removeProductionSchedulePathFromProductionSchedulePathsOfColoredYarnSet(): void {\n const productionSchedulePathsOfColoredYarnSet = this.productionSchedule.getProductionSchedulePathsOfColoredYarnSetAtStartDent(\n this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent\n );\n this.productionSchedulePlan.removeProductionSchedulePath(this.productionSchedulePath.pathNumber, productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent);\n }\n\n private canRepositionProductionSchedulePathBeforeVerification(): boolean {\n return (\n !isEqual(this.productionSchedulePhase, ProductionSchedulePhase.VERIFY) &&\n (isEqual(this.productionSchedulePathIndex, 0) || size(this.productionSchedulePathsOfColoredYarnSet.productionSchedulePaths) > 1)\n );\n }\n\n private canRepositionProductionSchedulePathAfterVerification(): boolean {\n return (\n isEqual(this.productionSchedulePhase, ProductionSchedulePhase.VERIFY) &&\n size(this.productionSchedule.productionSchedulePathsOfColoredYarnSets) > 1 &&\n !isEqual(this.productionScheduleColoredYarnSetIndex, 0)\n );\n }\n\n private deleteProductionSchedulePath(): void {\n if (!isEmpty(this.productionSchedulePath.pathGroups)) {\n this.dialogBuilderFactoryService\n .getBuilder()\n .openAlertDialog({\n titleText: 'GENERAL.ACTIONS.DELETE',\n messageText: this.translate.instant('PRODUCTION_ORDER.WEAVE_PLAN.WARNINGS.DELETE_PRODUCTION_ORDER_PATH'),\n type: DialogType.DELETE\n })\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((hasConfirmed: AlertDialogResult) => {\n if (isEqual(hasConfirmed, AlertDialogResult.CONFIRM)) {\n this.removeProductionSchedulePathFromProductionSchedulePathsOfColoredYarnSet();\n }\n });\n } else {\n this.removeProductionSchedulePathFromProductionSchedulePathsOfColoredYarnSet();\n }\n }\n\n private getMouseCoordinatesInProductionSchedulePath(event: DragEvent): Coordinates {\n const productionScheduleWrapperElement = d3Select(this.elementRef.nativeElement).node() as ContainerElement;\n const [mouseCoordinateX, mouseCoordinateY] = d3Pointer(event, productionScheduleWrapperElement);\n\n return {x: mouseCoordinateX, y: mouseCoordinateY};\n }\n\n private getMouseCoordinatesInProductionSchedulePlanView(event: DragEvent): Coordinates {\n const productionScheduleWrapperElement = d3Select(`.${this.labelForProductionScheduleBuilderGroup}`).node() as ContainerElement;\n const [mouseCoordinateX, mouseCoordinateY] = d3Pointer(event, productionScheduleWrapperElement);\n return {x: mouseCoordinateX, y: mouseCoordinateY};\n }\n\n private getOrderlineProperty(orderLineId: number): ProductionScheduleOrderLine {\n if (orderLineId !== null && this.productionSchedule && !AssertionUtils.isEmpty(this.productionSchedule.orderLines)) {\n const foundOrderLine = this.productionSchedule.orderLines.find((orderLine: ProductionScheduleOrderLine) => orderLine.id === orderLineId);\n\n if (foundOrderLine) {\n return foundOrderLine;\n }\n }\n\n return null;\n }\n}\n","\n\n\n\n\n\n\n","import {\n AfterViewInit,\n Component,\n ElementRef,\n EventEmitter,\n HostListener,\n Inject,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n QueryList,\n Renderer2,\n SimpleChanges,\n ViewChildren\n} from '@angular/core';\nimport {isCoordinateOutOfRangeOfOtherCoordinate} from '@application/helper/production-schedule-builder';\nimport {cloneProductionScheduleElement} from '@application/helper/production-schedule-builder/clone-production-schedule-element';\nimport {getClosestProductionScheduleItemAndIndexRelativeToMouseCoordinates} from '@application/helper/production-schedule-builder/get-closest-production-schedule-item-and-index-relative-to-mouse-coordinates';\nimport {getMouseCoordinatesInProductionScheduleBuilderGroup} from '@application/helper/production-schedule-builder/get-mouse-coordinates-in-production-schedule-builder-group';\nimport {getUnderlyingElement} from '@application/helper/production-schedule-builder/get-underlying-element';\nimport {isInLowerHalfOfProductionScheduleItem} from '@application/helper/production-schedule-builder/is-in-lower-half-of-production-schedule-item';\nimport {DraggingService} from '@application/services/dragging/dragging.service';\nimport {Coordinates} from '@domain/coordinates';\nimport {ClosestProductionScheduleItemInPathGroup} from '@domain/production-schedule/closest-production-schedule-item-in-path-group';\nimport {ProductionOrderCustomSettings} from '@domain/production-schedule/custom-settings/production-order-custom-settings';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {ProductionSchedulePhase} from '@domain/production-schedule/production-schedule-phase.enum';\nimport {OverviewListColoredYarnSetWithStartDent} from '@domain/textile-data/creel/overview-list-colored-yarn-set-with-start-dent';\nimport {ListDrawing} from '@presentation/components/drawing-list/list-drawing';\nimport {ProductionScheduleBuilderAspectRatio} from '@presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-builder-aspect-ratio';\nimport {EditProductionSchedulePathOfColoredYarnSetComponent} from '@presentation/pages/texfab/production-schedule/add/plan/modals/edit-production-schedule-path-of-colored-yarn-set/edit-production-schedule-path-of-colored-yarn-set.component';\nimport {PRODUCTION_SCHEDULE_PLAN, ProductionSchedulePlan} from '@presentation/pages/texfab/production-schedule/add/plan/production-schedule-plan';\nimport {AlertDialogResult, BaseComponent, DialogBuilderFactoryService, DialogType, TranslateService, Unit} from '@vdw/angular-component-library';\nimport {drag as d3Drag, D3DragEvent} from 'd3-drag';\nimport {BaseType, ContainerElement, pointer as d3Pointer, select as d3Select, selectAll as d3SelectAll, Selection as d3Selection} from 'd3-selection';\nimport {cloneDeep, first, indexOf, inRange, isEmpty, isEqual, isNil, isUndefined, last, multiply, size, sum, sumBy, throttle} from 'lodash-es';\nimport {takeUntil} from 'rxjs/operators';\nimport {ProductionScheduleBuilderComponent} from '../../production-schedule-builder.component';\nimport {ProductionScheduleItemInPathGroupContainerComponent} from './production-schedule-item-in-path-group-container/production-schedule-item-in-path-group-container.component';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: '[app-production-schedule-path-of-colored-yarn-set]',\n templateUrl: './production-schedule-path-of-colored-yarn-set.component.html',\n styleUrls: ['./production-schedule-path-of-colored-yarn-set.component.scss']\n})\nexport class ProductionSchedulePathOfColoredYarnSetComponent extends BaseComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy {\n private static isDraggingProductionSchedulePath: boolean;\n @Input() public productionSchedulePath: ProductionSchedulePath;\n @Input() public productionSchedulePathIndex: number;\n @Input() public productionScheduleBuilderHeight: number;\n @Input() public commercialUnit: Unit;\n @Input() public productionScheduleColoredYarnSetIndex: number;\n @Input() public productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet;\n @Input() public productionSchedulePhase: ProductionSchedulePhase;\n @Input() public productionSchedule: ProductionSchedule;\n @Input() public aspectRatio: ProductionScheduleBuilderAspectRatio;\n @Input() public isEditPathsEnabled: boolean;\n @Input() public productionOrderCustomSettings: ProductionOrderCustomSettings;\n @Input() public isProductionScheduleDisplayOverview: boolean;\n @Output() public hoveredProductionSchedulePathComponent: EventEmitter = new EventEmitter();\n @Output() public productionSchedulePlanChanged: EventEmitter = new EventEmitter();\n @ViewChildren('itemsInPathGroup') public itemInPathGroupComponents: QueryList;\n\n public readonly productionSchedulePathSeparatorWidth = 1;\n\n private mouseCoordinatesOfDragStart: Coordinates;\n private destinationOfDraggedProductionSchedulePath: d3Selection;\n private listenerMouseEnter: () => void;\n private listenerMouseLeave: () => void;\n private listenerMouseClick: () => void;\n private dragInitializedOnCurrentProductionSchedulePath = false;\n private readonly labelForProductionScheduleBuilderGroup = 'production-schedule-builder-group';\n private readonly labelForProductionScheduleColoredYarnSet = 'production-schedule-colored-yarn-set';\n private readonly labelForProductionSchedulePath = 'production-schedule-path-of-colored-yarn-set';\n private readonly dropIndicatorPositionHeight = 8;\n\n public constructor(\n @Inject(PRODUCTION_SCHEDULE_PLAN) private readonly productionSchedulePlan: ProductionSchedulePlan,\n private readonly elementRef: ElementRef,\n private readonly renderer: Renderer2,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n private readonly translate: TranslateService,\n private readonly zone: NgZone,\n private readonly draggingService: DraggingService\n ) {\n super();\n }\n\n @HostListener('dragleave', ['$event'])\n public onDragLeaveProductionSchedulePath(event: any): void {\n event.stopPropagation();\n }\n\n public ngOnInit(): void {\n this.initialiseProductionSchedulePathOfColoredYarnSetComponent();\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if ('aspectRatio' in changes || 'productionSchedule' in changes || 'productionScheduleBuilderHeight' in changes) {\n this.setProductionSchedulePathOfColoredYarnSetAttributes();\n }\n }\n\n public ngAfterViewInit(): void {\n this.setProductionSchedulePathOfColoredYarnSetEventHandlers();\n }\n\n public ngOnDestroy(): void {\n super.ngOnDestroy();\n\n if (!isUndefined(this.listenerMouseEnter)) {\n this.listenerMouseEnter();\n }\n if (!isUndefined(this.listenerMouseLeave)) {\n this.listenerMouseLeave();\n }\n if (!isUndefined(this.listenerMouseClick)) {\n this.listenerMouseClick();\n }\n }\n\n public getProductionSchedulePathOfColoredYarnSetWidth(): number {\n return multiply(this.productionSchedulePath.technicalWidthInDents, this.aspectRatio.width);\n }\n\n public onProductionSchedulePlanChanged(): void {\n this.productionSchedulePlanChanged.emit();\n }\n\n public onClickProductionSchedulePathEditOverlay(event: MouseEvent): void {\n if (this.isEditPathsEnabled) {\n const parentElement: Element = (event.target as Element).parentElement;\n\n this.renderer.addClass(parentElement, 'active');\n\n this.dialogBuilderFactoryService\n .getBuilder()\n .withClass('edit-drawing-in-path')\n .withWidth('268px')\n .openDialog(EditProductionSchedulePathOfColoredYarnSetComponent, {\n matDialogPosition: {\n y: event.clientY,\n x: event.clientX\n }\n })\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((deleteProductionSchedulePathOfColoredYarnSet: boolean) => {\n if (deleteProductionSchedulePathOfColoredYarnSet) {\n this.deleteProductionSchedulePath();\n }\n\n this.renderer.removeClass(parentElement, 'active');\n });\n }\n }\n\n public getProductionSchedulePathLeft(): number {\n return this.elementRef.nativeElement.x.baseVal.value;\n }\n\n public getProductionSchedulePathWidth(): number {\n return Math.max(\n ...this.itemInPathGroupComponents.toArray().map((itemInPathGroupComponent: ProductionScheduleItemInPathGroupContainerComponent) => {\n return itemInPathGroupComponent.drawingWidth;\n })\n );\n }\n\n public getProductionSchedulePathTop(): number {\n return Math.min(\n ...this.itemInPathGroupComponents.toArray().map((itemInPathGroupComponent: ProductionScheduleItemInPathGroupContainerComponent) => {\n return itemInPathGroupComponent.elementRef.nativeElement.y.baseVal.value;\n })\n );\n }\n\n public getProductionSchedulePathSeparatorHorizontalPosition(): number {\n return this.getProductionSchedulePathOfColoredYarnSetWidth() - this.productionSchedulePathSeparatorWidth;\n }\n\n private isMousePositionInsideProductionSchedulePath(event: DragEvent, destinationOfDraggedProductionScheduleItem: d3Selection): boolean {\n const productionSchedulePathPositionStart = 0;\n const productionSchedulePathPositionEnd = Number(destinationOfDraggedProductionScheduleItem.attr('width'));\n\n const mouseCoordinatesInProductionSchedulePlanView: Coordinates = this.getMouseCoordinatesInProductionSchedulePath(event);\n\n const productionSchedulePathDropThreshold = multiply(30, this.aspectRatio.width);\n\n return inRange(\n mouseCoordinatesInProductionSchedulePlanView.x,\n productionSchedulePathPositionStart + productionSchedulePathDropThreshold,\n productionSchedulePathPositionEnd - productionSchedulePathDropThreshold\n );\n }\n\n private isMousePositionInLeftSideOfPath(event: DragEvent): boolean {\n const mouseCoordinatesInProductionSchedulePlanView: Coordinates = this.getMouseCoordinatesInProductionSchedulePath(event);\n\n const productionSchedulePathDropThreshold = multiply(30, this.aspectRatio.width);\n\n return inRange(mouseCoordinatesInProductionSchedulePlanView.x, 0, productionSchedulePathDropThreshold);\n }\n\n private droppedNewDrawingOnProductionSchedulePath(event: DragEvent): void {\n if (!this.isEditPathsEnabled && !isNil(this.draggingService.getCurrentData()) && !('quantity' in this.draggingService.getCurrentData())) {\n const draggedItem: ListDrawing = cloneDeep(this.draggingService.getCurrentData());\n\n const destinationOfDraggedProductionScheduleItem = d3Select(this.elementRef.nativeElement) as d3Selection;\n\n if (!isNil(destinationOfDraggedProductionScheduleItem)) {\n this.addDroppedDrawingToProductionSchedulePath(event, draggedItem, destinationOfDraggedProductionScheduleItem);\n }\n\n this.renderer.removeClass(first(this.elementRef.nativeElement.children), 'highlight');\n d3Select('.drawing-drag-preview').remove();\n\n this.removeDropIndicator();\n }\n }\n\n private addDroppedDrawingToProductionSchedulePath(\n event: DragEvent,\n draggedItem: ListDrawing,\n destinationOfDraggedProductionScheduleItem: d3Selection\n ): void {\n if (this.isMousePositionInsideProductionSchedulePath(event, destinationOfDraggedProductionScheduleItem)) {\n const isDraggingOverProductionSchedulePath: boolean = d3Select(document.elementFromPoint(event.clientX, event.clientY)).classed('production-schedule-path-background');\n\n if (\n isDraggingOverProductionSchedulePath &&\n this.productionSchedule.canAddProductionScheduleItemToProductionSchedulePath(\n draggedItem,\n this.productionSchedulePath.pathNumber,\n this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet\n )\n ) {\n const productionSchedulePathsOfColoredYarnSet = this.productionSchedule.getProductionSchedulePathsOfColoredYarnSetAtStartDent(\n this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent\n );\n const productionScheduleItemsInPathGroup: SVGGraphicsElement[] = this.itemInPathGroupComponents\n .toArray()\n .map((productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroupContainerComponent) => productionScheduleItemInPathGroup.elementRef.nativeElement) as SVGGraphicsElement[];\n\n const closestProductionScheduleItemInPathGroup: ClosestProductionScheduleItemInPathGroup = getClosestProductionScheduleItemAndIndexRelativeToMouseCoordinates(\n this.getMouseCoordinatesInProductionSchedulePath(event),\n productionScheduleItemsInPathGroup\n );\n let destinationIndexInProductionSchedulePath: number = closestProductionScheduleItemInPathGroup.index;\n const closestProductionScheduleItemInPathGroupComponent: SVGGraphicsElement = closestProductionScheduleItemInPathGroup.element;\n\n if (\n !isUndefined(closestProductionScheduleItemInPathGroupComponent) &&\n !isInLowerHalfOfProductionScheduleItem(this.getMouseCoordinatesInProductionSchedulePath(event), closestProductionScheduleItemInPathGroupComponent)\n ) {\n destinationIndexInProductionSchedulePath = destinationIndexInProductionSchedulePath + 1;\n }\n\n this.productionSchedulePlan.addDrawingToProductionSchedulePath(\n draggedItem,\n this.productionSchedulePath.pathNumber,\n productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet,\n !isNil(destinationIndexInProductionSchedulePath) ? destinationIndexInProductionSchedulePath : null\n );\n } else if (\n !this.productionSchedule.enoughWidthToAddProductionScheduleItemToProductionSchedulePath(\n draggedItem,\n this.productionSchedulePath.pathNumber,\n this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet\n )\n ) {\n this.dialogBuilderFactoryService.getBuilder().openAlertDialog({\n titleText: 'PRODUCTION_ORDER.WEAVE_PLAN.WEAVE_PLAN',\n messageText: 'PRODUCTION_ORDER.WEAVE_PLAN.WARNINGS.NOT_ENOUGH_WIDTH',\n type: DialogType.INFORMATION\n });\n }\n } else if (this.productionSchedule.canAddProductionScheduleItemToColoredYarnSet(this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent, draggedItem)) {\n const isInLeftSideOfPath: boolean = this.isMousePositionInLeftSideOfPath(event);\n const productionSchedulePathsOfColoredYarnSet = this.productionSchedule.getProductionSchedulePathsOfColoredYarnSetAtStartDent(\n this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent\n );\n this.productionSchedulePlan.addDrawingToColoredYarnSet(\n draggedItem,\n this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent,\n isInLeftSideOfPath\n ? indexOf(productionSchedulePathsOfColoredYarnSet.productionSchedulePaths, this.productionSchedulePath)\n : indexOf(productionSchedulePathsOfColoredYarnSet.productionSchedulePaths, this.productionSchedulePath) + 1\n );\n }\n }\n\n private initialiseProductionSchedulePathOfColoredYarnSetComponent(): void {\n d3Select(this.elementRef.nativeElement).datum(this.productionSchedulePath);\n this.zone.runOutsideAngular(() => {\n d3Select(this.elementRef.nativeElement)\n .on('drop', (event: DragEvent) => this.droppedNewDrawingOnProductionSchedulePath(event))\n .on(\n 'dragover',\n throttle((event: DragEvent) => this.draggedNewDrawingOverProductionSchedulePath(event), 50)\n )\n .on('dragenter', (event: DragEvent) => event.stopPropagation())\n .on('dragleave', (event: DragEvent) => {\n event.stopPropagation();\n this.removeDropIndicator();\n });\n });\n }\n\n private draggedNewDrawingOverProductionSchedulePath(event: DragEvent): void {\n event.preventDefault();\n event.stopPropagation();\n\n const draggedItem: ListDrawing = this.draggingService.getCurrentData();\n\n if (!this.isEditPathsEnabled && !isNil(draggedItem) && !('quantity' in draggedItem)) {\n this.removeDropIndicator();\n const destinationOfDraggedProductionScheduleItem: d3Selection = d3Select(this.elementRef.nativeElement);\n const hasDraggedInsideProductionSchedulePath: boolean = this.isMousePositionInsideProductionSchedulePath(event, destinationOfDraggedProductionScheduleItem);\n\n if (\n hasDraggedInsideProductionSchedulePath &&\n this.productionSchedule.canAddProductionScheduleItemToProductionSchedulePath(\n draggedItem,\n this.productionSchedulePath.pathNumber,\n this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet\n )\n ) {\n this.drawProductionScheduleItemInPathGroupDropIndicator(\n d3Select(this.elementRef.nativeElement).node(),\n Number(last(this.itemInPathGroupComponents.toArray()).elementRef.nativeElement.getAttribute('y')) - this.dropIndicatorPositionHeight\n );\n } else if (\n !hasDraggedInsideProductionSchedulePath &&\n this.productionSchedule.canAddProductionScheduleItemToColoredYarnSet(this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent, draggedItem)\n ) {\n let dropIndicatorPosition = Number(destinationOfDraggedProductionScheduleItem.attr('x'));\n\n if (!this.isMousePositionInLeftSideOfPath(event)) {\n dropIndicatorPosition += Number(destinationOfDraggedProductionScheduleItem.attr('width'));\n }\n\n this.drawProductionSchedulePathDropIndicator((destinationOfDraggedProductionScheduleItem.node() as SVGGraphicsElement).parentElement, dropIndicatorPosition);\n }\n }\n }\n\n private removeDropIndicator(): void {\n d3SelectAll('.production-schedule-drop-indicator').remove();\n }\n\n private setProductionSchedulePathOfColoredYarnSetAttributes(): void {\n const productionSchedulePathOfColoredYarnSetElement = this.elementRef.nativeElement;\n\n this.renderer.setAttribute(productionSchedulePathOfColoredYarnSetElement, 'x', `${this.getProductionSchedulePathPosition()}`);\n this.renderer.setAttribute(productionSchedulePathOfColoredYarnSetElement, 'width', `${this.getProductionSchedulePathOfColoredYarnSetWidth()}`);\n }\n\n private setProductionSchedulePathOfColoredYarnSetEventHandlers(): void {\n const productionSchedulePathInColoredYarnSetElement = this.elementRef.nativeElement;\n\n this.listenerMouseEnter = this.renderer.listen(productionSchedulePathInColoredYarnSetElement, 'mouseenter', () => this.onMouseEnter());\n this.listenerMouseLeave = this.renderer.listen(productionSchedulePathInColoredYarnSetElement, 'mouseleave', () => this.onMouseLeave());\n\n d3Select(productionSchedulePathInColoredYarnSetElement).call(\n d3Drag()\n .on('start', (event: D3DragEvent) => this.onDragStart(event.sourceEvent))\n .on('drag', (event: D3DragEvent) => this.onDrag(event.sourceEvent))\n .on('end', (event: D3DragEvent) => this.onDragEndProductionSchedulePath(event.sourceEvent))\n );\n }\n\n private onMouseEnter(): void {\n if (!ProductionSchedulePathOfColoredYarnSetComponent.isDraggingProductionSchedulePath && !ProductionScheduleItemInPathGroupContainerComponent.isDraggingProductionScheduleItemInPathGroup) {\n this.hoveredProductionSchedulePathComponent.emit(this);\n }\n }\n\n private onMouseLeave(): void {\n if (!ProductionSchedulePathOfColoredYarnSetComponent.isDraggingProductionSchedulePath && !ProductionScheduleItemInPathGroupContainerComponent.isDraggingProductionScheduleItemInPathGroup) {\n this.hoveredProductionSchedulePathComponent.emit(null);\n }\n }\n\n private onDragStart(event: DragEvent): void {\n this.mouseCoordinatesOfDragStart = getMouseCoordinatesInProductionScheduleBuilderGroup(event);\n }\n\n private onDrag(event: DragEvent): void {\n if (this.isEditPathsEnabled) {\n const {x: mouseCoordinateX, y: mouseCoordinateY} = this.getMouseCoordinatesInProductionSchedulePlanView(event);\n\n const hasDraggedFarEnoughFromStartingPoint: boolean = isCoordinateOutOfRangeOfOtherCoordinate(\n {\n x: mouseCoordinateX,\n y: mouseCoordinateY\n },\n this.mouseCoordinatesOfDragStart\n );\n if (hasDraggedFarEnoughFromStartingPoint || this.dragInitializedOnCurrentProductionSchedulePath) {\n if (this.dragInitializedOnCurrentProductionSchedulePath) {\n const productionSchedulePathSelection = d3Select(this.elementRef.nativeElement);\n\n productionSchedulePathSelection.attr('x', mouseCoordinateX).attr('y', mouseCoordinateY);\n\n this.onDragProductionSchedulePath(event);\n } else {\n this.onDragInitializeProductionSchedulePath(event);\n }\n }\n }\n }\n\n private onDragInitializeProductionSchedulePath(event: DragEvent): void {\n this.dragInitializedOnCurrentProductionSchedulePath = true;\n this.mouseCoordinatesOfDragStart = getMouseCoordinatesInProductionScheduleBuilderGroup(event);\n const productionScheduleWrapperElement = d3Select(`.${this.labelForProductionScheduleBuilderGroup}`).node() as ContainerElement;\n const [mouseCoordinateX] = d3Pointer(event, productionScheduleWrapperElement);\n cloneProductionScheduleElement(this.elementRef, mouseCoordinateX);\n ProductionSchedulePathOfColoredYarnSetComponent.isDraggingProductionSchedulePath = true;\n }\n\n private onDragProductionSchedulePath(event: DragEvent): void {\n this.removeDropIndicator();\n d3SelectAll('.background').classed('highlight', false);\n\n const destinationOfDraggedProductionSchedulePath = getUnderlyingElement({x: event.x, y: event.y}, `.${this.labelForProductionScheduleColoredYarnSet}, .${this.labelForProductionSchedulePath}`);\n\n if (!isNil(destinationOfDraggedProductionSchedulePath)) {\n const destinationHasChanged = !isEqual(this.destinationOfDraggedProductionSchedulePath, destinationOfDraggedProductionSchedulePath);\n if (destinationHasChanged) {\n this.destinationOfDraggedProductionSchedulePath = destinationOfDraggedProductionSchedulePath;\n }\n\n const destinationOfDraggedProductionSchedulePathElement: SVGGraphicsElement = this.destinationOfDraggedProductionSchedulePath.node() as SVGGraphicsElement;\n const destinationOfDraggedProductionSchedulePathClassList = destinationOfDraggedProductionSchedulePathElement.classList;\n\n if (destinationOfDraggedProductionSchedulePathClassList.contains(this.labelForProductionSchedulePath)) {\n this.handleDragOverProductionSchedulePath(event, destinationOfDraggedProductionSchedulePathElement);\n } else if (destinationOfDraggedProductionSchedulePathClassList.contains(this.labelForProductionScheduleColoredYarnSet)) {\n this.handleDragOverProductionScheduleColoredYarnSet(destinationOfDraggedProductionSchedulePathElement);\n }\n }\n }\n\n private handleDragOverProductionScheduleColoredYarnSet(destinationOfDraggedProductionSchedulePathElement: SVGGraphicsElement): void {\n const destinationOfDraggedProductionSchedulePath: OverviewListColoredYarnSetWithStartDent = this.destinationOfDraggedProductionSchedulePath.datum() as OverviewListColoredYarnSetWithStartDent;\n\n if (\n this.productionSchedule.canMoveProductionSchedulePathToColoredYarnSet(\n this.productionSchedulePath.pathNumber,\n this.productionSchedule.getProductionScheduleColoredYarnSetForProductionSchedulePath(this.productionSchedulePath).startDent,\n destinationOfDraggedProductionSchedulePath.startDent\n )\n ) {\n const productionSchedulePaths = d3Select(destinationOfDraggedProductionSchedulePathElement).selectAll(`.${this.labelForProductionSchedulePath}`).nodes();\n\n const lastProductionSchedulePathSelection = d3Select(last(productionSchedulePaths));\n const dropIndicatorPosition = isEmpty(productionSchedulePaths) ? 0 : sum([Number(lastProductionSchedulePathSelection.attr('x')), Number(lastProductionSchedulePathSelection.attr('width'))]);\n\n this.drawProductionSchedulePathDropIndicator(destinationOfDraggedProductionSchedulePathElement, dropIndicatorPosition);\n }\n }\n\n private handleDragOverProductionSchedulePath(event: DragEvent, destinationOfDraggedProductionSchedulePathElement: SVGGraphicsElement): void {\n let destinationOfDraggedProductionSchedulePath: ProductionSchedulePath = this.destinationOfDraggedProductionSchedulePath.datum() as ProductionSchedulePath;\n\n if (isUndefined(destinationOfDraggedProductionSchedulePath)) {\n destinationOfDraggedProductionSchedulePath = this.productionSchedulePath;\n }\n\n if (\n this.productionSchedule.canMoveProductionSchedulePathToColoredYarnSet(\n this.productionSchedulePath.pathNumber,\n this.productionSchedule.getProductionScheduleColoredYarnSetForProductionSchedulePath(this.productionSchedulePath).startDent,\n this.productionSchedule.getProductionScheduleColoredYarnSetForProductionSchedulePath(destinationOfDraggedProductionSchedulePath).startDent\n )\n ) {\n const targetPositionOfDraggedProductionSchedulePathInColoredYarnSetPath: number = this.getTargetPositionOfDraggedProductionSchedulePathInColoredYarnSetPath(\n event,\n destinationOfDraggedProductionSchedulePathElement\n );\n this.drawProductionSchedulePathDropIndicator(destinationOfDraggedProductionSchedulePathElement.parentElement, targetPositionOfDraggedProductionSchedulePathInColoredYarnSetPath);\n }\n }\n\n private cleanProductionSchedulePlanAfterDrop(): void {\n this.removeDropIndicator();\n this.restoreProductionSchedulePathClone();\n this.restoreProductionScheduleToNonDraggingState();\n }\n\n private restoreProductionSchedulePathClone(): void {\n const draggedProductionSchedulePath = d3SelectAll('.dragged-production-schedule-element');\n\n const draggedProductionSchedulePathNode = draggedProductionSchedulePath.node() as SVGGraphicsElement;\n if (isNil(draggedProductionSchedulePathNode)) {\n d3Select('.production-schedule-element-clone').remove();\n } else {\n const productionScheduleColoredYarnSetOfDraggedProductionSchedulePath = draggedProductionSchedulePathNode.parentNode;\n\n const cloneOfDraggedProductionSchedulePath = d3Select('.production-schedule-element-clone')\n .attr('x', draggedProductionSchedulePath.attr('x'))\n .attr('y', draggedProductionSchedulePath.attr('y'))\n .attr('class', this.labelForProductionSchedulePath);\n\n productionScheduleColoredYarnSetOfDraggedProductionSchedulePath.insertBefore(\n cloneOfDraggedProductionSchedulePath.remove().node() as SVGGraphicsElement,\n (draggedProductionSchedulePath.node() as SVGGraphicsElement).nextSibling\n );\n draggedProductionSchedulePath.remove();\n }\n }\n\n private restoreProductionScheduleToNonDraggingState(): void {\n this.dragInitializedOnCurrentProductionSchedulePath = false;\n ProductionSchedulePathOfColoredYarnSetComponent.isDraggingProductionSchedulePath = false;\n }\n\n private getTargetIndexOfDestinationProductionSchedulePath(event: DragEvent, destinationOfDraggedProductionSchedulePathElement: SVGGraphicsElement): number {\n const mouseCoordinatesInProductionSchedulePlanView: Coordinates = this.getMouseCoordinatesInProductionSchedulePlanView(event);\n const destinationColoredYarnSetPathElement = destinationOfDraggedProductionSchedulePathElement.parentElement;\n const productionSchedulePathElementsInColoredYarnSet: SVGGraphicsElement[] = this.getProductionSchedulePathElementsInColoredYarnSet(destinationColoredYarnSetPathElement);\n const indexOfDestinationProductionSchedulePath: number = indexOf(productionSchedulePathElementsInColoredYarnSet, destinationOfDraggedProductionSchedulePathElement);\n\n const destinationPathElementSelection = d3Select(destinationOfDraggedProductionSchedulePathElement);\n const productionSchedulePathPositionStart = Number(destinationPathElementSelection.attr('x'));\n const productionSchedulePathPositionEnd = sum([productionSchedulePathPositionStart, Number(destinationPathElementSelection.attr('width'))]);\n const productionSchedulePathDropThreshold = (productionSchedulePathPositionEnd - productionSchedulePathPositionStart) / 2;\n\n const isInLeftSideOfPath: boolean = inRange(\n mouseCoordinatesInProductionSchedulePlanView.x,\n productionSchedulePathPositionStart,\n productionSchedulePathPositionStart + productionSchedulePathDropThreshold\n );\n\n return isInLeftSideOfPath ? indexOfDestinationProductionSchedulePath : indexOfDestinationProductionSchedulePath + 1;\n }\n\n private getProductionSchedulePathElementsInColoredYarnSet(destinationColoredYarnSetElement: HTMLElement): SVGGraphicsElement[] {\n return d3Select(destinationColoredYarnSetElement).selectAll(`.${this.labelForProductionSchedulePath}`).nodes() as SVGGraphicsElement[];\n }\n\n private getTargetPositionOfDraggedProductionSchedulePathInColoredYarnSetPath(event: DragEvent, destinationPathElement: SVGGraphicsElement): number {\n const mouseCoordinatesInProductionSchedulePlanView: Coordinates = this.getMouseCoordinatesInProductionSchedulePlanView(event);\n\n const destinationPathElementSelection = d3Select(destinationPathElement);\n const productionSchedulePathPositionStart = Number(destinationPathElementSelection.attr('x'));\n const productionSchedulePathPositionEnd = sum([productionSchedulePathPositionStart, Number(destinationPathElementSelection.attr('width'))]);\n const productionSchedulePathDropThreshold = (productionSchedulePathPositionEnd - productionSchedulePathPositionStart) / 2;\n\n const isInLeftSideOfPath: boolean = inRange(\n mouseCoordinatesInProductionSchedulePlanView.x,\n productionSchedulePathPositionStart,\n productionSchedulePathPositionStart + productionSchedulePathDropThreshold\n );\n return isInLeftSideOfPath ? productionSchedulePathPositionStart : productionSchedulePathPositionEnd;\n }\n\n private drawProductionSchedulePathDropIndicator(parentElement: Element, dropIndicatorPosition: number): void {\n d3Select(parentElement).append('rect').attr('class', 'production-schedule-drop-indicator vertical').attr('x', dropIndicatorPosition).raise();\n }\n\n private drawProductionScheduleItemInPathGroupDropIndicator(element: Element, dropIndicatorPosition: number): void {\n d3Select(element).append('rect').attr('class', 'production-schedule-drop-indicator horizontal').attr('y', dropIndicatorPosition).raise();\n }\n\n private onDragEndProductionSchedulePath(event: DragEvent): void {\n if (this.isEditPathsEnabled) {\n const {x: mouseCoordinateX, y: mouseCoordinateY} = this.getMouseCoordinatesInProductionSchedulePlanView(event);\n\n const hasDraggedFarEnoughFromStartingPoint: boolean = isUndefined(this.mouseCoordinatesOfDragStart)\n ? false\n : isCoordinateOutOfRangeOfOtherCoordinate(\n {\n x: mouseCoordinateX,\n y: mouseCoordinateY\n },\n this.mouseCoordinatesOfDragStart\n );\n\n if (hasDraggedFarEnoughFromStartingPoint && !isUndefined(this.destinationOfDraggedProductionSchedulePath)) {\n const destinationOfDraggedProductionSchedulePathElement: SVGGraphicsElement = this.destinationOfDraggedProductionSchedulePath.node() as SVGGraphicsElement;\n const destinationOfDraggedProductionSchedulePathClassList = destinationOfDraggedProductionSchedulePathElement.classList;\n\n if (destinationOfDraggedProductionSchedulePathClassList.contains(this.labelForProductionSchedulePath)) {\n this.handleDropOnProductionSchedulePath(event);\n } else if (destinationOfDraggedProductionSchedulePathClassList.contains(this.labelForProductionScheduleColoredYarnSet)) {\n this.handleDropOnProductionScheduleColoredYarnSet();\n }\n }\n }\n\n this.cleanProductionSchedulePlanAfterDrop();\n }\n\n private handleDropOnProductionSchedulePath(event: DragEvent): void {\n let destinationOfDraggedProductionSchedulePath: ProductionSchedulePath = this.destinationOfDraggedProductionSchedulePath.datum() as ProductionSchedulePath;\n\n if (isUndefined(destinationOfDraggedProductionSchedulePath)) {\n destinationOfDraggedProductionSchedulePath = this.productionSchedulePath;\n }\n\n const targetIndexOfDraggedProductionSchedulePath: number = this.getTargetIndexOfDestinationProductionSchedulePath(\n event,\n this.destinationOfDraggedProductionSchedulePath.node() as SVGGraphicsElement\n );\n this.moveDraggedProductionSchedulePathToProductionScheduleColoredYarnSet(\n this.productionSchedule.getProductionScheduleColoredYarnSetForProductionSchedulePath(destinationOfDraggedProductionSchedulePath),\n targetIndexOfDraggedProductionSchedulePath\n );\n }\n\n private handleDropOnProductionScheduleColoredYarnSet(): void {\n const destinationOfDraggedProductionSchedulePath: OverviewListColoredYarnSetWithStartDent = this.destinationOfDraggedProductionSchedulePath.datum() as OverviewListColoredYarnSetWithStartDent;\n this.moveDraggedProductionSchedulePathToProductionScheduleColoredYarnSet(destinationOfDraggedProductionSchedulePath);\n }\n\n private moveDraggedProductionSchedulePathToProductionScheduleColoredYarnSet(\n destinationProductionScheduleColoredYarnSet: OverviewListColoredYarnSetWithStartDent,\n targetIndexOfDraggedProductionSchedulePath?: number\n ): void {\n const canMoveProductionSchedulePathToColoredYarnSet: boolean = this.productionSchedule.canMoveProductionSchedulePathToColoredYarnSet(\n this.productionSchedulePath.pathNumber,\n this.productionSchedule.getProductionScheduleColoredYarnSetForProductionSchedulePath(this.productionSchedulePath).startDent,\n destinationProductionScheduleColoredYarnSet.startDent\n );\n\n if (canMoveProductionSchedulePathToColoredYarnSet) {\n this.productionSchedulePlan.moveProductionSchedulePathToColoredYarnSet(\n this.productionSchedulePath,\n this.productionSchedule.getProductionScheduleColoredYarnSetForProductionSchedulePath(this.productionSchedulePath),\n destinationProductionScheduleColoredYarnSet,\n targetIndexOfDraggedProductionSchedulePath\n );\n }\n }\n\n private getProductionSchedulePathPosition(): number {\n let result = this.productionSchedulePath.startDent - ProductionScheduleBuilderComponent.dentOffset;\n\n if (this.canRepositionProductionSchedulePathBeforeVerification()) {\n result = sumBy(this.productionSchedulePathsOfColoredYarnSet.productionSchedulePaths.slice(0, this.productionSchedulePathIndex), 'technicalWidthInDents');\n } else if (this.canRepositionProductionSchedulePathAfterVerification()) {\n const totalWidthInDentsOfPreviousColoredYarnSets = sumBy(this.productionSchedule.coloredYarnSets.slice(0, this.productionScheduleColoredYarnSetIndex), 'technicalWidthInDents');\n result -= totalWidthInDentsOfPreviousColoredYarnSets;\n }\n\n return multiply(result, this.aspectRatio.width);\n }\n\n private removeProductionSchedulePathFromProductionSchedulePathsOfColoredYarnSet(): void {\n const productionSchedulePathsOfColoredYarnSet = this.productionSchedule.getProductionSchedulePathsOfColoredYarnSetAtStartDent(\n this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent\n );\n this.productionSchedulePlan.removeProductionSchedulePath(this.productionSchedulePath.pathNumber, productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent);\n }\n\n private canRepositionProductionSchedulePathBeforeVerification(): boolean {\n return (\n !isEqual(this.productionSchedulePhase, ProductionSchedulePhase.VERIFY) &&\n (isEqual(this.productionSchedulePathIndex, 0) || size(this.productionSchedulePathsOfColoredYarnSet.productionSchedulePaths) > 1)\n );\n }\n\n private canRepositionProductionSchedulePathAfterVerification(): boolean {\n return (\n isEqual(this.productionSchedulePhase, ProductionSchedulePhase.VERIFY) &&\n size(this.productionSchedule.productionSchedulePathsOfColoredYarnSets) > 1 &&\n !isEqual(this.productionScheduleColoredYarnSetIndex, 0)\n );\n }\n\n private deleteProductionSchedulePath(): void {\n if (!isEmpty(this.productionSchedulePath.pathGroups)) {\n this.dialogBuilderFactoryService\n .getBuilder()\n .openAlertDialog({\n titleText: 'GENERAL.ACTIONS.DELETE',\n messageText: this.translate.instant('PRODUCTION_ORDER.WEAVE_PLAN.WARNINGS.DELETE_PRODUCTION_ORDER_PATH'),\n type: DialogType.DELETE\n })\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((hasConfirmed: AlertDialogResult) => {\n if (isEqual(hasConfirmed, AlertDialogResult.CONFIRM)) {\n this.removeProductionSchedulePathFromProductionSchedulePathsOfColoredYarnSet();\n }\n });\n } else {\n this.removeProductionSchedulePathFromProductionSchedulePathsOfColoredYarnSet();\n }\n }\n\n private getMouseCoordinatesInProductionSchedulePath(event: DragEvent): Coordinates {\n const productionScheduleWrapperElement = d3Select(this.elementRef.nativeElement).node() as ContainerElement;\n const [mouseCoordinateX, mouseCoordinateY] = d3Pointer(event, productionScheduleWrapperElement);\n\n return {x: mouseCoordinateX, y: mouseCoordinateY};\n }\n\n private getMouseCoordinatesInProductionSchedulePlanView(event: DragEvent): Coordinates {\n const productionScheduleWrapperElement = d3Select(`.${this.labelForProductionScheduleBuilderGroup}`).node() as ContainerElement;\n const [mouseCoordinateX, mouseCoordinateY] = d3Pointer(event, productionScheduleWrapperElement);\n return {x: mouseCoordinateX, y: mouseCoordinateY};\n }\n}\n","export enum ProductionScheduleListviewColumnType {\n NAME,\n STATUS,\n QUANTITY,\n WIDTH,\n HEIGHT,\n TOTAL_WOVEN_HEIGHT,\n COLOR_MAIN,\n COLOR_BORDER,\n FINISHING_AND_CUTBARS_LABEL,\n SHAPE,\n PRODUCTION,\n EDIT,\n OPEN_IN_CADCAM\n}\n","import {Pipe, PipeTransform} from '@angular/core';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {isEqual, reduce, size, slice} from 'lodash-es';\n\n@Pipe({\n name: 'getProductionScheduleColoredYarnSetPaths'\n})\nexport class GetProductionScheduleColoredYarnSetPathsPipe implements PipeTransform {\n public transform(\n productionScheduleColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet,\n productionScheduleColoredYarnSetIndex: number,\n productionSchedule: ProductionSchedule\n ): ProductionSchedulePath[] {\n let result: ProductionSchedulePath[] = [];\n\n if (productionScheduleColoredYarnSet.hasProductionSchedulePaths()) {\n result = productionScheduleColoredYarnSet.productionSchedulePaths;\n } else {\n const pathNumber = this.getPathNumber(productionSchedule, productionScheduleColoredYarnSetIndex);\n\n result = [new ProductionSchedulePath(`Path ${pathNumber}`, pathNumber, 0, 0, [], 0, 0, 0)];\n }\n return result;\n }\n\n private getPathNumber(productionSchedule: ProductionSchedule, productionScheduleColoredYarnSetIndex: number): number {\n const productionScheduleColoredYarnSetsToIterate: ProductionSchedulePathsOfColoredYarnSet[] = slice(\n productionSchedule.productionSchedulePathsOfColoredYarnSets,\n 0,\n productionScheduleColoredYarnSetIndex + 1\n );\n\n return reduce(\n productionScheduleColoredYarnSetsToIterate,\n (pathNumber: number, productionScheduleColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet, index: number) => {\n if (!isEqual(index, productionScheduleColoredYarnSetIndex)) {\n if (productionScheduleColoredYarnSet.hasProductionSchedulePaths()) {\n pathNumber += size(productionScheduleColoredYarnSet.productionSchedulePaths);\n } else {\n pathNumber++;\n }\n }\n return pathNumber;\n },\n 1\n );\n }\n}\n","import {convertCommercialUnit, TranslateService, Unit} from '@vdw/angular-component-library';\nimport {round} from 'lodash-es';\n\nexport abstract class CalculateDimensionsBasePipe {\n private readonly translate: TranslateService;\n\n protected constructor(translate: TranslateService) {\n this.translate = translate;\n }\n\n protected calculateDimensions(dimension: number, displayTechnicalUnit: boolean, commercialUnit: Unit): number {\n let result = 0;\n\n if (displayTechnicalUnit) {\n result = round(dimension);\n } else {\n result = round(\n convertCommercialUnit({\n from: {\n unit: Unit.MILLIMETER,\n value: dimension\n },\n to: commercialUnit\n }),\n 2\n );\n }\n\n return result;\n }\n\n protected getUnitLabel(displayTechnicalUnit: boolean, technicalUnit: Unit, commercialUnit: Unit): string {\n return displayTechnicalUnit ? this.translate.instant(`GENERAL.UNIT.${Unit.getKeyFromValue(technicalUnit)}`) : this.translate.instant(`GENERAL.UNIT.${Unit.getKeyFromValue(commercialUnit)}`);\n }\n\n protected abstract transform(...args: any[]): string;\n}\n","import {Pipe, PipeTransform} from '@angular/core';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {TranslateService, Unit} from '@vdw/angular-component-library';\nimport {isNil} from 'lodash-es';\nimport {CalculateDimensionsBasePipe} from '../calculate-dimensions-base-pipe';\n\n@Pipe({\n name: 'calculateDimensionsOfProductionScheduleItem'\n})\nexport class CalculateDimensionsOfProductionScheduleItemPipe extends CalculateDimensionsBasePipe implements PipeTransform {\n public constructor(translate: TranslateService) {\n super(translate);\n }\n\n public transform(productionScheduleItem: ProductionScheduleItemInPathGroup, displayTechnicalUnit: boolean, commercialUnit: Unit, calculateLength: boolean): string {\n let dimension = 0;\n const technicalUnit = calculateLength ? Unit.PICKS : Unit.DENTS;\n\n if (displayTechnicalUnit && !isNil(productionScheduleItem.technicalDimensions)) {\n dimension = calculateLength ? productionScheduleItem.technicalDimensions.heightInPicks : productionScheduleItem.technicalDimensions.widthInDents;\n } else if (!displayTechnicalUnit && !isNil(productionScheduleItem.commercialDimensionsInMM)) {\n dimension = calculateLength ? productionScheduleItem.commercialDimensionsInMM.heightInMM : productionScheduleItem.commercialDimensionsInMM.widthInMM;\n }\n\n return `${this.calculateDimensions(dimension, displayTechnicalUnit, commercialUnit)} ${this.getUnitLabel(displayTechnicalUnit, technicalUnit, commercialUnit)}`;\n }\n}\n","import {Pipe, PipeTransform} from '@angular/core';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {OverviewListCreelPosition} from '@domain/textile-data/creel/overview-list-creel-position';\nimport {find, isNil, join, map} from 'lodash-es';\n\n@Pipe({\n name: 'getProductionScheduleItemColor'\n})\nexport class GetProductionScheduleItemColorPipe implements PipeTransform {\n public transform(productionScheduleItem: ProductionScheduleItemInPathGroup, productionScheduleColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet, isMainColor: boolean): string {\n const creelPosition: OverviewListCreelPosition = find(productionScheduleColoredYarnSet.productionScheduleColoredYarnSet.coloredYarnSet.overviewListColorSet.creelPositions, [\n 'position',\n isMainColor ? productionScheduleItem.mainColorPosition : productionScheduleItem.borderColorPosition\n ]);\n\n return !isNil(creelPosition) ? join(map(creelPosition.getUniqueItems(), 'name'), ', ') : '';\n }\n}\n","\n \n \n \n \n
\n
\n
\n {{ 'AGGRID.PINCOLUMN' | bmsTranslate }}\n
\n \n
\n \n {{ 'AGGRID.PINLEFT' | bmsTranslate }}\n
\n
\n \n {{ 'AGGRID.PINRIGHT' | bmsTranslate }}\n
\n
\n \n {{ 'AGGRID.NOPIN' | bmsTranslate }}\n
\n
\n
\n
\n
\n {{ 'AGGRID.AUTOSIZETHISCOLUMN' | bmsTranslate }}\n
\n
\n {{ 'AGGRID.AUTOSIZEALLCOLUMNS' | bmsTranslate }}\n
\n
\n
\n
\n {{ 'AGGRID.RESETCOLUMNS' | bmsTranslate }}\n
\n
\n
\n
\n \n \n \n \n
\n \n \n \n \n
\n
\n
\n \n {{ column.translationKey | bmsTranslate }}\n
\n
\n
\n
\n","import {Component, EventEmitter, Input, Output, ViewChild} from '@angular/core';\nimport {MatCheckboxChange} from '@angular/material/checkbox';\nimport {MatMenuTrigger} from '@angular/material/menu';\nimport {ProductionScheduleListviewColumn} from '@presentation/pages/texfab/production-schedule/add/plan/listview/production-schedule-listview-column.interface';\nimport {TranslateService} from '@vdw/angular-component-library';\nimport {each, includes, isEqual, remove, size, some, toLower} from 'lodash-es';\n\n@Component({\n selector: 'app-column-filter',\n templateUrl: './column-filter.component.html',\n styleUrls: ['./column-filter.component.scss']\n})\nexport class ColumnFilterComponent {\n @ViewChild(MatMenuTrigger) public trigger: MatMenuTrigger;\n @Input() public columns: ProductionScheduleListviewColumn[];\n @Input() public visibleColumns: ProductionScheduleListviewColumn[];\n @Input() public pinnedLeftColumns: ProductionScheduleListviewColumn[];\n @Input() public pinnedRightColumns: ProductionScheduleListviewColumn[];\n @Input() public selectedColumn: ProductionScheduleListviewColumn;\n @Output() public updateVisibleColumns: EventEmitter = new EventEmitter();\n @Output() public updatePinnedLeftColumns: EventEmitter = new EventEmitter();\n @Output() public updatePinnedRightColumns: EventEmitter = new EventEmitter();\n @Output() public updateUnpinnedColumns: EventEmitter = new EventEmitter();\n @Output() public autoSizeSelectedColumn: EventEmitter = new EventEmitter();\n @Output() public autoSizeAllColumns: EventEmitter = new EventEmitter();\n @Output() public resetAllColumns: EventEmitter = new EventEmitter();\n public filteredText = '';\n private timedOutCloser: NodeJS.Timeout;\n private translate: TranslateService;\n\n public constructor(translate: TranslateService) {\n this.translate = translate;\n }\n\n public mouseEnter(): void {\n if (this.timedOutCloser) {\n clearTimeout(this.timedOutCloser);\n }\n this.trigger.openMenu();\n }\n\n public mouseLeave(): void {\n this.timedOutCloser = setTimeout(() => {\n this.trigger.closeMenu();\n }, 50);\n }\n\n public isVisibleColumn(column: ProductionScheduleListviewColumn): boolean {\n return some(this.visibleColumns, (visibleColumn: ProductionScheduleListviewColumn) => isEqual(visibleColumn, column));\n }\n\n public changeVisibleColumn(column: ProductionScheduleListviewColumn): void {\n if (!isEqual(this.selectedColumn, column)) {\n if (some(this.visibleColumns, (visibleColumn: ProductionScheduleListviewColumn) => isEqual(visibleColumn, column))) {\n remove(this.visibleColumns, (visibleColumn: ProductionScheduleListviewColumn) => isEqual(visibleColumn, column));\n } else {\n this.visibleColumns.push(column);\n }\n\n this.updateVisibleColumns.emit(this.visibleColumns);\n }\n }\n\n public areAllColumnsVisible(): boolean {\n return isEqual(size(this.columns), size(this.visibleColumns));\n }\n\n public changeAllVisibleColumns(matCheckboxChange: MatCheckboxChange): void {\n if (matCheckboxChange.checked) {\n each(this.columns, (column: ProductionScheduleListviewColumn) => {\n if (!isEqual(column, this.selectedColumn)) {\n this.visibleColumns.push(column);\n }\n });\n } else {\n remove(this.visibleColumns, (visibleColumn: ProductionScheduleListviewColumn) => !isEqual(visibleColumn, this.selectedColumn));\n }\n\n this.updateVisibleColumns.emit(this.visibleColumns);\n }\n\n public isSelectedColumn(column: ProductionScheduleListviewColumn): boolean {\n return isEqual(column, this.selectedColumn);\n }\n\n public pinLeft(): void {\n this.updatePinnedLeftColumns.emit();\n }\n\n public pinRight(): void {\n this.updatePinnedRightColumns.emit();\n }\n\n public unpin(): void {\n this.updateUnpinnedColumns.emit();\n }\n\n public isPinnedLeft(): boolean {\n return some(this.pinnedLeftColumns, (pinnedColumn: ProductionScheduleListviewColumn) => isEqual(this.selectedColumn, pinnedColumn));\n }\n\n public isPinnedRight(): boolean {\n return some(this.pinnedRightColumns, (pinnedColumn: ProductionScheduleListviewColumn) => isEqual(this.selectedColumn, pinnedColumn));\n }\n\n public isNotPinned(): boolean {\n return (\n !some(this.pinnedLeftColumns, (pinnedColumn: ProductionScheduleListviewColumn) => isEqual(this.selectedColumn, pinnedColumn)) &&\n !some(this.pinnedRightColumns, (pinnedColumn: ProductionScheduleListviewColumn) => isEqual(this.selectedColumn, pinnedColumn))\n );\n }\n\n public autosizeColumn(): void {\n this.autoSizeSelectedColumn.emit();\n }\n\n public autosizeColumns(): void {\n this.autoSizeAllColumns.emit();\n }\n\n public resetColumns(): void {\n this.resetAllColumns.emit();\n }\n\n public getSearchedColumns(): ProductionScheduleListviewColumn[] {\n return this.columns.filter((column: ProductionScheduleListviewColumn) => {\n return includes(toLower(this.translate.instant(column.translationKey)), toLower(this.filteredText));\n });\n }\n}\n","import {Pipe, PipeTransform} from '@angular/core';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {TranslateService, Unit} from '@vdw/angular-component-library';\nimport {CalculateDimensionsBasePipe} from '../calculate-dimensions-base-pipe';\n\n@Pipe({\n name: 'calculateDimensionsOfProductionSchedulePath'\n})\nexport class CalculateDimensionsOfProductionSchedulePathPipe extends CalculateDimensionsBasePipe implements PipeTransform {\n public constructor(translate: TranslateService) {\n super(translate);\n }\n\n public transform(productionSchedulePath: ProductionSchedulePath, displayTechnicalUnit: boolean, commercialUnit: Unit, calculateLength: boolean): string {\n let dimension = 0;\n const technicalUnit = calculateLength ? Unit.PICKS : Unit.DENTS;\n\n if (displayTechnicalUnit) {\n dimension = calculateLength ? productionSchedulePath.totalLengthInPicks : productionSchedulePath.technicalWidthInDents;\n } else {\n dimension = calculateLength ? productionSchedulePath.totalLengthInMM : productionSchedulePath.commercialWidthInMM;\n }\n\n return `${this.calculateDimensions(dimension, displayTechnicalUnit, commercialUnit)} ${this.getUnitLabel(displayTechnicalUnit, technicalUnit, commercialUnit)}`;\n }\n}\n","import {Pipe, PipeTransform} from '@angular/core';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {convertCommercialUnit, convertDentsToWidthInMeter, TranslateService, Unit} from '@vdw/angular-component-library';\nimport {CalculateDimensionsBasePipe} from '../calculate-dimensions-base-pipe';\n\n@Pipe({\n name: 'calculateDimensionsOfProductionScheduleColoredYarnSet'\n})\nexport class CalculateDimensionsOfProductionScheduleColoredYarnSetPipe extends CalculateDimensionsBasePipe implements PipeTransform {\n public constructor(translate: TranslateService) {\n super(translate);\n }\n\n public transform(\n productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet,\n displayTechnicalUnit: boolean,\n commercialUnit: Unit,\n productionSchedule: ProductionSchedule\n ): string {\n let dimension = 0;\n\n if (displayTechnicalUnit) {\n dimension = productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.technicalWidthInDents;\n } else {\n dimension = convertCommercialUnit({\n from: {\n unit: Unit.METER,\n value: convertDentsToWidthInMeter(productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.technicalWidthInDents, productionSchedule.machineQuality.reedDensity * 1000)\n },\n to: Unit.MILLIMETER\n });\n }\n\n return `${this.calculateDimensions(dimension, displayTechnicalUnit, commercialUnit)} ${this.getUnitLabel(displayTechnicalUnit, Unit.DENTS, commercialUnit)}`;\n }\n}\n","import {Pipe, PipeTransform} from '@angular/core';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {TranslateService, Unit} from '@vdw/angular-component-library';\nimport {CalculateDimensionsBasePipe} from '../calculate-dimensions-base-pipe';\n\n@Pipe({\n name: 'calculateRestLengthOfProductionSchedulePath'\n})\nexport class CalculateRestLengthOfProductionSchedulePathPipe extends CalculateDimensionsBasePipe implements PipeTransform {\n public constructor(translate: TranslateService) {\n super(translate);\n }\n\n public transform(productionSchedulePath: ProductionSchedulePath, displayTechnicalUnit: boolean, commercialUnit: Unit, productionSchedule: ProductionSchedule): string {\n let dimension = 0;\n\n if (displayTechnicalUnit) {\n dimension = productionSchedule.getProductionScheduleLengthInPicks() - productionSchedulePath.totalLengthInPicks;\n } else {\n dimension = productionSchedule.getProductionScheduleLengthInMillimeters() - productionSchedulePath.totalLengthInMM;\n }\n\n return `${this.calculateDimensions(dimension, displayTechnicalUnit, commercialUnit)} ${this.getUnitLabel(displayTechnicalUnit, Unit.PICKS, commercialUnit)}`;\n }\n}\n","import {Pipe, PipeTransform} from '@angular/core';\nimport {cloneDeep, isEqual, remove, some} from 'lodash-es';\nimport {ProductionScheduleListviewColumn} from '../production-schedule-new-listview-column.interface';\n\n@Pipe({\n name: 'getUnpinnedColumns'\n})\nexport class GetUnpinnedColumnsPipe implements PipeTransform {\n public transform(\n visibleColumns: ProductionScheduleListviewColumn[],\n pinnedLeftColumns: ProductionScheduleListviewColumn[],\n pinnedRightColumns: ProductionScheduleListviewColumn[]\n ): ProductionScheduleListviewColumn[] {\n const unpinnedColumns = cloneDeep(visibleColumns);\n\n remove(unpinnedColumns, (unpinnedColumn: ProductionScheduleListviewColumn) => some(pinnedLeftColumns, (pinnedColumn: ProductionScheduleListviewColumn) => isEqual(unpinnedColumn, pinnedColumn)));\n\n remove(unpinnedColumns, (unpinnedColumn: ProductionScheduleListviewColumn) => some(pinnedRightColumns, (pinnedColumn: ProductionScheduleListviewColumn) => isEqual(unpinnedColumn, pinnedColumn)));\n\n return unpinnedColumns;\n }\n}\n","import {Pipe, PipeTransform} from '@angular/core';\nimport {EpProductionScheduleItemInPathGroup} from '@domain/production-schedule/ep-production-schedule-item-in-path-group';\nimport {TranslateService, Unit} from '@vdw/angular-component-library';\nimport {CalculateDimensionsBasePipe} from '../calculate-dimensions-base-pipe';\n\n@Pipe({\n name: 'calculateCutbarsDimensionsForProductionScheduleItem'\n})\nexport class CalculateCutbarsDimensionsForProductionScheduleItemPipe extends CalculateDimensionsBasePipe implements PipeTransform {\n public constructor(translate: TranslateService) {\n super(translate);\n }\n\n public transform(productionScheduleItem: EpProductionScheduleItemInPathGroup, displayTechnicalUnit: boolean, commercialUnit: Unit): string {\n let cutbarBeforeLength = 0;\n let cutbarAfterLength = 0;\n\n const {cutbarBefore, cutbarAfter} = productionScheduleItem.getCutbarInformation();\n const unit = this.getUnitLabel(displayTechnicalUnit, Unit.PICKS, commercialUnit);\n\n if (displayTechnicalUnit) {\n cutbarBeforeLength = cutbarBefore.technicalLengthInNumberOfPicks;\n cutbarAfterLength = cutbarAfter.technicalLengthInNumberOfPicks;\n } else {\n cutbarBeforeLength = cutbarBefore.commercialLengthInMM;\n cutbarAfterLength = cutbarAfter.commercialLengthInMM;\n }\n\n return `b: ${this.calculateDimensions(cutbarBeforeLength, displayTechnicalUnit, commercialUnit)} ${unit} / a: ${this.calculateDimensions(\n cutbarAfterLength,\n displayTechnicalUnit,\n commercialUnit\n )} ${unit}`;\n }\n}\n","import {Pipe, PipeTransform} from '@angular/core';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {convertCommercialUnit, TranslateService, Unit} from '@vdw/angular-component-library';\n\n@Pipe({\n name: 'getProductionScheduleItemTotalWovenHeight'\n})\nexport class GetProductionScheduleItemTotalWovenHeightPipe implements PipeTransform {\n public constructor(private translate: TranslateService) {}\n\n public transform(productionScheduleItem: ProductionScheduleItemInPathGroup, displayTechnicalUnit: boolean, commercialUnit: Unit): string {\n let result: string;\n\n if (displayTechnicalUnit) {\n result = `${productionScheduleItem.totalWovenHeightInPicks} ${this.translate.instant('GENERAL.UNIT.PICKS')}`;\n } else {\n const unitTranslation = this.translate.instant(`GENERAL.UNIT.${Unit.getKeyFromValue(commercialUnit)}`);\n\n result = `${convertCommercialUnit({\n from: {\n unit: Unit.MILLIMETER,\n value: productionScheduleItem.totalWovenHeightInMM\n },\n to: commercialUnit\n })} ${unitTranslation}`;\n }\n\n return result;\n }\n}\n","
\n
\n

\n {{ 'TEXTILE_DATA.COLORED_YARN_SET.COLORED_YARN_SET' | bmsTranslate: {count: 2} }}\n

\n
\n\n \n \n \n \n

{{ productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.coloredYarnSet.name }}

\n
\n \n
\n \n
\n
\n
\n {{ 'GENERAL.DIMENSIONS.WIDTH' | bmsTranslate }}:\n \n {{ productionSchedulePathsOfColoredYarnSet | calculateDimensionsOfProductionScheduleColoredYarnSet: displayTechnicalUnit : commercialUnit : productionSchedule }}\n \n
\n
\n \n
\n \n {{ 'TEXTILE_DATA.YARN_TYPE.YARN_CONSUMPTION' | bmsTranslate }}\n ({{ 'GENERAL.HINTS.UNAUTHORIZED' | bmsTranslate }})\n
\n \n
\n\n \n
\n
\n \n \n \n \n\n

{{ productionSchedulePath.name }}

\n
\n \n
\n
\n {{ 'GENERAL.DIMENSIONS.WIDTH' | bmsTranslate }}:\n \n {{ productionSchedulePath | calculateDimensionsOfProductionSchedulePath: displayTechnicalUnit : commercialUnit : false }}\n \n
\n
\n
\n
\n {{ 'GENERAL.DIMENSIONS.LENGTH' | bmsTranslate }}:\n \n {{ productionSchedulePath | calculateDimensionsOfProductionSchedulePath: displayTechnicalUnit : commercialUnit : true }}\n \n
\n
\n
\n
\n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.WEAVE_PLAN_SUMMARY.REST_LENGTH' | bmsTranslate }}:\n \n {{ productionSchedulePath | calculateRestLengthOfProductionSchedulePath: displayTechnicalUnit : commercialUnit : productionSchedule }}\n \n
\n
\n \n
\n
\n \n

\n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.LISTVIEW.WARNING.MAXIMUM_BUGGY_LENGTH' | bmsTranslate }}\n

\n
\n
\n
\n \n
\n \n
\n \n \n \n\n \n \n \n\n \n \n \n
\n \n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.DROP_IN_DESIGNS' | bmsTranslate }}\n \n \n \n \n \n\n \n \n \n\n \n \n \n \n \n \n \n \n
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n @if (hasViewEpPermission) {\n \n \n \n }\n \n\n\n\n
\n
\n

\n \n

\n
\n \n
\n
\n
\n
\n\n\n
\n
\n

\n \n

\n
\n \n
\n
\n
\n
\n\n\n
\n
\n

\n \n

\n
\n \n
\n
\n
\n
\n\n\n
\n
\n

\n \n

\n
\n \n
\n
\n
\n
\n\n\n
\n
\n

\n \n

\n
\n \n
\n
\n
\n
\n\n\n
\n
\n

\n \n

\n
\n \n
\n
\n
\n
\n\n\n
\n
\n

\n \n

\n
\n \n
\n
\n
\n
\n\n\n
\n
\n

\n \n

\n
\n \n
\n
\n
\n
\n\n\n
\n
\n

\n \n

\n
\n \n
\n
\n
\n
\n\n\n
\n
\n

\n \n

\n
\n \n
\n
\n
\n
\n\n\n
\n
\n

\n \n

\n
\n \n
\n
\n
\n
\n\n\n
\n
\n\n\n
\n
\n\n\n \n \n \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n @if (hasViewEpPermission) {\n \n \n \n }\n \n\n\n\n
\n
\n \n \n \n \n \n \n
\n
\n\n\n\n
\n
\n {{ getProductionScheduleItemStatusTranslationKey(productionScheduleItem.status) | bmsTranslate }}\n
\n
\n
\n\n\n \n \n \n {{ productionScheduleItem.amountProduced * productionSchedule.getProductionScheduleItemMultiplier() }}/\n {{ productionScheduleItem.quantity * productionSchedule.getProductionScheduleItemMultiplier() }}\n \n \n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.LISTVIEW.INCOMPLETE_PIECE' | bmsTranslate: {count: productionScheduleItem.amountIncomplete * productionSchedule.getProductionScheduleItemMultiplier()} }}\n \n \n \n \n
\n \n
\n
\n \n
\n
\n \n\n\n\n
\n \n \n \n
\n
\n\n\n
\n \n \n \n
\n
\n\n\n
\n \n \n \n
\n
\n\n\n
\n \n \n \n
\n\n\n\n
\n \n \n \n
\n\n\n\n
\n
\n \n \n
\n \n
\n
\n\n \n \n
\n
\n
\n\n\n
\n \n
\n
\n\n\n
\n \n \n \n
\n
\n\n\n
\n \n \n \n
\n\n\n
\n \n \n \n
\n
\n","import {DOCUMENT} from '@angular/common';\nimport {ChangeDetectorRef, Component, ElementRef, HostListener, Inject, Input, NgZone, OnChanges, OnInit, Renderer2, SimpleChanges, ViewChild} from '@angular/core';\nimport {MatExpansionPanel} from '@angular/material/expansion';\nimport {MatMenuTrigger} from '@angular/material/menu';\nimport {BackendErrorContext} from '@application/helper/backend-error-context';\nimport {isClickOutsideGivenElements} from '@application/helper/is-click-outside-given-elements';\nimport {getListDrawingFromProductionScheduleItem} from '@application/helper/production-schedule/get-list-drawing-from-production-schedule-item';\nimport {SourceElementUtils} from '@application/helper/source-element-utils';\nimport {DraggingService} from '@application/services/dragging/dragging.service';\nimport {FixedShape} from '@domain/drawing-library/fixed-shape.enum';\nimport {PositionOfDialog} from '@domain/position-of-dialog';\nimport {BmpProductionScheduleItemInPathGroup} from '@domain/production-schedule/bmp-production-schedule-item-in-path-group';\nimport {ProductionOrderCustomSettings} from '@domain/production-schedule/custom-settings/production-order-custom-settings';\nimport {EpProductionScheduleItemInPathGroup} from '@domain/production-schedule/ep-production-schedule-item-in-path-group';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {ProductionScheduleItemInPathGroupStatus} from '@domain/production-schedule/production-schedule-item-in-path-group-status';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {ProductionSchedulePhase} from '@domain/production-schedule/production-schedule-phase.enum';\nimport {Permission} from '@domain/profile/permission.enum';\nimport {Subscription as ProfileSubscription} from '@domain/profile/subscription';\nimport {PropertyValue} from '@domain/property-value';\nimport {OverviewListColoredYarnSetWithStartDent} from '@domain/textile-data/creel/overview-list-colored-yarn-set-with-start-dent';\nimport {CadCamService} from '@infrastructure/cad-cam/cad-cam.service';\nimport {AUTHENTICATION, Authentication} from '@infrastructure/http/authentication/authentication';\nimport {PROFILE, Profile} from '@infrastructure/http/profile/profile';\nimport {YARN_CONSUMPTION, YarnConsumption} from '@infrastructure/http/yarn-consumption/yarn-consumption';\nimport {ListDrawing} from '@presentation/components/drawing-list/list-drawing';\nimport {ListDrawingConfiguration} from '@presentation/components/drawing-list/list-drawing-configuration';\nimport {ListDrawingOrderLine} from '@presentation/components/drawing-list/list-drawing-order-line';\nimport {RepositionDialogComponent} from '@presentation/components/reposition-dialog/reposition-dialog.component';\nimport {EditProductionScheduleItemInPathGroupAction} from '@presentation/pages/texfab/production-schedule/add/plan/modals/edit-production-schedule-item-in-path-group/edit-production-schedule-item-in-path-group-action';\nimport {EditProductionScheduleItemInPathGroupComponent} from '@presentation/pages/texfab/production-schedule/add/plan/modals/edit-production-schedule-item-in-path-group/edit-production-schedule-item-in-path-group.component';\nimport {PRODUCTION_SCHEDULE_PLAN, ProductionSchedulePlan} from '@presentation/pages/texfab/production-schedule/add/plan/production-schedule-plan';\nimport {FinishingDetailsComponent} from '@presentation/pages/texfab/production-schedule/finishing-details/finishing-details.component';\nimport {OverviewListColoredYarnSet} from '@presentation/pages/textile-data/colored-yarn-set/overview/overview-list-colored-yarn-set';\nimport {TextileDataDetailComponent} from '@presentation/pages/textile-data/textile-data-detail/textile-data-detail.component';\nimport {BaseComponent, DialogBuilderFactoryService, DialogType, LocalStorageService, TranslateService, Unit} from '@vdw/angular-component-library';\nimport {clone, cloneDeep, each, find, includes, isEmpty, isEqual, isNil, remove, size, some, toString} from 'lodash-es';\nimport {noop, Observable, Subject} from 'rxjs';\nimport {debounceTime, filter, map, takeUntil} from 'rxjs/operators';\nimport {CalculateDimensionsOfProductionScheduleItemPipe} from '../new-listview/calculate-dimensions-of-production-schedule-item/calculate-dimensions-of-production-schedule-item.pipe';\nimport {GetProductionScheduleColoredYarnSetPathsPipe} from '../new-listview/get-production-schedule-colored-yarn-set-paths/get-production-schedule-colored-yarn-set-paths.pipe';\nimport {GetProductionScheduleItemColorPipe} from '../new-listview/get-production-schedule-item-color/get-production-schedule-item-color.pipe';\nimport {ListviewDragItem} from './listview-drag-item';\nimport {ProductionScheduleListviewColumnType} from './production-schedule-listview-column-type';\nimport {ProductionScheduleListviewColumn} from './production-schedule-listview-column.interface';\n\n@Component({\n selector: 'app-production-schedule-listview',\n templateUrl: './production-schedule-listview.component.html',\n styleUrls: ['./production-schedule-listview.component.scss']\n})\nexport class ProductionScheduleListviewComponent extends BaseComponent implements OnInit, OnChanges {\n public static readonly yesLabel = 'GENERAL.CONDITION.YES';\n public static readonly noLabel = 'GENERAL.CONDITION.NO';\n\n @ViewChild(MatMenuTrigger) public trigger: MatMenuTrigger;\n @ViewChild('quantityInput') public quantityInput: ElementRef;\n @ViewChild('listviewContainer') public listviewContainer: ElementRef;\n @Input() public productionSchedule: ProductionSchedule;\n @Input() public commercialUnit: Unit;\n @Input() public productionSchedulePhase: ProductionSchedulePhase;\n @Input() public allowProductionScheduleItemsToBeEdited: boolean;\n @Input() public listOfCustomSettings: PropertyValue[];\n @Input() public productionOrderCustomSettings: ProductionOrderCustomSettings;\n @Input() public buggyLengthMaxInPicks: number;\n @Input() public displayTechnicalUnit: boolean;\n public showQuantityInput = false;\n\n public initialProductionSchedule: ProductionSchedule;\n public readonly positionOfDialog: PositionOfDialog = PositionOfDialog.RIGHT;\n public readonly permissionToViewBuggyLengthWarning = Permission.VIEW_MIN_MAX_BUGGY;\n public readonly viewEPPermission: Permission = Permission.TEXEDIT_VIEW_EP;\n public productionScheduleListviewColumnType = ProductionScheduleListviewColumnType;\n public columns: ProductionScheduleListviewColumn[];\n public visibleColumns: ProductionScheduleListviewColumn[];\n public productionScheduleItemInPathGroupStatus: typeof ProductionScheduleItemInPathGroupStatus = ProductionScheduleItemInPathGroupStatus;\n\n public selectedColumn: ProductionScheduleListviewColumn;\n public pinnedLeftColumns: ProductionScheduleListviewColumn[] = [];\n public pinnedRightColumns: ProductionScheduleListviewColumn[] = [];\n public readonly productionScheduleItemHeightInPx: number = 56;\n public readonly classNameForProductionScheduleItem = 'production-schedule-item';\n public readonly classNameForPath = 'path';\n public readonly classNameForColoredYarnSet = 'colored-yarn-sets-panel';\n public readonly classNameForEmptyElements = 'empty';\n public hasViewEpPermission: boolean = false;\n\n private quantityInputSubject: Subject;\n private selectedProductionScheduleItem: ProductionScheduleItemInPathGroup;\n private draggedListViewItem: ListviewDragItem;\n private productionScheduleItemDropIndicator: HTMLElement;\n private dragPreviewElement: HTMLElement;\n private errorContextForMissingMachineQualityParameters = 'YARN_CONSUMPTION_INSUFFICIENT_INFORMATION';\n\n private readonly classNameForDropIndicator = 'drop-indicator';\n private readonly classNameForDraggedElement = 'dragging';\n private readonly productionScheduleItemCellPaddingInPx: number = 18;\n private readonly viewYarnConsumption: Permission = Permission.TEXFAB_YARNCONSUMPTION;\n private currentSubscription: ProfileSubscription;\n\n private autoSizedColumns: ProductionScheduleListviewColumn[] = [];\n private autoSizedAll = false;\n\n private changedElementInfo: {productionScheduleColoredYarnSetIndex: number; productionSchedulePathIndex: number; productionScheduleItemIndex?: number} = null;\n private readonly listOfClassesThatShouldNotCloseQuantityInputOnClick = ['quantity-wrapper', 'arrow-up', 'arrow-down'];\n\n public constructor(\n @Inject(AUTHENTICATION) private readonly authentication: Authentication,\n @Inject(PRODUCTION_SCHEDULE_PLAN) private readonly productionSchedulePlan: ProductionSchedulePlan,\n @Inject(YARN_CONSUMPTION) private readonly yarnConsumption: YarnConsumption,\n @Inject(DOCUMENT) private readonly document: Document,\n @Inject(PROFILE) private readonly profile: Profile,\n private readonly zone: NgZone,\n private readonly renderer: Renderer2,\n private readonly translate: TranslateService,\n private readonly changeDetectorRef: ChangeDetectorRef,\n private readonly getProductionScheduleColoredYarnSetPathsPipe: GetProductionScheduleColoredYarnSetPathsPipe,\n private readonly calculateDimensionsOfProductionScheduleItemPipe: CalculateDimensionsOfProductionScheduleItemPipe,\n private readonly getProductionScheduleItemColor: GetProductionScheduleItemColorPipe,\n private readonly localStorage: LocalStorageService,\n private readonly draggingService: DraggingService,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n private readonly cadCamService: CadCamService\n ) {\n super();\n }\n\n @HostListener('document:mousedown', ['$event'])\n public onOutsideQuantityInputMouseDown(event: MouseEvent): void {\n if (!isNil(this.selectedProductionScheduleItem) && isClickOutsideGivenElements(event.target as HTMLElement, this.listOfClassesThatShouldNotCloseQuantityInputOnClick)) {\n this.closeQualityInput();\n }\n }\n\n public ngOnInit(): void {\n this.initialProductionSchedule = clone(this.productionSchedule);\n this.currentSubscription = this.authentication.getCurrentSubscription();\n this.hasViewEpPermission = this.currentSubscription?.hasPermission(Permission.TEXEDIT_VIEW_EP);\n this.setVisibleColumns();\n this.draggingService\n .getData()\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((listDrawing: ListDrawing) => {\n this.draggedListViewItem = {\n listDrawing,\n isNewItem: true\n };\n });\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if ('productionSchedule' in changes && !isNil(changes.productionSchedule.previousValue)) {\n if (!isNil(this.changedElementInfo)) {\n this.scrollChangedElementIntoView(\n this.changedElementInfo.productionScheduleColoredYarnSetIndex,\n this.changedElementInfo.productionSchedulePathIndex,\n this.changedElementInfo.productionScheduleItemIndex\n );\n this.changedElementInfo = null;\n }\n\n if (this.autoSizedAll) {\n this.changeDetectorRef.detectChanges();\n this.autoSizeAllColumns();\n } else if (!isEmpty(this.autoSizedColumns)) {\n this.changeDetectorRef.detectChanges();\n each(this.autoSizedColumns, (column: ProductionScheduleListviewColumn) => {\n this.selectedColumn = column;\n this.autoSizeColumn();\n });\n }\n }\n\n if (\n 'productionSchedulePhase' in changes &&\n changes.productionSchedulePhase.previousValue === ProductionSchedulePhase.VERIFY &&\n changes.productionSchedulePhase.currentValue === ProductionSchedulePhase.BUILD\n ) {\n this.setVisibleColumns();\n }\n }\n\n public isProductionScheduleItemOnProduction(productionScheduleItem: ProductionScheduleItemInPathGroup): string {\n return productionScheduleItem.isProductionItem ? ProductionScheduleListviewComponent.yesLabel : ProductionScheduleListviewComponent.noLabel;\n }\n\n public canShowCutbarsRepresentingLabelForProductionScheduleItem(productionScheduleItem: ProductionScheduleItemInPathGroup): boolean {\n return productionScheduleItem instanceof EpProductionScheduleItemInPathGroup;\n }\n\n public showEditProductionScheduleItemDialog(\n productionScheduleColoredYarnSetIndex: number,\n productionSchedulePathIndex: number,\n productionScheduleItemIndex: number,\n productionScheduleItem: ProductionScheduleItemInPathGroup\n ): void {\n this.dialogBuilderFactoryService\n .getBuilder()\n .withClass('edit-drawing-in-path')\n .withWidth('334px')\n .openDialog(EditProductionScheduleItemInPathGroupComponent, {\n productionScheduleItemInPathGroup: productionScheduleItem,\n commercialUnit: this.commercialUnit,\n productionSchedule: this.productionSchedule,\n allowExceedingRequestedAmountOfOrderLineItems: this.productionOrderCustomSettings?.allowExceedingRequestedAmountOfOrderLineItems,\n pickDensityInPicksPerMeter: this.productionSchedule.machineQuality.pickDensity * 1000\n })\n .pipe(\n filter((result: {action: EditProductionScheduleItemInPathGroupAction; value: ProductionScheduleItemInPathGroup}) => !isNil(result)),\n takeUntil(this.unSubscribeOnViewDestroy)\n )\n .subscribe((result: {action: EditProductionScheduleItemInPathGroupAction; value: ProductionScheduleItemInPathGroup}) => {\n const productionSchedulePathsOfColoredYarnSet = this.productionSchedule.productionSchedulePathsOfColoredYarnSets[productionScheduleColoredYarnSetIndex];\n const startDentOfColoredYarnSet: number = productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent;\n\n if (isEqual(result.action, EditProductionScheduleItemInPathGroupAction.EDIT)) {\n if (!isEqual(result.value.amountProduced, 0)) {\n result.value.status = ProductionScheduleItemInPathGroupStatus.CHANGED;\n }\n this.productionSchedulePlan.editProductionScheduleItem(result.value, productionScheduleItemIndex, productionSchedulePathIndex, startDentOfColoredYarnSet);\n } else if (isEqual(result.action, EditProductionScheduleItemInPathGroupAction.DELETE)) {\n const productionSchedulePathNumber: number = productionSchedulePathsOfColoredYarnSet.productionSchedulePaths[productionSchedulePathIndex].pathNumber;\n this.productionSchedulePlan.removeProductionScheduleItem(productionScheduleItem.uuid, productionSchedulePathNumber, startDentOfColoredYarnSet);\n } else {\n result.value.status = ProductionScheduleItemInPathGroupStatus.REMOVED;\n result.value.amountProduced = 0;\n this.productionSchedulePlan.editProductionScheduleItem(result.value, productionScheduleItemIndex, productionSchedulePathIndex, startDentOfColoredYarnSet);\n }\n });\n }\n\n public openCadCam(target: HTMLElement, productionScheduleItem: ProductionScheduleItemInPathGroup): void {\n this.cadCamService.openCadCam(target, this.getExternalApplicationLink(productionScheduleItem), this.unSubscribeOnViewDestroy);\n }\n\n public trackProductionSchedulePath(productionSchedulePathIndex: number, productionSchedulePath: ProductionSchedulePath): string {\n return productionSchedulePath.name;\n }\n\n public productionSchedulePathHasProductionScheduleItems(productionSchedulePath: ProductionSchedulePath): boolean {\n return !isEmpty(productionSchedulePath.pathGroups);\n }\n\n public handleDragOverEvents(event: any): void {\n event.preventDefault();\n }\n\n public onDraggedDrawingEntersEmptyProductionScheduleItem(event: any, productionScheduleColoredYarnSetIndex: number): void {\n event.preventDefault();\n\n const startDentOfColoredYarnSet = this.productionSchedule.productionSchedulePathsOfColoredYarnSets[productionScheduleColoredYarnSetIndex].productionScheduleColoredYarnSet.startDent;\n\n if (!this.isItemBeingDraggedAProductionSchedulePath() && this.productionSchedule.canAddProductionScheduleItemToColoredYarnSet(startDentOfColoredYarnSet, this.draggedListViewItem.listDrawing)) {\n const target: HTMLElement = event.target as HTMLElement;\n this.renderer.addClass(target, this.classNameForDropIndicator);\n }\n }\n\n public onDraggedDrawingLeavesEmptyProductionScheduleItem(event: any): void {\n event.preventDefault();\n const target: HTMLElement = event.target as HTMLElement;\n\n this.removeDropIndicatorClassFromElement(target);\n }\n\n public onDraggedDrawingOverProductionScheduleItem(event: any, productionScheduleColoredYarnSetIndex: number, productionSchedulePathIndex: number, productionScheduleItemIndex: number): void {\n event.preventDefault();\n\n const productionScheduleColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet = this.productionSchedule.productionSchedulePathsOfColoredYarnSets[productionScheduleColoredYarnSetIndex];\n const target: HTMLElement = event.target as HTMLElement;\n\n if (!includes(target.classList, this.classNameForProductionScheduleItem) || this.isItemBeingDraggedAProductionSchedulePath()) {\n event.stopPropagation();\n } else if (\n this.productionSchedule.canAddProductionScheduleItemToProductionSchedulePath(\n this.draggedListViewItem.listDrawing,\n productionScheduleColoredYarnSet.productionSchedulePaths[productionSchedulePathIndex].pathNumber,\n this.productionSchedule.coloredYarnSets[productionScheduleColoredYarnSetIndex]\n )\n ) {\n let canShowDropIndicator: boolean = this.draggedListViewItem.isNewItem;\n\n if (!this.draggedListViewItem.isNewItem) {\n const draggedProductionScheduleItemColoredYarnSetDifferentFromTargetColoredYarnSet = !isEqual(\n productionScheduleColoredYarnSetIndex,\n this.draggedListViewItem.productionScheduleColoredYarnSetIndex\n );\n const draggedProductionScheduleItemPathDifferentFromTargetPath = !isEqual(productionSchedulePathIndex, this.draggedListViewItem.productionSchedulePathIndex);\n const draggedProductionScheduleItemDifferentFromTargetItem = !isEqual(productionScheduleItemIndex, this.draggedListViewItem.productionScheduleItemIndex);\n\n const isMouseOnBottomHalfOfTarget: boolean = this.isMouseOnBottomHalfOfRow(target.getBoundingClientRect(), event.y);\n const isMouseOnBottomHalfOfPreviousItem: boolean = isMouseOnBottomHalfOfTarget && isEqual(productionScheduleItemIndex, this.draggedListViewItem.productionScheduleItemIndex - 1);\n const isMouseOnTopHalfOfNextItem: boolean = !isMouseOnBottomHalfOfTarget && isEqual(productionScheduleItemIndex, this.draggedListViewItem.productionScheduleItemIndex + 1);\n\n canShowDropIndicator =\n draggedProductionScheduleItemColoredYarnSetDifferentFromTargetColoredYarnSet ||\n draggedProductionScheduleItemPathDifferentFromTargetPath ||\n (draggedProductionScheduleItemDifferentFromTargetItem && !isMouseOnBottomHalfOfPreviousItem && !isMouseOnTopHalfOfNextItem);\n }\n\n if (canShowDropIndicator) {\n this.addProductionScheduleItemDropIndicator(target, event.y);\n }\n }\n }\n\n public onDraggedDrawingLeavesProductionScheduleItem(event: any): void {\n event.preventDefault();\n if (isNil(event.relatedTarget) || !includes((event.relatedTarget as HTMLElement).classList, this.classNameForProductionScheduleItem)) {\n this.removeProductionScheduleItemDropIndicator();\n }\n }\n\n public onDraggedDrawingDroppedOnProductionScheduleItem(event: any, productionScheduleColoredYarnSetIndex: number, productionSchedulePathIndex: number, productionScheduleItemIndex: number): void {\n event.preventDefault();\n if (!isNil(this.productionScheduleItemDropIndicator)) {\n const target: HTMLElement = event.target as HTMLElement;\n const newProductionScheduleItemIndex: number = this.getNewProductionScheduleItemIndex(\n productionScheduleItemIndex,\n productionSchedulePathIndex,\n this.isMouseOnBottomHalfOfRow(target.getBoundingClientRect(), event.y)\n );\n\n if (this.draggedListViewItem.isNewItem) {\n const destinationProductionSchedulePathsOfColoredYarnSet = this.productionSchedule.productionSchedulePathsOfColoredYarnSets[productionScheduleColoredYarnSetIndex];\n const productionSchedulePathNumber: number = destinationProductionSchedulePathsOfColoredYarnSet.productionSchedulePaths[productionSchedulePathIndex].pathNumber;\n this.productionSchedulePlan.addDrawingToProductionSchedulePath(\n this.draggedListViewItem.listDrawing,\n productionSchedulePathNumber,\n destinationProductionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet,\n newProductionScheduleItemIndex\n );\n } else {\n const sourceProductionSchedulePathsOfColoredYarnSet = this.productionSchedule.productionSchedulePathsOfColoredYarnSets[this.draggedListViewItem.productionScheduleColoredYarnSetIndex];\n const sourceProductionSchedulePathNumber = sourceProductionSchedulePathsOfColoredYarnSet.productionSchedulePaths[this.draggedListViewItem.productionSchedulePathIndex].pathNumber;\n const indexInSourceProductionSchedulePath = this.draggedListViewItem.productionScheduleItemIndex;\n const sourceProductionScheduleColoredYarnSet: OverviewListColoredYarnSetWithStartDent = sourceProductionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet;\n const destinationProductionSchedulePathsOfColoredYarnSet = this.productionSchedule.productionSchedulePathsOfColoredYarnSets[productionScheduleColoredYarnSetIndex];\n const destinationProductionSchedulePathNumber = destinationProductionSchedulePathsOfColoredYarnSet.productionSchedulePaths[productionSchedulePathIndex].pathNumber;\n const indexInDestinationProductionSchedulePath = newProductionScheduleItemIndex;\n const destinationProductionScheduleColoredYarnSet: OverviewListColoredYarnSetWithStartDent = destinationProductionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet;\n const productionScheduleItemInPathGroup =\n sourceProductionSchedulePathsOfColoredYarnSet.productionSchedulePaths[this.draggedListViewItem.productionSchedulePathIndex].pathGroups[this.draggedListViewItem.productionScheduleItemIndex];\n this.productionSchedulePlan.moveProductionScheduleItemToProductionSchedulePath(\n sourceProductionSchedulePathNumber,\n indexInSourceProductionSchedulePath,\n sourceProductionScheduleColoredYarnSet,\n destinationProductionSchedulePathNumber,\n indexInDestinationProductionSchedulePath,\n destinationProductionScheduleColoredYarnSet,\n productionScheduleItemInPathGroup\n );\n\n this.removeDragPreviewElement();\n }\n\n this.changedElementInfo = {\n productionScheduleColoredYarnSetIndex,\n productionSchedulePathIndex,\n productionScheduleItemIndex: newProductionScheduleItemIndex\n };\n\n this.draggedListViewItem = null;\n this.removeProductionScheduleItemDropIndicator();\n } else {\n const productionScheduleColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet = this.productionSchedule.productionSchedulePathsOfColoredYarnSets[productionScheduleColoredYarnSetIndex];\n if (\n !this.productionSchedule.enoughWidthToAddProductionScheduleItemToProductionSchedulePath(\n this.draggedListViewItem.listDrawing,\n productionScheduleColoredYarnSet.productionSchedulePaths[productionSchedulePathIndex].pathNumber,\n this.productionSchedule.coloredYarnSets[productionScheduleColoredYarnSetIndex]\n )\n ) {\n this.openAlertDialogForNotEnoughWidth();\n }\n }\n }\n\n public onDraggedProductionScheduleItemOrProductionSchedulePathEntersProductionSchedulePath(event: any, productionScheduleColoredYarnSetIndex: number, productionSchedulePathIndex?: number): void {\n event.preventDefault();\n\n const canShowDropIndicator = this.isItemBeingDraggedAProductionSchedulePath()\n ? this.canShowPathDropIndicatorForDraggedPath(productionScheduleColoredYarnSetIndex, productionSchedulePathIndex)\n : this.canShowPathDropIndicatorForDraggedDrawing(productionScheduleColoredYarnSetIndex, productionSchedulePathIndex);\n\n if (canShowDropIndicator) {\n const target: HTMLElement = event.target as HTMLElement;\n this.renderer.addClass(target, this.classNameForDropIndicator);\n }\n }\n\n public onDraggedProductionScheduleItemOrProductionSchedulePathLeavesProductionSchedulePath(event: any): void {\n event.preventDefault();\n const target = event.target as HTMLElement;\n\n this.removeDropIndicatorClassFromElement(target);\n }\n\n public onDraggedProductionScheduleItemOrProductionSchedulePathDropsOnProductionSchedulePath(\n event: any,\n productionScheduleColoredYarnSetIndex: number,\n newProductionSchedulePathIndex: number = size(this.productionSchedule.productionSchedulePathsOfColoredYarnSets[productionScheduleColoredYarnSetIndex].productionSchedulePaths)\n ): void {\n event.preventDefault();\n const target = event.target as HTMLElement;\n\n if (includes(target.classList, this.classNameForDropIndicator)) {\n if (!this.isItemBeingDraggedAProductionSchedulePath() && this.draggedListViewItem.isNewItem) {\n this.productionSchedulePlan.addDrawingToColoredYarnSet(\n this.draggedListViewItem.listDrawing,\n this.productionSchedule.coloredYarnSets[productionScheduleColoredYarnSetIndex].startDent,\n newProductionSchedulePathIndex\n );\n } else {\n const sourceProductionSchedulePathsOfColoredYarnSet = this.productionSchedule.productionSchedulePathsOfColoredYarnSets[this.draggedListViewItem.productionScheduleColoredYarnSetIndex];\n const sourceProductionSchedulePath = sourceProductionSchedulePathsOfColoredYarnSet.productionSchedulePaths[this.draggedListViewItem.productionSchedulePathIndex];\n const sourceProductionScheduleColoredYarnSet: OverviewListColoredYarnSetWithStartDent = sourceProductionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet;\n const destinationProductionScheduleColoredYarnSet: OverviewListColoredYarnSetWithStartDent =\n this.productionSchedule.productionSchedulePathsOfColoredYarnSets[productionScheduleColoredYarnSetIndex].productionScheduleColoredYarnSet;\n\n if (this.isItemBeingDraggedAProductionSchedulePath()) {\n this.productionSchedulePlan.moveProductionSchedulePathToColoredYarnSet(\n sourceProductionSchedulePath,\n sourceProductionScheduleColoredYarnSet,\n destinationProductionScheduleColoredYarnSet,\n newProductionSchedulePathIndex\n );\n } else {\n const sourceProductionSchedulePathNumber: number = sourceProductionSchedulePath.pathNumber;\n const indexInSourceProductionSchedulePath: number = this.draggedListViewItem.productionScheduleItemIndex;\n const productionScheduleItemInPathGroup = sourceProductionSchedulePath.pathGroups[indexInSourceProductionSchedulePath];\n this.productionSchedulePlan.moveProductionScheduleItemToColoredYarnSet(\n sourceProductionSchedulePathNumber,\n sourceProductionScheduleColoredYarnSet,\n destinationProductionScheduleColoredYarnSet,\n productionScheduleItemInPathGroup,\n newProductionSchedulePathIndex\n );\n }\n\n this.removeDragPreviewElement();\n }\n\n this.changedElementInfo = {\n productionScheduleColoredYarnSetIndex,\n productionSchedulePathIndex: newProductionSchedulePathIndex\n };\n\n this.draggedListViewItem = null;\n this.removeDropIndicatorClassFromElement(target);\n } else {\n const startDentOfColoredYarnSet = this.productionSchedule.productionSchedulePathsOfColoredYarnSets[productionScheduleColoredYarnSetIndex].productionScheduleColoredYarnSet.startDent;\n if (!this.productionSchedule.enoughWidthToAddProductionScheduleItemToColoredYarnSet(startDentOfColoredYarnSet, this.draggedListViewItem.listDrawing)) {\n this.openAlertDialogForNotEnoughWidth();\n }\n }\n }\n\n public onProductionScheduleItemDragStart(\n event: any,\n cellElement: HTMLElement,\n productionScheduleItemElement: HTMLElement,\n productionScheduleItem: ProductionScheduleItemInPathGroup,\n productionScheduleColoredYarnSetIndex: number,\n productionSchedulePathIndex: number,\n productionScheduleItemIndex: number\n ): void {\n const dragPreviewElementDOMRect: DOMRect = this.createDragPreviewElement(event, cellElement, productionScheduleItemElement);\n\n this.renderer.setStyle(this.dragPreviewElement, 'width', `${dragPreviewElementDOMRect.width}px`);\n this.renderer.removeStyle(this.dragPreviewElement, 'max-width');\n this.renderer.removeStyle(this.dragPreviewElement, 'min-width');\n this.renderer.appendChild(document.body, this.dragPreviewElement);\n\n let listDrawing: ListDrawing;\n\n if (!productionScheduleItem.hasOrderLine()) {\n listDrawing = new ListDrawingConfiguration(\n find(this.productionSchedule.designs, {\n id: productionScheduleItem.drawing.id\n }),\n 0,\n productionScheduleItem.quantity\n );\n } else {\n listDrawing = new ListDrawingOrderLine(\n find(this.productionSchedule.orderLines, {\n id: productionScheduleItem.orderLineId\n }),\n productionScheduleItem.quantity\n );\n }\n this.draggedListViewItem = {\n listDrawing,\n isNewItem: false,\n productionScheduleColoredYarnSetIndex,\n productionSchedulePathIndex,\n productionScheduleItemIndex\n };\n\n event.stopPropagation();\n }\n\n public onProductionSchedulePathOrProductionScheduleItemDrag(event: any): void {\n if (!isEqual(event.screenX, 0) && !isEqual(event.screenY, 0)) {\n this.renderer.setStyle(\n this.dragPreviewElement,\n 'transform',\n `translate3d(${event.x - this.productionScheduleItemCellPaddingInPx}px, ${event.y - this.productionScheduleItemHeightInPx / 2}px, 0)`\n );\n }\n }\n\n public onProductionSchedulePathOrProductionScheduleItemDragEnd(event: any): void {\n this.removeDragPreviewElement();\n this.draggedListViewItem = null;\n }\n\n public trackProductionScheduleColoredYarnSet(productionScheduleColoredYarnSetIndex: number, productionScheduleColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet): number {\n return productionScheduleColoredYarnSet.productionScheduleColoredYarnSet.coloredYarnSet.id;\n }\n\n public onProductionSchedulePathDragStart(event: any, productionSchedulePathElement: MatExpansionPanel, productionSchedulePathIndex: number, productionScheduleColoredYarnSetIndex: number): void {\n const productionSchedulePathHeaderElement: HTMLElement = document.getElementById(productionSchedulePathElement._headerId);\n const productionSchedulePathContainerElement = productionSchedulePathHeaderElement.parentElement;\n\n this.createDragPreviewElement(event, productionSchedulePathHeaderElement, productionSchedulePathContainerElement);\n\n const expandIconElement = this.dragPreviewElement.querySelector('.expand-icon');\n this.renderer.removeChild(expandIconElement.parentElement, expandIconElement);\n this.renderer.appendChild(document.body, this.dragPreviewElement);\n\n this.draggedListViewItem = {\n listDrawing: null,\n productionSchedulePathIndex,\n productionScheduleColoredYarnSetIndex,\n isNewItem: false\n };\n\n event.stopPropagation();\n }\n\n public canShowDragHandleForProductionSchedulePath(productionSchedulePath: ProductionSchedulePath): boolean {\n return this.allowProductionScheduleItemsToBeEdited && this.productionSchedulePathHasProductionScheduleItems(productionSchedulePath) && !this.productionSchedule.completingPartially;\n }\n\n public getLabelForProductionScheduleItemDrawingShape(shape: string): string {\n return shape ? FixedShape.getTranslationKeyForShape(shape, this.translate) : '-';\n }\n\n public showFinishingDetails(event: MouseEvent, productionScheduleItem: BmpProductionScheduleItemInPathGroup): void {\n this.dialogBuilderFactoryService\n .getBuilder()\n .withClass('reposition-dialog')\n .withWidth('312px')\n .withMaxHeight('100%')\n .openDialog(RepositionDialogComponent, {\n finishing: productionScheduleItem.finishing,\n component: FinishingDetailsComponent,\n sourceElement: SourceElementUtils.findSourceElementForDialog(event, 'info-balloon-container'),\n positionOfDialog: PositionOfDialog.RIGHT\n });\n }\n\n public canShowMaximumBuggyLengthWarning(productionSchedulePath: ProductionSchedulePath): boolean {\n return productionSchedulePath.totalLengthInPicks > this.buggyLengthMaxInPicks;\n }\n\n public showColorSetDetailsWithYarnConsumption(event: MouseEvent, colorList: OverviewListColoredYarnSet): void {\n if (this.hasYarnConsumptionPermission()) {\n this.yarnConsumption\n .calculateYarnConsumptionForProductionOrder(this.productionSchedule.id)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe({\n next: () => noop,\n error: (error: BackendErrorContext) => {\n if (isEqual(this.errorContextForMissingMachineQualityParameters, error.errorCode)) {\n this.showErrorDialogForBackendError();\n }\n }\n });\n event.stopPropagation();\n\n this.dialogBuilderFactoryService.getBuilder().withClass('reposition-dialog').withWidth('706px').withMaxHeight('100%').openDialog(RepositionDialogComponent, {\n showYarnConsumption: this.productionSchedule.canCalculateYarnConsumption(),\n textileData: colorList,\n component: TextileDataDetailComponent,\n sourceElement: event.target,\n positionOfDialog: PositionOfDialog.RIGHT\n });\n }\n }\n\n public hasYarnConsumptionPermission(): boolean {\n return this.currentSubscription?.hasPermission(this.viewYarnConsumption);\n }\n\n public getProductionScheduleItemStatusTranslationKey(status: ProductionScheduleItemInPathGroupStatus): string {\n return isNil(status) ? '' : `PRODUCTION_ORDER.PRODUCTION_SCHEDULE_ITEM_IN_PATH_GROUP_STATUS.${ProductionScheduleItemInPathGroupStatus[status]}`;\n }\n\n public canShowAmountProduced(productionScheduleItem: ProductionScheduleItemInPathGroup): boolean {\n return (this.productionSchedule.isPartiallyOrCompletelyExecuted() || this.productionSchedule.completingPartially) && !isNil(productionScheduleItem.amountProduced);\n }\n\n public canShowStatusAndTotalWovenHeight(): boolean {\n return this.productionSchedule.isPartiallyOrCompletelyExecuted() || this.productionSchedule.completingPartially;\n }\n\n public canDragProductionScheduleItem(isRecolored: boolean): boolean {\n return isRecolored && !this.productionSchedule.completingPartially;\n }\n\n public trackProductionScheduleItem(productionScheduleItemIndex: number, productionScheduleItem: ProductionScheduleItemInPathGroup): string {\n return productionScheduleItem.uuid;\n }\n\n public selectColumn(columnValue: string): void {\n this.selectedColumn = find(this.columns, (column: ProductionScheduleListviewColumn) => isEqual(column.value, ProductionScheduleListviewColumnType[`${columnValue}`]));\n }\n\n public isColumnVisible(columnType: ProductionScheduleListviewColumnType): boolean {\n return this.visibleColumns.some((column: ProductionScheduleListviewColumn) => isEqual(column.value, columnType));\n }\n\n public updateVisibleColumns(columns: ProductionScheduleListviewColumn[]): void {\n this.visibleColumns = columns;\n this.saveVisibleColumns();\n }\n\n public pinLeft(): void {\n if (some(this.pinnedRightColumns, (pinnedColumn: ProductionScheduleListviewColumn) => isEqual(this.selectedColumn, pinnedColumn))) {\n remove(this.pinnedRightColumns, (pinnedColumn: ProductionScheduleListviewColumn) => isEqual(this.selectedColumn, pinnedColumn));\n }\n\n this.pinnedLeftColumns.push(this.selectedColumn);\n this.visibleColumns = cloneDeep(this.visibleColumns);\n }\n\n public pinRight(): void {\n if (some(this.pinnedLeftColumns, (pinnedColumn: ProductionScheduleListviewColumn) => isEqual(this.selectedColumn, pinnedColumn))) {\n remove(this.pinnedLeftColumns, (pinnedColumn: ProductionScheduleListviewColumn) => isEqual(this.selectedColumn, pinnedColumn));\n }\n\n this.pinnedRightColumns.push(this.selectedColumn);\n this.visibleColumns = cloneDeep(this.visibleColumns);\n }\n\n public unpin(): void {\n if (some(this.pinnedRightColumns, (pinnedColumn: ProductionScheduleListviewColumn) => isEqual(this.selectedColumn, pinnedColumn))) {\n remove(this.pinnedRightColumns, (pinnedColumn: ProductionScheduleListviewColumn) => isEqual(this.selectedColumn, pinnedColumn));\n } else if (some(this.pinnedLeftColumns, (pinnedColumn: ProductionScheduleListviewColumn) => isEqual(this.selectedColumn, pinnedColumn))) {\n remove(this.pinnedLeftColumns, (pinnedColumn: ProductionScheduleListviewColumn) => isEqual(this.selectedColumn, pinnedColumn));\n }\n\n this.visibleColumns = cloneDeep(this.visibleColumns);\n }\n\n public autoSizeColumn(): void {\n this.autoSizedColumns.push(this.selectedColumn);\n\n switch (this.selectedColumn.value) {\n case ProductionScheduleListviewColumnType.NAME:\n this.setColumnSize(this.translate.instant('GENERAL.NAME'), '.name');\n break;\n case ProductionScheduleListviewColumnType.STATUS:\n this.setColumnSize(this.translate.instant('GENERAL.STATUS'), '.status');\n break;\n case ProductionScheduleListviewColumnType.QUANTITY:\n this.setColumnSize(this.translate.instant('GENERAL.QUANTITY'), '.quantity');\n break;\n case ProductionScheduleListviewColumnType.WIDTH:\n this.setColumnSize(this.translate.instant('GENERAL.DIMENSIONS.WIDTH'), '.width');\n break;\n case ProductionScheduleListviewColumnType.HEIGHT:\n this.setColumnSize(this.translate.instant('GENERAL.DIMENSIONS.HEIGHT'), '.height');\n break;\n case ProductionScheduleListviewColumnType.TOTAL_WOVEN_HEIGHT:\n this.setColumnSize(this.translate.instant('GENERAL.DIMENSIONS.TOTAL_WOVEN_HEIGHT'), '.total-woven-height');\n break;\n case ProductionScheduleListviewColumnType.COLOR_MAIN:\n this.setColumnSize(this.translate.instant('DESIGN_LIBRARY.DETAILS.COLOR_MAIN'), '.main-color');\n break;\n case ProductionScheduleListviewColumnType.COLOR_BORDER:\n this.setColumnSize(this.translate.instant('DESIGN_LIBRARY.DETAILS.COLOR_BORDER'), '.border-color');\n break;\n case ProductionScheduleListviewColumnType.FINISHING_AND_CUTBARS_LABEL:\n this.setColumnSize(this.translate.instant('PRODUCTION_ORDER.FINISHING_AND_CUTBARS_LABEL'), '.cutbars');\n break;\n case ProductionScheduleListviewColumnType.SHAPE:\n this.setColumnSize(this.translate.instant('GENERAL.SHAPE'), '.shape');\n break;\n case ProductionScheduleListviewColumnType.PRODUCTION:\n this.setColumnSize(this.translate.instant('GENERAL.PRODUCTION'), '.production');\n break;\n }\n\n this.trigger.closeMenu();\n }\n\n public autoSizeAllColumns(): void {\n this.autoSizedAll = true;\n\n each(this.visibleColumns, (column: ProductionScheduleListviewColumn) => {\n this.selectedColumn = column;\n this.autoSizeColumn();\n });\n this.trigger.closeMenu();\n }\n\n public resetColumns(): void {\n this.visibleColumns = cloneDeep(this.columns);\n this.saveVisibleColumns();\n this.pinnedLeftColumns = [];\n this.pinnedRightColumns = [];\n this.autoSizedColumns = [];\n this.autoSizedAll = false;\n\n const elementsClasses = ['.name', '.status', '.quantity', '.width', '.height', '.main-color', '.border-color', '.cutbars', '.shape', '.production'];\n\n each(elementsClasses, (elementClass: string) => {\n const elements = this.document.querySelectorAll(elementClass);\n each(elements, (element: Element) => this.renderer.setStyle(element, 'width', 'unset'));\n each(elements, (element: Element) => this.renderer.setStyle(element, 'max-width', 'unset'));\n });\n\n this.trigger.closeMenu();\n }\n\n public toggleSelectedQuantityInput(productionScheduleItem: ProductionScheduleItemInPathGroup): void {\n if (this.allowProductionScheduleItemsToBeEdited && !productionScheduleItem.drawing.repeated) {\n this.selectedProductionScheduleItem = productionScheduleItem;\n this.changeDetectorRef.detectChanges();\n this.quantityInput?.nativeElement.focus();\n }\n }\n\n public incrementQuantity(\n productionScheduleItem: ProductionScheduleItemInPathGroup,\n productionScheduleColoredYarnSetIndex: number,\n productionSchedulePathIndex: number,\n productionScheduleItemIndex: number\n ): void {\n const editableProductionScheduleItemQuantityValue =\n this.getProductionScheduleItemEditableQuantityPropertyValue(productionScheduleItem) / this.productionSchedule.getProductionScheduleItemMultiplier();\n\n if (!isNil(editableProductionScheduleItemQuantityValue)) {\n const newQuantity = editableProductionScheduleItemQuantityValue + 1;\n this.updateProductionScheduleItemEditableQuantityProperty(newQuantity, productionScheduleItem, productionScheduleColoredYarnSetIndex, productionSchedulePathIndex, productionScheduleItemIndex);\n this.editQuantity(newQuantity, productionScheduleColoredYarnSetIndex, productionSchedulePathIndex, productionScheduleItemIndex);\n }\n }\n\n public decrementQuantity(\n productionScheduleItem: ProductionScheduleItemInPathGroup,\n productionScheduleColoredYarnSetIndex: number,\n productionSchedulePathIndex: number,\n productionScheduleItemIndex: number\n ): void {\n const editableProductionScheduleItemQuantityValue =\n this.getProductionScheduleItemEditableQuantityPropertyValue(productionScheduleItem) / this.productionSchedule.getProductionScheduleItemMultiplier();\n\n if (!isNil(editableProductionScheduleItemQuantityValue) && editableProductionScheduleItemQuantityValue - 1 >= 0) {\n const newQuantity = editableProductionScheduleItemQuantityValue - 1;\n this.updateProductionScheduleItemEditableQuantityProperty(newQuantity, productionScheduleItem, productionScheduleColoredYarnSetIndex, productionSchedulePathIndex, productionScheduleItemIndex);\n this.editQuantity(newQuantity, productionScheduleColoredYarnSetIndex, productionSchedulePathIndex, productionScheduleItemIndex);\n }\n }\n\n public canShowQuantityInput(productionScheduleItem: ProductionScheduleItemInPathGroup): boolean {\n return this.selectedProductionScheduleItem?.uuid === productionScheduleItem.uuid;\n }\n\n public editQuantity(quantity: number, productionScheduleColoredYarnSetIndex: number, productionSchedulePathIndex: number, productionScheduleItemIndex: number): void {\n if (!isNil(quantity) && (quantity > 0 || (quantity >= 0 && this.productionSchedule.isPartiallyOrCompletelyExecuted()))) {\n this.createQuantityInputSubject(productionScheduleColoredYarnSetIndex, productionSchedulePathIndex, productionScheduleItemIndex);\n\n this.quantityInputSubject.next(quantity);\n }\n }\n\n public closeQualityInput(): void {\n this.selectedProductionScheduleItem = null;\n this.quantityInputSubject?.complete();\n this.quantityInputSubject = null;\n }\n\n public canExecuteActionsOnProductionScheduleItem(): boolean {\n return this.isColumnVisible(ProductionScheduleListviewColumnType.EDIT) || this.isColumnVisible(ProductionScheduleListviewColumnType.OPEN_IN_CADCAM);\n }\n\n public getProductionScheduleItemEditableQuantityPropertyValue(productionScheduleItem: ProductionScheduleItemInPathGroup): number {\n return this.productionSchedule.completingPartially\n ? productionScheduleItem.amountProduced * this.productionSchedule.getProductionScheduleItemMultiplier()\n : productionScheduleItem.quantity * this.productionSchedule.getProductionScheduleItemMultiplier();\n }\n\n private createQuantityInputSubject(productionScheduleColoredYarnSetIndex: number, productionSchedulePathIndex: number, productionScheduleItemIndex: number): void {\n if (isNil(this.quantityInputSubject)) {\n const quantityInputSubject = new Subject();\n\n this.quantityInputSubject = quantityInputSubject;\n\n this.quantityInputSubject.pipe(debounceTime(500), takeUntil(this.unSubscribeOnViewDestroy)).subscribe((quantity: number) => {\n const productionSchedulePathsOfColoredYarnSet = this.productionSchedule.productionSchedulePathsOfColoredYarnSets[productionScheduleColoredYarnSetIndex];\n const startDentOfColoredYarnSet: number = productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent;\n const productionScheduleItem = productionSchedulePathsOfColoredYarnSet.productionSchedulePaths[productionSchedulePathIndex].pathGroups[productionScheduleItemIndex];\n\n this.updateProductionScheduleItemEditableQuantityProperty(quantity, productionScheduleItem, productionScheduleColoredYarnSetIndex, productionSchedulePathIndex, productionScheduleItemIndex);\n\n this.productionSchedulePlan.editProductionScheduleItem(productionScheduleItem, productionScheduleItemIndex, productionSchedulePathIndex, startDentOfColoredYarnSet);\n });\n }\n }\n\n private saveVisibleColumns(): void {\n this.localStorage.set('visibleColumnsOnProductionScheduleListView', this.visibleColumns);\n }\n\n private setVisibleColumns(): void {\n this.columns = [\n {\n value: ProductionScheduleListviewColumnType.NAME,\n translationKey: 'GENERAL.NAME'\n },\n {\n value: ProductionScheduleListviewColumnType.STATUS,\n translationKey: 'GENERAL.STATUS'\n },\n {\n value: ProductionScheduleListviewColumnType.QUANTITY,\n translationKey: 'GENERAL.QUANTITY'\n },\n {\n value: ProductionScheduleListviewColumnType.WIDTH,\n translationKey: 'GENERAL.DIMENSIONS.WIDTH'\n },\n {\n value: ProductionScheduleListviewColumnType.HEIGHT,\n translationKey: 'GENERAL.DIMENSIONS.HEIGHT'\n },\n {\n value: ProductionScheduleListviewColumnType.TOTAL_WOVEN_HEIGHT,\n translationKey: 'GENERAL.DIMENSIONS.TOTAL_WOVEN_HEIGHT'\n },\n {\n value: ProductionScheduleListviewColumnType.COLOR_MAIN,\n translationKey: 'DESIGN_LIBRARY.DETAILS.COLOR_MAIN'\n },\n {\n value: ProductionScheduleListviewColumnType.COLOR_BORDER,\n translationKey: 'DESIGN_LIBRARY.DETAILS.COLOR_BORDER'\n },\n {\n value: ProductionScheduleListviewColumnType.FINISHING_AND_CUTBARS_LABEL,\n translationKey: 'PRODUCTION_ORDER.FINISHING_AND_CUTBARS_LABEL'\n },\n {\n value: ProductionScheduleListviewColumnType.SHAPE,\n translationKey: 'GENERAL.SHAPE'\n },\n {\n value: ProductionScheduleListviewColumnType.PRODUCTION,\n translationKey: 'GENERAL.PRODUCTION'\n },\n {\n value: ProductionScheduleListviewColumnType.EDIT,\n translationKey: 'GENERAL.ACTIONS.EDIT'\n },\n {\n value: ProductionScheduleListviewColumnType.OPEN_IN_CADCAM,\n translationKey: 'GENERAL.ACTIONS.OPEN_IN_CAD_CAM'\n }\n ];\n\n const storedVisibleColumns: ProductionScheduleListviewColumn[] = this.localStorage.get('visibleColumnsOnProductionScheduleListView');\n\n if (!this.canShowStatusAndTotalWovenHeight()) {\n remove(\n this.columns,\n (column: ProductionScheduleListviewColumn) => column.value === ProductionScheduleListviewColumnType.STATUS || column.value === ProductionScheduleListviewColumnType.TOTAL_WOVEN_HEIGHT\n );\n }\n\n if (!this.productionSchedule.isStatusAtleastProcessed()) {\n remove(this.columns, (column: ProductionScheduleListviewColumn) => column.value === ProductionScheduleListviewColumnType.OPEN_IN_CADCAM);\n }\n\n if (!this.allowProductionScheduleItemsToBeEdited) {\n remove(this.columns, (column: ProductionScheduleListviewColumn) => column.value === ProductionScheduleListviewColumnType.EDIT);\n }\n\n if (!isEmpty(storedVisibleColumns)) {\n this.visibleColumns = this.columns.filter((column: ProductionScheduleListviewColumn) =>\n storedVisibleColumns.some((storedColumn: ProductionScheduleListviewColumn) => storedColumn.value === column.value)\n );\n } else {\n this.visibleColumns = cloneDeep(this.columns);\n }\n }\n\n private setColumnSize(columnTitle: string, elementClass: string): void {\n const fontSize = 14;\n const averageCharSize = 0.7;\n const filterIconDiscountSize = 5;\n let extraWidth = 60;\n let columnSize = size(columnTitle);\n\n each(this.productionSchedule.productionSchedulePathsOfColoredYarnSets, (productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet, index: number) => {\n each(this.getProductionScheduleColoredYarnSetPathsPipe.transform(productionSchedulePathsOfColoredYarnSet, index, this.productionSchedule), (productionSchedulePath: ProductionSchedulePath) => {\n each(productionSchedulePath.pathGroups, (productionScheduleItem: ProductionScheduleItemInPathGroup) => {\n const value = this.getSizeFromValueFromColumnCell(productionScheduleItem, productionSchedulePathsOfColoredYarnSet);\n\n if (value - filterIconDiscountSize > columnSize) {\n columnSize = value;\n extraWidth = 10;\n }\n });\n });\n });\n\n const elements = this.document.querySelectorAll(elementClass);\n const width = columnSize * fontSize * averageCharSize + extraWidth;\n\n if (some(elements, (element: HTMLElement) => element.clientWidth < width)) {\n each(elements, (element: Element) => this.renderer.setStyle(element, 'width', `${width}px`));\n each(elements, (element: Element) => this.renderer.setStyle(element, 'max-width', `${width}px`));\n }\n }\n\n private getSizeFromValueFromColumnCell(productionScheduleItem: ProductionScheduleItemInPathGroup, productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet): number {\n let value;\n\n switch (this.selectedColumn.value) {\n case ProductionScheduleListviewColumnType.NAME:\n value = size(productionScheduleItem.drawing.name);\n break;\n case ProductionScheduleListviewColumnType.STATUS:\n value = size(this.translate.instant(this.getProductionScheduleItemStatusTranslationKey(productionScheduleItem.status)));\n break;\n case ProductionScheduleListviewColumnType.QUANTITY:\n value = size(toString(productionScheduleItem.quantity));\n break;\n case ProductionScheduleListviewColumnType.WIDTH:\n value = size(this.calculateDimensionsOfProductionScheduleItemPipe.transform(productionScheduleItem, this.displayTechnicalUnit, this.commercialUnit, false));\n break;\n case ProductionScheduleListviewColumnType.HEIGHT:\n value = size(this.calculateDimensionsOfProductionScheduleItemPipe.transform(productionScheduleItem, this.displayTechnicalUnit, this.commercialUnit, true));\n break;\n case ProductionScheduleListviewColumnType.TOTAL_WOVEN_HEIGHT:\n value = size(this.calculateDimensionsOfProductionScheduleItemPipe.transform(productionScheduleItem, this.displayTechnicalUnit, this.commercialUnit, true));\n break;\n case ProductionScheduleListviewColumnType.COLOR_MAIN:\n value = size(this.getProductionScheduleItemColor.transform(productionScheduleItem, productionSchedulePathsOfColoredYarnSet, true));\n break;\n case ProductionScheduleListviewColumnType.COLOR_BORDER:\n value = size(this.getProductionScheduleItemColor.transform(productionScheduleItem, productionSchedulePathsOfColoredYarnSet, false));\n break;\n case ProductionScheduleListviewColumnType.FINISHING_AND_CUTBARS_LABEL:\n if (productionScheduleItem instanceof BmpProductionScheduleItemInPathGroup && !isNil(productionScheduleItem.finishing)) {\n value = size(productionScheduleItem.finishing.nameWithVersion);\n } else {\n value = 0;\n }\n break;\n case ProductionScheduleListviewColumnType.SHAPE:\n value = size(this.translate.instant(this.getLabelForProductionScheduleItemDrawingShape(productionScheduleItem.drawing.shape)));\n break;\n case ProductionScheduleListviewColumnType.PRODUCTION:\n value = size(this.translate.instant(this.isProductionScheduleItemOnProduction(productionScheduleItem)));\n break;\n }\n\n return value;\n }\n\n private showErrorDialogForBackendError(): void {\n this.dialogBuilderFactoryService.getBuilder().openAlertDialog({\n titleText: this.translate.instant('TEXTILE_DATA.YARN_TYPE.CALCULATE_YARN_CONSUMPTION_ERROR_TITLE'),\n messageText: this.translate.instant('TEXTILE_DATA.YARN_TYPE.CALCULATE_YARN_CONSUMPTION_ERROR'),\n type: DialogType.INFORMATION\n });\n }\n\n private addProductionScheduleItemDropIndicator(productionScheduleItemElement: HTMLElement, eventY: number): void {\n if (isNil(this.productionScheduleItemDropIndicator)) {\n this.productionScheduleItemDropIndicator = this.renderer.createElement('hr');\n this.renderer.addClass(this.productionScheduleItemDropIndicator, this.classNameForDropIndicator);\n this.renderer.appendChild(document.body, this.productionScheduleItemDropIndicator);\n }\n\n const productionScheduleItemElementboundingDOMRect: DOMRect = productionScheduleItemElement.getBoundingClientRect();\n const isMouseOnBottomHalfOfRow: boolean = this.isMouseOnBottomHalfOfRow(productionScheduleItemElementboundingDOMRect, eventY);\n this.renderer.setStyle(this.productionScheduleItemDropIndicator, 'width', `${productionScheduleItemElementboundingDOMRect.width}px`);\n\n const xPosition: number = productionScheduleItemElementboundingDOMRect.left;\n let yPosition: number = productionScheduleItemElementboundingDOMRect.bottom;\n if (!isMouseOnBottomHalfOfRow) {\n yPosition = productionScheduleItemElementboundingDOMRect.top;\n }\n\n this.renderer.setStyle(this.productionScheduleItemDropIndicator, 'transform', `translate3d(${xPosition}px, ${yPosition}px, 0)`);\n }\n\n private removeProductionScheduleItemDropIndicator(): void {\n if (!isNil(this.productionScheduleItemDropIndicator)) {\n this.renderer.removeChild(document.body, this.productionScheduleItemDropIndicator);\n this.productionScheduleItemDropIndicator = null;\n }\n }\n\n private isMouseOnBottomHalfOfRow(productionScheduleItemElementboundingDOMRect: DOMRect, mouseYPosition: number): boolean {\n return mouseYPosition > productionScheduleItemElementboundingDOMRect.top + productionScheduleItemElementboundingDOMRect.height / 2;\n }\n\n private removeDropIndicatorClassFromElement(element: HTMLElement): void {\n if (includes(element.classList, this.classNameForDropIndicator)) {\n this.renderer.removeClass(element, this.classNameForDropIndicator);\n }\n }\n\n private createDragPreviewElement(event: any, baseElementForDragPreview: HTMLElement, containerElement: HTMLElement): DOMRect {\n const dragPreviewElementDOMRect: DOMRect = baseElementForDragPreview.getBoundingClientRect();\n this.dragPreviewElement = baseElementForDragPreview.cloneNode(true) as HTMLElement;\n const dummyPreview: HTMLElement = document.createElement('div');\n\n this.renderer.setStyle(dummyPreview, 'display', `none`);\n this.renderer.setStyle(this.dragPreviewElement, 'height', `${dragPreviewElementDOMRect.height}px`);\n this.renderer.setStyle(this.dragPreviewElement, 'transform', `translate3d(${dragPreviewElementDOMRect.left}px, ${dragPreviewElementDOMRect.top}px, 0)`);\n this.renderer.addClass(this.dragPreviewElement, 'drag-preview');\n this.renderer.addClass(containerElement, this.classNameForDraggedElement);\n\n event.dataTransfer.setDragImage(dummyPreview, 0, 0);\n\n return dragPreviewElementDOMRect;\n }\n\n private removeDragPreviewElement(): void {\n if (!isNil(this.dragPreviewElement)) {\n this.renderer.removeChild(this.dragPreviewElement.parentElement, this.dragPreviewElement);\n this.renderer.removeClass(document.querySelector(`.${this.classNameForDraggedElement}`), this.classNameForDraggedElement);\n this.dragPreviewElement = null;\n }\n }\n\n private isItemBeingDraggedAProductionSchedulePath(): boolean {\n return isNil(this.draggedListViewItem.listDrawing) && !isNil(this.draggedListViewItem.productionSchedulePathIndex) && !isNil(this.draggedListViewItem.productionScheduleColoredYarnSetIndex);\n }\n\n private canShowPathDropIndicatorForDraggedPath(productionScheduleColoredYarnSetIndex: number, productionSchedulePathIndex: number): boolean {\n let result = false;\n\n const isSourceColoredYarnSetDifferentFromDestinationColoredYarnSet = !isEqual(this.draggedListViewItem.productionScheduleColoredYarnSetIndex, productionScheduleColoredYarnSetIndex);\n\n if (isSourceColoredYarnSetDifferentFromDestinationColoredYarnSet) {\n const originProductionSchedulePath: ProductionSchedulePath =\n this.productionSchedule.productionSchedulePathsOfColoredYarnSets[this.draggedListViewItem.productionScheduleColoredYarnSetIndex].productionSchedulePaths[\n this.draggedListViewItem.productionSchedulePathIndex\n ];\n\n result = !some(originProductionSchedulePath.pathGroups, (pathGroup: ProductionScheduleItemInPathGroup) => {\n const startDentOfColoredYarnSet = this.productionSchedule.productionSchedulePathsOfColoredYarnSets[productionScheduleColoredYarnSetIndex].productionScheduleColoredYarnSet.startDent;\n\n return !this.productionSchedule.canAddProductionScheduleItemToColoredYarnSet(startDentOfColoredYarnSet, getListDrawingFromProductionScheduleItem(pathGroup, this.productionSchedule));\n });\n } else {\n const isSourcePathDifferentFromDestinationPath = !isEqual(productionSchedulePathIndex, this.draggedListViewItem.productionSchedulePathIndex);\n if (isSourcePathDifferentFromDestinationPath) {\n result = !isNil(productionSchedulePathIndex)\n ? !isEqual(this.draggedListViewItem.productionSchedulePathIndex, productionSchedulePathIndex - 1)\n : this.draggedListViewItem.productionSchedulePathIndex <\n size(this.productionSchedule.productionSchedulePathsOfColoredYarnSets[this.draggedListViewItem.productionScheduleColoredYarnSetIndex].productionSchedulePaths) - 1;\n }\n }\n\n return result;\n }\n\n private canShowPathDropIndicatorForDraggedDrawing(productionScheduleColoredYarnSetIndex: number, productionSchedulePathIndex: number): boolean {\n const productionSchedulePathsOfColoredYarnSet: ProductionSchedulePath[] =\n this.productionSchedule.productionSchedulePathsOfColoredYarnSets[productionScheduleColoredYarnSetIndex].productionSchedulePaths;\n const startDentOfColoredYarnSet = this.productionSchedule.productionSchedulePathsOfColoredYarnSets[productionScheduleColoredYarnSetIndex].productionScheduleColoredYarnSet.startDent;\n\n let result =\n this.productionSchedule.canAddProductionScheduleItemToColoredYarnSet(startDentOfColoredYarnSet, this.draggedListViewItem.listDrawing) && !isEmpty(productionSchedulePathsOfColoredYarnSet);\n\n if (!this.draggedListViewItem.isNewItem) {\n const originColoredYarnSetDifferentFromTargetColoredYarnSet = !isEqual(productionScheduleColoredYarnSetIndex, this.draggedListViewItem.productionScheduleColoredYarnSetIndex);\n const originPathHasMoreThanOneProductionScheduleItem: boolean =\n size(\n this.productionSchedule.productionSchedulePathsOfColoredYarnSets[this.draggedListViewItem.productionScheduleColoredYarnSetIndex].productionSchedulePaths[\n this.draggedListViewItem.productionSchedulePathIndex\n ].pathGroups\n ) > 1;\n const draggedToEndOfOriginColoredYarnSet: boolean = isNil(productionSchedulePathIndex);\n const originPathNotTheLastOfOriginColoredYarnSet: boolean =\n draggedToEndOfOriginColoredYarnSet &&\n !isEqual(\n size(this.productionSchedule.productionSchedulePathsOfColoredYarnSets[this.draggedListViewItem.productionScheduleColoredYarnSetIndex].productionSchedulePaths),\n this.draggedListViewItem.productionSchedulePathIndex + 1\n );\n const targetPathDifferentFromOriginPathAndPathBelowOrigin: boolean =\n !draggedToEndOfOriginColoredYarnSet &&\n !isEqual(productionSchedulePathIndex, this.draggedListViewItem.productionSchedulePathIndex) &&\n !isEqual(productionSchedulePathIndex, this.draggedListViewItem.productionSchedulePathIndex + 1);\n\n result =\n (result &&\n (originColoredYarnSetDifferentFromTargetColoredYarnSet ||\n originPathHasMoreThanOneProductionScheduleItem ||\n originPathNotTheLastOfOriginColoredYarnSet ||\n targetPathDifferentFromOriginPathAndPathBelowOrigin)) ||\n (!originColoredYarnSetDifferentFromTargetColoredYarnSet &&\n !originPathHasMoreThanOneProductionScheduleItem &&\n (originPathNotTheLastOfOriginColoredYarnSet || targetPathDifferentFromOriginPathAndPathBelowOrigin));\n }\n\n return result;\n }\n\n private getNewProductionScheduleItemIndex(productionScheduleItemIndex: number, productionSchedulePathIndex: number, isMouseOnBottomHalfOfRow: boolean): number {\n let newProductionScheduleItemIndex: number;\n\n const draggedToSamePath: boolean = isEqual(this.draggedListViewItem.productionSchedulePathIndex, productionSchedulePathIndex);\n\n if (isMouseOnBottomHalfOfRow) {\n newProductionScheduleItemIndex =\n this.draggedListViewItem.isNewItem || !draggedToSamePath || (draggedToSamePath && this.draggedListViewItem.productionScheduleItemIndex > productionScheduleItemIndex)\n ? productionScheduleItemIndex + 1\n : productionScheduleItemIndex;\n } else {\n newProductionScheduleItemIndex =\n draggedToSamePath && this.draggedListViewItem.productionScheduleItemIndex < productionScheduleItemIndex ? productionScheduleItemIndex - 1 : productionScheduleItemIndex;\n }\n\n return newProductionScheduleItemIndex;\n }\n\n private scrollChangedElementIntoView(productionScheduleColoredYarnSetIndex: number, productionSchedulePathIndex: number, productionScheduleItemIndex?: number): void {\n this.zone.runOutsideAngular(() => {\n setTimeout(() => {\n const changedElementIsProductionScheduleItem = !isNil(productionScheduleItemIndex);\n const isLastPath = this.productionSchedule.productionSchedulePathsOfColoredYarnSets[productionScheduleColoredYarnSetIndex].productionSchedulePaths.length === productionSchedulePathIndex + 1;\n\n let elementToScrollTo: Element = this.document.querySelectorAll(`.${this.classNameForColoredYarnSet}`)[productionScheduleColoredYarnSetIndex].querySelectorAll(`.${this.classNameForPath}`)[\n productionSchedulePathIndex\n ];\n\n if (changedElementIsProductionScheduleItem) {\n elementToScrollTo = elementToScrollTo.querySelectorAll(`.${this.classNameForProductionScheduleItem}`)[productionScheduleItemIndex];\n\n const isLastProductionScheduleItem =\n this.productionSchedule.productionSchedulePathsOfColoredYarnSets[productionScheduleColoredYarnSetIndex].productionSchedulePaths[productionSchedulePathIndex].pathGroups.length ===\n productionScheduleItemIndex + 1;\n\n if (isLastPath && isLastProductionScheduleItem) {\n const emptyPathElement = this.document.querySelectorAll(`.${this.classNameForColoredYarnSet}`)[productionScheduleColoredYarnSetIndex].querySelectorAll(`.${this.classNameForPath}`)[\n productionSchedulePathIndex\n ].nextElementSibling;\n elementToScrollTo = !isNil(emptyPathElement) ? emptyPathElement : elementToScrollTo;\n }\n } else if (!isNil(elementToScrollTo.nextElementSibling) && isLastPath) {\n elementToScrollTo = elementToScrollTo.nextElementSibling;\n }\n\n if (elementToScrollTo.getBoundingClientRect().bottom > this.listviewContainer.nativeElement.getBoundingClientRect().bottom) {\n elementToScrollTo.scrollIntoView(false);\n this.listviewContainer.nativeElement.scrollTop += 1;\n }\n }, 500);\n });\n }\n\n private getExternalApplicationLink(productionScheduleItem: ProductionScheduleItemInPathGroup): Observable {\n return this.profile\n .getExternalApplicationKey()\n .pipe(\n map(\n (externalApplicationKey: string) =>\n `txcccm://application_key:${externalApplicationKey}:${btoa(`{\"cfgVersion\":1, \"context\":\"viewEp\", \"projectId\": 0, \"epId\":${productionScheduleItem.epId}}`)}`\n )\n );\n }\n\n private updateProductionScheduleItemEditableQuantityProperty(\n value: number,\n productionScheduleItem: ProductionScheduleItemInPathGroup,\n productionScheduleColoredYarnSetIndex: number,\n productionSchedulePathIndex: number,\n productionScheduleItemIndex: number\n ): void {\n if (this.productionSchedule.completingPartially) {\n const productionSchedulePathsOfColoredYarnSet = this.initialProductionSchedule.productionSchedulePathsOfColoredYarnSets[productionScheduleColoredYarnSetIndex];\n const productionScheduleItemFromInitialProductionSchedule = productionSchedulePathsOfColoredYarnSet.productionSchedulePaths[productionSchedulePathIndex].pathGroups[productionScheduleItemIndex];\n productionScheduleItem.amountProduced = value;\n\n if (productionScheduleItemFromInitialProductionSchedule.amountProduced === value) {\n productionScheduleItem.status = ProductionScheduleItemInPathGroupStatus.NORMAL;\n } else if (value === 0) {\n productionScheduleItem.status = ProductionScheduleItemInPathGroupStatus.REMOVED;\n } else {\n productionScheduleItem.status = ProductionScheduleItemInPathGroupStatus.CHANGED;\n }\n } else {\n productionScheduleItem.quantity = Math.floor(value / this.productionSchedule.getProductionScheduleItemMultiplier());\n }\n }\n\n private openAlertDialogForNotEnoughWidth(): void {\n this.dialogBuilderFactoryService.getBuilder().openAlertDialog({\n titleText: 'PRODUCTION_ORDER.WEAVE_PLAN.WEAVE_PLAN',\n messageText: 'PRODUCTION_ORDER.WEAVE_PLAN.WARNINGS.NOT_ENOUGH_WIDTH',\n type: DialogType.INFORMATION\n });\n }\n}\n","import {Component, Inject} from '@angular/core';\nimport {MAT_DIALOG_DATA} from '@angular/material/dialog';\nimport {Router} from '@angular/router';\nimport {NavigationId} from '@application/helper/routing/navigation-id.enum';\nimport {NavigationUtils} from '@application/helper/routing/navigation-utils';\nimport {DialogData, UnitType} from '@vdw/angular-component-library';\nimport {Observable, Subject} from 'rxjs';\n\n@Component({\n templateUrl: './switch-commercial-technical-units.component.html'\n})\nexport class SwitchCommercialTechnicalUnitsCustomSettingsDialogComponent implements DialogData {\n public labelTranslationKey: string;\n public technicalDimensionsTranslationKey: string;\n public commercialDimensionsTranslationKey: string;\n public selectedUnitType: UnitType;\n public readonly unitTypes = UnitType;\n\n private readonly selectedUnitTypeChanged = new Subject();\n\n public constructor(\n @Inject(MAT_DIALOG_DATA) public data: any,\n private router: Router\n ) {\n this.labelTranslationKey = data.labelTranslationKey;\n this.technicalDimensionsTranslationKey = data.technicalDimensionsTranslationKey;\n this.commercialDimensionsTranslationKey = data.commercialDimensionsTranslationKey;\n this.selectedUnitType = data.selectedUnitType;\n }\n\n public onUnitTypeChanged(value: UnitType): void {\n this.selectedUnitType = value;\n this.selectedUnitTypeChanged.next(value);\n }\n\n public getValue(): Observable {\n return this.selectedUnitTypeChanged.asObservable();\n }\n\n public viewAllSettings(): void {\n this.router.navigateByUrl(NavigationUtils.getAbsolutePath(NavigationId.CARPET_PRODUCTION_SCHEDULE_SETTINGS));\n }\n}\n","
\n
{{ labelTranslationKey | bmsTranslate }}
\n\n
\n \n {{ technicalDimensionsTranslationKey | bmsTranslate }}\n {{ commercialDimensionsTranslationKey | bmsTranslate }}\n \n\n \n
\n
\n","import assignValue from './_assignValue.js';\nimport copyObject from './_copyObject.js';\nimport createAssigner from './_createAssigner.js';\nimport isArrayLike from './isArrayLike.js';\nimport isPrototype from './_isPrototype.js';\nimport keys from './keys.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */\nvar assign = createAssigner(function(object, source) {\n if (isPrototype(source) || isArrayLike(source)) {\n copyObject(source, keys(source), object);\n return;\n }\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n assignValue(object, key, source[key]);\n }\n }\n});\n\nexport default assign;\n","
\n
\n \n \n\n
\n\n
\n \n \n
\n
\n
\n \n
\n\n \n {{ 'GENERAL.ACTIONS.EDIT_OBJECT' | bmsTranslate: {object: 'PRODUCTION_ORDER.PATH' | bmsTranslate: {count: 2} | lowercase} }}\n \n\n \n \n \n \n\n \n \n \n\n \n \n \n {{ 'GENERAL.VIEW_MODES.DETAILVIEW' | bmsTranslate }}\n \n \n {{ 'GENERAL.VIEW_MODES.OVERVIEW' | bmsTranslate }}\n \n \n {{ 'GENERAL.VIEW_MODES.LISTVIEW' | bmsTranslate }}\n \n \n \n
\n
\n
\n \n
\n \n\n \n \n \n \n\n \n \n\n \n \n
\n
\n
\n
\n
\n\n
\n \n \n \n
\n \n

{{ 'PRODUCTION_ORDER.WEAVE_PLAN.WEAVE_PLAN_SUMMARY.WEAVE_PLAN_SUMMARY' | bmsTranslate }}

\n
\n
\n
\n
\n
\n
\n

{{ 'GENERAL.SUMMARY' | bmsTranslate }}

\n
\n \n \n \n \n \n \n
\n
\n
\n\n
\n \n \n
\n
\n
\n
\n
\n","import {AfterViewInit, ChangeDetectorRef, Component, ElementRef, EventEmitter, Inject, Input, NgZone, OnInit, Output, Renderer2, ViewChild} from '@angular/core';\nimport {MatExpansionPanel} from '@angular/material/expansion';\nimport {MatSelectChange} from '@angular/material/select';\nimport {MatSlideToggleChange} from '@angular/material/slide-toggle';\nimport {Router} from '@angular/router';\nimport {ErrorHandlers} from '@application/helper/error-handlers';\nimport {NavigationId} from '@application/helper/routing/navigation-id.enum';\nimport {NavigationUtils} from '@application/helper/routing/navigation-utils';\nimport {ProductionOrderCustomSettings} from '@domain/production-schedule/custom-settings/production-order-custom-settings';\nimport {Drawing} from '@domain/production-schedule/drawing';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionScheduleDisplay} from '@domain/production-schedule/production-schedule-display.enum';\nimport {ProductionScheduleOrderLine} from '@domain/production-schedule/production-schedule-order-line';\nimport {ProductionSchedulePhase} from '@domain/production-schedule/production-schedule-phase.enum';\nimport {PropertyValue} from '@domain/property-value';\nimport {PathWidth} from '@domain/textile-data/machine-quality/path-width';\nimport {MACHINE_QUALITIES, MachineQualities} from '@infrastructure/http/machine-quality/machine-qualities';\nimport {PRODUCTION_SCHEDULES, ProductionSchedules} from '@infrastructure/http/production-schedule/production-schedules';\nimport {ProductionScheduleBuilderPageStateManagerService} from '@infrastructure/page-state-manager/production-schedule-builder/production-schedule-builder-page-state-manager.service';\nimport {ProductionScheduleBuilderPageState} from '@infrastructure/page-state-manager/production-schedule-builder/production-schedule-builder-page-state.interface';\nimport {SwitchCommercialTechnicalUnitsCustomSettingsDialogComponent} from '@presentation/components/dialog-button/dialog-data/switch-commercial-technical-units/switch-commercial-technical-units.component';\nimport {ListDrawing} from '@presentation/components/drawing-list/list-drawing';\nimport {ListDrawingConfiguration} from '@presentation/components/drawing-list/list-drawing-configuration';\nimport {SideNavigationStateService} from '@presentation/navigation/side-navigation-state.service';\nimport {OverviewListOrderLine} from '@presentation/pages/texfab/orderbook/overview/overview-list-order-line';\nimport {ProductionScheduleBuilderSummaryComponent} from '@presentation/pages/texfab/production-schedule/add/plan/builder-summary/production-schedule-builder-summary.component';\nimport {PRODUCTION_SCHEDULE_PLAN, ProductionSchedulePlan} from '@presentation/pages/texfab/production-schedule/add/plan/production-schedule-plan';\nimport {BaseComponent, convertCommercialUnit, convertUnit, DOMUtils, TranslateService, Unit, UnitType, WINDOW} from '@vdw/angular-component-library';\nimport {assign, find, isEmpty, isEqual, isNil, map, noop, reduce, round} from 'lodash-es';\nimport {Subject} from 'rxjs';\nimport {debounceTime, distinctUntilChanged, takeUntil} from 'rxjs/operators';\n\n@Component({\n selector: 'app-production-schedule-plan',\n templateUrl: './production-schedule-plan.component.html',\n styleUrls: ['./production-schedule-plan.component.scss']\n})\nexport class ProductionSchedulePlanComponent extends BaseComponent implements OnInit, AfterViewInit {\n public static PADDING_WIDTH_IN_PX = 24;\n public static MARGIN_WIDTH_IN_PX = 16;\n\n private static readonly urlToProductionScheduleOverview = NavigationUtils.getAbsolutePath(NavigationId.CARPET_PRODUCTION_ORDER);\n\n @Input() public customSettings: ProductionOrderCustomSettings;\n @Input() public productionSchedule: ProductionSchedule;\n @Input() public lastProductionSchedulePhase: ProductionSchedulePhase;\n @Input() public isVerifyingFromConfigurePhase: boolean;\n @Input() public factorForConversionFromMillimetersToDents: number;\n @Input() public pathWidths: PathWidth[];\n @Input() public listOfMachineQualityCustomSettings: PropertyValue[];\n @Input() public preselectedOrderlineIds: number[] = [];\n\n @Output() public returnToProductionSchedulePhase: EventEmitter = new EventEmitter();\n @Output() public productionSchedulePlanChanged: EventEmitter = new EventEmitter();\n @Output() public verifiedProductionSchedule: EventEmitter<{confirmImmediately: boolean; error: boolean}> = new EventEmitter<{confirmImmediately: boolean; error: boolean}>();\n\n @ViewChild('productionScheduleBuilderSummary') public productionScheduleBuilderSummary: ProductionScheduleBuilderSummaryComponent;\n @ViewChild(MatExpansionPanel) public expansionPanel: MatExpansionPanel;\n @ViewChild('productionSchedulePlanWrapper') public productionSchedulePlanWrapper: ElementRef;\n @ViewChild('builderContainer') public builderContainer: ElementRef;\n @ViewChild('buttonsContainer') public buttonsContainer: ElementRef;\n @ViewChild('errorsAndWarningsContainer') public errorsAndWarningsContainer: ElementRef;\n @ViewChild('zoomOutContainer', {read: ElementRef}) public zoomOutContainer: ElementRef;\n @ViewChild('zoomInContainer', {read: ElementRef}) public zoomInContainer: ElementRef;\n @ViewChild('editPathsToggleContainer', {read: ElementRef}) public editPathsToggleContainer: ElementRef;\n @ViewChild('customSettingsContainer', {read: ElementRef}) public customSettingsContainer: ElementRef;\n @ViewChild('viewSelectorContainer', {read: ElementRef}) public viewSelectorContainer: ElementRef;\n @ViewChild('drawingLibrary', {read: ElementRef}) public drawingLibrary: ElementRef;\n\n public selectedProductionScheduleDisplay: ProductionScheduleDisplay = ProductionScheduleDisplay.DETAILVIEW;\n public productionScheduleDisplay = ProductionScheduleDisplay;\n public isVerifyingProductionSchedule = false;\n public buggyLengthMinInPicks: number;\n public buggyLengthMaxInPicks: number;\n public canZoomIn = true;\n public canZoomOut = true;\n public zoomLevel = 1;\n public factorForConversionFromMillimetersToPicks: number;\n public displayTechnicalUnit = true;\n public isResizing = false;\n public readonly resizerWidthInPx = 16;\n public readonly customSettingsComponent = SwitchCommercialTechnicalUnitsCustomSettingsDialogComponent;\n public readonly MIN_DRAWING_LIBRARY_WIDTH_IN_PX = 600;\n public initialDrawingLibraryWidthInPx = this.MIN_DRAWING_LIBRARY_WIDTH_IN_PX;\n public canShowWarningWithText: boolean;\n public maxWarningWidth = 44;\n public canShowSelectedItems = false;\n public readonly commercialUnit = Unit.CENTIMETER;\n\n private productionScheduleHeight = 0;\n private hasProductionScheduleLoaded = false;\n private isBuildingProductionSchedule = false;\n private _productionSchedulePhase: ProductionSchedulePhase;\n private readonly zoomFactor = 0.1;\n private zoomOutClickSubject: Subject = new Subject();\n private zoomInClickSubject: Subject = new Subject();\n private readonly defaultCustomSettingsDialogData = {\n labelTranslationKey: this.translate.instant('GENERAL.UNIT.LABEL', {object: this.translate.instant('PRODUCTION_ORDER.WEAVE_PLAN.BUILDER')}),\n technicalDimensionsTranslationKey: 'PRODUCTION_ORDER.WEAVE_PLAN.DENTS_AND_PICKS'\n };\n\n public constructor(\n @Inject(PRODUCTION_SCHEDULES) private readonly productionSchedules: ProductionSchedules,\n @Inject(MACHINE_QUALITIES) private readonly machineQualities: MachineQualities,\n @Inject(PRODUCTION_SCHEDULE_PLAN) private readonly productionSchedulePlan: ProductionSchedulePlan,\n @Inject(WINDOW) private readonly window: Window,\n private readonly router: Router,\n private readonly changeDetectorRef: ChangeDetectorRef,\n private readonly renderer: Renderer2,\n private readonly zone: NgZone,\n private readonly sideNavigationStateService: SideNavigationStateService,\n private readonly translate: TranslateService,\n private readonly productionScheduleBuilderPageStateManager: ProductionScheduleBuilderPageStateManagerService,\n private readonly elementRef: ElementRef\n ) {\n super();\n }\n\n public get productionSchedulePhase(): ProductionSchedulePhase {\n return this._productionSchedulePhase;\n }\n\n @Input()\n public set productionSchedulePhase(productionSchedulePhase: ProductionSchedulePhase) {\n this._productionSchedulePhase = productionSchedulePhase;\n\n if (productionSchedulePhase === ProductionSchedulePhase.BUILD && !this.isVerifyingFromConfigurePhase) {\n this.isBuildingProductionSchedule = true;\n this.getProductionScheduleBuilderPageState();\n setTimeout(() => {\n this.isBuildingProductionSchedule = false;\n }, 1000);\n } else if (productionSchedulePhase === ProductionSchedulePhase.VERIFY) {\n if (this.productionSchedule.isExecuted() || this.productionSchedule.completingPartially) {\n this.selectedProductionScheduleDisplay = ProductionScheduleDisplay.LISTVIEW;\n } else {\n setTimeout(() => {\n this.selectedProductionScheduleDisplay = ProductionScheduleDisplay.OVERVIEW;\n });\n }\n }\n }\n\n public ngAfterViewInit(): void {\n DOMUtils.observeResize(this.builderContainer.nativeElement)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy), distinctUntilChanged())\n .subscribe(() => this.setWarningTextVisibility());\n }\n\n public ngOnInit(): void {\n if (isEmpty(this.productionSchedule.productionSchedulePathsOfColoredYarnSets)) {\n this.productionSchedule.initProductionSchedulePathsForEachColoredYarnSet(this.productionSchedule.coloredYarnSets);\n }\n\n this.initialiseProductionSchedulePlan();\n this.subscribeToZoomInChanges();\n this.subscribeToZoomOutChanges();\n this.subscribeToNavigationStateChanges();\n }\n\n public getProductionScheduleHeight(): string {\n return `${this.productionScheduleHeight}${this.commercialUnit}`;\n }\n\n public getCustomSettingsDialogData(): any {\n return {\n ...this.defaultCustomSettingsDialogData,\n commercialDimensionsTranslationKey: this.commercialUnit,\n selectedUnitType: this.displayTechnicalUnit ? UnitType.TECHNICAL : UnitType.COMMERCIAL\n };\n }\n\n public onProductionSchedulePlanChanged(): void {\n this.productionSchedulePlanChanged.emit();\n }\n\n public changedSelectedProductionScheduleDisplay(matSelectChange: MatSelectChange): void {\n this.selectedProductionScheduleDisplay = matSelectChange.value;\n\n if (this.productionSchedulePhase === ProductionSchedulePhase.BUILD) {\n this.updateProductionScheduleBuilderPageState();\n }\n }\n\n public selectedDrawingsChanged(listDrawings: ListDrawing[]): void {\n const drawings: Drawing[] = reduce(\n listDrawings,\n (accumulatedDrawings: Drawing[], listDrawing: ListDrawing) => {\n if (listDrawing instanceof ListDrawingConfiguration) {\n accumulatedDrawings.push(listDrawing.drawing);\n }\n\n return accumulatedDrawings;\n },\n []\n );\n\n this.productionSchedulePlan.updateDrawingsAndOrderLinesOfProductionSchedule(drawings, this.productionSchedule.orderLines);\n }\n\n public canShowDetailView(): boolean {\n return isEqual(this.selectedProductionScheduleDisplay, ProductionScheduleDisplay.DETAILVIEW);\n }\n\n public canShowListView(): boolean {\n return isEqual(this.selectedProductionScheduleDisplay, ProductionScheduleDisplay.LISTVIEW) && !this.isVerifyingProductionSchedule;\n }\n\n public canShowOverview(): boolean {\n return isEqual(this.selectedProductionScheduleDisplay, ProductionScheduleDisplay.OVERVIEW);\n }\n\n public canShowProductionScheduleBuilder(): boolean {\n return (this.canShowDetailView() || this.canShowOverview()) && !this.isVerifyingProductionSchedule && this.hasProductionScheduleLoaded && !this.isBuildingProductionSchedule;\n }\n\n public canShowDrawingLibrary(): boolean {\n return !this.isProductionSchedulePhaseVerify() && !this.isVerifyingFromConfigurePhase;\n }\n\n public canEditProductionScheduleItems(): boolean {\n return this.canShowDrawingLibrary() || this.productionSchedule.completingPartially;\n }\n\n public canVerifyProductionSchedule(): boolean {\n return this.hasProductionScheduleLoaded && !this.isBuildingProductionSchedule && !this.isVerifyingProductionSchedule && !isNil(this.productionSchedule) && this.productionSchedulePlan.canVerify();\n }\n\n public verifyProductionSchedule(confirmImmediately: boolean = false): void {\n if (!this.isVerifyingProductionSchedule) {\n this.productionSchedulePlan.updateEditingPaths(false);\n this.isVerifyingProductionSchedule = true;\n this.productionSchedules\n .verifyProductionSchedule(this.productionSchedule.id as string)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe({\n next: (productionSchedule: ProductionSchedule) => {\n this.modifyProductionScheduleAfterVerify(productionSchedule);\n this.isVerifyingProductionSchedule = false;\n this.verifiedProductionSchedule.emit({confirmImmediately, error: false});\n },\n error: () => {\n this.isVerifyingProductionSchedule = false;\n this.verifiedProductionSchedule.emit({confirmImmediately, error: true});\n }\n });\n }\n }\n\n public isProductionSchedulePhaseVerify(): boolean {\n return isEqual(this.productionSchedulePhase, ProductionSchedulePhase.VERIFY) && !this.isVerifyingProductionSchedule;\n }\n\n public back(): void {\n if (this.isProductionSchedulePhaseVerify()) {\n this.productionSchedule.removePathLabelsAndNonProductionItemsFromProductionSchedulePathsOfColoredYarnSets();\n this.productionSchedulePlan.cancelOngoingRecoloring();\n this.productionSchedulePlan.initialiseProductionSchedule(this.productionSchedule).subscribe({next: noop, error: this.handleBackendError()});\n\n this.returnToProductionSchedulePhase.emit(ProductionSchedulePhase.BUILD);\n } else {\n this.returnToProductionSchedulePhase.emit(ProductionSchedulePhase.PRESELECTION);\n }\n }\n\n public canShowIsWeavePlanLoadingIcon(): boolean {\n return !this.hasProductionScheduleLoaded && !this.productionSchedule.isExecuted();\n }\n\n public canShowIsWeavePlanVerifyingIcon(): boolean {\n return (this.isVerifyingProductionSchedule || this.isVerifyingFromConfigurePhase) && this.hasProductionScheduleLoaded;\n }\n\n public canShowIsWeavePlanBuildingIcon(): boolean {\n return this.isBuildingProductionSchedule && this.hasProductionScheduleLoaded;\n }\n\n public scrollIntoWeavePlanSummary(): void {\n const expansionPanelHeader = document.getElementById(this.expansionPanel._headerId);\n\n const productionSchedulePlanWrapperRect = this.productionSchedulePlanWrapper.nativeElement.getBoundingClientRect();\n const expansionPanelHeaderRect = expansionPanelHeader.getBoundingClientRect();\n\n this.productionSchedulePlanWrapper.nativeElement.scrollTo({\n top: expansionPanelHeaderRect.top - productionSchedulePlanWrapperRect.top,\n behavior: 'smooth'\n });\n }\n\n public canShowErrorsAndWarnings(): boolean {\n return (\n !isNil(this.productionSchedule.warnings?.totalLossInPercent) ||\n this.productionSchedule.isCreelMappingApplied() ||\n (this.isProductionSchedulePhaseVerify() && (!isNil(this.productionSchedule.errors?.totalWidthTooBig) || !isNil(this.productionSchedule.errors?.totalWidthTooLittle)))\n );\n }\n\n public zoomIn(): void {\n if (this.canZoomIn) {\n this.zoomInClickSubject.next();\n }\n }\n\n public zoomOut(): void {\n if (this.canZoomOut) {\n this.zoomOutClickSubject.next();\n }\n }\n\n public onCanZoomInChanges(canZoomIn: boolean): void {\n this.canZoomIn = canZoomIn;\n this.changeDetectorRef.detectChanges();\n }\n\n public onCanZoomOutChanges(canZoomOut: boolean): void {\n this.canZoomOut = canZoomOut;\n this.changeDetectorRef.detectChanges();\n }\n\n public selectedOrderLinesChanged(selectedOrderLines: OverviewListOrderLine[]): void {\n const orderLines = map(selectedOrderLines, (selectedOrderLine: OverviewListOrderLine) => {\n return selectedOrderLine instanceof ProductionScheduleOrderLine ? selectedOrderLine : ProductionScheduleOrderLine.fromOverviewListOrderLine(selectedOrderLine);\n });\n\n this.productionSchedulePlan.updateDrawingsAndOrderLinesOfProductionSchedule(this.productionSchedule.designs, orderLines);\n }\n\n public getProductionSchedulePracticalPickDensity(): string {\n const defaultUnit: PropertyValue = find(this.listOfMachineQualityCustomSettings, ['propertyName', 'pickDensityUnit']).propertyValue;\n\n const practicalPickDensity = convertUnit({\n from: {\n value: this.productionSchedule.practicalPickDensityInPicksPerMM,\n unit: Unit.PICKS_PER_MILLIMETER\n },\n to: Unit[`${defaultUnit}`]\n });\n\n return `${round(practicalPickDensity)}${Unit[`${defaultUnit}`]}`;\n }\n\n public onResizerMouseDown(event: MouseEvent): void {\n if (event.button === 0) {\n this.isResizing = true;\n\n this.zone.runOutsideAngular(() => {\n const cancelMouseMoveListener = this.renderer.listen(this.window, 'mousemove', (mouseMoveEvent: MouseEvent) => this.onResizerMouseMove(mouseMoveEvent));\n\n const cancelMouseUpListener = this.renderer.listen(this.window, 'mouseup', () => {\n this.isResizing = false;\n this.updateProductionScheduleBuilderPageState();\n\n cancelMouseMoveListener();\n cancelMouseUpListener();\n });\n });\n }\n }\n\n public onCustomSettingsChanged(unitType: UnitType): void {\n this.displayTechnicalUnit = unitType === UnitType.TECHNICAL;\n }\n\n public onEditProductionSchedulePathsInColoredYarnSetToggle(event: MatSlideToggleChange): void {\n this.productionSchedulePlan.updateEditingPaths(event.checked);\n }\n\n private updateDrawingLibraryWidth(drawingLibraryWidthInPx: number): void {\n this.renderer.setStyle(this.drawingLibrary.nativeElement, 'width', `${drawingLibraryWidthInPx}px`);\n }\n\n private onResizerMouseMove(mouseMoveEvent: MouseEvent): void {\n if (this.isResizing) {\n this.updateDrawingLibraryWidth(mouseMoveEvent.x - this.drawingLibrary.nativeElement.getBoundingClientRect().left);\n }\n }\n\n private initialiseProductionSchedulePlan(): void {\n this.canShowSelectedItems = this.productionSchedule.hasAddedDesigns() || this.productionSchedule.hasOrderLines();\n\n this.productionSchedulePlan.initialiseProductionSchedule(this.productionSchedule).subscribe({\n next: () => {\n this.calculateProductionScheduleHeight();\n },\n error: this.handleBackendError()\n });\n\n this.machineQualities\n .getFactorForConversionFromMillimetersToPicks(this.productionSchedule.machineQuality.id)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe({\n next: (factorForConversionFromMillimetersToPicks: number) => {\n this.factorForConversionFromMillimetersToPicks = factorForConversionFromMillimetersToPicks;\n\n this.hasProductionScheduleLoaded = true;\n\n this.calculateProductionScheduleHeight();\n\n this.setBuggyLength();\n },\n error: this.handleBackendError()\n });\n\n this.productionSchedulePlan.currentUpdatedProductionSchedule.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe((productionSchedule: ProductionSchedule) => {\n if (!isNil(productionSchedule)) {\n this.productionSchedule = productionSchedule;\n this.calculateProductionScheduleHeight();\n }\n });\n\n this.productionSchedulePlan.didPatchProductionSchedulePlan.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe(() => this.calculateProductionScheduleHeight());\n }\n\n private calculateProductionScheduleHeight(): void {\n this.productionScheduleHeight = convertCommercialUnit({\n from: {\n unit: Unit.MILLIMETER,\n value: this.productionSchedule.getProductionScheduleLengthInMillimeters()\n },\n to: this.commercialUnit\n });\n }\n\n private modifyProductionScheduleAfterVerify(productionSchedule: ProductionSchedule): void {\n assign(this.productionSchedule, ProductionSchedule.modifyProductionScheduleAfterVerify(this.productionSchedule, productionSchedule));\n this.productionSchedule.machine.roleCode = productionSchedule.machine.roleCode;\n this.productionSchedulePlan.initialiseProductionSchedule(this.productionSchedule).subscribe(noop);\n }\n\n private setBuggyLength(): void {\n const {buggyLengthMin: buggyLengthMinInMM, buggyLengthMax: buggyLengthMaxInMM} = this.productionSchedule.machineQuality;\n\n if (!isNil(buggyLengthMinInMM)) {\n this.buggyLengthMinInPicks = buggyLengthMinInMM * this.factorForConversionFromMillimetersToPicks;\n }\n\n if (!isNil(buggyLengthMaxInMM)) {\n this.buggyLengthMaxInPicks = buggyLengthMaxInMM * this.factorForConversionFromMillimetersToPicks;\n }\n }\n\n private subscribeToZoomInChanges(): void {\n this.zoomInClickSubject.pipe(debounceTime(250), takeUntil(this.unSubscribeOnViewDestroy)).subscribe(() => {\n this.zoomLevel = round(this.zoomLevel + this.getZoomLevel(), 2);\n });\n }\n\n private subscribeToZoomOutChanges(): void {\n this.zoomOutClickSubject.pipe(debounceTime(250), takeUntil(this.unSubscribeOnViewDestroy)).subscribe(() => {\n this.zoomLevel = round(this.zoomLevel - this.getZoomLevel(), 2);\n });\n }\n\n private getZoomLevel(): number {\n return round(this.zoomLevel * this.zoomFactor, 2);\n }\n\n private handleBackendError(): (error: any) => void {\n return ErrorHandlers.navigateToOverviewAndThrowError(this.router, ProductionSchedulePlanComponent.urlToProductionScheduleOverview);\n }\n\n private subscribeToNavigationStateChanges(): void {\n this.sideNavigationStateService.onNavigationStateChanged.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe(() => {\n setTimeout(() => {\n this.updateProductionScheduleBuilderPageState();\n });\n });\n }\n\n private getProductionScheduleBuilderPageState(): void {\n this.productionScheduleBuilderPageStateManager\n .get()\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((productionScheduleBuilderState: ProductionScheduleBuilderPageState) => {\n if (isNil(productionScheduleBuilderState)) {\n this.updateProductionScheduleBuilderPageState();\n } else {\n this.selectedProductionScheduleDisplay = productionScheduleBuilderState.viewMode;\n this.initialDrawingLibraryWidthInPx = productionScheduleBuilderState.drawingLibraryWidthInPx;\n }\n });\n }\n\n private updateProductionScheduleBuilderPageState(): void {\n this.productionScheduleBuilderPageStateManager\n .update({viewMode: this.selectedProductionScheduleDisplay, drawingLibraryWidthInPx: this.drawingLibrary?.nativeElement.clientWidth ?? this.MIN_DRAWING_LIBRARY_WIDTH_IN_PX})\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe();\n }\n\n private setWarningTextVisibility(): void {\n this.maxWarningWidth = this.errorsAndWarningsContainer.nativeElement.offsetWidth > this.maxWarningWidth ? this.errorsAndWarningsContainer.nativeElement.offsetWidth : this.maxWarningWidth;\n\n const warningMargin = parseInt(this.errorsAndWarningsContainer.nativeElement.style.marginRight, 10);\n const zoomInWidth = (this.zoomInContainer?.nativeElement.offsetWidth ?? 0) + (this.zoomInContainer ? parseInt(this.zoomInContainer.nativeElement.style.marginRight, 10) || 0 : 0);\n const zoomOutWidth = (this.zoomOutContainer?.nativeElement.offsetWidth ?? 0) + (this.zoomOutContainer ? parseInt(this.zoomOutContainer.nativeElement.style.marginRight, 10) || 0 : 0);\n const customSettingsWidth =\n (this.customSettingsContainer?.nativeElement.offsetWidth ?? 0) + (this.customSettingsContainer ? parseInt(this.customSettingsContainer.nativeElement.style.marginRight, 10) || 0 : 0);\n const editPathsWidth =\n (this.editPathsToggleContainer?.nativeElement.offsetWidth ?? 0) + (this.editPathsToggleContainer ? parseInt(this.editPathsToggleContainer.nativeElement.style.marginRight, 10) || 0 : 0);\n\n const staticWidth = warningMargin + editPathsWidth + zoomInWidth + zoomOutWidth + customSettingsWidth + (this.viewSelectorContainer?.nativeElement.offsetWidth ?? 0);\n\n this.canShowWarningWithText = this.buttonsContainer.nativeElement.offsetWidth > staticWidth + this.maxWarningWidth;\n }\n}\n","import {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {ArrayUtils, AssertionUtils} from '@vdw/angular-component-library';\n\nexport function updateProductionSchedulePathsOfColoredYarnSets(productionSchedule: ProductionSchedule): ProductionSchedule {\n productionSchedule.productionSchedulePathsOfColoredYarnSets.forEach((productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet, indexOfColoredYarnSet: number) => {\n productionSchedulePathsOfColoredYarnSet.productionSchedulePaths.forEach((productionSchedulePath: ProductionSchedulePath, index: number) => {\n if (!AssertionUtils.isNullOrUndefined(productionSchedulePath.pathGroups) && !AssertionUtils.isEmpty(productionSchedulePath.pathGroups)) {\n productionSchedulePath.technicalWidthInDents = ArrayUtils.convertFalsyValuesToZeroAndGetMaxValue(\n Array.from(productionSchedulePath.pathGroups, (productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup) => productionScheduleItemInPathGroup.technicalDimensions.widthInDents)\n );\n }\n\n productionSchedulePath.commercialWidthInMM = ArrayUtils.convertFalsyValuesToZeroAndGetMaxValue(\n Array.from(productionSchedulePath.pathGroups, (productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup) =>\n !AssertionUtils.isNullOrUndefined(productionScheduleItemInPathGroup.commercialDimensionsInMM) ? productionScheduleItemInPathGroup.commercialDimensionsInMM.widthInMM : 0\n )\n );\n\n const isFirstPathOfProductionSchedule: boolean = indexOfColoredYarnSet === 0 && index === 0;\n if (isFirstPathOfProductionSchedule) {\n productionSchedulePath.startDent = 1;\n } else {\n const isFirstPathOfColoredYarnSet: boolean = index === 0;\n if (isFirstPathOfColoredYarnSet) {\n const previousProductionScheduleColoredYarnSetPath = productionSchedule.productionSchedulePathsOfColoredYarnSets[indexOfColoredYarnSet - 1];\n productionSchedulePath.startDent =\n previousProductionScheduleColoredYarnSetPath.productionScheduleColoredYarnSet.startDent +\n previousProductionScheduleColoredYarnSetPath.productionScheduleColoredYarnSet.technicalWidthInDents;\n } else {\n const previousProductionSchedulePath: ProductionSchedulePath = productionSchedulePathsOfColoredYarnSet.productionSchedulePaths[index - 1];\n productionSchedulePath.startDent = previousProductionSchedulePath.startDent + previousProductionSchedulePath.technicalWidthInDents;\n }\n }\n });\n });\n\n return productionSchedule;\n}\n","import {Command} from '@application/command/command';\nimport {createProductionScheduleItemInPathGroupFromDrawing, renameProductionSchedulePathsToNewPositionInColoredYarnSets} from '@application/helper/production-schedule-builder';\nimport {updateProductionSchedulePathsOfColoredYarnSets} from '@application/helper/production-schedule-builder/update-production-schedule-paths-of-colored-yarn-sets';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {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 {ListDrawingOrderLine} from '@presentation/components/drawing-list/list-drawing-order-line';\nimport {ParametersForAddingDrawingToColoredYarnSet} from '@presentation/pages/texfab/production-schedule/add/plan/parameters-for-adding-drawing-to-colored-yarn-set';\nimport {ArrayUtils, AssertionUtils} from '@vdw/angular-component-library';\n\nexport class AddDrawingToColoredYarnSetCommand implements Command {\n public execute(commandArgs: ParametersForAddingDrawingToColoredYarnSet): ProductionSchedule {\n const {productionSchedule, listDrawing, startDentOfColoredYarnSet, indexInColoredYarnSet, uuidForProductionScheduleInPathGroup} = commandArgs;\n\n const productionScheduleColoredYarnSet = productionSchedule.getProductionScheduleColoredYarnSetAtStartDent(startDentOfColoredYarnSet);\n const productionSchedulePathsOfColoredYarnSet = productionSchedule.getProductionSchedulePathsOfColoredYarnSetAtStartDent(startDentOfColoredYarnSet);\n\n const productionScheduleItemInPathGroup = createProductionScheduleItemInPathGroupFromDrawing(\n listDrawing instanceof ListDrawingOrderLine ? null : productionSchedule.finishing,\n listDrawing,\n productionSchedule.machineQuality\n );\n if (!AssertionUtils.isNullOrUndefined(uuidForProductionScheduleInPathGroup)) {\n productionScheduleItemInPathGroup.adjustUuid(uuidForProductionScheduleInPathGroup);\n }\n\n const commercialWidthInMM = productionScheduleItemInPathGroup?.commercialDimensionsInMM?.widthInMM;\n\n const newProductionSchedulePath: ProductionSchedulePath = new ProductionSchedulePath(\n null,\n null,\n commercialWidthInMM,\n productionScheduleItemInPathGroup.technicalDimensions.widthInDents,\n [productionScheduleItemInPathGroup],\n null,\n null,\n null\n );\n\n if (AssertionUtils.isNullOrUndefined(indexInColoredYarnSet)) {\n this.addPathToEndOfColoredYarnSet(productionSchedulePathsOfColoredYarnSet, newProductionSchedulePath, productionScheduleColoredYarnSet);\n } else {\n this.addPathGivenPositionInColoredYarnSet(productionSchedulePathsOfColoredYarnSet, indexInColoredYarnSet, newProductionSchedulePath);\n }\n\n renameProductionSchedulePathsToNewPositionInColoredYarnSets(productionSchedule);\n\n return updateProductionSchedulePathsOfColoredYarnSets(productionSchedule);\n }\n\n private addPathGivenPositionInColoredYarnSet(\n productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet,\n indexInColoredYarnSet: number,\n newProductionSchedulePath: ProductionSchedulePath\n ): void {\n const totalWidthInDentsOfProductionSchedulePaths = ArrayUtils.sum(\n Array.from(\n productionSchedulePathsOfColoredYarnSet.productionSchedulePaths.slice(0, indexInColoredYarnSet),\n (productionSchedulePath: ProductionSchedulePath) => productionSchedulePath.technicalWidthInDents\n )\n );\n\n newProductionSchedulePath.startDent = totalWidthInDentsOfProductionSchedulePaths + 1;\n\n productionSchedulePathsOfColoredYarnSet.productionSchedulePaths.splice(indexInColoredYarnSet, 0, newProductionSchedulePath);\n }\n\n private addPathToEndOfColoredYarnSet(\n productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet,\n newProductionSchedulePath: ProductionSchedulePath,\n productionScheduleColoredYarnSet: OverviewListColoredYarnSetWithStartDent\n ): void {\n const totalWidthInDentsOfProductionSchedulePaths = ArrayUtils.sum(\n Array.from(productionSchedulePathsOfColoredYarnSet.productionSchedulePaths, (productionSchedulePath: ProductionSchedulePath) => productionSchedulePath.technicalWidthInDents)\n );\n\n newProductionSchedulePath.startDent =\n totalWidthInDentsOfProductionSchedulePaths === 0 ? productionScheduleColoredYarnSet.startDent : totalWidthInDentsOfProductionSchedulePaths + productionScheduleColoredYarnSet.startDent + 1;\n\n productionSchedulePathsOfColoredYarnSet.productionSchedulePaths.push(newProductionSchedulePath);\n }\n}\n","import {Command} from '@application/command/command';\nimport {createProductionScheduleItemInPathGroupFromDrawing} from '@application/helper/production-schedule-builder/create-production-schedule-item-in-path-group-from-drawing';\nimport {updateProductionSchedulePathsOfColoredYarnSets} from '@application/helper/production-schedule-builder/update-production-schedule-paths-of-colored-yarn-sets';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {ListDrawingOrderLine} from '@presentation/components/drawing-list/list-drawing-order-line';\nimport {ParametersForAddingDrawingToProductionSchedulePath} from '@presentation/pages/texfab/production-schedule/add/plan/parameters-for-adding-drawing-to-production-schedule-path';\nimport {isNil} from 'lodash-es';\n\nexport class AddDrawingToProductionSchedulePathCommand implements Command {\n public execute(actionArgs: ParametersForAddingDrawingToProductionSchedulePath): ProductionSchedule {\n const {productionSchedule, listDrawing, indexInProductionSchedulePath, productionSchedulePathNumber, startDentOfColoredYarnSet, uuidForProductionScheduleInPathGroup} = actionArgs;\n const productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet = productionSchedule.getProductionSchedulePathsOfColoredYarnSetAtStartDent(startDentOfColoredYarnSet);\n const productionSchedulePath: ProductionSchedulePath = productionSchedulePathsOfColoredYarnSet.getProductionSchedulePath(productionSchedulePathNumber);\n\n const productionScheduleItemInPathGroup = createProductionScheduleItemInPathGroupFromDrawing(\n listDrawing instanceof ListDrawingOrderLine ? null : productionSchedule.finishing,\n listDrawing,\n productionSchedule.machineQuality\n );\n if (!isNil(uuidForProductionScheduleInPathGroup)) {\n productionScheduleItemInPathGroup.adjustUuid(uuidForProductionScheduleInPathGroup);\n }\n\n if (isNil(indexInProductionSchedulePath)) {\n productionSchedulePath.pathGroups.push(productionScheduleItemInPathGroup);\n } else {\n productionSchedulePath.pathGroups.splice(indexInProductionSchedulePath, 0, productionScheduleItemInPathGroup);\n }\n\n return updateProductionSchedulePathsOfColoredYarnSets(productionSchedule);\n }\n}\n","import {Command} from '@application/command/command';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ParametersForEditingProductionScheduleItem} from '@presentation/pages/texfab/production-schedule/add/plan/parameters-for-editing-production-schedule-item';\n\nexport class EditProductionScheduleItemCommand implements Command {\n public execute(commandArgs: ParametersForEditingProductionScheduleItem): ProductionSchedule {\n const {productionSchedule, productionScheduleItemInPathGroup, productionScheduleItemInPathGroupIndex, productionSchedulePathIndex, startDentOfColoredYarnSet} = commandArgs;\n\n const productionSchedulePathsOfColoredYarnSet = productionSchedule.getProductionSchedulePathsOfColoredYarnSetAtStartDent(startDentOfColoredYarnSet);\n const productionSchedulePath = productionSchedulePathsOfColoredYarnSet.getProductionSchedulePathAt(productionSchedulePathIndex);\n productionSchedulePath.setProductionScheduleItemInPathGroupAt(productionScheduleItemInPathGroupIndex, productionScheduleItemInPathGroup);\n\n return productionSchedule;\n }\n}\n","export enum LoadingState {\n DONE,\n BUSY\n}\n","import {BmpProductionScheduleItemInPathGroup} from '@domain/production-schedule/bmp-production-schedule-item-in-path-group';\nimport {DrawingType} from '@domain/production-schedule/drawing-type.enum';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {NotImplementedError} from '@vdw/angular-component-library';\n\nexport function applyChangesToNewProductionScheduleItemInPathGroup(\n newProductionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup,\n productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup\n): void {\n newProductionScheduleItemInPathGroup.adjustQuantityOfDrawingsInPathGroup(productionScheduleItemInPathGroup.quantity);\n newProductionScheduleItemInPathGroup.commercialDimensionsInMM = productionScheduleItemInPathGroup.commercialDimensionsInMM;\n newProductionScheduleItemInPathGroup.technicalDimensions = productionScheduleItemInPathGroup.technicalDimensions;\n\n switch (productionScheduleItemInPathGroup.drawing.drawingType) {\n case DrawingType.EP:\n throw new NotImplementedError();\n case DrawingType.BMP:\n const bmpProductionScheduleItemInPathGroup: BmpProductionScheduleItemInPathGroup = newProductionScheduleItemInPathGroup as BmpProductionScheduleItemInPathGroup;\n bmpProductionScheduleItemInPathGroup.changeFinishing((productionScheduleItemInPathGroup as BmpProductionScheduleItemInPathGroup).finishing);\n break;\n }\n}\n","import {Command} from '@application/command/command';\nimport {updateProductionSchedulePathsOfColoredYarnSets} from '@application/helper/production-schedule-builder/update-production-schedule-paths-of-colored-yarn-sets';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {ParametersForRemovingProductionSchedulePath} from '@presentation/pages/texfab/production-schedule/add/plan/parameters-for-removing-production-schedule-path';\nimport {remove} from 'lodash-es';\n\nexport class RemoveProductionSchedulePathCommand implements Command {\n public execute(commandArgs: ParametersForRemovingProductionSchedulePath): ProductionSchedule {\n const {productionSchedule, productionSchedulePathNumber, startDentOfColoredYarnSet} = commandArgs;\n\n const productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet = productionSchedule.getProductionSchedulePathsOfColoredYarnSetAtStartDent(startDentOfColoredYarnSet);\n\n remove(productionSchedulePathsOfColoredYarnSet.productionSchedulePaths, ['pathNumber', productionSchedulePathNumber]);\n return updateProductionSchedulePathsOfColoredYarnSets(productionSchedule);\n }\n}\n","import {Command} from '@application/command/command';\nimport {updateProductionSchedulePathsOfColoredYarnSets} from '@application/helper/production-schedule-builder/update-production-schedule-paths-of-colored-yarn-sets';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {ParametersForRemovingProductionScheduleItem} from '@presentation/pages/texfab/production-schedule/add/plan/parameters-for-removing-production-schedule-item';\nimport {ParametersForRemovingProductionSchedulePath} from '@presentation/pages/texfab/production-schedule/add/plan/parameters-for-removing-production-schedule-path';\nimport {RemoveProductionSchedulePathCommand} from '@presentation/pages/texfab/production-schedule/add/plan/remove-production-schedule-path-command';\nimport {indexOf, isEmpty, isEqual, remove} from 'lodash-es';\n\nexport class RemoveProductionScheduleItemCommand implements Command {\n public execute(commandArgs: ParametersForRemovingProductionScheduleItem): ProductionSchedule {\n let {productionSchedule} = commandArgs;\n const {productionScheduleItemInPathGroupUuid, productionSchedulePathNumber, startDentOfColoredYarnSet, newBuilder} = commandArgs;\n\n const productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet = productionSchedule.getProductionSchedulePathsOfColoredYarnSetAtStartDent(startDentOfColoredYarnSet);\n const productionSchedulePath: ProductionSchedulePath = productionSchedulePathsOfColoredYarnSet.getProductionSchedulePath(productionSchedulePathNumber);\n const productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup = productionSchedulePath.getProductionScheduleItemInPathGroup(productionScheduleItemInPathGroupUuid);\n const indexOfProductionScheduleItemInPathGroup = indexOf(productionSchedulePath.pathGroups, productionScheduleItemInPathGroup);\n\n remove(productionSchedulePath.pathGroups, (value: ProductionScheduleItemInPathGroup, index: number) => isEqual(index, indexOfProductionScheduleItemInPathGroup));\n\n if (isEmpty(productionSchedulePath.pathGroups) && !newBuilder) {\n productionSchedule = new RemoveProductionSchedulePathCommand().execute({\n productionSchedule,\n productionSchedulePathNumber: productionSchedulePath.pathNumber,\n startDentOfColoredYarnSet: productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent\n } as ParametersForRemovingProductionSchedulePath);\n }\n\n return updateProductionSchedulePathsOfColoredYarnSets(productionSchedule);\n }\n}\n","import {Command} from '@application/command/command';\nimport {updateProductionSchedulePathsOfColoredYarnSets} from '@application/helper/production-schedule-builder/update-production-schedule-paths-of-colored-yarn-sets';\nimport {getListDrawingFromProductionScheduleItem} from '@application/helper/production-schedule/get-list-drawing-from-production-schedule-item';\nimport {BmpProductionScheduleItemInPathGroup} from '@domain/production-schedule/bmp-production-schedule-item-in-path-group';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {AddDrawingToColoredYarnSetCommand} from '@presentation/pages/texfab/production-schedule/add/plan/add-drawing-to-colored-yarn-set-command';\nimport {applyChangesToNewProductionScheduleItemInPathGroup} from '@presentation/pages/texfab/production-schedule/add/plan/apply-changes-to-new-production-schedule-item-in-path-group';\nimport {EditProductionScheduleItemCommand} from '@presentation/pages/texfab/production-schedule/add/plan/edit-production-schedule-item-command';\nimport {ParametersForMovingProductionScheduleItemToColoredYarnSet} from '@presentation/pages/texfab/production-schedule/add/plan/parameters-for-moving-production-schedule-item-to-colored-yarn-set';\nimport {RemoveProductionScheduleItemCommand} from '@presentation/pages/texfab/production-schedule/add/plan/remove-production-schedule-item-command';\nimport {findIndex, last} from 'lodash-es';\n\nexport class MoveProductionScheduleItemToColoredYarnSetCommand implements Command {\n public execute(commandArgs: ParametersForMovingProductionScheduleItemToColoredYarnSet): ProductionSchedule {\n let {productionSchedule} = commandArgs;\n\n const {sourceProductionSchedulePathNumber, startDentOfSourceColoredYarnSet, startDentOfDestinationColoredYarnSet, dpi, indexInColoredYarnSet, productionScheduleItemInPathGroup} = commandArgs;\n\n const sourceProductionSchedulePathsOfColoredYarnSet = productionSchedule.getProductionSchedulePathsOfColoredYarnSetAtStartDent(startDentOfSourceColoredYarnSet);\n const sourceProductionSchedulePath: ProductionSchedulePath = sourceProductionSchedulePathsOfColoredYarnSet.getProductionSchedulePath(sourceProductionSchedulePathNumber);\n\n productionSchedule = new RemoveProductionScheduleItemCommand().execute({\n productionSchedule,\n productionScheduleItemInPathGroupUuid: productionScheduleItemInPathGroup.uuid,\n productionSchedulePathNumber: sourceProductionSchedulePath.pathNumber,\n startDentOfColoredYarnSet: sourceProductionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent\n });\n\n productionSchedule = new AddDrawingToColoredYarnSetCommand().execute({\n productionSchedule,\n listDrawing: getListDrawingFromProductionScheduleItem(productionScheduleItemInPathGroup, productionSchedule),\n startDentOfColoredYarnSet: startDentOfDestinationColoredYarnSet,\n dpi,\n uuidForProductionScheduleInPathGroup: productionScheduleItemInPathGroup.uuid,\n indexInColoredYarnSet\n });\n\n const destinationProductionSchedulePathsOfColoredYarnSet = productionSchedule.getProductionSchedulePathsOfColoredYarnSetAtStartDent(startDentOfDestinationColoredYarnSet);\n\n const productionSchedulePath = destinationProductionSchedulePathsOfColoredYarnSet.getProductionSchedulePathForProductionScheduleItem(productionScheduleItemInPathGroup);\n\n const productionSchedulePathIndex = findIndex(destinationProductionSchedulePathsOfColoredYarnSet.productionSchedulePaths, productionSchedulePath);\n\n const newProductionScheduleItemInPathGroup = last(productionSchedulePath.pathGroups);\n\n if (sourceProductionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.isEqual(destinationProductionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet)) {\n newProductionScheduleItemInPathGroup.recolorDrawing({\n imageData: productionScheduleItemInPathGroup.drawing.image.data,\n commercialDimensionsInMM: productionScheduleItemInPathGroup.commercialDimensionsInMM,\n mainColorPosition: productionScheduleItemInPathGroup.mainColorPosition,\n borderColorPosition: productionScheduleItemInPathGroup.borderColorPosition,\n finishing: productionScheduleItemInPathGroup instanceof BmpProductionScheduleItemInPathGroup ? productionScheduleItemInPathGroup.finishing : null,\n mappingForDesign: productionScheduleItemInPathGroup.drawing.mappingForDesign\n });\n }\n\n applyChangesToNewProductionScheduleItemInPathGroup(newProductionScheduleItemInPathGroup, productionScheduleItemInPathGroup);\n\n const productionScheduleItemInPathGroupIndex = findIndex(last(destinationProductionSchedulePathsOfColoredYarnSet.productionSchedulePaths).pathGroups, productionScheduleItemInPathGroup);\n\n return updateProductionSchedulePathsOfColoredYarnSets(\n new EditProductionScheduleItemCommand().execute({\n productionSchedule,\n productionScheduleItemInPathGroup,\n productionScheduleItemInPathGroupIndex,\n productionSchedulePathIndex,\n startDentOfColoredYarnSet: startDentOfDestinationColoredYarnSet\n })\n );\n }\n}\n","import {Command} from '@application/command/command';\nimport {getListDrawingFromProductionScheduleItem} from '@application/helper/production-schedule/get-list-drawing-from-production-schedule-item';\nimport {BmpProductionScheduleItemInPathGroup} from '@domain/production-schedule/bmp-production-schedule-item-in-path-group';\nimport {Drawing} from '@domain/production-schedule/drawing';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {AddDrawingToProductionSchedulePathCommand} from '@presentation/pages/texfab/production-schedule/add/plan/add-drawing-to-production-schedule-path-command';\nimport {applyChangesToNewProductionScheduleItemInPathGroup} from '@presentation/pages/texfab/production-schedule/add/plan/apply-changes-to-new-production-schedule-item-in-path-group';\nimport {EditProductionScheduleItemCommand} from '@presentation/pages/texfab/production-schedule/add/plan/edit-production-schedule-item-command';\nimport {ParametersForMovingProductionScheduleItemToProductionSchedulePath} from '@presentation/pages/texfab/production-schedule/add/plan/parameters-for-moving-production-schedule-item-to-production-schedule-path';\nimport {RemoveProductionScheduleItemCommand} from '@presentation/pages/texfab/production-schedule/add/plan/remove-production-schedule-item-command';\nimport {find, findIndex} from 'lodash-es';\n\nexport class MoveProductionScheduleItemToProductionSchedulePathCommand implements Command {\n public execute(commandArgs: ParametersForMovingProductionScheduleItemToProductionSchedulePath): ProductionSchedule {\n let {productionSchedule, productionScheduleItemInPathGroup} = commandArgs;\n const {\n indexInDestinationProductionSchedulePath,\n startDentOfSourceColoredYarnSet,\n sourceProductionSchedulePathNumber,\n startDentOfDestinationColoredYarnSet,\n destinationProductionSchedulePathNumber\n } = commandArgs;\n\n const recoloredDrawing: Drawing = productionScheduleItemInPathGroup.drawing;\n\n const sourceProductionSchedulePath: ProductionSchedulePath = productionSchedule.getProductionSchedulePath(sourceProductionSchedulePathNumber);\n productionScheduleItemInPathGroup = find(sourceProductionSchedulePath.pathGroups, ['uuid', productionScheduleItemInPathGroup.uuid]);\n\n productionScheduleItemInPathGroup.drawing = recoloredDrawing;\n\n productionSchedule = new RemoveProductionScheduleItemCommand().execute({\n productionSchedule,\n productionScheduleItemInPathGroupUuid: productionScheduleItemInPathGroup.uuid,\n productionSchedulePathNumber: sourceProductionSchedulePath.pathNumber,\n startDentOfColoredYarnSet: startDentOfSourceColoredYarnSet\n });\n\n let destinationProductionSchedulePath = productionSchedule.getProductionSchedulePath(destinationProductionSchedulePathNumber);\n\n productionSchedule = new AddDrawingToProductionSchedulePathCommand().execute({\n productionSchedule,\n listDrawing: getListDrawingFromProductionScheduleItem(productionScheduleItemInPathGroup, productionSchedule),\n productionSchedulePathNumber: destinationProductionSchedulePath.pathNumber,\n startDentOfColoredYarnSet: startDentOfDestinationColoredYarnSet,\n indexInProductionSchedulePath: indexInDestinationProductionSchedulePath,\n uuidForProductionScheduleInPathGroup: productionScheduleItemInPathGroup.uuid\n });\n\n const destinationProductionSchedulePathsOfColoredYarnSet = productionSchedule.getProductionSchedulePathsOfColoredYarnSetAtStartDent(startDentOfDestinationColoredYarnSet);\n destinationProductionSchedulePath = find(destinationProductionSchedulePathsOfColoredYarnSet.productionSchedulePaths, ['name', destinationProductionSchedulePath.name]);\n\n const productionSchedulePathIndex = findIndex(destinationProductionSchedulePathsOfColoredYarnSet.productionSchedulePaths, ['name', destinationProductionSchedulePath.name]);\n\n const newProductionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup = find(\n destinationProductionSchedulePathsOfColoredYarnSet.productionSchedulePaths[productionSchedulePathIndex].pathGroups,\n ['uuid', productionScheduleItemInPathGroup.uuid]\n );\n\n if (\n newProductionScheduleItemInPathGroup.canBeRecolored() &&\n productionSchedule\n .getProductionSchedulePathsOfColoredYarnSetAtStartDent(startDentOfSourceColoredYarnSet)\n .productionScheduleColoredYarnSet.isEqual(destinationProductionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet)\n ) {\n newProductionScheduleItemInPathGroup.recolorDrawing({\n imageData: productionScheduleItemInPathGroup.drawing.image.data,\n commercialDimensionsInMM: productionScheduleItemInPathGroup.commercialDimensionsInMM,\n mainColorPosition: productionScheduleItemInPathGroup.mainColorPosition,\n borderColorPosition: productionScheduleItemInPathGroup.borderColorPosition,\n finishing: productionScheduleItemInPathGroup instanceof BmpProductionScheduleItemInPathGroup ? productionScheduleItemInPathGroup.finishing : null,\n mappingForDesign: productionScheduleItemInPathGroup.drawing.mappingForDesign\n });\n }\n\n applyChangesToNewProductionScheduleItemInPathGroup(newProductionScheduleItemInPathGroup, productionScheduleItemInPathGroup);\n\n return new EditProductionScheduleItemCommand().execute({\n productionSchedule,\n productionScheduleItemInPathGroup: newProductionScheduleItemInPathGroup,\n productionScheduleItemInPathGroupIndex: indexInDestinationProductionSchedulePath,\n productionSchedulePathIndex,\n startDentOfColoredYarnSet: startDentOfDestinationColoredYarnSet\n });\n }\n}\n","import {Command} from '@application/command/command';\nimport {renameProductionSchedulePathsToNewPositionInColoredYarnSets} from '@application/helper/production-schedule-builder';\nimport {updateProductionSchedulePathsOfColoredYarnSets} from '@application/helper/production-schedule-builder/update-production-schedule-paths-of-colored-yarn-sets';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {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 {ListDrawing} from '@presentation/components/drawing-list/list-drawing';\nimport {ListDrawingOrderLine} from '@presentation/components/drawing-list/list-drawing-order-line';\nimport {ParametersForMovingProductionSchedulePathToColoredYarnSet} from '@presentation/pages/texfab/production-schedule/add/plan/parameters-for-moving-production-schedule-path-to-colored-yarn-set';\nimport {ArrayUtils, AssertionUtils} from '@vdw/angular-component-library';\nimport {concat, each, isEqual, isNil, last} from 'lodash-es';\nimport {MoveProductionScheduleItemToProductionSchedulePathCommand} from './move-production-schedule-item-to-production-schedule-path-command';\n\nexport class MoveProductionSchedulePathToColoredYarnSetCommand implements Command {\n public execute(commandArgs: ParametersForMovingProductionSchedulePathToColoredYarnSet): ProductionSchedule {\n let {productionSchedule} = commandArgs;\n const {listDrawings, startDentOfSourceColoredYarnSet, sourceProductionSchedulePathNumber, startDentOfDestinationColoredYarnSet, indexInProductionSchedulePathsOfColoredYarnSet, pathIndex} =\n commandArgs;\n\n const sourceProductionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet =\n productionSchedule.getProductionSchedulePathsOfColoredYarnSetAtStartDent(startDentOfSourceColoredYarnSet);\n const sourceProductionSchedulePath = sourceProductionSchedulePathsOfColoredYarnSet.getProductionSchedulePath(sourceProductionSchedulePathNumber);\n\n this.updateDrawingInfoOnPathGroups(sourceProductionSchedulePath, listDrawings);\n\n const destinationProductionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet =\n productionSchedule.getProductionSchedulePathsOfColoredYarnSetAtStartDent(startDentOfDestinationColoredYarnSet);\n const productionScheduleColoredYarnSet: OverviewListColoredYarnSetWithStartDent = productionSchedule.getProductionScheduleColoredYarnSetAtStartDent(\n destinationProductionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent\n );\n\n const totalWidthInDentsOfProductionSchedulePaths = ArrayUtils.sum(\n Array.from(destinationProductionSchedulePathsOfColoredYarnSet.productionSchedulePaths, (productionSchedulePath: ProductionSchedulePath) => productionSchedulePath.technicalWidthInDents)\n );\n\n const productionSchedulePathStartDent = isEqual(totalWidthInDentsOfProductionSchedulePaths, 0)\n ? productionScheduleColoredYarnSet.startDent\n : totalWidthInDentsOfProductionSchedulePaths + productionScheduleColoredYarnSet.startDent + 1;\n\n const newProductionSchedulePath = new ProductionSchedulePath('New Path', null, null, null, [], productionSchedulePathStartDent, null, null);\n\n if (isNil(indexInProductionSchedulePathsOfColoredYarnSet)) {\n destinationProductionSchedulePathsOfColoredYarnSet.productionSchedulePaths.push(newProductionSchedulePath);\n } else {\n if (AssertionUtils.isNullOrUndefined(pathIndex)) {\n destinationProductionSchedulePathsOfColoredYarnSet.productionSchedulePaths.splice(indexInProductionSchedulePathsOfColoredYarnSet, 0, newProductionSchedulePath);\n } else {\n destinationProductionSchedulePathsOfColoredYarnSet.productionSchedulePaths[pathIndex] = destinationProductionSchedulePathsOfColoredYarnSet.productionSchedulePaths.splice(\n indexInProductionSchedulePathsOfColoredYarnSet,\n 1,\n sourceProductionSchedulePath\n )[0];\n }\n }\n\n let destinationProductionSchedulePath: ProductionSchedulePath;\n\n if (AssertionUtils.isNullOrUndefined(indexInProductionSchedulePathsOfColoredYarnSet)) {\n destinationProductionSchedulePath = last(destinationProductionSchedulePathsOfColoredYarnSet.productionSchedulePaths);\n } else {\n destinationProductionSchedulePath = destinationProductionSchedulePathsOfColoredYarnSet.productionSchedulePaths[indexInProductionSchedulePathsOfColoredYarnSet];\n }\n\n if (AssertionUtils.isNullOrUndefined(pathIndex)) {\n const pathGroups = concat(sourceProductionSchedulePath.pathGroups);\n\n each(pathGroups, (productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup, index: number) => {\n productionSchedule = new MoveProductionScheduleItemToProductionSchedulePathCommand().execute({\n productionSchedule,\n sourceProductionSchedulePathNumber: sourceProductionSchedulePath.pathNumber,\n startDentOfSourceColoredYarnSet: sourceProductionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent,\n destinationProductionSchedulePathNumber: destinationProductionSchedulePath.pathNumber,\n indexInDestinationProductionSchedulePath: index,\n startDentOfDestinationColoredYarnSet: destinationProductionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent,\n productionScheduleItemInPathGroup\n });\n });\n }\n\n renameProductionSchedulePathsToNewPositionInColoredYarnSets(productionSchedule);\n\n return updateProductionSchedulePathsOfColoredYarnSets(productionSchedule);\n }\n\n private updateDrawingInfoOnPathGroups(productionSchedulePath: ProductionSchedulePath, listDrawings: ListDrawing[]): void {\n productionSchedulePath.pathGroups.forEach((productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup) => {\n const listDrawingForProductionScheduleItems = listDrawings.filter((listDrawing: ListDrawing) => {\n let id = productionScheduleItemInPathGroup.drawing.image?.id;\n if (AssertionUtils.isNullOrUndefined(id)) {\n return false;\n }\n\n if (listDrawing instanceof ListDrawingOrderLine) {\n id = `${productionScheduleItemInPathGroup.orderLineId}_${id}`;\n }\n\n return listDrawing.id === id;\n });\n\n if (!AssertionUtils.isEmpty(listDrawingForProductionScheduleItems) && !AssertionUtils.isNullOrUndefined(listDrawingForProductionScheduleItems[0].drawing)) {\n productionScheduleItemInPathGroup.drawing = listDrawingForProductionScheduleItems[0].drawing;\n }\n });\n }\n}\n","import {Drawing} from '@domain/production-schedule/drawing';\nimport {PathLabelDrawing} from '@domain/production-schedule/path-label-drawing';\nimport {ColoredYarnSetPosition} from '@domain/textile-data/creel/colored-yarn-set-position';\nimport {OverviewListColoredYarnSetWithStartDent} from '@domain/textile-data/creel/overview-list-colored-yarn-set-with-start-dent';\nimport {LoadingState} from '@presentation/pages/texfab/production-schedule/add/plan/loading-state';\nimport {isEqual, isNil} from 'lodash-es';\n\nexport interface CachedPathLabelDrawingReference {\n drawing: PathLabelDrawing;\n state: LoadingState;\n}\n\nexport class ProductionSchedulePathLabelDrawingsCache {\n public readonly pathlabelDrawingsMap: Map = new Map();\n\n public hasPathLabelDrawingBeenLoaded(drawing: Drawing, coloredYarnSetWithStartDent: OverviewListColoredYarnSetWithStartDent): boolean {\n const cachedPathLabelDrawingReference = this.getPathLabelDrawingCachedReference(drawing, coloredYarnSetWithStartDent);\n\n return !isNil(cachedPathLabelDrawingReference) && isEqual(cachedPathLabelDrawingReference.state, LoadingState.DONE);\n }\n\n public getPathLabelDrawingCachedReference(drawing: Drawing, coloredYarnSetWithStartDent: OverviewListColoredYarnSetWithStartDent): CachedPathLabelDrawingReference {\n return this.pathlabelDrawingsMap.get(this.getRecoloredPathLabelDrawingReferenceId(drawing, coloredYarnSetWithStartDent));\n }\n\n public add(cachedPathLabelDrawingReference: CachedPathLabelDrawingReference, coloredYarnSetWithStartDent: OverviewListColoredYarnSetWithStartDent): void {\n this.pathlabelDrawingsMap.set(this.getRecoloredPathLabelDrawingReferenceId(cachedPathLabelDrawingReference.drawing, coloredYarnSetWithStartDent), cachedPathLabelDrawingReference);\n }\n\n public clearNonLoadedPathLabelDrawings(): void {\n this.pathlabelDrawingsMap.forEach((value: CachedPathLabelDrawingReference, key: string) => {\n if (isEqual(value.state, LoadingState.BUSY)) {\n this.pathlabelDrawingsMap.delete(key);\n }\n });\n }\n\n private getRecoloredPathLabelDrawingReferenceId(drawing: PathLabelDrawing, {coloredYarnSet, position}: OverviewListColoredYarnSetWithStartDent): string {\n return `${drawing.image.id}_${coloredYarnSet.id}_${ColoredYarnSetPosition[position]}`;\n }\n}\n","import {Command} from '@application/command/command';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ParametersForUpdatingDrawingsAndOrderLinesOfProductionSchedule} from '@presentation/pages/texfab/production-schedule/add/plan/parameters-for-updating-drawings-and-order-lines-of-production-schedule';\n\nexport class UpdateDrawingsAndOrderLinesOfProductionScheduleCommand implements Command {\n public execute(commandArgs: ParametersForUpdatingDrawingsAndOrderLinesOfProductionSchedule): ProductionSchedule {\n const {productionSchedule, drawings, orderLines} = commandArgs;\n productionSchedule.designs = drawings;\n productionSchedule.orderLines = orderLines;\n return productionSchedule;\n }\n}\n","import {Command} from '@application/command/command';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {ParametersForRemovingProductionScheduleItems} from './parameters-for-removing-production-schedule-items';\nimport {RemoveProductionScheduleItemCommand} from './remove-production-schedule-item-command';\n\nexport class RemoveProductionScheduleItemsCommand implements Command {\n private readonly removeProductionScheduleItemCommand: RemoveProductionScheduleItemCommand;\n\n public constructor() {\n this.removeProductionScheduleItemCommand = new RemoveProductionScheduleItemCommand();\n }\n\n public execute(commandArgs: ParametersForRemovingProductionScheduleItems): ProductionSchedule {\n let {productionSchedule} = commandArgs;\n const {productionScheduleItems} = commandArgs;\n\n productionScheduleItems.forEach((productionScheduleItem: ProductionScheduleItemInPathGroup) => {\n const productionSchedulePathOfColoredYarnSet = productionSchedule.getProductionSchedulePathsOfColoredYarnSetForProductionScheduleItem(productionScheduleItem);\n const productionSchedulePath: ProductionSchedulePath = productionSchedulePathOfColoredYarnSet.getProductionSchedulePathForProductionScheduleItem(productionScheduleItem);\n\n productionSchedule = this.removeProductionScheduleItemCommand.execute({\n productionSchedule,\n productionSchedulePathNumber: productionSchedulePath.pathNumber,\n productionScheduleItemInPathGroupUuid: productionScheduleItem.uuid,\n startDentOfColoredYarnSet: productionSchedulePathOfColoredYarnSet.productionScheduleColoredYarnSet.startDent\n });\n });\n\n return productionSchedule;\n }\n}\n","import {Injectable} from '@angular/core';\nimport {Observable, Subject} from 'rxjs';\n\n@Injectable()\nexport class RecolorService {\n private readonly recolorErrorCatch = new Subject();\n\n public getRecolorErrorCatch(): Observable {\n return this.recolorErrorCatch.asObservable();\n }\n\n public setRecolorErrorCatch(): void {\n this.recolorErrorCatch.next();\n }\n}\n","import {Inject, Injectable} from '@angular/core';\nimport {BackendErrorCodeEnum} from '@application/helper/backend-error-code.enum';\nimport {OrderLinesGridService} from '@application/helper/orderbook/order-lines-grid.service';\nimport {renameProductionSchedulePathsToNewPositionInColoredYarnSets} from '@application/helper/production-schedule-builder';\nimport {updateProductionSchedulePathsOfColoredYarnSets} from '@application/helper/production-schedule-builder/update-production-schedule-paths-of-colored-yarn-sets';\nimport {getListDrawingFromProductionScheduleItem} from '@application/helper/production-schedule/get-list-drawing-from-production-schedule-item';\nimport {DimensionsInPx} from '@domain/dimensions-in-px';\nimport {BmpProductionScheduleItemInPathGroup} from '@domain/production-schedule/bmp-production-schedule-item-in-path-group';\nimport {Drawing} from '@domain/production-schedule/drawing';\nimport {DrawingRecolorInformation} from '@domain/production-schedule/drawing-recolor-information';\nimport {FinishingForProductionSchedule} from '@domain/production-schedule/finishing-for-production-schedule';\nimport {PathLabelDrawing} from '@domain/production-schedule/path-label-drawing';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {ProductionScheduleOrderLine} from '@domain/production-schedule/production-schedule-order-line';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {ProductionSchedulePhase} from '@domain/production-schedule/production-schedule-phase.enum';\nimport {TargetForListOfDrawingsEnum} from '@domain/target-for-list-of-drawings.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 {PathWidth} from '@domain/textile-data/machine-quality/path-width';\nimport {DRAWINGS, Drawings} from '@infrastructure/http/drawing/drawings';\nimport {PRODUCTION_ORDERS, ProductionOrders} from '@infrastructure/http/production-order/production-orders';\nimport {PRODUCTION_SCHEDULES, ProductionSchedules} from '@infrastructure/http/production-schedule/production-schedules';\nimport {ListDrawing} from '@presentation/components/drawing-list/list-drawing';\nimport {ListDrawingConfiguration} from '@presentation/components/drawing-list/list-drawing-configuration';\nimport {ListDrawingOrderLine} from '@presentation/components/drawing-list/list-drawing-order-line';\nimport {AddDrawingToColoredYarnSetCommand} from '@presentation/pages/texfab/production-schedule/add/plan/add-drawing-to-colored-yarn-set-command';\nimport {AddDrawingToProductionSchedulePathCommand} from '@presentation/pages/texfab/production-schedule/add/plan/add-drawing-to-production-schedule-path-command';\nimport {Zone} from '@presentation/pages/texfab/production-schedule/add/plan/builder/zone';\nimport {EditProductionScheduleItemCommand} from '@presentation/pages/texfab/production-schedule/add/plan/edit-production-schedule-item-command';\nimport {LoadingState} from '@presentation/pages/texfab/production-schedule/add/plan/loading-state';\nimport {MoveProductionScheduleItemToColoredYarnSetCommand} from '@presentation/pages/texfab/production-schedule/add/plan/move-production-schedule-item-to-colored-yarn-set-command';\nimport {MoveProductionScheduleItemToProductionSchedulePathCommand} from '@presentation/pages/texfab/production-schedule/add/plan/move-production-schedule-item-to-production-schedule-path-command';\nimport {MoveProductionSchedulePathToColoredYarnSetCommand} from '@presentation/pages/texfab/production-schedule/add/plan/move-production-schedule-path-to-colored-yarn-set-command';\nimport {ParametersForAddingDrawingToColoredYarnSet} from '@presentation/pages/texfab/production-schedule/add/plan/parameters-for-adding-drawing-to-colored-yarn-set';\nimport {ParametersForAddingDrawingToProductionSchedulePath} from '@presentation/pages/texfab/production-schedule/add/plan/parameters-for-adding-drawing-to-production-schedule-path';\nimport {ParametersForEditingProductionScheduleItem} from '@presentation/pages/texfab/production-schedule/add/plan/parameters-for-editing-production-schedule-item';\nimport {ParametersForMovingProductionScheduleItemToColoredYarnSet} from '@presentation/pages/texfab/production-schedule/add/plan/parameters-for-moving-production-schedule-item-to-colored-yarn-set';\nimport {ParametersForMovingProductionScheduleItemToProductionSchedulePath} from '@presentation/pages/texfab/production-schedule/add/plan/parameters-for-moving-production-schedule-item-to-production-schedule-path';\nimport {ParametersForMovingProductionSchedulePathToColoredYarnSet} from '@presentation/pages/texfab/production-schedule/add/plan/parameters-for-moving-production-schedule-path-to-colored-yarn-set';\nimport {ParametersForRemovingProductionScheduleItem} from '@presentation/pages/texfab/production-schedule/add/plan/parameters-for-removing-production-schedule-item';\nimport {ParametersForRemovingProductionSchedulePath} from '@presentation/pages/texfab/production-schedule/add/plan/parameters-for-removing-production-schedule-path';\nimport {ParametersForUpdatingDrawingsAndOrderLinesOfProductionSchedule} from '@presentation/pages/texfab/production-schedule/add/plan/parameters-for-updating-drawings-and-order-lines-of-production-schedule';\nimport {CachedPathLabelDrawingReference, ProductionSchedulePathLabelDrawingsCache} from '@presentation/pages/texfab/production-schedule/add/plan/production-schedule-path-label-drawings-cache';\nimport {ProductionSchedulePlan} from '@presentation/pages/texfab/production-schedule/add/plan/production-schedule-plan';\nimport {RemoveProductionScheduleItemCommand} from '@presentation/pages/texfab/production-schedule/add/plan/remove-production-schedule-item-command';\nimport {RemoveProductionSchedulePathCommand} from '@presentation/pages/texfab/production-schedule/add/plan/remove-production-schedule-path-command';\nimport {UpdateDrawingsAndOrderLinesOfProductionScheduleCommand} from '@presentation/pages/texfab/production-schedule/add/plan/update-drawings-and-order-lines-of-production-schedule-command';\nimport {AssertionUtils, BackendError, BaseComponent, DialogBuilderFactoryService, DialogType, LocalStorageService, ToastService, TranslateService} from '@vdw/angular-component-library';\nimport {cloneDeep, each, find, first, includes, isEmpty, isEqual, isNil, map, min, noop, pull, reduce, remove, size, some} from 'lodash-es';\nimport {BehaviorSubject, Observable, Observer, Subject} from 'rxjs';\nimport {finalize, takeUntil} from 'rxjs/operators';\nimport {RecolorService} from '../drawing-library/recolor.service';\nimport {ParametersForRemovingProductionScheduleItems} from './parameters-for-removing-production-schedule-items';\nimport {RemoveProductionScheduleItemsCommand} from './remove-production-schedule-items-command';\n\ninterface QueuedProductionSchedulePlanAction {\n isProcessing: boolean;\n operation: string;\n parameters: any;\n postExecute: (productionSchedule: ProductionSchedule) => ProductionSchedule;\n onSuccess?: () => void;\n}\n\ninterface QueuedProductionScheduleItemRecolor {\n parameters: {\n productionScheduleItem: ProductionScheduleItemInPathGroup;\n coloredYarnSetWithStartDent: OverviewListColoredYarnSetWithStartDent;\n };\n isRecoloring: boolean;\n\n onProductionScheduleItemRecolored(): void;\n\n onProductionScheduleItemRecoloredFailed(error: BackendError): void;\n}\n\n@Injectable()\nexport class ProductionSchedulePlanService extends BaseComponent implements ProductionSchedulePlan {\n private static readonly addDrawingToColoredYarnSetOperation: string = 'addDrawingToColoredYarnSet';\n private static readonly addDrawingToProductionSchedulePathOperation: string = 'addDrawingToProductionSchedulePath';\n private static readonly removeProductionScheduleItemOperation: string = 'removeProductionScheduleItem';\n private static readonly removeProductionScheduleItemsOperation: string = 'removeProductionScheduleItems';\n private static readonly removeProductionSchedulePathOperation: string = 'removeProductionSchedulePath';\n private static readonly editProductionScheduleItemOperation: string = 'editProductionScheduleItem';\n private static readonly moveProductionScheduleItemToProductionSchedulePathOperation: string = 'moveProductionScheduleItemToProductionSchedulePath';\n private static readonly moveProductionScheduleItemToColoredYarnSetOperation: string = 'moveProductionScheduleItemToColoredYarnSet';\n private static readonly moveProductionSchedulePathToColoredYarnSetOperation: string = 'moveProductionSchedulePathToColoredYarnSet';\n private static readonly updateDrawingsAndOrderLinesOfProductionScheduleOperation: string = 'updateDrawingsAndOrderLinesOfProductionScheduleOperation';\n\n public readonly currentUpdatedProductionSchedule: Observable;\n public readonly currentEditingPaths: Observable;\n public readonly didPatchProductionSchedulePlan: Observable;\n public readonly currentSelectedZone: Observable;\n\n private readonly productionSchedulePathLabelDrawingsCache = new ProductionSchedulePathLabelDrawingsCache();\n private productionSchedule: ProductionSchedule;\n private readonly updatedProductionScheduleSubject = new Subject();\n private readonly editingPathsSubject = new BehaviorSubject(false);\n private readonly patchProductionSchedulePlanSubject = new Subject();\n private initializeProductionScheduleSubject: Subject;\n private readonly selectedZoneSubject = new Subject();\n private readonly addDrawingToColoredYarnSetCommand = new AddDrawingToColoredYarnSetCommand();\n private readonly addDrawingToProductionSchedulePathCommand = new AddDrawingToProductionSchedulePathCommand();\n private readonly removeProductionScheduleItemCommand = new RemoveProductionScheduleItemCommand();\n private readonly removeProductionScheduleItemsCommand = new RemoveProductionScheduleItemsCommand();\n private readonly removeProductionSchedulePathCommand = new RemoveProductionSchedulePathCommand();\n private readonly editProductionScheduleItemCommand = new EditProductionScheduleItemCommand();\n private readonly moveProductionScheduleItemToProductionSchedulePathCommand = new MoveProductionScheduleItemToProductionSchedulePathCommand();\n private readonly moveProductionScheduleItemToColoredYarnSetCommand = new MoveProductionScheduleItemToColoredYarnSetCommand();\n private readonly moveProductionSchedulePathToColoredYarnSetCommand = new MoveProductionSchedulePathToColoredYarnSetCommand();\n private readonly updateDrawingsAndOrderLinesOfProductionScheduleCommand = new UpdateDrawingsAndOrderLinesOfProductionScheduleCommand();\n private hasChangesThatAreNotSaved: boolean = false;\n private factorForConversionFromMillimetersToDents: number;\n private queuedProductionSchedulePlanActions: QueuedProductionSchedulePlanAction[] = [];\n private queuedProductionScheduleItemsToRecolor: QueuedProductionScheduleItemRecolor[] = [];\n private definedProductionSchedulePlanActions = {\n addDrawingToColoredYarnSet: (parameters: ParametersForAddingDrawingToColoredYarnSet): ProductionSchedule => this.addDrawingToColoredYarnSetCommand.execute(parameters),\n addDrawingToProductionSchedulePath: (parameters: ParametersForAddingDrawingToProductionSchedulePath): ProductionSchedule => this.addDrawingToProductionSchedulePathCommand.execute(parameters),\n removeProductionScheduleItem: (parameters: ParametersForRemovingProductionScheduleItem): ProductionSchedule => this.removeProductionScheduleItemCommand.execute(parameters),\n removeProductionScheduleItems: (parameters: ParametersForRemovingProductionScheduleItems): ProductionSchedule => this.removeProductionScheduleItemsCommand.execute(parameters),\n removeProductionSchedulePath: (parameters: ParametersForRemovingProductionSchedulePath): ProductionSchedule => this.removeProductionSchedulePathCommand.execute(parameters),\n editProductionScheduleItem: (parameters: ParametersForEditingProductionScheduleItem): ProductionSchedule => this.editProductionScheduleItemCommand.execute(parameters),\n moveProductionScheduleItemToProductionSchedulePath: (parameters: ParametersForMovingProductionScheduleItemToProductionSchedulePath): ProductionSchedule =>\n this.moveProductionScheduleItemToProductionSchedulePathCommand.execute(parameters),\n moveProductionScheduleItemToColoredYarnSet: (parameters: ParametersForMovingProductionScheduleItemToColoredYarnSet): ProductionSchedule =>\n this.moveProductionScheduleItemToColoredYarnSetCommand.execute(parameters),\n moveProductionSchedulePathToColoredYarnSet: (parameters: ParametersForMovingProductionSchedulePathToColoredYarnSet): ProductionSchedule =>\n this.moveProductionSchedulePathToColoredYarnSetCommand.execute(parameters),\n updateDrawingsAndOrderLinesOfProductionScheduleOperation: (parameters: ParametersForUpdatingDrawingsAndOrderLinesOfProductionSchedule): ProductionSchedule =>\n this.updateDrawingsAndOrderLinesOfProductionScheduleCommand.execute(parameters)\n };\n\n private cancelOngoingRecoloringSubject: Subject = new Subject();\n private readonly operationsThatRequireProductionScheduleItemsToBeRecolored = [\n ProductionSchedulePlanService.addDrawingToColoredYarnSetOperation,\n ProductionSchedulePlanService.addDrawingToProductionSchedulePathOperation,\n ProductionSchedulePlanService.moveProductionScheduleItemToColoredYarnSetOperation,\n ProductionSchedulePlanService.moveProductionScheduleItemToProductionSchedulePathOperation,\n ProductionSchedulePlanService.moveProductionSchedulePathToColoredYarnSetOperation\n ];\n\n public constructor(\n @Inject(PRODUCTION_SCHEDULES) private readonly productionSchedules: ProductionSchedules,\n @Inject(PRODUCTION_ORDERS) private readonly productionOrders: ProductionOrders,\n @Inject(DRAWINGS) private readonly drawings: Drawings,\n private readonly translate: TranslateService,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n private readonly localStorageService: LocalStorageService,\n private readonly toastService: ToastService,\n private readonly recolorService: RecolorService,\n private readonly orderlinesGridService: OrderLinesGridService\n ) {\n super();\n this.currentUpdatedProductionSchedule = this.updatedProductionScheduleSubject.asObservable();\n this.currentEditingPaths = this.editingPathsSubject.asObservable();\n this.didPatchProductionSchedulePlan = this.patchProductionSchedulePlanSubject.asObservable();\n this.currentSelectedZone = this.selectedZoneSubject.asObservable();\n }\n\n public applyMeasurementsCalculationsFactor(factorForConversionFromMillimetersToDents: number): void {\n this.factorForConversionFromMillimetersToDents = factorForConversionFromMillimetersToDents;\n }\n\n public initialiseProductionSchedule(productionSchedule: ProductionSchedule): Observable {\n this.productionSchedule = cloneDeep(productionSchedule);\n this.discardUnsavedChanges();\n this.initializeProductionScheduleSubject = new Subject();\n\n this.recolorProductionScheduleIfNeeded(productionSchedule);\n\n this.dispatchNewProductionSchedule(this.productionSchedule);\n\n return this.initializeProductionScheduleSubject.asObservable();\n }\n\n public hasUnsavedChanges(newBuilder: boolean): boolean {\n if (newBuilder) {\n return !isEmpty(this.queuedProductionSchedulePlanActions) || this.hasChangesThatAreNotSaved;\n } else {\n return !isEmpty(this.queuedProductionSchedulePlanActions);\n }\n }\n\n public discardUnsavedChanges(): void {\n this.queuedProductionSchedulePlanActions = [];\n }\n\n public discardTemporarySavedChanges(): void {\n if (!AssertionUtils.isNullOrUndefined(this.productionSchedule?.id)) {\n this.productionSchedules.cancelTemporarySavedChanges(this.productionSchedule.id.toString()).pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe();\n }\n }\n\n public dispatchNewProductionSchedule(productionSchedule: ProductionSchedule): void {\n this.updatedProductionScheduleSubject.next(productionSchedule);\n }\n\n public addDrawingToColoredYarnSet(listDrawing: ListDrawing, startDent: number, indexInColoredYarnSet?: number): Observable {\n let productionSchedulePath = new Subject();\n\n this.selectDrawingOrOrderLineIfNotAlreadySelected(listDrawing);\n\n this.queuedProductionSchedulePlanActions.push({\n isProcessing: false,\n operation: ProductionSchedulePlanService.addDrawingToColoredYarnSetOperation,\n parameters: {\n listDrawing,\n startDentOfColoredYarnSet: startDent,\n indexInColoredYarnSet,\n dpi: this.localStorageService.get('dpi')\n } as ParametersForAddingDrawingToColoredYarnSet,\n postExecute: (productionSchedule: ProductionSchedule) => {\n setTimeout(() => {\n productionSchedulePath.next(\n productionSchedule.productionSchedulePathsOfColoredYarnSets\n .find((productionSchedulePathsOfColoredYarnSets: ProductionSchedulePathsOfColoredYarnSet) => {\n return productionSchedulePathsOfColoredYarnSets.productionScheduleColoredYarnSet.startDent === startDent;\n })\n .productionSchedulePaths.at(-1)\n );\n });\n\n return renameProductionSchedulePathsToNewPositionInColoredYarnSets(productionSchedule);\n }\n });\n\n this.dispatchNewProductionSchedule(this.getProductionScheduleWithAllRemainingActionsApplied());\n this.processFirstItemInQueuedProductionSchedulePlanActions();\n\n return productionSchedulePath.asObservable();\n }\n\n public addDrawingToProductionSchedulePath(\n listDrawing: ListDrawing,\n productionSchedulePathNumber: number,\n productionScheduleColoredYarnSet: OverviewListColoredYarnSetWithStartDent,\n indexInProductionSchedulePath?: number\n ): Observable {\n let productionSchedulePath = new Subject();\n\n this.selectDrawingOrOrderLineIfNotAlreadySelected(listDrawing);\n\n this.queuedProductionSchedulePlanActions.push({\n isProcessing: false,\n operation: ProductionSchedulePlanService.addDrawingToProductionSchedulePathOperation,\n parameters: {\n listDrawing,\n productionSchedulePathNumber,\n startDentOfColoredYarnSet: productionScheduleColoredYarnSet.startDent,\n indexInProductionSchedulePath\n } as ParametersForAddingDrawingToProductionSchedulePath,\n postExecute: (productionSchedule: ProductionSchedule) => {\n setTimeout(() => {\n productionSchedule.productionSchedulePathsOfColoredYarnSets.forEach((productionSchedulePathsOfColoredYarnSets: ProductionSchedulePathsOfColoredYarnSet) => {\n productionSchedulePathsOfColoredYarnSets.productionSchedulePaths.forEach((path: ProductionSchedulePath) => {\n if (path.pathNumber === productionSchedulePathNumber) {\n productionSchedulePath.next(path);\n }\n });\n });\n });\n\n return renameProductionSchedulePathsToNewPositionInColoredYarnSets(productionSchedule);\n }\n });\n\n this.dispatchNewProductionSchedule(this.getProductionScheduleWithAllRemainingActionsApplied());\n this.processFirstItemInQueuedProductionSchedulePlanActions();\n\n return productionSchedulePath.asObservable();\n }\n\n public manualSaveProductionSchedule(id?: string, productionSchedulePhase: ProductionSchedulePhase = null): void {\n this.disableUnsavedChanges();\n\n this.productionSchedules\n .verifyProductionSchedule(!AssertionUtils.isNullOrUndefined(id) ? id : this.productionSchedule.id.toString(), true, productionSchedulePhase)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((productionSchedule: ProductionSchedule) => this.showInfoToastAndContinue(productionSchedule));\n }\n\n public addPathLayoutTemplates(productionSchedule: ProductionSchedule): void {\n this.productionSchedules\n .setProductionSchedulePlan(productionSchedule.id as string, cloneDeep(productionSchedule.productionSchedulePathsOfColoredYarnSets), this.factorForConversionFromMillimetersToDents)\n .subscribe((patchedProductionSchedule: ProductionSchedule) => {\n productionSchedule.warnings = patchedProductionSchedule.warnings;\n productionSchedule.errors = patchedProductionSchedule.errors;\n productionSchedule.updateOrderLineQuantities();\n productionSchedule.updatePathLengths(patchedProductionSchedule);\n\n this.productionSchedule = productionSchedule;\n\n this.cleanUpAndHandleNextItemInQueue();\n });\n\n this.dispatchNewProductionSchedule(this.getProductionScheduleWithAllRemainingActionsApplied());\n }\n\n public hasNoPaths(productionSchedule: ProductionSchedule): boolean {\n return productionSchedule?.productionSchedulePathsOfColoredYarnSets?.every((productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet) => {\n return productionSchedulePathsOfColoredYarnSet?.productionSchedulePaths.length === 0;\n });\n }\n\n public removeProductionScheduleItem(productionScheduleItemInPathGroupUuid: string, productionSchedulePathNumber: number, startDentOfColoredYarnSet: number, newBuilder?: boolean): void {\n this.queuedProductionSchedulePlanActions.push({\n isProcessing: false,\n operation: ProductionSchedulePlanService.removeProductionScheduleItemOperation,\n parameters: {\n productionScheduleItemInPathGroupUuid,\n productionSchedulePathNumber,\n startDentOfColoredYarnSet,\n newBuilder\n } as ParametersForRemovingProductionScheduleItem,\n postExecute: (productionSchedule: ProductionSchedule) => renameProductionSchedulePathsToNewPositionInColoredYarnSets(productionSchedule)\n });\n\n this.dispatchNewProductionSchedule(this.getProductionScheduleWithAllRemainingActionsApplied());\n this.processFirstItemInQueuedProductionSchedulePlanActions();\n }\n\n public removeProductionScheduleItems(productionScheduleItems: ProductionScheduleItemInPathGroup[], onSuccess: () => void = (): void => null): void {\n this.queuedProductionSchedulePlanActions.push({\n isProcessing: false,\n operation: ProductionSchedulePlanService.removeProductionScheduleItemsOperation,\n parameters: {\n productionScheduleItems\n } as ParametersForRemovingProductionScheduleItems,\n postExecute: (productionSchedule: ProductionSchedule) => renameProductionSchedulePathsToNewPositionInColoredYarnSets(productionSchedule),\n onSuccess\n });\n\n this.dispatchNewProductionSchedule(this.getProductionScheduleWithAllRemainingActionsApplied());\n this.processFirstItemInQueuedProductionSchedulePlanActions();\n }\n\n public lookupCommercialWidthInPathWidths(commercialWidthInMM: number, pathWidths: PathWidth[]): number | null {\n for (const pathWidth of pathWidths) {\n if (Math.abs(pathWidth.commercialInCM * 10 - commercialWidthInMM) < 0.5) {\n return pathWidth.actualDents;\n }\n }\n return null;\n }\n\n public removeProductionSchedulePath(productionSchedulePathNumber: number, startDentOfColoredYarnSet: number): void {\n this.queuedProductionSchedulePlanActions.push({\n isProcessing: false,\n operation: ProductionSchedulePlanService.removeProductionSchedulePathOperation,\n parameters: {\n productionSchedulePathNumber,\n startDentOfColoredYarnSet\n } as ParametersForRemovingProductionSchedulePath,\n postExecute: (productionSchedule: ProductionSchedule) => renameProductionSchedulePathsToNewPositionInColoredYarnSets(productionSchedule)\n });\n\n this.dispatchNewProductionSchedule(this.getProductionScheduleWithAllRemainingActionsApplied());\n this.processFirstItemInQueuedProductionSchedulePlanActions();\n }\n\n public editProductionScheduleItem(\n productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup,\n productionScheduleItemInPathGroupIndex: number,\n productionSchedulePathIndex: number,\n startDentOfColoredYarnSet: number\n ): void {\n this.queuedProductionSchedulePlanActions.push({\n isProcessing: false,\n operation: ProductionSchedulePlanService.editProductionScheduleItemOperation,\n parameters: {\n productionScheduleItemInPathGroup,\n productionScheduleItemInPathGroupIndex,\n productionSchedulePathIndex,\n startDentOfColoredYarnSet\n },\n postExecute: (productionSchedule: ProductionSchedule) => renameProductionSchedulePathsToNewPositionInColoredYarnSets(productionSchedule)\n });\n\n this.dispatchNewProductionSchedule(this.getProductionScheduleWithAllRemainingActionsApplied());\n this.processFirstItemInQueuedProductionSchedulePlanActions();\n }\n\n public moveProductionScheduleItemToProductionSchedulePath(\n sourceProductionSchedulePathNumber: number,\n indexInSourceProductionSchedulePath: number,\n sourceProductionScheduleColoredYarnSet: OverviewListColoredYarnSetWithStartDent,\n destinationProductionSchedulePathNumber: number,\n indexInDestinationProductionSchedulePath: number,\n destinationProductionScheduleColoredYarnSet: OverviewListColoredYarnSetWithStartDent,\n productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup\n ): void {\n if (\n this.shouldMoveProductionScheduleItemToProductionSchedulePath(\n sourceProductionSchedulePathNumber,\n destinationProductionSchedulePathNumber,\n indexInSourceProductionSchedulePath,\n indexInDestinationProductionSchedulePath\n )\n ) {\n this.queuedProductionSchedulePlanActions.push({\n isProcessing: false,\n operation: ProductionSchedulePlanService.moveProductionScheduleItemToProductionSchedulePathOperation,\n parameters: {\n sourceProductionSchedulePathNumber,\n startDentOfSourceColoredYarnSet: sourceProductionScheduleColoredYarnSet.startDent,\n destinationProductionSchedulePathNumber,\n indexInDestinationProductionSchedulePath,\n startDentOfDestinationColoredYarnSet: destinationProductionScheduleColoredYarnSet.startDent,\n productionScheduleItemInPathGroup\n } as ParametersForMovingProductionScheduleItemToProductionSchedulePath,\n postExecute: (productionSchedule: ProductionSchedule) => renameProductionSchedulePathsToNewPositionInColoredYarnSets(productionSchedule)\n });\n\n this.dispatchNewProductionSchedule(this.getProductionScheduleWithAllRemainingActionsApplied());\n this.processFirstItemInQueuedProductionSchedulePlanActions();\n }\n }\n\n public disableUnsavedChanges(): void {\n this.hasChangesThatAreNotSaved = false;\n }\n\n public moveProductionScheduleItemToColoredYarnSet(\n sourceProductionSchedulePathNumber: number,\n sourceProductionScheduleColoredYarnSet: OverviewListColoredYarnSetWithStartDent,\n destinationProductionScheduleColoredYarnSet: OverviewListColoredYarnSetWithStartDent,\n productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup,\n indexInColoredYarnSet?: number\n ): void {\n this.queuedProductionSchedulePlanActions.push({\n isProcessing: false,\n operation: ProductionSchedulePlanService.moveProductionScheduleItemToColoredYarnSetOperation,\n parameters: {\n sourceProductionSchedulePathNumber,\n startDentOfSourceColoredYarnSet: sourceProductionScheduleColoredYarnSet.startDent,\n startDentOfDestinationColoredYarnSet: destinationProductionScheduleColoredYarnSet.startDent,\n productionScheduleItemInPathGroup,\n dpi: this.localStorageService.get('dpi'),\n indexInColoredYarnSet\n } as ParametersForMovingProductionScheduleItemToColoredYarnSet,\n postExecute: (productionSchedule: ProductionSchedule) => renameProductionSchedulePathsToNewPositionInColoredYarnSets(productionSchedule)\n });\n\n this.dispatchNewProductionSchedule(this.getProductionScheduleWithAllRemainingActionsApplied());\n this.processFirstItemInQueuedProductionSchedulePlanActions();\n }\n\n public moveProductionSchedulePathToColoredYarnSet(\n sourceProductionSchedulePath: ProductionSchedulePath,\n sourceProductionScheduleColoredYarnSet: OverviewListColoredYarnSetWithStartDent,\n destinationProductionScheduleColoredYarnSet: OverviewListColoredYarnSetWithStartDent,\n indexInProductionSchedulePathsOfColoredYarnSet?: number,\n pathIndex?: number\n ): void {\n const productionScheduleItemsOfProductionSchedulePath: ProductionScheduleItemInPathGroup[] = sourceProductionSchedulePath.getUniqueProductionScheduleItems();\n\n const listDrawings: ListDrawing[] = map(productionScheduleItemsOfProductionSchedulePath, (productionScheduleItem: ProductionScheduleItemInPathGroup) =>\n getListDrawingFromProductionScheduleItem(productionScheduleItem, this.productionSchedule)\n );\n\n this.queuedProductionSchedulePlanActions.push({\n isProcessing: false,\n operation: ProductionSchedulePlanService.moveProductionSchedulePathToColoredYarnSetOperation,\n parameters: {\n listDrawings,\n sourceProductionSchedulePathNumber: sourceProductionSchedulePath.pathNumber,\n startDentOfSourceColoredYarnSet: sourceProductionScheduleColoredYarnSet.startDent,\n startDentOfDestinationColoredYarnSet: destinationProductionScheduleColoredYarnSet.startDent,\n indexInProductionSchedulePathsOfColoredYarnSet,\n pathIndex\n } as ParametersForMovingProductionSchedulePathToColoredYarnSet,\n postExecute: (productionSchedule: ProductionSchedule) => renameProductionSchedulePathsToNewPositionInColoredYarnSets(productionSchedule)\n });\n\n this.dispatchNewProductionSchedule(this.getProductionScheduleWithAllRemainingActionsApplied());\n this.processFirstItemInQueuedProductionSchedulePlanActions();\n }\n\n public updateDrawingsAndOrderLinesOfProductionSchedule(drawings: Drawing[], orderLines: ProductionScheduleOrderLine[], currentProductionSchedule?: ProductionSchedule): void {\n if (!AssertionUtils.isNullOrUndefined(currentProductionSchedule)) {\n this.productionSchedule = currentProductionSchedule;\n }\n\n this.queuedProductionSchedulePlanActions.push({\n isProcessing: false,\n operation: ProductionSchedulePlanService.updateDrawingsAndOrderLinesOfProductionScheduleOperation,\n parameters: {\n productionSchedule: this.productionSchedule,\n drawings,\n orderLines\n } as ParametersForUpdatingDrawingsAndOrderLinesOfProductionSchedule,\n postExecute: (productionSchedule: ProductionSchedule) => productionSchedule\n });\n\n this.dispatchNewProductionSchedule(this.getProductionScheduleWithAllRemainingActionsApplied());\n this.processFirstItemInQueuedProductionSchedulePlanActions();\n }\n\n public updateEditingPaths(isEditingPaths: boolean): void {\n this.editingPathsSubject.next(isEditingPaths);\n }\n\n public setSelectedZone(zone: Zone): void {\n this.selectedZoneSubject.next(zone);\n }\n\n public canVerify(): boolean {\n return !this.hasUnsavedChanges(false) && this.productionSchedule?.hasAtLeastOneProductionScheduleItemPerColoredYarnSet();\n }\n\n public cancelOngoingRecoloring(): void {\n this.cancelOngoingRecoloringSubject.next();\n }\n\n public setProductionSchedule(productionSchedule: ProductionSchedule): void {\n this.productionSchedule = cloneDeep(productionSchedule);\n }\n\n private shouldMoveProductionScheduleItemToProductionSchedulePath(\n sourceProductionSchedulePathNumber: number,\n destinationProductionSchedulePathNumber: number,\n indexInSourceProductionSchedulePath: number,\n indexInDestinationProductionSchedulePath: number\n ): boolean {\n const productionSchedule = this.getProductionScheduleWithAllRemainingActionsApplied();\n const sourceProductionSchedulePath = productionSchedule.getProductionSchedulePath(sourceProductionSchedulePathNumber);\n\n const isInSamePath: boolean = isEqual(sourceProductionSchedulePathNumber, destinationProductionSchedulePathNumber);\n const isOnSamePositionOfSamePath: boolean = isEqual(indexInSourceProductionSchedulePath, indexInDestinationProductionSchedulePath);\n const hasOnlyOneProductionScheduleItemInSamePath: boolean = size(sourceProductionSchedulePath.pathGroups) === 1;\n return !(isInSamePath && (isOnSamePositionOfSamePath || hasOnlyOneProductionScheduleItemInSamePath));\n }\n\n private recolorProductionScheduleItem(\n productionScheduleItem: ProductionScheduleItemInPathGroup,\n coloredYarnSetWithStartDent: OverviewListColoredYarnSetWithStartDent,\n onProductionScheduleItemRecolored: () => void,\n onProductionScheduleItemRecoloredFailed: (error: BackendError) => void\n ): void {\n const {id: imageId} = productionScheduleItem.drawing.image;\n const currentRatio = productionScheduleItem.drawing.dimensionsInPixels.heightInPx / productionScheduleItem.drawing.dimensionsInPixels.widthInPx;\n const {coloredYarnSet, position} = coloredYarnSetWithStartDent;\n\n let outputHeight = min([productionScheduleItem.drawing.dimensionsInPixels.heightInPx, 400]);\n let outputWidth = outputHeight / currentRatio;\n if (outputWidth > 300) {\n outputWidth = 300;\n outputHeight = outputWidth * currentRatio;\n }\n\n const outputDimensionsInPx: DimensionsInPx = {\n heightInPx: Math.round(outputHeight),\n widthInPx: Math.round(outputWidth)\n };\n\n const mappingForCurrentPositionOnMachine = find(this.productionSchedule.mappingForCurrentPositionOnMachine, (creelMap: CreelMap) => {\n return isEqual(creelMap.coloredYarnSetId, coloredYarnSet.id);\n });\n\n const orderLineId = productionScheduleItem.orderLineId;\n const finishingId = productionScheduleItem instanceof BmpProductionScheduleItemInPathGroup && !isNil(productionScheduleItem.finishing) ? productionScheduleItem.finishing.id : null;\n\n if (productionScheduleItem.drawing.missingDesign) {\n productionScheduleItem.recolorDrawing({\n imageData: 'assets/images/missing-design.svg',\n mainColorPosition: 1,\n borderColorPosition: 1,\n commercialDimensionsInMM: productionScheduleItem.commercialDimensionsInMM,\n finishing: null,\n mappingForDesign: null\n });\n this.cleanUpAndRecolorNextProductionScheduleItemInQueue();\n onProductionScheduleItemRecolored();\n } else {\n this.drawings\n .getRecoloredImageConfiguration(\n imageId,\n productionScheduleItem.machineQuality?.id ?? this.productionSchedule.machineQuality.id,\n coloredYarnSet.overviewListColorSet.id,\n coloredYarnSet.id,\n mappingForCurrentPositionOnMachine,\n TargetForListOfDrawingsEnum.PRODUCTION_ORDER,\n {input: productionScheduleItem.drawing.dimensionsInPixels, output: outputDimensionsInPx},\n orderLineId,\n position,\n finishingId\n )\n .pipe(\n finalize(() => this.cleanUpAndRecolorNextProductionScheduleItemInQueue()),\n takeUntil(this.cancelOngoingRecoloringSubject)\n )\n .subscribe({\n next: (drawingRecolorInformation: DrawingRecolorInformation) => {\n productionScheduleItem.recolorDrawing({\n imageData: drawingRecolorInformation.image,\n mainColorPosition: drawingRecolorInformation.mainColorsCreelPosition.position,\n borderColorPosition: drawingRecolorInformation.borderColorsCreelPosition.position,\n commercialDimensionsInMM: drawingRecolorInformation.commercialDimensionsInMm,\n finishing: !isNil(drawingRecolorInformation.finishing) ? FinishingForProductionSchedule.fromOverviewListFinishing(drawingRecolorInformation.finishing) : null,\n mappingForDesign: !isNil(drawingRecolorInformation.mappingForDesign) ? drawingRecolorInformation.mappingForDesign : null\n });\n\n onProductionScheduleItemRecolored();\n },\n error: (error: BackendError) => onProductionScheduleItemRecoloredFailed(error)\n });\n }\n }\n\n private loadPathLabelIfNeeded(\n drawing: PathLabelDrawing,\n coloredYarnSetWithStartDent: OverviewListColoredYarnSetWithStartDent,\n onPathLabelLoadedWhenNotCachedYet: (cachedPathLabelDrawingReference: CachedPathLabelDrawingReference) => void,\n onPathLabelAlreadyCached: (cachedPathLabelDrawingReference: CachedPathLabelDrawingReference) => void,\n onPathLabelLoadedFailed: (error: BackendError) => void\n ): void {\n if (!this.productionSchedulePathLabelDrawingsCache.hasPathLabelDrawingBeenLoaded(drawing, coloredYarnSetWithStartDent)) {\n const {id: imageId} = drawing.image;\n const coloredYarnSet = coloredYarnSetWithStartDent.coloredYarnSet;\n const mappingForCurrentPositionOnMachine = find(this.productionSchedule.mappingForCurrentPositionOnMachine, (creelMap: CreelMap) => {\n return isEqual(creelMap.coloredYarnSetId, coloredYarnSet.id);\n });\n\n const cachedPathLabelDrawingReference = {\n drawing,\n state: LoadingState.BUSY\n };\n this.productionSchedulePathLabelDrawingsCache.add(cachedPathLabelDrawingReference, coloredYarnSetWithStartDent);\n\n this.drawings\n .getRecoloredPathLabelImage(\n imageId,\n this.productionSchedule.machineQuality.id,\n coloredYarnSet.overviewListColorSet.id,\n mappingForCurrentPositionOnMachine,\n drawing.dimensionsInPixels,\n coloredYarnSetWithStartDent.position,\n this.productionSchedule.creel.name,\n this.productionSchedule.machine.id,\n this.productionSchedule.initialFreeZones.pattern.id\n )\n .pipe(takeUntil(this.cancelOngoingRecoloringSubject))\n .subscribe({\n next: (result: string) => {\n cachedPathLabelDrawingReference.drawing.image.data = result;\n cachedPathLabelDrawingReference.state = LoadingState.DONE;\n\n this.productionSchedulePathLabelDrawingsCache.add(cachedPathLabelDrawingReference, coloredYarnSetWithStartDent);\n\n onPathLabelLoadedWhenNotCachedYet(cachedPathLabelDrawingReference);\n },\n error: (error: BackendError) => onPathLabelLoadedFailed(error)\n });\n } else {\n onPathLabelAlreadyCached(this.productionSchedulePathLabelDrawingsCache.getPathLabelDrawingCachedReference(drawing, coloredYarnSetWithStartDent));\n }\n }\n\n private processFirstItemInQueuedProductionSchedulePlanActions(): void {\n const firstItemInQueue: QueuedProductionSchedulePlanAction = first(this.queuedProductionSchedulePlanActions);\n\n if (!isNil(firstItemInQueue) && !firstItemInQueue.isProcessing) {\n firstItemInQueue.isProcessing = true;\n\n const parametersWithProductionSchedule = firstItemInQueue.parameters;\n parametersWithProductionSchedule['productionSchedule'] = cloneDeep(this.productionSchedule);\n\n let productionScheduleToAdjust = this.definedProductionSchedulePlanActions[firstItemInQueue.operation](parametersWithProductionSchedule);\n\n productionScheduleToAdjust = firstItemInQueue.postExecute(productionScheduleToAdjust);\n\n if (isEqual(firstItemInQueue.operation, ProductionSchedulePlanService.updateDrawingsAndOrderLinesOfProductionScheduleOperation)) {\n this.saveDesignsAndOrderLines(productionScheduleToAdjust);\n } else if (includes(this.operationsThatRequireProductionScheduleItemsToBeRecolored, firstItemInQueue.operation)) {\n this.recolorAllProductionScheduleItemsThatAreNotRecolored(productionScheduleToAdjust).subscribe({\n next: () => this.setProductionSchedulePlan(productionScheduleToAdjust, firstItemInQueue.onSuccess),\n error: () => {\n this.orderlinesGridService.setIsFillingPath(false);\n this.recolorService.setRecolorErrorCatch();\n this.cleanUpAndHandleNextItemInQueue();\n }\n });\n } else {\n this.setProductionSchedulePlan(productionScheduleToAdjust, firstItemInQueue.onSuccess);\n }\n }\n }\n\n private setProductionSchedulePlan(productionSchedule: ProductionSchedule, onSuccess: () => void = noop): void {\n productionSchedule = updateProductionSchedulePathsOfColoredYarnSets(productionSchedule);\n this.hasChangesThatAreNotSaved = true;\n\n if (this.productionSchedule.completingPartially) {\n this.productionOrders\n .updateProductionOrder(\n productionSchedule.id as string,\n cloneDeep(productionSchedule.productionSchedulePathsOfColoredYarnSets),\n this.factorForConversionFromMillimetersToDents,\n this.productionSchedule.status\n )\n .subscribe(() => {\n productionSchedule.updateOrderLineQuantities();\n this.productionSchedule = productionSchedule;\n\n this.cleanUpAndHandleNextItemInQueue();\n onSuccess();\n });\n } else {\n productionSchedule.productionSchedulePathsOfColoredYarnSets.forEach((productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet) => {\n productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.technicalWidthInDents = Math.round(\n productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.technicalWidthInDents\n );\n productionSchedulePathsOfColoredYarnSet.productionSchedulePaths.forEach((productionSchedulePath: ProductionSchedulePath) => {\n productionSchedulePath.technicalWidthInDents = Math.round(productionSchedulePath.technicalWidthInDents);\n productionSchedulePath.pathGroups.forEach((pathGroup: ProductionScheduleItemInPathGroup) => {\n pathGroup.technicalDimensions.widthInDents = Math.round(pathGroup.technicalDimensions.widthInDents);\n });\n });\n });\n\n this.productionSchedules\n .setProductionSchedulePlan(productionSchedule.id as string, cloneDeep(productionSchedule.productionSchedulePathsOfColoredYarnSets), this.factorForConversionFromMillimetersToDents)\n .subscribe((patchedProductionSchedule: ProductionSchedule) => {\n productionSchedule.warnings = patchedProductionSchedule.warnings;\n productionSchedule.errors = patchedProductionSchedule.errors;\n productionSchedule.updateOrderLineQuantities();\n productionSchedule.updatePathLengths(patchedProductionSchedule);\n productionSchedule.buggy = patchedProductionSchedule.buggy;\n\n this.productionSchedule = productionSchedule;\n\n this.cleanUpAndHandleNextItemInQueue();\n onSuccess();\n });\n }\n\n if (this.queuedProductionSchedulePlanActions.length === 1) {\n this.orderlinesGridService.setIsFillingPath(false);\n }\n }\n\n private saveDesignsAndOrderLines(productionSchedule: ProductionSchedule): void {\n this.productionSchedules.saveDesignsAndOrderLines(productionSchedule.id, productionSchedule.designs, productionSchedule.orderLines, productionSchedule.name).subscribe(() => {\n productionSchedule.updateOrderLineQuantities();\n this.productionSchedule = productionSchedule;\n\n this.cleanUpAndHandleNextItemInQueue();\n });\n }\n\n private getProductionScheduleWithAllRemainingActionsApplied(): ProductionSchedule {\n return reduce(\n this.queuedProductionSchedulePlanActions,\n (adjustedProductionSchedule: ProductionSchedule, itemInQueueToProcess: QueuedProductionSchedulePlanAction) => {\n const parametersWithProductionSchedule = itemInQueueToProcess.parameters;\n parametersWithProductionSchedule['productionSchedule'] = adjustedProductionSchedule;\n\n return this.definedProductionSchedulePlanActions[itemInQueueToProcess.operation](parametersWithProductionSchedule);\n },\n cloneDeep(this.productionSchedule)\n );\n }\n\n private recolorProductionScheduleIfNeeded(productionSchedule: ProductionSchedule): void {\n const productionScheduleItemsWithMissingAlternativeMachineQualityOrColoredYarnSet = [];\n\n productionSchedule\n .getNonRecoloredProductionScheduleItemsPerColoredYarnSet()\n .forEach((nonRecoloredProductionScheduleItems: ProductionScheduleItemInPathGroup[], coloredYarnSetWithStartDent: OverviewListColoredYarnSetWithStartDent) => {\n each(nonRecoloredProductionScheduleItems, (nonRecoloredProductionScheduleItem: ProductionScheduleItemInPathGroup) => {\n const onProductionScheduleItemRecolored = (): void => {\n this.productionSchedule = productionSchedule;\n\n if (isEqual(productionSchedule.getAmountOfNonRecoloredProductionScheduleItems() - size(productionScheduleItemsWithMissingAlternativeMachineQualityOrColoredYarnSet), 0)) {\n this.removeProductionScheduleItemsWithMissingAlternativeMachineQualityOrColoredYarnSet(productionScheduleItemsWithMissingAlternativeMachineQualityOrColoredYarnSet);\n this.dispatchNewProductionSchedule(this.getProductionScheduleWithAllRemainingActionsApplied());\n }\n };\n\n const onProductionScheduleItemRecoloredFailed = (error: BackendError): void => {\n if (!isEqual(BackendErrorCodeEnum[error.errorContext.errorCode], BackendErrorCodeEnum.ALTERNATIVES)) {\n this.initializeProductionScheduleSubject.error(error);\n } else {\n productionScheduleItemsWithMissingAlternativeMachineQualityOrColoredYarnSet.push(nonRecoloredProductionScheduleItem);\n\n if (isEqual(productionSchedule.getAmountOfNonRecoloredProductionScheduleItems() - size(productionScheduleItemsWithMissingAlternativeMachineQualityOrColoredYarnSet), 0)) {\n this.removeProductionScheduleItemsWithMissingAlternativeMachineQualityOrColoredYarnSet(productionScheduleItemsWithMissingAlternativeMachineQualityOrColoredYarnSet);\n }\n }\n };\n\n this.recolorProductionScheduleItem(nonRecoloredProductionScheduleItem, coloredYarnSetWithStartDent, onProductionScheduleItemRecolored, onProductionScheduleItemRecoloredFailed);\n });\n });\n\n productionSchedule.getUniquePathLabelDrawingsPerColoredYarnSet().forEach((pathLabelDrawings: PathLabelDrawing[], coloredYarnSetWithStartDent: OverviewListColoredYarnSetWithStartDent) => {\n each(pathLabelDrawings, (pathLabelDrawing: PathLabelDrawing) => {\n const onPathLabelLoadedWhenNotCachedYet = (cachedPathLabelDrawingReference: CachedPathLabelDrawingReference): void => {\n this.updateLoadedPathLabelDrawingInProductionSchedule(productionSchedule, cachedPathLabelDrawingReference);\n };\n\n const onPathLabelAlreadyCached = onPathLabelLoadedWhenNotCachedYet;\n\n const onPathLabelLoadedFailed = (error: BackendError): void => {\n this.initializeProductionScheduleSubject.error(error);\n\n this.productionSchedulePathLabelDrawingsCache.clearNonLoadedPathLabelDrawings();\n };\n\n this.loadPathLabelIfNeeded(pathLabelDrawing, coloredYarnSetWithStartDent, onPathLabelLoadedWhenNotCachedYet, onPathLabelAlreadyCached, onPathLabelLoadedFailed);\n });\n });\n }\n\n private updateLoadedPathLabelDrawingInProductionSchedule(productionSchedule: ProductionSchedule, cachedPathLabelDrawingReference: CachedPathLabelDrawingReference): void {\n productionSchedule.updateLoadedPathLabelDrawing(cachedPathLabelDrawingReference.drawing);\n\n this.productionSchedule = productionSchedule;\n this.dispatchNewProductionSchedule(this.getProductionScheduleWithAllRemainingActionsApplied());\n }\n\n private showInfoToastAndContinue(productionSchedule: ProductionSchedule): void {\n this.toastService.showInfo({\n tapToDismiss: false,\n timeOut: 2000,\n message: this.translate.instant('GENERAL.ACTIONS.UPDATED_OBJECT', {\n object: this.translate.instant('PRODUCTION_ORDER.PRODUCTION_ORDER', {count: 1}),\n name: productionSchedule.name\n })\n });\n this.patchProductionSchedulePlanSubject.next();\n }\n\n private cleanUpAndHandleNextItemInQueue(): void {\n pull(this.queuedProductionSchedulePlanActions, find(this.queuedProductionSchedulePlanActions, ['isProcessing', true]));\n\n this.dispatchNewProductionSchedule(this.getProductionScheduleWithAllRemainingActionsApplied());\n this.processFirstItemInQueuedProductionSchedulePlanActions();\n }\n\n private processFirstItemInQueuedProductionScheduleItemsToRecolor(): void {\n const firstItemInQueue: QueuedProductionScheduleItemRecolor = first(this.queuedProductionScheduleItemsToRecolor);\n if (!isNil(firstItemInQueue) && !firstItemInQueue.isRecoloring) {\n firstItemInQueue.isRecoloring = true;\n\n const {productionScheduleItem, coloredYarnSetWithStartDent} = firstItemInQueue.parameters;\n const {onProductionScheduleItemRecolored, onProductionScheduleItemRecoloredFailed} = firstItemInQueue;\n\n this.recolorProductionScheduleItem(productionScheduleItem, coloredYarnSetWithStartDent, onProductionScheduleItemRecolored, onProductionScheduleItemRecoloredFailed);\n }\n }\n\n private cleanUpAndRecolorNextProductionScheduleItemInQueue(): void {\n remove(this.queuedProductionScheduleItemsToRecolor, {isRecoloring: true});\n\n this.processFirstItemInQueuedProductionScheduleItemsToRecolor();\n }\n\n private addProductionScheduleItemToProductionScheduleItemRecolorQueue(\n productionScheduleItem: ProductionScheduleItemInPathGroup,\n coloredYarnSetWithStartDent: OverviewListColoredYarnSetWithStartDent,\n onProductionScheduleItemRecolored: () => void,\n onProductionScheduleItemRecoloredFailed: (error: BackendError) => void\n ): void {\n const productionScheduleItemRecolorQueueItem = {\n parameters: {\n productionScheduleItem,\n coloredYarnSetWithStartDent\n },\n isRecoloring: false,\n onProductionScheduleItemRecolored,\n onProductionScheduleItemRecoloredFailed\n };\n\n this.queuedProductionScheduleItemsToRecolor.push(productionScheduleItemRecolorQueueItem);\n\n this.processFirstItemInQueuedProductionScheduleItemsToRecolor();\n }\n\n private showAlertDialog(errorMessage: string): void {\n this.dialogBuilderFactoryService.getBuilder().openAlertDialog({\n titleText: 'PRODUCTION_ORDER.WEAVE_PLAN.WEAVE_PLAN',\n messageText: errorMessage,\n type: DialogType.INFORMATION\n });\n }\n\n private removeProductionScheduleItemsWithMissingAlternativeMachineQualityOrColoredYarnSet(productionScheduleItems: ProductionScheduleItemInPathGroup[]): void {\n if (!isEmpty(productionScheduleItems)) {\n this.showAlertDialog(this.translate.instant('GENERAL.ERRORS.BACKEND.ALTERNATIVES'));\n this.removeProductionScheduleItems(productionScheduleItems, noop);\n this.processFirstItemInQueuedProductionSchedulePlanActions();\n }\n }\n\n private selectDrawingOrOrderLineIfNotAlreadySelected(listDrawing: ListDrawing): void {\n if (listDrawing instanceof ListDrawingConfiguration) {\n const isDrawingAlreadySelected = some(this.productionSchedule.designs, {id: listDrawing.drawing.id});\n\n if (!isDrawingAlreadySelected) {\n this.updateDrawingsAndOrderLinesOfProductionSchedule([...this.productionSchedule.designs, cloneDeep(listDrawing.drawing)], this.productionSchedule.orderLines);\n }\n } else if (listDrawing instanceof ListDrawingOrderLine) {\n const isOrderLineAlreadySelected = some(this.productionSchedule.orderLines, {id: listDrawing.orderLine.id});\n\n if (!isOrderLineAlreadySelected) {\n this.updateDrawingsAndOrderLinesOfProductionSchedule(this.productionSchedule.designs, [...this.productionSchedule.orderLines, cloneDeep(listDrawing.orderLine)]);\n }\n }\n }\n\n private recolorAllProductionScheduleItemsThatAreNotRecolored(productionSchedule: ProductionSchedule): Observable {\n return new Observable((observer: Observer) => {\n if (isEqual(productionSchedule.getAmountOfNonRecoloredProductionScheduleItems(), 0)) {\n observer.next();\n observer.complete();\n } else {\n productionSchedule\n .getNonRecoloredProductionScheduleItemsPerColoredYarnSet()\n .forEach((nonRecoloredProductionScheduleItems: ProductionScheduleItemInPathGroup[], coloredYarnSetWithStartDent: OverviewListColoredYarnSetWithStartDent) => {\n each(nonRecoloredProductionScheduleItems, (nonRecoloredProductionScheduleItem: ProductionScheduleItemInPathGroup) => {\n const onProductionScheduleItemRecolored = (): void => {\n if (isEqual(productionSchedule.getAmountOfNonRecoloredProductionScheduleItems(), 0)) {\n observer.next();\n observer.complete();\n }\n };\n\n const onProductionScheduleItemRecoloredFailed = (error: BackendError): void => {\n const errorMessage = isNil(error.message) ? 'PRODUCTION_ORDER.WEAVE_PLAN.WARNINGS.COULD_NOT_RECOLOR' : error.message;\n this.showAlertDialog(errorMessage);\n this.queuedProductionScheduleItemsToRecolor = [];\n\n observer.error(errorMessage);\n observer.complete();\n };\n\n this.addProductionScheduleItemToProductionScheduleItemRecolorQueue(\n nonRecoloredProductionScheduleItem,\n coloredYarnSetWithStartDent,\n onProductionScheduleItemRecolored,\n onProductionScheduleItemRecoloredFailed\n );\n });\n });\n }\n });\n }\n}\n","@if (canShowZoneIndicators()) {\n
\n @for (zone of zones; track $index) {\n
\n \n
\n }\n
\n}\n","import {Component, Inject, Input, OnChanges, SimpleChanges} from '@angular/core';\nimport {isMultipleOf} from '@application/validators/is-multiple-of-validator';\nimport {FreeZone} from '@domain/production-schedule/free-zone/free-zone';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {RestZone} from '@domain/production-schedule/rest-zone/rest-zone';\nimport {ZoneType} from '@domain/zone-type.enum';\nimport {PRODUCTION_SCHEDULES, ProductionSchedules} from '@infrastructure/http/production-schedule/production-schedules';\nimport {ProductionScheduleBuilderAspectRatio} from '@presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-builder-aspect-ratio';\nimport {Zone} from '@presentation/pages/texfab/production-schedule/add/plan/builder/zone';\nimport {PRODUCTION_SCHEDULE_PLAN, ProductionSchedulePlan} from '@presentation/pages/texfab/production-schedule/add/plan/production-schedule-plan';\nimport {AssertionUtils, BaseComponent, ZoneInputType, convertDentsToMillimeters} from '@vdw/angular-component-library';\nimport {cloneDeep} from 'lodash-es';\nimport {finalize, takeUntil} from 'rxjs/operators';\n\ninterface ZoneIndicatorPosition {\n left: number;\n right: number;\n}\n\n@Component({\n selector: 'app-production-schedule-zones',\n templateUrl: './production-schedule-zones.component.html',\n styleUrls: ['./production-schedule-zones.component.scss']\n})\nexport class ProductionScheduleZonesComponent extends BaseComponent implements OnChanges {\n @Input() public productionScheduleVerifyWidth: number;\n @Input() public zones: Zone[];\n @Input() public suggestedZones: Zone[];\n @Input() public aspectRatio: ProductionScheduleBuilderAspectRatio;\n @Input() public productionSchedule: ProductionSchedule;\n\n public isVerifying = false;\n\n public readonly zoneIndicatorWidth = 8;\n public readonly zoneInputType = ZoneInputType;\n\n private zoneIndicatorPositions: ZoneIndicatorPosition[];\n\n public constructor(\n @Inject(PRODUCTION_SCHEDULE_PLAN) private readonly productionSchedulePlan: ProductionSchedulePlan,\n @Inject(PRODUCTION_SCHEDULES) private readonly productionSchedules: ProductionSchedules\n ) {\n super();\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if ('zones' in changes || 'aspectRatio' in changes) {\n this.setZoneIndicatorsPosition();\n }\n }\n\n public getZoneIndicatorPosition(zoneIndex: number): number {\n return this.zoneIndicatorPositions[zoneIndex].left;\n }\n\n public isZonesInstanceOfRestZone(zone: Zone): boolean {\n return zone instanceof RestZone;\n }\n\n public isZonesInstanceOfFreeZone(zone: Zone): boolean {\n return zone instanceof FreeZone;\n }\n\n public getZoneInputType(zone: Zone): ZoneInputType {\n return zone instanceof RestZone ? ZoneInputType.RESTZONE : ZoneInputType.FREEZONE;\n }\n\n public canShowZoneIndicators(): boolean {\n return !AssertionUtils.isEmpty(this.zoneIndicatorPositions);\n }\n\n public getZoneWidthInMM(zone: Zone): number {\n return convertDentsToMillimeters({\n valueInDents: zone.technicalWidthInDents,\n factorForConversionFromMillimetersToDents: this.productionSchedule.machineQuality.reedDensity\n });\n }\n\n public maximumTechnicalValue(): number {\n let productionSchedulePathsWidthInDents = 0;\n this.productionSchedule.productionSchedulePathsOfColoredYarnSets\n .flatMap((path: ProductionSchedulePathsOfColoredYarnSet) => path.productionSchedulePaths)\n .forEach((path: ProductionSchedulePath) => (productionSchedulePathsWidthInDents += path.technicalWidthInDents));\n\n return this.productionSchedule.machine.dentsForFabric - productionSchedulePathsWidthInDents;\n }\n\n public onZoneValueChanged(value: number, zone: Zone): void {\n this.isVerifying = true;\n\n if (!this.isDifferenceBetweenOldAndNewTechnicalWidthInDentsValid(value, zone)) {\n value += 1;\n }\n\n this.productionSchedules\n .checkVerifyProductionSchedule(\n this.productionSchedule.id.toString(),\n this.getZoneType(zone),\n zone.startDent,\n this.getDifferenceBetweenOldAndNewTechnicalWidthInDents(value, zone),\n zone.coloredYarnSetPathNr\n )\n .pipe(\n finalize(() => {\n this.isVerifying = false;\n }),\n takeUntil(this.unSubscribeOnViewDestroy)\n )\n .subscribe((productionSchedule: ProductionSchedule) => {\n this.productionSchedule = ProductionSchedule.modifyProductionScheduleAfterVerify(this.productionSchedule, productionSchedule);\n this.productionSchedulePlan.dispatchNewProductionSchedule(cloneDeep(this.productionSchedule));\n });\n }\n\n private calculateZoneIndicatorPosition(zone: Zone): number {\n return zone.startDent + zone.technicalWidthInDents;\n }\n\n private setZoneIndicatorsPosition(): void {\n this.zoneIndicatorPositions = [];\n\n this.zones.forEach((zone: Zone) => {\n const left = this.calculateZoneIndicatorPosition(zone) * this.aspectRatio.width;\n const right = left + this.zoneIndicatorWidth * 2;\n this.zoneIndicatorPositions.push({left, right});\n });\n }\n\n private getZoneType(zone: Zone): ZoneType {\n let result: ZoneType;\n\n if (this.isZonesInstanceOfRestZone(zone)) {\n result = ZoneType.REST;\n } else if (this.isZonesInstanceOfFreeZone(zone)) {\n result = ZoneType.FREE;\n }\n\n return result;\n }\n\n private getDifferenceBetweenOldAndNewTechnicalWidthInDents(newValue: number, zone: Zone): number {\n return newValue - zone.technicalWidthInDents;\n }\n\n private isDifferenceBetweenOldAndNewTechnicalWidthInDentsValid(newValue: number, zone: Zone): boolean {\n let difference: number = this.getDifferenceBetweenOldAndNewTechnicalWidthInDents(newValue, zone);\n if (this.productionSchedule.machine.jacquard.amountOfPossiblePaths !== null && this.productionSchedule.machineQuality.weaveStructure.dentRepeat === 2) {\n return isMultipleOf(difference, this.productionSchedule.machineQuality.weaveStructure.dentRepeat);\n }\n return true;\n }\n}\n","import {Pipe, PipeTransform} from '@angular/core';\nimport {FreeZone} from '@domain/production-schedule/free-zone/free-zone';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {ProductionSchedulePhase} from '@domain/production-schedule/production-schedule-phase.enum';\nimport {RestZone} from '@domain/production-schedule/rest-zone/rest-zone';\n\n@Pipe({\n name: 'getProductionSchedulePathsAndZonesForColoredYarnSet'\n})\nexport class GetProductionSchedulePathsAndZonesForColoredYarnSetPipe implements PipeTransform {\n public transform(productionSchedule: ProductionSchedule, coloredYarnSetIndex: number, productionSchedulePhase: ProductionSchedulePhase): (ProductionSchedulePath | RestZone | FreeZone)[] {\n const items: (ProductionSchedulePath | RestZone | FreeZone)[] = [...productionSchedule.productionSchedulePathsOfColoredYarnSets[coloredYarnSetIndex].productionSchedulePaths];\n\n if (productionSchedulePhase === ProductionSchedulePhase.VERIFY) {\n items.push(\n ...productionSchedule.restZones.filter((restZone: RestZone) => restZone.coloredYarnSetPathNr - 1 === coloredYarnSetIndex),\n ...productionSchedule.freeZones.filter((freeZone: FreeZone) => freeZone.coloredYarnSetPathNr - 1 === coloredYarnSetIndex)\n );\n }\n\n return items.sort((firstItem: {startDent: number}, secondItem: {startDent: number}) => firstItem.startDent - secondItem.startDent);\n }\n}\n","
\n
\n
\n
\n
\n\n \n \n\n
\n
\n
\n
\n\n \n \n @if (isProductionSchedulePath(item)) {\n
\n
\n \n \n \n \n \n \n\n \n \n\n \n\n \n
\n
\n } @else if (isRestZone(item) && item.technicalWidthInDents > 0) {\n
\n

\n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.PATH_LAYOUT.REST' | bmsTranslate }}\n

\n
\n }\n\n
\n
\n\n
\n \n\n \n \n
\n
\n
\n\n
\n
\n \n \n \n \n
\n\n \n \n \n\n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \n \n \n \n \n\n \n \n \n \n \n \n \n
\n \n\n
\n
\n\n \n\n
\n
\n
\n\n \n \n
\n\n
\n \n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.PATH_LAYOUT.TOTAL_HEIGHT' | bmsTranslate }}:\n {{ getTotalHeight(item, getWidthInDentsWithAspectRatio(item.technicalWidthInDents)) }}\n

\n\n \n
\n\n
\n
\n
\n
\n \n\n
\n \n
\n \n \n
\n","import {OverlayRef} from '@angular/cdk/overlay';\nimport {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n HostListener,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n Output,\n QueryList,\n Renderer2,\n SimpleChanges,\n ViewChild,\n ViewChildren\n} from '@angular/core';\nimport {getLongestProductionSchedulePath} from '@application/helper/production-schedule-builder';\nimport {DimensionsInPx} from '@domain/dimensions-in-px';\nimport {ProductionOrderCustomSettings} from '@domain/production-schedule/custom-settings/production-order-custom-settings';\nimport {FreeZone} from '@domain/production-schedule/free-zone/free-zone';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionScheduleDisplay} from '@domain/production-schedule/production-schedule-display.enum';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {ProductionSchedulePhase} from '@domain/production-schedule/production-schedule-phase.enum';\nimport {RestZone} from '@domain/production-schedule/rest-zone/rest-zone';\nimport {Permission} from '@domain/profile/permission.enum';\nimport {PropertyValue} from '@domain/property-value';\nimport {OverviewListColoredYarnSetWithStartDent} from '@domain/textile-data/creel/overview-list-colored-yarn-set-with-start-dent';\nimport {ProductionScheduleZoneComponent} from '@presentation/pages/texfab/production-schedule/add/plan/builder/free-and-rest-zones/production-schedule-zone.component';\nimport {ProductionScheduleColoredYarnSetComponent} from '@presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-colored-yarn-set.component';\nimport {ProductionSchedulePathOfColoredYarnSetComponent} from '@presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-path-of-colored-yarn-set/production-schedule-path-of-colored-yarn-set.component';\nimport {Zone} from '@presentation/pages/texfab/production-schedule/add/plan/builder/zone';\nimport {PRODUCTION_SCHEDULE_PLAN, ProductionSchedulePlan} from '@presentation/pages/texfab/production-schedule/add/plan/production-schedule-plan';\nimport {\n AssertionUtils,\n BaseComponent,\n convertCommercialUnit,\n convertDentsToWidthInMeter,\n convertPicksToHeightInMeter,\n DistanceSpecifierOrientation,\n EnumUtils,\n MathUtils,\n TranslateService,\n Unit\n} from '@vdw/angular-component-library';\nimport {axisBottom as d3AxisBottom} from 'd3-axis';\nimport {scaleLinear as d3ScaleLinear} from 'd3-scale';\nimport {BaseType, select as d3Select, Selection as d3Selection} from 'd3-selection';\nimport {cloneDeep} from 'lodash-es';\nimport {Observable, Observer, Subject} from 'rxjs';\nimport {debounceTime, takeUntil} from 'rxjs/operators';\nimport {ProductionScheduleBuilderAspectRatio} from '../builder/production-schedule-builder-aspect-ratio';\nimport {ColorListPreviewWithPositionComponent} from '../color-list-preview-with-position/color-list-preview-with-position.component';\n\n@Component({\n selector: 'app-production-schedule-verify',\n templateUrl: './production-schedule-verify.component.html',\n styleUrls: ['./production-schedule-verify.component.scss']\n})\nexport class ProductionScheduleVerifyComponent extends BaseComponent implements AfterViewInit, OnDestroy, OnChanges {\n public static readonly minProductionScheduleVerifyHeightInPicks = 5000;\n public static readonly dentOffset = 1;\n\n @Input() public productionSchedule: ProductionSchedule;\n @Input() public commercialUnit: Unit;\n @Input() public listOfCustomSettings: PropertyValue[];\n @Input() public productionOrderCustomSettings: ProductionOrderCustomSettings;\n @Input() public zoomLevel;\n @Input() public buggyLengthMaxInPicks: number;\n @Input() public buggyLengthMaxInMM: number;\n @Input() public buggyLengthMinInPicks: number;\n @Input() public productionSchedulePhase: ProductionSchedulePhase;\n @Input() public selectedProductionScheduleDisplay: ProductionScheduleDisplay;\n @Input() public displayTechnicalUnit = true;\n @Input() public availableSpaceInBuggyInPicks: number;\n @Input() public availableSpaceInBuggyInCommercialUnit: number;\n @Output() public canZoomIn: EventEmitter = new EventEmitter();\n @Output() public canZoomOut: EventEmitter = new EventEmitter();\n @Output() public productionSchedulePlanChanged: EventEmitter = new EventEmitter();\n\n @ViewChild('productionScheduleVerifyContainer') public productionScheduleVerifyContainer: ElementRef;\n @ViewChild('productionScheduleVerify') public productionScheduleVerify: ElementRef;\n @ViewChild('productionScheduleVerifyGroup') public productionScheduleVerifyGroup: ElementRef;\n @ViewChild('productionScheduleVerifyVerticalAxis') public productionScheduleVerifyVerticalAxis: ElementRef;\n @ViewChild('productionScheduleVerifyHorizontalAxis') public productionScheduleVerifyHorizontalAxis: ElementRef;\n @ViewChild(ProductionScheduleZoneComponent) public productionScheduleZoneComponent: ProductionScheduleZoneComponent;\n @ViewChild('topScrollIndicator') public topScrollIndicator: ElementRef;\n @ViewChild('bottomScrollIndicator') public bottomScrollIndicator: ElementRef;\n @ViewChild('actionBar') public actionBarElement: ElementRef;\n @ViewChild('verifyHeader') public verifyHeader: ElementRef;\n @ViewChild('zonesContainer') public zonesContainerElement: ElementRef;\n @ViewChildren('colorListPreviewComponents') public colorListPreviewComponents: QueryList;\n\n public selectedZone: Zone;\n public distanceSpecifierOrientation = DistanceSpecifierOrientation;\n public canShowProductionScheduleVerify = false;\n public aspectRatio: ProductionScheduleBuilderAspectRatio = {width: 1, height: 1};\n public readonly scrollIndicatorDimensionsInPx: DimensionsInPx = {widthInPx: 33, heightInPx: 22};\n public horizontalPositionOfScrollIndicators: number;\n public productionScheduleVerifyViewportTopPosition = 0;\n public verticalPositionOfBottomScrollIndicator: number;\n public productionScheduleVerifyContainerHeight: number;\n public productionScheduleVerifyContainerWidth: number;\n public isEditPathsEnabled = false;\n public scrollLeftOffset: number;\n public canShowBottomScrollIndicator = false;\n public suggestedRestZones: RestZone[];\n public suggestedFreeZones: FreeZone[];\n public productionScheduleVerifyHeight = 0;\n public overlayRef: OverlayRef;\n public readonly permissionToViewBuggyLength = Permission.VIEW_MIN_MAX_BUGGY;\n public readonly productionScheduleVerifyMargin = {right: 25, left: 50};\n public readonly horizontalAxisHeightInPx = 35;\n\n private topScrollIndicatorListenerMouseEnterFn: () => void;\n private topScrollIndicatorListenerMouseClickFn: () => void;\n private bottomScrollIndicatorListenerMouseEnterFn: () => void;\n private bottomScrollIndicatorListenerMouseClickFn: () => void;\n private productionScheduleVerifySelection: d3Selection;\n private productionScheduleVerifyVerticalAxisSelection: d3Selection;\n private productionScheduleVerifyHorizontalAxisSelection: d3Selection;\n\n private originalProductionScheduleVerifyHeight: number;\n private originalProductionScheduleVerifyWidth = 0;\n private currentHoveredProductionSchedulePathComponent: ProductionSchedulePathOfColoredYarnSetComponent;\n private previousHoveredProductionSchedulePathComponent: ProductionSchedulePathOfColoredYarnSetComponent;\n private targetPositionOfTopScrollIndicator;\n private targetPositionOfBottomScrollIndicator;\n\n private readonly maxZoomLevel = 5;\n private readonly buggyLengthTextOffset = 4;\n private readonly zoneIndicatorWidth = 16;\n private readonly zoneIndicatorLineWidthInPx = 2;\n private readonly approximateHorizontalTicksCount = 10;\n\n private debounceSubjectInitialise: Subject = new Subject();\n private debounceSubjectReinitialise: Subject = new Subject();\n\n public constructor(\n private readonly elementRef: ElementRef,\n private readonly renderer: Renderer2,\n @Inject(PRODUCTION_SCHEDULE_PLAN) private readonly productionSchedulePlan: ProductionSchedulePlan,\n private readonly changeDetectorRef: ChangeDetectorRef,\n private readonly translate: TranslateService\n ) {\n super();\n this.initialiseDebounceSubjects();\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if ('productionSchedule' in changes) {\n if (!changes.productionSchedule.isFirstChange()) {\n this.debounceSubjectInitialise.next();\n }\n this.setProductionScheduleZones();\n }\n\n if ('zoomLevel' in changes && !changes.zoomLevel.firstChange) {\n if (changes.zoomLevel.currentValue > changes.zoomLevel.previousValue) {\n this.canZoomIn.emit(Math.round(this.zoomLevel) !== this.maxZoomLevel);\n this.canZoomOut.emit(true);\n } else {\n this.canZoomIn.emit(true);\n this.canZoomOut.emit(\n this.getOriginProductionScheduleVerifyWidth() > this.productionScheduleVerifyContainerWidth || this.productionScheduleVerifyHeight > this.productionScheduleVerifyContainerHeight\n );\n }\n\n this.zoom();\n }\n\n if ('selectedProductionScheduleDisplay' in changes && !changes.selectedProductionScheduleDisplay.isFirstChange()) {\n this.onSelectedProductionScheduleDisplayChange();\n }\n\n if ('displayTechnicalUnit' in changes && !changes.displayTechnicalUnit.isFirstChange()) {\n this.updateHorizontalAxis();\n }\n\n this.debounceSubjectReinitialise.next();\n }\n\n public ngAfterViewInit(): void {\n this.reInitialiseProductionScheduleVerify();\n\n this.productionSchedulePlan.currentSelectedZone.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe((zone: Zone) => {\n this.selectedZone = zone;\n if (AssertionUtils.isNullOrUndefined(this.selectedZone)) {\n this.setUpDimensionsForProductionScheduleVerify();\n setTimeout(() => {\n this.setAspectRatioAndUpdateProductionScheduleVerifyContainer();\n });\n }\n });\n this.productionSchedulePlan.currentEditingPaths.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe((isEditingPaths: boolean) => (this.isEditPathsEnabled = isEditingPaths));\n\n this.observeElementResize();\n\n setTimeout(() => {\n this.getProductionScheduleVerifyHeight();\n this.reInitialiseProductionScheduleVerify();\n });\n\n this.finalReInitialiseProductionScheduleVerify();\n }\n\n public ngOnDestroy(): void {\n super.ngOnDestroy();\n\n this.productionSchedulePlan.updateEditingPaths(false);\n\n if (!AssertionUtils.isNullOrUndefined(this.topScrollIndicatorListenerMouseClickFn)) {\n this.topScrollIndicatorListenerMouseClickFn();\n }\n if (!AssertionUtils.isNullOrUndefined(this.topScrollIndicatorListenerMouseEnterFn)) {\n this.topScrollIndicatorListenerMouseEnterFn();\n }\n if (!AssertionUtils.isNullOrUndefined(this.bottomScrollIndicatorListenerMouseClickFn)) {\n this.bottomScrollIndicatorListenerMouseClickFn();\n }\n if (!AssertionUtils.isNullOrUndefined(this.bottomScrollIndicatorListenerMouseEnterFn)) {\n this.bottomScrollIndicatorListenerMouseEnterFn();\n }\n }\n\n @HostListener('window:resize')\n public onResize(): void {\n setTimeout(() => {\n this.getProductionScheduleVerifyHeight();\n }, 1000);\n }\n\n public preventDefaultEvent(event: any): void {\n event.preventDefault();\n }\n\n public isProductionSchedulePhaseVerify(): boolean {\n return this.productionSchedulePhase === ProductionSchedulePhase.VERIFY;\n }\n\n public canShowRestZones(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.suggestedRestZones);\n }\n\n public canShowFreeZones(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.suggestedFreeZones);\n }\n\n public isZoneSelected(zone: Zone): boolean {\n return !AssertionUtils.isNullOrUndefined(zone) && this.selectedZone === zone;\n }\n\n public canShowZoneIndicator(zone: Zone): boolean {\n return this.isZoneSelected(zone) && !AssertionUtils.isNullOrUndefined(this.productionScheduleZoneComponent);\n }\n\n public getZoneIndicatorPosition(): number {\n let result = 0;\n\n if (!AssertionUtils.isNullOrUndefined(this.selectedZone)) {\n result =\n this.getZonePosition(this.selectedZone) +\n (this.getZoneWidth(this.selectedZone) - this.zoneIndicatorWidth + this.zoneIndicatorLineWidthInPx) / 2 -\n this.productionScheduleVerifyContainer.nativeElement.scrollLeft;\n }\n\n return result;\n }\n\n public getProductionScheduleVerifyWidth(): number {\n let result = 0;\n\n if (this.isProductionScheduleDisplayOverview()) {\n const {left, right} = this.productionScheduleVerifyMargin;\n result = this.productionScheduleVerifyContainerWidth - left - right;\n } else if (this.isProductionScheduleDisplayDetailView()) {\n result = this.getOriginProductionScheduleVerifyWidth();\n }\n\n return Number.isFinite(result) && !Number.isNaN(result) ? result : 0;\n }\n\n public onProductionSchedulePlanChanged(): void {\n this.productionSchedulePlanChanged.emit();\n }\n\n public getProductionScheduleVerifyMinBuggyLengthPosition(): number {\n return Math.max(0, this.originalProductionScheduleVerifyHeight - this.buggyLengthMinInPicks) * this.aspectRatio.height;\n }\n\n public getProductionScheduleVerifyMinBuggyLengthTextPositionY(): number {\n return Math.min(this.getProductionScheduleVerifyMinBuggyLengthPosition() + this.buggyLengthTextOffset, this.productionScheduleVerifyHeight);\n }\n\n public canShowProductionScheduleVerifyMinBuggyLengthIndicator(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.buggyLengthMinInPicks) && this.buggyLengthMinInPicks > 0 && this.originalProductionScheduleVerifyHeight >= this.buggyLengthMinInPicks;\n }\n\n public canShowProductionScheduleVerifyMaxBuggyLengthIndicator(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.buggyLengthMaxInPicks) && this.buggyLengthMaxInPicks > 0 && this.originalProductionScheduleVerifyHeight > this.buggyLengthMaxInPicks;\n }\n\n public getProductionScheduleVerifyMaxBuggyLengthPosition(): number {\n return Math.max(0, this.originalProductionScheduleVerifyHeight - this.buggyLengthMaxInPicks) * this.aspectRatio.height;\n }\n\n public getProductionScheduleVerifyMaxBuggyLengthTextPositionY(): number {\n return Math.min(this.getProductionScheduleVerifyMaxBuggyLengthPosition() + this.buggyLengthTextOffset, this.productionScheduleVerifyHeight);\n }\n\n public onScrollProductionScheduleVerifyContainer(event: Event): void {\n const {scrollTop, scrollLeft} = event.target as Element;\n\n this.scrollLeftOffset = scrollLeft;\n\n this.productionScheduleVerifyViewportTopPosition = scrollTop;\n\n this.verticalPositionOfBottomScrollIndicator =\n this.productionScheduleVerifyViewportTopPosition +\n this.productionScheduleVerifyContainer.nativeElement.clientHeight -\n this.horizontalAxisHeightInPx -\n this.getVerifyHeaderHeight() -\n this.scrollIndicatorDimensionsInPx.heightInPx;\n\n this.canShowBottomScrollIndicator = this.isHoveringProductionSchedulePath() && this.canScrollToBottom();\n }\n\n public getOriginProductionScheduleVerifyWidth(): number {\n let result: number;\n if (this.isProductionScheduleDisplayOverview()) {\n const {left} = this.productionScheduleVerifyMargin;\n result = this.productionScheduleVerifyContainerWidth - left;\n } else if (this.isProductionScheduleDisplayDetailView()) {\n result = this.originalProductionScheduleVerifyWidth * this.aspectRatio.width;\n }\n\n return isNaN(result) ? 0 : result;\n }\n\n public getProductionScheduleVerifyHeight(): void {\n let result = 0;\n\n if (this.isProductionScheduleDisplayOverview()) {\n result = this.productionScheduleVerifyContainerHeight - this.horizontalAxisHeightInPx - this.getVerifyHeaderHeight();\n } else if (this.isProductionScheduleDisplayDetailView()) {\n result = this.originalProductionScheduleVerifyHeight * this.aspectRatio.height;\n }\n\n this.productionScheduleVerifyHeight = AssertionUtils.isNumber(result) && !Number.isNaN(result) ? result : 0;\n }\n\n public canShowZone(zone: Zone): boolean {\n return this.getZoneWidth(zone) > 0;\n }\n\n public getZoneWidth(zone: Zone): number {\n return Math.min(this.getProductionScheduleVerifyWidth() - this.getZonePosition(zone), zone.technicalWidthInDents * this.aspectRatio.width);\n }\n\n public getZonePosition(zone: Zone): number {\n const maximumZonePosition = this.getProductionScheduleVerifyWidth() - this.zoneIndicatorLineWidthInPx;\n return Math.min((zone.startDent - ProductionScheduleVerifyComponent.dentOffset) * this.aspectRatio.width, maximumZonePosition);\n }\n\n public hoveredProductionSchedulePathComponent(components: {\n coloredYarnSetComponent: ProductionScheduleColoredYarnSetComponent;\n pathComponent: ProductionSchedulePathOfColoredYarnSetComponent;\n }): void {\n this.previousHoveredProductionSchedulePathComponent = this.currentHoveredProductionSchedulePathComponent;\n this.currentHoveredProductionSchedulePathComponent = components.pathComponent;\n if (!AssertionUtils.isNullOrUndefined(components.pathComponent)) {\n this.horizontalPositionOfScrollIndicators = this.calculateHorizontalPositionOfScrollIndicators(components.coloredYarnSetComponent, components.pathComponent);\n this.targetPositionOfTopScrollIndicator = this.calculateTargetPositionOfTopScrollIndicator(components.pathComponent);\n this.targetPositionOfBottomScrollIndicator = this.calculateTargetPositionOfBottomScrollIndicator();\n\n this.changeDetectorRef.detectChanges();\n\n this.canShowBottomScrollIndicator = this.isHoveringProductionSchedulePath() && this.canScrollToBottom();\n\n if (this.canShowBottomScrollIndicator && !AssertionUtils.isNullOrUndefined(this.bottomScrollIndicator)) {\n this.setBottomScrollIndicatorEventHandlers();\n }\n }\n setTimeout(() => (this.previousHoveredProductionSchedulePathComponent = null));\n }\n\n public getProductionScheduleColoredYarnSetWidth(productionScheduleColoredYarnSet: OverviewListColoredYarnSetWithStartDent): number {\n return productionScheduleColoredYarnSet.technicalWidthInDents * this.aspectRatio.width;\n }\n\n public getToolbarTopWidth(): number {\n return this.getContentWidth() - this.productionScheduleVerifyMargin.left;\n }\n\n public getContentWidth(): number {\n const {left, right} = this.productionScheduleVerifyMargin;\n let result = this.getOriginProductionScheduleVerifyWidth();\n\n if (this.isProductionScheduleDisplayOverview()) {\n result += right;\n } else if (this.isProductionScheduleDisplayDetailView()) {\n result += left;\n }\n\n return result;\n }\n\n public getProductionScheduleVerifyHorizontalAxisWidth(): number {\n let result = this.getOriginProductionScheduleVerifyWidth();\n result -= this.productionScheduleVerifyMargin.right;\n\n return !isNaN(result) ? result : 0;\n }\n\n public getZoneIndicatorLineHorizontalPosition(zone: Zone): number {\n return (this.getZoneWidth(zone) + this.zoneIndicatorLineWidthInPx) / 2;\n }\n\n public trackByProductionSchedulePathsOfColoredYarnSet = (index: number, productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet): number =>\n productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent;\n\n public canShowMinimumBuggyLengthWarningForProductionSchedulePath(productionSchedulePath: ProductionSchedulePath): boolean {\n return productionSchedulePath.totalLengthInPicks < this.buggyLengthMinInPicks;\n }\n\n public canShowMaximumBuggyLengthWarningForProductionSchedulePath(productionSchedulePath: ProductionSchedulePath): boolean {\n return productionSchedulePath.totalLengthInPicks > this.buggyLengthMaxInPicks;\n }\n\n public canShowMaximumBuggyLengthWarningForProductionSchedulePathsOfColoredYarnSet(productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet): boolean {\n return (\n this.productionSchedulePhase === ProductionSchedulePhase.BUILD || (this.isProductionSchedulePhaseVerify() && AssertionUtils.isNullOrUndefined(productionSchedulePathsOfColoredYarnSet.errors))\n );\n }\n\n public canShowFreeAndRestZonesEditor(): boolean {\n return this.isProductionSchedulePhaseVerify() && this.productionSchedule.machine.canHaveRestAndFreeZonesAndPathLabels();\n }\n\n public isProductionScheduleDisplayOverview(): boolean {\n return this.selectedProductionScheduleDisplay === ProductionScheduleDisplay.OVERVIEW;\n }\n\n public getWidthInDentsWithAspectRatio(technicalWidthInDents: number): number {\n return technicalWidthInDents * this.aspectRatio.width;\n }\n\n public isProductionSchedulePath(item: ProductionSchedulePath | RestZone | FreeZone): boolean {\n return item instanceof ProductionSchedulePath;\n }\n\n public getProductionSchedulePathLabel(productionSchedulePath: ProductionSchedulePath, width: number): string {\n if (width > 230) {\n return `${this.translate.instant('PRODUCTION_ORDER.DESIGN_LIBRARY.ORDER_LINES.PATH')} ${productionSchedulePath.pathNumber}`;\n } else {\n return `P${productionSchedulePath.pathNumber}`;\n }\n }\n\n public isRestZone(item: ProductionSchedulePath | RestZone | FreeZone): boolean {\n return item instanceof RestZone;\n }\n\n public getRestZoneTooltip(item: RestZone): string {\n return [\n this.translate.instant('PRODUCTION_ORDER.WEAVE_PLAN.REST_ZONE.REST_ZONE', {count: 1}) + ':',\n item.technicalWidthInDents,\n this.translate.instant('GENERAL.UNIT.DENTS'),\n '/',\n convertCommercialUnit({\n from: {\n unit: Unit.METER,\n value: convertDentsToWidthInMeter(item.technicalWidthInDents, this.productionSchedule.machineQuality.reedDensity * 1000)\n },\n to: this.commercialUnit\n }) + this.commercialUnit,\n 'x',\n this.buggyLengthMaxInPicks,\n this.translate.instant('GENERAL.UNIT.PICKS'),\n '/',\n convertCommercialUnit({\n from: {\n unit: Unit.MILLIMETER,\n value: this.buggyLengthMaxInMM\n },\n to: this.commercialUnit\n }) + this.commercialUnit\n ].join(' ');\n }\n\n public getRestLabelForProductionSchedulePathsOfColoredYarnSet(productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet): string {\n let label = `${this.translate.instant('PRODUCTION_ORDER.WEAVE_PLAN.WEAVE_PLAN_SUMMARY.REST_LENGTH')} `;\n\n if (this.displayTechnicalUnit) {\n const maxProductionSchedulePathInPicks = productionSchedulePathsOfColoredYarnSet.productionSchedulePaths.reduce((maxPath: ProductionSchedulePath, currentPath: ProductionSchedulePath) => {\n return currentPath.totalLengthInPicks > (maxPath?.totalLengthInPicks || 0) ? currentPath : maxPath;\n }, null);\n\n const productionScheduleHeightInPicks = maxProductionSchedulePathInPicks ? Math.max(maxProductionSchedulePathInPicks.totalLengthInPicks, this.buggyLengthMinInPicks) : this.buggyLengthMinInPicks;\n\n const remainingWidthInDents =\n productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.technicalWidthInDents - productionSchedulePathsOfColoredYarnSet.getProductionSchedulePathsWidthInDents();\n\n label += this.getLabelForTechnicalDimensions(remainingWidthInDents, Math.round(productionScheduleHeightInPicks) || 0);\n } else {\n const remainingWidthInMillimeters =\n convertDentsToWidthInMeter(productionSchedulePathsOfColoredYarnSet?.productionScheduleColoredYarnSet?.technicalWidthInDents, this.productionSchedule.machineQuality.reedDensity * 1000) -\n productionSchedulePathsOfColoredYarnSet.getProductionSchedulePathsWidthInMillimeters();\n\n const maxProductionSchedulePathInMM = productionSchedulePathsOfColoredYarnSet.productionSchedulePaths.reduce((maxPath: ProductionSchedulePath, currentPath: ProductionSchedulePath) => {\n return currentPath.totalLengthInMM > (maxPath?.totalLengthInMM || 0) ? currentPath : maxPath;\n }, null);\n\n const buggyLengthMinInMeters = convertPicksToHeightInMeter(this.buggyLengthMinInPicks, this.productionSchedule.machineQuality.pickDensity * 1000);\n const buggyLengthMinInMillimeters = convertCommercialUnit({from: {unit: Unit.METER, value: buggyLengthMinInMeters}, to: Unit.MILLIMETER});\n\n const productionScheduleHeightInMM = maxProductionSchedulePathInMM ? Math.max(maxProductionSchedulePathInMM.totalLengthInMM, buggyLengthMinInMillimeters) : buggyLengthMinInMillimeters;\n\n const lengthInCommercialUnit = this.convertValueToCommercialUnit(productionScheduleHeightInMM, Unit.MILLIMETER);\n const widthInCommercialUnit = this.convertValueToCommercialUnit(remainingWidthInMillimeters, Unit.MILLIMETER);\n\n label += this.getLabelForCommercialDimensions(widthInCommercialUnit, lengthInCommercialUnit);\n }\n\n return label;\n }\n\n public getMinimumProductionScheduleVerifyTechnicalHeight(): number {\n const longestPathLengthInPicks = getLongestProductionSchedulePath(this.productionSchedule?.productionSchedulePathsOfColoredYarnSets);\n let currentAvailableSpaceForSchedule: number;\n\n if (!AssertionUtils.isNullOrUndefined(this.productionSchedule?.buggy)) {\n currentAvailableSpaceForSchedule = this.availableSpaceInBuggyInPicks + longestPathLengthInPicks;\n }\n\n if (!AssertionUtils.isNullOrUndefined(currentAvailableSpaceForSchedule) && !isNaN(currentAvailableSpaceForSchedule) && currentAvailableSpaceForSchedule < this.buggyLengthMaxInPicks) {\n return Math.max(currentAvailableSpaceForSchedule, longestPathLengthInPicks);\n } else {\n return Math.max(longestPathLengthInPicks, this.buggyLengthMaxInPicks);\n }\n }\n\n public getMinimumProductionScheduleVerifyInMM(): number {\n const longestPathLengthInMM = this.getLongestPathLengthInMM();\n const availableSpaceInMM = convertCommercialUnit({\n from: {\n value: this.availableSpaceInBuggyInCommercialUnit ?? 0,\n unit: Unit.CENTIMETER\n },\n to: Unit.MILLIMETER\n });\n let currentAvailableSpaceForSchedule: number;\n\n if (!AssertionUtils.isNullOrUndefined(this.productionSchedule?.buggy)) {\n currentAvailableSpaceForSchedule = Math.round(availableSpaceInMM + longestPathLengthInMM);\n }\n\n if (!AssertionUtils.isNullOrUndefined(currentAvailableSpaceForSchedule) && !isNaN(currentAvailableSpaceForSchedule) && currentAvailableSpaceForSchedule < this.buggyLengthMaxInMM) {\n return Math.max(currentAvailableSpaceForSchedule, longestPathLengthInMM);\n } else {\n return Math.max(longestPathLengthInMM, this.buggyLengthMaxInMM);\n }\n }\n\n public getProductionScheduleVerifyTechnicalWidth(): number {\n return this.productionSchedule.machine.dentsForFabric;\n }\n\n public getProductionScheduleVerifyCommercialWidth(): number {\n return convertDentsToWidthInMeter(this.productionSchedule.machine.dentsForFabric, this.productionSchedule.machineQuality.reedDensity * 1000) * 1000;\n }\n\n public canShowHeader(width: number): boolean {\n return width > 100;\n }\n\n public canShowTotalHeight(width: number): boolean {\n return width > 100;\n }\n\n public getFlexDirection(width: number): string {\n return width > 320 ? 'flex-row' : 'flex-column';\n }\n\n public getTotalHeight(item: ProductionSchedulePath, width: number): string {\n const totalHeightInCommercialUnit = Math.ceil(\n convertCommercialUnit({\n from: {\n value: item.totalLengthInMM ?? 0,\n unit: Unit.MILLIMETER\n },\n to: this.commercialUnit\n })\n );\n\n if (width > 150) {\n return `${item.totalLengthInPicks} ${this.translate.instant('GENERAL.UNIT.PICKS')} / ${totalHeightInCommercialUnit} ${this.translate.instant('GENERAL.UNIT.CENTIMETER')}`;\n } else {\n return `${item.totalLengthInPicks} / ${totalHeightInCommercialUnit}`;\n }\n }\n\n private reInitialiseProductionScheduleVerify(): void {\n setTimeout(() => {\n this.initialiseProductionScheduleVerifyContainerDimensions();\n this.initialiseProductionScheduleVerify();\n });\n }\n\n private zoom(): void {\n this.setAspectRatio();\n this.updateHorizontalAndVerticalAxis();\n }\n\n private isHoveringProductionSchedulePath(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.currentHoveredProductionSchedulePathComponent) || !AssertionUtils.isNullOrUndefined(this.previousHoveredProductionSchedulePathComponent);\n }\n\n private canScrollToTop(): boolean {\n return this.productionScheduleVerifyContainer.nativeElement.scrollTop > this.targetPositionOfTopScrollIndicator;\n }\n\n private canScrollToBottom(): boolean {\n return this.productionScheduleVerifyContainer.nativeElement.scrollTop < this.targetPositionOfBottomScrollIndicator;\n }\n\n private initialiseProductionScheduleVerifyContainerDimensions(): void {\n this.productionScheduleVerifyContainerHeight = this.elementRef.nativeElement.clientHeight - this.getActionBarHeight() - this.getZonesContainerHeight() - 60;\n this.productionScheduleVerifyContainerWidth = this.elementRef.nativeElement.clientWidth;\n }\n\n private initialiseProductionScheduleVerify(): void {\n this.setUpDimensionsForProductionScheduleVerify();\n\n setTimeout(() => {\n this.initialiseSelections();\n this.setAspectRatioAndUpdateProductionScheduleVerifyContainer();\n this.scrollToBottomOfProductionScheduleVerify();\n });\n }\n\n private setUpDimensionsForProductionScheduleVerify(): void {\n this.setOriginalProductionScheduleVerifyHeight();\n\n this.originalProductionScheduleVerifyWidth = this.productionSchedule.getTotalProductionScheduleWidthInDents();\n\n this.canShowProductionScheduleVerify = true;\n }\n\n private calculateHorizontalPositionOfScrollIndicators(\n coloredYarnSetComponent: ProductionScheduleColoredYarnSetComponent,\n productionSchedulePathComponent: ProductionSchedulePathOfColoredYarnSetComponent\n ): number {\n return (\n coloredYarnSetComponent.getProductionScheduleColoredYarnSetLeft() +\n productionSchedulePathComponent.getProductionSchedulePathLeft() +\n (productionSchedulePathComponent.getProductionSchedulePathWidth() - this.scrollIndicatorDimensionsInPx.widthInPx) / 2\n );\n }\n\n private calculateTargetPositionOfTopScrollIndicator(productionSchedulePathComponent: ProductionSchedulePathOfColoredYarnSetComponent): number {\n return Math.floor(productionSchedulePathComponent.getProductionSchedulePathTop());\n }\n\n private calculateTargetPositionOfBottomScrollIndicator(): number {\n return this.productionScheduleVerifyContainer.nativeElement.scrollHeight - this.productionScheduleVerifyContainer.nativeElement.clientHeight;\n }\n\n private getLongestPathLengthInMM(): number {\n let longestPathLengthInMM = 0;\n\n this.productionSchedule?.productionSchedulePathsOfColoredYarnSets?.forEach((productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet) => {\n productionSchedulePathsOfColoredYarnSet?.productionSchedulePaths?.forEach((productionSchedulePath: ProductionSchedulePath) => {\n longestPathLengthInMM = Math.max(longestPathLengthInMM, productionSchedulePath?.totalLengthInMM);\n });\n });\n\n return longestPathLengthInMM;\n }\n\n private setTopScrollIndicatorEventHandlers(): void {\n this.topScrollIndicatorListenerMouseEnterFn = this.renderer.listen(this.topScrollIndicator.nativeElement, 'mouseenter', () => {\n this.currentHoveredProductionSchedulePathComponent = this.previousHoveredProductionSchedulePathComponent;\n });\n this.topScrollIndicatorListenerMouseClickFn = this.renderer.listen(this.topScrollIndicator.nativeElement, 'click', () => {\n this.productionScheduleVerifyContainer.nativeElement.scrollTo({\n left: this.productionScheduleVerifyContainer.nativeElement.scrollLeft,\n top: this.targetPositionOfTopScrollIndicator\n });\n });\n }\n\n private setBottomScrollIndicatorEventHandlers(): void {\n this.bottomScrollIndicatorListenerMouseEnterFn = this.renderer.listen(this.bottomScrollIndicator.nativeElement, 'mouseenter', () => {\n this.currentHoveredProductionSchedulePathComponent = this.previousHoveredProductionSchedulePathComponent;\n });\n this.bottomScrollIndicatorListenerMouseClickFn = this.renderer.listen(this.bottomScrollIndicator.nativeElement, 'click', () => {\n this.productionScheduleVerifyContainer.nativeElement.scrollTo({\n left: this.productionScheduleVerifyContainer.nativeElement.scrollLeft,\n top: this.targetPositionOfBottomScrollIndicator\n });\n });\n }\n\n private initialiseSelections(): void {\n if (!AssertionUtils.isNullOrUndefined(this.productionScheduleVerify)) {\n this.productionScheduleVerifySelection = d3Select(this.productionScheduleVerify?.nativeElement);\n }\n\n if (!AssertionUtils.isNullOrUndefined(this.productionScheduleVerifyVerticalAxis)) {\n this.productionScheduleVerifyVerticalAxisSelection = d3Select(this.productionScheduleVerifyVerticalAxis.nativeElement);\n }\n }\n\n private setAspectRatioAndUpdateProductionScheduleVerifyContainer(): void {\n this.setAspectRatio();\n this.updateHorizontalAndVerticalAxis();\n }\n\n private getTickLabelTranslationWithUnit(value: number, unit: Unit): string {\n return `${value.toString(10)} ${this.translate.instant(`GENERAL.UNIT.${EnumUtils.getKeyFromValue(Unit, unit)}`)}`;\n }\n\n private getTickFormatForHorizontalAxis(value: number, index: number, numberOfTicks: number): string {\n if (this.displayTechnicalUnit) {\n return this.getHorizontalTickFormat(value, Unit.DENTS, numberOfTicks, index);\n } else {\n const valueInMeters = convertDentsToWidthInMeter(value, this.productionSchedule.machineQuality.reedDensity * 1000);\n const valueInCommercialUnit = this.convertValueToCommercialUnit(valueInMeters, Unit.METER);\n return this.getHorizontalTickFormat(valueInCommercialUnit, this.commercialUnit, numberOfTicks, index);\n }\n }\n\n private getHorizontalTickFormat(value: number, unit: Unit, numberOfTicks: number, index: number): string {\n const tickLabelTranslationWithUnit = this.getTickLabelTranslationWithUnit(value, unit);\n return numberOfTicks <= 1 || index === numberOfTicks - 1 ? tickLabelTranslationWithUnit : value.toString(10);\n }\n\n private updateHorizontalAxis(): void {\n let width = this.getOriginProductionScheduleVerifyWidth();\n\n if (this.isProductionScheduleDisplayOverview()) {\n width -= this.productionScheduleVerifyMargin.right;\n }\n\n const horizontalAxis = d3ScaleLinear().domain([1, this.originalProductionScheduleVerifyWidth]).range([0, width]);\n const numberOfTicks = horizontalAxis.ticks(this.approximateHorizontalTicksCount).length;\n\n d3AxisBottom(horizontalAxis)\n .tickSizeInner(10)\n .tickValues(horizontalAxis.ticks(this.approximateHorizontalTicksCount))\n .tickPadding(8)\n .tickSizeOuter(0)\n .tickFormat((value: number, index: number) => this.getTickFormatForHorizontalAxis(value, index, numberOfTicks))(this.productionScheduleVerifyHorizontalAxisSelection);\n }\n\n private updateHorizontalAndVerticalAxis(): void {\n const canUpdateHorizontalAndVerticalAxis =\n !AssertionUtils.isNullOrUndefined(this.productionScheduleVerifyVerticalAxisSelection) && !AssertionUtils.isNullOrUndefined(this.productionScheduleVerifyHorizontalAxisSelection);\n\n if (canUpdateHorizontalAndVerticalAxis) {\n this.updateHorizontalAxis();\n this.resizeColorListPreviewComponents();\n }\n }\n\n private scrollToBottomOfProductionScheduleVerify(): void {\n this.changeDetectorRef.detectChanges();\n\n this.productionScheduleVerifyContainer.nativeElement.scrollTo({\n left: 0,\n top: this.productionScheduleVerifyContainer.nativeElement.scrollHeight\n });\n }\n\n private setAspectRatio(): void {\n if (this.isProductionScheduleDisplayOverview()) {\n this.aspectRatio = {\n width: MathUtils.divide(this.getProductionScheduleVerifyWidth(), this.originalProductionScheduleVerifyWidth),\n height: MathUtils.divide(this.productionScheduleVerifyHeight, this.originalProductionScheduleVerifyHeight)\n };\n } else if (this.isProductionScheduleDisplayDetailView()) {\n this.aspectRatio = {\n width: this.zoomLevel,\n height: this.zoomLevel\n };\n }\n }\n\n private resizeColorListPreviewComponents(): void {\n this.colorListPreviewComponents.toArray().forEach((colorListPreviewComponent: ColorListPreviewWithPositionComponent) => {\n colorListPreviewComponent.calculateCreelPositionsToShow();\n });\n }\n\n private isProductionScheduleDisplayDetailView(): boolean {\n return this.selectedProductionScheduleDisplay === ProductionScheduleDisplay.DETAILVIEW;\n }\n\n private setProductionScheduleZones(): void {\n if (this.isProductionSchedulePhaseVerify()) {\n if (AssertionUtils.isNullOrUndefined(this.suggestedRestZones)) {\n this.suggestedRestZones = cloneDeep(this.productionSchedule.restZones);\n }\n\n if (AssertionUtils.isNullOrUndefined(this.suggestedFreeZones)) {\n this.suggestedFreeZones = cloneDeep(this.productionSchedule.freeZones);\n }\n } else {\n this.suggestedRestZones = null;\n this.suggestedFreeZones = null;\n }\n }\n\n private getVerifyHeaderHeight(): number {\n return !AssertionUtils.isNullOrUndefined(this.verifyHeader) ? this.verifyHeader.nativeElement.clientHeight : 0;\n }\n\n private getActionBarHeight(): number {\n return !AssertionUtils.isNullOrUndefined(this.actionBarElement) ? this.actionBarElement.nativeElement.clientHeight : 0;\n }\n\n private onSelectedProductionScheduleDisplayChange(): void {\n if (!AssertionUtils.isNullOrUndefined(this.productionScheduleVerifySelection)) {\n this.setAspectRatio();\n this.reInitialiseProductionScheduleVerify();\n }\n }\n\n private setOriginalProductionScheduleVerifyHeight(): void {\n this.originalProductionScheduleVerifyHeight = this.getMinimumProductionScheduleVerifyTechnicalHeight();\n }\n\n private observeElementResize(): void {\n let resizeObserver: ResizeObserver;\n\n new Observable((observer: Observer) => {\n resizeObserver = new ResizeObserver(() => {\n if (this.selectedProductionScheduleDisplay === ProductionScheduleDisplay.OVERVIEW && this.canShowProductionScheduleVerify) {\n observer.next();\n }\n });\n resizeObserver.observe(this.elementRef.nativeElement);\n })\n .pipe(debounceTime(500), takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe({\n next: () => this.onSelectedProductionScheduleDisplayChange(),\n complete: () => resizeObserver.disconnect()\n });\n }\n\n private getZonesContainerHeight(): number {\n return this.zonesContainerElement?.nativeElement.clientHeight ?? 0;\n }\n\n private convertValueToCommercialUnit(value: number, fromUnit: Unit): number {\n const result = convertCommercialUnit({\n from: {\n value: value ?? 0,\n unit: fromUnit\n },\n to: this.commercialUnit\n });\n\n return Math.round(result * 100) / 100;\n }\n\n private getLabelForTechnicalDimensions(technicalWidthInDents: number, technicalHeightInPicks: number): string {\n return `(${technicalWidthInDents} ${this.translate.instant(`GENERAL.UNIT.${EnumUtils.getKeyFromValue(Unit, Unit.DENTS)}`)} X ${technicalHeightInPicks} ${this.translate.instant(\n `GENERAL.UNIT.${EnumUtils.getKeyFromValue(Unit, Unit.PICKS)}`\n )})`;\n }\n\n private getLabelForCommercialDimensions(commercialWidthInCommercialUnit: number, commercialHeightInCommercialUnit: number): string {\n return `(${commercialWidthInCommercialUnit} X ${commercialHeightInCommercialUnit} ${this.translate.instant(`GENERAL.UNIT.${EnumUtils.getKeyFromValue(Unit, this.commercialUnit)}`)})`;\n }\n\n private finalReInitialiseProductionScheduleVerify(): void {\n setTimeout(() => {\n this.initialiseProductionScheduleVerifyContainerDimensions();\n this.getProductionScheduleVerifyHeight();\n }, 1000);\n }\n\n private initialiseDebounceSubjects(): void {\n this.debounceSubjectInitialise.pipe(debounceTime(300)).subscribe(() => {\n this.setOriginalProductionScheduleVerifyHeight();\n this.setAspectRatioAndUpdateProductionScheduleVerifyContainer();\n });\n\n this.debounceSubjectReinitialise.pipe(debounceTime(300)).subscribe(() => {\n setTimeout(() => {\n this.reInitialiseProductionScheduleVerify();\n this.getProductionScheduleVerifyHeight();\n }, 100);\n });\n }\n}\n","import {Injectable} from '@angular/core';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {OverviewListColoredYarnSetWithStartDent} from '@domain/textile-data/creel/overview-list-colored-yarn-set-with-start-dent';\nimport {ListDrawingConfiguration} from '@presentation/components/drawing-list/list-drawing-configuration';\nimport {IRowNode} from 'ag-grid-community';\nimport {Observable, Subject} from 'rxjs';\n\n@Injectable()\nexport class GroupedDrawingsSelectionService {\n private readonly groupedDrawingsSelected = new Subject();\n private readonly onDetailRowsSelectionChanged = new Subject<{parentNode: IRowNode; parentSelectionState: boolean; drawingsSelected: ListDrawingConfiguration[]}>();\n public readonly selectedPath = new Subject();\n public readonly selectedRestPathColoredYarnSet = new Subject();\n public readonly cellRendererParams = new Subject();\n\n private readonly SELECTION_STATE = {\n PARTIAL: undefined,\n ALL_SELECTED: true,\n NONE_SELECTED: false\n };\n\n public getGroupedDrawingsSelected(): Observable {\n return this.groupedDrawingsSelected.asObservable();\n }\n\n public setGroupedDrawingsSelected(drawingIdsSelected: ListDrawingConfiguration[]): void {\n this.groupedDrawingsSelected.next(drawingIdsSelected);\n }\n\n public setDetailRowSelected(parentNode: IRowNode, parentSelectionState: boolean, drawingsSelected: ListDrawingConfiguration[]): void {\n this.onDetailRowsSelectionChanged.next({parentNode, parentSelectionState, drawingsSelected});\n }\n\n public getdetailRowSelected(): Observable<{parentNode: IRowNode; parentSelectionState: boolean; drawingsSelected: ListDrawingConfiguration[]}> {\n return this.onDetailRowsSelectionChanged.asObservable();\n }\n\n public getParentSelectionState(nodeData: ListDrawingConfiguration[] | number[], selectedDrawings: ListDrawingConfiguration[] | IRowNode[]): boolean {\n if (nodeData.length === selectedDrawings.length) {\n return this.SELECTION_STATE.ALL_SELECTED;\n }\n if (selectedDrawings.length === 0) {\n return this.SELECTION_STATE.NONE_SELECTED;\n }\n\n return this.SELECTION_STATE.PARTIAL;\n }\n\n public updateSelectedPath(path: ProductionSchedulePath): void {\n this.selectedPath.next(path);\n }\n\n public updateSelectedRestPathColoredYarnSet(coloredYarnSet: OverviewListColoredYarnSetWithStartDent): void {\n this.selectedRestPathColoredYarnSet.next(coloredYarnSet);\n }\n\n public updateDetailCellRendererParams(params: any): void {\n this.cellRendererParams.next(params);\n }\n}\n","import {Directive, EventEmitter, Inject, Input, OnChanges, OnInit, Output, SimpleChanges} from '@angular/core';\nimport {FixedShape} from '@domain/drawing-library/fixed-shape.enum';\nimport {Drawing} from '@domain/production-schedule/drawing';\nimport {DrawingConfiguration} from '@domain/production-schedule/drawing-configuration';\nimport {DrawingConfigurationWithColorAndYarnSet} from '@domain/production-schedule/drawing-configuration-with-color-and-yarn-set';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionScheduleDrawingViewMode} from '@domain/production-schedule/production-schedule-drawing-view-mode.enum';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {Permission} from '@domain/profile/permission.enum';\nimport {Subscription} from '@domain/profile/subscription';\nimport {TargetForListOfDrawingsEnum} from '@domain/target-for-list-of-drawings.enum';\nimport {OverviewListColoredYarnSetWithStartDent} from '@domain/textile-data/creel/overview-list-colored-yarn-set-with-start-dent';\nimport {StatusBarTarget} from '@domain/textile-data/status-bar-target.constants';\nimport {AUTHENTICATION, Authentication} from '@infrastructure/http/authentication/authentication';\nimport {Drawings, DRAWINGS} from '@infrastructure/http/drawing/drawings';\nimport {HttpStatusBarService} from '@infrastructure/http/status-bar/http-status-bar.service';\nimport {OrderlineSettingsData} from '@presentation/components/dialog-button/dialog-data/order-lines-settings/order-lines-setting-data.interface';\nimport {ListDrawingConfiguration} from '@presentation/components/drawing-list/list-drawing-configuration';\nimport {DrawingLibraryHelper} from '@presentation/pages/texedit/drawing-library/drawing-library-new-listview/drawing-library-helper';\nimport {BackendLimitsConstants} from '@shared/constants/backend-limits.constants';\nimport {\n AssertionUtils,\n BaseComponent,\n ColDefBuilderFactoryService,\n convertToCommercialUnitCentimeter,\n convertUnit,\n DialogBuilderFactoryService,\n EmptyCellRendererComponent,\n GridModel,\n GridOptionsBuilderFactoryService,\n StatusBar,\n TranslateService,\n Unit,\n UnitValue\n} from '@vdw/angular-component-library';\nimport {AgGridAngular} from 'ag-grid-angular';\nimport {\n AdvancedFilterModel,\n CellMouseOverEvent,\n CellRendererSelectorResult,\n ColDef,\n FilterModel,\n ICellRendererParams,\n IServerSideDatasource,\n IServerSideGetRowsParams,\n RowNode,\n RowSelectedEvent,\n SortModelItem,\n ValueFormatterParams,\n ValueGetterParams\n} from 'ag-grid-community';\nimport {Observable, of, Subject} from 'rxjs';\nimport {map, takeUntil} from 'rxjs/operators';\nimport {PRODUCTION_SCHEDULE_PLAN, ProductionSchedulePlan} from '../../../plan/production-schedule-plan';\nimport {GroupedDrawing} from '../drawings-grouped-view/grouped-drawing';\nimport {GroupedDrawingsSelectionService} from '../drawings-grouped-view/grouped-drawings-selection.service';\n\n@Directive()\nexport abstract class GroupedDesignBaseComponent extends BaseComponent implements OnInit, OnChanges {\n @Input() public selectedPath: ProductionSchedulePath;\n @Input() public isPreSelection = false;\n @Input() public isProductionSchedule = false;\n @Input() public productionSchedule: ProductionSchedule;\n @Input() public presetGridModel = null;\n @Input() public productionScheduleItemMultiplier: number;\n @Input() public selectedRestPathColoredYarnSet: OverviewListColoredYarnSetWithStartDent;\n @Input() public productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet;\n @Input() public availableSpaceInBuggyInPicks: number;\n @Input() public buggyLengthMaxInPicks: number;\n @Input() public preselectedDrawings: ListDrawingConfiguration[] = [];\n @Input() public preselectedDesignIds: number[] = [];\n @Input() public preselectedConfigurationIds: number[] = [];\n @Input() public selectedPathContentRowData: ProductionScheduleItemInPathGroup;\n @Output() protected drawingIdSelected = new EventEmitter();\n @Output() protected configurationIdSelected = new EventEmitter();\n @Output() public selectedViewModeChanged = new EventEmitter();\n @Output() public selectedPathOutput = new EventEmitter();\n @Output() public selectedRestPathColoredYarnSetOutput = new EventEmitter();\n\n public groupedGridModel: GridModel;\n public groupedDrawings: GroupedDrawing[];\n public detailGridModel: GridModel;\n public statusBar: StatusBar;\n public hasQuantitySuggestionPermission: boolean = false;\n\n public readonly COMMERCIAL_WIDTH_IN_CM = 'commercialWidthInCM';\n public readonly SLICE_SIZE = 30;\n public readonly DETAIL_ROW_HEADER_HEIGHT = 36;\n public readonly DETAIL_ROW_VERTICAL_PADDING = 32;\n public readonly DETAIL_ROW_SCROLL_BAR = 18;\n public readonly syncWithProductionScheduleSubject = new Subject();\n\n public readonly COLUMN_UNITS_MAP = new Map Unit}>([\n [this.COMMERCIAL_WIDTH_IN_CM, {dataFromUnit: Unit.MILLIMETER, getDisplayUnit: (): Unit => Unit.CENTIMETER}]\n ]);\n\n public viewModes: ProductionScheduleDrawingViewMode[] = [\n ProductionScheduleDrawingViewMode.DESIGNS_LIST,\n ProductionScheduleDrawingViewMode.ORDER_LINES,\n ProductionScheduleDrawingViewMode.GROUPED_ORDER_LINES,\n ProductionScheduleDrawingViewMode.GROUPED_DESIGNS\n ];\n\n public selectedViewMode = ProductionScheduleDrawingViewMode.GROUPED_DESIGNS;\n public showOnlyPreSelectedDrawings = false;\n\n private lastFocusedGroupedDrawingNodeId: string;\n private readyToFetchRows: boolean = false;\n\n private readonly WIDTH_IN_PX = 'widthInPx';\n private readonly SHAPE = 'shape';\n private readonly SLICE_SIZE_DETAILS = 30;\n\n protected groupedGridInstance: AgGridAngular | null = null;\n\n public constructor(\n @Inject(AUTHENTICATION) protected authentication: Authentication,\n @Inject(DRAWINGS) protected drawings: Drawings,\n @Inject(PRODUCTION_SCHEDULE_PLAN) protected readonly productionSchedulePlan: ProductionSchedulePlan,\n protected readonly gridOptionsBuilderFactoryService: GridOptionsBuilderFactoryService,\n protected readonly colDefBuilderFactory: ColDefBuilderFactoryService,\n protected readonly statusBarService: HttpStatusBarService,\n protected readonly translate: TranslateService,\n protected readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n protected readonly groupedDrawingsSelectionService: GroupedDrawingsSelectionService,\n protected readonly drawingLibraryHelper: DrawingLibraryHelper\n ) {\n super();\n }\n\n public ngOnInit(): void {\n const currentSubscription = this.authentication.getCurrentSubscription();\n\n this.filterViewModes(currentSubscription);\n }\n\n protected setGroupedDesignBaseComponentProperties(grid: AgGridAngular): void {\n this.groupedGridInstance = grid;\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (!AssertionUtils.isEmpty(this.preselectedDesignIds) && !this.isPreSelection && 'preselectedDesignIds' in changes) {\n this.showOnlyPreSelectedDrawings = true;\n }\n\n if (!this.isPreSelection) {\n this.setInitializationFilters();\n }\n\n this.groupedDrawingsSelectionService.updateDetailCellRendererParams(this.getDetailCellRendererParams());\n }\n\n public updateGrid(gridModel: GridModel): void {\n this.groupedGridInstance.api.setFilterModel(gridModel.filterModel);\n }\n\n public getSelectedRows(): number {\n return this.preselectedDesignIds ? this.preselectedDesignIds.length : 0;\n }\n\n public getCustomSettingsDialogData(): any {\n return {\n showPreselectedItems: this.showOnlyPreSelectedDrawings,\n viewMode: this.selectedViewMode\n } as OrderlineSettingsData;\n }\n\n public onSelectedViewModeChanged(selectedViewMode: ProductionScheduleDrawingViewMode): void {\n this.selectedViewModeChanged.emit(selectedViewMode);\n }\n\n public onCustomSettingsChanged(settings: {showPreselectedItems: boolean}): void {\n this.showOnlyPreSelectedDrawings = settings.showPreselectedItems ?? this.showOnlyPreSelectedDrawings;\n this.setInitializationFilters();\n }\n\n public onCellMouseOver(event: CellMouseOverEvent): void {\n this.lastFocusedGroupedDrawingNodeId = event.node.id;\n }\n\n public parentNodeSelected(event: RowSelectedEvent): void {\n if (event.node.data.updatingFromDetails) {\n return;\n }\n\n if (this.lastFocusedGroupedDrawingNodeId !== event.node.id) {\n const selectedDrawings = this.preselectedDrawings.filter((detailDrawingConfig: ListDrawingConfiguration) =>\n AssertionUtils.isNullOrUndefined(detailDrawingConfig.configurationId)\n ? event.node.data.drawingIds.includes(detailDrawingConfig.drawing.id)\n : event.node.data.configurationIds.includes(detailDrawingConfig.configurationId)\n );\n\n const selectionState = this.groupedDrawingsSelectionService.getParentSelectionState(event.node.data.drawingIds, selectedDrawings);\n\n (event.node as RowNode).selectThisNode(selectionState);\n return;\n }\n\n const detailGridId = 'detail_' + event.node.id;\n const detailGrid = event.api.getDetailGridInfo(detailGridId);\n\n if (detailGrid) {\n detailGrid.api.forEachNode((detailNode: RowNode) => detailNode.setSelected(event.node.isSelected()));\n }\n\n event.node.data.parentState = event.node.isSelected();\n\n this.getAndSelectDrawings(event);\n }\n\n public getDetailCellRendererParams(params?: any): any {\n return {\n parentState: params?.node?.data?.parentState,\n initialIds: params ? params.node.data.childsSelected?.map((drawing: ListDrawingConfiguration) => drawing.id) || [] : undefined,\n extraData: {\n isPreSelection: this.isPreSelection,\n productionScheduleItemMultiplier: this.productionScheduleItemMultiplier,\n selectedPath: this.selectedPath,\n productionSchedule: this.productionSchedule,\n productionSchedulePathsOfColoredYarnSet: this.productionSchedulePathsOfColoredYarnSet,\n selectedRestPathColoredYarnSet: this.selectedRestPathColoredYarnSet,\n hasQuantitySuggestionPermission: this.hasQuantitySuggestionPermission,\n availableSpaceInBuggyInPicks: this.availableSpaceInBuggyInPicks,\n buggyLengthMaxInPicks: this.buggyLengthMaxInPicks\n }\n };\n }\n\n public getGroupedServerSideDataSource(): IServerSideDatasource {\n if (!this.readyToFetchRows) {\n return {\n getRows: (params: IServerSideGetRowsParams): void => {\n params.success({\n rowData: [],\n rowCount: 0\n });\n }\n };\n } else {\n return {\n getRows: (params: IServerSideGetRowsParams): void => {\n const sortModel: SortModelItem[] = params.request.sortModel;\n const startRow: number = params.request.startRow;\n const endRow: number = params.request.endRow;\n const currentFilterModel: FilterModel | AdvancedFilterModel = params.request.filterModel;\n this.drawingLibraryHelper.savedFilterModel = currentFilterModel;\n\n this.groupedGridModel = new GridModel(startRow, endRow, sortModel, currentFilterModel);\n\n const groupedBy = this.getGroupedByColumns(params);\n\n this.drawings\n .getGroupedDrawings(this.groupedGridModel, groupedBy)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe({\n next: (groupedDrawings: GroupedDrawing[]) => {\n this.groupedDrawings = groupedDrawings;\n\n if (params.request.startRow === 0 && groupedDrawings.length === 0) {\n this.groupedGridInstance.api.showNoRowsOverlay();\n }\n\n if (startRow === 0) {\n this.getStatusBarData(this.groupedGridModel);\n\n if (groupedDrawings.length === 0) {\n params.api.showNoRowsOverlay();\n } else {\n params.api.hideOverlay();\n }\n }\n\n setTimeout(() => {\n params.success({\n rowData: groupedDrawings,\n rowCount: groupedDrawings.length\n });\n\n this.setSelectedDrawings();\n });\n },\n error: (error: any) => {\n params.fail();\n params.api.showNoRowsOverlay();\n throw error;\n }\n });\n }\n };\n }\n }\n\n public getGroupColumnDefinitions(): ColDef[] {\n return [\n this.colDefBuilderFactory.getBuilder().withColIdAndField('id').withNumericMultiFilter(this.getPossibleColumnsValues('id')).withHide().withHiddenInToolPanel().build(),\n this.colDefBuilderFactory.getBuilder().withColIdAndField('configurationId').withNumericMultiFilter(this.getPossibleColumnsValues('configurationId')).withHiddenInToolPanel().withHide().build(),\n this.colDefBuilderFactory.getBuilder().withColIdAndField('widthInPxWithoutConfigurations').withNumericMultiFilter().withHiddenInToolPanel().withHide().build(),\n this.colDefBuilderFactory.getBuilder().withColIdAndField('shapeWithoutConfigurations').withTextMultiFilter().withHiddenInToolPanel().withHide().build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withColId('qualityName')\n .withField('quality.name')\n .withValueGetter((params: ValueGetterParams) => this.getDropdownCellValue(params))\n .withTooltipField('quality.name')\n .withCellRenderer('agGroupCellRenderer')\n .withHeaderName('TEXTILE_DATA.MACHINE_QUALITY.MACHINE_QUALITY')\n .withValueGetter((params: ValueGetterParams) => this.getDropdownCellValue(params))\n .withTextMultiFilter(this.getPossibleColumnsValues('qualityName'))\n .withHeaderCheckboxSelection(false)\n .withSuppressMovable()\n .build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withColId('colorSetName')\n .withField('colorSet.name')\n .withTooltipField('colorSet.name')\n .withHeaderName('TEXTILE_DATA.COLOR_SET.COLOR_SET')\n .withCellRendererSelector(this.cellRendererSelector())\n .withTextMultiFilter(this.getPossibleColumnsValues('colorSetName'))\n .build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withColId(this.WIDTH_IN_PX)\n .withField(`technicalWidthInPx`)\n .withHeaderName('GENERAL.DIMENSIONS.WIDTH', 1, false, Unit.PIXEL)\n .withNumericMultiFilter(this.getPossibleColumnsValues(this.WIDTH_IN_PX))\n .withRightAlignment()\n .build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withColIdAndField(this.COMMERCIAL_WIDTH_IN_CM)\n .withHeaderName('GENERAL.DIMENSIONS.WIDTH', 1, false, Unit.CENTIMETER)\n .withValueFormatter((params: ValueFormatterParams) => params.data.commercialDimensionsInCM?.toFixed(2))\n .withNumericMultiFilter(this.getPossibleColumnsValues(this.COMMERCIAL_WIDTH_IN_CM), this.getConversionRate(this.COMMERCIAL_WIDTH_IN_CM))\n .withRightAlignment()\n .build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withColIdAndField(this.SHAPE)\n .withHeaderName('GENERAL.SHAPE')\n .withValueGetter((params: ValueGetterParams) => this.getShape(params.data), true)\n .withTextMultiFilter(this.getPossibleColumnsValues(this.SHAPE))\n .withCellClass('cell-vertical-align')\n .build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withColIdAndField('drawingType')\n .withValueGetter(this.isProductionSchedule ? 'data.drawing.drawingType' : 'data')\n .withTextMultiFilter(of(['BMP', 'EP']))\n .withHide()\n .withHiddenInToolPanel()\n .build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withColIdAndField('missingDesign')\n .withValueGetter(this.isProductionSchedule ? 'data.drawing.missingDesign' : 'data')\n .withTextMultiFilter(of(['true', 'false']))\n .withHide()\n .withHiddenInToolPanel()\n .build()\n ];\n }\n\n public toggleSelectedRows(change: boolean): void {\n if (change) {\n this.drawingLibraryHelper.savedFilterModel = null;\n this.groupedGridInstance?.api?.setFilterModel(null);\n\n const filterModel = this.drawingLibraryHelper.getPreselectedDrawingAndConfigurationIdsFilterModel(this.preselectedDesignIds, this.preselectedConfigurationIds);\n\n this.drawingLibraryHelper.savedFilterModel = filterModel;\n this.groupedGridInstance?.api?.setFilterModel(filterModel);\n } else {\n this.setInitializationFilters();\n }\n }\n\n public setInitializationFilters(): void {\n let filterModel: any;\n\n filterModel = this.drawingLibraryHelper.getInitializationFilterModel(\n this.showOnlyPreSelectedDrawings,\n this.productionSchedule,\n this.selectedPath,\n this.selectedRestPathColoredYarnSet,\n this.preselectedDesignIds,\n this.preselectedConfigurationIds,\n this.isPreSelection,\n this.selectedPathContentRowData\n );\n\n this.readyToFetchRows = true;\n this.groupedGridInstance?.api?.setFilterModel(filterModel);\n\n //because we fetched no rows yet, we need to explictly trigger a new getrows on aggrid\n this.groupedGridInstance?.api?.setGridOption('serverSideDatasource', this.getGroupedServerSideDataSource());\n }\n\n public getTooltip(key: string): string {\n const translation = this.translate.instant(key);\n return translation.length > 20 ? translation : '';\n }\n\n private getPossibleColumnsValues(columnIdentifier: string): Observable {\n return this.drawings.getPossibleValues(columnIdentifier).pipe(takeUntil(this.unSubscribeOnViewDestroy));\n }\n\n private getGroupedByColumns(params: IServerSideGetRowsParams): string[] {\n const groupedBy = [];\n if (params.api.getColumn('qualityName').isVisible()) {\n groupedBy.push('QUALITY');\n }\n if (params.api.getColumn('colorSetName').isVisible()) {\n groupedBy.push('COLOR_SET');\n }\n if (params.api.getColumn(this.COMMERCIAL_WIDTH_IN_CM).isVisible()) {\n groupedBy.push('COMMERCIAL_WIDTH_IN_CM');\n }\n if (params.api.getColumn(this.WIDTH_IN_PX).isVisible()) {\n groupedBy.push('TECHNICAL_WIDTH_IN_DENTS');\n }\n\n if (AssertionUtils.isEmpty(groupedBy)) {\n groupedBy.push('QUALITY');\n groupedBy.push('COLOR_SET');\n }\n\n return groupedBy;\n }\n\n private getStatusBarData(gridModel: GridModel): void {\n gridModel.startRow = 0;\n gridModel.endRow = BackendLimitsConstants.INT32_MAX;\n this.statusBarService\n .getStatusBarData(StatusBarTarget.DRAWING_LIBRARY, gridModel)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((statusBar: StatusBar) => {\n statusBar.totalGroupedRows = this.groupedDrawings.length;\n this.statusBar = statusBar;\n });\n }\n\n private setSelectedDrawings(): void {\n if (this.preselectedDrawings?.length > 0) {\n this.groupedGridInstance?.api?.forEachNode((node: RowNode) => {\n if (!AssertionUtils.isNullOrUndefined(node.data)) {\n const selectedDrawings = this.preselectedDrawings.filter((drawing: ListDrawingConfiguration) =>\n AssertionUtils.isNullOrUndefined(drawing.configurationId) ? node.data.drawingIds.includes(drawing.drawing.id) : node.data.configurationIds.includes(drawing.configurationId)\n );\n const selectionState = this.groupedDrawingsSelectionService.getParentSelectionState(node.data.drawingIds, selectedDrawings);\n node.data.childsSelected = selectedDrawings;\n node.data.parentState = selectionState;\n node.selectThisNode(selectionState);\n }\n });\n }\n }\n\n private filterViewModes(currentSubscription: Subscription): void {\n if (!currentSubscription.hasPermission(Permission.TEXFAB_ORDERBOOK)) {\n this.viewModes = this.viewModes.filter(\n (viewMode: ProductionScheduleDrawingViewMode) => viewMode !== ProductionScheduleDrawingViewMode.ORDER_LINES && viewMode !== ProductionScheduleDrawingViewMode.GROUPED_ORDER_LINES\n );\n }\n }\n\n public onDetailRowsSelectionChanged(node: RowNode, parentSelectionState: boolean, drawingsSelected: ListDrawingConfiguration[]): void {\n const deselectedConfigurationIds = node.data.configurationIds.filter((id: number) => !drawingsSelected.some((des: ListDrawingConfiguration) => des.configurationId === id));\n const deselectedDrawingIds = node.data.drawingIds.filter((id: number) => !drawingsSelected.some((des: ListDrawingConfiguration) => des.drawing.id === id));\n\n let currentSelectedDrawings =\n this.preselectedDrawings?.filter((drawing: ListDrawingConfiguration) =>\n AssertionUtils.isNullOrUndefined(drawing.configurationId) ? !deselectedDrawingIds.includes(drawing.drawing.id) : !deselectedConfigurationIds.includes(drawing.configurationId)\n ) ?? [];\n\n const drawingsSet = this.getDrawingSet(currentSelectedDrawings, drawingsSelected);\n\n currentSelectedDrawings = [...drawingsSet];\n\n this.groupedDrawingsSelectionService.setGroupedDrawingsSelected(currentSelectedDrawings);\n node.data.childsSelected = drawingsSelected;\n node.data.parentState = parentSelectionState;\n node.data.updatingFromDetails = true;\n node.selectThisNode(parentSelectionState);\n\n setTimeout(() => (node.data.updatingFromDetails = false), 100);\n\n this.updateSelectedDrawingAndConfigurationIds(currentSelectedDrawings);\n }\n\n private getAndSelectDrawings(event: RowSelectedEvent): void {\n const drawingIds = event.node.data.drawingIds;\n const configurationIds = event.node.data.configurationIds;\n const sortModel: SortModelItem[] = [];\n let filterModel = {};\n\n if (!AssertionUtils.isNullOrUndefined(drawingIds) && !AssertionUtils.isEmpty(drawingIds)) {\n filterModel = {\n id: {\n filterModels: [null, {values: drawingIds, filterType: 'set'}],\n filterType: 'multi'\n }\n };\n\n if (!AssertionUtils.isNullOrUndefined(configurationIds) && !AssertionUtils.isEmpty(configurationIds)) {\n const configurationFilterModel = {\n configurationId: {\n filterModels: [null, {values: configurationIds, filterType: 'set'}],\n filterType: 'multi'\n }\n };\n\n filterModel = {...filterModel, ...configurationFilterModel};\n }\n }\n\n this.detailGridModel = new GridModel(0, this.SLICE_SIZE_DETAILS, sortModel, filterModel);\n\n this.drawings\n .getAllWithoutImageDataFromGridModel(TargetForListOfDrawingsEnum.PRODUCTION_ORDER, this.detailGridModel, true, 'group')\n .pipe(\n map((listOfDrawings: Drawing[]) => {\n return listOfDrawings.map((drawing: Drawing) => {\n const config = this.getDrawingConfiguration(drawing, event.node.data.quality?.name, event.node.data.colorSet?.name, event.node.data.commercialWidthInCM);\n return new ListDrawingConfiguration(drawing, 0, this.productionScheduleItemMultiplier, event.node.data.technicalWidthInPx, config);\n });\n }),\n takeUntil(this.unSubscribeOnViewDestroy)\n )\n .subscribe((drawings: ListDrawingConfiguration[]) => {\n let selectedDrawings: ListDrawingConfiguration[] = [];\n\n if (event.node.isSelected()) {\n event.node.data.childsSelected = drawings;\n } else if (!AssertionUtils.isNullOrUndefined(event.node.isSelected()) && !event.node.isSelected()) {\n event.node.data.childsSelected = [];\n }\n\n if (event.node.isSelected()) {\n const drawingsSet = this.getDrawingSet(this.preselectedDrawings, drawings);\n selectedDrawings = [...drawingsSet];\n } else {\n selectedDrawings = this.preselectedDrawings.filter(\n (selectedDrawing: ListDrawingConfiguration) =>\n !drawings.some((drawing: ListDrawingConfiguration) =>\n AssertionUtils.isNullOrUndefined(drawing.configurationId) ? selectedDrawing.drawing.id === drawing.drawing.id : selectedDrawing.configurationId === drawing.configurationId\n )\n );\n }\n\n this.groupedDrawingsSelectionService.setGroupedDrawingsSelected(selectedDrawings);\n this.updateSelectedDrawingAndConfigurationIds(selectedDrawings);\n });\n }\n\n private updateSelectedDrawingAndConfigurationIds(selectedDrawings: ListDrawingConfiguration[]): void {\n const selectedDesignIds = selectedDrawings.map((design: ListDrawingConfiguration) => design.drawing.id);\n const selectedConfigurationIds = selectedDrawings.map((design: ListDrawingConfiguration) => design.configurationId).filter((id: number) => id !== undefined);\n\n this.drawingIdSelected.emit(selectedDesignIds);\n this.configurationIdSelected.emit(selectedConfigurationIds);\n }\n\n private getDrawingConfiguration(drawing: Drawing, quality: string, colorSetName: string, widthInCM: number): DrawingConfiguration {\n return drawing?.configurations?.find((drawingConfiguration: DrawingConfiguration) => {\n const width = convertToCommercialUnitCentimeter({unit: Unit.MILLIMETER, value: drawingConfiguration.commercialDimensionsInMm.widthInMM} as UnitValue);\n const colorSet = drawingConfiguration instanceof DrawingConfigurationWithColorAndYarnSet ? drawingConfiguration.colorSet : null;\n return drawingConfiguration.quality?.name === quality && colorSet?.name === colorSetName && width === Number(widthInCM);\n });\n }\n\n private getDrawingSet(currentSelectedDrawings: ListDrawingConfiguration[], drawingsSelected: ListDrawingConfiguration[]): Set {\n return new Set([\n ...currentSelectedDrawings,\n ...drawingsSelected.filter(\n (newDrawing: ListDrawingConfiguration) =>\n this.preselectedDrawings.findIndex((selectedDrawing: ListDrawingConfiguration) =>\n AssertionUtils.isNullOrUndefined(newDrawing.configurationId) ? selectedDrawing.drawing.name === newDrawing.drawing.name : selectedDrawing.configurationId === newDrawing.configurationId\n ) === -1\n )\n ]);\n }\n\n private getDropdownCellValue(params: ValueGetterParams): string {\n return `${params.data.quality.name} (${params.data.drawingIds.length})`;\n }\n\n private cellRendererSelector(cellRenderer: any = null, cellRendererParams: any = null): (params: ICellRendererParams) => CellRendererSelectorResult {\n return (params: ICellRendererParams): CellRendererSelectorResult =>\n params.node.level === 0 ? {component: cellRenderer ?? params.colDef.cellRenderer, params: cellRendererParams} : {component: EmptyCellRendererComponent};\n }\n\n private getShape(groupedDrawing: GroupedDrawing): string {\n return FixedShape.getTranslationKeyForShape(groupedDrawing.shape.name, this.translate);\n }\n\n private getConversionRate(key: string): number {\n return convertUnit({\n from: {\n value: 1,\n unit: this.COLUMN_UNITS_MAP.get(key).dataFromUnit\n },\n to: this.COLUMN_UNITS_MAP.get(key).getDisplayUnit()\n });\n }\n}\n","
\n
\n \n
\n\n \n \n
\n
\n
\n \n
\n \n
\n \n \n \n

x

\n \n \n \n {{ 'GENERAL.UNIT.METER' | bmsTranslate }}\n \n \n
\n \n \n \n {{ 'GENERAL.ACTIONS.ADD' | bmsTranslate }}\n \n \n
\n
\n \n
\n \n \n\n","import {Component, Inject} from '@angular/core';\nimport {FormArray, FormBuilder, FormControl, FormGroup, Validators} from '@angular/forms';\nimport {FixedShape} from '@domain/drawing-library/fixed-shape.enum';\nimport {Drawing} from '@domain/production-schedule/drawing';\nimport {DrawingConfiguration} from '@domain/production-schedule/drawing-configuration';\nimport {DrawingConfigurationWithColorAndYarnSet} from '@domain/production-schedule/drawing-configuration-with-color-and-yarn-set';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {DataSource} from '@domain/settings/data-source';\nimport {TargetForListOfDrawingsEnum} from '@domain/target-for-list-of-drawings.enum';\nimport {AUTHENTICATION, Authentication} from '@infrastructure/http/authentication/authentication';\nimport {DRAWINGS, Drawings} from '@infrastructure/http/drawing/drawings';\nimport {ListDrawingConfiguration} from '@presentation/components/drawing-list/list-drawing-configuration';\nimport {DrawingLibraryHelper} from '@presentation/pages/texedit/drawing-library/drawing-library-new-listview/drawing-library-helper';\nimport {\n AssertionUtils,\n BaseComponent,\n convertPixelsToHeightInMeter,\n convertToCommercialUnitCentimeter,\n DialogBuilderFactoryService,\n DialogType,\n GridModel,\n Unit,\n UnitValue\n} from '@vdw/angular-component-library';\nimport {ICellRendererAngularComp} from 'ag-grid-angular';\nimport {AdvancedFilterModel, FilterModel, GridApi, ICellRendererParams, SortModelItem} from 'ag-grid-community';\nimport {map, takeUntil} from 'rxjs';\nimport {PRODUCTION_SCHEDULE_PLAN, ProductionSchedulePlan} from '../../../../plan/production-schedule-plan';\nimport {GroupedDrawing} from '../../drawings-grouped-view/grouped-drawing';\nimport {GroupedDrawingsSelectionService} from '../../drawings-grouped-view/grouped-drawings-selection.service';\n\ntype DrawingConfigurationForm = FormGroup<{\n quantity: FormControl;\n rollLengthInMeter: FormControl;\n}>;\n\n@Component({\n templateUrl: './grouped-design-thumbnails-detail.component.html',\n styleUrls: ['./grouped-design-thumbnails-detail.component.scss']\n})\nexport class GroupedDesignThumbnailsDetailComponent extends BaseComponent implements ICellRendererAngularComp {\n public dataSources: DataSource[];\n public gridApi: GridApi;\n public drawingConfigurations: ListDrawingConfiguration[] = [];\n public productionSchedule: ProductionSchedule;\n public productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet;\n public productionScheduleItemMultiplier: number;\n public selectedPath: ProductionSchedulePath;\n public drawingConfigurationsFormArray: FormArray = null;\n public isFormVisible: boolean[] = [];\n public dataLoaded: boolean = false;\n\n private masterData: GroupedDrawing;\n private availableSpaceInBuggyInPicks: number;\n private buggyLengthMaxInPicks: number;\n private hasQuantitySuggestionPermission: boolean = false;\n\n public constructor(\n @Inject(AUTHENTICATION) private readonly authentication: Authentication,\n @Inject(DRAWINGS) private readonly drawings: Drawings,\n @Inject(PRODUCTION_SCHEDULE_PLAN) private readonly productionSchedulePlan: ProductionSchedulePlan,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n private readonly groupedDrawingsSelectionService: GroupedDrawingsSelectionService,\n private readonly drawingLibraryHelper: DrawingLibraryHelper,\n private readonly formBuilder: FormBuilder\n ) {\n super();\n this.formBuilder = formBuilder;\n }\n\n public agInit(params: any): void {\n this.gridApi = params.api;\n this.masterData = params.data;\n this.productionSchedule = params.extraData.productionSchedule;\n this.productionSchedulePathsOfColoredYarnSet = params.extraData.productionSchedulePathsOfColoredYarnSet;\n this.productionScheduleItemMultiplier = params.extraData.productionScheduleItemMultiplier;\n this.selectedPath = params.extraData.selectedPath;\n this.availableSpaceInBuggyInPicks = params.extraData.availableSpaceInBuggyInPicks;\n this.buggyLengthMaxInPicks = params.extraData.buggyLengthMaxInPicks;\n this.hasQuantitySuggestionPermission = params.extraData.hasQuantitySuggestionPermission;\n\n this.getDrawingConfigurations(params.data.drawingIds, params.data.configurationIds);\n }\n\n public refresh(_: ICellRendererParams): boolean {\n return false;\n }\n\n public canShowDrawingConfiguration(drawingConfiguration: ListDrawingConfiguration): boolean {\n return !AssertionUtils.isNullOrUndefined(drawingConfiguration);\n }\n\n public canShowModifiedDate(drawingConfiguration: ListDrawingConfiguration): boolean {\n return !AssertionUtils.isNullOrUndefined(drawingConfiguration.drawing) && !AssertionUtils.isNullOrUndefined(drawingConfiguration.drawing.dateModified);\n }\n\n public addDrawingToProductionSchedulePath(drawingConfiguration: ListDrawingConfiguration, drawingConfigurationForm: any): void {\n if (!drawingConfigurationForm.valid) {\n return;\n }\n\n const listDrawing = drawingConfiguration;\n listDrawing.amount = Math.floor(drawingConfigurationForm.getRawValue().quantity / this.productionScheduleItemMultiplier);\n\n if (this.isShapeRunner(listDrawing.drawing)) {\n listDrawing.rollLengthInMeter = drawingConfigurationForm.getRawValue().rollLengthInMeter;\n }\n\n if (\n !AssertionUtils.isNullOrUndefined(this.selectedPath) &&\n this.productionSchedule.canAddProductionScheduleItemToProductionSchedulePathForNewBuilder(listDrawing, this.selectedPath.technicalWidthInDents)\n ) {\n this.addDrawingToPath(listDrawing);\n } else if (\n AssertionUtils.isNullOrUndefined(this.selectedPath) &&\n this.productionSchedule.canAddProductionScheduleItemToColoredYarnSet(this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent, listDrawing)\n ) {\n this.addDrawingToNewPath(listDrawing);\n } else {\n this.dialogBuilderFactoryService.getBuilder().openAlertDialog({\n titleText: 'PRODUCTION_ORDER.WEAVE_PLAN.WEAVE_PLAN',\n messageText: 'PRODUCTION_ORDER.WEAVE_PLAN.WARNINGS.PATH_WIDTH_DOES_NOT_EQUAL_DESIGN_WIDTH',\n type: DialogType.INFORMATION\n });\n }\n }\n\n public selectInputContent(event: FocusEvent): void {\n const inputElement = event.target as HTMLInputElement;\n if (inputElement) {\n inputElement.select();\n }\n }\n\n public onFocusInput(index: number): void {\n this.isFormVisible[index] = true;\n }\n\n public onBlurInput(index: number): void {\n this.isFormVisible[index] = false;\n }\n\n private getDrawingConfigurations(drawingIds: number[], configurationIds: number[]): void {\n this.getDetailServerSideDataSource(drawingIds, configurationIds);\n }\n\n private getDetailServerSideDataSource(drawingIds: number[], configurationIds: number[]): void {\n const sortModel: SortModelItem[] = [];\n const startRow: number = 0;\n const endRow: number = 30;\n const currentFilterModel: FilterModel | AdvancedFilterModel = null;\n\n let filterModel =\n !AssertionUtils.isNullOrUndefined(drawingIds) && !AssertionUtils.isEmpty(drawingIds) && !AssertionUtils.isNullOrUndefined(configurationIds) && !AssertionUtils.isEmpty(configurationIds)\n ? {\n id: {\n filterModels: [null, {values: drawingIds, filterType: 'set'}],\n filterType: 'multi'\n },\n configurationId: {\n filterModels: [null, {values: configurationIds.filter((id: number) => id > 0), filterType: 'set'}],\n filterType: 'multi'\n }\n }\n : currentFilterModel;\n\n const detailGridModel = new GridModel(startRow, endRow, sortModel, filterModel);\n\n this.drawings\n .getAllWithoutImageDataFromGridModel(TargetForListOfDrawingsEnum.PRODUCTION_ORDER, detailGridModel, true, 'group')\n .pipe(\n map((listOfDrawings: Drawing[]) => {\n return listOfDrawings.map((drawing: Drawing) => {\n const config = this.getDrawingConfiguration(drawing, this.masterData.quality.name, this.masterData.colorSet?.name, this.masterData.commercialWidthInCM);\n return new ListDrawingConfiguration(drawing, 0, 0, this.masterData.commercialWidthInCM, config);\n });\n }),\n takeUntil(this.unSubscribeOnViewDestroy)\n )\n .subscribe({\n next: (drawingConfigurations: ListDrawingConfiguration[]) => {\n this.drawingConfigurations = drawingConfigurations;\n this.initializeDrawingConfigurationForms();\n this.dataLoaded = true;\n }\n });\n }\n\n private getDrawingConfiguration(drawing: Drawing, quality: string, colorSetName: string, widthInCM: number): DrawingConfiguration {\n return drawing?.configurations?.find((drawingConfiguration: DrawingConfiguration) => {\n const width = convertToCommercialUnitCentimeter({unit: Unit.MILLIMETER, value: drawingConfiguration.commercialDimensionsInMm.widthInMM} as UnitValue);\n const colorSet = drawingConfiguration instanceof DrawingConfigurationWithColorAndYarnSet ? drawingConfiguration.colorSet : null;\n return drawingConfiguration.quality?.name === quality && colorSet?.name === colorSetName && width === Number(widthInCM);\n });\n }\n\n private isShapeRunner(drawing: Drawing): boolean {\n return drawing.shape === FixedShape[FixedShape.RUNNER];\n }\n\n private initializeDrawingConfigurationForms(): void {\n this.drawingConfigurationsFormArray = this.formBuilder.array(\n this.drawingConfigurations.map((listDrawingConfiguration: ListDrawingConfiguration) => this.initializeDrawingConfigurationForm(listDrawingConfiguration))\n );\n\n this.drawingConfigurationsFormArray.controls.forEach((drawingConfigurationForm: DrawingConfigurationForm, index: number) => {\n const drawingConfiguration = this.drawingConfigurations[index];\n this.checkAndDisableRollLength(drawingConfigurationForm, drawingConfiguration);\n });\n\n this.isFormVisible = this.drawingConfigurationsFormArray?.controls.map(() => false);\n }\n\n private initializeDrawingConfigurationForm(listDrawingConfiguration: ListDrawingConfiguration): FormGroup {\n listDrawingConfiguration.rollLengthInMeter = this.getRollLengthInMeter(listDrawingConfiguration);\n\n return this.formBuilder.group({\n quantity: this.formBuilder.control(this.getSuggestedQuantityForDrawing(listDrawingConfiguration), [Validators.required, Validators.min(this.productionScheduleItemMultiplier)]),\n rollLengthInMeter: this.formBuilder.control(listDrawingConfiguration.rollLengthInMeter ?? 0)\n });\n }\n\n private checkAndDisableRollLength(drawingConfigurationForm: DrawingConfigurationForm, listDrawingConfiguration: ListDrawingConfiguration): void {\n if (this.isShapeRunner(listDrawingConfiguration.drawing)) {\n drawingConfigurationForm.controls.rollLengthInMeter.enable();\n } else {\n drawingConfigurationForm.controls.rollLengthInMeter.disable();\n }\n }\n\n private getRollLengthInMeter(config: ListDrawingConfiguration): number | null {\n if (config?.rollLengthInMeter && config?.commercialDimensionsInCm?.heightInCM / 100 < config.rollLengthInMeter) {\n return config.rollLengthInMeter;\n } else if (config?.drawing?.repeated) {\n const rollLengthInMeter = config?.commercialDimensionsInCm?.heightInCM / 100;\n if (!AssertionUtils.isNullOrUndefined(rollLengthInMeter) && !isNaN(rollLengthInMeter)) {\n config.rollLengthInMeter = rollLengthInMeter;\n return config.rollLengthInMeter;\n } else {\n return convertPixelsToHeightInMeter(\n config?.drawing?.dimensionsInPixels?.heightInPx,\n this.productionSchedule?.machineQuality?.pickDensity * 1000,\n this.productionSchedule?.machineQuality?.weaveStructure?.picksPerColorLine\n );\n }\n } else {\n return null;\n }\n }\n\n private addDrawingToPath(listDrawing: ListDrawingConfiguration): void {\n const productionSchedulePathsOfColoredYarnSet = this.productionSchedule.getProductionSchedulePathsOfColoredYarnSetAtStartDent(\n this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent\n );\n\n this.productionSchedulePlan.addDrawingToProductionSchedulePath(listDrawing, this.selectedPath.pathNumber, productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet);\n }\n\n private addDrawingToNewPath(listDrawing: ListDrawingConfiguration): void {\n this.productionSchedulePlan\n .addDrawingToColoredYarnSet(listDrawing, this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((path: ProductionSchedulePath) => {\n if (!AssertionUtils.isNullOrUndefined(path)) {\n this.selectedPath = path;\n this.groupedDrawingsSelectionService.updateSelectedPath(this.selectedPath);\n this.groupedDrawingsSelectionService.updateSelectedRestPathColoredYarnSet(undefined);\n }\n });\n }\n\n private getSuggestedQuantityForDrawing(drawingConfiguration: ListDrawingConfiguration): number {\n return this.drawingLibraryHelper.getQuantitySuggestionForPath(\n drawingConfiguration,\n this.productionSchedule,\n this.selectedPath,\n this.availableSpaceInBuggyInPicks,\n this.buggyLengthMaxInPicks,\n true,\n this.productionScheduleItemMultiplier\n );\n }\n}\n","\n\n
\n \n \n
\n \n \n \n\n \n \n {{\n 'PRODUCTION_ORDER.DESIGN_LIBRARY.VIEW_MODES.' + viewMode | bmsTranslate\n }}\n \n \n
\n \n\n \n
\n
\n","import {AfterViewInit, Component, ElementRef, Inject, OnInit, ViewChild, ViewEncapsulation} from '@angular/core';\nimport {FormBuilder} from '@angular/forms';\nimport {GridIdentifier} from '@application/grids/grid-identifier.enum';\nimport {ProductionScheduleDrawingViewMode} from '@domain/production-schedule/production-schedule-drawing-view-mode.enum';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {Permission} from '@domain/profile/permission.enum';\nimport {OverviewListColoredYarnSetWithStartDent} from '@domain/textile-data/creel/overview-list-colored-yarn-set-with-start-dent';\nimport {Authentication, AUTHENTICATION} from '@infrastructure/http/authentication/authentication';\nimport {DRAWINGS, Drawings} from '@infrastructure/http/drawing/drawings';\nimport {HttpStatusBarService} from '@infrastructure/http/status-bar/http-status-bar.service';\nimport {OrderLinesCustomSettingsDialogComponent} from '@presentation/components/dialog-button/dialog-data/order-lines-settings/order-lines-settings.component';\nimport {DrawingLibraryHelper} from '@presentation/pages/texedit/drawing-library/drawing-library-new-listview/drawing-library-helper';\nimport {\n AssertionUtils,\n ColDefBuilderFactoryService,\n DialogBuilderFactoryService,\n GridOptionsBuilderFactoryService,\n LoadingCellOverlayComponent,\n LocalStorageService,\n NoDataOverlayComponentParams,\n TranslateService,\n UuidUtils\n} from '@vdw/angular-component-library';\nimport {AgGridAngular} from 'ag-grid-angular';\nimport {CellMouseOverEvent, ColumnVisibleEvent, GetRowIdParams, GridOptions, GridReadyEvent, RowHeightParams, RowSelectedEvent} from 'ag-grid-community';\nimport {takeUntil} from 'rxjs';\nimport {PRODUCTION_SCHEDULE_PLAN, ProductionSchedulePlan} from '../../../plan/production-schedule-plan';\nimport {GroupedDrawingsSelectionService} from '../drawings-grouped-view/grouped-drawings-selection.service';\nimport {GroupedDesignBaseComponent} from '../grouped-design-base/grouped-design-base.component';\nimport {GroupedDesignThumbnailsDetailComponent} from './grouped-design-thumbnails-detail/grouped-design-thumbnails-detail.component';\n\n@Component({\n selector: 'app-drawing-library-grouped-design-thumbnails-view',\n templateUrl: './grouped-design-thumbnails-view.component.html',\n styleUrls: ['./grouped-design-thumbnails-view.component.scss'],\n\n encapsulation: ViewEncapsulation.None\n})\nexport class GroupedDesignThumbnailsViewComponent extends GroupedDesignBaseComponent implements OnInit, AfterViewInit {\n @ViewChild('container')\n public containerElement: ElementRef;\n\n @ViewChild('groupedGrid')\n public groupedGrid: AgGridAngular;\n\n public loadingForTheFirstTime = true;\n public groupedGridOptions: GridOptions;\n\n public readonly MAX_DETAIL_ROW_HEIGHT = 170;\n public readonly customSettingsComponent = OrderLinesCustomSettingsDialogComponent;\n\n public constructor(\n @Inject(AUTHENTICATION) authentication: Authentication,\n @Inject(DRAWINGS) drawings: Drawings,\n @Inject(PRODUCTION_SCHEDULE_PLAN) productionSchedulePlan: ProductionSchedulePlan,\n gridOptionsBuilderFactoryService: GridOptionsBuilderFactoryService,\n colDefBuilderFactory: ColDefBuilderFactoryService,\n statusBarService: HttpStatusBarService,\n translate: TranslateService,\n dialogBuilderFactoryService: DialogBuilderFactoryService,\n groupedDrawingsSelectionService: GroupedDrawingsSelectionService,\n private formBuilder: FormBuilder,\n private readonly localStorage: LocalStorageService,\n drawingLibraryHelper: DrawingLibraryHelper\n ) {\n super(\n authentication,\n drawings,\n productionSchedulePlan,\n gridOptionsBuilderFactoryService,\n colDefBuilderFactory,\n statusBarService,\n translate,\n dialogBuilderFactoryService,\n groupedDrawingsSelectionService,\n drawingLibraryHelper\n );\n }\n\n public ngOnInit(): void {\n super.ngOnInit();\n this.initialiseGroupedGridOptions();\n\n const currentSubscription = this.authentication.getCurrentSubscription();\n\n this.groupedDrawingsSelectionService.selectedPath.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe((selectedPath: ProductionSchedulePath) => {\n this.selectedPathOutput.emit(selectedPath);\n });\n\n this.hasQuantitySuggestionPermission = currentSubscription.hasPermission(Permission.TEXFAB_QUANTITY_SUGGESTION);\n\n this.groupedDrawingsSelectionService.selectedRestPathColoredYarnSet.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe((coloredYarnSet: OverviewListColoredYarnSetWithStartDent) => {\n this.selectedRestPathColoredYarnSetOutput.emit(coloredYarnSet);\n });\n\n const groupedDesignThumbnailViewMode = ProductionScheduleDrawingViewMode.GROUPED_DESIGN_THUMBNAILS;\n\n if (this.isPreSelection) {\n if (this.localStorage.get('drawingLibraryViewMode') === groupedDesignThumbnailViewMode) {\n this.selectedViewMode = this.viewModes[1];\n }\n } else {\n this.viewModes.push(groupedDesignThumbnailViewMode);\n this.selectedViewMode = this.localStorage.get('drawingLibraryViewMode') || this.viewModes[1];\n this.selectedViewModeChanged.emit(this.selectedViewMode);\n }\n }\n\n public ngAfterViewInit(): void {\n this.setGroupedDesignBaseComponentProperties(this.groupedGrid);\n }\n\n private initialiseGroupedGridOptions(): void {\n const groupedDesignThumbnailsDetailComponent = new GroupedDesignThumbnailsDetailComponent(\n this.authentication,\n this.drawings,\n this.productionSchedulePlan,\n this.dialogBuilderFactoryService,\n this.groupedDrawingsSelectionService,\n this.drawingLibraryHelper,\n this.formBuilder\n );\n\n const defaultGroupedGridOptions = this.gridOptionsBuilderFactoryService\n .getBuilder(this.getGroupColumnDefinitions(), GridIdentifier.GROUPED_DESIGN_THUMBNAILS)\n .withHeaderHeight(32)\n .withFloatingFiltersHeight(32)\n .withServerSideDataSource(this.SLICE_SIZE, this.getGroupedServerSideDataSource())\n .withMasterDetail(GroupedDesignThumbnailsDetailComponent, true, (params: any) => this.getDetailCellRendererParams(params))\n .withComponents({\n customLoadingCellRenderer: LoadingCellOverlayComponent,\n GroupedDesignThumbnailsDetailComponent: groupedDesignThumbnailsDetailComponent\n })\n .withLoadingCellRenderer('customLoadingCellRenderer')\n .withNoRowsOverlay({\n scale: 0.7,\n titleParam: 'DESIGN_LIBRARY.DESIGN',\n hideDescription: true,\n isAnyFilterPresent: () => !AssertionUtils.isNullOrUndefined(this.groupedGrid) && Object.values(this.groupedGrid?.api?.getFilterModel())?.length > 0\n } as NoDataOverlayComponentParams)\n .withOnGridReady((event: GridReadyEvent) => {\n event.api.refreshCells();\n event.api.refreshHeader();\n this.setInitializationFilters();\n })\n .withOnCellMouseOver((event: CellMouseOverEvent) => this.onCellMouseOver(event))\n .withRowSelection(this.isPreSelection)\n .withGetRowHeight((params: RowHeightParams) => this.getRowHeightForDetailRow(params))\n .withGetRowId((params: GetRowIdParams) => UuidUtils.generateV4Uuid())\n .withOnColumnVisible((event: ColumnVisibleEvent) => this.onColumnVisibleChange(event))\n .withCompactView()\n .withLoadingOverlay();\n\n if (this.isPreSelection) {\n this.groupedGridOptions = defaultGroupedGridOptions.withOnRowSelected((event: RowSelectedEvent) => this.parentNodeSelected(event)).build();\n } else {\n this.groupedGridOptions = defaultGroupedGridOptions.build();\n }\n }\n\n private onColumnVisibleChange(event: any): void {\n this.groupedGrid.api.refreshServerSide();\n }\n\n private getRowHeightForDetailRow(params: RowHeightParams): number {\n const isDetailRow = params.node.detail;\n\n if (!isDetailRow) {\n return undefined;\n } else {\n return this.MAX_DETAIL_ROW_HEIGHT + 2 * this.DETAIL_ROW_VERTICAL_PADDING + this.DETAIL_ROW_SCROLL_BAR;\n }\n }\n}\n","\n\n
\n \n
\n \n \n \n\n \n \n {{\n 'PRODUCTION_ORDER.DESIGN_LIBRARY.VIEW_MODES.' + viewMode | bmsTranslate\n }}\n \n \n
\n \n \n
\n","import {Component, ElementRef, EventEmitter, Inject, Input, OnChanges, OnInit, Output, Renderer2, SimpleChanges, ViewChild, ViewEncapsulation} from '@angular/core';\nimport {GridIdentifier} from '@application/grids/grid-identifier.enum';\nimport {OrderLinesGridService} from '@application/helper/orderbook/order-lines-grid.service';\nimport {DraggingService} from '@application/services/dragging/dragging.service';\nimport {FixedShape} from '@domain/drawing-library/fixed-shape.enum';\nimport {OrderLinesTarget} from '@domain/order-lines-target.enum';\nimport {ProductionOrderCustomSettings} from '@domain/production-schedule/custom-settings/production-order-custom-settings';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionScheduleDrawingViewMode} from '@domain/production-schedule/production-schedule-drawing-view-mode.enum';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {ProductionScheduleOrderLine} from '@domain/production-schedule/production-schedule-order-line';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {Permission} from '@domain/profile/permission.enum';\nimport {Subscription} from '@domain/profile/subscription';\nimport {ColorSet} from '@domain/textile-data/color-set/color-set';\nimport {ColoredYarnSet} from '@domain/textile-data/colored-yarn-set/colored-yarn-set';\nimport {OverviewListColoredYarnSetWithStartDent} from '@domain/textile-data/creel/overview-list-colored-yarn-set-with-start-dent';\nimport {CarpetWeaveQuality} from '@domain/textile-data/machine-quality/carpet-weave-quality';\nimport {PathWidth} from '@domain/textile-data/machine-quality/path-width';\nimport {WeaveQuality} from '@domain/textile-data/machine-quality/weave-quality';\nimport {StatusBarTarget} from '@domain/textile-data/status-bar-target.constants';\nimport {AUTHENTICATION, Authentication} from '@infrastructure/http/authentication/authentication';\nimport {COLOR_SETS, ColorSets} from '@infrastructure/http/color-set/color-sets';\nimport {COLORED_YARN_SETS, ColoredYarnSets} from '@infrastructure/http/colored-yarn-set/colored-yarn-sets';\nimport {CREELS, Creels} from '@infrastructure/http/creel/creels';\nimport {MACHINE_QUALITIES, MachineQualities} from '@infrastructure/http/machine-quality/machine-qualities';\nimport {ORDERBOOK, Orderbook} from '@infrastructure/http/orderbook/orderbook';\nimport {HttpStatusBarService} from '@infrastructure/http/status-bar/http-status-bar.service';\nimport {OrderlineSettingsData} from '@presentation/components/dialog-button/dialog-data/order-lines-settings/order-lines-setting-data.interface';\nimport {OrderLinesCustomSettingsDialogComponent} from '@presentation/components/dialog-button/dialog-data/order-lines-settings/order-lines-settings.component';\nimport {ListDrawingOrderLine} from '@presentation/components/drawing-list/list-drawing-order-line';\nimport {SearchFiltersComponent} from '@presentation/components/search-filters/search-filters.component';\nimport {OverviewListOrderLine} from '@presentation/pages/texfab/orderbook/overview/overview-list-order-line';\nimport {PRODUCTION_SCHEDULE_PLAN, ProductionSchedulePlan} from '@presentation/pages/texfab/production-schedule/add/plan/production-schedule-plan';\nimport {OverviewListCreel} from '@presentation/pages/textile-data/creel/overview/overview-list-creel';\nimport {\n AgGridUtils,\n AssertionUtils,\n BaseComponent,\n ColDefBuilderFactoryService,\n DialogBuilderFactoryService,\n DialogType,\n FilterComponent,\n GridModel,\n GridOptionsBuilder,\n GridOptionsBuilderFactoryService,\n GridTagComponent,\n LoadingCellOverlayComponent,\n LocalStorageService,\n NumberCellEditorComponent,\n NumberCellEditorParams,\n OverlayActionsService,\n OverlayComponentParamsAction,\n Priority,\n ProgressCellRendererComponent,\n StatusBar,\n StringUtils,\n TagColor,\n TagSize,\n TranslateService,\n Unit\n} from '@vdw/angular-component-library';\nimport {AgGridAngular} from 'ag-grid-angular';\nimport {\n CellClickedEvent,\n CellEditingStoppedEvent,\n CellRendererSelectorResult,\n CellValueChangedEvent,\n ColDef,\n Column,\n DndSourceCallbackParams,\n EditableCallbackParams,\n FilterModel,\n GetRowIdParams,\n GridApi,\n GridOptions,\n ICellEditorParams,\n ICellRendererParams,\n IServerSideDatasource,\n IServerSideGetRowsParams,\n ITooltipParams,\n RowDoubleClickedEvent,\n RowNode,\n RowSelectedEvent,\n SortModelItem,\n ValueGetterParams,\n ValueSetterParams\n} from 'ag-grid-community';\nimport {L10nIntlService} from 'angular-l10n';\nimport {forkJoin, Observable, of, Subject} from 'rxjs';\nimport {map, mergeMap, startWith, switchMap, takeUntil} from 'rxjs/operators';\nimport {AddProductionScheduleNavigationState} from '../../../add-production-schedule-navigation-state.interface';\nimport {OrderLinesHelper} from '../order-lines-helper';\nimport {OrderLineStatusCellRendererParams} from '../order-lines-view/order-line-status-cell-renderer/order-line-status-cell-renderer-params.interface';\nimport {OrderLineStatusCellRendererComponent} from '../order-lines-view/order-line-status-cell-renderer/order-line-status-cell-renderer.component';\nimport {ProductionScheduleItemInPathGroupStatusCellRendererComponent} from '../order-lines-view/production-schedule-item-in-path-group-status-cell-renderer/production-schedule-item-in-path-group-status-cell-renderer.component';\nimport {ProductionScheduleItemInPathGroupWithIdentification} from '../order-lines-view/production-schedule-item-in-path-group-with-identification';\nimport {ProductionScheduleOrderLineWithQuantity} from '../order-lines-view/production-schedule-order-line-with-quantity';\n\ntype RowData = ProductionScheduleOrderLineWithQuantity | ProductionScheduleItemInPathGroupWithIdentification;\n\n@Component({\n selector: 'app-drawing-library-order-lines-new-view',\n templateUrl: './order-lines-new-view.component.html',\n styleUrls: ['./order-lines-new-view.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class OrderLinesNewViewComponent extends BaseComponent implements OnInit, OnChanges {\n public static DEFAULT_PADDING_IN_PX = 16;\n public static DELETE_PATH_LABEL_BUTTON_WIDTH_IN_PX = 44;\n public static MIN_WIDTH_FILTER_IN_PX = 244;\n public static WIDTH_TEXT_FILTER_IN_PX = 184;\n\n @Input() public displayTechnicalUnit = true;\n @Input() public productionSchedule: ProductionSchedule;\n @Input() public productionOrderCustomSettings: ProductionOrderCustomSettings;\n @Input() public commercialUnit: Unit;\n @Input() public isPreSelection = false;\n @Input() public selectedPath: ProductionSchedulePath;\n @Input() public selectedRestPathColoredYarnSet: OverviewListColoredYarnSetWithStartDent;\n @Input() public productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet;\n @Input() public pathWidths: PathWidth[] = [];\n @Input() public availableSpaceInBuggyInPicks: number;\n @Input() public buggyLengthMaxInPicks: number;\n @Input() public marginInDentsOfMissingDesigns: number;\n @Input() public preselectedOrderlineIds: number[];\n @Input() public addProductionScheduleNavigationState: AddProductionScheduleNavigationState = null;\n @Input() public productionScheduleItemMultiplier: number;\n @Input() public selectedPathContentRowData: ProductionScheduleItemInPathGroup;\n @Output() public orderlineSelected = new EventEmitter();\n @Output() public selectedViewModeChanged = new EventEmitter();\n @Output() public navigateBackOutput = new EventEmitter();\n @Output() public selectedPathOutput: EventEmitter = new EventEmitter();\n @Output() public selectedRestPathColoredYarnSetOutput: EventEmitter = new EventEmitter();\n\n @ViewChild('orderLinesNewViewGrid')\n public orderLinesNewViewGrid: AgGridAngular;\n\n @ViewChild('container')\n public containerElement: ElementRef;\n\n @ViewChild('fixedButtons')\n public fixedButtonsElement: ElementRef;\n\n @ViewChild('pathButtons')\n public pathButtonsElement: ElementRef;\n\n @ViewChild('searchFilters')\n public searchFilters: SearchFiltersComponent;\n\n @ViewChild('filter')\n public filter: FilterComponent;\n\n public overflowPathsOpen = false;\n public widthForFilters: string;\n public statusBar: StatusBar;\n public gridOptions: GridOptions;\n public loadingForTheFirstTime = true;\n public gridModel: GridModel;\n public readonly customSettingsComponent = OrderLinesCustomSettingsDialogComponent;\n public viewModes: ProductionScheduleDrawingViewMode[] = [\n ProductionScheduleDrawingViewMode.DESIGNS_LIST,\n ProductionScheduleDrawingViewMode.ORDER_LINES,\n ProductionScheduleDrawingViewMode.GROUPED_ORDER_LINES,\n ProductionScheduleDrawingViewMode.GROUPED_DESIGNS\n ];\n\n public selectedViewMode = ProductionScheduleDrawingViewMode.ORDER_LINES;\n public onlyShowSelected = false;\n\n private orderlinesThatAreUsedToAutoFill: ProductionScheduleOrderLineWithQuantity[];\n private availableSpaceForAutoFill: number;\n private rollLengthColumnId = 'rollLength';\n private readonly SLICE_SIZE = 30;\n private showOnlyQueryCompatibleOrderlines = true;\n private showPreselectedItems = false;\n private orderLines: ProductionScheduleOrderLineWithQuantity[];\n private alternativeQualityNames: string[] = [];\n private alternativeColorSetNames: string[] = [];\n private qualityNames: string[] = [];\n private fullQualities: CarpetWeaveQuality[] = [];\n private colorSetNames: string[] = [];\n private creelColorSetIds: number[] = [];\n private readyToFetchRows: boolean = false;\n private readonly quantityTranslation = 'ORDERBOOK.QUANTITY';\n private readonly booleanFalseTranslation = 'GENERAL.CONDITION.NO';\n private readonly booleanTrueTranslation = 'GENERAL.CONDITION.YES';\n private readonly syncWithProductionScheduleSubject = new Subject();\n private readonly noOverlayAction: OverlayComponentParamsAction[] = [\n {\n key: 'addEventRule',\n titleKey: this.translate.instant('PRODUCTION_ORDER.WEAVE_PLAN.PRESELECTION.PRESELECTION'),\n isPrimary: true,\n disabled: false\n }\n ];\n\n private preFilterDataFetched: boolean = false;\n private processRowSelection: boolean = true;\n private hasQuantitySuggestionPermission: boolean = false;\n\n public constructor(\n @Inject(AUTHENTICATION) private authentication: Authentication,\n @Inject(ORDERBOOK) private readonly orderbook: Orderbook,\n @Inject(PRODUCTION_SCHEDULE_PLAN) private readonly productionSchedulePlan: ProductionSchedulePlan,\n @Inject(MACHINE_QUALITIES) private readonly qualities: MachineQualities,\n @Inject(COLORED_YARN_SETS) private readonly coloredYarnSets: ColoredYarnSets,\n @Inject(COLOR_SETS) private readonly colorSets: ColorSets,\n @Inject(CREELS) private readonly creelsService: Creels,\n private readonly gridOptionsBuilderFactoryService: GridOptionsBuilderFactoryService,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n private readonly colDefBuilderFactoryService: ColDefBuilderFactoryService,\n private readonly translate: TranslateService,\n private readonly draggingService: DraggingService,\n private readonly renderer: Renderer2,\n private readonly l10nIntlService: L10nIntlService,\n private readonly orderLinesGridService: OrderLinesGridService,\n private readonly statusBarService: HttpStatusBarService,\n private readonly overlayActionsService: OverlayActionsService,\n private readonly orderLinesHelper: OrderLinesHelper,\n private readonly localStorage: LocalStorageService\n ) {\n super();\n this.orderLinesHelper.commercialUnit = this.commercialUnit;\n }\n\n public ngOnInit(): void {\n const currentSubscription = this.authentication.getCurrentSubscription();\n\n this.filterViewModes(currentSubscription);\n\n this.initialiseGridOptions();\n this.subscribeToProductionScheduleChanges();\n this.subscribeToOverlayActions();\n\n if (!AssertionUtils.isEmpty(this.preselectedOrderlineIds) && !this.isPreSelection) {\n this.showPreselectedItems = true;\n }\n\n if (!this.isPreSelection) {\n this.viewModes.push(ProductionScheduleDrawingViewMode.GROUPED_DESIGN_THUMBNAILS);\n }\n\n this.selectedViewMode = this.localStorage.get('drawingLibraryViewMode') || this.viewModes[0];\n this.hasQuantitySuggestionPermission = currentSubscription.hasPermission(Permission.TEXFAB_QUANTITY_SUGGESTION);\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (!this.isPreSelection) {\n this.setInitializationFilters();\n }\n\n if (!AssertionUtils.isEmpty(this.preselectedOrderlineIds) && !this.isPreSelection) {\n this.showPreselectedItems = true;\n this.orderLinesNewViewGrid?.api.redrawRows();\n }\n\n if ('productionSchedule' in changes || ('selectedPath' in changes && !AssertionUtils.isNullOrUndefined(this.orderLinesNewViewGrid?.api))) {\n this.orderLinesNewViewGrid?.api?.forEachNode((rowNode: RowNode) => {\n if (!AssertionUtils.isNullOrUndefined(rowNode.data)) {\n const value = this.orderLinesHelper.getQuantitySuggestionForPath(\n rowNode.data,\n this.productionSchedule,\n this.selectedPath,\n this.availableSpaceInBuggyInPicks,\n this.buggyLengthMaxInPicks,\n this.fullQualities,\n this.hasQuantitySuggestionPermission,\n this.productionScheduleItemMultiplier\n );\n rowNode.setDataValue('quantity', value);\n }\n });\n }\n }\n\n public trackByLabeledPath = (_: number, labeledPath: {label: number; path: ProductionSchedulePath}): number => labeledPath.label;\n\n public onSelectedViewModeChanged(selectedViewMode: ProductionScheduleDrawingViewMode): void {\n this.localStorage.set('drawingLibraryViewMode', selectedViewMode);\n this.selectedViewModeChanged.emit(selectedViewMode);\n }\n\n public onCustomSettingsChanged(settings: {showPreselectedItems: boolean; showOnlyQueryCompatibleOrderlines: boolean}): void {\n this.showPreselectedItems = settings.showPreselectedItems ?? this.showPreselectedItems;\n this.showOnlyQueryCompatibleOrderlines = settings.showOnlyQueryCompatibleOrderlines ?? this.showOnlyQueryCompatibleOrderlines;\n this.setInitializationFilters();\n }\n\n public getCustomSettingsDialogData(): any {\n return {\n showPreselectedItems: this.showPreselectedItems,\n showOnlyQueryCompatibleOrderlines: this.showOnlyQueryCompatibleOrderlines,\n viewMode: this.selectedViewMode\n } as OrderlineSettingsData;\n }\n\n public getSelectedRows(): number {\n return this.preselectedOrderlineIds ? this.preselectedOrderlineIds.length : 0;\n }\n\n public toggleSelectedRows(change: boolean): void {\n if (change) {\n this.onlyShowSelected = true;\n this.orderLinesHelper.savedFilterModel = null;\n this.orderLinesNewViewGrid.api.setFilterModel(null);\n\n if (!AssertionUtils.isEmpty(this.preselectedOrderlineIds)) {\n const orderlineIds = this.preselectedOrderlineIds.map((id: number) => `${id}`);\n\n const filterModel = {\n id: {\n filterModels: [null, {values: orderlineIds, filterType: 'set'}],\n filterType: 'multi'\n }\n };\n\n this.orderLinesHelper.savedFilterModel = filterModel;\n this.orderLinesNewViewGrid.api.setFilterModel(filterModel);\n }\n } else {\n this.onlyShowSelected = false;\n this.setInitializationFilters();\n }\n }\n\n public openOverflowPaths(): void {\n this.overflowPathsOpen = true;\n }\n\n public closeOverflowPaths(): void {\n this.overflowPathsOpen = false;\n }\n\n public isSelectingOverlappingOrderLinesAndProductionScheduleItems(): boolean {\n const selectedOrderlines = this.getSelectedOrderLines().map((productionScheduleOrderLineWithQuantity: ProductionScheduleOrderLineWithQuantity) => productionScheduleOrderLineWithQuantity.id);\n\n const productionScheduleItemsFromSelectedOrderLines = this.orderLinesHelper\n .getProductionScheduleItemsInPathGroup(this.productionSchedule)\n .filter((productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup) => selectedOrderlines.includes(productionScheduleItemInPathGroup.orderLineId));\n\n const selectedProductionScheduleItems = this.getSelectedProductionScheduleItems().map(\n (productionScheduleItemInPathGroupWithIdentification: ProductionScheduleItemInPathGroupWithIdentification) =>\n productionScheduleItemInPathGroupWithIdentification.productionScheduleItemInPathGroup\n );\n\n return selectedProductionScheduleItems.some((productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup) =>\n productionScheduleItemsFromSelectedOrderLines.includes(productionScheduleItemInPathGroup)\n );\n }\n\n public canDeleteSelectedOrderLinesOrProductionScheduleItems(): boolean {\n const hasSelectedProductionScheduleItems = this.getSelectedProductionScheduleItems().length > 0;\n\n const selectedOrderlines = this.getSelectedOrderLines().map((productionScheduleOrderLineWithQuantity: ProductionScheduleOrderLineWithQuantity) => productionScheduleOrderLineWithQuantity.id);\n const orderLineIds = this.orderLinesHelper\n .getProductionScheduleItemsInPathGroup(this.productionSchedule)\n .map((productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup) => productionScheduleItemInPathGroup.orderLineId);\n\n if (hasSelectedProductionScheduleItems) {\n return selectedOrderlines.every((selectedOrderLineId: number) => orderLineIds.includes(selectedOrderLineId));\n } else {\n return selectedOrderlines.length > 0 && selectedOrderlines.every((selectedOrderLineId: number) => orderLineIds.includes(selectedOrderLineId));\n }\n }\n\n public updateGrid(gridModel: GridModel): void {\n this.orderLinesNewViewGrid.api.setFilterModel(gridModel.filterModel);\n }\n\n public deleteSelectedOrderLinesOrProductionScheduleItems(): void {\n const selectedOrderlines = this.getSelectedOrderLines().map((productionScheduleOrderLineWithQuantity: ProductionScheduleOrderLineWithQuantity) => productionScheduleOrderLineWithQuantity.id);\n\n const productionScheduleItemsFromSelectedOrderLines = this.orderLinesHelper\n .getProductionScheduleItemsInPathGroup(this.productionSchedule)\n .filter((productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup) => selectedOrderlines.includes(productionScheduleItemInPathGroup.orderLineId));\n\n const selectedProductionScheduleItems = this.getSelectedProductionScheduleItems().map(\n (productionScheduleItemInPathGroupWithIdentification: ProductionScheduleItemInPathGroupWithIdentification) =>\n productionScheduleItemInPathGroupWithIdentification.productionScheduleItemInPathGroup\n );\n\n const productionScheduleItemsToRemove = [...productionScheduleItemsFromSelectedOrderLines, ...selectedProductionScheduleItems];\n\n if (productionScheduleItemsToRemove.length > 0) {\n this.productionSchedulePlan.removeProductionScheduleItems(productionScheduleItemsToRemove);\n }\n }\n\n public productionSchedulePlanHasUnsavedChanges(): boolean {\n return this.productionSchedulePlan.hasUnsavedChanges(true);\n }\n\n private subscribeToProductionScheduleChanges(): void {\n const currentUpdatedProductionSchedule = this.syncWithProductionScheduleSubject.pipe(\n switchMap(() => this.productionSchedulePlan.currentUpdatedProductionSchedule.pipe(startWith(this.productionSchedule))),\n takeUntil(this.unSubscribeOnViewDestroy)\n );\n\n currentUpdatedProductionSchedule\n .pipe(\n map((productionSchedule: ProductionSchedule) =>\n productionSchedule.orderLines.map((productionScheduleOrderLine: ProductionScheduleOrderLine) =>\n ProductionScheduleOrderLineWithQuantity.fromProductionScheduleOrderLine(productionScheduleOrderLine)\n )\n )\n )\n .subscribe((productionScheduleOrderLinesWithQuantity: ProductionScheduleOrderLineWithQuantity[]) =>\n this.orderLinesNewViewGrid.api?.forEachNode((rowNode: RowNode) => {\n const orderLine = productionScheduleOrderLinesWithQuantity.find(\n (productionScheduleOrderLine: ProductionScheduleOrderLineWithQuantity) =>\n rowNode.data instanceof ProductionScheduleOrderLineWithQuantity && productionScheduleOrderLine?.id === rowNode.data.id\n );\n\n if (orderLine) {\n rowNode.setData(orderLine);\n }\n })\n );\n\n currentUpdatedProductionSchedule\n .pipe(\n map((productionSchedule: ProductionSchedule) =>\n this.orderLinesHelper\n .getProductionScheduleItemsFromProductionSchedule(productionSchedule)\n .map((productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup) => productionScheduleItemInPathGroup.orderLineId)\n )\n )\n .subscribe((orderLineIds: number[]) =>\n this.orderLinesNewViewGrid.api?.forEachNode((rowNode: RowNode) => {\n if (rowNode.data instanceof ProductionScheduleOrderLineWithQuantity) {\n const productionScheduleOrderLineWithQuantity: ProductionScheduleOrderLineWithQuantity = rowNode.data;\n const hasOrderLine = !!orderLineIds.find((orderLineId: number) => orderLineId === productionScheduleOrderLineWithQuantity.id);\n\n if (hasOrderLine) {\n rowNode.key = `${productionScheduleOrderLineWithQuantity.id}`;\n }\n rowNode.setGroup(hasOrderLine);\n\n if (rowNode.key) {\n this.orderLinesNewViewGrid.api.refreshServerSide({\n route: [rowNode.key]\n });\n }\n }\n })\n );\n }\n\n public getTooltip(key: string): string {\n const translation = this.translate.instant(key);\n return translation.length > 20 ? translation : '';\n }\n\n private filterViewModes(currentSubscription: Subscription): void {\n if (!currentSubscription.hasPermission(Permission.TEXFAB_ORDERBOOK)) {\n this.viewModes = this.viewModes.filter(\n (viewMode: ProductionScheduleDrawingViewMode) => viewMode !== ProductionScheduleDrawingViewMode.ORDER_LINES && viewMode !== ProductionScheduleDrawingViewMode.GROUPED_ORDER_LINES\n );\n }\n }\n\n private getSelectedOrderLines(): ProductionScheduleOrderLineWithQuantity[] {\n return this.getSelectedNodes().filter(\n (orderLineOrItemInPathGroup: RowData) => orderLineOrItemInPathGroup instanceof ProductionScheduleOrderLineWithQuantity\n ) as ProductionScheduleOrderLineWithQuantity[];\n }\n\n private getSelectedProductionScheduleItems(): ProductionScheduleItemInPathGroupWithIdentification[] {\n return this.getSelectedNodes().filter(\n (orderLineOrItemInPathGroup: RowData) => orderLineOrItemInPathGroup instanceof ProductionScheduleItemInPathGroupWithIdentification\n ) as ProductionScheduleItemInPathGroupWithIdentification[];\n }\n\n private getSelectedNodes(): RowData[] {\n const rowNodes = this.orderLinesNewViewGrid?.api?.getSelectedNodes() ?? [];\n const existingNodes = rowNodes.filter((rowNode: RowNode) => !AssertionUtils.isNullOrUndefined(rowNode.rowIndex));\n return existingNodes.map((rowNode: RowNode) => rowNode.data) as RowData[];\n }\n\n private initialiseGridOptions(): void {\n this.orderLinesGridService\n .getAdditionalInfoColumnDefs()\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((additionalInfoColDefs: ColDef[]) => {\n const defaultGridOptionsForOrderLines = this.gridOptionsBuilderFactoryService\n .getBuilder(this.getColumnDefinitions(additionalInfoColDefs), this.isPreSelection ? GridIdentifier.ORDER_ITEMS_NEW_PRESELECTION : GridIdentifier.ORDER_ITEMS_NEW_BUILDER)\n .withHeaderHeight(32)\n .withFloatingFiltersHeight(32)\n .withLoadingCellRenderer('customLoadingCellRenderer')\n .withComponents({\n customLoadingCellRenderer: LoadingCellOverlayComponent\n })\n .withNoRowsOverlay(\n this.isPreSelection ? this.orderLinesHelper.getNoRowsOverlayForPreselection(this.orderLinesNewViewGrid) : this.orderLinesHelper.getNoRowsOverlayForBuilder(this.noOverlayAction)\n )\n .withOnGridReady(() => {\n this.getAllPreFilterData();\n })\n .withOnFirstDataRendered(() => {\n {\n this.orderLinesNewViewGrid.api.redrawRows();\n this.syncWithProductionScheduleSubject.next();\n }\n })\n .withStopEditingWhenCellsLoseFocus()\n .withServerSideDataSource(this.SLICE_SIZE, this.getServerSideDataSource())\n .withGetRowId((params: GetRowIdParams): string => `level${params.level}id${params.data.id ?? params.data.productionScheduleItemInPathGroup.uuid}`)\n .withCompactView()\n .withGroupEdit()\n .withSingleClickEdit();\n\n if (this.isPreSelection) {\n this.gridOptions = defaultGridOptionsForOrderLines\n .withRowSelection(true, false)\n .withOnRowSelected((event: RowSelectedEvent) => {\n this.nodeSelected(event);\n })\n .build();\n } else {\n this.initializeGridOptionsForBuilder(defaultGridOptionsForOrderLines);\n }\n });\n this.orderLinesGridService\n .getAutoFillButtonClicked()\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((isAutoFillingPath: boolean) => {\n if (isAutoFillingPath) {\n // Start auto filling with the first orderline in the list of orderlines\n this.autoFillPath(0, true);\n }\n });\n }\n\n private initializeGridOptionsForBuilder(defaultGridOptionsForOrderLines: GridOptionsBuilder): void {\n this.gridOptions = defaultGridOptionsForOrderLines\n .withOnCellValueChanged((event: CellValueChangedEvent) => {\n if (event.colDef.headerName !== this.translate.instant(this.quantityTranslation) && event.data.quantity > 0 && event.colDef.colId !== this.rollLengthColumnId) {\n this.addSelectedOrderLinesToPath([event.data], false, undefined);\n }\n })\n .withOnRowDoubleClicked((event: RowDoubleClickedEvent) => {\n this.processRowSelection = false;\n const colDef = this.getColumnDefinitionForClickedCell();\n if (colDef.headerName !== this.translate.instant(this.quantityTranslation) && event.data.quantity > 0 && colDef.colId !== this.rollLengthColumnId) {\n this.addSelectedOrderLinesToPath([event.data], false, undefined);\n }\n setTimeout(() => {\n this.processRowSelection = true;\n }, 1000);\n })\n .withOnRowSelected((event: RowSelectedEvent) => {\n setTimeout(() => {\n if (this.processRowSelection && this.hasQuantitySuggestionPermission) {\n this.orderLinesHelper.setQuantitySuggestionForPath(event, this.productionSchedule, this.selectedPath, this.availableSpaceInBuggyInPicks, this.buggyLengthMaxInPicks, this.fullQualities);\n }\n }, 500);\n })\n .withRowDraggingOutsideGrid(\n (params: {rowNode: RowNode; dragEvent: DragEvent}) =>\n this.orderLinesHelper.onRowDrag(params, this.productionSchedule, this.draggingService, this.renderer, this.pathWidths, this.marginInDentsOfMissingDesigns),\n (params: DndSourceCallbackParams) => params.node.level === 0,\n 1\n )\n .withOnCellEditingStopped((event: CellEditingStoppedEvent) => {\n if (this.hasQuantitySuggestionPermission) {\n this.orderLinesHelper.recalculateQuantitySuggestionWhenRollLengthIsChanged(\n event,\n this.rollLengthColumnId,\n this.productionSchedule,\n this.selectedPath,\n this.buggyLengthMaxInPicks,\n this.availableSpaceInBuggyInPicks,\n this.fullQualities\n );\n }\n })\n .build();\n }\n\n private getServerSideDataSource(): IServerSideDatasource {\n if (!this.readyToFetchRows) {\n return {\n getRows: (params: IServerSideGetRowsParams): void => {\n params.success({\n rowData: [],\n rowCount: 0\n });\n }\n };\n } else {\n return {\n getRows: (params: IServerSideGetRowsParams): void => {\n const sortModel: SortModelItem[] = params.request.sortModel;\n const startRow: number = params.request.startRow;\n const endRow: number = params.request.endRow;\n let filterModel: FilterModel = params.request.filterModel;\n\n this.gridModel = new GridModel(startRow, endRow, sortModel, filterModel);\n this.orderLinesHelper.savedFilterModel = filterModel;\n\n this.orderbook\n .getSlice(OrderLinesTarget.PRODUCTION_SCHEDULE, this.gridModel, this.productionSchedule?.id?.toString())\n .pipe(\n map((orderLines: OverviewListOrderLine[]) =>\n orderLines.map((overviewListOrderLine: OverviewListOrderLine) =>\n ProductionScheduleOrderLineWithQuantity.fromProductionScheduleOrderLine(ProductionScheduleOrderLine.fromOverviewListOrderLine(overviewListOrderLine))\n )\n ),\n takeUntil(this.unSubscribeOnViewDestroy)\n )\n .subscribe({\n next: (orderLines: ProductionScheduleOrderLineWithQuantity[]) => {\n this.orderLinesNewViewGrid.api.hideOverlay();\n\n let rowCount: number;\n if (params.request.groupKeys.length > 0) {\n const productionScheduleInPathGroupWithIdentification = this.orderLinesHelper.getProductionScheduleItemsInPathGroupWithIdentification(\n Number.parseInt(params.request.groupKeys[0], 10),\n this.productionSchedule\n );\n params.success({\n rowData: productionScheduleInPathGroupWithIdentification,\n rowCount: productionScheduleInPathGroupWithIdentification.length\n });\n } else {\n if (orderLines.length < this.SLICE_SIZE) {\n rowCount = params.request.startRow + orderLines.length;\n }\n\n if (startRow === 0) {\n this.getStatusBarData(this.gridModel);\n\n if (orderLines.length === 0) {\n params.api.showNoRowsOverlay();\n } else {\n params.api.hideOverlay();\n }\n }\n\n this.loadingForTheFirstTime = false;\n this.gridOptions.loadingCellRendererParams = {\n loadingForTheFirstTime: this.loadingForTheFirstTime\n };\n\n this.orderLines = orderLines;\n params.success({\n rowData: this.orderLines,\n rowCount\n });\n\n this.setSelectedOrderlines(this.orderLinesNewViewGrid.api);\n }\n\n if (filterModel[0]) {\n this.syncWithProductionScheduleSubject.next();\n }\n },\n error: (error: any) => this.orderLinesHelper.onServerSideDataSourceError(params, error)\n });\n }\n };\n }\n }\n\n private getAllPreFilterData(): void {\n let qualityObservable: Observable = of(null);\n let coloredYarnSetObservables: Observable[] = [];\n\n if (!AssertionUtils.isNullOrUndefined(this.addProductionScheduleNavigationState?.machineQualityId) && !AssertionUtils.isNullOrUndefined(this.addProductionScheduleNavigationState?.creelId)) {\n qualityObservable = this.getQualityById(this.addProductionScheduleNavigationState.machineQualityId);\n this.creelsService.getById(this.addProductionScheduleNavigationState.creelId).subscribe((overviewListCreel: OverviewListCreel) => {\n coloredYarnSetObservables = overviewListCreel.coloredYarnSetsWithStartDent.map((coloredYarnSetsWithStartDent: OverviewListColoredYarnSetWithStartDent) => {\n return this.getColoredYarnSetById(coloredYarnSetsWithStartDent.coloredYarnSet.id);\n });\n\n this.processObservables(qualityObservable, coloredYarnSetObservables);\n });\n } else if (!AssertionUtils.isNullOrUndefined(this.productionSchedule?.machineQuality)) {\n qualityObservable = this.getQualityById(this.productionSchedule.machineQuality.id);\n\n coloredYarnSetObservables = this.productionSchedule.coloredYarnSets.map((coloredYarnSet: OverviewListColoredYarnSetWithStartDent) => {\n return this.getColoredYarnSetById(coloredYarnSet.coloredYarnSet.id);\n });\n\n this.processObservables(qualityObservable, coloredYarnSetObservables);\n } else {\n this.preFilterDataFetched = true;\n this.setInitializationFilters();\n }\n }\n\n private processObservables(qualityObservable: Observable, coloredYarnSetObservables: Observable[]): void {\n forkJoin([qualityObservable, ...coloredYarnSetObservables])\n .pipe(\n mergeMap(([quality, ...coloredYarnSets]: [CarpetWeaveQuality, ColoredYarnSet]) => {\n this.qualityNames.push(quality?.technicalName);\n this.fullQualities.push(quality);\n this.alternativeQualityNames.push(quality?.technicalName);\n\n coloredYarnSets.forEach((coloredYarnSet: ColoredYarnSet) => {\n this.colorSetNames.push(coloredYarnSet?.colorSet?.name);\n this.alternativeColorSetNames.push(coloredYarnSet?.colorSet?.name);\n this.creelColorSetIds.push(coloredYarnSet?.colorSet?.id);\n });\n\n let alternativeQualityObservables = [];\n let alternativeColorSetObservables = [];\n\n if (quality.alternativeMachineQualityIds?.length > 0) {\n alternativeQualityObservables = quality?.alternativeMachineQualityIds?.map((alternativeQualityId: number) => {\n return this.getQualityById(alternativeQualityId);\n });\n }\n\n coloredYarnSets?.map((coloredYarnSet: ColoredYarnSet) => {\n if (coloredYarnSet.colorSet?.alternativeColorSetIds?.length > 0) {\n alternativeColorSetObservables = coloredYarnSet.colorSet.alternativeColorSetIds.map((alternativeColorSetId: number) => {\n return this.getColorSetById(alternativeColorSetId);\n });\n }\n });\n\n if (AssertionUtils.isEmpty(alternativeQualityObservables) && AssertionUtils.isEmpty(alternativeColorSetObservables)) {\n return of([]);\n }\n\n return forkJoin(alternativeQualityObservables.concat(alternativeColorSetObservables) as any);\n })\n )\n .subscribe((alternatives: (CarpetWeaveQuality | ColorSet)[]) => {\n alternatives.forEach((alternative: CarpetWeaveQuality | ColorSet) => {\n if (alternative instanceof CarpetWeaveQuality) {\n this.alternativeQualityNames.push(alternative.technicalName);\n this.fullQualities.push(alternative);\n } else if (alternative instanceof ColorSet) {\n this.alternativeColorSetNames.push(alternative.name);\n }\n });\n\n this.preFilterDataFetched = true;\n this.setInitializationFilters();\n });\n }\n\n private getQualityById(id: number): Observable {\n return this.qualities.getById(id);\n }\n\n private getColoredYarnSetById(id: number): Observable {\n return this.coloredYarnSets.getById(id);\n }\n\n private getColorSetById(id: number): Observable {\n return this.colorSets.getById(id);\n }\n\n private nodeSelected(event: RowSelectedEvent): void {\n const selectedRows = event.api.getSelectedNodes();\n const selectedOrderlines = selectedRows.map((rowNode: RowNode) => rowNode.data);\n const selectedOrderlineIds = selectedOrderlines.map((orderline: ProductionScheduleOrderLine) => orderline.id);\n\n const selectedOrderlinesWithoutDuplicates = [...new Set([...selectedOrderlineIds, ...this.preselectedOrderlineIds])];\n let finalOrderlinesIdList = selectedOrderlinesWithoutDuplicates;\n\n if (event.node.isSelected() === false) {\n finalOrderlinesIdList = selectedOrderlinesWithoutDuplicates.filter((orderlineId: number) => orderlineId !== event.data.id);\n }\n\n this.preselectedOrderlineIds = finalOrderlinesIdList;\n\n if (this.isPreSelection) {\n this.orderlineSelected.emit(this.preselectedOrderlineIds);\n }\n }\n\n private setInitializationFilters(): void {\n if (!this.preFilterDataFetched) {\n return;\n }\n\n let filterModel: any;\n\n filterModel = this.orderLinesHelper.getInitializationFilterModel(\n this.showPreselectedItems,\n this.productionSchedule,\n this.selectedPath,\n this.selectedRestPathColoredYarnSet,\n this.preselectedOrderlineIds,\n this.addProductionScheduleNavigationState,\n this.productionOrderCustomSettings,\n this.alternativeQualityNames,\n this.qualityNames,\n this.alternativeColorSetNames,\n this.colorSetNames,\n this.showOnlyQueryCompatibleOrderlines,\n this.isPreSelection,\n this.selectedPathContentRowData\n );\n\n this.readyToFetchRows = true;\n this.orderLinesNewViewGrid?.api?.setFilterModel(filterModel);\n\n //because we fetched no rows yet, we need to explictly trigger a new getrows on aggrid\n this.orderLinesNewViewGrid?.api?.setGridOption('serverSideDatasource', this.getServerSideDataSource());\n }\n\n private getStatusBarData(gridModel: GridModel): void {\n this.statusBarService\n .getStatusBarData(StatusBarTarget.ORDER_LINES, gridModel)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((statusBar: StatusBar) => {\n this.statusBar = statusBar;\n });\n }\n\n private autoFillPath(autoFillIndex: number, startingAutoFill: boolean = false): void {\n this.orderLinesGridService.setIsFillingPath(true);\n\n if (startingAutoFill) {\n const longestPathLength = this.orderLinesHelper.getLongestPathLengthInPicks(this.productionSchedule);\n\n this.availableSpaceForAutoFill = longestPathLength !== 0 ? longestPathLength : this.availableSpaceInBuggyInPicks ?? this.buggyLengthMaxInPicks;\n\n this.orderlinesThatAreUsedToAutoFill = this.orderLines;\n\n if (!AssertionUtils.isNullOrUndefined(this.selectedPath) && AssertionUtils.isNullOrUndefined(this.availableSpaceInBuggyInPicks)) {\n this.availableSpaceForAutoFill -= this.selectedPath.totalLengthInPicks;\n }\n }\n\n if (AssertionUtils.isNullOrUndefined(this.orderlinesThatAreUsedToAutoFill) || AssertionUtils.isEmpty(this.orderlinesThatAreUsedToAutoFill)) {\n this.dialogBuilderFactoryService.getBuilder().openAlertDialog({\n titleText: 'PRODUCTION_ORDER.WEAVE_PLAN.PATH_LAYOUT.AUTO_FILL_WARNING',\n messageText: 'PRODUCTION_ORDER.WEAVE_PLAN.PATH_LAYOUT.NO_ORDERLINES_ITEMS',\n type: DialogType.INFORMATION\n });\n } else if (!AssertionUtils.isNullOrUndefined(this.orderlinesThatAreUsedToAutoFill) && !AssertionUtils.isNullOrUndefined(this.orderlinesThatAreUsedToAutoFill[autoFillIndex])) {\n this.addSelectedOrderLinesToPath([this.orderlinesThatAreUsedToAutoFill[autoFillIndex]], true, autoFillIndex);\n }\n }\n\n private addSelectedOrderLinesToPath(selectedOrderLines: ProductionScheduleOrderLineWithQuantity[], isAutoFilling: boolean, autoFillIndex: number): void {\n this.orderLinesNewViewGrid?.api?.getSelectedNodes()?.forEach((rowNode: RowNode) => rowNode?.setSelected(false));\n\n const listDrawingOrderLines = selectedOrderLines.map((productionScheduleOrderLine: ProductionScheduleOrderLineWithQuantity) =>\n this.orderLinesHelper.createListDrawingOrderLine(\n this.productionSchedule,\n productionScheduleOrderLine,\n this.productionSchedule.machineQuality.weaveStructure.picksPerColorLine,\n this.marginInDentsOfMissingDesigns,\n this.pathWidths,\n isAutoFilling,\n this.selectedPath,\n this.availableSpaceForAutoFill,\n this.buggyLengthMaxInPicks,\n this.fullQualities\n )\n );\n\n listDrawingOrderLines.forEach((listDrawingOrderLine: ListDrawingOrderLine) => {\n let overviewListColoredYarnSetWithStartDent: OverviewListColoredYarnSetWithStartDent;\n\n overviewListColoredYarnSetWithStartDent = this.productionSchedule.coloredYarnSets.find(\n (cys: OverviewListColoredYarnSetWithStartDent) => cys.startDent === this.productionSchedulePathsOfColoredYarnSet?.productionScheduleColoredYarnSet?.startDent\n );\n\n if (\n !AssertionUtils.isNullOrUndefined(this.selectedPath) &&\n this.productionSchedule.canAddProductionScheduleItemToProductionSchedulePathForNewBuilder(listDrawingOrderLine, this.selectedPath.technicalWidthInDents) &&\n listDrawingOrderLine.amount > 0\n ) {\n if (isAutoFilling) {\n const totalHeightInPicks = this.orderLinesHelper.getTotalCutbarLengthInPicks(selectedOrderLines[0], this.fullQualities) + selectedOrderLines[0].article.technicalHeightInPicks;\n const amountToDeduct = totalHeightInPicks * (selectedOrderLines[0].quantity / this.productionScheduleItemMultiplier);\n if (!isNaN(amountToDeduct) && !AssertionUtils.isNullOrUndefined(amountToDeduct)) {\n this.availableSpaceForAutoFill -= amountToDeduct;\n }\n }\n this.addSelectedOrderLinesToSelectedPath(listDrawingOrderLine, overviewListColoredYarnSetWithStartDent, isAutoFilling, autoFillIndex);\n } else if (\n AssertionUtils.isNullOrUndefined(this.selectedPath) &&\n this.productionSchedule.canAddProductionScheduleItemToColoredYarnSet(overviewListColoredYarnSetWithStartDent.startDent, listDrawingOrderLine) &&\n listDrawingOrderLine.amount > 0\n ) {\n if (isAutoFilling) {\n const totalHeightInPicks = this.orderLinesHelper.getTotalCutbarLengthInPicks(selectedOrderLines[0], this.fullQualities) + selectedOrderLines[0].article.technicalHeightInPicks;\n const amountToDeduct = totalHeightInPicks * (selectedOrderLines[0].quantity / this.productionScheduleItemMultiplier);\n if (!isNaN(amountToDeduct) && !AssertionUtils.isNullOrUndefined(amountToDeduct)) {\n this.availableSpaceForAutoFill -= amountToDeduct;\n }\n }\n this.addSelectedOrderLinesToNewPath(listDrawingOrderLine, isAutoFilling);\n } else if (!isAutoFilling) {\n this.dialogBuilderFactoryService.getBuilder().openAlertDialog({\n titleText: 'PRODUCTION_ORDER.WEAVE_PLAN.WEAVE_PLAN',\n messageText: 'PRODUCTION_ORDER.WEAVE_PLAN.WARNINGS.PATH_WIDTH_DOES_NOT_EQUAL_DESIGN_WIDTH',\n type: DialogType.INFORMATION\n });\n } else {\n this.autoFillPath(autoFillIndex + 1);\n }\n });\n\n if (!AssertionUtils.isNullOrUndefined(this.selectedPath) && isAutoFilling) {\n this.selectNextPathIfPossible(this.selectedPath);\n }\n }\n\n private selectNextPathIfPossible(selectedPath: ProductionSchedulePath): void {\n this.productionSchedulePathsOfColoredYarnSet?.productionSchedulePaths.forEach((path: ProductionSchedulePath, index: number) => {\n if (path.pathNumber === selectedPath.pathNumber + 1) {\n this.selectedPath = path;\n this.selectedPathOutput.emit(this.selectedPath);\n }\n });\n\n if (this.selectedPath === selectedPath) {\n this.selectedRestPathColoredYarnSet = this.productionSchedule?.productionSchedulePathsOfColoredYarnSets[0]?.productionScheduleColoredYarnSet;\n this.selectedPath = undefined;\n this.selectedPathOutput.emit(this.selectedPath);\n this.selectedRestPathColoredYarnSetOutput.emit(this.selectedRestPathColoredYarnSet);\n }\n }\n\n private getColumnDefinitionForClickedCell(): ColDef {\n const column = this.orderLinesNewViewGrid.api.getAllDisplayedColumns().find((col: Column) => col.getColId() === this.orderLinesNewViewGrid.api.getFocusedCell().column.getColId());\n return column ? column.getColDef() : null;\n }\n\n private getColumnDefinitions(additionalInfoColDefs: ColDef[]): ColDef[] {\n return [\n this.colDefBuilderFactoryService.getBuilder().withColIdAndField('id').withNumericMultiFilter(this.getPossibleColumnsValues('id')).withHide().withHiddenInToolPanel().build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('add')\n .withHeaderName('PRODUCTION_ORDER.DESIGN_LIBRARY.ORDER_LINES.ADD_TO_PATH')\n .withCellRenderer(ProgressCellRendererComponent, {\n label: 'GENERAL.ACTIONS.ADD',\n isOrderline: true\n })\n .withoutFilter()\n .withSuppressMovable()\n .withMinWidth(112)\n .withMaxWidth(150)\n .withHide(this.isPreSelection)\n .withHiddenInToolPanel()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('quantity')\n .withHeaderName(this.quantityTranslation)\n .withRightAlignment()\n .withSortable(false)\n .withEditable((params: EditableCallbackParams) => this.orderLinesHelper.isQuantityEditable(params, this.productionSchedule, this.productionOrderCustomSettings))\n .withoutFilter()\n .withOnCellClicked((event: CellClickedEvent) => this.editQuantityCell(event))\n .withCellEditor(\n NumberCellEditorComponent,\n (params: ICellEditorParams): NumberCellEditorParams =>\n ({\n min:\n params.node.level === 0 && params.data instanceof ProductionScheduleOrderLineWithQuantity && params.data.article.design.repeated\n ? 1\n : this.productionSchedule.getProductionScheduleItemMultiplier(),\n max:\n !this.productionOrderCustomSettings?.allowExceedingRequestedAmountOfOrderLineItems && params.node.level === 0 && params.data instanceof ProductionScheduleOrderLineWithQuantity\n ? this.orderLinesHelper.getMaxQuantityToPlan(params.data, this.productionSchedule)\n : undefined,\n autoSelect: true\n }) as NumberCellEditorParams\n )\n .withValueGetter((params: ValueGetterParams) => {\n if (params.data instanceof ProductionScheduleOrderLineWithQuantity && params.data?.quantity) {\n return params.data.quantity;\n } else if (params.data instanceof ProductionScheduleOrderLineWithQuantity) {\n return this.orderLinesHelper.getQuantitySuggestionForPath(\n params.data,\n this.productionSchedule,\n this.selectedPath,\n this.availableSpaceInBuggyInPicks,\n this.buggyLengthMaxInPicks,\n this.fullQualities,\n this.hasQuantitySuggestionPermission,\n this.productionScheduleItemMultiplier\n );\n }\n })\n .withValueSetter((params: ValueSetterParams) => this.setQuantity(params))\n .withSuppressMovable()\n .withHide(this.isPreSelection)\n .withWidth(100)\n .withMinWidth(100)\n .withMaxWidth(150)\n .withHiddenInToolPanel()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId(this.rollLengthColumnId)\n .withField(`rollLengthInMeter`)\n .withHeaderName('PRODUCTION_ORDER.WEAVE_PLAN.PATH_LAYOUT.ROLL_LENGTH', undefined, false, Unit.METER)\n .withOnCellClicked((event: CellClickedEvent) => this.editQuantityCell(event))\n .withSortable(false)\n .withEditable((params: EditableCallbackParams) => this.orderLinesHelper.isRollLengthEditable(params))\n .withCellEditor(NumberCellEditorComponent, (): NumberCellEditorParams => ({isSmall: false, autoSelect: true}) as NumberCellEditorParams)\n .withValueGetter((params: ValueGetterParams) => {\n if (params.data?.rollLengthInMeter && params.data?.article?.commercialHeightInMM / 1000 < params.data.rollLengthInMeter) {\n return params.data.rollLengthInMeter;\n } else if (params.data?.article?.design?.repeated) {\n const rollLengthInMeter = params.data?.article?.commercialHeightInMM / 1000;\n if (!AssertionUtils.isNullOrUndefined(rollLengthInMeter)) {\n params.data.rollLengthInMeter = rollLengthInMeter;\n return params.data.rollLengthInMeter;\n } else {\n return 1;\n }\n } else {\n return null;\n }\n })\n .withMinWidth(130)\n .withHide(this.isPreSelection)\n .withHiddenInToolPanel(this.isPreSelection)\n .withoutFilter()\n .withRightAlignment()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('amountLeft')\n .withValueGetter((params: ValueGetterParams): number => this.orderLinesHelper.getAmountLeft(params.data, this.productionSchedule))\n .withHeaderName('ORDERBOOK.TO_PLAN_AMOUNT')\n .withSortable(false)\n .withRightAlignment()\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withNumericMultiFilter(this.getPossibleColumnsValues('amountLeft'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('totalCount')\n .withValueGetter((params: ValueGetterParams): number => this.orderLinesHelper.getTotalCount(params))\n .withHeaderName('ORDERBOOK.REQUESTED_AMOUNT')\n .withSortable(false)\n .withRightAlignment()\n .withNumericMultiFilter(this.getPossibleColumnsValues('totalCount'))\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('salesOrderReference', true)\n .withHeaderName('ORDERBOOK.ORDERBOOK_REFERENCE')\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withTextMultiFilter(this.getPossibleColumnsValues('salesOrderReference'))\n .withLockVisible()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('salesOrderLineReference', true)\n .withHeaderName('ORDERBOOK.ORDERLINE_REFERENCE')\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withTextMultiFilter(this.getPossibleColumnsValues('salesOrderLineReference'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('article')\n .withField('article.name', true)\n .withHeaderName('ARTICLES.ARTICLE')\n .withComparator(StringUtils.stringComparator)\n .withTextMultiFilter(this.getPossibleColumnsValues('article'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('designCode')\n .withField('article.design.code', true)\n .withHeaderName('DESIGN_LIBRARY.DETAILS.DESIGN_CODE')\n .withComparator(StringUtils.stringComparator)\n .withTextMultiFilter(this.getPossibleColumnsValues('designCode'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('commercialWidthInCM')\n .withField('article.commercialWidthInMM')\n .withHeaderName('GENERAL.DIMENSIONS.WIDTH', 1, false, Unit.CENTIMETER)\n .withCellRenderer((params: ICellRendererParams) => AgGridUtils.buildAgGridCellTextWithoutUnit(params.data.article.commercialWidthInMM, Unit.MILLIMETER, Unit.CENTIMETER, this.l10nIntlService))\n .withTooltipValueGetter((params: ITooltipParams) => AgGridUtils.buildAgGridCellTooltipWithUnitConversion(params.value, Unit.MILLIMETER, this.commercialUnit, this.l10nIntlService))\n .withRightAlignment()\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withNumericMultiFilter(this.getPossibleColumnsValues('commercialWidthInCM'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('commercialHeightInCM')\n .withField('article.commercialHeightInMM')\n .withHeaderName('GENERAL.DIMENSIONS.HEIGHT', 1, false, Unit.CENTIMETER)\n .withCellRenderer((params: ICellRendererParams) => AgGridUtils.buildAgGridCellTextWithoutUnit(params.data.article.commercialHeightInMM, Unit.MILLIMETER, Unit.CENTIMETER, this.l10nIntlService))\n .withTooltipValueGetter((params: ITooltipParams) => AgGridUtils.buildAgGridCellTooltipWithUnitConversion(params.value, Unit.MILLIMETER, this.commercialUnit, this.l10nIntlService))\n .withRightAlignment()\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withNumericMultiFilter(this.getPossibleColumnsValues('commercialHeightInCM'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('technicalWidthInDents')\n .withField('article.technicalWidthInDents')\n .withHeaderName('GENERAL.DIMENSIONS.WIDTH', 1, false, Unit.DENTS)\n .withTooltipValueGetter((params: ITooltipParams) => AgGridUtils.buildAgGridCellTooltipWithUnit(params.value, Unit.DENTS, this.l10nIntlService))\n .withRightAlignment()\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withNumericMultiFilter(this.getPossibleColumnsValues('technicalWidthInDents'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('technicalHeightInPicks')\n .withField('article.technicalHeightInPicks')\n .withHeaderName('GENERAL.DIMENSIONS.HEIGHT', 1, false, Unit.PICKS)\n .withTooltipValueGetter((params: ITooltipParams) => AgGridUtils.buildAgGridCellTooltipWithUnit(params.value, Unit.PICKS, this.l10nIntlService))\n .withRightAlignment()\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withNumericMultiFilter(this.getPossibleColumnsValues('technicalHeightInPicks'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('amountInProductionSchedule')\n .withValueGetter((params: ValueGetterParams): number => this.orderLinesHelper.getAmountInProductionSchedule(params.data, this.productionSchedule))\n .withHeaderName('ORDERBOOK.AMOUNT_IN_PRODUCTION_SCHEDULE')\n .withHide(this.isPreSelection)\n .withHiddenInToolPanel(this.isPreSelection)\n .withRightAlignment()\n .withSortable(false)\n .withNumericMultiFilter(this.getPossibleColumnsValues('amountInProductionSchedule'))\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('machineQualityName')\n .withField('article.machineQuality.nameWithVersion')\n .withHeaderName('TEXTILE_DATA.MACHINE_QUALITY.MACHINE_QUALITY')\n .withTooltipField('article.machineQuality.name')\n .withComparator(StringUtils.stringComparator)\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withTextMultiFilter(this.getPossibleColumnsValues('machineQualityName'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('colorSetName')\n .withField('article.colorSet.name')\n .withHeaderName('TEXTILE_DATA.COLOR_SET.COLOR_SET')\n .withComparator(StringUtils.stringComparator)\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withTextMultiFilter(this.getPossibleColumnsValues('colorSetName'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('mainColor')\n .withField('article.mainColor.name', true)\n .withHeaderName('GENERAL.ADVANCED_SEARCH.MAIN_COLOR')\n .withComparator(StringUtils.stringComparator)\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withTextMultiFilter(this.getPossibleColumnsValues('mainColor'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('borderColor')\n .withField('article.borderColor.name', true)\n .withHeaderName('GENERAL.ADVANCED_SEARCH.BORDER_COLOR')\n .withComparator(StringUtils.stringComparator)\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withTextMultiFilter(this.getPossibleColumnsValues('borderColor'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('shape')\n .withField('article.design.shape', true)\n .withHeaderName('GENERAL.SHAPE')\n .withComparator(StringUtils.stringComparator)\n .withValueGetter((params: ValueGetterParams) => this.getShape(params.data.article?.design?.shape), true)\n .withTextMultiFilter(this.getPossibleColumnsValues('shape'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('finishingName')\n .withField('article.finishing.nameWithVersion', true)\n .withHeaderName('TEXTILE_DATA.FINISHING.FINISHING')\n .withComparator(StringUtils.stringComparator)\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withTextMultiFilter(this.getPossibleColumnsValues('finishingName'))\n .build(),\n ...additionalInfoColDefs,\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('desiredDate')\n .withHeaderName('SALES_ORDERS.DESIRED_DATE')\n .withDate()\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withDateMultiFilter(this.getPossibleColumnsValues('desiredDate'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('customerReference', true)\n .withHeaderName('ORDERBOOK.CUSTOMER_REFERENCE')\n .withComparator(StringUtils.stringComparator)\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withTextMultiFilter(this.getPossibleColumnsValues('customerReference'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('priority')\n .withHeaderName('SALES_ORDERS.PRIORITY.PRIORITY')\n .withCellRenderer(GridTagComponent, {\n translationKey: 'SALES_ORDERS.PRIORITY.',\n size: TagSize.SMALL,\n colorGetter: {\n [Priority.LOW]: TagColor.PRIMARY,\n [Priority.MEDIUM]: TagColor.WARNING,\n [Priority.HIGH]: TagColor.ERROR\n }\n })\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withTextMultiFilter(this.getPossibleColumnsValues('priority'))\n .withTooltipValueGetter((params: ITooltipParams) => this.translate.instant(`SALES_ORDERS.PRIORITY.${params.value}`).toUpperCase())\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('status')\n .withHeaderName('GENERAL.STATUS')\n .withCellRendererSelector(\n (params: ICellRendererParams): CellRendererSelectorResult =>\n params.node.level === 0\n ? {\n component: OrderLineStatusCellRendererComponent,\n params: {\n productionSchedule: this.productionSchedule\n } as OrderLineStatusCellRendererParams\n }\n : {\n component: ProductionScheduleItemInPathGroupStatusCellRendererComponent,\n params: {\n productionSchedule: this.productionSchedule\n }\n }\n )\n .withLockVisible()\n .withTextMultiFilter(this.getPossibleColumnsValues('status'))\n .withTooltipValueGetter((params: ITooltipParams) =>\n params.node.level === 0\n ? this.translate.instant(`ORDERBOOK.ORDER_LINE_STATUS.${params.value}`).toUpperCase()\n : this.translate.instant('ORDERBOOK.IN_PATH', {pathNumber: params?.data?.productionSchedulePath?.pathNumber})\n )\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('amountProduced')\n .withHeaderName('ORDERBOOK.PRODUCED_AMOUNT')\n .withValueGetter((params: ValueGetterParams) => {\n return `${params.data.amountProduced}`;\n })\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withNumericMultiFilter(this.getPossibleColumnsValues('amountProduced'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('amountPlanned')\n .withHeaderName('ORDERBOOK.PLANNED_AMOUNT')\n .withValueGetter((params: ValueGetterParams) => {\n return `${params.data.amountPlanned}`;\n })\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withNumericMultiFilter(this.getPossibleColumnsValues('amountPlanned'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('orderType')\n .withHeaderName('ORDERBOOK.ORDER_TYPE')\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withTextMultiFilter(this.getPossibleColumnsValues('orderType'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('designName')\n .withField('article.design.name', true)\n .withHeaderName('DESIGN_LIBRARY.DETAILS.DESIGN_NAME')\n .withComparator(StringUtils.stringComparator)\n .withTextMultiFilter(this.getPossibleColumnsValues('designName'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('missingDesign')\n .withHeaderName('ORDERBOOK.MISSING_DESIGN')\n .withValueGetter((params: ValueGetterParams) => (params.data.missingDesign ? this.translate.instant(this.booleanTrueTranslation) : this.translate.instant(this.booleanFalseTranslation)), true)\n .withBooleanFilter(this.translate.instant(this.booleanFalseTranslation), this.translate.instant(this.booleanTrueTranslation))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('compatibleColorSetId')\n .withNumericMultiFilter(this.getPossibleColumnsValues('article.colorSet.id'))\n .withHiddenInToolPanel()\n .withField('article.colorSet.id')\n .build()\n ];\n }\n\n private getPossibleColumnsValues(columnIdentifier: string): Observable {\n return this.orderbook.getPossibleValues(columnIdentifier).pipe(takeUntil(this.unSubscribeOnViewDestroy));\n }\n\n private addSelectedOrderLinesToSelectedPath(\n listDrawingOrderLine: ListDrawingOrderLine,\n overviewListColoredYarnSetWithStartDent: OverviewListColoredYarnSetWithStartDent,\n isAutoFilling: boolean,\n autoFillIndex: number\n ): void {\n this.productionSchedulePlan\n .addDrawingToProductionSchedulePath(listDrawingOrderLine, this.selectedPath.pathNumber, overviewListColoredYarnSetWithStartDent)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((path: ProductionSchedulePath) => {\n if (!AssertionUtils.isNullOrUndefined(path)) {\n this.selectedPath = path;\n this.selectedPathOutput.emit(this.selectedPath);\n this.selectedRestPathColoredYarnSet = undefined;\n this.selectedRestPathColoredYarnSetOutput.emit(this.selectedRestPathColoredYarnSet);\n\n if (isAutoFilling) {\n this.autoFillPath(autoFillIndex + 1);\n }\n }\n });\n }\n\n private addSelectedOrderLinesToNewPath(listDrawingOrderLine: ListDrawingOrderLine, isAutoFilling: boolean): void {\n this.productionSchedulePlan\n .addDrawingToColoredYarnSet(listDrawingOrderLine, this.selectedRestPathColoredYarnSet.startDent, undefined)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((path: ProductionSchedulePath) => {\n if (!AssertionUtils.isNullOrUndefined(path)) {\n this.selectedPath = path;\n this.selectedRestPathColoredYarnSet = undefined;\n this.selectedPathOutput.emit(this.selectedPath);\n this.selectedRestPathColoredYarnSetOutput.emit(this.selectedRestPathColoredYarnSet);\n\n if (isAutoFilling) {\n this.autoFillPath(1);\n }\n }\n });\n }\n\n private setSelectedOrderlines(gridApi: GridApi): void {\n gridApi?.deselectAll();\n if (this.preselectedOrderlineIds?.length > 0) {\n gridApi?.forEachNode((node: RowNode) => {\n if (!AssertionUtils.isNullOrUndefined(node.data)) {\n node.setSelected(this.preselectedOrderlineIds.some((orderlineId: number) => orderlineId === node.data.id));\n }\n });\n }\n }\n\n private editQuantityCell(event: CellClickedEvent): void {\n if (this.orderLinesNewViewGrid?.api) {\n this.orderLinesNewViewGrid?.api?.stopEditing();\n }\n\n if (event.column.getColDef().editable) {\n this.orderLinesNewViewGrid?.api.startEditingCell({\n rowIndex: event?.rowIndex,\n colKey: event?.column?.getColId()\n });\n }\n }\n\n private setQuantity(params: ValueSetterParams): boolean {\n if (this.productionScheduleItemMultiplier === 2 && params.newValue % 2 !== 0) {\n params.newValue--;\n }\n\n params.node.data.quantity = params.newValue;\n\n return true;\n }\n\n private getShape(shape: string): string {\n return FixedShape.getTranslationKeyForShape(shape, this.translate);\n }\n\n private subscribeToOverlayActions(): void {\n this.overlayActionsService.actionTriggeredEmitter.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe((actionKey: string) => {\n if (actionKey === this.noOverlayAction[0].key) {\n this.navigateBackOutput.emit();\n }\n });\n }\n}\n","import {Injectable} from '@angular/core';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {OverviewListColoredYarnSetWithStartDent} from '@domain/textile-data/creel/overview-list-colored-yarn-set-with-start-dent';\nimport {OverviewListOrderLine} from '@presentation/pages/texfab/orderbook/overview/overview-list-order-line';\nimport {IRowNode} from 'ag-grid-community';\nimport {Observable, Subject} from 'rxjs';\n\n@Injectable()\nexport class GroupedOrderLinesSelectionService {\n private readonly groupedOrderLinesSelected = new Subject();\n public readonly cellRendererParams = new Subject();\n public readonly selectedPath = new Subject();\n public readonly selectedRestPathColoredYarnSet = new Subject();\n\n private readonly onDetailRowsSelectionChanged = new Subject<{parentNode: IRowNode; parentSelectionState: boolean; orderlinesSelected: OverviewListOrderLine[]}>();\n private readonly SELECTION_STATE = {\n PARTIAL: undefined,\n ALL_SELECTED: true,\n NONE_SELECTED: false\n };\n\n public getGroupedOrderLineSelected(): Observable {\n return this.groupedOrderLinesSelected.asObservable();\n }\n\n public setGroupedOrderLinesSelected(orderlineIdsSelected: number[]): void {\n this.groupedOrderLinesSelected.next(orderlineIdsSelected);\n }\n\n public setDetailRowSelected(parentNode: IRowNode, parentSelectionState: boolean, orderlinesSelected: OverviewListOrderLine[]): void {\n this.onDetailRowsSelectionChanged.next({parentNode, parentSelectionState, orderlinesSelected});\n }\n\n public getdetailRowSelected(): Observable<{parentNode: IRowNode; parentSelectionState: boolean; orderlinesSelected: OverviewListOrderLine[]}> {\n return this.onDetailRowsSelectionChanged.asObservable();\n }\n\n public getParentSelectionState(nodeData: OverviewListOrderLine[] | number[], selectedOrderLines: number[]): boolean {\n let selectionState: boolean;\n if (nodeData.length === selectedOrderLines.length) {\n selectionState = this.SELECTION_STATE.ALL_SELECTED;\n } else if (selectedOrderLines.length === 0) {\n selectionState = this.SELECTION_STATE.NONE_SELECTED;\n } else {\n selectionState = this.SELECTION_STATE.PARTIAL;\n }\n\n return selectionState;\n }\n\n public updateDetailCellRendererParams(params: any): void {\n this.cellRendererParams.next(params);\n }\n\n public updateSelectedPath(path: ProductionSchedulePath): void {\n this.selectedPath.next(path);\n }\n\n public updateSelectedRestPathColoredYarnSet(coloredYarnSet: OverviewListColoredYarnSetWithStartDent): void {\n this.selectedRestPathColoredYarnSet.next(coloredYarnSet);\n }\n}\n","import {Component, Inject, OnDestroy, Renderer2} from '@angular/core';\nimport {GridIdentifier} from '@application/grids/grid-identifier.enum';\nimport {DraggingService} from '@application/services/dragging/dragging.service';\nimport {FixedShape} from '@domain/drawing-library/fixed-shape.enum';\nimport {OrderLinesTarget} from '@domain/order-lines-target.enum';\nimport {ProductionOrderCustomSettings} from '@domain/production-schedule/custom-settings/production-order-custom-settings';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionScheduleOrderLine} from '@domain/production-schedule/production-schedule-order-line';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {Permission} from '@domain/profile/permission.enum';\nimport {OverviewListColoredYarnSetWithStartDent} from '@domain/textile-data/creel/overview-list-colored-yarn-set-with-start-dent';\nimport {CarpetWeaveQuality} from '@domain/textile-data/machine-quality/carpet-weave-quality';\nimport {PathWidth} from '@domain/textile-data/machine-quality/path-width';\nimport {AUTHENTICATION, Authentication} from '@infrastructure/http/authentication/authentication';\nimport {ORDERBOOK, Orderbook} from '@infrastructure/http/orderbook/orderbook';\nimport {ListDrawingOrderLine} from '@presentation/components/drawing-list/list-drawing-order-line';\nimport {OverviewListOrderLine} from '@presentation/pages/texfab/orderbook/overview/overview-list-order-line';\nimport {\n AgGridUtils,\n AssertionUtils,\n BaseComponent,\n ColDefBuilderFactoryService,\n DialogBuilderFactoryService,\n DialogType,\n GridModel,\n GridOptionsBuilderFactoryService,\n GridTagComponent,\n NoDataOverlayComponentParams,\n NumberCellEditorComponent,\n NumberCellEditorParams,\n Priority,\n ProgressCellRendererComponent,\n StringUtils,\n TagColor,\n TagSize,\n TranslateService,\n Unit\n} from '@vdw/angular-component-library';\nimport {ICellRendererAngularComp} from 'ag-grid-angular';\nimport {\n AdvancedFilterModel,\n CellClickedEvent,\n CellEditingStoppedEvent,\n CellRendererSelectorResult,\n CellValueChangedEvent,\n ColDef,\n Column,\n DndSourceCallbackParams,\n EditableCallbackParams,\n FilterModel,\n FirstDataRenderedEvent,\n GridApi,\n GridOptions,\n ICellEditorParams,\n ICellRendererParams,\n IRowNode,\n IServerSideDatasource,\n IServerSideGetRowsParams,\n ITooltipParams,\n RowDoubleClickedEvent,\n RowNode,\n RowSelectedEvent,\n SortModelItem,\n ValueGetterParams,\n ValueSetterParams\n} from 'ag-grid-community';\nimport {L10nIntlService} from 'angular-l10n';\nimport {map, Observable, takeUntil} from 'rxjs';\nimport {PRODUCTION_SCHEDULE_PLAN, ProductionSchedulePlan} from '../../../../plan/production-schedule-plan';\nimport {OrderLinesHelper} from '../../order-lines-helper';\nimport {OrderLineStatusCellRendererParams} from '../../order-lines-view/order-line-status-cell-renderer/order-line-status-cell-renderer-params.interface';\nimport {OrderLineStatusCellRendererComponent} from '../../order-lines-view/order-line-status-cell-renderer/order-line-status-cell-renderer.component';\nimport {ProductionScheduleItemInPathGroupStatusCellRendererComponent} from '../../order-lines-view/production-schedule-item-in-path-group-status-cell-renderer/production-schedule-item-in-path-group-status-cell-renderer.component';\nimport {ProductionScheduleItemInPathGroupWithIdentification} from '../../order-lines-view/production-schedule-item-in-path-group-with-identification';\nimport {ProductionScheduleOrderLineWithQuantity} from '../../order-lines-view/production-schedule-order-line-with-quantity';\nimport {GroupedOrderLinesSelectionService} from '../grouped-orderlines-selection.service';\nimport {OrderLinesGroupedDetailCellRendererData} from './order-lines-grouped-detail-cell-renderer-data.interface';\n\ntype RowData = ProductionScheduleOrderLineWithQuantity | ProductionScheduleItemInPathGroupWithIdentification;\n\n@Component({\n templateUrl: './order-lines-grouped-detail-cell-renderer.component.html'\n})\nexport class OrderLinesGroupedDetailCellRendererComponent extends BaseComponent implements ICellRendererAngularComp, OnDestroy {\n public detailOptions: GridOptions;\n public loadingForTheFirstTime = true;\n\n private detailApi: GridApi;\n private detailGridModel: GridModel;\n\n private initialIds: string[];\n private masterGridApi: GridApi;\n private masterNode: IRowNode;\n private data: OverviewListOrderLine[];\n private parentState: boolean;\n private rollLengthColumnId = 'rollLength';\n\n private commercialUnit: Unit;\n private displayTechnicalUnit = true;\n private productionSchedule: ProductionSchedule;\n private isPreSelection: boolean;\n private productionOrderCustomSettings: ProductionOrderCustomSettings;\n private selectedPath: ProductionSchedulePath;\n private selectedRestPathColoredYarnSet: OverviewListColoredYarnSetWithStartDent;\n private productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet;\n private processRowSelection: boolean = true;\n private availableSpaceInBuggyInPicks: number;\n private buggyLengthMaxInPicks: number;\n private fullQualities: CarpetWeaveQuality[];\n private pathWidths: PathWidth[] = [];\n private marginInDentsOfMissingDesigns: number;\n private hasQuantitySuggestionPermission: boolean = false;\n private productionScheduleItemMultiplier: number = 2;\n\n private readonly SLICE_SIZE = 30;\n private readonly DETAIL_ID_PREFIX = 'detail_';\n private readonly WIDTH_HEADER_NAME = 'GENERAL.DIMENSIONS.WIDTH';\n\n public constructor(\n @Inject(AUTHENTICATION) private authentication: Authentication,\n @Inject(ORDERBOOK) private readonly orderbook: Orderbook,\n @Inject(PRODUCTION_SCHEDULE_PLAN) private readonly productionSchedulePlan: ProductionSchedulePlan,\n private readonly colDefBuilderFactoryService: ColDefBuilderFactoryService,\n private readonly orderLinesHelper: OrderLinesHelper,\n private readonly gridOptionsBuilderFactoryService: GridOptionsBuilderFactoryService,\n private readonly groupedOrderLinesSelectionService: GroupedOrderLinesSelectionService,\n private readonly translate: TranslateService,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n private readonly l10nIntlService: L10nIntlService,\n private readonly draggingService: DraggingService,\n private readonly renderer: Renderer2\n ) {\n super();\n }\n\n public agInit(params: any): void {\n if (!AssertionUtils.isNullOrUndefined(params?.initialIds)) {\n this.initialIds = params.initialIds.map(String);\n }\n\n this.masterGridApi = params.api;\n this.masterNode = params.node.parent;\n this.parentState = params.parentState;\n\n this.setDataParams(params);\n\n this.orderLinesHelper.displayTechnicalUnit = this.displayTechnicalUnit;\n this.orderLinesHelper.commercialUnit = this.commercialUnit;\n\n this.groupedOrderLinesSelectionService.cellRendererParams.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe((updatedParams: any) => {\n this.setDataParams(updatedParams);\n\n setTimeout(() => {\n this.detailApi?.refreshCells();\n });\n });\n\n this.setupDetailGrid(params.data.orderlineIds);\n\n if (this.authentication.getCurrentSubscription()?.hasPermission(Permission.TEXFAB_QUANTITY_SUGGESTION)) {\n this.hasQuantitySuggestionPermission = true;\n }\n }\n\n public refresh(_: ICellRendererParams): boolean {\n return false;\n }\n\n public ngOnDestroy(): void {\n const detailGridId = 'detail_' + this.masterNode.id;\n this.masterGridApi.removeDetailGridInfo(detailGridId);\n }\n\n private setDataParams(params: OrderLinesGroupedDetailCellRendererData): void {\n this.displayTechnicalUnit = params.extraData.displayTechnicalUnit;\n this.commercialUnit = params.extraData.commercialUnit;\n this.productionSchedule = params.extraData.productionSchedule;\n this.isPreSelection = params.extraData.isPreSelection;\n this.productionOrderCustomSettings = params.extraData.productionOrderCustomSettings;\n this.selectedPath = params.extraData.selectedPath;\n this.selectedRestPathColoredYarnSet = params.extraData.selectedRestPathColoredYarnSet;\n this.productionSchedulePathsOfColoredYarnSet = params.extraData.productionSchedulePathsOfColoredYarnSet;\n this.availableSpaceInBuggyInPicks = params.extraData.availableSpaceInBuggyInPicks;\n this.buggyLengthMaxInPicks = params.extraData.buggyLengthMaxInPicks;\n this.pathWidths = params.extraData.pathWidths;\n this.fullQualities = params.extraData.fullQualities;\n this.marginInDentsOfMissingDesigns = params.extraData.marginInDentsOfMissingDesigns;\n this.productionScheduleItemMultiplier = params.extraData.productionScheduleItemMultiplier;\n\n if (!this.isPreSelection) {\n this.detailApi?.forEachNode((rowNode: RowNode) => {\n if (!AssertionUtils.isNullOrUndefined(rowNode.data)) {\n const value = this.orderLinesHelper.getQuantitySuggestionForPath(\n rowNode.data,\n this.productionSchedule,\n this.selectedPath,\n this.availableSpaceInBuggyInPicks,\n this.buggyLengthMaxInPicks,\n this.fullQualities,\n this.hasQuantitySuggestionPermission,\n this.productionScheduleItemMultiplier\n );\n rowNode.setDataValue('quantity', value);\n }\n });\n }\n }\n\n private addSelectedOrderLinesToPath(colDef: ColDef, data: ProductionScheduleOrderLineWithQuantity): void {\n if (colDef.headerName !== this.translate.instant('ORDERBOOK.QUANTITY') && data.quantity > 0 && colDef.colId !== this.rollLengthColumnId) {\n const selectedOrderLines = [data];\n\n this.detailApi.getSelectedNodes().forEach((rowNode: RowNode) => rowNode.setSelected(false));\n\n const listDrawingOrderLines = selectedOrderLines.map((productionScheduleOrderLine: ProductionScheduleOrderLineWithQuantity) =>\n this.orderLinesHelper.createListDrawingOrderLine(\n this.productionSchedule,\n productionScheduleOrderLine,\n this.productionSchedule.machineQuality.weaveStructure.picksPerColorLine,\n this.marginInDentsOfMissingDesigns,\n this.pathWidths,\n false\n )\n );\n\n listDrawingOrderLines.forEach((listDrawingOrderLine: ListDrawingOrderLine) => {\n let overviewListColoredYarnSetWithStartDent: OverviewListColoredYarnSetWithStartDent;\n\n overviewListColoredYarnSetWithStartDent = this.productionSchedule.coloredYarnSets.find(\n (cys: OverviewListColoredYarnSetWithStartDent) => cys.startDent === this.productionSchedulePathsOfColoredYarnSet?.productionScheduleColoredYarnSet?.startDent\n );\n\n if (\n !AssertionUtils.isNullOrUndefined(this.selectedPath) &&\n this.productionSchedule.canAddProductionScheduleItemToProductionSchedulePathForNewBuilder(listDrawingOrderLine, this.selectedPath.technicalWidthInDents)\n ) {\n this.productionSchedulePlan.addDrawingToProductionSchedulePath(listDrawingOrderLine, this.selectedPath.pathNumber, overviewListColoredYarnSetWithStartDent);\n } else if (\n AssertionUtils.isNullOrUndefined(this.selectedPath) &&\n this.productionSchedule.canAddProductionScheduleItemToColoredYarnSet(overviewListColoredYarnSetWithStartDent.startDent, listDrawingOrderLine)\n ) {\n this.addSelectedOrderLinesToNewPath(listDrawingOrderLine);\n } else {\n this.dialogBuilderFactoryService.getBuilder().openAlertDialog({\n titleText: 'PRODUCTION_ORDER.WEAVE_PLAN.WEAVE_PLAN',\n messageText: 'PRODUCTION_ORDER.WEAVE_PLAN.WARNINGS.PATH_WIDTH_DOES_NOT_EQUAL_DESIGN_WIDTH',\n type: DialogType.INFORMATION\n });\n }\n });\n }\n }\n\n private addSelectedOrderLinesToNewPath(listDrawingOrderLine: ListDrawingOrderLine): void {\n this.productionSchedulePlan\n .addDrawingToColoredYarnSet(listDrawingOrderLine, this.selectedRestPathColoredYarnSet.startDent, undefined)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((path: ProductionSchedulePath) => {\n if (!AssertionUtils.isNullOrUndefined(path)) {\n this.selectedPath = path;\n this.selectedRestPathColoredYarnSet = undefined;\n this.groupedOrderLinesSelectionService.updateSelectedPath(this.selectedPath);\n this.groupedOrderLinesSelectionService.updateSelectedRestPathColoredYarnSet(this.selectedRestPathColoredYarnSet);\n }\n });\n }\n\n private onFirstDataRendered(event: FirstDataRenderedEvent): void {\n this.detailApi = event.api;\n\n if (AssertionUtils.isNullOrUndefined(this.parentState)) {\n this.initialIds?.forEach((id: string) => {\n if (!AssertionUtils.isNullOrUndefined(this.detailApi?.getRowNode(id))) {\n this.detailApi?.getRowNode(id).setSelected(true);\n }\n });\n } else {\n this.detailApi.forEachNode((detailNode: RowNode) => detailNode.setSelected(this.parentState));\n }\n\n const detailGridId = `${this.DETAIL_ID_PREFIX}${this.masterNode.id}`;\n const gridInfo = {id: detailGridId, api: event.api};\n\n this.masterGridApi.addDetailGridInfo(detailGridId, gridInfo);\n\n if (!this.isPreSelection) {\n this.detailApi?.forEachNode((rowNode: RowNode) => {\n if (!AssertionUtils.isNullOrUndefined(rowNode.data)) {\n const value = this.orderLinesHelper.getQuantitySuggestionForPath(\n rowNode.data,\n this.productionSchedule,\n this.selectedPath,\n this.availableSpaceInBuggyInPicks,\n this.buggyLengthMaxInPicks,\n this.fullQualities,\n this.hasQuantitySuggestionPermission,\n this.productionScheduleItemMultiplier\n );\n rowNode.setDataValue('quantity', value);\n }\n });\n }\n }\n\n private onRowSelected(event: RowSelectedEvent): void {\n if (this.isPreSelection) {\n const selectedNodes = event.api.getSelectedNodes();\n const selectionState = this.groupedOrderLinesSelectionService.getParentSelectionState(\n this.data,\n selectedNodes.map((node: RowNode) => node.data.id)\n );\n\n const selectedNodeIds = selectedNodes.map((node: RowNode) => node.id);\n const currentlySelectedOrderLines = this.data.filter((orderline: OverviewListOrderLine) => selectedNodeIds.map(Number).includes(orderline.id));\n\n this.groupedOrderLinesSelectionService.setDetailRowSelected(this.masterNode, selectionState, currentlySelectedOrderLines);\n }\n }\n\n private getPossibleColumnsValues(columnIdentifier: string): Observable {\n return this.orderbook.getPossibleValues(columnIdentifier).pipe(takeUntil(this.unSubscribeOnViewDestroy));\n }\n\n private getColumnDefinitionForClickedCell(): ColDef {\n const column = this.detailApi.getAllDisplayedColumns().find((col: Column) => col.getColId() === this.detailApi.getFocusedCell().column.getColId());\n return column ? column.getColDef() : null;\n }\n\n private getDetailServerSideDataSource(orderlineIds?: number[]): IServerSideDatasource {\n return {\n getRows: (params: IServerSideGetRowsParams): void => {\n const sortModel: SortModelItem[] = params.request.sortModel;\n const startRow: number = params.request.startRow;\n const endRow: number = params.request.endRow;\n const currentFilterModel: FilterModel | AdvancedFilterModel = params.request.filterModel;\n\n let filterModel =\n !AssertionUtils.isNullOrUndefined(orderlineIds) && !AssertionUtils.isEmpty(orderlineIds)\n ? {\n ...currentFilterModel,\n id: {\n filterModels: [null, {values: orderlineIds, filterType: 'set'}],\n filterType: 'multi'\n }\n }\n : currentFilterModel;\n\n this.detailGridModel = new GridModel(startRow, endRow, sortModel, filterModel);\n\n this.orderbook\n .getSlice(OrderLinesTarget.PRODUCTION_SCHEDULE, this.detailGridModel, this.productionSchedule?.id?.toString())\n .pipe(\n map((orderLines: OverviewListOrderLine[]) => {\n this.data = orderLines;\n return orderLines.map((overviewListOrderLine: OverviewListOrderLine) =>\n ProductionScheduleOrderLineWithQuantity.fromProductionScheduleOrderLine(ProductionScheduleOrderLine.fromOverviewListOrderLine(overviewListOrderLine))\n );\n }),\n takeUntil(this.unSubscribeOnViewDestroy)\n )\n .subscribe({\n next: (orderLines: ProductionScheduleOrderLineWithQuantity[]) => {\n let rowCount: number;\n\n if (orderLines.length < this.SLICE_SIZE) {\n rowCount = startRow + orderLines.length;\n }\n\n if (startRow === 0) {\n if (orderLines.length === 0) {\n params.api.showNoRowsOverlay();\n } else {\n params.api.hideOverlay();\n }\n }\n\n this.loadingForTheFirstTime = false;\n this.detailOptions.loadingCellRendererParams = {\n loadingForTheFirstTime: this.loadingForTheFirstTime\n };\n\n setTimeout(() => {\n params.success({\n rowData: orderLines,\n rowCount\n });\n });\n },\n error: (error: any) => {\n this.orderLinesHelper.onServerSideDataSourceError(params, error);\n }\n });\n }\n };\n }\n\n private setupDetailGrid(orderLineIds: number[]): void {\n const defaultDetailGridOptions = this.gridOptionsBuilderFactoryService\n .getBuilder(this.getDetailColumnDefinitions(), this.isPreSelection ? GridIdentifier.ORDER_ITEMS_NEW_PRESELECTION : GridIdentifier.ORDER_ITEMS_NEW_BUILDER)\n .withRowSelection(this.isPreSelection, false)\n .withHeaderHeight(32)\n .withFloatingFiltersHeight(32)\n .withServerSideDataSource(this.SLICE_SIZE, this.getDetailServerSideDataSource(orderLineIds))\n .withStopEditingWhenCellsLoseFocus()\n .withCompactView()\n .withPopupParent(document.querySelector('body'))\n .withOnRowSelected((event: RowSelectedEvent) => this.onRowSelected(event))\n .withOnFirstDataRendered((event: FirstDataRenderedEvent) => this.onFirstDataRendered(event))\n .withNoRowsOverlay({\n scale: 0.2,\n titleParam: 'ORDERBOOK.ORDERLINE',\n hideDescription: true,\n isAnyFilterPresent: () => !AssertionUtils.isNullOrUndefined(this.detailApi) && Object.values(this.detailApi?.getFilterModel())?.length > 0\n } as NoDataOverlayComponentParams);\n\n if (this.isPreSelection) {\n this.detailOptions = defaultDetailGridOptions.build();\n } else {\n this.detailOptions = defaultDetailGridOptions\n .withOnRowSelected((event: RowSelectedEvent) => {\n setTimeout(() => {\n if (this.processRowSelection && this.hasQuantitySuggestionPermission) {\n this.orderLinesHelper.setQuantitySuggestionForPath(event, this.productionSchedule, this.selectedPath, this.availableSpaceInBuggyInPicks, this.buggyLengthMaxInPicks, this.fullQualities);\n }\n }, 500);\n })\n .withOnRowDoubleClicked((event: RowDoubleClickedEvent) => {\n this.processRowSelection = false;\n const colDef = this.getColumnDefinitionForClickedCell();\n this.addSelectedOrderLinesToPath(colDef, event.data);\n setTimeout(() => {\n this.processRowSelection = true;\n }, 1000);\n })\n .withOnCellValueChanged((event: CellValueChangedEvent) => {\n this.addSelectedOrderLinesToPath(event.colDef, event.data);\n })\n .withRowDraggingOutsideGrid(\n (params: {rowNode: RowNode; dragEvent: DragEvent}) =>\n this.orderLinesHelper.onRowDrag(params, this.productionSchedule, this.draggingService, this.renderer, this.pathWidths, this.marginInDentsOfMissingDesigns),\n (params: DndSourceCallbackParams) => params.node.level === 0,\n 1\n )\n .withOnCellEditingStopped((event: CellEditingStoppedEvent) => {\n if (this.hasQuantitySuggestionPermission) {\n this.orderLinesHelper.recalculateQuantitySuggestionWhenRollLengthIsChanged(\n event,\n this.rollLengthColumnId,\n this.productionSchedule,\n this.selectedPath,\n this.buggyLengthMaxInPicks,\n this.availableSpaceInBuggyInPicks,\n this.fullQualities\n );\n }\n })\n .build();\n }\n }\n\n private getDetailColumnDefinitions(): ColDef[] {\n return [\n this.colDefBuilderFactoryService.getBuilder().withColIdAndField('id').withNumericMultiFilter(this.getPossibleColumnsValues('id')).withHide().withHiddenInToolPanel().build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('add')\n .withHeaderName('PRODUCTION_ORDER.DESIGN_LIBRARY.ORDER_LINES.ADD_TO_PATH')\n .withCellRenderer(ProgressCellRendererComponent, {\n label: 'GENERAL.ACTIONS.ADD',\n isOrderline: true\n })\n .withoutFilter()\n .withSuppressMovable()\n .withMinWidth(112)\n .withMaxWidth(150)\n .withHide(this.isPreSelection)\n .withHiddenInToolPanel()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('quantity')\n .withHeaderName('ORDERBOOK.QUANTITY')\n .withRightAlignment()\n .withSortable(false)\n .withEditable((params: EditableCallbackParams) => this.orderLinesHelper.isQuantityEditable(params, this.productionSchedule, this.productionOrderCustomSettings))\n .withoutFilter()\n .withOnCellClicked((event: CellClickedEvent) => this.editQuantityCell(event))\n .withCellEditor(\n NumberCellEditorComponent,\n (params: ICellEditorParams): NumberCellEditorParams =>\n ({\n min:\n params.node.level === 0 && params.data instanceof ProductionScheduleOrderLineWithQuantity && params.data.article.design.repeated\n ? 1\n : this.productionSchedule.getProductionScheduleItemMultiplier(),\n max:\n !this.productionOrderCustomSettings?.allowExceedingRequestedAmountOfOrderLineItems && params.node.level === 0 && params.data instanceof ProductionScheduleOrderLineWithQuantity\n ? this.orderLinesHelper.getMaxQuantityToPlan(params.data, this.productionSchedule)\n : undefined,\n autoSelect: true\n }) as NumberCellEditorParams\n )\n .withValueGetter((params: ValueGetterParams) => {\n if (params.data instanceof ProductionScheduleOrderLineWithQuantity && params.data?.quantity) {\n return params.data.quantity;\n } else if (params.data instanceof ProductionScheduleOrderLineWithQuantity) {\n return this.orderLinesHelper.getQuantitySuggestionForPath(\n params.data,\n this.productionSchedule,\n this.selectedPath,\n this.availableSpaceInBuggyInPicks,\n this.buggyLengthMaxInPicks,\n this.fullQualities,\n this.hasQuantitySuggestionPermission,\n this.productionScheduleItemMultiplier\n );\n }\n })\n .withValueSetter((params: ValueSetterParams) => this.setQuantity(params))\n .withSuppressMovable()\n .withHide(this.isPreSelection)\n .withWidth(100)\n .withMinWidth(100)\n .withMaxWidth(150)\n .withHiddenInToolPanel()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId(this.rollLengthColumnId)\n .withField(`rollLengthInMeter`)\n .withHeaderName('PRODUCTION_ORDER.WEAVE_PLAN.PATH_LAYOUT.ROLL_LENGTH', undefined, false, Unit.METER)\n .withOnCellClicked((event: CellClickedEvent) => this.editQuantityCell(event))\n .withSortable(false)\n .withEditable((params: EditableCallbackParams) => this.orderLinesHelper.isRollLengthEditable(params))\n .withCellEditor(NumberCellEditorComponent, (): NumberCellEditorParams => ({isSmall: false, autoSelect: true}) as NumberCellEditorParams)\n .withValueGetter((params: ValueGetterParams) => {\n if (params.data?.rollLengthInMeter && params.data?.article?.commercialHeightInMM / 1000 < params.data.rollLengthInMeter) {\n return params.data.rollLengthInMeter;\n } else if (params.data?.article?.design?.repeated) {\n const rollLengthInMeter = params.data?.article?.commercialHeightInMM / 1000;\n if (!AssertionUtils.isNullOrUndefined(rollLengthInMeter)) {\n params.data.rollLengthInMeter = rollLengthInMeter;\n return params.data.rollLengthInMeter;\n } else {\n return 1;\n }\n } else {\n return null;\n }\n })\n .withMinWidth(130)\n .withoutFilter()\n .withHide(this.isPreSelection)\n .withHiddenInToolPanel(this.isPreSelection)\n .withRightAlignment()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('amountLeft')\n .withValueGetter((params: ValueGetterParams): number => this.orderLinesHelper.getAmountLeft(params.data, this.productionSchedule))\n .withHeaderName('ORDERBOOK.TO_PLAN_AMOUNT')\n .withSortable(false)\n .withRightAlignment()\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withNumericMultiFilter(this.getPossibleColumnsValues('amountLeft'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('totalCount')\n .withValueGetter((params: ValueGetterParams): number => this.orderLinesHelper.getTotalCount(params))\n .withHeaderName('ORDERBOOK.REQUESTED_AMOUNT')\n .withSortable(false)\n .withRightAlignment()\n .withNumericMultiFilter(this.getPossibleColumnsValues('totalCount'))\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('salesOrderReference', true)\n .withHeaderName('ORDERBOOK.ORDERBOOK_REFERENCE')\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withTextMultiFilter(this.getPossibleColumnsValues('salesOrderReference'))\n .withLockVisible()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('salesOrderLineReference', true)\n .withHeaderName('ORDERBOOK.ORDERLINE_REFERENCE')\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withTextMultiFilter(this.getPossibleColumnsValues('salesOrderLineReference'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('article')\n .withField('article.name', true)\n .withHeaderName('ARTICLES.ARTICLE')\n .withComparator(StringUtils.stringComparator)\n .withTextMultiFilter(this.getPossibleColumnsValues('article'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('designCode')\n .withField('article.design.code', true)\n .withHeaderName('DESIGN_LIBRARY.DETAILS.DESIGN_CODE')\n .withComparator(StringUtils.stringComparator)\n .withTextMultiFilter(this.getPossibleColumnsValues('designCode'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('commercialWidthInCM')\n .withField('article.commercialWidthInMM')\n .withHeaderName(this.WIDTH_HEADER_NAME, 1, false, Unit.CENTIMETER)\n .withCellRenderer((params: ICellRendererParams) => AgGridUtils.buildAgGridCellTextWithoutUnit(params.data.article.commercialWidthInMM, Unit.MILLIMETER, Unit.CENTIMETER, this.l10nIntlService))\n .withTooltipValueGetter((params: ITooltipParams) => AgGridUtils.buildAgGridCellTooltipWithUnitConversion(params.value, Unit.MILLIMETER, this.commercialUnit, this.l10nIntlService))\n .withRightAlignment()\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withNumericMultiFilter(this.getPossibleColumnsValues('commercialWidthInMM'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('commercialHeightInCM')\n .withField('article.commercialHeightInMM')\n .withHeaderName('GENERAL.DIMENSIONS.HEIGHT', 1, false, Unit.CENTIMETER)\n .withCellRenderer((params: ICellRendererParams) => AgGridUtils.buildAgGridCellTextWithoutUnit(params.data.article.commercialHeightInMM, Unit.MILLIMETER, Unit.CENTIMETER, this.l10nIntlService))\n .withTooltipValueGetter((params: ITooltipParams) => AgGridUtils.buildAgGridCellTooltipWithUnitConversion(params.value, Unit.MILLIMETER, this.commercialUnit, this.l10nIntlService))\n .withRightAlignment()\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withNumericMultiFilter(this.getPossibleColumnsValues('commercialHeightInMM'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('technicalWidthInDents')\n .withField('article.technicalWidthInDents')\n .withHeaderName(this.WIDTH_HEADER_NAME, 1, false, Unit.DENTS)\n .withTooltipValueGetter((params: ITooltipParams) => AgGridUtils.buildAgGridCellTooltipWithUnit(params.value, Unit.DENTS, this.l10nIntlService))\n .withRightAlignment()\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withNumericMultiFilter(this.getPossibleColumnsValues('technicalWidthInDents'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('technicalHeightInPicks')\n .withField('article.technicalHeightInPicks')\n .withHeaderName('GENERAL.DIMENSIONS.HEIGHT', 1, false, Unit.PICKS)\n .withTooltipValueGetter((params: ITooltipParams) => AgGridUtils.buildAgGridCellTooltipWithUnit(params.value, Unit.PICKS, this.l10nIntlService))\n .withRightAlignment()\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withNumericMultiFilter(this.getPossibleColumnsValues('technicalHeightInPicks'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('amountInProductionSchedule')\n .withValueGetter((params: ValueGetterParams): number => this.orderLinesHelper.getAmountInProductionSchedule(params.data, this.productionSchedule))\n .withHeaderName('ORDERBOOK.AMOUNT_IN_PRODUCTION_SCHEDULE')\n .withHide(this.isPreSelection)\n .withHiddenInToolPanel(this.isPreSelection)\n .withRightAlignment()\n .withSortable(false)\n .withNumericMultiFilter(this.getPossibleColumnsValues('amountInProductionSchedule'))\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('machineQualityName')\n .withField('article.machineQuality.nameWithVersion')\n .withHeaderName('TEXTILE_DATA.MACHINE_QUALITY.MACHINE_QUALITY')\n .withTooltipField('article.machineQuality.name')\n .withComparator(StringUtils.stringComparator)\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withTextMultiFilter(this.getPossibleColumnsValues('machineQualityName'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('coloredYarnSet')\n .withField('article.coloredYarnSet.name', true)\n .withHeaderName('TEXTILE_DATA.COLORED_YARN_SET.COLORED_YARN_SET')\n .withComparator(StringUtils.stringComparator)\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withTextMultiFilter(this.getPossibleColumnsValues('coloredYarnSet'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('mainColor')\n .withField('article.mainColor.name', true)\n .withHeaderName('GENERAL.ADVANCED_SEARCH.MAIN_COLOR')\n .withComparator(StringUtils.stringComparator)\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withTextMultiFilter(this.getPossibleColumnsValues('mainColor'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('borderColor')\n .withField('article.borderColor.name', true)\n .withHeaderName('GENERAL.ADVANCED_SEARCH.BORDER_COLOR')\n .withComparator(StringUtils.stringComparator)\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withTextMultiFilter(this.getPossibleColumnsValues('borderColor'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('shape')\n .withField('article.design.shape', true)\n .withHeaderName('GENERAL.SHAPE')\n .withComparator(StringUtils.stringComparator)\n .withValueGetter((params: ValueGetterParams) => this.getShape(params.data.article?.design?.shape), true)\n .withTextMultiFilter(this.getPossibleColumnsValues('shape'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('finishingName')\n .withField('article.finishing.nameWithVersion', true)\n .withHeaderName('TEXTILE_DATA.FINISHING.FINISHING')\n .withComparator(StringUtils.stringComparator)\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withTextMultiFilter(this.getPossibleColumnsValues('finishingName'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('desiredDate')\n .withHeaderName('SALES_ORDERS.DESIRED_DATE')\n .withDate()\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withDateMultiFilter(this.getPossibleColumnsValues('desiredDate'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('customerReference', true)\n .withHeaderName('ORDERBOOK.CUSTOMER_REFERENCE')\n .withComparator(StringUtils.stringComparator)\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withTextMultiFilter(this.getPossibleColumnsValues('customerReference'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('priority')\n .withHeaderName('SALES_ORDERS.PRIORITY.PRIORITY')\n .withCellRenderer(GridTagComponent, {\n translationKey: 'SALES_ORDERS.PRIORITY.',\n size: TagSize.SMALL,\n colorGetter: {\n [Priority.LOW]: TagColor.PRIMARY,\n [Priority.MEDIUM]: TagColor.WARNING,\n [Priority.HIGH]: TagColor.ERROR\n }\n })\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withTextMultiFilter(this.getPossibleColumnsValues('priority'))\n .withTooltipValueGetter((params: ITooltipParams) => this.translate.instant(`SALES_ORDERS.PRIORITY.${params.value}`).toUpperCase())\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('status')\n .withHeaderName('GENERAL.STATUS')\n .withCellRendererSelector(\n (params: ICellRendererParams): CellRendererSelectorResult =>\n params.node.level === 0\n ? {\n component: OrderLineStatusCellRendererComponent,\n params: {\n productionSchedule: this.productionSchedule\n } as OrderLineStatusCellRendererParams\n }\n : {\n component: ProductionScheduleItemInPathGroupStatusCellRendererComponent,\n params: {\n productionSchedule: this.productionSchedule\n }\n }\n )\n .withLockVisible()\n .withTextMultiFilter(this.getPossibleColumnsValues('status'))\n .withTooltipValueGetter((params: ITooltipParams) =>\n params.node.level === 0\n ? this.translate.instant(`ORDERBOOK.ORDER_LINE_STATUS.${params.value}`).toUpperCase()\n : this.translate.instant('ORDERBOOK.IN_PATH', {pathNumber: params?.data?.productionSchedulePath?.pathNumber})\n )\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('amountProduced')\n .withHeaderName('ORDERBOOK.PRODUCED_AMOUNT')\n .withValueGetter((params: ValueGetterParams) => {\n return `${params.data.amountProduced}`;\n })\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withNumericMultiFilter(this.getPossibleColumnsValues('amountProduced'))\n .withHide()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('amountPlanned')\n .withHeaderName('ORDERBOOK.PLANNED_AMOUNT')\n .withValueGetter((params: ValueGetterParams) => {\n return `${params.data.amountPlanned}`;\n })\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withNumericMultiFilter(this.getPossibleColumnsValues('amountPlanned'))\n .withHide()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('orderType')\n .withHeaderName('ORDERBOOK.ORDER_TYPE')\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withTextMultiFilter(this.getPossibleColumnsValues('orderType'))\n .withHide()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('designName')\n .withField('article.design.name', true)\n .withHeaderName('DESIGN_LIBRARY.DETAILS.DESIGN_NAME')\n .withComparator(StringUtils.stringComparator)\n .withTextMultiFilter(this.getPossibleColumnsValues('designName'))\n .withHide()\n .build()\n ];\n }\n\n private editQuantityCell(event: CellClickedEvent): void {\n if (this.detailApi) {\n this.detailApi?.stopEditing();\n }\n\n if (event.column.getColDef().editable) {\n this.detailApi.startEditingCell({\n rowIndex: event?.rowIndex,\n colKey: event?.column?.getColId()\n });\n }\n }\n\n private setQuantity(params: ValueSetterParams): boolean {\n if (this.productionScheduleItemMultiplier === 2 && params.newValue % 2 !== 0) {\n params.newValue--;\n }\n\n params.node.data.quantity = params.newValue;\n\n return true;\n }\n\n private getShape(shape: string): string {\n return FixedShape.getTranslationKeyForShape(shape, this.translate);\n }\n}\n","
\n \n
\n","\n\n
\n \n \n
\n \n \n \n\n \n \n {{\n 'PRODUCTION_ORDER.DESIGN_LIBRARY.VIEW_MODES.' + viewMode | bmsTranslate\n }}\n \n \n
\n\n \n
\n
\n","import {Component, ElementRef, EventEmitter, Inject, Input, OnChanges, OnInit, Output, Renderer2, ViewChild, ViewEncapsulation} from '@angular/core';\nimport {GridIdentifier} from '@application/grids/grid-identifier.enum';\nimport {DraggingService} from '@application/services/dragging/dragging.service';\nimport {OrderLinesTarget} from '@domain/order-lines-target.enum';\nimport {ProductionOrderCustomSettings} from '@domain/production-schedule/custom-settings/production-order-custom-settings';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionScheduleDrawingViewMode} from '@domain/production-schedule/production-schedule-drawing-view-mode.enum';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {Permission} from '@domain/profile/permission.enum';\nimport {Subscription} from '@domain/profile/subscription';\nimport {ColorSet} from '@domain/textile-data/color-set/color-set';\nimport {ColoredYarnSet} from '@domain/textile-data/colored-yarn-set/colored-yarn-set';\nimport {OverviewListColoredYarnSetWithStartDent} from '@domain/textile-data/creel/overview-list-colored-yarn-set-with-start-dent';\nimport {CarpetWeaveQuality} from '@domain/textile-data/machine-quality/carpet-weave-quality';\nimport {PathWidth} from '@domain/textile-data/machine-quality/path-width';\nimport {WeaveQuality} from '@domain/textile-data/machine-quality/weave-quality';\nimport {StatusBarTarget} from '@domain/textile-data/status-bar-target.constants';\nimport {AUTHENTICATION, Authentication} from '@infrastructure/http/authentication/authentication';\nimport {COLOR_SETS, ColorSets} from '@infrastructure/http/color-set/color-sets';\nimport {COLORED_YARN_SETS, ColoredYarnSets} from '@infrastructure/http/colored-yarn-set/colored-yarn-sets';\nimport {CREELS, Creels} from '@infrastructure/http/creel/creels';\nimport {MACHINE_QUALITIES, MachineQualities} from '@infrastructure/http/machine-quality/machine-qualities';\nimport {ORDERBOOK, Orderbook} from '@infrastructure/http/orderbook/orderbook';\nimport {HttpStatusBarService} from '@infrastructure/http/status-bar/http-status-bar.service';\nimport {OrderlineSettingsData} from '@presentation/components/dialog-button/dialog-data/order-lines-settings/order-lines-setting-data.interface';\nimport {OrderLinesCustomSettingsDialogComponent} from '@presentation/components/dialog-button/dialog-data/order-lines-settings/order-lines-settings.component';\nimport {OverviewListOrderLine} from '@presentation/pages/texfab/orderbook/overview/overview-list-order-line';\nimport {OverviewListCreel} from '@presentation/pages/textile-data/creel/overview/overview-list-creel';\nimport {BackendLimitsConstants} from '@shared/constants/backend-limits.constants';\nimport {\n AssertionUtils,\n BaseComponent,\n ColDefBuilderFactoryService,\n DialogBuilderFactoryService,\n GridModel,\n GridOptionsBuilderFactoryService,\n LoadingCellOverlayComponent,\n LocalStorageService,\n OverlayComponentParamsAction,\n StatusBar,\n StringUtils,\n TranslateService,\n Unit,\n UuidUtils\n} from '@vdw/angular-component-library';\nimport {AgGridAngular} from 'ag-grid-angular';\nimport {\n CellMouseOverEvent,\n ColDef,\n ColumnVisibleEvent,\n GetRowIdParams,\n GridApi,\n GridOptions,\n IDetailCellRendererParams,\n IRowNode,\n IServerSideDatasource,\n IServerSideGetRowsParams,\n RowHeightParams,\n RowNode,\n RowSelectedEvent,\n SortModelItem,\n ValueGetterParams\n} from 'ag-grid-community';\nimport {L10nIntlService} from 'angular-l10n';\nimport {forkJoin, Observable, of, Subject} from 'rxjs';\nimport {mergeMap, takeUntil} from 'rxjs/operators';\nimport {AddProductionScheduleNavigationState} from '../../../add-production-schedule-navigation-state.interface';\nimport {PRODUCTION_SCHEDULE_PLAN, ProductionSchedulePlan} from '../../../plan/production-schedule-plan';\nimport {OrderLinesHelper} from '../order-lines-helper';\nimport {ProductionScheduleItemInPathGroupWithIdentification} from '../order-lines-view/production-schedule-item-in-path-group-with-identification';\nimport {ProductionScheduleOrderLineWithQuantity} from '../order-lines-view/production-schedule-order-line-with-quantity';\nimport {OrderLinesGroupedDetailCellRendererData} from './detail-cell-renderer/order-lines-grouped-detail-cell-renderer-data.interface';\nimport {OrderLinesGroupedDetailCellRendererComponent} from './detail-cell-renderer/order-lines-grouped-detail-cell-renderer.component';\nimport {GroupedOrderLine} from './grouped-order-line';\nimport {GroupedOrderLinesSelectionService} from './grouped-orderlines-selection.service';\n\ntype RowData = ProductionScheduleOrderLineWithQuantity | ProductionScheduleItemInPathGroupWithIdentification;\n@Component({\n selector: 'app-drawing-library-order-lines-grouped-view',\n templateUrl: './order-lines-grouped-view.component.html',\n styleUrls: ['./order-lines-grouped-view.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class OrderLinesGroupedViewComponent extends BaseComponent implements OnInit, OnChanges {\n @Input() public displayTechnicalUnit = true;\n @Input() public productionSchedule: ProductionSchedule;\n @Input() public productionOrderCustomSettings: ProductionOrderCustomSettings;\n @Input() public commercialUnit: Unit;\n @Input() public isPreSelection = false;\n @Input() public selectedPath: ProductionSchedulePath;\n @Input() public selectedRestPathColoredYarnSet: OverviewListColoredYarnSetWithStartDent;\n @Input() public productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet;\n @Input() public pathWidths: PathWidth[] = [];\n @Input() public availableSpaceInBuggyInPicks: number;\n @Input() public buggyLengthMaxInPicks: number;\n @Input() public marginInDentsOfMissingDesigns: number;\n @Input() public preselectedOrderlineIds: number[] = [];\n @Input() public addProductionScheduleNavigationState: AddProductionScheduleNavigationState = null;\n @Input() public productionScheduleItemMultiplier: number;\n @Input() public selectedPathContentRowData: ProductionScheduleItemInPathGroup;\n @Output() public selectedOrderlineIdsChanged: EventEmitter = new EventEmitter();\n @Output() public selectedViewModeChanged = new EventEmitter();\n @Output() public selectedPathOutput: EventEmitter = new EventEmitter();\n @Output() public selectedRestPathColoredYarnSetOutput: EventEmitter = new EventEmitter();\n\n @ViewChild('container')\n public containerElement: ElementRef;\n\n @ViewChild('groupedGrid')\n public groupedGrid: AgGridAngular;\n\n public onlyShowSelected = false;\n public gridModel: GridModel;\n public statusBar: StatusBar;\n public groupedGridOptions: GridOptions;\n public detailGridOptions: GridOptions;\n public loadingForTheFirstTime = true;\n public groupedGridModel: GridModel;\n public detailGridModel: GridModel;\n public groupedOrderlines: GroupedOrderLine[];\n public readonly customSettingsComponent = OrderLinesCustomSettingsDialogComponent;\n public viewModes: ProductionScheduleDrawingViewMode[] = [\n ProductionScheduleDrawingViewMode.ORDER_LINES,\n ProductionScheduleDrawingViewMode.GROUPED_ORDER_LINES,\n ProductionScheduleDrawingViewMode.DESIGNS_LIST,\n ProductionScheduleDrawingViewMode.GROUPED_DESIGNS\n ];\n\n public selectedViewMode = ProductionScheduleDrawingViewMode.GROUPED_ORDER_LINES;\n\n private lastFocusedGroupedOrderLineNodeId: string;\n private alternativeQualityNames: string[] = [];\n private alternativeColorSetNames: string[] = [];\n private qualityNames: string[] = [];\n private fullQualities: CarpetWeaveQuality[] = [];\n private colorSetNames: string[] = [];\n private creelColorSetIds: number[] = [];\n private preFilterDataFetched: boolean = false;\n private showOnlyQueryCompatibleOrderlines = true;\n private showPreselectedItems = false;\n private readyToFetchRows: boolean = false;\n\n private readonly syncWithProductionScheduleSubject = new Subject();\n private readonly WIDTH_HEADER_NAME = 'GENERAL.DIMENSIONS.WIDTH';\n private readonly booleanFalseTranslation = 'GENERAL.CONDITION.NO';\n private readonly booleanTrueTranslation = 'GENERAL.CONDITION.YES';\n private readonly MAX_DETAIL_ROW_HEIGHT = 350;\n private readonly DETAIL_ROW_HEADER_HEIGHT = 36;\n private readonly DETAIL_ROW_VERTICAL_PADDING = 32;\n private readonly DETAIL_ROW_SCROLL_BAR = 18;\n private readonly DETAIL_ROW_HEIGHT = 24;\n private readonly SLICE_SIZE = 0;\n private readonly SLICE_SIZE_DETAILS = 30;\n\n private readonly noOverlayAction: OverlayComponentParamsAction[] = [\n {\n key: 'addEventRule',\n titleKey: this.translate.instant('PRODUCTION_ORDER.WEAVE_PLAN.PRESELECTION.PRESELECTION'),\n isPrimary: true,\n disabled: false\n }\n ];\n\n public constructor(\n @Inject(AUTHENTICATION) private authentication: Authentication,\n @Inject(ORDERBOOK) private readonly orderbook: Orderbook,\n @Inject(PRODUCTION_SCHEDULE_PLAN) private readonly productionSchedulePlan: ProductionSchedulePlan,\n @Inject(MACHINE_QUALITIES) private readonly qualities: MachineQualities,\n @Inject(COLORED_YARN_SETS) private readonly coloredYarnSets: ColoredYarnSets,\n @Inject(CREELS) private readonly creelsService: Creels,\n @Inject(COLOR_SETS) private readonly colorSets: ColorSets,\n private readonly gridOptionsBuilderFactoryService: GridOptionsBuilderFactoryService,\n private readonly colDefBuilderFactoryService: ColDefBuilderFactoryService,\n private readonly translate: TranslateService,\n private readonly statusBarService: HttpStatusBarService,\n private readonly orderLinesHelper: OrderLinesHelper,\n private readonly groupedOrderLinesSelectionService: GroupedOrderLinesSelectionService,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n private readonly l10nIntlService: L10nIntlService,\n private readonly draggingService: DraggingService,\n private readonly renderer: Renderer2,\n private readonly localStorage: LocalStorageService\n ) {\n super();\n this.orderLinesHelper.displayTechnicalUnit = this.displayTechnicalUnit;\n this.orderLinesHelper.commercialUnit = this.commercialUnit;\n }\n\n public ngOnInit(): void {\n const currentSubscription = this.authentication.getCurrentSubscription();\n\n this.filterViewModes(currentSubscription);\n this.initialiseGroupedGridOptions();\n this.groupedOrderLinesSelectionService.getGroupedOrderLineSelected().subscribe((selectedOrderLineIds: number[]) => (this.preselectedOrderlineIds = selectedOrderLineIds));\n this.groupedOrderLinesSelectionService\n .getdetailRowSelected()\n .subscribe((detailComponent: {parentNode: IRowNode; parentSelectionState: boolean; orderlinesSelected: OverviewListOrderLine[]}) =>\n this.onDetailRowsSelectionChanged(detailComponent.parentNode as RowNode, detailComponent.parentSelectionState, detailComponent.orderlinesSelected)\n );\n\n if (!this.isPreSelection) {\n this.viewModes.push(ProductionScheduleDrawingViewMode.GROUPED_DESIGN_THUMBNAILS);\n }\n\n this.groupedOrderLinesSelectionService.selectedPath.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe((selectedPath: ProductionSchedulePath) => {\n this.selectedPathOutput.emit(selectedPath);\n });\n\n if (!AssertionUtils.isEmpty(this.preselectedOrderlineIds) && !this.isPreSelection) {\n this.showPreselectedItems = true;\n }\n\n this.groupedOrderLinesSelectionService.selectedRestPathColoredYarnSet.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe((coloredYarnSet: OverviewListColoredYarnSetWithStartDent) => {\n this.selectedRestPathColoredYarnSetOutput.emit(coloredYarnSet);\n });\n\n this.selectedViewMode = this.localStorage.get('drawingLibraryViewMode') || ProductionScheduleDrawingViewMode.GROUPED_ORDER_LINES;\n\n if (!this.viewModes.includes(this.selectedViewMode)) {\n this.selectedViewMode = ProductionScheduleDrawingViewMode.GROUPED_ORDER_LINES;\n }\n this.selectedViewModeChanged.emit(this.selectedViewMode);\n }\n\n public ngOnChanges(): void {\n if (!this.isPreSelection) {\n this.setInitializationFilters();\n }\n\n this.groupedOrderLinesSelectionService.updateDetailCellRendererParams(this.getDetailCellRendererParams());\n\n if (!AssertionUtils.isEmpty(this.preselectedOrderlineIds) && !this.isPreSelection) {\n this.showPreselectedItems = true;\n this.groupedGrid?.api.redrawRows();\n }\n }\n\n public getSelectedRows(): number {\n return this.preselectedOrderlineIds ? this.preselectedOrderlineIds.length : 0;\n }\n\n public toggleSelectedRows(change: boolean): void {\n if (change) {\n this.onlyShowSelected = true;\n this.orderLinesHelper.savedFilterModel = null;\n this.groupedGrid?.api?.setFilterModel(null);\n\n if (!AssertionUtils.isEmpty(this.preselectedOrderlineIds)) {\n const selectedRowIds = this.preselectedOrderlineIds.map((orderlineId: number) => `${orderlineId}`);\n\n const filterModel = {\n id: {\n filterModels: [null, {values: selectedRowIds, filterType: 'set'}],\n filterType: 'multi'\n }\n };\n\n this.orderLinesHelper.savedFilterModel = filterModel;\n this.groupedGrid?.api?.setFilterModel(filterModel);\n }\n } else {\n this.onlyShowSelected = false;\n this.setInitializationFilters();\n }\n }\n\n public updateGrid(gridModel: GridModel): void {\n this.groupedGrid.api.setFilterModel(gridModel.filterModel);\n }\n\n public onCustomSettingsChanged(settings: {showPreselectedItems: boolean; showOnlyQueryCompatibleOrderlines: boolean}): void {\n this.showPreselectedItems = settings.showPreselectedItems ?? this.showPreselectedItems;\n this.showOnlyQueryCompatibleOrderlines = settings.showOnlyQueryCompatibleOrderlines ?? this.showOnlyQueryCompatibleOrderlines;\n this.setInitializationFilters();\n }\n\n public onSelectedViewModeChanged(selectedViewMode: ProductionScheduleDrawingViewMode): void {\n this.localStorage.set('drawingLibraryViewMode', selectedViewMode);\n\n this.selectedViewModeChanged.emit(selectedViewMode);\n }\n\n public getCustomSettingsDialogData(): any {\n return {\n showPreselectedItems: this.showPreselectedItems,\n showOnlyQueryCompatibleOrderlines: this.showOnlyQueryCompatibleOrderlines,\n viewMode: this.selectedViewMode\n } as OrderlineSettingsData;\n }\n\n private filterViewModes(currentSubscription: Subscription): void {\n if (!currentSubscription.hasPermission(Permission.TEXFAB_ORDERBOOK)) {\n this.viewModes = this.viewModes.filter(\n (viewMode: ProductionScheduleDrawingViewMode) => viewMode !== ProductionScheduleDrawingViewMode.ORDER_LINES && viewMode !== ProductionScheduleDrawingViewMode.GROUPED_ORDER_LINES\n );\n }\n }\n\n public getTooltip(key: string): string {\n const translation = this.translate.instant(key);\n return translation.length > 20 ? translation : '';\n }\n\n private getDetailCellRendererParams(params?: IDetailCellRendererParams): OrderLinesGroupedDetailCellRendererData {\n return {\n ...(params || ({} as IDetailCellRendererParams)),\n parentState: params?.node?.data?.parentState,\n initialIds: params ? params.node.data.childsSelected?.map((orderLine: OverviewListOrderLine) => orderLine.id) || [] : undefined,\n extraData: {\n displayTechnicalUnit: this.displayTechnicalUnit,\n commercialUnit: this.commercialUnit,\n productionSchedule: this.productionSchedule,\n isPreSelection: this.isPreSelection,\n productionOrderCustomSettings: this.productionOrderCustomSettings,\n selectedPath: this.selectedPath,\n selectedRestPathColoredYarnSet: this.selectedRestPathColoredYarnSet,\n productionSchedulePathsOfColoredYarnSet: this.productionSchedulePathsOfColoredYarnSet,\n availableSpaceInBuggyInPicks: this.availableSpaceInBuggyInPicks,\n buggyLengthMaxInPicks: this.buggyLengthMaxInPicks,\n pathWidths: this.pathWidths,\n fullQualities: this.fullQualities,\n marginInDentsOfMissingDesigns: this.marginInDentsOfMissingDesigns,\n productionScheduleItemMultiplier: this.productionScheduleItemMultiplier\n }\n };\n }\n\n private onCellMouseOver(event: CellMouseOverEvent): void {\n this.lastFocusedGroupedOrderLineNodeId = event.node.id;\n }\n\n private onDetailRowsSelectionChanged(node: RowNode, parentSelectionState: boolean, orderlinesSelected: OverviewListOrderLine[]): void {\n const deselectedIds = node.data.orderlineIds.filter((id: number) => !orderlinesSelected.some((des: OverviewListOrderLine) => des.id === id));\n\n let currentSelectedOrderLineIds = this.preselectedOrderlineIds?.filter((orderLineId: number) => !deselectedIds.map(Number).includes(orderLineId)) ?? [];\n\n const orderLinesSet = new Set([\n ...currentSelectedOrderLineIds,\n ...orderlinesSelected\n .filter((newOrderLine: OverviewListOrderLine) => currentSelectedOrderLineIds.findIndex((orderlineId: number) => orderlineId === newOrderLine.id) === -1)\n .map((newOrderLine: OverviewListOrderLine) => newOrderLine.id)\n ]);\n currentSelectedOrderLineIds = [...orderLinesSet];\n\n this.groupedOrderLinesSelectionService.setGroupedOrderLinesSelected(currentSelectedOrderLineIds);\n\n node.data.childsSelected = orderlinesSelected;\n node.data.parentState = parentSelectionState;\n node.data.updatingFromDetails = true;\n node.selectThisNode(parentSelectionState);\n\n setTimeout(() => (node.data.updatingFromDetails = false), 100);\n\n this.selectedOrderlineIdsChanged.emit(this.preselectedOrderlineIds);\n }\n\n private parentNodeSelected(event: RowSelectedEvent): void {\n if (event.node.data.updatingFromDetails) {\n return;\n }\n\n if (this.lastFocusedGroupedOrderLineNodeId !== event.node.id) {\n const selectedOrderLines = this.preselectedOrderlineIds.filter((orderlineId: number) => event.node.data.orderlineIds.map(Number).includes(orderlineId));\n const selectionState = this.groupedOrderLinesSelectionService.getParentSelectionState(event.node.data.orderlineIds, selectedOrderLines);\n\n (event.node as RowNode).selectThisNode(selectionState);\n return;\n }\n\n const detailGridId = 'detail_' + event.node.id;\n const detailGrid = event.api.getDetailGridInfo(detailGridId);\n\n if (detailGrid) {\n detailGrid.api.forEachNode((detailNode: RowNode) => detailNode.setSelected(event.node.isSelected()));\n return;\n }\n\n event.node.data.parentState = event.node.isSelected();\n\n this.getAndSelectOrderLines(event);\n }\n\n private getAllPreFilterData(): void {\n let qualityObservable: Observable = of(null);\n let coloredYarnSetObservables: Observable[] = [];\n\n if (!AssertionUtils.isNullOrUndefined(this.addProductionScheduleNavigationState?.machineQualityId) && !AssertionUtils.isNullOrUndefined(this.addProductionScheduleNavigationState?.creelId)) {\n qualityObservable = this.getQualityById(this.addProductionScheduleNavigationState.machineQualityId);\n this.creelsService.getById(this.addProductionScheduleNavigationState.creelId).subscribe((overviewListCreel: OverviewListCreel) => {\n coloredYarnSetObservables = overviewListCreel.coloredYarnSetsWithStartDent.map((coloredYarnSetsWithStartDent: OverviewListColoredYarnSetWithStartDent) => {\n return this.getColoredYarnSetById(coloredYarnSetsWithStartDent.coloredYarnSet.id);\n });\n\n this.processObservables(qualityObservable, coloredYarnSetObservables);\n });\n } else if (!AssertionUtils.isNullOrUndefined(this.productionSchedule?.machineQuality)) {\n qualityObservable = this.getQualityById(this.productionSchedule.machineQuality.id);\n\n coloredYarnSetObservables = this.productionSchedule.coloredYarnSets.map((coloredYarnSet: OverviewListColoredYarnSetWithStartDent) => {\n return this.getColoredYarnSetById(coloredYarnSet.coloredYarnSet.id);\n });\n\n this.processObservables(qualityObservable, coloredYarnSetObservables);\n } else {\n this.preFilterDataFetched = true;\n this.setInitializationFilters();\n }\n }\n\n private processObservables(qualityObservable: Observable, coloredYarnSetObservables: Observable[]): void {\n forkJoin([qualityObservable, ...coloredYarnSetObservables])\n .pipe(\n mergeMap(([quality, ...coloredYarnSets]: [CarpetWeaveQuality, ColoredYarnSet]) => {\n this.qualityNames.push(quality?.technicalName);\n this.fullQualities.push(quality);\n this.alternativeQualityNames.push(quality?.technicalName);\n\n coloredYarnSets.forEach((coloredYarnSet: ColoredYarnSet) => {\n this.colorSetNames.push(coloredYarnSet?.colorSet?.name);\n this.alternativeColorSetNames.push(coloredYarnSet?.colorSet?.name);\n this.creelColorSetIds.push(coloredYarnSet?.colorSet?.id);\n });\n\n let alternativeQualityObservables = [];\n let alternativeColorSetObservables = [];\n\n if (quality.alternativeMachineQualityIds?.length > 0) {\n alternativeQualityObservables = quality?.alternativeMachineQualityIds?.map((alternativeQualityId: number) => {\n return this.getQualityById(alternativeQualityId);\n });\n }\n\n coloredYarnSets?.map((coloredYarnSet: ColoredYarnSet) => {\n if (coloredYarnSet.colorSet?.alternativeColorSetIds?.length > 0) {\n alternativeColorSetObservables = coloredYarnSet.colorSet.alternativeColorSetIds.map((alternativeColorSetId: number) => {\n return this.getColorSetById(alternativeColorSetId);\n });\n }\n });\n\n if (AssertionUtils.isEmpty(alternativeQualityObservables) && AssertionUtils.isEmpty(alternativeColorSetObservables)) {\n return of([]);\n }\n\n return forkJoin(alternativeQualityObservables.concat(alternativeColorSetObservables) as any);\n })\n )\n .subscribe((alternatives: (CarpetWeaveQuality | ColorSet)[]) => {\n alternatives.forEach((alternative: CarpetWeaveQuality | ColorSet) => {\n if (alternative instanceof CarpetWeaveQuality) {\n this.qualityNames.push(alternative.technicalName);\n this.fullQualities.push(alternative);\n } else if (alternative instanceof ColorSet) {\n this.alternativeColorSetNames.push(alternative.name);\n }\n });\n\n this.preFilterDataFetched = true;\n this.setInitializationFilters();\n });\n }\n\n private getColorSetById(id: number): Observable {\n return this.colorSets.getById(id);\n }\n\n private getQualityById(id: number): Observable {\n return this.qualities.getById(id);\n }\n\n private getColoredYarnSetById(id: number): Observable {\n return this.coloredYarnSets.getById(id);\n }\n\n private getRowHeightForDetailRow(params: RowHeightParams): number {\n this.groupedGridOptions.detailRowAutoHeight = false;\n const isDetailRow = params.node.detail;\n\n if (!isDetailRow) {\n return undefined;\n }\n\n if (isDetailRow && params?.data?.orderlineIds?.length > 8) {\n return this.MAX_DETAIL_ROW_HEIGHT;\n } else {\n return this.DETAIL_ROW_HEADER_HEIGHT + 2 * this.DETAIL_ROW_VERTICAL_PADDING + this.DETAIL_ROW_SCROLL_BAR + params.data.orderlineIds.length * this.DETAIL_ROW_HEIGHT;\n }\n }\n\n private setInitializationFilters(): void {\n if (!this.preFilterDataFetched) {\n return;\n }\n\n let filterModel: any;\n\n filterModel = this.orderLinesHelper.getInitializationFilterModel(\n this.showPreselectedItems,\n this.productionSchedule,\n this.selectedPath,\n this.selectedRestPathColoredYarnSet,\n this.preselectedOrderlineIds,\n this.addProductionScheduleNavigationState,\n this.productionOrderCustomSettings,\n this.alternativeQualityNames,\n this.qualityNames,\n this.alternativeColorSetNames,\n this.colorSetNames,\n this.showOnlyQueryCompatibleOrderlines,\n this.isPreSelection,\n this.selectedPathContentRowData\n );\n\n this.readyToFetchRows = true;\n this.groupedGrid?.api?.setFilterModel(filterModel);\n\n //because we fetched no rows yet, we need to explictly trigger a new getrows on aggrid\n this.groupedGrid?.api?.setGridOption('serverSideDatasource', this.getGroupedServerSideDataSource());\n }\n\n private getGroupedServerSideDataSource(): IServerSideDatasource {\n if (!this.readyToFetchRows) {\n return {\n getRows: (params: IServerSideGetRowsParams): void => {\n params.success({\n rowData: [],\n rowCount: 0\n });\n }\n };\n } else {\n return {\n getRows: (params: IServerSideGetRowsParams): void => {\n const sortModel: SortModelItem[] = params.request.sortModel;\n const startRow: number = params.request.startRow;\n const endRow: number = params.request.endRow;\n const filterModel = params.request.filterModel;\n this.orderLinesHelper.savedFilterModel = filterModel;\n\n this.groupedGridModel = new GridModel(startRow, endRow, sortModel, filterModel);\n\n const groupedBy = this.getGroupedByColumns(params);\n\n this.orderbook\n .getGroupedOrderlines(this.groupedGridModel, groupedBy)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe({\n next: (groupedOrderLines: GroupedOrderLine[]) => {\n this.groupedOrderlines = groupedOrderLines;\n\n if (startRow === 0) {\n this.getStatusBarData(this.groupedGridModel);\n\n if (groupedOrderLines.length === 0) {\n params.api.showNoRowsOverlay();\n } else {\n params.api.hideOverlay();\n }\n }\n\n setTimeout(() => {\n params.success({\n rowData: groupedOrderLines,\n rowCount: groupedOrderLines.length\n });\n\n this.setSelectedOrderlines(this.groupedGrid.api);\n });\n },\n error: (error: any) => this.orderLinesHelper.onServerSideDataSourceError(params, error)\n });\n }\n };\n }\n }\n\n private getGroupedByColumns(params: IServerSideGetRowsParams): string[] {\n const groupedBy = [];\n\n if (params.api.getColumn('machineQualityName').isVisible()) {\n groupedBy.push('QUALITY');\n }\n if (params.api.getColumn('colorSetName').isVisible()) {\n groupedBy.push('COLOR_SET');\n }\n if (params.api.getColumn('commercialWidthInCM').isVisible()) {\n groupedBy.push('COMMERCIAL_WIDTH_IN_CM');\n }\n if (params.api.getColumn('technicalWidthInDents').isVisible()) {\n groupedBy.push('TECHNICAL_WIDTH_IN_DENTS');\n }\n\n if (AssertionUtils.isEmpty(groupedBy)) {\n groupedBy.push('QUALITY');\n groupedBy.push('COLOR_SET');\n }\n\n return groupedBy;\n }\n\n private onColumnVisibleChange(event: any): void {\n this.groupedGrid.api.refreshServerSide();\n }\n\n private setSelectedOrderlines(gridApi: GridApi): void {\n if (this.preselectedOrderlineIds?.length > 0) {\n gridApi?.forEachNode((node: RowNode) => {\n if (!AssertionUtils.isNullOrUndefined(node.data)) {\n const selectedOrderLines = this.preselectedOrderlineIds.filter((orderlineId: number) => node.data.orderlineIds.map(Number).includes(orderlineId));\n const selectionState = this.groupedOrderLinesSelectionService.getParentSelectionState(node.data.orderlineIds, selectedOrderLines);\n\n node.data.childsSelected = selectedOrderLines;\n node.data.parentState = selectionState;\n node.selectThisNode(selectionState);\n }\n });\n }\n }\n\n private getAndSelectOrderLines(event: RowSelectedEvent): void {\n const orderlineIds = event.node.data.orderlineIds;\n const sortModel: SortModelItem[] = [];\n let filterModel = {};\n\n if (!AssertionUtils.isNullOrUndefined(orderlineIds) && !AssertionUtils.isEmpty(orderlineIds)) {\n filterModel = {\n id: {\n filterModels: [null, {values: orderlineIds, filterType: 'set'}],\n filterType: 'multi'\n }\n };\n }\n\n this.detailGridModel = new GridModel(0, this.SLICE_SIZE_DETAILS, sortModel, filterModel);\n\n this.orderbook\n .getSlice(OrderLinesTarget.PRODUCTION_SCHEDULE, this.detailGridModel, this.productionSchedule?.id?.toString())\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((orderLines: OverviewListOrderLine[]) => {\n let selectedOrderlines: number[] = [];\n\n if (event.node.isSelected()) {\n event.node.data.childsSelected = orderLines;\n } else if (!AssertionUtils.isNullOrUndefined(event.node.isSelected()) && !event.node.isSelected()) {\n event.node.data.childsSelected = [];\n }\n\n if (event.node.isSelected()) {\n const orderLinesSet = new Set([\n ...this.preselectedOrderlineIds,\n ...orderLines\n .filter((newOrderLine: OverviewListOrderLine) => this.preselectedOrderlineIds.findIndex((orderlineId: number) => orderlineId === newOrderLine.id) === -1)\n .map((newOrderLine: OverviewListOrderLine) => newOrderLine.id)\n ]);\n selectedOrderlines = [...orderLinesSet];\n } else {\n selectedOrderlines = this.preselectedOrderlineIds?.filter((orderlineId: number) => !event.data.orderlineIds.includes(orderlineId));\n }\n\n this.groupedOrderLinesSelectionService.setGroupedOrderLinesSelected(selectedOrderlines);\n this.selectedOrderlineIdsChanged.emit(this.preselectedOrderlineIds);\n });\n }\n\n private getStatusBarData(gridModel: GridModel): void {\n gridModel.startRow = 0;\n gridModel.endRow = BackendLimitsConstants.INT32_MAX;\n this.statusBarService\n .getStatusBarData(StatusBarTarget.ORDER_LINES, gridModel)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((statusBar: StatusBar) => {\n statusBar.totalGroupedRows = this.groupedOrderlines.length;\n this.statusBar = statusBar;\n });\n }\n\n private getPossibleColumnsValues(columnIdentifier: string): Observable {\n return this.orderbook.getPossibleValues(columnIdentifier).pipe(takeUntil(this.unSubscribeOnViewDestroy));\n }\n\n private getDropdownCellValue(params: ValueGetterParams): string {\n return `${params?.data?.quality?.name} (${params?.data?.orderlineIds?.length})`;\n }\n\n private initialiseGroupedGridOptions(): void {\n const orderLinesGroupedDetailCellRendererComponent = new OrderLinesGroupedDetailCellRendererComponent(\n this.authentication,\n this.orderbook,\n this.productionSchedulePlan,\n this.colDefBuilderFactoryService,\n this.orderLinesHelper,\n this.gridOptionsBuilderFactoryService,\n this.groupedOrderLinesSelectionService,\n this.translate,\n this.dialogBuilderFactoryService,\n this.l10nIntlService,\n this.draggingService,\n this.renderer\n );\n\n const defaultGroupedGridOptions = this.gridOptionsBuilderFactoryService\n .getBuilder(this.getGroupColumnDefinitions(), GridIdentifier.GROUPED_ORDER_ITEMS)\n .withHeaderHeight(32)\n .withFloatingFiltersHeight(32)\n .withServerSideDataSource(this.SLICE_SIZE, this.getGroupedServerSideDataSource())\n .withMasterDetail(OrderLinesGroupedDetailCellRendererComponent, true, (params: any) => this.getDetailCellRendererParams(params))\n .withLoadingCellRenderer('customLoadingCellRenderer')\n .withGetRowId((params: GetRowIdParams) => params.data.quality.id)\n .withComponents({\n customLoadingCellRenderer: LoadingCellOverlayComponent,\n OrderLinesGroupedDetailCellRendererComponent: orderLinesGroupedDetailCellRendererComponent\n })\n .withNoRowsOverlay(this.isPreSelection ? this.orderLinesHelper.getNoRowsOverlayForPreselection(this.groupedGrid) : this.orderLinesHelper.getNoRowsOverlayForBuilder(this.noOverlayAction))\n .withRowSelection(this.isPreSelection, false)\n .withOnFirstDataRendered(() => {\n this.syncWithProductionScheduleSubject.next();\n })\n .withStopEditingWhenCellsLoseFocus()\n .withOnGridReady(() => this.getAllPreFilterData())\n .withOnCellMouseOver((event: CellMouseOverEvent) => this.onCellMouseOver(event))\n .withGetRowHeight((params: RowHeightParams) => this.getRowHeightForDetailRow(params))\n .withGetRowId((params: GetRowIdParams) => UuidUtils.generateV4Uuid())\n .withOnColumnVisible((event: ColumnVisibleEvent) => this.onColumnVisibleChange(event))\n .withCompactView();\n if (this.isPreSelection) {\n this.groupedGridOptions = defaultGroupedGridOptions.withOnRowSelected((event: RowSelectedEvent) => this.parentNodeSelected(event)).build();\n } else {\n this.groupedGridOptions = defaultGroupedGridOptions.build();\n }\n }\n\n private getGroupColumnDefinitions(): ColDef[] {\n return [\n this.colDefBuilderFactoryService.getBuilder().withColIdAndField('id').withNumericMultiFilter(this.getPossibleColumnsValues('id')).withHide().withHiddenInToolPanel().build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('machineQualityName')\n .withField('quality.name')\n .withCellRenderer('agGroupCellRenderer')\n .withHeaderName('TEXTILE_DATA.MACHINE_QUALITY.MACHINE_QUALITY')\n .withValueGetter((params: ValueGetterParams) => this.getDropdownCellValue(params))\n .withTooltipField('article.machineQuality.name')\n .withComparator(StringUtils.stringComparator)\n .withTextMultiFilter(this.getPossibleColumnsValues('machineQualityName'))\n .withHeaderCheckboxSelection(false)\n .withSuppressMovable()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('colorSetName')\n .withField('colorSet.name', true)\n .withHeaderName('TEXTILE_DATA.COLOR_SET.COLOR_SET')\n .withComparator(StringUtils.stringComparator)\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withTextMultiFilter(this.getPossibleColumnsValues('colorSetName'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('commercialWidthInCM')\n .withField('commercialWidthInCm', true)\n .withHeaderName(this.WIDTH_HEADER_NAME, 1, false, Unit.CENTIMETER)\n .withRightAlignment()\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withNumericMultiFilter(this.getPossibleColumnsValues('commercialWidthInCM'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('technicalWidthInDents', true)\n .withHeaderName(this.WIDTH_HEADER_NAME, 1, false, Unit.DENTS)\n .withRightAlignment()\n .withNumericMultiFilter(this.getPossibleColumnsValues('technicalWidthInDents'))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('lengthInMM')\n .withHeaderName('ORDERBOOK.TO_PLAN_LENGTH', 1, false, Unit.METER)\n .withRightAlignment()\n .withoutFilter()\n .withSortable()\n .withMMConversion(Unit.METER, false, 2)\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('lengthInPicks', true)\n .withHeaderName('ORDERBOOK.TO_PLAN_LENGTH', 1, false, Unit.PICKS)\n .withRightAlignment()\n .withoutFilter()\n .withSortable()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('surfaceInMM2')\n .withHeaderName('ORDERBOOK.TO_PLAN_SURFACE', 1, false, Unit.SQUARE_METER)\n .withRightAlignment()\n .withoutFilter()\n .withSortable()\n .withSquareMMConversion(Unit.SQUARE_METER, 2)\n .build(),\n this.colDefBuilderFactoryService.getBuilder().withColIdAndField('numberOfPieces', true).withHeaderName('ORDERBOOK.NUMBER_OF_PIECES').withRightAlignment().withoutFilter().withSortable().build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('missingDesign')\n .withHeaderName('ORDERBOOK.MISSING_DESIGN')\n .withValueGetter((params: ValueGetterParams) => (params.data.missingDesign ? this.translate.instant(this.booleanTrueTranslation) : this.translate.instant(this.booleanFalseTranslation)), true)\n .withBooleanFilter(this.translate.instant(this.booleanFalseTranslation), this.translate.instant(this.booleanTrueTranslation))\n .withSortable(false)\n .withoutFilter()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('amountLeft')\n .withValueGetter((params: ValueGetterParams): number => this.orderLinesHelper.getAmountLeft(params.data, this.productionSchedule))\n .withHeaderName('ORDERBOOK.TO_PLAN_AMOUNT')\n .withSortable(false)\n .withRightAlignment()\n .withCellRendererSelector(this.orderLinesHelper.cellRendererSelectorForOrderLinesOnly())\n .withNumericMultiFilter(this.getPossibleColumnsValues('amountLeft'))\n .withHiddenInToolPanel()\n .withHide()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('compatibleColorSetId')\n .withNumericMultiFilter(this.getPossibleColumnsValues('colorSetId'))\n .withHide()\n .withHiddenInToolPanel()\n .withField('colorSet.id')\n .build()\n ];\n }\n}\n","import {Component, Inject, OnDestroy, Renderer2} from '@angular/core';\nimport {GridIdentifier} from '@application/grids/grid-identifier.enum';\nimport {DraggingService} from '@application/services/dragging/dragging.service';\nimport {Drawing} from '@domain/production-schedule/drawing';\nimport {DrawingConfiguration} from '@domain/production-schedule/drawing-configuration';\nimport {DrawingConfigurationWithColorAndYarnSet} from '@domain/production-schedule/drawing-configuration-with-color-and-yarn-set';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {TargetForListOfDrawingsEnum} from '@domain/target-for-list-of-drawings.enum';\nimport {OverviewListColoredYarnSetWithStartDent} from '@domain/textile-data/creel/overview-list-colored-yarn-set-with-start-dent';\nimport {DRAWINGS, Drawings} from '@infrastructure/http/drawing/drawings';\nimport {ListDrawingConfiguration} from '@presentation/components/drawing-list/list-drawing-configuration';\nimport {DesignPreviewComponent} from '@presentation/components/grid/design-preview/design-preview.component';\nimport {DrawingLibraryHelper} from '@presentation/pages/texedit/drawing-library/drawing-library-new-listview/drawing-library-helper';\nimport {GridCreelPreviewOfCreelPositionComponent} from '@presentation/pages/textile-data/creel/add/grid-creel-preview-of-creel-position/grid-creel-preview-of-creel-position.component';\nimport {PreviewType} from '@presentation/pages/textile-data/creel/add/preview-type';\nimport {\n AssertionUtils,\n BaseComponent,\n ColDefBuilderFactoryService,\n convertPixelsToHeightInMeter,\n convertToCommercialUnitCentimeter,\n DialogBuilderFactoryService,\n DialogType,\n EmptyCellRendererComponent,\n GridModel,\n GridOptionsBuilderFactoryService,\n NoDataOverlayComponentParams,\n NumberCellEditorComponent,\n NumberCellEditorParams,\n ProgressCellRendererComponent,\n StringUtils,\n TimeUtils,\n TranslateService,\n Unit,\n UnitValue\n} from '@vdw/angular-component-library';\nimport {ICellRendererAngularComp} from 'ag-grid-angular';\nimport {\n AdvancedFilterModel,\n CellClickedEvent,\n CellEditingStoppedEvent,\n CellRendererSelectorResult,\n CellValueChangedEvent,\n ColDef,\n Column,\n ColumnVisibleEvent,\n EditableCallbackParams,\n FilterModel,\n FirstDataRenderedEvent,\n GridApi,\n GridOptions,\n ICellRendererParams,\n IRowNode,\n IServerSideDatasource,\n IServerSideGetRowsParams,\n RowDoubleClickedEvent,\n RowNode,\n RowSelectedEvent,\n SortModelItem,\n ValueFormatterParams,\n ValueGetterParams,\n ValueSetterParams\n} from 'ag-grid-community';\nimport {map, Observable, ReplaySubject, takeUntil} from 'rxjs';\nimport {PRODUCTION_SCHEDULE_PLAN, ProductionSchedulePlan} from '../../../../plan/production-schedule-plan';\nimport {GroupedDrawing} from '../grouped-drawing';\nimport {GroupedDrawingsSelectionService} from '../grouped-drawings-selection.service';\n\n@Component({\n templateUrl: './drawings-grouped-detail-cell-renderer.component.html',\n styleUrls: ['./drawings-grouped-detail-cell-renderer.component.scss']\n})\nexport class DrawingsGroupedDetailCellRendererComponent extends BaseComponent implements ICellRendererAngularComp, OnDestroy {\n public detailOptions: GridOptions;\n public loadingForTheFirstTime = true;\n\n private designPreviewFiltered: boolean;\n private addingItemToPath = false;\n private initialIds: string[];\n private parentState: boolean;\n private isPreSelection: boolean;\n private masterGridApi: GridApi;\n private masterNode: IRowNode;\n private detailApi: GridApi;\n private detailGridModel: GridModel;\n private productionScheduleItemMultiplier: number;\n private masterData: GroupedDrawing;\n private data: ListDrawingConfiguration[];\n private selectedPath: ProductionSchedulePath;\n private productionSchedule: ProductionSchedule;\n private productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet;\n private selectedRestPathColoredYarnSet: OverviewListColoredYarnSetWithStartDent;\n private hasQuantitySuggestionPermission: boolean = false;\n private availableSpaceInBuggyInPicks: number = 5000;\n private buggyLengthMaxInPicks: number = 5000;\n private rollLengthColumnId = 'rollLength';\n\n private mainColorsSubject = new ReplaySubject(1);\n private borderColorsSubject = new ReplaySubject(1);\n private designNamesSubject = new ReplaySubject(1);\n private heightsInPxSubject = new ReplaySubject(1);\n private heightsInCMSubject = new ReplaySubject(1);\n\n private readonly SLICE_SIZE = 30;\n private readonly DETAIL_ID_PREFIX = 'detail_';\n private readonly ROW_HEIGHT_WITH_PREVIEW = 96;\n private readonly ROW_HEIGHT_WITHOUT_PREVIEW = 24;\n\n public constructor(\n @Inject(DRAWINGS) private drawings: Drawings,\n @Inject(PRODUCTION_SCHEDULE_PLAN) private readonly productionSchedulePlan: ProductionSchedulePlan,\n private readonly gridOptionsBuilderFactoryService: GridOptionsBuilderFactoryService,\n private readonly colDefBuilderFactoryService: ColDefBuilderFactoryService,\n private readonly groupedDrawingsSelectionService: GroupedDrawingsSelectionService,\n private readonly translate: TranslateService,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n private readonly draggingService: DraggingService,\n private readonly renderer: Renderer2,\n private readonly drawingLibraryHelper: DrawingLibraryHelper\n ) {\n super();\n }\n\n public agInit(params: any): void {\n if (!AssertionUtils.isNullOrUndefined(params?.initialIds)) {\n this.initialIds = params.initialIds;\n }\n\n this.masterData = params.data;\n this.masterGridApi = params.api;\n this.masterNode = params.node.parent;\n this.parentState = params.parentState;\n\n this.productionScheduleItemMultiplier = params.extraData.productionScheduleItemMultiplier;\n this.isPreSelection = params.extraData.isPreSelection;\n this.selectedPath = params.extraData.selectedPath;\n this.productionSchedule = params.extraData.productionSchedule;\n this.productionSchedulePathsOfColoredYarnSet = params.extraData.productionSchedulePathsOfColoredYarnSet;\n this.hasQuantitySuggestionPermission = params.extraData.hasQuantitySuggestionPermission;\n this.availableSpaceInBuggyInPicks = params.extraData.availableSpaceInBuggyInPicks;\n this.buggyLengthMaxInPicks = params.extraData.buggyLengthMaxInPicks;\n\n this.groupedDrawingsSelectionService.cellRendererParams.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe((updatedParams: any) => {\n this.setDataParams(updatedParams);\n\n if (!this.detailApi?.isDestroyed()) {\n setTimeout(() => this.detailApi?.refreshCells());\n }\n });\n\n this.setupDetailGrid(params.data.drawingIds, params.data.configurationIds);\n }\n\n public refresh(_: ICellRendererParams): boolean {\n return false;\n }\n\n public ngOnDestroy(): void {\n const detailGridId = 'detail_' + this.masterNode.id;\n this.masterGridApi.removeDetailGridInfo(detailGridId);\n }\n\n private getPossibleColumnsValues(columnIdentifier: string): Observable {\n return this.drawings.getPossibleValues(columnIdentifier).pipe(takeUntil(this.unSubscribeOnViewDestroy));\n }\n\n private setDataParams(params: any): void {\n this.productionScheduleItemMultiplier = params.extraData.productionScheduleItemMultiplier;\n this.isPreSelection = params.extraData.isPreSelection;\n this.selectedPath = params.extraData.selectedPath;\n this.productionSchedule = params.extraData.productionSchedule;\n this.productionSchedulePathsOfColoredYarnSet = params.extraData.productionSchedulePathsOfColoredYarnSet;\n\n if (!this.isPreSelection) {\n this.detailApi?.forEachNode((rowNode: RowNode) => {\n if (!AssertionUtils.isNullOrUndefined(rowNode.data)) {\n const value = this.drawingLibraryHelper.getQuantitySuggestionForPath(\n rowNode.data,\n this.productionSchedule,\n this.selectedPath,\n this.availableSpaceInBuggyInPicks,\n this.buggyLengthMaxInPicks,\n this.hasQuantitySuggestionPermission,\n this.productionScheduleItemMultiplier\n );\n rowNode.setDataValue('quantity', value);\n }\n });\n }\n }\n\n private setupDetailGrid(drawingIds: number[], configurationIds: number[]): void {\n const defaultDetailGridOptions = this.gridOptionsBuilderFactoryService\n .getBuilder(this.getDetailColumnDefinitions(), this.isPreSelection ? GridIdentifier.GROUPED_DESIGNS_DETAIL_PRESELECTION : GridIdentifier.GROUPED_DESIGNS_DETAIL_BUILDER)\n .withHeaderHeight(32)\n .withFloatingFiltersHeight(32)\n .withOnRowSelected((event: RowSelectedEvent) => this.onRowSelected(event))\n .withRowSelection(this.isPreSelection, false)\n .withServerSideDataSource(this.SLICE_SIZE, this.getDetailServerSideDataSource(drawingIds, configurationIds))\n .withGetRowHeight(() => (this.designPreviewFiltered ? this.ROW_HEIGHT_WITHOUT_PREVIEW : this.ROW_HEIGHT_WITH_PREVIEW))\n .withStopEditingWhenCellsLoseFocus()\n .withCompactView()\n .withPopupParent(document.querySelector('body'))\n .withOnFirstDataRendered((event: FirstDataRenderedEvent) => this.onFirstDataRendered(event))\n .withOnColumnVisible((event: ColumnVisibleEvent) => this.withOnColumnVisible(event))\n .withNoRowsOverlay({\n scale: 0.2,\n titleParam: 'DESIGN_LIBRARY.DESIGN',\n hideDescription: true,\n isAnyFilterPresent: () => !AssertionUtils.isNullOrUndefined(this.detailApi) && Object.values(this.detailApi?.getFilterModel())?.length > 0\n } as NoDataOverlayComponentParams);\n\n if (this.isPreSelection) {\n this.detailOptions = defaultDetailGridOptions.build();\n } else {\n this.detailOptions = defaultDetailGridOptions\n .withOnCellValueChanged((event: CellValueChangedEvent) => {\n if (!this.addingItemToPath) {\n this.addDrawingToProductionSchedulePath(event.colDef, event.data);\n }\n })\n .withOnRowSelected((event: RowSelectedEvent) => {\n setTimeout(() => {\n if (!this.addingItemToPath && this.hasQuantitySuggestionPermission) {\n this.drawingLibraryHelper.setQuantitySuggestionForPath(event, this.productionSchedule, this.selectedPath, this.availableSpaceInBuggyInPicks, this.buggyLengthMaxInPicks);\n }\n }, 500);\n })\n .withOnRowDoubleClicked((event: RowDoubleClickedEvent) => {\n if (!this.addingItemToPath) {\n const colDef = this.getColumnDefinitionForClickedCell();\n this.addDrawingToProductionSchedulePath(colDef, event.data);\n }\n })\n .withRowDraggingOutsideGrid(\n (params: {rowNode: RowNode; dragEvent: DragEvent}) => this.drawingLibraryHelper.onRowDrag(params, this.productionScheduleItemMultiplier, this.draggingService, this.renderer),\n undefined,\n 1\n )\n .withOnCellEditingStopped((event: CellEditingStoppedEvent) => {\n if (this.hasQuantitySuggestionPermission) {\n this.drawingLibraryHelper.recalculateQuantitySuggestionWhenRollLengthIsChanged(\n event,\n this.rollLengthColumnId,\n this.productionSchedule,\n this.selectedPath,\n this.buggyLengthMaxInPicks,\n this.availableSpaceInBuggyInPicks\n );\n }\n })\n .build();\n }\n }\n\n private withOnColumnVisible(event: ColumnVisibleEvent): void {\n this.designPreviewFiltered = event.visible === false && event.columns.find((column: any) => column.colDef.cellClass === 'preview') != null;\n\n event.api.forEachNode((node: IRowNode) => node.setRowHeight(this.designPreviewFiltered ? this.ROW_HEIGHT_WITHOUT_PREVIEW : this.ROW_HEIGHT_WITH_PREVIEW));\n event.api.onRowHeightChanged();\n\n const colDefs = event.api.getColumnDefs();\n\n event.api.setGridOption('columnDefs', colDefs);\n event.api.refreshCells({force: true});\n\n if (!this.detailApi?.isDestroyed()) {\n setTimeout(() => this.detailApi?.refreshCells());\n }\n }\n\n private addDrawingToProductionSchedulePath(colDef: ColDef, data: ListDrawingConfiguration): void {\n if (colDef.headerName !== this.translate.instant('GENERAL.QUANTITY') && colDef.colId !== this.rollLengthColumnId) {\n this.addingItemToPath = true;\n\n const listDrawing = data;\n listDrawing.amount = Math.floor(listDrawing.amount / this.productionScheduleItemMultiplier);\n\n if (\n !AssertionUtils.isNullOrUndefined(this.selectedPath) &&\n this.productionSchedule.canAddProductionScheduleItemToProductionSchedulePathForNewBuilder(listDrawing, this.selectedPath.technicalWidthInDents)\n ) {\n this.addDrawingToPath(listDrawing);\n } else if (\n AssertionUtils.isNullOrUndefined(this.selectedPath) &&\n this.productionSchedule.canAddProductionScheduleItemToColoredYarnSet(this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent, listDrawing)\n ) {\n this.addDrawingToNewPath(listDrawing);\n } else {\n this.dialogBuilderFactoryService.getBuilder().openAlertDialog({\n titleText: 'PRODUCTION_ORDER.WEAVE_PLAN.WEAVE_PLAN',\n messageText: 'PRODUCTION_ORDER.WEAVE_PLAN.WARNINGS.PATH_WIDTH_DOES_NOT_EQUAL_DESIGN_WIDTH',\n type: DialogType.INFORMATION\n });\n }\n\n setTimeout(() => {\n this.addingItemToPath = false;\n }, TimeUtils.SECOND_IN_MS);\n }\n }\n\n private addDrawingToNewPath(listDrawing: ListDrawingConfiguration): void {\n this.productionSchedulePlan\n .addDrawingToColoredYarnSet(listDrawing, this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((path: ProductionSchedulePath) => {\n if (!AssertionUtils.isNullOrUndefined(path)) {\n this.selectedPath = path;\n this.selectedRestPathColoredYarnSet = undefined;\n this.groupedDrawingsSelectionService.updateSelectedPath(this.selectedPath);\n this.groupedDrawingsSelectionService.updateSelectedRestPathColoredYarnSet(this.selectedRestPathColoredYarnSet);\n }\n });\n }\n\n private addDrawingToPath(listDrawing: ListDrawingConfiguration): void {\n const productionSchedulePathsOfColoredYarnSet = this.productionSchedule.getProductionSchedulePathsOfColoredYarnSetAtStartDent(\n this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent\n );\n\n this.productionSchedulePlan.addDrawingToProductionSchedulePath(listDrawing, this.selectedPath.pathNumber, productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet);\n }\n\n private getColumnDefinitionForClickedCell(): ColDef {\n const column = this.detailApi.getAllDisplayedColumns().find((col: Column) => col.getColId() === this.detailApi.getFocusedCell().column.getColId());\n return column ? column.getColDef() : null;\n }\n\n private onRowSelected(event: RowSelectedEvent): void {\n if (this.isPreSelection) {\n const selectedNodes = event.api.getSelectedNodes();\n const selectionState = this.groupedDrawingsSelectionService.getParentSelectionState(this.data, selectedNodes);\n const selectedNodeIds = selectedNodes.map((node: RowNode) => node.id);\n const currentlySelectedDrawings = this.data.filter((drawing: ListDrawingConfiguration) => selectedNodeIds.includes(drawing.id));\n\n this.groupedDrawingsSelectionService.setDetailRowSelected(this.masterNode, selectionState, currentlySelectedDrawings);\n }\n }\n\n private getDetailServerSideDataSource(drawingIds: number[], configurationIds: number[]): IServerSideDatasource {\n return {\n getRows: (params: IServerSideGetRowsParams): void => {\n const sortModel: SortModelItem[] = params.request.sortModel;\n const startRow: number = params.request.startRow;\n const endRow: number = params.request.endRow;\n let filterModel: FilterModel | AdvancedFilterModel = params.request.filterModel;\n\n if (!AssertionUtils.isNullOrUndefined(drawingIds) && !AssertionUtils.isEmpty(drawingIds)) {\n const idFilter = {\n id: {\n filterModels: [null, {values: drawingIds, filterType: 'set'}],\n filterType: 'multi'\n }\n };\n\n filterModel = {...filterModel, ...idFilter};\n }\n\n if (!AssertionUtils.isNullOrUndefined(configurationIds) && !AssertionUtils.isEmpty(configurationIds) && configurationIds[0] !== 0) {\n const configurationFilter = {\n configurationId: {\n filterModels: [null, {values: configurationIds, filterType: 'set'}],\n filterType: 'multi'\n }\n };\n\n filterModel = {...filterModel, ...configurationFilter};\n }\n\n this.detailGridModel = new GridModel(startRow, endRow, sortModel, filterModel);\n\n this.drawings\n .getAllWithoutImageDataFromGridModel(TargetForListOfDrawingsEnum.PRODUCTION_ORDER, this.detailGridModel, true, 'group')\n .pipe(\n map((listOfDrawings: Drawing[]) => {\n return listOfDrawings.map((drawing: Drawing) => {\n const config = this.getDrawingConfiguration(drawing, this.masterData.quality.name, this.masterData.colorSet?.name, this.masterData.commercialWidthInCM);\n return new ListDrawingConfiguration(drawing, 0, this.productionScheduleItemMultiplier, this.masterData.commercialWidthInCM, config);\n });\n }),\n takeUntil(this.unSubscribeOnViewDestroy)\n )\n .subscribe({\n next: (listOfDrawings: ListDrawingConfiguration[]) => {\n this.data = listOfDrawings;\n\n const endRowDrawings = listOfDrawings.length < this.SLICE_SIZE ? startRow + listOfDrawings.length : undefined;\n\n if (startRow === 0) {\n if (listOfDrawings.length === 0) {\n params.api.showNoRowsOverlay();\n } else {\n params.api.hideOverlay();\n }\n }\n\n if (this.loadingForTheFirstTime) {\n this.mainColorsSubject.next(this.getMainColors(listOfDrawings));\n this.borderColorsSubject.next(this.getBorderColors(listOfDrawings));\n this.designNamesSubject.next(this.getDesignNames(listOfDrawings));\n this.heightsInPxSubject.next(this.getHeightsInPx(listOfDrawings));\n this.heightsInCMSubject.next(this.getHeightInCM(listOfDrawings));\n }\n\n this.loadingForTheFirstTime = false;\n this.detailOptions.loadingCellRendererParams = {\n loadingForTheFirstTime: this.loadingForTheFirstTime\n };\n\n setTimeout(() => {\n params.success({\n rowData: listOfDrawings,\n rowCount: endRowDrawings\n });\n });\n },\n error: () => {\n params.success({rowData: null, rowCount: 0});\n params.api.showNoRowsOverlay();\n }\n });\n }\n };\n }\n\n private onFirstDataRendered(event: FirstDataRenderedEvent): void {\n this.detailApi = event.api;\n if (AssertionUtils.isNullOrUndefined(this.parentState)) {\n this.initialIds?.forEach((id: string) => {\n if (!AssertionUtils.isNullOrUndefined(this.detailApi?.getRowNode(id))) {\n this.detailApi?.getRowNode(id).setSelected(true);\n }\n });\n } else {\n this.detailApi.forEachNode((detailNode: RowNode) => detailNode.setSelected(this.parentState));\n }\n\n const detailGridId = `${this.DETAIL_ID_PREFIX}${this.masterNode.id}`;\n const gridInfo = {id: detailGridId, api: event.api};\n\n this.masterGridApi.addDetailGridInfo(detailGridId, gridInfo);\n\n if (!this.isPreSelection) {\n this.detailApi?.forEachNode((rowNode: RowNode) => {\n if (!AssertionUtils.isNullOrUndefined(rowNode.data)) {\n const value = this.drawingLibraryHelper.getQuantitySuggestionForPath(\n rowNode.data,\n this.productionSchedule,\n this.selectedPath,\n this.availableSpaceInBuggyInPicks,\n this.buggyLengthMaxInPicks,\n this.hasQuantitySuggestionPermission,\n this.productionScheduleItemMultiplier\n );\n rowNode.setDataValue('quantity', value);\n }\n });\n }\n }\n\n private getDrawingConfiguration(drawing: Drawing, quality: string, colorSetName: string, widthInCM: number): DrawingConfiguration {\n return drawing?.configurations?.find((drawingConfiguration: DrawingConfiguration) => {\n const width = convertToCommercialUnitCentimeter({unit: Unit.MILLIMETER, value: drawingConfiguration.commercialDimensionsInMm.widthInMM} as UnitValue);\n const colorSet = drawingConfiguration instanceof DrawingConfigurationWithColorAndYarnSet ? drawingConfiguration.colorSet : null;\n return drawingConfiguration.quality?.name === quality && colorSet?.name === colorSetName && width === Number(widthInCM);\n });\n }\n\n private getDetailColumnDefinitions(): ColDef[] {\n return [\n this.colDefBuilderFactoryService.getBuilder().withColId('id').withField('drawing.id').withNumericMultiFilter(this.getPossibleColumnsValues('id')).withHiddenInToolPanel().withHide().build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('add')\n .withHeaderName('PRODUCTION_ORDER.DESIGN_LIBRARY.ORDER_LINES.ADD_TO_PATH')\n .withCellRenderer(ProgressCellRendererComponent, {label: 'GENERAL.ACTIONS.ADD', isSaving: this.addingItemToPath})\n .withoutFilter()\n .withSuppressMovable()\n .withHiddenInToolPanel()\n .withHide(this.isPreSelection)\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withSortable(false)\n .withColId('quantity')\n .withField('amount')\n .withHeaderName('GENERAL.QUANTITY')\n .withCellEditor(NumberCellEditorComponent, (): NumberCellEditorParams => ({min: this.productionScheduleItemMultiplier, isSmall: false, autoSelect: true}) as NumberCellEditorParams)\n .withValueGetter((params: ValueGetterParams) => {\n if (params.data?.amount && params.data.amount % 2 === 0) {\n return params.data.amount;\n } else {\n return this.drawingLibraryHelper.getQuantitySuggestionForPath(\n params.data,\n this.productionSchedule,\n this.selectedPath,\n this.availableSpaceInBuggyInPicks,\n this.buggyLengthMaxInPicks,\n this.hasQuantitySuggestionPermission,\n this.productionScheduleItemMultiplier\n );\n }\n })\n .withValueSetter((params: ValueSetterParams) => this.setQuantity(params))\n .withEditable()\n .withOnCellClicked((event: CellClickedEvent) => this.editQuantityCell(event))\n .withSuppressMovable()\n .withRightAlignment()\n .withLockVisible()\n .withMinWidth(100)\n .withoutFilter()\n .withHiddenInToolPanel()\n .withHide(this.isPreSelection)\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId(this.rollLengthColumnId)\n .withField(`rollLengthInMeter`)\n .withHeaderName('PRODUCTION_ORDER.WEAVE_PLAN.PATH_LAYOUT.ROLL_LENGTH', undefined, false, Unit.METER)\n .withOnCellClicked((event: CellClickedEvent) => this.editQuantityCell(event))\n .withSortable(false)\n .withEditable((params: EditableCallbackParams) => this.isRollLengthEditable(params))\n .withCellEditor(NumberCellEditorComponent, (): NumberCellEditorParams => ({isSmall: false, autoSelect: true}) as NumberCellEditorParams)\n .withValueGetter((params: ValueGetterParams) => {\n if (params.data?.rollLengthInMeter && params.data?.commercialDimensionsInCm?.heightInCM / 100 < params.data.rollLengthInMeter) {\n return params.data.rollLengthInMeter;\n } else if (params.data?.drawing?.repeated) {\n const rollLengthInMeter = params.data?.commercialDimensionsInCm?.heightInCM / 100;\n if (!AssertionUtils.isNullOrUndefined(rollLengthInMeter) && !isNaN(rollLengthInMeter)) {\n params.data.rollLengthInMeter = rollLengthInMeter;\n return params.data.rollLengthInMeter;\n } else {\n return convertPixelsToHeightInMeter(\n params?.data?.drawing?.dimensionsInPixels?.heightInPx,\n this.productionSchedule?.machineQuality?.pickDensity * 1000,\n this.productionSchedule?.machineQuality?.weaveStructure?.picksPerColorLine\n );\n }\n } else {\n return null;\n }\n })\n .withMinWidth(130)\n .withoutFilter()\n .withHide(this.isPreSelection)\n .withHiddenInToolPanel(this.isPreSelection)\n .withRightAlignment()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('heightInCM')\n .withField(`commercialDimensionsInCm.heightInCM`)\n .withHeaderName('GENERAL.DIMENSIONS.HEIGHT', 1, false, Unit.CENTIMETER)\n .withNumericMultiFilter(this.heightsInCMSubject.pipe(takeUntil(this.unSubscribeOnViewDestroy)))\n .withRightAlignment()\n .withHiddenInToolPanel()\n .withHide(this.isPreSelection)\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('name')\n .withField(`drawing.name`, true)\n .withHeaderName('DESIGN_LIBRARY.DETAILS.NAME')\n .withComparator(StringUtils.stringComparator)\n .withTextMultiFilter(this.designNamesSubject.pipe(takeUntil(this.unSubscribeOnViewDestroy)))\n .withHeaderCheckboxSelection(false)\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('quality')\n .withHeaderName('TEXTILE_DATA.MACHINE_QUALITY.MACHINE_QUALITY')\n .withTooltipField('quality')\n .withComparator(StringUtils.stringComparator)\n .withCellRendererSelector(this.cellRendererSelector())\n .withoutFilter()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('colorSet', true)\n .withHeaderName('TEXTILE_DATA.COLOR_SET.COLOR_SET')\n .withComparator(StringUtils.stringComparator)\n .withCellRendererSelector(this.cellRendererSelector())\n .withoutFilter()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('widthInPx')\n .withField(`drawing.dimensionsInPixels.widthInPx`)\n .withHeaderName('GENERAL.DIMENSIONS.WIDTH', 1, false, Unit.PIXEL)\n .withRightAlignment()\n .withoutFilter()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('widthInCM')\n .withField(`commercialDimensionsInCm.widthInCM`)\n .withHeaderName('GENERAL.DIMENSIONS.WIDTH', 1, false, Unit.CENTIMETER)\n .withRightAlignment()\n .withValueFormatter((params: ValueFormatterParams) => params.data.commercialDimensionsInCm?.widthInCM?.toFixed(2))\n .withoutFilter()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('heightInPx')\n .withField(`drawing.dimensionsInPixels.heightInPx`)\n .withHeaderName('GENERAL.DIMENSIONS.HEIGHT', 1, false, Unit.PIXEL)\n .withNumericMultiFilter(this.heightsInPxSubject.pipe(takeUntil(this.unSubscribeOnViewDestroy)))\n .withRightAlignment()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('mainColor')\n .withField('mainColor.name', true)\n .withComparator(StringUtils.stringComparator)\n .withHeaderName('GENERAL.ADVANCED_SEARCH.MAIN_COLOR')\n .withTextMultiFilter(this.mainColorsSubject.pipe(takeUntil(this.unSubscribeOnViewDestroy)))\n .withCellRendererSelector(this.cellRendererSelector(GridCreelPreviewOfCreelPositionComponent, {previewType: PreviewType.COLOR, showRgbValues: true}, true))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('borderColor')\n .withField('borderColor.name', true)\n .withComparator(StringUtils.stringComparator)\n .withHeaderName('GENERAL.ADVANCED_SEARCH.BORDER_COLOR')\n .withCellRendererSelector(this.cellRendererSelector(GridCreelPreviewOfCreelPositionComponent, {previewType: PreviewType.COLOR, showRgbValues: true}, true, false))\n .withTextMultiFilter(this.borderColorsSubject.pipe(takeUntil(this.unSubscribeOnViewDestroy)))\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('preview')\n .withValueGetter('data.drawing')\n .withHeaderName('GENERAL.PREVIEW')\n .withCellRenderer(DesignPreviewComponent)\n .withCellClass('preview')\n .withSortable(false)\n .withMinWidth(128)\n .withMaxWidth(128)\n .withoutFilter()\n .build()\n ];\n }\n\n private isRollLengthEditable(params: EditableCallbackParams): boolean {\n return params.data.drawing.repeated;\n }\n\n private editQuantityCell(event: CellClickedEvent): void {\n if (!AssertionUtils.isNullOrUndefined(this.detailApi)) {\n this.detailApi.stopEditing();\n }\n\n if (event?.column?.getColDef()?.editable) {\n this.detailApi?.startEditingCell({\n rowIndex: event?.rowIndex,\n colKey: event?.column?.getColId()\n });\n }\n }\n\n private setQuantity(params: ValueSetterParams): boolean {\n if (this.productionScheduleItemMultiplier === 2 && params.newValue % 2 !== 0) {\n params.newValue--;\n }\n params.data.amount = Math.max(this.productionScheduleItemMultiplier, params.newValue);\n return true;\n }\n\n private cellRendererSelector(\n cellRenderer: any = null,\n cellRendererParams: any = null,\n cellForMainOrBorderColor: boolean = false,\n useMainColor: boolean = true\n ): (params: ICellRendererParams) => CellRendererSelectorResult {\n return (params: ICellRendererParams): CellRendererSelectorResult => {\n if (cellForMainOrBorderColor) {\n const configuration = params.data as ListDrawingConfiguration;\n cellRendererParams.value = {creelPositionForColors: useMainColor ? configuration.mainColor : configuration.borderColor};\n }\n return params.node.level === 0 ? {component: cellRenderer ?? params.colDef.cellRenderer, params: cellRendererParams} : {component: EmptyCellRendererComponent};\n };\n }\n\n private getBorderColors(listDrawingConfigurations: ListDrawingConfiguration[]): string[] {\n return listDrawingConfigurations.map((detailDrawingConfig: ListDrawingConfiguration) => detailDrawingConfig.borderColor?.getFirstItem()?.name ?? '');\n }\n\n private getMainColors(listDrawingConfigurations: ListDrawingConfiguration[]): string[] {\n return listDrawingConfigurations.map((detailDrawingConfig: ListDrawingConfiguration) => detailDrawingConfig.mainColor?.getFirstItem()?.name ?? '');\n }\n\n private getDesignNames(listDrawingConfigurations: ListDrawingConfiguration[]): string[] {\n return listDrawingConfigurations.map((detailDrawingConfig: ListDrawingConfiguration) => detailDrawingConfig.drawing?.name ?? '');\n }\n\n private getHeightsInPx(listDrawingConfigurations: ListDrawingConfiguration[]): string[] {\n return listDrawingConfigurations.map((detailDrawingConfig: ListDrawingConfiguration) => `${detailDrawingConfig.drawing.dimensionsInPixels?.heightInPx}`);\n }\n\n private getHeightInCM(listDrawingConfigurations: ListDrawingConfiguration[]): string[] {\n return listDrawingConfigurations.map((detailDrawingConfig: ListDrawingConfiguration) => `${detailDrawingConfig.commercialDimensionsInCm?.heightInCM}`);\n }\n}\n","
\n \n
\n","\n\n
\n \n \n
\n \n \n \n\n \n \n {{\n 'PRODUCTION_ORDER.DESIGN_LIBRARY.VIEW_MODES.' + viewMode | bmsTranslate\n }}\n \n \n
\n \n\n \n
\n
\n","import {AfterViewInit, Component, ElementRef, Inject, OnInit, Renderer2, ViewChild, ViewEncapsulation} from '@angular/core';\nimport {GridIdentifier} from '@application/grids/grid-identifier.enum';\nimport {DraggingService} from '@application/services/dragging/dragging.service';\nimport {ProductionScheduleDrawingViewMode} from '@domain/production-schedule/production-schedule-drawing-view-mode.enum';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {Permission} from '@domain/profile/permission.enum';\nimport {OverviewListColoredYarnSetWithStartDent} from '@domain/textile-data/creel/overview-list-colored-yarn-set-with-start-dent';\nimport {Authentication, AUTHENTICATION} from '@infrastructure/http/authentication/authentication';\nimport {DRAWINGS, Drawings} from '@infrastructure/http/drawing/drawings';\nimport {HttpStatusBarService} from '@infrastructure/http/status-bar/http-status-bar.service';\nimport {OrderLinesCustomSettingsDialogComponent} from '@presentation/components/dialog-button/dialog-data/order-lines-settings/order-lines-settings.component';\nimport {ListDrawingConfiguration} from '@presentation/components/drawing-list/list-drawing-configuration';\nimport {DrawingLibraryHelper} from '@presentation/pages/texedit/drawing-library/drawing-library-new-listview/drawing-library-helper';\nimport {\n AssertionUtils,\n ColDefBuilderFactoryService,\n DialogBuilderFactoryService,\n GridModel,\n GridOptionsBuilderFactoryService,\n LoadingCellOverlayComponent,\n NoDataOverlayComponentParams,\n StatusBar,\n TranslateService,\n UuidUtils\n} from '@vdw/angular-component-library';\nimport {AgGridAngular} from 'ag-grid-angular';\nimport {CellMouseOverEvent, ColumnVisibleEvent, GetRowIdParams, GridOptions, GridReadyEvent, IRowNode, RowHeightParams, RowNode, RowSelectedEvent} from 'ag-grid-community';\nimport {takeUntil} from 'rxjs';\nimport {PRODUCTION_SCHEDULE_PLAN, ProductionSchedulePlan} from '../../../plan/production-schedule-plan';\nimport {GroupedDesignBaseComponent} from '../grouped-design-base/grouped-design-base.component';\nimport {DrawingsGroupedDetailCellRendererComponent} from './detail-cell-renderer/drawings-grouped-detail-cell-renderer.component';\nimport {GroupedDrawing} from './grouped-drawing';\nimport {GroupedDrawingsSelectionService} from './grouped-drawings-selection.service';\n\n@Component({\n selector: 'app-drawings-grouped-view',\n templateUrl: './drawings-grouped-view.component.html',\n styleUrls: ['./drawings-grouped-view.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class DrawingsGroupedViewComponent extends GroupedDesignBaseComponent implements OnInit, AfterViewInit {\n @ViewChild('container')\n public containerElement: ElementRef;\n\n @ViewChild('groupedGrid')\n public groupedGrid: AgGridAngular;\n\n public loadingForTheFirstTime = true;\n public groupedGridOptions: GridOptions;\n public groupedGridModel: GridModel;\n public detailGridModel: GridModel;\n public groupedDrawings: GroupedDrawing[];\n public statusBar: StatusBar;\n\n public readonly customSettingsComponent = OrderLinesCustomSettingsDialogComponent;\n\n public readonly MAX_DETAIL_ROW_HEIGHT = 350;\n private readonly DETAIL_ROW_HEIGHT = 96;\n\n public constructor(\n @Inject(AUTHENTICATION) authentication: Authentication,\n @Inject(DRAWINGS) drawings: Drawings,\n @Inject(PRODUCTION_SCHEDULE_PLAN) productionSchedulePlan: ProductionSchedulePlan,\n gridOptionsBuilderFactoryService: GridOptionsBuilderFactoryService,\n colDefBuilderFactory: ColDefBuilderFactoryService,\n statusBarService: HttpStatusBarService,\n translate: TranslateService,\n groupedDrawingsSelectionService: GroupedDrawingsSelectionService,\n dialogBuilderFactoryService: DialogBuilderFactoryService,\n private readonly draggingService: DraggingService,\n private readonly renderer: Renderer2,\n drawingLibraryHelper: DrawingLibraryHelper\n ) {\n super(\n authentication,\n drawings,\n productionSchedulePlan,\n gridOptionsBuilderFactoryService,\n colDefBuilderFactory,\n statusBarService,\n translate,\n dialogBuilderFactoryService,\n groupedDrawingsSelectionService,\n drawingLibraryHelper\n );\n }\n\n public ngOnInit(): void {\n super.ngOnInit();\n this.initialiseGroupedGridOptions();\n\n const currentSubscription = this.authentication.getCurrentSubscription();\n\n this.hasQuantitySuggestionPermission = currentSubscription.hasPermission(Permission.TEXFAB_QUANTITY_SUGGESTION);\n\n this.groupedDrawingsSelectionService.getGroupedDrawingsSelected().subscribe((selectedDrawings: ListDrawingConfiguration[]) => {\n this.preselectedDrawings = selectedDrawings;\n });\n this.groupedDrawingsSelectionService.getdetailRowSelected().subscribe((detailComponent: {parentNode: IRowNode; parentSelectionState: boolean; drawingsSelected: ListDrawingConfiguration[]}) => {\n this.onDetailRowsSelectionChanged(detailComponent.parentNode as RowNode, detailComponent.parentSelectionState, detailComponent.drawingsSelected);\n });\n\n this.groupedDrawingsSelectionService.selectedPath.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe((selectedPath: ProductionSchedulePath) => {\n this.selectedPathOutput.emit(selectedPath);\n });\n\n this.groupedDrawingsSelectionService.getdetailRowSelected().subscribe((detailComponent: {parentNode: IRowNode; parentSelectionState: boolean; drawingsSelected: ListDrawingConfiguration[]}) => {\n this.onDetailRowsSelectionChanged(detailComponent.parentNode as RowNode, detailComponent.parentSelectionState, detailComponent.drawingsSelected);\n });\n\n this.groupedDrawingsSelectionService.selectedRestPathColoredYarnSet.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe((coloredYarnSet: OverviewListColoredYarnSetWithStartDent) => {\n this.selectedRestPathColoredYarnSetOutput.emit(coloredYarnSet);\n });\n\n if (!this.isPreSelection) {\n this.viewModes.push(ProductionScheduleDrawingViewMode.GROUPED_DESIGN_THUMBNAILS);\n this.selectedViewModeChanged.emit(this.selectedViewMode);\n }\n }\n\n public ngAfterViewInit(): void {\n this.setGroupedDesignBaseComponentProperties(this.groupedGrid);\n }\n\n private initialiseGroupedGridOptions(): void {\n const drawingsGroupedDetailCellRendererComponent = new DrawingsGroupedDetailCellRendererComponent(\n this.drawings,\n this.productionSchedulePlan,\n this.gridOptionsBuilderFactoryService,\n this.colDefBuilderFactory,\n this.groupedDrawingsSelectionService,\n this.translate,\n this.dialogBuilderFactoryService,\n this.draggingService,\n this.renderer,\n this.drawingLibraryHelper\n );\n\n const defaultGroupedGridOptions = this.gridOptionsBuilderFactoryService\n .getBuilder(this.getGroupColumnDefinitions(), GridIdentifier.GROUPED_DESIGNS)\n .withHeaderHeight(32)\n .withFloatingFiltersHeight(32)\n .withServerSideDataSource(this.SLICE_SIZE, this.getGroupedServerSideDataSource())\n .withMasterDetail(DrawingsGroupedDetailCellRendererComponent, true, (params: any) => this.getDetailCellRendererParams(params), false)\n .withGetRowHeight((params: RowHeightParams) => this.getRowHeightForDetailRow(params))\n .withComponents({\n customLoadingCellRenderer: LoadingCellOverlayComponent,\n DrawingsGroupedDetailCellRendererComponent: drawingsGroupedDetailCellRendererComponent\n })\n .withLoadingCellRenderer('customLoadingCellRenderer')\n .withNoRowsOverlay({\n scale: 0.7,\n titleParam: 'DESIGN_LIBRARY.DESIGN',\n hideDescription: true,\n isAnyFilterPresent: () => !AssertionUtils.isNullOrUndefined(this.groupedGrid) && Object.values(this.groupedGrid?.api?.getFilterModel())?.length > 0\n } as NoDataOverlayComponentParams)\n .withOnGridReady((event: GridReadyEvent) => {\n event.api.refreshCells();\n event.api.refreshHeader();\n this.setInitializationFilters();\n })\n .withOnCellMouseOver((event: CellMouseOverEvent) => this.onCellMouseOver(event))\n .withRowSelection(this.isPreSelection, false)\n .withGetRowId((params: GetRowIdParams) => UuidUtils.generateV4Uuid())\n .withCompactView()\n .withOnColumnVisible((event: ColumnVisibleEvent) => this.onColumnVisibleChange(event))\n .withLoadingOverlay();\n\n if (this.isPreSelection) {\n this.groupedGridOptions = defaultGroupedGridOptions.withOnRowSelected((event: RowSelectedEvent) => this.parentNodeSelected(event)).build();\n } else {\n this.groupedGridOptions = defaultGroupedGridOptions.build();\n }\n }\n\n private onColumnVisibleChange(event: any): void {\n this.groupedGrid.api.refreshServerSide();\n }\n\n private getRowHeightForDetailRow(params: RowHeightParams): number {\n const isDetailRow = params.node.detail;\n\n if (!isDetailRow) {\n return undefined;\n }\n\n return Math.min(\n this.MAX_DETAIL_ROW_HEIGHT,\n this.DETAIL_ROW_HEADER_HEIGHT + 2 * this.DETAIL_ROW_VERTICAL_PADDING + this.DETAIL_ROW_SCROLL_BAR + params.data.drawingIds.length * this.DETAIL_ROW_HEIGHT\n );\n }\n}\n","
\n \n \n
\n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n
\n
\n
\n
\n","import {Component, EventEmitter, HostBinding, Inject, Input, OnInit, Output} from '@angular/core';\nimport {ProductionOrderCustomSettings} from '@domain/production-schedule/custom-settings/production-order-custom-settings';\nimport {DrawingType} from '@domain/production-schedule/drawing-type.enum';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionScheduleDrawingViewMode} from '@domain/production-schedule/production-schedule-drawing-view-mode.enum';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {ProductionScheduleOrderLine} from '@domain/production-schedule/production-schedule-order-line';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {ProductionSchedulePhase} from '@domain/production-schedule/production-schedule-phase.enum';\nimport {Permission} from '@domain/profile/permission.enum';\nimport {Subscription} from '@domain/profile/subscription';\nimport {TargetForListOfDrawingsEnum} from '@domain/target-for-list-of-drawings.enum';\nimport {OverviewListColoredYarnSetWithStartDent} from '@domain/textile-data/creel/overview-list-colored-yarn-set-with-start-dent';\nimport {PathWidth} from '@domain/textile-data/machine-quality/path-width';\nimport {AUTHENTICATION, Authentication} from '@infrastructure/http/authentication/authentication';\nimport {PRODUCTION_SCHEDULES, ProductionSchedules} from '@infrastructure/http/production-schedule/production-schedules';\nimport {OrderLinesCustomSettingsDialogComponent} from '@presentation/components/dialog-button/dialog-data/order-lines-settings/order-lines-settings.component';\nimport {ListDrawing} from '@presentation/components/drawing-list/list-drawing';\nimport {ListDrawingConfiguration} from '@presentation/components/drawing-list/list-drawing-configuration';\nimport {ListDrawingOrderLine} from '@presentation/components/drawing-list/list-drawing-order-line';\nimport {PRODUCTION_SCHEDULE_PLAN, ProductionSchedulePlan} from '@presentation/pages/texfab/production-schedule/add/plan/production-schedule-plan';\nimport {BaseComponent, GridModel, LocalStorageService, StatusBar, TranslateService, Unit} from '@vdw/angular-component-library';\nimport {some} from 'lodash-es';\nimport {distinctUntilChanged, map as rxjsMap, takeUntil} from 'rxjs/operators';\nimport {AddProductionScheduleNavigationState} from '../add-production-schedule-navigation-state.interface';\n\n@Component({\n selector: 'app-production-schedule-new-drawing-library',\n templateUrl: './production-schedule-new-drawing-library.component.html',\n styleUrls: ['./production-schedule-new-drawing-library.component.scss']\n})\nexport class ProductionScheduleNewDrawingLibraryComponent extends BaseComponent implements OnInit {\n @Input() public showSelectedItems = false;\n @Input() public productionSchedule: ProductionSchedule;\n @Input() public productionSchedulePhase: ProductionSchedulePhase;\n @Input() public productionOrderCustomSettings: ProductionOrderCustomSettings;\n @Input() public isPreSelection = false;\n @Input() public selectedPath: ProductionSchedulePath;\n @Input() public selectedRestPathColoredYarnSet: OverviewListColoredYarnSetWithStartDent;\n @Input() public productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet;\n @Input() public pathWidths: PathWidth[];\n @Input() public buggyLengthMaxInPicks: number;\n @Input() public availableSpaceInBuggyInPicks: number;\n @Input() public availableSpaceInBuggyInCommercialUnit: number;\n @Input() public autoFillingPath: boolean;\n @Input() public marginInDentsOfMissingDesigns: number;\n @Input() public preselectedDrawings: ListDrawingConfiguration[];\n @Input() public preselectedOrderlineIds: number[] = [];\n @Input() public preselectedDesignIds: number[] = [];\n @Input() public preselectedConfigurationIds: number[] = [];\n @Input() public addProductionScheduleNavigationState: AddProductionScheduleNavigationState = null;\n @Input() public selectedPathContentRowData: ProductionScheduleItemInPathGroup;\n @Output() public navigateBackOutput = new EventEmitter();\n @Output() public selectedPathOutput: EventEmitter = new EventEmitter();\n @Output() public selectedRestPathColoredYarnSetOutput: EventEmitter = new EventEmitter();\n @Output() public selectedViewModeOutput: EventEmitter = new EventEmitter();\n @Output() public preselectedOrderlineIdsOutput = new EventEmitter();\n @Output() public preselectedDrawingsOutput = new EventEmitter();\n @Output() public preselectedDrawingIdsOutput = new EventEmitter();\n @Output() public preselectedConfigurationIdsOutput = new EventEmitter();\n\n @HostBinding('class.build-production-schedule-phase') public get isCurrentProductionSchedulePhaseBuild(): boolean {\n return this.productionSchedulePhase === ProductionSchedulePhase.BUILD;\n }\n\n public readonly listOfDrawingsTarget: TargetForListOfDrawingsEnum = TargetForListOfDrawingsEnum.PRODUCTION_ORDER;\n public listOfDrawings: ListDrawing[] = [];\n public statusBar: StatusBar;\n public isEditingPaths = false;\n public displayTechnicalUnit = true;\n public readonly filterOnBMPDrawingType = DrawingType.BMP;\n public viewModes: ProductionScheduleDrawingViewMode[] = [\n ProductionScheduleDrawingViewMode.ORDER_LINES,\n ProductionScheduleDrawingViewMode.DESIGNS_LIST,\n ProductionScheduleDrawingViewMode.GROUPED_ORDER_LINES\n ];\n\n public selectedViewMode = ProductionScheduleDrawingViewMode.ORDER_LINES;\n public orderlinesGridModel: GridModel;\n public readonly customSettingsComponent = OrderLinesCustomSettingsDialogComponent;\n public readonly commercialUnit = Unit.CENTIMETER;\n\n public constructor(\n @Inject(AUTHENTICATION) private readonly authentication: Authentication,\n @Inject(PRODUCTION_SCHEDULE_PLAN) private readonly productionSchedulePlan: ProductionSchedulePlan,\n @Inject(PRODUCTION_SCHEDULES) private readonly productionSchedules: ProductionSchedules,\n private readonly translate: TranslateService,\n private readonly localStorage: LocalStorageService\n ) {\n super();\n }\n\n public ngOnInit(): void {\n const currentSubscription = this.authentication.getCurrentSubscription();\n\n this.filterViewModes(currentSubscription);\n\n this.displayTechnicalUnit = this.isCurrentProductionSchedulePhaseBuild;\n this.subscribeToEditPathChanges();\n this.subscribeToProductionScheduleChanges();\n\n if (currentSubscription.hasPermission(Permission.ACCESS_ALL)) {\n this.viewModes.push(ProductionScheduleDrawingViewMode.GROUPED_DESIGNS);\n\n if (!this.isPreSelection) {\n this.viewModes.push(ProductionScheduleDrawingViewMode.GROUPED_DESIGN_THUMBNAILS);\n }\n }\n this.selectedViewMode = this.localStorage.get('drawingLibraryViewMode') || ProductionScheduleDrawingViewMode.ORDER_LINES;\n\n if ((this.isPreSelection && this.selectedViewMode === ProductionScheduleDrawingViewMode.GROUPED_DESIGN_THUMBNAILS) || !this.viewModes.includes(this.selectedViewMode)) {\n this.onSelectedViewModeChange(this.viewModes[0]);\n } else {\n this.onSelectedViewModeChange(this.selectedViewMode);\n }\n }\n\n public getOrderlinesTranslationKey(): string {\n return this.translate.instant('PRODUCTION_ORDER.DESIGN_LIBRARY.VIEW_MODES.ORDER_LINES');\n }\n\n public onSelectedViewModeChange(viewMode: ProductionScheduleDrawingViewMode): void {\n this.selectedViewMode = viewMode;\n this.localStorage.set('drawingLibraryViewMode', viewMode);\n this.selectedViewModeOutput.emit(viewMode);\n }\n\n public onDrawingSelected(selectedDrawings: ListDrawingConfiguration[]): void {\n this.preselectedDrawingsOutput.emit(selectedDrawings);\n }\n\n public onDrawingIdsSelected(selectedDrawingIds: number[]): void {\n this.preselectedDrawingIdsOutput.emit(selectedDrawingIds);\n }\n\n public onConfigurationIdsSelected(selectedConfigurationIds: number[]): void {\n this.preselectedConfigurationIdsOutput.emit(selectedConfigurationIds);\n }\n\n public onOrderlinesSelected(selectedOrderlineIds: number[]): void {\n this.preselectedOrderlineIds = selectedOrderlineIds;\n this.preselectedOrderlineIdsOutput.emit(this.preselectedOrderlineIds);\n }\n\n public isViewModeDesignsList(): boolean {\n return this.selectedViewMode === ProductionScheduleDrawingViewMode.DESIGNS_LIST;\n }\n\n public isViewModeGroupedDrawings(): boolean {\n return this.selectedViewMode === ProductionScheduleDrawingViewMode.GROUPED_DESIGNS;\n }\n\n public isViewModeNewOrderLines(): boolean {\n return this.selectedViewMode === ProductionScheduleDrawingViewMode.ORDER_LINES;\n }\n\n public isViewModeNewGroupedOrderLines(): boolean {\n return this.selectedViewMode === ProductionScheduleDrawingViewMode.GROUPED_ORDER_LINES;\n }\n\n public isViewModeNewGroupedDesignThumbnails(): boolean {\n return this.selectedViewMode === ProductionScheduleDrawingViewMode.GROUPED_DESIGN_THUMBNAILS;\n }\n\n public canSelectDrawings(): boolean {\n return !this.isCurrentProductionSchedulePhaseBuild || (this.isCurrentProductionSchedulePhaseBuild && !this.showSelectedItems);\n }\n\n private subscribeToProductionScheduleChanges(): void {\n this.productionSchedulePlan.currentUpdatedProductionSchedule\n .pipe(\n rxjsMap((productionSchedule: ProductionSchedule) => productionSchedule.orderLines),\n distinctUntilChanged((oldOrderLines: ProductionScheduleOrderLine[], newOrderLines: ProductionScheduleOrderLine[]) =>\n newOrderLines.every((newOrderLine: ProductionScheduleOrderLine) => some(oldOrderLines, {id: newOrderLine.id, amountInProductionSchedule: newOrderLine.amountInProductionSchedule}))\n ),\n takeUntil(this.unSubscribeOnViewDestroy)\n )\n .subscribe(() => this.updateOrderLinesAmountInProductionSchedule());\n }\n\n private filterViewModes(currentSubscription: Subscription): void {\n if (!currentSubscription.hasPermission(Permission.TEXFAB_ORDERBOOK)) {\n this.viewModes = this.viewModes.filter(\n (viewMode: ProductionScheduleDrawingViewMode) => viewMode !== ProductionScheduleDrawingViewMode.ORDER_LINES && viewMode !== ProductionScheduleDrawingViewMode.GROUPED_ORDER_LINES\n );\n }\n }\n\n private updateOrderLinesAmountInProductionSchedule(): void {\n this.listOfDrawings\n .filter((listDrawing: ListDrawing) => listDrawing instanceof ListDrawingOrderLine)\n .forEach((listDrawingOrderLine: ListDrawingOrderLine) => {\n listDrawingOrderLine.orderLine.amountInProductionSchedule = this.productionSchedule.getOrderLineQuantityInProductionSchedulePathsColoredYarnSets(listDrawingOrderLine.orderLine.id);\n });\n }\n\n private subscribeToEditPathChanges(): void {\n this.productionSchedulePlan.currentEditingPaths.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe((isEditingPaths: boolean) => (this.isEditingPaths = isEditingPaths));\n }\n}\n","export enum JutePosition {\n BEFORE_AND_AFTER_PATHLABEL = 'BEFORE_AND_AFTER_PATHLABEL',\n BEFORE_PATHLABEL = 'BEFORE_PATHLABEL',\n AFTER_PATHLABEL = 'AFTER_PATHLABEL',\n NO_PATHLABEL = 'NO_PATHLABEL'\n}\n","
\n \n

\n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.JUTE.JUTE_BEFORE_PATH' | bmsTranslate }}\n ({{ 'GENERAL.HINTS.UNAUTHORIZED' | bmsTranslate }})\n

\n
\n\n
\n
\n

{{ 'GENERAL.ACTIONS.ADD_OBJECT' | bmsTranslate: {object: 'PRODUCTION_ORDER.WEAVE_PLAN.JUTE.JUTE' | bmsTranslate} }}

\n\n \n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.JUTE.BEFORE_PATH_LABEL' | bmsTranslate }}\n \n \n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.JUTE.AFTER_PATH_LABEL' | bmsTranslate }}\n \n
\n\n
\n \n {{ 'GENERAL.DIMENSIONS.HEIGHT' | bmsTranslate }}\n \n {{ 'GENERAL.UNIT.MILLIMETER' | bmsTranslate }}\n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n {{ 'GENERAL.ERRORS.MIN_VALUE' | bmsTranslate: {min: 1} }}\n \n \n \n {{ 'GENERAL.DIMENSIONS.HEIGHT' | bmsTranslate }}\n \n {{ 'GENERAL.UNIT.PICKS' | bmsTranslate }}\n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n {{ 'GENERAL.ERRORS.MULTIPLE_VALUE' | bmsTranslate: {value: getMultipleValue()} }}\n \n \n {{ 'GENERAL.ERRORS.MIN_VALUE' | bmsTranslate: {min: machineQuality.weaveStructure.picksPerColorLine} }}\n \n \n
\n
\n\n \n

\n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.JUTE.JUTE_AFTER_PATH' | bmsTranslate }}\n ({{ 'GENERAL.HINTS.UNAUTHORIZED' | bmsTranslate }})\n

\n
\n\n
\n \n {{ 'PRODUCTION_ORDER.CUSTOM_SETTINGS.PATH_LABELS.JUTE_AFTER_SAME_AS_BEFORE' | bmsTranslate }}\n \n\n
\n
\n \n {{ 'GENERAL.DIMENSIONS.HEIGHT' | bmsTranslate }}\n \n {{ 'GENERAL.UNIT.MILLIMETER' | bmsTranslate }}\n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n {{ 'GENERAL.ERRORS.MIN_VALUE' | bmsTranslate: {min: 1} }}\n \n \n \n {{ 'GENERAL.DIMENSIONS.HEIGHT' | bmsTranslate }}\n \n {{ 'GENERAL.UNIT.PICKS' | bmsTranslate }}\n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n {{ 'GENERAL.ERRORS.MULTIPLE_VALUE' | bmsTranslate: {value: getMultipleValue()} }}\n \n \n {{ 'GENERAL.ERRORS.MIN_VALUE' | bmsTranslate: {min: machineQuality.weaveStructure.picksPerColorLine} }}\n \n \n
\n\n
\n

{{ 'GENERAL.ACTIONS.ADD_OBJECT' | bmsTranslate: {object: 'PRODUCTION_ORDER.WEAVE_PLAN.JUTE.JUTE' | bmsTranslate} }}

\n\n \n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.JUTE.BEFORE_PATH_LABEL' | bmsTranslate }}\n \n \n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.JUTE.AFTER_PATH_LABEL' | bmsTranslate }}\n \n
\n
\n
\n\n
\n \n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.PATTERN_OR_DRAWING' | bmsTranslate }}\n \n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n \n
\n
\n","import {Component, EventEmitter, Inject, Input, OnChanges, Output, SimpleChanges} from '@angular/core';\nimport {FormBuilder, FormControl, FormGroup, Validators} from '@angular/forms';\nimport {MatCheckboxChange} from '@angular/material/checkbox';\nimport {AddJutePattern} from '@application/command/add-jute-pattern';\nimport {isMultipleOfValidator} from '@application/validators/is-multiple-of-validator';\nimport {Pattern} from '@domain/pattern';\nimport {JuteInformation} from '@domain/production-schedule/jute-information';\nimport {JuteInformationForPart} from '@domain/production-schedule/jute-information-for-part';\nimport {JutePosition} from '@domain/production-schedule/jute-position.enum';\nimport {MachineQualityForProductionSchedule} from '@domain/production-schedule/machine-quality-for-production-schedule';\nimport {MachineSummary} from '@domain/production-schedule/machine-summary';\nimport {PathLabelInformation} from '@domain/production-schedule/path-label-information';\nimport {Permission} from '@domain/profile/permission.enum';\nimport {Subscription as ProfileSubscription} from '@domain/profile/subscription';\nimport {Authentication, AUTHENTICATION} from '@infrastructure/http/authentication/authentication';\nimport {PatternType} from '@presentation/components/select-pattern/pattern-type.enum';\nimport {SelectPatternComponentMatDialogConfigDataInterface} from '@presentation/components/select-pattern/select-pattern-component-mat-dialog-config.interface';\nimport {SelectPatternComponent} from '@presentation/components/select-pattern/select-pattern.component';\nimport {OverviewListColoredYarnSet} from '@presentation/pages/textile-data/colored-yarn-set/overview/overview-list-colored-yarn-set';\nimport {WeaveQualityType} from '@presentation/pages/textile-data/machine-quality/overview/weave-quality-type.enum';\nimport {AssertionUtils, BaseComponent, canShowErrorForErrorCodeAndFormControlForFormGroup, DialogBuilderFactoryService, FormValueHelper, TranslateService} from '@vdw/angular-component-library';\nimport {takeUntil} from 'rxjs/operators';\n\n@Component({\n selector: 'app-production-schedule-jute-options',\n templateUrl: './production-schedule-jute-options.component.html',\n styleUrls: ['./production-schedule-jute-options.component.scss']\n})\nexport class ProductionScheduleJuteOptionsComponent extends BaseComponent implements OnChanges {\n @Input() public coloredYarnSet: OverviewListColoredYarnSet;\n @Input() public machineQuality: MachineQualityForProductionSchedule;\n @Input() public pathLabelInformation: PathLabelInformation;\n @Input() public juteInformation: JuteInformation;\n @Input() public factorForConversionFromPicksToMillimeters: number;\n @Input() public factorForConversionFromMillimetersToPicks: number;\n @Input() public machine: MachineSummary;\n @Input() public needsToShowValidationFeedback: boolean;\n @Input() public weaveQualityType: WeaveQualityType;\n @Input() public areAllFieldsDisabled: boolean = false;\n @Output() public juteZoneLoaded = new EventEmitter();\n\n public readonly JUTE_PATTERN_CONDITIONAL_CHIP_VALUE_KEY = this.translate.instant('PRODUCTION_ORDER.WEAVE_PLAN.JUTE.PATTERN_NAME', {patternId: '%(id)'});\n\n public juteForm: FormGroup<{\n hasJuteBefore: FormControl;\n juteBefore: FormGroup<{\n position: FormGroup<{\n beforePathLabel: FormControl;\n afterPathLabel: FormControl;\n }>;\n commercialHeightInMM: FormControl;\n technicalHeightInPicks: FormControl;\n }>;\n hasJuteAfter: FormControl;\n juteAfter: FormGroup<{\n sameAsJuteBefore: FormControl;\n position: FormGroup<{\n beforePathLabel: FormControl;\n afterPathLabel: FormControl;\n }>;\n commercialHeightInMM: FormControl;\n technicalHeightInPicks: FormControl;\n }>;\n pattern: FormControl;\n }>;\n\n private currentSubscription: ProfileSubscription;\n private readonly ADD_JUTE_PERMISSION = Permission.ADD_JUTE;\n\n public constructor(\n @Inject(AUTHENTICATION) private readonly authentication: Authentication,\n private readonly translate: TranslateService,\n private readonly formBuilder: FormBuilder,\n private readonly addJutePattern: AddJutePattern,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService\n ) {\n super();\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (AssertionUtils.isNullOrUndefined(this.currentSubscription)) {\n this.currentSubscription = this.authentication.getCurrentSubscription();\n\n if (!this.hasPermissionToAddJute()) {\n this.juteZoneLoaded.emit();\n }\n }\n\n if ('juteInformation' in changes) {\n if (changes.juteInformation.firstChange) {\n this.setFormFields();\n }\n this.setFormValues();\n }\n\n const hasJuteBefore = !AssertionUtils.isNullOrUndefined(this.juteInformation?.juteBefore);\n const hasJuteAfter = !AssertionUtils.isNullOrUndefined(this.juteInformation?.juteAfter);\n\n if (!hasJuteAfter && !hasJuteBefore) {\n this.juteZoneLoaded.emit();\n }\n }\n\n public hasPermissionToAddJute(): boolean {\n return this.currentSubscription?.hasPermission(this.ADD_JUTE_PERMISSION);\n }\n\n public hasChosenJutePattern(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.juteForm.value.pattern);\n }\n\n public selectPatternForJute(): void {\n const colorSetId = this.coloredYarnSet.overviewListColorSet.id;\n\n this.dialogBuilderFactoryService\n .getBuilder()\n .openSelectGridDialog, Pattern>(SelectPatternComponent, {\n patternType: PatternType.JUTE_PATTERNS,\n addPatternCommand: this.addJutePattern.execute({machineQualityId: this.machineQuality.id, colorSetId}),\n patternTranslationKey: 'PRODUCTION_ORDER.WEAVE_PLAN.PATTERN_OR_DRAWING',\n allowPatternCreation: true,\n weaveStructureId: this.machineQuality.weaveStructure.id,\n machineQualityId: this.machineQuality.id,\n colorSetId\n })\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((pattern: Pattern | undefined) => {\n if (pattern !== undefined) {\n this.juteForm.controls.pattern.setValue(pattern);\n this.juteZoneLoaded.emit();\n }\n });\n }\n\n public getMultipleValue(): number {\n if (this.machineQuality.weaveStructure.sendRepeat !== this.machineQuality.weaveStructure.picksPerColorLine) {\n return this.machineQuality.weaveStructure.sendRepeat * this.machineQuality.weaveStructure.picksPerColorLine;\n } else {\n return this.machineQuality.weaveStructure.sendRepeat;\n }\n }\n\n public getJuteInformation(): JuteInformation {\n let juteBefore: JuteInformationForPart = null;\n let juteAfter: JuteInformationForPart = null;\n let result: JuteInformation = null;\n const pattern: Pattern = this.juteForm.value.pattern;\n\n if (this.juteForm.getRawValue().hasJuteBefore) {\n const juteBeforePathControl = this.juteForm.controls.juteBefore;\n\n juteBefore = new JuteInformationForPart(\n this.getJutePosition(juteBeforePathControl.value.position as {beforePathLabel: boolean; afterPathLabel: boolean}),\n juteBeforePathControl.value.commercialHeightInMM,\n juteBeforePathControl.value.technicalHeightInPicks,\n pattern\n );\n }\n\n if (this.juteForm.getRawValue().hasJuteAfter) {\n const juteAfterPathControl = this.isJuteAfterPathIsSameAsBefore() ? this.juteForm.controls.juteBefore : this.juteForm.controls.juteAfter;\n\n juteAfter = new JuteInformationForPart(\n this.getJutePosition(juteAfterPathControl.value.position as {beforePathLabel: boolean; afterPathLabel: boolean}),\n juteAfterPathControl.value.commercialHeightInMM,\n juteAfterPathControl.value.technicalHeightInPicks,\n pattern\n );\n }\n\n if (!AssertionUtils.isNullOrUndefined(juteBefore) || !AssertionUtils.isNullOrUndefined(juteAfter)) {\n result = new JuteInformation(juteBefore, juteAfter);\n }\n\n return result;\n }\n\n public onJuteAfterPathIsSameAsBeforeChange(matCheckboxChange: MatCheckboxChange): void {\n if (matCheckboxChange.checked) {\n this.setJuteAfterSameAsJuteBefore();\n }\n }\n\n public canShowErrorForFormControl(errorCode: string, formControlName: string): boolean {\n return canShowErrorForErrorCodeAndFormControlForFormGroup(errorCode, formControlName, this.juteForm);\n }\n\n public canShowMultipleError(formControlName: string): boolean {\n return this.canShowErrorForFormControl('multiple', formControlName) && !this.canShowErrorForFormControl('min', formControlName);\n }\n\n public juteBeforePathChange(matCheckboxChange: MatCheckboxChange): void {\n if (!matCheckboxChange.checked) {\n this.juteForm.controls.juteBefore.reset({\n position: {\n beforePathLabel: true,\n afterPathLabel: true\n }\n });\n\n if (this.isJuteAfterPathIsSameAsBefore()) {\n this.juteForm.controls.juteAfter.controls.sameAsJuteBefore.setValue(false);\n }\n }\n }\n\n public juteAfterPathChange(matCheckboxChange: MatCheckboxChange): void {\n if (matCheckboxChange.checked) {\n if (this.juteForm.getRawValue().hasJuteBefore) {\n this.setJuteAfterSameAsJuteBefore();\n }\n } else {\n this.juteForm.controls.juteAfter.reset({\n position: {\n beforePathLabel: true,\n afterPathLabel: true\n }\n });\n }\n }\n\n public canShowJutePattern(): boolean {\n return this.juteForm.getRawValue().hasJuteBefore || this.juteForm.getRawValue().hasJuteAfter;\n }\n\n public canShowAddJuteBeforeOrAfterPathLabels(): boolean {\n return (\n this.machine.canHaveRestAndFreeZonesAndPathLabels() &&\n !AssertionUtils.isNullOrUndefined(this.pathLabelInformation) &&\n (this.pathLabelInformation.hasAddedPathLabelBefore() || this.pathLabelInformation.hasAddedPathLabelAfter())\n );\n }\n\n private setJuteAfterSameAsJuteBefore(): void {\n this.juteForm.controls.juteAfter.setValue(\n {\n ...this.juteForm.get('juteBefore').value,\n sameAsJuteBefore: true\n },\n {emitEvent: false}\n );\n }\n\n private setFormFields(): void {\n this.juteForm = this.formBuilder.group({\n hasJuteBefore: this.formBuilder.control({value: false, disabled: !this.hasPermissionToAddJute()}),\n juteBefore: this.formBuilder.group({\n position: this.formBuilder.group({\n beforePathLabel: this.formBuilder.control(true),\n afterPathLabel: this.formBuilder.control(true)\n }),\n commercialHeightInMM: this.formBuilder.control(null, [Validators.required, Validators.min(1)]),\n technicalHeightInPicks: this.formBuilder.control(null, [\n Validators.required,\n isMultipleOfValidator(this.machineQuality.weaveStructure.sendRepeat),\n Validators.min(this.machineQuality.weaveStructure.sendRepeat)\n ])\n }),\n hasJuteAfter: this.formBuilder.control({value: false, disabled: !this.hasPermissionToAddJute()}),\n juteAfter: this.formBuilder.group({\n sameAsJuteBefore: this.formBuilder.control(false),\n position: this.formBuilder.group({\n beforePathLabel: this.formBuilder.control(true),\n afterPathLabel: this.formBuilder.control(true)\n }),\n commercialHeightInMM: this.formBuilder.control(null, [Validators.required, Validators.min(1)]),\n technicalHeightInPicks: this.formBuilder.control(null, [\n Validators.required,\n isMultipleOfValidator(this.machineQuality.weaveStructure.sendRepeat),\n Validators.min(this.machineQuality.weaveStructure.sendRepeat)\n ])\n }),\n pattern: this.formBuilder.control(null, Validators.required)\n });\n\n if (this.areAllFieldsDisabled) {\n this.juteForm.disable();\n }\n\n this.subscribeToJuteAfterPath();\n }\n\n private subscribeToJuteAfterPath(): void {\n this.juteForm.controls.juteBefore.valueChanges.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe(() => {\n if (this.isJuteAfterPathIsSameAsBefore()) {\n this.setJuteAfterSameAsJuteBefore();\n }\n });\n }\n\n private getJutePosition(position: {beforePathLabel: boolean; afterPathLabel: boolean}): JutePosition {\n const {beforePathLabel, afterPathLabel} = position;\n let jutePosition: JutePosition;\n\n if (!AssertionUtils.isNullOrUndefined(this.pathLabelInformation)) {\n if (beforePathLabel && afterPathLabel) {\n jutePosition = JutePosition.BEFORE_AND_AFTER_PATHLABEL;\n } else if (beforePathLabel && !afterPathLabel) {\n jutePosition = JutePosition.BEFORE_PATHLABEL;\n } else if (!beforePathLabel && afterPathLabel) {\n jutePosition = JutePosition.AFTER_PATHLABEL;\n } else {\n jutePosition = JutePosition.NO_PATHLABEL;\n }\n } else {\n jutePosition = JutePosition.NO_PATHLABEL;\n }\n\n return jutePosition;\n }\n\n private isJuteAfterPathIsSameAsBefore(): boolean {\n return this.juteForm.controls.juteAfter.value.sameAsJuteBefore;\n }\n\n private setFormValues(): void {\n let pattern: Pattern;\n let juteBeforePositionBeforePathLabel = false;\n let juteBeforePositionAfterPathLabel = false;\n let juteAfterPositionBeforePathLabel = false;\n let juteAfterPositionAfterPathLabel = false;\n const hasJuteBefore = !AssertionUtils.isNullOrUndefined(this.juteInformation?.juteBefore);\n const hasJuteAfter = !AssertionUtils.isNullOrUndefined(this.juteInformation?.juteAfter);\n\n if (hasJuteBefore) {\n const {juteBefore} = this.juteInformation;\n pattern = juteBefore.pattern;\n const position = juteBefore.position;\n\n if (this.machine.canHaveRestAndFreeZonesAndPathLabels()) {\n juteBeforePositionBeforePathLabel = position === JutePosition.BEFORE_PATHLABEL || position === JutePosition.BEFORE_AND_AFTER_PATHLABEL;\n juteBeforePositionAfterPathLabel = position === JutePosition.AFTER_PATHLABEL || position === JutePosition.BEFORE_AND_AFTER_PATHLABEL;\n }\n\n this.juteForm.patchValue(\n {\n hasJuteBefore,\n juteBefore: {\n position: {\n beforePathLabel: juteBeforePositionBeforePathLabel,\n afterPathLabel: juteBeforePositionAfterPathLabel\n },\n commercialHeightInMM: juteBefore.commercialHeightInMM,\n technicalHeightInPicks: juteBefore.technicalHeightInPicks\n },\n pattern\n },\n {emitEvent: false}\n );\n } else {\n this.juteForm.controls.hasJuteBefore.setValue(false);\n }\n\n if (hasJuteAfter) {\n const {juteAfter} = this.juteInformation;\n\n pattern = juteAfter.pattern;\n const position = juteAfter.position;\n\n if (this.machine.canHaveRestAndFreeZonesAndPathLabels()) {\n juteAfterPositionBeforePathLabel = position === JutePosition.BEFORE_PATHLABEL || position === JutePosition.BEFORE_AND_AFTER_PATHLABEL;\n juteAfterPositionAfterPathLabel = position === JutePosition.AFTER_PATHLABEL || position === JutePosition.BEFORE_AND_AFTER_PATHLABEL;\n }\n\n const sameAsJuteBefore =\n hasJuteBefore &&\n juteBeforePositionBeforePathLabel === juteAfterPositionBeforePathLabel &&\n juteBeforePositionAfterPathLabel === juteAfterPositionAfterPathLabel &&\n juteAfter.commercialHeightInMM === this.juteInformation.juteBefore.commercialHeightInMM &&\n juteAfter.technicalHeightInPicks === this.juteInformation.juteBefore.technicalHeightInPicks;\n\n this.juteForm.patchValue(\n {\n hasJuteAfter,\n juteAfter: {\n sameAsJuteBefore,\n position: {\n beforePathLabel: juteAfterPositionBeforePathLabel,\n afterPathLabel: juteAfterPositionAfterPathLabel\n },\n commercialHeightInMM: juteAfter.commercialHeightInMM,\n technicalHeightInPicks: juteAfter.technicalHeightInPicks\n },\n pattern\n },\n {emitEvent: false}\n );\n } else {\n this.juteForm.controls.hasJuteAfter.setValue(false);\n }\n\n this.syncJutePathHeights('juteBefore.commercialHeightInMM', 'juteBefore.technicalHeightInPicks');\n this.syncJutePathHeights('juteAfter.commercialHeightInMM', 'juteAfter.technicalHeightInPicks');\n }\n\n private syncJutePathHeights(commercialHeightFormFieldName: string, technicalHeightFormFieldName: string): void {\n FormValueHelper.syncValuesOfFormFieldsByFactor(\n this.juteForm.get(commercialHeightFormFieldName),\n this.juteForm.get(technicalHeightFormFieldName),\n this.factorForConversionFromMillimetersToPicks,\n this.factorForConversionFromPicksToMillimeters,\n this.machineQuality.weaveStructure.picksPerColorLine ?? null\n )\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe();\n }\n}\n","import {Injectable} from '@angular/core';\nimport {GridIdentifier} from '@application/grids/grid-identifier.enum';\nimport {GridActionButtonsHelper} from '@application/helper/grid-action-buttons-helper/grid-action-buttons-helper';\nimport {PageTypeEnum} from '@application/helper/navigation-helper/page-type.enum';\nimport {RemoveConfirmationService} from '@application/helper/remove-confirmation/remove-confirmation.service';\nimport {AddComponentInput} from '@application/helper/routing/add-component-input.interface';\nimport {NavigationId} from '@application/helper/routing/navigation-id.enum';\nimport {NavigationUtils} from '@application/helper/routing/navigation-utils';\nimport {BuggyForProductionSchedule} from '@domain/production-schedule/buggy-for-production-schedule';\nimport {Permission} from '@domain/profile/permission.enum';\nimport {HttpBuggyService} from '@infrastructure/http/buggy/http-buggy.service';\nimport {\n AssertionUtils,\n CrudObjectSelectionDialogInput,\n CrudObjectSelectionDialogNewComponent,\n CrudOverviewDataBuilderFactoryService,\n CrudOverviewDataConfig,\n DialogBuilderFactoryService,\n DialogType,\n GridButtonClickedEvent,\n GridOptionsBuilder,\n NavigationHelperPrototypeService,\n PrototypeRouteUtils,\n TranslateService\n} from '@vdw/angular-component-library';\nimport {Observable} from 'rxjs';\nimport {BuggyOverviewService} from './overview/buggy-overview.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class BuggySelectionService {\n private config: CrudOverviewDataConfig;\n private readonly BUGGY_TRANSLATION_KEY = 'PLANNING.BUGGY.BUGGY';\n\n private readonly routes = [\n NavigationUtils.getNavigationRoute(NavigationId.BUGGY),\n NavigationUtils.getNavigationRoute(NavigationId.ADD_BUGGY),\n NavigationUtils.getNavigationRoute(NavigationId.EDIT_BUGGY),\n NavigationUtils.getNavigationRoute(NavigationId.DUPLICATE_BUGGY)\n ];\n\n public constructor(\n private readonly buggies: HttpBuggyService,\n private readonly translate: TranslateService,\n private readonly overview: BuggyOverviewService,\n private readonly gridActionButtonsHelper: GridActionButtonsHelper,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n private readonly builderFactoryService: CrudOverviewDataBuilderFactoryService,\n private readonly navigationHelper: NavigationHelperPrototypeService,\n private readonly removeConfirmation: RemoveConfirmationService\n ) {\n this.init();\n }\n\n public init(): void {\n const crudOverviewButtonConfigs = this.gridActionButtonsHelper.getActionButtonsWithNewRouting(\n PrototypeRouteUtils.getPage(this.routes, 'edit/:id').component,\n Permission.EDIT_BUGGIES,\n ({gridApi, rowNode}: GridButtonClickedEvent) => {\n const data = AssertionUtils.isNullOrUndefined(rowNode) ? (gridApi?.getSelectedRows()[0] as BuggyForProductionSchedule) : (rowNode.data as BuggyForProductionSchedule);\n\n if (!AssertionUtils.isEmpty(this.config.selectedObjects) && data.id === this.config.selectedObjects[0]?.id) {\n this.dialogBuilderFactoryService.getBuilder().openAlertDialog({\n titleText: this.translate.instant('CONFLICTS.DIALOG.IN_USE', {object: data.name}),\n messageText: this.translate.instant('CONFLICTS.DIALOG.DESELECT'),\n type: DialogType.DELETE\n });\n return;\n }\n\n this.removeConfirmation.open(data, this.buggies.delete(data.id), this.BUGGY_TRANSLATION_KEY, gridApi);\n }\n );\n\n this.config = this.builderFactoryService\n .getBuilder()\n .withEntityName(this.BUGGY_TRANSLATION_KEY)\n .withRowData(this.buggies.getAll())\n .withDefaultButtons(crudOverviewButtonConfigs)\n .withCrudGridOptions(this.overview.getColumnDefs(true, crudOverviewButtonConfigs.rowActionsComplete), GridIdentifier.BUGGY, null, (builder: GridOptionsBuilder) =>\n builder.withRowSelection(false, false).build()\n )\n .build();\n }\n\n public openContentSwitcherDialog(inputValue: BuggyForProductionSchedule): Observable {\n this.config.rowData = null;\n this.config.selectedObjects = [inputValue];\n\n return this.navigationHelper.navigateWithContentSwitcher({\n componentInfo: {\n component: CrudObjectSelectionDialogNewComponent,\n componentInputs: {\n config: this.config,\n newClickedEntry: {\n componentInfo: {\n component: NavigationUtils.getNavigationRoute(NavigationId.ADD_BUGGY).component,\n componentInputs: {pageType: PageTypeEnum.ADD, canShowHeader: true} as AddComponentInput\n }\n }\n } as CrudObjectSelectionDialogInput\n }\n });\n }\n}\n","
\n
\n
\n \n \n \n

{{ 'GENERAL.ACTIONS.CREATE_OBJECT' | bmsTranslate: {object: 'PRODUCTION_ORDER.PRODUCTION_ORDER' | bmsTranslate: {count: 1} | lowercase} }}

\n
\n
\n \n
\n
\n \n
\n
\n
\n \n {{ 'GENERAL.NAME' | bmsTranslate }}\n \n\n @if (!areAllFieldsDisabled) {\n \n \n \n }\n\n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n\n \n {{ 'GENERAL.ERRORS.NAME_DUPLICATE' | bmsTranslate }}\n \n\n \n {{ 'GENERAL.ERRORS.LENGTH_LIMIT' | bmsTranslate: {max: '24'} }}\n \n\n \n {{ 'GENERAL.ERRORS.NO_SPECIAL_CHARACTERS' | bmsTranslate }}\n \n \n\n \n \n \n
\n\n
\n \n \n {{ 'MACHINE.MACHINE' | bmsTranslate: {count: 1} | bmsTranslate }}\n \n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n \n
\n \n \n \n
\n\n \n
\n \n
\n
\n
\n \n {{ 'TEXTILE_DATA.MACHINE_QUALITY.PRACTICALPICKDENSITY' | bmsTranslate }}\n \n \n {{ 'GENERAL.ERRORS.NO_OBJECT_CHOSEN' | bmsTranslate: {object: 'MACHINE.MACHINE' | bmsTranslate: {count: 1} | lowercase} }}\n \n
\n \n {{ 'TEXTILE_DATA.MACHINE_QUALITY.PRACTICALPICKDENSITY' | bmsTranslate }}\n \n \n {{ 'GENERAL.UNIT.' + getDefaultParameterForPropertyNameOfMachineQualitySettings('pickDensityUnit').propertyValue | bmsTranslate }}\n \n \n {{ 'GENERAL.ERRORS.MIN_VALUE' | bmsTranslate: {min: '1'} }}\n \n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n
\n\n
\n
\n
\n \n {{ 'TEXTILE_DATA.MACHINE_QUALITY.MACHINE_QUALITY' | bmsTranslate: {count: 1} }}\n \n \n {{ 'GENERAL.ERRORS.NO_OBJECT_CHOSEN' | bmsTranslate: {object: 'MACHINE.MACHINE' | bmsTranslate: {count: 1} | lowercase} }}\n \n
\n\n \n {{ 'TEXTILE_DATA.MACHINE_QUALITY.MACHINE_QUALITY' | bmsTranslate: {count: 1} | bmsTranslate }}\n \n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n
\n \n
\n \n \n
\n
\n
\n
\n
\n\n \n
\n @if (canSelectProductConfiguration()) {\n \n
\n
\n \n {{ 'PRODUCT_CONFIGURATION.PRODUCT_CONFIGURATION' | bmsTranslate: {count: 1} }}\n \n \n {{ 'GENERAL.ERRORS.NO_OBJECT_CHOSEN' | bmsTranslate: {object: 'MACHINE.MACHINE' | bmsTranslate: {count: 1} | lowercase} }}\n \n
\n\n \n \n {{ 'PRODUCT_CONFIGURATION.PRODUCT_CONFIGURATION' | bmsTranslate: {count: 1} | bmsTranslate\n }}({{ 'GENERAL.OPTIONAL' | bmsTranslate | lowercase }})\n \n \n \n
\n\n \n
\n \n \n
\n
\n
\n }\n @if (canSelectBuggy()) {\n
\n
\n
\n \n {{ 'PLANNING.BUGGY.BUGGY' | bmsTranslate: {count: 1} }}\n \n \n {{ 'GENERAL.ERRORS.NO_OBJECT_CHOSEN' | bmsTranslate: {object: 'MACHINE.MACHINE' | bmsTranslate: {count: 1} | lowercase} }}\n \n
\n\n \n \n {{ 'PLANNING.BUGGY.BUGGY' | bmsTranslate: {count: 1} | bmsTranslate }}({{ 'GENERAL.OPTIONAL' | bmsTranslate | lowercase }})\n \n \n \n
\n
\n }\n
\n
\n
\n\n
\n
\n
\n
\n
\n \n
\n
\n
\n

\n {{ 'TEXTILE_DATA.COLORED_YARN_SET.COLORED_YARN_SET' | bmsTranslate: {count: 2} }}\n

\n
\n \n
\n
\n
\n \n
\n \n {{ productionScheduleColoredYarnSet.coloredYarnSet?.name }}\n \n \n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n \n
\n \n {{ 'PRODUCTION_ORDER.WARNINGS.NO_POSSIBLE_MATCHES_WITH_CURRENT_MACHINE' | bmsTranslate }}\n
\n\n \n \n \n \n
\n \n\n
\n
\n
\n \n \n \n

\n \n {{ 'PRODUCTION_ORDER.CUSTOM_SETTINGS.PATH_LABELS_AND_JUTE' | bmsTranslate: {count: 2} }}\n \n \n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.JUTE.JUTE' | bmsTranslate }}\n \n

\n
\n
\n \n \n
\n \n
\n
\n
\n \n \n
\n
\n
\n
\n
\n
\n\n \n
\n
\n
\n \n \n \n

\n {{ 'SETTINGS.MENU_NAME' | bmsTranslate }}\n

\n
\n
\n \n
\n \n {{ 'PRODUCTION_ORDER.CUSTOM_SETTINGS.ADD_ON_PLANNING_BOARD' | bmsTranslate }}\n \n \n \n
\n
\n
\n
\n
\n
\n
\n
\n\n","import {DOCUMENT} from '@angular/common';\nimport {ChangeDetectorRef, Component, EventEmitter, Inject, Input, OnInit, Output, ViewChild} from '@angular/core';\nimport {FormGroup} from '@angular/forms';\nimport {ActivatedRoute, Router} from '@angular/router';\nimport {NavigationFunctionData} from '@application/helper/navigation-helper/navigation-function-data.interface';\nimport {NavigationHelperService} from '@application/helper/navigation-helper/navigation-helper.service';\nimport {NavigationNewItemData} from '@application/helper/navigation-helper/navigation-new-item-data.interface';\nimport {NavigationId} from '@application/helper/routing/navigation-id.enum';\nimport {NavigationUtils} from '@application/helper/routing/navigation-utils';\nimport {RouteUtils} from '@application/helper/routing/route-utils';\nimport {SourceElementUtils} from '@application/helper/source-element-utils';\nimport {StringUtils} from '@application/helper/string-utils';\nimport {getMappedColoredYarnSet} from '@application/helper/textile-data/colored-yarn-set/get-mapped-colored-yarn-set';\nimport {NavigationHistoryService} from '@application/navigation-history/navigation-history.service';\nimport {AsyncUniqueValidator} from '@application/validators/async-unique-validator';\nimport {CustomSettings} from '@domain/custom-settings/custom-settings';\nimport {Equipment} from '@domain/machine/equipment';\nimport {MachineType} from '@domain/machine/machine-type.enum';\nimport {PositionOfDialog} from '@domain/position-of-dialog';\nimport {ProductConfiguration} from '@domain/product-configuration/product-configuration';\nimport {SelectListProductConfiguration} from '@domain/product-configuration/select-list-product-configuration';\nimport {SelectListProductConfigurationVersionHistory} from '@domain/product-configuration/select-list-product-configuration-version-history';\nimport {VersionHistory} from '@domain/product-configuration/version-history';\nimport {BmpProductionScheduleItemInPathGroup} from '@domain/production-schedule/bmp-production-schedule-item-in-path-group';\nimport {BuggyForProductionSchedule} from '@domain/production-schedule/buggy-for-production-schedule';\nimport {CreelForProductionSchedule} from '@domain/production-schedule/creel-for-production-schedule';\nimport {ProductionOrderCustomSettings} from '@domain/production-schedule/custom-settings/production-order-custom-settings';\nimport {ProductionOrderNameGenerationView} from '@domain/production-schedule/custom-settings/production-order-name-generation-view.interface';\nimport {DrawingType} from '@domain/production-schedule/drawing-type.enum';\nimport {FinishingForProductionSchedule} from '@domain/production-schedule/finishing-for-production-schedule';\nimport {InitialOptionsForProductionOrder} from '@domain/production-schedule/initial-options-for-production-order';\nimport {InitialPathLabel} from '@domain/production-schedule/initial-path-label';\nimport {MachineQualityForProductionSchedule} from '@domain/production-schedule/machine-quality-for-production-schedule';\nimport {MachineSummary} from '@domain/production-schedule/machine-summary';\nimport {PathLabelInformation} from '@domain/production-schedule/path-label-information';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {ProductionScheduleProductConfiguration} from '@domain/production-schedule/production-schedule-product-configuration';\nimport {ProductionScheduleStatus} from '@domain/production-schedule/production-schedule-status.enum';\nimport {InitialRestZone} from '@domain/production-schedule/rest-zone/initial-rest-zone';\nimport {Permission} from '@domain/profile/permission.enum';\nimport {Subscription as ProfileSubscription} from '@domain/profile/subscription';\nimport {PropertyValue} from '@domain/property-value';\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 {CarpetWeaveQuality} from '@domain/textile-data/machine-quality/carpet-weave-quality';\nimport {PathWidth} from '@domain/textile-data/machine-quality/path-width';\nimport {WeaveQuality} from '@domain/textile-data/machine-quality/weave-quality';\nimport {AUTHENTICATION, Authentication} from '@infrastructure/http/authentication/authentication';\nimport {HttpBuggyCustomSettingsService} from '@infrastructure/http/buggy/http-buggy-custom-settings.service';\nimport {HttpBuggyService} from '@infrastructure/http/buggy/http-buggy.service';\nimport {CREELS, Creels} from '@infrastructure/http/creel/creels';\nimport {MACHINE_QUALITIES, MachineQualities} from '@infrastructure/http/machine-quality/machine-qualities';\nimport {MACHINES, Machines} from '@infrastructure/http/machine/machines.interface';\nimport {HttpPlanningPrototypeService} from '@infrastructure/http/planning-prototype/http-planning-prototype.service';\nimport {PLANNING, Planning} from '@infrastructure/http/planning/planning';\nimport {PRODUCT_CONFIGURATIONS, ProductConfigurations} from '@infrastructure/http/product-configuration/product-configuration.interface';\nimport {HttpProductionOrdersCustomSettingsService} from '@infrastructure/http/production-order-custom-settings/http-production-orders-custom-settings.service';\nimport {PRODUCTION_ORDERS, ProductionOrders} from '@infrastructure/http/production-order/production-orders';\nimport {PRODUCTION_SCHEDULES, ProductionSchedules} from '@infrastructure/http/production-schedule/production-schedules';\nimport {RepositionDialogComponent} from '@presentation/components/reposition-dialog/reposition-dialog.component';\nimport {SelectBuggyComponent} from '@presentation/components/select-buggy/select-buggy.component';\nimport {SelectCreelComponent} from '@presentation/components/select-creel/select-creel.component';\nimport {SelectFinishingComponent} from '@presentation/components/select-finishing/select-finishing.component';\nimport {SelectMachineQualityComponent} from '@presentation/components/select-machine-quality/select-machine-quality.component';\nimport {AddProductionSchedule} from '@presentation/pages/texfab/production-schedule/add/add-production-schedule';\nimport {ADD_PRODUCTION_SCHEDULE} from '@presentation/pages/texfab/production-schedule/add/add-production-schedule.service';\nimport {PRODUCTION_SCHEDULE_PLAN, ProductionSchedulePlan} from '@presentation/pages/texfab/production-schedule/add/plan/production-schedule-plan';\nimport {BuggySelectionService} from '@presentation/pages/textile-data/buggy/buggy-selection.service';\nimport {OverviewListColoredYarnSet} from '@presentation/pages/textile-data/colored-yarn-set/overview/overview-list-colored-yarn-set';\nimport {OverviewListCreel} from '@presentation/pages/textile-data/creel/overview/overview-list-creel';\nimport {OverviewListMachineQuality} from '@presentation/pages/textile-data/machine-quality/overview/overview-list-machine-quality';\nimport {WeaveQualityType} from '@presentation/pages/textile-data/machine-quality/overview/weave-quality-type.enum';\nimport {TextileDataDetailComponent} from '@presentation/pages/textile-data/textile-data-detail/textile-data-detail.component';\nimport {\n AgGridRowSelection,\n AssertionUtils,\n DialogBuilderFactoryService,\n DialogComponentData,\n FormValidationHelper,\n ObjectUtils,\n TranslateService,\n Unit,\n convertUnit,\n skeletonViewAnimation\n} from '@vdw/angular-component-library';\nimport {cloneDeep} from 'lodash-es';\nimport {EMPTY, Observable, Subject, Subscription, forkJoin, of} from 'rxjs';\nimport {debounceTime, distinctUntilChanged, map, switchMap, takeUntil, tap} from 'rxjs/operators';\nimport {ProductionScheduleData} from '../add-production-schedule-navigation-data.type';\nimport {BaseAddProductionScheduleNewPageComponent, ProductionScheduleInitialPreparationsFormGroup} from '../base-add-production-schedule-new-page.component';\nimport {ProductionScheduleInitialPreparationsAdditionalOptionsComponent} from './additional-options/production-schedule-initial-preparations-additional-options.component';\nimport {ProductionScheduleJuteOptionsComponent} from './additional-options/production-schedule-jute-options/production-schedule-jute-options.component';\nimport {ProductionSchedulePathLabelsComponent} from './additional-options/production-schedule-path-labels/production-schedule-path-labels.component';\nimport {ProductionScheduleQualityLinkedSettingsComponent} from './additional-options/production-schedule-quality-linked-settings/production-schedule-quality-linked-settings.component';\nimport {InitialProductionOrderForTypeRequestProperties} from './initial-production-order-for-type-request-properties.type';\nimport {SelectMachineComponent} from './select-machine/select-machine.component';\nimport {SelectProductConfigurationComponent} from './select-product-configuration/select-product-configuration.component';\n\n@Component({\n selector: 'app-production-schedule-initial-preparations-new',\n templateUrl: './production-schedule-initial-preparations-new.component.html',\n styleUrls: ['./production-schedule-initial-preparations-new.component.scss'],\n animations: [skeletonViewAnimation('.form-field-skeleton-wrapper, header .url, .warning-for-no-possible-matches-with-current-machine, .mat-expansion-panel')]\n})\nexport class ProductionScheduleInitialPreparationsNewComponent extends BaseAddProductionScheduleNewPageComponent implements OnInit {\n @Input() public customSettings: ProductionOrderCustomSettings;\n @Input() public listOfMachineQualityCustomSettings: PropertyValue[] = [];\n @Input() public productionSchedule: ProductionSchedule;\n @Input() public needsToShowValidationFeedback = false;\n @Input() public productionScheduleInitialPreparationsForm: ProductionScheduleInitialPreparationsFormGroup;\n @Input() public productionScheduleStatus: ProductionScheduleStatus;\n @Input() public areAllFieldsDisabled: boolean = false;\n\n @Output() public restZoneLoaded = new EventEmitter();\n @Output() public freeZoneLoaded = new EventEmitter();\n @Output() public pathZoneLoaded = new EventEmitter();\n @Output() public juteZoneLoaded = new EventEmitter();\n @Output() public formValuesChanged = new EventEmitter();\n @Output() public hideParentHeader = new EventEmitter();\n\n @ViewChild('initialPreparationsAdditionalOptionsComponent') public initialPreparationsAdditionalOptionsComponent: ProductionScheduleInitialPreparationsAdditionalOptionsComponent;\n @ViewChild('pathLabelsComponent') public pathLabelsComponent: ProductionSchedulePathLabelsComponent;\n @ViewChild('juteOptionsComponent') public juteOptionsComponent: ProductionScheduleJuteOptionsComponent;\n @ViewChild('qualityLinkedSettingsComponent') public qualityLinkedSettingsComponent: ProductionScheduleQualityLinkedSettingsComponent;\n public readonly MACHINE_BASE_ROUTER_LINK = RouteUtils.paths.texState.editMachine.absolutePath;\n public readonly PRODUCT_CONFIGURATION_CHIP_VALUE_KEY = '%(nameWithVersion)';\n public readonly PRODUCT_CONFIGURATION_BASE_ROUTER_LINK = RouteUtils.paths.texEdit.editProductConfiguration.absolutePath;\n public readonly QUALITY_CHIP_VALUE_KEY = '%(technicalNameWithVersion)';\n public readonly QUALITY_BASE_ROUTER_LINK = RouteUtils.paths.texStyle.machineQuality.editMachineQuality.absolutePath;\n public readonly BUGGY_BASE_ROUTER_LINK = RouteUtils.paths.texStyle.buggy.editBuggy.absolutePath;\n public readonly ACCESS_ALL_PERMISSION = Permission.ACCESS_ALL;\n public readonly ADD_JUTE_PERMISSION = Permission.ADD_JUTE;\n public readonly PICKS_PER_METER_UNIT = Unit.PICKS_PER_METER;\n\n public factorForConversionFromMillimetersToDents: number;\n public factorForConversionFromDentsToMillimeters: number;\n public factorForConversionFromPicksToMillimeters: number;\n public factorForConversionFromMillimetersToPicks: number;\n public pathWidths: PathWidth[];\n public selectedMachine: MachineSummary = null;\n public canShowAdditionalOptions = false;\n public hasPlanningBoardPermission = false;\n public isLoadingMachineQualityAndCreel = false;\n public isLoadingProductionSchedule = false;\n public canShowWarningForIncorrectSplittedCreel: boolean;\n public isViewingCreelMap = false;\n public defaultInitialRestZones: InitialRestZone;\n public oldMachineQuality: MachineQualityForProductionSchedule;\n public canHaveRestAndFreeZonesAndPathLabels: boolean;\n public buggy: BuggyForProductionSchedule;\n public productionScheduleNameGenerationView: ProductionOrderNameGenerationView;\n public refreshNameGeneration: Subject = new Subject();\n public defaultPathLabelInformation: InitialPathLabel;\n\n private hasBuggyNameGeneration: boolean = false;\n private readonly addPathLabelPermission: Permission = Permission.ADD_PATH_LABEL;\n private readonly dialogBuilderForBasicDialog = this.dialogBuilderFactoryService.getBuilder().withClass('basic-dialog-panel');\n private possibleQualitiesForCurrentMachine: WeaveQuality[];\n private possibleCreelsForCurrentMachine: OverviewListCreel[];\n private productionScheduleInitialPreparationsFormSubject: Subscription;\n private currentSubscription: ProfileSubscription;\n private dialogState: DialogComponentData;\n\n public constructor(\n @Inject(MACHINE_QUALITIES) private readonly machineQualities: MachineQualities,\n @Inject(MACHINES) private readonly machines: Machines,\n @Inject(PRODUCTION_SCHEDULES) private readonly productionSchedules: ProductionSchedules,\n @Inject(PRODUCTION_ORDERS) private readonly productionOrders: ProductionOrders,\n @Inject(CREELS) private readonly creels: Creels,\n @Inject(PRODUCTION_SCHEDULE_PLAN) private readonly productionSchedulePlan: ProductionSchedulePlan,\n @Inject(ADD_PRODUCTION_SCHEDULE) private readonly addProductionSchedule: AddProductionSchedule,\n protected readonly httpProductionOrdersCustomSettings: HttpProductionOrdersCustomSettingsService,\n private readonly httpBuggyCustomSettings: HttpBuggyCustomSettingsService,\n @Inject(DOCUMENT) private readonly document: Document,\n private readonly navigationHistory: NavigationHistoryService,\n @Inject(AUTHENTICATION) private readonly authentication: Authentication,\n @Inject(PLANNING) private readonly planning: Planning,\n private readonly planningPrototype: HttpPlanningPrototypeService,\n @Inject(PRODUCT_CONFIGURATIONS) private readonly productConfigurations: ProductConfigurations,\n private readonly translate: TranslateService,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n private readonly router: Router,\n private readonly changeDetectorRef: ChangeDetectorRef,\n private readonly navigationHelperService: NavigationHelperService,\n private readonly buggies: HttpBuggyService,\n private readonly buggySelectionService: BuggySelectionService,\n activatedRoute: ActivatedRoute\n ) {\n super(activatedRoute);\n }\n\n public get selectedMachineName(): string {\n return StringUtils.getPropertyValueOrGeneralPlaceholderIfEmpty(this.selectedMachine, 'name', this.translate);\n }\n\n public ngOnInit(): void {\n this.currentSubscription = this.authentication.getCurrentSubscription();\n this.hasPlanningBoardPermission = this.currentSubscription?.hasAtLeastOneOfThePermissions([Permission.TEXFAB_PLANNINGBOARD, Permission.TEXFAB_PLANNINGBOARD_NEW]) ?? false;\n this.initialiseProductionSchedule();\n\n if (!this.hasAddPathLabelPermission()) {\n this.pathZoneLoaded.emit();\n }\n\n this.productionSchedule.addToPlanboard ??= this.customSettings.addProductionOrderToPlanningBoard;\n this.updateCanHaveRestAndFreeZonesAndPathLabels();\n\n this.checkIfBuggyHasNameGeneration();\n }\n\n public selectMachine(): void {\n this.dialogBuilderForBasicDialog\n .openSelectGridDialog(SelectMachineComponent, {\n machineQualityId: this.isAddingProductionOrderForProductConfiguration() ? this.productionSchedule.machineQuality.id : null,\n allowedMachineTypes: [MachineType.CARPET_LOOM, MachineType.CARPET_LOOM_NO_JQ, MachineType.VELVET]\n })\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((selectedMachine: Equipment) => {\n if (!AssertionUtils.isNullOrUndefined(selectedMachine)) {\n this.onMachineSelect(selectedMachine);\n }\n });\n }\n\n public toggleOnPlanningBoardSettingValue(value: boolean): void {\n this.productionSchedule.addToPlanboard = value;\n }\n\n public showColoredYarnSetDetails(event: MouseEvent, productionScheduleColoredYarnSet: OverviewListColoredYarnSetWithStartDent): void {\n const startDent = `${this.translate.instant('GENERAL.START_DENT')}: ${productionScheduleColoredYarnSet.startDent}`;\n const widthInDents = `${this.translate.instant('GENERAL.WIDTH_IN_DENTS')}: ${productionScheduleColoredYarnSet.technicalWidthInDents}`;\n const textileDataAmount = `${startDent}, ${widthInDents}`;\n\n this.dialogBuilderFactoryService\n .getBuilder()\n .withClass(['reposition-dialog', productionScheduleColoredYarnSet.coloredYarnSet.overviewListColorSet.creelPositions.length > 8 ? 'colored-list-dialog' : ''])\n .withWidth('706px')\n .openDialog(RepositionDialogComponent, {\n textileData: productionScheduleColoredYarnSet.coloredYarnSet,\n textileDataAmount,\n component: TextileDataDetailComponent,\n sourceElement: SourceElementUtils.findSourceElementForDialog(event, 'color-list-preview-container'),\n positionOfDialog: PositionOfDialog.RIGHT,\n creelMap: this.getCreelMap().find((creelMap: CreelMap) => creelMap.coloredYarnSetId === productionScheduleColoredYarnSet.coloredYarnSet.id)\n });\n }\n\n public canShowWarningForNoPossibleMatchesWithCurrentMachine(): boolean {\n return (\n this.hasChosenMachine() &&\n ((!AssertionUtils.isNullOrUndefined(this.possibleCreelsForCurrentMachine) && this.possibleCreelsForCurrentMachine.length === 0) ||\n (!AssertionUtils.isNullOrUndefined(this.possibleQualitiesForCurrentMachine) && this.possibleQualitiesForCurrentMachine.length === 0)) &&\n !this.isShowingSkeletonView()\n );\n }\n\n public canShowDetailsOfActiveCreel(): boolean {\n return this.productionSchedule.coloredYarnSets.length > 0 || this.isShowingSkeletonView();\n }\n\n public selectBuggy(): void {\n const field = this.productionScheduleInitialPreparationsForm.controls.buggy;\n\n this.buggySelectionService\n .openContentSwitcherDialog(field.value)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((buggy: BuggyForProductionSchedule[]) => {\n if (!AssertionUtils.isNullOrUndefined(buggy)) {\n this.buggy = AssertionUtils.isEmpty(buggy) ? null : buggy[0];\n field.setValue(this.buggy);\n }\n });\n }\n\n public getSelectedBuggy(): BuggyForProductionSchedule {\n return this.productionScheduleInitialPreparationsForm.get('buggy')?.value;\n }\n\n public canSelectBuggy(): boolean {\n return this.currentSubscription?.hasPermission(Permission.VIEW_BUGGIES);\n }\n\n public selectAnotherCreel(): void {\n if (!this.isProductionScheduleRelatedToRunOrBeingDecreated() && !this.areAllFieldsDisabled) {\n if (AssertionUtils.isNullOrUndefined(this.possibleCreelsForCurrentMachine)) {\n this.creels\n .getPossibleCreelsForMachine(this.selectedMachine.id)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((possibleCreelsForCurrentMachine: OverviewListCreel[]) => {\n this.possibleCreelsForCurrentMachine = possibleCreelsForCurrentMachine;\n\n this.selectCreelFromPossibleCreels();\n });\n } else {\n this.selectCreelFromPossibleCreels();\n }\n }\n }\n\n public selectAnotherMachineQuality(): void {\n if (AssertionUtils.isNullOrUndefined(this.possibleQualitiesForCurrentMachine)) {\n this.machineQualities\n .getPossibleMachineQualitiesForMachine(this.selectedMachine.id)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((possibleQualitiesForCurrentMachine: WeaveQuality[]) => {\n this.possibleQualitiesForCurrentMachine = possibleQualitiesForCurrentMachine;\n\n this.selectMachineQualityFromPossibleMachineQualities();\n });\n } else {\n this.selectMachineQualityFromPossibleMachineQualities();\n }\n }\n\n public hasChosenMachine(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.selectedMachine);\n }\n\n public getProductionSchedule(): ProductionSchedule {\n this.productionSchedule.initialFreeZones = this.initialPreparationsAdditionalOptionsComponent.getInitialFreeZone();\n this.productionSchedule.initialRestZones = this.initialPreparationsAdditionalOptionsComponent.getInitialRestZone();\n\n const oldFinishingForProductionSchedule: FinishingForProductionSchedule = this.productionSchedule.finishing;\n\n this.productionSchedule.name = this.productionScheduleInitialPreparationsForm.value.name;\n const practicalPickDensityUnit: Unit = Unit[this.getDefaultParameterForPropertyNameOfMachineQualitySettings('pickDensityUnit').propertyValue as string];\n this.productionSchedule.practicalPickDensityInPicksPerMM = convertUnit({\n from: {\n value: this.productionScheduleInitialPreparationsForm.value.practicalPickDensity,\n unit: practicalPickDensityUnit\n },\n to: Unit.PICKS_PER_MILLIMETER\n });\n this.productionSchedule.productConfiguration = this.productionScheduleInitialPreparationsForm.value.productConfiguration;\n this.productionSchedule.finishing = this.initialPreparationsAdditionalOptionsComponent.getSelectedFinishing();\n this.productionSchedule.dueDate = this.initialPreparationsAdditionalOptionsComponent.getDueDate();\n this.productionSchedule.comment = this.initialPreparationsAdditionalOptionsComponent.getComment();\n this.productionSchedule.buggy = this.getSelectedBuggy();\n this.productionSchedule.pathLabelInformation = this.pathLabelsComponent?.getPathLabelInformation() ?? null;\n this.productionSchedule.juteInformation = this.juteOptionsComponent?.getJuteInformation() ?? null;\n this.productionSchedule.juteGeneralSettings = this.qualityLinkedSettingsComponent?.getGeneralJuteSettings() ?? null;\n\n this.adjustDefaultFinishingsForProductionScheduleItems(oldFinishingForProductionSchedule);\n return this.productionSchedule;\n }\n\n public getConfiguredProductionSchedule(): ProductionSchedule {\n const configuredProductionSchedule = cloneDeep(this.productionSchedule);\n\n configuredProductionSchedule.name = this.productionScheduleInitialPreparationsForm.controls.name.valid ? this.productionScheduleInitialPreparationsForm.value.name : null;\n\n const practicalPickDensityUnit: Unit = Unit[this.getDefaultParameterForPropertyNameOfMachineQualitySettings('pickDensityUnit').propertyValue as string];\n configuredProductionSchedule.practicalPickDensityInPicksPerMM = !isNaN(this.productionScheduleInitialPreparationsForm.value.practicalPickDensity)\n ? convertUnit({\n from: {\n value: this.productionScheduleInitialPreparationsForm.value.practicalPickDensity,\n unit: practicalPickDensityUnit\n },\n to: Unit.PICKS_PER_MILLIMETER\n })\n : null;\n\n const oldFinishingForProductionSchedule: FinishingForProductionSchedule = configuredProductionSchedule.finishing;\n const isAdditionalOptionsComponentDefined = !AssertionUtils.isNullOrUndefined(this.initialPreparationsAdditionalOptionsComponent);\n\n if ((!AssertionUtils.isNullOrUndefined(configuredProductionSchedule.id) || this.isAddingAnyTypeOfProductionOrder()) && isAdditionalOptionsComponentDefined) {\n configuredProductionSchedule.initialFreeZones = this.initialPreparationsAdditionalOptionsComponent.getInitialFreeZone();\n configuredProductionSchedule.initialRestZones = this.initialPreparationsAdditionalOptionsComponent.getInitialRestZone();\n configuredProductionSchedule.finishing = this.initialPreparationsAdditionalOptionsComponent.getSelectedFinishing();\n configuredProductionSchedule.dueDate = this.initialPreparationsAdditionalOptionsComponent.getDueDate();\n configuredProductionSchedule.comment = this.initialPreparationsAdditionalOptionsComponent.getComment();\n configuredProductionSchedule.buggy = this.getSelectedBuggy();\n configuredProductionSchedule.pathLabelInformation = null;\n configuredProductionSchedule.juteInformation = null;\n configuredProductionSchedule.juteGeneralSettings = null;\n\n if (!AssertionUtils.isNullOrUndefined(this.pathLabelsComponent)) {\n const pathLabelInformation = this.pathLabelsComponent.getPathLabelInformation();\n\n configuredProductionSchedule.pathLabelInformation = pathLabelInformation;\n }\n\n if (!AssertionUtils.isNullOrUndefined(this.juteOptionsComponent)) {\n configuredProductionSchedule.juteInformation = this.juteOptionsComponent.getJuteInformation();\n }\n\n if (!AssertionUtils.isNullOrUndefined(this.qualityLinkedSettingsComponent)) {\n configuredProductionSchedule.juteGeneralSettings = this.qualityLinkedSettingsComponent.getGeneralJuteSettings();\n }\n }\n\n this.adjustDefaultFinishingsForProductionScheduleItems(oldFinishingForProductionSchedule);\n return configuredProductionSchedule;\n }\n\n public additionalOptionsChanged(): void {\n this.formValuesChanged.emit();\n }\n\n public navigateToCustomSettings(): void {\n this.router.navigateByUrl(NavigationUtils.getAbsolutePath(NavigationId.CARPET_PRODUCTION_SCHEDULE_SETTINGS));\n }\n\n public canShowLabelForMachineQualityAndCreel(): boolean {\n return !this.hasChosenMachine() && !this.isLoadingMachineQualityAndCreel;\n }\n\n public isShowingSkeletonView(): boolean {\n return this.isLoadingMachineQualityAndCreel || this.isLoadingProductionSchedule;\n }\n\n public canShowColoredYarnSet(coloredYarnSetIndex: number): boolean {\n return (this.isShowingSkeletonView() && coloredYarnSetIndex < 1) || !this.isShowingSkeletonView();\n }\n\n public hasChosenMachineQuality(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.productionSchedule.machineQuality);\n }\n\n public hasListOfMachineQualityCustomSettings(): boolean {\n return this.listOfMachineQualityCustomSettings.length > 0;\n }\n\n public validateForms(): boolean {\n const forms: FormGroup[] = [this.productionScheduleInitialPreparationsForm];\n\n if (!AssertionUtils.isNullOrUndefined(this.initialPreparationsAdditionalOptionsComponent)) {\n forms.push(this.initialPreparationsAdditionalOptionsComponent.additionalOptionsForm);\n }\n\n if (!AssertionUtils.isNullOrUndefined(this.productionSchedule.pathLabelInformation) && this.pathLabelsComponent.pathLabelsForm.enabled) {\n forms.push(this.pathLabelsComponent.pathLabelsForm);\n }\n\n if (this.canValidateJuteForm()) {\n forms.push(this.juteOptionsComponent.juteForm);\n }\n\n if (!AssertionUtils.isNullOrUndefined(this.qualityLinkedSettingsComponent)) {\n forms.push(this.qualityLinkedSettingsComponent.qualityLinkedSettingsForm);\n }\n\n return new FormValidationHelper().checkForms(forms, this.document, this.changeDetectorRef);\n }\n\n public canShowDisabledFormInputs(): boolean {\n return this.isProductionScheduleRelatedToRunOrBeingDecreated() || this.isAddingProductionOrderForProductConfiguration();\n }\n\n public canSelectProductConfiguration(): boolean {\n return this.currentSubscription?.hasPermission(Permission.TEXEDIT_CADCAM_PRODUCT_CONFIGURATION_VIEW) ?? false;\n }\n\n public canInsertPathLabels(): boolean {\n return (\n !AssertionUtils.isNullOrUndefined(this.productionSchedule.pathLabelInformation) &&\n (this.productionSchedule.pathLabelInformation.hasAddedPathLabelBefore() || this.productionSchedule.pathLabelInformation.hasAddedPathLabelAfter())\n );\n }\n\n public hasAddPathLabelPermission(): boolean {\n return this.currentSubscription?.hasPermission(this.addPathLabelPermission);\n }\n\n public isProductionScheduleRelatedToRunOrBeingDecreated(): boolean {\n return this.productionSchedule.isRelatedToRun() || this.productionSchedule.isBeingDecreated();\n }\n\n public applySuggestionForProductionScheduleName(suggestion: string): void {\n this.productionScheduleInitialPreparationsForm.controls.name.setValue(suggestion);\n }\n\n public canShowJuteOptions(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.productionSchedule.machineQuality) && this.productionSchedule.canAddJute;\n }\n\n public openCreelMap(): void {\n this.isViewingCreelMap = true;\n this.hideParentHeader.emit(true);\n }\n\n public closeCreelMap(): void {\n this.isViewingCreelMap = false;\n this.hideParentHeader.emit(false);\n }\n\n public getCreelMap(): CreelMap[] {\n return this.productionSchedule?.mappingForCurrentPositionOnMachine?.length === 0 || AssertionUtils.isNullOrUndefined(this.productionSchedule?.mappingForCurrentPositionOnMachine)\n ? this.createActiveCreelMap()\n : this.productionSchedule.mappingForCurrentPositionOnMachine;\n }\n\n public saveCreelMap(activeCreelMap: CreelMap[]): void {\n this.productionSchedule.mappingForCurrentPositionOnMachine = activeCreelMap;\n this.closeCreelMap();\n }\n\n public getColorList(coloredYarnSet: OverviewListColoredYarnSet): OverviewListColoredYarnSet {\n return getMappedColoredYarnSet(\n coloredYarnSet,\n this.getCreelMap()?.find((creelMap: CreelMap) => creelMap.coloredYarnSetId === coloredYarnSet.id),\n 'asc'\n );\n }\n\n public getCreelMapping(coloredYarnSet: OverviewListColoredYarnSet): CreelMap {\n return this.getCreelMap()?.find((creelMap: CreelMap) => creelMap.coloredYarnSetId === coloredYarnSet.id);\n }\n\n public selectProductConfiguration(): void {\n this.dialogBuilderForBasicDialog\n .openSelectGridDialog(SelectProductConfigurationComponent, {machineId: this.selectedMachine.id})\n .pipe(\n switchMap((result: {productConfiguration: SelectListProductConfiguration; version: number}) => {\n return result\n ? forkJoin([\n this.productConfigurations.getById(result.productConfiguration.id),\n of(result.productConfiguration.versionHistories.find((versionHistory: VersionHistory) => versionHistory.version === result.version))\n ])\n : EMPTY;\n }),\n takeUntil(this.unSubscribeOnViewDestroy)\n )\n .subscribe(([productConfiguration, selectedVersionHistory]: [ProductConfiguration, SelectListProductConfigurationVersionHistory]) => {\n if (productConfiguration.designs) {\n this.productionSchedule.designs = productConfiguration.designs;\n }\n\n this.productionScheduleInitialPreparationsForm.controls.productConfiguration.setValue(\n new ProductionScheduleProductConfiguration(productConfiguration.id, productConfiguration.name, selectedVersionHistory.version)\n );\n\n this.getAndAssignMachineQualityToProductionSchedule(selectedVersionHistory.weaveQuality.id);\n });\n }\n\n public removeProductConfiguration(): void {\n this.productionScheduleInitialPreparationsForm.controls.productConfiguration.setValue(null);\n this.productionSchedule.designs = [];\n }\n\n public removeFinishing(): void {\n this.initialPreparationsAdditionalOptionsComponent?.removeFinishing();\n this.productionSchedule.finishing = null;\n }\n\n public removeBuggy(): void {\n this.productionScheduleInitialPreparationsForm.controls.buggy.setValue(null);\n this.productionSchedule.buggy = undefined;\n }\n\n public canShowProductConfigurationDisabledFormInput(): boolean {\n return !this.productionSchedule.isRelatedToRun() && !AssertionUtils.isNullOrUndefined(this.productionScheduleInitialPreparationsForm.value.productConfiguration);\n }\n\n public onPathZoneLoaded(): void {\n this.pathZoneLoaded.emit();\n this.juteZoneLoaded.emit();\n }\n\n public getWeaveQualityType(): WeaveQualityType {\n return this.selectedMachine.type === MachineType.VELVET ? WeaveQualityType.VELVET : WeaveQualityType.CARPET;\n }\n\n private canValidateJuteForm(): boolean {\n const juteForm = this.juteOptionsComponent?.juteForm;\n if (AssertionUtils.isNullOrUndefined(juteForm)) {\n return false;\n }\n\n const beforePathLabelChecked = this.juteOptionsComponent.juteForm.get('hasJuteBefore').value;\n const afterPathLabelChecked = this.juteOptionsComponent.juteForm.get('hasJuteAfter').value;\n\n if (beforePathLabelChecked && afterPathLabelChecked) {\n return true;\n }\n\n if (beforePathLabelChecked || afterPathLabelChecked) {\n juteForm.markAllAsTouched();\n juteForm.get(beforePathLabelChecked ? 'juteBefore' : 'juteAfter').updateValueAndValidity();\n juteForm.get('pattern').updateValueAndValidity();\n return false;\n }\n\n return false;\n }\n\n private createActiveCreelMap(): CreelMap[] {\n return this.productionSchedule.coloredYarnSets.map((coloredYarnSetsWithStartDent: OverviewListColoredYarnSetWithStartDent) => {\n return {\n coloredYarnSetId: coloredYarnSetsWithStartDent.coloredYarnSet.id,\n creelPositions: coloredYarnSetsWithStartDent.coloredYarnSet.overviewListColorSet.creelPositions.map((creelPosition: OverviewListCreelPosition) => {\n return {\n creelPosition: creelPosition.position,\n currentPositionOnMachine: creelPosition.position\n };\n })\n } as CreelMap;\n });\n }\n\n private selectCreelFromPossibleCreels(): void {\n this.dialogBuilderForBasicDialog\n .openSelectGridDialog(SelectCreelComponent, {\n creels: this.possibleCreelsForCurrentMachine,\n machineId: this.selectedMachine.id,\n title: this.translate.instant('GENERAL.ACTIONS.SELECT_OBJECT', {object: this.translate.instant('TEXTILE_DATA.CREEL.CREEL', {count: 1}).toLowerCase()})\n })\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((selectedCreels: OverviewListCreel[]) => {\n if (selectedCreels?.length > 0) {\n this.setCreel(selectedCreels[0]);\n }\n });\n }\n\n private setCreel(creel: OverviewListCreel): void {\n this.assignCreelToProductionSchedule(creel);\n this.formValuesChanged.emit();\n this.notifyChangesToInitialPreparationsForm(true);\n }\n\n private selectMachineQualityFromPossibleMachineQualities(): void {\n this.dialogBuilderForBasicDialog\n .openSelectGridDialog(SelectMachineQualityComponent, {\n title: this.translate.instant('GENERAL.ACTIONS.SELECT_OBJECT', {\n object: this.translate.instant('GENERAL.POSSIBLE_OBJECTS', {objects: this.translate.instant('TEXTILE_DATA.MACHINE_QUALITY.MACHINE_QUALITY', {count: 2})}).toLowerCase()\n }),\n rowSelection: AgGridRowSelection.SINGLE,\n allowEmptySelection: false,\n machineId: this.selectedMachine.id\n })\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((selectedWeaveQualities: OverviewListMachineQuality[]) => {\n if (selectedWeaveQualities?.length > 0) {\n const selectedWeaveQuality = selectedWeaveQualities[0];\n this.setQuality(selectedWeaveQuality);\n }\n });\n }\n\n private setQuality(quality: OverviewListMachineQuality): void {\n if (this.productionSchedule.machineQuality?.id !== quality.id) {\n this.oldMachineQuality = this.productionSchedule.machineQuality;\n this.productionSchedule.productionSchedulePathsOfColoredYarnSets = [];\n this.removeProductConfiguration();\n this.removeFinishing();\n\n this.getAndAssignMachineQualityToProductionSchedule(quality.id, quality.canAddJute);\n } else {\n this.productionScheduleInitialPreparationsForm.controls.machineQuality.setValue(this.productionSchedule.machineQuality);\n }\n\n this.productionScheduleInitialPreparationsForm.get('buggy').enable();\n }\n\n private initialiseProductionSchedule(): void {\n this.isCreatingNewProductionSchedule() ? this.initialiseNewProductionSchedule() : this.initialiseExistingProductionSchedule();\n }\n\n private isCreatingNewProductionSchedule(): boolean {\n return ObjectUtils.isDeepEqual(this.productionSchedule, ProductionSchedule.createEmptyProductionSchedule()) && !this.isEditingProductionOrder() && !this.isDuplicatingProductionOrder();\n }\n\n private adjustDefaultFinishingsForProductionScheduleItems(oldFinishingForProductionSchedule: FinishingForProductionSchedule): void {\n this.productionSchedule.productionSchedulePathsOfColoredYarnSets.forEach((productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet) => {\n productionSchedulePathsOfColoredYarnSet.productionSchedulePaths.forEach((productionSchedulePath: ProductionSchedulePath) => {\n productionSchedulePath.pathGroups.forEach((productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup) => {\n if (productionScheduleItemInPathGroup.drawing.drawingType === DrawingType.BMP) {\n const bmpDrawingInPathGroup: BmpProductionScheduleItemInPathGroup = productionScheduleItemInPathGroup as any as BmpProductionScheduleItemInPathGroup;\n if (ObjectUtils.isDeepEqual(bmpDrawingInPathGroup.finishing, oldFinishingForProductionSchedule)) {\n bmpDrawingInPathGroup.changeFinishing(this.productionSchedule.finishing);\n }\n }\n });\n });\n });\n }\n\n private setFormFields(): void {\n this.productionScheduleInitialPreparationsForm.controls.name.setAsyncValidators(\n AsyncUniqueValidator.createValidator(this.productionSchedules, !this.isCreatingNewProductionSchedule() ? this.productionSchedule.name : null)\n );\n\n const practicalPickDensityUnit: Unit = Unit[this.getDefaultParameterForPropertyNameOfMachineQualitySettings('pickDensityUnit').propertyValue as string];\n let practicalPickDensityInPicksInUnit = convertUnit({\n from: {\n value: this.productionSchedule.practicalPickDensityInPicksPerMM,\n unit: Unit.PICKS_PER_MILLIMETER\n },\n to: practicalPickDensityUnit\n });\n\n this.productionScheduleInitialPreparationsForm.controls.practicalPickDensity.setValue(practicalPickDensityInPicksInUnit);\n this.productionScheduleInitialPreparationsForm.controls.productConfiguration.setValue(this.productionSchedule.productConfiguration);\n this.productionScheduleInitialPreparationsForm.controls.buggy.setValue(this.productionSchedule.buggy);\n\n if (this.areAllFieldsDisabled) {\n this.productionScheduleInitialPreparationsForm.disable();\n }\n\n setTimeout(() => {\n this.productionScheduleInitialPreparationsForm.controls.name.updateValueAndValidity();\n this.productionScheduleInitialPreparationsForm.controls.name.valueChanges.pipe(takeUntil(this.unSubscribeOnViewDestroy), distinctUntilChanged(), debounceTime(500)).subscribe(() => {\n this.formValuesChanged.emit();\n });\n });\n\n this.productionScheduleInitialPreparationsFormSubject = this.productionScheduleInitialPreparationsForm.valueChanges.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe(() => {\n const isDirty: boolean = this.productionScheduleInitialPreparationsForm.dirty;\n if (isDirty) {\n this.notifyChangesToInitialPreparationsForm(isDirty);\n }\n });\n\n this.productionScheduleInitialPreparationsForm.valueChanges.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe(() => {\n this.productionScheduleNameGenerationView = {\n creelName: this.productionScheduleInitialPreparationsForm.value.creel?.name,\n machineName: this.productionScheduleInitialPreparationsForm.value.machine?.name,\n machineQualityName: this.productionScheduleInitialPreparationsForm.value.machineQuality?.technicalName,\n buggyName: this.productionScheduleInitialPreparationsForm.value.buggy?.name\n };\n });\n }\n\n private canSelectMachine(selectedMachine: MachineSummary): boolean {\n return !AssertionUtils.isNullOrUndefined(selectedMachine) && !ObjectUtils.isDeepEqual(this.selectedMachine, selectedMachine);\n }\n\n public assignMachineToProductionSchedule(selectedMachine: MachineSummary): void {\n if (this.canSelectMachine(selectedMachine)) {\n this.productionScheduleInitialPreparationsForm.controls.practicalPickDensity.setValue(null);\n\n this.possibleCreelsForCurrentMachine = null;\n this.possibleQualitiesForCurrentMachine = null;\n\n this.selectedMachine = selectedMachine;\n this.productionSchedule.machine = selectedMachine;\n this.productionScheduleInitialPreparationsForm.controls.machine.setValue(selectedMachine);\n this.productionSchedule.hmiVersion = selectedMachine.hmiVersion;\n\n forkJoin([\n this.productionOrders.getInitialOptionsForMachine(selectedMachine.id),\n this.creels.getPossibleCreelsForMachine(selectedMachine.id),\n this.machineQualities.getPossibleMachineQualitiesForMachine(this.selectedMachine.id)\n ])\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe(([initialOptionsForProductionOrder, creels, machineQualities]: [InitialOptionsForProductionOrder, OverviewListCreel[], WeaveQuality[]]) => {\n this.possibleCreelsForCurrentMachine = creels;\n this.possibleQualitiesForCurrentMachine = machineQualities;\n this.updateCanHaveRestAndFreeZonesAndPathLabels();\n\n if (!this.productionSchedule.hasOrderLines()) {\n const activeMachineQuality = machineQualities?.find((machineQuality: WeaveQuality) => {\n return machineQuality.id === initialOptionsForProductionOrder.activeMachineQualityId;\n });\n if (AssertionUtils.isNullOrUndefined(activeMachineQuality)) {\n this.productionScheduleInitialPreparationsForm.get('buggy').disable();\n } else {\n this.productionScheduleInitialPreparationsForm.get('buggy').enable();\n }\n\n this.assignMachineQualityToProductionSchedule(activeMachineQuality);\n this.changeDetectorRef.detectChanges();\n }\n\n this.setEmptyPropertiesFromInitialOptions(this.productionSchedule.machineQuality, initialOptionsForProductionOrder);\n });\n }\n }\n\n private setEmptyPropertiesFromInitialOptions(machineQuality: MachineQualityForProductionSchedule, initialOptionsForProductionOrder: InitialOptionsForProductionOrder): void {\n if (!AssertionUtils.isNullOrUndefined(machineQuality)) {\n this.getConversionFactorsForMachineQuality(machineQuality).subscribe({\n next: () => {\n this.updateMachineQualityDependentInitialSettingsForProductionSchedule(initialOptionsForProductionOrder);\n },\n error: (error: Error) => {\n this.assignMachineQualityToProductionSchedule(null);\n throw error;\n }\n });\n } else {\n this.getActiveCreelFromListOfPossibleCreelsAndAssignToProductionSchedule(initialOptionsForProductionOrder?.activeCreelId, initialOptionsForProductionOrder?.mappingForCurrentPositionOnMachine);\n }\n }\n\n private getConversionFactorsForMachineQuality(machineQuality: MachineQualityForProductionSchedule): Observable {\n return forkJoin([\n this.machineQualities.getFactorForConversionFromMillimetersToDents(machineQuality.id),\n this.machineQualities.getFactorForConversionFromDentsToMillimeters(machineQuality.id),\n this.machineQualities.getFactorForConversionFromPicksToMillimeters(machineQuality.id),\n this.machineQualities.getFactorForConversionFromMillimetersToPicks(machineQuality.id),\n this.machineQualities.getPathWidths(machineQuality.id)\n ]).pipe(\n tap(\n ([factorForConversionFromMillimetersToDents, factorForConversionFromDentsToMillimeters, factorForConversionFromPicksToMillimeters, factorForConversionFromMillimetersToPicks, pathWidths]: [\n number,\n number,\n number,\n number,\n PathWidth[]\n ]) => {\n this.factorForConversionFromMillimetersToDents = factorForConversionFromMillimetersToDents;\n this.factorForConversionFromDentsToMillimeters = factorForConversionFromDentsToMillimeters;\n this.factorForConversionFromPicksToMillimeters = factorForConversionFromPicksToMillimeters;\n this.factorForConversionFromMillimetersToPicks = factorForConversionFromMillimetersToPicks;\n this.pathWidths = pathWidths;\n this.productionSchedulePlan.applyMeasurementsCalculationsFactor(factorForConversionFromMillimetersToDents);\n }\n ),\n takeUntil(this.unSubscribeOnViewDestroy)\n );\n }\n\n private adjustObjectsThatDependsOnMachineQuality(machineQuality: MachineQualityForProductionSchedule): void {\n if (!AssertionUtils.isNullOrUndefined(machineQuality)) {\n this.getConversionFactorsForMachineQuality(machineQuality)\n .pipe(\n switchMap(() => this.productionOrders.getInitialOptionsForMachineAndMachineQuality(this.selectedMachine.id, machineQuality.id, machineQuality.reedDensity)),\n takeUntil(this.unSubscribeOnViewDestroy)\n )\n .subscribe({\n next: (initialOptionsForProductionOrder: InitialOptionsForProductionOrder) => {\n this.updateMachineQualityDependentInitialSettingsForProductionSchedule(initialOptionsForProductionOrder);\n },\n error: (error: Error) => {\n this.assignMachineQualityToProductionSchedule(null);\n throw error;\n }\n });\n }\n }\n\n private assignCreelToProductionSchedule(creel: OverviewListCreel): void {\n if (!AssertionUtils.isNullOrUndefined(creel)) {\n this.productionSchedule.creel = new CreelForProductionSchedule(creel.id, creel.name, creel.isColoredYarnSplitPositionedCorrectly);\n this.productionSchedule.coloredYarnSets = creel.coloredYarnSetsWithStartDent;\n this.productionSchedule.mappingForCurrentPositionOnMachine = creel.mappingForCurrentPositionOnMachine;\n this.productionSchedule.productionSchedulePathsOfColoredYarnSets = [];\n this.productionScheduleInitialPreparationsForm.controls.creel.setValue(creel);\n this.checkIsColoredYarnSetSplitPositionedCorrectly(this.productionSchedule.creel);\n } else {\n this.productionSchedule.creel = null;\n this.productionSchedule.coloredYarnSets = [];\n this.productionSchedule.mappingForCurrentPositionOnMachine = null;\n }\n\n this.isLoadingMachineQualityAndCreel = false;\n this.finishLoadingProductionScheduleWithSuggestion();\n }\n\n private initialiseExistingProductionSchedule(): void {\n if (this.isEditingProductionOrder() || this.isDuplicatingProductionOrder()) {\n this.isLoadingProductionSchedule = true;\n this.selectedMachine = this.productionSchedule.machine;\n\n if (!this.productionSchedule.isProductionScheduleWithEmptyContent()) {\n this.setFormFields();\n this.updateMachineQualityDependentSettingsForExistingProductionSchedule();\n this.checkIsColoredYarnSetSplitPositionedCorrectly(this.productionSchedule.creel);\n } else {\n this.setFormFields();\n this.adjustObjectsThatDependsOnMachineQuality(this.productionSchedule.machineQuality);\n }\n } else {\n this.setFormFields();\n\n this.selectedMachine = this.productionSchedule.machine;\n\n if (!AssertionUtils.isNullOrUndefined(this.productionSchedule.machineQuality)) {\n this.updateMachineQualityDependentSettingsForExistingProductionSchedule();\n this.adjustObjectsThatDependsOnMachineQuality(this.productionSchedule.machineQuality);\n } else if (AssertionUtils.isNullOrUndefined(this.productionSchedule.machineQuality) && AssertionUtils.isNullOrUndefined(this.productionSchedule.creel)) {\n this.selectedMachine = null;\n this.assignMachineToProductionSchedule(this.productionSchedule.machine);\n }\n }\n }\n\n private updateMachineQualityDependentSettingsForExistingProductionSchedule(): void {\n this.getConversionFactorsForMachineQuality(this.productionSchedule.machineQuality)\n .pipe(\n switchMap(() =>\n this.productionOrders.getInitialOptionsForMachineAndMachineQuality(this.selectedMachine.id, this.productionSchedule.machineQuality.id, this.productionSchedule.machineQuality.reedDensity)\n ),\n takeUntil(this.unSubscribeOnViewDestroy)\n )\n .subscribe((initialOptionsForProductionOrder: InitialOptionsForProductionOrder) => {\n this.defaultPathLabelInformation = initialOptionsForProductionOrder.initialPathLabel;\n this.defaultInitialRestZones = initialOptionsForProductionOrder.initialRestZones;\n\n this.finishLoadingProductionScheduleWithSuggestion();\n\n if (!this.canShowJuteOptions()) {\n this.juteZoneLoaded.emit();\n }\n\n if (!this.canInsertPathLabels()) {\n this.pathZoneLoaded.emit();\n }\n\n if (!AssertionUtils.isNullOrUndefined(this.defaultInitialRestZones.pattern)) {\n this.restZoneLoaded.emit();\n }\n });\n }\n\n private updateMachineQualityDependentInitialSettingsForProductionSchedule(initialOptionsForProductionOrder: InitialOptionsForProductionOrder): void {\n if (AssertionUtils.isNullOrUndefined(this.productionSchedule.finishing)) {\n this.productionSchedule.finishing = initialOptionsForProductionOrder.finishing;\n }\n\n if (\n AssertionUtils.isNullOrUndefined(this.productionSchedule.pathLabelInformation) &&\n !AssertionUtils.isNullOrUndefined(initialOptionsForProductionOrder.initialPathLabel) &&\n (initialOptionsForProductionOrder.initialPathLabel.pathLabelInformationBefore?.nameGenerator?.parts.length > 0 ||\n initialOptionsForProductionOrder.initialPathLabel.pathLabelInformationAfter?.nameGenerator?.parts.length > 0)\n ) {\n this.productionSchedule.pathLabelInformation = new PathLabelInformation(\n initialOptionsForProductionOrder.initialPathLabel.pathLabelInformationAfter,\n initialOptionsForProductionOrder.initialPathLabel.pathLabelInformationBefore,\n initialOptionsForProductionOrder.initialPathLabel.fontSettings,\n initialOptionsForProductionOrder.initialPathLabel.labelHeightInMM,\n initialOptionsForProductionOrder.initialPathLabel.labelHeightInPicks,\n this.customSettings?.pathLabel.fontSizeInMM,\n initialOptionsForProductionOrder.initialPathLabel.pattern\n );\n\n this.defaultPathLabelInformation = initialOptionsForProductionOrder.initialPathLabel;\n }\n\n this.updateJuteAndZones(initialOptionsForProductionOrder);\n\n const practicalPickDensityUnit: Unit = Unit[this.getDefaultParameterForPropertyNameOfMachineQualitySettings('pickDensityUnit').propertyValue as string];\n const practicalPickDensityInPicksPerMM = AssertionUtils.isNumber(initialOptionsForProductionOrder.practicalPickDensityInPicksPerMM)\n ? initialOptionsForProductionOrder.practicalPickDensityInPicksPerMM\n : this.productionSchedule.machineQuality.practicalPickDensity;\n const practicalPickDensityInCustomUnit: number = convertUnit({\n from: {\n value: practicalPickDensityInPicksPerMM,\n unit: Unit.PICKS_PER_MILLIMETER\n },\n to: practicalPickDensityUnit\n });\n this.productionScheduleInitialPreparationsForm.controls.practicalPickDensity.setValue(practicalPickDensityInCustomUnit);\n\n if ((!this.isAddingProductionOrderForRun() && initialOptionsForProductionOrder.activeCreelId) || this.isAddingProductionOrderForProductConfiguration()) {\n this.productionSchedule.mappingForCurrentPositionOnMachine = initialOptionsForProductionOrder.mappingForCurrentPositionOnMachine;\n\n if (this.possibleCreelsForCurrentMachine) {\n this.getActiveCreelFromListOfPossibleCreelsAndAssignToProductionSchedule(initialOptionsForProductionOrder.activeCreelId, initialOptionsForProductionOrder.mappingForCurrentPositionOnMachine);\n }\n }\n\n this.finishLoadingProductionScheduleWithSuggestion();\n this.changeDetectorRef.detectChanges();\n\n if (!this.canInsertPathLabels()) {\n this.pathZoneLoaded.emit();\n\n const juteInformation = this.productionSchedule.juteInformation;\n\n if (AssertionUtils.isNullOrUndefined(juteInformation?.juteBefore) && AssertionUtils.isNullOrUndefined(juteInformation?.juteAfter)) {\n this.juteZoneLoaded.emit();\n }\n }\n\n if (!this.canShowJuteOptions()) {\n this.juteZoneLoaded.emit();\n }\n }\n\n private updateJuteAndZones(initialOptionsForProductionOrder: InitialOptionsForProductionOrder): void {\n if (AssertionUtils.isNullOrUndefined(this.productionSchedule.juteInformation)) {\n this.productionSchedule.juteInformation = initialOptionsForProductionOrder.initialJute;\n }\n if (AssertionUtils.isNullOrUndefined(this.productionSchedule.initialFreeZones)) {\n this.productionSchedule.initialFreeZones = initialOptionsForProductionOrder.initialFreeZones;\n }\n if (AssertionUtils.isNullOrUndefined(this.productionSchedule.initialRestZones)) {\n this.productionSchedule.initialRestZones = initialOptionsForProductionOrder.initialRestZones;\n }\n if (AssertionUtils.isNullOrUndefined(this.defaultInitialRestZones)) {\n this.defaultInitialRestZones = cloneDeep(initialOptionsForProductionOrder.initialRestZones);\n }\n }\n\n private initialiseNewProductionSchedule(): void {\n this.setFormFields();\n\n let request: Observable;\n\n if (this.isAddingProductionOrderForMachine()) {\n request = this.getRequestForProductionOrderForMachine();\n } else if (this.isAddingProductionOrderForRun()) {\n request = this.getRequestForProductionOrderForRun();\n } else if (this.isAddingProductionOrderForProductConfiguration()) {\n request = this.getRequestForProductionOrderForProductConfiguration();\n }\n\n if (this.isAddingProductionOrderForType()) {\n this.isLoadingMachineQualityAndCreel = true;\n\n request?.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe((results: [MachineSummary, WeaveQuality, OverviewListCreel, ProductConfiguration]) => {\n this.initialiseProductionScheduleForType(...results);\n });\n }\n }\n\n public initialiseProductionScheduleForType(machine: MachineSummary, machineQuality: WeaveQuality, creel: OverviewListCreel, productConfiguration: ProductConfiguration): void {\n this.selectedMachine = machine;\n this.productionSchedule.machine = machine;\n this.productionScheduleInitialPreparationsForm.controls.machine.setValue(machine);\n this.productionSchedule.hmiVersion = machine.hmiVersion;\n\n const hasMachineQuality = !AssertionUtils.isNullOrUndefined(machineQuality);\n const hasCreel = !AssertionUtils.isNullOrUndefined(creel);\n\n if (hasMachineQuality) {\n this.assignMachineQualityToProductionSchedule(machineQuality);\n }\n\n if (hasCreel) {\n this.assignCreelToProductionSchedule(creel);\n }\n\n if (!AssertionUtils.isNullOrUndefined(productConfiguration)) {\n const version = productConfiguration.versionHistories.find((versionHistory: VersionHistory) => versionHistory.readyForProduction)?.version ?? productConfiguration.versionHistories[0].version;\n this.productionScheduleInitialPreparationsForm.controls.productConfiguration.setValue(new ProductionScheduleProductConfiguration(productConfiguration.id, productConfiguration.name, version));\n\n if (productConfiguration.designs) {\n this.productionSchedule.designs = productConfiguration.designs;\n }\n }\n\n forkJoin([\n this.isAddingProductionOrderForProductConfiguration() || this.isAddingProductionOrderForRun()\n ? this.productionOrders.getInitialOptionsForMachineAndMachineQuality(machine.id, machineQuality.id, machineQuality.reedDensityInDentsPerMM)\n : this.productionOrders.getInitialOptionsForMachine(machine.id),\n this.creels.getPossibleCreelsForMachine(machine.id),\n this.machineQualities.getPossibleMachineQualitiesForMachine(machine.id)\n ])\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe(([initialOptionsForProductionOrder, creels, machineQualities]: [InitialOptionsForProductionOrder, OverviewListCreel[], WeaveQuality[]]) =>\n this.setAdditionalOptionsForProductionOrderForType(hasMachineQuality, hasCreel, initialOptionsForProductionOrder, creels, machineQualities)\n );\n\n this.updateCanHaveRestAndFreeZonesAndPathLabels();\n }\n\n private setAdditionalOptionsForProductionOrderForType(\n hasMachineQuality: boolean,\n hasCreel: boolean,\n initialOptionsForProductionOrder: InitialOptionsForProductionOrder,\n creels: OverviewListCreel[],\n machineQualities: WeaveQuality[]\n ): void {\n this.possibleCreelsForCurrentMachine = creels;\n this.possibleQualitiesForCurrentMachine = machineQualities;\n\n const possibleMachineQualityFromInitialOptions = this.possibleQualitiesForCurrentMachine.find(\n (possibleMachineQuality: WeaveQuality) => possibleMachineQuality.id === initialOptionsForProductionOrder.activeMachineQualityId\n );\n if (!hasMachineQuality && !AssertionUtils.isNullOrUndefined(possibleMachineQualityFromInitialOptions)) {\n this.assignMachineQualityToProductionSchedule(possibleMachineQualityFromInitialOptions);\n }\n\n const possibleCreelFromInitialOptions = this.possibleCreelsForCurrentMachine.find((possibleCreel: OverviewListCreel) => possibleCreel.id === initialOptionsForProductionOrder.activeCreelId);\n if (!hasCreel && !AssertionUtils.isNullOrUndefined(possibleCreelFromInitialOptions)) {\n this.assignCreelToProductionSchedule(possibleCreelFromInitialOptions);\n } else if (hasCreel) {\n this.productionSchedule.coloredYarnSets =\n this.possibleCreelsForCurrentMachine.find((possibleCreel: OverviewListCreel) => possibleCreel.id === this.productionSchedule.creel.id)?.coloredYarnSetsWithStartDent ??\n this.possibleCreelsForCurrentMachine[0].coloredYarnSetsWithStartDent;\n\n this.productionSchedule.creel.isColoredYarnSplitPositionedCorrectly = this.possibleCreelsForCurrentMachine.find(\n (possibleCreel: OverviewListCreel) => possibleCreel.id === this.productionSchedule.creel.id\n )?.isColoredYarnSplitPositionedCorrectly;\n\n this.checkIsColoredYarnSetSplitPositionedCorrectly(this.productionSchedule.creel);\n }\n\n this.setEmptyPropertiesFromInitialOptions(this.productionSchedule.machineQuality, initialOptionsForProductionOrder);\n\n this.isLoadingMachineQualityAndCreel = false;\n }\n\n private getRequestForProductionOrderForMachine(): Observable {\n const machineId = this.activatedRoute.snapshot.params.id as number;\n\n return forkJoin([this.machines.getSummaryForMachine(machineId), of(null), of(null), of(null)]);\n }\n\n private getRequestForProductionOrderForRun(): Observable {\n const {runId, machineQualityId, creelId, machineId} = this.navigationHistory.getState() as {\n runId: number;\n machineQualityId: number;\n creelId: number;\n machineId: number;\n };\n\n if (AssertionUtils.isNullOrUndefined(runId) || AssertionUtils.isNullOrUndefined(machineQualityId) || AssertionUtils.isNullOrUndefined(machineId)) {\n this.router.navigateByUrl(NavigationUtils.getAbsolutePath(NavigationId.PLANNING));\n return of(null);\n }\n\n let getCreelMapForRun: Observable;\n if (this.authentication.getCurrentSubscription()?.hasPermission(Permission.TEXFAB_PLANNINGBOARD_NEW)) {\n getCreelMapForRun = this.planningPrototype.getCreelMapForRun(runId);\n } else {\n getCreelMapForRun = this.planning.getCreelMapForRun(runId);\n }\n\n return forkJoin([this.machines.getSummaryForMachine(machineId), this.machineQualities.getById(machineQualityId), this.creels.getById(creelId), getCreelMapForRun]).pipe(\n map(([machine, machineQuality, creel, mappingForCurrentPositionOnMachine]: [MachineSummary, WeaveQuality, OverviewListCreel, CreelMap[]]) => {\n creel.mappingForCurrentPositionOnMachine = mappingForCurrentPositionOnMachine;\n return [machine, machineQuality, creel, null];\n }),\n tap(() => {\n this.productionSchedule.runId = runId;\n })\n ) as Observable;\n }\n\n private getRequestForProductionOrderForProductConfiguration(): Observable {\n const productConfigurationId: number = this.activatedRoute.snapshot.params.id;\n\n const productConfigurationObservable = this.productConfigurations.getById(productConfigurationId);\n\n return forkJoin([\n productConfigurationObservable.pipe(switchMap((productConfiguration: ProductConfiguration) => this.machines.getSummaryForMachine(productConfiguration.machine.id))),\n productConfigurationObservable.pipe(switchMap((productConfiguration: ProductConfiguration) => this.machineQualities.getById(productConfiguration.quality.id))),\n of(null),\n productConfigurationObservable\n ])?.pipe(\n tap(() => {\n this.productionSchedule.isSample = true;\n })\n );\n }\n\n private finishLoadingProductionScheduleWithSuggestion(): void {\n this.finishLoadingProductionSchedule();\n this.refreshNameGeneration.next();\n }\n\n private finishLoadingProductionSchedule(): void {\n this.isLoadingProductionSchedule = false;\n\n const getFunctionsBasedOnDialogComponent = new Map([\n [SelectMachineQualityComponent, {loadNewItem: ({newItemId}: NavigationNewItemData): void => this.setNewQuality(newItemId), reopenDialog: (): void => this.selectAnotherMachineQuality()}],\n [SelectCreelComponent, {loadNewItem: ({newItemId}: NavigationNewItemData): void => this.setNewCreel(newItemId), reopenDialog: (): void => this.selectAnotherCreel()}],\n [SelectBuggyComponent, {loadNewItem: ({newItemId}: NavigationNewItemData): void => this.setNewBuggy(newItemId), reopenDialog: (): void => this.selectBuggy()}]\n ]);\n\n this.navigationHelperService.setNewItemOrReopenDialogIfPresent(\n ({newItemId}: NavigationNewItemData, {dialogComponent}: DialogComponentData) => getFunctionsBasedOnDialogComponent.get(dialogComponent).loadNewItem({newItemId}),\n ({dialogComponent}: DialogComponentData) => getFunctionsBasedOnDialogComponent.get(dialogComponent).reopenDialog()\n );\n\n this.showAdditionalOptions();\n }\n\n private setNewQuality(id: number): void {\n this.machineQualities\n .getPossibleMachineQualitiesForMachine(this.selectedMachine.id)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((possibleQualitiesForCurrentMachine: WeaveQuality[]) => {\n this.possibleQualitiesForCurrentMachine = possibleQualitiesForCurrentMachine;\n this.setQuality(OverviewListMachineQuality.fromCarpetWeaveQuality(possibleQualitiesForCurrentMachine.find((quality: WeaveQuality) => quality.id === id) as CarpetWeaveQuality));\n });\n }\n\n private setNewCreel(id: number): void {\n this.creels\n .getPossibleCreelsForMachine(this.selectedMachine.id)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((possibleCreelsForCurrentMachine: OverviewListCreel[]) => {\n this.possibleCreelsForCurrentMachine = possibleCreelsForCurrentMachine;\n this.setCreel(possibleCreelsForCurrentMachine.find((creel: OverviewListCreel) => creel.id === id));\n });\n }\n\n private setNewBuggy(id: number): void {\n this.buggies\n .getById(id)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((buggy: BuggyForProductionSchedule) => {\n this.productionSchedule.buggy = buggy;\n this.productionScheduleInitialPreparationsForm.controls.buggy.setValue(buggy);\n });\n }\n\n private showAdditionalOptions(): void {\n const {machineQuality, coloredYarnSets} = this.productionSchedule;\n this.canShowAdditionalOptions = !AssertionUtils.isNullOrUndefined(machineQuality) && coloredYarnSets.length > 0;\n\n if (this.canShowAdditionalOptions && this.dialogState?.dialogComponent === SelectFinishingComponent) {\n setTimeout(() => this.initialPreparationsAdditionalOptionsComponent.selectFinishing());\n }\n }\n\n private onMachineSelect(selectedMachine: Equipment): void {\n const hasSelectedNewMachine = !AssertionUtils.isNullOrUndefined(selectedMachine) && !this.hasChosenMachine();\n const hasSelectedAnotherMachine = !AssertionUtils.isNullOrUndefined(selectedMachine) && this.hasChosenMachine() && this.selectedMachine.id !== selectedMachine.id;\n\n if (!hasSelectedAnotherMachine) {\n this.productionScheduleInitialPreparationsForm.controls.machine.setValue(selectedMachine);\n }\n\n if (hasSelectedNewMachine || hasSelectedAnotherMachine) {\n this.canShowAdditionalOptions = false;\n this.possibleQualitiesForCurrentMachine = null;\n this.isLoadingMachineQualityAndCreel = true;\n\n this.machines\n .getSummaryForMachine(selectedMachine.id)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((machineSummaryOfSelectedMachine: MachineSummary) => {\n this.assignMachineToProductionSchedule(machineSummaryOfSelectedMachine);\n });\n\n this.formValuesChanged.emit();\n\n if (hasSelectedAnotherMachine && this.hasChosenMachine()) {\n this.notifyChangesToInitialPreparationsForm(true);\n }\n }\n }\n\n private notifyChangesToInitialPreparationsForm(value: boolean): void {\n if (!this.productionScheduleInitialPreparationsFormSubject?.closed) {\n this.addProductionSchedule.notifyChangesToInitialPreparationsForm(value);\n this.productionScheduleInitialPreparationsFormSubject?.unsubscribe();\n }\n }\n\n private getAndAssignMachineQualityToProductionSchedule(id: number, canAddJute: boolean = false, adjustObjectsThatDependsOnMachineQuality: boolean = true): void {\n this.machineQualities\n .getById(id)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((weaveQuality: WeaveQuality) => {\n this.assignMachineQualityToProductionSchedule(weaveQuality);\n\n this.productionSchedule.canAddJute = canAddJute ?? weaveQuality.canAddJute;\n\n if (adjustObjectsThatDependsOnMachineQuality) {\n this.adjustObjectsThatDependsOnMachineQuality(this.productionSchedule.machineQuality);\n\n this.formValuesChanged.emit();\n this.notifyChangesToInitialPreparationsForm(true);\n }\n });\n }\n\n private updateBuggyFormField(): void {\n this.productionScheduleInitialPreparationsForm.get('buggy').setValue(this.buggy);\n }\n\n private checkIsColoredYarnSetSplitPositionedCorrectly(currentCreel: CreelForProductionSchedule): void {\n this.canShowWarningForIncorrectSplittedCreel = !currentCreel.isColoredYarnSplitPositionedCorrectly;\n }\n\n private assignMachineQualityToProductionSchedule(activeWeaveQuality: WeaveQuality): void {\n this.productionSchedule.machineQuality = !AssertionUtils.isNullOrUndefined(activeWeaveQuality) ? MachineQualityForProductionSchedule.fromWeaveQuality(activeWeaveQuality) : null;\n this.productionScheduleInitialPreparationsForm.controls.machineQuality.setValue(activeWeaveQuality);\n this.productionSchedule.canAddJute = activeWeaveQuality?.canAddJute ?? false;\n\n if (!this.canShowJuteOptions()) {\n this.juteZoneLoaded.emit();\n }\n }\n\n private getActiveCreelFromListOfPossibleCreelsAndAssignToProductionSchedule(activeCreelId: number, mappingForCurrentPositionOnMachine: CreelMap[]): void {\n const creel = this.possibleCreelsForCurrentMachine.find((overviewListCreel: OverviewListCreel) => overviewListCreel.id === activeCreelId);\n\n if (creel) {\n creel.mappingForCurrentPositionOnMachine = mappingForCurrentPositionOnMachine;\n }\n\n this.assignCreelToProductionSchedule(creel);\n }\n\n private updateCanHaveRestAndFreeZonesAndPathLabels(): void {\n this.canHaveRestAndFreeZonesAndPathLabels = this.productionSchedule?.machine?.canHaveRestAndFreeZonesAndPathLabels();\n }\n\n private checkIfBuggyHasNameGeneration(): void {\n if (this.currentSubscription?.hasPermission(Permission.VIEW_BUGGIES) ?? false) {\n this.httpBuggyCustomSettings\n .get()\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((customSettings: CustomSettings) => {\n this.hasBuggyNameGeneration = customSettings?.nameGenerator?.parts?.length > 0;\n });\n }\n }\n}\n","import {Component, Inject} from '@angular/core';\nimport {MAT_DIALOG_DATA} from '@angular/material/dialog';\nimport {Router} from '@angular/router';\nimport {NavigationId} from '@application/helper/routing/navigation-id.enum';\nimport {NavigationUtils} from '@application/helper/routing/navigation-utils';\nimport {Observable, Subject} from 'rxjs';\nimport {PathContentSettingsDialogData} from './path-content-settings-dialog-data.interface';\n\n@Component({\n templateUrl: './path-content-settings-dialog.component.html'\n})\nexport class PathContentSettingsDialogComponent {\n private readonly optionChanged = new Subject();\n public pathContentPanelEnabled: boolean;\n\n public constructor(\n @Inject(MAT_DIALOG_DATA) public data: any,\n private readonly router: Router\n ) {\n this.pathContentPanelEnabled = data.pathContentPanelEnabled;\n }\n\n public getValue(): Observable {\n return this.optionChanged.asObservable();\n }\n\n public onPathContentPanelEnabledChanged(pathContentPanelEnabled: boolean): void {\n this.pathContentPanelEnabled = pathContentPanelEnabled;\n this.optionChanged.next({pathContentPanelEnabled: this.pathContentPanelEnabled} as PathContentSettingsDialogData);\n }\n\n public viewAllSettings(): void {\n this.router.navigateByUrl(NavigationUtils.getAbsolutePath(NavigationId.CARPET_PRODUCTION_SCHEDULE_SETTINGS));\n }\n}\n","
\n
\n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.PATH_CONTENT.PATH_CONTENT_PANEL' | bmsTranslate }}\n \n
\n\n \n
\n","
\n \n
\n
\n \n
\n\n","import {Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild} from '@angular/core';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionSchedulePhase} from '@domain/production-schedule/production-schedule-phase.enum';\nimport {BidirectionalMap, EnumUtils, ObjectUtils} from '@vdw/angular-component-library';\n\n@Component({\n selector: 'app-production-schedule-progress-new',\n templateUrl: './production-schedule-progress-new.component.html',\n styleUrls: ['./production-schedule-progress-new.component.scss']\n})\nexport class ProductionScheduleProgressNewComponent implements OnInit {\n private static readonly widthPerPhaseInPx = 80;\n @Input() public productionSchedule: ProductionSchedule;\n @Input() public productionSchedulePhase: ProductionSchedulePhase;\n @Input() public isScheduleCompleted: boolean;\n @Input() public areAllFieldsDisabled: boolean = false;\n @Output() public clickEvent = new EventEmitter();\n @ViewChild('phase') public phase: ElementRef;\n\n public get productionSchedulePhases(): ProductionSchedulePhase[] {\n return EnumUtils.getEnumValues(ProductionSchedulePhase).filter(\n (phase: ProductionSchedulePhase) => this.productionSchedulePhaseOrderMap.getValue(phase) < this.productionSchedulePhaseOrderMap.getValue(ProductionSchedulePhase.COMPLETE)\n ) as ProductionSchedulePhase[];\n }\n\n private readonly productionSchedulePhaseOrderMap = new BidirectionalMap([\n [ProductionSchedulePhase.PRESELECTION, 0],\n [ProductionSchedulePhase.CONFIGURE, 1],\n [ProductionSchedulePhase.BUILD, 2],\n [ProductionSchedulePhase.VERIFY, 3],\n [ProductionSchedulePhase.COMPLETE, 4]\n ]);\n\n public ngOnInit(): void {\n if (this.isScheduleCompleted) {\n this.phase.nativeElement.style = 'default';\n }\n }\n\n public canHoverOverItem(phase: ProductionSchedulePhase): boolean {\n return (\n ((this.isScheduleCompleted || this.areAllFieldsDisabled) && phase !== ProductionSchedulePhase.CONFIGURE && phase !== ProductionSchedulePhase.VERIFY) || phase === this.productionSchedulePhase\n );\n }\n\n public getWidthOfActiveTrack(): string {\n let result = `${this.productionSchedulePhaseOrderMap.getValue(this.productionSchedulePhase) * ProductionScheduleProgressNewComponent.widthPerPhaseInPx}px`;\n\n if (!ObjectUtils.isDeepEqual(this.productionSchedule, this.productionSchedulePhases[this.productionSchedulePhases.length - 1])) {\n const nextPhase = this.productionSchedulePhaseOrderMap.getValue(this.productionSchedulePhase) + 1;\n if (this.isActivePhase(this.productionSchedulePhaseOrderMap.getKey(nextPhase))) {\n result = `${nextPhase * ProductionScheduleProgressNewComponent.widthPerPhaseInPx}px`;\n }\n }\n\n return result;\n }\n\n public isActivePhase(phase: ProductionSchedulePhase): boolean {\n return this.productionSchedulePhaseOrderMap.getValue(phase) <= this.productionSchedulePhaseOrderMap.getValue(this.productionSchedulePhase);\n }\n\n public isCurrentPhase(phase: ProductionSchedulePhase): boolean {\n return this.productionSchedulePhaseOrderMap.getValue(phase) === this.productionSchedulePhaseOrderMap.getValue(this.productionSchedulePhase);\n }\n\n public getPhaseTranslationKey(phase: ProductionSchedulePhase): string {\n return `PRODUCTION_ORDER.PHASES.${ProductionSchedulePhase[phase]}`;\n }\n\n public getIconForPhase(phase: ProductionSchedulePhase): string {\n return ProductionSchedulePhase.getIcon(phase);\n }\n\n public phaseClicked(phase: ProductionSchedulePhase): void {\n if (\n (!this.isScheduleCompleted && !this.areAllFieldsDisabled) ||\n ((this.isScheduleCompleted || this.areAllFieldsDisabled) && (phase === ProductionSchedulePhase.CONFIGURE || phase === ProductionSchedulePhase.VERIFY))\n ) {\n this.clickEvent.emit(phase);\n }\n }\n}\n","
\n
\n 0\" class=\"vertical-divider\">\n
\n
\n \n
\n
\n \n
\n\n
\n \n
\n\n
\n \n \n \n \n \n
\n\n
\n \n
\n\n
\n \n \n\n
\n \n
\n\n \n\n
\n \n
\n\n
\n \n \n
\n\n
\n \n \n \n
\n \n
\n\n \n
\n\n\n\n
\n \n \n \n \n
\n
\n","import {AfterViewInit, Component, ElementRef, EventEmitter, Input, OnInit, Output, QueryList, ViewChild, ViewChildren} from '@angular/core';\nimport {MatMenuTrigger} from '@angular/material/menu';\nimport {ActivatedRoute} from '@angular/router';\nimport {HeaderIdentifier} from '@application/headers/header-identifier.enum';\nimport {RouteUtils} from '@application/helper/routing/route-utils';\nimport {Equipment} from '@domain/machine/equipment';\nimport {ProductionSchedulePhase} from '@domain/production-schedule/production-schedule-phase.enum';\nimport {ProductionScheduleStatus} from '@domain/production-schedule/production-schedule-status.enum';\nimport {MachineOverviewList} from '@presentation/pages/machine-overview/machine-overview-list';\nimport {AssertionUtils, DOMUtils, InputChipComponent, LocalStorageService, SaveTypeForProductionSchedule, skeletonViewAnimation} from '@vdw/angular-component-library';\nimport {Subscription, takeUntil, timer} from 'rxjs';\nimport {BaseAddProductionSchedulePageComponent, ProductionScheduleInitialPreparationsFormGroup} from '../base-add-production-schedule-page.component';\nimport {MenuItemsCanShowProperties} from './menu-items-can-show-properties.interface';\nimport {MenuItemsLoadingProperties} from './menu-items-loading-properties.interface';\nimport {PathContentSettingsDialogData} from './path-content-settings-dialog-data.interface';\nimport {PathContentSettingsDialogComponent} from './path-content-settings-dialog.component';\nimport {ProductionScheduleClickEvent} from './production-schedule-click-event.enum';\nimport {ProductionScheduleMenuItemChip} from './production-schedule-menu-item-chip.interface';\n\n@Component({\n selector: 'app-production-schedule-menu-items-new',\n templateUrl: './production-schedule-menu-items-new.component.html',\n styleUrls: ['./production-schedule-menu-items-new.component.scss'],\n animations: [skeletonViewAnimation('.button-skeleton-wrapper, text-skeleton-wrapper')]\n})\nexport class ProductionScheduleMenuItemsNewComponent extends BaseAddProductionSchedulePageComponent implements OnInit, AfterViewInit {\n @ViewChildren('chips') public inputChipComponents: QueryList;\n @ViewChild('verifyMenuTrigger', {read: MatMenuTrigger}) public verifyMenuTrigger: MatMenuTrigger;\n @ViewChild('saveMenuTrigger', {read: MatMenuTrigger}) public saveMenuTrigger: MatMenuTrigger;\n @ViewChild('chipsDivider') public chipsDividerElement: ElementRef;\n @ViewChild('chipContainer') public chipContainerElement: ElementRef;\n @ViewChild('menuItems') public menuItemsElement: ElementRef;\n @ViewChild('phaseDivider') public phaseDividerElement: ElementRef;\n @ViewChild('productionScheduleProgress') public productionScheduleProgressElement: ElementRef;\n @ViewChild('actions') public actionsElement: ElementRef;\n\n @Input() public loadingProperties: MenuItemsLoadingProperties;\n @Input() public productionScheduleInitialPreparationsForm: ProductionScheduleInitialPreparationsFormGroup;\n @Input() public productionSchedulePhase: ProductionSchedulePhase;\n @Input() public customErrorMessage: string;\n @Input() public canShowProperties: MenuItemsCanShowProperties;\n @Input() public pathContentSettingsDialogData: PathContentSettingsDialogData;\n @Input() public productionScheduleStatus: ProductionScheduleStatus;\n @Input() public areAllFieldsDisabled: boolean = false;\n @Output() public clickEvent = new EventEmitter();\n @Output() public productionSchedulePhaseClicked = new EventEmitter();\n @Output() public pathContentSettingsDialogDataChanged: EventEmitter = new EventEmitter();\n\n public saveMenuTimer: Subscription;\n public chips: ProductionScheduleMenuItemChip[] = [];\n public canShowProductionScheduleProgress = true;\n\n public readonly SAVE_TYPE = SaveTypeForProductionSchedule.SAVE;\n public readonly SAVE_AND_CREATE_NEW_TYPE = SaveTypeForProductionSchedule.SAVE_AND_CREATE_NEW;\n public readonly SAVE_AND_GO_TO_PRESELECTION_TYPE = SaveTypeForProductionSchedule.SAVE_AND_GO_TO_PRESELECTION;\n public readonly SAVE_AND_QUIT_TYPE = SaveTypeForProductionSchedule.SAVE_AND_QUIT;\n public readonly VERIFY_TRANSLATION_KEY = 'PRODUCTION_ORDER.PHASES.VERIFY';\n public readonly INITIAL_DATA_NOT_LOADED_TRANSLATION_KEY = 'PRODUCTION_ORDER.INITIAL_DATA_LOADING';\n public readonly SAVE = 'GENERAL.ACTIONS.SAVE';\n public readonly SAVE_AND_CREATE_NEW = 'PRODUCTION_ORDER.SAVE_AND_CREATE_NEW';\n public readonly SAVE_AND_GO_TO_PRESELECTION = 'PRODUCTION_ORDER.SAVE_AND_GO_TO_PRESELECTION';\n public readonly SAVE_AND_QUIT = 'PRODUCTION_ORDER.SAVE_AND_QUIT';\n\n public readonly pathContentSettingsDialogComponent = PathContentSettingsDialogComponent;\n\n private saveButtonClicked: boolean;\n private defaultSaveType: SaveTypeForProductionSchedule;\n\n private readonly HEADER_IDENTIFIER = HeaderIdentifier.ADD_PRODUCTION_SCHEDULE;\n private readonly LOCAL_STORAGE_SAVE_KEY = 'productionScheduleSaveType';\n private readonly GAP_WIDTH_IN_PX = 16;\n\n public constructor(\n private readonly localStorage: LocalStorageService,\n activatedRoute: ActivatedRoute\n ) {\n super(activatedRoute);\n }\n\n public ngOnInit(): void {\n this.productionScheduleInitialPreparationsForm.valueChanges.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe(() => this.setHeaderChips());\n\n if (this.localStorage.get(`${this.LOCAL_STORAGE_SAVE_KEY}.${this.HEADER_IDENTIFIER}`)) {\n this.defaultSaveType = this.localStorage.get(`${this.LOCAL_STORAGE_SAVE_KEY}.${this.HEADER_IDENTIFIER}`);\n } else {\n this.defaultSaveType = SaveTypeForProductionSchedule.SAVE;\n }\n }\n\n public ngAfterViewInit(): void {\n DOMUtils.observeResize(this.menuItemsElement.nativeElement)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe(() => this.setMenuItemsVisibility());\n\n DOMUtils.observeResize(this.actionsElement.nativeElement)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe(() => {\n setTimeout(() => this.setMenuItemsVisibility());\n });\n }\n\n public isRaisedButton(): boolean {\n return this.productionSchedulePhase === ProductionSchedulePhase.BUILD ? false : true;\n }\n\n public getLabelForNextButton(): string {\n switch (this.productionSchedulePhase) {\n case ProductionSchedulePhase.CONFIGURE:\n return 'PRODUCTION_ORDER.NAVIGATION.GO_TO_BUILDER';\n case ProductionSchedulePhase.PRESELECTION:\n return 'PRODUCTION_ORDER.NAVIGATION.CREATE_PRODUCTION_ORDERS';\n case ProductionSchedulePhase.BUILD:\n return this.VERIFY_TRANSLATION_KEY;\n case ProductionSchedulePhase.VERIFY:\n return 'GENERAL.ACTIONS.CONFIRM';\n default:\n if (this.loadingProperties?.isLoading) {\n return 'PRODUCTION_ORDER.NAVIGATION.TO_BUILD';\n }\n\n return '';\n }\n }\n\n public getLabelForSaveButton(): string {\n switch (this.defaultSaveType) {\n case SaveTypeForProductionSchedule.SAVE:\n return this.SAVE;\n case SaveTypeForProductionSchedule.SAVE_AND_CREATE_NEW:\n return this.SAVE_AND_CREATE_NEW;\n case SaveTypeForProductionSchedule.SAVE_AND_GO_TO_PRESELECTION:\n return this.SAVE_AND_GO_TO_PRESELECTION;\n case SaveTypeForProductionSchedule.SAVE_AND_QUIT:\n return this.SAVE_AND_QUIT;\n default:\n return this.SAVE;\n }\n }\n\n public waitingForInitialZonesToLoad(): boolean {\n if (this.productionSchedulePhase !== ProductionSchedulePhase.CONFIGURE || this.canShowProperties?.canShowInvalidFormMessageError) {\n return false;\n }\n\n const loadProperties = this.loadingProperties;\n const initialZonesLoaded = !(loadProperties?.initialRestZoneLoaded && loadProperties?.initialFreeZoneLoaded && loadProperties?.initialPathZoneLoaded && loadProperties?.initialJuteZoneLoaded);\n\n return initialZonesLoaded && this.saveButtonClicked;\n }\n\n public canShowToPreselectionButton(): boolean {\n return (\n (this.productionSchedulePhase === ProductionSchedulePhase.CONFIGURE && !this.areAllFieldsDisabled) ||\n (!AssertionUtils.isNullOrUndefined(this.loadingProperties?.isLoading) && this.loadingProperties?.isLoading)\n );\n }\n\n public canShowSaveMenuTrigger(): boolean {\n return (\n (this.productionSchedulePhase === ProductionSchedulePhase.BUILD || this.productionSchedulePhase === ProductionSchedulePhase.VERIFY) &&\n (this.productionScheduleStatus === ProductionScheduleStatus.DRAFT ||\n this.productionScheduleStatus === ProductionScheduleStatus.VERIFIED ||\n this.productionScheduleStatus === ProductionScheduleStatus.VERIFIED_WITH_WARNINGS ||\n this.productionScheduleStatus === ProductionScheduleStatus.VERIFIED_WITH_ERRORS)\n );\n }\n\n public toPreselectionClicked(): void {\n this.clickEvent.emit(ProductionScheduleClickEvent.PRESELECTION);\n }\n\n public nextPhaseClicked(): void {\n if (this.productionSchedulePhase !== ProductionSchedulePhase.PRESELECTION) {\n this.saveButtonClicked = true;\n }\n\n this.clickEvent.emit(ProductionScheduleClickEvent.NEXT_PHASE);\n }\n\n public completeClicked(): void {\n this.clickEvent.emit(ProductionScheduleClickEvent.COMPLETE);\n }\n\n public decreateClicked(): void {\n this.clickEvent.emit(ProductionScheduleClickEvent.DECREATE);\n }\n\n public cancelClicked(): void {\n this.clickEvent.emit(ProductionScheduleClickEvent.CANCEL);\n }\n\n public settingsButtonClicked(): void {\n this.clickEvent.emit(ProductionScheduleClickEvent.SETTINGS);\n }\n\n public mouseEnterSaveButton(): void {\n if (this.saveMenuTimer) {\n this.saveMenuTimer.unsubscribe();\n }\n\n this.saveMenuTrigger.openMenu();\n }\n\n public mouseLeaveSaveButton(): void {\n this.saveMenuTimer = timer(500).subscribe(() => this.saveMenuTrigger.closeMenu());\n }\n\n public hasSaveMenuButton(): boolean {\n return !this.isDefaultSaveType(SaveTypeForProductionSchedule.SAVE);\n }\n\n public hasSaveAndGoToPreselectionMenuButton(): boolean {\n return !this.isDefaultSaveType(SaveTypeForProductionSchedule.SAVE_AND_GO_TO_PRESELECTION);\n }\n\n public hasSaveAndCreateNewMenuButton(): boolean {\n return !this.isDefaultSaveType(SaveTypeForProductionSchedule.SAVE_AND_CREATE_NEW);\n }\n\n public hasSaveAndQuitMenuButton(): boolean {\n return !this.isDefaultSaveType(SaveTypeForProductionSchedule.SAVE_AND_QUIT);\n }\n\n public onProductionSchedulePhaseClicked(event: ProductionSchedulePhase): void {\n this.productionSchedulePhaseClicked.emit(event);\n }\n\n private isDefaultSaveType(saveType: SaveTypeForProductionSchedule): boolean {\n return saveType === this.defaultSaveType;\n }\n\n public save(saveType?: SaveTypeForProductionSchedule): void {\n if (!AssertionUtils.isNullOrUndefined(saveType)) {\n this.defaultSaveType = saveType;\n this.localStorage.set(`${this.LOCAL_STORAGE_SAVE_KEY}.${this.HEADER_IDENTIFIER}`, saveType);\n }\n\n if (saveType === SaveTypeForProductionSchedule.SAVE_AND_QUIT) {\n this.clickEvent.emit(ProductionScheduleClickEvent.SAVE_AND_QUIT);\n } else if (saveType === SaveTypeForProductionSchedule.SAVE_AND_CREATE_NEW) {\n this.clickEvent.emit(ProductionScheduleClickEvent.SAVE_AND_CREATE_NEW);\n } else if (saveType === SaveTypeForProductionSchedule.SAVE_AND_GO_TO_PRESELECTION) {\n this.clickEvent.emit(ProductionScheduleClickEvent.SAVE_AND_GO_TO_PRESELECTION);\n } else if (!AssertionUtils.isNullOrUndefined(this.defaultSaveType)) {\n if (this.defaultSaveType === SaveTypeForProductionSchedule.SAVE) {\n this.clickEvent.emit(ProductionScheduleClickEvent.SAVE);\n } else if (this.defaultSaveType === SaveTypeForProductionSchedule.SAVE_AND_CREATE_NEW) {\n this.clickEvent.emit(ProductionScheduleClickEvent.SAVE_AND_CREATE_NEW);\n } else if (this.defaultSaveType === SaveTypeForProductionSchedule.SAVE_AND_GO_TO_PRESELECTION) {\n this.clickEvent.emit(ProductionScheduleClickEvent.SAVE_AND_GO_TO_PRESELECTION);\n } else if (this.defaultSaveType === SaveTypeForProductionSchedule.SAVE_AND_QUIT) {\n this.clickEvent.emit(ProductionScheduleClickEvent.SAVE_AND_QUIT);\n }\n } else {\n this.clickEvent.emit(ProductionScheduleClickEvent.SAVE);\n }\n }\n\n public getDialogData(): PathContentSettingsDialogData {\n return {\n pathContentPanelEnabled: this.pathContentSettingsDialogData?.pathContentPanelEnabled\n } as PathContentSettingsDialogData;\n }\n\n public onOptionChanged(event: PathContentSettingsDialogData): void {\n this.pathContentSettingsDialogDataChanged.emit(event);\n }\n\n private setHeaderChips(): void {\n this.chips = [];\n\n const machine = this.productionScheduleInitialPreparationsForm.value.machine;\n if (machine) {\n this.chips.push({\n value: machine.name,\n url: RouteUtils.paths.texState.editMachine.absolutePath\n .replace(':machineType', `${(machine instanceof Equipment || machine instanceof MachineOverviewList ? machine.machineType : machine.type)?.toLowerCase()}`)\n .replace(':id', `${machine.id}`)\n });\n }\n\n const machineQuality = this.productionScheduleInitialPreparationsForm.value.machineQuality;\n if (machineQuality) {\n this.chips.push({value: machineQuality.technicalNameWithVersion, url: RouteUtils.paths.texStyle.machineQuality.editMachineQuality.absolutePath.replace(':id', `${machineQuality.id}`)});\n }\n\n const creel = this.productionScheduleInitialPreparationsForm.value.creel;\n if (creel) {\n this.chips.push({value: creel.name, url: RouteUtils.paths.texStyle.creel.editCreel.absolutePath.replace(':id', `${creel.id}`)});\n }\n\n setTimeout(() => this.setMenuItemsVisibility());\n }\n\n private setMenuItemsVisibility(): void {\n const reversedInputChips = this.inputChipComponents.toArray().reverse();\n reversedInputChips.forEach((inputChipComponent: InputChipComponent) => (inputChipComponent.elementRef.nativeElement as HTMLElement).classList.remove('hidden'));\n (this.chipsDividerElement.nativeElement as HTMLElement).classList.remove('hidden');\n (this.productionScheduleProgressElement.nativeElement as HTMLElement).classList.remove('hidden');\n (this.phaseDividerElement.nativeElement as HTMLElement).classList.remove('hidden');\n\n reversedInputChips.forEach((inputChipComponent: InputChipComponent, index: number) => {\n const inputChipElement = inputChipComponent.elementRef.nativeElement;\n const chipContainerElement = (this.chipContainerElement.nativeElement as HTMLElement).offsetWidth;\n if (this.getAvailableWidth(true) < chipContainerElement) {\n (inputChipElement as HTMLElement).classList.add('hidden');\n\n if (index === reversedInputChips.length - 1) {\n (this.chipsDividerElement.nativeElement as HTMLElement).classList.add('hidden');\n }\n }\n });\n\n const productionScheduleProgressElement = this.productionScheduleProgressElement.nativeElement;\n if (this.getAvailableWidth(false) < (productionScheduleProgressElement as HTMLElement).offsetWidth) {\n (productionScheduleProgressElement as HTMLElement).classList.add('hidden');\n (this.phaseDividerElement.nativeElement as HTMLElement).classList.add('hidden');\n }\n }\n\n private getAvailableWidth(includeProgressWidth: boolean): number {\n const menuItemsWidth = this.getMenuItemsWidth();\n const actionButtonsWidth = (this.actionsElement.nativeElement as HTMLElement).offsetWidth;\n const productionScheduleProgressWidth = (this.productionScheduleProgressElement.nativeElement as HTMLElement).offsetWidth;\n const progressDividerWidth = (this.phaseDividerElement.nativeElement as HTMLElement).offsetWidth;\n\n return includeProgressWidth\n ? menuItemsWidth - actionButtonsWidth - productionScheduleProgressWidth - progressDividerWidth - 4 * this.GAP_WIDTH_IN_PX\n : menuItemsWidth - actionButtonsWidth - 2 * this.GAP_WIDTH_IN_PX;\n }\n\n private getMenuItemsWidth(): number {\n return (this.menuItemsElement.nativeElement as HTMLElement).offsetWidth;\n }\n}\n","export enum VerifyType {\n VERIFY = 'VERIFY',\n VERIFY_AND_CONFIRM = 'VERIFY_AND_CONFIRM'\n}\n","
\n \n
\n
\n \n
\n\n","import {Component, EventEmitter, Input, Output} from '@angular/core';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionSchedulePhase} from '@domain/production-schedule/production-schedule-phase.enum';\nimport {BidirectionalMap, EnumUtils, ObjectUtils} from '@vdw/angular-component-library';\n\n@Component({\n selector: 'app-production-schedule-progress',\n templateUrl: './production-schedule-progress.component.html',\n styleUrls: ['./production-schedule-progress.component.scss']\n})\nexport class ProductionScheduleProgressComponent {\n private static readonly widthPerPhaseInPx = 80;\n @Input() public productionSchedule: ProductionSchedule;\n @Input() public productionSchedulePhase: ProductionSchedulePhase;\n @Output() public clickEvent = new EventEmitter();\n\n public get productionSchedulePhases(): ProductionSchedulePhase[] {\n const productionSchedulePhases = EnumUtils.getEnumValues(ProductionSchedulePhase).filter(\n (phase: ProductionSchedulePhase) => this.productionSchedulePhaseOrderMap.getValue(phase) < this.productionSchedulePhaseOrderMap.getValue(ProductionSchedulePhase.COMPLETE)\n ) as ProductionSchedulePhase[];\n [productionSchedulePhases[0], productionSchedulePhases[1]] = [productionSchedulePhases[1], productionSchedulePhases[0]];\n\n return productionSchedulePhases;\n }\n\n private readonly productionSchedulePhaseOrderMap = new BidirectionalMap([\n [ProductionSchedulePhase.CONFIGURE, 0],\n [ProductionSchedulePhase.PRESELECTION, 1],\n [ProductionSchedulePhase.BUILD, 2],\n [ProductionSchedulePhase.VERIFY, 3],\n [ProductionSchedulePhase.COMPLETE, 4]\n ]);\n\n public getWidthOfActiveTrack(): string {\n let result = `${this.productionSchedulePhaseOrderMap.getValue(this.productionSchedulePhase) * ProductionScheduleProgressComponent.widthPerPhaseInPx}px`;\n\n if (!ObjectUtils.isDeepEqual(this.productionSchedule, this.productionSchedulePhases[this.productionSchedulePhases.length - 1])) {\n const nextPhase = this.productionSchedulePhaseOrderMap.getValue(this.productionSchedulePhase) + 1;\n if (this.isActivePhase(this.productionSchedulePhaseOrderMap.getKey(nextPhase))) {\n result = `${nextPhase * ProductionScheduleProgressComponent.widthPerPhaseInPx}px`;\n }\n }\n\n return result;\n }\n\n public isActivePhase(phase: ProductionSchedulePhase): boolean {\n return this.productionSchedulePhaseOrderMap.getValue(phase) <= this.productionSchedulePhaseOrderMap.getValue(this.productionSchedulePhase);\n }\n\n public isCurrentPhase(phase: ProductionSchedulePhase): boolean {\n return this.productionSchedulePhaseOrderMap.getValue(phase) === this.productionSchedulePhaseOrderMap.getValue(this.productionSchedulePhase);\n }\n\n public getPhaseTranslationKey(phase: ProductionSchedulePhase): string {\n return `PRODUCTION_ORDER.PHASES.${ProductionSchedulePhase[phase]}`;\n }\n\n public getIconForPhase(phase: ProductionSchedulePhase): string {\n return ProductionSchedulePhase.getIcon(phase);\n }\n\n public phaseClicked(phase: ProductionSchedulePhase): void {\n this.clickEvent.emit(phase);\n }\n}\n","
\n
\n 0\" class=\"vertical-divider\">\n
\n
\n \n
\n
\n \n
\n\n
\n \n
\n\n
\n \n \n \n \n \n
\n\n
\n \n
\n\n
\n \n \n\n
\n \n
\n\n \n\n
\n \n \n \n
\n \n
\n \n
\n\n\n\n
\n \n \n
\n
\n","import {AfterViewInit, Component, ElementRef, EventEmitter, Input, OnInit, Output, QueryList, ViewChild, ViewChildren} from '@angular/core';\nimport {MatMenuTrigger} from '@angular/material/menu';\nimport {ActivatedRoute} from '@angular/router';\nimport {HeaderIdentifier} from '@application/headers/header-identifier.enum';\nimport {RouteUtils} from '@application/helper/routing/route-utils';\nimport {Equipment} from '@domain/machine/equipment';\nimport {ProductionSchedulePhase} from '@domain/production-schedule/production-schedule-phase.enum';\nimport {MachineOverviewList} from '@presentation/pages/machine-overview/machine-overview-list';\nimport {AssertionUtils, DOMUtils, InputChipComponent, LocalStorageService, skeletonViewAnimation} from '@vdw/angular-component-library';\nimport {Subscription, takeUntil, timer} from 'rxjs';\nimport {BaseAddProductionSchedulePageComponent, ProductionScheduleInitialPreparationsFormGroup} from '../base-add-production-schedule-page.component';\nimport {MenuItemsCanShowProperties} from '../menu-items-new/menu-items-can-show-properties.interface';\nimport {MenuItemsLoadingProperties} from '../menu-items-new/menu-items-loading-properties.interface';\nimport {PathContentSettingsDialogData} from '../menu-items-new/path-content-settings-dialog-data.interface';\nimport {PathContentSettingsDialogComponent} from '../menu-items-new/path-content-settings-dialog.component';\nimport {ProductionScheduleClickEvent} from '../menu-items-new/production-schedule-click-event.enum';\nimport {ProductionScheduleMenuItemChip} from '../menu-items-new/production-schedule-menu-item-chip.interface';\nimport {VerifyType} from './verify-type.enum';\n\n@Component({\n selector: 'app-production-schedule-menu-items',\n templateUrl: './production-schedule-menu-items.component.html',\n styleUrls: ['./production-schedule-menu-items.component.scss'],\n animations: [skeletonViewAnimation('.button-skeleton-wrapper, text-skeleton-wrapper')]\n})\nexport class ProductionScheduleMenuItemsComponent extends BaseAddProductionSchedulePageComponent implements OnInit, AfterViewInit {\n @ViewChildren('chips') public inputChipComponents: QueryList;\n @ViewChild('verifyMenuTrigger', {read: MatMenuTrigger}) public verifyMenuTrigger: MatMenuTrigger;\n @ViewChild('chipsDivider') public chipsDividerElement: ElementRef;\n @ViewChild('chipContainer') public chipContainerElement: ElementRef;\n @ViewChild('menuItems') public menuItemsElement: ElementRef;\n @ViewChild('phaseDivider') public phaseDividerElement: ElementRef;\n @ViewChild('productionScheduleProgress') public productionScheduleProgressElement: ElementRef;\n @ViewChild('actions') public actionsElement: ElementRef;\n\n @Input() public loadingProperties: MenuItemsLoadingProperties;\n @Input() public productionScheduleInitialPreparationsForm: ProductionScheduleInitialPreparationsFormGroup;\n @Input() public productionSchedulePhase: ProductionSchedulePhase;\n @Input() public customErrorMessage: string;\n @Input() public canShowProperties: MenuItemsCanShowProperties;\n @Input() public pathContentSettingsDialogData: PathContentSettingsDialogData;\n @Output() public clickEvent = new EventEmitter();\n @Output() public productionSchedulePhaseClicked = new EventEmitter();\n @Output() public pathContentSettingsDialogDataChanged: EventEmitter = new EventEmitter();\n\n public verifyMenuTimer: Subscription;\n public chips: ProductionScheduleMenuItemChip[] = [];\n public canShowProductionScheduleProgress = true;\n\n public readonly VERIFY = VerifyType.VERIFY;\n public readonly VERIFY_AND_CONFIRM = VerifyType.VERIFY_AND_CONFIRM;\n public readonly VERIFY_TRANSLATION_KEY = 'PRODUCTION_ORDER.PHASES.VERIFY';\n public readonly VERIFY_AND_CONFIRM_TRANSLATION_KEY = 'PRODUCTION_ORDER.VERIFY_AND_CONFIRM';\n public readonly INITIAL_DATA_NOT_LOADED_TRANSLATION_KEY = 'PRODUCTION_ORDER.INITIAL_DATA_LOADING';\n\n public readonly pathContentSettingsDialogComponent = PathContentSettingsDialogComponent;\n\n private saveButtonClicked: boolean;\n private defaultVerifyType: VerifyType;\n\n private readonly HEADER_IDENTIFIER = HeaderIdentifier.ADD_PRODUCTION_SCHEDULE;\n private readonly LOCAL_STORAGE_KEY = 'verifyType';\n private readonly GAP_WIDTH_IN_PX = 16;\n\n public constructor(\n private readonly localStorage: LocalStorageService,\n activatedRoute: ActivatedRoute\n ) {\n super(activatedRoute);\n }\n\n public ngOnInit(): void {\n this.productionScheduleInitialPreparationsForm.valueChanges.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe(() => this.setHeaderChips());\n\n if (this.localStorage.get(`${this.LOCAL_STORAGE_KEY}.${this.HEADER_IDENTIFIER}`)) {\n this.defaultVerifyType = this.localStorage.get(`${this.LOCAL_STORAGE_KEY}.${this.HEADER_IDENTIFIER}`);\n } else {\n this.defaultVerifyType = VerifyType.VERIFY;\n }\n }\n\n public ngAfterViewInit(): void {\n DOMUtils.observeResize(this.menuItemsElement.nativeElement)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe(() => this.setMenuItemsVisibility());\n\n DOMUtils.observeResize(this.actionsElement.nativeElement)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe(() => {\n setTimeout(() => this.setMenuItemsVisibility());\n });\n }\n\n public getLabelForNextButton(): string {\n switch (this.productionSchedulePhase) {\n case ProductionSchedulePhase.CONFIGURE:\n case ProductionSchedulePhase.PRESELECTION:\n return 'PRODUCTION_ORDER.NAVIGATION.TO_BUILD';\n case ProductionSchedulePhase.BUILD:\n return this.isDefaultVerifyType(VerifyType.VERIFY) ? this.VERIFY_TRANSLATION_KEY : this.VERIFY_AND_CONFIRM_TRANSLATION_KEY;\n case ProductionSchedulePhase.VERIFY:\n return 'GENERAL.ACTIONS.CONFIRM';\n default:\n if (this.loadingProperties?.isLoading) {\n return 'PRODUCTION_ORDER.NAVIGATION.TO_BUILD';\n }\n\n return '';\n }\n }\n\n public waitingForInitialZonesToLoad(): boolean {\n if (this.productionSchedulePhase !== ProductionSchedulePhase.CONFIGURE || this.canShowProperties?.canShowInvalidFormMessageError) {\n return false;\n }\n\n const loadProperties = this.loadingProperties;\n const initialZonesLoaded = !(loadProperties?.initialRestZoneLoaded && loadProperties?.initialFreeZoneLoaded && loadProperties?.initialPathZoneLoaded && loadProperties?.initialJuteZoneLoaded);\n\n return initialZonesLoaded && this.saveButtonClicked;\n }\n\n public canShowToPreselectionButton(): boolean {\n return this.productionSchedulePhase === ProductionSchedulePhase.CONFIGURE || (!AssertionUtils.isNullOrUndefined(this.loadingProperties?.isLoading) && this.loadingProperties?.isLoading);\n }\n\n public canShowVerifyMenuTrigger(): boolean {\n return this.productionSchedulePhase === ProductionSchedulePhase.BUILD;\n }\n\n public toPreselectionClicked(): void {\n this.clickEvent.emit(ProductionScheduleClickEvent.PRESELECTION);\n }\n\n public nextPhaseClicked(): void {\n this.saveButtonClicked = true;\n\n if (this.canShowVerifyMenuTrigger() && this.isDefaultVerifyType(VerifyType.VERIFY_AND_CONFIRM)) {\n this.verifyAndConfirmClicked();\n } else {\n this.clickEvent.emit(ProductionScheduleClickEvent.NEXT_PHASE);\n }\n }\n\n public completeClicked(): void {\n this.clickEvent.emit(ProductionScheduleClickEvent.COMPLETE);\n }\n\n public decreateClicked(): void {\n this.clickEvent.emit(ProductionScheduleClickEvent.DECREATE);\n }\n\n public verifyAndConfirmClicked(): void {\n this.clickEvent.emit(ProductionScheduleClickEvent.VERIFY_AND_CONFIRM);\n }\n\n public settingsButtonClicked(): void {\n this.clickEvent.emit(ProductionScheduleClickEvent.SETTINGS);\n }\n\n public mouseEnterVerifyButton(): void {\n if (this.verifyMenuTimer) {\n this.verifyMenuTimer.unsubscribe();\n }\n\n this.verifyMenuTrigger.openMenu();\n }\n\n public mouseLeaveVerifyButton(): void {\n this.verifyMenuTimer = timer(500).subscribe(() => this.verifyMenuTrigger.closeMenu());\n }\n\n public hasVerifyMenuButton(): boolean {\n return !this.isDefaultVerifyType(VerifyType.VERIFY);\n }\n\n public hasVerifyAndConfirmMenuButton(): boolean {\n return !this.isDefaultVerifyType(VerifyType.VERIFY_AND_CONFIRM);\n }\n\n public onProductionSchedulePhaseClicked(event: ProductionSchedulePhase): void {\n this.productionSchedulePhaseClicked.emit(event);\n }\n\n private isDefaultVerifyType(verifyType: VerifyType): boolean {\n return verifyType === this.defaultVerifyType;\n }\n\n public verify(verifyType: VerifyType): void {\n this.defaultVerifyType = verifyType;\n this.localStorage.set(`${this.LOCAL_STORAGE_KEY}.${this.HEADER_IDENTIFIER}`, verifyType);\n\n if (verifyType === VerifyType.VERIFY) {\n this.nextPhaseClicked();\n } else if (verifyType === VerifyType.VERIFY_AND_CONFIRM) {\n this.verifyAndConfirmClicked();\n }\n }\n\n public getDialogData(): PathContentSettingsDialogData {\n return {\n pathContentPanelEnabled: this.pathContentSettingsDialogData?.pathContentPanelEnabled\n } as PathContentSettingsDialogData;\n }\n\n public onOptionChanged(event: PathContentSettingsDialogData): void {\n this.pathContentSettingsDialogDataChanged.emit(event);\n }\n\n private setHeaderChips(): void {\n this.chips = [];\n\n const machine = this.productionScheduleInitialPreparationsForm.value.machine;\n if (machine) {\n this.chips.push({\n value: machine.name,\n url: RouteUtils.paths.texState.editMachine.absolutePath\n .replace(':machineType', `${(machine instanceof Equipment || machine instanceof MachineOverviewList ? machine.machineType : machine.type)?.toLowerCase()}`)\n .replace(':id', `${machine.id}`)\n });\n }\n\n const machineQuality = this.productionScheduleInitialPreparationsForm.value.machineQuality;\n if (machineQuality) {\n this.chips.push({value: machineQuality.technicalNameWithVersion, url: RouteUtils.paths.texStyle.machineQuality.editMachineQuality.absolutePath.replace(':id', `${machineQuality.id}`)});\n }\n\n const creel = this.productionScheduleInitialPreparationsForm.value.creel;\n if (creel) {\n this.chips.push({value: creel.name, url: RouteUtils.paths.texStyle.creel.editCreel.absolutePath.replace(':id', `${creel.id}`)});\n }\n\n setTimeout(() => this.setMenuItemsVisibility());\n }\n\n private setMenuItemsVisibility(): void {\n const reversedInputChips = this.inputChipComponents.toArray().reverse();\n reversedInputChips.forEach((inputChipComponent: InputChipComponent) => (inputChipComponent.elementRef.nativeElement as HTMLElement).classList.remove('hidden'));\n (this.chipsDividerElement.nativeElement as HTMLElement).classList.remove('hidden');\n (this.productionScheduleProgressElement.nativeElement as HTMLElement).classList.remove('hidden');\n (this.phaseDividerElement.nativeElement as HTMLElement).classList.remove('hidden');\n\n reversedInputChips.forEach((inputChipComponent: InputChipComponent, index: number) => {\n const inputChipElement = inputChipComponent.elementRef.nativeElement;\n const chipContainerElement = (this.chipContainerElement.nativeElement as HTMLElement).offsetWidth;\n if (this.getAvailableWidth(true) < chipContainerElement) {\n (inputChipElement as HTMLElement).classList.add('hidden');\n\n if (index === reversedInputChips.length - 1) {\n (this.chipsDividerElement.nativeElement as HTMLElement).classList.add('hidden');\n }\n }\n });\n\n const productionScheduleProgressElement = this.productionScheduleProgressElement.nativeElement;\n if (this.getAvailableWidth(false) < (productionScheduleProgressElement as HTMLElement).offsetWidth) {\n (productionScheduleProgressElement as HTMLElement).classList.add('hidden');\n (this.phaseDividerElement.nativeElement as HTMLElement).classList.add('hidden');\n }\n }\n\n private getAvailableWidth(includeProgressWidth: boolean): number {\n const menuItemsWidth = this.getMenuItemsWidth();\n const actionButtonsWidth = (this.actionsElement.nativeElement as HTMLElement).offsetWidth;\n const productionScheduleProgressWidth = (this.productionScheduleProgressElement.nativeElement as HTMLElement).offsetWidth;\n const progressDividerWidth = (this.phaseDividerElement.nativeElement as HTMLElement).offsetWidth;\n\n return includeProgressWidth\n ? menuItemsWidth - actionButtonsWidth - productionScheduleProgressWidth - progressDividerWidth - 4 * this.GAP_WIDTH_IN_PX\n : menuItemsWidth - actionButtonsWidth - 2 * this.GAP_WIDTH_IN_PX;\n }\n\n private getMenuItemsWidth(): number {\n return (this.menuItemsElement.nativeElement as HTMLElement).offsetWidth;\n }\n}\n","export enum Cutbar {\n BEFORE = 'BEFORE',\n AFTER = 'AFTER'\n}\n","\n \n \n \n

{{ 'PRODUCTION_ORDER.WEAVE_PLAN.PATH_CONTENT.PATH_CONTENT' | bmsTranslate }}

\n
\n\n
\n
\n
{{ 'ANGULAR_COMPONENT_LIBRARY.STATUS_BAR.ROWS' | bmsTranslate }}:
\n
{{ this.listProductionScheduleItemInPathGroup?.length }}
\n
\n
\n
\n \n
\n \n \n \n \n
\n
\n
\n\n \n
\n \n
\n
\n
\n","import {Component, EventEmitter, Inject, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild} from '@angular/core';\nimport {GridIdentifier} from '@application/grids/grid-identifier.enum';\nimport {PositionOfDialog} from '@domain/position-of-dialog';\nimport {BmpProductionScheduleItemInPathGroup} from '@domain/production-schedule/bmp-production-schedule-item-in-path-group';\nimport {ProductionOrderCustomSettings} from '@domain/production-schedule/custom-settings/production-order-custom-settings';\nimport {DrawingType} from '@domain/production-schedule/drawing-type.enum';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {ProductionScheduleOrderLine} from '@domain/production-schedule/production-schedule-order-line';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {RepositionDialogComponent} from '@presentation/components/reposition-dialog/reposition-dialog.component';\nimport {OverviewListOrderLine} from '@presentation/pages/texfab/orderbook/overview/overview-list-order-line';\nimport {\n AssertionUtils,\n BaseComponent,\n ColDefBuilderFactoryService,\n DialogBuilderFactoryService,\n EmptyCellRendererComponent,\n GridOptionsBuilderFactoryService,\n NoDataOverlayComponentParams,\n OverlayComponentParams,\n StringUtils,\n TranslateService,\n Unit\n} from '@vdw/angular-component-library';\nimport {AgGridAngular} from 'ag-grid-angular';\nimport {\n CellRendererSelectorResult,\n ColDef,\n GetRowIdParams,\n GridOptions,\n ICellRendererParams,\n IRowDragItem,\n IRowNode,\n ITooltipParams,\n RowDoubleClickedEvent,\n RowDragEndEvent,\n ValueGetterParams\n} from 'ag-grid-community';\nimport {filter} from 'rxjs';\nimport {Cutbar} from '../../cutbar.enum';\nimport {EditProductionScheduleItemInPathGroupAction} from '../../modals/edit-production-schedule-item-in-path-group/edit-production-schedule-item-in-path-group-action';\nimport {EditProductionScheduleItemInPathGroupComponent} from '../../modals/edit-production-schedule-item-in-path-group/edit-production-schedule-item-in-path-group.component';\nimport {PRODUCTION_SCHEDULE_PLAN, ProductionSchedulePlan} from '../../production-schedule-plan';\n\n@Component({\n selector: 'app-path-content-component',\n templateUrl: './path-content.component.html',\n styleUrls: ['./path-content.component.scss']\n})\nexport class PathContentComponent extends BaseComponent implements OnInit, OnChanges {\n @Input() public selectedPath: ProductionSchedulePath;\n @Input() public productionSchedule: ProductionSchedule;\n @Input() public productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet;\n @Input() public commercialUnit: Unit;\n @Input() public productionOrderCustomSettings: ProductionOrderCustomSettings;\n @Output() public selectedPathContentRowDataOutput = new EventEmitter();\n\n @ViewChild('pathContentGrid')\n public pathContentGrid: AgGridAngular;\n\n public gridOptions: GridOptions;\n public loadingForTheFirstTime = true;\n public selectedNodes: IRowNode[] = [];\n public selectedRowIndex: number | null = null;\n public selectedDragRowIndex: number | null = null;\n public selectedRowData: ProductionScheduleItemInPathGroup | null = null;\n public selectedDragRowData: ProductionScheduleItemInPathGroup | null = null;\n public listProductionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup[];\n\n public readonly GENERAL_UNIT_PICKS = 'GENERAL.UNIT.PICKS';\n\n private readonly booleanFalseTranslation = 'GENERAL.CONDITION.NO';\n private readonly booleanTrueTranslation = 'GENERAL.CONDITION.YES';\n\n public constructor(\n @Inject(PRODUCTION_SCHEDULE_PLAN) private readonly productionSchedulePlan: ProductionSchedulePlan,\n private readonly colDefBuilderFactoryService: ColDefBuilderFactoryService,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n private readonly gridOptionsBuilderFactoryService: GridOptionsBuilderFactoryService,\n private readonly translate: TranslateService\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this.initialiseGridOptions();\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if ('selectedPath' in changes || 'productionSchedule' in changes) {\n this.updateListProductionScheduleItemInPathGroup();\n }\n\n if ('productionSchedule' in changes) {\n this.updateSelectedPath();\n }\n }\n\n public canShowHeader(): boolean {\n return this.selectedNodes.length === 0;\n }\n\n public canMovePath(up: boolean): boolean {\n if (this.selectedNodes.length > 1) {\n return false;\n }\n\n if (up) {\n return this.selectedRowIndex !== 0;\n } else {\n return this.selectedPath?.pathGroups?.length !== this.selectedRowIndex + 1;\n }\n }\n\n public canEditPath(): boolean {\n return this.selectedNodes?.length === 1;\n }\n\n public movePath(up: boolean): void {\n const newIndex = up ? this.selectedRowIndex - 1 : this.selectedRowIndex + 1;\n this.setNewRowIndex(newIndex, this.selectedRowIndex, this.selectedRowData);\n }\n\n public openEditProductionScheduleItemDialog(data?: ProductionScheduleItemInPathGroup): void {\n this.dialogBuilderFactoryService\n .getBuilder()\n .withWidth('334px')\n .withClass('reposition-dialog')\n .withCustomBackdrop('transparent-backdrop')\n .openDialog(RepositionDialogComponent, {\n component: EditProductionScheduleItemInPathGroupComponent,\n sourceElement: document.querySelector('.path-content-container .ag-checked input'),\n positionOfDialog: PositionOfDialog.LEFT,\n productionScheduleItemInPathGroup: AssertionUtils.isNullOrUndefined(data) ? this.selectedRowData : data,\n commercialUnit: this.commercialUnit,\n productionSchedule: this.productionSchedule,\n allowExceedingRequestedAmountOfOrderLineItems: this.productionOrderCustomSettings?.allowExceedingRequestedAmountOfOrderLineItems,\n pickDensityInPicksPerMeter: this.productionSchedule.machineQuality.pickDensity * 1000\n })\n .pipe(filter((result: {action: EditProductionScheduleItemInPathGroupAction; value: ProductionScheduleItemInPathGroup}) => !AssertionUtils.isNullOrUndefined(result)))\n .subscribe((result: {action: EditProductionScheduleItemInPathGroupAction; value: ProductionScheduleItemInPathGroup}) => {\n if (result.action === EditProductionScheduleItemInPathGroupAction.EDIT) {\n this.editProductionScheduleItem(result.value);\n } else {\n this.removeProductionScheduleItemInPathGroup();\n }\n });\n }\n\n public deletePath(): void {\n this.selectedNodes.forEach((selectedNode: IRowNode) => {\n const productionScheduleItemInPathGroup = selectedNode.data as ProductionScheduleItemInPathGroup;\n const productionSchedulePathOfColoredYarnSet = this.productionSchedule.getProductionSchedulePathsOfColoredYarnSetAtStartDent(\n this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent\n );\n\n this.productionSchedulePlan.removeProductionScheduleItem(\n productionScheduleItemInPathGroup.uuid,\n this.selectedPath.pathNumber,\n productionSchedulePathOfColoredYarnSet.productionScheduleColoredYarnSet.startDent,\n true\n );\n });\n }\n\n public onRowDragEnter({node}: RowDragEndEvent): void {\n this.selectedDragRowIndex = node.rowIndex;\n this.pathContentGrid.api.forEachNode((rowNode: IRowNode, index: number) => {\n if (index === node.rowIndex) {\n this.selectedDragRowData = rowNode.data;\n }\n });\n\n document.querySelectorAll('.ag-dnd-ghost')[0].classList.add('ag-dnd-ghost--compact');\n }\n\n public onRowDragEnd({node}: RowDragEndEvent): void {\n this.setNewRowIndex(node.rowIndex, this.selectedDragRowIndex, this.selectedDragRowData);\n }\n\n private initialiseGridOptions(): void {\n this.gridOptions = this.gridOptionsBuilderFactoryService\n .getBuilder(this.getColumnDefsForListOfPathContent(), GridIdentifier.LIST_OF_PATH_CONTENTS)\n .withHeaderHeight(32)\n .withFloatingFiltersHeight(32)\n .withLoadingOverlay({\n scale: 0.4\n } as OverlayComponentParams)\n .withNoRowsOverlay({\n scale: 0.4,\n titleParam: 'PRODUCTION_ORDER.WEAVE_PLAN.PATH_CONTENT.PATH_CONTENT_SELECTED',\n descriptionKey: 'PRODUCTION_ORDER.WEAVE_PLAN.PATH_CONTENT.PATH_CONTENT_NO_ROWS_OVERLAY_DESCRIPTION'\n } as NoDataOverlayComponentParams)\n .withRowSelection(true)\n .withCompactView()\n .withPopupParent(document.querySelector('body'))\n .withGetRowId((params: GetRowIdParams): string => params.data.uuid)\n .withRowDraggingInsideGrid((params: IRowDragItem) => params.rowNode.data?.drawing.name)\n .withOnRowDataUpdated(() => {\n this.setPinnedColumn();\n this.setSelected();\n })\n .withOnRowDoubleClicked((event: RowDoubleClickedEvent) => {\n this.onRowDoubleClicked(event);\n })\n .withOnRowSelected(() => {\n this.onRowSelected();\n })\n .build();\n }\n\n private getColumnDefsForListOfPathContent(): ColDef[] {\n return [\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('position')\n .withHeaderName('CUSTOMERS.NUMBER_ABBREVIATION')\n .withValueGetter((params: ValueGetterParams): number => params.node.rowIndex + 1)\n .withComparator(StringUtils.stringComparator)\n .withRightAlignment()\n .withLockPinned(true)\n .withSuppressMovable('left')\n .withMaxWidth(100)\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('drawingName')\n .withField('drawing.name')\n .withHeaderName('PRODUCTION_ORDER.CUSTOM_SETTINGS.PATH_LABELS.DRAWING_NAME')\n .withTooltipField('drawing.name')\n .withComparator(StringUtils.stringComparator)\n .withCellRendererSelector(this.cellRendererSelectorForOrderLinesOnly())\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withField('quantity')\n .withHeaderName('GENERAL.QUANTITY')\n .withValueGetter((params: ValueGetterParams) => {\n return this.productionSchedule.machine.jacquard.isSisal ? params.data.quantity : params.data.quantity * this.productionSchedule.getProductionScheduleItemMultiplier();\n }, true)\n .withComparator(StringUtils.stringComparator)\n .withRightAlignment()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('cutbarBefore')\n .withCellRenderer((params: ICellRendererParams) => this.getTechnicalCutbarsLengthInNumberOfPicks(params.data, Cutbar.BEFORE))\n .withTooltipValueGetter((params: ITooltipParams) => this.getTechnicalCutbarsLengthInNumberOfPicks(params.data, Cutbar.BEFORE).toString())\n .withHeaderName(`CB (${this.translate.instant(`GENERAL.UNIT.PICKS`)})`)\n .withTooltipFieldForHeader('TEXTILE_DATA.FINISHING_TEMPLATE.CUTBAR.CUTBAR_BEFORE', this.GENERAL_UNIT_PICKS)\n .withComparator(StringUtils.stringComparator)\n .withRightAlignment()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('cutbarAfter')\n .withCellRenderer((params: ICellRendererParams) => this.getTechnicalCutbarsLengthInNumberOfPicks(params.data, Cutbar.AFTER))\n .withTooltipValueGetter((params: ITooltipParams) => this.getTechnicalCutbarsLengthInNumberOfPicks(params.data, Cutbar.AFTER).toString())\n .withHeaderName(`CA (${this.translate.instant(`GENERAL.UNIT.PICKS`)})`)\n .withTooltipFieldForHeader('TEXTILE_DATA.FINISHING_TEMPLATE.CUTBAR.CUTBAR_AFTER', this.GENERAL_UNIT_PICKS)\n .withComparator(StringUtils.stringComparator)\n .withRightAlignment()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('heightInPicks')\n .withField('technicalDimensions.heightInPicks', true)\n .withHeaderName(`P`)\n .withTooltipFieldForHeader('GENERAL.DIMENSIONS.HEIGHT', this.GENERAL_UNIT_PICKS)\n .withComparator(StringUtils.stringComparator)\n .withRightAlignment()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColIdAndField('isProductionItem')\n .withHeaderName(`NP`)\n .withTooltipFieldForHeader('PRODUCTION_ORDER.WEAVE_PLAN.PATH_CONTENT.NO_PRODUCTION_ITEM')\n .withValueGetter(\n (params: ValueGetterParams) => (params.data.isProductionItem ? this.translate.instant(this.booleanTrueTranslation) : this.translate.instant(this.booleanFalseTranslation)),\n true\n )\n .withBooleanFilter(this.translate.instant(this.booleanFalseTranslation), this.translate.instant(this.booleanTrueTranslation))\n .withRightAlignment()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('missingDesign')\n .withField('drawing.missingDesign')\n .withValueGetter(\n (params: ValueGetterParams) => (params.data.drawing.missingDesign ? this.translate.instant(this.booleanTrueTranslation) : this.translate.instant(this.booleanFalseTranslation)),\n true\n )\n .withHeaderName(`V`)\n .withTooltipFieldForHeader('ORDERBOOK.MISSING_DESIGN')\n .withBooleanFilter(this.translate.instant(this.booleanFalseTranslation), this.translate.instant(this.booleanTrueTranslation))\n .withRightAlignment()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('sales')\n .withField('orderLineId')\n .withHeaderName('SALES.TITLE')\n .withValueGetter((params: ValueGetterParams) => this.getSalesOrderLineProperty(params.data.orderLineId, 'salesOrderReference'), true)\n .withComparator(StringUtils.stringComparator)\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('orderLine')\n .withField('orderLineId')\n .withHeaderName('OL')\n .withTooltipFieldForHeader('ORDERBOOK.ORDERLINE')\n .withValueGetter((params: ValueGetterParams) => this.getSalesOrderLineProperty(params.data.orderLineId, 'salesOrderLineReference'), true)\n .withComparator(StringUtils.stringComparator)\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('dueDate')\n .withValueGetter((params: ValueGetterParams) => this.productionSchedule.orderLines.find((orderline: ProductionScheduleOrderLine) => orderline.id === params.data.orderLineId)?.desiredDate)\n .withDateMultiFilter()\n .withHeaderName('GENERAL.DATETIME.DUE_DATE')\n .withDate()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('widthInMM')\n .withField('commercialDimensionsInMM.widthInMM')\n .withMMConversion(Unit.CENTIMETER, false, 2)\n .withHeaderName(`X`)\n .withTooltipFieldForHeader('GENERAL.DIMENSIONS.WIDTH', 'GENERAL.UNIT.CENTIMETER')\n .withComparator(StringUtils.stringComparator)\n .withRightAlignment()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('heightInMM')\n .withField('commercialDimensionsInMM.heightInMM')\n .withMMConversion(Unit.CENTIMETER, false, 2)\n .withHeaderName(`Y`)\n .withTooltipFieldForHeader('GENERAL.DIMENSIONS.HEIGHT', 'GENERAL.UNIT.CENTIMETER')\n .withComparator(StringUtils.stringComparator)\n .withRightAlignment()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('finishingName')\n .withHeaderName(`TEXTILE_DATA.FINISHING.FINISHING`)\n .withValueGetter((params: ValueGetterParams) => this.getFinishingName(params.data))\n .withComparator(StringUtils.stringComparator)\n .withRightAlignment()\n .build()\n ];\n }\n\n private getTechnicalCutbarsLengthInNumberOfPicks(productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup, cutbar: Cutbar): number {\n const cutbarInformation = productionScheduleItemInPathGroup.getCutbarInformation();\n\n if (cutbarInformation) {\n if (cutbar === Cutbar.BEFORE && cutbarInformation.cutbarBefore) {\n return cutbarInformation.cutbarBefore.technicalLengthInNumberOfPicks || 0;\n } else if (cutbar === Cutbar.AFTER && cutbarInformation.cutbarAfter) {\n return cutbarInformation.cutbarAfter.technicalLengthInNumberOfPicks || 0;\n } else {\n return 0;\n }\n }\n\n return 0;\n }\n\n private getSalesOrderLineProperty(orderLineId: number, property: keyof OverviewListOrderLine): string {\n if (orderLineId !== null && this.productionSchedule && !AssertionUtils.isEmpty(this.productionSchedule.orderLines)) {\n const foundOrderLine = this.productionSchedule.orderLines.find((orderLine: ProductionScheduleOrderLine) => orderLine.id === orderLineId);\n\n if (foundOrderLine) {\n return foundOrderLine[property] as string;\n }\n }\n\n return null;\n }\n\n private cellRendererSelectorForOrderLinesOnly(\n cellRenderer: any = null,\n cellRendererParams: any = null\n ): (params: ICellRendererParams) => CellRendererSelectorResult {\n return (params: ICellRendererParams): CellRendererSelectorResult =>\n params.node.level === 0 ? {component: cellRenderer ?? params.colDef.cellRenderer, params: cellRendererParams} : {component: EmptyCellRendererComponent};\n }\n\n private getFinishingName(productionScheduleItem: ProductionScheduleItemInPathGroup): string {\n let name = '';\n\n if (!AssertionUtils.isNullOrUndefined(productionScheduleItem.orderline)) {\n name = productionScheduleItem.orderline?.article.finishing.nameWithVersion;\n } else if (!AssertionUtils.isNullOrUndefined(productionScheduleItem.drawing) && productionScheduleItem.drawing.drawingType === DrawingType.BMP) {\n const bmpProductionScheduleItem = productionScheduleItem as any as BmpProductionScheduleItemInPathGroup;\n name = bmpProductionScheduleItem?.finishing?.nameWithVersion;\n }\n\n return name;\n }\n\n private onRowSelected(): void {\n this.selectedNodes = this.pathContentGrid.api.getSelectedNodes();\n this.selectedRowIndex = this.selectedNodes.length > 0 ? this.selectedNodes[0].rowIndex : null;\n this.selectedRowData = this.selectedNodes.length > 0 ? this.selectedNodes[0].data : null;\n\n this.selectedPathContentRowDataOutput.emit(this.selectedNodes.length === 1 ? this.selectedRowData : null);\n }\n\n private onRowDoubleClicked(event: RowDoubleClickedEvent): void {\n if (event && event.node && event.node.data) {\n this.pathContentGrid.api.deselectAll();\n event.node.setSelected(true);\n this.onRowSelected();\n this.openEditProductionScheduleItemDialog(event.node.data);\n }\n }\n\n private updateListProductionScheduleItemInPathGroup(): void {\n const selectedPath = this.findSelectedPath();\n this.listProductionScheduleItemInPathGroup = AssertionUtils.isNullOrUndefined(selectedPath) ? [] : selectedPath.pathGroups;\n }\n\n private updateSelectedPath(): void {\n this.selectedPath = this.findSelectedPath();\n }\n\n private findSelectedPath(): ProductionSchedulePath {\n if (this.productionSchedule && this.selectedPath) {\n for (const coloredYarnSet of this.productionSchedule.productionSchedulePathsOfColoredYarnSets) {\n const foundPath = coloredYarnSet.productionSchedulePaths.find((path: ProductionSchedulePath) => path.pathNumber === this.selectedPath.pathNumber);\n\n if (!AssertionUtils.isNullOrUndefined(foundPath)) {\n return foundPath;\n }\n }\n }\n }\n\n private setNewRowIndex(index: number, selectedRowIndex: number, selectedRowData: ProductionScheduleItemInPathGroup): void {\n this.productionSchedulePlan.moveProductionScheduleItemToProductionSchedulePath(\n this.selectedPath.pathNumber,\n selectedRowIndex,\n this.productionSchedulePathsOfColoredYarnSet?.productionScheduleColoredYarnSet,\n this.selectedPath.pathNumber,\n index,\n this.productionSchedulePathsOfColoredYarnSet?.productionScheduleColoredYarnSet,\n selectedRowData\n );\n\n setTimeout(() => {\n this.selectedNodes = this.pathContentGrid.api.getSelectedNodes();\n this.selectedRowIndex = this.selectedNodes?.length > 0 ? this.selectedNodes[0].rowIndex : null;\n });\n }\n\n private editProductionScheduleItem(productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup): void {\n this.productionSchedulePlan.editProductionScheduleItem(\n productionScheduleItemInPathGroup,\n this.selectedRowIndex,\n this.getProductionSchedulePathIndex(),\n this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent\n );\n }\n\n private getProductionSchedulePathIndex(): number {\n return this.productionSchedule.productionSchedulePathsOfColoredYarnSets\n .find(\n (productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet) =>\n productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent === this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent\n )\n .productionSchedulePaths.findIndex((productionSchedulePath: ProductionSchedulePath) => productionSchedulePath.pathNumber === this.selectedPath.pathNumber);\n }\n\n private removeProductionScheduleItemInPathGroup(): void {\n const productionSchedulePathOfColoredYarnSet = this.productionSchedule.getProductionSchedulePathsOfColoredYarnSetAtStartDent(\n this.productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.startDent\n );\n const productionSchedulePath = productionSchedulePathOfColoredYarnSet.productionSchedulePaths[this.selectedPath.pathNumber - 1];\n\n this.productionSchedulePlan.removeProductionScheduleItem(\n this.selectedRowData.uuid,\n productionSchedulePath.pathNumber,\n productionSchedulePathOfColoredYarnSet.productionScheduleColoredYarnSet.startDent,\n true\n );\n }\n\n private setPinnedColumn(): void {\n this.pathContentGrid.api.setColumnsPinned(['position'], 'left');\n }\n\n private setSelected(): void {\n if (!AssertionUtils.isNullOrUndefined(this.selectedRowData)) {\n const selectedNode = this.pathContentGrid.api.getRenderedNodes().find((rowNode: IRowNode) => rowNode.data.uuid === this.selectedRowData.uuid);\n\n if (!AssertionUtils.isNullOrUndefined(selectedNode)) {\n this.selectedRowData = selectedNode.data;\n }\n }\n }\n}\n","import {Component, Inject} from '@angular/core';\nimport {PathLayoutTemplate} from '@domain/path-layout-template/path-layout-template';\nimport {PathLayoutTemplatePath} from '@domain/path-layout-template/path-layout-template-path';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {PathWidth} from '@domain/textile-data/machine-quality/path-width';\nimport {ProductionSchedulePlan, PRODUCTION_SCHEDULE_PLAN} from '@presentation/pages/texfab/production-schedule/add/plan/production-schedule-plan';\nimport {AssertionUtils, convertCommercialUnit, convertWidthInMeterToDents, NumberUtils, TranslateService, Unit} from '@vdw/angular-component-library';\nimport {ICellRendererAngularComp} from 'ag-grid-angular';\n\n@Component({\n templateUrl: './path-layout-template-mismatch.component.html',\n styleUrls: ['./path-layout-template-mismatch.component.scss']\n})\nexport class PathLayoutTemplateMismatchComponent implements ICellRendererAngularComp {\n private productionSchedule: ProductionSchedule;\n private pathLayoutTemplate: PathLayoutTemplate;\n private pathWidths: PathWidth[];\n private reedDensityInDentsPerMeter: number = 0;\n\n public constructor(\n @Inject(PRODUCTION_SCHEDULE_PLAN) private readonly productionSchedulePlan: ProductionSchedulePlan,\n private readonly translate: TranslateService\n ) {\n this.translate = translate;\n }\n\n public agInit(params: any): void {\n this.pathLayoutTemplate = params.data;\n this.productionSchedule = params.productionSchedule;\n this.pathWidths = params.pathWidths;\n this.reedDensityInDentsPerMeter = params.reedDensityInDentsPerMeter;\n }\n\n public refresh(params: any): boolean {\n return false;\n }\n\n public getMismatchIcon(): string {\n if (AssertionUtils.isNullOrUndefined(this.pathLayoutTemplate) || this.checkIfTemplateHasTooMuchWidth(this.pathLayoutTemplate) || this.checkIfTemplateHasOverlappingPaths()) {\n return 'error';\n } else {\n return 'confirm';\n }\n }\n\n public getMismatchTooltip(): string {\n if (this.checkIfTemplateHasTooMuchWidth(this.pathLayoutTemplate)) {\n return this.translate.instant('PATH_LAYOUT_TEMPLATE.TOO_MUCH_WIDTH_ERROR');\n } else if (this.checkIfTemplateHasOverlappingPaths()) {\n return this.translate.instant('PATH_LAYOUT_TEMPLATE.OVERLAPPING_COLORSETS_ERROR');\n } else {\n return this.translate.instant('PATH_LAYOUT_TEMPLATE.TEMPLATE_COMPATIBLE');\n }\n }\n\n private checkIfTemplateHasTooMuchWidth(pathLayoutTemplate: PathLayoutTemplate): boolean {\n const totalWidthOfPathsInDents = pathLayoutTemplate.pathLayoutTemplatePaths.reduce((totalWidth: number, pathLayoutTemplatePath: PathLayoutTemplatePath) => {\n const widthOfPathInDents = !AssertionUtils.isNullOrUndefined(this.productionSchedulePlan.lookupCommercialWidthInPathWidths(pathLayoutTemplatePath.widthInMM, this.pathWidths))\n ? this.productionSchedulePlan.lookupCommercialWidthInPathWidths(pathLayoutTemplatePath.widthInMM, this.pathWidths)\n : convertWidthInMeterToDents(convertCommercialUnit({from: {unit: Unit.MILLIMETER, value: pathLayoutTemplatePath.widthInMM}, to: Unit.METER}), this.reedDensityInDentsPerMeter, 0);\n\n return totalWidth + widthOfPathInDents;\n }, 0);\n\n const totalWidthOfPathsInDentsWithAddedInBetweenFreeZones = !this.productionSchedule.initialFreeZones.inBetween.useAsMaximum\n ? totalWidthOfPathsInDents + this.productionSchedule.initialFreeZones.inBetween.technicalWidthInDents * (pathLayoutTemplate.pathLayoutTemplatePaths.length - 1)\n : totalWidthOfPathsInDents;\n const totalWidthOfPathsInDentsWithAddedLeftFreeZones = !this.productionSchedule.initialFreeZones.inBetween.useAsMaximum\n ? totalWidthOfPathsInDentsWithAddedInBetweenFreeZones + this.productionSchedule.initialFreeZones.left.technicalWidthInDents\n : totalWidthOfPathsInDentsWithAddedInBetweenFreeZones;\n const totalWidthOfPathsInDentsWithAddedRightFreeZones = !this.productionSchedule.initialFreeZones.inBetween.useAsMaximum\n ? totalWidthOfPathsInDentsWithAddedLeftFreeZones + this.productionSchedule.initialFreeZones.right.technicalWidthInDents\n : totalWidthOfPathsInDentsWithAddedLeftFreeZones;\n\n const totalWidthOfPathsWithAddedRestAndFreeZones = AssertionUtils.isNullOrUndefined(this.productionSchedule?.initialRestZones.userDefinedRest?.technicalWidthInDents)\n ? totalWidthOfPathsInDentsWithAddedRightFreeZones\n : totalWidthOfPathsInDentsWithAddedRightFreeZones + this.productionSchedule.initialRestZones.userDefinedRest.technicalWidthInDents;\n\n return this.productionSchedule.machine.dentsForFabric < totalWidthOfPathsWithAddedRestAndFreeZones ? true : false;\n }\n\n private checkIfTemplateHasOverlappingPaths(): boolean {\n const coloredYarnSetWidthsInDents = this.productionSchedule.productionSchedulePathsOfColoredYarnSets.map((productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet) => {\n return NumberUtils.roundAwayFromZero(productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.technicalWidthInDents);\n });\n\n let widthInDentsCounter = 0;\n let result: boolean;\n\n this.pathLayoutTemplate.pathLayoutTemplatePaths.forEach((pathLayoutTemplatePath: PathLayoutTemplatePath) => {\n widthInDentsCounter += !AssertionUtils.isNullOrUndefined(this.productionSchedulePlan.lookupCommercialWidthInPathWidths(pathLayoutTemplatePath.widthInMM, this.pathWidths))\n ? this.productionSchedulePlan.lookupCommercialWidthInPathWidths(pathLayoutTemplatePath.widthInMM, this.pathWidths)\n : convertWidthInMeterToDents(convertCommercialUnit({from: {unit: Unit.MILLIMETER, value: pathLayoutTemplatePath.widthInMM}, to: Unit.METER}), this.reedDensityInDentsPerMeter, 0);\n\n if (widthInDentsCounter === coloredYarnSetWidthsInDents[0]) {\n result = false;\n } else if (widthInDentsCounter > coloredYarnSetWidthsInDents[0]) {\n result = true;\n }\n });\n\n return result;\n }\n}\n","
\n \n
\n","
\n \n \n\n
\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 {Router} from '@angular/router';\nimport {GridIdentifier} from '@application/grids/grid-identifier.enum';\nimport {NavigationHelperService} from '@application/helper/navigation-helper/navigation-helper.service';\nimport {NavigationSelectedMenuItemData} from '@application/helper/navigation-helper/navigation-selected-menu-item-data.interface';\nimport {NavigationId} from '@application/helper/routing/navigation-id.enum';\nimport {NavigationUtils} from '@application/helper/routing/navigation-utils';\nimport {PathLayoutTemplate} from '@domain/path-layout-template/path-layout-template';\nimport {PathLayoutTemplatePath} from '@domain/path-layout-template/path-layout-template-path';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {ColoredYarnSetPosition} from '@domain/textile-data/creel/colored-yarn-set-position';\nimport {PathWidth} from '@domain/textile-data/machine-quality/path-width';\nimport {HttpPathLayoutTemplatesService} from '@infrastructure/http/path-layout-template/http-path-layout-templates.service';\nimport {PRODUCTION_SCHEDULE_PLAN, ProductionSchedulePlan} from '@presentation/pages/texfab/production-schedule/add/plan/production-schedule-plan';\nimport {\n AgGridUtils,\n AlertDialogResult,\n AssertionUtils,\n BaseComponent,\n ColDefBuilderFactoryService,\n convertCommercialUnit,\n convertToCommercialUnitCentimeter,\n convertWidthInMeterToDents,\n DialogBuilderFactoryService,\n DialogComponentData,\n DialogType,\n GridOptionsBuilderFactoryService,\n NoDataOverlayComponentParams,\n OverlayComponentParams,\n SelectGridDialog,\n StringUtils,\n TabsMenuItem,\n TranslateService,\n Unit\n} from '@vdw/angular-component-library';\nimport {AgGridAngular} from 'ag-grid-angular';\nimport {ColDef, GridApi, GridOptions, ICellRendererParams, ITooltipParams, RowNode, ValueGetterParams} from 'ag-grid-community';\nimport {L10nIntlService} from 'angular-l10n';\nimport {takeUntil} from 'rxjs';\nimport {PathLayoutTemplateMismatchComponent} from './path-layout-template-mismatch/path-layout-template-mismatch.component';\nimport {PathLayoutTemplateService} from './path-layout-template.service';\n\n@Component({\n templateUrl: './select-path-layout-template.component.html',\n styleUrls: ['./select-path-layout-template.component.scss']\n})\nexport class SelectPathLayoutTemplateComponent extends BaseComponent implements OnInit, AfterViewInit, SelectGridDialog {\n public pathLayoutTemplateTranslationKey = 'PATH_LAYOUT_TEMPLATE.PATH_LAYOUT_TEMPLATE';\n public listOfGridOptions: GridOptions[];\n public listOfGridApis: GridApi[];\n public listOfPathLayoutTemplates: PathLayoutTemplate[];\n @ViewChild('selectPathLayoutTemplatesGrid')\n public selectPathLayoutTemplatesGrid: AgGridAngular;\n\n public pathWidths: PathWidth[];\n public productionSchedule: ProductionSchedule;\n\n public selectedMenuItem: TabsMenuItem;\n public menuItems: TabsMenuItem[] = [\n {\n value: ColoredYarnSetPosition.BOTTOM,\n translationKey: 'TEXTILE_DATA.MACHINE_QUALITY.POST_PROCESSING.CLOTH_TYPE_OPTIONS.BOTTOM'\n },\n {\n value: ColoredYarnSetPosition.TOP,\n translationKey: 'TEXTILE_DATA.MACHINE_QUALITY.POST_PROCESSING.CLOTH_TYPE_OPTIONS.TOP'\n }\n ];\n\n private reedDensityInDentsPerMeter: number;\n\n public constructor(\n @Inject(MAT_DIALOG_DATA) public data: any,\n @Inject(PRODUCTION_SCHEDULE_PLAN) private readonly productionSchedulePlan: ProductionSchedulePlan,\n private readonly dialogRef: MatDialogRef,\n private readonly colDefBuilderFactoryService: ColDefBuilderFactoryService,\n private readonly gridOptionsBuilderFactoryService: GridOptionsBuilderFactoryService,\n private readonly translate: TranslateService,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n private readonly l10nIntlService: L10nIntlService,\n private readonly pathLayoutTemplates: HttpPathLayoutTemplatesService,\n private readonly router: Router,\n private readonly pathLayoutTemplateService: PathLayoutTemplateService,\n private readonly navigationHelperService: NavigationHelperService>\n ) {\n super();\n this.productionSchedule = data?.productionSchedule;\n this.pathWidths = data?.pathWidths;\n this.reedDensityInDentsPerMeter = data?.reedDensityInDentsPerMeter;\n this.selectedMenuItem = this.menuItems[0];\n }\n\n public ngOnInit(): void {\n this.setGridOptions();\n this.getPathLayoutTemplates();\n }\n\n public get gridOptionsForListOfPathLayoutTemplates(): GridOptions {\n return this.listOfGridOptions[0];\n }\n\n public ngAfterViewInit(): void {\n this.listOfGridApis = [this.selectPathLayoutTemplatesGrid?.api];\n }\n\n public onNavigationHelperDestroy(): void {\n this.navigationHelperService.savePartialState>({dialogComponent: SelectPathLayoutTemplateComponent});\n this.navigationHelperService.savePartialState({menuItem: this.selectedMenuItem});\n }\n\n public isProductionScheduleDoubleWidth(): boolean {\n if (AssertionUtils.isNullOrUndefined(this.productionSchedule)) {\n return false;\n } else {\n return this.productionSchedule.machine.jacquard.isSisal;\n }\n }\n\n public confirmOverride(): void {\n if (this.productionSchedule.machine.jacquard.isSisal) {\n this.confirmOverrideForDoubleWidth();\n } else if (\n AssertionUtils.isNullOrUndefined(this.productionSchedule.productionSchedulePathsOfColoredYarnSets[0].productionSchedulePaths) ||\n AssertionUtils.isEmpty(this.productionSchedule.productionSchedulePathsOfColoredYarnSets[0].productionSchedulePaths)\n ) {\n this.selectPathLayoutTemplate();\n } else {\n this.openConfirmDialog();\n }\n }\n\n public confirmOverrideForDoubleWidth(): void {\n if (this.selectedMenuItem.value === ColoredYarnSetPosition.BOTTOM) {\n const bottomColoredYarnSet = this.productionSchedule.productionSchedulePathsOfColoredYarnSets.filter((productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet) =>\n productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.isBottomPosition()\n );\n if (AssertionUtils.isNullOrUndefined(bottomColoredYarnSet[0].productionSchedulePaths) || AssertionUtils.isEmpty(bottomColoredYarnSet[0].productionSchedulePaths)) {\n this.selectPathLayoutTemplate();\n } else {\n this.openConfirmDialog();\n }\n } else if (this.selectedMenuItem.value === ColoredYarnSetPosition.TOP) {\n const topColoredYarnSet = this.productionSchedule.productionSchedulePathsOfColoredYarnSets.filter(\n (productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet) => !productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet.isBottomPosition()\n );\n if (AssertionUtils.isNullOrUndefined(topColoredYarnSet[0].productionSchedulePaths) || AssertionUtils.isEmpty(topColoredYarnSet[0].productionSchedulePaths)) {\n this.selectPathLayoutTemplate();\n } else {\n this.openConfirmDialog();\n }\n }\n }\n\n public navigateToAddPathLayoutTemplatePage(): void {\n this.router.navigateByUrl(NavigationUtils.getAbsolutePath(NavigationId.ADD_PATH_LAYOUT));\n }\n\n public selectPathLayoutTemplate(): void {\n this.dialogRef.close([this.selectPathLayoutTemplatesGrid?.api?.getSelectedRows()[0], this.selectedMenuItem.value]);\n }\n\n public onSelectedMenuItemChange(menuItem: TabsMenuItem): void {\n this.selectedMenuItem = menuItem;\n }\n\n private openConfirmDialog(): void {\n this.dialogBuilderFactoryService\n .getBuilder()\n .openAlertDialog({\n titleText: this.translate.instant('GENERAL.ACTIONS.IMPORT_OBJECT', {object: this.selectPathLayoutTemplatesGrid?.api?.getSelectedRows()?.[0]?.name}),\n messageText: this.translate.instant('GENERAL.ACTIONS.CONFIRM_IMPORT_DESCRIPTION'),\n type: DialogType.OVERRIDE\n })\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((result: AlertDialogResult) => {\n if (result === AlertDialogResult.CONFIRM) {\n this.selectPathLayoutTemplate();\n }\n });\n }\n\n private setGridOptions(): void {\n this.listOfGridOptions = [\n this.gridOptionsBuilderFactoryService\n .getBuilder(this.getColumnDefsForListOfPathLayoutTemplates(), GridIdentifier.SELECT_PATH_LAYOUT_TEMPLATE)\n .withOnCellDoubleClicked(() => this.confirmOverride())\n .withNoRowsOverlay({\n scale: 0.7,\n titleParam: this.pathLayoutTemplateTranslationKey,\n hideDescription: true\n } as NoDataOverlayComponentParams)\n .withLoadingOverlay({\n scale: 0.7\n } as OverlayComponentParams)\n .withIsRowSelectable((rowNode: RowNode) => !this.checkIfTemplateHasTooMuchWidth(rowNode.data) && !this.checkIfTemplateHasOverlappingPaths(rowNode.data))\n .withRememberStateForNavigationHelper()\n .build()\n ];\n }\n\n private getColumnDefsForListOfPathLayoutTemplates(): ColDef[] {\n return [\n this.colDefBuilderFactoryService.getBuilder().withColIdAndField('name', true).withHeaderName('GENERAL.NAME').withComparator(StringUtils.stringComparator).build(),\n this.colDefBuilderFactoryService.getBuilder().withField('loomGroup', true).withHeaderName('PATH_LAYOUT_TEMPLATE.LOOM_TYPE').withComparator(StringUtils.stringComparator).build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withField('paths')\n .withHeaderName('PATH_LAYOUT_TEMPLATE.PATHS')\n .withValueGetter((params: ValueGetterParams) => (params.data as PathLayoutTemplate).pathLayoutTemplatePaths.length, true)\n .withComparator(StringUtils.stringComparator)\n .withCellClass('right')\n .withNumericMultiFilter()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withField('totalWidth')\n .withHeaderName('PATH_LAYOUT_TEMPLATE.TOTAL_WIDTH')\n .withCellRenderer((params: ICellRendererParams) => AgGridUtils.buildAgGridCellTextWithUnit(this.getTotalWidth(params, false), Unit.CENTIMETER, this.l10nIntlService))\n .withTooltipValueGetter((params: ITooltipParams) => AgGridUtils.buildAgGridCellTooltipWithUnit(this.getTotalWidth(params, false), Unit.CENTIMETER, this.l10nIntlService))\n .withFilterValueGetter((params: ValueGetterParams) => this.getTotalWidth(params, false))\n .withComparator(StringUtils.stringComparator)\n .withCellClass('right')\n .withNumericMultiFilter()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withField('totalWidth')\n .withHeaderName('PATH_LAYOUT_TEMPLATE.TOTAL_WIDTH')\n .withCellRenderer((params: ICellRendererParams) => AgGridUtils.buildAgGridCellTextWithUnit(this.getTotalWidth(params, true), Unit.DENTS, this.l10nIntlService))\n .withTooltipValueGetter((params: ITooltipParams) => AgGridUtils.buildAgGridCellTooltipWithUnit(this.getTotalWidth(params, true), Unit.DENTS, this.l10nIntlService))\n .withFilterValueGetter((params: ValueGetterParams) => this.getTotalWidth(params, true))\n .withComparator(StringUtils.stringComparator)\n .withCellClass('right')\n .withNumericMultiFilter()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withField('info')\n .withHeaderName('PATH_LAYOUT_TEMPLATE.INFO')\n .withCellRenderer(PathLayoutTemplateMismatchComponent, {\n productionSchedule: this.productionSchedule,\n pathWidths: this.pathWidths,\n reedDensityInDentsPerMeter: this.productionSchedule?.machineQuality?.reedDensity * 1000\n })\n .withoutFilter()\n .withCellClass('center')\n .withResizable(false)\n .withWidth(100)\n .build()\n ];\n }\n\n private getPathLayoutTemplates(): void {\n this.pathLayoutTemplates\n .getAll()\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((pathLayoutTemplates: PathLayoutTemplate[]) => (this.listOfPathLayoutTemplates = pathLayoutTemplates));\n }\n\n private getTotalWidth(params: ICellRendererParams | ITooltipParams | ValueGetterParams, dents: boolean): string {\n const totalWidthOfPathsInDents = (params.data as PathLayoutTemplate).pathLayoutTemplatePaths.reduce((totalWidth: number, pathLayoutTemplatePath: PathLayoutTemplatePath) => {\n const widthOfPathInDents = !AssertionUtils.isNullOrUndefined(this.productionSchedulePlan.lookupCommercialWidthInPathWidths(pathLayoutTemplatePath.widthInMM, this.pathWidths))\n ? this.productionSchedulePlan.lookupCommercialWidthInPathWidths(pathLayoutTemplatePath.widthInMM, this.pathWidths)\n : convertWidthInMeterToDents(convertCommercialUnit({from: {unit: Unit.MILLIMETER, value: pathLayoutTemplatePath.widthInMM}, to: Unit.METER}), this.reedDensityInDentsPerMeter, 0);\n\n return totalWidth + widthOfPathInDents;\n }, 0);\n\n const totalWidthOfPathsInMilimeters = (params.data as PathLayoutTemplate).pathLayoutTemplatePaths.reduce((totalWidth: number, pathLayoutTemplatePath: PathLayoutTemplatePath) => {\n return totalWidth + pathLayoutTemplatePath.widthInMM;\n }, 0);\n\n const totalWidthOfPathsInDentsWithAddedRestAndFreeZones = this.addFreeZonesAndRestZonesToTotalWidthOfPathTemplate(totalWidthOfPathsInDents, params.data as PathLayoutTemplate);\n const totalWidthOfPathsInMillimetersWithAddedRestAndFreeZones = this.addFreeZonesAndRestZonesToTotalWidthOfPathTemplate(totalWidthOfPathsInMilimeters, params.data as PathLayoutTemplate);\n\n const totalWidthInCM = convertToCommercialUnitCentimeter({\n unit: Unit.MILLIMETER,\n value: totalWidthOfPathsInMillimetersWithAddedRestAndFreeZones\n });\n\n return dents ? totalWidthOfPathsInDentsWithAddedRestAndFreeZones.toFixed(0).toString() : totalWidthInCM.toFixed(2).toString();\n }\n\n private checkIfTemplateHasTooMuchWidth(pathLayoutTemplate: PathLayoutTemplate): boolean {\n return this.pathLayoutTemplateService.checkIfTemplateHasTooMuchWidth(\n this.productionSchedule,\n pathLayoutTemplate,\n this.selectedMenuItem.value,\n this.productionSchedule.machineQuality.reedDensity * 1000,\n this.pathWidths\n );\n }\n\n private checkIfTemplateHasOverlappingPaths(pathLayoutTemplate: PathLayoutTemplate): boolean {\n return this.pathLayoutTemplateService.checkIfTemplateHasOverlappingPaths(this.productionSchedule, pathLayoutTemplate, this.productionSchedule.machineQuality.reedDensity * 1000, this.pathWidths);\n }\n\n private addFreeZonesAndRestZonesToTotalWidthOfPathTemplate(totalWidthOfPathsInDents: number, pathLayoutTemplate: PathLayoutTemplate): number {\n const totalWidthOfPathsInDentsWithAddedInBetweenFreeZones = !this.productionSchedule.initialFreeZones.inBetween.useAsMaximum\n ? totalWidthOfPathsInDents + this.productionSchedule.initialFreeZones.inBetween.technicalWidthInDents * (pathLayoutTemplate.pathLayoutTemplatePaths.length - 1)\n : totalWidthOfPathsInDents;\n const totalWidthOfPathsInDentsWithAddedLeftFreeZones = !this.productionSchedule.initialFreeZones.left.useAsMaximum\n ? totalWidthOfPathsInDentsWithAddedInBetweenFreeZones + this.productionSchedule.initialFreeZones.left.technicalWidthInDents\n : totalWidthOfPathsInDentsWithAddedInBetweenFreeZones;\n const totalWidthOfPathsInDentsWithAddedRightFreeZones = !this.productionSchedule.initialFreeZones.right.useAsMaximum\n ? totalWidthOfPathsInDentsWithAddedLeftFreeZones + this.productionSchedule.initialFreeZones.right.technicalWidthInDents\n : totalWidthOfPathsInDentsWithAddedLeftFreeZones;\n\n return AssertionUtils.isNullOrUndefined(this.productionSchedule.initialRestZones?.userDefinedRest?.technicalWidthInDents)\n ? totalWidthOfPathsInDentsWithAddedRightFreeZones\n : totalWidthOfPathsInDentsWithAddedRightFreeZones + this.productionSchedule.initialRestZones.userDefinedRest.technicalWidthInDents;\n }\n}\n","
\n \n
\n
\n
\n
\n \n {{ 'TEXTILE_DATA.MACHINE_QUALITY.PATTERN_OR_DRAWING' | bmsTranslate: {count: 1} }}\n \n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n
\n \n
\n
\n
\n
\n
\n \n {{ 'GENERAL.DIMENSIONS.HEIGHT' | bmsTranslate }}\n \n {{ 'GENERAL.UNIT.PIXEL' | bmsTranslate }}\n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n {{ 'GENERAL.ERRORS.MIN_VALUE' | bmsTranslate: {min: getMinPatternHeight()} }}\n \n \n \n {{ 'GENERAL.DIMENSIONS.HEIGHT' | bmsTranslate }}\n \n {{ 'GENERAL.UNIT.CENTIMETER' | bmsTranslate }}\n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n {{ 'GENERAL.ERRORS.MIN_VALUE' | bmsTranslate: {min: '0.1'} }}\n \n \n
\n
\n
\n
\n\n \n
\n","import {Component, ElementRef, Inject, OnInit, ViewChild} from '@angular/core';\nimport {FormBuilder, FormControl, FormGroup, Validators} from '@angular/forms';\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\nimport {AddJutePattern} from '@application/command/add-jute-pattern';\nimport {Pattern} from '@domain/pattern';\nimport {ManualNonProductionItemDrawing} from '@domain/production-schedule/manual-non-production-item-drawing';\nimport {PatternType} from '@presentation/components/select-pattern/pattern-type.enum';\nimport {SelectPatternComponentMatDialogConfigDataInterface} from '@presentation/components/select-pattern/select-pattern-component-mat-dialog-config.interface';\nimport {SelectPatternComponent} from '@presentation/components/select-pattern/select-pattern.component';\nimport {WeaveQualityType} from '@presentation/pages/textile-data/machine-quality/overview/weave-quality-type.enum';\nimport {AssertionUtils, BaseComponent, canShowErrorForErrorCodeAndFormControlForFormGroup, DialogBuilderFactoryService, FormValueHelper, TranslateService} from '@vdw/angular-component-library';\nimport {takeUntil} from 'rxjs/operators';\n\n@Component({\n templateUrl: './add-jute-to-path.component.html',\n styleUrls: ['./add-jute-to-path.component.scss']\n})\nexport class AddJuteToPathComponent extends BaseComponent implements OnInit {\n @ViewChild('matCardElement', {read: ElementRef}) public matCardElement: ElementRef;\n\n public addJuteToPathForm: FormGroup<{\n heightInCm: FormControl;\n heightInPx: FormControl;\n pattern: FormControl;\n }>;\n\n private readonly pickDensity: number;\n private readonly picksPerColorLine: number;\n private readonly weaveStructureId: number;\n private readonly qualityId: number;\n private readonly colorSetId: number;\n private readonly juteWidthInDents: number;\n private readonly weaveQualityType: WeaveQualityType;\n\n public readonly PATTERN_CONDITIONAL_CHIP_VALUE_KEY = 'Pattern %(id)';\n\n public constructor(\n @Inject(MAT_DIALOG_DATA) public data: any,\n private readonly formBuilder: FormBuilder,\n private readonly dialogRef: MatDialogRef,\n private readonly translate: TranslateService,\n private readonly addJutePattern: AddJutePattern,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService\n ) {\n super();\n\n this.pickDensity = data.pickDensity;\n this.picksPerColorLine = data.picksPerColorLine;\n this.weaveStructureId = data.weaveStructureId;\n this.qualityId = data.qualityId;\n this.colorSetId = data.colorSetId;\n this.juteWidthInDents = data.juteWidthInDents;\n this.weaveQualityType = data.weaveQualityType;\n }\n\n public ngOnInit(): void {\n this.setFormFields();\n }\n\n public applyChangesToProductionScheduleItemsInSchedule(): void {\n if (this.hasChosenPatternOrPatternFields) {\n this.dialogRef.close(\n new ManualNonProductionItemDrawing(\n 0,\n this.addJuteToPathForm.value.pattern.name ?? this.translate.instant('PRODUCTION_ORDER.WEAVE_PLAN.JUTE.JUTE'),\n {\n widthInPx: this.juteWidthInDents,\n heightInPx: this.addJuteToPathForm.getRawValue().heightInPx\n },\n this.addJuteToPathForm.value.pattern\n )\n );\n }\n }\n\n public canShowErrorForFormControl(errorCode: string, formControlName: string, formGroup: FormGroup): boolean {\n return canShowErrorForErrorCodeAndFormControlForFormGroup(errorCode, formControlName, formGroup);\n }\n\n public getMinPatternHeight(): number {\n let pattern = this.addJuteToPathForm.value.pattern;\n return pattern?.ySizeInColorlines ?? pattern?.heightInPixels ?? 1;\n }\n\n public getPattern(patternFormControl: string): Pattern | string[] {\n return this.addJuteToPathForm.value[patternFormControl];\n }\n\n public hasChosenPatternOrPatternFields(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.addJuteToPathForm.value.pattern);\n }\n\n public getWeaveStructureId(): number {\n return this.weaveStructureId;\n }\n\n public getQualityType(): WeaveQualityType {\n return this.weaveQualityType;\n }\n\n public canLockButton(): boolean {\n return !this.hasChosenPatternOrPatternFields();\n }\n\n private setFormFields(): void {\n this.addJuteToPathForm = this.formBuilder.group({\n heightInCm: this.formBuilder.control(null, [Validators.required, Validators.min(0.1)]),\n heightInPx: this.formBuilder.control(null, [Validators.required, Validators.min(1)]),\n pattern: this.formBuilder.control(null, Validators.required)\n });\n\n this.syncCmToPixelsFormFields();\n\n this.addJuteToPathForm.controls.heightInCm.disable();\n this.addJuteToPathForm.controls.heightInPx.disable();\n\n this.addJuteToPathForm.controls.heightInPx.setValue(1);\n }\n\n public cancelEvent(): void {\n this.dialogRef.close();\n }\n\n private syncCmToPixelsFormFields(): void {\n FormValueHelper.syncValuesOfFormFieldsByFactor(\n this.addJuteToPathForm.controls.heightInCm,\n this.addJuteToPathForm.controls.heightInPx,\n (this.pickDensity * 10) / this.picksPerColorLine,\n this.picksPerColorLine / (this.pickDensity * 10),\n 0.1\n )\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe();\n }\n\n public selectPattern(patternFormControl: string): void {\n this.dialogBuilderFactoryService\n .getBuilder()\n .openSelectGridDialog, Pattern>(SelectPatternComponent, {\n patternType: PatternType.JUTE_PATTERNS_OR_DRAWINGS,\n patternTranslationKey: 'TEXTILE_DATA.MACHINE_QUALITY.PATTERN_OR_DRAWING',\n showPatternTypeFilter: true,\n allowPatternCreation: true,\n addPatternCommand: this.addJutePattern.execute({\n machineQualityId: this.qualityId,\n colorSetId: this.colorSetId\n }),\n weaveStructureId: this.weaveStructureId,\n virtualScrolling: true\n })\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((pattern: Pattern | undefined) => {\n if (pattern !== undefined) {\n const isCurrentPatternEqualToSelectedPattern = this.addJuteToPathForm.value[patternFormControl] === pattern;\n this.addJuteToPathForm.controls[patternFormControl].setValue(pattern, {emitEvent: !isCurrentPatternEqualToSelectedPattern});\n this.addJuteToPathForm.controls.heightInCm.enable();\n this.addJuteToPathForm.controls.heightInPx.enable();\n this.addJuteToPathForm.controls.heightInPx.setValidators([Validators.required, Validators.min(pattern.ySizeInColorlines ?? pattern.heightInPixels)]);\n this.addJuteToPathForm.controls.heightInPx.updateValueAndValidity();\n this.addJuteToPathForm.controls.heightInPx.setValue(pattern.ySizeInColorlines ?? pattern.heightInPixels);\n if (!isCurrentPatternEqualToSelectedPattern) {\n this.addJuteToPathForm.markAsDirty();\n }\n }\n });\n }\n}\n","import {Component, Inject} from '@angular/core';\nimport {MAT_DIALOG_DATA} from '@angular/material/dialog';\nimport {EnumUtils, TranslateService, Unit} from '@vdw/angular-component-library';\n\n@Component({\n selector: 'app-max-length-info-tooltip',\n templateUrl: './max-length-info-tooltip.component.html',\n styleUrls: ['./max-length-info-tooltip.component.scss']\n})\nexport class MaxLengthInfoTooltipComponent {\n public buggyLengthMaxInPicks = 0;\n public buggyLengthMaxInCommercialUnit = 0;\n public lengthInBuggyInPicks = 0;\n public lengthInBuggyInCommercialUnit = 0;\n public commercialUnit = Unit.CENTIMETER;\n\n public constructor(\n @Inject(MAT_DIALOG_DATA) public data: any,\n private readonly translate: TranslateService\n ) {\n this.buggyLengthMaxInPicks = data.buggyLengthMaxInPicks;\n this.buggyLengthMaxInCommercialUnit = data.buggyLengthMaxInCommercialUnit;\n this.lengthInBuggyInPicks = data.lengthInBuggyInPicks;\n this.lengthInBuggyInCommercialUnit = data.lengthInBuggyInCommercialUnit;\n this.commercialUnit = data.commercialUnit;\n }\n\n public getTotalBuggyLengthLabel(): string {\n return `${this.buggyLengthMaxInCommercialUnit} ${this.translate.instant(`GENERAL.UNIT.${EnumUtils.getKeyFromValue(Unit, this.commercialUnit)}`)} - ${this.buggyLengthMaxInPicks} ${this.translate.instant(\n `GENERAL.UNIT.${EnumUtils.getKeyFromValue(Unit, Unit.PICKS)}`\n )}`;\n }\n\n public getCurrentLengthInBuggyLabel(): string {\n return `${this.lengthInBuggyInCommercialUnit} ${this.translate.instant(`GENERAL.UNIT.${EnumUtils.getKeyFromValue(Unit, this.commercialUnit)}`)} - ${this.lengthInBuggyInPicks} ${this.translate.instant(\n `GENERAL.UNIT.${EnumUtils.getKeyFromValue(Unit, Unit.PICKS)}`\n )}`;\n }\n}\n","
\n
\n
{{ 'PRODUCTION_ORDER.WEAVE_PLAN.PATH_LAYOUT.TOTAL_BUGGY_LENGTH' | bmsTranslate }}
\n
{{ getTotalBuggyLengthLabel() }}
\n
\n
\n
{{ 'PRODUCTION_ORDER.WEAVE_PLAN.PATH_LAYOUT.CURRENT_LENGTH_IN_BUGGY' | bmsTranslate }}
\n
{{ getCurrentLengthInBuggyLabel() }}
\n
\n
\n","import {Injectable} from '@angular/core';\n\ndeclare var gtag: any;\n\n@Injectable({providedIn: 'root'})\nexport class AnalyticsService {\n public trackEvent(eventName: string, eventDetails: string, eventCategory: string): void {\n gtag('event', eventName, {\n // event Type - example: 'SCROLL_TO_TOP_CLICKED'\n event_category: eventCategory,\n // the label that will show up in the dashboard as the events name\n event_label: eventName,\n // a short description of what happened\n value: eventDetails\n });\n }\n}\n","\n \n\n\n\n","import {CdkDragDrop} from '@angular/cdk/drag-drop';\nimport {\n AfterViewInit,\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n QueryList,\n Renderer2,\n SimpleChanges,\n ViewChild,\n ViewChildren\n} from '@angular/core';\nimport {MatDialog, MatDialogRef} from '@angular/material/dialog';\nimport {DraggingService} from '@application/services/dragging/dragging.service';\nimport {Coordinates} from '@domain/coordinates';\nimport {PositionOfDialog} from '@domain/position-of-dialog';\nimport {BmpProductionScheduleItemInPathGroup} from '@domain/production-schedule/bmp-production-schedule-item-in-path-group';\nimport {ProductionOrderCustomSettings} from '@domain/production-schedule/custom-settings/production-order-custom-settings';\nimport {DrawingType} from '@domain/production-schedule/drawing-type.enum';\nimport {FreeZone} from '@domain/production-schedule/free-zone/free-zone';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {ProductionScheduleOrderLine} from '@domain/production-schedule/production-schedule-order-line';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {ProductionSchedulePhase} from '@domain/production-schedule/production-schedule-phase.enum';\nimport {RestZone} from '@domain/production-schedule/rest-zone/rest-zone';\nimport {PropertyValue} from '@domain/property-value';\nimport {OverviewListColoredYarnSetWithStartDent} from '@domain/textile-data/creel/overview-list-colored-yarn-set-with-start-dent';\nimport {ListDrawing} from '@presentation/components/drawing-list/list-drawing';\nimport {RepositionDialogComponent} from '@presentation/components/reposition-dialog/reposition-dialog.component';\nimport {AssertionUtils, BaseComponent, Color, ColorConstants, convertToCommercialUnitCentimeter, DialogBuilderFactoryService, DialogType, DOMUtils, Unit} from '@vdw/angular-component-library';\nimport {select as d3Select, selectAll as d3SelectAll} from 'd3-selection';\nimport {cloneDeep} from 'lodash-es';\nimport {filter, takeUntil} from 'rxjs';\nimport {EditProductionScheduleItemInPathGroupAction} from '../../modals/edit-production-schedule-item-in-path-group/edit-production-schedule-item-in-path-group-action';\nimport {EditProductionScheduleItemInPathGroupComponent} from '../../modals/edit-production-schedule-item-in-path-group/edit-production-schedule-item-in-path-group.component';\nimport {PathItemInfoTooltipContext} from '../../modals/path-item-info-tooltip/path-item-info-tooltip-context.enum';\nimport {PathItemInfoTooltipComponent} from '../../modals/path-item-info-tooltip/path-item-info-tooltip.component';\nimport {PRODUCTION_SCHEDULE_PLAN, ProductionSchedulePlan} from '../../production-schedule-plan';\nimport {MovePathItemParams} from './move-path-item-params.interface';\n\n@Component({\n selector: 'app-path-bar-component',\n templateUrl: './path-bar.component.html',\n styleUrls: ['./path-bar.component.scss']\n})\nexport class PathBarComponent extends BaseComponent implements OnInit, OnChanges, OnDestroy, AfterViewInit {\n @Input() public productionSchedule: ProductionSchedule;\n @Input() public productionSchedulePath: ProductionSchedulePath;\n @Input() public productionSchedulePathIndex: number;\n @Input() public productionScheduleColoredYarnSet: OverviewListColoredYarnSetWithStartDent;\n @Input() public commercialUnit: Unit;\n @Input() public listOfCustomSettings: PropertyValue[];\n @Input() public productionOrderCustomSettings: ProductionOrderCustomSettings;\n @Input() public originalBuggyLengthMaxInPicks: number;\n @Input() public buggyLengthMaxInPicks: number;\n @Input() public availableSpaceInBuggyInPicks: number;\n @Input() public buggyLengthMinInPicks: number;\n @Input() public productionSchedulePhase: ProductionSchedulePhase;\n @Input() public selectedPath: ProductionSchedulePath;\n @Input() public selectedRestPathColoredYarnSet: OverviewListColoredYarnSetWithStartDent;\n @Input() public minimumBuggyLengthIndicatorPlace: number;\n @Input() public maximumBuggyLengthIndicatorPlace: number;\n @Input() public isDraggingProductionScheduleItem: boolean;\n @Input() public isResizing: boolean;\n @Output() public minimumBuggyLengthIndicatorPlaceOutput = new EventEmitter();\n @Output() public maximumBuggyLengthIndicatorPlaceOutput = new EventEmitter();\n @Output() public isDraggingProductionScheduleItemOutput = new EventEmitter();\n @Output() public hoverPathBarOutput = new EventEmitter();\n @Output() public selectedPathOutput: EventEmitter = new EventEmitter();\n @Output() public selectedRestPathColoredYarnSetOutput: EventEmitter = new EventEmitter();\n\n @ViewChild('pathBar') public pathBar: ElementRef;\n @ViewChildren('itemsInPathGroup') public itemInPathGroupComponents: QueryList;\n\n public suggestedRestZones: RestZone[];\n public widthOfPathItems: number[] = [];\n public suggestedFreeZones: FreeZone[];\n private productionScheduleItem: ProductionScheduleItemInPathGroup;\n private productionScheduleItemIndexInPath: number;\n private dialogRef: MatDialogRef;\n private editWindowOpen = false;\n private TOTAL_TO_DEDUCT_FROM_PATH_ITEM_FOR_PADDING_AND_GAPS = 0;\n\n private readonly VERTICAL_HOVER_OFFSET = 64;\n private readonly HORIZONTAL_HOVER_OFFSET = 64;\n private readonly MINIMAL_WIDTH_OF_PATH_BAR_ITEM = 8;\n private readonly DIALOG_WIDTH = 334;\n private readonly PADDING_AND_GAP_SIZE = 4;\n private readonly REPOSITION_DIALOG_CLASS = 'reposition-dialog';\n private readonly WEAVE_PLAN_TRANSLATION_KEY = 'PRODUCTION_ORDER.WEAVE_PLAN.WEAVE_PLAN';\n\n public constructor(\n @Inject(PRODUCTION_SCHEDULE_PLAN) private readonly productionSchedulePlan: ProductionSchedulePlan,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n private readonly elementRef: ElementRef,\n private readonly renderer: Renderer2,\n private readonly draggingService: DraggingService,\n private readonly zone: NgZone,\n private readonly dialog: MatDialog\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this.setTotalToDeductFromPathItemForPaddingAndGaps();\n this.initialiseDropService();\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (\n 'buggyLengthMaxInPicks' in changes ||\n 'availableSpaceInBuggyInPicks' in changes ||\n 'productionSchedule' in changes ||\n 'productionSchedulePath' in changes ||\n 'originalBuggyLengthMaxInPicks' in changes\n ) {\n setTimeout(() => {\n this.resizePathBarComponent();\n });\n }\n }\n\n public ngAfterViewInit(): void {\n if (!AssertionUtils.isNullOrUndefined(this.pathBar)) {\n DOMUtils.observeResize(this.pathBar.nativeElement)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe(() => this.resizePathBarComponent());\n }\n }\n\n public ngOnDestroy(): void {\n this.dialogRef?.close();\n }\n\n public getPathItemStyle(pathItem: ProductionScheduleItemInPathGroup): object {\n if (pathItem.scheduleItemType === DrawingType.MANUAL_NON_PRODUCTION_ITEM) {\n return {'background-image': 'url(\"assets/images/jute-background.svg\")'};\n } else {\n const rgbValues = this.productionScheduleColoredYarnSet?.coloredYarnSet?.overviewListColorSet?.creelPositions[pathItem.borderColorPosition - 1]?.items[0] as Color;\n return {'background-color': `rgb(${rgbValues?.rgb?.red}, ${rgbValues?.rgb?.green}, ${rgbValues?.rgb?.blue})`};\n }\n }\n\n public getPathBarBorderColor(): string {\n if (!AssertionUtils.isNullOrUndefined(this.productionSchedulePath) && this.selectedPath === this.productionSchedulePath) {\n return ColorConstants.PRIMARY_COLOR_VDW_BLUE;\n } else if (!AssertionUtils.isNullOrUndefined(this.selectedRestPathColoredYarnSet) && this.selectedRestPathColoredYarnSet.startDent === this.productionScheduleColoredYarnSet.startDent) {\n return ColorConstants.PRIMARY_COLOR_VDW_BLUE;\n } else {\n return ColorConstants.TINT_DARKBLUE_20;\n }\n }\n\n public canShowMinimumbuggyLengthIndicator(): boolean {\n return this.buggyLengthMaxInPicks !== this.buggyLengthMinInPicks && !AssertionUtils.isNullOrUndefined(this.buggyLengthMinInPicks);\n }\n\n public canShowMaxmimumbuggyLengthIndicator(): boolean {\n return this.buggyLengthMaxInPicks !== this.originalBuggyLengthMaxInPicks && !AssertionUtils.isNullOrUndefined(this.buggyLengthMaxInPicks);\n }\n\n public resizePathBarComponent(): void {\n this.setTotalToDeductFromPathItemForPaddingAndGaps();\n this.setWidthOfPathItems();\n this.setMinimumBuggyLengthIndicatorPlace();\n this.setMaximumBuggyLengthIndicatorPlace();\n }\n\n public draggingStopped(): void {\n this.isDraggingProductionScheduleItem = false;\n this.isDraggingProductionScheduleItemOutput.emit(this.isDraggingProductionScheduleItem);\n }\n\n public onRowDrag(productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup, productionScheduleItemInPathGroupIndex: number): void {\n this.isDraggingProductionScheduleItem = true;\n this.isDraggingProductionScheduleItemOutput.emit(this.isDraggingProductionScheduleItem);\n\n this.draggingService.setData({\n draggedItem: productionScheduleItemInPathGroup,\n sourcePath: this.productionSchedulePath,\n productionScheduleItemInPathGroupIndex,\n sourceColoredYarnSet: this.productionScheduleColoredYarnSet\n } as MovePathItemParams);\n }\n\n public openEditProductionScheduleItemDialog(event: MouseEvent, productionScheduleItem: ProductionScheduleItemInPathGroup, productionScheduleItemIndexInPath: number): void {\n this.productionScheduleItem = productionScheduleItem;\n this.productionScheduleItemIndexInPath = productionScheduleItemIndexInPath;\n this.editWindowOpen = true;\n\n this.dialogBuilderFactoryService\n .getBuilder()\n .withWidth('334px')\n .withClass(this.REPOSITION_DIALOG_CLASS)\n .withCustomBackdrop('transparent-backdrop')\n .openDialog(RepositionDialogComponent, {\n component: EditProductionScheduleItemInPathGroupComponent,\n sourceElement: event.target,\n positionOfDialog: PositionOfDialog.RIGHT,\n horizontalOffset: event.offsetX - (event.target as HTMLElement).clientWidth,\n productionScheduleItemInPathGroup: this.productionScheduleItem,\n commercialUnit: this.commercialUnit,\n productionSchedule: this.productionSchedule,\n allowExceedingRequestedAmountOfOrderLineItems: this.productionOrderCustomSettings?.allowExceedingRequestedAmountOfOrderLineItems,\n pickDensityInPicksPerMeter: this.productionSchedule.machineQuality.pickDensity * 1000\n })\n .pipe(filter((result: {action: EditProductionScheduleItemInPathGroupAction; value: ProductionScheduleItemInPathGroup}) => !AssertionUtils.isNullOrUndefined(result)))\n .subscribe((result: {action: EditProductionScheduleItemInPathGroupAction; value: ProductionScheduleItemInPathGroup}) => {\n if (result.action === EditProductionScheduleItemInPathGroupAction.EDIT) {\n this.editProductionScheduleItem(result.value);\n } else {\n this.removeProductionScheduleItemInPathGroup();\n }\n\n this.editWindowOpen = false;\n });\n }\n\n public closeDialogIfOpen(): void {\n if (!this.editWindowOpen) {\n this.dialog.closeAll();\n }\n }\n\n public openHoverInfoTooltip(event: MouseEvent, productionScheduleItem: ProductionScheduleItemInPathGroup, index: number): void {\n if (event.type === 'mouseup') {\n this.isResizing = false;\n this.hoverPathBarOutput.emit();\n }\n\n event.preventDefault();\n event.stopPropagation();\n\n if (this.isResizing) {\n return;\n }\n\n if (!this.isDraggingProductionScheduleItem) {\n this.zone.runOutsideAngular(() => {\n this.dialogRef = this.dialogBuilderFactoryService\n .getBuilder()\n .withWidth(`${this.DIALOG_WIDTH}px`)\n .withClass(this.REPOSITION_DIALOG_CLASS)\n .withCustomBackdrop('no-pointer-events-backdrop')\n .open(RepositionDialogComponent, {\n showArrow: false,\n event,\n sourceElement: event.target,\n component: PathItemInfoTooltipComponent,\n positionOfDialog: window.innerWidth - event.clientX > this.DIALOG_WIDTH ? PositionOfDialog.RIGHT : PositionOfDialog.LEFT,\n verticalOffset: this.VERTICAL_HOVER_OFFSET,\n horizontalOffset: this.HORIZONTAL_HOVER_OFFSET,\n moveWithCursor: true,\n context: PathItemInfoTooltipContext.PATH_BAR,\n number: index + 1,\n drawingName: productionScheduleItem.drawing?.name,\n image: productionScheduleItem.scheduleItemType === DrawingType.MANUAL_NON_PRODUCTION_ITEM ? {data: 'assets/images/jute-background.svg'} : productionScheduleItem.drawing?.image,\n finishingName: this.getFinishingName(productionScheduleItem),\n cutbarBefore: productionScheduleItem.getCutbarInformation()?.cutbarBefore?.commercialLengthInMM,\n cutbarAfter: productionScheduleItem.getCutbarInformation()?.cutbarAfter?.commercialLengthInMM,\n cutbarBeforeInPicks: productionScheduleItem.getCutbarInformation()?.cutbarBefore?.technicalLengthInNumberOfPicks,\n cutbarAfterInPicks: productionScheduleItem.getCutbarInformation()?.cutbarAfter?.technicalLengthInNumberOfPicks,\n quantity: this.productionSchedule.machine.jacquard.isSisal\n ? productionScheduleItem.quantity\n : productionScheduleItem.quantity * this.productionSchedule.getProductionScheduleItemMultiplier(),\n orderline: this.getOrderlineProperty(productionScheduleItem.orderLineId)?.salesOrderLineReference ?? '',\n sales: this.getOrderlineProperty(productionScheduleItem.orderLineId)?.salesOrderReference ?? '',\n dueDate: this.getOrderlineProperty(productionScheduleItem.orderLineId)?.desiredDate,\n width: convertToCommercialUnitCentimeter({\n unit: Unit.MILLIMETER,\n value: productionScheduleItem?.commercialDimensionsInMM?.widthInMM\n }),\n length: convertToCommercialUnitCentimeter({\n unit: Unit.MILLIMETER,\n value: productionScheduleItem?.commercialDimensionsInMM?.heightInMM\n })\n });\n });\n }\n }\n\n public moveDroppedDrawingToProductionSchedulePath(event: CdkDragDrop): void {\n const dragProperties: MovePathItemParams = cloneDeep(this.draggingService.getCurrentData());\n if (\n AssertionUtils.isNullOrUndefined(this.productionSchedulePath) &&\n this.productionSchedule?.canMoveProductionScheduleItemToColoredYarnSet(dragProperties?.sourcePath?.pathNumber, this.productionScheduleColoredYarnSet?.startDent, dragProperties?.draggedItem)\n ) {\n this.productionSchedulePlan?.moveProductionScheduleItemToColoredYarnSet(\n dragProperties?.sourcePath?.pathNumber,\n dragProperties?.sourceColoredYarnSet,\n this.productionScheduleColoredYarnSet,\n dragProperties.draggedItem\n );\n } else if (\n (AssertionUtils.isNullOrUndefined(this.productionSchedulePath) &&\n !this.productionSchedule?.canMoveProductionScheduleItemToColoredYarnSet(\n dragProperties?.sourcePath?.pathNumber,\n this.productionScheduleColoredYarnSet?.startDent,\n dragProperties?.draggedItem\n )) ||\n (!AssertionUtils.isNullOrUndefined(this.productionSchedulePath) &&\n this.productionSchedulePath.pathNumber !== dragProperties?.sourcePath?.pathNumber &&\n !this.productionSchedule?.canAddProductionScheduleItemToProductionSchedulePathForNewBuilder(dragProperties?.draggedItem, this.productionSchedulePath?.technicalWidthInDents))\n ) {\n this.dialogBuilderFactoryService.getBuilder().openAlertDialog({\n titleText: this.WEAVE_PLAN_TRANSLATION_KEY,\n messageText: 'PRODUCTION_ORDER.WEAVE_PLAN.WARNINGS.PATH_WIDTH_DOES_NOT_EQUAL_DESIGN_WIDTH',\n type: DialogType.INFORMATION\n });\n } else if (this.productionSchedule?.canAddProductionScheduleItemToProductionSchedulePathForNewBuilder(dragProperties?.draggedItem, this.productionSchedulePath?.technicalWidthInDents)) {\n this.productionSchedulePlan?.moveProductionScheduleItemToProductionSchedulePath(\n dragProperties?.sourcePath?.pathNumber,\n dragProperties?.productionScheduleItemInPathGroupIndex,\n dragProperties?.sourceColoredYarnSet,\n this.productionSchedulePath.pathNumber,\n event.currentIndex,\n this.productionScheduleColoredYarnSet,\n dragProperties?.draggedItem\n );\n }\n }\n\n private setTotalToDeductFromPathItemForPaddingAndGaps(): void {\n this.TOTAL_TO_DEDUCT_FROM_PATH_ITEM_FOR_PADDING_AND_GAPS = this.PADDING_AND_GAP_SIZE - this.PADDING_AND_GAP_SIZE / this.productionSchedulePath?.pathGroups?.length;\n }\n\n private initialiseDropService(): void {\n d3Select(this.elementRef.nativeElement).datum(this.productionSchedulePath);\n this.zone.runOutsideAngular(() => {\n d3Select(this.elementRef.nativeElement)\n .on('drop', (event: DragEvent) => this.droppedNewDrawingOnProductionSchedulePath(event))\n .on('dragover', (event: DragEvent) => this.draggedNewDrawingOverProductionSchedulePath(event))\n .on('dragenter', (event: DragEvent) => event.stopPropagation())\n .on('dragleave', (event: DragEvent) => {\n event.stopPropagation();\n this.removeDropIndicator();\n });\n });\n }\n\n private droppedNewDrawingOnProductionSchedulePath(event: DragEvent): void {\n const draggedItem: ListDrawing = cloneDeep(this.draggingService.getCurrentData());\n\n if (!AssertionUtils.isNullOrUndefined(draggedItem) && !('quantity' in this.draggingService.getCurrentData())) {\n this.addDroppedDrawingToProductionSchedulePath(event, draggedItem);\n\n this.renderer.removeClass(this.elementRef.nativeElement.children[0], 'highlight');\n d3Select('.drawing-drag-preview').remove();\n\n this.removeDropIndicator();\n }\n }\n\n private draggedNewDrawingOverProductionSchedulePath(event: DragEvent): void {\n event.preventDefault();\n event.stopPropagation();\n\n const draggedItem: ListDrawing = this.draggingService.getCurrentData();\n\n if (!AssertionUtils.isNullOrUndefined(draggedItem) && !('quantity' in draggedItem)) {\n this.removeDropIndicator();\n }\n }\n\n private removeDropIndicator(): void {\n d3SelectAll('.production-schedule-drop-indicator').remove();\n }\n\n private addDroppedDrawingToProductionSchedulePath(event: DragEvent, draggedItem: ListDrawing): void {\n if (\n AssertionUtils.isNullOrUndefined(this.productionSchedulePath) &&\n this.productionSchedule.canAddProductionScheduleItemToColoredYarnSet(this.productionScheduleColoredYarnSet.startDent, draggedItem)\n ) {\n this.productionSchedulePlan\n .addDrawingToColoredYarnSet(draggedItem, this.productionScheduleColoredYarnSet.startDent)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((path: ProductionSchedulePath) => {\n if (!AssertionUtils.isNullOrUndefined(path)) {\n this.selectedPath = path;\n this.selectedRestPathColoredYarnSet = undefined;\n this.selectedPathOutput.emit(this.selectedPath);\n this.selectedRestPathColoredYarnSetOutput.emit(this.selectedRestPathColoredYarnSet);\n }\n });\n } else if (\n !AssertionUtils.isNullOrUndefined(this.productionSchedulePath) &&\n this.productionSchedule.canAddProductionScheduleItemToProductionSchedulePathForNewBuilder(draggedItem, this.productionSchedulePath?.technicalWidthInDents)\n ) {\n const productionSchedulePathsOfColoredYarnSet = this.productionSchedule.getProductionSchedulePathsOfColoredYarnSetAtStartDent(this.productionScheduleColoredYarnSet.startDent);\n const productionScheduleItemsInPathGroup: ElementRef[] = this.itemInPathGroupComponents\n .toArray()\n .map((productionScheduleItemInPathGroup: any) => productionScheduleItemInPathGroup.nativeElement as ElementRef);\n\n const destinationIndexInProductionSchedulePath = this.getDropDestinationIndexInPath(this.getMouseCoordinatesInProductionSchedulePath(event), productionScheduleItemsInPathGroup);\n\n this.productionSchedulePlan.addDrawingToProductionSchedulePath(\n draggedItem,\n this.productionSchedulePath.pathNumber,\n productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet,\n !AssertionUtils.isNullOrUndefined(destinationIndexInProductionSchedulePath) ? destinationIndexInProductionSchedulePath : null\n );\n } else {\n this.dialogBuilderFactoryService.getBuilder().openAlertDialog({\n titleText: this.WEAVE_PLAN_TRANSLATION_KEY,\n messageText: 'PRODUCTION_ORDER.WEAVE_PLAN.WARNINGS.PATH_WIDTH_DOES_NOT_EQUAL_DESIGN_WIDTH',\n type: DialogType.INFORMATION\n });\n }\n }\n\n private getDropDestinationIndexInPath(mouseCoordinates: Coordinates, productionScheduleItemsInPathGroup: ElementRef[]): number {\n let closestIndex: number | null = null;\n let closestDistance: number = Infinity;\n\n productionScheduleItemsInPathGroup.forEach((productionScheduleItemInPathGroup: any, index: number) => {\n const rect = productionScheduleItemInPathGroup.getBoundingClientRect();\n const distanceFromStart = Math.abs(mouseCoordinates.x - rect.left);\n const distanceFromEnd = Math.abs(mouseCoordinates.x - rect.right);\n\n if (distanceFromStart < closestDistance && distanceFromStart < distanceFromEnd) {\n closestDistance = distanceFromStart;\n closestIndex = index;\n } else if (distanceFromEnd < closestDistance) {\n closestDistance = distanceFromEnd;\n closestIndex = index + 1;\n }\n });\n\n return closestIndex;\n }\n\n private setMinimumBuggyLengthIndicatorPlace(): void {\n if (\n !AssertionUtils.isNullOrUndefined(this.pathBar?.nativeElement?.offsetWidth) &&\n !AssertionUtils.isNullOrUndefined(this.buggyLengthMaxInPicks) &&\n !AssertionUtils.isNullOrUndefined(this.buggyLengthMinInPicks)\n ) {\n const availableWindowSpace = this.pathBar?.nativeElement?.offsetWidth;\n const widthPerPixel = availableWindowSpace / this.buggyLengthMaxInPicks;\n\n this.minimumBuggyLengthIndicatorPlace = this.buggyLengthMinInPicks * widthPerPixel;\n this.minimumBuggyLengthIndicatorPlaceOutput.emit(this.minimumBuggyLengthIndicatorPlace);\n }\n }\n\n private getFinishingName(productionScheduleItem: ProductionScheduleItemInPathGroup): string {\n let name = '';\n\n if (!AssertionUtils.isNullOrUndefined(productionScheduleItem.orderline)) {\n name = productionScheduleItem.orderline?.article?.finishing?.nameWithVersion;\n } else if (!AssertionUtils.isNullOrUndefined(productionScheduleItem.drawing) && productionScheduleItem.drawing.drawingType === DrawingType.BMP) {\n const bmpProductionScheduleItem = productionScheduleItem as any as BmpProductionScheduleItemInPathGroup;\n name = bmpProductionScheduleItem?.finishing?.nameWithVersion;\n }\n\n return name;\n }\n\n private setMaximumBuggyLengthIndicatorPlace(): void {\n if (\n !AssertionUtils.isNullOrUndefined(this.pathBar?.nativeElement?.offsetWidth) &&\n !AssertionUtils.isNullOrUndefined(this.buggyLengthMaxInPicks) &&\n !AssertionUtils.isNullOrUndefined(this.originalBuggyLengthMaxInPicks) &&\n !AssertionUtils.isNullOrUndefined(this.productionSchedulePath)\n ) {\n const availableWindowSpace = this.pathBar?.nativeElement?.offsetWidth;\n const widthPerPixel = availableWindowSpace / this.buggyLengthMaxInPicks;\n\n this.maximumBuggyLengthIndicatorPlace = this.originalBuggyLengthMaxInPicks * widthPerPixel;\n this.maximumBuggyLengthIndicatorPlaceOutput.emit(this.maximumBuggyLengthIndicatorPlace);\n }\n }\n\n private getMouseCoordinatesInProductionSchedulePath(event: DragEvent): Coordinates {\n return {x: event.x, y: event.y};\n }\n\n private setWidthOfPathItems(): void {\n if (\n !AssertionUtils.isNullOrUndefined(this.pathBar?.nativeElement?.offsetWidth) &&\n !AssertionUtils.isNullOrUndefined(this.buggyLengthMaxInPicks) &&\n !AssertionUtils.isNullOrUndefined(this.productionSchedulePath)\n ) {\n const availableWindowSpace = this.pathBar?.nativeElement?.offsetWidth;\n let availableSpaceInBuggy: number;\n\n if (AssertionUtils.isNullOrUndefined(this.availableSpaceInBuggyInPicks) || this.availableSpaceInBuggyInPicks === this.buggyLengthMaxInPicks) {\n availableSpaceInBuggy = this.buggyLengthMaxInPicks;\n } else if (this.availableSpaceInBuggyInPicks > 0) {\n availableSpaceInBuggy = this.availableSpaceInBuggyInPicks + this.getLongestPathLengthInPicks(this.productionSchedule);\n } else {\n availableSpaceInBuggy = this.getLongestPathLengthInPicks(this.productionSchedule);\n }\n\n const widthPerPixel = availableWindowSpace / availableSpaceInBuggy;\n\n this.productionSchedulePath?.pathGroups?.forEach((productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup, index: number) => {\n const widthOfPathItem = (this.widthOfPathItems[index] =\n (productionScheduleItemInPathGroup?.technicalDimensions?.heightInPicks + productionScheduleItemInPathGroup.getTechnicalCutbarsLengthInNumberOfPicks()) *\n productionScheduleItemInPathGroup?.quantity *\n widthPerPixel -\n this.TOTAL_TO_DEDUCT_FROM_PATH_ITEM_FOR_PADDING_AND_GAPS);\n\n if (widthOfPathItem < this.MINIMAL_WIDTH_OF_PATH_BAR_ITEM) {\n this.widthOfPathItems[index] = this.MINIMAL_WIDTH_OF_PATH_BAR_ITEM;\n } else {\n this.widthOfPathItems[index] = widthOfPathItem;\n }\n });\n }\n }\n\n private getLongestPathLengthInPicks(productionSchedule: ProductionSchedule): number {\n const productionSchedulePathLenths =\n productionSchedule?.productionSchedulePathsOfColoredYarnSets\n .flatMap((productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet) => productionSchedulePathsOfColoredYarnSet?.productionSchedulePaths ?? [])\n .map((productionSchedulePath: ProductionSchedulePath) => this.getTotalHeightsOfProductionSchedulePath(productionSchedulePath).totalHeightInPicks ?? 0) ?? [];\n\n return Math.max(0, ...productionSchedulePathLenths);\n }\n\n private getTotalHeightsOfProductionSchedulePath(productionSchedulePath: ProductionSchedulePath): {totalHeightInPicks: number; totalHeightInMM: number} {\n let totalHeightInPicks = 0;\n let totalHeightInMM = 0;\n\n productionSchedulePath?.pathGroups?.forEach((item: ProductionScheduleItemInPathGroup) => {\n totalHeightInPicks = totalHeightInPicks + (item?.technicalDimensions?.heightInPicks + item?.getTechnicalCutbarsLengthInNumberOfPicks()) * item?.quantity;\n totalHeightInMM = totalHeightInMM + (item?.commercialDimensionsInMM?.heightInMM + item?.getCommercialCutbarsLengthInMM()) * item?.quantity;\n });\n\n return {totalHeightInPicks: totalHeightInPicks ?? 0, totalHeightInMM: totalHeightInMM ?? 0};\n }\n\n private editProductionScheduleItem(productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup): void {\n this.productionScheduleItem = productionScheduleItemInPathGroup;\n\n this.productionSchedulePlan.editProductionScheduleItem(\n productionScheduleItemInPathGroup,\n this.productionScheduleItemIndexInPath,\n this.productionSchedulePathIndex,\n this.productionScheduleColoredYarnSet.startDent\n );\n }\n\n private removeProductionScheduleItemInPathGroup(): void {\n const productionSchedulePathOfColoredYarnSet = this.productionSchedule.getProductionSchedulePathsOfColoredYarnSetAtStartDent(this.productionScheduleColoredYarnSet.startDent);\n const productionSchedulePath = productionSchedulePathOfColoredYarnSet.productionSchedulePaths[this.productionSchedulePathIndex];\n\n this.productionSchedulePlan.removeProductionScheduleItem(\n this.productionScheduleItem.uuid,\n productionSchedulePath.pathNumber,\n productionSchedulePathOfColoredYarnSet.productionScheduleColoredYarnSet.startDent,\n true\n );\n }\n\n private getOrderlineProperty(orderLineId: number): ProductionScheduleOrderLine {\n if (orderLineId !== null && this.productionSchedule && !AssertionUtils.isEmpty(this.productionSchedule.orderLines)) {\n const foundOrderLine = this.productionSchedule.orderLines.find((orderLine: ProductionScheduleOrderLine) => orderLine.id === orderLineId);\n\n if (foundOrderLine) {\n return foundOrderLine;\n }\n }\n\n return null;\n }\n}\n","\n \n \n

{{ 'PRODUCTION_ORDER.WEAVE_PLAN.PATH_LAYOUT.PATH_LAYOUT' | bmsTranslate }}

\n
\n\n
\n \n\n \n \n \n\n \n \n \n \n \n
\n\n \n\n
\n
\n \n \n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.PATH_LAYOUT.SIZE' | bmsTranslate }}: \n {{ getUnitDimensionsForPathLayout() }} \n \n \n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.PATH_LAYOUT.REMAINING_LENGTH_IN_BUGGY' | bmsTranslate }}: \n {{ getRemainingLengthInBuggy() }}\n \n \n
\n
\n\n
\n \n \n \n
\n
\n\n \n
\n @for (\n productionSchedulePathsOfColoredYarnSet of productionSchedule.productionSchedulePathsOfColoredYarnSets;\n track productionSchedulePathsOfColoredYarnSet?.productionScheduleColoredYarnSet?.startDent;\n let productionScheduleColoredYarnSetIndex = $index\n ) {\n \n @for (\n path of productionSchedule | getProductionSchedulePathsAndZonesForColoredYarnSet: productionScheduleColoredYarnSetIndex : productionSchedulePhase;\n track path.startDent;\n let pathIndex = $index\n ) {\n \n
\n
\n
\n
{{ getProductionSchedulePathLabel($any(path), productionSchedulePathsOfColoredYarnSet) }}
\n \n \n
\n
\n
\n\n
\n
\n
\n
\n \n \n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.PATH_LAYOUT.SIZE' | bmsTranslate }}: \n {{ getUnitDimensionsForPath($any(path)) }}\n \n \n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.PATH_LAYOUT.DIFFERENCE' | bmsTranslate }}: \n {{ getUnitDimesionsForDifference($any(path)) }}\n \n \n
\n
\n
\n\n \n\n
\n \n \n \n \n \n \n \n
\n
\n
\n\n \n \n
\n \n }\n\n \n
\n
\n {{\n getProductionScheduleRestPathLabel(productionSchedulePathsOfColoredYarnSet, productionScheduleColoredYarnSetIndex)\n }}\n
\n\n
\n
\n
\n
\n \n \n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.PATH_LAYOUT.SIZE' | bmsTranslate }}: \n {{ getUnitDimensionsForPathRest(productionSchedulePathsOfColoredYarnSet) }}\n \n \n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.PATH_LAYOUT.DIFFERENCE' | bmsTranslate }}: \n {{ getUnitDimesionsForDifference($any(productionSchedulePathsOfColoredYarnSet)) }}\n \n \n
\n
\n
\n\n \n
\n
\n\n \n \n \n
\n \n }\n \n
\n
\n","import {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n QueryList,\n SimpleChanges,\n ViewChild,\n ViewChildren\n} from '@angular/core';\nimport {MatDialogRef} from '@angular/material/dialog';\nimport {MatMenuTrigger} from '@angular/material/menu';\nimport {NavigationHelperService} from '@application/helper/navigation-helper/navigation-helper.service';\nimport {NavigationNewItemData} from '@application/helper/navigation-helper/navigation-new-item-data.interface';\nimport {NavigationSelectedMenuItemData} from '@application/helper/navigation-helper/navigation-selected-menu-item-data.interface';\nimport {OrderLinesGridService} from '@application/helper/orderbook/order-lines-grid.service';\nimport {PathLayoutTemplate} from '@domain/path-layout-template/path-layout-template';\nimport {PathLayoutTemplatePath} from '@domain/path-layout-template/path-layout-template-path';\nimport {PositionOfDialog} from '@domain/position-of-dialog';\nimport {ProductionOrderCustomSettings} from '@domain/production-schedule/custom-settings/production-order-custom-settings';\nimport {FreeZone} from '@domain/production-schedule/free-zone/free-zone';\nimport {ManualNonProductionItemDrawing} from '@domain/production-schedule/manual-non-production-item-drawing';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionScheduleDrawingViewMode} from '@domain/production-schedule/production-schedule-drawing-view-mode.enum';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {ProductionSchedulePhase} from '@domain/production-schedule/production-schedule-phase.enum';\nimport {RestZone} from '@domain/production-schedule/rest-zone/rest-zone';\nimport {Permission} from '@domain/profile/permission.enum';\nimport {PropertyValue} from '@domain/property-value';\nimport {ColoredYarnSetPosition} from '@domain/textile-data/creel/colored-yarn-set-position';\nimport {OverviewListColoredYarnSetWithStartDent} from '@domain/textile-data/creel/overview-list-colored-yarn-set-with-start-dent';\nimport {PathWidth} from '@domain/textile-data/machine-quality/path-width';\nimport {HttpPathLayoutTemplatesService} from '@infrastructure/http/path-layout-template/http-path-layout-templates.service';\nimport {ListDrawing} from '@presentation/components/drawing-list/list-drawing';\nimport {ListDrawingJute} from '@presentation/components/drawing-list/list-drawing-jute';\nimport {RepositionDialogComponent} from '@presentation/components/reposition-dialog/reposition-dialog.component';\nimport {PathLayoutTemplateService} from '@presentation/components/select-path-layout-template/path-layout-template.service';\nimport {SelectPathLayoutTemplateComponent} from '@presentation/components/select-path-layout-template/select-path-layout-template.component';\nimport {AddJuteToPathComponent} from '@presentation/pages/texfab/production-schedule/add/plan/modals/add-jute-to-path/add-jute-to-path.component';\nimport {WeaveQualityType} from '@presentation/pages/textile-data/machine-quality/overview/weave-quality-type.enum';\nimport {AnalyticsService} from '@shared/analytics.service';\nimport {\n AssertionUtils,\n BaseComponent,\n ColorConstants,\n convertCommercialUnit,\n convertDentsToWidthInMeter,\n convertPicksToHeightInMeter,\n convertWidthInMeterToDents,\n DialogBuilderFactoryService,\n DialogComponentData,\n DialogType,\n EnumUtils,\n TranslateService,\n Unit\n} from '@vdw/angular-component-library';\nimport {cloneDeep, round} from 'lodash-es';\nimport {Subscription, takeUntil} from 'rxjs';\nimport {RecolorService} from '../../../drawing-library/recolor.service';\nimport {OrderLinesHelper} from '../../../drawing-library/views/order-lines-helper';\nimport {PRODUCTION_SCHEDULE_PLAN, ProductionSchedulePlan} from '../../production-schedule-plan';\nimport {PathBarComponent} from '../path-item/path-bar.component';\nimport {MaxLengthInfoTooltipComponent} from './max-length-info-tooltip/max-length-info-tooltip.component';\nimport {ProductionScheduleBuilderPathLayout} from './production-schedule-builder-path-layout.interface';\n\n@Component({\n selector: 'app-path-layout-component',\n templateUrl: './path-layout.component.html',\n styleUrls: ['./path-layout.component.scss']\n})\nexport class PathLayoutComponent extends BaseComponent implements OnInit, OnChanges, OnDestroy, AfterViewInit {\n @Input() public productionSchedule: ProductionSchedule;\n @Input() public productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet;\n @Input() public commercialUnit: Unit;\n @Input() public listOfCustomSettings: PropertyValue[];\n @Input() public productionOrderCustomSettings: ProductionOrderCustomSettings;\n @Input() public buggyLengthMaxInPicks: number;\n @Input() public buggyLengthMaxInMM: number;\n @Input() public buggyLengthMinInPicks: number;\n @Input() public availableSpaceInBuggyInPicks: number;\n @Input() public availableSpaceInBuggyInCommercialUnit: number;\n @Input() public productionSchedulePhase: ProductionSchedulePhase;\n @Input() public pathWidths: PathWidth[] = [];\n @Input() public isResizing: boolean;\n @Input() public selectedPath: ProductionSchedulePath;\n @Input() public selectedRestPathColoredYarnSet: OverviewListColoredYarnSetWithStartDent;\n @Input() public selectedViewMode: ProductionScheduleDrawingViewMode;\n @Output() public canZoomIn: EventEmitter = new EventEmitter();\n @Output() public canZoomOut: EventEmitter = new EventEmitter();\n @Output() public productionSchedulePlanChanged: EventEmitter = new EventEmitter();\n @Output() public selectedPathOutput: EventEmitter = new EventEmitter();\n @Output() public selectedRestPathColoredYarnSetOutput: EventEmitter = new EventEmitter();\n @Output() public productionSchedulePathsOfColoredYarnSetOutput: EventEmitter = new EventEmitter();\n @Output() public hoverPathBarOutput = new EventEmitter();\n @ViewChildren('paths') public paths: QueryList;\n @ViewChildren('pathsForColoredYarnSets') public pathsForColoredYarnSet: QueryList;\n @ViewChildren('pathBars') public pathBars: QueryList;\n @ViewChild('pathsContainer') public pathsContainer: ElementRef;\n @ViewChild('optionMenuTrigger', {read: MatMenuTrigger}) public optionMenuTrigger: MatMenuTrigger;\n\n public readonly ADD_MANUAL_JUTE_PERMISSION = Permission.ADD_MANUAL_JUTE;\n public readonly ADD_PATH_LAYOUT_TEMPLATE = Permission.TEXFAB_PATH_LAYOUT_TEMPLATE_EDIT;\n public readonly HEADER_AND_PADDING_OF_PATH = 56;\n public maxWidthForDataElements: number;\n public suggestedRestZones: RestZone[];\n public suggestedFreeZones: FreeZone[];\n public heightOfColoredYarnSetsInPercentage: number[] = [];\n public heightOfPathsInPercentage: ProductionScheduleBuilderPathLayout[] = [];\n public heightOfRestPathsInPercentage: number[] = [];\n public newBuggyLengthMaxInPicks: number;\n public optionMenuTimer: Subscription;\n public minimumBuggyLengthIndicatorPlace: number;\n public maximumBuggyLengthIndicatorPlace: number;\n public isDraggingProductionScheduleItem: number;\n public isActionsMenuOpen: boolean = false;\n public isFillingPath = false;\n\n private selectedPathLayoutTemplate: PathLayoutTemplate;\n private dialogRef: MatDialogRef;\n private savedScrollTop = 0;\n\n private readonly DIALOG_WIDTH = 334;\n private readonly REPOSITION_DIALOG_CLASS = 'reposition-dialog';\n private readonly VERTICAL_HOVER_OFFSET = 24;\n private readonly HORIZONTAL_HOVER_OFFSET = -160;\n\n public constructor(\n @Inject(PRODUCTION_SCHEDULE_PLAN) private readonly productionSchedulePlan: ProductionSchedulePlan,\n private readonly pathLayoutTemplateService: PathLayoutTemplateService,\n private readonly translate: TranslateService,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n private readonly changeDetectorRef: ChangeDetectorRef,\n private readonly pathLayoutTemplates: HttpPathLayoutTemplatesService,\n private readonly navigationHelperService: NavigationHelperService,\n private readonly orderLinesHelper: OrderLinesHelper,\n private readonly orderlinesGridService: OrderLinesGridService,\n private readonly recolorService: RecolorService,\n private readonly zone: NgZone,\n private readonly analyticsService: AnalyticsService\n ) {\n super();\n this.orderLinesHelper.commercialUnit = this.commercialUnit;\n }\n\n public ngOnInit(): void {\n this.orderlinesGridService\n .getIsFillingPath()\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((isFillingPath: boolean) => {\n this.isFillingPath = isFillingPath;\n setTimeout(() => {\n this.isFillingPath = false;\n }, 5000);\n });\n\n this.recolorService\n .getRecolorErrorCatch()\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe(() => this.selectRestPath());\n }\n\n public ngAfterViewInit(): void {\n setTimeout(() => {\n this.setHeightOfPaths();\n });\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (!changes?.productionSchedule?.isFirstChange()) {\n this.setHeightOfPaths();\n }\n\n this.setProductionScheduleZones();\n this.setMaxWidthForDataElements();\n\n if (AssertionUtils.isNullOrUndefined(this.selectedPath) && AssertionUtils.isNullOrUndefined(this.selectedRestPathColoredYarnSet)) {\n const path = this.productionSchedule?.productionSchedulePathsOfColoredYarnSets[0]?.productionSchedulePaths[0];\n if (AssertionUtils.isNullOrUndefined(path)) {\n this.selectRestPath();\n } else {\n this.pathSelected(path, this.productionSchedule?.productionSchedulePathsOfColoredYarnSets[0]);\n }\n } else {\n this.updateSelectedPath();\n }\n\n const emptySelectedMenuItemState = {menuItem: null} as NavigationSelectedMenuItemData;\n const selectedMenuItemState = this.navigationHelperService.getPartialState(Object.keys(emptySelectedMenuItemState), true);\n this.navigationHelperService.setNewItemOrReopenDialogIfPresent(\n ({newItemId}: NavigationNewItemData) => this.setPathLayoutTemplate(newItemId, selectedMenuItemState.menuItem.value),\n () => this.selectPathLayoutTemplate()\n );\n }\n\n public ngOnDestroy(): void {\n this.dialogRef?.close();\n }\n\n public canShowSubceedsMinBuggyLengthError(path: ProductionSchedulePath): boolean {\n return this.getTotalHeightsOfProductionSchedulePath(path).totalHeightInPicks < this.buggyLengthMinInPicks;\n }\n\n public canShowExceedsMaxBuggyLengthError(path: ProductionSchedulePath): boolean {\n return this.getTotalHeightsOfProductionSchedulePath(path).totalHeightInPicks > this.buggyLengthMaxInPicks;\n }\n\n public autoFillPath(): void {\n this.analyticsService.trackEvent('button clicked', `Auto fill`, 'Auto fill button clicked');\n this.orderlinesGridService.setAutoFillButtonClicked(true);\n }\n\n public isAutoFillButtonDisabled(): boolean {\n if (!AssertionUtils.isNullOrUndefined(this.selectedPath)) {\n let isPathEqualOrLongerThanMaxBuggyLengthOrPathThatIsLonger =\n this.getTotalHeightsOfProductionSchedulePath(this.selectedPath).totalHeightInPicks >=\n this.orderLinesHelper.getMaxBuggyLengthOrPathThatIsLonger(this.productionSchedule, this.buggyLengthMaxInPicks);\n return isPathEqualOrLongerThanMaxBuggyLengthOrPathThatIsLonger || this.isFillingPath || this.selectedViewMode !== ProductionScheduleDrawingViewMode.ORDER_LINES;\n } else {\n return this.isFillingPath || this.selectedViewMode !== ProductionScheduleDrawingViewMode.ORDER_LINES;\n }\n }\n\n public updateSelectedPath(): void {\n const productionScheduleColoredYarnSet = this.productionSchedule?.productionSchedulePathsOfColoredYarnSets?.find((pathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet) => {\n return pathsOfColoredYarnSet?.productionScheduleColoredYarnSet?.startDent === this.productionSchedulePathsOfColoredYarnSet?.productionScheduleColoredYarnSet?.startDent;\n });\n this.selectedPath = productionScheduleColoredYarnSet?.productionSchedulePaths?.find((path: ProductionSchedulePath) => path?.pathNumber === this.selectedPath?.pathNumber);\n this.selectedPathOutput.emit(this.selectedPath);\n }\n\n public canShowDifference(path: ProductionSchedulePath): boolean {\n let longestPathLengthInPicks = 0;\n\n this.productionSchedule?.productionSchedulePathsOfColoredYarnSets?.forEach((productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet) => {\n productionSchedulePathsOfColoredYarnSet?.productionSchedulePaths?.forEach((productionSchedulePath: ProductionSchedulePath) => {\n longestPathLengthInPicks = Math.max(longestPathLengthInPicks, this.getTotalHeightsOfProductionSchedulePath(productionSchedulePath).totalHeightInPicks);\n });\n });\n\n return this.getTotalHeightsOfProductionSchedulePath(path).totalHeightInPicks < longestPathLengthInPicks;\n }\n\n public canShowRestPath(productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet): boolean {\n let totalPathWidthsInDents = 0;\n productionSchedulePathsOfColoredYarnSet?.productionSchedulePaths?.forEach((productionSchedulePath: ProductionSchedulePath) => {\n totalPathWidthsInDents += productionSchedulePath?.technicalWidthInDents;\n });\n\n return totalPathWidthsInDents < productionSchedulePathsOfColoredYarnSet?.productionScheduleColoredYarnSet?.technicalWidthInDents;\n }\n\n public canMovePath(pathIndex: number, productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet, up: boolean): boolean {\n if (up) {\n return pathIndex !== 0;\n } else {\n return productionSchedulePathsOfColoredYarnSet?.productionSchedulePaths?.length !== pathIndex + 1;\n }\n }\n\n public isProductionSchedulePhaseVerify(): boolean {\n return this.productionSchedulePhase === ProductionSchedulePhase.VERIFY;\n }\n\n public deletePath(path: ProductionSchedulePath, productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet): void {\n this.productionSchedulePlan.removeProductionSchedulePath(path.pathNumber, productionSchedulePathsOfColoredYarnSet?.productionScheduleColoredYarnSet?.startDent);\n\n if (path.pathNumber === this.selectedPath?.pathNumber) {\n this.selectedPath = undefined;\n }\n\n if (AssertionUtils.isNullOrUndefined(this.selectedPath) && AssertionUtils.isNullOrUndefined(this.selectedRestPathColoredYarnSet)) {\n this.selectedRestPathColoredYarnSet = this.productionSchedule?.productionSchedulePathsOfColoredYarnSets[0]?.productionScheduleColoredYarnSet;\n }\n\n this.selectedPathOutput.emit(this.selectedPath);\n this.selectedRestPathColoredYarnSetOutput.emit(this.selectedRestPathColoredYarnSet);\n }\n\n public movePath(path: ProductionSchedulePath, pathIndex: number, productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet, up: boolean): void {\n this.productionSchedulePlan.moveProductionSchedulePathToColoredYarnSet(\n path,\n productionSchedulePathsOfColoredYarnSet?.productionScheduleColoredYarnSet,\n productionSchedulePathsOfColoredYarnSet?.productionScheduleColoredYarnSet,\n up ? pathIndex - 1 : pathIndex + 1,\n pathIndex\n );\n }\n\n public pathSelected(productionSchedulePath: ProductionSchedulePath, productionSchedulePathsOfColoredYarnSet?: ProductionSchedulePathsOfColoredYarnSet): void {\n if (AssertionUtils.isNullOrUndefined(productionSchedulePath)) {\n this.selectedPath = undefined;\n this.selectedRestPathColoredYarnSet = productionSchedulePathsOfColoredYarnSet?.productionScheduleColoredYarnSet;\n } else {\n this.selectedRestPathColoredYarnSet = undefined;\n this.selectedPath = productionSchedulePath;\n }\n this.productionSchedulePathsOfColoredYarnSetOutput.emit(productionSchedulePathsOfColoredYarnSet);\n this.selectedPathOutput.emit(this.selectedPath);\n this.selectedRestPathColoredYarnSetOutput.emit(this.selectedRestPathColoredYarnSet);\n }\n\n public getPathBackgroundColor(productionSchedulePath?: ProductionSchedulePath, productionSchedulePathsOfColoredYarnSet?: ProductionSchedulePathsOfColoredYarnSet): string {\n if (!AssertionUtils.isNullOrUndefined(productionSchedulePath) && this.selectedPath?.pathNumber === productionSchedulePath?.pathNumber) {\n return ColorConstants.TINT_LIGHTBLUE_20;\n } else if (\n !AssertionUtils.isNullOrUndefined(productionSchedulePathsOfColoredYarnSet) &&\n this.selectedRestPathColoredYarnSet?.startDent === productionSchedulePathsOfColoredYarnSet?.productionScheduleColoredYarnSet?.startDent\n ) {\n return ColorConstants.TINT_LIGHTBLUE_20;\n } else {\n return ColorConstants.PRIMARY_COLOR_WHITE;\n }\n }\n\n public isPathChecked(productionSchedulePath?: ProductionSchedulePath, productionSchedulePathsOfColoredYarnSet?: ProductionSchedulePathsOfColoredYarnSet): boolean {\n if (!AssertionUtils.isNullOrUndefined(productionSchedulePath)) {\n return this.selectedPath?.pathNumber === productionSchedulePath?.pathNumber;\n } else if (!AssertionUtils.isNullOrUndefined(productionSchedulePathsOfColoredYarnSet)) {\n return this.selectedRestPathColoredYarnSet?.startDent === productionSchedulePathsOfColoredYarnSet?.productionScheduleColoredYarnSet?.startDent;\n }\n }\n\n public getProductionSchedulePathLabel(productionSchedulePath: ProductionSchedulePath, productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet): string {\n if (this.productionSchedule?.machine?.jacquard?.isSisal) {\n const positionTranslation = productionSchedulePathsOfColoredYarnSet?.productionScheduleColoredYarnSet?.isBottomPosition() ? 'BOTTOM' : 'TOP';\n return `${this.translate.instant(`TEXTILE_DATA.MACHINE_QUALITY.POST_PROCESSING.CLOTH_TYPE_OPTIONS.${positionTranslation}`, {count: 1})} - ${this.translate.instant('PRODUCTION_ORDER.PATH', {\n count: 1\n })} ${productionSchedulePath?.pathNumber}`;\n } else {\n return `${this.translate.instant('PRODUCTION_ORDER.PATH', {count: 1})} ${productionSchedulePath?.pathNumber}`;\n }\n }\n\n public openHoverInfoTooltip(event: MouseEvent): void {\n if (event.type === 'mouseup') {\n this.isResizing = false;\n this.hoverPathBarOutput.emit();\n }\n\n event.preventDefault();\n event.stopPropagation();\n\n if (this.isResizing) {\n return;\n }\n\n if (!this.isDraggingProductionScheduleItem) {\n let lengthInBuggyInPicks = 0;\n let lengthInBuggyInCommercialUnit = 0;\n\n if (!AssertionUtils.isNullOrUndefined(this.productionSchedule?.buggy)) {\n lengthInBuggyInPicks = this.productionSchedule.buggy?.amountPlannedInPicks;\n lengthInBuggyInCommercialUnit = Math.round(\n convertCommercialUnit({\n from: {unit: Unit.METER, value: this.productionSchedule.buggy.amountPlannedInMeter},\n to: this.commercialUnit\n })\n );\n } else {\n lengthInBuggyInPicks = this.getLongestPathLengthInPicks();\n lengthInBuggyInCommercialUnit = this.getLongestPathLengthInCommercialUnit();\n }\n\n this.zone.runOutsideAngular(() => {\n this.dialogRef = this.dialogBuilderFactoryService\n .getBuilder()\n .withWidth(`${this.DIALOG_WIDTH}px`)\n .withClass(this.REPOSITION_DIALOG_CLASS)\n .withCustomBackdrop('no-pointer-events-backdrop')\n .open(RepositionDialogComponent, {\n showArrow: false,\n event,\n sourceElement: event.target,\n component: MaxLengthInfoTooltipComponent,\n positionOfDialog: window.innerWidth - event.clientX > this.DIALOG_WIDTH ? PositionOfDialog.RIGHT : PositionOfDialog.LEFT,\n verticalOffset: this.VERTICAL_HOVER_OFFSET,\n horizontalOffset: this.HORIZONTAL_HOVER_OFFSET,\n moveWithCursor: true,\n buggyLengthMaxInPicks: this.buggyLengthMaxInPicks,\n buggyLengthMaxInCommercialUnit: Math.round(\n convertCommercialUnit({\n from: {unit: Unit.MILLIMETER, value: this.buggyLengthMaxInMM},\n to: this.commercialUnit\n })\n ),\n lengthInBuggyInPicks,\n lengthInBuggyInCommercialUnit,\n commercialUnit: this.commercialUnit\n });\n });\n }\n }\n\n public selectPathLayoutTemplate(): void {\n this.dialogBuilderFactoryService\n .getBuilder()\n .openSelectGridDialog(SelectPathLayoutTemplateComponent, {\n productionSchedule: this.productionSchedule,\n pathWidths: this.pathWidths,\n reedDensityInDentsPerMeter: this.productionSchedule?.machineQuality?.reedDensity * 1000\n })\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe(([pathLayoutTemplate, coloredYarnSetPosition]: [PathLayoutTemplate, ColoredYarnSetPosition]) => {\n this.selectedPathLayoutTemplate = pathLayoutTemplate;\n this.changeDetectorRef.detectChanges();\n if (!AssertionUtils.isNullOrUndefined(this.selectedPathLayoutTemplate)) {\n this.addPathsOfPathLayoutTemplates(coloredYarnSetPosition);\n }\n });\n }\n\n public getProductionScheduleRestPathLabel(productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet, productionScheduleColoredYarnSetIndex?: number): string {\n if (this.productionSchedule?.machine?.jacquard?.isSisal) {\n const positionTranslation = productionSchedulePathsOfColoredYarnSet?.productionScheduleColoredYarnSet.isBottomPosition() ? 'BOTTOM' : 'TOP';\n return `${this.translate.instant(`TEXTILE_DATA.MACHINE_QUALITY.POST_PROCESSING.CLOTH_TYPE_OPTIONS.${positionTranslation}`, {count: 1})} - ${this.translate.instant(\n 'PRODUCTION_ORDER.WEAVE_PLAN.PATH_LAYOUT.REST',\n {\n count: 1\n }\n )} ${productionScheduleColoredYarnSetIndex + 1}`;\n } else {\n return `${this.translate.instant('PRODUCTION_ORDER.WEAVE_PLAN.PATH_LAYOUT.REST', {count: 1})} ${productionScheduleColoredYarnSetIndex + 1}`;\n }\n }\n\n public getRemainingLengthInBuggy(): string {\n const lengthInCommercialUnit = convertCommercialUnit({\n from: {unit: Unit.MILLIMETER, value: this.buggyLengthMaxInMM},\n to: this.commercialUnit\n });\n\n let label: string;\n\n if (!AssertionUtils.isNullOrUndefined(this.availableSpaceInBuggyInPicks)) {\n label = this.getLabelForMaxLengthOrDifference(this.availableSpaceInBuggyInPicks, this.availableSpaceInBuggyInCommercialUnit);\n } else {\n let longestPathLengthInPicks = this.getLongestPathLengthInPicks();\n let longestPathLengthInCommercialUnit = this.getLongestPathLengthInCommercialUnit();\n\n const remainingLengthInPicks = this.buggyLengthMaxInPicks - longestPathLengthInPicks;\n const remainingLengthInCommercialUnit = Math.ceil(lengthInCommercialUnit - longestPathLengthInCommercialUnit);\n\n label = this.getLabelForMaxLengthOrDifference(remainingLengthInPicks, remainingLengthInCommercialUnit);\n }\n return label;\n }\n\n public getUnitDimensionsForPathLayout(): string {\n let longestPathLengthInPicks = 0;\n let longestPathLengthInMM = 0;\n\n this.productionSchedule?.productionSchedulePathsOfColoredYarnSets?.forEach((productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet) => {\n productionSchedulePathsOfColoredYarnSet?.productionSchedulePaths?.forEach((productionSchedulePath: ProductionSchedulePath) => {\n longestPathLengthInMM = Math.max(longestPathLengthInMM, this.getTotalHeightsOfProductionSchedulePath(productionSchedulePath).totalHeightInMM);\n longestPathLengthInPicks = Math.max(longestPathLengthInPicks, this.getTotalHeightsOfProductionSchedulePath(productionSchedulePath).totalHeightInPicks);\n });\n });\n\n if (!AssertionUtils.isNullOrUndefined(this.productionSchedule?.buggy) && this.productionSchedule?.buggy?.amountPlannedInPicks > this.buggyLengthMaxInPicks) {\n this.newBuggyLengthMaxInPicks = this.productionSchedule.buggy.amountPlannedInPicks;\n } else if (longestPathLengthInPicks > this.buggyLengthMaxInPicks) {\n this.newBuggyLengthMaxInPicks = longestPathLengthInPicks;\n } else {\n this.newBuggyLengthMaxInPicks = undefined;\n }\n const machineWidthInMeters = convertDentsToWidthInMeter(this.productionSchedule?.machine?.dentsForFabric, this.productionSchedule.machineQuality.reedDensity * 1000);\n\n const lengthInCommercialUnit = this.convertValueToCommercialUnit(longestPathLengthInMM, Unit.MILLIMETER);\n const widthInCommercialUnit = this.convertValueToCommercialUnit(machineWidthInMeters, Unit.METER);\n\n return `${this.getLabelForCommercialDimensions(widthInCommercialUnit, lengthInCommercialUnit)} - ${this.getLabelForTechnicalDimensions(\n this.productionSchedule?.machine?.dentsForFabric,\n longestPathLengthInPicks\n )}`;\n }\n\n public getUnitDimensionsForPath(productionSchedulePath: ProductionSchedulePath): string {\n const totalHeightInMM = this.getTotalHeightsOfProductionSchedulePath(productionSchedulePath).totalHeightInMM;\n let widthInCommercialUnit = this.convertValueToCommercialUnit(productionSchedulePath.commercialWidthInMM, Unit.MILLIMETER);\n let lengthInCommercialUnit = Math.round(\n convertCommercialUnit({\n from: {\n value: totalHeightInMM ?? 0,\n unit: Unit.MILLIMETER\n },\n to: this.commercialUnit\n })\n );\n\n if (lengthInCommercialUnit === 0 || widthInCommercialUnit === 0) {\n lengthInCommercialUnit = productionSchedulePath.totalLengthInPicks\n ? this.convertValueToCommercialUnit(\n convertPicksToHeightInMeter(this.getTotalHeightsOfProductionSchedulePath(productionSchedulePath).totalHeightInPicks, this.productionSchedule?.machineQuality?.pickDensity * 1000),\n Unit.METER\n )\n : 0;\n widthInCommercialUnit = productionSchedulePath.technicalWidthInDents\n ? this.convertValueToCommercialUnit(convertDentsToWidthInMeter(productionSchedulePath.technicalWidthInDents, this.productionSchedule?.machineQuality?.reedDensity * 1000), Unit.METER)\n : 0;\n }\n\n return `${this.getLabelForCommercialDimensions(widthInCommercialUnit, lengthInCommercialUnit)} - ${this.getLabelForTechnicalDimensions(\n productionSchedulePath.technicalWidthInDents,\n this.getTotalHeightsOfProductionSchedulePath(productionSchedulePath).totalHeightInPicks ?? 0\n )}`;\n }\n\n public getUnitDimensionsForPathRest(productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet): string {\n let totalWidthOfPathsOfColoredYarnSetInDents = 0;\n let longestPathLengthInPicks = 0;\n\n productionSchedulePathsOfColoredYarnSet?.productionSchedulePaths?.forEach((productionSchedulePath: ProductionSchedulePath) => {\n totalWidthOfPathsOfColoredYarnSetInDents += productionSchedulePath?.technicalWidthInDents;\n });\n\n productionSchedulePathsOfColoredYarnSet?.productionSchedulePaths?.forEach((productionSchedulePath: ProductionSchedulePath) => {\n longestPathLengthInPicks = Math.max(longestPathLengthInPicks, this.getTotalHeightsOfProductionSchedulePath(productionSchedulePath).totalHeightInPicks);\n });\n\n let longestPathLengthInMM = 0;\n\n let remainingWidthInMeter = 0;\n\n if (isNaN(remainingWidthInMeter) || remainingWidthInMeter === 0) {\n remainingWidthInMeter = convertDentsToWidthInMeter(\n productionSchedulePathsOfColoredYarnSet?.productionScheduleColoredYarnSet?.technicalWidthInDents - productionSchedulePathsOfColoredYarnSet.getProductionSchedulePathsWidthInDents(),\n this.productionSchedule?.machineQuality?.reedDensity * 1000\n );\n }\n\n productionSchedulePathsOfColoredYarnSet?.productionSchedulePaths?.forEach((productionSchedulePath: ProductionSchedulePath) => {\n if (longestPathLengthInMM < this.getTotalHeightsOfProductionSchedulePath(productionSchedulePath).totalHeightInMM) {\n longestPathLengthInMM = this.getTotalHeightsOfProductionSchedulePath(productionSchedulePath).totalHeightInMM;\n }\n });\n\n const lengthInCommercialUnit = this.convertValueToCommercialUnit(longestPathLengthInMM, Unit.MILLIMETER);\n const widthInCommercialUnit = this.convertValueToCommercialUnit(remainingWidthInMeter, Unit.METER);\n\n return `${this.getLabelForCommercialDimensions(widthInCommercialUnit, lengthInCommercialUnit)} - ${this.getLabelForTechnicalDimensions(\n productionSchedulePathsOfColoredYarnSet?.productionScheduleColoredYarnSet?.technicalWidthInDents - totalWidthOfPathsOfColoredYarnSetInDents,\n longestPathLengthInPicks\n )}`;\n }\n\n public getUnitDimesionsForDifference(productionSchedulePath: ProductionSchedulePath): string {\n let longestPathLengthInPicks = 0;\n let longestPathLengthInMM = 0;\n\n this.productionSchedule?.productionSchedulePathsOfColoredYarnSets?.forEach((productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet) => {\n productionSchedulePathsOfColoredYarnSet?.productionSchedulePaths?.forEach((productionScheduleBaan: ProductionSchedulePath) => {\n longestPathLengthInMM = Math.max(longestPathLengthInMM, this.getTotalHeightsOfProductionSchedulePath(productionScheduleBaan).totalHeightInMM);\n longestPathLengthInPicks = Math.max(longestPathLengthInPicks, this.getTotalHeightsOfProductionSchedulePath(productionScheduleBaan).totalHeightInPicks);\n });\n });\n\n if (AssertionUtils.isNullOrUndefined(productionSchedulePath.totalLengthInPicks)) {\n productionSchedulePath.totalLengthInPicks = 0;\n }\n\n if (AssertionUtils.isNullOrUndefined(productionSchedulePath.totalLengthInMM)) {\n productionSchedulePath.totalLengthInMM = 0;\n }\n\n const differenceFromLongestPathInPicks = longestPathLengthInPicks - this.getTotalHeightsOfProductionSchedulePath(productionSchedulePath).totalHeightInPicks;\n const differenceFromLongestPathInCommercialUnit = this.convertValueToCommercialUnit(\n longestPathLengthInMM - this.getTotalHeightsOfProductionSchedulePath(productionSchedulePath).totalHeightInMM,\n Unit.MILLIMETER\n );\n\n return this.getLabelForMaxLengthOrDifference(differenceFromLongestPathInPicks, differenceFromLongestPathInCommercialUnit);\n }\n\n public getHeightOfPathInColoredYarnSet(coloredYarnSetIndex: number, pathIndex: number): string {\n return `${this.heightOfPathsInPercentage[coloredYarnSetIndex]?.pathHeights[pathIndex]}`;\n }\n\n public getLabelForPathAndDifferenceDimensions(path: ProductionSchedulePath): string {\n const canShowDifference = this.canShowDifference(path) ? `${this.translate.instant(`PRODUCTION_ORDER.WEAVE_PLAN.PATH_LAYOUT.DIFFERENCE`)} ${this.getUnitDimesionsForDifference(path)}` : '';\n return `${this.translate.instant(`PRODUCTION_ORDER.WEAVE_PLAN.PATH_LAYOUT.SIZE`)} ${this.getUnitDimensionsForPath(path)} ${canShowDifference}`;\n }\n\n public setMaxWidthForDataElements(): void {\n if (!AssertionUtils.isNullOrUndefined(this.pathsContainer) && this.pathsContainer.nativeElement) {\n this.maxWidthForDataElements = this.pathsContainer.nativeElement.offsetWidth - 350;\n }\n }\n\n public onHoverPathBarOutput(): void {\n this.hoverPathBarOutput.emit();\n }\n\n public canAddCustomDesignToPath(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.selectedPath);\n }\n\n public openActionsMenu(): void {\n this.isActionsMenuOpen = true;\n }\n\n public closeActionsMenu(): void {\n this.isActionsMenuOpen = false;\n }\n\n public addCustomJuteToPath(): void {\n this.dialogBuilderFactoryService\n .getBuilder()\n .withClass('add-jute-to-path')\n .withWidth('460px')\n .openDialog(AddJuteToPathComponent, {\n pickDensity: this.productionSchedule.machineQuality.pickDensity,\n picksPerColorLine: this.productionSchedule.machineQuality.weaveStructure.picksPerColorLine,\n weaveStructureId: this.productionSchedule.machineQuality.weaveStructure.id,\n qualityId: this.productionSchedule.machineQuality.id,\n colorSetId: this.productionSchedule.coloredYarnSets.at(0).coloredYarnSet.overviewListColorSet.id,\n juteWidthInDents: this.selectedPath.technicalWidthInDents,\n weaveQualityType: this.productionSchedule.machineQuality.weaveStructure.numberOfGroundYarns > 0 ? WeaveQualityType.VELVET : WeaveQualityType.CARPET\n })\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((juteItem: ManualNonProductionItemDrawing | undefined) => {\n if (juteItem !== undefined) {\n this.addCustomJuteListItemToPath(new ListDrawingJute(juteItem));\n }\n });\n }\n\n private addCustomJuteListItemToPath(listDrawing: ListDrawing): void {\n const productionSchedulePathsOfColoredYarnSet = this.productionSchedule.getProductionSchedulePathsOfColoredYarnSetFromDent(this.selectedPath.startDent);\n this.productionSchedulePlan.addDrawingToProductionSchedulePath(listDrawing, this.selectedPath.pathNumber, productionSchedulePathsOfColoredYarnSet.productionScheduleColoredYarnSet);\n }\n\n private addPathsOfPathLayoutTemplates(coloredYarnSetPosition: ColoredYarnSetPosition): void {\n const pathTemplateWidthsInDents = this.selectedPathLayoutTemplate?.pathLayoutTemplatePaths?.map((pathLayoutTemplatePath: PathLayoutTemplatePath) => {\n return (\n this.productionSchedulePlan.lookupCommercialWidthInPathWidths(pathLayoutTemplatePath?.widthInMM, this.pathWidths) ??\n convertWidthInMeterToDents(\n convertCommercialUnit({from: {unit: Unit.MILLIMETER, value: pathLayoutTemplatePath.widthInMM}, to: Unit.METER}),\n this.productionSchedule.machineQuality.reedDensity * 1000,\n 0\n )\n );\n });\n\n let startDent = 1;\n\n if (AssertionUtils.isNullOrUndefined(coloredYarnSetPosition)) {\n this.productionSchedule.productionSchedulePathsOfColoredYarnSets[0].productionSchedulePaths = this.createPathsOfPathTemplates(startDent, pathTemplateWidthsInDents);\n } else {\n if (coloredYarnSetPosition === ColoredYarnSetPosition.BOTTOM) {\n this.productionSchedule?.productionSchedulePathsOfColoredYarnSets?.forEach((productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet, index: number) => {\n if (productionSchedulePathsOfColoredYarnSet?.productionScheduleColoredYarnSet?.isBottomPosition()) {\n this.productionSchedule.productionSchedulePathsOfColoredYarnSets[index].productionSchedulePaths = this.createPathsOfPathTemplates(startDent, pathTemplateWidthsInDents);\n }\n });\n } else if (coloredYarnSetPosition === ColoredYarnSetPosition.TOP) {\n this.productionSchedule?.productionSchedulePathsOfColoredYarnSets?.forEach((productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet, index: number) => {\n if (!productionSchedulePathsOfColoredYarnSet?.productionScheduleColoredYarnSet?.isBottomPosition()) {\n this.productionSchedule.productionSchedulePathsOfColoredYarnSets[index].productionSchedulePaths = this.createPathsOfPathTemplates(startDent, pathTemplateWidthsInDents);\n }\n });\n }\n }\n\n this.productionSchedulePlan.addPathLayoutTemplates(this.productionSchedule);\n this.selectFirstPath();\n }\n\n private getTotalHeightsOfProductionSchedulePath(productionSchedulePath: ProductionSchedulePath): {totalHeightInPicks: number; totalHeightInMM: number} {\n let totalHeightInPicks = 0;\n let totalHeightInMM = 0;\n\n productionSchedulePath?.pathGroups?.forEach((item: ProductionScheduleItemInPathGroup) => {\n totalHeightInPicks = totalHeightInPicks + (item?.technicalDimensions?.heightInPicks + item?.getTechnicalCutbarsLengthInNumberOfPicks()) * item?.quantity;\n totalHeightInMM = totalHeightInMM + (item?.commercialDimensionsInMM?.heightInMM + item?.getCommercialCutbarsLengthInMM()) * item?.quantity;\n });\n\n return {totalHeightInPicks: totalHeightInPicks ?? 0, totalHeightInMM: totalHeightInMM ?? 0};\n }\n\n private selectFirstPath(): void {\n this.selectedPath = this.productionSchedule.productionSchedulePathsOfColoredYarnSets[0].productionSchedulePaths[0];\n this.selectedRestPathColoredYarnSet = undefined;\n this.selectedPathOutput.emit(this.selectedPath);\n this.selectedRestPathColoredYarnSetOutput.emit(this.selectedRestPathColoredYarnSet);\n }\n\n private createPathsOfPathTemplates(startDent: number, pathTemplateWidthsInDents: number[]): ProductionSchedulePath[] {\n return this.selectedPathLayoutTemplate?.pathLayoutTemplatePaths?.map((pathLayoutTemplatePath: PathLayoutTemplatePath, pathIndex: number) => {\n const addedStartDent = startDent;\n startDent += pathTemplateWidthsInDents[pathIndex];\n return new ProductionSchedulePath('', pathIndex + 1, pathLayoutTemplatePath.widthInMM, pathTemplateWidthsInDents[pathIndex], [], addedStartDent, 0, 0);\n });\n }\n\n private setHeightOfPaths(): void {\n this.heightOfPathsInPercentage = [];\n this.heightOfRestPathsInPercentage = [];\n this.productionSchedule?.productionSchedulePathsOfColoredYarnSets?.forEach((pathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet, cysIndex: number) => {\n this.heightOfColoredYarnSetsInPercentage[cysIndex] = (pathsOfColoredYarnSet?.productionScheduleColoredYarnSet?.technicalWidthInDents / this.productionSchedule?.machine?.dentsForFabric) * 100;\n this.heightOfPathsInPercentage[cysIndex] = {pathHeights: []};\n\n pathsOfColoredYarnSet?.productionSchedulePaths?.forEach((path: ProductionSchedulePath, pathIndex: number) => {\n this.heightOfPathsInPercentage[cysIndex].pathHeights[pathIndex] = (path.technicalWidthInDents / pathsOfColoredYarnSet?.productionScheduleColoredYarnSet?.technicalWidthInDents) * 100;\n });\n\n this.heightOfRestPathsInPercentage[cysIndex] = AssertionUtils.isEmpty(this.heightOfPathsInPercentage[cysIndex]?.pathHeights)\n ? 100\n : 100 - this.heightOfPathsInPercentage[cysIndex].pathHeights.reduce((a: number, b: number) => a + b);\n });\n }\n\n private setProductionScheduleZones(): void {\n if (this.isProductionSchedulePhaseVerify()) {\n if (AssertionUtils.isNullOrUndefined(this.suggestedRestZones)) {\n this.suggestedRestZones = cloneDeep(this.productionSchedule?.restZones);\n }\n\n if (AssertionUtils.isNullOrUndefined(this.suggestedFreeZones)) {\n this.suggestedFreeZones = cloneDeep(this.productionSchedule?.freeZones);\n }\n } else {\n this.suggestedRestZones = null;\n this.suggestedFreeZones = null;\n }\n }\n\n private convertValueToCommercialUnit(value: number, unit: Unit): number {\n return round(\n convertCommercialUnit({\n from: {\n value: value ?? 0,\n unit\n },\n to: this.commercialUnit\n }),\n 0\n );\n }\n\n private getLabelForMaxLengthOrDifference(technicalHeightInPicks: number, commercialHeightInCommercialUnit: number): string {\n return `${commercialHeightInCommercialUnit} ${this.translate.instant(`GENERAL.UNIT.${EnumUtils.getKeyFromValue(Unit, this.commercialUnit)}`)} - ${technicalHeightInPicks} ${this.translate.instant(\n `GENERAL.UNIT.${EnumUtils.getKeyFromValue(Unit, Unit.PICKS)}`\n )}`;\n }\n\n private getLabelForTechnicalDimensions(technicalWidthInDents: number, technicalHeightInPicks: number): string {\n return `${technicalWidthInDents} ${this.translate.instant(`GENERAL.UNIT.${EnumUtils.getKeyFromValue(Unit, Unit.DENTS)}`)} x ${technicalHeightInPicks} ${this.translate.instant(\n `GENERAL.UNIT.${EnumUtils.getKeyFromValue(Unit, Unit.PICKS)}`\n )}`;\n }\n\n private getLabelForCommercialDimensions(commercialWidthInCommercialUnit: number, commercialHeightInCommercialUnit: number): string {\n return `${commercialWidthInCommercialUnit} x ${commercialHeightInCommercialUnit} ${this.translate.instant(`GENERAL.UNIT.${EnumUtils.getKeyFromValue(Unit, this.commercialUnit)}`)}`;\n }\n\n private selectRestPath(): void {\n this.selectedRestPathColoredYarnSet = this.productionSchedule?.productionSchedulePathsOfColoredYarnSets[0]?.productionScheduleColoredYarnSet;\n this.selectedPath = undefined;\n this.selectedPathOutput.emit(this.selectedPath);\n this.selectedRestPathColoredYarnSetOutput.emit(this.selectedRestPathColoredYarnSet);\n this.productionSchedulePathsOfColoredYarnSetOutput.emit(this.productionSchedule?.productionSchedulePathsOfColoredYarnSets[0]);\n }\n\n private getLongestPathLengthInPicks(): number {\n let longestPathLengthInPicks = 0;\n\n this.productionSchedule?.productionSchedulePathsOfColoredYarnSets?.forEach((productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet) => {\n productionSchedulePathsOfColoredYarnSet?.productionSchedulePaths?.forEach((productionSchedulePath: ProductionSchedulePath) => {\n longestPathLengthInPicks = Math.max(longestPathLengthInPicks, this.getTotalHeightsOfProductionSchedulePath(productionSchedulePath).totalHeightInPicks);\n });\n });\n\n return longestPathLengthInPicks;\n }\n\n private getLongestPathLengthInCommercialUnit(): number {\n let longestPathLengthInMM = 0;\n\n this.productionSchedule?.productionSchedulePathsOfColoredYarnSets?.forEach((productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet) => {\n productionSchedulePathsOfColoredYarnSet?.productionSchedulePaths?.forEach((productionSchedulePath: ProductionSchedulePath) => {\n longestPathLengthInMM = Math.max(longestPathLengthInMM, this.getTotalHeightsOfProductionSchedulePath(productionSchedulePath).totalHeightInMM);\n });\n });\n\n return Math.floor(\n convertCommercialUnit({\n from: {unit: Unit.MILLIMETER, value: longestPathLengthInMM},\n to: this.commercialUnit\n })\n );\n }\n\n private setPathLayoutTemplate(id: number, coloredYarnSetPosition: number): void {\n this.pathLayoutTemplates\n .getById(id)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((pathLayoutTemplate: PathLayoutTemplate) => {\n const ifTemplateHasTooMuchWidth = this.pathLayoutTemplateService.checkIfTemplateHasTooMuchWidth(\n this.productionSchedule,\n pathLayoutTemplate,\n coloredYarnSetPosition,\n this.productionSchedule.machineQuality.reedDensity * 1000,\n this.pathWidths\n );\n\n const ifTemplateHasOverlappingPaths = this.pathLayoutTemplateService.checkIfTemplateHasOverlappingPaths(\n this.productionSchedule,\n pathLayoutTemplate,\n this.productionSchedule.machineQuality.reedDensity * 1000,\n this.pathWidths\n );\n\n if (ifTemplateHasTooMuchWidth || ifTemplateHasOverlappingPaths) {\n this.dialogBuilderFactoryService.getBuilder().openAlertDialog({\n titleText: this.translate.instant('PRODUCTION_ORDER.WEAVE_PLAN.PATH_LAYOUT.PATH_LAYOUT'),\n messageText: this.translate.instant(ifTemplateHasTooMuchWidth ? 'PATH_LAYOUT_TEMPLATE.TOO_MUCH_WIDTH_ERROR' : 'PATH_LAYOUT_TEMPLATE.OVERLAPPING_COLORSETS_ERROR'),\n type: DialogType.INFORMATION\n });\n } else {\n this.selectedPathLayoutTemplate = pathLayoutTemplate;\n this.changeDetectorRef.detectChanges();\n this.addPathsOfPathLayoutTemplates(coloredYarnSetPosition);\n }\n });\n }\n}\n","
\n \n
\n
\n \n\n \n
\n
\n
\n","import {Component, Inject, OnInit} from '@angular/core';\nimport {MAT_DIALOG_DATA} from '@angular/material/dialog';\nimport {Message, MessageType} from '@vdw/angular-component-library';\nimport {filter, isEmpty} from 'lodash-es';\n\n@Component({\n selector: 'app-errors-and-warnings-dialog',\n templateUrl: './errors-and-warnings-dialog.component.html',\n styleUrls: ['./errors-and-warnings-dialog.component.scss']\n})\nexport class ErrorsAndWarningsDialogComponent implements OnInit {\n public dialogTitle: string;\n public dialogIcon: string;\n public errorMessages: Message[] = [];\n public warningMessages: Message[] = [];\n\n public constructor(@Inject(MAT_DIALOG_DATA) {messages}: {messages: Message[]}) {\n this.errorMessages = filter(messages, {type: MessageType.ERROR});\n this.warningMessages = filter(messages, {type: MessageType.WARNING});\n }\n\n public ngOnInit(): void {\n if (this.hasErrorMessages()) {\n this.dialogIcon = 'error-full-36px';\n this.dialogTitle = this.hasWarningMessages() ? 'PRODUCTION_ORDER.ERRORS.ERRORS_AND_WARNINGS' : 'PRODUCTION_ORDER.ERRORS.ERRORS';\n } else if (this.hasWarningMessages()) {\n this.dialogIcon = 'warning-full-36px';\n this.dialogTitle = 'PRODUCTION_ORDER.WEAVE_PLAN.WARNINGS.WARNINGS';\n }\n }\n\n public hasErrorMessages(): boolean {\n return !isEmpty(this.errorMessages);\n }\n\n public hasWarningMessages(): boolean {\n return !isEmpty(this.warningMessages);\n }\n}\n","\n \n \n \n \n \n \n \n \n \n \n \n\n\n\n
\n \n \n {{ 'PRODUCTION_ORDER.ERRORS.MULTIPLE_ERRORS_AND_WARNINGS' | bmsTranslate }}\n \n \n \n \n \n \n {{ 'PRODUCTION_ORDER.ERRORS.MULTIPLE_ERRORS' | bmsTranslate }}\n \n \n \n {{ 'PRODUCTION_ORDER.ERRORS.TOTAL_WIDTH_TOO_LITTLE' | bmsTranslate: {value: productionSchedule.errors.totalWidthTooLittle} }}\n \n \n {{ 'PRODUCTION_ORDER.ERRORS.TOTAL_WIDTH_TOO_BIG' | bmsTranslate: {value: productionSchedule.errors.totalWidthTooBig} }}\n \n \n \n \n \n \n \n \n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.WARNINGS.CURRENT_LOSS_IN_PERCENT' | bmsTranslate: {currentLossInPercent: productionSchedule.warnings.totalLossInPercent} }}\n \n \n \n \n
\n\n","import {Component, ElementRef, Input, ViewChild} from '@angular/core';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {RepositionTooltipComponent} from '@presentation/components/reposition-tooltip/reposition-tooltip.component';\nimport {DialogBuilderFactoryService, Message, MessageType, TranslateService} from '@vdw/angular-component-library';\nimport {isNil} from 'lodash-es';\nimport {ErrorsAndWarningsDialogComponent} from './errors-and-warnings-dialog/errors-and-warnings-dialog.component';\n\n@Component({\n selector: 'app-errors-and-warnings',\n templateUrl: './errors-and-warnings.component.html',\n styleUrls: ['./errors-and-warnings.component.scss']\n})\nexport class ErrorsAndWarningsComponent {\n @Input() public productionSchedule: ProductionSchedule;\n @Input() public isProductionSchedulePhaseVerify: boolean;\n @Input() public canShowWarningWithText: boolean;\n @ViewChild('errorsAndWarningsButton', {read: ElementRef}) public errorsAndWarningsButton: ElementRef;\n\n public constructor(\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n private readonly translate: TranslateService\n ) {}\n\n public canShowCurrentLossFromProductionSchedule(): boolean {\n return !isNil(this.productionSchedule.warnings?.totalLossInPercent);\n }\n\n public canShowTotalWidthTooBig(): boolean {\n return this.isProductionSchedulePhaseVerify && !isNil(this.productionSchedule.errors?.totalWidthTooBig);\n }\n\n public canShowTotalWidthTooLittle(): boolean {\n return this.isProductionSchedulePhaseVerify && !isNil(this.productionSchedule.errors?.totalWidthTooLittle);\n }\n\n public hasMultipleErrors(): boolean {\n return this.canShowTotalWidthTooBig() && this.canShowTotalWidthTooLittle();\n }\n\n public hasErrors(): boolean {\n return this.canShowTotalWidthTooBig() || this.canShowTotalWidthTooLittle();\n }\n\n public hasWarnings(): boolean {\n return this.productionSchedule.isCreelMappingApplied() || this.canShowCurrentLossFromProductionSchedule();\n }\n\n public hasErrorsAndWarnings(): boolean {\n return this.hasWarnings() && this.hasErrors();\n }\n\n public canShowAllErrorsAndWarnings(): boolean {\n return this.hasErrorsAndWarnings() || this.hasMultipleErrors();\n }\n\n public showAllErrorsAndWarnings(event: MouseEvent): void {\n if (this.canShowAllErrorsAndWarnings() || !this.canShowWarningWithText) {\n const messages = this.getWarningAndErrorMessages();\n const errorsAndWarningsButtonDOMRect: DOMRect = this.errorsAndWarningsButton.nativeElement.getBoundingClientRect();\n\n this.dialogBuilderFactoryService\n .getBuilder()\n .withClass(['reposition-tooltip', 'production-schedule-errors-and-warnings-dialog'])\n .withCustomBackdrop('transparent-backdrop')\n .openDialog(RepositionTooltipComponent, {\n component: ErrorsAndWarningsDialogComponent,\n messages,\n targetDOMRect: {\n top: event.clientY,\n bottom: errorsAndWarningsButtonDOMRect.bottom,\n left: event.clientX,\n right: errorsAndWarningsButtonDOMRect.right\n }\n });\n }\n }\n\n private getWarningAndErrorMessages(): Message[] {\n const messages = [];\n\n if (this.canShowCurrentLossFromProductionSchedule()) {\n messages.push(\n new Message(\n null,\n this.translate.instant('PRODUCTION_ORDER.WEAVE_PLAN.WARNINGS.CURRENT_LOSS_IN_PERCENT', {currentLossInPercent: this.productionSchedule.warnings.totalLossInPercent}),\n MessageType.WARNING,\n null\n )\n );\n }\n\n if (this.canShowTotalWidthTooLittle()) {\n messages.push(new Message(null, this.translate.instant('PRODUCTION_ORDER.ERRORS.TOTAL_WIDTH_TOO_LITTLE', {value: this.productionSchedule.errors.totalWidthTooLittle}), MessageType.ERROR, null));\n }\n\n if (this.canShowTotalWidthTooBig()) {\n messages.push(new Message(null, this.translate.instant('PRODUCTION_ORDER.ERRORS.TOTAL_WIDTH_TOO_BIG', {value: this.productionSchedule.errors.totalWidthTooBig}), MessageType.ERROR, null));\n }\n\n return messages;\n }\n}\n","
\n
\n \n \n
\n \n
\n
\n
\n
\n","import {Component} from '@angular/core';\nimport {SourceElementUtils} from '@application/helper/source-element-utils';\nimport {PositionOfDialog} from '@domain/position-of-dialog';\nimport {BmpProductionScheduleItemInPathGroup} from '@domain/production-schedule/bmp-production-schedule-item-in-path-group';\nimport {RepositionDialogComponent} from '@presentation/components/reposition-dialog/reposition-dialog.component';\nimport {FinishingDetailsComponent} from '@presentation/pages/texfab/production-schedule/finishing-details/finishing-details.component';\nimport {AssertionUtils, DialogBuilderFactoryService} from '@vdw/angular-component-library';\nimport {ICellRendererAngularComp} from 'ag-grid-angular';\n\n@Component({\n templateUrl: './finishing-list-view-information.component.html',\n styleUrls: ['./finishing-list-view-information.component.scss']\n})\nexport class FinishingListViewInformationComponent implements ICellRendererAngularComp {\n public productionScheduleItem: BmpProductionScheduleItemInPathGroup;\n\n public constructor(private readonly dialogBuilderFactoryService: DialogBuilderFactoryService) {}\n\n public agInit(params: any): void {\n this.productionScheduleItem = params?.data as BmpProductionScheduleItemInPathGroup;\n }\n\n public refresh(params: any): boolean {\n return false;\n }\n\n public canShowData(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.productionScheduleItem.finishing);\n }\n\n public showFinishingDetails(event: MouseEvent, productionScheduleItem: BmpProductionScheduleItemInPathGroup): void {\n this.dialogBuilderFactoryService\n .getBuilder()\n .withClass('reposition-dialog')\n .withWidth('312px')\n .withMaxHeight('100%')\n .openDialog(RepositionDialogComponent, {\n finishing: productionScheduleItem.finishing,\n component: FinishingDetailsComponent,\n sourceElement: SourceElementUtils.findSourceElementForDialog(event, 'info-balloon-container'),\n positionOfDialog: PositionOfDialog.RIGHT\n });\n }\n}\n","import {Component} from '@angular/core';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {ProductionScheduleItemInPathGroupStatus} from '@domain/production-schedule/production-schedule-item-in-path-group-status';\nimport {AssertionUtils} from '@vdw/angular-component-library';\nimport {ICellRendererAngularComp} from 'ag-grid-angular';\nimport {ProductionSchedulePartiallyCompletedStatusParams} from './production-schedule-partially-completed-status-cell-renderer-params.interface';\n\n@Component({\n templateUrl: './production-schedule-partially-completed-status-cell-renderer.component.html',\n styleUrls: ['./production-schedule-partially-completed-status-cell-renderer.component.scss']\n})\nexport class ProductionSchedulePartiallyCompletedStatusCellRendererComponent implements ICellRendererAngularComp {\n public productionScheduleItem: ProductionScheduleItemInPathGroup;\n public productionScheduleItemInPathGroupStatus: typeof ProductionScheduleItemInPathGroupStatus = ProductionScheduleItemInPathGroupStatus;\n\n public agInit(params: ProductionSchedulePartiallyCompletedStatusParams): void {\n this.productionScheduleItem = params?.productionScheduleItem;\n }\n\n public refresh(params: ProductionSchedulePartiallyCompletedStatusParams): boolean {\n return false;\n }\n\n public getProductionScheduleItemStatusTranslationKey(status: ProductionScheduleItemInPathGroupStatus): string {\n return AssertionUtils.isNullOrUndefined(status) ? '' : `PRODUCTION_ORDER.PRODUCTION_SCHEDULE_ITEM_IN_PATH_GROUP_STATUS.${ProductionScheduleItemInPathGroupStatus[status]}`;\n }\n}\n","
\n
\n {{ getProductionScheduleItemStatusTranslationKey(productionScheduleItem.status) | bmsTranslate }}\n
\n
\n","export enum ProductionScheduleListviewColumnType {\n NAME,\n STATUS,\n QUANTITY,\n WIDTH,\n HEIGHT,\n TOTAL_WOVEN_HEIGHT,\n COLOR_MAIN,\n COLOR_BORDER,\n FINISHING_AND_CUTBARS_LABEL,\n SHAPE,\n PRODUCTION,\n EDIT,\n OPEN_IN_CADCAM\n}\n","
\n \n \n \n \n

{{ productionSchedulePath.name }}

\n \n
\n\n \n
\n
\n
{{ 'GENERAL.DIMENSIONS.WIDTH' | bmsTranslate }}:
\n
\n {{ getUnitDimensionsForPathWidth(productionSchedulePath) }}\n
\n
\n
\n
\n
\n
{{ 'GENERAL.DIMENSIONS.LENGTH' | bmsTranslate }}:
\n
\n {{ getUnitDimensionsForPathLength(productionSchedulePath) }}\n
\n
\n
\n
\n
\n
{{ 'PRODUCTION_ORDER.WEAVE_PLAN.WEAVE_PLAN_SUMMARY.PATH_LENGTH_DIFFERENCE' | bmsTranslate }}:
\n
\n {{ getUnitDimensionsForDifference(productionSchedulePath) }}\n
\n
\n
\n \n\n \n\n
\n \n
\n
\n
\n\n \n \n \n
\n","import {Component, ElementRef, Inject, Input, OnChanges, OnInit, QueryList, SimpleChanges, ViewChild, ViewChildren} from '@angular/core';\nimport {MatExpansionPanel} from '@angular/material/expansion';\nimport {MatMenuTrigger} from '@angular/material/menu';\nimport {GridIdentifier} from '@application/grids/grid-identifier.enum';\nimport {FixedShape} from '@domain/drawing-library/fixed-shape.enum';\nimport {OrderLinesTarget} from '@domain/order-lines-target.enum';\nimport {PositionOfDialog} from '@domain/position-of-dialog';\nimport {ProductionOrderCustomSettings} from '@domain/production-schedule/custom-settings/production-order-custom-settings';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {ProductionScheduleItemInPathGroupStatus} from '@domain/production-schedule/production-schedule-item-in-path-group-status';\nimport {ProductionScheduleOrderLine} from '@domain/production-schedule/production-schedule-order-line';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {ProductionSchedulePhase} from '@domain/production-schedule/production-schedule-phase.enum';\nimport {ProductionScheduleStatus} from '@domain/production-schedule/production-schedule-status.enum';\nimport {Permission} from '@domain/profile/permission.enum';\nimport {PropertyValue} from '@domain/property-value';\nimport {OverviewListColoredYarnSetWithStartDent} from '@domain/textile-data/creel/overview-list-colored-yarn-set-with-start-dent';\nimport {CadCamService} from '@infrastructure/cad-cam/cad-cam.service';\nimport {AUTHENTICATION, Authentication} from '@infrastructure/http/authentication/authentication';\nimport {ORDERBOOK, Orderbook} from '@infrastructure/http/orderbook/orderbook';\nimport {PRODUCTION_ORDERS, ProductionOrders} from '@infrastructure/http/production-order/production-orders';\nimport {PROFILE, Profile} from '@infrastructure/http/profile/profile';\nimport {OverviewListOrderLine} from '@presentation/pages/texfab/orderbook/overview/overview-list-order-line';\nimport {GridCreelPreviewOfCreelPositionComponent} from '@presentation/pages/textile-data/creel/add/grid-creel-preview-of-creel-position/grid-creel-preview-of-creel-position.component';\nimport {PreviewType} from '@presentation/pages/textile-data/creel/add/preview-type';\nimport {FinishingListViewInformationComponent} from '@presentation/pages/textile-data/finishing/finishing-list-view-information/finishing-list-view-information.component';\nimport {\n AgGridUtils,\n AssertionUtils,\n BaseComponent,\n CellButtonComponent,\n CellButtonParams,\n ColDefBuilderFactoryService,\n Color,\n convertCommercialUnit,\n convertDentsToWidthInMeter,\n convertPicksToHeightInMeter,\n CrudOverviewButtonConfig,\n DialogBuilderFactoryService,\n EmptyCellRendererComponent,\n EnumUtils,\n GridModel,\n GridOptionsBuilderFactoryService,\n GridTagComponent,\n NumberCellEditorComponent,\n NumberCellEditorParams,\n Priority,\n StringUtils,\n TagColor,\n TagSize,\n TranslateService,\n Unit\n} from '@vdw/angular-component-library';\nimport {AgGridAngular} from 'ag-grid-angular';\nimport {CellClickedEvent, CellRendererSelectorResult, ColDef, GridOptions, ICellEditorParams, ICellRendererParams, ITooltipParams, ValueGetterParams, ValueSetterParams} from 'ag-grid-community';\nimport {L10nIntlService} from 'angular-l10n';\nimport {clone, round} from 'lodash-es';\nimport {filter, map, Observable, takeUntil} from 'rxjs';\nimport {ProductionScheduleOrderLineWithQuantity} from '../../drawing-library/views/order-lines-view/production-schedule-order-line-with-quantity';\nimport {ProductionSchedulePartiallyCompletedStatusParams} from '../../drawing-library/views/order-lines-view/production-schedule-partially-completed-status-cell-renderer/production-schedule-partially-completed-status-cell-renderer-params.interface';\nimport {ProductionSchedulePartiallyCompletedStatusCellRendererComponent} from '../../drawing-library/views/order-lines-view/production-schedule-partially-completed-status-cell-renderer/production-schedule-partially-completed-status-cell-renderer.component';\nimport {EditProductionScheduleItemInPathGroupAction} from '../modals/edit-production-schedule-item-in-path-group/edit-production-schedule-item-in-path-group-action';\nimport {EditProductionScheduleItemInPathGroupComponent} from '../modals/edit-production-schedule-item-in-path-group/edit-production-schedule-item-in-path-group.component';\nimport {ProductionScheduleListviewColumnType} from './production-schedule-new-listview-column-type';\nimport {ProductionScheduleListviewColumn} from './production-schedule-new-listview-column.interface';\n\ntype RowData = ProductionScheduleItemInPathGroup;\n@Component({\n selector: 'app-production-schedule-new-listview',\n templateUrl: './production-schedule-new-listview.component.html',\n styleUrls: ['./production-schedule-new-listview.component.scss']\n})\nexport class ProductionScheduleNewListviewComponent extends BaseComponent implements OnInit, OnChanges {\n public static readonly yesLabel = 'GENERAL.CONDITION.YES';\n public static readonly noLabel = 'GENERAL.CONDITION.NO';\n\n @ViewChild(MatMenuTrigger) public trigger: MatMenuTrigger;\n @ViewChild('quantityInput') public quantityInput: ElementRef;\n @ViewChild('listviewContainer') public listviewContainer: ElementRef;\n @ViewChildren('listViewGrids') public listViewGrids: QueryList;\n @ViewChildren('expansionPanels') public expansionPanels: QueryList;\n\n @Input() public productionSchedule: ProductionSchedule;\n @Input() public commercialUnit: Unit;\n @Input() public productionSchedulePhase: ProductionSchedulePhase;\n @Input() public allowProductionScheduleItemsToBeEdited: boolean;\n @Input() public listOfCustomSettings: PropertyValue[];\n @Input() public productionOrderCustomSettings: ProductionOrderCustomSettings;\n @Input() public buggyLengthMaxInPicks: number;\n @Input() public displayTechnicalUnit: boolean;\n @Input() public productionScheduleItemMultiplier: number;\n\n public showQuantityInput = false;\n public initialProductionSchedule: ProductionSchedule;\n public productionScheduleListviewColumnType = ProductionScheduleListviewColumnType;\n public columns: ProductionScheduleListviewColumn[];\n public visibleColumns: ProductionScheduleListviewColumn[];\n public productionScheduleItemInPathGroupStatus: typeof ProductionScheduleItemInPathGroupStatus = ProductionScheduleItemInPathGroupStatus;\n public gridOptionsForListView: GridOptions;\n public selectedColumn: ProductionScheduleListviewColumn;\n public pinnedLeftColumns: ProductionScheduleListviewColumn[] = [];\n public pinnedRightColumns: ProductionScheduleListviewColumn[] = [];\n public orderlines: ProductionScheduleOrderLineWithQuantity[] = [];\n public hasViewEpPermission: boolean = false;\n\n public readonly productionScheduleItemHeightInPx = 56;\n public readonly classNameForProductionScheduleItem = 'production-schedule-item';\n public readonly classNameForPath = 'path';\n public readonly classNameForColoredYarnSet = 'colored-yarn-sets-panel';\n public readonly classNameForEmptyElements = 'empty';\n public readonly positionOfDialog: PositionOfDialog = PositionOfDialog.RIGHT;\n public readonly permissionToViewBuggyLengthWarning = Permission.VIEW_MIN_MAX_BUGGY;\n\n private readonly rowHeight = 32;\n private readonly headerHeight = 40;\n private readonly scrollBarHeightInPx = 17;\n\n public constructor(\n @Inject(AUTHENTICATION) private readonly authentication: Authentication,\n @Inject(ORDERBOOK) private readonly orderbook: Orderbook,\n @Inject(PROFILE) private readonly profile: Profile,\n @Inject(PRODUCTION_ORDERS) private readonly productionOrders: ProductionOrders,\n private readonly translate: TranslateService,\n private readonly gridOptionsBuilderFactoryService: GridOptionsBuilderFactoryService,\n private readonly colDefBuilderFactoryService: ColDefBuilderFactoryService,\n private readonly l10nIntlService: L10nIntlService,\n private readonly cadCamService: CadCamService,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this.hasViewEpPermission = this.authentication.getCurrentSubscription()?.hasPermission(Permission.TEXEDIT_VIEW_EP) ?? false;\n this.initialProductionSchedule = clone(this.productionSchedule);\n this.getDataForProductionScheduleItem();\n this.initialiseGridOptionsForListiew();\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if ('productionSchedule' in changes) {\n this.getDataForProductionScheduleItem();\n }\n }\n\n public trackProductionScheduleColoredYarnSet(productionScheduleColoredYarnSetIndex: number, productionScheduleColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet): number {\n return productionScheduleColoredYarnSet.productionScheduleColoredYarnSet.coloredYarnSet.id;\n }\n\n public trackProductionSchedulePath(productionSchedulePathIndex: number, productionSchedulePath: ProductionSchedulePath): string {\n return productionSchedulePath.name;\n }\n\n public getUnitDimensionsForDifference(productionSchedulePath: ProductionSchedulePath): string {\n let longestPathLengthInPicks = 0;\n let longestPathLengthInMM = 0;\n\n this.productionSchedule?.productionSchedulePathsOfColoredYarnSets?.forEach((productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet) => {\n productionSchedulePathsOfColoredYarnSet?.productionSchedulePaths?.forEach((productionScheduleBaan: ProductionSchedulePath) => {\n longestPathLengthInMM = Math.max(longestPathLengthInMM, productionScheduleBaan?.totalLengthInMM);\n longestPathLengthInPicks = Math.max(longestPathLengthInPicks, productionScheduleBaan?.totalLengthInPicks);\n });\n });\n\n if (AssertionUtils.isNullOrUndefined(productionSchedulePath.totalLengthInPicks)) {\n productionSchedulePath.totalLengthInPicks = 0;\n }\n\n if (AssertionUtils.isNullOrUndefined(productionSchedulePath.totalLengthInMM)) {\n productionSchedulePath.totalLengthInMM = 0;\n }\n\n const differenceFromLongestPathInPicks = longestPathLengthInPicks - productionSchedulePath?.totalLengthInPicks;\n const differenceFromLongestPathInCommercialUnit = this.convertValueToCommercialUnit(longestPathLengthInMM - productionSchedulePath?.totalLengthInMM, Unit.MILLIMETER);\n\n return this.getLabelForMaxLengthOrDifference(differenceFromLongestPathInPicks, differenceFromLongestPathInCommercialUnit);\n }\n\n public getUnitDimensionsForPathWidth(productionSchedulePath: ProductionSchedulePath): string {\n let widthInCommercialUnit = this.convertValueToCommercialUnit(productionSchedulePath.commercialWidthInMM, Unit.MILLIMETER);\n\n if (widthInCommercialUnit === 0) {\n widthInCommercialUnit = productionSchedulePath.technicalWidthInDents\n ? this.convertValueToCommercialUnit(convertDentsToWidthInMeter(productionSchedulePath.technicalWidthInDents, this.productionSchedule?.machineQuality?.reedDensity * 1000), Unit.METER)\n : 0;\n }\n\n return this.getLabelForWidth(widthInCommercialUnit, productionSchedulePath.technicalWidthInDents ?? 0);\n }\n\n public getUnitDimensionsForPathLength(productionSchedulePath: ProductionSchedulePath): string {\n let lengthInCommercialUnit = this.convertValueToCommercialUnit(productionSchedulePath.totalLengthInMM, Unit.MILLIMETER);\n\n if (lengthInCommercialUnit === 0) {\n lengthInCommercialUnit = productionSchedulePath.totalLengthInPicks\n ? this.convertValueToCommercialUnit(convertPicksToHeightInMeter(productionSchedulePath.totalLengthInPicks, this.productionSchedule?.machineQuality?.pickDensity * 1000), Unit.METER)\n : 0;\n }\n\n return this.getLabelForLength(lengthInCommercialUnit, productionSchedulePath.totalLengthInPicks ?? 0);\n }\n\n public openCadCam(target: HTMLElement, productionScheduleItem: ProductionScheduleItemInPathGroup): void {\n this.cadCamService.openCadCam(target, this.getExternalApplicationLink(productionScheduleItem), this.unSubscribeOnViewDestroy);\n }\n\n public showEditProductionScheduleItemDialog(\n productionScheduleColoredYarnSetIndex: number,\n productionSchedulePathIndex: number,\n productionScheduleItemIndex: number,\n productionScheduleItem: ProductionScheduleItemInPathGroup\n ): void {\n this.dialogBuilderFactoryService\n .getBuilder()\n .withClass('edit-drawing-in-path')\n .openDialog(EditProductionScheduleItemInPathGroupComponent, {\n productionScheduleItemInPathGroup: productionScheduleItem,\n commercialUnit: this.commercialUnit,\n productionSchedule: this.productionSchedule,\n allowExceedingRequestedAmountOfOrderLineItems: this.productionOrderCustomSettings?.allowExceedingRequestedAmountOfOrderLineItems,\n pickDensityInPicksPerMeter: this.productionSchedule.machineQuality.pickDensity * 1000\n })\n .pipe(\n filter((result: {action: EditProductionScheduleItemInPathGroupAction; value: ProductionScheduleItemInPathGroup}) => !AssertionUtils.isNullOrUndefined(result)),\n takeUntil(this.unSubscribeOnViewDestroy)\n )\n .subscribe((result: {action: EditProductionScheduleItemInPathGroupAction; value: ProductionScheduleItemInPathGroup}) => {\n if (!AssertionUtils.isNullOrUndefined(result.value)) {\n if (result.action === EditProductionScheduleItemInPathGroupAction.EDIT) {\n if (result.value.amountProduced !== 0) {\n result.value.status = ProductionScheduleItemInPathGroupStatus.CHANGED;\n }\n } else if (result.action === EditProductionScheduleItemInPathGroupAction.DELETE || result.action === EditProductionScheduleItemInPathGroupAction.DELETE_COMPLETING_PARTIALLY) {\n result.value.status = ProductionScheduleItemInPathGroupStatus.REMOVED;\n result.value.amountProduced = 0;\n }\n this.editQuantity(result.value.amountProduced, productionScheduleColoredYarnSetIndex, productionSchedulePathIndex, productionScheduleItemIndex);\n this.refreshRows();\n }\n });\n }\n\n public completePartially(): Observable {\n this.productionSchedule.status = ProductionScheduleStatus.EXECUTED_PARTIAL;\n return this.productionOrders.completeProductionOrder(this.productionSchedule.id, this.productionSchedule);\n }\n\n public getHeightForExpansionPanel(productionSchedulePath: ProductionSchedulePath): number {\n let expanded = true;\n\n this.expansionPanels?.forEach((expansionPanel: MatExpansionPanel) => {\n const pathNumber = expansionPanel.id.slice(-1);\n if (Number(pathNumber) === productionSchedulePath.pathNumber - 1) {\n expanded = expansionPanel.expanded;\n }\n });\n\n if (expanded) {\n return productionSchedulePath?.pathGroups?.length * this.rowHeight + 2 * this.rowHeight + this.headerHeight + this.scrollBarHeightInPx;\n } else {\n return 40;\n }\n }\n\n private getDataForProductionScheduleItem(): void {\n const orderlineIds: number[] = [];\n\n this.productionSchedule.productionSchedulePathsOfColoredYarnSets.forEach((productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet) => {\n productionSchedulePathsOfColoredYarnSet.productionSchedulePaths.forEach((productionSchedulePath: ProductionSchedulePath) => {\n productionSchedulePath.pathGroups.forEach((pathGroup: ProductionScheduleItemInPathGroup) => {\n if (AssertionUtils.isNullOrUndefined(pathGroup.id)) {\n pathGroup.id = Math.round(Math.random() * 200);\n }\n if (!AssertionUtils.isNullOrUndefined(pathGroup.orderLineId)) {\n orderlineIds.push(pathGroup.orderLineId);\n }\n });\n });\n });\n\n this.getOrderlines(orderlineIds);\n }\n\n private getExternalApplicationLink(productionScheduleItem: ProductionScheduleItemInPathGroup): Observable {\n return this.profile\n .getExternalApplicationKey()\n .pipe(\n map(\n (externalApplicationKey: string) =>\n `txcccm://application_key:${externalApplicationKey}:${btoa(`{\"cfgVersion\":1, \"context\":\"viewEp\", \"projectId\": 0, \"epId\":${productionScheduleItem.epId}}`)}`\n )\n );\n }\n\n private getOrderlines(orderlineIds: number[]): void {\n if (!AssertionUtils.isNullOrUndefined(orderlineIds) && !AssertionUtils.isEmpty(orderlineIds)) {\n const orderlineIdsString = orderlineIds.map((id: number) => `${id}`);\n\n const filterModel = {\n id: {\n filterModels: [null, {values: orderlineIdsString, filterType: 'set'}],\n filterType: 'multi'\n }\n };\n\n const gridModel = new GridModel(0, orderlineIds.length, [], filterModel);\n\n this.orderbook\n .getSlice(OrderLinesTarget.PRODUCTION_SCHEDULE, gridModel)\n .pipe(\n map((orderLines: OverviewListOrderLine[]) =>\n orderLines.map((overviewListOrderLine: OverviewListOrderLine) =>\n ProductionScheduleOrderLineWithQuantity.fromProductionScheduleOrderLine(ProductionScheduleOrderLine.fromOverviewListOrderLine(overviewListOrderLine))\n )\n ),\n takeUntil(this.unSubscribeOnViewDestroy)\n )\n .subscribe((orderLines: ProductionScheduleOrderLineWithQuantity[]) => {\n this.orderlines = orderLines;\n this.setDataForEveryPath();\n });\n }\n }\n\n private setDataForEveryPath(): void {\n this.productionSchedule.productionSchedulePathsOfColoredYarnSets.forEach((productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet) => {\n productionSchedulePathsOfColoredYarnSet.productionSchedulePaths.forEach((productionSchedulePath: ProductionSchedulePath) => {\n productionSchedulePath.pathGroups.forEach((pathGroup: ProductionScheduleItemInPathGroup) => {\n pathGroup.orderline = this.orderlines.find((orderline: ProductionScheduleOrderLine) => orderline.id === pathGroup.orderLineId);\n });\n });\n });\n\n this.refreshRows();\n }\n\n private refreshRows(): void {\n const listViewGridsArray = this.listViewGrids?.toArray();\n if (!AssertionUtils.isNullOrUndefined(listViewGridsArray)) {\n listViewGridsArray.forEach((grid: AgGridAngular) => {\n grid.api.redrawRows();\n });\n }\n }\n\n private initialiseGridOptionsForListiew(): void {\n this.gridOptionsForListView = this.gridOptionsBuilderFactoryService\n .getBuilder(this.getColumnDefs(), GridIdentifier.PRODUCTION_SCHEDULE_PATH_LIST_VIEW)\n .withHeaderHeight(this.rowHeight)\n .withFloatingFiltersHeight(this.rowHeight)\n .withRowHeight(this.rowHeight)\n .withCompactView()\n .withColumnMenu()\n .withPopupParent(document.querySelector('body'))\n .build();\n }\n\n private getColumnDefs(): ColDef[] {\n return [\n this.colDefBuilderFactoryService.getBuilder().withColId('rowId').withNumericMultiFilter().withHide().withHiddenInToolPanel().withoutFilter().build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('drawingName')\n .withHeaderName('ARTICLES.ARTICLE', 1)\n .withField('orderline.article.name', true)\n .withComparator(StringUtils.stringComparator)\n .withoutFilter()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('status')\n .withHide(!this.productionSchedule.completingPartially && !this.productionSchedule.isPartiallyOrCompletelyExecuted())\n .withHiddenInToolPanel(!this.productionSchedule.completingPartially)\n .withField('status')\n .withHeaderName('GENERAL.STATUS')\n .withCellRendererSelector((params: ICellRendererParams): CellRendererSelectorResult => {\n return {\n component: ProductionSchedulePartiallyCompletedStatusCellRendererComponent,\n params: {\n productionScheduleItem: params.data\n } as ProductionSchedulePartiallyCompletedStatusParams\n };\n })\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('totalWovenHeightInPicks')\n .withHide(!this.productionSchedule.completingPartially && !this.productionSchedule.isPartiallyOrCompletelyExecuted())\n .withHiddenInToolPanel(!this.productionSchedule.completingPartially)\n .withField('totalWovenHeightInPicks')\n .withHeaderName('GENERAL.DIMENSIONS.TOTAL_WOVEN_HEIGHT', 1, false, Unit.PICKS)\n .withRightAlignment()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('pieces')\n .withHeaderName('ORDERBOOK.QUANTITY')\n .withField('quantity')\n .withEditable(this.productionSchedule.completingPartially)\n .withOnCellClicked((event: CellClickedEvent) => this.editQuantityCell(event))\n .withCellEditor(\n NumberCellEditorComponent,\n (params: ICellEditorParams): NumberCellEditorParams =>\n ({\n min: 0,\n max: 100000,\n autoSelect: true\n }) as NumberCellEditorParams\n )\n .withValueGetter((params: ValueGetterParams) => this.getValueForQuantity(params), true)\n .withValueSetter((params: ValueSetterParams) => this.setQuantity(params))\n .withWidth(100)\n .withMinWidth(100)\n .withMaxWidth(150)\n .withHiddenInToolPanel()\n .withRightAlignment()\n .withSortable(false)\n .withoutFilter()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('designCode')\n .withHeaderName('DESIGN_LIBRARY.DETAILS.DESIGN_CODE')\n .withField('drawing.code', true)\n .withComparator(StringUtils.stringComparator)\n .withoutFilter()\n .withRightAlignment()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('commercialWidthInCM')\n .withField('commercialDimensionsInMM.widthInMM')\n .withHeaderName('GENERAL.DIMENSIONS.WIDTH', 1, false, Unit.CENTIMETER)\n .withCellRenderer((params: ICellRendererParams) =>\n AgGridUtils.buildAgGridCellTextWithoutUnit(params.data.commercialDimensionsInMM.widthInMM, Unit.MILLIMETER, Unit.CENTIMETER, this.l10nIntlService, 2)\n )\n .withTooltipValueGetter((params: ITooltipParams) =>\n AgGridUtils.buildAgGridCellTooltipWithUnitConversion(params.value, Unit.MILLIMETER, this.commercialUnit, this.l10nIntlService, undefined, 2)\n )\n .withRightAlignment()\n .withoutFilter()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('commercialHeightInCM')\n .withField('commercialDimensionsInMM.heightInMM')\n .withHeaderName('GENERAL.DIMENSIONS.HEIGHT', 1, false, Unit.CENTIMETER)\n .withCellRenderer((params: ICellRendererParams) =>\n AgGridUtils.buildAgGridCellTextWithoutUnit(params.data.commercialDimensionsInMM.heightInMM, Unit.MILLIMETER, Unit.CENTIMETER, this.l10nIntlService, 2)\n )\n .withTooltipValueGetter((params: ITooltipParams) =>\n AgGridUtils.buildAgGridCellTooltipWithUnitConversion(params.value, Unit.MILLIMETER, this.commercialUnit, this.l10nIntlService, undefined, 2)\n )\n .withRightAlignment()\n .withoutFilter()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('technicalWidthInDents')\n .withField('technicalDimensions.widthInDents')\n .withHeaderName('GENERAL.DIMENSIONS.WIDTH', 1, false, Unit.DENTS)\n .withTooltipValueGetter((params: ITooltipParams) => AgGridUtils.buildAgGridCellTooltipWithUnit(params.value, Unit.DENTS, this.l10nIntlService))\n .withRightAlignment()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('technicalHeightInPicks')\n .withField('technicalDimensions.heightInPicks')\n .withHeaderName('GENERAL.DIMENSIONS.HEIGHT', 1, false, Unit.PICKS)\n .withTooltipValueGetter((params: ITooltipParams) => AgGridUtils.buildAgGridCellTooltipWithUnit(params.value, Unit.PICKS, this.l10nIntlService))\n .withRightAlignment()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('mainColor')\n .withField('borderColorPosition', false)\n .withComparator(StringUtils.stringComparator)\n .withHeaderName('GENERAL.ADVANCED_SEARCH.MAIN_COLOR')\n .withCellRendererSelector(this.cellRendererSelector(GridCreelPreviewOfCreelPositionComponent, {previewType: PreviewType.COLOR, showRgbValues: true}, true))\n .withoutFilter()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('borderColor')\n .withField('borderColorPosition', false)\n .withComparator(StringUtils.stringComparator)\n .withHeaderName('GENERAL.ADVANCED_SEARCH.BORDER_COLOR')\n .withCellRendererSelector(this.cellRendererSelector(GridCreelPreviewOfCreelPositionComponent, {previewType: PreviewType.COLOR, showRgbValues: true}, true, false))\n .withoutFilter()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('finishingName')\n .withField('finishing.nameWithVersion', true)\n .withHeaderName('TEXTILE_DATA.FINISHING.FINISHING')\n .withCellRendererSelector(this.cellRendererSelector(FinishingListViewInformationComponent, {}, false, false))\n .withComparator(StringUtils.stringComparator)\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('shape')\n .withField('drawing.shape', true)\n .withHeaderName('GENERAL.SHAPE')\n .withComparator(StringUtils.stringComparator)\n .withValueGetter((params: ValueGetterParams) => this.getShape(params.data?.drawing?.shape), true)\n .withoutFilter()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('salesOrderReference')\n .withHeaderName('ORDERBOOK.ORDERBOOK_REFERENCE')\n .withField('orderline.salesOrderReference', true)\n .withComparator(StringUtils.stringComparator)\n .withRightAlignment()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('salesOrderlineReference')\n .withHeaderName('ORDERBOOK.ORDERLINE_REFERENCE')\n .withField('orderline.salesOrderLineReference', true)\n .withComparator(StringUtils.stringComparator)\n .withRightAlignment()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('qualityName')\n .withHeaderName('TEXTILE_DATA.MACHINE_QUALITY.MACHINE_QUALITY')\n .withField('orderline.article.machineQuality.nameWithVersion', true)\n .withComparator(StringUtils.stringComparator)\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('coloredYarnSetName')\n .withHeaderName('TEXTILE_DATA.COLORED_YARN_SET.COLORED_YARN_SET')\n .withField('orderline.article.coloredYarnSet.name', true)\n .withComparator(StringUtils.stringComparator)\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('articleName')\n .withHeaderName('DESIGN_LIBRARY.DETAILS.NAME', 1)\n .withField('drawing.name', true)\n .withComparator(StringUtils.stringComparator)\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('desiredDate')\n .withField('orderline.desiredDate')\n .withDate()\n .withHeaderName('SALES_ORDERS.DESIRED_DATE')\n .withDateMultiFilter()\n .withoutFilter()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('customerReference')\n .withField('orderline.customerReference', true)\n .withHeaderName('ORDERBOOK.CUSTOMER_REFERENCE')\n .withComparator(StringUtils.stringComparator)\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('priority')\n .withField('orderline.priority')\n .withHeaderName('SALES_ORDERS.PRIORITY.PRIORITY')\n .withCellRendererSelector((params: ICellRendererParams): CellRendererSelectorResult => {\n return !AssertionUtils.isNullOrUndefined(params.data?.orderline?.priority)\n ? {\n component: GridTagComponent,\n params: {\n translationKey: 'SALES_ORDERS.PRIORITY.',\n size: TagSize.SMALL,\n colorGetter: {\n [Priority.LOW]: TagColor.PRIMARY,\n [Priority.MEDIUM]: TagColor.WARNING,\n [Priority.HIGH]: TagColor.ERROR\n }\n } as any\n }\n : null;\n })\n .withTooltipValueGetter((params: ITooltipParams) =>\n AssertionUtils.isNullOrUndefined(params.data?.orderline?.priority) ? null : this.translate.instant(`SALES_ORDERS.PRIORITY.${params.value}`).toUpperCase()\n )\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('open-in-cadcam')\n .withField('open-in-cadcam')\n .withHeaderName('')\n .withoutFilter()\n .withWidth(32)\n .withHide(!this.hasViewEpPermission || this.productionSchedule.completingPartially || this.productionSchedule.isPartiallyOrCompletelyExecuted())\n .withHiddenInToolPanel()\n .withMaxWidth(32)\n .withCellRendererSelector((params: ICellRendererParams): CellRendererSelectorResult => {\n return {\n component: CellButtonComponent,\n params: {\n buttons: [{icon: 'solid-open-in-new', title: 'GENERAL.ACTIONS.OPEN_IN_CAD_CAM', onClick: () => this.openCadCam(params.eGridCell, params.data)} as CrudOverviewButtonConfig]\n } as CellButtonParams\n };\n })\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withColId('more-actions')\n .withField('actions')\n .withHeaderName('')\n .withoutFilter()\n .withWidth(32)\n .withHide(!this.productionSchedule.completingPartially && !this.productionSchedule.isPartiallyOrCompletelyExecuted())\n .withHiddenInToolPanel()\n .withMaxWidth(32)\n .withCellRendererSelector((params: ICellRendererParams): CellRendererSelectorResult => {\n const buttons: CrudOverviewButtonConfig[] = [\n {\n icon: 'solid-edit',\n title: 'ANGULAR_COMPONENT_LIBRARY.CRUD_OVERVIEW_DATA.EDIT',\n onClick: () =>\n this.showEditProductionScheduleItemDialog(\n this.getCorrectIndex(params.data, 'productionScheduleColoredYarnSetIndex'),\n this.getCorrectIndex(params.data, 'productionSchedulePathIndex'),\n this.getCorrectIndex(params.data, 'productionScheduleItemIndex'),\n params.data\n )\n } as CrudOverviewButtonConfig\n ];\n\n if (this.hasViewEpPermission) {\n buttons.push({\n icon: 'solid-open-in-new',\n title: 'GENERAL.ACTIONS.OPEN_IN_CAD_CAM',\n onClick: () => this.openCadCam(params.eGridCell, params.data)\n } as CrudOverviewButtonConfig);\n }\n\n return {\n component: CellButtonComponent,\n params: {\n buttons\n } as CellButtonParams\n };\n })\n .build()\n ];\n }\n\n private getValueForQuantity(params: ValueGetterParams | ITooltipParams): string {\n if (params.data instanceof ProductionScheduleItemInPathGroup) {\n const nrClothsMultiplier = this.productionSchedule?.getProductionScheduleItemMultiplier() ?? 2;\n if (this.productionSchedule?.isPartiallyOrCompletelyExecuted() && !AssertionUtils.isNullOrUndefined(params.data.amountProduced)) {\n return `${params.data?.amountProduced * nrClothsMultiplier}/${params.data?.quantity * nrClothsMultiplier}`;\n } else {\n return `${params.data?.quantity * nrClothsMultiplier}`;\n }\n }\n }\n\n private editQuantity(quantity: number, productionScheduleColoredYarnSetIndex: number, productionSchedulePathIndex: number, productionScheduleItemIndex: number): void {\n if (!AssertionUtils.isNullOrUndefined(quantity) && quantity >= 0) {\n const productionSchedulePathsOfColoredYarnSet = this.productionSchedule.productionSchedulePathsOfColoredYarnSets[productionScheduleColoredYarnSetIndex];\n const productionScheduleItem = productionSchedulePathsOfColoredYarnSet.productionSchedulePaths[productionSchedulePathIndex].pathGroups[productionScheduleItemIndex];\n this.updateProductionScheduleItemEditableQuantityProperty(quantity, productionScheduleItem, productionScheduleColoredYarnSetIndex, productionSchedulePathIndex, productionScheduleItemIndex);\n }\n }\n\n private updateProductionScheduleItemEditableQuantityProperty(\n value: number,\n productionScheduleItem: ProductionScheduleItemInPathGroup,\n productionScheduleColoredYarnSetIndex: number,\n productionSchedulePathIndex: number,\n productionScheduleItemIndex: number\n ): void {\n if (this.productionSchedule.completingPartially) {\n const productionSchedulePathsOfColoredYarnSet = this.initialProductionSchedule.productionSchedulePathsOfColoredYarnSets[productionScheduleColoredYarnSetIndex];\n const productionScheduleItemFromInitialProductionSchedule = productionSchedulePathsOfColoredYarnSet.productionSchedulePaths[productionSchedulePathIndex].pathGroups[productionScheduleItemIndex];\n productionScheduleItem.amountProduced = value;\n\n if (productionScheduleItemFromInitialProductionSchedule.amountProduced === value) {\n productionScheduleItem.status = ProductionScheduleItemInPathGroupStatus.NORMAL;\n } else if (value === 0) {\n productionScheduleItem.status = ProductionScheduleItemInPathGroupStatus.REMOVED;\n } else {\n productionScheduleItem.status = ProductionScheduleItemInPathGroupStatus.CHANGED;\n }\n } else {\n productionScheduleItem.quantity = Math.floor(value / this.productionSchedule.getProductionScheduleItemMultiplier());\n }\n }\n\n private editQuantityCell(event: CellClickedEvent): void {\n if (event?.api) {\n event?.api?.stopEditing();\n }\n\n if (event.column.getColDef().editable) {\n event?.api.startEditingCell({\n rowIndex: event?.rowIndex,\n colKey: event?.column?.getColId()\n });\n }\n }\n\n private setQuantity(params: ValueSetterParams): boolean {\n if (this.productionScheduleItemMultiplier === 2 && params.newValue % 2 !== 0) {\n params.newValue--;\n }\n params.node.data.amountProduced = Math.max(0, params.newValue);\n\n this.editQuantity(\n params.newValue / 2,\n this.getCorrectIndex(params.data, 'productionScheduleColoredYarnSetIndex'),\n this.getCorrectIndex(params.data, 'productionSchedulePathIndex'),\n this.getCorrectIndex(params.data, 'productionScheduleItemIndex')\n );\n\n return true;\n }\n\n private getDateModified(item: ProductionScheduleItemInPathGroup): Date {\n return item?.orderline?.desiredDate;\n }\n\n private getCorrectIndex(productionScheduleItem: ProductionScheduleItemInPathGroup, indexOf: string): number {\n let index: number;\n this.productionSchedule.productionSchedulePathsOfColoredYarnSets.forEach((productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet, coloredYarnSetIndex: number) => {\n productionSchedulePathsOfColoredYarnSet.productionSchedulePaths.forEach((productionSchedulePath: ProductionSchedulePath, pathIndex: number) => {\n productionSchedulePath.pathGroups.forEach((productionScheduleItemInPathGroup: ProductionScheduleItemInPathGroup, itemIndex: number) => {\n if (productionScheduleItemInPathGroup.id === productionScheduleItem.id) {\n if (indexOf === 'productionScheduleColoredYarnSetIndex') {\n index = coloredYarnSetIndex;\n } else if (indexOf === 'productionSchedulePathIndex') {\n index = pathIndex;\n } else if (indexOf === 'productionScheduleItemIndex') {\n index = itemIndex;\n }\n }\n });\n });\n });\n\n return index;\n }\n\n private getMainColor(rowItem: ProductionScheduleItemInPathGroup): Color {\n const coloredYarnSet = this.getColoredYarnSetForPathItem(rowItem);\n return coloredYarnSet?.coloredYarnSet?.overviewListColorSet?.creelPositions[rowItem.mainColorPosition - 1]?.items[0] as Color;\n }\n\n private getBorderColor(rowItem: ProductionScheduleItemInPathGroup): Color {\n const coloredYarnSet = this.getColoredYarnSetForPathItem(rowItem);\n return coloredYarnSet?.coloredYarnSet?.overviewListColorSet?.creelPositions[rowItem.borderColorPosition - 1]?.items[0] as Color;\n }\n\n private getColoredYarnSetForPathItem(rowItem: ProductionScheduleItemInPathGroup): OverviewListColoredYarnSetWithStartDent {\n let coloredYarnSet: OverviewListColoredYarnSetWithStartDent;\n\n this.productionSchedule.productionSchedulePathsOfColoredYarnSets.forEach((productionSchedulePathOfColoredYarnSets: ProductionSchedulePathsOfColoredYarnSet) => {\n productionSchedulePathOfColoredYarnSets.productionSchedulePaths.forEach((productionSchedulePath: ProductionSchedulePath) => {\n productionSchedulePath.pathGroups.forEach((pathItem: ProductionScheduleItemInPathGroup) => {\n if (pathItem.id === rowItem.id) {\n coloredYarnSet = productionSchedulePathOfColoredYarnSets.productionScheduleColoredYarnSet;\n }\n });\n });\n });\n\n return coloredYarnSet;\n }\n\n private cellRendererSelector(\n cellRenderer: any = null,\n cellRendererParams: any = null,\n cellForMainOrBorderColor: boolean = false,\n useMainColor: boolean = true\n ): (params: ICellRendererParams) => CellRendererSelectorResult {\n return (params: ICellRendererParams): CellRendererSelectorResult => {\n if (cellForMainOrBorderColor) {\n const rowItem = params.data as ProductionScheduleItemInPathGroup;\n const mainColor = this.getMainColor(rowItem);\n const borderColor = this.getBorderColor(rowItem);\n cellRendererParams.value = {colors: useMainColor ? [mainColor] : [borderColor]};\n }\n return params.node.level === 0 ? {component: cellRenderer ?? params.colDef.cellRenderer, params: cellRendererParams} : {component: EmptyCellRendererComponent};\n };\n }\n\n private getShape(shape: string): string {\n return FixedShape.getTranslationKeyForShape(shape, this.translate);\n }\n\n private getLabelForMaxLengthOrDifference(technicalHeightInPicks: number, commercialHeightInCommercialUnit: number): string {\n return `${commercialHeightInCommercialUnit} ${this.translate.instant(`GENERAL.UNIT.${EnumUtils.getKeyFromValue(Unit, this.commercialUnit)}`)} - ${technicalHeightInPicks} ${this.translate.instant(\n `GENERAL.UNIT.${EnumUtils.getKeyFromValue(Unit, Unit.PICKS)}`\n )}`;\n }\n\n private getLabelForLength(commercialLengthInCommercialUnit: number, totalLengthInPicks: number): string {\n return `${commercialLengthInCommercialUnit} ${this.translate.instant(`GENERAL.UNIT.${EnumUtils.getKeyFromValue(Unit, this.commercialUnit)}`)} - ${totalLengthInPicks} ${this.translate.instant(\n `GENERAL.UNIT.${EnumUtils.getKeyFromValue(Unit, Unit.PICKS)}`\n )}`;\n }\n\n private getLabelForWidth(commercialWidthInCommercialUnit: number, technicalWidthInDents: number): string {\n return `${commercialWidthInCommercialUnit} ${this.translate.instant(`GENERAL.UNIT.${EnumUtils.getKeyFromValue(Unit, this.commercialUnit)}`)} - ${technicalWidthInDents} ${this.translate.instant(\n `GENERAL.UNIT.${EnumUtils.getKeyFromValue(Unit, Unit.DENTS)}`\n )}`;\n }\n\n private convertValueToCommercialUnit(value: number, unit: Unit): number {\n return round(\n convertCommercialUnit({\n from: {\n value: value ?? 0,\n unit\n },\n to: this.commercialUnit\n }),\n 0\n );\n }\n}\n","export enum ResizeDirection {\n VERTICAL = 'VERTICAL',\n HORIZONTAL = 'HORIZONTAL'\n}\n","
\n
\n \n
\n \n\n
\n\n \n
\n
\n
\n\n \n \n
\n\n
\n
\n \n \n

\n {{ 'TEXTILE_DATA.COLORED_YARN_SET.COLORED_YARN_SET' | bmsTranslate: {count: 2} }}\n

\n \n \n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.WEAVE_PLAN_SUMMARY.LENGTH_DIFFERENCE_TO_BUGGY' | bmsTranslate }}:\n \n {{ getUnitDimensionsForLengthDifferenceToBuggy() }}\n \n \n \n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.WEAVE_PLAN_SUMMARY.REST_WIDTH' | bmsTranslate }}:\n \n {{ getRestWidthDimensions() }}\n \n \n \n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.WEAVE_PLAN_SUMMARY.SURFACE' | bmsTranslate }}:\n \n {{ getSurfaceDimensions() }}\n \n \n \n {{ 'PRODUCTION_ORDER.WEAVE_PLAN.WEAVE_PLAN_SUMMARY.NON_PRODUCTION_ITEMS' | bmsTranslate }}:\n \n {{ getNonProductionItemsDimensions() }}\n \n \n \n {{ 'TEXTILE_DATA.MACHINE_QUALITY.PRACTICALPICKDENSITY' | bmsTranslate }}:\n \n {{ getPracticalPickDensity() }}\n \n \n \n\n
\n
\n
\n \n
\n\n \n {{ 'GENERAL.ACTIONS.EDIT_OBJECT' | bmsTranslate: {object: 'PRODUCTION_ORDER.PATH' | bmsTranslate: {count: 2} | lowercase} }}\n \n\n \n \n \n {{ 'GENERAL.VIEW_MODES.OVERVIEW' | bmsTranslate }}\n \n \n {{ 'GENERAL.VIEW_MODES.LISTVIEW' | bmsTranslate }}\n \n \n \n
\n
\n
\n \n
\n \n\n \n \n \n \n\n \n \n\n \n \n\n \n \n\n \n \n
\n
\n
\n
\n
\n\n
\n \n \n \n
\n \n

{{ 'PRODUCTION_ORDER.WEAVE_PLAN.WEAVE_PLAN_SUMMARY.WEAVE_PLAN_SUMMARY' | bmsTranslate }}

\n
\n
\n
\n
\n
\n
\n

{{ 'GENERAL.SUMMARY' | bmsTranslate }}

\n
\n \n \n \n \n \n \n
\n
\n
\n\n
\n \n \n
\n
\n
\n
\n
\n","import {\n AfterContentChecked,\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n HostListener,\n Inject,\n Input,\n NgZone,\n OnChanges,\n OnInit,\n Output,\n Renderer2,\n ViewChild\n} from '@angular/core';\nimport {MatExpansionPanel} from '@angular/material/expansion';\nimport {MatSelectChange} from '@angular/material/select';\nimport {MatSlideToggleChange} from '@angular/material/slide-toggle';\nimport {Router} from '@angular/router';\nimport {ErrorHandlers} from '@application/helper/error-handlers';\nimport {NavigationId} from '@application/helper/routing/navigation-id.enum';\nimport {NavigationUtils} from '@application/helper/routing/navigation-utils';\nimport {BmpProductionScheduleItemInPathGroup} from '@domain/production-schedule/bmp-production-schedule-item-in-path-group';\nimport {ProductionOrderCustomSettings} from '@domain/production-schedule/custom-settings/production-order-custom-settings';\nimport {EpProductionScheduleItemInPathGroup} from '@domain/production-schedule/ep-production-schedule-item-in-path-group';\nimport {ProductionSchedule} from '@domain/production-schedule/production-schedule';\nimport {ProductionScheduleDisplay} from '@domain/production-schedule/production-schedule-display.enum';\nimport {ProductionScheduleDrawingViewMode} from '@domain/production-schedule/production-schedule-drawing-view-mode.enum';\nimport {ProductionScheduleItemInPathGroup} from '@domain/production-schedule/production-schedule-item-in-path-group';\nimport {ProductionSchedulePath} from '@domain/production-schedule/production-schedule-path';\nimport {ProductionSchedulePathsOfColoredYarnSet} from '@domain/production-schedule/production-schedule-paths-of-colored-yarn-set';\nimport {ProductionSchedulePhase} from '@domain/production-schedule/production-schedule-phase.enum';\nimport {Permission} from '@domain/profile/permission.enum';\nimport {Subscription} from '@domain/profile/subscription';\nimport {PropertyValue} from '@domain/property-value';\nimport {OverviewListColoredYarnSetWithStartDent} from '@domain/textile-data/creel/overview-list-colored-yarn-set-with-start-dent';\nimport {PathWidth} from '@domain/textile-data/machine-quality/path-width';\nimport {AUTHENTICATION, Authentication} from '@infrastructure/http/authentication/authentication';\nimport {MACHINE_QUALITIES, MachineQualities} from '@infrastructure/http/machine-quality/machine-qualities';\nimport {PRODUCTION_SCHEDULES, ProductionSchedules} from '@infrastructure/http/production-schedule/production-schedules';\nimport {ProductionScheduleBuilderPageStateManagerService} from '@infrastructure/page-state-manager/production-schedule-builder/production-schedule-builder-page-state-manager.service';\nimport {ProductionScheduleNewBuilderPageState} from '@infrastructure/page-state-manager/production-schedule-builder/production-schedule-new-builder-page-state.interface';\nimport {SwitchCommercialTechnicalUnitsCustomSettingsDialogComponent} from '@presentation/components/dialog-button/dialog-data/switch-commercial-technical-units/switch-commercial-technical-units.component';\nimport {SideNavigationStateService} from '@presentation/navigation/side-navigation-state.service';\nimport {ProductionScheduleBuilderSummaryComponent} from '@presentation/pages/texfab/production-schedule/add/plan/builder-summary/production-schedule-builder-summary.component';\nimport {PRODUCTION_SCHEDULE_PLAN, ProductionSchedulePlan} from '@presentation/pages/texfab/production-schedule/add/plan/production-schedule-plan';\nimport {\n AssertionUtils,\n BaseComponent,\n convertCommercialUnit,\n convertDentsToWidthInMeter,\n convertHeightInMeterToPicks,\n convertPicksToHeightInMeter,\n convertUnit,\n DOMUtils,\n TranslateService,\n Unit,\n WINDOW\n} from '@vdw/angular-component-library';\nimport {assign, find, isEmpty, isEqual, noop, round} from 'lodash-es';\nimport {Observable, Subject} from 'rxjs';\nimport {debounceTime, distinctUntilChanged, takeUntil} from 'rxjs/operators';\nimport {PathContentSettingsDialogData} from '../menu-items-new/path-content-settings-dialog-data.interface';\nimport {PathBarComponent} from './builder/path-item/path-bar.component';\nimport {PathLayoutComponent} from './builder/path-layout/path-layout.component';\nimport {ProductionScheduleNewListviewComponent} from './new-listview/production-schedule-new-listview.component';\nimport {ResizeDirection} from './resize-direction.enum';\nimport {ProductionScheduleVerifyComponent} from './verify/production-schedule-verify.component';\n\n@Component({\n selector: 'app-production-schedule-plan-new',\n templateUrl: './production-schedule-plan-new.component.html',\n styleUrls: ['./production-schedule-plan-new.component.scss']\n})\nexport class ProductionSchedulePlanNewComponent extends BaseComponent implements OnInit, OnChanges, AfterViewInit, AfterContentChecked {\n public static readonly PADDING_WIDTH_IN_PX = 24;\n public static readonly MARGIN_WIDTH_IN_PX = 16;\n\n private static readonly urlToProductionScheduleOverview = NavigationUtils.getAbsolutePath(NavigationId.CARPET_PRODUCTION_ORDER);\n\n @Input() public customSettings: ProductionOrderCustomSettings;\n @Input() public productionSchedule: ProductionSchedule;\n @Input() public pathLabelsOrNonProductionItemsFromLongestPathLengthInPicks: number;\n @Input() public pathLabelsOrNonProductionItemsFromLongestPathLengthInCommercialUnit: number;\n @Input() public lastProductionSchedulePhase: ProductionSchedulePhase;\n @Input() public isVerifyingFromConfigurePhase: boolean;\n @Input() public pathWidths: PathWidth[];\n @Input() public listOfMachineQualityCustomSettings: PropertyValue[];\n @Input() public pathContentSettingsDialogData: PathContentSettingsDialogData;\n @Input() public preselectedOrderlineIds: number[] = [];\n @Input() public preselectedDesignIds: number[] = [];\n @Input() public preselectedConfigurationIds: number[] = [];\n\n @Output() public returnToProductionSchedulePhase: EventEmitter = new EventEmitter();\n @Output() public productionSchedulePlanChanged: EventEmitter = new EventEmitter();\n @Output() public verifiedProductionSchedule: EventEmitter<{confirmImmediately: boolean; error: boolean}> = new EventEmitter<{confirmImmediately: boolean; error: boolean}>();\n @Output() public navigateBackOutput = new EventEmitter();\n\n @ViewChild('productionScheduleBuilderSummary') public productionScheduleBuilderSummary: ProductionScheduleBuilderSummaryComponent;\n @ViewChild(MatExpansionPanel) public expansionPanel: MatExpansionPanel;\n @ViewChild('productionSchedulePlanWrapper') public productionSchedulePlanWrapper: ElementRef;\n @ViewChild('builderContainer') public builderContainer: ElementRef;\n @ViewChild('buttonsContainer') public buttonsContainer: ElementRef;\n @ViewChild('errorsAndWarningsContainer') public errorsAndWarningsContainer: ElementRef;\n @ViewChild('zoomOutContainer', {read: ElementRef}) public zoomOutContainer: ElementRef;\n @ViewChild('zoomInContainer', {read: ElementRef}) public zoomInContainer: ElementRef;\n @ViewChild('editPathsToggleContainer', {read: ElementRef}) public editPathsToggleContainer: ElementRef;\n @ViewChild('viewSelectorContainer', {read: ElementRef}) public viewSelectorContainer: ElementRef;\n @ViewChild('drawingLibrary', {read: ElementRef}) public drawingLibrary: ElementRef;\n @ViewChild('pathLayout', {read: ElementRef}) public pathLayout: ElementRef;\n @ViewChild(PathLayoutComponent) private pathLayoutComponent: PathLayoutComponent;\n @ViewChild('productionScheduleNewListView') public productionScheduleNewListViewComponent: ProductionScheduleNewListviewComponent;\n\n public readonly resizeDirection: typeof ResizeDirection = ResizeDirection;\n public selectedProductionScheduleDisplay: ProductionScheduleDisplay = ProductionScheduleDisplay.DETAILVIEW;\n public productionScheduleDisplay: typeof ProductionScheduleDisplay = ProductionScheduleDisplay;\n public isVerifyingProductionSchedule = false;\n public buggyLengthMinInPicks: number;\n public buggyLengthMaxInPicks: number;\n public buggyLengthMaxInMM: number;\n public availableSpaceInBuggyInPicks: number;\n public availableSpaceInBuggyInCommercialUnit: number;\n public availableSpaceInBuggyForBuilderInPicks: number;\n public availableSpaceInBuggyForBuilderInCommercialUnit: number;\n public canZoomIn: boolean = true;\n public canZoomOut: boolean = true;\n public zoomLevel: number = 1;\n public displayTechnicalUnit: boolean = true;\n public isResizing: boolean = false;\n public readonly resizerPx: number = 16;\n public readonly customSettingsComponent: typeof SwitchCommercialTechnicalUnitsCustomSettingsDialogComponent = SwitchCommercialTechnicalUnitsCustomSettingsDialogComponent;\n public readonly MIN_PATH_LAYOUT_HEIGHT_IN_PX: number = 200;\n public readonly MIN_DRAWING_LIBRARY_WIDTH_IN_PX: number = 600;\n public readonly MIN_DRAWING_LIBRARY_HEIGHT_IN_PX: number = 250;\n public readonly INITIAL_PATH_LAYOUT_HEIGHT_IN_PX: number = 300;\n public commercialUnit: Unit = Unit.CENTIMETER;\n public initialPathLayoutHeightInPx: number = 300;\n public initialPathLayoutWidthInPx: number;\n public initialPathLayoutMaxHeightInPx: number;\n public minPathLayoutWidthInPx: number;\n public minPathContentWidthInPx: number;\n public canShowWarningWithText: boolean;\n public maxWarningWidth: number = 44;\n public canShowSelectedItems: boolean = false;\n public selectedPath: ProductionSchedulePath;\n public selectedRestPathColoredYarnSet: OverviewListColoredYarnSetWithStartDent;\n public productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet;\n public selectedViewMode: ProductionScheduleDrawingViewMode;\n public marginInDentsOfMissingDesigns: number = 0;\n public selectedPathContentRowData: ProductionScheduleItemInPathGroup;\n\n private productionScheduleHeight: number = 0;\n private hasProductionScheduleLoaded: boolean = false;\n private isBuildingProductionSchedule: boolean = false;\n private _productionSchedulePhase: ProductionSchedulePhase;\n private productionScheduleBuilderState: ProductionScheduleNewBuilderPageState;\n private readonly zoomFactor: number = 0.1;\n private readonly zoomInClickSubject: Subject = new Subject();\n private readonly zoomOutClickSubject: Subject = new Subject();\n private readonly defaultCustomSettingsDialogData = {\n labelTranslationKey: this.translate.instant('GENERAL.UNIT.LABEL', {object: this.translate.instant('PRODUCTION_ORDER.WEAVE_PLAN.BUILDER')}),\n technicalDimensionsTranslationKey: 'PRODUCTION_ORDER.WEAVE_PLAN.DENTS_AND_PICKS'\n };\n\n private currentSubscription: Subscription;\n\n private cancelMouseMoveListener: () => void;\n private cancelMouseUpListener: () => void;\n\n public constructor(\n @Inject(AUTHENTICATION) private readonly authentication: Authentication,\n @Inject(PRODUCTION_SCHEDULES) private readonly productionSchedules: ProductionSchedules,\n @Inject(MACHINE_QUALITIES) private readonly machineQualities: MachineQualities,\n @Inject(PRODUCTION_SCHEDULE_PLAN) private readonly productionSchedulePlan: ProductionSchedulePlan,\n @Inject(WINDOW) private readonly window: Window,\n private readonly router: Router,\n private readonly renderer: Renderer2,\n private readonly changeDetectorRef: ChangeDetectorRef,\n private readonly zone: NgZone,\n private readonly sideNavigationStateService: SideNavigationStateService,\n private readonly translate: TranslateService,\n private readonly productionScheduleBuilderPageStateManager: ProductionScheduleBuilderPageStateManagerService\n ) {\n super();\n }\n\n public get productionSchedulePhase(): ProductionSchedulePhase {\n return this._productionSchedulePhase;\n }\n\n @Input()\n public set productionSchedulePhase(productionSchedulePhase: ProductionSchedulePhase) {\n this._productionSchedulePhase = productionSchedulePhase;\n\n if (productionSchedulePhase === ProductionSchedulePhase.BUILD && !this.isVerifyingFromConfigurePhase) {\n this.isBuildingProductionSchedule = true;\n this.getProductionScheduleBuilderPageState();\n setTimeout(() => {\n this.isBuildingProductionSchedule = false;\n }, 1000);\n } else if (productionSchedulePhase === ProductionSchedulePhase.VERIFY) {\n if (this.productionSchedule.isExecuted() || this.productionSchedule.completingPartially) {\n this.selectedProductionScheduleDisplay = ProductionScheduleDisplay.LISTVIEW;\n } else {\n setTimeout(() => {\n this.selectedProductionScheduleDisplay = ProductionScheduleDisplay.OVERVIEW;\n });\n }\n }\n }\n\n @HostListener('window:resize')\n public onResize(): void {\n this.executeResizePathBarComponent();\n }\n\n public ngAfterViewInit(): void {\n if (!AssertionUtils.isNullOrUndefined(this.builderContainer)) {\n DOMUtils.observeResize(this.builderContainer.nativeElement)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy), distinctUntilChanged())\n .subscribe(() => this.setWarningTextVisibility());\n }\n this.setInitialPathLayoutDimentions();\n this.changeDetectorRef.detectChanges();\n }\n\n public ngAfterContentChecked(): void {\n this.changeDetectorRef.detectChanges();\n }\n\n public ngOnInit(): void {\n this.currentSubscription = this.authentication.getCurrentSubscription();\n if (isEmpty(this.productionSchedule.productionSchedulePathsOfColoredYarnSets)) {\n this.productionSchedule.initProductionSchedulePathsForEachColoredYarnSet(this.productionSchedule.coloredYarnSets);\n }\n\n this.initialiseProductionSchedulePlan();\n this.subscribeToZoomInChanges();\n this.subscribeToZoomOutChanges();\n this.subscribeToNavigationStateChanges();\n this.getQualitySettings();\n }\n\n public ngOnChanges(): void {\n if (!AssertionUtils.isNullOrUndefined(this.productionSchedule?.buggy)) {\n this.setAvailableSpaceInBuggy();\n }\n }\n\n public zoomIn(): void {\n if (this.canZoomIn) {\n this.zoomInClickSubject.next();\n }\n }\n\n public zoomOut(): void {\n if (this.canZoomOut) {\n this.zoomOutClickSubject.next();\n }\n }\n\n public isProductionSchedulePhasePreselection(): boolean {\n return this.productionSchedulePhase === ProductionSchedulePhase.PRESELECTION;\n }\n\n public onCanZoomInChanges(canZoomIn: boolean): void {\n this.canZoomIn = canZoomIn;\n this.changeDetectorRef.detectChanges();\n }\n\n public onCanZoomOutChanges(canZoomOut: boolean): void {\n this.canZoomOut = canZoomOut;\n this.changeDetectorRef.detectChanges();\n }\n\n public canShowDetailView(): boolean {\n return isEqual(this.selectedProductionScheduleDisplay, ProductionScheduleDisplay.DETAILVIEW);\n }\n\n public canShowListView(): boolean {\n return isEqual(this.selectedProductionScheduleDisplay, ProductionScheduleDisplay.LISTVIEW) && !this.isVerifyingProductionSchedule;\n }\n\n public canShowOverview(): boolean {\n return isEqual(this.selectedProductionScheduleDisplay, ProductionScheduleDisplay.OVERVIEW);\n }\n\n public canShowProductionScheduleBuilder(): boolean {\n return (this.canShowDetailView() || this.canShowOverview()) && !this.isVerifyingProductionSchedule && this.hasProductionScheduleLoaded && !this.isBuildingProductionSchedule;\n }\n\n public getProductionScheduleHeight(): string {\n return `${this.productionScheduleHeight}${this.commercialUnit}`;\n }\n\n public onProductionSchedulePlanChanged(): void {\n this.productionSchedulePlanChanged.emit();\n }\n\n public changedSelectedProductionScheduleDisplay(matSelectChange: MatSelectChange): void {\n this.selectedProductionScheduleDisplay = matSelectChange.value;\n\n if (this.productionSchedulePhase === ProductionSchedulePhase.BUILD) {\n this.updateProductionScheduleBuilderPageState();\n }\n }\n\n public canShowDrawingLibrary(): boolean {\n return !this.isProductionSchedulePhaseVerify() && !this.isVerifyingFromConfigurePhase;\n }\n\n public canEditProductionScheduleItems(): boolean {\n return this.canShowDrawingLibrary() || this.productionSchedule.completingPartially;\n }\n\n public completePartially(): Observable {\n return this.productionScheduleNewListViewComponent.completePartially();\n }\n\n public getUnitDimensionsForLengthDifferenceToBuggy(): string {\n if (!AssertionUtils.isNullOrUndefined(this.availableSpaceInBuggyForBuilderInPicks)) {\n return `${this.availableSpaceInBuggyInCommercialUnit.toFixed(0)} cm / ${this.availableSpaceInBuggyInPicks} picks`;\n } else {\n let lengthInMeter = 0;\n let lengthInPicks = 0;\n\n this.productionSchedule.productionSchedulePathsOfColoredYarnSets.forEach((productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet) => {\n productionSchedulePathsOfColoredYarnSet.productionSchedulePaths.forEach((productionSchedulePath: ProductionSchedulePath) => {\n if (productionSchedulePath.totalLengthInPicks > lengthInPicks) {\n lengthInPicks = productionSchedulePath.totalLengthInPicks;\n lengthInMeter = convertCommercialUnit({from: {unit: Unit.MILLIMETER, value: productionSchedulePath.totalLengthInMM}, to: Unit.METER});\n }\n });\n });\n\n const lengthDifferenceInCommercialUnit = convertCommercialUnit({\n from: {unit: Unit.METER, value: convertPicksToHeightInMeter(this.buggyLengthMaxInPicks, this.productionSchedule.machineQuality.pickDensity * 1000) - lengthInMeter},\n to: this.commercialUnit\n });\n\n const lengthDifferenceInPicks = this.buggyLengthMaxInPicks - lengthInPicks;\n\n return `${lengthDifferenceInCommercialUnit.toFixed(2)} cm / ${lengthDifferenceInPicks} picks`;\n }\n }\n\n public getRestWidthDimensions(): string {\n let totalWidthInDents = 0;\n\n this.productionSchedule.productionSchedulePathsOfColoredYarnSets.forEach((productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet) => {\n productionSchedulePathsOfColoredYarnSet.productionSchedulePaths.forEach((productionSchedulePath: ProductionSchedulePath) => {\n totalWidthInDents += productionSchedulePath.technicalWidthInDents;\n });\n });\n\n const machineWidth = this.productionSchedule.machine.getTotalWidthInDents();\n\n return `${machineWidth - totalWidthInDents} dents`;\n }\n\n public getSurfaceDimensions(): string {\n let totalLengthInMeter = convertPicksToHeightInMeter(ProductionScheduleVerifyComponent.minProductionScheduleVerifyHeightInPicks, this.productionSchedule.machineQuality.pickDensity * 1000);\n let totalWidthInMeter = convertDentsToWidthInMeter(this.productionSchedule.machine.getTotalWidthInDents(), this.productionSchedule.machineQuality.reedDensity * 1000);\n\n return `${Math.round(totalLengthInMeter * totalWidthInMeter).toFixed(2)}m²`;\n }\n\n public getPracticalPickDensity(): string {\n return `${Math.round(this.productionSchedule.practicalPickDensityInPicksPerMM * 1000)} p/m`;\n }\n\n public getNonProductionItemsDimensions(): string {\n let totalLengthInMeter = convertPicksToHeightInMeter(ProductionScheduleVerifyComponent.minProductionScheduleVerifyHeightInPicks ?? 5000, this.productionSchedule.machineQuality.pickDensity * 1000);\n let totalWidthInMeter = convertDentsToWidthInMeter(this.productionSchedule.machine.getTotalWidthInDents(), this.productionSchedule.machineQuality.reedDensity * 1000);\n\n let totalSquareMeters = totalLengthInMeter * totalWidthInMeter;\n let totalSquareMetersOfNonProductionItems = 0;\n\n this.productionSchedule.productionSchedulePathsOfColoredYarnSets.forEach((productionSchedulePathsOfColoredYarnSet: ProductionSchedulePathsOfColoredYarnSet) => {\n productionSchedulePathsOfColoredYarnSet.productionSchedulePaths.forEach((productionSchedulePath: ProductionSchedulePath) => {\n productionSchedulePath.pathGroups.forEach((pathGroup: ProductionScheduleItemInPathGroup) => {\n if (!(pathGroup instanceof BmpProductionScheduleItemInPathGroup) && !(pathGroup instanceof EpProductionScheduleItemInPathGroup)) {\n const totalSquareMetersOfPathGroup =\n convertCommercialUnit({from: {unit: Unit.MILLIMETER, value: pathGroup.commercialDimensionsInMM.widthInMM}, to: Unit.METER}) *\n convertCommercialUnit({from: {unit: Unit.MILLIMETER, value: pathGroup.commercialDimensionsInMM.heightInMM}, to: Unit.METER});\n totalSquareMetersOfNonProductionItems += totalSquareMetersOfPathGroup;\n }\n });\n });\n });\n\n let totalPercentageOfNonProductionItems = (totalSquareMetersOfNonProductionItems / totalSquareMeters) * 100;\n\n return `${totalSquareMetersOfNonProductionItems.toFixed(2)}m² or ${totalPercentageOfNonProductionItems.toFixed(1)}%`;\n }\n\n public verifyProductionSchedule(confirmImmediately: boolean = false): void {\n if (!this.isVerifyingProductionSchedule) {\n this.productionSchedulePlan.updateEditingPaths(false);\n this.isVerifyingProductionSchedule = true;\n\n this.productionSchedules\n .verifyProductionSchedule(this.productionSchedule.id as string)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe({\n next: (productionSchedule: ProductionSchedule) => {\n this.modifyProductionScheduleAfterVerify(productionSchedule);\n this.isVerifyingProductionSchedule = false;\n this.verifiedProductionSchedule.emit({confirmImmediately, error: false});\n },\n error: () => {\n this.isVerifyingProductionSchedule = false;\n this.verifiedProductionSchedule.emit({confirmImmediately, error: true});\n }\n });\n }\n }\n\n public isProductionSchedulePhaseVerify(): boolean {\n return isEqual(this.productionSchedulePhase, ProductionSchedulePhase.VERIFY) && !this.isVerifyingProductionSchedule;\n }\n\n public back(): void {\n if (!AssertionUtils.isNullOrUndefined(this.productionSchedule?.buggy)) {\n this.setAvailableSpaceInBuggy();\n }\n\n if (this.isProductionSchedulePhaseVerify()) {\n this.productionSchedule.removePathLabelsAndNonProductionItemsFromProductionSchedulePathsOfColoredYarnSets();\n this.productionSchedulePlan.cancelOngoingRecoloring();\n this.productionSchedulePlan.initialiseProductionSchedule(this.productionSchedule).subscribe({next: noop, error: this.handleBackendError()});\n\n this.returnToProductionSchedulePhase.emit(ProductionSchedulePhase.BUILD);\n } else {\n this.returnToProductionSchedulePhase.emit(ProductionSchedulePhase.CONFIGURE);\n }\n }\n\n public canShowIsWeavePlanLoadingIcon(): boolean {\n return !this.hasProductionScheduleLoaded && !this.productionSchedule.isExecuted();\n }\n\n public canShowIsWeavePlanVerifyingIcon(): boolean {\n return (this.isVerifyingProductionSchedule || this.isVerifyingFromConfigurePhase) && this.hasProductionScheduleLoaded;\n }\n\n public canShowIsWeavePlanBuildingIcon(): boolean {\n return this.isBuildingProductionSchedule && this.hasProductionScheduleLoaded;\n }\n\n public scrollIntoWeavePlanSummary(): void {\n const expansionPanelHeader = document.getElementById(this.expansionPanel._headerId);\n\n const productionSchedulePlanWrapperRect = this.productionSchedulePlanWrapper.nativeElement.getBoundingClientRect();\n const expansionPanelHeaderRect = expansionPanelHeader.getBoundingClientRect();\n\n this.productionSchedulePlanWrapper.nativeElement.scrollTo({\n top: expansionPanelHeaderRect.top - productionSchedulePlanWrapperRect.top,\n behavior: 'smooth'\n });\n }\n\n public canShowErrorsAndWarnings(): boolean {\n return (\n !AssertionUtils.isNullOrUndefined(this.productionSchedule.warnings?.totalLossInPercent) ||\n this.productionSchedule.isCreelMappingApplied() ||\n (this.isProductionSchedulePhaseVerify() &&\n (!AssertionUtils.isNullOrUndefined(this.productionSchedule.errors?.totalWidthTooBig) || !AssertionUtils.isNullOrUndefined(this.productionSchedule.errors?.totalWidthTooLittle)))\n );\n }\n\n public getProductionSchedulePracticalPickDensity(): string {\n const defaultUnit: PropertyValue = find(this.listOfMachineQualityCustomSettings, ['propertyName', 'pickDensityUnit']).propertyValue;\n\n const practicalPickDensity = convertUnit({\n from: {\n value: this.productionSchedule.practicalPickDensityInPicksPerMM,\n unit: Unit.PICKS_PER_MILLIMETER\n },\n to: Unit[`${defaultUnit}`]\n });\n\n return `${round(practicalPickDensity)}${Unit[`${defaultUnit}`]}`;\n }\n\n public onResizerMouseDown(event: MouseEvent, direction: ResizeDirection): void {\n if (event.button === 0) {\n this.isResizing = true;\n\n this.zone.runOutsideAngular(() => {\n this.cancelMouseMoveListener = this.renderer.listen(this.window, 'mousemove', (mouseMoveEvent: MouseEvent) => this.onResizerMouseMove(mouseMoveEvent, direction));\n\n this.cancelMouseUpListener = this.renderer.listen(this.window, 'mouseup', () => {\n this.cancelListeners();\n });\n });\n }\n }\n\n public onEditProductionSchedulePathsInColoredYarnSetToggle(event: MatSlideToggleChange): void {\n this.productionSchedulePlan.updateEditingPaths(event.checked);\n }\n\n public getInitialPathLayoutWidthInPx(): string {\n return this.canShowPathContent() ? `${this.initialPathLayoutWidthInPx}px` : '100%';\n }\n\n public canShowPathContent(): boolean {\n return this.pathContentSettingsDialogData.pathContentPanelEnabled;\n }\n\n public onPathContentSettingsDialogDataChanged(): void {\n this.executeResizePathBarComponent();\n setTimeout(() => {\n this.pathLayoutComponent?.setMaxWidthForDataElements();\n });\n }\n\n public onHoverPathBarOutput(): void {\n this.cancelListeners();\n }\n\n public hasPermissionToNewVerifyStep(): boolean {\n return this.currentSubscription?.hasPermission(Permission.TEXFAB_VERIFY_NEW);\n }\n\n private cancelListeners(): void {\n this.isResizing = false;\n this.updateProductionScheduleBuilderPageState();\n this.executeResizePathBarComponent();\n\n if (this.cancelMouseMoveListener) {\n this.cancelMouseMoveListener();\n this.cancelMouseMoveListener = null;\n }\n\n if (this.cancelMouseUpListener) {\n this.cancelMouseUpListener();\n this.cancelMouseUpListener = null;\n }\n }\n\n private executeResizePathBarComponent(): void {\n setTimeout(() => {\n this.pathLayoutComponent?.pathBars.forEach((pathBar: PathBarComponent) => {\n pathBar.resizePathBarComponent();\n });\n });\n }\n\n private updatePathLabelHeight(pathLabelHeightInPx: number): void {\n this.renderer.setStyle(this.pathLayout.nativeElement, 'height', `${pathLabelHeightInPx}px`);\n }\n\n private updatePathLayoutWidth(pathLayoutWidthInPx: number): void {\n this.renderer.setStyle(this.pathLayout.nativeElement, 'width', `${pathLayoutWidthInPx}px`);\n }\n\n private onResizerMouseMove(mouseMoveEvent: MouseEvent, direction: ResizeDirection): void {\n if (this.isResizing) {\n if (direction === ResizeDirection.VERTICAL) {\n this.updatePathLabelHeight(mouseMoveEvent.y - this.pathLayout.nativeElement.getBoundingClientRect().top);\n } else if (direction === ResizeDirection.HORIZONTAL) {\n this.updatePathLayoutWidth(mouseMoveEvent.x - this.drawingLibrary.nativeElement.getBoundingClientRect().left);\n }\n }\n }\n\n private getZoomLevel(): number {\n return round(this.zoomLevel * this.zoomFactor, 2);\n }\n\n private subscribeToZoomInChanges(): void {\n this.zoomInClickSubject.pipe(debounceTime(250), takeUntil(this.unSubscribeOnViewDestroy)).subscribe(() => {\n this.zoomLevel = round(this.zoomLevel + this.getZoomLevel(), 2);\n });\n }\n\n private subscribeToZoomOutChanges(): void {\n this.zoomOutClickSubject.pipe(debounceTime(250), takeUntil(this.unSubscribeOnViewDestroy)).subscribe(() => {\n this.zoomLevel = round(this.zoomLevel - this.getZoomLevel(), 2);\n });\n }\n\n private initialiseProductionSchedulePlan(): void {\n this.canShowSelectedItems = this.productionSchedule.hasAddedDesigns() || this.productionSchedule.hasOrderLines();\n\n this.productionSchedulePlan.initialiseProductionSchedule(this.productionSchedule).subscribe({\n next: () => {\n this.calculateProductionScheduleHeight();\n },\n error: this.handleBackendError()\n });\n\n this.setBuggyLength();\n this.hasProductionScheduleLoaded = true;\n\n this.productionSchedulePlan.currentUpdatedProductionSchedule.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe((productionSchedule: ProductionSchedule) => {\n if (!AssertionUtils.isNullOrUndefined(productionSchedule)) {\n this.productionSchedule = productionSchedule;\n this.calculateProductionScheduleHeight();\n }\n });\n\n this.productionSchedulePlan.didPatchProductionSchedulePlan.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe(() => this.calculateProductionScheduleHeight());\n }\n\n private getQualitySettings(): void {\n this.machineQualities\n .getListOfCustomSettings()\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((customSettings: PropertyValue[]) => {\n customSettings.forEach((setting: PropertyValue) => {\n if (setting.propertyName === 'missingDesignMarginInDents') {\n this.marginInDentsOfMissingDesigns = setting.propertyValue;\n }\n });\n });\n }\n\n private calculateProductionScheduleHeight(): void {\n this.productionScheduleHeight = convertCommercialUnit({\n from: {\n unit: Unit.MILLIMETER,\n value: this.productionSchedule.getProductionScheduleLengthInMillimeters()\n },\n to: this.commercialUnit\n });\n }\n\n private modifyProductionScheduleAfterVerify(productionSchedule: ProductionSchedule): void {\n assign(this.productionSchedule, ProductionSchedule.modifyProductionScheduleAfterVerify(this.productionSchedule, productionSchedule));\n this.productionSchedule.buggy = productionSchedule.buggy;\n this.productionSchedule.machine.roleCode = productionSchedule.machine.roleCode;\n this.productionSchedulePlan.initialiseProductionSchedule(this.productionSchedule).subscribe(() => {\n if (!AssertionUtils.isNullOrUndefined(this.productionSchedule?.buggy)) {\n this.setAvailableSpaceInBuggy();\n }\n });\n }\n\n private setBuggyLength(): void {\n const {buggyLengthMin: buggyLengthMinInMM, buggyLengthMax: buggyLengthMaxInMM} = this.productionSchedule.machineQuality;\n\n if (!AssertionUtils.isNullOrUndefined(buggyLengthMinInMM)) {\n this.buggyLengthMinInPicks = convertHeightInMeterToPicks(\n convertCommercialUnit({from: {unit: Unit.MILLIMETER, value: buggyLengthMinInMM}, to: Unit.METER}),\n this.productionSchedule?.machineQuality?.pickDensity * 1000,\n this.productionSchedule?.machineQuality?.weaveStructure\n );\n this.buggyLengthMaxInMM = buggyLengthMaxInMM;\n }\n\n if (!AssertionUtils.isNullOrUndefined(buggyLengthMaxInMM)) {\n this.buggyLengthMaxInPicks = convertHeightInMeterToPicks(\n convertCommercialUnit({from: {unit: Unit.MILLIMETER, value: buggyLengthMaxInMM}, to: Unit.METER}),\n this.productionSchedule?.machineQuality?.pickDensity * 1000,\n this.productionSchedule?.machineQuality?.weaveStructure\n );\n } else {\n this.buggyLengthMaxInPicks = convertHeightInMeterToPicks(\n convertCommercialUnit({from: {unit: Unit.MILLIMETER, value: 50000}, to: Unit.METER}),\n this.productionSchedule?.machineQuality?.pickDensity * 1000,\n this.productionSchedule?.machineQuality?.weaveStructure\n );\n this.buggyLengthMaxInMM = convertCommercialUnit({\n from: {unit: Unit.METER, value: convertPicksToHeightInMeter(this.buggyLengthMaxInPicks, this.productionSchedule?.machineQuality?.pickDensity * 1000)},\n to: Unit.MILLIMETER\n });\n }\n\n if (!AssertionUtils.isNullOrUndefined(this.productionSchedule?.buggy)) {\n this.setAvailableSpaceInBuggy();\n }\n }\n\n private handleBackendError(): (error: any) => void {\n return ErrorHandlers.navigateToOverviewAndThrowError(this.router, ProductionSchedulePlanNewComponent.urlToProductionScheduleOverview);\n }\n\n private subscribeToNavigationStateChanges(): void {\n this.sideNavigationStateService.onNavigationStateChanged.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe(() => {\n setTimeout(() => {\n this.updateProductionScheduleBuilderPageState();\n });\n });\n }\n\n private getProductionScheduleBuilderPageState(): void {\n this.productionScheduleBuilderPageStateManager\n .getForNewBuilder()\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((productionScheduleBuilderState: ProductionScheduleNewBuilderPageState) => {\n this.productionScheduleBuilderState = productionScheduleBuilderState;\n if (AssertionUtils.isNullOrUndefined(productionScheduleBuilderState)) {\n this.updateProductionScheduleBuilderPageState();\n } else {\n this.initialPathLayoutHeightInPx = productionScheduleBuilderState.pathLayoutHeightInPx;\n this.initialPathLayoutWidthInPx = productionScheduleBuilderState.pathLayoutWidthInPx;\n }\n });\n }\n\n private updateProductionScheduleBuilderPageState(): void {\n this.productionScheduleBuilderPageStateManager\n .updateforNewBuilder({\n pathLayoutHeightInPx: this.pathLayout?.nativeElement.clientHeight ?? this.initialPathLayoutHeightInPx,\n pathLayoutWidthInPx: this.pathLayout?.nativeElement.clientWidth ?? this.initialPathLayoutWidthInPx\n } as ProductionScheduleNewBuilderPageState)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe();\n }\n\n private setAvailableSpaceInBuggy(): void {\n this.availableSpaceInBuggyInCommercialUnit = Math.floor(\n convertCommercialUnit({from: {unit: Unit.MILLIMETER, value: this.buggyLengthMaxInMM}, to: Unit.CENTIMETER}) -\n convertCommercialUnit({from: {unit: Unit.METER, value: this.productionSchedule.buggy?.amountPlannedInMeter ?? 0}, to: Unit.CENTIMETER})\n );\n this.availableSpaceInBuggyInPicks = this.buggyLengthMaxInPicks - (this.productionSchedule.buggy?.amountPlannedInPicks ?? 0);\n\n this.availableSpaceInBuggyForBuilderInPicks = this.availableSpaceInBuggyInPicks + this.pathLabelsOrNonProductionItemsFromLongestPathLengthInPicks;\n this.availableSpaceInBuggyForBuilderInCommercialUnit = this.availableSpaceInBuggyInCommercialUnit + this.pathLabelsOrNonProductionItemsFromLongestPathLengthInCommercialUnit;\n }\n\n private setWarningTextVisibility(): void {\n if (AssertionUtils.isNullOrUndefined(this.errorsAndWarningsContainer)) {\n return;\n }\n\n this.maxWarningWidth = this.errorsAndWarningsContainer.nativeElement.offsetWidth > this.maxWarningWidth ? this.errorsAndWarningsContainer.nativeElement.offsetWidth : this.maxWarningWidth;\n\n const warningMargin = parseInt(this.errorsAndWarningsContainer.nativeElement.style.marginRight, 10);\n const zoomInWidth = (this.zoomInContainer?.nativeElement.offsetWidth ?? 0) + (this.zoomInContainer ? parseInt(this.zoomInContainer.nativeElement.style.marginRight, 10) || 0 : 0);\n const zoomOutWidth = (this.zoomOutContainer?.nativeElement.offsetWidth ?? 0) + (this.zoomOutContainer ? parseInt(this.zoomOutContainer.nativeElement.style.marginRight, 10) || 0 : 0);\n const editPathsWidth =\n (this.editPathsToggleContainer?.nativeElement.offsetWidth ?? 0) + (this.editPathsToggleContainer ? parseInt(this.editPathsToggleContainer.nativeElement.style.marginRight, 10) || 0 : 0);\n\n const staticWidth = warningMargin + editPathsWidth + zoomInWidth + zoomOutWidth + (this.viewSelectorContainer?.nativeElement.offsetWidth ?? 0);\n\n this.canShowWarningWithText = this.buttonsContainer.nativeElement.offsetWidth > staticWidth + this.maxWarningWidth;\n }\n\n private setInitialPathLayoutDimentions(): void {\n const productionSchedulePlanWrapper = this.productionSchedulePlanWrapper.nativeElement;\n\n if (AssertionUtils.isNullOrUndefined(this.productionScheduleBuilderState) || !this.productionScheduleBuilderState.hasOwnProperty('pathLayoutHeightInPx')) {\n this.initialPathLayoutHeightInPx = this.INITIAL_PATH_LAYOUT_HEIGHT_IN_PX;\n }\n\n if (AssertionUtils.isNullOrUndefined(this.productionScheduleBuilderState) || !this.productionScheduleBuilderState.hasOwnProperty('pathLayoutWidthInPx')) {\n this.initialPathLayoutWidthInPx = productionSchedulePlanWrapper.clientWidth * 0.5 - this.resizerPx * 0.5;\n }\n\n this.initialPathLayoutMaxHeightInPx = productionSchedulePlanWrapper.clientHeight - (this.MIN_DRAWING_LIBRARY_HEIGHT_IN_PX + this.resizerPx);\n this.minPathContentWidthInPx = productionSchedulePlanWrapper.clientWidth * 0.4;\n this.minPathLayoutWidthInPx = productionSchedulePlanWrapper.clientWidth * 0.4;\n }\n}\n","import {Inject, Injectable} from '@angular/core';\nimport {PlaceholderCategory} from '@domain/textile-data/finishing-and-finishing-template/placeholder-category';\nimport {HttpBuggyService} from '@infrastructure/http/buggy/http-buggy.service';\nimport {PRODUCTION_ORDERS, ProductionOrders} from '@infrastructure/http/production-order/production-orders';\nimport {Observable} from 'rxjs';\n\n@Injectable()\nexport class ProductionOrdersPlaceholderService {\n public constructor(\n @Inject(PRODUCTION_ORDERS) private readonly productionOrders: ProductionOrders,\n private readonly buggies: HttpBuggyService\n ) {}\n\n public getPlaceholderCategories(isNameGeneration: boolean, isBuggySelection: boolean): Observable[] {\n const requests: Observable[] = [];\n requests.push(this.productionOrders.getCategoriesWithComponentsForProductionOrderLabel());\n\n if (isNameGeneration) {\n requests.push(this.productionOrders.getCategoriesWithComponentsForProductionOrderName());\n }\n if (isBuggySelection) {\n requests.push(this.buggies.getCategoriesWithComponentsForBuggyName());\n }\n\n return requests;\n }\n}\n","
\n \n \n\n \n \n
\n
\n

{{ 'TEXTILE_DATA.COLORED_YARN_SET.COLORED_YARN_SET' | bmsTranslate: {count: 2} }}

\n
\n {{ 'TEXTILE_DATA.COLOR.COLOR' | bmsTranslate: {count: 2} }}\n \n {{ 'TEXTILE_DATA.YARN_TYPE.YARN_TYPE' | bmsTranslate: {count: 2} }}\n
\n
\n
\n \n

{{ coloredYarnSetWithStartDent.coloredYarnSet.name }}

\n \n
\n \n
\n
\n
\n
\n","import {Component, EventEmitter, Input, OnChanges, Output, SimpleChanges} from '@angular/core';\nimport {MatSlideToggleChange} from '@angular/material/slide-toggle';\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 {PreviewType} from '@presentation/pages/textile-data/creel/add/preview-type';\nimport {AssertionUtils, TranslateService} from '@vdw/angular-component-library';\nimport {cloneDeep, isEqual} from 'lodash-es';\n\n@Component({\n selector: 'app-creel-mapping',\n templateUrl: './creel-mapping.component.html',\n styleUrls: ['./creel-mapping.component.scss']\n})\nexport class CreelMappingComponent implements OnChanges {\n @Input() public coloredYarnSetsWithStartDent: OverviewListColoredYarnSetWithStartDent[];\n @Input() public creelMap: CreelMap[];\n @Input() public readOnly: boolean;\n @Output() public cancel: EventEmitter = new EventEmitter();\n @Output() public save: EventEmitter = new EventEmitter();\n public creelPreviewType: PreviewType = PreviewType.COLOR;\n\n private newCreelMap: CreelMap[];\n\n public constructor(private readonly translate: TranslateService) {}\n\n public ngOnChanges(changes: SimpleChanges): void {\n if ('creelMap' in changes && changes.creelMap.isFirstChange()) {\n this.newCreelMap = cloneDeep(this.creelMap);\n }\n }\n\n public isCurrentViewModeYarnType(): boolean {\n return isEqual(this.creelPreviewType, PreviewType.YARN_TYPE);\n }\n\n public onCreelTypeViewModeChange(matSlideToggleChange: MatSlideToggleChange): void {\n this.creelPreviewType = matSlideToggleChange.checked ? PreviewType.YARN_TYPE : PreviewType.COLOR;\n }\n\n public cancelAction(): void {\n this.cancel.emit();\n }\n\n public getColoredYarnSetCreelMap(coloredYarnSetId: number): CreelMap {\n const matchingCreelMap = this.newCreelMap.find((creelMap: CreelMap) => {\n return creelMap.coloredYarnSetId === coloredYarnSetId;\n });\n return !AssertionUtils.isNullOrUndefined(matchingCreelMap) ? cloneDeep(matchingCreelMap) : null;\n }\n\n public updateAction(event: CreelMap, sourceIndex: number): void {\n this.newCreelMap[sourceIndex] = event;\n }\n\n public saveAction(): void {\n this.save.emit(this.newCreelMap);\n }\n\n public getTabAction(): string {\n if (this.readOnly) {\n return this.translate.instant('MACHINE.DETAILS.CREEL_MAPPING.TITLE');\n }\n return this.translate.instant('GENERAL.ACTIONS.EDIT_OBJECT', {\n object: this.translate.instant('MACHINE.DETAILS.CREEL_MAPPING.TITLE').toLowerCase()\n });\n }\n}\n","import {NgModule} from '@angular/core';\nimport {MatDividerModule} from '@angular/material/divider';\nimport {MatIconModule} from '@angular/material/icon';\nimport {AddFreeZonePattern} from '@application/command/add-free-zone-pattern';\nimport {AddJutePattern} from '@application/command/add-jute-pattern';\nimport {AddRestZonePattern} from '@application/command/add-rest-zone-pattern';\nimport {PrintDocument} from '@application/command/print-document';\nimport {OrderLinesGridService} from '@application/helper/orderbook/order-lines-grid.service';\nimport {CadCamService} from '@infrastructure/cad-cam/cad-cam.service';\nimport {ARTICLES} from '@infrastructure/http/article/articles';\nimport {HttpArticlesService} from '@infrastructure/http/article/http-articles.service';\nimport {HttpBuggyService} from '@infrastructure/http/buggy/http-buggy.service';\nimport {COLOR_SETS} from '@infrastructure/http/color-set/color-sets';\nimport {HttpColorSetsService} from '@infrastructure/http/color-set/http-color-sets.service';\nimport {COLORS} from '@infrastructure/http/color/colors';\nimport {HttpColorsService} from '@infrastructure/http/color/http-colors.service';\nimport {COLORED_YARN_SETS} from '@infrastructure/http/colored-yarn-set/colored-yarn-sets';\nimport {HttpColoredYarnSetsService} from '@infrastructure/http/colored-yarn-set/http-colored-yarn-sets.service';\nimport {CREELS} from '@infrastructure/http/creel/creels';\nimport {HttpCreelsService} from '@infrastructure/http/creel/http-creels.service';\nimport {FINISHINGS} from '@infrastructure/http/finishing/finishings';\nimport {HttpFinishingsService} from '@infrastructure/http/finishing/http-finishings.service';\nimport {HttpMachineQualitiesService} from '@infrastructure/http/machine-quality/http-machine-qualities.service';\nimport {MACHINE_QUALITIES} from '@infrastructure/http/machine-quality/machine-qualities';\nimport {HttpOrderbookService} from '@infrastructure/http/orderbook/http-orderbook.service';\nimport {ORDERBOOK} from '@infrastructure/http/orderbook/orderbook';\nimport {GetPatternVisualisationByPatternId} from '@infrastructure/http/patterns/get-pattern-visualisation-by-pattern-id';\nimport {HttpPatternsService} from '@infrastructure/http/patterns/http-patterns.service';\nimport {PATTERNS} from '@infrastructure/http/patterns/patterns';\nimport {HttpPlanningService} from '@infrastructure/http/planning/http-planning.service';\nimport {PLANNING} from '@infrastructure/http/planning/planning';\nimport {HttpProductConfigurationsService} from '@infrastructure/http/product-configuration/http-product-configuration.service';\nimport {PRODUCT_CONFIGURATIONS} from '@infrastructure/http/product-configuration/product-configuration.interface';\nimport {HttpProductionOrdersService} from '@infrastructure/http/production-order/http-production-orders.service';\nimport {PRODUCTION_ORDERS} from '@infrastructure/http/production-order/production-orders';\nimport {HttpProductionSchedulesService} from '@infrastructure/http/production-schedule/http-production-schedules.service';\nimport {PRODUCTION_SCHEDULES} from '@infrastructure/http/production-schedule/production-schedules';\nimport {ProductionScheduleBuilderPageStateManagerService} from '@infrastructure/page-state-manager/production-schedule-builder/production-schedule-builder-page-state-manager.service';\nimport {REALTIME_PRODUCTION_ORDER} from '@infrastructure/signalr/production-order/realtime-production-order';\nimport {SignalrProductionOrderService} from '@infrastructure/signalr/production-order/signalr-production-order.service';\nimport {ColumnFilterComponent} from '@presentation/components/column-filter/column-filter.component';\nimport {PathLayoutTemplateService} from '@presentation/components/select-path-layout-template/path-layout-template.service';\nimport {DrawingLibraryHelper} from '@presentation/pages/texedit/drawing-library/drawing-library-new-listview/drawing-library-helper';\nimport {DrawingLibrarySharedModule} from '@presentation/pages/texedit/drawing-library/drawing-library-shared.module';\nimport {AddProductionSchedulePageComponent} from '@presentation/pages/texfab/production-schedule/add/add-production-schedule-page.component';\nimport {ADD_PRODUCTION_SCHEDULE, AddProductionScheduleService} from '@presentation/pages/texfab/production-schedule/add/add-production-schedule.service';\nimport {ProductionScheduleDrawingLibraryComponent} from '@presentation/pages/texfab/production-schedule/add/drawing-library/production-schedule-drawing-library.component';\nimport {DrawingsGroupedDetailCellRendererComponent} from '@presentation/pages/texfab/production-schedule/add/drawing-library/views/drawings-grouped-view/detail-cell-renderer/drawings-grouped-detail-cell-renderer.component';\nimport {ProductionScheduleInitialPreparationsAdditionalOptionsComponent} from '@presentation/pages/texfab/production-schedule/add/initial-preparations-new/additional-options/production-schedule-initial-preparations-additional-options.component';\nimport {ProductionSchedulePathLabelsComponent} from '@presentation/pages/texfab/production-schedule/add/initial-preparations-new/additional-options/production-schedule-path-labels/production-schedule-path-labels.component';\nimport {ProductionScheduleQualityLinkedSettingsComponent} from '@presentation/pages/texfab/production-schedule/add/initial-preparations-new/additional-options/production-schedule-quality-linked-settings/production-schedule-quality-linked-settings.component';\nimport {SelectMachineComponent} from '@presentation/pages/texfab/production-schedule/add/initial-preparations-new/select-machine/select-machine.component';\nimport {ProductionScheduleInitialPreparationsComponent} from '@presentation/pages/texfab/production-schedule/add/initial-preparations/production-schedule-initial-preparations.component';\nimport {ProductionScheduleZoneComponent} from '@presentation/pages/texfab/production-schedule/add/plan/builder/free-and-rest-zones/production-schedule-zone.component';\nimport {ProductionScheduleZonesComponent} from '@presentation/pages/texfab/production-schedule/add/plan/builder/free-and-rest-zones/production-schedule-zones.component';\nimport {ProductionScheduleBuilderComponent} from '@presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-builder.component';\nimport {ProductionScheduleColoredYarnSetComponent} from '@presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-colored-yarn-set.component';\nimport {ProductionScheduleItemInPathGroupComponent} from '@presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-path-of-colored-yarn-set/production-schedule-item-in-path-group-container/production-schedule-item-in-path-group/production-schedule-item-in-path-group.component';\nimport {ProductionScheduleItemInPathGroupNewComponent} from '@presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-path-of-colored-yarn-set/production-schedule-item-in-path-group-new/production-schedule-item-in-path-group-new.component';\nimport {ProductionSchedulePathOfColoredYarnSetNewComponent} from '@presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-path-of-colored-yarn-set/production-schedule-path-of-colored-yarn-set-new.component';\nimport {ProductionSchedulePathOfColoredYarnSetComponent} from '@presentation/pages/texfab/production-schedule/add/plan/builder/production-schedule-colored-yarn-set/production-schedule-path-of-colored-yarn-set/production-schedule-path-of-colored-yarn-set.component';\nimport {ProductionScheduleListviewComponent} from '@presentation/pages/texfab/production-schedule/add/plan/listview/production-schedule-listview.component';\nimport {AddJuteToPathComponent} from '@presentation/pages/texfab/production-schedule/add/plan/modals/add-jute-to-path/add-jute-to-path.component';\nimport {EditProductionScheduleItemInPathGroupComponent} from '@presentation/pages/texfab/production-schedule/add/plan/modals/edit-production-schedule-item-in-path-group/edit-production-schedule-item-in-path-group.component';\nimport {EditProductionSchedulePathOfColoredYarnSetComponent} from '@presentation/pages/texfab/production-schedule/add/plan/modals/edit-production-schedule-path-of-colored-yarn-set/edit-production-schedule-path-of-colored-yarn-set.component';\nimport {EditZoneComponent} from '@presentation/pages/texfab/production-schedule/add/plan/modals/edit-zone/edit-zone.component';\nimport {PRODUCTION_SCHEDULE_PLAN} from '@presentation/pages/texfab/production-schedule/add/plan/production-schedule-plan';\nimport {ProductionSchedulePlanComponent} from '@presentation/pages/texfab/production-schedule/add/plan/production-schedule-plan.component';\nimport {ProductionSchedulePlanService} from '@presentation/pages/texfab/production-schedule/add/plan/production-schedule-plan.service';\nimport {ProductionScheduleVerifyComponent} from '@presentation/pages/texfab/production-schedule/add/plan/verify/production-schedule-verify.component';\nimport {ProductionScheduleProgressComponent} from '@presentation/pages/texfab/production-schedule/add/progress/production-schedule-progress.component';\nimport {ProductionScheduleCustomSettingsComponent} from '@presentation/pages/texfab/production-schedule/custom-settings/production-schedule-custom-settings.component';\nimport {ShowReasonForFailureDialogCommand} from '@presentation/pages/texfab/production-schedule/overview/actions/show-reason-for-failure-dialog-command';\nimport {ProductionScheduleOverviewPageComponent} from '@presentation/pages/texfab/production-schedule/overview/production-schedule-overview-page.component';\nimport {ProductionScheduleOverviewStatusComponent} from '@presentation/pages/texfab/production-schedule/overview/status/production-schedule-overview-status.component';\nimport {productionScheduleDataRouting} from '@presentation/pages/texfab/production-schedule/production-schedule.routing';\nimport {FinishingListViewInformationComponent} from '@presentation/pages/textile-data/finishing/finishing-list-view-information/finishing-list-view-information.component';\nimport {TextileDataSharedModule} from '@presentation/pages/textile-data/textile-data-shared.module';\nimport {SharedModule} from '@shared/shared.module';\nimport {CanShowErrorForFormControlModule, InputChipModule, TagModule} from '@vdw/angular-component-library';\nimport {AgGridModule} from 'ag-grid-angular';\nimport {AddProductionScheduleNewPageComponent} from './add/add-production-schedule-new-page.component';\nimport {ProductionScheduleNewDrawingLibraryComponent} from './add/drawing-library/production-schedule-new-drawing-library.component';\nimport {RecolorService} from './add/drawing-library/recolor.service';\nimport {DrawingsGroupedViewComponent} from './add/drawing-library/views/drawings-grouped-view/drawings-grouped-view.component';\nimport {GroupedDrawingsSelectionService} from './add/drawing-library/views/drawings-grouped-view/grouped-drawings-selection.service';\nimport {GroupedDesignThumbnailsDetailComponent} from './add/drawing-library/views/grouped-design-thumbnails-view/grouped-design-thumbnails-detail/grouped-design-thumbnails-detail.component';\nimport {GroupedDesignThumbnailsViewComponent} from './add/drawing-library/views/grouped-design-thumbnails-view/grouped-design-thumbnails-view.component';\nimport {OrderLinesGroupedDetailCellRendererComponent} from './add/drawing-library/views/order-lines-grouped-view/detail-cell-renderer/order-lines-grouped-detail-cell-renderer.component';\nimport {GroupedOrderLinesSelectionService} from './add/drawing-library/views/order-lines-grouped-view/grouped-orderlines-selection.service';\nimport {OrderLinesGroupedViewComponent} from './add/drawing-library/views/order-lines-grouped-view/order-lines-grouped-view.component';\nimport {OrderLinesHelper} from './add/drawing-library/views/order-lines-helper';\nimport {OrderLinesNewViewComponent} from './add/drawing-library/views/order-lines-new-view/order-lines-new-view.component';\nimport {OrderLineStatusCellRendererComponent} from './add/drawing-library/views/order-lines-view/order-line-status-cell-renderer/order-line-status-cell-renderer.component';\nimport {OrderLinesViewComponent} from './add/drawing-library/views/order-lines-view/order-lines-view.component';\nimport {ProductionScheduleItemInPathGroupStatusCellRendererComponent} from './add/drawing-library/views/order-lines-view/production-schedule-item-in-path-group-status-cell-renderer/production-schedule-item-in-path-group-status-cell-renderer.component';\nimport {ProductionSchedulePartiallyCompletedStatusCellRendererComponent} from './add/drawing-library/views/order-lines-view/production-schedule-partially-completed-status-cell-renderer/production-schedule-partially-completed-status-cell-renderer.component';\nimport {ProductionScheduleJuteOptionsComponent} from './add/initial-preparations-new/additional-options/production-schedule-jute-options/production-schedule-jute-options.component';\nimport {ProductionScheduleInitialPreparationsNewComponent} from './add/initial-preparations-new/production-schedule-initial-preparations-new.component';\nimport {SelectProductConfigurationComponent} from './add/initial-preparations-new/select-product-configuration/select-product-configuration.component';\nimport {PathContentSettingsDialogComponent} from './add/menu-items-new/path-content-settings-dialog.component';\nimport {ProductionScheduleMenuItemsNewComponent} from './add/menu-items-new/production-schedule-menu-items-new.component';\nimport {ProductionScheduleMenuItemsComponent} from './add/menu-items/production-schedule-menu-items.component';\nimport {GetProductionSchedulePathsAndZonesForColoredYarnSetPipe} from './add/plan/builder/get-production-schedule-paths-and-zones-for-colored-yarn-set/get-production-schedule-paths-and-zones-for-colored-yarn-set.pipe';\nimport {PathContentComponent} from './add/plan/builder/path-content/path-content.component';\nimport {PathBarComponent} from './add/plan/builder/path-item/path-bar.component';\nimport {MaxLengthInfoTooltipComponent} from './add/plan/builder/path-layout/max-length-info-tooltip/max-length-info-tooltip.component';\nimport {PathLayoutComponent} from './add/plan/builder/path-layout/path-layout.component';\nimport {ProductionScheduleColoredYarnSetErrorPopupComponent} from './add/plan/builder/production-schedule-colored-yarn-set/production-schedule-colored-yarn-set-error-popup/production-schedule-colored-yarn-set-error-popup.component';\nimport {MaximumBuggyLengthWarningDialogComponent} from './add/plan/builder/production-schedule-colored-yarn-set/production-schedule-path-of-colored-yarn-set/maximum-buggy-length-warning-dialog/maximum-buggy-length-warning-dialog.component';\nimport {ProductionScheduleItemInPathGroupContainerNewComponent} from './add/plan/builder/production-schedule-colored-yarn-set/production-schedule-path-of-colored-yarn-set/production-schedule-item-in-path-group-container-new/production-schedule-item-in-path-group-container-new.component';\nimport {ProductionScheduleItemInPathGroupContainerComponent} from './add/plan/builder/production-schedule-colored-yarn-set/production-schedule-path-of-colored-yarn-set/production-schedule-item-in-path-group-container/production-schedule-item-in-path-group-container.component';\nimport {ProductionScheduleItemInPathGroupRepeatIndicatorComponent} from './add/plan/builder/production-schedule-colored-yarn-set/production-schedule-path-of-colored-yarn-set/production-schedule-item-in-path-group-container/production-schedule-item-in-path-group-repeat-indicator/production-schedule-item-in-path-group-repeat-indicator.component';\nimport {ProductionScheduleItemInPathGroupRepeatIndicatorNewComponent} from './add/plan/builder/production-schedule-colored-yarn-set/production-schedule-path-of-colored-yarn-set/production-schedule-item-in-path-group-repeat-indicator-new/production-schedule-item-in-path-group-repeat-indicator-new.component';\nimport {RepeatProductionScheduleItemPipe} from './add/plan/builder/production-schedule-colored-yarn-set/production-schedule-path-of-colored-yarn-set/repeat-production-schedule-item/repeat-production-schedule-item.pipe';\nimport {ColorListPreviewWithPositionComponent} from './add/plan/color-list-preview-with-position/color-list-preview-with-position.component';\nimport {ErrorsAndWarningsDialogComponent} from './add/plan/errors-and-warnings/errors-and-warnings-dialog/errors-and-warnings-dialog.component';\nimport {ErrorsAndWarningsComponent} from './add/plan/errors-and-warnings/errors-and-warnings.component';\nimport {PathItemInfoTooltipComponent} from './add/plan/modals/path-item-info-tooltip/path-item-info-tooltip.component';\nimport {CalculateCutbarsDimensionsForProductionScheduleItemPipe} from './add/plan/new-listview/calculate-cutbars-dimensions-for-production-schedule-item/calculate-cutbars-dimensions-for-production-schedule-item.pipe';\nimport {CalculateDimensionsOfProductionScheduleColoredYarnSetPipe} from './add/plan/new-listview/calculate-dimensions-of-production-schedule-colored-yarn-set/calculate-dimensions-of-production-schedule-colored-yarn-set.pipe';\nimport {CalculateDimensionsOfProductionScheduleItemPipe} from './add/plan/new-listview/calculate-dimensions-of-production-schedule-item/calculate-dimensions-of-production-schedule-item.pipe';\nimport {CalculateDimensionsOfProductionSchedulePathPipe} from './add/plan/new-listview/calculate-dimensions-of-production-schedule-path/calculate-dimensions-of-production-schedule-path.pipe';\nimport {CalculateRestLengthOfProductionSchedulePathPipe} from './add/plan/new-listview/calculate-rest-length-of-production-schedule-path/calculate-rest-length-of-production-schedule-path.pipe';\nimport {GetProductionScheduleColoredYarnSetPathsPipe} from './add/plan/new-listview/get-production-schedule-colored-yarn-set-paths/get-production-schedule-colored-yarn-set-paths.pipe';\nimport {GetProductionScheduleItemColorPipe} from './add/plan/new-listview/get-production-schedule-item-color/get-production-schedule-item-color.pipe';\nimport {GetProductionScheduleItemTotalWovenHeightPipe} from './add/plan/new-listview/get-production-schedule-item-total-woven-height/get-production-schedule-item-total-woven-height.pipe';\nimport {GetUnpinnedColumnsPipe} from './add/plan/new-listview/get-unpinned-columns/get-unpinned-columns.pipe';\nimport {ProductionScheduleNewListviewComponent} from './add/plan/new-listview/production-schedule-new-listview.component';\nimport {ProductionSchedulePlanNewComponent} from './add/plan/production-schedule-plan-new.component';\nimport {ProductionScheduleProgressNewComponent} from './add/progress-new/production-schedule-progress-new.component';\nimport {FinishingDetailsComponent} from './finishing-details/finishing-details.component';\nimport {ListOverviewActionsComponent} from './overview/actions/list-overview-actions.component';\nimport {ProductionScheduleOverviewMachineComponent} from './overview/machine/production-schedule-overview-machine.component';\nimport {ProductionScheduleOverviewService} from './overview/production-schedule-overview.service';\nimport {ProductionScheduleSharedModule} from './production-schedule-shared.module';\nimport {ProductionOrdersPlaceholderService} from './shared/production-orders-placeholder.service';\n\n@NgModule({\n imports: [\n productionScheduleDataRouting,\n AgGridModule,\n SharedModule,\n TextileDataSharedModule,\n DrawingLibrarySharedModule,\n ProductionScheduleSharedModule,\n CanShowErrorForFormControlModule,\n TagModule,\n InputChipModule,\n MatDividerModule,\n MatIconModule\n ],\n providers: [\n {provide: PRODUCTION_SCHEDULES, useClass: HttpProductionSchedulesService},\n {provide: PRODUCTION_ORDERS, useClass: HttpProductionOrdersService},\n {provide: MACHINE_QUALITIES, useClass: HttpMachineQualitiesService},\n {provide: FINISHINGS, useClass: HttpFinishingsService},\n {provide: CREELS, useClass: HttpCreelsService},\n {provide: COLOR_SETS, useClass: HttpColorSetsService},\n {provide: COLORS, useClass: HttpColorsService},\n {provide: PRODUCTION_SCHEDULE_PLAN, useClass: ProductionSchedulePlanService},\n {provide: COLORED_YARN_SETS, useClass: HttpColoredYarnSetsService},\n {provide: ADD_PRODUCTION_SCHEDULE, useClass: AddProductionScheduleService},\n {provide: ORDERBOOK, useClass: HttpOrderbookService},\n {provide: ARTICLES, useClass: HttpArticlesService},\n {provide: PLANNING, useClass: HttpPlanningService},\n {\n provide: REALTIME_PRODUCTION_ORDER,\n useClass: SignalrProductionOrderService\n },\n {\n provide: PATTERNS,\n useClass: HttpPatternsService\n },\n {provide: PRODUCT_CONFIGURATIONS, useClass: HttpProductConfigurationsService},\n AddFreeZonePattern,\n AddRestZonePattern,\n AddJutePattern,\n PrintDocument,\n ShowReasonForFailureDialogCommand,\n CalculateDimensionsOfProductionScheduleItemPipe,\n CalculateDimensionsOfProductionSchedulePathPipe,\n CalculateDimensionsOfProductionScheduleColoredYarnSetPipe,\n CalculateRestLengthOfProductionSchedulePathPipe,\n GetUnpinnedColumnsPipe,\n CalculateCutbarsDimensionsForProductionScheduleItemPipe,\n GetProductionScheduleItemColorPipe,\n GetProductionScheduleColoredYarnSetPathsPipe,\n RepeatProductionScheduleItemPipe,\n GetProductionScheduleItemTotalWovenHeightPipe,\n ProductionOrdersPlaceholderService,\n ProductionScheduleBuilderPageStateManagerService,\n GetProductionSchedulePathsAndZonesForColoredYarnSetPipe,\n GetPatternVisualisationByPatternId,\n OrderLinesGridService,\n CadCamService,\n OrderLinesHelper,\n DrawingLibraryHelper,\n GroupedOrderLinesSelectionService,\n RecolorService,\n PathLayoutTemplateService,\n GroupedDrawingsSelectionService,\n ProductionScheduleOverviewService,\n HttpBuggyService\n ],\n declarations: [\n ProductionScheduleOverviewPageComponent,\n AddProductionSchedulePageComponent,\n AddProductionScheduleNewPageComponent,\n ProductionSchedulePlanComponent,\n ProductionSchedulePlanNewComponent,\n PathContentComponent,\n PathLayoutComponent,\n PathBarComponent,\n EditProductionScheduleItemInPathGroupComponent,\n AddJuteToPathComponent,\n PathItemInfoTooltipComponent,\n MaxLengthInfoTooltipComponent,\n ProductionScheduleListviewComponent,\n ProductionScheduleNewListviewComponent,\n ProductionScheduleOverviewStatusComponent,\n ProductionScheduleBuilderComponent,\n ProductionScheduleVerifyComponent,\n ProductionScheduleInitialPreparationsComponent,\n ProductionScheduleInitialPreparationsNewComponent,\n SelectMachineComponent,\n ProductionScheduleInitialPreparationsAdditionalOptionsComponent,\n ProductionScheduleCustomSettingsComponent,\n ProductionScheduleDrawingLibraryComponent,\n ProductionScheduleNewDrawingLibraryComponent,\n OrderLinesViewComponent,\n GroupedDesignThumbnailsViewComponent,\n OrderLinesNewViewComponent,\n OrderLinesGroupedViewComponent,\n ProductionScheduleZoneComponent,\n ProductionScheduleZonesComponent,\n EditZoneComponent,\n ProductionScheduleColoredYarnSetComponent,\n ProductionSchedulePathOfColoredYarnSetComponent,\n ProductionSchedulePathOfColoredYarnSetNewComponent,\n ProductionScheduleItemInPathGroupComponent,\n ProductionScheduleItemInPathGroupNewComponent,\n ProductionScheduleItemInPathGroupContainerComponent,\n ProductionScheduleItemInPathGroupContainerNewComponent,\n ProductionScheduleItemInPathGroupRepeatIndicatorComponent,\n ProductionScheduleItemInPathGroupRepeatIndicatorNewComponent,\n EditProductionSchedulePathOfColoredYarnSetComponent,\n ProductionScheduleProgressComponent,\n ProductionScheduleProgressNewComponent,\n ListOverviewActionsComponent,\n FinishingDetailsComponent,\n ProductionScheduleColoredYarnSetErrorPopupComponent,\n ProductionScheduleJuteOptionsComponent,\n MaximumBuggyLengthWarningDialogComponent,\n ProductionSchedulePathLabelsComponent,\n ProductionScheduleQualityLinkedSettingsComponent,\n ProductionScheduleOverviewMachineComponent,\n ErrorsAndWarningsComponent,\n ErrorsAndWarningsDialogComponent,\n CalculateDimensionsOfProductionScheduleItemPipe,\n CalculateDimensionsOfProductionSchedulePathPipe,\n CalculateDimensionsOfProductionScheduleColoredYarnSetPipe,\n CalculateRestLengthOfProductionSchedulePathPipe,\n GetUnpinnedColumnsPipe,\n CalculateCutbarsDimensionsForProductionScheduleItemPipe,\n GetProductionScheduleItemColorPipe,\n GetProductionScheduleColoredYarnSetPathsPipe,\n RepeatProductionScheduleItemPipe,\n GetProductionScheduleItemTotalWovenHeightPipe,\n ColorListPreviewWithPositionComponent,\n ColumnFilterComponent,\n ProductionScheduleItemInPathGroupStatusCellRendererComponent,\n OrderLineStatusCellRendererComponent,\n ProductionSchedulePartiallyCompletedStatusCellRendererComponent,\n SelectProductConfigurationComponent,\n GetProductionSchedulePathsAndZonesForColoredYarnSetPipe,\n ProductionScheduleMenuItemsComponent,\n ProductionScheduleMenuItemsNewComponent,\n PathContentSettingsDialogComponent,\n OrderLinesGroupedDetailCellRendererComponent,\n DrawingsGroupedViewComponent,\n DrawingsGroupedDetailCellRendererComponent,\n FinishingListViewInformationComponent,\n GroupedDesignThumbnailsDetailComponent\n ]\n})\nexport class ProductionScheduleModule {}\n","import {Directive, HostBinding} from '@angular/core';\n\n@Directive({\n selector: '[vdwRadioToggleButton]'\n})\nexport class RadioToggleButtonDirective {\n @HostBinding('class.radio-toggle-buttons') public radioToggleButtons = true;\n}\n"],"x_google_ignoreList":[9,10,11,24,25,26,41,47,48,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,108,113,114,115,116,117,118,161]}