{"version":3,"sources":["config/configuration.ts","config lazy /^/.//.*$/ groupOptions: {} namespace object","framework/action.ts","store/leagues/actionTypes.ts","store/leagues/actions.ts","store/registration/model.ts","store/players/actionTypes.ts","store/players/actions.ts","components/players/ProfileEditor.tsx","framework/logger.ts","components/players/ProfileDialog.tsx","store/players/selectors.ts","store/clubs/actionType.ts","store/clubs/actions.ts","components/shell/AccountMenu.tsx","components/shell/Notifier.tsx","components/shell/TopBar.tsx","components/shell/HeroImage.tsx","components/shell/NavBar.tsx","components/shell/PageWrapper.tsx","utils/theme.ts","framework/data.ts","store/leagues/selectors.ts","components/leagues/PricesList.tsx","framework/components/DateView.tsx","components/leagues/LeagueHeader.tsx","components/leagues/LeaguesList.tsx","components/leagues/LeagueCityGroup.tsx","components/leagues/LeagueGroups.tsx","components/leagues/LeaguesPage.tsx","store/leagues/reducer.ts","store/players/reducer.ts","store/shell/actionTypes.ts","store/shell/reducer.ts","store/clubs/reducer.ts","store/matches/models.ts","store/matches/reducer.ts","store/payments/reducer.ts","store/shop/models.ts","store/shop/reducer.ts","store/desktop/reducer.ts","store/stats/reducer.ts","store/match-offers/models.ts","store/match-offers/reducer.ts","store/registration/reducer.ts","store/elo/reducer.ts","store/tournaments/reducer.ts","store/trainings/reducer.ts","store/reducer.ts","framework/store-logger.ts","store/leagues/api.ts","store/payments/api.ts","store/leagues/sagas.ts","store/players/api.ts","store/players/sagas.ts","store/clubs/api.ts","store/clubs/sagas.ts","store/matches/actionTypes.ts","store/leagues/models.ts","store/matches/api.ts","store/matches/actions.ts","store/desktop/actionTypes.ts","store/desktop/actions.ts","store/matches/sagas.ts","store/payments/actionTypes.ts","store/payments/models.ts","store/payments/actions.ts","store/payments/sagas.ts","store/shop/actionTypes.ts","store/shop/actionts.ts","store/shop/api.ts","store/shop/sagas.ts","store/desktop/api.ts","store/desktop/sagas.ts","store/stats/actionTypes.ts","store/stats/actions.ts","store/stats/api.ts","store/stats/sagas.ts","store/match-offers/actionTypes.ts","store/match-offers/actions.ts","store/match-offers/api.ts","store/match-offers/sagas.ts","store/registration/actionTypes.ts","store/registration/actions.ts","store/registration/api.ts","store/registration/sagas.ts","store/elo/actionTypes.ts","store/elo/actions.ts","store/elo/api.ts","store/elo/sagas.ts","store/tournaments/actionTypes.ts","store/tournaments/actions.ts","store/tournaments/api.ts","store/tournaments/sagas.ts","store/trainings/actionTypes.ts","store/trainings/actions.ts","store/trainings/api.ts","store/trainings/sagas.ts","store/store.ts","store/clubs/models.ts","components/shell/Page.tsx","store/shell/selectors.ts","components/shell/ErrorNotifier.tsx","store/shell/actions.ts","components/leagues/OpenLeagueClubs.tsx","components/leagues/PrivateLeagueClub.tsx","components/leagues/LeaguePlayerView.tsx","components/leagues/LeagueRanking.tsx","framework/components/DateTimeView.tsx","components/matches/utils.ts","components/matches/NewestMatches.tsx","components/leagues/LeagueDetails.tsx","components/matches/CreateMatchDialog.tsx","components/leagues/AdditionalSubmissionInfo.tsx","components/leagues/PriceSubmissionInfo.tsx","components/leagues/LeagueDetailsPage.tsx","store/clubs/selectors.ts","components/clubs/utils.ts","components/clubs/Hour.tsx","components/clubs/WorkingHour.tsx","components/clubs/ClubDetails.tsx","components/clubs/ClubsPage.tsx","components/matches/MatchesTable.tsx","utils/numbers.ts","components/matches/SetResult.tsx","components/matches/ValidationSummary.tsx","components/matches/MatchResultDialog.tsx","components/matches/CancelConfirmation.tsx","components/matches/MyMatchesPage.tsx","components/matches/AllMatchesPage.tsx","components/shell/MessageNotifier.tsx","components/payments/PaymentStatus.tsx","components/payments/PaymentsList.tsx","components/payments/PaymentsPage.tsx","components/static-pages/AboutPage.tsx","components/static-pages/CookiesPolicyPage.tsx","components/static-pages/PrivacyPolicyPage.tsx","components/static-pages/NewsPage.tsx","components/shop/ShoppingInfo.tsx","store/shop/utils.ts","components/shop/ProductsList.tsx","components/shop/SpotPlace.tsx","components/shop/ShoppingSummary.tsx","components/shop/ShoppingSubmissionState.tsx","components/shop/ShoppingProcess.tsx","components/shop/BasketInfo.tsx","components/shop/ShopPage.tsx","components/shop/ShoppingOrdersList.tsx","components/shop/ShoppingOrdersPage.tsx","components/desktop/PlayersMatches.tsx","store/stats/selectors.ts","components/stats/GeneralStats.tsx","components/stats/ClubStats.tsx","components/match-offers/CreateMatchOfferDialog.tsx","components/stats/PerSeasonStats.tsx","components/stats/RecentPlayersMatches.tsx","components/stats/StatsContainer.tsx","components/shell/onboarding/OnboardingDialog.tsx","components/desktop/DesktopPage.tsx","components/stats/StatsPage.tsx","framework/components/TimeView.tsx","components/match-offers/MatchOfferListItem.tsx","store/match-offers/utils.ts","components/match-offers/MatchOffersList.tsx","components/match-offers/MatchOffersFilter.tsx","components/match-offers/MatchOffersPage.tsx","components/registration/LeagueSelector.tsx","components/registration/PlayerType.tsx","components/registration/PlayerStep.tsx","components/registration/PhoneConfirmation.tsx","components/registration/PriceConfirmation.tsx","components/registration/ConfirmationsStep.tsx","components/registration/RegistrationProgress.tsx","components/registration/RegistrationWizard.tsx","components/registration/RegistrationPage.tsx","components/elo/RankingTable.tsx","components/elo/RankingPage.tsx","components/players/AdminAllPlayersPage.tsx","components/sponsors/Sponsor.tsx","components/sponsors/SponsorsPage.tsx","store/tournaments/selectors.ts","components/tournaments/TournamentHeader.tsx","components/tournaments/TournamentsList.tsx","components/tournaments/TournamentCityGroup.tsx","components/tournaments/TournamentGroups.tsx","components/tournaments/TournamentsPage.tsx","components/tournaments/registration/TournamentSelector.tsx","components/tournaments/registration/TournamentRegistrationConfirmation.tsx","components/tournaments/registration/TournamentRegistrationProgress.tsx","components/tournaments/registration/TournamentRegistrationWizard.tsx","components/tournaments/registration/TournamentRegistrationPage.tsx","components/tournaments/TournamentDetails.tsx","components/tournaments/matches/CreateTournamentMatchDialog.tsx","components/tournaments/TournamentDetailsPage.tsx","components/tournaments/matches/TournamentMatchResultDialog.tsx","components/tournaments/matches/MyTournamentMatchesPage.tsx","components/tournaments/matches/AllTournamentMatchesPage.tsx","components/trainings/TrainingHeader.tsx","components/trainings/TrainingList.tsx","components/trainings/TrainingCityGroup.tsx","components/trainings/TrainingGroups.tsx","store/trainings/selectors.ts","components/trainings/TrainingPage.tsx","components/trainings/TrainingDetails.tsx","components/trainings/TrainingDetailsPage.tsx","components/trainings/registration/TrainingRegistrationConfirmation.tsx","components/trainings/registration/TrainingRegistrationProgress.tsx","components/trainings/registration/TrainingRegistrationWizard.tsx","components/trainings/registration/TrainingRegistrationPage.tsx","App.tsx","serviceWorker.ts","utils/history.ts","index.tsx"],"names":["resolveEnvironment","url","indexOf","config","undefined","getConfig","a","async","envName","window","location","host","m","default","map","webpackAsyncContext","req","__webpack_require__","o","Promise","resolve","then","e","Error","code","ids","id","all","slice","keys","Object","module","exports","Severity","LOAD_OPEN_LEAGUES","LOAD_MY_LEAGUES","ASSIGN_PLAYER_TO_LEAGUE","LOAD_LEAGUE_DETAILS","LOAD_MY_PRIVATE_LEAGUES","ADDITIONAL_DATA_ACQUIRED","PRICING_ACCEPTED","LOAD_MY_LEAGUES_WITH_PAYMENT","LOAD_OPPONENTS_PLAYED_WITH","PlayerType","loadOpenLeagues","year","type","payload","loadOpenLeaguesFailed","error","description","loadOpenLeaguesSuccess","leagues","loadMyLeagues","token","loadMyLeaguesFailed","loadMyLeaguesSuccess","leagueIds","assignPlayerToLeagueFailed","assignPlayerToLeagueSuccess","notification","severity","Success","message","loadLeagueDetails","loadLeagueDetailsFailed","loadLeagueDetailsSuccess","loadMyPrivateLeaguesFailed","loadMyPrivateLeaguesSuccess","showAdditionalDataDialog","showPricingDataDialog","promoCode","loadMyLeaguesWithPayment","loadMyLeaguesWithPaymentSuccess","loadOpponentsPlayedWith","loadOpponentsPlayedWithFailed","loadOpponentsPlayedWithSuccess","LOAD_USER_PLAYER","CREATE_PLAYER","CREATE_PLAYER_SUCCESS","UPDATE_PLAYER","UPDATE_PLAYER_SUCCESS","SAVE_PLAYER","LOAD_ALL_PLAYERS","loadUserPlayer","loadUserPlayerFailed","loadUserPlayerSuccess","player","createPlayer","playerType","createPlayerFailed","createPlayerSuccess","updatePlayer","updatePlayerFailed","updatePlayerSuccess","loadAllPlayersSuccess","players","ai","ProfileEditor","field","clubs","onPlayerChanged","user","useAuth0","safePlayer","level","gender","birthDate","format","Date","email","name","phoneNumber","surname","joined","disableMatchOfferNotifications","React","useState","playerState","setPlayerState","setStringField","event","newPlayer","target","value","Grid","container","spacing","item","xs","sm","TextField","style","width","label","variant","onChange","inputVariant","margin","autoOk","parse","toString","fromStringDate","isValid","KeyboardButtonProps","FormControl","InputLabel","Select","labelId","labelWidth","MenuItem","fieldValue","InputProps","endAdornment","Tooltip","title","Divider","REGULAR","Autocomplete","multiple","preferredClubs","options","sortBy","x","address","city","getOptionLabel","option","find","getOptionSelected","v","groupBy","filterSelectedOptions","length","y","renderInput","params","placeholder","multiline","fullWidth","rows","preferredClubsDescription","preferredTime","Checkbox","checked","setBooleanField","referral","readOnly","rewardPoints","display","flexFlow","alignItems","Link","href","Typography","whiteSpace","IconButton","color","onClick","navigator","clipboard","writeText","ProfileDialog","open","onClosed","useEffect","ReactGA","modalview","autoComplete","noValidate","Dialog","DialogTitle","padding","DialogActions","Button","currentPlayer","state","me","key","appInsights","ApplicationInsights","instrumentationKey","autoExceptionInstrumented","autoUnhandledPromiseInstrumented","loadAppInsights","properties","trackEvent","trackPageView","LOAD_CLUBS","loadClubsInProvince","loadClubsInProvinceSuccess","loadClubsInProvinceFailed","connect","dispatch","loadMe","savePlayer","loadMyPrivateLeagues","loadClubs","isAuthenticated","loginWithRedirect","logout","getAccessTokenSilently","anchorEl","setAnchorEl","profileDialogOpen","setProfileDialogOpen","handleClose","getToken","success","logger","currentTarget","redirectUri","appState","targetUrl","hash","maxWidth","overflow","textOverflow","nickname","Menu","keepMounted","Boolean","onClose","component","to","returnTo","payments","leaguesWithPayments","isActive","Badge","badgeContent","Popover","anchorOrigin","vertical","horizontal","transformOrigin","Paper","TopBar","AppBar","position","elevation","Toolbar","assign","cursor","src","height","marginTop","flexGrow","items","img","posY","posX","HeroImage","theme","useTheme","matches","useMediaQuery","breakpoints","down","i","Math","floor","random","backgroundImage","backgroundColor","backgroundSize","backgroundRepeat","backgroundPositionY","backgroundPositionX","opacity","getStyle","NavBar","links","selected","setSelected","linkComponents","p","isExternal","Tab","path","props","promote","useLocation","selectedLink","l","pathname","selectedLinkIdx","up","Tabs","scrollButtons","centered","_","newValue","indicatorColor","PageWrapper","isSmall","Card","square","top","marginLeft","marginRight","children","createMuiTheme","palette","primary","lightGreen","secondary","orange","overrides","MuiTabs","indicator","plPL","L","Icon","Default","prototype","_getIconUrl","LOADING","NOT_STARTED","fail","dataOf","isLoaded","d","unwrap","unsafeUnwrap","currentUsersAssignedLeagues","subscribedTo","usersAssignedLeagues","createSelector","leaguesData","currentUsersAssignedLeaguesData","isCurrentUserAssigned","usersAssignedLeague","currentDetails","leagueData","sort","rank","userAssignedLeagueWithPossibleMatches","currentOpponents","opponentIds","canIPlay","includes","openLeaguesByCity","privateLeagues","PricesList","prices","toRender","sequenceNo","fontSize","verticalAlign","DateView","LeagueHeader","league","ExpansionPanel","ExpansionPanelSummary","expandIcon","md","Chip","isDoubles","clickable","size","icon","Hidden","xsDown","startDate","participantsCount","textAlign","paddingLeft","ExpansionPanelDetails","endDate","xl","filter","logoUrl","c","alt","LeaguesList","l1","l2","LeagueCityGroup","isOpen","season","localStorage","getItem","encodeURI","console","setOpen","useCallback","setItem","marginBottom","Collapse","in","LeagueGroups","groups","entries","CircularProgress","withRouter","loadLeagues","match","availableYears","setAvailableYears","defaultSeason","setDefaultSeason","setViewedYear","seasons","direction","Alert","AlertTitle","startIcon","evt","replace","ToggleButtonGroup","exclusive","ToggleButton","initialState","showDialog","combineReducers","action","CLEAR_CURRENT_ERROR","CLEAR_NOTIFICATION","errorAction","MatchStatus","currentLeagueNewestMatches","currentLeaguePlayersMatchesPage","result","idx","findIndex","matchId","ret","toUpdate","status","InProcess","currentLeagueAllMatchesPage","currentTournamentPlayersMatchesPage","currentTournamentAllMatchesPage","OrderSubmissionStatus","OrderStatus","products","basket","update","count","remove","spots","selectedSpot","submissionState","PENDING","FINISHED","FAILED","orders","myUnconfirmedMatches","myConfirmedMatches","State","stats","EDITING","SUBMITTING","SUBMITTED","failed","errors","shouldKeepDialogOpen","formState","matchOffers","LOADING_NOT_STARTED","isLoading","DEFAULT_STATE","leagueSelection","secondPlayerName","secondPlayerSurname","basePrice","tournamentSelection","tournament","secondPlayerLastName","secondPlayerNeeded","trainingSelection","training","updatedPlayer","phoneVerified","isVerifying","priceInfo","registrationMessage","sendingPhoneAuthMessage","isUpgrading","handlePlayerTypeBasedOnLeagueSelection","currentPlayerType","TRIAL","ranking","tournaments","details","trainings","shell","shop","desktop","registration","leagueId","leagueYear","elo","store","next","group","info","log","getState","groupEnd","fetch","apiUrl","response","json","loadLeagueDetailsApi","admins","headers","credentials","loadMyLeaguesWithPaymentStatusApi","ok","statusText","assignPlayerToLeagueApi","secondaryPlayerName","secondaryPlayerSurname","body","JSON","stringify","method","finals","finalsDate","loadOpponentsPlayedWithApi","data","createPaymentApi","getUsersPaymentsApi","paymentDate","redoUserPaymentApi","orderId","loadMyLeaguesStep","assignPlayerToLeague","loadMyPrivateLeaguesStep","loadMyLeaguesWithPaymentStep","loadOpponentsPlayedWithStep","loadLeaguesSaga","loadMyLeaguesSaga","assignPlayerToLeagueSaga","loadLeagueDetailsSaga","loadMyPrivateLeaguesSaga","loadMyLeaguesWithPaymentSaga","loadOpponentsPlayedWithSaga","call","put","callables","leaguesIds","reduce","prev","curr","take","tocApproved","category","paymentLink","removeItem","loadOpenLeaguesAction","loadMyLeaguesAction","loadLeagueDetailsAction","matchesSeasons","push","delay","opponentsPlayedWith","takeEvery","getAllPlayers","createUserPlayer","updateUserPlayer","loadCurrentPlayerStep","createPlayerStep","updatePlayerStep","savePlayerStep","loadAllPlayersStep","loadCurrentPlayerSaga","createPlayerSaga","updatePlayerSaga","savePlayerSaga","loadAllPlayers","playerData","set","userId","loadClubsInProvinceApi","province","loadClubsInProvinceStep","loadClubsForProvinceSaga","availableProvinces","clubsData","LeagueAccess","LeagueView","LeagueStatus","SUBMIT_MATCH","GET_NEWEST_MATCHES","GET_PLAYERS_MATCHES","CONFIRM_MATCH","CANCEL_MATCH","SUBMIT_MATCH_RESULT","GET_LEAGUES_MATCHES","GET_TOURNAMENT_MATCHES","GET_PLAYERS_TOURNAMENT_MATCHES","CONFIRM_TOURNAMENT_MATCH","CANCEL_TOURNAMENT_MATCH","SUBMIT_TOURNAMENT_MATCH_RESULT","submitMatchApi","access","Public","oponent","date","club","getNewestMatchResultsApi","getLeagueMatchesApi","skip","getTournamentMatchesApi","getPlayersMatchesApi","request","getPlayersTournamentMatchesApi","confirmMatchApi","confirmTournamentMatchApi","tournamentId","cancelMatchApi","cancelTournamentMatchApi","submitMatchResultApi","sets","walkover","setScores","r","firstPlayer","secondPlayer","isOponentRetired","submitTournamentMatchResultApi","handleSubmitMatchFailedDescription","handleSubmitMatchFailedContext","warning","submitMatchFailed","context","submitMatchSuccess","getNewestMatches","getNewestMatchesFailed","getNewestMatchesSuccess","getPlayersMatches","getPlayersMatchesSuccess","getPlayersMatchesFailed","confirmMatch","confirmMatchSuccess","confirmMatchFailed","cancelMatch","cancelMatchSuccess","cancelMatchFailed","submitMatchResult","submitMatchResultFailed","submitMatchResultSuccess","getLeaguesMatchesSuccess","getLeaguestMatchesFailed","getTournamentMatchesSuccess","getTournamentMatchesFailed","getPlayersTournamentMatches","getPlayersTournamentMatchesSuccess","getPlayersTournamentMatchesFailed","confirmTournamentMatchSuccess","confirmTournamentMatchFailed","cancelTournamentMatchSuccess","cancelTournamentMatchFailed","submitTournamentMatchResultFailed","submitTournamentMatchResultSuccess","LOAD_MY_UNCONFIRMED_MATCHES","LOAD_MY_CONFIRMED_MATCHES","loadMyUnconfirmedMatches","loadMyUnconfirmedMatchesSuccess","loadMyUnconfirmedMatchesFailed","loadMyConfirmedMatches","loadMyConfirmedMatchesSuccess","loadMyConfirmedMatchesFailed","submitMatchStep","getNewestMatchesStep","getPlayersMatchesStep","confirmMatchStep","confirmTournamentMatchStep","cancelMatchStep","cancelTournamentMatchStep","submitMatchResultStep","submitTournamentMatchResultStep","getLeagueMatchesStep","getTournamentMatchesStep","getPlayersTournamentMatchesStep","submitMatchSaga","getNewestMatchesSaga","loadPlayersMatchesSaga","loadPlayersTournamentMatchesSaga","confirmMatchSaga","cancelMatchSaga","submitMatchResultSaga","getLeagueMatchesSage","getTournamentMatchesSaga","confirmTournamentMatchSaga","cancelTournamentMatchSaga","submitTournamentMatchResultSaga","PaymentStatus","GET_USER_PAYMENTS","REDO_USER_PAYMENT","getUserPayments","getUserPaymentsSuccess","getUserPaymentsFailed","redoUserPaymentFailed","getUserPaymentsStep","redoUserPaymentStep","getUserPaymentsSaga","redoUserPaymentSaga","paymentStatus","WAITING_FOR_CONFIRMATION","payment","externalPaymentOrderId","paymentNeeded","LOAD_PRODUCTS","LOAD_SPOTS","CREATE_SHOPPING_ORDER","LOAD_MY_ORDERS","loadProductsFailed","loadProductsSuccess","loadSpots","loadSpotsFailed","loadSpotsSuccess","createShoppingOrderSuccess","createShoppingOrderFailed","loadMyOrdersSuccess","loadMyOrdersFailed","loadProductsApi","loadSpotsApi","createShoppingOrderApi","spot","spotId","quantity","loadMyOrdersApi","orderDate","loadProductsStep","loadSpotsStep","createShoppingOrderStep","loadMyOrdersStep","loadProducts","createShoppingOrderSaga","loadMyOrdersSaga","DesktopApi","loadMyUnconfirmedMatchesStep","loadMyConfirmedMatchesStep","loadMyUnconfirmedMatchesSaga","loadMyConfirmedMatchesSaga","getUnconfirmedMatches","res","getConfirmedMatches","LOAD_PLAYER_STATS","LOAD_PLAYER_MATCHES","loadPlayerStatsSuccess","loadPlayerStatsFailed","loadPlayerMatchesSuccess","loadPlayerMatchesFailed","loadPlayersStatsApi","leagueStartDate","loadPlayersMatchesApi","loadPlayerMatchesStep","loadPlayerStatsStep","loadPlayerMatchesSaga","loadPlayerStatsSaga","playerId","s","CREATE_MATCH_OFFER","GET_MATCH_OFFERS","CANCEL_MATCH_OFFER","ACCEPT_MATCH_OFFER","createMatchOfferSuccess","createMatchOfferFailed","createChangeFormState","getMatchOffers","getMatchOffersSuccess","getMatchOffersFailed","cancelMatchOfferSuccess","cancelMatchOfferFailed","acceptMatchOfferSuccess","acceptMatchOfferFailed","serverError","unAuth","invalidRequest","MatchOffersApi","createdOn","clubIds","endTime","startTime","createMatchOfferStep","getMatchOffersStep","cancelMatchOfferStep","acceptMatchOfferStep","cancelMatchOfferSaga","acceptMatchOfferSaga","createMatchOfferSaga","getMatchOffersSaga","createMatchOffer","cancelMatchOffer","acceptMatchOffer","SEND_SMS_VERIFICATION_CODE","VERIFY_SMS_CODE","GET_PRICE_INFO_FOR_LEAGUE","MAKE_REGISTRATION","setRegistrationPlayerType","sendSmsVerificationCodeSuccess","sendSmsVerificationCodeFailed","verifySmsCodeSuccess","verifySmsCodeFailed","getPriceInfoForLeagueSuccess","getPriceInfoForLeagueFailed","makeRegistrationSuccess","makeRegistrationFailed","sendRegistrationMessage","RegistrationApi","sendSmsVerificationCodeStep","verifySmsCodeStep","getPriceInfoStep","startRegistration","sendSmsVerificationCodeSaga","verifySmsCodeSaga","getPriceInfoSaga","makeRegistrationSaga","sendSmsVerificationCode","verifySmsCode","getPriceInfo","register","isSuccess","errorMessage","LOAD_RANKING","loadRankingFailed","loadRankingSuccess","EloApi","loadRankingStep","loadRankingSaga","loadRanking","LOAD_TOURNAMENTS","REGISTER_TO_TOURNAMENT","LOAD_TOURNAMENT_DETAILS","SUBMIT_TOURNAMENT_MATCH","loadTournaments","loadTournamentsSuccess","loadTournamentDetails","loadTournamentDetailsSuccess","submitTournamentMatchSuccess","submitTournamentMatchFailed","TournamentRegistrationApi","header","loadTournamentsStep","loadTournamentDetailsStep","registerToTournamentStep","submitTournamentMatchStep","loadTournamentsSaga","registerToTournamentSaga","loadTournamentDetailsSaga","submitTournamentMatchSaga","load","loadDetails","submitMatch","LOAD_TRAININGS","REGISTER_TO_TRAINING","LOAD_TRAINING_DETAILS","loadTrainings","loadTrainingsSuccess","loadTrainingDetailsSuccess","TrainingRegistrationApi","loadTrainingsStep","loadTrainingDetailsStep","registerToTrainingStep","loadTrainingsSaga","registerToTrainingSaga","loadTrainingDetailsSaga","Api","rootSaga","sagaMiddleware","createSagaMiddleware","createStore","rootReducer","applyMiddleware","sagas","saga","spawn","run","SportCardType","CourtType","SurfaceType","DayOfWeek","Province","avatar","pageName","pageview","CardHeader","CardContent","currentErrorAction","failure","clearFailure","aria-labelledby","aria-describedby","DialogContent","wrap","reload","OpenLeagueClubs","PrivateLeagueClub","paddingTop","LeaguePlayerView","setPlayer","Accept","Authorization","resp","reject","minWidth","btoa","fontWeight","className","LeagueRanking","leagueStatus","mode","onRegisterMatchResultWithPlayer","leagueAdvancingPlayersCount","advanceCounter","rankedPlayers","score","matchesPlayed","advance","unrankedPlayers","compose","toLower","prop","orderedPlayers","page","setPage","pageSize","setPageSize","playerInView","setPlayerInView","viewItems","drop","el","TableContainer","Table","TableHead","TableRow","TableCell","align","TableBody","borderLeft","parseInt","points","matchesWon","setsWon","setsPlayed","gemsWon","gemsLost","Finished","registerMatchResultWithPlayer","TablePagination","rowsPerPageOptions","rowsPerPage","onChangePage","onChangeRowsPerPage","DateTimeView","timeZone","GAME_SCORE_LIST","SET_SCORE_LIST","firstPlayerWon","secondPlayerWon","validateRegularSet","test","tieBreak","validateTieBreak","absolute","abs","validityStyle","validateSetsResult","borderColor","borderWidth","borderStyle","useStyles","makeStyles","restb","gp","NewestMatch","classes","justify","borderRadius","NewestMatches","LeagueDetails","onSubmitToLeagueRequested","onRegisterMatchResultWithPlayerRequested","newestMatches","currentView","RankingList","finalsUrl","advancingPlayersCount","border","frameBorder","runtimeInfo","Tournament","supportedClubs","owner","CreateMatchDialog","setClub","dateOfMatch","setDateOfMatch","currentClub","OwnedByClub","only","ampm","invalidDateMessage","minDate","minDateMessage","maxDate","maxDateMessage","clubId","handleClubChange","startsWith","handleSubmit","disabled","AdditionalSubmissionInfo","show","setTocApproved","promo","setPromo","secPlayerName","setSecPlayerName","secPlayerSurname","setSecPlayerSurname","setReferral","InputAdornment","PriceSubmissionInfo","PromoCode","setPriceInfo","price","catch","textDecoration","showAdditionalDialog","showPricingInfo","loadLeaguesDetails","submitToLeagueRequested","additionalDataObtained","additionalDataAcquired","pricingAccepted","t","matchResultDialogOpen","setMatchResultDialogOpen","setOponent","unsafePlayer","succeeded","allClubs","clubsWithGeoCoordinates","geoCoordinate","Hour","hour","split","hours","minutes","WorkingHour","Friday","Monday","Saturday","Sunday","Thursday","Tuesday","Wednesday","Weekday","describeDayOfWeek","dayOfWeek","openTime","closeTime","main","markdown","borderCollapse","ClubDetails","styles","address1","postalCode","websiteUrl","workingHours","w","theSame","wSorted","b","canWorkingHoursBeShortened","shortenedWorkingHours","wh","priceList","source","sportCards","Multisport","OkSystem","describeSportCardType","priceDiscount","courts","Baloon","Hall","Outdoor","describeCourtType","courtType","ArtificialClay","Clay","ArtifilicialGrass","Carpet","Hard","describeSurfaceType","surfaceType","lighting","mergeOptions","iconRetinaUrl","require","iconUrl","shadowUrl","pos","setPos","geolocation","getCurrentPosition","provinces","provincesConfig","current","coords","latitude","longitude","values","center","distance","sqrt","pow","lat","lng","z","setCurrentClub","zoom","TileLayer","attribution","Marker","Popup","selectClub","Drawer","anchor","MatchStatusDisplay","New","Cancelled","Confirmed","ScoreDisplay","MatchesTable","onLoadData","actions","forSinglePlayerOnly","enterTouchDelay","labelDisplayedRows","psize","formatInt","defaultVal","Number","isNaN","isFinite","AddResult","click","stopPropagation","ShowResult","onRemoved","InputResult","onDone","inputProps","min","SetResult","onSetChange","editMode","setEditMode","ValidationSummary","List","subheader","__","messages","ListSubheader","lineHeight","ListItem","paddingBottom","ListItemIcon","ListItemText","MatchResultDialog","onHelpRequested","validationState","setValidationState","setSets","setWalkover","validationResult","setNumber","firstPlayerSetsWon","secondPlayerSetsWon","setMessages","tieBreakResult","lastSet","f","saneSets","sanitizeSetsResult","isWalkover","CancelConfirmationDialog","confirmOpponentAware","setConfirmOpponentAware","FormControlLabel","control","loadPlayersMatches","submitResult","matchCancelDialogOpen","setMatchCancelDialogOpen","currentMatch","setCurrentMatch","handleMatchResult","CancelConfirmation","confirmed","handleMatchCancelled","firstAction","createdBy","secondAction","getTime","thirdAction","forthAction","history","back","loadLeagueMatches","clearNotification","Snackbar","autoHideDuration","PaymentStatusC","CANCELED","COMPLETED","PaymentsList","redoPayment","compareDesc","leagueName","finalPrice","PS","loadPayments","AboutPage","borderRight","scrolling","allow","CookiesPolicyPage","NewsPage","lg","Avatar","CardActions","allowTransparency","grey","card","divider","ShoppingInfo","basketSum","smartPointsPrice","productCount","productid","media","flexDirection","justifyContent","textContent","ProductsList","productAdded","pointsBalance","CardActionArea","CardMedia","image","base64Image","gutterBottom","additionalInfo","SpotPlace","spotSelected","setError","minHeight","htmlFor","defaultValue","sg","FormHelperText","ShoppingSummary","ListItemAvatar","ShoppingSubmissionState","ShoppingProcess","onCreateOrderRequested","activeStep","setActiveStep","Stepper","orientation","Step","StepLabel","productRemoved","constructStepContent","BasketInfo","ListItemSecondaryAction","edge","OrderStatusIcon","READY","CANCELLED","ShoppingOrdersList","flexWrap","valueOf","orderDetails","spotName","loadMyOrders","PlayersMatches","moduleState","playerMatches","playerStats","acc","val","allMatches","createDataSelector","d2","d1","createSingleDataSelector","winPercentage","won","toFixed","statsPerSeasonOrdered","matchesGrouped","matchesInKnownLeagues","indexBy","mostFrequentClubs","ms","c1","playerDataFromMatches","playerFromMatch","GeneralStats","CircularProgressWithLabel","Box","left","bottom","right","round","TimeSpanType","ClubStats","clubsPlayed","useRowStyles","root","borderBottom","SeasonStats","leagueSelected","scope","R","colSpan","timeout","unmountOnExit","aria-label","preventDefault","PerSeasonStats","statsGrouped","RecentPlayersMatches","playersMatchesInLeague","statsPerSeason","recentMatches","loadPlayerStats","loadPlayerMatches","selectedLeague","setSelectedLeague","content","OnboardingDialog","openOnboarding","setOpenOnboarding","onboardingDone","MobileStepper","steps","nextButton","backButton","unconfirmedMatches","confirmedMatches","loadUnconfirmedMatches","loadConfirmedMatches","isSmallOrUpper","localeCompare","button","paddingRight","CreateMatchOfferDialog","onSubmit","getOptionsLabel","handlePreferredClubsChange","max","setPreferredClubs","preferredClubsValid","setPreferredClubsValid","preferredClubsError","setPreferredClubsError","startOfHour","addHours","fromDate","setFromDate","fromDateValid","setFromDateValid","fromDateError","setFromDateError","toDate","setToDate","toDateValid","setToDateValid","toDateError","setToDateError","fromTime","setFromTime","fromTimeValid","setFromTimeValid","fromTimeError","setFromTimeError","toTime","setToTime","toTimeValid","setToTimeValid","toTimeError","setToTimeError","setDescription","descriptionValid","setDescriptionValid","setDescriptionError","clubPickerReadonly","setClubPickerReadonly","Single","timeSpanType","Span","helperText","startOfDay","minutesStep","rowsMax","isOk","toLocaleTimeString","TimeView","MatchOfferListItem","ExpansionPanelActions","offer","canBeTurnedIntoMatch","canBeCancelled","MatchOffersList","offers","MatchOffersFilter","onFilterChanged","dateFrom","dateTo","endOfDay","startEditing","cancelEditing","submitMatchOffer","loadMatchOffers","add","days","setFilter","filteredItems","useMemo","mo","viewableItems","onLogin","createStyles","formControl","selectEmpty","selectPanel","leagueToRegister","setLeagueToRegister","onProceed","setIsValid","setTouched","selectedCity","setSelectedCity","seasonToRegister","uniq","listIcon","selectedPlayerType","boxShadow","selectablePlayerType","disabledPlayerType","setPlayerType","onMoveBack","regularDisabled","trialDisabled","dense","disableGutters","setUpdatedPlayer","PhoneConfirmation","phone","onPhoneChallenged","onSendSmsMessage","phoneAuthMessage","phoneCode","setPhoneCode","PriceConfirmation","getPriceInfoForLeague","setPromoCode","promoCodeDescription","promoCodeOk","referralDescription","referralOk","playerInfo","sendSmsWithVericationCode","isPhoneVerificationForTrialNeeded","setPhoneVerificationForTrialNeeded","isVerified","allSteps","factory","activeStepIdx","ConfirmationsStep","getSteps","RegistrationWizard","stepsMode","nonLinear","step","StepButton","stepName","getStepContent","leagueBasePrice","upgradePlayer","setPlayerTypeRegular","setMode","query","URLSearchParams","search","has","get","RankingTable","rating","numberOfWinMatches","numberOfMatches","loadPlayers","Sponsor","objectFit","SponsorsPage","selectTournaments","selectTournamentDetails","selectTournamentsSubscribedTo","TournamentHeaderComponent","maxPlayers","TournamentsList","TournamentHeader","TournamentCityGroup","TournamentGroups","getFullYear","thisYear","toYear","years","yearToRegister","reason","tournamentToRegister","setTournamentToRegister","cityLeagues","cl","selectedTournament","paymentDescription","TournamentRegistrationWizard","TournamentDetailsComponent","ladderUrl","InProgress","CreateTournamentMatchDialog","submitTournamentMatch","TournamentDetails","TournamentMatchResultDialog","loadTournamentMatches","TrainingHeaderComponent","trainers","TrainingsList","TrainingHeader","TrainingCityGroup","TrainingList","TrainingGroups","selectTrainings","selectTrainingDetails","TrainingDetailsComponent","subscribedPlayers","waitingQueuePlayers","loadTrainingDetails","TrainingDetails","trainingToRegister","selectedTraining","setTrainingToRegister","trainingId","TrainingRegistrationWizard","App","ThemeProvider","utils","DateFnsUtils","locale","plLocale","MyTournamentMatchesPage","TournamentsPage","PrivacyPolicyPage","hostname","createBrowserHistory","conf","aiKey","gaKey","initialize","q","ReactDOM","render","domain","clientId","origin","onRedirectCallback","audience","cacheLocation","useRefreshTokens","document","getElementById","serviceWorker","ready","unregister"],"mappings":"6OAAaA,EAAqB,SAACC,GAC/B,OAAiC,IAA9BA,EAAIC,QAAQ,aACJ,SACyB,IAA1BD,EAAIC,QAAQ,SACX,OAEA,QAIXC,OAAcC,EAELC,EAAY,wCAAAC,EAAAC,OAAA,oIAGVH,GAHU,UAMjBI,EAAUR,EAAmBS,OAAOC,SAASC,MAE7CR,EARiB,kCAAAG,EAAA,MASD,OAAO,KAAOE,IATb,OASXI,EATW,OAUjBT,EAASS,EAAEC,QAVM,gCAadV,GAbc,wC,gFCZzB,IAAIW,EAAM,CACT,kBAAmB,CAClB,IAED,qBAAsB,CACrB,IAED,UAAW,CACV,IACA,GAED,aAAc,CACb,IACA,GAED,SAAU,CACT,IACA,GAED,YAAa,CAC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IAC3D,GAAIgkC,GAAQ,CACV,IAAMF,GAAaE,GAChBtc,MAAM,KACN7iC,KAAI,SAAC8jD,GAAD,OAAOA,EAAEjhB,MAAM,QACnBnf,QAAO,SAAC5Q,EAAGiG,GAAJ,sBAAgBjG,EAAhB,eAAoBiG,EAAE,GAAKA,EAAE,OAAO,IAE3CkmC,GAAK,UACNt/C,OAAO4Z,aAAaM,QAAQ,WAAYolC,GAAK,UAYjD8E,IAASC,OACP,kBAAC,KAAD,CACEC,OAAO,6BACPC,SAAS,mCACTr1C,YAAalP,OAAOC,SAASukD,OAC7BC,mBAbuB,SAACt1C,GAC1Bm+B,GAAQ3oB,KACNxV,GAAYA,EAASC,UACjBD,EAASC,UACTpP,OAAOC,SAAS2T,WAUpB8wC,SAAS,4BACTC,cAAc,eACdC,kBAAkB,GAElB,kBAAC,GAAD,OAEFC,SAASC,eAAe,SF0FpB,kBAAmBh5C,WACrBA,UAAUi5C,cAAcC,MAAMpkD,MAAK,SAAA6f,GACjCA,EAAawkC,kB","file":"static/js/main.c250eadd.chunk.js","sourcesContent":["export const resolveEnvironment = (url: string) => {\n if(url.indexOf(\"localhost\") !== -1) {\n return \"local\";\n } else if(url.indexOf(\"-test\") !== -1) {\n return \"test\";\n } else {\n return \"prod\";\n }\n}\n\nlet config: any = undefined;\n\nexport const getConfig = async (useLocal: boolean = false) => {\n\n if(useLocal) {\n return undefined;\n }\n\n var envName = resolveEnvironment(window.location.host);\n\n if(!config) {\n const m = await import('./' + envName);\n config = m.default;\n }\n\n return config;\n \n}","var map = {\n\t\"./configuration\": [\n\t\t14\n\t],\n\t\"./configuration.ts\": [\n\t\t14\n\t],\n\t\"./local\": [\n\t\t298,\n\t\t0\n\t],\n\t\"./local.ts\": [\n\t\t298,\n\t\t0\n\t],\n\t\"./prod\": [\n\t\t299,\n\t\t1\n\t],\n\t\"./prod.ts\": [\n\t\t299,\n\t\t1\n\t],\n\t\"./test\": [\n\t\t300,\n\t\t2\n\t],\n\t\"./test.ts\": [\n\t\t300,\n\t\t2\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(function() {\n\t\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn Promise.all(ids.slice(1).map(__webpack_require__.e)).then(function() {\n\t\treturn __webpack_require__(id);\n\t});\n}\nwebpackAsyncContext.keys = function webpackAsyncContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackAsyncContext.id = 334;\nmodule.exports = webpackAsyncContext;","import { AnyAction } from \"redux\";\n\nexport interface ActionWithPayload extends AnyAction {\n payload: T\n};\n\nexport interface ActionWithError extends AnyAction {\n error: T\n description: string;\n context?: any;\n}\n\nexport type ActionWithPayloadCreator = (x: T) => ActionWithPayload;\nexport type ActionWithErrorCreator = (x: T, context?: any) => ActionWithError\n\nexport interface WithNotification {\n notification: Notification;\n}\n\nexport interface Notification {\n severity: Severity;\n message: string;\n}\n\nexport enum Severity {\n Success = \"success\",\n Error = \"error\",\n Warning = \"warning\",\n Info = \"info\",\n}\n\nexport interface Action2 extends AnyAction {\n type: TType;\n}\n\nexport interface ActionWithPayload2 extends Action2 {\n payload: TPayload;\n}\n\nexport interface ActionWithError2 extends Action2 {\n error: string;\n description: string;\n context?: any;\n}\n\nexport type ActionCreator2 = () => TAction;\nexport type ActionWithPayloadCreator2 = (payload: TAction[\"payload\"]) => TAction;\nexport type ActionWithErrorCreator2 = (error: string, context?: any) => TAction;\n\n\n","export const LOAD_OPEN_LEAGUES = \"LOAD_OPEN_LEAGUES\";\nexport const LOAD_OPEN_LEAGUES_SUCCESS = \"LOAD_OPEN_LEAGUES_SUCCESS\";\nexport const LOAD_OPEN_LEAGUES_FAILED = \"LOAD_OPEN_LEAGUES_FAILED\";\n\nexport const LOAD_MY_LEAGUES = \"LOAD_MY_LEAGUES\";\nexport const LOAD_MY_LEAGUES_SUCCESS = \"LOAD_MY_LEAGUES_SUCCESS\";\nexport const LOAD_MY_LEAGUES_FAILED = \"LOAD_MY_LEAGUES_FAILED\";\n\nexport const ASSIGN_PLAYER_TO_LEAGUE = \"ASSIGN_PLAYER_TO_LEAGUE\";\nexport const ASSIGN_PLAYER_TO_LEAGUE_SUCCESS = \"ASSIGN_PLAYER_TO_LEAGUE_SUCCESS\";\nexport const ASSIGN_PLAYER_TO_LEAGUE_FAILED = \"ASSIGN_PLAYER_TO_LEAGUE_FAILED\";\n\nexport const LOAD_LEAGUE_DETAILS = \"LOAD_LEAGUE_DETAILS\";\nexport const LOAD_LEAGUE_DETAILS_SUCCESS = \"LOAD_LEAGUE_DETAILS_SUCCESS\";\nexport const LOAD_LEAGUE_DETAILS_FAILED = \"LOAD_LEAGUE_DETAILS_FAILED\";\n\nexport const LOAD_MY_PRIVATE_LEAGUES = \"LOAD_MY_PRIVATE_LEAGUES\";\nexport const LOAD_MY_PRIVATE_LEAGUES_SUCCESS = \"LOAD_MY_PRIVATE_LEAGUES_SUCCESS\";\nexport const LOAD_MY_PRIVATE_LEAGUES_FAILED = \"LOAD_MY_PRIVATE_LEAGUES_FAILED\";\n\nexport const SHOW_ADDITIONAL_DATA_DIALOG = \"SHOW_ADDITIONAL_DATA_DIALOG\";\nexport const ADDITIONAL_DATA_ACQUIRED = \"ADDITIONAL_DATA_ACQUIRED\";\nexport const SHOW_PRICING_DATA_DIALOG = \"SHOW_PRICING_DATA_DIALOG\";\nexport const PRICING_ACCEPTED = \"PRICING_ACCEPTED\";\n\nexport const LOAD_MY_LEAGUES_WITH_PAYMENT = \"LOAD_MY_LEAGUES_WITH_PAYMENT\";\nexport const LOAD_MY_LEAGUES_WITH_PAYMENT_SUCCESS = \"LOAD_MY_LEAGUES_WITH_PAYMENT_SUCCESS\";\nexport const LOAD_MY_LEAGUES_WITH_PAYMENT_FAILED = \"LOAD_MY_LEAGUES_WITH_PAYMENT_FAILED\";\n\nexport const LOAD_OPPONENTS_PLAYED_WITH = \"LOAD_OPPONENTS_PLAYED_WITH\";\nexport const LOAD_OPPONENTS_PLAYED_WITH_SUCCESS = \"LOAD_OPPONENTS_PLAYED_WITH_SUCCESS\";\nexport const LOAD_OPPONENTS_PLAYED_WITH_FAILED = \"LOAD_OPPONENTS_PLAYED_WITH_FAILED\";","import { LOAD_OPEN_LEAGUES, LOAD_OPEN_LEAGUES_FAILED, LOAD_OPEN_LEAGUES_SUCCESS, LOAD_MY_LEAGUES, LOAD_MY_LEAGUES_FAILED, LOAD_MY_LEAGUES_SUCCESS, ASSIGN_PLAYER_TO_LEAGUE, ASSIGN_PLAYER_TO_LEAGUE_SUCCESS, ASSIGN_PLAYER_TO_LEAGUE_FAILED, LOAD_LEAGUE_DETAILS, LOAD_LEAGUE_DETAILS_SUCCESS, LOAD_LEAGUE_DETAILS_FAILED, LOAD_MY_PRIVATE_LEAGUES, LOAD_MY_PRIVATE_LEAGUES_SUCCESS, LOAD_MY_PRIVATE_LEAGUES_FAILED, SHOW_ADDITIONAL_DATA_DIALOG, ADDITIONAL_DATA_ACQUIRED, PRICING_ACCEPTED, SHOW_PRICING_DATA_DIALOG, LOAD_MY_LEAGUES_WITH_PAYMENT, LOAD_MY_LEAGUES_WITH_PAYMENT_SUCCESS, LOAD_MY_LEAGUES_WITH_PAYMENT_FAILED, LOAD_OPPONENTS_PLAYED_WITH, LOAD_OPPONENTS_PLAYED_WITH_SUCCESS, LOAD_OPPONENTS_PLAYED_WITH_FAILED } from './actionTypes';\nimport { ActionCreator, Action } from 'redux';\nimport { ActionWithPayloadCreator, ActionWithErrorCreator, ActionWithError, ActionWithPayload, WithNotification, Severity } from '../../framework/action';\nimport { LeagueHeader, AssignPlayerToLeagueRequest, League, LeagueWithPaymentStatus } from './models';\n\nexport const loadOpenLeagues: ActionWithPayloadCreator = (year?: string) => ({ type: LOAD_OPEN_LEAGUES, payload: year});\nexport const loadOpenLeaguesFailed: ActionWithErrorCreator = (error: string) => ({ type: LOAD_OPEN_LEAGUES_FAILED, error, description: \"Nie udało się załadować lig! Spróbuj przeładować stronę, a na pewno się powiedzie.\" });\nexport const loadOpenLeaguesSuccess: ActionWithPayloadCreator = (leagues: LeagueHeader[]) => ({ type: LOAD_OPEN_LEAGUES_SUCCESS, payload: leagues });\n\nexport const loadMyLeagues: ActionCreator = (token: string) => ({ type: LOAD_MY_LEAGUES, payload: token });\nexport const loadMyLeaguesFailed: ActionWithErrorCreator = (error) => ({ type: LOAD_MY_LEAGUES_FAILED, error, description: \"Nie udało się załadować Twoich lig! Najprawdopodobniej jesteś w stanie przeglądać ligii, ale spróbuj przeładować stronę i zaloguj się ponownie.\" });\nexport const loadMyLeaguesSuccess: ActionWithPayloadCreator = (leagueIds) => ({ type: LOAD_MY_LEAGUES_SUCCESS, payload: leagueIds });\n\nexport const assignPlayerToLeague: ActionWithPayloadCreator = ({player, league, token}) => (\n { \n type: ASSIGN_PLAYER_TO_LEAGUE, \n payload: {\n player,\n league,\n token\n }\n });\n\nexport const assignPlayerToLeagueFailed: ActionWithErrorCreator = (error) => ({ type: ASSIGN_PLAYER_TO_LEAGUE_FAILED, error, description: \"Nie udało nam się przypisać Cię do ligi. Spróbuj ponownie.\" });\nexport const assignPlayerToLeagueSuccess: ActionCreator = () => ({ type: ASSIGN_PLAYER_TO_LEAGUE_SUCCESS, notification: { severity: Severity.Success, message: 'Gratulacje! Zostałeś zapisany do ligii!' } });\n\nexport const loadLeagueDetails: ActionCreator = ({ year, id }) => ({ type: LOAD_LEAGUE_DETAILS, payload: { year, id } });\nexport const loadLeagueDetailsFailed: ActionWithErrorCreator = (error) => ({ type: LOAD_LEAGUE_DETAILS_FAILED, error, description: \"Nie udało się załadować informacji szczegółowych o lidze! Spróbuj przeładować stronę, a pewnie się powiedzie.\" })\nexport const loadLeagueDetailsSuccess: ActionWithPayloadCreator = (payload: League) => ({ type: LOAD_LEAGUE_DETAILS_SUCCESS, payload });\n\nexport const loadMyPrivateLeagues: ActionWithPayloadCreator = (token: string) => ({ type: LOAD_MY_PRIVATE_LEAGUES, payload: token });\nexport const loadMyPrivateLeaguesFailed: ActionWithErrorCreator = (error) => ({ type: LOAD_MY_PRIVATE_LEAGUES_FAILED, error, description: \"Nie udało się załadować lig prywatnych, w których jesteś zawodnikiem. Spróbuj przeładować stronę.\" });\nexport const loadMyPrivateLeaguesSuccess: ActionWithPayloadCreator = (leagues: LeagueHeader[]) => ({ type: LOAD_MY_PRIVATE_LEAGUES_SUCCESS, payload: leagues });\n\nexport const showAdditionalDataDialog: ActionCreator = () => ({ type: SHOW_ADDITIONAL_DATA_DIALOG });\nexport const additionalDataAcquired: ActionWithPayloadCreator<{ tocApproved: boolean, promoCode: string, referral: string, secondaryPlayerName?: string, secondaryPlayerSurname?: string }> = ({ tocApproved, promoCode, referral, secondaryPlayerName, secondaryPlayerSurname }) => ({ type: ADDITIONAL_DATA_ACQUIRED, payload: { promoCode, tocApproved, referral, secondaryPlayerName, secondaryPlayerSurname } });\nexport const showPricingDataDialog: ActionWithPayloadCreator = (promoCode: string) => ({ type: SHOW_PRICING_DATA_DIALOG, payload: promoCode });\nexport const pricingAccepted: ActionWithPayloadCreator = (accepted: boolean) => ({ type: PRICING_ACCEPTED, payload: accepted });\n\nexport const loadMyLeaguesWithPayment : ActionWithPayloadCreator<{ token: string, year?: string }> = (payload) => ({ type: LOAD_MY_LEAGUES_WITH_PAYMENT, payload });\nexport const loadMyLeaguesWithPaymentFailed: ActionWithErrorCreator = (error) => ({ type: LOAD_MY_LEAGUES_WITH_PAYMENT_FAILED, error, description: 'Nie udało nam się załadować płatności za Twoje ligii.' });\nexport const loadMyLeaguesWithPaymentSuccess: ActionWithPayloadCreator = (payload) => ({ type: LOAD_MY_LEAGUES_WITH_PAYMENT_SUCCESS, payload });\n\nexport const loadOpponentsPlayedWith : ActionWithPayloadCreator<{ token: string, year: string, id: string}> = (payload) => ({ type: LOAD_OPPONENTS_PLAYED_WITH, payload });\nexport const loadOpponentsPlayedWithFailed: ActionWithErrorCreator = (error) => ({ type: LOAD_OPPONENTS_PLAYED_WITH_FAILED, error, description: 'Błąd ładowania danych ligii' });\nexport const loadOpponentsPlayedWithSuccess: ActionWithPayloadCreator = (payload) => ({ type: LOAD_OPPONENTS_PLAYED_WITH_SUCCESS, payload });\n\nexport interface LoadOpenLeagues extends ActionWithPayload {\n type: typeof LOAD_OPEN_LEAGUES\n}\n\nexport interface LoadOpenLeaguesFailed extends ActionWithError {\n type: typeof LOAD_OPEN_LEAGUES_FAILED\n}\n\nexport interface LoadOpenLeaguesSuccess extends ActionWithPayload {\n type: typeof LOAD_OPEN_LEAGUES_SUCCESS\n}\n\nexport interface LoadMyLeagues extends ActionWithPayload {\n type: typeof LOAD_MY_LEAGUES\n}\n\nexport interface LoadMyLeaguesFailed extends ActionWithError {\n type: typeof LOAD_MY_LEAGUES_FAILED;\n}\n\nexport interface LoadMyLeaguesSuccess extends ActionWithPayload {\n type: typeof LOAD_MY_LEAGUES_SUCCESS;\n}\n\nexport interface AssignPlayerToLeague extends ActionWithPayload {\n type: typeof ASSIGN_PLAYER_TO_LEAGUE;\n}\n\nexport interface AssignPlayerToLeagueSuccess extends Action, WithNotification {\n type: typeof ASSIGN_PLAYER_TO_LEAGUE_SUCCESS;\n}\n\nexport interface AssignPlayerToLeagueFailed extends ActionWithError {\n type: typeof ASSIGN_PLAYER_TO_LEAGUE_FAILED;\n}\n\nexport interface LeagueApiDescriptor {\n year: string;\n id: string;\n}\n\nexport interface LoadLeagueDetails extends ActionWithPayload {\n type: typeof LOAD_LEAGUE_DETAILS;\n}\n\nexport interface LoadLeagueDetailsSuccess extends ActionWithPayload {\n type: typeof LOAD_LEAGUE_DETAILS_SUCCESS;\n}\n\nexport interface LoadLeagueDetailsFailed extends ActionWithError {\n type: typeof LOAD_LEAGUE_DETAILS_FAILED;\n}\n\nexport interface LoadMyPrivateLeagues extends ActionWithPayload {\n type: typeof LOAD_MY_PRIVATE_LEAGUES;\n}\n\nexport interface LoadMyPrivateLeaguesSuccess extends ActionWithPayload {\n type: typeof LOAD_MY_PRIVATE_LEAGUES_SUCCESS;\n}\n\nexport interface LoadMyPrivateLeaguesFailed extends ActionWithError {\n type: typeof LOAD_MY_PRIVATE_LEAGUES_FAILED;\n}\n\nexport interface ShowAdditionalDataDialog extends Action {\n type: typeof SHOW_ADDITIONAL_DATA_DIALOG;\n}\n\nexport interface AdditionalDataAcquired extends ActionWithPayload<{ tocApproved: boolean, promoCode: string, referral: string }> {\n type: typeof ADDITIONAL_DATA_ACQUIRED;\n}\n\nexport interface ShowPricingDataDialog extends ActionWithPayload {\n type: typeof SHOW_PRICING_DATA_DIALOG;\n}\n\nexport interface PricingAccepted extends ActionWithPayload {\n type: typeof PRICING_ACCEPTED;\n}\n\nexport interface LoadMyLeaguesWithPayment extends ActionWithPayload<{ token: string, year?: string }> {\n type: typeof LOAD_MY_LEAGUES_WITH_PAYMENT;\n}\n\nexport interface LoadMyLeaguesWithPaymentSuccess extends ActionWithPayload {\n type: typeof LOAD_MY_LEAGUES_WITH_PAYMENT_SUCCESS;\n}\n\nexport interface LoadMyLeaguesWithPaymentFailed extends ActionWithError {\n type: typeof LOAD_MY_LEAGUES_WITH_PAYMENT_FAILED;\n}\n\nexport interface LoadOpponentsPlayedWith extends ActionWithPayload<{ token: string, year: string, id: string }> {\n type: typeof LOAD_OPPONENTS_PLAYED_WITH;\n}\n\nexport interface LoadOpponentsPlayedWithSuccess extends ActionWithPayload {\n type: typeof LOAD_OPPONENTS_PLAYED_WITH_SUCCESS;\n}\n\nexport interface LoadOpponentsPlayerWithFailed extends ActionWithError {\n type: typeof LOAD_OPPONENTS_PLAYED_WITH_FAILED;\n}\n\nexport type Actions =\n | LoadOpenLeagues\n | LoadOpenLeaguesFailed\n | LoadOpenLeaguesSuccess\n | LoadMyLeagues\n | LoadMyLeaguesFailed\n | LoadMyLeaguesSuccess\n | AssignPlayerToLeague\n | AssignPlayerToLeagueFailed\n | AssignPlayerToLeagueSuccess\n | LoadLeagueDetails\n | LoadLeagueDetailsFailed\n | LoadLeagueDetailsSuccess\n | LoadMyPrivateLeagues\n | LoadMyPrivateLeaguesFailed\n | LoadMyPrivateLeaguesSuccess\n | ShowAdditionalDataDialog\n | AdditionalDataAcquired\n | ShowPricingDataDialog\n | PricingAccepted\n | LoadMyLeaguesWithPayment\n | LoadMyLeaguesWithPaymentSuccess\n | LoadMyLeaguesWithPaymentFailed\n | LoadOpponentsPlayedWith\n | LoadOpponentsPlayedWithSuccess\n | LoadOpponentsPlayerWithFailed;","import { Player } from \"../players/models\";\n\nexport interface RegisterToLeague {\n league: { id: string, season: string, secondPlayerSurname: string, secondPlayerName: string, basePrice: number };\n city: string;\n}\n\nexport enum PlayerType {\n REGULAR,\n TRIAL\n}\n\nexport interface PriceInfo {\n\n basePrice: number;\n finalPrice: number;\n\n promoCodeDescription: string;\n promoCode: string;\n promoCodeOk: boolean;\n\n referralDescription: string;\n referral: string;\n referralOk: boolean;\n}\n\nexport interface RegistrationData {\n target: RegisterToLeague;\n playerType: PlayerType;\n playerData: Player;\n promoCode: string;\n referral: string;\n token: string;\n isUpgrading: boolean;\n}\n\nexport interface RegistrationStatus {\n\n isSuccess: boolean;\n paymentLink: string;\n errorMessage: string;\n}","export const LOAD_USER_PLAYER = \"LOAD_USERS_PLAYER\";\nexport const LOAD_USER_PLAYER_SUCCESS = \"LOAD_USER_PLAYER_SUCCESS\";\nexport const LOAD_USER_PLAYER_FAILED = \"LOAD_USER_PLAYER_FAILED\";\n\nexport const CREATE_PLAYER = \"CREATE_PLAYER\";\nexport const CREATE_PLAYER_SUCCESS = \"CREATE_PLAYER_SUCCESS\";\nexport const CREATE_PLAYER_FAILED = \"CREATE_PLAYER_FAILED\";\n\nexport const UPDATE_PLAYER = \"UPDATE_PLAYER\";\nexport const UPDATE_PLAYER_SUCCESS = \"UPDATE_PLAYER_SUCCESS\";\nexport const UPDATE_PLAYER_FAILED = \"UPDATE_PLAYER_FAILED\"\n\nexport const SAVE_PLAYER = \"SAVE_PLAYER\";\n\nexport const LOAD_ALL_PLAYERS = \"LOAD_ALL_PLAYERS\";\nexport const LOAD_ALL_PLAYERS_SUCCESS = \"LOAD_ALL_PLAYERS_SUCCESS\";","import { ActionCreator } from \"redux\";\nimport { LOAD_USER_PLAYER, LOAD_USER_PLAYER_FAILED, LOAD_USER_PLAYER_SUCCESS, CREATE_PLAYER, CREATE_PLAYER_FAILED, CREATE_PLAYER_SUCCESS, UPDATE_PLAYER, UPDATE_PLAYER_FAILED, UPDATE_PLAYER_SUCCESS, SAVE_PLAYER, LOAD_ALL_PLAYERS, LOAD_ALL_PLAYERS_SUCCESS } from \"./actionTypes\";\nimport { ActionWithError, ActionWithPayload, ActionWithErrorCreator, ActionWithPayloadCreator, WithNotification, Severity } from \"../../framework/action\";\nimport { Player } from \"./models\";\nimport { PlayerType } from \"../registration/model\";\n\nexport const loadUserPlayer: ActionCreator = (token) => ({ type: LOAD_USER_PLAYER, payload: token });\nexport const loadUserPlayerFailed: ActionWithErrorCreator = (error) => ({ type: LOAD_USER_PLAYER_FAILED, error, description: \"Nie udało nam się załadować Twoich danych. Spróbuj wylogować się i zalogować ponownie.\" });\nexport const loadUserPlayerSuccess: ActionWithPayloadCreator = (player) => ({ type: LOAD_USER_PLAYER_SUCCESS, payload: player });\n\nexport const createPlayer: ActionWithPayloadCreator = ({player, playerType, token}) => ({ type: CREATE_PLAYER, payload: { player, token, playerType } });\nexport const createPlayerFailed: ActionWithErrorCreator = (error) => ({ type: CREATE_PLAYER_FAILED, error, description: \"Nie udało nam się zapisać Twoich danych. Spróbuj wylogować się i zalogować ponownie.\" });\nexport const createPlayerSuccess: ActionWithPayloadCreator = (player) => ({ type: CREATE_PLAYER_SUCCESS, payload: player, notification: { severity: Severity.Success, message: 'Twój profil zawodnika został utworzony.' } });\n\nexport const updatePlayer: ActionWithPayloadCreator = ({player, playerType, token}) => ({ type: UPDATE_PLAYER, payload: { player, token, playerType } });\nexport const updatePlayerFailed: ActionWithErrorCreator = (error) => ({ type: UPDATE_PLAYER_FAILED, error, description: \"Nie udało nam się zapisać Twoich danych. Spróbuj wylogować się i zalogować ponownie.\" });\nexport const updatePlayerSuccess: ActionWithPayloadCreator = (player) => ({ type: UPDATE_PLAYER_SUCCESS, payload: player, notification: { severity: Severity.Success, message: 'Twoje dane zostały zapisane.' } });\n\nexport const savePlayer: ActionWithPayloadCreator = ({ player, token, playerType }) => ({ type: SAVE_PLAYER, payload: { token, player, playerType } });\n\nexport const loadAllPlayers: ActionWithPayloadCreator<{token: string}> = ({ token }) => ({ type: LOAD_ALL_PLAYERS, payload: { token } });\nexport const loadAllPlayersSuccess: ActionWithPayloadCreator = (players) => ({ type: LOAD_ALL_PLAYERS_SUCCESS, payload: players });\n\nexport interface LoadUserPlayer extends ActionWithPayload {\n type: typeof LOAD_USER_PLAYER;\n}\n\nexport interface LoadUserPlayerFailed extends ActionWithError {\n type: typeof LOAD_USER_PLAYER_FAILED;\n}\n\nexport interface LoadUserPlayerSuccess extends ActionWithPayload {\n type: typeof LOAD_USER_PLAYER_SUCCESS;\n}\n\nexport interface PlayerApiPayload {\n player: Player,\n playerType?: PlayerType,\n token: string,\n}\n\nexport interface CreatePlayer extends ActionWithPayload {\n type: typeof CREATE_PLAYER;\n}\n\nexport interface CreatePlayerFailed extends ActionWithError {\n type: typeof CREATE_PLAYER_FAILED;\n}\n\nexport interface CreatePlayerSucceess extends ActionWithPayload, WithNotification {\n type: typeof CREATE_PLAYER_SUCCESS;\n}\n\nexport interface UpdatePlayer extends ActionWithPayload {\n type: typeof UPDATE_PLAYER;\n}\n\nexport interface UpdatePlayerFailed extends ActionWithError {\n type: typeof UPDATE_PLAYER_FAILED;\n}\n\nexport interface UpdatePlayerSuccess extends ActionWithPayload, WithNotification {\n type: typeof UPDATE_PLAYER_SUCCESS;\n}\n\nexport interface SavePlayer extends ActionWithPayload {\n type: typeof SAVE_PLAYER;\n}\n\nexport interface LoadAllPlayers extends ActionWithPayload<{token: string}> {\n type: typeof LOAD_ALL_PLAYERS;\n}\n\nexport interface LoadAllPlayersSuccess extends ActionWithPayload {\n type: typeof LOAD_ALL_PLAYERS_SUCCESS;\n}\n\nexport type Actions =\n | LoadUserPlayer\n | LoadUserPlayerFailed\n | LoadUserPlayerSuccess\n | CreatePlayer\n | CreatePlayerFailed\n | CreatePlayerSucceess\n | UpdatePlayer\n | UpdatePlayerFailed\n | UpdatePlayerSuccess\n | SavePlayer\n | LoadAllPlayers\n | LoadAllPlayersSuccess;","import React from \"react\";\nimport { Player } from \"../../store/players/models\";\nimport { Club } from \"../../store/clubs/models\";\nimport { Grid, TextField, FormControl, InputLabel, Select, MenuItem, Divider, Link, Typography, IconButton, Tooltip, Checkbox } from \"@material-ui/core\";\nimport { KeyboardDatePicker } from \"@material-ui/pickers\";\nimport { Autocomplete } from \"@material-ui/lab\";\nimport FileCopyIcon from \"@material-ui/icons/FileCopy\";\nimport HelpIcon from \"@material-ui/icons/HelpOutline\";\nimport { MaterialUiPickersDate } from \"@material-ui/pickers/typings/date\";\nimport { isValid, format, parse } from \"date-fns\";\nimport { sortBy } from \"ramda\";\nimport { useAuth0 } from \"@auth0/auth0-react\";\nimport { PlayerType } from \"../../store/registration/model\";\n\ninterface ProfileEditorProps {\n player?: Player;\n clubs?: Club[];\n onPlayerChanged: (player: Player) => void;\n playerType: PlayerType;\n}\n\nconst ProfileEditor: React.FC = ({ player, clubs, onPlayerChanged, playerType }) => {\n\n const { user } = useAuth0();\n\n const safePlayer: Player = player || {\n level: \"N\",\n gender: \"N\",\n birthDate: format(new Date(), \"yyyy-MM-dd\"),\n email: user?.email,\n name: \"\",\n phoneNumber: \"\",\n surname: \"\",\n id: undefined,\n joined: undefined,\n disableMatchOfferNotifications: false\n };\n const [playerState, setPlayerState] = React.useState(safePlayer);\n\n const setStringField = (field: keyof Player) => (event: any) => {\n if (playerState) {\n const newPlayer = { ...playerState, [field]: event.target.value };\n setPlayerState(newPlayer);\n onPlayerChanged(newPlayer);\n } else {\n const newPlayer = { [field]: event.target.value };\n setPlayerState(newPlayer);\n onPlayerChanged(newPlayer);\n }\n\n };\n\n const setBooleanField = (field: keyof Player) => (event: any) => {\n if(playerState) {\n const newPlayer = {...playerState, [field]: event.target.checked};\n setPlayerState(newPlayer);\n onPlayerChanged(newPlayer);\n } else {\n const newPlayer = { [field]: event.target.checked };\n setPlayerState(newPlayer);\n onPlayerChanged(newPlayer);\n }\n }\n\n const setPhoneNumber = () => (event: any) => {\n \n const fieldValue: string = event.target.value;\n\n const phoneNumber = fieldValue ?? playerState.phoneNumber;\n\n if (playerState) {\n const newPlayer = { ...playerState, phoneNumber };\n setPlayerState(newPlayer);\n onPlayerChanged(newPlayer);\n } else {\n const newPlayer = { phoneNumber };\n setPlayerState(newPlayer);\n onPlayerChanged(newPlayer);\n }\n }\n\n const setDateField = (field: keyof Player) => (\n value: MaterialUiPickersDate\n ) => {\n if (playerState) {\n if (isValid(value)) {\n const newPlayer = {\n ...playerState,\n [field]: !!value ? format(value, \"yyyy-MM-dd\") : \"\",\n };\n setPlayerState(newPlayer);\n onPlayerChanged(newPlayer);\n }\n } else {\n if (isValid(value)) {\n const newPlayer = { [field]: !!value ? format(value, \"yyyy-MM-dd\") : \"\" };\n setPlayerState(newPlayer);\n onPlayerChanged(newPlayer);\n }\n }\n };\n\n const fromStringDate = (field: keyof Player) => {\n if (!playerState || !playerState[field]) {\n return new Date();\n } else {\n return parse(\n playerState[field]?.toString() || \"\",\n \"yyyy-MM-dd\",\n new Date()\n );\n }\n };\n\n const setPreferredClubs = (event: any, value: any[]) => {\n if (value.length <= 3) {\n const newPlayer = {\n ...playerState,\n preferredClubs: value.map((x) => {\n if (typeof x === \"string\") {\n return clubs?.find((y) => y.id === x)?.id;\n }\n return x.id;\n }),\n };\n setPlayerState(newPlayer);\n onPlayerChanged(newPlayer);\n }\n };\n\n const getOptionsLabel = (option: any) => {\n if (!option) {\n return \"\";\n }\n\n if (!!option.name) {\n return option.name;\n }\n\n if (typeof option === \"string\") {\n return clubs?.find((x) => x.id === option)?.name || \"\";\n }\n\n return \"\";\n };\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n Płeć\n \n Mężczyzna\n Kobieta\n Nie podaję\n \n \n \n \n \n Poziom NTRP\n \n 1.0\n 1.5\n 2.0\n 2.5\n 3.0\n 3.5\n 4.0\n 4.5\n 5.0\n 5.5\n 6.0\n 6.5\n 7.0\n Nie podaję\n \n \n \n \n \n }}\n >\n \n \n \n \n \n \n \n \n {\n playerType === PlayerType.REGULAR ? (\n x.address?.city || \"Kraków\", clubs || [])}\n getOptionLabel={getOptionsLabel}\n getOptionSelected={(o: Club, v: string) => o.id === v}\n groupBy={(o: Club) => o.address?.city || \"Kraków\"}\n filterSelectedOptions\n onChange={setPreferredClubs}\n style={{ width: \"100%\" }}\n renderInput={(params) => (\n \n )}\n >\n ) : (\n \n )\n }\n\n \n \n \n \n \n {\" \"}Zablokuj powiadomienia z giełdy meczów\n \n {player && player.id ? (\n <>\n \n \n \n \n \n \n \n \n \n \n ) : (\n <>\n )}\n\n \n \n Opis poziomów NTRP\n \n \n {player && player.id ? (\n \n \n Link do poleceń:{\" \"}\n \n {`https://liga.smarttennis.pl?referral=${player.referral}`}\n \n {\n await window.navigator.clipboard.writeText(`https://liga.smarttennis.pl?referral=${player.referral}`);\n }}>\n \n \n \n \n ) : (\n <>\n )}\n \n );\n}\n\nexport default ProfileEditor;","import { ApplicationInsights } from '@microsoft/applicationinsights-web'\n\nlet ai: ApplicationInsights|undefined;\n\nconst initialize = (key: string) => {\n const appInsights = new ApplicationInsights({\n config: {\n instrumentationKey: key,\n autoExceptionInstrumented: true,\n autoUnhandledPromiseInstrumented: true,\n\n }\n });\n appInsights.loadAppInsights();\n\n ai = appInsights;\n return ai;\n}\n\ntype LogProperties = { [key: string]: any }\n\nconst logError = (message: string, exception?: Error, properties?: LogProperties) => {\n ai?.trackException({ exception, properties });\n}\n\nconst logEvent = (name: string, properties?: LogProperties) => {\n ai?.trackEvent({ name, properties });\n}\n\nconst logPageView = (name: string, properties?: LogProperties) => {\n ai?.trackPageView({ name, properties });\n}\n\nexport default { initialize, logError, logEvent, logPageView };","import React from \"react\";\nimport { Player } from \"../../store/players/models\";\nimport {\n Dialog,\n DialogTitle,\n DialogActions,\n Button,\n} from \"@material-ui/core\";\nimport ReactGA from \"react-ga\";\nimport { Club } from \"../../store/clubs/models\";\n\nimport ProfileEditor from \"./ProfileEditor\";\nimport { PlayerType } from \"../../store/registration/model\";\n\nexport interface ProfileDialogProps {\n open: boolean;\n player?: Player;\n clubs?: Club[];\n onClosed: (x: boolean, p: Player | undefined) => void;\n}\n\nconst ProfileDialog: React.FC = ({\n open,\n onClosed,\n player,\n clubs,\n}) => {\n const handleClose = () => {\n onClosed(false, undefined);\n };\n\n React.useEffect(() => {\n if (open) {\n ReactGA.modalview(\"Profile dialog\");\n }\n }, [open]);\n\n const [playerState, setPlayerState] = React.useState(player);\n\n const handleSubmit = () => {\n if (\n playerState &&\n playerState.email &&\n playerState.birthDate &&\n playerState.name &&\n playerState.phoneNumber &&\n playerState.surname\n ) {\n onClosed(true, playerState);\n }\n };\n\n return (\n
\n \n Mój profil zawodnika\n
\n \n
\n \n \n handleSubmit()}\n variant=\"contained\"\n color=\"primary\"\n >\n Zapisz\n \n \n
\n
\n );\n};\n\nexport default ProfileDialog;\n","import { AppState } from \"../reducer\";\n\nexport const currentPlayer = (state: AppState) => state.player.me;","export const LOAD_CLUBS = \"LOAD_CLUBS\";\nexport const LOAD_CLUBS_SUCCESS = \"LOAD_CLUBS_SUCCESS\";\nexport const LOAD_CLUBS_FAILED = \"LOAD_CLUBS_FAILED\";","import { ActionWithPayload, ActionWithError, ActionWithPayloadCreator, ActionWithErrorCreator } from \"../../framework/action\";\nimport { LOAD_CLUBS, LOAD_CLUBS_SUCCESS, LOAD_CLUBS_FAILED } from \"./actionType\";\nimport { Club } from \"./models\";\nimport { Action, ActionCreator } from \"redux\";\n\nexport interface LoadClubs extends Action {\n type: typeof LOAD_CLUBS;\n}\n\nexport interface LoadClubsSuccess extends ActionWithPayload {\n type: typeof LOAD_CLUBS_SUCCESS;\n}\n\nexport interface LoadClubsFailed extends ActionWithError {\n type: typeof LOAD_CLUBS_FAILED;\n}\n\nexport const loadClubsInProvince: ActionCreator = () => ({ type: LOAD_CLUBS });\nexport const loadClubsInProvinceSuccess: ActionWithPayloadCreator = (clubs) => ({ type: LOAD_CLUBS_SUCCESS, payload: clubs });\nexport const loadClubsInProvinceFailed: ActionWithErrorCreator = (error) => ({ type: LOAD_CLUBS_FAILED, error, description: 'Nie udało nam się załadować klubów. Spróbuj ponownie!'});\n\nexport type Actions = \n | LoadClubs\n | LoadClubsFailed\n | LoadClubsSuccess;","import React from \"react\";\nimport { Button, Menu, MenuItem } from \"@material-ui/core\";\nimport AccountCircleIcon from '@material-ui/icons/AccountCircle';\nimport { Dispatch } from \"redux\";\nimport { loadMyLeagues, loadMyPrivateLeagues, loadMyLeaguesWithPayment } from \"../../store/leagues/actions\";\nimport { connect } from \"react-redux\";\nimport { loadUserPlayer, savePlayer } from \"../../store/players/actions\";\nimport { Player } from \"../../store/players/models\";\nimport ProfileDialog from \"../players/ProfileDialog\";\nimport { AppState } from \"../../store/reducer\";\nimport { currentPlayer } from \"../../store/players/selectors\";\nimport { Data } from \"../../framework/data\";\nimport logger from \"../../framework/logger\";\nimport { Link } from \"react-router-dom\";\nimport { Club } from \"../../store/clubs/models\";\nimport { loadClubsInProvince } from \"../../store/clubs/actions\";\nimport { useAuth0 } from \"@auth0/auth0-react\";\nimport { PlayerType } from \"../../store/registration/model\";\n\ninterface AccountMenuProps {\n loadMyLeagues: (token: string) => void;\n loadMe: (token: string) => void;\n savePlayer: (token: string, player: Player) => void;\n loadMyPrivateLeagues: (token: string) => void;\n loadMyLeaguesWithPayment: (token: string) => void;\n player: Data;\n clubs: Data;\n loadClubs: () => void;\n}\n\nconst AccountMenu: React.FC = ({ loadMyLeagues, loadMe, player, savePlayer, loadMyLeaguesWithPayment, clubs, loadClubs }) => {\n const { isAuthenticated, loginWithRedirect, logout, user, getAccessTokenSilently } = useAuth0();\n const [anchorEl, setAnchorEl] = React.useState(null);\n const [profileDialogOpen, setProfileDialogOpen] = React.useState(false);\n\n const handleClick = (event: React.MouseEvent) => {\n if(!!user)\n {\n setAnchorEl(event.currentTarget); \n } else {\n logger.logEvent(\"Login attempt\");\n\n loginWithRedirect({\n redirectUri: window.location.href, appState: {\n targetUrl: window.location.hash\n }\n });\n }\n };\n\n const handleClose = () => {\n setAnchorEl(null);\n };\n\n const handleProfileOpen = () => {\n setProfileDialogOpen(true);\n }\n\n const onProfileDialogClosed = async (success: boolean, player?: Player) => {\n setProfileDialogOpen(false);\n if(success && player) {\n logger.logEvent(`Player: ${player.email} attempted to save his profile`);\n const token = await getAccessTokenSilently();\n savePlayer(token, player);\n }\n }\n\n React.useEffect(() => {\n async function getToken() {\n if(isAuthenticated) {\n const token = await getAccessTokenSilently();\n loadMyLeagues(token);\n loadMe(token);\n loadMyLeaguesWithPayment(token);\n\n if(clubs.type === \"NOT_STARTED\") {\n loadClubs();\n }\n }\n }\n\n getToken();\n \n }, [isAuthenticated]);\n\n return (\n <>\n {\n player.type === \"LOADED\" && clubs.type === \"LOADED\" && ()\n }\n \n \n \n {isAuthenticated && player.type === \"LOADED\" && !!player.value?.id && (\n { handleClose(); handleProfileOpen() } }>Profil zawodnika\n )}\n {isAuthenticated && player.type === \"LOADED\" && player.value && (\n Moje płatności\n )}\n {isAuthenticated && (\n { handleClose(); logout({ returnTo: window.location.href }) } }>Wyloguj\n )}\n \n \n );\n};\n\nconst mapStateToProps = (state: AppState) => ({\n player: currentPlayer(state),\n clubs: state.clubs.clubs\n})\n\nconst mapDispatchToProps = (dispatch: Dispatch) => ({\n loadMyLeagues: (token: string) => dispatch(loadMyLeagues(token)),\n loadMe: (token: string) => dispatch(loadUserPlayer(token)),\n savePlayer: (token: string, player: Player) => dispatch(savePlayer({token, player })),\n loadMyPrivateLeagues: (token: string) => dispatch(loadMyPrivateLeagues(token)),\n loadMyLeaguesWithPayment: (token: string) => dispatch(loadMyLeaguesWithPayment({ token })),\n loadClubs: () => dispatch(loadClubsInProvince())\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(AccountMenu);","import React from \"react\";\nimport { Data } from \"../../framework/data\";\nimport { LeagueWithPaymentStatus } from \"../../store/leagues/models\";\nimport {\n IconButton,\n Badge,\n Popover,\n Typography,\n Paper,\n Link,\n} from \"@material-ui/core\";\nimport NotificationsActiveIcon from \"@material-ui/icons/NotificationsActive\";\nimport { connect } from \"react-redux\";\nimport { AppState } from \"../../store/reducer\";\n\ninterface NotifierProps {\n payments: Data;\n}\n\nconst Notifier: React.FC = ({ payments }) => {\n\n const [anchorEl, setAnchorEl] = React.useState(\n null\n );\n\n const handleClick = (event: React.MouseEvent) => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleClose = () => {\n setAnchorEl(null);\n };\n\n const open = Boolean(anchorEl);\n\n return payments.type === \"LOADED\" && payments.value.find(x => !x.isActive) ? (\n <>\n \n \n \n \n \n \n \n Sprawdź status swoich płatności i dokończ dołączanie do ligi:{\" \"}\n Moje płatności\n \n \n \n ) : (\n <>\n );\n};\n\nconst mapStateToProps = (state: AppState) => ({\n payments: state.leagues.leaguesWithPayments,\n});\n\nexport default connect(mapStateToProps)(Notifier);\n","import React from \"react\";\nimport AppBar from \"@material-ui/core/AppBar\";\nimport Toolbar from \"@material-ui/core/Toolbar\";\nimport AccountMenu from \"./AccountMenu\";\nimport { Grid } from \"@material-ui/core\";\nimport Notifier from \"./Notifier\";\n\nconst TopBar: React.FC = () => {\n return (\n \n \n window.location.assign(\"/\")} style={{ cursor: \"pointer\", width: \"initial\" }}>\n \n \n \n \n\n
\n \n \n
\n
\n );\n};\n\nexport default TopBar;\n","import React, { CSSProperties } from \"react\";\nimport { useTheme, useMediaQuery } from \"@material-ui/core\";\n\n\n\nconst items = [\n {img: \"main1.png\", posY: \"center\", posX: \"center\"},\n {img: \"main2.png\", posY: 0, posX: 0 },\n {img: \"main3.png\", posY: \"center\", posX: \"bottom\" },\n {img: \"main4.png\", posY: \"center\", posX: \"center\" }\n]\n\nconst getStyle = () => {\n\n const i = Math.floor(Math.random() * items.length);\n\n return {\n backgroundImage: `url(${items[i].img})`,\n backgroundColor: \"white\",\n height: \"400px\",\n backgroundSize: \"cover\",\n backgroundRepeat: \"no-repeat\",\n backgroundPositionY: items[i].posY,\n backgroundPositionX: items[i].posX,\n width: \"100%\",\n opacity: 0.4\n } as CSSProperties;\n\n}\n\nconst HeroImage: React.FC = () => {\n\n const theme = useTheme();\n const matches = useMediaQuery(theme.breakpoints.down('sm'));\n\n let style = getStyle();\n\n if(matches) {\n style = { ...style, height: \"200px\"}\n }\n\n return
;\n};\n\nexport default HeroImage;\n","import React, { Props } from \"react\";\nimport Tabs from \"@material-ui/core/Tabs\";\nimport Tab from \"@material-ui/core/Tab\";\nimport { Link, useLocation } from \"react-router-dom\";\nimport { Chip, Badge, BackdropProps, useTheme, useMediaQuery } from \"@material-ui/core\";\n\nexport interface NavBarLink {\n path: string;\n label: string;\n isExternal?: boolean;\n promote?: boolean;\n}\n\nexport interface NavBarProps extends Props {\n links: NavBarLink[];\n}\n\nconst NavBar: React.FC = ({ links }) => {\n\n const [selected, setSelected] = React.useState(0);\n\n const handleChange = (_: React.ChangeEvent<{}>, newValue: number) => {\n setSelected(newValue);\n };\n\nconst linkComponents = links.map(p => p.isExternal ? ( ()} target=\"_blank\" href={p.path} />) : ({p.label}{p.promote ? (<> ): <>}} component={Link} to={p.path} />));\n\n const location = useLocation();\n React.useEffect(() => {\n \n const selectedLink = links.find(l => l.path === location.pathname);\n const selectedLinkIdx = links.indexOf(selectedLink!);\n\n if(selectedLinkIdx !== selected && selectedLinkIdx !== -1) {\n setSelected(selectedLinkIdx);\n }\n }, [links, selected, location.pathname]);\n \n const theme = useTheme();\n const matches = useMediaQuery(theme.breakpoints.up('sm'));\n\n return (\n {linkComponents}\n );\n};\n\nexport default NavBar;","import React, { Props } from \"react\";\n\nimport { Card, useTheme, useMediaQuery } from \"@material-ui/core\";\nimport { Switch } from \"react-router-dom\";\n\nconst PageWrapper: React.FC = (props: Props) => {\n \n var theme = useTheme();\n const isSmall = useMediaQuery(theme.breakpoints.down('sm'));\n\n return (\n \n \n {props.children}\n \n \n \n);\n}\n\nexport default PageWrapper;","import { createMuiTheme } from '@material-ui/core/styles';\nimport { lightGreen, orange } from \"@material-ui/core/colors\";\nimport { plPL } from '@material-ui/core/locale';\nimport L from 'leaflet';\n\nconst theme = createMuiTheme({\n palette: {\n primary: lightGreen,\n secondary: orange\n },\n overrides: {\n MuiTabs: {\n indicator: {\n height: '4px'\n }\n }\n }\n }, plPL);\n\n delete (L.Icon.Default).prototype._getIconUrl;\n\n export default theme;","import { id } from \"date-fns/locale\";\n\ninterface _Data {\n type: 'LOADING' | 'LOADED' | 'FAILED' | 'NOT_STARTED'\n}\n\ninterface _DataNotStarted extends _Data {\n type: 'NOT_STARTED'\n}\n\ninterface _DataLoading extends _Data {\n type: 'LOADING'\n}\n\ninterface _DataFailed extends _Data {\n type: 'FAILED',\n error: T\n}\n\ninterface _DataLoaded extends _Data {\n type: 'LOADED',\n value: T\n}\n\nexport const LOADING: _DataLoading = { type: 'LOADING' };\nexport const NOT_STARTED: _DataNotStarted = { type: 'NOT_STARTED' };\nexport const fail: (x: T) => _DataFailed = (error: T) => ({ type: \"FAILED\", error });\nexport const dataOf: (x: T) => _DataLoaded = (value: T) => ({ type: \"LOADED\", value }) \n\nexport const isLoading = (d: _Data) => d.type === \"LOADING\";\nexport const isFailed = (d: _Data) => d.type === \"FAILED\";\nexport const isLoaded = (d: _Data) => d.type === \"LOADED\";\nexport const isNotStarted = (d: _Data) => d.type === \"NOT_STARTED\";\n\nexport const unwrap = (d: _Data) => {\n switch(d.type) {\n case \"LOADED\": {\n return (d as _DataLoaded).value;\n }\n default: {\n throw new Error('Data not loaded');\n }\n }\n}\n\nexport const unsafeUnwrap = (d: _Data) => {\n if(d.type === \"LOADED\") {\n return (d as _DataLoaded).value;\n } else {\n return undefined;\n }\n}\n\n\n\nexport const combineNotLoaded = (d1: Data, d2: Data) => {\n\n if(d1.type === \"FAILED\" && d2.type === \"FAILED\") return fail(`${d1.error} ${d2.error}`);\n\n if(d1.type === \"FAILED\") return d1;\n if(d2.type === \"FAILED\") return d2;\n\n if(d1.type === \"LOADING\") return d1;\n if(d2.type === \"LOADING\") return d2;\n\n return NOT_STARTED;\n}\n\nexport type Data = \n | _DataNotStarted\n | _DataLoading\n | _DataLoaded\n | _DataFailed;","import { createSelector } from 'reselect';\nimport { AppState } from '../reducer';\nimport { dataOf, LOADING, fail, NOT_STARTED } from '../../framework/data';\nimport { groupBy } from 'ramda';\nimport { LeaguePlayerCanIPlay } from './models';\n\nexport const openLeagues = (state : AppState) => state.leagues.items;\nexport const currentUsersAssignedLeagues = (state : AppState) => state.leagues.subscribedTo;\nexport const currentLeagueDetails = (state: AppState) => state.leagues.currentDetails;\nexport const myPrivateLeagues = (state: AppState) => state.leagues.privateLeagues;\nexport const opponentsPlayedWith = (state: AppState) => state.leagues.currentOpponents;\n\nexport const usersAssignedLeagues = createSelector(openLeagues, currentUsersAssignedLeagues, (leaguesData, currentUsersAssignedLeaguesData) => {\n\n if(leaguesData.type === \"LOADED\" && currentUsersAssignedLeaguesData.type === \"LOADED\") { \n return dataOf(leaguesData.value.map(l => ({...l, isCurrentUserAssigned: (currentUsersAssignedLeaguesData.value.indexOf(l.id) !== -1)})));\n } else if(leaguesData.type === \"LOADED\") {\n return dataOf(leaguesData.value.map(l => ({...l, isCurrentUserAssigned: false})));\n } else if(leaguesData.type === \"LOADING\" || currentUsersAssignedLeaguesData.type === \"LOADING\") {\n return LOADING;\n } else if(leaguesData.type === \"FAILED\") {\n return fail(leaguesData.error)\n } else if(currentUsersAssignedLeaguesData.type === \"FAILED\") {\n return fail(currentUsersAssignedLeaguesData.error)\n } else {\n return NOT_STARTED;\n }\n\n});\n\nexport const usersAssignedLeague = createSelector(currentLeagueDetails, currentUsersAssignedLeagues, (leagueData, currentUsersAssignedLeaguesData) => {\n\n if(leagueData.type === \"LOADED\" && currentUsersAssignedLeaguesData.type === \"LOADED\") {\n return dataOf({ ...leagueData.value, players:(leagueData.value.players.sort((x,y) => y.rank - x.rank) ), isCurrentUserAssigned: (currentUsersAssignedLeaguesData.value.indexOf(leagueData.value.id) !== -1) });\n } else if(leagueData.type === \"LOADED\") {\n return dataOf({ ...leagueData.value, isCurrentUserAssigned: false });\n } else if(leagueData.type === \"LOADING\" || currentUsersAssignedLeaguesData.type === \"LOADING\") {\n return LOADING;\n } else if(leagueData.type === \"FAILED\") {\n return fail(leagueData.error)\n } else if(currentUsersAssignedLeaguesData.type === \"FAILED\") {\n return fail(currentUsersAssignedLeaguesData.error)\n } else {\n return NOT_STARTED;\n }\n\n});\n\nexport const userAssignedLeagueWithPossibleMatches = createSelector(usersAssignedLeague, opponentsPlayedWith, (leagueData, opponentIds) => {\n\n if(leagueData.type === \"LOADED\" && opponentIds.type === \"LOADED\") {\n return dataOf({ ...leagueData.value, players: [...leagueData.value.players.map(p => ({ ...p, canIPlay: !opponentIds.value.includes(p.id) }))] });\n } else if(leagueData.type === \"LOADED\" && opponentIds.type === \"NOT_STARTED\") {\n return dataOf({ ...leagueData.value, players: [...leagueData.value.players.map(p => ({ ...p, canIPlay: false }))] });\n } else if(leagueData.type === \"LOADING\" || opponentIds.type === \"LOADING\") {\n return LOADING; \n } else if(leagueData.type === \"FAILED\") {\n return fail(leagueData.error);\n } else if(opponentIds.type === \"FAILED\") {\n return fail(opponentIds.error);\n } else {\n return NOT_STARTED;\n }\n\n});\n\nexport const myPrivateLeaguesWithUserAssigned = createSelector(myPrivateLeagues, (leagues) => {\n if(leagues.type === \"LOADED\") {\n return dataOf( leagues.value.map(l => ({ ...l, isCurrentUserAssigned: true })));\n } else if(leagues.type === \"LOADING\") {\n return LOADING;\n } else if(leagues.type === \"FAILED\") {\n return fail(leagues.error);\n } else {\n return NOT_STARTED;\n }\n})\n\nexport const openLeaguesByCity = createSelector(usersAssignedLeagues, (leaguesData) => {\n switch(leaguesData.type) {\n case \"LOADED\": {\n return dataOf(groupBy(l => l.city, leaguesData.value));\n }\n case \"FAILED\": {\n return fail(leaguesData.error)\n }\n case \"LOADING\": {\n return LOADING;\n }\n case \"NOT_STARTED\" : {\n return NOT_STARTED;\n }\n }\n \n});","import React from \"react\";\nimport { PriceBudget } from \"../../store/leagues/models\";\nimport { Typography } from \"@material-ui/core\";\nimport { sortBy, map } from \"ramda\";\nimport EmojiEventsIcon from '@material-ui/icons/EmojiEvents';\n\ninterface PricesListProps {\n prices: PriceBudget[]\n}\n\nconst PricesList: React.FC = ({ prices }) => {\n\n const toRender = map(p => ( { p.description } ), sortBy(x => x.sequenceNo, prices)) \n return (\n <>{toRender}\n );\n}\n\nexport default PricesList;","import React from \"react\";\nimport { format } from \"date-fns\";\n\nexport interface DateViewProps {\n value: Date;\n}\n\nconst DateView:React.FC = ({ value }) => ({format(value, 'yyyy-MM-dd')})\n\nexport default DateView;","import React from \"react\";\nimport { LeagueHeaderWithCurrentUserAssignment, LeagueStatus } from \"../../store/leagues/models\";\nimport {\n ExpansionPanel,\n ExpansionPanelSummary,\n Typography,\n ExpansionPanelDetails,\n Grid,\n Hidden,\n Button,\n Chip,\n useTheme,\n useMediaQuery\n} from \"@material-ui/core\";\nimport ExpandMoreIcon from \"@material-ui/icons/ExpandMore\";\nimport PersonIcon from '@material-ui/icons/Person';\nimport PeopleIcon from '@material-ui/icons/People';\nimport EventNoteIcon from '@material-ui/icons/EventNote';\nimport SportsTennisIcon from '@material-ui/icons/SportsTennis';\nimport TableChartIcon from '@material-ui/icons/TableChart';\nimport PricesList from \"./PricesList\";\nimport DateView from \"../../framework/components/DateView\";\nimport { Link } from \"react-router-dom\";\n\ninterface LeagueHeaderProps {\n league: LeagueHeaderWithCurrentUserAssignment;\n}\n\nconst LeagueHeader: React.FC = ({\n league\n}) => {\n\n const theme = useTheme();\n const isSmall = useMediaQuery(theme.breakpoints.down('sm'));\n\n return (\n \n }>\n \n \n \n {league.name}\n : }\n >\n \n \n \n \n \n {\n league.startDate < new Date() ? (\n <>Uczestnicy: {league.participantsCount}{\" \"}\n ) : (<>)\n }\n \n \n \n \n \n {league.isCurrentUserAssigned ? (\n \n \n Moje mecze\n \n ) : (<>)\n }\n {\n league.isCurrentUserAssigned && league.startDate < new Date() ? (\n \n ) : <>\n }\n \n \n\n \n \n \n \n \n \n Opis\n \n {league.description}\n \n \n \n Nagrody\n \n \n \n \n \n Finał\n \n \n \n \n \n \n \n Kluby\n \n \n {league.clubs.filter(x => !!x.logoUrl).map((c) => (\n \n \n \n ))}\n \n \n \n \n \n );\n};\n\nexport default LeagueHeader;\n","import React from \"react\";\nimport { LeagueHeaderWithCurrentUserAssignment } from \"../../store/leagues/models\";\nimport LeagueHeaderComponent from \"./LeagueHeader\";\n\ninterface ILeaguestListProps {\n leagues: LeagueHeaderWithCurrentUserAssignment[];\n}\n\nconst LeaguesList: React.FC = ({ leagues }) => {\n return (<> {leagues.sort((l1, l2) => l1.sequenceNo - l2.sequenceNo).map(l => ())} )\n};\n\nexport default LeaguesList;","import React from \"react\";\nimport { LeagueHeaderWithCurrentUserAssignment } from \"../../store/leagues/models\";\nimport { Typography, Collapse, IconButton } from \"@material-ui/core\";\nimport ExploreIcon from '@material-ui/icons/Explore';\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\nimport ExpandLessIcon from '@material-ui/icons/ExpandLess';\nimport LeaguesList from \"./LeaguesList\";\n\ninterface LeagueCityGroupProps {\n city: string;\n leagues: LeagueHeaderWithCurrentUserAssignment[];\n}\n\nconst LeagueCityGroup : React.FC = ({ city, leagues }) => {\n\n \n\n const [isOpen, open] = React.useState();\n \n const season = leagues[0].year;\n\n React.useEffect(() => {\n\n try {\n const state = window.localStorage.getItem(`${season}---${city}`);\n if(state === 'open') {\n open(true);\n return;\n }\n\n if(window.location.hash.includes(`hint=${encodeURI(city)}`)) {\n open(true);\n }\n \n\n } catch(e) {\n console.error(e);\n }\n \n\n }, [city, season]);\n\n const setOpen = React.useCallback((o: boolean) => {\n\n open(o);\n\n try {\n\n if(!!o) {\n window.localStorage.setItem(`${season}---${city}`, 'open');\n } else {\n window.localStorage.setItem(`${season}---${city}`, 'closed');\n }\n \n } catch(e) {\n console.error(e);\n }\n \n }, [city, season]);\n\n return
{city} setOpen(!isOpen)}>{ isOpen ? : }
\n};\n\nexport default LeagueCityGroup;","import React from \"react\";\nimport { LeagueHeaderWithCurrentUserAssignment } from \"../../store/leagues/models\";\nimport { Data } from \"../../framework/data\";\nimport CircularProgress from \"@material-ui/core/CircularProgress\";\nimport LeagueCityGroup from \"./LeagueCityGroup\";\n\ninterface ILeagueGroupsProps {\n groups: Data<{[city:string]:LeagueHeaderWithCurrentUserAssignment[]}>\n}\n\nconst LeagueGroups: React.FC = ({ groups }) => {\n\n switch(groups.type) {\n case \"LOADED\": {\n\n const toRender = Object.entries(groups.value).map(([city, leagues]) => ());\n\n return (
{toRender}
)\n }\n case \"LOADING\": {\n return (
)\n }\n default: {\n return(
);\n } \n }\n}\n\nexport default LeagueGroups;","import React from \"react\";\nimport { AppState } from \"../../store/reducer\";\nimport { connect } from \"react-redux\";\nimport { Data } from \"../../framework/data\";\nimport { LeagueHeaderWithCurrentUserAssignment } from \"../../store/leagues/models\";\nimport { loadOpenLeagues } from \"../../store/leagues/actions\";\nimport { Dispatch } from \"redux\";\nimport { openLeaguesByCity } from \"../../store/leagues/selectors\";\nimport LeagueGroups from \"./LeagueGroups\";\nimport { Player } from \"../../store/players/models\";\nimport { currentPlayer } from \"../../store/players/selectors\";\nimport { getConfig } from \"../../config/configuration\";\nimport ToggleButton from \"@material-ui/lab/ToggleButton\";\nimport ToggleButtonGroup from \"@material-ui/lab/ToggleButtonGroup\";\nimport { Typography, Grid, Badge, Button, useTheme, useMediaQuery, Select, MenuItem, Link } from \"@material-ui/core\";\nimport DescriptionIcon from '@material-ui/icons/Description';\nimport { Alert, AlertTitle } from \"@material-ui/lab\";\nimport { withRouter, match } from \"react-router-dom\";\n\ninterface LeaguePageProps {\n match: match<{ year: string }>;\n leagues?: Data<{ [key: string]: LeagueHeaderWithCurrentUserAssignment[] }>;\n player?: Data;\n loadLeagues?: (year?: string) => void;\n}\n\nconst LeaguesPage: React.FC = ({\n match,\n leagues,\n loadLeagues,\n}) => {\n\n var theme = useTheme();\n const isSmall = useMediaQuery(theme.breakpoints.down('sm'));\n\n const [availableYears, setAvailableYears] = React.useState([]);\n const [defaultSeason, setDefaultSeason] = React.useState(\"2023-3\");\n\n const season = match.params.year;\n \n const setViewedYear = React.useCallback((year: string) => window.location.assign(`/#/leagues/${year}`), []);\n\n React.useEffect(() => {\n getConfig().then(({ seasons, defaultSeason }) => {\n setAvailableYears(seasons);\n setDefaultSeason(defaultSeason);\n });\n }, []);\n\n React.useEffect(() => {\n loadLeagues && loadLeagues(season);\n }, [season]);\n\n return (\n \n \n \n Sezon 2025/1\n Sezon 2025/1 wystartował w Krakowie 6 stycznia! Możesz dołączyć do ligi klikając na przycisk poniżej.\n \n \n \n \n \n\n \n \n Sezony:\n \n \n {\n isSmall ? (\n \n ) : (\n { setViewedYear(v) }}\n >\n {availableYears.map((y, i) => (\n \n {y.replace(\"-\", \"/\")}\n {\n i === 0 && y !== defaultSeason ? (<> ) : (<>)\n }\n \n ))}\n \n )\n }\n\n \n \n \n \n );\n};\n\nconst mapStateToProps = (state: AppState) => {\n return {\n leagues: openLeaguesByCity(state),\n player: currentPlayer(state)\n };\n};\n\nconst mapDispatchToProps = (dispatch: Dispatch) => {\n return {\n loadLeagues: (year?: string) => dispatch(loadOpenLeagues(year))\n }\n};\n\nexport default withRouter(connect(mapStateToProps, mapDispatchToProps)(LeaguesPage));\n","import { Data, LOADING, fail, dataOf, NOT_STARTED } from '../../framework/data';\nimport { LeagueHeader, League, PricingDialogState, LeagueWithPaymentStatus } from './models';\nimport { Actions } from './actions';\nimport { combineReducers } from 'redux';\n\nexport interface State {\n items: Data;\n subscribedTo: Data;\n currentDetails: Data;\n currentOpponents: Data;\n privateLeagues: Data;\n showAdditionalDataDialog: boolean;\n showPricingDataDialog: PricingDialogState;\n leaguesWithPayments: Data;\n};\n\nfunction reduceItems(state = NOT_STARTED, action: Actions) {\n switch(action.type) {\n case \"LOAD_OPEN_LEAGUES\": return LOADING;\n case \"LOAD_OPEN_LEAGUES_FAILED\": return fail(action.error);\n case \"LOAD_OPEN_LEAGUES_SUCCESS\": return dataOf(action.payload);\n default: return state;\n }\n};\n\nfunction reduceSubscribedTo(state = NOT_STARTED, action: Actions) {\n switch(action.type) {\n case \"LOAD_MY_LEAGUES\": return LOADING;\n case \"LOAD_MY_LEAGUES_FAILED\": return fail(action.error);\n case \"LOAD_MY_LEAGUES_SUCCESS\": return dataOf(action.payload);\n default: return state;\n }\n}\n\nfunction reduceMyLeaguePayments(state = NOT_STARTED, action: Actions) {\n switch(action.type) {\n case \"LOAD_MY_LEAGUES_WITH_PAYMENT_FAILED\": return fail(action.error);\n case \"LOAD_MY_LEAGUES_WITH_PAYMENT_SUCCESS\": return dataOf(action.payload);\n default: return state;\n }\n}\n\nfunction reduceCurrentDetails(state = NOT_STARTED, action: Actions) {\n switch(action.type) {\n case \"LOAD_LEAGUE_DETAILS\": return LOADING;\n case \"LOAD_LEAGUE_DETAILS_FAILED\": return fail(action.error);\n case \"LOAD_LEAGUE_DETAILS_SUCCESS\": return dataOf(action.payload);\n default: return state;\n }\n}\n\nfunction reducePrivateLeagues(state = NOT_STARTED, action: Actions) {\n switch(action.type) {\n case \"LOAD_MY_LEAGUES\": return LOADING;\n case \"LOAD_MY_PRIVATE_LEAGUES\": return fail(action.error);\n case \"LOAD_MY_PRIVATE_LEAGUES_SUCCESS\": return dataOf(action.payload);\n default: return state;\n }\n}\n\nfunction reduceShowAdditionalDataDialog(state = false, action: Actions) {\n switch(action.type) {\n case \"SHOW_ADDITIONAL_DATA_DIALOG\": return true;\n case \"ADDITIONAL_DATA_ACQUIRED\": return false;\n default: return state;\n }\n}\n\nconst initialState:PricingDialogState = { showDialog: false, promoCode: \"\" };\n\nfunction reduceShowPricingDataDialog(state = initialState, action: Actions):PricingDialogState {\n switch(action.type) {\n case \"SHOW_PRICING_DATA_DIALOG\": return { showDialog: true, promoCode: action.payload };\n case \"PRICING_ACCEPTED\": return initialState;\n default: return state;\n }\n}\n\nfunction reduceCurrentOpponents(state = NOT_STARTED, action: Actions) {\n switch(action.type) {\n case \"LOAD_OPPONENTS_PLAYED_WITH\": return LOADING;\n case \"LOAD_OPPONENTS_PLAYED_WITH_FAILED\": return fail(action.error);\n case \"LOAD_OPPONENTS_PLAYED_WITH_SUCCESS\": return dataOf(action.payload);\n default: return state;\n }\n}\n\nexport default combineReducers({ \n items: reduceItems, \n subscribedTo: reduceSubscribedTo, \n currentDetails: reduceCurrentDetails, \n privateLeagues: reducePrivateLeagues, \n showAdditionalDataDialog: reduceShowAdditionalDataDialog,\n showPricingDataDialog: reduceShowPricingDataDialog,\n leaguesWithPayments: reduceMyLeaguePayments,\n currentOpponents: reduceCurrentOpponents\n});","import { Player } from \"./models\";\nimport { Data, NOT_STARTED, LOADING, fail, dataOf } from \"../../framework/data\";\nimport { Actions } from \"./actions\";\nimport { combineReducers } from \"redux\";\n\nexport interface State {\n me: Data,\n all: Data\n}\n\nfunction reduceMe(state = NOT_STARTED, action: Actions) {\n switch(action.type) {\n case \"LOAD_USERS_PLAYER\": return LOADING;\n case \"LOAD_USER_PLAYER_FAILED\": return fail(action.error);\n case \"LOAD_USER_PLAYER_SUCCESS\": return dataOf(action.payload);\n case \"CREATE_PLAYER\": return LOADING;\n case \"CREATE_PLAYER_FAILED\": return fail(action.error);\n case \"CREATE_PLAYER_SUCCESS\": return dataOf(action.payload);\n case \"UPDATE_PLAYER_FAILED\": return fail(action.error);\n case \"UPDATE_PLAYER_SUCCESS\": return dataOf(action.payload);\n default: return state;\n }\n}\n\nfunction reduceAll(state = NOT_STARTED, action: Actions) {\n switch(action.type){\n case \"LOAD_ALL_PLAYERS\": return LOADING;\n case \"LOAD_ALL_PLAYERS_SUCCESS\": return dataOf(action.payload);\n default: return state;\n }\n}\n\nexport default combineReducers({ me: reduceMe, all: reduceAll });","export const CLEAR_CURRENT_ERROR = \"CLEAR_CURRENT_ERROR\";\nexport const CLEAR_NOTIFICATION = \"CLEAR_NOTIFICATION\";","import { ActionWithError, WithNotification, Notification } from \"../../framework/action\";\nimport { combineReducers, Action } from \"redux\";\nimport { CLEAR_CURRENT_ERROR, CLEAR_NOTIFICATION } from \"./actionTypes\";\n\nexport interface State {\n errorAction: ActionWithError;\n notification: Notification;\n}\n\nfunction reduceErrorAction(state = null, action: ActionWithError) {\n if(action.error) {\n return action;\n }\n if(action.type === CLEAR_CURRENT_ERROR) {\n return null;\n }\n return state;\n}\n\nfunction reduceNotification(state = null, action: WithNotification & Action) {\n if(action.notification) {\n return action.notification;\n }\n if(action.type === CLEAR_NOTIFICATION) {\n return null;\n }\n return state;\n\n}\n\nexport default combineReducers({ errorAction: reduceErrorAction, notification: reduceNotification });","import { Data, NOT_STARTED, LOADING, dataOf, fail } from \"../../framework/data\";\nimport { Club } from \"./models\";\nimport { Actions } from \"./actions\";\nimport { combineReducers } from \"redux\";\n\nexport interface State {\n clubs: Data;\n}\n\nfunction reduceClubs(state = NOT_STARTED, action: Actions) {\n switch(action.type) {\n case \"LOAD_CLUBS\": return LOADING;\n case \"LOAD_CLUBS_FAILED\": return fail(action.error);\n case \"LOAD_CLUBS_SUCCESS\": return dataOf(action.payload);\n default: return state;\n }\n}\n\nexport default combineReducers({ clubs: reduceClubs });","import { PlayerDescriptor, Clubs } from \"../leagues/models\";\n\nexport interface Match {\n date: Date;\n player: PlayerDescriptor;\n oponent: PlayerDescriptor;\n club: Clubs;\n isOponentRetired: boolean;\n result?: Set[];\n status?: MatchStatus;\n createdBy?: PlayerDescriptor;\n id?: string;\n description?:string;\n}\n\nexport enum MatchStatus {\n New = 0, \n Confirmed = 1, \n Cancelled = 2, \n Finished = 3,\n\n InProcess = 100,\n}\n\nexport interface Score {\n firstPlayer: number;\n secondPlayer: number;\n}\n\nexport interface Set extends Score {\n tieBreak?: Score;\n}\n\nexport interface MatchHeader {\n id: string;\n firstPlayer: PlayerDescriptor;\n secondPlayer: PlayerDescriptor;\n date: Date;\n club: Clubs;\n isOponentRetired: boolean;\n score?: Set[];\n status?: MatchStatus;\n createdBy?: PlayerDescriptor;\n league: string;\n description?:string;\n}\n\nexport interface PlayerMatch extends MatchHeader {\n playerId: string;\n isPlayerWinner: boolean;\n}","import { MatchHeader, MatchStatus } from \"./models\";\nimport { Data, NOT_STARTED, LOADING, dataOf } from \"../../framework/data\";\nimport { Actions } from \"./actions\";\nimport { combineReducers } from \"redux\";\n\nexport interface State {\n currentLeagueNewestMatches: Data;\n currentLeaguePlayersMatchesPage: Data;\n currentLeagueAllMatchesPage: Data;\n currentTournamentPlayersMatchesPage: Data;\n currentTournamentAllMatchesPage: Data;\n}\n\nfunction reduceCurrentLeagueNewestMatches(state = NOT_STARTED, action: Actions) {\n switch (action.type) {\n case \"GET_NEWEST_MATCHES\": return LOADING;\n case \"GET_NEWEST_MATCHES_FAILED\": return fail(action.error);\n case \"GET_NEWEST_MATCHES_SUCCESS\": return dataOf(action.payload);\n default: return state;\n }\n}\n\nfunction reduceCurrentLeaguePlayersMatchesPage(state: Data = NOT_STARTED, action: Actions) {\n switch (action.type) {\n case \"GET_PLAYERS_MATCHES\": return LOADING;\n case \"GET_PLAYERS_MATCHES_FAILED\": return fail(action.error);\n case \"GET_PLAYERS_MATCHES_SUCCESS\": return dataOf(action.payload);\n case \"SUBMIT_MATCH_RESULT\":\n case \"CANCEL_MATCH\":\n case \"CONFIRM_MATCH\": {\n var result = action.payload;\n\n if (state.type === \"LOADED\") {\n var matches = state.value;\n\n var idx = matches.findIndex(x => x.id === result.matchId);\n\n const ret = matches.slice(0);\n const toUpdate = ret[idx];\n ret[idx] = { ...toUpdate, status: MatchStatus.InProcess }\n\n return dataOf(ret);\n }\n\n return state;\n }\n default: return state;\n }\n}\n\nfunction reduceCurrentTournamentPlayersMatchesPage(state: Data = NOT_STARTED, action: Actions) {\n switch (action.type) {\n case \"GET_PLAYERS_TOURNAMENT_MATCHES\": return LOADING;\n case \"GET_PLAYERS_TOURNAMENT_MATCHES_FAILED\": return fail(action.error);\n case \"GET_PLAYERS_TOURNAMENT_MATCHES_SUCCESS\": return dataOf(action.payload);\n case \"SUBMIT_TOURNAMENT_MATCH_RESULT\":\n case \"CANCEL_TOURNAMENT_MATCH\":\n case \"CONFIRM_TOURNAMENT_MATCH\": {\n var result = action.payload;\n\n if (state.type === \"LOADED\") {\n var matches = state.value;\n\n var idx = matches.findIndex(x => x.id === result.matchId);\n\n const ret = matches.slice(0);\n const toUpdate = ret[idx];\n ret[idx] = { ...toUpdate, status: MatchStatus.InProcess }\n\n return dataOf(ret);\n }\n\n return state;\n }\n default: return state;\n }\n}\n\nfunction reduceCurrentLeagueAllMatchesPage(state = NOT_STARTED, action: Actions) {\n switch (action.type) {\n case \"GET_LEAGUES_MATCHES\": return LOADING;\n case \"GET_LEAGUES_MATCHES_SUCCESS\": return dataOf(action.payload);\n case \"GET_LEAGUES_MATCHES_FAILED\": return fail(action.error);\n default: return state;\n }\n}\n\nfunction reduceCurrentTournamentAllMatchesPage(state = NOT_STARTED, action: Actions) {\n switch (action.type) {\n case \"GET_TOURNAMENT_MATCHES\": return LOADING;\n case \"GET_TOURNAMENT_MATCHES_SUCCESS\": return dataOf(action.payload);\n case \"GET_TOURNAMENT_MATCHES_FAILED\": return fail(action.error);\n default: return state;\n }\n}\n\n\nexport default combineReducers({\n currentLeagueNewestMatches: reduceCurrentLeagueNewestMatches,\n currentLeaguePlayersMatchesPage: reduceCurrentLeaguePlayersMatchesPage,\n currentLeagueAllMatchesPage: reduceCurrentLeagueAllMatchesPage,\n currentTournamentPlayersMatchesPage: reduceCurrentTournamentPlayersMatchesPage,\n currentTournamentAllMatchesPage: reduceCurrentTournamentAllMatchesPage\n});","import { Data, NOT_STARTED, LOADING, fail, dataOf } from \"../../framework/data\";\nimport { PaymentInfo } from \"./models\";\nimport { Actions } from \"./actions\";\nimport { combineReducers } from \"redux\";\n\nexport interface State {\n payments: Data;\n}\n\nfunction reducePayments(state: Data = NOT_STARTED, action: Actions) {\n switch(action.type) {\n case \"GET_USER_PAYMENTS\": return state.type === \"LOADED\" ? state : LOADING;\n case \"GET_USER_PAYMENTS_FAILED\": return fail(action.error);\n case \"GET_USER_PAYMENTS_SUCCESS\": return dataOf(action.payload);\n default: return state;\n }\n}\n\nexport default combineReducers({\n payments: reducePayments\n})","export interface Product {\n id: string;\n name: string;\n price: number;\n smartPointsPrice: number;\n quantity: number;\n base64Image: string;\n additionalInfo: string;\n}\n\nexport interface ProductItem {\n id: string;\n name: string;\n smartPointsPrice: number;\n count: number;\n}\n\nexport interface Basket {\n products: ProductItem[];\n}\n\nexport interface Spot {\n id: string;\n name: string;\n address: string;\n city: string;\n}\n\nexport interface OrderSubmissionState {\n status: OrderSubmissionStatus;\n message: string;\n}\n\nexport enum OrderSubmissionStatus {\n NOT_STARTED, PENDING, FINISHED, FAILED\n}\n\nexport interface OrderResponse {\n id: string;\n orderDetails: OrderLine[];\n spotId: string;\n spotName: string;\n orderDate: string;\n finalPrice: number;\n status: OrderStatus;\n}\n\nexport interface Order {\n id: string;\n spotId: string;\n spotName: string;\n orderDate: Date;\n finalPrice: number;\n orderDetails: OrderLine[];\n status: OrderStatus;\n}\n\nexport interface OrderLine {\n id: string;\n name: string;\n quantity: number;\n}\n\nexport enum OrderStatus {\n PENDING, READY, FINISHED, CANCELLED\n}","import { Data, NOT_STARTED, LOADING, dataOf, fail } from \"../../framework/data\";\nimport { Product, Basket, ProductItem, Spot, OrderSubmissionState, OrderSubmissionStatus, Order } from \"./models\";\nimport { combineReducers } from \"redux\";\nimport { Actions } from \"./actionts\";\nimport { findIndex, update, remove } from \"ramda\";\n\nexport interface State {\n products: Data;\n basket: Basket;\n spots: Data;\n selectedSpot: Spot | null;\n submissionState: OrderSubmissionState;\n orders: Data;\n}\n\nfunction reduceProducts(state = NOT_STARTED, action: Actions) {\n switch (action.type) {\n case \"LOAD_PRODUCTS\": return LOADING;\n case \"LOAD_PRODUCTS_SUCCESS\": return dataOf(action.payload);\n case \"LOAD_PRODUCTS_FAILED\": return fail(action.error);\n default: return state;\n }\n}\n\nfunction reduceBasket(state: Basket = { products: [] }, action: Actions): Basket {\n switch (action.type) {\n case \"ADD_PRODUCT_TO_BASKET\": {\n const id = action.payload.id;\n if (!!state.products.find(x => x.id === id)) {\n const idx = findIndex(x => x.id === id)(state.products);\n return { products: update(idx, { ...state.products[idx], count: state.products[idx].count + 1 })(state.products) };\n } else {\n return { products: [...state.products, action.payload] };\n }\n }\n case \"REMOVE_PRODUCT_FROM_BASKET\": {\n const id = action.payload;\n\n if (!!state.products.find(x => x.id === id)) {\n const idx = findIndex(x => x.id === id)(state.products);\n if (state.products[idx].count > 1) {\n return { products: update(idx, { ...state.products[idx], count: state.products[idx].count - 1 })(state.products) };\n }\n\n return { products: remove(idx, 1, state.products) };\n }\n\n }\n default: return state;\n }\n}\n\nfunction reduceSpots(state = NOT_STARTED, action: Actions): Data {\n switch (action.type) {\n case \"LOAD_SPOTS\": {\n return LOADING;\n }\n case \"LOAD_SPOTS_FAILED\": {\n return fail(action.error);\n }\n case \"LOAD_SPOTS_SUCCESS\": {\n return dataOf(action.payload);\n }\n default: return state;\n }\n}\n\nfunction reduceSelectedSpot(state = null, action: Actions): Spot | null {\n switch (action.type) {\n case \"SET_SPOT\": {\n return action.payload;\n }\n default: return state;\n }\n}\n\nconst initialState: OrderSubmissionState = {\n status: OrderSubmissionStatus.NOT_STARTED, \n message: ''\n}\n\nfunction reduceSubmissionState(state = initialState, action: Actions): OrderSubmissionState {\n switch (action.type) {\n case \"CREATE_SHOPPING_ORDER\": {\n return { status: OrderSubmissionStatus.PENDING, message: \"Składamy Twoje zamówienie...\" }\n }\n case \"CREATE_SHOPPING_ORDER_SUCCESS\": {\n return { status: OrderSubmissionStatus.FINISHED, message: \"Twoje zamówienie zostało złożone. Za 10 sekund przeniesiemy Cię na stronę główną.\" }\n }\n case \"CREATE_SHOPPING_ORDER_FAILED\": {\n return { status: OrderSubmissionStatus.FAILED, message: action.description }\n }\n default: return state;\n }\n\n}\n\nfunction reduceOrders(state = NOT_STARTED, action: Actions): Data {\n switch(action.type) {\n case \"LOAD_MY_ORDERS\": {\n return LOADING;\n }\n case \"LOAD_MY_ORDERS_FAILED\": {\n return fail(action.error);\n }\n case \"LOAD_MY_ORDERS_SUCCESS\": {\n return dataOf(action.payload);\n }\n default: return state;\n }\n}\n\nexport default combineReducers({ \n products: reduceProducts, \n basket: reduceBasket, \n spots: reduceSpots, \n selectedSpot: reduceSelectedSpot, \n submissionState: reduceSubmissionState,\n orders: reduceOrders\n});","import { Data, dataOf, fail, LOADING, NOT_STARTED } from \"../../framework/data\";\nimport { Actions } from \"./actions\";\nimport { MatchHeader } from \"../matches/models\";\nimport { combineReducers } from \"redux\";\n\nexport interface State {\n myUnconfirmedMatches: Data;\n myConfirmedMatches: Data;\n}\n\nfunction reduceMyUnconfirmedMatches(state = NOT_STARTED, action: Actions): Data {\n switch(action.type) {\n case \"LOAD_MY_UNCONFIRMED_MATCHES\": return LOADING;\n case \"LOAD_MY_UNCONFIRMED_MATCHES_FAILED\": return fail(action.error);\n case \"LOAD_MY_UNCONFIRMED_MATCHES_SUCCESS\": return dataOf(action.payload);\n case \"CANCEL_MATCH\": return LOADING;\n case \"CONFIRM_MATCH\": return LOADING;\n default: return state;\n }\n}\n\nfunction reduceMyConfirmedMatches(state = NOT_STARTED, action: Actions): Data {\n switch(action.type) {\n case \"LOAD_MY_CONFIRMED_MATCHES\": return LOADING;\n case \"LOAD_MY_CONFIRMED_MATCHES_FAILED\": return fail(action.error);\n case \"LOAD_MY_CONFIRMED_MATCHES_SUCCESS\": return dataOf(action.payload);\n case \"CANCEL_MATCH\": return LOADING;\n case \"CONFIRM_MATCH\": return LOADING;\n case \"SUBMIT_MATCH_RESULT\": return LOADING;\n default: return state;\n }\n}\n\nexport default combineReducers({\n myUnconfirmedMatches: reduceMyUnconfirmedMatches,\n myConfirmedMatches: reduceMyConfirmedMatches\n});","import { Data, NOT_STARTED, LOADING, fail, dataOf } from \"../../framework/data\";\nimport { PlayerMatch } from \"../matches/models\";\nimport { Stat } from \"./model\";\nimport { Actions } from \"./actions\";\nimport { combineReducers } from \"redux\";\n\nexport interface State {\n matches: Data;\n stats: Data; \n}\n\nfunction reduceMatches(state = NOT_STARTED, action: Actions) {\n switch(action.type) {\n case \"LOAD_PLAYER_MATCHES\": return LOADING;\n case \"LOAD_PLAYER_MATCHES_FAILED\": return fail(action.error);\n case \"LOAD_PLAYER_MATCHES_SUCCESS\": return dataOf(action.payload);\n default: return state;\n }\n}\n\nfunction reduceStats(state = NOT_STARTED, action: Actions) {\n switch(action.type) {\n case \"LOAD_PLAYER_STATS\": return LOADING;\n case \"LOAD_PLAYER_STATS_FAILED\": return fail(action.error);\n case \"LOAD_PLAYER_STATS_SUCCESS\": return dataOf(action.payload);\n default: return state;\n }\n}\n\nexport default combineReducers({ matches: reduceMatches, stats: reduceStats });","import { Clubs, PlayerDescriptor } from \"../leagues/models\";\n\nexport interface CreateMatchOfferPayload {\n token: string;\n leagueYear: string;\n leagueId: string;\n clubIds: string[];\n startDate: Date;\n endDate: Date;\n startTime: string;\n endTime: string;\n description: string;\n}\n\nexport interface MatchOfferHeader {\n id: string;\n league: string;\n year: string;\n firstPlayer: PlayerDescriptor;\n clubs: Clubs[];\n startDate: Date;\n endDate: Date;\n startTime: string;\n endTime: string;\n description: string;\n createdOn: Date;\n isLoading?: boolean;\n}\n\nexport enum State {\n NOT_STARTED = \"NOT_STARTED\",\n EDITING = \"EDITING\",\n SUBMITTING = \"SUBMITTING\",\n SUBMITTED = \"SUBMITTED\",\n FAILED = \"FAILED\"\n}\n\ninterface _FS {\n state: State\n}\n\nexport interface _FormStateNotStarted extends _FS {\n state: typeof State.NOT_STARTED;\n}\n\nexport interface _FormStateEditing extends _FS {\n state: typeof State.EDITING;\n}\n\nexport interface _FormStateSubmitting extends _FS {\n state: typeof State.SUBMITTING;\n}\n\nexport interface _FormStateSubmitted extends _FS {\n state: typeof State.SUBMITTED;\n}\n\nexport interface _FormStateFailed extends _FS {\n state: typeof State.FAILED;\n error: string;\n errors: {\n [key : string]: string[]\n }\n}\n\nexport type FormState = \n | _FormStateNotStarted\n | _FormStateEditing\n | _FormStateSubmitting\n | _FormStateSubmitted\n | _FormStateFailed;\n\nexport const NOT_STARTED: _FormStateNotStarted = {\n state: State.NOT_STARTED\n};\n\nexport const EDITING: _FormStateEditing = {\n state: State.EDITING\n};\n\nexport const SUBMITTING: _FormStateSubmitting = {\n state: State.SUBMITTING\n};\n\nexport const SUBMITTED: _FormStateSubmitted = {\n state: State.SUBMITTED\n};\n\nexport const failed = (error: string, errors: _FormStateFailed[\"errors\"]): _FormStateFailed => ({\n state:State.FAILED,\n error, \n errors\n});\n\nexport const shouldKeepDialogOpen = (formState: FormState) => [ State.EDITING, State.FAILED, State.SUBMITTING ].includes(formState.state);","import { FormState, MatchOfferHeader, NOT_STARTED } from \"./models\";\nimport { Actions } from \"./actions\";\nimport { combineReducers } from \"redux\";\nimport { Data, dataOf, fail, LOADING, NOT_STARTED as LOADING_NOT_STARTED } from \"../../framework/data\";\nimport { map } from \"ramda\";\n\nexport interface State {\n formState: FormState;\n matchOffers: Data;\n}\n\nfunction reduceFormState(state: FormState = NOT_STARTED, action: Actions) {\n if(action.type === \"CHANGE_FORM_STATE\") {\n return action.payload;\n }\n return state;\n}\n\nfunction reduceMatchOffers(state: Data = LOADING_NOT_STARTED, action: Actions) {\n switch(action.type) {\n case \"GET_MATCH_OFFERS\": {\n return LOADING;\n }\n case \"GET_MATCH_OFFERS_FAILED\": {\n return fail(action.error);\n }\n case \"GET_MATCH_OFFERS_SUCCESS\": {\n return dataOf(action.payload);\n }\n case \"CANCEL_MATCH_OFFER\": {\n if(state.type === \"LOADED\") {\n return dataOf(map((x) => x.id === action.payload.id ? ({ ...x, isLoading: true }) : x, state.value));\n }\n return state;\n }\n default:\n return state;\n }\n}\n\nexport default combineReducers({\n formState: reduceFormState,\n matchOffers: reduceMatchOffers\n});","import { RegisterToLeague, PlayerType, PriceInfo } from \"./model\";\nimport { Actions } from \"./actions\";\nimport { Player } from \"../players/models\";\nimport { Data, NOT_STARTED, dataOf, LOADING, fail } from \"../../framework/data\";\nimport { RegisterToTournament } from \"../tournaments/models\";\nimport { RegisterToTraining } from \"../trainings/models\";\n\nexport interface State {\n leagueSelection: RegisterToLeague;\n tournamentSelection: RegisterToTournament;\n trainingSelection: RegisterToTraining;\n playerType: PlayerType;\n updatedPlayer?: Player;\n phoneVerified: boolean | undefined;\n isVerifying: boolean;\n priceInfo: Data;\n registrationMessage?: string;\n sendingPhoneAuthMessage: Data;\n isUpgrading: boolean;\n}\n\nconst DEFAULT_STATE: State = {\n leagueSelection: {\n city: '',\n league: {\n id: '',\n season: '',\n secondPlayerName: '',\n secondPlayerSurname: '',\n basePrice: 1\n }\n },\n tournamentSelection: {\n tournament: {\n id: '',\n season: '',\n },\n secondPlayerLastName: '',\n secondPlayerName: '',\n secondPlayerNeeded: false\n },\n trainingSelection: {\n training: {\n id: '',\n season: ''\n }\n },\n playerType: PlayerType.REGULAR,\n updatedPlayer: undefined,\n phoneVerified: undefined,\n isVerifying: false,\n priceInfo: NOT_STARTED,\n registrationMessage: undefined,\n sendingPhoneAuthMessage: NOT_STARTED,\n isUpgrading: false,\n};\n\nconst handlePlayerTypeBasedOnLeagueSelection = (leagueSelection: RegisterToLeague, currentPlayerType: PlayerType): PlayerType => {\n if(currentPlayerType === PlayerType.REGULAR && leagueSelection.city) {\n return PlayerType.TRIAL;\n }\n return currentPlayerType;\n}\n\nexport default function reducer(state: State = DEFAULT_STATE, action: Actions): State {\n switch(action.type) {\n case \"SET_LEAGUE_TO_REGISTER\": {\n return { ...state, leagueSelection: action.payload, playerType: handlePlayerTypeBasedOnLeagueSelection(action.payload, state.playerType) };\n }\n case \"SET_TOURNAMENT_TO_REGISTER\": {\n return { ...state, tournamentSelection: action.payload};\n }\n case \"SET_TRAINING_TO_REGISTER\": {\n return { ...state, trainingSelection: action.payload};\n }\n case \"SET_REGISTRATION_PLAYER_TYPE\": {\n return { ...state, playerType: action.payload };\n }\n case \"SET_UPDATED_PLAYER\": {\n return { ...state, updatedPlayer: action.payload };\n }\n case \"VERIFY_SMS_CODE\": {\n return { ...state, isVerifying: true };\n }\n case \"VERIFY_SMS_CODE_SUCCESS\": {\n return { ...state, phoneVerified: true, isVerifying: false };\n }\n case \"VERIFY_SMS_CODE_FAILED\": {\n return { ...state, phoneVerified: false, isVerifying: false }\n }\n case \"GET_PRICE_INFO_FOR_LEAGUE\": {\n return { ...state, priceInfo: LOADING }\n }\n case \"GET_PRICE_INFO_FOR_LEAGUE_FAILED\": {\n return { ...state, priceInfo: fail(action.description) }\n }\n case \"GET_PRICE_INFO_FOR_LEAGUE_SUCCESS\": {\n return { ...state, priceInfo: dataOf(action.payload) }\n }\n case \"SEND_REGISTRATION_MESSAGE\": {\n return { ...state, registrationMessage: action.payload }\n }\n case \"SEND_SMS_VERIFICATION_CODE_SUCCESS\": {\n return { ...state, sendingPhoneAuthMessage: dataOf(\"\") }\n }\n case \"SEND_SMS_VERIFICATION_CODE_FAILED\" : {\n return { ...state, sendingPhoneAuthMessage: dataOf(action.description) }\n }\n case \"SET_REGISTRATION_FOR_PLAYER_TYPE_UPGRADE\": {\n return {\n ...state, updatedPlayer: action.payload.player, leagueSelection: {\n league: {\n id: action.payload.leagueId,\n season: action.payload.leagueYear,\n secondPlayerName: '',\n secondPlayerSurname: '',\n basePrice: 1\n },\n city: ''\n },\n playerType: PlayerType.REGULAR,\n isUpgrading: true\n }\n }\n default: {\n return state;\n }\n }\n};","import { combineReducers } from \"redux\";\nimport { Data, dataOf, fail, LOADING, NOT_STARTED } from \"../../framework/data\";\nimport { Actions } from \"./actions\";\nimport { PlayerRank } from \"./model\";\n\nexport interface State {\n ranking: Data;\n}\n\nfunction reduceRanking(state = NOT_STARTED, action: Actions) {\n switch(action.type) {\n case \"LOAD_RANKING\": return LOADING;\n case \"LOAD_RANKING_FAILED\": return fail(action.error);\n case \"LOAD_RANKING_SUCCESS\": return dataOf(action.payload);\n default: return state;\n }\n}\n\nexport default combineReducers({\n ranking: reduceRanking\n});","import { combineReducers } from \"redux\";\nimport { Data, LOADING, NOT_STARTED, dataOf, fail } from \"../../framework/data\";\nimport { Actions } from \"./actions\";\nimport { TournamentHeader, TournamentDetails } from \"./models\";\n\nexport interface State {\n items: Data;\n details: Data\n}\n\nfunction reduceTournaments(state: Data = NOT_STARTED, action: Actions) {\n switch(action.type) {\n case \"LOAD_TOURNAMENTS\": return LOADING;\n case \"LOAD_TOURNAMENTS_FAILED\": return fail(action.error);\n case \"LOAD_TOURNAMENTS_SUCCESS\": return dataOf(action.payload.tournaments);\n default:\n return state;\n }\n}\n\nfunction reduceDetails(state: Data = NOT_STARTED, action: Actions) {\n switch(action.type) {\n case \"LOAD_TOURNAMENT_DETAILS\": return LOADING;\n case \"LOAD_TOURNAMENT_DETAILS_SUCCESS\": return dataOf(action.payload.tournament);\n case \"LOAD_TOURNAMENT_DETAILS_FAILED\": return fail(action.error);\n default:\n return state;\n }\n}\n\nexport default combineReducers({\n items: reduceTournaments,\n details: reduceDetails\n});\n","import { combineReducers } from \"redux\";\nimport { Data, LOADING, NOT_STARTED, dataOf, fail } from \"../../framework/data\";\nimport { Actions } from \"./actions\";\nimport { TrainingHeader, TrainingDetails } from \"./models\";\n\nexport interface State {\n items: Data;\n details: Data\n}\n\nfunction reduceTrainings(state: Data = NOT_STARTED, action: Actions) {\n switch(action.type) {\n case \"LOAD_TRAININGS\": return LOADING;\n case \"LOAD_TRAININGS_FAILED\": return fail(action.error);\n case \"LOAD_TRAININGS_SUCCESS\": return dataOf(action.payload.trainings);\n default:\n return state;\n }\n}\n\nfunction reduceDetails(state: Data = NOT_STARTED, action: Actions) {\n switch(action.type) {\n case \"LOAD_TRAINING_DETAILS\": return LOADING;\n case \"LOAD_TRAINING_DETAILS_SUCCESS\": return dataOf(action.payload.training);\n case \"LOAD_TRAINING_DETAILS_FAILED\": return fail(action.error);\n default:\n return state;\n }\n}\n\nexport default combineReducers({\n items: reduceTrainings,\n details: reduceDetails\n});\n","import { combineReducers } from 'redux';\nimport leagues, { State as LeaguesState } from './leagues/reducer';\nimport player, { State as PlayerState } from './players/reducer';\nimport shell, { State as ShellState } from './shell/reducer';\nimport clubs, { State as ClubsState } from './clubs/reducer'; \nimport matches, { State as MatchesState } from './matches/reducer';\nimport payments, { State as PaymentsState} from './payments/reducer';\nimport shop, { State as ShopState} from './shop/reducer';\nimport desktop, { State as DesktopState} from './desktop/reducer';\nimport stats, { State as StatsState } from './stats/reducer';\nimport matchOffers, { State as MatchOffersState } from './match-offers/reducer';\nimport registration, { State as RegistrationState } from './registration/reducer';\nimport elo, { State as EloState } from './elo/reducer';\nimport tournaments, { State as TournamentsState} from './tournaments/reducer';\nimport trainings, { State as TrainingsState } from './trainings/reducer';\n\nexport interface AppState {\n leagues: LeaguesState;\n player: PlayerState;\n shell: ShellState;\n matches: MatchesState;\n clubs: ClubsState;\n payments: PaymentsState;\n shop: ShopState;\n desktop: DesktopState;\n stats: StatsState;\n matchOffers: MatchOffersState;\n registration: RegistrationState;\n elo: EloState;\n tournaments: TournamentsState;\n trainings: TrainingsState;\n}\n\nexport default combineReducers({ leagues, player, shell, clubs, matches, payments, shop, desktop, stats, matchOffers, registration, elo, tournaments, trainings });\n\n","import { Action } from \"redux\"\n\nconst logger = (store:any) => (next:(a: Action) => any) => (action:Action) => {\n console.group(action.type)\n console.info('dispatching', action)\n let result = next(action)\n console.log('next state', store.getState())\n console.groupEnd()\n return result\n }\n\nexport default logger;","import { LeagueHeader, League, LeagueWithPaymentStatus } from \"./models\";\nimport { getConfig } from \"../../config/configuration\";\n\nexport async function loadOpenLeagues(year?: string): Promise {\n var config = await getConfig();\n if(!year) {\n year = config.defaultSeason;\n }\n\n const response = await fetch(`${config.apiUrl}/leagues/open/${year}`);\n\n const items = await response.json();\n\n return items.map((i:any) => ({ ...i, startDate: new Date(i.startDate), endDate: new Date(i.endDate) }));\n}\n\nexport async function loadLeagueDetailsApi(year: string, id: string): Promise {\n var config = await getConfig();\n\n const response = await fetch(`${config.apiUrl}/leagues/open/${year}/${id}`);\n const item: League = await response.json();\n\n\n\n return {...item, startDate: new Date(item.startDate), endDate: new Date(item.endDate), admins: ['auth0|5e05236d284d470eb90d9240']};\n}\n\nexport async function loadMyLeagues(token: string, year?: string): Promise {\n var config = await getConfig();\n if(!year) {\n year = config.defaultSeason;;\n }\n\n const response = await fetch(`${config.apiUrl}/players/me/leagues/${year}/ids`, { \n headers: {\n 'Authorization': `Bearer ${token}`\n },\n credentials: 'include'\n });\n\n const items = await response.json();\n\n return items;\n}\n\nexport async function loadMyLeaguesWithPaymentStatusApi(token: string, year?: string): Promise {\n var config = await getConfig();\n if(!year) {\n year = config.defaultSeason;\n }\n\n const response = await fetch(`${config.apiUrl}/players/me/leagues/${year}/payments`, { \n headers: {\n 'Authorization': `Bearer ${token}`\n },\n credentials: 'include'\n });\n\n if(response.ok) {\n return await response.json();\n }\n\n throw new Error(response.statusText);\n}\n\nexport async function assignPlayerToLeagueApi(token: string, league: LeagueHeader|League, referral: string, promoCode: string, secondaryPlayerName?: string, secondaryPlayerSurname?: string) {\n var config = await getConfig();\n\n await fetch(`${config.apiUrl}/leagues/open/${league.year}/${league.id}/players`, { \n headers: {\n 'Authorization': `Bearer ${token}`,\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n referral,\n promoCode,\n secondPlayerName: secondaryPlayerName,\n secondPlayerSurname: secondaryPlayerSurname\n }),\n credentials: 'include',\n method: 'POST'\n });\n}\n\nexport async function loadMyPrivateLeagues(token: string, year?: string) {\n const config = await getConfig();\n \n if(!year) {\n year = config.defaultSeason;;\n }\n\n const response = await fetch(`${config.apiUrl}/leagues/private/${year}/mine`, {\n headers: {\n 'Authorization': `Bearer ${token}`,\n },\n credentials: 'include'\n });\n\n const items = await response.json();\n\n return items.map((i:any) => ({ ...i, startDate: new Date(i.startDate), finals: new Date(i.finalsDate) }));\n}\n\nexport async function loadOpponentsPlayedWithApi(token: string, year: string, id: string) {\n const config = await getConfig();\n\n const response = await fetch(`${config.apiUrl}/leagues/open/${year}/${id}/matches/players-played`, {\n headers: {\n 'Authorization': `Bearer ${token}`,\n 'Content-Type': 'application/json',\n 'Accept': 'application/json'\n },\n credentials: 'include'\n });\n\n if(response.ok) {\n const data = await response.json();\n\n return data;\n } else {\n throw new Error(response.statusText);\n }\n}","import { getConfig } from \"../../config/configuration\";\nimport { PaymentNeeded, PaymentInfo } from \"./models\";\n\nexport async function createPaymentApi(leagueId: string, leagueYear: string, promoCode: string, token: string):Promise {\n var config = await getConfig();\n\n const url = `/payment/${leagueYear}/${leagueId}`;\n \n const response = await fetch(`${config.apiUrl}${url}`, {\n headers: {\n 'Authorization': `Bearer ${token}`,\n 'Content-Type': 'application/json',\n 'Accept': 'application/json'\n },\n credentials: 'include',\n method: 'POST',\n body: JSON.stringify({\n promoCode\n })\n });\n\n return await response.json();\n}\n\nexport async function getUsersPaymentsApi(token: string): Promise {\n var config = await getConfig();\n\n const url = `/players/me/payments`;\n \n const response = await fetch(`${config.apiUrl}${url}`, {\n headers: {\n 'Authorization': `Bearer ${token}`,\n 'Accept': 'application/json'\n },\n credentials: 'include',\n method: 'GET'\n });\n\n const data: PaymentInfo[] = await response.json();\n\n return data.map(d => ({ ...d, paymentDate: new Date(d.paymentDate) }));\n}\n\nexport async function redoUserPaymentApi(token: string, orderId: string): Promise {\n\n var config = await getConfig();\n\n const url = `/payment/${orderId}/copy`;\n\n const response = await fetch(`${config.apiUrl}${url}`, {\n headers: {\n 'Authorization': `Bearer ${token}`,\n 'Accept': 'application/json'\n },\n credentials: 'include',\n method: 'POST'\n });\n\n if(response.ok === false) {\n throw new Error(response.statusText);\n }\n\n return response.json();\n\n}","import { takeEvery, put, call, take, delay, all } from \"redux-saga/effects\";\nimport { LOAD_OPEN_LEAGUES, LOAD_MY_LEAGUES, ASSIGN_PLAYER_TO_LEAGUE, LOAD_LEAGUE_DETAILS, LOAD_MY_PRIVATE_LEAGUES, ADDITIONAL_DATA_ACQUIRED, PRICING_ACCEPTED, LOAD_MY_LEAGUES_WITH_PAYMENT, LOAD_OPPONENTS_PLAYED_WITH } from \"./actionTypes\";\nimport { loadLeagueDetails as loadLeagueDetailsAction, loadMyLeagues as loadMyLeaguesAction, loadOpenLeagues as loadOpenLeaguesAction, loadOpenLeaguesSuccess, loadOpenLeaguesFailed, loadMyLeaguesSuccess, loadMyLeaguesFailed, LoadMyLeagues, AssignPlayerToLeague, assignPlayerToLeagueSuccess, assignPlayerToLeagueFailed, LoadLeagueDetails, loadLeagueDetailsSuccess, loadLeagueDetailsFailed, loadMyPrivateLeaguesFailed, loadMyPrivateLeaguesSuccess, showAdditionalDataDialog, showPricingDataDialog, LoadMyLeaguesWithPayment, loadMyLeaguesWithPaymentSuccess, loadMyLeaguesWithPayment, LoadOpenLeagues, LoadOpponentsPlayedWith, loadOpponentsPlayedWithSuccess, loadOpponentsPlayedWithFailed } from \"./actions\";\nimport { loadOpenLeagues, loadMyLeagues, assignPlayerToLeagueApi, loadLeagueDetailsApi, loadMyPrivateLeagues, loadMyLeaguesWithPaymentStatusApi, loadOpponentsPlayedWithApi } from './api';\nimport { createPlayer, loadUserPlayer } from \"../players/actions\";\nimport { CREATE_PLAYER_SUCCESS } from \"../players/actionTypes\";\nimport { createPaymentApi } from \"../payments/api\";\nimport { PaymentNeeded } from \"../payments/models\";\nimport ReactGA from 'react-ga';\nimport { getConfig } from \"../../config/configuration\";\nimport { LeagueWithPaymentStatus } from \"./models\";\n\nfunction* loadLeagues({ payload }: LoadOpenLeagues) {\n try {\n const leaguesData = yield call(loadOpenLeagues, payload);\n yield put(loadOpenLeaguesSuccess(leaguesData));\n } catch(e) {\n yield put(loadOpenLeaguesFailed(e.message))\n }\n}\n\nfunction* loadMyLeaguesStep(a: LoadMyLeagues) {\n try {\n\n const token = a.payload;\n const config = yield call(getConfig);\n\n const callables = (config.seasons as string[]).map(x => call(loadMyLeagues, token, x));\n\n const data: string[][] = yield all(callables);\n\n const leaguesIds = data.reduce((prev, curr) => [...prev, ...curr], []);\n\n yield put(loadMyLeaguesSuccess(leaguesIds));\n } catch(e) {\n yield put(loadMyLeaguesFailed(e.message));\n }\n}\n\nfunction* assignPlayerToLeague(a: AssignPlayerToLeague) {\n try {\n\n yield put(showAdditionalDataDialog());\n const { payload } = yield take(ADDITIONAL_DATA_ACQUIRED);\n const { tocApproved, promoCode, referral, secondaryPlayerName, secondaryPlayerSurname } = payload;\n\n if(!tocApproved) {\n return;\n }\n\n ReactGA.event({ action: 'TOC approved', category: 'League' });\n\n yield put(showPricingDataDialog(promoCode));\n const pricingAccepted = yield take(PRICING_ACCEPTED);\n if(!pricingAccepted.payload)\n return;\n\n ReactGA.event({ action: 'Pricing accepted', category: 'League' });\n \n if(!a.payload.player.id) { // player is about to be created\n yield put(createPlayer({ player: a.payload.player, token: a.payload.token }));\n yield take(CREATE_PLAYER_SUCCESS);\n\n ReactGA.event({ action: 'Player created', category: 'League' });\n }\n\n yield call(assignPlayerToLeagueApi, a.payload.token, a.payload.league, referral, promoCode, secondaryPlayerName, secondaryPlayerSurname);\n const response:PaymentNeeded = yield call(createPaymentApi, a.payload.league.id, a.payload.league.year, promoCode, a.payload.token);\n if(response.paymentLink) {\n ReactGA.event({ action: 'Player assigned to league - redirect to payment', category: 'League' });\n window.localStorage.removeItem(\"referral\");\n window.location.assign(response.paymentLink);\n }\n yield put(assignPlayerToLeagueSuccess());\n yield put(loadOpenLeaguesAction(undefined));\n yield put(loadUserPlayer(a.payload.token));\n yield put(loadMyLeaguesAction(a.payload.token));\n yield put(loadLeagueDetailsAction({ id: a.payload.league.id, year: a.payload.league.year }));\n \n } catch(e) {\n yield put(assignPlayerToLeagueFailed(e.message));\n }\n}\n\nfunction* loadLeagueDetails({ payload }: LoadLeagueDetails) {\n try {\n\n const { year, id} = payload;\n const leagueData = yield call(loadLeagueDetailsApi, year, id);\n yield put(loadLeagueDetailsSuccess(leagueData));\n } catch(e) {\n yield put(loadLeagueDetailsFailed(e.message));\n }\n}\n\nfunction* loadMyPrivateLeaguesStep({ payload } : LoadMyLeagues) {\n try {\n const token = payload;\n const leaguesData = yield call(loadMyPrivateLeagues, token);\n yield put(loadMyPrivateLeaguesSuccess(leaguesData));\n } catch(e) {\n yield put(loadMyPrivateLeaguesFailed(e.message));\n }\n}\n\nfunction* loadMyLeaguesWithPaymentStep({ payload } : LoadMyLeaguesWithPayment) {\n try {\n const { token, year } = payload;\n\n if(!year) {\n const config = yield call(getConfig);\n\n const seasons = config.matchesSeasons as string[];\n\n let leagues: LeagueWithPaymentStatus[] = [];\n\n for(let i = 0; i < seasons.length; i++) {\n const season = seasons[i];\n\n const data: LeagueWithPaymentStatus[] = yield call(loadMyLeaguesWithPaymentStatusApi, token, season);\n\n leagues.push(...data);\n }\n\n yield put(loadMyLeaguesWithPaymentSuccess(leagues));\n } else {\n const data = yield call(loadMyLeaguesWithPaymentStatusApi, token, year);\n yield put(loadMyLeaguesWithPaymentSuccess(data));\n }\n\n yield delay(10000);\n yield put(loadMyLeaguesWithPayment(payload));\n } catch(e) {\n \n } \n}\n\nfunction* loadOpponentsPlayedWithStep({ payload }: LoadOpponentsPlayedWith) {\n try {\n const { token, year, id } = payload;\n\n const opponentsPlayedWith = yield call(loadOpponentsPlayedWithApi, token, year, id);\n\n yield put(loadOpponentsPlayedWithSuccess(opponentsPlayedWith));\n } catch(e) {\n yield put(loadOpponentsPlayedWithFailed(e.message));\n }\n}\n\nexport function* loadLeaguesSaga() {\n yield takeEvery(LOAD_OPEN_LEAGUES, loadLeagues);\n}\n\nexport function* loadMyLeaguesSaga() {\n yield takeEvery(LOAD_MY_LEAGUES, loadMyLeaguesStep);\n}\n\nexport function* assignPlayerToLeagueSaga() {\n yield takeEvery(ASSIGN_PLAYER_TO_LEAGUE, assignPlayerToLeague);\n}\n\nexport function* loadLeagueDetailsSaga() {\n yield takeEvery(LOAD_LEAGUE_DETAILS, loadLeagueDetails);\n}\n\nexport function* loadMyPrivateLeaguesSaga() {\n yield takeEvery(LOAD_MY_PRIVATE_LEAGUES, loadMyPrivateLeaguesStep);\n}\n\nexport function* loadMyLeaguesWithPaymentSaga() {\n yield takeEvery(LOAD_MY_LEAGUES_WITH_PAYMENT, loadMyLeaguesWithPaymentStep);\n}\n\nexport function* loadOpponentsPlayedWithSaga() {\n yield takeEvery(LOAD_OPPONENTS_PLAYED_WITH, loadOpponentsPlayedWithStep);\n}","import { getConfig } from \"../../config/configuration\";\nimport { Player } from \"./models\";\nimport { PlayerType } from \"../registration/model\";\n\nexport async function getAllPlayers(token: string) {\n var config = await getConfig();\n\n const response = await fetch(`${config.apiUrl}/admin/players`, { \n headers: {\n 'Authorization': `Bearer ${token}`\n },\n credentials: 'include'\n });\n\n if(response.status !== 200) {\n return [];\n } else {\n const items = await response.json();\n return items;\n }\n}\n\nexport async function loadUserPlayer(token: string) {\n var config = await getConfig();\n\n const response = await fetch(`${config.apiUrl}/players/me`, { \n headers: {\n 'Authorization': `Bearer ${token}`\n },\n credentials: 'include'\n });\n\n if(response.status === 404) {\n return null;\n } else {\n const items = await response.json();\n return items;\n }\n}\n\nexport async function createUserPlayer(token: string, player: Player, playerType?: PlayerType) {\n var config = await getConfig();\n\n const response = await fetch(`${config.apiUrl}/players/me`, { \n headers: {\n 'Authorization': `Bearer ${token}`,\n 'Content-Type': 'application/json'\n },\n credentials: 'include',\n method: 'POST',\n body: JSON.stringify({\n ...player,\n playerType\n })\n });\n\n if(response.ok) {\n return await response.json();\n } else {\n throw new Error('Nie udało się stworzyć zawodnika.');\n }\n\n}\n\nexport async function updateUserPlayer(token: string, player: Player) {\n var config = await getConfig();\n\n const response = await fetch(`${config.apiUrl}/players/me`, { \n headers: {\n 'Authorization': `Bearer ${token}`,\n 'Content-Type': 'application/json'\n },\n credentials: 'include',\n method: 'PUT',\n body: JSON.stringify(player)\n });\n\n if(response.ok) {\n return await response.json();\n } else {\n throw new Error('Nie udało się uaktualnić zawodnika.');\n }\n}","import { takeEvery, put, call } from \"redux-saga/effects\";\nimport { LOAD_USER_PLAYER, CREATE_PLAYER, UPDATE_PLAYER, SAVE_PLAYER, LOAD_ALL_PLAYERS } from \"./actionTypes\";\nimport { loadUserPlayerFailed, LoadUserPlayer, loadUserPlayerSuccess, CreatePlayer, createPlayerSuccess, createPlayerFailed, UpdatePlayer, updatePlayerSuccess, updatePlayerFailed, SavePlayer, updatePlayer, createPlayer, LoadAllPlayers, loadAllPlayersSuccess } from \"./actions\";\nimport { loadUserPlayer, createUserPlayer, updateUserPlayer, getAllPlayers } from \"./api\";\nimport ReactGA from 'react-ga';\n\nfunction* loadCurrentPlayerStep(action: LoadUserPlayer) {\n try {\n const playerData = yield call(loadUserPlayer, action.payload);\n if(playerData) {\n ReactGA.set({ userId: playerData.id });\n }\n \n yield put(loadUserPlayerSuccess(playerData));\n } catch(e) {\n yield put(loadUserPlayerFailed(e.message))\n }\n}\n\nfunction* createPlayerStep(action: CreatePlayer) {\n try {\n const playerData = yield call(createUserPlayer, action.payload.token, action.payload.player, action.payload.playerType);\n ReactGA.event({ action: 'Player created', category: 'Players' });\n yield put(createPlayerSuccess(playerData));\n } catch(e) {\n yield put(createPlayerFailed(e.message));\n }\n}\n\nfunction* updatePlayerStep(action: UpdatePlayer) {\n try {\n const playerData = yield call(updateUserPlayer, action.payload.token, action.payload.player);\n ReactGA.event({ action: 'Player updated', category: 'Players' });\n yield put(updatePlayerSuccess(playerData));\n } catch(e) {\n yield put(updatePlayerFailed(e.message));\n }\n}\n\nfunction* savePlayerStep({ payload }: SavePlayer) {\n if(!!payload.player.id) {\n yield put(updatePlayer(payload));\n } else {\n yield put(createPlayer(payload));\n }\n}\n\nfunction* loadAllPlayersStep({ payload: { token } }: LoadAllPlayers) {\n try {\n const players = yield call(getAllPlayers, token);\n yield put(loadAllPlayersSuccess(players));\n } catch(e) {\n yield put(loadAllPlayersSuccess([]));\n }\n}\n\nexport function* loadCurrentPlayerSaga() {\n yield takeEvery(LOAD_USER_PLAYER, loadCurrentPlayerStep);\n}\n\nexport function* createPlayerSaga() {\n yield takeEvery(CREATE_PLAYER, createPlayerStep);\n}\n\nexport function* updatePlayerSaga() {\n yield takeEvery(UPDATE_PLAYER, updatePlayerStep);\n}\n\nexport function* savePlayerSaga() {\n yield takeEvery(SAVE_PLAYER, savePlayerStep);\n}\n\nexport function* loadAllPlayers() {\n yield takeEvery(LOAD_ALL_PLAYERS, loadAllPlayersStep);\n}","import { Club } from \"./models\";\nimport { getConfig } from \"../../config/configuration\";\n\nexport async function loadClubsInProvinceApi(province: number): Promise {\n var config = await getConfig();\n\n const response = await fetch(`${config.apiUrl}/clubs/${province}`);\n\n if(response.ok) {\n const items = await response.json();\n return items;\n } else {\n throw new Error(response.statusText);\n }\n\n}","import { takeEvery, call, put, all } from \"redux-saga/effects\";\nimport { LOAD_CLUBS } from \"./actionType\";\nimport { LoadClubs, loadClubsInProvinceSuccess, loadClubsInProvinceFailed } from \"./actions\";\nimport { loadClubsInProvinceApi } from \"./api\";\nimport { getConfig } from \"../../config/configuration\";\nimport { Club } from \"./models\";\n\nfunction* loadClubsInProvinceStep(x: LoadClubs) {\n try {\n\n const config = yield call(getConfig);\n\n const callables = (config.availableProvinces as number[]).map(x => call(loadClubsInProvinceApi, x));\n\n const data: Club[][] = yield all(callables);\n\n const clubsData = data.reduce((prev, curr) => [...prev, ...curr], []);\n\n yield put(loadClubsInProvinceSuccess(clubsData));\n } catch(e) {\n yield put(loadClubsInProvinceFailed(e.message));\n }\n}\n\nexport function* loadClubsForProvinceSaga() {\n yield takeEvery(LOAD_CLUBS, loadClubsInProvinceStep)\n}","export const SUBMIT_MATCH = \"SUBMIT_MATCH\";\nexport const SUBMIT_MATCH_FAILED = \"SUBMIT_MATCH_FAILED\";\nexport const SUBMIT_MATCH_SUCCESS = \"SUBMIT_MATCH_SUCCESS\";\n\nexport const GET_NEWEST_MATCHES = \"GET_NEWEST_MATCHES\";\nexport const GET_NEWEST_MATCHES_FAILED = \"GET_NEWEST_MATCHES_FAILED\";\nexport const GET_NEWEST_MATCHES_SUCCESS = \"GET_NEWEST_MATCHES_SUCCESS\";\n\nexport const GET_PLAYERS_MATCHES = \"GET_PLAYERS_MATCHES\";\nexport const GET_PLAYERS_MATCHES_FAILED = \"GET_PLAYERS_MATCHES_FAILED\";\nexport const GET_PLAYERS_MATCHES_SUCCESS = \"GET_PLAYERS_MATCHES_SUCCESS\";\n\nexport const CONFIRM_MATCH = \"CONFIRM_MATCH\";\nexport const CONFIRM_MATCH_FAILED = \"CONFIRM_MATCH_FAILED\";\nexport const CONFIRM_MATCH_SUCCESS = \"CONFIRM_MATCH_SUCCESS\";\n\nexport const CANCEL_MATCH = \"CANCEL_MATCH\";\nexport const CANCEL_MATCH_FAILED = \"CANCEL_MATCH_FAILED\";\nexport const CANCEL_MATCH_SUCCESS = \"CANCEL_MATCH_SUCCESS\";\n\nexport const SUBMIT_MATCH_RESULT = \"SUBMIT_MATCH_RESULT\";\nexport const SUBMIT_MATCH_RESULT_FAILED = \"SUBMIT_MATCH_RESULT_FAILED\";\nexport const SUBMIT_MATCH_RESULT_SUCCESS = \"SUBMIT_MATCH_RESULT_SUCCESS\";\n\nexport const GET_LEAGUES_MATCHES = \"GET_LEAGUES_MATCHES\";\nexport const GET_LEAGUES_MATCHES_FAILED = \"GET_LEAGUES_MATCHES_FAILED\";\nexport const GET_LEAGUES_MATCHES_SUCCESS = \"GET_LEAGUES_MATCHES_SUCCESS\";\n\nexport const GET_TOURNAMENT_MATCHES = \"GET_TOURNAMENT_MATCHES\";\nexport const GET_TOURNAMENT_MATCHES_FAILED = \"GET_TOURNAMENT_MATCHES_FAILED\";\nexport const GET_TOURNAMENT_MATCHES_SUCCESS = \"GET_TOURNAMENT_MATCHES_SUCCESS\";\n\nexport const GET_PLAYERS_TOURNAMENT_MATCHES = \"GET_PLAYERS_TOURNAMENT_MATCHES\";\nexport const GET_PLAYERS_TOURNAMENT_MATCHES_FAILED = \"GET_PLAYERS_TOURNAMENT_MATCHES_FAILED\";\nexport const GET_PLAYERS_TOURNAMENT_MATCHES_SUCCESS = \"GET_PLAYERS_TOURNAMENT_MATCHES_SUCCESS\";\n\nexport const CONFIRM_TOURNAMENT_MATCH = \"CONFIRM_TOURNAMENT_MATCH\";\nexport const CONFIRM_TOURNAMENT_MATCH_FAILED = \"CONFIRM_TOURNAMENT_MATCH_FAILED\";\nexport const CONFIRM_TOURNAMENT_MATCH_SUCCESS = \"CONFIRM_TOURNAMENT_MATCH_SUCCESS\";\n\nexport const CANCEL_TOURNAMENT_MATCH = \"CANCEL_TOURNAMENT_MATCH\";\nexport const CANCEL_TOURNAMENT_MATCH_FAILED = \"CANCEL_TOURNAMENT_MATCH_FAILED\";\nexport const CANCEL_TOURNAMENT_MATCH_SUCCESS = \"CANCEL_TOURNAMENT_MATCH_SUCCESS\";\n\nexport const SUBMIT_TOURNAMENT_MATCH_RESULT = \"SUBMIT_TOURNAMENT_MATCH_RESULT\";\nexport const SUBMIT_TOURNAMENT_MATCH_RESULT_FAILED = \"SUBMIT_TOURNAMENT_MATCH_RESULT_FAILED\";\nexport const SUBMIT_TOURNAMENT_MATCH_RESULT_SUCCESS = \"SUBMIT_TOURNAMENT_MATCH_RESULT_SUCCESS\";","import { Player } from \"../players/models\";\nimport { Match } from \"../matches/models\";\nimport { PlayerType } from \"../registration/model\";\n\nexport interface LeagueHeader {\n id: string;\n city: string;\n name: string;\n startDate: Date;\n participantsCount: number;\n description: string;\n prices: PriceBudget[];\n endDate: Date;\n clubs: Clubs[];\n year: string;\n basePrice: number;\n sequenceNo: number;\n status: LeagueStatus;\n province: number;\n isDoubles: boolean;\n}\n\nexport interface PriceBudget {\n sequenceNo: number;\n description: string;\n}\n\nexport interface Clubs {\n id: string;\n name: string;\n logoUrl?: string;\n}\n\nexport interface LeagueHeaderWithCurrentUserAssignment extends LeagueHeader {\n isCurrentUserAssigned: boolean;\n}\n\nexport interface AssignPlayerToLeagueRequest {\n player: Player;\n league: LeagueHeader|League;\n token: string;\n}\n\nexport interface League {\n id: string;\n city: string;\n name: string;\n type: LeagueType;\n startDate: Date;\n endDate: Date;\n description: string;\n status: LeagueStatus;\n runtimeInfo: RuntimeInfo;\n players: LeaguePlayer[];\n prices: PriceBudget[];\n year: string;\n finals: FinalsPlan;\n basePrice: number;\n currentView: LeagueView;\n admins: string[];\n province: number;\n isDoubles: boolean;\n finalsUrl: string;\n advancingPlayersCount: number;\n}\n\nexport interface LeaguePlayerCanIPlay extends LeaguePlayer {\n canIPlay: boolean;\n}\n\nexport type Overwrite = Pick> & U;\n\nexport type LeagueWithPlayersICanPlay = Overwrite;\n\nexport interface LeagueWithCurrentUserAssignment extends League {\n isCurrentUserAssigned: boolean;\n}\n\nexport enum LeagueAccess {\n Public, OwnedByClub, Tournament\n}\n\nexport enum LeagueView {\n RankingList, Finals\n}\n\nexport interface PublicLeagueType {\n access: typeof LeagueAccess.Public;\n supportedClubs: Clubs[];\n}\n\nexport interface PrivateLeagueType {\n access: typeof LeagueAccess.OwnedByClub;\n owner: Clubs;\n}\n\nexport interface TournamentLeagueType {\n access: typeof LeagueAccess.Tournament;\n supportedClubs: Clubs[];\n adminUsers: string[];\n maxParticipants: number | undefined;\n}\n\nexport type LeagueType = \n | PublicLeagueType\n | PrivateLeagueType\n | TournamentLeagueType;\n\nexport enum LeagueStatus {\n NotStarted, InProgress, Finished\n}\n\nexport interface RuntimeInfo {\n participantsCount: number;\n matchesPlayed: number;\n}\n\nexport interface PlayerDescriptor {\n id: string;\n name: string;\n surname: string;\n level: string\n}\n\nexport interface LeaguePlayer extends PlayerDescriptor {\n rank: number;\n score: PlayerScore;\n gender: string;\n playerType: PlayerType;\n}\n\nexport interface PlayerScore {\n matchesPlayed: number;\n matchesWon: number;\n setsPlayed: number;\n setsWon: number;\n gemsWon: number;\n gemsLost: number;\n points: number;\n}\n\nexport interface FinalsPlan {\n final: FinalsNode;\n}\n\nexport interface FinalsNode {\n match: Match;\n child1: FinalsNode;\n child2: FinalsNode;\n}\n\nexport interface PricingDialogState {\n showDialog: boolean;\n promoCode: string;\n}\n\nexport interface LeagueWithPaymentStatus {\n id: string;\n city: string;\n name: string;\n status: LeagueStatus;\n year: string;\n isActive: boolean;\n playerType: PlayerType;\n}","import { League, LeagueAccess } from \"../leagues/models\";\nimport { Match, MatchHeader, Set } from \"./models\";\nimport { getConfig } from \"../../config/configuration\";\nimport { GetPlayersMatchesPayload } from \"./actions\";\n\nexport async function submitMatchApi(league: League, match: Match, token: string) {\n\n var config = await getConfig();\n\n const url = league.type.access === LeagueAccess.Public \n ? `/leagues/open/${league.year}/${league.id}/matches`\n : `not-exist`;\n \n const response = await fetch(`${config.apiUrl}${url}`, {\n headers: {\n 'Authorization': `Bearer ${token}`,\n 'Content-Type': 'application/json',\n 'Accept': 'application/json'\n },\n credentials: 'include',\n method: 'POST',\n body: JSON.stringify({\n oponent: match.oponent.id,\n date: match.date,\n club: match.club.id\n })\n });\n\n if(response.status >= 200 && response.status < 300) \n return true;\n if(response.status === 400) {\n return await response.json()\n } else {\n throw new Error(response.statusText);\n }\n}\n\nexport async function getNewestMatchResultsApi(leagueId: string, year: string) {\n var config = await getConfig();\n\n const url = `/leagues/open/${year}/${leagueId}/matches/newest`;\n \n const response = await fetch(`${config.apiUrl}${url}`, {\n headers: {\n 'Content-Type': 'application/json',\n 'Accept': 'application/json'\n },\n credentials: 'include',\n method: 'GET'\n });\n\n const matches: MatchHeader[] = await response.json();\n return matches.map(m => ({...m, date: new Date(m.date)}));\n}\n\nexport async function getLeagueMatchesApi(year: string, id: string, take: number, skip: number) {\n var config = await getConfig();\n\n const url = `/leagues/open/${year}/${id}/matches?take=${take}&skip=${skip}`;\n \n const response = await fetch(`${config.apiUrl}${url}`, {\n headers: {\n 'Content-Type': 'application/json',\n 'Accept': 'application/json'\n },\n credentials: 'include',\n method: 'GET'\n });\n\n const matches: MatchHeader[] = await response.json();\n return matches.map(m => ({...m, date: new Date(m.date)}));\n}\n\nexport async function getTournamentMatchesApi(year: string, id: string, take: number, skip: number) {\n var config = await getConfig();\n\n const url = `/tournaments/${year}/${id}/matches?take=${take}&skip=${skip}`;\n \n const response = await fetch(`${config.apiUrl}${url}`, {\n headers: {\n 'Content-Type': 'application/json',\n 'Accept': 'application/json'\n },\n credentials: 'include',\n method: 'GET'\n });\n\n const matches: MatchHeader[] = await response.json();\n return matches.map(m => ({...m, date: new Date(m.date)}));\n}\n\nexport async function getPlayersMatchesApi(request: GetPlayersMatchesPayload) {\n var config = await getConfig();\n\n const { id, year, skip, take, token } = request;\n\n const url = `/leagues/open/${year}/${id}/matches/mine?take=${take}&skip=${skip}`;\n \n const response = await fetch(`${config.apiUrl}${url}`, {\n headers: {\n 'Authorization': `Bearer ${token}`,\n 'Content-Type': 'application/json',\n 'Accept': 'application/json'\n },\n credentials: 'include',\n method: 'GET'\n });\n\n const matches: MatchHeader[] = await response.json();\n return matches.map(m => ({...m, date: new Date(m.date)}));\n}\n\nexport async function getPlayersTournamentMatchesApi(request: GetPlayersMatchesPayload) {\n\n var config = await getConfig();\n\n const { id, year, skip, take, token } = request;\n\n const url = `/tournaments/${year}/${id}/matches/mine?take=${take}&skip=${skip}`;\n \n const response = await fetch(`${config.apiUrl}${url}`, {\n headers: {\n 'Authorization': `Bearer ${token}`,\n 'Content-Type': 'application/json',\n 'Accept': 'application/json'\n },\n credentials: 'include',\n method: 'GET'\n });\n\n const matches: MatchHeader[] = await response.json();\n return matches.map(m => ({...m, date: new Date(m.date)}));\n\n}\n\nexport async function confirmMatchApi(year: string, leagueId: string, matchId: string, token: string) {\n var config = await getConfig();\n\n const url = `/leagues/open/${year}/${leagueId}/matches/${matchId}/confirm`;\n \n const response = await fetch(`${config.apiUrl}${url}`, {\n headers: {\n 'Authorization': `Bearer ${token}`,\n 'Content-Type': 'application/json',\n 'Accept': 'application/json'\n },\n credentials: 'include',\n method: 'POST'\n });\n\n if(response.ok) {\n return true;\n }\n\n if(response.status === 400) {\n return await response.json();\n }\n\n throw new Error(response.statusText);\n}\n\nexport async function confirmTournamentMatchApi(year: string, tournamentId: string, matchId: string, token: string) {\n const config = await getConfig();\n\n const url = `/tournaments/${year}/${tournamentId}/matches/${matchId}/confirm`;\n\n const response = await fetch(`${config.apiUrl}${url}`, {\n headers: {\n 'Authorization': `Bearer ${token}`,\n 'Content-Type': 'application/json',\n 'Accept': 'application/json'\n },\n credentials: 'include',\n method: 'POST'\n });\n\n if(response.ok) {\n return true;\n }\n\n if(response.status === 400) {\n return await response.json();\n }\n\n throw new Error(response.statusText);\n}\n\nexport async function cancelMatchApi(year: string, leagueId: string, matchId: string, token: string): Promise {\n var config = await getConfig();\n\n const url = `/leagues/open/${year}/${leagueId}/matches/${matchId}/reject`;\n \n const response = await fetch(`${config.apiUrl}${url}`, {\n headers: {\n 'Authorization': `Bearer ${token}`,\n 'Content-Type': 'application/json',\n 'Accept': 'application/json'\n },\n credentials: 'include',\n method: 'POST'\n });\n\n const match:MatchHeader = await response.json();\n return {...match, date: new Date(match.date)};\n}\n\nexport async function cancelTournamentMatchApi(year: string, tournamentId: string, matchId: string, token: string): Promise {\n var config = await getConfig();\n\n const url = `/tournaments/${year}/${tournamentId}/matches/${matchId}/reject`;\n \n const response = await fetch(`${config.apiUrl}${url}`, {\n headers: {\n 'Authorization': `Bearer ${token}`,\n 'Content-Type': 'application/json',\n 'Accept': 'application/json'\n },\n credentials: 'include',\n method: 'POST'\n });\n\n const match:MatchHeader = await response.json();\n return {...match, date: new Date(match.date)};\n}\n\nexport async function submitMatchResultApi(year: string, tournamentId: string, matchId: string, sets: Set[], walkover: boolean, token: string) {\n var config = await getConfig();\n\n const url = `/leagues/open/${year}/${tournamentId}/matches/${matchId}/result`;\n\n const response = await fetch(`${config.apiUrl}${url}`, {\n headers: {\n 'Authorization': `Bearer ${token}`,\n 'Content-Type': 'application/json',\n 'Accept': 'application/json'\n },\n credentials: 'include',\n body: JSON.stringify({ setScores: sets.filter(r => r.firstPlayer > 0 || r.secondPlayer > 0), isOponentRetired: walkover }),\n method: 'POST'\n });\n\n if(response.ok) {\n return true;\n }\n\n if(response.status === 400) {\n return await response.json();\n }\n\n throw new Error(response.statusText);\n}\n\nexport async function submitTournamentMatchResultApi(year: string, tournamentId: string, matchId: string, sets: Set[], walkover: boolean, token: string) {\n var config = await getConfig();\n\n const url = `/tournaments/${year}/${tournamentId}/matches/${matchId}/result`;\n\n const response = await fetch(`${config.apiUrl}${url}`, {\n headers: {\n 'Authorization': `Bearer ${token}`,\n 'Content-Type': 'application/json',\n 'Accept': 'application/json'\n },\n credentials: 'include',\n body: JSON.stringify({ setScores: sets.filter(r => r.firstPlayer > 0 || r.secondPlayer > 0), isOponentRetired: walkover }),\n method: 'POST'\n });\n\n if(response.ok) {\n return true;\n }\n\n if(response.status === 400) {\n return await response.json();\n }\n\n throw new Error(response.statusText);\n}","import { ActionWithPayload, ActionWithError, ActionWithErrorCreator, ActionWithPayloadCreator, WithNotification, Severity } from \"../../framework/action\";\nimport { League } from \"../leagues/models\";\nimport { Match, MatchHeader, Set } from \"./models\";\nimport { SUBMIT_MATCH, SUBMIT_MATCH_FAILED, SUBMIT_MATCH_SUCCESS, GET_NEWEST_MATCHES, GET_NEWEST_MATCHES_FAILED, GET_NEWEST_MATCHES_SUCCESS, GET_PLAYERS_MATCHES, GET_PLAYERS_MATCHES_FAILED, GET_PLAYERS_MATCHES_SUCCESS, CONFIRM_MATCH, CONFIRM_MATCH_FAILED, CONFIRM_MATCH_SUCCESS, CANCEL_MATCH_SUCCESS, CANCEL_MATCH, CANCEL_MATCH_FAILED, SUBMIT_MATCH_RESULT, SUBMIT_MATCH_RESULT_SUCCESS, SUBMIT_MATCH_RESULT_FAILED, GET_LEAGUES_MATCHES, GET_LEAGUES_MATCHES_SUCCESS, GET_LEAGUES_MATCHES_FAILED, GET_PLAYERS_TOURNAMENT_MATCHES, GET_PLAYERS_TOURNAMENT_MATCHES_FAILED, GET_PLAYERS_TOURNAMENT_MATCHES_SUCCESS, CONFIRM_TOURNAMENT_MATCH, CONFIRM_TOURNAMENT_MATCH_FAILED, CONFIRM_TOURNAMENT_MATCH_SUCCESS, CANCEL_TOURNAMENT_MATCH, CANCEL_TOURNAMENT_MATCH_FAILED, CANCEL_TOURNAMENT_MATCH_SUCCESS, SUBMIT_TOURNAMENT_MATCH_RESULT, SUBMIT_TOURNAMENT_MATCH_RESULT_SUCCESS, SUBMIT_TOURNAMENT_MATCH_RESULT_FAILED, GET_TOURNAMENT_MATCHES, GET_TOURNAMENT_MATCHES_SUCCESS, GET_TOURNAMENT_MATCHES_FAILED } from \"./actionTypes\";\nimport { Action, ActionCreator } from \"redux\";\nimport { SUBMIT_TOURNAMENT_MATCH } from \"../tournaments/actionTypes\";\n\nexport interface SubmitMatch extends ActionWithPayload<{ league: League, match: Match, token: string }> { \n type: typeof SUBMIT_MATCH;\n}\n\nexport interface SubmitMatchFailed extends ActionWithError {\n type: typeof SUBMIT_MATCH_FAILED;\n}\n\nexport interface SubmitMatchSuccess extends Action, WithNotification {\n type: typeof SUBMIT_MATCH_SUCCESS;\n}\n\nexport interface GetNewestMatches extends ActionWithPayload<{ leagueId: string, year: string }> {\n type: typeof GET_NEWEST_MATCHES;\n}\n\nexport interface GetNewestMatchesFailed extends ActionWithError {\n type: typeof GET_NEWEST_MATCHES_FAILED;\n}\n\nexport interface GetNewestMatchesSuccess extends ActionWithPayload {\n type: typeof GET_NEWEST_MATCHES_SUCCESS;\n}\n\nexport interface ChangeMatchStatusPayload {\n year: string;\n leagueId: string;\n matchId: string;\n token: string;\n skip: number;\n take: number;\n}\n\nexport interface ConfirmMatch extends ActionWithPayload {\n type: typeof CONFIRM_MATCH;\n}\n\nexport interface ConfirmMatchFailed extends ActionWithError {\n type: typeof CONFIRM_MATCH_FAILED;\n}\n\nexport interface ConfirmMatchSuccess extends Action, WithNotification {\n type: typeof CONFIRM_MATCH_SUCCESS;\n}\n\nexport interface CancelMatch extends ActionWithPayload {\n type: typeof CANCEL_MATCH;\n}\n\nexport interface CancelMatchFailed extends ActionWithError {\n type: typeof CANCEL_MATCH_FAILED;\n}\n\nexport interface CancelMatchSuccess extends Action, WithNotification {\n type: typeof CANCEL_MATCH_SUCCESS;\n}\n\nexport interface GetPlayersMatchesPayload {\n id: string,\n year: string,\n token: string,\n take: number,\n skip: number\n}\n\nexport interface GetPlayersMatches extends ActionWithPayload {\n type: typeof GET_PLAYERS_MATCHES\n}\n\nexport interface GetPlayersMatchesFailed extends ActionWithError {\n type: typeof GET_PLAYERS_MATCHES_FAILED\n}\n\nexport interface GetPlayersMatchesSuccess extends ActionWithPayload {\n type: typeof GET_PLAYERS_MATCHES_SUCCESS\n}\n\nexport interface MatchResultPayload {\n sets: Set[];\n token: string;\n matchId: string;\n leagueId: string;\n year: string;\n skip: number;\n take: number;\n walkover: boolean;\n}\n\nexport interface MatchTournamentResultPayload {\n sets: Set[];\n walkover: boolean;\n token: string;\n matchId: string;\n tournamentId: string;\n year: string;\n skip: number;\n take: number;\n}\n\nexport interface SubmitMatchResult extends ActionWithPayload {\n type: typeof SUBMIT_MATCH_RESULT;\n}\n\nexport interface SubmitMatchResultSuccess extends Action, WithNotification {\n type: typeof SUBMIT_MATCH_RESULT_SUCCESS;\n}\n\nexport interface SubmitMatchResultFailed extends ActionWithError {\n type: typeof SUBMIT_MATCH_RESULT_FAILED;\n}\n\nexport interface GetLeagueMatchesPayload {\n year: string;\n id: string;\n skip: number;\n take: number;\n}\n\nexport interface GetLeaguesMatches extends ActionWithPayload {\n type: typeof GET_LEAGUES_MATCHES;\n}\n\nexport interface GetLeaguesMatchesSuccess extends ActionWithPayload {\n type: typeof GET_LEAGUES_MATCHES_SUCCESS;\n}\n\nexport interface GetLeaguesMatchesFailed extends ActionWithError {\n type: typeof GET_LEAGUES_MATCHES_FAILED;\n}\n\nexport interface GetTournamentMatches extends ActionWithPayload {\n type: typeof GET_TOURNAMENT_MATCHES;\n}\n\nexport interface GetTournamentMatchesSuccess extends ActionWithPayload {\n type: typeof GET_TOURNAMENT_MATCHES_SUCCESS;\n}\n\nexport interface getTournamentMatchesFailed extends ActionWithError {\n type: typeof GET_TOURNAMENT_MATCHES_FAILED;\n}\n \n//----------------------------\n\nexport interface ChangeTournamentMatchStatusPayload {\n year: string;\n tournamentId: string;\n matchId: string;\n token: string;\n skip: number;\n take: number;\n}\n\nexport interface GetPlayersTournamentMatches extends ActionWithPayload {\n type: typeof GET_PLAYERS_TOURNAMENT_MATCHES\n}\n\nexport interface GetPlayersTournamentMatchesFailed extends ActionWithError {\n type: typeof GET_PLAYERS_TOURNAMENT_MATCHES_FAILED\n}\n\nexport interface GetPlayersTournamentMatchesSuccess extends ActionWithPayload {\n type: typeof GET_PLAYERS_TOURNAMENT_MATCHES_SUCCESS\n}\n\nexport interface ConfirmTournamentMatch extends ActionWithPayload {\n type: typeof CONFIRM_TOURNAMENT_MATCH;\n}\n\nexport interface ConfirmTournamentMatchFailed extends ActionWithError {\n type: typeof CONFIRM_TOURNAMENT_MATCH_FAILED;\n}\n\nexport interface ConfirmTournamentMatchSuccess extends Action, WithNotification {\n type: typeof CONFIRM_TOURNAMENT_MATCH_SUCCESS;\n}\n\nexport interface CancelTournamentMatch extends ActionWithPayload {\n type: typeof CANCEL_TOURNAMENT_MATCH;\n}\n\nexport interface CancelTournamentMatchFailed extends ActionWithError {\n type: typeof CANCEL_TOURNAMENT_MATCH_FAILED;\n}\n\nexport interface CancelTournamentMatchSuccess extends Action, WithNotification {\n type: typeof CANCEL_TOURNAMENT_MATCH_SUCCESS;\n}\n\nexport interface TournamentMatchResultPayload {\n sets: Set[];\n token: string;\n matchId: string;\n tournamentId: string;\n year: string;\n skip: number;\n take: number;\n walkover: boolean;\n}\n\nexport interface SubmitTournamentMatchResult extends ActionWithPayload {\n type: typeof SUBMIT_TOURNAMENT_MATCH_RESULT;\n}\n\nexport interface SubmitTournamentMatchResultSuccess extends Action, WithNotification {\n type: typeof SUBMIT_TOURNAMENT_MATCH_RESULT_SUCCESS;\n}\n\nexport interface SubmitTournamentMatchResultFailed extends ActionWithError {\n type: typeof SUBMIT_TOURNAMENT_MATCH_RESULT_FAILED;\n}\n\n\nexport const submitMatch : ActionWithPayloadCreator<{ league: League, match: Match, token: string }> = ({ league, match, token}) => ({\n payload: {\n league, match, token\n },\n type: SUBMIT_MATCH\n});\n\nconst handleSubmitMatchFailedDescription = (error: any) => {\n if(!error || !error.id) {\n return \"Nie udało nam się zapisać Twojego meczu, spróbuj ponownie!\";\n }\n switch(error.id) {\n case 1: return \"Liga nie pozwala jeszcze na umawianie nowych meczów\";\n case 2: return \"Zawodnik nie jest zapisany do ligii\";\n case 3: return \"Przeciwnik nie jest zapisany do ligii\";\n case 4: return \"Klub nie wspiera tej ligii\";\n case 5: return \"Zawodnicy rozegrali już mecz między sobą, lub mają taki mecz umówiony\";\n case 16: return \"Jeden z zawodników jest ma konto próbne i przekroczył już maksymalną liczbę meczów (3)\";\n case 17: return \"Zawodnik mający konto próbne nie może rozgrywać meczy w ostatnim tygodniu\";\n case 18: return \"Mecz zarejestrowany w ostatnim dniu ligii\";\n case 19: return \"Mecz zaplanowany na datę po zakończeniu ligii\";\n default: return \"Nie udało nam się zapisać Twojego meczu, spróbuj ponownie!\";\n }\n}\n\nconst handleSubmitMatchFailedContext = (error: any) => {\n if(error && error.id) {\n return {\n warning: true\n };\n } \n\n return undefined;\n}\n\nexport const submitMatchFailed : ActionWithErrorCreator = (error) => ({ type: SUBMIT_MATCH_FAILED, error, description: handleSubmitMatchFailedDescription(error), context: handleSubmitMatchFailedContext(error) });\n\nexport const submitMatchSuccess : ActionCreator = () => ({ type: SUBMIT_MATCH_SUCCESS, notification: { message: \"Świetnie, umówiłeś swój mecz. Czekaj na potwierdzenie ze strony rywala.\", severity: Severity.Success } });\n\nexport const getNewestMatches: ActionWithPayloadCreator<{ leagueId: string, year: string }> = ({ leagueId, year }) => ({\n type: GET_NEWEST_MATCHES,\n payload: {\n leagueId,\n year\n }\n});\n\nexport const getNewestMatchesFailed: ActionWithErrorCreator = (error) => ({\n type: GET_NEWEST_MATCHES_FAILED,\n error,\n description: \"Błąd ładowania ostatnich meczów\"\n});\n\nexport const getNewestMatchesSuccess: ActionWithPayloadCreator = (matches) => ({\n type: GET_NEWEST_MATCHES_SUCCESS,\n payload: matches\n});\n\nexport const getPlayersMatches: ActionWithPayloadCreator = (payload) => ({\n type: GET_PLAYERS_MATCHES,\n payload\n});\n\nexport const getPlayersMatchesSuccess: ActionWithPayloadCreator = (matches) => ({\n type: GET_PLAYERS_MATCHES_SUCCESS,\n payload: matches\n});\n\nexport const getPlayersMatchesFailed: ActionWithErrorCreator = (error) => ({\n type: GET_PLAYERS_MATCHES_FAILED,\n error,\n description: 'Nie udało nam się załadować Twoich meczów. Spróbuj ponownie'\n});\n\nexport const confirmMatch: ActionWithPayloadCreator = (payload) => ({\n type: CONFIRM_MATCH,\n payload\n});\n\nexport const confirmMatchSuccess: ActionCreator = () => ({\n type: CONFIRM_MATCH_SUCCESS,\n notification: {\n message: 'Dzięki za potwierdzenie meczu! Powodzenia!',\n severity: Severity.Success\n }\n});\n\nexport const confirmMatchFailed: ActionWithErrorCreator = (error) => ({\n type: CONFIRM_MATCH_FAILED,\n error,\n description: handleSubmitMatchFailedDescription(error),\n context: handleSubmitMatchFailedContext(error)\n});\n\nexport const cancelMatch: ActionWithPayloadCreator = (payload) => ({\n type: CANCEL_MATCH,\n payload\n});\n\nexport const cancelMatchSuccess: ActionCreator = () => ({\n type: CANCEL_MATCH_SUCCESS,\n notification: {\n message: 'Zrozumiałem. Szkoda, że odwołałeś mecz!',\n severity: Severity.Success\n }\n});\n\nexport const cancelMatchFailed: ActionWithErrorCreator = (error) => ({\n type: CANCEL_MATCH_FAILED,\n error,\n description: 'Nie udało nam się anulować Twojego meczu. Spróbuj ponownie później'\n});\n\nexport const submitMatchResult: ActionWithPayloadCreator = (payload) => ({\n type: SUBMIT_MATCH_RESULT,\n payload\n});\n\nexport const submitMatchResultFailed: ActionWithErrorCreator = (error) => ({\n type: SUBMIT_MATCH_RESULT_FAILED,\n error,\n description: handleSubmitMatchFailedDescription(error),\n context: handleSubmitMatchFailedContext(error)\n});\n\nexport const submitMatchResultSuccess: ActionCreator = () => ({\n type: SUBMIT_MATCH_RESULT_SUCCESS,\n notification: {\n message: 'Świetnie! Wynik meczu został zarejestrowany',\n severity: Severity.Success\n }\n});\n\nexport const getLeaguesMatches: ActionWithPayloadCreator = (payload) => ({\n type: GET_LEAGUES_MATCHES,\n payload\n});\n\nexport const getLeaguesMatchesSuccess: ActionWithPayloadCreator = (payload) => ({\n type: GET_LEAGUES_MATCHES_SUCCESS,\n payload\n});\n\nexport const getLeaguestMatchesFailed: ActionWithErrorCreator = (error) => ({\n type: GET_LEAGUES_MATCHES_FAILED,\n error,\n description: 'Nie udało się pobrać meczy w lidzie. Spróbuj ponownie.'\n});\n\n// ------------\n\nexport const getTournamentMatches: ActionWithPayloadCreator = (payload) => ({\n type: GET_TOURNAMENT_MATCHES,\n payload\n});\n\nexport const getTournamentMatchesSuccess: ActionWithPayloadCreator = (payload) => ({\n type: GET_TOURNAMENT_MATCHES_SUCCESS,\n payload\n});\n\nexport const getTournamentMatchesFailed: ActionWithErrorCreator = (error) => ({\n type: GET_TOURNAMENT_MATCHES_FAILED,\n error,\n description: 'Nie udało się pobrać meczy w turnieju. Spróbuj ponownie.'\n})\n\nexport const getPlayersTournamentMatches: ActionWithPayloadCreator = (payload) => ({\n type: GET_PLAYERS_TOURNAMENT_MATCHES,\n payload\n});\n\nexport const getPlayersTournamentMatchesSuccess: ActionWithPayloadCreator = (matches) => ({\n type: GET_PLAYERS_TOURNAMENT_MATCHES_SUCCESS,\n payload: matches\n});\n\nexport const getPlayersTournamentMatchesFailed: ActionWithErrorCreator = (error) => ({\n type: GET_PLAYERS_TOURNAMENT_MATCHES_FAILED,\n error,\n description: 'Nie udało nam się załadować Twoich meczów. Spróbuj ponownie'\n});\n\nexport const confirmTournamentMatch: ActionWithPayloadCreator = (payload) => ({\n type: CONFIRM_TOURNAMENT_MATCH,\n payload\n});\n\nexport const confirmTournamentMatchSuccess: ActionCreator = () => ({\n type: CONFIRM_TOURNAMENT_MATCH_SUCCESS,\n notification: {\n message: 'Dzięki za potwierdzenie meczu! Powodzenia!',\n severity: Severity.Success\n }\n});\n\nexport const confirmTournamentMatchFailed: ActionWithErrorCreator = (error) => ({\n type: CONFIRM_TOURNAMENT_MATCH_FAILED,\n error,\n description: handleSubmitMatchFailedDescription(error),\n context: handleSubmitMatchFailedContext(error)\n});\n\nexport const cancelTournamentMatch: ActionWithPayloadCreator = (payload) => ({\n type: CANCEL_TOURNAMENT_MATCH,\n payload\n});\n\nexport const cancelTournamentMatchSuccess: ActionCreator = () => ({\n type: CANCEL_TOURNAMENT_MATCH_SUCCESS,\n notification: {\n message: 'Zrozumiałem. Szkoda, że odwołałeś mecz!',\n severity: Severity.Success\n }\n});\n\nexport const cancelTournamentMatchFailed: ActionWithErrorCreator = (error) => ({\n type: CANCEL_TOURNAMENT_MATCH_FAILED,\n error,\n description: 'Nie udało nam się anulować Twojego meczu. Spróbuj ponownie później'\n});\n\nexport const submitTournamentMatchResult: ActionWithPayloadCreator = (payload) => ({\n type: SUBMIT_TOURNAMENT_MATCH_RESULT,\n payload\n});\n\nexport const submitTournamentMatchResultFailed: ActionWithErrorCreator = (error) => ({\n type: SUBMIT_TOURNAMENT_MATCH_RESULT_FAILED,\n error,\n description: handleSubmitMatchFailedDescription(error),\n context: handleSubmitMatchFailedContext(error)\n});\n\nexport const submitTournamentMatchResultSuccess: ActionCreator = () => ({\n type: SUBMIT_TOURNAMENT_MATCH_RESULT_SUCCESS,\n notification: {\n message: 'Świetnie! Wynik meczu został zarejestrowany',\n severity: Severity.Success\n }\n});\n\n// -----------------------------------\n\n\n\nexport type Actions = \n | SubmitMatch\n | SubmitMatchFailed\n | SubmitMatchSuccess\n | GetNewestMatches\n | GetNewestMatchesFailed\n | GetNewestMatchesSuccess\n | GetPlayersMatches\n | GetPlayersMatchesSuccess\n | GetPlayersMatchesFailed\n | GetLeaguesMatches\n | GetLeaguesMatchesFailed\n | GetLeaguesMatchesSuccess\n | SubmitMatchResult\n | ConfirmMatch\n | CancelMatch\n | GetPlayersTournamentMatches\n | GetPlayersTournamentMatchesFailed\n | GetPlayersTournamentMatchesSuccess\n | SubmitTournamentMatchResult\n | ConfirmTournamentMatch\n | CancelTournamentMatch\n | GetTournamentMatches\n | GetTournamentMatchesSuccess\n | getTournamentMatchesFailed","export const LOAD_MY_UNCONFIRMED_MATCHES = \"LOAD_MY_UNCONFIRMED_MATCHES\";\nexport const LOAD_MY_UNCONFIRMED_MATCHES_SUCCESS = \"LOAD_MY_UNCONFIRMED_MATCHES_SUCCESS\";\nexport const LOAD_MY_UNCONFIRMED_MATCHES_FAILED = \"LOAD_MY_UNCONFIRMED_MATCHES_FAILED\";\n\nexport const LOAD_MY_CONFIRMED_MATCHES = \"LOAD_MY_CONFIRMED_MATCHES\";\nexport const LOAD_MY_CONFIRMED_MATCHES_SUCCESS = \"LOAD_MY_CONFIRMED_MATCHES_SUCCESS\";\nexport const LOAD_MY_CONFIRMED_MATCHES_FAILED = \"LOAD_MY_CONFIRMED_MATCHES_FAILED\";","import { ActionWithError, ActionWithErrorCreator, ActionWithPayload, ActionWithPayloadCreator } from \"../../framework/action\";\nimport { CancelMatch, ConfirmMatch, SubmitMatchResult } from \"../matches/actions\";\nimport { MatchHeader } from \"../matches/models\";\nimport { LOAD_MY_UNCONFIRMED_MATCHES, LOAD_MY_CONFIRMED_MATCHES, LOAD_MY_CONFIRMED_MATCHES_FAILED, LOAD_MY_CONFIRMED_MATCHES_SUCCESS, LOAD_MY_UNCONFIRMED_MATCHES_FAILED, LOAD_MY_UNCONFIRMED_MATCHES_SUCCESS } from \"./actionTypes\";\n\nexport interface LoadMyUnconfirmedMatches extends ActionWithPayload {\n type: typeof LOAD_MY_UNCONFIRMED_MATCHES;\n}\n\nexport interface LoadMyUnconfirmedMatchesSuccess extends ActionWithPayload {\n type: typeof LOAD_MY_UNCONFIRMED_MATCHES_SUCCESS;\n}\n\nexport interface LoadMyUnconfirmedMatchesFailed extends ActionWithError {\n type: typeof LOAD_MY_UNCONFIRMED_MATCHES_FAILED;\n}\n\nexport interface LoadMyConfirmedMatches extends ActionWithPayload {\n type: typeof LOAD_MY_CONFIRMED_MATCHES;\n}\n\nexport interface LoadMyConfirmedMatchesSuccess extends ActionWithPayload {\n type: typeof LOAD_MY_CONFIRMED_MATCHES_SUCCESS;\n}\n\nexport interface LoadMyConfirmedMatchesFailed extends ActionWithError {\n type: typeof LOAD_MY_CONFIRMED_MATCHES_FAILED;\n}\n\nexport type Actions =\n | LoadMyConfirmedMatches\n | LoadMyConfirmedMatchesFailed\n | LoadMyConfirmedMatchesSuccess\n | LoadMyUnconfirmedMatches\n | LoadMyUnconfirmedMatchesFailed\n | LoadMyUnconfirmedMatchesSuccess\n | SubmitMatchResult\n | CancelMatch\n | ConfirmMatch\n\nexport const loadMyUnconfirmedMatches: ActionWithPayloadCreator = (token: string) => ({ type: LOAD_MY_UNCONFIRMED_MATCHES, payload: token });\nexport const loadMyUnconfirmedMatchesSuccess: ActionWithPayloadCreator = (payload: MatchHeader[]) => ({ type: LOAD_MY_UNCONFIRMED_MATCHES_SUCCESS, payload });\nexport const loadMyUnconfirmedMatchesFailed: ActionWithErrorCreator = (error: string) => ({ type: LOAD_MY_UNCONFIRMED_MATCHES_FAILED, error, description: 'Nie udało nam się załadować Twoich niepotwierdzonych meczów!' })\n\nexport const loadMyConfirmedMatches: ActionWithPayloadCreator = (token: string) => ({ type: LOAD_MY_CONFIRMED_MATCHES, payload: token });\nexport const loadMyConfirmedMatchesSuccess: ActionWithPayloadCreator = (payload: MatchHeader[]) => ({ type: LOAD_MY_CONFIRMED_MATCHES_SUCCESS, payload });\nexport const loadMyConfirmedMatchesFailed: ActionWithErrorCreator = (error: string) => ({ type: LOAD_MY_CONFIRMED_MATCHES_FAILED, error, description: 'Nie udało nam się załadować Twoich potwierdzonych meczów!' })","import { takeEvery, call, put } from \"redux-saga/effects\";\nimport { SUBMIT_MATCH, GET_NEWEST_MATCHES, GET_PLAYERS_MATCHES, CONFIRM_MATCH, CANCEL_MATCH, SUBMIT_MATCH_RESULT, GET_LEAGUES_MATCHES, GET_PLAYERS_TOURNAMENT_MATCHES, CONFIRM_TOURNAMENT_MATCH, CANCEL_TOURNAMENT_MATCH, SUBMIT_TOURNAMENT_MATCH_RESULT, GET_TOURNAMENT_MATCHES } from \"./actionTypes\";\nimport { submitMatchApi, getNewestMatchResultsApi, getPlayersMatchesApi, confirmMatchApi, cancelMatchApi, submitMatchResultApi, getLeagueMatchesApi, getPlayersTournamentMatchesApi, confirmTournamentMatchApi, cancelTournamentMatchApi, submitTournamentMatchResultApi, getTournamentMatchesApi } from \"./api\";\nimport { SubmitMatch, submitMatchFailed, submitMatchSuccess, GetNewestMatches, getNewestMatches, getNewestMatchesFailed, getNewestMatchesSuccess, GetPlayersMatches, getPlayersMatchesSuccess, getPlayersMatchesFailed, ConfirmMatch, getPlayersMatches, CancelMatch, confirmMatchSuccess, confirmMatchFailed, cancelMatchFailed, cancelMatchSuccess, SubmitMatchResult, submitMatchResultSuccess, submitMatchResultFailed, GetLeaguesMatches, getLeaguesMatchesSuccess, getLeaguestMatchesFailed, GetPlayersTournamentMatches, getPlayersTournamentMatchesSuccess, getPlayersTournamentMatchesFailed, ConfirmTournamentMatch, confirmTournamentMatchFailed, confirmTournamentMatchSuccess, getPlayersTournamentMatches, CancelTournamentMatch, SubmitTournamentMatchResult, cancelTournamentMatchSuccess, submitTournamentMatchResultSuccess, submitTournamentMatchResultFailed, cancelTournamentMatchFailed, GetTournamentMatches, getTournamentMatchesSuccess, getTournamentMatchesFailed } from \"./actions\";\nimport { loadLeagueDetails, loadOpponentsPlayedWith } from \"../leagues/actions\";\nimport ReactGA from 'react-ga';\nimport { loadMyConfirmedMatches, loadMyUnconfirmedMatches } from \"../desktop/actions\";\n\nfunction* submitMatchStep({ payload } : SubmitMatch) {\n try {\n const { league, match, token } = payload;\n const result = yield call(submitMatchApi, league, match, token );\n if(result === true) {\n ReactGA.event({ action: 'Match submitted', category: 'Matches' });\n yield put(submitMatchSuccess());\n yield put(loadOpponentsPlayedWith({ token, year: league.year, id: league.id }))\n yield put(loadLeagueDetails(league));\n yield put(getNewestMatches({ leagueId: league.id, year: league.year }));\n } else {\n yield put(submitMatchFailed(result));\n }\n } catch(e) {\n yield put(submitMatchFailed(e.message));\n }\n}\n\nfunction* getNewestMatchesStep({ payload }: GetNewestMatches) {\n try {\n const { leagueId, year } = payload;\n const result = yield call(getNewestMatchResultsApi, leagueId, year );\n\n yield put(getNewestMatchesSuccess(result));\n } catch(e) {\n yield put(getNewestMatchesFailed(e.message));\n }\n}\n\nfunction* getPlayersMatchesStep({ payload }: GetPlayersMatches) {\n try {\n const result = yield call(getPlayersMatchesApi, payload);\n \n yield put(getPlayersMatchesSuccess(result));\n }\n catch(e) {\n yield put(getPlayersMatchesFailed(e));\n }\n}\n\nfunction* confirmMatchStep({ payload }: ConfirmMatch) {\n try {\n const { year, leagueId, matchId, token, take, skip } = payload;\n const result = yield call(confirmMatchApi, year, leagueId, matchId, token);\n if(result === true) {\n ReactGA.event({ action: 'Match confirmed', category: 'Matches' });\n yield put(confirmMatchSuccess());\n } else {\n yield put(confirmMatchFailed(result));\n }\n yield put(getPlayersMatches({ id: leagueId, skip, take, token, year }))\n yield put(loadMyUnconfirmedMatches(token));\n yield put(loadMyConfirmedMatches(token));\n } catch(e) {\n yield put(confirmMatchFailed(e));\n }\n}\n\nfunction* confirmTournamentMatchStep({ payload }: ConfirmTournamentMatch) {\n try {\n const { matchId, skip, take, token, tournamentId, year } = payload;\n const result = yield call(confirmTournamentMatchApi, year, tournamentId, matchId, token);\n if(result === true) {\n yield put(confirmTournamentMatchSuccess());\n } else {\n yield put(confirmTournamentMatchFailed(result));\n }\n\n yield put(getPlayersTournamentMatches({ id: tournamentId, skip, take, token, year }));\n\n } catch(e) {\n yield put(confirmTournamentMatchFailed(e));\n }\n}\n\nfunction* cancelMatchStep({ payload }: CancelMatch) {\n try {\n const { year, leagueId, matchId, token, take, skip } = payload;\n const result = yield call(cancelMatchApi, year, leagueId, matchId, token);\n ReactGA.event({ action: 'Match cancelled', category: 'Matches' });\n yield put(cancelMatchSuccess());\n yield put(getPlayersMatches({ id: leagueId, skip, take, token, year }))\n yield put(loadMyUnconfirmedMatches(token));\n yield put(loadMyConfirmedMatches(token));\n } catch(e) {\n yield put(cancelMatchFailed(e));\n }\n}\n\nfunction* cancelTournamentMatchStep({ payload }: CancelTournamentMatch) {\n try {\n const { year, tournamentId, matchId, token, take, skip } = payload;\n const result = yield call(cancelTournamentMatchApi, year, tournamentId, matchId, token);\n yield put(cancelTournamentMatchSuccess());\n yield put(getPlayersTournamentMatches({ id: tournamentId, skip, take, token, year }))\n } catch(e) {\n yield put(cancelTournamentMatchFailed(e));\n }\n}\n\nfunction* submitMatchResultStep({ payload }: SubmitMatchResult) {\n try {\n const { year, leagueId, matchId, sets, token, skip, take, walkover } = payload;\n const result = yield call(submitMatchResultApi, year, leagueId, matchId, sets, walkover, token);\n if(result === true) {\n ReactGA.event({ action: 'Match result submitted', category: 'Matches' });\n yield put(submitMatchResultSuccess());\n } else {\n yield put(submitMatchResultFailed(result));\n }\n \n yield put(getPlayersMatches({ id: leagueId, skip, take, token, year }));\n yield put(loadMyUnconfirmedMatches(token));\n yield put(loadMyConfirmedMatches(token));\n } catch(e) {\n yield put(submitMatchResultFailed(e));\n }\n \n}\n\nfunction* submitTournamentMatchResultStep({ payload }: SubmitTournamentMatchResult) {\n try {\n const { year, tournamentId, matchId, sets, token, skip, take, walkover } = payload;\n const result = yield call(submitTournamentMatchResultApi, year, tournamentId, matchId, sets, walkover, token);\n if(result === true) {\n yield put(submitTournamentMatchResultSuccess());\n } else {\n yield put(submitTournamentMatchResultFailed(result));\n }\n \n yield put(getPlayersTournamentMatches({ id: tournamentId, skip, take, token, year }));\n } catch(e) {\n yield put(submitTournamentMatchResultFailed(e));\n }\n \n}\n\nfunction* getLeagueMatchesStep({ payload }: GetLeaguesMatches) {\n try {\n const { id, year, take, skip } = payload;\n const result = yield call(getLeagueMatchesApi, year, id, take, skip);\n \n yield put(getLeaguesMatchesSuccess(result));\n } catch(e) {\n yield put(getLeaguestMatchesFailed(e));\n }\n}\n\nfunction* getTournamentMatchesStep({ payload } : GetTournamentMatches) {\n try {\n const { id, year, take, skip } = payload;\n const result = yield call(getTournamentMatchesApi, year, id, take, skip);\n yield put(getTournamentMatchesSuccess(result));\n } catch(e) {\n yield put(getTournamentMatchesFailed(e));\n }\n}\n\nfunction* getPlayersTournamentMatchesStep({ payload }: GetPlayersTournamentMatches) {\n try {\n const result = yield call(getPlayersTournamentMatchesApi, payload);\n\n yield put(getPlayersTournamentMatchesSuccess(result));\n } catch(e) {\n yield put(getPlayersTournamentMatchesFailed(e));\n }\n}\n\nexport function* submitMatchSaga() {\n yield takeEvery(SUBMIT_MATCH, submitMatchStep);\n}\n\nexport function* getNewestMatchesSaga() {\n yield takeEvery(GET_NEWEST_MATCHES, getNewestMatchesStep);\n}\n\nexport function* loadPlayersMatchesSaga() {\n yield takeEvery(GET_PLAYERS_MATCHES, getPlayersMatchesStep);\n}\n\nexport function* loadPlayersTournamentMatchesSaga() {\n yield takeEvery(GET_PLAYERS_TOURNAMENT_MATCHES, getPlayersTournamentMatchesStep);\n}\n\nexport function* confirmMatchSaga() {\n yield takeEvery(CONFIRM_MATCH, confirmMatchStep);\n}\n\nexport function* cancelMatchSaga() {\n yield takeEvery(CANCEL_MATCH, cancelMatchStep);\n}\n\nexport function* submitMatchResultSaga() {\n yield takeEvery(SUBMIT_MATCH_RESULT, submitMatchResultStep);\n}\n\nexport function* getLeagueMatchesSage() {\n yield takeEvery(GET_LEAGUES_MATCHES, getLeagueMatchesStep);\n}\n\nexport function* getTournamentMatchesSaga() {\n yield takeEvery(GET_TOURNAMENT_MATCHES, getTournamentMatchesStep);\n}\n\nexport function* confirmTournamentMatchSaga() {\n yield takeEvery(CONFIRM_TOURNAMENT_MATCH, confirmTournamentMatchStep);\n}\n\nexport function* cancelTournamentMatchSaga() {\n yield takeEvery(CANCEL_TOURNAMENT_MATCH, cancelTournamentMatchStep);\n}\n\nexport function* submitTournamentMatchResultSaga() {\n yield takeEvery(SUBMIT_TOURNAMENT_MATCH_RESULT, submitTournamentMatchResultStep);\n}","export const GET_USER_PAYMENTS = \"GET_USER_PAYMENTS\";\nexport const GET_USER_PAYMENTS_SUCCESS = \"GET_USER_PAYMENTS_SUCCESS\";\nexport const GET_USER_PAYMENTS_FAILED = \"GET_USER_PAYMENTS_FAILED\";\n\nexport const REDO_USER_PAYMENT = \"REDO_USER_PAYMENT\";\nexport const REDO_USER_PAYMENT_SUCCESS = \"REDO_USER_PAUMENT_SUCCESS\";\nexport const REDO_USER_PAYMENT_FAILED = \"REDO_USER_PAYMENT_FAILED\";","export interface PaymentNeeded {\n externalPaymentOrderId: string;\n finalPrice: string;\n paymentLink: string;\n}\n\nexport interface PaymentInfo {\n externalPaymentOrderId: string;\n paymentDate: Date;\n paymentStatus:PaymentStatus;\n finalPrice: number;\n leagueId: string;\n leagueYear: string;\n leagueName: string;\n}\n\nexport enum PaymentStatus {\n PENDING,\n WAITING_FOR_CONFIRMATION,\n COMPLETED,\n CANCELED\n}","import { ActionWithPayload, ActionWithError, ActionWithPayloadCreator, ActionWithErrorCreator } from \"../../framework/action\";\nimport { GET_USER_PAYMENTS, GET_USER_PAYMENTS_SUCCESS, GET_USER_PAYMENTS_FAILED, REDO_USER_PAYMENT, REDO_USER_PAYMENT_SUCCESS, REDO_USER_PAYMENT_FAILED } from \"./actionTypes\";\nimport { PaymentInfo } from \"./models\";\nimport { Action, ActionCreator } from \"redux\";\n\nexport interface GetUserPayments extends ActionWithPayload {\n type: typeof GET_USER_PAYMENTS;\n}\n\nexport interface GetUserPaymentsSuccess extends ActionWithPayload {\n type: typeof GET_USER_PAYMENTS_SUCCESS;\n}\n\nexport interface GetUserPaymentsFailed extends ActionWithError {\n type: typeof GET_USER_PAYMENTS_FAILED;\n}\n\nexport interface RedoUserPayment extends ActionWithPayload<{token: string, payment: PaymentInfo}> {\n type: typeof REDO_USER_PAYMENT;\n}\n\nexport interface RedoUserPaymentSuccess extends Action {\n type: typeof REDO_USER_PAYMENT_SUCCESS;\n}\n\nexport interface RedoUserPaymentFailed extends ActionWithError {\n type: typeof REDO_USER_PAYMENT_FAILED;\n}\n\nexport const getUserPayments: ActionWithPayloadCreator = (token: string) => ({\n type: GET_USER_PAYMENTS,\n payload: token\n});\n\nexport const getUserPaymentsSuccess: ActionWithPayloadCreator = (payments: PaymentInfo[]) => ({\n type: GET_USER_PAYMENTS_SUCCESS,\n payload: payments\n});\n\nexport const getUserPaymentsFailed: ActionWithErrorCreator = (error: string) => ({\n type: GET_USER_PAYMENTS_FAILED,\n error,\n description: 'Nie udało nam się pobrać informacji o Twoich płatnościach. Przeładuj stronę, a zapewne się załadują'\n});\n\nexport const redoUserPayment: ActionWithPayloadCreator<{token: string, payment: PaymentInfo}> = (payload) => ({\n type: REDO_USER_PAYMENT,\n payload\n});\n\nexport const redoUserPaymentSuccess: ActionCreator = () => ({\n type: REDO_USER_PAYMENT_SUCCESS\n});\n\nexport const redoUserPaymentFailed: ActionWithErrorCreator = (error: string) => ({\n type: REDO_USER_PAYMENT_FAILED,\n error,\n description: 'Nie udało się rozpocząć powtarzania płatności. Spróbuj ponownie!'\n});\n\nexport type Actions =\n | GetUserPayments\n | GetUserPaymentsSuccess\n | GetUserPaymentsFailed\n | RedoUserPayment\n | RedoUserPaymentSuccess\n | RedoUserPaymentFailed;","import { takeEvery, call, put, delay } from \"redux-saga/effects\";\nimport { GET_USER_PAYMENTS, REDO_USER_PAYMENT } from \"./actionTypes\";\nimport { GetUserPayments, getUserPaymentsSuccess, getUserPaymentsFailed, getUserPayments, RedoUserPayment, redoUserPaymentFailed } from \"./actions\";\nimport { getUsersPaymentsApi, redoUserPaymentApi } from \"./api\";\nimport { PaymentInfo, PaymentStatus, PaymentNeeded } from \"./models\";\nimport ReactGA from 'react-ga';\n\nexport function* getUserPaymentsStep({ payload }: GetUserPayments) {\n const token = payload;\n\n try {\n\n const result: PaymentInfo[] = yield call(getUsersPaymentsApi, token);\n yield put(getUserPaymentsSuccess(result));\n\n if(!!result.find(x => x.paymentStatus === PaymentStatus.PENDING || x.paymentStatus === PaymentStatus.WAITING_FOR_CONFIRMATION)) {\n yield delay(3000);\n yield put(getUserPayments(token));\n }\n } catch(e) {\n yield put(getUserPaymentsFailed(e.message));\n }\n}\n\nexport function* redoUserPaymentStep({ payload }: RedoUserPayment) {\n \n const { token, payment } = payload;\n\n try {\n const paymentNeeded: PaymentNeeded = yield call(redoUserPaymentApi, token, payment.externalPaymentOrderId);\n if(paymentNeeded && paymentNeeded.paymentLink) {\n ReactGA.event({ action: 'Redoing payment', category: 'Payments' });\n window.location.assign(paymentNeeded.paymentLink);\n }\n //yield put(getUserPayments(token));\n } catch (e) {\n yield put(redoUserPaymentFailed(e.message));\n }\n\n}\n\nexport function* getUserPaymentsSaga() {\n yield takeEvery(GET_USER_PAYMENTS, getUserPaymentsStep);\n}\n\nexport function* redoUserPaymentSaga() {\n yield takeEvery(REDO_USER_PAYMENT, redoUserPaymentStep);\n}","export const LOAD_PRODUCTS = \"LOAD_PRODUCTS\";\nexport const LOAD_PRODUCTS_SUCCESS = \"LOAD_PRODUCTS_SUCCESS\";\nexport const LOAD_PRODUCTS_FAILED = \"LOAD_PRODUCTS_FAILED\";\n\nexport const ADD_PRODUCT_TO_BASKET = \"ADD_PRODUCT_TO_BASKET\";\nexport const REMOVE_PRODUCT_FROM_BASKET = \"REMOVE_PRODUCT_FROM_BASKET\";\n\nexport const LOAD_SPOTS = \"LOAD_SPOTS\";\nexport const LOAD_SPOTS_SUCCESS = \"LOAD_SPOTS_SUCCESS\";\nexport const LOAD_SPOTS_FAILED = \"LOAD_SPOTS_FAILED\";\n\nexport const SET_SPOT = \"SET_SPOT\";\n\nexport const CREATE_SHOPPING_ORDER = \"CREATE_SHOPPING_ORDER\";\nexport const CREATE_SHOPPING_ORDER_SUCCESS = \"CREATE_SHOPPING_ORDER_SUCCESS\";\nexport const CREATE_SHOPPING_ORDER_FAILED = \"CREATE_SHOPPING_ORDER_FAILED\";\n\nexport const LOAD_MY_ORDERS = \"LOAD_MY_ORDERS\";\nexport const LOAD_MY_ORDERS_SUCCESS = \"LOAD_MY_ORDERS_SUCCESS\";\nexport const LOAD_MY_ORDERS_FAILED = \"LOAD_MY_ORDERS_FAILED\";","import { Action, ActionCreator } from \"redux\";\nimport { LOAD_PRODUCTS, LOAD_PRODUCTS_FAILED, LOAD_PRODUCTS_SUCCESS, ADD_PRODUCT_TO_BASKET, REMOVE_PRODUCT_FROM_BASKET, LOAD_SPOTS, LOAD_SPOTS_FAILED, LOAD_SPOTS_SUCCESS, SET_SPOT, CREATE_SHOPPING_ORDER, CREATE_SHOPPING_ORDER_FAILED, CREATE_SHOPPING_ORDER_SUCCESS, LOAD_MY_ORDERS, LOAD_MY_ORDERS_SUCCESS, LOAD_MY_ORDERS_FAILED } from \"./actionTypes\";\nimport { ActionWithError, ActionWithPayload, ActionWithErrorCreator, ActionWithPayloadCreator } from \"../../framework/action\";\nimport { Product, ProductItem, Spot, Basket, Order } from \"./models\";\n\nexport interface LoadProducts extends Action {\n type: typeof LOAD_PRODUCTS;\n}\n\nexport interface LoadProductsFailed extends ActionWithError {\n type: typeof LOAD_PRODUCTS_FAILED;\n}\n\nexport interface LoadProductsSuccess extends ActionWithPayload {\n type: typeof LOAD_PRODUCTS_SUCCESS;\n}\n\nexport interface AddProductToBasket extends ActionWithPayload {\n type: typeof ADD_PRODUCT_TO_BASKET;\n}\n\nexport interface RemoveProductFromBasket extends ActionWithPayload {\n type: typeof REMOVE_PRODUCT_FROM_BASKET;\n}\n\nexport interface LoadSpots extends Action {\n type: typeof LOAD_SPOTS;\n}\n\nexport interface LoadSpotsFailed extends ActionWithError {\n type: typeof LOAD_SPOTS_FAILED;\n}\n\nexport interface LoadSpotsSuccess extends ActionWithPayload {\n type: typeof LOAD_SPOTS_SUCCESS;\n}\n\nexport interface SetSpot extends ActionWithPayload {\n type: typeof SET_SPOT;\n}\n\nexport interface ShoppingOrderPayload {\n basket: Basket;\n selectedSpot: Spot;\n token: string;\n}\n\nexport interface CreateShoppingOrder extends ActionWithPayload {\n type: typeof CREATE_SHOPPING_ORDER;\n}\n\nexport interface CreateShoppingOrderSuccess extends Action {\n type: typeof CREATE_SHOPPING_ORDER_SUCCESS;\n}\n\nexport interface CreateShoppingOrderFailed extends ActionWithError {\n type: typeof CREATE_SHOPPING_ORDER_FAILED;\n}\n\nexport interface LoadMyOrders extends ActionWithPayload {\n type: typeof LOAD_MY_ORDERS;\n}\n\nexport interface LoadMyOrdersSuccess extends ActionWithPayload {\n type: typeof LOAD_MY_ORDERS_SUCCESS;\n}\n\nexport interface LoadMyOrdersFailed extends ActionWithError {\n type: typeof LOAD_MY_ORDERS_FAILED;\n}\n\nexport const loadProducts: ActionCreator = () => ({ type: LOAD_PRODUCTS });\nexport const loadProductsFailed: ActionWithErrorCreator = (error) => ({ type: LOAD_PRODUCTS_FAILED, error, description: \"Nie udało nam się załadować produktów w SmartShop, spróbuj ponownie!\" });\nexport const loadProductsSuccess: ActionWithPayloadCreator = (payload: Product[]) => ({ type: LOAD_PRODUCTS_SUCCESS, payload });\nexport const addProductToBasket: ActionWithPayloadCreator = (payload: ProductItem) => ({ type: ADD_PRODUCT_TO_BASKET, payload });\nexport const removeProductFromBasket: ActionWithPayloadCreator = (payload: string) => ({ type: REMOVE_PRODUCT_FROM_BASKET, payload });\nexport const loadSpots: ActionCreator = () => ({ type: LOAD_SPOTS });\nexport const loadSpotsFailed: ActionWithErrorCreator = (error) => ({ type: LOAD_SPOTS_FAILED, error, description: \"Nie udało nam się załadować miejsc odbioru, spróbuj ponownie!\" });\nexport const loadSpotsSuccess: ActionWithPayloadCreator = (payload: Spot[]) => ({ type: LOAD_SPOTS_SUCCESS, payload });\nexport const setSpot: ActionWithPayloadCreator = (payload: Spot) => ({ type: SET_SPOT, payload });\nexport const createShoppingOrder: ActionWithPayloadCreator = (payload: ShoppingOrderPayload) => ({ type: CREATE_SHOPPING_ORDER, payload });\nexport const createShoppingOrderSuccess: ActionCreator = () => ({ type: CREATE_SHOPPING_ORDER_SUCCESS });\nexport const createShoppingOrderFailed = (error: string, description: string) => ({ type: CREATE_SHOPPING_ORDER_FAILED, error, description })\nexport const loadMyOrders: ActionWithPayloadCreator = (token: string) => ({ type: LOAD_MY_ORDERS, payload: token });\nexport const loadMyOrdersSuccess: ActionWithPayloadCreator = (payload: Order[]) => ({type: LOAD_MY_ORDERS_SUCCESS, payload});\nexport const loadMyOrdersFailed: ActionWithErrorCreator = (error) => ({ type: LOAD_MY_ORDERS_FAILED, error, description: \"Nie mogliśmy załadować Twoich wcześniejszych zamówień. Spróbuj ponownie za chwilę!\" })\n\nexport type Actions =\n | LoadProducts\n | LoadProductsFailed\n | LoadProductsSuccess\n | AddProductToBasket\n | RemoveProductFromBasket\n | LoadSpots\n | LoadSpotsFailed\n | LoadSpotsSuccess\n | SetSpot\n | CreateShoppingOrder\n | CreateShoppingOrderFailed\n | CreateShoppingOrderSuccess\n | LoadMyOrders\n | LoadMyOrdersSuccess\n | LoadMyOrdersFailed;","import { getConfig } from \"../../config/configuration\";\nimport { Basket, Spot, OrderResponse } from \"./models\";\n\nexport async function loadProductsApi() {\n var config = await getConfig();\n\n const response = await fetch(`${config.apiUrl}/shop/products`);\n\n if(response.status === 404) {\n return [];\n } else if(response.ok) {\n const items = await response.json();\n return items;\n } else {\n throw new Error(response.statusText);\n }\n}\n\nexport async function loadSpotsApi() {\n var config = await getConfig();\n\n const response = await fetch(`${config.apiUrl}/shop/spots/5`);\n\n if(response.ok) {\n const items = await response.json();\n\n return items;\n } else {\n throw new Error(response.statusText);\n }\n}\n\nexport async function createShoppingOrderApi(basket: Basket, spot: Spot, token: string) {\n var config = await getConfig();\n\n const response = await fetch(`${config.apiUrl}/shop/order`, {\n headers: {\n 'Authorization': `Bearer ${token}`,\n 'Content-Type': 'application/json',\n 'Accept': 'application/json'\n },\n credentials: 'include',\n method: 'POST',\n body: JSON.stringify({\n spotId: spot.id,\n province: 5,\n products: basket.products.map(({ id, count }) => ({\n id,\n quantity: count\n }))\n })\n });\n\n if(response.ok) {\n return 200;\n } else if(response.status === 409 || response.status === 402) { \n return response.status;\n } else {\n throw new Error(response.statusText);\n }\n}\n\nexport async function loadMyOrdersApi(token: string) {\n var config = await getConfig();\n\n const response = await fetch(`${config.apiUrl}/shop/orders`, {\n headers: {\n 'Authorization': `Bearer ${token}`,\n 'Accept': 'application/json'\n },\n credentials: 'include',\n method: 'GET'\n });\n\n if(response.ok) {\n\n const orders: OrderResponse[] = await response.json();\n \n return orders.map(o => ({...o, orderDate: new Date(o.orderDate)}));\n } else {\n throw new Error(response.statusText);\n }\n}","import { takeEvery, put, call, delay } from \"redux-saga/effects\";\nimport { LOAD_PRODUCTS, LOAD_SPOTS, CREATE_SHOPPING_ORDER, LOAD_MY_ORDERS } from \"./actionTypes\";\nimport { loadProductsSuccess, loadProductsFailed, loadSpotsFailed, loadSpotsSuccess, createShoppingOrderFailed, createShoppingOrderSuccess, CreateShoppingOrder, LoadMyOrders, loadMyOrdersFailed, loadMyOrdersSuccess } from \"./actionts\";\nimport { loadProductsApi, loadSpotsApi, createShoppingOrderApi, loadMyOrdersApi } from \"./api\";\nimport ReactGA from 'react-ga';\n\nfunction* loadProductsStep() {\n try {\n const data = yield call(loadProductsApi);\n\n yield put(loadProductsSuccess(data));\n } catch(e) {\n yield put(loadProductsFailed(e.message));\n }\n}\n\nfunction* loadSpotsStep() {\n try {\n const data = yield call(loadSpotsApi);\n\n yield put(loadSpotsSuccess(data));\n } catch(e) {\n yield put(loadSpotsFailed(e.message));\n }\n}\n\nfunction* createShoppingOrderStep({ payload } : CreateShoppingOrder) {\n try {\n\n const status = yield call(createShoppingOrderApi, payload.basket, payload.selectedSpot, payload.token);\n if(status === 200) {\n yield put(createShoppingOrderSuccess());\n\n ReactGA.event({ action: 'Order submitted', category: 'Shop' });\n\n yield delay(5000);\n\n window.location.assign(\"/#/\");\n } else if(status === 409) {\n ReactGA.event({ action: 'Order submission failed - INVENTORY LOW', category: 'Shop'})\n yield put(createShoppingOrderFailed(\"Nie udało się złożyć zamówienia.\", \"Nie posiadamy wystarczającej ilości danego produktu.\")); \n } else if(status === 402) {\n ReactGA.event({ action: 'Order submission failed - INSUFFICIENT POINTS', category: 'Shop'})\n yield put(createShoppingOrderFailed(\"Nie udało się złożyć zamówienia.\", \"Nie masz wystarczającej ilości SmartPunktów.\"))\n }\n \n } catch(e) {\n yield put(createShoppingOrderFailed(\"Błąd serwera\", \"Nie udało się złożyć zamówienia. Spróbuj ponownie!\"));\n }\n}\n\nfunction* loadMyOrdersStep({ payload} : LoadMyOrders) {\n try {\n\n const token = payload;\n\n const orders = yield call(loadMyOrdersApi, token);\n\n yield put(loadMyOrdersSuccess(orders));\n\n } catch(e) {\n yield put(loadMyOrdersFailed(e.message));\n }\n}\n\nexport function* loadProducts() {\n yield takeEvery(LOAD_PRODUCTS, loadProductsStep);\n}\n\nexport function* loadSpots() {\n yield takeEvery(LOAD_SPOTS, loadSpotsStep);\n}\n\nexport function* createShoppingOrderSaga() {\n yield takeEvery(CREATE_SHOPPING_ORDER, createShoppingOrderStep);\n}\n\nexport function* loadMyOrdersSaga() {\n yield takeEvery(LOAD_MY_ORDERS, loadMyOrdersStep)\n}","import { getConfig } from \"../../config/configuration\";\nimport { MatchHeader } from \"../matches/models\";\n\nclass DesktopApi {\n\n constructor() {\n throw new Error(\"This class is meant to be static\")\n }\n\n public static async getUnconfirmedMatches(token: string, year: string): Promise {\n var config = await getConfig();\n\n const response = await fetch(`${config.apiUrl}/players/me/matches/${year}/awaiting-confirmation`, {\n headers: {\n 'Content-Type': 'application/json',\n 'Accept': 'application/json',\n 'Authorization': `Bearer ${token}`\n },\n credentials: 'include',\n method: 'GET'\n });\n\n if(response.ok) {\n const items: MatchHeader[] = await response.json();\n\n return items.map(x => ({...x, date: new Date(x.date)}))\n } else {\n throw new Error(response.statusText);\n }\n }\n\n public static async getConfirmedMatches(token: string, year: string) {\n var config = await getConfig();\n\n const response = await fetch(`${config.apiUrl}/players/me/matches/${year}/confirmed`, {\n headers: {\n 'Content-Type': 'application/json',\n 'Accept': 'application/json',\n 'Authorization': `Bearer ${token}`\n },\n credentials: 'include',\n method: 'GET'\n });\n\n if(response.ok) {\n const items: MatchHeader[] = await response.json();\n\n return items.map(x => ({...x, date: new Date(x.date)}))\n } else {\n throw new Error(response.statusText);\n }\n }\n\n}\n\nexport default DesktopApi;","import { call, put, takeEvery } from \"redux-saga/effects\";\nimport { getConfig } from \"../../config/configuration\";\nimport { loadMyConfirmedMatchesFailed, loadMyConfirmedMatchesSuccess, LoadMyUnconfirmedMatches, loadMyUnconfirmedMatchesFailed, loadMyUnconfirmedMatchesSuccess } from \"./actions\";\nimport { LOAD_MY_CONFIRMED_MATCHES, LOAD_MY_UNCONFIRMED_MATCHES } from \"./actionTypes\";\nimport DesktopApi from \"./api\";\nimport { MatchHeader } from \"../matches/models\";\n\nfunction* loadMyUnconfirmedMatchesStep({ payload } : LoadMyUnconfirmedMatches) {\n try {\n const config = yield call(getConfig);\n\n const seasons = config.matchesSeasons as string[];\n\n let result: MatchHeader[] = [];\n\n for(let i = 0; i < seasons.length; i++) {\n const res: MatchHeader[] = yield call(DesktopApi.getUnconfirmedMatches, payload, seasons[i]);\n result = [...result, ...res];\n }\n \n yield put(loadMyUnconfirmedMatchesSuccess(result));\n } catch(e) {\n yield put(loadMyUnconfirmedMatchesFailed(e));\n }\n}\n\nfunction* loadMyConfirmedMatchesStep({ payload } : LoadMyUnconfirmedMatches) {\n try {\n const config = yield call(getConfig);\n\n const seasons = config.matchesSeasons as string[];\n\n let result: MatchHeader[] = [];\n\n for(let i = 0; i < seasons.length; i++) {\n const res: MatchHeader[] = yield call(DesktopApi.getConfirmedMatches, payload, seasons[i]);\n result = [...result, ...res];\n }\n\n yield put(loadMyConfirmedMatchesSuccess(result));\n } catch(e) {\n yield put(loadMyConfirmedMatchesFailed(e));\n }\n}\n\nexport function* loadMyUnconfirmedMatchesSaga() {\n yield takeEvery(LOAD_MY_UNCONFIRMED_MATCHES, loadMyUnconfirmedMatchesStep);\n}\n\nexport function* loadMyConfirmedMatchesSaga() {\n yield takeEvery(LOAD_MY_CONFIRMED_MATCHES, loadMyConfirmedMatchesStep);\n}","export const LOAD_PLAYER_STATS = \"LOAD_PLAYER_STATS\";\nexport const LOAD_PLAYER_STATS_SUCCESS = \"LOAD_PLAYER_STATS_SUCCESS\";\nexport const LOAD_PLAYER_STATS_FAILED = \"LOAD_PLAYER_STATS_FAILED\";\n\nexport const LOAD_PLAYER_MATCHES = \"LOAD_PLAYER_MATCHES\";\nexport const LOAD_PLAYER_MATCHES_SUCCESS = \"LOAD_PLAYER_MATCHES_SUCCESS\";\nexport const LOAD_PLAYER_MATCHES_FAILED = \"LOAD_PLAYER_MATCHES_FAILED\";","import { ActionWithPayload, ActionWithError, ActionWithPayloadCreator, ActionWithErrorCreator } from \"../../framework/action\";\nimport { LOAD_PLAYER_STATS, LOAD_PLAYER_STATS_SUCCESS, LOAD_PLAYER_STATS_FAILED, LOAD_PLAYER_MATCHES, LOAD_PLAYER_MATCHES_SUCCESS, LOAD_PLAYER_MATCHES_FAILED } from \"./actionTypes\";\nimport { Stat } from \"./model\";\nimport { PlayerMatch } from \"../matches/models\";\n\nexport interface LoadPlayerStats extends ActionWithPayload {\n type: typeof LOAD_PLAYER_STATS;\n}\n\nexport interface LoadPlayerStatsSuccess extends ActionWithPayload {\n type: typeof LOAD_PLAYER_STATS_SUCCESS;\n}\n\nexport interface LoadPlayerStatsFailed extends ActionWithError {\n type: typeof LOAD_PLAYER_STATS_FAILED;\n}\n\nexport interface LoadPlayerMatches extends ActionWithPayload {\n type: typeof LOAD_PLAYER_MATCHES;\n}\n\nexport interface LoadPlayerMatchesSuccess extends ActionWithPayload {\n type: typeof LOAD_PLAYER_MATCHES_SUCCESS;\n} \n\nexport interface LoadPlayerMatchesFailed extends ActionWithError {\n type: typeof LOAD_PLAYER_MATCHES_FAILED;\n}\n\nexport const loadPlayerStats: ActionWithPayloadCreator = (player) => ({ type: LOAD_PLAYER_STATS, payload: player });\nexport const loadPlayerStatsSuccess: ActionWithPayloadCreator = (stats) => ({ type: LOAD_PLAYER_STATS_SUCCESS, payload: stats});\nexport const loadPlayerStatsFailed: ActionWithErrorCreator = (error) => ({ type: LOAD_PLAYER_STATS_FAILED, error, description: 'Nie udało nam się załadować wszystkich statystyk.' });\n\nexport const loadPlayerMatches: ActionWithPayloadCreator = (player) => ({ type: LOAD_PLAYER_MATCHES, payload: player });\nexport const loadPlayerMatchesSuccess: ActionWithPayloadCreator = (matches) => ({ type: LOAD_PLAYER_MATCHES_SUCCESS, payload: matches });\nexport const loadPlayerMatchesFailed: ActionWithErrorCreator = (error) => ({ type: LOAD_PLAYER_MATCHES_FAILED, error, description: 'Nie udało nam się załadować wszystkich meczy zawodnika' });\n\nexport type Actions = \n | LoadPlayerStats\n | LoadPlayerStatsFailed\n | LoadPlayerStatsSuccess\n | LoadPlayerMatches\n | LoadPlayerMatchesFailed\n | LoadPlayerMatchesSuccess;","import { getConfig } from \"../../config/configuration\";\nimport { MatchHeader } from \"../matches/models\";\n\nexport async function loadPlayersStatsApi(player: string, year: string) {\n\n const config = await getConfig();\n\n const response = await fetch(`${config.apiUrl}/stats/${year}/${player}`, {\n headers: {\n 'Content-Type': 'application/json',\n 'Accept': 'application/json'\n },\n credentials: 'include'\n });\n\n if(response.ok) {\n const data = await response.json();\n\n return data.map((x:any) => ({ ...x, leagueStartDate: new Date(x.leagueStartDate) }));\n } else {\n throw new Error(response.statusText);\n }\n\n}\n\nexport async function loadPlayersMatchesApi(player: string, year: string) {\n\n const config = await getConfig();\n\n\n const response = await fetch(`${config.apiUrl}/players/${year}/${player}/matches`, {\n headers: {\n 'Content-Type': 'application/json',\n 'Accept': 'application/json'\n },\n credentials: 'include'\n });\n\n if(response.ok) {\n const data = await response.json() as MatchHeader[];\n\n return data.map(r => ({ ...r, date: new Date(r.date) }));\n } else {\n throw new Error(response.statusText);\n }\n\n}","import { takeEvery, put, call, all } from \"redux-saga/effects\";\nimport { LOAD_PLAYER_STATS, LOAD_PLAYER_MATCHES } from \"./actionTypes\";\nimport { LoadPlayerStats, loadPlayerStatsSuccess, loadPlayerStatsFailed, LoadPlayerMatches, loadPlayerMatchesFailed, loadPlayerMatchesSuccess } from \"./actions\";\nimport { getConfig } from \"../../config/configuration\";\nimport { loadPlayersStatsApi, loadPlayersMatchesApi } from \"./api\";\nimport { Stat } from \"./model\";\nimport { PlayerMatch } from \"../matches/models\";\n\nfunction* loadPlayerMatchesStep({ payload } : LoadPlayerMatches) {\n try {\n\n const playerId = payload;\n\n const config = yield call(getConfig);\n\n const callables = (config.seasons as string[]).map(s => loadPlayersMatchesApi(playerId, s));\n\n const data: PlayerMatch[][] = yield all(callables);\n\n const matches = data.reduce((prev, curr) => [...prev, ...curr], []);\n\n yield put(loadPlayerMatchesSuccess(matches));\n\n } catch(e) {\n yield put(loadPlayerMatchesFailed(e.message));\n }\n}\n\nfunction* loadPlayerStatsStep({ payload } : LoadPlayerStats) {\n try {\n const playerId = payload;\n\n const config = yield call(getConfig);\n\n const callables = (config.seasons as string[]).map(s => loadPlayersStatsApi(playerId, s));\n\n const data: Stat[][] = yield all(callables);\n\n const stats = data.reduce((prev, curr) => [...prev, ...curr], []);\n \n yield put(loadPlayerStatsSuccess(stats));\n\n } catch(e) {\n yield put(loadPlayerStatsFailed(e.message));\n }\n}\n\nexport function* loadPlayerMatchesSaga() {\n yield takeEvery(LOAD_PLAYER_MATCHES, loadPlayerMatchesStep);\n}\n\nexport function* loadPlayerStatsSaga() {\n yield takeEvery(LOAD_PLAYER_STATS, loadPlayerStatsStep)\n}","export const CREATE_MATCH_OFFER = \"CREATE_MATCH_OFFER\";\nexport const CREATE_MATCH_OFFER_SUCCESS = \"CREATE_MATCH_OFFER_SUCCESS\";\nexport const CREATE_MATCH_OFFER_FAILED = \"CREATE_MATCH_OFFER_FAILED\";\n\nexport const CHANGE_FORM_STATE = \"CHANGE_FORM_STATE\";\n\nexport const GET_MATCH_OFFERS = \"GET_MATCH_OFFERS\";\nexport const GET_MATCH_OFFERS_SUCCESS = \"GET_MATCH_OFFERS_SUCCESS\";\nexport const GET_MATCH_OFFERS_FAILED = \"GET_MATCH_OFFERS_FAILED\";\n\nexport const CANCEL_MATCH_OFFER = \"CANCEL_MATCH_OFFER\";\nexport const CANCEL_MATCH_OFFER_SUCCESS = \"CANCEL_MATCH_OFFER_SUCCESS\";\nexport const CANCEL_MATCH_OFFER_FAILED = \"CANCEL_MATCH_OFFER_FAILED\";\n\nexport const ACCEPT_MATCH_OFFER = \"ACCEPT_MATCH_OFFER\";\nexport const ACCEPT_MATCH_OFFER_SUCCESS = \"ACCEPT_MATCH_OFFER_SUCCESS\";\nexport const ACCEPT_MATCH_OFFER_FAILED = \"ACCEPT_MATCH_OFFER_FAILED\";","import { ActionCreator2, ActionWithPayload2, Action2, ActionWithPayloadCreator2, ActionWithErrorCreator2, ActionWithError2 } from \"../../framework/action\";\nimport { CreateMatchOfferPayload, FormState, MatchOfferHeader } from \"./models\";\nimport { CREATE_MATCH_OFFER, CREATE_MATCH_OFFER_SUCCESS, CREATE_MATCH_OFFER_FAILED, CHANGE_FORM_STATE, GET_MATCH_OFFERS, GET_MATCH_OFFERS_SUCCESS, GET_MATCH_OFFERS_FAILED, CANCEL_MATCH_OFFER, CANCEL_MATCH_OFFER_SUCCESS, ACCEPT_MATCH_OFFER, ACCEPT_MATCH_OFFER_SUCCESS, ACCEPT_MATCH_OFFER_FAILED, CANCEL_MATCH_OFFER_FAILED } from \"./actionTypes\";\n\nexport interface CreateMatchOffer extends ActionWithPayload2 { }\n\nexport interface CreateMatchOfferSuccess extends Action2 { }\n\nexport interface CreateMatchOfferFailed extends ActionWithError2 { }\n\nexport interface ChangeFormState extends ActionWithPayload2 { }\n\nexport interface GetMatchOffers extends ActionWithPayload2 { }\n\nexport interface GetMatchOffersSuccess extends ActionWithPayload2 { }\n\nexport interface GetMatchOffersFailed extends ActionWithError2 { }\n\nexport interface CancelMatchOffer extends ActionWithPayload2 { }\n\nexport interface CancelMatchOfferSuccess extends Action2 { }\n\nexport interface CancelMatchOfferFailed extends ActionWithError2 { }\n\nexport interface AcceptMatchOffer extends ActionWithPayload2 { }\n\nexport interface AcceptMatchOfferSuccess extends Action2 { }\n\nexport interface AcceptMatchOfferFailed extends ActionWithError2 { }\n\nconst handleSubmitMatchFailedDescription = (error: any) => {\n if(!error || !error.id) {\n return \"Akceptacja propozycji meczu nie powiodła się, spróbuj ponownie!\";\n }\n switch(error.id) {\n case 1: return \"Liga nie pozwala jeszcze na umawianie nowych meczów\";\n case 2: return \"Zawodnik nie jest zapisany do ligii\";\n case 3: return \"Przeciwnik nie jest zapisany do ligii\";\n case 4: return \"Klub nie wspiera tej ligii\";\n case 5: return \"Zawodnicy rozegrali już mecz między sobą, lub mają taki mecz umówiony\";\n case 15: return \"Propozycja już nieaktualna bądź próbujesz zaaceptować własną propoyzcję\";\n default: return \"Akceptacja propozycji meczu nie powiodła się, spróbuj ponownie!\";\n }\n}\n\nconst handleSubmitMatchFailedContext = (error: any) => {\n if(error && error.id) {\n return {\n warning: true\n };\n } \n\n return undefined;\n}\n\nexport const createMatchOfferSuccess: ActionCreator2 = () => ({ type: \"CREATE_MATCH_OFFER_SUCCESS\" });\nexport const createMatchOffer: ActionWithPayloadCreator2 = (payload) => ({ type: \"CREATE_MATCH_OFFER\", payload });\nexport const createMatchOfferFailed: ActionWithErrorCreator2 = (error) => ({ type: \"CREATE_MATCH_OFFER_FAILED\", error, description: \"Nie udało się wpisać meczu do Giełdy Meczów.\" })\nexport const createChangeFormState: ActionWithPayloadCreator2 = (formState) => ({ type: CHANGE_FORM_STATE, payload: formState });\n\nexport const getMatchOffers: ActionWithPayloadCreator2 = (payload) => ({ type: \"GET_MATCH_OFFERS\", payload });\nexport const getMatchOffersSuccess: ActionWithPayloadCreator2 = (payload) => ({ type: \"GET_MATCH_OFFERS_SUCCESS\", payload });\nexport const getMatchOffersFailed: ActionWithErrorCreator2 = (error) => ({ type: \"GET_MATCH_OFFERS_FAILED\", error, description: \"Nie udało nam się załadować Giełdy Meczów.\" });\n\nexport const cancelMatchOffer: ActionWithPayloadCreator2 = (payload) => ({ type: \"CANCEL_MATCH_OFFER\", payload });\nexport const cancelMatchOfferSuccess: ActionCreator2 = () => ({ type: \"CANCEL_MATCH_OFFER_SUCCESS\" });\nexport const cancelMatchOfferFailed: ActionWithErrorCreator2 = (error) => ({ type: \"CANCEL_MATCH_OFFER_FAILED\", error, description: \"Nie udało nam się anulować Twojego meczu. Nie martw się jednak, nasze chomiki biegną na ratunek aby anulować ten mecz!\" });\n\nexport const acceptMatchOffer: ActionWithPayloadCreator2 = (payload) => ({ type: \"ACCEPT_MATCH_OFFER\", payload });\nexport const acceptMatchOfferSuccess: ActionCreator2 = () => ({ type: \"ACCEPT_MATCH_OFFER_SUCCESS\" });\nexport const acceptMatchOfferFailed: ActionWithErrorCreator2 = (error) => ({ type: \"ACCEPT_MATCH_OFFER_FAILED\", error, description: handleSubmitMatchFailedDescription(error), context: handleSubmitMatchFailedContext(error) })\n\nexport type Actions = \n | CreateMatchOffer\n | CreateMatchOfferSuccess\n | CreateMatchOfferFailed\n | ChangeFormState\n | GetMatchOffers\n | GetMatchOffersSuccess\n | GetMatchOffersFailed\n | CancelMatchOffer\n | CancelMatchOfferFailed\n | CancelMatchOfferSuccess\n | AcceptMatchOffer\n | AcceptMatchOfferFailed\n | AcceptMatchOfferSuccess;","import { getConfig } from \"../../config/configuration\";\nimport { CreateMatchOfferPayload, MatchOfferHeader } from \"./models\";\n\nconst SuccessType = \"SUCCESS\";\nconst ServerErrorType = \"SERVER_ERROR\";\nconst UnAuthType = \"UNAUTH\";\nconst InvalidRequestType = \"INVALID_REQUEST\"\n\ninterface ApiResponse {\n type: string;\n}\n\ninterface ApiSuccess extends ApiResponse {\n type: typeof SuccessType;\n payload: T;\n}\n\ninterface ApiServerError extends ApiResponse {\n type: typeof ServerErrorType;\n}\n\ninterface ApiUnAuth extends ApiResponse {\n type: typeof UnAuthType;\n}\n\ninterface ApiInvalidRequest extends ApiResponse {\n type: typeof InvalidRequestType;\n errors: any;\n}\n\nexport type ApiResponses = ApiSuccess | ApiServerError | ApiUnAuth | ApiInvalidRequest;\n\nconst success: (payload: T) => ApiSuccess = (payload: T) => ({ type: \"SUCCESS\", payload });\nconst serverError: ApiServerError = ({ type: \"SERVER_ERROR\" });\nconst unAuth: ApiUnAuth = ({ type: \"UNAUTH\" });\nconst invalidRequest: (errors: any) => ApiInvalidRequest = (errors: any) => ({ type: \"INVALID_REQUEST\", errors });\n\nclass MatchOffersApi {\n constructor() {\n throw new Error(\"This class is meant to be static!\");\n }\n\n public static async acceptMatchOffer(x: { id: string, leagueId: string, leagueYear: string, token: string }): Promise> {\n const config = await getConfig();\n const { id, leagueId, leagueYear, token } = x;\n\n const response = await fetch(`${config.apiUrl}/match-offers/${leagueYear}/${leagueId}/${id}/accept`, {\n headers: {\n 'Authorization': `Bearer ${token}`,\n 'Content-Type': 'application/json',\n 'Accept': 'application/json'\n },\n method: 'POST',\n credentials: 'include'\n });\n\n if (response.status === 400) {\n var body = await response.json();\n return invalidRequest(body);\n }\n\n if (response.status < 400) {\n return success({});\n }\n\n if (response.status === 401 || response.status === 403) {\n return unAuth;\n }\n\n return serverError;\n }\n\n public static async cancelMatchOffer(x: { id: string, leagueId: string, leagueYear: string, token: string }): Promise> {\n const config = await getConfig();\n const { id, leagueId, leagueYear, token } = x;\n\n const response = await fetch(`${config.apiUrl}/match-offers/${leagueYear}/${leagueId}/${id}/cancel`, {\n headers: {\n 'Authorization': `Bearer ${token}`,\n 'Content-Type': 'application/json',\n 'Accept': 'application/json'\n },\n method: 'POST',\n credentials: 'include'\n });\n\n if (response.status === 400) {\n var body = await response.json();\n return invalidRequest(body.errors);\n }\n\n if (response.status < 400) {\n return success({});\n }\n\n if (response.status === 401 || response.status === 403) {\n return unAuth;\n }\n\n return serverError;\n }\n\n public static async getMatchOffers(x: {leagueId: string, leagueYear: string}): Promise> {\n var config = await getConfig();\n const {leagueId, leagueYear} = x;\n\n const response = await fetch(`${config.apiUrl}/match-offers/${leagueYear}/${leagueId}`, {\n headers: {\n 'Accept': 'application/json'\n },\n method: 'GET'\n });\n\n if (response.status === 400) {\n const body = await response.json();\n return invalidRequest(body.errors);\n }\n\n if (response.status >= 200 && response.status < 300) {\n const body: MatchOfferHeader[] = await response.json();\n return success(body.map(v => ({ ...v, createdOn: new Date(v.createdOn), startDate: new Date(v.startDate), endDate: new Date(v.endDate) })));\n }\n\n if (response.status === 401 || response.status === 403) {\n return unAuth;\n }\n\n return serverError;\n }\n\n public static async createMatchOffer({ clubIds, description, endDate, endTime, leagueId, leagueYear, startDate, startTime, token }: CreateMatchOfferPayload): Promise> {\n var config = await getConfig();\n\n const response = await fetch(`${config.apiUrl}/match-offers/${leagueYear}/${leagueId}`, {\n headers: {\n 'Content-Type': 'application/json',\n 'Accept': 'application/json',\n 'Authorization': `Bearer ${token}`\n },\n credentials: 'include',\n method: 'POST',\n body: JSON.stringify({\n clubIds,\n startDate,\n startTime,\n endDate,\n endTime,\n description\n })\n });\n\n if (response.status === 400) {\n var body = await response.json();\n return invalidRequest(body.errors);\n }\n\n if (response.status < 400) {\n return success({});\n }\n\n if (response.status === 401 || response.status === 403) {\n return unAuth;\n }\n\n return serverError;\n }\n}\n\nexport default MatchOffersApi;","import { takeEvery, call, put } from \"redux-saga/effects\";\nimport { CREATE_MATCH_OFFER, GET_MATCH_OFFERS, CANCEL_MATCH_OFFER, ACCEPT_MATCH_OFFER } from \"./actionTypes\";\nimport { CreateMatchOffer, createMatchOfferSuccess, createMatchOfferFailed, createChangeFormState, GetMatchOffers, getMatchOffersFailed, getMatchOffersSuccess, getMatchOffers, CancelMatchOffer, AcceptMatchOffer, cancelMatchOfferFailed, cancelMatchOfferSuccess, acceptMatchOfferFailed, acceptMatchOfferSuccess } from \"./actions\";\nimport MatchOffersApi, { ApiResponses } from \"./api\";\nimport { SUBMITTING, SUBMITTED, failed, MatchOfferHeader } from \"./models\";\n\nfunction* createMatchOfferStep({ payload }: CreateMatchOffer) {\n\n yield put(createChangeFormState(SUBMITTING));\n const response: ApiResponses<{}> = yield call(MatchOffersApi.createMatchOffer, payload);\n\n switch (response.type) {\n case \"INVALID_REQUEST\": {\n yield put(createChangeFormState(failed(\"\", response.errors)));\n break;\n }\n case \"SERVER_ERROR\":\n case \"UNAUTH\": {\n yield put(createMatchOfferFailed(response.type));\n yield put(createChangeFormState(failed(\"\", {})));\n break;\n }\n case \"SUCCESS\": {\n yield put(createMatchOfferSuccess());\n yield put(createChangeFormState(SUBMITTED));\n yield put(getMatchOffers({ leagueId: payload.leagueId, leagueYear: payload.leagueYear }));\n\n break;\n }\n\n }\n}\n\nfunction* getMatchOffersStep({ payload }: GetMatchOffers) {\n\n const response: ApiResponses = yield call(MatchOffersApi.getMatchOffers, payload);\n\n switch (response.type) {\n case \"INVALID_REQUEST\":\n case \"SERVER_ERROR\":\n case \"UNAUTH\": {\n yield put(getMatchOffersFailed(response.type));\n break;\n }\n case \"SUCCESS\": {\n yield put(getMatchOffersSuccess(response.payload));\n break;\n }\n }\n}\n\nfunction* cancelMatchOfferStep({ payload }: CancelMatchOffer) {\n const response: ApiResponses<{}> = yield call(MatchOffersApi.cancelMatchOffer, payload);\n\n switch (response.type) {\n case \"INVALID_REQUEST\": {\n yield put(cancelMatchOfferFailed(response.type, { warning: JSON.stringify(response.errors) }));\n break;\n }\n case \"SERVER_ERROR\":\n case \"UNAUTH\": {\n yield put(cancelMatchOfferFailed(response.type));\n break;\n }\n case \"SUCCESS\": {\n yield put(cancelMatchOfferSuccess());\n break;\n }\n }\n\n yield put(getMatchOffers({\n leagueId: payload.leagueId,\n leagueYear: payload.leagueYear,\n }));\n}\n\nfunction* acceptMatchOfferStep({ payload }: AcceptMatchOffer) {\n const response: ApiResponses<{}> = yield call(MatchOffersApi.acceptMatchOffer, payload);\n\n switch (response.type) {\n case \"INVALID_REQUEST\": {\n yield put(acceptMatchOfferFailed(response.errors));\n break;\n }\n case \"SERVER_ERROR\":\n case \"UNAUTH\": {\n yield put(acceptMatchOfferFailed(response.type));\n break;\n }\n case \"SUCCESS\": {\n yield put(acceptMatchOfferSuccess());\n window.location.assign(`/#/leagues/${payload.leagueYear}/${payload.leagueId}/mine-matches`);\n break;\n }\n }\n\n put(getMatchOffers({\n leagueId: payload.leagueId,\n leagueYear: payload.leagueYear,\n }));\n}\n\nexport function* cancelMatchOfferSaga() {\n yield takeEvery(CANCEL_MATCH_OFFER, cancelMatchOfferStep);\n}\n\nexport function* acceptMatchOfferSaga() {\n yield takeEvery(ACCEPT_MATCH_OFFER, acceptMatchOfferStep);\n}\n\nexport function* createMatchOfferSaga() {\n yield takeEvery(CREATE_MATCH_OFFER, createMatchOfferStep);\n}\n\nexport function* getMatchOffersSaga() {\n yield takeEvery(GET_MATCH_OFFERS, getMatchOffersStep)\n}","export const SET_LEAGUE_TO_REGISTER = \"SET_LEAGUE_TO_REGISTER\";\nexport const SET_REGISTRATION_PLAYER_TYPE = \"SET_REGISTRATION_PLAYER_TYPE\";\nexport const SET_UPDATED_PLAYER = \"SET_UPDATED_PLAYER\";\n\nexport const SEND_SMS_VERIFICATION_CODE = \"SEND_SMS_VERIFICATION_CODE\";\nexport const SEND_SMS_VERIFICATION_CODE_SUCCESS = \"SEND_SMS_VERIFICATION_CODE_SUCCESS\";\nexport const SEND_SMS_VERIFICATION_CODE_FAILED = \"SEND_SMS_VERIFICATION_CODE_FAILED\";\n\nexport const VERIFY_SMS_CODE = \"VERIFY_SMS_CODE\";\nexport const VERIFY_SMS_CODE_SUCCESS = \"VERIFY_SMS_CODE_SUCCESS\";\nexport const VERIFY_SMS_CODE_FAILED = \"VERIFY_SMS_CODE_FAILED\";\n\nexport const GET_PRICE_INFO_FOR_LEAGUE = \"GET_PRICE_INFO_FOR_LEAGUE\";\nexport const GET_PRICE_INFO_FOR_LEAGUE_SUCCESS = \"GET_PRICE_INFO_FOR_LEAGUE_SUCCESS\";\nexport const GET_PRICE_INFO_FOR_LEAGUE_FAILED = \"GET_PRICE_INFO_FOR_LEAGUE_FAILED\";\n\nexport const MAKE_REGISTRATION = \"MAKE_REGISTRATION\";\nexport const MAKE_REGISTRATION_SUCCESS = \"MAKE_REGISTRATION_SUCCESS\";\nexport const MAKE_REGISTRATION_FAILED = \"MAKE_REGISTRATION_FAILED\";\n\nexport const SEND_REGISTRATION_MESSAGE = \"SEND_REGISTRATION_MESSAGE\";\n\nexport const SET_REGISTRATION_FOR_PLAYER_TYPE_UPGRADE = \"SET_REGISTRATION_FOR_PLAYER_TYPE_UPGRADE\";\n\n\nexport const SET_TOURNAMENT_TO_REGISTER = \"SET_TOURNAMENT_TO_REGISTER\";\nexport const SET_TRAINING_TO_REGISTER = \"SET_TRAINING_TO_REGISTER\";\n","import { ActionWithPayload2, ActionWithPayloadCreator2, ActionCreator2, Action2, ActionWithError2, ActionWithErrorCreator2 } from \"../../framework/action\";\nimport { SET_LEAGUE_TO_REGISTER, SET_REGISTRATION_PLAYER_TYPE, SET_UPDATED_PLAYER, SEND_SMS_VERIFICATION_CODE, VERIFY_SMS_CODE, VERIFY_SMS_CODE_SUCCESS, VERIFY_SMS_CODE_FAILED, GET_PRICE_INFO_FOR_LEAGUE, GET_PRICE_INFO_FOR_LEAGUE_SUCCESS, GET_PRICE_INFO_FOR_LEAGUE_FAILED, MAKE_REGISTRATION, MAKE_REGISTRATION_SUCCESS, MAKE_REGISTRATION_FAILED, SEND_REGISTRATION_MESSAGE, SEND_SMS_VERIFICATION_CODE_SUCCESS, SEND_SMS_VERIFICATION_CODE_FAILED, SET_REGISTRATION_FOR_PLAYER_TYPE_UPGRADE, SET_TOURNAMENT_TO_REGISTER, SET_TRAINING_TO_REGISTER } from \"./actionTypes\";\nimport { RegisterToLeague, PlayerType, PriceInfo, RegistrationData } from \"./model\";\nimport { Player } from \"../players/models\";\nimport { RegisterToTournament } from \"../tournaments/models\";\nimport { RegisterToTraining } from \"../trainings/models\";\n\nexport interface SetLeagueToRegister extends ActionWithPayload2 { }\nexport interface SetRegistrationPlayerType extends ActionWithPayload2 { }\nexport interface SetUpdatedPlayer extends ActionWithPayload2 { }\n\nexport interface SendSmsVerificationCode extends ActionWithPayload2 { }\nexport interface SendSmsVerificationCodeSuccess extends ActionWithPayload2 { }\nexport interface SendSmsVerificationCodeFailed extends ActionWithError2 { }\n\nexport interface VerifySmsCode extends ActionWithPayload2 { }\nexport interface VerifySmsCodeSuccess extends Action2 { }\nexport interface VerifySmsCodeFailed extends ActionWithError2 { }\n\nexport interface GetPriceInfoForLeague extends ActionWithPayload2 {}\nexport interface GetPriceInfoForLeagueSuccess extends ActionWithPayload2 {}\nexport interface GetPriceInfoForLeagueFailed extends ActionWithError2 {}\n\nexport interface MakeRegistration extends ActionWithPayload2 { }\nexport interface MakeRegistrationSuccess extends ActionWithPayload2 { }\nexport interface MakeRegistrationFailed extends ActionWithError2 { }\n\nexport interface SendRegistrationMessage extends ActionWithPayload2 { }\n\nexport interface SetRegistrationForPlayerTypeUpgrade extends ActionWithPayload2 { }\n\nexport interface SetTournamentToRegister extends ActionWithPayload2 { }\nexport interface SetTrainingToRegister extends ActionWithPayload2 { }\n\nexport const setLeagueToRegister: ActionWithPayloadCreator2 = (payload) => ({\n type: \"SET_LEAGUE_TO_REGISTER\",\n payload\n});\n\nexport const setTournamentToRegister: ActionWithPayloadCreator2 = (payload) => ({\n type: \"SET_TOURNAMENT_TO_REGISTER\",\n payload\n});\n\nexport const setTrainingToRegister: ActionWithPayloadCreator2 = (payload) => ({\n type: \"SET_TRAINING_TO_REGISTER\",\n payload\n});\n\nexport const setRegistrationPlayerType: ActionWithPayloadCreator2 = (payload) => ({\n type: \"SET_REGISTRATION_PLAYER_TYPE\",\n payload\n});\n\nexport const setUpdatedPlayer: ActionWithPayloadCreator2 = (payload) => ({\n type: \"SET_UPDATED_PLAYER\",\n payload\n});\n\nexport const sendSmsVerificationCode : ActionWithPayloadCreator2 = (payload) => ({\n type: \"SEND_SMS_VERIFICATION_CODE\",\n payload\n});\n\nexport const sendSmsVerificationCodeSuccess : ActionWithPayloadCreator2 = (payload) => ({\n type: \"SEND_SMS_VERIFICATION_CODE_SUCCESS\",\n payload\n});\n\nexport const sendSmsVerificationCodeFailed : ActionWithErrorCreator2 = (error) => ({\n type: \"SEND_SMS_VERIFICATION_CODE_FAILED\",\n description: \"Nie udało się wysłać kodu potwierdzającego przez SMS. Sprawdź swój numer telefonu - być może ten numer został już wcześniej podany w rejestracji innego zawodnika?\",\n error\n})\n\nexport const verifySmsCode: ActionWithPayloadCreator2 = (payload) => ({\n type: \"VERIFY_SMS_CODE\",\n payload\n});\n\nexport const verifySmsCodeSuccess: ActionCreator2 = () => ({\n type: \"VERIFY_SMS_CODE_SUCCESS\"\n});\n\nexport const verifySmsCodeFailed: ActionWithErrorCreator2 = () => ({\n type: \"VERIFY_SMS_CODE_FAILED\",\n description: \"Błędny kod\",\n error: ''\n});\n\nexport const getPriceInfoForLeague: ActionWithPayloadCreator2 = (payload) => ({\n type: \"GET_PRICE_INFO_FOR_LEAGUE\",\n payload\n});\n\nexport const getPriceInfoForLeagueSuccess: ActionWithPayloadCreator2 = (payload) => ({\n type: \"GET_PRICE_INFO_FOR_LEAGUE_SUCCESS\",\n payload\n});\n\nexport const getPriceInfoForLeagueFailed: ActionWithErrorCreator2 = (error) => ({\n type: \"GET_PRICE_INFO_FOR_LEAGUE_FAILED\",\n error,\n description: \"Nie udało nam się obliczyć obniżonej ceny. Spróbuj ponownie.\"\n});\n\nexport const makeRegistration: ActionWithPayloadCreator2 = (payload) => ({\n type: \"MAKE_REGISTRATION\",\n payload\n});\n\nexport const makeRegistrationSuccess: ActionWithPayloadCreator2 = (payload) => ({\n type: \"MAKE_REGISTRATION_SUCCESS\",\n payload\n});\n\nexport const makeRegistrationFailed: ActionWithErrorCreator2 = (error, { description = \"Nie udało się zakończyć rejestracji. Spróbuj ponownie.\"}) => ({\n type: \"MAKE_REGISTRATION_FAILED\",\n error,\n description\n});\n\nexport const sendRegistrationMessage: ActionWithPayloadCreator2 = (payload) => ({\n type: \"SEND_REGISTRATION_MESSAGE\",\n payload\n});\n\nexport const setRegistrationForPlayerTypeUpgrade: ActionWithPayloadCreator2 = (payload) => ({\n type: \"SET_REGISTRATION_FOR_PLAYER_TYPE_UPGRADE\",\n payload\n});\n\nexport type Actions = \n | SetTournamentToRegister\n | SetTrainingToRegister\n | SetLeagueToRegister\n | SetRegistrationPlayerType\n | SetUpdatedPlayer\n | SendSmsVerificationCode\n | SendSmsVerificationCodeSuccess\n | SendSmsVerificationCodeFailed\n | VerifySmsCode\n | VerifySmsCodeSuccess\n | VerifySmsCodeFailed\n | GetPriceInfoForLeague\n | GetPriceInfoForLeagueSuccess\n | GetPriceInfoForLeagueFailed\n | MakeRegistration\n | MakeRegistrationSuccess\n | MakeRegistrationFailed\n | SendRegistrationMessage\n | SetRegistrationForPlayerTypeUpgrade;","import { getConfig } from \"../../config/configuration\";\nimport { PriceInfo, RegistrationStatus, PlayerType, RegisterToLeague } from \"./model\";\n\nclass RegistrationApi {\n\n public static async sendSmsVerificationCode(phoneNumber: string, token: string) :Promise {\n const config = await getConfig();\n\n const response = await fetch(`${config.apiUrl}/players/me/phone/authentication`, {\n headers: {\n 'Authorization': `Bearer ${token}`,\n 'Content-Type': 'application/json',\n 'Accept': 'application/json'\n },\n method: 'POST',\n credentials: 'include',\n body: JSON.stringify({\n phoneNumber\n })\n });\n\n return response.ok;\n }\n\n public static async verifySmsCode(code: string, token: string): Promise {\n const config = await getConfig();\n\n const response = await fetch(`${config.apiUrl}/players/me/phone/verification`, {\n headers: {\n 'Authorization': `Bearer ${token}`,\n 'Content-Type': 'application/json',\n 'Accept': 'application/json'\n },\n method: 'POST',\n credentials: 'include',\n body: JSON.stringify({\n code\n })\n });\n\n return response.ok;\n }\n\n public static async getPriceInfo(leagueId: string, leagueYear: string, promoCode: string, referral: string, playerId?: string) : Promise {\n const config = await getConfig();\n\n const response = await fetch(`${config.apiUrl}/payment/${leagueYear}/${leagueId}/price-info`, {\n headers: {\n 'Content-Type': 'application/json',\n 'Accept': 'application/json'\n },\n method: 'POST',\n body: JSON.stringify({\n promoCode,\n referral,\n playerId\n })\n });\n\n if(response.ok) {\n return await response.json();\n }\n\n throw new Error(response.statusText);\n }\n\n public static async register(token: string, playerType: PlayerType, promoCode: string, referral: string, target: RegisterToLeague, isUpgrading: boolean) : Promise {\n const config = await getConfig();\n\n const response = await fetch(`${config.apiUrl}/registrations`, {\n headers: {\n 'Content-Type': 'application/json',\n 'Accept': 'application/json',\n 'Authorization': `Bearer ${token}`,\n },\n method: 'POST',\n body: JSON.stringify({\n playerType,\n promoCode,\n referral,\n target,\n isUpgrading\n })\n });\n\n if(response.ok) {\n return await response.json();\n }\n\n throw new Error(response.statusText);\n }\n}\n\nexport default RegistrationApi;","import { SEND_SMS_VERIFICATION_CODE, VERIFY_SMS_CODE, GET_PRICE_INFO_FOR_LEAGUE, MAKE_REGISTRATION } from \"./actionTypes\";\nimport { takeEvery, call, put, take } from \"redux-saga/effects\";\nimport { SendSmsVerificationCode, VerifySmsCode, verifySmsCodeSuccess, verifySmsCodeFailed, GetPriceInfoForLeague, getPriceInfoForLeagueFailed, getPriceInfoForLeagueSuccess, MakeRegistration, sendRegistrationMessage, makeRegistrationFailed, makeRegistrationSuccess, sendSmsVerificationCodeFailed, sendSmsVerificationCodeSuccess } from \"./actions\";\nimport RegistrationApi from \"./api\";\nimport { updatePlayer, createPlayer } from \"../players/actions\";\nimport { CREATE_PLAYER_SUCCESS, UPDATE_PLAYER_SUCCESS } from \"../players/actionTypes\";\nimport { RegistrationStatus } from \"./model\";\n\nfunction* sendSmsVerificationCodeStep(action: SendSmsVerificationCode) {\n const { phoneNumber, token } = action.payload;\n\n const isOk = yield call(RegistrationApi.sendSmsVerificationCode, phoneNumber, token);\n \n if(!isOk) {\n yield put(sendSmsVerificationCodeFailed(\"\"));\n } else {\n yield put(sendSmsVerificationCodeSuccess(\"\"));\n }\n\n \n}\n\nfunction* verifySmsCodeStep(action: VerifySmsCode) {\n const { code, token } = action.payload;\n\n const isOk = yield call(RegistrationApi.verifySmsCode, code, token);\n\n if(isOk) {\n yield put(verifySmsCodeSuccess());\n } else {\n yield put(verifySmsCodeFailed(\"\"));\n }\n}\n\nfunction* getPriceInfoStep(action: GetPriceInfoForLeague) {\n const { leagueId, leagueYear, promoCode, referral, playerId } = action.payload;\n\n try\n {\n var result = yield call(RegistrationApi.getPriceInfo, leagueId, leagueYear, promoCode, referral, playerId);\n\n yield put(getPriceInfoForLeagueSuccess(result));\n }\n catch(e) {\n yield put(getPriceInfoForLeagueFailed(e))\n }\n}\n\nfunction* startRegistration({ payload }: MakeRegistration) {\n const { playerData, playerType, promoCode, referral, target, token, isUpgrading } = payload;\n\n if(playerData.id) {\n yield put(sendRegistrationMessage(\"Uaktualniam dane zawodnika...\"));\n yield put(updatePlayer({\n player: playerData,\n playerType,\n token\n }));\n\n yield take(UPDATE_PLAYER_SUCCESS);\n yield put(sendRegistrationMessage(\"Zawodnik uatkualniony\"));\n } else {\n yield put(sendRegistrationMessage(\"Tworzę nowege zawodnika...\"));\n yield put(createPlayer({\n player: playerData,\n playerType,\n token\n }));\n\n yield take(CREATE_PLAYER_SUCCESS);\n yield put(sendRegistrationMessage(\"Zawodnik utworzony\"));\n }\n\n if(target.city) {\n yield put(sendRegistrationMessage(\"Rejestrujemy...\"));\n } else if(target.league) {\n yield put(sendRegistrationMessage(\"Zapisujemy do ligi...\"));\n }\n\n try {\n const result: RegistrationStatus = yield call(RegistrationApi.register, token, playerType, promoCode, referral, target, isUpgrading);\n if(result.isSuccess) {\n yield put(makeRegistrationSuccess({}));\n\n if(result.paymentLink) {\n window.location.assign(result.paymentLink);\n } else {\n yield put(sendRegistrationMessage(\"To już wszystko! W mailu wysłaliśmy Ci informacje o dalszych krokach.\"))\n }\n } else {\n yield put(makeRegistrationFailed(\"błąd\", { description: result.errorMessage }));\n }\n } catch(e) {\n yield put(makeRegistrationFailed(e, {}));\n }\n\n}\n\nexport function* sendSmsVerificationCodeSaga() {\n yield takeEvery(SEND_SMS_VERIFICATION_CODE, sendSmsVerificationCodeStep)\n}\n\nexport function* verifySmsCodeSaga() {\n yield takeEvery(VERIFY_SMS_CODE, verifySmsCodeStep);\n}\n\nexport function* getPriceInfoSaga() {\n yield takeEvery(GET_PRICE_INFO_FOR_LEAGUE, getPriceInfoStep);\n}\n\nexport function* makeRegistrationSaga() {\n yield takeEvery(MAKE_REGISTRATION, startRegistration);\n}","export const LOAD_RANKING = \"LOAD_RANKING\";\nexport const LOAD_RANKING_SUCCESS = \"LOAD_RANKING_SUCCESS\";\nexport const LOAD_RANKING_FAILED = \"LOAD_RANKING_FAILED\";","import { Action2, ActionCreator2, ActionWithError2, ActionWithErrorCreator2, ActionWithPayload2, ActionWithPayloadCreator2 } from \"../../framework/action\";\nimport { LOAD_RANKING, LOAD_RANKING_FAILED, LOAD_RANKING_SUCCESS } from \"./actionTypes\";\nimport { PlayerRank } from \"./model\";\n\nexport interface LoadRanking extends Action2 { } \n\nexport interface LoadRankingFailed extends ActionWithError2 { }\n\nexport interface LoadRankingSuccess extends ActionWithPayload2 { }\n\nexport const loadRanking: ActionCreator2 = () => ({ type: \"LOAD_RANKING\" });\nexport const loadRankingFailed: ActionWithErrorCreator2 = (error) => ({ type: \"LOAD_RANKING_FAILED\", error, description: \"Nie udało nam się załadować rankingu. Przeładuj stronę i spróbuj ponownie.\" });\nexport const loadRankingSuccess: ActionWithPayloadCreator2 = (payload) => ({ type: \"LOAD_RANKING_SUCCESS\", payload });\n\nexport type Actions = \n | LoadRanking\n | LoadRankingFailed\n | LoadRankingSuccess;","import { PlayerRank } from \"./model\";\nimport { getConfig } from \"../../config/configuration\";\n\nclass EloApi {\n public static async loadRanking() : Promise {\n const config = await getConfig();\n\n const response = await fetch(`${config.apiUrl}/elo`, {\n headers: {\n 'Content-Type': 'application/json',\n 'Accept': 'application/json'\n },\n method: 'GET'\n });\n\n if(response.ok) {\n return await response.json();\n }\n\n throw new Error(response.statusText);\n\n \n }\n}\n\nexport default EloApi;","import { LOAD_RANKING } from \"./actionTypes\";\nimport { takeEvery, call, put } from \"redux-saga/effects\";\nimport { LoadRanking, loadRankingSuccess, loadRankingFailed } from \"./actions\";\nimport EloApi from \"./api\";\n\nfunction* loadRankingStep({ payload } : LoadRanking) {\n try {\n var result = yield call(EloApi.loadRanking);\n\n yield put(loadRankingSuccess(result));\n } catch (e) {\n yield put(loadRankingFailed(e));\n }\n}\n\nexport function* loadRankingSaga() {\n yield takeEvery(LOAD_RANKING, loadRankingStep)\n}","export const LOAD_TOURNAMENTS = \"LOAD_TOURNAMENTS\";\nexport const LOAD_TOURNAMENTS_SUCCESS = \"LOAD_TOURNAMENTS_SUCCESS\";\nexport const LOAD_TOURNAMENTS_FAILED = \"LOAD_TOURNAMENTS_FAILED\";\n\nexport const REGISTER_TO_TOURNAMENT = \"REGISTER_TO_TOURNAMENT\";\nexport const REGISTER_TO_TOURNAMENT_SUCCESS = \"REGISTER_TO_TOURNAMENT_SUCCESS\";\nexport const REGISTER_TO_TOURNAMENT_FAILED = \"REGISTER_TO_TOURNAMENT_FAILED\";\n\nexport const LOAD_TOURNAMENT_DETAILS = \"LOAD_TOURNAMENT_DETAILS\";\nexport const LOAD_TOURNAMENT_DETAILS_SUCCESS = \"LOAD_TOURNAMENT_DETAILS_SUCCESS\";\nexport const LOAD_TOURNAMENT_DETAILS_FAILED = \"LOAD_TOURNAMENT_DETAILS_FAILED\";\n\nexport const SUBMIT_TOURNAMENT_MATCH = \"SUBMIT_TOURNAMENT_MATCH\";\nexport const SUBMIT_TOURNAMENT_MATCH_SUCCESS = \"SUBMIT_TOURNAMENT_MATCH_SUCCESS\";\nexport const SUBMIT_TOURNAMENT_MATCH_FAILED = \"SUBMIT_TOURNAMENT_MATCH_FAILED\";","import { ActionWithError2, ActionWithErrorCreator2, ActionWithPayload2, ActionWithPayloadCreator2, Action2, ActionCreator2 } from \"../../framework/action\";\nimport { LOAD_TOURNAMENTS, LOAD_TOURNAMENTS_FAILED, LOAD_TOURNAMENTS_SUCCESS, REGISTER_TO_TOURNAMENT, REGISTER_TO_TOURNAMENT_SUCCESS, REGISTER_TO_TOURNAMENT_FAILED, LOAD_TOURNAMENT_DETAILS, LOAD_TOURNAMENT_DETAILS_SUCCESS, LOAD_TOURNAMENT_DETAILS_FAILED, SUBMIT_TOURNAMENT_MATCH, SUBMIT_TOURNAMENT_MATCH_SUCCESS, SUBMIT_TOURNAMENT_MATCH_FAILED } from \"./actionTypes\";\nimport { TournamentHeader, RegisterToTournament as Payload, TournamentDetails } from \"./models\";\nimport { Player } from \"../players/models\";\nimport { Match } from \"../matches/models\";\n\nexport interface LoadTournaments extends ActionWithPayload2 { };\nexport interface LoadTournamentsSuccess extends ActionWithPayload2 { }\nexport interface LoadTournamentsFailed extends ActionWithError2 { }\n\nexport interface RegisterToTournament extends ActionWithPayload2 {};\nexport interface RegisterToTournamentSuccess extends ActionWithPayload2{};\nexport interface RegisterToTournamentFailed extends ActionWithError2{};\n\nexport interface LoadTournamentDetails extends ActionWithPayload2 {};\nexport interface LoadTournamentDetailsSuccess extends ActionWithPayload2 { }\nexport interface LoadTournamentDetailsFailed extends ActionWithError2 { }\n\nexport interface SubmitTournamentMatch extends ActionWithPayload2 {};\nexport interface SubmitTournamentMatchSuccess extends Action2 { };\nexport interface SubmitTournamentMatchFailed extends ActionWithError2{ };\n\n\n\nexport const loadTournaments: ActionWithPayloadCreator2 = (x) => ({\n type: \"LOAD_TOURNAMENTS\",\n payload: x\n});\n\nexport const loadTournamentsSuccess : ActionWithPayloadCreator2 = (x) => ({\n type: \"LOAD_TOURNAMENTS_SUCCESS\",\n payload: x\n});\n\nexport const loadTournamentsFailed: ActionWithErrorCreator2 = (error) => ({\n type: \"LOAD_TOURNAMENTS_FAILED\",\n error,\n description: 'Nie udało się załadować turniejów'\n});\n\nexport const registerToTournament: ActionWithPayloadCreator2 = (payload) => ({\n type: \"REGISTER_TO_TOURNAMENT\",\n payload\n});\n\nexport const registerToTournamentSuccess: ActionWithPayloadCreator2 = (payload) => ({\n type: \"REGISTER_TO_TOURNAMENT_SUCCESS\",\n payload\n});\n\nexport const registerToTournamentFailed: ActionWithErrorCreator2 = (error) => ({\n type: \"REGISTER_TO_TOURNAMENT_FAILED\",\n error,\n description: \"Nie udało się zapisać zawodnika na turniej\"\n});\n\nexport type MakeTournamentRegistration = {\n playerData: Player,\n target: Payload,\n token: string\n}\n\nexport const loadTournamentDetails: ActionWithPayloadCreator2 = (payload) => ({\n type: \"LOAD_TOURNAMENT_DETAILS\",\n payload\n});\n\nexport const loadTournamentDetailsSuccess: ActionWithPayloadCreator2 = (payload) => ({\n type: \"LOAD_TOURNAMENT_DETAILS_SUCCESS\",\n payload\n});\n\nexport const loadTournamentDetailsFailed: ActionWithErrorCreator2 = (error) => ({\n type: \"LOAD_TOURNAMENT_DETAILS_FAILED\",\n error,\n description: \"Nie udało się załadować szczegółów turnieju\"\n});\n\nexport const submitTournamentMatch: ActionWithPayloadCreator2 = (payload) => ({\n type: \"SUBMIT_TOURNAMENT_MATCH\",\n payload\n});\n\nexport const submitTournamentMatchSuccess: ActionCreator2 = () => ({\n type: \"SUBMIT_TOURNAMENT_MATCH_SUCCESS\"\n});\n\nexport const submitTournamentMatchFailed: ActionWithErrorCreator2 = (error) => ({\n type: \"SUBMIT_TOURNAMENT_MATCH_FAILED\",\n error,\n description: \"Nie udało się utworzyć meczu\"\n});\n\nexport type Actions = \n | LoadTournaments\n | LoadTournamentsFailed\n | LoadTournamentsSuccess\n | RegisterToTournament\n | RegisterToTournamentSuccess\n | RegisterToTournamentFailed\n | LoadTournamentDetails\n | LoadTournamentDetailsSuccess\n | LoadTournamentDetailsFailed\n | SubmitTournamentMatch\n | SubmitTournamentMatchFailed\n | SubmitTournamentMatchSuccess;","import { RegisterToTournament, TournamentHeader, TournamentDetails } from \"./models\";\nimport { getConfig } from \"../../config/configuration\";\nimport { RegistrationStatus } from \"../registration/model\";\nimport { Match } from \"../matches/models\";\n\nclass TournamentRegistrationApi {\n\n public static async register(token: string, target: RegisterToTournament) : Promise {\n const config = await getConfig();\n\n const response = await fetch(`${config.apiUrl}/tournaments/register`, {\n headers: {\n 'Content-Type': 'application/json',\n 'Accept': 'application/json',\n 'Authorization': `Bearer ${token}`,\n },\n method: 'POST',\n body: JSON.stringify(target)\n });\n\n if(response.ok) {\n return await response.json();\n }\n\n throw new Error(response.statusText);\n }\n\n public static async load(token: string, year: string) : Promise {\n const config = await getConfig();\n\n const header = !!token ? {\n 'Accept': 'application/json',\n 'Authorization': `Bearer ${token}`,\n } : {\n 'Accept': 'application/json',\n }\n\n const response = await fetch(`${config.apiUrl}/tournaments/${year}`, {\n headers: (header as any),\n method: 'GET'\n });\n\n if(response.ok) {\n const data = await response.json() as TournamentHeader[];\n \n return data.map(d => ({...d, endDate: new Date(d.endDate), startDate: new Date(d.startDate) }));\n\n }\n\n throw new Error(response.statusText);\n }\n\n public static async loadDetails(token: string|undefined, year: string, id: string) : Promise {\n const config = await getConfig();\n\n const header = !!token ? {\n 'Accept': 'application/json',\n 'Authorization': `Bearer ${token}`,\n } : {\n 'Accept': 'application/json',\n }\n\n const response = await fetch(`${config.apiUrl}/tournaments/${year}/${id}`, {\n headers: (header as any),\n method: 'GET'\n });\n\n if(response.ok) {\n const data = await response.json() as TournamentDetails;\n \n return {...data, endDate: new Date(data.endDate), startDate: new Date(data.startDate)};\n\n }\n\n throw new Error(response.statusText);\n }\n\n public static async submitMatch(token: string, tournament: TournamentDetails, match: Match): Promise<{}> {\n const config = await getConfig();\n const header = {\n 'Accept': 'application/json',\n 'Authorization': `Bearer ${token}`,\n 'Content-Type': 'application/json'\n };\n\n const response = await fetch(`${config.apiUrl}/tournaments/${tournament.year}/${tournament.id}/matches`, {\n headers: (header as any),\n method: 'POST',\n body: JSON.stringify({\n oponent: match.oponent.id,\n date: match.date,\n club: match.club.id\n })\n });\n\n if(response.ok) {\n return ({});\n } else {\n throw new Error(response.statusText);\n }\n }\n\n}\n\nexport default TournamentRegistrationApi;","import { put, take, takeEvery, call } from \"redux-saga/effects\";\nimport { LOAD_TOURNAMENTS, REGISTER_TO_TOURNAMENT, LOAD_TOURNAMENT_DETAILS, SUBMIT_TOURNAMENT_MATCH } from \"./actionTypes\";\nimport { LoadTournaments, loadTournamentsSuccess, RegisterToTournament, LoadTournamentDetails, loadTournamentDetailsSuccess, SubmitTournamentMatch, submitTournamentMatchSuccess, loadTournamentDetails, submitTournamentMatchFailed } from \"./actions\";\nimport { makeRegistrationFailed, makeRegistrationSuccess, sendRegistrationMessage} from \"../registration/actions\";\nimport { createPlayer, updatePlayer } from \"../players/actions\";\nimport { PlayerType, RegistrationStatus } from \"../registration/model\";\nimport { CREATE_PLAYER_SUCCESS, UPDATE_PLAYER_SUCCESS } from \"../players/actionTypes\";\nimport TournamentRegistrationApi from \"./api\";\nimport { TournamentHeader, TournamentDetails } from \"./models\";\n\nfunction* loadTournamentsStep({ payload }: LoadTournaments) {\n // API CALL\n\n const {token, year} = payload;\n\n const result: TournamentHeader[] = yield call(TournamentRegistrationApi.load, token, year);\n\n yield put(loadTournamentsSuccess({ tournaments: result }))\n}\n\nfunction* loadTournamentDetailsStep({ payload }: LoadTournamentDetails) {\n const { id, token, year } = payload;\n const result: TournamentDetails = yield call(TournamentRegistrationApi.loadDetails, token, year, id);\n yield put(loadTournamentDetailsSuccess({ tournament: result }));\n}\n\nfunction* registerToTournamentStep({ payload }: RegisterToTournament) {\n const { playerData, target, token } = payload;\n\n if(playerData.id) {\n yield put(sendRegistrationMessage(\"Uaktualniam dane zawodnika...\"));\n yield put(updatePlayer({\n player: playerData,\n playerType: playerData.playerType,\n token\n }));\n\n yield take(UPDATE_PLAYER_SUCCESS);\n yield put(sendRegistrationMessage(\"Zawodnik uatkualniony\"));\n } else {\n yield put(sendRegistrationMessage(\"Tworzę nowege zawodnika...\"));\n yield put(createPlayer({\n player: playerData,\n playerType: PlayerType.REGULAR,\n token\n }));\n\n yield take(CREATE_PLAYER_SUCCESS);\n yield put(sendRegistrationMessage(\"Zawodnik utworzony\"));\n }\n\n yield put(sendRegistrationMessage(\"Zapisujemy na turniej...\"));\n \n try {\n const result: RegistrationStatus = yield call(TournamentRegistrationApi.register, token, target);\n if(result.isSuccess) {\n yield put(makeRegistrationSuccess({}));\n yield put(sendRegistrationMessage(\"To już wszystko! Witamy na turnieju!\"))\n window.location.assign(`/#/tournaments/${target.tournament.season}`);\n \n \n } else {\n yield put(makeRegistrationFailed(\"błąd\", { description: result.errorMessage }));\n }\n } catch(e) {\n yield put(makeRegistrationFailed(e, {}));\n }\n\n}\n\nfunction* submitTournamentMatchStep({ payload}: SubmitTournamentMatch) {\n const { match, token, tournament } = payload;\n\n try {\n const result = yield call(TournamentRegistrationApi.submitMatch, token as any, tournament as any, match as any );\n if(result === true) {\n yield put(submitTournamentMatchSuccess());\n yield put(loadTournamentDetails({ year: tournament.year, id: tournament.id, token }));\n //yield put(getNewestMatches({ leagueId: league.id, year: league.year }));\n } else {\n yield put(submitTournamentMatchFailed(\"\"));\n }\n } catch(e) {\n yield put(submitTournamentMatchFailed(e.message));\n }\n}\n\nexport function* loadTournamentsSaga() {\n yield takeEvery(LOAD_TOURNAMENTS, loadTournamentsStep);\n}\n\nexport function* registerToTournamentSaga() {\n yield takeEvery(REGISTER_TO_TOURNAMENT, registerToTournamentStep);\n}\n\nexport function* loadTournamentDetailsSaga() {\n yield takeEvery(LOAD_TOURNAMENT_DETAILS, loadTournamentDetailsStep);\n}\n\nexport function* submitTournamentMatchSaga() {\n yield takeEvery(SUBMIT_TOURNAMENT_MATCH, submitTournamentMatchStep);\n}","export const LOAD_TRAININGS = \"LOAD_TRAININGS\";\nexport const LOAD_TRAININGS_SUCCESS = \"LOAD_TRAININGS_SUCCESS\";\nexport const LOAD_TRAININGS_FAILED = \"LOAD_TRAININGS_FAILED\";\n\nexport const REGISTER_TO_TRAINING = \"REGISTER_TO_TRAINING\";\nexport const REGISTER_TO_TRAINING_SUCCESS = \"REGISTER_TO_TRAINING_SUCCESS\";\nexport const REGISTER_TO_TRAINING_FAILED = \"REGISTER_TO_TRAINING_FAILED\";\n\nexport const LOAD_TRAINING_DETAILS = \"LOAD_TRAINING_DETAILS\";\nexport const LOAD_TRAINING_DETAILS_SUCCESS = \"LOAD_TRAINING_DETAILS_SUCCESS\";\nexport const LOAD_TRAINING_DETAILS_FAILED = \"LOAD_TRAINING_DETAILS_FAILED\";","import { ActionWithPayload2, ActionWithError2, ActionWithPayloadCreator2, ActionWithErrorCreator2 } from \"../../framework/action\";\nimport { LOAD_TRAININGS, LOAD_TRAININGS_SUCCESS, LOAD_TRAININGS_FAILED, REGISTER_TO_TRAINING, REGISTER_TO_TRAINING_SUCCESS, REGISTER_TO_TRAINING_FAILED, LOAD_TRAINING_DETAILS, LOAD_TRAINING_DETAILS_SUCCESS, LOAD_TRAINING_DETAILS_FAILED } from \"./actionTypes\";\nimport { Player } from \"../players/models\";\nimport { TrainingHeader, TrainingDetails, RegisterToTraining as Payload } from \"./models\";\n\nexport interface LoadTrainings extends ActionWithPayload2 { };\nexport interface LoadTrainingsSuccess extends ActionWithPayload2 { }\nexport interface LoadTrainingsFailed extends ActionWithError2 { }\n\nexport interface RegisterToTraining extends ActionWithPayload2 {};\nexport interface RegisterToTrainingSuccess extends ActionWithPayload2{};\nexport interface RegisterToTrainingFailed extends ActionWithError2{};\n\nexport interface LoadTrainingDetails extends ActionWithPayload2 {};\nexport interface LoadTrainingDetailsSuccess extends ActionWithPayload2 { }\nexport interface LoadTrainingDetailsFailed extends ActionWithError2 { }\n\nexport const loadTrainings: ActionWithPayloadCreator2 = (x) => ({\n type: \"LOAD_TRAININGS\",\n payload: x\n});\n\nexport const loadTrainingsSuccess : ActionWithPayloadCreator2 = (x) => ({\n type: \"LOAD_TRAININGS_SUCCESS\",\n payload: x\n});\n\nexport const loadTrainingsFailed: ActionWithErrorCreator2 = (error) => ({\n type: \"LOAD_TRAININGS_FAILED\",\n error,\n description: 'Nie udało się załadować turniejów'\n});\n\nexport const registerToTraining: ActionWithPayloadCreator2 = (payload) => ({\n type: \"REGISTER_TO_TRAINING\",\n payload\n});\n\nexport const registerToTrainingSuccess: ActionWithPayloadCreator2 = (payload) => ({\n type: \"REGISTER_TO_TRAINING_SUCCESS\",\n payload\n});\n\nexport const registerToTrainingFailed: ActionWithErrorCreator2 = (error) => ({\n type: \"REGISTER_TO_TRAINING_FAILED\",\n error,\n description: \"Nie udało się zapisać zawodnika na turniej\"\n});\n\nexport type MakeTrainingRegistration = {\n playerData: Player,\n target: Payload,\n token: string\n}\n\nexport const loadTrainingDetails: ActionWithPayloadCreator2 = (payload) => ({\n type: \"LOAD_TRAINING_DETAILS\",\n payload\n});\n\nexport const loadTrainingDetailsSuccess: ActionWithPayloadCreator2 = (payload) => ({\n type: \"LOAD_TRAINING_DETAILS_SUCCESS\",\n payload\n});\n\nexport const loadTrainingDetailsFailed: ActionWithErrorCreator2 = (error) => ({\n type: \"LOAD_TRAINING_DETAILS_FAILED\",\n error,\n description: \"Nie udało się załadować szczegółów turnieju\"\n});\n\nexport type Actions = \n | LoadTrainings\n | LoadTrainingsFailed\n | LoadTrainingsSuccess\n | RegisterToTraining\n | RegisterToTrainingSuccess\n | RegisterToTrainingFailed\n | LoadTrainingDetails\n | LoadTrainingDetailsSuccess\n | LoadTrainingDetailsFailed;\n","import { RegisterToTraining, TrainingHeader, TrainingDetails } from \"./models\";\nimport { getConfig } from \"../../config/configuration\";\nimport { RegistrationStatus } from \"../registration/model\";\nimport { Match } from \"../matches/models\";\n\nclass TrainingRegistrationApi {\n\n public static async register(token: string, target: RegisterToTraining) : Promise {\n const config = await getConfig();\n\n const response = await fetch(`${config.apiUrl}/trainings/register`, {\n headers: {\n 'Content-Type': 'application/json',\n 'Accept': 'application/json',\n 'Authorization': `Bearer ${token}`,\n },\n method: 'POST',\n body: JSON.stringify(target)\n });\n\n if(response.ok) {\n return await response.json();\n }\n\n throw new Error(response.statusText);\n }\n\n public static async load(token: string, year: string) : Promise {\n const config = await getConfig();\n\n const header = !!token ? {\n 'Accept': 'application/json',\n 'Authorization': `Bearer ${token}`,\n } : {\n 'Accept': 'application/json',\n }\n\n const response = await fetch(`${config.apiUrl}/trainings/${year}`, {\n headers: (header as any),\n method: 'GET'\n });\n\n if(response.ok) {\n const data = await response.json() as TrainingDetails[];\n \n return data.map(d => ({...d, endDate: new Date(d.endDate), startDate: new Date(d.startDate) }));\n\n }\n\n throw new Error(response.statusText);\n }\n\n public static async loadDetails(token: string|undefined, year: string, id: string) : Promise {\n const config = await getConfig();\n\n const header = !!token ? {\n 'Accept': 'application/json',\n 'Authorization': `Bearer ${token}`,\n } : {\n 'Accept': 'application/json',\n }\n\n const response = await fetch(`${config.apiUrl}/trainings/${year}/${id}`, {\n headers: (header as any),\n method: 'GET'\n });\n\n if(response.ok) {\n const data = await response.json() as TrainingDetails;\n \n return {...data, endDate: new Date(data.endDate), startDate: new Date(data.startDate)};\n\n }\n\n throw new Error(response.statusText);\n }\n}\n\nexport default TrainingRegistrationApi;","import { put, take, takeEvery, call } from \"redux-saga/effects\";\nimport { LOAD_TRAININGS, REGISTER_TO_TRAINING, LOAD_TRAINING_DETAILS, } from \"./actionTypes\";\nimport { LoadTrainings, loadTrainingsSuccess, RegisterToTraining, LoadTrainingDetails, loadTrainingDetailsSuccess, loadTrainingDetails } from \"./actions\";\nimport { makeRegistrationFailed, makeRegistrationSuccess, sendRegistrationMessage} from \"../registration/actions\";\nimport { createPlayer, updatePlayer } from \"../players/actions\";\nimport { PlayerType, RegistrationStatus } from \"../registration/model\";\nimport { CREATE_PLAYER_SUCCESS, UPDATE_PLAYER_SUCCESS } from \"../players/actionTypes\";\nimport Api from \"./api\";\nimport { TrainingHeader, TrainingDetails } from \"./models\";\n\nfunction* loadTrainingsStep({ payload }: LoadTrainings) {\n // API CALL\n\n const {token, year} = payload;\n\n const result: TrainingHeader[] = yield call(Api.load, token, year);\n\n yield put(loadTrainingsSuccess({ trainings: result }))\n}\n\nfunction* loadTrainingDetailsStep({ payload }: LoadTrainingDetails) {\n const { id, token, year } = payload;\n const result: TrainingDetails = yield call(Api.loadDetails, token, year, id);\n yield put(loadTrainingDetailsSuccess({ training: result }));\n}\n\nfunction* registerToTrainingStep({ payload }: RegisterToTraining) {\n const { playerData, target, token } = payload;\n\n if(playerData.id) {\n yield put(sendRegistrationMessage(\"Uaktualniam dane zawodnika...\"));\n yield put(updatePlayer({\n player: playerData,\n playerType: playerData.playerType,\n token\n }));\n\n yield take(UPDATE_PLAYER_SUCCESS);\n yield put(sendRegistrationMessage(\"Zawodnik uatkualniony\"));\n } else {\n yield put(sendRegistrationMessage(\"Tworzę nowege zawodnika...\"));\n yield put(createPlayer({\n player: playerData,\n playerType: PlayerType.REGULAR,\n token\n }));\n\n yield take(CREATE_PLAYER_SUCCESS);\n yield put(sendRegistrationMessage(\"Zawodnik utworzony\"));\n }\n\n yield put(sendRegistrationMessage(\"Zapisujemy na trening...\"));\n \n try {\n const result: RegistrationStatus = yield call(Api.register, token, target);\n if(result.isSuccess) {\n yield put(makeRegistrationSuccess({}));\n yield put(sendRegistrationMessage(\"To już wszystko! Witamy na treningu!\"))\n window.location.assign(`/#/training/${target.training.season}`);\n \n \n } else {\n yield put(makeRegistrationFailed(\"błąd\", { description: result.errorMessage }));\n }\n } catch(e) {\n yield put(makeRegistrationFailed(e, {}));\n }\n\n}\n\nexport function* loadTrainingsSaga() {\n yield takeEvery(LOAD_TRAININGS, loadTrainingsStep);\n}\n\nexport function* registerToTrainingSaga() {\n yield takeEvery(REGISTER_TO_TRAINING, registerToTrainingStep);\n}\n\nexport function* loadTrainingDetailsSaga() {\n yield takeEvery(LOAD_TRAINING_DETAILS, loadTrainingDetailsStep);\n}","import rootReducer from \"./reducer\";\nimport logger from '../framework/store-logger';\nimport { createStore, applyMiddleware } from \"redux\";\nimport createSagaMiddleware from 'redux-saga';\nimport { all, spawn, call } from 'redux-saga/effects'\n\n// Module specific imports\nimport { loadLeaguesSaga, loadMyLeaguesSaga, assignPlayerToLeagueSaga, loadLeagueDetailsSaga, loadMyPrivateLeaguesSaga, loadMyLeaguesWithPaymentSaga, loadOpponentsPlayedWithSaga } from './leagues/sagas';\nimport { loadCurrentPlayerSaga, createPlayerSaga, updatePlayerSaga, savePlayerSaga, loadAllPlayers } from './players/sagas';\nimport { loadClubsForProvinceSaga } from \"./clubs/sagas\";\nimport { submitMatchSaga, getNewestMatchesSaga, loadPlayersMatchesSaga, cancelMatchSaga, confirmMatchSaga, submitMatchResultSaga, getLeagueMatchesSage, loadPlayersTournamentMatchesSaga, confirmTournamentMatchSaga, cancelTournamentMatchSaga, submitTournamentMatchResultSaga, getTournamentMatchesSaga } from \"./matches/sagas\";\nimport { getUserPaymentsSaga, redoUserPaymentSaga } from \"./payments/sagas\";\nimport { loadProducts, loadSpots, createShoppingOrderSaga, loadMyOrdersSaga } from \"./shop/sagas\";\nimport { loadMyConfirmedMatchesSaga, loadMyUnconfirmedMatchesSaga } from \"./desktop/sagas\";\nimport { loadPlayerMatchesSaga, loadPlayerStatsSaga } from \"./stats/sagas\";\nimport { createMatchOfferSaga, getMatchOffersSaga, cancelMatchOfferSaga, acceptMatchOfferSaga } from \"./match-offers/sagas\";\nimport { sendSmsVerificationCodeSaga, verifySmsCodeSaga, getPriceInfoSaga, makeRegistrationSaga } from \"./registration/sagas\";\nimport { loadRankingSaga } from \"./elo/sagas\";\nimport { loadTournamentsSaga, registerToTournamentSaga, loadTournamentDetailsSaga, submitTournamentMatchSaga } from \"./tournaments/sagas\";\nimport { loadTrainingsSaga, loadTrainingDetailsSaga, registerToTrainingSaga } from \"./trainings/sagas\";\n\nconst sagaMiddleware = createSagaMiddleware()\n\nexport default createStore(rootReducer, applyMiddleware(logger, sagaMiddleware));\n\nfunction* rootSaga() {\n const sagas = [loadLeaguesSaga, loadMyLeaguesSaga, loadCurrentPlayerSaga,\n createPlayerSaga, updatePlayerSaga, savePlayerSaga, assignPlayerToLeagueSaga,\n loadLeagueDetailsSaga, loadMyPrivateLeaguesSaga, submitMatchSaga, getNewestMatchesSaga,\n loadClubsForProvinceSaga, loadPlayersMatchesSaga, cancelMatchSaga, confirmMatchSaga, submitMatchResultSaga, getLeagueMatchesSage,\n getUserPaymentsSaga, loadMyLeaguesWithPaymentSaga, redoUserPaymentSaga, loadProducts, loadSpots, createShoppingOrderSaga, loadMyOrdersSaga,\n loadMyConfirmedMatchesSaga, loadMyUnconfirmedMatchesSaga, loadOpponentsPlayedWithSaga, loadPlayerMatchesSaga, loadPlayerStatsSaga,\n createMatchOfferSaga, getMatchOffersSaga, cancelMatchOfferSaga, acceptMatchOfferSaga, sendSmsVerificationCodeSaga, verifySmsCodeSaga, \n getPriceInfoSaga, makeRegistrationSaga, loadRankingSaga, loadAllPlayers, loadTournamentsSaga, registerToTournamentSaga, \n loadTournamentDetailsSaga, submitTournamentMatchSaga, loadPlayersTournamentMatchesSaga, confirmTournamentMatchSaga, cancelTournamentMatchSaga, \n submitTournamentMatchResultSaga, getTournamentMatchesSaga, loadTrainingsSaga, loadTrainingDetailsSaga, registerToTrainingSaga];\n\n yield all(sagas.map(saga =>\n spawn(function* () {\n while (true) {\n try {\n yield call(saga)\n break\n } catch (e) {\n console.log(e)\n }\n }\n }))\n );\n}\n\nsagaMiddleware.run(rootSaga);","export interface Club {\n id: string;\n name: string;\n province: Province;\n logoUrl: string;\n phoneNumber: string;\n websiteUrl: string;\n address: Address;\n geoCoordinate: GeoCoordinates;\n priceList: string;\n workingHours: WorkingHours[];\n courts: Court[];\n sportCards: SportCard[];\n}\n\nexport enum SportCardType {\n Multisport,\n OkSystem\n}\n\nexport interface SportCard {\n type: SportCardType;\n priceDiscount: number;\n}\n\nexport enum CourtType {\n Outdoor,\n Hall,\n Baloon,\n}\n\nexport enum SurfaceType {\n Clay,\n ArtificialClay,\n ArtifilicialGrass,\n Carpet,\n Hard\n}\n\nexport interface Court {\n courtType: CourtType;\n surfaceType: SurfaceType;\n lighting: boolean;\n name: string;\n}\n\nexport enum DayOfWeek {\n Sunday,\n Monday,\n Tuesday,\n Wednesday,\n Thursday,\n Friday,\n Saturday,\n Weekday\n}\n\nexport interface WorkingHours {\n dayOfWeek: DayOfWeek;\n openTime: string;\n closeTime: string;\n}\n\nexport interface PriceList extends WorkingHours {\n price: number;\n}\n\nexport interface Address {\n address1: string;\n city: string;\n postalCode: string;\n country: string;\n}\n\nexport interface GeoCoordinates {\n latitude: number;\n longitude: number;\n}\n\nexport enum Province {\n Dolnoslaskie,\n Kujawskopomorskie,\n Lubelskie,\n Lubuskie,\n Lodzkie,\n Malopolskie,\n Mazowieckie,\n Opolskie,\n Podkarpackie,\n Podlaskie,\n Pomorskie,\n Slaskie,\n Swietokrzyskie,\n Warminskomazurskie,\n Wielkopolskie,\n Zachodniopomorskie,\n}\n\n","import React, { useEffect } from \"react\";\nimport { CardHeader, CardContent } from \"@material-ui/core\";\nimport { useLocation, match, withRouter, RouteComponentProps } from \"react-router-dom\";\nimport logger from \"../../framework/logger\";\nimport ReactGA from 'react-ga';\n\ninterface PageProps {\n avatar?: React.ReactNode\n title?: React.ReactNode\n pageName?: string;\n match: match;\n}\n\n\n\nconst Page: React.FC< RouteComponentProps & PageProps> = ({ avatar, title, children, pageName, match }) => {\n\n let location = useLocation();\n useEffect(() => {\n logger.logPageView(pageName!, {...match});\n ReactGA.pageview(window.location.hash, undefined, pageName);\n }, [location, pageName]);\n\n return (\n <>\n \n \n {children}\n \n \n )\n};\n\nexport default withRouter(Page);","import { AppState } from \"../reducer\";\n\nexport const currentErrorAction = (state: AppState) => state.shell.errorAction;","import React from \"react\";\nimport { ActionWithError } from \"../../framework/action\";\nimport {\n Dialog,\n DialogTitle,\n DialogContent,\n DialogActions,\n Button,\n Icon,\n Typography,\n Grid,\n} from \"@material-ui/core\";\nimport { connect } from \"react-redux\";\nimport { AppState } from \"../../store/reducer\";\nimport { Dispatch } from \"redux\";\nimport { currentErrorAction } from \"../../store/shell/selectors\";\nimport { clearCurrentError } from \"../../store/shell/actions\";\nimport ErrorIcon from '@material-ui/icons/Error';\n\ninterface ErrorNotifierProps {\n failure: ActionWithError;\n clearFailure: () => void;\n}\n\nconst ErrorNotifier: React.FC = ({\n failure,\n clearFailure,\n}) => {\n const handleClose = () => {\n clearFailure();\n };\n\n const handleReload = () => {\n window.location.reload();\n };\n\n return (\n \n Wystąpił błąd\n \n \n \n \n \n \n \n \n {!!failure ? failure.description : \"\"}\n \n \n \n \n \n \n \n {failure && failure.context && failure.context.warning ? (\n <>\n ) : (\n \n )}\n \n \n );\n};\n\nconst mapStateToProps = (state: AppState) => ({\n failure: currentErrorAction(state),\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) => ({\n clearFailure: () => dispatch(clearCurrentError()),\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ErrorNotifier);\n","import { Action, ActionCreator } from \"redux\";\nimport { CLEAR_CURRENT_ERROR, CLEAR_NOTIFICATION } from \"./actionTypes\";\n\nexport interface ClearCurrentError extends Action {\n type: typeof CLEAR_CURRENT_ERROR;\n}\n\nexport interface ClearNotification extends Action {\n type: typeof CLEAR_NOTIFICATION;\n}\n\nexport const clearCurrentError: ActionCreator = () => ({ type: \"CLEAR_CURRENT_ERROR\" });\nexport const clearNotification: ActionCreator = () => ({ type: CLEAR_NOTIFICATION });\n\nexport type Actions =\n | ClearCurrentError\n | ClearNotification;","import React from \"react\";\nimport { Clubs } from \"../../store/leagues/models\";\nimport { Grid, Typography } from \"@material-ui/core\";\n\ninterface OpenLeagueClubsProps {\n clubs: Clubs[];\n}\n\nconst OpenLeagueClubs: React.FC = ( {clubs} ) => {\n return (\n <>\n \n Kluby wspierające to:\n \n \n { clubs.filter(x => !!x.logoUrl).map(c => ({c.name})) }\n \n \n )\n}\n\n\nexport default OpenLeagueClubs;","import React from \"react\";\nimport { Clubs } from \"../../store/leagues/models\";\nimport { Grid, Typography } from \"@material-ui/core\";\n\ninterface PrivateLeagueClubProps {\n club: Clubs;\n}\n\nconst PrivateLeagueClub: React.FC = ( {club} ) => {\n return (\n\n \n \n \n To jest zamknięta liga, sponsorowana przez:\n \n \n {club.name}{club.name}\n \n );\n}\n\nexport default PrivateLeagueClub;","import React from \"react\";\nimport { getConfig } from \"../../config/configuration\";\nimport { Player } from \"../../store/players/models\";\nimport { Paper, Typography, CircularProgress, Link } from \"@material-ui/core\";\nimport { Club } from \"../../store/clubs/models\";\nimport { Data } from \"../../framework/data\";\nimport { useAuth0 } from \"@auth0/auth0-react\";\n\ninterface LeaguePlayerViewProperties {\n playerId: string;\n leagueId: string;\n leagueYear: string;\n clubs: Data;\n}\n\nconst LeaguePlayerView: React.FC = ({\n playerId,\n leagueId,\n leagueYear,\n clubs,\n}) => {\n const { getAccessTokenSilently } = useAuth0();\n\n const [player, setPlayer] = React.useState();\n\n React.useEffect(() => {\n getConfig()\n .then((c) => {\n const url = `/leagues/open/${leagueYear}/${leagueId}/players/${playerId}`;\n return `${c.apiUrl}${url}`;\n })\n .then((url) => {\n return getAccessTokenSilently().then((token: string) => ({\n token,\n url,\n }));\n })\n .then(({ token, url }) => {\n return fetch(url, {\n headers: {\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\",\n Authorization: `Bearer ${token}`,\n },\n credentials: \"include\",\n method: \"GET\",\n });\n })\n .then((resp) => (resp.ok ? resp.json() : Promise.reject()))\n .then(setPlayer);\n }, [playerId]);\n\n return (\n \n {!!player ? (\n <>\n \n Imię i nazwisko:{\" \"}\n \n \n {player.name} {player.surname}\n \n \n \n \n Telefon:{\" \"}\n {player.phoneNumber}\n \n \n Adres email:{\" \"}\n {player.email}\n \n \n Poziom NTRP:{\" \"}\n {player.level}\n \n Preferowane kluby: \n {clubs.type === \"LOADED\" ? (\n
    \n {clubs.value\n .filter(\n (c) =>\n !!player.preferredClubs &&\n player.preferredClubs.includes(c.id)\n )\n .map((c) => (\n
  • \n {c.name}\n
  • \n ))}\n
\n ) : (\n <>\n )}\n\n Preferowane godziny: \n \n \n {player.preferredTime || \"\"}\n \n \n \n ) : (\n \n )}\n
\n );\n};\n\nexport default LeaguePlayerView;\n","import React from \"react\";\nimport { LeaguePlayerCanIPlay, LeagueStatus } from \"../../store/leagues/models\";\nimport {\n TableContainer,\n Table,\n TableCell,\n TableHead,\n TableRow,\n TableBody,\n IconButton,\n TablePagination,\n Tooltip,\n Popover,\n Link,\n} from \"@material-ui/core\";\nimport NoteAddIcon from \"@material-ui/icons/NoteAdd\";\nimport PermContactCalendarIcon from \"@material-ui/icons/PermContactCalendar\";\nimport { take, drop, sortBy, compose, toLower, prop } from \"ramda\";\nimport { Player } from \"../../store/players/models\";\nimport LeaguePlayerView from \"./LeaguePlayerView\";\nimport { Data } from \"../../framework/data\";\nimport { Club } from \"../../store/clubs/models\";\nimport AdvanceToPlayoffs from '@material-ui/icons/ArrowUpward';\nimport EqualizerIcon from '@material-ui/icons/Equalizer';\nimport { PlayerType } from \"../../store/registration/model\";\n\ntype RankingMode =\n | \"full\"\n | \"player-list\"\n\ninterface LeagueRankingProps {\n players: LeaguePlayerCanIPlay[];\n currentPlayer?: Player;\n mode: RankingMode;\n leagueId: string;\n leagueYear: string;\n leagueAdvancingPlayersCount: number;\n clubs: Data;\n leagueStatus: LeagueStatus;\n onRegisterMatchResultWithPlayer: (p: LeaguePlayerCanIPlay) => void;\n}\n\nconst LeagueRanking: React.FC = ({\n players,\n currentPlayer,\n leagueId,\n leagueYear,\n leagueStatus,\n clubs,\n mode,\n onRegisterMatchResultWithPlayer,\n leagueAdvancingPlayersCount\n}) => {\n\n let advanceCounter = 0; \n\n const rankedPlayers = players\n .filter((p) => p.rank > 0)\n .sort((x, y) => x.rank - y.rank)\n .map((p) => {\n if(advanceCounter < leagueAdvancingPlayersCount && p.score.matchesPlayed > 1) {\n advanceCounter+=1;\n return {...p, advance: true}\n }\n\n return {...p, advance: false}\n });\n const unrankedPlayers = sortBy(\n compose(toLower, prop(\"name\")),\n players.filter((p) => p.rank === 0)\n );\n\n const orderedPlayers = [...rankedPlayers, ...unrankedPlayers];\n\n const [page, setPage] = React.useState();\n const [pageSize, setPageSize] = React.useState();\n const [playerInView, setPlayerInView] = React.useState<{\n el: HTMLElement;\n playerId: string;\n } | null>(null);\n\n const viewItems = take(\n pageSize || 25,\n drop((pageSize || 25) * (page || 0), orderedPlayers)\n );\n\n const registerMatchResultWithPlayer = (player: LeaguePlayerCanIPlay) => {\n onRegisterMatchResultWithPlayer(player);\n };\n\n const getPlayerDetails = (playerId: string, target: HTMLElement) => {\n if (\n !currentPlayer ||\n (!!currentPlayer && !players.find((p) => p.id === currentPlayer.id))\n ) {\n return;\n }\n\n setPlayerInView({ el: target, playerId });\n };\n\n return (\n <>\n setPlayerInView(null)}\n anchorOrigin={{\n vertical: \"top\",\n horizontal: \"left\",\n }}\n transformOrigin={{\n vertical: \"top\",\n horizontal: \"right\",\n }}\n >\n {!!playerInView ? (\n \n ) : (\n <>\n )}\n \n \n \n \n \n #\n Zawodnik\n {\n mode === \"full\" ? (<>\n Punkty\n Mecze\n M. Wygrane\n Sety\n Gemy\n ) : (<>)\n }\n\n Akcje\n \n \n \n {viewItems.map((player, i) => (\n \n {\n player.gender === \"K\" ? (\n \n \n \n {i + 1 + ((parseInt(page) || 0) * (parseInt(pageSize) || 25))}\n \n \n \n ) : (\n \n \n {i + 1 + ((parseInt(page) || 0) * (parseInt(pageSize) || 25))}\n \n \n )\n }\n\n \n \n \n {player.name} {player.surname} {!!(player as any).advance ? : <> }\n \n \n {/*player.playerType === PlayerType.TRIAL ? () : (<>)*/}\n \n {\n mode === \"full\" ? (\n <>\n \n \n {player.score.points}\n \n \n \n \n {player.score.matchesPlayed}\n \n \n \n \n {player.score.matchesWon}\n \n \n \n \n {player.score.setsWon} : {player.score.setsPlayed - player.score.setsWon}\n \n \n \n \n {player.score.gemsWon} : {player.score.gemsLost}\n \n \n \n ) : (<>)\n }\n\n \n {(!!currentPlayer && player.id === currentPlayer.id) ||\n !currentPlayer ||\n (!!currentPlayer &&\n !players.find((p) => p.id === currentPlayer.id)) || (\n leagueStatus === LeagueStatus.Finished\n ) ? (\n <>\n ) : (\n <>\n {\n !!player.canIPlay ? (\n \n registerMatchResultWithPlayer(player)}\n >\n \n \n \n ) : (<>)\n }\n\n \n \n getPlayerDetails(player.id, evt.currentTarget)\n }\n >\n \n \n \n \n )}\n \n \n \n \n \n \n \n ))}\n \n
\n
\n {\n setPage(p);\n }}\n onChangeRowsPerPage={(e) => {\n setPageSize(parseInt(e.target.value));\n }}\n />\n \n );\n};\n\nexport default LeagueRanking;\n","import React from \"react\";\nimport { format } from \"date-fns-tz\";\n\nexport interface DateTimeViewProps {\n value: Date;\n}\n\nconst DateTimeView:React.FC = ({ value }) => ({format(value, 'yyyy-MM-dd HH:mm', { timeZone: 'Europe/Warsaw' })})\n\nexport default DateTimeView;","import { MatchHeader, Set } from \"../../store/matches/models\";\n\nconst GAME_SCORE_LIST = [\n [6, 0],\n [6, 1],\n [6, 2],\n [6, 3],\n [6, 4],\n [7, 5],\n [7, 6],\n [6, 7],\n [5, 7],\n [0, 6],\n [1, 6],\n [2, 6],\n [3, 6],\n [4, 6]\n];\n\nconst SET_SCORE_LIST = [\n [2, 0],\n [2, 1],\n [1, 2],\n [0, 2]\n];\n\nconst isFirstWinner = (set: Set) => set.firstPlayer > set.secondPlayer;\n\nexport const firstPlayerWon = (m: MatchHeader):boolean => {\n\n if(!m.score) return false;\n \n const firstPlayerWinSets = m.score.filter(x => x.firstPlayer > x.secondPlayer).length;\n const secondPlayerWinSets = m.score.filter(x => x.secondPlayer > x.firstPlayer).length;\n \n return firstPlayerWinSets > secondPlayerWinSets;\n }\n \nexport const secondPlayerWon = (m: MatchHeader): boolean => \n !!m.score && !firstPlayerWon(m)\n\nconst validateRegularSet = (set: Set): string | undefined => {\n if (!GAME_SCORE_LIST.find(\n test => test[0] === set.firstPlayer && test[1] === set.secondPlayer\n )) {\n return \"Niepoprawny wynik seta\"\n }\n\n if (((set.firstPlayer === 7 && set.secondPlayer === 6) ||\n (set.firstPlayer === 6 && set.secondPlayer === 7)) && !set.tieBreak) {\n return \"Brak wyniku tie break-a\";\n }\n\n return undefined;\n}\n\nconst validateTieBreak = (set: Set): string | undefined => {\n if (set.firstPlayer < 6 || set.secondPlayer < 6) {\n return \"Tie break odbywa się tylko przy stanie 6:6 w gemach\";\n }\n\n const absolute = Math.abs(\n set.tieBreak!.firstPlayer - set.tieBreak!.secondPlayer\n );\n if (absolute < 2) {\n return `Niepoprawny wynik tie break-a - musi się zakończyć różnicą dwóch punktów przewagi ${\n set.tieBreak!.firstPlayer\n } : ${set.tieBreak!.secondPlayer}`;\n }\n\n if (\n absolute > 2 &&\n (set.tieBreak!.firstPlayer > 7 || set.tieBreak!.secondPlayer > 7)\n ) {\n return `Niepoprawny wynik tie break-a ${set.tieBreak!.firstPlayer} : ${\n set.tieBreak!.secondPlayer\n }`;\n }\n\n if (set.tieBreak!.firstPlayer < 7 && set.tieBreak!.secondPlayer < 7) {\n return `Niepoprawny wynik tie break-a - gra się do 7 wygranych puntków ${\n set.tieBreak!.firstPlayer\n } : ${set.tieBreak!.secondPlayer}`;\n }\n\n if (set.firstPlayer < set.secondPlayer && set.tieBreak!.firstPlayer > set.tieBreak!.secondPlayer) {\n return \"Zwycięzca gema, nie jest zwyciezcą seta\";\n }\n};\n\nexport const sanitizeSetsResult = (sets: Set[]): Set[] => {\n const saneSets: Set[] = [];\n for (let i = 0; i < sets.length; i++) {\n if (sets[i].tieBreak && sets[i].tieBreak?.firstPlayer === 0 && sets[i].tieBreak?.secondPlayer === 0) {\n sets[i].tieBreak = undefined;\n }\n\n if (sets[i].firstPlayer > 0 || sets[i].secondPlayer > 0) {\n saneSets.push(sets[i]);\n }\n }\n\n return saneSets;\n}\n\nexport type SetValidation = { [key: number]: string[] } | undefined;\n\nexport const validateSetsResult = (sets: Set[]): SetValidation => {\n\n let messages: SetValidation = {};\n\n if (sets.length < 2 || sets.length > 3) {\n messages = {\n ...messages,\n [0]: [\n `Błędna liczba setów: ${sets.length}`\n ]\n }\n }\n\n let setNumber = 1;\n let firstPlayerSetsWon = 0;\n let secondPlayerSetsWon = 0;\n\n for (let i = 0; i < sets.length; i++) {\n\n let setMessages: string[] = [];\n\n if (setNumber === 3 && (firstPlayerSetsWon === 2 || secondPlayerSetsWon === 2)) {\n messages = {\n ...messages,\n [0]: [\n ...(messages[0] ?? []),\n 'Niepoprawny wynik meczu - mecz powinien zakończyć się w dwóch setach'\n ]\n }\n }\n\n if (setNumber < 3) {\n const result = validateRegularSet(sets[i]);\n if (result) {\n setMessages = [...setMessages, result];\n }\n\n if (sets[i].tieBreak) {\n const tieBreakResult = validateTieBreak(sets[i]);\n if (tieBreakResult) {\n setMessages = [...setMessages, `Tie break: ${tieBreakResult}`];\n }\n }\n }\n\n if ((sets[i].firstPlayer > 0 || sets[i].secondPlayer > 0)) {\n if (isFirstWinner(sets[i])) firstPlayerSetsWon++;\n else secondPlayerSetsWon++;\n }\n\n if (setMessages && setMessages.length > 0 && (sets[i].firstPlayer > 0 || sets[i].secondPlayer > 0)) {\n messages = { ...messages, [setNumber]: setMessages };\n }\n\n setNumber++;\n }\n\n if (sets.length === 3) {\n const lastSet = sets[2];\n let setMessages: string[] = messages[3] ?? [];\n // super tie break\n if (sets[2].firstPlayer > 7 || sets[2].secondPlayer > 7) {\n\n const absolute = Math.abs(lastSet.firstPlayer - lastSet.secondPlayer);\n if (absolute < 2) {\n setMessages = [...setMessages, `Niepoprawny wynik super tie break-a - musi się zakończyć różnicą dwóch punktów przewagi ${lastSet.firstPlayer} : ${lastSet.secondPlayer}`]\n }\n\n if (absolute > 2 && (lastSet.firstPlayer > 10 || lastSet.secondPlayer > 10)) {\n setMessages = [...setMessages, `Niepoprawny wynik super tie break-a ${lastSet.firstPlayer} : ${lastSet.secondPlayer}`]\n }\n\n if (lastSet.firstPlayer < 10 && lastSet.secondPlayer < 10) {\n setMessages = [...setMessages, `Niepoprawny wynik super tie break-a - gra się do 10 wygranych puntków ${lastSet.firstPlayer} : ${lastSet.secondPlayer}`];\n }\n\n if(lastSet.tieBreak) {\n setMessages = [...setMessages, `Przy rozgrywaniu super tie-break-a, wynik podajemy w trzecim secie jako gemy`];\n }\n\n } else {\n let result = validateRegularSet(lastSet);\n if (result) {\n setMessages = [...setMessages, result];\n }\n\n if (lastSet.tieBreak) {\n let tieBreakResult = validateTieBreak(lastSet);\n if (tieBreakResult) {\n setMessages = [...setMessages, `Tie break: ${tieBreakResult}`];\n }\n }\n\n\n }\n\n if (setMessages && setMessages.length > 0 && (lastSet.firstPlayer > 0 || lastSet.secondPlayer > 0)) {\n messages = { ...messages, [3]: setMessages };\n }\n }\n\n if (\n !SET_SCORE_LIST.find(\n ([f, s]) => f === firstPlayerSetsWon && s === secondPlayerSetsWon\n )\n ) {\n messages = {\n ...messages,\n [0]: [\n `Mecz zakończył się niepoprawnym wynikiem ${firstPlayerSetsWon} : ${secondPlayerSetsWon}`\n ]\n };\n }\n\n\n return !!messages && Object.keys(messages).length > 0 ? messages : undefined;\n};\n\nexport const validityStyle = (set: number, validateSetsResult: SetValidation) => {\n if (!validateSetsResult) return {};\n\n return Object.keys(validateSetsResult).indexOf(set.toString()) > -1\n ? { borderColor: 'red', borderWidth: '2px', borderStyle: 'solid' }\n : {};\n\n}","import React from \"react\";\nimport { MatchHeader } from \"../../store/matches/models\";\nimport { Paper, Typography, makeStyles, Grid, Link } from \"@material-ui/core\";\nimport DateTimeView from \"../../framework/components/DateTimeView\";\nimport { firstPlayerWon, secondPlayerWon } from \"./utils\";\n\ninterface NewestMatchProps {\n match: MatchHeader;\n}\n\ninterface NewestMatchesProps {\n matches: MatchHeader[];\n}\n\nconst useStyles = makeStyles(theme => ({\n res: {\n display: \"inline-block\",\n margin: \"0 2px\"\n },\n restb: {\n verticalAlign: \"super\",\n fontSize: \"smaller\"\n },\n gp: {\n padding: \"0 8px\"\n }\n}));\n\nconst NewestMatch: React.FC = ({ match }) => {\n const classes = useStyles();\n\n return (\n \n \n \n \n \n \n {match.firstPlayer.name} {match.firstPlayer.surname}\n \n {\" \"}\n vs.{\" \"}\n \n \n {match.secondPlayer.name} {match.secondPlayer.surname}\n \n \n \n \n \n \n \n \n\n \n {match.isOponentRetired ? (\n \n \n wo\n \n \n ) : (<>)}\n\n {match.score?.map((s, i) => (\n \n \n {s.firstPlayer}\n {!!s.tieBreak ? (\n {s.tieBreak.firstPlayer}\n ) : (\n <>\n )}\n :\n {s.secondPlayer}\n {!!s.tieBreak ? (\n {s.tieBreak.secondPlayer}\n ) : (\n <>\n )}\n \n \n ))}\n \n \n );\n};\n\nconst NewestMatches: React.FC = ({ matches }) => (\n <>\n {matches.map(m => (\n \n ))}\n \n);\n\nexport default NewestMatches;\n","import React from \"react\";\nimport {\n LeagueAccess,\n LeaguePlayer,\n LeagueView,\n LeagueStatus,\n LeagueWithPlayersICanPlay\n} from \"../../store/leagues/models\";\nimport {\n Typography,\n Grid,\n Button,\n CircularProgress,\n Chip,\n Divider,\n} from \"@material-ui/core\";\nimport OpenLeagueClubs from \"./OpenLeagueClubs\";\nimport PrivateLeagueClub from \"./PrivateLeagueClub\";\nimport DateView from \"../../framework/components/DateView\";\nimport PricesList from \"./PricesList\";\nimport AssignmentIcon from \"@material-ui/icons/Assignment\";\nimport LeagueRanking from \"./LeagueRanking\";\nimport { Player } from \"../../store/players/models\";\nimport { Data } from \"../../framework/data\";\nimport { MatchHeader } from \"../../store/matches/models\";\nimport NewestMatches from \"../matches/NewestMatches\";\nimport { Link } from \"react-router-dom\";\n\nimport { Club } from \"../../store/clubs/models\";\nimport SportsTennisIcon from \"@material-ui/icons/SportsTennis\";\nimport { PlayerType } from \"../../store/registration/model\";\nimport { Alert } from \"@material-ui/lab\";\n\ninterface LeagueDetailsProps {\n league: LeagueWithPlayersICanPlay;\n player?: Player;\n newestMatches: Data;\n clubs: Data;\n onSubmitToLeagueRequested: (x: LeagueWithPlayersICanPlay) => void;\n onRegisterMatchResultWithPlayerRequested: (x: LeaguePlayer) => void;\n}\n\nconst calcFinalsIframeHeight = (players: any[]) => {\n if (players.length <= 16) return 654;\n return 1252;\n}\n\nconst LeagueDetails: React.FC = ({\n league,\n onSubmitToLeagueRequested,\n player,\n onRegisterMatchResultWithPlayerRequested,\n newestMatches,\n clubs,\n}) => {\n return (\n <>\n \n {league.name}\n \n\n
\n {league.currentView === LeagueView.RankingList ? (\n <>\n \n \n \n Lista rankingowa\n \n \n \n \n Wszystkie mecze\n \n {!!league.isCurrentUserAssigned ? (\n \n Moje mecze\n \n ) : (\n <>\n )}\n {\n (!!league.isCurrentUserAssigned && !!player && league.players.find(x => x.id === player.id)?.playerType === PlayerType.TRIAL)\n ? ()\n : (<>)\n }\n \n \n\n {\n (league.startDate < new Date()) ? (\n \n ) : (\n \n Lista zawodników udostępniona zostanie po starcie ligi\n \n )\n }\n\n\n\n \n\n {\n !!league.finalsUrl ? (\n \n ) : (<>)\n }\n \n ) : (\n <>\n \n \n \n Plan rozgrywek turniejowych\n \n \n \n {league.admins &&\n !!player &&\n !!league.admins.find((x) => x === player.id) &&\n !league.finals ? (\n \n Zaplanuj\n \n ) : (\n <>\n )}\n \n \n \n )}\n
\n
\n \n \n \n Najnowsze wyniki\n \n {newestMatches.type === \"LOADED\" ? (\n \n ) : (\n \n \n
\n )}\n \n \n \n Dane ligi\n \n \n \n \n Czas trwania:{\" \"}\n -{\" \"}\n \n \n \n {\n league.startDate < new Date() ? (\n \n \n Uczestników: {league.runtimeInfo.participantsCount}\n \n \n ) : (<>)\n }\n \n \n Rozegranych meczów: {league.runtimeInfo.matchesPlayed}\n \n \n \n \n Nagrody\n \n \n \n \n \n Opis\n \n {league.description}\n \n \n \n \n \n
\n {league.type.access === LeagueAccess.Public ||\n league.type.access === LeagueAccess.Tournament ? (\n \n ) : (\n \n )}\n
\n \n );\n};\n\nexport default LeagueDetails;","import React from \"react\";\nimport { Player } from \"../../store/players/models\";\nimport { Match } from \"../../store/matches/models\";\nimport {\n PlayerDescriptor,\n League,\n LeaguePlayer,\n LeagueAccess,\n Clubs,\n} from \"../../store/leagues/models\";\nimport {\n Dialog,\n DialogTitle,\n Grid,\n Hidden,\n TextField,\n Typography,\n FormControl,\n InputLabel,\n Select,\n MenuItem,\n DialogActions,\n Button,\n} from \"@material-ui/core\";\nimport { KeyboardDateTimePicker } from \"@material-ui/pickers\";\nimport ReactGA from \"react-ga\";\nimport Alert from \"@material-ui/lab/Alert\";\n\ninterface CreateMatchDialogProps {\n open: boolean;\n player: Player | PlayerDescriptor;\n oponent: LeaguePlayer;\n league: League;\n onClosed: (success: boolean, match: Match | null) => void;\n}\n\nconst CreateMatchDialog: React.FC = ({\n open,\n player,\n oponent,\n league,\n onClosed,\n}) => {\n const handleClose = () => {\n onClosed(false, null);\n };\n\n const handleSubmit = () => {\n if (!dateOfMatch || !club) {\n return;\n }\n\n const match: Match = {\n club,\n date: dateOfMatch,\n player: {\n id: player.id!,\n level: player.level || \"\",\n name: player.name!,\n surname: player.surname!,\n },\n oponent,\n isOponentRetired: false\n };\n\n onClosed(true, match);\n };\n\n const handleClubChange = (evt: any) => {\n const clubId = evt.target.value;\n\n const club =\n league.type.access === LeagueAccess.Public ||\n league.type.access === LeagueAccess.Tournament\n ? league.type.supportedClubs.find((x) => x.id === clubId)\n : league.type.owner;\n\n setClub(club);\n };\n\n const [club, setClub] = React.useState();\n const [dateOfMatch, setDateOfMatch] = React.useState<\n Date | undefined | null\n >();\n\n React.useEffect(() => {\n let currentClub: Clubs;\n\n switch (league.type.access) {\n case LeagueAccess.Public:\n case LeagueAccess.Tournament: {\n currentClub = league.type.supportedClubs[0];\n break;\n }\n case LeagueAccess.OwnedByClub: {\n currentClub = league.type.owner;\n }\n }\n\n setClub(currentClub);\n\n setDateOfMatch(new Date());\n }, []);\n\n React.useEffect(() => {\n if (open) {\n ReactGA.modalview(\"Create match dialog\");\n }\n }, [open]);\n\n return (\n
\n \n Zaplanuj mecz\n
\n \n \n \n \n \n \n \n vs.\n \n \n \n \n \n \n \n {\n setDateOfMatch(e);\n }}\n />\n \n\n \n \n Klub\n handleClubChange(evt)}\n value={club?.id}\n labelWidth={32}\n >\n {league.type.access === LeagueAccess.Public ||\n league.type.access === LeagueAccess.Tournament ? (\n league.type.supportedClubs.map((c) => (\n \n {c.name}\n \n ))\n ) : (\n \n {league.type.owner.name}\n \n )}\n \n \n \n \n {!club?.logoUrl || club?.name.startsWith(\"Inny\") ? (\n \n Pamiętaj, że grając na obiektach, które nie współpracują ze\n SmartLigą, nie otrzymasz SmartPunktów za rozegrany mecz.\n \n ) : (\n \n Pamiętaj, aby mieć pewność, że otrzymasz zniżkę na korcie na mecz\n ligowy, Twój mecz musi zostać potwierdzony przynajmniej 24 godziny\n przed planowanym terminem.\n \n )}\n\n {\n !!dateOfMatch && dateOfMatch >= league.endDate\n ? (\n Data i godzina meczu jest późniejsza niż data i godzina zakończenia ligii.\n ) : (<>)\n }\n
\n\n \n \n handleSubmit()}\n disabled={!!dateOfMatch && dateOfMatch >= league.endDate}\n variant=\"contained\"\n color=\"primary\"\n >\n Zapisz\n \n \n
\n
\n );\n};\n\nexport default CreateMatchDialog;\n","import React from \"react\";\nimport {\n Dialog,\n DialogTitle,\n DialogContent,\n DialogActions,\n Grid,\n Checkbox,\n TextField,\n Button,\n Divider,\n Link,\n Tooltip,\n InputAdornment,\n Typography,\n} from \"@material-ui/core\";\nimport HelpIcon from \"@material-ui/icons/Help\";\nimport ReactGA from \"react-ga\";\nimport Alert from \"@material-ui/lab/Alert\";\n\ninterface AdditionalSubmissionInfoProps {\n show: boolean;\n isDoubles: boolean;\n onClose: (x: {\n tocApproved: boolean;\n promoCode: string;\n referral: string;\n secondaryPlayerName: string;\n secondaryPlayerSurname: string;\n }) => void;\n}\n\nconst AdditionalSubmissionInfo: React.FC = ({\n show,\n isDoubles,\n onClose,\n}) => {\n const [tocApproved, setTocApproved] = React.useState();\n const [promo, setPromo] = React.useState();\n const [secPlayerName, setSecPlayerName] = React.useState();\n const [secPlayerSurname, setSecPlayerSurname] = React.useState();\n const [referral, setReferral] = React.useState(\n window.localStorage.getItem(\"referral\") ?? \"\"\n );\n\n React.useEffect(() => {\n if (show) {\n ReactGA.modalview(\"Rules/promo/referral dialog\");\n }\n }, [show]);\n\n return (\n \n onClose({\n tocApproved: false,\n promoCode: \"\",\n referral: \"\",\n secondaryPlayerName: \"\",\n secondaryPlayerSurname: \"\",\n })\n }\n >\n Zapisujesz się do ligii\n \n \n \n setTocApproved(e.target.checked)}\n >\n Zgadzam się z{\" \"}\n \n regulaminem ligi\n \n \n \n \n \n {isDoubles ? (\n <>\n \n \n Zapisujesz się do ligii deblowej, musisz podać danę\n partnera do debla\n \n \n \n setSecPlayerName(e.target.value)}\n />\n \n \n setSecPlayerSurname(e.target.value)}\n />\n \n \n \n \n \n ) : (\n <>\n )}\n\n \n setPromo(e.target.value)}\n />\n \n \n setReferral(e.target.value)}\n style={{ width: \"100%\" }}\n InputProps={{\n endAdornment: (\n \n \n \n Kod, który dostałeś/-aś od osoby, która\n zaprosiła Cię do ligi. Składa się z 8-miu dużych\n liter i cyfr, np. 85M3JUQ1\n \n \n SmartPunkty zostaną dodane, tylko jeśli jesteś\n nowym zawodnikiem\n \n \n }\n >\n \n \n \n ),\n }}\n />\n \n \n \n \n \n \n {\n onClose({\n tocApproved: false,\n promoCode: \"\",\n referral: \"\",\n secondaryPlayerName: \"\",\n secondaryPlayerSurname: \"\",\n });\n }}\n >\n Anuluj\n \n {\n onClose({\n tocApproved: !!tocApproved,\n promoCode: promo ? promo : \"\",\n referral: referral ? referral : \"\",\n secondaryPlayerName: secPlayerName ? secPlayerName : \"\",\n secondaryPlayerSurname: secPlayerSurname ? secPlayerSurname : \"\",\n });\n }}\n disabled={\n !tocApproved || (isDoubles && (!secPlayerSurname || !secPlayerName))\n }\n color=\"primary\"\n >\n Dalej\n \n \n \n );\n};\n\nexport default AdditionalSubmissionInfo;\n","import React from \"react\";\nimport {\n Dialog,\n DialogTitle,\n DialogContent,\n Grid,\n Typography,\n DialogActions,\n Button\n} from \"@material-ui/core\";\nimport { League, LeagueHeaderWithCurrentUserAssignment } from \"../../store/leagues/models\";\nimport { Data, NOT_STARTED, dataOf, fail } from \"../../framework/data\";\nimport { getConfig } from \"../../config/configuration\";\nimport Alert from \"@material-ui/lab/Alert\";\nimport ReactGA from 'react-ga';\nimport { useAuth0 } from \"@auth0/auth0-react\";\n\ninterface PriceSubmissionInfoProps {\n open: boolean;\n onClose: (succeeded: boolean) => void;\n promoCode: string;\n league?: League|LeagueHeaderWithCurrentUserAssignment;\n}\n\ninterface PriceInfo {\n price: number;\n}\n\nconst PriceSubmissionInfo: React.FC = ({\n open,\n onClose,\n promoCode,\n league\n}) => {\n const { getAccessTokenSilently } = useAuth0();\n\n React.useEffect(() => {\n if (!!league && !!promoCode) {\n getConfig()\n .then(c => {\n const url = `/payment/${league.year}/${league.id}/price`;\n return `${c.apiUrl}${url}`;\n })\n .then(url => {\n return getAccessTokenSilently().then((token: string) => ({\n token,\n url\n }));\n })\n .then(({ token, url }) => {\n return fetch(url, {\n headers: {\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\",\n PromoCode: promoCode,\n Authorization: `Bearer ${token}`\n },\n credentials: \"include\",\n method: \"GET\"\n });\n })\n .then(resp => (resp.ok ? resp.json() : Promise.reject()))\n .then(p => setPriceInfo(dataOf({ price: p })))\n .catch(e => setPriceInfo(fail(\"Błędny kod. Rabat nie naliczony\")));\n } else if (!!league) {\n setPriceInfo(dataOf({ price: league.basePrice }));\n }\n }, [promoCode, league]);\n\n React.useEffect(() => {\n\n if(open) {\n ReactGA.modalview('Pricing acceptance dialog');\n }\n\n }, [open]);\n\n const [priceInfo, setPriceInfo] = React.useState>(\n NOT_STARTED\n );\n\n return (\n onClose(false)}>\n Koszt dołączenia do ligii\n \n {priceInfo.type === \"FAILED\" ? (\n Błędny kod promocyjny!\n ) : (\n <>\n )}\n {priceInfo.type === \"LOADED\" ? (\n \n Cena: \n \n {priceInfo.value.price} PLN\n {priceInfo.value.price !== league?.basePrice ? (\n \n {league?.basePrice} PLN\n \n ) : (\n <>\n )}\n \n\n \n W następnym kroku zostaniesz przeniesiony do systemu płatności PayU\n \n \n ) : (\n <>\n )}\n \n \n {\n onClose(false);\n }}\n >\n Anuluj\n \n {priceInfo.type === \"LOADED\" ? (\n {\n onClose(true);\n }}\n color=\"primary\"\n >\n Zarejestruj\n \n ) : (\n <>\n )}\n \n \n );\n};\n\nexport default PriceSubmissionInfo;\n","import React from \"react\";\nimport { AppState } from \"../../store/reducer\";\nimport { currentPlayer } from \"../../store/players/selectors\";\nimport { userAssignedLeagueWithPossibleMatches } from \"../../store/leagues/selectors\";\nimport { Dispatch } from \"redux\";\nimport {\n loadLeagueDetails,\n assignPlayerToLeague,\n additionalDataAcquired,\n pricingAccepted, loadOpponentsPlayedWith\n} from \"../../store/leagues/actions\";\nimport { connect } from \"react-redux\";\nimport { withRouter, match } from \"react-router-dom\";\nimport { Data, unwrap } from \"../../framework/data\";\nimport { Player } from \"../../store/players/models\";\nimport {\n LeaguePlayer,\n League, LeagueWithPlayersICanPlay\n} from \"../../store/leagues/models\";\nimport { CircularProgress } from \"@material-ui/core\";\nimport LeagueDetails from \"./LeagueDetails\";\nimport ProfileDialog from \"../players/ProfileDialog\";\nimport CreateMatchDialog from \"../matches/CreateMatchDialog\";\nimport { Match, MatchHeader } from \"../../store/matches/models\";\nimport {\n submitMatch,\n getNewestMatches\n} from \"../../store/matches/actions\";\nimport AdditionalSubmissionInfo from \"./AdditionalSubmissionInfo\";\nimport logger from \"../../framework/logger\";\nimport PriceSubmissionInfo from \"./PriceSubmissionInfo\";\nimport { Club } from \"../../store/clubs/models\";\nimport { loadClubsInProvince } from \"../../store/clubs/actions\";\nimport { useAuth0 } from \"@auth0/auth0-react\";\n\ninterface LeagueDetailsPageProps {\n player: Data;\n details: Data;\n newestMatches: Data;\n match: match;\n loadLeaguesDetails: (year: string, id: string) => void;\n submitToLeagueRequested: (\n x: LeagueWithPlayersICanPlay,\n p: Player,\n token: string\n ) => void;\n submitMatch: (league: League, match: Match, token: string) => void;\n getNewestMatches: (year: string, id: string) => void;\n showAdditionalDialog: boolean;\n additionalDataObtained: (\n tocApproved: boolean,\n promoCode: string,\n referral: string,\n secondaryPlayerName?: string, \n secondaryPlayerSurname?: string\n ) => void;\n showPricingInfo: boolean;\n pricingAccepted: (accepted: boolean) => void;\n promoCode: string;\n clubs: Data;\n loadClubs: () => void;\n loadOpponentsPlayedWith: (token: string, year: string, id: string) => void;\n}\n\nconst LeagueDetailsPage: React.FC = ({\n details,\n match,\n loadLeaguesDetails,\n player,\n submitToLeagueRequested,\n submitMatch,\n newestMatches,\n getNewestMatches,\n showAdditionalDialog,\n additionalDataObtained,\n showPricingInfo,\n pricingAccepted,\n promoCode,\n clubs,\n loadClubs,\n loadOpponentsPlayedWith\n}) => {\n\n const { getAccessTokenSilently, loginWithRedirect } = useAuth0();\n\n React.useEffect(() => {\n var id = (match.params as any).id;\n var year = (match.params as any).year;\n loadLeaguesDetails(year, id);\n getNewestMatches(year, id);\n\n }, [match.params, loadLeaguesDetails]);\n\n React.useEffect(() => {\n var year = (match.params as any).year;\n var id = (match.params as any).id;\n\n if(player.type === \"LOADED\" && player.value) {\n getAccessTokenSilently().then((t: string) => loadOpponentsPlayedWith(t, year, id));\n }\n }, [match.params, player])\n\n React.useEffect(() => {\n if(clubs.type === \"NOT_STARTED\" && loadClubs) {\n loadClubs();\n }\n }, []);\n\n const [profileDialogOpen, setProfileDialogOpen] = React.useState(false);\n const [matchResultDialogOpen, setMatchResultDialogOpen] = React.useState(false);\n\n const [oponent, setOponent] = React.useState();\n\n const onSubmitToLeagueRequested = async (\n x: LeagueWithPlayersICanPlay\n ) => {\n\n logger.logEvent(`User attempted to join league: ${x.id} ${x.name}`);\n let token: string = \"\";\n try {\n token = await getAccessTokenSilently();\n } catch (e) {\n loginWithRedirect({\n redirectUri: window.location.href, appState: {\n targetUrl: window.location.hash\n }\n });\n return;\n }\n if (player && player.type === \"LOADED\" && unwrap(player)) {\n logger.logEvent(`Player ${player.value.email} attempted to join league: ${x.id} ${x.name}`);\n submitToLeagueRequested(x, unwrap(player), token);\n } else {\n logger.logEvent(`User without profile attempted to join league: ${x.id} ${x.name}.`);\n setProfileDialogOpen(true);\n }\n };\n\n const onProfileDialogClosed = async (\n succeeded: boolean,\n player: Player | undefined\n ) => {\n setProfileDialogOpen(false);\n if (succeeded && player && details && details.type === \"LOADED\") {\n var token = await getAccessTokenSilently();\n logger.logEvent(`User without profile attempted to join league: ${details.value.id} ${details.value.name}. Creating profile for him: ${player.email}`);\n submitToLeagueRequested(details.value, player, token);\n }\n };\n\n const registerMatchResultWithPlayerRequested = (player: LeaguePlayer) => {\n setOponent(player);\n setMatchResultDialogOpen(true);\n };\n\n const onRegisteringMatchFinished = async (\n success: boolean,\n match: Match | null\n ) => {\n if (success && details.type === \"LOADED\" && match) {\n const token = await getAccessTokenSilently();\n const league = details.value;\n logger.logEvent(`Creating match between ${match.player.id} and ${match.oponent.id} on ${match.club.name} on ${match.date}`);\n submitMatch(league, match, token);\n }\n\n setMatchResultDialogOpen(false);\n };\n\n const unsafePlayer =\n player && player.type === \"LOADED\" ? player.value : undefined;\n\n switch (details.type) {\n case \"LOADED\": {\n return (\n <>\n {player.type === \"LOADED\" && oponent ? (\n p.id === player.value.id)! : player.value}\n open={matchResultDialogOpen}\n onClosed={onRegisteringMatchFinished}\n >\n ) : (\n <>\n )}\n\n \n \n additionalDataObtained(tocApproved, promoCode, referral, secondaryPlayerName, secondaryPlayerSurname)\n }\n >\n pricingAccepted(x) }>\n \n \n );\n }\n case \"LOADING\": {\n return (\n \n \n \n );\n }\n default: {\n return
;\n }\n }\n};\n\nconst mapStateToProps = (state: AppState) => {\n return {\n details: userAssignedLeagueWithPossibleMatches(state),\n player: currentPlayer(state),\n newestMatches: state.matches.currentLeagueNewestMatches,\n showAdditionalDialog: state.leagues.showAdditionalDataDialog,\n showPricingInfo: state.leagues.showPricingDataDialog.showDialog,\n promoCode: state.leagues.showPricingDataDialog.promoCode,\n clubs: state.clubs.clubs\n };\n};\n\nconst mapDispatchToProps = (dispatch: Dispatch) => {\n return {\n loadLeaguesDetails: (year: string, id: string) =>\n dispatch(loadLeagueDetails({ year, id })),\n submitToLeagueRequested: (\n league: LeagueWithPlayersICanPlay,\n player: Player,\n token: string\n ) => {\n league &&\n player &&\n token &&\n dispatch(assignPlayerToLeague({ league, player, token }));\n },\n submitMatch: (league: League, match: Match, token: string) => {\n league &&\n match &&\n token &&\n dispatch(submitMatch({ league, match, token }));\n },\n getNewestMatches: (year: string, leagueId: string) =>\n dispatch(getNewestMatches({ leagueId, year })),\n additionalDataObtained: (\n tocApproved: boolean,\n promoCode: string,\n referral: string,\n secondaryPlayerName?: string,\n secondaryPlayerSurname?: string\n ) => dispatch(additionalDataAcquired({ tocApproved, promoCode, referral, secondaryPlayerName, secondaryPlayerSurname })),\n pricingAccepted: (x: boolean) => dispatch(pricingAccepted(x)),\n loadClubs: () => dispatch(loadClubsInProvince()),\n loadOpponentsPlayedWith: (token: string, year: string, id: string) => dispatch(loadOpponentsPlayedWith({token, year, id}))\n };\n};\n\nexport default withRouter(\n connect(mapStateToProps, mapDispatchToProps)(LeagueDetailsPage)\n);\n","import { AppState } from \"../reducer\";\nimport { createSelector } from \"reselect\";\nimport { dataOf } from \"../../framework/data\";\n\nexport const allClubs = (state: AppState) => state.clubs.clubs;\n\nexport const clubsWithGeoCoordinates = createSelector(allClubs, (c => {\n if(c.type === \"LOADED\") {\n return dataOf(c.value.filter(c => !!c.geoCoordinate));\n } else {\n return c;\n }\n}));","import { DayOfWeek, SportCardType, CourtType, SurfaceType, WorkingHours, PriceList } from \"../../store/clubs/models\";\n\nexport const describeDayOfWeek = (d: DayOfWeek) => {\n switch(d) {\n case DayOfWeek.Friday: return \"Piątek\";\n case DayOfWeek.Monday: return \"Poniedziałek\";\n case DayOfWeek.Saturday: return \"Sobota\";\n case DayOfWeek.Sunday: return \"Niedziela\";\n case DayOfWeek.Thursday: return \"Czwartek\";\n case DayOfWeek.Tuesday: return \"Wtorek\";\n case DayOfWeek.Wednesday: return \"Środa\";\n case DayOfWeek.Weekday: return \"Pon. - Pt.\"\n default: return \"\";\n }\n}\n\nexport const describeSportCardType = (s: SportCardType) => {\n switch(s) {\n case SportCardType.Multisport: return \"MultiSport\";\n case SportCardType.OkSystem: return \"OkSystem\";\n default: return \"\";\n }\n}\n\nexport const describeCourtType = (c: CourtType) => {\n switch(c) {\n case CourtType.Baloon: return \"Balon\";\n case CourtType.Hall: return \"Hala\";\n case CourtType.Outdoor: return \"Na wolnym powietrzu\";\n default: return \"\";\n }\n}\n\nexport const describeSurfaceType = (s: SurfaceType) => {\n switch(s) {\n case SurfaceType.ArtificialClay: return \"Ceglana mączka\";\n case SurfaceType.Clay: return \"Ceglana mączka\";\n case SurfaceType.ArtifilicialGrass: return \"Sztuczna trawa\";\n case SurfaceType.Carpet: return \"Dywanowa\";\n case SurfaceType.Hard: return \"Twarda\";\n default: return \"\";\n }\n};\n\nexport const describeBoolean = (x: boolean) => x ? \"Tak\" : \"Nie\";\n\nexport const canWorkingHoursBeShortened = (w: WorkingHours[] | undefined) => {\n if(!w || w.length < 7) {\n return false;\n }\n\n let theSame = true;\n const wSorted = w.sort((a, b) => a.dayOfWeek - b.dayOfWeek);\n for(let i = 2; i < 6; i++) {\n if(wSorted[i].closeTime !== wSorted[i-1].closeTime || wSorted[i].openTime !== wSorted[i-1].openTime) {\n theSame = false;\n }\n }\n\n return theSame;\n}\n\nexport const shortenedWorkingHours = (w: WorkingHours[]|undefined) => {\n if(!w) {\n return [];\n }\n\n const wSorted = w.sort((a, b) => a.dayOfWeek - b.dayOfWeek);\n\n return [\n { dayOfWeek: DayOfWeek.Weekday, closeTime: wSorted[1].closeTime, openTime: wSorted[1].openTime },\n { dayOfWeek: DayOfWeek.Saturday, closeTime: wSorted[6].closeTime, openTime: wSorted[6].openTime },\n { dayOfWeek: DayOfWeek.Sunday, closeTime: wSorted[0].closeTime, openTime: wSorted[0].openTime }\n ]\n}\n\nexport const canPriceListBeShortened = (w: PriceList[] | undefined) => {\n if(!w) {\n return false;\n }\n\n return w\n .filter(x => x.dayOfWeek === DayOfWeek.Monday)\n .map(p => w.filter(x => x.closeTime === p.closeTime && x.openTime === p.openTime && x.price === p.price).length === 5)\n .reduce((x, y) => x && y, true); \n}\n\nexport const shortenedPriceList = (w: PriceList[] | undefined) => {\n if(!w) {\n return [];\n }\n\n return [\n ...w.filter(x => x.dayOfWeek === DayOfWeek.Monday).map(({ closeTime, openTime, price }) => ({ dayOfWeek: DayOfWeek.Weekday, closeTime, openTime, price })),\n ...w.filter(x => x.dayOfWeek === DayOfWeek.Saturday),\n ...w.filter(x => x.dayOfWeek === DayOfWeek.Sunday)\n ];\n}","import React from \"react\";\n\ninterface HourProps {\n hour: string;\n}\n\nconst Hour: React.FC = ({ hour }) => {\n const [hours, minutes, _] = hour.split(':')\n return (<>{ `${hours}:${minutes}` });\n}\n\nexport default Hour;","import React from \"react\";\nimport { WorkingHours, DayOfWeek } from \"../../store/clubs/models\";\nimport { Grid } from \"@material-ui/core\";\nimport { describeDayOfWeek } from \"./utils\";\nimport Hour from \"./Hour\";\n\ninterface WorkingHourProps {\n value: WorkingHours;\n}\n\nconst WorkingHour: React.FC = ({ value }) => (\n \n \n \n {describeDayOfWeek(value.dayOfWeek)}\n \n \n - \n \n \n \n \n);\n\nexport default WorkingHour;","import React, { Fragment } from \"react\";\nimport { Club } from \"../../store/clubs/models\";\nimport { Paper, Typography, makeStyles, Divider, Link, Grid } from \"@material-ui/core\";\nimport WorkingHour from \"./WorkingHour\";\nimport { describeSportCardType, describeCourtType, describeSurfaceType, describeBoolean, canWorkingHoursBeShortened, shortenedWorkingHours } from \"./utils\";\nimport PriceList from \"./PriceList\";\nimport ReactMarkdown from \"react-markdown\";\n\ninterface ClubDetailsProps {\n club?: Club;\n}\n\nconst useStyles = makeStyles(theme => ({\n header: {\n backgroundColor: theme.palette.primary.main,\n color: \"#FFFFFF\"\n },\n markdown: {\n \"& table\": {\n width: '100%',\n borderWidth: '1px',\n borderStyle: \"solid\",\n borderCollapse: \"collapse\",\n\n \"& th\": {\n padding: \"4px 8px\",\n border: \"1px solid #0000001f\"\n },\n\n \"& td\": {\n padding: \"4px 8px\",\n border: \"1px solid #0000001f\"\n }\n\n\n },\n\n }\n}));\n\nconst ClubDetails: React.FC = ({ club }) => {\n const styles = useStyles();\n\n return (\n \n
\n {club?.name}\n
\n
\n Adres\n \n {club?.address.address1}, {club?.address.postalCode}{\" \"}\n {club?.address.city}\n \n \n Strona internetowa\n \n {club?.websiteUrl}\n \n \n Telefon\n \n {club?.phoneNumber}\n \n {\n (club?.workingHours && club.workingHours.length == 7) ? (\n <>\n \n Godziny otwarcia\n \n {\n canWorkingHoursBeShortened(club?.workingHours)\n ? shortenedWorkingHours(club?.workingHours).map(wh => ())\n : club?.workingHours?.sort((a, b) => a.dayOfWeek - b.dayOfWeek).map(wh => )\n }\n \n \n ) : (<>)\n }\n {\n !!club && !!club.priceList && club.priceList.length > 0 ? (\n <>\n \n Cennik\n\n
\n \n ) : (<>)\n }\n {\n !!club && !!club.sportCards && club.sportCards.length > 0 ? (\n <>\n \n Karty sportowe\n {club.sportCards.map(c => (\n \n \n {describeSportCardType(c.type)}\n \n \n -{c.priceDiscount} zł\n \n \n\n ))}\n \n ) : (\n <>\n )\n }\n {\n !!club && !!club.courts && club.courts.length > 0 ? (\n <>\n \n Korty\n {\n club.courts.map((c, i) => (\n
\n {c.name} : {describeCourtType(c.courtType)} / {describeSurfaceType(c.surfaceType)} / Oświetlenie: {describeBoolean(c.lighting)}\n
\n ))\n }\n \n ) : (<>)\n }\n\n\n\n
\n
\n );\n};\n\nexport default ClubDetails;\n","import React, { FC } from \"react\";\nimport { Map as LeafletMap, TileLayer, Marker, Popup } from \"react-leaflet\";\nimport L from \"leaflet\";\nimport { Data } from \"../../framework/data\";\nimport { Club } from \"../../store/clubs/models\";\nimport { Typography, Button, Drawer } from \"@material-ui/core\";\nimport { AppState } from \"../../store/reducer\";\nimport { clubsWithGeoCoordinates } from \"../../store/clubs/selectors\";\nimport { Dispatch } from \"redux\";\nimport { loadClubsInProvince } from \"../../store/clubs/actions\";\nimport { connect } from \"react-redux\";\nimport ClubDetails from \"./ClubDetails\";\nimport { getConfig } from \"../../config/configuration\";\n\nL.Icon.Default.mergeOptions({\n iconRetinaUrl: require(\"leaflet/dist/images/marker-icon-2x.png\"),\n iconUrl: require(\"leaflet/dist/images/marker-icon.png\"),\n shadowUrl: require(\"leaflet/dist/images/marker-shadow.png\"),\n});\n\ninterface ClubPageProps {\n clubs: Data;\n loadClubs: () => void;\n}\n\nconst ClubsPage: FC = ({ clubs, loadClubs }) => {\n React.useEffect(() => {\n loadClubs();\n }, []);\n\n const [pos, setPos] = React.useState([]);\n\n React.useEffect(() => {\n getConfig()\n .then(\n (c) =>\n new Promise<{ provinces: any; current: number[] }>(\n (resolve, reject) => {\n window.navigator.geolocation.getCurrentPosition(\n (pos) => {\n resolve({\n provinces: c.provincesConfig,\n current: [pos.coords.latitude, pos.coords.longitude],\n });\n },\n (e) => {\n reject(e.message);\n }\n );\n }\n )\n )\n .then(({ provinces, current }) =>\n Object.values(provinces).map((v: any) => ({\n position: v.center,\n distance: Math.sqrt(\n Math.pow(v.center.lat - current[0], 2) +\n Math.pow(v.center.lng - current[1], 2)\n ),\n }))\n )\n .then((x) => x.sort((a, b) => a.distance - b.distance)[0].position)\n .then((p) => setPos([p.lat, p.lng, p.z]))\n .catch((e) => setPos([50.0468548, 19.9348337, 11]));\n }, []);\n\n const [currentClub, setCurrentClub] = React.useState();\n\n const selectClub = (c: Club) => {\n setCurrentClub(c);\n };\n\n return (\n <>\n \n \n\n {clubs.type === \"LOADED\" ? (\n clubs.value\n .filter((x) => !!x.geoCoordinate)\n .map((c) => (\n \n \n \n {c.name}\n \n \n {c.address.address1}, {c.address.postalCode}{\" \"}\n {c.address.city}\n \n \n \n \n ))\n ) : (\n <>\n )}\n \n setCurrentClub(undefined)}\n >\n \n \n \n \n );\n};\n\nconst mapStateToProps = (state: AppState) => ({\n clubs: clubsWithGeoCoordinates(state),\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) => ({\n loadClubs: () => dispatch(loadClubsInProvince()),\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ClubsPage);\n","import React from \"react\";\nimport { MatchHeader, Set, MatchStatus, Match } from \"../../store/matches/models\";\nimport {\n TableContainer,\n Table,\n TableHead,\n TableRow,\n TableCell,\n TableBody,\n TablePagination,\n Tooltip,\n Link,\n IconButton\n} from \"@material-ui/core\";\nimport { Player } from \"../../store/players/models\";\nimport DateTimeView from \"../../framework/components/DateTimeView\";\n\nimport CheckIcon from \"@material-ui/icons/Check\";\nimport ClearIcon from \"@material-ui/icons/Clear\";\nimport WbSunnyIcon from \"@material-ui/icons/WbSunny\";\nimport DoneAllIcon from \"@material-ui/icons/DoneAll\";\nimport LoopIcon from '@material-ui/icons/Loop';\nimport { firstPlayerWon, secondPlayerWon } from \"./utils\";\nimport CommentIcon from '@material-ui/icons/Comment';\n\ninterface MatchStatusProps {\n value: MatchStatus;\n}\n\nconst MatchStatusDisplay: React.FC = ({ value }) => {\n switch (value) {\n case MatchStatus.New: {\n return (\n \n \n \n );\n }\n case MatchStatus.Cancelled: {\n return (\n \n \n \n );\n }\n case MatchStatus.Confirmed: {\n return (\n \n \n \n );\n }\n case MatchStatus.Finished: {\n return (\n \n \n \n );\n }\n case MatchStatus.InProcess: {\n return (\n \n )\n }\n }\n};\n\ninterface ScoreDisplayProps {\n sets: Set[];\n isOponentRetired: boolean;\n}\n\nconst ScoreDisplay: React.FC = ({ sets, isOponentRetired }) => {\n return (\n <>\n {isOponentRetired ? wo : <>}\n {\" \"}\n {sets.map((s, i) => (\n \n {s.firstPlayer}\n {s.tieBreak ? ({s.tieBreak.firstPlayer}) : <>} :{\" \"}\n {s.secondPlayer}\n {s.tieBreak ? ({s.tieBreak.secondPlayer}) : <>}\n \n ))}\n \n );\n};\n\ninterface MatchesTableProps {\n matches: MatchHeader[];\n currentPlayer?: Player;\n forSinglePlayerOnly: boolean;\n page: number;\n pageSize: number;\n onLoadData: (page: number, pageSize: number) => void;\n actions?: (match: MatchHeader) => JSX.Element;\n}\n\nconst MatchesTable: React.FC = ({\n matches,\n onLoadData,\n page,\n pageSize,\n actions,\n forSinglePlayerOnly\n}) => {\n return (\n <>\n \n \n \n \n Data\n Klub\n Zawodnik\n Przeciwnik\n Status\n Wynik\n {!!forSinglePlayerOnly ? Info : <>}\n {!!actions ? Akcje : <>}\n \n \n \n {matches.map(match => (\n \n \n \n \n \n {match.club.name}\n \n \n \n \n {match.firstPlayer.name} {match.firstPlayer.surname}\n \n \n \n \n \n \n {match.secondPlayer.name} {match.secondPlayer.surname}\n \n \n \n \n \n \n \n \n {match.score ? (\n \n ) : (\n Nierozegrany\n )}\n \n \n {!!forSinglePlayerOnly ? (\n {\n !!match.description ? (<>\n \n \n \n \n \n ) : (<>)\n }\n ) : (<>)}\n {!!actions ? (\n {actions(match)}\n ) : (\n <>\n )}\n \n ))}\n \n
\n
\n \" \"}\n onChangePage={(e, p) => {\n onLoadData(p, pageSize);\n }}\n onChangeRowsPerPage={e => {\n const psize = parseInt(e.target.value);\n onLoadData(0, psize);\n }}\n />\n \n );\n};\n\nexport default MatchesTable;\n","import { compose } from \"ramda\";\n\nexport const orDefault = (x: number, defaultVal: number = 0) => Number.isNaN(x) ? defaultVal : x; \n\nexport const parseIntOrDefault = compose(orDefault, parseInt);\n\nexport const formatInt = (x: number) => {\n if(!Number.isFinite(x)) {\n return '';\n }\n return x;\n}\n\n","import React, { FC } from \"react\";\nimport { Set } from \"../../store/matches/models\";\nimport {\n Paper,\n Typography,\n IconButton,\n makeStyles,\n Grid,\n TextField,\n Button,\n Divider\n} from \"@material-ui/core\";\nimport AddCircleIcon from \"@material-ui/icons/AddCircle\";\nimport HighlightOffIcon from \"@material-ui/icons/HighlightOff\";\nimport { formatInt } from \"../../utils/numbers\";\n\ninterface SetProps extends React.HTMLProps {\n set: Set;\n onSetChange: (set: Set) => void;\n}\n\nconst useStyles = makeStyles(theme => ({\n res: {\n display: \"inline-block\",\n margin: \"0 2px\"\n },\n restb: {\n verticalAlign: \"super\",\n fontSize: \"smaller\"\n },\n gp: {\n padding: \"0 8px\"\n }\n}));\n\nconst AddResult: FC<{ click: () => void }> = ({ click }) => {\n return (\n {\n e.stopPropagation();\n click();\n }}\n >\n \n \n );\n};\nconst ShowResult: FC<{\n set: Set;\n onRemoved: () => void;\n onClick: () => void;\n}> = ({ set, onRemoved }) => {\n const classes = useStyles();\n\n return (\n \n \n \n {set.firstPlayer}\n {!!set.tieBreak && set.tieBreak.firstPlayer > 0 ? (\n {set.tieBreak.firstPlayer}\n ) : (\n <>\n )}\n :\n {set.secondPlayer}\n {!!set.tieBreak && set.tieBreak.secondPlayer > 0 ? (\n {set.tieBreak.secondPlayer}\n ) : (\n <>\n )}\n \n \n \n {\n e.stopPropagation();\n onRemoved();\n }}\n >\n \n \n \n \n );\n};\n\nconst InputResult: React.FC<{\n set: Set;\n onChange: (set: Set) => void;\n onDone: () => void;\n}> = ({ set, onChange, onDone }) => {\n return (\n \n \n \n onChange({ ...set, firstPlayer: parseInt(e.target.value) })\n }\n >\n \n \n \n :\n \n \n \n \n onChange({ ...set, secondPlayer: parseInt(e.target.value) })\n }\n >\n \n {!set.tieBreak ? (\n \n \n onChange({\n ...set,\n tieBreak: { firstPlayer: 0, secondPlayer: 0 }\n })\n }\n >\n Tie-break\n \n \n ) : (\n <>\n \n Tie-break\n \n \n \n onChange({\n ...set,\n tieBreak: {\n ...set.tieBreak!,\n firstPlayer: parseInt(e.target.value)\n }\n })\n }\n >\n \n \n \n :\n \n \n \n \n onChange({\n ...set,\n tieBreak: {\n ...set.tieBreak!,\n secondPlayer: parseInt(e.target.value)\n }\n })\n }\n >\n \n \n )}\n \n \n \n \n \n );\n};\n\nconst SetResult: React.FC = ({ set, onSetChange, style }) => {\n const [editMode, setEditMode] = React.useState(false);\n\n return (\n \n {editMode ? (\n setEditMode(false)}\n />\n ) : set.firstPlayer > 0 || set.secondPlayer > 0 ? (\n onSetChange({ firstPlayer: 0, secondPlayer: 0 })}\n onClick={() => setEditMode(!editMode)}\n >\n ) : (\n setEditMode(true)}>\n )}\n \n );\n};\n\nexport default SetResult;\n","import React, { Fragment } from \"react\";\nimport { SetValidation } from \"./utils\";\nimport {\n List,\n ListSubheader,\n ListItem,\n ListItemText,\n Divider,\n ListItemIcon\n} from \"@material-ui/core\";\nimport WarningIcon from \"@material-ui/icons/Warning\";\n\ninterface ValidationSummaryProps {\n value: SetValidation;\n}\n\nconst ValidationSummary: React.FC = ({ value }) => {\n return !!value ? (\n <>\n \n } style={{ color: \"rgba(255,0,0,1)\" }}>\n {Object.entries(value)\n .map(([set, messages]: [string, string[]], _, __) => ({\n set: parseInt(set),\n messages\n }))\n .sort((x, y) => x.set - y.set)\n .map(({ set, messages }) => (\n
  • \n
      \n \n {set === 0 ? \"Mecz\" : `Set ${set}`}\n \n {messages.map((m, i) => (\n \n \n \n \n \n \n \n \n \n ))}\n
    \n
  • \n ))}\n
    \n \n ) : (\n <>\n );\n};\n\nexport default ValidationSummary;\n","import React from \"react\";\nimport { Set } from \"../../store/matches/models\";\nimport {\n Dialog,\n DialogTitle,\n Grid,\n Typography,\n DialogActions,\n Button,\n Link,\n Checkbox\n} from \"@material-ui/core\";\nimport { SetValidation, validityStyle, validateSetsResult, sanitizeSetsResult } from \"./utils\";\nimport { update } from \"ramda\";\nimport SetResult from \"./SetResult\";\nimport ValidationSummary from \"./ValidationSummary\";\nimport ReactGA from 'react-ga';\nimport { PlayerDescriptor } from \"../../store/leagues/models\";\nimport { Player } from \"../../store/players/models\";\n\ninterface MatchResultDialogProps {\n open: boolean;\n onClosed: (success: boolean, sets: Set[], walkover: boolean) => void;\n onHelpRequested: () => void;\n firstPlayer?: PlayerDescriptor;\n secondPlayer?: PlayerDescriptor;\n currentPlayer: Player;\n}\n\nconst MatchResultDialog: React.FC = ({\n open,\n onClosed,\n onHelpRequested,\n firstPlayer,\n secondPlayer,\n currentPlayer\n}) => {\n const [validationState, setValidationState] = React.useState();\n const [sets, setSets] = React.useState([\n { firstPlayer: 0, secondPlayer: 0 },\n { firstPlayer: 0, secondPlayer: 0 },\n { firstPlayer: 0, secondPlayer: 0 }\n ]);\n const [walkover, setWalkover] = React.useState(false);\n\n const handleClose = () => {\n onClosed(false, [], false);\n };\n\n const handleWalkover = (isWalkover: boolean) => {\n if (firstPlayer?.id === currentPlayer.id && isWalkover) {\n setSets([\n { firstPlayer: 6, secondPlayer: 0 },\n { firstPlayer: 6, secondPlayer: 0 },\n { firstPlayer: 0, secondPlayer: 0 },\n ])\n } else if (secondPlayer?.id === currentPlayer.id && isWalkover) {\n setSets([\n { firstPlayer: 0, secondPlayer: 6 },\n { firstPlayer: 0, secondPlayer: 6 },\n { firstPlayer: 0, secondPlayer: 0 },\n ])\n }\n\n setWalkover(isWalkover)\n }\n\n React.useEffect(() => {\n\n if (open) {\n ReactGA.modalview('Match result dialog');\n }\n\n }, [open]);\n\n const handleSubmit = () => {\n const saneSets = sanitizeSetsResult(sets);\n const validationResult = validateSetsResult(saneSets);\n if (validationResult) {\n setValidationState(validationResult);\n return;\n } else {\n setValidationState(undefined);\n }\n\n onClosed(true, sets, walkover);\n setSets([\n { firstPlayer: 0, secondPlayer: 0 },\n { firstPlayer: 0, secondPlayer: 0 },\n { firstPlayer: 0, secondPlayer: 0 }\n ]);\n };\n\n return (\n
    \n \n Podaj wynik meczu\n
    \n \n \n \n {firstPlayer?.name} {firstPlayer?.surname} : {secondPlayer?.name} {secondPlayer?.surname}\n \n \n \n {\n walkover ? (<>Walkowera przyznajemy tylko w określonych przypadkach. Jeżeli chcesz wpisać walkowera to pierwsze skontaktuj się z nami poprzez biuro@smarttennis.pl i opisz całą sytuację.) : (<>\n \n {sets &&\n sets.map((set: Set, i: number) => (\n \n \n {i + 1}. SET\n \n {\n setSets([...update(i, { ...s }, sets)]);\n }}\n >\n \n ))}\n \n )\n }\n\n \n \n handleWalkover(e.target.checked)}>{\" \"}Walkover\n \n \n \n
    \n \n { walkover ? (<>) : ( onHelpRequested()}>Wyślij wynik mailem) }\n \n handleSubmit()}\n variant=\"contained\"\n color=\"primary\"\n >\n Zapisz\n \n \n
    \n
    \n );\n};\n\nexport default MatchResultDialog;\n","import React from \"react\";\nimport { Dialog, DialogTitle, DialogActions, Button, Checkbox, FormControlLabel } from \"@material-ui/core\";\n\ninterface CancelConfirmationDialogProps {\n open: boolean;\n onClosed: (confirmed: boolean) => void;\n }\n \nconst CancelConfirmationDialog: React.FC = ({\n open,\n onClosed\n }) => {\n\n const [confirmOpponentAware, setConfirmOpponentAware] = React.useState(false);\n\n return (\n \n Anulowanie meczu\n
    \n setConfirmOpponentAware(e.target.checked)}\n />\n }\n label=\"Potwierdzam, że przeciwnik jest świadomy mojego odwołania meczu gdzie do spotkanie pozostało mniej niż 24h, skontaktowałem/am się z nim i otrzymałem odpowiedź.\"\n /> \n
    \n \n \n onClosed(true)}\n variant=\"contained\"\n color=\"primary\"\n disabled={!confirmOpponentAware}\n >\n Kontunuuj\n \n \n
    \n );\n };\n\n export default CancelConfirmationDialog; ","import React from \"react\";\nimport { withRouter, match } from \"react-router-dom\";\nimport { connect } from \"react-redux\";\nimport { Data, isLoaded } from \"../../framework/data\";\nimport { LeagueWithCurrentUserAssignment, LeagueStatus } from \"../../store/leagues/models\";\nimport { Player } from \"../../store/players/models\";\nimport { AppState } from \"../../store/reducer\";\nimport { usersAssignedLeague } from \"../../store/leagues/selectors\";\nimport { currentPlayer } from \"../../store/players/selectors\";\nimport { Dispatch } from \"redux\";\nimport { loadLeagueDetails } from \"../../store/leagues/actions\";\nimport {\n getPlayersMatches,\n confirmMatch,\n cancelMatch,\n submitMatchResult\n} from \"../../store/matches/actions\";\nimport MatchesTable from \"./MatchesTable\";\nimport { MatchHeader, MatchStatus, Set } from \"../../store/matches/models\";\nimport { IconButton, Tooltip, Button, Popover } from \"@material-ui/core\";\nimport CheckIcon from \"@material-ui/icons/Check\";\nimport ClearIcon from \"@material-ui/icons/Clear\";\nimport PostAddIcon from \"@material-ui/icons/PostAdd\";\nimport MatchResultDialog from \"./MatchResultDialog\";\nimport ChevronLeftIcon from '@material-ui/icons/ChevronLeft';\nimport PermContactCalendarIcon from \"@material-ui/icons/PermContactCalendar\";\nimport logger from \"../../framework/logger\";\nimport LeaguePlayerView from \"../leagues/LeaguePlayerView\";\nimport { Club } from \"../../store/clubs/models\";\nimport { useAuth0 } from \"@auth0/auth0-react\";\nimport CancelConfirmationDialog from \"./CancelConfirmation\";\n\ninterface MyMatchesPageProps {\n league: Data;\n player: Data;\n clubs: Data;\n loadLeagueDetails: (year: string, id: string) => void;\n loadPlayersMatches: (\n year: string,\n id: string,\n skip: number,\n take: number,\n token: string\n ) => void;\n match: match<{ year: string; id: string }>;\n matches: Data;\n confirmMatch: (\n match: MatchHeader,\n league: LeagueWithCurrentUserAssignment,\n skip: number,\n take: number,\n token: string\n ) => void;\n cancelMatch: (\n match: MatchHeader,\n league: LeagueWithCurrentUserAssignment,\n skip: number,\n take: number,\n token: string\n ) => void;\n submitResult: (\n match: MatchHeader,\n league: LeagueWithCurrentUserAssignment,\n sets: Set[],\n walkover: boolean,\n skip: number,\n take: number,\n token: string\n ) => void;\n}\n\nconst MyMatchesPage: React.FC = ({\n league,\n player,\n loadLeagueDetails,\n match,\n loadPlayersMatches,\n matches,\n confirmMatch,\n cancelMatch,\n submitResult,\n clubs\n}) => {\n const { getAccessTokenSilently } = useAuth0();\n\n const [page, setPage] = React.useState();\n const [pageSize, setPageSize] = React.useState();\n\n const [matchResultDialogOpen, setMatchResultDialogOpen] = React.useState<\n boolean\n >(false);\n\n const [matchCancelDialogOpen, setMatchCancelDialogOpen] =\n React.useState(false);\n\n const [currentMatch, setCurrentMatch] = React.useState();\n const [playerInView, setPlayerInView] = React.useState<{\n el: HTMLElement;\n playerId: string;\n } | null>(null);\n\n const handleMatchResult = async (success: boolean, sets: Set[], walkover: boolean) => {\n if (success && league.type === \"LOADED\" && currentMatch) {\n const token = await getAccessTokenSilently();\n logger.logEvent(`Submitting match result for ${currentMatch.id}`, { match: JSON.stringify(currentMatch), sets: JSON.stringify(sets) });\n submitResult(\n currentMatch,\n league.value,\n sets,\n walkover,\n (page || 0) * (pageSize || 25),\n pageSize || 25,\n token\n );\n }\n setMatchResultDialogOpen(false);\n };\n\n const handleMatchCancelled = async (confirmed: boolean) => {\n if(confirmed && league.type === \"LOADED\" && currentMatch) {\n const token = await getAccessTokenSilently();\n cancelMatch(\n currentMatch,\n league.value,\n (page || 0) * (pageSize || 25),\n pageSize || 25,\n token\n );\n }\n\n setMatchCancelDialogOpen(false);\n }\n\n const handleHelpRequested = () => {\n window.location.assign(`mailto:support@smarttennis.pl?subject=Wynik%20meczu%20${currentMatch?.id}&body=Proszę%20podać%20wynik%20meczu`);\n }\n\n const getPlayerDetails = (playerId: string, target: HTMLElement) => {\n setPlayerInView({ el: target, playerId });\n };\n\n React.useEffect(() => {\n var id = match.params.id;\n var year = match.params.year;\n\n if (!isLoaded(league)) {\n loadLeagueDetails(year, id);\n }\n\n if (league.type === \"LOADED\" && player.type === \"LOADED\") {\n getAccessTokenSilently().then((token: string) => {\n loadPlayersMatches(league.value.year, league.value.id, 0, 25, token);\n });\n }\n }, [\n match.params.id,\n match.params.year,\n loadLeagueDetails,\n league,\n loadPlayersMatches\n ]);\n\n return (\n <>\n\n {matches.type === \"LOADED\" &&\n league.type === \"LOADED\" &&\n player.type === \"LOADED\" ? (\n <>\n handleMatchResult(success, sets, walkover)}\n currentPlayer={player.value}\n onHelpRequested={() => handleHelpRequested()}\n >\n handleMatchCancelled(confirmed)}>\n \n setPlayerInView(null)}\n anchorOrigin={{\n vertical: \"top\",\n horizontal: \"left\",\n }}\n transformOrigin={{\n vertical: \"top\",\n horizontal: \"right\",\n }}\n >\n {!!playerInView ? (\n \n ) : (\n <>\n )}\n \n {\n const token = await getAccessTokenSilently();\n const skip = page * pageSize;\n const take = pageSize;\n loadPlayersMatches(\n league.value.year,\n league.value.id,\n skip,\n take,\n token\n );\n setPage(page);\n setPageSize(pageSize);\n }}\n page={page || 0}\n pageSize={pageSize || 25}\n actions={m => {\n const firstAction =\n league.value.status !== LeagueStatus.Finished &&\n m.status === MatchStatus.New &&\n m.createdBy &&\n m.createdBy.id !== player.value.id &&\n (m.firstPlayer.id === player.value.id ||\n m.secondPlayer.id === player.value.id) ? (\n \n {\n const token = await getAccessTokenSilently();\n logger.logEvent(`Confirming match ${m.id}`, { match: m });\n confirmMatch(\n m,\n league.value,\n (page || 0) * (pageSize || 25),\n pageSize || 25,\n token\n );\n }}\n >\n \n \n \n ) : undefined;\n\n const secondAction =\n league.value.status !== LeagueStatus.Finished &&\n (m.status === MatchStatus.New || m.status === MatchStatus.Confirmed) &&\n (m.firstPlayer.id === player.value.id ||\n m.secondPlayer.id === player.value.id) ? (\n \n {\n const token = await getAccessTokenSilently();\n logger.logEvent(`Cancelling match ${m.id}`, { match: m });\n if (((new Date().getTime() - m.date.getTime()) / (1000 * 60 * 60)) < 24) {\n setCurrentMatch(m);\n setMatchCancelDialogOpen(true);\n } else {\n cancelMatch(\n m,\n league.value,\n (page || 0) * (pageSize || 25),\n pageSize || 25,\n token\n );\n }\n }}\n >\n \n \n \n ) : undefined;\n\n const thirdAction =\n league.value.status !== LeagueStatus.Finished &&\n m.status === MatchStatus.Confirmed && m.date <= new Date() &&\n (m.firstPlayer.id === player.value.id ||\n m.secondPlayer.id === player.value.id) ? (\n \n {\n setCurrentMatch(m);\n setMatchResultDialogOpen(true);\n }}\n >\n \n \n \n ) : undefined;\n\n const forthAction = (\n getPlayerDetails(m.firstPlayer.id === player.value.id ? m.secondPlayer.id : m.firstPlayer.id, evt.currentTarget)}\n >\n \n \n )\n\n let actions: JSX.Element[] = [];\n if (!!firstAction) {\n actions = [...actions, firstAction];\n }\n if (!!secondAction) {\n actions = [...actions, secondAction];\n }\n if (!!thirdAction) {\n actions = [...actions, thirdAction];\n }\n if (!!forthAction) {\n actions = [...actions, forthAction];\n }\n\n\n return <>{actions};\n }}\n >\n \n ) : (\n <>\n )}\n \n \n );\n};\n\nconst mapStateToProps = (state: AppState) => {\n return {\n league: usersAssignedLeague(state),\n player: currentPlayer(state),\n matches: state.matches.currentLeaguePlayersMatchesPage,\n clubs: state.clubs.clubs\n };\n};\n\nconst mapDispatchToProps = (dispatch: Dispatch) => {\n return {\n loadLeagueDetails: (year: string, id: string) =>\n dispatch(loadLeagueDetails({ year, id })),\n loadPlayersMatches: (\n year: string,\n id: string,\n skip: number,\n take: number,\n token: string\n ) => dispatch(getPlayersMatches({ year, id, skip, take, token })),\n confirmMatch: (\n match: MatchHeader,\n league: LeagueWithCurrentUserAssignment,\n skip: number,\n take: number,\n token: string\n ) =>\n dispatch(\n confirmMatch({\n skip,\n take,\n token,\n matchId: match.id,\n leagueId: league.id,\n year: league.year\n })\n ),\n cancelMatch: (\n match: MatchHeader,\n league: LeagueWithCurrentUserAssignment,\n skip: number,\n take: number,\n token: string\n ) =>\n dispatch(\n cancelMatch({\n skip,\n take,\n token,\n matchId: match.id,\n leagueId: league.id,\n year: league.year\n })\n ),\n submitResult: (\n match: MatchHeader,\n league: LeagueWithCurrentUserAssignment,\n sets: Set[],\n walkover: boolean,\n skip: number,\n take: number,\n token: string\n ) =>\n dispatch(\n submitMatchResult({\n leagueId: league.id,\n matchId: match.id,\n sets,\n walkover,\n skip,\n take,\n token,\n year: league.year\n })\n )\n };\n};\n\nexport default withRouter(\n connect(mapStateToProps, mapDispatchToProps)(MyMatchesPage)\n);\n","import React from \"react\";\nimport { LeagueWithCurrentUserAssignment } from \"../../store/leagues/models\";\nimport { Data, isLoaded } from \"../../framework/data\";\nimport MatchesTable from \"./MatchesTable\";\nimport { MatchHeader } from \"../../store/matches/models\";\nimport { withRouter, match } from \"react-router-dom\";\nimport { connect } from \"react-redux\";\nimport { AppState } from \"../../store/reducer\";\nimport { usersAssignedLeague } from \"../../store/leagues/selectors\";\nimport { Dispatch } from \"redux\";\nimport { loadLeagueDetails } from \"../../store/leagues/actions\";\nimport { getLeaguesMatches } from \"../../store/matches/actions\";\nimport { Button } from \"@material-ui/core\";\nimport ChevronLeftIcon from '@material-ui/icons/ChevronLeft';\n\ninterface AllMatchesPageProps {\n league: Data;\n matches: Data;\n match: match<{ year: string; id: string }>;\n loadLeagueDetails: (year: string, id: string) => void;\n loadLeagueMatches: (\n year: string,\n id: string,\n skip: number,\n take: number\n ) => void;\n}\n\nconst AllMatchesPage: React.FC = ({\n league,\n loadLeagueDetails,\n loadLeagueMatches,\n matches,\n match\n}) => {\n const [page, setPage] = React.useState();\n const [pageSize, setPageSize] = React.useState();\n\n React.useEffect(() => {\n var id = match.params.id;\n var year = match.params.year;\n\n if (!isLoaded(league)) {\n loadLeagueDetails(year, id);\n }\n\n if (league.type === \"LOADED\") {\n loadLeagueMatches(league.value.year, league.value.id, 0, 25);\n };\n\n }, [\n match.params.id,\n match.params.year,\n loadLeagueDetails,\n league,\n loadLeagueMatches\n ]);\n\n return (\n <>\n {league.type === \"LOADED\" && matches.type === \"LOADED\" ? (\n {\n const skip = page * pageSize;\n const take = pageSize;\n loadLeagueMatches(\n league.value.year,\n league.value.id,\n skip,\n take\n );\n setPage(page);\n setPageSize(pageSize);\n }}\n page={page || 0}\n pageSize={pageSize || 25}\n >\n ) : (\n <>\n )}\n \n \n );\n}\n\nconst mapStateToProps = (state: AppState) => {\n return {\n league: usersAssignedLeague(state),\n matches: state.matches.currentLeagueAllMatchesPage\n };\n };\n\n const mapDispatchToProps = (dispatch: Dispatch) => {\n return {\n loadLeagueDetails: (year: string, id: string) => dispatch(loadLeagueDetails({ year, id })),\n loadLeagueMatches: (\n year: string,\n id: string,\n skip: number,\n take: number,\n ) => dispatch(getLeaguesMatches({ year, id, skip, take })),\n \n };\n };\n\nexport default withRouter(\n connect(mapStateToProps, mapDispatchToProps)(AllMatchesPage)\n );","import React from \"react\";\nimport { AppState } from \"../../store/reducer\";\nimport { Dispatch } from \"redux\";\nimport { clearNotification } from \"../../store/shell/actions\";\nimport { connect } from \"react-redux\";\nimport { Snackbar } from \"@material-ui/core\";\nimport MuiAlert, { AlertProps } from '@material-ui/lab/Alert';\nimport { Notification } from '../../framework/action'\n\nfunction Alert(props: AlertProps) {\n return ;\n }\n \n\ninterface MessageNotifierProps {\n notification: Notification;\n clearNotification: () => void;\n}\n\nconst MessageNotifier : React.FC = ({ notification, clearNotification }) => {\n return ( clearNotification()}>\n clearNotification()} severity={notification?.severity}>\n {notification?.message}\n \n )\n};\n\nconst mapStateToProps = (state: AppState) => ({\n notification: state.shell.notification\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) => ({\n clearNotification: () => dispatch(clearNotification())\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(MessageNotifier);","import React from \"react\";\nimport { PaymentStatus } from \"../../store/payments/models\";\nimport { Grid, Typography, Tooltip } from \"@material-ui/core\";\n\nimport CancelIcon from \"@material-ui/icons/Cancel\";\nimport CheckCircleIcon from \"@material-ui/icons/CheckCircle\";\nimport SwapHorizontalCircleIcon from \"@material-ui/icons/SwapHorizontalCircle\";\nimport HelpIcon from \"@material-ui/icons/Help\";\n\ninterface PaymentStatusProps {\n value: PaymentStatus;\n}\n\nconst PaymentStatusC: React.FC = ({ value }) => {\n switch (value) {\n case PaymentStatus.CANCELED:\n return (\n \n \n \n Anulowana\n \n \n );\n case PaymentStatus.COMPLETED:\n return (\n \n \n \n Zatwierdzona\n \n \n );\n case PaymentStatus.PENDING:\n return (\n \n \n \n Oczekująca na wpłątę\n \n \n );\n case PaymentStatus.WAITING_FOR_CONFIRMATION:\n return (\n \n \n \n \n Oczekująca na potwierdzenie\n \n \n \n );\n }\n};\n\nexport default PaymentStatusC;\n","import React from \"react\";\nimport { PaymentInfo } from \"../../store/payments/models\";\nimport { compareDesc } from \"date-fns\";\nimport { drop, take } from \"ramda\";\nimport {\n TableContainer,\n Table,\n TableHead,\n TableRow,\n TableCell,\n TableBody,\n TablePagination,\n IconButton,\n Tooltip,\n} from \"@material-ui/core\";\nimport DateTimeView from \"../../framework/components/DateTimeView\";\nimport PaymentStatus from \"./PaymentStatus\";\nimport { PaymentStatus as PS } from \"../../store/payments/models\";\nimport ReplayIcon from \"@material-ui/icons/Replay\";\n\ninterface PaymentsListProps {\n payments: PaymentInfo[];\n redoPayment(payment: PaymentInfo): void;\n}\n\nconst PaymentsList: React.FC = ({ payments, redoPayment }) => {\n const orderedPlayers = payments.sort((x, y) =>\n compareDesc(x.paymentDate, y.paymentDate)\n );\n\n const [page, setPage] = React.useState();\n const [pageSize, setPageSize] = React.useState();\n\n const viewItems = drop(pageSize * page, take(pageSize, orderedPlayers));\n\n return (\n <>\n \n \n \n \n Data\n Liga\n Identyfikator płatności\n Kwota\n Status\n Akcje\n \n \n \n {viewItems.map((payment) => (\n \n \n \n \n {payment.leagueName}\n {payment.externalPaymentOrderId}\n {payment.finalPrice} PLN\n \n \n \n \n {payment.paymentStatus !== PS.COMPLETED ? (\n \n redoPayment(payment)} size=\"small\">\n \n \n \n ) : (\n <>\n )}\n \n \n ))}\n \n
    \n
    \n {\n setPage(p);\n }}\n onChangeRowsPerPage={(e) => {\n setPageSize(e.target.value);\n }}\n />\n \n );\n};\n\nexport default PaymentsList;\n","import React from \"react\";\nimport { PaymentInfo } from \"../../store/payments/models\";\nimport { Data } from \"../../framework/data\";\nimport { connect } from \"react-redux\";\nimport { AppState } from \"../../store/reducer\";\nimport { Dispatch } from \"redux\";\nimport { getUserPayments, redoUserPayment } from \"../../store/payments/actions\";\nimport PaymentsList from \"./PaymentsList\";\nimport { useAuth0 } from \"@auth0/auth0-react\";\n\ninterface PaymentsPageProps {\n payments: Data;\n loadPayments: (token: string) => void;\n redoPayment: (token: string, payment: PaymentInfo) => void;\n}\n\nconst PaymentsPage: React.FC = ({\n payments,\n loadPayments,\n redoPayment\n}) => {\n const { getAccessTokenSilently, isAuthenticated } = useAuth0();\n\n React.useEffect(() => {\n if (isAuthenticated) {\n getAccessTokenSilently().then((x: string) => {\n loadPayments(x);\n });\n }\n }, [isAuthenticated]);\n\n const onRedoPayment = async (p: PaymentInfo) => {\n var token = await getAccessTokenSilently();\n redoPayment(token, p);\n }\n\n return (\n <>\n {payments.type === \"LOADED\" ? (\n \n ) : (\n <>\n )}\n \n );\n};\n\nconst mapStateToProps = (state: AppState) => ({\n payments: state.payments.payments\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) => ({\n loadPayments: (token: string) => dispatch(getUserPayments(token)),\n redoPayment: (token: string, payment: PaymentInfo) => dispatch(redoUserPayment({ token, payment }))\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(PaymentsPage);","import React from \"react\";\nimport { Grid, Divider, Typography } from \"@material-ui/core\";\n\nconst AboutPage: React.FC = () => {\n return (\n \n \n

    SMART TENNIS

    \n

    \n \n Cześć, cieszymy się że dotarłeś do nas i jesteśmy gotowi do wspólnej\n pozytywnej rywalizacji na korcie!\n \n

    \n

    \n Jesteśmy zespołem, który dzięki połączeniu swojej pasji\n programistycznej oraz tenisowej stworzył narzędzie służące do\n rozgrywania ligi oraz turniejów tenisowych.\n

    \n

    \n Na naszej platformie użytkownicy mają możliwość zapisania się do ligi,\n rozgrywek, poznania nowych partnerów tenisowych i korzystania ze\n zniżek na współpracujących z nami kortami tenisowymi.\n

    \n

    \n Aby do nas dołączyć, należy się zarejestrować, zapisać do\n interesującej Ciebie ligi, opłacić wpisowe, skontaktować się z\n rywalem, skorzystać z promocji która jest na korcie tenisowym oraz\n ostatnią prostą jest rozegranie meczu! Po rozgrywce wygrana osoba na\n platformie wpisuje wynik meczu. Tak dla Was działamy!\n

    \n

    To nie wszystko….

    \n

    \n Każdy uczestnik ligi będzie zbierał punkty za rozegrane mecze oraz\n aktywności związane z ligą w systemie motywacyjnym, które wymieni na\n nagrody. Jakie? Śledź naszą zakładkę AKTUALNOŚCI tam będziemy wrzucali\n nowości.\n

    \n

    \n Firmy które z nami współpracują m.in. HEAD, Happy Diet oferują Ci %\n zniżki na ich produkty.\n

    \n

    Do zobaczenia na korcie! 🎾

    \n

    Najważniejsze korzyści udziału w lidze:

    \n
      \n
    • możliwość gry na dowolnych kortach w Krakowie i okolicach
    • \n
    • \n zniżki na mecze ligowe na współpracujących z nami kortach tenisowych\n
    • \n
    • szybkie znalezienie partnera na mecz o podobnej sile gry
    • \n
    • turnieje tenisowe zaliczane do ligi
    • \n
    • \n system motywacyjny uczestników (zdobywanie punktów i wymiana na\n nagrody) (rozegranie meczu - 5 smart punktów, polecenia zawodnika -\n 25 smart punktów)\n
    • \n
    • \n nagrody rzeczowe oraz vouchery dla aktywnych oraz najlepszych\n uczestników ligi (łączna pula nagród to 10 000 zł)\n
    • \n
    • \n rabaty dla uczestników ligi od naszych partnerów - HEAD, Happy Diet\n
    • \n
    \n \n
    \n\n \n

    Sponsorzy:

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

    Dane kontaktowe

    \n Stowarzyszenie KLUB SPORTOWY PROJEKT TENIS
    \n Osiedle Górali 11/19 31-960 Kraków,
    \n NIP: 6783168195, REGON: 367297286, KRS: 0000677574
    \n Email: biuro@smarttennis.pl\n

    \n \n
    \n
    \n \n );\n};\n\nexport default AboutPage;\n","import React from \"react\";\nimport { Typography } from \"@material-ui/core\";\n\nconst CookiesPolicyPage: React.FC = () => (\n \n
      \n
    1. \n Pliki cookies (tzw. ciasteczka) to niewielkie pliki tekstowe wysyłane\n przez odwiedzany serwis internetowy do urządzenia internauty (komputer,\n smartfon itp.). Nie zawierają one żadnych danych osobowych.\n
    2. \n
    3. Serwis smarttennis.pl nie używa własnych plików cookies.
    4. \n
    5. \n Serwis smarttennis.pl używa zewnętrznych API na potrzeby obsługi:\n
        \n
      • płatności online
      • \n
      • map
      • \n
      • logowania się do serwisu
      • \n
      \n Serwimy te mogą zakładać swoje właśne pliki cookies.\n
    6. \n
    7. \n Standardowo oprogramowanie służące do przeglądania stron internetowych\n domyślnie dopuszcza umieszczanie plików cookies na urządzeniu końcowym\n Użytkownika. Ustawienia te mogą zostać zmienione przez Użytkownika w taki\n sposób, aby blokować automatyczną obsługę \"cookies\" w ustawieniach\n przeglądarki internetowej bądź informować o ich każdorazowym przesłaniu na\n urządzenia użytkownika.\n
    8. \n
    9. \n Użytkownicy Serwisu mogą dokonać w każdym czasie zmiany ustawień\n dotyczących plików cookies. Szczegółowe informacje o możliwości i\n sposobach obsługi plików cookies dostępne są w ustawieniach oprogramowania\n (przeglądarki internetowej).\n
    10. \n
    \n
    \n);\n\nexport default CookiesPolicyPage;","import React from \"react\";\nimport { Typography } from \"@material-ui/core\";\n\nconst CookiesPolicyPage: React.FC = () => (\n \n
    \n
    \n ADMINISTRATOR DANYCH OSOBOWYCH\n
    \n
    \n Administratorem danych osobowych jest:
    \n
      \n
    • \n 4Steps Solutions PSA, NIP: 6772481296, REGON: 522591801, ul. Samuela Bogumiła Lindego 1c, 30-148 Kraków, tel. kontaktowy: +48603300721\n
    • \n
    \n
    \n DANE OSOBOWE\n
    \n
    \n Dane osobowe zbierane przez Administratora przetwarzane są na zasadach\n określonych w przepisach o ochronie danych osobowych, w tym w rozporządzeniu\n Parlamentu Europejskiego i Rady (UE) 2016/679 z dnia 27 kwietnia 2016 r. w\n sprawie ochrony osób fizycznych w związku z przetwarzaniem danych osobowych\n i w sprawie swobodnego przepływu takich danych oraz uchylenia dyrektywy\n 95/46/WE (ogólne rozporządzenie o ochronie danych) (\"RODO\") oraz w polskich\n przepisach wydanych w związku z RODO, w tym m.in. ustawie z dnia 10 maja\n 2018 r. o ochronie danych osobowych. Administratorzy zachowują dane osobowe\n w całkowitej poufności i zabezpieczają je przed niepowołanym dostępem osób\n trzecich na zasadach określonych w wyżej wskazanych aktach prawnych.\n
    \n
    \n INSPEKTOR DANYCH OSOBOWYCH\n
    \n
    \n W razie pytań dotyczących przetwarzania danych prosimy o kontakt pod adresem\n poczty elektronicznej lub biuro@smarttennis.pl\n
    \n
    \n UPRAWNIENIA OSÓB, KTÓRYCH DOTYCZĄ DANE OSOBOWE\n
    \n
    \n Przetwarzanie Państwa danych osobowych odbywa się na zasadzie całkowitej\n dobrowolności, jednakże w zależności od okoliczności odmowa udostępnienia\n danych lub żądanie ich usunięcia może uniemożliwić nam np. kontakt z\n Państwem czy przekazywanie Państwu informacji o działalności Administratorów\n lub wykonanie usługi na Państwa rzecz.\n
    \n
    \n W każdym czasie przysługuje Państwu prawo dostępu do Państwa danych\n osobowych, prawo ich sprostowania, usunięcia lub ograniczenia przetwarzania\n oraz prawo do przenoszenia danych. Niektóre z tych uprawnień mogą nie\n przysługiwać w zakresie przetwarzania danych w ramach świadczenia pomocy\n prawnej.\n
    \n
    \n Zgodnie z zasadami określonymi w przepisach prawnych dotyczących ochrony\n danych osobowych i w przewidzianym w nich zakresie przysługuje Państwu prawo\n dostępu do Państwa danych osobowych, prawo ich sprostowania, usunięcia lub\n ograniczenia przetwarzania oraz prawo do przenoszenia danych. Jeżeli nie\n chcą Państwo, aby Administrator przetwarzał Państwa dane osobowe w celach\n marketingowych, mogą Państwo w każdym czasie zgłosić sprzeciw wobec\n przetwarzania danych osobowych w tym celu.\n
    \n
    \n PRZETWARZANIE DANYCH OSOBOWYCH – ZAKRES I CELE\n
    \n
    W ramach swoich działalności Administrator zbiera i przetwarza dane\n osobowe:\n
      \n
    1. \n w celach wynikających z prawnie uzasadnionych interesów realizowanych\n przez Administratora: w celu świadczenia usług na rzecz Klientów, oraz w\n celu zapewnienia bezpieczeństwa teleinformatycznego związanego z witryną\n liga.smarttennis.pl (art. 6 ust. 1 lit. f RODO);\n
    2. \n
    3. \n w celu wykonywania umów zawieranych przez Administratora z klientami\n oraz innymi podmiotami współpracującymi z Administratorem (art. 6 ust. 1\n lit. b RODO);\n
    4. \n
    \n Dane osobowe są przetwarzane również w zakresie wypełnienia obowiązków\n prawnych ciążących na Administratorze (art. 6 ust. 1 lit. c RODO).\n
    \n
    \n Państwa dane osobowe nie są przedmiotem profilowania.\n
    \n
    \n OKRES PRZETWARZANIA\n
    \n
    \n Dane osobowe będą przetwarzane, odpowiednio, do czasu zrealizowania\n właściwych prawnie uzasadnionych interesów Klientów realizowanych przez\n Administratora związanych z przetwarzaniem określonych danych, do czasu\n upływu terminów przedawnienia związanych z umową, z którą jest związane\n przetwarzanie danych osobowych, lub związanych z przedawnieniem obowiązków\n wynikających z przepisów prawa lub do czasu wniesienia sprzeciwu w zakresie\n przetwarzania w celach marketingowych.\n
    \n
    \n PRZEKAZYWANIE DANYCH OSOBOWYCH INNYM PODMIOTOM\n
    \n
    \n Odbiorcami Państwa danych osobowych mogą być w szczególności podmioty\n powiązane bezpośrednio lub pośrednio z Administratorem i, w szczególności w\n sposób organizacyjny lub osobowy, które miałyby siedzibę w jednym z Państw\n Członkowskich Unii Europejskiej, oraz inne podmioty przetwarzające dane w\n imieniu Administratora na podstawie umowy powierzenia przetwarzania danych\n osobowych), księgowi, biegli rewidenci i audytorzy, prawnicy, organy\n administracji, służby państwowe i sądy.\n
    \n
    \n SIEDZIBY PRZETWARZANIA PAŃSTWA DANYCH OSOBOWYCH\n
    \n
    \n Państwa dane osobowe przetwarzane są w siedzibie Administratora. Dane\n osobowe nie są przekazywane do krajów znajdujących się poza Unią Europejską.\n W razie przekazania danych osobowych do państw trzecich znajdujących się\n poza UE Administrator zastosuje odpowiednie instrumenty mające na celu\n zapewnienie bezpieczeństwa Państwa danych osobowych.\n
    \n
    \n PRAWO DO WNIESIENIA SKARGI\n
    \n
    \n Organem nadzorczym w zakresie danych osobowych w Polsce jest obecnie Prezes\n Urzędu Ochrony Danych Osobowych. Jest Pan/Pani uprawniony wniesienia skargi\n do organu nadzorczego, a w przypadku przetwarzania danych na podstawie zgody\n – prawo do jej cofnięcia.\n
    \n
    \n ZMIANY POLITYKI PRYWATNOŚCI\n
    \n
    \n Wszelkie zmiany wprowadzane przez nas do Polityki Prywatności w przyszłości\n będą publikowane w witrynie liga.smarttennis.pl. Jeśli nie akceptują Państwo naszej\n Polityki Prywatności lub zmian w Polityce Prywatności, powinni Państwo\n zaprzestać korzystania z naszej strony internetowej.\n
    \n
    \n
    \n);\n\nexport default CookiesPolicyPage;\n","import React from \"react\";\nimport {\n Grid,\n Card,\n CardHeader,\n Avatar,\n CardContent,\n CardActions,\n Button,\n Typography,\n} from \"@material-ui/core\";\n\nconst NewsPage: React.FC = () => {\n return (\n \n \n \n \n \n \n }\n title=\"Zbieraj SmartPunkty\"\n subheader=\"25.05.2020 23:09\"\n >\n \n \n Czy wiesz, że grając w lidze zbierasz punkty, które później możesz\n wymieniać na nagrody? Sprawdź katalog nagród pod{\" \"}\n \n tym linkiem\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default NewsPage;\n","import React from \"react\";\nimport { Data } from \"../../framework/data\";\nimport { Player } from \"../../store/players/models\";\nimport {\n Card,\n Avatar,\n CardContent,\n Typography,\n makeStyles,\n Divider,\n CircularProgress,\n Button,\n Link,\n} from \"@material-ui/core\";\nimport PersonPinIcon from '@material-ui/icons/PersonPin';\nimport { format } from \"date-fns\";\nimport Alert from \"@material-ui/lab/Alert\";\nimport { useAuth0 } from \"@auth0/auth0-react\";\n\ninterface ShoppingInfoProps {\n player: Data;\n}\n\nconst useStyles = makeStyles(({ palette }) => ({\n subheader: {\n fontSize: 14,\n color: palette.grey[500],\n marginBottom: \"0.875em\",\n },\n card: {\n textAlign: \"center\",\n },\n avatar: {\n margin: \"auto\",\n },\n divider: {\n margin: \"8px 0\",\n },\n}));\n\nconst ShoppingInfo: React.FC = ({ player }) => {\n\n const styles = useStyles();\n const { loginWithRedirect } = useAuth0();\n\n return (\n \n \n {player.type === \"LOADED\" ? (\n <>\n \n \n \n \n {player.value.name} {player.value.surname}\n \n \n Z nami od: {format(new Date(player.value.joined!), \"yyyy-MM-dd\")}\n \n \n \n SmartPunkty\n \n \n {player.value.rewardPoints ?? 0}\n \n \n \n ) : player.type === \"LOADING\" ? (\n \n \n \n ) : (\n \n loginWithRedirect({\n redirectUri: window.location.href, appState: {\n targetUrl: window.location.hash\n }\n })}>Zaloguj się, aby uzyskać informacje o graczu oraz kontynuować zakupy.\n \n )}\n \n \n );\n};\n\nexport default ShoppingInfo;\n","import { Basket } from \"./models\";\n\nexport const basketSum = (basket: Basket) => basket.products.map(x => x.count * x.smartPointsPrice).reduce((p, c) => p + c, 0);\n\nexport const productCount = (productid: string, basket: Basket) => basket.products.find(p => p.id === productid)?.count ?? 0;","import React from \"react\";\nimport { Product, Basket } from \"../../store/shop/models\";\nimport {\n List,\n ListItemText,\n ListItem,\n makeStyles,\n ListItemSecondaryAction,\n IconButton,\n Grid,\n Card,\n CardActionArea,\n CardMedia,\n CardContent,\n Typography,\n CardActions,\n Button,\n} from \"@material-ui/core\";\nimport AddCircleIcon from \"@material-ui/icons/AddCircle\";\nimport AddShoppingCartIcon from '@material-ui/icons/AddShoppingCart';\nimport { basketSum, productCount } from \"../../store/shop/utils\";\n\ninterface ProductsListProps {\n products: Product[];\n productAdded: (p: Product) => void;\n productRemoved: (p: Product) => void;\n basket: Basket;\n pointsBalance: number;\n}\n\nconst useStyles = makeStyles((theme) => ({\n media: {\n height: 200,\n backgroundSize: \"contain\"\n }, \n card: {\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'space-evenly',\n height: 430\n },\n textContent: {\n flexGrow: 1\n }\n}));\n\nconst ProductsList: React.FC = ({\n products,\n productAdded,\n basket,\n pointsBalance,\n}) => {\n const classes = useStyles();\n return (\n <>\n \n {products.map((p: Product) => (\n \n \n \n \n \n \n \n {p.name}\n \n \n {p.additionalInfo}\n \n \n {`Koszt w SmartPunktach: ${p.smartPointsPrice}`}\n \n \n \n \n \n \n \n ))}\n \n \n \n );\n};\n\nexport default ProductsList;\n","import React from \"react\";\nimport {\n Grid,\n FormControl,\n InputLabel,\n Select,\n MenuItem,\n ListSubheader,\n FormHelperText,\n} from \"@material-ui/core\";\nimport { Spot } from \"../../store/shop/models\";\nimport { groupBy } from \"ramda\";\n\ninterface SpotPlaceProps {\n spots: Spot[];\n spotSelected: (spot: Spot) => void;\n selectedSpot: Spot|null;\n}\n\nconst SpotPlace: React.FC = ({ spots, spotSelected, selectedSpot }) => {\n const [error, setError] = React.useState(!selectedSpot);\n\n return (\n \n \n \n Wybierz miejsce odbioru\n {\n const spot = spots.find((x) => x.id === e.target.value);\n if (!spot) {\n setError(true);\n } else {\n setError(false);\n spotSelected(spot);\n }\n }}\n >\n \n Wybierz...\n \n {Object.entries(groupBy((sg) => sg.city, spots)).map(\n ([name, spots]) => {\n return [\n {name},\n ...spots.map((s) => (\n \n {s.name}, {s.address}, {s.city}\n \n )),\n ];\n }\n )}\n \n Proszę wybrać miejsce, w których możesz odebrać zamówienie\n \n \n \n );\n};\n\nexport default SpotPlace;\n","import React from \"react\";\nimport { Basket, Spot } from \"../../store/shop/models\";\nimport {\n Grid,\n Typography,\n List,\n ListItem,\n Avatar,\n ListItemAvatar,\n ListItemText,\n Divider,\n} from \"@material-ui/core\";\nimport Alert from \"@material-ui/lab/Alert\";\n\ninterface ShoppingSummaryProps {\n basket: Basket;\n spot: Spot;\n}\n\nconst ShoppingSummary: React.FC = ({ basket, spot }) => {\n return (\n \n \n Produkty\n \n {basket.products.map((x) => (\n \n \n {x.count}\n \n \n \n ))}\n \n \n \n Suma:{\" \"}\n {basket.products.reduce(\n (p, c) => p + c.count * c.smartPointsPrice,\n 0\n )}{\" \"}\n SmartPunktów\n \n \n \n Odbiór\n \n \n \n \n \n \n \n \n \n Odbiory zamówień zazwyczaj odbywają się podczas finałów lub turniejów organizowaych przez SmartTennis.\n \n \n \n \n );\n};\n\nexport default ShoppingSummary;\n","import React from \"react\";\nimport { OrderSubmissionState, OrderSubmissionStatus } from \"../../store/shop/models\";\nimport { Grid, CircularProgress } from \"@material-ui/core\";\n\nimport ThumbUpIcon from '@material-ui/icons/ThumbUp';\nimport ErrorIcon from '@material-ui/icons/Error';\n\ninterface ShoppingSubmissionStateProps {\n state: OrderSubmissionState;\n}\n\nconst ShoppingSubmissionState: React.FC = ({\n state,\n}) => {\n return (\n \n \n
    \n {\n state.status === OrderSubmissionStatus.PENDING ? :\n state.status === OrderSubmissionStatus.FINISHED ? :\n state.status === OrderSubmissionStatus.FAILED ? :\n <>\n }\n
    \n
    \n { state.message }\n
    \n
    \n \n );\n};\n\nexport default ShoppingSubmissionState;\n","import React from \"react\";\nimport { Stepper, Step, StepLabel, Grid, Button, useMediaQuery, useTheme } from \"@material-ui/core\";\nimport { Product, ProductItem, Basket, Spot, OrderSubmissionState } from \"../../store/shop/models\";\nimport ProductsList from \"./ProductsList\";\nimport SpotPlace from \"./SpotPlace\";\nimport ShoppingSummary from \"./ShoppingSummary\";\nimport ShoppingSubmissionState from \"./ShoppingSubmissionState\";\n\nconst constructStepContent = (\n activeStep: number,\n products: Product[],\n productAdded: (p: ProductItem) => void,\n basket: Basket,\n pointsBalance: number,\n spots: Spot[],\n spotSelected: (s: Spot) => void,\n selectedSpot: Spot | null,\n submissionState: OrderSubmissionState\n) => {\n switch (activeStep) {\n case 0: {\n return (\n {\n productAdded({ ...p, count: 1 });\n }}\n productRemoved={() => {}}\n basket={basket}\n pointsBalance={pointsBalance}\n />\n );\n }\n case 1: {\n return (\n \n );\n }\n case 2: {\n return (\n \n );\n }\n case 3: {\n return (\n\n );\n }\n default: {\n return <>;\n }\n }\n};\n\ninterface ShoppingProcessProps {\n products: Product[];\n productAdded: (p: ProductItem) => void;\n basket: Basket;\n pointsBalance: number;\n spots: Spot[];\n spotSelected: (s: Spot) => void;\n selectedSpot: Spot | null;\n onCreateOrderRequested: (b: Basket, s: Spot) => void;\n submissionState: OrderSubmissionState;\n}\n\nconst ShoppingProcess: React.FC = ({\n products,\n productAdded,\n basket,\n pointsBalance,\n spots,\n spotSelected,\n selectedSpot,\n onCreateOrderRequested,\n submissionState\n}) => {\n const [activeStep, setActiveStep] = React.useState(0);\n const theme = useTheme();\n const matches = useMediaQuery(theme.breakpoints.up('sm'));\n return (\n <>\n \n \n Produkty\n \n \n Odbiór\n \n \n Podsumowanie\n \n \n Zakończenie\n \n \n
    \n {constructStepContent(\n activeStep,\n products,\n productAdded,\n basket,\n pointsBalance,\n spots,\n spotSelected,\n selectedSpot,\n submissionState\n )}\n \n \n {activeStep !== 0 && activeStep !== 3 ? (\n \n ) : (\n <>\n )}\n \n \n {basket.products && basket.products.length > 0 && activeStep < 2 ? (\n setActiveStep(activeStep + 1)}\n >\n Dalej\n \n ) : (\n <>\n )}\n {activeStep == 2 && selectedSpot ? (\n {\n onCreateOrderRequested(basket, selectedSpot);\n setActiveStep(activeStep + 1);\n }}\n >\n Zakończ\n \n ) : (\n <>\n )}\n \n \n
    \n \n );\n};\n\nexport default ShoppingProcess;\n","import React from \"react\";\nimport { Basket, ProductItem } from \"../../store/shop/models\";\nimport {\n makeStyles,\n Card,\n CardContent,\n Avatar,\n Typography,\n Divider,\n List,\n ListItem,\n ListItemText,\n ListItemSecondaryAction,\n IconButton,\n} from \"@material-ui/core\";\nimport ShoppingBasketIcon from \"@material-ui/icons/ShoppingBasket\";\nimport DeleteIcon from \"@material-ui/icons/Delete\";\nimport { basketSum } from \"../../store/shop/utils\";\n\ninterface BasketInfoProps {\n basket: Basket;\n productRemoved: (p: ProductItem) => void;\n}\n\nconst useStyles = makeStyles(({ palette }) => ({\n avatar: {\n margin: \"auto\",\n },\n subheader: {\n fontSize: 14,\n color: palette.grey[500],\n marginBottom: \"0.875em\",\n textAlign: \"center\",\n display: \"block\"\n },\n divider: {\n margin: \"8px 0\",\n },\n}));\n\nconst BasketInfo: React.FC = ({ basket, productRemoved }) => {\n const styles = useStyles();\n\n if (!basket.products || basket.products.length === 0) return <>;\n\n return (\n \n \n <>\n \n \n \n \n Twój koszyk\n \n \n Wartość koszyka: {basketSum(basket)}\n \n \n \n {basket.products.map((p) => (\n \n \n \n productRemoved(p)}>\n \n \n \n \n ))}\n \n \n \n \n );\n};\n\nexport default BasketInfo;\n","import React from \"react\";\nimport Alert from \"@material-ui/lab/Alert\";\nimport { Grid, CircularProgress, Divider } from \"@material-ui/core\";\nimport { Player } from \"../../store/players/models\";\nimport { AppState } from \"../../store/reducer\";\nimport { currentPlayer } from \"../../store/players/selectors\";\nimport { Dispatch } from \"redux\";\nimport { connect } from \"react-redux\";\nimport { Data, NOT_STARTED } from \"../../framework/data\";\nimport ShoppingInfo from \"./ShoppingInfo\";\nimport {\n Product,\n ProductItem,\n Basket,\n Spot,\n OrderSubmissionState,\n} from \"../../store/shop/models\";\nimport {\n loadProducts,\n addProductToBasket,\n removeProductFromBasket,\n loadSpots,\n setSpot,\n createShoppingOrder,\n} from \"../../store/shop/actionts\";\nimport ShoppingProcess from \"./ShoppingProcess\";\nimport BasketInfo from \"./BasketInfo\";\nimport { useAuth0 } from \"@auth0/auth0-react\";\n\ninterface ShopPageProps {\n currentPlayer: Data;\n loadProducts: () => void;\n products: Data;\n productAdded: (p: ProductItem) => void;\n basket: Basket;\n productRemoved: (p: ProductItem) => void;\n spots: Data;\n loadSpots: () => void;\n spotSelected: (s: Spot) => void;\n selectedSpot: Spot | null;\n onCreateOrderRequested: (b: Basket, s: Spot, token: string) => void;\n submissionState: OrderSubmissionState;\n}\n\nconst ShopPage: React.FC = ({\n currentPlayer,\n products,\n loadProducts,\n productAdded,\n basket,\n productRemoved,\n spots,\n loadSpots,\n spotSelected,\n selectedSpot,\n onCreateOrderRequested,\n submissionState,\n}) => {\n React.useEffect(() => {\n loadProducts();\n }, []);\n\n React.useEffect(() => {\n loadSpots();\n }, []);\n\n const { getAccessTokenSilently } = useAuth0();\n\n return (\n <>\n \n \n \n Witaj w miejscu, w którym możesz wymienić swoje ciężko zarobione\n SmartPunkty na konkretne nagrody!\n\n \n \n \n \n
    \n productRemoved(p)}\n >\n
    \n \n {products.type === \"LOADED\" && spots.type === \"LOADED\" ? (\n productAdded(p)}\n basket={basket}\n pointsBalance={\n currentPlayer.type === \"LOADED\"\n ? currentPlayer.value.rewardPoints || 0\n : 0\n }\n spots={spots.value}\n spotSelected={spotSelected}\n selectedSpot={selectedSpot}\n onCreateOrderRequested={async (b: Basket, s: Spot) => {\n const token = await getAccessTokenSilently();\n onCreateOrderRequested(b, s, token);\n }}\n submissionState={submissionState}\n />\n ) : (\n \n \n \n )}\n \n
    \n \n );\n};\n\nconst mapStateToProps = (state: AppState) => ({\n currentPlayer: currentPlayer(state),\n products: state.shop.products,\n basket: state.shop.basket,\n spots: state.shop.spots,\n selectedSpot: state.shop.selectedSpot,\n submissionState: state.shop.submissionState,\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) => ({\n loadProducts: () => dispatch(loadProducts()),\n productAdded: (p: ProductItem) => dispatch(addProductToBasket(p)),\n productRemoved: (p: ProductItem) => dispatch(removeProductFromBasket(p.id)),\n loadSpots: () => dispatch(loadSpots()),\n spotSelected: (s: Spot) => dispatch(setSpot(s)),\n onCreateOrderRequested: (basket: Basket, selectedSpot: Spot, token: string) =>\n dispatch(createShoppingOrder({ basket, selectedSpot, token })),\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ShopPage);\n","import React from \"react\";\nimport { Spot, Order, OrderStatus } from \"../../store/shop/models\";\nimport { List, Grid, Paper, Avatar, Typography, Tooltip } from \"@material-ui/core\";\n\nimport LoopIcon from '@material-ui/icons/Loop';\nimport AssignmentTurnedInIcon from '@material-ui/icons/AssignmentTurnedIn';\nimport CheckIcon from '@material-ui/icons/Check';\nimport ClearIcon from '@material-ui/icons/Clear';\nimport DateTimeView from \"../../framework/components/DateTimeView\";\n\ninterface ShoppingOrdersListProps {\n spots: Spot[];\n orders: Order[];\n}\n\nconst OrderStatusIcon: React.FC<{status: OrderStatus}> = ({status}) => (\n \n <>\n {\n (status === OrderStatus.PENDING) ? () :\n (status === OrderStatus.READY) ? () :\n (status === OrderStatus.FINISHED) ? () :\n (status === OrderStatus.CANCELLED) ? () : (<>)\n }\n \n)\n\nconst ShoppingOrdersList: React.FC = ({\n spots,\n orders,\n}) => (\n \n {orders.sort((x: Order, y: Order) => y.orderDate.valueOf() - x.orderDate.valueOf()).map((o: Order) => (\n \n \n \n \n \n \n \n Produkty\n
      \n {\n o.orderDetails.map(x => (\n
    • {x.name} x{x.quantity}
    • \n ))\n }\n
    \n
    \n \n Odbiór\n { o.spotName }: \n { spots.find(s => s.id === o.spotId)?.name }, {spots.find(s => s.id === o.spotId)?.address}, {spots.find(s => s.id === o.spotId)?.city }\n Data zamówienia\n \n \n \n {o.finalPrice} Smart Punktów\n \n
    \n
    \n
    \n ))}\n
    \n);\n\nexport default ShoppingOrdersList;\n\n","import React from \"react\";\nimport { AppState } from \"../../store/reducer\";\nimport { Dispatch } from \"redux\";\nimport { connect } from \"react-redux\";\nimport { loadSpots, loadMyOrders } from \"../../store/shop/actionts\";\nimport { Data } from \"../../framework/data\";\nimport { Player } from \"../../store/players/models\";\nimport { Spot, Order } from \"../../store/shop/models\";\nimport Alert from \"@material-ui/lab/Alert\";\nimport { CircularProgress } from \"@material-ui/core\";\nimport ShoppingOrdersList from \"./ShoppingOrdersList\";\nimport { useAuth0 } from \"@auth0/auth0-react\";\n\ninterface ShoppingOrdersPageProps {\n player: Data;\n spots: Data;\n orders: Data;\n loadSpots: () => void;\n loadMyOrders: (token: string) => void;\n}\n\nconst ShoppingOrdersPage: React.FC = ({\n player,\n spots,\n orders,\n loadSpots,\n loadMyOrders\n}) => {\n\n const { getAccessTokenSilently } = useAuth0();\n\n React.useEffect(() => {\n loadSpots();\n }, []);\n\n React.useEffect(() => {\n getAccessTokenSilently().then((t: string) => loadMyOrders(t));\n }, [player])\n\n if (\n player.type === \"NOT_STARTED\" ||\n player.type === \"FAILED\" ||\n (player.type === \"LOADED\" && !player.value)\n ) {\n return (\n \n Musisz się zalogować aby oglądać swoje zamówienia!\n \n );\n }\n\n return (\n <>\n {player.type === \"LOADED\" &&\n !!player.value &&\n spots.type === \"LOADED\" &&\n orders.type === \"LOADED\" ? (\n \n ) : (\n \n \n \n )}\n \n );\n};\n\nconst mapStateToProps = (state: AppState) => ({\n player: state.player.me,\n spots: state.shop.spots,\n orders: state.shop.orders,\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) => ({\n loadSpots: () => dispatch(loadSpots()),\n loadMyOrders: (token: string) => dispatch(loadMyOrders(token)),\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ShoppingOrdersPage);\n","import { Table, TableBody, TableCell, TableContainer, TableHead, TableRow, Tooltip, IconButton, Popover, Link } from \"@material-ui/core\";\nimport React from \"react\";\nimport DateTimeView from \"../../framework/components/DateTimeView\";\nimport { MatchHeader } from \"../../store/matches/models\";\nimport { Player } from \"../../store/players/models\";\nimport EqualizerIcon from '@material-ui/icons/Equalizer';\nimport PermContactCalendarIcon from \"@material-ui/icons/PermContactCalendar\";\nimport LeaguePlayerView from \"../leagues/LeaguePlayerView\";\nimport CommentIcon from '@material-ui/icons/Comment';\nimport { Club } from \"../../store/clubs/models\";\nimport { LeagueWithPaymentStatus } from \"../../store/leagues/models\";\nimport { dataOf } from \"../../framework/data\";\n\ninterface PlayersMatchesProps {\n\n matches: MatchHeader[];\n currentPlayer: Player;\n actions: (m: MatchHeader) => JSX.Element;\n clubs: Club[];\n leagues: LeagueWithPaymentStatus[]\n}\n\nconst PlayersMatches: React.FC = ({ matches, actions, currentPlayer, clubs, leagues }) => {\n\n const [playerInView, setPlayerInView] = React.useState<{\n el: HTMLElement;\n playerId: string;\n leagueId: string;\n } | null>(null);\n\n const getPlayerDetails = (playerId: string, target: HTMLElement, leagueId: string) => {\n if (\n !currentPlayer\n ) {\n return;\n }\n\n setPlayerInView({ el: target, playerId, leagueId });\n };\n\n\n return (<>\n setPlayerInView(null)}\n anchorOrigin={{\n vertical: \"top\",\n horizontal: \"left\",\n }}\n transformOrigin={{\n vertical: \"top\",\n horizontal: \"right\",\n }}\n >\n {!!playerInView ? (\n l.id === playerInView?.leagueId)?.year || \"\"}\n >\n ) : (\n <>\n )}\n \n \n \n \n \n Data\n Klub\n Przeciwnik\n Info\n {!!actions ? Akcje : <>}\n \n \n \n {\n matches.map(match => (\n \n \n \n \n \n {match.club?.name}\n \n \n \n {\n match.firstPlayer.id === currentPlayer.id!\n ? {match.secondPlayer.name} {match.secondPlayer.surname}\n : {match.firstPlayer.name} {match.firstPlayer.surname}\n }\n \n \n \n {\n !!match.description ? (<>\n \n \n \n \n \n ) : (<>)\n }\n \n {!!actions ? (\n \n {actions(match)}\n \n \n getPlayerDetails((match.firstPlayer.id === currentPlayer.id!) ? match.secondPlayer.id : match.firstPlayer.id, evt.currentTarget, match.league)\n }\n >\n \n \n \n \n \n \n \n \n \n ) : (\n <>\n )}\n \n ))\n }\n \n
    \n
    \n );\n}\n\nexport default PlayersMatches;","import { createSelector, Selector } from \"reselect\";\nimport { AppState } from \"../reducer\";\nimport { dataOf, combineNotLoaded, Data } from \"../../framework/data\";\nimport { PlayerMatch } from \"../matches/models\";\nimport { PlayerDescriptor } from \"../leagues/models\";\nimport { groupBy, indexBy } from \"ramda\";\nimport { PlayersMatchesInLeague, Stat } from \"./model\";\n\nexport const moduleState = (s: AppState) => s.stats;\n\nexport const playerMatches = createSelector(moduleState, (s) => s.matches);\nexport const playerStats = createSelector(moduleState, (s) => s.stats);\n\nexport const matchesWon = createSelector(playerStats, (s) => {\n if (s.type === \"LOADED\") {\n console.log(s);\n return dataOf(s.value.reduce((acc, val) => acc + val.score.matchesWon, 0));\n } else {\n return s;\n }\n});\n\nexport const allMatches = createSelector(playerStats, (s) => {\n if (s.type === \"LOADED\") {\n return dataOf(s.value.reduce((acc, val) => acc + val.score.matchesPlayed, 0));\n } else {\n return s;\n }\n});\n\n/// To do frameworka\nconst createDataSelector = (x: Selector>, y: Selector>, c: (xval: X, yval: Y) => Z) => createSelector(x, y, (a, b) => {\n if (a.type === \"LOADED\" && b.type === \"LOADED\") {\n return dataOf(c(a.value, b.value));\n } else {\n return combineNotLoaded(a, b);\n }\n});\n\n/// To do frameworka\nconst createSingleDataSelector = (s: Selector>, c: ((xval: X) => Y)) => createSelector(s, x => {\n if (x.type === \"LOADED\") {\n return dataOf(c(x.value));\n } else {\n return x;\n }\n});\n\nexport const winPercentage = createDataSelector(matchesWon, allMatches, (won, all) => (won / all * 100).toFixed(2));\nexport const statsPerSeasonOrdered = createSingleDataSelector(playerStats, (s) => s.sort((x, y) => y.leagueStartDate.valueOf() - x.leagueStartDate.valueOf()));\nexport const recentMatches = (x: number) => createSingleDataSelector(playerMatches, (ms) => ms.sort((x, y) => y.date.valueOf() - x.date.valueOf()).slice(0, 3));\nexport const matchesGrouped = createDataSelector(playerMatches, playerStats, (matches, stats) => {\n\n const matchesInKnownLeagues = matches.filter(m => stats.find(s => s.leagueId === m.league));\n const matchesGrouped = groupBy(m => m.league, matchesInKnownLeagues);\n const leagues = indexBy(s => s.leagueId, stats);\n const x = Object.keys(matchesGrouped).map(leagueId => ({ leagueId, leagueName: leagues[leagueId].leagueName, matches: matchesGrouped[leagueId] }));\n const y = indexBy(s => s.leagueId, x);\n\n return y;\n});\n\nexport const mostFrequentClubs = createSingleDataSelector(playerMatches, (ms) => \n Object.entries(\n ms\n .filter((x) => x.club.name !== \"Inny klub\")\n .reduce((acc: { [s: string]: number }, val) =>\n !!acc[val.club.name] ?\n ({ ...acc, [val.club.name]: acc[val.club.name] + 1 }) :\n ({ ...acc, [val.club.name]: 1 })\n , {}))\n .sort(([_, c1], [__, c2]) => c2 - c1)\n .map(([n1, c1]) => ({ name: n1, count: c1}) )\n .slice(0, 3)\n)\n\nconst playerFromMatch = (m: PlayerMatch): PlayerDescriptor|undefined => {\n const playerId = m.playerId;\n\n if(m.firstPlayer.id === playerId) {\n return m.firstPlayer;\n } else if(m.secondPlayer.id === playerId) {\n return m.secondPlayer;\n } else {\n return undefined;\n }\n}\n\nexport const playerDataFromMatches = createSingleDataSelector(playerMatches, (matches) => matches.length === 0 ? undefined : playerFromMatch(matches[0]));\n","import React from \"react\";\nimport { PlayerDescriptor } from \"../../store/leagues/models\";\nimport { Grid, Typography, Divider } from \"@material-ui/core\";\n\ninterface GeneralStatsProps {\n player: PlayerDescriptor;\n matchesWon: number;\n matchesPlayed: number;\n winPercentage: string;\n}\n\nconst GeneralStats: React.FC = ({ player, matchesWon, matchesPlayed, winPercentage }) => (\n \n \n \n {player.name} {player.surname}\n \n \n \n \n Mecze wygrane\n {matchesWon}\n \n \n Mecze rozegrane\n {matchesPlayed}\n \n \n % wygranych\n {winPercentage}%\n \n \n);\n\nexport default GeneralStats;","import React from \"react\";\nimport { Grid, CircularProgress, CircularProgressProps, Box, Typography } from \"@material-ui/core\";\n\ninterface ClubStatsProps {\n clubsPlayed: { name: string, count: number }[],\n matchesPlayed: number;\n}\n\nfunction CircularProgressWithLabel(props: CircularProgressProps & { value: number }) {\n return (\n \n \n \n {`${Math.round(\n props.value,\n )}%`}\n \n \n );\n}\n\nconst ClubStats: React.FC = ({ clubsPlayed, matchesPlayed }) => (\n <>\n 3 najczęściej odwiedzane kluby\n \n {clubsPlayed.map((c, i) => (\n \n \n \n \n \n \n {c.name}\n \n \n \n ))}\n \n \n);\n\nexport default ClubStats;","import React from \"react\";\nimport { Dialog, DialogTitle, TextField, Grid, Typography, FormControlLabel, Checkbox, DialogActions, Button, CircularProgress } from \"@material-ui/core\";\nimport { Club } from \"../../store/clubs/models\";\nimport { Player } from \"../../store/players/models\";\nimport { sortBy } from \"ramda\";\nimport { Autocomplete } from \"@material-ui/lab\";\nimport { KeyboardDatePicker, KeyboardDateTimePicker, KeyboardTimePicker } from \"@material-ui/pickers\";\nimport { State } from \"../../store/match-offers/models\";\nimport { startOfDay, addHours, startOfHour } from \"date-fns\";\n\ninterface CreateMatchOfferDialogProps {\n open: boolean;\n player: Player;\n clubs: Club[];\n leagueId: string;\n leagueYear: string;\n errors?: { [k: string]: string[] };\n state: State\n\n onClosed: () => void;\n onSubmit: (preferredClubs: string[], fromDate: Date, fromTime: string, toDate: Date, toTime: string, description: string) => void;\n}\n\nenum TimeSpanType {\n Single, Span\n}\n\nconst CreateMatchOfferDialog: React.FC = ({ open, player, clubs, leagueId, leagueYear, errors, onClosed, onSubmit, state }) => {\n\n const getOptionsLabel = (option: any) => {\n if (!option) {\n return \"\";\n }\n\n if (!!option.name) {\n return option.name;\n }\n\n if (typeof option === \"string\") {\n return clubs?.find((x) => x.id === option)?.name || \"\";\n }\n\n return \"\";\n };\n\n const handlePreferredClubsChange = (max: number) => (_: any, value: any[]) => {\n if (value.length <= max) {\n setPreferredClubs(\n value.map((x) => {\n if (typeof x === \"string\") {\n return clubs?.find((y) => y.id === x)?.id;\n }\n return x.id;\n }));\n }\n };\n\n const [preferredClubs, setPreferredClubs] = React.useState(player.preferredClubs?.length || 0 > 0 ? [player.preferredClubs![0]] : [] as string[]);\n const [preferredClubsValid, setPreferredClubsValid] = React.useState(true);\n const [preferredClubsError, setPreferredClubsError] = React.useState();\n\n const [fromDate, setFromDate] = React.useState(startOfHour(addHours(new Date(), 1)));\n const [fromDateValid, setFromDateValid] = React.useState(true);\n const [fromDateError, setFromDateError] = React.useState();\n\n const [toDate, setToDate] = React.useState(new Date());\n const [toDateValid, setToDateValid] = React.useState(true);\n const [toDateError, setToDateError] = React.useState();\n\n const [fromTime, setFromTime] = React.useState(new Date());\n const [fromTimeValid, setFromTimeValid] = React.useState(true);\n const [fromTimeError, setFromTimeError] = React.useState();\n\n const [toTime, setToTime] = React.useState(new Date());\n const [toTimeValid, setToTimeValid] = React.useState(true);\n const [toTimeError, setToTimeError] = React.useState();\n\n const [description, setDescription] = React.useState(\"\");\n const [descriptionValid, setDescriptionValid] = React.useState(true);\n const [descriptionError, setDescriptionError] = React.useState();\n\n const [clubPickerReadonly, setClubPickerReadonly] = React.useState(false);\n\n const [timeSpanType, setTimeSpanType] = React.useState(TimeSpanType.Single);\n\n React.useEffect(() => {\n\n if (errors) {\n if (errors[\"ClubIds\"]) {\n setPreferredClubsValid(false);\n setPreferredClubsError(errors[\"ClubIds\"][0]);\n }\n\n if (errors[\"StartDate\"]) {\n setFromDateValid(false);\n setFromDateError(errors[\"StartDate\"][0]);\n }\n\n if (errors[\"EndDate\"]) {\n setToDateValid(false);\n setToDateError(errors[\"EndDate\"][0]);\n }\n\n if (errors[\"StartTime\"]) {\n setFromTimeValid(false);\n setFromTimeError(errors[\"StartTime\"][0]);\n }\n\n if (errors[\"EndTime\"]) {\n setToTimeValid(false);\n setToTimeError(errors[\"EndTime\"][0]);\n }\n\n if (errors[\"Description\"]) {\n setDescriptionValid(false);\n setDescriptionError(errors[\"Description\"][0]);\n }\n }\n\n }, [errors]);\n\n return (
    \n \n Dodaj propozycję meczu\n
    \n \n \n \n \n <>\n {\n timeSpanType === TimeSpanType.Span ? (\n <>\n \n \n mogę grać w dniach:\n \n \n \n { setFromDate(x); setFromDateValid(true); setFromDateError(undefined); }}>\n \n \n \n { setToDate(x); setToDateValid(true); setToDateError(undefined); }}>\n\n \n \n \n \n w godzinach:\n \n \n \n { setFromTime(x); setFromTimeValid(true); setFromTimeError(undefined); }}\n />\n \n \n { setToTime(x); setToTimeValid(true); setToTimeError(undefined); }}\n />\n \n\n \n \n na kortach:\n \n \n \n x.address?.city || \"Kraków\", clubs || [])}\n getOptionLabel={getOptionsLabel}\n getOptionSelected={(o: Club, v: string) => o.id === v}\n groupBy={(o: Club) => o.address?.city || \"Kraków\"}\n filterSelectedOptions\n onChange={handlePreferredClubsChange(3)}\n disabled={clubPickerReadonly}\n style={{ width: \"100%\" }}\n renderInput={(params) => (\n \n )}\n >\n \n \n {\n setClubPickerReadonly(checked);\n setPreferredClubs([]);\n setPreferredClubsError(undefined);\n setPreferredClubsValid(true);\n }}\n color=\"primary\"\n />\n }\n label=\"Obojętnie jakich kortach\"\n />\n \n \n ) : (\n <>\n \n \n mogę grać:\n \n \n \n {\n setFromDate(x); setFromDateValid(true); setFromDateError(undefined);\n }}\n />\n \n \n \n na korcie:\n \n \n \n x.address?.city || \"Kraków\", clubs || [])}\n getOptionLabel={getOptionsLabel}\n getOptionSelected={(o: Club, v: string) => o.id === v}\n groupBy={(o: Club) => o.address?.city || \"Kraków\"}\n filterSelectedOptions\n onChange={handlePreferredClubsChange(1)}\n disabled={clubPickerReadonly}\n style={{ width: \"100%\" }}\n renderInput={(params) => (\n \n )}\n >\n \n \n )\n }\n \n\n\n \n { setDescription(e.target.value); setDescriptionError(undefined); setDescriptionValid(true); }}\n multiline\n variant=\"outlined\"\n helperText={`${description?.length || 0} / 4096`}\n style={{ width: \"100%\" }}>\n \n \n \n\n
    \n \n {state === State.SUBMITTING ? (\n <>\n
    \n \n
    \n \n ) : (\n <>\n \n {\n\n let isOk = true;\n\n if (!clubPickerReadonly && preferredClubs.length === 0) {\n setPreferredClubsValid(false);\n setPreferredClubsError(\"Proszę wybrać klub\");\n isOk = false;\n } else {\n setPreferredClubsValid(true);\n setPreferredClubsError(undefined);\n }\n\n if (!fromDate) {\n setFromDateValid(false);\n setFromDateError(\"Pole wymagane\");\n isOk = false;\n } else if (fromDate < startOfDay(new Date())) {\n setFromDateValid(false);\n setFromDateError(\"Data nie może być w przeszłości\");\n isOk = false;\n } else {\n setFromDateValid(true);\n setFromDateError(undefined);\n }\n\n if (timeSpanType === TimeSpanType.Span) {\n if (!toDate) {\n setToDateValid(false);\n setToDateError(\"Pole wymagane\");\n isOk = false;\n } else if (toDate.valueOf() < (fromDate || startOfDay(new Date())).valueOf()) {\n setToDateValid(false);\n setToDateError(\"Data nie może być wcześniejsza niż data pola 'Od dnia'\");\n isOk = false;\n } else {\n setToDateValid(true);\n setToDateError(undefined);\n }\n\n if (!fromTime) {\n setFromTimeValid(false);\n setFromTimeError(\"Pole wymagane\");\n isOk = false;\n } else {\n setFromTimeValid(true);\n setFromTimeError(undefined);\n }\n\n if (!toTime) {\n setToTimeValid(false);\n setToTimeError(\"Pole wymagane\");\n isOk = false;\n } else if (toTime.valueOf() < (fromTime || startOfDay(new Date())).valueOf()) {\n setToTimeValid(false);\n setToTimeError(\"Godzina nie może być wcześniejsza niż data pola 'Od godziny'\");\n isOk = false;\n } else {\n setToTimeValid(true);\n setToTimeError(undefined);\n }\n }\n\n\n if (description.length > 4096) {\n setDescriptionValid(false);\n setDescriptionError(\"Dodatkowe informacje nie mogą być dłuższe niż 4096 znaków.\")\n isOk = false;\n } else {\n setDescriptionValid(true);\n setDescriptionError(undefined);\n }\n\n if (isOk) {\n\n if(timeSpanType === TimeSpanType.Span) {\n onSubmit(\n preferredClubs,\n fromDate!,\n fromTime!.toLocaleTimeString('pl-PL'),\n toDate!,\n toTime!.toLocaleTimeString('pl-PL'),\n description);\n } else {\n onSubmit(\n preferredClubs,\n fromDate!,\n fromDate!.toLocaleTimeString('pl-PL'),\n fromDate!,\n fromDate!.toLocaleTimeString('pl-PL'),\n description);\n }\n\n \n }\n\n }}\n variant=\"contained\"\n color=\"primary\">\n Zapisz\n \n \n )}\n
    \n
    \n
    );\n\n};\n\nexport default CreateMatchOfferDialog;","import React from \"react\";\nimport { Stat } from \"../../store/stats/model\";\nimport { TableContainer, Table, TableHead, TableRow, TableCell, TableBody, Typography, IconButton, Link, makeStyles, Collapse, Box } from \"@material-ui/core\";\nimport FormatListBulletedIcon from '@material-ui/icons/FormatListBulleted';\nimport TableChartIcon from '@material-ui/icons/TableChart';\nimport KeyboardArrowUpIcon from '@material-ui/icons/KeyboardArrowUp';\nimport KeyboardArrowDownIcon from '@material-ui/icons/KeyboardArrowDown';\nimport * as R from \"ramda\";\n\ninterface PerSeasonStatsProps {\n stats: Stat[];\n leagueSelected: (leagueId: string) => void;\n}\n\n//https://v4.mui.com/components/tables/#collapsible-table\n\ninterface SeasonStatsProps {\n season: string;\n stats: Stat[];\n leagueSelected: (leagueId: string) => void;\n}\n\nconst useRowStyles = makeStyles({\n root: {\n '& > *': {\n borderBottom: 'unset',\n },\n },\n });\n\nconst SeasonStats: React.FC = ({season, stats, leagueSelected}) => {\n const [open, setOpen] = React.useState(false);\n const classes = useRowStyles();\n\n return (\n <>\n \n \n setOpen(!open)}>\n {open ? : }\n \n \n \n {season}\n \n {R.sum(stats.map(x => x.score.points))}\n {R.sum(stats.map(x => x.score.matchesPlayed))}\n {R.sum(stats.map(x => x.score.matchesWon))}\n {R.sum(stats.map(x => x.score.setsWon))} : {R.sum(stats.map(x => x.score.setsPlayed)) - R.sum(stats.map(x => x.score.setsWon))}\n {R.sum(stats.map(x => x.score.gemsWon))} : {R.sum(stats.map(x => x.score.gemsLost))}\n \n \n \n \n \n \n \n \n {\"\"}\n Liga\n Poz. w rankingu\n Punkty\n Mecze\n M. wygrane\n Sety\n Gemy\n \n \n \n {\n stats.map(s => (\n \n \n leagueSelected(s.leagueId)}>\n \n \n \n \n \n \n \n { e.preventDefault(); leagueSelected(s.leagueId);}} style={{fontWeight: \"bold\"}}>\n {s.leagueName}\n \n \n {s.rank}.\n {s.score.points}\n {s.score.matchesPlayed}\n {s.score.matchesWon}\n {s.score.setsWon} : {(s.score.setsPlayed - s.score.setsWon)}\n {s.score.gemsWon} : {(s.score.gemsLost)}\n \n ))\n }\n \n
    \n
    \n
    \n
    \n
    \n \n )\n}\n\n\nconst PerSeasonStats: React.FC = ({ stats, leagueSelected }) => {\n \n const statsGrouped = R.reverse(R.sortBy(([year, _]) => year, Object.entries(R.groupBy((a) => a.year.replace(\"-finals\", \"\"), stats))));\n\n return (<>\n Sezon po sezonie...\n \n \n \n \n {\"\"}\n Sezon\n Punkty\n Mecze\n M. wygrane\n Sety\n Gemy\n \n \n \n {\n statsGrouped.map(([season, stats]) => ())\n }\n \n
    \n
    \n )\n};\n\nexport default PerSeasonStats;","import React from \"react\";\nimport { Avatar, Badge, Grid, Typography } from \"@material-ui/core\";\nimport NewestMatches from \"../matches/NewestMatches\";\nimport { PlayersMatchesInLeague } from \"../../store/stats/model\";\n\ninterface RecentPlayersMatchesProps {\n matches: PlayersMatchesInLeague;\n}\n\nconst RecentPlayersMatches: React.FC = ({ matches: playersMatchesInLeague }) => {\n if(!!playersMatchesInLeague && playersMatchesInLeague.matches.length > 0) {\n return (<>\n \n \n Mecze w {playersMatchesInLeague.leagueName}\n \n \n \n {playersMatchesInLeague.matches.length}\n \n \n \n \n \n \n );\n } else {\n return (<>\n \n \n Brak meczów\n \n \n \n 0\n \n \n \n )\n }\n \n}\n\nexport default RecentPlayersMatches;","import React from \"react\";\nimport { Data } from \"../../framework/data\";\nimport { PlayersMatchesInLeague, Stat } from \"../../store/stats/model\";\nimport { PlayerMatch } from \"../../store/matches/models\";\nimport { PlayerDescriptor } from \"../../store/leagues/models\";\nimport { connect } from \"react-redux\";\nimport { AppState } from \"../../store/reducer\";\nimport { playerDataFromMatches, matchesWon, allMatches, winPercentage, statsPerSeasonOrdered, recentMatches, mostFrequentClubs, matchesGrouped } from \"../../store/stats/selectors\";\nimport { Alert, AlertTitle } from \"@material-ui/lab\";\nimport { Grid, CircularProgress } from \"@material-ui/core\";\nimport GeneralStats from \"./GeneralStats\";\nimport { Dispatch } from \"redux\";\nimport { loadPlayerStats, loadPlayerMatches } from \"../../store/stats/actions\";\nimport ClubStats from \"./ClubStats\";\nimport PerSeasonStats from \"./PerSeasonStats\";\nimport RecentPlayersMatches from \"./RecentPlayersMatches\";\nimport FormatListBulletedIcon from '@material-ui/icons/FormatListBulleted';\n\ninterface StatsContainerProps {\n\n playerId: string;\n\n player: Data;\n matchesWon: Data;\n matchesPlayed: Data;\n winPercentage: Data;\n\n statsPerSeason: Data;\n\n matchesGrouped: Data<{ [key: string]: PlayersMatchesInLeague }>;\n\n clubsPlayed: Data<{ name: string, count: number }[]>;\n\n loadPlayerStats: (playerId: string) => void;\n loadPlayerMatches: (playerId: string) => void;\n}\n\nconst StatsContainer: React.FC = ({\n playerId,\n player,\n matchesWon,\n matchesPlayed,\n winPercentage,\n statsPerSeason,\n clubsPlayed,\n matchesGrouped,\n loadPlayerStats,\n loadPlayerMatches }) => {\n\n React.useEffect(() => {\n\n loadPlayerStats(playerId);\n loadPlayerMatches(playerId);\n\n }, [playerId]);\n\n const [selectedLeague, setSelectedLeague] = React.useState(\"\")\n\n return (\n
    \n {player.type === \"LOADED\" ? (\n\n !!player.value ? (\n\n \n \n {\n matchesWon.type === \"LOADED\" && matchesPlayed.type === \"LOADED\" && winPercentage.type === \"LOADED\" ?\n (\n ) : (\n \n \n
    \n )\n\n\n }\n \n \n {\n clubsPlayed.type === \"LOADED\" && matchesPlayed.type === \"LOADED\" ?\n (\n \n ) : (\n \n \n \n )\n }\n \n\n \n {\n statsPerSeason.type === \"LOADED\"\n ? ( setSelectedLeague(l)}>)\n : (\n \n \n \n )\n }\n \n \n {\n matchesGrouped.type === \"LOADED\"\n ? (!!selectedLeague ? (\n \n ) : (\n \n Zobacze mecze w lidze!\n
    \n Aby zobaczyć wszystkie mecze zawodnika w danej lidze, kliknij na nazwę ligi lub ikonę powyżej\n
    \n
    \n ))\n : (\n \n \n \n )\n }\n
    \n \n ) : (\n \n Zawodnik nie ma żadnych obliczonych statystyk\n \n )\n ) : (\n \n \n \n )}\n \n );\n};\n\nconst mapStateToProps = (state: AppState) => ({\n player: playerDataFromMatches(state),\n matchesWon: matchesWon(state),\n matchesPlayed: allMatches(state),\n winPercentage: winPercentage(state),\n\n statsPerSeason: statsPerSeasonOrdered(state),\n recentMatches: recentMatches(10)(state),\n\n clubsPlayed: mostFrequentClubs(state),\n matchesGrouped: matchesGrouped(state)\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) => ({\n loadPlayerStats: (player: string) => dispatch(loadPlayerStats(player)),\n loadPlayerMatches: (player: string) => dispatch(loadPlayerMatches(player))\n})\n\nexport default connect(mapStateToProps, mapDispatchToProps)(StatsContainer);","import React from \"react\";\nimport {\n Dialog,\n DialogContent,\n Typography,\n DialogActions,\n MobileStepper,\n Button,\n makeStyles,\n DialogTitle,\n Grid,\n IconButton,\n} from \"@material-ui/core\";\n\nimport KeyboardArrowLeft from \"@material-ui/icons/KeyboardArrowLeft\";\nimport KeyboardArrowRight from \"@material-ui/icons/KeyboardArrowRight\";\nimport CloseIcon from \"@material-ui/icons/Close\";\n\nconst items = [\n {\n image: \"step1.png\",\n content: (\n <>\n \n Załóż swój profil\n \n \n Aby zapisać się do ligii i uczestniczyć w jej rozgrywkach potrzebujesz\n stworzyć utworzyć użytkownika i stworzyć jego profil.\n \n \n Zaloguj / zarejestruj się, a potem wybierz z menu 'Profil zawodnika'.\n Nie musisz robić tego od razu - bez pośpiechu, ale stworzenie profilu\n od razu pozwoli Ci na szybsze dołączenie do ligii.\n \n \n ),\n },\n {\n image: \"step2.png\",\n content: (\n <>\n \n Zapisz się do ligii\n \n \n Wspieramy ligi dla zawodników na różnych poziomach zaawansowania\n \n \n Zapisywanie się do ligi jest naprawdę proste - kliknij 'Zapisz się', a\n my poprowadzimy Cię przez (krótki) proces dołączania do ligi.\n \n \n ),\n },\n {\n image: \"step3.png\",\n content: (\n <>\n \n Umawiaj mecze i rejestruj wyniki\n \n \n Umawianie meczy i rejestrowanie wyników jeszcze nigdy nie było takie\n łatwe...\n \n \n ...ale jeśli potrzebujesz - zawsze możesz napisać do nas na:{\" \"}\n support@smarttennis.pl -\n na pewno pomożemy!\n \n \n ),\n },\n {\n image: \"step4.png\",\n content: (\n <>\n \n Wygrywaj...\n \n \n ...i dobrze się baw...\n \n \n W końcu przecież chodzi tu o przyjacielską rywalizację i doskonalenie\n swoich umiejętności :)\n \n \n ),\n },\n];\n\nconst useStyles = makeStyles({\n root: {\n flexGrow: 1,\n },\n});\n\nconst OnboardingDialog: React.FC = () => {\n const classes = useStyles();\n\n const [openOnboarding, setOpenOnboarding] = React.useState(false);\n\n React.useEffect(() => {\n const onboardingDone = new Boolean(\n localStorage.getItem(\"__onboarding_done__\")\n );\n\n setOpenOnboarding(!onboardingDone.valueOf());\n });\n\n const [activeStep, setActiveStep] = React.useState(0);\n\n return (\n \n \n \n \n {\n localStorage.setItem(\"__onboarding_done__\", \"true\");\n setOpenOnboarding(false);\n }}\n >\n \n \n \n \n \n \n {items[activeStep].content}\n \n {\n localStorage.setItem(\"__onboarding_done__\", \"true\");\n setOpenOnboarding(false);\n }}\n >\n Do dzieła!\n \n ) : (\n {\n setActiveStep((x) => x + 1);\n }}\n >\n Dalej\n \n \n )\n \n }\n backButton={\n {\n setActiveStep((x) => x - 1);\n }}\n disabled={activeStep === 0}\n >\n \n Wstecz\n \n }\n />\n \n \n );\n};\n\nexport default OnboardingDialog;\n","import { CircularProgress, Grid, IconButton, Tooltip, Typography, List, ListItem, ListItemIcon, ListItemText, Button, ListItemSecondaryAction, Hidden, useTheme, useMediaQuery } from \"@material-ui/core\";\nimport React from \"react\";\nimport { Data } from \"../../framework/data\";\nimport { MatchHeader, MatchStatus, Set } from \"../../store/matches/models\";\nimport { Player } from \"../../store/players/models\";\nimport PlayersMatches from \"./PlayersMatches\";\nimport CheckIcon from \"@material-ui/icons/Check\";\nimport ClearIcon from \"@material-ui/icons/Clear\";\nimport PostAddIcon from \"@material-ui/icons/PostAdd\";\nimport { AppState } from \"../../store/reducer\";\nimport { connect } from \"react-redux\";\nimport { Dispatch } from \"redux\";\nimport { loadMyConfirmedMatches, loadMyUnconfirmedMatches } from \"../../store/desktop/actions\";\nimport logger from \"../../framework/logger\";\nimport { cancelMatch, confirmMatch, submitMatchResult } from \"../../store/matches/actions\";\nimport { Alert } from \"@material-ui/lab\";\nimport MatchResultDialog from \"../matches/MatchResultDialog\";\nimport { LeagueWithPaymentStatus } from \"../../store/leagues/models\";\nimport SportsTennisIcon from '@material-ui/icons/SportsTennis';\nimport StatsContainer from \"../stats/StatsContainer\";\nimport { useAuth0 } from \"@auth0/auth0-react\";\nimport EventNoteIcon from '@material-ui/icons/EventNote';\nimport AttachMoneyIcon from '@material-ui/icons/AttachMoney';\nimport TableChartIcon from '@material-ui/icons/TableChart';\nimport { Link } from \"react-router-dom\";\nimport { PlayerType } from \"../../store/registration/model\";\nimport { Club } from \"../../store/clubs/models\";\nimport CancelConfirmationDialog from \"../matches/CancelConfirmation\";\nimport OnboardingDialog from \"../shell/onboarding/OnboardingDialog\";\n\ninterface DesktopPageProps {\n unconfirmedMatches: Data;\n confirmedMatches: Data;\n player: Data;\n leagues: Data;\n clubs: Data;\n\n loadUnconfirmedMatches: (token: string) => void;\n loadConfirmedMatches: (token: string) => void;\n\n cancelMatch: (year: string, leagueId: string, matchId: string, token: string) => void;\n confirmMatch: (year: string, leagueId: string, matchId: string, token: string) => void;\n submitMatchResult: (sets: Set[], walkover: boolean, year: string, leagueId: string, matchId: string, token: string) => void;\n}\n\nconst DesktopPage: React.FC = ({ unconfirmedMatches, confirmedMatches, player, leagues, loadConfirmedMatches, loadUnconfirmedMatches, cancelMatch, confirmMatch, submitMatchResult, clubs }) => {\n\n const { getAccessTokenSilently } = useAuth0();\n\n React.useEffect(() => {\n\n if (player.type === \"LOADED\") {\n getAccessTokenSilently().then((token: string) => {\n loadUnconfirmedMatches(token);\n loadConfirmedMatches(token);\n });\n }\n\n }, [player]);\n\n const theme = useTheme();\n const isSmallOrUpper = useMediaQuery(theme.breakpoints.up('sm'));\n\n const [matchResultDialogOpen, setMatchResultDialogOpen] = React.useState(false);\n const [matchCancelDialogOpen, setMatchCancelDialogOpen] = React.useState(false);\n const [currentMatch, setCurrentMatch] = React.useState();\n\n const handleMatchResult = async (success: boolean, sets: Set[], walkover: boolean) => {\n if (success && currentMatch) {\n const token = await getAccessTokenSilently();\n logger.logEvent(`Submitting match result for ${currentMatch.id}`, { match: JSON.stringify(currentMatch), sets: JSON.stringify(sets) });\n submitMatchResult(sets, walkover, leagues.type === \"LOADED\" ? leagues.value.find(l => l.id === currentMatch.league)?.year || \"\" : \"\", currentMatch.league, currentMatch.id, token);\n }\n setMatchResultDialogOpen(false);\n };\n\n const handleMatchCancelled = async (confirmed: boolean) => {\n if (confirmed && leagues.type === \"LOADED\" && currentMatch) {\n const token = await getAccessTokenSilently();\n cancelMatch(leagues.value.find(l => l.id === currentMatch.league)?.year || \"\", currentMatch.league, currentMatch.id, token);\n }\n\n setMatchCancelDialogOpen(false);\n }\n\n const handleHelpRequested = () => {\n window.location.assign(`mailto:support@smarttennis.pl?subject=Wynik%20meczu%20${currentMatch?.id}&body=Proszę%20podać%20wynik%20meczu`);\n }\n\n return (<>\n \n handleMatchCancelled(confirmed)}>\n \n {\n player.type === \"LOADED\" && player.value && leagues.type === \"LOADED\" && leagues.value && clubs.type === \"LOADED\" && clubs.value\n ? (\n\n (unconfirmedMatches.type === \"LOADED\" && confirmedMatches.type === \"LOADED\") ? (\n <>\n handleMatchResult(success, sets, walkover)}\n onHelpRequested={() => handleHelpRequested()}\n currentPlayer={player.value}\n >\n \n \n Niepotwierdzone\n\n\n {\n const firstAction = m.status === MatchStatus.New &&\n m.createdBy &&\n m.createdBy.id !== player.value.id &&\n (m.firstPlayer.id === player.value.id ||\n m.secondPlayer.id === player.value.id) ? (\n \n {\n const token = await getAccessTokenSilently();\n logger.logEvent(`Confirming match ${m.id}`, { match: m });\n confirmMatch(leagues.value.find(l => l.id === m.league)?.year || \"\", m.league, m.id, token);\n }}\n >\n \n \n \n ) : (\n <>\n );\n\n const secondAction =\n (m.status === MatchStatus.New || m.status === MatchStatus.Confirmed) &&\n (m.firstPlayer.id === player.value.id ||\n m.secondPlayer.id === player.value.id) ? (\n \n {\n const token = await getAccessTokenSilently();\n logger.logEvent(`Cancelling match ${m.id}`, { match: m });\n\n if (((new Date().getTime() - m.date.getTime()) / (1000 * 60 * 60)) < 24) {\n setCurrentMatch(m);\n setMatchCancelDialogOpen(true);\n } else {\n cancelMatch(leagues.value.find(l => l.id === m.league)?.year || \"\", m.league, m.id, token);\n }\n }}\n >\n \n \n \n ) : <>;\n\n return (<>{firstAction} {secondAction});\n\n\n }}\n >\n\n \n \n \n Potwierdzone mecze\n\n {\n const firstAction =\n m.status === MatchStatus.Confirmed && m.date <= new Date() &&\n (m.firstPlayer.id === player.value.id ||\n m.secondPlayer.id === player.value.id) ? (\n \n {\n setCurrentMatch(m);\n setMatchResultDialogOpen(true);\n }}\n >\n \n \n \n ) : <>;\n\n const secondAction =\n (m.status === MatchStatus.New || m.status === MatchStatus.Confirmed) &&\n (m.firstPlayer.id === player.value.id ||\n m.secondPlayer.id === player.value.id) ? (\n \n {\n const token = await getAccessTokenSilently();\n logger.logEvent(`Cancelling match ${m.id}`, { match: m });\n\n if (((new Date().getTime() - m.date.getTime()) / (1000 * 60 * 60)) < 24) {\n setCurrentMatch(m);\n setMatchCancelDialogOpen(true);\n } else {\n cancelMatch(leagues.value.find(l => l.id === m.league)?.year || \"\", m.league, m.id, token);\n }\n\n\n }}\n >\n \n \n \n ) : <>;\n\n return (<>{firstAction} {secondAction});\n\n\n }}\n >\n \n \n\n \n Moje ligi\n\n {\n (leagues.type === \"LOADED\") ? (\n \n {\n leagues.value.sort((a, b) => b.year.localeCompare(a.year)).map(i => (\n \n \n \n \n \n \n \n {i.name}\n \n \n \n \n {\n i.playerType === PlayerType.TRIAL ? (\n \n ) : (<>)\n }\n\n \n \n ))\n }\n\n \n ) : (\n
    \n \n
    \n )\n }\n
    \n
    \n\n \n \n ) : (\n
    \n \n
    \n )\n ) : (\n \n Musisz utworzyć profil zawodnika i zapisać się do wybranej przez siebie ligi aby móc oglądać swoje mecze\n \n )\n }\n\n );\n}\n\nconst mapStateToProps = (state: AppState) => ({\n unconfirmedMatches: state.desktop.myUnconfirmedMatches,\n confirmedMatches: state.desktop.myConfirmedMatches,\n player: state.player.me,\n leagues: state.leagues.leaguesWithPayments,\n clubs: state.clubs.clubs\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) => ({\n loadUnconfirmedMatches: (token: string) => dispatch(loadMyUnconfirmedMatches(token)),\n loadConfirmedMatches: (token: string) => dispatch(loadMyConfirmedMatches(token)),\n\n cancelMatch: (year: string, leagueId: string, matchId: string, token: string) => dispatch(cancelMatch({ leagueId, matchId, skip: 0, take: 25, year, token })),\n confirmMatch: (year: string, leagueId: string, matchId: string, token: string) => dispatch(confirmMatch({ leagueId, matchId, skip: 0, take: 25, year, token })),\n submitMatchResult: (sets: Set[], walkover: boolean, year: string, leagueId: string, matchId: string, token: string) => dispatch(submitMatchResult({ leagueId, walkover, matchId, skip: 0, take: 25, year, token, sets }))\n})\n\nexport default connect(mapStateToProps, mapDispatchToProps)(DesktopPage);","import React from \"react\";\nimport StatsContainer from \"./StatsContainer\";\nimport { withRouter, RouteComponentProps } from \"react-router-dom\";\nimport { Alert, AlertTitle } from \"@material-ui/lab\";\n\nconst StatsPage: React.FC> = ({ match }) => {\n return <>\n \n Wersja beta\n W wersji beta statystyki z meczów w ligach deblowych nie są brane pod uwagę. Pracujemy nad tym, aby dostarczyć Wam pełne statystyki\n \n
    \n \n
    \n \n};\n\nexport default withRouter(StatsPage);","import React from \"react\";\nimport { format } from \"date-fns\";\n\nexport interface TimeViewProps {\n value: Date;\n}\n\nconst TimeView:React.FC = ({ value }) => ({format(value, 'HH:mm')})\n\nexport default TimeView;","import { Button, Divider, ExpansionPanel, ExpansionPanelActions, ExpansionPanelDetails, ExpansionPanelSummary, Grid, Typography, CircularProgress, Link } from \"@material-ui/core\";\nimport React from \"react\";\nimport DateView from \"../../framework/components/DateView\";\nimport { MatchOfferHeader } from \"../../store/match-offers/models\";\n\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\nimport PersonIcon from '@material-ui/icons/Person';\nimport TodayIcon from '@material-ui/icons/Today';\nimport ScheduleIcon from '@material-ui/icons/Schedule';\nimport { canBeTurnedIntoMatch, canBeCancelled } from \"../../store/match-offers/utils\";\nimport { Player } from \"../../store/players/models\";\nimport { LeagueWithPlayersICanPlay } from \"../../store/leagues/models\";\nimport TimeView from \"../../framework/components/TimeView\";\nimport { Club } from \"../../store/clubs/models\";\nimport LeaguePlayerView from \"../leagues/LeaguePlayerView\";\nimport { dataOf } from \"../../framework/data\";\n\ninterface MatchOfferListItemProps {\n item: MatchOfferHeader;\n player?: Player;\n league?: LeagueWithPlayersICanPlay;\n clubs: Club[];\n cancelMatchOffer: (id: string) => void;\n acceptMatchOffer: (id: string) => void;\n}\n\nconst MatchOfferListItem: React.FC = ({ item, player, league, acceptMatchOffer, cancelMatchOffer, clubs }) => {\n\n return (\n }>\n \n \n \n \n \n \n \n \n {item.firstPlayer.name} {item.firstPlayer.surname}\n \n \n \n \n \n \n \n \n \n \n \n {\n item.startDate.valueOf() === item.endDate.valueOf() ? (\n \n ) : (\n <>\n - \n \n )\n }\n \n \n \n \n \n \n \n \n \n \n \n {\n item.startTime === item.endTime ? (\n \n ) : (\n <>{item.startTime} - {item.endTime}\n )\n }\n\n \n \n \n \n \n \n \n \n \n \n Opis\n \n \n {item.description}\n \n\n \n \n \n \n \n \n {item.clubs.length > 1 ? \"Kluby\" : \"Klub\"}\n \n \n
      \n {item.clubs.map(c =>
    • {c.name}
    • )}\n
    \n
    \n
    \n \n \n \n \n \n Kontakt\n \n \n \n \n Statystyki zawodnika\n \n
    \n
    \n \n \n {\n canBeTurnedIntoMatch(item, player, league) ? (\n \n ) : (\n <>\n )\n }\n {\n canBeCancelled(item, player) ? (\n \n ) : (\n <>\n )\n }\n\n \n
    );\n\n}\n\nexport default MatchOfferListItem;","import { Player } from \"../players/models\";\nimport { MatchOfferHeader } from \"./models\";\nimport { LeagueWithPlayersICanPlay } from \"../leagues/models\";\n\nexport const canBeTurnedIntoMatch = (offer: MatchOfferHeader, player?: Player, league?: LeagueWithPlayersICanPlay) =>\n offer.clubs && \n offer.startDate &&\n offer.endDate &&\n offer.startTime &&\n offer.endTime &&\n offer.clubs.length === 1 && \n offer.startDate.valueOf() === offer.endDate.valueOf() &&\n offer.startTime === offer.endTime && \n !!player && player.id !== offer.firstPlayer.id &&\n !!league && !!league.players.find(p => p.id === player.id) && \n !!league.players.find(p => p.canIPlay && p.id === offer.firstPlayer.id);\n \nexport const canBeCancelled = (offer: MatchOfferHeader, player?: Player) => \n player && offer.firstPlayer.id === player.id;\n\nexport interface MatchOffersFilterModel {\n dateFrom: Date;\n dateTo: Date;\n clubIds: string[]\n}","import React from \"react\";\nimport { MatchOfferHeader } from \"../../store/match-offers/models\";\nimport { Player } from \"../../store/players/models\";\nimport MatchOfferListItem from \"./MatchOfferListItem\";\nimport { LeagueWithPlayersICanPlay } from \"../../store/leagues/models\";\nimport { Club } from \"../../store/clubs/models\";\n\ninterface MatchOffersListProps {\n offers: MatchOfferHeader[];\n player?: Player;\n league?: LeagueWithPlayersICanPlay;\n clubs: Club[];\n cancelMatchOffer: (id: string) => void;\n acceptMatchOffer: (id: string) => void;\n}\n\nconst MatchOffersList: React.FC = ({ offers, player, league, acceptMatchOffer, cancelMatchOffer, clubs }) => <>{\n offers.map(x => (\n \n ))};\n\nexport default MatchOffersList;","import React from \"react\";\nimport { MatchOffersFilterModel } from \"../../store/match-offers/utils\";\nimport { Grid, TextField } from \"@material-ui/core\";\nimport { KeyboardDatePicker } from \"@material-ui/pickers\";\nimport { Autocomplete } from \"@material-ui/lab\";\nimport { sortBy } from \"ramda\";\nimport { Club } from \"../../store/clubs/models\";\nimport { startOfDay, endOfDay } from \"date-fns\";\n\ninterface MatchOffersFilterProps {\n filter: MatchOffersFilterModel;\n onFilterChanged: (f: MatchOffersFilterModel) => void;\n clubs: Club[];\n}\n\n\n\nconst MatchOffersFilter: React.FC = ({ filter, onFilterChanged, clubs }) => {\n\n const getOptionsLabel = (option: any) => {\n if (!option) {\n return \"\";\n }\n\n if (!!option.name) {\n return option.name;\n }\n\n if (typeof option === \"string\") {\n return clubs?.find((x) => x.id === option)?.name || \"\";\n }\n\n return \"\";\n };\n\n\n const handlePreferredClubsChange = (max: number) => (_: any, value: any[]) => {\n if (value.length <= max) {\n onFilterChanged({ ...filter, clubIds: (value.map((x) => {\n if (typeof x === \"string\") {\n return x;\n }\n return x.id;\n })) })\n }\n };\n\n return <>\n \n \n {\n if (x) {\n onFilterChanged({ ...filter, dateFrom: startOfDay(x) })\n }\n }}\n />\n {\n if (x) {\n onFilterChanged({ ...filter, dateTo: endOfDay(x) })\n }\n }}\n />\n \n \n x.address?.city || \"Kraków\", clubs || [])}\n getOptionLabel={getOptionsLabel}\n getOptionSelected={(o: Club, v: string) => o.id === v}\n groupBy={(o: Club) => o.address?.city || \"Kraków\"}\n filterSelectedOptions\n onChange={handlePreferredClubsChange(3)}\n style={{ width: \"100%\", marginTop: '16px' }}\n renderInput={(params) => (\n \n )}\n >\n \n \n ;\n}\n\nexport default MatchOffersFilter;","import React from \"react\";\nimport { match, withRouter } from \"react-router-dom\";\nimport { AppState } from \"../../store/reducer\";\nimport { connect } from \"react-redux\";\nimport { FormState, EDITING, shouldKeepDialogOpen, NOT_STARTED, CreateMatchOfferPayload, State, MatchOfferHeader } from \"../../store/match-offers/models\";\nimport { Button, CircularProgress, Grid, TablePagination, Paper, useTheme, Typography } from \"@material-ui/core\";\nimport { Dispatch } from \"redux\";\nimport { createChangeFormState, createMatchOffer, getMatchOffers, cancelMatchOffer, acceptMatchOffer } from \"../../store/match-offers/actions\";\nimport CreateMatchOfferDialog from \"./CreateMatchOfferDialog\";\nimport { Club } from \"../../store/clubs/models\";\nimport { Data, unsafeUnwrap, isLoaded } from \"../../framework/data\";\nimport { currentPlayer } from \"../../store/players/selectors\";\nimport { allClubs } from \"../../store/clubs/selectors\";\nimport { Player } from \"../../store/players/models\";\nimport { useAuth0 } from \"@auth0/auth0-react\";\nimport MatchOffersList from \"./MatchOffersList\";\nimport AddIcon from '@material-ui/icons/Add';\nimport { LeagueWithPlayersICanPlay } from \"../../store/leagues/models\";\nimport { loadLeagueDetails, loadOpponentsPlayedWith } from \"../../store/leagues/actions\";\nimport { userAssignedLeagueWithPossibleMatches } from \"../../store/leagues/selectors\";\nimport { drop, take } from \"ramda\";\nimport MatchOffersFilter from \"./MatchOffersFilter\";\nimport { MatchOffersFilterModel } from \"../../store/match-offers/utils\";\nimport { add } from \"date-fns\";\nimport { Alert, AlertTitle } from \"@material-ui/lab\";\n\ninterface MatchOfferPageProps {\n match: match<{ leagueYear: string, leagueId: string }>;\n formState: FormState;\n\n player: Data;\n clubs: Data;\n\n matchOffers: Data;\n\n league: Data;\n loadLeaguesDetails: (id: string, year: string) => void;\n loadOpponentsPlayedWith: (token: string, year: string, id: string) => void;\n\n startEditing: () => void;\n cancelEditing: () => void;\n submitMatchOffer: (payload: CreateMatchOfferPayload) => void;\n\n loadMatchOffers: (leagueId: string, leagueYear: string) => void;\n\n cancelMatchOffer: (id: string, leagueId: string, leagueYear: string, token: string) => void;\n acceptMatchOffer: (id: string, leagueId: string, leagueYear: string, token: string) => void;\n}\n\nconst doesItemMatchFilter = (m: MatchOfferHeader, f: MatchOffersFilterModel) => {\n return m.startDate >= f.dateFrom && m.startDate <= f.dateTo && (f.clubIds.length == 0 || f.clubIds.includes(m.clubs[0].id))\n}\n\nconst MatchOffersPage: React.FC = ({ match, formState, player, clubs, matchOffers, startEditing, cancelEditing, submitMatchOffer, loadMatchOffers, league, loadLeaguesDetails, loadOpponentsPlayedWith, acceptMatchOffer, cancelMatchOffer }) => {\n\n const leagueYear = match.params.leagueYear;\n const leagueId = match.params.leagueId;\n\n const { getAccessTokenSilently, isAuthenticated, loginWithRedirect } = useAuth0();\n\n console.log(matchOffers);\n\n React.useEffect(() => {\n loadMatchOffers(leagueId, leagueYear);\n loadLeaguesDetails(leagueId, leagueYear);\n }, [leagueId, leagueYear]);\n\n React.useEffect(() => {\n if (player && isLoaded(player)) {\n getAccessTokenSilently().then((t) => {\n loadOpponentsPlayedWith(t, leagueYear, leagueId)\n })\n }\n }, [player, leagueId, leagueYear]);\n\n const [page, setPage] = React.useState(0);\n const [pageSize, setPageSize] = React.useState(25);\n\n const [filter, setFilter] = React.useState({ clubIds: [], dateFrom: new Date(), dateTo: add(new Date(), { days: 28 }) });\n\n const filteredItems = React.useMemo(() => matchOffers.type === \"LOADED\" ? matchOffers.value.filter((mo) => doesItemMatchFilter(mo, filter)) : [], [filter, matchOffers])\n\n const viewableItems = React.useMemo(() => take(pageSize, drop(page * pageSize, filteredItems)), [page, pageSize, filteredItems]);\n\n const theme = useTheme();\n\n const onLogin = React.useCallback(() => {\n loginWithRedirect({\n redirectUri: window.location.href, appState: {\n targetUrl: window.location.hash\n }\n });\n }, [loginWithRedirect]);\n\n return (\n {\n !isAuthenticated ? (\n \n \n Zaloguj się\n Musisz być zalogowanym użytkownikiem SmartTennis, aby zobaczyć oferty z Giełdy Meczów. \n \n \n ) : (\n <>\n \n Zmiany w giełdzie meczów\n Zgodnie z ankietą przeprowadzoną na grupie Mecze ligowe na Facebooku, zaczynając od sezonu 2025/1, gracze będą otrzymywać notyfikacje mailowe, gdy ktoś z ich ligii stworzy propozycję meczu na giełdzie. Z notyfikacji można wypisać się w Profilu Zawodnika.\n \n \n {\n (player.type === \"LOADED\" && clubs.type === \"LOADED\" && !!player.value)\n ? \n {\n const token = await getAccessTokenSilently();\n submitMatchOffer({\n clubIds: preferredClubs,\n description,\n endDate: toDate,\n endTime: toTime,\n leagueId,\n leagueYear,\n startDate: fromDate,\n startTime: fromTime,\n token\n });\n }}>\n \n \n\n \n : <>\n }\n \n \n \n\n \n \n \n \n {\n matchOffers.type === \"LOADED\" && clubs.type === \"LOADED\" && league.type === \"LOADED\" ? (\n <>\n {\n if (player.type === \"LOADED\") {\n const token = await getAccessTokenSilently();\n acceptMatchOffer(id, leagueId, leagueYear, token);\n }\n }}\n cancelMatchOffer={async (id) => {\n if (player.type === \"LOADED\") {\n const token = await getAccessTokenSilently();\n cancelMatchOffer(id, leagueId, leagueYear, token);\n }\n }}\n >\n setPage(p)}\n rowsPerPageOptions={[10, 25, 50]}\n rowsPerPage={pageSize}\n onChangeRowsPerPage={(e) => {\n setPageSize(parseInt(e.target.value, 10));\n setPage(0);\n }}\n />\n \n ) : (\n
    \n \n
    \n )\n }\n
    \n \n\n\n )\n }\n\n {\n\n }\n\n\n\n\n
    );\n}\n\nconst mapStateToProps = (state: AppState) => ({\n formState: state.matchOffers.formState,\n player: currentPlayer(state),\n clubs: allClubs(state),\n matchOffers: state.matchOffers.matchOffers,\n league: userAssignedLeagueWithPossibleMatches(state)\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) => ({\n startEditing: () => dispatch(createChangeFormState(EDITING)),\n cancelEditing: () => dispatch(createChangeFormState(NOT_STARTED)),\n submitMatchOffer: (payload: CreateMatchOfferPayload) => dispatch(createMatchOffer(payload)),\n loadMatchOffers: (leagueId: string, leagueYear: string) => dispatch(getMatchOffers({ leagueId, leagueYear })),\n loadLeaguesDetails: (leagueId: string, leagueYear: string) => dispatch(loadLeagueDetails({ id: leagueId, year: leagueYear })),\n loadOpponentsPlayedWith: (token: string, year: string, id: string) => dispatch(loadOpponentsPlayedWith({ token, year, id })),\n cancelMatchOffer: (id: string, leagueId: string, leagueYear: string, token: string) => dispatch(cancelMatchOffer({ id, leagueId, leagueYear, token })),\n acceptMatchOffer: (id: string, leagueId: string, leagueYear: string, token: string) => dispatch(acceptMatchOffer({ id, leagueId, leagueYear, token }))\n})\n\nexport default withRouter(\n connect(mapStateToProps, mapDispatchToProps)(MatchOffersPage)\n);","import React from \"react\";\nimport { LeagueHeader } from \"../../store/leagues/models\";\nimport { Data } from \"../../framework/data\";\nimport { getConfig } from \"../../config/configuration\";\nimport { AppState } from \"../../store/reducer\";\nimport { Dispatch } from \"redux\";\nimport { loadOpenLeagues } from \"../../store/leagues/actions\";\nimport { connect } from \"react-redux\";\nimport { RegisterToLeague } from \"../../store/registration/model\";\nimport { Typography, FormControl, InputLabel, Select, MenuItem, ListSubheader, makeStyles, Theme, createStyles, Paper, Grid, Tooltip, Divider, Button, CircularProgress, TextField } from \"@material-ui/core\";\nimport { groupBy, uniq } from \"ramda\";\nimport HelpOutlineIcon from '@material-ui/icons/HelpOutline';\nimport ErrorOutlineIcon from '@material-ui/icons/ErrorOutline';\nimport { setLeagueToRegister as setLeagueToRegisterAction } from '../../store/registration/actions';\nimport { Alert } from \"@material-ui/lab\";\n\ninterface LeagueSelectorProps {\n leagues: Data\n loadLeagues: (season: string) => void;\n onProceed: () => void;\n leagueToRegister: RegisterToLeague;\n setLeagueToRegister: (x: RegisterToLeague) => void;\n subscribedTo: Data;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n formControl: {\n margin: theme.spacing(1),\n minWidth: 280,\n },\n selectEmpty: {\n marginTop: theme.spacing(2),\n },\n selectPanel: {\n borderLeft: 0,\n borderRight: 0,\n margin: '0 -32px',\n padding: '16px 32px',\n backgroundColor: theme.palette.grey[100]\n },\n errorMessage: {\n color: theme.palette.error.main,\n marginLeft: 4,\n marginTop: theme.spacing(2)\n }\n }),\n);\n\nconst isDoubles = (leagues: LeagueHeader[], id: string) => leagues.find(l => l.id === id)?.isDoubles;\n\nconst LeagueSelector: React.FC = ({ leagues, loadLeagues, onProceed, leagueToRegister, setLeagueToRegister, subscribedTo }) => {\n\n const classes = useStyles();\n\n const [isValid, setIsValid] = React.useState(true);\n const [touched, setTouched] = React.useState(false);\n\n const [selectedCity, setSelectedCity] = React.useState(\"\");\n\n React.useEffect(() => {\n getConfig().then(c => loadLeagues(c.seasonToRegister));\n }, []);\n\n const onLeagueChange = (e: React.ChangeEvent) => {\n\n const season = (leagues.type === \"LOADED\" ? leagues.value.find(x => x.id === e.target.value) : undefined)?.year;\n const price = (leagues.type === \"LOADED\" ? leagues.value.find(x => x.id === e.target.value) : undefined)?.basePrice || 0;\n\n setLeagueToRegister({\n league: {\n id: e.target.value,\n season: season ?? \"\",\n secondPlayerName: leagueToRegister.league.secondPlayerName,\n secondPlayerSurname: leagueToRegister.league.secondPlayerSurname,\n basePrice: price\n },\n city: ''\n });\n\n setTouched(true);\n }\n\n const resetLeague = () => {\n setLeagueToRegister({\n league: {\n id: '',\n season: '',\n secondPlayerName: leagueToRegister.league.secondPlayerName,\n secondPlayerSurname: leagueToRegister.league.secondPlayerSurname,\n basePrice: 1\n },\n city: ''\n });\n\n setTouched(true);\n }\n\n const onSecondPlayerNameChange = (x: string) => {\n setLeagueToRegister({\n league: {\n id: leagueToRegister.league.id,\n season: leagueToRegister.league.season,\n secondPlayerName: x,\n secondPlayerSurname: leagueToRegister.league.secondPlayerSurname,\n basePrice: leagueToRegister.league.basePrice\n },\n city: ''\n });\n }\n\n const onSecondPlayerSurnameChange = (x: string) => {\n setLeagueToRegister({\n league: {\n id: leagueToRegister.league.id,\n season: leagueToRegister.league.season,\n secondPlayerName: leagueToRegister.league.secondPlayerName,\n secondPlayerSurname: x,\n basePrice: leagueToRegister.league.basePrice\n },\n city: ''\n });\n }\n\n /*const onCityChange = (e: React.ChangeEvent) => {\n setLeagueToRegister({\n league: {\n id: '',\n season: '',\n secondPlayerName: '',\n secondPlayerSurname: '',\n basePrice: 1,\n },\n city: e.target.value\n });\n\n setTouched(true);\n }*/\n\n const onSubmit = () => {\n if (leagueToRegister.city || leagueToRegister.league?.id) {\n\n onProceed();\n } else {\n setIsValid(false);\n }\n\n setTouched(true);\n }\n\n const isDisabled = () => {\n if (leagues.type !== \"LOADED\") return true;\n if (!leagueToRegister.city && !leagueToRegister.league.id) return true;\n\n if (isDoubles(leagues.value, leagueToRegister.league.id) && !(leagueToRegister.league.secondPlayerName && leagueToRegister.league.secondPlayerSurname)) return true;\n\n return false;\n }\n\n\n return <>\n \n Wybierz ligę\n {\n leagues.type === \"LOADED\" && subscribedTo.type === \"LOADED\" ? (\n <>\n \n \n \n Miasto\n \n \n \n \n \n \n \n \n\n \n \n \n \n Liga\n \n \n \n \n \n \n \n \n\n \n \n ) : (\n \n \n \n )\n }\n\n \n {\n\n leagues.type === \"LOADED\" && isDoubles(leagues.value, leagueToRegister.league.id) ? (<>\n\n \n \n Wybrana liga jest ligą deblową. Proszę podać imię i nazwisko partnera deblowego.\n \n\n \n \n onSecondPlayerNameChange(e.target.value)}\n error={(isDoubles(leagues.value, leagueToRegister.league.id) && !leagueToRegister.league.secondPlayerName)}\n />\n \n \n onSecondPlayerSurnameChange(e.target.value)}\n error={(isDoubles(leagues.value, leagueToRegister.league.id) && !leagueToRegister.league.secondPlayerSurname)}\n />\n \n \n\n \n ) : (<>)}\n {\n !isValid ? (\n \n \n \n \n \n Wybierz ligę, w której chcesz grać\n \n \n ) : (\n <>\n )\n }\n\n\n \n \n ;\n}\n\nconst mapStateToProps = (state: AppState) => ({\n leagues: state.leagues.items,\n leagueToRegister: state.registration.leagueSelection,\n subscribedTo: state.leagues.subscribedTo\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) => ({\n loadLeagues: (season: string) => dispatch(loadOpenLeagues(season)),\n setLeagueToRegister: (x: RegisterToLeague) => dispatch(setLeagueToRegisterAction(x))\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(LeagueSelector);","import React from \"react\";\nimport { PlayerType, RegisterToLeague } from \"../../store/registration/model\";\nimport { AppState } from \"../../store/reducer\";\nimport { Dispatch } from \"redux\";\nimport { setRegistrationPlayerType } from \"../../store/registration/actions\";\nimport { connect } from \"react-redux\";\nimport { Paper, makeStyles, Theme, createStyles, Typography, Grid, Card, CardContent, List, ListItem, ListItemIcon, ListItemText, Button, Divider, CircularProgress, Tooltip, IconButton, Chip } from \"@material-ui/core\";\n\nimport CheckCircleIcon from '@material-ui/icons/CheckCircle';\nimport CancelIcon from '@material-ui/icons/Cancel';\nimport { currentPlayer } from \"../../store/players/selectors\";\nimport { Player } from \"../../store/players/models\";\nimport { Data } from \"../../framework/data\";\nimport { Alert } from \"@material-ui/lab\";\nimport { LeagueHeader } from \"../../store/leagues/models\";\nimport ErrorIcon from '@material-ui/icons/Error';\n\ninterface PlayerTypeProps {\n playerType: PlayerType;\n leagues: Data;\n setPlayerType: (x: PlayerType) => void;\n selectedLeague: RegisterToLeague;\n onProceed: () => void;\n onMoveBack: () => void;\n currentPlayer: Data;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n selectPanel: {\n borderLeft: 0,\n borderRight: 0,\n margin: '0 -32px',\n padding: '16px 32px',\n backgroundColor: theme.palette.grey[100]\n },\n title: {\n fontSize: 14\n },\n listIcon: {\n minWidth: 32,\n height: 20\n },\n selectedPlayerType: {\n boxShadow: `0px 0px 5px 0px ${theme.palette.primary.main} inset`\n },\n selectablePlayerType: {\n cursor: \"pointer\"\n },\n disabledPlayerType: {\n opacity: 0.5\n }\n }),\n);\n\nconst PlayerTypeComponent: React.FC = ({ playerType, selectedLeague, setPlayerType, onProceed, onMoveBack, currentPlayer, leagues }) => {\n\n const classes = useStyles();\n const regularDisabled = !!selectedLeague.city;\n const trialDisabled = currentPlayer.type === \"LOADED\" && !!currentPlayer.value && currentPlayer.value.playerType === PlayerType.REGULAR;\n\n return <>\n {\n currentPlayer.type === \"LOADED\" && leagues.type === \"LOADED\" ? (\n <>\n \n Rodzaj konta\n\n {\n (regularDisabled && trialDisabled) ? (\n Niestety, nie jest możliwa rejestracja istniejącego (płatnego) zawodnika do ligi w mieście, które nie wspiera w pełni ligi. Prosimy o kontakt z support@smarttennis.pl\n ) : (<>)\n }\n\n \n \n !regularDisabled && setPlayerType(PlayerType.REGULAR)}>\n \n \n Konto\n \n \n SMART {\n !regularDisabled ? (\n \n - {leagues.value.find(x => x.id === selectedLeague.league.id)?.basePrice} zł\n \n ) : (<>)\n }\n \n \n \n \n \n \n \n \n dostęp do bazy przeciwników na podobnym poziomie\n \n \n \n \n \n \n \n \n \n możliwość umawiania się na mecze przez system\n \n \n \n \n \n \n \n \n \n rywalizacja o turniej finałowy i nagrody rzeczowe\n \n \n \n \n \n \n \n \n \n zniżki na rezerwacje partnerskich kortów tenisowych\n \n \n \n \n \n \n \n \n \n Smart Punkty wymienne na piłki, vouchery, owijki itp.\n \n \n \n \n \n \n \n \n !trialDisabled && setPlayerType(PlayerType.TRIAL)}>\n \n \n Konto\n \n \n Próbne (max 3 mecze) - 0 zł \n \n (dostępne tylko dla nowych graczy)\n \n \n \n \n \n \n \n dostęp do bazy przeciwników na podobnym poziomie\n \n \n \n \n \n \n \n \n \n możliwość umawiania się na mecze przez system\n \n \n \n \n \n \n \n \n \n zniżki na rezerwacje partnerskich kortów tenisowych\n \n \n \n \n \n \n \n \n \n rywalizacja o turniej finałowy i nagrody rzeczowe\n \n \n \n \n \n \n \n \n \n Smart Punkty wymienne na piłki, vouchery, owijki itp.\n \n \n \n \n \n \n \n \n\n \n \n \n \n \n ) : (\n \n \n \n )\n }\n\n ;\n};\n\nconst mapStateToProps = (state: AppState) => ({\n playerType: state.registration.playerType,\n selectedLeague: state.registration.leagueSelection,\n currentPlayer: currentPlayer(state),\n leagues: state.leagues.items\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) => ({\n setPlayerType: (x: PlayerType) => dispatch(setRegistrationPlayerType(x))\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(PlayerTypeComponent);","import React from \"react\";\nimport { AppState } from \"../../store/reducer\";\nimport { currentPlayer } from \"../../store/players/selectors\";\nimport { Data } from \"../../framework/data\";\nimport { Player } from \"../../store/players/models\";\nimport { connect } from \"react-redux\";\nimport ProfileEditor from \"../players/ProfileEditor\";\nimport { Dispatch } from \"redux\";\nimport { Club } from \"../../store/clubs/models\";\nimport { loadClubsInProvince } from \"../../store/clubs/actions\";\nimport { Divider, Button, CircularProgress } from \"@material-ui/core\";\nimport { setUpdatedPlayer } from \"../../store/registration/actions\";\nimport { PlayerType } from \"../../store/registration/model\";\n\ninterface PlayerStepProps {\n onProceed: () => void;\n onMoveBack: () => void;\n currentPlayer: Data;\n updatedPlayer?: Player;\n clubs: Data;\n loadClubs: () => void;\n setUpdatedPlayer: (player?: Player) => void;\n playerType: PlayerType;\n}\n\nconst PlayerStep: React.FC = ({ onProceed, onMoveBack, currentPlayer, clubs, loadClubs, setUpdatedPlayer, updatedPlayer, playerType }) => {\n\n React.useEffect(() => {\n loadClubs();\n }, []);\n\n React.useEffect(() => {\n if(currentPlayer && currentPlayer.type === \"LOADED\" && !!currentPlayer.value && !updatedPlayer) {\n setUpdatedPlayer(currentPlayer.value);\n }\n\n }, [currentPlayer])\n\n return <>{\n currentPlayer.type === \"LOADED\" && clubs.type === \"LOADED\" ? (<>\n \n \n \n \n ) : (\n \n )\n };\n}\n\nconst mapStateToProps = (state: AppState) => ({\n currentPlayer: currentPlayer(state),\n clubs: state.clubs.clubs,\n updatedPlayer: state.registration.updatedPlayer,\n playerType: state.registration.playerType\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) => ({\n loadClubs: () => dispatch(loadClubsInProvince()),\n setUpdatedPlayer: (player?: Player) => dispatch(setUpdatedPlayer(player)) \n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(PlayerStep);","import React from \"react\";\nimport { makeStyles, Theme, createStyles, Paper, Typography, TextField, Grid, Button, Link } from \"@material-ui/core\";\nimport VerifiedUserIcon from '@material-ui/icons/VerifiedUser';\nimport { Alert, AlertTitle } from \"@material-ui/lab\";\nimport { Data } from \"../../framework/data\";\n\ninterface PhoneConfirmationProps {\n phone: string;\n phoneVerified: boolean | undefined;\n isVerifying: boolean;\n phoneAuthMessage: string;\n onPhoneChallenged: (code: string) => void;\n onSendSmsMessage: () => void;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n selectPanel: {\n borderLeft: 0,\n borderRight: 0,\n margin: '0 -32px',\n padding: '16px 32px',\n backgroundColor: theme.palette.grey[100]\n }\n }),\n);\n\nconst PhoneConfirmation: React.FC = ({ phone, onPhoneChallenged, onSendSmsMessage, isVerifying, phoneVerified, phoneAuthMessage }) => {\n\n const classes = useStyles();\n\n const [phoneCode, setPhoneCode] = React.useState(\"\");\n\n React.useEffect(() => {\n\n onSendSmsMessage();\n\n }, [phone]);\n\n let x = (<>);\n\n if (phoneVerified === true) {\n x = (
    \n \n Sukces!\n Zweryfikowaliśmy Twój numer telefonu. Wciśnij 'Dalej' aby dokończyć rejestrację\n \n
    \n );\n } else if (phoneVerified === false) {\n x = (\n
    \n \n Niepowodzenie!\n Nie udało nam się zweryfikować Twojego numeru telefonu. Upewnij się, że Twój numer jest poprawny i spróbuj ponownie\n \n
    \n )\n }\n\n return <>\n {x}\n \n {\n phoneAuthMessage ? (\n \n Błąd wysyłania SMS!\n {phoneAuthMessage}\n \n ) : (\n Na Twój numer: {phone} wysłaliśmy wiadomość SMS z kodem.\n Po otrzymaniu kodu, proszę przepisz go do poniższego pola.\n )\n }\n\n\n \n \n setPhoneCode(e.target.value)}\n disabled={isVerifying || !!phoneVerified}\n >\n \n \n \n \n \n \n \n}\n\nexport default PhoneConfirmation;","import React from \"react\";\nimport { Paper, makeStyles, Theme, createStyles, Typography, Grid, TextField, Button, InputAdornment, Tooltip } from \"@material-ui/core\";\nimport HelpIcon from \"@material-ui/icons/Help\";\nimport { LeagueHeader } from \"../../store/leagues/models\";\nimport { PriceInfo } from \"../../store/registration/model\";\nimport { Alert } from \"@material-ui/lab\";\n\ninterface PriceConfirmationProps {\n leagueId: string;\n\n leagues: LeagueHeader[];\n\n isVerifying: boolean;\n\n getPriceInfoForLeague: (id: string, year: string, promoCode: string, referral: string) => void;\n\n priceInfo?: PriceInfo;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n selectPanel: {\n borderLeft: 0,\n borderRight: 0,\n margin: '0 -32px',\n padding: '16px 32px',\n backgroundColor: theme.palette.grey[100]\n }\n }),\n);\n\nconst PriceConfirmation: React.FC = ({ leagueId, leagues, isVerifying, getPriceInfoForLeague, priceInfo }) => {\n\n const classes = useStyles();\n\n const [promoCode, setPromoCode] = React.useState(\"\");\n const [referral, setReferral] = React.useState(\"\");\n const league = React.useMemo(() => leagues.find(x => x.id === leagueId), [leagues, leagueId]);\n\n return <>\n \n Bazowy koszt dołączenia do ligi: {league?.basePrice} PLN\n\n {\n !!priceInfo ? \n Kwota po zaaplikowaniu kodu promocyjnego: {priceInfo.finalPrice} PLN\n : <>\n }\n {\n !!priceInfo && priceInfo.promoCodeDescription ? \n {priceInfo.promoCodeDescription}\n : <>\n }\n {\n !!priceInfo && priceInfo.referralDescription ? \n {priceInfo.referralDescription}\n : <>\n }\n\n \n \n \n Aby zaaplikować kod promocyjny i/lub kod polecającego należy wcisnąć przycisk 'Użyj kodu'\n \n \n \n\n \n \n setPromoCode(e.target.value)}\n disabled={isVerifying}\n >\n \n \n setReferral(e.target.value)}\n disabled={isVerifying}\n InputProps={{\n endAdornment: (\n \n \n \n Kod, który dostałeś/-aś od osoby, która\n zaprosiła Cię do ligi. Składa się z 8-miu dużych\n liter i cyfr, np. 85M3JUQ1\n \n \n SmartPunkty zostaną dodane, tylko jeśli jesteś\n nowym zawodnikiem\n \n \n }\n >\n \n \n \n ),\n }}\n >\n \n \n \n \n \n \n ;\n}\n\nexport default PriceConfirmation;","import React from \"react\";\nimport { connect } from \"react-redux\";\nimport { Player } from \"../../store/players/models\";\nimport { AppState } from \"../../store/reducer\";\nimport { PlayerType, RegisterToLeague, PriceInfo } from \"../../store/registration/model\";\nimport PhoneConfirmation from \"./PhoneConfirmation\";\nimport { useAuth0 } from \"@auth0/auth0-react\";\nimport { Dispatch } from \"redux\";\nimport { sendSmsVerificationCode, verifySmsCode, getPriceInfoForLeague } from \"../../store/registration/actions\";\nimport { Divider, Button, Checkbox, Link } from \"@material-ui/core\";\nimport PriceConfirmation from \"./PriceConfirmation\";\nimport { Data } from \"../../framework/data\";\nimport { LeagueHeader } from \"../../store/leagues/models\";\nimport { currentPlayer } from \"../../store/players/selectors\";\n\ninterface ConfirmationStepProps {\n\n playerType: PlayerType;\n playerInfo?: Player;\n\n phoneVerified: boolean | undefined;\n phoneAuthMessage: Data;\n isVerifying: boolean;\n\n leagueSelection: RegisterToLeague;\n leagues: Data;\n currentPlayer: Data;\n priceInfo: Data;\n\n onProceed: () => void;\n onMoveBack: () => void;\n\n sendSmsWithVericationCode: (token: string, phoneNumber: string) => void;\n verifySmsCode: (token: string, code: string) => void;\n getPriceInfoForLeague: (id: string, season: string, promoCode: string, referral: string, playerId?: string) => void;\n}\n\nconst ConfirmationStep: React.FC = ({\n playerType, playerInfo, phoneVerified, isVerifying, leagueSelection, leagues, currentPlayer, priceInfo, phoneAuthMessage,\n sendSmsWithVericationCode, verifySmsCode, onProceed, onMoveBack, getPriceInfoForLeague }) => {\n\n const { getAccessTokenSilently } = useAuth0();\n\n const [tocApproved, setTocApproved] = React.useState(false);\n const [isPhoneVerificationForTrialNeeded, setPhoneVerificationForTrialNeeded] = React.useState(false);\n\n React.useEffect(() => {\n if (currentPlayer.type === \"LOADED\" && playerInfo?.isVerified && playerInfo.phoneNumber === currentPlayer.value.phoneNumber) {\n setPhoneVerificationForTrialNeeded(false);\n } else {\n setPhoneVerificationForTrialNeeded(true);\n }\n }, []);\n\n\n let x = (<>);\n\n if (leagueSelection.league.basePrice !== 0) {\n switch (playerType) {\n case PlayerType.TRIAL: {\n if (isPhoneVerificationForTrialNeeded) {\n x = ( {\n if (playerInfo) {\n const token = await getAccessTokenSilently();\n sendSmsWithVericationCode(token, playerInfo.phoneNumber!);\n }\n\n }} onPhoneChallenged={async (code) => {\n const token = await getAccessTokenSilently();\n verifySmsCode(token, code);\n }}>);\n }\n break;\n }\n case PlayerType.REGULAR: {\n x = leagues.type === \"LOADED\" && currentPlayer.type === \"LOADED\" ? ( getPriceInfoForLeague(id, year, promoCode, referral, currentPlayer.value?.id)}\n >) : (<>);\n break;\n }\n }\n }\n\n return (<>\n {x}\n setTocApproved(e.target.checked)}\n >\n Zgadzam się z{\" \"}\n \n regulaminem ligi\n \n \n \n \n )\n}\n\nconst mapStateToProps = (state: AppState) => ({\n playerType: state.registration.playerType,\n playerInfo: state.registration.updatedPlayer,\n isVerifying: state.registration.isVerifying,\n phoneVerified: state.registration.phoneVerified,\n leagueSelection: state.registration.leagueSelection,\n leagues: state.leagues.items,\n currentPlayer: currentPlayer(state),\n priceInfo: state.registration.priceInfo,\n phoneAuthMessage: state.registration.sendingPhoneAuthMessage\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) => ({\n sendSmsWithVericationCode: (token: string, phoneNumber: string) => dispatch(sendSmsVerificationCode({ token, phoneNumber })),\n verifySmsCode: (token: string, code: string) => dispatch(verifySmsCode({ token, code })),\n getPriceInfoForLeague: (leagueId: string, leagueYear: string, promoCode: string, referral: string, playerId?: string) => dispatch(getPriceInfoForLeague({\n leagueId,\n leagueYear,\n promoCode,\n referral,\n playerId\n }))\n})\n\nexport default connect(mapStateToProps, mapDispatchToProps)(ConfirmationStep);","import React from \"react\";\nimport { AppState } from \"../../store/reducer\";\nimport { Dispatch } from \"redux\";\nimport { connect } from \"react-redux\";\nimport { makeRegistration } from \"../../store/registration/actions\";\nimport { RegisterToLeague, PlayerType } from \"../../store/registration/model\";\nimport { Player } from \"../../store/players/models\";\nimport { State as RegistrationState } from '../../store/registration/reducer';\nimport { useAuth0 } from \"@auth0/auth0-react\";\nimport { Grid, Typography } from \"@material-ui/core\";\n\ninterface RegistrationProgressProps {\n startRegistration: (target: RegisterToLeague, playerType: PlayerType, playerData: Player, promoCode: string, referral: string, isUpgrading: boolean, token: string) => void;\n registration: RegistrationState;\n}\n\nconst RegistrationProgress: React.FC = ({registration, startRegistration}) => {\n\n const { getAccessTokenSilently } = useAuth0();\n\n React.useEffect(() => {\n\n getAccessTokenSilently().then(token => {\n startRegistration(\n registration.leagueSelection, \n registration.playerType, \n registration.updatedPlayer!, \n registration.priceInfo.type === \"LOADED\" \n ? registration.priceInfo.value.promoCode \n : \"\", \n registration.priceInfo.type === \"LOADED\" \n ? registration.priceInfo.value.referral\n : \"\", \n registration.isUpgrading,\n token);\n })\n\n }, []);\n\n return <>\n \n \n \n {registration.registrationMessage}\n \n \n \n \n\n};\n\nconst mapStateToProps = (state: AppState) => ({\n registration : state.registration\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) => ({\n startRegistration: (target: RegisterToLeague, playerType: PlayerType, playerData: Player, promoCode: string, referral: string, isUpgrading: boolean, token: string) => dispatch(makeRegistration({\n target,\n playerType,\n playerData,\n promoCode,\n referral,\n isUpgrading,\n token\n }))\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(RegistrationProgress);","import React from \"react\";\nimport { Stepper, Step, StepButton } from \"@material-ui/core\";\nimport LeagueSelector from \"./LeagueSelector\";\nimport PlayerType from \"./PlayerType\";\nimport PlayerStep from \"./PlayerStep\";\nimport ConfirmationsStep from \"./ConfirmationsStep\";\nimport RegistrationProgress from \"./RegistrationProgress\";\n\ninterface RegistrationWizardProps {\n stepsMode: StepsMode\n}\n\nconst allSteps: { key: string, title: string, factory: (activeStepIdx: number, setActiveStep: React.Dispatch>) => JSX.Element }[] = [\n {\n key: \"LEAGUE\",\n title: \"Wybór ligi\",\n factory: (activeStepIdx: number, setActiveStep: React.Dispatch>) => setActiveStep(activeStepIdx+1)} />\n },\n {\n key: \"PROFILE_TYPE\",\n title: \"Typ profilu\",\n factory: (activeStepIdx: number, setActiveStep: React.Dispatch>) => setActiveStep(activeStepIdx+1)} onMoveBack={() => setActiveStep(activeStepIdx-1)} />\n },\n {\n key: \"PLAYER_PROFILE\",\n title: \"Profil zawodnika\",\n factory: (activeStepIdx: number, setActiveStep: React.Dispatch>) => setActiveStep(activeStepIdx+1)} onMoveBack={() => setActiveStep(activeStepIdx-1)} />\n },\n {\n key: \"SIGN_UP\",\n title: \"Zapis do ligi\",\n factory: (activeStepIdx: number, setActiveStep: React.Dispatch>) => setActiveStep(activeStepIdx+1)} onMoveBack={() => setActiveStep(activeStepIdx-1)}>\n },\n {\n key: \"FINISH\",\n title: \"Zakończenie\",\n factory: () => \n }\n];\n\nexport type StepsMode = \"NORMAL\" | \"UPGRADE_TO_PLAYER\" | \"FREE_LEAGUE\";\n\nconst getSteps = (mode: StepsMode) => {\n\n switch(mode) {\n case \"NORMAL\": {\n return [\n \"Wybór ligi\",\n \"Typ profilu\",\n \"Profil zawodnika\",\n \"Zapis do ligi\",\n \"Zakończenie\"\n ]\n };\n case \"FREE_LEAGUE\": {\n return [\n \"Wybór ligi\",\n \"Profil zawodnika\",\n \"Zapis do ligi\",\n \"Zakończenie\"\n ]\n };\n case \"UPGRADE_TO_PLAYER\": {\n return [\n \"Zapis do ligi\",\n \"Zakończenie\"\n ]\n }\n }\n}\n\nconst getStepContent = (mode: StepsMode, activeStepIdx: number) => {\n const stepName = getSteps(mode)[activeStepIdx];\n console.log(stepName);\n console.log(mode);\n return allSteps.find(x => x.title === stepName)?.factory;\n}\n\n\nconst RegistrationWizard: React.FC = ({ stepsMode }) => {\n\n const [activeStep, setActiveStep] = React.useState(0);\n const steps = getSteps(stepsMode);\n\n return <>\n \n {\n steps.map((step) => (\n \n \n {step}\n \n \n ))\n }\n \n {\n getStepContent(stepsMode, activeStep)!(activeStep, setActiveStep)\n }\n \n};\n\nexport default RegistrationWizard;","import React from \"react\";\nimport { Data } from \"../../framework/data\";\nimport { Player } from \"../../store/players/models\";\nimport { AppState } from \"../../store/reducer\";\nimport { currentPlayer } from \"../../store/players/selectors\";\nimport { connect } from \"react-redux\";\nimport { useAuth0 } from \"@auth0/auth0-react\";\nimport { Alert } from \"@material-ui/lab\";\nimport { Link } from \"@material-ui/core\";\nimport RegistrationWizard, { StepsMode } from \"./RegistrationWizard\";\nimport { useLocation } from \"react-router-dom\";\nimport { Dispatch } from \"redux\";\nimport { setRegistrationForPlayerTypeUpgrade, setRegistrationPlayerType } from \"../../store/registration/actions\";\nimport { PlayerType } from \"../../store/registration/model\";\n\nexport interface RegistrationPageProps {\n player: Data;\n leagueBasePrice: number;\n upgradePlayer: (leagueId: string, leagueYear: string, player: Player) => void;\n setPlayerTypeRegular: () => void;\n}\n\nfunction useQuery() {\n return new URLSearchParams(useLocation().search);\n}\n\nconst RegistrationPage: React.FC = ({ player, upgradePlayer, leagueBasePrice, setPlayerTypeRegular }) => {\n\n const { isAuthenticated, loginWithRedirect } = useAuth0();\n\n const [mode, setMode] = React.useState(\"NORMAL\");\n\n const query = useQuery();\n\n React.useEffect(() => {\n\n if (player.type === \"LOADED\" && player.value) {\n\n if (query.has('leagueId') && query.has('leagueYear')) {\n upgradePlayer(query.get('leagueId')!, query.get('leagueYear')!, player.value!);\n setMode(\"UPGRADE_TO_PLAYER\")\n } else {\n if (leagueBasePrice === 0) {\n setPlayerTypeRegular();\n setMode(\"FREE_LEAGUE\");\n } else {\n setMode(\"NORMAL\");\n }\n }\n }\n\n }, [player, query.get('leagueId'), query.get('leagueYear'), leagueBasePrice]);\n\n return (<>\n {\n !isAuthenticated ? (\n \n
    \n loginWithRedirect({\n redirectUri: window.location.href, appState: {\n targetUrl: window.location.hash\n }\n })}>Kliknij tutaj aby zalogować się lub założyć konto w celu rozpoczęcia rejestracji.\n
    \n
    \n ) : (\n \n )\n }\n );\n};\n\nconst mapStateToProps = (state: AppState) => ({\n player: currentPlayer(state),\n leagueBasePrice: state.registration.leagueSelection.league.basePrice\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) => ({\n upgradePlayer: (leagueId: string, leagueYear: string, player: Player) => dispatch(setRegistrationForPlayerTypeUpgrade({\n leagueId,\n leagueYear,\n player\n })),\n setPlayerTypeRegular: () => dispatch(setRegistrationPlayerType(PlayerType.REGULAR))\n})\n\nexport default connect(mapStateToProps, mapDispatchToProps)(RegistrationPage);","import React from \"react\";\nimport { PlayerRank } from \"../../store/elo/model\";\nimport { TableContainer, Table, TableHead, TableRow, TableCell, TableBody, Tooltip, IconButton, TablePagination, Link } from \"@material-ui/core\";\nimport EqualizerIcon from '@material-ui/icons/Equalizer';\nimport { take, drop } from \"ramda\";\n\ninterface RankingTableProps {\n ranking: PlayerRank[];\n}\n\nconst RankingTable: React.FC = ({ ranking }) => {\n\n const [page, setPage] = React.useState();\n const [pageSize, setPageSize] = React.useState();\n\n const viewItems = take(\n pageSize || 25,\n drop((pageSize || 25) * (page || 0), ranking)\n );\n\n return (\n <>\n \n \n \n \n Miejsce\n Imię i nazwisko\n Miasto\n Poziom\n Punkty\n Wygrane / wszystkie mecze\n % wygranych\n Akcje\n \n \n \n {\n viewItems.map((rank, i) => (\n \n {i + 1 + (parseInt(page) || 0) *(parseInt(pageSize) || 25)}.\n \n \n {rank.name}\n  \n {rank.surname}\n \n \n {rank.city}\n {rank.level}\n {rank.rating}\n {rank.numberOfWinMatches}/{rank.numberOfMatches}\n {rank.winPercentage}%\n \n \n \n \n \n \n \n \n ))\n }\n \n
    \n
    \n {\n setPage(p);\n }}\n onChangeRowsPerPage={(e) => {\n setPageSize(parseInt(e.target.value));\n }}\n />\n \n )\n\n}\n\nexport default RankingTable;","import React from \"react\";\nimport { connect } from \"react-redux\";\nimport { Dispatch } from \"redux\";\nimport { Data } from \"../../framework/data\";\nimport { loadRanking } from \"../../store/elo/actions\";\nimport { PlayerRank } from \"../../store/elo/model\";\nimport { AppState } from \"../../store/reducer\";\nimport { CircularProgress } from \"@material-ui/core\";\nimport RankingTable from \"./RankingTable\";\n\ninterface RankingPageProps {\n ranking: Data;\n loadRanking: () => void; \n}\n\nconst RankingPage: React.FC = ({ ranking, loadRanking }) => {\n\n React.useEffect(() => {\n loadRanking();\n }, []);\n\n switch(ranking.type) {\n case \"LOADING\": return (
    );\n case \"LOADED\": return ();\n default: return (<>);\n }\n};\n\nconst mapStateToProps = (state: AppState) => {\n return {\n ranking: state.elo.ranking\n };\n}\n\nconst mapDispatchToProps = (dispatch: Dispatch) => {\n return {\n loadRanking: () => dispatch(loadRanking())\n }\n}\n\nexport default connect(mapStateToProps, mapDispatchToProps)(RankingPage);","import * as React from \"react\";\nimport { Player } from \"../../store/players/models\";\nimport { AppState } from \"../../store/reducer\";\nimport { connect } from \"react-redux\";\nimport { Grid, TableContainer, Table, TableHead, TableCell, TableRow, TableBody, TablePagination } from \"@material-ui/core\";\nimport { loadAllPlayers } from \"../../store/players/actions\";\nimport { Dispatch } from \"redux\";\nimport { Data } from \"../../framework/data\";\nimport { useAuth0 } from \"@auth0/auth0-react\";\nimport { take, drop, sortBy } from \"ramda\";\n\ninterface AdminAllPlayersPageProps {\n players: Data;\n loadPlayers: (t: string) => void;\n}\n\nconst AdminAllPlayersPage: React.FC = ({players, loadPlayers}) => {\n\n const { getAccessTokenSilently } = useAuth0();\n\n const [page, setPage] = React.useState();\n const [pageSize, setPageSize] = React.useState();\n\n const orderedPlayers = players.type === \"LOADED\" ? sortBy(x => `${x.surname}${x.name}`, players.value) : [];\n\n const viewItems = take(\n pageSize || 25,\n drop((pageSize || 25) * (page || 0), orderedPlayers)\n );\n\n React.useEffect(() => {\n getAccessTokenSilently().then(t => loadPlayers(t))\n }, []);\n\n return (\n \n \n \n \n \n \n \n Nazwisko\n Imię\n Email\n Nr tel.\n \n \n \n {viewItems.map((player, i) => (\n \n \n {player.surname}\n \n \n {player.name}\n \n \n {player.email}\n \n \n {player.phoneNumber}\n \n \n ))}\n \n
    \n
    \n {\n setPage(p);\n }}\n onChangeRowsPerPage={(e) => {\n setPageSize(parseInt(e.target.value));\n }}\n />\n \n
    \n
    \n );\n\n}\n\nconst mapStateToProps = (state: AppState) => {\n return {\n players: state.player.all\n };\n };\n \n const mapDispatchToProps = (dispatch: Dispatch) => {\n return {\n loadPlayers: (t: string) => dispatch(loadAllPlayers({token: t}))\n }\n };\n \n export default connect(mapStateToProps, mapDispatchToProps)(AdminAllPlayersPage);\n ","import * as React from \"react\";\nimport { makeStyles, Card, CardActionArea, CardMedia, CardContent, Typography } from \"@material-ui/core\";\n\nconst useStyles = makeStyles({\n root: {\n maxWidth: 400,\n },\n});\n\ninterface SponsorProps {\n name: string;\n description: string;\n url: string;\n logoUrl: string;\n}\n\nconst Sponsor: React.FC = ({ name, description, logoUrl, url }) => {\n\n const classes = useStyles();\n\n return (\n \n \n \n \n \n {name}\n \n \n {description}\n \n \n \n \n )\n\n}\n\nexport default Sponsor;","import * as React from \"react\";\nimport { Grid } from \"@material-ui/core\";\nimport Sponsor from \"./Sponsor\";\n\nconst SponsorsPage: React.FC = () => {\n\n return (\n \n\n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n \n \n )\n\n};\n\nexport default SponsorsPage;\n\n","import { groupBy } from \"ramda\";\nimport { dataOf } from \"../../framework/data\";\nimport { AppState } from \"../reducer\";\n\nexport const selectTournaments = (state: AppState) => state.tournaments.items.type === \"LOADED\" ? dataOf(groupBy(x => x.city, state.tournaments.items.value)) : state.tournaments.items;\nexport const selectTournamentDetails = (state: AppState) => state.tournaments.details;\n\nexport const selectTournamentsSubscribedTo = (state: AppState) => \n state.tournaments.items.type === \"LOADED\"\n ? dataOf(state.tournaments.items.value.filter(x => x.isCurrentUserAssigned).map(x => x.id))\n : state.tournaments.items;","import { Button, ExpansionPanel, ExpansionPanelDetails, ExpansionPanelSummary, Grid, Hidden, Typography, useMediaQuery, useTheme, Chip } from \"@material-ui/core\";\nimport { TournamentHeader } from \"../../store/tournaments/models\";\nimport React from \"react\";\nimport ExpandMoreIcon from \"@material-ui/icons/ExpandMore\";\nimport TableChartIcon from '@material-ui/icons/TableChart';\nimport { Link } from \"react-router-dom\";\nimport PricesList from \"../leagues/PricesList\";\nimport DateTimeView from \"../../framework/components/DateTimeView\";\nimport PersonIcon from '@material-ui/icons/Person';\nimport PeopleIcon from '@material-ui/icons/People';\n\ninterface TournamentHeaderProps {\n tournament: TournamentHeader;\n}\n\nconst TournamentHeaderComponent: React.FC = ({\n tournament\n}) => {\n\n const theme = useTheme();\n const isSmall = useMediaQuery(theme.breakpoints.down('sm'));\n\n return (\n \n }>\n \n \n \n {tournament.name}\n : }\n >\n \n \n \n \n \n <>Uczestnicy: {tournament.participantsCount}{\" / \"}{tournament.maxPlayers}\n\n \n \n \n \n \n \n\n \n \n \n \n \n \n Opis\n \n {tournament.description}\n \n \n \n Nagrody\n \n \n \n \n \n Czas\n \n \n - \n \n \n \n \n Klub\n \n \n {tournament.clubs.filter(x => !!x.logoUrl).map((c) => (\n \n \n \n ))}\n \n \n \n \n \n );\n};\n\nexport default TournamentHeaderComponent;\n","import React from \"react\";\nimport { TournamentHeader } from \"../../store/tournaments/models\";\nimport TournamentHeaderComponent from \"./TournamentHeader\";\n\n\ninterface ITournamentListProps {\n tournaments: TournamentHeader[];\n}\n\nconst TournamentsList: React.FC = ({ tournaments }) => {\n return (<> {tournaments.sort((l1, l2) => (l2.startDate as any) - (l1.startDate as any)).map(l => ())} )\n};\n\nexport default TournamentsList;","import React from \"react\";\nimport { TournamentHeader } from \"../../store/tournaments/models\";\nimport { Collapse, IconButton, Typography } from \"@material-ui/core\";\nimport ExploreIcon from '@material-ui/icons/Explore';\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\nimport ExpandLessIcon from '@material-ui/icons/ExpandLess';\nimport TournamentsList from \"./TournamentsList\";\n\ninterface TournamentCityGroupProps {\n city: string;\n tournaments: TournamentHeader[];\n}\n\nconst TournamentCityGroup: React.FC = ({ city, tournaments }) => {\n\n\n\n const [isOpen, open] = React.useState();\n\n const season = tournaments[0].year;\n\n React.useEffect(() => {\n\n try {\n const state = window.localStorage.getItem(`tournaments--${season}---${city}`);\n if (state === 'open') {\n open(true);\n return;\n }\n\n if (window.location.hash.includes(`hint=${encodeURI(city)}`)) {\n open(true);\n }\n\n\n } catch (e) {\n console.error(e);\n }\n\n\n }, [city, season]);\n\n const setOpen = React.useCallback((o: boolean) => {\n\n open(o);\n\n try {\n\n if (!!o) {\n window.localStorage.setItem(`tournaments--${season}---${city}`, 'open');\n } else {\n window.localStorage.setItem(`tournaments--${season}---${city}`, 'closed');\n }\n\n } catch (e) {\n console.error(e);\n }\n\n }, [city, season]);\n\n return
    {city} setOpen(!isOpen)}>{isOpen ? : }
    \n};\n\nexport default TournamentCityGroup;","import { CircularProgress } from \"@material-ui/core\";\nimport { Data } from \"../../framework/data\";\nimport { TournamentHeader } from \"../../store/tournaments/models\";\nimport TournamentCityGroup from \"./TournamentCityGroup\";\nimport React from \"react\";\n\ninterface ITournamentGroupsProps {\n groups: Data<{[city:string]:TournamentHeader[]}>\n}\n\nconst TournamentGroups: React.FC = ({ groups }) => {\n\n switch(groups.type) {\n case \"LOADED\": {\n\n const toRender = Object.entries(groups.value).map(([city, tournaments]) => ());\n\n return (
    {toRender}
    )\n }\n case \"LOADING\": {\n return (
    )\n }\n default: {\n return(
    );\n } \n }\n}\n\nexport default TournamentGroups;","import React from \"react\";\nimport { match, withRouter } from \"react-router-dom\";\nimport { Data } from \"../../framework/data\";\nimport { Player } from \"../../store/players/models\";\nimport { AppState } from \"../../store/reducer\";\nimport { currentPlayer } from \"../../store/players/selectors\";\nimport { Dispatch } from \"redux\";\nimport { loadTournaments } from \"../../store/tournaments/actions\";\nimport { connect } from \"react-redux\";\nimport { selectTournaments } from \"../../store/tournaments/selectors\";\nimport { TournamentHeader } from \"../../store/tournaments/models\";\nimport { Badge, Button, Grid, MenuItem, Select, Typography, useMediaQuery, useTheme } from \"@material-ui/core\";\nimport { ToggleButton, ToggleButtonGroup } from \"@material-ui/lab\";\nimport DescriptionIcon from '@material-ui/icons/Description';\nimport TournamentGroups from \"./TournamentGroups\";\nimport { useAuth0 } from \"@auth0/auth0-react\";\n\ninterface TournamentPageProps {\n match: match<{ year: string }>;\n tournaments: Data<{ [key: string]: TournamentHeader[] }>;\n player?: Data;\n loadTournaments: (token: string, year: string) => void;\n}\n\nconst TournamentPage: React.FC = ({ match, tournaments, player, loadTournaments }) => {\n\n var theme = useTheme();\n const isSmall = useMediaQuery(theme.breakpoints.down('sm'));\n\n const [availableYears, setAvailableYears] = React.useState([]);\n const [defaultSeason, setDefaultSeason] = React.useState(\"2024\");\n\n React.useEffect(() => {\n const year = new Date().getFullYear();\n\n if (year >= 2024) {\n setDefaultSeason(year.toString());\n } else {\n setDefaultSeason(\"2024\");\n }\n\n\n }, []);\n\n React.useEffect(() => {\n const initial = 2024;\n const thisYear = new Date().getFullYear();\n const toYear = thisYear >= 2024 ? thisYear : 2024;\n const years = [];\n\n for (let i = initial; i <= toYear; i++) {\n years.push(i.toString());\n }\n\n setAvailableYears(years);\n\n }, []);\n\n const season = match.params.year;\n\n const setViewedYear = React.useCallback((year: string) => window.location.assign(`/#/tournaments/${year}`), []);\n\n const { getAccessTokenSilently } = useAuth0();\n\n React.useEffect(() => {\n getAccessTokenSilently().then((token) => {\n const yearToRegister = new Date().getFullYear() >= 2024 ? new Date().getFullYear().toString() : \"2024\";\n loadTournaments(token, yearToRegister);\n }).catch((reason) => {\n const yearToRegister = new Date().getFullYear() >= 2024 ? new Date().getFullYear().toString() : \"2024\";\n loadTournaments(\"\", yearToRegister);\n });\n }, [season]);\n\n return (\n \n \n \n \n \n \n\n \n \n Rok:\n \n \n {\n isSmall ? (\n \n ) : (\n { setViewedYear(v) }}\n >\n {availableYears.map((y, i) => (\n \n {y.replace(\"-\", \"/\")}\n {\n i === 0 && y !== defaultSeason ? (<> ) : (<>)\n }\n \n ))}\n \n )\n }\n\n \n \n \n \n );\n\n}\n\nconst mapStateToProps = (state: AppState) => {\n return {\n tournaments: selectTournaments(state),\n player: currentPlayer(state)\n };\n};\n\nconst mapDispatchToProps = (dispatch: Dispatch) => {\n return {\n loadTournaments: (token: string, year: string) => dispatch(loadTournaments({ year, token }))\n }\n};\n\nexport default withRouter(connect(mapStateToProps, mapDispatchToProps)(TournamentPage));","import { Button, CircularProgress, Divider, FormControl, Grid, InputLabel, ListSubheader, MenuItem, Paper, Select, Theme, Typography, createStyles, makeStyles, TextField, Checkbox, FormControlLabel } from \"@material-ui/core\";\nimport { Data } from \"../../../framework/data\";\nimport { RegisterToTournament, TournamentHeader } from \"../../../store/tournaments/models\";\nimport React from \"react\";\nimport { groupBy } from \"ramda\";\nimport { connect } from \"react-redux\";\nimport { AppState } from \"../../../store/reducer\";\nimport { Dispatch } from \"redux\";\nimport { loadTournaments } from \"../../../store/tournaments/actions\";\nimport { selectTournamentsSubscribedTo } from \"../../../store/tournaments/selectors\";\nimport { setTournamentToRegister as setTournamentToRegisterAction } from \"../../../store/registration/actions\"\nimport { useAuth0 } from \"@auth0/auth0-react\";\nimport { Alert } from \"@material-ui/lab\";\n\ninterface TournamentSelectorProps {\n tournaments: Data\n loadTournaments: (token: string, year: string) => void;\n onProceed: () => void;\n tournamentToRegister: RegisterToTournament;\n setTournamentToRegister: (x: RegisterToTournament) => void;\n subscribedTo: Data;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n formControl: {\n margin: theme.spacing(1),\n minWidth: 280,\n },\n selectEmpty: {\n marginTop: theme.spacing(2),\n },\n selectPanel: {\n borderLeft: 0,\n borderRight: 0,\n margin: '0 -32px',\n padding: '16px 32px',\n backgroundColor: theme.palette.grey[100]\n },\n errorMessage: {\n color: theme.palette.error.main,\n marginLeft: 4,\n marginTop: theme.spacing(2)\n }\n }),\n);\n\nconst TournamentSelector: React.FC = ({ tournaments, loadTournaments, onProceed, tournamentToRegister, setTournamentToRegister, subscribedTo }) => {\n\n const classes = useStyles();\n\n const [touched, setTouched] = React.useState(false);\n\n const { getAccessTokenSilently } = useAuth0();\n\n React.useEffect(() => {\n getAccessTokenSilently().then((token) => {\n const yearToRegister = new Date().getFullYear() >= 2024 ? new Date().getFullYear().toString() : \"2024\";\n loadTournaments(token, yearToRegister);\n })\n }, []);\n\n const onLeagueChange = (e: React.ChangeEvent) => {\n\n const season = (tournaments.type === \"LOADED\" ? tournaments.value.find(x => x.id === e.target.value) : undefined)?.year;\n\n setTournamentToRegister({\n tournament: {\n id: e.target.value,\n season: season ?? \"\"\n },\n secondPlayerLastName: tournamentToRegister.secondPlayerLastName,\n secondPlayerName: tournamentToRegister.secondPlayerName,\n secondPlayerNeeded: tournamentToRegister.secondPlayerNeeded\n });\n\n setTouched(true);\n }\n\n const onSecondPlayerNameChange = (x: string) => {\n setTournamentToRegister({\n tournament: {\n id: tournamentToRegister.tournament.id,\n season: tournamentToRegister.tournament.season,\n\n },\n secondPlayerName: x,\n secondPlayerLastName: tournamentToRegister.secondPlayerLastName,\n secondPlayerNeeded: false\n });\n }\n\n const onSecondPlayerSurnameChange = (x: string) => {\n setTournamentToRegister({\n tournament: {\n id: tournamentToRegister.tournament.id,\n season: tournamentToRegister.tournament.season,\n\n },\n secondPlayerName: tournamentToRegister.secondPlayerName,\n secondPlayerLastName: x,\n secondPlayerNeeded: false\n });\n }\n\n const onSecondPlayerNeededChanged = (x: boolean) => {\n setTournamentToRegister({\n tournament: {\n id: tournamentToRegister.tournament.id,\n season: tournamentToRegister.tournament.season,\n\n },\n secondPlayerName: \"\",\n secondPlayerLastName: \"\",\n secondPlayerNeeded: x\n });\n }\n\n\n\n const onSubmit = () => {\n if (tournamentToRegister.tournament?.id) {\n onProceed();\n }\n\n setTouched(true);\n }\n\n const isDisabled = () => {\n if (tournaments.type !== \"LOADED\") return true;\n if (!tournamentToRegister.tournament.id) return true;\n\n return false;\n }\n\n return <>\n \n Wybierz turniej\n {\n tournaments.type === \"LOADED\" && subscribedTo.type === \"LOADED\" ? (\n \n \n \n Turniej\n \n \n \n \n\n ) : (\n \n \n \n )\n }\n\n \n {\n tournaments.type === \"LOADED\" && isDoubles(tournaments.value, tournamentToRegister.tournament.id) ? (<>\n\n \n \n Wybrany turniej jest turniejem deblowym. Proszę podać imię i nazwisko partnera deblowego, lub wskazać jego brak (wtedy z podobnych uczestników dobrany zostanie partner deblowy)\n \n\n \n \n onSecondPlayerNameChange(e.target.value)}\n error={(isDoubles(tournaments.value, tournamentToRegister.tournament.id) && !tournamentToRegister.secondPlayerName && !tournamentToRegister.secondPlayerNeeded)}\n />\n \n \n onSecondPlayerSurnameChange(e.target.value)}\n error={(isDoubles(tournaments.value, tournamentToRegister.tournament.id) && !tournamentToRegister.secondPlayerLastName && !tournamentToRegister.secondPlayerNeeded)}\n />\n \n \n onSecondPlayerNeededChanged(checked)\n }\n color=\"primary\"\n />\n }\n label=\"Nie mam partnera deblowego\"\n />\n \n \n\n \n ) : (<>)\n }\n\n \n \n ;\n}\n\nconst mapStateToProps = (state: AppState) => ({\n tournaments: state.tournaments.items,\n tournamentToRegister: state.registration.tournamentSelection,\n subscribedTo: selectTournamentsSubscribedTo(state)\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) => ({\n loadTournaments: (token: string, season: string) => dispatch(loadTournaments({ year: season, token })),\n setTournamentToRegister: (x: RegisterToTournament) => dispatch(setTournamentToRegisterAction(x))\n});\n\nconst isDoubles = (tournaments: TournamentHeader[], id: string) => tournaments.find(l => l.id === id)?.isDoubles;\n\nexport default connect(mapStateToProps, mapDispatchToProps)(TournamentSelector);","import React from \"react\";\nimport { RegisterToTournament, TournamentHeader } from \"../../../store/tournaments/models\";\nimport { Data } from \"../../../framework/data\";\nimport { Button, CircularProgress, Divider, Grid, Typography } from \"@material-ui/core\";\nimport { connect } from \"react-redux\";\nimport { AppState } from \"../../../store/reducer\";\nimport { Alert } from \"@material-ui/lab\";\n\ninterface ITournamentRegistrationConfirmation {\n tournaments: Data;\n tournamentToRegister: RegisterToTournament;\n onProceed: () => void;\n onMoveBack: () => void;\n}\n\nconst TournamentRegistrationConfirmation: React.FC = ({ tournaments, tournamentToRegister, onMoveBack, onProceed }) => {\n if (tournaments.type === \"LOADED\" && tournamentToRegister?.tournament?.id) {\n\n const selectedTournament = tournaments.value.find(x => x.id === tournamentToRegister.tournament.id && x.year === tournamentToRegister.tournament.season)!;\n\n return (<>\n \n \n {selectedTournament.name}\n {selectedTournament.description}\n \n {selectedTournament.paymentDescription}\n \n \n \n \n \n \n );\n } else {\n return \n }\n};\n\nconst mapStateToProps = (state: AppState) => ({\n tournaments: state.tournaments.items,\n tournamentToRegister: state.registration.tournamentSelection\n});\n\n\nexport default connect(mapStateToProps)(TournamentRegistrationConfirmation);\n","import React from \"react\";\nimport { Dispatch } from \"redux\";\nimport { connect } from \"react-redux\";\nimport { useAuth0 } from \"@auth0/auth0-react\";\nimport { Grid, Typography } from \"@material-ui/core\";\nimport { Player } from \"../../../store/players/models\";\nimport { RegisterToTournament } from \"../../../store/tournaments/models\";\nimport { AppState } from \"../../../store/reducer\";\nimport { State as RegistrationState } from \"../../../store/registration/reducer\";\nimport { registerToTournament } from \"../../../store/tournaments/actions\";\n\ninterface TournamentRegistrationProgressProps {\n startRegistration: (target: RegisterToTournament, playerData: Player, token: string) => void;\n registration: RegistrationState;\n}\n\nconst TournamentRegistrationProgress: React.FC = ({registration, startRegistration}) => {\n\n const { getAccessTokenSilently } = useAuth0();\n\n React.useEffect(() => {\n getAccessTokenSilently().then(token => {\n startRegistration(\n registration.tournamentSelection, \n registration.updatedPlayer!,\n token);\n }).catch((reason: any) => {\n console.log(reason);\n })\n\n }, []);\n\n return <>\n \n \n \n {registration.registrationMessage}\n \n \n \n \n\n};\n\nconst mapStateToProps = (state: AppState) => ({\n registration : state.registration\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) => ({\n startRegistration: (target: RegisterToTournament, playerData: Player, token: string) => dispatch(registerToTournament({\n target,\n playerData,\n token\n }))\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(TournamentRegistrationProgress);","import React from \"react\";\nimport PlayerStep from \"../../registration/PlayerStep\";\nimport { Step, StepButton, Stepper } from \"@material-ui/core\";\nimport TournamentSelector from \"./TournamentSelector\";\nimport TournamentRegistrationConfirmation from \"./TournamentRegistrationConfirmation\";\nimport TournamentRegistrationProgress from \"./TournamentRegistrationProgress\";\n\nconst getSteps = () => {\n return [\n \"Wybór turnieju\",\n \"Profil zawodnika\",\n \"Informacje dla zawodników\",\n \"Zakończenie\"\n ]\n}\n\n\nconst RegistrationWizard: React.FC = () => {\n\n const [activeStep, setActiveStep] = React.useState(0);\n const steps = getSteps();\n\n const getStepContent = (idx: number) => {\n switch(idx) {\n case 0: {\n return setActiveStep(activeStep+1)} />\n }\n case 1: {\n return setActiveStep(activeStep+1)} onMoveBack={() => setActiveStep(activeStep-1)} />\n }\n case 2: {\n return setActiveStep(activeStep+1)} onMoveBack={() => setActiveStep(activeStep-1)}>\n }\n case 3: {\n return \n }\n }\n }\n\n return <>\n \n {\n steps.map((step) => (\n \n \n {step}\n \n \n ))\n }\n \n {\n getStepContent(activeStep)\n }\n \n};\n\nexport default RegistrationWizard;","import { useAuth0 } from \"@auth0/auth0-react\";\nimport React from \"react\";\nimport { Alert } from \"@material-ui/lab\";\nimport { Link } from \"@material-ui/core\";\nimport { AppState } from \"../../../store/reducer\";\nimport { connect } from \"react-redux\";\nimport TournamentRegistrationWizard from \"./TournamentRegistrationWizard\";\n\nexport interface TournamentRegistrationPageProps {\n}\n\nconst TournamentRegistrationPage: React.FC = ({ }) => {\n\n const { isAuthenticated, loginWithRedirect } = useAuth0();\n\n return (<>\n {\n !isAuthenticated ? (\n \n
    \n loginWithRedirect({\n redirectUri: window.location.href, appState: {\n targetUrl: window.location.hash\n }\n })}>Kliknij tutaj aby zalogować się lub założyć konto w celu rozpoczęcia rejestracji.\n
    \n
    \n ) : (\n \n )\n }\n );\n};\n\nconst mapStateToProps = (state: AppState) => ({\n});\n\n\nexport default connect(mapStateToProps)(TournamentRegistrationPage);","import React from \"react\";\nimport {\n Typography,\n Grid,\n Divider,\n Button,\n} from \"@material-ui/core\";\nimport DateView from \"../../framework/components/DateView\";\nimport { Player } from \"../../store/players/models\";\nimport { Data } from \"../../framework/data\";\nimport { Club } from \"../../store/clubs/models\";\nimport OpenLeagueClubs from \"../leagues/OpenLeagueClubs\";\nimport { TournamentDetails } from \"../../store/tournaments/models\";\nimport LeagueRanking from \"../leagues/LeagueRanking\";\nimport PricesList from \"../leagues/PricesList\";\nimport { LeagueStatus, LeaguePlayer } from \"../../store/leagues/models\";\nimport { Link } from \"react-router-dom\";\n\ninterface TournamentDetailsProps {\n tournament: TournamentDetails;\n player?: Player;\n clubs: Data;\n onRegisterMatchResultWithPlayerRequested: (x: LeaguePlayer) => void;\n}\n\nconst calcFinalsIframeHeight = (players: any[]) => {\n if (players.length <= 16) return 654;\n return 1252;\n}\n\nconst TournamentDetailsComponent: React.FC = ({\n tournament,\n player,\n clubs,\n onRegisterMatchResultWithPlayerRequested\n}) => {\n return (\n <>\n \n {tournament.city} - {tournament.name}\n \n\n
    \n\n \n \n \n Lista rankingowa\n \n \n \n \n Wszystkie mecze\n \n {!!tournament.isCurrentUserAssigned ? (\n \n Moje mecze\n \n ) : (\n <>\n )}\n \n \n\n ({ ...x, canIPlay: true }))}\n leagueStatus={LeagueStatus.InProgress}\n onRegisterMatchResultWithPlayer={onRegisterMatchResultWithPlayerRequested}\n currentPlayer={player}>\n \n\n {\n !!tournament.ladderUrl ? (\n \n ) : (<>)\n }\n
    \n
    \n \n
    \n
    \n \n \n \n Dane turnieju\n \n \n \n \n Czas trwania:{\" \"}\n -{\" \"}\n \n \n \n \n \n Uczestników: {tournament.players.length} / {tournament.maxPlayers}\n \n \n \n \n Nagrody\n \n \n \n \n \n Opis\n \n {tournament.description}\n \n \n \n \n
    \n );\n};\n\nexport default TournamentDetailsComponent;","import React from \"react\";\nimport {\n Dialog,\n DialogTitle,\n Grid,\n Hidden,\n TextField,\n Typography,\n FormControl,\n InputLabel,\n Select,\n MenuItem,\n DialogActions,\n Button,\n} from \"@material-ui/core\";\nimport { KeyboardDateTimePicker } from \"@material-ui/pickers\";\nimport { PlayerDescriptor, LeaguePlayer, Clubs } from \"../../../store/leagues/models\";\nimport { TournamentDetails } from \"../../../store/tournaments/models\";\nimport { Match } from \"../../../store/matches/models\";\nimport { Player } from \"../../../store/players/models\";\n\ninterface CreateTournamentMatchDialogProps {\n open: boolean;\n player: Player | PlayerDescriptor;\n oponent: LeaguePlayer;\n tournament: TournamentDetails;\n onClosed: (success: boolean, match: Match | null) => void;\n}\n\nconst CreateTournamentMatchDialog: React.FC = ({\n open,\n player,\n oponent,\n tournament,\n onClosed,\n}) => {\n const handleClose = () => {\n onClosed(false, null);\n };\n\n const handleSubmit = () => {\n if (!dateOfMatch || !club) {\n return;\n }\n\n const match: Match = {\n club,\n date: dateOfMatch,\n player: {\n id: player.id!,\n level: player.level || \"\",\n name: player.name!,\n surname: player.surname!,\n },\n oponent,\n isOponentRetired: false\n };\n\n onClosed(true, match);\n };\n\n const handleClubChange = (evt: any) => {\n const clubId = evt.target.value;\n const club = tournament.clubs.find(x => x.id === clubId);\n setClub(club);\n };\n\n const [club, setClub] = React.useState();\n const [dateOfMatch, setDateOfMatch] = React.useState<\n Date | undefined | null\n >();\n\n React.useEffect(() => {\n const currentClub: Clubs = tournament.clubs[0];\n setClub(currentClub);\n setDateOfMatch(new Date());\n }, []);\n\n return (\n
    \n \n Zaplanuj mecz\n
    \n \n \n \n \n \n \n \n vs.\n \n \n \n \n \n \n \n {\n setDateOfMatch(e);\n }}\n />\n \n\n \n \n Klub\n handleClubChange(evt)}\n value={club?.id}\n labelWidth={32}\n >\n {\n tournament.clubs.map((c) => (\n \n {c.name}\n \n ))\n }\n \n \n \n \n
    \n \n \n handleSubmit()}\n variant=\"contained\"\n color=\"primary\"\n >\n Zapisz\n \n \n
    \n
    \n );\n};\n\nexport default CreateTournamentMatchDialog;\n","import React from \"react\";\nimport { AppState } from \"../../store/reducer\";\nimport { currentPlayer } from \"../../store/players/selectors\";\nimport { Dispatch } from \"redux\";\nimport { connect } from \"react-redux\";\nimport { withRouter, match } from \"react-router-dom\";\nimport { Data } from \"../../framework/data\";\nimport { Player } from \"../../store/players/models\";\nimport { CircularProgress } from \"@material-ui/core\";\nimport { Club } from \"../../store/clubs/models\";\nimport { loadClubsInProvince } from \"../../store/clubs/actions\";\nimport { TournamentDetails } from \"../../store/tournaments/models\";\nimport TournamentDetailsComponent from \"./TournamentDetails\";\nimport { loadTournamentDetails, submitTournamentMatch } from \"../../store/tournaments/actions\";\nimport { useAuth0 } from \"@auth0/auth0-react\";\nimport { selectTournamentDetails } from \"../../store/tournaments/selectors\";\nimport CreateTournamentMatchDialog from \"./matches/CreateTournamentMatchDialog\";\nimport { LeaguePlayer } from \"../../store/leagues/models\";\nimport { Match } from \"../../store/matches/models\";\n\ninterface TournamentDetailsPageProps {\n player: Data;\n details: Data;\n match: match;\n loadTournamentDetails: (year: string, id: string, token: string) => void;\n clubs: Data;\n loadClubs: () => void;\n submitTournamentMatch: (tournament: TournamentDetails, match: Match, token: string) => void;\n}\n\nconst TournamentDetailsPage: React.FC = ({\n details,\n match,\n loadTournamentDetails,\n player,\n clubs,\n loadClubs,\n submitTournamentMatch\n}) => {\n\n const { getAccessTokenSilently } = useAuth0();\n\n const [matchResultDialogOpen, setMatchResultDialogOpen] = React.useState(false);\n\n const [oponent, setOponent] = React.useState();\n\n React.useEffect(() => {\n var id = (match.params as any).id;\n var year = (match.params as any).year;\n\n getAccessTokenSilently().then((token) => {\n loadTournamentDetails(year, id, token);\n }).catch(() => {\n loadTournamentDetails(year, id, \"\");\n });\n\n }, [match.params, loadTournamentDetails]);\n\n React.useEffect(() => {\n if (clubs.type === \"NOT_STARTED\" && loadClubs) {\n loadClubs();\n }\n }, []);\n\n const onRegisteringMatchFinished = async (\n success: boolean,\n match: Match | null\n ) => {\n if (success && details.type === \"LOADED\" && match) {\n const token = await getAccessTokenSilently();\n const tournament = details.value;\n submitTournamentMatch(tournament, match, token);\n }\n\n setMatchResultDialogOpen(false);\n };\n\n const registerMatchResultWithPlayerRequested = (player: LeaguePlayer) => {\n setOponent(player);\n setMatchResultDialogOpen(true);\n };\n\n const unsafePlayer =\n player && player.type === \"LOADED\" ? player.value : undefined;\n\n switch (details.type) {\n case \"LOADED\": {\n return (\n <> {\n player.type === \"LOADED\" && !!player && oponent ? ()\n :\n (<>)\n }\n \n \n );\n }\n case \"LOADING\": {\n return (\n \n \n \n );\n }\n default: {\n return
    ;\n }\n }\n};\n\nconst mapStateToProps = (state: AppState) => {\n return {\n details: selectTournamentDetails(state),\n player: currentPlayer(state),\n newestMatches: state.matches.currentLeagueNewestMatches,\n clubs: state.clubs.clubs\n };\n};\n\nconst mapDispatchToProps = (dispatch: Dispatch) => {\n return {\n loadTournamentDetails: (year: string, id: string, token: string) =>\n dispatch(loadTournamentDetails({ year, id, token })),\n loadClubs: () => dispatch(loadClubsInProvince()),\n submitTournamentMatch: (tournament: TournamentDetails, match: Match, token: string) => dispatch(submitTournamentMatch({\n token, tournament, match\n }))\n };\n};\n\nexport default withRouter(\n connect(mapStateToProps, mapDispatchToProps)(TournamentDetailsPage)\n);\n","import React from \"react\";\nimport {\n Dialog,\n DialogTitle,\n Grid,\n Typography,\n DialogActions,\n Button,\n Checkbox,\n Link\n} from \"@material-ui/core\";\nimport { update } from \"ramda\";\nimport ReactGA from 'react-ga';\nimport { PlayerDescriptor } from \"../../../store/leagues/models\";\nimport { Set } from \"../../../store/matches/models\";\nimport SetResult from \"../../matches/SetResult\";\nimport { Player } from \"../../../store/players/models\";\n\ninterface TournamentMatchResultDialogProps {\n open: boolean;\n onClosed: (success: boolean, sets: Set[], walkover: boolean) => void;\n firstPlayer?: PlayerDescriptor;\n secondPlayer?: PlayerDescriptor;\n currentPlayer: Player;\n}\n\nconst TournamentMatchResultDialog: React.FC = ({\n open,\n onClosed,\n firstPlayer,\n secondPlayer,\n currentPlayer\n}) => {\n\n const [sets, setSets] = React.useState([\n { firstPlayer: 0, secondPlayer: 0 },\n { firstPlayer: 0, secondPlayer: 0 },\n { firstPlayer: 0, secondPlayer: 0 }\n ]);\n const [walkover, setWalkover] = React.useState(false);\n\n const handleClose = () => {\n onClosed(false, [], false);\n };\n\n const handleWalkover = (isWalkover: boolean) => {\n if (firstPlayer?.id === currentPlayer.id && isWalkover) {\n setSets([\n { firstPlayer: 6, secondPlayer: 0 },\n { firstPlayer: 6, secondPlayer: 0 },\n { firstPlayer: 0, secondPlayer: 0 },\n ])\n } else if (secondPlayer?.id === currentPlayer.id && isWalkover) {\n setSets([\n { firstPlayer: 0, secondPlayer: 6 },\n { firstPlayer: 0, secondPlayer: 6 },\n { firstPlayer: 0, secondPlayer: 0 },\n ])\n }\n\n setWalkover(isWalkover)\n }\n\n const handleSubmit = () => {\n onClosed(true, sets, walkover);\n setSets([\n { firstPlayer: 0, secondPlayer: 0 },\n { firstPlayer: 0, secondPlayer: 0 },\n { firstPlayer: 0, secondPlayer: 0 }\n ]);\n };\n\n return (\n
    \n \n Podaj wynik meczu\n
    \n \n \n \n {firstPlayer?.name} {firstPlayer?.surname} : {secondPlayer?.name} {secondPlayer?.surname}\n \n \n \n {\n walkover ? (<>Walkowera przyznajemy tylko w określonych przypadkach. Jeżeli chcesz wpisać walkowera to pierwsze skontaktuj się z nami poprzez biuro@smarttennis.pl i opisz całą sytuację.) : (<>\n \n {sets &&\n sets.map((set: Set, i: number) => (\n \n \n {i + 1}. SET\n \n {\n setSets([...update(i, { ...s }, sets)]);\n }}\n >\n \n ))}\n \n )\n }\n \n \n handleWalkover(e.target.checked)}>{\" \"}Walkover\n \n \n
    \n \n \n handleSubmit()}\n variant=\"contained\"\n color=\"primary\"\n >\n Zapisz\n \n \n
    \n
    \n );\n};\n\nexport default TournamentMatchResultDialog;\n","import React from \"react\";\nimport { withRouter, match } from \"react-router-dom\";\nimport { connect } from \"react-redux\";\nimport { Dispatch } from \"redux\";\nimport { IconButton, Tooltip, Button, Popover } from \"@material-ui/core\";\nimport CheckIcon from \"@material-ui/icons/Check\";\nimport ClearIcon from \"@material-ui/icons/Clear\";\nimport PostAddIcon from \"@material-ui/icons/PostAdd\";\nimport ChevronLeftIcon from '@material-ui/icons/ChevronLeft';\nimport PermContactCalendarIcon from \"@material-ui/icons/PermContactCalendar\";\nimport { useAuth0 } from \"@auth0/auth0-react\";\nimport { Data, isLoaded } from \"../../../framework/data\";\nimport { TournamentDetails } from \"../../../store/tournaments/models\";\nimport { Player } from \"../../../store/players/models\";\nimport { Club } from \"../../../store/clubs/models\";\nimport { Set, MatchHeader, MatchStatus } from \"../../../store/matches/models\";\nimport MatchResultDialog from \"../../matches/MatchResultDialog\";\nimport MatchesTable from \"../../matches/MatchesTable\";\nimport { currentPlayer } from \"../../../store/players/selectors\";\nimport { loadTournamentDetails } from \"../../../store/tournaments/actions\";\nimport { getPlayersMatches, getPlayersTournamentMatches, confirmTournamentMatch, cancelTournamentMatch, submitTournamentMatchResult } from \"../../../store/matches/actions\";\nimport { selectTournamentDetails } from \"../../../store/tournaments/selectors\";\nimport { AppState } from \"../../../store/reducer\";\nimport TournamentMatchResultDialog from \"./TournamentMatchResultDialog\";\n\ninterface MyTournamentMatchesPageProps {\n tournament: Data;\n player: Data;\n loadTournamentDetails: (year: string, id: string, token: string) => void;\n loadPlayersMatches: (\n year: string,\n id: string,\n skip: number,\n take: number,\n token: string\n ) => void;\n match: match<{ year: string; id: string }>;\n matches: Data;\n confirmMatch: (\n match: MatchHeader,\n tournament: TournamentDetails,\n skip: number,\n take: number,\n token: string\n ) => void;\n cancelMatch: (\n match: MatchHeader,\n tournament: TournamentDetails,\n skip: number,\n take: number,\n token: string\n ) => void;\n submitResult: (\n match: MatchHeader,\n tournament: TournamentDetails,\n sets: Set[],\n walkover: boolean,\n skip: number,\n take: number,\n token: string\n ) => void;\n}\n\nconst MyMatchesPage: React.FC = ({\n tournament,\n player,\n loadTournamentDetails,\n match,\n loadPlayersMatches,\n matches,\n confirmMatch,\n cancelMatch,\n submitResult}) => {\n const { getAccessTokenSilently } = useAuth0();\n\n const [page, setPage] = React.useState();\n const [pageSize, setPageSize] = React.useState();\n\n const [matchResultDialogOpen, setMatchResultDialogOpen] = React.useState<\n boolean\n >(false);\n const [currentMatch, setCurrentMatch] = React.useState();\n\n const handleMatchResult = async (success: boolean, sets: Set[], walkover: boolean) => {\n if (success && tournament.type === \"LOADED\" && currentMatch) {\n const token = await getAccessTokenSilently();\n submitResult(\n currentMatch,\n tournament.value,\n sets,\n walkover,\n (page || 0) * (pageSize || 25),\n pageSize || 25,\n token\n );\n }\n setMatchResultDialogOpen(false);\n };\n\n const handleHelpRequested = () => {\n window.location.assign(`mailto:support@smarttennis.pl?subject=Wynik%20meczu%20${currentMatch?.id}&body=Proszę%20podać%20wynik%20meczu`);\n }\n\n React.useEffect(() => {\n var id = match.params.id;\n var year = match.params.year;\n\n if (!isLoaded(tournament)) {\n getAccessTokenSilently().then((token: string) => {\n loadTournamentDetails(year, id, token);\n })\n }\n\n if (tournament.type === \"LOADED\" && player.type === \"LOADED\") {\n getAccessTokenSilently().then((token: string) => {\n loadPlayersMatches(tournament.value.year, tournament.value.id, 0, 25, token);\n });\n }\n }, [\n match.params.id,\n match.params.year,\n loadTournamentDetails,\n tournament,\n loadPlayersMatches\n ]);\n\n return (\n <>\n \n {matches.type === \"LOADED\" &&\n tournament.type === \"LOADED\" &&\n player.type === \"LOADED\" ? (\n <>\n handleMatchResult(success, sets, walkover)}\n >\n {\n const token = await getAccessTokenSilently();\n const skip = page * pageSize;\n const take = pageSize;\n loadPlayersMatches(\n tournament.value.year,\n tournament.value.id,\n skip,\n take,\n token\n );\n setPage(page);\n setPageSize(pageSize);\n }}\n page={page || 0}\n pageSize={pageSize || 25}\n actions={m => {\n const firstAction =\n m.status === MatchStatus.New &&\n m.createdBy &&\n m.createdBy.id !== player.value.id &&\n (m.firstPlayer.id === player.value.id ||\n m.secondPlayer.id === player.value.id) ? (\n \n {\n const token = await getAccessTokenSilently();\n confirmMatch(\n m,\n tournament.value,\n (page || 0) * (pageSize || 25),\n pageSize || 25,\n token\n );\n }}\n >\n \n \n \n ) : undefined;\n\n const secondAction =\n (m.status === MatchStatus.New || m.status === MatchStatus.Confirmed) &&\n (m.firstPlayer.id === player.value.id ||\n m.secondPlayer.id === player.value.id) ? (\n \n {\n const token = await getAccessTokenSilently();\n cancelMatch(\n m,\n tournament.value,\n (page || 0) * (pageSize || 25),\n pageSize || 25,\n token\n );\n }}\n >\n \n \n \n ) : undefined;\n\n const thirdAction =\n m.status === MatchStatus.Confirmed && m.date <= new Date() &&\n (m.firstPlayer.id === player.value.id ||\n m.secondPlayer.id === player.value.id) ? (\n \n {\n setCurrentMatch(m);\n setMatchResultDialogOpen(true);\n }}\n >\n \n \n \n ) : undefined;\n\n let actions:JSX.Element[] = [];\n if(!!firstAction) {\n actions = [...actions, firstAction];\n }\n if(!!secondAction) {\n actions = [...actions, secondAction];\n }\n if(!!thirdAction) {\n actions = [...actions, thirdAction];\n }\n \n return <>{actions};\n }}\n >\n \n ) : (\n <>\n )}\n\n \n );\n};\n\nconst mapStateToProps = (state: AppState) => {\n return {\n tournament: selectTournamentDetails(state),\n player: currentPlayer(state),\n matches: state.matches.currentTournamentPlayersMatchesPage, // currentTournamentPlayersMatches\n clubs: state.clubs.clubs\n };\n};\n\nconst mapDispatchToProps = (dispatch: Dispatch) => {\n return {\n loadTournamentDetails: (year: string, id: string, token: string) =>\n dispatch(loadTournamentDetails({ year, id, token })),\n loadPlayersMatches: (\n year: string,\n id: string,\n skip: number,\n take: number,\n token: string\n ) => dispatch(getPlayersTournamentMatches({ year, id, skip, take, token })),\n confirmMatch: (\n match: MatchHeader,\n tournament: TournamentDetails,\n skip: number,\n take: number,\n token: string\n ) => \n dispatch(\n confirmTournamentMatch({\n skip,\n take,\n token,\n matchId: match.id,\n tournamentId: tournament.id,\n year: tournament.year\n })\n ),\n cancelMatch: (\n match: MatchHeader,\n tournament: TournamentDetails,\n skip: number,\n take: number,\n token: string\n ) =>\n dispatch(\n cancelTournamentMatch({\n skip,\n take,\n token,\n matchId: match.id,\n tournamentId: tournament.id,\n year: tournament.year\n })\n ),\n submitResult: (\n match: MatchHeader,\n tournament: TournamentDetails,\n sets: Set[],\n walkover: boolean,\n skip: number,\n take: number,\n token: string\n ) =>\n dispatch(\n submitTournamentMatchResult({\n tournamentId: tournament.id,\n matchId: match.id,\n sets,\n walkover,\n skip,\n take,\n token,\n year: tournament.year\n })\n )\n };\n};\n\nexport default withRouter(\n connect(mapStateToProps, mapDispatchToProps)(MyMatchesPage)\n);\n","import React from \"react\";\nimport { withRouter, match } from \"react-router-dom\";\nimport { connect } from \"react-redux\";\nimport { Dispatch } from \"redux\";\nimport { Button } from \"@material-ui/core\";\nimport ChevronLeftIcon from '@material-ui/icons/ChevronLeft';\nimport { Data, isLoaded } from \"../../../framework/data\";\nimport { MatchHeader } from \"../../../store/matches/models\";\nimport MatchesTable from \"../../matches/MatchesTable\";\nimport { AppState } from \"../../../store/reducer\";\nimport { TournamentDetails } from \"../../../store/tournaments/models\";\nimport { selectTournamentDetails } from \"../../../store/tournaments/selectors\";\nimport { loadTournamentDetails } from \"../../../store/tournaments/actions\";\nimport { useAuth0 } from \"@auth0/auth0-react\";\nimport { getTournamentMatches } from \"../../../store/matches/actions\";\n\ninterface AllTournamentMatchesPageProps {\n tournament: Data;\n matches: Data;\n match: match<{ year: string; id: string }>;\n loadTournamentDetails: (year: string, id: string, token: string) => void;\n loadTournamentMatches: (\n year: string,\n id: string,\n skip: number,\n take: number\n ) => void;\n}\n\nconst AllTournamentMatchesPage: React.FC = ({\n tournament,\n loadTournamentDetails,\n loadTournamentMatches,\n matches,\n match\n}) => {\n const [page, setPage] = React.useState();\n const [pageSize, setPageSize] = React.useState();\n\n React.useEffect(() => {\n loadTournamentMatches(match.params.year, match.params.id, 0, 25);\n }, [match]);\n\n return (\n <>\n {matches.type === \"LOADED\" ? (\n {\n const skip = page * pageSize;\n const take = pageSize;\n loadTournamentMatches(\n match.params.year,\n match.params.id,\n skip,\n take\n );\n setPage(page);\n setPageSize(pageSize);\n }}\n page={page || 0}\n pageSize={pageSize || 25}\n >\n ) : (\n <>\n )}\n \n \n );\n}\n\nconst mapStateToProps = (state: AppState) => {\n return {\n tournament: selectTournamentDetails(state),\n matches: state.matches.currentTournamentAllMatchesPage\n };\n };\n\n const mapDispatchToProps = (dispatch: Dispatch) => {\n return {\n loadTournamentDetails: (year: string, id: string, token: string) => dispatch(loadTournamentDetails({ year, id, token })),\n loadTournamentMatches: (\n year: string,\n id: string,\n skip: number,\n take: number,\n ) => dispatch(getTournamentMatches({ year, id, skip, take })),\n \n };\n };\n\nexport default withRouter(\n connect(mapStateToProps, mapDispatchToProps)(AllTournamentMatchesPage)\n );","import { Button, ExpansionPanel, ExpansionPanelDetails, ExpansionPanelSummary, Grid, Hidden, Typography, useMediaQuery, useTheme, Chip } from \"@material-ui/core\";\nimport { TrainingHeader } from \"../../store/trainings/models\";\nimport React from \"react\";\nimport ExpandMoreIcon from \"@material-ui/icons/ExpandMore\";\nimport InfoIcon from '@material-ui/icons/Info';\nimport { Link } from \"react-router-dom\";\nimport DateTimeView from \"../../framework/components/DateTimeView\";\nimport DescriptionIcon from '@material-ui/icons/Description';\n\ninterface TrainingHeaderProps {\n training: TrainingHeader;\n}\n\nconst TrainingHeaderComponent: React.FC = ({\n training\n}) => {\n\n const theme = useTheme();\n const isSmall = useMediaQuery(theme.breakpoints.down('sm'));\n\n return (\n \n }>\n \n \n \n {training.name}\n \n \n \n \n \n <>Uczestnicy: {training.participantsCount}{\" / \"}{training.maxPlayers}\n\n \n \n \n \n \n \n \n\n \n \n \n \n \n {\n training.trainers.length === 1 ? (\n <>\n \n Trener\n \n \n {training.trainers[0].name}{\" \"}{training.trainers[0].surname}\n \n \n ) : (\n <>\n \n Trenerzy\n \n \n
      \n {\n training.trainers.map(t => (
    • {t.name} {t.surname}
    • ))\n }\n
    \n
    \n \n )\n }\n \n
    \n \n \n Czas\n \n \n - \n \n \n \n \n Cena\n \n \n {training.basePrice} PLN\n \n \n \n \n Opis\n \n {training.description}\n \n \n \n Klub\n \n \n \n \n
    \n
    \n
    \n );\n};\n\nexport default TrainingHeaderComponent;\n","import React from \"react\";\nimport { TrainingHeader } from \"../../store/trainings/models\";\nimport TrainingHeaderComponent from \"./TrainingHeader\";\n\n\ninterface ITrainingListProps {\n trainings: TrainingHeader[];\n}\n\nconst TrainingsList: React.FC = ({ trainings }) => {\n return (<> {trainings.sort((l1, l2) => (l2.startDate as any) - (l1.startDate as any)).map(l => ())} )\n};\n\nexport default TrainingsList;","import React from \"react\";\nimport { Collapse, IconButton, Typography } from \"@material-ui/core\";\nimport ExploreIcon from '@material-ui/icons/Explore';\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\nimport ExpandLessIcon from '@material-ui/icons/ExpandLess';\nimport TrainingList from \"./TrainingList\";\nimport { TrainingHeader } from \"../../store/trainings/models\";\n\ninterface TrainingCityGroupProps {\n city: string;\n trainings: TrainingHeader[];\n}\n\nconst TrainingCityGroup: React.FC = ({ city, trainings }) => {\n\n const [isOpen, open] = React.useState();\n\n const season = trainings[0].year;\n\n React.useEffect(() => {\n\n try {\n const state = window.localStorage.getItem(`trainings--${season}---${city}`);\n if (state === 'open') {\n open(true);\n return;\n }\n\n if (window.location.hash.includes(`hint=${encodeURI(city)}`)) {\n open(true);\n }\n\n\n } catch (e) {\n console.error(e);\n }\n\n\n }, [city, season]);\n\n const setOpen = React.useCallback((o: boolean) => {\n\n open(o);\n\n try {\n\n if (!!o) {\n window.localStorage.setItem(`trainings--${season}---${city}`, 'open');\n } else {\n window.localStorage.setItem(`trainings--${season}---${city}`, 'closed');\n }\n\n } catch (e) {\n console.error(e);\n }\n\n }, [city, season]);\n\n return
    {city} setOpen(!isOpen)}>{isOpen ? : }
    \n};\n\nexport default TrainingCityGroup;","import { CircularProgress } from \"@material-ui/core\";\nimport { Data } from \"../../framework/data\";\nimport { TrainingHeader } from \"../../store/trainings/models\";\nimport TrainingCityGroup from \"./TrainingCityGroup\";\nimport React from \"react\";\n\ninterface ITrainingGroupsProps {\n groups: Data<{[city:string]:TrainingHeader[]}>\n}\n\nconst TrainingGroups: React.FC = ({ groups }) => {\n\n switch(groups.type) {\n case \"LOADED\": {\n\n const toRender = Object.entries(groups.value).map(([city, trainings]) => ());\n\n return (
    {toRender}
    )\n }\n case \"LOADING\": {\n return (
    )\n }\n default: {\n return(
    );\n } \n }\n}\n\nexport default TrainingGroups;","import { groupBy } from \"ramda\";\nimport { dataOf } from \"../../framework/data\";\nimport { AppState } from \"../reducer\";\n\nexport const selectTrainings = (state: AppState) => state.trainings.items.type === \"LOADED\" ? dataOf(groupBy(x => x.city, state.trainings.items.value)) : state.trainings.items;\nexport const selectTrainingDetails = (state: AppState) => state.trainings.details;\n\nexport const selectTrainingsSubscribedTo = (state: AppState) => \n state.trainings.items.type === \"LOADED\"\n ? dataOf(state.trainings.items.value.filter(x => x.isCurrentUserAssigned).map(x => x.id))\n : state.trainings.items;","import React from \"react\";\nimport { match, withRouter } from \"react-router-dom\";\nimport { Data } from \"../../framework/data\";\nimport { Player } from \"../../store/players/models\";\nimport { AppState } from \"../../store/reducer\";\nimport { currentPlayer } from \"../../store/players/selectors\";\nimport { Dispatch } from \"redux\";\nimport { connect } from \"react-redux\";\nimport { Badge, Button, Grid, MenuItem, Select, Typography, useMediaQuery, useTheme } from \"@material-ui/core\";\nimport { ToggleButton, ToggleButtonGroup } from \"@material-ui/lab\";\nimport TrainingGroups from \"./TrainingGroups\";\nimport { useAuth0 } from \"@auth0/auth0-react\";\nimport { TrainingHeader } from \"../../store/trainings/models\";\nimport { selectTrainings } from \"../../store/trainings/selectors\";\nimport { loadTrainings } from \"../../store/trainings/actions\";\n\ninterface TrainingPageProps {\n match: match<{ year: string }>;\n trainings: Data<{ [key: string]: TrainingHeader[] }>;\n player?: Data;\n loadTrainings: (token: string, year: string) => void;\n}\n\nconst TrainingPage: React.FC = ({ trainings, player, loadTrainings, match }) => {\n\n var theme = useTheme();\n const isSmall = useMediaQuery(theme.breakpoints.down('sm'));\n\n const [availableYears, setAvailableYears] = React.useState([]);\n const [defaultSeason, setDefaultSeason] = React.useState(\"2024\");\n\n React.useEffect(() => {\n const year = new Date().getFullYear();\n\n if (year >= 2024) {\n setDefaultSeason(year.toString());\n } else {\n setDefaultSeason(\"2024\");\n }\n\n\n }, []);\n\n React.useEffect(() => {\n const initial = 2024;\n const thisYear = new Date().getFullYear();\n const toYear = thisYear >= 2024 ? thisYear : 2024;\n const years = [];\n\n for (let i = initial; i <= toYear; i++) {\n years.push(i.toString());\n }\n\n setAvailableYears(years);\n\n }, []);\n\n const season = match.params.year;\n\n const setViewedYear = React.useCallback((year: string) => window.location.assign(`/#/trainings/${year}`), []);\n\n const { getAccessTokenSilently } = useAuth0();\n\n React.useEffect(() => {\n getAccessTokenSilently().then((token) => {\n const yearToRegister = new Date().getFullYear() >= 2024 ? new Date().getFullYear().toString() : \"2024\";\n loadTrainings(token, yearToRegister);\n }).catch((reason) => {\n const yearToRegister = new Date().getFullYear() >= 2024 ? new Date().getFullYear().toString() : \"2024\";\n loadTrainings(\"\", yearToRegister);\n });\n }, [season]);\n\n return (\n \n \n \n\n \n \n Rok:\n \n \n {\n isSmall ? (\n \n ) : (\n { setViewedYear(v) }}\n >\n {availableYears.map((y, i) => (\n \n {y.replace(\"-\", \"/\")}\n {\n i === 0 && y !== defaultSeason ? (<> ) : (<>)\n }\n \n ))}\n \n )\n }\n\n \n \n \n \n );\n\n}\n\nconst mapStateToProps = (state: AppState) => {\n return {\n trainings: selectTrainings(state),\n player: currentPlayer(state)\n };\n};\n\nconst mapDispatchToProps = (dispatch: Dispatch) => {\n return {\n loadTrainings: (token: string, year: string) => dispatch(loadTrainings({ year, token }))\n }\n};\n\nexport default withRouter(connect(mapStateToProps, mapDispatchToProps)(TrainingPage));","import React from \"react\";\nimport {\n Typography,\n Grid,\n} from \"@material-ui/core\";\nimport DateView from \"../../framework/components/DateView\";\nimport { Player } from \"../../store/players/models\";\nimport { Data } from \"../../framework/data\";\nimport { Club } from \"../../store/clubs/models\";\nimport { TrainingDetails } from \"../../store/trainings/models\";\nimport LeagueRanking from \"../leagues/LeagueRanking\";\nimport { LeagueStatus } from \"../../store/leagues/models\";\n\ninterface TrainingDetailsProps {\n training: TrainingDetails;\n player?: Player;\n clubs: Data;\n}\n\nconst TrainingDetailsComponent: React.FC = ({\n training,\n player,\n clubs\n}) => {\n return (\n <>\n \n {training.city} - {training.name}\n \n\n
    \n\n \n \n \n Lista uczestników\n \n \n \n\n ({ ...x, canIPlay: true }))}\n leagueStatus={LeagueStatus.InProgress}\n onRegisterMatchResultWithPlayer={() => { }}\n currentPlayer={player}>\n\n
    \n
    \n\n \n \n \n Lista rezerwowa\n \n \n \n\n ({ ...x, canIPlay: true }))}\n leagueStatus={LeagueStatus.InProgress}\n onRegisterMatchResultWithPlayer={() => { }}\n currentPlayer={player}>\n
    \n
    \n \n Dane treningu\n \n \n \n \n Opis\n \n {training.description}\n \n \n\n \n \n \n Czas trwania:{\" \"}\n -{\" \"}\n \n \n \n \n \n Uczestników: {training.subscribedPlayers.length} / {training.maxPlayers}\n \n \n \n \n Cena: {training.basePrice} PLN\n \n \n \n\n \n \n \n\n \n
    \n );\n};\n\nexport default TrainingDetailsComponent;","import React from \"react\";\nimport { AppState } from \"../../store/reducer\";\nimport { currentPlayer } from \"../../store/players/selectors\";\nimport { Dispatch } from \"redux\";\nimport { connect } from \"react-redux\";\nimport { withRouter, match } from \"react-router-dom\";\nimport { Data } from \"../../framework/data\";\nimport { Player } from \"../../store/players/models\";\nimport { CircularProgress } from \"@material-ui/core\";\nimport { Club } from \"../../store/clubs/models\";\nimport { loadClubsInProvince } from \"../../store/clubs/actions\";\nimport { TrainingDetails } from \"../../store/trainings/models\";\nimport TrainingDetailsComponent from \"./TrainingDetails\";\nimport { loadTrainingDetails } from \"../../store/trainings/actions\";\nimport { useAuth0 } from \"@auth0/auth0-react\";\nimport { selectTrainingDetails } from \"../../store/trainings/selectors\";\n\ninterface TrainingDetailsPageProps {\n player: Data;\n details: Data;\n match: match;\n loadTrainingDetails: (year: string, id: string, token: string) => void;\n clubs: Data;\n loadClubs: () => void;\n}\n\nconst TrainingDetailsPage: React.FC = ({\n details,\n match,\n loadTrainingDetails,\n player,\n clubs,\n loadClubs\n}) => {\n\n const { getAccessTokenSilently } = useAuth0();\n\n React.useEffect(() => {\n var id = (match.params as any).id;\n var year = (match.params as any).year;\n\n getAccessTokenSilently().then((token) => {\n loadTrainingDetails(year, id, token);\n }).catch(() => {\n loadTrainingDetails(year, id, \"\");\n });\n\n }, [match.params, loadTrainingDetails]);\n\n React.useEffect(() => {\n if (clubs.type === \"NOT_STARTED\" && loadClubs) {\n loadClubs();\n }\n }, []);\n\n const unsafePlayer =\n player && player.type === \"LOADED\" ? player.value : undefined;\n\n switch (details.type) {\n case \"LOADED\": {\n return (\n \n );\n }\n case \"LOADING\": {\n return (\n \n \n \n );\n }\n default: {\n return
    ;\n }\n }\n};\n\nconst mapStateToProps = (state: AppState) => {\n return {\n details: selectTrainingDetails(state),\n player: currentPlayer(state),\n newestMatches: state.matches.currentLeagueNewestMatches,\n clubs: state.clubs.clubs\n };\n};\n\nconst mapDispatchToProps = (dispatch: Dispatch) => {\n return {\n loadTrainingDetails: (year: string, id: string, token: string) =>\n dispatch(loadTrainingDetails({ year, id, token })),\n loadClubs: () => dispatch(loadClubsInProvince())\n };\n};\n\nexport default withRouter(\n connect(mapStateToProps, mapDispatchToProps)(TrainingDetailsPage)\n);\n","import React from \"react\";\nimport { RegisterToTournament, TournamentHeader } from \"../../../store/tournaments/models\";\nimport { Data } from \"../../../framework/data\";\nimport { Button, CircularProgress, Divider, Grid, Typography } from \"@material-ui/core\";\nimport { connect } from \"react-redux\";\nimport { AppState } from \"../../../store/reducer\";\nimport { Alert } from \"@material-ui/lab\";\nimport { TrainingHeader, RegisterToTraining } from \"../../../store/trainings/models\";\n\ninterface ITrainingRegistrationConfirmation {\n trainings: Data;\n trainingToRegister: RegisterToTraining;\n onProceed: () => void;\n onMoveBack: () => void;\n}\n\nconst TrainingRegistrationConfirmation: React.FC = ({ trainings, trainingToRegister, onMoveBack, onProceed }) => {\n if (trainings.type === \"LOADED\" && trainingToRegister?.training?.id) {\n \n const selectedTraining = trainings.value.find(x => x.id === trainingToRegister.training.id && x.year === trainingToRegister.training.season)!;\n\n return (<>\n \n \n {selectedTraining.name}\n {selectedTraining.description}\n \n {selectedTraining.paymentDescription}\n \n \n \n \n \n \n );\n } else {\n return \n }\n};\n\nconst mapStateToProps = (state: AppState) => ({\n trainings: state.trainings.items,\n trainingToRegister: state.registration.trainingSelection\n});\n\n\nexport default connect(mapStateToProps)(TrainingRegistrationConfirmation);\n","import React from \"react\";\nimport { Dispatch } from \"redux\";\nimport { connect } from \"react-redux\";\nimport { useAuth0 } from \"@auth0/auth0-react\";\nimport { Grid, Typography } from \"@material-ui/core\";\nimport { Player } from \"../../../store/players/models\";\nimport { AppState } from \"../../../store/reducer\";\nimport { State as RegistrationState } from \"../../../store/registration/reducer\";\nimport { RegisterToTraining } from \"../../../store/trainings/models\";\nimport { registerToTraining } from \"../../../store/trainings/actions\";\n\ninterface TrainingRegistrationProgressProps {\n startRegistration: (target: RegisterToTraining, playerData: Player, token: string) => void;\n registration: RegistrationState;\n}\n\nconst TrainingRegistrationProgress: React.FC = ({registration, startRegistration}) => {\n\n const { getAccessTokenSilently } = useAuth0();\n\n React.useEffect(() => {\n getAccessTokenSilently().then(token => {\n startRegistration(\n registration.trainingSelection, \n registration.updatedPlayer!,\n token);\n }).catch((reason: any) => {\n console.log(reason);\n })\n\n }, []);\n\n return <>\n \n \n \n {registration.registrationMessage}\n \n \n \n \n\n};\n\nconst mapStateToProps = (state: AppState) => ({\n registration : state.registration\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) => ({\n startRegistration: (target: RegisterToTraining, playerData: Player, token: string) => dispatch(registerToTraining({\n target,\n playerData,\n token\n }))\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(TrainingRegistrationProgress);","import React from \"react\";\nimport PlayerStep from \"../../registration/PlayerStep\";\nimport { Step, StepButton, Stepper } from \"@material-ui/core\";\nimport TrainingRegistrationConfirmation from \"./TrainingRegistrationConfirmation\";\nimport TrainingRegistrationProgress from \"./TrainingRegistrationProgress\";\n\nconst getSteps = () => {\n return [\n \"Profil zawodnika\",\n \"Informacje dla zawodników\",\n \"Zakończenie\"\n ]\n}\n\n\nconst RegistrationWizard: React.FC = () => {\n\n const [activeStep, setActiveStep] = React.useState(0);\n const steps = getSteps();\n\n const getStepContent = (idx: number) => {\n switch(idx) {\n case 0: {\n return setActiveStep(activeStep+1)} onMoveBack={() => setActiveStep(activeStep-1)} />\n }\n case 1: {\n return setActiveStep(activeStep+1)} onMoveBack={() => setActiveStep(activeStep-1)}>\n }\n case 2: {\n return \n }\n }\n }\n\n return <>\n \n {\n steps.map((step) => (\n \n \n {step}\n \n \n ))\n }\n \n {\n getStepContent(activeStep)\n }\n \n};\n\nexport default RegistrationWizard;","import { useAuth0 } from \"@auth0/auth0-react\";\nimport React from \"react\";\nimport { Alert } from \"@material-ui/lab\";\nimport { Link } from \"@material-ui/core\";\nimport { AppState } from \"../../../store/reducer\";\nimport { connect } from \"react-redux\";\nimport TrainingRegistrationWizard from \"./TrainingRegistrationWizard\";\nimport { withRouter, match } from \"react-router-dom\";\nimport { Dispatch } from \"redux\";\nimport { loadTrainings } from \"../../../store/trainings/actions\";\nimport { setTrainingToRegister as setTrainingToRegisterAction } from \"../../../store/registration/actions\"\nimport { RegisterToTraining } from \"../../../store/trainings/models\";\n\nexport interface TrainingRegistrationPageProps {\n match: match<{ id: string, year: string }>;\n loadTrainings: (token: string, season: string) => void;\n setTrainingToRegister: (x: RegisterToTraining) => void;\n}\n\nconst TrainingRegistrationPage: React.FC = ({ match, loadTrainings, setTrainingToRegister }) => {\n\n const { isAuthenticated, loginWithRedirect, getAccessTokenSilently } = useAuth0();\n\n React.useEffect(() => {\n\n const trainingId = match.params.id;\n const year = match.params.year;\n\n getAccessTokenSilently().then(x => {\n loadTrainings(x, year);\n });\n\n setTrainingToRegister({\n training: {\n id: trainingId,\n season: year\n }\n });\n\n }, []);\n\n return (<>\n {\n !isAuthenticated ? (\n \n
    \n loginWithRedirect({\n redirectUri: window.location.href, appState: {\n targetUrl: window.location.hash\n }\n })}>Kliknij tutaj aby zalogować się lub założyć konto w celu rozpoczęcia rejestracji.\n
    \n
    \n ) : (\n \n )\n }\n );\n};\n\nconst mapStateToProps = (state: AppState) => ({\n});\n\nconst mapDispatchToProps = (dispatch: Dispatch) => ({\n loadTrainings: (token: string, season: string) => dispatch(loadTrainings({ year: season, token })),\n setTrainingToRegister: (x: RegisterToTraining) => dispatch(setTrainingToRegisterAction(x))\n});\n\n\nexport default withRouter(connect(mapStateToProps, mapDispatchToProps)(TrainingRegistrationPage));","import React from \"react\";\nimport TopBar from \"./components/shell/TopBar\";\nimport HeroImage from \"./components/shell/HeroImage\";\nimport NavBar, { NavBarLink } from \"./components/shell/NavBar\";\nimport PageWrapper from \"./components/shell/PageWrapper\";\n\nimport {\n ThemeProvider,\n Avatar,\n Typography,\n AppBar,\n Toolbar,\n Grid,\n Link,\n Badge\n} from \"@material-ui/core\";\nimport theme from \"./utils/theme\";\n\nimport { HashRouter as Router, Route, Redirect } from \"react-router-dom\";\n\nimport LeaguesPage from \"./components/leagues/LeaguesPage\";\n\nimport { Provider } from \"react-redux\";\nimport store from \"./store/store\";\n\nimport FormatListNumberedIcon from \"@material-ui/icons/FormatListNumbered\";\nimport FeaturedPlayListIcon from \"@material-ui/icons/FeaturedPlayList\";\nimport AnnouncementIcon from \"@material-ui/icons/Announcement\";\nimport Page from \"./components/shell/Page\";\nimport \"date-fns\";\nimport plLocale from \"date-fns/locale/pl\";\nimport DateFnsUtils from \"@date-io/date-fns\";\nimport { MuiPickersUtilsProvider } from \"@material-ui/pickers\";\nimport ErrorNotifier from \"./components/shell/ErrorNotifier\";\nimport LeagueDetailsPage from \"./components/leagues/LeagueDetailsPage\";\nimport ClubsPage from \"./components/clubs/ClubsPage\";\nimport AccountBalanceWalletIcon from \"@material-ui/icons/AccountBalanceWallet\";\nimport AssignmentIndIcon from \"@material-ui/icons/AssignmentInd\";\nimport InfoIcon from \"@material-ui/icons/Info\";\nimport StoreIcon from \"@material-ui/icons/Store\";\nimport DesktopWindowsIcon from '@material-ui/icons/DesktopWindows';\nimport EqualizerIcon from '@material-ui/icons/Equalizer';\nimport EventNoteIcon from '@material-ui/icons/EventNote';\nimport StarIcon from '@material-ui/icons/Star';\nimport BathtubIcon from '@material-ui/icons/Bathtub';\nimport CardGiftcardIcon from '@material-ui/icons/CardGiftcard';\nimport EventsIcon from '@material-ui/icons/EmojiEvents';\nimport SchoolIcon from '@material-ui/icons/School';\n\nimport \"leaflet/dist/leaflet.css\";\nimport MyMatchesPage from \"./components/matches/MyMatchesPage\";\nimport AllMatchesPage from \"./components/matches/AllMatchesPage\";\nimport MessageNotifier from \"./components/shell/MessageNotifier\";\nimport PaymentsPage from \"./components/payments/PaymentsPage\";\nimport AboutPage from \"./components/static-pages/AboutPage\";\nimport CookiesPolicyPage from \"./components/static-pages/CookiesPolicyPage\";\nimport PrivacyPolicyPage from \"./components/static-pages/PrivacyPolicyPage\";\nimport OnboardingDialog from \"./components/shell/onboarding/OnboardingDialog\";\nimport NewsPage from \"./components/static-pages/NewsPage\";\nimport ShopPage from \"./components/shop/ShopPage\";\nimport ShoppingOrdersPage from \"./components/shop/ShoppingOrdersPage\";\nimport DesktopPage from \"./components/desktop/DesktopPage\";\nimport StatsPage from \"./components/stats/StatsPage\";\nimport MatchOffersPage from \"./components/match-offers/MatchOffersPage\";\nimport DescriptionIcon from '@material-ui/icons/Description';\nimport RegistrationPage from \"./components/registration/RegistrationPage\";\nimport RankingPage from \"./components/elo/RankingPage\";\nimport AdminAllPlayersPage from \"./components/players/AdminAllPlayersPage\";\nimport { getConfig } from \"./config/configuration\";\nimport SponsorsPage from \"./components/sponsors/SponsorsPage\";\nimport TournamentsPage from \"./components/tournaments/TournamentsPage\";\nimport TournamentRegistrationPage from \"./components/tournaments/registration/TournamentRegistrationPage\";\nimport TournamentDetailsPage from \"./components/tournaments/TournamentDetailsPage\";\nimport MyTournamentMatchesPage from \"./components/tournaments/matches/MyTournamentMatchesPage\";\nimport AllTournamentMatchesPage from \"./components/tournaments/matches/AllTournamentMatchesPage\";\nimport TrainingPage from \"./components/trainings/TrainingPage\";\nimport TrainingDetailsPage from \"./components/trainings/TrainingDetailsPage\";\nimport TrainingRegistrationPage from \"./components/trainings/registration/TrainingRegistrationPage\";\n\nconst links: (season: string, year: string) => NavBarLink[] = (season: string, year: string) => [\n {\n label: \"Pulpit\",\n path: \"/desktop\"\n },\n {\n label: \"Ligi\",\n path: `/leagues/${season}`,\n },\n {\n label: \"Turnieje\",\n path: `/tournaments/${year}`,\n promote: true\n },\n {\n label: \"Ranking\",\n path: \"/ranking\"\n },\n {\n label: \"Kluby\",\n path: \"/clubs\",\n },\n {\n label: \"Sklep\",\n path: \"/shop\"\n },\n {\n label: \"Sponsorzy\",\n path: \"/sponsors\"\n },\n {\n label: \"O nas\",\n path: \"https://smarttennis.pl/\",\n isExternal: true\n },\n];\n\nconst App: React.FC = () => {\n\n const [defaultSeason, setDefaultSeason] = React.useState();\n\n React.useEffect(() => {\n getConfig().then(c => {\n setDefaultSeason(c.defaultSeason);\n });\n }, [])\n\n\n return (\n \n \n \n <>\n \n \n \n \n = 2024 ? new Date().getFullYear().toString() : \"2024\")}>\n \n \n \n Ranking ELO}\n avatar={\n \n \n \n }>\n \n \n \n \n Zapisy na turniej}\n avatar={\n \n \n \n }>\n \n \n \n \n Zapisy do ligi}\n avatar={\n \n \n \n }>\n \n \n \n \n Giełda meczów }\n avatar={\n \n \n \n }\n >\n \n \n \n \n Statystyki }\n avatar={\n \n \n \n }\n >\n \n \n \n \n Pulpit zawodnika }\n avatar={\n \n \n \n }\n >\n \n \n \n \n Sponsorzy}\n avatar={\n \n \n \n }>\n \n \n \n \n SmartShop - Moje zamówienia}\n avatar={\n \n \n \n }\n >\n \n \n \n \n SmartShop}\n avatar={\n \n \n \n }\n >\n \n \n \n \n Moje mecze}\n avatar={\n \n \n \n }\n >\n \n \n \n \n Mecze w lidze}\n avatar={\n \n \n \n }\n >\n \n \n \n \n Szczegóły ligi}\n avatar={\n \n \n \n }\n >\n \n \n \n \n Ligi}\n avatar={\n \n \n \n }\n >\n \n \n \n \n Kluby}\n avatar={\n \n \n \n }\n >\n \n \n \n \n Moje płatności}\n avatar={\n \n \n \n }\n >\n \n \n \n \n Moje mecze}\n avatar={\n \n \n \n }\n >\n \n \n \n \n Mecze w turnieju}\n avatar={\n \n \n \n }\n >\n \n \n \n \n Szczegóły turnieju}\n avatar={\n \n \n \n }\n >\n \n \n \n \n Turnieje}\n avatar={\n \n \n \n }\n >\n \n \n \n \n Zapisy na trening}\n avatar={\n \n \n \n }\n >\n \n \n \n \n Szczegóły treningu}\n avatar={\n \n \n \n }\n >\n \n \n \n \n Treningi\n }\n avatar={\n \n \n \n }>\n \n \n \n \n Aktualności}\n avatar={\n \n \n \n }\n >\n \n \n \n \n O nas}\n avatar={\n \n \n \n }\n >\n \n \n \n \n Polityka cookies\n }\n avatar={\n \n \n \n }\n >\n \n \n \n \n Polityka prywatności\n }\n avatar={\n \n \n \n }\n >\n \n \n \n \n Wszyscy gracze\n }\n avatar={\n \n \n \n }\n >\n \n \n \n \n \n \n \n \n \n \n \n © Copyright {new Date().getFullYear()} by\n SmartTennis.pl\n \n \n \n Polityka cookies\n \n  | \n \n Polityka prywatności\n \n  | \n \n Regulamin\n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default App;\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.0/8 are considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\ntype Config = {\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: Config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(\n process.env.PUBLIC_URL,\n window.location.href\n );\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl: string, config?: Config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { 'Service-Worker': 'script' }\n })\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","import { createBrowserHistory } from \"history\";\n\nexport default createBrowserHistory();","import React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport \"./index.css\";\nimport App from \"./App\";\nimport * as serviceWorker from \"./serviceWorker\";\nimport history from \"./utils/history\";\nimport { getConfig } from \"./config/configuration\";\nimport logger from \"./framework/logger\";\nimport ReactGA from \"react-ga\";\nimport { Auth0Provider } from \"@auth0/auth0-react\";\n\ngetConfig().then((conf) => {\n if (conf.aiKey) logger.initialize(conf.aiKey);\n\n if (conf.gaKey) ReactGA.initialize(conf.gaKey);\n});\n\nconst search = (window.location.search ?? \"\").replace(\"?\", \"\");\nif (search) {\n const query: any = search\n .split(\"&\")\n .map((q) => q.split(\"=\"))\n .reduce((p, c) => ({ ...p, [c[0]]: c[1] }), {});\n\n if(query[\"referral\"]) {\n window.localStorage.setItem(\"referral\", query[\"referral\"]);\n }\n}\n\nconst onRedirectCallback = (appState: any) => {\n history.push(\n appState && appState.targetUrl\n ? appState.targetUrl\n : window.location.pathname\n );\n};\n\nReactDOM.render(\n \n \n ,\n document.getElementById(\"root\")\n);\n\n/*ReactDOM.render(\n \n, document.getElementById('root'));*/\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n\n/*const appInsights = new ApplicationInsights({\n config: {\n instrumentationKey: '55c3a912-66c4-4d6f-892f-582784c9c6d6'\n }\n}).loadAppInsights();\n\nappInsights.trackEvent({ name: 'My event', properties: { value: 1, x: 'Test' } });\nappInsights.trackException({ error: new Error('Shit happened'), id: 'my-id', severityLevel: 1, properties: { value: 2, x: 'Error' } });\nappInsights.trackPageView({ isLoggedIn: false, name: 'My page', pageType: 'Root', uri: window.location.href, properties: { value: 3, x: 'Page view' }});\nappInsights.trackTrace({ message: 'Trace message', properties: { value: 4, x: 'Trace' } });\n*/\n//fetch('https://tennis-league-test.azurewebsites.net/test').then((r) => console.log(r.ok));\n\n// $env:NODE_OPTIONS = \"--openssl-legacy-provider\""],"sourceRoot":""}