{"version":3,"sources":["components/platform-optimization/PlatformSettings.module.scss","components/layout/Notification.module.scss","components/layout/navigation/NavigationItemWithChildren.module.scss","components/platform-optimization/PlatformResults.module.scss","components/platform-optimization/AlgorithmCard.module.scss","components/layout/navigation/LoadedTTData.module.scss","components/platform-optimization/PlatformConnectionsWithConflicts.module.scss","components/platform-optimization/steps/OptimizationSettingsStep.module.scss","components/general/Checkbox.module.scss","components/platform-optimization/lines/LineSettings.module.scss","components/layout/navigation/Navigation.module.scss","components/layout/navigation/UserSettings.module.scss","components/platform-optimization/lines/AddNewLineSetting.module.scss","components/layout/NotificationStack.module.scss","components/layout/Layout.module.scss","components/general/DatePicker.module.scss","components/general/CrwsStationsSelect.module.scss","components/platform-optimization/OptimizationStationSelect.module.scss","contexts/NotificationsContext.tsx","utils/randomGenerator.ts","contexts/NotificationsReducer.ts","models/PlatformOptimizationModels.ts","utils/urls.ts","contexts/LayoutContext.tsx","contexts/AuthContext.tsx","contexts/LayoutReducer.ts","contexts/OptimizePlatformsPageContext.tsx","components/general/HelpButton.tsx","components/general/HelpSidebar.tsx","components/general/Help.tsx","components/help/PlatformsOptimizationResultsHelp.tsx","contexts/PlatformsToolContext.tsx","contexts/PlatformsToolReducer.ts","models/LinesToPlatformsOptions.ts","hooks/data/useStationApi.ts","hooks/data/useConnectionsApi.ts","utils/lineTypesUtils.tsx","utils/platformSettingsUtils.ts","utils/arrayUtils.ts","contexts/PlatformsOptimizationReducer.ts","contexts/PlatformsOptimizationContext.tsx","utils/otherUtils.ts","utils/applyOptimizationResultsUtils.ts","utils/syncfusionGridUtils.ts","hooks/useSignalRPlatformOptimization.ts","utils/connectionUtils.ts","utils/connectionToPlatformTypeUtils.ts","components/platform-optimization/results/AssignConnectionsToPlatformForm.tsx","components/platform-optimization/ApplyOptimizationResultsOptionsDialog.tsx","components/platform-optimization/ApplyOptimizationResultsButton.tsx","hooks/data/useLinesToPlatformsOptionsApi.ts","hooks/platform-optimization/usePlatformsActions.ts","components/platform-optimization/lines/LinesList.tsx","components/general/Checkbox.tsx","components/platform-optimization/PlatformConnectionsWithConflicts.tsx","components/platform-optimization/PlatformResults.tsx","components/platform-optimization/PlatformsResults.tsx","utils/windowUtils.ts","components/platform-optimization/steps/OptimizationResultsStep.tsx","utils/algorithmModeUtils.ts","utils/platformUtils.ts","hooks/useStoredContext.tsx","hooks/data/useDbStoredOptimizationSettings.ts","components/help/PlatformsOptimizationSettingsHelp.tsx","components/platform-optimization/AlgorithmCard.tsx","components/platform-optimization/AlgorithmModeSelector.tsx","components/platform-optimization/lines/AddNewLineSetting.tsx","components/platform-optimization/lines/LineNumber.tsx","components/platform-optimization/lines/LineSettings.tsx","components/platform-optimization/lines/LinesSettings.tsx","components/platform-optimization/OptimizationProgress.tsx","utils/lineSettingsUtils.ts","hooks/platform-optimization/useLineSettings.tsx","hooks/data/useMinimalLinesSettingsApi.ts","hooks/useEffectOnce.ts","components/layout/navigation/UserSettings.tsx","utils/lineUtils.ts","hooks/platform-optimization/usePlatformSettings.ts","components/platform-optimization/lines/UnassignedLinesList.tsx","components/platform-optimization/lines/UnassignedLinesListDialog.tsx","components/platform-optimization/PlatformSettings.tsx","components/platform-optimization/PlatformsSettings.tsx","hooks/data/usePlatformsSettingsApi.ts","hooks/data/useLinesApi.ts","components/platform-optimization/steps/OptimizationSettingsStep.tsx","pages/OptimizePlatformsPage.tsx","components/layout/navigation/LoginNavigation.tsx","components/layout/navigation/NavigationItemWithChildren.tsx","components/layout/navigation/NavigationItem.tsx","config/i18n.ts","components/layout/navigation/LoadedTTData.tsx","config/cldr.ts","translations/syncfusionOverrides.ts","components/layout/navigation/Navigation.tsx","utils/generalValues.ts","components/layout/Footer.tsx","components/general/Notification.tsx","components/layout/NotificationStack.tsx","components/layout/Layout.tsx","utils/timeUtils.ts","hooks/useDebounce.ts","components/connections/ConnectionsGrid.tsx","utils/dateUtils.ts","components/general/DatePicker.tsx","components/general/ImageBase64Input.tsx","components/others/PrintTimetablesDialog.tsx","hooks/data/useTimetablesExportApi.ts","components/others/PrintTimetablesButton.tsx","hooks/data/useST2Api.ts","components/general/FileInput.tsx","components/platform-optimization/ImportExportST2Buttons.tsx","components/platform-optimization/StoreAndLoadConnectionsButtons.tsx","components/general/StatisticsListItem.tsx","components/connections/ConnectionsStatisticsListItem.tsx","components/platforms/PlatformsStatisticsListItem.tsx","components/stations/StationStatistics.tsx","hooks/data/useStationStatisticsApi.ts","hooks/data/useRemoveConnectionsByFilterApi.ts","utils/connectionTypeUtils.ts","components/connections/RemoveConnectionsSettings.tsx","components/connections/ConnectionsStatsAndActions.tsx","components/help/PlatformsConnectionsHelp.tsx","components/layout/Toolbar.tsx","pages/StationConnectionsPage.tsx","hooks/data/useFilterConnectionsByDateApi.ts","utils/ttDatesUtils.ts","components/general/ImageWithPreview.tsx","components/general/CrwsStationsSelect.tsx","components/platform-optimization/OptimizationStationSelect.tsx","pages/StationSelectPage.tsx","hooks/useEventListener.ts","hooks/useLocalStorage.ts","hooks/useAppVersionChecker.ts","routes/AppRoutes.tsx","config/muiTheme.ts","App.tsx","reportWebVitals.ts","index.tsx"],"names":["module","exports","NotificationType","generateID","first","Math","random","second","toString","slice","ADD_NOTIFICATION","REMOVE_NOTIFICATION","NotificationReducer","state","action","type","newNotification","newNotificationId","notifications","concat","id","autoDismissAfterSeconds","disableAutoDismiss","undefined","addNotification","value","filter","_","removeNotification","State","LineType","ConnectionType","AlgorithmModeDto","initialState","NotificationsContext","createContext","dispatch","NotificationsContextProvider","props","useReducer","Provider","children","useNotificationsContext","notificationsDispatch","useContext","useCallback","notification","LayoutWidth","apiBaseUrl","wssBaseUrl","assetsBaseUrl","signalRUrls","optimize","platforms","apiUrls","navigation","login","logout","stations","mask","station","connections","stationId","connectionsEndingRemoval","connectionsDateFilter","export","st2","optimizationSettings","stationStatistics","platformsSettings","linesSettings","lines","linesToPlatformsOptions","timetables","apply","store","upload","appUrls","pattern","withParams","date","formatISO","representation","assetsUrls","fileName","filename","otherUrls","lineNumber","slovakia","czechRepublic","AuthContext","user","setUser","isUserLoggedIn","onUnauthorizedRequest","AuthContextProvider","t","useTranslation","history","useHistory","useState","push","Warning","title","body","useEffect","axios","interceptors","response","use","error","status","Promise","reject","useAuthContext","SET_STATE","LayoutReducer","setState","OptimizationStep","width","Full","alignContentItemsCenter","isWithFooter","LayoutContext","useLayoutContext","LayoutContextProvider","buttonWidth","buttonHeight","iconColor","HelpButton","palette","useTheme","Box","sx","position","right","left","top","marginTop","overflow","Button","onClick","variant","display","flexDirection","justifyContent","height","backgroundColor","primary","main","borderColor","Stack","direction","transition","alignItems","color","HelpSidebar","Drawer","anchor","open","onClose","IconButton","minWidth","maxWidth","px","overflowY","Help","isOpen","setIsOpen","PlatformsOptimizationResultsHelp","i18n","language","Typography","style","paddingLeft","href","target","mt","AlgorithmMode","OptimizePlatformsPageContext","previousStep","DefineSettings","currentStep","changeStep","OptimizePlatformsPageProvider","setPreviousStep","setCurrentStep","step","useMemo","useOptimizePlatformsPageContext","context","Error","RESET_CONTEXT","SET_SELECTED_STATION","SET_SELECTED_STATION_ID","SET_IS_LOADING_SELECTED_STATION","SET_CONNECTIONS_DATE_FILTER","SET_ALL_CONNECTIONS","SET_IS_LOADING_CONNECTIONS","SET_FILTERED_CONNECTIONS","PlatformsToolReducer","setAllConnections","newValue","isLoadingConnections","setIsLoadingConnections","selectedStation","setSelectedStation","isLoading","isLoadingSelectedStation","setIsLoadingSelectedStation","selectedStationId","setSelectedStationId","setConnectionsDateFilter","filteredConnections","setFilteredConnections","options","initialPlatformsToolContextState","keepSelectedStation","resetContext","ConnectionToPlatformTypeDto","PlatformsToolContext","reloadConnections","PlatformsToolContextProvider","useAxios","url","manual","data","loading","fetch","returnData","setReturnData","useStationApi","isLoadingStation","stationError","fetchAxios","forceReload","useConnectionsApi","connectionsError","usePlatformsToolContext","allLineTypes","cityTransport","suburban","longDistance","international","getLineTypeDescription","lineType","getUnassignedLineTypes","availableLineTypes","unassignedLineTypes","some","allowedTypes","getUnassignedLineTypesError","platformType","length","textBefore","textAfter","map","join","validateLineTypesOnPlatforms","arrivalsOnly","unassignedLineTypesOnNormalPlatforms","unassignedLineTypesOnArrivalsOnlyPlatforms","getLineTypesObjectFromDto","lineTypes","includes","getDtoFromLineTypesObject","toReturn","isPlatformNameValid","name","isMinMinutesBetweenConnectionsValid","minMinutes","isAllowedLineTypesValid","allowedLineTypes","platformSettingsValidators","isValid","all","platformSettings","minMinutesBetweenConnections","platformName","getDistinctFromArray","arr","getProp","result","i","currentItem","groupBy","currentProp","resultItem","find","key","items","groupByTwo","getProp1","getProp2","result1","result2","currentProp1","currentProp2","resultItem1","resultItem2","group1","group2","getArrayStatusOfBooleans","includesTrue","includesFalse","semiNumericSortFn","a","b","aNumber","parseInt","bNumber","localeCompare","sortBySemiNumeric","array","sort","removeIndicesFromArray","indices","isBadIndex","forEach","index","getWordyEnumerationOfArray","SET_ALL_PLATFORMS_SETTINGS","ADD_PLATFORM_SETTING","SET_PLATFORM_SETTING","REMOVE_PLATFORM_SETTING","SET_ALL_LINE_TYPES","ADD_LINE_SETTINGS","SET_LINE_SETTINGS","REMOVE_LINE_SETTINGS","SET_ALL_LINES_SETTINGS","SET_ALL_LINES","SET_ALGORITHM_MODE","SET_RESULTS","getUnusedLines","allLines","__","line","PlatformsOptimizationReducer","setAllPlatformsSettings","assignedLines","addPlatformSettings","payload","newPlatforms","findIndex","newSettings","setPlatformSettings","removePlatformSettings","setAllLineTypes","lineSettings","newLineSettings","newUnusedLines","unusedLines","unusedLineIndex","splice","addLineSettings","newState","setLineSettings","removeLineSettings","lineOnPlatforms","setAllLinesSettings","setAllLines","mode","algorithmMode","setAlgorithmMode","results","setResults","initialPlatformsOptimizationContextState","ConflictCount","PlatformsOptimizationContext","PlatformsOptimizationContextProvider","usePlatformsOptimizationContext","stateWithConnections","setConnections","addNewPlatformSetting","setPlatformSetting","platform","removePlatformSetting","setLineSetting","lineSetting","removeLineSetting","unwrap","item","getAssignmentsFromOptions","possiblePlatforms","connectionsType","getOptionsWithMultiplePlatforms","ConnectionState","mapSyncfusionPredicateToLocalPredicate","predicate","isComplex","condition","predicates","field","operator","getPredicateResult","compare","getComplexPredicateResult","getNonComplexPredicateResult","reduce","prev","curr","getConditionFn","getCurrentPageFromItems","skip","take","startIndex","endIndex","filterConnections","getFilterFnByGridFilter","getPropComparerFromConnectionGridItem","compareByOperator","getConnectionIdKey","connection","ttIndex","getConnectionsOnPlatforms","renamePlatformInConnections","oldPlatformName","newPlatformName","isEndingConnection","departureTime","removeNonEndingConnectionsFromPlatform","assignConnectionsToPlatformsByCriteria","optimizationResultConnections","criteria","connectionsToCopyFrom","modifyDestinationConnectionBeforeCopy","connectionsToCopyFromMap","connectionToCopyFrom","modifiedDestinationConnection","copyPlatformsFromConnections","itemCriteria","All","NonEnding","Ending","getConnectionToPlatformTypeDescription","connectionType","HoverStack","styled","theme","borderRadius","shape","padding","spacing","alpha","secondary","light","AssignConnectionsToPlatformForm","isDetailsOpen","setIsDetailsOpen","selectId","option","selectLabelId","sortedConnections","gap","flexWrap","flexGrow","transform","fontWeight","Chip","label","toLowerCase","size","FormControl","m","InputLabel","Select","labelId","selected","onChange","newPlatform","onOptionsChange","MenuItem","Collapse","in","ApplyOptimizationResultsOptionsDialog","setOptions","newOptions","Dialog","keepMounted","DialogTitle","DialogContent","Alert","severity","mb","DialogActions","userCriteria","onApply","mr","ApplyOptimizationResultsButton","allConnections","method","optimizationResultId","resultId","console","log","useLinesToPlatformsOptionsApi","fetchLinesToPlatformsOptions","isLoadingOptions","linesToPlatforms","setLinesToPlatforms","wasApplied","setWasApplied","loadLinesToPlatformsOptions","optimizationResult","lineToPlatformsOptions","optionsWithMultiplePlatforms","newConnections","afterApply","LoadingButton","disabled","startIcon","my","whiteSpace","usePlatformsActions","removeLineFromAllPlatforms","lineId","removeConnectionsOfLineFromAllPlatforms","lineOnPlatformsCount","rightHoverSelector","LineTypography","background","zIndex","fontSize","ConnectionsCountTypography","StyledBox","marginBottom","marginRight","boxShadow","cursor","opacity","LinesList","deleteConfirmation","setDeleteConfirmation","sortedLines","cancelDeleteLine","className","connsCount","cx","window","onLineClick","borderBottomRightRadius","borderTopRightRadius","Divider","orientation","flexItem","isRemovingAllowed","removeLineFromPlatform","allPlatforms","onLineDeleteClick","onAddLine","DialogContentText","ml","Checkbox","styles","checkbox","checked","circle","PlatformConnectionsWithConflicts","isConflictsOnly","setIsConflictsOnly","getConflict","currentIndex","firstConnection","secondConnection","requiredExit","abs","arrivalTime","requiredEntry","getConflictElement","conflict","getTime","minutes","minutesUnformatted","floor","connectionsWithConflicts","previousHadConflict","conflictWithNext","hasConflictWithPrevious","Fragment","connectionWrapper","fixedTimeWidth","icon","faClock","lineWithConnection","PlatformResults","isDetailVisible","setIsDetailVisible","platformResults","borderSuccess","conflicts","borderWarning","borderError","minGap","maxGap","displayOnHover","faInfo","Modal","show","onHide","Header","closeButton","ModalBody","PlatformsResults","areResultsApplied","setAreResultsApplied","showForm","scrollTo","behavior","faChevronLeft","faChevronRight","format","platformsResults","faExchangeAlt","OptimizationResultsStep","layoutDispatch","svgBg","serverMethods","clientMethods","getDtoFromAlgorithmMode","ConflictSize","RegularizedConflictSize","platformDtoToPlatformSettings","assignedLineTypes","getPlatformsHoldingLines","exitPlatformsNames","isCountingForLine","linesPlatformsIterated","isExitPlatform","currentConnection","currentLine","currentPlatform","useStoredOptimizationSettings","platformsToolState","requestBodyMemo","useCache","storedSettings","isFetching","fetchError","isUpdating","updateError","updateAxios","update","settings","useDbStoredOptimizationSettings","dbStoredSettings","maxCountOfPlatforms","applyStoredSettings","getAlgorithmModeFromDto","showDialogUseStoredSettings","Success","closeFn","saveSettingsInternal","hasStoredSettings","saveSettings","then","catch","PlatformsOptimizationSettingsHelp","typographyProps","AlgorithmCard","algorithmCard","isSelected","faCheck","checkIcon","description","AlgorithmModeSelector","setSelectedMode","AddNewLineSetting","lineSelectOptions","setLineSelectOptions","selectedLine","setSelectedLine","select","placeholder","defaultValue","noOptionsMessage","selectedItem","onLineChange","exitPlatformsName","onSave","onCancel","LineNumber","LineSettings","setError","maxPlatformsCountInputRef","createRef","setMaxAllowedPlatforms","newMaxCountOfPlatforms","isNaN","current","isDeleteEnabled","deleteButton","faTrash","ref","maxPlatformsInput","onBlur","count","Tooltip","LinesSettings","isAddNewSettingVisible","setIsAddNewSettingVisible","unmountOnExit","OptimizationProgress","render","originalEstimatedTime","remainingTime","buttonProgressbarWrapper","buttonProgressbar","animationDuration","getLineSettingsFromDto","dto","emptyConnections","useLineSettings","settingsDispatch","fetchLinesSettingsAxios","fetchLinesSettings","fetchMinimalLinesSettings","useMinimalLinesSettingsApi","getPreviousLineSettings","fixLinesSettings","showNotification","overridePlatformSettings","exitPlatforms","minimalLinesSettings","adjustmentsAndAdvices","indicesToRemove","minimalLineSettings","existingLineSettings","platformCount","remainingLinesSettings","remainingLinesPlatformsCount","Neutral","marginLeft","isRefreshingLinesSettings","useEffectOnce","AppCookie","effect","getLinesOnPlatformFromConnections","usePlatformSettings","wasChanged","useRef","onArrivalsOnlyChange","newAssignedLines","deletePlatform","toggleAllowedType","isCurrentlyAllowed","removeConnectionsWithLineTypeFromPlatform","addConnectionsToPlatform","connectionsToAdd","selectedConnections","getKey","addConnectionsToPlatformFn","newAssignedLinesAndLineTypes","groups","getLinesAndLineTypesOnPlatformFromConnections","removeConnectionsWithLineFromPlatform","UnassignedLinesList","connectionsFilter","getConnectionsOnPlatformsGroupedByLines","mx","UnassignedLinesListDialog","dialogProps","PlatformSettings","isAddLineVisible","setIsAddLineVisible","nameRef","minMinutesBetweenConnectionsRef","resetPreviousPlatformName","setMinMinutesBetweenConnections","newMinutes","dialogPropsMemo","isInvalid","nameInput","newName","setName","setInput","buttonGroup","faTimes","allowedTypeIcon","FormGroup","FormControlLabel","control","py","emptyConnectionsArray","PlatformsSettings","fetchPlatformsSettingsAxios","fetchPlatformsSettings","usePlatformsSettingsApi","defaultPlatformsSettings","fetchLinesAxios","fetchLines","useLinesApi","init","newPlatformSettings","newLines","isAddPlatformDisabled","getUnassignedLineTypesErrors","clearPlatformsInAllConnections","faPlus","src","alt","OptimizationSettingsStep","onResult","onError","Date","signalRConnection","setSignalRConnection","Connecting","signalRConnectionState","setSignalRConnectionState","hasStartedOptimization","setHasStartedOptimization","isRequestQueued","setIsRequestQueued","optimizationId","setOptimizationId","optimizationCancelRequested","setOptimizationCancelRequested","setOriginalEstimatedTime","setRemainingTime","remainingTimeDecreaseFn","setRemainingTimeDecreaseFn","resetComponentState","clearInterval","startSignalR","signalR","start","Connected","Disconnected","onSignalRConnectionClosed","setupSignalR","newSignalRConnection","withUrl","configureLogging","withAutomaticReconnect","build","on","setInterval","onreconnecting","onreconnected","onclose","stop","getAllowedLineTypes","getRequestOptimizeSettings","optimizeForDate","allowedLineIds","allowedConnectionIds","justForGettingOff","startOptimizing","args","serverMethod","invoke","cancelOptimization","useSignalRPlatformOptimization","ShowResults","wasUseStoredSettingsDialogShown","setWasUseStoredSettingsDialogShown","Fixed","isAlgorithmStartAllowed","every","isEveryLineTypeAssigned","bgTransparentBlack","actingDescription","progressBar","loadingIndicator","goToStatistics","faSave","CircularProgress","faPlay","OptimizePlatformsPage","params","useParams","urlStationId","urlDate","parseISO","optimizationDispatch","toDateString","LoginNavigation","Dropdown","Toggle","transparentBg","border","faUser","Menu","alignRight","Item","location","borderBottom","dividerAfterItem","NavigationItemWithChildren","NavigationItem","AppLanguage","UserSettings","useCookies","Object","values","cookies","setCookies","exportProvidersCookie","ExportProviders","exportRegionAlwaysCookie","ExportRegionAlways","navigationStyles","cursorInitial","LoadedTTData","loadedBusTTData","loadedTTData","loadedTrainTTData","limit","max","dropdownItems","textTransform","validDates","createdAt","loadedTTDataMenuItem","iconWrapper","hasMoreData","year","oldestBusDataYear","placement","defaultAppLanguage","Slovak","resources","sk","translation","cs","changeCldrLanguage","loadCldr","numberingSystems","skCaGregorian","skNumbers","skTimeZoneNames","weekData","L10n","load","skCulture","csCaGregorian","csNumbers","csTimeZoneNames","overrideSyncfusionTranslationsCs","csCulture","setCulture","Navigation","changeLanguage","Navbar","expand","Brand","logo","Nav","rightDivider","mainItems","loginItems","registerUrl","loginUrl","faqRegisterUrl","Footer","appEmail","process","getFullYear","rel","faEnvelope","faMobileAlt","Notification","timeout","setTimeout","clearTimeout","onRemove","borderNtf","borderNtfOk","borderNtfWarning","borderNtfFail","getBorderCssByType","header","ntfProgress","NotificationStack","notificationsStack","Layout","content","backgroundImage","container","padTimeTo2Chars","numberTimeToString","time","useDebounce","delay","debouncedValue","setDebouncedValue","timer","nameOfConnection","nameOfConnectionId","ConnectionsGrid","grid","setGrid","sortBy","searchQuery","filterBy","pagingAndSorting","setPagingAndSorting","processedConnections","idFlattened","arrival","departure","lineTypeDescription","calendar","gridConnections","uppercaseSearchQuery","toLocaleUpperCase","lineName","provider","searchInConnections","sortFns","sortByElement","x","by","reverse","sortConnections","debouncedGridConnections","dataSource","alignRightProps","headerTextAlign","textAlign","allowGrouping","allowFiltering","allowSorting","allowPaging","toolbar","groupSettings","disablePageWiseAggregates","filterSettings","editSettings","allowEditing","allowEditOnDblClick","pageSettings","pageSize","dataSourceChanged","primaryKeyValue","editedConnection","itemIndex","getConnectionByIdWithError","onConnectionChange","endEdit","dataStateChange","requestType","where","searchString","newSearchString","sorted","rowHeight","headerText","isPrimaryKey","autoFit","commands","buttonOption","iconCss","cssClass","services","Group","Sort","Filter","Toolbar","Search","Resize","Page","Edit","CommandColumn","getSecondDecemberSaturday","startDecember","isSaturday","nextSaturday","todayMidnight","set","hours","seconds","milliseconds","DatePicker","datepicker","firstDayOfWeek","getBase64","file","resolve","reader","FileReader","onload","onerror","readAsDataURL","ImageBase64Input","setIsLoading","htmlId","imageUpload","e","maxImageSize","maxImageSizeMB","files","base64","inputAccept","acceptOnlyFormats","htmlFor","accept","hidden","component","buttonText","allowClear","defaultProps","PrintTimetablesDialog","setTitle","subtitle","setSubtitle","validFromDate","setValidFromDate","logoBase64","setLogoBase64","errors","setErrors","getPdf","downloadUrl","setDownloadUrl","exportToPdf","requestBody","zipFileDownloadUrl","useTimetablesExportApi","isExporting","onGenerateClick","stationName","stationState","replace","validFrom","canExport","TextField","event","helperText","change","openOnFocus","showTodayButton","showClearButton","backgroundSize","backgroundRepeat","backgroundPosition","PrintTimetablesButton","fullWidth","useStoreST2Api","loadingStore","storeST2","loadingApply","applyST2","loadingUpload","uploadST2","storeConnectionsToST2","assignPlatformsByST2","uploadST2AndAssignPlatformsByST2","formData","FormData","append","JSON","stringify","FileInput","handleFileChange","onFileUpload","acceptExtension","button","ImportExportST2Buttons","exportAxios","exportFile","link","document","createElement","fileId","click","changedConnections","onConnectionsChange","ButtonGroup","disableElevation","borderRight","borderTopLeftRadius","borderBottomLeftRadius","StoreAndLoadConnectionsButtons","applyStoredST2","storeConnections","CenteredFixedWidthBox","descriptionSx","StatisticsListItem","sum","statistics","ListItem","ListItemButton","ListItemIcon","ListItemText","Skeleton","Grid","xs","ConnectionsStatisticsListItem","outgoing","transit","ending","PlatformsStatisticsListItem","gettingOn","gettingOff","gettingOnAndOff","ListItemWithSkeleton","text","StationStatistics","fetchStatistics","useStationStatisticsApi","showSkeleton","List","dense","linesCount","linesWithoutPlatformCount","platformsCountStatistics","connectionsCountStatistics","connectionsWithoutPlatformCountStatistics","useRemoveConnectionsByFilterApi","filterConnectionsAxios","connectionTypes","postData","getDtoFromConnectionTypesObject","getConnectionTypeDescription","connectionTypeSortFn","toNumber","RemoveConnectionsSettings","lineTypesToRemove","setLineTypesToRemove","connectionTypesToRemove","setConnectionTypesToRemove","allConnectionTypes","getConnectionTypeFromConnection","isRemovingEndingConnections","filterConnectionsAndStoreThem","lineTypesCheckStatus","connectionTypesCheckStatus","disableRipple","stopPropagation","md","indeterminate","StyledPaper","Paper","paddingBottom","ConnectionsStatsAndActions","singleDateFormatted","elevation","selectedDateConnections","isFilteringConnections","PlatformsConnectionsHelp","leftContent","middleContent","rightContent","setHours","StationConnectionsPage","useFilterConnectionsByDateApi","filterConnectionsByDate","isOnlyValidConnections","filterConnectionsByDateAndSetToState","currentDate","previousConnections","newConnectionsStart","newConnectionsEnd","onConnectionsDateFilterChange","min","getMonth","ImageWithPreview","fullScreen","useMediaQuery","breakpoints","down","CrwsStationsSelect","inputValue","setInputValue","debouncedInputValue","isLoadingStations","loadingError","fetchStations","filterOption","onInputChange","loadingMessage","backspaceRemovesValue","isClearable","OptimizationStationSelect","whiteShadow","onStationChange","StationSelectPage","optimizationState","keepSelectedDate","hasPlatformsLicense","useEventListener","eventName","handler","element","savedHandler","targetElement","addEventListener","eventListener","removeEventListener","localStorageKeys","v1","useLocalStorage","initialValue","readValue","localStorage","getItem","parse","parseJSON","warn","storedValue","setStoredValue","handleStorageChange","Function","setItem","dispatchEvent","Event","useAppVersionChecker","appVersion","setAppVersion","cache","fetchedAppVersion","reload","AppRoutes","path","exact","createTheme","typography","fontFamily","h5","ttBoard","success","warning","components","MuiButton","variants","lineHeight","styleOverrides","root","ownerState","grey","containedPrimary","common","white","containedSecondary","contained","MuiListItemButton","MuiLinearProgress","MuiInputLabel","letterSpacing","App","CookiesProvider","basename","ThemeProvider","reportWebVitals","onPerfEntry","getCLS","getFID","getFCP","getLCP","getTTFB","registerSyncfusionLicense","initReactI18next","lng","interpolation","escapeValue","ReactDOM","StrictMode","getElementById"],"mappings":"iHACAA,EAAOC,QAAU,CAAC,iBAAmB,2CAA2C,UAAY,oCAAoC,UAAY,oCAAoC,gBAAkB,0CAA0C,YAAc,sCAAsC,SAAW,mCAAmC,SAAW,mCAAmC,cAAgB,wCAAwC,aAAe,uCAAuC,cAAgB,wCAAwC,SAAW,mCAAmC,aAAe,uCAAuC,eAAiB,2C,oBCAvpBD,EAAOC,QAAU,CAAC,YAAc,kCAAkC,qBAAuB,2CAA2C,aAAe,mCAAmC,OAAS,6BAA6B,KAAO,2BAA2B,UAAY,gCAAgC,YAAc,kCAAkC,cAAgB,oCAAoC,iBAAmB,yC,oBCAjaD,EAAOC,QAAU,CAAC,cAAgB,oD,oBCAlCD,EAAOC,QAAU,CAAC,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,IAA/CorB,EAA8C,EAA9CA,OAAQC,EAAsC,EAAtCA,OAAQC,EAA8B,EAA9BA,OAAQC,EAAsB,EAAtBA,OAAQC,EAAc,EAAdA,QAC3DJ,EAAOD,GACPE,EAAOF,GACPG,EAAOH,GACPI,EAAOJ,GACPK,EAAQL,QCAdM,aACE,wFAGF1a,GAAmBN,IhDKjB7uB,KACG7D,IAAI2tC,MACJjjB,KAAK,CACJkjB,IAAKlb,GACLmb,cAAe,CACbC,aAAa,GAEflb,egDTNmb,IAAS9oB,OACP,cAAC,IAAM+oB,WAAP,UACE,cAAC,GAAD,MAEFnM,SAASoM,eAAe,SAM1Bd,O","file":"static/js/main.e402b1ce.chunk.js","sourcesContent":["// extracted by mini-css-extract-plugin\nmodule.exports = {\"platformSettings\":\"PlatformSettings_platformSettings__3GTBX\",\"isInvalid\":\"PlatformSettings_isInvalid__3a9AV\",\"nameInput\":\"PlatformSettings_nameInput__3GAD6\",\"allowedTypeIcon\":\"PlatformSettings_allowedTypeIcon__t3oJS\",\"buttonGroup\":\"PlatformSettings_buttonGroup__2m2dN\",\"suburban\":\"PlatformSettings_suburban__e7fb0\",\"selected\":\"PlatformSettings_selected__JJJrP\",\"cityTransport\":\"PlatformSettings_cityTransport__3VAQh\",\"longDistance\":\"PlatformSettings_longDistance__3jdCC\",\"international\":\"PlatformSettings_international__3wkxJ\",\"checkbox\":\"PlatformSettings_checkbox__3ScEV\",\"deleteButton\":\"PlatformSettings_deleteButton__2heUJ\",\"displayOnHover\":\"PlatformSettings_displayOnHover__PhSXq\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"ntfProgress\":\"Notification_ntfProgress__2C-br\",\"ntfProgressKeyframes\":\"Notification_ntfProgressKeyframes__66INy\",\"notification\":\"Notification_notification__P7Cnw\",\"header\":\"Notification_header__3fYGz\",\"body\":\"Notification_body__2CLpZ\",\"borderNtf\":\"Notification_borderNtf__2eV1Q\",\"borderNtfOk\":\"Notification_borderNtfOk__1FOd2\",\"borderNtfFail\":\"Notification_borderNtfFail__1okQr\",\"borderNtfWarning\":\"Notification_borderNtfWarning__3-02g\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"transparentBg\":\"NavigationItemWithChildren_transparentBg__1Y28d\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"platformResults\":\"PlatformResults_platformResults__1u7O7\",\"platformName\":\"PlatformResults_platformName__k7F2z\",\"borderSuccess\":\"PlatformResults_borderSuccess__1bslr\",\"borderWarning\":\"PlatformResults_borderWarning__3m-X3\",\"borderError\":\"PlatformResults_borderError__3XvPR\",\"displayOnHover\":\"PlatformResults_displayOnHover__3VWzA\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"algorithmCard\":\"AlgorithmCard_algorithmCard__UfJ0h\",\"selected\":\"AlgorithmCard_selected__BW-AS\",\"title\":\"AlgorithmCard_title__1VCdT\",\"description\":\"AlgorithmCard_description__1vklm\",\"checkIcon\":\"AlgorithmCard_checkIcon__b6T1k\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"loadedTTDataMenuItem\":\"LoadedTTData_loadedTTDataMenuItem__2MjSQ\",\"iconWrapper\":\"LoadedTTData_iconWrapper__dJQ70\",\"cursorInitial\":\"LoadedTTData_cursorInitial__3iiIH\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"connectionWrapper\":\"PlatformConnectionsWithConflicts_connectionWrapper__39fz6\",\"fixedTimeWidth\":\"PlatformConnectionsWithConflicts_fixedTimeWidth__Zx7ql\",\"lineWithConnection\":\"PlatformConnectionsWithConflicts_lineWithConnection__2urfp\",\"line\":\"PlatformConnectionsWithConflicts_line__KY_VI\",\"connection\":\"PlatformConnectionsWithConflicts_connection__15ykH\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"buttonProgressbarWrapper\":\"OptimizationSettingsStep_buttonProgressbarWrapper__3ecW4\",\"buttonProgressbar\":\"OptimizationSettingsStep_buttonProgressbar__2qMpi\",\"progressbarKeyframes\":\"OptimizationSettingsStep_progressbarKeyframes__FXR15\",\"bgTransparentBlack\":\"OptimizationSettingsStep_bgTransparentBlack__2PAl4\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"checkbox\":\"Checkbox_checkbox__3MVV0\",\"checked\":\"Checkbox_checked__2VuWb\",\"circle\":\"Checkbox_circle__3ruzY\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"lineSettings\":\"LineSettings_lineSettings__1WMul\",\"maxPlatformsInput\":\"LineSettings_maxPlatformsInput__o3e7Y\",\"displayOnHover\":\"LineSettings_displayOnHover__3oWm8\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"navigation\":\"Navigation_navigation__1wgOC\",\"logo\":\"Navigation_logo__3000r\",\"buttonTransparentDark\":\"Navigation_buttonTransparentDark__ncloh\",\"rightDivider\":\"Navigation_rightDivider__lkbCO\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"cursorInitial\":\"UserSettings_cursorInitial__3QOUT\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"select\":\"AddNewLineSetting_select__2Q15U\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"notificationsStack\":\"NotificationStack_notificationsStack__2xyzO\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"content\":\"Layout_content__3fVJV\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"datepicker\":\"DatePicker_datepicker__2GNZo\",\"select\":\"DatePicker_select__hZFWw\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"select\":\"CrwsStationsSelect_select__25znm\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"whiteShadow\":\"OptimizationStationSelect_whiteShadow__3LrfU\",\"dropWhiteShadow\":\"OptimizationStationSelect_dropWhiteShadow__2PPQd\"};","import React, {\r\n createContext,\r\n Dispatch,\r\n FC,\r\n ReactElement,\r\n useCallback,\r\n useContext,\r\n useReducer,\r\n} from 'react'\r\nimport {\r\n ADD_NOTIFICATION,\r\n NotificationActionType,\r\n NotificationReducer,\r\n} from './NotificationsReducer'\r\n\r\nexport enum NotificationType {\r\n Neutral,\r\n Success,\r\n Error,\r\n Warning,\r\n}\r\n\r\nexport interface Notification {\r\n id: string\r\n title: string\r\n body?: string | ReactElement | ((closeFn: () => void) => ReactElement)\r\n type?: NotificationType\r\n autoDismissAfterSeconds?: number\r\n disableAutoDismiss?: boolean\r\n}\r\n\r\nexport interface NotificationsState {\r\n notifications: Notification[]\r\n}\r\n\r\nconst initialState: NotificationsState = {\r\n notifications: [],\r\n}\r\n\r\nconst NotificationsContext = createContext<{\r\n state: NotificationsState\r\n dispatch: Dispatch\r\n}>({\r\n state: initialState,\r\n dispatch: () => {},\r\n})\r\n\r\nconst NotificationsContextProvider: FC = (props) => {\r\n const [state, dispatch] = useReducer(NotificationReducer, initialState)\r\n\r\n return (\r\n \r\n {props.children}\r\n \r\n )\r\n}\r\n\r\nexport const useNotificationsContext = () => {\r\n const { dispatch: notificationsDispatch } = useContext(NotificationsContext)\r\n\r\n const addNotification = useCallback(\r\n (notification: Omit) =>\r\n notificationsDispatch({\r\n type: ADD_NOTIFICATION,\r\n value: notification,\r\n }),\r\n [notificationsDispatch]\r\n )\r\n\r\n return {\r\n addNotification: addNotification,\r\n }\r\n}\r\n\r\nexport { NotificationsContext, NotificationsContextProvider }\r\n","const generateID = (): string => {\r\n const first = (Math.random() * 46656) | 0;\r\n const second = (Math.random() * 46656) | 0;\r\n\r\n return ('000' + first.toString(36)).slice(-3) + ('000' + second.toString(36)).slice(-3);\r\n}\r\n\r\nexport default generateID","/* Action constants */\r\nimport { Notification, NotificationsState } from './NotificationsContext'\r\nimport generateID from '../utils/randomGenerator'\r\n\r\nexport const ADD_NOTIFICATION = 'notifications/add'\r\nexport const REMOVE_NOTIFICATION = 'notifications/remove'\r\n\r\n/* Action interfaces */\r\nexport interface AddNotificationAction {\r\n type: typeof ADD_NOTIFICATION\r\n value: Omit\r\n}\r\n\r\nexport interface RemoveNotificationAction {\r\n type: typeof REMOVE_NOTIFICATION\r\n value: string\r\n}\r\n\r\n/* Action functions */\r\nconst addNotification = (\r\n newNotification: Omit,\r\n state: NotificationsState\r\n): NotificationsState => {\r\n const newNotificationId = generateID()\r\n const defaultAutoDismissAfterSeconds = 6\r\n\r\n return {\r\n notifications: state.notifications.concat({\r\n ...newNotification,\r\n id: newNotificationId,\r\n autoDismissAfterSeconds:\r\n newNotification.autoDismissAfterSeconds ?? newNotification.disableAutoDismiss\r\n ? undefined\r\n : defaultAutoDismissAfterSeconds,\r\n }),\r\n }\r\n}\r\nconst removeNotification = (id: string, state: NotificationsState): NotificationsState => {\r\n return { notifications: state.notifications.filter((_) => _.id !== id) }\r\n}\r\n\r\nexport type NotificationActionType = AddNotificationAction | RemoveNotificationAction\r\n\r\nexport const NotificationReducer = (\r\n state: NotificationsState,\r\n action: NotificationActionType\r\n): NotificationsState => {\r\n switch (action.type) {\r\n case ADD_NOTIFICATION:\r\n return addNotification(action.value, state)\r\n case REMOVE_NOTIFICATION:\r\n return removeNotification(action.value, state)\r\n default:\r\n return state\r\n }\r\n}\r\n","export interface StationDto {\r\n id: number\r\n name: string\r\n state?: State\r\n}\r\n\r\nexport enum State {\r\n slovakia = 'slovakia',\r\n czechRepublic = 'czechRepublic',\r\n}\r\nexport enum LineType {\r\n suburban = 'suburban',\r\n cityTransport = 'cityTransport',\r\n longDistance = 'longDistance',\r\n international = 'international',\r\n}\r\n\r\nexport enum ConnectionType {\r\n outgoing = 'outgoing',\r\n transit = 'transit',\r\n ending = 'ending',\r\n}\r\n\r\nexport interface ConnectionId {\r\n id: string\r\n ttIndex: string\r\n}\r\n\r\nexport interface PlatformConnectionsConflictDto {\r\n conflictSize: number\r\n firstConnectionId: ConnectionId\r\n secondConnectionId: ConnectionId\r\n}\r\n\r\nexport interface PlatformDto {\r\n name: string\r\n assignedLines: LineOnPlatformDto[]\r\n assignedLineTypes: LineType[]\r\n arrivalsOnly: boolean\r\n}\r\n\r\nexport interface ConnectionDto {\r\n id: ConnectionId\r\n name: string\r\n arrivalTime: number\r\n departureTime: number\r\n lineNumber: string\r\n lineName: string\r\n provider: string\r\n platform: string\r\n lineType: LineType\r\n destination: string\r\n destinations?: string[]\r\n calendar: CalendarDto\r\n}\r\n\r\nexport interface CalendarDto { \r\n dateStart: string\r\n days: string\r\n}\r\n\r\nexport interface LineDto {\r\n id: string\r\n name: string\r\n lineType: LineType\r\n}\r\n\r\nexport interface LineOnPlatformDto {\r\n line: LineDto\r\n connsCount: number\r\n}\r\n\r\nexport interface StationPlatformsOptimizationResultDto {\r\n resultId: string\r\n platformsResults: PlatformOptimizationResultDto[]\r\n connections: ConnectionDto[]\r\n}\r\n\r\nexport interface PlatformOptimizationResultDto {\r\n platformName: string\r\n minGap: number\r\n maxGap: number\r\n arrivalsOnly: boolean\r\n conflicts: PlatformConnectionsConflictDto[]\r\n lines: LineOnPlatformDto[]\r\n connections: ConnectionDto[]\r\n requiredEntry: number\r\n requiredExit: number\r\n}\r\n\r\nexport interface PlatformOptimizationSettingsDto {\r\n connections: ConnectionDto[]\r\n platformsSettings: PlatformOptimizationPlatformSettingDto[]\r\n linesSettings: PlatformOptimizationLineSettingDto[]\r\n allLines: LineDto[]\r\n allLineTypes: LineType[]\r\n algorithmMode: AlgorithmModeDto\r\n}\r\n\r\nexport type PlatformOptimizationSettingsCreateStoredDto = {\r\n connections: ConnectionDto[]\r\n}\r\n\r\nexport type PlatformOptimizationSettingsToStoreDto = Omit<\r\n PlatformOptimizationSettingsDto,\r\n | 'previousStep'\r\n | 'step'\r\n | 'selectedStation'\r\n | 'selectedStationId'\r\n | 'isLoadingSelectedStation'\r\n | 'selectedDate'\r\n | 'allLineTypes'\r\n | 'allLines'\r\n | 'unusedLines'\r\n | 'results'\r\n>\r\n\r\nexport interface PlatformOptimizationPlatformSettingDto {\r\n name: string\r\n minMinutesBetweenConnections: number\r\n allowedLineTypes: LineType[]\r\n assignedLines: LineOnPlatformDto[]\r\n arrivalsOnly: boolean\r\n}\r\n\r\nexport interface PlatformOptimizationLineSettingDto {\r\n line: LineDto\r\n lineOnPlatforms: string[]\r\n maxCountOfPlatforms: number\r\n}\r\n\r\nexport enum AlgorithmModeDto {\r\n ConflictCount = 'conflictCount',\r\n ConflictSize = 'conflictSize',\r\n RegularizedConflictSize = 'regularizedConflictSize',\r\n}\r\n","import { formatISO } from 'date-fns';\r\nimport { State } from \"../models/PlatformOptimizationModels\";\r\n\r\n// export const apiServerBaseUrl = process.env.REACT_APP_API_URL\r\nexport const apiServerBaseUrl = ''\r\nexport const apiBaseUrl = `${apiServerBaseUrl}/api`\r\nexport const wssBaseUrl = `${apiServerBaseUrl}/wss`\r\nexport const assetsBaseUrl = `https://assets.inprop.sk`\r\n\r\nexport const signalRUrls = {\r\n optimize: {\r\n platforms: `${wssBaseUrl}/optimization/platform`,\r\n },\r\n}\r\n\r\nexport const apiUrls = {\r\n navigation: `${apiBaseUrl}/navigation`,\r\n login: `${apiBaseUrl}/auth/login`,\r\n logout: `${apiBaseUrl}/auth/logout`,\r\n stations: (mask: string): string => `${apiBaseUrl}/stations?mask=${mask}`,\r\n station: (id: number): string => `${apiBaseUrl}/stations/${id}`,\r\n connections: (stationId: number) => `${apiBaseUrl}/connections?stationId=${stationId}`,\r\n connectionsEndingRemoval: `${apiBaseUrl}/connections/removal`,\r\n connectionsDateFilter: `${apiBaseUrl}/connections/date-filter`,\r\n export: {\r\n st2: (id?: string) => `${apiBaseUrl}/export/st2/${id || ''}`,\r\n },\r\n optimizationSettings: (stationId: number) => `${apiBaseUrl}/optimizationsettings/${stationId}`,\r\n stationStatistics: () => `${apiBaseUrl}/stationstatistics`,\r\n platformsSettings: `${apiBaseUrl}/platformsettings`,\r\n linesSettings: `${apiBaseUrl}/linesettings`,\r\n lines: `${apiBaseUrl}/lines`,\r\n linesToPlatformsOptions: `${apiBaseUrl}/lines-to-platforms-options`,\r\n timetables: {\r\n export: `${apiBaseUrl}/tt-board`,\r\n },\r\n st2: {\r\n apply: `${apiBaseUrl}/connections/platforms-by-stored-st2`,\r\n store: `${apiBaseUrl}/st2`,\r\n upload: `${apiBaseUrl}/st2/upload`\r\n }\r\n}\r\n\r\nexport const appUrls = {\r\n home: '/',\r\n connections: {\r\n pattern: '/station/:stationId/connections',\r\n withParams: (stationId: number) => `/station/${stationId}/connections`,\r\n },\r\n optimizePlatforms: {\r\n pattern: '/optimize/:stationId/:date',\r\n withParams: (stationId: number, date: Date) =>\r\n `/optimize/${stationId}/${formatISO(date, { representation: 'date' })}`,\r\n },\r\n login: '/login',\r\n}\r\n\r\nexport const assetsUrls = {\r\n svg: (fileName: string) => `${assetsBaseUrl}/svg/${fileName}.svg`,\r\n jpg: (fileName: string) => `${assetsBaseUrl}/jpg/${fileName}.jpg`,\r\n png: (fileName: string) => `${assetsBaseUrl}/png/${fileName}.png`,\r\n help: (filename: string) => `/images/help/${filename}.png`\r\n}\r\n\r\nexport const otherUrls = {\r\n lineTimetable: (lineNumber: string, state: State) =>\r\n state === State.slovakia \r\n ? `http://portal.cp.sk/Search.aspx?c=7&mi=2&find=${lineNumber}`\r\n : state === State.czechRepublic\r\n ?`http://portal.idos.cz/Search.aspx?c=7&mi=2&find=${lineNumber}`\r\n : undefined\r\n}\r\n","import React, {createContext, Dispatch, FC, ReactElement, useContext, useReducer} from 'react'\r\nimport {LayoutActionType, LayoutReducer} from \"./LayoutReducer\";\r\n\r\nexport enum LayoutWidth {\r\n Full = 'full',\r\n Fixed = 'fixed',\r\n}\r\n\r\nexport interface LayoutState {\r\n width?: LayoutWidth\r\n alignContentItemsCenter?: boolean\r\n isWithFooter?: boolean\r\n svgBg?: string\r\n}\r\n\r\nconst initialState: LayoutState = {\r\n width: LayoutWidth.Full,\r\n alignContentItemsCenter: false,\r\n isWithFooter: true\r\n}\r\n\r\nconst LayoutContext = createContext<{\r\n state: LayoutState\r\n dispatch: Dispatch\r\n}>({\r\n state: initialState,\r\n dispatch: () => {},\r\n})\r\n\r\nconst useLayoutContext = () => useContext(LayoutContext)\r\n\r\nconst LayoutContextProvider: FC = (props) => {\r\n const [state, dispatch] = useReducer(LayoutReducer, initialState)\r\n\r\n return (\r\n \r\n {props.children}\r\n \r\n )\r\n}\r\n\r\nexport { LayoutContext, LayoutContextProvider, useLayoutContext }\r\n","import axios from 'axios'\r\nimport React, {\r\n createContext,\r\n Dispatch,\r\n FC,\r\n SetStateAction,\r\n useContext,\r\n useEffect,\r\n useState,\r\n} from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { useHistory } from 'react-router-dom'\r\nimport { UserDto } from '../models/UserDto'\r\nimport { appUrls } from '../utils/urls'\r\nimport { NotificationsContext, NotificationType } from './NotificationsContext'\r\nimport { ADD_NOTIFICATION } from './NotificationsReducer'\r\n\r\ninterface AuthContext {\r\n user: UserDto | undefined\r\n setUser: Dispatch>\r\n isUserLoggedIn: boolean\r\n onUnauthorizedRequest: () => void\r\n}\r\n\r\nexport const AuthContext = createContext({\r\n user: undefined,\r\n setUser: () => {},\r\n isUserLoggedIn: false,\r\n onUnauthorizedRequest: () => {},\r\n})\r\n\r\nconst AuthContextProvider: FC = ({ children }) => {\r\n const { t } = useTranslation()\r\n\r\n const { dispatch: notificationsDispatch } = useContext(NotificationsContext)\r\n const history = useHistory()\r\n\r\n const [user, setUser] = useState()\r\n\r\n const onUnauthorizedRequest = () => {\r\n setUser(undefined)\r\n history.push(appUrls.login)\r\n\r\n notificationsDispatch({\r\n type: ADD_NOTIFICATION,\r\n value: {\r\n type: NotificationType.Warning,\r\n title: t(\"You don't have access to this page\"),\r\n body: t(\r\n 'You are not logged in or you were automatically logged out because of security reasons. Please, log in.'\r\n ),\r\n autoDismissAfterSeconds: 10,\r\n },\r\n })\r\n }\r\n\r\n useEffect(() => {\r\n axios.interceptors.response.use(\r\n (response) => {\r\n return response\r\n },\r\n (error) => {\r\n if (401 === error?.response?.status) {\r\n onUnauthorizedRequest()\r\n } else {\r\n return Promise.reject(error)\r\n }\r\n }\r\n )\r\n }, [])\r\n\r\n return (\r\n \r\n {children}\r\n \r\n )\r\n}\r\n\r\nconst useAuthContext = () => useContext(AuthContext)\r\n\r\nexport { AuthContextProvider, useAuthContext }\r\n","/* Action constants */\r\nimport { LayoutState } from './LayoutContext'\r\n\r\nexport const SET_STATE = 'layout/set-state'\r\n\r\n/* Action interfaces */\r\nexport interface SetStateAction {\r\n type: typeof SET_STATE\r\n value: LayoutState\r\n}\r\n\r\n/* Action functions */\r\nconst setState = (value: LayoutState, state: LayoutState): LayoutState => {\r\n return { ...state, ...value }\r\n}\r\n\r\nexport type LayoutActionType = SetStateAction\r\n\r\nexport const LayoutReducer = (state: LayoutState, action: LayoutActionType): LayoutState => {\r\n switch (action.type) {\r\n case SET_STATE:\r\n return setState(action.value, state)\r\n default:\r\n return state\r\n }\r\n}\r\n","import React, { useCallback, useContext } from 'react'\r\nimport { createContext, FC, useMemo, useState } from 'react'\r\n\r\nexport enum OptimizationStep {\r\n DefineSettings,\r\n ShowResults,\r\n}\r\n\r\ninterface OptimizePlatformsPageContext {\r\n previousStep: OptimizationStep\r\n currentStep: OptimizationStep\r\n changeStep: (step: OptimizationStep) => void\r\n}\r\n\r\nexport const OptimizePlatformsPageContext = createContext({\r\n previousStep: OptimizationStep.DefineSettings,\r\n currentStep: OptimizationStep.DefineSettings,\r\n changeStep: () => {}\r\n})\r\n\r\nexport const OptimizePlatformsPageProvider: FC = ({ children }) => {\r\n const [previousStep, setPreviousStep] = useState(\r\n OptimizationStep.DefineSettings\r\n )\r\n const [currentStep, setCurrentStep] = useState(OptimizationStep.DefineSettings)\r\n\r\n const changeStep = useCallback(\r\n (step: OptimizationStep) => {\r\n setPreviousStep(currentStep)\r\n setCurrentStep(step)\r\n },\r\n [currentStep]\r\n )\r\n\r\n const value = useMemo(\r\n () => ({\r\n previousStep,\r\n currentStep,\r\n changeStep,\r\n }),\r\n [previousStep, currentStep, changeStep]\r\n )\r\n\r\n return (\r\n \r\n {children}\r\n \r\n )\r\n}\r\n\r\nexport const useOptimizePlatformsPageContext = () => {\r\n const context = useContext(OptimizePlatformsPageContext)\r\n if (context === undefined) {\r\n throw new Error(\r\n 'useOptimizePlatformsPageContext must be used within a OptimizePlatformsPageProvider'\r\n )\r\n }\r\n\r\n return context\r\n}\r\n","import HelpIcon from '@mui/icons-material/Help'\r\nimport { Box, Button, Stack, useTheme } from '@mui/material'\r\nimport React, { FC, PropsWithChildren } from 'react'\r\n\r\nexport interface Props {\r\n onClick: () => void\r\n}\r\n\r\nconst buttonWidth = '2.5rem'\r\nconst buttonHeight = buttonWidth\r\nconst iconColor = 'rgba(0,0,0,0.5)'\r\n\r\nconst HelpButton: FC> = (props) => {\r\n const { palette } = useTheme()\r\n return (\r\n \r\n div': {\r\n marginTop: '-' + buttonHeight,\r\n backgroundColor: palette.primary.main,\r\n },\r\n borderColor: iconColor,\r\n }}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default HelpButton\r\n","import CloseIcon from '@mui/icons-material/Close'\r\nimport { Box, Drawer, IconButton } from '@mui/material'\r\nimport { DrawerProps } from '@mui/material/Drawer/Drawer'\r\nimport React, { FC, PropsWithChildren } from 'react'\r\n\r\nexport type Props = Omit\r\n\r\nconst HelpSidebar: FC> = (props) => {\r\n return (\r\n \r\n \r\n \r\n props.onClose?.(_, 'escapeKeyDown')}>\r\n \r\n \r\n \r\n\r\n {props.children}\r\n \r\n \r\n )\r\n}\r\n\r\nexport default HelpSidebar\r\n","import React, {FC, PropsWithChildren, useState} from 'react'\r\nimport HelpButton from './HelpButton'\r\nimport HelpSidebar from \"./HelpSidebar\";\r\n\r\nexport type Props = {}\r\n\r\nconst Help: FC> = (props) => {\r\n const [isOpen, setIsOpen] = useState(false)\r\n\r\n return (\r\n <>\r\n setIsOpen(true)} />\r\n \r\n setIsOpen(false)}>\r\n {props.children}\r\n \r\n \r\n )\r\n}\r\n\r\nexport default Help\r\n","import { Button, Typography } from '@mui/material'\r\nimport React, { FC } from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\n\r\nconst PlatformsOptimizationResultsHelp: FC = () => {\r\n const { i18n } = useTranslation()\r\n\r\n if (i18n.language === 'sk' || i18n.language === 'cs') {\r\n return (\r\n <>\r\n \r\n Po dokončení optimalizačného algoritmu v zvolenom režime sa v aplikácii zobrazujú výsledky\r\n pre jednotlivé nástupištia a výstupištia.\r\n \r\n\r\n Pre každé nástupište sú k dispozícii nasledujúce informácie:\r\n\r\n
    \r\n
  • \r\n Počet priradených spojov, ktoré nástupište obsluhuje.\r\n
  • \r\n
  • \r\n Počet konfliktov v sledovanom rozostupe.\r\n
  • \r\n
  • \r\n Sledovaný rozostup (údaj zo vstupných parametrov).\r\n
  • \r\n
  • \r\n \r\n Minimálny a maximálny rozostup na nástupišti počas sledovaného dňa.\r\n \r\n
  • \r\n
  • \r\n Počet priradených liniek a spojov.\r\n
  • \r\n
  • \r\n \r\n Vymenované čísla liniek, ktoré zastavujú na danom nástupišti s počtom spojov.\r\n \r\n
  • \r\n
\r\n\r\n \r\n Po kliknutí na tlačidlo "i" sa zobrazia spoje, ktoré sú priradené na nástupište\r\n a tiež konflikty medzi nimi.\r\n \r\n\r\n \r\n \r\n )\r\n }\r\n\r\n return <>\r\n}\r\n\r\nexport default PlatformsOptimizationResultsHelp\r\n","import React, {\r\n createContext,\r\n Dispatch,\r\n FC,\r\n useCallback,\r\n useContext,\r\n useEffect,\r\n useReducer,\r\n} from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { useConnectionsApi } from '../hooks/data/useConnectionsApi'\r\nimport { useStationApi } from '../hooks/data/useStationApi'\r\nimport {\r\n ConnectionDto,\r\n LineOnPlatformDto,\r\n LineType,\r\n StationDto,\r\n} from '../models/PlatformOptimizationModels'\r\nimport { NotificationsContext, NotificationType } from './NotificationsContext'\r\nimport { ADD_NOTIFICATION } from './NotificationsReducer'\r\nimport {\r\n PlatformsToolActionType,\r\n PlatformsToolReducer,\r\n SET_ALL_CONNECTIONS,\r\n SET_CONNECTIONS_DATE_FILTER,\r\n SET_FILTERED_CONNECTIONS,\r\n SET_IS_LOADING_CONNECTIONS,\r\n SET_IS_LOADING_SELECTED_STATION,\r\n SET_SELECTED_STATION,\r\n} from './PlatformsToolReducer'\r\n\r\nexport interface PlatformSettings {\r\n name: string\r\n minMinutesBetweenConnections?: number\r\n allowedTypes: {\r\n [key in LineType]: boolean\r\n }\r\n arrivalsOnly: boolean\r\n isValid: boolean\r\n assignedLines: LineOnPlatformDto[]\r\n}\r\n\r\nexport interface LineWithName {\r\n id: string\r\n lineNumber: string\r\n}\r\n\r\nexport interface LineSettings {\r\n line: LineWithName\r\n lineOnPlatforms: string[]\r\n maxCountOfPlatforms: number\r\n}\r\n\r\nexport enum AlgorithmMode {\r\n ConflictCount = 'conflictCount',\r\n ConflictSize = 'conflictSize',\r\n RegularizedConflictSize = 'regularizedConflictSize',\r\n}\r\n\r\nexport interface IPlatformsToolContext {\r\n selectedStationId?: number\r\n isLoadingSelectedStation: boolean\r\n selectedStation?: StationDto\r\n connectionsDateFilter?: Date\r\n connections: ConnectionDto[] | undefined\r\n isLoadingConnections: boolean\r\n filteredConnections: ConnectionDto[] | undefined\r\n}\r\n\r\nexport const initialPlatformsToolContextState: IPlatformsToolContext = {\r\n selectedStation: undefined,\r\n selectedStationId: undefined,\r\n isLoadingSelectedStation: false,\r\n connections: undefined,\r\n isLoadingConnections: false,\r\n filteredConnections: undefined,\r\n}\r\n\r\nconst PlatformsToolContext = createContext<{\r\n state: IPlatformsToolContext\r\n dispatch: Dispatch\r\n reloadConnections: () => void\r\n}>({\r\n state: initialPlatformsToolContextState,\r\n dispatch: () => {},\r\n reloadConnections: () => {},\r\n})\r\n\r\nconst PlatformsToolContextProvider: FC = (props) => {\r\n const { t } = useTranslation()\r\n const { dispatch: notificationsDispatch } = useContext(NotificationsContext)\r\n\r\n const [state, dispatch] = useReducer(PlatformsToolReducer, initialPlatformsToolContextState)\r\n\r\n /**\r\n * Station region\r\n */\r\n const { station, isLoading: isLoadingStation, error: stationError } = useStationApi(\r\n state.selectedStationId\r\n )\r\n\r\n useEffect(() => {\r\n dispatch({ type: SET_SELECTED_STATION, value: station })\r\n }, [station])\r\n\r\n useEffect(() => {\r\n dispatch({ type: SET_IS_LOADING_SELECTED_STATION, value: isLoadingStation })\r\n }, [isLoadingStation])\r\n\r\n useEffect(() => {\r\n if (stationError) {\r\n notificationsDispatch({\r\n type: ADD_NOTIFICATION,\r\n value: { type: NotificationType.Error, title: t('Could not load station.') },\r\n })\r\n }\r\n }, [notificationsDispatch, stationError, t])\r\n\r\n /**\r\n * Connections region\r\n */\r\n const {\r\n connections,\r\n isLoading: isLoadingConnections,\r\n error: connectionsError,\r\n forceReload,\r\n } = useConnectionsApi(state.selectedStationId)\r\n\r\n useEffect(() => {\r\n dispatch({\r\n type: SET_ALL_CONNECTIONS,\r\n value: connections,\r\n })\r\n }, [connections])\r\n\r\n useEffect(() => {\r\n dispatch({ type: SET_IS_LOADING_CONNECTIONS, value: isLoadingConnections })\r\n }, [isLoadingConnections, dispatch])\r\n\r\n useEffect(() => {\r\n if (connectionsError) {\r\n notificationsDispatch({\r\n type: ADD_NOTIFICATION,\r\n value: { type: NotificationType.Error, title: t('Could not load connections.') },\r\n })\r\n }\r\n }, [notificationsDispatch, connectionsError, t])\r\n\r\n return (\r\n \r\n {props.children}\r\n \r\n )\r\n}\r\n\r\nconst usePlatformsToolContext = () => {\r\n const { state, dispatch } = useContext(PlatformsToolContext)\r\n\r\n const setAllConnections = useCallback(\r\n (connections: ConnectionDto[]) => {\r\n dispatch({ type: SET_ALL_CONNECTIONS, value: connections })\r\n },\r\n [dispatch]\r\n )\r\n\r\n const setConnectionsDateFilter = useCallback(\r\n (date: Date | undefined) => {\r\n dispatch({ type: SET_CONNECTIONS_DATE_FILTER, value: date })\r\n },\r\n [dispatch]\r\n )\r\n\r\n const setFilteredConnections = useCallback(\r\n (connections: ConnectionDto[] | undefined) => {\r\n dispatch({ type: SET_FILTERED_CONNECTIONS, value: connections })\r\n },\r\n [dispatch]\r\n )\r\n\r\n return {\r\n state,\r\n dispatch,\r\n setConnectionsDateFilter,\r\n setAllConnections,\r\n setFilteredConnections,\r\n }\r\n}\r\n\r\nexport { PlatformsToolContext, PlatformsToolContextProvider, usePlatformsToolContext }\r\n","import {\r\n initialPlatformsToolContextState,\r\n IPlatformsToolContext,\r\n} from './PlatformsToolContext'\r\nimport { ConnectionDto, StationDto } from '../models/PlatformOptimizationModels'\r\n\r\n/* Action constants */\r\nexport const RESET_CONTEXT = 'platform-optimization/reset-context'\r\n\r\nexport const SET_SELECTED_STATION = 'platform-optimization/set-selected-station'\r\nexport const SET_SELECTED_STATION_ID = 'platform-optimization/set-selected-station-id'\r\nexport const SET_IS_LOADING_SELECTED_STATION =\r\n 'platform-optimization/set-is-loading-selected-station'\r\nexport const SET_CONNECTIONS_DATE_FILTER = 'platform-optimization/set-connections-date-filter'\r\n\r\nexport const SET_ALL_CONNECTIONS = 'platform-optimization/set-connections'\r\nexport const SET_IS_LOADING_CONNECTIONS = 'platform-optimization/set-is-loading-connections'\r\nexport const SET_FILTERED_CONNECTIONS = 'platform-optimization/set-filtered-connections'\r\n\r\n/* Action interfaces */\r\nexport interface ResetContextAction {\r\n type: typeof RESET_CONTEXT\r\n value: { keepSelectedStation: boolean; keepSelectedDate: boolean }\r\n}\r\n\r\nexport interface SetSelectedStationAction {\r\n type: typeof SET_SELECTED_STATION\r\n value: StationDto | undefined\r\n}\r\n\r\nexport interface SetIsLoadingSelectedStation {\r\n type: typeof SET_IS_LOADING_SELECTED_STATION\r\n value: boolean\r\n}\r\n\r\nexport interface SetSelectedStationId {\r\n type: typeof SET_SELECTED_STATION_ID\r\n value: number | undefined\r\n}\r\n\r\nexport interface SetConnectionsDateFilterAction {\r\n type: typeof SET_CONNECTIONS_DATE_FILTER\r\n value: Date | undefined\r\n}\r\n\r\nexport interface SetAllConnections {\r\n type: typeof SET_ALL_CONNECTIONS\r\n value: ConnectionDto[] | undefined\r\n}\r\n\r\nexport interface SetIsLoadingConnections {\r\n type: typeof SET_IS_LOADING_CONNECTIONS\r\n value: boolean\r\n}\r\n\r\nexport interface SetFilteredConnectionsAction {\r\n type: typeof SET_FILTERED_CONNECTIONS\r\n value: ConnectionDto[] | undefined\r\n}\r\n\r\n/* Action functions */\r\nconst setAllConnections = (\r\n connections: ConnectionDto[] | undefined,\r\n state: IPlatformsToolContext\r\n): IPlatformsToolContext => ({\r\n ...state,\r\n connections: connections,\r\n})\r\n\r\nconst setIsLoadingConnections = (\r\n newValue: boolean,\r\n state: IPlatformsToolContext\r\n): IPlatformsToolContext => ({\r\n ...state,\r\n isLoadingConnections: newValue,\r\n})\r\n\r\nconst setSelectedStation = (\r\n station: StationDto | undefined,\r\n state: IPlatformsToolContext\r\n): IPlatformsToolContext => {\r\n return { ...state, selectedStation: station }\r\n}\r\n\r\nconst setIsLoadingSelectedStation = (\r\n isLoading: boolean,\r\n state: IPlatformsToolContext\r\n): IPlatformsToolContext => {\r\n return { ...state, isLoadingSelectedStation: isLoading }\r\n}\r\n\r\nconst setSelectedStationId = (\r\n stationId: number | undefined,\r\n state: IPlatformsToolContext\r\n): IPlatformsToolContext => {\r\n return { ...state, selectedStationId: stationId }\r\n}\r\n\r\nconst setConnectionsDateFilter = (\r\n date: Date | undefined,\r\n state: IPlatformsToolContext\r\n): IPlatformsToolContext => {\r\n return { ...state, connectionsDateFilter: date }\r\n}\r\n\r\nconst setFilteredConnections = (\r\n connections: ConnectionDto[] | undefined,\r\n state: IPlatformsToolContext\r\n): IPlatformsToolContext => {\r\n return { ...state, filteredConnections: connections }\r\n}\r\n\r\nconst resetContext = (\r\n options: { keepSelectedStation: boolean; keepSelectedDate: boolean },\r\n state: IPlatformsToolContext\r\n): IPlatformsToolContext => {\r\n return {\r\n ...initialPlatformsToolContextState,\r\n selectedStation: options.keepSelectedStation ? state.selectedStation : undefined,\r\n selectedStationId: options.keepSelectedStation ? state.selectedStationId : undefined,\r\n }\r\n}\r\n\r\nexport type PlatformsToolActionType =\r\n | ResetContextAction\r\n | SetSelectedStationAction\r\n | SetIsLoadingSelectedStation\r\n | SetSelectedStationId\r\n | SetConnectionsDateFilterAction\r\n | SetAllConnections\r\n | SetIsLoadingConnections\r\n | SetFilteredConnectionsAction\r\n\r\nexport const PlatformsToolReducer = (\r\n state: IPlatformsToolContext,\r\n action: PlatformsToolActionType\r\n): IPlatformsToolContext => {\r\n switch (action.type) {\r\n case SET_ALL_CONNECTIONS:\r\n return setAllConnections(action.value, state)\r\n case SET_IS_LOADING_CONNECTIONS:\r\n return setIsLoadingConnections(action.value, state)\r\n\r\n case SET_SELECTED_STATION:\r\n return setSelectedStation(action.value, state)\r\n case SET_IS_LOADING_SELECTED_STATION:\r\n return setIsLoadingSelectedStation(action.value, state)\r\n case SET_SELECTED_STATION_ID:\r\n return setSelectedStationId(action.value, state)\r\n\r\n case SET_CONNECTIONS_DATE_FILTER:\r\n return setConnectionsDateFilter(action.value, state)\r\n case SET_FILTERED_CONNECTIONS:\r\n return setFilteredConnections(action.value, state)\r\n\r\n case RESET_CONTEXT:\r\n return resetContext(action.value, state)\r\n\r\n default:\r\n return state\r\n }\r\n}\r\n","import { ConnectionDto } from './PlatformOptimizationModels'\r\n\r\nexport interface LinesToPlatformsOptionsCreateDto {\r\n allConnections: ConnectionDto[]\r\n resultId: string\r\n}\r\n\r\n export interface LinesToPlatformsOptionsDto {\r\n lineToPlatformsOptions: LineToPlatformsOptionsDto[]\r\n}\r\n\r\nexport interface LineToPlatformsOptionsDto {\r\n lineNumber: string\r\n connections: string[]\r\n connectionsType: ConnectionToPlatformTypeDto\r\n possiblePlatforms: string[]\r\n}\r\n\r\nexport interface LineToPlatformAssignment {\r\n lineNumber: string\r\n connectionsType: ConnectionToPlatformTypeDto\r\n platform: string\r\n}\r\n\r\nexport enum ConnectionToPlatformTypeDto {\r\n All = 'all',\r\n Ending = 'ending',\r\n NonEnding = 'nonEnding',\r\n}\r\n","import useAxios from 'axios-hooks'\r\nimport { StationDto } from '../../models/PlatformOptimizationModels'\r\nimport { apiUrls } from '../../utils/urls'\r\nimport {useEffect, useState} from \"react\";\r\n\r\nexport const useStationApi = (stationId: number | undefined) => {\r\n const [{ data, loading, error }, fetch] = useAxios(\r\n {\r\n url: stationId ? apiUrls.station(stationId) : '',\r\n },\r\n { manual: true }\r\n )\r\n \r\n const [returnData, setReturnData] = useState()\r\n \r\n useEffect(() => {\r\n if (!stationId) {\r\n setReturnData(undefined)\r\n \r\n return\r\n }\r\n \r\n fetch()\r\n }, [stationId, fetch]) \r\n \r\n useEffect(() => {\r\n setReturnData(data)\r\n }, [data])\r\n\r\n return {\r\n station: returnData,\r\n isLoading: loading,\r\n error: error,\r\n }\r\n}\r\n","import useAxios from 'axios-hooks'\r\nimport { apiUrls } from '../../utils/urls'\r\nimport { ConnectionDto } from '../../models/PlatformOptimizationModels'\r\nimport { useCallback, useEffect, useState } from 'react'\r\n\r\nexport const useConnectionsApi = (\r\n stationId: number | undefined) => {\r\n const [{ data, loading, error }, fetchAxios] = useAxios(\r\n {\r\n url: stationId ? apiUrls.connections(stationId) : '',\r\n },\r\n { manual: true }\r\n )\r\n\r\n const [returnData, setReturnData] = useState()\r\n\r\n const fetch = useCallback(() => {\r\n if (!stationId) {\r\n setReturnData(undefined)\r\n\r\n return\r\n }\r\n\r\n fetchAxios()\r\n }, [stationId, fetchAxios])\r\n\r\n useEffect(() => {\r\n fetch()\r\n }, [stationId, fetch])\r\n\r\n useEffect(() => {\r\n setReturnData(data)\r\n }, [data])\r\n\r\n return {\r\n connections: returnData,\r\n isLoading: loading,\r\n error,\r\n forceReload: fetch,\r\n }\r\n}\r\n","import { LineType } from '../models/PlatformOptimizationModels'\r\nimport { PlatformSettings } from '../contexts/PlatformsToolContext'\r\nimport React, { ReactElement } from 'react'\r\nimport { TranslationFnType } from './otherUtils'\r\n\r\nexport const allLineTypes = [\r\n LineType.cityTransport,\r\n LineType.suburban,\r\n LineType.longDistance,\r\n LineType.international,\r\n]\r\n\r\nexport const getLineTypeDescription = (t: TranslationFnType, lineType: LineType): string => {\r\n switch (lineType) {\r\n case LineType.suburban:\r\n return t('Suburban')\r\n case LineType.cityTransport:\r\n return t('City transport')\r\n case LineType.longDistance:\r\n return t('Long distance')\r\n case LineType.international:\r\n return t('International')\r\n }\r\n}\r\n\r\nconst getUnassignedLineTypes = (\r\n platforms: PlatformSettings[],\r\n availableLineTypes: LineType[]\r\n): LineType[] => {\r\n const unassignedLineTypes: LineType[] = []\r\n for (const lineType of availableLineTypes) {\r\n if (!platforms.some((_) => _.allowedTypes[lineType])) {\r\n unassignedLineTypes.push(lineType)\r\n }\r\n }\r\n\r\n return unassignedLineTypes\r\n}\r\n\r\nconst getUnassignedLineTypesError = (\r\n t: TranslationFnType,\r\n unassignedLineTypes: LineType[],\r\n platformType: 'normal' | 'arrivalsOnly'\r\n): ReactElement[] => {\r\n if (unassignedLineTypes.length === 0) {\r\n return []\r\n }\r\n\r\n let textBefore: string\r\n let textAfter: string\r\n\r\n if (platformType === 'normal') {\r\n textBefore = t('Some line types are not assigned to any platform')\r\n textAfter = t('Please, allow these types on at least one platform.')\r\n } else {\r\n textBefore = t('Some line types are not assigned to any arrivals only platform')\r\n textAfter = t('Please, allow these types on at least one of arrivals only platforms.')\r\n }\r\n\r\n return [\r\n <>\r\n {textBefore}: {unassignedLineTypes.map((_) => getLineTypeDescription(t, _)).join(', ')}\r\n {'. '}\r\n {textAfter}\r\n ,\r\n ]\r\n}\r\n\r\nexport const validateLineTypesOnPlatforms = (\r\n t: TranslationFnType,\r\n platforms: PlatformSettings[],\r\n availableLineTypes: LineType[]\r\n): ReactElement[] => {\r\n if (platforms.some((_) => _.arrivalsOnly)) {\r\n const unassignedLineTypesOnNormalPlatforms = getUnassignedLineTypes(\r\n platforms.filter((_) => !_.arrivalsOnly),\r\n availableLineTypes\r\n )\r\n const unassignedLineTypesOnArrivalsOnlyPlatforms = getUnassignedLineTypes(\r\n platforms.filter((_) => _.arrivalsOnly),\r\n availableLineTypes\r\n )\r\n\r\n return [\r\n ...getUnassignedLineTypesError(t, unassignedLineTypesOnNormalPlatforms, 'normal'),\r\n ...getUnassignedLineTypesError(t, unassignedLineTypesOnArrivalsOnlyPlatforms, 'arrivalsOnly'),\r\n ]\r\n } else {\r\n const unassignedLineTypes = getUnassignedLineTypes(platforms, availableLineTypes)\r\n\r\n return [...getUnassignedLineTypesError(t, unassignedLineTypes, 'normal')]\r\n }\r\n}\r\n\r\nexport const getLineTypesObjectFromDto = (\r\n lineTypes: LineType[]\r\n): {\r\n [key in LineType]: boolean\r\n} => {\r\n return {\r\n [LineType.cityTransport]: lineTypes.includes(LineType.cityTransport),\r\n [LineType.international]: lineTypes.includes(LineType.international),\r\n [LineType.longDistance]: lineTypes.includes(LineType.longDistance),\r\n [LineType.suburban]: lineTypes.includes(LineType.suburban),\r\n }\r\n}\r\n\r\nexport const getDtoFromLineTypesObject = (\r\n lineTypes: {\r\n [key in LineType]: boolean\r\n }\r\n): LineType[] => {\r\n const toReturn: LineType[] = []\r\n\r\n if (lineTypes[LineType.international]) {\r\n toReturn.push(LineType.international)\r\n }\r\n\r\n if (lineTypes[LineType.longDistance]) {\r\n toReturn.push(LineType.longDistance)\r\n }\r\n\r\n if (lineTypes[LineType.suburban]) {\r\n toReturn.push(LineType.suburban)\r\n }\r\n\r\n if (lineTypes[LineType.cityTransport]) {\r\n toReturn.push(LineType.cityTransport)\r\n }\r\n\r\n return toReturn\r\n}\r\n","import { PlatformSettings } from '../contexts/PlatformsToolContext'\r\nimport { LineType, PlatformDto } from '../models/PlatformOptimizationModels'\r\nimport { allLineTypes, getDtoFromLineTypesObject } from './lineTypesUtils'\r\n\r\nexport const platformSettingsToPlatformDto = (platformSettings: PlatformSettings): PlatformDto => ({\r\n name: platformSettings.name,\r\n arrivalsOnly: platformSettings.arrivalsOnly,\r\n assignedLineTypes: getDtoFromLineTypesObject(platformSettings.allowedTypes),\r\n assignedLines: platformSettings.assignedLines,\r\n})\r\n\r\n/**\r\n * Validate platform settings for optimization.\r\n * @param platformSettings Platform settings to validate\r\n */\r\nconst isPlatformSettingsValid = (platformSettings: PlatformSettings): boolean =>\r\n isMinMinutesBetweenConnectionsValid(\r\n platformSettings.minMinutesBetweenConnections,\r\n platformSettings.arrivalsOnly\r\n ) &&\r\n isPlatformNameValid(platformSettings.name) &&\r\n isAllowedLineTypesValid(platformSettings.allowedTypes)\r\n\r\n/**\r\n * Check if platform name is valid.\r\n */\r\nconst isPlatformNameValid = (name: string): boolean => !!name\r\n\r\n/**\r\n * Check if min minutes between connections is valid.\r\n * Depends on fact if platform is for arrivals only or not.\r\n * If yes, min minutes is not needed.\r\n */\r\nconst isMinMinutesBetweenConnectionsValid = (\r\n minMinutes: number | undefined,\r\n arrivalsOnly: boolean\r\n): boolean => {\r\n if (arrivalsOnly) {\r\n return true\r\n }\r\n\r\n if (typeof minMinutes === 'number') {\r\n return 0 <= minMinutes && minMinutes <= 60\r\n }\r\n\r\n return false\r\n}\r\n\r\n/**\r\n * Check if at least one of line types is allowed.\r\n */\r\nconst isAllowedLineTypesValid = (\r\n allowedLineTypes: {\r\n [key in LineType]: boolean\r\n }\r\n): boolean => {\r\n for (const key of allLineTypes) {\r\n if (allowedLineTypes[key]) {\r\n return true\r\n }\r\n }\r\n\r\n return false\r\n}\r\n\r\n/**\r\n * Validators for platform settings for optimization.\r\n */\r\nexport const platformSettingsValidators = {\r\n isValid: {\r\n all: isPlatformSettingsValid,\r\n platformName: isPlatformNameValid,\r\n minMinutesBetweenConnections: isMinMinutesBetweenConnectionsValid,\r\n allowedLineTypes: isAllowedLineTypesValid,\r\n },\r\n}\r\n","import { TFunction } from 'react-i18next'\r\n\r\nexport const getDistinctFromArray = (arr: T[], getProp: (item: T) => K): K[] => {\r\n const result: K[] = []\r\n\r\n for (let i = 0; i < arr.length; i++) {\r\n const currentItem = arr[i]\r\n\r\n if (!result.includes(getProp(currentItem))) {\r\n result.push(getProp(currentItem))\r\n }\r\n }\r\n\r\n return result\r\n}\r\n\r\nexport const getDistinctFromArrayWithCount = (\r\n arr: T[],\r\n getProp: (item: T) => K\r\n): { item: K; count: number }[] => {\r\n const result: { item: K; count: number }[] = []\r\n\r\n for (let i = 0; i < arr.length; i++) {\r\n const currentItem = arr[i]\r\n const resultItem = result.find((_) => _.item === getProp(currentItem))\r\n\r\n if (!resultItem) {\r\n result.push({\r\n item: getProp(currentItem),\r\n count: 1,\r\n })\r\n } else {\r\n resultItem.count++\r\n }\r\n }\r\n\r\n return result\r\n}\r\n\r\nexport const groupBy = (arr: T[], getProp: (item: T) => K): { key: K; items: T[] }[] => {\r\n const result: { key: K; items: T[] }[] = []\r\n\r\n for (let i = 0; i < arr.length; i++) {\r\n const currentItem = arr[i]\r\n const currentProp = getProp(currentItem)\r\n const resultItem = result.find((_) => _.key === currentProp)\r\n\r\n if (!resultItem) {\r\n result.push({\r\n key: currentProp,\r\n items: [currentItem],\r\n })\r\n } else {\r\n resultItem.items.push(currentItem)\r\n }\r\n }\r\n\r\n return result\r\n}\r\n\r\n/**\r\n * Group by two properties while iterating just once\r\n */\r\nexport const groupByTwo = (\r\n arr: T[],\r\n getProp1: (item: T) => K,\r\n getProp2: (item: T) => L\r\n): { group1: { key: K; items: T[] }[]; group2: { key: L; items: T[] }[] } => {\r\n const result1: { key: K; items: T[] }[] = []\r\n const result2: { key: L; items: T[] }[] = []\r\n\r\n for (let i = 0; i < arr.length; i++) {\r\n const currentItem = arr[i]\r\n\r\n const currentProp1 = getProp1(currentItem)\r\n const currentProp2 = getProp2(currentItem)\r\n\r\n const resultItem1 = result1.find((_) => _.key === currentProp1)\r\n const resultItem2 = result2.find((_) => _.key === currentProp2)\r\n\r\n if (!resultItem1) {\r\n result1.push({\r\n key: currentProp1,\r\n items: [currentItem],\r\n })\r\n } else {\r\n resultItem1.items.push(currentItem)\r\n }\r\n\r\n if (!resultItem2) {\r\n result2.push({\r\n key: currentProp2,\r\n items: [currentItem],\r\n })\r\n } else {\r\n resultItem2.items.push(currentItem)\r\n }\r\n }\r\n\r\n return {\r\n group1: result1,\r\n group2: result2,\r\n }\r\n}\r\n\r\nexport const getArrayStatusOfBooleans = (arr: boolean[]): 'all' | 'some' | 'none' => {\r\n const includesTrue = arr.includes(true)\r\n const includesFalse = arr.includes(false)\r\n\r\n if (includesTrue && includesFalse) {\r\n return 'some'\r\n }\r\n\r\n if (includesTrue) {\r\n return 'all'\r\n }\r\n\r\n return 'none'\r\n}\r\n\r\n/**\r\n * Sort function for treating strings as numbers when sorting, if it is possible.\r\n * Sorting by string otherwise.\r\n *\r\n * E.g.: Array ['1', '10', '9', '2'] can be sorted by numbers, even though it is an array of strings.\r\n *\r\n * @param a Object A to be sorted\r\n * @param b Object B to be sorted\r\n * @param getProp Function to get property, which is used to sort objects\r\n */\r\nexport const semiNumericSortFn = (a: T, b: T, getProp: (item: T) => string) => {\r\n try {\r\n const aNumber = parseInt(getProp(a))\r\n const bNumber = parseInt(getProp(b))\r\n\r\n return aNumber === bNumber ? 0 : aNumber < bNumber ? -1 : 1\r\n } catch {\r\n return getProp(a).localeCompare(getProp(b))\r\n }\r\n}\r\n\r\nexport const sortBySemiNumeric = (array: T[], getProp: (item: T) => string): T[] => {\r\n array.sort((a, b) => semiNumericSortFn(a, b, getProp))\r\n \r\n return array\r\n}\r\n\r\nexport const removeIndicesFromArray = (array: T[], indices: number[]): T[] => {\r\n const isBadIndex: { [key: string]: boolean } = {}\r\n\r\n indices.forEach((_) => (isBadIndex[_] = true))\r\n\r\n return array.filter((_, index) => !isBadIndex[index])\r\n}\r\n\r\nexport const getWordyEnumerationOfArray = (\r\n array: T[],\r\n t: TFunction<'translation', undefined>\r\n): string => {\r\n if (array.length === 0) {\r\n return ''\r\n }\r\n\r\n if (array.length === 1) {\r\n return `${array[0]}`\r\n }\r\n\r\n return `${array.slice(0, -1).join(', ')} ${t('and')} ${array[array.length - 1]}`\r\n}\r\n","import {\r\n LineType,\r\n StationPlatformsOptimizationResultDto,\r\n} from '../models/PlatformOptimizationModels'\r\nimport { PlatformsOptimization } from './PlatformsOptimizationContext'\r\nimport {\r\n AlgorithmMode,\r\n LineSettings,\r\n LineWithName,\r\n PlatformSettings,\r\n} from './PlatformsToolContext'\r\nimport { getLineTypesObjectFromDto } from '../utils/lineTypesUtils'\r\nimport { platformSettingsValidators } from '../utils/platformSettingsUtils'\r\nimport { sortBySemiNumeric } from '../utils/arrayUtils'\r\n\r\n/* Action constants */\r\nexport const SET_ALL_PLATFORMS_SETTINGS = 'platform-optimization/set-all-platforms-settings'\r\nexport const ADD_PLATFORM_SETTING = 'platform-optimization/add-platform-setting'\r\nexport const SET_PLATFORM_SETTING = 'platform-optimization/set-platform-setting'\r\nexport const REMOVE_PLATFORM_SETTING = 'platform-optimization/remove-platform-setting'\r\n\r\nexport const SET_ALL_LINE_TYPES = 'platform-optimization/set-all-line-types'\r\nexport const ADD_LINE_SETTINGS = 'platform-optimization/add-line-settings'\r\nexport const SET_LINE_SETTINGS = 'platform-optimization/set-line-settings'\r\nexport const REMOVE_LINE_SETTINGS = 'platform-optimization/remove-line-settings'\r\nexport const SET_ALL_LINES_SETTINGS = 'platform-optimization/set-all-lines-settings'\r\nexport const SET_ALL_LINES = 'platform-optimization/set-all-lines'\r\n\r\nexport const SET_ALGORITHM_MODE = 'platform-optimization/set-algorithm-mode'\r\n\r\nexport const SET_RESULTS = 'platform-optimization/set-results'\r\n\r\n/* Action interfaces */\r\nexport interface SetAllPlatformsSettingsAction {\r\n type: typeof SET_ALL_PLATFORMS_SETTINGS\r\n value: PlatformSettings[]\r\n}\r\n\r\nexport interface AddPlatformSettingAction {\r\n type: typeof ADD_PLATFORM_SETTING\r\n}\r\n\r\nexport interface SetPlatformSettingAction {\r\n type: typeof SET_PLATFORM_SETTING\r\n value: { name: string; newSettings: PlatformSettings }\r\n}\r\n\r\nexport interface RemovePlatformSettingAction {\r\n type: typeof REMOVE_PLATFORM_SETTING\r\n value: string\r\n}\r\n\r\nexport interface SetAllLineTypesAction {\r\n type: typeof SET_ALL_LINE_TYPES\r\n value: LineType[]\r\n}\r\n\r\nexport interface AddLineSettingsAction {\r\n type: typeof ADD_LINE_SETTINGS\r\n value: LineSettings\r\n}\r\n\r\nexport interface SetLineSettingsAction {\r\n type: typeof SET_LINE_SETTINGS\r\n value: { id: string; newSettings: LineSettings }\r\n}\r\n\r\nexport interface RemoveLineSettingsAction {\r\n type: typeof REMOVE_LINE_SETTINGS\r\n value: string\r\n}\r\n\r\nexport interface SetAllLinesSettingsAction {\r\n type: typeof SET_ALL_LINES_SETTINGS\r\n value: LineSettings[]\r\n}\r\n\r\nexport interface SetAllLinesAction {\r\n type: typeof SET_ALL_LINES\r\n value: LineWithName[]\r\n}\r\n\r\nexport interface SetAlgorithmModeAction {\r\n type: typeof SET_ALGORITHM_MODE\r\n value: AlgorithmMode\r\n}\r\n\r\nexport interface SetResultsAction {\r\n type: typeof SET_RESULTS\r\n value: StationPlatformsOptimizationResultDto | undefined\r\n}\r\n\r\n/* Action functions */\r\nexport const defaultPlatformName = '?'\r\nexport const defaultMinMinutesBetweenConnections = 5\r\n\r\nconst setAllPlatformsSettings = (\r\n platforms: PlatformSettings[],\r\n state: PlatformsOptimization\r\n): PlatformsOptimization => {\r\n return {\r\n ...state,\r\n platformsSettings: platforms,\r\n }\r\n}\r\n\r\nconst addPlatformSettings = (state: PlatformsOptimization): PlatformsOptimization => {\r\n return {\r\n ...state,\r\n platformsSettings: state.platformsSettings.concat({\r\n name: defaultPlatformName,\r\n minMinutesBetweenConnections: defaultMinMinutesBetweenConnections,\r\n allowedTypes: getLineTypesObjectFromDto(state.allLineTypes),\r\n isValid: true,\r\n arrivalsOnly: false,\r\n assignedLines: [],\r\n }),\r\n }\r\n}\r\n\r\nconst setPlatformSettings = (\r\n payload: {\r\n name: string\r\n newSettings: PlatformSettings\r\n },\r\n state: PlatformsOptimization\r\n): PlatformsOptimization => {\r\n const newPlatforms: PlatformSettings[] = [...state.platformsSettings]\r\n const index = newPlatforms.findIndex((_) => _.name === payload.name)\r\n if (index === -1) {\r\n throw new Error(`Platform with name ${payload.name} was not found.`)\r\n }\r\n\r\n newPlatforms[index] = {\r\n ...payload.newSettings,\r\n isValid: platformSettingsValidators.isValid.all(payload.newSettings),\r\n }\r\n\r\n return { ...state, platformsSettings: newPlatforms }\r\n}\r\n\r\nconst removePlatformSettings = (\r\n name: string,\r\n state: PlatformsOptimization\r\n): PlatformsOptimization => {\r\n return { ...state, platformsSettings: state.platformsSettings.filter((_) => _.name !== name) }\r\n}\r\n\r\nexport const getUnusedLines = (state: PlatformsOptimization) => {\r\n return state.allLines.filter(\r\n (_) => state.linesSettings.filter((__) => __.line.id === _.id).length === 0\r\n )\r\n}\r\n\r\nconst setAllLineTypes = (\r\n lineTypes: LineType[],\r\n state: PlatformsOptimization\r\n): PlatformsOptimization => ({\r\n ...state,\r\n allLineTypes: lineTypes,\r\n})\r\n\r\nconst addLineSettings = (\r\n lineSettings: LineSettings,\r\n state: PlatformsOptimization\r\n): PlatformsOptimization => {\r\n const newLineSettings = [...state.linesSettings]\r\n const newUnusedLines = [...state.unusedLines]\r\n\r\n const lineSettingsIndex = newLineSettings.findIndex((_) => _.line.id === lineSettings.line.id)\r\n if (lineSettingsIndex !== -1) {\r\n throw new Error(`Line with ID ${lineSettings.line.id} already has its settings.`)\r\n }\r\n\r\n const unusedLineIndex = newUnusedLines.findIndex((_) => _.id === lineSettings.line.id)\r\n if (unusedLineIndex === -1) {\r\n throw new Error(`Line with ID ${lineSettings.line.id} is not available for this station.`)\r\n }\r\n\r\n newUnusedLines.splice(unusedLineIndex, 1)\r\n\r\n return {\r\n ...state,\r\n linesSettings: newLineSettings.concat(lineSettings),\r\n unusedLines: newUnusedLines,\r\n }\r\n}\r\n\r\nconst setLineSettings = (\r\n payload: {\r\n id: string\r\n newSettings: LineSettings\r\n },\r\n state: PlatformsOptimization\r\n): PlatformsOptimization => {\r\n const newLineSettings = [...state.linesSettings]\r\n const index = newLineSettings.findIndex((_) => _.line.id === payload.id)\r\n if (index === -1) {\r\n throw new Error(`Line with ID ${payload.id} was not found.`)\r\n }\r\n\r\n newLineSettings[index] = { ...payload.newSettings }\r\n const newState: PlatformsOptimization = { ...state, linesSettings: newLineSettings }\r\n newState.unusedLines = getUnusedLines(newState)\r\n\r\n return newState\r\n}\r\n\r\nconst removeLineSettings = (id: string, state: PlatformsOptimization): PlatformsOptimization => {\r\n const newState: PlatformsOptimization = {\r\n ...state,\r\n linesSettings: state.linesSettings.filter((_) => _.line.id !== id),\r\n }\r\n newState.unusedLines = getUnusedLines(newState)\r\n\r\n return newState\r\n}\r\n\r\nconst setAllLinesSettings = (\r\n linesSettings: LineSettings[],\r\n state: PlatformsOptimization\r\n): PlatformsOptimization => {\r\n linesSettings = linesSettings.map((_) => ({\r\n ..._,\r\n lineOnPlatforms: sortBySemiNumeric(_.lineOnPlatforms, (_) => _),\r\n }))\r\n\r\n const newState = { ...state, linesSettings: linesSettings }\r\n newState.unusedLines = getUnusedLines(newState)\r\n\r\n return newState\r\n}\r\n\r\nconst setAllLines = (\r\n lines: LineWithName[],\r\n state: PlatformsOptimization\r\n): PlatformsOptimization => {\r\n const newState = { ...state, allLines: lines }\r\n newState.unusedLines = getUnusedLines(newState)\r\n\r\n return newState\r\n}\r\n\r\nconst setAlgorithmMode = (\r\n mode: AlgorithmMode,\r\n state: PlatformsOptimization\r\n): PlatformsOptimization => {\r\n return { ...state, algorithmMode: mode }\r\n}\r\n\r\nconst setResults = (\r\n results: StationPlatformsOptimizationResultDto | undefined,\r\n state: PlatformsOptimization\r\n): PlatformsOptimization => {\r\n return { ...state, results: results }\r\n}\r\n\r\nexport type PlatformsOptimizationActionType =\r\n | SetAllPlatformsSettingsAction\r\n | AddPlatformSettingAction\r\n | SetPlatformSettingAction\r\n | RemovePlatformSettingAction\r\n | SetAllLineTypesAction\r\n | AddLineSettingsAction\r\n | SetLineSettingsAction\r\n | RemoveLineSettingsAction\r\n | SetAllLinesSettingsAction\r\n | SetAllLinesAction\r\n | SetAlgorithmModeAction\r\n | SetResultsAction\r\n\r\nexport const PlatformsOptimizationReducer = (\r\n state: PlatformsOptimization,\r\n action: PlatformsOptimizationActionType\r\n): PlatformsOptimization => {\r\n switch (action.type) {\r\n case SET_ALL_PLATFORMS_SETTINGS:\r\n return setAllPlatformsSettings(action.value, state)\r\n case ADD_PLATFORM_SETTING:\r\n return addPlatformSettings(state)\r\n case SET_PLATFORM_SETTING:\r\n return setPlatformSettings(action.value, state)\r\n case REMOVE_PLATFORM_SETTING:\r\n return removePlatformSettings(action.value, state)\r\n\r\n case SET_ALL_LINE_TYPES:\r\n return setAllLineTypes(action.value, state)\r\n\r\n case ADD_LINE_SETTINGS:\r\n return addLineSettings(action.value, state)\r\n case SET_LINE_SETTINGS:\r\n return setLineSettings(action.value, state)\r\n case REMOVE_LINE_SETTINGS:\r\n return removeLineSettings(action.value, state)\r\n case SET_ALL_LINES_SETTINGS:\r\n return setAllLinesSettings(action.value, state)\r\n case SET_ALL_LINES:\r\n return setAllLines(action.value, state)\r\n\r\n case SET_ALGORITHM_MODE:\r\n return setAlgorithmMode(action.value, state)\r\n\r\n case SET_RESULTS:\r\n return setResults(action.value, state)\r\n default:\r\n return state\r\n }\r\n}\r\n","import React, { useCallback, useContext, useMemo } from 'react'\r\nimport {\r\n LineDto,\r\n LineType,\r\n StationPlatformsOptimizationResultDto,\r\n} from '../models/PlatformOptimizationModels'\r\nimport {\r\n AlgorithmMode,\r\n LineSettings,\r\n LineWithName,\r\n PlatformSettings,\r\n usePlatformsToolContext,\r\n} from './PlatformsToolContext'\r\nimport { createContext, Dispatch, FC, useReducer } from 'react'\r\nimport {\r\n ADD_LINE_SETTINGS,\r\n ADD_PLATFORM_SETTING,\r\n PlatformsOptimizationActionType,\r\n PlatformsOptimizationReducer,\r\n REMOVE_LINE_SETTINGS,\r\n REMOVE_PLATFORM_SETTING,\r\n SET_ALGORITHM_MODE,\r\n SET_ALL_LINE_TYPES,\r\n SET_ALL_LINES,\r\n SET_ALL_LINES_SETTINGS,\r\n SET_ALL_PLATFORMS_SETTINGS,\r\n SET_LINE_SETTINGS,\r\n SET_PLATFORM_SETTING,\r\n SET_RESULTS,\r\n} from './PlatformsOptimizationReducer'\r\n\r\nexport interface PlatformsOptimization {\r\n platformsSettings: PlatformSettings[]\r\n linesSettings: LineSettings[]\r\n\r\n allLineTypes: LineType[]\r\n allLines: LineWithName[]\r\n unusedLines: LineWithName[]\r\n\r\n algorithmMode: AlgorithmMode\r\n\r\n results: StationPlatformsOptimizationResultDto | undefined\r\n}\r\n\r\nconst initialPlatformsOptimizationContextState: PlatformsOptimization = {\r\n allLines: [],\r\n allLineTypes: [],\r\n unusedLines: [],\r\n linesSettings: [],\r\n platformsSettings: [],\r\n algorithmMode: AlgorithmMode.ConflictCount,\r\n results: undefined,\r\n}\r\n\r\nconst PlatformsOptimizationContext = createContext<{\r\n state: PlatformsOptimization\r\n dispatch: Dispatch\r\n}>({\r\n state: initialPlatformsOptimizationContextState,\r\n dispatch: () => {},\r\n})\r\n\r\nconst PlatformsOptimizationContextProvider: FC = (props) => {\r\n const [state, dispatch] = useReducer(\r\n PlatformsOptimizationReducer,\r\n initialPlatformsOptimizationContextState\r\n )\r\n\r\n return (\r\n \r\n {props.children}\r\n \r\n )\r\n}\r\n\r\nconst usePlatformsOptimizationContext = () => {\r\n const { state, dispatch } = useContext(PlatformsOptimizationContext)\r\n const {\r\n setFilteredConnections,\r\n state: { filteredConnections },\r\n } = usePlatformsToolContext()\r\n\r\n // This is just shortcut, so that it is obvious that in optimization we use filtered connections\r\n const stateWithConnections = useMemo(() => ({ ...state, connections: filteredConnections }), [\r\n state,\r\n filteredConnections,\r\n ])\r\n const setConnections = setFilteredConnections\r\n\r\n const setAllPlatformsSettings = useCallback(\r\n (platforms: PlatformSettings[]) => {\r\n dispatch({ type: SET_ALL_PLATFORMS_SETTINGS, value: platforms })\r\n },\r\n [dispatch]\r\n )\r\n\r\n const addNewPlatformSetting = useCallback(() => {\r\n dispatch({ type: ADD_PLATFORM_SETTING })\r\n }, [dispatch])\r\n\r\n const setPlatformSetting = useCallback(\r\n (name: string, platform: PlatformSettings) => {\r\n dispatch({ type: SET_PLATFORM_SETTING, value: { name: name, newSettings: platform } })\r\n },\r\n [dispatch]\r\n )\r\n\r\n const removePlatformSetting = useCallback(\r\n (name: string) => {\r\n dispatch({ type: REMOVE_PLATFORM_SETTING, value: name })\r\n },\r\n [dispatch]\r\n )\r\n\r\n const setAllLines = useCallback(\r\n (lines: LineDto[]) => {\r\n dispatch({\r\n type: SET_ALL_LINES,\r\n value: lines.map((_) => ({\r\n id: _.id,\r\n lineNumber: _.name,\r\n })),\r\n })\r\n },\r\n [dispatch]\r\n )\r\n\r\n const setAllLineTypes = useCallback(\r\n (lineTypes: LineType[]) => {\r\n dispatch({ type: SET_ALL_LINE_TYPES, value: lineTypes })\r\n },\r\n [dispatch]\r\n )\r\n\r\n const addLineSettings = useCallback(\r\n (lineSettings: LineSettings) => {\r\n dispatch({ type: ADD_LINE_SETTINGS, value: lineSettings })\r\n },\r\n [dispatch]\r\n )\r\n\r\n const setAllLinesSettings = useCallback(\r\n (linesSettings: LineSettings[]) => {\r\n dispatch({ type: SET_ALL_LINES_SETTINGS, value: linesSettings })\r\n },\r\n [dispatch]\r\n )\r\n\r\n const setLineSetting = useCallback(\r\n (id: string, lineSetting: LineSettings) => {\r\n dispatch({ type: SET_LINE_SETTINGS, value: { id: id, newSettings: lineSetting } })\r\n },\r\n [dispatch]\r\n )\r\n\r\n const removeLineSetting = useCallback(\r\n (id: string) => {\r\n dispatch({ type: REMOVE_LINE_SETTINGS, value: id })\r\n },\r\n [dispatch]\r\n )\r\n\r\n const setAlgorithmMode = useCallback(\r\n (mode: AlgorithmMode) => {\r\n dispatch({ type: SET_ALGORITHM_MODE, value: mode })\r\n },\r\n [dispatch]\r\n )\r\n\r\n const setResults = useCallback(\r\n (results: StationPlatformsOptimizationResultDto | undefined) => {\r\n dispatch({ type: SET_RESULTS, value: results })\r\n },\r\n [dispatch]\r\n )\r\n\r\n return {\r\n state: stateWithConnections,\r\n dispatch,\r\n\r\n setConnections,\r\n\r\n setAllPlatformsSettings,\r\n addNewPlatformSetting,\r\n setPlatformSetting,\r\n removePlatformSetting,\r\n\r\n setAllLines,\r\n setAllLineTypes,\r\n\r\n addLineSettings,\r\n setLineSetting,\r\n removeLineSetting,\r\n setAllLinesSettings,\r\n\r\n setAlgorithmMode,\r\n\r\n setResults,\r\n }\r\n}\r\n\r\nexport { PlatformsOptimizationContextProvider, usePlatformsOptimizationContext }\r\n","import { Namespace, TFunction } from 'react-i18next'\r\n\r\nexport const nameof = (name: keyof T) => name\r\n\r\nexport const nameofFactory = () => (name: keyof T) => name\r\n\r\nexport const getArrayOfLength = (length: number, defaultValue: T): T[] =>\r\n Array(length).map(() => defaultValue)\r\n\r\nexport const removeBase64Prefix = (base64: string) => \r\n base64.replace(/^.*;base64,/, '')\r\n\r\nexport const unwrap = (item?: T | undefined): T => {\r\n if (item === null || item === undefined) {\r\n throw new Error('Item must not be neither null nor undefined when unwrapping')\r\n }\r\n \r\n return item\r\n}\r\n\r\nexport type TranslationFnType = TFunction, undefined>\r\n","import {\r\n LineToPlatformAssignment,\r\n LineToPlatformsOptionsDto,\r\n} from '../models/LinesToPlatformsOptions'\r\n\r\nexport const getAssignmentsFromOptions = (\r\n options: LineToPlatformsOptionsDto[]\r\n): LineToPlatformAssignment[] =>\r\n options\r\n .filter((_) => _.possiblePlatforms.length === 1)\r\n .map((_) => ({\r\n lineNumber: _.lineNumber,\r\n connections: _.connections,\r\n connectionsType: _.connectionsType,\r\n platform: _.possiblePlatforms[0],\r\n }))\r\n\r\nexport const getOptionsWithMultiplePlatforms = (\r\n options: LineToPlatformsOptionsDto[]\r\n): LineToPlatformsOptionsDto[] =>\r\n options.filter((_) => _.possiblePlatforms.length > 1)\r\n","import { Predicate as SyncfusionPredicate } from '@syncfusion/ej2-data'\r\n\r\nexport interface ComplexFilterPredicate {\r\n isComplex: true\r\n condition: Condition\r\n predicates: Predicate[]\r\n}\r\n\r\nexport interface NonComplexFilterPredicate {\r\n isComplex: false\r\n field: keyof T\r\n operator: Operator\r\n value: T[keyof T]\r\n}\r\n\r\nexport type Predicate = ComplexFilterPredicate | NonComplexFilterPredicate\r\n\r\nexport type Operator = 'equal' | 'notequal'\r\nexport type Condition = 'and' | 'or'\r\n\r\nexport type SortBy = { by: keyof T; direction: 'asc' | 'desc' }[]\r\n\r\n/**\r\n * Convert Syncfusion predicates to strongly typed predicates used in this app.\r\n * @param predicate Syncfusion predicate\r\n */\r\nexport const mapSyncfusionPredicateToLocalPredicate = (\r\n predicate: SyncfusionPredicate\r\n): Predicate => {\r\n if (predicate.isComplex) {\r\n return {\r\n isComplex: true,\r\n condition: predicate.condition as Condition,\r\n predicates: predicate.predicates.map((_) => mapSyncfusionPredicateToLocalPredicate(_)),\r\n }\r\n }\r\n\r\n return {\r\n isComplex: false,\r\n field: predicate.field as keyof T,\r\n operator: predicate.operator as Operator,\r\n value: (predicate.value as unknown) as T[keyof T],\r\n }\r\n}\r\n\r\nexport const getFilterFnByGridFilter = (\r\n filter: ComplexFilterPredicate,\r\n compare: (predicate: NonComplexFilterPredicate, item: T) => boolean\r\n): ((item: T) => boolean) => {\r\n if (filter.predicates?.length === 0) {\r\n return () => true\r\n }\r\n\r\n return (item) => getPredicateResult(filter, item, compare)\r\n}\r\n\r\nconst getPredicateResult = (\r\n predicate: Predicate,\r\n item: T,\r\n compare: (predicate: NonComplexFilterPredicate, item: T) => boolean\r\n): boolean => {\r\n if (predicate.isComplex) {\r\n return getComplexPredicateResult(predicate, item, compare)\r\n }\r\n\r\n return getNonComplexPredicateResult(predicate, item, compare)\r\n}\r\n\r\nconst getComplexPredicateResult = (\r\n predicate: ComplexFilterPredicate,\r\n item: T,\r\n compare: (predicate: NonComplexFilterPredicate, item: T) => boolean\r\n): boolean =>\r\n predicate.predicates\r\n .map((_) => getPredicateResult(_, item, compare))\r\n .reduce((prev, curr) => getConditionFn(predicate.condition, prev, curr))\r\n\r\nconst getNonComplexPredicateResult = (\r\n predicate: NonComplexFilterPredicate,\r\n item: T,\r\n compare: (predicate: NonComplexFilterPredicate, item: T) => boolean\r\n): boolean => compare(predicate, item)\r\n\r\nconst getConditionFn = (condition: Condition, a: boolean, b: boolean): boolean => {\r\n switch (condition) {\r\n case 'and':\r\n return a && b\r\n case 'or':\r\n return a || b\r\n default:\r\n throw new Error(`Unknown condition '${condition}'`)\r\n }\r\n}\r\n\r\nexport const compareByOperator = (a: unknown, b: unknown, operator: Operator): boolean => {\r\n switch (operator) {\r\n case 'equal':\r\n return a === b\r\n case 'notequal':\r\n return a !== b\r\n default:\r\n throw new Error(`Unknown operator '${operator}'.`)\r\n }\r\n}\r\n\r\n/**\r\n * Get current page from array of items.\r\n */\r\nexport const getCurrentPageFromItems = (items: T[], skip: number, take: number): T[] => {\r\n const startIndex = skip\r\n const endIndex = startIndex + take\r\n \r\n return items.slice(startIndex, endIndex)\r\n}\r\n","import { useContext, useEffect, useState } from 'react'\r\nimport * as signalR from '@microsoft/signalr'\r\nimport { HubConnection } from '@microsoft/signalr'\r\nimport { ADD_NOTIFICATION } from '../contexts/NotificationsReducer'\r\nimport { NotificationsContext, NotificationType } from '../contexts/NotificationsContext'\r\nimport { signalRUrls } from '../utils/urls'\r\nimport { ConnectionDto } from '../models/PlatformOptimizationModels'\r\nimport { PlatformsToolContext } from '../contexts/PlatformsToolContext'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { usePlatformsOptimizationContext } from '../contexts/PlatformsOptimizationContext'\r\n\r\nconst serverMethods = {\r\n optimizePlatforms: 'OptimizePlatforms',\r\n optimizePlatformsExistingConnections: 'OptimizePlatformsExistingConnections',\r\n cancelPlatformsOptimization: 'CancelPlatformsOptimization',\r\n}\r\nconst clientMethods = {\r\n optimizePlatformsOptimizationId: 'OptimizePlatformsOptimizationId',\r\n optimizePlatformsRequestQueued: 'OptimizePlatformsRequestQueued',\r\n optimizePlatformsEstimatedTime: 'OptimizePlatformsEstimatedTime',\r\n optimizePlatformsResult: 'OptimizePlatformsResult',\r\n optimizePlatformsCancelled: 'OptimizePlatformsCancelled',\r\n optimizePlatformsError: 'OptimizePlatformsError',\r\n}\r\n\r\nexport enum ConnectionState {\r\n Disconnected = 1,\r\n Connecting = 2,\r\n Connected = 3,\r\n}\r\n\r\nexport interface OptimizationState {\r\n optimizationId: string | undefined\r\n hasStartedOptimization: boolean\r\n startOptimizing: () => void\r\n cancelOptimization: () => void\r\n remainingTime: number | undefined\r\n isRequestQueued: boolean\r\n signalRConnectionState: ConnectionState\r\n originalEstimatedTime: number | undefined\r\n optimizationCancelRequested: boolean\r\n}\r\n\r\nexport const useSignalRPlatformOptimization = (\r\n onResult: (result: TResult) => void,\r\n onCancel: () => void,\r\n onError: (error: string) => void,\r\n connections: ConnectionDto[],\r\n stationId = 0,\r\n date: Date = new Date()\r\n): OptimizationState => {\r\n const { t } = useTranslation()\r\n\r\n const { state: optimizationSettings } = useContext(PlatformsToolContext)\r\n const {\r\n state: { platformsSettings, linesSettings, algorithmMode },\r\n } = usePlatformsOptimizationContext()\r\n const { dispatch: notificationsDispatch } = useContext(NotificationsContext)\r\n\r\n const [signalRConnection, setSignalRConnection] = useState()\r\n const [signalRConnectionState, setSignalRConnectionState] = useState(\r\n ConnectionState.Connecting\r\n )\r\n\r\n const [hasStartedOptimization, setHasStartedOptimization] = useState(false)\r\n\r\n const [isRequestQueued, setIsRequestQueued] = useState(false)\r\n const [optimizationId, setOptimizationId] = useState()\r\n const [optimizationCancelRequested, setOptimizationCancelRequested] = useState(false)\r\n\r\n const [originalEstimatedTime, setOriginalEstimatedTime] = useState()\r\n const [remainingTime, setRemainingTime] = useState()\r\n const [remainingTimeDecreaseFn, setRemainingTimeDecreaseFn] = useState()\r\n\r\n const resetComponentState = () => {\r\n setHasStartedOptimization(false)\r\n setOriginalEstimatedTime(undefined)\r\n setRemainingTime(undefined)\r\n setIsRequestQueued(false)\r\n setOptimizationCancelRequested(false)\r\n if (remainingTimeDecreaseFn) {\r\n clearInterval(remainingTimeDecreaseFn)\r\n }\r\n }\r\n\r\n const startSignalR = async (signalR: signalR.HubConnection): Promise => {\r\n try {\r\n setSignalRConnectionState(ConnectionState.Connecting)\r\n await signalR.start()\r\n\r\n setSignalRConnectionState(ConnectionState.Connected)\r\n return true\r\n } catch (exception) {\r\n console.error(exception)\r\n\r\n setSignalRConnectionState(ConnectionState.Disconnected)\r\n\r\n return false\r\n }\r\n }\r\n\r\n const onSignalRConnectionClosed = () => {\r\n if (hasStartedOptimization) {\r\n notificationsDispatch({\r\n type: ADD_NOTIFICATION,\r\n value: {\r\n type: NotificationType.Warning,\r\n title: t('You were disconnected from the server'),\r\n body: t('Please, try run your computing again.'),\r\n autoDismissAfterSeconds: 8,\r\n },\r\n })\r\n }\r\n\r\n resetComponentState()\r\n }\r\n\r\n const setupSignalR = async (): Promise => {\r\n const newSignalRConnection = new signalR.HubConnectionBuilder()\r\n .withUrl(signalRUrls.optimize.platforms)\r\n .configureLogging(signalR.LogLevel.Error)\r\n .withAutomaticReconnect([1000, 2000, 3000, 4000, 5000, 10000, 10000, 30000, 60000])\r\n .build()\r\n\r\n newSignalRConnection.on(clientMethods.optimizePlatformsResult, (data?: TResult) => {\r\n if (!data) {\r\n onError('No result was returned')\r\n resetComponentState()\r\n\r\n return\r\n }\r\n\r\n onResult(data)\r\n resetComponentState()\r\n })\r\n\r\n newSignalRConnection.on(clientMethods.optimizePlatformsOptimizationId, (data: string) => {\r\n setOptimizationId(data)\r\n })\r\n\r\n newSignalRConnection.on(clientMethods.optimizePlatformsRequestQueued, () => {\r\n setIsRequestQueued(true)\r\n })\r\n\r\n newSignalRConnection.on(clientMethods.optimizePlatformsEstimatedTime, (data: number) => {\r\n setRemainingTime(data)\r\n setOriginalEstimatedTime(data)\r\n\r\n setRemainingTimeDecreaseFn(\r\n setInterval(() => {\r\n setRemainingTime((_) => (_ ? _ - 1 : undefined))\r\n }, 1000)\r\n )\r\n })\r\n\r\n newSignalRConnection.on(clientMethods.optimizePlatformsCancelled, () => {\r\n resetComponentState()\r\n onCancel()\r\n })\r\n\r\n newSignalRConnection.on(clientMethods.optimizePlatformsError, () => {\r\n resetComponentState()\r\n onError('Something went wrong while optimizing')\r\n })\r\n\r\n newSignalRConnection.onreconnecting(() => setSignalRConnectionState(ConnectionState.Connecting))\r\n newSignalRConnection.onreconnected(() => setSignalRConnectionState(ConnectionState.Connected))\r\n newSignalRConnection.onclose((_) => {\r\n console.error(_)\r\n setSignalRConnectionState(ConnectionState.Disconnected)\r\n })\r\n\r\n setSignalRConnection(newSignalRConnection)\r\n await startSignalR(newSignalRConnection)\r\n\r\n return newSignalRConnection\r\n }\r\n\r\n useEffect(() => {\r\n setupSignalR().catch((_) => console.error(_))\r\n\r\n return () => {\r\n if (remainingTimeDecreaseFn) {\r\n clearInterval(remainingTimeDecreaseFn)\r\n }\r\n\r\n signalRConnection?.stop()\r\n }\r\n }, [])\r\n\r\n useEffect(() => {\r\n onSignalRConnectionClosed()\r\n }, [signalRConnectionState])\r\n\r\n useEffect(() => {\r\n if (!remainingTime || remainingTime === 0) {\r\n if (remainingTimeDecreaseFn) {\r\n clearInterval(remainingTimeDecreaseFn)\r\n }\r\n }\r\n }, [remainingTime])\r\n\r\n const getAllowedLineTypes = (allowedLineTypes: {\r\n suburban: boolean\r\n longDistance: boolean\r\n international: boolean\r\n cityTransport: boolean\r\n }) => {\r\n let array: string[] = []\r\n if (allowedLineTypes.suburban) {\r\n array = array.concat('suburban')\r\n }\r\n if (allowedLineTypes.longDistance) {\r\n array = array.concat('longDistance')\r\n }\r\n if (allowedLineTypes.international) {\r\n array = array.concat('international')\r\n }\r\n if (allowedLineTypes.cityTransport) {\r\n array = array.concat('cityTransport')\r\n }\r\n\r\n return array\r\n }\r\n\r\n const getRequestOptimizeSettings = () => {\r\n if (!optimizationSettings.selectedStation) {\r\n throw new Error('No selected station.')\r\n }\r\n\r\n return {\r\n stationId: optimizationSettings.selectedStation.id,\r\n optimizeForDate: new Date(),\r\n platformsSettings: platformsSettings.map((_) => {\r\n return {\r\n platformName: _.name,\r\n minMinutesBetweenConnections: _.minMinutesBetweenConnections,\r\n allowedLineTypes: getAllowedLineTypes(_.allowedTypes),\r\n allowedLineIds: [],\r\n allowedConnectionIds: [],\r\n justForGettingOff: _.arrivalsOnly,\r\n }\r\n }),\r\n linesSettings: linesSettings.map((_) => {\r\n return {\r\n id: _.line.id,\r\n maxCountOfPlatforms: _.maxCountOfPlatforms,\r\n }\r\n }),\r\n connections: connections,\r\n algorithmMode: algorithmMode,\r\n }\r\n }\r\n\r\n const startOptimizing = () => {\r\n const args = getRequestOptimizeSettings()\r\n const serverMethod = serverMethods.optimizePlatforms\r\n\r\n setHasStartedOptimization(true)\r\n signalRConnection?.invoke(serverMethod, args).catch((_) => {\r\n console.error(_)\r\n setSignalRConnectionState(ConnectionState.Disconnected)\r\n })\r\n }\r\n\r\n const cancelOptimization = () => {\r\n signalRConnection\r\n ?.invoke(serverMethods.cancelPlatformsOptimization, optimizationId)\r\n .catch((_) => {\r\n console.error(_)\r\n setSignalRConnectionState(ConnectionState.Disconnected)\r\n })\r\n\r\n setOptimizationCancelRequested(true)\r\n }\r\n\r\n return {\r\n optimizationId,\r\n hasStartedOptimization,\r\n startOptimizing,\r\n cancelOptimization,\r\n remainingTime,\r\n isRequestQueued,\r\n signalRConnectionState,\r\n originalEstimatedTime,\r\n optimizationCancelRequested,\r\n }\r\n}\r\n","import { ConnectionGridItem } from '../components/connections/ConnectionsGrid'\r\nimport {\r\n ConnectionToPlatformTypeDto,\r\n LineToPlatformAssignment,\r\n} from '../models/LinesToPlatformsOptions'\r\nimport { ConnectionDto, ConnectionId, LineType } from '../models/PlatformOptimizationModels'\r\nimport { groupBy } from './arrayUtils'\r\nimport {\r\n compareByOperator,\r\n ComplexFilterPredicate,\r\n getFilterFnByGridFilter,\r\n NonComplexFilterPredicate,\r\n SortBy,\r\n} from './syncfusionGridUtils'\r\n\r\n/**\r\n * Functions for Syncfusion Grid with connections\r\n */\r\n\r\nexport const filterConnections = (\r\n connections: ConnectionGridItem[],\r\n predicate: ComplexFilterPredicate | undefined\r\n): ConnectionGridItem[] => {\r\n if (!predicate) {\r\n return connections\r\n }\r\n\r\n return connections.filter(\r\n getFilterFnByGridFilter(predicate, getPropComparerFromConnectionGridItem)\r\n )\r\n}\r\n\r\nexport const searchInConnections = (\r\n connections: ConnectionGridItem[],\r\n searchQuery: string | undefined\r\n): ConnectionGridItem[] => {\r\n if (!searchQuery) {\r\n return connections\r\n }\r\n\r\n const uppercaseSearchQuery = searchQuery.toLocaleUpperCase()\r\n\r\n return connections.filter(\r\n (_) =>\r\n _.lineName?.toLocaleUpperCase().includes(uppercaseSearchQuery) ||\r\n _.lineNumber?.toLocaleUpperCase().includes(uppercaseSearchQuery) ||\r\n _.name?.toLocaleUpperCase().includes(uppercaseSearchQuery) ||\r\n _.provider?.toLocaleUpperCase().includes(uppercaseSearchQuery)\r\n )\r\n}\r\n\r\nexport const getPropComparerFromConnectionGridItem = (\r\n predicate: NonComplexFilterPredicate,\r\n item: ConnectionGridItem\r\n): boolean => {\r\n switch (predicate.operator) {\r\n case 'equal':\r\n case 'notequal':\r\n return compareByOperator(item[predicate.field], predicate.value, predicate.operator)\r\n default:\r\n throw new Error(`Unknown operator '${predicate.operator}'`)\r\n }\r\n}\r\n\r\n/**\r\n * Sort connections by none, one or multiple keys.\r\n */\r\nexport const sortConnections = (\r\n connections: ConnectionGridItem[],\r\n sortBy: SortBy\r\n): ConnectionGridItem[] => {\r\n if (sortBy.length === 0) {\r\n return connections\r\n }\r\n\r\n const sortFns = []\r\n\r\n for (const sortByElement of sortBy ?? []) {\r\n const x = sortByElement.direction === 'desc' ? -1 : 1\r\n\r\n const sortFn = (a: ConnectionGridItem, b: ConnectionGridItem) => {\r\n let type = typeof a[sortByElement.by]\r\n if (type === 'undefined') {\r\n type = typeof b[sortByElement.by]\r\n\r\n if (type === 'undefined') {\r\n type = 'string'\r\n }\r\n }\r\n\r\n if (type === 'number') {\r\n const aNumber = a[sortByElement.by] as number\r\n const bNumber = b[sortByElement.by] as number\r\n\r\n return x * (aNumber - bNumber)\r\n }\r\n\r\n if (type === 'string') {\r\n return (\r\n x *\r\n (a[sortByElement.by] ?? '')\r\n .toString()\r\n .localeCompare((b[sortByElement.by] ?? '').toString())\r\n )\r\n }\r\n\r\n return 0\r\n }\r\n\r\n sortFns.push(sortFn)\r\n }\r\n\r\n return connections.sort(\r\n sortFns.reverse().reduce((prev, curr) => (a, b) => prev(a, b) || curr(a, b))\r\n )\r\n}\r\n/**\r\n * End of region for Syncfusion Grid\r\n */\r\n\r\n/**\r\n * Get connection ID string key\r\n */\r\n// TODO should we add also line number and sth else?\r\nexport const getConnectionIdKey = (connection: ConnectionDto): string =>\r\n `${connection.id.id}|${connection.id.ttIndex}}`\r\n\r\n/**\r\n * Get connections assigned to one of platforms\r\n */\r\nexport const getConnectionsOnPlatforms = (\r\n connections: ConnectionDto[],\r\n ...platforms: (string | undefined)[]\r\n): ConnectionDto[] =>\r\n connections.filter((_) =>\r\n platforms.reduce((prev: boolean, curr) => prev || curr === _.platform, false)\r\n )\r\n\r\nexport const renamePlatformInConnections = (\r\n oldPlatformName: string,\r\n newPlatformName: string,\r\n connections: ConnectionDto[]\r\n): ConnectionDto[] =>\r\n connections.map((_) => {\r\n if (_.platform !== oldPlatformName) {\r\n return _\r\n }\r\n\r\n return { ..._, platform: newPlatformName }\r\n })\r\n\r\nexport const isEndingConnection = (connection: ConnectionDto): boolean =>\r\n connection.departureTime === -1\r\n\r\nexport const removeNonEndingConnectionsFromPlatform = (\r\n connections: ConnectionDto[],\r\n platform: string\r\n): ConnectionDto[] =>\r\n connections.map((_) => {\r\n if (_.platform === platform && !isEndingConnection(_)) {\r\n return { ..._, platform: '' }\r\n }\r\n\r\n return _\r\n })\r\n\r\nexport const getConnectionsOnPlatformsGroupedByLines = (\r\n connections: ConnectionDto[],\r\n ...platforms: (string | undefined)[]\r\n): { key: string; items: ConnectionDto[] }[] =>\r\n groupBy(getConnectionsOnPlatforms(connections, ...platforms), (_) => _.lineNumber)\r\n\r\nexport const addConnectionsToPlatform = (\r\n allConnections: ConnectionDto[],\r\n selectedConnections: ConnectionDto[],\r\n platform: string\r\n) => {\r\n const getKey = (connection: ConnectionDto) =>\r\n `${connection.id.id}|${connection.id.ttIndex}|${connection.lineNumber}|${connection.name}}`\r\n const isSelected: { [key: string]: boolean } = {}\r\n selectedConnections.forEach((_) => (isSelected[getKey(_)] = true))\r\n\r\n return allConnections.map((_) => {\r\n if (isSelected[getKey(_)]) {\r\n return { ..._, platform: platform }\r\n }\r\n\r\n return _\r\n })\r\n}\r\n\r\nexport const removeConnectionsWithLineFromPlatform = (\r\n connections: ConnectionDto[],\r\n platform: string,\r\n lineId: string\r\n): ConnectionDto[] =>\r\n connections.map((_) => {\r\n if (_.platform === platform && _.lineNumber === lineId) {\r\n return { ..._, platform: '' }\r\n }\r\n\r\n return _\r\n })\r\n\r\nexport const removeConnectionsWithLineTypeFromPlatform = (\r\n connections: ConnectionDto[],\r\n platform: string,\r\n lineType: LineType\r\n) =>\r\n connections.map((_) => {\r\n if (_.platform === platform && _.lineType === lineType) {\r\n return { ..._, platform: '' }\r\n }\r\n\r\n return _\r\n })\r\n\r\nexport const removeConnectionsOfLineFromAllPlatforms = (\r\n lineId: string,\r\n connections: ConnectionDto[]\r\n): ConnectionDto[] =>\r\n connections.map((_) => {\r\n if (_.lineNumber === lineId) {\r\n return { ..._, platform: '' }\r\n }\r\n\r\n return _\r\n })\r\n\r\nexport const clearPlatformsInAllConnections = (connections: ConnectionDto[]): ConnectionDto[] =>\r\n connections.map((_) => ({ ..._, platform: '' }))\r\n\r\nexport const getConnectionByIdWithError = (\r\n connections: ConnectionDto[],\r\n id: ConnectionId\r\n): ConnectionDto => {\r\n const itemIndex = connections.findIndex((_) => _.id.id === id.id && _.id.ttIndex === id.ttIndex)\r\n\r\n if (itemIndex === -1) {\r\n throw new Error(`Could not find connection with ID '${id.id}'|'${id.ttIndex}'`)\r\n }\r\n\r\n return connections[itemIndex]\r\n}\r\n\r\n/**\r\n * Copy platform from one connection array to another\r\n * @param connections\r\n * @param connectionsToCopyFrom\r\n * @param modifyDestinationConnectionBeforeCopy Function to modify connection to which platform will be copied\r\n */\r\nexport const copyPlatformsFromConnections = (\r\n connections: ConnectionDto[],\r\n connectionsToCopyFrom: ConnectionDto[],\r\n modifyDestinationConnectionBeforeCopy: (connection: ConnectionDto) => ConnectionDto\r\n): ConnectionDto[] => {\r\n const connectionsToCopyFromMap: { [key: string]: ConnectionDto } = {}\r\n connectionsToCopyFrom.forEach((_) => (connectionsToCopyFromMap[getConnectionIdKey(_)] = _))\r\n\r\n return connections.map((_) => {\r\n const connectionToCopyFrom = connectionsToCopyFromMap[getConnectionIdKey(_)]\r\n const modifiedDestinationConnection = modifyDestinationConnectionBeforeCopy(_)\r\n \r\n if (connectionToCopyFrom) {\r\n return { ...modifiedDestinationConnection, platform: connectionToCopyFrom.platform }\r\n }\r\n\r\n return modifiedDestinationConnection\r\n })\r\n}\r\n\r\nexport const assignConnectionsToPlatformsByCriteria = (\r\n connections: ConnectionDto[],\r\n optimizationResultConnections: ConnectionDto[],\r\n criteria: LineToPlatformAssignment[]\r\n): ConnectionDto[] => {\r\n const clearPlatformFn = (_: ConnectionDto) => ({ ..._, platform: '' })\r\n \r\n return copyPlatformsFromConnections(connections, optimizationResultConnections, clearPlatformFn).map((_) => {\r\n if (_.platform) {\r\n return _\r\n }\r\n\r\n const itemCriteria = criteria.find(\r\n (__) =>\r\n _.lineNumber === __.lineNumber &&\r\n (__.connectionsType === ConnectionToPlatformTypeDto.All ||\r\n (__.connectionsType === ConnectionToPlatformTypeDto.NonEnding &&\r\n !isEndingConnection(_)) ||\r\n (__.connectionsType === ConnectionToPlatformTypeDto.Ending && isEndingConnection(_)))\r\n )\r\n\r\n if (!itemCriteria) {\r\n throw new Error(\r\n `Connection ${_.lineNumber}/${_.name} (${_.id.id}|${_.id.ttIndex}) does not have criteria to which platform it' +\r\n ' should be assigned.`\r\n )\r\n }\r\n\r\n return { ..._, platform: itemCriteria.platform }\r\n })\r\n}\r\n","import { TranslationFnType } from './otherUtils'\r\nimport { ConnectionToPlatformTypeDto } from '../models/LinesToPlatformsOptions'\r\n\r\nexport const getConnectionToPlatformTypeDescription = (\r\n t: TranslationFnType,\r\n connectionType: ConnectionToPlatformTypeDto\r\n): string => {\r\n switch (connectionType) {\r\n case ConnectionToPlatformTypeDto.All:\r\n return t('All')\r\n case ConnectionToPlatformTypeDto.NonEnding:\r\n return t('Non-ending')\r\n case ConnectionToPlatformTypeDto.Ending:\r\n return t('Ending')\r\n }\r\n}","import ChevronRightIcon from '@mui/icons-material/ChevronRight'\r\nimport {\r\n alpha,\r\n Chip,\r\n Collapse,\r\n FormControl,\r\n IconButton,\r\n InputLabel,\r\n MenuItem,\r\n Select,\r\n Stack,\r\n Typography,\r\n} from '@mui/material'\r\nimport { styled } from '@mui/material/styles'\r\nimport React, { FC, useMemo, useState } from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport {\r\n ConnectionToPlatformTypeDto,\r\n LineToPlatformsOptionsDto,\r\n} from '../../../models/LinesToPlatformsOptions'\r\nimport { sortBySemiNumeric } from '../../../utils/arrayUtils'\r\nimport { getConnectionToPlatformTypeDescription } from '../../../utils/connectionToPlatformTypeUtils'\r\n\r\nexport interface Props {\r\n option: LineToPlatformsOptionsDto & { selected: string }\r\n onOptionsChange: (\r\n lineNumber: string,\r\n connectionsType: ConnectionToPlatformTypeDto,\r\n platform: string\r\n ) => void\r\n}\r\n\r\nconst HoverStack = styled(Stack)(({ theme }) => ({\r\n transition: 'all 0.3s ease',\r\n borderRadius: theme.shape.borderRadius,\r\n padding: theme.spacing(1, 3),\r\n '&:hover': {\r\n backgroundColor: alpha(theme.palette.secondary.light, 0.7),\r\n },\r\n}))\r\n\r\nconst AssignConnectionsToPlatformForm: FC = (props) => {\r\n const { t } = useTranslation()\r\n\r\n const [isDetailsOpen, setIsDetailsOpen] = useState(false)\r\n\r\n const selectId = `select-${props.option.lineNumber}`\r\n const selectLabelId = `select-label-${props.option.lineNumber}`\r\n\r\n const onChange = (newPlatform: string) => {\r\n props.onOptionsChange(props.option.lineNumber, props.option.connectionsType, newPlatform)\r\n }\r\n\r\n const sortedConnections = useMemo(\r\n () => sortBySemiNumeric([...props.option.connections], (_) => _),\r\n [props.option.connections]\r\n )\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n setIsDetailsOpen((_) => !_)}>\r\n \r\n \r\n\r\n {props.option.lineNumber}\r\n \r\n \r\n\r\n \r\n {t('Platform')}\r\n onChange(__.target.value)}\r\n >\r\n {props.option.possiblePlatforms.map((__) => (\r\n \r\n {__}\r\n \r\n ))}\r\n \r\n \r\n \r\n\r\n \r\n \r\n {t('Connections')}: {sortedConnections.join(', ')}\r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default AssignConnectionsToPlatformForm\r\n","import {\r\n Alert,\r\n Box,\r\n Button,\r\n Dialog,\r\n DialogActions,\r\n DialogContent,\r\n DialogTitle,\r\n} from '@mui/material'\r\nimport React, { FC, useState } from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport {\r\n ConnectionToPlatformTypeDto,\r\n LineToPlatformAssignment,\r\n LineToPlatformsOptionsDto,\r\n} from '../../models/LinesToPlatformsOptions'\r\nimport { getOptionsWithMultiplePlatforms } from '../../utils/applyOptimizationResultsUtils'\r\nimport AssignConnectionsToPlatformForm from './results/AssignConnectionsToPlatformForm'\r\n\r\nexport interface Props {\r\n options: LineToPlatformsOptionsDto[]\r\n onApply: (options: LineToPlatformAssignment[]) => void\r\n onClose: () => void\r\n}\r\n\r\nconst ApplyOptimizationResultsOptionsDialog: FC = (props) => {\r\n const { t } = useTranslation()\r\n\r\n const [options, setOptions] = useState<(LineToPlatformsOptionsDto & { selected: string })[]>(\r\n getOptionsWithMultiplePlatforms(props.options).map((_) => ({\r\n ..._,\r\n selected: _.possiblePlatforms[0],\r\n }))\r\n )\r\n\r\n const onOptionsChange = (\r\n lineNumber: string,\r\n connectionsType: ConnectionToPlatformTypeDto,\r\n platform: string\r\n ) => {\r\n const newOptions = options.map((_) => {\r\n if (_.lineNumber === lineNumber && _.connectionsType === connectionsType) {\r\n return { ..._, selected: platform }\r\n }\r\n\r\n return _\r\n })\r\n\r\n setOptions(newOptions)\r\n }\r\n\r\n const apply = () => {\r\n const userCriteria = options.map((_) => ({\r\n lineNumber: _.lineNumber,\r\n connectionsType: _.connectionsType,\r\n platform: _.selected,\r\n }))\r\n\r\n setOptions([])\r\n\r\n props.onApply(userCriteria)\r\n }\r\n\r\n return (\r\n \r\n {t('Apply results')}\r\n\r\n \r\n \r\n {t(\r\n 'There are multiple platforms available for some lines. Please select one platform for each line and its unassigned connections.'\r\n )}\r\n \r\n\r\n {options.map((_) => (\r\n \r\n ))}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default ApplyOptimizationResultsOptionsDialog\r\n","import AutoFixHighIcon from '@mui/icons-material/AutoFixHigh'\r\nimport CheckIcon from '@mui/icons-material/Check'\r\nimport { LoadingButton } from '@mui/lab'\r\nimport React, { FC, useCallback, useState } from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { usePlatformsToolContext } from '../../contexts/PlatformsToolContext'\r\nimport { useLinesToPlatformsOptionsApi } from '../../hooks/data/useLinesToPlatformsOptionsApi'\r\nimport {\r\n LineToPlatformAssignment,\r\n LineToPlatformsOptionsDto,\r\n} from '../../models/LinesToPlatformsOptions'\r\nimport { StationPlatformsOptimizationResultDto } from '../../models/PlatformOptimizationModels'\r\nimport {\r\n getAssignmentsFromOptions,\r\n getOptionsWithMultiplePlatforms,\r\n} from '../../utils/applyOptimizationResultsUtils'\r\nimport { assignConnectionsToPlatformsByCriteria } from '../../utils/connectionUtils'\r\nimport ApplyOptimizationResultsOptionsDialog from './ApplyOptimizationResultsOptionsDialog'\r\n\r\ninterface Props {\r\n optimizationResult: StationPlatformsOptimizationResultDto\r\n afterApply?: () => void\r\n}\r\n\r\nconst ApplyOptimizationResultsButton: FC = (props) => {\r\n const { t } = useTranslation()\r\n const {\r\n state: { connections: allConnections },\r\n setAllConnections,\r\n } = usePlatformsToolContext()\r\n\r\n const {\r\n fetch: fetchLinesToPlatformsOptions,\r\n isLoading: isLoadingOptions,\r\n } = useLinesToPlatformsOptionsApi()\r\n\r\n const [linesToPlatforms, setLinesToPlatforms] = useState([])\r\n const [options, setOptions] = useState([])\r\n const [wasApplied, setWasApplied] = useState(false)\r\n\r\n const loadLinesToPlatformsOptions = async () => {\r\n const result = await fetchLinesToPlatformsOptions(\r\n allConnections?.map((_) => ({ ..._, platform: '' })) ?? [],\r\n props.optimizationResult.resultId\r\n )\r\n\r\n if (!result) {\r\n return\r\n }\r\n\r\n const linesToPlatformsOptions = getAssignmentsFromOptions(result.lineToPlatformsOptions)\r\n const optionsWithMultiplePlatforms = getOptionsWithMultiplePlatforms(\r\n result.lineToPlatformsOptions\r\n )\r\n\r\n if (optionsWithMultiplePlatforms.length > 0) {\r\n setLinesToPlatforms(linesToPlatformsOptions)\r\n setOptions(optionsWithMultiplePlatforms)\r\n\r\n return\r\n }\r\n\r\n apply(linesToPlatformsOptions, [])\r\n }\r\n\r\n const apply = useCallback(\r\n (\r\n linesToPlatformsOptions: LineToPlatformAssignment[],\r\n userCriteria: LineToPlatformAssignment[]\r\n ) => {\r\n const criteria = [...linesToPlatformsOptions, ...userCriteria]\r\n const newConnections = assignConnectionsToPlatformsByCriteria(\r\n allConnections ?? [],\r\n props.optimizationResult.connections,\r\n criteria\r\n )\r\n\r\n setAllConnections(newConnections)\r\n setWasApplied(true)\r\n setLinesToPlatforms([])\r\n setOptions([])\r\n\r\n props.afterApply?.()\r\n },\r\n [allConnections, props, setAllConnections]\r\n )\r\n\r\n const cancel = () => {\r\n setWasApplied(false)\r\n setLinesToPlatforms([])\r\n setOptions([])\r\n }\r\n\r\n const onApply = useCallback(\r\n (userCriteria: LineToPlatformAssignment[]) => {\r\n apply(linesToPlatforms, userCriteria)\r\n },\r\n [apply, linesToPlatforms]\r\n )\r\n\r\n return (\r\n <>\r\n : }\r\n color={wasApplied ? 'primary' : 'secondary'}\r\n sx={{ my: 1, whiteSpace: 'nowrap' }}\r\n >\r\n {wasApplied ? t('Results applied') : t('Apply results')}\r\n \r\n\r\n {options.length > 0 && (\r\n \r\n )}\r\n \r\n )\r\n}\r\n\r\nexport default ApplyOptimizationResultsButton\r\n","import useAxios from 'axios-hooks'\r\nimport {\r\n LinesToPlatformsOptionsCreateDto,\r\n LinesToPlatformsOptionsDto,\r\n} from '../../models/LinesToPlatformsOptions'\r\nimport { apiUrls } from '../../utils/urls'\r\nimport { useCallback } from 'react'\r\nimport { ConnectionDto } from '../../models/PlatformOptimizationModels'\r\nimport { useNotificationsContext } from '../../contexts/NotificationsContext'\r\nimport { useTranslation } from 'react-i18next'\r\n\r\ninterface HookInterface {\r\n data: LinesToPlatformsOptionsDto | undefined\r\n isLoading: boolean\r\n fetch: (\r\n allConnections: ConnectionDto[],\r\n optimizationResultId: string\r\n ) => Promise\r\n}\r\n\r\nexport const useLinesToPlatformsOptionsApi = (): HookInterface => {\r\n const { t } = useTranslation()\r\n const { addNotification } = useNotificationsContext()\r\n const [{ data, loading }, fetchAxios] = useAxios(\r\n {\r\n url: apiUrls.linesToPlatformsOptions,\r\n method: 'post',\r\n },\r\n { manual: true }\r\n )\r\n\r\n const fetch = useCallback(\r\n async (allConnections: ConnectionDto[], optimizationResultId: string) => {\r\n const body: LinesToPlatformsOptionsCreateDto = {\r\n allConnections: allConnections,\r\n resultId: optimizationResultId,\r\n }\r\n\r\n try {\r\n return (await fetchAxios({ data: body })).data\r\n } catch (error) {\r\n console.log(error)\r\n addNotification({\r\n title: t('Cannot fetch options for assigning lines to platforms'),\r\n })\r\n }\r\n },\r\n [addNotification, fetchAxios, t]\r\n )\r\n\r\n return {\r\n data: data,\r\n isLoading: loading,\r\n fetch: fetch,\r\n }\r\n}\r\n","import { removeConnectionsOfLineFromAllPlatforms } from '../../utils/connectionUtils'\r\nimport { useCallback } from 'react'\r\nimport { usePlatformsOptimizationContext } from '../../contexts/PlatformsOptimizationContext'\r\n\r\nexport const usePlatformsActions = () => {\r\n const {\r\n setConnections,\r\n setAllPlatformsSettings,\r\n setAllLinesSettings,\r\n state: { connections, platformsSettings, linesSettings },\r\n } = usePlatformsOptimizationContext()\r\n\r\n const removeLineFromAllPlatforms = useCallback(\r\n (lineId: string) => {\r\n setConnections(removeConnectionsOfLineFromAllPlatforms(lineId, connections ?? []))\r\n\r\n setAllPlatformsSettings(\r\n platformsSettings.map((_) => ({\r\n ..._,\r\n assignedLines: _.assignedLines.filter((__) => __.line.id !== lineId),\r\n }))\r\n )\r\n\r\n setAllLinesSettings(\r\n linesSettings.map((_) => {\r\n if (_.line.id !== lineId) {\r\n return _\r\n }\r\n\r\n return {\r\n ..._,\r\n lineOnPlatformsCount: 0,\r\n }\r\n })\r\n )\r\n },\r\n [\r\n connections,\r\n linesSettings,\r\n platformsSettings,\r\n setAllLinesSettings,\r\n setAllPlatformsSettings,\r\n setConnections,\r\n ]\r\n )\r\n\r\n return {\r\n removeLineFromAllPlatforms,\r\n }\r\n}\r\n","import AddIcon from '@mui/icons-material/Add'\r\nimport DeleteIcon from '@mui/icons-material/Delete'\r\nimport {\r\n Box,\r\n Button,\r\n Dialog,\r\n DialogActions,\r\n DialogContent,\r\n DialogContentText,\r\n DialogTitle,\r\n Divider,\r\n Stack,\r\n Typography,\r\n} from '@mui/material'\r\nimport { styled } from '@mui/material/styles'\r\nimport cx from 'classnames'\r\nimport React, { FC, useMemo, useState } from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { usePlatformsOptimizationContext } from '../../../contexts/PlatformsOptimizationContext'\r\nimport { usePlatformsToolContext } from '../../../contexts/PlatformsToolContext'\r\nimport { usePlatformsActions } from '../../../hooks/platform-optimization/usePlatformsActions'\r\nimport { LineOnPlatformDto } from '../../../models/PlatformOptimizationModels'\r\nimport { getWordyEnumerationOfArray, semiNumericSortFn } from '../../../utils/arrayUtils'\r\nimport { unwrap } from '../../../utils/otherUtils'\r\nimport { otherUrls } from '../../../utils/urls'\r\n\r\nexport interface GeneralProps {\r\n lines: LineOnPlatformDto[]\r\n onAddLine?: () => void\r\n}\r\n\r\ninterface PropsWithRemoveLine {\r\n isRemovingAllowed: true\r\n removeLineFromPlatform: (lineId: string) => void\r\n}\r\n\r\ninterface PropsWithoutRemoveLine {\r\n isRemovingAllowed: false\r\n}\r\n\r\ntype Props = GeneralProps & (PropsWithRemoveLine | PropsWithoutRemoveLine)\r\n\r\nconst rightHoverSelector = 'right-hover'\r\nconst rightHoverWidth = 32\r\n\r\nconst LineTypography = styled(Typography)({\r\n fontWeight: 'bold',\r\n background: '#eeeeee',\r\n zIndex: 100,\r\n borderRadius: '.2em',\r\n padding: '0.2em 0.5em',\r\n fontSize: 14,\r\n})\r\n\r\nconst ConnectionsCountTypography = styled(Typography)({\r\n background: '#eeeeee',\r\n zIndex: 100,\r\n borderRadius: '.2em',\r\n padding: '0.2em 0.5em',\r\n})\r\n\r\nconst StyledBox = styled(Box)({\r\n background: '#eeeeee',\r\n borderRadius: '.2em',\r\n color: '#606060',\r\n marginBottom: '.2em',\r\n marginRight: '.2em',\r\n position: 'relative',\r\n transition: 'all ease 0.5s',\r\n '&:hover': {\r\n boxShadow: 'rgb(0 0 0 / 30%) 0 0 10px 0px',\r\n zIndex: 101,\r\n },\r\n cursor: 'default',\r\n [`& .${rightHoverSelector}`]: {\r\n position: 'absolute',\r\n right: 0,\r\n width: rightHoverWidth,\r\n height: '100%',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n borderRadius: '.2em',\r\n background: '#eeeeee',\r\n opacity: 0,\r\n transition: 'all ease 0.5s',\r\n boxShadow: 'rgb(0 0 0 / 40%) 0 0 10px 0px',\r\n zIndex: 90,\r\n },\r\n [`&:hover .${rightHoverSelector}`]: {\r\n opacity: 1,\r\n right: -rightHoverWidth + 5,\r\n },\r\n})\r\n\r\nconst LinesList: FC = (props) => {\r\n const { t } = useTranslation()\r\n\r\n const {\r\n state: { selectedStation },\r\n } = usePlatformsToolContext()\r\n const { removeLineFromAllPlatforms } = usePlatformsActions()\r\n\r\n const {\r\n state: { platformsSettings },\r\n } = usePlatformsOptimizationContext()\r\n\r\n const [deleteConfirmation, setDeleteConfirmation] = useState<{\r\n lineId: string\r\n allPlatforms: string[]\r\n }>()\r\n\r\n const sortedLines = useMemo(\r\n () => props.lines.sort((a, b) => semiNumericSortFn(a, b, (_) => _.line.id)),\r\n [props.lines]\r\n )\r\n\r\n const cancelDeleteLine = () => setDeleteConfirmation(undefined)\r\n\r\n const deleteLineFromPlatform = (lineId: string) => {\r\n if (props.isRemovingAllowed) {\r\n props.removeLineFromPlatform(lineId)\r\n }\r\n\r\n cancelDeleteLine()\r\n }\r\n\r\n const deleteLineFromAllPlatforms = (lineId: string) => {\r\n removeLineFromAllPlatforms(lineId)\r\n\r\n cancelDeleteLine()\r\n }\r\n\r\n const onLineDeleteClick = (lineId: string) => {\r\n if (props.isRemovingAllowed) {\r\n const lineOnPlatforms = platformsSettings.filter((_) =>\r\n _.assignedLines.find((__) => __.line.id === lineId)\r\n )\r\n\r\n if (lineOnPlatforms.length === 1) {\r\n props.removeLineFromPlatform(lineId)\r\n } else if (lineOnPlatforms.length > 1) {\r\n setDeleteConfirmation({\r\n allPlatforms: lineOnPlatforms.map((_) => _.name),\r\n lineId: lineId,\r\n })\r\n } else {\r\n // TODO throw some error?\r\n }\r\n }\r\n }\r\n\r\n const onLineClick = (lineId: string) => {\r\n if (!selectedStation?.state) {\r\n return\r\n }\r\n\r\n const url = otherUrls.lineTimetable(lineId, selectedStation.state)\r\n\r\n if (url) {\r\n window.open(url, '_blank')\r\n }\r\n }\r\n\r\n return (\r\n <>\r\n
\r\n \r\n {t('Assigned lines/connections')}{' '}\r\n \r\n ({t('Together')}: {props.lines.length}/\r\n {props.lines.reduce((prev, curr) => prev + curr.connsCount, 0)})\r\n \r\n \r\n\r\n
\r\n {sortedLines.map((_) => (\r\n \r\n \r\n {_.line.id.length === 6 ? (\r\n onLineClick(_.line.id)}\r\n size={'small'}\r\n color={'secondary'}\r\n sx={{\r\n m: 0,\r\n px: 1,\r\n borderBottomRightRadius: 0,\r\n borderTopRightRadius: 0,\r\n fontSize: 14,\r\n }}\r\n >\r\n {_.line.id}\r\n \r\n ) : (\r\n {_.line.id}\r\n )}\r\n \r\n {_.connsCount}\r\n\r\n {props.isRemovingAllowed && (\r\n
\r\n \r\n
\r\n )}\r\n
\r\n
\r\n ))}\r\n\r\n {props.onAddLine && (\r\n \r\n )}\r\n
\r\n
\r\n\r\n \r\n \r\n {t('Remove line x from platform', { line: deleteConfirmation?.lineId ?? '' })}\r\n \r\n \r\n \r\n {t(\r\n 'This line is on multiple platforms (x). Do you want to delete it only from selected platform or from all platforms?',\r\n { platforms: getWordyEnumerationOfArray(deleteConfirmation?.allPlatforms ?? [], t) }\r\n )}\r\n \r\n \r\n \r\n \r\n deleteLineFromPlatform(unwrap(deleteConfirmation?.lineId))}\r\n sx={{ mb: 1 }}\r\n >\r\n {t('Remove from selected platform')}\r\n \r\n deleteLineFromAllPlatforms(unwrap(deleteConfirmation?.lineId))}\r\n color={'error'}\r\n sx={{ ml: 1, mb: 1 }}\r\n >\r\n {t('Remove from all platforms')}\r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default LinesList\r\n","import React, { FC } from 'react'\r\nimport styles from './Checkbox.module.scss'\r\nimport cx from 'classnames'\r\n\r\nexport interface Props {\r\n value: boolean\r\n onChange: (newValue: boolean) => void\r\n}\r\n\r\nconst Checkbox: FC = (props) => {\r\n return (\r\n props.onChange(!props.value)}\r\n >\r\n \r\n \r\n\r\n setIsDetailVisible(false)}>\r\n \r\n {t(props.arrivalsOnly ? 'Platform (for arrivals only)' : 'Platform')}{' '}\r\n {props.platformName}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default PlatformResults\r\n","import { faChevronLeft } from '@fortawesome/free-solid-svg-icons/faChevronLeft'\r\nimport { faChevronRight } from '@fortawesome/free-solid-svg-icons/faChevronRight'\r\nimport { faExchangeAlt } from '@fortawesome/free-solid-svg-icons/faExchangeAlt'\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport BarChartIcon from '@mui/icons-material/BarChart'\r\nimport { Button, Typography } from '@mui/material'\r\nimport cx from 'classnames'\r\nimport { format } from 'date-fns'\r\nimport React, { FC, useContext, useState } from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { useHistory } from 'react-router-dom'\r\nimport {\r\n OptimizationStep,\r\n useOptimizePlatformsPageContext,\r\n} from '../../contexts/OptimizePlatformsPageContext'\r\nimport { usePlatformsOptimizationContext } from '../../contexts/PlatformsOptimizationContext'\r\nimport { PlatformsToolContext } from '../../contexts/PlatformsToolContext'\r\nimport { unwrap } from '../../utils/otherUtils'\r\nimport { appUrls } from '../../utils/urls'\r\nimport { scrollToTop } from '../../utils/windowUtils'\r\nimport ApplyOptimizationResultsButton from './ApplyOptimizationResultsButton'\r\nimport PlatformResults from './PlatformResults'\r\n\r\nconst PlatformsResults: FC = () => {\r\n const { state: optimizationSettings } = useContext(PlatformsToolContext)\r\n const {\r\n state: { results },\r\n setResults,\r\n } = usePlatformsOptimizationContext()\r\n const { changeStep } = useOptimizePlatformsPageContext()\r\n\r\n const { t } = useTranslation()\r\n const history = useHistory()\r\n\r\n const [areResultsApplied, setAreResultsApplied] = useState(false)\r\n\r\n const showForm = () => {\r\n changeStep(OptimizationStep.DefineSettings)\r\n setResults(undefined)\r\n\r\n scrollToTop()\r\n }\r\n\r\n const goToStatistics = () => {\r\n if (!optimizationSettings.selectedStationId) {\r\n throw new Error('When redirecting to connections page station ID must be set')\r\n }\r\n\r\n changeStep(OptimizationStep.DefineSettings)\r\n setResults(undefined)\r\n\r\n history.push(appUrls.connections.withParams(optimizationSettings.selectedStationId))\r\n }\r\n\r\n if (!results) {\r\n return (\r\n
\r\n
\r\n
{t('Could not load results.')}
\r\n\r\n \r\n
\r\n
\r\n )\r\n }\r\n\r\n return (\r\n <>\r\n
\r\n
\r\n \r\n
\r\n\r\n \r\n \r\n {t('Platforms results')}\r\n \r\n {optimizationSettings.selectedStation?.name} |{' '}\r\n {format(unwrap(optimizationSettings.connectionsDateFilter), 'dd.MM.yyyy')}\r\n \r\n
\r\n\r\n \r\n setAreResultsApplied(true)}\r\n />\r\n\r\n {areResultsApplied && (\r\n \r\n \r\n {t('Statistics')}\r\n \r\n )}\r\n \r\n \r\n\r\n \r\n {results.platformsResults?.map((_) => (\r\n
\r\n \r\n
\r\n ))}\r\n \r\n \r\n )\r\n}\r\n\r\nexport default PlatformsResults\r\n","export const scrollToTop = (): void => {\r\n window.scrollTo({\r\n top: 0,\r\n behavior: 'smooth',\r\n })\r\n}\r\n","import React,{ FC,useEffect } from 'react';\r\nimport { LayoutWidth,useLayoutContext } from '../../../contexts/LayoutContext';\r\nimport { SET_STATE } from '../../../contexts/LayoutReducer';\r\nimport Help from \"../../general/Help\";\r\nimport PlatformsOptimizationResultsHelp from \"../../help/PlatformsOptimizationResultsHelp\";\r\nimport PlatformsResults from '../PlatformsResults';\r\n\r\nconst OptimizationResultsStep: FC = () => {\r\n const {dispatch: layoutDispatch} = useLayoutContext()\r\n\r\n useEffect(() => {\r\n layoutDispatch({\r\n type: SET_STATE,\r\n value: {\r\n width: LayoutWidth.Full,\r\n alignContentItemsCenter: false,\r\n svgBg: undefined,\r\n },\r\n })\r\n }, [layoutDispatch])\r\n\r\n return <>\r\n \r\n\r\n \r\n \r\n \r\n \r\n}\r\n\r\nexport default OptimizationResultsStep\r\n","import { AlgorithmMode } from '../contexts/PlatformsToolContext'\r\nimport { AlgorithmModeDto } from '../models/PlatformOptimizationModels'\r\n\r\nexport const getAlgorithmModeFromDto = (algorithmMode: AlgorithmModeDto): AlgorithmMode => {\r\n if (algorithmMode === AlgorithmModeDto.ConflictCount) {\r\n return AlgorithmMode.ConflictCount\r\n }\r\n\r\n if (algorithmMode === AlgorithmModeDto.ConflictSize) {\r\n return AlgorithmMode.ConflictSize\r\n }\r\n\r\n if (algorithmMode === AlgorithmModeDto.RegularizedConflictSize) {\r\n return AlgorithmMode.RegularizedConflictSize\r\n }\r\n \r\n throw new Error('Unknown algorithm mode')\r\n}\r\n\r\nexport const getDtoFromAlgorithmMode = (algorithmMode: AlgorithmMode): AlgorithmModeDto => {\r\n if (algorithmMode === AlgorithmMode.ConflictCount) {\r\n return AlgorithmModeDto.ConflictCount\r\n }\r\n\r\n if (algorithmMode === AlgorithmMode.ConflictSize) {\r\n return AlgorithmModeDto.ConflictSize\r\n }\r\n\r\n if (algorithmMode === AlgorithmMode.RegularizedConflictSize) {\r\n return AlgorithmModeDto.RegularizedConflictSize\r\n }\r\n\r\n throw new Error('Unknown algorithm mode')\r\n}","import { PlatformSettings } from '../contexts/PlatformsToolContext'\r\nimport { getLineTypesObjectFromDto } from './lineTypesUtils'\r\nimport { ConnectionDto, PlatformDto } from '../models/PlatformOptimizationModels'\r\nimport { getDistinctFromArray } from './arrayUtils'\r\nimport { defaultMinMinutesBetweenConnections } from '../contexts/PlatformsOptimizationReducer'\r\n\r\nexport const platformDtoToPlatformSettings = (platform: PlatformDto): PlatformSettings => ({\r\n name: platform.name,\r\n arrivalsOnly: platform.arrivalsOnly,\r\n allowedTypes: getLineTypesObjectFromDto(platform.assignedLineTypes),\r\n minMinutesBetweenConnections: defaultMinMinutesBetweenConnections,\r\n isValid: true,\r\n assignedLines: platform.assignedLines,\r\n})\r\n\r\n/**\r\n * Count platforms which the line is assigned to.\r\n * Do not count platforms for arrivals only.\r\n */\r\nexport const getCountOfPlatformsWithLine = (\r\n lineNumber: string,\r\n connections: ConnectionDto[],\r\n exitPlatformsNames: string[]\r\n): number => {\r\n const isExitPlatform: { [key: string]: boolean } = {}\r\n exitPlatformsNames.forEach((_) => (isExitPlatform[_] = true))\r\n\r\n const lineNumberConnections = connections.filter((_) => _.lineNumber === lineNumber)\r\n const distinctPlatforms = getDistinctFromArray(lineNumberConnections, (_) => _.platform)\r\n const justPlatforms = distinctPlatforms.filter(\r\n (_) => _ !== undefined && _ !== '' && !isExitPlatform[_]\r\n )\r\n\r\n return justPlatforms.length\r\n}\r\n\r\n/**\r\n * For every line in array return array of platforms which the line is assigned to.\r\n */\r\nexport const getPlatformsHoldingLines = (\r\n lineNumber: string[],\r\n connections: ConnectionDto[],\r\n exitPlatformsNames: string[]\r\n): { [key: string]: string[] } => {\r\n const isCountingForLine: { [key: string]: boolean } = {}\r\n const linesPlatformsIterated: { [key: string]: { [key: string]: boolean } } = {}\r\n const result: { [key: string]: string[] } = {}\r\n\r\n const isExitPlatform: { [key: string]: boolean } = {}\r\n exitPlatformsNames.forEach((_) => (isExitPlatform[_] = true))\r\n\r\n lineNumber.forEach((_) => {\r\n isCountingForLine[_] = true\r\n linesPlatformsIterated[_] = {}\r\n result[_] = []\r\n })\r\n\r\n for (let i = 0; i < connections.length; i++) {\r\n const currentConnection = connections[i]\r\n const currentLine = currentConnection.lineNumber\r\n const currentPlatform = currentConnection.platform\r\n\r\n if (isCountingForLine[currentLine]) {\r\n if (\r\n currentPlatform !== undefined &&\r\n currentPlatform !== '' &&\r\n !linesPlatformsIterated[currentLine][currentPlatform] &&\r\n !isExitPlatform[currentPlatform]\r\n ) {\r\n result[currentLine].push(currentPlatform)\r\n linesPlatformsIterated[currentLine][currentPlatform] = true\r\n }\r\n }\r\n }\r\n\r\n return result\r\n}\r\n","import { Button } from '@mui/material'\r\nimport React, { useCallback, useContext, useMemo } from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { NotificationsContext, NotificationType } from '../contexts/NotificationsContext'\r\nimport { ADD_NOTIFICATION } from '../contexts/NotificationsReducer'\r\nimport { usePlatformsOptimizationContext } from '../contexts/PlatformsOptimizationContext'\r\nimport { usePlatformsToolContext } from '../contexts/PlatformsToolContext'\r\nimport {\r\n LineType,\r\n PlatformOptimizationSettingsToStoreDto,\r\n} from '../models/PlatformOptimizationModels'\r\nimport { getAlgorithmModeFromDto, getDtoFromAlgorithmMode } from '../utils/algorithmModeUtils'\r\nimport { getDtoFromLineTypesObject, getLineTypesObjectFromDto } from '../utils/lineTypesUtils'\r\nimport { getPlatformsHoldingLines } from '../utils/platformUtils'\r\nimport { useDbStoredOptimizationSettings } from './data/useDbStoredOptimizationSettings'\r\n\r\ninterface HookInterface {\r\n hasStoredSettings: boolean\r\n saveSettings: () => void\r\n showDialogUseStoredSettings: () => void\r\n}\r\n\r\nexport const useStoredOptimizationSettings = (): HookInterface => {\r\n const { t } = useTranslation()\r\n\r\n const { state: platformsToolState } = usePlatformsToolContext()\r\n const {\r\n state: { platformsSettings, connections, algorithmMode, linesSettings },\r\n setConnections,\r\n setAllPlatformsSettings,\r\n setAllLinesSettings,\r\n setAlgorithmMode,\r\n } = usePlatformsOptimizationContext()\r\n\r\n const { dispatch: notificationsDispatch } = useContext(NotificationsContext)\r\n\r\n const { storedSettings: dbStoredSettings, update } = useDbStoredOptimizationSettings(\r\n platformsToolState.selectedStation?.id,\r\n connections ?? []\r\n )\r\n\r\n const storedSettings = useMemo(() => {\r\n if (!dbStoredSettings) {\r\n return undefined\r\n }\r\n\r\n return {\r\n platformsSettings: (dbStoredSettings?.platformsSettings ?? []).map((_) => ({\r\n ..._,\r\n allowedTypes: getLineTypesObjectFromDto(_.allowedLineTypes),\r\n isValid: true,\r\n })),\r\n linesSettings: (dbStoredSettings?.linesSettings ?? []).map((_) => ({\r\n line: _.line,\r\n maxCountOfPlatforms: _.lineOnPlatforms?.length ?? 0,\r\n lineOnPlatforms: getPlatformsHoldingLines(\r\n [_.line.name],\r\n dbStoredSettings.connections,\r\n dbStoredSettings.platformsSettings.filter((_) => _.arrivalsOnly).map((_) => _.name)\r\n )[_.line.name],\r\n })),\r\n algorithmMode: dbStoredSettings.algorithmMode,\r\n connections: dbStoredSettings.connections,\r\n }\r\n }, [dbStoredSettings])\r\n\r\n const applyStoredSettings = useCallback(() => {\r\n if (!storedSettings) {\r\n throw new Error('There are no stored settings for this station, therefore cannot apply them.')\r\n }\r\n\r\n // TODO put following dispatches into one action\r\n\r\n setAllPlatformsSettings(\r\n storedSettings.platformsSettings.map((_) => ({\r\n name: _.name,\r\n minMinutesBetweenConnections: _.minMinutesBetweenConnections,\r\n arrivalsOnly: _.arrivalsOnly,\r\n assignedLines: _.assignedLines,\r\n allowedTypes: getLineTypesObjectFromDto(_.allowedLineTypes),\r\n isValid: true,\r\n }))\r\n )\r\n\r\n setAllLinesSettings(\r\n storedSettings.linesSettings.map((_) => ({\r\n line: {\r\n id: _.line.id,\r\n lineNumber: _.line.id,\r\n },\r\n lineOnPlatforms: _.lineOnPlatforms,\r\n maxCountOfPlatforms: _.maxCountOfPlatforms,\r\n }))\r\n )\r\n\r\n setAlgorithmMode(getAlgorithmModeFromDto(storedSettings.algorithmMode))\r\n\r\n setConnections(storedSettings.connections)\r\n }, [\r\n storedSettings,\r\n setAllPlatformsSettings,\r\n setAllLinesSettings,\r\n setAlgorithmMode,\r\n setConnections,\r\n ])\r\n\r\n const showDialogUseStoredSettings = useCallback(() => {\r\n if (!storedSettings) {\r\n return\r\n }\r\n\r\n notificationsDispatch({\r\n type: ADD_NOTIFICATION,\r\n value: {\r\n type: NotificationType.Success,\r\n title: t('You have previous settings stored'),\r\n body: function renderBody(closeFn) {\r\n return (\r\n
\r\n
{t('Do you want to apply stored settings?')}
\r\n
\r\n {\r\n applyStoredSettings()\r\n closeFn()\r\n }}\r\n >\r\n {t('Yes')}\r\n \r\n \r\n
\r\n
\r\n )\r\n },\r\n },\r\n })\r\n }, [applyStoredSettings, notificationsDispatch, storedSettings, t])\r\n\r\n const saveSettingsInternal = async () => {\r\n await update({\r\n platformsSettings: platformsSettings.map((_) => ({\r\n name: _.name,\r\n minMinutesBetweenConnections: _.minMinutesBetweenConnections ?? 0,\r\n allowedLineTypes: getDtoFromLineTypesObject(_.allowedTypes),\r\n arrivalsOnly: _.arrivalsOnly,\r\n // TODO these assigned lines are probably not necessary because they are not stored to DB\r\n assignedLines: _.assignedLines,\r\n })),\r\n linesSettings: linesSettings.map((_) => ({\r\n // TODO fix line type\r\n // TODO the line type is probably not necessary because it is not stored to DB\r\n line: { id: _.line.id, name: _.line.lineNumber, lineType: LineType.suburban },\r\n lineOnPlatforms: _.lineOnPlatforms,\r\n maxCountOfPlatforms: _.maxCountOfPlatforms,\r\n })),\r\n algorithmMode: getDtoFromAlgorithmMode(algorithmMode),\r\n connections: connections ?? [],\r\n })\r\n }\r\n\r\n const saveSettings = () => {\r\n if (!platformsToolState.selectedStation) {\r\n throw new Error('Cannot store station optimization settings, when no station is selected')\r\n }\r\n\r\n saveSettingsInternal()\r\n .then(() =>\r\n notificationsDispatch({\r\n type: ADD_NOTIFICATION,\r\n value: {\r\n type: NotificationType.Success,\r\n title: t('Settings were saved'),\r\n autoDismissAfterSeconds: 6,\r\n },\r\n })\r\n )\r\n .catch(() =>\r\n notificationsDispatch({\r\n type: ADD_NOTIFICATION,\r\n value: {\r\n type: NotificationType.Error,\r\n title: t('Settings could not be saved'),\r\n autoDismissAfterSeconds: 6,\r\n },\r\n })\r\n )\r\n }\r\n\r\n return {\r\n hasStoredSettings: !!storedSettings,\r\n saveSettings,\r\n showDialogUseStoredSettings,\r\n }\r\n}\r\n","import useAxios from 'axios-hooks'\r\nimport { apiUrls } from '../../utils/urls'\r\nimport {\r\n ConnectionDto,\r\n PlatformOptimizationSettingsCreateStoredDto,\r\n PlatformOptimizationSettingsDto,\r\n PlatformOptimizationSettingsToStoreDto,\r\n} from '../../models/PlatformOptimizationModels'\r\nimport { useMemo } from 'react'\r\n\r\nexport const useDbStoredOptimizationSettings = (\r\n stationId: number | undefined,\r\n connections: ConnectionDto[]\r\n) => {\r\n const requestBodyMemo: PlatformOptimizationSettingsCreateStoredDto = useMemo(\r\n () => ({\r\n connections: connections,\r\n }),\r\n [connections]\r\n )\r\n\r\n const [\r\n { data: storedSettings, loading: isFetching, error: fetchError },\r\n ] = useAxios(\r\n {\r\n url: stationId ? apiUrls.optimizationSettings(stationId) : '',\r\n method: 'POST',\r\n data: requestBodyMemo,\r\n },\r\n { useCache: false }\r\n )\r\n\r\n const [{ loading: isUpdating, error: updateError }, updateAxios] = useAxios(\r\n { url: stationId ? apiUrls.optimizationSettings(stationId) : '', method: 'PUT' },\r\n { manual: true }\r\n )\r\n\r\n const update = async (settings: PlatformOptimizationSettingsToStoreDto) => {\r\n await updateAxios({ data: settings })\r\n }\r\n\r\n return {\r\n storedSettings,\r\n isFetching,\r\n fetchError,\r\n isUpdating,\r\n updateError,\r\n update,\r\n }\r\n}\r\n","import { Button, Typography, TypographyProps } from '@mui/material'\r\nimport React, { FC } from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\n\r\nconst PlatformsOptimizationSettingsHelp: FC = () => {\r\n const { i18n } = useTranslation()\r\n\r\n const typographyProps: TypographyProps = {\r\n variant: 'body2',\r\n }\r\n\r\n if (i18n.language === 'sk' || i18n.language === 'cs') {\r\n return (\r\n <>\r\n \r\n Pred spustením optimalizácie sa zobrazia nástupištia, na ktoré sú priradené načítané\r\n spoje. Každé nástupište má nasledovné predvolené nastavenia:\r\n \r\n
    \r\n
  • \r\n \r\n Minimálny čas medzi spojmi na nástupišti je nastavený na 5 minút.\r\n \r\n
  • \r\n
  • \r\n \r\n Prímestské, MHD, medzinárodné a diaľkové spoje majú povolenie zastavovať na\r\n nástupištiach podľa aktuálneho priradenia.\r\n \r\n
  • \r\n
  • \r\n \r\n Voľba "Len pre výstup" je nezaškrtnutá/zaškrtnutá, čo určuje, či je dané\r\n nástupište len pre výstup.\r\n \r\n
  • \r\n
\r\n \r\n Pre každé nástupište je možné vykonať nasledujúce zmeny:\r\n \r\n
    \r\n
  • \r\n \r\n Upraviť sledovaný rozostup zmenou hodnoty v poli "Minimálny čas medzi spojmi na\r\n nástupišti". Táto hodnota sa udáva v minútach, pričom minimálna hodnota je 0\r\n minút a maximálna hodnota je 60 minút.\r\n \r\n
  • \r\n
  • \r\n \r\n Zmeniť číslo nástupišťa na ľubovoľný reťazec. Na zobrazenie sa použijú prvé 4 znaky.\r\n \r\n
  • \r\n
  • \r\n \r\n Kliknutím na "Prímestské", "MHD", "Medzinárodné" alebo\r\n "Diaľkové" je možné povoliť/zakázať zastavenie spojov príslušného typu\r\n liniek na danom nástupišti.\r\n \r\n
  • \r\n
  • \r\n \r\n Zaškrtnutím políčka "Len pre výstup" sa vytvorí výstupište. Ak existuje\r\n aspoň jedno výstupište na zastávke, všetky nepriradené končiace spoje budú priradené\r\n na tieto výstupištia. Priradenie končiacich spojov je riešené oddelene od\r\n vychádzajúcich a tranzitných spojov pomocou optimalizačného algoritmu.\r\n \r\n
  • \r\n
\r\n \r\n Nové nástupište je možné pridať kliknutím na tlačidlo "Pridať nástupište". Nové\r\n nástupište sa automaticky pridá na koniec zoznamu, a je potrebné zadať jeho číslo a ďalšie\r\n údaje. Nástupište/výstupište je možné odstrániť kliknutím na červený symbol koša, ktorý sa\r\n zobrazí pri prechode myšou. Pre každé nástupište sa zobrazuje zoznam liniek a počet spojov\r\n danej linky.\r\n \r\n\r\n \r\n \r\n )\r\n }\r\n\r\n return <>\r\n}\r\n\r\nexport default PlatformsOptimizationSettingsHelp\r\n","import React, { FC, ReactElement } from 'react'\r\nimport cx from 'classnames'\r\n\r\nimport styles from './AlgorithmCard.module.scss'\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport { faCheck } from '@fortawesome/free-solid-svg-icons/faCheck'\r\n\r\nexport interface Props {\r\n title: string | ReactElement\r\n description: string\r\n isSelected: boolean\r\n onClick: () => void\r\n}\r\n\r\nconst AlgorithmCard: FC = (props) => {\r\n return (\r\n \r\n
\r\n {props.title}\r\n
\r\n {props.isSelected && (\r\n \r\n )}\r\n
\r\n
\r\n
{props.description}
\r\n \r\n )\r\n}\r\n\r\nexport default AlgorithmCard\r\n","import React, { FC } from 'react'\r\nimport AlgorithmCard from './AlgorithmCard'\r\nimport { AlgorithmMode } from '../../contexts/PlatformsToolContext'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { usePlatformsOptimizationContext } from '../../contexts/PlatformsOptimizationContext'\r\n\r\nconst AlgorithmModeSelector: FC = () => {\r\n const { t } = useTranslation()\r\n\r\n const {\r\n state: { algorithmMode },\r\n setAlgorithmMode,\r\n } = usePlatformsOptimizationContext()\r\n\r\n const setSelectedMode = (mode: AlgorithmMode) => {\r\n setAlgorithmMode(mode)\r\n }\r\n\r\n const minimizeConflictCountSkDescription =\r\n 'Proces optimalizácie sa snaží minimalizovať počet konfliktov. Konflikt je stav, kedy je medzi' +\r\n ' odchodom spoja a príchodom nasledujúceho spoja menší rozostup ako požaduje parameter definovaný' +\r\n ' pre nástupište, pričom veľkosť porušenia nemá na výpočet vplyv.'\r\n\r\n const minimizeConflictSizeSkDescription =\r\n 'Proces optimalizácie sa snaží minimalizovať veľkosti porušenia definovaného rozostupu.' +\r\n ' Výsledkom môže byť väčší počet konfliktov (v porovnaní s minimalizáciou počtu konfliktov),' +\r\n ' ale porušenia definovaného rozostupu budú čo možno najmenšie.'\r\n\r\n const minimizeRegularizedConflictSizeSkDescription =\r\n 'Proces optimalizácie sa snaží minimalizovať veľkosti porušenia definovaného rozostupu na druhú mocninu.' +\r\n ' Algoritmus sa vo výsledku snaží vyhýbať „veľkým“ konfliktom (ak je to možné), ' +\r\n ' pričom počet a súčet veľkostí konfliktov môže byť väčší ako pri zvyšných módoch.'\r\n\r\n return (\r\n
\r\n
\r\n

{t('Algorithm minimization modes')}

\r\n
\r\n
\r\n \r\n {t('Size')} {t('of conflicts')}\r\n \r\n }\r\n isSelected={algorithmMode === AlgorithmMode.ConflictSize}\r\n onClick={() => setSelectedMode(AlgorithmMode.ConflictSize)}\r\n description={minimizeConflictSizeSkDescription}\r\n />\r\n
\r\n
\r\n \r\n {t('Count')} {t('of conflicts')}\r\n \r\n }\r\n isSelected={algorithmMode === AlgorithmMode.ConflictCount}\r\n onClick={() => setSelectedMode(AlgorithmMode.ConflictCount)}\r\n description={minimizeConflictCountSkDescription}\r\n />\r\n
\r\n
\r\n \r\n {t('Count')} "{t('of big')}"{' '}\r\n {t('of conflicts')}\r\n \r\n }\r\n isSelected={algorithmMode === AlgorithmMode.RegularizedConflictSize}\r\n onClick={() => setSelectedMode(AlgorithmMode.RegularizedConflictSize)}\r\n description={minimizeRegularizedConflictSizeSkDescription}\r\n />\r\n
\r\n
\r\n )\r\n}\r\n\r\nexport default AlgorithmModeSelector\r\n","import { Button, Stack } from '@mui/material'\r\nimport cx from 'classnames'\r\nimport React, { FC, useContext, useEffect, useState } from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport Select from 'react-select'\r\nimport { usePlatformsOptimizationContext } from '../../../contexts/PlatformsOptimizationContext'\r\nimport { PlatformsToolContext } from '../../../contexts/PlatformsToolContext'\r\nimport { getPlatformsHoldingLines } from '../../../utils/platformUtils'\r\nimport styles from './AddNewLineSetting.module.scss'\r\n\r\ninterface Props {\r\n onSave: () => void\r\n onCancel: () => void\r\n}\r\n\r\nconst AddNewLineSetting: FC = (props) => {\r\n const { t } = useTranslation()\r\n\r\n const { state: optimizationSettings } = useContext(PlatformsToolContext)\r\n const {\r\n state: { unusedLines, allLines, platformsSettings },\r\n addLineSettings,\r\n } = usePlatformsOptimizationContext()\r\n\r\n const [lineSelectOptions, setLineSelectOptions] = useState<{ label: string; value: string }[]>([])\r\n const [selectedLine, setSelectedLine] = useState(\r\n unusedLines.length > 0 ? unusedLines[0].lineNumber : undefined\r\n )\r\n\r\n useEffect(() => {\r\n setLineSelectOptions(unusedLines.map((_) => ({ label: _.lineNumber, value: _.id })))\r\n }, [unusedLines])\r\n\r\n const onLineChange = (selectedItem?: { label: string; value: string }) => {\r\n if (!selectedItem) {\r\n return\r\n }\r\n\r\n const selectedLine = allLines.filter((_) => _.id === selectedItem.value)\r\n if (selectedLine.length === 0) {\r\n throw new Error(`Cannot find line by selected item's ID '${selectedItem.value}'`)\r\n }\r\n\r\n setSelectedLine(selectedItem.value)\r\n }\r\n\r\n const addLineSetting = () => {\r\n if (!selectedLine) {\r\n return\r\n }\r\n\r\n const exitPlatformsName = platformsSettings.filter((_) => _.arrivalsOnly).map((_) => _.name)\r\n\r\n addLineSettings({\r\n line: { id: selectedLine, lineNumber: selectedLine },\r\n lineOnPlatforms: getPlatformsHoldingLines(\r\n [selectedLine],\r\n optimizationSettings.connections ?? [],\r\n exitPlatformsName\r\n )[selectedLine],\r\n maxCountOfPlatforms: 2,\r\n })\r\n\r\n props.onSave()\r\n }\r\n\r\n return (\r\n \r\n t('No more lines found')}\r\n onChange={(_) => onLineChange(_ ? { value: _.value, label: _.label } : undefined)}\r\n />\r\n\r\n
\r\n \r\n \r\n
\r\n
\r\n )\r\n}\r\n\r\nexport default AddNewLineSetting\r\n","import React, { FC } from 'react'\r\nimport { Box, Stack, SxProps, Theme, Typography } from '@mui/material'\r\nimport { styled } from '@mui/material/styles'\r\nimport { LineWithName } from '../../../contexts/PlatformsToolContext'\r\n\r\nconst StyledBox = styled(Box)({\r\n background: '#eeeeee',\r\n borderRadius: '.2em',\r\n color: '#606060',\r\n marginBottom: '.2em',\r\n marginRight: '.2em',\r\n})\r\n\r\nexport interface Props {\r\n line: LineWithName\r\n sx?: SxProps\r\n}\r\n\r\nconst LineNumber: FC = (props) => {\r\n return (\r\n \r\n \r\n {props.line.id}\r\n \r\n \r\n )\r\n}\r\n\r\nexport default LineNumber\r\n","import { faTrash } from '@fortawesome/free-solid-svg-icons/faTrash'\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport { Button, Tooltip } from '@mui/material'\r\nimport cx from 'classnames'\r\nimport React, { createRef, FC, useCallback, useEffect, useState } from 'react'\r\nimport { Alert } from 'react-bootstrap'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { usePlatformsOptimizationContext } from '../../../contexts/PlatformsOptimizationContext'\r\nimport { LineSettings as ILineSettings } from '../../../contexts/PlatformsToolContext'\r\nimport { getWordyEnumerationOfArray } from '../../../utils/arrayUtils'\r\nimport LineNumber from './LineNumber'\r\nimport styles from './LineSettings.module.scss'\r\n\r\nexport type Props = ILineSettings & {}\r\n\r\nconst LineSettings: FC = (props) => {\r\n const { t } = useTranslation()\r\n\r\n const { setLineSetting, removeLineSetting } = usePlatformsOptimizationContext()\r\n\r\n const [error, setError] = useState()\r\n const maxPlatformsCountInputRef = createRef()\r\n\r\n const setMaxAllowedPlatforms = useCallback(\r\n (newMaxCountOfPlatforms: number) => {\r\n if (isNaN(newMaxCountOfPlatforms)) {\r\n if (maxPlatformsCountInputRef.current) {\r\n maxPlatformsCountInputRef.current.value = props.maxCountOfPlatforms.toString()\r\n }\r\n\r\n setError(\r\n t('Count of platforms must not be empty.') + ' ' + t('We restored previous value.')\r\n )\r\n\r\n return\r\n } else if (newMaxCountOfPlatforms < props.lineOnPlatforms.length) {\r\n if (maxPlatformsCountInputRef.current) {\r\n maxPlatformsCountInputRef.current.value = props.maxCountOfPlatforms.toString()\r\n }\r\n\r\n setError(\r\n t(\r\n 'Count of platforms must not be lesser than number of platforms which the line is assigned to.'\r\n ) +\r\n ' ' +\r\n t('We restored previous value.')\r\n )\r\n\r\n return\r\n } else {\r\n setError(undefined)\r\n }\r\n\r\n setLineSetting(props.line.id, {\r\n line: { id: props.line.id, lineNumber: props.line.lineNumber },\r\n maxCountOfPlatforms: newMaxCountOfPlatforms,\r\n lineOnPlatforms: props.lineOnPlatforms,\r\n })\r\n },\r\n [\r\n maxPlatformsCountInputRef,\r\n props.line.id,\r\n props.line.lineNumber,\r\n props.lineOnPlatforms,\r\n props.maxCountOfPlatforms,\r\n setLineSetting,\r\n t,\r\n ]\r\n )\r\n\r\n useEffect(() => {\r\n if (maxPlatformsCountInputRef.current) {\r\n maxPlatformsCountInputRef.current.value = props.maxCountOfPlatforms.toString()\r\n }\r\n }, [maxPlatformsCountInputRef, props.maxCountOfPlatforms])\r\n\r\n const deleteLineSetting = () => {\r\n removeLineSetting(props.line.id)\r\n }\r\n\r\n const isDeleteEnabled = props.lineOnPlatforms.length <= 1\r\n\r\n const deleteButton = (\r\n \r\n \r\n \r\n )\r\n\r\n return (\r\n
\r\n {error && (\r\n \r\n {error}\r\n \r\n )}\r\n\r\n
\r\n \r\n\r\n
\r\n
\r\n
\r\n {t('Maximal count of platforms, where the lines connections are allowed to stop')}:\r\n
\r\n
\r\n setMaxAllowedPlatforms(parseInt(_.target.value))}\r\n />\r\n
\r\n
\r\n\r\n
\r\n {t('Line is currently assigned to x platforms.', {\r\n count: props.lineOnPlatforms.length,\r\n })}{' '}\r\n {props.lineOnPlatforms.length > 0 &&\r\n `(${getWordyEnumerationOfArray(props.lineOnPlatforms, t)})`}\r\n
\r\n
\r\n\r\n
\r\n {isDeleteEnabled ? (\r\n deleteButton\r\n ) : (\r\n \r\n
{deleteButton}
\r\n \r\n )}\r\n
\r\n
\r\n
\r\n )\r\n}\r\n\r\nexport default LineSettings\r\n","import { Button, Collapse } from '@mui/material'\r\nimport React, { FC, useState } from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { usePlatformsOptimizationContext } from '../../../contexts/PlatformsOptimizationContext'\r\nimport AddNewLineSetting from './AddNewLineSetting'\r\nimport LineSettings from './LineSettings'\r\n\r\nconst LinesSettings: FC = () => {\r\n const {\r\n state: { linesSettings, unusedLines },\r\n } = usePlatformsOptimizationContext()\r\n\r\n const { t } = useTranslation()\r\n\r\n const [isAddNewSettingVisible, setIsAddNewSettingVisible] = useState(false)\r\n\r\n return (\r\n
\r\n
\r\n
\r\n

\r\n {t('Lines settings')}\r\n

\r\n\r\n
\r\n {unusedLines.length === 0 && (\r\n {t('You have provided settings for all lines.')}\r\n )}\r\n\r\n setIsAddNewSettingVisible(true)}\r\n size={'small'}\r\n color={'secondary'}\r\n disabled={unusedLines.length === 0 || isAddNewSettingVisible}\r\n className={'mx-0'}\r\n >\r\n {t('Add line settings')}\r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n setIsAddNewSettingVisible(false)}\r\n onCancel={() => setIsAddNewSettingVisible(false)}\r\n />\r\n
\r\n
\r\n
\r\n\r\n {linesSettings.map((_) => (\r\n
\r\n \r\n
\r\n ))}\r\n
\r\n )\r\n}\r\n\r\nexport default LinesSettings\r\n","import React, { FC, ReactElement, ReactNode } from 'react'\r\nimport cx from 'classnames'\r\nimport styles from './steps/OptimizationSettingsStep.module.scss'\r\nimport { OptimizationState } from '../../hooks/useSignalRPlatformOptimization'\r\nimport { useTranslation } from 'react-i18next'\r\n\r\nexport type Props = OptimizationState & {\r\n render: (\r\n actingDescription: ReactNode | undefined,\r\n progressBar: ReactNode | undefined\r\n ) => ReactElement\r\n}\r\n\r\nconst OptimizationProgress: FC = (props) => {\r\n const { t } = useTranslation()\r\n\r\n return props.render(\r\n
\r\n {!props.originalEstimatedTime ? (\r\n <>\r\n \r\n {t('Please wait, until server is ready to process your request.')}\r\n \r\n {t('It may take several minutes.')}\r\n \r\n ) : props.remainingTime ? (\r\n {t('We are calculating results for you ...')}\r\n ) : (\r\n <>\r\n {t('We are preparing results.')}\r\n {t('Just a second ...')}\r\n \r\n )}\r\n
,\r\n\r\n props.originalEstimatedTime && (\r\n
\r\n \r\n
\r\n )\r\n )\r\n}\r\n\r\nexport default OptimizationProgress\r\n","import { PlatformOptimizationLineSettingDto } from '../models/PlatformOptimizationModels'\r\nimport { LineSettings } from '../contexts/PlatformsToolContext'\r\n\r\nexport const getLineSettingsFromDto = (\r\n dto: PlatformOptimizationLineSettingDto,\r\n lineOnPlatforms: string[]\r\n): LineSettings => ({\r\n line: {\r\n id: dto.line.id,\r\n lineNumber: dto.line.name,\r\n },\r\n lineOnPlatforms: lineOnPlatforms,\r\n maxCountOfPlatforms: dto.lineOnPlatforms.length,\r\n})\r\n","import React, { useCallback, useContext } from 'react'\r\nimport {\r\n LineSettings,\r\n PlatformsToolContext,\r\n PlatformSettings,\r\n} from '../../contexts/PlatformsToolContext'\r\nimport { removeIndicesFromArray, semiNumericSortFn } from '../../utils/arrayUtils'\r\nimport { NotificationType, useNotificationsContext } from '../../contexts/NotificationsContext'\r\nimport { useMinimalLinesSettingsApi } from '../data/useMinimalLinesSettingsApi'\r\nimport {\r\n ConnectionDto,\r\n PlatformOptimizationLineSettingDto,\r\n} from '../../models/PlatformOptimizationModels'\r\nimport { getLineSettingsFromDto } from '../../utils/lineSettingsUtils'\r\nimport { AxiosError } from 'axios'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { getPlatformsHoldingLines } from '../../utils/platformUtils'\r\nimport { usePlatformsOptimizationContext } from '../../contexts/PlatformsOptimizationContext'\r\n\r\nconst emptyConnections: ConnectionDto[] = []\r\n\r\ninterface UseLineSettings {\r\n fixLinesSettings: (\r\n showNotification?: boolean,\r\n overridePlatformSettings?: PlatformSettings[]\r\n ) => void\r\n isRefreshingLinesSettings: boolean\r\n error: AxiosError | undefined\r\n}\r\n\r\nexport const useLineSettings = (): UseLineSettings => {\r\n const { t } = useTranslation()\r\n const { addNotification } = useNotificationsContext()\r\n\r\n const { dispatch: settingsDispatch } = useContext(PlatformsToolContext)\r\n const {\r\n state: { connections, linesSettings, platformsSettings },\r\n setAllLinesSettings,\r\n } = usePlatformsOptimizationContext()\r\n\r\n const { fetchMinimalLinesSettings, isLoading, error } = useMinimalLinesSettingsApi()\r\n\r\n const getPreviousLineSettings = useCallback(\r\n (lineId: string): { lineSettings: LineSettings | undefined; index: number | undefined } => {\r\n const index = linesSettings.findIndex((_) => _.line.id === lineId)\r\n if (index === -1) {\r\n return {\r\n lineSettings: undefined,\r\n index: undefined,\r\n }\r\n }\r\n\r\n return {\r\n lineSettings: linesSettings[index],\r\n index: index,\r\n }\r\n },\r\n [linesSettings]\r\n )\r\n\r\n const fixLinesSettings = useCallback(\r\n async (\r\n showNotification = true,\r\n overridePlatformSettings: PlatformSettings[] | undefined = undefined\r\n ): Promise => {\r\n const exitPlatforms = platformsSettings.filter((_) => _.arrivalsOnly).map((_) => _.name)\r\n\r\n let minimalLinesSettings: PlatformOptimizationLineSettingDto[] = []\r\n try {\r\n minimalLinesSettings = (\r\n await fetchMinimalLinesSettings(\r\n connections ?? emptyConnections,\r\n overridePlatformSettings ?? platformsSettings\r\n )\r\n ).data\r\n } catch (error) {}\r\n\r\n const newLineSettings: LineSettings[] = []\r\n const adjustmentsAndAdvices: string[] = []\r\n const indicesToRemove: number[] = []\r\n\r\n for (let i = 0; i < minimalLinesSettings.length; i++) {\r\n const minimalLineSettings = minimalLinesSettings[i]\r\n const { lineSettings: existingLineSettings, index } = getPreviousLineSettings(\r\n minimalLineSettings.line.id\r\n )\r\n\r\n if (!existingLineSettings || index === undefined) {\r\n newLineSettings.push(\r\n getLineSettingsFromDto(minimalLineSettings, minimalLineSettings.lineOnPlatforms)\r\n )\r\n\r\n adjustmentsAndAdvices.push(\r\n t('We have added setting that line x should be at least on y platforms', {\r\n line: minimalLineSettings.line.id,\r\n count: minimalLineSettings.lineOnPlatforms.length,\r\n })\r\n )\r\n\r\n continue\r\n }\r\n\r\n indicesToRemove.push(index)\r\n\r\n if (minimalLineSettings.lineOnPlatforms.length > existingLineSettings.maxCountOfPlatforms) {\r\n newLineSettings.push(\r\n getLineSettingsFromDto(minimalLineSettings, minimalLineSettings.lineOnPlatforms)\r\n )\r\n\r\n adjustmentsAndAdvices.push(\r\n t(\r\n 'Max number of platforms for line x was increased to y because the line is assigned to that number of platforms',\r\n {\r\n lineNumber: minimalLineSettings.line.id,\r\n platformCount: minimalLineSettings.lineOnPlatforms.length,\r\n }\r\n )\r\n )\r\n } else {\r\n newLineSettings.push({\r\n ...existingLineSettings,\r\n lineOnPlatforms: minimalLineSettings.lineOnPlatforms,\r\n })\r\n }\r\n }\r\n\r\n const remainingLinesSettings = removeIndicesFromArray([...linesSettings], indicesToRemove)\r\n const remainingLinesPlatformsCount = getPlatformsHoldingLines(\r\n remainingLinesSettings.map((_) => _.line.lineNumber),\r\n connections ?? [],\r\n exitPlatforms\r\n )\r\n\r\n for (let i = 0; i < remainingLinesSettings.length; i++) {\r\n newLineSettings.push({\r\n ...remainingLinesSettings[i],\r\n lineOnPlatforms: remainingLinesPlatformsCount[remainingLinesSettings[i].line.lineNumber],\r\n })\r\n }\r\n\r\n newLineSettings.sort((a, b) => semiNumericSortFn(a, b, (_) => _.line.id))\r\n\r\n setAllLinesSettings(newLineSettings)\r\n\r\n if (showNotification && adjustmentsAndAdvices.length > 0) {\r\n addNotification({\r\n type: NotificationType.Neutral,\r\n title: t('Lines settings adjustments'),\r\n disableAutoDismiss: true,\r\n body: (\r\n
    \r\n {adjustmentsAndAdvices.map((_) => (\r\n
  • {_}
  • \r\n ))}\r\n
\r\n ),\r\n })\r\n }\r\n },\r\n [\r\n addNotification,\r\n connections,\r\n fetchMinimalLinesSettings,\r\n getPreviousLineSettings,\r\n linesSettings,\r\n platformsSettings,\r\n settingsDispatch,\r\n t,\r\n ]\r\n )\r\n\r\n return {\r\n fixLinesSettings: fixLinesSettings,\r\n isRefreshingLinesSettings: isLoading,\r\n error: error,\r\n }\r\n}\r\n","import useAxios from 'axios-hooks'\r\nimport { apiUrls } from '../../utils/urls'\r\nimport { useCallback, useContext, useEffect } from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { NotificationsContext, NotificationType } from '../../contexts/NotificationsContext'\r\nimport { ADD_NOTIFICATION } from '../../contexts/NotificationsReducer'\r\nimport { AxiosError, AxiosPromise } from 'axios'\r\nimport {\r\n ConnectionDto,\r\n PlatformOptimizationLineSettingDto,\r\n} from '../../models/PlatformOptimizationModels'\r\nimport { CreateLinesSettingsDto } from '../../models/StatisticsDtos'\r\nimport { PlatformSettings } from '../../contexts/PlatformsToolContext'\r\n\r\ninterface UseConnectionsStatisticsApiResult {\r\n fetchMinimalLinesSettings: (\r\n connections: ConnectionDto[],\r\n platforms: PlatformSettings[]\r\n ) => AxiosPromise\r\n isLoading: boolean\r\n error: AxiosError | undefined\r\n}\r\n\r\nexport const useMinimalLinesSettingsApi = (): UseConnectionsStatisticsApiResult => {\r\n const { t } = useTranslation()\r\n const { dispatch: notificationsDispatch } = useContext(NotificationsContext)\r\n\r\n const [{ loading, error }, fetchLinesSettingsAxios] = useAxios<\r\n PlatformOptimizationLineSettingDto[]\r\n >(\r\n {\r\n url: apiUrls.linesSettings,\r\n method: 'POST',\r\n },\r\n { manual: true }\r\n )\r\n\r\n const fetchLinesSettings = useCallback(\r\n (connections: ConnectionDto[], platforms: PlatformSettings[]) => {\r\n const data: CreateLinesSettingsDto = {\r\n connections: connections,\r\n platforms: platforms,\r\n }\r\n\r\n return fetchLinesSettingsAxios({\r\n data: data,\r\n })\r\n },\r\n [fetchLinesSettingsAxios]\r\n )\r\n\r\n useEffect(() => {\r\n if (error) {\r\n notificationsDispatch({\r\n type: ADD_NOTIFICATION,\r\n value: {\r\n type: NotificationType.Error,\r\n title: t('Could not load statistics'),\r\n },\r\n })\r\n }\r\n }, [t, error, notificationsDispatch])\r\n\r\n return {\r\n fetchMinimalLinesSettings: fetchLinesSettings,\r\n isLoading: loading,\r\n error: error,\r\n }\r\n}\r\n","import { EffectCallback, useEffect } from 'react'\r\n\r\nfunction useEffectOnce(effect: EffectCallback) {\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n useEffect(effect, [])\r\n}\r\n\r\nexport default useEffectOnce","import React, { FC, useMemo } from 'react'\r\nimport { Dropdown } from 'react-bootstrap'\r\nimport cx from 'classnames'\r\nimport navigationStyles from './NavigationItemWithChildren.module.scss'\r\nimport styles from './UserSettings.module.scss'\r\nimport Checkbox from '../../general/Checkbox'\r\nimport { useCookies } from 'react-cookie'\r\nimport { useTranslation } from 'react-i18next'\r\n\r\nexport enum AppCookie {\r\n ExportProviders = 'ExportIdentifyProvByName',\r\n ExportRegionAlways = 'ExportRegionAlways',\r\n ExportDivideArrDep = 'ExportDivideArrDep',\r\n}\r\n\r\nconst UserSettings: FC = (props) => {\r\n const { t } = useTranslation()\r\n\r\n const [cookies, setCookies] = useCookies([...Object.values(AppCookie)])\r\n\r\n const exportProvidersCookie = useMemo(() => cookies[AppCookie.ExportProviders] === 'true', [\r\n cookies,\r\n ])\r\n const exportRegionAlwaysCookie = useMemo(() => cookies[AppCookie.ExportRegionAlways] === 'true', [\r\n cookies,\r\n ])\r\n\r\n const setExportProvidersCookie = (newValue: boolean) => {\r\n setCookies(AppCookie.ExportProviders, newValue.toString())\r\n }\r\n\r\n const setExportRegionAlwaysCookie = (newValue: boolean) => {\r\n setCookies(AppCookie.ExportRegionAlways, newValue.toString())\r\n }\r\n\r\n return (\r\n \r\n \r\n {t('Settings')}\r\n \r\n\r\n \r\n \r\n
\r\n
\r\n
{t('Export providers')}
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n
{t('Export region always')}
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n )\r\n}\r\n\r\nexport default UserSettings\r\n","import { ConnectionDto, LineOnPlatformDto, LineType } from '../models/PlatformOptimizationModels'\r\nimport { groupBy, groupByTwo } from './arrayUtils'\r\nimport { getConnectionsOnPlatforms } from './connectionUtils'\r\n\r\nexport const getLinesOnPlatformFromConnections = (\r\n connections: ConnectionDto[],\r\n ...platforms: (string | undefined)[]\r\n): LineOnPlatformDto[] =>\r\n groupBy(getConnectionsOnPlatforms(connections, ...platforms), (_) => _.lineNumber).map((_) => ({\r\n line: { id: _.key, name: _.key, lineType: _.items[0].lineType },\r\n connsCount: _.items.length,\r\n }))\r\n\r\nexport const getLinesAndLineTypesOnPlatformFromConnections = (\r\n connections: ConnectionDto[],\r\n ...platforms: (string | undefined)[]\r\n): { lines: LineOnPlatformDto[]; lineTypes: LineType[] } => {\r\n const groups = groupByTwo(\r\n getConnectionsOnPlatforms(connections, ...platforms),\r\n (_) => _.lineNumber,\r\n (_) => _.lineType\r\n )\r\n\r\n const lines: LineOnPlatformDto[] = groups.group1.map((_) => ({\r\n line: { id: _.key, name: _.key, lineType: _.items[0].lineType },\r\n connsCount: _.items.length,\r\n }))\r\n\r\n const lineTypes = groups.group2.map((_) => _.key)\r\n\r\n return {\r\n lines: lines,\r\n lineTypes: lineTypes,\r\n }\r\n}\r\n","import { useEffect, useRef } from 'react'\r\nimport { usePlatformsOptimizationContext } from '../../contexts/PlatformsOptimizationContext'\r\nimport { PlatformSettings as IPlatformSettings } from '../../contexts/PlatformsToolContext'\r\nimport { ConnectionDto, LineType } from '../../models/PlatformOptimizationModels'\r\nimport {\r\n addConnectionsToPlatform as addConnectionsToPlatformFn,\r\n removeConnectionsWithLineFromPlatform,\r\n removeConnectionsWithLineTypeFromPlatform,\r\n removeNonEndingConnectionsFromPlatform,\r\n renamePlatformInConnections,\r\n} from '../../utils/connectionUtils'\r\nimport { getLineTypesObjectFromDto } from '../../utils/lineTypesUtils'\r\nimport {\r\n getLinesAndLineTypesOnPlatformFromConnections,\r\n getLinesOnPlatformFromConnections,\r\n} from '../../utils/lineUtils'\r\nimport { useLineSettings } from './useLineSettings'\r\n\r\nexport const usePlatformSettings = (platform: IPlatformSettings) => {\r\n const {\r\n setConnections,\r\n setPlatformSetting,\r\n removePlatformSetting,\r\n state: { connections },\r\n } = usePlatformsOptimizationContext()\r\n\r\n const { fixLinesSettings } = useLineSettings()\r\n\r\n const wasChanged = useRef(false)\r\n\r\n useEffect(() => {\r\n if (!wasChanged.current) {\r\n return\r\n }\r\n\r\n wasChanged.current = false\r\n\r\n fixLinesSettings()\r\n }, [fixLinesSettings, platform])\r\n\r\n const onArrivalsOnlyChange = async (newValue: boolean) => {\r\n let newAssignedLines = platform.assignedLines\r\n\r\n if (newValue) {\r\n const newConnections = removeNonEndingConnectionsFromPlatform(\r\n connections ?? [],\r\n platform.name\r\n )\r\n setConnections(newConnections)\r\n\r\n newAssignedLines = getLinesOnPlatformFromConnections(newConnections, platform.name)\r\n }\r\n\r\n setPlatformSetting(platform.name, {\r\n ...platform,\r\n arrivalsOnly: newValue,\r\n assignedLines: newAssignedLines,\r\n })\r\n\r\n wasChanged.current = true\r\n }\r\n\r\n const toggleAllowedType = (lineType: LineType) => {\r\n const isCurrentlyAllowed = platform.allowedTypes[lineType]\r\n let newAssignedLines = platform.assignedLines\r\n\r\n if (isCurrentlyAllowed) {\r\n const newConnections = removeConnectionsWithLineTypeFromPlatform(\r\n connections ?? [],\r\n platform.name,\r\n lineType\r\n )\r\n\r\n setConnections(newConnections)\r\n\r\n newAssignedLines = getLinesOnPlatformFromConnections(newConnections, platform.name)\r\n }\r\n\r\n setPlatformSetting(platform.name, {\r\n ...platform,\r\n allowedTypes: { ...platform.allowedTypes, [lineType]: !platform.allowedTypes[lineType] },\r\n assignedLines: newAssignedLines,\r\n })\r\n\r\n wasChanged.current = true\r\n }\r\n\r\n const addConnectionsToPlatform = (connectionsToAdd: ConnectionDto[]) => {\r\n const newConnections = addConnectionsToPlatformFn(\r\n connections ?? [],\r\n connectionsToAdd,\r\n platform.name\r\n )\r\n setConnections(newConnections)\r\n\r\n const newAssignedLinesAndLineTypes = getLinesAndLineTypesOnPlatformFromConnections(\r\n newConnections,\r\n platform.name\r\n )\r\n\r\n setPlatformSetting(platform.name, {\r\n ...platform,\r\n assignedLines: newAssignedLinesAndLineTypes.lines,\r\n allowedTypes: getLineTypesObjectFromDto(newAssignedLinesAndLineTypes.lineTypes),\r\n })\r\n\r\n wasChanged.current = true\r\n }\r\n\r\n const removeLineFromPlatform = (lineId: string) => {\r\n const newConnections = removeConnectionsWithLineFromPlatform(\r\n connections ?? [],\r\n platform.name,\r\n lineId\r\n )\r\n setConnections(newConnections)\r\n\r\n const newAssignedLines = getLinesOnPlatformFromConnections(newConnections, platform.name)\r\n\r\n setPlatformSetting(platform.name, {\r\n ...platform,\r\n assignedLines: newAssignedLines,\r\n })\r\n\r\n wasChanged.current = true\r\n }\r\n\r\n const deletePlatform = () => {\r\n setConnections(renamePlatformInConnections(platform.name, '', connections ?? []))\r\n removePlatformSetting(platform.name)\r\n }\r\n\r\n return {\r\n onArrivalsOnlyChange,\r\n deletePlatform,\r\n toggleAllowedType,\r\n addConnectionsToPlatform,\r\n removeLineFromPlatform,\r\n }\r\n}\r\n","import { Alert, Button, Divider, Stack, Typography } from '@mui/material'\r\nimport cx from 'classnames'\r\nimport React, { FC, useMemo, useState } from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { usePlatformsOptimizationContext } from '../../../contexts/PlatformsOptimizationContext'\r\nimport { ConnectionDto } from '../../../models/PlatformOptimizationModels'\r\nimport { semiNumericSortFn } from '../../../utils/arrayUtils'\r\nimport {\r\n getConnectionsOnPlatformsGroupedByLines,\r\n isEndingConnection,\r\n} from '../../../utils/connectionUtils'\r\n\r\ninterface Props {\r\n addConnectionsToPlatform: (connections: ConnectionDto[]) => void\r\n arrivalsOnly: boolean\r\n}\r\n\r\nconst UnassignedLinesList: FC = (props) => {\r\n const { t } = useTranslation()\r\n const {\r\n state: { connections },\r\n } = usePlatformsOptimizationContext()\r\n\r\n const [connectionsFilter] = useState<((connection: ConnectionDto) => boolean) | undefined>(() =>\r\n props.arrivalsOnly ? isEndingConnection : undefined\r\n )\r\n\r\n const unusedLines = useMemo(() => {\r\n const filteredConnections = connectionsFilter\r\n ? (connections ?? []).filter(connectionsFilter)\r\n : connections ?? []\r\n\r\n return getConnectionsOnPlatformsGroupedByLines(\r\n filteredConnections ?? [],\r\n '',\r\n undefined\r\n ).sort((a, b) => semiNumericSortFn(a, b, (_) => _.key))\r\n }, [connections, connectionsFilter])\r\n\r\n return (\r\n \r\n {props.arrivalsOnly && (\r\n \r\n {t(\r\n 'Showing just ending lines/connections because outgoing and transit lines/connections are not allowed on platforms for arrivals only'\r\n )}\r\n \r\n )}\r\n\r\n
\r\n {unusedLines.map((_) => (\r\n props.addConnectionsToPlatform(_.items)}\r\n className={'px-2'}\r\n >\r\n \r\n {_.key}\r\n \r\n {_.items.length}\r\n \r\n \r\n ))}\r\n
\r\n
\r\n )\r\n}\r\n\r\nexport default UnassignedLinesList\r\n","import { Box, Button, Dialog, DialogActions, DialogContent, DialogTitle } from '@mui/material'\r\nimport { DialogProps } from '@mui/material/Dialog/Dialog'\r\nimport React, { FC } from 'react'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { ConnectionDto } from '../../../models/PlatformOptimizationModels'\r\nimport UnassignedLinesList from './UnassignedLinesList'\r\n\r\nexport interface Props {\r\n dialogProps: DialogProps\r\n platformName: string\r\n arrivalsOnly: boolean\r\n addConnectionsToPlatform: (connections: ConnectionDto[]) => void\r\n onClose: () => void\r\n}\r\n\r\nconst UnassignedLinesListDialog: FC = (props) => {\r\n const { t } = useTranslation()\r\n\r\n const addConnectionsToPlatform = (connections: ConnectionDto[]) => {\r\n props.addConnectionsToPlatform(connections)\r\n props.onClose()\r\n }\r\n\r\n return (\r\n \r\n \r\n {t('Add line to platform')} {props.platformName}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default UnassignedLinesListDialog\r\n","import { faCheck } from '@fortawesome/free-solid-svg-icons/faCheck'\r\nimport { faTimes } from '@fortawesome/free-solid-svg-icons/faTimes'\r\nimport { faTrash } from '@fortawesome/free-solid-svg-icons/faTrash'\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport {\r\n Box,\r\n Button,\r\n Checkbox,\r\n Collapse,\r\n FormControlLabel,\r\n FormGroup,\r\n Typography,\r\n} from '@mui/material'\r\nimport { DialogProps } from '@mui/material/Dialog/Dialog'\r\nimport cx from 'classnames'\r\nimport React, { createRef, FC, useEffect, useMemo, useState } from 'react'\r\nimport { Alert } from 'react-bootstrap'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { usePlatformsOptimizationContext } from '../../contexts/PlatformsOptimizationContext'\r\nimport {\r\n PlatformSettings as IPlatformSettings,\r\n usePlatformsToolContext,\r\n} from '../../contexts/PlatformsToolContext'\r\nimport { usePlatformSettings } from '../../hooks/platform-optimization/usePlatformSettings'\r\nimport { renamePlatformInConnections } from '../../utils/connectionUtils'\r\nimport { getLineTypeDescription } from '../../utils/lineTypesUtils'\r\nimport { platformSettingsValidators } from '../../utils/platformSettingsUtils'\r\nimport LinesList from './lines/LinesList'\r\nimport UnassignedLinesListDialog from './lines/UnassignedLinesListDialog'\r\nimport styles from './PlatformSettings.module.scss'\r\n\r\nexport type Props = IPlatformSettings & {}\r\n\r\nconst PlatformSettings: FC = (props) => {\r\n const { t } = useTranslation()\r\n\r\n const {\r\n onArrivalsOnlyChange,\r\n deletePlatform,\r\n toggleAllowedType,\r\n addConnectionsToPlatform,\r\n removeLineFromPlatform,\r\n } = usePlatformSettings(props)\r\n\r\n const {\r\n state: { selectedStation },\r\n } = usePlatformsToolContext()\r\n const {\r\n setConnections,\r\n setPlatformSetting,\r\n state: { platformsSettings, allLineTypes, connections },\r\n } = usePlatformsOptimizationContext()\r\n\r\n if (!selectedStation) {\r\n throw new Error(\r\n `Cannot render ${PlatformSettings.name} because no station is selected in context.`\r\n )\r\n }\r\n\r\n const [isAddLineVisible, setIsAddLineVisible] = useState(false)\r\n const [error, setError] = useState()\r\n const nameRef = createRef()\r\n const minMinutesBetweenConnectionsRef = createRef()\r\n\r\n const resetPreviousPlatformName = () => {\r\n if (nameRef.current) {\r\n nameRef.current.value = props.name\r\n }\r\n }\r\n\r\n const setName = (newName: string) => {\r\n if (newName === props.name) {\r\n return\r\n }\r\n\r\n if (!newName) {\r\n setError(t('Please, enter platform name'))\r\n resetPreviousPlatformName()\r\n\r\n return\r\n }\r\n\r\n if (platformsSettings.filter((_) => _.name === newName).length > 0) {\r\n setError(t('Multiple platforms cannot have the same name.'))\r\n resetPreviousPlatformName()\r\n\r\n return\r\n }\r\n\r\n setError(undefined)\r\n\r\n if (connections) {\r\n setConnections(renamePlatformInConnections(props.name, newName, connections))\r\n }\r\n\r\n setPlatformSetting(props.name, { ...props, name: newName })\r\n }\r\n\r\n const setMinMinutesBetweenConnections = (newMinutes?: number) => {\r\n setPlatformSetting(props.name, {\r\n ...props,\r\n minMinutesBetweenConnections: newMinutes,\r\n })\r\n }\r\n\r\n useEffect(() => {\r\n if (!nameRef.current) {\r\n return\r\n }\r\n\r\n nameRef.current.value = props.name\r\n }, [nameRef, props.name])\r\n\r\n useEffect(() => {\r\n setMinMinutesBetweenConnections(props.minMinutesBetweenConnections)\r\n\r\n if (minMinutesBetweenConnectionsRef.current) {\r\n minMinutesBetweenConnectionsRef.current.value = props.minMinutesBetweenConnections\r\n ? props.minMinutesBetweenConnections.toString()\r\n : ''\r\n }\r\n }, [props.minMinutesBetweenConnections])\r\n\r\n const dialogPropsMemo = useMemo(\r\n () => ({\r\n open: isAddLineVisible,\r\n keepMounted: false,\r\n onClose: () => setIsAddLineVisible(false),\r\n }),\r\n [isAddLineVisible]\r\n )\r\n\r\n return (\r\n <>\r\n \r\n
\r\n setName(_.target.value)}\r\n ref={nameRef}\r\n />\r\n
\r\n\r\n
\r\n {!platformSettingsValidators.isValid.platformName(props.name) && (\r\n \r\n {t('Please, enter platform name')}\r\n \r\n )}\r\n\r\n {!platformSettingsValidators.isValid.minMinutesBetweenConnections(\r\n props.minMinutesBetweenConnections,\r\n props.arrivalsOnly\r\n ) && (\r\n \r\n {t('Please, enter min time between connections (0 - 60 min.)')}\r\n \r\n )}\r\n\r\n {!platformSettingsValidators.isValid.allowedLineTypes(props.allowedTypes) && (\r\n \r\n {t('Please, allow at least one line type')}\r\n \r\n )}\r\n\r\n {error && (\r\n \r\n {error}\r\n \r\n )}\r\n\r\n
\r\n\r\n \r\n
\r\n
{t('Minimal time between connections on platform')}:
\r\n
\r\n {\r\n const setInput = (value: string) => {\r\n if (minMinutesBetweenConnectionsRef.current) {\r\n minMinutesBetweenConnectionsRef.current.value = value\r\n }\r\n }\r\n\r\n let newValue: number | undefined = parseInt(_.target.value)\r\n if (isNaN(newValue)) {\r\n newValue = undefined\r\n setInput('')\r\n } else {\r\n if (newValue < 0) {\r\n setInput('0')\r\n } else if (newValue > 60) {\r\n setInput('60')\r\n }\r\n }\r\n\r\n setMinMinutesBetweenConnections(newValue)\r\n }}\r\n />\r\n
\r\n {/* TODO , props.minMinutesBetweenConnections ?? 0 */}\r\n {t('minutes')}\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
{t('Allowed line types')}:
\r\n
\r\n {allLineTypes.map((_) => (\r\n toggleAllowedType(_)}\r\n >\r\n \r\n {getLineTypeDescription(t, _)}\r\n \r\n ))}\r\n
\r\n
\r\n\r\n \r\n \r\n onArrivalsOnlyChange(_.target.checked)}\r\n sx={{ py: 0 }}\r\n />\r\n }\r\n label={{t('Arrivals only')}}\r\n sx={{ mb: 0 }}\r\n />\r\n \r\n \r\n\r\n setIsAddLineVisible(true)}\r\n />\r\n
\r\n\r\n
\r\n \r\n
\r\n
\r\n\r\n setIsAddLineVisible(false)}\r\n />\r\n \r\n )\r\n}\r\n\r\nexport default PlatformSettings\r\n","import { faPlus } from '@fortawesome/free-solid-svg-icons/faPlus'\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport { Button } from '@mui/material'\r\nimport React, { FC, ReactElement, useCallback, useEffect } from 'react'\r\nimport { Alert } from 'react-bootstrap'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { usePlatformsOptimizationContext } from '../../contexts/PlatformsOptimizationContext'\r\nimport { defaultPlatformName } from '../../contexts/PlatformsOptimizationReducer'\r\nimport { usePlatformsToolContext } from '../../contexts/PlatformsToolContext'\r\nimport { useLinesApi } from '../../hooks/data/useLinesApi'\r\nimport { usePlatformsSettingsApi } from '../../hooks/data/usePlatformsSettingsApi'\r\nimport { useLineSettings } from '../../hooks/platform-optimization/useLineSettings'\r\nimport useEffectOnce from '../../hooks/useEffectOnce'\r\nimport { ConnectionDto } from '../../models/PlatformOptimizationModels'\r\nimport { getDistinctFromArray } from '../../utils/arrayUtils'\r\nimport { clearPlatformsInAllConnections } from '../../utils/connectionUtils'\r\nimport { validateLineTypesOnPlatforms } from '../../utils/lineTypesUtils'\r\nimport { platformDtoToPlatformSettings } from '../../utils/platformUtils'\r\nimport { assetsUrls } from '../../utils/urls'\r\nimport PlatformSettings from './PlatformSettings'\r\n\r\nconst emptyConnectionsArray: ConnectionDto[] = []\r\n\r\nconst PlatformsSettings: FC = () => {\r\n const { t } = useTranslation()\r\n\r\n const {\r\n state: { selectedStation },\r\n } = usePlatformsToolContext()\r\n\r\n const {\r\n state: { platformsSettings, linesSettings, allLineTypes, connections },\r\n setAllPlatformsSettings,\r\n setAllLines,\r\n setAllLineTypes,\r\n setConnections,\r\n setAllLinesSettings,\r\n addNewPlatformSetting,\r\n } = usePlatformsOptimizationContext()\r\n\r\n const {\r\n platformsSettings: defaultPlatformsSettings,\r\n isLoading,\r\n fetchPlatformsSettings,\r\n } = usePlatformsSettingsApi(connections ?? emptyConnectionsArray, true)\r\n\r\n const { fetchLines } = useLinesApi(connections ?? emptyConnectionsArray, true)\r\n\r\n const { fixLinesSettings } = useLineSettings()\r\n\r\n const init = async () => {\r\n const newPlatformSettings = (await fetchPlatformsSettings()).data.map((_) =>\r\n platformDtoToPlatformSettings(_)\r\n )\r\n const newLines = (await fetchLines()).data\r\n\r\n setAllPlatformsSettings(newPlatformSettings)\r\n setAllLines(newLines)\r\n setAllLineTypes(getDistinctFromArray(newLines, (_) => _.lineType))\r\n\r\n await fixLinesSettings(false, newPlatformSettings)\r\n }\r\n\r\n useEffectOnce(() => {\r\n init()\r\n })\r\n\r\n useEffect(() => {\r\n setAllPlatformsSettings(\r\n (defaultPlatformsSettings ?? []).map((_) => platformDtoToPlatformSettings(_))\r\n )\r\n }, [defaultPlatformsSettings, setAllPlatformsSettings])\r\n\r\n const addNewPlatform = () => {\r\n addNewPlatformSetting()\r\n }\r\n\r\n const removeLinesFromAllPlatforms = () => {\r\n setConnections(clearPlatformsInAllConnections(connections ?? []))\r\n\r\n setAllPlatformsSettings(\r\n platformsSettings.map((_) => ({\r\n ..._,\r\n assignedLines: [],\r\n }))\r\n )\r\n\r\n setAllLinesSettings(\r\n linesSettings.map((_) => ({\r\n ..._,\r\n lineOnPlatformsCount: 0,\r\n }))\r\n )\r\n }\r\n\r\n const isAddPlatformDisabled =\r\n platformsSettings.filter((_) => _.name === defaultPlatformName).length > 0\r\n\r\n const getUnassignedLineTypesErrors = useCallback((): ReactElement[] => {\r\n if (!selectedStation) {\r\n throw new Error(\r\n 'Cannot check if every line type is allowed on at least one platform because no station is selected.'\r\n )\r\n }\r\n\r\n return validateLineTypesOnPlatforms(t, platformsSettings, allLineTypes)\r\n }, [selectedStation, t, platformsSettings, allLineTypes])\r\n\r\n return (\r\n <>\r\n
\r\n
\r\n

\r\n {t('Platforms settings')}\r\n

\r\n\r\n \r\n {t('Remove lines from all platforms')}\r\n \r\n\r\n \r\n \r\n {t('Add new platform')}\r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n {platformsSettings.length > 0 && getUnassignedLineTypesErrors().length > 0 && (\r\n \r\n
    \r\n {getUnassignedLineTypesErrors().map((_, index) => (\r\n
  • {_}
  • \r\n ))}\r\n
\r\n
\r\n )}\r\n\r\n {isAddPlatformDisabled && (\r\n \r\n {t(\r\n \"If you want to add new platform, please, enter name instead of '?' first on last added platform.\"\r\n )}\r\n \r\n )}\r\n
\r\n\r\n {platformsSettings.length === 0 && (\r\n
\r\n {''}\r\n
{t('Start with adding platform')}
\r\n
\r\n )}\r\n\r\n {platformsSettings.map((_) => (\r\n
\r\n \r\n
\r\n ))}\r\n
\r\n \r\n )\r\n}\r\n\r\nexport default PlatformsSettings\r\n","import { ConnectionDto, PlatformDto } from '../../models/PlatformOptimizationModels'\r\nimport { AxiosError, AxiosPromise } from 'axios'\r\nimport useAxios from 'axios-hooks'\r\nimport { apiUrls } from '../../utils/urls'\r\nimport { useCallback, useContext, useEffect } from 'react'\r\nimport { ADD_NOTIFICATION } from '../../contexts/NotificationsReducer'\r\nimport { NotificationsContext, NotificationType } from '../../contexts/NotificationsContext'\r\nimport { useTranslation } from 'react-i18next'\r\n\r\ninterface UsePlatformsSettingsApiResult {\r\n platformsSettings: PlatformDto[] | undefined\r\n isLoading: boolean\r\n error: AxiosError | undefined\r\n fetchPlatformsSettings: () => AxiosPromise\r\n}\r\n\r\nexport const usePlatformsSettingsApi = (\r\n connections: ConnectionDto[],\r\n manual = false\r\n): UsePlatformsSettingsApiResult => {\r\n const { t } = useTranslation()\r\n const { dispatch: notificationsDispatch } = useContext(NotificationsContext)\r\n\r\n const [{ data, loading, error }, fetchPlatformsSettingsAxios] = useAxios(\r\n { url: apiUrls.platformsSettings, method: 'POST' },\r\n { manual: true }\r\n )\r\n\r\n const fetchPlatformsSettings = useCallback(\r\n () =>\r\n fetchPlatformsSettingsAxios({\r\n data: connections,\r\n }),\r\n [connections, fetchPlatformsSettingsAxios]\r\n )\r\n \r\n useEffect(() => {\r\n if (manual) {\r\n return\r\n }\r\n \r\n fetchPlatformsSettings()\r\n }, [manual, fetchPlatformsSettings])\r\n\r\n useEffect(() => {\r\n if (error) {\r\n notificationsDispatch({\r\n type: ADD_NOTIFICATION,\r\n value: {\r\n type: NotificationType.Error,\r\n title: 'Could not load platforms settings',\r\n },\r\n })\r\n }\r\n }, [t, error, notificationsDispatch])\r\n\r\n return {\r\n platformsSettings: data,\r\n isLoading: loading,\r\n error: error,\r\n fetchPlatformsSettings: fetchPlatformsSettings,\r\n }\r\n}\r\n","import {\r\n ConnectionDto,\r\n LineDto,\r\n} from '../../models/PlatformOptimizationModels'\r\nimport { AxiosError, AxiosPromise } from 'axios'\r\nimport useAxios from 'axios-hooks'\r\nimport { apiUrls } from '../../utils/urls'\r\nimport { useCallback, useContext, useEffect } from 'react'\r\nimport { ADD_NOTIFICATION } from '../../contexts/NotificationsReducer'\r\nimport { NotificationsContext, NotificationType } from '../../contexts/NotificationsContext'\r\nimport { useTranslation } from 'react-i18next'\r\n\r\ninterface UseLinesApiResult {\r\n lines: LineDto[]\r\n isLoading: boolean\r\n error: AxiosError | undefined\r\n fetchLines: () => AxiosPromise\r\n}\r\n\r\nexport const useLinesApi = (connections: ConnectionDto[], manual = false): UseLinesApiResult => {\r\n const { t } = useTranslation()\r\n const { dispatch: notificationsDispatch } = useContext(NotificationsContext)\r\n\r\n const [{ data, loading, error }, fetchLinesAxios] = useAxios(\r\n { url: apiUrls.lines, method: 'POST' },\r\n { manual: true }\r\n )\r\n\r\n const fetchLines = useCallback(\r\n () =>\r\n fetchLinesAxios({\r\n data: connections,\r\n }),\r\n [connections, fetchLinesAxios]\r\n )\r\n\r\n useEffect(() => {\r\n if (manual) {\r\n return\r\n }\r\n\r\n fetchLines()\r\n }, [manual, fetchLines])\r\n\r\n useEffect(() => {\r\n if (error) {\r\n notificationsDispatch({\r\n type: ADD_NOTIFICATION,\r\n value: {\r\n type: NotificationType.Error,\r\n title: 'Could not load lines',\r\n },\r\n })\r\n }\r\n }, [t, error, notificationsDispatch])\r\n\r\n return {\r\n lines: data ?? [],\r\n isLoading: loading,\r\n error: error,\r\n fetchLines: fetchLines,\r\n }\r\n}\r\n","import { faSave } from '@fortawesome/free-regular-svg-icons'\r\nimport { faPlay } from '@fortawesome/free-solid-svg-icons'\r\nimport { faChevronLeft } from '@fortawesome/free-solid-svg-icons/faChevronLeft'\r\nimport { faChevronRight } from '@fortawesome/free-solid-svg-icons/faChevronRight'\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport { LoadingButton } from '@mui/lab'\r\nimport { Button, Typography } from '@mui/material'\r\nimport CircularProgress from '@mui/material/CircularProgress'\r\nimport cx from 'classnames'\r\nimport { format } from 'date-fns'\r\nimport React, { FC, useContext, useEffect, useState } from 'react'\r\nimport { Alert } from 'react-bootstrap'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { useHistory } from 'react-router-dom'\r\nimport { useAuthContext } from '../../../contexts/AuthContext'\r\nimport { LayoutWidth, useLayoutContext } from '../../../contexts/LayoutContext'\r\nimport { SET_STATE } from '../../../contexts/LayoutReducer'\r\nimport {\r\n OptimizationStep,\r\n useOptimizePlatformsPageContext,\r\n} from '../../../contexts/OptimizePlatformsPageContext'\r\nimport { usePlatformsOptimizationContext } from '../../../contexts/PlatformsOptimizationContext'\r\nimport { PlatformsToolContext } from '../../../contexts/PlatformsToolContext'\r\nimport {\r\n ConnectionState,\r\n useSignalRPlatformOptimization,\r\n} from '../../../hooks/useSignalRPlatformOptimization'\r\nimport { useStoredOptimizationSettings } from '../../../hooks/useStoredContext'\r\nimport { StationPlatformsOptimizationResultDto } from '../../../models/PlatformOptimizationModels'\r\nimport { validateLineTypesOnPlatforms } from '../../../utils/lineTypesUtils'\r\nimport { unwrap } from '../../../utils/otherUtils'\r\nimport { appUrls, assetsUrls } from '../../../utils/urls'\r\nimport Help from '../../general/Help'\r\nimport PlatformsOptimizationSettingsHelp from '../../help/PlatformsOptimizationSettingsHelp'\r\nimport AlgorithmModeSelector from '../AlgorithmModeSelector'\r\nimport LinesSettings from '../lines/LinesSettings'\r\nimport OptimizationProgress from '../OptimizationProgress'\r\nimport PlatformsSettings from '../PlatformsSettings'\r\nimport styles from './OptimizationSettingsStep.module.scss'\r\n\r\nconst OptimizationSettingsStep: FC = () => {\r\n const { t } = useTranslation()\r\n const history = useHistory()\r\n\r\n const { state: optimizationSettings } = useContext(PlatformsToolContext)\r\n\r\n const { changeStep, previousStep } = useOptimizePlatformsPageContext()\r\n const {\r\n setResults,\r\n setConnections,\r\n state: { allLineTypes, platformsSettings, connections },\r\n } = usePlatformsOptimizationContext()\r\n\r\n const { dispatch: layoutDispatch } = useLayoutContext()\r\n const { isUserLoggedIn } = useAuthContext()\r\n\r\n const {\r\n optimizationId,\r\n hasStartedOptimization,\r\n startOptimizing,\r\n cancelOptimization,\r\n remainingTime,\r\n isRequestQueued,\r\n signalRConnectionState,\r\n originalEstimatedTime,\r\n optimizationCancelRequested,\r\n } = useSignalRPlatformOptimization(\r\n (_) => {\r\n setResults(_)\r\n setConnections(_.connections)\r\n changeStep(OptimizationStep.ShowResults)\r\n },\r\n () => changeStep(OptimizationStep.DefineSettings),\r\n () => changeStep(OptimizationStep.ShowResults),\r\n connections ?? []\r\n )\r\n\r\n const {\r\n hasStoredSettings,\r\n saveSettings,\r\n showDialogUseStoredSettings,\r\n } = useStoredOptimizationSettings()\r\n\r\n const [wasUseStoredSettingsDialogShown, setWasUseStoredSettingsDialogShown] = useState(false)\r\n\r\n useEffect(() => {\r\n if (\r\n previousStep === OptimizationStep.DefineSettings &&\r\n hasStoredSettings &&\r\n !wasUseStoredSettingsDialogShown\r\n ) {\r\n showDialogUseStoredSettings()\r\n setWasUseStoredSettingsDialogShown(true)\r\n }\r\n }, [\r\n hasStoredSettings,\r\n previousStep,\r\n showDialogUseStoredSettings,\r\n wasUseStoredSettingsDialogShown,\r\n ])\r\n\r\n useEffect(() => {\r\n if (isRequestQueued) {\r\n layoutDispatch({\r\n type: SET_STATE,\r\n value: {\r\n width: LayoutWidth.Fixed,\r\n alignContentItemsCenter: true,\r\n svgBg: assetsUrls.svg('abstract-bg-1'),\r\n },\r\n })\r\n } else {\r\n layoutDispatch({\r\n type: SET_STATE,\r\n value: {\r\n width: LayoutWidth.Full,\r\n alignContentItemsCenter: false,\r\n svgBg: undefined,\r\n },\r\n })\r\n }\r\n }, [isRequestQueued, layoutDispatch])\r\n\r\n const isEveryLineTypeAssigned = (): boolean => {\r\n if (!optimizationSettings.selectedStation) {\r\n throw new Error(\r\n 'Cannot check if every line type is allowed on at least one platform because no station is selected.'\r\n )\r\n }\r\n\r\n return validateLineTypesOnPlatforms(t, platformsSettings, allLineTypes).length === 0\r\n }\r\n\r\n const goToStatistics = () => {\r\n if (!optimizationSettings.selectedStationId) {\r\n throw new Error('When redirecting to connections page, station ID must be set.')\r\n }\r\n\r\n history.push(appUrls.connections.withParams(optimizationSettings.selectedStationId))\r\n }\r\n\r\n const isAlgorithmStartAllowed =\r\n signalRConnectionState === ConnectionState.Connected &&\r\n platformsSettings.length > 0 &&\r\n platformsSettings.every((_) => _.isValid) &&\r\n isEveryLineTypeAssigned()\r\n\r\n if (isRequestQueued) {\r\n return (\r\n
\r\n
\r\n \r\n
\r\n \r\n (\r\n <>\r\n {actingDescription}\r\n {progressBar}\r\n \r\n )}\r\n optimizationId={optimizationId}\r\n hasStartedOptimization={hasStartedOptimization}\r\n startOptimizing={startOptimizing}\r\n cancelOptimization={cancelOptimization}\r\n remainingTime={remainingTime}\r\n isRequestQueued={isRequestQueued}\r\n signalRConnectionState={signalRConnectionState}\r\n originalEstimatedTime={originalEstimatedTime}\r\n optimizationCancelRequested={optimizationCancelRequested}\r\n />\r\n\r\n {optimizationId && (\r\n
\r\n \r\n {t('Cancel')}\r\n \r\n
\r\n )}\r\n
\r\n \r\n )\r\n }\r\n\r\n return (\r\n <>\r\n
\r\n
\r\n \r\n
\r\n\r\n \r\n \r\n {t('Platform settings')}\r\n \r\n {optimizationSettings.selectedStation?.name} |{' '}\r\n {format(unwrap(optimizationSettings.connectionsDateFilter), 'dd.MM.yyyy')}\r\n \r\n
\r\n\r\n
\r\n
\r\n\r\n \r\n \r\n \r\n\r\n {signalRConnectionState !== ConnectionState.Connected && (\r\n
\r\n
\r\n \r\n {t(\r\n 'We are trying to reconnect with server. Hopefully, in a short while, we will be back ...'\r\n )}\r\n \r\n
\r\n
\r\n )}\r\n\r\n
\r\n {isUserLoggedIn && (\r\n \r\n \r\n \r\n {t('Save settings')}\r\n \r\n \r\n )}\r\n\r\n \r\n \r\n {hasStartedOptimization ? (\r\n
\r\n \r\n
\r\n ) : (\r\n \r\n )}\r\n {t(hasStartedOptimization ? 'Calculating' : 'Find solution')}\r\n
\r\n \r\n
\r\n\r\n \r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default OptimizationSettingsStep\r\n","import { parseISO } from 'date-fns'\r\nimport React, { FC, useEffect, useMemo } from 'react'\r\nimport { useParams } from 'react-router-dom'\r\nimport OptimizationResultsStep from '../components/platform-optimization/steps/OptimizationResultsStep'\r\nimport OptimizationSettingsStep from '../components/platform-optimization/steps/OptimizationSettingsStep'\r\nimport {\r\n OptimizationStep,\r\n useOptimizePlatformsPageContext,\r\n} from '../contexts/OptimizePlatformsPageContext'\r\nimport { usePlatformsToolContext } from '../contexts/PlatformsToolContext'\r\nimport { SET_SELECTED_STATION_ID } from '../contexts/PlatformsToolReducer'\r\n\r\ninterface RouteParams {\r\n stationId: string\r\n date: string\r\n}\r\n\r\nconst OptimizePlatformsPage: FC = () => {\r\n const params = useParams()\r\n const urlStationId = useMemo(() => parseInt(params.stationId), [params.stationId])\r\n const urlDate = useMemo(() => parseISO(params.date), [params.date])\r\n\r\n const { currentStep } = useOptimizePlatformsPageContext()\r\n const {\r\n state: { connectionsDateFilter },\r\n dispatch: optimizationDispatch,\r\n setConnectionsDateFilter,\r\n } = usePlatformsToolContext()\r\n\r\n useEffect(() => {\r\n optimizationDispatch({ type: SET_SELECTED_STATION_ID, value: urlStationId })\r\n }, [optimizationDispatch, urlStationId])\r\n\r\n useEffect(() => {\r\n if (urlDate.toDateString() !== connectionsDateFilter?.toDateString()) {\r\n setConnectionsDateFilter(urlDate)\r\n }\r\n }, [urlDate, setConnectionsDateFilter, connectionsDateFilter])\r\n\r\n return (\r\n <>\r\n {currentStep === OptimizationStep.DefineSettings && }\r\n {currentStep === OptimizationStep.ShowResults && }\r\n \r\n )\r\n}\r\n\r\nexport default OptimizePlatformsPage\r\n","import { faUser } from '@fortawesome/free-solid-svg-icons/faUser'\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport cx from 'classnames'\r\nimport React,{ FC,useContext } from 'react'\r\nimport { Dropdown } from 'react-bootstrap'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { useAuthContext } from '../../../contexts/AuthContext'\r\nimport { NotificationsContext } from '../../../contexts/NotificationsContext'\r\nimport { NavigationItemWithoutChildrenDto } from '../../../models/NavigationDto'\r\nimport { UserDto } from '../../../models/UserDto'\r\nimport styles from './NavigationItemWithChildren.module.scss'\r\n\r\ninterface Props {\r\n items: NavigationItemWithoutChildrenDto[]\r\n user: UserDto | undefined\r\n\r\n registerUrl: string\r\n loginUrl: string\r\n faqRegisterUrl: string\r\n}\r\n\r\nconst LoginNavigation: FC = (props) => {\r\n const {t} = useTranslation()\r\n\r\n const redirectToUrl = (url: string) => (window.location.href = url)\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n\r\n {t('User')}\r\n \r\n\r\n \r\n {props.items.map((_) => (\r\n redirectToUrl(_.url)}\r\n style={{borderBottom: _.dividerAfterItem ? '1px solid #dedede' : 'none'}}\r\n >\r\n {_.title}\r\n \r\n ))}\r\n \r\n \r\n \r\n )\r\n}\r\n\r\nexport default LoginNavigation\r\n","import React, { FC } from 'react'\r\nimport { Dropdown } from 'react-bootstrap'\r\nimport { NavigationItemDto } from '../../../models/NavigationDto'\r\nimport styles from './NavigationItemWithChildren.module.scss'\r\nimport cx from 'classnames'\r\n\r\nexport interface Props {\r\n item: NavigationItemDto\r\n}\r\n\r\nconst NavigationItemWithChildren: FC = (props) => {\r\n const redirectToUrl = (url: string) => (window.location.href = url)\r\n\r\n return (\r\n \r\n \r\n {props.item.title}\r\n \r\n\r\n \r\n {props.item.children?.map((_) => (\r\n redirectToUrl(_.url)}\r\n style={{ borderBottom: _.dividerAfterItem ? '1px solid #dedede' : 'none' }}\r\n >\r\n {_.title}\r\n \r\n ))}\r\n \r\n \r\n )\r\n}\r\n\r\nexport default NavigationItemWithChildren\r\n","import React, { FC } from 'react'\r\nimport { NavigationItemDto } from '../../../models/NavigationDto'\r\n\r\nexport interface Props {\r\n item: NavigationItemDto\r\n}\r\n\r\nconst NavigationItem: FC = (props) => {\r\n return (\r\n \r\n {props.item.title}\r\n \r\n )\r\n}\r\n\r\nexport default NavigationItem\r\n","import i18n from 'i18next'\r\nimport { initReactI18next } from 'react-i18next'\r\nimport sk from '../translations/sk.json'\r\nimport cs from '../translations/cs.json'\r\n\r\nexport enum AppLanguage {\r\n Slovak = 'sk',\r\n Czech = 'cs',\r\n}\r\n\r\nexport const defaultAppLanguage = AppLanguage.Slovak\r\n\r\nexport const resources = {\r\n sk: { translation: sk },\r\n cs: { translation: cs },\r\n} as const\r\n\r\nexport const i18nInit = () =>\r\n i18n\r\n .use(initReactI18next) // passes i18n down to react-i18next\r\n .init({\r\n lng: defaultAppLanguage,\r\n interpolation: {\r\n escapeValue: false, // react already safes from xss => https://www.i18next.com/translation-function/interpolation#unescape\r\n },\r\n resources,\r\n })\r\n","import { faInfo } from '@fortawesome/free-solid-svg-icons/faInfo'\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport { Tooltip } from '@mui/material'\r\nimport cx from 'classnames'\r\nimport React, { FC, ReactElement } from 'react'\r\nimport { Dropdown } from 'react-bootstrap'\r\nimport { useTranslation } from 'react-i18next'\r\nimport { NavigationTTDataDto } from '../../../models/NavigationDto'\r\nimport styles from './LoadedTTData.module.scss'\r\nimport navigationStyles from './NavigationItemWithChildren.module.scss'\r\n\r\nexport interface Props {\r\n loadedTTData: NavigationTTDataDto\r\n}\r\n\r\nconst LoadedTTData: FC = (props) => {\r\n const { t } = useTranslation()\r\n\r\n const loadedBusTTData = props.loadedTTData.loadedBusTTData\r\n const loadedTrainTTData = props.loadedTTData.loadedTrainTTData\r\n const limit = Math.max(loadedBusTTData.length, loadedTrainTTData.length)\r\n\r\n const dropdownItems: ReactElement[] = []\r\n for (let i = 0; i < limit; i++) {\r\n dropdownItems.push(\r\n \r\n
\r\n
\r\n {i < loadedBusTTData.length &&\r\n <>\r\n {loadedBusTTData[i].name}\r\n \r\n {loadedBusTTData[i].validDates}\r\n \r\n \r\n {t('Created')} {loadedBusTTData[i].createdAt}\r\n \r\n \r\n }\r\n
\r\n\r\n
\r\n {i < loadedTrainTTData.length &&\r\n <>\r\n {loadedTrainTTData[i].name}\r\n \r\n {loadedTrainTTData[i].validDates}\r\n \r\n \r\n {t('Created')} {loadedTrainTTData[i].createdAt}\r\n \r\n \r\n }\r\n
\r\n
\r\n \r\n )\r\n }\r\n\r\n return (\r\n \r\n \r\n
\r\n \r\n
\r\n\r\n {t('Timetables')}\r\n \r\n\r\n \r\n \r\n {t('Timetables')}\r\n \r\n\r\n {dropdownItems.length > 0 && dropdownItems}\r\n\r\n {props.loadedTTData.hasMoreData &&\r\n \r\n \r\n ...\r\n \r\n \r\n }\r\n\r\n {dropdownItems.length === 0 &&\r\n \r\n No data files are available\r\n \r\n }\r\n \r\n
\r\n )\r\n}\r\n\r\nexport default LoadedTTData\r\n","import { AppLanguage } from './i18n'\r\nimport { L10n, loadCldr, setCulture } from '@syncfusion/ej2-base'\r\n\r\nimport skCaGregorian from 'cldr-data/main/sk/ca-gregorian.json'\r\nimport skNumbers from 'cldr-data/main/sk/numbers.json'\r\nimport skTimeZoneNames from 'cldr-data/main/sk/timeZoneNames.json'\r\nimport skCulture from '@syncfusion/ej2-locale/src/sk.json'\r\n\r\nimport csCaGregorian from 'cldr-data/main/cs/ca-gregorian.json'\r\nimport csNumbers from 'cldr-data/main/cs/numbers.json'\r\nimport csTimeZoneNames from 'cldr-data/main/cs/timeZoneNames.json'\r\nimport csCulture from '@syncfusion/ej2-locale/src/cs.json'\r\n\r\nimport numberingSystems from 'cldr-data/supplemental/numberingSystems.json'\r\nimport weekData from 'cldr-data/supplemental/weekData.json'\r\nimport {\r\n overrideSyncfusionTranslationsCs,\r\n overrideSyncfusionTranslationsSk,\r\n} from '../translations/syncfusionOverrides'\r\n\r\nexport type SyncfusionTranslationsSk = typeof skCulture\r\nexport type SyncfusionTranslationsCs = typeof csCulture\r\n\r\nexport const changeCldrLanguage = (language: AppLanguage): void => {\r\n if (language === AppLanguage.Slovak) {\r\n loadCldr(numberingSystems, skCaGregorian, skNumbers, skTimeZoneNames, weekData)\r\n L10n.load(overrideSyncfusionTranslationsSk(skCulture))\r\n } else {\r\n loadCldr(numberingSystems, csCaGregorian, csNumbers, csTimeZoneNames, weekData)\r\n L10n.load(overrideSyncfusionTranslationsCs(csCulture))\r\n }\r\n\r\n setCulture(language)\r\n}\r\n","import { SyncfusionTranslationsCs, SyncfusionTranslationsSk } from '../config/cldr'\r\n\r\nexport const overrideSyncfusionTranslationsCs = (\r\n t: SyncfusionTranslationsCs\r\n): SyncfusionTranslationsCs => {\r\n t['cs']['grid']['GroupDropArea'] =\r\n 'Pro přeskupení tabulky přetáhněte hlavičku příslušného sloupce do tohoto pole'\r\n t['cs']['grid']['ClearButton'] = 'Vymazat'\r\n t['cs']['grid']['FilterButton'] = 'Filtrovat'\r\n t['cs']['grid']['Blanks'] = 'Nezadaná hodnota'\r\n\r\n return t\r\n}\r\n\r\nexport const overrideSyncfusionTranslationsSk = (\r\n t: SyncfusionTranslationsSk\r\n): SyncfusionTranslationsSk => {\r\n t['sk']['grid']['GroupDropArea'] =\r\n 'Pre zoskupenie tabuľky pretiahnite hlavičku príslušného stĺpca do tohoto poľa'\r\n t['sk']['grid']['ClearButton'] = 'Vymazať'\r\n t['sk']['grid']['FilterButton'] = 'Filtrovať'\r\n t['sk']['grid']['Blanks'] = 'Nezadaná hodnota'\r\n \r\n return t\r\n}\r\n","import React, { FC, useEffect } from 'react'\r\nimport { apiUrls, appUrls, assetsUrls } from '../../../utils/urls'\r\nimport { Nav, Navbar } from 'react-bootstrap'\r\nimport cx from 'classnames'\r\nimport styles from './Navigation.module.scss'\r\nimport { appName } from '../../../utils/generalValues'\r\nimport useAxios from 'axios-hooks'\r\nimport { NavigationDto } from '../../../models/NavigationDto'\r\nimport LoginNavigation from './LoginNavigation'\r\nimport NavigationItemWithChildren from './NavigationItemWithChildren'\r\nimport NavigationItem from './NavigationItem'\r\nimport UserSettings from './UserSettings'\r\nimport LoadedTTData from './LoadedTTData'\r\nimport i18n from 'i18next'\r\nimport { changeCldrLanguage } from '../../../config/cldr'\r\nimport { AppLanguage } from '../../../config/i18n'\r\nimport {useAuthContext} from \"../../../contexts/AuthContext\";\r\n\r\nconst Navigation: FC = () => {\r\n const { setUser } = useAuthContext()\r\n const [{ data: navigation, loading, error }, reloadNavigation] = useAxios({\r\n url: apiUrls.navigation,\r\n })\r\n\r\n useEffect(() => {\r\n if (navigation?.language) {\r\n i18n.changeLanguage(navigation.language)\r\n changeCldrLanguage(navigation.language as AppLanguage)\r\n }\r\n }, [navigation?.language])\r\n \r\n useEffect(() => {\r\n setUser(navigation?.user)\r\n }, [navigation?.user, setUser])\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n {navigation && (\r\n \r\n \r\n\r\n \r\n \r\n \r\n )}\r\n \r\n )\r\n}\r\n\r\nexport default Navigation\r\n","export const companyWeb = 'https://inprop.sk'\r\nexport const companyName = 'INPROP, s.r.o.'\r\nexport const companyPhone = '+421-(41) 723-4456'\r\nexport const appName = 'iVykony'\r\nexport const appEmail = 'ivykony@inprop.sk'","import React, {FC} from 'react'\r\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome'\r\nimport {faMobileAlt} from '@fortawesome/free-solid-svg-icons/faMobileAlt'\r\nimport {faEnvelope} from '@fortawesome/free-solid-svg-icons/faEnvelope'\r\n\r\nimport './Footer.module.scss'\r\n\r\nconst Footer: FC = () => {\r\n const companyWeb = 'https://inprop.sk'\r\n const companyName = 'INPROP, s.r.o.'\r\n const companyPhone = '+421-(41) 723-4456'\r\n const appEmail = 'ivykony@inprop.sk'\r\n const appVersion = process.env.REACT_APP_VERSION\r\n\r\n return (\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n v{appVersion} | Copyright © {new Date().getFullYear()},{' '}\r\n \r\n {companyName}\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n {appEmail}\r\n \r\n \r\n \r\n {companyPhone}\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n )\r\n}\r\n\r\nexport default Footer\r\n","import { faTimes } from '@fortawesome/free-solid-svg-icons/faTimes'\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport { IconButton } from '@mui/material'\r\nimport cx from 'classnames'\r\nimport React, { FC, useContext, useEffect } from 'react'\r\nimport {\r\n Notification as INotification,\r\n NotificationsContext,\r\n NotificationType,\r\n} from '../../contexts/NotificationsContext'\r\nimport { REMOVE_NOTIFICATION } from '../../contexts/NotificationsReducer'\r\nimport styles from '../layout/Notification.module.scss'\r\n\r\nconst Notification: FC = (props) => {\r\n const { dispatch } = useContext(NotificationsContext)\r\n\r\n if (props.autoDismissAfterSeconds && props.disableAutoDismiss)\r\n throw new Error(\r\n 'Notification.autoDismissAfterSeconds cannot be combined with Notification.disableAutoDismiss=true'\r\n )\r\n\r\n useEffect(() => {\r\n if (\r\n props.disableAutoDismiss ||\r\n !props.autoDismissAfterSeconds ||\r\n props.autoDismissAfterSeconds === 0\r\n ) {\r\n return\r\n }\r\n\r\n const timeout = setTimeout(() => {\r\n dispatch({ type: REMOVE_NOTIFICATION, value: props.id })\r\n }, props.autoDismissAfterSeconds * 1000)\r\n\r\n return () => {\r\n clearTimeout(timeout)\r\n }\r\n }, [props.autoDismissAfterSeconds, props.disableAutoDismiss, props.id, dispatch])\r\n\r\n const getBorderCssByType = (type: NotificationType | undefined): string => {\r\n switch (type) {\r\n case NotificationType.Success:\r\n return styles.borderNtfOk\r\n case NotificationType.Warning:\r\n return styles.borderNtfWarning\r\n case NotificationType.Error:\r\n return styles.borderNtfFail\r\n default:\r\n return ''\r\n }\r\n }\r\n\r\n const onRemove = (id: string) => {\r\n dispatch({ type: REMOVE_NOTIFICATION, value: id })\r\n }\r\n\r\n return (\r\n \r\n \r\n
{props.title}
\r\n onRemove(props.id)}\r\n className={'mr-0'}\r\n >\r\n \r\n \r\n \r\n\r\n {!props.body ? null : (\r\n
\r\n {typeof props.body === 'function' ? props.body(() => onRemove(props.id)) : props.body}\r\n
\r\n )}\r\n\r\n {!props.autoDismissAfterSeconds ? null : (\r\n \r\n )}\r\n \r\n )\r\n}\r\n\r\nexport default Notification\r\n","import React, { FC, useContext } from 'react'\r\nimport { NotificationsContext } from '../../contexts/NotificationsContext'\r\nimport Notification from '../general/Notification'\r\nimport cx from 'classnames'\r\n\r\nimport styles from './NotificationStack.module.scss'\r\n\r\nconst NotificationStack: FC = () => {\r\n const {\r\n state: { notifications },\r\n } = useContext(NotificationsContext)\r\n\r\n return (\r\n
\r\n {notifications.map((_) => (\r\n \r\n ))}\r\n
\r\n )\r\n}\r\n\r\nexport default NotificationStack\r\n","import React, { FC } from 'react'\r\nimport cx from 'classnames'\r\nimport Navigation from './navigation/Navigation'\r\nimport Footer from './Footer'\r\nimport NotificationStack from './NotificationStack'\r\n\r\nimport styles from './Layout.module.scss'\r\nimport { LayoutWidth, useLayoutContext } from '../../contexts/LayoutContext'\r\n\r\nconst Layout: FC = ({ children }) => {\r\n const { state } = useLayoutContext()\r\n\r\n return (\r\n
\r\n \r\n\r\n \r\n \r\n {children}\r\n
\r\n \r\n\r\n {state.isWithFooter &&