{"version":3,"sources":["constants/Routes.ts","components/common/vertical-divider/VerticalDivider.tsx","constants/ServiceUrls.ts","constants/SessionStorageKeys.ts","config/EnvironmentUrls.ts","errors/FetchError.ts","errors/UnauthorizedError.ts","services/SessionStorageService.ts","services/BaseService.ts","constants/ApiRoutes.ts","services/prediction/PredictionService.ts","models/prediction/enums/EStrategyName.ts","services/helpers/NumbersHelper.ts","stores/prediction/datamodels/PredictionSummary.ts","stores/prediction/datamodels/PredictionSettings.ts","stores/prediction/datamodels/PredictionGridModel.ts","stores/prediction/datamodels/MapPoint.ts","constants/ErrorMessages.ts","stores/UIStore.ts","stores/prediction/datamodels/GridFilterOptions.ts","stores/prediction/PredictionStore.ts","constants/LocalStorageKeys.ts","services/users/UserService.ts","services/LocalStorageService.ts","stores/user/UserStore.ts","stores/RootStore.ts","stores/RootStoreContext.tsx","assets/images/Veritone-logos.svg","assets/images/Veritone_icon.svg","components/common/header/Header.tsx","components/common/footer/Footer.tsx","hoc/AuthorizedRoute.tsx","hooks/useKeyboardListener.tsx","services/Guid.ts","components/common/inputs/input/Input.tsx","models/authorization/UserAuthorizationRequest.ts","services/StringHelper.ts","components/common/feedback/loader/PL-Loader-dark-blue-small.gif","components/common/feedback/loader/Loader.tsx","models/prediction/UserPredictionRequest.ts","hooks/useLoadUserIfSaved.tsx","components/login-page/LoginPage.tsx","assets/images/ppr-background.jpg","components/input-page/InputPage.styles.tsx","hooks/useOnLoadAsync.tsx","hooks/useSetCurrentPage.tsx","components/common/inputs/auto-complete-input/AutoCompleteInput.tsx","components/input-page/components/auto-optimize-switch/AutoOptimizeSwitch.tsx","components/input-page/InputPage.builder.tsx","components/input-page/InputPage.tsx","components/common/horizontal-divider/HorizontalDivider.tsx","components/predictions-page/components/information-box/InformationBox.tsx","components/predictions-page/PredictionPage.styles.tsx","components/predictions-page/components/campaign-strategy/CampaignStrategy.styles.tsx","components/predictions-page/components/layout-top-section-column/LayoutTopSectionColumn.tsx","components/predictions-page/components/campaign-strategy/CampaignStrategy.tsx","components/predictions-page/components/report-details/ReportDetails.styles.tsx","components/predictions-page/components/report-details/ReportDetails.tsx","components/predictions-page/components/jobs-map/components/LocationPopup.factory.tsx","components/predictions-page/components/jobs-map/components/LocationPopup.tsx","components/predictions-page/components/jobs-map/JobsMap.tsx","components/predictions-page/components/jobs-map/JobsMap.factory.tsx","models/users/User.ts","components/predictions-page/components/settings-tab/Settings.styles.tsx","components/predictions-page/components/settings-tab/SettingsRules.ts","components/predictions-page/components/settings-tab/Settings.tsx","components/predictions-page/components/jobs-grid/gridColumns.ts","components/predictions-page/components/jobs-grid/JobsGrid.jsx","services/FileDownloader.ts","models/prediction/UserFilterResult.ts","models/prediction/CreateExcelFromBatchRequest.ts","components/predictions-page/PredictionPage.tsx","assets/images/file-download-x.png","assets/images/ppr-admin-background.jpg","components/admin-preload-page/AdminPreloadPage.styles.tsx","models/prediction/PreloadRequest.ts","services/account/AccountService.ts","components/admin-preload-page/AdminPreloadPage.builder.tsx","services/input-validator/IInputValidator.ts","components/admin-preload-page/AdminPreloadRule.ts","services/input-validator/BaseInputValidator.ts","components/admin-preload-page/AdminPreloadPage.tsx","config/RouteSetup.ts","App.tsx","reportWebVitals.ts","config/MuiTheme.ts","index.tsx"],"names":["Routes","VerticalDivider","props","height","mx","Box","className","style","ServiceUrls","SessionStorageKeys","ProdEnvironment","baseApiUrl","basePath","getEnvironment","FetchError","axiosResponse","data","Error","UnauthorizedError","SessionStorageService","key","value","window","sessionStorage","setItem","JSON","stringify","getItem","parse","removeItem","BaseService","relativeControllerPath","urls","this","relativeUrl","axios","get","buildUrl","headers","MakeHeaders","response","IsSuccessfulResponse","console","error","status","payload","isArrayBufferResponseType","options","post","patch","put","delete","Authorization","JwtToken","ApiRoutes","Predictions","PreloadAccount","GetPrediction","GetListOfReadyAccount","CreateExcelFromPredictions","AuditPredictions","PredictionBatchUpload","CreateExcelFromBatch","Account","GetAllAccounts","EStrategyName","preloadRequest","a","result","predictionRequest","jobPredictions","accounts","auditRequest","userFilterResult","batchRequest","excelURL","Prediction","NumbersHelper","num","toString","replace","formattedNumber","Number","replaceAll","isNaN","decimalPoints","Math","round","multiplier","pow","toFixed","PredictionSummary","clicks","applicants","cvr","budget","averageCpa","averageCpc","jobsAmount","hires","cvh","averageCph","conversionRate","budgetLowRange","averageCpcLowRange","averageCpaLowRange","averageCphLowRange","numberWithCommas","lowRangeFactor","PredictionSettings","predictionDuration","PredictionGridModel","jobId","jobTitle","externalApplyUrl","city","state","category","clickRange","demandFactor","supplyFactor","competition","lat","long","cpc","cpa","location","MapPoint","latitude","longitude","totaljobs","totalLowCompetition","totalHighCompetition","totalApplicants","totalMediumCompetition","competitionCategory","maxJobsInSomeCompetitionCategory","max","getCompetitionCategory","ErrorMessages","TokenExpired","PredictionResultNull","Page","GridFilterOptions","filteredPredictionsIdMap","agGridFilterModel","useOldFilter","PredictionStore","userStore","goalText","makeObservable","account","goalType","autoOptimize","_predictionResultPaginationIndex","_predictions","predictionResult","MakeAuthorizedHttpRequest","PredictionService","_predictionResult","predictions","paginationIndex","userPredictionRequest","activeCampaignStrategy","appliedStrategy","filteredPredictions","messageForUser","message","warning","GetListOfReadyAccounts","users","strategyOption","gridFilterOptions","setUseOldFilterAs","settings","predictionSettings","includedPredictionsAfterFilter","filter","prediction","defaultPredictionSettings","_clicks","_applicants","_budget","_baseApplicants","forEach","predictionFactors","GetPredictionGenericFactors","applicantsFactor","cpaFactor","durationFactor","GetFactorForPredictionDuration","_cvr","_cvh","_hires","_scaledClicks","IsCvrInputGiven","predictionSummary","SetDefaultPredictionSettings","jobsGroupedByLocation","reduce","groupedDict","current","cityText","stateShortText","push","jobs","n","length","totalLatitude","totalLongitude","job","toLowerCase","pointOnMap","undefined","MapPredictionsToGridData","HighBid","highBidsAppsFactor","highBidsCPAFactor","Expansions","expansionsAppsFactor","expansionsCPAFactor","HighBidAndExpansions","highBidsAndExpansionsAppsFactor","highBidsAndExpansionsCPAFactor","Normal","duration","Round","jobDetails","extJobTitleText","externalApplyURL","CalculateClickRange","observable","action","computed","LocalStorageKeys","UIStore","page","currentPage","applicationLoader","request","User","LocalStorageService","localStorage","UserStore","UserService","Authorize","authorizationResponse","SetUserAndToken","token","securityToken","user","httpRequest","AuthorizedResponse","RootStore","predictionStore","uiStore","RootStoreContext","createContext","RootStoreProvider","children","Provider","HeaderIcon","text","onClick","icon","display","justifyContent","component","alignItems","withRouter","observer","history","useContext","cursorPointerIfLoggedIn","styles","id","data-about","py","px","objectFit","src","veritoneLogo","alt","marginLeft","InputPage","fontSize","transform","AdminPreload","open","veritoneSvg","Login","PredictionPage","position","bottom","opacity","Date","getFullYear","href","target","routeProps","to","pathname","useKeyboardListener","pattern","callBack","useEffect","functionReference","callback","event","baseArray","subArray","join","startsWith","isSubArrayContainedInArray","keyboardListenerHandler","addEventListener","removeEventListener","Guid","uuidv4","Input","onChange","valueSetter","onEnterPress","placeholder","Icon","disabled","type","useState","focused","setFocused","TextField","fullWidth","e","newValue","onKeyDown","onFocus","onBlur","variant","label","UserAuthorizationRequest","email","password","StringHelper","toUpperCase","substr","test","String","Loader","EPredictionType","pandoLoader","useLoadUserIfSaved","setApplicationLoader","useStyles","makeStyles","theme","paper","marginTop","spacing","flexDirection","background","palette","padding","borderRadius","width","boxShadow","avatar","margin","backgroundColor","primary","main","form","submit","bgGradient","top","left","right","backgroundImage","zIndex","classes","setEmail","setPassword","rememberMe","setRememberMe","loader","setLoader","handleSubmit","preventDefault","validateEmail","authorizationRequest","AuthorizeUser","success","name","mt","Container","maxWidth","Avatar","Typography","noValidate","onSubmit","FormControlLabel","control","Checkbox","checked","color","Button","pprBg","backgroundRepeat","backgroundSize","paperWrapper","maxHeight","paddingLeft","paddingTop","minHeight","pprTitle","fontFamily","fontWeight","letterSpacing","lineHeight","subTitle","marginBottom","or","clearButton","textTransform","useOnLoadAsync","UserPredictionRequest","accountId","predictionType","amount","useSetCurrentPage","useLocation","setCurrentPage","getOptionCb","filterOptions","Autocomplete","_","getOptionLabel","option","renderInput","params","AutoOptimizeSwitch","setAutoOptimize","htmlFor","InputPageBuilder","title","readyAccounts","selectedAccount","setSelectedAccount","loading","my","v","accountName","setBudget","setApplicants","setGoalType","handleChange","Radio","substring","handleClear","textAlign","useSnackbar","enqueueSnackbar","closeSnackbar","setReadyAccounts","setLoading","calculateInitialState","forType","Budget","Applicants","NoRequest","getPredictionsAndBuildState","NewGuid","builder","Paper","elevation","Title","AccountNameAutocompleteInput","GoalSettingSection","ButtonsSection","HorizontalDivider","noteText","mr","flexGrow","p","map","res","i","finalValue","prefix","postfix","explanation","placement","renderData","whiteSection","actionButton","accountTitle","whiteSpace","overflow","textOverflow","button","buttonActive","LayoutTopSectionColumn","padLeft","ml","blockStrategyChange","setBlockStrategyChange","biddingStrategy","setBiddingStrategy","jobExpansionStrategy","setJobExpansionStrategy","isStrategyActive","strategy","strategyText","onChangeStrategy","warn","SetActiveCampaignStrategy","setTimeout","ButtonGroup","aria-label","blackIcon","dateSelect","dateDiv","breakpoints","down","moment","format","PopupContentRow","content","point","selectedJob","setSelectedJob","onClose","colorsDictionary","Low","Medium","High","React","memo","getJobsDisplayedOnMap","onIconClick","zoom","viewport","setViewport","mapData","useMemo","GetJobsDisplayedOnMap","mapboxApiAccessToken","mapStyle","onViewportChange","index","cursor","min","mapboxgl","workerClass","require","default","EGrantType","resetButton","borderColor","pointerEvents","SettingsRules","isNumber","_initialCvr","_initialCvh","setCvr","setCvh","setDuration","settingsRules","Select","_duration","MenuItem","isValidInput","isValid","severity","errorMessage","SetPredictionSettings","info","forElement","appendClassName","_className","getClassName","gridColumns","groupName","groupData","field","headerName","properties","cellClass","onCellClicked","headerClass","valueFormatter","createGrid","group","createGridGroup","groupColumns","columnData","gridRef","useRef","competitionScoreChartRef","clickRangeChartRef","gridData","setGridData","createCompetitionScoreChart","withDestroy","destroyChart","competitionScoreChart","cellRange","columns","chartType","chartContainer","document","querySelector","aggFunc","chartThemeOverrides","common","tooltipClass","api","createRangeChart","createClickRangeChart","clickRangeChart","GetGridData","ref","rowData","defaultColDef","sortable","resizable","suppressMovable","animateRows","pagination","paginationPageSize","enableRangeSelection","enableCharts","context","sideBar","toolPanels","labelDefault","labelKey","iconKey","toolPanel","chartThemes","customChartThemes","myCustomTheme","baseTheme","fills","strokes","overrides","enabled","paddingY","texAlign","legend","item","fontStyle","onGridReady","sizeColumnsToFit","onFilterChanged","Object","keys","column","columnInstance","getFilterInstance","setModel","applyModel","filterModel","getFilterModel","forEachNodeAfterFilter","rowNode","SetFilteredPredictions","setGridFilterOptions","bar","series","fillOpacity","strokeOpacity","strokeWidth","shadow","xOffset","yOffset","blur","highlightStyle","fill","stroke","histogram","autoSizePadding","onFirstDataRendered","deselectAll","clearRangeSelection","FileDownloader","base64string","fileName","byteCharacters","atob","byteNumbers","Array","charCodeAt","byteArray","Uint8Array","DownloadFromBytes","blob","Blob","DownloadFromBlob","url","URL","createObjectURL","link","createElement","setAttribute","body","appendChild","click","UserFilterResult","batchId","strategyName","durationInDays","CreateExcelFromBatchRequest","isExcelDownloadInProcess","setIsExcelDownloadInProcess","fullList","displayRange","leftNumber","rightNumber","returnNumberOrDashIfNaN","valueNormalized","downloadExcelHandler","GetPredictionSummary","predictionsGridData","summaryModel","activeStrategy","batchSize","predictionsArrayLength","batchGuid","batchEndIndex","predictionsBatch","slice","createExcelFromBatchRequest","createPredictionsExcelResponse","creationDate","getUTCFullYear","getUTCMonth","getUTCDate","marginPct","excelUrl","responseType","excelBlob","startIcon","tasks","Promise","all","mb","toTitleCase","backgroundPosition","PreloadRequest","userId","areExpansionsExcluded","AdminPreloadPageBuilder","accountList","setAccount","includes","inputValue","setMargin","setAreExpansionsExcluded","ValidatorResponse","AdminPreloadRule","requestParams","validatorResponse","inputDefaultValues","setAccountList","ruleValidator","notifyError","AccountService","AccountAutocompleteInput","eGrantType","Admin","CheckBox","Buttons","RouteConfiguration","path","reactComponent","isAuthorizedRoute","RouteSetup","LoginPage","AdminPreloadPage","withStyles","variantInfo","SnackbarProvider","split","alert","ApplicationRoutes","GetRouteConfiguration","routeConfiguration","exact","maxSnack","anchorOrigin","vertical","horizontal","TransitionComponent","Slide","basename","reportWebVitals","onPerfEntry","Function","then","getCLS","getFID","getFCP","getLCP","getTTFB","MuiLightTheme","createMuiTheme","secondary","typography","LicenseManager","setLicenseKey","process","REACT_APP_AG_GRID_TOKEN","ReactDOM","render","StrictMode","ThemeProvider","CssBaseline","getElementById"],"mappings":"ubAAYA,E,sHCyBGC,EAjBS,SAACC,GAAkB,IAC/BC,EAAeD,EAAfC,OAAQC,EAAOF,EAAPE,GAOhB,OACI,cAACC,EAAA,EAAD,CAAKD,GAAE,OAAEA,QAAF,IAAEA,IAAM,EAAf,SACI,uBACIE,UAAU,2BACVC,MATHJ,EACE,CACHA,OAAQA,GAFQ,S,SDXhBH,K,eAAAA,E,cAAAA,E,6BAAAA,E,uBAAAA,M,SEAAQ,E,2KAAAA,K,wBAAAA,E,kBAAAA,E,aAAAA,M,SCAAC,E,kBCeNC,E,sCAEFC,WAAqB,kE,KACrBC,SAAmB,IAIhB,SAASC,IAGJ,OAAO,IAAIH,G,SDzBXD,K,sBAAAA,M,kBEGCK,EAAb,kDAIE,WAAYC,GAAkC,iDACnCA,EAAcC,OAL3B,sBAAmCC,QCAtBC,EAAb,kDAIE,aAAe,oEAJjB,sBAAuCD,QCH1BE,EAAb,4FACI,SAAyBC,EAAaC,GAClCC,OAAOC,eAAeC,QAAQJ,EAAKK,KAAKC,UAAUL,MAF1D,qBAKI,SAAyBD,GACrB,IAAMC,EAAQC,OAAOC,eAAeI,QAAQP,GAC5C,OAAKC,EAEGI,KAAKG,MAAMP,GAFA,KAP3B,wBAYI,SAAyBD,GACrBE,OAAOC,eAAeM,WAAWT,OAbzC,KCOsBU,EAAtB,WAII,WAAYC,GAAiC,yBAHnCC,UAGkC,OAFpCD,4BAEoC,EACxCE,KAAKD,KAAOnB,IACZoB,KAAKF,uBAAyBA,EANtC,8EAUI,WAAuBG,GAAvB,gGAEiDC,IAAMC,IA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/M,SAASgN,eAAe,SAM5BtB,O","file":"static/js/main.e4d3b9a0.chunk.js","sourcesContent":["export enum Routes {\r\n Login = \"/login\",\r\n InputPage = \"/\",\r\n PredictionPage = \"/prediction\",\r\n AdminPreload = \"/admin\"\r\n}","import \"./VerticalDivider.scss\";\r\nimport { Box } from \"@material-ui/core\";\r\n\r\ninterface Props {\r\n height?: string;\r\n mx?: number;\r\n}\r\n\r\nconst VerticalDivider = (props: Props) => {\r\n const { height, mx } = props;\r\n const createStyles = () => {\r\n if (!height) return {};\r\n return {\r\n height: height,\r\n };\r\n };\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default VerticalDivider;\r\n","export enum ServiceUrls {\r\n Prediction = \"Prediction\",\r\n Account = \"Account\",\r\n User = \"User\"\r\n}","export enum SessionStorageKeys {\r\n JwtToken = \"jwt_token\",\r\n}","export interface IEnvironment {\r\n baseApiUrl: string;\r\n basePath: string;\r\n}\r\n\r\nclass DevEnvironment implements IEnvironment {\r\n baseApiUrl: string = \"http://localhost:5000/api\";\r\n basePath: string = \"\";\r\n}\r\n\r\nclass QAEnvironment implements IEnvironment {\r\n baseApiUrl: string = \"https://ne9go5hvf0.execute-api.us-east-1.amazonaws.com/Prod/api\";\r\n basePath: string = \"\";\r\n}\r\n\r\nclass ProdEnvironment implements IEnvironment {\r\n // baseApiUrl: string = \"http://campaignmanager.pandoiq.com/ppr-api/api\";\r\n baseApiUrl: string = \"https://mwx9zuzttk.execute-api.us-east-1.amazonaws.com/Prod/api\";\r\n basePath: string = \"\";\r\n}\r\n\r\n\r\nexport function getEnvironment(): IEnvironment {\r\n switch (process.env.REACT_APP_ENV) {\r\n case \"prod\":\r\n return new ProdEnvironment();\r\n case \"qa\":\r\n return new QAEnvironment();\r\n case \"dev\":\r\n default:\r\n return new DevEnvironment();\r\n }\r\n}","import { AxiosResponse } from \"axios\";\r\nimport { inherits } from \"util\";\r\n\r\nexport class FetchError extends Error {\r\n /**\r\n *\r\n */\r\n constructor(axiosResponse: AxiosResponse) {\r\n super(`${axiosResponse.data}`);\r\n \r\n }\r\n}","import { AxiosResponse } from \"axios\";\r\nimport { inherits } from \"util\";\r\n\r\nexport class UnauthorizedError extends Error {\r\n /**\r\n *\r\n */\r\n constructor() {\r\n super(`Unauthorized http request`);\r\n \r\n }\r\n}","export class SessionStorageService {\r\n public static setItem(key: string, value: T) {\r\n window.sessionStorage.setItem(key, JSON.stringify(value));\r\n }\r\n\r\n public static getItem(key: string): T | \"\" {\r\n const value = window.sessionStorage.getItem(key);\r\n if (!value) return \"\";\r\n\r\n return (JSON.parse(value)) as T;\r\n }\r\n\r\n public static removeItem(key: string) {\r\n window.sessionStorage.removeItem(key);\r\n }\r\n}","import axios, { AxiosResponse } from \"axios\";\r\nimport { getEnvironment, IEnvironment } from \"../config/EnvironmentUrls\";\r\nimport { SessionStorageKeys } from \"../constants/SessionStorageKeys\";\r\nimport { FetchError } from \"../errors/FetchError\";\r\nimport { UnauthorizedError } from './../errors/UnauthorizedError';\r\nimport { SessionStorageService } from './SessionStorageService';\r\n\r\nexport abstract class BaseService {\r\n protected urls: IEnvironment;\r\n private relativeControllerPath: string;\r\n\r\n constructor(relativeControllerPath: string) {\r\n this.urls = getEnvironment();\r\n this.relativeControllerPath = relativeControllerPath;\r\n\r\n }\r\n\r\n protected async get(relativeUrl: string): Promise {\r\n try {\r\n const response: AxiosResponse = await axios.get(this.buildUrl(relativeUrl), {\r\n headers: { ...this.MakeHeaders() }\r\n });\r\n if (this.IsSuccessfulResponse(response)) {\r\n return response.data;\r\n }\r\n throw new FetchError(response);\r\n }\r\n catch (error) {\r\n console.error(error.response);\r\n if (error.response.status === 401) {\r\n throw new UnauthorizedError();\r\n }\r\n\r\n throw new FetchError(error.response);\r\n }\r\n\r\n }\r\n\r\n protected async post(relativeUrl: string, payload: object, isArrayBufferResponseType: boolean = false): Promise {\r\n const headers = {\r\n 'Content-Type': 'application/json',\r\n };\r\n\r\n let options: any = {}\r\n options['headers'] = { ...headers, ...this.MakeHeaders() }\r\n if (isArrayBufferResponseType) {\r\n options['responseType'] = 'arraybuffer'\r\n }\r\n\r\n try {\r\n const response: AxiosResponse = await axios.post(this.buildUrl(relativeUrl), payload, {\r\n // headers: {\r\n // ...headers, ...this.MakeHeaders()\r\n // },\r\n ...options,\r\n });\r\n if (this.IsSuccessfulResponse(response)) {\r\n return response.data;\r\n }\r\n\r\n throw new FetchError(response);\r\n }\r\n catch (error) {\r\n console.error(error.response);\r\n\r\n if (error.response.status === 401) {\r\n throw new UnauthorizedError();\r\n }\r\n throw new FetchError(error.response);\r\n }\r\n\r\n }\r\n\r\n protected async patch(relativeUrl: string, payload: object): Promise {\r\n try {\r\n const response: AxiosResponse = await axios.patch(this.buildUrl(relativeUrl), payload, {\r\n headers: { ...this.MakeHeaders() }\r\n });\r\n if (this.IsSuccessfulResponse(response)) {\r\n return response.data;\r\n }\r\n\r\n throw new FetchError(response);\r\n }\r\n catch (error) {\r\n console.error(error.response);\r\n\r\n if (error.response.status === 401) {\r\n throw new UnauthorizedError();\r\n }\r\n throw new FetchError(error.response);\r\n }\r\n\r\n }\r\n\r\n protected async put(relativeUrl: string, payload: object): Promise {\r\n try {\r\n const response: AxiosResponse = await axios.put(this.buildUrl(relativeUrl), payload, {\r\n headers: { ...this.MakeHeaders() }\r\n });\r\n if (this.IsSuccessfulResponse(response)) {\r\n return response.data;\r\n }\r\n throw new FetchError(response);\r\n }\r\n catch (error) {\r\n console.error(error.response);\r\n\r\n if (error.response.status === 401) {\r\n throw new UnauthorizedError();\r\n }\r\n throw new FetchError(error.response);\r\n }\r\n\r\n }\r\n\r\n protected async delete(relativeUrl: string): Promise {\r\n try {\r\n const response: AxiosResponse = await axios.delete(this.buildUrl(relativeUrl), {\r\n headers: { ...this.MakeHeaders() }\r\n });\r\n if (this.IsSuccessfulResponse(response)) {\r\n return response.data;\r\n }\r\n throw new FetchError(response);\r\n }\r\n\r\n catch (error) {\r\n console.error(error.response);\r\n\r\n if (error.response.status === 401) {\r\n throw new UnauthorizedError();\r\n }\r\n throw new FetchError(error.response);\r\n }\r\n }\r\n\r\n private buildUrl(relativeUrl: string): string {\r\n return `${this.urls.baseApiUrl}/${this.relativeControllerPath}${relativeUrl}`;\r\n }\r\n\r\n private IsSuccessfulResponse(response: AxiosResponse): boolean {\r\n if (response.status >= 200 && response.status <= 226) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Makes headers for the application state\r\n */\r\n private MakeHeaders(): any {\r\n return {\r\n Authorization: `Bearer ${SessionStorageService.getItem(SessionStorageKeys.JwtToken)}`\r\n }\r\n }\r\n}","\r\n/**\r\n * Predictions API routes\r\n */\r\n class Predictions {\r\n public PreloadAccount = \"/pre-load\";\r\n public GetPrediction = \"/accountPrediction\";\r\n public GetListOfReadyAccount = \"/ready-accounts\";\r\n public CreateExcelFromPredictions = \"/create-excel\";\r\n public AuditPredictions = \"/audit-predictions\";\r\n public PredictionBatchUpload = \"/userFilter/uploadBatch\";\r\n public CreateExcelFromBatch = \"/userFilter/createExcelFromBatch\";\r\n}\r\n\r\n/**\r\n * Predictions API routes\r\n */\r\n class Account {\r\n public GetAllAccounts = \"/\";\r\n}\r\n\r\n\r\n\r\nexport class ApiRoutes {\r\n public static Predictions = new Predictions();\r\n public static Account = new Account();\r\n}\r\n\r\n","import { ServiceUrls } from \"../../constants/ServiceUrls\";\r\nimport { BaseService } from \"../BaseService\";\r\nimport { Account } from '../../models/Account';\r\nimport { UserPredictionRequest } from \"../../models/prediction/UserPredictionRequest\";\r\nimport { Prediction } from '../../models/prediction/Prediction';\r\nimport { PredictionResult } from \"../../models/prediction/PredictionResult\";\r\nimport { PreloadRequest } from './../../models/prediction/PreloadRequest';\r\nimport { CreatePredictionsExcelRequest } from './../../models/prediction/CreatePredictionsExcelRequest';\r\nimport { ApiRoutes } from \"../../constants/ApiRoutes\";\r\nimport { AuditPredictionRequest } from \"../../models/predictionsAudit/AuditPredictionRequest\";\r\nimport { CreatePredictionsExcelResponse } from './../../models/prediction/CreatePredictionsExcelResponse';\r\nimport { BaseResponse } from \"../../models/BaseResponse\";\r\nimport { UserFilterResult } from \"../../models/prediction/UserFilterResult\";\r\nimport { CreateExcelFromBatchRequest } from './../../models/prediction/CreateExcelFromBatchRequest';\r\n\r\nexport class PredictionService extends BaseService {\r\n\r\n async PreloadAccount(preloadRequest: PreloadRequest): Promise {\r\n const result = this.post(ApiRoutes.Predictions.PreloadAccount, preloadRequest);\r\n return result;\r\n }\r\n\r\n async GetPrediction(predictionRequest: UserPredictionRequest): Promise {\r\n const jobPredictions = this.post(ApiRoutes.Predictions.GetPrediction, predictionRequest);\r\n return jobPredictions;\r\n }\r\n\r\n async GetListOfReadyAccounts(): Promise {\r\n const accounts = this.get(ApiRoutes.Predictions.GetListOfReadyAccount);\r\n return accounts;\r\n }\r\n\r\n // async CreateExcelFromPredictions(excelRequest: CreatePredictionsExcelRequest): Promise {\r\n // const excelResponse = this.post(ApiRoutes.Predictions.CreateExcelFromPredictions, excelRequest);\r\n // return excelResponse;\r\n // }\r\n\r\n async AuditPredictions(auditRequest: AuditPredictionRequest): Promise {\r\n const result = this.post(ApiRoutes.Predictions.AuditPredictions, auditRequest);\r\n return result;\r\n }\r\n\r\n async PredictionBatchUpload(userFilterResult: UserFilterResult): Promise {\r\n const response = await this.post(ApiRoutes.Predictions.PredictionBatchUpload, userFilterResult);\r\n return response;\r\n }\r\n\r\n /**\r\n * @param batchId the BatchID\r\n * @returns excel URL as string\r\n */\r\n async CreateExcelFromBatch(batchRequest: CreateExcelFromBatchRequest): Promise {\r\n const excelURL = await this.post(ApiRoutes.Predictions.CreateExcelFromBatch, batchRequest);\r\n return excelURL;\r\n }\r\n\r\n}\r\n\r\nexport default new PredictionService(ServiceUrls.Prediction);","\r\n\r\nexport enum EStrategyName {\r\n Normal,\r\n HighBid,\r\n Expansions,\r\n HighBidAndExpansions\r\n}\r\n","\r\nexport class NumbersHelper {\r\n\r\n public static numberWithCommas(num: number | string): string {\r\n return num.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\r\n }\r\n\r\n public static stripCommas(formattedNumber: string): number {\r\n return Number(formattedNumber.replace(\",\", \"\"));\r\n }\r\n\r\n public static isNumber(value: string): boolean {\r\n if (value === \"\") return false;\r\n value = value.replaceAll(\",\", \"\");\r\n\r\n try {\r\n return !isNaN(Number(value));\r\n }\r\n catch {\r\n return false;\r\n }\r\n }\r\n\r\n public static Round(value: number, decimalPoints: number): number {\r\n if (decimalPoints === 0) {\r\n return Math.round(value);\r\n }\r\n\r\n const multiplier = Math.pow(10, decimalPoints);\r\n return Math.round(value * multiplier) / multiplier;\r\n }\r\n\r\n public static toFixed(value: number, decimalPoints: number): number {\r\n return Number(value.toFixed(decimalPoints));\r\n }\r\n}","import { NumbersHelper } from '../../../services/helpers/NumbersHelper';\r\n\r\n\r\n\r\nexport class PredictionSummary {\r\n /**\r\n * All the values are in string to format them with commas. Example 1,245\r\n */\r\n public clicks: string;\r\n public applicants: string;\r\n public conversionRate: string;\r\n public budget: string;\r\n public averageCpa: string;\r\n public averageCpc: string;\r\n public jobsAmount: string;\r\n public hires: string;\r\n public cvh: string;\r\n public averageCph: string;\r\n\r\n /*\r\n Low range\r\n */\r\n public budgetLowRange: string;\r\n public averageCpcLowRange: string;\r\n public averageCpaLowRange: string;\r\n public averageCphLowRange: string;\r\n\r\n constructor(\r\n clicks: number,\r\n applicants: number,\r\n cvr: number,\r\n budget: number,\r\n averageCpa: number,\r\n averageCpc: number,\r\n jobsAmount: number,\r\n hires: number,\r\n cvh: number,\r\n averageCph: number\r\n\r\n ) {\r\n this.clicks = NumbersHelper.numberWithCommas(clicks.toFixed(0));\r\n this.applicants = NumbersHelper.numberWithCommas(applicants.toFixed(0));\r\n this.conversionRate = `${(NumbersHelper.toFixed(cvr, 4) * 100).toFixed(2)}`;\r\n this.budget = NumbersHelper.numberWithCommas(budget.toFixed(0));\r\n this.averageCpa = NumbersHelper.numberWithCommas(averageCpa.toFixed(2));\r\n this.averageCpc = NumbersHelper.numberWithCommas(averageCpc.toFixed(2));\r\n this.jobsAmount = NumbersHelper.numberWithCommas(jobsAmount);\r\n this.hires = NumbersHelper.numberWithCommas(hires.toFixed(0));\r\n this.cvh = `${cvh.toFixed(2)}`\r\n this.averageCph = NumbersHelper.numberWithCommas(averageCph.toFixed(2));\r\n\r\n\r\n // Low ranges\r\n const lowRangeFactor = 0.8;\r\n this.budgetLowRange = NumbersHelper.numberWithCommas((budget * lowRangeFactor).toFixed(0));\r\n this.averageCpcLowRange = NumbersHelper.numberWithCommas((averageCpc * lowRangeFactor).toFixed(2));\r\n this.averageCpaLowRange = NumbersHelper.numberWithCommas((averageCpa * lowRangeFactor).toFixed(2));\r\n this.averageCphLowRange = NumbersHelper.numberWithCommas((averageCph * lowRangeFactor).toFixed(2));\r\n \r\n }\r\n}\r\n","\r\nexport type predictionDuration = 30 | 14 | 7;\r\n\r\nexport class PredictionSettings {\r\n /**\r\n *\r\n */\r\n constructor(\r\n public predictionDuration: predictionDuration,\r\n public cvr?: number,\r\n public cvh?: number\r\n\r\n ) {\r\n }\r\n}","import { NumbersHelper } from '../../../services/helpers/NumbersHelper';\r\n\r\n\r\n\r\nexport class PredictionGridModel {\r\n /**\r\n *\r\n */\r\n public jobId: number;\r\n public jobTitle: string;\r\n public externalApplyUrl: string;\r\n public city: string;\r\n public state: string;\r\n public category: string;\r\n public clickRange: string;\r\n public demandFactor: string;\r\n public supplyFactor: string;\r\n public competition: string;\r\n public budget: number;\r\n public applicants: number;\r\n public conversionRate: number;\r\n public cpc: number;\r\n public clicks: number;\r\n public cpa: number;\r\n public location: string;\r\n public lat: number;\r\n public long: number;\r\n\r\n // Range fields\r\n // public budgetLowRange: number;\r\n // public cpaLowRange: number;\r\n\r\n constructor(\r\n jobId: number,\r\n jobTitle: string,\r\n externalApplyUrl: string,\r\n city: string,\r\n state: string,\r\n category: string,\r\n clickRange: string,\r\n demandFactor: string,\r\n supplyFactor: string,\r\n competition: string,\r\n budget: number,\r\n applicants: number,\r\n conversionRate: number,\r\n lat: number,\r\n long: number,\r\n ) {\r\n this.jobId = jobId;\r\n this.jobTitle = jobTitle;\r\n this.externalApplyUrl = externalApplyUrl;\r\n this.city = city;\r\n this.state = state;\r\n this.category = category;\r\n this.clickRange = clickRange;\r\n this.demandFactor = demandFactor;\r\n this.supplyFactor = supplyFactor;\r\n this.competition = competition;\r\n this.lat = lat;\r\n this.long = long;\r\n\r\n const clicks = applicants / conversionRate;\r\n const cpc = budget / clicks;\r\n const cpa = budget / applicants;\r\n this.conversionRate = NumbersHelper.toFixed((NumbersHelper.toFixed(conversionRate, 4) * 100), 2);\r\n this.cpc = NumbersHelper.toFixed((cpc), 2);\r\n this.clicks = NumbersHelper.toFixed(clicks, 0);\r\n this.applicants = NumbersHelper.toFixed(applicants, 0);\r\n this.cpa = NumbersHelper.toFixed(cpa, 2);\r\n this.budget = NumbersHelper.toFixed(budget, 2);\r\n this.location = `${city}, ${state}`;\r\n\r\n // Range fields\r\n // this.budgetLowRange = NumbersHelper.toFixed(budget * 0.8, 2);\r\n // this.cpaLowRange = NumbersHelper.toFixed(budget * 0.8, 2);\r\n }\r\n}\r\n","\r\ntype competitionCategory = \"High\" | \"Medium\" | \"Low\";\r\n\r\nexport class MapPoint {\r\n /**\r\n *\r\n */\r\n public totalMediumCompetition: number;\r\n public competitionCategory: competitionCategory;\r\n\r\n constructor(\r\n public location: string,\r\n public latitude: number,\r\n public longitude: number,\r\n public totaljobs: number,\r\n public totalLowCompetition: number,\r\n public totalHighCompetition: number,\r\n public totalApplicants: number\r\n ) {\r\n this.totalMediumCompetition = this.totaljobs - this.totalLowCompetition - this.totalHighCompetition;\r\n\r\n const maxJobsInSomeCompetitionCategory =\r\n Math.max(this.totalLowCompetition, this.totalMediumCompetition, this.totalHighCompetition);\r\n this.competitionCategory = this.getCompetitionCategory(maxJobsInSomeCompetitionCategory);\r\n }\r\n\r\n private getCompetitionCategory(maxJobsInSomeCompetitionCategory: number): competitionCategory {\r\n switch (maxJobsInSomeCompetitionCategory) {\r\n case this.totalHighCompetition:\r\n return \"High\";\r\n case this.totalMediumCompetition:\r\n return \"Medium\";\r\n case this.totalLowCompetition:\r\n default:\r\n return \"Low\";\r\n }\r\n\r\n }\r\n}","export class ErrorMessages {\r\n public static TokenExpired: string = \"Your authorization token expired. Please sign in again\";\r\n public static PredictionResultNull: string = \"Prediction result was null. Please retry\";\r\n}","import { action, makeObservable, observable } from \"mobx\";\r\nimport { Nullable } from '../types/Nullable';\r\n\r\n\r\nexport enum Page {\r\n InputPage,\r\n PredictionPage,\r\n AdminPreload\r\n}\r\n\r\nexport class UIStore {\r\n\r\n /**\r\n * Props\r\n */\r\n @observable\r\n public currentPage: Nullable;\r\n\r\n @observable\r\n public applicationLoader: boolean = true;\r\n\r\n\r\n /**\r\n * Ctor\r\n */\r\n constructor() {\r\n makeObservable(this);\r\n }\r\n\r\n\r\n @action\r\n setCurrentPage(page: Page): void {\r\n this.currentPage = page;\r\n }\r\n\r\n @action\r\n setApplicationLoader(state: boolean): void {\r\n this.applicationLoader = state;\r\n }\r\n\r\n}","export class GridFilterOptions {\r\n /**\r\n *\r\n */\r\n public filteredPredictionsIdMap: { [key: string]: boolean } = {};\r\n public agGridFilterModel: { [key: string]: any } = {};\r\n public useOldFilter: boolean;\r\n\r\n constructor(\r\n filteredPredictionsIdMap: { [key: string]: boolean },\r\n agGridFilterModel: { [key: string]: any }\r\n ) {\r\n this.filteredPredictionsIdMap = filteredPredictionsIdMap;\r\n this.agGridFilterModel = agGridFilterModel\r\n this.useOldFilter = false;\r\n }\r\n\r\n\r\n public setUseOldFilterAs(state: boolean): void {\r\n this.useOldFilter = state;\r\n }\r\n\r\n\r\n}","import { action, computed, makeObservable, observable, toJS } from \"mobx\";\r\nimport { Prediction } from \"../../models/prediction/Prediction\";\r\nimport { UserPredictionRequest } from \"../../models/prediction/UserPredictionRequest\";\r\nimport { Nullable } from \"../../types/Nullable\";\r\nimport PredictionService from '../../services/prediction/PredictionService';\r\nimport { NumbersHelper } from '../../services/helpers/NumbersHelper';\r\nimport { PredictionResult } from '../../models/prediction/PredictionResult';\r\nimport { EStrategyName } from \"../../models/prediction/enums/EStrategyName\";\r\nimport { PredictionSummary } from \"./datamodels/PredictionSummary\";\r\nimport { PredictionSettings, predictionDuration } from \"./datamodels/PredictionSettings\";\r\nimport { PredictionGridModel } from \"./datamodels/PredictionGridModel\";\r\nimport { UserStore } from \"../user/UserStore\";\r\nimport { Account } from './../../models/Account';\r\nimport { MapPoint } from './datamodels/MapPoint';\r\nimport { ErrorMessages } from './../../constants/ErrorMessages';\r\nimport { PreloadRequest } from './../../models/prediction/PreloadRequest';\r\nimport { message } from 'antd';\r\nimport { GridFilterOptions } from \"./datamodels/GridFilterOptions\";\r\n\r\nexport type PredictionGenericFactors = {\r\n applicantsFactor: number;\r\n cpaFactor: number;\r\n}\r\n\r\nexport type clickRange = \"High\" | \"Low\" | \"Medium\";\r\n\r\n\r\nexport class PredictionStore {\r\n\r\n public userStore: UserStore;\r\n\r\n // ### Properties\r\n @observable\r\n public goalType = \"manual\";\r\n \r\n @observable\r\n public autoOptimize = \"\";\r\n\r\n public goalText: null | string = null;\r\n\r\n @observable\r\n public userPredictionRequest: Nullable;\r\n\r\n @observable\r\n public predictionResult: Nullable;\r\n\r\n @observable\r\n public filteredPredictions: Prediction[] = [];\r\n\r\n @observable\r\n public account: Nullable;\r\n\r\n @observable\r\n public activeCampaignStrategy: Nullable;\r\n\r\n @observable\r\n public predictionSettings: PredictionSettings = new PredictionSettings(30);\r\n\r\n @observable\r\n public defaultPredictionSettings: PredictionSettings = new PredictionSettings(30);\r\n\r\n @observable\r\n public gridFilterOptions: GridFilterOptions = new GridFilterOptions({}, {});\r\n\r\n\r\n\r\n /**\r\n * Ctor\r\n */\r\n constructor(userStore: UserStore) {\r\n makeObservable(this);\r\n this.userStore = userStore;\r\n }\r\n\r\n // ### Actions\r\n @action\r\n public async getPredictionsAndBuildState(predictionRequest: UserPredictionRequest, account: Account, \r\n goalType: string, autoOptimize: string, goalText: string | null): Promise {\r\n // start with random number, different than null to start iteration\r\n let _predictionResultPaginationIndex: number | null = -1;\r\n let _predictions: Prediction[] = [];\r\n let predictionResult: PredictionResult | null = null;\r\n\r\n while (_predictionResultPaginationIndex !== null) {\r\n const _predictionResult = await this.userStore.MakeAuthorizedHttpRequest(async () => {\r\n return await PredictionService.GetPrediction(predictionRequest);\r\n })\r\n if (!_predictionResult) throw new Error(ErrorMessages.PredictionResultNull);\r\n\r\n _predictions = [..._predictions, ..._predictionResult.predictions];\r\n _predictionResultPaginationIndex = _predictionResult.paginationIndex;\r\n predictionRequest.paginationIndex = _predictionResult.paginationIndex;\r\n predictionResult = _predictionResult;\r\n }\r\n\r\n if (!predictionResult) {\r\n throw new Error(ErrorMessages.PredictionResultNull);\r\n }\r\n predictionResult.predictions = _predictions;\r\n\r\n this.predictionResult = predictionResult;\r\n this.userPredictionRequest = predictionRequest;\r\n this.account = account;\r\n this.goalType = goalType;\r\n this.autoOptimize = autoOptimize;\r\n this.goalText = goalText;\r\n this.activeCampaignStrategy = predictionResult.appliedStrategy;\r\n\r\n this.filteredPredictions = predictionResult.predictions;\r\n\r\n //TODO: built a notification service... It's too tightly coupled to ant design\r\n if (predictionResult.messageForUser && goalType == \"manual\") {\r\n message.warning(predictionResult.messageForUser, 10 /*seconds*/);\r\n }\r\n\r\n return predictionResult;\r\n }\r\n\r\n @action\r\n async GetListOfReadyAccounts(): Promise {\r\n const users = await this.userStore.MakeAuthorizedHttpRequest(async () => {\r\n return await PredictionService.GetListOfReadyAccounts();\r\n })\r\n return users || [];\r\n }\r\n\r\n @action\r\n async PreloadAccount(preloadRequest: PreloadRequest): Promise {\r\n const result = await this.userStore.MakeAuthorizedHttpRequest(async () => {\r\n return await PredictionService.PreloadAccount(preloadRequest)\r\n });\r\n\r\n if (!result) return \"\";\r\n return result;\r\n }\r\n\r\n\r\n @action\r\n public SetActiveCampaignStrategy(strategyOption: EStrategyName): void {\r\n this.activeCampaignStrategy = strategyOption;\r\n\r\n this.gridFilterOptions.setUseOldFilterAs(true);\r\n }\r\n\r\n\r\n @action\r\n public SetPredictionSettings(settings: PredictionSettings): void {\r\n this.predictionSettings = settings;\r\n }\r\n\r\n\r\n @action\r\n public SetFilteredPredictions(includedPredictionsAfterFilter: { [key: string]: boolean }) {\r\n if (!this.predictionResult) {\r\n throw new Error(\"no prediction result was found\");\r\n }\r\n\r\n if (includedPredictionsAfterFilter[\"empty\"]) {\r\n this.filteredPredictions = [];\r\n return;\r\n }\r\n\r\n if (includedPredictionsAfterFilter[\"fullList\"]) {\r\n this.filteredPredictions = this.predictionResult.predictions;\r\n return;\r\n }\r\n\r\n this.filteredPredictions = this.predictionResult\r\n .predictions\r\n .filter(prediction => includedPredictionsAfterFilter[prediction.jobId.toString()]);\r\n }\r\n\r\n\r\n @action\r\n public SetDefaultPredictionSettings(cvr: number, cvh: number) {\r\n if (!this.defaultPredictionSettings.cvr || !this.defaultPredictionSettings.cvh) {\r\n this.defaultPredictionSettings.cvr = cvr * 100; /*We multiply by 100 to have a percentage here*/\r\n this.defaultPredictionSettings.cvh = cvh;\r\n }\r\n }\r\n\r\n\r\n @action\r\n public setGridFilterOptions(\r\n filteredPredictionsIdMap: { [key: string]: boolean },\r\n agGridFilterModel: { [key: string]: any }\r\n ): void {\r\n this.gridFilterOptions = new GridFilterOptions(filteredPredictionsIdMap, agGridFilterModel);\r\n }\r\n\r\n\r\n // ### Computed\r\n @computed\r\n public get GetPredictionSummary(): PredictionSummary {\r\n if (!this.predictionResult) throw new Error(\"There are no job prediction to create a summary\");\r\n\r\n let _clicks: number = 0;\r\n let _applicants: number = 0;\r\n let _budget: number = 0;\r\n let totaljobs = 0;\r\n\r\n let _baseApplicants = 0;\r\n\r\n this.filteredPredictions.forEach((prediction: Prediction) => {\r\n const predictionFactors: PredictionGenericFactors = this.GetPredictionGenericFactors(prediction);\r\n _clicks += prediction.clicks;\r\n _applicants += (prediction.applicants * predictionFactors.applicantsFactor);\r\n _budget += (prediction.applicants * prediction.cpa * predictionFactors.applicantsFactor * predictionFactors.cpaFactor);\r\n\r\n totaljobs += 1;\r\n _baseApplicants += prediction.applicants;\r\n });\r\n\r\n\r\n // Duration accounted\r\n const durationFactor = this.GetFactorForPredictionDuration(this.predictionSettings.predictionDuration);\r\n _clicks *= durationFactor;\r\n _applicants *= durationFactor;\r\n _budget *= durationFactor;\r\n _baseApplicants *= durationFactor;\r\n\r\n\r\n // cvr = Conversion rate (clicks to applicants)\r\n let _cvr = _baseApplicants / _clicks;\r\n\r\n // cvh = Conversion rate (applicants to hires)\r\n let _cvh = this.predictionSettings.cvh || this.predictionResult.cvh;\r\n\r\n let _hires = _applicants * (_cvh / 100);\r\n\r\n // applicants/cvr is clicks. This is the real value scaled (We can't scale clicks prior to that because it has no factor)\r\n let _scaledClicks = (_applicants / _cvr); /*cvr = applicants/clicks => clicks = applicants/cvr*/\r\n\r\n // Set cvr if requested in settings\r\n if (this.IsCvrInputGiven()) {\r\n // we need the number as ratio -> that's why we divide by 100\r\n _cvr = this.predictionSettings.cvr! / 100;\r\n\r\n _applicants = _scaledClicks * (this.predictionSettings.cvr! / 100);\r\n _hires = _applicants * (_cvh / 100);\r\n }\r\n\r\n const predictionSummary = new PredictionSummary(\r\n _applicants / _cvr,\r\n _applicants,\r\n _cvr,\r\n _budget,\r\n _budget / _applicants,\r\n _budget / _scaledClicks,\r\n totaljobs,\r\n _hires,\r\n _cvh,\r\n _budget / _hires\r\n );\r\n\r\n this.SetDefaultPredictionSettings(_cvr, _cvh);\r\n return predictionSummary;\r\n }\r\n\r\n\r\n @computed\r\n public get GetJobsDisplayedOnMap(): MapPoint[] {\r\n if (!this.predictionResult) return [];\r\n const jobsGroupedByLocation = this.filteredPredictions.reduce((groupedDict: any, current) => {\r\n const location = `${current.cityText}, ${current.stateShortText}`;\r\n\r\n if ((location in groupedDict) === false) {\r\n groupedDict[location] = [];\r\n }\r\n groupedDict[location].push(current);\r\n return groupedDict;\r\n }, {})\r\n\r\n const result: MapPoint[] = [];\r\n for (let location in jobsGroupedByLocation) {\r\n const jobs: PredictionGridModel[] = jobsGroupedByLocation[location];\r\n const n = jobs.length;\r\n\r\n let totalLatitude = 0;\r\n let totalLongitude = 0;\r\n let totalLowCompetition = 0;\r\n let totalHighCompetition = 0;\r\n let totalApplicants = 0;\r\n\r\n jobs.forEach(job => {\r\n totalLatitude += job.lat;\r\n totalLongitude += job.long;\r\n totalApplicants += job.applicants;\r\n totalLowCompetition += job.competition.toLowerCase() === \"low\" ? 1 : 0\r\n totalHighCompetition += job.competition.toLowerCase() === \"high\" ? 1 : 0\r\n })\r\n\r\n const pointOnMap = new MapPoint(\r\n location,\r\n totalLatitude / n,\r\n totalLongitude / n,\r\n jobs.length,\r\n totalLowCompetition,\r\n totalHighCompetition,\r\n totalApplicants);\r\n result.push(pointOnMap);\r\n }\r\n\r\n return result;\r\n }\r\n\r\n\r\n // ### Methods\r\n public GetGridData(predictions: Prediction[] | null = null): PredictionGridModel[] {\r\n if (!this.predictionResult) throw new Error(\"There are no job prediction to create a job prediction grid view\");\r\n if (this.activeCampaignStrategy === undefined) throw new Error(\"There is no active campaign strategy. Can't retrieve jobs grid\");\r\n return this.MapPredictionsToGridData(predictions || this.predictionResult.predictions);\r\n }\r\n\r\n\r\n private GetPredictionGenericFactors(prediction: Prediction): PredictionGenericFactors {\r\n switch (this.activeCampaignStrategy) {\r\n case EStrategyName.HighBid:\r\n return {\r\n applicantsFactor: prediction.highBidsAppsFactor,\r\n cpaFactor: prediction.highBidsCPAFactor\r\n }\r\n case EStrategyName.Expansions:\r\n return {\r\n applicantsFactor: prediction.expansionsAppsFactor,\r\n cpaFactor: prediction.expansionsCPAFactor\r\n }\r\n case EStrategyName.HighBidAndExpansions:\r\n return {\r\n applicantsFactor: prediction.highBidsAndExpansionsAppsFactor,\r\n cpaFactor: prediction.highBidsAndExpansionsCPAFactor\r\n }\r\n case EStrategyName.Normal:\r\n default:\r\n return {\r\n applicantsFactor: 1,\r\n cpaFactor: 1\r\n }\r\n }\r\n }\r\n\r\n\r\n private CalculateClickRange(clicks: number): clickRange {\r\n const lowThreshold = 70;\r\n const highThresold = 120;\r\n\r\n if (clicks >= lowThreshold && clicks <= highThresold) {\r\n return \"Medium\";\r\n }\r\n\r\n if (clicks < lowThreshold) {\r\n return \"Low\";\r\n }\r\n\r\n return \"High\";\r\n }\r\n\r\n\r\n private GetFactorForPredictionDuration(duration: predictionDuration) {\r\n if (duration === 30) {\r\n return 1;\r\n }\r\n else if (duration === 14) {\r\n return (61.1 / 100);\r\n }\r\n\r\n //7\r\n return (34.6 / 100);\r\n }\r\n\r\n private IsCvrInputGiven(): boolean {\r\n return !!this.predictionSettings.cvr &&\r\n NumbersHelper.Round(this.predictionSettings.cvr, 2) !== NumbersHelper.Round(this.defaultPredictionSettings.cvr!, 2);\r\n }\r\n\r\n\r\n // Function that builds the grid data\r\n private MapPredictionsToGridData(predictions: Prediction[]): PredictionGridModel[] {\r\n const result: PredictionGridModel[] = [];\r\n\r\n predictions.forEach((prediction: Prediction) => {\r\n const durationFactor = this.GetFactorForPredictionDuration(this.predictionSettings.predictionDuration);\r\n const predictionFactors: PredictionGenericFactors = this.GetPredictionGenericFactors(prediction);\r\n\r\n let _applicants = prediction.applicants;\r\n let _clicks = prediction.clicks;\r\n let _budget = prediction.cpa * _applicants * predictionFactors.cpaFactor * predictionFactors.applicantsFactor;\r\n\r\n let _cvr = prediction.applicants / _clicks;\r\n\r\n // if CVR requested in settings\r\n if (this.IsCvrInputGiven()) {\r\n // we need the number as ratio -> that's why we divide by 100\r\n _cvr = this.predictionSettings.cvr! / 100;\r\n _applicants = _clicks * (this.predictionSettings.cvr! / 100);\r\n }\r\n\r\n // const applicantsFactored = _applicants * predictionFactors.applicantsFactor;\r\n _applicants *= predictionFactors.applicantsFactor;\r\n\r\n // duration factor\r\n _applicants *= durationFactor;\r\n _clicks *= durationFactor;\r\n _budget *= durationFactor;\r\n\r\n const jobDetails = new PredictionGridModel(\r\n prediction.jobId,\r\n prediction.extJobTitleText,\r\n prediction.externalApplyURL,\r\n prediction.cityText,\r\n prediction.stateShortText,\r\n prediction.category,\r\n this.CalculateClickRange(_applicants / _cvr),\r\n prediction.demandFactor,\r\n prediction.supplyFactor,\r\n prediction.competition,\r\n _budget,\r\n _applicants,\r\n _cvr,\r\n prediction.lat,\r\n prediction.long\r\n );\r\n result.push(jobDetails);\r\n })\r\n return result;\r\n }\r\n\r\n}","export enum LocalStorageKeys {\r\n AuthorizedResponse = \"authorized_response\",\r\n}","import { ServiceUrls } from \"../../constants/ServiceUrls\";\r\nimport { BaseService } from \"../BaseService\";\r\nimport { UserAuthorizationRequest } from './../../models/authorization/UserAuthorizationRequest';\r\nimport { UserAuthorizationResponse } from './../../models/authorization/UserAuthorizationResponse';\r\n\r\nexport class UserService extends BaseService {\r\n\r\n async Authorize(request: UserAuthorizationRequest): Promise {\r\n const result = await this.post(`/authorize`, request);\r\n return result;\r\n }\r\n\r\n}\r\n\r\nexport default new UserService(ServiceUrls.User);","export class LocalStorageService {\r\n public static setItem(key: string, value: T) {\r\n window.localStorage.setItem(key, JSON.stringify(value));\r\n }\r\n\r\n public static getItem(key: string): T | \"\" {\r\n const value = window.localStorage.getItem(key);\r\n if (!value) return \"\";\r\n\r\n return (JSON.parse(value)) as T;\r\n }\r\n\r\n public static removeItem(key: string) {\r\n window.localStorage.removeItem(key);\r\n }\r\n}","import { action, makeObservable, observable } from \"mobx\";\r\nimport { Nullable } from \"../../types/Nullable\";\r\nimport { UserAuthorizationRequest } from './../../models/authorization/UserAuthorizationRequest';\r\nimport { UserAuthorizationResponse } from './../../models/authorization/UserAuthorizationResponse';\r\nimport UserService from './../../services/users/UserService';\r\nimport { UserResponseModel } from './../../models/users/UserResponseModel';\r\nimport { SessionStorageService } from './../../services/SessionStorageService';\r\nimport { SessionStorageKeys } from \"../../constants/SessionStorageKeys\";\r\nimport { UnauthorizedError } from './../../errors/UnauthorizedError';\r\nimport { LocalStorageService } from './../../services/LocalStorageService';\r\nimport { LocalStorageKeys } from \"../../constants/LocalStorageKeys\";\r\n\r\nexport class UserStore {\r\n /**\r\n * Properties\r\n */\r\n @observable\r\n public user: Nullable;\r\n\r\n @observable\r\n public token = \"\";\r\n\r\n /**\r\n * Ctor\r\n */\r\n constructor() {\r\n makeObservable(this);\r\n }\r\n\r\n /**\r\n * Actions\r\n */\r\n @action\r\n public async AuthorizeUser(request: UserAuthorizationRequest): Promise {\r\n const authorizationResponse = await UserService.Authorize(request);\r\n\r\n this.SetUserAndToken(authorizationResponse);\r\n return authorizationResponse;\r\n }\r\n\r\n @action\r\n public SetUserAndToken(authorizationResponse: UserAuthorizationResponse): void {\r\n this.token = authorizationResponse.securityToken;\r\n this.user = authorizationResponse.user;\r\n SessionStorageService.setItem(SessionStorageKeys.JwtToken, authorizationResponse.securityToken);\r\n }\r\n\r\n /**\r\n * Strategy pattern function that removes the saved user if the token is expried or unauthorized request is made\r\n */\r\n @action\r\n public async MakeAuthorizedHttpRequest(httpRequest: () => T): Promise {\r\n try {\r\n const result = await httpRequest();\r\n return result;\r\n }\r\n catch (error) {\r\n if (error instanceof UnauthorizedError) {\r\n this.user = undefined;\r\n this.token = \"\";\r\n LocalStorageService.removeItem(LocalStorageKeys.AuthorizedResponse);\r\n return;\r\n }\r\n throw error;\r\n }\r\n }\r\n\r\n}","import { PredictionStore } from './prediction/PredictionStore';\r\nimport { UIStore } from \"./UIStore\";\r\nimport { UserStore } from './user/UserStore';\r\n\r\nexport class RootStore {\r\n /**\r\n * Props\r\n */\r\n\r\n public userStore: UserStore;\r\n public predictionStore: PredictionStore;\r\n public uiStore: UIStore;\r\n\r\n constructor() {\r\n this.userStore = new UserStore();\r\n this.predictionStore = new PredictionStore(this.userStore);\r\n this.uiStore = new UIStore();\r\n }\r\n}","import React, { FC, createContext, ReactNode, ReactElement } from \"react\";\r\nimport { RootStore } from \"./RootStore\";\r\n\r\nexport const RootStoreContext = createContext({} as RootStore);\r\n\r\nexport type StoreComponent = FC<{\r\n children: ReactNode;\r\n}>;\r\n\r\nexport const RootStoreProvider: StoreComponent = ({\r\n children,\r\n}): ReactElement => {\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n};\r\n","export default __webpack_public_path__ + \"static/media/Veritone-logos.1d243351.svg\";","export default __webpack_public_path__ + \"static/media/Veritone_icon.ec293058.svg\";","import { Box } from \"@material-ui/core\";\r\nimport React, { useContext } from \"react\";\r\nimport VerticalDivider from \"../vertical-divider/VerticalDivider\";\r\nimport { Redirect, RouteComponentProps, withRouter } from \"react-router\";\r\nimport { Routes } from \"../../../constants/Routes\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport SettingsIcon from \"@material-ui/icons/Settings\";\r\nimport HomeIcon from \"@material-ui/icons/Home\";\r\nimport ExitToAppIcon from \"@material-ui/icons/ExitToApp\";\r\nimport { RootStoreContext } from \"../../../stores/RootStoreContext\";\r\nimport { SessionStorageService } from \"../../../services/SessionStorageService\";\r\nimport { SessionStorageKeys } from \"../../../constants/SessionStorageKeys\";\r\nimport { LocalStorageService } from \"../../../services/LocalStorageService\";\r\nimport { LocalStorageKeys } from \"../../../constants/LocalStorageKeys\";\r\n\r\nimport pandologicLogo from \"../../../assets/images/plogic_Logo_W.png\";\r\nimport veritoneLogo from \"../../../assets/images/Veritone-logos.svg\";\r\nimport pandoSvg from \"../../../assets/images/PIQ_icon.svg\";\r\nimport veritoneSvg from \"../../../assets/images/Veritone_icon.svg\";\r\n\r\nimport \"./Header.scss\";\r\n\r\ninterface Props extends RouteComponentProps {}\r\n\r\nconst Header = (props: Props) => {\r\n const { history } = props;\r\n const { userStore } = useContext(RootStoreContext);\r\n\r\n const redirectToAdminPage = () => {\r\n if (userStore.user) {\r\n history.push(Routes.AdminPreload);\r\n }\r\n };\r\n\r\n const redirectToInputPage = () => {\r\n if (userStore.user) {\r\n history.push(Routes.InputPage);\r\n }\r\n };\r\n\r\n const cursorPointerIfLoggedIn = () => {\r\n const styles: React.CSSProperties = {};\r\n if (userStore.user) {\r\n styles[\"cursor\"] = \"pointer\";\r\n }\r\n return styles;\r\n };\r\n\r\n const logOut = () => {\r\n SessionStorageService.removeItem(SessionStorageKeys.JwtToken);\r\n LocalStorageService.removeItem(LocalStorageKeys.AuthorizedResponse);\r\n history.push(Routes.Login);\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n \"Veritone\r\n \r\n {/* \r\n \r\n Hire Intelligence\r\n \r\n */}\r\n \r\n \r\n {HeaderIcon(\r\n \"Home\",\r\n cursorPointerIfLoggedIn(),\r\n redirectToInputPage,\r\n \r\n )}\r\n {HeaderIcon(\r\n \"Admin\",\r\n cursorPointerIfLoggedIn(),\r\n redirectToAdminPage,\r\n \r\n )}\r\n {HeaderIcon(\r\n \"VHP\",\r\n cursorPointerIfLoggedIn(),\r\n () => {\r\n window.open(\r\n \"https://www.pandoiq.com/login\",\r\n \"_blank\"\r\n );\r\n },\r\n \r\n )}\r\n {HeaderIcon(\r\n \"Logout\",\r\n cursorPointerIfLoggedIn(),\r\n logOut,\r\n \r\n )}\r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nfunction HeaderIcon(\r\n text: string,\r\n style: React.CSSProperties,\r\n onClick: () => void,\r\n icon: React.ReactElement\r\n) {\r\n const Icon = icon as any;\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {icon}\r\n {text}\r\n \r\n \r\n );\r\n}\r\n\r\nfunction getIconProps(): any {\r\n return {\r\n fontSize: \"small\",\r\n style: { transform: \"translateX(-10px)\" },\r\n };\r\n}\r\n\r\nexport default withRouter(observer(Header));\r\n","import { Box } from \"@material-ui/core\";\r\nimport React, { useContext } from \"react\";\r\nimport VerticalDivider from \"../vertical-divider/VerticalDivider\";\r\nimport \"./Footer.scss\";\r\nimport { RootStoreContext } from \"../../../stores/RootStoreContext\";\r\nimport { Page } from \"../../../stores/UIStore\";\r\nimport { observer } from 'mobx-react-lite';\r\n\r\ninterface Props {}\r\n\r\nconst Footer = (props: Props) => {\r\n const { uiStore } = useContext(RootStoreContext);\r\n const buildFooterStyles = (): React.CSSProperties => {\r\n if (uiStore.currentPage === Page.PredictionPage) {\r\n return {\r\n position: \"relative\",\r\n };\r\n }\r\n\r\n return {\r\n position: \"absolute\",\r\n bottom: 0,\r\n opacity: 0.6,\r\n };\r\n };\r\n return (\r\n
\r\n \r\n \r\n © {new Date().getFullYear()} Veritone Inc. All rights reserved\r\n \r\n\r\n \r\n \r\n Privacy Policy\r\n \r\n \r\n \r\n \r\n \r\n Cookie Policy\r\n \r\n \r\n \r\n \r\n \r\n Terms of Use\r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default observer(Footer);\r\n","import { Redirect, Route, RouteProps } from \"react-router\";\r\nimport { useContext } from \"react\";\r\nimport { RootStoreContext } from \"../stores/RootStoreContext\";\r\nimport { Routes } from \"../constants/Routes\";\r\nimport { observer } from \"mobx-react-lite\";\r\n\r\nexport type ProtectedRouteProps = {} & RouteProps;\r\n\r\nconst AuthorizedRoute = ({ ...routeProps }: ProtectedRouteProps) => {\r\n const { userStore } = useContext(RootStoreContext);\r\n if (userStore.user) {\r\n return ;\r\n } else {\r\n return ;\r\n }\r\n};\r\n\r\nexport default observer(AuthorizedRoute);\r\n","import { useEffect, useContext } from \"react\";\r\n\r\n// Extending window\r\ndeclare global {\r\n interface Window {\r\n [key: string]: any;\r\n }\r\n}\r\n\r\nconst isSubArrayEqualArray = (\r\n baseArray: string[],\r\n subArray: string[]\r\n): boolean => {\r\n return baseArray.join(\"\").toLowerCase() == subArray.join(\"\").toLowerCase();\r\n};\r\n\r\nconst isSubArrayContainedInArray = (\r\n baseArray: string[],\r\n subArray: string[]\r\n): boolean => {\r\n return baseArray\r\n .join(\"\")\r\n .toLowerCase()\r\n .startsWith(subArray.join(\"\").toLowerCase());\r\n};\r\n\r\nconst keyboardListenerHandler = (\r\n id: string,\r\n pattern: string[],\r\n callback: () => void\r\n) => (event: KeyboardEvent): void => {\r\n if (!window[id]) {\r\n window[id] = [];\r\n }\r\n window[id].push(event.key);\r\n\r\n if (isSubArrayEqualArray(pattern, window[id])) {\r\n callback();\r\n window[id] = [];\r\n return;\r\n }\r\n\r\n // check if valid pattern\r\n if (isSubArrayContainedInArray(pattern, window[id]) === false) {\r\n window[id] = [];\r\n return;\r\n }\r\n};\r\n\r\n/**\r\n * @param id Need to be a special id to register the event listener. You can pass uuidv4()\r\n * @param pattern The pattern you want to register to be listened for. For example [\"alt\", \"1\"] will listen for alt + 1\r\n * @param callBack Call back to be executed when the pattern is clicked\r\n */\r\nconst useKeyboardListener = (\r\n id: string,\r\n pattern: string[],\r\n callBack: () => void\r\n) => {\r\n useEffect(() => {\r\n const functionReference = keyboardListenerHandler(\r\n id,\r\n pattern,\r\n callBack\r\n );\r\n window.addEventListener(\"keydown\", functionReference);\r\n\r\n return function cleanUp() {\r\n delete window[id];\r\n window.removeEventListener(\"keydown\", functionReference);\r\n };\r\n }, []);\r\n};\r\n\r\nexport default useKeyboardListener;\r\n","import { v4 as uuidv4 } from 'uuid';\r\n\r\nexport class Guid {\r\n public static NewGuid(): string {\r\n return uuidv4();\r\n }\r\n}","import { Box, TextField } from \"@material-ui/core\";\r\nimport React, { useState } from \"react\";\r\n/**\r\n * Styles\r\n */\r\nimport \"./Input.scss\";\r\nimport \"../input-styles.scss\";\r\n\r\ninterface Props {\r\n placeholder?: string;\r\n Icon?: React.ReactElement;\r\n value?: string;\r\n valueSetter?: (value: string) => void;\r\n onChange?: (\r\n e: React.ChangeEvent\r\n ) => void;\r\n onEnterPress?: () => void;\r\n disabled?: boolean;\r\n type?: \"password\" | \"text\" | \"number\";\r\n}\r\n\r\nconst Input = (props: Props) => {\r\n const {\r\n value,\r\n onChange,\r\n valueSetter,\r\n onEnterPress,\r\n placeholder,\r\n Icon,\r\n disabled,\r\n type = \"text\",\r\n } = props;\r\n const [focused, setFocused] = useState(false);\r\n\r\n const className = `pandologic-input ${Icon ? \"with-icon\" : \"\"} ${\r\n value || focused ? \"filled\" : \"\"\r\n }`;\r\n\r\n return (\r\n \r\n {\r\n if (valueSetter) {\r\n let newValue = e.target.value;\r\n valueSetter(newValue);\r\n }\r\n if (onChange) {\r\n onChange(e);\r\n }\r\n }}\r\n onKeyDown={(e) => {\r\n if (onEnterPress && e.key.toLowerCase() === \"enter\") {\r\n onEnterPress();\r\n }\r\n }}\r\n onFocus={(e) => {\r\n setFocused(true);\r\n }}\r\n onBlur={(e) => {\r\n setFocused(false);\r\n }}\r\n variant=\"outlined\"\r\n label={placeholder}\r\n />\r\n {Icon}\r\n \r\n );\r\n};\r\n\r\nexport default Input;\r\n","export class UserAuthorizationRequest {\r\n /**\r\n *\r\n */\r\n constructor(\r\n public email: string,\r\n public password: string,\r\n ) {\r\n\r\n }\r\n}","export class StringHelper {\r\n public static toTitleCase(value: string): string {\r\n if (!value) return \"\";\r\n return value[0].toUpperCase() + value.substr(1, value.length - 1);\r\n }\r\n\r\n public static validateEmail(email: string): boolean {\r\n const re = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n return re.test(String(email).toLowerCase());\r\n }\r\n\r\n}","export default __webpack_public_path__ + \"static/media/PL-Loader-dark-blue-small.de202bf5.gif\";","import React, { CSSProperties, ReactElement } from \"react\";\r\nimport pandoLoader from \"./PL-Loader-dark-blue-small.gif\";\r\n\r\ninterface Props {\r\n style?: CSSProperties;\r\n className?: string;\r\n}\r\n\r\nfunction Loader(props: Props): ReactElement {\r\n const { style, className } = props;\r\n return (\r\n \r\n );\r\n}\r\n\r\nexport default Loader;\r\n","export enum EPredictionType {\r\n NoRequest = \"NoRequest\",\r\n Budget = \"Budget\",\r\n Applicants = \"Applicants\"\r\n}\r\n\r\nexport class UserPredictionRequest {\r\n /**\r\n *\r\n */\r\n constructor(\r\n public accountId: number,\r\n public predictionType: EPredictionType,\r\n public amount: number,\r\n public paginationIndex: number | null,\r\n ) { }\r\n}","import { useEffect, useContext } from 'react';\r\nimport { RootStoreContext } from './../stores/RootStoreContext';\r\nimport { LocalStorageService } from './../services/LocalStorageService';\r\nimport { UserAuthorizationResponse } from './../models/authorization/UserAuthorizationResponse';\r\nimport { LocalStorageKeys } from '../constants/LocalStorageKeys';\r\nimport { SessionStorageService } from './../services/SessionStorageService';\r\nimport { SessionStorageKeys } from '../constants/SessionStorageKeys';\r\n\r\nconst useLoadUserIfSaved = () => {\r\n const {userStore, uiStore} = useContext(RootStoreContext);\r\n\r\n useEffect(() => {\r\n const authorizationResponse = LocalStorageService.getItem(LocalStorageKeys.AuthorizedResponse);\r\n if(authorizationResponse) {\r\n userStore.SetUserAndToken(authorizationResponse);\r\n }\r\n\r\n uiStore.setApplicationLoader(false);\r\n }, [])\r\n}\r\n\r\nexport default useLoadUserIfSaved","import React, { useContext, useState } from \"react\";\r\nimport Avatar from \"@material-ui/core/Avatar\";\r\nimport Button from \"@material-ui/core/Button\";\r\nimport FormControlLabel from \"@material-ui/core/FormControlLabel\";\r\nimport Checkbox from \"@material-ui/core/Checkbox\";\r\nimport Box from \"@material-ui/core/Box\";\r\nimport LockOutlinedIcon from \"@material-ui/icons/LockOutlined\";\r\nimport Typography from \"@material-ui/core/Typography\";\r\nimport { makeStyles } from \"@material-ui/core/styles\";\r\nimport Container from \"@material-ui/core/Container\";\r\nimport bgImg from \"../../assets/images/login.jpg\";\r\nimport Input from \"../common/inputs/input/Input\";\r\nimport { message } from \"antd\";\r\nimport { UserAuthorizationRequest } from \"../../models/authorization/UserAuthorizationRequest\";\r\nimport { RootStoreContext } from \"./../../stores/RootStoreContext\";\r\nimport { StringHelper } from \"./../../services/StringHelper\";\r\nimport Loader from \"../common/feedback/loader/Loader\";\r\nimport { RouterProps, withRouter } from \"react-router\";\r\nimport { Routes } from \"../../constants/Routes\";\r\nimport { LocalStorageService } from \"./../../services/LocalStorageService\";\r\nimport { LocalStorageKeys } from \"../../constants/LocalStorageKeys\";\r\nimport useLoadUserIfSaved from \"./../../hooks/useLoadUserIfSaved\";\r\nimport { Redirect } from \"react-router-dom\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport shadows from \"@material-ui/core/styles/shadows\";\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n paper: {\r\n marginTop: theme.spacing(8),\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n alignItems: \"center\",\r\n background: theme.palette.background.paper,\r\n padding: theme.spacing(10),\r\n borderRadius: \"5px\",\r\n width: 400,\r\n boxShadow: \"0px 2px 10px 0px rgba(0, 0, 0, 0.15)\"\r\n },\r\n avatar: {\r\n margin: theme.spacing(1),\r\n backgroundColor: theme.palette.primary.main,\r\n },\r\n form: {\r\n width: \"100%\", // Fix IE 11 issue.\r\n marginTop: theme.spacing(1),\r\n },\r\n submit: {\r\n // margin: theme.spacing(3, 0, 2),\r\n }, \r\n bgGradient: {\r\n position: \"absolute\",\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n width: \"100%\",\r\n height: \"100%\",\r\n backgroundImage:\r\n \"linear-gradient(30deg, rgba(138, 212, 61, .5) 0%, rgba(9, 170, 196, .5) 100%)\",\r\n zIndex: -1,\r\n },\r\n}));\r\n\r\ntype Props = {} & RouterProps;\r\n\r\nconst LoginPage = (props: Props) => {\r\n const classes = useStyles();\r\n const { history } = props;\r\n const { userStore, uiStore } = useContext(RootStoreContext);\r\n const [email, setEmail] = useState(\"\");\r\n const [password, setPassword] = useState(\"\");\r\n const [rememberMe, setRememberMe] = useState(false);\r\n const [loader, setLoader] = useState(false);\r\n\r\n const handleSubmit = async (e: React.FormEvent) => {\r\n e.preventDefault();\r\n if (!email || !password) {\r\n return message.error(\r\n \"Pleaes make sure you enter email and password\"\r\n );\r\n }\r\n\r\n if (!StringHelper.validateEmail(email)) {\r\n return message.error(\r\n \"Please make sure the email you enter is a correct email\"\r\n );\r\n }\r\n\r\n try {\r\n setLoader(true);\r\n const authorizationRequest = new UserAuthorizationRequest(\r\n email,\r\n password\r\n );\r\n const authorizationResponse = await userStore.AuthorizeUser(\r\n authorizationRequest\r\n );\r\n\r\n if (rememberMe) {\r\n LocalStorageService.setItem(\r\n LocalStorageKeys.AuthorizedResponse,\r\n authorizationResponse\r\n );\r\n }\r\n\r\n message.success(`Welcome in ${authorizationResponse.user.name}`);\r\n history.push(Routes.InputPage);\r\n return;\r\n } catch (error: any) {\r\n message.error(error.message);\r\n } finally {\r\n setLoader(false);\r\n }\r\n };\r\n\r\n useLoadUserIfSaved();\r\n\r\n if (uiStore.applicationLoader) {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n\r\n if (userStore.user && userStore.token) {\r\n return ;\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 Sign in\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n setRememberMe(e.target.checked);\r\n }}\r\n color=\"primary\"\r\n />\r\n }\r\n label=\"Remember me\"\r\n />\r\n \r\n \r\n {loader ? (\r\n \r\n \r\n \r\n ) : (\r\n \r\n Sign In\r\n \r\n )}\r\n \r\n {/* \r\n \r\n \r\n Forgot password?\r\n \r\n \r\n \r\n \r\n {\"Don't have an account? Sign Up\"}\r\n \r\n \r\n */}\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default withRouter(observer(LoginPage));\r\n","export default __webpack_public_path__ + \"static/media/ppr-background.2c5bb802.jpg\";","import { makeStyles } from \"@material-ui/core\";\r\nimport pprBg from \"../../assets/images/ppr-background.jpg\";\r\n\r\nexport const useStyles = makeStyles((theme) => ({\r\n background: {\r\n backgroundImage: `url(${pprBg})`,\r\n backgroundRepeat: \"no-repeat\",\r\n backgroundSize: \"cover\",\r\n width: \"100%\",\r\n height: \"calc(100vh - 80px)\",\r\n boxShadow: \"0px 2px 10px 0px rgba(0, 0, 0, 0.15)\"\r\n },\r\n paperWrapper: {\r\n position: \"relative\",\r\n height: \"438px\",\r\n width: \"641px\",\r\n maxWidth: \"70%\",\r\n maxHeight: \"70%\",\r\n paddingLeft: theme.spacing(14),\r\n paddingTop: theme.spacing(14),\r\n },\r\n paper: {\r\n padding: theme.spacing(12),\r\n width: \"100%\",\r\n minHeight: \"100%\",\r\n },\r\n pprTitle: {\r\n color: \"#485465\",\r\n fontFamily: \"Open Sans\",\r\n fontSize: \"20px\",\r\n fontWeight: 800,\r\n letterSpacing: 0,\r\n lineHeight: \"27px\",\r\n },\r\n subTitle: {\r\n color: \"#485465\",\r\n fontFamily: \"Open Sans\",\r\n fontSize: \"16px\",\r\n lineHeight: \"22px\",\r\n marginBottom: theme.spacing(1),\r\n },\r\n or: {\r\n color: \"#999B9D\",\r\n fontFamily: \"Open Sans\",\r\n fontSize: \"16px\",\r\n lineHeight: \"22px\",\r\n },\r\n clearButton: {\r\n color: \"#3992B3\",\r\n fontFamily: \"Open Sans\",\r\n fontSize: \"14px\",\r\n lineHeight: \"19px\",\r\n textTransform: 'none'\r\n },\r\n}));\r\n","import { useEffect } from \"react\";\r\n\r\nconst useOnLoadAsync = (callback: any) => {\r\n useEffect(() => {\r\n (async () => {\r\n await callback();\r\n })();\r\n }, []);\r\n};\r\n\r\nexport default useOnLoadAsync;\r\n","import { useContext, useEffect } from \"react\";\r\nimport { useLocation } from \"react-router\";\r\nimport { Routes } from \"../constants/Routes\";\r\nimport { Page } from \"../stores/UIStore\";\r\nimport { RootStoreContext } from './../stores/RootStoreContext';\r\n\r\nconst useSetCurrentPage = () => {\r\n const {uiStore} = useContext(RootStoreContext);\r\n const location = useLocation();\r\n\r\n switch(location.pathname) {\r\n case Routes.InputPage:\r\n uiStore.setCurrentPage(Page.InputPage);\r\n break;\r\n case Routes.PredictionPage:\r\n uiStore.setCurrentPage(Page.PredictionPage);\r\n break;\r\n case Routes.AdminPreload:\r\n uiStore.setCurrentPage(Page.AdminPreload);\r\n break;\r\n default:\r\n uiStore.setCurrentPage(Page.InputPage);\r\n break;\r\n }\r\n};\r\n\r\nexport default useSetCurrentPage;\r\n","/* eslint-disable no-use-before-define */\r\nimport React from \"react\";\r\nimport TextField from \"@material-ui/core/TextField\";\r\nimport Autocomplete from \"@material-ui/lab/Autocomplete\";\r\nimport { Box } from \"@material-ui/core\";\r\n/**\r\n * Styles\r\n */\r\nimport \"../input-styles.scss\";\r\nimport \"./AutoCompleteInput.scss\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { FilterOptionsState } from \"@material-ui/lab\";\r\n\r\ninterface Props {\r\n placeholder?: string;\r\n data: T[];\r\n getOptionCb: (value: T) => string;\r\n onChange?: (value: T | null) => void;\r\n onEnterPress?: () => void;\r\n filterOptions?: ((options: T[], state: FilterOptionsState) => T[]) | undefined\r\n value?: T;\r\n}\r\n\r\nfunction AutoCompleteInput(props: Props) {\r\n const {\r\n placeholder,\r\n data,\r\n getOptionCb,\r\n onChange,\r\n onEnterPress,\r\n value,\r\n filterOptions\r\n } = props;\r\n\r\n return (\r\n \r\n {\r\n if (onEnterPress && e.key.toLowerCase() === \"enter\") {\r\n onEnterPress();\r\n }\r\n }}\r\n onChange={(_, value) => {\r\n if (onChange) {\r\n onChange(value);\r\n }\r\n }}\r\n getOptionLabel={(option) => getOptionCb(option)}\r\n renderInput={(params) => (\r\n \r\n )}\r\n />\r\n \r\n );\r\n}\r\n\r\nexport default observer(AutoCompleteInput);\r\n","import React from \"react\";\r\nimport \"./AutoOptimizeSwitch.scss\";\r\ninterface Props {\r\n autoOptimize: string;\r\n setAutoOptimize: (value: string) => void;\r\n}\r\n\r\nconst AutoOptimizeSwitch = (props: Props) => {\r\n const { autoOptimize, setAutoOptimize } = props;\r\n return (\r\n
\r\n \r\n setAutoOptimize(autoOptimize === \"balanced\" ? \"max\" : \"balanced\")\r\n }\r\n />\r\n \r\n\r\n \r\n setAutoOptimize(autoOptimize === \"balanced\" ? \"max\" : \"balanced\")\r\n }\r\n />\r\n \r\n
\r\n );\r\n};\r\nexport default AutoOptimizeSwitch;\r\n","import { Account } from \"./../../models/Account\";\r\nimport { Box, Button, FormControlLabel, Radio } from \"@material-ui/core\";\r\nimport AutoCompleteInput from \"../common/inputs/auto-complete-input/AutoCompleteInput\";\r\nimport Input from \"../common/inputs/input/Input\";\r\nimport MonetizationOnOutlinedIcon from \"@material-ui/icons/MonetizationOnOutlined\";\r\nimport PeopleAltIcon from \"@material-ui/icons/PeopleAlt\";\r\nimport Loader from \"../common/feedback/loader/Loader\";\r\nimport AutoOptimizeSwitch from \"./components/auto-optimize-switch/AutoOptimizeSwitch\";\r\n\r\nexport class InputPageBuilder {\r\n /**\r\n *\r\n */\r\n constructor(public classes: any) { }\r\n\r\n public Title(title: string) {\r\n return

{title}

;\r\n }\r\n\r\n public AccountNameAutocompleteInput(\r\n readyAccounts: Account[],\r\n selectedAccount: Account | null,\r\n setSelectedAccount: (account: Account | null) => void,\r\n handleSubmit: () => void,\r\n loading: boolean\r\n ) {\r\n return (\r\n \r\n

Select a client

\r\n {loading ? (\r\n \r\n \r\n \r\n ) : (\r\n v?.accountName ?? \"\"}\r\n onChange={(v) => setSelectedAccount(v)}\r\n onEnterPress={handleSubmit}\r\n value={selectedAccount}\r\n />\r\n )}\r\n
\r\n );\r\n }\r\n\r\n public GoalSettingSection(\r\n budget: string,\r\n setBudget: (value: string) => void,\r\n applicants: string,\r\n setApplicants: (value: string) => void,\r\n handleSubmit: () => void,\r\n goalType: string,\r\n setGoalType: (value: string) => void,\r\n autoOptimize: string,\r\n setAutoOptimize: (value: string) => void\r\n ) {\r\n const handleChange = (event: React.ChangeEvent) => {\r\n setGoalType(event.target.value);\r\n setBudget(\"\");\r\n setApplicants(\"\");\r\n setAutoOptimize(\"balanced\")\r\n };\r\n return (\r\n \r\n\r\n \r\n \r\n }\r\n label=\"Set a goal\"\r\n />\r\n \r\n }\r\n label=\"Auto optimize\"\r\n />\r\n \r\n \r\n {goalType === 'manual' ?\r\n \r\n \r\n }\r\n value={budget}\r\n // valueSetter={setBudget}\r\n disabled={!!applicants}\r\n onEnterPress={handleSubmit}\r\n onChange={(e) => setBudget(e.target.value.substring(0, 7))\r\n }\r\n type=\"number\"\r\n />\r\n \r\n

OR

\r\n \r\n }\r\n value={applicants}\r\n //valueSetter={setApplicants}\r\n disabled={!!budget}\r\n onEnterPress={handleSubmit}\r\n onChange={(e) => setApplicants(e.target.value.substring(0, 7))\r\n }\r\n type=\"number\"\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 public ButtonsSection(\r\n loading: boolean,\r\n handleSubmit: () => void,\r\n handleClear: () => void\r\n ) {\r\n if (loading) {\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 Generate Prediction Report\r\n \r\n \r\n\r\n \r\n \r\n Clear form\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","import { Box, Button, Paper } from \"@material-ui/core\";\r\nimport React, { useContext, useState, useEffect } from \"react\";\r\nimport { useStyles } from \"./InputPage.styles\";\r\nimport useOnLoadAsync from \"./../../hooks/useOnLoadAsync\";\r\nimport { Account } from \"../../models/Account\";\r\nimport { message } from \"antd\";\r\nimport {\r\n EPredictionType,\r\n UserPredictionRequest,\r\n} from \"../../models/prediction/UserPredictionRequest\";\r\nimport { RootStoreContext } from \"./../../stores/RootStoreContext\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { withRouter } from \"react-router\";\r\nimport { RouteComponentProps, useLocation } from \"react-router-dom\";\r\nimport Loader from \"../common/feedback/loader/Loader\";\r\nimport { Routes } from \"../../constants/Routes\";\r\nimport useSetCurrentPage from \"../../hooks/useSetCurrentPage\";\r\nimport { InputPageBuilder } from \"./InputPage.builder\";\r\nimport useKeyboardListener from \"./../../hooks/useKeyboardListener\";\r\nimport { Guid } from \"../../services/Guid\";\r\nimport { useSnackbar } from \"notistack\";\r\n\r\ninterface Props extends RouteComponentProps { }\r\n\r\nconst InputPage = (props: Props) => {\r\n const { history } = props;\r\n\r\n const { predictionStore, uiStore } = useContext(RootStoreContext);\r\n const { enqueueSnackbar, closeSnackbar } = useSnackbar();\r\n const classes = useStyles();\r\n const [readyAccounts, setReadyAccounts] = useState([]);\r\n const [loading, setLoading] = useState(true);\r\n\r\n const calculateInitialState = (forType: \"budget\" | \"applicants\") => {\r\n if (\r\n !predictionStore.userPredictionRequest ||\r\n predictionStore.userPredictionRequest.amount === 0\r\n )\r\n return \"\";\r\n\r\n if (\r\n forType === \"budget\" &&\r\n predictionStore.userPredictionRequest.predictionType ===\r\n EPredictionType.Budget\r\n ) {\r\n return predictionStore.userPredictionRequest.amount.toString();\r\n }\r\n if (\r\n forType === \"applicants\" &&\r\n predictionStore.userPredictionRequest.predictionType ===\r\n EPredictionType.Applicants\r\n ) {\r\n return predictionStore.userPredictionRequest.amount.toString();\r\n }\r\n\r\n return \"\";\r\n };\r\n\r\n // form\r\n const [budget, setBudget] = useState(\r\n calculateInitialState(\"budget\")\r\n );\r\n const [applicants, setApplicants] = useState(\r\n calculateInitialState(\"applicants\")\r\n );\r\n const [selectedAccount, setSelectedAccount] = useState(\r\n predictionStore.account || null\r\n );\r\n const [goalType, setGoalType] = useState(\r\n predictionStore.goalType\r\n );\r\n const [autoOptimize, setAutoOptimize] = useState(\r\n predictionStore.autoOptimize\r\n );\r\n const [loader, setLoader] = useState(false);\r\n\r\n const handleSubmit = async () => {\r\n if (!selectedAccount) {\r\n message.error(\"Please select an account to make a prediction for\");\r\n return;\r\n }\r\n setLoader(true);\r\n // enqueueSnackbar(\"Generating your predictions\", {\r\n // variant: \"info\"\r\n // });\r\n\r\n let predictionType = EPredictionType.NoRequest;\r\n let goalText = null;\r\n if (budget || applicants) {\r\n predictionType = budget\r\n ? EPredictionType.Budget\r\n : EPredictionType.Applicants;\r\n }\r\n else{\r\n goalText = \"Cost Effective\";\r\n }\r\n\r\n let amount: string = budget || applicants || \"0\";\r\n \r\n if (goalType == \"autoOptimize\") {\r\n if (autoOptimize == \"max\") {\r\n amount = \"9999999\";\r\n goalText = \"Max Applicants\";\r\n predictionType = EPredictionType.Budget;\r\n }\r\n else {\r\n amount = \"0\";\r\n goalText = \"Cost Effective\";\r\n predictionType = EPredictionType.NoRequest;\r\n }\r\n }\r\n\r\n const userPredictionRequest = new UserPredictionRequest(\r\n selectedAccount.accountId,\r\n predictionType,\r\n Number(amount),\r\n null\r\n );\r\n try {\r\n const _ = await predictionStore.getPredictionsAndBuildState(\r\n userPredictionRequest,\r\n selectedAccount,\r\n goalType,\r\n autoOptimize,\r\n goalText\r\n );\r\n history.push(Routes.PredictionPage);\r\n } catch (error) {\r\n message.error(error.message);\r\n } finally {\r\n setLoader(false);\r\n }\r\n };\r\n\r\n const handleClear = () => {\r\n setApplicants(\"\");\r\n setBudget(\"\");\r\n setSelectedAccount(null);\r\n setGoalType(\"manual\");\r\n setAutoOptimize(\"balanced\");\r\n };\r\n\r\n /* Hooks\r\n * ################################################\r\n */\r\n\r\n useOnLoadAsync(async () => {\r\n const accounts = await predictionStore.GetListOfReadyAccounts();\r\n setReadyAccounts(accounts);\r\n setLoading(false);\r\n });\r\n\r\n useSetCurrentPage();\r\n\r\n useKeyboardListener(Guid.NewGuid(), [\"alt\", \"2\"], () => {\r\n history.push(Routes.AdminPreload);\r\n });\r\n\r\n if (uiStore.applicationLoader) {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n\r\n const builder = new InputPageBuilder(classes);\r\n return (\r\n \r\n \r\n \r\n \r\n {builder.Title(\r\n \"Campaign Simulator\"\r\n )}\r\n\r\n {builder.AccountNameAutocompleteInput(\r\n readyAccounts,\r\n selectedAccount,\r\n setSelectedAccount,\r\n handleSubmit,\r\n loading\r\n )}\r\n\r\n {builder.GoalSettingSection(\r\n budget,\r\n setBudget,\r\n applicants,\r\n setApplicants,\r\n handleSubmit,\r\n goalType,\r\n setGoalType,\r\n autoOptimize,\r\n setAutoOptimize\r\n )}\r\n\r\n {builder.ButtonsSection(\r\n loader,\r\n handleSubmit,\r\n handleClear\r\n )}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default withRouter(observer(InputPage));\r\n","import { Box } from \"@material-ui/core\";\r\nimport React from \"react\";\r\nimport \"./HorizontalDivider.scss\";\r\n\r\ninterface Props {\r\n text?: string;\r\n noteText?: string;\r\n}\r\n\r\nconst HorizontalDivider = (props: Props) => {\r\n const { text, noteText } = props;\r\n\r\n return (\r\n \r\n {text && (\r\n \r\n {text}\r\n \r\n )}\r\n {noteText && (\r\n \r\n {noteText}\r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default HorizontalDivider;\r\n","import { Box, Paper } from \"@material-ui/core\";\r\nimport React from \"react\";\r\nimport { NumbersHelper } from \"../../../../services/helpers/NumbersHelper\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport HelpIcon from \"@material-ui/icons/Help\";\r\nimport \"./InformationBox.scss\";\r\nimport { Tooltip } from \"antd\";\r\n\r\nexport interface DataModel {\r\n name: string;\r\n value: string | number;\r\n prefix?: string;\r\n postfix?: string;\r\n explanation?: string;\r\n}\r\n\r\ninterface Props {\r\n title: string;\r\n data?: DataModel[];\r\n style?: React.CSSProperties;\r\n}\r\n\r\nconst InformationBox = (props: Props) => {\r\n const { title, data, style } = props;\r\n\r\n const renderData = () => {\r\n if (data) {\r\n return data.map((res: DataModel, i: number) => {\r\n let finalValue = res.value;\r\n if(res.value === \"-\") {\r\n finalValue = \"-\";\r\n }\r\n else if (typeof res.value == \"number\" || typeof res.value == \"string\") {\r\n finalValue = NumbersHelper.numberWithCommas(res.value);\r\n if (res.prefix) {\r\n finalValue = `${res.prefix}${finalValue}`;\r\n }\r\n if (res.postfix) {\r\n finalValue = `${finalValue}${res.postfix}`;\r\n }\r\n }\r\n return (\r\n \r\n \r\n \r\n {res.name}\r\n \r\n {res.explanation && (\r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n {finalValue}\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 {title}\r\n \r\n\r\n \r\n {renderData()}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default observer(InformationBox);\r\n","import { makeStyles } from \"@material-ui/core\";\r\n\r\nexport const useStyles = makeStyles((theme) => ({\r\n whiteSection: {\r\n boxShadow: \"0 1px 8px 0 rgba(0,0,0,0.1) !important\",\r\n borderRadius: \"5px\",\r\n backgroundColor: \"#FFFFFF\",\r\n },\r\n actionButton: {\r\n width: \"128px\",\r\n height: \"40px\",\r\n textTransform: \"none\",\r\n },\r\n accountTitle: {\r\n fontWeight: 300,\r\n width: \"60%\",\r\n maxWidth: \"500px\",\r\n whiteSpace: \"nowrap\",\r\n overflow: \"hidden\",\r\n textOverflow: \"ellipsis\",\r\n },\r\n}));\r\n","import { makeStyles } from \"@material-ui/core\";\r\n\r\nexport const useStyles = makeStyles((theme) => ({\r\n button: {\r\n width: 85,\r\n fontWeight: 600,\r\n textTransform: 'none'\r\n },\r\n buttonActive: {\r\n width: 85,\r\n backgroundColor: '#EEEEEE',\r\n fontWeight: 600,\r\n textTransform: 'none'\r\n }\r\n}));\r\n","import React, { useContext, useState } from \"react\";\r\nimport { Box } from \"@material-ui/core\";\r\nimport \"./LayoutTopSectionColumn.scss\";\r\n\r\ninterface Props {\r\n children: React.ReactNode;\r\n title?: string;\r\n icon?: React.ReactNode;\r\n padLeft?: boolean;\r\n}\r\n\r\nconst LayoutTopSectionColumn = (props: Props) => {\r\n const { title, icon, children, padLeft = false } = props;\r\n return (\r\n \r\n \r\n {icon}\r\n \r\n {title}\r\n \r\n \r\n\r\n {children}\r\n \r\n );\r\n};\r\n\r\nexport default LayoutTopSectionColumn;\r\n","import React, { useContext, useState, useEffect } from \"react\";\r\nimport { Box, Button, ButtonGroup, Switch } from \"@material-ui/core\";\r\nimport { useStyles } from \"./CampaignStrategy.styles\";\r\nimport { RootStoreContext } from \"../../../../stores/RootStoreContext\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { EStrategyName } from \"../../../../models/prediction/enums/EStrategyName\";\r\nimport {\r\n biddingStrategyType,\r\n jobExpansionStrategyType,\r\n} from \"../../PredictionPage\";\r\nimport LayoutTopSectionColumn from \"../layout-top-section-column/LayoutTopSectionColumn\";\r\nimport { message } from 'antd';\r\n\r\ninterface Props {\r\n biddingStrategy: biddingStrategyType;\r\n setBiddingStrategy: (v: biddingStrategyType) => void;\r\n jobExpansionStrategy: jobExpansionStrategyType;\r\n setJobExpansionStrategy: (v: jobExpansionStrategyType) => void;\r\n}\r\n\r\ntype strategy = \"bidding\" | \"job expansion\";\r\n// type biddingStrategyType = \"normal\" | \"high\";\r\n// type jobExpansionStrategyType = \"with\" | \"without\";\r\n\r\nconst CampaignStrategy = (props: Props) => {\r\n const [blockStrategyChange, setBlockStrategyChange] = useState(false);\r\n const blockChangeTimeInMilliseconds = 650;\r\n\r\n const {\r\n biddingStrategy,\r\n setBiddingStrategy,\r\n jobExpansionStrategy,\r\n setJobExpansionStrategy,\r\n } = props;\r\n const classes = useStyles();\r\n const { predictionStore } = useContext(RootStoreContext);\r\n\r\n const isStrategyActive = (strategy: strategy, strategyText: string) => {\r\n if (strategy === \"bidding\") {\r\n if (strategyText === \"high\") {\r\n return (\r\n predictionStore.activeCampaignStrategy ===\r\n EStrategyName.HighBid ||\r\n predictionStore.activeCampaignStrategy ===\r\n EStrategyName.HighBidAndExpansions\r\n );\r\n } else {\r\n // \"normal\"\r\n return (\r\n predictionStore.activeCampaignStrategy !==\r\n EStrategyName.HighBid &&\r\n predictionStore.activeCampaignStrategy !==\r\n EStrategyName.HighBidAndExpansions\r\n );\r\n }\r\n } else {\r\n // strategy == \"job expansion\"\r\n if (strategyText === \"with\") {\r\n return (\r\n predictionStore.activeCampaignStrategy ===\r\n EStrategyName.Expansions ||\r\n predictionStore.activeCampaignStrategy ===\r\n EStrategyName.HighBidAndExpansions\r\n );\r\n } else {\r\n return (\r\n predictionStore.activeCampaignStrategy !==\r\n EStrategyName.Expansions &&\r\n predictionStore.activeCampaignStrategy !==\r\n EStrategyName.HighBidAndExpansions\r\n );\r\n }\r\n }\r\n };\r\n\r\n const onChangeStrategy = (type: strategy, value: boolean) => (\r\n e: React.MouseEvent\r\n ) => {\r\n\r\n if(blockStrategyChange) {\r\n message.warn(\"Please wait half a second. You can change a strategy every 0.5 seconds\")\r\n return;\r\n }\r\n setBlockStrategyChange(true);\r\n\r\n if (type == \"bidding\") {\r\n if (value && biddingStrategy === \"high\") return;\r\n if (!value && biddingStrategy === \"normal\") return;\r\n\r\n if (value) {\r\n setBiddingStrategy(\"high\");\r\n if (jobExpansionStrategy === \"yes\") {\r\n predictionStore.SetActiveCampaignStrategy(\r\n EStrategyName.HighBidAndExpansions\r\n );\r\n return;\r\n }\r\n predictionStore.SetActiveCampaignStrategy(\r\n EStrategyName.HighBid\r\n );\r\n return;\r\n }\r\n\r\n setBiddingStrategy(\"normal\");\r\n if (jobExpansionStrategy === \"yes\") {\r\n predictionStore.SetActiveCampaignStrategy(\r\n EStrategyName.Expansions\r\n );\r\n return;\r\n }\r\n predictionStore.SetActiveCampaignStrategy(EStrategyName.Normal);\r\n }\r\n if (type == \"job expansion\") {\r\n if (value && jobExpansionStrategy === \"yes\") return;\r\n if (!value && jobExpansionStrategy === \"no\") return;\r\n\r\n if (value) {\r\n setJobExpansionStrategy(\"yes\");\r\n if (biddingStrategy === \"high\") {\r\n predictionStore.SetActiveCampaignStrategy(\r\n EStrategyName.HighBidAndExpansions\r\n );\r\n return;\r\n }\r\n predictionStore.SetActiveCampaignStrategy(\r\n EStrategyName.Expansions\r\n );\r\n return;\r\n }\r\n\r\n setJobExpansionStrategy(\"no\");\r\n if (biddingStrategy === \"high\") {\r\n predictionStore.SetActiveCampaignStrategy(\r\n EStrategyName.HighBid\r\n );\r\n return;\r\n }\r\n predictionStore.SetActiveCampaignStrategy(EStrategyName.Normal);\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if(blockStrategyChange) {\r\n window.setTimeout(() => {\r\n setBlockStrategyChange(false);\r\n }, blockChangeTimeInMilliseconds)\r\n }\r\n }, [blockStrategyChange])\r\n\r\n return (\r\n \r\n \r\n Campaign Strategy\r\n \r\n\r\n \r\n \r\n \r\n \r\n Normal\r\n \r\n \r\n High\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n Yes\r\n \r\n \r\n No\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default observer(CampaignStrategy);\r\n","import { makeStyles } from \"@material-ui/core\";\r\n\r\nexport const useStyles = makeStyles((theme) => ({\r\n blackIcon: {\r\n color: \"#485465\",\r\n },\r\n dateSelect: {\r\n width: 55,\r\n fontSize: \"25px\",\r\n //paddingLeft: \"5px\",\r\n fontWeight: 300,\r\n color: \"#485465\",\r\n fontFamily: \"Comfortaa\",\r\n },\r\n dateDiv: {\r\n [theme.breakpoints.down(1400)]: {\r\n fontSize: '20px'\r\n },\r\n },\r\n}));\r\n","import React, { useContext, useState } from \"react\";\r\nimport { Box, Button, MenuItem, Select } from \"@material-ui/core\";\r\nimport { useStyles } from \"./ReportDetails.styles\";\r\nimport EventIcon from \"@material-ui/icons/Event\";\r\nimport ScheduleIcon from \"@material-ui/icons/Schedule\";\r\nimport AdjustOutlinedIcon from \"@material-ui/icons/AdjustOutlined\";\r\nimport { RootStoreContext } from \"../../../../stores/RootStoreContext\";\r\nimport moment from \"moment\";\r\nimport { NumbersHelper } from \"../../../../services/helpers/NumbersHelper\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { EPredictionType } from \"../../../../models/prediction/UserPredictionRequest\";\r\nimport LayoutTopSectionColumn from \"../layout-top-section-column/LayoutTopSectionColumn\";\r\n\r\ninterface Props { }\r\n\r\nconst ReportDetails = (props: Props) => {\r\n const { predictionStore } = useContext(RootStoreContext);\r\n\r\n const classes = useStyles();\r\n\r\n return (\r\n \r\n \r\n Report Details\r\n \r\n\r\n \r\n }\r\n title=\"Goal\">\r\n {predictionStore.goalText \r\n ?\r\n \r\n {predictionStore.goalText}\r\n \r\n :\r\n \r\n {predictionStore.userPredictionRequest!.amount &&\r\n predictionStore.userPredictionRequest!\r\n .predictionType === EPredictionType.Budget\r\n ? \"$\"\r\n : \"\"}\r\n {predictionStore.userPredictionRequest!.amount\r\n ? NumbersHelper.numberWithCommas(\r\n predictionStore.userPredictionRequest!.amount\r\n )\r\n : \"-\"}{\" \"}\r\n \r\n {predictionStore.userPredictionRequest!.amount\r\n ? predictionStore.userPredictionRequest!\r\n .predictionType\r\n : \"\"}\r\n \r\n \r\n }\r\n \r\n\r\n }\r\n padLeft>\r\n \r\n {moment(new Date()).format(\"DD-MM-YYYY\")}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default observer(ReportDetails);\r\n","import React from \"react\";\r\nimport { Box, Button } from \"@material-ui/core\";\r\nimport { MapPoint } from \"../../../../../stores/prediction/datamodels/MapPoint\";\r\nimport { colorsDictionary } from \"../JobsMap\";\r\n\r\ninterface Props {}\r\nexport const PopupContentRow = (title: string, content: string | number) => {\r\n return (\r\n \r\n \r\n
{title}
\r\n

{content}

\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport const PopupContentTitle = (title: string) => {\r\n return (\r\n \r\n \r\n Jobs by Competition:\r\n \r\n \r\n );\r\n};\r\n\r\nexport const CreateContentRows = (point: MapPoint) => {\r\n return (\r\n <>\r\n {PopupContentRow(\"Jobs\", point.totaljobs)}\r\n\r\n {PopupContentTitle(\"Jobs by Competition:\")}\r\n {PopupContentRow(\"Low\", point.totalLowCompetition)}\r\n {PopupContentRow(\"Medium\", point.totalMediumCompetition)}\r\n {PopupContentRow(\"High\", point.totalHighCompetition)}\r\n \r\n );\r\n};\r\n\r\nexport const PopupTitle = (title: string, category: string) => {\r\n return (\r\n \r\n \r\n {title}\r\n \r\n \r\n );\r\n};\r\n","import React from \"react\";\r\nimport { MapPoint } from \"../../../../../stores/prediction/datamodels/MapPoint\";\r\nimport ReactMapGL, { Popup } from \"react-map-gl\";\r\nimport {\r\n PopupTitle,\r\n PopupContentRow,\r\n CreateContentRows,\r\n} from \"./LocationPopup.factory\";\r\nimport { observer } from \"mobx-react-lite\";\r\n\r\ninterface Props {\r\n selectedJob: MapPoint | null;\r\n setSelectedJob: (job: MapPoint | null) => void;\r\n}\r\n\r\nconst LocationPopup = (props: Props) => {\r\n const { selectedJob, setSelectedJob } = props;\r\n if (!selectedJob) return <>;\r\n\r\n return (\r\n {\r\n setSelectedJob(null);\r\n }}>\r\n
\r\n {PopupTitle(\r\n selectedJob.location,\r\n selectedJob.competitionCategory\r\n )}\r\n {CreateContentRows(selectedJob)}\r\n
\r\n \r\n );\r\n};\r\n\r\nexport default observer(LocationPopup);\r\n","import mapboxgl from \"mapbox-gl\";\r\nimport React, { useState, useEffect, useContext, useMemo } from \"react\";\r\nimport ReactMapGL from \"react-map-gl\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { RootStoreContext } from \"../../../../stores/RootStoreContext\";\r\nimport { MapPoint } from \"../../../../stores/prediction/datamodels/MapPoint\";\r\nimport LocationPopup from \"./components/LocationPopup\";\r\nimport { CreateIconsOnMap } from \"./JobsMap.factory\";\r\nimport \"./JobsMap.scss\";\r\n\r\n/*\r\nresources: https://github.com/leighhalliday/mapbox-react-demo/blob/master/src/App.js\r\nhttps://www.youtube.com/watch?v=JJatzkPcmoI\r\n*/\r\n\r\nexport const colorsDictionary: any = {\r\n Low: \"#008450\",\r\n Medium: \"#efb700\",\r\n High: \"#b81d13\",\r\n};\r\n\r\nconst ACCESS_TOKEN =\r\n \"pk.eyJ1IjoibmFkYXJhIiwiYSI6ImNrbnJlZWwzcDI1ZnMydXBlbG95eDZ2MGYifQ.bHgDDmozMa_8MNeFMUf5iw\";\r\nconst MAP_STYLE = \"mapbox://styles/nadara/cknrf3x8w06ao17pqvbmmbn93\";\r\n\r\ninterface Props {}\r\nconst JobsMap = (props: Props) => {\r\n const { predictionStore } = useContext(RootStoreContext);\r\n\r\n const [viewport, setViewport] = useState({\r\n latitude: predictionStore.predictionResult!.predictions[0].lat,\r\n longitude: predictionStore.predictionResult!.predictions[0].long,\r\n width: \"100%\",\r\n height: \"100%\",\r\n zoom: 3,\r\n });\r\n const [selectedJob, setSelectedJob] = useState(null);\r\n\r\n const mapData: MapPoint[] = useMemo(() => {\r\n return predictionStore.GetJobsDisplayedOnMap;\r\n }, [predictionStore.filteredPredictions]);\r\n\r\n if (!predictionStore.GetJobsDisplayedOnMap) return <>;\r\n\r\n return (\r\n {\r\n setViewport(viewport);\r\n }}\r\n onClick={(e) => {\r\n setSelectedJob(null);\r\n }}>\r\n {CreateIconsOnMap(mapData, (job) => {\r\n setSelectedJob(job);\r\n })}\r\n\r\n \r\n \r\n );\r\n};\r\nexport default React.memo(observer(JobsMap));\r\n\r\n// @ts-ignore\r\n// eslint-disable-next-line import/no-webpack-loader-syntax, import/no-unresolved\r\nmapboxgl.workerClass = require(\"worker-loader!mapbox-gl/dist/mapbox-gl-csp-worker\").default;\r\n","import React from \"react\";\r\nimport { MapPoint } from \"../../../../stores/prediction/datamodels/MapPoint\";\r\nimport FiberManualRecordIcon from '@material-ui/icons/FiberManualRecord';\r\nimport WorkIcon from \"@material-ui/icons/Work\";\r\nimport { colorsDictionary } from \"./JobsMap\";\r\nimport ReactMapGL, { Marker } from \"react-map-gl\";\r\n\r\nexport const CreateIconsOnMap = (\r\n getJobsDisplayedOnMap: MapPoint[],\r\n onIconClick: (job: MapPoint) => void\r\n): any => {\r\n return getJobsDisplayedOnMap.map((job, index: number) => (\r\n \r\n {\r\n e.preventDefault();\r\n onIconClick(job);\r\n }}\r\n style={{\r\n cursor: \"pointer\",\r\n color: colorsDictionary[job.competitionCategory],\r\n // color: \"#225A78\",\r\n width: Math.min(50, 20 + job.totaljobs * 0.125),\r\n height: Math.min(50, 20 + job.totaljobs * 0.125),\r\n }}\r\n />\r\n \r\n ));\r\n};\r\n","export enum EGrantType {\r\n SalesMan = 1,\r\n Admin = 2\r\n}\r\n\r\n\r\nexport class User {\r\n /**\r\n *\r\n */\r\n constructor(\r\n public userId: number,\r\n public name: string,\r\n public email: string,\r\n public password: string,\r\n public GrantType: EGrantType,\r\n ) {\r\n\r\n }\r\n}","import { makeStyles } from \"@material-ui/core\";\r\n\r\nexport const useStyles = makeStyles((theme) => ({\r\n blackIcon: {\r\n color: \"#485465\",\r\n },\r\n dateSelect: {\r\n width: 55,\r\n fontSize: \"14px\",\r\n fontWeight: 300,\r\n color: \"#485465\",\r\n fontFamily: \"Comfortaa\",\r\n },\r\n resetButton: {\r\n \"&.disabled\": {\r\n borderColor: \"#C2C3C4 !important\",\r\n color: \"#C2C3C4 !important\",\r\n pointerEvents: \"none !important\",\r\n },\r\n },\r\n}));\r\n","import { PredictionSettings } from \"../../../../stores/prediction/datamodels/PredictionSettings\";\r\nimport { NumbersHelper } from '../../../../services/helpers/NumbersHelper';\r\n\r\n\r\nexport class SettingsRules {\r\n /**\r\n *\r\n */\r\n constructor(\r\n ) {\r\n\r\n }\r\n\r\n isValidInput(\r\n cvr: string,\r\n cvh: string,\r\n duration: number,\r\n predictionSettings: PredictionSettings,\r\n defaultPredictionSettings: PredictionSettings\r\n ): [boolean, \"error\" | \"warning\" | \"info\", string] {\r\n if (NumbersHelper.isNumber(cvh) == false && cvh !== \"\") {\r\n return [false, \"error\", \"Please make sure app. to hires ratio is a valid number\"];\r\n\r\n }\r\n if (NumbersHelper.isNumber(cvr) == false && cvr !== \"\") {\r\n return [false, \"error\", \"Please make sure clicks to app. ratio is a valid number\"]\r\n }\r\n\r\n if (\r\n (Number(cvr) || undefined) === predictionSettings.cvr &&\r\n (Number(cvh) || undefined) === predictionSettings.cvh &&\r\n duration === predictionSettings.predictionDuration\r\n ) {\r\n return [false, \"warning\", \"You didn't change any setting\"]\r\n }\r\n\r\n if ((Number(cvh) > 100 || Number(cvh) < 0) || (Number(cvr) > 100 || Number(cvr) < 0)) {\r\n return [false, \"error\", \"Make sure cvh and cpa are valid numbers between 0 to 100\"]\r\n }\r\n return [true, \"info\", \"\"];\r\n\r\n\r\n }\r\n}","import React, { useContext, useState } from \"react\";\r\nimport { Box, Button, MenuItem, Select } from \"@material-ui/core\";\r\nimport { useStyles } from \"./Settings.styles\";\r\nimport { RootStoreContext } from \"../../../../stores/RootStoreContext\";\r\nimport moment from \"moment\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport ScheduleIcon from \"@material-ui/icons/Schedule\";\r\nimport { FaPercent } from \"react-icons/fa\";\r\nimport Input from \"../../../common/inputs/input/Input\";\r\nimport LayoutTopSectionColumn from \"../layout-top-section-column/LayoutTopSectionColumn\";\r\nimport {\r\n predictionDuration,\r\n PredictionSettings,\r\n} from \"../../../../stores/prediction/datamodels/PredictionSettings\";\r\nimport { message } from \"antd\";\r\nimport { SettingsRules } from \"./SettingsRules\";\r\n\r\ninterface Props {}\r\n\r\nconst Settings = (props: Props) => {\r\n /* App State\r\n * ################################################\r\n */\r\n const { predictionStore } = useContext(RootStoreContext);\r\n\r\n /* Local State\r\n * ################################################\r\n */\r\n const _initialCvr =\r\n (predictionStore.defaultPredictionSettings.cvr || 0).toFixed(2) ?? \"\";\r\n\r\n const _initialCvh =\r\n predictionStore.defaultPredictionSettings.cvh?.toString() ?? \"\";\r\n\r\n const [cvr, setCvr] = useState(_initialCvr);\r\n const [cvh, setCvh] = useState(_initialCvh);\r\n const [duration, setDuration] = useState(\r\n predictionStore.defaultPredictionSettings.predictionDuration\r\n );\r\n\r\n /* Variables\r\n * ################################################\r\n */\r\n const classes = useStyles();\r\n const settingsRules = new SettingsRules();\r\n\r\n /* Logic\r\n * ################################################\r\n */\r\n const handleReset = () => {\r\n setCvr(_initialCvr);\r\n setCvh(_initialCvh);\r\n setDuration(\r\n predictionStore.defaultPredictionSettings.predictionDuration\r\n );\r\n const predictionSettings = new PredictionSettings(30);\r\n predictionStore.SetPredictionSettings(predictionSettings);\r\n message.info(\"Restored default settings\");\r\n };\r\n\r\n const handleApply = () => {\r\n const [isValid, severity, errorMessage] = settingsRules.isValidInput(\r\n cvr,\r\n cvh,\r\n duration,\r\n predictionStore.predictionSettings,\r\n predictionStore.defaultPredictionSettings\r\n );\r\n if (isValid === false) {\r\n message[severity](errorMessage);\r\n return;\r\n }\r\n const predictionSettings = new PredictionSettings(\r\n duration,\r\n cvr ? Number(cvr) : undefined,\r\n cvh ? Number(cvh) : undefined\r\n );\r\n predictionStore.SetPredictionSettings(predictionSettings);\r\n message.info(\"Applied settings filter succesfully\");\r\n };\r\n\r\n const getClassName = (forElement: \"reset-btn\") => {\r\n let className = \"\";\r\n const appendClassName = (_className: string) => {\r\n className += `${_className} `;\r\n };\r\n\r\n if (forElement === \"reset-btn\") {\r\n appendClassName(classes.resetButton);\r\n if (!cvr && !cvh && duration === 30) {\r\n appendClassName(\"disabled\");\r\n }\r\n }\r\n\r\n return className;\r\n };\r\n\r\n /* Render\r\n * ################################################\r\n */\r\n return (\r\n \r\n \r\n Settings\r\n \r\n\r\n \r\n }>\r\n \r\n {\r\n const _duration: predictionDuration = Number(\r\n e.target.value\r\n ) as predictionDuration;\r\n // predictionStore.setPredictionDuration(duration);\r\n setDuration(_duration);\r\n }}>\r\n 30\r\n 14\r\n 7\r\n \r\n \r\n Days\r\n \r\n \r\n \r\n\r\n }\r\n padLeft>\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 Apply\r\n \r\n \r\n \r\n \r\n RESET\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default observer(Settings);\r\n","import { ValueFormatterParams } from 'ag-grid-community';\r\nimport { PredictionGridModel } from '../../../../stores/prediction/datamodels/PredictionGridModel';\r\n\r\nexport const gridColumns = [\r\n {\r\n groupName: \"Job Details\",\r\n groupData: [\r\n {\r\n field: \"jobId\",\r\n headerName: \"Job Id\",\r\n properties: {\r\n \r\n },\r\n },\r\n {\r\n field: \"jobTitle\",\r\n headerName: \"Job Title\",\r\n properties: {\r\n cellClass: \"ag-link-column\",\r\n onCellClicked: (event: any) => {\r\n const data: PredictionGridModel = event.data;\r\n window.open(data.externalApplyUrl, \"_blank\");\r\n },\r\n },\r\n },\r\n {\r\n field: \"location\",\r\n headerName: \"Location\",\r\n properties: {\r\n \r\n },\r\n\r\n },\r\n {\r\n field: \"category\",\r\n headerName: \"Category\",\r\n properties: {\r\n headerClass: \"ag-right-border-column\",\r\n cellClass: \"ag-right-border-column\",\r\n \r\n },\r\n },\r\n ]\r\n },\r\n {\r\n groupName: \"Predicted Performance\",\r\n groupData: [\r\n {\r\n field: \"clicks\",\r\n headerName: \"Clicks\",\r\n properties: {\r\n type: \"rightAligned\",\r\n },\r\n },\r\n {\r\n field: \"applicants\",\r\n headerName: \"Applicants\",\r\n properties: {\r\n type: \"rightAligned\",\r\n // filter: \"agMultiColumnFilter\",\r\n },\r\n },\r\n {\r\n field: \"conversionRate\",\r\n headerName: \"Conv Rate\",\r\n properties: {\r\n valueFormatter: (params: ValueFormatterParams) => `${params.value}%`,\r\n type: \"rightAligned\",\r\n // filter: \"agMultiColumnFilter\",\r\n // filterParams: {\r\n // filters: [\r\n // {\r\n // filter: 'agNumberColumnFilter',\r\n\r\n // },\r\n // {\r\n // filter: 'agSetColumnFilter',\r\n // display: 'subMenu',\r\n // }\r\n // ]\r\n // }\r\n },\r\n\r\n },\r\n {\r\n field: \"budget\",\r\n headerName: \"Est. Cost\",\r\n properties: {\r\n valueFormatter: (params: ValueFormatterParams) => `$${params.value}`,\r\n type: \"rightAligned\",\r\n // filter: \"agMultiColumnFilter\",\r\n // filterParams: {\r\n // filters: [\r\n // {\r\n // filter: 'agNumberColumnFilter',\r\n\r\n // },\r\n // {\r\n // filter: 'agSetColumnFilter',\r\n // display: 'subMenu',\r\n // }\r\n // ]\r\n // }\r\n },\r\n },\r\n {\r\n field: \"cpc\",\r\n headerName: \"Avg CPC\",\r\n properties: {\r\n valueFormatter: (params: ValueFormatterParams) => `$${params.value}`,\r\n type: \"rightAligned\",\r\n // filter: \"agMultiColumnFilter\",\r\n // filterParams: {\r\n // filters: [\r\n // {\r\n // filter: 'agNumberColumnFilter',\r\n\r\n // },\r\n // {\r\n // filter: 'agSetColumnFilter',\r\n // display: 'subMenu',\r\n // }\r\n // ]\r\n // }\r\n },\r\n },\r\n {\r\n field: \"cpa\",\r\n headerName: \"Avg CPA\",\r\n properties: {\r\n valueFormatter: (params: ValueFormatterParams) => `$${params.value}`,\r\n type: \"rightAligned\",\r\n // filter: \"agMultiColumnFilter\",\r\n // filterParams: {\r\n // filters: [\r\n // {\r\n // filter: 'agNumberColumnFilter',\r\n\r\n // },\r\n // {\r\n // filter: 'agSetColumnFilter',\r\n // display: 'subMenu',\r\n // }\r\n // ]\r\n // },\r\n },\r\n },\r\n ]\r\n },\r\n {\r\n groupName: \"Market Indicators\",\r\n groupData: [\r\n {\r\n field: \"clickRange\",\r\n headerName: \"Click Range\",\r\n properties: {\r\n headerClass: \"ag-left-border-column\",\r\n cellClass: \"ag-left-border-column\",\r\n filter: \"agSetColumnFilter\",\r\n // filterParams: {\r\n // excelMode: 'mac',\r\n // },\r\n },\r\n },\r\n {\r\n field: \"competition\",\r\n headerName: \"Competition\",\r\n properties: {\r\n filter: \"agSetColumnFilter\",\r\n // filterParams: {\r\n // excelMode: 'mac',\r\n // },\r\n },\r\n },\r\n {\r\n field: \"demandFactor\",\r\n headerName: \"Demand\",\r\n properties: {\r\n filter: \"agSetColumnFilter\",\r\n // filterParams: {\r\n // excelMode: 'mac',\r\n // },\r\n },\r\n },\r\n {\r\n field: \"supplyFactor\",\r\n headerName: \"Supply\",\r\n properties: {\r\n headerClass: \"ag-right-border-column\",\r\n cellClass: \"ag-right-border-column\",\r\n filter: \"agSetColumnFilter\",\r\n // filterParams: {\r\n // excelMode: 'mac',\r\n // },\r\n },\r\n },\r\n ]\r\n },\r\n]","import React, { useState, useContext, useEffect, useRef } from \"react\";\r\nimport { AgGridColumn, AgGridReact } from \"ag-grid-react\";\r\nimport { RootStoreContext } from \"../../../../stores/RootStoreContext\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { gridColumns } from \"./gridColumns\";\r\nimport \"ag-grid-community\";\r\nimport \"ag-grid-enterprise\";\r\nimport \"./ag-grid-custom.scss\";\r\n\r\nconst JobsGrid = () => {\r\n const { predictionStore } = useContext(RootStoreContext);\r\n // const gridData = useRef(predictionStore.GetGridData());\r\n const gridRef = useRef(null);\r\n const competitionScoreChartRef = useRef(null);\r\n const clickRangeChartRef = useRef(null);\r\n const [gridData, setGridData] = useState([]);\r\n\r\n //#region Charts Logic\r\n const createCompetitionScoreChart = (params, withDestroy) => {\r\n if (withDestroy) {\r\n competitionScoreChartRef.current.destroyChart();\r\n }\r\n\r\n const competitionScoreChart = {\r\n cellRange: {\r\n columns: [\"jobId\", \"competition\"],\r\n },\r\n chartType: \"groupedBar\",\r\n chartContainer: document.querySelector(\"#competitionScoreChart\"),\r\n aggFunc: \"count\",\r\n chartThemeOverrides: {\r\n common: {\r\n title: {\r\n text: \"Jobs by Competition Score\",\r\n },\r\n tooltipClass: \"my-tooltip-class\",\r\n },\r\n },\r\n };\r\n competitionScoreChartRef.current = params.api.createRangeChart(\r\n competitionScoreChart\r\n );\r\n };\r\n\r\n const createClickRangeChart = (params, withDestroy) => {\r\n if (withDestroy) {\r\n clickRangeChartRef.current.destroyChart();\r\n }\r\n const clickRangeChart = {\r\n cellRange: {\r\n columns: [\"jobId\", \"clickRange\"],\r\n },\r\n chartType: \"groupedBar\",\r\n chartContainer: document.querySelector(\"#clickRangeChart\"),\r\n aggFunc: \"count\",\r\n chartThemeOverrides: {\r\n common: {\r\n title: {\r\n text: \"Jobs by Click Range Score\",\r\n },\r\n tooltipClass: \"my-tooltip-class\",\r\n },\r\n },\r\n };\r\n clickRangeChartRef.current =\r\n params.api.createRangeChart(clickRangeChart);\r\n };\r\n\r\n const onFirstDataRendered = (params) => {\r\n createCompetitionScoreChart(params, false);\r\n createClickRangeChart(params, false);\r\n\r\n params.api.deselectAll();\r\n params.api.clearRangeSelection();\r\n };\r\n\r\n const customChartThemes = {\r\n myCustomTheme: {\r\n baseTheme: \"ag-pastel\",\r\n palette: {\r\n fills: [\"#30789F\", \"#a2bf8a\", \"#ebcc87\"],\r\n strokes: [\"#225A78\", \"#718661\", \"#a48f5f\"],\r\n },\r\n overrides: {\r\n common: {\r\n padding: {\r\n top: 20,\r\n },\r\n title: {\r\n enabled: true,\r\n fontSize: 28,\r\n fontFamily: \"Open Sans, sans-serif\",\r\n paddingY: 40,\r\n color: \"#225A78\",\r\n texAlign: \"left\",\r\n },\r\n legend: {\r\n enabled: false,\r\n item: {\r\n label: {\r\n fontStyle: \"italic\",\r\n fontWeight: \"bold\",\r\n fontSize: 25,\r\n fontFamily: \"Palatino, serif\",\r\n color: \"#485465\",\r\n },\r\n },\r\n },\r\n },\r\n },\r\n },\r\n };\r\n //#endregion\r\n\r\n const sideBarConfiguration = {\r\n toolPanels: [\r\n {\r\n id: \"filters\",\r\n labelDefault: \"Filters\",\r\n labelKey: \"filters\",\r\n iconKey: \"filter\",\r\n toolPanel: \"agFiltersToolPanel\",\r\n },\r\n {\r\n id: \"columns\",\r\n labelDefault: \"Columns\",\r\n labelKey: \"columns\",\r\n iconKey: \"columns\",\r\n toolPanel: \"agColumnsToolPanel\",\r\n },\r\n ],\r\n // defaultToolPanel: \"filters\",\r\n position: \"right\",\r\n };\r\n\r\n useEffect(() => {\r\n setGridData(predictionStore.GetGridData());\r\n }, [\r\n predictionStore.activeCampaignStrategy,\r\n predictionStore.predictionSettings,\r\n ]);\r\n\r\n return (\r\n
\r\n \r\n {\r\n e.api.sizeColumnsToFit();\r\n }}\r\n onFilterChanged={(e) => {\r\n if (predictionStore.gridFilterOptions.useOldFilter) {\r\n // console.log(\r\n // predictionStore.gridFilterOptions\r\n // .agGridFilterModel\r\n // );\r\n\r\n const filteredColumns = Object.keys(\r\n predictionStore.gridFilterOptions\r\n .agGridFilterModel\r\n );\r\n // console.log(filteredColumns);\r\n filteredColumns.forEach((column) => {\r\n const columnInstance =\r\n e.api.getFilterInstance(column);\r\n columnInstance.setModel(\r\n predictionStore.gridFilterOptions\r\n .agGridFilterModel[column]\r\n );\r\n columnInstance.applyModel();\r\n });\r\n e.api.onFilterChanged();\r\n\r\n predictionStore.gridFilterOptions.setUseOldFilterAs(\r\n false\r\n );\r\n return;\r\n }\r\n\r\n const filterModel = e.api.getFilterModel();\r\n predictionStore.gridFilterOptions.setUseOldFilterAs(\r\n false\r\n );\r\n\r\n const includedPredictionsAfterFilter = {};\r\n e.api.forEachNodeAfterFilter((rowNode) => {\r\n includedPredictionsAfterFilter[\r\n rowNode.data.jobId.toString()\r\n ] = true;\r\n });\r\n\r\n if (\r\n Object.keys(includedPredictionsAfterFilter)\r\n .length == 0\r\n ) {\r\n includedPredictionsAfterFilter[\"empty\"] = true;\r\n }\r\n\r\n // console.log(\r\n // includedPredictionsAfterFilter,\r\n // Object.keys(includedPredictionsAfterFilter).length\r\n // );\r\n\r\n predictionStore.SetFilteredPredictions(\r\n includedPredictionsAfterFilter\r\n );\r\n predictionStore.setGridFilterOptions(\r\n includedPredictionsAfterFilter,\r\n filterModel\r\n );\r\n\r\n createClickRangeChart(e, true);\r\n createCompetitionScoreChart(e, true);\r\n // e.api.deselectAll();\r\n // e.api.clearRangeSelection();\r\n }}\r\n chartThemeOverrides={{\r\n bar: {\r\n series: {\r\n fillOpacity: 1,\r\n strokeOpacity: 1,\r\n strokeWidth: 2,\r\n shadow: {\r\n enabled: true,\r\n color: \"rgba(0, 0, 0, 0.3)\",\r\n xOffset: 10,\r\n yOffset: 5,\r\n blur: 8,\r\n },\r\n highlightStyle: {\r\n fill: \"#225A78\",\r\n stroke: \"#225A78\",\r\n },\r\n },\r\n },\r\n histogram: {\r\n series: {\r\n fillOpacity: 1,\r\n strokeOpacity: 1,\r\n strokeWidth: 2,\r\n shadow: {\r\n enabled: true,\r\n color: \"rgba(0, 0, 0, 0.3)\",\r\n xOffset: 10,\r\n yOffset: 5,\r\n blur: 8,\r\n },\r\n highlightStyle: {\r\n fill: \"#30789F\",\r\n stroke: \"#30789F\",\r\n },\r\n },\r\n },\r\n }}\r\n autoSizePadding\r\n onFirstDataRendered={onFirstDataRendered}>\r\n {createGrid(gridColumns)}\r\n \r\n \r\n
\r\n );\r\n};\r\n\r\n//#region Helper Components\r\n\r\nconst createGrid = (gridColumns) => {\r\n return gridColumns.map((group) =>\r\n createGridGroup(group.groupName, group.groupData)\r\n );\r\n};\r\n\r\nconst createGridGroup = (title, groupColumns) => {\r\n return (\r\n \r\n {groupColumns.map((columnData) => (\r\n \r\n ))}\r\n \r\n );\r\n};\r\n\r\n//#endregion\r\n\r\nexport default observer(JobsGrid);\r\n","\r\n\r\n/**\r\n * A class that triggers downloads in JavaScript browser\r\n * API example new FileDownloader().Download(datasourceFunc, fileName);\r\n */\r\nexport class FileDownloader {\r\n /**\r\n *\r\n */\r\n constructor() { }\r\n\r\n\r\n public DownloadFromBase64(base64string: string, fileName: string) {\r\n const byteCharacters = atob(base64string);\r\n const byteNumbers = new Array(byteCharacters.length);\r\n for (let i = 0; i < byteCharacters.length; i++) {\r\n byteNumbers[i] = byteCharacters.charCodeAt(i);\r\n }\r\n const byteArray = new Uint8Array(byteNumbers);\r\n this.DownloadFromBytes(byteArray, fileName);\r\n }\r\n\r\n public DownloadFromBytes(byteArray: Uint8Array | Uint16Array | ArrayBuffer, fileName: string) {\r\n const blob = new Blob([new Uint8Array(byteArray)]);\r\n this.DownloadFromBlob(blob, fileName);\r\n }\r\n\r\n public DownloadFromBlob(blob: Blob, fileName: string) {\r\n const url = window.URL.createObjectURL(blob);\r\n const link = document.createElement(\"a\") as any;\r\n link.href = url;\r\n link.setAttribute(\"download\", fileName); \r\n document.body.appendChild(link);\r\n link.click();\r\n }\r\n}","import { EStrategyName } from \"./enums/EStrategyName\";\r\nimport { Prediction } from \"./Prediction\";\r\nimport { EPredictionType } from \"./UserPredictionRequest\";\r\nimport { PredictionGridModel } from './../../stores/prediction/datamodels/PredictionGridModel';\r\nimport { PredictionSummary } from './../../stores/prediction/datamodels/PredictionSummary';\r\n\r\nexport class UserFilterResult {\r\n /**\r\n *\r\n */\r\n constructor(\r\n public batchId: string,\r\n public accountId: number,\r\n public accountName: string,\r\n public gridData: PredictionGridModel[],\r\n public predictionSummary: PredictionSummary,\r\n public strategyName: EStrategyName,\r\n public predictionType: EPredictionType,\r\n public durationInDays: number,\r\n public goalText: string | null,\r\n ) {\r\n }\r\n}","\r\nexport class CreateExcelFromBatchRequest {\r\n /**\r\n * ctor\r\n */\r\n constructor(\r\n public batchId: string,\r\n ) {} \r\n}","import React, { useState, useContext, useEffect } from \"react\";\r\nimport axios from \"axios\";\r\nimport { Box, Button } from \"@material-ui/core\";\r\nimport { v4 as uuidv4 } from \"uuid\";\r\nimport HorizontalDivider from \"../common/horizontal-divider/HorizontalDivider\";\r\nimport InformationBox from \"./components/information-box/InformationBox\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { RootStoreContext } from \"./../../stores/RootStoreContext\";\r\nimport VerticalDivider from \"../common/vertical-divider/VerticalDivider\";\r\nimport { useStyles } from \"./PredictionPage.styles\";\r\nimport CampaignStrategy from \"./components/campaign-strategy/CampaignStrategy\";\r\nimport ReportDetails from \"./components/report-details/ReportDetails\";\r\nimport EditIcon from \"@material-ui/icons/Edit\";\r\nimport downlodFilePng from \"../../assets/images/file-download-x.png\";\r\nimport useSetCurrentPage from \"../../hooks/useSetCurrentPage\";\r\nimport { Redirect, RouteComponentProps } from \"react-router-dom\";\r\nimport { Routes } from \"../../constants/Routes\";\r\nimport { NumbersHelper } from \"../../services/helpers/NumbersHelper\";\r\nimport { withRouter } from \"react-router\";\r\nimport { EStrategyName } from \"../../models/prediction/enums/EStrategyName\";\r\nimport { StringHelper } from \"../../services/StringHelper\";\r\nimport JobsMap from \"./components/jobs-map/JobsMap\";\r\nimport Settings from \"./components/settings-tab/Settings\";\r\nimport JobsGrid from \"./components/jobs-grid/JobsGrid\";\r\nimport PredictionService from \"./../../services/prediction/PredictionService\";\r\nimport { CreatePredictionsExcelRequest } from \"./../../models/prediction/CreatePredictionsExcelRequest\";\r\nimport { Prediction } from \"./../../models/prediction/Prediction\";\r\nimport { useSnackbar } from \"notistack\";\r\nimport { FileDownloader } from \"../../services/FileDownloader\";\r\nimport { PredictionSummary } from \"./../../stores/prediction/datamodels/PredictionSummary\";\r\nimport { message } from \"antd\";\r\nimport Loader from \"./../common/feedback/loader/Loader\";\r\nimport { AuditPredictionRequest } from \"../../models/predictionsAudit/AuditPredictionRequest\";\r\nimport { UserFilterResult } from \"./../../models/prediction/UserFilterResult\";\r\nimport { CreateExcelFromBatchRequest } from \"../../models/prediction/CreateExcelFromBatchRequest\";\r\n\r\ninterface Props extends RouteComponentProps {}\r\n\r\ntype buttonType = \"edit\";\r\n\r\nexport type biddingStrategyType = \"normal\" | \"high\";\r\nexport type jobExpansionStrategyType = \"yes\" | \"no\";\r\n\r\nconst PredictionPage = (props: Props) => {\r\n /* Props\r\n * ################################################\r\n */\r\n const { history } = props;\r\n\r\n /* App State\r\n * ################################################\r\n */\r\n const { predictionStore } = useContext(RootStoreContext);\r\n\r\n /* Local State\r\n * ################################################\r\n */\r\n\r\n const [isExcelDownloadInProcess, setIsExcelDownloadInProcess] =\r\n useState(false);\r\n\r\n // #region Campaign Strategy state\r\n const [biddingStrategy, setBiddingStrategy] = useState(\r\n predictionStore.activeCampaignStrategy === EStrategyName.HighBid ||\r\n predictionStore.activeCampaignStrategy ===\r\n EStrategyName.HighBidAndExpansions\r\n ? \"high\"\r\n : \"normal\"\r\n );\r\n const [jobExpansionStrategy, setJobExpansionStrategy] =\r\n useState(\r\n predictionStore.activeCampaignStrategy ===\r\n EStrategyName.Expansions ||\r\n predictionStore.activeCampaignStrategy ===\r\n EStrategyName.HighBidAndExpansions\r\n ? \"yes\"\r\n : \"no\"\r\n );\r\n // #endregion\r\n\r\n /* Variables declaration\r\n * ################################################\r\n */\r\n const classes = useStyles();\r\n const { enqueueSnackbar, closeSnackbar } = useSnackbar();\r\n\r\n /* Effect(s)\r\n * ################################################\r\n */\r\n\r\n useSetCurrentPage();\r\n\r\n useEffect(() => {\r\n return function cleanUp() {\r\n predictionStore.SetFilteredPredictions({ fullList: true });\r\n // predictionStore.setIcludedJobDictionary({\r\n // noneEmpty: true,\r\n // });\r\n };\r\n }, []);\r\n\r\n /* Logic\r\n * ################################################\r\n */\r\n const displayRange = (leftNumber: string, rightNumber: string): string => {\r\n if (\r\n !NumbersHelper.isNumber(leftNumber) &&\r\n !NumbersHelper.isNumber(rightNumber)\r\n ) {\r\n return \"-\";\r\n }\r\n if (leftNumber === \"0\" && rightNumber === \"0\") {\r\n return \"-\";\r\n }\r\n\r\n return `$${leftNumber} - $${rightNumber}`;\r\n };\r\n\r\n const editHandler = (e: React.MouseEvent) => {\r\n history.push(Routes.InputPage);\r\n };\r\n\r\n const returnNumberOrDashIfNaN = (value: string) => {\r\n let valueNormalized = Number(value.replace(/[,%&]/gi, \"\"));\r\n if (isNaN(valueNormalized)) {\r\n return \"-\";\r\n }\r\n return value;\r\n };\r\n\r\n const downloadExcelHandler = async () => {\r\n if (isExcelDownloadInProcess) {\r\n message.error(\"Download already in progress\");\r\n return;\r\n }\r\n\r\n if (predictionStore.GetPredictionSummary.budget === \"0\") {\r\n message.error(\r\n \"You can't download an excel since all the data is filtered out\"\r\n );\r\n return;\r\n }\r\n\r\n setIsExcelDownloadInProcess(true);\r\n enqueueSnackbar(\"Preparing PPR excel for download\", {\r\n variant: \"info\",\r\n });\r\n\r\n const accountId = predictionStore.account!.accountId;\r\n const accountName = predictionStore.account!.accountName;\r\n const predictionsGridData = predictionStore.GetGridData(\r\n predictionStore.filteredPredictions\r\n );\r\n\r\n const summaryModel = predictionStore.GetPredictionSummary;\r\n const activeStrategy =\r\n predictionStore.activeCampaignStrategy as EStrategyName;\r\n const predictionType =\r\n predictionStore.userPredictionRequest!.predictionType;\r\n const durationInDays =\r\n predictionStore.predictionSettings.predictionDuration;\r\n const goalText =\r\n predictionStore.goalText;\r\n\r\n const batchSize = 4000;\r\n const predictionsArrayLength = predictionsGridData.length;\r\n const batchGuid = uuidv4();\r\n\r\n for (let i = 0; i < predictionsArrayLength; i += batchSize) {\r\n let batchEndIndex = i + (batchSize - 1);\r\n batchEndIndex =\r\n predictionsArrayLength > batchEndIndex\r\n ? batchEndIndex\r\n : i + (predictionsArrayLength - i);\r\n // console.log(batchEndIndex);\r\n\r\n const predictionsBatch = predictionsGridData.slice(\r\n i,\r\n batchEndIndex + 1\r\n );\r\n const userFilterResult: UserFilterResult = new UserFilterResult(\r\n batchGuid,\r\n accountId,\r\n accountName,\r\n predictionsBatch,\r\n summaryModel,\r\n activeStrategy,\r\n predictionType,\r\n durationInDays,\r\n goalText\r\n );\r\n await PredictionService.PredictionBatchUpload(userFilterResult);\r\n }\r\n\r\n const createExcelFromBatchRequest = new CreateExcelFromBatchRequest(\r\n batchGuid\r\n );\r\n const createPredictionsExcelResponse =\r\n await PredictionService.CreateExcelFromBatch(\r\n createExcelFromBatchRequest\r\n );\r\n\r\n const creationDate = new Date(\r\n createPredictionsExcelResponse.creationDate\r\n );\r\n\r\n const fileName = `${accountName}-PPR-${creationDate.getUTCFullYear()}-${\r\n creationDate.getUTCMonth() + 1\r\n }-${creationDate.getUTCDate()}-${\r\n createPredictionsExcelResponse.marginPct\r\n }`;\r\n\r\n const excelBlob = (\r\n await axios.get(createPredictionsExcelResponse.excelUrl, {\r\n responseType: \"blob\",\r\n })\r\n ).data;\r\n\r\n new FileDownloader().DownloadFromBlob(excelBlob, `${fileName}.xlsx`);\r\n\r\n setIsExcelDownloadInProcess(false);\r\n };\r\n\r\n // const auditPredictions = async () => {\r\n // if (predictionStore.GetPredictionSummary.budget === \"0\") {\r\n // return;\r\n // }\r\n\r\n // const accountId = predictionStore.account!.accountId;\r\n // const predictionsGridData = predictionStore.GetGridData(\r\n // predictionStore.filteredPredictions\r\n // );\r\n // const summaryModel = predictionStore.GetPredictionSummary;\r\n // const activeStrategy =\r\n // predictionStore.activeCampaignStrategy as EStrategyName;\r\n // const predictionType =\r\n // predictionStore.userPredictionRequest!.predictionType;\r\n // const durationInDays =\r\n // predictionStore.predictionSettings.predictionDuration;\r\n\r\n // const auditRequest: AuditPredictionRequest = new AuditPredictionRequest(\r\n // accountId,\r\n // /* predictionsGridData */ [],\r\n // summaryModel,\r\n // activeStrategy,\r\n // predictionType,\r\n // durationInDays\r\n // );\r\n\r\n // await PredictionService.AuditPredictions(auditRequest);\r\n // };\r\n\r\n /* Render\r\n * ################################################\r\n */\r\n\r\n if (!predictionStore.GetPredictionSummary) {\r\n throw new Error(\"There is no prediction summary calculated\");\r\n }\r\n\r\n if (!predictionStore.predictionResult) {\r\n return ;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n Predictive Performance Report:{\" \"}\r\n \r\n {predictionStore.account!.accountName}\r\n \r\n \r\n \r\n\r\n \r\n {isExcelDownloadInProcess ? (\r\n \r\n ) : (\r\n \r\n }\r\n onClick={async () => {\r\n try {\r\n const tasks = [];\r\n tasks.push(downloadExcelHandler());\r\n // tasks.push(auditPredictions());\r\n await Promise.all(tasks);\r\n } catch (error) {\r\n console.error(error);\r\n message.error(\"An error occured\");\r\n }\r\n }}>\r\n Download\r\n \r\n )}\r\n\r\n }>\r\n Edit Goal\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 \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 \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 {/* Charts Section */}\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\r\nexport default withRouter(observer(PredictionPage));\r\n","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAATCAYAAABPwleqAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAD6ADAAQAAAABAAAAEwAAAACiJqGKAAACGElEQVQ4EY2TT2gTQRTG35tZa8VS6EGRQhW6rZ78Q0FKqYLiQQ8ieumhifWkB6mCqJhNDQxoiHhoDxUFLyJke1DQiz2oNz2LetK2NoKXVLGgqKEh2Xl9b+mi2U2kD7Iz33vvt5n5ZhYPGeN8mV+5jIhHgUBB06BvCvSdhZn8q3/L6KYmThEFTxDwNwEFDUVAzbmOMIdoAWG8VCzci3ocBveI0Mo5MF+88T4qyLgzndtbt7V3vKqHALSLLNx1U173ol/ISb3FMqX0N4joc09/+0FElSeArJvK3JbqumDuM+xLjchOAJEigisCO/JoFbZry0dcLj8npO6oh73ZwSvpFP1f+NP0xSr3HItAGd1R7ykPJ2WegPvOXHdt3Q7C5s7Z0v3Mz74xb4gCtW3RzwvUEIk9U2CHgayPf37kdo9muqgOL/hEJhuoNZGAB07s8xHhAwCerSB4cs4KVXg08Rck4McjIwEqfU1MYVevIsDbdH/bTBwUnYAl2aE3vGZIzOIF4EtjjA3nsUdT+FdtJcuXYSODZb7v593TZmuMC2UC7h0z2wnwAv/zGw1wTvZMQdWsCwZbPcKNZTYtu+AXnvHHMMt6uBmcOGf+ah5wo/zCKPm3jkfz+OigUhWyFgKop3tT3uF4Q1zzNlx2sSJ5p83iI7bVI0vhZY83N9WKpiTPvgAMXZrc9P3r8n7SNtSSaxWa9NJc8eac1FcB3EC/WajJgc4AAAAASUVORK5CYII=\"","export default __webpack_public_path__ + \"static/media/ppr-admin-background.1479a55f.jpg\";","import { makeStyles } from \"@material-ui/core\";\r\nimport pprBg from \"../../assets/images/ppr-admin-background.jpg\";\r\n\r\nexport const useStyles = makeStyles((theme) => ({\r\n background: {\r\n backgroundImage: `url(${pprBg})`,\r\n backgroundRepeat: \"no-repeat\",\r\n backgroundSize: \"cover\",\r\n backgroundPosition: '0% 55%',\r\n width: \"100%\",\r\n height: \"calc(100vh - 80px)\",\r\n },\r\n paperWrapper: {\r\n position: \"relative\",\r\n height: \"438px\",\r\n width: \"641px\",\r\n maxWidth: \"70%\",\r\n maxHeight: \"70%\",\r\n paddingLeft: theme.spacing(14),\r\n paddingTop: theme.spacing(14),\r\n },\r\n paper: {\r\n padding: theme.spacing(12),\r\n width: \"100%\",\r\n minHeight: \"100%\",\r\n },\r\n pprTitle: {\r\n color: \"#485465\",\r\n fontFamily: \"Open Sans\",\r\n fontSize: \"20px\",\r\n fontWeight: 800,\r\n letterSpacing: 0,\r\n lineHeight: \"27px\",\r\n },\r\n subTitle: {\r\n color: \"#485465\",\r\n fontFamily: \"Open Sans\",\r\n fontSize: \"16px\",\r\n lineHeight: \"22px\",\r\n marginBottom: theme.spacing(1),\r\n },\r\n or: {\r\n height: \"22px\",\r\n color: \"#999B9D\",\r\n fontFamily: \"Open Sans\",\r\n fontSize: \"16px\",\r\n lineHeight: \"22px\",\r\n },\r\n clearButton: {\r\n color: \"#3992B3\",\r\n fontFamily: \"Open Sans\",\r\n fontSize: \"14px\",\r\n lineHeight: \"19px\",\r\n textTransform: 'none'\r\n },\r\n}));\r\n","export class PreloadRequest {\r\n /**\r\n *\r\n */\r\n constructor(\r\n public accountId: number,\r\n public margin: number,\r\n public cvh: number,\r\n public userId: number,\r\n public areExpansionsExcluded: boolean\r\n ) {}\r\n}\r\n","import { ServiceUrls } from \"../../constants/ServiceUrls\";\r\nimport { BaseService } from \"../BaseService\";\r\nimport { Account } from '../../models/Account';\r\nimport { ApiRoutes } from './../../constants/ApiRoutes';\r\n\r\nexport class AccountService extends BaseService {\r\n public async GetAllAccounts(): Promise {\r\n const accounts = await this.get(ApiRoutes.Account.GetAllAccounts);\r\n return accounts;\r\n }\r\n \r\n}\r\n\r\nexport default new AccountService(ServiceUrls.Account);","import { JSXElementConstructor, ReactElement } from \"react\";\r\nimport {\r\n Box,\r\n Button,\r\n Checkbox,\r\n FormControlLabel,\r\n FormGroup,\r\n} from \"@material-ui/core\";\r\nimport { Account } from \"../../models/Account\";\r\nimport Loader from \"../common/feedback/loader/Loader\";\r\nimport AutoCompleteInput from \"../common/inputs/auto-complete-input/AutoCompleteInput\";\r\nimport Input from \"../common/inputs/input/Input\";\r\n\r\nexport class AdminPreloadPageBuilder {\r\n /**\r\n *\r\n */\r\n constructor(public classes: any) {}\r\n\r\n public Title(title: string) {\r\n return

{title}

;\r\n }\r\n\r\n public AccountAutocompleteInput(\r\n accountList: Account[],\r\n account: Account | null,\r\n setAccount: (account: Account | null) => void,\r\n handleSubmit: () => void\r\n ) {\r\n return (\r\n \r\n

Select account

\r\n {accountList.length === 0 ? (\r\n \r\n \r\n \r\n ) : (\r\n v?.accountName ?? \"\"}\r\n onChange={(v) => setAccount(v)}\r\n onEnterPress={handleSubmit}\r\n filterOptions={(accounts, state) =>\r\n accounts.filter(\r\n (account) =>\r\n account?.accountName\r\n .toLowerCase()\r\n .includes(\r\n state.inputValue.toLowerCase()\r\n ) ||\r\n account?.accountId.toString() ===\r\n state.inputValue\r\n )\r\n }\r\n value={account}\r\n />\r\n )}\r\n
\r\n );\r\n }\r\n\r\n public Input(\r\n title: string,\r\n margin: string,\r\n setMargin: (value: string) => void,\r\n handleSubmit: () => void\r\n ) {\r\n return (\r\n \r\n

{title}

\r\n \r\n
\r\n );\r\n }\r\n\r\n public CheckBox(\r\n label: string,\r\n areExpansionsExcluded: boolean,\r\n setAreExpansionsExcluded: (state: boolean) => void\r\n ) {\r\n return (\r\n \r\n {\r\n setAreExpansionsExcluded(event.target.checked);\r\n }}\r\n color=\"primary\"\r\n />\r\n }\r\n label={label}\r\n />\r\n \r\n );\r\n }\r\n\r\n public Buttons(\r\n loading: boolean,\r\n handleSubmit: () => void,\r\n handleClear: () => void\r\n ) {\r\n if (loading) {\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n return (\r\n <>\r\n \r\n \r\n Save changes\r\n \r\n \r\n\r\n \r\n \r\n Clear form\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n","export type severity = \"error\" | \"warning\" | \"info\";\r\n\r\nexport class ValidatorResponse {\r\n /**\r\n *\r\n */\r\n constructor(\r\n public isValid: boolean,\r\n public severity: severity,\r\n public errorMessage: string\r\n ) {\r\n\r\n }\r\n}\r\n\r\nexport interface IInputValidator {\r\n isValid(requestParams: T): ValidatorResponse;\r\n notifyError(validatorResponse: ValidatorResponse): void;\r\n}\r\n\r\n","import { Account } from '../../models/Account';\r\nimport { BaseInputValidator } from '../../services/input-validator/BaseInputValidator';\r\nimport { NumbersHelper } from '../../services/helpers/NumbersHelper';\r\nimport { IInputValidator, severity, ValidatorResponse } from '../../services/input-validator/IInputValidator';\r\n\r\nexport interface InputType {\r\n account: Account | null | undefined;\r\n margin?: string;\r\n cvh?: string;\r\n}\r\n\r\nexport class AdminPreloadRule\r\n extends BaseInputValidator\r\n implements IInputValidator {\r\n\r\n isValid(requestParams: InputType): ValidatorResponse {\r\n if (!requestParams.account) {\r\n return new ValidatorResponse(false, \"error\", \"Please select an account\");\r\n }\r\n\r\n if (!requestParams.margin) {\r\n return new ValidatorResponse(false, \"error\", \"Please select a margin\");\r\n }\r\n\r\n if (!requestParams.cvh) {\r\n return new ValidatorResponse(false, \"error\", \"Please enter applicants to hire conversion rate\");\r\n }\r\n\r\n if (NumbersHelper.isNumber(requestParams.cvh) === false) {\r\n return new ValidatorResponse(false, \"error\", \"Please make sure applicants to hire conversion is a valid number\");\r\n }\r\n\r\n if (\r\n NumbersHelper.isNumber(requestParams.margin) === false ||\r\n Number(requestParams.margin) < 0 ||\r\n Number(requestParams.margin) > 100\r\n ) {\r\n return new ValidatorResponse(false, \"error\", \"Please make sure margin is a number between 0 and 100\");\r\n }\r\n\r\n\r\n\r\n return new ValidatorResponse(true, \"info\", \"\");\r\n }\r\n}","import { message } from 'antd';\r\nimport { IInputValidator, severity, ValidatorResponse } from './IInputValidator';\r\n\r\n\r\nexport abstract class BaseInputValidator implements IInputValidator {\r\n abstract isValid(requestParams: T): ValidatorResponse;\r\n\r\n notifyError(validatorResponse: ValidatorResponse): void {\r\n // tightly coupled to ant design\r\n message[validatorResponse.severity](validatorResponse.errorMessage);\r\n }\r\n}\r\n","import { Box, Paper } from \"@material-ui/core\";\r\nimport { ReactElement, useContext, useState } from \"react\";\r\nimport { useStyles } from \"./AdminPreloadPage.styles\";\r\nimport { message } from \"antd\";\r\nimport useSetCurrentPage from \"../../hooks/useSetCurrentPage\";\r\nimport { PreloadRequest } from \"../../models/prediction/PreloadRequest\";\r\nimport { Account } from \"../../models/Account\";\r\nimport useOnLoadAsync from \"../../hooks/useOnLoadAsync\";\r\nimport AccountService from \"../../services/account/AccountService\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { RootStoreContext } from \"../../stores/RootStoreContext\";\r\nimport { ErrorMessages } from \"../../constants/ErrorMessages\";\r\nimport { AdminPreloadPageBuilder } from \"./AdminPreloadPage.builder\";\r\nimport useKeyboardListener from \"../../hooks/useKeyboardListener\";\r\nimport { Guid } from \"../../services/Guid\";\r\nimport { RouteComponentProps } from \"react-router-dom\";\r\nimport { Routes } from \"../../constants/Routes\";\r\nimport { withRouter } from \"react-router\";\r\nimport { AdminPreloadRule, InputType } from \"./AdminPreloadRule\";\r\nimport { IInputValidator } from \"../../services/input-validator/IInputValidator\";\r\nimport { EGrantType } from \"../../models/users/User\";\r\n\r\ninterface Props extends RouteComponentProps {}\r\n\r\nconst inputDefaultValues = {\r\n margin: \"50\",\r\n cvh: \"5\",\r\n};\r\n\r\nfunction AdminPreloadPage(props: Props): ReactElement {\r\n const { history } = props;\r\n const { userStore, predictionStore } = useContext(RootStoreContext);\r\n const [margin, setMargin] = useState(inputDefaultValues.margin);\r\n const [cvh, setCvh] = useState(inputDefaultValues.cvh);\r\n const [loading, setLoading] = useState(false);\r\n const [account, setAccount] = useState(null);\r\n const [accountList, setAccountList] = useState([]);\r\n const [areExpansionsExcluded, setAreExpansionsExcluded] = useState(true);\r\n const classes = useStyles();\r\n\r\n const handleSubmit = async () => {\r\n const ruleValidator: IInputValidator =\r\n new AdminPreloadRule();\r\n const validatorResponse = ruleValidator.isValid({\r\n account,\r\n margin,\r\n cvh,\r\n });\r\n if (!validatorResponse.isValid) {\r\n ruleValidator.notifyError(validatorResponse);\r\n return;\r\n }\r\n\r\n const preloadRequest: PreloadRequest = new PreloadRequest(\r\n account!.accountId,\r\n Number(margin),\r\n Number(cvh),\r\n userStore.user!.userId,\r\n areExpansionsExcluded\r\n );\r\n\r\n try {\r\n setLoading(true);\r\n const result = await predictionStore.PreloadAccount(preloadRequest);\r\n message.success(result);\r\n history.push(Routes.InputPage);\r\n } catch (error: any) {\r\n message.error(error.message);\r\n } finally {\r\n setLoading(false);\r\n }\r\n };\r\n\r\n const handleClear = () => {\r\n setAccount(null);\r\n setMargin(inputDefaultValues.margin);\r\n setCvh(inputDefaultValues.cvh);\r\n };\r\n\r\n /* Hooks\r\n * ################################################\r\n */\r\n\r\n useSetCurrentPage();\r\n\r\n useOnLoadAsync(async () => {\r\n const accounts = await userStore.MakeAuthorizedHttpRequest(async () => {\r\n return await AccountService.GetAllAccounts();\r\n });\r\n if (!accounts) {\r\n message.error(ErrorMessages.TokenExpired);\r\n return;\r\n }\r\n setAccountList(accounts);\r\n });\r\n\r\n useKeyboardListener(Guid.NewGuid(), [\"alt\", \"1\"], () => {\r\n history.push(Routes.InputPage);\r\n });\r\n\r\n const builder = new AdminPreloadPageBuilder(classes);\r\n return (\r\n \r\n \r\n \r\n
\r\n {/* {builder.Title(\"Admin Page - Preparation\")} */}\r\n {builder.AccountAutocompleteInput(\r\n accountList,\r\n account,\r\n setAccount,\r\n handleSubmit\r\n )}\r\n {userStore.user!.eGrantType === EGrantType.Admin &&\r\n builder.Input(\r\n \"Margin (%)\",\r\n margin,\r\n setMargin,\r\n handleSubmit\r\n )}\r\n\r\n {builder.Input(\r\n \"Applicants to hire conversion rate (%)\",\r\n cvh,\r\n setCvh,\r\n handleSubmit\r\n )}\r\n\r\n {builder.CheckBox(\r\n \"Exclude existing job expansion variants from report\",\r\n areExpansionsExcluded,\r\n setAreExpansionsExcluded\r\n )}\r\n\r\n {builder.Buttons(loading, handleSubmit, handleClear)}\r\n
\r\n
\r\n
\r\n
\r\n );\r\n}\r\n\r\nexport default withRouter(observer(AdminPreloadPage));\r\n","\r\nimport React from 'react';\r\nimport { Routes } from '../constants/Routes';\r\nimport LoginPage from './../components/login-page/LoginPage';\r\nimport InputPage from './../components/input-page/InputPage';\r\nimport PredictionPage from './../components/predictions-page/PredictionPage';\r\nimport AdminPreloadPage from '../components/admin-preload-page/AdminPreloadPage';\r\n\r\nexport class RouteConfiguration {\r\n /**\r\n *\r\n */\r\n constructor(\r\n public path: string,\r\n public reactComponent: React.ComponentClass,\r\n public isAuthorizedRoute: boolean\r\n ) { }\r\n}\r\n\r\nexport class RouteSetup {\r\n public static GetRouteConfiguration() {\r\n return [\r\n new RouteConfiguration(Routes.Login, LoginPage, false),\r\n new RouteConfiguration(Routes.InputPage, InputPage, true),\r\n new RouteConfiguration(Routes.PredictionPage, PredictionPage, true),\r\n new RouteConfiguration(Routes.AdminPreload, AdminPreloadPage, true),\r\n ]\r\n }\r\n}","import { Box, Slide, withStyles } from \"@material-ui/core\";\r\nimport React from \"react\";\r\nimport { BrowserRouter as Router, Route, Switch } from \"react-router-dom\";\r\nimport { Routes } from \"./constants/Routes\";\r\nimport Header from \"./components/common/header/Header\";\r\nimport PredictionPage from \"./components/predictions-page/PredictionPage\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport Footer from \"./components/common/footer/Footer\";\r\nimport InputPage from \"./components/input-page/InputPage\";\r\nimport { getEnvironment } from \"./config/EnvironmentUrls\";\r\nimport LoginPage from \"./components/login-page/LoginPage\";\r\nimport AuthorizedRoute from \"./hoc/AuthorizedRoute\";\r\nimport useKeyboardListener from \"./hooks/useKeyboardListener\";\r\nimport { Guid } from \"./services/Guid\";\r\nimport { RouteSetup } from \"./config/RouteSetup\";\r\nimport { SnackbarProvider, SnackbarProviderProps } from \"notistack\";\r\nimport { makeStyles } from '@material-ui/core/styles';\r\n\r\nconst SnackBarProviderCustomTheme = withStyles({\r\n variantInfo: {\r\n backgroundColor: 'yellow' \r\n }\r\n})(SnackbarProvider);\r\n\r\nconst styles = {\r\n // success: { backgroundColor: 'purple' },\r\n // error: { backgroundColor: 'blue' },\r\n // warning: { backgroundColor: 'green' },\r\n info: { backgroundColor: '#242C37 !important' }\r\n};\r\n\r\nfunction App() {\r\n useKeyboardListener(Guid.NewGuid(), \"nadar\".split(\"\"), () => {\r\n window.alert(\"Give kudos to Nadar for this amazing project ;)\");\r\n });\r\n\r\n const classes = makeStyles(styles)();\r\n\r\n const ApplicationRoutes = () => {\r\n return (\r\n \r\n {RouteSetup.GetRouteConfiguration().map(\r\n (routeConfiguration) => {\r\n if (routeConfiguration.isAuthorizedRoute) {\r\n return (\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 \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\nexport default observer(App);\r\n","import { ReportHandler } from 'web-vitals';\r\n\r\nconst reportWebVitals = (onPerfEntry?: ReportHandler) => {\r\n if (onPerfEntry && onPerfEntry instanceof Function) {\r\n import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\r\n getCLS(onPerfEntry);\r\n getFID(onPerfEntry);\r\n getFCP(onPerfEntry);\r\n getLCP(onPerfEntry);\r\n getTTFB(onPerfEntry);\r\n });\r\n }\r\n};\r\n\r\nexport default reportWebVitals;\r\n","import { createMuiTheme } from \"@material-ui/core\";\r\n\r\nexport const MuiLightTheme = createMuiTheme({\r\n palette: {\r\n background: {\r\n default: \"#FFF\"\r\n },\r\n\r\n primary: {\r\n main: \"#225a78\"\r\n },\r\n secondary: {\r\n main: \"#77992e\"\r\n }\r\n },\r\n typography: {\r\n fontFamily: \"Open Sans\"\r\n },\r\n spacing: 5\r\n});","import { CssBaseline, ThemeProvider } from \"@material-ui/core\";\r\nimport React from \"react\";\r\nimport ReactDOM from \"react-dom\";\r\nimport App from \"./App\";\r\nimport reportWebVitals from \"./reportWebVitals\";\r\nimport { MuiLightTheme } from \"./config/MuiTheme\";\r\n\r\n/**\r\n * CSS imports\r\n */\r\nimport \"antd/dist/antd.css\"; // or 'antd/dist/antd.less'\r\nimport \"./assets/styles/reset.css\";\r\nimport \"./assets/styles/generic.scss\";\r\nimport { RootStoreProvider } from \"./stores/RootStoreContext\";\r\n\r\n/**\r\n * Licenses\r\n */\r\nimport {LicenseManager} from \"@ag-grid-enterprise/core\";\r\nLicenseManager.setLicenseKey(process.env.REACT_APP_AG_GRID_TOKEN!);\r\n\r\nReactDOM.render(\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ,\r\n document.getElementById(\"root\")\r\n);\r\n\r\n// If you want to start measuring performance in your app, pass a function\r\n// to log results (for example: reportWebVitals(console.log))\r\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\r\nreportWebVitals();\r\n"],"sourceRoot":""}