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C,EAfA,SAASroB,IACP,IAAIpW,EAAS0+B,UAAU1+B,OACvB,IAAKA,EACH,MAAO,GAMT,QAJI2+B,EAAOC,MAAM5+B,EAAS,GACtB6+B,EAAQH,UAAU,GAClBn/B,EAAQS,EAELT,KACLo/B,EAAKp/B,EAAQ,GAAKm/B,UAAUn/B,GAE9B,SAAOu/B,QAAUC,KAAQF,IAAK,EAAIG,KAAUH,GAAS,CAACA,IAAK,EAAGI,KAAYN,EAAM,GAClF,qCCbA,MAAAF,GAJIzlC,WAAYkmC,GAAiB,SAASxkB,EAAQykB,EAAM5/B,GACtD,OAAOmb,GAAUnb,EAAQ,IAAM,IAAM4/B,EAAK5+B,aAC5C,2ECWA,MAAAk+B,EAhBA,SAAStoB,EAAM0oB,EAAOO,EAAOC,GAC3B,IAAIr/B,EAAkB,MAAT6+B,EAAgB,EAAIA,EAAM7+B,OACvC,OAAKA,GAGDq/B,GAAqB,iBAAPA,IAAO,EAAYC,KAAeT,EAAOO,EAAOC,IAChED,EAAQ,EACRC,EAAMr/B,IAGNo/B,EAAiB,MAATA,EAAgB,KAAIG,KAAUH,GACtCC,OAAcrc,IAARqc,EAAoBr/B,KAASu/B,KAAUF,KAAG,EAE3CG,KAAUX,EAAOO,EAAOC,IAVtB,EAWX","names":["componentEnterLeaveAnimation","trigger","transition","query","style","left","animate","optional","SignalrPlanningService","_SignalrPlanningService","constructor","authentication","backendConfiguration","signalrHubConnectionFactoryService","this","getPlanningChanges","getSignalrHubEvents","getPlanningHubEndPoint","pipe","map","planningChangesJSON","JSON","parse","updateForPlanning","CalendarItemGroup","fromJSON","getCurrentSubscription","getDeletedPlanningItem","i0","AUTHENTICATION","i1","i2","factory","ɵfac","ctx_r0","planningOrder","efficiency","PlanningSmallOrderCardInfoComponent_ng_container_11_div_1_Template","PlanningSmallOrderCardInfoComponent_ng_container_11_div_2_Template","differentConfiguration","isProductionOrderDueDateBeforeEndDate","PlanningSmallOrderCardInfoComponent","_PlanningSmallOrderCardInfoComponent","data","title","iconNameForProductionStatus","MAT_DIALOG_DATA","selectors","decls","vars","consts","template","rf","ctx","PlanningSmallOrderCardInfoComponent_ng_container_5_Template","PlanningSmallOrderCardInfoComponent_ng_container_11_Template","productionOrder","name","completed","status","PlanningOrderCardComponent_ng_container_1_ng_container_6_mat_icon_1_Template","PlanningOrderCardComponent_ng_container_1_ng_container_6_mat_icon_2_Template","compatibleWithMachine","PlanningOrderCardComponent_ng_container_1_ng_container_6_Template","getIconNameForProductionOrderStatus","PlanningOrderCardComponent","_PlanningOrderCardComponent","BaseComponent","element","dialogBuilderFactoryService","super","shouldShowSmallInfo","SMALL_ORDER_THRESHOLD","dialogBuilder","ngOnInit","DOMUtils","observeResize","nativeElement","takeUntil","unSubscribeOnViewDestroy","subscribe","entries","contentRect","width","onMouseEnter","openDetailsTooltip","onMouseLeave","closeDetailsTooltip","ProductionScheduleStatus","getStatusIconName","getBuilder","withClass","withMaxWidth","withoutBackdrop","openDialog","RepositionTooltipComponent","forceArrowCentered","machineRunTitle","component","targetDOMRect","getBoundingClientRect","ngOnDestroy","_this$dialogBuilder","close","hostBindings","PlanningOrderCardComponent_ng_container_1_Template","PlanningOrderCardComponent_ng_template_2_Template","shouldShowRightBorder","smallEllipsis_r2","PlanningInactivitiyCardComponent","_PlanningInactivitiyCardComponent","getIconName","kebabCase","PlanningItemType","planningItem","type","inputs","isCompleted","ctx_r3","getShiftName","shift_r2","regime_r3","shiftStart","shiftEnd","PlanningDisplayContentComponent_vdw_shift_schedule_4_vdw_shift_1_Template","days","shifts","planningContext","isOnboardingRunning","canEditPlanningOrder","planningOrder_r11","getRunTitle","machineRun_r8","shouldOrderShowRightBorder","orderIndex_r12","PlanningDisplayContentComponent_vdw_planning_row_5_vdw_planning_group_1_1_ng_template_0_Template","$event","_r9","onPlanningOrderDragStart","dragDropChanges","planningOrderDragEnter","onPlanningOrderDragEnd","$implicit","planning","planningSideBars","openPlanningOrderDetails","id","getOrderClass","endDate","startDate","getNewRunText","_r7","onPlanningItemDragStart","planningItemDragEnd","planningRunDragEnter","machine_r6","openPlanningItemDetails","PlanningDisplayContentComponent_vdw_planning_row_5_vdw_planning_group_1_1_Template","isRunDemoItem","hasRunBeenCompleted","hasRunOrdersPastDueDate","canEditPlanningItem","planningOrders","trackByOrderId","planningItem_r14","isPlanningItemCompleted","PlanningDisplayContentComponent_vdw_planning_row_5_2_ng_template_0_Template","_r13","_r5","openMachineDetails","PlanningDisplayContentComponent_vdw_planning_row_5_vdw_planning_group_1_Template","PlanningDisplayContentComponent_vdw_planning_row_5_2_Template","getMachineIcon","getMachineColor","getMachineName","getRowBackgroundColor","getRunsForMachineId","trackByRunId","getPlanningItemsForMachineId","trackByPlanningItemId","PlanningDisplayContentComponent","_PlanningDisplayContentComponent","translate","planningOnboarding","navigationHelperService","dateTimePipe","regimes","isFirstChanges","UNKNOWN_OBJECT_KEY","emptyScrollPositionState","queryName","scrollTop","scrollLeft","scrollPositionState","getPartialState","Object","keys","isEqual","scrollContainer","document","querySelector","setTimeout","scrollTo","top","ngDoCheck","_this$planningGrid","planningGrid","bodyContainer","planningGridDisplay","bodyContainerOffset","scrollContainerQueryName","savePartialState","_","group","order","index","item","machine","_machine$group$id","_machine$group","AssertionUtils","isNullOrUndefined","fallbackMachineGroupId","MACHINE_GROUP_COLOURS_PALETTE","length","MachineType","getIconNameForMachineType","machineType","_machine$name","instant","object","toLowerCase","shift","regime","transform","DateTime","fromISO","toJSDate","DateTimeFormat","TIME_SIMPLE","machineId","_groupedItemsForMachi","groupedItemsForMachine","groupedCalendarItems","find","runsForMachine","items","filter","PlanningMachineRun","hasMachineMachineRunPlaceholder","selectedPlaceholder","_groupedItemsForMachi2","planningItemsForMachine","hasMachinePlanningItemPlaceholder","run","orderIndex","selectedDateRange","getCurrentDateForSubscriptionTimezone","_run$planningOrders","some","_run$planningOrders2","notCompletedOrder","isEmpty","DEMO_ITEM_ID","currentOnboardingStep","OnboardingPlanningStep","ADD_ITEM","ColorConstants","TINT_DARKBLUE_6","PRIMARY_COLOR_WHITE","orderClass","PlanningMachineCarpetRun","getCarpetRunTitle","PlanningMachineWeavingRun","getWeavingRunTitle","PlanningMachineTuftingRun","getTuftingRunTitle","toUpperCase","dragDropData","closeSidebar","onGridDisplaySelected","event","rowIndex","date","_this$planningContext","canEdit","placeholderEndDate","moment","add","toDate","itemGroup","_this$planningContext2","machinesForSelectedPlanningGroups","addPlaceholder","_run$tuftProduct$name","_run$tuftProduct","isNew","tuftProduct","_run$weaveProduct$nam","_run$weaveProduct","weaveProduct","_run$creel$name","_run$creel","_run$machineQuality$t","_run$machineQuality","machineQuality","creel","creelLabel","technicalName","i3","i4","i5","i6","viewQuery","PlanningGridComponent","PlanningDisplayComponent","_r1","PlanningDisplayContentComponent_vdw_shift_schedule_4_Template","PlanningDisplayContentComponent_vdw_planning_row_5_Template","_c0","RescheduleOverlappingItemsCommand","execute","commandArgs","groupedCalendarItem","rescheduleOverlappingPlanningItems","findOverlappingPlanningItems","lastRescheduledPlanningItem","orderBy","lastRescheduledRunDateRange","range","planningItemDateRange","overlaps","uniqueId","overlappingPlanningItems","forEach","overlappingPlanningItem","overlappingPlanningItemNewStartDate","overlappingPlanningItemNewEndDate","totalRunningTimeInMs","TimeUtils","MILLISECONDS_UNIT","reschedule","AddNewPlanningItemCommand","newPlanningItem","destinationGroupedCalendarItem","push","AddPlannedOrderToNewRunCommand","addNewPlanningItemCommand","removePlanningOrderCommand","RemovePlanningOrderCommand","plannedPlanningOrder","destinationMachine","sourceRun","sourceMachineId","newRun","sourceGroupedCalendarItem","adjustRunRunningTime","AddUnplannedOrderToNewRunCommand","unplannedPlanningOrder","ProductionOrderCarpetForPlanningOrder","ProductionOrderWeavingForPlanningOrder","ProductionOrderTuftingForPlanningOrder","AddUnplannedOrderToRunCommand","planningOrderPosition","splice","rescheduleBasedOnPlanningOrders","groupedCalendarItemIndex","findIndex","each","RemovePlanningItemsOutsideDateRangeCommand","dateRange","remove","RescheduleItemsCommand","sourceMachine","groupedCalendarItemsToBeUpdated","itemIndex","groupedCalendarItemToBeUpdated","ReschedulePlanningOrderCommand","draggedPlanningOrder","destinationRun","planningOrderNewPosition","isSourceRunDifferentFromDestinationRun","removedPlanningOrder","removePlanningOrder","addPlanningOrder","rescheduleRuns","getDestinationGroupedCalendarItemAndUpdateGroupedCalendarItems","planningOrderTotalRunTimeInMs","subtract","sourceRunIsDifferentFromDestinationRun","alreadyUpdatedSourceAndDestinationCalendarItem","isNil","ShowProductionOrderIncompatibleWithMachineAlertCommand","_ShowProductionOrderIncompatibleWithMachineAlertCommand","error","productionOrderName","machineName","translationParams","lowerCase","amountOfCompatibleMachines","size","errorContext","linkedEntityNames","compatibleMachinesList","join","openAlertDialog","titleText","entity","count","messageText","DialogType","INFORMATION","PlanningAction","GET_PLANNING","RESCHEDULE_ITEMS","RESCHEDULE_PLANNING_ORDER","ADD_NEW_PLANNING_ITEM","REMOVE_PLANNING_ORDER","ADD_UNPLANNED_PLANNING_ORDER_TO_RUN","ADD_UNPLANNED_PLANNING_ORDER_TO_NEW_RUN","ADD_PLANNED_PLANNING_ORDER_TO_NEW_RUN","PlanningSchedulerService","_PlanningSchedulerService","productionOrders","productionOrdersWeaving","showProductionOrderIncompatibleWithMachineAlertCommand","productionOrdersTufting","queuedPlanningActions","planningChangesSubject","BehaviorSubject","rescheduleItemsCommand","reschedulePlanningOrderCommand","removePlanningItemsOutsideDateRangeCommand","addUnplannedOrderToRunCommand","addUnplannedOrderToNewRunCommand","addPlannedOrderToNewRunCommand","generalErrorTranslationKey","updatePlanningErrorTranslationKey","isUpdating","initializePlanningActions","onPlanningChanges","getPlanning","onSuccess","noop","getPlanningSubscription","unsubscribe","action","isProcessing","parameters","onError","processFirstItemInQueuedPlanningActions","rescheduleItems","showAlertDialogForUpdatePlanningError","reschedulePlanningOrder","addNewPlanningItem","resetPlanning","next","cloneDeep","getCachedGroupedCalendarItem","setGroupedCalendarItems","addUnplannedPlanningOrderToRun","addUnplannedPlanningOrderToNewRun","addPlannedPlanningOrderToNewRun","firstItemInQueue","first","definedPlanningActions","get","cleanUpAndHandleNextItemInQueue","pull","getGroupedCalendarItemsToPatch","newGroupedCalendarItems","groupedCalendarItemsToPatch","calendarItemGroup","groupIndex","showAlertDialog","options","Map","getGroupedRunsForPeriod","originalParameters","executeCommand","removePlanningItemsOutsideDateRangeAndEmitPlanningChanges","checkRunCompatibilityWithMachine","executeCommandAndUpdateGroupedCalendarItems","checkProductionOrderCompatibilityWithMachine","command","updateGroupedCalendarItems","updateGroupedItems","finalize","_checkCompatibilityWi","checkCompatibilityWithMachineResult","isCarpetOrder","checkCompatibilityWithMachine","isWeavingOrder","isTuftingOrder","durationInMilliseconds","_error$errorContext","errorCode","BackendErrorCodeEnum","LINKED_ENTITIES","ERROR","runDurationInMilliseconds","updateDuration","getMachineNameForCompatibilityAlertDialog","updatedGroupedCalendarItems","PLANNING","PRODUCTION_ORDERS","PRODUCTION_ORDERS_WEAVING","ctx_r1","activeQuality","technicalNameWithVersion","activeCreel","activeWeaveProduct","activeTuftProduct","messages","_r3","onVirtualScrollerEndEvent","MachineDetailSidebarComponent_ng_container_2_div_14_vdw_message_container_3_Template","messagesGroups","scrollingBlock_r6","virtualScroller_r5","viewPortItems","createProductionOrderForMachine","closeMachineDetail","MachineDetailSidebarComponent_ng_container_2_ng_container_11_Template","MachineDetailSidebarComponent_ng_container_2_ng_container_12_Template","MachineDetailSidebarComponent_ng_container_2_ng_container_13_Template","MachineDetailSidebarComponent_ng_container_2_div_14_Template","MachineDetailSidebarComponent_ng_container_2_footer_15_Template","getMachineTypeLabelForTranslate","isMachineOfTypeCarpetLoom","isMachineOfTypeWeavingMachine","isMachineOfTypeTuftingMachine","hasMessages","canShowCreateProductionOrderForMachineButton","MachineDetailSidebarComponent","_MachineDetailSidebarComponent","router","machineDetailSidebarClose","EventEmitter","SLICE_LENGTH","hasMoreMessages","currentSubscription","ngOnChanges","getMachineDetails","getMessages","groupMessagesByChronologicalOrderAndType","onNavigationHelperDestroy","sidebarType","PlanningSidebarType","MACHINE","sidebarPlanningMachine","emit","isMachineDefined","CARPET_LOOM","CARPET_LOOM_NO_JQ","VELVET","VELVET_NO_JQ","includes","WEAVING_MACHINE","TUFT","endIndex","url","RouteUtils","paths","texFab","addProductionOrderForMachine","absolutePath","weaving","tufting","navigate","replace","toString","_this$currentSubscrip","permission","Permission","TEXFAB_WEAVE_QUEUE","TEXFAB_TUFT_QUEUE","hasPermission","startIndex","slice","concat","groupOfMessages","messageType","message","machineDetails","outputs","features","MachineDetailSidebarComponent_ng_container_2_Template","BasePlanningItemComponent","_BasePlanningItemComponent","value","_planningItem","planningItemSelected","previousPlanningItem","deletePlanningItem","closePlanningItem","selectPlanningOrder","PATH_TO_ADD_PRODUCTION_ORDER_FOR_RUN","addProductionOrderForRun","PATH_TO_ADD_PRODUCTION_ORDER_NEW_VIEW_FOR_RUN","addProductionOrderNewViewForRun","isPlanningItemOfTypeRun","isPlanningItemCarpetRun","isPlanningItemWeavingRun","isPlanningItemTuftingRun","delete","createProductionOrderForRun","hasPermissionToNavigateToNewBuilder","state","runId","machineQualityId","creelId","startRoute","weaveProductId","tuftProductId","onPlanningOrderSelected","TEXFAB_NEW_BUILDER","encapsulation","SelectProductionOrderComponent","_SelectProductionOrderComponent","selectedProductionOrders","dialogRef","gridOptionsBuilderFactoryService","colDefBuilderFactoryService","gridOptions","listOfGridOptions","setGridOptions","getOrdersThatRequireAttention","needsAttentionItems","listOfProductionOrders","getProductionOrdersWeavingThatNeedAttention","getProductionOrdersTuftingThatNeedAttention","getProductionOrdersCarpetThatNeedAttention","ngAfterViewInit","listOfGridApis","productionOrdersGrid","api","filterProductionOrders","filterText","setGridOption","canSelectProductionOrders","_this$productionOrder","getSelectedRows","selectProductionOrders","selectedOrders","forkJoin","getCheckCompatibilityWithMachineRequestForOrder","results","compatiblePlanningOrders","incompatibleProductionOrderNames","result","durationInMs","TO_RECONFIRM","PlanningOrder","Date","showAlertErrorForIncompatibleProductionOrders","productionOrderCarpet","needsToBePlanned","orderData","productionOrderWeaving","productionOrderTufting","getColumnDefs","GridIdentifier","SELECT_PRODUCTION_ORDER","withRowSelection","withNoRowsOverlay","scale","titleKey","hideDescription","withLoadingOverlay","build","withField","withHeaderName","withComparator","StringUtils","stringComparator","withoutFilter","withDate","failureResponse","observableOf","rxjsMap","catchError","addProductionOrders","onRowDragEnter","onRowDragLeave","onRowDragMove","onRowDragEnd","getRowId","ProductionOrdersListComponent","_ProductionOrdersListComponent","confirmProductionOrderDeletionCommand","deletePlanningOrder","addPlanningOrders","updatePlanningOrders","isDraggingProductionOrder","params","_params$data$producti","openSelectGridDialog","hasPlanningOrders","_this$planningOrders","forEachNode","rowNode","setHighlighted","overIndex","node","overNode","y","canBeRescheduled","isMouseOnBottomHalfOfRow","rowTop","rowHeight","RowHighlightPosition","Below","Above","updatedPlanningOrders","highlighted","isDraggingUp","onEscapeKeydown","stopPropagation","PRODUCTION_ORDERS_LIST","withSuppressRowClickSelection","withSuppressRowHoverHighlight","withLockPinnedColumns","withOnGridReady","onGridReadyEventForListOfProductionOrders","colDefs","withRowDrag","viewOnly","withOnCellClicked","withCellClass","withSuppressMovable","withLockVisible","withSortable","withTooltipValueGetter","withCellRenderer","ProductionScheduleOverviewStatusComponent","withoutHeaderName","ListOverviewActionsComponent","withValueGetter","actions","actionFn","confirmPlanningOrderDeletion","gridModelForListOfProductionOrders","sizeColumnsToFit","ProductionOrdersListComponent_div_6_Template","ProductionOrdersListComponent_article_8_Template","getMachineQualityLabel","getCreelLabel","getWeavePatternLabel","PlanningItemDetailsComponent_ng_container_10_ng_container_1_Template","PlanningItemDetailsComponent_ng_container_10_ng_container_2_Template","getPlanningOrders","_r4","PlanningItemDetailsComponent_footer_11_button_4_Template","canDeletePlanningItem","PlanningItemDetailsComponent","_PlanningItemDetailsComponent","unknownPlanningItemTranslationKey","getPlanningItemTypeLabel","canShowActions","executing","PlanningItemDetailsComponent_ng_container_10_Template","PlanningItemDetailsComponent_footer_11_Template","DelayedClassDirective","_DelayedClassDirective","elementRef","vdwDelayedClass","classList","ColoredYarnSetMapCardComponent","_ColoredYarnSetMapCardComponent","activeColoredYarnSetCreelMapChange","previewType","PreviewType","COLOR","onPreviewTypeChange","checked","YARN_TYPE","updateCreelMap","creelMap","coloredYarnSetWithStartDent","activeColoredYarnSetCreelMap","coloredYarnSet","overviewListColorSet","tmp_4_0","undefined","coloredYarnSetIndex_r2","ctx_r2","mappingForCurrentPositionOnMachine","coloredYarnSetWithStartDent_r4","EditCreelMappingComponent","_EditCreelMappingComponent","closeEditCreelMapping","saveCreelMapping","_creel","save","EditCreelMappingComponent_app_colored_yarn_set_map_card_7_Template","coloredYarnSetsWithStartDent","planningItemType_r4","PlanningItemFormComponent_div_0_div_5_ng_container_3_mat_radio_button_1_Template","canShowPlanningItemType","updatePlanningItem","PlanningItemFormComponent_div_0_div_5_ng_container_3_Template","planningItemTypes","selectCreel","PlanningItemFormComponent_div_0_div_26_ng_container_2_mat_error_8_Template","selectMachineQuality","PlanningItemFormComponent_div_0_div_26_ng_container_2_mat_error_16_Template","CREEL_BASE_ROUTER_LINK","QUALITY_BASE_ROUTER_LINK","QUALITY_CHIP_VALUE_KEY","_r6","selectWeaveProduct","PlanningItemFormComponent_div_0_div_26_ng_container_3_mat_error_8_Template","WEAVE_PRODUCT_BASE_ROUTER_LINK","selectTuftProduct","PlanningItemFormComponent_div_0_div_26_ng_container_4_mat_error_8_Template","TUFT_PRODUCT_BASE_ROUTER_LINK","_r8","planningItemForm","tmp_5_0","tmp_6_0","tmp_7_0","canQueueProductionOrder","_r10","editCreelMapping","onCreelMapViewModeChange","onCreelTypeViewModeChange","PlanningItemFormComponent_div_0_div_26_div_6_div_30_Template","_c1","isCurrentPreviewModeActiveCreel","isCurrentPreviewModeYarnType","creelPreviewType","creelPreviewMap","canChangeRunProperties","PlanningItemFormComponent_div_0_div_26_ng_container_2_Template","PlanningItemFormComponent_div_0_div_26_ng_container_3_Template","PlanningItemFormComponent_div_0_div_26_ng_container_4_Template","PlanningItemFormComponent_div_0_div_26_app_production_orders_list_5_Template","PlanningItemFormComponent_div_0_div_26_div_6_Template","canShowCarpetSpecificControls","canShowWeavingSpecificControls","canShowTuftingSpecificControls","canShowProductionOrdersList","isCreelSelected","_r12","PlanningItemFormComponent_div_0_footer_27_ng_container_1_Template","_r11","PlanningItemFormComponent_div_0_footer_27_ng_container_4_Template","PlanningItemFormComponent_div_0_footer_27_ng_template_5_Template","isAddingPlanningItem","invalid","editingPlanningItem_r13","PlanningItemFormComponent_div_0_div_5_Template","onStartDateChange","updateStartTimeWhenInThePast","onEndDateChange","updateEndTimeAndEndDate","PlanningItemFormComponent_div_0_div_26_Template","PlanningItemFormComponent_div_0_footer_27_Template","isLoadingCreel","getAction","getTitle","canChangePlanningItemType","getMinDateForStartDate","canShowRunSpecificFormControls","_r14","updateCreelMapping","tmp_1_0","PlanningItemFormComponent","_PlanningItemFormComponent","largeMode","creelsService","qualities","weaveProducts","tuftProducts","formBuilder","changeDetectorRef","texStyle","editCreel","editMachineQuality","editWeaveProduct","editTuftProduct","CARPET_QUEUE_PERMISSION","TEXFAB_CARPET_QUEUE","WEAVE_QUEUE_PERMISSION","TUFT_QUEUE_PERMISSION","planningItemChange","savePlanningItem","PreviewMap","THEORETICAL","isEditingCreelMapping","EnumUtils","getEnumValues","setPlanningItemForm","updateGenericPlanningItemFormValues","updateRunSpecificFormValues","distinctUntilChanged","prev","current","delay","cancelGetCreelRequest","removeRunSpecificFormControls","resetCreelPreviewTypeAndPreviewMap","addRunSpecificFormControls","addToObject","planningItemTypeLabel","editObject","planningItemType","startTimeInMs","getMillisecondsFromTimeLabel","getRawValue","startTime","startDateWithStartTime","plus","milliseconds","currentDate","fromJSDate","controls","setValue","getTimeLabelFromDate","reschedulePlanningOrders","getPlanningItemStartAndEndDate","minimumAllowedDifferenceBetweenStartDateAndEndDateInMs","getMinimumAllowedDifferenceBetweenStartDateAndEndDateInMs","diff","calculatedEndDate","endTime","startOf","RUN","warpingMachines","CREEL_CHANGE","WARP_CHANGE","isMachineQualitySelected","_this$planningItemFor","_this$planningItemFor2","isWeaveProductSelected","_this$planningItemFor3","isTuftProductSelected","_this$planningItemFor4","_this$currentSubscrip2","_this$currentSubscrip3","canEditForMachineType","SelectMachineQualityComponent","selectObjectTranslationKey","toLower","rowSelection","AgGridRowSelection","SINGLE","allowEmptySelection","selectedQualities","PlanningMachineQuality","fromOverviewListMachineQuality","SelectCreelComponent","selectedCreels","setSelectedCreels","SelectWeaveProductComponent","selectedWeaveProduct","PlanningWeaveProduct","fromOverviewListWeaveProduct","SelectTuftProductComponent","selectedTuftProduct","PlanningTuftProduct","fromOverviewListTuftProduct","getPlanningItem","matButtonToggleChange","ACTIVE","patchValue","isPlanningItemStartDateAfterCurrentDate","_newPlanningItem$plan","_this$planningItemFor5","_this$planningItemFor6","_this$planningItemFor7","_this$planningItemFor8","_this$planningItemFor9","_this$planningItemFor10","_this$planningItemFor11","_this$planningItemFor12","enable","disable","getMinDateForEndDate","newStartDate","currentStartDate","minDateForStartDate","currentStartDateDateTime","newEndDate","currentEndDate","minDateForEndDate","currentEndDateDateTime","lastOrder","last","lastendDate","control","MAINTENANCE","Validators","required","canChangePlanningItemStartDate","_this$currentSubscrip4","_this$currentSubscrip5","_this$currentSubscrip6","_this$planningItemFor13","planningCreel","getPossibleCreelsForMachine","creels","updateWeavingRunSpecificFormValues","updateTuftingRunSpecificFormValues","updateCarpetRunSpecificFormValues","newCreel","getCreelSubscription","getCreelForRun","getOriginalMappingForCurrentPositionOnMachine","getFunctionsBasedOnDialogComponent","loadNewItem","newItemId","setCreel","reopenDialog","setQuality","setNewItemOrReopenDialogIfPresent","dialogComponent","setWeaveProduct","setTuftProduct","timeLabel","time","fromFormat","Number","hour","HOUR_IN_MS","minute","MINUTE_IN_MS","_this$planningItemFor14","disabled","endTimeInMs","getRunPlanningItemProperties","PlanningCreel","fromOverviewListCreel","PlanningMachineMaintenance","PlanningMachineCreelChange","MACHINE_UNAVAILABLE","PlanningMachineUnavailability","PlanningMachineWarpChange","_this$planningItemFor15","newSelectedCreel","currentSelectedCreel","_this$planningItemFor16","_this$planningItemFor17","_this$planningItemFor18","_this$planningItemFor19","_this$planningItemFor20","_this$planningItemFor21","addControl","removeControl","detectChanges","updateStartWhilePreservingDuration","TimezoneUtils","convertToDateWithCurrentOffset","toISOString","timeZone","code","getAll","showOnlyLatestVersion","quality","getAllForMachineId","CREELS","MACHINE_QUALITIES","WEAVE_PRODUCT","hostVars","PlanningItemFormComponent_div_0_Template","PlanningItemFormComponent_app_edit_creel_mapping_1_Template","skeletonViewAnimation","onPlanningItemChange","PlanningItemSidebarComponent","_PlanningItemSidebarComponent","PLANNING_ITEM","sidebarPlanningItem","canModifyPlanningItem","isPlanningItemEndDateAfterCurrentDate","CONFIRM_DELETE","AlertDialogResult","CONFIRM","planningOrderId","momentCurrentDateForSubscriptionTimezone","isAfter","PlanningItemSidebarComponent_app_planning_item_form_1_Template","PlanningItemSidebarComponent_ng_template_2_Template","planningItemDetails_r4","printWeavingOrderForProductionOrder","processProductionOrder","processAndQueueProductionOrder","processAndQueueButtonsIsEnabled","processing","processingAndQueuing","queueProductionOrder","queuing","PlanningOrderDetailSidebarComponent_ng_container_3_ng_container_2_ng_container_1_Template","PlanningOrderDetailSidebarComponent_ng_container_3_ng_container_2_vdw_progress_button_2_Template","canBeProcessed","canBeQueued","PlanningOrderDetailSidebarComponent_ng_container_3_button_1_Template","PlanningOrderDetailSidebarComponent_ng_container_3_ng_container_2_Template","canPrintWeavingOrder","canShowProcessAndQueueActions","reconfirmWarningMessage","dueDate","reconfirmProductionOrder","viewProductionOrder","PlanningOrderDetailSidebarComponent_ng_container_5_footer_22_button_1_Template","PlanningOrderDetailSidebarComponent_ng_container_5_footer_22_button_2_Template","PlanningOrderDetailSidebarComponent_ng_container_5_footer_22_button_3_Template","canReconfirmProductionOrder","canRemoveOrder","canViewProductionOrder","PlanningOrderDetailSidebarComponent_ng_container_5_vdw_message_container_3_Template","PlanningOrderDetailSidebarComponent_ng_container_5_app_disabled_form_input_19_Template","PlanningOrderDetailSidebarComponent_ng_container_5_footer_22_Template","getValueForYield","canViewActionsForPlanningOrder","PlanningOrderDetailSidebarComponent","_PlanningOrderDetailSidebarComponent","realtimeProductionOrder","realtimeProductionOrderLite","httpProductionOrderCustomSettings","toastService","confirmProductionScheduleOnDesktopCommand","printDocument","planningOrderDetailSidebarClose","dateFormat","reconfirming","reconfirmed","processAndQueueTranslationKey","queueTranslationKey","Message","MessageType","WARNING","getProductionOrdersStatusChanges","_this$planningOrder","_this$planningOrder2","getProductionOrdersLiteStatusChanges","_this$planningOrder3","_this$planningOrder4","changes","previousValue","getPlanningOrderDetails","PLANNING_ORDER","sidebarPlanningOrderId","closePlanningOrderDetail","getWeavingOrderXMLForProductionOrder","getWeavingOrderXSLTForProductionOrder","isLoadingPlanningOrder","needsToBeReconfirmed","path","editProductionOrder","hasPermissionToGoToNewBuilder","_deleteOrderCommand","deleteOrderCommand","deletePlanningOrderLite","yield","planned","yieldUnit","YieldUnit","getYieldUnitForMachineType","yieldUnitTranslation","METER","showInfoToast","confirmAction","productionOrdersCustomSettings","productionOrderCustomSettings","getAndReconfirmProductionOrder","getReadyToQueue","of","isReadyToQueue","showInfo","tapToDismiss","timeOut","onConfirm","actionTranslation","getAndConfirmProductionSchedule","confirmProductionScheduleOnDesktopResult","ConfirmProductionScheduleOnDesktopResult","CONFIRMED","REALTIME_PRODUCTION_ORDER","REALTIME_PRODUCTION_ORDER_LITE","i7","PlanningOrderDetailSidebarComponent_ng_container_3_Template","PlanningOrderDetailSidebarComponent_vdw_loading_overlay_4_Template","PlanningOrderDetailSidebarComponent_ng_container_5_Template","PlanningModule","_PlanningModule","provide","useClass","HttpPlanningService","PLANNING_SCHEDULER","MACHINE_OVERVIEW","HttpMachineOverviewService","HttpProductionOrdersService","REALTIME_PLANNING","SignalrProductionOrderService","SignalrProductionOrderLiteService","HttpCreelsService","PRODUCTION_SCHEDULES","HttpProductionSchedulesService","HttpProductionOrdersWeavingService","HttpWeaveProductsService","PlanningContextService","PlanningOnboardingService","ConfirmProductionOrderDeletionCommand","PlanningRealtimeChangesService","PlanningDragDropChangesService","imports","SharedModule","planningRouting","ProductionScheduleSharedModule","PlanningDisplayModule","PlanningDragDropModule","SelectionListModule","SelectionListContainerModule","DelayedClassModule","PlanningComponent","i8","i9","i10","i11","i12","i13","PlanningSidebarsComponent","i14","NeedsAttentionSidebarComponent","__WEBPACK_DEFAULT_EXPORT__","arguments","args","Array","array","arrayPush","isArray","copyArray","baseFlatten","createCompounder","word","start","end","isIterateeCall","toInteger","baseSlice"],"ignoreList":[],"sourceRoot":"webpack:///","sources":["./apps/texconnect/src/app/application/animations/component-enter-leave.animation.ts","./apps/texconnect/src/app/infrastructure/signalr/planning/signalr-planning.service.ts","./apps/texconnect/src/app/presentation/pages/texfab/planning/planning-order-card/planning-small-order-card-info/planning-small-order-card-info.component.html","./apps/texconnect/src/app/presentation/pages/texfab/planning/planning-order-card/planning-small-order-card-info/planning-small-order-card-info.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/planning/planning-order-card/planning-order-card.component.html","./apps/texconnect/src/app/presentation/pages/texfab/planning/planning-order-card/planning-order-card.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/planning/planning-inactivitiy-card/planning-inactivitiy-card.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/planning/planning-inactivitiy-card/planning-inactivitiy-card.component.html","./apps/texconnect/src/app/presentation/pages/texfab/planning/planning-display-content/planning-display-content.component.html","./apps/texconnect/src/app/presentation/pages/texfab/planning/planning-display-content/planning-display-content.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/planning/planning-scheduler/reschedule-overlapping-items/reschedule-overlapping-items-command.ts","./apps/texconnect/src/app/presentation/pages/texfab/planning/planning-scheduler/add-new-planning-item/add-new-planning-item-command.ts","./apps/texconnect/src/app/presentation/pages/texfab/planning/planning-scheduler/add-planned-order-to-new-run/add-planned-order-to-new-run-command.ts","./apps/texconnect/src/app/presentation/pages/texfab/planning/planning-scheduler/add-unplanned-order-to-new-run/add-unplanned-order-to-new-run-command.ts","./apps/texconnect/src/app/presentation/pages/texfab/planning/planning-scheduler/add-unplanned-order-to-run/add-unplanned-order-to-run-command.ts","./apps/texconnect/src/app/presentation/pages/texfab/planning/planning-scheduler/remove-planning-items-outside-date-range/remove-planning-items-outside-date-range-command.ts","./apps/texconnect/src/app/presentation/pages/texfab/planning/planning-scheduler/reschedule-items/reschedule-items-command.ts","./apps/texconnect/src/app/presentation/pages/texfab/planning/planning-scheduler/reschedule-planning-order/reschedule-planning-order-command.ts","./apps/texconnect/src/app/presentation/pages/texfab/planning/show-production-order-incompatible-with-machine-alert/show-production-order-incompatible-with-machine-alert-command.ts","./apps/texconnect/src/app/presentation/pages/texfab/planning/planning-scheduler/planning-scheduler.service.ts","./apps/texconnect/src/app/presentation/pages/texfab/planning/sidebars/machine-detail-sidebar/machine-detail-sidebar.component.html","./apps/texconnect/src/app/presentation/pages/texfab/planning/sidebars/machine-detail-sidebar/machine-detail-sidebar.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/planning/sidebars/planning-item-sidebar/base-planning-item.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/planning/sidebars/planning-item-sidebar/production-orders-list/select-production-order/select-production-order.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/planning/sidebars/planning-item-sidebar/production-orders-list/select-production-order/select-production-order.component.html","./apps/texconnect/src/app/presentation/pages/texfab/planning/sidebars/planning-item-sidebar/production-orders-list/production-orders-list.component.html","./apps/texconnect/src/app/presentation/pages/texfab/planning/sidebars/planning-item-sidebar/production-orders-list/production-orders-list.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/planning/sidebars/planning-item-sidebar/planning-item-details/planning-item-details.component.html","./apps/texconnect/src/app/presentation/pages/texfab/planning/sidebars/planning-item-sidebar/planning-item-details/planning-item-details.component.ts","./libs/angular-component-library/src/lib/custom-directives/delayed-class/delayed-class.directive.ts","./apps/texconnect/src/app/presentation/pages/texfab/planning/sidebars/planning-item-sidebar/planning-item-form/edit-creel-mapping/colored-yarn-set-map-card/colored-yarn-set-map-card.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/planning/sidebars/planning-item-sidebar/planning-item-form/edit-creel-mapping/colored-yarn-set-map-card/colored-yarn-set-map-card.component.html","./apps/texconnect/src/app/presentation/pages/texfab/planning/sidebars/planning-item-sidebar/planning-item-form/edit-creel-mapping/edit-creel-mapping.component.html","./apps/texconnect/src/app/presentation/pages/texfab/planning/sidebars/planning-item-sidebar/planning-item-form/edit-creel-mapping/edit-creel-mapping.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/planning/sidebars/planning-item-sidebar/planning-item-form/planning-item-form.component.html","./apps/texconnect/src/app/presentation/pages/texfab/planning/sidebars/planning-item-sidebar/planning-item-form/planning-item-form.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/planning/sidebars/planning-item-sidebar/planning-item-sidebar.component.html","./apps/texconnect/src/app/presentation/pages/texfab/planning/sidebars/planning-item-sidebar/planning-item-sidebar.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/planning/sidebars/planning-order-detail-sidebar/planning-order-detail-sidebar.component.html","./apps/texconnect/src/app/presentation/pages/texfab/planning/sidebars/planning-order-detail-sidebar/planning-order-detail-sidebar.component.ts","./apps/texconnect/src/app/presentation/pages/texfab/planning/planning.module.ts","./node_modules/lodash-es/concat.js","./node_modules/lodash-es/kebabCase.js","./node_modules/lodash-es/slice.js"],"sourcesContent":["import {animate, AnimationTriggerMetadata, query, style, transition, trigger} from '@angular/animations';\n\nexport function componentEnterLeaveAnimation(): AnimationTriggerMetadata {\n return trigger('ComponentEnterLeaveAnimation', [\n transition('false => true', [\n query(\n '.details:enter',\n [\n style({\n left: '100%'\n }),\n animate('400ms cubic-bezier(0.25, 0.8, 0.25, 1)', style({left: '0'}))\n ],\n {optional: true}\n )\n ]),\n transition('true => false', [\n query(\n '.details:leave',\n [\n style({\n left: '0'\n }),\n animate('400ms cubic-bezier(0.25, 0.8, 0.25, 1)', style({left: '100%'}))\n ],\n {optional: true}\n )\n ])\n ]);\n}\n","import {Inject, Injectable} from '@angular/core';\nimport {BackendConfiguration} from '@application/configuration/backend-configuration';\nimport {CalendarItemGroup} from '@domain/planning/calendar-item-group';\nimport {Authentication, AUTHENTICATION} from '@infrastructure/http/authentication/authentication';\nimport {SignalrHubConnectionFactoryService} from '@vdw/angular-component-library';\nimport {map, Observable} from 'rxjs';\nimport {DeletedPlanningItem} from './deleted-planning-item';\nimport {RealtimePlanning} from './realtime-planning';\n\n@Injectable()\nexport class SignalrPlanningService implements RealtimePlanning {\n public constructor(\n @Inject(AUTHENTICATION) private readonly authentication: Authentication,\n private readonly backendConfiguration: BackendConfiguration,\n private readonly signalrHubConnectionFactoryService: SignalrHubConnectionFactoryService\n ) {}\n\n public getPlanningChanges(): Observable {\n return this.signalrHubConnectionFactoryService\n .getSignalrHubEvents(`${this.backendConfiguration.getPlanningHubEndPoint()}planning`, 'OnPlanningChanged')\n .pipe(\n map((planningChangesJSON: any) =>\n (JSON.parse(planningChangesJSON) as any[]).map((updateForPlanning: any) => CalendarItemGroup.fromJSON(updateForPlanning, this.authentication.getCurrentSubscription()))\n )\n );\n }\n\n public getDeletedPlanningItem(): Observable {\n return this.signalrHubConnectionFactoryService.getSignalrHubEvents(`${this.backendConfiguration.getPlanningHubEndPoint()}planning`, 'OnPlanningItemDeleted');\n }\n}\n","\n\n
\n

{{ planningOrder.productionOrder.name }}

\n
\n \n
\n

{{ planningOrder.efficiency | number: '1.0-2' }}%

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

{{ 'PRODUCTION_ORDER.STATUS.' + planningOrder.productionOrder.status | bmsTranslate }}

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

{{ 'PLANNING.STATUS.DIFFERENT_CONFIGURATION' | bmsTranslate }}

\n
\n
\n \n

{{ 'PLANNING.STATUS.DUE' | bmsTranslate }}

\n
\n
\n
\n
\n","import {Component, Inject} from '@angular/core';\nimport {MAT_DIALOG_DATA} from '@angular/material/dialog';\nimport {PlanningOrder} from '@domain/planning/planning-order';\n\n@Component({\n selector: 'app-planning-small-order-card-info',\n templateUrl: './planning-small-order-card-info.component.html',\n styleUrls: ['./planning-small-order-card-info.component.scss']\n})\nexport class PlanningSmallOrderCardInfoComponent {\n public title: string;\n public planningOrder: PlanningOrder;\n public differentConfiguration: boolean;\n public iconNameForProductionStatus: string;\n\n public constructor(@Inject(MAT_DIALOG_DATA) public data: {title: string; planningOrder: PlanningOrder; differentConfiguration: boolean; iconNameForProductionStatus: string}) {\n this.title = data.title;\n this.planningOrder = data.planningOrder;\n this.differentConfiguration = data.differentConfiguration;\n this.iconNameForProductionStatus = data.iconNameForProductionStatus;\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, HostListener, Input, OnDestroy, OnInit} from '@angular/core';\nimport {PlanningOrder} from '@domain/planning/planning-order';\nimport {ProductionScheduleStatus} from '@domain/production-schedule/production-schedule-status.enum';\nimport {RepositionTooltipComponent} from '@presentation/components/reposition-tooltip/reposition-tooltip.component';\nimport {BaseComponent, DialogBuilder, DialogBuilderFactoryService, DOMUtils} from '@vdw/angular-component-library';\nimport {takeUntil} from 'rxjs';\nimport {PlanningSmallOrderCardInfoComponent} from './planning-small-order-card-info/planning-small-order-card-info.component';\n\n@Component({\n selector: 'app-planning-order-card',\n templateUrl: './planning-order-card.component.html',\n styleUrls: ['./planning-order-card.component.scss']\n})\nexport class PlanningOrderCardComponent extends BaseComponent implements OnInit, OnDestroy {\n @Input() public machineRunTitle: string;\n @Input() public planningOrder: PlanningOrder;\n @Input() public compatibleWithMachine: boolean;\n @Input() public shouldShowRightBorder: boolean;\n\n public shouldShowSmallInfo = false;\n private readonly SMALL_ORDER_THRESHOLD = 72;\n\n private dialogBuilder: DialogBuilder = null;\n\n public constructor(\n private readonly element: ElementRef,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService\n ) {\n super();\n }\n\n public ngOnInit(): void {\n DOMUtils.observeResize(this.element.nativeElement)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((entries: ResizeObserverEntry[]) => {\n this.shouldShowSmallInfo = entries[0].contentRect.width < this.SMALL_ORDER_THRESHOLD;\n });\n }\n\n @HostListener('mouseenter')\n public onMouseEnter(): void {\n if (this.shouldShowSmallInfo && this.dialogBuilder === null) {\n this.openDetailsTooltip();\n }\n }\n\n @HostListener('mouseleave')\n public onMouseLeave(): void {\n if (this.dialogBuilder !== null) {\n this.closeDetailsTooltip();\n }\n }\n\n public getIconNameForProductionOrderStatus(): string {\n return ProductionScheduleStatus.getStatusIconName(this.planningOrder.productionOrder.status);\n }\n\n public openDetailsTooltip(): void {\n this.dialogBuilder = this.dialogBuilderFactoryService.getBuilder();\n\n this.dialogBuilder.withClass('reposition-tooltip').withMaxWidth('408px').withoutBackdrop().openDialog(RepositionTooltipComponent, {\n forceArrowCentered: true,\n title: this.machineRunTitle,\n planningOrder: this.planningOrder,\n differentConfiguration: !this.compatibleWithMachine,\n component: PlanningSmallOrderCardInfoComponent,\n targetDOMRect: this.element.nativeElement.getBoundingClientRect(),\n iconNameForProductionStatus: this.getIconNameForProductionOrderStatus()\n });\n }\n\n public override ngOnDestroy(): void {\n super.ngOnDestroy();\n this.closeDetailsTooltip();\n }\n\n private closeDetailsTooltip(): void {\n this.dialogBuilder?.close();\n this.dialogBuilder = null;\n }\n}\n","import {Component, Input} from '@angular/core';\nimport {PlanningMachineCreelChange} from '@domain/planning/carpet/planning-machine-creel-change';\nimport {PlanningItemType} from '@domain/planning/planning-item-type.enum';\nimport {PlanningMachineMaintenance} from '@domain/planning/planning-machine-maintenance';\nimport {PlanningMachineUnavailability} from '@domain/planning/planning-machine-unavailability';\nimport {kebabCase} from 'lodash-es';\n\n@Component({\n selector: 'app-planning-inactivitiy-card',\n templateUrl: './planning-inactivitiy-card.component.html',\n styleUrls: ['./planning-inactivitiy-card.component.scss']\n})\nexport class PlanningInactivitiyCardComponent {\n @Input() public isCompleted: boolean;\n @Input() public planningItem: PlanningMachineMaintenance | PlanningMachineCreelChange | PlanningMachineUnavailability;\n\n public getIconName(): string {\n return `${kebabCase(PlanningItemType[this.planningItem.type])}`;\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, DoCheck, Input, OnDestroy, OnInit, ViewChild} from '@angular/core';\nimport {NavigationHelperService} from '@application/helper/navigation-helper/navigation-helper.service';\nimport {DateRange} from '@domain/date-range';\nimport {MachineType} from '@domain/machine/machine-type.enum';\nimport {Regime} from '@domain/machine/regime';\nimport {Shift} from '@domain/machine/shift';\nimport {CalendarItem} from '@domain/planning/calendar-item';\nimport {CalendarItemGroup} from '@domain/planning/calendar-item-group';\nimport {PlanningMachineCarpetRun} from '@domain/planning/carpet/planning-machine-carpet-run';\nimport {PlanningItem} from '@domain/planning/planning-item';\nimport {PlanningMachine} from '@domain/planning/planning-machine';\nimport {PlanningMachineRun} from '@domain/planning/planning-machine-run';\nimport {PlanningOrder} from '@domain/planning/planning-order';\nimport {PlanningMachineTuftingRun} from '@domain/planning/tufting/planning-machine-tufting-run';\nimport {PlanningMachineWeavingRun} from '@domain/planning/weaving/planning-machine-weaving-run';\nimport {OnboardingPlanningStep} from '@presentation/components/onboarding-dialog/onboarding-planning-step.enum';\nimport {\n AssertionUtils,\n ColorConstants,\n DateTimeFormat,\n DateTimePipe,\n DragDropData,\n MACHINE_GROUP_COLOURS_PALETTE,\n PlanningDisplayComponent,\n PlanningGridComponent,\n TranslateService\n} from '@vdw/angular-component-library';\nimport {isEqual} from 'lodash-es';\nimport {DateTime} from 'luxon';\nimport moment from 'moment';\nimport {NavigationPlanningData} from '../navigation-planning-data.type';\nimport {PlanningScrollPositionData} from '../planning-scroll-position-data.interface';\nimport {PlanningContextService} from '../planning-services/planning-context.service';\nimport {PlanningDragDropChangesService} from '../planning-services/planning-drag-drop-changes.service';\nimport {PlanningOnboardingService} from '../planning-services/planning-onboarding.service';\nimport {PlanningComponent} from '../planning.component';\n\n@Component({\n selector: 'app-planning-display-content',\n templateUrl: './planning-display-content.component.html',\n styleUrls: ['./planning-display-content.component.scss']\n})\nexport class PlanningDisplayContentComponent implements OnInit, DoCheck, OnDestroy {\n @Input() public cellsPerDay: number;\n @Input() public regimes: Regime[] = [];\n @Input() public selectedDateRange: DateRange;\n @Input() public fallbackMachineGroupId: number;\n\n @ViewChild(PlanningGridComponent)\n public planningGrid: PlanningGridComponent;\n\n @ViewChild(PlanningDisplayComponent)\n public planningDisplay: PlanningDisplayComponent;\n\n private isFirstChanges = true;\n private readonly UNKNOWN_OBJECT_KEY = 'PLANNING.UNKNOWN';\n\n public constructor(\n public readonly planning: PlanningComponent,\n private readonly translate: TranslateService,\n public readonly planningContext: PlanningContextService,\n private readonly planningOnboarding: PlanningOnboardingService,\n public readonly dragDropChanges: PlanningDragDropChangesService,\n private readonly navigationHelperService: NavigationHelperService,\n private readonly dateTimePipe: DateTimePipe\n ) {}\n\n public ngOnInit(): void {\n const emptyScrollPositionState = {queryName: null, scrollTop: null, scrollLeft: null} as PlanningScrollPositionData;\n const scrollPositionState = this.navigationHelperService.getPartialState(Object.keys(emptyScrollPositionState));\n\n if (scrollPositionState && !isEqual(emptyScrollPositionState, scrollPositionState)) {\n const scrollContainer = document.querySelector(scrollPositionState.queryName);\n\n setTimeout(() => {\n scrollContainer.scrollTo({top: scrollPositionState.scrollTop, left: scrollPositionState.scrollLeft});\n });\n }\n }\n\n public ngDoCheck(): void {\n if (this.isFirstChanges && this.planningGrid?.bodyContainer != null) {\n this.isFirstChanges = false;\n this.planningContext.planningGridDisplay = this.planningGrid;\n this.planningGrid.bodyContainerOffset = this.planningGrid.bodyContainer.nativeElement.getBoundingClientRect();\n }\n }\n\n public ngOnDestroy(): void {\n const scrollContainerQueryName = '.scroll-container';\n const scrollContainer = document.querySelector(scrollContainerQueryName);\n if (scrollContainer) {\n this.navigationHelperService.savePartialState({queryName: scrollContainerQueryName, scrollTop: scrollContainer.scrollTop, scrollLeft: scrollContainer.scrollLeft});\n }\n }\n\n public trackByRunId(_: number, group: PlanningMachineRun): number {\n return group.id;\n }\n\n public trackByOrderId(_: number, order: PlanningOrder): number {\n return order.id;\n }\n\n public trackByPlanningItemId(index: number, item: CalendarItem): number {\n return item.id;\n }\n\n public getMachineColor(machine: PlanningMachine): string {\n return !AssertionUtils.isNullOrUndefined(this.fallbackMachineGroupId)\n ? MACHINE_GROUP_COLOURS_PALETTE[(machine.group?.id ?? this.fallbackMachineGroupId) % MACHINE_GROUP_COLOURS_PALETTE.length](1)\n : '';\n }\n\n public getMachineIcon(machine: PlanningMachine): string {\n return MachineType.getIconNameForMachineType(machine.machineType);\n }\n\n public getMachineName(machine: PlanningMachine): string {\n return machine.name ?? this.translate.instant('GENERAL.NO_DATA', {object: this.translate.instant('GENERAL.NAME').toLowerCase()});\n }\n\n public getShiftName(shift: Shift, regime: Regime): string {\n return `Shift: ${shift.name} ${this.dateTimePipe.transform(DateTime.fromISO(shift.shiftStart).toJSDate(), DateTimeFormat.TIME_SIMPLE)} - ${this.dateTimePipe.transform(DateTime.fromISO(shift.shiftEnd).toJSDate(), DateTimeFormat.TIME_SIMPLE)} (regime: ${regime.name})`;\n }\n\n public getRunsForMachineId(machineId: number): PlanningMachineRun[] {\n const groupedItemsForMachine = this.planningContext.groupedCalendarItems.find((group: CalendarItemGroup) => group.machineId === machineId);\n const runsForMachine = groupedItemsForMachine?.items?.filter((item: CalendarItem) => item instanceof PlanningMachineRun) as PlanningMachineRun[];\n\n return this.planningContext.hasMachineMachineRunPlaceholder(machineId) ? [...runsForMachine, this.planningContext.selectedPlaceholder as PlanningMachineRun] : runsForMachine;\n }\n\n public getPlanningItemsForMachineId(machineId: number): CalendarItem[] {\n const groupedItemsForMachine = this.planningContext.groupedCalendarItems.find((group: CalendarItemGroup) => group.machineId === machineId);\n const planningItemsForMachine = groupedItemsForMachine?.items?.filter((item: CalendarItem) => !(item instanceof PlanningMachineRun));\n\n return this.planningContext.hasMachinePlanningItemPlaceholder(machineId) ? [...planningItemsForMachine, this.planningContext.selectedPlaceholder] : planningItemsForMachine;\n }\n\n public shouldOrderShowRightBorder(run: PlanningMachineRun, order: PlanningOrder, orderIndex: number): boolean {\n return orderIndex !== run.planningOrders.length - 1 && order.endDate < this.selectedDateRange[1];\n }\n\n public isPlanningItemCompleted(planningItem: PlanningItem): boolean {\n return this.planningContext.getCurrentDateForSubscriptionTimezone() >= planningItem.endDate;\n }\n\n public hasRunOrdersPastDueDate(run: PlanningMachineRun): boolean {\n return run.planningOrders?.some((order: PlanningOrder) => !order.productionOrder.completed && order.isProductionOrderDueDateBeforeEndDate);\n }\n\n public hasRunBeenCompleted(run: PlanningMachineRun): boolean {\n const notCompletedOrder = run.planningOrders?.find((order: PlanningOrder) => !order.productionOrder.completed);\n\n return !AssertionUtils.isEmpty(run.planningOrders) && AssertionUtils.isNullOrUndefined(notCompletedOrder);\n }\n\n public getRowBackgroundColor(machine: PlanningMachine): string {\n return machine.id === this.planningOnboarding.DEMO_ITEM_ID && this.planningOnboarding.currentOnboardingStep === OnboardingPlanningStep.ADD_ITEM\n ? ColorConstants.TINT_DARKBLUE_6\n : ColorConstants.PRIMARY_COLOR_WHITE;\n }\n\n public getOrderClass(order: PlanningOrder): string {\n let orderClass = 'planning-order';\n if (order.productionOrder.completed) {\n orderClass += ' completed';\n }\n if (order.isProductionOrderDueDateBeforeEndDate) {\n orderClass += ' past-due';\n }\n\n return orderClass;\n }\n\n public getRunTitle(run: PlanningMachineRun): string {\n if (run instanceof PlanningMachineCarpetRun) {\n return this.getCarpetRunTitle(run);\n }\n if (run instanceof PlanningMachineWeavingRun) {\n return this.getWeavingRunTitle(run);\n }\n if (run instanceof PlanningMachineTuftingRun) {\n return this.getTuftingRunTitle(run);\n }\n }\n\n public isRunDemoItem(run: PlanningMachineRun): boolean {\n return this.planningContext.isOnboardingRunning && run.id === this.planningOnboarding.DEMO_ITEM_ID;\n }\n\n public getNewRunText(): string {\n return this.translate.instant('GENERAL.ACTIONS.NEW_OBJECT', {object: 'PLANNING.ADD_ITEM.TYPES.RUN'}).toUpperCase();\n }\n\n public onPlanningItemDragStart(dragDropData: DragDropData): void {\n this.planning.planningSideBars.closeSidebar(false);\n this.dragDropChanges.onPlanningItemDragStart(dragDropData);\n }\n\n public onPlanningOrderDragStart(dragDropData: DragDropData): void {\n this.planning.planningSideBars.closeSidebar(false);\n this.dragDropChanges.onPlanningOrderDragStart(dragDropData);\n }\n\n public onGridDisplaySelected({event, rowIndex, date}: {event: PointerEvent; rowIndex: number; date: Date}): void {\n if (!this.planningContext.canEdit()) {\n return;\n }\n\n const placeholderEndDate = moment(date).add(1, 'h').toDate();\n const group = this.planningContext.groupedCalendarItems?.find((itemGroup: CalendarItemGroup) => itemGroup.machineId === this.planningContext.machinesForSelectedPlanningGroups[rowIndex]?.id);\n const overlappingItem = group?.items.find((item: CalendarItem) => item.startDate <= date && item.endDate >= placeholderEndDate);\n\n if (overlappingItem == null && !this.planningContext.isOnboardingRunning) {\n this.planning.addPlaceholder({event, rowIndex, date});\n }\n }\n\n private getTuftingRunTitle(run: PlanningMachineTuftingRun): string {\n if (run.isNew() && !run.tuftProduct) {\n return this.getNewRunText();\n }\n return (run.tuftProduct?.name ?? this.translate.instant(this.UNKNOWN_OBJECT_KEY)).toUpperCase();\n }\n\n private getWeavingRunTitle(run: PlanningMachineWeavingRun): string {\n if (run.isNew() && !run.weaveProduct) {\n return this.getNewRunText();\n }\n return (run.weaveProduct?.name ?? this.translate.instant(this.UNKNOWN_OBJECT_KEY)).toUpperCase();\n }\n\n private getCarpetRunTitle(run: PlanningMachineCarpetRun): string {\n if (run.isNew() && !run.machineQuality && !run.creel) {\n return this.getNewRunText();\n }\n\n const creelLabel = run.creel?.name ?? this.translate.instant(this.UNKNOWN_OBJECT_KEY);\n const machineQualityLabel = run.machineQuality?.technicalName ?? this.translate.instant(this.UNKNOWN_OBJECT_KEY);\n\n return `${machineQualityLabel}/${creelLabel}`.toUpperCase();\n }\n}\n","import {Command} from '@application/command/command';\nimport {CalendarItemGroup} from '@domain/planning/calendar-item-group';\nimport {PlanningItem} from '@domain/planning/planning-item';\nimport {moment, TimeUtils} from '@vdw/angular-component-library';\nimport {filter, forEach, isEqual, orderBy} from 'lodash-es';\nimport {RescheduleOverlappingItemsParameters} from './reschedule-overlapping-items-parameters';\n\nexport class RescheduleOverlappingItemsCommand implements Command {\n public execute(commandArgs: RescheduleOverlappingItemsParameters): void {\n const {planningItem, groupedCalendarItem} = commandArgs;\n\n this.rescheduleOverlappingPlanningItems(planningItem, groupedCalendarItem);\n }\n\n private findOverlappingPlanningItems(lastRescheduledPlanningItem: PlanningItem, groupedCalendarItem: CalendarItemGroup): PlanningItem[] {\n return orderBy(\n filter(groupedCalendarItem.items as PlanningItem[], (planningItem: PlanningItem) => {\n const lastRescheduledRunDateRange = moment.range(lastRescheduledPlanningItem.startDate, lastRescheduledPlanningItem.endDate);\n const planningItemDateRange = moment.range(planningItem.startDate, planningItem.endDate);\n\n return lastRescheduledRunDateRange.overlaps(planningItemDateRange) && !isEqual(lastRescheduledPlanningItem.uniqueId, planningItem.uniqueId);\n }),\n 'startDate',\n 'asc'\n );\n }\n\n private rescheduleOverlappingPlanningItems(planningItem: PlanningItem, groupedCalendarItem: CalendarItemGroup): void {\n const overlappingPlanningItems: PlanningItem[] = this.findOverlappingPlanningItems(planningItem, groupedCalendarItem);\n\n forEach(overlappingPlanningItems, (overlappingPlanningItem: PlanningItem) => {\n const overlappingPlanningItemNewStartDate = moment(planningItem.endDate).add(1, 'minutes').toDate();\n const overlappingPlanningItemNewEndDate = moment(overlappingPlanningItemNewStartDate).add(overlappingPlanningItem.totalRunningTimeInMs, TimeUtils.MILLISECONDS_UNIT).toDate();\n overlappingPlanningItem.reschedule(overlappingPlanningItemNewStartDate, overlappingPlanningItemNewEndDate);\n\n this.rescheduleOverlappingPlanningItems(overlappingPlanningItem, groupedCalendarItem);\n planningItem = overlappingPlanningItem;\n });\n }\n}\n","import {Command} from '@application/command/command';\nimport {CalendarItemGroup} from '@domain/planning/calendar-item-group';\nimport {forEach, isEqual} from 'lodash-es';\nimport {RescheduleOverlappingItemsCommand} from '../reschedule-overlapping-items/reschedule-overlapping-items-command';\nimport {AddNewPlanningItemParameters} from './add-new-planning-item-parameters';\n\nexport class AddNewPlanningItemCommand implements Command {\n public execute(commandArgs: AddNewPlanningItemParameters): CalendarItemGroup[] {\n const {newPlanningItem, destinationGroupedCalendarItem, groupedCalendarItems} = commandArgs;\n\n destinationGroupedCalendarItem.items.push(newPlanningItem);\n\n new RescheduleOverlappingItemsCommand().execute({planningItem: newPlanningItem, groupedCalendarItem: destinationGroupedCalendarItem});\n\n forEach(groupedCalendarItems, (groupedCalendarItem: CalendarItemGroup, index: number) => {\n if (isEqual(destinationGroupedCalendarItem.machineId, groupedCalendarItem.machineId)) {\n groupedCalendarItems[index] = destinationGroupedCalendarItem;\n return false;\n }\n });\n\n return groupedCalendarItems;\n }\n}\n","import {Command} from '@application/command/command';\nimport {CalendarItemGroup} from '@domain/planning/calendar-item-group';\nimport {PlanningMachineCarpetRun} from '@domain/planning/carpet/planning-machine-carpet-run';\nimport {PlanningMachineRun} from '@domain/planning/planning-machine-run';\nimport {PlanningMachineTuftingRun} from '@domain/planning/tufting/planning-machine-tufting-run';\nimport {PlanningMachineWeavingRun} from '@domain/planning/weaving/planning-machine-weaving-run';\nimport {find} from 'lodash-es';\nimport {AddNewPlanningItemCommand} from '../add-new-planning-item/add-new-planning-item-command';\nimport {RemovePlanningOrderCommand} from '../remove-planning-order/remove-planning-order-command';\nimport {AddPlannedPlanningOrderToNewRunParameters} from './add-planned-order-to-new-run-parameters';\n\nexport class AddPlannedOrderToNewRunCommand implements Command {\n private readonly addNewPlanningItemCommand = new AddNewPlanningItemCommand();\n private readonly removePlanningOrderCommand = new RemovePlanningOrderCommand();\n\n public execute(commandArgs: AddPlannedPlanningOrderToNewRunParameters): CalendarItemGroup[] {\n const {plannedPlanningOrder, destinationMachine, sourceRun, sourceMachineId} = commandArgs;\n let {groupedCalendarItems} = commandArgs;\n let newRun: PlanningMachineRun;\n if (sourceRun instanceof PlanningMachineCarpetRun) {\n newRun = new PlanningMachineCarpetRun(null, sourceRun.machineQuality, sourceRun.creel, [plannedPlanningOrder], plannedPlanningOrder.startDate, plannedPlanningOrder.endDate, true);\n } else if (sourceRun instanceof PlanningMachineWeavingRun) {\n newRun = new PlanningMachineWeavingRun(null, sourceRun.weaveProduct, [plannedPlanningOrder], plannedPlanningOrder.startDate, plannedPlanningOrder.endDate, true);\n } else if (sourceRun instanceof PlanningMachineTuftingRun) {\n newRun = new PlanningMachineTuftingRun(null, sourceRun.tuftProduct, [plannedPlanningOrder], plannedPlanningOrder.startDate, plannedPlanningOrder.endDate, true);\n }\n\n const sourceGroupedCalendarItem = find(groupedCalendarItems, {machineId: sourceMachineId});\n\n groupedCalendarItems = this.removePlanningOrderCommand.execute({\n sourceGroupedCalendarItem,\n groupedCalendarItems,\n planningOrder: plannedPlanningOrder,\n run: sourceRun,\n adjustRunRunningTime: true\n });\n\n const destinationGroupedCalendarItem = find(groupedCalendarItems, {machineId: destinationMachine.id});\n\n return this.addNewPlanningItemCommand.execute({newPlanningItem: newRun, destinationGroupedCalendarItem, groupedCalendarItems});\n }\n}\n","import {Command} from '@application/command/command';\nimport {CalendarItemGroup} from '@domain/planning/calendar-item-group';\nimport {PlanningMachineCarpetRun} from '@domain/planning/carpet/planning-machine-carpet-run';\nimport {ProductionOrderCarpetForPlanningOrder} from '@domain/planning/carpet/production-order-carpet-for-planning-order';\nimport {PlanningMachineRun} from '@domain/planning/planning-machine-run';\nimport {PlanningMachineTuftingRun} from '@domain/planning/tufting/planning-machine-tufting-run';\nimport {ProductionOrderTuftingForPlanningOrder} from '@domain/planning/tufting/production-order-tufting-for-planning-order';\nimport {PlanningMachineWeavingRun} from '@domain/planning/weaving/planning-machine-weaving-run';\nimport {ProductionOrderWeavingForPlanningOrder} from '@domain/planning/weaving/production-order-weaving-for-planning-order';\nimport {find} from 'lodash-es';\nimport {AddNewPlanningItemCommand} from '../add-new-planning-item/add-new-planning-item-command';\nimport {AddUnplannedOrderToNewRunParameters} from './add-unplanned-order-to-new-run-parameters';\n\nexport class AddUnplannedOrderToNewRunCommand implements Command {\n private readonly addNewPlanningItemCommand = new AddNewPlanningItemCommand();\n\n public execute(commandArgs: AddUnplannedOrderToNewRunParameters): CalendarItemGroup[] {\n const {unplannedPlanningOrder, machine, groupedCalendarItems} = commandArgs;\n let newRun: PlanningMachineRun;\n if (unplannedPlanningOrder.productionOrder instanceof ProductionOrderCarpetForPlanningOrder) {\n newRun = new PlanningMachineCarpetRun(\n null,\n unplannedPlanningOrder.productionOrder.machineQuality,\n unplannedPlanningOrder.productionOrder.creel,\n [unplannedPlanningOrder],\n unplannedPlanningOrder.startDate,\n unplannedPlanningOrder.endDate,\n true\n );\n } else if (unplannedPlanningOrder.productionOrder instanceof ProductionOrderWeavingForPlanningOrder) {\n newRun = new PlanningMachineWeavingRun(\n null,\n unplannedPlanningOrder.productionOrder.weaveProduct,\n [unplannedPlanningOrder],\n unplannedPlanningOrder.startDate,\n unplannedPlanningOrder.endDate,\n true\n );\n } else if (unplannedPlanningOrder.productionOrder instanceof ProductionOrderTuftingForPlanningOrder) {\n newRun = new PlanningMachineTuftingRun(\n null,\n unplannedPlanningOrder.productionOrder.tuftProduct,\n [unplannedPlanningOrder],\n unplannedPlanningOrder.startDate,\n unplannedPlanningOrder.endDate,\n true\n );\n }\n\n const destinationGroupedCalendarItem = find(groupedCalendarItems, {machineId: machine.id});\n\n return this.addNewPlanningItemCommand.execute({newPlanningItem: newRun, destinationGroupedCalendarItem, groupedCalendarItems});\n }\n}\n","import {Command} from '@application/command/command';\nimport {CalendarItemGroup} from '@domain/planning/calendar-item-group';\nimport {PlanningItem} from '@domain/planning/planning-item';\nimport {each, findIndex, isEqual} from 'lodash-es';\nimport {RescheduleOverlappingItemsCommand} from '../reschedule-overlapping-items/reschedule-overlapping-items-command';\nimport {AddUnplannedOrderToRunParameters} from './add-unplanned-order-to-run-parameters';\n\nexport class AddUnplannedOrderToRunCommand implements Command {\n public execute(commandArgs: AddUnplannedOrderToRunParameters): CalendarItemGroup[] {\n const {unplannedPlanningOrder, run, planningOrderPosition, machine, groupedCalendarItems} = commandArgs;\n\n run.planningOrders.splice(planningOrderPosition, 0, unplannedPlanningOrder);\n run.rescheduleBasedOnPlanningOrders();\n\n const groupedCalendarItemIndex = findIndex(groupedCalendarItems, {machineId: machine.id});\n const groupedCalendarItem = groupedCalendarItems[groupedCalendarItemIndex];\n\n each(groupedCalendarItem.items as PlanningItem[], (planningItem: PlanningItem, index: number) => {\n if (isEqual(planningItem.uniqueId, run.uniqueId)) {\n groupedCalendarItem.items[index] = run;\n return false;\n }\n });\n\n new RescheduleOverlappingItemsCommand().execute({planningItem: run, groupedCalendarItem});\n\n groupedCalendarItems[groupedCalendarItemIndex] = groupedCalendarItem;\n\n return groupedCalendarItems;\n }\n}\n","import {Command} from '@application/command/command';\nimport {CalendarItemGroup} from '@domain/planning/calendar-item-group';\nimport {PlanningItem} from '@domain/planning/planning-item';\nimport {moment} from '@vdw/angular-component-library';\nimport {each, remove} from 'lodash-es';\nimport {RemovePlanningItemsOutsideDateRangeParameters} from './remove-planning-items-outside-date-range-parameters';\n\nexport class RemovePlanningItemsOutsideDateRangeCommand implements Command {\n public execute(commandArgs: RemovePlanningItemsOutsideDateRangeParameters): void {\n const {groupedCalendarItems, dateRange} = commandArgs;\n\n each(groupedCalendarItems, (groupedCalendarItem: CalendarItemGroup) => {\n remove(groupedCalendarItem.items as PlanningItem[], (planningItem: PlanningItem) => {\n return !moment.range(planningItem.startDate, planningItem.endDate).overlaps(moment.range(...dateRange));\n });\n });\n }\n}\n","import {Command} from '@application/command/command';\nimport {CalendarItemGroup} from '@domain/planning/calendar-item-group';\nimport {PlanningItem} from '@domain/planning/planning-item';\nimport {find, findIndex, forEach, isEqual, remove} from 'lodash-es';\nimport {RescheduleOverlappingItemsCommand} from '../reschedule-overlapping-items/reschedule-overlapping-items-command';\nimport {RescheduleItemsParameters} from './reschedule-items-parameters';\n\nexport class RescheduleItemsCommand implements Command {\n public execute(commandArgs: RescheduleItemsParameters): CalendarItemGroup[] {\n const {planningItem, sourceMachine, destinationGroupedCalendarItem, groupedCalendarItems} = commandArgs;\n\n const groupedCalendarItemsToBeUpdated: CalendarItemGroup[] = [destinationGroupedCalendarItem];\n\n new RescheduleOverlappingItemsCommand().execute({planningItem, groupedCalendarItem: destinationGroupedCalendarItem});\n\n const droppedOnDifferentMachine = !isEqual(destinationGroupedCalendarItem.machineId, sourceMachine.id);\n if (droppedOnDifferentMachine) {\n const sourceGroupedCalendarItem: CalendarItemGroup = find(groupedCalendarItems, {machineId: sourceMachine.id});\n remove(sourceGroupedCalendarItem.items as PlanningItem[], {uniqueId: planningItem.uniqueId});\n groupedCalendarItemsToBeUpdated.push(sourceGroupedCalendarItem);\n destinationGroupedCalendarItem.items.push(planningItem);\n } else {\n const itemIndex: number = findIndex(destinationGroupedCalendarItem.items as PlanningItem[], {uniqueId: planningItem.uniqueId});\n destinationGroupedCalendarItem.items[itemIndex] = planningItem;\n }\n\n forEach(groupedCalendarItemsToBeUpdated, (groupedCalendarItemToBeUpdated: CalendarItemGroup) => {\n forEach(groupedCalendarItems, (groupedCalendarItem: CalendarItemGroup, index: number) => {\n if (isEqual(groupedCalendarItemToBeUpdated.machineId, groupedCalendarItem.machineId)) {\n groupedCalendarItems[index] = groupedCalendarItemToBeUpdated;\n return false;\n }\n });\n });\n\n return groupedCalendarItems;\n }\n}\n","import {Command} from '@application/command/command';\nimport {CalendarItemGroup} from '@domain/planning/calendar-item-group';\nimport {PlanningItem} from '@domain/planning/planning-item';\nimport {PlanningMachineRun} from '@domain/planning/planning-machine-run';\nimport {PlanningOrder} from '@domain/planning/planning-order';\nimport {moment, TimeUtils} from '@vdw/angular-component-library';\nimport {each, findIndex, isEmpty, isEqual, isNil, remove} from 'lodash-es';\nimport {RescheduleOverlappingItemsCommand} from '../reschedule-overlapping-items/reschedule-overlapping-items-command';\nimport {ReschedulePlanningOrderParameters} from './reschedule-planning-order-parameters';\n\nexport class ReschedulePlanningOrderCommand implements Command {\n public execute(commandArgs: ReschedulePlanningOrderParameters): CalendarItemGroup[] {\n const {draggedPlanningOrder, sourceRun, destinationRun, groupedCalendarItems} = commandArgs;\n\n let {planningOrderNewPosition} = commandArgs;\n\n const isSourceRunDifferentFromDestinationRun = !isEqual(sourceRun.id, destinationRun.id);\n\n if (!isSourceRunDifferentFromDestinationRun) {\n const planningOrderInitialPosition = findIndex(destinationRun.planningOrders, {id: draggedPlanningOrder.id});\n planningOrderNewPosition = planningOrderInitialPosition < planningOrderNewPosition ? planningOrderNewPosition - 1 : planningOrderNewPosition;\n }\n\n const removedPlanningOrder = this.removePlanningOrder(sourceRun, draggedPlanningOrder);\n\n this.addPlanningOrder(destinationRun, draggedPlanningOrder, planningOrderNewPosition);\n this.rescheduleRuns(isSourceRunDifferentFromDestinationRun, sourceRun, destinationRun, removedPlanningOrder.totalRunningTimeInMs);\n\n const destinationGroupedCalendarItem: CalendarItemGroup = this.getDestinationGroupedCalendarItemAndUpdateGroupedCalendarItems(\n sourceRun,\n destinationRun,\n groupedCalendarItems,\n isSourceRunDifferentFromDestinationRun\n );\n\n new RescheduleOverlappingItemsCommand().execute({planningItem: destinationRun, groupedCalendarItem: destinationGroupedCalendarItem});\n\n return groupedCalendarItems;\n }\n\n private removePlanningOrder(run: PlanningMachineRun, draggedPlanningOrder: PlanningOrder): PlanningOrder {\n const [removedPlanningOrder] = remove(run.planningOrders, {id: draggedPlanningOrder.id});\n return removedPlanningOrder;\n }\n\n private addPlanningOrder(run: PlanningMachineRun, draggedPlanningOrder: PlanningOrder, planningOrderNewPosition: number): void {\n run.planningOrders.splice(planningOrderNewPosition, 0, draggedPlanningOrder);\n }\n\n private rescheduleRuns(isSourceRunDifferentFromDestinationRun: boolean, sourceRun: PlanningMachineRun, destinationRun: PlanningMachineRun, planningOrderTotalRunTimeInMs: number): void {\n if (isSourceRunDifferentFromDestinationRun) {\n if (!isEmpty(sourceRun.planningOrders)) {\n sourceRun.reschedule(sourceRun.startDate, moment(sourceRun.endDate).subtract(planningOrderTotalRunTimeInMs, TimeUtils.MILLISECONDS_UNIT).toDate());\n } else {\n sourceRun.reschedule(sourceRun.startDate, sourceRun.endDate);\n }\n\n destinationRun.rescheduleBasedOnPlanningOrders();\n } else {\n destinationRun.reschedule(destinationRun.startDate, destinationRun.endDate);\n }\n }\n\n private getDestinationGroupedCalendarItemAndUpdateGroupedCalendarItems(\n sourceRun: PlanningMachineRun,\n destinationRun: PlanningMachineRun,\n groupedCalendarItems: CalendarItemGroup[],\n sourceRunIsDifferentFromDestinationRun: boolean\n ): CalendarItemGroup {\n let sourceGroupedCalendarItem: CalendarItemGroup;\n let destinationGroupedCalendarItem: CalendarItemGroup;\n let alreadyUpdatedSourceAndDestinationCalendarItem = false;\n\n each(groupedCalendarItems, (groupedCalendarItem: CalendarItemGroup) => {\n each(groupedCalendarItem.items, (item: PlanningItem, index: number) => {\n if (!sourceRunIsDifferentFromDestinationRun && isEqual(item.uniqueId, destinationRun.uniqueId)) {\n groupedCalendarItem.items[index] = destinationRun;\n sourceGroupedCalendarItem = groupedCalendarItem;\n destinationGroupedCalendarItem = groupedCalendarItem;\n } else {\n if (isEqual(item.uniqueId, sourceRun.uniqueId)) {\n groupedCalendarItem.items[index] = sourceRun;\n sourceGroupedCalendarItem = groupedCalendarItem;\n } else if (isEqual(item.uniqueId, destinationRun.uniqueId)) {\n groupedCalendarItem.items[index] = destinationRun;\n destinationGroupedCalendarItem = groupedCalendarItem;\n }\n }\n\n alreadyUpdatedSourceAndDestinationCalendarItem = !isNil(sourceGroupedCalendarItem) && !isNil(destinationGroupedCalendarItem);\n\n return !alreadyUpdatedSourceAndDestinationCalendarItem;\n });\n\n return !alreadyUpdatedSourceAndDestinationCalendarItem;\n });\n\n return destinationGroupedCalendarItem;\n }\n}\n","import {Injectable} from '@angular/core';\nimport {Command} from '@application/command/command';\nimport {DialogBuilderFactoryService, DialogType, TranslateService} from '@vdw/angular-component-library';\nimport {isEmpty, join, lowerCase, size} from 'lodash-es';\nimport {ShowProductionOrderIncompatibleWithMachineAlertParameters} from './show-production-order-incompatible-with-machine-alert-parameters';\n\n@Injectable()\nexport class ShowProductionOrderIncompatibleWithMachineAlertCommand implements Command {\n public constructor(\n private readonly translate: TranslateService,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService\n ) {}\n\n public execute({error, productionOrderName, machineName}: ShowProductionOrderIncompatibleWithMachineAlertParameters): void {\n const INCOMPATIBLE_MESSAGE_KEY = 'PLANNING.ERRORS.INCOMPATIBLE_PRODUCTION_ORDER';\n const translationParams = {\n productionOrderName,\n machineName: isEmpty(machineName) ? this.translate.instant('GENERAL.NO_DATA', {object: lowerCase(this.translate.instant('GENERAL.NAME'))}) : machineName,\n amountOfCompatibleMachines: size(error.errorContext.linkedEntityNames)\n };\n\n if (!isEmpty(error.errorContext.linkedEntityNames)) {\n translationParams['compatibleMachinesList'] = join(error.errorContext.linkedEntityNames, ', ');\n }\n\n this.dialogBuilderFactoryService.getBuilder().openAlertDialog({\n titleText: this.translate.instant('PLANNING.ERRORS.INCOMPATIBLE_ENTITY', {entity: lowerCase(this.translate.instant('PRODUCTION_ORDER.PRODUCTION_ORDER', {count: 1}))}),\n messageText: this.translate.instant(INCOMPATIBLE_MESSAGE_KEY, translationParams),\n type: DialogType.INFORMATION\n });\n }\n}\n","import {Inject, Injectable} from '@angular/core';\nimport {Command} from '@application/command/command';\nimport {BackendErrorCodeEnum} from '@application/helper/backend-error-code.enum';\nimport {BackendErrorContext} from '@application/helper/backend-error-context';\nimport {DateRange} from '@domain/date-range';\nimport {CalendarItem} from '@domain/planning/calendar-item';\nimport {CalendarItemGroup} from '@domain/planning/calendar-item-group';\nimport {PlanningItem} from '@domain/planning/planning-item';\nimport {PlanningMachine} from '@domain/planning/planning-machine';\nimport {PlanningMachineRun} from '@domain/planning/planning-machine-run';\nimport {PlanningOrder} from '@domain/planning/planning-order';\nimport {Planning, PLANNING} from '@infrastructure/http/planning/planning';\nimport {ProductionOrdersWeaving, PRODUCTION_ORDERS_WEAVING} from '@infrastructure/http/production-order-weaving/production-orders-weaving';\nimport {ProductionOrders, PRODUCTION_ORDERS} from '@infrastructure/http/production-order/production-orders';\nimport {HttpTuftProductionOrdersService} from '@infrastructure/http/tuft-production-order/http-tuft-production-orders.service';\nimport {BackendError, DialogBuilderFactoryService, DialogOptions, DialogType, moment, TimeUtils, TranslateService} from '@vdw/angular-component-library';\nimport {cloneDeep, each, find, first, isEmpty, isEqual, isNil, join, lowerCase, noop, pull, remove, size} from 'lodash-es';\nimport {BehaviorSubject, Observable, Subscription} from 'rxjs';\nimport {finalize} from 'rxjs/operators';\nimport {ShowProductionOrderIncompatibleWithMachineAlertCommand} from '../show-production-order-incompatible-with-machine-alert/show-production-order-incompatible-with-machine-alert-command';\nimport {AddNewPlanningItemCommand} from './add-new-planning-item/add-new-planning-item-command';\nimport {AddNewPlanningItemParameters} from './add-new-planning-item/add-new-planning-item-parameters';\nimport {AddPlannedOrderToNewRunCommand} from './add-planned-order-to-new-run/add-planned-order-to-new-run-command';\nimport {AddPlannedPlanningOrderToNewRunParameters} from './add-planned-order-to-new-run/add-planned-order-to-new-run-parameters';\nimport {AddUnplannedOrderToNewRunCommand} from './add-unplanned-order-to-new-run/add-unplanned-order-to-new-run-command';\nimport {AddUnplannedOrderToNewRunParameters} from './add-unplanned-order-to-new-run/add-unplanned-order-to-new-run-parameters';\nimport {AddUnplannedOrderToRunCommand} from './add-unplanned-order-to-run/add-unplanned-order-to-run-command';\nimport {AddUnplannedOrderToRunParameters} from './add-unplanned-order-to-run/add-unplanned-order-to-run-parameters';\nimport {PlanningScheduler} from './planning-scheduler';\nimport {RemovePlanningItemsOutsideDateRangeCommand} from './remove-planning-items-outside-date-range/remove-planning-items-outside-date-range-command';\nimport {RemovePlanningOrderCommand} from './remove-planning-order/remove-planning-order-command';\nimport {RemovePlanningOrderParameters} from './remove-planning-order/remove-planning-order-parameters';\nimport {RescheduleItemsCommand} from './reschedule-items/reschedule-items-command';\nimport {RescheduleItemsParameters} from './reschedule-items/reschedule-items-parameters';\nimport {ReschedulePlanningOrderCommand} from './reschedule-planning-order/reschedule-planning-order-command';\nimport {ReschedulePlanningOrderParameters} from './reschedule-planning-order/reschedule-planning-order-parameters';\n\nenum PlanningAction {\n GET_PLANNING,\n RESCHEDULE_ITEMS,\n RESCHEDULE_PLANNING_ORDER,\n ADD_NEW_PLANNING_ITEM,\n REMOVE_PLANNING_ORDER,\n ADD_UNPLANNED_PLANNING_ORDER_TO_RUN,\n ADD_UNPLANNED_PLANNING_ORDER_TO_NEW_RUN,\n ADD_PLANNED_PLANNING_ORDER_TO_NEW_RUN\n}\n\ninterface QueuedPlanningAction {\n isProcessing: boolean;\n action: PlanningAction;\n parameters: any;\n onSuccess: () => void;\n onError: () => void;\n}\n\n@Injectable()\nexport class PlanningSchedulerService implements PlanningScheduler {\n private queuedPlanningActions: QueuedPlanningAction[] = [];\n private definedPlanningActions: Map void, onError: () => void) => void>;\n private planningChangesSubject: BehaviorSubject = new BehaviorSubject([]);\n private selectedDateRange: DateRange;\n private groupedCalendarItems: CalendarItemGroup[] = [];\n private getPlanningSubscription: Subscription;\n\n private readonly rescheduleItemsCommand = new RescheduleItemsCommand();\n private readonly reschedulePlanningOrderCommand = new ReschedulePlanningOrderCommand();\n private readonly addNewPlanningItemCommand = new AddNewPlanningItemCommand();\n private readonly removePlanningOrderCommand = new RemovePlanningOrderCommand();\n private readonly removePlanningItemsOutsideDateRangeCommand = new RemovePlanningItemsOutsideDateRangeCommand();\n private readonly addUnplannedOrderToRunCommand = new AddUnplannedOrderToRunCommand();\n private readonly addUnplannedOrderToNewRunCommand = new AddUnplannedOrderToNewRunCommand();\n private readonly addPlannedOrderToNewRunCommand = new AddPlannedOrderToNewRunCommand();\n\n private readonly generalErrorTranslationKey = 'GENERAL.ERRORS.SOMETHING_WRONG';\n private readonly updatePlanningErrorTranslationKey = 'PLANNING.ERRORS.UPDATE_PLANNING';\n\n public isUpdating = false;\n\n public constructor(\n @Inject(PLANNING) private readonly planning: Planning,\n @Inject(PRODUCTION_ORDERS) private readonly productionOrders: ProductionOrders,\n @Inject(PRODUCTION_ORDERS_WEAVING) private readonly productionOrdersWeaving: ProductionOrdersWeaving,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n private readonly translate: TranslateService,\n private readonly showProductionOrderIncompatibleWithMachineAlertCommand: ShowProductionOrderIncompatibleWithMachineAlertCommand,\n private readonly productionOrdersTufting: HttpTuftProductionOrdersService\n ) {\n this.initializePlanningActions();\n }\n\n public onPlanningChanges(): Observable {\n return this.planningChangesSubject;\n }\n\n public getPlanning(selectedDateRange: DateRange, onSuccess: () => void = noop): void {\n this.selectedDateRange = selectedDateRange;\n\n if (!isNil(this.getPlanningSubscription)) {\n this.getPlanningSubscription.unsubscribe();\n }\n remove(this.queuedPlanningActions, {action: PlanningAction.GET_PLANNING});\n\n this.queuedPlanningActions.push({\n isProcessing: false,\n action: PlanningAction.GET_PLANNING,\n parameters: this.selectedDateRange,\n onSuccess,\n onError: noop\n });\n\n this.processFirstItemInQueuedPlanningActions();\n }\n\n public rescheduleItems(planningItem: PlanningItem, sourceMachine: PlanningMachine, destinationGroupedCalendarItem: CalendarItemGroup, destinationMachine: PlanningMachine): void {\n this.queuedPlanningActions.push({\n isProcessing: false,\n action: PlanningAction.RESCHEDULE_ITEMS,\n parameters: {planningItem, sourceMachine, destinationGroupedCalendarItem, destinationMachine} as RescheduleItemsParameters,\n onSuccess: () => (this.isUpdating = false),\n onError: this.showAlertDialogForUpdatePlanningError()\n });\n\n this.processFirstItemInQueuedPlanningActions();\n }\n\n public reschedulePlanningOrder(\n draggedPlanningOrder: PlanningOrder,\n sourceRun: PlanningMachineRun,\n destinationRun: PlanningMachineRun,\n planningOrderNewPosition: number,\n destinationMachine: PlanningMachine,\n sourceMachineId: number\n ): void {\n this.queuedPlanningActions.push({\n isProcessing: false,\n action: PlanningAction.RESCHEDULE_PLANNING_ORDER,\n parameters: {draggedPlanningOrder, sourceRun, destinationRun, planningOrderNewPosition, destinationMachine, sourceMachineId} as ReschedulePlanningOrderParameters,\n onSuccess: () => (this.isUpdating = false),\n onError: this.showAlertDialogForUpdatePlanningError()\n });\n\n this.processFirstItemInQueuedPlanningActions();\n }\n\n public addNewPlanningItem(newPlanningItem: PlanningItem, destinationGroupedCalendarItem: CalendarItemGroup): void {\n this.queuedPlanningActions.push({\n isProcessing: false,\n action: PlanningAction.ADD_NEW_PLANNING_ITEM,\n parameters: {newPlanningItem, destinationGroupedCalendarItem} as AddNewPlanningItemParameters,\n onSuccess: () => (this.isUpdating = false),\n onError: this.showAlertDialogForUpdatePlanningError()\n });\n\n this.processFirstItemInQueuedPlanningActions();\n }\n\n public resetPlanning(): void {\n this.planningChangesSubject.next(cloneDeep(this.groupedCalendarItems));\n }\n\n public getCachedGroupedCalendarItem(machineId: number): CalendarItemGroup {\n return cloneDeep(find(this.groupedCalendarItems, {machineId}));\n }\n\n public setGroupedCalendarItems(groupedCalendarItems: CalendarItemGroup[]): void {\n this.groupedCalendarItems = cloneDeep(groupedCalendarItems);\n }\n\n public addUnplannedPlanningOrderToRun(unplannedPlanningOrder: PlanningOrder, run: PlanningMachineRun, planningOrderPosition: number, machine: PlanningMachine, onSuccess: () => void): void {\n this.queuedPlanningActions.push({\n isProcessing: false,\n action: PlanningAction.ADD_UNPLANNED_PLANNING_ORDER_TO_RUN,\n parameters: {unplannedPlanningOrder, run, planningOrderPosition, machine} as AddUnplannedOrderToRunParameters,\n onSuccess: () => {\n this.isUpdating = false;\n return onSuccess();\n },\n onError: this.showAlertDialogForUpdatePlanningError()\n });\n\n this.processFirstItemInQueuedPlanningActions();\n }\n\n public addUnplannedPlanningOrderToNewRun(unplannedPlanningOrder: PlanningOrder, machine: PlanningMachine, onSuccess: () => void): void {\n this.queuedPlanningActions.push({\n isProcessing: false,\n action: PlanningAction.ADD_UNPLANNED_PLANNING_ORDER_TO_NEW_RUN,\n parameters: {unplannedPlanningOrder, machine} as AddUnplannedOrderToNewRunParameters,\n onSuccess: () => {\n this.isUpdating = false;\n return onSuccess();\n },\n onError: this.showAlertDialogForUpdatePlanningError()\n });\n\n this.processFirstItemInQueuedPlanningActions();\n }\n\n public addPlannedPlanningOrderToNewRun(plannedPlanningOrder: PlanningOrder, sourceRun: PlanningMachineRun, sourceMachineId: number, destinationMachine: PlanningMachine): void {\n this.queuedPlanningActions.push({\n isProcessing: false,\n action: PlanningAction.ADD_PLANNED_PLANNING_ORDER_TO_NEW_RUN,\n parameters: {plannedPlanningOrder, sourceRun, sourceMachineId, destinationMachine} as AddPlannedPlanningOrderToNewRunParameters,\n onSuccess: () => (this.isUpdating = false),\n onError: this.showAlertDialogForUpdatePlanningError()\n });\n\n this.processFirstItemInQueuedPlanningActions();\n }\n\n private processFirstItemInQueuedPlanningActions(): void {\n const firstItemInQueue: QueuedPlanningAction = first(this.queuedPlanningActions);\n\n if (!isNil(firstItemInQueue) && !firstItemInQueue.isProcessing) {\n firstItemInQueue.isProcessing = true;\n const {action, parameters, onSuccess, onError} = firstItemInQueue;\n\n this.definedPlanningActions.get(action)(parameters, onSuccess, onError);\n }\n }\n\n private cleanUpAndHandleNextItemInQueue(): void {\n pull(this.queuedPlanningActions, find(this.queuedPlanningActions, {isProcessing: true}));\n\n this.processFirstItemInQueuedPlanningActions();\n }\n\n private getGroupedCalendarItemsToPatch(groupedCalendarItems: CalendarItemGroup[], newGroupedCalendarItems: CalendarItemGroup[]): CalendarItemGroup[] {\n const groupedCalendarItemsToPatch = [];\n each(newGroupedCalendarItems, (calendarItemGroup: CalendarItemGroup, groupIndex: number) => {\n if (!isEqual(calendarItemGroup.items, groupedCalendarItems[groupIndex].items)) {\n groupedCalendarItemsToPatch.push(new CalendarItemGroup(calendarItemGroup.machineId, []));\n each(calendarItemGroup.items, (item: CalendarItem, itemIndex: number) => {\n if (!isEqual(item, groupedCalendarItems[groupIndex].items[itemIndex])) {\n groupedCalendarItemsToPatch[size(groupedCalendarItemsToPatch) - 1].items.push(item);\n }\n });\n }\n });\n return groupedCalendarItemsToPatch;\n }\n\n private showAlertDialog(options: DialogOptions): void {\n this.dialogBuilderFactoryService.getBuilder().openAlertDialog(options);\n }\n\n private initializePlanningActions(): void {\n this.definedPlanningActions = new Map void, onError: () => void) => void>([\n [\n PlanningAction.GET_PLANNING,\n (parameters: DateRange, onSuccess: () => void): void => {\n this.getPlanningSubscription = this.planning.getGroupedRunsForPeriod(parameters).subscribe((groupedCalendarItems: CalendarItemGroup[]) => {\n this.groupedCalendarItems = groupedCalendarItems;\n this.planningChangesSubject.next(cloneDeep(groupedCalendarItems));\n\n onSuccess();\n this.cleanUpAndHandleNextItemInQueue();\n });\n }\n ],\n [\n PlanningAction.RESCHEDULE_ITEMS,\n (parameters: RescheduleItemsParameters, onSuccess: () => void, onError: () => void): void => {\n this.isUpdating = true;\n const {planningItem, sourceMachine, destinationMachine} = parameters;\n\n if (planningItem instanceof PlanningMachineRun && !isEqual(sourceMachine.id, destinationMachine.id)) {\n const originalParameters = cloneDeep(parameters);\n const groupedCalendarItems = this.executeCommand(this.rescheduleItemsCommand, parameters);\n this.removePlanningItemsOutsideDateRangeAndEmitPlanningChanges(groupedCalendarItems);\n\n this.checkRunCompatibilityWithMachine(originalParameters, onSuccess, onError);\n } else {\n this.executeCommandAndUpdateGroupedCalendarItems(this.rescheduleItemsCommand, parameters, onSuccess, onError);\n }\n }\n ],\n [\n PlanningAction.RESCHEDULE_PLANNING_ORDER,\n (parameters: ReschedulePlanningOrderParameters, onSuccess: () => void, onError: () => void): void => {\n this.isUpdating = true;\n const {destinationMachine, sourceMachineId} = parameters;\n\n if (isEqual(destinationMachine.id, sourceMachineId)) {\n this.executeCommandAndUpdateGroupedCalendarItems(this.reschedulePlanningOrderCommand, parameters, onSuccess, onError);\n } else {\n const originalParameters = cloneDeep(parameters);\n const groupedCalendarItems = this.executeCommand(this.reschedulePlanningOrderCommand, parameters);\n\n this.removePlanningItemsOutsideDateRangeAndEmitPlanningChanges(groupedCalendarItems);\n\n this.checkProductionOrderCompatibilityWithMachine(\n parameters.draggedPlanningOrder,\n destinationMachine,\n (planningOrder: PlanningOrder): CalendarItemGroup[] => {\n originalParameters.draggedPlanningOrder = planningOrder;\n return this.executeCommand(this.reschedulePlanningOrderCommand, originalParameters);\n },\n onSuccess,\n onError\n );\n }\n }\n ],\n [\n PlanningAction.ADD_NEW_PLANNING_ITEM,\n (parameters: AddNewPlanningItemParameters, onSuccess: () => void, onError: () => void): void => {\n this.isUpdating = true;\n return this.executeCommandAndUpdateGroupedCalendarItems(this.addNewPlanningItemCommand, parameters, onSuccess, onError);\n }\n ],\n [\n PlanningAction.REMOVE_PLANNING_ORDER,\n (parameters: RemovePlanningOrderParameters, onSuccess: () => void, onError: () => void): void => {\n this.isUpdating = true;\n this.executeCommandAndUpdateGroupedCalendarItems(this.removePlanningOrderCommand, parameters, onSuccess, onError);\n }\n ],\n [\n PlanningAction.ADD_UNPLANNED_PLANNING_ORDER_TO_RUN,\n (parameters: AddUnplannedOrderToRunParameters, onSuccess: () => void, onError: () => void): void => {\n this.isUpdating = true;\n const originalParameters = cloneDeep(parameters);\n const groupedCalendarItems = this.executeCommand(this.addUnplannedOrderToRunCommand, parameters);\n const {unplannedPlanningOrder, machine} = parameters;\n\n this.removePlanningItemsOutsideDateRangeAndEmitPlanningChanges(groupedCalendarItems);\n\n this.checkProductionOrderCompatibilityWithMachine(\n unplannedPlanningOrder,\n machine,\n (planningOrder: PlanningOrder): CalendarItemGroup[] => {\n originalParameters.unplannedPlanningOrder = planningOrder;\n\n return this.executeCommand(this.addUnplannedOrderToRunCommand, originalParameters);\n },\n onSuccess,\n onError\n );\n }\n ],\n [\n PlanningAction.ADD_UNPLANNED_PLANNING_ORDER_TO_NEW_RUN,\n (parameters: AddUnplannedOrderToNewRunParameters, onSuccess: () => void, onError: () => void): void => {\n this.isUpdating = true;\n const originalParameters = cloneDeep(parameters);\n const groupedCalendarItems = this.executeCommand(this.addUnplannedOrderToNewRunCommand, parameters);\n const {unplannedPlanningOrder, machine} = parameters;\n\n this.removePlanningItemsOutsideDateRangeAndEmitPlanningChanges(groupedCalendarItems);\n\n this.checkProductionOrderCompatibilityWithMachine(\n unplannedPlanningOrder,\n machine,\n (planningOrder: PlanningOrder): CalendarItemGroup[] => {\n originalParameters.unplannedPlanningOrder = planningOrder;\n return this.executeCommand(this.addUnplannedOrderToNewRunCommand, originalParameters);\n },\n onSuccess,\n onError\n );\n }\n ],\n [\n PlanningAction.ADD_PLANNED_PLANNING_ORDER_TO_NEW_RUN,\n (parameters: AddPlannedPlanningOrderToNewRunParameters, onSuccess: () => void, onError: () => void): void => {\n this.isUpdating = true;\n const {sourceMachineId, destinationMachine} = parameters;\n\n if (isEqual(sourceMachineId, destinationMachine.id)) {\n this.executeCommandAndUpdateGroupedCalendarItems(this.addPlannedOrderToNewRunCommand, parameters, onSuccess, onError);\n } else {\n const originalParameters = cloneDeep(parameters);\n const groupedCalendarItems = this.executeCommand(this.addPlannedOrderToNewRunCommand, parameters);\n\n this.removePlanningItemsOutsideDateRangeAndEmitPlanningChanges(groupedCalendarItems);\n\n this.checkProductionOrderCompatibilityWithMachine(\n parameters.plannedPlanningOrder,\n destinationMachine,\n (planningOrder: PlanningOrder) => {\n originalParameters.plannedPlanningOrder = planningOrder;\n return this.executeCommand(this.addPlannedOrderToNewRunCommand, originalParameters);\n },\n onSuccess,\n onError\n );\n }\n }\n ]\n ]);\n }\n\n private executeCommand(command: Command, parameters: T): U {\n parameters['groupedCalendarItems'] = cloneDeep(this.groupedCalendarItems);\n\n return command.execute(parameters);\n }\n\n private executeCommandAndUpdateGroupedCalendarItems(command: Command, parameters: T, onSuccess: () => void, onError: () => void): void {\n const groupedCalendarItems = this.executeCommand(command, parameters);\n\n const groupedCalendarItemsToPatch = this.getGroupedCalendarItemsToPatch(this.groupedCalendarItems, groupedCalendarItems);\n\n if (!isEmpty(groupedCalendarItemsToPatch)) {\n this.removePlanningItemsOutsideDateRangeAndEmitPlanningChanges(groupedCalendarItems);\n this.updateGroupedCalendarItems(groupedCalendarItemsToPatch, onSuccess, onError);\n } else {\n this.cleanUpAndHandleNextItemInQueue();\n }\n }\n\n private updateGroupedCalendarItems(groupedCalendarItems: CalendarItemGroup[], onSuccess: () => void, onError: () => void): void {\n this.planning\n .updateGroupedItems(groupedCalendarItems)\n .pipe(finalize(() => this.cleanUpAndHandleNextItemInQueue()))\n .subscribe({\n next: () => onSuccess(),\n error: () => {\n this.resetPlanning();\n onError();\n }\n });\n }\n\n private checkProductionOrderCompatibilityWithMachine(\n planningOrder: PlanningOrder,\n machine: PlanningMachine,\n executeCommand: (planningOrder: PlanningOrder) => CalendarItemGroup[],\n onSuccess: () => void,\n onError: () => void\n ): void {\n let checkCompatibilityWithMachineResult: Observable;\n if (planningOrder.isCarpetOrder) {\n checkCompatibilityWithMachineResult = this.productionOrders.checkCompatibilityWithMachine(planningOrder.productionOrder.id, machine.id);\n } else if (planningOrder.isWeavingOrder) {\n checkCompatibilityWithMachineResult = this.productionOrdersWeaving.checkCompatibilityWithMachine(planningOrder.productionOrder.id, machine.id);\n } else if (planningOrder.isTuftingOrder) {\n checkCompatibilityWithMachineResult = this.productionOrdersTufting.checkCompatibilityWithMachine(planningOrder.productionOrder.id, machine.id);\n }\n\n checkCompatibilityWithMachineResult?.subscribe({\n next: (durationInMilliseconds: number) => {\n planningOrder.endDate = moment(planningOrder.startDate).add(durationInMilliseconds, TimeUtils.MILLISECONDS_UNIT).toDate();\n\n const groupedCalendarItems = executeCommand(planningOrder);\n const groupedCalendarItemsToPatch = this.getGroupedCalendarItemsToPatch(this.groupedCalendarItems, groupedCalendarItems);\n\n this.removePlanningItemsOutsideDateRangeAndEmitPlanningChanges(groupedCalendarItems);\n this.updateGroupedCalendarItems(groupedCalendarItemsToPatch, onSuccess, onError);\n },\n error: (error: BackendError) => {\n const errorCode = error.errorContext?.errorCode as string;\n if (BackendErrorCodeEnum[errorCode] === BackendErrorCodeEnum.LINKED_ENTITIES) {\n this.isUpdating = false;\n this.showProductionOrderIncompatibleWithMachineAlertCommand.execute({\n error,\n productionOrderName: planningOrder.productionOrder.name,\n machineName: machine.name\n });\n } else {\n this.showAlertDialog({titleText: this.generalErrorTranslationKey, messageText: this.updatePlanningErrorTranslationKey, type: DialogType.ERROR});\n }\n\n this.resetPlanning();\n this.cleanUpAndHandleNextItemInQueue();\n }\n });\n }\n\n private showAlertDialogForUpdatePlanningError(): () => void {\n return (): void => this.showAlertDialog({titleText: this.generalErrorTranslationKey, messageText: this.updatePlanningErrorTranslationKey, type: DialogType.ERROR});\n }\n\n private checkRunCompatibilityWithMachine(parameters: RescheduleItemsParameters, onSuccess: () => void, onError: () => void): void {\n const {destinationMachine} = parameters;\n const run = parameters.planningItem as PlanningMachineRun;\n\n this.planning.checkRunCompatibilityWithMachine(run.id, destinationMachine.id).subscribe({\n next: (runDurationInMilliseconds: number) => {\n run.updateDuration(runDurationInMilliseconds);\n parameters.planningItem = run;\n\n const groupedCalendarItems = this.executeCommand(this.rescheduleItemsCommand, parameters);\n const groupedCalendarItemsToPatch = this.getGroupedCalendarItemsToPatch(this.groupedCalendarItems, groupedCalendarItems);\n\n this.removePlanningItemsOutsideDateRangeAndEmitPlanningChanges(groupedCalendarItems);\n this.updateGroupedCalendarItems(groupedCalendarItemsToPatch, onSuccess, onError);\n },\n error: (error: BackendError) => {\n if (isEqual(BackendErrorCodeEnum[(error.errorContext as BackendErrorContext).errorCode], BackendErrorCodeEnum.LINKED_ENTITIES)) {\n this.showAlertDialog({\n titleText: this.translate.instant('PLANNING.ERRORS.INCOMPATIBLE_ENTITY', {entity: lowerCase(this.translate.instant('PLANNING.ADD_ITEM.TYPES.RUN'))}),\n messageText: this.translate.instant('PLANNING.ERRORS.INCOMPATIBLE_RUN', {\n machineName: this.getMachineNameForCompatibilityAlertDialog(destinationMachine.name),\n compatibleMachinesList: join(error.errorContext.linkedEntityNames, ', ')\n }),\n type: DialogType.INFORMATION\n });\n this.isUpdating = false;\n } else {\n this.showAlertDialog({\n titleText: this.generalErrorTranslationKey,\n messageText: this.updatePlanningErrorTranslationKey,\n type: DialogType.ERROR\n });\n }\n\n this.resetPlanning();\n this.cleanUpAndHandleNextItemInQueue();\n }\n });\n }\n\n private getMachineNameForCompatibilityAlertDialog(machineName: string): string {\n return isEmpty(machineName) ? this.translate.instant('GENERAL.NO_DATA', {object: lowerCase(this.translate.instant('GENERAL.NAME'))}) : machineName;\n }\n\n private removePlanningItemsOutsideDateRangeAndEmitPlanningChanges(groupedCalendarItems: CalendarItemGroup[]): void {\n const updatedGroupedCalendarItems = cloneDeep(groupedCalendarItems);\n\n this.removePlanningItemsOutsideDateRangeCommand.execute({groupedCalendarItems: updatedGroupedCalendarItems, dateRange: this.selectedDateRange});\n this.planningChangesSubject.next(updatedGroupedCalendarItems);\n }\n}\n","
\n
\n \n
\n \n

\n \n
\n
\n \n\n \n \n \n \n \n\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, Inject, Input, OnChanges, OnInit, Output} from '@angular/core';\nimport {Router} from '@angular/router';\nimport {componentEnterLeaveAnimation} from '@application/animations/component-enter-leave.animation';\nimport {NavigationHelperService} from '@application/helper/navigation-helper/navigation-helper.service';\nimport {RouteUtils} from '@application/helper/routing/route-utils';\nimport {MachineMessagesGroup} from '@domain/machine/machine-messages-group.interface';\nimport {MachineType} from '@domain/machine/machine-type.enum';\nimport {PlanningMachine} from '@domain/planning/planning-machine';\nimport {Permission} from '@domain/profile/permission.enum';\nimport {Subscription} from '@domain/profile/subscription';\nimport {IPageInfo} from '@iharbeck/ngx-virtual-scroller';\nimport {AUTHENTICATION, Authentication} from '@infrastructure/http/authentication/authentication';\nimport {MachineDetails} from '@infrastructure/http/planning/machine-details';\nimport {Planning, PLANNING} from '@infrastructure/http/planning/planning';\nimport {AssertionUtils, BaseComponent, Message} from '@vdw/angular-component-library';\nimport {concat, each, first, isEmpty, size, slice} from 'lodash-es';\nimport {takeUntil} from 'rxjs/operators';\nimport {PlanningSidebarData} from '../../planning-sidebar-data.interface';\nimport {PlanningSidebarType} from '../planning-sidebar-type.enum';\n\n@Component({\n selector: 'app-machine-detail-sidebar',\n templateUrl: './machine-detail-sidebar.component.html',\n styleUrls: ['./machine-detail-sidebar.component.scss'],\n animations: [componentEnterLeaveAnimation()]\n})\nexport class MachineDetailSidebarComponent extends BaseComponent implements OnInit, OnChanges {\n @Input() public machine: PlanningMachine;\n @Output() public machineDetailSidebarClose: EventEmitter = new EventEmitter();\n public messagesGroups: MachineMessagesGroup[];\n private messages: Message[];\n private readonly SLICE_LENGTH = 20;\n private hasMoreMessages = true;\n private currentSubscription: Subscription;\n\n public constructor(\n @Inject(PLANNING) private readonly planning: Planning,\n @Inject(AUTHENTICATION) private readonly authentication: Authentication,\n private readonly router: Router,\n private readonly navigationHelperService: NavigationHelperService\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this.currentSubscription = this.authentication.getCurrentSubscription();\n }\n\n public ngOnChanges(): void {\n if (!AssertionUtils.isNullOrUndefined(this.machine)) {\n this.getMachineDetails();\n if (this.hasMessages()) {\n this.getMessages(0);\n this.groupMessagesByChronologicalOrderAndType();\n }\n }\n }\n\n public onNavigationHelperDestroy(): void {\n this.navigationHelperService.savePartialState({\n sidebarType: PlanningSidebarType.MACHINE,\n sidebarPlanningMachine: this.machine\n });\n }\n\n public closeMachineDetail(): void {\n this.machineDetailSidebarClose.emit();\n }\n\n public getIconNameForMachineType(): string {\n return MachineType.getIconNameForMachineType(this.machine.machineType);\n }\n\n public isMachineDefined(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.machine);\n }\n\n public getMachineTypeLabelForTranslate(): string {\n return `MACHINE.TYPES.${MachineType[this.machine.machineType]}`;\n }\n\n public isMachineOfTypeCarpetLoom(): boolean {\n return [MachineType.CARPET_LOOM, MachineType.CARPET_LOOM_NO_JQ, MachineType.VELVET, MachineType.VELVET_NO_JQ].includes(this.machine.machineType);\n }\n\n public isMachineOfTypeWeavingMachine(): boolean {\n return this.machine.machineType === MachineType.WEAVING_MACHINE;\n }\n\n public isMachineOfTypeTuftingMachine(): boolean {\n return this.machine.machineType === MachineType.TUFT;\n }\n\n public hasMessages(): boolean {\n return !isEmpty(this.machine.messages);\n }\n\n public onVirtualScrollerEndEvent(event: IPageInfo): void {\n const isAtEndOfList = event.endIndex === size(this.messagesGroups) - 1;\n const mightHaveMoreMessages = this.messages.length % this.SLICE_LENGTH === 0;\n\n if (isAtEndOfList && mightHaveMoreMessages && this.hasMoreMessages) {\n this.getMessages(size(this.messages));\n this.groupMessagesByChronologicalOrderAndType();\n }\n }\n\n public createProductionOrderForMachine(): void {\n let url: string;\n if (this.isMachineOfTypeCarpetLoom()) {\n url = RouteUtils.paths.texFab.productionOrder.addProductionOrderForMachine.absolutePath;\n } else if (this.isMachineOfTypeWeavingMachine()) {\n url = RouteUtils.paths.texFab.weaving.addProductionOrderForMachine.absolutePath;\n } else if (this.isMachineOfTypeTuftingMachine()) {\n url = RouteUtils.paths.texFab.tufting.addProductionOrderForMachine.absolutePath;\n } else {\n return;\n }\n this.router.navigate([url.replace(':id', this.machine.id.toString())]);\n }\n\n public canShowCreateProductionOrderForMachineButton(): boolean {\n let permission: Permission;\n if (this.isMachineOfTypeCarpetLoom()) {\n return true;\n } else if (this.isMachineOfTypeWeavingMachine()) {\n permission = Permission.TEXFAB_WEAVE_QUEUE;\n } else if (this.isMachineOfTypeTuftingMachine()) {\n permission = Permission.TEXFAB_TUFT_QUEUE;\n } else {\n return false;\n }\n\n return this.currentSubscription?.hasPermission(permission);\n }\n\n private getMessages(startIndex: number): void {\n const messages = slice(this.machine.messages, startIndex, startIndex + this.SLICE_LENGTH);\n this.hasMoreMessages = !isEmpty(messages);\n this.messages = startIndex === 0 ? messages : concat(this.messages, messages);\n }\n\n private groupMessagesByChronologicalOrderAndType(): void {\n this.messagesGroups = [];\n\n if (!isEmpty(this.messages)) {\n let groupOfMessages: MachineMessagesGroup = {messageType: first(this.messages).type, messages: []};\n\n each(this.messages, (message: Message) => {\n if (groupOfMessages.messageType !== message.type) {\n this.messagesGroups.push(groupOfMessages);\n\n groupOfMessages = {messageType: message.type, messages: [message]};\n } else {\n groupOfMessages.messages.push(message);\n }\n });\n\n this.messagesGroups.push(groupOfMessages);\n }\n }\n\n private getMachineDetails(): void {\n this.planning\n .getMachineDetails(this.machine.id)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((machineDetails: MachineDetails) => {\n this.machine.activeCreel = machineDetails.creel;\n this.machine.activeQuality = machineDetails.machineQuality;\n this.machine.activeWeaveProduct = machineDetails.weaveProduct;\n this.machine.activeTuftProduct = machineDetails.tuftProduct;\n });\n }\n}\n","import {Component, EventEmitter, Inject, Input, Output} from '@angular/core';\nimport {Router} from '@angular/router';\nimport {RouteUtils} from '@application/helper/routing/route-utils';\nimport {PlanningMachineCarpetRun} from '@domain/planning/carpet/planning-machine-carpet-run';\nimport {PlanningItem} from '@domain/planning/planning-item';\nimport {PlanningMachine} from '@domain/planning/planning-machine';\nimport {PlanningMachineRun} from '@domain/planning/planning-machine-run';\nimport {PlanningOrder} from '@domain/planning/planning-order';\nimport {PlanningMachineTuftingRun} from '@domain/planning/tufting/planning-machine-tufting-run';\nimport {PlanningMachineWeavingRun} from '@domain/planning/weaving/planning-machine-weaving-run';\nimport {Permission} from '@domain/profile/permission.enum';\nimport {AUTHENTICATION, Authentication} from '@infrastructure/http/authentication/authentication';\nimport {BaseComponent} from '@vdw/angular-component-library';\n\n@Component({\n template: ``\n})\nexport abstract class BasePlanningItemComponent extends BaseComponent {\n @Input() public machine: PlanningMachine;\n @Output() public deletePlanningItem: EventEmitter = new EventEmitter();\n @Output() public closePlanningItem: EventEmitter = new EventEmitter();\n @Output() public selectPlanningOrder: EventEmitter = new EventEmitter();\n\n private readonly router: Router;\n private readonly PATH_TO_ADD_PRODUCTION_ORDER_FOR_RUN = RouteUtils.paths.texFab.productionOrder.addProductionOrderForRun.absolutePath;\n private readonly PATH_TO_ADD_PRODUCTION_ORDER_NEW_VIEW_FOR_RUN = RouteUtils.paths.texFab.productionOrder.addProductionOrderNewViewForRun.absolutePath;\n private _planningItem: PlanningItem;\n\n protected previousPlanningItem: PlanningItem;\n protected planningItemSelected = new EventEmitter();\n\n @Input() public set planningItem(value: PlanningItem) {\n this._planningItem = value;\n this.planningItemSelected.emit(value);\n\n this.previousPlanningItem = this._planningItem;\n }\n\n public get planningItem(): PlanningItem {\n return this._planningItem;\n }\n\n public constructor(\n @Inject(AUTHENTICATION) protected readonly authentication: Authentication,\n router: Router\n ) {\n super();\n this.router = router;\n }\n\n public isPlanningItemOfTypeRun(): boolean {\n return this.planningItem instanceof PlanningMachineRun;\n }\n\n public isPlanningItemCarpetRun(): boolean {\n return this.planningItem instanceof PlanningMachineCarpetRun;\n }\n\n public isPlanningItemWeavingRun(): boolean {\n return this.planningItem instanceof PlanningMachineWeavingRun;\n }\n\n public isPlanningItemTuftingRun(): boolean {\n return this.planningItem instanceof PlanningMachineTuftingRun;\n }\n\n public delete(): void {\n this.deletePlanningItem.emit();\n }\n\n public close(): void {\n this.closePlanningItem.emit();\n }\n\n public createProductionOrderForRun(): void {\n const planningItem = this.planningItem as PlanningMachineRun;\n if (planningItem instanceof PlanningMachineCarpetRun) {\n this.router.navigate([this.hasPermissionToNavigateToNewBuilder() ? this.PATH_TO_ADD_PRODUCTION_ORDER_NEW_VIEW_FOR_RUN : this.PATH_TO_ADD_PRODUCTION_ORDER_FOR_RUN], {\n state: {\n runId: planningItem.id,\n machineQualityId: planningItem.machineQuality.id,\n creelId: planningItem.creel.id,\n machineId: this.machine.id,\n startRoute: RouteUtils.paths.texFab.planning.absolutePath\n }\n });\n } else if (planningItem instanceof PlanningMachineWeavingRun) {\n this.router.navigate([RouteUtils.paths.texFab.weaving.addProductionOrderForRun.absolutePath], {\n state: {\n runId: planningItem.id,\n machineId: this.machine.id,\n weaveProductId: planningItem.weaveProduct.id\n }\n });\n } else if (planningItem instanceof PlanningMachineTuftingRun) {\n this.router.navigate([RouteUtils.paths.texFab.tufting.addProductionOrderForRun.absolutePath], {\n state: {\n runId: planningItem.id,\n machineId: this.machine.id,\n tuftProductId: planningItem.tuftProduct.id\n }\n });\n }\n }\n\n public onPlanningOrderSelected(planningOrder: PlanningOrder): void {\n this.selectPlanningOrder.emit(planningOrder.id);\n }\n\n private hasPermissionToNavigateToNewBuilder(): boolean {\n return this.authentication.getCurrentSubscription().hasPermission(Permission.TEXFAB_NEW_BUILDER);\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 {StringUtils} from '@application/helper/string-utils';\nimport {MachineType} from '@domain/machine/machine-type.enum';\nimport {ProductionOrderCarpetForPlanningOrder} from '@domain/planning/carpet/production-order-carpet-for-planning-order';\nimport {NeedsAttentionItem} from '@domain/planning/needs-attention-item';\nimport {PlanningMachine} from '@domain/planning/planning-machine';\nimport {PlanningOrder} from '@domain/planning/planning-order';\nimport {PlanningOrderData} from '@domain/planning/planning-order-data';\nimport {ProductionOrderTuftingForPlanningOrder} from '@domain/planning/tufting/production-order-tufting-for-planning-order';\nimport {ProductionOrderWeavingForPlanningOrder} from '@domain/planning/weaving/production-order-weaving-for-planning-order';\nimport {ProductionScheduleStatus} from '@domain/production-schedule/production-schedule-status.enum';\nimport {PLANNING, Planning} from '@infrastructure/http/planning/planning';\nimport {PRODUCTION_ORDERS_WEAVING, ProductionOrdersWeaving} from '@infrastructure/http/production-order-weaving/production-orders-weaving';\nimport {PRODUCTION_ORDERS, ProductionOrders} from '@infrastructure/http/production-order/production-orders';\nimport {HttpTuftProductionOrdersService} from '@infrastructure/http/tuft-production-order/http-tuft-production-orders.service';\nimport {\n BaseComponent,\n ColDefBuilderFactoryService,\n DialogBuilderFactoryService,\n DialogType,\n GridOptionsBuilderFactoryService,\n moment,\n NoDataOverlayComponentParams,\n OverlayComponentParams,\n SelectGridDialog,\n TimeUtils,\n TranslateService\n} from '@vdw/angular-component-library';\nimport {AgGridAngular} from 'ag-grid-angular';\nimport {ColDef, GridApi, GridOptions} from 'ag-grid-community';\nimport {each, isEmpty, isNil, join, lowerCase, map, size} from 'lodash-es';\nimport {forkJoin, Observable, of as observableOf} from 'rxjs';\nimport {catchError, map as rxjsMap, takeUntil} from 'rxjs/operators';\nimport {SelectProductionOrderParameters} from './select-production-order-parameters';\n\n@Component({\n selector: 'app-select-production-order',\n templateUrl: './select-production-order.component.html',\n styleUrls: ['./select-production-order.component.scss']\n})\nexport class SelectProductionOrderComponent extends BaseComponent implements OnInit, AfterViewInit, SelectGridDialog {\n @ViewChild('productionOrdersGrid') public productionOrdersGrid: AgGridAngular;\n public listOfGridOptions: GridOptions[];\n public listOfGridApis: GridApi[];\n public listOfProductionOrders: PlanningOrderData[];\n\n private readonly machineQualityId: number;\n private readonly creelId: number;\n private readonly weaveProductId: number;\n private readonly tuftProductId: number;\n private readonly machine: PlanningMachine;\n private readonly selectedProductionOrders: PlanningOrderData[];\n\n public constructor(\n @Inject(PRODUCTION_ORDERS) private readonly productionOrders: ProductionOrders,\n @Inject(PRODUCTION_ORDERS_WEAVING) private readonly productionOrdersWeaving: ProductionOrdersWeaving,\n @Inject(PLANNING) private readonly planning: Planning,\n @Inject(MAT_DIALOG_DATA)\n {machineQualityId, creelId, weaveProductId, machine, selectedProductionOrders, tuftProductId}: SelectProductionOrderParameters,\n private readonly dialogRef: MatDialogRef,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n private readonly translate: TranslateService,\n private readonly gridOptionsBuilderFactoryService: GridOptionsBuilderFactoryService,\n private readonly colDefBuilderFactoryService: ColDefBuilderFactoryService,\n private readonly productionOrdersTufting: HttpTuftProductionOrdersService\n ) {\n super();\n\n this.machineQualityId = machineQualityId;\n this.creelId = creelId;\n this.weaveProductId = weaveProductId;\n this.machine = machine;\n this.selectedProductionOrders = selectedProductionOrders;\n this.tuftProductId = tuftProductId;\n }\n\n public get gridOptions(): GridOptions {\n return this.listOfGridOptions[0];\n }\n\n public ngOnInit(): void {\n this.setGridOptions();\n this.planning\n .getOrdersThatRequireAttention()\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((needsAttentionItems: NeedsAttentionItem[]) => {\n if (this.machine.machineType === MachineType.WEAVING_MACHINE) {\n this.listOfProductionOrders = this.getProductionOrdersWeavingThatNeedAttention(needsAttentionItems);\n } else if (this.machine.machineType === MachineType.TUFT) {\n this.listOfProductionOrders = this.getProductionOrdersTuftingThatNeedAttention(needsAttentionItems);\n } else {\n this.listOfProductionOrders = this.getProductionOrdersCarpetThatNeedAttention(needsAttentionItems);\n }\n });\n }\n\n public ngAfterViewInit(): void {\n this.listOfGridApis = [this.productionOrdersGrid.api];\n }\n\n public filterProductionOrders(filterText: string): void {\n if (!isEmpty(this.listOfProductionOrders)) {\n this.productionOrdersGrid.api.setGridOption('quickFilterText', filterText);\n }\n }\n\n public canSelectProductionOrders(): boolean {\n return this.productionOrdersGrid?.api?.getSelectedRows().length > 0;\n }\n\n public selectProductionOrders(): void {\n if (!this.canSelectProductionOrders()) {\n return;\n }\n const selectedOrders = this.productionOrdersGrid.api.getSelectedRows() as PlanningOrderData[];\n\n forkJoin(map(selectedOrders, (order: PlanningOrderData) => this.getCheckCompatibilityWithMachineRequestForOrder(order)))\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((results: {order: PlanningOrderData; durationInMs: number}[]) => {\n const compatiblePlanningOrders: PlanningOrder[] = [];\n const incompatibleProductionOrderNames: string[] = [];\n\n each(results, (result: {order: PlanningOrderData; durationInMs: number}) => {\n if (isNil(result.durationInMs)) {\n incompatibleProductionOrderNames.push(result.order.name);\n } else {\n result.order.status = ProductionScheduleStatus.TO_RECONFIRM;\n\n compatiblePlanningOrders.push(new PlanningOrder(null, new Date(), moment().add(result.durationInMs, TimeUtils.MILLISECONDS_UNIT).toDate(), null, result.order));\n }\n });\n\n if (!isEmpty(incompatibleProductionOrderNames)) {\n this.showAlertErrorForIncompatibleProductionOrders(incompatibleProductionOrderNames);\n }\n\n if (!isEmpty(compatiblePlanningOrders)) {\n this.dialogRef.close(compatiblePlanningOrders);\n }\n });\n }\n\n private getProductionOrdersCarpetThatNeedAttention(needsAttentionItems: NeedsAttentionItem[]): ProductionOrderCarpetForPlanningOrder[] {\n return needsAttentionItems\n .filter((item: NeedsAttentionItem) => item.isCarpetOrder)\n .map((item: NeedsAttentionItem) => item.productionOrderCarpet)\n .filter(\n (order: ProductionOrderCarpetForPlanningOrder) =>\n order.needsToBePlanned() &&\n order.machineQuality.id === this.machineQualityId &&\n order.creel.id === this.creelId &&\n !this.selectedProductionOrders.some((orderData: PlanningOrderData) => orderData.id === order.id)\n );\n }\n\n private getProductionOrdersWeavingThatNeedAttention(needsAttentionItems: NeedsAttentionItem[]): ProductionOrderWeavingForPlanningOrder[] {\n return needsAttentionItems\n .filter((item: NeedsAttentionItem) => item.isWeavingOrder)\n .map((item: NeedsAttentionItem) => item.productionOrderWeaving)\n .filter(\n (order: ProductionOrderWeavingForPlanningOrder) =>\n order.needsToBePlanned() && order.weaveProduct.id === this.weaveProductId && !this.selectedProductionOrders.some((orderData: PlanningOrderData) => orderData.id === order.id)\n );\n }\n\n private getProductionOrdersTuftingThatNeedAttention(needsAttentionItems: NeedsAttentionItem[]): ProductionOrderTuftingForPlanningOrder[] {\n return needsAttentionItems\n .filter((item: NeedsAttentionItem) => item.isTuftingOrder)\n .map((item: NeedsAttentionItem) => item.productionOrderTufting)\n .filter(\n (order: ProductionOrderTuftingForPlanningOrder) =>\n order.needsToBePlanned() && order.tuftProduct.id === this.tuftProductId && !this.selectedProductionOrders.some((orderData: PlanningOrderData) => orderData.id === order.id)\n );\n }\n\n private setGridOptions(): void {\n this.listOfGridOptions = [\n this.gridOptionsBuilderFactoryService\n .getBuilder(this.getColumnDefs(), GridIdentifier.SELECT_PRODUCTION_ORDER)\n .withRowSelection(true)\n .withNoRowsOverlay({\n scale: 0.7,\n titleKey: 'PLANNING.ADD_ITEM.SELECT_PRODUCTION_ORDERS.NO_PRODUCTION_ORDERS_FOR_RUN',\n hideDescription: true\n } as Partial)\n .withLoadingOverlay({\n scale: 0.7\n } as OverlayComponentParams)\n .build()\n ];\n }\n\n private getColumnDefs(): ColDef[] {\n return [\n this.colDefBuilderFactoryService.getBuilder().withField('name').withHeaderName('GENERAL.NAME').withComparator(StringUtils.stringComparator).withoutFilter().build(),\n this.colDefBuilderFactoryService.getBuilder().withField('dueDate').withHeaderName('GENERAL.DATETIME.DUE_DATE').withDate().withoutFilter().build()\n ];\n }\n\n private getCheckCompatibilityWithMachineRequestForOrder(order: PlanningOrderData): Observable<{order: PlanningOrderData; durationInMs: number}> {\n const failureResponse = observableOf({order, durationInMs: null});\n if (order instanceof ProductionOrderCarpetForPlanningOrder) {\n return this.productionOrders.checkCompatibilityWithMachine(order.id, this.machine.id).pipe(\n rxjsMap((durationInMs: number) => ({order, durationInMs})),\n catchError(() => failureResponse)\n );\n }\n if (order instanceof ProductionOrderWeavingForPlanningOrder) {\n return this.productionOrdersWeaving.checkCompatibilityWithMachine(order.id, this.machine.id).pipe(\n rxjsMap((durationInMs: number) => ({order, durationInMs})),\n catchError(() => failureResponse)\n );\n }\n if (order instanceof ProductionOrderTuftingForPlanningOrder) {\n return this.productionOrdersTufting.checkCompatibilityWithMachine(order.id, this.machine.id).pipe(\n rxjsMap((durationInMs: number) => ({order, durationInMs})),\n catchError(() => failureResponse)\n );\n }\n return failureResponse;\n }\n\n private showAlertErrorForIncompatibleProductionOrders(incompatibleProductionOrderNames: string[]): void {\n this.dialogBuilderFactoryService.getBuilder().openAlertDialog({\n titleText: this.translate.instant('PLANNING.ERRORS.INCOMPATIBLE_ENTITY', {\n entity: lowerCase(this.translate.instant('PRODUCTION_ORDER.PRODUCTION_ORDER', {count: size(incompatibleProductionOrderNames)}))\n }),\n messageText: this.translate.instant('PLANNING.ERRORS.ADD_PRODUCTION_ORDER_ERROR', {\n count: size(incompatibleProductionOrderNames),\n productionOrderName: join(incompatibleProductionOrderNames, ', ')\n }),\n type: DialogType.INFORMATION\n });\n }\n}\n","
\n \n
\n
\n \n
\n \n
\n \n
\n","\n \n \n

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

\n
\n \n
\n
\n
\n \n
\n \n
\n
\n
\n","import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';\nimport {GridIdentifier} from '@application/grids/grid-identifier.enum';\nimport {PlanningMachine} from '@domain/planning/planning-machine';\nimport {PlanningOrder} from '@domain/planning/planning-order';\nimport {ConfirmProductionOrderDeletionCommand} from '@presentation/pages/texfab/planning/confirm-production-order-deletion/confirm-production-order-deletion-command';\nimport {ListOverviewActionsComponent} from '@presentation/pages/texfab/production-schedule/overview/actions/list-overview-actions.component';\nimport {ListOverviewAction} from '@presentation/pages/texfab/production-schedule/overview/list-overview-action';\nimport {ProductionScheduleOverviewStatusComponent} from '@presentation/pages/texfab/production-schedule/overview/status/production-schedule-overview-status.component';\nimport {AssertionUtils, BaseComponent, ColDefBuilderFactoryService, DialogBuilderFactoryService, GridOptionsBuilderFactoryService, TranslateService} from '@vdw/angular-component-library';\nimport {\n CellClassParams,\n CellClickedEvent,\n ColDef,\n GetRowIdFunc,\n GetRowIdParams,\n GridApi,\n GridOptions,\n GridReadyEvent,\n ITooltipParams,\n RowDragCallbackParams,\n RowDragEndEvent,\n RowDragLeaveEvent,\n RowDragMoveEvent,\n RowHighlightPosition,\n RowNode,\n ValueGetterParams\n} from 'ag-grid-community';\nimport {cloneDeep, isEmpty, isNil} from 'lodash-es';\nimport {takeUntil} from 'rxjs/operators';\nimport {SelectProductionOrderParameters} from './select-production-order/select-production-order-parameters';\nimport {SelectProductionOrderComponent} from './select-production-order/select-production-order.component';\n\n@Component({\n selector: 'app-production-orders-list',\n templateUrl: './production-orders-list.component.html',\n styleUrls: ['./production-orders-list.component.scss']\n})\nexport class ProductionOrdersListComponent extends BaseComponent implements OnInit {\n @Input() public planningOrders: PlanningOrder[] = [];\n @Input() public machineQualityId: number;\n @Input() public creelId: number;\n @Input() public weaveProductId: number;\n @Input() public tuftProductId: number;\n @Input() public machine: PlanningMachine;\n @Input() public viewOnly: boolean;\n @Output() public deletePlanningOrder: EventEmitter = new EventEmitter();\n @Output() public addPlanningOrders: EventEmitter = new EventEmitter();\n @Output() public updatePlanningOrders: EventEmitter = new EventEmitter();\n @Output() public selectPlanningOrder: EventEmitter = new EventEmitter();\n public gridOptions: GridOptions;\n\n private gridModelForListOfProductionOrders: GridApi;\n private isDraggingProductionOrder = false;\n\n public constructor(\n private readonly translate: TranslateService,\n private readonly confirmProductionOrderDeletionCommand: ConfirmProductionOrderDeletionCommand,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n private readonly gridOptionsBuilderFactoryService: GridOptionsBuilderFactoryService,\n private readonly colDefBuilderFactoryService: ColDefBuilderFactoryService\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this.setGridOptions();\n }\n\n public addProductionOrders(): void {\n this.dialogBuilderFactoryService\n .getBuilder()\n .openSelectGridDialog(SelectProductionOrderComponent, {\n machineQualityId: this.machineQualityId,\n creelId: this.creelId,\n machine: this.machine,\n weaveProductId: this.weaveProductId,\n selectedProductionOrders: this.planningOrders.map((planningOrder: PlanningOrder) => planningOrder.productionOrder),\n tuftProductId: this.tuftProductId\n })\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((planningOrders: PlanningOrder[]) => {\n if (!isEmpty(planningOrders)) {\n this.addPlanningOrders.emit(planningOrders);\n }\n });\n }\n\n public hasPlanningOrders(): boolean {\n return this.planningOrders?.length > 0;\n }\n\n public onRowDragEnter(): void {\n this.isDraggingProductionOrder = true;\n }\n\n public onRowDragLeave(event: RowDragLeaveEvent): void {\n event.api.forEachNode((rowNode: RowNode) => {\n rowNode.setHighlighted(null);\n });\n }\n\n public onRowDragMove({api, overIndex, node, overNode, y}: RowDragMoveEvent): void {\n api.forEachNode((rowNode: RowNode) => {\n rowNode.setHighlighted(null);\n });\n\n if (node.rowIndex !== overIndex && overNode.data.canBeRescheduled()) {\n const isMouseOnBottomHalfOfRow = y - overNode.rowTop > overNode.rowHeight / 2;\n\n if ((node.rowIndex - overIndex !== -1 || isMouseOnBottomHalfOfRow) && (node.rowIndex - overIndex !== 1 || !isMouseOnBottomHalfOfRow)) {\n (overNode as RowNode).setHighlighted(isMouseOnBottomHalfOfRow ? RowHighlightPosition.Below : RowHighlightPosition.Above);\n }\n }\n }\n\n public onRowDragEnd({node, overNode, overIndex}: RowDragEndEvent): void {\n if (node.rowIndex !== overIndex && overNode.data.canBeRescheduled()) {\n const updatedPlanningOrders = cloneDeep(this.planningOrders);\n\n if (!AssertionUtils.isNullOrUndefined((overNode as RowNode).highlighted)) {\n const planningOrder = node.data;\n\n const isDraggingUp = node.rowIndex > overIndex && (overNode as RowNode).highlighted === RowHighlightPosition.Below;\n updatedPlanningOrders.splice(node.rowIndex, 1);\n updatedPlanningOrders.splice(isDraggingUp ? overIndex + 1 : overIndex, 0, planningOrder);\n this.updatePlanningOrders.emit(updatedPlanningOrders);\n }\n }\n\n (overNode as RowNode).setHighlighted(null);\n this.isDraggingProductionOrder = false;\n }\n\n public onEscapeKeydown(event: KeyboardEvent): void {\n if (this.isDraggingProductionOrder) {\n event.stopPropagation();\n }\n }\n\n public getRowId: GetRowIdFunc = (params: GetRowIdParams) => `${params.data.id}, ${params.data.productionOrder?.id}`;\n\n private setGridOptions(): void {\n this.gridOptions = this.gridOptionsBuilderFactoryService\n .getBuilder(this.getColumnDefs(), GridIdentifier.PRODUCTION_ORDERS_LIST)\n .withSuppressRowClickSelection()\n .withSuppressRowHoverHighlight()\n .withLockPinnedColumns()\n .withOnGridReady((params: GridReadyEvent) => this.onGridReadyEventForListOfProductionOrders(params))\n .build();\n }\n\n private getColumnDefs(): ColDef[] {\n const colDefs: ColDef[] = [\n this.colDefBuilderFactoryService\n .getBuilder()\n .withField('productionOrder.name')\n .withHeaderName('GENERAL.NAME')\n .withRowDrag((params: RowDragCallbackParams): boolean => {\n const planningOrder: PlanningOrder = params.data;\n\n return planningOrder.canBeRescheduled() && !this.viewOnly;\n })\n .withOnCellClicked((event: CellClickedEvent): void => {\n const planningOrder: PlanningOrder = event.data;\n\n if (!isNil(planningOrder.id)) {\n this.selectPlanningOrder.emit(planningOrder);\n }\n })\n .withCellClass((params: CellClassParams): string => {\n const planningOrder: PlanningOrder = params.data;\n\n return isNil(planningOrder.id) ? '' : 'url';\n })\n .withSuppressMovable()\n .withLockVisible()\n .withSortable(false)\n .withoutFilter()\n .build(),\n this.colDefBuilderFactoryService\n .getBuilder()\n .withField('productionOrder.status')\n .withHeaderName('GENERAL.STATUS')\n .withCellClass('center')\n .withTooltipValueGetter((params: ITooltipParams): any => this.translate.instant(`PRODUCTION_ORDER.STATUS.${params.value}`))\n .withCellRenderer(ProductionScheduleOverviewStatusComponent)\n .withSortable(false)\n .withoutFilter()\n .build()\n ];\n\n if (!this.viewOnly) {\n colDefs.splice(\n 1,\n 0,\n this.colDefBuilderFactoryService.getBuilder().withField('productionOrder.dueDate').withHeaderName('GENERAL.DATETIME.DUE_DATE').withDate().withSortable(false).withoutFilter().build()\n );\n\n colDefs.push(\n this.colDefBuilderFactoryService\n .getBuilder()\n .withHeaderName('GENERAL.ACTIONS.ACTIONS')\n .withoutHeaderName()\n .withCellRenderer(ListOverviewActionsComponent)\n .withValueGetter((params: ValueGetterParams) => {\n const actions: ListOverviewAction[] = [];\n const planningOrder: PlanningOrder = params.data;\n\n if (planningOrder.canBeRescheduled()) {\n actions.push({\n name: 'PLANNING.ACTIONS.REMOVE',\n actionFn: () => this.confirmPlanningOrderDeletion(planningOrder)\n });\n }\n\n return actions;\n })\n .withSuppressMovable('right')\n .withLockVisible()\n .withSortable(false)\n .withoutFilter()\n .build()\n );\n }\n\n return colDefs;\n }\n\n private confirmPlanningOrderDeletion(planningOrder: PlanningOrder): void {\n const title = this.translate.instant('PLANNING.REMOVE_PRODUCTION_ORDER');\n const message = this.translate.instant('PLANNING.CONFIRM_PRODUCTION_ORDER_REMOVAL', {productionOrderName: planningOrder.productionOrder.name});\n\n this.confirmProductionOrderDeletionCommand\n .execute({title, message})\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe(() => {\n this.deletePlanningOrder.emit(planningOrder);\n });\n }\n\n private onGridReadyEventForListOfProductionOrders(params: GridReadyEvent): void {\n this.gridModelForListOfProductionOrders = params.api;\n this.gridModelForListOfProductionOrders.sizeColumnsToFit();\n }\n}\n","\n
\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, Inject} from '@angular/core';\nimport {Router} from '@angular/router';\nimport {PlanningMachineCarpetRun} from '@domain/planning/carpet/planning-machine-carpet-run';\nimport {PlanningItemType} from '@domain/planning/planning-item-type.enum';\nimport {PlanningMachineRun} from '@domain/planning/planning-machine-run';\nimport {PlanningOrder} from '@domain/planning/planning-order';\nimport {PlanningMachineWeavingRun} from '@domain/planning/weaving/planning-machine-weaving-run';\nimport {AUTHENTICATION, Authentication} from '@infrastructure/http/authentication/authentication';\nimport {TranslateService} from '@vdw/angular-component-library';\nimport {get} from 'lodash-es';\nimport {BasePlanningItemComponent} from '../base-planning-item.component';\n\n@Component({\n selector: 'app-planning-item-details',\n templateUrl: './planning-item-details.component.html',\n styleUrls: ['./planning-item-details.component.scss']\n})\nexport class PlanningItemDetailsComponent extends BasePlanningItemComponent {\n private static readonly unknownPlanningItemTranslationKey = 'PLANNING.UNKNOWN';\n private readonly translate: TranslateService;\n\n public constructor(\n @Inject(AUTHENTICATION) protected readonly authentication: Authentication,\n translate: TranslateService,\n router: Router\n ) {\n super(authentication, router);\n\n this.translate = translate;\n }\n\n public getMachineQualityLabel(): string {\n return get((this.planningItem as PlanningMachineCarpetRun).machineQuality, 'technicalName', this.translate.instant(PlanningItemDetailsComponent.unknownPlanningItemTranslationKey));\n }\n\n public getCreelLabel(): string {\n return get((this.planningItem as PlanningMachineCarpetRun).creel, 'name', this.translate.instant(PlanningItemDetailsComponent.unknownPlanningItemTranslationKey));\n }\n\n public getWeavePatternLabel(): string {\n return get((this.planningItem as PlanningMachineWeavingRun).weaveProduct, 'name', this.translate.instant(PlanningItemDetailsComponent.unknownPlanningItemTranslationKey));\n }\n\n public getPlanningItemTypeLabel(): string {\n return `PLANNING.ADD_ITEM.TYPES.${PlanningItemType[this.planningItem.type]}`;\n }\n\n public canShowActions(): boolean {\n return this.isPlanningItemOfTypeRun() && !(this.planningItem as PlanningMachineCarpetRun).completed;\n }\n\n public canDeletePlanningItem(): boolean {\n return !(this.planningItem as PlanningMachineRun).executing;\n }\n\n public getPlanningOrders(): PlanningOrder[] {\n return (this.planningItem as PlanningMachineRun).planningOrders;\n }\n}\n","import {Directive, ElementRef, Input, OnInit} from '@angular/core';\n\n@Directive({\n selector: '[vdwDelayedClass]'\n})\nexport class DelayedClassDirective implements OnInit {\n @Input() public vdwDelayedClass: string;\n\n public constructor(private elementRef: ElementRef) {}\n\n public ngOnInit(): void {\n if (this.vdwDelayedClass) {\n setTimeout(() => {\n this.elementRef.nativeElement.classList.add(this.vdwDelayedClass);\n }, 500);\n }\n }\n}\n","import {Component, EventEmitter, Input, Output} 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';\n\n@Component({\n selector: 'app-colored-yarn-set-map-card',\n templateUrl: './colored-yarn-set-map-card.component.html',\n styleUrls: ['./colored-yarn-set-map-card.component.scss']\n})\nexport class ColoredYarnSetMapCardComponent {\n @Input() public coloredYarnSetWithStartDent: OverviewListColoredYarnSetWithStartDent;\n @Input() public activeColoredYarnSetCreelMap: CreelMap;\n @Output() public activeColoredYarnSetCreelMapChange: EventEmitter = new EventEmitter();\n\n public previewType: PreviewType = PreviewType.COLOR;\n\n public onPreviewTypeChange(event: MatSlideToggleChange): void {\n this.previewType = event.checked ? PreviewType.YARN_TYPE : PreviewType.COLOR;\n }\n\n public updateCreelMap(creelMap: CreelMap): void {\n this.activeColoredYarnSetCreelMapChange.emit(creelMap);\n }\n}\n","\n \n \n
\n

{{ coloredYarnSetWithStartDent.coloredYarnSet.name }}

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

\n {{ 'MACHINE.DETAILS.CREEL_MAPPING.TITLE' | bmsTranslate }}\n

\n
\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 \n
\n
\n
\n
\n","
\n \n
\n
\n \n
\n
\n
\n \n \n
\n
\n","import {Component, EventEmitter, Input, Output} from '@angular/core';\nimport {CreelMap} from '@domain/textile-data/creel/creel-map';\nimport {OverviewListCreel} from '@presentation/pages/textile-data/creel/overview/overview-list-creel';\nimport {cloneDeep} from 'lodash-es';\n\n@Component({\n selector: 'app-edit-creel-mapping',\n templateUrl: './edit-creel-mapping.component.html'\n})\nexport class EditCreelMappingComponent {\n @Output() public closeEditCreelMapping: EventEmitter = new EventEmitter();\n @Output() public saveCreelMapping: EventEmitter = new EventEmitter();\n\n private _creel: OverviewListCreel;\n\n @Input() public set creel(creel: OverviewListCreel) {\n this._creel = cloneDeep(creel);\n }\n\n public get creel(): OverviewListCreel {\n return this._creel;\n }\n\n public close(): void {\n this.closeEditCreelMapping.emit();\n }\n\n public save(): void {\n this.saveCreelMapping.emit(this.creel.mappingForCurrentPositionOnMachine);\n }\n}\n","
\n \n \n
\n
\n
\n
\n \n \n \n {{ getPlanningItemTypeLabel(planningItemType) | bmsTranslate }}\n \n \n \n
\n
\n
\n
\n
\n \n
\n
\n \n {{ 'GENERAL.DATETIME.START_TIME' | bmsTranslate }}\n \n \n
\n
\n \n
\n
\n \n {{ 'GENERAL.DATETIME.END_TIME' | bmsTranslate }}\n \n \n
\n
\n
\n
\n \n \n {{ 'TEXTILE_DATA.CREEL.CREEL' | bmsTranslate: {count: 1} }}\n \n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n \n {{ 'TEXTILE_DATA.MACHINE_QUALITY.MACHINE_QUALITY' | bmsTranslate: {count: 1} }}\n \n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n \n\n \n \n {{ 'TEXTILE_DATA.WEAVE_PRODUCT.WEAVE_PRODUCT' | bmsTranslate: {count: 1} }}\n \n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n \n \n \n {{ 'TEXTILE_DATA.TUFT_PRODUCT.TUFT_PRODUCT' | bmsTranslate: {count: 1} }}\n \n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\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 {{ 'MACHINE.DETAILS.THEORETICAL' | bmsTranslate }}\n {{ 'MACHINE.DETAILS.ACTIVE' | bmsTranslate }}\n \n
\n
\n
\n
\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
\n
\n \n \n
\n
\n \n
\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, OnInit, Output} from '@angular/core';\nimport {FormBuilder, FormControl, FormGroup, Validators} from '@angular/forms';\nimport {MatButtonToggleChange} from '@angular/material/button-toggle';\nimport {MatDatepickerInputEvent} from '@angular/material/datepicker';\nimport {MatSlideToggleChange} from '@angular/material/slide-toggle';\nimport {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 {MachineType} from '@domain/machine/machine-type.enum';\nimport {PlanningCreel} from '@domain/planning/carpet/planning-creel';\nimport {PlanningMachineCarpetRun} from '@domain/planning/carpet/planning-machine-carpet-run';\nimport {PlanningMachineCreelChange} from '@domain/planning/carpet/planning-machine-creel-change';\nimport {PlanningMachineQuality} from '@domain/planning/carpet/planning-machine-quality';\nimport {PlanningItem} from '@domain/planning/planning-item';\nimport {PlanningItemType} from '@domain/planning/planning-item-type.enum';\nimport {PlanningMachineMaintenance} from '@domain/planning/planning-machine-maintenance';\nimport {PlanningMachineRun} from '@domain/planning/planning-machine-run';\nimport {PlanningMachineUnavailability} from '@domain/planning/planning-machine-unavailability';\nimport {PlanningOrder} from '@domain/planning/planning-order';\nimport {PlanningMachineTuftingRun} from '@domain/planning/tufting/planning-machine-tufting-run';\nimport {PlanningTuftProduct} from '@domain/planning/tufting/planning-tuft-product';\nimport {PlanningMachineWarpChange} from '@domain/planning/weaving/planning-machine-warp-change';\nimport {PlanningMachineWeavingRun} from '@domain/planning/weaving/planning-machine-weaving-run';\nimport {PlanningWeaveProduct} from '@domain/planning/weaving/planning-weave-product';\nimport {Permission} from '@domain/profile/permission.enum';\nimport {Subscription} from '@domain/profile/subscription';\nimport {CreelMap} from '@domain/textile-data/creel/creel-map';\nimport {Authentication, AUTHENTICATION} from '@infrastructure/http/authentication/authentication';\nimport {CREELS, Creels} from '@infrastructure/http/creel/creels';\nimport {GetAllMachineQualitiesParameters, MACHINE_QUALITIES, MachineQualities} from '@infrastructure/http/machine-quality/machine-qualities';\nimport {PLANNING, Planning} from '@infrastructure/http/planning/planning';\nimport {HttpTuftProductsService} from '@infrastructure/http/tuft-product/http-tuft-products.service';\nimport {GetAllTuftProductsParameters} from '@infrastructure/http/tuft-product/tuft-products.interface';\nimport {WEAVE_PRODUCT, WeaveProducts} from '@infrastructure/http/weave-product/weave-products.interface';\nimport {PreviewMap} from '@presentation/components/creel-tables/preview-map';\nimport {SelectCreelComponent} from '@presentation/components/select-creel/select-creel.component';\nimport {SelectMachineQualityComponent} from '@presentation/components/select-machine-quality/select-machine-quality.component';\nimport {SelectWeaveProductComponent} from '@presentation/pages/texfab/production-order-lite/add/select-weave-product/select-weave-product.component';\nimport {SelectTuftProductComponent} from '@presentation/pages/texfab/tuft-production-order/add/select-tuft-product/select-tuft-product.component';\nimport {PreviewType} from '@presentation/pages/textile-data/creel/add/preview-type';\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 {OverviewListTuftProduct} from '@presentation/pages/textile-data/tuft-product/overview/overview-list-tuft-product';\nimport {OverviewListWeaveProduct} from '@presentation/pages/textile-data/weave-product/overview/overview-list-weave-product';\nimport {\n AgGridRowSelection,\n AssertionUtils,\n DateTimeFormat,\n DateTimePipe,\n DialogBuilderFactoryService,\n DialogComponentData,\n EnumUtils,\n skeletonViewAnimation,\n TimeUtils,\n TimezoneUtils,\n TranslateService\n} from '@vdw/angular-component-library';\nimport {cloneDeep, first, isEmpty, last, toLower} from 'lodash-es';\nimport {DateTime} from 'luxon';\nimport {Subscription as RxjsSubscription} from 'rxjs';\nimport {delay, distinctUntilChanged, finalize, takeUntil} from 'rxjs/operators';\nimport {BasePlanningItemComponent} from '../base-planning-item.component';\n\n@Component({\n selector: 'app-planning-item-form',\n templateUrl: './planning-item-form.component.html',\n styleUrls: ['./planning-item-form.component.scss'],\n animations: [skeletonViewAnimation('.form-field-skeleton-wrapper, .button-skeleton-wrapper, .ag-root')]\n})\nexport class PlanningItemFormComponent extends BasePlanningItemComponent implements OnInit {\n private static readonly selectObjectTranslationKey = 'GENERAL.ACTIONS.SELECT_OBJECT';\n public readonly QUALITY_CHIP_VALUE_KEY = '%(technicalNameWithVersion)';\n public readonly CREEL_BASE_ROUTER_LINK = RouteUtils.paths.texStyle.creel.editCreel.absolutePath;\n public readonly QUALITY_BASE_ROUTER_LINK = RouteUtils.paths.texStyle.machineQuality.editMachineQuality.absolutePath;\n public readonly WEAVE_PRODUCT_BASE_ROUTER_LINK = RouteUtils.paths.texStyle.weaveProduct.editWeaveProduct.absolutePath;\n public readonly TUFT_PRODUCT_BASE_ROUTER_LINK = RouteUtils.paths.texStyle.tuftProduct.editTuftProduct.absolutePath;\n\n private readonly CARPET_QUEUE_PERMISSION = Permission.TEXFAB_CARPET_QUEUE;\n private readonly WEAVE_QUEUE_PERMISSION = Permission.TEXFAB_WEAVE_QUEUE;\n private readonly TUFT_QUEUE_PERMISSION = Permission.TEXFAB_TUFT_QUEUE;\n\n @Output() public planningItemChange: EventEmitter = new EventEmitter();\n @Output() public savePlanningItem: EventEmitter = new EventEmitter();\n\n @HostBinding('class.large-mode') public get largeMode(): boolean {\n return this.isPlanningItemOfTypeRun();\n }\n\n public planningItemForm: FormGroup<{\n type: FormControl;\n startDate: FormControl;\n startTime: FormControl;\n endDate: FormControl;\n endTime: FormControl;\n planningOrders?: FormControl;\n creel?: FormControl;\n machineQuality?: FormControl;\n weaveProduct?: FormControl;\n tuftProduct?: FormControl;\n }>;\n\n public creelPreviewMap: PreviewMap = PreviewMap.THEORETICAL;\n public creelPreviewType: PreviewType = PreviewType.COLOR;\n public isEditingCreelMapping = false;\n public isLoadingCreel = false;\n\n public readonly planningItemTypes: PlanningItemType[] = EnumUtils.getEnumValues(PlanningItemType);\n\n private currentSubscription: Subscription;\n private getCreelSubscription: RxjsSubscription;\n private newCreel: OverviewListCreel;\n\n public constructor(\n @Inject(CREELS) private readonly creelsService: Creels,\n @Inject(PLANNING) private readonly planning: Planning,\n @Inject(MACHINE_QUALITIES) private readonly qualities: MachineQualities,\n @Inject(WEAVE_PRODUCT) private readonly weaveProducts: WeaveProducts,\n @Inject(AUTHENTICATION) protected readonly authentication: Authentication,\n private readonly tuftProducts: HttpTuftProductsService,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n private readonly formBuilder: FormBuilder,\n private readonly translate: TranslateService,\n private readonly navigationHelperService: NavigationHelperService,\n private readonly changeDetectorRef: ChangeDetectorRef,\n private readonly dateTimePipe: DateTimePipe,\n router: Router\n ) {\n super(authentication, router);\n }\n\n public ngOnInit(): void {\n this.currentSubscription = this.authentication.getCurrentSubscription();\n\n this.setPlanningItemForm();\n this.updateGenericPlanningItemFormValues();\n\n if (this.isPlanningItemOfTypeRun()) {\n this.updateRunSpecificFormValues();\n } else {\n this.updatePlanningItem();\n }\n\n this.planningItemSelected\n .pipe(\n takeUntil(this.unSubscribeOnViewDestroy),\n distinctUntilChanged((prev: PlanningItem, current: PlanningItem) => prev?.uniqueId === current?.uniqueId),\n delay(100)\n )\n .subscribe((_: PlanningItem) => {\n if (this.previousPlanningItem == null) {\n return;\n }\n\n this.updateGenericPlanningItemFormValues();\n\n this.cancelGetCreelRequest();\n this.closeEditCreelMapping();\n this.removeRunSpecificFormControls();\n\n if (this.isPlanningItemOfTypeRun()) {\n this.resetCreelPreviewTypeAndPreviewMap();\n this.addRunSpecificFormControls();\n this.updateRunSpecificFormValues();\n }\n });\n }\n\n public getAction(): string {\n const planning = this.translate.instant('PLANNING.PLANNING', {count: 1});\n const addToObject = this.translate.instant('GENERAL.ACTIONS.ADD_TO_OBJECT', {object: planning});\n\n const planningItemTypeLabel = this.translate.instant(this.getPlanningItemTypeLabel(this.planningItem.type));\n const editObject = this.translate.instant('GENERAL.ACTIONS.EDIT_OBJECT', {object: planningItemTypeLabel.toLowerCase()});\n\n return this.isAddingPlanningItem() ? addToObject : editObject;\n }\n\n public getTitle(): string {\n return this.isAddingPlanningItem() ? '' : this.machine.name;\n }\n\n public isAddingPlanningItem(): boolean {\n return AssertionUtils.isNullOrUndefined(this.planningItem.id);\n }\n\n public getPlanningItemTypeLabel(planningItemType: PlanningItemType): string {\n return `PLANNING.ADD_ITEM.TYPES.${PlanningItemType[planningItemType]}`;\n }\n\n public updateStartTimeWhenInThePast(): void {\n const startTimeInMs = this.getMillisecondsFromTimeLabel(this.planningItemForm.getRawValue().startTime);\n const startDateWithStartTime: DateTime = this.planningItemForm.getRawValue().startDate.plus({milliseconds: startTimeInMs});\n const currentDate: Date = this.getCurrentDateForSubscriptionTimezone();\n\n if (startDateWithStartTime < DateTime.fromJSDate(currentDate)) {\n this.planningItemForm.controls.startTime.setValue(this.getTimeLabelFromDate(currentDate));\n }\n\n if (this.isPlanningItemOfTypeRun()) {\n this.reschedulePlanningOrders(this.getPlanningOrders());\n }\n\n this.updateEndTimeAndEndDate();\n }\n\n public updateEndTimeAndEndDate(): void {\n const {startDate, endDate} = this.getPlanningItemStartAndEndDate();\n\n const minimumAllowedDifferenceBetweenStartDateAndEndDateInMs = this.getMinimumAllowedDifferenceBetweenStartDateAndEndDateInMs();\n\n if (minimumAllowedDifferenceBetweenStartDateAndEndDateInMs > DateTime.fromJSDate(endDate).diff(DateTime.fromJSDate(startDate)).milliseconds) {\n const calculatedEndDate = DateTime.fromJSDate(startDate).plus({milliseconds: minimumAllowedDifferenceBetweenStartDateAndEndDateInMs});\n this.planningItemForm.controls.endTime.setValue(this.getTimeLabelFromDate(calculatedEndDate.toJSDate()));\n this.planningItemForm.controls.endDate.setValue(calculatedEndDate.startOf('day'));\n }\n\n this.updatePlanningItem();\n }\n\n public canShowPlanningItemType(planningItemType: PlanningItemType): boolean {\n if (!this.isAddingPlanningItem() && planningItemType === PlanningItemType.RUN) {\n return false;\n }\n const warpingMachines = [MachineType.WEAVING_MACHINE, MachineType.TUFT];\n if (planningItemType === PlanningItemType.CREEL_CHANGE) {\n return !warpingMachines.includes(this.machine.machineType);\n }\n if (planningItemType === PlanningItemType.WARP_CHANGE) {\n return warpingMachines.includes(this.machine.machineType);\n }\n\n return true;\n }\n\n public canShowRunSpecificFormControls(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.planningItemForm.controls.planningOrders);\n }\n\n public canShowCarpetSpecificControls(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.planningItemForm.controls.machineQuality) && !AssertionUtils.isNullOrUndefined(this.planningItemForm.controls.creel);\n }\n\n public canShowWeavingSpecificControls(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.planningItemForm.controls.weaveProduct);\n }\n\n public canShowTuftingSpecificControls(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.planningItemForm.controls.tuftProduct);\n }\n\n public isMachineQualitySelected(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.planningItemForm.getRawValue()?.machineQuality);\n }\n\n public isCreelSelected(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.planningItemForm.getRawValue()?.creel);\n }\n\n public isWeaveProductSelected(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.planningItemForm.getRawValue()?.weaveProduct);\n }\n\n public isTuftProductSelected(): boolean {\n return !AssertionUtils.isNullOrUndefined(this.planningItemForm.getRawValue()?.tuftProduct);\n }\n\n public canQueueProductionOrder(): boolean {\n if (!this.isPlanningItemOfTypeRun()) {\n return this.canEditForMachineType(this.machine.machineType);\n } else if (this.isPlanningItemCarpetRun()) {\n return this.currentSubscription?.hasPermission(this.CARPET_QUEUE_PERMISSION);\n } else if (this.isPlanningItemWeavingRun()) {\n return this.currentSubscription?.hasPermission(this.WEAVE_QUEUE_PERMISSION);\n } else if (this.isPlanningItemTuftingRun()) {\n return this.currentSubscription?.hasPermission(this.TUFT_QUEUE_PERMISSION);\n }\n\n return false;\n }\n\n public selectMachineQuality(): void {\n this.dialogBuilderFactoryService\n .getBuilder()\n .openSelectGridDialog(SelectMachineQualityComponent, {\n title: this.translate.instant(PlanningItemFormComponent.selectObjectTranslationKey, {\n object: toLower(this.translate.instant('TEXTILE_DATA.MACHINE_QUALITY.MACHINE_QUALITY', {count: 1}))\n }),\n rowSelection: AgGridRowSelection.SINGLE,\n machineId: this.machine.id,\n allowEmptySelection: false\n })\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((selectedQualities: OverviewListMachineQuality[]) => {\n if (!isEmpty(selectedQualities)) {\n this.planningItemForm.controls.machineQuality.setValue(PlanningMachineQuality.fromOverviewListMachineQuality(first(selectedQualities)));\n this.updatePlanningItem();\n }\n });\n }\n\n public selectCreel(): void {\n this.dialogBuilderFactoryService\n .getBuilder()\n .openSelectGridDialog(SelectCreelComponent, {\n title: this.translate.instant(PlanningItemFormComponent.selectObjectTranslationKey, {\n object: toLower(this.translate.instant('TEXTILE_DATA.CREEL.CREEL', {count: 1}))\n }),\n machineId: this.machine.id,\n allowEmptySelection: false\n })\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((selectedCreels: OverviewListCreel[]) => this.setSelectedCreels(selectedCreels));\n }\n\n public selectWeaveProduct(): void {\n this.dialogBuilderFactoryService\n .getBuilder()\n .openSelectGridDialog(SelectWeaveProductComponent, {\n title: this.translate.instant(PlanningItemFormComponent.selectObjectTranslationKey, {\n object: this.translate.instant('TEXTILE_DATA.WEAVE_PRODUCT.WEAVE_PRODUCT', {count: 1}).toLowerCase()\n }),\n rowSelection: AgGridRowSelection.SINGLE,\n machineId: this.machine.id,\n allowEmptySelection: false\n })\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((selectedWeaveProduct: OverviewListWeaveProduct | '') => {\n if (!AssertionUtils.isNullOrUndefined(selectedWeaveProduct) && selectedWeaveProduct !== '') {\n this.planningItemForm.controls.weaveProduct.setValue(PlanningWeaveProduct.fromOverviewListWeaveProduct(selectedWeaveProduct));\n this.updatePlanningItem();\n }\n });\n }\n\n public selectTuftProduct(): void {\n this.dialogBuilderFactoryService\n .getBuilder()\n .openSelectGridDialog(SelectTuftProductComponent, {\n title: this.translate.instant(PlanningItemFormComponent.selectObjectTranslationKey, {\n object: this.translate.instant('TEXTILE_DATA.TUFT_PRODUCT.TUFT_PRODUCT', {count: 1}).toLowerCase()\n }),\n rowSelection: AgGridRowSelection.SINGLE,\n machineId: this.machine.id,\n allowEmptySelection: false\n })\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((selectedTuftProduct: OverviewListTuftProduct | '') => {\n if (!AssertionUtils.isNullOrUndefined(selectedTuftProduct) && selectedTuftProduct !== '') {\n this.planningItemForm.controls.tuftProduct.setValue(PlanningTuftProduct.fromOverviewListTuftProduct(selectedTuftProduct));\n this.updatePlanningItem();\n }\n });\n }\n\n public save(): void {\n this.savePlanningItem.emit(this.getPlanningItem());\n }\n\n public onCreelTypeViewModeChange(event: MatSlideToggleChange): void {\n this.creelPreviewType = event.checked ? PreviewType.YARN_TYPE : PreviewType.COLOR;\n }\n\n public onCreelMapViewModeChange(matButtonToggleChange: MatButtonToggleChange): void {\n this.creelPreviewMap = matButtonToggleChange.value ? PreviewMap.THEORETICAL : PreviewMap.ACTIVE;\n }\n\n public editCreelMapping(): void {\n this.isEditingCreelMapping = true;\n }\n\n public closeEditCreelMapping(): void {\n this.isEditingCreelMapping = false;\n }\n\n public updateCreelMapping(mappingForCurrentPositionOnMachine: CreelMap[]): void {\n const creel = this.planningItemForm.getRawValue().creel;\n creel.mappingForCurrentPositionOnMachine = mappingForCurrentPositionOnMachine;\n this.planningItemForm.controls.creel.patchValue(creel);\n\n this.creelPreviewMap = PreviewMap.ACTIVE;\n\n this.closeEditCreelMapping();\n this.planningItemChange.emit(this.getPlanningItem());\n }\n\n public canChangePlanningItemType(): boolean {\n return this.isAddingPlanningItem() || (!this.isPlanningItemOfTypeRun() && this.isPlanningItemStartDateAfterCurrentDate());\n }\n\n public updatePlanningItem(): void {\n const newPlanningItem = this.getPlanningItem();\n this.planningItemChange.emit(newPlanningItem);\n\n if (newPlanningItem instanceof PlanningMachineRun) {\n if ((newPlanningItem as PlanningMachineCarpetRun).planningOrders?.length === 0) {\n this.planningItemForm.controls.weaveProduct?.enable();\n this.planningItemForm.controls.tuftProduct?.enable();\n this.planningItemForm.controls.creel?.enable();\n this.planningItemForm.controls.machineQuality?.enable();\n } else {\n this.planningItemForm.controls.weaveProduct?.disable();\n this.planningItemForm.controls.tuftProduct?.disable();\n this.planningItemForm.controls.creel?.disable();\n this.planningItemForm.controls.machineQuality?.disable();\n }\n }\n }\n\n public canChangeRunProperties(): boolean {\n return this.isPlanningItemOfTypeRun() && !(this.planningItem as PlanningMachineRun).hasPlanningOrders;\n }\n\n public isCurrentPreviewModeActiveCreel(): boolean {\n return this.creelPreviewMap === PreviewMap.ACTIVE;\n }\n\n public isCurrentPreviewModeYarnType(): boolean {\n return this.creelPreviewType === PreviewType.YARN_TYPE;\n }\n\n public getMinDateForStartDate(): Date {\n return DateTime.fromJSDate(this.getCurrentDateForSubscriptionTimezone()).startOf('day').toJSDate();\n }\n\n public getMinDateForEndDate(): Date {\n const {startDate}: {startDate: Date} = this.getPlanningItemStartAndEndDate();\n const minimumAllowedDifferenceBetweenStartDateAndEndDateInMs = this.getMinimumAllowedDifferenceBetweenStartDateAndEndDateInMs();\n\n return DateTime.fromJSDate(startDate).plus({milliseconds: minimumAllowedDifferenceBetweenStartDateAndEndDateInMs}).startOf('day').toJSDate();\n }\n\n public onStartDateChange(event: MatDatepickerInputEvent): void {\n const newStartDate: DateTime = event.value;\n const currentStartDate: Date = DateTime.fromJSDate(this.planningItem.startDate).startOf('day').toJSDate();\n const minDateForStartDate = this.getMinDateForStartDate();\n const currentStartDateDateTime = DateTime.fromJSDate(currentStartDate);\n\n if (!AssertionUtils.isNullOrUndefined(newStartDate) && newStartDate >= DateTime.fromJSDate(minDateForStartDate) && currentStartDateDateTime !== newStartDate) {\n const endDate = this.planningItemForm.value.endDate;\n if (newStartDate > endDate) {\n this.planningItemForm.controls.endDate.setValue(newStartDate);\n }\n\n this.updateStartTimeWhenInThePast();\n } else if (AssertionUtils.isNullOrUndefined(newStartDate) || newStartDate < DateTime.fromJSDate(minDateForStartDate)) {\n this.planningItemForm.controls.startDate.setValue(currentStartDateDateTime);\n }\n }\n\n public onEndDateChange(event: MatDatepickerInputEvent): void {\n const newEndDate: DateTime = event.value;\n const currentEndDate: Date = DateTime.fromJSDate(this.planningItem.endDate).startOf('day').toJSDate();\n const minDateForEndDate = this.getMinDateForEndDate();\n const currentEndDateDateTime = DateTime.fromJSDate(currentEndDate);\n\n if (!AssertionUtils.isNullOrUndefined(newEndDate) && newEndDate >= DateTime.fromJSDate(minDateForEndDate) && currentEndDateDateTime !== newEndDate) {\n const {startDate, endDate} = this.getPlanningItemStartAndEndDate();\n\n const minimumAllowedDifferenceBetweenStartDateAndEndDateInMs = this.getMinimumAllowedDifferenceBetweenStartDateAndEndDateInMs();\n\n if (minimumAllowedDifferenceBetweenStartDateAndEndDateInMs > DateTime.fromJSDate(endDate).diff(DateTime.fromJSDate(startDate)).milliseconds) {\n const endTime = this.getTimeLabelFromDate(DateTime.fromJSDate(startDate).plus({milliseconds: minimumAllowedDifferenceBetweenStartDateAndEndDateInMs}).toJSDate());\n\n this.planningItemForm.controls.endTime.setValue(endTime);\n }\n\n this.updatePlanningItem();\n } else if (AssertionUtils.isNullOrUndefined(newEndDate) || newEndDate < DateTime.fromJSDate(minDateForEndDate)) {\n this.planningItemForm.controls.endDate.setValue(currentEndDateDateTime);\n }\n }\n\n public deletePlanningOrder(planningOrder: PlanningOrder): void {\n const planningOrders: PlanningOrder[] = this.getPlanningOrders().filter((order: PlanningOrder) => order.productionOrder.id !== planningOrder.productionOrder.id);\n\n this.reschedulePlanningOrders(planningOrders);\n this.updatePlanningItem();\n }\n\n public canShowProductionOrdersList(): boolean {\n return (\n (this.isPlanningItemCarpetRun() && this.isMachineQualitySelected() && this.isCreelSelected()) ||\n (this.isPlanningItemWeavingRun() && this.isWeaveProductSelected()) ||\n (this.isPlanningItemTuftingRun() && this.isTuftProductSelected())\n );\n }\n\n public addPlanningOrders(planningOrders: PlanningOrder[]): void {\n this.reschedulePlanningOrders([...this.getPlanningOrders(), ...planningOrders]);\n\n const {endDate} = this.getPlanningItemStartAndEndDate();\n const lastOrder = last(planningOrders);\n const lastendDate = DateTime.fromJSDate(lastOrder.endDate);\n\n if (DateTime.fromJSDate(endDate) < lastendDate) {\n this.planningItemForm.controls.endTime.setValue(this.getTimeLabelFromDate(lastOrder.endDate));\n this.planningItemForm.controls.endDate.setValue(lastendDate.startOf('day'));\n }\n\n this.updatePlanningItem();\n }\n\n public updatePlanningOrders(planningOrders: PlanningOrder[]): void {\n this.reschedulePlanningOrders(planningOrders);\n\n this.updatePlanningItem();\n }\n\n private setPlanningItemForm(): void {\n this.planningItemForm = this.formBuilder.group({\n type: this.formBuilder.control(PlanningItemType.MAINTENANCE, Validators.required),\n startDate: this.formBuilder.control(null, Validators.required),\n startTime: this.formBuilder.control(null, Validators.required),\n endDate: this.formBuilder.control(null, Validators.required),\n endTime: this.formBuilder.control(null, Validators.required)\n });\n\n if (this.isPlanningItemOfTypeRun()) {\n this.addRunSpecificFormControls();\n }\n }\n\n private getTimeLabelFromDate(date: Date): string {\n return this.dateTimePipe.transform(date, DateTimeFormat.TIME_SIMPLE);\n }\n\n private updateGenericPlanningItemFormValues(): void {\n const startDate = DateTime.fromJSDate(this.planningItem.startDate);\n const startTime = this.getTimeLabelFromDate(this.planningItem.startDate);\n\n const endDate = DateTime.fromJSDate(this.planningItem.endDate);\n const endTime = this.getTimeLabelFromDate(this.planningItem.endDate);\n\n if (this.planningItemForm) {\n this.planningItemForm.controls.type.setValue(this.planningItem.type);\n this.planningItemForm.controls.startDate.setValue(startDate.startOf('day'));\n this.planningItemForm.controls.startTime.setValue(startTime);\n this.planningItemForm.controls.endDate.setValue(endDate.startOf('day'));\n this.planningItemForm.controls.endTime.setValue(endTime);\n }\n\n if (this.canChangePlanningItemStartDate()) {\n this.planningItemForm.controls.startDate.enable();\n this.planningItemForm.controls.startTime.enable();\n } else {\n this.planningItemForm.controls.startDate.disable();\n this.planningItemForm.controls.startTime.disable();\n }\n\n if (!this.canEditForMachineType(this.machine.machineType)) {\n this.planningItemForm.disable();\n }\n }\n\n private canEditForMachineType(machineType: MachineType): boolean {\n if (this.planningItem instanceof PlanningMachineCarpetRun) {\n const planningCreel = this.planningItem.creel;\n this.creelsService\n .getPossibleCreelsForMachine(this.machine.id)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((creels: OverviewListCreel[]) => {\n this.setSelectedCreels([creels.find((creel: OverviewListCreel) => creel.id === planningCreel?.id)], planningCreel?.mappingForCurrentPositionOnMachine);\n });\n this.planningItemForm.controls.machineQuality?.setValue(this.planningItem.machineQuality);\n }\n\n switch (machineType) {\n case MachineType.CARPET_LOOM:\n case MachineType.VELVET:\n return this.currentSubscription?.hasPermission(this.CARPET_QUEUE_PERMISSION);\n case MachineType.TUFT:\n return this.currentSubscription?.hasPermission(this.TUFT_QUEUE_PERMISSION);\n case MachineType.WEAVING_MACHINE:\n return this.currentSubscription?.hasPermission(this.WEAVE_QUEUE_PERMISSION);\n default:\n return true;\n }\n }\n\n private updateRunSpecificFormValues(): void {\n const run = this.planningItem as PlanningMachineRun;\n this.planningItemForm.controls.planningOrders.setValue(cloneDeep(run.planningOrders));\n if (this.machine.machineType === MachineType.WEAVING_MACHINE) {\n this.updateWeavingRunSpecificFormValues(run as PlanningMachineWeavingRun);\n } else if (this.machine.machineType === MachineType.TUFT) {\n this.updateTuftingRunSpecificFormValues(run as PlanningMachineTuftingRun);\n } else {\n this.updateCarpetRunSpecificFormValues(run as PlanningMachineCarpetRun);\n }\n }\n\n private updateCarpetRunSpecificFormValues(run: PlanningMachineCarpetRun): void {\n this.planningItemForm.controls.machineQuality.setValue(run.machineQuality);\n this.planningItemForm.controls.creel.setValue(null);\n\n if (!AssertionUtils.isNullOrUndefined(run.creel) && !AssertionUtils.isNullOrUndefined(this.planningItem.id)) {\n if (this.newCreel) {\n this.setSelectedCreels([this.newCreel]);\n this.newCreel = null;\n } else {\n this.isLoadingCreel = true;\n this.getCreelSubscription = this.planning\n .getCreelForRun(this.planningItem.id)\n .pipe(\n finalize(() => (this.isLoadingCreel = false)),\n takeUntil(this.unSubscribeOnViewDestroy)\n )\n .subscribe((creel: OverviewListCreel) => {\n if (run?.creel?.mappingForCurrentPositionOnMachine) {\n creel.mappingForCurrentPositionOnMachine = run.creel.mappingForCurrentPositionOnMachine;\n } else if (AssertionUtils.isNullOrUndefined(creel.mappingForCurrentPositionOnMachine)) {\n creel.mappingForCurrentPositionOnMachine = creel.getOriginalMappingForCurrentPositionOnMachine();\n }\n\n this.planningItemForm.controls.creel.setValue(creel);\n\n this.updatePlanningItem();\n });\n }\n } else {\n this.updatePlanningItem();\n }\n\n const getFunctionsBasedOnDialogComponent = new Map([\n [SelectCreelComponent, {loadNewItem: ({newItemId}: NavigationNewItemData): void => this.setCreel(newItemId), reopenDialog: (): void => this.selectCreel()}],\n [SelectMachineQualityComponent, {loadNewItem: ({newItemId}: NavigationNewItemData): void => this.setQuality(newItemId), reopenDialog: (): void => this.selectMachineQuality()}]\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\n private updateWeavingRunSpecificFormValues(run: PlanningMachineWeavingRun): void {\n this.planningItemForm.controls.weaveProduct.setValue(run.weaveProduct);\n this.navigationHelperService.setNewItemOrReopenDialogIfPresent(\n ({newItemId}: NavigationNewItemData) => this.setWeaveProduct(newItemId),\n () => this.selectWeaveProduct()\n );\n }\n\n private updateTuftingRunSpecificFormValues(run: PlanningMachineTuftingRun): void {\n this.planningItemForm.controls.tuftProduct.setValue(run.tuftProduct);\n this.navigationHelperService.setNewItemOrReopenDialogIfPresent(\n ({newItemId}: NavigationNewItemData) => this.setTuftProduct(newItemId),\n () => this.selectTuftProduct()\n );\n }\n\n private getMillisecondsFromTimeLabel(timeLabel: string): number {\n const time = DateTime.fromFormat(timeLabel, timeLabel.includes('M') ? 'h:mm a' : 'H:mm');\n\n return Number(time.hour) * TimeUtils.HOUR_IN_MS + Number(time.minute) * TimeUtils.MINUTE_IN_MS;\n }\n\n private getPlanningItemStartAndEndDate(): {startDate: Date; endDate: Date} {\n let startDate: Date;\n if (this.planningItemForm.controls.startTime.disabled && this.planningItemForm.controls.startDate.disabled) {\n startDate = this.planningItem.startDate;\n } else {\n const startTimeInMs: number = this.getMillisecondsFromTimeLabel(this.planningItemForm.getRawValue().startTime);\n startDate = this.planningItemForm.getRawValue().startDate.plus({milliseconds: startTimeInMs}).toJSDate();\n }\n\n const endTimeInMs: number = this.getMillisecondsFromTimeLabel(this.planningItemForm.value.endTime);\n const endDate = this.planningItemForm.value.endDate?.plus({milliseconds: endTimeInMs}).toJSDate();\n\n return {startDate, endDate};\n }\n\n private getPlanningItem(): PlanningItem {\n const type = this.planningItemForm.value.type;\n let planningItem: PlanningItem;\n\n const {startDate, endDate}: {startDate: Date; endDate: Date} = this.getPlanningItemStartAndEndDate();\n\n if (type === PlanningItemType.RUN) {\n let planningOrders: PlanningOrder[] = [];\n let compatibleWithMachine = true;\n let creel: OverviewListCreel = null;\n let machineQuality: PlanningMachineQuality = null;\n let weaveProduct: PlanningWeaveProduct = null;\n let tuftProduct: PlanningTuftProduct = null;\n\n if (this.isPlanningItemOfTypeRun()) {\n ({compatibleWithMachine, planningOrders, creel, machineQuality, weaveProduct, tuftProduct} = this.getRunPlanningItemProperties({creel, machineQuality, weaveProduct, tuftProduct}));\n }\n\n if (this.machine.machineType === MachineType.WEAVING_MACHINE) {\n planningItem = new PlanningMachineWeavingRun(this.planningItem.id, weaveProduct, planningOrders, null, null, compatibleWithMachine);\n } else if (this.machine.machineType === MachineType.TUFT) {\n planningItem = new PlanningMachineTuftingRun(this.planningItem.id, tuftProduct, planningOrders, null, null, compatibleWithMachine);\n } else {\n planningItem = new PlanningMachineCarpetRun(\n this.planningItem.id,\n machineQuality,\n AssertionUtils.isNullOrUndefined(creel) ? null : PlanningCreel.fromOverviewListCreel(creel),\n planningOrders,\n null,\n null,\n compatibleWithMachine\n );\n }\n\n planningItem.reschedule(startDate, endDate);\n } else if (type === PlanningItemType.MAINTENANCE) {\n planningItem = new PlanningMachineMaintenance(this.planningItem.id, startDate, endDate);\n } else if (type === PlanningItemType.CREEL_CHANGE) {\n planningItem = new PlanningMachineCreelChange(this.planningItem.id, startDate, endDate);\n } else if (type === PlanningItemType.MACHINE_UNAVAILABLE) {\n planningItem = new PlanningMachineUnavailability(this.planningItem.id, startDate, endDate);\n } else if (type === PlanningItemType.WARP_CHANGE) {\n planningItem = new PlanningMachineWarpChange(this.planningItem.id, startDate, endDate);\n }\n\n return planningItem;\n }\n\n private setSelectedCreels(selectedCreels: OverviewListCreel[], mappingForCurrentPositionOnMachine: CreelMap[] = null): void {\n const newSelectedCreel = !isEmpty(selectedCreels) ? first(selectedCreels) : null;\n const currentSelectedCreel: OverviewListCreel = this.planningItemForm.getRawValue()?.creel;\n\n if (!AssertionUtils.isNullOrUndefined(newSelectedCreel) && (AssertionUtils.isNullOrUndefined(currentSelectedCreel) || newSelectedCreel.id !== currentSelectedCreel.id)) {\n this.resetCreelPreviewTypeAndPreviewMap();\n\n newSelectedCreel.mappingForCurrentPositionOnMachine = mappingForCurrentPositionOnMachine ? mappingForCurrentPositionOnMachine : newSelectedCreel.getOriginalMappingForCurrentPositionOnMachine();\n\n this.planningItemForm.controls.creel?.setValue(newSelectedCreel);\n\n this.updatePlanningItem();\n }\n }\n\n private getRunPlanningItemProperties({\n creel,\n machineQuality,\n weaveProduct,\n tuftProduct\n }: {\n creel: OverviewListCreel;\n machineQuality: PlanningMachineQuality;\n weaveProduct: PlanningWeaveProduct;\n tuftProduct: PlanningTuftProduct;\n }): {\n compatibleWithMachine: boolean;\n planningOrders: PlanningOrder[];\n creel: OverviewListCreel;\n machineQuality: PlanningMachineQuality;\n weaveProduct: PlanningWeaveProduct;\n tuftProduct: PlanningTuftProduct;\n } {\n const run = this.planningItem as PlanningMachineRun;\n const compatibleWithMachine = this.isAddingPlanningItem() || run.compatibleWithMachine;\n const planningOrders = this.planningItemForm.value?.planningOrders;\n if (run instanceof PlanningMachineCarpetRun) {\n creel = this.planningItemForm.getRawValue()?.creel;\n machineQuality = this.planningItemForm.getRawValue()?.machineQuality;\n } else if (run instanceof PlanningMachineWeavingRun) {\n weaveProduct = this.planningItemForm.getRawValue()?.weaveProduct;\n } else if (run instanceof PlanningMachineTuftingRun) {\n tuftProduct = this.planningItemForm.getRawValue()?.tuftProduct;\n }\n return {compatibleWithMachine, planningOrders, creel, machineQuality, weaveProduct, tuftProduct};\n }\n\n private addRunSpecificFormControls(): void {\n this.planningItemForm.addControl('planningOrders', this.formBuilder.control([]));\n if (this.machine.machineType === MachineType.WEAVING_MACHINE) {\n this.planningItemForm.addControl('weaveProduct', this.formBuilder.control({value: null, disabled: !this.canChangeRunProperties()}, Validators.required));\n } else if (this.machine.machineType === MachineType.TUFT) {\n this.planningItemForm.addControl('tuftProduct', this.formBuilder.control({value: null, disabled: !this.canChangeRunProperties()}, Validators.required));\n } else {\n this.planningItemForm.addControl('machineQuality', this.formBuilder.control({value: null, disabled: !this.canChangeRunProperties()}, Validators.required));\n this.planningItemForm.addControl('creel', this.formBuilder.control({value: null, disabled: !this.canChangeRunProperties()}, Validators.required));\n }\n }\n\n private removeRunSpecificFormControls(): void {\n this.planningItemForm.removeControl('planningOrders');\n this.planningItemForm.removeControl('machineQuality');\n this.planningItemForm.removeControl('creel');\n this.planningItemForm.removeControl('weaveProduct');\n this.planningItemForm.removeControl('tuftProduct');\n this.changeDetectorRef.detectChanges();\n }\n\n private resetCreelPreviewTypeAndPreviewMap(): void {\n this.creelPreviewMap = PreviewMap.THEORETICAL;\n this.creelPreviewType = PreviewType.COLOR;\n }\n\n private cancelGetCreelRequest(): void {\n if (!AssertionUtils.isNullOrUndefined(this.getCreelSubscription)) {\n this.getCreelSubscription.unsubscribe();\n this.getCreelSubscription = null;\n }\n }\n\n private getMinimumAllowedDifferenceBetweenStartDateAndEndDateInMs(): number {\n return this.planningItem instanceof PlanningMachineRun && this.planningItem.hasPlanningOrders\n ? DateTime.fromJSDate(last(this.planningItem.planningOrders).endDate).diff(DateTime.fromJSDate(this.planningItem.startDate)).milliseconds\n : TimeUtils.MINUTE_IN_MS;\n }\n\n private reschedulePlanningOrders(planningOrders: PlanningOrder[]): void {\n let {startDate} = this.getPlanningItemStartAndEndDate();\n for (const planningOrder of planningOrders) {\n planningOrder.updateStartWhilePreservingDuration(startDate);\n startDate = DateTime.fromJSDate(startDate).plus({milliseconds: planningOrder.totalRunningTimeInMs}).toJSDate();\n }\n\n this.planningItemForm.controls.planningOrders.setValue(planningOrders);\n }\n\n private getPlanningOrders(): PlanningOrder[] {\n return cloneDeep(this.planningItemForm.controls.planningOrders.value);\n }\n\n private getCurrentDateForSubscriptionTimezone(): Date {\n return TimezoneUtils.convertToDateWithCurrentOffset(new Date().toISOString(), this.authentication.getCurrentSubscription().timeZone.code);\n }\n\n private canChangePlanningItemStartDate(): boolean {\n return (this.planningItem instanceof PlanningMachineRun && !this.planningItem.executing) || (!(this.planningItem instanceof PlanningMachineRun) && this.isPlanningItemStartDateAfterCurrentDate());\n }\n\n private isPlanningItemStartDateAfterCurrentDate(): boolean {\n return DateTime.fromJSDate(this.planningItem.startDate) > DateTime.fromJSDate(this.getCurrentDateForSubscriptionTimezone());\n }\n\n private setCreel(id: number): void {\n this.creelsService\n .getPossibleCreelsForMachine(this.machine.id)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((creels: OverviewListCreel[]) => {\n this.newCreel = creels.find((creel: OverviewListCreel) => creel.id === id);\n this.setSelectedCreels([this.newCreel]);\n });\n }\n\n private setQuality(id: number): void {\n const parameters: Partial = {showOnlyLatestVersion: true};\n this.qualities\n .getAll(parameters)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((qualities: OverviewListMachineQuality[]) => {\n this.planningItemForm.controls.machineQuality.setValue(PlanningMachineQuality.fromOverviewListMachineQuality(qualities.find((quality: OverviewListMachineQuality) => quality.id === id)));\n this.updatePlanningItem();\n });\n }\n\n private setWeaveProduct(id: number): void {\n this.weaveProducts\n .getAll()\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((weaveProducts: OverviewListWeaveProduct[]) => {\n this.planningItemForm.controls.weaveProduct.setValue(PlanningWeaveProduct.fromOverviewListWeaveProduct(weaveProducts.find((weaveProduct: OverviewListWeaveProduct) => weaveProduct.id === id)));\n this.updatePlanningItem();\n });\n }\n\n private setTuftProduct(id: number): void {\n const parameters: Partial = {showOnlyLatestVersion: true};\n this.tuftProducts\n .getAllForMachineId(this.machine.id, parameters)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((tuftProducts: OverviewListTuftProduct[]) => {\n this.planningItemForm.controls.tuftProduct.setValue(PlanningTuftProduct.fromOverviewListTuftProduct(tuftProducts.find((tuftProduct: OverviewListTuftProduct) => tuftProduct.id === id)));\n this.updatePlanningItem();\n });\n }\n}\n","
\n \n \n \n \n
\n","import {Component, EventEmitter, Inject, Input, OnInit, Output} from '@angular/core';\nimport {NavigationHelperService} from '@application/helper/navigation-helper/navigation-helper.service';\nimport {PlanningItem} from '@domain/planning/planning-item';\nimport {PlanningItemType} from '@domain/planning/planning-item-type.enum';\nimport {PlanningMachine} from '@domain/planning/planning-machine';\nimport {PlanningMachineRun} from '@domain/planning/planning-machine-run';\nimport {Subscription} from '@domain/profile/subscription';\nimport {Authentication, AUTHENTICATION} from '@infrastructure/http/authentication/authentication';\nimport {AlertDialogResult, AssertionUtils, BaseComponent, DialogBuilderFactoryService, DialogType, moment, TimezoneUtils, TranslateService} from '@vdw/angular-component-library';\nimport {lowerCase} from 'lodash-es';\nimport {takeUntil} from 'rxjs/operators';\nimport {PlanningSidebarData} from '../../planning-sidebar-data.interface';\nimport {PlanningSidebarType} from '../planning-sidebar-type.enum';\n\n@Component({\n selector: 'app-planning-item-sidebar',\n templateUrl: './planning-item-sidebar.component.html',\n styleUrls: ['./planning-item-sidebar.component.scss']\n})\nexport class PlanningItemSidebarComponent extends BaseComponent implements OnInit {\n @Input() public planningItem: PlanningItem;\n @Input() public machine: PlanningMachine;\n @Output() public savePlanningItem: EventEmitter = new EventEmitter();\n @Output() public deletePlanningItem: EventEmitter = new EventEmitter();\n @Output() public closePlanningItem: EventEmitter = new EventEmitter();\n @Output() public planningItemChange: EventEmitter = new EventEmitter();\n @Output() public selectPlanningOrder: EventEmitter = new EventEmitter();\n\n private currentSubscription: Subscription;\n\n public constructor(\n @Inject(AUTHENTICATION) private readonly authentication: Authentication,\n private readonly translate: TranslateService,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n private readonly navigationHelperService: NavigationHelperService\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this.currentSubscription = this.authentication.getCurrentSubscription();\n }\n\n public onNavigationHelperDestroy(): void {\n this.navigationHelperService.savePartialState({\n sidebarType: PlanningSidebarType.PLANNING_ITEM,\n sidebarPlanningItem: this.planningItem,\n sidebarPlanningMachine: this.machine\n });\n }\n\n public canModifyPlanningItem(): boolean {\n let result = false;\n\n if (this.isAddingPlanningItem()) {\n result = true;\n } else {\n if (this.isPlanningItemOfTypeRun()) {\n const planningItem = this.planningItem as PlanningMachineRun;\n result = !planningItem.completed;\n } else {\n result = this.isPlanningItemEndDateAfterCurrentDate();\n }\n }\n\n return result;\n }\n\n public delete(): void {\n this.dialogBuilderFactoryService\n .getBuilder()\n .openAlertDialog({\n titleText: this.translate.instant('GENERAL.ACTIONS.DELETE_OBJECT', {object: lowerCase(this.translate.instant(`PLANNING.ADD_ITEM.TYPES.${PlanningItemType[this.planningItem.type]}`))}),\n messageText: this.translate.instant('GENERAL.ACTIONS.CONFIRM_DELETE_DESCRIPTION'),\n type: DialogType.CONFIRM_DELETE\n })\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((result: AlertDialogResult) => {\n if (result === AlertDialogResult.CONFIRM) {\n this.deletePlanningItem.emit();\n }\n });\n }\n\n public save(planningItem: PlanningItem): void {\n this.savePlanningItem.emit(planningItem);\n }\n\n public close(): void {\n this.closePlanningItem.emit();\n }\n\n public onPlanningItemChange(planningItem: PlanningItem): void {\n this.planningItemChange.emit(planningItem);\n }\n\n public onPlanningOrderSelected(planningOrderId: number): void {\n this.selectPlanningOrder.emit(planningOrderId);\n }\n\n private isPlanningItemEndDateAfterCurrentDate(): boolean {\n const momentCurrentDateForSubscriptionTimezone: Date = TimezoneUtils.convertToDateWithCurrentOffset(new Date().toISOString(), this.currentSubscription.timeZone.code);\n\n return moment(this.planningItem.endDate).isAfter(momentCurrentDateForSubscriptionTimezone);\n }\n\n private isPlanningItemOfTypeRun(): boolean {\n return this.planningItem.type === PlanningItemType.RUN;\n }\n\n private isAddingPlanningItem(): boolean {\n return AssertionUtils.isNullOrUndefined(this.planningItem.id);\n }\n}\n","
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n \n\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, Inject, Input, OnChanges, OnInit, Output, SimpleChanges} from '@angular/core';\nimport {Router} from '@angular/router';\nimport {componentEnterLeaveAnimation} from '@application/animations/component-enter-leave.animation';\nimport {PrintDocument} from '@application/command/print-document';\nimport {NavigationHelperService} from '@application/helper/navigation-helper/navigation-helper.service';\nimport {RouteUtils} from '@application/helper/routing/route-utils';\nimport {PlanningMachine} from '@domain/planning/planning-machine';\nimport {PlanningOrder} from '@domain/planning/planning-order';\nimport {PlanningOrderDetails} from '@domain/planning/planning-order-details';\nimport {ProductionOrderCustomSettings} from '@domain/production-schedule/custom-settings/production-order-custom-settings';\nimport {Permission} from '@domain/profile/permission.enum';\nimport {Subscription} from '@domain/profile/subscription';\nimport {YieldUnit} from '@domain/yield-unit.enum';\nimport {AUTHENTICATION, Authentication} from '@infrastructure/http/authentication/authentication';\nimport {Planning, PLANNING} from '@infrastructure/http/planning/planning';\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 {ProductionOrderLiteStatusChange} from '@infrastructure/signalr/production-order-lite/production-order-lite-status-change';\nimport {REALTIME_PRODUCTION_ORDER_LITE, RealtimeProductionOrderLite} from '@infrastructure/signalr/production-order-lite/realtime-production-order-lite';\nimport {ProductionOrderStatusChange} from '@infrastructure/signalr/production-order/production-order-status-change';\nimport {REALTIME_PRODUCTION_ORDER, RealtimeProductionOrder} from '@infrastructure/signalr/production-order/realtime-production-order';\nimport {ConfirmProductionOrderDeletionCommand} from '@presentation/pages/texfab/planning/confirm-production-order-deletion/confirm-production-order-deletion-command';\nimport {ConfirmProductionScheduleOnDesktopCommand} from '@presentation/pages/texfab/production-schedule/confirm/confirm-production-schedule-on-desktop-command';\nimport {ConfirmProductionScheduleOnDesktopResult} from '@presentation/pages/texfab/production-schedule/confirm/confirm-production-schedule-on-desktop-result';\nimport {AlertDialogResult, AssertionUtils, BaseComponent, DialogBuilderFactoryService, DialogType, Message, MessageType, ToastService, TranslateService} from '@vdw/angular-component-library';\nimport {isEqual, isNil, lowerCase, replace} from 'lodash-es';\nimport {forkJoin, Observable, of} from 'rxjs';\nimport {catchError, finalize, takeUntil} from 'rxjs/operators';\nimport {PlanningSidebarData} from '../../planning-sidebar-data.interface';\nimport {PlanningSidebarType} from '../planning-sidebar-type.enum';\n\n@Component({\n selector: 'app-planning-order-detail-sidebar',\n templateUrl: './planning-order-detail-sidebar.component.html',\n styleUrls: ['./planning-order-detail-sidebar.component.scss'],\n animations: [componentEnterLeaveAnimation()]\n})\nexport class PlanningOrderDetailSidebarComponent extends BaseComponent implements OnInit, OnChanges {\n @Input() public planningOrderId: number;\n @Output() public planningOrderDetailSidebarClose: EventEmitter = new EventEmitter();\n @Output() public delete: EventEmitter = new EventEmitter();\n\n public planningOrder: PlanningOrder;\n public machine: PlanningMachine;\n public canShowProcessAndQueueActions = true;\n public processAndQueueButtonsIsEnabled = true;\n public processing = false;\n public processingAndQueuing = false;\n public queuing = false;\n public reconfirmWarningMessage: Message[];\n\n public readonly dateFormat = 'dddd MMM D, YYYY';\n\n private productionOrdersCustomSettings: ProductionOrderCustomSettings;\n private reconfirming = false;\n private reconfirmed = false;\n private currentSubscription: Subscription;\n\n private readonly processAndQueueTranslationKey = 'PLANNING.ACTIONS.PROCESS_AND_QUEUE';\n private readonly queueTranslationKey = 'PLANNING.ACTIONS.QUEUE';\n\n public constructor(\n @Inject(PRODUCTION_ORDERS) private readonly productionOrders: ProductionOrders,\n @Inject(PLANNING) private readonly planning: Planning,\n @Inject(REALTIME_PRODUCTION_ORDER) private readonly realtimeProductionOrder: RealtimeProductionOrder,\n @Inject(REALTIME_PRODUCTION_ORDER_LITE) private readonly realtimeProductionOrderLite: RealtimeProductionOrderLite,\n @Inject(AUTHENTICATION) private readonly authentication: Authentication,\n private readonly httpProductionOrderCustomSettings: HttpProductionOrdersCustomSettingsService,\n private readonly toastService: ToastService,\n private readonly confirmProductionOrderDeletionCommand: ConfirmProductionOrderDeletionCommand,\n private readonly confirmProductionScheduleOnDesktopCommand: ConfirmProductionScheduleOnDesktopCommand,\n private readonly printDocument: PrintDocument,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n private readonly translate: TranslateService,\n private readonly router: Router,\n private readonly navigationHelperService: NavigationHelperService\n ) {\n super();\n }\n\n public ngOnInit(): void {\n this.currentSubscription = this.authentication.getCurrentSubscription();\n this.reconfirmWarningMessage = [new Message(null, this.translate.instant('PLANNING.WARNINGS.RECONFIRM'), MessageType.WARNING, null)];\n this.realtimeProductionOrder\n .getProductionOrdersStatusChanges()\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe(({id, status}: ProductionOrderStatusChange) => {\n if (this.planningOrder?.isCarpetOrder && id === this.planningOrder?.productionOrder.id) {\n this.planningOrder.productionOrder.status = status;\n this.canShowProcessAndQueueActions = true;\n }\n });\n\n this.realtimeProductionOrderLite\n .getProductionOrdersLiteStatusChanges()\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe(({id, status}: ProductionOrderLiteStatusChange) => {\n if (this.planningOrder?.isWeavingOrder && id === this.planningOrder?.productionOrder.id) {\n this.planningOrder.productionOrder.status = status;\n }\n });\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if ('planningOrderId' in changes && !isEqual(changes.planningOrderId.previousValue, this.planningOrderId)) {\n this.getPlanningOrderDetails();\n this.reconfirmed = false;\n }\n }\n\n public onNavigationHelperDestroy(): void {\n this.navigationHelperService.savePartialState({\n sidebarType: PlanningSidebarType.PLANNING_ORDER,\n sidebarPlanningOrderId: this.planningOrderId\n });\n }\n\n public closePlanningOrderDetail(): void {\n this.planningOrderDetailSidebarClose.emit();\n }\n\n public printWeavingOrderForProductionOrder(): void {\n forkJoin([\n this.productionOrders.getWeavingOrderXMLForProductionOrder(Number(this.planningOrder.productionOrder.id)),\n this.productionOrders.getWeavingOrderXSLTForProductionOrder(Number(this.planningOrder.productionOrder.id))\n ]).subscribe((result: [string, string]) => {\n this.printDocument.execute(result);\n });\n }\n\n public canViewProductionOrder(): boolean {\n return !this.isLoadingPlanningOrder() && !isNil(this.planningOrder.productionOrder.id);\n }\n\n public canViewActionsForPlanningOrder(): boolean {\n return this.planningOrder.canBeRescheduled() || this.canViewProductionOrder() || this.planningOrder.productionOrder.needsToBeReconfirmed();\n }\n\n public canRemoveOrder(): boolean {\n const hasPermissionToRemove =\n (this.planningOrder.isCarpetOrder && this.currentSubscription?.hasPermission(Permission.TEXFAB_CARPET_QUEUE)) ||\n (this.planningOrder.isWeavingOrder && this.currentSubscription?.hasPermission(Permission.TEXFAB_WEAVE_QUEUE)) ||\n (this.planningOrder.isTuftingOrder && this.currentSubscription?.hasPermission(Permission.TEXFAB_TUFT_QUEUE));\n\n return hasPermissionToRemove && this.planningOrder.canBeRescheduled();\n }\n\n public viewProductionOrder(): void {\n if (this.planningOrder.isCarpetOrder) {\n let path = RouteUtils.paths.texFab.productionOrder.editProductionOrder.absolutePath;\n if (this.hasPermissionToGoToNewBuilder()) {\n path = path + '/new';\n }\n this.router.navigate([replace(path, ':id', this.planningOrder.productionOrder.id.toString())]);\n } else if (this.planningOrder.isWeavingOrder) {\n this.router.navigate([replace(RouteUtils.paths.texFab.weaving.editProductionOrder.absolutePath, '/:id', ''), this.planningOrder.productionOrder.id]);\n } else if (this.planningOrder.isTuftingOrder) {\n this.router.navigate([replace(RouteUtils.paths.texFab.tufting.editProductionOrder.absolutePath, '/:id', ''), this.planningOrder.productionOrder.id]);\n }\n }\n\n public deletePlanningOrder(): void {\n const title = this.translate.instant('PLANNING.REMOVE_PRODUCTION_ORDER');\n const message = this.translate.instant('PLANNING.CONFIRM_PRODUCTION_ORDER_REMOVAL', {productionOrderName: this.planningOrder.productionOrder.name});\n\n this.confirmProductionOrderDeletionCommand\n .execute({title, message})\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe(() => {\n let deleteOrderCommand: Observable;\n if (this.planningOrder.isCarpetOrder) {\n deleteOrderCommand = this.planning.deletePlanningOrder(this.planningOrder.productionOrder.id);\n } else if (this.planningOrder.isWeavingOrder) {\n deleteOrderCommand = this.planning.deletePlanningOrderLite(this.planningOrder.productionOrder.id);\n } else if (this.planningOrder.isTuftingOrder) {\n deleteOrderCommand = this.planning.deletePlanningOrderLite(this.planningOrder.productionOrder.id);\n }\n deleteOrderCommand?.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe(() => {\n this.delete.emit();\n });\n });\n }\n\n public getValueForYield(): string {\n let result = '';\n\n if (!isNil(this.planningOrder.productionOrder.yield.planned)) {\n const yieldUnit = YieldUnit[YieldUnit.getYieldUnitForMachineType(this.machine.machineType)];\n const yieldUnitTranslation = !isNil(yieldUnit) ? this.translate.instant(`GENERAL.UNIT.${yieldUnit}`) : '';\n const yieldUnitSpacing = yieldUnit === YieldUnit[YieldUnit.METER] ? '' : ' ';\n result = `${this.planningOrder.productionOrder.yield.current}/${this.planningOrder.productionOrder.yield.planned}${yieldUnitSpacing}${yieldUnitTranslation}`;\n }\n\n return result;\n }\n\n public processProductionOrder(): void {\n if (!this.processingAndQueuing) {\n this.processing = true;\n this.planning\n .processProductionOrder(this.planningOrder.productionOrder.id)\n .pipe(\n takeUntil(this.unSubscribeOnViewDestroy),\n finalize(() => (this.processing = false))\n )\n .subscribe(() => {\n this.showInfoToast(this.translate.instant('PLANNING.PROCESSING', {name: this.planningOrder.productionOrder.name}));\n this.canShowProcessAndQueueActions = false;\n });\n }\n }\n\n public queueProductionOrder(): void {\n this.confirmAction(this.queueTranslationKey, () => {\n this.queuing = true;\n this.planning\n .queueProductionOrder(this.planningOrder.productionOrder.id)\n .pipe(\n takeUntil(this.unSubscribeOnViewDestroy),\n finalize(() => (this.queuing = false))\n )\n .subscribe(() => {\n this.showInfoToast(this.translate.instant('PLANNING.QUEUING', {name: this.planningOrder.productionOrder.name}));\n this.canShowProcessAndQueueActions = false;\n });\n });\n }\n\n public processAndQueueProductionOrder(): void {\n if (!this.processing) {\n this.confirmAction(this.processAndQueueTranslationKey, () => {\n this.processingAndQueuing = true;\n this.planning\n .processAndQueueProductionOrder(this.planningOrder.productionOrder.id)\n .pipe(\n takeUntil(this.unSubscribeOnViewDestroy),\n finalize(() => (this.processingAndQueuing = false))\n )\n .subscribe(() => {\n this.showInfoToast(this.translate.instant('PLANNING.PROCESSING_AND_QUEUING', {name: this.planningOrder.productionOrder.name}));\n this.canShowProcessAndQueueActions = false;\n });\n });\n }\n }\n\n public reconfirmProductionOrder(): void {\n if (!this.reconfirming) {\n this.reconfirming = true;\n\n if (AssertionUtils.isNullOrUndefined(this.productionOrdersCustomSettings)) {\n this.httpProductionOrderCustomSettings\n .get()\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((productionOrderCustomSettings: ProductionOrderCustomSettings) => {\n this.productionOrdersCustomSettings = productionOrderCustomSettings;\n this.getAndReconfirmProductionOrder();\n });\n } else {\n this.getAndReconfirmProductionOrder();\n }\n }\n }\n\n public canReconfirmProductionOrder(): boolean {\n return this.planningOrder.productionOrder.needsToBeReconfirmed() && !this.reconfirmed;\n }\n\n public isLoadingPlanningOrder(): boolean {\n return isNil(this.planningOrder);\n }\n\n private getPlanningOrderDetails(): void {\n this.planningOrder = null;\n\n this.planning\n .getPlanningOrderDetails(this.planningOrderId)\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe(({machine, planningOrder}: PlanningOrderDetails) => {\n this.planningOrder = planningOrder;\n this.machine = machine;\n this.getReadyToQueue();\n });\n }\n\n public getReadyToQueue(): void {\n if (!this.planningOrder.isCarpetOrder) {\n this.processAndQueueButtonsIsEnabled = false;\n return;\n }\n this.productionOrders\n .getReadyToQueue(this.planningOrder.productionOrder.id)\n .pipe(\n takeUntil(this.unSubscribeOnViewDestroy),\n catchError(() => {\n return of(false);\n })\n )\n .subscribe((isReadyToQueue: boolean) => {\n this.processAndQueueButtonsIsEnabled = isReadyToQueue;\n });\n }\n\n private hasPermissionToGoToNewBuilder(): boolean {\n return this.currentSubscription?.hasPermission(Permission.TEXFAB_NEW_BUILDER);\n }\n\n private showInfoToast(message: string): void {\n this.toastService.showInfo({\n tapToDismiss: true,\n timeOut: 5000,\n message\n });\n }\n\n private confirmAction(action: string, onConfirm: () => void): void {\n const actionTranslation = this.translate.instant(action);\n\n this.dialogBuilderFactoryService\n .getBuilder()\n .openAlertDialog({\n titleText: actionTranslation,\n messageText: this.translate.instant('PLANNING.CONFIRM_ACTION', {action: lowerCase(actionTranslation), name: this.planningOrder.productionOrder.name}),\n type: DialogType.CONFIRM\n })\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe((result: AlertDialogResult) => {\n if (isEqual(result, AlertDialogResult.CONFIRM)) {\n onConfirm();\n }\n });\n }\n\n private getAndReconfirmProductionOrder(): void {\n this.confirmProductionScheduleOnDesktopCommand\n .getAndConfirmProductionSchedule(this.planningOrder.productionOrder.id, this.productionOrdersCustomSettings)\n .pipe(\n finalize(() => (this.reconfirming = false)),\n takeUntil(this.unSubscribeOnViewDestroy)\n )\n .subscribe((confirmProductionScheduleOnDesktopResult: ConfirmProductionScheduleOnDesktopResult) => {\n if (isEqual(confirmProductionScheduleOnDesktopResult, ConfirmProductionScheduleOnDesktopResult.CONFIRMED)) {\n this.reconfirmed = true;\n }\n });\n }\n}\n","import {NgModule} from '@angular/core';\nimport {CREELS} from '@infrastructure/http/creel/creels';\nimport {HttpCreelsService} from '@infrastructure/http/creel/http-creels.service';\nimport {HttpMachineOverviewService} from '@infrastructure/http/machine-overview/http-machine-overview.service';\nimport {MACHINE_OVERVIEW} from '@infrastructure/http/machine-overview/machine-overview';\nimport {HttpPlanningService} from '@infrastructure/http/planning/http-planning.service';\nimport {PLANNING} from '@infrastructure/http/planning/planning';\nimport {HttpProductionOrdersWeavingService} from '@infrastructure/http/production-order-weaving/http-production-orders-weaving.service';\nimport {PRODUCTION_ORDERS_WEAVING} from '@infrastructure/http/production-order-weaving/production-orders-weaving';\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 {HttpWeaveProductsService} from '@infrastructure/http/weave-product/http-weave-products.service';\nimport {WEAVE_PRODUCT} from '@infrastructure/http/weave-product/weave-products.interface';\nimport {REALTIME_PLANNING} from '@infrastructure/signalr/planning/realtime-planning';\nimport {SignalrPlanningService} from '@infrastructure/signalr/planning/signalr-planning.service';\nimport {REALTIME_PRODUCTION_ORDER_LITE} from '@infrastructure/signalr/production-order-lite/realtime-production-order-lite';\nimport {SignalrProductionOrderLiteService} from '@infrastructure/signalr/production-order-lite/signalr-production-order-lite.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 {SharedModule} from '@shared/shared.module';\nimport {DelayedClassModule, PlanningDisplayModule, PlanningDragDropModule, SelectionListContainerModule, SelectionListModule} from '@vdw/angular-component-library';\nimport {ProductionScheduleSharedModule} from '../production-schedule/production-schedule-shared.module';\n\nimport {ConfirmProductionOrderDeletionCommand} from './confirm-production-order-deletion/confirm-production-order-deletion-command';\nimport {MachineFilterSettingsComponent} from './machine-filter-settings/machine-filter-settings.component';\nimport {PlanningDisplayContentComponent} from './planning-display-content/planning-display-content.component';\nimport {PlanningInactivitiyCardComponent} from './planning-inactivitiy-card/planning-inactivitiy-card.component';\nimport {PlanningOrderCardComponent} from './planning-order-card/planning-order-card.component';\nimport {PlanningSmallOrderCardInfoComponent} from './planning-order-card/planning-small-order-card-info/planning-small-order-card-info.component';\n\nimport {PLANNING_SCHEDULER} from './planning-scheduler/planning-scheduler';\nimport {PlanningSchedulerService} from './planning-scheduler/planning-scheduler.service';\nimport {PlanningContextService} from './planning-services/planning-context.service';\nimport {PlanningDragDropChangesService} from './planning-services/planning-drag-drop-changes.service';\nimport {PlanningOnboardingService} from './planning-services/planning-onboarding.service';\nimport {PlanningRealtimeChangesService} from './planning-services/planning-realtime-changes.service';\nimport {PlanningComponent} from './planning.component';\nimport {planningRouting} from './planning.routing';\nimport {ShowProductionOrderIncompatibleWithMachineAlertCommand} from './show-production-order-incompatible-with-machine-alert/show-production-order-incompatible-with-machine-alert-command';\nimport {MachineDetailSidebarComponent} from './sidebars/machine-detail-sidebar/machine-detail-sidebar.component';\nimport {NeedsAttentionSidebarComponent} from './sidebars/needs-attention-sidebar/needs-attention-sidebar.component';\nimport {OrderInfoComponent} from './sidebars/needs-attention-sidebar/order-info/order-info.component';\nimport {PlannedOrderCardComponent} from './sidebars/needs-attention-sidebar/planned-order-card/planned-order-card.component';\nimport {UnplannedOrderCardComponent} from './sidebars/needs-attention-sidebar/unplanned-order-card/unplanned-order-card.component';\nimport {PlanningItemDetailsComponent} from './sidebars/planning-item-sidebar/planning-item-details/planning-item-details.component';\nimport {ColoredYarnSetMapCardComponent} from './sidebars/planning-item-sidebar/planning-item-form/edit-creel-mapping/colored-yarn-set-map-card/colored-yarn-set-map-card.component';\nimport {EditCreelMappingComponent} from './sidebars/planning-item-sidebar/planning-item-form/edit-creel-mapping/edit-creel-mapping.component';\nimport {PlanningItemFormComponent} from './sidebars/planning-item-sidebar/planning-item-form/planning-item-form.component';\nimport {PlanningItemSidebarComponent} from './sidebars/planning-item-sidebar/planning-item-sidebar.component';\nimport {ProductionOrdersListComponent} from './sidebars/planning-item-sidebar/production-orders-list/production-orders-list.component';\nimport {SelectProductionOrderComponent} from './sidebars/planning-item-sidebar/production-orders-list/select-production-order/select-production-order.component';\nimport {PlanningOrderDetailSidebarComponent} from './sidebars/planning-order-detail-sidebar/planning-order-detail-sidebar.component';\nimport {PlanningSidebarsComponent} from './sidebars/planning-sidebars.component';\n\n@NgModule({\n imports: [SharedModule, planningRouting, ProductionScheduleSharedModule, PlanningDisplayModule, PlanningDragDropModule, SelectionListModule, SelectionListContainerModule, DelayedClassModule],\n providers: [\n {\n provide: PLANNING,\n useClass: HttpPlanningService\n },\n {\n provide: PLANNING_SCHEDULER,\n useClass: PlanningSchedulerService\n },\n {\n provide: MACHINE_OVERVIEW,\n useClass: HttpMachineOverviewService\n },\n {\n provide: PRODUCTION_ORDERS,\n useClass: HttpProductionOrdersService\n },\n {\n provide: REALTIME_PLANNING,\n useClass: SignalrPlanningService\n },\n {\n provide: REALTIME_PRODUCTION_ORDER,\n useClass: SignalrProductionOrderService\n },\n {\n provide: REALTIME_PRODUCTION_ORDER_LITE,\n useClass: SignalrProductionOrderLiteService\n },\n {\n provide: CREELS,\n useClass: HttpCreelsService\n },\n {\n provide: PRODUCTION_SCHEDULES,\n useClass: HttpProductionSchedulesService\n },\n {\n provide: PRODUCTION_ORDERS_WEAVING,\n useClass: HttpProductionOrdersWeavingService\n },\n {\n provide: WEAVE_PRODUCT,\n useClass: HttpWeaveProductsService\n },\n PlanningContextService,\n PlanningOnboardingService,\n ConfirmProductionOrderDeletionCommand,\n PlanningRealtimeChangesService,\n PlanningDragDropChangesService,\n ShowProductionOrderIncompatibleWithMachineAlertCommand\n ],\n declarations: [\n ColoredYarnSetMapCardComponent,\n EditCreelMappingComponent,\n MachineDetailSidebarComponent,\n NeedsAttentionSidebarComponent,\n OrderInfoComponent,\n PlannedOrderCardComponent,\n PlanningItemDetailsComponent,\n PlanningItemFormComponent,\n PlanningItemSidebarComponent,\n PlanningOrderDetailSidebarComponent,\n ProductionOrdersListComponent,\n SelectProductionOrderComponent,\n UnplannedOrderCardComponent,\n PlanningComponent,\n PlanningDisplayContentComponent,\n PlanningSidebarsComponent,\n PlanningOrderCardComponent,\n PlanningInactivitiyCardComponent,\n PlanningSmallOrderCardInfoComponent,\n PlanningOrderCardComponent,\n MachineFilterSettingsComponent\n ],\n exports: [NeedsAttentionSidebarComponent, MachineDetailSidebarComponent, PlanningItemSidebarComponent, PlanningOrderDetailSidebarComponent]\n})\nexport class PlanningModule {}\n","import arrayPush from './_arrayPush.js';\nimport baseFlatten from './_baseFlatten.js';\nimport copyArray from './_copyArray.js';\nimport isArray from './isArray.js';\n\n/**\n * Creates a new array concatenating `array` with any additional arrays\n * and/or values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to concatenate.\n * @param {...*} [values] The values to concatenate.\n * @returns {Array} Returns the new concatenated array.\n * @example\n *\n * var array = [1];\n * var other = _.concat(array, 2, [3], [[4]]);\n *\n * console.log(other);\n * // => [1, 2, 3, [4]]\n *\n * console.log(array);\n * // => [1]\n */\nfunction concat() {\n var length = arguments.length;\n if (!length) {\n return [];\n }\n var args = Array(length - 1),\n array = arguments[0],\n index = length;\n\n while (index--) {\n args[index - 1] = arguments[index];\n }\n return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\n}\n\nexport default concat;\n","import createCompounder from './_createCompounder.js';\n\n/**\n * Converts `string` to\n * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the kebab cased string.\n * @example\n *\n * _.kebabCase('Foo Bar');\n * // => 'foo-bar'\n *\n * _.kebabCase('fooBar');\n * // => 'foo-bar'\n *\n * _.kebabCase('__FOO_BAR__');\n * // => 'foo-bar'\n */\nvar kebabCase = createCompounder(function(result, word, index) {\n return result + (index ? '-' : '') + word.toLowerCase();\n});\n\nexport default kebabCase;\n","import baseSlice from './_baseSlice.js';\nimport isIterateeCall from './_isIterateeCall.js';\nimport toInteger from './toInteger.js';\n\n/**\n * Creates a slice of `array` from `start` up to, but not including, `end`.\n *\n * **Note:** This method is used instead of\n * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\n * returned.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction slice(array, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\n start = 0;\n end = length;\n }\n else {\n start = start == null ? 0 : toInteger(start);\n end = end === undefined ? length : toInteger(end);\n }\n return baseSlice(array, start, end);\n}\n\nexport default slice;\n"],"x_google_ignoreList":[41,42,43]}