{"version":3,"sources":["components/PageComponents/Modal/Modal.tsx","components/Errors/Errors.tsx","components/SignInComponents/SignInForm/SignInForm.module.css","components/PageComponents/Loading/Loading.module.css","components/BaseUIComponents/SortableTable/NewSortableTable.module.css","pages/Categories/Reports/DetailsModalStyles.ts","pages/Tutorial/Slides/SlideOne.module.scss","components/PageComponents/Modal/Modal.module.css","reducers/tableReducer.ts","components/BaseUIComponents/TabBar/TabBar.tsx","serverDetails.ts","components/FormComponents/ValidationError/ValidationError.tsx","reducers/ui.ts","reducers/PageReducers/PlayersReducer/playersReducer.ts","helpers/selectors.ts","components/WagersComponents/AllWagersTable/AllWagersTable.module.css","helpers/errors.ts","helpers/objects.ts","components/SignInComponents/SignIn/SignIn.module.css","pages/Tutorial/Slides/SideInfo.module.scss","helpers/loading.tsx","helpers/hooks.ts","helpers/time.tsx","reducers/auth.ts","components/SignInComponents/ChunkyInput/ChunkyInput.tsx","components/BaseUIComponents/SortableTable/NewColumnCustomiser.tsx","components/BaseUIComponents/SortableTable/LoadingModal.tsx","components/BaseUIComponents/SortableTable/loadingData.tsx","components/BaseUIComponents/SortableTable/SortingButton.tsx","components/BaseUIComponents/SortableTable/NewSortableTable.tsx","assets/Question.svg","components/SignInComponents/PasswordInput/PasswordInput.module.css","components/Errors/Errors.module.css","reducers/playerAccess.ts","reducers/playerSearch.ts","components/SignInComponents/SignInBox/SignInBox.tsx","pages/Categories/Reports/AccrualDetailsModal.tsx","assets/visible.svg","assets/notvisible.svg","reducers/PaymentReducers/paymentReducer.ts","i18n.ts","pages/Tutorial/Slides/SlideOne.tsx","pages/Tutorial/AnnotatedImage.tsx","pages/Tutorial/Slides/SideInfo.tsx","pages/Tutorial/Slides/SlideTwo.tsx","pages/Tutorial/Slides/SlideThree.tsx","pages/Tutorial/Slides/SlideFour.tsx","pages/Tutorial/Slides/SlideFive.tsx","pages/Tutorial/Slides/SlideSix.tsx","pages/Tutorial/Slides/SlideSeven.tsx","pages/Tutorial/Tutorial.tsx","App.tsx","serviceWorker.js","reducers/rootReducer.ts","index.tsx","components/SignInComponents/SignInBox/SignInBox.module.css","components/FormComponents/SubmissionButton.module.css","components/SignInComponents/ChunkyInput/ChunkyInput.module.css","components/SignInComponents/TwoFactorForm/TwoFactorForm.module.css","assets/QuestionGrey.svg","assets/tutorialclose.svg","components/BaseUIComponents/SortableTable/loadingData.module.css","pages/Categories/Reports/BooleanTick.module.css","components/BaseUIComponents/TutorialTooltip/TutorialTooltip.tsx","helpers/useAsyncFunction.ts","helpers/useReferenceCredit.ts","components/SignInComponents/PasswordInput/PasswordInput.tsx","components/SignInComponents/SignInForm/SignInForm.tsx","components/SignInComponents/TwoFactorForm/TwoFactorForm.tsx","components/SignInComponents/SignIn/SignIn.tsx","components/SignInComponents/SignIn/SignInContainer.ts","pages/SignInPage/SignInPage.tsx","reducers/PageReducers/PlayersReducer/playersSelectors.ts","reducers/playerSettings.ts","helpers/wagers.ts","pages/Categories/Reports/reportsReducer.ts","pages/Categories/Reports/pLaBPage.tsx","helpers/namespaces.ts","pages/Categories/Reports/ActionDetailsModal.tsx","components/PageComponents/PlayerBadge/PlayerBadge.tsx","theme.ts","components/FormComponents/SubmissionButton.tsx","api.ts","helpers/functions.ts","helpers/currency.ts","assets/settings.svg","pages/Categories/Reports/BooleanTick.tsx","assets/tickIcon.svg","reducers/PageReducers/DashboardReducer/dashboardConstants.tsx","reducers/PageReducers/DashboardReducer/betLineDetails.ts","reducers/PageReducers/DashboardReducer/dashboardReducer.tsx","components/FormComponents/ValidationError/ValidationError.module.css","assets/dragHandle.svg","assets/locked.svg","assets/Icon_SortBy_01.svg","assets/Icon_SortBy_02.svg","assets/Icon_SortBy_03.svg","assets/moredetails.svg","pages/Categories/Reports/playerListAndBalance.tsx","pages/Categories/Reports/playerWeeklyBalance.tsx","pages/Categories/Reports/dailySummaryAll.tsx","pages/Categories/Reports/dailySummaryCasino.tsx","pages/Categories/Reports/dailySummaryHorses.tsx","pages/Categories/Reports/dailySummaryLive.tsx","pages/Categories/Reports/dailySummarySports.tsx","pages/Categories/Reports/dailySummaryLotto3000.tsx","pages/Categories/Reports/dailySummary.tsx","pages/Categories/Reports/playerActionAll.tsx","pages/Categories/Reports/playerActionCasino.tsx","pages/Categories/Reports/playerActionHorses.tsx","pages/Categories/Reports/playerActionLive.tsx","pages/Categories/Reports/playerActionSports.tsx","pages/Categories/Reports/playerActionLotto3000.tsx","pages/Categories/Reports/playerAction.tsx","assets/tooltip-dark.svg","pages/Categories/Reports/formatters.tsx","helpers/reducers.ts","helpers/actions.ts","pages/Tutorial/Tutorial.module.scss","components/Buttons.tsx","components/BaseUIComponents/SortableTable/ColumnCustomiser.module.css","pages/SignInPage/SignInPage.module.css","components/PageComponents/Loading/Loading.tsx","assets/close.svg","assets sync /^/tooltip.*/.svg$","assets/tooltip.svg"],"names":["Modal","props","title","children","cancel","show","noAlign","closeIcon","hide","wide","scrollable","preventOnClickOutside","bindScroll","useLockBody","bind","useOnClickOutside","transitions","useTransition","from","opacity","enter","leave","constrainWidth","map","item","key","div","style","className","styles","modal","alignTop","css","classNames","modalContent","modalClose","onClick","src","require","alt","overflow","scrollContent","alignBottom","PortalModal","ReactDOM","createPortal","document","getElementById","DefaultModalButtons","wrapperClassName","submitButtonProps","cancelButtonProps","submitText","cancelText","submit","standardError","ErrorDisplay","url","noButton","errorMessage","dispatch","useDispatch","errorBackground","Fragment","updateTableAction","ErrorContent","reload","ErrorBoundary","React","Component","constructor","super","this","state","hasError","_error","render","module","exports","table","body","head","UPDATE_TABLE","UPDATED_TABLE","initialState","currentNamespace","currentKey","values","status","settingsVisible","detailsVisible","showLoadingModal","dateFilterFlag","reducer","action","produce","draft","type","namespace","payload","value","data","filters","deserialiseFilters","tag","tableEpic","combineEpics","action$","pipe","ofType","distinctUntilKeyChanged","switchMap","req","api","get","params","details","res","updatedTable","catchError","err","of","errorUpdateTable","state$","pluck","distinctUntilChanged","debounceTime","withLatestFrom","serializeFilters","columnData","listData","columns","errors","summaryRows","newColumnData","metadata","ReportDateFilterValues","startDate","endDate","toString","resetFiltering","updateTable","filter","undefined","createInfoToast","a","delay","mapTo","takeUntil","statusSelector","namespaceSelector","pendingSelector","createSelector","settingsVisibleSelector","detailsVisibleSelector","stateSelector","currentKeySelector","currentTableSelector","possibleDateFiltersSelector","PossibleReportDateFilterTabs","selectedDateTabSelector","selectedTab","dateTabStartSelector","dateTabEndSelector","showDateAndTimeSelector","bUseDateAndTimeFiltering","showFiltersSelector","some","c","bFilterable","bShowReportDateFilters","showLoadingSelector","selectPageLoading","page","dateFlagSelector","showDetails","hideDetails","showSettings","hideSettings","closeTable","updateCurrentNamespace","changeFilterValue","MobileTabBar","items","selected","changeSelected","Container","TabSelect","onChange","e","findIndex","currentTarget","styled","select","theme","colors","second","third","FullTabBar","useTheme","noTopBorder","percentage","length","useSpring","config","stiff","left","right","spring","updateSpring","useEffect","handleClick","i","fourth","otherTab","tabs","ButtonContainer","topBorder","Bar","Tabs","IndicatorContainer","SelectedIndicator","animated","TabBar","useMedia","maxWidth","isProduction","process","BASE_URL","getResetLink","URL","origin","API_CLIENT_URL","USERS_PUBLIC_URL","AUTH_URL","DASHBOARD_URL","PLAYERSEARCH_URL","PAYMENTS_URL","BONUSES_URL","PLAYERS_URL","AGENTREPORTS_URL","AGENTREPORTLIST_URL","paths","SIGNIN","FORGOTPASSWORD","RESETPASSWORD","PLAYERS","REPORTS","BILLING","WAGERS","EPOSWAGERS","EPOSUSERS","CALLCENTERUSERS","MARKETING","validationError","pascalisedName","noPascal","name","toPascal","serverError","Maybe","fromNullable","find","propEq","caseOf","Just","translateError","messageCode","orDefault","Nothing","ErrorMessage","component","msg","initialToastState","toasts","latestToast","errorModal","TUTORIAL_STAGE_MAX","betTicker","betTickerWindowFeatures","showBetTickerWindow","betTickerCurrencyCode","initialTheme","pageLoading","images","assetsPath","signInBackgroundImage","companyName","signInHeader","wagersTab","showReferencesToCredit","topWinningTab","topLosingTab","showTooltips","showTutorialOnLogin","tutorialStage","defaultPath","bAccountLocked","combineReducers","settings","GOT_DETAILS","features","currency","which","color","bShowTooltips","bShowTutorialOnLogin","SIGN_IN_SUCCESS","error","message","uid","push","toast","x","uiEpic","_","selectLatestToast","mergeMap","dismissToast","setBetTickerFeatures","setShowBetTickerWindow","setBetTickerCurrency","switchWagersTab","switchWinningTab","switchLosingTab","showError","createErrorToast","text","kind","updateTableSettings","startup","incrementTutorialScreen","changePageLoading","setTutorialScreen","hideTutorial","changeThemeColor","selectAccountLocked","ui","selectDefaultPath","selectBetTickerCurrency","selectShowCreditReferences","selectShowBetTickerWindow","selectBetTickerWindowFeatures","selectTheme","selectAssetsPath","selectSignInImage","selectCompanyName","selectWagersTab","selectWinningTab","selectLosingTab","app","selectToastList","selectShowTooltips","selectTutorialStage","selectTutorialVisible","stage","onLogin","listActions","agentPlayerManagementReducer","getActions","takeBetURL","fetchAutoLoginUrl","autoLoginUrlReducer","playersID","currentBalance","balanceLastWeek","balancePending","totalCredit","temporaryCredit","availableBalance","currencyCode","fetchPlayerBalancesPanel","playerBalancesPanelReducer","playersReducer","playerProfileReducer","playersEpic","tap","win","window","open","focus","selectCacheIndexFromItems","users","searchId","maybeFindIndex","id","user","createLoadingSelector","selectors","args","fetchStatus","includes","errorMessages","Required","Invalid","Invalid_Email","Invalid_URL","Account_in_Use","PIN_Min_Length_4","Invalid_Date_Of_Birth","Invalid_Time_Zone","Account_Locked","Server_Error","TFA_Code_Incorrect","TFA_Code_Expired","Invalid_Player","Invalid_Currency_Code","Invalid_Payment_Type","Payment_Type_Not_Allowed","Invalid_Balance_Type","Balance_Payment_Type_Mismatch","Invalid_Amount","Invalid_Amount_For_Type","Positive_Or_Null_Amount_Required","Player_Not_Found","Date_In_Past","User_Not_Found","split","toUpperCase","slice","join","or","useLoading","renderData","actionCreator","selector","loadOnMount","noLoading","getData","getState","useSelector","callback","initialiseState","initialData","pending","useFetch","useReducer","store","useState","flag","setFlag","forceRefresh","useCallback","prev","cancelled","then","response","catch","useFetchRender","whenOkay","whenNothing","whenError","refresh","renderError","renderNothing","useWaitForTable","tableStatus","set","prevStatus","usePrevious","usePageLoading","v","useLayoutEffect","toggle","ref","useRef","current","disableBodyScroll","clearAllBodyScrollLocks","usebTuesday","accountDetails","selectAccountDetails","licenseesID","MIN_DATE","Date","MAX_DATE","validDate","d","asDate","isEqual","formatDateProperly","withTime","year","getYear","month","getMonth","toLocaleString","minimumIntegerDigits","days","getDate","hours","getHours","mins","getMinutes","NAVIGATION_TREE_URL","PERMISSIONS_TREE_URL","GET_DETAILS_URL","TFA_LOGIN_URL","LOGIN_URL","child","schema","Entity","idAttribute","Array","define","navSchema","SIGN_OUT","initialAuthState","navigation","result","entities","permissions","appVisible","normalize","navigationItems","fallbackMessage","localStorage","clear","signIn","tfaSignIn","passwordReset","passwordRequested","signOut","loadAuthState","getAccountTypeDetails","checkAuthState","tokenDetailsString","getItem","tokenDetails","JSON","parse","refreshToken","accessToken","makeRequest","request","makeRequests","configs","Promise","all","saveTokenDetails","setItem","stringify","authEpic","attempt","method","throwError","_details","nav","s","_e","switchMapTo","_restrictions","bShowTutorial","selectNormalisedNav","auth","selectPermittedPaths","Object","path","concat","selectAccountType","chain","detail","encase","selectAuthStatus","selectAppVisible","selectIsAuthenticated","authStatus","selectAuthErrors","selectMessage","selectLoadedAccountDetails","selectPermissionsTree","_state","chunkyInput","inputContainer","ColumnCustomiser","changeString","tableKey","localState","setLocalState","allVisible","bVisible","someVisible","bLocked","isLocked","handleToggleVisible","columnKey","columnIndex","container","onDragEnd","destination","source","index","list","start","end","splice","removed","reorder","allItems","ShowHideButton","visible","col","droppableId","provided","snapshot","droppable","innerRef","draggableId","isDragDisabled","Item","toggleVisible","placeholder","buttons","disabled","resetSorting","resetColumns","handle","setHandle","onMouseEnter","onMouseLeave","draggedItem","isDragging","draggableProps","dragHandleProps","dragHandle","invisible","DragHandle","itemContents","labelValue","VisibleIcon","NotVisibleIcon","LockedIcon","LoadingSpinner","rotationCount","setRotationCount","incRotation","p","angle","onRest","mass","friction","tension","trigger","display","alignContent","justifyContent","padding","transform","interpolate","size","LoadingModal","textAlign","loadingData","loadingPage","spinner","fadeIn","SortingButton","changeSorting","column","translationNamespace","correctSortIcon","t","useTranslation","content","labelKey","bSortable","tooltip","TutorialTooltip","light","textTransform","whiteSpace","sortButton","RowHeight","TableView","isManuallyHidden","hiddenColumns","toLowerCase","currentStartDate","currentEndDate","tableState","formatItems","formatChild","formatSummaries","noSideBar","bAllowMultiColumnSorting","columnDetails","pageSize","rowHeight","middle","selectedRow","childrenToDisplay","setChildrenToDisplay","toggleChild","showDetailsModal","setShowDetailsModal","showSettingsModal","setShowSettingsModal","b","toggleSettingsModal","parameters","listKeyModifier","sortBy","customColumns","parsedSortings","useMemo","parseSortExpression","sortings","sortDirection","sort","decideNextDirection","newSortings","srt","sorting","changePage","pageNumber","changePageSize","changeCustomColumns","columnKeys","itemArray","toPairs","pair","makeItems","emptyVals","_x","pairs","zip","emptyRow","fromPairs","rows","padRows","sortFn","first","keys","reduce","acc","next","orderNumber","firstKey","secondKey","filterByVisible","tableSummaryRows","row","summaryRow","tdContent","tdPadded","newTableRows","oddRow","j","DetailsModal","formatDetails","valsFromMainFormatter","valsFromAdditionalFormatter","cols","c1","c2","key1","key2","order1","order2","DetailsModalTable","DetailsTitle","marginTop","width","renderContent","direction","ps","imgCSS","SortAsc","SortDesc","SortNoSort","ColumnsModal","containerStyle","sortableTable","mainTable","coreTable","heading","heightToClass","DetailsColumn","itemsLength","manualSummary","configurable","Paginator","setChildren","showDownloadButton","bShowDownloadCsvButton","spacer","showPendingModal","lastPage","Math","ceil","resultsCount","lastOnPage","firstOnPage","lastOnPageDisplay","min","valid","move","proposedNextPage","isLoading","loadStyle","paginatorButtonsCSS","paginator","paginatorUI","loadingBoxContainer","background","loadingBox","paginatorButtons","paginatorButtons__button","paginatorInfo","last","total","itemsPerPage","InputTypeText","parseInt","target","DownloadReportButton","endpoint","small","smallHeight","midHeight","large","largeHeight","memo","widthStyle","summaries","renderRow","isSummary","showButton","moreDetails","DetailsIcon","sideBar","settingsIcon","SettingsIcon","bDownloadCsvReport","headers","link","createElement","contentDisposition","contentType","filename","matches","match","file","File","href","createObjectURL","download","click","fetchReport","downloadReport","useAsyncFunction","execute","withRouter","ns","useSetNamespace","location","tableValues","loadingTransitions","search","searchString","searchParams","validKey","fieldName","val","getParamsFromSearch","spinContainer","spinPad","DISCARD_CHANGES","initialSettings","globalSettingsVisible","edit","openTab","lockPending","warningVisible","initialAllProducts","individualChanges","globalChanges","initialCategoryState","allPlayersAccessSettings","products","individualPlayersAccessSettings","initialCategoriesState","sports","casino","live","lotto3000","horses","categoryAccessChanges","category","productIDs","productsID","setting","bAllProductsEnabled","oldProducts","existingRecord","product","allTableAccessChanges","productType","mapObj","change","idKey","bEnabled","platformAccessAllURL","makeCategoryRequest","selectCategoryURL","post","playerAccessEpic","selectAllProductsPayload","concatMap","errorSavingChanges","Error","savedChanges","selectCategoryProductsPendingChanges","globalSettings","editMode","switchTab","modifyAccessAll","modifyGlobalAccessAll","modifyAccessCategory","setLockPending","toggleWarning","modifyAccessAllCategory","modifyCategoryGlobalAccess","saveAllProductsChanges","saveCategoryProducts","discardChanges","selectGlobalSettings","playerAccess","selectEditModeOpen","selectOpenTab","selectAllProductsPendingChanges","rest","selectLocalChanges","selectGlobalChanges","selectCategoryIndChanges","selectCategoryGlobalChanges","selectSavePending","selectShouldSaveAllProducts","changes","entries","selectLockUpdating","selectTablePending","lock","selectWarningVisible","createPlatformAccessSelector","allCount","activeCount","pendingActiveCount","globalChangeValue","createCategoryAccessSelector","changesForPlayer","changesForProduct","globalChangesForProduct","allProductsEnabled","globallyEnabled","createAllCategoryAccessSelector","categoryAllEnabledSelector","allEnabled","every","changeForProduct","globalChangeForProduct","createCategorySummaryGlobalSelector","isChecked","indChanges","y","createCategorySummarySelector","idx","UPDATED_SEARCH_TERM","SEARCH_SUCCESS","SEARCH_ERROR","SEARCH_CANCELLED","userCode","fullName","openPassword","bSuppressed","fetchSearchByPlayersID","searchByPlayersIDReducer","warning","results","updateSearchTerm","hideSearchResults","cancelSearch","userCodeSearchSelector","playerSearch","usercode","searchWarningSelector","selectSearchByPlayersID","playerSearchEpic","query","searchText","SignInBox","formHeader","flexForm","useAccrualSummary","theDate","setDate","modalID","showModal","closeModal","useAccrualModal","setModalID","AccrualDetails","handleDate","maxHeight","overflowX","AccrualTable","accrualItems","pass","format","accrualDate","madeBy","description","toCurrency","accrualAmount","amount","paddingTop","borderTop","fontWeight","AccrualDetailsModal","variety","getFreeplayBonusesReducer","paymentFocusFlag","paymentFormKey","paymentNotifySelector","paymentReducer","paymentNotifyReducer","paymentFocusSelector","paymentFormKeySelector","accrualSuccess","accrualError","paymentEpic","selectPlayerBalancePanel","i18n","use","initReactI18next","init","resources","translations","lng","defaultNS","keySeparator","interpolation","escapeValue","SlideOne","nextSlide","companyNameUpper","nancy","rightBox","speechBubble","ImageTooltip","selectedPosition","tooltipDirection","position","tooltipRelativeLocation","persistIcons","ifSmall","imageTooltip","QuestionGrey","Question","rel","stopPropagation","tooltipContent","tooltipCloseIcon","role","CloseIcon","AnnotatedImage","hasLoaded","setHasLoaded","smallContent","selectedChild","imgSrc","associatedImageSrc","annotatedImageContainer","onLoad","annotatedImage","notVisible","q","SideInfo","imgAlt","mobile","mobileSideInfo","sideInfo","bubble","SideInfoTwo","height","SideInfoThree","SideInfoFour","SideInfoFive","SideInfoSix","MainContent","SlideTwo","SlideContent","mainContent","SlideThree","SlideFour","SlideFive","SlideSix","SlideSeven","closeTutorial","ProgressBar","max","dots","fill","progressBar","aria-label","_d","r","cy","cx","stroke","NavButtons","navButtons","showNext","nextButton","nextStage","skipButton","Slide","currentStage","showNancy","setShowNancy","tutorialSlide","Controls","override","SideContent","useTutorialHelpers","setStage","n","defaultHelpers","Box","Tutorial","defaultNav","tutorial","MainRouter","lazy","Background","App","tutorialVisible","detailsLoaded","defaultToSpanish","chat","useShowLiveChat","changeLanguage","shouldShowTutorial","sizes","fallback","Boolean","hostname","rootEpic","rootReducer","playerSettings","dashboardReducer","reportsReducer","composeEnhancers","compose","epicMiddleware","createEpicMiddleware","createStore","applyMiddleware","thunk","run","navigator","serviceWorker","ready","registration","unregister","persist","widthInChars","data-tip","data-for","effect","marginLeft","marginRight","asyncFunction","immediate","useReferenceCredit","PasswordInput","passwordVisible","updatePasswordVisibility","inputType","ariaLabel","passwordInput","showPass","validationSchema","Yup","username","required","password","SignInFormInner","setSubmitting","signInForm","rememberForgot","rememberMe","htmlFor","ChunkyInput","autoCapitalize","autoComplete","spellCheck","ValidationError","Link","to","forgotPassword","isSubmitting","signInButton","isValid","initialValues","bRememberMe","onSubmit","formikprops","TwoFactorFormInner","twoFactorForm","resubmit","code","SignIn","setDetails","queryPath","queryString","redirect","originalSearch","origSearch","returnPath","boxes","base","SignInForm","vals","TwoFactorForm","twoFactorAuthCode","tfaGetNewCode","authenticated","Redirect","pathname","connect","accountType","checkAuth","getAccountType","SignInBackground","signInImage","iconSrc","signInSrc","showImg","noImgCSS","Table","TopRow","Cell","TopBlock","TopImg","MiddleRow","BottomRow","SignInPage","selectPlayersPageLoading","selectPlayerProfileLoading","creditSettingsDisplay","creditSettingsFocusFlag","platformAccessDisplay","platformAccessDrawers","playerSettingsDisplay","switchCreditSettings","switchPlatformAccess","changePlatformDrawer","switchPlayerSettings","selectCreditSettingsDisplay","selectCreditSettingsFocus","selectPlatformAccessDisplay","selectPlatformDrawers","selectPlayerSettingsDisplay","limitDescriptionRows","numberOfRows","limitedRows","listRecentlyViewedReports","listPlayerReports","listAgentReports","fetchMainReportSummary","mainReportSummaryReducer","fetchAgentReportSummary","agentReportSummaryReducer","fetchPlayerReportSummary","playerReportSummaryReducer","tabReducer","dailySummaryTabReducer","playerActionTabReducer","playerListTabReducer","listReducer","useGetNamespace","ActionDetails","week","ActionDetailsTable","ChildItem","colSpan","betCode","detailedChild","betsCode","childChildrenList","riskWin","risk","toFixed","resultAmount","resultString","listStyle","line","visibleChildren","setVisibleChildren","isVisible","actionDetailItems","player","placed","ActionDetailsModal","PlayerBadge","fontFamilies","SubmissionButton","initial","spinnerProps","spinnerStyle","margin","top","bottom","alignItems","instance","axios","create","baseURL","reqHandler","isFetchingToken","pendingRequests","addToQueue","onTokenFetched","token","forEach","cb","clearQueue","interceptors","authHeader","Authorization","fulfilled","rejected","refreshAccessToken","reject","errorResponse","awaitingNewToken","resolve","grantType","newTokenData","wrapInMaybe","func","defaultVal","maybeParseInt","radix","fromFalsy","currencies","USD","GBP","EUR","CAD","BRL","VEF","PAB","PLN","RWF","PHP","NOK","MXN","NIO","SEK","DKK","GTQ","CNY","CLP","JMD","BOB","KRW","VCOIN","BTC","AUS","JPY","DOP","ARS","COP","PEN","PYG","HNL","XXX","NONE","console","abs","replace","BooleanTick","bool","tick","initialBetLineDetailsState","findItem","betID","listBets","fetchBetTicker","betTickerReducer","fetchBetLineDetails","betLineDetailsReducer","fetchIdx","fetchState","lineDetails","fetchedIdx","siteUsers__UserCode","playerActivities__bActiveThisWeek","_i","playerBalances__CurrentBalance","playerBalances__AvailableBalance","players__CreditLimit","playerBalances__LifetimeNET","players__TempCredit","tempCreditAmount","tempCreditExpiryDate","formatDate","playerActivities__LastWager","BalanceLink","date","setAccrualDates","actionInfo","setActionInfo","bTuesStart","playerWeeklyBalance__BOW","playerWeeklyBalance__Mon","playerWeeklyBalance__Tue","playerWeeklyBalance__Wed","playerWeeklyBalance__Thu","playerWeeklyBalance__Fri","playerWeeklyBalance__Sat","playerWeeklyBalance__Sun","playerWeeklyBalance__Accrual","playerWeeklyBalance__WeekTotal","playerWeeklyBalance__EOW","playerWeeklyBalance__Pending","AgentReports_DailySummary_All_Totals","summary","formatCurrency","dailySummaries__Date","dailySummaries__SportsVolume","dailySummaries__SportsGross","dailySummaries__SportsPlayers","dailySummaries__SportsWagers","dailySummaries__CasinoVolume","dailySummaries__CasinoGross","dailySummaries__CasinoPlayers","dailySummaries__CasinoWagers","dailySummaries__HorsesVolume","dailySummaries__HorsesGross","dailySummaries__HorsesPlayers","dailySummaries__HorsesWagers","dailySummaries__LiveVolume","dailySummaries__LiveGross","dailySummaries__LivePlayers","dailySummaries__LiveWagers","dailySummaries__Accrual","AgentReports_DailySummary_Casino_Totals","dailySummaries__Volume","dailySummaries__Adjustments","dailySummaries__HoldPercentage","dailySummaries__Rebates","AgentReports_DailySummary_Horses_Totals","AgentReports_DailySummary_Live_Totals","AgentReports_DailySummary_Sports_Totals","dailySummaries__Players","dailySummaries__Wagers","tab","contentToDisplay","startDateString","endDateString","SiteUsers__UserCode","playerAction__Total","playerAction__Pending","playerAction__Straight","playerAction__Parlay","playerAction__Teaser","playerAction__Sports","playerAction__Casino","playerAction__Horses","playerAction__Live","playerAction__Accrual","playerAction__Volume","playerAction__Adjustment","playerAction__HoldPercentage","showTime","formattedDate","formattedTime","defaultItemList","tGetActions","getting","successGet","errorGet","actionName","tListActions","itemList","btn","Button","button","FourthSubmissionButton","DateButton","Loading","inModal","fixed","webpackContext","webpackContextResolve","__webpack_require__","o"],"mappings":"8YA8DA,MAAMA,EAASC,IAAuB,MAElCC,EAUED,EAVFC,MACAC,EASEF,EATFE,SACAC,EAQEH,EARFG,OACAC,EAOEJ,EAPFI,KACAC,EAMEL,EANFK,QACAC,EAKEN,EALFM,UACAC,EAIEP,EAJFO,KACAC,EAGER,EAHFQ,KATiC,EAY/BR,EAFFS,kBAViC,SAWjCC,EACEV,EADFU,sBAGIC,EAAaC,YAAYR,GAEzBS,EAAOC,4BAAkB,KACzBJ,GACU,MAAVP,GAAgBA,MAGhBY,EAAcC,YAAcZ,EAAM,KAAM,CAC5Ca,KAAM,CAAEC,QAAS,GACjBC,MAAO,CAAED,QAAS,GAClBE,MAAO,CAAEF,QAAS,KAGdG,EAAiBb,EAAI,IAQ3B,OACE,YAAC,WAAD,KACGO,EAAYO,IAAI,EAAGC,OAAMC,MAAKxB,WAC7BuB,EACE,YAAC,IAASE,IAAV,CAAcD,IAAKA,EAAKE,MAAO1B,EAAO2B,UAAWC,IAAOC,OACtD,mBAAKF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AsBz2C,GAC9B,IAAI02C,EAAoBC,EAAEp8C,EAAKyF,GAAM,CACpC,IAAI6E,EAAI,IAAIitB,MAAM,uBAAyB9xB,EAAM,KAEjD,MADA6E,EAAE8/B,KAAO,mBACH9/B,EAEP,OAAOtK,EAAIyF,GAEZw2C,EAAe5vB,KAAO,WACrB,OAAOhL,OAAOgL,KAAKrsB,IAEpBi8C,EAAe/J,QAAUgK,EACzB54C,EAAOC,QAAU04C,EACjBA,EAAevlC,GAAK,K,oBCvBpBpT,EAAOC,QAAU,IAA0B,sC","file":"static/js/main.fdc6e90e.chunk.js","sourcesContent":["/** @jsx jsx */\r\nimport { jsx } from \"@emotion/core\";\r\nimport React, { Fragment } from \"react\";\r\nimport ReactDOM from \"react-dom\";\r\nimport css from \"@emotion/css/macro\";\r\nimport { useOnClickOutside } from \"@avamae/hooks\";\r\nimport { useLockBody } from \"helpers/hooks\";\r\nimport styles from \"./Modal.module.css\";\r\nimport \"styles/transitions.css\";\r\nimport { useTransition, animated } from \"react-spring\";\r\nimport classNames from \"classnames\";\r\n\r\n// NOTE: currently broken.\r\n/* function useTrapFocus(active: boolean) { */\r\n/* const ref = React.useRef(); */\r\n\r\n/* let selectableElements: NodeListOf; */\r\n/* React.useEffect(() => { */\r\n/* if (active && ref.current) { */\r\n/* selectableElements = document.querySelectorAll( */\r\n/* `*, [tabindex=\"0\"]` */\r\n/* ) as NodeListOf; */\r\n/* const elementsInModal = ref.current.querySelectorAll( */\r\n/* `:scope` */\r\n/* ) as NodeListOf; */\r\n/* console.log(\"Elements in modal:\", elementsInModal); */\r\n/* const exceptionSet = new Set(elementsInModal); */\r\n\r\n/* for (const elem of selectableElements) { */\r\n/* if (!exceptionSet.has(elem)) { */\r\n/* elem.setAttribute(\"tabindex\", \"-1\"); */\r\n/* } */\r\n/* } */\r\n\r\n/* elementsInModal[0]?.focus(); */\r\n\r\n/* return () => { */\r\n/* if (selectableElements) { */\r\n/* for (const elem of selectableElements) { */\r\n/* elem.setAttribute(\"tabindex\", \"0\"); */\r\n/* } */\r\n/* } */\r\n/* }; */\r\n/* } */\r\n/* }, [active]); */\r\n\r\n/* return { ref }; */\r\n/* } */\r\n\r\ntype ModalProps = {\r\n show: boolean;\r\n title?: string;\r\n children?: React.ReactNode;\r\n cancel?(): void;\r\n hide?(): void;\r\n noAlign?: boolean;\r\n closeIcon?: boolean;\r\n wide?: boolean;\r\n scrollable?: boolean;\r\n preventOnClickOutside?: boolean;\r\n};\r\n\r\nconst Modal = (props: ModalProps) => {\r\n const {\r\n title,\r\n children,\r\n cancel,\r\n show,\r\n noAlign,\r\n closeIcon,\r\n hide,\r\n wide,\r\n scrollable = true,\r\n preventOnClickOutside,\r\n } = props;\r\n\r\n const bindScroll = useLockBody(show);\r\n\r\n const bind = useOnClickOutside(() => {\r\n if (preventOnClickOutside) return;\r\n if (cancel != null) cancel();\r\n });\r\n\r\n const transitions = useTransition(show, null, {\r\n from: { opacity: 0 },\r\n enter: { opacity: 1 },\r\n leave: { opacity: 0 },\r\n });\r\n\r\n const constrainWidth = wide\r\n ? css`\r\n min-width: 50%;\r\n `\r\n : css`\r\n width: 20%;\r\n `;\r\n\r\n return (\r\n \r\n {transitions.map(({ item, key, props }) =>\r\n item ? (\r\n \r\n
\r\n \r\n {closeIcon && (\r\n
\r\n \"\"\r\n
\r\n )}\r\n\r\n {title &&

{title}

}\r\n \r\n {children && children}\r\n
\r\n \r\n
\r\n \r\n ) : null\r\n )}\r\n \r\n );\r\n};\r\n\r\nexport function PortalModal(props: ModalProps) {\r\n return ReactDOM.createPortal(\r\n ,\r\n document.getElementById(\"modals\")!\r\n );\r\n}\r\n\r\nexport interface IDefaultModalButtonsProps {\r\n wrapperClassName: HTMLButtonElement[\"className\"];\r\n submitButtonProps: JSX.IntrinsicElements[\"button\"];\r\n cancelButtonProps: JSX.IntrinsicElements[\"button\"];\r\n submitText?: string;\r\n cancelText?: string;\r\n}\r\n\r\nexport const DefaultModalButtons: React.FC = ({\r\n wrapperClassName,\r\n submitButtonProps,\r\n cancelButtonProps,\r\n submitText,\r\n cancelText,\r\n}) => {\r\n const submit = submitText ? submitText : \"Submit\";\r\n const cancel = cancelText ? cancelText : \"Cancel\";\r\n return (\r\n
\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default Modal;\r\n","import React from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { updateTable as updateTableAction } from \"reducers/tableReducer\";\r\nimport styles from \"./Errors.module.css\";\r\n\r\nconst standardError =\r\n \"Something went wrong loading this data. Press the button below to retry.\";\r\n\r\nexport const ErrorDisplay = ({\r\n url,\r\n noButton,\r\n errorMessage = standardError,\r\n}: {\r\n url: string;\r\n noButton?: boolean;\r\n errorMessage?: string;\r\n}) => {\r\n const dispatch = useDispatch();\r\n const reloadTable = () => dispatch(updateTableAction(url, {}));\r\n\r\n return (\r\n
\r\n

We hit an error, sorry.

\r\n {noButton ? (\r\n

Please try reloading the page.

\r\n ) : (\r\n \r\n

{errorMessage}

\r\n \r\n
\r\n )}\r\n
\r\n );\r\n};\r\n\r\nexport const ErrorContent = ({\r\n noButton,\r\n errorMessage = standardError,\r\n reload,\r\n}: {\r\n noButton?: boolean;\r\n errorMessage?: string;\r\n reload(): void;\r\n}) => {\r\n return (\r\n
\r\n

We hit an error, sorry.

\r\n {noButton ? (\r\n

Please try reloading the page.

\r\n ) : (\r\n \r\n

{errorMessage}

\r\n \r\n
\r\n )}\r\n
\r\n );\r\n};\r\n\r\nexport class ErrorBoundary extends React.Component<\r\n { url?: string; children: any },\r\n { hasError: boolean }\r\n> {\r\n constructor(props: any) {\r\n super(props);\r\n this.state = { hasError: false };\r\n }\r\n\r\n static getDerivedStateFromError(_error: any) {\r\n return { hasError: true };\r\n }\r\n\r\n // componentDidCatch(error: any, errorInfo: any) {\r\n // console.log(\"Caught ERROR:\", error, errorInfo);\r\n // }\r\n\r\n render() {\r\n if (this.state.hasError) {\r\n return (\r\n
\r\n

We hit an error, sorry.

\r\n

\r\n Something went wrong loading this page. Please refresh the page and\r\n try again.\r\n

\r\n
\r\n );\r\n }\r\n\r\n return this.props.children == null ? null : this.props.children;\r\n }\r\n}\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"signInForm\":\"SignInForm_signInForm__1g-5F\",\"rememberForgot\":\"SignInForm_rememberForgot__2q-iV\",\"forgotPassword\":\"SignInForm_forgotPassword__2yzin\",\"message\":\"SignInForm_message__wGsJG\",\"error\":\"SignInForm_error__3ySmM\",\"checkboxContainer\":\"SignInForm_checkboxContainer__233k5\",\"joinNowContainer\":\"SignInForm_joinNowContainer__27vaS\",\"signInButton\":\"SignInForm_signInButton__3zzqY\",\"buttons\":\"SignInForm_buttons__1QqAz\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"spinContainer\":\"Loading_spinContainer__3B3XG\",\"fixed\":\"Loading_fixed__3IqDp\",\"spinner\":\"Loading_spinner__qXNtX\",\"buttons\":\"Loading_buttons__OETJp\",\"modal\":\"Loading_modal__1ar9a\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"NewSortableTable_container__2jEGp\",\"spinPad\":\"NewSortableTable_spinPad__mvivP\",\"mainTable\":\"NewSortableTable_mainTable__3y5XB\",\"coreTable\":\"NewSortableTable_coreTable__3a0sB\",\"paginator\":\"NewSortableTable_paginator__3XEGU\",\"paginatorUI\":\"NewSortableTable_paginatorUI__1Ayai\",\"DetailsTitle\":\"NewSortableTable_DetailsTitle__2yE1m\",\"spinContainer\":\"NewSortableTable_spinContainer__1t6YR\",\"itemsPerPage\":\"NewSortableTable_itemsPerPage__Kg4_H\",\"paginatorInfo\":\"NewSortableTable_paginatorInfo__1R-Yj\",\"spacer\":\"NewSortableTable_spacer__1wWYK\",\"paginatorButtons\":\"NewSortableTable_paginatorButtons__2NAjF\",\"loadingBoxContainer\":\"NewSortableTable_loadingBoxContainer__1Rret\",\"loadingBox\":\"NewSortableTable_loadingBox__2WWBa\",\"paginatorButtons__button\":\"NewSortableTable_paginatorButtons__button__3ebLg\",\"SortingButtonDiv\":\"NewSortableTable_SortingButtonDiv__3knMK\",\"sortableTable\":\"NewSortableTable_sortableTable__1476r\",\"smallHeight\":\"NewSortableTable_smallHeight__1P_BU\",\"column\":\"NewSortableTable_column__1kXc_\",\"midHeight\":\"NewSortableTable_midHeight__1pkwA\",\"largeHeight\":\"NewSortableTable_largeHeight__3T-jP\",\"heading\":\"NewSortableTable_heading__2SmuU\",\"settingsIcon\":\"NewSortableTable_settingsIcon__128oH\",\"moreDetails\":\"NewSortableTable_moreDetails__1VQfl\",\"tdContent\":\"NewSortableTable_tdContent__1gaBO\",\"sideBar\":\"NewSortableTable_sideBar__uTfwA\",\"oddRow\":\"NewSortableTable_oddRow__37MZd\",\"summaryRow\":\"NewSortableTable_summaryRow__3Y9J2\",\"hidden\":\"NewSortableTable_hidden__25ZAu\"};","import css from \"@emotion/css/macro\";\r\nconst table = css`\r\n border-collapse: collapse;\r\n border-spacing: 0;\r\n table-layout: fixed;\r\n font-size: 13px;\r\n width: 100%;\r\n`;\r\n\r\nconst body = css`\r\n overflow-y: auto;\r\n overflow-x: hidden;\r\n width: 100%;\r\n\r\n td {\r\n padding: 0.5em;\r\n }\r\n`;\r\n\r\nconst head = css`\r\n tr {\r\n font-family: \"Nunito Sans\", sans-serif;\r\n font-size: 14px;\r\n font-weight: 600;\r\n }\r\n\r\n td {\r\n padding: 0.5em;\r\n }\r\n`;\r\n\r\nexport { table, body, head };\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"nancy\":\"SlideOne_nancy__2trZa\",\"speechBubble\":\"SlideOne_speechBubble__3i2Ss\",\"rightBox\":\"SlideOne_rightBox__RxKNg\",\"buttons\":\"SlideOne_buttons__2gnIf\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"modal\":\"Modal_modal__1jst6\",\"modalContent\":\"Modal_modalContent__2qXCV\",\"scrollContent\":\"Modal_scrollContent__qMJ2A\",\"noAlign\":\"Modal_noAlign__3uHXI\",\"alignTop\":\"Modal_alignTop__1LZIT\",\"alignBottom\":\"Modal_alignBottom__FFGOQ\",\"alignCenter\":\"Modal_alignCenter__oeDMB\",\"buttons\":\"Modal_buttons__2zwub\",\"modalClose\":\"Modal_modalClose__hvFTq\"};","import { ColumnDetails } from \"types/ReducerTypes\";\r\nimport { AppState } from \"reducers/rootReducer\";\r\nimport { createSelector } from \"reselect\";\r\nimport { GetList200Response } from \"types/ApiResponseTypes\";\r\nimport { produce } from \"immer\";\r\nimport {\r\n ActionsObservable,\r\n StateObservable,\r\n ofType,\r\n combineEpics,\r\n} from \"redux-observable\";\r\nimport {\r\n Filters,\r\n serializeFilters,\r\n deserialiseFilters,\r\n} from \"@avamae/parse-filter\";\r\nimport { createInfoToast, selectPageLoading } from \"reducers/ui\";\r\nimport {\r\n map,\r\n mapTo,\r\n distinctUntilKeyChanged,\r\n distinctUntilChanged,\r\n switchMap,\r\n pluck,\r\n catchError,\r\n debounceTime,\r\n withLatestFrom,\r\n filter,\r\n delay,\r\n takeUntil,\r\n} from \"rxjs/operators\";\r\nimport { from, of, Observable } from \"rxjs\";\r\nimport api from \"api\";\r\n\r\n// Constants.\r\n\r\nconst SET_CURRENT_URL = \"app/table/SET_CURRENT_URL\";\r\nexport const UPDATE_TABLE = \"app/table/UPDATE_TABLE\";\r\nconst ERROR_UPDATE_TABLE = \"app/table/ERROR_UPDATE_TABLE\";\r\nexport const UPDATED_TABLE = \"app/table/UPDATED_TABLE\";\r\nconst OPENED_SETTINGS = \"app/table/OPENED_SETTINGS\";\r\nconst CLOSED_SETTINGS = \"app/table/CLOSED_SETTINGS\";\r\nconst OPENED_DETAILS = \"app/table/OPENED_DETAILS\";\r\nconst CLOSED_DETAILS = \"app/table/CLOSED_DETAILS\";\r\nconst CHANGED_FILTER_VALUE = \"app/table/CHANGED_FILTER_VALUE\";\r\nconst CLOSED_TABLE = \"app/table/CLOSED_TABLE\";\r\nconst SHOW_LOADING_MODAL = \"app/table/SHOW_LOADING_MODAL\";\r\nconst UPDATE_NAMESPACE = \"app/table/UPDATE_NAMESPACE\";\r\n\r\n// Reducer logic\r\n\r\n// just an alias, TS doesn't have newtype.\r\n// Might switch out for a union of the possible urls in future.\r\ntype Url = string;\r\n\r\ntype State = {\r\n currentNamespace: string;\r\n currentKey: string;\r\n status: \"okay\" | \"pending\" | \"error\";\r\n values: {\r\n [key: string]: { data: GetList200Response; filters: Filters };\r\n };\r\n settingsVisible: boolean;\r\n detailsVisible: null | number;\r\n showLoadingModal: boolean;\r\n dateFilterFlag: number;\r\n};\r\n\r\nconst initialState: State = {\r\n currentNamespace: \"\",\r\n currentKey: \"\",\r\n values: {},\r\n status: \"okay\",\r\n settingsVisible: false,\r\n detailsVisible: null,\r\n showLoadingModal: false,\r\n dateFilterFlag: 0,\r\n};\r\n\r\ntype Request = { key: Url; details: Partial };\r\ntype Response = { key: Url; value: GetList200Response };\r\n\r\n// A bit of metadata so other reducers can react when the table has been\r\n// refreshed for a specific reason.\r\nexport type UpdateTag =\r\n | \"saved_platform_access\"\r\n | \"locked_platform_access\"\r\n | \"updated_column_option\";\r\n\r\ntype Action = { toast?: { kind: \"error\" | \"info\"; text: string } } & (\r\n | { type: typeof SET_CURRENT_URL; payload: Url }\r\n | { type: typeof SHOW_LOADING_MODAL }\r\n | { type: typeof UPDATE_TABLE; payload: Request; tag?: UpdateTag }\r\n | { type: typeof ERROR_UPDATE_TABLE; payload: Error; tag?: UpdateTag }\r\n | { type: typeof UPDATED_TABLE; payload: Response; tag?: UpdateTag }\r\n | { type: typeof OPENED_SETTINGS }\r\n | { type: typeof CLOSED_SETTINGS }\r\n | { type: typeof OPENED_DETAILS; payload: number }\r\n | { type: typeof CLOSED_DETAILS }\r\n | { type: typeof CHANGED_FILTER_VALUE; payload: Filters }\r\n | { type: typeof CLOSED_TABLE }\r\n | { type: typeof UPDATE_NAMESPACE; namespace: string }\r\n);\r\n\r\nexport const reducer = (state = initialState, action: Action): State =>\r\n produce(state, (draft) => {\r\n switch (action.type) {\r\n case UPDATE_NAMESPACE:\r\n draft.currentNamespace = action.namespace;\r\n break;\r\n case SET_CURRENT_URL:\r\n draft.currentKey = action.payload;\r\n break;\r\n case SHOW_LOADING_MODAL:\r\n draft.showLoadingModal = true;\r\n break;\r\n case UPDATE_TABLE:\r\n draft.status = \"pending\";\r\n draft.currentKey = action.payload.key;\r\n break;\r\n case ERROR_UPDATE_TABLE:\r\n draft.status = \"error\";\r\n draft.showLoadingModal = false;\r\n break;\r\n case UPDATED_TABLE:\r\n const { key, value } = action.payload;\r\n // Change the date filter's key, to reset its state.\r\n draft.dateFilterFlag = state.dateFilterFlag + 1;\r\n draft.status = \"okay\";\r\n\r\n // draft.values[key]\r\n // ? (draft.values[key].data = value)\r\n // : (draft.values[key] = {\r\n // data: value,\r\n // filters: deserialiseFilters(\r\n // value.filters === null ? \"\" : value.filters\r\n // ),\r\n // });\r\n\r\n draft.values[key] = {\r\n data: value,\r\n filters: deserialiseFilters(\r\n value.filters === null ? \"\" : value.filters\r\n ),\r\n };\r\n draft.showLoadingModal = false;\r\n\r\n if (action.tag === \"updated_column_option\") {\r\n draft.settingsVisible = false;\r\n }\r\n break;\r\n case OPENED_SETTINGS:\r\n draft.settingsVisible = true;\r\n break;\r\n case CLOSED_SETTINGS:\r\n draft.settingsVisible = false;\r\n break;\r\n case OPENED_DETAILS:\r\n draft.detailsVisible = action.payload;\r\n break;\r\n case CLOSED_DETAILS:\r\n draft.detailsVisible = null;\r\n break;\r\n case CHANGED_FILTER_VALUE:\r\n draft.values[state.currentKey].filters = action.payload;\r\n break;\r\n case CLOSED_TABLE:\r\n draft.settingsVisible = false;\r\n draft.detailsVisible = null;\r\n draft.currentKey = \"\";\r\n }\r\n });\r\n\r\n// Epics\r\n\r\nconst makeRequest = (req: Request) => api.get(req.key, { params: req.details });\r\n\r\n// Get data epic. Using thunks meant a really bouncy experience\r\n// on changing filters, switchMap means that stale responses will be ignored.\r\nconst fetchDataEpic = (action$: ActionsObservable): Observable =>\r\n action$.pipe(\r\n ofType(UPDATE_TABLE),\r\n distinctUntilKeyChanged(\"payload\"),\r\n switchMap(({ payload, tag }) =>\r\n from(makeRequest(payload)).pipe(\r\n map((res) => updatedTable(payload.key, res.data, tag)),\r\n catchError((err) => {\r\n return of(errorUpdateTable(err, tag));\r\n })\r\n )\r\n )\r\n );\r\n\r\nfunction getDates(data?: GetList200Response) {\r\n if (data == null) return { startDate: null, endDate: null };\r\n if (data.metadata.ReportDateFilterValues == null)\r\n return { startDate: null, endDate: null };\r\n\r\n return {\r\n startDate: data.metadata.ReportDateFilterValues.startDate\r\n ? data.metadata.ReportDateFilterValues.startDate.toString()\r\n : null,\r\n endDate: data.metadata.ReportDateFilterValues.endDate\r\n ? data.metadata.ReportDateFilterValues.endDate.toString()\r\n : null,\r\n };\r\n}\r\n\r\nconst updateFilterEpic = (\r\n action$: ActionsObservable,\r\n state$: StateObservable\r\n): Observable =>\r\n action$.pipe(\r\n ofType(CHANGED_FILTER_VALUE),\r\n pluck(\"payload\"),\r\n distinctUntilChanged(),\r\n debounceTime(300),\r\n withLatestFrom(state$.pipe(map((state) => state.table))),\r\n map(([value, table]) => {\r\n const filters = serializeFilters(value);\r\n const {\r\n listData,\r\n columns,\r\n errors,\r\n summaryRows,\r\n ...columnData\r\n } = table.values[table.currentKey].data;\r\n const newColumnData: ColumnDetails = {\r\n ...columnData,\r\n ...getDates(table.values[table.currentKey].data),\r\n filters,\r\n resetFiltering: filters === \"\",\r\n };\r\n return updateTable(table.currentKey, newColumnData);\r\n })\r\n );\r\n\r\nconst showToastOnUpdate = (action$: ActionsObservable) =>\r\n action$.pipe(\r\n ofType(UPDATED_TABLE),\r\n filter((action) => action.tag !== undefined),\r\n map((action) => {\r\n switch (action.tag) {\r\n case \"saved_platform_access\":\r\n return createInfoToast(\"Saved changes\");\r\n case \"locked_platform_access\":\r\n return createInfoToast(\"Category lock changed\");\r\n case \"updated_column_option\":\r\n return createInfoToast(\"Updated column settings\");\r\n }\r\n })\r\n );\r\n\r\n// If the table has been in a loading state for more than a second, show a\r\n// loading pop up animation. Close it once we're no longer pending.\r\nconst displayLoadingEpic = (action$: ActionsObservable) =>\r\n action$.pipe(\r\n ofType(UPDATE_TABLE),\r\n switchMap((a) =>\r\n of(a).pipe(\r\n delay(1000),\r\n mapTo(showLoadingModal()),\r\n takeUntil(action$.pipe(ofType(UPDATED_TABLE, ERROR_UPDATE_TABLE)))\r\n )\r\n )\r\n );\r\n\r\nexport const tableEpic = combineEpics(\r\n fetchDataEpic,\r\n updateFilterEpic,\r\n showToastOnUpdate,\r\n displayLoadingEpic\r\n);\r\n\r\n// Selectors\r\n\r\nexport const statusSelector = (state: AppState) => state.table.status;\r\n\r\nexport const namespaceSelector = (state: AppState) =>\r\n state.table.currentNamespace;\r\n\r\nexport const pendingSelector = createSelector(\r\n statusSelector,\r\n (status) => status === \"pending\"\r\n);\r\n\r\nexport const settingsVisibleSelector = (state: AppState) =>\r\n state.table.settingsVisible;\r\n\r\nexport const detailsVisibleSelector = (state: AppState) =>\r\n state.table.detailsVisible;\r\n\r\nexport const stateSelector = (state: AppState) => state.table.values;\r\n// export const filtersSelector = (state: AppState) => state.table.filters;\r\nexport const currentKeySelector = (state: AppState) => state.table.currentKey;\r\n\r\nexport const currentTableSelector = createSelector(\r\n [stateSelector, currentKeySelector],\r\n (state, key) => state[key]\r\n);\r\n\r\nexport const possibleDateFiltersSelector = createSelector(\r\n [currentTableSelector],\r\n (table) => table.data.metadata.PossibleReportDateFilterTabs\r\n);\r\n\r\nexport const selectedDateTabSelector = createSelector(\r\n [currentTableSelector],\r\n (table) =>\r\n table && table.data.metadata.ReportDateFilterValues\r\n ? table.data.metadata.ReportDateFilterValues.selectedTab\r\n : undefined\r\n);\r\n\r\nexport const dateTabStartSelector = createSelector(\r\n [currentTableSelector],\r\n (table) =>\r\n table && table.data.metadata.ReportDateFilterValues\r\n ? table.data.metadata.ReportDateFilterValues.startDate\r\n : undefined\r\n);\r\n\r\nexport const dateTabEndSelector = createSelector(\r\n [currentTableSelector],\r\n (table) =>\r\n table && table.data.metadata.ReportDateFilterValues\r\n ? table.data.metadata.ReportDateFilterValues.endDate\r\n : undefined\r\n);\r\n\r\nexport const showDateAndTimeSelector = createSelector(\r\n [stateSelector, currentKeySelector],\r\n (state, key) =>\r\n state[key] && state[key].data.metadata.bUseDateAndTimeFiltering\r\n);\r\n\r\nexport const showFiltersSelector = createSelector(\r\n [stateSelector, currentKeySelector],\r\n (state, key) =>\r\n state[key] &&\r\n (state[key].data.columns.some((c) => c.bFilterable) ||\r\n state[key].data.metadata.bShowReportDateFilters)\r\n);\r\n\r\n// export const startDateSelector = createSelector(\r\n// [stateSelector, currentKeySelector],\r\n// (state, key) => (state[key] ? state[key].data.startDate : undefined)\r\n// );\r\n\r\n// export const endDateSelector = createSelector(\r\n// [stateSelector, currentKeySelector],\r\n// (state, key) => (state[key] ? state[key].data.endDate : undefined)\r\n// );\r\n\r\nexport const loadingModalSelector = (state: AppState) =>\r\n state.table.showLoadingModal;\r\n\r\nexport const showLoadingSelector = createSelector(\r\n [loadingModalSelector, selectPageLoading],\r\n (modal, page) => modal && !page\r\n);\r\n\r\nexport const dateFlagSelector = (state: AppState): number =>\r\n state.table.dateFilterFlag;\r\n\r\n// Action Creators\r\n\r\nconst showLoadingModal = (): Action => ({ type: SHOW_LOADING_MODAL });\r\n\r\nexport const showDetails = (payload: number): Action => ({\r\n type: OPENED_DETAILS,\r\n payload,\r\n});\r\n\r\nexport const hideDetails = (): Action => ({ type: CLOSED_DETAILS });\r\n\r\nexport const showSettings = (): Action => ({ type: OPENED_SETTINGS });\r\nexport const hideSettings = (): Action => ({ type: CLOSED_SETTINGS });\r\n\r\nexport const setCurrentUrl = (payload: Url): Action => ({\r\n type: SET_CURRENT_URL,\r\n payload,\r\n});\r\n\r\nexport const closeTable = (): Action => ({ type: CLOSED_TABLE });\r\n\r\nexport const updateTable = (\r\n key: Url,\r\n details: Partial,\r\n tag?: UpdateTag\r\n): Action => ({\r\n type: UPDATE_TABLE,\r\n payload: {\r\n key,\r\n details: {\r\n ...details,\r\n },\r\n },\r\n tag,\r\n});\r\n\r\nconst updatedTable = (\r\n key: Url,\r\n value: GetList200Response,\r\n tag?: UpdateTag\r\n): Action => ({\r\n type: UPDATED_TABLE,\r\n payload: { key, value },\r\n tag,\r\n});\r\n\r\nexport const updateCurrentNamespace = (namespace: string): Action => ({\r\n type: UPDATE_NAMESPACE,\r\n namespace,\r\n});\r\n\r\nconst errorUpdateTable = (payload: Error, tag?: UpdateTag): Action => ({\r\n type: ERROR_UPDATE_TABLE,\r\n payload,\r\n tag,\r\n});\r\n\r\nexport const changeFilterValue = (payload: Filters): Action => ({\r\n type: CHANGED_FILTER_VALUE,\r\n payload,\r\n});\r\n","/** @jsx jsx */\r\nimport React, { useEffect } from \"react\";\r\nimport { useSpring, animated, config } from \"react-spring\";\r\nimport { css, jsx } from \"@emotion/core\";\r\nimport { useMedia } from \"use-media\";\r\nimport { useTheme } from \"emotion-theming\";\r\nimport styled, { Theme } from \"theme\";\r\n\r\nexport interface TabBarProps {\r\n items: string[];\r\n selected: number;\r\n changeSelected: (i: number) => void;\r\n noTopBorder?: boolean;\r\n}\r\n\r\nconst MobileTabBar = (props: TabBarProps) => {\r\n const { items, selected, changeSelected } = props;\r\n\r\n const handleChange = (e: React.ChangeEvent) => {\r\n const value = items.findIndex(item => item === e.currentTarget.value);\r\n if (value !== -1) changeSelected(value);\r\n };\r\n\r\n return (\r\n \r\n \r\n {items.map(item => (\r\n \r\n ))}\r\n \r\n \r\n );\r\n};\r\n\r\nconst TabSelect = styled.select`\r\n width: 100%;\r\n font-size: 1.2em;\r\n background-color: ${props => props.theme.colors.second};\r\n color: white;\r\n border: none;\r\n border-top: 1px solid ${props => props.theme.colors.third}\r\n border-radius: 0px;\r\n text-align: center;\r\n -webkit-appearance: none;\r\n -moz-appearance: none;\r\n appearance: none;\r\n background-image: url(\"../../../assets/openArrow.svg\");\r\n background-repeat: no-repeat;\r\n background-position: 100% center;\r\n background-size: 10%;\r\n margin: 0px;\r\n`;\r\n\r\nconst FullTabBar = (props: TabBarProps) => {\r\n const theme = useTheme();\r\n const { noTopBorder, items, selected, changeSelected } = props;\r\n const percentage = 100 / items.length;\r\n const [spring, updateSpring] = useSpring(() => ({\r\n config: config.stiff,\r\n left: `${selected * percentage}%`,\r\n right: `${100 - (selected + 1) * percentage}%`,\r\n }));\r\n\r\n // Keep the tab bar animation synchronised with selected regardless of how it changes.\r\n useEffect(() => {\r\n updateSpring({\r\n left: `${selected * percentage}%`,\r\n right: `${100 - (selected + 1) * percentage}%`,\r\n });\r\n }, [percentage, selected, updateSpring]);\r\n\r\n const handleClick = (i: number) => () => {\r\n changeSelected(i);\r\n };\r\n\r\n const selectedTab = css`\r\n color: ${theme.colors.fourth} !important;\r\n font-weight: 700;\r\n &:focus {\r\n outline: none;\r\n color: lightgray;\r\n }\r\n `;\r\n\r\n const otherTab = css`\r\n color: #77868b;\r\n &:focus {\r\n outline: none;\r\n color: lightgray;\r\n }\r\n `;\r\n\r\n const tabs = items.map((item, i) => (\r\n \r\n \r\n {item}\r\n \r\n \r\n ));\r\n\r\n const topBorder = css`\r\n border-top: 1px solid ${theme.colors.third};\r\n `;\r\n\r\n return (\r\n \r\n \r\n {tabs}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst Container = styled.div`\r\n display: flex;\r\n box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.2);\r\n justify-content: space-between;\r\n min-height: 49px;\r\n overflow: visible;\r\n z-index: 3;\r\n\r\n & * {\r\n z-index: 3;\r\n }\r\n\r\n button {\r\n font-family: \"Nunito Sans\", \"Nunito\", sans-serif;\r\n font-size: 13px;\r\n line-height: 14px;\r\n letter-spacing: 1px;\r\n text-transform: uppercase;\r\n display: inline;\r\n text-align: center;\r\n cursor: pointer;\r\n padding: 0px 3px;\r\n font-weight: 700;\r\n padding: 5px 10px;\r\n background-color: ${props => props.theme.colors.second};\r\n color: #aaabb8;\r\n width: 100%;\r\n border: none;\r\n min-width: 10em;\r\n height: 100%;\r\n border-bottom: 2px solid ${props => props.theme.colors.second};\r\n }\r\n`;\r\n\r\nconst ButtonContainer = styled.div`\r\n flex: 1;\r\n display: flex;\r\n flex-direction: column;\r\n`;\r\nconst IndicatorContainer = styled.div`\r\n position: relative;\r\n height: 5px;\r\n background: ${props => props.theme.colors.second};\r\n`;\r\n\r\nconst SelectedIndicator = styled(animated.div)`\r\n position: absolute;\r\n width: auto;\r\n height: 5px;\r\n background: ${props => props.theme.colors.fourth};\r\n`;\r\n\r\nconst Bar = styled.div`\r\n display: flex;\r\n flex-direction: column;\r\n width: 100%;\r\n`;\r\n\r\nconst Tabs = styled.div`\r\n display: flex;\r\n flex-grow: 1;\r\n`;\r\n\r\nconst TabBar = (props: TabBarProps) => {\r\n const isSmall = useMedia({ maxWidth: 768 });\r\n\r\n return !isSmall ? : ;\r\n};\r\n\r\nexport default TabBar;\r\n","export const isProduction = process.env.REACT_APP_BUILD_TYPE === \"production\";\r\n\r\nexport const BASE_URL = isProduction\r\n ? \"https://api.sportsbookmall.com\"\r\n : \"https://dsi-pph.api.avamae.co.uk\";\r\n\r\nexport const RESET_LINK_URL =\r\n process.env.NODE_ENV === \"development\"\r\n ? \"localhost:3000/reset-password\"\r\n : isProduction\r\n ? \"https://www.sportsbookmall.com/reset-password\"\r\n : \"https://dsi-pph-agent.dev.avamae.co.uk/reset-password\";\r\n\r\nexport function getResetLink() {\r\n const { origin } = new URL(document.URL);\r\n return origin + \"/reset-password\";\r\n}\r\n\r\n// API Client endpoints\r\nexport const API_CLIENT_URL = \"/api/v1/APIClients/\";\r\n// Users Public endpoints\r\nexport const USERS_PUBLIC_URL = \"/api/v1/UsersPublic/\";\r\n// Auth endpoints\r\nexport const AUTH_URL = \"/api/v1/Auth/\";\r\n// Navigation endpoints\r\nexport const NAVIGATION_URL = \"/api/v1/Navigation/\";\r\n\r\n// Dashboard endpoints\r\nexport const DASHBOARD_URL = \"/api/v1/AgentReports/DashboardPanels/\";\r\n\r\n// Player search endpoints\r\nexport const PLAYERSEARCH_URL = \"/api/v1/AgentPlayerSearch/\";\r\n\r\n// Payment endpoints\r\nexport const PAYMENTS_URL = \"/api/v1/AgentPlayerPayments/\";\r\nexport const BONUSES_URL = \"/api/v1/PlayersBonuses/\";\r\n\r\n// Players page endpoints\r\nexport const PLAYERS_URL = \"/api/v1/Players/\";\r\n\r\n// Reports pages\r\nexport const AGENTREPORTS_URL = \"/api/v1/AgentReports/\";\r\nexport const AGENTREPORTLIST_URL = \"/api/v1/AgentReportLists/\";\r\n\r\nexport const MARKETING_URL = \"/api/v1/Marketing/contact-us\";\r\n\r\n// Path names.\r\nexport const paths = {\r\n SIGNIN: \"/signin\",\r\n FORGOTPASSWORD: \"/forgotpassword\",\r\n RESETPASSWORD: \"/reset-password\",\r\n PLAYERS: \"/players\",\r\n REPORTS: \"/reports\",\r\n BILLING: \"/billing\",\r\n WAGERS: \"/wagers\",\r\n EPOSWAGERS: \"/epos-wagers\",\r\n EPOSUSERS: \"/epos-users\",\r\n CALLCENTERUSERS: \"/call-center-users\",\r\n MARKETING: \"/marketing\",\r\n};\r\n","import React from \"react\";\r\nimport { Maybe } from \"purify-ts/Maybe\";\r\nimport { find, propEq } from \"ramda\";\r\nimport { translateError, toPascal } from \"../../../helpers/errors\";\r\nimport { ErrorMessage } from \"formik\";\r\nimport styles from \"./ValidationError.module.css\";\r\n\r\nconst validationError = (props: {\r\n errors: { fieldName: string; messageCode: string }[];\r\n name: string;\r\n noPascal?: boolean;\r\n}) => {\r\n const pascalisedName = props.noPascal ? props.name : toPascal(props.name);\r\n const validate = Maybe.fromNullable(\r\n props.errors\r\n ? find(propEq(\"fieldName\", pascalisedName), props.errors)\r\n : null\r\n );\r\n const serverError = validate.caseOf({\r\n Just: e =>\r\n e ? translateError(e.messageCode).orDefault(e.messageCode) : \"Error\",\r\n Nothing: () => null,\r\n });\r\n\r\n return (\r\n \r\n
\r\n \r\n {msg =>
{msg}
}\r\n
\r\n
{serverError}
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default validationError;\r\n","import produce from \"immer\";\r\nimport { createSelector } from \"reselect\";\r\nimport { initialTheme, Theme } from \"theme\";\r\nimport { AppState } from \"reducers/rootReducer\";\r\nimport { IWindowFeatures } from \"react-new-window\";\r\nimport {\r\n combineEpics,\r\n StateObservable,\r\n ActionsObservable,\r\n} from \"redux-observable\";\r\nimport { SIGN_IN_SUCCESS, GOT_DETAILS } from \"reducers/auth\";\r\nimport {\r\n filter,\r\n mergeMap,\r\n map,\r\n withLatestFrom,\r\n delay,\r\n takeUntil,\r\n} from \"rxjs/operators\";\r\nimport { of } from \"rxjs\";\r\nimport { combineReducers } from \"redux\";\r\nimport { CurrencyCode } from \"helpers/currency\";\r\n\r\nexport type Toast = {\r\n text: string;\r\n kind?: \"info\" | \"error\";\r\n};\r\n\r\ntype ToastState = Readonly<{\r\n toasts: { toast: Toast; uid: number }[];\r\n latestToast: number;\r\n errorModal: null | string;\r\n}>;\r\n\r\nconst initialToastState: ToastState = {\r\n toasts: [],\r\n latestToast: 0,\r\n errorModal: null,\r\n};\r\n\r\ntype State = Readonly<{\r\n betTicker: {\r\n betTickerWindowFeatures: IWindowFeatures | null;\r\n showBetTickerWindow: boolean;\r\n betTickerCurrencyCode: CurrencyCode;\r\n };\r\n theme: Theme;\r\n wagersTab: number;\r\n topWinningTab: number;\r\n topLosingTab: number;\r\n showTooltips: boolean;\r\n showTutorialOnLogin: boolean;\r\n tutorialStage: number | null;\r\n pageLoading: boolean;\r\n defaultPath: string;\r\n images: { assetsPath: string; signInBackgroundImage: null | string };\r\n showReferencesToCredit: boolean;\r\n companyName: string;\r\n signInHeader: string;\r\n bAccountLocked: boolean;\r\n}>;\r\n\r\nexport const TUTORIAL_STAGE_MAX = 6;\r\n\r\nconst initialState: State = {\r\n betTicker: {\r\n betTickerWindowFeatures: null,\r\n showBetTickerWindow: false,\r\n betTickerCurrencyCode: \"USD\",\r\n },\r\n theme: initialTheme,\r\n pageLoading: false,\r\n images: {\r\n assetsPath: \"/assets/default\",\r\n signInBackgroundImage: null,\r\n },\r\n companyName: \"\",\r\n signInHeader: \"\",\r\n wagersTab: 0,\r\n showReferencesToCredit: true,\r\n topWinningTab: 0,\r\n topLosingTab: 0,\r\n showTooltips: true,\r\n showTutorialOnLogin: false,\r\n tutorialStage: null,\r\n defaultPath: \"\",\r\n bAccountLocked: false,\r\n};\r\n\r\nconst SWITCH_WAGERS_TAB = \"app/ui/SWITCH_WAGERS_TAB\";\r\nconst SWITCH_WINNERS_TAB = \"app/ui/SWITCH_WINNERS_TAB\";\r\nconst SWITCH_LOSERS_TAB = \"app/ui/SWITCH_LOSERS_TAB\";\r\nconst SHOW_ERROR = \"app/ui/SHOW_ERROR\";\r\nconst ERROR_DISMISSED = \"app/ui/ERROR_DISMISSED\";\r\nconst TOAST_DISMISSED = \"app/ui/TOAST_DISMISSED\";\r\nconst TOAST_CREATED = \"app/ui/TOAST_CREATED\";\r\nconst UI_SETTINGS_UPDATE = \"app/ui/UI_SETTINGS_UPDATE\";\r\nconst UI_SETTINGS_UPDATE_STARTUP = \"app/ui/UI_SETTINGS_UPDATE_STARTUP\";\r\nconst INCREMENT_TUTORIAL_STAGE = \"app/ui/INCREMENT_TUTORIAL_STAGE\";\r\nconst DECREMENT_TUTORIAL_STAGE = \"app/ui/DECREMENT_TUTORIAL_STAGE\";\r\nconst CHANGE_THEME_COLOR = \"app/ui/CHANGE_THEME_COLOR\";\r\nconst CHANGE_PAGE_LOADING = \"app/ui/CHANGE_PAGE_LOADING\";\r\nconst SET_TUTORIAL_STAGE = \"app/ui/SET_TUTORIAL_STAGE\";\r\nconst SHOW_TUTORIAL = \"app/ui/SHOW_TUTORIAL\";\r\nconst HIDE_TUTORIAL = \"app/ui/HIDE_TUTORIAL\";\r\nconst CHANGE_THEME = \"app/ui/CHANGE_THEME\";\r\nconst BET_TICKER_WINDOW_FEATURES = \"app/ui/BET_TICKER_WINDOW_FEATURES\";\r\nconst SHOW_BET_TICKER_WINDOW = \"app/ui/SHOW_BET_TICKER_WINDOW\";\r\nconst CHANGE_BET_TICKER_CURRENCY = \"app/ui/CHANGE_BET_TICKER_CURRENCY\";\r\n\r\ntype ErrorAction = {\r\n type: string;\r\n error: Error;\r\n payload?: unknown;\r\n};\r\n\r\ntype ToastAction = {\r\n type: string;\r\n toast: Toast;\r\n payload?: unknown;\r\n};\r\n\r\nexport type WithToast = { toast?: Toast } & T;\r\n\r\ntype Action =\r\n | {\r\n type: typeof GOT_DETAILS;\r\n payload: {\r\n licenseesID: number;\r\n accountType: string;\r\n initialTheme: Theme;\r\n companyName: string;\r\n signInHeader: string;\r\n images: { assetsPath: string; signInBackgroundImage: null | string };\r\n };\r\n }\r\n | {\r\n type: typeof CHANGE_THEME_COLOR;\r\n payload: {\r\n color: string;\r\n which: \"first\" | \"second\" | \"third\" | \"fourth\";\r\n };\r\n }\r\n | { type: typeof SWITCH_WAGERS_TAB; payload: number }\r\n | { type: typeof SWITCH_WINNERS_TAB; payload: number }\r\n | { type: typeof SWITCH_LOSERS_TAB; payload: number }\r\n | { type: typeof SHOW_ERROR; payload: Error }\r\n | { type: typeof ERROR_DISMISSED }\r\n | { type: typeof TOAST_DISMISSED; payload: number }\r\n | { type: typeof TOAST_CREATED; toast: Toast }\r\n | {\r\n type: typeof SIGN_IN_SUCCESS;\r\n payload: [\r\n {\r\n defaultPath: string;\r\n bAccountLocked: boolean;\r\n navigationItems: unknown[];\r\n },\r\n unknown[]\r\n ];\r\n }\r\n | {\r\n type: typeof UI_SETTINGS_UPDATE | typeof UI_SETTINGS_UPDATE_STARTUP;\r\n payload: { bShowTutorialOnLogin: boolean; bShowTooltips: boolean };\r\n }\r\n | { type: typeof INCREMENT_TUTORIAL_STAGE }\r\n | { type: typeof DECREMENT_TUTORIAL_STAGE }\r\n | { type: typeof SET_TUTORIAL_STAGE; payload: number }\r\n | { type: typeof SHOW_TUTORIAL }\r\n | { type: typeof HIDE_TUTORIAL }\r\n | { type: typeof CHANGE_PAGE_LOADING; payload: boolean }\r\n | { type: typeof CHANGE_THEME; payload: Theme }\r\n | {\r\n type: typeof BET_TICKER_WINDOW_FEATURES;\r\n features: IWindowFeatures | null;\r\n }\r\n | { type: typeof SHOW_BET_TICKER_WINDOW; payload: boolean }\r\n | { type: typeof CHANGE_BET_TICKER_CURRENCY; currency: CurrencyCode };\r\n\r\nconst uiReducer = (state = initialState, action: Action): State =>\r\n produce(state, draft => {\r\n switch (action.type) {\r\n case GOT_DETAILS:\r\n draft.theme = action.payload.initialTheme;\r\n draft.images = action.payload.images;\r\n draft.companyName = action.payload.companyName;\r\n draft.signInHeader = action.payload.signInHeader;\r\n draft.showReferencesToCredit =\r\n action.payload.companyName !== \"CamanBet\";\r\n break;\r\n case CHANGE_THEME:\r\n draft.theme = action.payload;\r\n break;\r\n case BET_TICKER_WINDOW_FEATURES:\r\n draft.betTicker.betTickerWindowFeatures = action.features;\r\n break;\r\n case CHANGE_BET_TICKER_CURRENCY:\r\n draft.betTicker.betTickerCurrencyCode = action.currency;\r\n break;\r\n case SHOW_BET_TICKER_WINDOW:\r\n draft.betTicker.showBetTickerWindow = action.payload;\r\n break;\r\n case CHANGE_THEME_COLOR:\r\n draft.theme.colors[action.payload.which] = action.payload.color;\r\n break;\r\n case CHANGE_PAGE_LOADING:\r\n draft.pageLoading = action.payload;\r\n break;\r\n case SWITCH_WAGERS_TAB:\r\n draft.wagersTab = action.payload;\r\n break;\r\n case SWITCH_WINNERS_TAB:\r\n draft.topWinningTab = action.payload;\r\n break;\r\n case SWITCH_LOSERS_TAB:\r\n draft.topLosingTab = action.payload;\r\n break;\r\n case UI_SETTINGS_UPDATE:\r\n draft.showTooltips = action.payload.bShowTooltips;\r\n draft.showTutorialOnLogin = action.payload.bShowTutorialOnLogin;\r\n break;\r\n case UI_SETTINGS_UPDATE_STARTUP:\r\n draft.showTooltips = action.payload.bShowTooltips;\r\n draft.showTutorialOnLogin = action.payload.bShowTutorialOnLogin;\r\n if (action.payload.bShowTutorialOnLogin) draft.tutorialStage = 0;\r\n break;\r\n case SIGN_IN_SUCCESS:\r\n draft.defaultPath = action.payload[0].defaultPath;\r\n draft.bAccountLocked = action.payload[0].bAccountLocked;\r\n break;\r\n case DECREMENT_TUTORIAL_STAGE:\r\n if (draft.tutorialStage !== null && draft.tutorialStage > 0)\r\n draft.tutorialStage -= 1;\r\n break;\r\n case INCREMENT_TUTORIAL_STAGE:\r\n if (\r\n draft.tutorialStage !== null &&\r\n draft.tutorialStage < TUTORIAL_STAGE_MAX\r\n )\r\n draft.tutorialStage += 1;\r\n break;\r\n case SET_TUTORIAL_STAGE:\r\n if (action.payload >= 0 && action.payload <= TUTORIAL_STAGE_MAX) {\r\n draft.tutorialStage = action.payload;\r\n }\r\n break;\r\n case SHOW_TUTORIAL:\r\n if (draft.tutorialStage === null) draft.tutorialStage = 0;\r\n break;\r\n case HIDE_TUTORIAL:\r\n draft.tutorialStage = null;\r\n break;\r\n }\r\n });\r\n\r\nconst toastReducer = (\r\n state = initialToastState,\r\n action: Action | ToastAction | ErrorAction\r\n): ToastState =>\r\n produce(state, draft => {\r\n if (\"error\" in action) {\r\n draft.errorModal = action.error.message;\r\n } else if (\"toast\" in action) {\r\n const uid = state.latestToast + 1;\r\n draft.toasts.push({ toast: action.toast, uid });\r\n draft.latestToast = uid;\r\n } else {\r\n switch (action.type) {\r\n case SHOW_ERROR:\r\n draft.errorModal = action.payload.message;\r\n break;\r\n case ERROR_DISMISSED:\r\n draft.errorModal = null;\r\n break;\r\n case TOAST_DISMISSED:\r\n draft.toasts = draft.toasts.filter(x => x.uid !== action.payload);\r\n break;\r\n }\r\n }\r\n });\r\n\r\nexport const reducer = combineReducers({\r\n settings: uiReducer,\r\n toasts: toastReducer,\r\n});\r\n\r\nconst hideToastsEpic = (\r\n action$: ActionsObservable,\r\n state$: StateObservable\r\n) =>\r\n action$.pipe(\r\n filter(action => \"toast\" in action),\r\n withLatestFrom(state$),\r\n map(([_, state]) => selectLatestToast(state)),\r\n mergeMap(uid =>\r\n of(uid).pipe(\r\n delay(3000),\r\n map(dismissToast),\r\n takeUntil(\r\n action$.pipe(\r\n filter(\r\n action =>\r\n action.type === TOAST_DISMISSED && action.payload === uid\r\n )\r\n )\r\n )\r\n )\r\n )\r\n );\r\n\r\nexport const uiEpic = combineEpics(hideToastsEpic);\r\n\r\n/* Action Creators */\r\n\r\nexport const setBetTickerFeatures = (features: IWindowFeatures | null) => ({\r\n type: BET_TICKER_WINDOW_FEATURES,\r\n features,\r\n});\r\n\r\nexport const setShowBetTickerWindow = (payload: boolean) => ({\r\n type: SHOW_BET_TICKER_WINDOW,\r\n payload,\r\n});\r\n\r\nexport const setBetTickerCurrency = (currency: CurrencyCode) => ({\r\n type: CHANGE_BET_TICKER_CURRENCY,\r\n currency,\r\n});\r\n\r\nexport const switchWagersTab = (payload: number): Action => ({\r\n type: SWITCH_WAGERS_TAB,\r\n payload,\r\n});\r\n\r\nexport const switchWinningTab = (payload: number): Action => ({\r\n type: SWITCH_WINNERS_TAB,\r\n payload,\r\n});\r\n\r\nexport const switchLosingTab = (payload: number): Action => ({\r\n type: SWITCH_LOSERS_TAB,\r\n payload,\r\n});\r\n\r\nexport const showError = (payload: Error): Action => ({\r\n type: SHOW_ERROR,\r\n payload,\r\n});\r\n\r\nexport const dismissError = (): Action => ({\r\n type: ERROR_DISMISSED,\r\n});\r\n\r\nexport const dismissToast = (payload: number): Action => ({\r\n type: TOAST_DISMISSED,\r\n payload,\r\n});\r\n\r\nexport const createErrorToast = (text: string): ToastAction => ({\r\n type: TOAST_CREATED,\r\n toast: { kind: \"error\", text },\r\n});\r\n\r\nexport const createInfoToast = (text: string): ToastAction => ({\r\n type: TOAST_CREATED,\r\n toast: { kind: \"info\", text },\r\n});\r\n\r\nexport const updateTableSettings = (\r\n payload: {\r\n bShowTutorialOnLogin: boolean;\r\n bShowTooltips: boolean;\r\n },\r\n startup = false\r\n): Action | (Action & ToastAction) =>\r\n !startup\r\n ? {\r\n type: UI_SETTINGS_UPDATE,\r\n payload,\r\n toast: { kind: \"info\", text: \"Successfully updated settings.\" },\r\n }\r\n : {\r\n type: UI_SETTINGS_UPDATE_STARTUP,\r\n payload,\r\n };\r\n\r\nexport const incrementTutorialScreen = (): Action => ({\r\n type: INCREMENT_TUTORIAL_STAGE,\r\n});\r\n\r\nexport const changePageLoading = (payload: boolean): Action => ({\r\n type: CHANGE_PAGE_LOADING,\r\n payload,\r\n});\r\n\r\nexport const decrementTutorialScreen = (): Action => ({\r\n type: DECREMENT_TUTORIAL_STAGE,\r\n});\r\n\r\nexport const setTutorialScreen = (payload: number): Action => ({\r\n type: SET_TUTORIAL_STAGE,\r\n payload,\r\n});\r\n\r\nexport const hideTutorial = (): Action => ({\r\n type: HIDE_TUTORIAL,\r\n});\r\n\r\nexport const showTutorial = (): Action => ({\r\n type: SHOW_TUTORIAL,\r\n});\r\n\r\nexport const changeThemeColor = (\r\n which: \"first\" | \"second\" | \"third\" | \"fourth\",\r\n color: string\r\n): Action => ({\r\n type: CHANGE_THEME_COLOR,\r\n payload: { which, color },\r\n});\r\n\r\nexport const changeTheme = (payload: Theme): Action => {\r\n return {\r\n type: CHANGE_THEME,\r\n payload,\r\n };\r\n};\r\n\r\n/* Selectors */\r\n\r\nexport const selectAccountLocked = (state: AppState): boolean =>\r\n state.ui.settings.bAccountLocked;\r\n\r\nexport const selectDefaultPath = (state: AppState): string =>\r\n state.ui.settings.defaultPath;\r\n\r\nexport const selectBetTickerCurrency = (state: AppState): CurrencyCode =>\r\n state.ui.settings.betTicker.betTickerCurrencyCode;\r\n\r\nexport const selectShowCreditReferences = (state: AppState): boolean =>\r\n state.ui.settings.showReferencesToCredit;\r\n\r\nexport const selectShowBetTickerWindow = (state: AppState): boolean =>\r\n state.ui.settings.betTicker.showBetTickerWindow;\r\n\r\nexport const selectBetTickerWindowFeatures = (\r\n state: AppState\r\n): IWindowFeatures | null =>\r\n state.ui.settings.betTicker.betTickerWindowFeatures;\r\n\r\nexport const selectTheme = (state: AppState): Theme => state.ui.settings.theme;\r\nexport const selectAssetsPath = (state: AppState): string =>\r\n state.ui.settings.images.assetsPath;\r\n\r\nexport const selectSignInImage = (state: AppState): string | null =>\r\n state.ui.settings.images.signInBackgroundImage;\r\n\r\nexport const selectCompanyName = (state: AppState): string =>\r\n state.ui.settings.companyName;\r\n\r\nexport const selectSignInHeader = (state: AppState): string =>\r\n state.ui.settings.signInHeader;\r\n\r\nexport const selectWagersTab = (state: AppState): number =>\r\n state.ui.settings.wagersTab;\r\n\r\nexport const selectWinningTab = (state: AppState): number =>\r\n state.ui.settings.topWinningTab;\r\n\r\nexport const selectLosingTab = (state: AppState): number =>\r\n state.ui.settings.topLosingTab;\r\n\r\nexport const selectPageLoading = (state: AppState): boolean =>\r\n state.ui.settings.pageLoading;\r\n\r\nexport const selectLatestToast = (app: AppState): number =>\r\n app.ui.toasts.latestToast;\r\nexport const selectToastList = (app: AppState) => app.ui.toasts.toasts;\r\nexport const selectShowTooltips = (app: AppState): boolean =>\r\n app.ui.settings.showTooltips;\r\n\r\nexport const selectTutorialStage = (app: AppState): number | null =>\r\n app.ui.settings.tutorialStage;\r\nexport const selectShowTutorialOnLogin = (app: AppState): boolean =>\r\n app.ui.settings.showTutorialOnLogin;\r\n\r\nexport const selectTutorialVisible = createSelector(\r\n [selectTutorialStage, selectShowTutorialOnLogin],\r\n (stage, onLogin) => stage !== null && onLogin\r\n);\r\n","import { combineReducers } from \"redux\";\r\nimport {\r\n auto_login_url_200,\r\n player_balances_panel_200,\r\n} from \"types/ApiResponseTypes\";\r\nimport {\r\n tGetActions as getActions,\r\n tListActions as listActions,\r\n} from \"helpers/actions\";\r\nimport { PLAYERS_URL } from \"serverDetails\";\r\nimport { mapTo, map, tap } from \"rxjs/operators\";\r\nimport { ofType, combineEpics, ActionsObservable } from \"redux-observable\";\r\n\r\nconst initialAutoLoginState: auto_login_url_200 = {\r\n takeBetURL: \"\",\r\n};\r\n\r\n/* -- LIST ACTIONS -- */\r\nexport const [listPlayerManagement, agentPlayerManagementReducer] = listActions(\r\n \"AGENTPLAYERMANAGEMENT\",\r\n PLAYERS_URL + \"AgentPlayerManagement/list\"\r\n);\r\n\r\nexport const [fetchAutoLoginUrl, autoLoginUrlReducer] = getActions(\r\n \"AUTO_LOGIN_URL\",\r\n PLAYERS_URL + \"TakeBet/auto-login-url\",\r\n initialAutoLoginState\r\n);\r\n\r\nconst openAutoLoginPageEpic = (action$: ActionsObservable) =>\r\n action$.pipe(\r\n ofType(\"FETCHED_AUTO_LOGIN_URL\"),\r\n map(action => action.payload.data.takeBetURL),\r\n tap(url => {\r\n const win = window.open(url, \"_blank\", \"toolbar=0,location=0,menubar=0\");\r\n win && win.focus();\r\n }),\r\n mapTo({ type: \"OPENED_AUTO_LOGIN_WINDOW\" })\r\n );\r\n\r\n/* -- BY ID ACTIONS -- */\r\n\r\n/* -- balance panel -- */\r\n\r\nconst initialPlayerBalancePanelState: player_balances_panel_200 = {\r\n playersID: -1,\r\n currentBalance: -1,\r\n balanceLastWeek: -1,\r\n balancePending: -1,\r\n totalCredit: -1,\r\n temporaryCredit: -1,\r\n availableBalance: -1,\r\n currencyCode: \"USD\",\r\n};\r\n\r\nexport const [\r\n fetchPlayerBalancesPanel,\r\n playerBalancesPanelReducer,\r\n] = getActions(\r\n \"PLAYER_BALANCES_PANEL\",\r\n PLAYERS_URL + \"AgentPlayerProfile/player-balances-panel\",\r\n initialPlayerBalancePanelState\r\n);\r\n\r\n/* -- MAIN REDUCER AND SAGA -- */\r\n\r\nexport const playersReducer = combineReducers({\r\n agentPlayerManagementReducer,\r\n autoLoginUrlReducer,\r\n playerProfileReducer: combineReducers({\r\n playerBalancesPanelReducer,\r\n }),\r\n});\r\n\r\nexport const playersEpic = combineEpics(openAutoLoginPageEpic);\r\n","import { createSelector, Selector } from \"reselect\";\r\nimport { GetState } from \"../types/ReducerTypes\";\r\nimport { AppState } from \"reducers/rootReducer\";\r\nimport { FetchStatus } from \"../types/BasicTypes\";\r\nimport { Maybe } from \"purify-ts/Maybe\";\r\nimport { maybeFindIndex } from \"./functions\";\r\n\r\nexport const selectCacheIndexFromItems = (\r\n users: T[],\r\n searchId: number\r\n): Maybe =>\r\n maybeFindIndex((id: number) => id === searchId, users.map(user => user.id));\r\n\r\n/*\r\n * I'd like to use this instead of GetState, like a haskell typeclass or Rust trait,\r\n * (or my understanding of a Java interface), but TypeScript doesn't seem to allow\r\n * mixing and matching multiple extensions of WithFetchStatus in a single T.\r\n */\r\ninterface WithFetchStatus {\r\n fetchStatus: FetchStatus;\r\n data: any;\r\n}\r\n\r\n/**\r\n * Take any number of selectors, and return a selector which will return true\r\n * if any of the input states are currently fetching data or in a start-state.\r\n *\r\n * This is used by the main pages, to determine if they should be showing a loading\r\n * screen or displaying content. It gets fed into the Page component, usually like:\r\n *\r\n * \r\n * // ...\r\n * \r\n *\r\n */\r\nexport const createLoadingSelector = (\r\n ...selectors: Selector>[]\r\n) =>\r\n createSelector(\r\n selectors,\r\n (...args) =>\r\n args\r\n .map(\r\n x => x.fetchStatus !== \"fetchingData\" && x.fetchStatus !== \"noData\"\r\n )\r\n .includes(false)\r\n );\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"AllWagersTable_container__JKIjS\",\"description\":\"AllWagersTable_description__3Bjhw\",\"expandCol\":\"AllWagersTable_expandCol__2xuW0\",\"descriptionCol\":\"AllWagersTable_descriptionCol___670b\",\"childContainer\":\"AllWagersTable_childContainer__2ikrd\",\"simpleChild\":\"AllWagersTable_simpleChild__2N6bQ\",\"simpleChildSpacer\":\"AllWagersTable_simpleChildSpacer__3TzAn\",\"detailedChild\":\"AllWagersTable_detailedChild__1ySzS\",\"betCode\":\"AllWagersTable_betCode__3Rn-_\",\"childChildrenList\":\"AllWagersTable_childChildrenList__fjyGU\",\"currency\":\"AllWagersTable_currency__2ltyo\"};","import { Maybe } from \"purify-ts/Maybe\";\r\nconst errorMessages: { [key: string]: string } = {\r\n Required: \"Need to supply a value.\",\r\n Invalid: \"Values is not valid.\",\r\n Invalid_Email: \"Email address is invalid.\",\r\n Invalid_URL: \"URL is not in the correct format.\",\r\n Account_in_Use:\r\n \"The email address provided is already associated with an existing account.\",\r\n PIN_Min_Length_4: \"PIN must be at least 4 digits long.\",\r\n Invalid_Date_Of_Birth: \"Date of birth must be a valid date in the past.\",\r\n Invalid_Time_Zone: \"Time zone must be a valid IANA time zone.\",\r\n Account_Locked:\r\n \"Account has been locked for ten minutes, due to repeated incorrect password entry.\",\r\n Server_Error: \"Unexpected server error occurred.\",\r\n TFA_Code_Incorrect:\r\n \"The Two-factor Authentication code entered was incorrect.\",\r\n TFA_Code_Expired: \"The Two-factor Authentication code entered has expired.\",\r\n Invalid_Player: \"Player could not be found with the given ID.\",\r\n Invalid_Currency_Code: \"Currency is not valid.\",\r\n Invalid_Payment_Type: \"Payment type does not exist.\",\r\n Payment_Type_Not_Allowed: \"Payment type is not permitted.\",\r\n Invalid_Balance_Type: \"Balance type does not exist.\",\r\n Balance_Payment_Type_Mismatch:\r\n \"Selected balance and payment types are incompatible.\",\r\n Invalid_Amount: \"Amount provided is not valid.\",\r\n Invalid_Amount_For_Type: \"Amount is not valid for provided payment type.\",\r\n Positive_Or_Null_Amount_Required: \"Amount provided must be positive.\",\r\n Player_Not_Found: \"Player could not be found with the given ID.\",\r\n Date_In_Past: \"Date given cannot be in the past\",\r\n User_Not_Found: \"Either username or password is incorrect.\",\r\n};\r\n\r\nexport const translateError = (error: string): Maybe =>\r\n Maybe.fromNullable(errorMessages[error]);\r\n\r\nexport const toPascal = (name: string): string =>\r\n name\r\n .split(\".\")\r\n .map(x => x[0].toUpperCase() + x.slice(1))\r\n .join(\".\");\r\n\r\nexport const dePascal = (name: string): string =>\r\n name\r\n .split(\".\")\r\n .map(x => x[0].toLowerCase() + x.slice(1))\r\n .join(\".\");\r\n","type GenericObject = { [key: string]: T };\r\n\r\n// XXX: Unsafe if you can't sort by the key values. Feels like you should be able\r\n// to achieve this check. Maybe if typescript had haskell type classes/rust traits\r\n// and we could have:\r\n// ...\r\n// a: GenericObject\r\n// b: GenericObject\r\n// ...\r\n// That said, I'm not sure javascript's .sort() actually chokes on any type.\r\n// So maybe it's fine.\r\nexport const cmpByKey = (key: string) => (\r\n a: GenericObject,\r\n b: GenericObject\r\n): -1 | 1 | 0 => {\r\n if (a[key] == null || b[key] == null) {\r\n throw new Error(`Key must be present on both objects.`);\r\n }\r\n if (a[key] < b[key]) {\r\n return -1;\r\n }\r\n if (a[key] > b[key]) {\r\n return 1;\r\n }\r\n return 0;\r\n};\r\n/**\r\n * Curried function that takes a list of strings representing a paths through\r\n * an object, eg \"user.personalDetails.name.firstName\", and an object. The function\r\n * traverses the object and adds the relevant keypairs to a new object, which is returned.\r\n */\r\nexport const selectKeys = (keys: string[]) => (obj: GenericObject) =>\r\n keys.reduce((acc: GenericObject, next) => {\r\n return {\r\n ...acc,\r\n [next]: getElementFromStringPath(next, obj),\r\n };\r\n }, {});\r\n\r\n/**\r\n * Used primarily by MainTable, via selectKeys(). Takes a string representing a path\r\n * through an object and an object, traverses the object and returns whatever\r\n * it finds at that point. So, for example:\r\n *\r\n * const fakeObject = {\r\n * levelOne: {\r\n * levelTwo: {\r\n * message: \"oh no\",\r\n * levelThree: \"hi what's up\",\r\n * },\r\n * },\r\n * };\r\n *\r\n * getElementFromStringPath(\"levelOne.levelTwo.message\", fakeObject) -> \"oh no\"\r\n * getElementFromStringPath(\"levelOne.levelTwo.levelThree\", fakeObject) -> \"hi what's up\"\r\n *\r\n */\r\nexport const getElementFromStringPath = (\r\n path: string,\r\n obj: GenericObject\r\n): T => path.split(\".\").reduce((acc: any, next: string) => acc[next], obj);\r\n\r\n/**\r\n * Takes any object. Returns true if any of the object's fields are null, false otherwise.\r\n */\r\nexport const hasNullField = (obj: GenericObject) =>\r\n !Object.values(obj).every(x => x != null);\r\n\r\ntype JsonItem =\r\n | string\r\n | (string | undefined)\r\n | number\r\n | (number | undefined)\r\n | object\r\n | Json\r\n | boolean\r\n | (boolean | undefined)\r\n | string[]\r\n | number[]\r\n | boolean[]\r\n | undefined;\r\n\r\nexport type Json = {\r\n [key: string]: JsonItem;\r\n};\r\n\r\n/**\r\n * Takes a nullable item and a default value, returns either the item or,\r\n * if it's null, the default value.\r\n */\r\nexport function orDefault(item: T | null, or: T): T {\r\n if (item === null) return or;\r\n return item;\r\n}\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"base\":\"SignIn_base__38m-6\",\"show\":\"SignIn_show__2CZK9\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"sideInfo\":\"SideInfo_sideInfo__2Sahc\",\"nancy\":\"SideInfo_nancy__22RKC\",\"bubble\":\"SideInfo_bubble__2rnBm\",\"mobileSideInfo\":\"SideInfo_mobileSideInfo__2Sgdp\"};","import React, {\r\n Reducer,\r\n useEffect,\r\n useState,\r\n useCallback,\r\n useReducer,\r\n} from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport {\r\n Loading,\r\n ErrorMessage,\r\n} from \"components/PageComponents/Loading/Loading\";\r\nimport { GetState } from \"types/ReducerTypes\";\r\nimport { AnyAction as Action } from \"redux\";\r\nimport { ThunkAction } from \"redux-thunk\";\r\nimport { AppState } from \"reducers/rootReducer\";\r\nimport { changePageLoading } from \"reducers/ui\";\r\nimport api from \"api\";\r\nimport { AxiosRequestConfig } from \"axios\";\r\nimport { usePrevious } from \"@avamae/hooks\";\r\n\r\nimport { statusSelector } from \"reducers/tableReducer\";\r\n\r\nexport default function useLoading(\r\n renderData: (getState: GetState) => React.ReactNode,\r\n actionCreator: () => Action | ThunkAction,\r\n selector: (state: AppState) => GetState,\r\n loadOnMount = true,\r\n noLoading = false\r\n) {\r\n const dispatch = useDispatch();\r\n const getData = () => dispatch(actionCreator());\r\n const getState = useSelector(selector);\r\n const status = getState.fetchStatus;\r\n\r\n useEffect(() => {\r\n if (loadOnMount) {\r\n dispatch(actionCreator());\r\n }\r\n }, [loadOnMount, dispatch, actionCreator]);\r\n\r\n switch (status) {\r\n case \"fetchedData\":\r\n return {renderData(getState)};\r\n case \"error\":\r\n return ;\r\n case \"fetchingData\":\r\n return noLoading ? (\r\n {renderData(getState)}\r\n ) : (\r\n \r\n );\r\n default:\r\n return ;\r\n }\r\n}\r\n\r\n// useFetch : use axios to fetch data, render different views depending\r\n// on the fetch status.\r\n\r\ntype FetchStatus = \"okay\" | \"error\" | \"none\";\r\n\r\ntype Okay = { data: T; status: \"okay\" };\r\ntype Error = { error: E; status: \"error\" };\r\ntype Nothing = { status: \"none\" };\r\n\r\ntype Value = Okay | Error | Nothing;\r\n\r\nexport type State = { pending: boolean } & Value;\r\n\r\nfunction initialiseState(initialData?: T): State {\r\n if (!initialData) {\r\n return {\r\n status: \"none\" as FetchStatus,\r\n pending: true,\r\n } as State;\r\n } else {\r\n return {\r\n data: initialData,\r\n status: \"okay\" as FetchStatus,\r\n pending: false,\r\n } as State;\r\n }\r\n}\r\n\r\ntype FetchAction =\r\n | { type: \"returned_okay\"; data: T }\r\n | { type: \"returned_error\"; error: E }\r\n | { type: \"request_pending\" }\r\n | { type: \"reset\" };\r\n\r\nfunction reducer(\r\n state: State,\r\n action: FetchAction\r\n): State {\r\n switch (action.type) {\r\n case \"returned_okay\":\r\n return {\r\n data: action.data,\r\n status: \"okay\",\r\n pending: false,\r\n };\r\n case \"returned_error\":\r\n return {\r\n error: action.error,\r\n status: \"error\",\r\n pending: false,\r\n };\r\n case \"request_pending\":\r\n return { ...state, pending: true };\r\n case \"reset\":\r\n return initialiseState() as State;\r\n }\r\n}\r\n\r\ntype Match = {\r\n some(t: T): C;\r\n error(e: E): C;\r\n none(): C;\r\n};\r\n\r\n// Curried helper function. Not sure if necessary.\r\nexport function match(store: State): (c: Match) => C {\r\n return function(callbacks: Match): C {\r\n const { some, error, none } = callbacks;\r\n if (\"error\" in store) {\r\n return error(store.error);\r\n }\r\n if (\"data\" in store) {\r\n return some(store.data);\r\n }\r\n return none();\r\n };\r\n}\r\n\r\n/**\r\n * Helper hook for fetching data on mount / when url changes.\r\n */\r\nexport function useFetch(\r\n url: string,\r\n initialData?: T,\r\n config?: AxiosRequestConfig\r\n): [State, () => void] {\r\n type S = State;\r\n type A = FetchAction;\r\n\r\n // Our actual state is kept in this reducer.\r\n const [store, dispatch] = useReducer, T | undefined>(\r\n reducer,\r\n initialData,\r\n initialiseState as (i?: T) => State\r\n );\r\n\r\n const { pending } = store;\r\n\r\n // When this changes, the effect is forced to rerun.\r\n // The value doesn't matter.\r\n const [flag, setFlag] = useState(false);\r\n\r\n // Change the flag.\r\n const forceRefresh = useCallback(() => {\r\n if (!pending) setFlag(prev => !prev);\r\n }, [pending]);\r\n\r\n // Make a request whenever the url, config or flag change.\r\n // Don't set the state if the cleanup code ran (cancelled = true).\r\n useEffect(() => {\r\n let cancelled = false;\r\n dispatch({ type: \"request_pending\" });\r\n api\r\n .get(url, config)\r\n .then(response => {\r\n const { data } = response;\r\n if (!cancelled) {\r\n dispatch({ type: \"returned_okay\", data });\r\n }\r\n })\r\n .catch(error => {\r\n if (!cancelled) {\r\n dispatch({ type: \"returned_error\", error });\r\n }\r\n });\r\n\r\n // If the component unmounts or another request occurs,\r\n // cancelled is set to true.\r\n return () => {\r\n cancelled = true;\r\n };\r\n }, [url, config, flag]);\r\n\r\n // Return the content and metadata to the hook's parent.\r\n return [store, forceRefresh];\r\n}\r\n\r\n/**\r\n * Small wrapper around useFetch to make rendering content more declarative.\r\n * Not really sold on its benefits, but it's here.\r\n *\r\n */\r\nexport function useFetchRender(\r\n url: string,\r\n whenOkay: (\r\n response: T,\r\n pending: boolean,\r\n refresh: () => void\r\n ) => React.ReactNode,\r\n initialData?: T,\r\n config?: AxiosRequestConfig,\r\n whenNothing?: () => React.ReactNode,\r\n whenError?: (\r\n error: E,\r\n pending: boolean,\r\n refresh: () => void\r\n ) => React.ReactNode\r\n): [React.ReactNode, FetchStatus, boolean, () => void] {\r\n const [store, refresh] = useFetch(url, initialData, config);\r\n\r\n // Default for if no error render is set.\r\n const renderError = whenError\r\n ? whenError\r\n : (_error: E, pending: boolean) => (\r\n \r\n );\r\n\r\n // Default for if no default render is set.\r\n const renderNothing = whenNothing ? whenNothing : () => ;\r\n\r\n const { status, pending } = store;\r\n\r\n // Return the correct JSX depending on response status.\r\n const renderContent = () => {\r\n if (\"error\" in store) {\r\n return (\r\n \r\n {renderError(store.error, pending, refresh)}\r\n \r\n );\r\n }\r\n if (\"data\" in store) {\r\n return (\r\n \r\n {whenOkay(store.data, pending, refresh)}\r\n \r\n );\r\n }\r\n return {renderNothing()};\r\n };\r\n\r\n const content = renderContent();\r\n\r\n return [content, status, pending, refresh];\r\n}\r\n\r\n/**\r\n * Returns a boolean that will be true (page is loading) until the\r\n * table reducer's status switches from \"pending\" to \"okay\" or \"error\",\r\n * when it will switch to false.\r\n */\r\nexport function useWaitForTable(): boolean {\r\n const tableStatus = useSelector(statusSelector);\r\n const [pending, set] = useState(true);\r\n const prevStatus = usePrevious(tableStatus);\r\n\r\n useEffect(() => {\r\n if (prevStatus === \"pending\" && tableStatus !== \"pending\") {\r\n set(false);\r\n }\r\n }, [tableStatus, prevStatus]);\r\n\r\n return pending;\r\n}\r\n\r\n/**\r\n * Takes a boolean representing whether the page is loading, and dispatches\r\n * it into the redux state so the UI can respond.\r\n *\r\n * @example\r\n * // Determining whether the page is loading is left to the component.\r\n * const isLoading = [\r\n * balance,\r\n * activePlayers,\r\n * weeklyFigures,\r\n * dailyFigures,\r\n * topPlayers,\r\n * losingPlayers,\r\n * reports,\r\n * ].some(state => state.pending);\r\n *\r\n * // Pass the isLoading boolean to usePageLoading,\r\n * //and a spinner will show if it is true.\r\n * usePageLoading(isLoading);\r\n *\r\n *\r\n */\r\nexport function usePageLoading(v: boolean) {\r\n const dispatch = useDispatch();\r\n\r\n // Using the useLayoutEffect hook to delay paint until the effect has run.\r\n // With useEffect, we would flash the normal UI (probably in a broken state\r\n // because data hasn't been fetched), run the effect, then show a\r\n // loading screen. Here we wait for the page loading variable to be set in redux,\r\n // then render the appropriate scene.\r\n React.useLayoutEffect(() => {\r\n dispatch(changePageLoading(v));\r\n }, [v, dispatch]);\r\n}\r\n","import { useLayoutEffect, useRef, useState, useEffect } from \"react\";\r\nimport { disableBodyScroll, clearAllBodyScrollLocks } from \"body-scroll-lock\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { selectAccountDetails } from \"reducers/auth\";\r\n\r\n/**\r\n * Returns what a div's dimensions were the last time they changed.\r\n * Used principally to stop a dynamically sized element from changing size when loading data.\r\n * For example, DynamicCard will shrink to almost nothing when it goes from fetchedData\r\n * to fetchingData, and then balloon back up again once it has refreshed. No good! When\r\n * the component's size changes, this hook returns the node's dimensions.\r\n * Then, in the component, when the fetchStatus is at \"fetchingData\", we set the node's height and width\r\n * style attributes so that it doesn't resize.\r\n */\r\nexport const useGetDimensions = (\r\n node: React.MutableRefObject\r\n) => {\r\n // Height and width.\r\n const [dimensions, setDimensions] = useState<[string?, string?]>([]);\r\n\r\n // useLayoutEffect() doesn't like null values.\r\n const [offsetWidth, offsetHeight] =\r\n node.current === null\r\n ? [-1, -1]\r\n : [node.current.offsetWidth, node.current.offsetHeight];\r\n\r\n useLayoutEffect(() => {\r\n if (node.current != null) {\r\n setDimensions([\r\n node.current.offsetWidth.toString(),\r\n node.current.offsetHeight.toString(),\r\n ]);\r\n }\r\n }, [offsetWidth, offsetHeight, node]);\r\n\r\n return dimensions;\r\n};\r\n\r\n/**\r\n * Helper to lock the window's body scroll, eg when there's a modal visible.\r\n * Set toggle to false to disable the effect.\r\n *\r\n * Spread the returned object in the props of a component to allow scrolling\r\n * within it.\r\n *\r\n * @example\r\n * const Modal = ({ isVisible, modalContent }) => {\r\n * const bind = useLockBody(isVisible);\r\n * return isVisible ? (\r\n *
\r\n *
\r\n * {modalContent}\r\n *
\r\n *
\r\n * ) : null\r\n * }\r\n */\r\n\r\nexport function useLockBody(toggle = true) {\r\n const ref = useRef(null);\r\n useLayoutEffect(() => {\r\n if (toggle && ref.current !== null) {\r\n disableBodyScroll(ref.current);\r\n }\r\n\r\n return () => {\r\n clearAllBodyScrollLocks();\r\n };\r\n }, [toggle]);\r\n\r\n return { ref };\r\n}\r\n\r\n/**\r\n * Detect when user has clicked outside a component, and\r\n * run a callback.\r\n *\r\n * @example\r\n * const node = useRef(null);\r\n *\r\n * useOnClickOutside(node, () => setShowDropdown(false));\r\n *\r\n * return (\r\n * // This div is presumably some sort of dropdown.\r\n *
...
\r\n * )\r\n *\r\n */\r\nexport const useOnClickOutside = (callback: () => any) => {\r\n const ref = useRef(null);\r\n useEffect(() => {\r\n const handleClick = (e: MouseEvent) => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n // If we we haven't set the node yet, or a click occurs within the target, return.\r\n if (ref.current == null || ref.current.contains(e.target)) {\r\n return;\r\n }\r\n // If the click is a left click and outside the target,\r\n // run the callback.\r\n if (e.buttons === 0) {\r\n callback();\r\n }\r\n };\r\n\r\n // Add event listeners.\r\n document.addEventListener(\"mousedown\", handleClick);\r\n\r\n // Tear down event listener on cleanup.\r\n return () => {\r\n document.removeEventListener(\"mousedown\", handleClick);\r\n };\r\n }, [callback]);\r\n\r\n return { ref };\r\n};\r\n\r\nexport function useTimeout(\r\n callback: () => any,\r\n delay: number,\r\n onCleanup?: () => any\r\n) {\r\n const savedCallback = useRef();\r\n\r\n useEffect(() => {\r\n savedCallback.current = callback;\r\n }, [callback]);\r\n\r\n useEffect(() => {\r\n function tick() {\r\n savedCallback.current && savedCallback.current();\r\n }\r\n if (delay !== null) {\r\n let id = setTimeout(tick, delay);\r\n return () => {\r\n clearTimeout(id);\r\n onCleanup && onCleanup();\r\n };\r\n }\r\n }, [delay, onCleanup]);\r\n}\r\n\r\nexport const usebTuesday = () => {\r\n const accountDetails = useSelector(selectAccountDetails);\r\n\r\n if (\r\n accountDetails?.licenseesID === null ||\r\n accountDetails?.licenseesID === undefined\r\n ) {\r\n return false;\r\n }\r\n\r\n const tuesdayLicensees = [1027];\r\n\r\n return tuesdayLicensees.includes(accountDetails?.licenseesID) ? true : false;\r\n};\r\n","import {\r\n isEqual,\r\n subMinutes,\r\n getYear,\r\n getMonth,\r\n getDate,\r\n getHours,\r\n getMinutes,\r\n} from \"date-fns\";\r\n\r\nexport const MIN_DATE = new Date(\"1900-01-01\");\r\nexport const MAX_DATE = new Date(\"2099-01-01\");\r\n\r\nexport function stripTimezone(d: Date): string {\r\n const offsetMinutes = d.getTimezoneOffset();\r\n return subMinutes(d, offsetMinutes).toDateString();\r\n}\r\n\r\nexport function formatDate(d: Date, includeTime: boolean): string {\r\n if (includeTime) return d.toISOString();\r\n\r\n return stripTimezone(d);\r\n}\r\n\r\nexport function validDate(d?: string | Date | null): Date | null {\r\n if (d == null) return null;\r\n const asDate = new Date(d);\r\n if (isEqual(asDate, MIN_DATE) || isEqual(asDate, MAX_DATE)) {\r\n return null;\r\n }\r\n\r\n return asDate;\r\n}\r\n\r\nexport function formatDateProperly(d: Date | string, withTime = false): string {\r\n const asDate = new Date(d);\r\n const year = getYear(asDate);\r\n const month = (getMonth(asDate) + 1).toLocaleString(undefined, {\r\n minimumIntegerDigits: 2,\r\n });\r\n const days = getDate(asDate).toLocaleString(undefined, {\r\n minimumIntegerDigits: 2,\r\n });\r\n const hours = getHours(asDate).toLocaleString(undefined, {\r\n minimumIntegerDigits: 2,\r\n });\r\n const mins = getMinutes(asDate).toLocaleString(undefined, {\r\n minimumIntegerDigits: 2,\r\n });\r\n\r\n return withTime\r\n ? `${year}-${month}-${days}T${hours}:${mins}`\r\n : `${year}-${month}-${days}`;\r\n}\r\n","import { produce } from \"immer\";\r\nimport { normalize } from \"normalizr\";\r\nimport { AxiosRequestConfig } from \"axios\";\r\nimport { AppState } from \"reducers/rootReducer\";\r\nimport { createSelector } from \"reselect\";\r\nimport { Maybe } from \"purify-ts/Maybe\";\r\nimport api from \"api\";\r\nimport { AuthState } from \"types/ReducerTypes\";\r\nimport { updateTableSettings } from \"reducers/ui\";\r\nimport { translateError } from \"helpers/errors\";\r\nimport {\r\n map,\r\n tap,\r\n switchMapTo,\r\n switchMap,\r\n mergeMap,\r\n takeUntil,\r\n catchError,\r\n mapTo,\r\n withLatestFrom,\r\n} from \"rxjs/operators\";\r\nimport { of, from, throwError } from \"rxjs\";\r\nimport { Theme } from \"theme\";\r\n\r\nimport {\r\n AuthStateStatus,\r\n NormalizedNavItems,\r\n AccountTypeDetails,\r\n TokenDetails,\r\n NavigationDetails,\r\n PermissionsDetails,\r\n Credentials,\r\n TwoFactorCredentials,\r\n} from \"types/AuthTypes\";\r\nimport { AxiosError } from \"axios\";\r\nimport { API_CLIENT_URL, AUTH_URL } from \"serverDetails\";\r\nimport {\r\n combineEpics,\r\n ofType,\r\n ActionsObservable,\r\n StateObservable,\r\n} from \"redux-observable\";\r\n\r\nimport { schema } from \"normalizr\";\r\n\r\nconst GET_AGENT_USER_SETTINGS_URL =\r\n \"/api/v1/UserSystemSettings/AgentUserSettings/get-agent-user-settings\";\r\nconst GET_AGENT_RESTRICTIONS_URL =\r\n \"/api/v1/UserRestrictions/get-agent-restrictions\";\r\nconst NAVIGATION_TREE_URL = AUTH_URL + \"user-access/get-navigation-tree\";\r\nconst PERMISSIONS_TREE_URL = AUTH_URL + \"user-access/get-permissions\";\r\nconst GET_DETAILS_URL = API_CLIENT_URL + \"get-details\";\r\nconst TFA_LOGIN_URL = AUTH_URL + \"login-tfa\";\r\nconst LOGIN_URL = AUTH_URL + \"login\";\r\n\r\n/* Normalizr Schemas */\r\n\r\nconst child = new schema.Entity(\r\n \"items\",\r\n {},\r\n { idAttribute: \"accessElementID\" }\r\n);\r\nconst children = new schema.Array(child);\r\nchild.define({ children });\r\nconst topLevel = new schema.Entity(\r\n \"children\",\r\n { children },\r\n { idAttribute: \"accessElementID\" }\r\n);\r\n\r\nconst navSchema = [topLevel];\r\n\r\n/* Constants */\r\n\r\nconst ATTEMPT_SIGN_IN = \"app/auth/ATTEMPT_SIGN_IN\";\r\nconst ATTEMPT_TFA_SIGN_IN = \"app/auth/ATTEMPT_TFA_SIGN_IN\";\r\nconst SIGN_OUT = \"app/auth/SIGN_OUT\";\r\nconst RESET_SIGN_IN_ERRORS = \"app/auth/RESET_SIGN_IN_ERRORS\";\r\nconst NEW_PASSWORD_REQUESTED = \"app/auth/NEW_PASSWORD_REQUESTED\";\r\nconst SIGN_IN_ERROR = \"app/auth/SIGN_IN_ERROR\";\r\nexport const SIGN_IN_SUCCESS = \"app/auth/SIGN_IN_SUCCESS\";\r\nconst SIGN_IN_CANCEL = \"app/auth/SIGN_IN_CANCEL\";\r\nconst SIGN_IN_VALIDATION_ERROR = \"app/auth/SIGN_IN_VALIDATION_ERROR\";\r\nconst SIGN_IN_PENDING = \"app/auth/SIGN_IN_PENDING\";\r\nconst SIGN_IN_REQUIRE_TWO_FACTOR = \"app/auth/SIGN_IN_REQUIRE_TWO_FACTOR\";\r\nconst GET_ACCOUNT_TYPE = \"app/auth/GET_ACCOUNT_TYPE\";\r\nconst LOAD_AUTH_STATE = \"app/auth/LOAD_AUTH_STATE\";\r\nconst PASSWORD_RESET = \"app/auth/PASSWORD_RESET\";\r\nconst CLEARED_LOCAL_STORAGE = \"app/auth/CLEARED_LOCAL_STORAGE\";\r\nexport const GOT_DETAILS = \"app/auth/GOT_DETAILS\";\r\nconst NOT_SIGNED_IN = \"app/auth/NOT_SIGNED_IN\";\r\n\r\ntype ErrorPayload = { fieldName: string; messageCode: string }[];\r\ntype AuthAction =\r\n | { type: typeof GET_ACCOUNT_TYPE }\r\n | {\r\n type: typeof GOT_DETAILS;\r\n payload: {\r\n licenseesID: number;\r\n accountType: string;\r\n companyName: string;\r\n signInHeader: string;\r\n initialTheme: Theme;\r\n images: { asstesPath: string; signInBackgroundImage: string };\r\n };\r\n }\r\n | { type: typeof ATTEMPT_SIGN_IN; payload: Credentials }\r\n | { type: typeof ATTEMPT_TFA_SIGN_IN; payload: TwoFactorCredentials }\r\n | { type: typeof LOAD_AUTH_STATE }\r\n | {\r\n type: typeof SIGN_IN_SUCCESS;\r\n payload: [NavigationDetails, PermissionsDetails[]];\r\n }\r\n | { type: typeof SIGN_IN_PENDING }\r\n | { type: typeof SIGN_IN_ERROR; payload: AxiosError }\r\n | { type: typeof SIGN_IN_VALIDATION_ERROR; payload: ErrorPayload }\r\n | { type: typeof SIGN_IN_PENDING }\r\n | { type: typeof SIGN_IN_CANCEL }\r\n | { type: typeof SIGN_OUT }\r\n | { type: typeof SIGN_IN_REQUIRE_TWO_FACTOR }\r\n | { type: typeof RESET_SIGN_IN_ERRORS }\r\n | { type: typeof PASSWORD_RESET }\r\n | { type: typeof NEW_PASSWORD_REQUESTED }\r\n | { type: typeof NOT_SIGNED_IN };\r\n\r\n/* Reducer */\r\n\r\nconst initialAuthState = {\r\n status: \"start\" as AuthStateStatus,\r\n accountDetails: null,\r\n errors: [] as { fieldName: string; messageCode: string }[],\r\n message: \"\",\r\n navigation: {\r\n result: [],\r\n entities: { children: {}, items: {} },\r\n } as NormalizedNavItems,\r\n permissions: [],\r\n appVisible: false,\r\n};\r\n\r\nexport const reducer = (\r\n state: AuthState = initialAuthState,\r\n action: AuthAction\r\n): AuthState =>\r\n produce(state, (draft) => {\r\n switch (action.type) {\r\n case ATTEMPT_SIGN_IN:\r\n case NEW_PASSWORD_REQUESTED:\r\n case LOAD_AUTH_STATE:\r\n draft.message = \"\";\r\n draft.status = \"pending\";\r\n break;\r\n case GOT_DETAILS: {\r\n const {\r\n initialTheme,\r\n images,\r\n companyName,\r\n signInHeader,\r\n ...details\r\n } = action.payload;\r\n draft.accountDetails = details;\r\n break;\r\n }\r\n case NOT_SIGNED_IN:\r\n draft.status = \"start\";\r\n draft.appVisible = true;\r\n break;\r\n case SIGN_IN_SUCCESS:\r\n draft.status = \"authenticated\" as AuthStateStatus;\r\n draft.navigation = normalize(\r\n action.payload[0].navigationItems,\r\n navSchema\r\n );\r\n draft.permissions = action.payload[1];\r\n draft.appVisible = true;\r\n break;\r\n case PASSWORD_RESET:\r\n draft.message = \"Password successfully reset, please log in.\";\r\n break;\r\n case SIGN_IN_REQUIRE_TWO_FACTOR:\r\n draft.status = \"require2FA\";\r\n break;\r\n case SIGN_IN_VALIDATION_ERROR: {\r\n const fallbackMessage =\r\n \"We couldn't sign you in with those details. Please check they are correct and try again.\";\r\n draft.status = \"error\";\r\n if (action.payload[0]) {\r\n draft.message = translateError(\r\n action.payload[0].messageCode\r\n ).orDefault(fallbackMessage);\r\n } else {\r\n draft.message = fallbackMessage;\r\n }\r\n break;\r\n }\r\n case SIGN_IN_ERROR:\r\n draft.status = \"error\";\r\n draft.message = \"\";\r\n break;\r\n case RESET_SIGN_IN_ERRORS:\r\n draft.errors = [];\r\n draft.message = \"\";\r\n break;\r\n case SIGN_IN_CANCEL:\r\n draft.errors = [];\r\n draft.message = \"\";\r\n draft.status = \"start\";\r\n break;\r\n case SIGN_OUT:\r\n draft.status = \"signedOut\";\r\n localStorage.clear();\r\n break;\r\n }\r\n });\r\n\r\n/* Action Creators */\r\n\r\nexport const signIn = (payload: Credentials): AuthAction => ({\r\n type: ATTEMPT_SIGN_IN,\r\n payload,\r\n});\r\n\r\nexport const tfaSignIn = (payload: TwoFactorCredentials): AuthAction => ({\r\n type: ATTEMPT_TFA_SIGN_IN,\r\n payload,\r\n});\r\n\r\nexport const passwordReset = (): AuthAction => ({\r\n type: PASSWORD_RESET,\r\n});\r\n\r\nexport const passwordRequested = (): AuthAction => ({\r\n type: NEW_PASSWORD_REQUESTED,\r\n});\r\n\r\nexport const signOut = (): AuthAction => ({\r\n type: SIGN_OUT,\r\n});\r\n\r\nexport const loadAuthState = (): AuthAction => ({\r\n type: LOAD_AUTH_STATE,\r\n});\r\n\r\nexport const getAccountTypeDetails = (): AuthAction => ({\r\n type: GET_ACCOUNT_TYPE,\r\n});\r\n\r\n/* Side Effects */\r\n\r\n/*************************************************************************\r\n * LOAD AUTH STATE FROM LOCAL STORAGE *\r\n *************************************************************************/\r\n\r\nconst checkAuthState = (): boolean => {\r\n const tokenDetailsString = localStorage.getItem(\"TOKEN_DETAILS\");\r\n if (tokenDetailsString === null) {\r\n return false;\r\n }\r\n const tokenDetails = JSON.parse(tokenDetailsString);\r\n if (tokenDetails.refreshToken == null || tokenDetails.accessToken == null) {\r\n return false;\r\n }\r\n return true;\r\n};\r\n\r\nconst loadAuthStateEpic = (action$: ActionsObservable) => {\r\n return action$.pipe(\r\n ofType(LOAD_AUTH_STATE),\r\n map(checkAuthState),\r\n switchMap((s) => {\r\n if (s) {\r\n return makeRequests([\r\n { url: NAVIGATION_TREE_URL },\r\n { url: PERMISSIONS_TREE_URL },\r\n ]).pipe(\r\n map((res) => {\r\n return {\r\n type: SIGN_IN_SUCCESS,\r\n payload: [res[0].data.details, res[1].data.details],\r\n };\r\n }),\r\n catchError((_e) => of(signOut()))\r\n );\r\n } else {\r\n return of({ type: NOT_SIGNED_IN });\r\n }\r\n })\r\n );\r\n};\r\n\r\nconst clearStorageEpic = (action$: ActionsObservable) => {\r\n return action$.pipe(\r\n ofType(SIGN_OUT),\r\n tap(() => localStorage.clear()),\r\n mapTo({ type: CLEARED_LOCAL_STORAGE })\r\n );\r\n};\r\n\r\n/**********************************************************************\r\n * LOGIN EPICS *\r\n **********************************************************************/\r\n\r\nfunction makeRequest(config: AxiosRequestConfig) {\r\n return from(api.request(config));\r\n}\r\n\r\nfunction makeRequests(configs: AxiosRequestConfig[]) {\r\n return from(Promise.all([...configs.map((x) => api.request(x))]));\r\n}\r\n\r\n/**\r\n * Helper to take a token details object and save it in localstorage.\r\n */\r\nconst saveTokenDetails = (details: TokenDetails) => {\r\n localStorage.setItem(\"TOKEN_DETAILS\", JSON.stringify(details));\r\n};\r\n\r\nconst loginEpic = (\r\n action$: ActionsObservable,\r\n state$: StateObservable\r\n) => {\r\n return action$.pipe(\r\n ofType(ATTEMPT_SIGN_IN),\r\n withLatestFrom(state$),\r\n switchMap(([attempt, state]) =>\r\n of([attempt, selectAccountDetails(state)]).pipe(\r\n mergeMap(([attempt, details]) =>\r\n makeRequest({\r\n url: LOGIN_URL,\r\n data: { ...details, ...attempt.payload },\r\n method: \"post\",\r\n })\r\n ),\r\n mergeMap((res) =>\r\n res.data.errors.length === 0\r\n ? of(res.data)\r\n : throwError(res.data.errors)\r\n ),\r\n tap(saveTokenDetails),\r\n mergeMap((_details) =>\r\n makeRequests([\r\n {\r\n url: NAVIGATION_TREE_URL,\r\n method: \"get\",\r\n },\r\n {\r\n url: PERMISSIONS_TREE_URL,\r\n method: \"get\",\r\n },\r\n ]).pipe(\r\n map((nav) => ({\r\n type: SIGN_IN_SUCCESS,\r\n payload: [nav[0].data.details, nav[1].data.details],\r\n }))\r\n )\r\n ),\r\n catchError((error: any) => {\r\n return of({ type: SIGN_IN_VALIDATION_ERROR, payload: error });\r\n }),\r\n takeUntil(\r\n action$.pipe(\r\n ofType(SIGN_OUT, SIGN_IN_ERROR, SIGN_IN_VALIDATION_ERROR)\r\n )\r\n )\r\n )\r\n )\r\n );\r\n};\r\n\r\nconst loginTwoFactorEpic = (\r\n action$: ActionsObservable,\r\n state$: StateObservable\r\n) => {\r\n return action$.pipe(\r\n ofType(ATTEMPT_TFA_SIGN_IN),\r\n withLatestFrom(state$),\r\n switchMap(([attempt, state]) =>\r\n of([attempt, selectAccountDetails(state)]).pipe(\r\n mergeMap(([attempt, details]) =>\r\n makeRequest({\r\n url: TFA_LOGIN_URL,\r\n data: { ...details, ...attempt.payload },\r\n method: \"post\",\r\n })\r\n ),\r\n mergeMap((res) =>\r\n res.data.errors.length === 0\r\n ? of(res.data)\r\n : throwError(res.data.errors)\r\n ),\r\n tap(saveTokenDetails),\r\n mergeMap((_details) =>\r\n makeRequests([\r\n {\r\n url: NAVIGATION_TREE_URL,\r\n method: \"get\",\r\n },\r\n {\r\n url: PERMISSIONS_TREE_URL,\r\n method: \"get\",\r\n },\r\n ]).pipe(\r\n map((nav) => ({\r\n type: SIGN_IN_SUCCESS,\r\n payload: [nav[0].data.details, nav[1].data.details],\r\n }))\r\n )\r\n ),\r\n catchError((error: any) => {\r\n return of({ type: SIGN_IN_VALIDATION_ERROR, payload: error });\r\n }),\r\n takeUntil(\r\n action$.pipe(\r\n ofType(SIGN_OUT, SIGN_IN_ERROR, SIGN_IN_VALIDATION_ERROR)\r\n )\r\n )\r\n )\r\n )\r\n );\r\n};\r\n\r\nconst getUIStateEpic = (action$: ActionsObservable) => {\r\n return action$.pipe(\r\n ofType(SIGN_IN_SUCCESS),\r\n switchMap(() => {\r\n return makeRequests([\r\n {\r\n url: GET_AGENT_USER_SETTINGS_URL,\r\n },\r\n {\r\n url: GET_AGENT_RESTRICTIONS_URL,\r\n },\r\n ]).pipe(\r\n map(([settings, _restrictions]) =>\r\n updateTableSettings(\r\n {\r\n bShowTutorialOnLogin: settings.data.bShowTutorial,\r\n bShowTooltips: settings.data.bShowTooltips,\r\n },\r\n true\r\n )\r\n )\r\n // catchError(error => of({ type: SIGN_OUT, payload: error }))\r\n );\r\n })\r\n );\r\n};\r\n\r\nconst getDetailsEpic = (action$: ActionsObservable) => {\r\n return action$.pipe(\r\n ofType(GET_ACCOUNT_TYPE),\r\n switchMapTo(\r\n makeRequest({ url: GET_DETAILS_URL }).pipe(\r\n map(({ data }) => ({ type: GOT_DETAILS, payload: data })),\r\n catchError((err) => of({ type: SIGN_OUT, payload: err }))\r\n )\r\n )\r\n );\r\n};\r\n\r\nexport const authEpic = combineEpics(\r\n loginEpic,\r\n loginTwoFactorEpic,\r\n loadAuthStateEpic,\r\n getDetailsEpic,\r\n clearStorageEpic,\r\n getUIStateEpic\r\n);\r\n\r\n/* Selectors */\r\n\r\nexport const selectNormalisedNav = (state: AppState) => state.auth.navigation;\r\n\r\nexport const selectPermittedPaths = createSelector(\r\n selectNormalisedNav,\r\n (nav) => {\r\n const children =\r\n nav.entities.children != null\r\n ? Object.values(nav.entities.children)\r\n .map((x: any) => x.path)\r\n .concat(\"\")\r\n : [];\r\n const items =\r\n nav.entities.items != null\r\n ? Object.values(nav.entities.items)\r\n .map((x: any) => x.path)\r\n .concat(\"\")\r\n : [];\r\n return children.concat(items);\r\n }\r\n);\r\n\r\n// Maybe.fromNullable takes a nullable value and produces either Just(value) or Nothing.\r\n// Maybe.encase takes a function which may throw and produces a Nothing if it does.\r\nexport const selectAccountType = (): Maybe => {\r\n const detailsString = Maybe.fromNullable(\r\n localStorage.getItem(\"ACCOUNT_TYPE\")\r\n );\r\n return detailsString.chain((detail) =>\r\n Maybe.encase(() => JSON.parse(detail))\r\n );\r\n};\r\n\r\nexport const selectAuthStatus = (state: AppState): AuthStateStatus =>\r\n state.auth.status;\r\n\r\nexport const selectAppVisible = (state: AppState): boolean =>\r\n state.auth.appVisible;\r\n\r\nexport const selectIsAuthenticated = createSelector(\r\n selectAuthStatus,\r\n (authStatus) => authStatus === \"authenticated\"\r\n);\r\n\r\nexport const selectSignInResponse = (_state: unknown): Maybe => {\r\n const detailsString = Maybe.fromNullable(\r\n localStorage.getItem(\"TOKEN_DETAILS\")\r\n );\r\n return detailsString.chain((detail) =>\r\n Maybe.encase(() => JSON.parse(detail))\r\n );\r\n};\r\n\r\nexport const selectAuthErrors = (state: AppState) => state.auth.errors;\r\n\r\nexport const selectMessage = (state: AppState) => state.auth.message;\r\n\r\nexport const selectAccountDetails = (state: AppState) =>\r\n state.auth.accountDetails;\r\n\r\nexport const selectLoadedAccountDetails = createSelector(\r\n [selectAccountDetails],\r\n (details) => details !== null\r\n);\r\n\r\nexport const selectTokenDetails = createSelector(\r\n [selectSignInResponse],\r\n (response) =>\r\n response.map((response) => ({\r\n accessToken: response.accessToken,\r\n refreshToken: response.refreshToken,\r\n }))\r\n);\r\n\r\nexport const selectPermissionsTree = (state: AppState) =>\r\n state.auth.permissions;\r\n","import React from \"react\";\r\nimport styles from \"./ChunkyInput.module.css\";\r\nimport { Field } from \"formik\";\r\n\r\ninterface ChunkyInputInterface\r\n extends React.InputHTMLAttributes {\r\n name: string;\r\n}\r\n\r\nconst chunkyInput = (props: ChunkyInputInterface) => {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default chunkyInput;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport styles from \"./ColumnCustomiser.module.css\";\r\nimport {\r\n DragDropContext,\r\n Draggable,\r\n DraggableProvided,\r\n DraggableStateSnapshot,\r\n Droppable,\r\n DropResult,\r\n} from \"react-beautiful-dnd\";\r\nimport { ListColumn } from \"types/ApiResponseTypes\";\r\nimport classNames from \"classnames\";\r\nimport VisibleIcon from \"assets/visible.svg\";\r\nimport NotVisibleIcon from \"assets/notvisible.svg\";\r\nimport DragHandle from \"assets/dragHandle.svg\";\r\nimport LockedIcon from \"assets/locked.svg\";\r\nimport { updateTable, currentKeySelector } from \"reducers/tableReducer\";\r\n\r\ntype ColumnCustomiserProps = {\r\n changeString(s: string): void;\r\n columns: ListColumn[];\r\n cancel(): void;\r\n fetchStatus: \"okay\" | \"error\" | \"pending\";\r\n};\r\nexport function ColumnCustomiser(props: ColumnCustomiserProps) {\r\n const dispatch = useDispatch();\r\n const { changeString, columns, cancel, fetchStatus } = props;\r\n const tableKey = useSelector(currentKeySelector);\r\n\r\n const clearTableSort = () =>\r\n dispatch(updateTable(tableKey, { resetSorting: true, resetColumns: true }));\r\n\r\n // Keep the list in state and use effects to keep it in sync with props,\r\n // so that the list order updates instantly rather than waiting for the new table\r\n const [localState, setLocalState] = useState(columns);\r\n\r\n const allVisible = !localState.some(x => !x.bVisible);\r\n const someVisible = localState.some(x => !x.bLocked && x.bVisible);\r\n const isLocked = (i: number) => localState[i].bLocked;\r\n\r\n useEffect(() => {\r\n setLocalState(columns);\r\n }, [columns]);\r\n\r\n // Create and send a query for a new list, with the appropriate customColumns parameter.\r\n // Format is a list of all the columns, in their correct order, plus a [hide] tag\r\n // to mark non-visible columns.\r\n const handleSubmit = () => {\r\n changeString(\r\n localState\r\n .map(x => (x.bVisible ? x.columnKey : x.columnKey + \"[hide]\"))\r\n .join(\",\")\r\n );\r\n };\r\n\r\n // Helper function to immutably reorder a list. Moves the list element\r\n // at the given start index, to the given end position, producing a new,\r\n // re-ordered list. Does not alter the original list.\r\n function reorder(list: T[], start: number, end: number) {\r\n const result = Array.from(list);\r\n const [removed] = result.splice(start, 1);\r\n result.splice(end, 0, removed);\r\n return result;\r\n }\r\n\r\n // Function called every time you stop dragging an item. If the item is\r\n // dragged off the Droppable, do nothing. If it's dragged into a valid index,\r\n // reorder the list of columns, then join and return them.\r\n const handleDragEnd = (result: DropResult) => {\r\n if (result.destination && !isLocked(result.source.index)) {\r\n setLocalState(\r\n reorder(localState, result.source.index, result.destination.index)\r\n );\r\n }\r\n };\r\n\r\n // Toggle a single entry visible/invisible.\r\n const handleToggleVisible = (columnKey: string) => {\r\n const columnIndex = localState.findIndex(c => c.columnKey === columnKey);\r\n if (columnIndex === -1) return;\r\n setLocalState(state =>\r\n state.map((c, i) =>\r\n i !== columnIndex ? c : { ...c, bVisible: !c.bVisible }\r\n )\r\n );\r\n };\r\n\r\n // Toggle all entries visible/invisible. Make all visible if all are not visible,\r\n // otherwise all invisible.\r\n const toggleAllVisible = () => {\r\n if (!allVisible) {\r\n setLocalState(state =>\r\n state.map(col => (col.bLocked ? col : { ...col, bVisible: true }))\r\n );\r\n } else {\r\n setLocalState(state =>\r\n state.map(col => (col.bLocked ? col : { ...col, bVisible: false }))\r\n );\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n All\r\n \r\n
\r\n \r\n {(provided, snapshot) => (\r\n
\r\n {localState.map((col, i) => (\r\n \r\n {(provided, snapshot) => (\r\n \r\n )}\r\n \r\n ))}\r\n {provided.placeholder}\r\n
\r\n )}\r\n
\r\n
\r\n
\r\n \r\n Save\r\n \r\n \r\n Close\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n );\r\n}\r\n\r\nexport function Item({\r\n col,\r\n i,\r\n provided,\r\n toggleVisible,\r\n snapshot,\r\n cancel,\r\n isLocked,\r\n}: {\r\n col: ListColumn;\r\n i: number;\r\n provided: DraggableProvided;\r\n snapshot: DraggableStateSnapshot;\r\n toggleVisible(s: string): void;\r\n cancel(): void;\r\n isLocked: boolean;\r\n}) {\r\n const toggleByID = () => toggleVisible(col.columnKey);\r\n const [handle, setHandle] = useState(false);\r\n const showHandle = () => setHandle(true);\r\n const hideHandle = () => setHandle(false);\r\n\r\n return (\r\n \r\n \r\n \"Drag\r\n
\r\n
\r\n {col.labelValue}\r\n \r\n
\r\n \r\n );\r\n}\r\n\r\nfunction ShowHideButton({\r\n visible,\r\n onClick,\r\n}: {\r\n visible: boolean;\r\n onClick?(): void;\r\n}) {\r\n return (\r\n \r\n );\r\n}\r\n","/** @jsx jsx */\r\nimport { jsx } from \"@emotion/core\";\r\nimport React, { useState, useEffect } from \"react\";\r\nimport { useSpring, animated } from \"react-spring\";\r\nimport { RefreshCw } from \"react-feather\";\r\nimport { useTheme } from \"emotion-theming\";\r\nimport { Theme } from \"theme\";\r\nimport Modal from \"components/PageComponents/Modal/Modal\";\r\n\r\nconst LoadingModal: React.FC<{ show: boolean }> = props => {\r\n return (\r\n \r\n
\r\n \r\n
\r\n

Updating results...

\r\n
\r\n );\r\n};\r\n\r\nconst LoadingSpinner: React.FC = () => {\r\n const theme = useTheme();\r\n const [rotationCount, setRotationCount] = useState(0);\r\n const incRotation = () => setRotationCount(p => p + 1);\r\n const [{ angle }, trigger] = useSpring(() => ({\r\n angle: 0,\r\n onRest: incRotation,\r\n config: { mass: 2, friction: 50, tension: 180 },\r\n }));\r\n\r\n useEffect(() => {\r\n const angle = rotationCount * 360;\r\n trigger({ angle });\r\n }, [rotationCount, trigger]);\r\n\r\n return (\r\n `rotate(${a}deg)`),\r\n }}\r\n >\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default LoadingModal;\r\n","import React from \"react\";\r\nimport Spinner from \"react-spinkit\";\r\nimport styles from \"./loadingData.module.css\";\r\n\r\nconst loadingData = () => (\r\n
\r\n
\r\n \r\n
\r\n
\r\n);\r\n\r\nexport default loadingData;\r\n","import React from \"react\";\r\nimport { ListColumn } from \"types/ApiResponseTypes\";\r\nimport TutorialTooltip from \"../TutorialTooltip/TutorialTooltip\";\r\nimport styles from \"./NewSortableTable.module.css\";\r\nimport css from \"@emotion/css/macro\";\r\nimport { useTranslation } from \"react-i18next\";\r\n\r\nexport type SortingButtonProps = {\r\n changeSorting(columnKey: string): void;\r\n column: ListColumn;\r\n correctSortIcon(columnKey: string): React.ReactNode;\r\n translationNamespace?: string;\r\n};\r\n\r\nconst SortingButton = (props: SortingButtonProps) => {\r\n const {\r\n changeSorting,\r\n column,\r\n translationNamespace,\r\n correctSortIcon,\r\n } = props;\r\n const { t } = useTranslation(translationNamespace);\r\n\r\n const content = (\r\n \r\n {translationNamespace ? t(column.labelKey) : column.labelValue}\r\n {column.bSortable && correctSortIcon(column.columnKey)}\r\n {column.tooltip && (\r\n \r\n \r\n {column.tooltip.text}\r\n \r\n \r\n )}\r\n \r\n );\r\n\r\n return column.bSortable ? (\r\n changeSorting(column.columnKey)}\r\n >\r\n {content}\r\n \r\n ) : (\r\n \r\n {content}\r\n \r\n );\r\n};\r\n\r\nexport { SortingButton };\r\n","/**@jsx jsx */\r\nimport React, { useCallback, useState, useEffect, useMemo } from \"react\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport styles from \"./NewSortableTable.module.css\";\r\nimport {\r\n ListColumn,\r\n SummaryRow,\r\n GetList200Response,\r\n} from \"../../../types/ApiResponseTypes\";\r\nimport { ColumnDetails } from \"../../../types/ReducerTypes\";\r\nimport { map, fromPairs, toPairs, zip } from \"ramda\";\r\nimport { orDefault } from \"helpers/objects\";\r\nimport Modal from \"components/PageComponents/Modal/Modal\";\r\nimport { ColumnCustomiser } from \"./NewColumnCustomiser\";\r\nimport classNames from \"classnames\";\r\nimport TutorialTooltip from \"components/BaseUIComponents/TutorialTooltip/TutorialTooltip\";\r\nimport { parseSortExpression } from \"@avamae/parse-filter\";\r\nimport { useSpring, animated, useTransition } from \"react-spring\";\r\nimport Spinner from \"react-spinkit\";\r\nimport { ErrorDisplay, ErrorBoundary } from \"components/Errors/Errors\";\r\nimport SortNoSort from \"assets/Icon_SortBy_01.svg\";\r\nimport SortDesc from \"assets/Icon_SortBy_02.svg\";\r\nimport SortAsc from \"assets/Icon_SortBy_03.svg\";\r\nimport { useTranslation } from \"react-i18next\";\r\n\r\nimport { withRouter } from \"react-router-dom\";\r\nimport { parse } from \"query-string\";\r\nimport LoadingModal from \"./LoadingModal\";\r\nimport { jsx } from \"@emotion/core\";\r\nimport css from \"@emotion/css/macro\";\r\nimport { Theme } from \"theme\";\r\nimport { useTheme } from \"emotion-theming\";\r\n\r\nimport SettingsIcon from \"assets/settings.svg\";\r\nimport DetailsIcon from \"assets/moredetails.svg\";\r\n\r\nimport LoadingData from \"./loadingData\";\r\n\r\nimport {\r\n updateTable as updateTableAction,\r\n statusSelector,\r\n stateSelector,\r\n settingsVisibleSelector,\r\n detailsVisibleSelector,\r\n showLoadingSelector,\r\n showSettings,\r\n hideSettings,\r\n showDetails,\r\n hideDetails,\r\n closeTable,\r\n UpdateTag,\r\n dateTabEndSelector,\r\n dateTabStartSelector,\r\n} from \"reducers/tableReducer\";\r\nimport { useSetNamespace } from \"helpers/namespaces\";\r\nimport api from \"api\";\r\nimport { useAsyncFunction } from \"helpers/useAsyncFunction\";\r\nimport { SortingButton } from \"./SortingButton\";\r\nimport { selectPlayerReportLinks } from \"pages/Categories/Reports/reportsSelectors\";\r\n\r\nenum RowHeight {\r\n small,\r\n middle,\r\n large,\r\n}\r\n\r\n/**\r\n * Looks at the url search parameters, and if they're valid, will produce\r\n * params that you can pass into an updateTable dispatch.\r\n */\r\nfunction getParamsFromSearch(searchString: string): Partial {\r\n const searchParams = parse(searchString);\r\n\r\n function validKey(fieldName: keyof ColumnDetails): string | undefined {\r\n const val = searchParams[fieldName];\r\n if (val != null && typeof val === \"string\") {\r\n return val;\r\n }\r\n }\r\n\r\n return {\r\n filters: validKey(\"filters\"),\r\n listKeyModifier: validKey(\"listKeyModifier\"),\r\n sortBy: validKey(\"sortBy\"),\r\n startDate: validKey(\"startDate\"),\r\n endDate: validKey(\"endDate\"),\r\n };\r\n}\r\n\r\ntype Renderable = { [U in keyof T]: React.ReactNode };\r\n\r\ntype Tooltip = { key: string; text: string };\r\n\r\ntype FormatSummaries = {\r\n [K: string]: (\r\n s: S,\r\n items: T[],\r\n title: string,\r\n tooltip: Tooltip\r\n ) => Renderable;\r\n};\r\n\r\n// Objects can have any length and hold pretty much anything.\r\n// But the \"items\" array must be 1-dimensional and every entry must have the same shape.\r\nexport interface ValidObject {\r\n // [key: string]: string | number | boolean | JSX.Element | undefined;\r\n [key: string]: any;\r\n}\r\n\r\nexport type SortableTableProps = {\r\n url: string;\r\n formatItems(\r\n items: T[],\r\n columns: ListColumn[],\r\n showChild: (i: number) => void,\r\n visibleChildren: number[],\r\n summaryRows: SummaryRow[]\r\n ): Renderable[];\r\n formatSummaries?: FormatSummaries;\r\n formatChild?(row: T, width: number): React.ReactNode;\r\n configurable?: boolean;\r\n formatDetails?(d: T): Renderable[];\r\n noSideBar?: boolean;\r\n hiddenColumns?: string[];\r\n location: Location;\r\n translationNamespace?: string;\r\n customColumns?: string;\r\n manualSummary?: (data: any[]) => React.ReactNode;\r\n};\r\n\r\nfunction SortableTable(props: SortableTableProps) {\r\n const dispatch = useDispatch();\r\n const ns = props.translationNamespace ?? \"\";\r\n useSetNamespace(ns);\r\n const { url, location, customColumns } = props;\r\n\r\n const tableStatus = useSelector(statusSelector);\r\n const tableValues = useSelector(stateSelector);\r\n const tableState = tableValues[url] == null ? null : tableValues[url];\r\n const updateTable = useCallback(\r\n (details: Partial, tag?: UpdateTag) =>\r\n dispatch(updateTableAction(url, details, tag)),\r\n [dispatch, url]\r\n );\r\n\r\n const loadingTransitions = useTransition(true, null, {\r\n from: { opacity: 1 },\r\n enter: { opacity: 1 },\r\n leave: { opacity: 0 },\r\n });\r\n\r\n const { search } = location;\r\n\r\n // Fetch the initial table state on startup, close any modals and set\r\n // currentKey to an empty string on unmount.\r\n useEffect(() => {\r\n updateTable({\r\n startDate: null,\r\n endDate: null,\r\n ...(customColumns ? { customColumns: props.customColumns } : {}),\r\n ...getParamsFromSearch(search),\r\n });\r\n return () => {\r\n dispatch(closeTable());\r\n };\r\n }, [updateTable, search, dispatch, customColumns]);\r\n\r\n /* return loadingTransitions.map( */\r\n /* ({ item, key, props }) => */\r\n /* item && ( */\r\n /* */\r\n /* */\r\n /*
*/\r\n /* */\r\n /* ) */\r\n /* ); */\r\n\r\n if (tableStatus === \"error\") {\r\n return ;\r\n } else if (tableState === null) {\r\n return loadingTransitions.map(\r\n ({ item, key, props }) =>\r\n item && (\r\n \r\n \r\n
\r\n \r\n )\r\n );\r\n } else\r\n return (\r\n \r\n );\r\n}\r\n\r\ntype TableState = {\r\n data: GetList200Response;\r\n filters: any[];\r\n};\r\ntype TableView = {\r\n tableState: TableState;\r\n updateTable(details: Partial, tag?: UpdateTag): void;\r\n tableStatus: \"pending\" | \"okay\";\r\n} & SortableTableProps;\r\n\r\nfunction TableView(props: TableView) {\r\n const dispatch = useDispatch();\r\n\r\n const isManuallyHidden = (columnKey: string) => {\r\n if (!props.hiddenColumns) return false;\r\n return props.hiddenColumns\r\n .map((x) => x.toLowerCase())\r\n .includes(columnKey.toLowerCase());\r\n };\r\n\r\n // Get the currently filtered-by date, so we don't wipe when changing sorting.\r\n // It's annoying that I'm doing this here, but hey.\r\n const currentStartDate = useSelector(dateTabStartSelector);\r\n const currentEndDate = useSelector(dateTabEndSelector);\r\n const startDate = currentStartDate ? currentStartDate.toString() : \"\";\r\n const endDate = currentEndDate ? currentEndDate.toString() : \"\";\r\n\r\n const theme = useTheme();\r\n const {\r\n tableState,\r\n formatItems,\r\n formatChild,\r\n formatSummaries,\r\n updateTable,\r\n url,\r\n tableStatus,\r\n translationNamespace,\r\n noSideBar,\r\n } = props;\r\n\r\n const {\r\n columns,\r\n summaryRows,\r\n listData,\r\n errors,\r\n metadata,\r\n bAllowMultiColumnSorting,\r\n ...columnDetails\r\n } = tableState.data;\r\n const { pageSize } = columnDetails;\r\n const { t } = useTranslation(\"sortableTable\");\r\n\r\n // In the design, the rowHeight/selectedRow can't change, but in theory it could,\r\n // hence state.\r\n const [state] = useState({\r\n rowHeight: RowHeight.middle,\r\n selectedRow: 0,\r\n });\r\n\r\n // A list of indices representing which table row's children should be displayed.\r\n // Currently they're closed every time the items change (eg, sorting or page change)\r\n // Maybe that'll be annoying.\r\n const [childrenToDisplay, setChildrenToDisplay] = useState([]);\r\n const toggleChild = (i: number) => {\r\n if (childrenToDisplay.includes(i)) {\r\n setChildrenToDisplay((children) =>\r\n children.filter((child) => child !== i)\r\n );\r\n } else {\r\n setChildrenToDisplay((children) => [...children, i]);\r\n }\r\n };\r\n\r\n const showDetailsModal = useSelector(detailsVisibleSelector);\r\n const setShowDetailsModal = (d: null | number) =>\r\n dispatch(d !== null ? showDetails(d) : hideDetails());\r\n\r\n const showSettingsModal = useSelector(settingsVisibleSelector);\r\n\r\n const setShowSettingsModal = (b: boolean) =>\r\n dispatch(b ? showSettings() : hideSettings());\r\n const toggleSettingsModal = () => setShowSettingsModal(!showSettingsModal);\r\n\r\n const items = formatItems(\r\n listData,\r\n columns,\r\n toggleChild,\r\n childrenToDisplay,\r\n summaryRows ? summaryRows : []\r\n );\r\n\r\n const parameters = {\r\n ...columnDetails,\r\n filters: orDefault(columnDetails.filters, \"\"),\r\n listKeyModifier: orDefault(columnDetails.listKeyModifier, \"\"),\r\n sortBy: orDefault(columnDetails.sortBy, \"\"),\r\n customColumns: orDefault(columnDetails.customColumns, \"\"),\r\n };\r\n\r\n /*********************************************\r\n * CHANGING FILTER, PAGE PARAMETERS\r\n *********************************************/\r\n\r\n /***\r\n * Changing the order in which columns are sorted, according to the\r\n * sort syntax:\r\n *\r\n * COLUMNKEY DIRECTION\r\n *\r\n * Column keys will always be in the format, “tableName__columnName”.\r\n *\r\n * Possible directions\r\n * -\tASC: Ascending\r\n * -\tDESC: Descending\r\n *\r\n * Lists can be sorted by multiple columns by passing a pipe-delimited list.\r\n * Extra spaces between items will be ignored.\r\n *\r\n * Examples:\r\n * -\t“siteUsers__emailAddress ASC”\r\n * -\t“siteUsers__emailAddress ASC | licenseeUsers__addDate DESC”\r\n *\r\n * If no sort string is passed, usually the lists will be sorted in descending\r\n * ID order by default.\r\n */\r\n\r\n const { sortBy } = parameters;\r\n\r\n const parsedSortings = useMemo(() => parseSortExpression(sortBy), [sortBy]);\r\n\r\n type Sorting = { columnKey: string; sortDirection: string };\r\n\r\n const decideNextDirection = (\r\n sort: Sorting | undefined\r\n ): \"DESC\" | \"ASC\" | undefined => {\r\n if (sort == null) return \"DESC\";\r\n switch (sort.sortDirection) {\r\n case \"DESC\":\r\n return \"ASC\";\r\n case \"ASC\":\r\n return undefined;\r\n }\r\n };\r\n\r\n const changeSorting = (column: string) => {\r\n // Parse the sort string and return a Maybe.\r\n\r\n // Take a list of Sortings, check if the selected column is already in there.\r\n // If it is, invert the sort, if not, add it to the list, then build a sort string.\r\n const buildNewSortString = (\r\n sortings: Sorting[]\r\n ): { sortBy: string; resetSorting: boolean } => {\r\n const existingVal = sortings.find((s) => s.columnKey === column);\r\n // if it's in there, invert it, otherwise add a new column to the sortings, requesting descending order.\r\n const sortDirection = decideNextDirection(existingVal);\r\n\r\n if (bAllowMultiColumnSorting) {\r\n // build sort string e.g. \"FirstColumn__Table ASC | SecondColumn__Table DESC\"\r\n const newSortings =\r\n sortDirection == null\r\n ? sortings\r\n .filter((s) => s.columnKey !== column)\r\n .map((srt) => `${srt.columnKey} ${srt.sortDirection}`)\r\n : sortings\r\n .filter((s) => s.columnKey !== column)\r\n .concat({ columnKey: column, sortDirection })\r\n .map((srt) => `${srt.columnKey} ${srt.sortDirection}`);\r\n\r\n const sortBy = newSortings.join(\" | \");\r\n const resetSorting = newSortings.length === 0;\r\n\r\n return { sortBy, resetSorting };\r\n }\r\n\r\n // Default - Sort by one column only\r\n const sorting: string[] = sortDirection\r\n ? [`${column} ${sortDirection}`]\r\n : [];\r\n const sortBy = sorting.join(\" | \");\r\n const resetSorting = sorting.length === 0;\r\n return { sortBy, resetSorting };\r\n };\r\n\r\n // If parsing the current sorting fails (shouldn't happen), just default\r\n // to sorting only the selected column in descending order.\r\n const { sortBy, resetSorting } = parsedSortings.caseOf({\r\n Just: buildNewSortString,\r\n Nothing: () => ({ sortBy: `${column} DESC`, resetSorting: false }),\r\n });\r\n\r\n // Finally, make the request.\r\n updateTable({ ...columnDetails, startDate, endDate, sortBy, resetSorting });\r\n };\r\n\r\n const changePage = (pageNumber: number) =>\r\n updateTable({ ...parameters, startDate, endDate, pageNumber });\r\n\r\n const changePageSize = (pageSize: number) =>\r\n updateTable({ ...parameters, startDate, endDate, pageSize });\r\n\r\n const changeCustomColumns = (customColumns: string) =>\r\n updateTable({ ...parameters, customColumns }, \"updated_column_option\");\r\n\r\n // const handleSizeChange = (x: ButtonType) => {\r\n // switch (x) {\r\n // case \"small\":\r\n // setState({ ...state, rowHeight: RowHeight.small });\r\n // break;\r\n // case \"medium\":\r\n // setState({ ...state, rowHeight: RowHeight.middle });\r\n // break;\r\n // case \"large\":\r\n // setState({ ...state, rowHeight: RowHeight.large });\r\n // break;\r\n // }\r\n // };\r\n\r\n // const getSelectedButton = () => {\r\n // switch (state.rowHeight) {\r\n // case RowHeight.small:\r\n // return \"small\";\r\n // case RowHeight.middle:\r\n // return \"medium\";\r\n // case RowHeight.large:\r\n // return \"large\";\r\n // default:\r\n // return \"medium\";\r\n // }\r\n // };\r\n\r\n const padRows = (\r\n items: (T | ValidObject)[],\r\n columns: ListColumn[],\r\n pageSize: number\r\n ) => {\r\n const columnKeys = map((x) => x.columnKey, columns);\r\n const emptyVals = Array.from(Array(columnKeys.length), (_x) => \"\");\r\n const pairs = zip(columnKeys, emptyVals);\r\n const emptyRow = fromPairs(pairs);\r\n const rows = Array.from(Array(pageSize - items.length), (_x) => emptyRow);\r\n return items.concat(rows);\r\n };\r\n\r\n // Take the item objects, turn them into key-value pairs, and filter by\r\n // whether they are included in the columns object.\r\n // This is a bit expensive to calculate so we'll memoise it.\r\n type Pair = [string, any];\r\n const columnKeys = columns.map((col) => col.columnKey.toLowerCase());\r\n const makeItems = (items: ValidObject[]) =>\r\n items\r\n .map(toPairs)\r\n .map((item) =>\r\n item.filter((pair) => columnKeys.includes(pair[0].toLowerCase()))\r\n );\r\n\r\n const itemsToProduce =\r\n items.length < pageSize ? padRows(items, columns, pageSize) : items;\r\n\r\n const itemArray: Pair[][] = makeItems(itemsToProduce);\r\n\r\n if (columns.length > 0) {\r\n // Function for sorting the rows according to the orderNumber value\r\n // in the columns object.\r\n const sortFn = (first: Pair, second: Pair): 1 | -1 | 0 => {\r\n // An object with column names as keys, and ordernumbers as values.\r\n // Lowercase is required because casings are inconsistent.\r\n const keys: { [K: string]: number } = columns.reduce(\r\n (acc, next) => ({\r\n ...acc,\r\n [next.columnKey.toLowerCase()]: next.orderNumber,\r\n }),\r\n {}\r\n );\r\n const firstKey = keys[first[0].toLowerCase()];\r\n const secondKey = keys[second[0].toLowerCase()];\r\n if (firstKey !== undefined && secondKey !== undefined) {\r\n if (firstKey === secondKey) {\r\n return 0;\r\n } else if (firstKey > secondKey) {\r\n return 1;\r\n } else {\r\n return -1;\r\n }\r\n }\r\n return 0;\r\n };\r\n\r\n const filterByVisible = (item: [string, any]) => {\r\n const column = columns.find(\r\n (x) => x.columnKey.toLowerCase() === item[0].toLowerCase()\r\n );\r\n if (\r\n column !== undefined &&\r\n !isManuallyHidden(column.columnKey) &&\r\n column.bVisible !== false\r\n ) {\r\n return true;\r\n }\r\n return false;\r\n };\r\n\r\n // const tableSummaryRow =\r\n // formatSummary && summaryRow ? (\r\n // \r\n // {toPairs(formatSummary(summaryRow, listData))\r\n // .filter(pair => columnKeys.includes(pair[0].toLowerCase()))\r\n // .filter(filterByVisible)\r\n // .sort(sortFn)\r\n // .map((pair, i) => (\r\n // \r\n //
\r\n // {pair[1] as React.ReactNode}\r\n //
\r\n // \r\n // ))}\r\n // \r\n // ) : null;\r\n\r\n const tableSummaryRows =\r\n summaryRows &&\r\n formatSummaries &&\r\n summaryRows\r\n .filter((row) => formatSummaries[row.key] != null)\r\n .map((row) => (\r\n \r\n {toPairs(\r\n formatSummaries[row.key](\r\n row.data,\r\n listData,\r\n row.title,\r\n row.tooltip\r\n )\r\n )\r\n .filter((pair) => columnKeys.includes(pair[0].toLowerCase()))\r\n .filter(filterByVisible)\r\n .sort(sortFn)\r\n .map((pair, i) => (\r\n \r\n \r\n {pair[1] as React.ReactNode}\r\n
\r\n \r\n ))}\r\n \r\n ));\r\n\r\n const newTableRows = itemArray.map((item, i) => {\r\n if (item == null) return null;\r\n return (\r\n \r\n \r\n {item\r\n .sort(sortFn)\r\n .filter(filterByVisible)\r\n .map((pair, j) => (\r\n \r\n \r\n {pair[1]}\r\n
\r\n \r\n ))}\r\n \r\n {childrenToDisplay.includes(i) && formatChild !== undefined && (\r\n \r\n {formatChild(listData[i], columns.length)}\r\n \r\n )}\r\n \r\n );\r\n });\r\n\r\n // const getRefHeight = (i: number): number | undefined => {\r\n // const height = rowHeights[i];\r\n // if (height === null) return undefined;\r\n // return height;\r\n // };\r\n\r\n // const fixedRows = itemArray.map((item, i) => {\r\n // // If undefined, render nothing.\r\n // if (item == null) return null;\r\n // return (\r\n // \r\n // {item.sort(sortFn).map((pair, j) =>\r\n // j === state.selectedRow ? (\r\n //
\r\n //
{pair[1]}
\r\n //
\r\n // ) : null\r\n // )}\r\n // \r\n // );\r\n // });\r\n\r\n const DetailsModal = () => {\r\n const { formatDetails } = props;\r\n const renderContent = (id: number | null) => {\r\n if (id === null) return null;\r\n\r\n const valsFromMainFormatter = formatItems(\r\n [listData[id]],\r\n columns,\r\n toggleChild,\r\n childrenToDisplay,\r\n summaryRows ? summaryRows : []\r\n )[0];\r\n\r\n const valsFromAdditionalFormatter = formatDetails\r\n ? { ...valsFromMainFormatter, ...formatDetails(listData[id]) }\r\n : valsFromMainFormatter;\r\n\r\n const columnKeys = columns.map((x) => x.columnKey.toLowerCase());\r\n const getColumnName = (columnKey: string): string => {\r\n if (!columnKeys.includes(columnKey.toLowerCase())) return columnKey;\r\n\r\n return columns.find(\r\n (x) => x.columnKey.toLowerCase() === columnKey.toLowerCase()\r\n )!.labelValue;\r\n };\r\n\r\n const sortByColumnOrder = (\r\n c1: [string, unknown],\r\n c2: [string, unknown]\r\n ): 0 | -1 | 1 => {\r\n const key1 = c1[0].toLowerCase();\r\n const key2 = c2[0].toLowerCase();\r\n if (!columnKeys.includes(key1) || !columnKeys.includes(key2))\r\n return 0;\r\n const order1 = columns.find(\r\n (x) => x.columnKey.toLowerCase() === key1\r\n )!.orderNumber;\r\n const order2 = columns.find(\r\n (x) => x.columnKey.toLowerCase() === key2\r\n )!.orderNumber;\r\n if (order1 > order2) return 1;\r\n if (order2 > order1) return -1;\r\n return 0;\r\n };\r\n\r\n const cols = toPairs(valsFromAdditionalFormatter)\r\n .filter((c) => columnKeys.includes(c[0].toLowerCase()))\r\n .sort(sortByColumnOrder)\r\n .map((c) => [getColumnName(c[0]), c[1]] as [string, unknown]);\r\n\r\n return (\r\n \r\n \r\n {cols.map((c, i) => (\r\n \r\n \r\n \r\n \r\n ))}\r\n
\r\n {t(`${translationNamespace}:${c[0]}`)}\r\n {c[1] as React.ReactNode}
\r\n setShowDetailsModal(null)}\r\n className=\"Btn Blue\"\r\n >\r\n Done\r\n \r\n
\r\n );\r\n };\r\n\r\n const show = showDetailsModal !== null;\r\n\r\n return (\r\n setShowDetailsModal(null)}\r\n title={t(\"details\")}\r\n >\r\n {show && renderContent(showDetailsModal)}\r\n \r\n );\r\n };\r\n\r\n const correctSortIcon = (columnKey: string) => {\r\n const direction = parsedSortings\r\n .map((ps) => {\r\n const sorting = ps.find((p) => p.columnKey === columnKey);\r\n if (sorting == null) return null;\r\n return sorting.sortDirection;\r\n })\r\n .orDefault(null);\r\n\r\n const imgCSS = css`\r\n width: 1em;\r\n `;\r\n\r\n if (direction === \"ASC\") {\r\n return {t(\"sortAscending\")};\r\n } else if (direction === \"DESC\") {\r\n return {t(\"sortDescending\")};\r\n } else {\r\n return {t(\"unsorted\")};\r\n }\r\n };\r\n\r\n const ColumnsModal = () => {\r\n return (\r\n setShowSettingsModal(false)}\r\n title={\"Customise Columns\"}\r\n >\r\n setShowSettingsModal(false)}\r\n fetchStatus={tableStatus}\r\n />\r\n \r\n );\r\n };\r\n\r\n const containerStyle = css`\r\n thead td {\r\n background-color: ${theme.colors.third};\r\n border-bottom: 1px solid ${theme.colors.third};\r\n border-top: 1px solid ${theme.colors.third};\r\n }\r\n `;\r\n\r\n return (\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n {columns\r\n .filter(\r\n (x) =>\r\n !isManuallyHidden(x.columnKey) && x.bVisible !== false\r\n )\r\n .map((x) => (\r\n \r\n ))}\r\n \r\n \r\n \r\n {newTableRows}\r\n {tableSummaryRows}\r\n \r\n
\r\n \r\n
\r\n
\r\n {!noSideBar && (\r\n \r\n )}\r\n
\r\n {props.manualSummary && props.manualSummary(listData)}\r\n {props.configurable && (\r\n \r\n )}\r\n
\r\n
\r\n
\r\n );\r\n } else {\r\n return ;\r\n }\r\n}\r\n\r\nconst Paginator = (props: {\r\n changePage(pageNumber: number): void;\r\n changePageSize(pageSize: number): void;\r\n setChildren(n: number[]): void;\r\n details: ColumnDetails;\r\n columns: ListColumn[];\r\n status: \"pending\" | \"okay\" | \"error\";\r\n url: string;\r\n showDownloadButton?: boolean;\r\n}) => {\r\n const showPendingModal = useSelector(showLoadingSelector);\r\n const theme = useTheme();\r\n const { t } = useTranslation(\"sortableTable\");\r\n\r\n // Get the last page.\r\n const lastPage = Math.ceil(\r\n props.details.resultsCount / props.details.pageSize\r\n );\r\n\r\n const lastOnPage = props.details.pageSize * props.details.pageNumber;\r\n const firstOnPage = lastOnPage - props.details.pageSize + 1;\r\n // Display the smallest of the total results count, and the calculated number.\r\n // This avoids labels with \"Showing 11-25 of 18 results\" etc.\r\n const lastOnPageDisplay = Math.min(lastOnPage, props.details.resultsCount);\r\n\r\n const valid = (move: number) => {\r\n const proposedNextPage = props.details.pageNumber + move;\r\n return proposedNextPage <= lastPage && proposedNextPage > 0;\r\n };\r\n\r\n const isLoading = props.status === \"pending\";\r\n const loadStyle = useSpring({ opacity: isLoading ? 1 : 0 });\r\n\r\n const itemsPerPage = [5, 10, 15, 20, 25, 50, 75, 100];\r\n\r\n const paginatorButtonsCSS = css`\r\n button {\r\n color: ${theme.colors.third};\r\n }\r\n `;\r\n\r\n return (\r\n
\r\n
\r\n \r\n \r\n \r\n {t(\"loading\")}\r\n
\r\n \r\n\r\n
\r\n {\r\n props.setChildren([]);\r\n props.changePage(1);\r\n }}\r\n >\r\n {t(\"firstPage\")}\r\n \r\n {\r\n props.setChildren([]);\r\n props.changePage(props.details.pageNumber - 1);\r\n }}\r\n >\r\n {t(\"previous\")}\r\n \r\n {props.details.pageNumber}\r\n {\r\n props.setChildren([]);\r\n props.changePage(props.details.pageNumber + 1);\r\n }}\r\n >\r\n {t(\"next\")}\r\n \r\n {\r\n props.setChildren([]);\r\n props.changePage(lastPage);\r\n }}\r\n >\r\n {t(\"lastPage\")}\r\n \r\n {/*
\r\n

\r\n Change page size:{\" \"}\r\n \r\n \r\n \r\n

\r\n

\r\n Page filters:{\" \"}\r\n {props.details.filters.caseOf({\r\n Just: v => v,\r\n Nothing: () => \"None\",\r\n })}\r\n

\r\n
*/}\r\n
\r\n
\r\n {t(\"showing\", {\r\n first: firstOnPage,\r\n last: lastOnPageDisplay,\r\n total: props.details.resultsCount,\r\n })}\r\n
\r\n
\r\n
\r\n \r\n {t(\"itemsPerPage\")}\r\n props.changePageSize(parseInt(e.target.value))}\r\n value={props.details.pageSize}\r\n >\r\n {itemsPerPage.map((x) => (\r\n \r\n ))}\r\n \r\n
\r\n
\r\n {props.showDownloadButton && (\r\n \r\n )}\r\n
\r\n \r\n \r\n );\r\n};\r\n\r\nconst heightToClass = (x: RowHeight) => {\r\n switch (x) {\r\n case RowHeight.small:\r\n return styles.smallHeight;\r\n case RowHeight.middle:\r\n return styles.midHeight;\r\n case RowHeight.large:\r\n return styles.largeHeight;\r\n }\r\n};\r\n\r\ntype DetailsColumnProps = {\r\n visible: boolean;\r\n toggleSettingsModal(): void;\r\n setShowDetailsModal(i: number): void;\r\n itemsLength: number;\r\n newTableRows: (null | JSX.Element)[];\r\n tableSummaryRows?: (null | JSX.Element)[];\r\n};\r\n// A fixed column on the right hand side of the table that has a button to access the\r\n// show/hide column menu, and a details button for each column which displays the relevant data.\r\nconst DetailsColumnNoMemo = ({\r\n visible,\r\n toggleSettingsModal,\r\n setShowDetailsModal,\r\n itemsLength,\r\n newTableRows,\r\n tableSummaryRows,\r\n}: DetailsColumnProps) => {\r\n const { t } = useTranslation(\"sortableTable\");\r\n const widthStyle = { maxWidth: visible ? \"5em\" : \"0em\" };\r\n\r\n const summaries = tableSummaryRows || [];\r\n\r\n const renderRow = (isSummary: boolean, i: number, showButton: boolean) => (\r\n \r\n \r\n
\r\n {showButton && (\r\n \r\n )}\r\n
\r\n \r\n \r\n );\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {newTableRows.map((_, i) => renderRow(false, i, i < itemsLength))}\r\n {summaries.map((_, i) => renderRow(true, i, false))}\r\n \r\n
\r\n \r\n {t(\"tableSettings\")}\r\n \r\n
\r\n \r\n );\r\n};\r\n\r\nconst DetailsColumn = React.memo(DetailsColumnNoMemo);\r\n\r\nasync function downloadReport(\r\n endpoint: string,\r\n list: Partial>\r\n) {\r\n const { filters, sortBy, customColumns, pageNumber, pageSize } = list;\r\n const params = {\r\n filters,\r\n sortBy,\r\n customColumns,\r\n pageNumber,\r\n pageSize,\r\n bDownloadCsvReport: true,\r\n };\r\n const { data, headers } = await api.get(endpoint, {\r\n params,\r\n });\r\n\r\n const link = document.createElement(\"a\");\r\n const contentDisposition = headers[\"content-disposition\"];\r\n const contentType = headers[\"content-type\"] ?? \"text/csv\";\r\n\r\n let filename = \"report.csv\";\r\n\r\n if (contentDisposition) {\r\n const matches = contentDisposition.match(\"filename=([^;]*)(;|$)\");\r\n if (matches && matches[1]) filename = matches[1];\r\n }\r\n\r\n const file = new File([data], filename, { type: contentType });\r\n link.href = window.URL.createObjectURL(file);\r\n link.download = filename;\r\n link.click();\r\n}\r\n\r\nfunction DownloadReportButton(props: {\r\n endpoint: string;\r\n list: Partial>;\r\n}): JSX.Element {\r\n const { endpoint, list } = props;\r\n const { t } = useTranslation(\"sortableTable\");\r\n const fetchReport = React.useCallback(\r\n () => downloadReport(endpoint, list),\r\n [endpoint, list]\r\n );\r\n\r\n const { error, pending, execute } = useAsyncFunction(fetchReport, false);\r\n\r\n if (pending)\r\n return (\r\n \r\n );\r\n if (error)\r\n return (\r\n \r\n );\r\n\r\n return (\r\n \r\n );\r\n}\r\n\r\nexport default withRouter(SortableTable);\r\n","module.exports = __webpack_public_path__ + \"static/media/Question.f4ab016f.svg\";","// extracted by mini-css-extract-plugin\nmodule.exports = {\"passwordInput\":\"PasswordInput_passwordInput__rIJfh\",\"inputContainer\":\"PasswordInput_inputContainer__LTJlC\",\"showPass\":\"PasswordInput_showPass__1FHS6\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"errorBackground\":\"Errors_errorBackground__YVoRD\"};","import produce from \"immer\";\r\nimport { createSelector } from \"reselect\";\r\nimport { AppState } from \"reducers/rootReducer\";\r\nimport { combineReducers } from \"redux\";\r\nimport {\r\n UPDATE_TABLE,\r\n UPDATED_TABLE,\r\n UpdateTag,\r\n updateTable,\r\n currentKeySelector,\r\n pendingSelector as selectTablePending,\r\n} from \"reducers/tableReducer\";\r\nimport {\r\n combineEpics,\r\n ActionsObservable,\r\n StateObservable,\r\n ofType,\r\n} from \"redux-observable\";\r\nimport { from, of } from \"rxjs\";\r\nimport {\r\n pluck,\r\n withLatestFrom,\r\n map,\r\n concatMap,\r\n catchError,\r\n} from \"rxjs/operators\";\r\nimport { toPairs, map as mapObj } from \"ramda\";\r\nimport { PLAYERS_URL } from \"serverDetails\";\r\nimport { FieldError } from \"types/BasicTypes\";\r\nimport api from \"api\";\r\n\r\n/* Reducer */\r\n\r\nconst GLOBAL_SETTINGS = \"app/playerAccess/GLOBAL_SETTINGS\";\r\nconst EDIT_MODE = \"app/playerAccess/EDIT_MODE\";\r\nconst SWITCH_TAB = \"app/playerAccess/SWITCH_TAB\";\r\nconst MODIFY_ACCESS_ALL = \"app/playerAccess/MODIFY_ACCESS_ALL\";\r\nconst MODIFY_GLOBAL_ACCESS_ALL = \"app/playerAccess/MODIFY_GLOBAL_ACCESS_ALL\";\r\nconst MODIFY_ACCESS_CATEGORY = \"app/playerAccess/MODIFY_ACCESS_CATEGORY\";\r\nconst MODIFY_ACCESS_ENTIRE_CATEGORY =\r\n \"app/playerAccess/MODIFY_ACCESS_ENTIRE_CATEGORY\";\r\nconst MODIFY_GLOBAL_ACCESS_CATEGORY =\r\n \"app/playerAccess/MODIFY_GLOBAL_ACCESS_CATEGORY\";\r\nconst SAVE_ALL_PRODUCTS_ACCESS_CHANGES =\r\n \"app/playerAccess/SAVE_ALL_PRODUCTS_ACCESS_CHANGES\";\r\nconst SAVED_ALL_PRODUCTS_ACCESS_CHANGES =\r\n \"app/playerAccess/SAVED_ALL_PRODUCTS_ACCESS_CHANGES\";\r\nconst SAVE_CATEGORY_PRODUCTS_ACCESS_CHANGES =\r\n \"app/playerAccess/SAVE_CATEGORY_PRODUCTS_ACCESS_CHANGES\";\r\nconst SAVED_CATEGORY_PRODUCTS_ACCESS_CHANGES =\r\n \"app/playerAccess/SAVED_CATEGORY_PRODUCTS_ACCESS_CHANGES\";\r\nconst ERROR_SAVING_CHANGES = \"app/playerAccess/ERROR_SAVING_CHANGES\";\r\nconst DISCARD_CHANGES = \"app/playerAccess/DISCARD_CHANGES\";\r\nconst LOCK_PENDING = \"app/playerAccess/LOCK_PENDING\";\r\nconst WARNING_TOGGLED = \"app/playerAccess/WARNING_TOGGLED\";\r\n\r\n// In fact it's a sum type, boom boom.\r\nexport type ProductType = \"sports\" | \"casino\" | \"horses\" | \"live\" | \"lotto3000\";\r\n\r\ntype PlatformAccess = { [P in ProductType]?: { bEnabled: boolean } };\r\n\r\ntype AccessMod = {\r\n playersID: number;\r\n productType: ProductType;\r\n value: boolean;\r\n};\r\n\r\ntype GlobalAccessMod = Omit;\r\n\r\ntype CategoryAccessMod = {\r\n playersID: number;\r\n product: { productsID: number; bEnabled: boolean };\r\n};\r\n\r\ntype GlobalCategoryMod = {\r\n bAllProductsEnabled?: boolean;\r\n products: { productsID: number; bEnabled: boolean }[];\r\n};\r\n\r\ntype PendingChanges = {\r\n individualChanges: { [playersID: string]: PlatformAccess };\r\n globalChanges: { [P in ProductType]?: boolean };\r\n};\r\n\r\ntype CategoryPendingChanges = {\r\n allPlayersAccessSettings: {\r\n bAllProductsEnabled?: boolean;\r\n products: { productsID: number; bEnabled: boolean }[];\r\n };\r\n individualPlayersAccessSettings: {\r\n playersID: number;\r\n products: {\r\n productsID: number;\r\n bEnabled: boolean;\r\n }[];\r\n }[];\r\n};\r\n\r\ntype Action =\r\n | { type: typeof GLOBAL_SETTINGS; payload: boolean }\r\n | { type: typeof EDIT_MODE; payload: boolean }\r\n | { type: typeof SWITCH_TAB; payload: number }\r\n | { type: typeof UPDATE_TABLE; payload: unknown }\r\n | { type: typeof UPDATED_TABLE; payload: unknown; tag?: UpdateTag }\r\n | { type: typeof MODIFY_ACCESS_ALL; payload: AccessMod }\r\n | { type: typeof MODIFY_GLOBAL_ACCESS_ALL; payload: GlobalAccessMod }\r\n | {\r\n type: typeof MODIFY_ACCESS_CATEGORY;\r\n payload: { category: ProductType; data: CategoryAccessMod };\r\n }\r\n | {\r\n type: typeof MODIFY_ACCESS_ENTIRE_CATEGORY;\r\n payload: {\r\n category: ProductType;\r\n data: {\r\n playersID: number;\r\n products: { productsID: number; bEnabled: boolean }[];\r\n };\r\n };\r\n }\r\n | {\r\n type: typeof MODIFY_GLOBAL_ACCESS_CATEGORY;\r\n payload: { category: ProductType; data: GlobalCategoryMod };\r\n }\r\n | { type: typeof SAVE_CATEGORY_PRODUCTS_ACCESS_CHANGES; payload: ProductType }\r\n | {\r\n type: typeof SAVED_CATEGORY_PRODUCTS_ACCESS_CHANGES;\r\n }\r\n | { type: typeof SAVE_ALL_PRODUCTS_ACCESS_CHANGES }\r\n | {\r\n type: typeof SAVED_ALL_PRODUCTS_ACCESS_CHANGES;\r\n }\r\n | { type: typeof ERROR_SAVING_CHANGES; error: Error }\r\n | { type: typeof LOCK_PENDING; payload: boolean }\r\n | { type: typeof DISCARD_CHANGES }\r\n | { type: typeof WARNING_TOGGLED; payload: boolean };\r\n\r\ntype SettingsState = Readonly<{\r\n globalSettingsVisible: boolean;\r\n edit: boolean;\r\n openTab: number;\r\n pending: boolean;\r\n lockPending: boolean;\r\n warningVisible: boolean;\r\n}>;\r\n\r\nconst initialSettings: SettingsState = {\r\n globalSettingsVisible: false,\r\n edit: false,\r\n openTab: 0,\r\n pending: false,\r\n lockPending: false,\r\n warningVisible: false,\r\n};\r\n\r\nconst settingsReducer = (\r\n state = initialSettings,\r\n action: Action\r\n): SettingsState =>\r\n produce(state, (draft) => {\r\n switch (action.type) {\r\n case GLOBAL_SETTINGS:\r\n draft.globalSettingsVisible = action.payload;\r\n break;\r\n case EDIT_MODE:\r\n draft.edit = action.payload;\r\n break;\r\n case SWITCH_TAB:\r\n draft.openTab = action.payload;\r\n draft.edit = false;\r\n draft.globalSettingsVisible = false;\r\n break;\r\n case UPDATE_TABLE:\r\n draft.globalSettingsVisible = false;\r\n break;\r\n case UPDATED_TABLE:\r\n switch (action.tag) {\r\n case \"saved_platform_access\":\r\n draft.edit = false;\r\n draft.pending = false;\r\n break;\r\n case \"locked_platform_access\":\r\n draft.lockPending = false;\r\n break;\r\n }\r\n break;\r\n case SAVE_ALL_PRODUCTS_ACCESS_CHANGES:\r\n case SAVE_CATEGORY_PRODUCTS_ACCESS_CHANGES:\r\n draft.pending = true;\r\n break;\r\n case SAVED_ALL_PRODUCTS_ACCESS_CHANGES:\r\n case SAVED_CATEGORY_PRODUCTS_ACCESS_CHANGES:\r\n draft.pending = false;\r\n break;\r\n case ERROR_SAVING_CHANGES:\r\n draft.pending = false;\r\n break;\r\n case LOCK_PENDING:\r\n draft.lockPending = action.payload;\r\n break;\r\n case WARNING_TOGGLED:\r\n draft.warningVisible = action.payload;\r\n break;\r\n case MODIFY_GLOBAL_ACCESS_CATEGORY:\r\n draft.warningVisible = true;\r\n break;\r\n case DISCARD_CHANGES:\r\n draft.globalSettingsVisible = false;\r\n draft.edit = false;\r\n draft.warningVisible = false;\r\n break;\r\n }\r\n });\r\n\r\ntype AllProductsState = PendingChanges;\r\nconst initialAllProducts: AllProductsState = {\r\n individualChanges: {},\r\n globalChanges: {},\r\n};\r\n\r\nconst allProductsReducer = (\r\n state = initialAllProducts,\r\n action: Action\r\n): AllProductsState =>\r\n produce(state, (draft) => {\r\n switch (action.type) {\r\n case UPDATED_TABLE:\r\n switch (action.tag) {\r\n case \"saved_platform_access\":\r\n return initialAllProducts;\r\n }\r\n break;\r\n case MODIFY_GLOBAL_ACCESS_ALL:\r\n {\r\n const { productType, value } = action.payload;\r\n draft.globalChanges[productType] = value;\r\n draft.individualChanges = mapObj(\r\n (change) => ({ ...change, [productType]: undefined }),\r\n draft.individualChanges\r\n );\r\n }\r\n break;\r\n case MODIFY_ACCESS_ALL: {\r\n const { playersID, productType, value } = action.payload;\r\n const idKey = playersID.toString();\r\n if (state.individualChanges[idKey] !== undefined) {\r\n draft.individualChanges[idKey][productType] = {\r\n bEnabled: value,\r\n };\r\n } else {\r\n draft.individualChanges[idKey] = {\r\n [productType]: { bEnabled: value },\r\n };\r\n }\r\n draft.globalChanges[productType] = undefined;\r\n break;\r\n }\r\n case DISCARD_CHANGES:\r\n return initialAllProducts;\r\n }\r\n });\r\n\r\ntype CategoriesState = Readonly<{ [K in ProductType]: CategoryPendingChanges }>;\r\nconst initialCategoryState = {\r\n allPlayersAccessSettings: {\r\n products: [],\r\n },\r\n individualPlayersAccessSettings: [],\r\n};\r\n\r\nconst initialCategoriesState: CategoriesState = {\r\n sports: { ...initialCategoryState },\r\n casino: { ...initialCategoryState },\r\n live: { ...initialCategoryState },\r\n lotto3000: { ...initialCategoryState },\r\n horses: { ...initialCategoryState },\r\n};\r\n\r\nexport const categoriesReducer = (\r\n state = initialCategoriesState,\r\n action: Action\r\n): CategoriesState =>\r\n produce(state, (draft) => {\r\n // This is a monster. Sorry, sorry.\r\n switch (action.type) {\r\n case UPDATED_TABLE:\r\n if (action.tag === \"saved_platform_access\") {\r\n return initialCategoriesState;\r\n }\r\n break;\r\n case MODIFY_GLOBAL_ACCESS_CATEGORY:\r\n {\r\n const { category, data } = action.payload;\r\n\r\n const productIDs = data.products.map((x) => x.productsID);\r\n\r\n draft[category].individualPlayersAccessSettings = draft[\r\n category\r\n ].individualPlayersAccessSettings.map((setting) => ({\r\n ...setting,\r\n products: setting.products.filter(\r\n (x) => !productIDs.includes(x.productsID)\r\n ),\r\n }));\r\n\r\n const { bAllProductsEnabled } = data;\r\n if (data.bAllProductsEnabled != null) {\r\n draft[category].allPlayersAccessSettings.bAllProductsEnabled =\r\n bAllProductsEnabled;\r\n\r\n draft[category].allPlayersAccessSettings.products = [];\r\n draft[category].individualPlayersAccessSettings = draft[\r\n category\r\n ].individualPlayersAccessSettings.map((x) => ({\r\n ...x,\r\n products: [],\r\n }));\r\n }\r\n\r\n const oldProducts = draft[category].allPlayersAccessSettings.products;\r\n\r\n draft[category].allPlayersAccessSettings.products = [\r\n ...oldProducts.filter((x) => !productIDs.includes(x.productsID)),\r\n ...data.products,\r\n ];\r\n }\r\n break;\r\n case MODIFY_ACCESS_CATEGORY:\r\n {\r\n const { category, data } = action.payload;\r\n\r\n const existingRecord = draft[\r\n category\r\n ].individualPlayersAccessSettings.findIndex(\r\n (x) => x.playersID === data.playersID\r\n );\r\n // If we already have a record, update it.\r\n if (existingRecord !== -1) {\r\n const orig =\r\n draft[category].individualPlayersAccessSettings[existingRecord];\r\n const products = [\r\n ...orig.products.filter(\r\n (x) => x.productsID !== data.product.productsID\r\n ),\r\n data.product,\r\n ];\r\n draft[category].individualPlayersAccessSettings[existingRecord] = {\r\n playersID: data.playersID,\r\n products,\r\n };\r\n } else {\r\n // Otherwise, create a record.\r\n draft[category].individualPlayersAccessSettings.push({\r\n playersID: data.playersID,\r\n products: [data.product],\r\n });\r\n }\r\n }\r\n break;\r\n case MODIFY_ACCESS_ENTIRE_CATEGORY:\r\n {\r\n const { category, data } = action.payload;\r\n const existingRecord = draft[\r\n category\r\n ].individualPlayersAccessSettings.findIndex(\r\n (x) => x.playersID === data.playersID\r\n );\r\n if (existingRecord !== -1) {\r\n draft[category].individualPlayersAccessSettings[\r\n existingRecord\r\n ].products = data.products;\r\n } else {\r\n draft[category].individualPlayersAccessSettings.push(data);\r\n }\r\n }\r\n break;\r\n case DISCARD_CHANGES:\r\n return initialCategoriesState;\r\n }\r\n });\r\n\r\nexport const reducer = combineReducers({\r\n settings: settingsReducer,\r\n categoryAccessChanges: categoriesReducer,\r\n allTableAccessChanges: allProductsReducer,\r\n});\r\n\r\n/* Side effects */\r\n\r\ntype AllPlayersAccessSettings = {\r\n horses?: { bEnabled: boolean };\r\n casino?: { bEnabled: boolean };\r\n sports?: { bEnabled: boolean };\r\n};\r\n\r\n// Change the stored values to the format the endpoint wants for the data.\r\nconst convertToPayload = (p: PendingChanges) => ({\r\n allPlayersAccessSettings: mapObj<\r\n typeof p.globalChanges,\r\n AllPlayersAccessSettings\r\n >(\r\n (bEnabled) => (bEnabled == null ? undefined : { bEnabled }),\r\n p.globalChanges\r\n ),\r\n individualPlayersAccessSettings: toPairs(p.individualChanges).map(\r\n ([playersID, rest]) => ({\r\n ...rest,\r\n playersID,\r\n })\r\n ),\r\n});\r\n\r\nconst platformAccessAllURL =\r\n PLAYERS_URL + \"ManagePlayerAccess/update-platform-access-all\";\r\n\r\ntype Response = { id: number; status: string; errors: FieldError[] };\r\n\r\n// Create an observable of api requests.\r\nconst makeRequest = (data: ReturnType) =>\r\n from(api.post(platformAccessAllURL, data));\r\n\r\n// If the user clicks the save changes button, make the request.\r\nconst saveAllProductsChangesEpic = (\r\n action$: ActionsObservable,\r\n state$: StateObservable\r\n) =>\r\n action$.pipe(\r\n ofType(SAVE_ALL_PRODUCTS_ACCESS_CHANGES),\r\n withLatestFrom(state$),\r\n map(([_, state]) => selectAllProductsPayload(state)),\r\n concatMap((p) =>\r\n makeRequest(p).pipe(\r\n pluck(\"data\", \"errors\"), // response.data.errors\r\n map((errors) =>\r\n errors.length > 0\r\n ? errorSavingChanges(Error(\"Could not save changes.\"))\r\n : savedChanges()\r\n ),\r\n catchError((e) => of(errorSavingChanges(e)))\r\n )\r\n )\r\n );\r\n\r\nconst selectCategoryURL = (category: ProductType): string => {\r\n switch (category) {\r\n case \"sports\":\r\n return PLAYERS_URL + \"ManagePlayerAccess/update-platform-access-sports\";\r\n case \"casino\":\r\n return PLAYERS_URL + \"ManagePlayerAccess/update-platform-access-casino\";\r\n case \"live\":\r\n return PLAYERS_URL + \"ManagePlayerAccess/update-platform-access-live\";\r\n case \"lotto3000\":\r\n return (\r\n PLAYERS_URL + \"ManagePlayerAccess/update-platform-access-lotto3000\"\r\n );\r\n case \"horses\":\r\n return PLAYERS_URL + \"ManagePlayerAccess/update-platform-access-horses\";\r\n }\r\n};\r\n\r\nconst makeCategoryRequest = (\r\n data: CategoryPendingChanges,\r\n category: ProductType\r\n) => {\r\n const url = selectCategoryURL(category);\r\n return from(api.post(url, data));\r\n};\r\n\r\nconst saveCategoryChangesEpic = (\r\n action$: ActionsObservable,\r\n state$: StateObservable\r\n) =>\r\n action$.pipe(\r\n ofType(SAVE_CATEGORY_PRODUCTS_ACCESS_CHANGES),\r\n pluck(\"payload\"),\r\n withLatestFrom(state$),\r\n map(([category, state]) => [\r\n category,\r\n selectCategoryProductsPendingChanges(state, category as ProductType),\r\n ]),\r\n concatMap(([category, state]) =>\r\n makeCategoryRequest(\r\n state as CategoryPendingChanges,\r\n category as ProductType\r\n ).pipe(\r\n pluck(\"data\", \"errors\"), // response.data.errors\r\n map((errors) =>\r\n errors.length > 0\r\n ? errorSavingChanges(Error(\"Could not save changes.\"))\r\n : savedChanges()\r\n ),\r\n catchError((e) => of(errorSavingChanges(e)))\r\n )\r\n )\r\n );\r\n\r\nconst reloadAfterChangeEpic = (\r\n action$: ActionsObservable,\r\n state$: StateObservable\r\n) =>\r\n action$.pipe(\r\n ofType(\r\n SAVED_ALL_PRODUCTS_ACCESS_CHANGES,\r\n SAVED_CATEGORY_PRODUCTS_ACCESS_CHANGES\r\n ),\r\n withLatestFrom(state$),\r\n map(([_, state]) => currentKeySelector(state)),\r\n map((key) => updateTable(key, {}, \"saved_platform_access\"))\r\n );\r\n\r\nexport const playerAccessEpic = combineEpics(\r\n saveAllProductsChangesEpic,\r\n saveCategoryChangesEpic,\r\n reloadAfterChangeEpic\r\n);\r\n\r\n/* Action Creators */\r\n\r\nexport const globalSettings = (payload: boolean): Action => ({\r\n type: GLOBAL_SETTINGS,\r\n payload,\r\n});\r\nexport const editMode = (payload: boolean): Action => ({\r\n type: EDIT_MODE,\r\n payload,\r\n});\r\nexport const switchTab = (payload: number): Action => ({\r\n type: SWITCH_TAB,\r\n payload,\r\n});\r\nexport const modifyAccessAll = (payload: AccessMod): Action => ({\r\n type: MODIFY_ACCESS_ALL,\r\n payload,\r\n});\r\nexport const modifyGlobalAccessAll = (payload: GlobalAccessMod): Action => ({\r\n type: MODIFY_GLOBAL_ACCESS_ALL,\r\n payload,\r\n});\r\n\r\nexport const modifyAccessCategory = (\r\n category: ProductType,\r\n data: CategoryAccessMod\r\n): Action => ({\r\n type: MODIFY_ACCESS_CATEGORY,\r\n payload: {\r\n category,\r\n data,\r\n },\r\n});\r\n\r\nexport const setLockPending = (payload: boolean): Action => ({\r\n type: LOCK_PENDING,\r\n payload,\r\n});\r\n\r\nexport const toggleWarning = (payload: boolean): Action => ({\r\n type: WARNING_TOGGLED,\r\n payload,\r\n});\r\n\r\nexport const modifyAccessAllCategory = (\r\n category: ProductType,\r\n data: {\r\n playersID: number;\r\n products: { productsID: number; bEnabled: boolean }[];\r\n }\r\n): Action => ({\r\n type: MODIFY_ACCESS_ENTIRE_CATEGORY,\r\n payload: {\r\n category,\r\n data,\r\n },\r\n});\r\n\r\nexport const modifyCategoryGlobalAccess = (\r\n category: ProductType,\r\n data: GlobalCategoryMod\r\n): Action => ({\r\n type: MODIFY_GLOBAL_ACCESS_CATEGORY,\r\n payload: {\r\n category,\r\n data,\r\n },\r\n});\r\n\r\nconst savedChanges = (): Action => ({\r\n type: SAVED_ALL_PRODUCTS_ACCESS_CHANGES,\r\n});\r\nconst errorSavingChanges = (error: Error): Action => ({\r\n type: ERROR_SAVING_CHANGES,\r\n error,\r\n});\r\n\r\nexport const saveAllProductsChanges = (): Action => ({\r\n type: SAVE_ALL_PRODUCTS_ACCESS_CHANGES,\r\n});\r\n\r\nexport const saveCategoryProducts = (payload: ProductType): Action => ({\r\n type: SAVE_CATEGORY_PRODUCTS_ACCESS_CHANGES,\r\n payload,\r\n});\r\n\r\nexport const discardChanges = (): Action => ({ type: DISCARD_CHANGES });\r\n\r\n/* Selectors */\r\n\r\nexport const selectGlobalSettings = (app: AppState) =>\r\n app.playerAccess.settings.globalSettingsVisible;\r\nexport const selectEditModeOpen = (app: AppState) =>\r\n app.playerAccess.settings.edit;\r\nexport const selectOpenTab = (app: AppState) =>\r\n app.playerAccess.settings.openTab;\r\n\r\nexport const selectAllProductsPendingChanges = (app: AppState) =>\r\n app.playerAccess.allTableAccessChanges;\r\n\r\nconst selectAllProductsPayload = createSelector(\r\n selectAllProductsPendingChanges,\r\n convertToPayload\r\n);\r\n\r\nexport const selectCategoryProductsPendingChanges = (\r\n app: AppState,\r\n category: ProductType\r\n) => app.playerAccess.categoryAccessChanges[category];\r\n\r\nexport const selectLocalChanges = (app: AppState) =>\r\n app.playerAccess.allTableAccessChanges.individualChanges;\r\nexport const selectGlobalChanges = (app: AppState) =>\r\n app.playerAccess.allTableAccessChanges.globalChanges;\r\n\r\nexport const selectCategoryIndChanges =\r\n (category: ProductType) => (app: AppState) =>\r\n app.playerAccess.categoryAccessChanges[category]\r\n .individualPlayersAccessSettings;\r\n\r\nexport const selectCategoryGlobalChanges =\r\n (category: ProductType) => (app: AppState) =>\r\n app.playerAccess.categoryAccessChanges[category].allPlayersAccessSettings;\r\n\r\nexport const selectSavePending = (app: AppState) =>\r\n app.playerAccess.settings.pending;\r\n\r\nexport const selectShouldSaveAllProducts = createSelector(\r\n selectAllProductsPendingChanges,\r\n (changes) =>\r\n Object.entries(changes.individualChanges).length > 0 ||\r\n Object.entries(changes.globalChanges).length > 0\r\n);\r\n\r\nexport const selectLockPending = (app: AppState) =>\r\n app.playerAccess.settings.lockPending;\r\n\r\nexport const selectLockUpdating = createSelector(\r\n selectLockPending,\r\n selectTablePending,\r\n (lock, table) => lock || table\r\n);\r\n\r\nexport const selectWarningVisible = (app: AppState) =>\r\n app.playerAccess.settings.warningVisible;\r\n\r\n/**\r\n * Factory function for a selector for PlatformAccessItems. Their state is complicated,\r\n * based on the original list data from the server, any local modifications to the specific\r\n * player, and any global modifications to the platform as a whole, so that the selected\r\n * count changes in an intuitive way.\r\n */\r\nexport const createPlatformAccessSelector = (\r\n playersID: number,\r\n productType: ProductType,\r\n allCount: number,\r\n activeCount: number\r\n) =>\r\n createSelector(\r\n selectLocalChanges,\r\n selectGlobalChanges,\r\n (changes, globalChanges) => {\r\n const isPending =\r\n changes[playersID.toString()] &&\r\n changes[playersID.toString()][productType] !== undefined;\r\n\r\n const pendingActiveCount = isPending\r\n ? changes[playersID.toString()][productType]?.bEnabled\r\n ? allCount\r\n : 0\r\n : null;\r\n\r\n const globalChangeValue =\r\n globalChanges[productType] !== undefined\r\n ? globalChanges[productType]\r\n ? allCount\r\n : 0\r\n : null;\r\n\r\n const displayCount =\r\n globalChangeValue !== null\r\n ? globalChangeValue\r\n : pendingActiveCount === null\r\n ? activeCount\r\n : pendingActiveCount;\r\n\r\n return displayCount;\r\n }\r\n );\r\n\r\nexport const createCategoryAccessSelector = (\r\n playersID: number,\r\n productsID: number,\r\n bEnabled: boolean,\r\n isLocked: boolean,\r\n category: ProductType\r\n) =>\r\n createSelector(\r\n selectCategoryIndChanges(category),\r\n selectCategoryGlobalChanges(category),\r\n (changes, globalChanges) => {\r\n // Does this player have any pending changes?\r\n const changesForPlayer = changes.find((x) => x.playersID === playersID);\r\n // If so, does this player have any pending changes for this product?\r\n\r\n const changesForProduct =\r\n changesForPlayer != null\r\n ? changesForPlayer.products.find((x) => x.productsID === productsID)\r\n : null;\r\n\r\n const globalChangesForProduct = globalChanges.products.find(\r\n (x) => x.productsID === productsID\r\n );\r\n\r\n const allProductsEnabled = globalChanges.bAllProductsEnabled;\r\n\r\n const globallyEnabled =\r\n globalChangesForProduct !== undefined\r\n ? globalChangesForProduct.bEnabled\r\n : allProductsEnabled !== undefined\r\n ? allProductsEnabled\r\n : undefined;\r\n\r\n const isChecked = isLocked\r\n ? bEnabled\r\n : changesForProduct != null\r\n ? changesForProduct.bEnabled\r\n : globallyEnabled !== undefined\r\n ? globallyEnabled\r\n : bEnabled;\r\n\r\n return isChecked;\r\n }\r\n );\r\n\r\nexport const createAllCategoryAccessSelector = (\r\n category: ProductType,\r\n playersID: number,\r\n isLocked: boolean,\r\n products: { productsID: number; bEnabled: boolean }[]\r\n) =>\r\n createSelector(\r\n selectCategoryIndChanges(category),\r\n selectCategoryGlobalChanges(category),\r\n categoryAllEnabledSelector(category),\r\n selectEditModeOpen,\r\n (changes, globalChanges, allEnabled, editMode) => {\r\n const changesForPlayer = changes.find((x) => x.playersID === playersID);\r\n\r\n const isChecked = isLocked\r\n ? products.every((product) => product.bEnabled)\r\n : products.every((product) => {\r\n const changeForProduct =\r\n changesForPlayer === undefined\r\n ? undefined\r\n : changesForPlayer.products.find(\r\n (x) => x.productsID === product.productsID\r\n );\r\n const globalChangeForProduct = globalChanges.products.find(\r\n (x) => x.productsID === product.productsID\r\n );\r\n\r\n if (changeForProduct != null) {\r\n return changeForProduct.bEnabled;\r\n } else if (globalChangeForProduct != null) {\r\n return globalChangeForProduct.bEnabled;\r\n } else if (allEnabled !== undefined) {\r\n return allEnabled;\r\n } else {\r\n return product.bEnabled;\r\n }\r\n });\r\n\r\n return [isChecked, !editMode || isLocked] as [boolean, boolean];\r\n }\r\n );\r\n\r\nexport const categoryAllEnabledSelector =\r\n (category: ProductType) => (app: AppState) =>\r\n app.playerAccess.categoryAccessChanges[category].allPlayersAccessSettings\r\n .bAllProductsEnabled;\r\n\r\nexport const createCategorySummaryGlobalSelector = (\r\n category: ProductType,\r\n isChecked: boolean\r\n) =>\r\n createSelector(\r\n categoryAllEnabledSelector(category),\r\n selectEditModeOpen,\r\n selectCategoryGlobalChanges(category),\r\n selectCategoryIndChanges(category),\r\n (allEnabled, editMode, globalChanges, indChanges) => {\r\n const uncheckedBoxExists =\r\n indChanges.some((x) => x.products.some((y) => y.bEnabled === false)) ||\r\n globalChanges.products.some((y) => y.bEnabled === false);\r\n\r\n const appearChecked = uncheckedBoxExists\r\n ? false\r\n : allEnabled !== undefined\r\n ? allEnabled\r\n : isChecked;\r\n\r\n const appearLocked = !editMode;\r\n\r\n return [appearChecked, appearLocked] as [boolean, boolean];\r\n }\r\n );\r\n\r\nexport const createCategorySummarySelector = (\r\n isChecked: boolean,\r\n productsID: number,\r\n category: ProductType\r\n) =>\r\n createSelector(\r\n selectCategoryGlobalChanges(category),\r\n selectCategoryIndChanges(category),\r\n selectEditModeOpen,\r\n (globalChanges, indChanges, editMode) => {\r\n const { bAllProductsEnabled, products } = globalChanges;\r\n\r\n const product = products.find((x) => x.productsID === productsID);\r\n\r\n const uncheckedBoxExists = indChanges.some((x) => {\r\n const idx = x.products.findIndex((y) => y.productsID === productsID);\r\n if (idx === -1) return false;\r\n return x.products[idx]?.bEnabled === false;\r\n });\r\n\r\n const appearChecked = uncheckedBoxExists\r\n ? false\r\n : product !== undefined\r\n ? product.bEnabled\r\n : bAllProductsEnabled !== undefined\r\n ? bAllProductsEnabled\r\n : isChecked;\r\n\r\n // [Appear checked, appear locked]\r\n return [appearChecked, !editMode] as [boolean, boolean];\r\n }\r\n );\r\n","import { combineReducers } from \"redux\";\r\nimport { createSelector } from \"reselect\";\r\nimport { tGetActions as getActions } from \"helpers/actions\";\r\nimport { SearchByUserResult } from \"types/ApiResponseTypes\";\r\nimport { PLAYERSEARCH_URL } from \"serverDetails\";\r\nimport { AppState } from \"reducers/rootReducer\";\r\n\r\nimport { ofType, combineEpics, ActionsObservable } from \"redux-observable\";\r\nimport {\r\n map,\r\n mapTo,\r\n catchError,\r\n switchMap,\r\n distinctUntilChanged,\r\n delay,\r\n pluck,\r\n debounceTime,\r\n filter,\r\n takeUntil,\r\n} from \"rxjs/operators\";\r\nimport { produce } from \"immer\";\r\nimport api from \"api\";\r\nimport { from, of } from \"rxjs\";\r\n\r\nconst UPDATED_SEARCH_TERM = \"app/playerSearch/usercode/UPDATED_SEARCH_TERM\";\r\nconst SEARCH_SUCCESS = \"app/playerSearch/usercode/SEARCH_SUCCESS\";\r\nconst SEARCH_ERROR = \"app/playerSearch/usercode/SEARCH_ERROR\";\r\nconst RESULTS_VISIBLE = \"app/playerSearch/usercode/RESULTS_VISIBLE\";\r\nconst NO_RESULTS_WARNING = \"app/playerSearch/usercode/NO_RESULTS_WARNING\";\r\nconst SEARCH_CANCELLED = \"app/playerSearch/usercode/SEARCH_CANCELLED\";\r\n\r\nconst initialSearchByIDState: SearchByUserResult = {\r\n playersID: -1,\r\n userCode: \"\",\r\n fullName: \"\",\r\n openPassword: \"\",\r\n availableBalance: -1,\r\n currencyCode: \"USD\",\r\n bSuppressed: false,\r\n};\r\n\r\nexport const [fetchSearchByPlayersID, searchByPlayersIDReducer] = getActions(\r\n \"app/playerSearch/playersID/SEARCH_BY_PLAYERS_ID\",\r\n PLAYERSEARCH_URL + \"search-by-players-id\",\r\n initialSearchByIDState\r\n);\r\n\r\ntype Action =\r\n | { type: typeof UPDATED_SEARCH_TERM; payload: string }\r\n | { type: typeof SEARCH_SUCCESS; payload: SearchByUserResult[] }\r\n | { type: typeof SEARCH_ERROR; payload: Error }\r\n | { type: typeof RESULTS_VISIBLE; payload: boolean }\r\n | { type: typeof NO_RESULTS_WARNING; payload: boolean }\r\n | { type: typeof SEARCH_CANCELLED };\r\n\r\ntype State = {\r\n status: \"okay\" | \"error\" | \"pending\";\r\n visible: boolean;\r\n warning: boolean;\r\n results: SearchByUserResult[];\r\n};\r\n\r\nconst initialState: State = {\r\n status: \"okay\",\r\n visible: false,\r\n warning: false,\r\n results: [],\r\n};\r\n\r\nconst userCodeSearchReducer = (state = initialState, action: Action) =>\r\n produce(state, draft => {\r\n switch (action.type) {\r\n case UPDATED_SEARCH_TERM:\r\n if (action.payload === \"\") {\r\n draft.visible = false;\r\n draft.results = [];\r\n } else {\r\n draft.status = \"pending\";\r\n }\r\n break;\r\n case SEARCH_SUCCESS:\r\n draft.results = action.payload;\r\n draft.status = \"okay\";\r\n draft.visible = true;\r\n if (action.payload.length === 0) {\r\n draft.warning = true;\r\n }\r\n break;\r\n case SEARCH_ERROR:\r\n draft.status = \"error\";\r\n draft.visible = false;\r\n break;\r\n case RESULTS_VISIBLE:\r\n draft.visible = action.payload;\r\n break;\r\n case NO_RESULTS_WARNING:\r\n draft.warning = false;\r\n break;\r\n case SEARCH_CANCELLED:\r\n return initialState;\r\n }\r\n });\r\n\r\n/* Side Effects */\r\n\r\nfunction makeRequest(searchText: string) {\r\n return from(\r\n api.get(PLAYERSEARCH_URL + \"search-by-user-code\", {\r\n params: { searchText },\r\n })\r\n ).pipe(\r\n pluck(\"data\"),\r\n map(payload => ({ type: SEARCH_SUCCESS, payload })),\r\n catchError(payload => of({ type: SEARCH_ERROR, payload }))\r\n );\r\n}\r\n\r\n/**\r\n * Perform a search if the search term has changed. This is debounced, and identical\r\n * search terms are filtered out, so we don't hammer the server unneccesarily.\r\n * Requests are cancelled if a SEARCH_CANCELLED action is dispatched.\r\n */\r\nconst userCodeSearchEpic = (action$: ActionsObservable) =>\r\n action$.pipe(\r\n ofType(UPDATED_SEARCH_TERM),\r\n filter(action => action.payload !== \"\"),\r\n debounceTime(200),\r\n pluck(\"payload\"),\r\n distinctUntilChanged(),\r\n switchMap(query =>\r\n makeRequest(query).pipe(takeUntil(action$.pipe(ofType(SEARCH_CANCELLED))))\r\n )\r\n );\r\n\r\nconst searchWarningOffEpic = (action$: ActionsObservable) =>\r\n action$.pipe(\r\n ofType(SEARCH_SUCCESS),\r\n pluck(\"payload\"),\r\n filter(p => p.length === 0),\r\n delay(500),\r\n mapTo({ type: NO_RESULTS_WARNING })\r\n );\r\n\r\n/* Action creators */\r\n\r\nexport const updateSearchTerm = (payload: string): Action => ({\r\n type: UPDATED_SEARCH_TERM,\r\n payload,\r\n});\r\n\r\nexport const hideSearchResults = (): Action => ({\r\n type: RESULTS_VISIBLE,\r\n payload: false,\r\n});\r\n\r\nexport const cancelSearch = (): Action => ({\r\n type: SEARCH_CANCELLED,\r\n});\r\n\r\n/* Selectors */\r\n\r\nexport const userCodeSearchSelector = (state: AppState) =>\r\n state.playerSearch.usercode;\r\n\r\nexport const searchWarningSelector = createSelector(\r\n userCodeSearchSelector,\r\n state => state.warning\r\n);\r\n\r\nexport const selectSearchByPlayersID = (state: AppState) =>\r\n state.playerSearch.playersID;\r\n\r\nexport const playerSearchEpic = combineEpics(\r\n userCodeSearchEpic,\r\n searchWarningOffEpic\r\n);\r\n\r\nexport const reducer = combineReducers({\r\n usercode: userCodeSearchReducer,\r\n playersID: searchByPlayersIDReducer,\r\n});\r\n","/** @jsx jsx */\r\nimport React from \"react\";\r\nimport { jsx } from \"@emotion/core\";\r\nimport css from \"@emotion/css/macro\";\r\nimport { Theme } from \"theme\";\r\nimport { useTheme } from \"emotion-theming\";\r\n\r\nimport styles from \"./SignInBox.module.css\";\r\n\r\ninterface SignInBoxProps {\r\n title: string;\r\n children: React.ReactNode;\r\n}\r\n\r\nconst SignInBox = (props: SignInBoxProps) => {\r\n const theme = useTheme();\r\n\r\n const style = css`\r\n max-width: 450px;\r\n width: 100%;\r\n background-color: ${theme.colors.second};\r\n color: white;\r\n border-radius: 4px;\r\n padding: 60px 75px;\r\n box-shadow: 0px 1px 30px rgba(255, 255, 255, 0.2);\r\n box-sizing: border-box;\r\n display: inline-block;\r\n text-align: left;\r\n\r\n @media (max-width: 480px) {\r\n padding: 10px;\r\n background-color: inherit;\r\n border: none;\r\n box-shadow: none;\r\n }\r\n `;\r\n\r\n return (\r\n
\r\n

{props.title}

\r\n
{props.children}
\r\n
\r\n );\r\n};\r\n\r\nexport default SignInBox;\r\n","/** @jsx jsx */\r\nimport React, { useMemo, useState, useCallback } from \"react\";\r\nimport { jsx } from \"@emotion/core\";\r\nimport { table, body, head } from \"./DetailsModalStyles\";\r\nimport { useFetch } from \"helpers/loading\";\r\nimport Modal from \"components/PageComponents/Modal/Modal\";\r\nimport PlayerBadge from \"components/PageComponents/PlayerBadge/PlayerBadge\";\r\nimport { CurrencyCode, toCurrency } from \"helpers/currency\";\r\nimport { format } from \"date-fns\";\r\nimport { Button } from \"components/Buttons\";\r\nimport { formatDateProperly } from \"helpers/time\";\r\nimport { Loading } from \"components/PageComponents/Loading/Loading\";\r\nimport { ErrorContent } from \"components/Errors/Errors\";\r\nimport { useTranslation } from \"react-i18next\";\r\n\r\nconst url = \"/api/v1/AgentReports/accrual-details-modal\";\r\n\r\nexport const useAccrualSummary = () => {\r\n const [theDate, setDate] = useState(null);\r\n const modalID = theDate === null ? -1 : null;\r\n const showModal = theDate !== null;\r\n const closeModal = useCallback(() => setDate(null), [setDate]);\r\n\r\n return { theDate, setDate, modalID, showModal, closeModal };\r\n};\r\n\r\nexport const useAccrualModal = () => {\r\n const [modalID, setModalID] = useState(-1);\r\n const showModal = useMemo(() => modalID !== -1, [modalID]);\r\n const closeModal = useCallback(() => setModalID(-1), [setModalID]);\r\n\r\n return {\r\n modalID,\r\n setModalID,\r\n showModal,\r\n closeModal,\r\n };\r\n};\r\n\r\ntype AccrualItem = {\r\n playersID: number;\r\n userCode: string;\r\n openPassword: string;\r\n accrualDate: Date;\r\n madeBy: string;\r\n description: string;\r\n accrualAmount: {\r\n amount: number;\r\n baseCurrencyAmount: number;\r\n currencyCode: CurrencyCode;\r\n };\r\n};\r\n\r\ntype Response = {\r\n accrualItems: AccrualItem[];\r\n startDate: Date;\r\n endDate: Date;\r\n player: {\r\n playersID: number;\r\n userCode: string | null;\r\n openPassword: string | null;\r\n };\r\n total: {\r\n amount: number;\r\n currencyCode: CurrencyCode;\r\n };\r\n};\r\n\r\ntype AccrualDetails = {\r\n playersID: number | null;\r\n startDate?: Date | null;\r\n endDate?: Date | null;\r\n};\r\n\r\nconst AccrualDetails: React.FC = ({\r\n playersID,\r\n startDate,\r\n endDate,\r\n}) => {\r\n const config = useMemo(() => {\r\n const handleDate = (d?: Date | string | null) =>\r\n d == null ? null : formatDateProperly(d);\r\n return {\r\n params: {\r\n playersID,\r\n startDate: handleDate(startDate),\r\n endDate: handleDate(endDate),\r\n },\r\n };\r\n }, [playersID, startDate, endDate]);\r\n\r\n const [state, reload] = useFetch(url, undefined, config);\r\n const content = () => {\r\n if (state.pending) {\r\n return ;\r\n }\r\n if (\"error\" in state) {\r\n return ;\r\n }\r\n if (\"data\" in state) {\r\n return ;\r\n }\r\n };\r\n\r\n return (\r\n
\r\n {content()}\r\n
\r\n );\r\n};\r\n\r\nconst AccrualTable: React.FC<{ response: Response }> = ({ response }) => {\r\n const { t } = useTranslation(\"accrualDetails\");\r\n return (\r\n
\r\n {response.accrualItems.length === 0 ? (\r\n

{t(\"noData\")}

\r\n ) : (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {response.accrualItems.map(item => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n
PlayerDateMade byDescriptionAmount
\r\n \r\n {format(item.accrualDate, \"MM-DD-YYYY\")}{item.madeBy}{item.description}\r\n {toCurrency(\r\n item.accrualAmount.currencyCode,\r\n item.accrualAmount.amount\r\n )}\r\n
\r\n )}\r\n \r\n \r\n {t(\"total\")}:{\" \"}\r\n {toCurrency(response.total.currencyCode, response.total.amount)}\r\n \r\n
\r\n \r\n );\r\n};\r\n\r\ntype AccrualDetailsModal = AccrualDetails & { show: boolean; cancel(): void };\r\n\r\nconst AccrualDetailsModal: React.FC = props => {\r\n const { cancel, show, playersID, startDate, endDate } = props;\r\n const { t } = useTranslation(\"accrualDetails\");\r\n\r\n return (\r\n \r\n {playersID !== -1 && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default AccrualDetailsModal;\r\n","module.exports = __webpack_public_path__ + \"static/media/visible.09b53dfc.svg\";","module.exports = __webpack_public_path__ + \"static/media/notvisible.ae43076d.svg\";","import { combineReducers } from \"redux\";\r\n// import { all, select, takeEvery, takeLatest, put } from \"redux-saga/effects\";\r\nimport { get_freeplay_bonuses_for_agent_player_200 } from \"../../types/ApiResponseTypes\";\r\nimport { tGetActions as getActions } from \"../../helpers/actions\";\r\nimport { BONUSES_URL } from \"../../serverDetails\";\r\nimport { fetchPlayerBalancesPanel } from \"reducers/PageReducers/PlayersReducer/playersReducer\";\r\nimport { selectPlayerBalancePanel } from \"reducers/PageReducers/PlayersReducer/playersSelectors\";\r\nimport {\r\n ofType,\r\n combineEpics,\r\n ActionsObservable,\r\n StateObservable,\r\n} from \"redux-observable\";\r\nimport { mapTo, map, withLatestFrom, delay } from \"rxjs/operators\";\r\nimport { AppState } from \"reducers/rootReducer\";\r\n\r\nexport const [getFreeplayBonuses, getFreeplayBonusesReducer] = getActions(\r\n \"FREEPLAY_BONUSES\",\r\n BONUSES_URL + \"get-freeplay-bonuses-for-agent-player\",\r\n [] as get_freeplay_bonuses_for_agent_player_200\r\n);\r\n\r\n// Constants\r\nconst HID_PAYMENT_NOTIFICATION = \"app/payment/HID_PAYMENT_NOTIFICATION\";\r\nconst QUICK_ACCRUAL_SUCCESS = \"app/payment/QUICK_ACCRUAL_SUCCESS\";\r\nconst QUICK_ACCRUAL_ERROR = \"app/payment/QUICK_ACCRUAL_ERROR\";\r\nconst PAYMENT_INPUT_FOCUS = \"app/payment/PAYMENT_INPUT_FOCUS\";\r\n\r\ntype NotifyAction =\r\n | { type: typeof HID_PAYMENT_NOTIFICATION }\r\n | {\r\n type: typeof QUICK_ACCRUAL_SUCCESS;\r\n toast: { kind: \"info\"; text: string };\r\n }\r\n | { type: typeof QUICK_ACCRUAL_ERROR; toast: { kind: \"error\"; text: string } }\r\n | { type: typeof PAYMENT_INPUT_FOCUS }\r\n | { type: \"LOCATION_LEAVE\"; location: unknown };\r\n\r\nconst initialState = {\r\n value: \"\",\r\n visible: false,\r\n paymentFocusFlag: 0,\r\n paymentFormKey: 0,\r\n};\r\ntype NotifyState = typeof initialState;\r\n\r\nconst paymentNotifyReducer = (\r\n state = initialState,\r\n action: NotifyAction\r\n): NotifyState => {\r\n switch (action.type) {\r\n case HID_PAYMENT_NOTIFICATION:\r\n return { ...state, visible: false };\r\n case \"LOCATION_LEAVE\":\r\n return initialState;\r\n case QUICK_ACCRUAL_SUCCESS:\r\n return {\r\n ...state,\r\n paymentFormKey: state.paymentFormKey + 1,\r\n value: \"Payment succeeded!\",\r\n visible: true,\r\n };\r\n case QUICK_ACCRUAL_ERROR:\r\n return {\r\n ...state,\r\n value: \"Payment unsuccessful, please try again.\",\r\n visible: true,\r\n };\r\n case PAYMENT_INPUT_FOCUS:\r\n return { ...state, paymentFocusFlag: state.paymentFocusFlag + 1 };\r\n default:\r\n return state;\r\n }\r\n};\r\n\r\n// Epics\r\n\r\nconst paymentNotifyEpic = (action$: ActionsObservable) =>\r\n action$.pipe(\r\n ofType(QUICK_ACCRUAL_SUCCESS, QUICK_ACCRUAL_ERROR),\r\n delay(2000),\r\n mapTo({ type: HID_PAYMENT_NOTIFICATION })\r\n );\r\n\r\nconst triggerOnPaymentEpic = (\r\n action$: ActionsObservable,\r\n state$: StateObservable\r\n) =>\r\n action$.pipe(\r\n ofType(QUICK_ACCRUAL_SUCCESS),\r\n withLatestFrom(state$),\r\n map(([_, state]) => selectPlayerBalancePanel(state)),\r\n map(b => b.data.playersID),\r\n map(playersID => fetchPlayerBalancesPanel({ playersID }))\r\n );\r\n\r\n// Selectors\r\n\r\nexport const paymentNotifySelector = (state: AppState) =>\r\n state.paymentReducer.paymentNotifyReducer;\r\n\r\nexport const paymentFocusSelector = (app: AppState) =>\r\n app.paymentReducer.paymentNotifyReducer.paymentFocusFlag;\r\n\r\nexport const paymentFormKeySelector = (app: AppState) =>\r\n app.paymentReducer.paymentNotifyReducer.paymentFormKey;\r\n\r\n// Action creators\r\n\r\nexport const triggerPaymentFocus = (): NotifyAction => ({\r\n type: PAYMENT_INPUT_FOCUS,\r\n});\r\n\r\nexport const accrualSuccess = (): NotifyAction => ({\r\n type: QUICK_ACCRUAL_SUCCESS,\r\n toast: { text: \"Payment succeeded!\", kind: \"info\" },\r\n});\r\n\r\nexport const accrualError = (): NotifyAction => ({\r\n type: QUICK_ACCRUAL_ERROR,\r\n toast: {\r\n text: \"Payment failed, please try again.\",\r\n kind: \"error\",\r\n },\r\n});\r\n\r\nexport const paymentReducer = combineReducers({\r\n paymentNotifyReducer,\r\n getFreeplayBonusesReducer,\r\n});\r\n\r\nexport const paymentEpic = combineEpics(\r\n triggerOnPaymentEpic,\r\n paymentNotifyEpic\r\n);\r\n","import i18n from \"i18next\";\r\nimport { initReactI18next } from \"react-i18next\";\r\nimport translations from \"./translations.json\";\r\n\r\ni18n.use(initReactI18next).init({\r\n resources: translations,\r\n lng: localStorage.getItem(\"lang\") ?? \"en\",\r\n defaultNS: \"default\",\r\n keySeparator: false,\r\n interpolation: {\r\n escapeValue: false,\r\n },\r\n});\r\n\r\nexport default i18n;\r\n","import React from \"react\";\r\nimport styles from \"./SlideOne.module.scss\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { selectCompanyName } from \"reducers/ui\";\r\n\r\nexport const SlideOne: React.FC<{\r\n nextSlide(): void;\r\n}> = ({ nextSlide, children }) => {\r\n const companyName = useSelector(selectCompanyName);\r\n const companyNameUpper = companyName.toUpperCase();\r\n return (\r\n
\r\n
\r\n \"Nancy\"\r\n
\r\n
\r\n

Hi there and welcome to {companyNameUpper}!

\r\n

\r\n My name is Nancy, and I am here to guide you through a quick\r\n tutorial, to introduce you to your shiny new player management\r\n platform.\r\n

\r\n
\r\n \r\n
\r\n
\r\n {children}\r\n
\r\n );\r\n};\r\n","/** @jsx jsx */\r\nimport React, { useReducer } from \"react\";\r\nimport { jsx } from \"@emotion/core\";\r\nimport css from \"@emotion/css/macro\";\r\nimport styles from \"./Tutorial.module.scss\";\r\nimport Question from \"assets/Question.svg\";\r\nimport QuestionGrey from \"assets/QuestionGrey.svg\";\r\nimport CloseIcon from \"assets/tutorialclose.svg\";\r\n/*\r\nimport TutorialTooltipArrow from \"assets/tutorialtooltiparrow.png\";\r\n\r\nconst TooltipArrow: React.FC<{ pos: \"left\" | \"bottom\" | \"right\" }> = ({\r\n pos,\r\n}) => {\r\n const rectCss = css`\r\n ${pos === \"left\" ? \"right: 1em;\" : undefined}\r\n ${pos === \"right\" ? \"left: 1em;\" : undefined}\r\n ${pos === \"bottom\" ? \"bottom: 1em;\" : undefined}\r\n position: absolute;\r\n `;\r\n return \"\";\r\n};\r\n */\r\n\r\ntype ImageTooltip = {\r\n key: number;\r\n alt: string;\r\n selected: boolean;\r\n persistIcons?: boolean;\r\n tooltipDirection?: \"left\" | \"right\" | \"bottom\";\r\n tooltipRelativeLocation?: { x: number; y: number };\r\n position: { x: number; y: number };\r\n selectedPosition?: {\r\n x: number;\r\n y: number;\r\n direction?: \"left\" | \"right\" | \"bottom\";\r\n };\r\n associatedImageSrc?: string;\r\n content: React.ReactNode;\r\n onClick(): void;\r\n notVisible?: boolean;\r\n};\r\n\r\nconst ImageTooltip: React.FC = (props) => {\r\n const {\r\n onClick,\r\n selectedPosition,\r\n tooltipDirection = \"bottom\",\r\n selected,\r\n position,\r\n content,\r\n tooltipRelativeLocation,\r\n } = props;\r\n const x =\r\n selectedPosition && selected && !props.persistIcons\r\n ? selectedPosition.x\r\n : position.x;\r\n const y =\r\n selectedPosition && selected && !props.persistIcons\r\n ? selectedPosition.y\r\n : position.y;\r\n\r\n const ifSmall = css`\r\n @media (max-width: 600px) {\r\n display: none;\r\n }\r\n `;\r\n\r\n const posTransform = () => {\r\n const rel = tooltipRelativeLocation\r\n ? css`\r\n left: ${tooltipRelativeLocation.x}%;\r\n top: ${tooltipRelativeLocation.y}%;\r\n `\r\n : undefined;\r\n switch (tooltipDirection) {\r\n case \"bottom\":\r\n return css`\r\n ${rel}\r\n ${\r\n !tooltipRelativeLocation\r\n ? css`\r\n transform: translateX(-43.5%);\r\n top: 4em;\r\n `\r\n : undefined\r\n }\r\n ${ifSmall}\r\n ::after {\r\n content: \" \";\r\n position: absolute;\r\n bottom: 100%; /* At the top of the tooltip */\r\n left: 50%;\r\n margin-left: -15px;\r\n border-width: 15px;\r\n border-style: solid;\r\n border-color: transparent transparent black transparent;\r\n `;\r\n case \"left\":\r\n return css`\r\n ${rel}\r\n ${\r\n !tooltipRelativeLocation\r\n ? css`\r\n right: 4em;\r\n transform: translateY(-43.5%);\r\n `\r\n : undefined\r\n }\r\n ${ifSmall}\r\n ::after {\r\n content: \" \";\r\n position: absolute;\r\n top: 50%;\r\n left: 100%; /* To the right of the tooltip */\r\n margin-top: -15px;\r\n border-width: 15px;\r\n border-style: solid;\r\n border-color: transparent transparent transparent black;\r\n }\r\n `;\r\n case \"right\":\r\n return css`\r\n ${rel}\r\n ${\r\n tooltipRelativeLocation\r\n ? css`\r\n left: 4em;\r\n transform: translateY(-43.5%);\r\n `\r\n : undefined\r\n }\r\n ${ifSmall}\r\n ::after {\r\n content: \" \";\r\n position: absolute;\r\n top: 50%;\r\n right: 100%; /* To the left of the tooltip */\r\n margin-top: -15px;\r\n border-width: 15px;\r\n border-style: solid;\r\n border-color: transparent black transparent transparent;\r\n }\r\n `;\r\n }\r\n };\r\n\r\n return (\r\n \r\n {/**/}\r\n {selected && (\r\n \r\n e.stopPropagation()}\r\n className={styles.tooltipContent}\r\n >\r\n \r\n {content}\r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\ntype AnnotatedImage = {\r\n src: string;\r\n alt: string;\r\n children: Omit[];\r\n persistIcons?: boolean;\r\n};\r\n\r\nconst initialState = {\r\n selected: -1,\r\n};\r\n\r\ntype State = typeof initialState;\r\n\r\ntype Action = { type: \"change_selected\"; key: number };\r\n\r\nfunction reducer(state: State, action: Action): State {\r\n switch (action.type) {\r\n case \"change_selected\":\r\n return { ...state, selected: action.key };\r\n default:\r\n throw new Error(`Invalid action: ${action.type}`);\r\n }\r\n}\r\n\r\nexport const AnnotatedImage: React.FC = (props) => {\r\n const [{ selected }, dispatch] = useReducer(reducer, initialState);\r\n const [hasLoaded, setHasLoaded] = React.useState(false);\r\n\r\n const smallContent = css`\r\n @media (min-width: 600px) {\r\n display: none;\r\n }\r\n width: 100%;\r\n\r\n div {\r\n width: 100% !important;\r\n max-width: 93%; !important;\r\n }\r\n `;\r\n const changeSelected = (key: number) =>\r\n dispatch({ type: \"change_selected\", key: key !== selected ? key : -1 });\r\n\r\n const selectedChild = props.children.find((c) => c.key === selected);\r\n const imgSrc =\r\n selectedChild && selectedChild.associatedImageSrc\r\n ? selectedChild.associatedImageSrc\r\n : props.src;\r\n\r\n const tooltips = (): React.ReactNode | React.ReactNode[] => {\r\n if (selectedChild != null && selectedChild.associatedImageSrc != null) {\r\n return (\r\n changeSelected(selectedChild.key)}\r\n selected={true}\r\n />\r\n );\r\n } else {\r\n return props.children.map((q) => {\r\n return (\r\n changeSelected(q.key)}\r\n selected={q.key === selected}\r\n />\r\n );\r\n });\r\n }\r\n };\r\n\r\n return (\r\n \r\n setHasLoaded(true)}\r\n className={styles.annotatedImage}\r\n src={imgSrc}\r\n alt={props.alt}\r\n />\r\n {hasLoaded && tooltips()}\r\n {selectedChild && (\r\n
\r\n e.stopPropagation()}\r\n className={styles.tooltipContent}\r\n >\r\n {\r\n changeSelected(selectedChild.key);\r\n }}\r\n className={styles.tooltipCloseIcon}\r\n alt=\"close\"\r\n role=\"button\"\r\n src={CloseIcon}\r\n />\r\n {selectedChild.content}\r\n
\r\n \r\n )}\r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport styles from \"./SideInfo.module.scss\";\r\nimport Question from \"assets/Question.svg\";\r\n\r\ntype Props = {\r\n imgSrc: string;\r\n imgAlt: string;\r\n children?: React.ReactNode;\r\n mobile?: boolean;\r\n};\r\n\r\nexport const SideInfo: React.FC = ({\r\n imgSrc,\r\n imgAlt,\r\n children,\r\n mobile,\r\n}) => {\r\n return (\r\n
\r\n
\r\n {imgAlt}\r\n
\r\n
{children}
\r\n
\r\n );\r\n};\r\n\r\nexport const SideInfoTwo: React.FC<{ mobile?: boolean }> = ({ mobile }) => (\r\n \r\n \r\n

\r\n When you sign in, the first thing you will see is your Dashboard. It\r\n summarizes all the relevant information for you so you can easily access\r\n each tool from here in order to succesfully manage your players.\r\n

\r\n

\r\n \r\n

\r\n

\r\n During this tutorial if you see the blue question mark and click on it,\r\n each section will be explained in more detail to you.\r\n

\r\n
\r\n \r\n);\r\n\r\nexport const SideInfoThree: React.FC<{ mobile?: boolean }> = ({ mobile }) => (\r\n \r\n \r\n

\r\n Under 'Reports', in the main menu you will find all the reports you need\r\n to check on how your players and your business are doing.\r\n

\r\n

\r\n All our reports have been made easy to read and search through all\r\n player and account data.\r\n

\r\n
\r\n
\r\n);\r\n\r\nexport const SideInfoFour: React.FC<{ mobile?: boolean }> = ({ mobile }) => (\r\n \r\n \r\n

\r\n On top of the main menu you will find the filters for the reports. The\r\n filtering options will differ for each report a bit, depending on the\r\n presented data.\r\n

\r\n

\r\n Here I will show you those filtering options which you can find in\r\n almost every report.\r\n

\r\n
\r\n
\r\n);\r\n\r\nexport const SideInfoFive: React.FC<{ mobile?: boolean }> = ({ mobile }) => (\r\n \r\n \r\n

\r\n You can reach the 'Player management' section via the main menu. Here\r\n you will be able to check on how your players are doing, make payments\r\n to their accounts and access also from here 'Key player reports'.\r\n

\r\n

\r\n Via the Filter you can search for players and go directly to their\r\n 'Player profile'.\r\n

\r\n
\r\n
\r\n);\r\n\r\nexport const SideInfoSix: React.FC<{ mobile?: boolean }> = ({ mobile }) => (\r\n \r\n \r\n

\r\n On the Player's Profile you can easily manage all the day to day things\r\n for a selected customer such as Credit Limits, Payments, Player\r\n Settings, etc.\r\n

\r\n
\r\n
\r\n);\r\n","import React from \"react\";\r\nimport { AnnotatedImage } from \"../AnnotatedImage\";\r\nimport { SideInfoTwo } from \"./SideInfo\";\r\nimport { SlideContent } from \"../Tutorial\";\r\n\r\nconst MainContent: React.FC = () => (\r\n \r\n {[\r\n {\r\n key: 0,\r\n alt: \"Dashboard settings\",\r\n tooltipDirection: \"left\",\r\n position: { x: -3.5, y: -4 },\r\n selectedPosition: { x: 25, y: 30 },\r\n associatedImageSrc: \"images/screenshots/dashboardsettings.jpg\",\r\n content: (\r\n

\r\n If you click on the 'settings' icon on top you will be able to open\r\n the dashboard settings. Here you can customize the sections'\r\n visibility or drag & drop sections to change their order of\r\n appearance to your liking. In the 'Other settings' section, you can\r\n enable or disable tooltips for the overall platform or\r\n enable/disable this tutorial after login.\r\n

\r\n ),\r\n },\r\n {\r\n key: 1,\r\n alt: \"Shortcuts to reports\",\r\n position: { x: 15, y: 35 },\r\n tooltipRelativeLocation: { x: -1050, y: -150 },\r\n tooltipDirection: \"left\",\r\n content: (\r\n

\r\n You will find several shortcuts to reports on your dashboard, which\r\n will provide you with a quick overview of the actual report. You can\r\n access the detailed report either by clicking on the link below each\r\n table or in the main menu under 'Reports'.\r\n

\r\n ),\r\n },\r\n {\r\n key: 2,\r\n alt: \"Active players this week\",\r\n position: { x: 45, y: 12 },\r\n tooltipRelativeLocation: { x: -450, y: 230 },\r\n content: (\r\n

\r\n This section will show you your 'Active players this week' and your\r\n players' current end of the week balance.\r\n

\r\n ),\r\n },\r\n {\r\n key: 3,\r\n alt: \"Total figures cards\",\r\n position: { x: 90, y: 12 },\r\n tooltipRelativeLocation: { x: -550, y: 230 },\r\n content: (\r\n

\r\n This section will show you 'This week's & Last week's total figure'\r\n and its details from Monday till Sunday.\r\n

\r\n ),\r\n },\r\n {\r\n key: 4,\r\n alt: \"Make a payment\",\r\n tooltipDirection: \"left\",\r\n tooltipRelativeLocation: {\r\n x: -1150,\r\n y: -150,\r\n },\r\n position: { x: 90, y: 35 },\r\n content: (\r\n

\r\n Here you can make a payment to your selected customer. If the\r\n customer has a positive figure please input a negative amount and if\r\n the customer has a negative figure the amount should be positive.\r\n

\r\n ),\r\n },\r\n {\r\n key: 5,\r\n alt: \"Report links\",\r\n position: { x: 55, y: 70 },\r\n tooltipDirection: \"left\",\r\n content: (\r\n

\r\n The link below each table will take you to the actual, detailed\r\n report.\r\n

\r\n ),\r\n },\r\n {\r\n key: 6,\r\n alt: \"My balance\",\r\n position: { x: 10, y: 12 },\r\n tooltipDirection: \"left\",\r\n tooltipRelativeLocation: { x: -1000, y: -250 },\r\n content: (\r\n

\r\n The 'My balance' section will show you your total amount you have\r\n available to cover the costs of the amount of players active this\r\n week. Whenever your balance reaches the minimum limit, you will see\r\n a message here reminding you that your funds are not enough to cover\r\n next week's payment.\r\n

\r\n ),\r\n },\r\n ]}\r\n
\r\n);\r\n\r\nexport const SlideTwo: React.FC = ({ children }) => (\r\n }\r\n mainContent={}\r\n title={\"Welcome to your dashboard\"}\r\n >\r\n {children}\r\n \r\n);\r\n","import React from \"react\";\r\nimport { AnnotatedImage } from \"../AnnotatedImage\";\r\nimport { SideInfoThree } from \"./SideInfo\";\r\nimport { SlideContent } from \"../Tutorial\";\r\n\r\nconst MainContent: React.FC = () => (\r\n \r\n {[\r\n {\r\n key: 1,\r\n alt: \"Navigating to a player's profile\",\r\n position: { x: -4, y: 35 },\r\n content: (\r\n

\r\n By clicking on the Player ID button, you can navigate\r\n directly to the selected Player profile.\r\n

\r\n ),\r\n },\r\n {\r\n key: 2,\r\n alt: \"Tab bars\",\r\n position: { x: 24, y: 3 },\r\n content: (\r\n

\r\n Some reports will include tabs, where you can select different views\r\n for different products, periods, etc.\r\n

\r\n ),\r\n },\r\n {\r\n key: 3,\r\n alt: \"How to use the reports\",\r\n tooltipDirection: \"left\",\r\n position: { x: 92.5, y: 9.5 },\r\n selectedPosition: { x: 45, y: 40 },\r\n associatedImageSrc: \"images/screenshots/reportsettings.jpg\",\r\n content: (\r\n

\r\n If you click on the 'cogwheel' icon on the right hand side you will\r\n be able to customize the columns. You can edit the visibility of\r\n each columns to your liking.\r\n

\r\n ),\r\n },\r\n {\r\n key: 4,\r\n alt: \"Report details\",\r\n tooltipDirection: \"left\",\r\n position: { x: 92.5, y: 43 },\r\n selectedPosition: { x: 45, y: 40 },\r\n associatedImageSrc: \"images/screenshots/reportdetails.jpg\",\r\n content: (\r\n

\r\n If you click on the 'window' icon on the right hand side you will be\r\n able to open the details for the chosen row. All data included in\r\n that row will be conveniently summarized for you.\r\n

\r\n ),\r\n },\r\n ]}\r\n
\r\n);\r\n\r\nexport const SlideThree: React.FC = ({ children }) => (\r\n }\r\n mainContent={}\r\n title={\"How to use reports\"}\r\n >\r\n {children}\r\n \r\n);\r\n","import React from \"react\";\r\nimport { AnnotatedImage } from \"../AnnotatedImage\";\r\nimport { SideInfoFour } from \"./SideInfo\";\r\nimport { SlideContent } from \"../Tutorial\";\r\n\r\nexport const MainContent: React.FC = () => (\r\n \r\n {[\r\n {\r\n key: 1,\r\n alt: \"All\",\r\n tooltipRelativeLocation: { x: -335, y: 260 },\r\n position: { x: 16, y: -3 },\r\n content: (\r\n

\r\n The 'All' filtering option will show you all data from when you\r\n started using your account.\r\n

\r\n ),\r\n },\r\n {\r\n key: 2,\r\n alt: \"Week\",\r\n position: { x: 30, y: -3 },\r\n tooltipDirection: \"left\",\r\n selectedPosition: { x: 5, y: 50 },\r\n tooltipRelativeLocation: { x: -1050, y: 150 },\r\n associatedImageSrc: \"images/screenshots/weekfilter.jpg\",\r\n content: (\r\n

\r\n With the 'Week' filter you can filter on data with a specific date\r\n in the beginning of a week.\r\n

\r\n ),\r\n },\r\n {\r\n key: 3,\r\n alt: \"Day\",\r\n position: { x: 45, y: -3 },\r\n tooltipDirection: \"left\",\r\n selectedPosition: { x: 5, y: 50 },\r\n associatedImageSrc: \"images/screenshots/dayfilter.jpg\",\r\n tooltipRelativeLocation: { x: -1250, y: 150 },\r\n content: (\r\n

\r\n With the 'Day' filter you can filter on data with a specific date.\r\n

\r\n ),\r\n },\r\n {\r\n key: 4,\r\n alt: \"Date Range\",\r\n position: { x: 64, y: -3 },\r\n selectedPosition: { x: -10, y: 40 },\r\n tooltipDirection: \"left\",\r\n tooltipRelativeLocation: { x: -1650, y: 350 },\r\n associatedImageSrc: \"images/screenshots/daterangefilter.jpg\",\r\n content: (\r\n

\r\n With the 'Date Range' filter you can filter on data within a\r\n specific range of dates.\r\n

\r\n ),\r\n },\r\n {\r\n key: 5,\r\n alt: \"Filters\",\r\n position: { x: -7, y: 27 },\r\n content: (\r\n

\r\n Clicking on 'Filters' will open up more available filter options for\r\n each report, where you will be able to search for e.g. players,\r\n amounts, etc.\r\n

\r\n ),\r\n },\r\n ]}\r\n
\r\n);\r\n\r\nexport const SlideFour: React.FC = ({ children }) => (\r\n }\r\n mainContent={}\r\n title={\"How to use Report filters\"}\r\n >\r\n {children}\r\n \r\n);\r\n","import React from \"react\";\r\nimport { AnnotatedImage } from \"../AnnotatedImage\";\r\nimport { SideInfoFive } from \"./SideInfo\";\r\nimport { SlideContent } from \"../Tutorial\";\r\n\r\nexport const MainContent: React.FC = () => (\r\n \r\n {[\r\n {\r\n key: 1,\r\n alt: \"Player ID\",\r\n position: { x: -2.5, y: 10 },\r\n content: (\r\n

\r\n By clicking on the 'Player ID', you will be taken directly the\r\n selected 'Player Profile'.\r\n

\r\n ),\r\n },\r\n {\r\n key: 2,\r\n alt: \"Take bet\",\r\n tooltipDirection: \"left\",\r\n tooltipRelativeLocation: { x: -800, y: -40 },\r\n position: { x: 50, y: 18 },\r\n content:

Take a bet for your selected customer from here.

,\r\n },\r\n {\r\n key: 3,\r\n alt: \"Make a payment\",\r\n tooltipDirection: \"left\",\r\n tooltipRelativeLocation: { x: -925, y: -50 },\r\n position: { x: 70, y: 5 },\r\n content:

Make a payment towards the selected customer account.

,\r\n },\r\n {\r\n key: 4,\r\n alt: \"Links to reports\",\r\n position: { x: 68, y: 68 },\r\n tooltipDirection: \"left\",\r\n tooltipRelativeLocation: { x: -920, y: -200 },\r\n content: (\r\n

\r\n Reach 'Key player reports' & find the 'Manage platform access by\r\n player' link here which will take you to a page where you will be\r\n able to grant access to all our platforms for several customers at\r\n the same time.\r\n

\r\n ),\r\n },\r\n {\r\n key: 5,\r\n alt: \"Filters\",\r\n position: { x: 85, y: -4 },\r\n tooltipDirection: \"left\",\r\n content: (\r\n

\r\n Via the 'Filter' you will be able to search for a specific 'Player\r\n ID' or 'Password' and have direct access to their 'Profile'.\r\n

\r\n ),\r\n },\r\n ]}\r\n \r\n);\r\n\r\nexport const SlideFive: React.FC = ({ children }) => (\r\n }\r\n mainContent={}\r\n title={\"How to manage players\"}\r\n >\r\n {children}\r\n \r\n);\r\n","import React from \"react\";\r\nimport { AnnotatedImage } from \"../AnnotatedImage\";\r\nimport { SideInfoSix } from \"./SideInfo\";\r\nimport { SlideContent } from \"../Tutorial\";\r\n\r\nexport const MainContent: React.FC = () => (\r\n \r\n {[\r\n {\r\n key: 1,\r\n alt: \"Suppressing players\",\r\n tooltipRelativeLocation: { x: -330, y: 213 },\r\n position: { x: -1.5, y: -12 },\r\n content: (\r\n

\r\n On the top left you can find the selected 'Player ID' & 'Password'.\r\n Via the 'Suppress player' link you can shut off the selected Player\r\n till you decide to activate the account again.\r\n

\r\n ),\r\n },\r\n {\r\n key: 2,\r\n alt: \"Player balance\",\r\n tooltipDirection: \"left\",\r\n tooltipRelativeLocation: { x: -1100, y: -170 },\r\n position: { x: 20, y: 12 },\r\n content: (\r\n

\r\n The 'Player balance' section will show your player's current end of\r\n the week balance (inculding this week's & last week's), any pending\r\n amounts, total credit, temporary credit & available amounts.\r\n

\r\n ),\r\n },\r\n {\r\n key: 3,\r\n alt: \"Key player reports\",\r\n tooltipDirection: \"bottom\",\r\n position: { x: 45, y: 12 },\r\n tooltipRelativeLocation: { x: -480, y: 210 },\r\n content:

Reach 'Key player reports' also from here.

,\r\n },\r\n {\r\n key: 4,\r\n alt: \"Make a payment\",\r\n position: { x: 75, y: 12 },\r\n tooltipRelativeLocation: { x: -950, y: -80 },\r\n tooltipDirection: \"left\",\r\n content: (\r\n

\r\n You can make a payment here towards the selected customer account.\r\n

\r\n ),\r\n },\r\n {\r\n key: 5,\r\n alt: \"Take bet\",\r\n tooltipDirection: \"left\",\r\n tooltipRelativeLocation: { x: -810, y: -30 },\r\n position: { x: 89.5, y: -12 },\r\n content:

Take a bet for your selected customer from here.

,\r\n },\r\n {\r\n key: 6,\r\n alt: \"Credit\",\r\n tooltipDirection: \"left\",\r\n tooltipRelativeLocation: { x: -810, y: -100 },\r\n position: { x: -1.5, y: 53 },\r\n content: (\r\n

\r\n In the 'Credit' section you can set a credit limit, a temporary\r\n credit & its expiry date or automatically assign a temporary credit\r\n for your customer.\r\n

\r\n ),\r\n },\r\n {\r\n key: 7,\r\n alt: \"Player platform access\",\r\n position: { x: 35, y: 52 },\r\n tooltipDirection: \"left\",\r\n content: (\r\n

\r\n The 'Player platform access' section will allow you to manage which\r\n platforms a selected customer will have access to. Each main\r\n category will contain sub-products, which you can give your customer\r\n access to by checking & unchecking the relevant items. The changes\r\n you make here will also appear on the 'Manage platform access by\r\n player' page.\r\n

\r\n ),\r\n },\r\n {\r\n key: 8,\r\n alt: \"Locking a player's settings\",\r\n position: { x: 43.5, y: 52 },\r\n content: (\r\n

\r\n To save your player access settings and in order to avoid to\r\n accidentally edit them, you can lock the settings here with the\r\n little 'lock' icon. The 'lock' icon will then also appear as\r\n 'locked' on the 'Manage platform access per player' page where you\r\n can manage the access for all your players.\r\n

\r\n ),\r\n },\r\n {\r\n key: 9,\r\n alt: \"Player settings\",\r\n position: { x: 67, y: 52 },\r\n tooltipDirection: \"left\",\r\n content: (\r\n

\r\n In the 'Player settings' section you will be able to select a\r\n 'Credit Type', mark a 'Sharp' player, change the 'Password' or\r\n 'PIN', set a 'Profile', 'Time Zone', 'Price & Format Type' & 'Line\r\n Type' for your selected customer.\r\n

\r\n ),\r\n },\r\n {\r\n key: 10,\r\n alt: \"Changing settings\",\r\n position: { x: 90.8, y: 52 },\r\n tooltipDirection: \"left\",\r\n tooltipRelativeLocation: { x: -780, y: -60 },\r\n content: (\r\n

\r\n Sections can be edited via the little 'pencil' icon in the top right\r\n corner\r\n

\r\n ),\r\n },\r\n ]}\r\n \r\n);\r\n\r\nexport const SlideSix: React.FC = ({ children }) => (\r\n }\r\n mainContent={}\r\n title={\"The player profile\"}\r\n >\r\n {children}\r\n \r\n);\r\n","import React from \"react\";\r\nimport styles from \"./SlideOne.module.scss\";\r\n\r\nexport const SlideSeven: React.FC<{\r\n closeTutorial(): void;\r\n}> = ({ closeTutorial, children }) => (\r\n
\r\n
\r\n \"Nancy\"\r\n
\r\n
\r\n

You're all set, and ready to go!

\r\n

\r\n Remember that if you need guidance there will be tooltips available\r\n throughout the whole platform.\r\n

\r\n

\r\n And don't hesitate to contact us if you have questions or you get\r\n stuck somewhere. Your dedicated Customer Service Representative will\r\n be happy to help you out!\r\n

\r\n
\r\n \r\n
\r\n
\r\n {children}\r\n
\r\n);\r\n","import React from \"react\";\r\nimport styled from \"theme\";\r\nimport styles from \"./Tutorial.module.scss\";\r\nimport classNames from \"classnames\";\r\nimport { useMedia } from \"use-media\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { SignInBackground } from \"pages/SignInPage/SignInPage\";\r\nimport { SlideOne } from \"./Slides/SlideOne\";\r\nimport { SlideTwo } from \"./Slides/SlideTwo\";\r\nimport { SlideThree } from \"./Slides/SlideThree\";\r\nimport { SlideFour } from \"./Slides/SlideFour\";\r\nimport { SlideFive } from \"./Slides/SlideFive\";\r\nimport { SlideSix } from \"./Slides/SlideSix\";\r\nimport { SlideSeven } from \"./Slides/SlideSeven\";\r\nimport {\r\n SideInfoTwo,\r\n SideInfoThree,\r\n SideInfoFour,\r\n SideInfoFive,\r\n SideInfoSix,\r\n} from \"./Slides/SideInfo\";\r\n\r\nimport {\r\n incrementTutorialScreen,\r\n setTutorialScreen,\r\n hideTutorial,\r\n selectTutorialStage,\r\n TUTORIAL_STAGE_MAX,\r\n} from \"reducers/ui\";\r\n\r\nconst ProgressBar: React.FC<{\r\n max: number;\r\n selected: number;\r\n handleClick?(n: number): void;\r\n}> = ({ max, selected, handleClick }) => {\r\n const dots = Array(max).fill(0);\r\n return (\r\n \r\n {dots.map((_d, i) => (\r\n {\r\n handleClick && handleClick(i);\r\n }}\r\n >\r\n \r\n \r\n ))}\r\n \r\n );\r\n};\r\n\r\nexport const NavButtons: React.FC<{\r\n nextStage(): void;\r\n closeTutorial(): void;\r\n showNext: boolean;\r\n}> = props => {\r\n return (\r\n
\r\n {props.showNext && (\r\n
\r\n \r\n Next\r\n \r\n
\r\n )}\r\n
\r\n \r\n Skip tutorial\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nconst Slide: React.FC<{\r\n currentStage: number | null;\r\n closeTutorial(): void;\r\n nextStage(): void;\r\n}> = ({ currentStage, closeTutorial, nextStage, children }) => {\r\n switch (currentStage) {\r\n case 0:\r\n return {children};\r\n case 1:\r\n return {children};\r\n case 2:\r\n return {children};\r\n case 3:\r\n return {children};\r\n case 4:\r\n return {children};\r\n case 5:\r\n return {children};\r\n case 6:\r\n return {children};\r\n default:\r\n return null;\r\n }\r\n};\r\n\r\nexport const SlideContent: React.FC<{\r\n sideInfo: React.ReactNode;\r\n mainContent: React.ReactNode;\r\n title: string;\r\n}> = ({ sideInfo, mainContent, title, children }) => {\r\n const [showNancy, setShowNancy] = React.useState(true);\r\n const mobile = useMedia({ maxWidth: \"1060px\" });\r\n\r\n return (\r\n
\r\n

{title}

\r\n {showNancy && mobile ? sideInfo : mainContent}\r\n {showNancy && mobile ? (\r\n setShowNancy(false),\r\n }}\r\n />\r\n ) : (\r\n children\r\n )}\r\n
\r\n );\r\n};\r\n\r\nconst SideContent: React.FC<{ currentStage: number | null }> = ({\r\n currentStage,\r\n}) => {\r\n switch (currentStage) {\r\n case 0:\r\n return null;\r\n case 1:\r\n return ;\r\n case 2:\r\n return ;\r\n case 3:\r\n return ;\r\n case 4:\r\n return ;\r\n case 5:\r\n return ;\r\n default:\r\n return null;\r\n }\r\n};\r\n\r\nexport function useTutorialHelpers() {\r\n const dispatch = useDispatch();\r\n const closeTutorial = () => {\r\n dispatch(hideTutorial());\r\n };\r\n const currentStage = useSelector(selectTutorialStage);\r\n const nextStage = () => {\r\n dispatch(incrementTutorialScreen());\r\n };\r\n const setStage = (n: number) => {\r\n dispatch(setTutorialScreen(n));\r\n };\r\n\r\n return { closeTutorial, nextStage, setStage, currentStage };\r\n}\r\n\r\ntype TutorialHelpers = ReturnType;\r\n\r\nexport const Controls: React.FC<{ override?: Partial }> = ({\r\n override,\r\n}) => {\r\n const defaultHelpers = useTutorialHelpers();\r\n const { closeTutorial, currentStage, nextStage, setStage } = {\r\n ...defaultHelpers,\r\n ...override,\r\n };\r\n\r\n return (\r\n \r\n \r\n\r\n \r\n \r\n );\r\n};\r\n\r\nconst Tutorial: React.FC = () => {\r\n const { closeTutorial, currentStage, nextStage } = useTutorialHelpers();\r\n\r\n const defaultNav = currentStage !== null && currentStage < 6 && ;\r\n\r\n return (\r\n \r\n \r\n
\r\n \r\n {defaultNav}\r\n \r\n
\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nconst Box = styled.div`\r\n position: relative;\r\n max-width: 450px;\r\n width: 100%;\r\n background-color: ${props => props.theme.colors.second};\r\n color: white;\r\n padding: 1em;\r\n border-radius: 4px;\r\n border: none;\r\n box-shadow: 0px 1px 30px rgba(255, 255, 255, 0.2);\r\n box-sizing: border-box;\r\n display: inline-block;\r\n text-align: left;\r\n\r\n @media (max-width: 480px) {\r\n padding: 5px;\r\n font-size: 12px;\r\n background-color: inherit;\r\n border: none;\r\n box-shadow: none;\r\n }\r\n`;\r\n\r\nexport default Tutorial;\r\n","import React, { useEffect, lazy, Suspense } from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { isProduction } from \"serverDetails\";\r\nimport {\r\n selectTutorialVisible,\r\n selectAssetsPath,\r\n selectTheme,\r\n selectShowCreditReferences,\r\n} from \"reducers/ui\";\r\nimport Helmet from \"react-helmet\";\r\nimport {\r\n selectAuthStatus,\r\n selectLoadedAccountDetails,\r\n getAccountTypeDetails,\r\n} from \"reducers/auth\";\r\nimport { ThemeProvider } from \"emotion-theming\";\r\nimport \"./styles/global.css\";\r\nimport Tutorial from \"pages/Tutorial/Tutorial\";\r\nimport styled from \"theme\";\r\nimport { useTranslation } from \"react-i18next\";\r\nconst MainRouter = lazy(\r\n () => import(\"./routes/MainRouter/MainRouterContainer\")\r\n);\r\n\r\nconst Background = styled.div`\r\n min-height: 100%;\r\n width: 100%;\r\n margin: auto;\r\n background-color: #f2f6fa;\r\n`;\r\n\r\nfunction useShowLiveChat() {\r\n const authStatus = useSelector(selectAuthStatus);\r\n\r\n useEffect(() => {\r\n if (window) {\r\n const chat = window.document.getElementById(\"LiveChat\");\r\n if (authStatus === \"authenticated\" && isProduction) {\r\n if (chat) chat.style.display = \"initial\";\r\n } else {\r\n if (chat) chat.style.display = \"none\";\r\n }\r\n }\r\n }, [authStatus]);\r\n}\r\n\r\nconst App: React.FC = () => {\r\n const dispatch = useDispatch();\r\n const theme = useSelector(selectTheme);\r\n const authStatus = useSelector(selectAuthStatus);\r\n const tutorialVisible = useSelector(selectTutorialVisible);\r\n const detailsLoaded = useSelector(selectLoadedAccountDetails);\r\n const assetsPath = useSelector(selectAssetsPath);\r\n // If it's CamanBet, default to Spanish\r\n const defaultToSpanish = !useSelector(selectShowCreditReferences);\r\n const { i18n } = useTranslation();\r\n useShowLiveChat();\r\n\r\n useEffect(() => {\r\n if (defaultToSpanish) {\r\n // console.log(\"Defaulting to spanish\");\r\n i18n.changeLanguage(\"es\");\r\n }\r\n }, [i18n, defaultToSpanish]);\r\n\r\n useEffect(() => {\r\n dispatch(getAccountTypeDetails());\r\n }, [dispatch]);\r\n\r\n const isAuthenticated = authStatus === \"authenticated\";\r\n const shouldShowTutorial = isAuthenticated && tutorialVisible;\r\n\r\n const content = () => {\r\n if (!detailsLoaded) return ;\r\n if (shouldShowTutorial) return ;\r\n\r\n return (\r\n }>\r\n \r\n \r\n );\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n {content()}\r\n \r\n );\r\n};\r\n\r\nexport default App;\r\n","// This optional code is used to register a service worker.\r\n// register() is not called by default.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on subsequent visits to a page, after all the\r\n// existing tabs open on the page have been closed, since previously cached\r\n// resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model and instructions on how to\r\n// opt-in, read http://bit.ly/CRA-PWA\r\n\r\nconst isLocalhost = Boolean(\r\n window.location.hostname === 'localhost' ||\r\n // [::1] is the IPv6 localhost address.\r\n window.location.hostname === '[::1]' ||\r\n // 127.0.0.1/8 is considered localhost for IPv4.\r\n window.location.hostname.match(\r\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n )\r\n);\r\n\r\nexport function register(config) {\r\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n // The URL constructor is available in all browsers that support SW.\r\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\r\n if (publicUrl.origin !== window.location.origin) {\r\n // Our service worker won't work if PUBLIC_URL is on a different origin\r\n // from what our page is served on. This might happen if a CDN is used to\r\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\r\n return;\r\n }\r\n\r\n window.addEventListener('load', () => {\r\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n if (isLocalhost) {\r\n // This is running on localhost. Let's check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl, config);\r\n\r\n // Add some additional logging to localhost, pointing developers to the\r\n // service worker/PWA documentation.\r\n navigator.serviceWorker.ready.then(() => {\r\n console.log(\r\n 'This web app is being served cache-first by a service ' +\r\n 'worker. To learn more, visit http://bit.ly/CRA-PWA'\r\n );\r\n });\r\n } else {\r\n // Is not localhost. Just register service worker\r\n registerValidSW(swUrl, config);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction registerValidSW(swUrl, config) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then(registration => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing;\r\n if (installingWorker == null) {\r\n return;\r\n }\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === 'installed') {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the updated precached content has been fetched,\r\n // but the previous service worker will still serve the older\r\n // content until all client tabs are closed.\r\n console.log(\r\n 'New content is available and will be used when all ' +\r\n 'tabs for this page are closed. See http://bit.ly/CRA-PWA.'\r\n );\r\n\r\n // Execute callback\r\n if (config && config.onUpdate) {\r\n config.onUpdate(registration);\r\n }\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a\r\n // \"Content is cached for offline use.\" message.\r\n console.log('Content is cached for offline use.');\r\n\r\n // Execute callback\r\n if (config && config.onSuccess) {\r\n config.onSuccess(registration);\r\n }\r\n }\r\n }\r\n };\r\n };\r\n })\r\n .catch(error => {\r\n console.error('Error during service worker registration:', error);\r\n });\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl, config) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl)\r\n .then(response => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n const contentType = response.headers.get('content-type');\r\n if (\r\n response.status === 404 ||\r\n (contentType != null && contentType.indexOf('javascript') === -1)\r\n ) {\r\n // No service worker found. Probably a different app. Reload the page.\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister().then(() => {\r\n window.location.reload();\r\n });\r\n });\r\n } else {\r\n // Service worker found. Proceed as normal.\r\n registerValidSW(swUrl, config);\r\n }\r\n })\r\n .catch(() => {\r\n console.log(\r\n 'No internet connection found. App is running in offline mode.'\r\n );\r\n });\r\n}\r\n\r\nexport function unregister() {\r\n if ('serviceWorker' in navigator) {\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister();\r\n });\r\n }\r\n}\r\n","import { combineReducers } from \"redux\";\r\nimport { combineEpics } from \"redux-observable\";\r\nimport { reducer as auth, authEpic } from \"reducers/auth\";\r\nimport { reducer as playerSearch, playerSearchEpic } from \"./playerSearch\";\r\nimport { paymentReducer, paymentEpic } from \"./PaymentReducers/paymentReducer\";\r\nimport { dashboardReducer } from \"./PageReducers/DashboardReducer/dashboardReducer\";\r\n\r\nimport {\r\n playersReducer,\r\n playersEpic,\r\n} from \"./PageReducers/PlayersReducer/playersReducer\";\r\n\r\nimport { reducer as ui, uiEpic } from \"./ui\";\r\nimport { reducer as table, tableEpic } from \"./tableReducer\";\r\nimport { reducer as playerAccess, playerAccessEpic } from \"./playerAccess\";\r\n\r\nimport playerSettings from \"reducers/playerSettings\";\r\n\r\nimport reportsReducer from \"pages/Categories/Reports/reportsReducer\";\r\n\r\nexport const rootEpic = combineEpics(\r\n authEpic,\r\n uiEpic,\r\n paymentEpic,\r\n playersEpic,\r\n playerSearchEpic,\r\n playerAccessEpic,\r\n tableEpic\r\n);\r\n\r\nexport const rootReducer = combineReducers({\r\n // General reducers go here\r\n auth,\r\n table,\r\n playerSearch,\r\n paymentReducer,\r\n playerAccess,\r\n playerSettings,\r\n // Page reducers go here\r\n dashboardReducer,\r\n playersReducer,\r\n ui,\r\n reportsReducer,\r\n});\r\n\r\nexport type AppState = ReturnType;\r\n","import \"react-app-polyfill/ie9\";\r\nimport \"react-app-polyfill/stable\";\r\nimport \"assets/datepicker.css\";\r\n\r\nimport React from \"react\";\r\nimport ReactDOM from \"react-dom\";\r\nimport \"./i18n\";\r\nimport App from \"./App\";\r\nimport * as serviceWorker from \"./serviceWorker\";\r\nimport \"./index.css\";\r\nimport { Provider } from \"react-redux\";\r\nimport { createStore, applyMiddleware, compose } from \"redux\";\r\nimport { composeWithDevTools } from \"redux-devtools-extension\";\r\nimport { createEpicMiddleware } from \"redux-observable\";\r\nimport { rootReducer, rootEpic } from \"./reducers/rootReducer\";\r\nimport thunk from \"redux-thunk\";\r\nimport { ErrorBoundary } from \"components/Errors/Errors\";\r\n\r\nconst isProduction = process.env.REACT_APP_BUILD_TYPE === \"production\";\r\n\r\nconst composeEnhancers = isProduction\r\n ? compose\r\n : composeWithDevTools({ trace: true });\r\n\r\nconst epicMiddleware = createEpicMiddleware();\r\n\r\nexport const store = createStore(\r\n rootReducer,\r\n composeEnhancers(applyMiddleware(thunk, epicMiddleware))\r\n);\r\n\r\nepicMiddleware.run(rootEpic);\r\nReactDOM.render(\r\n \r\n \r\n \r\n \r\n ,\r\n document.getElementById(\"root\")\r\n);\r\n\r\n// If you want your app to work offline and load faster, you can change\r\n// unregister() to register() below. Note this comes with some pitfalls.\r\n// Learn more about service workers: http://bit.ly/CRA-PWA\r\nserviceWorker.unregister();\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"loginBox\":\"SignInBox_loginBox__1iMQ3\",\"formHeader\":\"SignInBox_formHeader__3_SH8\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"item\":\"SubmissionButton_item__27wg7\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"chunkyInput\":\"ChunkyInput_chunkyInput__2tGhg\",\"inputContainer\":\"ChunkyInput_inputContainer__2xnDy\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"twoFactorForm\":\"TwoFactorForm_twoFactorForm__3YgZA\",\"buttons\":\"TwoFactorForm_buttons__1F9l9\"};","module.exports = __webpack_public_path__ + \"static/media/QuestionGrey.1075cc54.svg\";","module.exports = __webpack_public_path__ + \"static/media/tutorialclose.636a613d.svg\";","// extracted by mini-css-extract-plugin\nmodule.exports = {\"loadingPage\":\"loadingData_loadingPage__3Vhlq\",\"spinner\":\"loadingData_spinner__35lIU\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"tick\":\"BooleanTick_tick__3u5iF\"};","import React from \"react\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { selectShowTooltips } from \"reducers/ui\";\r\nimport Tooltip, { Props as TooltipProps } from \"react-tooltip\";\r\n\r\ntype Props = {\r\n children: React.ReactNode;\r\n name?: string;\r\n persist?: boolean;\r\n light?: boolean;\r\n widthInChars?: number;\r\n} & TooltipProps;\r\n\r\nconst TutorialTooltip: React.FC = ({\r\n children,\r\n name,\r\n persist = false,\r\n widthInChars,\r\n ...rest\r\n}) => {\r\n const isVisible = useSelector(selectShowTooltips);\r\n\r\n if (!isVisible && !persist) return null;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n {children}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default TutorialTooltip;\r\n","import React from \"react\";\r\n\r\ntype State = {\r\n status: \"pending\" | \"success\" | \"error\" | \"idle\";\r\n pending: boolean;\r\n data: Data | null;\r\n error: Err | null;\r\n};\r\n\r\ntype Action =\r\n | { type: \"begin\" }\r\n | { type: \"success\"; data: Data }\r\n | { type: \"error\"; error: Err };\r\n\r\nfunction reducer(\r\n state: State,\r\n action: Action\r\n): State {\r\n switch (action.type) {\r\n case \"begin\":\r\n return {\r\n ...state,\r\n status: \"pending\",\r\n pending: true,\r\n error: null,\r\n };\r\n case \"success\":\r\n return {\r\n ...state,\r\n status: \"success\",\r\n pending: false,\r\n data: action.data,\r\n error: null,\r\n };\r\n case \"error\":\r\n return {\r\n ...state,\r\n status: \"error\",\r\n pending: false,\r\n data: null,\r\n error: action.error,\r\n };\r\n }\r\n}\r\n\r\nexport function useAsyncFunction(\r\n asyncFunction: () => Promise,\r\n immediate = true\r\n): State & {\r\n execute: () => Promise;\r\n} {\r\n type S = State;\r\n type A = Action;\r\n\r\n const [store, dispatch] = React.useReducer<(s: S, a: A) => S>(reducer, {\r\n status: \"idle\",\r\n pending: false,\r\n data: null,\r\n error: null,\r\n } as State);\r\n\r\n const execute = React.useCallback(() => {\r\n dispatch({ type: \"begin\" });\r\n return asyncFunction()\r\n .then(data => dispatch({ type: \"success\", data }))\r\n .catch((error: Err) => dispatch({ type: \"error\", error }));\r\n }, [asyncFunction]);\r\n\r\n React.useEffect(() => {\r\n if (immediate) {\r\n execute();\r\n }\r\n }, [execute, immediate]);\r\n\r\n return { execute, ...store };\r\n}\r\n","import { selectShowCreditReferences } from \"reducers/ui\";\r\nimport { useSelector } from \"react-redux\";\r\n\r\nexport function useReferenceCredit() {\r\n return useSelector(selectShowCreditReferences);\r\n}\r\n","import React, { useState } from \"react\";\r\nimport styles from \"./PasswordInput.module.css\";\r\nimport { Field } from \"formik\";\r\n\r\ninterface PasswordInputInterface\r\n extends React.InputHTMLAttributes {\r\n name: string;\r\n}\r\n\r\nconst PasswordInput = (props: PasswordInputInterface) => {\r\n const [passwordVisible, updatePasswordVisibility] = useState(false);\r\n const togglePasswordVisible = () => updatePasswordVisibility(p => !p);\r\n const inputType = passwordVisible ? \"text\" : \"password\";\r\n const ariaLabel = passwordVisible ? \"Hide password\" : \"Show password\";\r\n\r\n return (\r\n
\r\n \r\n \r\n {passwordVisible ? (\r\n \"\"\r\n ) : (\r\n \"\"\r\n )}\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default PasswordInput;\r\n","/** @jsx jsx */\r\n// eslint-disable-next-line\r\nimport React, { useEffect } from \"react\";\r\nimport { FourthSubmissionButton } from \"components/Buttons\";\r\nimport { jsx } from \"@emotion/core\";\r\nimport { Theme } from \"theme\";\r\nimport { useTheme } from \"emotion-theming\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { Formik, FormikProps, Field, Form } from \"formik\";\r\nimport * as Yup from \"yup\";\r\nimport styles from \"./SignInForm.module.css\";\r\nimport { Credentials, AuthStateStatus } from \"../../../types/AuthTypes\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { ErrorResponse } from \"../../../types/ApiResponseTypes\";\r\nimport { selectMessage, selectAuthStatus } from \"reducers/auth\";\r\nimport ValidationError from \"../../FormComponents/ValidationError/ValidationError\";\r\nimport classNames from \"classnames\";\r\n\r\nimport ChunkyInput from \"../ChunkyInput/ChunkyInput\";\r\nimport PasswordInput from \"../PasswordInput/PasswordInput\";\r\nimport { useTranslation } from \"react-i18next\";\r\n\r\ntype SignInFormInnerProps = Omit, \"errors\"> & {\r\n error: boolean;\r\n status: AuthStateStatus;\r\n errors: ErrorResponse[];\r\n};\r\n\r\ninterface SignInFormProps {\r\n submit: (values: Credentials) => void;\r\n status: AuthStateStatus;\r\n error: boolean;\r\n errors: ErrorResponse[];\r\n}\r\n\r\nconst validationSchema = Yup.object({\r\n username: Yup.string().required(\"Username is required!\"),\r\n password: Yup.string().required(\"Password is required!\"),\r\n});\r\n\r\nconst SignInFormInner = (props: SignInFormInnerProps) => {\r\n const theme = useTheme();\r\n const message = useSelector(selectMessage);\r\n const status = useSelector(selectAuthStatus);\r\n const { setSubmitting } = props;\r\n const { t } = useTranslation(\"signIn\");\r\n\r\n useEffect(() => {\r\n if (status !== \"pending\") {\r\n setSubmitting(false);\r\n }\r\n }, [status, setSubmitting]);\r\n\r\n return (\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n {t(\"forgotPassword\")}\r\n \r\n
\r\n \r\n {message}\r\n \r\n
\r\n \r\n {t(\"signIn\")}\r\n \r\n
\r\n \r\n );\r\n};\r\n\r\nconst signInForm = (props: SignInFormProps) => {\r\n return (\r\n {\r\n props.submit(values);\r\n }}\r\n render={formikprops => (\r\n \r\n )}\r\n />\r\n );\r\n};\r\n\r\nexport default signInForm;\r\n","import React from \"react\";\r\nimport { Formik, Form } from \"formik\";\r\nimport styles from \"./TwoFactorForm.module.css\";\r\n\r\nimport ChunkyInput from \"../ChunkyInput/ChunkyInput\";\r\nimport { ErrorResponse } from \"../../../types/ApiResponseTypes\";\r\n\r\nimport ValidationError from \"../../FormComponents/ValidationError/ValidationError\";\r\nimport { useTranslation } from \"react-i18next\";\r\n\r\ninterface TwoFactorFormProps {\r\n errors: ErrorResponse[];\r\n submit(x: string): void;\r\n resubmit(): void;\r\n}\r\n\r\nconst TwoFactorFormInner = (props: {\r\n errors: ErrorResponse[];\r\n resubmit(): void;\r\n}) => {\r\n const { t } = useTranslation(\"signIn\");\r\n return (\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n {props.errors.length > 0 && (\r\n \r\n )}\r\n
\r\n \r\n );\r\n};\r\n\r\nconst twoFactorForm = (props: TwoFactorFormProps) => {\r\n return (\r\n props.submit(values.code)}\r\n render={() => (\r\n \r\n )}\r\n />\r\n );\r\n};\r\n\r\nexport default twoFactorForm;\r\n","import React, { useEffect, useState } from \"react\";\r\nimport classNames from \"classnames\";\r\nimport queryString from \"query-string\";\r\nimport { RouteComponentProps } from \"react-router-dom\";\r\nimport { ErrorResponse } from \"../../../types/ApiResponseTypes\";\r\n\r\nimport SignInBox from \"../SignInBox/SignInBox\";\r\nimport SignInForm from \"../SignInForm/SignInForm\";\r\nimport TwoFactorForm from \"../TwoFactorForm/TwoFactorForm\";\r\nimport { AuthStateStatus } from \"../../../types/AuthTypes\";\r\nimport { Credentials, TwoFactorCredentials } from \"../../../types/AuthTypes\";\r\nimport { Redirect } from \"react-router-dom\";\r\nimport { useTranslation } from \"react-i18next\";\r\n\r\nimport styles from \"./SignIn.module.css\";\r\n\r\ntype Path = string | undefined | null | string[];\r\n\r\nexport interface SignInProps {\r\n status: AuthStateStatus;\r\n authenticated: boolean;\r\n signIn(x: Credentials): void;\r\n tfaSignIn(x: TwoFactorCredentials): void;\r\n tfaGetNewCode(x: Credentials): void;\r\n checkAuth(): void;\r\n errors: ErrorResponse[];\r\n}\r\n\r\ntype Details = { username: string; password: string; bRememberMe: boolean };\r\n\r\nconst SignIn = (props: SignInProps & RouteComponentProps) => {\r\n const { t } = useTranslation(\"signIn\");\r\n const [details, setDetails] = useState
({\r\n username: \"\",\r\n password: \"\",\r\n bRememberMe: false,\r\n });\r\n\r\n const { status, location } = props;\r\n\r\n useEffect(() => {\r\n setDetails({ username: \"\", password: \"\", bRememberMe: false });\r\n }, [status]);\r\n\r\n const submitTwoFactor = (code: string) => {\r\n props.tfaSignIn({\r\n ...details,\r\n twoFactorAuthCode: code,\r\n });\r\n };\r\n\r\n const queryPath: Path = queryString.parse(location.search).redirect;\r\n const originalSearch = queryString.parse(location.search).origSearch;\r\n const returnPath =\r\n typeof queryPath === \"string\" && queryPath != null ? queryPath : \"/\";\r\n\r\n const boxes = (\r\n \r\n
\r\n \r\n {\r\n setDetails(vals);\r\n props.signIn(vals);\r\n }}\r\n error={status === \"error\"}\r\n />\r\n \r\n
\r\n
\r\n );\r\n\r\n const twoFactorForm = (\r\n
\r\n \r\n
\r\n

{t(\"theUsername\", { username: details.username })}

\r\n props.tfaGetNewCode(details)}\r\n />\r\n
\r\n
\r\n
\r\n );\r\n\r\n switch (props.status) {\r\n case \"authenticated\":\r\n if (props.authenticated) {\r\n return (\r\n \r\n );\r\n } else return null;\r\n case \"require2FA\":\r\n return twoFactorForm;\r\n case \"error2FA\":\r\n return twoFactorForm;\r\n case \"loadingData\":\r\n return null;\r\n case \"start\":\r\n return boxes;\r\n case \"pending\":\r\n return boxes;\r\n default:\r\n return boxes;\r\n }\r\n};\r\n\r\nexport default SignIn;\r\n","import { connect } from \"react-redux\";\r\nimport { withRouter, RouteComponentProps } from \"react-router-dom\";\r\nimport compose from \"recompose/compose\";\r\nimport { AppState } from \"reducers/rootReducer\";\r\nimport {\r\n selectAuthStatus,\r\n selectIsAuthenticated,\r\n selectAuthErrors,\r\n selectAccountType,\r\n signIn,\r\n getAccountTypeDetails,\r\n loadAuthState,\r\n tfaSignIn,\r\n} from \"reducers/auth\";\r\nimport { Credentials, TwoFactorCredentials } from \"../../../types/AuthTypes\";\r\nimport SignIn, { SignInProps } from \"./SignIn\";\r\nimport { AnyAction as Action } from \"redux\";\r\n\r\nexport const mapStateToProps = (state: AppState) => {\r\n return {\r\n status: selectAuthStatus(state),\r\n authenticated: selectIsAuthenticated(state),\r\n errors: selectAuthErrors(state),\r\n accountType: selectAccountType(),\r\n };\r\n};\r\n\r\nexport const mapDispatchToProps = (dispatch: (x: Action) => void) => {\r\n return {\r\n checkAuth: () => {\r\n dispatch(loadAuthState());\r\n },\r\n signIn: (values: Credentials) => {\r\n dispatch(signIn(values));\r\n },\r\n tfaSignIn: (values: TwoFactorCredentials) => {\r\n dispatch(tfaSignIn(values));\r\n },\r\n getAccountType: () => {\r\n dispatch(getAccountTypeDetails());\r\n },\r\n };\r\n};\r\n\r\nexport default compose(\r\n withRouter,\r\n connect(\r\n mapStateToProps,\r\n mapDispatchToProps\r\n )\r\n)(SignIn);\r\n","/** @jsx jsx */\r\nimport React from \"react\";\r\nimport { jsx } from \"@emotion/core\";\r\nimport css from \"@emotion/css/macro\";\r\nimport { Theme } from \"theme\";\r\nimport { useTheme } from \"emotion-theming\";\r\nimport { useSelector } from \"react-redux\";\r\nimport {\r\n selectAssetsPath,\r\n selectSignInImage,\r\n // selectSignInHeader,\r\n selectCompanyName,\r\n} from \"reducers/ui\";\r\nimport { selectAuthStatus, selectAppVisible } from \"reducers/auth\";\r\nimport styles from \"./SignInPage.module.css\";\r\nimport { Redirect } from \"react-router-dom\";\r\n\r\nimport SignIn from \"../../components/SignInComponents/SignIn/SignInContainer\";\r\nimport Helmet from \"react-helmet\";\r\n\r\nexport const SignInBackground: React.FC<{ children: React.ReactNode }> = ({\r\n children,\r\n}) => {\r\n const theme = useTheme();\r\n const signInImage = useSelector(selectSignInImage);\r\n const assetsPath = useSelector(selectAssetsPath);\r\n // const signInHeader = useSelector(selectSignInHeader);\r\n const iconSrc = assetsPath + \"/HeroIcon.svg\";\r\n const signInSrc = assetsPath + \"/\" + signInImage;\r\n\r\n const showImg = signInImage !== null;\r\n\r\n const noImgCSS = css`\r\n background-color: ${theme.colors.first};\r\n `;\r\n\r\n const imgCSS = css`\r\n background: ${theme.colors.first} url(${signInSrc}) no-repeat;\r\n background-size: cover;\r\n `;\r\n\r\n const background = css`\r\n ${showImg ? imgCSS : noImgCSS}\r\n `;\r\n\r\n return (\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {/*
{signInHeader}
*/}\r\n
\r\n \"\"\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
{children}
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nconst SignInPage: React.FC = () => {\r\n const companyName = useSelector(selectCompanyName);\r\n const authStatus = useSelector(selectAuthStatus);\r\n const appVisible = useSelector(selectAppVisible);\r\n\r\n if (authStatus === \"authenticated\") {\r\n return ;\r\n }\r\n\r\n return appVisible ? (\r\n \r\n \r\n {companyName}\r\n \r\n \r\n \r\n ) : null;\r\n};\r\n\r\nexport default SignInPage;\r\n","import { createSelector } from \"reselect\";\r\nimport { createLoadingSelector } from \"../../../helpers/selectors\";\r\nimport { AppState } from \"reducers/rootReducer\";\r\n\r\n/* Player Page */\r\nexport const selectPlayersList = (state: AppState) =>\r\n state.playersReducer.agentPlayerManagementReducer;\r\n\r\nexport const selectAutoLoginUrl = (state: AppState) =>\r\n state.playersReducer.autoLoginUrlReducer;\r\n\r\nexport const selectPlayersPageLoading = createSelector(\r\n [selectPlayersList],\r\n (...args) =>\r\n args\r\n .map(x => x.fetchStatus !== \"fetchingData\" && x.fetchStatus !== \"noData\")\r\n .includes(false)\r\n);\r\n\r\n/* Player Profile */\r\n\r\n/* balance */\r\nexport const selectPlayerBalancePanel = (state: AppState) =>\r\n state.playersReducer.playerProfileReducer.playerBalancesPanelReducer;\r\n\r\n/* loading? */\r\n\r\nexport const selectPlayerProfileLoading = createLoadingSelector(\r\n selectPlayerBalancePanel\r\n);\r\n","import produce from \"immer\";\r\nimport { AppState } from \"reducers/rootReducer\";\r\n\r\nconst CREDIT_SETTINGS = \"app/playerSettings/CREDIT_SETTINGS\";\r\nconst CREDIT_SETTINGS_FOCUS = \"app/playerSettings/CREDIT_SETTINGS_FOCUS\";\r\nconst PLATFORM_ACCESS = \"app/playerSettings/PLATFORM_ACCESS\";\r\nconst PLATFORM_ACCESS_DRAWER = \"app/playerSettings/PLATFORM_ACCESS_DRAWER\";\r\nconst PLAYER_SETTINGS = \"app/playerSettings/PLAYER_SETTINGS\";\r\n\r\ntype Action =\r\n | { type: typeof CREDIT_SETTINGS; payload: boolean }\r\n | { type: typeof CREDIT_SETTINGS_FOCUS }\r\n | { type: typeof PLATFORM_ACCESS; payload: boolean }\r\n | {\r\n type: typeof PLATFORM_ACCESS_DRAWER;\r\n payload: {\r\n name: string;\r\n value: boolean;\r\n };\r\n }\r\n | { type: typeof PLAYER_SETTINGS; payload: boolean };\r\n\r\ntype State = {\r\n creditSettingsDisplay: boolean;\r\n creditSettingsFocusFlag: number;\r\n platformAccessDisplay: boolean;\r\n platformAccessDrawers: { [key: string]: boolean };\r\n playerSettingsDisplay: boolean;\r\n};\r\n\r\nconst initialState: State = {\r\n creditSettingsDisplay: true,\r\n creditSettingsFocusFlag: 0,\r\n platformAccessDisplay: true,\r\n platformAccessDrawers: {},\r\n playerSettingsDisplay: true,\r\n};\r\n\r\nconst reducer = (state = initialState, action: Action): State =>\r\n produce(state, draft => {\r\n switch (action.type) {\r\n case CREDIT_SETTINGS:\r\n draft.creditSettingsDisplay = action.payload;\r\n break;\r\n case CREDIT_SETTINGS_FOCUS:\r\n draft.creditSettingsDisplay = false;\r\n draft.creditSettingsFocusFlag += 1;\r\n break;\r\n case PLATFORM_ACCESS:\r\n draft.platformAccessDisplay = action.payload;\r\n break;\r\n case PLATFORM_ACCESS_DRAWER:\r\n draft.platformAccessDrawers[action.payload.name] = action.payload.value;\r\n break;\r\n case PLAYER_SETTINGS:\r\n draft.playerSettingsDisplay = action.payload;\r\n break;\r\n }\r\n });\r\n\r\n/* Action creators */\r\n\r\nexport const switchCreditSettings = (payload: boolean): Action => ({\r\n type: CREDIT_SETTINGS,\r\n payload,\r\n});\r\n\r\n// Set the credit settings card to display, and change the flag variable.\r\n// The component will look for this variable to change and give its form\r\n// focus.\r\nexport const focusCreditSettings = (): Action => ({\r\n type: CREDIT_SETTINGS_FOCUS,\r\n});\r\n\r\nexport const switchPlatformAccess = (payload: boolean): Action => ({\r\n type: PLATFORM_ACCESS,\r\n payload,\r\n});\r\n\r\nexport const changePlatformDrawer = (payload: {\r\n name: string;\r\n value: boolean;\r\n}): Action => ({\r\n type: PLATFORM_ACCESS_DRAWER,\r\n payload,\r\n});\r\n\r\nexport const switchPlayerSettings = (payload: boolean): Action => ({\r\n type: PLAYER_SETTINGS,\r\n payload,\r\n});\r\n\r\n/* Selectors */\r\n\r\nexport const selectCreditSettingsDisplay = (app: AppState) =>\r\n app.playerSettings.creditSettingsDisplay;\r\nexport const selectCreditSettingsFocus = (app: AppState) =>\r\n app.playerSettings.creditSettingsFocusFlag;\r\nexport const selectPlatformAccessDisplay = (app: AppState) =>\r\n app.playerSettings.platformAccessDisplay;\r\nexport const selectPlatformDrawers = (app: AppState) =>\r\n app.playerSettings.platformAccessDrawers;\r\nexport const selectPlayerSettingsDisplay = (app: AppState) =>\r\n app.playerSettings.playerSettingsDisplay;\r\n\r\nexport default reducer;\r\n","export const limitDescriptionRows = (\r\n n: number,\r\n description: string | null\r\n): string | null => {\r\n if (description == null) return description;\r\n const rows = description.split(\"
\");\r\n if (rows.length <= n) return description;\r\n\r\n const numberOfRows = n > 0 ? n : undefined;\r\n\r\n const limitedRows = rows.slice(0, numberOfRows);\r\n if (limitedRows.length > 2) return limitedRows.concat([\"...\"]).join(\"
\");\r\n\r\n return limitedRows.join(\"
\");\r\n};\r\n","import { combineReducers } from \"redux\";\r\nimport { tGetActions as getActions } from \"helpers/actions\";\r\nimport { AGENTREPORTLIST_URL } from \"serverDetails\";\r\nimport { dailySummaryTabReducer } from \"./dailySummary\";\r\nimport { playerActionTabReducer } from \"./playerAction\";\r\nimport { playerListTabReducer } from \"./pLaBPage\";\r\nimport {\r\n PlayerReportList,\r\n AgentReportList,\r\n AllReportList,\r\n} from \"./reportsTypes\";\r\n\r\nexport const [fetchMainReportSummary, mainReportSummaryReducer] = getActions(\r\n \"MAIN_REPORT_SUMMARY\",\r\n AGENTREPORTLIST_URL + \"all\",\r\n {\r\n listRecentlyViewedReports: [],\r\n listPlayerReports: [],\r\n listAgentReports: [],\r\n } as AllReportList\r\n);\r\n\r\nexport const [fetchAgentReportSummary, agentReportSummaryReducer] = getActions(\r\n \"AGENT_REPORT_SUMMARY\",\r\n AGENTREPORTLIST_URL + \"agent\",\r\n {\r\n listAgentReports: [],\r\n } as AgentReportList\r\n);\r\n\r\nexport const [\r\n fetchPlayerReportSummary,\r\n playerReportSummaryReducer,\r\n] = getActions(\"PLAYER_REPORT_SUMMARY\", AGENTREPORTLIST_URL + \"player\", {\r\n listPlayerReports: [],\r\n} as PlayerReportList);\r\n\r\nexport default combineReducers({\r\n tabReducer: combineReducers({\r\n dailySummaryTabReducer,\r\n playerActionTabReducer,\r\n playerListTabReducer,\r\n }),\r\n listReducer: combineReducers({\r\n mainReportSummaryReducer,\r\n playerReportSummaryReducer,\r\n agentReportSummaryReducer,\r\n }),\r\n});\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport TabBar from \"../../../components/BaseUIComponents/TabBar/TabBar\";\r\nimport { AppState } from \"reducers/rootReducer\";\r\n\r\nimport PlayerListAndBalance from \"./playerListAndBalance\";\r\nimport PlayerWeeklyBalance from \"./playerWeeklyBalance\";\r\n\r\ntype TabAction = { type: \"PLAB_TABCHANGE\"; payload: number };\r\n\r\nexport const playerListTabReducer = (state = 0, action: TabAction) => {\r\n if (action.type === \"PLAB_TABCHANGE\") {\r\n return action.payload;\r\n } else {\r\n return state;\r\n }\r\n};\r\n\r\nconst Tabs = () => {\r\n const dispatch = useDispatch();\r\n const changeTab = (tab: number) =>\r\n dispatch({ type: \"PLAB_TABCHANGE\", payload: tab });\r\n const selectedTab = useSelector(\r\n (state: AppState) => state.reportsReducer.tabReducer.playerListTabReducer\r\n );\r\n const contentToDisplay = () => {\r\n switch (selectedTab) {\r\n case 0:\r\n return ;\r\n case 1:\r\n return ;\r\n default:\r\n return null;\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n
{contentToDisplay()}
\r\n
\r\n );\r\n};\r\n\r\nexport default Tabs;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport {\r\n updateCurrentNamespace,\r\n namespaceSelector,\r\n} from \"reducers/tableReducer\";\r\n\r\nexport function useGetNamespace(): string {\r\n return useSelector(namespaceSelector);\r\n}\r\n\r\nexport function useSetNamespace(namespace: string): void {\r\n const dispatch = useDispatch();\r\n\r\n React.useEffect(() => {\r\n dispatch(updateCurrentNamespace(namespace));\r\n }, [namespace, dispatch]);\r\n}\r\n","/** @jsx jsx */\r\nimport { jsx } from \"@emotion/core\";\r\nimport React, { useState, useMemo } from \"react\";\r\nimport css from \"@emotion/css/macro\";\r\nimport { Button } from \"components/Buttons\";\r\nimport format from \"date-fns/format\";\r\n\r\nimport { table, body, head } from \"./DetailsModalStyles\";\r\nimport { toCurrency, CurrencyCode } from \"helpers/currency\";\r\nimport Modal from \"components/PageComponents/Modal/Modal\";\r\nimport PlayerBadge from \"components/PageComponents/PlayerBadge/PlayerBadge\";\r\nimport { ErrorContent } from \"components/Errors/Errors\";\r\nimport { Loading } from \"components/PageComponents/Loading/Loading\";\r\nimport { useFetch } from \"helpers/loading\";\r\nimport { formatDateProperly } from \"helpers/time\";\r\nimport styles from \"components/WagersComponents/AllWagersTable/AllWagersTable.module.css\";\r\nimport { limitDescriptionRows } from \"helpers/wagers\";\r\nimport { useTranslation } from \"react-i18next\";\r\n\r\nconst url = \"/api/v1/AgentReports/WagerList/action-details\";\r\n\r\ntype RichChild = {\r\n betCode: {\r\n betsCode: string;\r\n externalID: string;\r\n };\r\n riskWin: {\r\n risk: number;\r\n win: number;\r\n currencyCode: CurrencyCode;\r\n balanceType: string;\r\n };\r\n result: {\r\n resultAmount: number;\r\n currencyCode: CurrencyCode;\r\n resultString: string;\r\n };\r\n children?: string[];\r\n};\r\n\r\ntype Child = null | string | string[] | RichChild[];\r\n\r\nconst isRichChildren = (c: Child): c is RichChild[] => {\r\n if ((c as RichChild[])[0] != null && (c as RichChild[])[0].betCode != null) {\r\n return true;\r\n }\r\n return false;\r\n};\r\n\r\ntype ActionDetailItem = {\r\n currencyCode: CurrencyCode;\r\n player: {\r\n playersID: number;\r\n userCode: string;\r\n openPassword: string;\r\n };\r\n description: string;\r\n riskWin: {\r\n risk: number | null;\r\n win: number | null;\r\n };\r\n amount: number;\r\n result: string;\r\n placed: Date;\r\n children?: Child;\r\n};\r\n\r\ntype Data = {\r\n actionDetailItems: ActionDetailItem[];\r\n total: { currencyCode: CurrencyCode; amount: number };\r\n};\r\n\r\ntype ActionDetails = {\r\n playersID: number | null;\r\n startDate?: Date | string | null;\r\n endDate?: Date | string | null;\r\n week?: \"thisweek\" | \"lastweek\";\r\n};\r\n\r\nconst ActionDetails: React.FC = ({\r\n playersID,\r\n startDate,\r\n endDate,\r\n week,\r\n}) => {\r\n const config = useMemo(() => {\r\n const handleDate = (d?: Date | string | null) =>\r\n d == null ? null : formatDateProperly(d);\r\n\r\n return {\r\n params: {\r\n playersID,\r\n startDate: handleDate(startDate),\r\n endDate: handleDate(endDate),\r\n week,\r\n },\r\n };\r\n }, [playersID, startDate, endDate, week]);\r\n\r\n const [state, reload] = useFetch(url, undefined, config);\r\n\r\n const content = () => {\r\n if (state.pending) {\r\n return ;\r\n }\r\n if (\"error\" in state) {\r\n return ;\r\n }\r\n if (\"data\" in state) {\r\n return ;\r\n }\r\n return null;\r\n };\r\n\r\n return (\r\n
\r\n {content()}\r\n
\r\n );\r\n};\r\n\r\nconst ChildItem: React.FC<{ value: Child }> = ({ value }) => {\r\n if (value === null) return null;\r\n if (typeof value === \"string\")\r\n return (\r\n \r\n {value}\r\n \r\n );\r\n if (isRichChildren(value)) {\r\n return (\r\n \r\n {value.map(item => (\r\n \r\n \r\n
\r\n
{item.betCode.betsCode}
\r\n
\r\n {item.children && item.children.length > 1 ? (\r\n
    \r\n {item.children.map((x, i) => (\r\n
  1. {x}
  2. \r\n ))}\r\n
\r\n ) : item.children ? (\r\n item.children[0]\r\n ) : null}\r\n
\r\n
\r\n {item.riskWin !== null &&\r\n `${item.riskWin.currencyCode} ${item.riskWin.risk.toFixed(\r\n 1\r\n )}/${item.riskWin.win.toFixed(1)}`}\r\n
\r\n
\r\n {item.result.currencyCode !== null &&\r\n item.result.resultAmount !== null &&\r\n item.result.resultAmount !== 0 &&\r\n `${toCurrency(\r\n item.result.currencyCode,\r\n item.result.resultAmount\r\n )} - `}\r\n {item.result.resultString}\r\n
\r\n
\r\n \r\n \r\n ))}\r\n
\r\n );\r\n }\r\n\r\n const listStyle = css`\r\n margin: 0px;\r\n li {\r\n list-style-type: none;\r\n }\r\n `;\r\n\r\n return (\r\n \r\n \r\n
    \r\n {value.map((line, i) => (\r\n
  • {line}
  • \r\n ))}\r\n
\r\n \r\n \r\n );\r\n};\r\n\r\nconst ActionDetailsTable: React.FC<{ response: Data }> = ({ response }) => {\r\n const { t } = useTranslation(\"actionDetails\");\r\n const [visibleChildren, setVisibleChildren] = useState([]);\r\n const isVisible = (i: number) => visibleChildren.includes(i);\r\n const toggleChild = (i: number) => () => {\r\n if (isVisible(i)) {\r\n setVisibleChildren(prev => prev.filter(x => x !== i));\r\n } else {\r\n setVisibleChildren(prev => [...prev, i]);\r\n }\r\n };\r\n\r\n return (\r\n
\r\n {response.actionDetailItems.length === 0 ? (\r\n

{t(\"noData\")}

\r\n ) : (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {response.actionDetailItems.map((item, i) => (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {isVisible(i) &&\r\n item.children != null &&\r\n item.children !== \"\" && }\r\n \r\n ))}\r\n \r\n
PlayerDescriptionRisk/WinAmountResultPlaced
\r\n \r\n \r\n {limitDescriptionRows(2, item.description)}{\" \"}\r\n {item.children != null && item.children !== \"\" && (\r\n \r\n {!isVisible(i) ? t(\"more\") : t(\"less\")}\r\n \r\n )}\r\n \r\n {item.riskWin.win != null && item.riskWin.risk != null\r\n ? `${item.riskWin.risk}/${item.riskWin.win}`\r\n : \"-\"}\r\n {toCurrency(item.currencyCode, item.amount)}{item.result ? item.result : \"-\"}{format(item.placed, \"MM-DD-YYYY\")}
\r\n )}\r\n \r\n \r\n TOTAL:{\" \"}\r\n {toCurrency(response.total.currencyCode, response.total.amount)}\r\n \r\n
\r\n
\r\n );\r\n};\r\ntype ActionDetailsModal = ActionDetails & { show: boolean; cancel(): void };\r\n\r\nconst ActionDetailsModal: React.FC = props => {\r\n const { cancel, show, playersID, startDate, endDate, week } = props;\r\n const { t } = useTranslation(\"actionDetails\");\r\n\r\n return (\r\n \r\n {playersID !== -1 && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default ActionDetailsModal;\r\n","/** @jsx jsx */\r\nimport React from \"react\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { css, jsx } from \"@emotion/core\";\r\nimport { Theme } from \"theme\";\r\nimport { useTheme } from \"emotion-theming\";\r\n\r\nconst PlayerBadge: React.FC<{\r\n userCode?: string;\r\n pass?: string;\r\n id: number;\r\n onClick?(): void;\r\n}> = ({ userCode, pass, id, onClick }) => {\r\n const theme = useTheme();\r\n const style = css`\r\n display: flex;\r\n flex-direction: column;\r\n font-family: \"Nunito Sans\", sans-serif;\r\n\r\n a,\r\n button {\r\n text-decoration: none;\r\n color: #54595c;\r\n }\r\n\r\n button {\r\n text-align: left;\r\n background: inherit;\r\n border: 0px;\r\n padding: 0px;\r\n margin: 0px;\r\n font-size: 14px;\r\n }\r\n\r\n div:first-child {\r\n color: ${theme.colors.fourth};\r\n text-decoration: none;\r\n }\r\n `;\r\n\r\n if (onClick != null) {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n\r\n return (\r\n
\r\n \r\n
{userCode}
\r\n
{pass != null ? pass : \"No Password\"}
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default PlayerBadge;\r\n","import styled, { CreateStyled } from \"@emotion/styled/macro\";\r\n\r\nexport const initialTheme = {\r\n colors: {\r\n first: \"#0e0b16\",\r\n second: \"#25274d\",\r\n third: \"#464866\",\r\n fourth: \"#1076bc\",\r\n },\r\n fontFamilies: {\r\n first: \"\",\r\n },\r\n};\r\n\r\nexport type Theme = typeof initialTheme;\r\n\r\nexport default styled as CreateStyled;\r\n","import React, { CSSProperties } from \"react\";\r\nimport styles from \"./SubmissionButton.module.css\";\r\nimport { useTransition, animated } from \"react-spring\";\r\nimport Spinner, { SpinnerProps } from \"react-spinkit\";\r\n\r\ntype ButtonType = \"reset\" | \"button\" | \"submit\" | undefined;\r\ntype SubmissionButton = {\r\n isSubmitting: boolean;\r\n spinner?: SpinnerProps;\r\n} & React.HTMLProps;\r\nconst SubmissionButton = ({\r\n isSubmitting,\r\n type,\r\n children,\r\n spinner,\r\n ...props\r\n}: SubmissionButton) => {\r\n const transitions = useTransition(isSubmitting, null, {\r\n initial: { opacity: 1 },\r\n from: { opacity: 0 },\r\n enter: { opacity: 1 },\r\n leave: { opacity: 0 },\r\n });\r\n\r\n const spinnerProps: SpinnerProps = {\r\n name: \"ball-beat\",\r\n color: \"white\",\r\n fadeIn: \"half\",\r\n ...spinner,\r\n };\r\n\r\n const spinnerStyle: CSSProperties = {\r\n position: \"absolute\",\r\n margin: \"auto\",\r\n top: 0,\r\n bottom: 0,\r\n left: 0,\r\n right: 0,\r\n display: \"flex\",\r\n justifyContent: \"center\",\r\n alignItems: \"center\",\r\n };\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nexport default SubmissionButton;\r\n","import axios, { AxiosError } from \"axios\";\r\nimport { store } from \"./index\";\r\nimport { signOut } from \"reducers/auth\";\r\nimport { BASE_URL } from \"./serverDetails\";\r\n\r\n/**\r\n * Custom axios instance with base url set, and some interceptors to\r\n * handle auth headers.\r\n *\r\n */\r\nconst instance = axios.create({\r\n baseURL: BASE_URL,\r\n});\r\n\r\n/**\r\n * A function that, given an access token, will modify an axios request\r\n * config and re-run the request.\r\n */\r\ntype RequestCallback = (token: string) => void;\r\n\r\n/**\r\n * Some mutable state for a queue of requests. If we're already in the middle of\r\n * requesting a new token, we want to hold other requests in a queue, then make\r\n * them with the new token once we get it.\r\n */\r\nclass RequestHandler {\r\n isFetchingToken: boolean;\r\n private pendingRequests: RequestCallback[];\r\n\r\n constructor() {\r\n this.isFetchingToken = false;\r\n this.pendingRequests = [];\r\n }\r\n\r\n addToQueue = (callback: RequestCallback) => {\r\n this.pendingRequests.push(callback);\r\n };\r\n\r\n onTokenFetched = (token: string) => {\r\n this.pendingRequests.forEach(cb => cb(token));\r\n this.clearQueue();\r\n };\r\n\r\n clearQueue = () => {\r\n this.pendingRequests = [];\r\n this.isFetchingToken = false;\r\n };\r\n}\r\n\r\nconst reqHandler = new RequestHandler();\r\n\r\n// Before each request, attach the stored token if it exists.\r\ninstance.interceptors.request.use(request => {\r\n try {\r\n const tokenDetailsString = localStorage.getItem(\"TOKEN_DETAILS\");\r\n if (tokenDetailsString === null) throw new Error();\r\n const tokenDetails = JSON.parse(tokenDetailsString);\r\n if (tokenDetails.accessToken == null) throw new Error();\r\n const authHeader = { Authorization: `Bearer ${tokenDetails.accessToken}` };\r\n return { ...request, headers: { ...request.headers, ...authHeader } };\r\n } catch (err) {\r\n return request;\r\n }\r\n});\r\n\r\n// After each request, if it comes back with a 401 error, refresh token and then retry.\r\ninstance.interceptors.response.use(\r\n fulfilled => fulfilled,\r\n (rejected: AxiosError) => {\r\n const status = rejected.response ? rejected.response.status : null;\r\n\r\n if (status === 401 /*&& has the expired token header*/) {\r\n // Refresh access token.\r\n return refreshAccessToken(rejected);\r\n }\r\n\r\n // It's not an authorisation issue, just pass on the rejection.\r\n // store.dispatch(signOut());\r\n return Promise.reject(rejected);\r\n }\r\n);\r\n\r\n/**\r\n * Intercept the error, and replace it with a promise (awaitingNewToken), which\r\n * on construction will add a callback to our RequestHandler's queue.\r\n *\r\n * The first time the request handler receives one of these additions to its\r\n * queue, it will attempt to fetch a new access token. It stores up pending\r\n * requests until the new token arrives. To the initial callers it looks like\r\n * their request is waiting for a response from the server.\r\n *\r\n * Once the request handler has fetched a new access token, it will run every\r\n * callback in its queue. The callback takes an original request's config,\r\n * changes it to use the new access token, and remakes the request. It then\r\n * resolves the promise made in awaitingNewToken. The response to this new\r\n * request is thereby delivered to the original caller. The queue is then cleared.\r\n *\r\n * To that initial caller, it just looks like its original request took a while\r\n * to resolve.\r\n */\r\nconst refreshAccessToken = async (rejected: AxiosError) => {\r\n try {\r\n const { response: errorResponse } = rejected;\r\n\r\n // Extract the refresh token from LS and make sure it's there.\r\n // Otherwise, just return the error.\r\n const tokenDetailsString = localStorage.getItem(\"TOKEN_DETAILS\");\r\n if (tokenDetailsString === null) return Promise.reject(rejected);\r\n const tokenDetails = JSON.parse(tokenDetailsString);\r\n if (tokenDetails.refreshToken == null || tokenDetails.accessToken == null)\r\n return Promise.reject(rejected);\r\n\r\n // Build a promise that will be handed to the caller instead of the error.\r\n const awaitingNewToken = new Promise(resolve => {\r\n reqHandler.addToQueue(token => {\r\n if (errorResponse) {\r\n errorResponse.config.headers.Authorization = `Bearer ${token}`;\r\n resolve(axios(errorResponse.config));\r\n }\r\n });\r\n });\r\n\r\n // Check if we're already trying to fetch a replacement access token.\r\n if (!reqHandler.isFetchingToken) {\r\n reqHandler.isFetchingToken = true;\r\n const data = {\r\n grantType: \"refresh_token\",\r\n accessToken: tokenDetails.accessToken,\r\n refreshToken: tokenDetails.refreshToken,\r\n };\r\n\r\n const response = await axios.post(\r\n BASE_URL + \"/api/v1/Auth/refresh\",\r\n data\r\n );\r\n\r\n if (\r\n !response.data ||\r\n (response.data.errors && response.data.errors.length > 0)\r\n ) {\r\n // The refresh request failed, reset the queue, sign the\r\n // user out and return the error.\r\n reqHandler.clearQueue();\r\n store.dispatch(signOut());\r\n return Promise.reject(rejected);\r\n }\r\n\r\n // The refresh request succeeded, save the token details for future\r\n // requests and make the queued requests again.\r\n const { errors, ...newTokenData } = response.data;\r\n localStorage.setItem(\"TOKEN_DETAILS\", JSON.stringify(newTokenData));\r\n reqHandler.onTokenFetched(newTokenData.accessToken);\r\n }\r\n\r\n // Return the promise, which will fulfill when we have a new token,\r\n // instead of the error.\r\n return awaitingNewToken;\r\n } catch (error) {\r\n // Something went generically wrong, return this error.\r\n return Promise.reject(error);\r\n }\r\n};\r\n\r\nexport default instance;\r\n","import { Maybe } from \"purify-ts/Maybe\";\r\nimport { find, findIndex } from \"ramda\";\r\n\r\nexport const rightVal = (_left: T, right: S): T | S => right;\r\n\r\nexport const rightmostVal = (\r\n _left: T,\r\n _middle: S,\r\n right: R\r\n): T | S | R => right;\r\n\r\nexport const leftVal = (left: T, _right: S): T | S => left;\r\n\r\nexport const leftmostVal = (\r\n left: T,\r\n _middle: S,\r\n _right: R\r\n): T | S | R => left;\r\n\r\nexport const wrapInMaybe = (\r\n func: (...args: T) => S | undefined | null\r\n) => (...args: T): Maybe => Maybe.fromNullable(func(...args));\r\n\r\nexport const optionFind = wrapInMaybe(find);\r\n\r\nconst defaultToNull = (defaultVal: S) => (\r\n func: (...args: T) => S\r\n) => (...args: T) => (func(...args) === defaultVal ? null : func(...args));\r\n\r\nconst nullFindIndex: (\r\n fn: (a: T) => boolean,\r\n list: T[]\r\n) => number | null = defaultToNull(-1)(findIndex);\r\nexport const maybeFindIndex = wrapInMaybe(nullFindIndex);\r\n\r\nexport const maybeParseInt = (s: string, radix?: number) =>\r\n Maybe.fromFalsy(parseInt(s, radix));\r\nexport const maybeParseFloat = (s: string) => Maybe.fromFalsy(parseFloat(s));\r\n","export const currencies: Record = {\r\n USD: \"$\",\r\n GBP: \"£\",\r\n EUR: \"€\",\r\n CAD: \"C$\",\r\n BRL: \"BRL\",\r\n VEF: \"Bs.\",\r\n PAB: \"PAB\",\r\n PLN: \"PLN\",\r\n RWF: \"RWF\",\r\n PHP: \"PHP\",\r\n NOK: \"NOK\",\r\n MXN: \"MXN\",\r\n NIO: \"NIO\",\r\n SEK: \"SEK\",\r\n DKK: \"DKK\",\r\n GTQ: \"GTQ\",\r\n CNY: \"CNY\",\r\n CLP: \"CLP\",\r\n JMD: \"JMD\",\r\n BOB: \"BOB\",\r\n KRW: \"KRW\",\r\n VCOIN: \"VCOIN\",\r\n BTC: \"BTC\",\r\n AUS: \"AUS\",\r\n JPY: \"JPY\",\r\n DOP: \"DOP\",\r\n ARS: \"ARS\",\r\n COP: \"COP\",\r\n PEN: \"PEN\",\r\n PYG: \"PYG\",\r\n HNL: \"HNL\",\r\n XXX: \"XXX\",\r\n NONE: \"\",\r\n};\r\n\r\nexport type CurrencyCode =\r\n | \"USD\"\r\n | \"GBP\"\r\n | \"EUR\"\r\n | \"CAD\"\r\n | \"BRL\"\r\n | \"VEF\"\r\n | \"PAB\"\r\n | \"PLN\"\r\n | \"RWF\"\r\n | \"PHP\"\r\n | \"NOK\"\r\n | \"MXN\"\r\n | \"NIO\"\r\n | \"SEK\"\r\n | \"DKK\"\r\n | \"GTQ\"\r\n | \"CNY\"\r\n | \"CLP\"\r\n | \"JMD\"\r\n | \"BOB\"\r\n | \"KRW\"\r\n | \"VCOIN\"\r\n | \"BTC\"\r\n | \"AUS\"\r\n | \"JPY\"\r\n | \"DOP\"\r\n | \"ARS\"\r\n | \"COP\"\r\n | \"PEN\"\r\n | \"PYG\"\r\n | \"HNL\"\r\n | \"XXX\"\r\n | \"NONE\";\r\n\r\nexport const toCurrency = (\r\n code: CurrencyCode,\r\n value: number | string | null\r\n): string => {\r\n if (value == null) return \"-\";\r\n if (typeof value === \"string\") return value;\r\n if (currencies[code] == null) {\r\n console.error(\"Invalid currency code provided:\", code);\r\n return value.toString();\r\n }\r\n\r\n const symbols = value < 0 ? \"-\".concat(currencies[code]) : currencies[code];\r\n\r\n return symbols.concat(\r\n // (Math.floor(100 * Math.abs(value)) / 100)\r\n Math.abs(value)\r\n .toFixed(2)\r\n .replace(/\\d(?=(\\d{3})+\\.)/g, \"$&,\")\r\n );\r\n};\r\n","module.exports = __webpack_public_path__ + \"static/media/settings.0d0e8434.svg\";","import React from \"react\";\r\nimport styles from \"./BooleanTick.module.css\";\r\nimport tick from \"assets/tickIcon.svg\";\r\n\r\nexport default function BooleanTick({ bool }: { bool: boolean }) {\r\n if (bool) {\r\n return (\r\n
\r\n \"Yes\"\r\n
\r\n );\r\n } else {\r\n return
-
;\r\n }\r\n}\r\n","module.exports = __webpack_public_path__ + \"static/media/tickIcon.6153a4dc.svg\";","export const FETCH_MY_BALANCE = \"FETCH_MY_BALANCE\";\r\nexport const FETCHING_MY_BALANCE = \"FETCHING_MY_BALANCE\";\r\nexport const FETCHED_MY_BALANCE = \"FETCHED_MY_BALANCE\";\r\nexport const ERROR_FETCHING_MY_BALANCE = \"ERROR_FETCHING_MY_BALANCE\";\r\nexport const RESET_FETCH_MY_BALANCE = \"RESET_FETCH_MY_BALANCE\";\r\n\r\nexport const FETCH_ACTIVE_PLAYERS = \"FETCH_ACTIVE_PLAYERS\";\r\nexport const FETCHING_ACTIVE_PLAYERS = \"FETCHING_ACTIVE_PLAYERS\";\r\nexport const FETCHED_ACTIVE_PLAYERS = \"FETCHED_ACTIVE_PLAYERS\";\r\nexport const ERROR_FETCHING_ACTIVE_PLAYERS = \"ERROR_FETCHING_ACTIVE_PLAYERS\";\r\nexport const RESET_FETCH_ACTIVE_PLAYERS = \"RESET_FETCH_ACTIVE_PLAYERS\";\r\n\r\nexport const FETCH_WEEKLY_FIGURES = \"FETCH_WEEKLY_FIGURES\";\r\nexport const FETCHING_WEEKLY_FIGURES = \"FETCHING_WEEKLY_FIGURES\";\r\nexport const FETCHED_WEEKLY_FIGURES = \"FETCHED_WEEKLY_FIGURES\";\r\nexport const ERROR_FETCHING_WEEKLY_FIGURES = \"ERROR_FETCHING_WEEKLY_FIGURES\";\r\nexport const RESET_FETCH_WEEKLY_FIGURES = \"RESET_FETCH_WEEKLY_FIGURES\";\r\n\r\nexport const FETCH_BET_TICKER = \"FETCH_BET_TICKER\";\r\nexport const FETCHING_BET_TICKER = \"FETCHING_BET_TICKER\";\r\nexport const FETCHED_BET_TICKER = \"FETCHED_BET_TICKER\";\r\nexport const ERROR_FETCHING_BET_TICKER = \"ERROR_FETCHING_BET_TICKER\";\r\nexport const RESET_FETCH_BET_TICKER = \"RESET_FETCH_BET_TICKER\";\r\n\r\nexport const FETCH_BET_LINE_DETAILS = \"FETCH_BET_LINE_DETAILS\";\r\nexport const FETCHING_BET_LINE_DETAILS = \"FETCHING_BET_LINE_DETAILS\";\r\nexport const FETCHED_BET_LINE_DETAILS = \"FETCHED_BET_LINE_DETAILS\";\r\nexport const ERROR_FETCHING_BET_LINE_DETAILS =\r\n \"ERROR_FETCHING_BET_LINE_DETAILS\";\r\nexport const RESET_FETCH_BET_LINE_DETAILS = \"RESET_FETCH_BET_LINE_DETAILS\";\r\n\r\nexport const FETCH_DAILY_FIGURES = \"FETCH_DAILY_FIGURES\";\r\nexport const FETCHING_DAILY_FIGURES = \"FETCHING_DAILY_FIGURES\";\r\nexport const FETCHED_DAILY_FIGURES = \"FETCHED_DAILY_FIGURES\";\r\nexport const ERROR_FETCHING_DAILY_FIGURES = \"ERROR_FETCHING_DAILY_FIGURES\";\r\nexport const RESET_FETCH_DAILY_FIGURES = \"RESET_FETCH_DAILY_FIGURES\";\r\n\r\nexport const FETCH_TOP_WINNING_PLAYERS = \"FETCH_TOP_WINNING_PLAYERS\";\r\nexport const FETCHING_TOP_WINNING_PLAYERS = \"FETCHING_TOP_WINNING_PLAYERS\";\r\nexport const FETCHED_TOP_WINNING_PLAYERS = \"FETCHED_TOP_WINNING_PLAYERS\";\r\nexport const ERROR_FETCHING_TOP_WINNING_PLAYERS =\r\n \"ERROR_FETCHING_TOP_WINNING_PLAYERS\";\r\nexport const RESET_FETCH_TOP_WINNING_PLAYERS =\r\n \"RESET_FETCH_TOP_WINNING_PLAYERS\";\r\n\r\nexport const FETCH_TOP_LOSING_PLAYERS = \"FETCH_TOP_LOSING_PLAYERS\";\r\nexport const FETCHING_TOP_LOSING_PLAYERS = \"FETCHING_TOP_LOSING_PLAYERS\";\r\nexport const FETCHED_TOP_LOSING_PLAYERS = \"FETCHED_TOP_LOSING_PLAYERS\";\r\nexport const ERROR_FETCHING_TOP_LOSING_PLAYERS =\r\n \"ERROR_FETCHING_TOP_LOSING_PLAYERS\";\r\nexport const RESET_FETCH_TOP_LOSING_PLAYERS = \"RESET_FETCH_TOP_LOSING_PLAYERS\";\r\n\r\nexport const FETCH_MOST_VIEWED_REPORTS = \"FETCH_MOST_VIEWED_REPORTS\";\r\nexport const FETCHING_MOST_VIEWED_REPORTS = \"FETCHING_MOST_VIEWED_REPORTS\";\r\nexport const FETCHED_MOST_VIEWED_REPORTS = \"FETCHED_MOST_VIEWED_REPORTS\";\r\nexport const ERROR_FETCHING_MOST_VIEWED_REPORTS =\r\n \"ERROR_FETCHING_MOST_VIEWED_REPORTS\";\r\nexport const RESET_FETCH_MOST_VIEWED_REPORTS =\r\n \"RESET_FETCH_MOST_VIEWED_REPORTS\";\r\n","import { BetLineDetailsState } from \"../../../types/ReducerTypes\";\r\nimport { AnyAction as Action } from \"redux\";\r\nimport { produce } from \"immer\";\r\n\r\nimport {\r\n // Bet line details\r\n FETCH_BET_LINE_DETAILS,\r\n FETCHING_BET_LINE_DETAILS,\r\n FETCHED_BET_LINE_DETAILS,\r\n ERROR_FETCHING_BET_LINE_DETAILS,\r\n RESET_FETCH_BET_LINE_DETAILS,\r\n} from \"./dashboardConstants\";\r\n\r\n/* REDUCER */\r\n\r\nconst initialBetLineDetailsState: BetLineDetailsState = [];\r\n\r\nconst findItem = (state: BetLineDetailsState, id: number) => {\r\n const betIDs = state.map(item => item.details.betID);\r\n return betIDs.findIndex(betID => betID === id);\r\n};\r\n\r\nexport const betLineDetailsReducer = (\r\n state = initialBetLineDetailsState,\r\n action: Action\r\n): BetLineDetailsState =>\r\n produce(state, draft => {\r\n switch (action.type) {\r\n case FETCH_BET_LINE_DETAILS:\r\n const fetchIdx =\r\n action.payload.params != null\r\n ? findItem(draft, action.payload.params.betID)\r\n : -1;\r\n if (fetchIdx !== -1) {\r\n draft[fetchIdx] = {\r\n fetchState: \"noData\",\r\n details: {\r\n betID: action.payload.id,\r\n lineDetails: [],\r\n },\r\n };\r\n } else {\r\n draft.push({\r\n fetchState: \"noData\",\r\n details: {\r\n betID: action.payload.id,\r\n lineDetails: [],\r\n },\r\n });\r\n }\r\n break;\r\n case FETCHING_BET_LINE_DETAILS:\r\n break;\r\n case FETCHED_BET_LINE_DETAILS:\r\n const fetchedIdx = findItem(draft, action.payload.data.betID);\r\n if (fetchedIdx !== -1) {\r\n draft[fetchedIdx] = {\r\n fetchState: \"fetchedData\",\r\n details: action.payload.data,\r\n };\r\n } else {\r\n draft.push({\r\n fetchState: \"fetchedData\",\r\n details: action.payload.data,\r\n });\r\n }\r\n break;\r\n case ERROR_FETCHING_BET_LINE_DETAILS:\r\n break;\r\n case RESET_FETCH_BET_LINE_DETAILS:\r\n return [];\r\n case \"SIGN_OUT\":\r\n return [];\r\n }\r\n });\r\n","import { betLineDetailsReducer } from \"./betLineDetails\";\r\nimport { combineReducers } from \"redux\";\r\nimport { tGetActions as getActions } from \"../../../helpers/actions\";\r\nimport { DASHBOARD_URL } from \"../../../serverDetails\";\r\n\r\nimport { ListBet } from \"../../../types/ApiResponseTypes\";\r\n\r\nconst initialBetTicker = {\r\n listBets: [] as ListBet[],\r\n};\r\n\r\nexport const [fetchBetTicker, betTickerReducer] = getActions(\r\n \"BET_TICKER\",\r\n DASHBOARD_URL + \"bet-ticker\",\r\n initialBetTicker\r\n);\r\n\r\nexport const [fetchBetLineDetails, fetchBetLineDetailsReducer] = getActions(\r\n \"BET_LINE_DETAILS\",\r\n DASHBOARD_URL + \"bet-line-details\",\r\n []\r\n);\r\n\r\nexport const dashboardReducer = combineReducers({\r\n betTickerReducer,\r\n betLineDetailsReducer,\r\n});\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"ErrorMessage\":\"ValidationError_ErrorMessage__3mPxw\"};","module.exports = __webpack_public_path__ + \"static/media/dragHandle.b333fef2.svg\";","module.exports = __webpack_public_path__ + \"static/media/locked.81699f08.svg\";","module.exports = __webpack_public_path__ + \"static/media/Icon_SortBy_01.f322cd9b.svg\";","module.exports = __webpack_public_path__ + \"static/media/Icon_SortBy_02.848a7ff3.svg\";","module.exports = __webpack_public_path__ + \"static/media/Icon_SortBy_03.55a7d265.svg\";","module.exports = __webpack_public_path__ + \"static/media/moredetails.73fef0e4.svg\";","import React from \"react\";\r\nimport SortableTable from \"components/BaseUIComponents/SortableTable/NewSortableTable\";\r\nimport { toCurrency } from \"helpers/currency\";\r\nimport BooleanTick from \"./BooleanTick\";\r\nimport PlayerBadge from \"components/PageComponents/PlayerBadge/PlayerBadge\";\r\nimport { formatDate } from \"./formatters\";\r\nimport { useReferenceCredit } from \"helpers/useReferenceCredit\";\r\n\r\nconst Table = () => {\r\n const showCreditColumns = useReferenceCredit();\r\n\r\n const formatDetails = (item: any) => ({\r\n siteUsers__UserCode: (\r\n \r\n {item.siteUsers__UserCode.userCode} /{\" \"}\r\n {item.siteUsers__UserCode.openPassword}\r\n \r\n ),\r\n playerActivities__bActiveThisWeek: item.playerActivities__bActiveThisWeek\r\n ? \"Yes\"\r\n : \"No\",\r\n });\r\n const formatItems = (listData: any[]) =>\r\n listData.map((items, _i) => ({\r\n ...items,\r\n siteUsers__UserCode: (\r\n \r\n ),\r\n playerBalances__CurrentBalance: toCurrency(\r\n items.siteUsers__UserCode.currencyCode,\r\n items.playerBalances__CurrentBalance\r\n ),\r\n playerBalances__AvailableBalance: toCurrency(\r\n items.siteUsers__UserCode.currencyCode,\r\n items.playerBalances__AvailableBalance\r\n ),\r\n players__CreditLimit: toCurrency(\r\n items.siteUsers__UserCode.currencyCode,\r\n items.players__CreditLimit\r\n ),\r\n playerBalances__LifetimeNET: toCurrency(\r\n items.siteUsers__UserCode.currencyCode,\r\n items.playerBalances__LifetimeNET\r\n ),\r\n players__TempCredit: (\r\n
\r\n
\r\n {toCurrency(\r\n items.siteUsers__UserCode.currencyCode,\r\n items.players__TempCredit.tempCreditAmount\r\n )}\r\n
\r\n
\r\n {items.players__TempCredit.tempCreditExpiryDate &&\r\n `Exp. date: ${formatDate(\r\n items.players__TempCredit.tempCreditExpiryDate\r\n )}`}\r\n
\r\n
\r\n ),\r\n playerActivities__LastWager: items.playerActivities__LastWager\r\n ? formatDate(items.playerActivities__LastWager, true)\r\n : \"-\",\r\n playerActivities__bActiveThisWeek: (\r\n \r\n ),\r\n }));\r\n\r\n const hiddenColumns = showCreditColumns\r\n ? []\r\n : [\"players__CreditLimit\", \"players__TempCredit\"];\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default Table;\r\n","/** @jsx jsx */\r\n// eslint-disable-next-line\r\nimport React, { useState } from \"react\";\r\nimport { jsx } from \"@emotion/core\";\r\nimport SortableTable from \"components/BaseUIComponents/SortableTable/NewSortableTable\";\r\nimport { toCurrency, CurrencyCode } from \"helpers/currency\";\r\nimport PlayerBadge from \"components/PageComponents/PlayerBadge/PlayerBadge\";\r\nimport AccrualDetailsModal, { useAccrualModal } from \"./AccrualDetailsModal\";\r\nimport ActionDetailsModal from \"./ActionDetailsModal\";\r\nimport { DateButton } from \"components/Buttons\";\r\nimport { map as mapObj } from \"ramda\";\r\nimport { usebTuesday } from \"helpers/hooks\";\r\n\r\ntype BalanceLink = {\r\n playersID: number;\r\n currencyCode: CurrencyCode;\r\n value: { amount: number; date: string };\r\n onClick(id: number, date: Date): void;\r\n};\r\n\r\nconst BalanceLink = ({\r\n onClick,\r\n playersID,\r\n currencyCode,\r\n value,\r\n}: BalanceLink) => {\r\n return (\r\n onClick(playersID, new Date(value.date))}>\r\n {toCurrency(currencyCode, value.amount)}\r\n \r\n );\r\n};\r\n\r\nconst Table = () => {\r\n // Displaying data from the monday just gone to the next monday.\r\n\r\n const [[startDate, endDate], setAccrualDates] = useState<\r\n [Date, Date] | [null, null]\r\n >([null, null]);\r\n\r\n const { modalID, setModalID, showModal, closeModal } = useAccrualModal();\r\n\r\n const [actionInfo, setActionInfo] = useState<{\r\n id: number;\r\n date: Date | null;\r\n }>({ id: -1, date: null });\r\n\r\n const handleClick = (id: number, date: Date) => setActionInfo({ id, date });\r\n\r\n const formatDetails = (item: any) => ({\r\n ...mapObj((x) => {\r\n return toCurrency(item.currencyCode, x.amount);\r\n }, item),\r\n playerWeeklyBalance__WeekTotal: toCurrency(\r\n item.currencyCode,\r\n item.playerWeeklyBalance__WeekTotal\r\n ),\r\n playerWeeklyBalance__EOW: toCurrency(\r\n item.currencyCode,\r\n item.playerWeeklyBalance__EOW\r\n ),\r\n playerWeeklyBalance__Pending: toCurrency(\r\n item.currencyCode,\r\n item.playerWeeklyBalance__Pending\r\n ),\r\n playerWeeklyBalance__BOW: toCurrency(\r\n item.currencyCode,\r\n item.playerWeeklyBalance__BOW\r\n ),\r\n siteUsers__UserCode: (\r\n \r\n {item.siteUsers__UserCode.userCode} /{\" \"}\r\n {item.siteUsers__UserCode.openPassword}\r\n \r\n ),\r\n playerWeeklyBalance__Accrual: toCurrency(\r\n item.currencyCode,\r\n item.playerWeeklyBalance__Accrual\r\n ),\r\n });\r\n\r\n const formatItems = (listData: any[]) =>\r\n listData.map((items) => ({\r\n ...items,\r\n siteUsers__UserCode: (\r\n \r\n ),\r\n playerWeeklyBalance__BOW: toCurrency(\r\n items.currencyCode,\r\n items.playerWeeklyBalance__BOW\r\n ),\r\n playerWeeklyBalance__Mon: (\r\n \r\n ),\r\n playerWeeklyBalance__Tue: (\r\n \r\n ),\r\n playerWeeklyBalance__Wed: (\r\n \r\n ),\r\n playerWeeklyBalance__Thu: (\r\n \r\n ),\r\n playerWeeklyBalance__Fri: (\r\n \r\n ),\r\n playerWeeklyBalance__Sat: (\r\n \r\n ),\r\n playerWeeklyBalance__Sun: (\r\n \r\n ),\r\n playerWeeklyBalance__Accrual: (\r\n {\r\n setModalID(items.siteUsers__UserCode.playersID);\r\n setAccrualDates([\r\n items.playerWeeklyBalance__Mon.date,\r\n items.playerWeeklyBalance__Sun.date,\r\n ]);\r\n }}\r\n >\r\n {toCurrency(items.currencyCode, items.playerWeeklyBalance__Accrual)}\r\n \r\n ),\r\n playerWeeklyBalance__WeekTotal: toCurrency(\r\n items.currencyCode,\r\n items.playerWeeklyBalance__WeekTotal\r\n ),\r\n playerWeeklyBalance__EOW: toCurrency(\r\n items.currencyCode,\r\n items.playerWeeklyBalance__EOW\r\n ),\r\n playerWeeklyBalance__Pending: toCurrency(\r\n items.currencyCode,\r\n items.playerWeeklyBalance__Pending\r\n ),\r\n }));\r\n\r\n const bTuesStart = usebTuesday();\r\n\r\n return (\r\n
\r\n \r\n setActionInfo({ id: -1, date: null })}\r\n playersID={actionInfo.id}\r\n startDate={actionInfo.date}\r\n endDate={actionInfo.date}\r\n />\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default Table;\r\n","import React from \"react\";\r\nimport SortableTable from \"components/BaseUIComponents/SortableTable/NewSortableTable\";\r\nimport { toCurrency } from \"helpers/currency\";\r\nimport { formatDate } from \"./formatters\";\r\nimport AccrualDetailsModal, { useAccrualSummary } from \"./AccrualDetailsModal\";\r\nimport { DateButton } from \"components/Buttons\";\r\n\r\nconst Table = () => {\r\n const {\r\n theDate,\r\n setDate,\r\n modalID,\r\n showModal,\r\n closeModal,\r\n } = useAccrualSummary();\r\n\r\n const formatItems = (listData: any[]) =>\r\n listData.map(items => ({\r\n ...items,\r\n dailySummaries__Date: formatDate(items.dailySummaries__Date),\r\n dailySummaries__SportsVolume: toCurrency(\r\n \"USD\",\r\n items.dailySummaries__SportsVolume\r\n ),\r\n dailySummaries__SportsGross: toCurrency(\r\n \"USD\",\r\n items.dailySummaries__SportsGross\r\n ),\r\n dailySummaries__CasinoVolume: toCurrency(\r\n \"USD\",\r\n items.dailySummaries__CasinoVolume\r\n ),\r\n dailySummaries__CasinoGross: toCurrency(\r\n \"USD\",\r\n items.dailySummaries__CasinoGross\r\n ),\r\n dailySummaries__HorsesVolume: toCurrency(\r\n \"USD\",\r\n items.dailySummaries__HorsesVolume\r\n ),\r\n dailySummaries__HorsesGross: toCurrency(\r\n \"USD\",\r\n items.dailySummaries__HorsesGross\r\n ),\r\n dailySummaries__LiveVolume: toCurrency(\r\n \"USD\",\r\n items.dailySummaries__LiveVolume\r\n ),\r\n dailySummaries__LiveGross: toCurrency(\r\n \"USD\",\r\n items.dailySummaries__LiveGross\r\n ),\r\n dailySummaries__Accrual: (\r\n setDate(items.dailySummaries__Date)}>\r\n {toCurrency(\"USD\", items.dailySummaries__Accrual)}\r\n \r\n ),\r\n }));\r\n\r\n const formatDetails = (item: any) => ({\r\n dailySummaries__Accrual: toCurrency(\"USD\", item.dailySummaries__Accrual),\r\n });\r\n\r\n const formatSummaries = {\r\n AgentReports_DailySummary_All_Totals: (summary: any, listData: any[]) => {\r\n const currencyCode = listData[0] ? listData[0].currencyCode : \"USD\";\r\n const formatCurrency = (val: number) => toCurrency(currencyCode, val);\r\n\r\n return {\r\n dailySummaries__Date: \"TOTAL\",\r\n dailySummaries__SportsVolume: formatCurrency(\r\n summary.dailySummaries__SportsVolume\r\n ),\r\n dailySummaries__SportsGross: formatCurrency(\r\n summary.dailySummaries__SportsGross\r\n ),\r\n dailySummaries__SportsPlayers: summary.dailySummaries__SportsPlayers,\r\n dailySummaries__SportsWagers: summary.dailySummaries__SportsWagers,\r\n dailySummaries__CasinoVolume: formatCurrency(\r\n summary.dailySummaries__CasinoVolume\r\n ),\r\n dailySummaries__CasinoGross: formatCurrency(\r\n summary.dailySummaries__CasinoGross\r\n ),\r\n dailySummaries__CasinoPlayers: summary.dailySummaries__CasinoPlayers,\r\n dailySummaries__CasinoWagers: summary.dailySummaries__CasinoWagers,\r\n dailySummaries__HorsesVolume: formatCurrency(\r\n summary.dailySummaries__HorsesVolume\r\n ),\r\n dailySummaries__HorsesGross: formatCurrency(\r\n summary.dailySummaries__HorsesGross\r\n ),\r\n dailySummaries__HorsesPlayers: summary.dailySummaries__HorsesPlayers,\r\n dailySummaries__HorsesWagers: summary.dailySummaries__HorsesWagers,\r\n dailySummaries__LiveVolume: formatCurrency(\r\n summary.dailySummaries__LiveVolume\r\n ),\r\n dailySummaries__LiveGross: formatCurrency(\r\n summary.dailySummaries__LiveGross\r\n ),\r\n dailySummaries__LivePlayers: summary.dailySummaries__LivePlayers,\r\n dailySummaries__LiveWagers: summary.dailySummaries__LiveWagers,\r\n dailySummaries__Accrual: formatCurrency(\r\n summary.dailySummaries__Accrual\r\n ),\r\n };\r\n },\r\n };\r\n return (\r\n
\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default Table;\r\n","import React from \"react\";\r\nimport SortableTable from \"components/BaseUIComponents/SortableTable/NewSortableTable\";\r\nimport { toCurrency } from \"helpers/currency\";\r\nimport { formatDate } from \"./formatters\";\r\n\r\nconst Table = () => {\r\n const formatItems = (listData: any[]) =>\r\n listData.map(items => ({\r\n ...items,\r\n dailySummaries__Date: formatDate(items.dailySummaries__Date),\r\n dailySummaries__Volume: toCurrency(\r\n items.currencyCode,\r\n items.dailySummaries__Volume\r\n ),\r\n dailySummaries__Adjustments: toCurrency(\r\n items.currencyCode,\r\n items.dailySummaries__Adjustments\r\n ),\r\n dailySummaries__HoldPercentage: `${items.dailySummaries__HoldPercentage}%`,\r\n dailySummaries__Rebates: items.dailySummaries__Rebates.toFixed(2),\r\n }));\r\n\r\n const formatSummaries = {\r\n AgentReports_DailySummary_Casino_Totals: (\r\n summary: any,\r\n listData: any[]\r\n ) => {\r\n const currencyCode = listData[0].currencyCode;\r\n const formatCurrency = (val: number) => toCurrency(currencyCode, val);\r\n\r\n return {\r\n ...summary,\r\n dailySummaries__Date: \"TOTAL\",\r\n dailySummaries__Volume: formatCurrency(summary.dailySummaries__Volume),\r\n dailySummaries__Adjustments: formatCurrency(\r\n summary.dailySummaries__Adjustments\r\n ),\r\n dailySummaries__HoldPercentage: `${summary.dailySummaries__HoldPercentage}%`,\r\n dailySummaries__Rebates: summary.dailySummaries__Rebates.toFixed(2),\r\n };\r\n },\r\n };\r\n return (\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default Table;\r\n","import React from \"react\";\r\nimport SortableTable from \"components/BaseUIComponents/SortableTable/NewSortableTable\";\r\nimport { formatDate } from \"./formatters\";\r\nimport { toCurrency } from \"helpers/currency\";\r\n\r\nconst Table = () => {\r\n const formatItems = (listData: any[]) =>\r\n listData.map(items => ({\r\n ...items,\r\n dailySummaries__Date: formatDate(items.dailySummaries__Date),\r\n dailySummaries__Volume: toCurrency(\r\n items.currencyCode,\r\n items.dailySummaries__Volume\r\n ),\r\n dailySummaries__Adjustments: toCurrency(\r\n items.currencyCode,\r\n items.dailySummaries__Adjustments\r\n ),\r\n dailySummaries__HoldPercentage: `${items.dailySummaries__HoldPercentage}%`,\r\n dailySummaries__Rebates: items.dailySummaries__Rebates.toFixed(2),\r\n }));\r\n\r\n const formatSummaries = {\r\n AgentReports_DailySummary_Horses_Totals: (\r\n summary: any,\r\n listData: any[]\r\n ) => {\r\n const currencyCode = listData[0].currencyCode;\r\n const formatCurrency = (val: number) => toCurrency(currencyCode, val);\r\n\r\n return {\r\n ...summary,\r\n dailySummaries__Date: \"TOTAL\",\r\n dailySummaries__Volume: formatCurrency(summary.dailySummaries__Volume),\r\n dailySummaries__Adjustments: formatCurrency(\r\n summary.dailySummaries__Adjustments\r\n ),\r\n dailySummaries__HoldPercentage: `${summary.dailySummaries__HoldPercentage}%`,\r\n dailySummaries__Rebates: summary.dailySummaries__Rebates.toFixed(2),\r\n };\r\n },\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default Table;\r\n","import React from \"react\";\r\nimport SortableTable from \"components/BaseUIComponents/SortableTable/NewSortableTable\";\r\nimport { toCurrency } from \"helpers/currency\";\r\nimport { formatDate } from \"./formatters\";\r\n\r\nconst Table = () => {\r\n const formatItems = (listData: any[]) =>\r\n listData.map(items => ({\r\n ...items,\r\n dailySummaries__Date: formatDate(items.dailySummaries__Date),\r\n dailySummaries__Volume: toCurrency(\r\n items.currencyCode,\r\n items.dailySummaries__Volume\r\n ),\r\n dailySummaries__Adjustments: toCurrency(\r\n items.currencyCode,\r\n items.dailySummaries__Adjustments\r\n ),\r\n dailySummaries__HoldPercentage: `${items.dailySummaries__HoldPercentage}%`,\r\n }));\r\n\r\n const formatSummaries = {\r\n AgentReports_DailySummary_Live_Totals: (summary: any, listData: any[]) => {\r\n const currencyCode = listData[0].currencyCode;\r\n const formatCurrency = (val: number) => toCurrency(currencyCode, val);\r\n\r\n return {\r\n ...summary,\r\n dailySummaries__Date: \"TOTAL\",\r\n dailySummaries__Volume: formatCurrency(summary.dailySummaries__Volume),\r\n dailySummaries__Adjustments: formatCurrency(\r\n summary.dailySummaries__Adjustments\r\n ),\r\n dailySummaries__HoldPercentage: `${summary.dailySummaries__HoldPercentage}%`,\r\n };\r\n },\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default Table;\r\n","import React from \"react\";\r\nimport SortableTable from \"components/BaseUIComponents/SortableTable/NewSortableTable\";\r\nimport { toCurrency } from \"helpers/currency\";\r\nimport { formatDate } from \"./formatters\";\r\n\r\nconst Table = () => {\r\n const formatItems = (listData: any[]) =>\r\n listData.map(items => ({\r\n ...items,\r\n dailySummaries__Date: formatDate(items.dailySummaries__Date),\r\n dailySummaries__Volume: toCurrency(\r\n items.currencyCode,\r\n items.dailySummaries__Volume\r\n ),\r\n dailySummaries__Adjustments: toCurrency(\r\n items.currencyCode,\r\n items.dailySummaries__Adjustments\r\n ),\r\n dailySummaries__HoldPercentage: `${items.dailySummaries__HoldPercentage}%`,\r\n }));\r\n\r\n const formatSummaries = {\r\n AgentReports_DailySummary_Sports_Totals: (\r\n summary: any,\r\n listData: any[]\r\n ) => {\r\n const currencyCode = listData[0].currencyCode;\r\n const formatCurrency = (val: number) => toCurrency(currencyCode, val);\r\n\r\n return {\r\n dailySummaries__Date: \"TOTAL\",\r\n dailySummaries__Players: summary.dailySummaries__Players,\r\n dailySummaries__Wagers: summary.dailySummaries__Wagers,\r\n dailySummaries__Volume: formatCurrency(summary.dailySummaries__Volume),\r\n dailySummaries__Adjustments: formatCurrency(\r\n summary.dailySummaries__Adjustments\r\n ),\r\n dailySummaries__HoldPercentage: `${summary.dailySummaries__HoldPercentage}%`,\r\n };\r\n },\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default Table;\r\n","import React from \"react\";\r\nimport SortableTable from \"components/BaseUIComponents/SortableTable/NewSortableTable\";\r\nimport { toCurrency } from \"helpers/currency\";\r\nimport { formatDate } from \"./formatters\";\r\n\r\nconst Table = () => {\r\n const formatItems = (listData: any[]) =>\r\n listData.map((items) => ({\r\n ...items,\r\n dailySummaries__Date: formatDate(items.dailySummaries__Date),\r\n dailySummaries__Volume: toCurrency(\r\n items.currencyCode,\r\n items.dailySummaries__Volume\r\n ),\r\n dailySummaries__Adjustments: toCurrency(\r\n items.currencyCode,\r\n items.dailySummaries__Adjustments\r\n ),\r\n dailySummaries__HoldPercentage: `${items.dailySummaries__HoldPercentage}%`,\r\n }));\r\n\r\n const formatSummaries = {\r\n AgentReports_DailySummary_Live_Totals: (summary: any, listData: any[]) => {\r\n const currencyCode = listData[0].currencyCode;\r\n const formatCurrency = (val: number) => toCurrency(currencyCode, val);\r\n\r\n return {\r\n ...summary,\r\n dailySummaries__Date: \"TOTAL\",\r\n dailySummaries__Volume: formatCurrency(summary.dailySummaries__Volume),\r\n dailySummaries__Adjustments: formatCurrency(\r\n summary.dailySummaries__Adjustments\r\n ),\r\n dailySummaries__HoldPercentage: `${summary.dailySummaries__HoldPercentage}%`,\r\n };\r\n },\r\n };\r\n\r\n return (\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default Table;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport TabBar from \"../../../components/BaseUIComponents/TabBar/TabBar\";\r\nimport { AppState } from \"reducers/rootReducer\";\r\nimport DailySummaryAll from \"./dailySummaryAll\";\r\nimport DailySummaryCasino from \"./dailySummaryCasino\";\r\n// import DailySummaryContests from \"./dailySummaryContests\";\r\nimport DailySummaryHorses from \"./dailySummaryHorses\";\r\nimport DailySummaryLive from \"./dailySummaryLive\";\r\nimport DailySummarySports from \"./dailySummarySports\";\r\nimport DailySummaryLotto3000 from \"./dailySummaryLotto3000\";\r\nimport { useTranslation } from \"react-i18next\";\r\n\r\ntype TabAction = { type: \"DAILY_SUMMARY_TABCHANGE\"; payload: number };\r\n\r\nexport const dailySummaryTabReducer = (state = 0, action: TabAction) => {\r\n if (action.type === \"DAILY_SUMMARY_TABCHANGE\") {\r\n return action.payload;\r\n } else {\r\n return state;\r\n }\r\n};\r\n\r\nconst Tabs = () => {\r\n const dispatch = useDispatch();\r\n const { t } = useTranslation(\"dailySummaryReport\");\r\n const changeTab = (tab: number) =>\r\n dispatch({ type: \"DAILY_SUMMARY_TABCHANGE\", payload: tab });\r\n const selectedTab = useSelector(\r\n (state: AppState) => state.reportsReducer.tabReducer.dailySummaryTabReducer\r\n );\r\n const contentToDisplay = () => {\r\n switch (selectedTab) {\r\n case 0:\r\n return ;\r\n case 1:\r\n return ;\r\n case 2:\r\n return ;\r\n case 3:\r\n return ;\r\n case 4:\r\n return ;\r\n case 5:\r\n return ;\r\n default:\r\n return null;\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n
{contentToDisplay()}
\r\n
\r\n );\r\n};\r\n\r\nexport default Tabs;\r\n","import React from \"react\";\r\nimport { useSelector } from \"react-redux\";\r\nimport SortableTable from \"components/BaseUIComponents/SortableTable/NewSortableTable\";\r\nimport { toCurrency } from \"helpers/currency\";\r\nimport PlayerBadge from \"components/PageComponents/PlayerBadge/PlayerBadge\";\r\nimport AccrualDetailsModal, { useAccrualModal } from \"./AccrualDetailsModal\";\r\nimport {\r\n dateTabStartSelector,\r\n dateTabEndSelector,\r\n} from \"reducers/tableReducer\";\r\nimport { DateButton } from \"components/Buttons\";\r\n\r\nconst Table = () => {\r\n const { modalID, setModalID, showModal, closeModal } = useAccrualModal();\r\n const startDateString = useSelector(dateTabStartSelector);\r\n const endDateString = useSelector(dateTabEndSelector);\r\n\r\n const startDate = startDateString == null ? null : new Date(startDateString);\r\n const endDate = endDateString == null ? null : new Date(endDateString);\r\n\r\n const formatDetails = (item: any) => ({\r\n SiteUsers__UserCode: (\r\n \r\n {item.player.userCode} / {item.player.openPassword}\r\n \r\n ),\r\n });\r\n const formatItems = (listData: any[]) =>\r\n listData.map(items => ({\r\n ...items,\r\n siteUsers__UserCode: (\r\n \r\n ),\r\n playerAction__Total: toCurrency(\r\n items.player.currencyCode,\r\n items.playerAction__Total\r\n ),\r\n playerAction__Pending: toCurrency(\r\n items.player.currencyCode,\r\n items.playerAction__Pending\r\n ),\r\n playerAction__Straight: toCurrency(\r\n items.player.currencyCode,\r\n items.playerAction__Straight\r\n ),\r\n playerAction__Parlay: toCurrency(\r\n items.player.currencyCode,\r\n items.playerAction__Parlay\r\n ),\r\n playerAction__Teaser: toCurrency(\r\n items.player.currencyCode,\r\n items.playerAction__Teaser\r\n ),\r\n playerAction__Sports: toCurrency(\r\n items.player.currencyCode,\r\n items.playerAction__Sports\r\n ),\r\n playerAction__Casino: toCurrency(\r\n items.player.currencyCode,\r\n items.playerAction__Casino\r\n ),\r\n playerAction__Horses: toCurrency(\r\n items.player.currencyCode,\r\n items.playerAction__Horses\r\n ),\r\n playerAction__Live: toCurrency(\r\n items.player.currencyCode,\r\n items.playerAction__Live\r\n ),\r\n playerAction__Accrual: (\r\n setModalID(items.player.playersID)}>\r\n {toCurrency(items.player.currencyCode, items.playerAction__Accrual)}\r\n \r\n ),\r\n }));\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default Table;\r\n","import React from \"react\";\r\nimport SortableTable from \"components/BaseUIComponents/SortableTable/NewSortableTable\";\r\nimport PlayerBadge from \"components/PageComponents/PlayerBadge/PlayerBadge\";\r\nimport { toCurrency } from \"helpers/currency\";\r\nimport AccrualDetailsModal, { useAccrualModal } from \"./AccrualDetailsModal\";\r\n\r\nconst Table = () => {\r\n const { modalID, setModalID, showModal, closeModal } = useAccrualModal();\r\n\r\n const formatDetails = (item: any) => ({\r\n siteUsers__UserCode: (\r\n \r\n {item.player.userCode} / {item.player.openPassword}\r\n \r\n ),\r\n });\r\n const formatItems = (listData: any[]) =>\r\n listData.map(items => ({\r\n ...items,\r\n siteUsers__UserCode: (\r\n setModalID(items.player.playersID)}\r\n userCode={items.player.userCode}\r\n pass={items.player.openPassword}\r\n id={items.player.playersID}\r\n />\r\n ),\r\n playerAction__Volume: toCurrency(\r\n items.player.currencyCode,\r\n items.playerAction__Volume\r\n ),\r\n playerAction__Adjustment: toCurrency(\r\n items.player.currencyCode,\r\n items.playerAction__Adjustment\r\n ),\r\n playerAction__HoldPercentage: items.playerAction__HoldPercentage + \"%\",\r\n }));\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default Table;\r\n","import React from \"react\";\r\nimport SortableTable from \"components/BaseUIComponents/SortableTable/NewSortableTable\";\r\nimport PlayerBadge from \"components/PageComponents/PlayerBadge/PlayerBadge\";\r\nimport { toCurrency } from \"helpers/currency\";\r\nimport AccrualDetailsModal, { useAccrualModal } from \"./AccrualDetailsModal\";\r\n\r\nconst Table = () => {\r\n const { modalID, setModalID, showModal, closeModal } = useAccrualModal();\r\n\r\n const formatDetails = (item: any) => ({\r\n siteUsers__UserCode: (\r\n \r\n {item.player.userCode} / {item.player.openPassword}\r\n \r\n ),\r\n });\r\n const formatItems = (listData: any[]) =>\r\n listData.map(items => ({\r\n ...items,\r\n siteUsers__UserCode: (\r\n setModalID(items.player.playersID)}\r\n userCode={items.player.userCode}\r\n pass={items.player.openPassword}\r\n id={items.player.playersID}\r\n />\r\n ),\r\n playerAction__Volume: toCurrency(\r\n items.player.currencyCode,\r\n items.playerAction__Volume\r\n ),\r\n playerAction__Adjustment: toCurrency(\r\n items.player.currencyCode,\r\n items.playerAction__Adjustment\r\n ),\r\n playerAction__HoldPercentage: items.playerAction__HoldPercentage + \"%\",\r\n }));\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default Table;\r\n","import React from \"react\";\r\nimport SortableTable from \"components/BaseUIComponents/SortableTable/NewSortableTable\";\r\nimport PlayerBadge from \"components/PageComponents/PlayerBadge/PlayerBadge\";\r\nimport { toCurrency } from \"helpers/currency\";\r\nimport AccrualDetailsModal, { useAccrualModal } from \"./AccrualDetailsModal\";\r\n\r\nconst Table = () => {\r\n const { modalID, setModalID, showModal, closeModal } = useAccrualModal();\r\n\r\n const formatDetails = (item: any) => ({\r\n siteUsers__UserCode: (\r\n \r\n {item.player.userCode} / {item.player.openPassword}\r\n \r\n ),\r\n });\r\n const formatItems = (listData: any[]) =>\r\n listData.map(items => ({\r\n ...items,\r\n siteUsers__UserCode: (\r\n setModalID(items.player.playersID)}\r\n userCode={items.player.userCode}\r\n pass={items.player.openPassword}\r\n id={items.player.playersID}\r\n />\r\n ),\r\n playerAction__Volume: toCurrency(\r\n items.player.currencyCode,\r\n items.playerAction__Volume\r\n ),\r\n playerAction__HoldPercentage: items.playerAction__HoldPercentage + \"%\",\r\n }));\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default Table;\r\n","import React from \"react\";\r\nimport SortableTable from \"components/BaseUIComponents/SortableTable/NewSortableTable\";\r\nimport PlayerBadge from \"components/PageComponents/PlayerBadge/PlayerBadge\";\r\nimport { toCurrency } from \"helpers/currency\";\r\nimport AccrualDetailsModal, { useAccrualModal } from \"./AccrualDetailsModal\";\r\n\r\nconst Table = () => {\r\n const { modalID, setModalID, showModal, closeModal } = useAccrualModal();\r\n\r\n const formatDetails = (item: any) => ({\r\n siteUsers__UserCode: (\r\n \r\n {item.player.userCode} / {item.player.openPassword}\r\n \r\n ),\r\n });\r\n const formatItems = (listData: any[]) =>\r\n listData.map(items => ({\r\n ...items,\r\n siteUsers__UserCode: (\r\n setModalID(items.player.playersID)}\r\n userCode={items.player.userCode}\r\n pass={items.player.openPassword}\r\n id={items.player.playersID}\r\n />\r\n ),\r\n playerAction__Volume: toCurrency(\r\n items.player.currencyCode,\r\n items.playerAction__Volume\r\n ),\r\n playerAction__Adjustment: toCurrency(\r\n items.player.currencyCode,\r\n items.playerAction__Adjustment\r\n ),\r\n playerAction__HoldPercentage: items.playerAction__HoldPercentage + \"%\",\r\n }));\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default Table;\r\n","import React from \"react\";\r\nimport SortableTable from \"components/BaseUIComponents/SortableTable/NewSortableTable\";\r\nimport PlayerBadge from \"components/PageComponents/PlayerBadge/PlayerBadge\";\r\nimport { toCurrency } from \"helpers/currency\";\r\nimport AccrualDetailsModal, { useAccrualModal } from \"./AccrualDetailsModal\";\r\n\r\nconst Table = () => {\r\n const { modalID, setModalID, showModal, closeModal } = useAccrualModal();\r\n\r\n const formatDetails = (item: any) => ({\r\n siteUsers__UserCode: (\r\n \r\n {item.player.userCode} / {item.player.openPassword}\r\n \r\n ),\r\n });\r\n const formatItems = (listData: any[]) =>\r\n listData.map((items) => ({\r\n ...items,\r\n siteUsers__UserCode: (\r\n setModalID(items.player.playersID)}\r\n userCode={items.player.userCode}\r\n pass={items.player.openPassword}\r\n id={items.player.playersID}\r\n />\r\n ),\r\n playerAction__Volume: toCurrency(\r\n items.player.currencyCode,\r\n items.playerAction__Volume\r\n ),\r\n playerAction__HoldPercentage: items.playerAction__HoldPercentage + \"%\",\r\n }));\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default Table;\r\n","import React from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\n\r\nimport TabBar from \"../../../components/BaseUIComponents/TabBar/TabBar\";\r\nimport { AppState } from \"reducers/rootReducer\";\r\n\r\nimport PlayerActionAll from \"./playerActionAll\";\r\nimport PlayerActionCasino from \"./playerActionCasino\";\r\n// import PlayerActionContests from \"./playerActionContests\";\r\nimport PlayerActionHorses from \"./playerActionHorses\";\r\nimport PlayerActionLive from \"./playerActionLive\";\r\nimport PlayerActionSports from \"./playerActionSports\";\r\nimport PlayerActionLotto3000 from \"./playerActionLotto3000\";\r\nimport { useTranslation } from \"react-i18next\";\r\n\r\ntype TabAction = { type: \"PLAYER_ACTION_TABCHANGE\"; payload: number };\r\n\r\nexport const playerActionTabReducer = (state = 0, action: TabAction) => {\r\n if (action.type === \"PLAYER_ACTION_TABCHANGE\") {\r\n return action.payload;\r\n } else {\r\n return state;\r\n }\r\n};\r\n\r\nconst Tabs = () => {\r\n const { t } = useTranslation(\"playerActionReport\");\r\n const dispatch = useDispatch();\r\n const changeTab = (tab: number) =>\r\n dispatch({ type: \"PLAYER_ACTION_TABCHANGE\", payload: tab });\r\n const selectedTab = useSelector(\r\n (state: AppState) => state.reportsReducer.tabReducer.playerActionTabReducer\r\n );\r\n const contentToDisplay = () => {\r\n switch (selectedTab) {\r\n case 0:\r\n return ;\r\n case 1:\r\n return ;\r\n case 2:\r\n return ;\r\n case 3:\r\n return ;\r\n case 4:\r\n return ;\r\n case 5:\r\n return ;\r\n default:\r\n return null;\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n
{contentToDisplay()}
\r\n
\r\n );\r\n};\r\n\r\nexport default Tabs;\r\n","module.exports = __webpack_public_path__ + \"static/media/tooltip-dark.2246f6a7.svg\";","import React from \"react\";\r\nimport { format } from \"date-fns\";\r\n\r\nexport const formatDate = (date: string | Date | null, showTime = false) => {\r\n if (date == null) return date;\r\n const formattedDate = format(date, \"MM/DD/YY\");\r\n const formattedTime = format(date, \"H:mm A\");\r\n\r\n return !showTime ? (\r\n formattedDate\r\n ) : (\r\n
\r\n
{formattedDate}
\r\n
{formattedTime}
\r\n
\r\n );\r\n};\r\n","import { Reducer, AnyAction as Action } from \"redux\";\r\nimport { selectCacheIndexFromItems } from \"./selectors\";\r\nimport { FetchStatus, SendStatus } from \"../types/BasicTypes\";\r\nimport { GetList200Response } from \"../types/ApiResponseTypes\";\r\nimport {\r\n GetState,\r\n ListState,\r\n CreateState,\r\n EditState,\r\n SelectByIdState,\r\n DeleteState,\r\n PostState,\r\n} from \"../types/ReducerTypes\";\r\nimport { produce, Draft } from \"immer\";\r\nimport { Just, Nothing } from \"purify-ts/Maybe\";\r\n\r\nconst defaultItemList: GetList200Response = {\r\n listData: [],\r\n columns: [],\r\n pageNumber: 1,\r\n pageSize: 10,\r\n filters: null,\r\n listKeyModifier: \"\",\r\n sortBy: null,\r\n customColumns: null,\r\n resultsCount: 0,\r\n resetSorting: false,\r\n resetFiltering: false,\r\n resetColumns: false,\r\n errors: [],\r\n metadata: {},\r\n};\r\n\r\nconst defaultResponse = {\r\n id: -1,\r\n status: \"\",\r\n errors: [],\r\n};\r\n\r\nexport const buildGetReducer = (\r\n actionName: string,\r\n initialData: L\r\n): Reducer, any> => (\r\n state: GetState = { fetchStatus: \"noData\", data: initialData },\r\n action: Action\r\n): GetState =>\r\n produce(state, (draft) => {\r\n switch (action.type) {\r\n case \"FETCHING_\" + actionName:\r\n draft.fetchStatus = \"fetchingData\";\r\n break;\r\n case \"FETCHED_\" + actionName:\r\n draft.fetchStatus = \"fetchedData\";\r\n draft.data = action.payload.data;\r\n break;\r\n case \"ERROR_FETCH_\" + actionName:\r\n draft.fetchStatus = \"error\";\r\n draft.data = (initialData as unknown) as Draft;\r\n break;\r\n case \"RESET_FETCH_\" + actionName:\r\n case \"SIGN_OUT\":\r\n draft.fetchStatus = \"noData\";\r\n draft.data = (initialData as unknown) as Draft;\r\n break;\r\n }\r\n });\r\n\r\nexport const buildPostReducer = (\r\n actionName: string,\r\n initialData: L\r\n): Reducer => (\r\n state: PostState = {\r\n sendStatus: \"none\" as SendStatus,\r\n error: Nothing,\r\n response: initialData,\r\n },\r\n action: Action\r\n): PostState =>\r\n produce(state, (draft) => {\r\n switch (action.type) {\r\n case \"POST_\" + actionName:\r\n draft.sendStatus = \"sendingData\";\r\n break;\r\n case \"POSTED_\" + actionName:\r\n draft.sendStatus = \"sentData\";\r\n break;\r\n case \"ERROR_POST_\" + actionName:\r\n draft.sendStatus = \"error\";\r\n draft.error = Just(action.payload.data);\r\n break;\r\n case \"RESET_POST_\" + actionName:\r\n draft.sendStatus = \"none\";\r\n break;\r\n case \"SIGN_OUT\":\r\n draft.sendStatus = \"none\";\r\n draft.error = Nothing;\r\n break;\r\n }\r\n });\r\n\r\nexport const buildListReducer = (\r\n actionName: string\r\n): Reducer, any> => (\r\n state: ListState = {\r\n itemList: defaultItemList,\r\n fetchStatus: \"noData\" as FetchStatus,\r\n },\r\n action: Action\r\n): ListState =>\r\n produce(state, (draft) => {\r\n switch (action.type) {\r\n case \"LISTING_\" + actionName:\r\n draft.fetchStatus = \"fetchingData\";\r\n break;\r\n case \"LISTED_\" + actionName:\r\n draft.fetchStatus = \"fetchedData\";\r\n draft.itemList = action.payload.data;\r\n break;\r\n case \"ERROR_LIST_\" + actionName:\r\n draft.fetchStatus = \"error\";\r\n draft.itemList = (defaultItemList as unknown) as Draft<\r\n GetList200Response\r\n >;\r\n break;\r\n case \"RESET_LIST_\" + actionName:\r\n case \"SIGN_OUT\":\r\n draft.fetchStatus = \"noData\";\r\n draft.itemList = (defaultItemList as unknown) as Draft<\r\n GetList200Response\r\n >;\r\n break;\r\n }\r\n });\r\n\r\nexport const buildCreateReducer = (\r\n actionName: string\r\n): Reducer => (\r\n state: CreateState = {\r\n sendStatus: \"none\" as SendStatus,\r\n response: defaultResponse,\r\n },\r\n action: Action\r\n): CreateState =>\r\n produce(state, (draft) => {\r\n switch (action.type) {\r\n case \"CREATE_\" + actionName:\r\n draft.sendStatus = \"sendingData\";\r\n break;\r\n case \"CREATED_\" + actionName:\r\n draft.response = action.payload.data;\r\n if (action.payload.data.errors.length > 0) {\r\n draft.sendStatus = \"error\";\r\n draft.response = action.payload.data;\r\n } else {\r\n draft.sendStatus = \"sentData\";\r\n draft.response = action.payload.data;\r\n }\r\n break;\r\n case \"ERROR_CREATE_\" + actionName:\r\n draft.sendStatus = \"error\";\r\n break;\r\n case \"RESET_CREATE_\" + actionName:\r\n draft.sendStatus = \"none\";\r\n break;\r\n case \"SIGN_OUT\":\r\n draft.sendStatus = \"none\";\r\n draft.response = defaultResponse;\r\n break;\r\n }\r\n });\r\n\r\nexport const buildEditReducer = (\r\n actionName: string\r\n): Reducer => (\r\n state: EditState = {\r\n sendStatus: \"none\",\r\n response: defaultResponse,\r\n },\r\n action: Action\r\n): EditState =>\r\n produce(state, (draft) => {\r\n switch (action.type) {\r\n case \"EDITING_\" + actionName:\r\n draft.sendStatus = \"sendingData\";\r\n break;\r\n case \"EDITED_\" + actionName:\r\n draft.response = action.payload.data;\r\n if (action.payload.data.errors.length > 0) {\r\n draft.sendStatus = \"error\";\r\n } else {\r\n draft.sendStatus = \"sentData\";\r\n }\r\n break;\r\n case \"ERROR_EDIT_\" + actionName:\r\n draft.sendStatus = \"error\";\r\n break;\r\n case \"RESET_EDIT_\" + actionName:\r\n draft.sendStatus = \"none\";\r\n break;\r\n case \"SIGN_OUT\":\r\n draft.sendStatus = \"none\";\r\n draft.response = defaultResponse;\r\n break;\r\n }\r\n });\r\n\r\nexport const buildViewReducer = (\r\n actionName: string\r\n): Reducer, any> => (\r\n state: SelectByIdState = {\r\n items: [],\r\n fetchStatus: \"noData\",\r\n },\r\n action: Action\r\n) =>\r\n produce(state, (draft) => {\r\n switch (action.type) {\r\n case \"GETTING_BY_ID_\" + actionName:\r\n draft.fetchStatus = \"fetchingData\";\r\n break;\r\n case \"ERROR_GET_BY_ID_\" + actionName:\r\n draft.fetchStatus = \"error\";\r\n break;\r\n case \"GOT_BY_ID_\" + actionName:\r\n draft.fetchStatus = \"fetchedData\";\r\n selectCacheIndexFromItems(state.items, action.payload.data.id).caseOf({\r\n Just: (idx: number) => (draft.items[idx] = action.payload.data),\r\n Nothing: () =>\r\n (draft.items = draft.items.concat(action.payload.data) as Draft<\r\n I[]\r\n >),\r\n });\r\n break;\r\n case \"RESET_GET_BY_ID_\" + actionName:\r\n draft.fetchStatus = \"noData\";\r\n break;\r\n case \"EDITED_\" + actionName:\r\n selectCacheIndexFromItems(state.items, action.payload.data.id).caseOf({\r\n Just: (idx: number) => {\r\n draft.items = draft.items.filter(\r\n (user) => user.id !== action.payload.data.id\r\n ) as Draft;\r\n },\r\n Nothing: () => {},\r\n });\r\n break;\r\n case \"SIGN_OUT\":\r\n draft.fetchStatus = \"noData\";\r\n draft.items = [] as Draft;\r\n break;\r\n }\r\n });\r\n\r\nexport const buildDeleteReducer = (\r\n actionName: string\r\n): Reducer => (\r\n state: DeleteState = {\r\n sendStatus: \"none\",\r\n response: defaultResponse,\r\n },\r\n action: Action\r\n): DeleteState =>\r\n produce(state, (draft) => {\r\n switch (action.type) {\r\n case \"DELETING_\" + actionName:\r\n draft.sendStatus = \"sendingData\";\r\n break;\r\n case \"ERROR_DELETE_\" + actionName:\r\n draft.sendStatus = \"error\";\r\n break;\r\n case \"DELETED_\" + actionName:\r\n draft.response = action.payload.data;\r\n if (action.payload.data.errors.length > 0) {\r\n draft.sendStatus = \"error\";\r\n } else {\r\n draft.sendStatus = \"sentData\";\r\n }\r\n break;\r\n case \"RESET_DELETE_\" + actionName:\r\n draft.sendStatus = \"none\";\r\n break;\r\n case \"SIGN_OUT\":\r\n draft.sendStatus = \"none\";\r\n draft.response = defaultResponse;\r\n break;\r\n }\r\n });\r\n","import {\r\n GetState,\r\n ListState,\r\n CreateState,\r\n PostState,\r\n} from \"../types/ReducerTypes\";\r\nimport { Reducer } from \"redux\";\r\nimport {\r\n buildGetReducer,\r\n buildListReducer,\r\n buildCreateReducer,\r\n buildPostReducer,\r\n} from \"./reducers\";\r\nimport { Params } from \"../types/ApiSubmissionTypes\";\r\nimport api from \"api\";\r\nimport { Dispatch } from \"redux\";\r\nimport { AnyAction as Action } from \"redux\";\r\n\r\n// -- Get --\r\n\r\n// Need to explicitly define this tuple type, because otherwise\r\n// Typescript thinks it's an array, and everything breaks.\r\ntype SpecialGetActions = [(params?: Params) => any, Reducer>];\r\n\r\nexport const tGetActions = (\r\n name: string,\r\n url: string,\r\n initialState: S\r\n) => {\r\n const get = (params?: Params) => {\r\n return (dispatch: Dispatch) => {\r\n dispatch(getting());\r\n return api\r\n .get(url, { params })\r\n .then((r: any) => dispatch(successGet(r)))\r\n .catch((e: E) => dispatch(errorGet(e)));\r\n };\r\n };\r\n\r\n const getting = (): Action => ({\r\n type: \"FETCHING_\" + name,\r\n payload: {},\r\n });\r\n\r\n const successGet = (payload: R): Action => ({\r\n type: \"FETCHED_\" + name,\r\n payload,\r\n });\r\n\r\n const errorGet = (payload: E): Action => ({\r\n type: \"ERROR_FETCH_\" + name,\r\n payload,\r\n });\r\n\r\n return [get, buildGetReducer(name, initialState)] as SpecialGetActions;\r\n};\r\n\r\n// -- List --\r\ntype ThunkListActions = [(params?: Params) => any, Reducer>];\r\n\r\nexport const tListActions = (name: string, url: string) => {\r\n const get = (params?: Params) => {\r\n return (dispatch: Dispatch) => {\r\n dispatch(getting());\r\n return api\r\n .get(url, { params })\r\n .then((r: any) => dispatch(successGet(r)))\r\n .catch((e: E) => dispatch(errorGet(e)));\r\n };\r\n };\r\n\r\n const getting = (): Action => ({\r\n type: \"LISTING_\" + name,\r\n payload: {},\r\n });\r\n\r\n const successGet = (payload: R): Action => ({\r\n type: \"LISTED_\" + name,\r\n payload,\r\n });\r\n\r\n const errorGet = (payload: E): Action => ({\r\n type: \"ERROR_LIST_\" + name,\r\n payload,\r\n });\r\n\r\n return [get, buildListReducer(name)] as ThunkListActions;\r\n};\r\n\r\n// -- Post Actions --\r\ntype ThunkPostActions = [\r\n (data: T, params?: Params) => any,\r\n Reducer\r\n];\r\n\r\nexport const tPostActions = (\r\n name: string,\r\n url: string,\r\n initialData: R\r\n) => {\r\n const post = (data: T, params?: Params) => {\r\n return (dispatch: Dispatch) => {\r\n dispatch(posting());\r\n return api\r\n .post(url, data, { params })\r\n .then((r: any) => dispatch(successPost(r)))\r\n .catch((e: E) => dispatch(errorPost(e)));\r\n };\r\n };\r\n\r\n const posting = (): Action => ({\r\n type: \"POSTING_\" + name,\r\n payload: {},\r\n });\r\n\r\n const successPost = (payload: R): Action => ({\r\n type: \"POSTED_\" + name,\r\n payload,\r\n });\r\n\r\n const errorPost = (payload: E): Action => ({\r\n type: \"ERROR_POST_\" + name,\r\n payload,\r\n });\r\n\r\n return [post, buildPostReducer(name, initialData)] as ThunkPostActions<\r\n T,\r\n R,\r\n E\r\n >;\r\n};\r\n\r\n// -- Create --\r\n\r\ntype ThunkCreateActions = [\r\n (data: T, params?: Params) => any,\r\n Reducer\r\n];\r\n\r\nexport const tCreateActions = (name: string, url: string) => {\r\n const post = (data: T, params?: Params) => {\r\n return (dispatch: Dispatch) => {\r\n dispatch(posting());\r\n return api\r\n .post(url, data, { params })\r\n .then((r: any) => dispatch(successPost(r)))\r\n .catch((e: E) => dispatch(errorPost(e)));\r\n };\r\n };\r\n\r\n const posting = (): Action => ({\r\n type: \"CREATING_\" + name,\r\n payload: {},\r\n });\r\n\r\n const successPost = (payload: R): Action => ({\r\n type: \"CREATED_\" + name,\r\n payload,\r\n });\r\n\r\n const errorPost = (payload: E): Action => ({\r\n type: \"ERROR_CREATE_\" + name,\r\n payload,\r\n });\r\n\r\n return [post, buildCreateReducer(name)] as ThunkCreateActions;\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"tutorial\":\"Tutorial_tutorial__e08Nn\",\"imageTooltip\":\"Tutorial_imageTooltip__1QoHs\",\"annotatedImage\":\"Tutorial_annotatedImage__1ofBN\",\"tutorialSlide\":\"Tutorial_tutorialSlide__VMU3Y\",\"tooltipContent\":\"Tutorial_tooltipContent__2IyCE\",\"tooltipCloseIcon\":\"Tutorial_tooltipCloseIcon__2NTX6\",\"progressBar\":\"Tutorial_progressBar__3q7Jf\",\"navButtons\":\"Tutorial_navButtons__2J0ct\",\"nextButton\":\"Tutorial_nextButton__1wqap\",\"skipButton\":\"Tutorial_skipButton__2brl1\"};","// eslint-disable-next-line\r\nimport React from \"react\";\r\nimport styled from \"theme\";\r\nimport SubmissionButton from \"components/FormComponents/SubmissionButton\";\r\nimport css from \"@emotion/css/macro\";\r\n\r\nconst btn = css`\r\n border-radius: 4px;\r\n font-family: \"Nunito\", sans-serif;\r\n font-size: 14px;\r\n padding: 13.5px 20px;\r\n color: #fff;\r\n font-weight: 700;\r\n text-align: center;\r\n border: none;\r\n text-transform: uppercase;\r\n cursor: pointer;\r\n transition: background-color 0.2s ease-in-out;\r\n\r\n &:disabled {\r\n background-color: #c2c2c2 !important;\r\n color: white !important;\r\n cursor: auto;\r\n }\r\n`;\r\n\r\ntype Variety = \"first\" | \"second\" | \"third\" | \"fourth\" | \"skinny\" | \"outline\";\r\n\r\ntype ButtonProps = { variety?: Variety };\r\n\r\nexport const Button = styled.button`\r\n ${btn}\r\n ${props => {\r\n if (props.variety === \"skinny\" || props.variety === \"outline\") {\r\n return css`\r\n background-color: inherit;\r\n color: ${props.theme.colors.fourth};\r\n text-transform: none;\r\n font-size: 14px;\r\n\r\n &:disabled {\r\n background-color: inherit !important;\r\n color: lightgray !important;\r\n }\r\n\r\n &:hover {\r\n background-color: inherit;\r\n color: ${props.theme.colors.fourth};\r\n }\r\n `;\r\n }\r\n\r\n return css`\r\n background-color: ${props.variety == null\r\n ? props.theme.colors.fourth\r\n : props.theme.colors[props.variety]}};\r\n `;\r\n }}\r\n\r\n ${props =>\r\n props.variety === \"outline\"\r\n ? css`\r\n border: 1px solid ${props.theme.colors.fourth};\r\n `\r\n : \"\"}\r\n`;\r\n\r\nexport const FirstButton = styled.button`\r\n ${btn}\r\n background-color: ${props => props.theme.colors.fourth};\r\n`;\r\n\r\nexport const FourthButton = styled.button`\r\n ${btn}\r\n background-color: ${props => props.theme.colors.fourth};\r\n &:hover {\r\n background-color: #b5b308;\r\n color: black;\r\n }\r\n`;\r\n\r\nexport const FourthSubmissionButton = styled(SubmissionButton)`\r\n ${btn}\r\n background-color: ${props => props.theme.colors.fourth};\r\n &:hover {\r\n background-color: white;\r\n color: black;\r\n }\r\n`;\r\n\r\nexport const DateButton = styled.button`\r\n background: inherit;\r\n border: none;\r\n cursor: pointer;\r\n color: ${props => props.theme.colors.fourth};\r\n font-family: \"Nunito Sans\", sans-serif;\r\n`;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"ColumnCustomiser_container__K_oEX\",\"item\":\"ColumnCustomiser_item__281dD\",\"itemContents\":\"ColumnCustomiser_itemContents__24tnJ\",\"dragHandle\":\"ColumnCustomiser_dragHandle__14YRZ\",\"invisible\":\"ColumnCustomiser_invisible__2VdDf\",\"draggedItem\":\"ColumnCustomiser_draggedItem__3xeOV\",\"lockedItem\":\"ColumnCustomiser_lockedItem__3Mm_J\",\"allItems\":\"ColumnCustomiser_allItems__3drJh\",\"buttons\":\"ColumnCustomiser_buttons__2GkDB\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"FullBackground\":\"SignInPage_FullBackground__34GA_\",\"Table\":\"SignInPage_Table__15kLd\",\"TopRow\":\"SignInPage_TopRow__30xgk\",\"MiddleRow\":\"SignInPage_MiddleRow__3689-\",\"BottomRow\":\"SignInPage_BottomRow__1wx9_\",\"Cell\":\"SignInPage_Cell__1Oies\",\"TopBlock\":\"SignInPage_TopBlock__2LHqH\",\"TopText\":\"SignInPage_TopText__2ulba\",\"TopImg\":\"SignInPage_TopImg__AO3iS\"};","import React from \"react\";\r\nimport styles from \"./Loading.module.css\";\r\nimport Spinner from \"react-spinkit\";\r\nimport { useTranslation } from \"react-i18next\";\r\nimport classNames from \"classnames\";\r\n\r\ntype LoadingProps = {\r\n inModal?: boolean;\r\n};\r\n\r\nexport const Loading: React.FC = ({ inModal }) => {\r\n return inModal ? (\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n ) : (\r\n \r\n
\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nexport function ErrorMessage({\r\n callback,\r\n pending,\r\n}: {\r\n callback?: () => void;\r\n pending?: boolean;\r\n}) {\r\n const { t } = useTranslation(\"error\");\r\n return (\r\n \r\n
\r\n

{t(\"somethingWrong\")}

\r\n
\r\n {callback && }\r\n {pending && {t(\"loading\")}}\r\n
\r\n
\r\n
\r\n );\r\n}\r\n","module.exports = __webpack_public_path__ + \"static/media/close.9ef8c140.svg\";","var map = {\n\t\"./tooltip-dark.svg\": 585,\n\t\"./tooltip.svg\": 972\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 971;","module.exports = __webpack_public_path__ + \"static/media/tooltip.bde1648a.svg\";"],"sourceRoot":""}