{"version":3,"sources":["reducers/appbarReducer.js","reducers/authReducer.js","reducers/generalGraphReducer.js","reducers/modalReducer.js","reducers/navReducer.js","reducers/notesReducer.js","reducers/organizationReducer.js","reducers/patientReducer.js","reducers/permissionsReducer.js","reducers/ScheduledSessionsReducer.js","reducers/userRadarPlotReducer.js","reducers/userReducer.js","reducers/userSessionReducer.js","reducers/userSkillLevelsReducer.js","reducers/gameLevelReducer.js","components/v2/sharedComponents/assignmentUtils.js","reducers/assignmentReducer.js","reducers/index.js","store.js","actions/types.js","assets/images/neurofit-logo.svg","components/sharedComponents/LoginForm.js","components/sharedComponents/Login.js","components/sharedComponents/ForgotPassword.js","components/sharedComponents/ResetPassword.js","components/adminView/OrganizationsListRow.js","assets/images/organization profile.png","components/adminView/OrganizationsList.js","components/adminView/AddOrganizationForm.js","components/adminView/OrgChartBase.js","lib/Colors.js","components/sharedComponents/DateRangePickers.js","components/adminView/ActiveUsersChart.js","components/adminView/Organizations.js","components/adminView/BillingForm.js","components/adminView/BillingSessions.js","components/adminView/BillingTotalTime.js","components/adminView/BillingOrganizations.js","components/scheduledSessions/MonthlyView/SessionDialog.js","components/scheduledSessions/MonthlyView/Day.js","components/scheduledSessions/otherComponents/NewSession.js","components/scheduledSessions/MonthlyView/MonthlySessionHeading.js","components/scheduledSessions/otherComponents/WeekHeader.js","components/scheduledSessions/MonthlyView.js","components/sharedComponents/ChartRangeDropdown.js","components/sharedComponents/UsersDropdown.js","components/d3Components/GeneralMetricsChart.js","components/d3Components/GeneralMetricsChartWrapper.js","components/d3Components/RadarPlot.js","components/d3Components/RadarPlotWrapper.js","components/d3Components/RadarLegend.js","components/dashboards/profile_views/UserSession.js","components/dashboards/profile_views/UserPerformanceRatio.js","components/dashboards/profile_views/UserFile.js","components/dashboards/profile_views/PatientNotes.js","components/dashboards/profile_views/UserProfilePage.js","components/d3Components/UserFeedbackGraph.js","components/sharedComponents/LogoutButton.js","components/sharedComponents/AppBar.js","components/adminView/permissions/AddPermForm.js","components/adminView/permissions/PermissionsDetail.js","components/adminView/PermissionsPage.js","components/adminView/DeepDataDive.js","components/sharedComponents/Register/utils.js","components/sharedComponents/Register/useForm.js","components/sharedComponents/Register/StepOne.js","components/sharedComponents/Register/StepTwo/StepTwo.js","components/sharedComponents/Register/StepTwo/StepTwoCont.js","components/sharedComponents/Register/StepThree/validateInfo","components/sharedComponents/Register/StepThree/StepThree.js","components/sharedComponents/Register/StepThree/StepThreeCont.js","components/sharedComponents/Register/Register.js","components/sharedComponents/Register/RegisterContainer.js","components/sharedComponents/Navbar/Navbar.js","components/sharedComponents/Navbar/NavbarContainer.js","components/sharedComponents/Navbar/NavbarMobile/NavbarMobileElements.js","components/sharedComponents/Navbar/NavbarMobile/index.js","highOrderComponents/asyncComponent/asyncComponent.js","components/theme.js","components/App.js","assets/images/EditPad.svg","components/v2/adminView/OrganizationsListRow.js","components/v2/adminView/OrganizationsList.js","components/v2/adminView/AddOrganizationForm.js","components/v2/sharedComponents/SearchField.js","components/v2/sharedComponents/SelectField.js","components/v2/sharedComponents/privilegeText.js","components/v2/adminView/Organizations.js","components/v2/Assignments/ActivityForm.js","components/v2/Assignments/LevelForm.js","components/v2/sharedComponents/Divider.js","components/v2/sharedComponents/TitleRow.js","components/v2/Assignments/AssignmentCreate.js","components/v2/sharedComponents/ScrollToTop.js","components/v2/Assignments/ActivityInput.js","components/v2/Assignments/AssignmentEdit.js","components/v2/sharedComponents/AppBar.js","actions/NavActions.js","assets/images/UserGroupOutline.svg","assets/images/CurrencyDollarOutline.svg","assets/images/OfficeBuildingOutline.svg","assets/images/LogoutOutline.svg","assets/images/neurofit_icon.png","assets/images/neurofit_logotype.svg","components/v2/sharedComponents/Navbar/Navbar.js","components/v2/sharedComponents/Navbar/NavbarContainer.js","components/v2/App.js","components/AppVersionDispatcher.js","index.js","components/Billing/SuccessPayment.js","components/v2/PatientsListRow.js","components/v2/PatientsList.js","components/Billing/index.js","components/sharedComponents/Modals/constants.js","lib/Utility.js","assets/images/account.svg","components/organizationView/EditUsers/index.js","components/sharedComponents/CustomMaterialTable.js","components/practitionersManagement/addUsersStepper/NotEnoughNF.js","components/organizationView/PractitionersList.js","components/practitionersManagement/UploadFile.js","assets/images/individual.svg","assets/images/multiple.svg","components/practitionersManagement/addUsersStepper/AddTypeStep.js","components/practitionersManagement/addUsersStepper/AddUserTypes.js","components/organizationView/AddUserForm.js","components/practitionersManagement/AddPractitionerUsers.js","components/practitionersManagement/addUsersStepper/helpers/UserColumn.js","components/practitionersManagement/addUsersStepper/Assets/HelperFunctions.js","components/practitionersManagement/addUsersStepper/ConfirmInputFields.js","components/practitionersManagement/addUsersStepper/ConfirmImport.js","components/practitionersManagement/addUsersStepper/ImportInProgress.js","components/practitionersManagement/addUsersStepper/SuccessComponent.js","components/practitionersManagement/addUsersStepper/helpers/InvalidInputRow.js","components/practitionersManagement/addUsersStepper/UploadingResult.js","components/practitionersManagement/addUsersStepper/AddUsersStepper.js","components/organizationView/Users.js","actions/NotesActions.js","actions/index.js","components/sharedComponents/CustomDialog/index.js","components/v2/sharedComponents/NFButton.js","lib/PermissionsSystem.js","lib/index.js","assets/js/chartjs-plugin-zoom.js","components/sharedComponents/Modals/withModals.js","i18n/translate.js","lib/Constants.js","components/dashboards/profile_views/ChartBase.js","http-common.js","components/sharedComponents/AddIcon.js","assets/js/chartjs-plugin-trendline.js","components/dashboards/profile_views/UserSkillLevels.js","components/sharedComponents/TabPanel.js","components/dashboards/profile_views/UserMood.js","components/sharedComponents/LoadingSpinner.js","actions/AdminActions.js","assets/images/instagram.svg","components/dashboards/Footer/index.js"],"names":["INITIAL_STATE","logoutModalOpen","drawerModalOpen","activePath","isAuthenticated","GetLocalStorageValueSafe","privilege","parseInt","permissions","JSON","parse","user","org","features","Debug","log","stringify","localStorage","getItem","reducer","state","action","type","SIGN_IN","payload","response","organization","data","SIGN_OUT","PermissionsService","Reset","GET_PRIVILEGE","startDateSelect","moment","subtract","toISOString","endDateSelect","Date","graphData","attentionLineToggle","memoryLineToggle","processingLineToggle","modalType","modalProps","open","isExpanded","NAV_EXPAND","NAV_COLLAPSE","notes","has_fetched","last_saved","undefined","sortDates","a","b","aTime","note_date","bTime","organizations","selectedOrganization","hasFetched","sessions","organizationReducer","GET_ORGANIZATIONS","REGISTER_ORGANIZATION","GET_SESSIONS_BY_ORGANIZATION","UPDATE_SELECTED_ORGANIZATION","id","UPDATE_ACCOUNT_PRIVILEGE","defaultPatientState","detailedView","basicInformation","firstName","lastName","dob","diagnosis","fitpoints","patientReducer","first_name","last_name","org_id","patient_data","permission_count","hasFetchedPerms","roles","hasFetchedRoles","initialState","session","error","listSession","loading","count","count_session","percentage_attendanc_patients","dataSet","sessions_patient_assigned","createSessionSuccess","updateObject","createSessionFail","fetchSession","editSession","deleteSession","recSession","countSession","assignPatients","scheduledSessionsReducer","actionType","userChartData","selectedDate","createDateString","language","users","selectedUser","viewed_user","userRatings","userSessions","sessionType","isArchive","include_archived","userRadarChartData","fetchingUser","fetchUserSuccess","fetchUserFailure","updatingUser","updateUserSuccess","updateUserMessage","fetchingActivityStats","fetchActivityStatsSuccess","fetchActivityStatsFailure","activityStats","activityStatsError","fetchingReportConfig","fetchReportConfigSuccess","fetchReportConfigFailure","reportConfig","reportConfigError","creatingReportConfig","reportConfigCreateSuccess","reportConfigCreateFailure","userReducer","SET_LANGUAGE","GET_USERS_BY_ORG","user_list","CREATE_USER","UPDATE_USER","UPDATE_SELECTED_USER","userEmail","TOGGLE_LOGIN_FOR_USERS","ARCHIVE_USER","map","user_id","status","console","GET_SELECTED_USER","GET_USER","viewed_patient_data","GET_USER_REQUEST","GET_USER_SUCCESS","GET_USER_FAILURE","fetchError","UPDATE_USER_REQUEST","UPDATE_USER_SUCCESS","UPDATE_USER_FAILURE","GET_USER_ACTIVITY_STATS_REQUEST","userId","GET_USER_ACTIVITY_STATS_SUCCESS","GET_USER_ACTIVITY_STATS_FAILURE","GET_PATIENT_REPORT_CONFIG_REQUEST","GET_PATIENT_REPORT_CONFIG_SUCCESS","GET_PATIENT_REPORT_CONFIG_FAILURE","GET_PATIENT_REPORT_CONFIG_CLEAR","CREATE_PATIENT_REPORT_CONFIG_REQUEST","CREATE_PATIENT_REPORT_CONFIG_SUCCESS","CREATE_PATIENT_REPORT_CONFIG_FAILURE","CREATE_PATIENT_REPORT_CONFIG_CLEAR","SUBMIT_USER_DATA","skillLevels","level","fetchingLevel","hasFetchedLevel","levels","fetchingLevels","hasFetchedLevels","gameLevelReducer","GET_LEVELS_REQUEST","GET_LEVELS_SUCCESS","GET_LEVELS_FAILURE","GET_LEVEL_REQUEST","GET_LEVEL_SUCCESS","GET_LEVEL_FAILURE","GET_LEVEL_CLEAR","assignmentsToActivities","assignments","dateStart","dateEnd","activities","start","end","w","activity_windows","windowParams","act","isBetween","concat","isAfter","isBefore","creating","createSuccess","createError","updating","updateSuccess","updateError","assignmentReducer","GET_ASSIGNMENTS","CREATE_ASSIGNMENT_REQUEST","CREATE_ASSIGNMENT_SUCCESS","CREATE_ASSIGNMENT_FAILURE","CREATE_ASSIGNMENT_RESET","UPDATE_ACTIVITY_REQUEST","UPDATE_ACTIVITY_SUCCESS","activity","UPDATE_ACTIVITY_FAILURE","UPDATE_ACTIVITY_RESET","DELETE_ACTIVITY","filter","appReducer","combineReducers","appbarReducer","TOGGLE_LOGOUT_MODAL","value","TOGGLE_DRAWER","ACTIVE_PATH_CHANGED","authReducer","generalGraphReducer","UPDATE_START_DATE_SELECT","date","UPDATE_END_DATE_SELECT","TOGGLE_MEMORY_LINE","TOGGLE_PROCESSING_LINE","TOGGLE_ATTENTION_LINE","GET_GRAPH_DATA","modalReducer","SHOW_MODAL","HIDE_MODAL","navReducer","notesReducer","GET_PATIENT_NOTES","result","note_count","sort","UPDATE_PATIENT_NOTE","note","x","CREATE_PATIENT_NOTE","push","DELETE_PATIENT_NOTE","note_id","permissionsReducer","PERMADMIN_GET_PERMISSIONS_LISTING","y","name","length","PERMADMIN_CREATE_PERMISSION","permission","PERMADMIN_UPDATE_PERMISSION","Object","assign","PERMADMIN_DELETE_PERMISSION","permission_id","PERMADMIN_GET_ROLES_LISTING","PERMADMIN_CREATE_ROLE","PERMADMIN_UPDATE_ROLE","added","added_perms","removed","removed_perm","role_id","Array","isArray","removed_perms","includes","perm_id","find","userRadarPlotReducer","GET_RADAR_PLOT_DATA","UPDATE_WITHIN_DATE_SELECT","userSessionReducer","GET_USER_SESSIONS","userSkillLevelsReducer","GET_USER_SKILL_LEVELS","skillLevel","composeEnhancers","window","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","compose","store","createStore","_Hydrate","applyMiddleware","reduxThunk","GET_ORGANIZATION_SINGLE","GET_DETAILS_CURRENT_AUTH_ORG","GET_ACTIVE_USERS","GET_STACKED_BAR_CHART","CREATE_SESSION","SHOW_SESSION","GET_META_TEMPLATES","GET_META_TEMPLATE_SESSIONS","CREATE_SCHEULE_SESSION","MESSAGE_SCHEULE_SESSION_FAILER","FETCH_SCHEULE_SESSION","EDIT_SCHEULE_SESSION","DELETE_SCHEULE_SESSION","RUCURRING_SCHEULE_SESSION","COUNT_SESSION_FOR_ORG","GET_OVER_PROGRESS_OVER_TIME","GET_ASSIGEND_PATIENT_SESSIONS_PARCTITIONER","GET_COUNT_PAITENTS_ORG","GET_RATINGS_PAITENTS_ORG","GET_PATIENTS_SESSIONS_ORG","GET_USERS_BY_ORG_ID","GET_LONGEST_STREAK","GET_ASSIGNED_PATIENTS","GET_ACTIVE_PATIENTS_REQUEST","GET_ACTIVE_PATIENTS_SUCCESS","GET_ACTIVE_PATIENTS_FAILURE","useStyles","makeStyles","theme","alertBox","width","marginTop","spacing","marginBottom","forgotPasswordLink","textDecoration","fontSize","textAlign","paddingTop","LoginForm","props","classes","useForm","register","handleSubmit","errors","setValue","reset","dispatch","useDispatch","React","useState","message","onMessageChanged","onSubmit","signIn","util","inspect","is_error","Grid","container","className","item","sm","md","lg","Typography","component","variant","form","TextField","margin","required","fullWidth","label","autoComplete","autoFocus","inputRef","pattern","email","password","Button","submit","href","Alert","severity","renderError","src","logo","alt","Login","Container","maxWidth","loginUser","Component","ForgotPassword","submitted","confirmEmail","bind","renderForm","renderSubmittedMessage","renderFormErrors","schema","yup","shape","emailConfirm","oneOf","event","preventDefault","this","validData","validateSync","reqPasswordReset","setState","setTimeout","history","errorMessage","ix","onChange","target","withRouter","withStyles","ResetPassword","validToken","confirmPassword","token","renderSubmittedPage","query","queryString","location","search","min","passwordConfirmation","validateResetToken","isValid","validated","reqData","new_password","resetPassword","Fragment","wideCell","minWidth","OrganizationsListRow","setPrivilege","owner","Owner","TableRow","hover","TableCell","scope","align","updated_at","toDateString","created_at","privilegeText","dataPre","FormControl","Select","labelId","e","handleChange","MenuItem","onClick","handleUpdate","table","padding","paper","tableHead","backgroundColor","tableHeadCell","color","sortTableActive","dataDeep","renderTableRows","order","orderBy","descendingComparator","descendingComparator_1","hide_inactive","getComparator","row","colSpan","OrganizationsList","setOrder","setOrderBy","tableRows","setTableRows","useEffect","createSortHandler","property","handleRequestSort","TableContainer","Paper","Table","TableHead","TableSortLabel","active","direction","TableBody","display","flexDirection","flexWrap","justifyContent","border","palette","primary","main","position","top","bottom","right","left","overflowY","addBtn","textTransform","messageContainer","org_name","user_email","user_password","AddOrganizationForm","resolver","yupResolver","useSelector","responseMessage","user_data","trim","org_data","registerOrganization","hideModal","renderFormError","body","heading","xs","FormLabel","inlineInput","username","showModal","AddIcon","iconText","Modal","onClose","OrgChartBase","isFetching","isError","chartData","chartOptions","available_levels","parseData","fetchData","dispatchLoad","dispatchAPI","shouldLoad","AdminActions","GetAvailableLevelVersions","start_date","end_date","prevProps","prevState","then","forceUpdate","Error","LoadingSpinner","renderChart","HSLA","h","l","s","other","Math","abs","alpha","floor","random","DateRangePickers","startDate","endDate","handleStartDateChanged","handleEndDateChanged","_handleDateChanged","newState","requiresUpdate","utc","key","monthly","set","updateStartDateSelect","onValueChanged","endOf","local","shared_options","autoOk","format","disableFuture","disablePast","KeyboardButtonProps","views","libInstance","utils","MomentUtils","style","PropTypes","func","bool","instanceOf","connect","updateEndDateSelect","Chart","plugins","pluginTrendLineLinear","zoomPlugin","ActiveUsersChart","handleDateRangeChanged","handleDailyModeChanged","is_daily","GetActiveUsers","datasets","timeFormat","entry","active_users","colors","threshold","abort_threshold","colours","i","colour","cycles","Random","some","DistanceTo","GenerateColours","keys","toString","dataset","borderColor","showLine","fill","borderWidth","pointRadius","pointHoverRadius","lineTension","trendLineLinear","lineStyle","borderDash","scales","xAxes","time","unit","minUnit","round","parser","ticks","max","yAxes","beginAtZero","callback","suggestedMin","suggestedMax","scaleLabel","labelString","rows_level","templates","template","GetSessions","level_id","level_version","results","rows","level_name","filename","csvFile","processRow","finalVal","replace","blob","Blob","navigator","msSaveBlob","link","document","createElement","download","url","URL","createObjectURL","setAttribute","visibility","appendChild","click","removeChild","checked","alignItems","marginLeft","columns","FormControlLabel","control","Checkbox","Tooltip","title","CloudDownload","exportData","options","propTypes","string","isRequired","Organizations","loadingOrganizations","getOrganizations","handleInactiveToggleChange","gridContainer","FormGroup","Switch","modal","select","height","lineHeight","fontFamily","fontWeight","selectedItem","info","light","selectContainer","userTypesLabel","marginRight","BillingForm","startOf","orgId","handleDatesChanged","handleOrganizationChange","renderSelectItems","getSessionsByOrganization","selectItems","elevation","InputLabel","BillingSessions","toLocaleString","toFixed","icon","BillingTotalTime","gutterBottom","totalTime","BillingOrganizations","renderSessions","records","renderTotal","selectedStartDate","selectedEndDate","sessionsArray","getState","avatar","blue","badge","sessionTitle","root","divider","paddingBottom","blueColor","contrastText","paddingLeft","paddingRight","daysDisplay","card","monthView","formControl","selectEmpty","dropdownList","UsersDropdown","updateSelectedUser","FormHelperText","MARGIN","WIDTH","HEIGHT","GeneralMetricsChart","element","vis","g","append","attr","scaleTime","range","scaleLinear","xAxisGroup","yAxisGroup","text","update","raw_response","entries","processingLineData","memoryLineData","attentionLineData","allLines","lineData","daily_aggregates","categories","calculateAveragePercentage","parseFloat","correct","incorrect","sortedMetricData","line","flat","memoryLine","processingLine","attentionLine","domain","d","xAxisCall","axisBottom","yAxisCall","axisLeft","transition","call","makeLine","Number","avg","makeErrorBar","area","y0","y1","circleStyles","circleRadius","circleRadiusHover","selectAll","memoryErrorBars","memoryLineCircles","exit","remove","enter","on","toLocaleDateString","attentionCircles","attentionBars","processingCircles","processingBars","RadarPlot","radialScale","angleToCoordinate","angle","cos","sin","getPathCoordinates","data_point","coordinates","ft_name","PI","forEach","t","line_coordinate","label_coordinate","radarLine","datum","RadarPlotWrapper","chart","refs","nextProps","ref","RedarLegend","Difficulty","Satisfaction","Frustration","Enjoyment","Effort","sortable","paging","pageSize","emptyRowsWhenPaging","pageSizeOptions","exportButton","UserSession","getUserSessionData","handleTabChange","getFileName","tab_index","category","tableData","categoryData","capitalize","levelData","field","table_data","newValue","user_name","tabBar","AppBar","Tabs","indicatorColor","textColor","centered","Tab","index","TabPanel","Accordion","AccordionSummary","AccordionDetails","exportFileName","ChartBase","UserPerformanceRatio","mail_room","nature_path","restaurant","spot_the_difference","trail_making","western","getCorrect","session_count","getIncorrect","missed","labels","reduce","attentionCorr","memoryCorr","processingCorr","fillColor","attentionInCorr","memoryInCorr","processingInCorr","legend","responsive","UserFile","submitUpdate","cancelChanges","getInitialState","mapToState","mapToStateValue","updateGender","updatePronounSet","generatePronounSample","isEditing","working_user_data","has_custom_pronouns","DEFAULT_PRONOUN_SETS","subject","pronoun_subject","has_custom_gender","DEFAULT_GENDERS","gender","toLowerCase","info_message","updateUser","statusOk","error_message","statusBad","pronoun_possessive","possessive","pronoun_object","object","pronoun_reflexive","pronoun_is_plural","capitalize_subject","capitalize_possessive","capitalize_object","patientContainer","infoLabel","education","canEdit","GetUserID","HasPermission","user_type","USER_TYPES","Patient","Practitioner","GetUser","Admin","Fab","Input","DatePicker","input","borderRadius","float","PatientNotes","onTextChanged","handleSave","filterNotes","handleFilterChanged","onCreateNewNote","noteDateChanged","goToData","deleteNote","onDeleteModalClose","openDeleteModal","creator_first_name","creator_last_name","creator_id","can_edit_note","can_delete_note","is_editing","delete_modal_open","filtered_notes","patient_notes","note_data_callback","NotesActions","GetNotes","DeleteNote","Snackbar","autoHideDuration","test","regex","RegExp","admin","contentCallback","jumpToDate","newDate","can_edit","UpdateNote","CreateNote","handleNoteChanged","button","deleteButton","creator_name","placeholder","alignContent","borderLeft","DateTimePicker","readOnly","ShowChart","minHeight","overflow","Dialog","DialogTitle","DialogContent","DialogContentText","DialogActions","has_fetched_notes","UserProfilePage","renderPlaysOverTime","skillSession","radarPlotData","userSkillLevels","userSession","accordions","profile_info","charts","jumpToSingleDay","handleAccordionStatusChanged","chartsRef","createRef","getUser","match","params","key_name","current","scrollIntoView","diff","defaultExpanded","expanded","v","expandIcon","ExpandMore","FolderShared","alignSelf","last_month","UserMood","UserSkillLevels","Comment","UserFeedbackGraph","loadingClients","getUsersByOrg","size","disabled","getRadarPlotData","dateSelect","xl","background","boxShadow","shadows","drawerButton","flexGrow","navLink","navLinkIcon","drawerNavLink","borderBottom","list","fullList","logoutButton","feedbackButton","drawer","breakpoints","up","flexShrink","appBar","menuButton","toolbar","mixins","drawerPaper","content","brand","AppBarr","useHistory","handleActiveLinkChanged","pathname","listener","listen","path","activeLinkChanged","mobileOpen","setMobileOpen","handleDrawerToggle","MainLinks","anchorEl","setAnchorEl","Boolean","IconButton","currentTarget","Menu","anchorOrigin","vertical","horizontal","keepMounted","transformOrigin","getContentAnchorEl","logoutUser","process","REACT_APP_CONTACT_EMAIL","underline","renderMainLinks","List","to","ListItem","sx","rel","renderDrawerLinks","useTheme","Toolbar","edge","AddPermissionForm","parent_id","description","handleAddPermission","confirm","CreatePermission","noValidate","htmlFor","labelPlacement","shrink","menuAnchorTarget","displayEmpty","GetPermissionsList","GetRoleList","PermissionDetail","perm","PermissionsPage","add_perm","permissions_grid_data","editable","render","privilege_req","editComponent","headerStyle","tableLayout","permissions_editing_data","onRowUpdate","newData","oldData","UpdatePermission","role","DeepDataDive","selected_level_id","selected_level_version","template_data_tables","table_refs","filter_org_id","composeDataTables","renderDataTable","renderMetaTemplateRow","setTemplateOpen","res","is_template_expanded","GetOrganization","filter_org_name","tempState","fields","RootFields","tableRef","tableSettings","Promise","resolve","reject","limit","offset","page","totalCount","total_count","catch","err","components","Pagination","zIndex","TablePagination","Refresh","onQueryChange","actions","tooltip","isFreeAction","sessionData","template_chart_data","isOpen","KeyboardArrowUp","KeyboardArrowDown","dependant_count","Collapse","in","timeout","unmountOnExit","Box","overflowX","flex","VALUE","ERROR","is_object","is_required","get_prop_values","stateSchema","prop","stateValidatorSchema","submitFormCallback","setStateSchema","values","setValues","setErrors","dirty","setDirty","disable","setDisable","isDirty","setIsDirty","setInitialErrorState","accu","curr","validateField","validateErrorState","setFieldValue","setFieldError","useCallback","validator","validateFieldByCallback","handleOnSubmit","handleOnChange","mainContainer","formContainer","inputField","btn","opacity","disabledBtn","StepOne","activeStep","steps","callbackHandleNext","checkoutData","callbackSetCheckoutData","pronouns","showPassword","showPasswordValue","setShowPasswordValue","showConfirmPassword","showConfirmPasswordValue","setShowConfirmPasswordValue","RadioGroup","defaultValue","Radio","OutlinedInput","labelWidth","endAdornment","InputAdornment","newArr","endIcon","diabled","toggleStyles","isSelected","isNotSelected","savingsDisplay","StepTwo","callbackHandlePricingClick","toggle","togglePrice","checkedIcon","uncheckedIcon","offColor","onColor","StepTwoCont","pricing_id","desc","price_monthly_usd","price_anually_usd","pricing","setPricing","setToggle","is_yearly","pricing_monthly_usd","pricing_anually_usd","starting","StepThree","callbackHandleToken","stripeKey","StepThreeCont","cardName","cardNumber","cardType","cardExpiration","cardSecurityCode","cardPostalCode","focus","address","Register","setActiveStep","handleNext","prevActiveStep","Stepper","alternativeLabel","Step","StepLabel","stepIndex","activeSteps","getStepsContent","RegisterContainer","setCheckoutData","Navbar","onSignOutClick","Logo","cursor","NavbarContainer","NavbarMobile","styled","div","isNavbarMobileOpen","OpenIcon","GiHamburgerMenu","OpenIconContainer","CloseIcon","FaTimes","Icon","NavbarMobileContainer","setIsNavbarMobileOpen","setToggleOpen","asyncComponent","importComponent","AsyncComponent","default","createTheme","secondary","white","gray","orange","red","green","typography","join","h1","h2","AsyncScheduler","AsyncPatientDashboard","AsyncOrgDashboard","AsyncPractitionerDashboard","AsyncError404Page","AsyncBillingInformation","App","getPrivilege","renderRoutes","exact","Users","user_types","renderAppBar","signOut","tableRow","styledCell","editLink","editIcon","split","EditPadIcon","searchString","setShrink","InputLabelProps","textOverflow","whiteSpace","onFocus","onBlur","InputProps","startAdornment","BootstrapInput","boxSizing","InputBase","transform","SelectField","o","filterStatus","searchStringify","filterString","statusFilter","handleSearch","handleFilterSelect","handleFilter","filteredOrganizations","controlRow","controlSearch","SearchField","controlFilter","controlCreate","DAYS","textField","fullTextField","dayCheck","userSelect","dayCheckDeselected","dayCheckSelected","buttonPrimary","buttonSecondary","ActivityForm","onActivityChange","dayValue","days","newDays","handleDayChange","time_start","inputProps","step","time_end","date_start","date_end","formGroup","LevelForm","selectedLevels","setLevels","levelOptions","levelId","Autocomplete","multiple","getOptionLabel","option","newSelectedLevels","renderInput","dividerWrapper","borderBottomWidth","borderStyle","Divider","titleRow","TitleRow","backDestination","NFButton","go","ACTIVITY","add","topRow","AssignmentCreate","useParams","enqueueSnackbar","useSnackbar","setActivities","duration","setDuration","setMessage","createAssignmentReset","persist","getLevels","getUserThunk","handleActivityChange","updatedActivity","newActivities","idx","createAssignment","ScrollToTop","useLocation","scrollTo","ActivityInput","parameter","helperText","renderParameter","TOPLEVEL_ACTIVITY_PARAMS","slider","AssignmentEdit","loadedActivity","getLevel","game_level","setActivity","defaultValues","activity_parameters","gameplay_parameters","watch","updateActivityReset","isClearsCompletion","isAdaptiveDifficulty","nonTopLevelActivityParams","fromEntries","formattedStartDate","pageTitle","activityParams","acc","gameplayParams","is_edited","updateActivity","completion_condition_mode","mode","as","completion_clears","completion_duration","timer","is_adaptive_difficulty","_","difficulty","Slider","marks","valueLabelDisplay","is_difficulty_dependent","param","handleGameParamChange","CircularProgress","buttonProgress","deleteActivity","useTranslation","lng","setLng","userInitial","slice","toUpperCase","setLanguage","toggleNav","Store","f","is_active","Logotype","UserGroupOutlineIcon","CurrencyDollarOutlineIcon","OfficeBuildingOutlineIcon","LogoutOutlineIcon","ArrowBack","ArrowForward","ThemeProvider","ReactDOM","maxSnack","getElementById","successPayment","currInfo","product_name","statusActive","statusInactive","PatientsListRow","last_session","patients","onPatientSelect","PatientsList","getDetailsForCurrOrg","stripeInfo","setStripeInfo","subscriptionINFO","setSubscriptionINFO","stripeID","setStripeID","numberOfPatients","setNumberOfPatients","subscriptionID","setSubscriptionID","userID","setUserID","trial","setTrial","loadingSpinner","setLoadingSpinner","month","monthlyPatients","setMonthlyPatients","shouldShowBilling","getActivePatients","patientsData","URLSearchParams","get","createPortalSession","getSubscriptionsDetails","userEntry","noOfPatients","stripe_id","subscription","method","http","SuccessPayment","items","price","recurring","interval","unix","current_period_start","quantity","canceled_at","current_period_end","plan","amount","Billing","_patientId","ARCHIVE_MODAL","EDIT_USERS_MODAL","ADD_NOTES_MODAL","EDIT_SESSION_MODAL","DELETE_SESSION_MODAL","RECURRING_SESSION_MODAL","NOT_ENOUGH_USERS_MODAL","oldObject","updateProp","_excluded","_extends","arguments","source","prototype","hasOwnProperty","apply","_objectWithoutProperties","excluded","sourceKeys","indexOf","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","SvgAccount","_ref","svgRef","titleId","viewBox","xmlns","ForwardRef","tiltStyle","outline","success","radioContainer","radioGroup","personIcon","input_container","OCCUPATION_TYPES","optional","practitioner","occupation","EditUser","useStore","useMediaQuery","down","handleUserTypeChanged","roels","setRoles","handleDobChanged","actualValue","infoUser","practitioner_id","req_data","is_patient","toggleEditUserModal","UserTypes","value2","el","DateFnsUtils","practitioners","prac","Education","DIAGNOSIS","CustomMaterialTable","customMenuItem","customClassNameSelect","viewOptionClass","handleSelectChange","selectOptions","onRowClick","onRowDoubleClick","UserStatus","onChangeSelectedRowData","Row","onDoubleClick","renderValue","selected","MenuProps","ListSubheader","localization","pagination","labelDisplayedRows","searchTooltip","searchPlaceholder","nRowsSelected","selection","rowStyle","rowData","paginationType","showFirstLastPageButtons","searchFieldStyle","onSelectionChange","NotEnoughNF","notEnoughNF","handleReset","MoveToBilling","PractitionersList","onRemoveSelectedClick","selectedRowData","toggleArchiveModal","upgradePlanes","NFErrorMsg","toggleErrorModalNF","onArchiveUser","canArchive","archiveUser","is_archive_shown","is_loaded","getTableSettings","handleDataLoad","tableColumns","role_name","toggleLogin","Edit","modals","userPat","userPrac","userOrg","usersAdmin","isContainUserTypes","setUsers","Set","filtered","arr","update_time","CustomDialog","hideCloseButton","titleNF","MapStateToProps","modalsProps","archive","unarchive","iconStyle","borderRaduis","withModals","withSnackbar","UploadFile","upload","onDrop","selectedFiles","currentFile","progress","fileInfos","readXlsxFile","schemaPrac","ignoreEmptyRows","alert","files","isPatient","accept","allowedExtensions","getRootProps","getInputProps","class","file","wizardButtonTitle","img","AddTypeStep","additionType","setAdditionType","onTypeChange","Card","CardActionArea","individual","when","is","otherwise","strip","passwordConfirm","AddUserForm","setError","unsubscribe","subscribe","createUser","moveToFinalStep","errorType","AddPractitionerUsers","pronounSelect","UserColumn","column","containerContnt","selectedColumn","formatDate","year","day","getColumn","col","ConfirmInputFields","userType","setRows","numberOfColumns","currentColumn","setCurrentColumn","selectedColumns","setSelectedColumns","currentUserColumn","MAIN_COLUMN_PATIENT","MAIN_COLUMN_PRACTITONER","copy","criteria","preVal","getStepTitle","from","columnClickedHandler","pop","ConfirmImport","numberOfUsers","ImportInProgress","SuccessComponent","addingType","handleAddOrUpload","arrow","getDate","m","getMonth","getFullYear","InvalidInputRow","cellContent","useRef","FirstName","LastName","DateOfBirth","Sex","Email","Diagnosis","errorStyle","invalidColumn","setInvalidColumn","getErrors","_path","desiredElement","listStyle","gap","isClicked","Occupation","mappedColumn","String","MAPPING_OCCUPATION","UploadingResult","validUsersCount","setIsClicked","tryUsersAfterEdit","getUsers","preUser","patientSchema","typeError","SEX_TYPES","request","practitionerSchema","OCCUPATION","backButton","instructions","WizardTitle","WizardTitle_2","stepper","buttons","buttonCnacel","btnNext","btnNextText","resetbtn","divResetbutton","AddUsersStepper","setUserTypes","setAddingType","successImportedUser","setSuccessImportedUser","setPractitioner","setNotEnoughNF","addUsers","validateUser","validate","abortEarly","tryUsers","userPromises","all","_users","__errors","tempVar","inner","inn","oldValue","handleStartImport","forValidation","_columns","tempUser","j","submitUserData","handleSetAddingType","handleSetUserType","handleConfirmInputFields","showSuccessMessage","setActiveStepNOTNF","getStepContent","handleDownloadInvoice","downloadPractitionerPatientCsv","checkedStates","PATIENT","reason","clsassName","toggleUploadModal","tryDispatch","args","route","__ResolvePath","USER_NOTES_ROUTE","note_data","post","USER_NOTE_INSTANCE_ROUTE","put","delete","ACTIVITY_TEST_DATA","headers","authorization","refresh_token","setItem","SetPermissions","SetUserBlob","clear","removeItem","userData","formData","error_type","updateUserThunk","responseData","is_archived","can_login","toggleMemoryLine","toggleAttentionLine","toggleProcessingLine","getGraphData","decodeURIComponent","fromDate","toDate","include_records","getUserActivityStatsRequest","getUserActivityStatsSuccess","getUserActivityStatsFailure","getUserActivityStats","getPatientReportConfig","patientId","configuration","createPatientReportConfig","createPatientReportConfigClear","updateWithinDateRange","toggleLogoutModal","toggleDrawer","newPrivilege","responseType","revokeObjectURL","ratingValueForOrganization","progressOverTimeDataBasedOnFilter","exercise","sex","age","attendance","StackedBarChart","getSessionsForOrg","getLongestStreak","getAssignedPatients","levelsData","getAssignments","createAssignmentRequest","createAssignmentSuccess","assignmentData","createAssignmentFailure","assignment","activityId","updatedData","children","closeButtonText","welcomeEnabled","rest","disableBackdropClick","disableEscapeKeyDown","Link","common","destination","buttonProps","disableElevation","_perms","_user","keyName","str","lower","helpers","zoomNS","Zoom","zoomFunctions","panFunctions","resolveOptions","deprecatedOptions","pan","zoom","$zoom","_options","merge","node","_node","zoomEnabled","enabled","dragEnabled","drag","addEventListener","_wheelHandler","removeEventListener","_mouseDownHandler","ownerDocument","_mouseUpHandler","_mouseMoveHandler","storeOriginalOptions","originalOptions","_originalOptions","each","scale","clone","opt","directionEnabled","dir","rangeMaxLimiter","zoomPanOptions","newMax","scaleAxes","rangeMax","isNullOrUndef","rangeMinLimiter","newMin","rangeMin","zoomNumericalScale","center","zoomOptions","newDiff","centerPoint","isHorizontal","minPercent","getValueForPixel","minDelta","maxDelta","zoomScale","fn","doZoom","percentZoomX","percentZoomY","focalPoint","whichAxes","animationDuration","ca","chartArea","_whichAxes","zoomMode","easing","onZoom","panNumericalScale","delta","panOptions","tickOpts","prevStart","prevEnd","getPixelForValue","valueOf","panScale","defaults","global","speed","sensitivity","minIndex","lastLabelIndex","maxIndex","chartCenter","centerPointer","zoomCumulativeDelta","linear","logarithmic","offsetAmt","panSpeed","panCumulativeDelta","afterInit","chartInstance","resetZoom","timeOptions","tickOptions","beforeUpdate","beforeInit","pluginOptions","ctx","canvas","panThreshold","_dragZoomStart","_dragZoomEnd","beginPoint","offsetX","getBoundingClientRect","startX","clientX","endX","offsetY","startY","clientY","dragDistanceX","dragDistanceY","zoomThreshold","chartDistanceX","zoomX","chartDistanceY","yEnabled","onZoomComplete","_scrollTimeout","cancelable","deltaY","rect","speedPercent","clearTimeout","Hammer","currentPinchScaling","mc","Manager","Pinch","Pan","handlePinch","pointers","p","currentDeltaX","currentDeltaY","panning","handlePan","deltaX","panMode","onPan","doPan","onPanComplete","_ghostClickHandler","stopImmediatePropagation","_mc","beforeDatasetsDraw","xAxis","scaleIds","getXAxis","yAxis","getYAxis","endPoint","endY","rectWidth","rectHeight","dragOptions","save","beginPath","fillStyle","fillRect","lineWidth","strokeStyle","strokeRect","restore","destroy","WrappedComponent","modalsToggleProps","modalsStatusProps","toggleModal","identifier","modalProp","languageFiles","enUS","frCA","_calendarOptions","Day","Week","Month","dateFormat","defaultFormat","monthFormat","urlSession","createSession","availableTime","startTime","endTime","times","ap","quarterHours","FeatureFlags","recurringEvents","TOOLTIP_AVG_PATIENT_MOOD","achievement","perceived_difficulty","effort","enjoyment","frustration","impulsivity","motivation","Accuracy","API_ROUTE","client","axios","create","baseURL","interceptors","use","config","originalReq","refresh_route","_retry","thrown","isAxiosError","extendedIcon","FabIcon","beforeDraw","yScale","xScale","axis","isDatasetVisible","datasetMeta","getDatasetMeta","is_time","controller","isTime","linePattern","fitter","LineFitter","lastIndex","startPos","_model","endPos","xy","x1","minx","x2","maxx","y2","drawBottom","chartWidth","setLineDash","moveTo","lineTo","stroke","addFitter","sumX","sumX2","sumXY","sumY","det","setChartData","userSessionData","is_single_day","time_format","colorSet","combinedData","aggregated","tags","yMin","yMax","tension","maintainAspectRatio","interaction","intersect","pinch","limits","hidden","userRadarPlotData","average","averages_oldValue","averages_newValue","startPeriod","endPeriod","pointLabels","customCanvasBackgroundColor","ACTIVE_USERS_ROUTE_ORG","ACTIVE_USERS_ROUTE","ACTIVE_USERS_ROUTE_ORG_COUNTS","between_start","between_end","PERMISSIONS_LIST_ROUTE","PERMISSIONS_MODIFY_ROUTE","ROLES_LIST_ROUTE","GET_LEVELS_INSPECTED_ROUTE","GET_SESSION_META","GET_ORGANIZATION_ROUTE","GET_LEVELS_ROUTE","Instagram"],"mappings":"ueAMMA,EAAgB,CACpBC,iBAAiB,EACjBC,iBAAiB,EACjBC,WAAY,K,gBCLRH,EAAgB,CACpBI,gBAA4D,OAA3CC,YAAyB,cAC1CC,UAAWC,SAASF,YAAyB,cAAgB,IAAK,IAClEG,YAAaC,KAAKC,MAAML,YAAyB,gBAAkB,MACnEM,KAAMF,KAAKC,MAAML,YAAyB,cAAgB,MAC1DO,IAAKH,KAAKC,MAAML,YAAyB,aAAe,MACxDQ,SAAUJ,KAAKC,MAAML,YAAyB,aAAe,OAE/DS,IAAMC,IAAI,uBAAyBN,KAAKO,UAAUhB,IAClDc,IAAMC,IAAI,uBAAyBE,aAAaC,QAAQ,eACxDJ,IAAMC,IAAI,0BAA4BE,aAAaC,QAAQ,kBAE3D,IAiCeC,EAjCC,WAAoC,IAAnCC,EA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IAAKg1D,EACL90D,IAAK,YACL5B,UAAU,SACVgW,OAAQ,OACR/X,MAAO,oBAOjB,qBAAK+B,UAAU,kBAAf,SACE,gCACE,wCADF,kDAMP,G","file":"static/js/main.c4b433ce.chunk.js","sourcesContent":["import {\n TOGGLE_LOGOUT_MODAL,\n TOGGLE_DRAWER,\n ACTIVE_PATH_CHANGED,\n} from \"../actions/types.js\";\n\nconst INITIAL_STATE = {\n logoutModalOpen: false,\n drawerModalOpen: false,\n activePath: \"/\",\n};\n\nexport default (state = INITIAL_STATE, action) => {\n switch (action.type) {\n case TOGGLE_LOGOUT_MODAL:\n return { ...state, logoutModalOpen: action.value };\n case TOGGLE_DRAWER:\n return { ...state, drawerModalOpen: action.value };\n case ACTIVE_PATH_CHANGED:\n return { ...state, activePath: action.value };\n default:\n return state;\n }\n};\n","import { SIGN_IN, SIGN_OUT, GET_PRIVILEGE } from \"../actions/types\";\nimport { Debug, GetLocalStorageValueSafe } from \"../lib\";\nimport PermissionsService from \"../lib/PermissionsSystem\";\n\nconst INITIAL_STATE = {\n isAuthenticated: GetLocalStorageValueSafe(\"auth_token\") !== null,\n privilege: parseInt(GetLocalStorageValueSafe(\"privilege\") || \"0\", 10),\n permissions: JSON.parse(GetLocalStorageValueSafe(\"permissions\") || \"[]\"),\n user: JSON.parse(GetLocalStorageValueSafe(\"user_data\") || \"{}\"),\n org: JSON.parse(GetLocalStorageValueSafe(\"org_data\") || \"{}\"),\n features: JSON.parse(GetLocalStorageValueSafe(\"features\") || \"[]\"),\n};\nDebug.log(\"Initial Auth State: \" + JSON.stringify(INITIAL_STATE));\nDebug.log(\"Initial Auth Token: \" + localStorage.getItem(\"auth_token\"));\nDebug.log(\"Initial Refresh Token: \" + localStorage.getItem(\"refresh_token\"));\n\nconst reducer = (state = INITIAL_STATE, action) => {\n switch (action.type) {\n case SIGN_IN:\n return {\n ...state,\n isAuthenticated: GetLocalStorageValueSafe(\"auth_token\") !== null,\n privilege: parseInt(GetLocalStorageValueSafe(\"privilege\") || \"0\", 10),\n permissions: action.payload.permissions,\n response: action.payload,\n user: action.payload.user,\n org: action.payload.organization,\n features: action.payload.data.features,\n };\n case SIGN_OUT:\n Debug.log(\"Logging out\");\n PermissionsService.Reset();\n return {\n ...state,\n isAuthenticated: false,\n privilege: 0,\n permissions: [],\n response: action.payload,\n };\n case GET_PRIVILEGE:\n return {\n ...state,\n privilege: parseInt(localStorage.getItem(\"privilege\"), 10),\n };\n default:\n return state;\n }\n};\n\nexport default reducer;\n","import moment from \"moment\";\nimport {\n UPDATE_START_DATE_SELECT,\n UPDATE_END_DATE_SELECT,\n TOGGLE_MEMORY_LINE,\n TOGGLE_ATTENTION_LINE,\n TOGGLE_PROCESSING_LINE,\n GET_GRAPH_DATA,\n} from \"../actions/types\";\n\nconst INITIAL_STATE = {\n startDateSelect: moment().subtract(1, \"month\").toISOString(),\n endDateSelect: new Date().toISOString(),\n graphData: null,\n attentionLineToggle: true,\n memoryLineToggle: true,\n processingLineToggle: true,\n};\n\nexport default (state = INITIAL_STATE, action) => {\n switch (action.type) {\n case UPDATE_START_DATE_SELECT:\n return { ...state, startDateSelect: action.date };\n case UPDATE_END_DATE_SELECT:\n return { ...state, endDateSelect: action.date };\n case TOGGLE_MEMORY_LINE:\n return { ...state, memoryLineToggle: action.value };\n case TOGGLE_PROCESSING_LINE:\n return { ...state, processingLineToggle: action.value };\n case TOGGLE_ATTENTION_LINE:\n return { ...state, attentionLineToggle: action.value };\n case GET_GRAPH_DATA:\n return { ...state, graphData: action.payload };\n default:\n return state;\n }\n};\n","import { SHOW_MODAL, HIDE_MODAL } from \"../actions/types\";\n\nconst INITIAL_STATE = {\n modalType: null,\n modalProps: {\n open: false,\n },\n};\n\nexport default (state = INITIAL_STATE, action) => {\n switch (action.type) {\n case SHOW_MODAL:\n return {\n modalType: action.modalType,\n modalProps: action.modalProps,\n };\n case HIDE_MODAL:\n return INITIAL_STATE;\n default:\n return state;\n }\n};\n","import { NAV_EXPAND, NAV_COLLAPSE } from \"../actions/types\"\n\nconst INITIAL_STATE = {\n isExpanded: true,\n}\n\nconst reducer = (state = INITIAL_STATE, action) => {\n switch (action.type) {\n case NAV_EXPAND:\n return {\n isExpanded: true,\n }\n case NAV_COLLAPSE:\n return {\n isExpanded: false,\n }\n default:\n return state\n }\n}\n\nexport default reducer\n","import moment from \"moment\";\nimport {\n GET_PATIENT_NOTES,\n UPDATE_PATIENT_NOTE,\n CREATE_PATIENT_NOTE,\n DELETE_PATIENT_NOTE,\n} from \"../actions/types\";\n\nconst INITIAL_STATE = {\n notes: [],\n has_fetched: false,\n last_saved: undefined,\n};\n\n/**\n * Sorts notes in descending order of dates\n * @param {*} a\n * @param {*} b\n * @returns\n */\nfunction sortDates(a, b) {\n let aTime = moment(a.note_date);\n let bTime = moment(b.note_date);\n if (aTime < bTime) return 1;\n if (aTime > bTime) return -1;\n return 0;\n}\n\nexport default (state = INITIAL_STATE, action) => {\n switch (action.type) {\n case GET_PATIENT_NOTES: {\n let result = {\n ...state,\n response: action.response,\n has_fetched: true,\n note_count: action.payload.note_count,\n notes: action.payload.notes,\n };\n result.notes.sort(sortDates);\n return result;\n }\n case UPDATE_PATIENT_NOTE: {\n const note = action.payload.note;\n let result = {\n ...state,\n response: action.response,\n };\n let notes = [...state.notes];\n notes = result.notes.map((x) => {\n if (x.id == note.id) {\n x.note = note.note;\n x.note_date = note.note_date;\n }\n return x;\n });\n notes.sort(sortDates);\n result.notes = notes;\n return result;\n }\n case CREATE_PATIENT_NOTE: {\n let result = {\n ...state,\n response: action.response,\n };\n let notes = [...state.notes];\n notes.push(action.payload.note);\n notes.sort(sortDates);\n console.log(\"I am adding a note to the array\");\n result.notes = notes;\n return result;\n }\n case DELETE_PATIENT_NOTE: {\n let result = {\n ...state,\n response: action.response,\n };\n if (action.response.status == 200) {\n let notes = [...state.notes];\n notes = notes.filter((x) => x.id != action.payload.note_id);\n result.notes = notes;\n }\n return result;\n }\n default:\n return state;\n }\n};\n","import {\n GET_ORGANIZATIONS,\n REGISTER_ORGANIZATION,\n UPDATE_ACCOUNT_PRIVILEGE,\n GET_SESSIONS_BY_ORGANIZATION,\n UPDATE_SELECTED_ORGANIZATION,\n} from \"../actions/types\"\nimport { Debug } from \"../lib\"\n\nconst INITIAL_STATE = {\n organizations: [],\n selectedOrganization: \"\",\n hasFetched: false,\n response: [],\n sessions: [],\n}\n\nconst organizationReducer = (state = INITIAL_STATE, action) => {\n switch (action.type) {\n case GET_ORGANIZATIONS:\n return {\n ...state,\n hasFetched: true,\n organizations: action.payload || [],\n }\n case REGISTER_ORGANIZATION:\n return { ...state, response: action.response }\n case GET_SESSIONS_BY_ORGANIZATION:\n return { ...state, sessions: action.payload }\n case UPDATE_SELECTED_ORGANIZATION:\n Debug.log(\"ORG_ID: \" + action.id)\n return { ...state, selectedOrganization: action.id }\n case UPDATE_ACCOUNT_PRIVILEGE:\n return { ...state }\n default:\n return state\n }\n}\n\nexport default organizationReducer\n","const defaultPatientState = {\n detailedView: false,\n basicInformation: {\n firstName: \"\",\n lastName: \"\",\n dob: \"\",\n diagnosis: \"\",\n fitpoints: 0,\n },\n}\nconst patientReducer = (state = defaultPatientState, action) => {\n switch (action.type) {\n case \"setBasicInformation\":\n return {\n ...state,\n basicInformation: {\n id: action.payload.id,\n firstName: action.payload.first_name,\n lastName: action.payload.last_name,\n dob: action.payload.dob,\n org_id: action.payload.org_id,\n diagnosis: action.payload.patient_data?.diagnosis,\n fitpoints: action.payload.patient_data?.fitpoints,\n },\n }\n default:\n return state\n }\n}\n\nexport default patientReducer\n","import {\n PERMADMIN_GET_PERMISSIONS_LISTING,\n PERMADMIN_CREATE_PERMISSION,\n PERMADMIN_DELETE_PERMISSION,\n PERMADMIN_GET_ROLES_LISTING,\n PERMADMIN_CREATE_ROLE,\n PERMADMIN_UPDATE_ROLE,\n PERMADMIN_UPDATE_PERMISSION,\n} from \"../actions/types\";\n\nconst INITIAL_STATE = {\n permissions: [],\n permission_count: 0,\n hasFetchedPerms: false,\n roles: [],\n hasFetchedRoles: false,\n response: undefined,\n};\n\nexport default (state = INITIAL_STATE, action) => {\n switch (action.type) {\n case PERMADMIN_GET_PERMISSIONS_LISTING: {\n console.log(action);\n let result = {\n ...state,\n response: action.response,\n hasFetchedPerms: true,\n permissions:\n action.response.status == 200 ? action.payload.permissions : [],\n };\n result.permissions.sort((x, y) => {\n if (x.name < y.name) return -1;\n if (x.name > y.name) return 1;\n else return 0;\n });\n result.permission_count = result.permissions.length;\n console.log(\"result state:\");\n console.log(result);\n return result;\n }\n case PERMADMIN_CREATE_PERMISSION: {\n let result = { ...state, response: action.response };\n result.permissions.push(action.payload.permission);\n result.permission_count = result.permissions.length;\n return result;\n }\n case PERMADMIN_UPDATE_PERMISSION: {\n let result = { ...state, response: action.response };\n result.permissions = result.permissions.map((x) => {\n if (x.id === action.payload.permission.id) {\n Object.assign(x, action.payload.permission);\n }\n return x;\n });\n return result;\n }\n case PERMADMIN_DELETE_PERMISSION: {\n let result = { ...state, response: action.response };\n result.permissions = result.permissions.filter(\n (x) => x !== action.payload.permission_id\n );\n return result;\n }\n case PERMADMIN_GET_ROLES_LISTING:\n return {\n ...state,\n response: action.response,\n hasFetchedRoles: true,\n roles: action.payload || [],\n };\n case PERMADMIN_CREATE_ROLE: {\n let result = { ...state, response: action.response };\n result.roles.push(action.payload);\n return result;\n }\n case PERMADMIN_UPDATE_ROLE: {\n let result = { ...state, response: action.response };\n const added = action.payload.added_perms;\n const removed = action.payload.removed_perm;\n result.roles = result.roles.map((x) => {\n if (x.id === action.payload.role_id) {\n if (Array.isArray(removed)) {\n x.permissions = x.permissions.filter(\n (x) => !action.payload.removed_perms.includes(x.id)\n );\n }\n if (Array.isArray(added)) {\n for (let perm_id of added) {\n x.permissions.push(\n state.permissions.find((x) => x.id == perm_id)\n );\n }\n }\n }\n });\n return result;\n }\n default:\n return state;\n }\n};\n","import * as actionType from \"../actions/types\";\nimport { updateObject } from \"../lib/Utility\";\n\nconst initialState = {\n session: false,\n error: false,\n listSession: [],\n loading: false,\n count : {\n count_session : 0 ,\n percentage_attendanc_patients : 0\n },\n dataSet : [],\n sessions_patient_assigned: []\n};\n\nconst createSessionSuccess = (state, action) => {\n return updateObject(state, { session: action.session, loading: true });\n};\nconst createSessionFail = (state, action) => {\n return updateObject(state, { loading: true, error: action.session });\n};\nconst fetchSession = (state, action) => {\n return updateObject(state, {\n listSession: action.session,\n loading: false,\n session: null,\n error: false,\n });\n};\nconst editSession = (state, action) => {\n return updateObject(state, { session: action.session, loading: true });\n};\nconst deleteSession = (state, action) => {\n return updateObject(state, { session: action.session, loading: true });\n};\nconst recSession = (state, action) => {\n return updateObject(state, { session: action.session, loading: true });\n};\n\nconst countSession = (state , action) => {\n return updateObject(state, { ...state , count : action.count , dataSet : action.dataSet});\n}\n\nconst assignPatients = (state , action) => {\n return updateObject(state, { ...state , sessions_patient_assigned : action.sessions_patient_assigned});\n}\n\nconst scheduledSessionsReducer = (state = initialState, action) => {\n switch (action.type) {\n case actionType.CREATE_SCHEULE_SESSION:\n return createSessionSuccess(state, action);\n case actionType.MESSAGE_SCHEULE_SESSION_FAILER:\n return createSessionFail(state, action);\n case actionType.FETCH_SCHEULE_SESSION:\n return fetchSession(state, action);\n case actionType.EDIT_SCHEULE_SESSION:\n return editSession(state, action);\n case actionType.DELETE_SCHEULE_SESSION:\n return deleteSession(state, action);\n case actionType.RUCURRING_SCHEULE_SESSION:\n return recSession(state, action);\n case actionType.COUNT_SESSION_FOR_ORG:\n return countSession(state, action);\n case actionType.GET_ASSIGEND_PATIENT_SESSIONS_PARCTITIONER :\n return assignPatients(state, action);\n default:\n return state;\n }\n};\nexport default scheduledSessionsReducer;\n","import {\n GET_RADAR_PLOT_DATA,\n UPDATE_WITHIN_DATE_SELECT,\n} from \"../actions/types\";\n\nimport { createDateString } from \"../lib\";\n\nconst INITIAL_STATE = {\n userChartData: [],\n selectedDate: createDateString(30),\n};\n\nexport default (state = INITIAL_STATE, action) => {\n switch (action.type) {\n case GET_RADAR_PLOT_DATA:\n return { ...state, userChartData: action.payload };\n case UPDATE_WITHIN_DATE_SELECT:\n return { ...state, selectedDate: action.date };\n default:\n return state;\n }\n};\n","import { updateUserSuccess } from \"actions\";\nimport {\n GET_USERS_BY_ORG,\n GET_USER,\n GET_USER_REQUEST,\n GET_USER_SUCCESS,\n GET_USER_FAILURE,\n CREATE_USER,\n UPDATE_USER,\n UPDATE_SELECTED_USER,\n TOGGLE_LOGIN_FOR_USERS,\n ARCHIVE_USER,\n GET_SELECTED_USER,\n SUBMIT_USER_DATA,\n UPDATE_USER_REQUEST,\n UPDATE_USER_SUCCESS,\n UPDATE_USER_FAILURE,\n SET_LANGUAGE,\n GET_USER_ACTIVITY_STATS_REQUEST,\n GET_USER_ACTIVITY_STATS_SUCCESS,\n GET_USER_ACTIVITY_STATS_FAILURE,\n GET_PATIENT_REPORT_CONFIG_REQUEST,\n GET_PATIENT_REPORT_CONFIG_SUCCESS,\n GET_PATIENT_REPORT_CONFIG_FAILURE,\n GET_PATIENT_REPORT_CONFIG_CLEAR,\n CREATE_PATIENT_REPORT_CONFIG_REQUEST,\n CREATE_PATIENT_REPORT_CONFIG_SUCCESS,\n CREATE_PATIENT_REPORT_CONFIG_FAILURE,\n CREATE_PATIENT_REPORT_CONFIG_CLEAR,\n} from \"../actions/types\"\n\nconst INITIAL_STATE = {\n language: \"en-US\",\n users: [],\n selectedUser: \"\",\n user: {},\n viewed_user: {},\n patient_data: {},\n hasFetched: false,\n response: {},\n userRatings: [],\n userSessions: [],\n sessionType: \"\",\n isArchive: false,\n include_archived: true,\n userRadarChartData: [],\n fetchingUser: false,\n fetchUserSuccess: null,\n fetchUserFailure: null,\n updatingUser: false,\n updateUserSuccess: null,\n updateUserMessage: \"\",\n fetchingActivityStats: {},\n fetchActivityStatsSuccess: {},\n fetchActivityStatsFailure: {},\n activityStats: {},\n activityStatsError: {},\n fetchingReportConfig: false,\n fetchReportConfigSuccess: null,\n fetchReportConfigFailure: null,\n reportConfig: null,\n reportConfigError: null,\n creatingReportConfig: false,\n reportConfigCreateSuccess: null,\n reportConfigCreateFailure: null,\n}\n\nconst userReducer = (state = INITIAL_STATE, action) => {\n switch (action.type) {\n case SET_LANGUAGE:\n return {\n ...state,\n language: action.payload,\n }\n case GET_USERS_BY_ORG:\n return {\n ...state,\n users: action.payload,\n user_list: action.payload,\n hasFetched: true,\n include_archived: true,\n }\n case CREATE_USER:\n return { ...state, hasFetched: true, response: action.payload }\n case UPDATE_USER:\n return { ...state, hasFetched: true }\n case UPDATE_SELECTED_USER:\n return { ...state, selectedUser: action.userEmail }\n case TOGGLE_LOGIN_FOR_USERS:\n return { ...state, response: action.payload }\n case ARCHIVE_USER:\n return {\n ...state,\n user_list: [...state.user_list].map((user) => {\n if (user.id === action.payload.user_id) {\n user.status = action.payload.status\n console.log(\"Updated user status\")\n }\n return user\n }),\n selectedUser: action.payload.user_id,\n isArchive: false,\n }\n case GET_SELECTED_USER:\n return { ...state, selectedUser: action.id }\n case GET_USER:\n return {\n ...state,\n viewed_user: action.payload,\n viewed_patient_data: action.payload.patient_data,\n }\n case GET_USER_REQUEST:\n return {\n ...state,\n fetchingUser: true,\n fetchUserSuccess: false,\n fetchUserFailure: false,\n }\n case GET_USER_SUCCESS:\n return {\n ...state,\n fetchingUser: false,\n fetchUserSuccess: true,\n fetchUserFailure: false,\n viewed_user: {\n ...action.payload,\n basicInformation: {\n id: action.payload.id,\n firstName: action.payload.first_name,\n lastName: action.payload.last_name,\n dob: action.payload.dob,\n org_id: action.payload.org_id,\n diagnosis: action.payload.patient_data.diagnosis,\n fitpoints: action.payload.patient_data.fitpoints,\n },\n },\n }\n case GET_USER_FAILURE:\n return {\n ...state,\n fetchingUser: false,\n fetchUserSuccess: false,\n fetchUserFailure: true,\n fetchError: action.payload,\n }\n case UPDATE_USER_REQUEST:\n return {\n ...state,\n updatingUser: true,\n }\n case UPDATE_USER_SUCCESS:\n return {\n ...state,\n updatingUser: false,\n updateUserSuccess: true,\n updateUserMessage: action.payload,\n }\n case UPDATE_USER_FAILURE:\n return {\n ...state,\n updatingUser: false,\n updateUserSuccess: false,\n updateUserMessage: action.payload,\n }\n case GET_USER_ACTIVITY_STATS_REQUEST:\n return {\n ...state,\n fetchingActivityStats: { ...state.fetchingActivityStats, [action.payload.userId]: true },\n fetchActivityStatsSuccess: { ...state.fetchActivityStatsSuccess, [action.payload.userId]: false },\n fetchActivityStatsFailure: { ...state.fetchActivityStatsFailure, [action.payload.userId]: false },\n }\n case GET_USER_ACTIVITY_STATS_SUCCESS:\n return {\n ...state,\n fetchingActivityStats: { ...state.fetchingActivityStats, [action.payload.userId]: false },\n fetchActivityStatsSuccess: { ...state.fetchActivityStatsSuccess, [action.payload.userId]: true },\n fetchActivityStatsFailure: { ...state.fetchActivityStatsFailure, [action.payload.userId]: false },\n activityStats: {\n ...state.activityStats,\n [action.payload.userId]: action.payload.data,\n },\n }\n case GET_USER_ACTIVITY_STATS_FAILURE:\n return {\n ...state,\n fetchingActivityStats: { ...state.fetchingActivityStats, [action.payload.userId]: false },\n fetchActivityStatsSuccess: { ...state.fetchActivityStatsSuccess, [action.payload.userId]: false },\n fetchActivityStatsFailure: { ...state.fetchActivityStatsFailure, [action.payload.userId]: true },\n activityStatsError: {\n ...state.activityStatsError,\n [action.payload.userId]: action.payload,\n },\n }\n case GET_PATIENT_REPORT_CONFIG_REQUEST:\n return {\n ...state,\n fetchingReportConfig: true,\n fetchReportConfigSuccess: false,\n fetchReportConfigFailure: false,\n }\n case GET_PATIENT_REPORT_CONFIG_SUCCESS:\n return {\n ...state,\n fetchingReportConfig: false,\n fetchReportConfigSuccess: true,\n fetchReportConfigFailure: false,\n reportConfig: action.payload,\n }\n case GET_PATIENT_REPORT_CONFIG_FAILURE:\n return {\n ...state,\n fetchingReportConfig: false,\n fetchReportConfigSuccess: false,\n fetchReportConfigFailure: true,\n reportConfigError: action.payload,\n }\n case GET_PATIENT_REPORT_CONFIG_CLEAR:\n return {\n ...state,\n fetchingReportConfig: false,\n fetchReportConfigSuccess: false,\n fetchReportConfigFailure: false,\n reportConfigError: null,\n }\n case CREATE_PATIENT_REPORT_CONFIG_REQUEST:\n return {\n ...state,\n creatingReportConfig: true,\n reportConfigCreateSuccess: false,\n reportConfigCreateFailure: false,\n }\n case CREATE_PATIENT_REPORT_CONFIG_SUCCESS:\n return {\n ...state,\n creatingReportConfig: false,\n reportConfigCreateSuccess: true,\n reportConfigCreateFailure: false,\n reportConfig: action.payload,\n }\n case CREATE_PATIENT_REPORT_CONFIG_FAILURE:\n return {\n ...state,\n creatingReportConfig: false,\n reportConfigCreateSuccess: false,\n reportConfigCreateFailure: true,\n reportConfigError: action.payload,\n }\n case CREATE_PATIENT_REPORT_CONFIG_CLEAR:\n return {\n ...state,\n creatingReportConfig: false,\n reportConfigCreateSuccess: false,\n reportConfigCreateFailure: false,\n reportConfigError: null,\n }\n\n case SUBMIT_USER_DATA: {\n return {\n ...state,\n }\n }\n default:\n return state\n }\n}\n\nexport default userReducer\n","import { GET_USER_SESSIONS } from \"../actions/types\";\n\nconst INITIAL_STATE = {\n hasFetched: false,\n sessions: [],\n};\n\nexport default (state = INITIAL_STATE, action) => {\n switch (action.type) {\n case GET_USER_SESSIONS:\n return { ...state, sessions: action.payload, hasFetched: true };\n default:\n return state;\n }\n};\n","import { GET_USER_SKILL_LEVELS } from \"../actions/types\";\n\nconst INITIAL_STATE = {\n hasFetched: false,\n skillLevels: [],\n startDateSelect: new Date().toISOString(),\n endDateSelect: new Date().toISOString(),\n};\n\nexport default (state = INITIAL_STATE, action) => {\n switch (action.type) {\n case GET_USER_SKILL_LEVELS:\n return {\n ...state,\n skillLevel: action.payload,\n startDateSelect: action.date,\n endDateSelect: action.date,\n hasFetched: true,\n };\n default:\n return state;\n }\n};\n","import {\n GET_LEVELS_REQUEST,\n GET_LEVELS_SUCCESS,\n GET_LEVELS_FAILURE,\n GET_LEVEL_REQUEST,\n GET_LEVEL_SUCCESS,\n GET_LEVEL_FAILURE,\n GET_LEVEL_CLEAR,\n} from \"../actions/types\"\n\nconst INITIAL_STATE = {\n level: {},\n fetchingLevel: false,\n hasFetchedLevel: false,\n levels: [],\n fetchingLevels: false,\n hasFetchedLevels: false,\n fetchError: null,\n}\n\nconst gameLevelReducer = (state = INITIAL_STATE, action) => {\n switch (action.type) {\n case GET_LEVELS_REQUEST:\n return {\n ...state,\n hasFetchedLevels: true,\n }\n case GET_LEVELS_SUCCESS:\n return {\n ...state,\n levels: action.payload,\n }\n case GET_LEVELS_FAILURE:\n return {\n ...state,\n fetchError: action.payload,\n }\n case GET_LEVEL_REQUEST:\n return {\n ...state,\n hasFetchedLevel: true,\n }\n case GET_LEVEL_SUCCESS:\n return {\n ...state,\n level: action.payload,\n }\n case GET_LEVEL_FAILURE:\n return {\n ...state,\n fetchError: action.payload,\n }\n case GET_LEVEL_CLEAR:\n return {\n ...state,\n level: {},\n hasFetchedLevel: false,\n }\n default:\n return state\n }\n}\n\nexport default gameLevelReducer\n","import moment from \"moment\"\n\nconst assignmentsToActivities = (\n assignments,\n dateStart = null,\n dateEnd = null\n) => {\n let activities = []\n let start = dateStart && moment(dateStart)\n let end = dateEnd && moment(dateEnd)\n for (let a in assignments) {\n for (let w in assignments[a].activity_windows) {\n let windowParams = {\n start: assignments[a].activity_windows[w].start,\n end: assignments[a].activity_windows[w].end,\n }\n for (let act in assignments[a].activity_windows[w].activities) {\n assignments[a].activity_windows[w].activities[act] = {\n ...assignments[a].activity_windows[w].activities[act],\n ...windowParams,\n }\n }\n if (start && end) {\n if (\n moment(assignments[a].activity_windows[w].start).isBetween(start, end)\n ) {\n activities = activities.concat(assignments[a].activity_windows[w].activities)\n }\n } else if (start) {\n if (moment(assignments[a].activity_windows[w].start).isAfter(start)) {\n activities = activities.concat(assignments[a].activity_windows[w].activities)\n }\n } else if (end) {\n if (moment(assignments[a].activity_windows[w].start).isBefore(end)) {\n activities = activities.concat(assignments[a].activity_windows[w].activities)\n }\n } else {\n activities = activities.concat(assignments[a].activity_windows[w].activities)\n }\n }\n }\n\n return activities\n}\n\nexport { assignmentsToActivities }\n","import { assignmentsToActivities } from \"components/v2/sharedComponents/assignmentUtils\"\nimport {\n GET_ASSIGNMENTS,\n CREATE_ASSIGNMENT_REQUEST,\n CREATE_ASSIGNMENT_SUCCESS,\n CREATE_ASSIGNMENT_FAILURE,\n CREATE_ASSIGNMENT_RESET,\n UPDATE_ACTIVITY_REQUEST,\n UPDATE_ACTIVITY_SUCCESS,\n UPDATE_ACTIVITY_FAILURE,\n UPDATE_ACTIVITY_RESET,\n DELETE_ACTIVITY,\n} from \"../actions/types\"\n\nconst INITIAL_STATE = {\n assignments: [],\n activities: [],\n hasFetched: false,\n creating: false,\n createSuccess: null,\n createError: null,\n updating: false,\n updateSuccess: null,\n updateError: null,\n}\n\nconst assignmentReducer = (state = INITIAL_STATE, action) => {\n switch (action.type) {\n case GET_ASSIGNMENTS:\n return {\n ...state,\n hasFetched: true,\n assignments: action.payload || [],\n activities: assignmentsToActivities(action.payload) || [],\n }\n case CREATE_ASSIGNMENT_REQUEST:\n return {\n ...state,\n creating: true,\n createSuccess: false,\n createError: null,\n }\n case CREATE_ASSIGNMENT_SUCCESS:\n return {\n ...state,\n creating: false,\n createSuccess: true,\n createError: null,\n assignments: state.assignments,\n }\n case CREATE_ASSIGNMENT_FAILURE:\n return {\n ...state,\n creating: false,\n createSuccess: false,\n createError: action.payload,\n }\n case CREATE_ASSIGNMENT_RESET:\n return {\n ...state,\n creating: false,\n createSuccess: null,\n createError: null,\n }\n case UPDATE_ACTIVITY_REQUEST:\n return {\n ...state,\n updating: true,\n updateSuccess: false,\n updateError: null,\n }\n case UPDATE_ACTIVITY_SUCCESS:\n return {\n ...state,\n updating: false,\n updateSuccess: true,\n updateError: null,\n activities: state.activities.map((activity) =>\n activity.id === action.payload.id\n ? { ...activity, ...action.payload }\n : activity\n ),\n }\n case UPDATE_ACTIVITY_FAILURE:\n return {\n ...state,\n updating: false,\n updateSuccess: false,\n updateError: action.payload,\n }\n case UPDATE_ACTIVITY_RESET:\n return {\n ...state,\n updating: false,\n updateSuccess: null,\n updateError: null,\n }\n case DELETE_ACTIVITY:\n return {\n ...state,\n activities: state.activities.filter(activity => activity.id !== action.payload)\n };\n\n default:\n return state\n }\n}\n\nexport default assignmentReducer\n","import { combineReducers } from \"redux\";\nimport appbarReducer from \"./appbarReducer\";\nimport authReducer from \"./authReducer\";\nimport generalGraphReducer from \"./generalGraphReducer\";\nimport modalReducer from \"./modalReducer\";\nimport navReducer from \"./navReducer\";\nimport notesReducer from \"./notesReducer\";\nimport organizationReducer from \"./organizationReducer\";\nimport patientReducer from \"./patientReducer\";\nimport permissionsReducer from \"./permissionsReducer\";\nimport scheduledSessionsReducer from \"./ScheduledSessionsReducer\";\nimport userRadarPlotReducer from \"./userRadarPlotReducer\";\nimport userReducer from \"./userReducer\";\nimport userSessionReducer from \"./userSessionReducer\";\nimport userSkillLevelsReducer from \"./userSkillLevelsReducer\";\nimport gameLevelReducer from \"./gameLevelReducer\";\n\nimport { SIGN_OUT } from \"../actions/types\";\nimport PermissionsService from \"../lib/PermissionsSystem\";\nimport assignmentReducer from \"./assignmentReducer\";\n\nconst appReducer = combineReducers({\n appbarReducer,\n assignmentReducer,\n authReducer,\n generalGraphReducer,\n modalReducer,\n navReducer,\n notesReducer,\n organizationReducer,\n patientReducer,\n permissionsReducer,\n session: scheduledSessionsReducer,\n userRadarPlotReducer,\n userReducer,\n userSessionReducer,\n userSkillLevelsReducer,\n gameLevelReducer,\n});\n\nexport default (state, action) => {\n if (state === undefined) {\n PermissionsService._Hydrate();\n }\n\n if (action.type === SIGN_OUT) {\n state = undefined;\n PermissionsService.Reset();\n }\n\n return appReducer(state, action);\n};\n","import reduxThunk from \"redux-thunk\";\nimport { createStore, applyMiddleware, compose } from \"redux\";\nimport reducers from \"./reducers\";\nconst composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;\nconst store = createStore(\n reducers,\n composeEnhancers(applyMiddleware(reduxThunk))\n);\n\nexport default store;\n","/* -------------------------------------------------------------------------- */\n/* This file contains the action types */\n/* -------------------------------------------------------------------------- */\n\n//Auth action types\nexport const SIGN_IN = \"SIGN_IN\"\nexport const SIGN_OUT = \"SIGN_OUT\"\nexport const GET_PRIVILEGE = \"GET_PRIVILEGE\"\n\n//App bar (side nav) actions types\nexport const TOGGLE_LOGOUT_MODAL = \"TOGGLE_LOGOUT_MODAL\"\nexport const TOGGLE_DRAWER = \"TOGGLE_DRAWER\"\nexport const ACTIVE_PATH_CHANGED = \"ACTIVE_PATH_CHANGED\"\n\n// Submit user actions\nexport const SUBMIT_USER_DATA = \"SUBMIT_USER_DATA\"\n\n//Organizations Action types\nexport const GET_ORGANIZATION_SINGLE = \"GET_ORGANIZATION_SINGLE\"\nexport const GET_ORGANIZATIONS = \"GET_ORGANIZATIONS\"\nexport const REGISTER_ORGANIZATION = \"REGISTER_ORGANIZATION\"\nexport const UPDATE_ACCOUNT_PRIVILEGE = \"UPDATE_ACCOUNT_PRIVILEGE\"\nexport const GET_SESSIONS_BY_ORGANIZATION = \"GET_SESSIONS_BY_ORGANIZATION\"\nexport const UPDATE_SELECTED_ORGANIZATION = \"UPDATE_SELECTED_ORGANIZATION\"\nexport const GET_DETAILS_CURRENT_AUTH_ORG = \"GET_DETAILS_CURRENT_AUTH_ORG\"\n\n// Game Level Action types\nexport const GET_LEVELS_REQUEST = \"GET_LEVELS_REQUEST\"\nexport const GET_LEVELS_SUCCESS = \"GET_LEVELS_SUCCESS\"\nexport const GET_LEVELS_FAILURE = \"GET_LEVELS_FAILURE\"\nexport const GET_LEVEL_REQUEST = \"GET_LEVEL_REQUEST\"\nexport const GET_LEVEL_SUCCESS = \"GET_LEVEL_SUCCESS\"\nexport const GET_LEVEL_FAILURE = \"GET_LEVEL_FAILURE\"\nexport const GET_LEVEL_CLEAR = \"GET_LEVEL_CLEAR\"\n\n//User Action types\nexport const GET_USERS_BY_ORG = \"GET_USERS_BY_ORG\"\nexport const UPDATE_USER = \"UPDATE_USER\"\nexport const UPDATE_USER_REQUEST = \"UPDATE_USER_REQUEST\"\nexport const UPDATE_USER_SUCCESS = \"UPDATE_USER_SUCCESS\"\nexport const UPDATE_USER_FAILURE = \"UPDATE_USER_FAILURE\"\nexport const CREATE_USER = \"CREATE_USER\"\nexport const UPDATE_SELECTED_USER = \"UPDATE_SELECTED_USER\"\nexport const TOGGLE_LOGIN_FOR_USERS = \"TOGGLE_LOGIN_FOR_USERS\"\nexport const ARCHIVE_USER = \"ARCHIVE_USER\"\nexport const GET_SELECTED_USER = \"GET_SELECTED_USER\"\nexport const GET_USER = \"GET_USER\"\nexport const GET_USER_REQUEST = \"GET_USER_REQUEST\"\nexport const GET_USER_SUCCESS = \"GET_USER_SUCCESS\"\nexport const GET_USER_FAILURE = \"GET_USER_FAILURE\"\nexport const SET_LANGUAGE = \"SET_LANGUAGE\"\n\nexport const GET_USER_ACTIVITY_STATS_REQUEST = 'GET_USER_ACTIVITY_STATS_REQUEST'\nexport const GET_USER_ACTIVITY_STATS_SUCCESS = 'GET_USER_ACTIVITY_STATS_SUCCESS'\nexport const GET_USER_ACTIVITY_STATS_FAILURE = 'GET_USER_ACTIVITY_STATS_FAILURE'\n\nexport const GET_PATIENT_REPORT_CONFIG_REQUEST =\n \"GET_PATIENT_REPORT_CONFIG_REQUEST\"\nexport const GET_PATIENT_REPORT_CONFIG_SUCCESS =\n \"GET_PATIENT_REPORT_CONFIG_SUCCESS\"\nexport const GET_PATIENT_REPORT_CONFIG_FAILURE =\n \"GET_PATIENT_REPORT_CONFIG_FAILURE\"\nexport const GET_PATIENT_REPORT_CONFIG_CLEAR = \"GET_PATIENT_REPORT_CONFIG_CLEAR\"\nexport const CREATE_PATIENT_REPORT_CONFIG_REQUEST =\n \"CREATE_PATIENT_REPORT_CONFIG_REQUEST\"\nexport const CREATE_PATIENT_REPORT_CONFIG_SUCCESS =\n \"CREATE_PATIENT_REPORT_CONFIG_SUCCESS\"\nexport const CREATE_PATIENT_REPORT_CONFIG_FAILURE =\n \"CREATE_PATIENT_REPORT_CONFIG_FAILURE\"\nexport const CREATE_PATIENT_REPORT_CONFIG_CLEAR = \"CREATE_PATIENT_REPORT_CONFIG_CLEAR\"\n\n//Modal Action types\nexport const SHOW_MODAL = \"SHOW_MODAL\"\nexport const HIDE_MODAL = \"HIDE_MODAL\"\n\n//General Graph Action types (User Cognitive Profile)\nexport const UPDATE_START_DATE_SELECT = \"UPDATE_START_DATE_SELECT\"\nexport const UPDATE_END_DATE_SELECT = \"UPDATE_END_DATE_SELECT\"\nexport const TOGGLE_MEMORY_LINE = \"TOGGLE_MEMORY_LINE\"\nexport const TOGGLE_PROCESSING_LINE = \"TOGGLE_PROCESSING_LINE\"\nexport const TOGGLE_ATTENTION_LINE = \"TOGGLE_ATTENTION_LINE\"\nexport const GET_GRAPH_DATA = \"GET_GRAPH_DATA\"\n\nexport const GET_ACTIVE_USERS = \"GET_ACTIVE_USERS\"\n\n//User Radar Plot Action types\nexport const GET_RADAR_PLOT_DATA = \"GET_RADAR_PLOT_DATA\"\nexport const UPDATE_WITHIN_DATE_SELECT = \"UPDATE_WITHIN_DATE_SELECT\"\n\n// User Correct vs Incorrect\nexport const GET_USER_SESSIONS = \"GET_USER_SESSIONS\"\n\n// User Skill Level Plays Over Time\nexport const GET_USER_SKILL_LEVELS = \"GET_USER_SKILL_LEVELS\"\n//Bar Chart\nexport const GET_STACKED_BAR_CHART = \"GET_STACKED_BAR_CHART\"\n//Schedule Sessions\nexport const CREATE_SESSION = \"CREATE_SESSION\"\nexport const SHOW_SESSION = \"SHOW_SESSION\"\nexport const ADD_PATIENT = \"ADD_PATIENT\"\n\n// Permissions and roles\nexport const PERMADMIN_GET_PERMISSIONS_LISTING =\n \"PERMADMIN_GET_PERMISSIONS_LISTING\"\nexport const PERMADMIN_CREATE_PERMISSION = \"PERMADMIN_CREATE_PERMISSION\"\nexport const PERMADMIN_DELETE_PERMISSION = \"PERMADMIN_DELETE_PERMISSION\"\nexport const PERMADMIN_GET_ROLES_LISTING = \"PERMADMIN_GET_ROLES_LISTING\"\nexport const PERMADMIN_CREATE_ROLE = \"PERMADMIN_CREATE_ROLE\"\nexport const PERMADMIN_UPDATE_ROLE = \"PERMADMIN_UPDATE_ROLE\"\nexport const PERMADMIN_UPDATE_PERMISSION = \"PERMADMIN_UPDATE_PERMISSION\"\n\n// Patient Notes\nexport const GET_PATIENT_NOTES = \"GET_PATIENT_NOTES\"\nexport const UPDATE_PATIENT_NOTE = \"UPDATE_PATIENT_NOTE\"\nexport const CREATE_PATIENT_NOTE = \"CREATE_PATIENT_NOTE\"\nexport const DELETE_PATIENT_NOTE = \"DELETE_PATIENT_NOTE\"\n\n// MetaTemplates\nexport const GET_META_TEMPLATES = \"GET_META_TEMPLATES\"\nexport const GET_META_TEMPLATE_SESSIONS = \"GET_META_TEMPLATE_SESSIONS\"\nexport const GET_META_DATA_SESSIONS = \"GET_META_DATA_SESSIONS\"\n\n//Sessions\nexport const CREATE_SCHEULE_SESSION = \"CREATE_SCHEULE_SESSION\"\nexport const MESSAGE_SCHEULE_SESSION_FAILER = \"MESSAGE_SCHEULE_SESSION_FAILER\"\nexport const FETCH_SCHEULE_SESSION = \"FETCH_SCHEULE_SESSION\"\nexport const EDIT_SCHEULE_SESSION = \"EDIT_SCHEULE_SESSION\"\nexport const DELETE_SCHEULE_SESSION = \"DELETE_SCHEULE_SESSION\"\nexport const RUCURRING_SCHEULE_SESSION = \"RUCURRING_SCHEULE_SESSION\"\nexport const COUNT_SESSION_FOR_ORG = \"COUNT_SESSION_FOR_ORG\"\nexport const GET_OVER_PROGRESS_OVER_TIME = \"GET_OVER_PROGRESS_OVER_TIME\"\nexport const GET_ASSIGEND_PATIENT_SESSIONS_PARCTITIONER =\n \"GET_ASSIGEND_PATIENT_SESSIONS_PARCTITIONER\"\n\n//count patients\nexport const GET_COUNT_PAITENTS_ORG = \"GET_COUNT_PAITENTS_ORG\"\nexport const GET_RATINGS_PAITENTS_ORG = \"GET_RATINGS_PAITENTS_ORG\"\nexport const GET_PATIENTS_SESSIONS_ORG = \"GET_PATIENTS_SESSIONS_ORG\"\nexport const GET_USERS_BY_ORG_ID = \"GET_USERS_BY_ORG_ID\"\nexport const GET_LONGEST_STREAK = \"GET_LONGEST_STREAK\"\nexport const GET_ASSIGNED_PATIENTS = \"GET_ASSIGNED_PATIENTS\"\n\n// Navbar\nexport const NAV_EXPAND = \"NAV_EXPAND\"\nexport const NAV_COLLAPSE = \"NAV_COLLAPSE\"\n\n// Assignments\nexport const GET_ASSIGNMENTS = \"GET_ASSIGNMENTS\"\nexport const CREATE_ASSIGNMENT_REQUEST = \"CREATE_ASSIGNMENT_REQUEST\"\nexport const CREATE_ASSIGNMENT_SUCCESS = \"CREATE_ASSIGNMENT_SUCCESS\"\nexport const CREATE_ASSIGNMENT_FAILURE = \"CREATE_ASSIGNMENT_FAILURE\"\nexport const CREATE_ASSIGNMENT_RESET = \"CREATE_ASSIGNMENT_RESET\"\nexport const UPDATE_ACTIVITY_REQUEST = \"UPDATE_ACTIVITY_REQUEST\"\nexport const UPDATE_ACTIVITY_SUCCESS = \"UPDATE_ACTIVITY_SUCCESS\"\nexport const UPDATE_ACTIVITY_FAILURE = \"UPDATE_ACTIVITY_FAILURE\"\nexport const UPDATE_ACTIVITY_RESET = \"UPDATE_ACTIVITY_RESET\"\nexport const DELETE_ACTIVITY = 'DELETE_ACTIVITY';\n\nexport const GET_ACTIVE_PATIENTS_REQUEST = 'GET_ACTIVE_PATIENTS_REQUEST'\nexport const GET_ACTIVE_PATIENTS_SUCCESS = 'GET_ACTIVE_PATIENTS_SUCCESS'\nexport const GET_ACTIVE_PATIENTS_FAILURE = 'GET_ACTIVE_PATIENTS_FAILURE'\n","export default __webpack_public_path__ + \"static/media/neurofit-logo.d6bdce82.svg\";","/**\n * This is the file for the login form only\n */\n\nimport React from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { useDispatch, useSelector } from \"react-redux\";\n\n// these are the material-ui components\nimport { Button, TextField, Grid, Typography, Hidden } from \"@material-ui/core\";\nimport { Alert } from \"@material-ui/lab\";\nimport { makeStyles } from \"@material-ui/core/styles\";\n\nimport { signIn } from \"../../actions\";\n\n// Neurofit logo\nimport logo from \"../../assets/images/neurofit-logo.svg\";\nimport { Debug } from \"../../lib\";\nimport util from \"util\";\n\nconst useStyles = makeStyles((theme) => ({\n alertBox: {\n width: \"100%\",\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n },\n forgotPasswordLink: {\n textDecoration: \"none\",\n fontSize: \"0.75em\",\n textAlign: \"right\",\n paddingTop: theme.spacing(1),\n },\n}));\n\nexport default function LoginForm(props) {\n const classes = useStyles();\n const { register, handleSubmit, setValue, errors, reset } = useForm();\n const dispatch = useDispatch();\n const [message, onMessageChanged] = React.useState(\"\");\n\n // a function used for logging in\n const onSubmit = async (data) => {\n let response = await signIn(data)(dispatch);\n Debug.log(\"response: \" + util.inspect(response));\n if (!response.is_error) {\n reset();\n } else {\n onMessageChanged(response.message);\n }\n };\n\n // renders the error message when login credential is invalid\n const renderError = () => {\n if (message) {\n return (\n
\n {message}\n
\n );\n }\n };\n\n return (\n // \n\n \n {/* login form */}\n \n \n Log In\n \n
\n \n {errors.email && {errors.email.message} }\n \n {errors.password && Invalid Password}\n \n \n Forgot Password?\n \n {renderError()}\n {/*\n Register\n */}\n \n
\n\n {/* neurofit logo and title */}\n \n \"Neurofit\n \n Neurofit VR\n \n \n
\n //
\n );\n}\n","/**\n * This is the main file for the login page\n */\n\nimport React, { Component } from \"react\";\nimport LoginForm from \"./LoginForm.js\";\nimport { Container } from \"@material-ui/core\";\nimport { signIn } from \"../../actions\";\n\nclass Login extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\n\nexport default Login;\n","import React, { Component } from \"react\";\nimport { Container } from \"@material-ui/core\";\n\nimport { useForm } from \"react-hook-form\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { withRouter } from \"react-router-dom\";\n\nimport { reqPasswordReset } from \"../../actions\";\n\nimport TextField from \"@material-ui/core/TextField\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Button from \"@material-ui/core/Button\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Hidden from \"@material-ui/core/Hidden\";\nimport Alert from \"@material-ui/lab/Alert\";\nimport { makeStyles, withStyles } from \"@material-ui/core/styles\";\n\nimport * as yup from \"yup\";\n\nimport logo from \"../../assets/images/neurofit-logo.svg\";\n\nconst style = (theme) => ({\n alertBox: {\n width: \"100%\",\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n },\n});\n\nclass ForgotPassword extends Component {\n constructor(props) {\n super(props);\n this.state = {\n submitted: false,\n message: undefined,\n email: \"\",\n confirmEmail: \"\",\n errors: [],\n };\n this.onSubmit = this.onSubmit.bind(this);\n this.renderForm = this.renderForm.bind(this);\n this.renderSubmittedMessage = this.renderSubmittedMessage.bind(this);\n this.renderFormErrors = this.renderFormErrors.bind(this);\n\n this.schema = yup.object().shape({\n email: yup.string().email().required(),\n emailConfirm: yup.string().oneOf([yup.ref(\"email\")], \"Emails must match\"),\n });\n }\n\n async onSubmit(event) {\n event.preventDefault();\n try {\n const data = {\n email: this.state.email,\n confirmEmail: this.state.confirmEmail,\n };\n const validData = this.schema.validateSync(data);\n let response = await reqPasswordReset(validData)(() => {});\n\n if (response) {\n this.setState({\n ...this.state,\n submitted: true,\n message: \"An email has been sent with further instructions\",\n });\n } else {\n this.setState({\n ...this.state,\n submitted: true,\n message: \"An error has occurred, please try again later\",\n });\n }\n setTimeout(() => {\n this.props.history.push(\"/\");\n console.log(\"Returning to login\");\n }, 5000);\n } catch (e) {\n if (e.name === \"ValidationError\") {\n this.setState({\n ...this.state,\n submitted: false,\n message: undefined,\n errors: e.errors,\n });\n } else {\n console.error(e);\n this.setState({\n ...this.state,\n submitted: false,\n message: undefined,\n errors: [\"An unexpected error has occurred\"],\n });\n }\n }\n }\n\n renderFormErrors() {\n return this.state.errors.map((errorMessage, ix) => (\n
\n {errorMessage}\n
\n ));\n }\n\n renderForm() {\n const errors = this.state.errors;\n const { classes } = this.props;\n return (\n \n \n Request Password Reset\n \n \n
\n {\n this.setState({ ...this.state, email: event.target.value });\n }}\n />\n {\n this.setState({\n ...this.state,\n confirmEmail: event.target.value,\n });\n }}\n />\n {this.renderFormErrors()}\n \n \n
\n
\n );\n }\n\n renderSubmittedMessage() {\n return (\n \n \n {this.state.message}\n \n Returning to login page...\n \n );\n }\n\n render() {\n return (\n \n \n {this.state.submitted\n ? this.renderSubmittedMessage()\n : this.renderForm()}\n {/* neurofit logo and title */}\n \n \"Neurofit\n \n Neurofit VR\n \n \n \n \n );\n }\n}\n\nexport default withRouter(withStyles(style)(ForgotPassword));\n","import React, { Component } from \"react\";\nimport { Container } from \"@material-ui/core\";\nimport { withRouter } from \"react-router-dom\";\n\nimport TextField from \"@material-ui/core/TextField\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Button from \"@material-ui/core/Button\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Hidden from \"@material-ui/core/Hidden\";\nimport Alert from \"@material-ui/lab/Alert\";\nimport { makeStyles, withStyles } from \"@material-ui/core/styles\";\nimport * as yup from \"yup\";\nimport * as queryString from \"query-string\";\nimport { validateResetToken, resetPassword, signIn } from \"../../actions\";\n\nimport logo from \"../../assets/images/neurofit-logo.svg\";\n\nconst style = (theme) => ({\n alertBox: {\n width: \"100%\",\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n },\n});\n\nclass ResetPassword extends Component {\n constructor(props) {\n super(props);\n this.state = {\n submitted: false,\n validToken: false,\n password: \"\",\n confirmPassword: \"\",\n token: \"\",\n errors: [],\n };\n this.handleSubmit = this.handleSubmit.bind(this);\n this.renderFormErrors = this.renderFormErrors.bind(this);\n this.renderForm = this.renderForm.bind(this);\n this.renderSubmittedPage = this.renderSubmittedPage.bind(this);\n this.query = queryString.parse(this.props.location.search);\n this.state.token = this.query.token;\n\n this.schema = yup.object().shape({\n password: yup\n .string()\n .required(\"Password is required\")\n .min(8, \"Password should be at least 6 characters!\"),\n passwordConfirmation: yup\n .string()\n .oneOf([yup.ref(\"user_password\"), null], \"Passwords must match\"),\n });\n }\n\n async componentDidMount() {\n const isValid = await validateResetToken({ token: this.query.token })(\n () => {}\n );\n this.setState({\n ...this.state,\n validToken: isValid,\n });\n console.log(isValid);\n }\n\n renderFormErrors() {\n return this.state.errors.map((errorMessage, ix) => (\n
\n {errorMessage}\n
\n ));\n }\n\n async handleSubmit(event) {\n event.preventDefault();\n\n try {\n const data = {\n password: this.state.password,\n confirmPassword: this.state.confirmPassword,\n };\n const validated = this.schema.validateSync(data);\n const reqData = {\n new_password: validated.password,\n token: this.state.token,\n };\n\n const reset = await resetPassword(reqData)(() => {});\n if (reset) {\n this.setState({\n ...this.state,\n submitted: true,\n message: \"Your password has been updated, redirecting to login...\",\n });\n setTimeout(async () => {\n this.props.history.push(\"/\");\n console.log(\"Returning to login\");\n }, 4000);\n } else {\n this.setState({\n ...this.state,\n submitted: true,\n errors: [\"Failed to update password. Please try again\"],\n message: \"Failed to update password. Please try again.\",\n });\n }\n } catch (e) {\n if (e.name === \"ValidationError\") {\n this.setState({\n ...this.state,\n submitted: false,\n message: undefined,\n errors: e.errors,\n });\n } else {\n console.error(e);\n this.setState({\n ...this.state,\n submitted: false,\n message: undefined,\n errors: [\"An unexpected error has occurred\"],\n });\n }\n }\n }\n\n renderForm() {\n const { classes } = this.props;\n return this.state.validToken ? (\n \n \n Reset Password\n \n
\n {\n this.setState({ ...this.state, password: event.target.value });\n }}\n />\n {\n this.setState({\n ...this.state,\n confirmPassword: event.target.value,\n });\n }}\n />\n {this.renderFormErrors()}\n \n \n
\n ) : (\n Token is invalid or expired, please try again\n );\n }\n\n renderSubmittedPage() {\n return (\n \n \n {this.state.message}\n \n \n );\n }\n\n render() {\n const { classes } = this.props;\n return (\n \n \n \n {this.state.submitted\n ? this.renderSubmittedPage()\n : this.renderForm()}\n \n {/* neurofit logo and title */}\n \n \"Neurofit\n \n Neurofit VR\n \n \n \n \n );\n }\n}\n\nexport default withRouter(withStyles(style)(ResetPassword));\n","import React, { useState } from \"react\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Button from \"@material-ui/core/Button\";\nimport TableCell from \"@material-ui/core/TableCell\";\nimport TableRow from \"@material-ui/core/TableRow\";\nimport MenuItem from \"@material-ui/core/MenuItem\";\nimport FormControl from \"@material-ui/core/FormControl\";\nimport Select from \"@material-ui/core/Select\";\nimport AccountImage from \"../../assets/images/organization profile.png\";\n\nconst useStyles = makeStyles((theme) => ({\n wideCell: {\n minWidth: \"150px\",\n },\n}));\n\nexport default function OrganizationsListRow(props) {\n async function handleUpdate(id) {\n const updatePrivilege = await props.setPrivilege(id, privilege);\n }\n\n function privilegeText(privilege) {\n switch (privilege) {\n case -1:\n return \"Inactive\";\n case 0:\n return \"Organization\";\n\n case 1:\n return \"Admin\";\n\n default:\n return \"N/A\";\n }\n }\n\n const classes = useStyles();\n\n const [privilege, setPrivilege] = useState(props.privilege);\n\n const handleChange = (e) => {\n setPrivilege(e.target.value);\n };\n\n const owner = props.Owner;\n const first_name = owner ? owner.first_name : \"\";\n const last_name = owner ? owner.last_name : \"\";\n const email = owner ? owner.email : \"\";\n return (\n \n \n \n \"Organization\"/\n \n \n {first_name}\n {last_name}\n {email}\n {props.name}\n \n {new Date(props.updated_at).toDateString()}\n \n {new Date(props.created_at).toDateString()}\n {privilegeText(props.privilege)}\n {props.dataPre !== 0 && \n \n {\n handleChange(e);\n }}\n >\n Inactive\n Organization\n Admin\n \n \n \n }\n {props.dataPre !== 0 && \n {\n handleUpdate(props.id);\n }}\n >\n Update Privilege\n \n \n }\n \n );\n}\n","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAANLSURBVHgBrVZNTttAFH5vbLOoKhRKqdRdOEGTRUtpF01OAJwAOAExPQBh3YLDCUhPUHICw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from \"react\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Table from \"@material-ui/core/Table\";\nimport TableBody from \"@material-ui/core/TableBody\";\nimport TableCell from \"@material-ui/core/TableCell\";\nimport TableContainer from \"@material-ui/core/TableContainer\";\nimport TableHead from \"@material-ui/core/TableHead\";\nimport TableRow from \"@material-ui/core/TableRow\";\nimport Paper from \"@material-ui/core/Paper\";\nimport OrganizationsListRow from \"./OrganizationsListRow\";\nimport TableSortLabel from '@mui/material/TableSortLabel';\n\n\nconst useStyles = makeStyles((theme) => ({\n table: {\n minWidth: 1000,\n padding: theme.spacing(1),\n },\n paper: {\n marginBottom: theme.spacing(3),\n },\n tableHead: {\n backgroundColor: '#c4dfef',\n },\n tableHeadCell: {\n color : '#2290D1'\n },\n sortTableActive : {\n color : 'rgba(34, 144, 209 , 0.87) !important' ,\n },\n wideCell: {\n minWidth: \"150px\",\n },\n dataDeep : {\n minWidth: \"100px\",\n color : '#2290D1'\n }\n}));\n\nfunction renderTableRows(props , order , orderBy) {\n\n function descendingComparator(a, b, orderBy) {\n\n if (b['Owner'] && a['Owner'] && b['Owner'][orderBy] < a['Owner'][orderBy]) {\n return -1;\n }\n if (b['Owner'] && a['Owner'] && b['Owner'][orderBy] > a['Owner'][orderBy]) {\n return 1;\n }\n return 0;\n }\n\n function descendingComparator_1(a, b, orderBy) {\n\n if (b && a && b[orderBy] < a[orderBy]) {\n return -1;\n }\n if (b && a && b[orderBy] > a[orderBy]) {\n return 1;\n }\n return 0;\n }\n\n function getComparator(order, orderBy) {\n if(orderBy === 'name' || orderBy === 'created_at' || orderBy === 'updated_at') {\n return order === \"desc\"\n ? (a, b) => descendingComparator_1(a, b, orderBy)\n : (a, b) => -descendingComparator_1(a, b, orderBy);\n }\n return order === \"desc\"\n ? (a, b) => descendingComparator(a, b, orderBy)\n : (a, b) => -descendingComparator(a, b, orderBy);\n }\n\n function stableSort(array, comparator) {\n const stabilizedThis = array.map((el, index) => [el, index]);\n stabilizedThis.sort((a, b) => {\n const order = comparator(a[0], b[0]);\n if (order !== 0) {\n return order;\n }\n return a[1] - b[1];\n });\n return stabilizedThis.map((el) => el[0]);\n }\n\n if (Array.isArray(props.organizations)) {\n let data = props.hide_inactive\n ? props.organizations.filter((x) => x.privilege != -1)\n : props.organizations;\n return data.sort(getComparator(order,orderBy)).map((row) => {\n return (\n \n );\n });\n } else if (props.organizations?.privilege === 0) {\n let data = props.organizations\n return (\n \n )\n } else {\n return (\n \n Failed to load organizations\n \n );\n }\n}\n\nexport default function OrganizationsList(props) {\n const classes = useStyles();\n const [order, setOrder] = React.useState('');\n const [orderBy, setOrderBy] = React.useState('');\n const [tableRows , setTableRows] = React.useState(renderTableRows(props , order , orderBy));\n useEffect(() => { \n if(order || orderBy || props.hide_inactive !== null) {\n setTableRows(renderTableRows(props , order , orderBy))\n }\n },[order , orderBy , props.hide_inactive])\n const handleRequestSort = (event, property) => {\n const isAsc = orderBy === property && order === 'asc';\n setOrder(isAsc ? 'desc' : 'asc');\n setOrderBy(property);\n };\n\n const createSortHandler = (property) => (event) => {\n handleRequestSort(event, property);\n };\n\n\n return (\n \n \n \n \n \n Organization Report\n \n \n \n First Name\n \n \n \n \n Last Name\n \n \n \n \n Email\n \n \n \n \n Organization Name\n \n \n \n \n Last Update\n \n \n \n \n Creation date\n \n \n \n Privilege\n \n {props?.organizations?.privilege !== 0 && \n Set Privilege\n }\n {props?.organizations?.privilege !== 0 && \n Update Privilege\n }\n \n \n {tableRows}\n
\n
\n );\n}\n","import React from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport AddIcon from \"../sharedComponents/AddIcon\";\n\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport TextField from \"@material-ui/core/TextField\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Button from \"@material-ui/core/Button\";\nimport Modal from \"@material-ui/core/Modal\";\nimport Alert from \"@material-ui/lab/Alert\";\nimport FormLabel from \"@material-ui/core/FormLabel\";\nimport { Grid } from \"@material-ui/core\";\n\nimport * as yup from \"yup\";\nimport { useSelector } from \"react-redux\";\nimport { yupResolver } from \"@hookform/resolvers/yup\";\n\nconst useStyles = makeStyles((theme) => ({\n form: {\n width: \"100%\",\n marginTop: theme.spacing(1),\n display: \"flex\",\n flexDirection: \"row\",\n flexWrap: \"wrap\",\n justifyContent: \"space-between\",\n },\n paper: {\n flexDirection: \"column\",\n justifyContent: \"center\",\n maxWidth: \"800px\",\n backgroundColor: \"#fdfdfd\",\n padding: theme.spacing(6),\n border: `3px solid ${theme.palette.primary.main}`,\n margin: \"auto\",\n position: \"fixed\",\n top: theme.spacing(8),\n bottom: theme.spacing(8),\n right: 0,\n left: 0,\n overflowY: \"scroll\",\n },\n addBtn: {\n marginTop: theme.spacing(1),\n backgroundColor: \"#8FCAED\",\n fontSize: \"16px\",\n textTransform: \"capitalize\",\n color: \"#333437\",\n \"&:hover\": {\n backgroundColor: \"#8FCAED\",\n },\n },\n messageContainer: {\n marginTop: theme.spacing(3),\n },\n}));\n\nconst schema = yup.object().shape({\n org_name: yup.string().required(),\n user_email: yup.string().email(),\n user_password: yup\n .string()\n .required()\n .min(8, \"Password should be at least 6 characters!\"),\n passwordConfirmation: yup\n .string()\n .oneOf([yup.ref(\"user_password\")], \"Passwords must match\"),\n email: yup.string().email(),\n first_name: yup.string().required(),\n last_name: yup.string().required(),\n});\n\nexport default function AddOrganizationForm(props) {\n const classes = useStyles();\n\n const { register, handleSubmit, setValue, errors, reset } = useForm({\n resolver: yupResolver(schema),\n });\n\n\n const open = useSelector((state) => state.modalReducer.modalProps.open);\n const responseMessage = useSelector(\n (state) => state.organizationReducer.response\n );\n\n const handleOpen = () => {\n props.showModal({\n modalProps: {\n open: true,\n },\n modalType: \"addOrganizationModal\",\n });\n };\n\n const handleClose = () => props.hideModal();\n\n const onSubmit = async (data) => {\n\n const user_data = {\n email: data.user_email.trim(),\n password: data.user_password,\n first_name: data.first_name.trim(),\n last_name: data.last_name.trim(),\n };\n\n const org_data = {\n name: data.org_name,\n };\n\n const response = await props.registerOrganization({\n user: user_data,\n org: org_data,\n });\n\n if (response.status === 200) {\n reset();\n setTimeout(props.hideModal, 2000);\n }\n };\n\n const renderResponseMessage = () => {\n if (responseMessage.status === 200) {\n return (\n
\n \n {responseMessage.message}\n \n
\n );\n } else if (responseMessage.status === 400) {\n return (\n
\n {responseMessage.message}\n
\n );\n }\n };\n\n const renderFormError = (errorMessage) => {\n return (\n
\n {errorMessage}\n
\n );\n };\n\n const body = (\n
\n \n Create an Organization\n \n
\n \n \n \n \n\n \n Admin User Account Settings\n \n {/* first name */}\n \n \n \n {/* last name */}\n \n \n \n\n {/* email */}\n \n \n // )\n // }}\n />\n \n\n \n \n \n \n \n \n\n {/* date of birth \n \n \n \n {\n handleDateChange(date);\n }}\n KeyboardButtonProps={{\n \"aria-label\": \"change date\",\n }}\n />\n \n \n \n \n \n \n Gender\n \n \n }\n label=\"Female\"\n />\n \n }\n label=\"Male\"\n />\n \n \n\n {/*\n Pronouns\n \n \n }\n label=\"He/Him/His\"\n />\n \n }\n label=\"She/Her/Hers\"\n />\n \n }\n label=\"They/Them/Theirs\"\n />\n \n \n \n \n */}\n \n \n Add Organization\n \n \n \n
\n {renderResponseMessage()}\n {errors.email && renderFormError(errors.email.message)}\n {errors.username && renderFormError(errors.username.message)}\n {errors.password && renderFormError(errors.password.message)}\n {errors.passwordConfirmation &&\n renderFormError(errors.passwordConfirmation.message)}\n
\n );\n\n return (\n
\n \n \n \n \n {body}\n \n
\n );\n}\n","import React from \"react\";\nimport AdminActions from \"../../actions/AdminActions\";\nimport { Debug } from \"../../lib\";\nimport LoadingSpinner from \"../sharedComponents/LoadingSpinner\";\n\nexport default class OrgChartBase extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n isFetching: false,\n isError: false,\n chartData: undefined,\n chartOptions: undefined,\n available_levels : {}\n };\n this.parseData = this.parseData.bind(this);\n this.fetchData = this.fetchData.bind(this);\n this.dispatchLoad = this.dispatchLoad.bind(this);\n this.dispatchAPI = this.dispatchAPI.bind(this);\n this.shouldLoad = this.shouldLoad.bind(this);\n }\n\n /**\n * Invoked immediately after a component is mounted (inserted into the tree).\n * This will handle dispatching our initial request for the user's session data\n *\n * @see https://reactjs.org/docs/react-component.html#componentdidmount\n */\n componentDidMount() {\n this.dispatchLoad();\n (async () => {\n let available_levels = await AdminActions.GetAvailableLevelVersions({\n org_id: undefined,\n start_date : this.props.start_date ,\n end_date : this.props.end_date\n })(() => {});\n this.setState({\n ...this.state ,\n available_levels : available_levels\n })\n })();\n }\n\n /**\n * Invoked immediately after updating occurs. This method is not called for the initial render.\n * If the properties have changed, we will dispatch another load request\n *\n * @param {*} prevProps The previous properties for the component\n * @param {*} prevState The previous state of the component\n * @see https://reactjs.org/docs/react-component.html#componentdidupdate\n */\n componentDidUpdate(prevProps, prevState) {\n if (\n this.shouldLoad(prevProps, prevState) ||\n prevProps.org_id !== this.props.org_id\n ) {\n this.dispatchLoad();\n (async () => {\n let available_levels = await AdminActions.GetAvailableLevelVersions({\n org_id: undefined,\n start_date : this.props.start_date ,\n end_date : this.props.end_date\n })(() => {});\n this.setState({\n ...this.state ,\n available_levels : available_levels\n })\n })();\n }\n }\n\n /**\n * Provides child classes an injection point to invoke loads on state changes\n * @param {*} prevProps\n * @param {*} prevState\n */\n shouldLoad(prevProps, prevState) {\n return false;\n }\n\n /**\n * Dispatches the API request if the state is valid, and handles the result\n */\n dispatchLoad() {\n if (!this.state.isFetching) {\n this.setState({ ...this.state, isFetching: true, isError: false });\n // Dispatch the fetch request with our data\n this.fetchData().then(\n (result) => {\n // Store the parsed result into our state so that react will re-render\n this.setState({\n ...this.state,\n chartData: result.chartData,\n chartOptions: result.chartOptions,\n isFetching: false,\n });\n this.forceUpdate();\n },\n (error) => {\n Debug.error(error);\n this.setState({\n ...this.state,\n chartData: undefined,\n chartOptions: undefined,\n isFetching: false,\n isError: true,\n });\n }\n );\n } else {\n this.setState({\n ...this.state,\n chartData: undefined,\n chartOptions: undefined,\n isFetching: false,\n isError: true,\n });\n }\n }\n\n /**\n * Asyncronously gets the skill graphing data and parses it into the ChartJS data\n * @returns {Promise} A promise that returns a chartData and chartOptions pair\n */\n async fetchData() {\n const org_id = this.props.org_id;\n const start_date = this.props.start_date;\n const end_date = this.props.end_date;\n\n // Fetch data (async), using an empty dispatcher\n let response = await this.dispatchAPI()((x) => {});\n // Parse the results and return the graphing information\n return this.parseData(response);\n }\n\n dispatchAPI() {\n throw new Error(\"dispatchAPI must be overridden in child classes!\");\n }\n\n /**\n * Handles parsing the result of the API request and generating a ChartJS chart\n * @param {Object} payload\n */\n parseData(payload) {\n throw new Error(\"parseData must be overridden by child classes!\");\n }\n\n renderChart() {\n throw new Error(\"renderChart must be overridden by child classes!\");\n }\n\n render() {\n return this.state.isFetching ? (\n \n ) : this.state.chartData !== undefined ? (\n this.renderChart()\n ) : (\n
Data not loaded
\n );\n }\n}\n","export class HSLA {\n constructor(h, l, s, a) {\n this.h = h;\n this.l = l;\n this.s = s;\n this.a = a || 1.0;\n }\n\n toString() {\n return `hsla(${this.h}, ${this.s}%, ${this.l}%, ${this.a})`;\n }\n\n /**\n * Creates a copy of this HSLA instance\n */\n Clone() {\n return new HSLA(this.h, this.l, this.s, this.a);\n }\n\n /**\n * Adds a given lightness value to this colour, and returns the reference for chaining\n * @param {numeric} value\n */\n AddLightness(value) {\n this.l += value;\n return this;\n }\n\n SetAlpha(value) {\n this.a = value;\n return this;\n }\n\n /**\n * Generates a random colour\n * @param {number} alpha The alpha of the color, will default to 1 if not provided (or falsy)\n */\n static Random(alpha) {\n alpha = alpha || 1.0;\n var h = Math.floor(Math.random() * 360);\n var s = 25 + Math.floor(Math.random() * 50);\n var l = 25 + Math.floor(Math.random() * 50);\n return new HSLA(h, s, l, alpha);\n }\n\n /**\n * Determines an approximate 'distance' between two colours, useful for ensuring colours are distinct\n * @param {HSLA} other The HLSA colour instance to compare this colour to\n */\n DistanceTo(other) {\n if (!(other instanceof HSLA)) {\n throw new Error(\"Other object should be an HSLA instance!\");\n }\n return (\n Math.abs(this.h - other.h) * 2 +\n Math.abs(this.s - other.s) +\n Math.abs(this.l - other.l)\n );\n }\n}\n\n/**\n * Generates a set of colors that are all somewhat visually distinct from each other\n * @param {number} count The number of colors to attempt to generate\n * @param {number} threshold The threshold for difference between colours, lower values means less distinct (default 75)\n * @param {number} alpha The transparency of the colors to generate (0-1, default 1)\n * @param {number} abort_threshold The number of attempts to make at generating a color before aborting, default 500\n */\nexport function GenerateColours(\n count,\n threshold = 75,\n alpha = 1,\n abort_threshold = 500\n) {\n let colours = [];\n for (let i = 0; i < count; i++) {\n let colour = null;\n let cycles = 0;\n do {\n colour = HSLA.Random(alpha);\n cycles++;\n } while (\n colours.some((x) => x.DistanceTo(colour) < threshold) &&\n cycles < abort_threshold\n );\n if (cycles >= abort_threshold) break;\n colours.push(colour);\n }\n\n return colours;\n}\n","import React from \"react\";\nimport DateFnsUtils from \"@date-io/date-fns\";\nimport MomentUtils from \"@date-io/moment\";\nimport {\n MuiPickersUtilsProvider,\n KeyboardDatePicker,\n} from \"@material-ui/pickers\";\nimport Grid from \"@material-ui/core/Grid\";\nimport { connect, useDispatch, useSelector } from \"react-redux\";\nimport { updateStartDateSelect, updateEndDateSelect } from \"../../actions\";\nimport moment from \"moment\";\nimport { Debug } from \"../../lib\";\nimport PropTypes from \"prop-types\";\n\nclass DateRangePickers extends React.Component {\n constructor(props) {\n super(props);\n\n this.state = {\n // These dates are UTC dates\n startDate: moment(this.props.startDate),\n endDate: moment(this.props.endDate),\n };\n\n this.handleStartDateChanged = this.handleStartDateChanged.bind(this);\n this.handleEndDateChanged = this.handleEndDateChanged.bind(this);\n this._handleDateChanged = this._handleDateChanged.bind(this);\n }\n\n componentDidUpdate(prevProps) {\n let newState = this.state;\n let requiresUpdate = false;\n if (prevProps.startDate != this.props.startDate) {\n newState.startDate = this.props.startDate.utc();\n requiresUpdate |= true;\n }\n if (prevProps.endDate != this.props.endDate) {\n newState.endDate = this.props.endDate.utc();\n requiresUpdate |= true;\n }\n if (requiresUpdate) {\n this.setState(newState);\n }\n }\n\n _handleDateChanged(key, date) {\n date = this.props.monthly ? date.set(\"date\", 1) : date;\n date = date.utc();\n this.setState(\n {\n ...this.state,\n [key]: date,\n },\n () => {\n this.props.dispatch(updateStartDateSelect(date));\n if (\n !!(\n this.props.onValueChanged &&\n typeof this.props.onValueChanged === \"function\"\n )\n ) {\n this.props.onValueChanged(this.state.startDate, this.state.endDate);\n }\n }\n );\n }\n\n /**\n * handles when the start date selector has changed\n * @param {moment} date The new date in local time\n */\n handleStartDateChanged(date) {\n this._handleDateChanged(\"startDate\", date);\n }\n\n /**\n * handles when the start date selector has changed\n * @param {moment} date The new date in local time\n */\n handleEndDateChanged(date) {\n date = this.props.monthly ? date.endOf(\"month\") : date.endOf(\"day\");\n this._handleDateChanged(\"endDate\", date);\n }\n\n render() {\n let startDate = this.state.startDate.local();\n let endDate = this.state.endDate.local();\n\n const shared_options = {\n autoOk: \"autoOK\",\n variant: \"inline\",\n format: this.props.monthly ? \"YYYY-MM\" : \"YYYY-MM-DD\",\n margin: \"normal\",\n disableFuture: this.props.disableFuture || false,\n disablePast: this.props.disablePast || false,\n KeyboardButtonProps: {\n \"aria-label\": \"change date\",\n },\n views: this.props.monthly ? [\"month\", \"year\"] : [\"year\", \"month\", \"date\"],\n };\n\n return (\n \n \n \n \n \n \n \n \n \n \n );\n }\n}\n\nDateRangePickers.props = {\n onValueChanged: PropTypes.func,\n monthly: PropTypes.bool,\n disablePast: PropTypes.bool,\n disableFuture: PropTypes.bool,\n startDate: PropTypes.instanceOf(moment),\n endDate: PropTypes.instanceOf(moment),\n};\n\nconst mapStateToProps = (state) => {\n return {\n startDate: state.generalGraphReducer.startDateSelect,\n endDate: state.generalGraphReducer.endDateSelect,\n };\n};\nexport default connect(mapStateToProps, (dispatch) => {\n return {\n updateStartDateSelect: updateStartDateSelect,\n updateEndDateSelect: updateEndDateSelect,\n dispatch,\n };\n})(DateRangePickers);\n\n/*\nexport default function DateRangePickers(props) {\n\n const dispatch = useDispatch();\n const startDateUTC = props.monthly ? moment(props.startDate).set('date', 1) : moment(props.startDate);\n const endDateUTC = props.monthly ? moment(props.endDate).set('date', 1) : moment(props.endDate);\n let startDate = startDateUTC.local(); \n let endDate = endDateUTC.local(); \n \n const handleStartDateChange = (date) => {\n Debug.log(date);\n date = props.monthly ? date.set('date', 1) : date;\n dispatch(updateStartDateSelect(date.utc()))\n if (!!(props.onValueChanged && typeof props.onValueChanged === \"function\")) {\n props.onValueChanged(date, endDate);\n }\n };\n const handleEndDateChange = (date) => {\n date = props.monthly ? date.set('date', 1) : date;\n dispatch(updateEndDateSelect(date.utc()))\n if (!!(props.onValueChanged && typeof props.onValueChanged === \"function\")) {\n props.onValueChanged(startDate, date);\n }\n }\n\n const shared_options = {\n autoOk: 'autoOK',\n variant:\"inline\",\n format: props.monthly ? \"YYYY-MM\" : \"YYYY-MM-DD\",\n margin:\"normal\",\n disableFuture: props.disableFuture || false,\n disablePast: props.disablePast || false,\n KeyboardButtonProps: {\n 'aria-label': 'change date',\n },\n views: props.monthly ? ['month', 'year'] : ['year', 'month', 'date']\n }\n\n return (\n \n \n \n \n \n \n \n \n \n \n )\n\n}\n*/\n","import React from 'react'\nimport { Bar } from 'react-chartjs-2'\nimport moment from 'moment'\nimport { capitalize, Debug } from '../../lib';\nimport PropTypes from 'prop-types'\nimport AdminActions from '../../actions/AdminActions'\nimport OrgChartBase from './OrgChartBase';\nimport Grid from '@material-ui/core/Grid'\n\nimport { GenerateColours } from '../../lib/Colors';\nimport { Checkbox, Tooltip } from '@material-ui/core';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport DateRangePickers from '../sharedComponents/DateRangePickers';\n\nimport { Chart } from 'react-chartjs-2'\nimport pluginTrendLineLinear from '../../assets/js/chartjs-plugin-trendline';\nimport zoomPlugin from '../../assets/js/chartjs-plugin-zoom';\nimport { CloudDownload } from '@material-ui/icons';\n\nChart.plugins.register(pluginTrendLineLinear);\nChart.plugins.register(zoomPlugin); \n\nclass ActiveUsersChart extends OrgChartBase {\n constructor(props) {\n super(props);\n this.parseData = this.parseData.bind(this);\n this.renderChart = this.renderChart.bind(this);\n this.dispatchAPI = this.dispatchAPI.bind(this);\n this.handleDateRangeChanged = this.handleDateRangeChanged.bind(this);\n this.handleDailyModeChanged = this.handleDailyModeChanged.bind(this);\n this.shouldLoad = this.shouldLoad.bind(this);\n\n this.state = {\n ...this.state,\n is_daily: false,\n start_date: props.start_date,\n end_date: props.end_date,\n available_levels : props.available_levels\n }\n }\n \n dispatchAPI() {\n return AdminActions.GetActiveUsers({ \n org_id: this.props.org_id, \n start_date: this.state.start_date, \n end_date: this.state.end_date, \n is_daily: this.state.is_daily });\n } \n\n shouldLoad(prevProps, prevState) {\n return (\n this.state.is_daily != prevState.is_daily ||\n this.state.start_date != prevState.start_date ||\n this.state.end_date != prevState.end_date\n );\n }\n\n /**\n * Handles parsing the result of the API request and generating a ChartJS chart\n * @param {Object} payload \n */\n parseData(payload) {\n let datasets = [];\n\n const timeFormat = this.state.is_daily ? 'YYYY-MM-DD' : 'YYYY-MMMM';\n\n if (payload !== null && payload !== undefined) { \n let organizations = {};\n\n if (payload.length > 0) {\n // Iterate over all entries\n for(const entry of payload) {\n // If the organization has not been added yet, create it in our temp dataset\n if (organizations[entry.org_id] === undefined) {\n organizations[entry.org_id] = {\n name: entry.org_name,\n id: entry.org_id,\n data: []\n };\n }\n // Add the entry to the organization's dataset\n organizations[entry.org_id].data.push({\n x: moment.utc(entry.date).format(timeFormat),\n y: entry.active_users\n });\n }\n\n Debug.log(organizations);\n const org_count = Object.keys(organizations).length;\n const colors = GenerateColours(org_count)\n\n let ix = 0;\n for (const org_id in organizations) {\n const org = organizations[org_id];\n let color = colors[ix++].toString();\n\n // Create the ChartJS dataset for the category\n let dataset = {\n label: org.name,\n data: org.data,\n backgroundColor: color,\n borderColor: color,\n showLine: true,\n fill: false,\n borderWidth: 3,\n pointRadius: 5,\n pointHoverRadius: 5,\n lineTension: 0,\n trendLineLinear: {\n style: color,\n lineStyle: \"dotted\",\n borderDash: [8, 8],\n width: 2,\n timeFormat: timeFormat\n }\n };\n\n datasets.push(dataset);\n }\n }\n }\n\n /* ----------------- convert to a data for the scatter plot ----------------- */\n const data = {\n datasets\n }\n /* ----------------------- options for the line graph ----------------------- */\n const options = {\n scales: {\n xAxes: [{\n type: 'time',\n time: {\n unit: this.state.is_daily ? 'day' : 'month',\n minUnit: this.state.is_daily ? 'day' : 'month',\n round: this.state.is_daily ? 'day' : 'month',\n parser: timeFormat,\n },\n ticks: {\n min: moment(this.state.start_date).format(timeFormat),\n max: moment(this.state.end_date).format(timeFormat),\n }\n }],\n yAxes: [{\n ticks: {\n beginAtZero: true,\n fontSize: 15,\n callback: function (value) {\n if (value % 1 === 0) {\n return value;\n }\n },\n suggestedMin: 0,\n suggestedMax: 20,\n },\n scaleLabel: {\n display: true,\n labelString: 'Active Users',\n fontSize: 20\n }\n }, ],\n },\n }\n\n return { chartData: data, chartOptions: options };\n }\n\n async exportData (data ) {\n let rows_level = []\n for(let level of data.levels) {\n for( let template of level.templates) {\n // Fetch all sessions so we have the most up to date data\n let rows = await AdminActions.GetSessions({\n level_id: template.level_id,\n level_version: template.level_version,\n org_id: undefined,\n start_date : this.state.start_date , \n end_date : this.state.end_date\n })(() => {}).then((result) => {\n return result.results;\n });\n if(rows || rows?.length !== 0 || rows !== undefined) {\n rows_level.push({level_name : level.name , rows : rows})\n }\n }\n }\n let filename =\"organizations.csv\"\n // Start compositing the CSV\n var csvFile = \"\";\n rows_level = await rows_level.filter(x => x.rows !== undefined)\n rows_level.map(rows => {\n // Handles processing a single record\n var processRow = function (row) {\n var finalVal = \"\";\n // Iterate over all fields of the blob and add them\n for (let key of Object.keys(row)) {\n // Use JSON stringify\n let innerValue = JSON.stringify(row[key] || \"undefined\");\n // Replace single \" with \"\"\n var result = innerValue.replace(/\"/g, '\"\"');\n // Replace If there are special characters in the value, we need to escape the whole cell\n if (result.search(/(\"|,|\\n)/g) >= 0) result = '\"' + result + '\"';\n // Append cell to results\n finalVal += result + \",\";\n }\n // Newline to end row\n return finalVal + \"\\n\";\n };\n // Next row\n csvFile +=\"level ,\" + rows.level_name;\n // Next row\n csvFile += \"\\n\";\n // Add all headers for fields\n if(rows.rows.length !== 0) {\n for (let key of Object.keys(rows?.rows[0])) {\n csvFile += key + \",\";\n }\n }else {\n csvFile += \"\" + \",\";\n }\n // Next row\n csvFile += \"\\n\";\n if(rows.rows.length !== 0) {\n for (var i = 0; i < rows.rows.length; i++) {\n csvFile += processRow(rows.rows[i]);\n }\n }else {\n csvFile += \"\"\n }\n // Next row\n csvFile += \"\\n\";\n })\n // https://stackoverflow.com/questions/14964035/how-to-export-javascript-array-info-to-csv-on-client-side\n // Generate the blob to be downloaded\n var blob = new Blob([csvFile], { type: \"text/csv;charset=utf-8;\" });\n // If someones is using IE, god save their soul\n if (navigator.msSaveBlob) {\n // IE 10+\n navigator.msSaveBlob(blob, filename);\n }\n // Using a real browser\n else {\n // Create a temp element for downloading the file\n var link = document.createElement(\"a\");\n if (link.download !== undefined) {\n // feature detection\n // Browsers that support HTML5 download attribute\n var url = URL.createObjectURL(blob);\n link.setAttribute(\"href\", url);\n link.setAttribute(\"download\", filename);\n link.style.visibility = \"hidden\";\n // We add the hidden link, click it, then remove it, lol\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n }\n }\n }\n\n handleDailyModeChanged(event) {\n this.setState({\n ...this.state,\n is_daily: event.target.checked\n })\n }\n \n handleDateRangeChanged(start_date, end_date) { \n this.setState({\n ...this.state,\n start_date: start_date.toISOString(),\n end_date: end_date.toISOString()\n });\n }\n\n\n renderChart() {\n return (\n \n \n \n \n \n \n }\n label=\"Daily\"\n />\n \n this.exportData(this.state.available_levels)}\n />\n \n \n \n \n \n \n )\n }\n}\n\nActiveUsersChart.propTypes = {\n start_date: PropTypes.string.isRequired,\n end_date: PropTypes.string.isRequired,\n org_id: PropTypes.string\n}\n\nexport default ActiveUsersChart\n","import React, { Component } from \"react\";\n\nimport OrganizationsList from \"./OrganizationsList\";\nimport AddOrganizationForm from \"./AddOrganizationForm\";\nimport LoadingSpinner from \"../sharedComponents/LoadingSpinner\";\nimport Switch from \"@material-ui/core/Switch\";\nimport { withStyles } from \"@material-ui/core/styles\";\nimport { connect } from \"react-redux\";\n\n\nimport Grid from \"@material-ui/core/Grid\";\nimport {\n getOrganizations,\n setPrivilege,\n registerOrganization,\n showModal,\n hideModal,\n} from \"../../actions\";\nimport { FormControlLabel, FormGroup, Typography } from \"@material-ui/core\";\n\nimport ActiveUsersChart from './ActiveUsersChart';\nimport moment from 'moment'\n\n\nconst styles = (theme) => ({\n select: {\n width: \"50%\",\n height: \"40px\",\n },\n title: {\n fontSize: \"30px\",\n lineHeight: \"37px\",\n fontFamily: \"MontserratBold\",\n color: \"#333437\",\n fontWeight: \"700\",\n padding: \"6px 0.8em\",\n },\n selectedItem: {\n backgroundColor: theme.palette.info.light,\n },\n selectContainer: {\n padding: \"6px 1.5em\",\n width: \"100%\",\n },\n gridContainer: {\n marginTop: \"20px\",\n width: \"70%\",\n marginLeft: \"-18px\",\n \"& .MuiFab-label\": {\n fontFamily: \"MontserratBold\",\n color: \"#333437\",\n fontWeight: \"700\",\n lineHeight: \"37px\",\n },\n },\n userTypesLabel: {\n display: \"inline-block !important\",\n marginRight: \"10px\",\n },\n marginTop : {\n marginTop :'20px'\n },\n marginBottom : {\n marginBottom : '70px'\n }\n});\n\nclass Organizations extends Component {\n constructor(props) {\n super(props);\n this.state = {\n hide_inactive: false,\n start_date: moment().subtract(1, \"month\").toISOString(),\n end_date: moment().toISOString(),\n };\n this.handleInactiveToggleChange =\n this.handleInactiveToggleChange.bind(this);\n }\n\n handleInactiveToggleChange(event) {\n this.setState({ ...this.state, hide_inactive: event.target.checked });\n this.forceUpdate();\n }\n\n loadingOrganizations = () => {\n if (!this.props.hasFetched) {\n this.props.getOrganizations();\n return ;\n } else {\n return (\n \n );\n }\n };\n\n render() {\n const { classes , organizations } = this.props;\n return (\n <>\n \n

Manage Organizations

\n {organizations?.privilege !== 0 && this.props.hasFetched &&\n \n \n \n }\n
\n
\n {organizations?.privilege !== 0 && this.props.hasFetched && \n this.handleInactiveToggleChange(event)}\n color=\"primary\"\n />\n }\n name=\"hide_inactive\"\n label=\"Hide Inactive Organizations\"\n />\n }\n {this.loadingOrganizations()}\n {organizations?.privilege !== 0 &&\n
\n

Active Users

\n \n
\n }\n
\n \n \n );\n }\n}\n\nconst mapStateToProps = (state) => {\n return {\n organizations: state.organizationReducer.organizations,\n hasFetched: state.organizationReducer.hasFetched,\n modal: state.modalReducer,\n };\n};\n\nexport default connect(mapStateToProps, {\n getOrganizations,\n setPrivilege,\n registerOrganization,\n showModal,\n hideModal,\n})(withStyles(styles)(Organizations));\n","import React from \"react\";\n\nimport { makeStyles, withStyles } from \"@material-ui/core/styles\";\nimport FormControl from \"@material-ui/core/FormControl\";\nimport InputLabel from \"@material-ui/core/InputLabel\";\nimport Select from \"@material-ui/core/Select\";\nimport MenuItem from \"@material-ui/core/MenuItem\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Button from \"@material-ui/core/Button\";\n\nimport { connect, useDispatch, useSelector } from \"react-redux\";\nimport {\n updateSelectedOrganization,\n getSessionsByOrganization,\n} from \"../../actions\";\nimport DateRangePickers from \"../sharedComponents/DateRangePickers\";\n\nimport moment from \"moment\";\nimport { compose } from \"redux\";\n\nconst styles = (theme) => {\n return {\n paper: {\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"space-between\",\n padding: theme.spacing(2),\n },\n };\n};\n\nclass BillingForm extends React.Component {\n constructor(props) {\n super(props);\n\n this.state = {\n startDate: moment().startOf(\"month\"),\n endDate: moment().endOf(\"month\"),\n orgId: \"\",\n };\n\n this.handleDatesChanged = this.handleDatesChanged.bind(this);\n this.handleOrganizationChange = this.handleOrganizationChange.bind(this);\n this.renderSelectItems = this.renderSelectItems.bind(this);\n }\n\n handleDatesChanged(startDate, endDate) {\n this.setState({\n startDate: startDate.local(),\n endDate: endDate.local(),\n });\n if (this.state.orgId != null) {\n this.props.dispatch(\n getSessionsByOrganization(\n this.state.orgId,\n startDate.toISOString(),\n endDate.toISOString()\n )\n );\n }\n }\n\n async handleOrganizationChange(event) {\n let newState = this.state;\n newState.orgId = event.target.value;\n this.setState(newState);\n this.props.dispatch(\n getSessionsByOrganization(\n newState.orgId,\n this.state.startDate.toISOString(),\n this.state.endDate.toISOString()\n )\n );\n }\n\n renderSelectItems() {\n return this.props.organizations.map((organization) => {\n return (\n \n {organization.name}\n \n );\n });\n }\n\n render() {\n const selectItems = this.renderSelectItems();\n const classes = this.props.classes;\n\n return (\n \n \n Organization\n \n {selectItems}\n \n \n \n \n );\n }\n}\n\nconst mapStateToProps = (state) => {\n return {\n startDate: state.generalGraphReducer.startDateSelect,\n endDate: state.generalGraphReducer.endDateSelect,\n organizations: state.organizationReducer.organizations,\n };\n};\nexport default compose(\n withStyles(styles, { name: \"BillingForm\" }),\n connect(mapStateToProps, null)\n)(BillingForm);\n\n/*\nexport default function BillingForm(props) {\n \n const classes = useStyles();\n const dispatch = useDispatch();\n const organizationEmail = useSelector(state => state.organizationReducer.selectedOrganization);\n const selectedStartDate = useSelector(state => state.generalGraphReducer.startDateSelect);\n const selectedEndDate = useSelector(state => state.generalGraphReducer.endDateSelect); \n const handleOrganizationChange = async(e) => {\n await dispatch(updateSelectedOrganization(e.target.value));\n dispatch(getSessionsByOrganization(organizationEmail, moment(selectedStartDate).toISOString(), moment(selectedEndDate).toISOString()))\n }\n const selectItems = renderSelectItems(props);\n\n\n return (\n \n \n Organization\n \n {selectItems}\n \n \n {\n if (organizationEmail !== '') {\n dispatch(getSessionsByOrganization(organizationEmail, moment(start).toISOString(), moment(end).toISOString()))\n }\n }}/>\n \n )\n};\n*/\n","import React from \"react\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Table from \"@material-ui/core/Table\";\nimport TableBody from \"@material-ui/core/TableBody\";\nimport TableCell from \"@material-ui/core/TableCell\";\nimport TableContainer from \"@material-ui/core/TableContainer\";\nimport TableHead from \"@material-ui/core/TableHead\";\nimport TableRow from \"@material-ui/core/TableRow\";\nimport Paper from \"@material-ui/core/Paper\";\n\nconst useStyles = makeStyles((theme) => ({\n table: {\n minWidth: 500,\n height: 300,\n },\n}));\n\nfunction renderTableRows(props) {\n return props.sessions.map((session) => {\n return (\n \n {new Date(session.created_at).toLocaleString()}\n {`${session.time.toFixed(2)}s`}\n \n );\n });\n}\n\nexport default function BillingSessions(props) {\n const classes = useStyles();\n const tableRows = renderTableRows(props);\n return (\n \n \n \n \n Date of Session\n Duration of Session\n \n \n {tableRows}\n
\n
\n );\n}\n","import React from \"react\";\n\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Typography from \"@material-ui/core/Typography\";\nimport AccessTimeIcon from \"@material-ui/icons/AccessTime\";\n\nconst useStyles = makeStyles((theme) => ({\n paper: {\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n height: 250,\n },\n icon: {\n color: theme.palette.primary.main,\n height: 100,\n width: 100,\n },\n}));\n\nexport default function BillingTotalTime(props) {\n const classes = useStyles();\n return (\n \n \n Total Time\n \n \n \n {props.totalTime ? props.totalTime.toFixed(2) : 0}s\n \n \n );\n}\n","import React, { Component } from \"react\";\n\nimport BillingForm from \"./BillingForm\";\nimport BillingSessions from \"./BillingSessions\";\nimport BillingTotalTime from \"./BillingTotalTime\";\nimport LoadingSpinner from \"../sharedComponents/LoadingSpinner\";\n\nimport Container from \"@material-ui/core/Container\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Grid from \"@material-ui/core/Grid\";\n\nimport { connect } from \"react-redux\";\nimport { getOrganizations } from \"../../actions\";\n\nclass BillingOrganizations extends Component {\n renderForm = () => {\n if (this.props.organizations.length === 0) {\n this.props.getOrganizations();\n return ;\n } else {\n return ;\n }\n };\n\n renderSessions = () => {\n if (this.props.sessions.length === 0) {\n return (\n \n No sessions to display.\n \n );\n } else {\n return (\n \n );\n }\n };\n\n renderTotal = () => {\n if (this.props.sessions.length !== 0) {\n return (\n \n );\n }\n };\n\n render() {\n return (\n \n \n Billing\n \n \n \n {this.renderForm()}\n \n \n {this.renderSessions()}\n \n \n {this.renderTotal()}\n \n \n \n );\n }\n}\n\nconst mapStateToProps = (state) => {\n return {\n organizations: state.organizationReducer.organizations,\n sessions: state.organizationReducer.sessions || [],\n selectedOrganization: state.organizationReducer.selectedOrganization,\n selectedStartDate: state.generalGraphReducer.selectedStartDate,\n selectedEndDate: state.generalGraphReducer.selectedEndDate,\n };\n};\n\nexport default connect(mapStateToProps, { getOrganizations })(\n BillingOrganizations\n);\n","import React from \"react\";\n\nimport store from \"../../../store\";\n\nimport PropTypes from \"prop-types\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Button from \"@material-ui/core/Button\";\nimport Avatar from \"@material-ui/core/Avatar\";\nimport List from \"@material-ui/core/List\";\nimport ListItem from \"@material-ui/core/ListItem\";\nimport ListItemAvatar from \"@material-ui/core/ListItemAvatar\";\nimport ListItemText from \"@material-ui/core/ListItemText\";\nimport DialogTitle from \"@material-ui/core/DialogTitle\";\nimport Dialog from \"@material-ui/core/Dialog\";\nimport PersonIcon from \"@material-ui/icons/Person\";\nimport AddIcon from \"@material-ui/icons/Add\";\nimport Typography from \"@material-ui/core/Typography\";\nimport { blue } from \"@material-ui/core/colors\";\n\nimport {\n Divider,\n IconButton,\n Badge,\n Grid,\n Paper,\n TextField,\n} from \"@material-ui/core\";\nimport FitnessCenterIcon from \"@material-ui/icons/FitnessCenter\";\n\n//Testing actions for Scheduled sessions (Temporary)\nimport addSession from \"../scheduledSessionsActions\";\nconst localStore = store.getState();\nconst sessionsArray = localStore.sessions;\nconsole.log(sessionsArray);\n\n/* Testing Array for the session dialog element (TEMPORARY) */\nconst sessions = [\n [\"John\", \"Rolando\", \"James\"],\n [\"Grant\", \"Godrick\", \"Charles\"],\n];\n\n//Testing for sessions in a month (TEMPORARY)\nconst sessionIconTest = [1, 2, 6, 12, 13, 14, 20, 25, 28];\n\n//Styling\nconst useStyles = makeStyles({\n avatar: {\n backgroundColor: blue[100],\n color: blue[600],\n },\n badge: {\n color: \"#4dd2ff\",\n },\n sessionTitle: {\n marginLeft: \"auto\",\n marginRight: \"auto\",\n },\n});\n\n/* Simple Dialog takes */\nfunction SimpleDialog(props) {\n const classes = useStyles();\n const { onClose, open } = props;\n\n const handleClose = (value) => {\n onClose(value);\n };\n\n const handleListItemClick = (value) => {\n onClose(value);\n };\n\n return (\n \n \n Sessions Overview\n \n\n \n \n {sessions.map((value) => (\n \n {/* List component displays all the users per */}\n \n \n \n {\" \"}\n Session: {\"Memory 1\"} - {\"4:00PM\"}{\" \"}\n \n \n\n {value.map((user) => (\n handleListItemClick(user)}\n key={user}\n >\n \n \n \n \n \n\n \n \n ))}\n\n handleListItemClick(\"addAccount\")}\n >\n \n \n \n \n \n \n \n\n \n \n \n \n \n ))}\n \n \n \n );\n}\n\nSimpleDialog.propTypes = {\n onClose: PropTypes.func.isRequired,\n open: PropTypes.bool.isRequired,\n};\n\nexport default function SessionDialog(props) {\n const classes = useStyles();\n\n const [open, setOpen] = React.useState(false);\n const [selectedValue, setSelectedValue] = React.useState(sessions[1]);\n const [invisible, setInvisible] = React.useState(false);\n\n const handleClickOpen = () => {\n setOpen(true);\n };\n\n const handleClose = (value) => {\n setOpen(false);\n };\n\n //TEMPORARY TEST TO SHOW ICON ONLY WHEN THERE IS A SESSION\n const checkForSession = (value) => {\n if (sessionIconTest.find((element) => element == value)) {\n return true;\n }\n return false;\n };\n\n return (\n
\n \n {/*Evaluates if the current day has a valid date and has a session*/}\n {props.valid && checkForSession(props.day) && (\n \n \n \n )}\n \n\n \n
\n );\n}\n","import React from \"react\";\nimport {\n CssBaseline,\n Card,\n Typography,\n Divider,\n makeStyles,\n CardContent,\n CardActions,\n Button,\n Badge,\n} from \"@material-ui/core\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport FitnessCenterIcon from \"@material-ui/icons/FitnessCenter\";\nimport SupervisedUserCircleIcon from \"@material-ui/icons/SupervisedUserCircle\";\n\n//Prompts the dialog box showing list of sessions with users\nimport SessionDialog from \"./SessionDialog\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n height: \"150px\",\n },\n paper: {\n width: \"150px\",\n length: \"10%\",\n },\n badge: {\n color: \"#4dd2ff\",\n },\n divider: {\n paddingTop: \"5px\",\n },\n}));\n\nconst Months = [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n];\n\n/* Day function component holds the elements for the individual day.*/\nexport default function Day(props) {\n const classes = useStyles();\n\n let day = props.day;\n let month = props.month;\n let year = props.year;\n\n let days = function (month, year) {\n return new Date(year, month + 1, 0).getDate();\n };\n\n //Determines if the current date is valid\n const isValid = (day, month, year) => {\n return day && day <= days(month, year) ? true : false;\n };\n\n return (\n
\n \n\n {/* Card holds the individual content for the day*/}\n \n \n \n {/* Evaluates if a non-zero day is provided, and if the value is within the range allowed for that month */}\n {isValid(day, month, year) ? Months[month] : \"-\"}{\" \"}\n {isValid(day, month, year) ? day : \" \"}\n \n\n \n \n \n {/* Prompts the dialog box showing information on session tag, users, and notes */}\n {}\n \n \n
\n );\n}\n","import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Button from \"@material-ui/core/Button\";\nimport Avatar from \"@material-ui/core/Avatar\";\nimport List from \"@material-ui/core/List\";\nimport ListItem from \"@material-ui/core/ListItem\";\nimport ListItemAvatar from \"@material-ui/core/ListItemAvatar\";\nimport ListItemText from \"@material-ui/core/ListItemText\";\nimport DialogTitle from \"@material-ui/core/DialogTitle\";\nimport Dialog from \"@material-ui/core/Dialog\";\nimport PersonIcon from \"@material-ui/icons/Person\";\nimport AddIcon from \"@material-ui/icons/Add\";\nimport Typography from \"@material-ui/core/Typography\";\nimport { blue } from \"@material-ui/core/colors\";\n\nimport {\n Divider,\n IconButton,\n Badge,\n Grid,\n Paper,\n TextField,\n FormControl,\n Input,\n InputLabel,\n InputAdornment,\n} from \"@material-ui/core\";\nimport FitnessCenterIcon from \"@material-ui/icons/FitnessCenter\";\nimport DateRangePickers from \"../../sharedComponents/DateRangePickers\";\n\nconst useStyles = makeStyles((theme) => ({\n form: {\n width: \"auto\",\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n padding: \"2.5rem 3.5rem\",\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n display: \"flex\",\n flexDirection: \"row\",\n flexWrap: \"wrap\",\n justifyContent: \"space-between\",\n \"@media (max-width: 600px)\": {\n padding: \"0\",\n },\n },\n inlineInput: {\n width: \"100%\",\n },\n blueColor: {\n backgroundColor: theme.palette.info.light,\n color: theme.palette.primary.contrastText,\n },\n sessionTitle: {\n marginLeft: \"auto\",\n marginRight: \"auto\",\n },\n margin: {\n margin: theme.spacing(1),\n },\n}));\n\nfunction NewSessionDialog(props) {\n const classes = useStyles();\n const { onClose, selectedValue, open } = props;\n\n /* TEMPORARY : To show the forms submitted in console */\n const [name, setName] = React.useState(\"\");\n const [startDate, setStartDate] = React.useState(\"\");\n const [endDate, setEndDate] = React.useState(\"\");\n const [note, setNote] = React.useState(\"\");\n\n const handleClose = () => {\n onClose(selectedValue);\n };\n\n const handleListItemClick = (value) => {\n onClose(value);\n };\n\n const handleSubmit = async (data) => {\n setName(data.nameInput);\n setStartDate(data.startDate);\n setEndDate(data.endDate);\n setNote(data.notes);\n\n console.log(name + \" \" + startDate + \" \" + endDate + \" \" + note);\n };\n\n return (\n \n \n Create New Session\n \n\n
\n \n {/* Session Name */}\n \n \n \n Session Name\n \n \n \n \n\n {/* Date Range */}\n \n \n \n\n \n \n \n\n \n \n \n \n
\n \n );\n}\n\nNewSessionDialog.propTypes = {\n onClose: PropTypes.func.isRequired,\n open: PropTypes.bool.isRequired,\n};\n\nexport default function NewSession() {\n const classes = useStyles();\n const [open, setOpen] = React.useState(false);\n\n const handleClickOpen = () => {\n setOpen(true);\n };\n\n const handleClose = (value) => {\n setOpen(false);\n };\n\n return (\n
\n \n New Session\n \n\n \n
\n );\n}\n","import React from \"react\";\nimport {\n AppBar,\n Toolbar,\n Grid,\n InputBase,\n IconButton,\n Badge,\n makeStyles,\n Typography,\n Divider,\n} from \"@material-ui/core\";\nimport ArrowBackOutlinedIcon from \"@material-ui/icons/ArrowBackOutlined\";\nimport ArrowForwardOutlinedIcon from \"@material-ui/icons/ArrowForwardOutlined\";\nimport DirectionsRunIcon from \"@material-ui/icons/DirectionsRun\";\nimport ScheduleIcon from \"@material-ui/icons/Schedule\";\nimport {\n MuiPickersUtilsProvider,\n KeyboardDatePicker,\n} from \"@material-ui/pickers\";\nimport DateFnsUtils from \"@date-io/date-fns\";\n\nimport DateRangePickers from \"../../sharedComponents/DateRangePickers\";\nimport NewSession from \"../otherComponents/NewSession\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n backgroundColor: \"#fff\",\n },\n date: {\n paddingLeft: theme.spacing(2),\n },\n left: {\n color: \"#4dd2ff\",\n },\n right: {\n color: \"#4dd2ff\",\n paddingRight: theme.spacing(2),\n },\n}));\n\nconst Months = [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n];\n\n//Top heading for the MonthlyView\nexport default function MonthlySessionHeading(props) {\n const classes = useStyles();\n const [selectedDate, setSelectedDate] = React.useState(new Date());\n\n let month = props.month;\n let year = props.year;\n\n let value = 10;\n\n return (\n \n \n \n {/*Icon 1*/}\n \n \n \n \n \n\n {/*Icon 2*/}\n \n \n \n \n \n\n \n\n \n \n {Months[month]} {year}\n \n \n\n \n\n {/*New Session Dialog*/}\n \n \n \n\n \n\n {/* Search Option for a specific date*/}\n \n \n \n \n \n \n \n \n );\n}\n","import React from \"react\";\nimport { Grid, Typography, Card, makeStyles } from \"@material-ui/core\";\n\nconst useStyles = makeStyles((theme) => ({\n daysDisplay: {\n paddingTop: \"10px\",\n marginLeft: \"auto\",\n marginRight: \"auto\",\n width: \"1800px\",\n },\n card: {\n width: \"150px\",\n textAlign: \"center\",\n backgroundColor: theme.palette.info.light,\n color: theme.palette.primary.contrastText,\n },\n}));\n\nconst DaysOfWeek = [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n];\n\nexport default function WeekHeader() {\n const classes = useStyles();\n\n return (\n \n {/* Temporary List providing the values for days 1 to 7*/}\n {[0, 1, 2, 3, 4, 5, 6].map((value) => (\n \n {DaysOfWeek[value]} \n \n ))}\n \n );\n}\n","import React, { useState, setState } from \"react\";\nimport {\n Grid,\n makeStyles,\n CssBaseline,\n Typography,\n Card,\n} from \"@material-ui/core\";\nimport Weeks from \"./MonthlyView/Week\";\nimport Header from \"./MonthlyView/MonthlySessionHeading\";\nimport WeekHeader from \"./otherComponents/WeekHeader\";\n\nconst useStyles = makeStyles((theme) => ({\n monthView: {\n paddingTop: \"10px\",\n textAlign: \"center\",\n marginLeft: \"auto\",\n marginRight: \"auto\",\n width: \"1800px\",\n },\n}));\n\nfunction renderWeek(date, day, month, year) {\n return (\n \n );\n}\n\n/* Monthly view manages the state for the weeks and days */\nexport default function MonthlyView(props) {\n const classes = useStyles();\n const weekIncrement = 7;\n\n //Retrieves new date object\n const [date, setDate] = useState(props.date);\n date.setMonth(date.getMonth(), 1); //Sets date as first day of the month\n\n //Represent the date of the first day of the week\n let firstWeek = 1;\n let secondWeek = firstWeek,\n thirdWeek = 0,\n fourthWeek = 0,\n fifthWeek = 0,\n sixthWeek = 0;\n\n //Regulates the starting day of week 2, so if first day of month is Sunday, the following week is firstday plus seven\n switch (date.getDay()) {\n case 0: //Sunday is first day\n secondWeek += 7;\n break;\n case 1: //Monday is first day\n secondWeek += 6;\n break;\n case 2: //Tuesday is first day\n secondWeek += 5;\n break;\n case 3: //Wednesday is first day\n secondWeek += 4;\n break;\n case 4: //Thursday is first day\n secondWeek += 3;\n break;\n case 5: //Friday is first day\n secondWeek += 2;\n break;\n case 6: //Saturday is first day\n secondWeek += 1;\n break;\n }\n\n //Increment the third, fourth, and fifth week based on the second week\n thirdWeek = secondWeek + weekIncrement;\n fourthWeek = thirdWeek + weekIncrement;\n fifthWeek = fourthWeek + weekIncrement;\n sixthWeek = fifthWeek + weekIncrement;\n\n //Functions to set the date to the previous month or the next month\n const goBackDate = () =>\n setDate(new Date(date.getUTCFullYear(), date.getMonth() - 1));\n const goForwardDate = () =>\n setDate(new Date(date.getUTCFullYear(), date.getMonth() + 1));\n\n //To be used in the session header for searching implicit dates\n const setFromDatePicker = (value) => setDate(new Date(value));\n\n return (\n
\n \n\n {/*Shows the top view for the current Month and search options*/}\n \n\n {/*Shows the weekly heading from Sunday to Saturday*/}\n \n\n {/*Container holding the 5 weeks*/}\n \n \n {/* Renders the week using the first day of the week, the position in the week (0 - Sunday), and the current month*/}\n {renderWeek(\n firstWeek,\n date.getDay(),\n date.getMonth(),\n date.getUTCFullYear()\n )}\n {renderWeek(secondWeek, 0, date.getMonth(), date.getUTCFullYear())}\n {renderWeek(thirdWeek, 0, date.getMonth(), date.getUTCFullYear())}\n {renderWeek(fourthWeek, 0, date.getMonth(), date.getUTCFullYear())}\n {renderWeek(fifthWeek, 0, date.getMonth(), date.getUTCFullYear())}\n {renderWeek(sixthWeek, 0, date.getMonth(), date.getUTCFullYear())}\n \n \n
\n );\n}\n","import React from \"react\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport InputLabel from \"@material-ui/core/InputLabel\";\nimport MenuItem from \"@material-ui/core/MenuItem\";\nimport FormHelperText from \"@material-ui/core/FormHelperText\";\nimport FormControl from \"@material-ui/core/FormControl\";\nimport Select from \"@material-ui/core/Select\";\n\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { updateWithinDateRange } from \"../../actions\";\nimport { createDateString } from \"../../lib\";\n\nconst useStyles = makeStyles((theme) => ({\n formControl: {\n marginTop: theme.spacing(1),\n margin: theme.spacing(0),\n minWidth: 120,\n },\n selectEmpty: {\n marginTop: theme.spacing(2),\n },\n}));\n\nexport default function ChartRangeDropdown() {\n const dispatch = useDispatch();\n const date = useSelector((state) => state.userRadarPlotReducer.selectedDate);\n const classes = useStyles();\n const handleChange = (e) => dispatch(updateWithinDateRange(e.target.value));\n\n return (\n
\n \n Within\n \n {createDateString(30)}\n 30 Days\n 60 Days\n 90 Days\n All\n {/* All Sessions */}\n \n \n Sessions that occured within the last (days)\n \n \n
\n );\n}\n\n// http://reactchartjs.github.io/react-chartjs-2/#/radar\n","import React from \"react\";\n\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport InputLabel from \"@material-ui/core/InputLabel\";\nimport MenuItem from \"@material-ui/core/MenuItem\";\nimport FormHelperText from \"@material-ui/core/FormHelperText\";\nimport FormControl from \"@material-ui/core/FormControl\";\nimport Select from \"@material-ui/core/Select\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { updateSelectedUser } from \"../../actions\";\nimport {\n Dialog,\n Button,\n DialogTitle,\n DialogContent,\n DialogActions,\n Typography,\n} from \"@material-ui/core\";\nimport ChartRangeDropdown from \"../sharedComponents/ChartRangeDropdown\";\n\nconst useStyles = makeStyles((theme) => ({\n selectEmpty: {\n marginTop: theme.spacing(2),\n },\n dropdownList: {\n marginBottom: \"1.5rem\",\n },\n}));\n\nexport default function UsersDropdown(props) {\n const classes = useStyles();\n const email = useSelector((state) => state.userReducer.selectedUser);\n const dispatch = useDispatch();\n\n const [open, setOpen] = React.useState(false);\n\n const handleChange = (e) => {\n dispatch(updateSelectedUser(e.target.value));\n };\n\n const handleClickOpen = () => {\n setOpen(true);\n };\n\n const handleClose = () => {\n setOpen(false);\n };\n\n function renderMenuItems() {\n return props.users.map((user) => {\n return (\n \n {`${user.first_name.trim()}, ${user.last_name}`}\n \n );\n });\n }\n\n return (\n
\n \n Users\n \n \n {renderMenuItems()}\n \n \n Select a user for creating visualization\n \n \n
\n );\n}\n","import {\n min,\n max,\n scaleLinear,\n scaleTime,\n select,\n axisBottom,\n axisLeft,\n selectAll,\n line,\n entries,\n area,\n} from \"d3\";\n\nconst MARGIN = { TOP: 50, BOTTOM: 80, LEFT: 70, RIGHT: 180 };\nconst WIDTH = 800 - MARGIN.LEFT - MARGIN.RIGHT;\nconst HEIGHT = 600 - MARGIN.TOP - MARGIN.BOTTOM;\n\nclass GeneralMetricsChart {\n constructor(\n element,\n data,\n attentionLineToggle,\n processingLineToggle,\n memoryLineToggle\n ) {\n let vis = this;\n\n vis.g = select(element)\n .append(\"svg\")\n .attr(\"width\", WIDTH + MARGIN.LEFT + MARGIN.RIGHT)\n .attr(\"height\", HEIGHT + MARGIN.TOP + MARGIN.BOTTOM)\n .append(\"g\")\n .attr(\"transform\", `translate(${MARGIN.LEFT}, ${MARGIN.TOP})`);\n\n //Set our range scales to the height and width of our visualization\n vis.x = scaleTime().range([0, WIDTH]);\n\n vis.y = scaleLinear().range([HEIGHT, 0]);\n\n //Create axis groups for x y on main vis instance\n vis.xAxisGroup = vis.g\n .append(\"g\")\n .attr(\"transform\", `translate(0, ${HEIGHT})`);\n\n vis.yAxisGroup = vis.g.append(\"g\");\n\n //X axis label\n vis.g\n .append(\"text\")\n .attr(\"x\", WIDTH / 2)\n .attr(\"y\", HEIGHT + 40)\n .attr(\"font-size\", 20)\n .attr(\"text-anchor\", \"middle\")\n .text(\"Time of Session\");\n //Y Axis Label\n vis.g\n .append(\"text\")\n .attr(\"x\", -(HEIGHT / 2))\n .attr(\"y\", -50)\n .attr(\"transform\", \"rotate(-90)\")\n .attr(\"font-size\", 20)\n .attr(\"text-anchor\", \"middle\")\n .text(\"Accuracy %\");\n\n vis.update(\n data,\n attentionLineToggle,\n processingLineToggle,\n memoryLineToggle\n );\n }\n\n update(data, attentionLineToggle, processingLineToggle, memoryLineToggle) {\n let vis = this;\n let raw_response = entries(data);\n let processingLineData = [];\n let memoryLineData = [];\n let attentionLineData = [];\n let allLines = [];\n\n for (let i = 0; i < raw_response.length; i++) {\n const lineData = entries(raw_response[i].value.daily_aggregates);\n allLines.push(lineData);\n switch (raw_response[i].value.categories) {\n case \"memory\":\n memoryLineData.push(lineData);\n break;\n case \"processing\":\n processingLineData.push(lineData);\n break;\n case \"attention\":\n attentionLineData.push(lineData);\n break;\n default:\n break;\n }\n }\n\n function calculateAveragePercentage(data) {\n return (\n (parseFloat(data.correct) * 100) /\n (parseFloat(data.correct) + parseFloat(data.incorrect))\n );\n }\n\n function sortedMetricData(lineData) {\n let line = [];\n\n lineData[0].map((item, i) => {\n //find matching item in array by key, and filter out item from array.\n const found_match = lineData[1].find(\n (element) => element.key === item.key\n );\n\n //found a matching key, (need to comibine data when it's accurate)\n if (found_match) {\n //update our second array and filter out the object we just added to the matching day.\n lineData[1] = lineData[1].filter(\n (element) => element.key !== item.key\n );\n }\n //push point data\n return line.push(lineData[0][i]);\n });\n //combine what's left of our second array with our line array\n return line.concat(lineData[1]);\n }\n\n if (memoryLineData[0]) {\n //sort our data\n memoryLineData = sortedMetricData(memoryLineData);\n processingLineData = sortedMetricData(processingLineData);\n attentionLineData = sortedMetricData(attentionLineData);\n allLines = allLines.flat(1);\n\n //add data to visualization oject\n vis.data = {};\n vis.data.memoryLine = memoryLineData.sort(\n (a, b) => new Date(a.key) - new Date(b.key)\n );\n vis.data.processingLine = processingLineData.sort(\n (a, b) => new Date(a.key) - new Date(b.key)\n );\n vis.data.attentionLine = attentionLineData.sort(\n (a, b) => new Date(a.key) - new Date(b.key)\n );\n vis.data.allLines = allLines.sort(\n (a, b) => new Date(a.key) - new Date(b.key)\n );\n\n //Set our domains for each axis\n //Take our domain and parse string back into a date\n if (vis.data.allLines.length > 0) {\n vis.x.domain([\n new Date(vis.data.allLines[0].key),\n new Date(vis.data.allLines[vis.data.allLines.length - 1].key),\n ]);\n //Calculate the total amont of correct vs incorrect values get the percentage of correct to total for each entry in our general dataset\n vis.y.domain([\n min(\n vis.data.allLines,\n (d) =>\n (d.value.max.correct * 100) /\n (d.value.max.correct + d.value.max.incorrect)\n ),\n max(\n vis.data.allLines,\n (d) =>\n (d.value.min.correct * 100) /\n (d.value.min.correct + d.value.min.incorrect)\n ),\n ]);\n\n //create axis calls\n const xAxisCall = axisBottom(vis.x);\n const yAxisCall = axisLeft(vis.y);\n\n //render axis with a transition of 1s\n vis.xAxisGroup.transition(1000).call(xAxisCall);\n vis.yAxisGroup.transition(1000).call(yAxisCall);\n }\n\n const makeLine = line()\n .x(function (d) {\n return vis.x(new Date(d.key));\n })\n .y(function (d) {\n return vis.y(\n (Number(d.value.avg.correct) * 100) /\n (Number(d.value.avg.correct) + Number(d.value.avg.incorrect))\n );\n });\n\n const makeErrorBar = area()\n .x(function (d) {\n return vis.x(new Date(d.key));\n })\n .y0(function (d) {\n return vis.y(\n (d.value.min.correct * 100) /\n (d.value.min.correct + d.value.min.incorrect)\n );\n })\n .y1(function (d) {\n return vis.y(\n (d.value.max.correct * 100) /\n (d.value.max.correct + d.value.max.incorrect)\n );\n });\n\n const circleStyles = {\n circleRadius: 5,\n circleRadiusHover: 7,\n };\n\n // //JOIN MEMORY\n const memoryLine = vis.g\n .selectAll(\"memory-line-group\")\n .data([vis.data.memoryLine], (d) => d);\n\n const memoryErrorBars = vis.g\n .selectAll(\"memory-line-group\")\n .data(vis.data.memoryLine, (d) => d);\n\n const memoryLineCircles = vis.g\n .selectAll(\"memory-circle\")\n .data(vis.data.memoryLine, (d) => d);\n\n // //EXIT MEMORY\n memoryLine.exit();\n selectAll(\".memory-line-group\").remove();\n\n memoryLineCircles.exit();\n selectAll(\".memory-circle\").remove();\n //UPDATE\n\n if (memoryLineToggle) {\n //ENTER MEMORY\n memoryLine\n .enter()\n .append(\"g\")\n .attr(\"class\", \"memory-line-group\")\n .on(\"mouseover\", function (d) {\n select(this)\n .append(\"text\")\n .attr(\"class\", \"line-text\")\n .text(`Memory`)\n .attr(\"x\", WIDTH / 2 - 35)\n .attr(\"y\", -10);\n })\n .on(\"mouseout\", function (d) {\n selectAll(\".line-text\").remove();\n })\n .append(\"path\")\n .attr(\"class\", \"memory-line\")\n .transition(1000)\n .attr(\"id\", (d) => `line-${d.id}`)\n .attr(\"d\", (d) => makeLine(d));\n\n memoryErrorBars\n .enter()\n .append(\"g\")\n .attr(\"class\", \"memory-line-group\")\n .append(\"path\")\n .attr(\"class\", \"memory-line-errorbar\")\n .transition(1000)\n .attr(\"id\", (d) => `line-${d.id}`)\n .attr(\"d\", (d) => makeErrorBar([d]));\n\n memoryLineCircles\n .enter()\n .append(\"g\")\n .append(\"g\")\n .attr(\"class\", \"memory-circle\")\n .on(\"mouseover\", function (d) {\n select(this)\n .style(\"cursor\", \"pointer\")\n .append(\"text\")\n .attr(\"class\", \"circle-text\")\n .text(`${calculateAveragePercentage(d.value.avg).toFixed(2)}%`)\n .attr(\"x\", (d) => vis.x(new Date(d.key)) - 30)\n .attr(\n \"y\",\n (d) => vis.y(calculateAveragePercentage(d.value.avg)) - 35\n );\n select(this)\n .append(\"text\")\n .attr(\"class\", \"circle-text\")\n .attr(\"x\", (d) => vis.x(new Date(d.key)) - 30)\n .text(`At ${new Date(d.key).toLocaleDateString()} for Memory`)\n .attr(\n \"y\",\n (d) => vis.y(calculateAveragePercentage(d.value.avg)) - 20\n );\n })\n .on(\"mouseout\", function (d) {\n select(this)\n .style(\"cursor\", \"none\")\n .selectAll(\".circle-text\")\n .transition(500)\n .remove();\n })\n .append(\"circle\")\n .attr(\"cx\", (d) => vis.x(new Date(d.key)))\n .attr(\"cy\", (d) => vis.y(calculateAveragePercentage(d.value.avg)))\n .attr(\"r\", circleStyles.circleRadius)\n .style(\"opacity\", 1)\n .on(\"mouseover\", function (d) {\n select(this)\n .transition(500)\n .attr(\"r\", circleStyles.circleRadiusHover);\n })\n .on(\"mouseout\", function (d) {\n select(this).transition(500).attr(\"r\", circleStyles.circleRadius);\n });\n }\n\n //JOIN ATTENTION\\\n const attentionLine = vis.g\n .selectAll(\"attention-line-group\")\n .data([vis.data.attentionLine], (d) => d);\n\n const attentionCircles = vis.g\n .selectAll(\"attention-circle\")\n .data(vis.data.attentionLine, (d) => d.id);\n\n const attentionBars = vis.g\n .selectAll(\"attention-line-group\")\n .data(vis.data.attentionLine, (d) => d);\n\n // //EXIT ATTENTION\n attentionLine.exit();\n selectAll(\".attention-line-group\").remove();\n\n attentionCircles.exit();\n selectAll(\".attention-circle\").remove();\n\n // //UPDATE\n if (attentionLineToggle) {\n //ENTER ATTENTION\n attentionLine\n .enter()\n .append(\"g\")\n .attr(\"class\", \"attention-line-group\")\n .on(\"mouseover\", function (d) {\n select(this)\n .append(\"text\")\n .attr(\"class\", \"line-text\")\n .text(`Attention`)\n .attr(\"x\", WIDTH / 2 - 35)\n .attr(\"y\", -10);\n })\n .on(\"mouseout\", function (d) {\n selectAll(\".line-text\").remove();\n })\n .append(\"path\")\n .attr(\"class\", \"attention-line\")\n .transition(1000)\n .attr(\"id\", (d) => `line-${d.id}`)\n .attr(\"d\", (d) => makeLine(d));\n\n attentionCircles\n .enter()\n .append(\"g\")\n .append(\"g\")\n .attr(\"class\", \"attention-circle\")\n .on(\"mouseover\", function (d) {\n select(this)\n .style(\"cursor\", \"pointer\")\n .append(\"text\")\n .attr(\"class\", \"circle-text\")\n .text(`${calculateAveragePercentage(d.value.avg).toFixed(2)}%`)\n .attr(\"x\", (d) => vis.x(new Date(d.key)) - 30)\n .attr(\n \"y\",\n (d) => vis.y(calculateAveragePercentage(d.value.avg)) - 35\n );\n select(this)\n .append(\"text\")\n .attr(\"class\", \"circle-text\")\n .attr(\"x\", (d) => vis.x(new Date(d.key)) - 30)\n .text(`At ${new Date(d.key).toLocaleDateString()} for Attention`)\n .attr(\n \"y\",\n (d) => vis.y(calculateAveragePercentage(d.value.avg)) - 20\n );\n })\n .on(\"mouseout\", function (d) {\n select(this)\n .style(\"cursor\", \"none\")\n .selectAll(\".circle-text\")\n .transition(500)\n .remove();\n })\n .append(\"circle\")\n .attr(\"cx\", (d) => vis.x(new Date(d.key)))\n .attr(\"cy\", (d) => vis.y(calculateAveragePercentage(d.value.avg)))\n .attr(\"r\", circleStyles.circleRadius)\n .style(\"opacity\", 1)\n .on(\"mouseover\", function (d) {\n select(this)\n .transition(500)\n .attr(\"r\", circleStyles.circleRadiusHover);\n })\n .on(\"mouseout\", function (d) {\n select(this).transition(500).attr(\"r\", circleStyles.circleRadius);\n });\n\n attentionBars\n .enter()\n .append(\"g\")\n .attr(\"class\", \"attention-line-group\")\n .append(\"path\")\n .attr(\"class\", \"attention-line-errorbar\")\n .transition(1000)\n .attr(\"id\", (d) => `line-${d.id}`)\n .attr(\"d\", (d) => makeErrorBar([d]));\n }\n\n //JOIN PROCESSING\n const processingLine = vis.g\n .selectAll(\"processing-line-group\")\n .data([vis.data.processingLine], (d) => d.id);\n\n const processingCircles = vis.g\n .selectAll(\"processing-circle\")\n .data(vis.data.processingLine, (d) => d.id);\n\n const processingBars = vis.g\n .selectAll(\"processing-line-group\")\n .data(vis.data.processingLine, (d) => d);\n\n //EXIT PROCESSING\n processingLine.exit();\n selectAll(\".processing-line-group\").remove();\n\n processingCircles.exit();\n selectAll(\".processing-circle\").remove();\n\n //UPDATE\n if (processingLineToggle) {\n //ENTER PROCESSING\n processingLine\n .enter()\n .append(\"g\")\n .attr(\"class\", \"processing-line-group\")\n .on(\"mouseover\", function (d) {\n select(this)\n .append(\"text\")\n .attr(\"class\", \"line-text\")\n .text(`Processing`)\n .attr(\"x\", WIDTH / 2 - 35)\n .attr(\"y\", -10);\n })\n .on(\"mouseout\", function (d) {\n selectAll(\".line-text\").remove();\n })\n\n .append(\"path\")\n .attr(\"class\", \"processing-line\")\n .attr(\"id\", (d) => `line-${d.id}`)\n .attr(\"d\", (d) => makeLine(d));\n\n processingCircles\n .enter()\n .append(\"g\")\n .append(\"g\")\n .attr(\"class\", \"processing-circle\")\n .on(\"mouseover\", function (d) {\n select(this)\n .style(\"cursor\", \"pointer\")\n .append(\"text\")\n .attr(\"class\", \"circle-text\")\n .text(`${calculateAveragePercentage(d.value.avg).toFixed(2)}%`)\n .attr(\"x\", (d) => vis.x(new Date(d.key)) - 30)\n .attr(\n \"y\",\n (d) => vis.y(calculateAveragePercentage(d.value.avg)) - 35\n );\n select(this)\n .append(\"text\")\n .attr(\"class\", \"circle-text\")\n .attr(\"x\", (d) => vis.x(new Date(d.key)) - 30)\n .text(\n `At ${new Date(d.key).toLocaleDateString()} for Processing`\n )\n .attr(\n \"y\",\n (d) => vis.y(calculateAveragePercentage(d.value.avg)) - 20\n );\n })\n .on(\"mouseout\", function (d) {\n select(this)\n .style(\"cursor\", \"none\")\n .selectAll(\".circle-text\")\n .transition(500)\n .remove();\n })\n .append(\"circle\")\n .attr(\"cx\", (d) => vis.x(new Date(d.key)))\n .attr(\"cy\", (d) => vis.y(calculateAveragePercentage(d.value.avg)))\n .attr(\"r\", circleStyles.circleRadius)\n .style(\"opacity\", 1)\n .on(\"mouseover\", function (d) {\n select(this)\n .transition(500)\n .attr(\"r\", circleStyles.circleRadiusHover);\n })\n .on(\"mouseout\", function (d) {\n select(this).transition(500).attr(\"r\", circleStyles.circleRadius);\n });\n\n processingBars\n .enter()\n .append(\"g\")\n .attr(\"class\", \"processing-line-group\")\n .append(\"path\")\n .attr(\"class\", \"processing-line-errorbar\")\n .attr(\"id\", (d) => `line-${d.id}`)\n .attr(\"d\", (d) => makeErrorBar([d]));\n }\n }\n }\n}\n\nexport default GeneralMetricsChart;\n","import React, { Component } from \"react\";\nimport GeneralMetricsChart from \"./GeneralMetricsChart\";\n\nexport default class ChartWrapper extends Component {\n componentDidMount() {\n this.setState({\n chart: new GeneralMetricsChart(\n this.refs.chart,\n this.props.data,\n this.props.attentionLineToggle,\n this.props.processingLineToggle,\n this.props.memoryLineToggle\n ),\n });\n }\n\n shouldComponentUpdate() {\n return false;\n }\n\n componentWillReceiveProps(nextProps) {\n this.state.chart.update(\n nextProps.data,\n nextProps.attentionLineToggle,\n nextProps.processingLineToggle,\n nextProps.memoryLineToggle\n );\n }\n\n render() {\n return (\n \n );\n }\n}\n","import { select, scaleLinear, line, selectAll } from \"d3\";\n\nconst MARGIN = { TOP: 75, BOTTOM: 50, LEFT: 100, RIGHT: 25 };\nconst WIDTH = 750 - MARGIN.LEFT - MARGIN.RIGHT;\nconst HEIGHT = 750 - MARGIN.TOP - MARGIN.BOTTOM;\n\nclass RadarPlot {\n constructor(element, data) {\n let vis = this;\n\n // the svg element\n vis.g = select(element)\n .append(\"svg\")\n .attr(\"width\", WIDTH + MARGIN.LEFT + MARGIN.RIGHT)\n .attr(\"height\", HEIGHT + MARGIN.TOP + MARGIN.BOTTOM)\n .append(\"g\")\n .attr(\"transform\", `translate(${MARGIN.LEFT}, ${MARGIN.TOP})`);\n\n // range of the svg\n let radialScale = scaleLinear().domain([0, 5]).range([0, 150]);\n\n this.radialScale = radialScale;\n\n // number of circle that surrounds the radar\n let ticks = [1, 2, 3, 4, 5];\n\n ticks.forEach((t) => {\n vis.g\n .append(\"circle\")\n .attr(\"cx\", WIDTH / 2)\n .attr(\"cy\", HEIGHT / 2)\n .attr(\"fill\", \"none\")\n .attr(\"stroke\", \"#555\") //colour of the ticks\n .attr(\"r\", radialScale(t));\n });\n\n ticks.forEach((t) =>\n vis.g\n .append(\"text\")\n .attr(\"x\", WIDTH / 2 + 5.5)\n .attr(\"y\", HEIGHT / 2 - 5.5 - radialScale(t))\n .text(t.toString())\n );\n\n function angleToCoordinate(angle, value) {\n let x = Math.cos(angle) * radialScale(value);\n let y = Math.sin(angle) * radialScale(value);\n return { x: WIDTH / 2 + x, y: HEIGHT / 2 - y };\n }\n\n function getPathCoordinates(data_point) {\n let coordinates = [];\n\n for (let i = 0; i < data[1].length; i++) {\n let ft_name = data[1][i];\n // let ft_name = (data[1][i] !== null) ? data[1][i] : `0.0`;\n let angle = Math.PI / 2 + (2 * Math.PI * i) / data[1].length;\n\n coordinates.push(angleToCoordinate(angle, data_point[ft_name]));\n }\n return coordinates;\n }\n\n this.getPathCoordinates = getPathCoordinates;\n\n for (let i = 0; i < data[1].length; i++) {\n let ft_name = data[1][i]; //data title: (difficulty, effort ...etc.)\n let angle = Math.PI / 2 + (2 * Math.PI * i) / data[1].length;\n let line_coordinate = angleToCoordinate(angle, 5);\n let label_coordinate = angleToCoordinate(angle, 5.25);\n\n //Ajust label corrdinates based on angle.\n if (angle < 2) {\n label_coordinate.y = label_coordinate.y - 15;\n label_coordinate.x = label_coordinate.x - 25;\n } else if (angle > 2 && angle < 4) {\n label_coordinate.x = label_coordinate.x - 40;\n } else if (angle > 4 && angle < 5) {\n label_coordinate.x = label_coordinate.x - 50;\n label_coordinate.y = label_coordinate.y + 10;\n }\n\n //draw axis line\n vis.g\n .append(\"line\")\n .attr(\"x1\", WIDTH / 2)\n .attr(\"y1\", HEIGHT / 2)\n .attr(\"x2\", line_coordinate.x)\n .attr(\"y2\", line_coordinate.y)\n .attr(\"stroke\", \"black\");\n\n //draw axis label\n vis.g\n .append(\"text\")\n .attr(\"x\", label_coordinate.x)\n .attr(\"y\", label_coordinate.y)\n .text(ft_name);\n }\n\n vis.update(data, getPathCoordinates);\n }\n\n update(data) {\n let vis = this;\n vis.data = data;\n\n const colour = \"#64b5f6\";\n const coordinates = vis.getPathCoordinates(data[0]);\n const makeLine = line()\n .x((d) => d.x)\n .y((d) => d.y);\n\n const circleEntries = Object.entries(data[0]);\n\n //JOIN DATA and assoicated it our line selection\n const radarLine = vis.g\n .selectAll(\"data-line-group\")\n .data([data[0]], (d) => d);\n\n //EXIT DATA\n radarLine.exit();\n selectAll(\".data-line-group\").remove();\n\n radarLine\n .enter()\n .append(\"g\")\n .attr(\"class\", \"data-line-group\")\n .append(\"path\")\n .datum(coordinates)\n .attr(\"d\", makeLine)\n .attr(\"stroke-width\", 3)\n .attr(\"stroke\", colour)\n .attr(\"fill\", colour)\n .attr(\"stroke-opacity\", 1)\n .attr(\"opacity\", 0.5);\n }\n}\n\nexport default RadarPlot;\n","import React, { Component } from \"react\";\nimport RadarPlot from \"./RadarPlot\";\nimport { Radar } from \"react-chartjs-2\";\n\nexport default class RadarPlotWrapper extends Component {\n componentDidMount() {\n this.setState({\n chart: new RadarPlot(this.refs.chart, this.props.data),\n });\n }\n\n shouldComponentUpdate() {\n return false;\n }\n\n componentWillReceiveProps(nextProps) {\n this.state.chart.update(nextProps.data);\n }\n\n render() {\n return
;\n }\n}\n","import React from \"react\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Typography from \"@material-ui/core/Typography\";\n\nconst useStyles = makeStyles((theme) => ({\n paper: {\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n height: 250,\n },\n}));\n\nexport default function RedarLegend(props) {\n const classes = useStyles();\n return (\n \n \n Graph Info\n \n \n Difficulty:{\" \"}\n {props.data[0].Difficulty === null\n ? 0\n : props.data[0].Difficulty.toFixed(2)}{\" \"}\n / 5\n \n \n Satisfaction:{\" \"}\n {props.data[0].Satisfaction === null\n ? 0\n : props.data[0].Satisfaction.toFixed(2)}{\" \"}\n / 5\n \n \n Frustration:{\" \"}\n {props.data[0].Frustration === null\n ? 0\n : props.data[0].Frustration.toFixed(2)}{\" \"}\n / 5\n \n \n Enjoyment:{\" \"}\n {props.data[0].Enjoyment === null\n ? 0\n : props.data[0].Enjoyment.toFixed(2)}{\" \"}\n / 5\n \n \n Effort:{\" \"}\n {props.data[0].Effort === null ? 0 : props.data[0].Effort.toFixed(2)} /\n 5\n \n \n );\n}\n","import React from \"react\";\nimport {\n AppBar,\n Container,\n Paper,\n Tabs,\n Tab,\n Box,\n Typography,\n} from \"@material-ui/core\";\nimport MaterialTable from \"material-table\";\nimport moment from \"moment\";\nimport TabPanel from \"../../sharedComponents/TabPanel\";\nimport { getUserSessionData } from \"../../../actions/index\";\nimport { Debug, capitalize } from \"../../../lib/index\";\nimport ChartBase from \"./ChartBase\";\nimport Grid from \"@material-ui/core/Grid\";\nimport Accordion from \"@material-ui/core/Accordion\";\nimport AccordionSummary from \"@material-ui/core/AccordionSummary\";\nimport AccordionDetails from \"@material-ui/core/AccordionDetails\";\n\n// Gets the properties for the tab panels\nconst tabPanelProps = (index) => {\n return {\n id: `scrollable-auto-tab-${index}`,\n \"aria-controls\": `scrollable-auto-tabpanel-${index}`,\n };\n};\n\n// for material table\nconst options = {\n search: false,\n sortable: false,\n paging: true,\n pageSize: 5,\n emptyRowsWhenPaging: false,\n pageSizeOptions: [5, 10, 25, 50, 100],\n exportButton: true,\n};\n\n/* ----------------------------- Main component ----------------------------- */\nclass UserSession extends ChartBase {\n constructor(props) {\n super(props, getUserSessionData);\n this.parseData = this.parseData.bind(this);\n this.renderChart = this.renderChart.bind(this);\n this.handleTabChange = this.handleTabChange.bind(this);\n this.dispatchAPI = this.dispatchAPI.bind(this);\n this.getFileName = this.getFileName.bind(this);\n\n this.state = {\n ...this.state,\n tab_index: 0,\n };\n }\n\n dispatchAPI(user_id, start_date, end_date) {\n return getUserSessionData(user_id, start_date, end_date, true);\n }\n\n parseData(payload) {\n let categories = {};\n\n // Group all related level categories into arrays\n for (let key in payload) {\n let category = payload[key].categories;\n if (category !== null && category != \"null\") {\n categories[category] = categories[category] || [];\n categories[category].push(payload[key]);\n }\n }\n\n let tableData = [];\n\n // Iterate over all level categories\n for (let category in categories) {\n const levels = categories[category];\n\n // Will store all data for this line\n let categoryData = {\n name: capitalize(category),\n levels: [],\n };\n\n // Iterate over all levels within the category\n for (const level of levels) {\n let levelData = {\n name: level.name,\n sessions: [],\n columns: [\n {\n title: \"Date\",\n field: \"created_at\",\n },\n ],\n };\n // Add all the tracked fields from aggregates to the table\n for (let key in level.avg) {\n if (key != \"count\")\n levelData.columns.push({ title: capitalize(key), field: key });\n }\n levelData.sessions = level.sessions;\n\n categoryData.levels.push(levelData);\n }\n tableData.push(categoryData);\n }\n this.table_data = tableData;\n\n return { chartData: {}, chartOptions: {} };\n }\n\n // Handles when a new tab is selected\n handleTabChange(event, newValue) {\n event.preventDefault();\n this.setState({\n ...this.state,\n tab_index: newValue,\n });\n }\n\n getFileName(levelData) {\n let user_name = \"\";\n if (this.props.user != undefined) {\n user_name = this.props.user.first_name || \"\";\n user_name += \"_\" + (this.props.user.last_name || \"\");\n }\n return `${user_name}_${levelData.name}_${moment(\n this.props.start_date\n ).format(\"YYYY_MM_DD\")}-${moment(this.props.end_date).format(\n \"YYYY_MM_DD\"\n )}.csv`;\n }\n\n renderChart() {\n const tabBar = (\n \n \n {this.table_data.map((category, ix) => (\n \n ))}\n \n \n );\n\n return (\n \n {tabBar}\n {this.table_data.map((category, ix) => (\n \n {category.levels.map((level, ix) => (\n \n \n {level.name}\n \n \n \n \n \n \n \n \n \n ))}\n \n ))}\n \n );\n }\n}\n\nexport default UserSession;\n","import React from \"react\";\nimport { Bar } from \"react-chartjs-2\";\nimport ChartBase from \"./ChartBase\";\nimport { getUserSessionData } from \"../../../actions/index\";\n\nclass UserPerformanceRatio extends ChartBase {\n constructor(props) {\n super(props, getUserSessionData);\n this.renderChart = this.renderChart.bind(this);\n this.parseData = this.parseData.bind(this);\n this.dispatchAPI = this.dispatchAPI.bind(this);\n }\n\n dispatchAPI(user_id, start_date, end_date) {\n return getUserSessionData(user_id, start_date, end_date);\n }\n\n parseData(payload) {\n const {\n mail_room,\n nature_path,\n restaurant,\n spot_the_difference,\n trail_making,\n western,\n } = payload;\n\n // --------------- this gets the skill's average correct value --------------\n const getCorrect = (value) => {\n return value.session_count !== 0 ? value.avg.correct : 0;\n };\n\n //-------------- this gets the skill's average incorrect value -------------\n const getIncorrect = (value) => {\n return value.session_count !== 0\n ? value.avg.missed || value.avg.incorrect\n : 0;\n };\n\n //------ put correct values in to an array and gets the sum afterwards -----\n const attentionCorr = [\n getCorrect(mail_room),\n getCorrect(spot_the_difference),\n ].reduce((attentionCorr, x) => Math.floor(attentionCorr + x));\n\n const memoryCorr = [\n getCorrect(trail_making),\n getCorrect(nature_path),\n ].reduce((memoryCorr, x) => Math.floor(memoryCorr + x));\n\n const processingCorr = [getCorrect(restaurant), getCorrect(western)].reduce(\n (processingCorr, x) => Math.floor(processingCorr + x)\n );\n\n //----- put incorrect values in to an array and gets the sum afterwards ----\n const attentionInCorr = [\n getIncorrect(mail_room),\n getIncorrect(spot_the_difference),\n ].reduce((attentionInCorr, x) => Math.floor(attentionInCorr + x));\n\n const memoryInCorr = [\n getIncorrect(trail_making),\n getIncorrect(nature_path),\n ].reduce((memoryInCorr, x) => Math.floor(memoryInCorr + x));\n\n const processingInCorr = [\n getIncorrect(restaurant),\n getIncorrect(western),\n ].reduce((processingInCorr, x) => Math.floor(processingInCorr + x));\n\n let chartData = {\n labels: [\"Attention\", \"Memory\", \"Processing\"],\n datasets: [\n {\n data: [attentionCorr, memoryCorr, processingCorr],\n label: \"Correct\",\n fillColor: \"rgb(21.2%,76.9%,98%)\",\n backgroundColor: \"rgb(21.2%,76.9%,98%)\",\n },\n {\n data: [attentionInCorr, memoryInCorr, processingInCorr],\n label: \"Incorrect\",\n fillColor: \"rgb(98.4%,31%,45.9%)\",\n backgroundColor: \"rgb(98.4%,31%,45.9%)\",\n },\n ],\n };\n const chartOptions = {\n legend: { display: false },\n scales: {\n xAxes: [\n {\n ticks: { fontSize: 15 },\n },\n ],\n yAxes: [\n {\n ticks: {\n beginAtZero: true,\n fontSize: 15,\n },\n scaleLabel: {\n display: true,\n labelString: \"Cumulative Incorrect vs Correct\",\n fontSize: 15,\n },\n },\n ],\n },\n responsive: true,\n };\n\n return { chartData, chartOptions };\n }\n\n renderChart() {\n return (\n \n );\n }\n}\n\nexport default UserPerformanceRatio;\n\n/*\nconst UserPerformanceRatio = (props) => {\n if(payload !== null && payload !== undefined){\n\n const {mail_room, nature_path, restaurant, spot_the_difference, trail_making, western} = payload;\n // --------------- this gets the skill's average correct value --------------\n\n const getCorrect = value => {\n return value.session_count !== 0 ? value.avg.correct : 0\n }\n\n // -------------- this gets the skill's average incorrect value -------------\n\n const getIncorrect = value => {\n return value.session_count !== 0 ? value.avg.incorrect : 0\n }\n\n // ------ put correct values in to an array and gets the sum afterwards -----\n\n const attentionCorr = [getCorrect(mail_room), getCorrect(spot_the_difference)]\n .reduce((attentionCorr, x) => Math.floor(attentionCorr + x));\n\n const memoryCorr = [getCorrect(trail_making), getCorrect(nature_path)]\n .reduce((memoryCorr, x) => Math.floor(memoryCorr + x));\n\n const processingCorr = [getCorrect(restaurant), getCorrect(western)]\n .reduce((processingCorr, x) => Math.floor(processingCorr + x));\n\n // ----- put incorrect values in to an array and gets the sum afterwards ----\n\n const attentionInCorr = [getIncorrect(mail_room), getIncorrect(spot_the_difference)]\n .reduce((attentionInCorr, x) => Math.floor(attentionInCorr + x));\n\n const memoryInCorr = [getIncorrect(trail_making), getIncorrect(nature_path)]\n .reduce((memoryInCorr, x) => Math.floor(memoryInCorr + x));\n\n const processingInCorr = [getIncorrect(restaurant), getIncorrect(western)]\n .reduce((processingInCorr, x) => Math.floor(processingInCorr + x));\n\n return (\n
\n \n
\n )\n }else{\n return (

No Session Data

)\n }\n\n\n}\n*/\n","import React, { Component, useEffect } from \"react\";\nimport { withStyles } from \"@material-ui/core/styles\";\nimport PropTypes from \"prop-types\";\n\n// importing Material UI Components\nimport {\n Fab,\n Grid,\n Input,\n MenuItem,\n Select,\n Typography,\n} from \"@material-ui/core\";\nimport moment from \"moment\";\nimport { capitalize, trimRight } from \"../../../lib/index\";\nimport { updateUser } from \"../../../actions/index\";\n\nimport EditIcon from \"@material-ui/icons/Edit\";\nimport SaveIcon from \"@material-ui/icons/Save\";\nimport CancelIcon from \"@material-ui/icons/Cancel\";\nimport { DatePicker, MuiPickersUtilsProvider } from \"@material-ui/pickers\";\nimport MomentUtils from \"@date-io/moment\";\nimport PermissionsService from \"../../../lib/PermissionsSystem\";\nimport {\n DEFAULT_PRONOUN_SETS,\n DEFAULT_GENDERS,\n USER_TYPES,\n} from \"../../../lib/Constants\";\n\nimport Tooltip from \"@material-ui/core/Tooltip\";\n\n// imports the user data that will be used later on when rendering\n// import { useDispatch, useSelector, connect } from 'react-redux';\n// import { updateSelectedUser } from '../../actions/';\n// import { BrowserRouter as Router, Route, Link, useLocation, Switch } from 'react-router-dom'\n\nconst styles = (theme) => ({\n patientContainer: {\n backgroundColor: \"#fafafa\",\n border: \"3px solid #D0EEFB\",\n borderRadius: \"5px\",\n margin: \"0\",\n width: \"90%\",\n padding: \".5rem\",\n color: \"#555555\",\n },\n infoLabel: {\n fontWeight: \"bold\",\n float: \"right\",\n paddingRight: \"0.5em\",\n },\n icon: {\n width: \"32px\",\n height: \"32px\",\n float: \"right\",\n marginLeft: \"16px\",\n },\n input: {\n width: \"100%\",\n },\n});\n\n/**\n * Component for patient basic information (name, gender, contact info, etc...)\n */\nclass UserFile extends React.Component {\n constructor(props) {\n super(props);\n\n this.submitUpdate = this.submitUpdate.bind(this);\n this.cancelChanges = this.cancelChanges.bind(this);\n this.getInitialState = this.getInitialState.bind(this);\n this.mapToState = this.mapToState.bind(this);\n this.mapToStateValue = this.mapToStateValue.bind(this);\n this.updateGender = this.updateGender.bind(this);\n this.updatePronounSet = this.updatePronounSet.bind(this);\n this.generatePronounSample = this.generatePronounSample.bind(this);\n\n this.state = this.getInitialState();\n }\n\n getInitialState() {\n const props = this.props;\n\n return {\n isEditing: false,\n user_id: props.user_id,\n user_data: {\n ...props.user,\n ...props.patient_data,\n dob: moment(props.user.dob),\n },\n // User data that has been edited\n working_user_data: {},\n has_custom_pronouns:\n DEFAULT_PRONOUN_SETS.find(\n (x) => x.subject === props.user.pronoun_subject\n ) === undefined,\n has_custom_gender: !DEFAULT_GENDERS.includes(\n props.user.gender.toLowerCase()\n ),\n info_message: undefined,\n };\n }\n\n componentDidUpdate(prevProps) {\n if (prevProps.user !== this.props.user) {\n console.log(\"Refreshing user state\");\n this.setState(this.getInitialState());\n }\n }\n\n async submitUpdate() {\n try {\n const result = await updateUser(\n this.state.user_id,\n this.state.working_user_data\n )();\n this.setState({\n ...this.state,\n user_data: {\n ...this.state.user_data,\n ...this.state.working_user_data,\n },\n info_message: (\n \n Updated user account\n \n ),\n isEditing: false,\n });\n } catch (e) {\n console.log(e);\n this.setState({\n ...this.state,\n working_user_data: {},\n error_message: (\n \n Failed to update account\n \n ),\n isEditing: false,\n });\n }\n }\n\n async cancelChanges() {\n this.setState({\n ...this.state,\n working_user_data: {},\n isEditing: false,\n });\n }\n\n mapToState(target) {\n return {\n value:\n this.state.working_user_data[target] === undefined\n ? this.state.user_data[target]\n : this.state.working_user_data[target],\n onChange: (event) => {\n this.setState({\n ...this.state,\n working_user_data: {\n ...this.state.working_user_data,\n [target]: event.target.value,\n },\n });\n },\n };\n }\n\n mapToStateValue(target) {\n return {\n value:\n this.state.working_user_data[target] === undefined\n ? this.state.user_data[target]\n : this.state.working_user_data[target],\n onChange: (value) => {\n this.setState({\n ...this.state,\n working_user_data: {\n ...this.state.working_user_data,\n [target]: value,\n },\n });\n },\n };\n }\n\n updateGender(event) {\n let newState = this.state;\n newState.has_custom_gender = event.target.value === \"custom\";\n if (newState.has_custom_gender) {\n newState.working_user_data.gender =\n this.state.working_user_data.gender || newState.user_data.gender;\n } else {\n newState.working_user_data.gender = event.target.value;\n }\n console.log(newState.gender);\n this.setState(newState);\n }\n\n updatePronounSet(event) {\n let newState = this.state;\n newState.has_custom_pronouns = event.target.value === \"custom\";\n if (!newState.has_custom_pronouns) {\n let set = DEFAULT_PRONOUN_SETS.find(\n (x) => x.subject == event.target.value\n );\n newState.working_user_data.pronoun_subject = set.subject;\n newState.working_user_data.pronoun_possessive = set.possessive;\n newState.working_user_data.pronoun_object = set.object;\n }\n this.setState(newState);\n }\n\n generatePronounSample(options) {\n const pronoun_subject =\n this.state.working_user_data.pronoun_subject ||\n this.state.user_data.pronoun_subject;\n const pronoun_object =\n this.state.working_user_data.pronoun_object ||\n this.state.user_data.pronoun_object;\n const pronoun_possessive =\n this.state.working_user_data.pronoun_possessive ||\n this.state.user_data.pronoun_possessive;\n const pronoun_reflexive = pronoun_object + \"self\";\n const pronoun_is_plural = pronoun_subject === \"they\";\n\n return (\n \n {options.capitalize_subject ? (\n \n {capitalize(pronoun_subject)}\n \n ) : (\n {capitalize(pronoun_subject)}\n )}\n  \n {pronoun_is_plural ? \"are\" : \"is\"} early for{\" \"}\n {options.capitalize_possessive ? (\n \n {pronoun_possessive}\n \n ) : (\n {pronoun_possessive}\n )}{\" \"}\n appointment, can you go talk to{\" \"}\n {options.capitalize_object ? (\n \n {pronoun_object}\n \n ) : (\n {pronoun_object}\n )}\n ?{\" \"}\n {options.capitalize_subject ? (\n \n {capitalize(pronoun_subject)}\n \n ) : (\n {capitalize(pronoun_subject)}\n )}{\" \"}\n {pronoun_is_plural ? \"don't\" : \"doesn't\"} like waiting by{\" \"}\n {pronoun_reflexive}.\n \n );\n }\n\n render() {\n const { patientContainer, infoLabel } = this.props.classes;\n const classes = this.props.classes;\n const {\n first_name,\n last_name,\n gender,\n dob,\n email,\n education,\n diagnosis,\n fitpoints,\n } = this.state.user_data;\n\n const isEditing = this.state.isEditing;\n\n const canEdit =\n !(\n PermissionsService.GetUserID() == this.state.user_id &&\n !PermissionsService.HasPermission(\"org.admin.self.update\")\n ) &&\n (this.state.user_data.user_type === USER_TYPES.Patient\n ? PermissionsService.HasPermission(\"org.admin.patients.update\")\n : this.state.user_data.user_type === USER_TYPES.Practitioner\n ? PermissionsService.HasPermission(\"org.admin.users.update\")\n : PermissionsService.GetUser().type === USER_TYPES.Admin);\n\n return (\n \n {/* Form Group */}\n \n {canEdit && (\n \n {this.state.isEditing ? (\n \n \n \n \n \n \n \n \n \n \n ) : (\n \n {\n this.setState({ ...this.state, isEditing: true });\n }}\n className={classes.icon}\n >\n \n \n \n )}\n \n )}\n {/* Basic Info */}\n \n \n Basic Information\n \n {/* Name row */}\n \n \n Name:\n \n \n {this.state.isEditing ? (\n \n \n \n \n ) : (\n \n {first_name} \n {last_name}\n \n )}\n \n \n {/* DOB row */}\n \n \n Date of Birth:\n \n \n {this.state.isEditing ? (\n \n \n \n \n \n ) : (\n {dob.format(\"MMMM Do, YYYY\")}\n )}\n \n \n {/* Gender row */}\n \n \n Gender:\n \n \n {this.state.isEditing ? (\n \n \n \n Prefer not to say\n Male\n Female\n Non-binary\n Custom\n \n {this.state.has_custom_gender && (\n \n )}\n \n \n ) : (\n {capitalize(gender)}\n )}\n \n \n {/* Pronouns row */}\n \n \n \n EX:\n
\n {this.generatePronounSample({})}\n \n }\n aria-label=\"pronouns\"\n >\n Pronouns:\n \n
\n \n {this.state.isEditing ? (\n \n \n Feminine (she/her/hers)\n Masculine (he/him/his)\n \n Neuter (they/them/theirs)\n \n Custom\n \n {this.state.has_custom_pronouns && (\n \n \n \n \n Pronoun subject\n \n EX: he, she, they\n
\n {this.generatePronounSample({\n capitalize_subject: true,\n })}\n
\n }\n aria-label=\"pronoun subject\"\n >\n \n \n
\n \n \n \n Pronoun objective\n \n EX: him, her, them\n
\n {this.generatePronounSample({\n capitalize_object: true,\n })}\n \n }\n aria-label=\"pronoun object\"\n >\n \n \n
\n \n \n \n Pronoun possessive\n \n EX: his, her, their\n
\n {this.generatePronounSample({\n capitalize_possessive: true,\n })}\n \n }\n aria-label=\"pronoun subject\"\n >\n \n \n
\n \n )}\n
\n ) : (\n \n \n EX:\n
\n {this.generatePronounSample({})}\n
\n }\n aria-label=\"pronouns\"\n >\n \n {this.state.user_data.pronoun_subject}/\n {this.state.user_data.pronoun_object}/\n {this.state.user_data.pronoun_possessive}\n \n \n \n )}\n
\n
\n {/* Contact Email */}\n \n \n Email:\n \n \n {email}\n \n \n
\n {/* Patient Info */}\n {PermissionsService.HasPermission(\n \"org.admin.patients.notes.read\"\n ) && (\n \n \n Patient Information\n \n {/* Diagnosis */}\n \n \n Diagnosis:\n \n \n {this.state.isEditing ? (\n \n \n \n ) : (\n {diagnosis}\n )}\n \n \n {/* Education */}\n \n \n Education:\n \n \n {this.state.isEditing ? (\n \n \n \n ) : (\n {education}\n )}\n \n \n {/* Fitpoints */}\n \n \n Fitpoints:\n \n \n {fitpoints}\n \n \n \n )}\n \n {this.state.info_message}\n \n \n \n );\n }\n}\n\nUserFile.propTypes = {\n classes: PropTypes.object.isRequired,\n user: PropTypes.object.isRequired,\n patient_data: PropTypes.object.isRequired,\n user_id: PropTypes.string.isRequired,\n};\n\nexport default withStyles(styles)(UserFile);\n","import {\n Button,\n Container,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n Grid,\n Input,\n InputLabel,\n Snackbar,\n Tooltip,\n} from \"@material-ui/core\";\nimport React from \"react\";\nimport JoditEditor from \"jodit-react\";\n// https://xdsoft.net/jodit/doc/\nimport { connect } from \"react-redux\";\n\nimport NotesActions from \"../../../actions/NotesActions\";\nimport Editor from \"rich-markdown-editor\";\nimport { DateTimePicker, MuiPickersUtilsProvider } from \"@material-ui/pickers\";\nimport moment from \"moment\";\nimport MomentUtils from \"@date-io/moment\";\nimport { Label, Save, ShowChart } from \"@material-ui/icons\";\nimport DeleteForeverIcon from \"@material-ui/icons/DeleteForever\";\nimport SaveIcon from \"@material-ui/icons/Save\";\nimport EditIcon from \"@material-ui/icons/Edit\";\nimport AddIcon from \"@material-ui/icons/Add\";\nimport Alert from \"@material-ui/lab/Alert\";\nimport PermissionsService from \"../../../lib/PermissionsSystem\";\nimport { Debug } from \"../../../lib/index\";\n\nclass PatientNotes extends React.Component {\n constructor(props) {\n super(props);\n\n this.onTextChanged = this.onTextChanged.bind(this);\n this.handleSave = this.handleSave.bind(this);\n this.filterNotes = this.filterNotes.bind(this);\n this.handleFilterChanged = this.handleFilterChanged.bind(this);\n this.onCreateNewNote = this.onCreateNewNote.bind(this);\n this.noteDateChanged = this.noteDateChanged.bind(this);\n this.goToData = this.goToData.bind(this);\n this.deleteNote = this.deleteNote.bind(this);\n this.onDeleteModalClose = this.onDeleteModalClose.bind(this);\n this.openDeleteModal = this.openDeleteModal.bind(this);\n\n this.state = {\n note: \"\",\n start_date: undefined,\n end_date: undefined,\n note_date: moment(), // LOCAL TIME\n note_id: undefined,\n creator_first_name: undefined,\n creator_last_name: undefined,\n creator_id: undefined,\n can_edit_note: PermissionsService.HasPermission(\n \"org.admin.patients.notes.create\"\n ),\n can_delete_note: false,\n is_editing: true,\n delete_modal_open: false,\n message:
,\n filtered_notes: this.props.patient_notes,\n note_data_callback: () => {\n return \"\";\n },\n };\n }\n\n componentDidMount() {\n if (this.props.user_id) {\n NotesActions.GetNotes(this.props.user_id)(this.props.dispatch);\n }\n }\n\n componentDidUpdate(prevProps) {\n if (\n (this.props.patient_notes !== prevProps.patient_notes) |\n (this.props.patient_notes?.length != prevProps.patient_notes?.length)\n ) {\n Debug.log(\"Refresh in order!\");\n this.setState({\n ...this.state,\n filtered_notes: this.filterNotes(this.state.filter),\n });\n }\n\n if (prevProps.user_id != this.props.user_id) {\n NotesActions.GetNotes(this.props.user_id)(this.props.dispatch);\n }\n }\n\n async deleteNote() {\n let result = await NotesActions.DeleteNote(\n this.props.user.id,\n this.state.note_id\n )(this.props.dispatch);\n\n if (result.status == 200) {\n this.setState({\n ...this.state,\n delete_modal_open: false,\n message: (\n \n Note has been deleted\n \n ),\n });\n this.onCreateNewNote();\n } else {\n this.setState({\n ...this.state,\n delete_modal_open: false,\n message: (\n \n \n Failed to delete note {result.data?.message}\n \n \n ),\n });\n }\n }\n\n filterNotes(text) {\n const filter = text?.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, \"\\\\$&\") || \"\";\n if (/\\s/g.test(filter)) {\n return this.props.patient_notes;\n } else {\n const regex = new RegExp(filter, \"i\");\n console.log(\"filter: \" + filter);\n return this.props.patient_notes.filter((x) => {\n return (\n regex.test(x.note) ||\n regex.test(x.admin.first_name) ||\n regex.test(x.admin.last_name) ||\n regex.test(\n moment.utc(x.note_date).local().format(\"MMM D, YYYY h:mmA\")\n )\n );\n });\n }\n }\n\n onTextChanged(contentCallback) {\n this.setState({\n ...this.state,\n note_data_callback: contentCallback,\n });\n }\n\n onCreateNewNote() {\n this.setState({\n ...this.state,\n note: \" \",\n note_date: moment(),\n note_id: undefined,\n creator_first_name: undefined,\n creator_last_name: undefined,\n creator_id: undefined,\n can_edit_note: true,\n is_editing: PermissionsService.HasPermission(\n \"org.admin.patients.notes.create\"\n ),\n message:
,\n });\n }\n\n async handleFilterChanged(e) {\n let filter = e.target.value;\n this.setState({\n ...this.state,\n filter,\n filtered_notes: this.filterNotes(filter),\n });\n }\n\n goToData() {\n if (this.props.jumpToDate) {\n this.props.jumpToDate(moment(this.state.note_date).utc(true));\n }\n }\n\n noteDateChanged(newDate) {\n this.setState({\n ...this.state,\n note_date: newDate,\n });\n }\n\n onDeleteModalClose() {\n this.setState({\n ...this.state,\n delete_modal_open: false,\n });\n }\n\n openDeleteModal() {\n this.setState({\n ...this.state,\n delete_modal_open: true,\n });\n }\n\n async handleNoteChanged(note_id) {\n let note = this.props.patient_notes?.find((x) => x.id === note_id);\n if (note) {\n const can_edit = !PermissionsService.HasPermission(\n \"org.admin.patients.notes.update\"\n )\n ? false\n : note.admin.id != PermissionsService.GetUserID()\n ? PermissionsService.HasPermission(\n \"org.admin.patients.notes.update.others\"\n )\n : true;\n const can_delete_note = PermissionsService.HasPermission(\n \"org.admin.patients.notes.delete\"\n )\n ? note.admin.id != PermissionsService.GetUserID()\n ? PermissionsService.HasPermission(\n \"org.admin.patients.notes.delete.others\"\n )\n : true\n : false;\n this.setState({\n ...this.state,\n note: note.note,\n note_id: note.id,\n note_date: moment.utc(note.note_date).local(),\n can_edit_note: can_edit,\n can_delete_note: can_delete_note,\n creator_first_name: note.admin.first_name,\n creator_last_name: note.admin.last_name,\n creator_id: note.admin.id,\n is_editing: false,\n });\n }\n }\n\n async handleSave() {\n if (this.state.note_id) {\n let result = await NotesActions.UpdateNote(\n this.props.user.id,\n this.state.note_id,\n {\n note: this.state.note_data_callback(),\n note_date: moment(this.state.note_date).utc().toISOString(),\n }\n )(this.props.dispatch);\n\n if (result.status == 200) {\n this.setState({\n ...this.state,\n is_editing: false,\n can_edit: true,\n note_id: result.data?.note?.id,\n message: (\n \n Updated note\n \n ),\n });\n } else {\n this.setState({\n ...this.state,\n message: (\n \n \n Failed to update note {result.data?.message}\n \n \n ),\n });\n }\n }\n // We are creating a new note\n else {\n let result = await NotesActions.CreateNote(this.props.user.id, {\n note: this.state.note_data_callback(),\n note_date: moment(this.state.note_date).utc().toISOString(),\n })(this.props.dispatch);\n\n if (result.status == 200) {\n this.setState({\n message: (\n \n Created new note\n \n ),\n });\n this.handleNoteChanged(result.data.note.id);\n } else {\n this.setState({\n ...this.state,\n message: (\n \n \n Failed to create note {result.data?.message}\n \n \n ),\n });\n }\n }\n }\n\n render() {\n const editorOptions = {\n width: \"100%\",\n minHeight: \"400px\",\n };\n const padding = {\n padding: \"2px 4px\",\n };\n\n const button = this.state.is_editing ? (\n \n ) : !this.state.is_editing & this.state.can_edit_note ? (\n {\n this.setState({ ...this.state, is_editing: true });\n }}\n variant=\"contained\"\n color=\"primary\"\n >\n \n Edit\n \n ) : (\n
\n );\n const deleteButton =\n !this.state.is_editing && this.state.can_delete_note ? (\n \n \n Delete\n \n ) : (\n
\n );\n\n const creator_name =\n (this.state.creator_first_name ||\n PermissionsService.GetUser().first_name) +\n \" \" +\n (this.state.creator_last_name || PermissionsService.GetUser().last_name);\n\n return (\n \n \n \n \n \n
{this.props.note_count}
\n {this.state.filtered_notes?.map((note) => {\n const date = moment\n .utc(note.note_date)\n .local()\n .format(\"MMM D, YYYY h:mmA\");\n return (\n \n
\n {\n this.handleNoteChanged(note.id);\n e.preventDefault();\n }}\n >\n {date}\n \n
\n
\n );\n }) ||
}\n \n {PermissionsService.HasPermission(\n \"org.admin.patients.notes.create\"\n ) && (\n \n \n {\n this.onCreateNewNote(e);\n e.preventDefault();\n }}\n >\n \n \n
\n \n )}\n
\n \n \n \n Note Date:\n \n \n \n \n \n \n \n \n \n {creator_name}\n \n \n
\n
\n \n \n \n {button}\n {deleteButton}\n \n {this.state.message}\n \n \n \n {\"Delete this note?\"}\n \n \n \n Are you sure you wish to delete this note? This cannot be\n undone and the note will not be recoverable.\n \n \n \n \n \n \n \n \n \n
\n );\n }\n}\n\nconst mapStateToProps = (state) => {\n return {\n user: state.userReducer.viewed_user,\n patient_notes: state.notesReducer.notes,\n note_count: state.notesReducer.note_count,\n has_fetched_notes: state.notesReducer.has_fetched,\n };\n};\nexport default connect(mapStateToProps, (dispatch) => {\n return {\n CreateNote: PatientNotes.CreateNote,\n GetNotes: PatientNotes.GetNotes,\n UpdateNote: PatientNotes.UpdateNote,\n DeleteNote: PatientNotes.DeleteNote,\n dispatch,\n };\n})(PatientNotes);\n","import React, { Component, useEffect } from \"react\";\nimport moment from \"moment\";\nimport Container from \"@material-ui/core/Container\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Button from \"@material-ui/core/Button\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Grid from \"@material-ui/core/Grid\";\n\nimport UsersDropdown from \"../../sharedComponents/UsersDropdown\";\nimport GeneralMetricsChartWrapper from \"../../d3Components/GeneralMetricsChartWrapper\";\nimport LoadingSpinner from \"../../sharedComponents/LoadingSpinner\";\nimport DateRangePickers from \"../../sharedComponents/DateRangePickers\";\nimport MetricSwitches from \"../../d3Components/MetricSwitches\";\nimport RadarPlotWrapper from \"../../d3Components/RadarPlotWrapper\";\nimport RadarLegend from \"../../d3Components/RadarLegend\";\nimport UserSession from \"./UserSession\";\nimport UserSkillLevels from \"./UserSkillLevels\";\nimport UserPerformanceRatio from \"./UserPerformanceRatio\";\nimport UserMood from \"./UserMood\";\n\n// icon\nimport {\n DesktopWindows,\n FolderShared,\n Label,\n Mood,\n ExpandMore,\n Comment,\n} from \"@material-ui/icons\";\nimport BarChartIcon from \"@material-ui/icons/BarChart\";\nimport NotesIcon from \"@material-ui/icons/Notes\";\n\n//import patient file\nimport UserFile from \"./UserFile\";\nimport PatientNotes from \"./PatientNotes\";\n\nimport { connect } from \"react-redux\";\nimport {\n getGraphData,\n getUsersByOrg,\n getUserSessionData,\n getRadarPlotData,\n updateSelectedUser,\n getUserSession,\n getUser,\n updateEndDateSelect,\n updateStartDateSelect,\n} from \"../../../actions/index\";\nimport { Debug } from \"../../../lib/index\";\nimport {\n Divider,\n Accordion,\n AccordionDetails,\n AccordionSummary,\n capitalize,\n} from \"@material-ui/core\";\nimport { dispatch } from \"d3-dispatch\";\nimport NotesActions from \"../../../actions/NotesActions\";\n\nclass UserProfilePage extends Component {\n constructor(props) {\n super(props);\n this.state = {\n radarPlotData: [],\n userSkillLevels: [],\n userSession: [],\n graphData: [],\n user: undefined,\n patient_data: undefined,\n start_date: moment().subtract(1, \"month\").toISOString(),\n end_date: moment().toISOString(),\n accordions: {\n profile_info: true,\n charts: true,\n notes: false,\n },\n };\n\n this.renderPlaysOverTime = this.renderPlaysOverTime.bind(this);\n this.jumpToSingleDay = this.jumpToSingleDay.bind(this);\n this.handleDateRangeChanged = this.handleDateRangeChanged.bind(this);\n this.handleAccordionStatusChanged =\n this.handleAccordionStatusChanged.bind(this);\n\n this.chartsRef = React.createRef();\n }\n\n componentDidMount() {\n // Get the user's information\n this.props.getUser(this.props.match.params.id)(this.props.dispatch);\n }\n\n handleAccordionStatusChanged(key_name, value) {\n // Update the relevant accordion state depending on the id of the accordion\n this.setState({\n ...this.state,\n accordions: {\n ...this.state.accordions,\n [key_name]: value,\n },\n });\n }\n\n handleDateRangeChanged(start_date, end_date) {\n console.log(start_date);\n console.log(end_date);\n this.setState({\n ...this.state,\n start_date: moment(start_date).utc().toISOString(),\n end_date: moment(end_date).utc().toISOString(),\n });\n }\n\n jumpToSingleDay(date) {\n let start_date = moment(date).local().startOf(\"day\");\n let end_date = moment(date).local().endOf(\"day\");\n console.log(start_date);\n console.log(end_date);\n let newState = this.state;\n newState.accordions.charts = true;\n this.setState(newState);\n this.chartsRef?.current?.scrollIntoView();\n updateStartDateSelect(start_date.utc())(this.props.dispatch);\n updateEndDateSelect(end_date.utc())(this.props.dispatch);\n this.handleDateRangeChanged(start_date, end_date);\n }\n\n renderPlaysOverTime = () => {\n if (this.props.graphData) {\n return (\n \n );\n } else {\n return

No Session Data

;\n }\n };\n\n render() {\n const center_style = {\n textAlign: \"center\",\n width: \"100%\",\n display: \"inline-block\",\n height: \"1.5em\",\n margin: \"0 auto\",\n };\n return (\n \n {this.props.user === undefined && }\n {this.props.user !== undefined && (\n \n \n {this.props.user.first_name} {this.props.user.last_name}\n \n \n {capitalize(this.props.user.gender)} | \n {moment().diff(this.props.user.dob, \"years\")} | \n {`${this.props.user.pronoun_subject}/${this.props.user.pronoun_object}/${this.props.user.pronoun_possessive}`}{\" \"}\n | \n {this.props.user.patient_data?.diagnosis}\n \n \n \n \n {\n this.handleAccordionStatusChanged(\"profile_info\", v);\n }}\n style={{ width: \"100%\" }}\n >\n }\n aria-controls=\"patient-info-content\"\n id=\"profile_info\"\n >\n \n \n {\" \"}\n  Patient File\n \n \n \n \n \n \n \n \n {/** CHARTS AND GRAPHS */}\n \n {\n this.handleAccordionStatusChanged(\"charts\", v);\n }}\n style={{ width: \"100%\" }}\n >\n }\n aria-controls=\"charts-content\"\n id=\"charts\"\n >\n \n \n {\" \"}\n  Charts and Graphs\n \n \n \n \n \n \n \n Select Data Range\n \n \n \n \n \n {/* renders the mood chart --- radar plot */}\n \n \n \n Average Mood\n \n \n \n \n \n Skill Over Time\n \n \n \n \n \n Performance Ratio\n \n \n \n \n \n Raw Session Data\n \n \n \n \n \n \n \n \n\n {/** Patient Notes */}\n \n {\n this.handleAccordionStatusChanged(\"notes\", v);\n }}\n style={{ width: \"100%\" }}\n >\n }\n aria-controls=\"notes-content\"\n id=\"notes\"\n >\n \n \n {\" \"}\n  Patient Notes\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )}\n \n );\n }\n}\n\nconst mapStateToProps = (state) => {\n return {\n user: state.userReducer.viewed_user,\n patient_data: state.userReducer.viewed_patient_data,\n };\n};\n\nconst mapDispatchToProps = (dispatch) => {\n return {\n getUser: getUser,\n dispatch,\n };\n};\n\nexport default connect(mapStateToProps, mapDispatchToProps)(UserProfilePage);\n","import React, { Component } from \"react\";\n\nimport Container from \"@material-ui/core/Container\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Button from \"@material-ui/core/Button\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Grid from \"@material-ui/core/Grid\";\n\nimport UsersDropdown from \"../sharedComponents/UsersDropdown\";\nimport LoadingSpinner from \"../sharedComponents/LoadingSpinner\";\nimport RadarPlotWrapper from \"./RadarPlotWrapper\";\nimport RadarLegend from \"./RadarLegend\";\nimport ChartRangeDropdown from \"../sharedComponents/ChartRangeDropdown\";\n\nimport { connect } from \"react-redux\";\nimport { getRadarPlotData, getUsersByOrg } from \"../../actions/\";\nimport { Divider } from \"@material-ui/core\";\n\nimport { Radar } from \"react-chartjs-2\";\n\nclass UserFeedbackGraph extends Component {\n loadingClients = () => {\n if (this.props.users.length === 0) {\n this.props.getUsersByOrg();\n return ;\n } else {\n return (\n \n \n
\n {\n this.props.getRadarPlotData(\n this.props.selectedUser,\n this.props.dateSelect\n );\n }}\n >\n Get Data\n \n
\n\n {/* */}\n \n );\n }\n };\n\n renderChart = () => {\n if (this.props.userChartData.length !== 0) {\n if (this.props.userChartData[0].Difficulty !== null) {\n return (\n \n \n \n \n \n \n \n \n \n \n );\n } else {\n return (\n \n No rating data found\n \n );\n }\n } else {\n return (\n \n No rating data found\n \n );\n }\n };\n\n // button\n\n render() {\n return (\n \n \n User Mood\n \n \n \n {this.loadingClients()}\n \n \n {this.renderChart()}\n \n \n \n );\n }\n}\n\nconst mapStateToProps = (state) => {\n return {\n users: state.userReducer.users,\n selectedUser: state.userReducer.selectedUser,\n userChartData: state.userRadarPlotReducer.userChartData,\n dateSelect: state.userRadarPlotReducer.dateSelect,\n };\n};\n\nexport default connect(mapStateToProps, { getUsersByOrg, getRadarPlotData })(\n UserFeedbackGraph\n);\n","import React from \"react\";\nimport Button from \"@material-ui/core/Button\";\nimport ExitToAppIcon from \"@material-ui/icons/ExitToApp\";\nimport Modal from \"@material-ui/core/Modal\";\nimport Backdrop from \"@material-ui/core/Backdrop\";\nimport Fade from \"@material-ui/core/Fade\";\n\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport { useHistory } from \"react-router-dom\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { toggleLogoutModal } from \"../../actions\";\n\nconst useStyles = makeStyles((theme) => ({\n button: {\n margin: theme.spacing(1),\n color: \"#000 \",\n \"&:hover\": {\n color: \"#f00\",\n // background: \"#f00\"\n },\n },\n modal: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n paper: {\n backgroundColor: theme.palette.background.paper,\n border: \"2px soild #000\",\n boxShadow: theme.shadows[5],\n padding: theme.spacing(2, 4, 3),\n },\n drawerButton: {\n width: \"100%\",\n },\n}));\n\nexport default function LogoutButton(props) {\n const classes = useStyles();\n let history = useHistory();\n const open = useSelector((state) => state.appbarReducer.logoutModalOpen);\n const users = useSelector((state) => state.userReducer.users);\n const dispatch = useDispatch();\n const handleOpen = () => dispatch(toggleLogoutModal(true));\n const handleClose = () => dispatch(toggleLogoutModal(false));\n\n function goToLogin() {\n history.push(\"/\");\n }\n\n let canLogin = true;\n if (Array.isArray(users)) {\n if (\n users.filter(function (e) {\n return e.can_login === false;\n }).length > 0\n ) {\n // if we find any users that are logged in, the toggle with logout all users.\n canLogin = false;\n }\n }\n\n const logoutComponent = () => {\n return (\n }\n onClick={() => {\n dispatch(props.logoutUser());\n goToLogin();\n }}\n >\n Logout\n \n );\n };\n\n const logoutButtonStyle = () => {\n if (props.inDrawer) {\n return (\n }\n onClick={() => {\n if (canLogin === false) {\n dispatch(props.logoutUser());\n goToLogin();\n } else {\n handleOpen();\n }\n }}\n >\n );\n } else {\n return (\n }\n onClick={() => {\n if (canLogin === false) {\n dispatch(props.logoutUser());\n goToLogin();\n } else {\n handleOpen();\n }\n }}\n >\n Logout\n \n );\n }\n };\n\n return (\n
\n {logoutButtonStyle()}\n \n \n
\n

Finished? Toggle off.

\n

\n Leaving a user's login status switch on can allow them access\n while you are not logged in.\n

\n {logoutComponent()}\n
\n
\n \n
\n );\n}\n","import React, { useEffect } from \"react\";\n\nimport LogoutButton from \"./LogoutButton.js\";\nimport { Link } from \"react-router-dom\";\nimport { makeStyles, useTheme } from \"@material-ui/core/styles\";\n\nimport logo from \"../../assets/images/neurofit-logo.svg\";\n\n//components\nimport {\n Button,\n Typography,\n Toolbar,\n AppBar,\n InputBase,\n IconButton,\n Paper,\n InputAdornment,\n Grid,\n Hidden,\n Divider,\n Tooltip,\n} from \"@material-ui/core\";\n\nimport List from \"@material-ui/core/List\";\nimport ListItem from \"@material-ui/core/ListItem\";\nimport ListItemIcon from \"@material-ui/core/ListItemIcon\";\nimport ListItemText from \"@material-ui/core/ListItemText\";\nimport MenuItem from \"@material-ui/core/MenuItem\";\nimport Menu from \"@material-ui/core/Menu\";\nimport AccountCircle from \"@material-ui/icons/AccountCircle\";\nimport ExitToAppIcon from \"@material-ui/icons/ExitToApp\";\nimport EmailIcon from \"@material-ui/icons/Email\";\nimport MaterialLink from \"@material-ui/core/Link\";\nimport { spacing } from \"@material-ui/system\";\n\nimport MenuIcon from \"@material-ui/icons/Menu\";\nimport VpnKeyIcon from \"@material-ui/icons/VpnKey\";\nimport AccountBoxIcon from \"@material-ui/icons/AccountBox\";\nimport HomeWorkIcon from \"@material-ui/icons/HomeWork\";\nimport ReceiptIcon from \"@material-ui/icons/Receipt\";\nimport TimelineIcon from \"@material-ui/icons/Timeline\";\nimport FeedbackIcon from \"@material-ui/icons/Feedback\";\nimport ScheduleIcon from \"@material-ui/icons/Schedule\";\nimport SearchIcon from \"@material-ui/icons/Search\";\n\nimport { useHistory } from \"react-router-dom\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { toggleDrawer, activeLinkChanged } from \"../../actions\";\nimport PermissionsService from \"../../lib/PermissionsSystem.js\";\nimport \"./AppBar.scss\";\n\n//neurofit logo\n\n// const drawerWidth = 240;\nconst drawerWidth = 288;\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n // flexGrow: 1,\n display: \"flex\",\n },\n title: {\n flexGrow: 1,\n },\n navLink: {\n color: \"#ffffff\",\n textDecoration: \"none\",\n fontSize: \"18px\",\n },\n navLinkIcon: {\n marginRight: 0,\n marginLeft: \"auto\",\n paddingLeft: \"1em\",\n },\n drawerNavLink: {\n color: \"#222\",\n textDecoration: \"none\",\n borderBottom: 1,\n fontSize: \"24px\",\n },\n list: {\n width: 250,\n },\n fullList: {\n width: \"auto\",\n },\n logoutButton: {\n margin: 0,\n width: \"100%\",\n },\n feedbackButton: {\n width: \"100%\",\n height: \"48px\",\n textDecoration: \"none\",\n },\n drawer: {\n [theme.breakpoints.up(\"sm\")]: {\n width: drawerWidth,\n flexShrink: 0,\n },\n },\n appBar: {\n [theme.breakpoints.up(\"sm\")]: {\n paddingLeft: \"17.5%\",\n },\n },\n menuButton: {\n marginRight: theme.spacing(2),\n [theme.breakpoints.up(\"md\")]: {\n display: \"none\",\n },\n },\n // necessary for content to be below app bar\n toolbar: theme.mixins.toolbar,\n drawerPaper: {\n width: drawerWidth,\n },\n content: {\n flexGrow: 1,\n padding: theme.spacing(3),\n },\n brand: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n width: \"100%\",\n \"& img\": {\n width: \"40px\",\n },\n },\n active: {\n borderBottom: \"2px solid #333437\",\n },\n}));\n\n// MainLinks -- this renders the logout component\n// checks if the user is authenticated\n\nconst renderMainLinks = (props, classes, anchorEl, setAnchorEl, history) => {\n const open = Boolean(anchorEl);\n\n const handleMenu = (event) => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleClose = () => {\n setAnchorEl(null);\n };\n\n // if the user is authenticated, logout link renders\n if (props.isAuthenticated) {\n let user = PermissionsService.GetUser();\n return (\n
\n {user ? `Hello ${user.first_name}` : \"\"}\n \n \n \n \n {\n props.logoutUser(e);\n history.push(\"/\");\n }}\n >\n Logout\n \n \n \n \n \n \n Contact Neurofit\n \n \n \n \n \n \n
\n );\n }\n};\n\nfunction renderDrawerLinks(props, classes, handleDrawerToggle) {\n return (\n
\n \n \n Manage Users\n \n \n Session Schedule\n \n \n Billing Info\n \n {props.privilege === 1 && (\n \n \n Manage Organizations\n \n {/* \n \n \n \n \n \n \n \n */}\n \n )}\n {/* */}\n \n \n \n \n
\n );\n}\n\nexport default function AppBarr(props) {\n const activePath = useSelector((state) => state.appbarReducer.activePath);\n const classes = useStyles();\n let history = useHistory();\n const open = useSelector((state) => state.appbarReducer.drawerModalOpen);\n\n useEffect(() => {\n handleActiveLinkChanged(history.location.pathname);\n const listener = history.listen((location, action) => {\n handleActiveLinkChanged(location.pathname);\n });\n return () => {\n listener();\n };\n }, []);\n\n const { window } = props;\n\n const dispatch = useDispatch();\n const handleDrawerOpen = () => dispatch(toggleDrawer(true));\n const handleDrawerClose = () => dispatch(toggleDrawer(false));\n const handleActiveLinkChanged = (path) => dispatch(activeLinkChanged(path));\n const [mobileOpen, setMobileOpen] = React.useState(false);\n\n const handleDrawerToggle = () => {\n setMobileOpen(!mobileOpen);\n };\n\n function forceCloseOnRouteChange() {\n history.listen((location, action) => {\n if (action === \"PUSH\") {\n handleDrawerClose();\n }\n });\n }\n\n const [anchorEl, setAnchorEl] = React.useState(null);\n const MainLinks = renderMainLinks(\n props,\n classes,\n anchorEl,\n setAnchorEl,\n history\n );\n const drawer = renderDrawerLinks(props, classes, handleDrawerToggle);\n const container =\n window !== undefined ? () => window().document.body : undefined;\n const theme = useTheme();\n\n return (\n
\n \n \n \n \n \n {(activePath === \"/patients\" || activePath === \"/practitioners\") &&\n {\n /*
\n \n \n Patients & Clients\n \n\n \n \n \n Practitioners\n \n \n
*/\n }}\n
\n {MainLinks}\n
\n
{mobileOpen && drawer}
\n
\n
\n );\n}\n","import React from \"react\";\nimport {\n Button,\n Grid,\n Checkbox,\n FormControl,\n FormControlLabel,\n FormGroup,\n FormLabel,\n Input,\n InputLabel,\n MenuItem,\n Select,\n TextField,\n Typography,\n} from \"@material-ui/core\";\nimport { connect } from \"react-redux\";\nimport AdminActions from \"../../../actions/AdminActions\";\n\nclass AddPermissionForm extends React.Component {\n constructor(props) {\n super(props);\n\n this.state = {\n name: \"\",\n privilege: false,\n parent_id: null,\n description: \"\",\n };\n\n this.handleAddPermission = this.handleAddPermission.bind(this);\n }\n\n async handleAddPermission() {\n if (window.confirm(\"Are you sure you wish to add this permission?\")) {\n let result = await this.props.dispatch(\n this.props.CreatePermission({\n name: this.state.name,\n privilege: this.state.privilege ? 1 : 0,\n parent_id:\n this.state.parent_id === \"null\" ? null : this.state.parent_id,\n description: this.state.description,\n })\n );\n\n if (result.status === 200) {\n this.setState({\n name: \"\",\n privilege: false,\n parent_id: null,\n description: \"\",\n });\n }\n }\n }\n\n render() {\n return (\n
\n \n \n Add Permission\n \n \n \n Name\n {\n this.setState({\n ...this.state,\n name: e.target.value,\n });\n }}\n />\n \n \n \n {\n this.setState({\n ...this.state,\n privilege: e.target.value,\n });\n }}\n fullWidth={true}\n />\n }\n label=\"Requires Privilege?\"\n labelPlacement=\"end\"\n />\n \n \n \n Description\n {\n this.setState({\n ...this.state,\n description: e.target.value,\n });\n }}\n />\n \n \n \n \n \n Parent Permission\n \n \n this.setState({ ...this.state, menuAnchorTarget: null })\n }\n displayEmpty\n value={this.state.parent_id || \"null\"}\n onChange={(e) =>\n this.setState({ ...this.state, parent_id: e.target.value })\n }\n fullWidth={true}\n >\n \n None\n \n {this.props.permissions.map((x) => {\n return (\n \n {x.name}\n \n );\n })}\n \n \n \n \n \n Add\n \n \n \n
\n );\n }\n}\n\nconst mapStateToProps = (state) => {\n return {\n permissions: state.permissionsReducer.permissions,\n hasFetchedPerms: state.permissionsReducer.hasFetchedPerms,\n };\n};\n\nexport default connect(mapStateToProps, (dispatch) => {\n return {\n GetPermissionsList: AdminActions.GetPermissionsList,\n GetRoleList: AdminActions.GetRoleList,\n CreatePermission: AdminActions.CreatePermission,\n dispatch,\n };\n})(AddPermissionForm);\n","import { Grid } from \"@material-ui/core\";\nimport React from \"react\";\nimport { connect } from \"react-redux\";\n\nclass PermissionDetail extends React.Component {\n constructor(props) {\n super(props);\n }\n\n render() {\n const parent_id = this.props.permission?.parent_id;\n const perm = this.props.permission;\n\n return (\n \n \n \n Name: {perm?.name}\n \n \n Parent:\n {parent_id ? (\n \n {this.props.permissions.find((x) => x.id === parent_id)?.name ||\n \"Not Found\"}\n \n ) : (\n \n )}\n \n \n \n \n Description: {perm?.description}\n \n \n Requires Privileged Account? {perm?.description}\n \n \n \n );\n }\n}\n\nconst mapStateToProps = (state) => {\n return {\n permissions: state.permissionsReducer.permissions,\n hasFetchedPerms: state.permissionsReducer.hasFetchedPerms,\n };\n};\n\nexport default connect(mapStateToProps)(PermissionDetail);\n","import React, { Component } from \"react\";\n\nimport Container from \"@material-ui/core/Container\";\nimport OrganizationsList from \"./OrganizationsList\";\nimport AddOrganizationForm from \"./AddOrganizationForm\";\nimport LoadingSpinner from \"../sharedComponents/LoadingSpinner\";\nimport Switch from \"@material-ui/core/Switch\";\nimport Grid from \"@material-ui/core/Grid\";\n\nimport { connect } from \"react-redux\";\nimport AdminActions from \"../../actions/AdminActions\";\nimport {\n Checkbox,\n Button,\n FormControl,\n FormControlLabel,\n FormGroup,\n FormLabel,\n Input,\n InputLabel,\n MenuItem,\n Select,\n TextField,\n Typography,\n} from \"@material-ui/core\";\n\nimport ActiveUsersChart from \"./ActiveUsersChart\";\nimport DateRangePickers from \"../sharedComponents/DateRangePickers\";\nimport moment from \"moment\";\n\nimport store from \"../../store\";\nimport AlignedLabel from \"../sharedComponents/AlignedLabel\";\n\nimport AddPermissionForm from \"./permissions/AddPermForm\";\nimport PermissionsDetail from \"./permissions/PermissionsDetail\";\nimport MaterialTable from \"material-table\";\n\nclass PermissionsPage extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n add_perm: {\n name: \"\",\n privilege: false,\n parent_id: null,\n },\n };\n }\n\n componentDidMount() {\n AdminActions.GetPermissionsList()(this.props.dispatch);\n AdminActions.GetRoleList()(this.props.dispatch);\n }\n\n render() {\n const permissions_grid_data = {\n columns: [\n { field: \"name\", title: \"Name\", editable: \"onAdd\" },\n { field: \"description\", title: \"Description\" },\n {\n field: \"privilege_req\",\n title: \"Privilege\",\n render: (row) => {\n return 0} disabled />;\n },\n editComponent: (props) => (\n 0}\n onChange={(e) => {\n props.onChange(e.target.checked ? 1 : 0);\n }}\n />\n ),\n },\n { field: \"parent_permission\", title: \"Parent\" },\n ],\n options: {\n search: true,\n headerStyle: {\n textAlign: \"left\",\n minWidth: \"100px\",\n position: \"sticky\",\n top: 0,\n backgroundColor: \"#D0EEFB\",\n color: \"#555\",\n },\n paging: true,\n pageSize: 10,\n emptyRowsWhenPaging: false,\n pageSizeOptions: [10, 25, 50, 100],\n tableLayout: \"auto\",\n },\n };\n\n const permissions_editing_data = {\n onRowUpdate: (newData, oldData) => {\n return AdminActions.UpdatePermission({\n id: oldData.id,\n privilege_req: newData.privilege_req,\n description: newData.description,\n parent_id: newData.parent_id,\n })(this.props.dispatch);\n },\n };\n\n const permissions = this.props.hasFetchedPerms ? (\n \n ) : (\n \n );\n\n const roles = this.props.hasFetchedRoles ? (\n this.props.roles.map((role) => {\n return (\n \n \n {role.name}\n \n {role.permissions.map((x) => {\n return (\n \n {x.name}\n \n );\n })}\n \n );\n })\n ) : (\n \n );\n\n return (\n \n \n \n \n \n
\n \n \n Found {this.props.permission_count} permissions\n \n {permissions}\n
{this.props.hasFetchedPerms ? \"Y\" : \"N\"}
\n {roles}\n
\n \n
\n );\n }\n}\n\nconst mapStateToProps = (state) => {\n return {\n permissions: state.permissionsReducer.permissions,\n hasFetchedPerms: state.permissionsReducer.hasFetchedPerms,\n roles: state.permissionsReducer.roles,\n hasFetchedRoles: state.permissionsReducer.hasFetchedRoles,\n permission_count: state.permissionsReducer.permission_count,\n };\n};\n\nexport default connect(mapStateToProps, (dispatch) => {\n return {\n GetPermissionsList: AdminActions.GetPermissionsList,\n GetRoleList: AdminActions.GetRoleList,\n UpdatePermission: AdminActions.UpdatePermission,\n dispatch,\n };\n})(PermissionsPage);\n","import React, { Component } from \"react\";\n\nimport Container from \"@material-ui/core/Container\";\nimport OrganizationsList from \"./OrganizationsList\";\nimport AddOrganizationForm from \"./AddOrganizationForm\";\nimport LoadingSpinner from \"../sharedComponents/LoadingSpinner\";\nimport Switch from \"@material-ui/core/Switch\";\nimport Grid from \"@material-ui/core/Grid\";\n\nimport { connect } from \"react-redux\";\nimport AdminActions from \"../../actions/AdminActions\";\nimport {\n Checkbox,\n Button,\n FormControl,\n FormControlLabel,\n FormGroup,\n FormLabel,\n Input,\n InputLabel,\n MenuItem,\n Select,\n TextField,\n Typography,\n Accordion,\n AccordionSummary,\n AccordionDetails,\n TableContainer,\n Table,\n TableHead,\n TableRow,\n TableCell,\n Paper,\n TableBody,\n IconButton,\n Box,\n Collapse,\n TablePagination,\n Tooltip,\n} from \"@material-ui/core\";\n\nimport ActiveUsersChart from \"./ActiveUsersChart\";\nimport DateRangePickers from \"../sharedComponents/DateRangePickers\";\nimport moment from \"moment\";\n\nimport store from \"../../store\";\nimport AlignedLabel from \"../sharedComponents/AlignedLabel\";\n\nimport AddPermissionForm from \"./permissions/AddPermForm\";\nimport PermissionsDetail from \"./permissions/PermissionsDetail\";\nimport MaterialTable from \"material-table\";\nimport {\n CloudDownload,\n ExpandMore,\n KeyboardArrowDown,\n KeyboardArrowUp,\n MailTwoTone,\n Refresh,\n} from \"@material-ui/icons\";\nimport { Utility } from \"../../lib/Utility\";\n\nimport * as queryString from \"query-string\";\n\nclass DeepDataDive extends Component {\n constructor(props) {\n super(props);\n\n let query = queryString.parse(props.location.search);\n this.state = {\n selected_level_id: null,\n selected_level_version: null,\n available_levels: [],\n template_data_tables: {},\n table_refs: {},\n filter_org_id: query.org_id,\n };\n\n this.composeDataTables = this.composeDataTables.bind(this);\n this.renderDataTable = this.renderDataTable.bind(this);\n this.renderMetaTemplateRow = this.renderMetaTemplateRow.bind(this);\n this.setTemplateOpen = this.setTemplateOpen.bind(this);\n this.exportData = this.exportData.bind(this);\n }\n\n componentDidMount() {\n AdminActions.GetAvailableLevelVersions({\n org_id: this.state.filter_org_id,\n })(this.props.dispatch).then((res) => {\n console.log(\"metatemplates:\");\n console.log(res);\n this.setState({\n ...this.state,\n available_levels: res.levels || [],\n is_template_expanded: {},\n });\n this.composeDataTables();\n });\n\n if (this.state.filter_org_id !== undefined) {\n AdminActions.GetOrganization({ org_id: this.state.filter_org_id })(\n this.props.dispatch\n ).then((res) => {\n this.setState({\n ...this.state,\n filter_org_name: res.name,\n });\n });\n }\n }\n\n async exportData(level, template) {\n let filename = level.name + \".csv\";\n\n // Fetch all sessions so we have the most up to date data\n let rows = await AdminActions.GetSessions({\n level_id: template.level_id,\n level_version: template.level_version,\n org_id: this.state.filter_org_id,\n })(this.props.dispatch).then((result) => {\n return result.results;\n });\n\n // Handles processing a single record\n var processRow = function (row) {\n var finalVal = \"\";\n // Iterate over all fields of the blob and add them\n for (let key of Object.keys(row)) {\n // Use JSON stringify\n let innerValue = JSON.stringify(row[key] || \"undefined\");\n // Replace single \" with \"\"\n var result = innerValue.replace(/\"/g, '\"\"');\n // Replace If there are special characters in the value, we need to escape the whole cell\n if (result.search(/(\"|,|\\n)/g) >= 0) result = '\"' + result + '\"';\n // Append cell to results\n finalVal += result + \",\";\n }\n // Newline to end row\n return finalVal + \"\\n\";\n };\n\n // Start compositing the CSV\n var csvFile = \"\";\n\n // Add all headers for fields\n for (let key of Object.keys(rows[0])) {\n csvFile += key + \",\";\n }\n // Next row\n csvFile += \"\\n\";\n\n // Iterate over all data and add to CSV\n for (var i = 0; i < rows.length; i++) {\n csvFile += processRow(rows[i]);\n }\n\n // https://stackoverflow.com/questions/14964035/how-to-export-javascript-array-info-to-csv-on-client-side\n\n // Generate the blob to be downloaded\n var blob = new Blob([csvFile], { type: \"text/csv;charset=utf-8;\" });\n // If someones is using IE, god save their soul\n if (navigator.msSaveBlob) {\n // IE 10+\n navigator.msSaveBlob(blob, filename);\n }\n // Using a real browser\n else {\n // Create a temp element for downloading the file\n var link = document.createElement(\"a\");\n if (link.download !== undefined) {\n // feature detection\n // Browsers that support HTML5 download attribute\n var url = URL.createObjectURL(blob);\n link.setAttribute(\"href\", url);\n link.setAttribute(\"download\", filename);\n link.style.visibility = \"hidden\";\n // We add the hidden link, click it, then remove it, lol\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n }\n }\n }\n\n composeDataTables() {\n let tempState = this.state;\n for (let level of tempState.available_levels) {\n for (let template of level.templates) {\n let columns = [];\n for (let key of Object.keys(template.fields.RootFields)) {\n columns.push({\n field: key,\n title: key,\n render: (data) => {\n return
{JSON.stringify(data[key])}
;\n },\n });\n }\n tempState.table_refs[template.id] = React.createRef();\n console.log(columns);\n let tableRef = tempState.table_refs[template.id];\n const tableSettings = {\n columns,\n tableRef,\n options: {\n search: true,\n headerStyle: {\n textAlign: \"left\",\n minWidth: \"100px\",\n position: \"sticky\",\n top: 0,\n backgroundColor: \"#D0EEFB\",\n color: \"#555\",\n },\n paging: true,\n pageSize: 10,\n emptyRowsWhenPaging: false,\n pageSizeOptions: [10, 25, 50, 100],\n tableLayout: \"auto\",\n },\n data: async (query) => {\n return new Promise((resolve, reject) => {\n AdminActions.GetSessions({\n level_id: template.level_id,\n level_version: template.level_version,\n limit: query.pageSize,\n offset: query.page * query.pageSize,\n org_id: this.state.filter_org_id,\n })(this.props.dispatch)\n .then((result) => {\n console.log(result);\n let data = {\n data: result.results,\n page: query.page,\n totalCount: result.total_count,\n };\n console.log(data);\n resolve(data);\n })\n .catch((err) => reject(err));\n });\n },\n components: {\n Pagination: (props) => {\n return (\n \n \n \n \n \n \n \n \n tableRef.current &&\n tableRef.current.onQueryChange()\n }\n />\n \n \n \n \n this.exportData(level, template)}\n />\n \n \n \n \n \n \n );\n },\n },\n actions: [\n {\n icon: \"refresh\",\n tooltip: \"Refresh Data\",\n isFreeAction: true,\n onClick: () =>\n tableRef.current && tableRef.current.onQueryChange(),\n },\n ],\n };\n tempState.template_data_tables[template.id] = tableSettings;\n }\n }\n this.setState(tempState);\n }\n\n renderDataTable(template, sessionData) {\n const template_chart_data = this.state.template_data_tables[template.id];\n return template_chart_data !== undefined ? (\n \n ) : (\n \n );\n }\n\n setTemplateOpen(id, isOpen) {\n let state = this.state;\n let newState = Object.assign({}, state.is_template_expanded);\n for (let key in Object.keys(newState)) {\n newState[key] = false;\n }\n newState[id] = isOpen;\n state.is_template_expanded = newState;\n this.setState(state);\n }\n\n renderMetaTemplateRow(template) {\n let open = this.state.is_template_expanded[template.id] || false;\n return (\n \n \n \n this.setTemplateOpen(template.id, !open)}\n >\n {open ? : }\n \n \n {template.level_version}\n {template.dependant_count}\n \n \n \n \n {this.renderDataTable(template)}\n \n \n \n \n );\n }\n\n render() {\n const levels =\n this.state.available_levels.length > 0 ? (\n this.state.available_levels.map((level) => {\n return (\n \n }\n aria-controls={`${level.name}-content`}\n id={`${level.name}-header`}\n >\n {level.name}\n \n \n {level.templates.map((template) => {\n return (\n \n \n \n \n \n Template ID\n Session Count\n \n \n \n {this.renderMetaTemplateRow(template)}\n \n
\n
\n );\n })}\n
\n
\n );\n })\n ) : (\n \n );\n\n return (\n //\n \n \n Found {this.state.available_levels.length} Levels\n \n {this.state.filter_org_id !== undefined &&\n this.state.filter_org_name && (\n \n Showing Data For: {this.state.filter_org_name}\n \n )}\n {levels}\n \n //\n );\n }\n}\n\nconst mapStateToProps = (state) => {\n return {\n permissions: state.permissionsReducer.permissions,\n hasFetchedPerms: state.permissionsReducer.hasFetchedPerms,\n roles: state.permissionsReducer.roles,\n hasFetchedRoles: state.permissionsReducer.hasFetchedRoles,\n permission_count: state.permissionsReducer.permission_count,\n };\n};\n\nexport default connect(mapStateToProps, (dispatch) => {\n return {\n GetAvailableLevelVersions: AdminActions.GetAvailableLevelVersions,\n GetSessions: AdminActions.GetSessions,\n dispatch,\n };\n})(DeepDataDive);\n","export const VALUE = \"value\";\nexport const ERROR = \"error\";\nexport const REQUIRED_FIELD_ERROR = \"Field can't be empty\";\n\nfunction is_bool(value) {\n return typeof value === \"boolean\";\n}\n\n/**\n * Determines a value if it's an object\n *\n * @param {object} value\n */\nexport function is_object(value) {\n return typeof value === \"object\" && value !== null;\n}\n\n/**\n *\n * @param {string} value\n * @param {boolean} isRequired\n */\nexport function is_required(value, isRequired) {\n if (!value && isRequired) return REQUIRED_FIELD_ERROR;\n return \"\";\n}\n\nexport function get_prop_values(stateSchema, prop) {\n return Object.keys(stateSchema).reduce((field, key) => {\n field[key] = is_bool(prop) ? prop : stateSchema[key][prop];\n return field;\n }, {});\n}\n","import { useState, useEffect, useCallback } from \"react\";\nimport { get_prop_values, is_object, is_required, VALUE, ERROR } from \"./utils\";\n\n/**\n * useForm hooks to handle your validation in your forms\n *\n * @param {object} stateSchema stateSchema.\n * @param {object} stateValidatorSchema stateSchemaValidation to validate your forms in react.\n * @param {function} submitFormCallback function to be execute during form submission.\n */\nfunction useForm(\n stateSchema = {},\n stateValidatorSchema = {},\n submitFormCallback\n) {\n const [state, setStateSchema] = useState(stateSchema);\n\n const [values, setValues] = useState(get_prop_values(state, VALUE));\n const [errors, setErrors] = useState(get_prop_values(state, ERROR));\n const [dirty, setDirty] = useState(get_prop_values(state, false));\n\n const [disable, setDisable] = useState(true);\n const [isDirty, setIsDirty] = useState(false);\n\n // Get a local copy of stateSchema\n useEffect(() => {\n setStateSchema(stateSchema);\n setDisable(true); // Disable button in initial render.\n setInitialErrorState();\n }, []); // eslint-disable-line\n\n // Set a brand new field values and errors\n // If stateSchema changes\n useEffect(() => {\n const values = get_prop_values(state, VALUE);\n setValues(values);\n setErrors(\n Object.keys(values).reduce((accu, curr) => {\n accu[curr] = validateField(curr, values[curr]);\n return accu;\n }, {})\n );\n }, [state]); // eslint-disable-line\n\n // For every changed in our state this will be fired\n // To be able to disable the button\n useEffect(() => {\n if (isDirty) {\n setDisable(validateErrorState());\n }\n }, [errors, isDirty]); // eslint-disable-line\n\n // Set a value of a specific field\n const setFieldValue = ({ name, value }) => {\n setValues((prevState) => ({ ...prevState, [name]: value }));\n setDirty((prevState) => ({ ...prevState, [name]: true }));\n };\n\n // Set an error of a specific field\n const setFieldError = ({ name, error }) =>\n setErrors((prevState) => ({ ...prevState, [name]: error }));\n\n // Validate fields in forms\n const validateField = useCallback(\n (name, value) => {\n const validator = stateValidatorSchema;\n // Making sure that stateValidatorSchema name is same in\n // stateSchema\n if (!validator[name]) return;\n\n const field = validator[name];\n\n let error = \"\";\n error = is_required(value, field.required);\n\n if (is_object(field[\"validator\"]) && error === \"\") {\n const validateFieldByCallback = field[\"validator\"];\n\n // Test the function callback if the value is meet the criteria\n if (!validateFieldByCallback[\"func\"](value, values)) {\n error = validateFieldByCallback[\"error\"];\n }\n }\n\n return error;\n },\n [stateValidatorSchema, values]\n );\n\n // Set Initial Error State\n // When hooks was first rendered...\n const setInitialErrorState = useCallback(() => {\n Object.keys(errors).map((name) =>\n setFieldError({ name, error: validateField(name, values[name]) })\n );\n }, [errors, values, validateField]);\n\n // Used to disable submit button if there's a value in errors\n // or the required field in state has no value.\n // Wrapped in useCallback to cached the function to avoid intensive memory leaked\n // in every re-render in component\n const validateErrorState = useCallback(\n () => Object.values(errors).some((error) => error),\n [errors]\n );\n\n // Use this callback function to safely submit the form\n // without any errors in state...\n const handleOnSubmit = useCallback(\n (event) => {\n event.preventDefault();\n\n // Making sure that there's no error in the state\n // before calling the submit callback function\n if (!validateErrorState()) {\n submitFormCallback(values);\n }\n },\n [validateErrorState, submitFormCallback, values]\n );\n\n // Event handler for handling changes in input.\n const handleOnChange = useCallback(\n (event) => {\n setIsDirty(true);\n\n const name = event.target.name;\n const value = event.target.value;\n\n const error = validateField(name, value);\n\n setFieldValue({ name, value });\n setFieldError({ name, error });\n },\n [validateField]\n );\n\n return {\n dirty,\n values,\n errors,\n disable,\n setStateSchema,\n setFieldValue,\n setFieldError,\n handleOnChange,\n handleOnSubmit,\n validateErrorState,\n };\n}\n\nexport default useForm;\n","import React, { useState, useEffect } from \"react\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport useForm from \"./useForm\";\nimport {\n Typography,\n Button,\n Grid,\n Checkbox,\n TextField,\n OutlinedInput,\n FormControl,\n InputLabel,\n InputAdornment,\n IconButton,\n Select,\n MenuItem,\n} from \"@material-ui/core\";\nimport PhoneInput from \"react-phone-number-input\";\nimport \"react-phone-number-input/style.css\";\n\nimport Visibility from \"@material-ui/icons/Visibility\";\nimport VisibilityOff from \"@material-ui/icons/VisibilityOff\";\nimport SendSharpIcon from \"@material-ui/icons/SendSharp\";\nimport BlockSharpIcon from \"@material-ui/icons/BlockSharp\";\nimport Radio from \"@material-ui/core/Radio\";\nimport RadioGroup from \"@material-ui/core/RadioGroup\";\nimport FormHelperText from \"@material-ui/core/FormHelperText\";\nimport FormControlLabel from \"@material-ui/core/FormControlLabel\";\nimport FormLabel from \"@material-ui/core/FormLabel\";\n\nconst useStyles = makeStyles({\n mainContainer: {\n display: \"grid\",\n justifyContent: \"center\",\n position: \"relative\",\n zIndex: 5,\n },\n\n formContainer: {\n position: \"relative\",\n width: \"28.125rem\",\n height: \"auto\",\n padding: \"2rem\",\n },\n inputField: {\n width: \"100%\",\n marginBottom: \"1rem\",\n },\n\n btn: {\n width: \"100%\",\n height: \"3rem\",\n background: \"red\",\n color: \"#fff\",\n \"&:hover\": {\n color: \"red\",\n opacity: \".7\",\n transition: \".3s eases-in-out \",\n },\n },\n disabledBtn: {\n background: \"rbga(0,0,0, 0.38)\",\n height: \"3rem\",\n width: \"100%\",\n },\n});\n\nconst StepOne = ({\n activeStep,\n steps,\n callbackHandleNext,\n checkoutData,\n callbackSetCheckoutData,\n}) => {\n // DEFINE THE STATE SCHEMA\n const stateSchema = {\n firstName: { value: \"\", error: \"\" },\n lastName: { value: \"\", error: \"\" },\n email: { value: \"\", error: \"\" },\n gender: { value: \"\", error: \"\" },\n pronouns: { value: \"\", error: \"\" },\n password: { value: \"\", error: \"\" },\n confirmPassword: { value: \"\", error: \"\" },\n };\n\n const stateValidatorSchema = {\n firstName: {\n required: true,\n validator: {\n func: (value) =>\n /^([A-Za-z][A-Za-z'-])+([A-Za-z][A-Za-z'-]+)*/.test(value),\n error: \"First Name must be more then 1 character\",\n },\n },\n lastName: {\n required: true,\n validator: {\n func: (value) =>\n /^([A-Za-z][A-Za-z'-])+([A-Za-z][A-Za-z'-]+)*/.test(value),\n error: \"Last Name must be more then 1 character\",\n },\n },\n email: {\n required: true,\n validator: {\n func: (value) =>\n /^([a-zA-Z0-9_\\-\\.]+)@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,5})$/.test(\n value\n ),\n error: \"Invalid email format\",\n },\n },\n password: {\n required: true,\n validator: {\n func: (value) =>\n /^(?=.*[A-Za-z])(?=.*[@$!%*#?&])[A-Za-z\\d@$!%*#?&]{6,}$/.test(value),\n error:\n \"Minimum 6 character and at least one speacial character `@,$,!,%,*,#,?,&`\",\n },\n },\n };\n\n const { values, errors, dirty, handleOnChange } = useForm(\n stateSchema,\n stateValidatorSchema\n );\n const [showPasswordValue, setShowPasswordValue] = useState({\n showPassword: false,\n });\n const [showConfirmPasswordValue, setShowConfirmPasswordValue] = useState({\n showConfirmPassword: false,\n });\n\n const handleClickShowPassword = () => {\n setShowPasswordValue({\n showPassword: !showPasswordValue.showPassword,\n });\n };\n\n const handleClickShowConfirmPassword = () => {\n setShowConfirmPasswordValue({\n showConfirmPassword: !showConfirmPasswordValue.showConfirmPassword,\n });\n };\n\n const {\n firstName,\n lastName,\n email,\n gender,\n pronouns,\n password,\n confirmPassword,\n } = values;\n const classes = useStyles();\n const [value, setValue] = useState(\"\");\n\n const handleClick = (e) => {\n console.log(values);\n let newArr = [...checkoutData];\n newArr[0] = values;\n callbackSetCheckoutData(newArr);\n callbackHandleNext();\n };\n\n return (\n
\n \n Sign up with Email\n \n
\n
\n \n {errors.firstName && dirty.firstName && (\n \n {errors.firstName}\n \n )}\n\n \n\n {errors.lastName && dirty.lastName && (\n \n {errors.lastName}\n \n )}\n \n\n \n {errors.email && dirty.email && (\n \n {errors.email}\n \n )}\n\n \n Gender\n \n }\n label=\"Female\"\n />\n } label=\"Male\" />\n }\n label=\"Other\"\n />\n \n \n\n \n Preferred Pronouns\n \n } label=\"He\" />\n } label=\"She\" />\n } label=\"They\" />\n \n \n \n Password\n \n \n {showPasswordValue.showPassword ? (\n \n ) : (\n \n )}\n \n \n }\n />\n\n {errors.password && dirty.password && (\n \n {errors.password}\n \n )}\n \n\n \n Confirm Password\n \n \n {showConfirmPasswordValue.showConfirmPassword ? (\n \n ) : (\n \n )}\n \n \n }\n />\n\n {confirmPassword !== password ? (\n \n Password fo not match.\n \n ) : null}\n \n\n {!firstName ||\n !lastName ||\n !email ||\n !password ||\n !confirmPassword ||\n confirmPassword !== password ? (\n }\n >\n {activeStep === steps.length ? \"Finish\" : \"SIGN UP\"}\n \n ) : (\n }\n >\n {/* {activeStep === steps.length ? \"Finish\" : \"Next\"} */}\n \n )}\n \n
\n
\n );\n};\n\nexport default StepOne;\n","import React from \"react\";\nimport \"./StepTwo.scss\";\nimport ReactTooltip from \"react-tooltip\";\nimport { AiOutlineQuestionCircle } from \"react-icons/ai\";\nimport Switch from \"react-switch\";\n\nconst toggleStyles = {\n isSelected: {\n opacity: \"100%\",\n },\n isNotSelected: {\n opacity: \"20%\",\n },\n};\n\nconst savingsDisplay = {\n isSelected: {\n opacity: \"100%\",\n },\n isNotSelected: {\n opacity: \"0%\",\n },\n};\n\n// hard code the prices for now (visually)\n\nconst StepTwo = ({ callbackHandlePricingClick, toggle, togglePrice }) => {\n return (\n <>\n {/* toggle container */}\n
\n \n Monthly\n \n \n \n Yearly\n \n
\n\n
\n
\n \n \n \n \n \n This plan is suitable for those looking to get started with
\n Neurofit and for small clinics or independent practices.\n
\n
\n

Starter Plan

\n\n
\n

\n 5 users
\n or less\n

\n\n \n

\n $15 USD\n
\n per patient
\n monthly\n

\n \n\n

or

\n\n \n

\n $162 USD\n
\n per patient
\n anually\n

\n \n\n \n 10% savings\n \n
\n\n \n select\n \n
\n\n
\n \n \n \n \n Plan 2 description\n \n

Standard Plan

\n\n
\n

\n 6 to 30
\n users\n

\n\n \n

\n $15 USD\n
\n per patient
\n monthly\n

\n \n\n

or

\n\n \n

\n $126 USD\n
\n per patient
\n anually\n

\n \n\n \n 15% savings\n \n
\n\n \n select\n \n
\n\n
\n \n \n \n \n Plan 3 description\n \n

Premium Plan

\n\n
\n

\n More than
\n 30 users\n

\n\n \n

\n $15 USD\n
\n per patient
\n monthly\n

\n \n\n

or

\n\n \n

\n $105.60 USD\n
\n per patient
\n anually\n

\n \n\n \n 20% savings\n \n
\n\n \n select\n \n
\n
\n \n );\n};\n\nexport default StepTwo;\n","import React, { useState, useEffect } from \"react\";\nimport StepTwo from \"./StepTwo\";\n\nconst StepTwoCont = ({\n checkoutData,\n callbackSetCheckoutData,\n callbackHandleNext,\n}) => {\n const [pricing, setPricing] = useState({\n pricing_id: null,\n desc: \"\",\n price_monthly_usd: 0,\n price_anually_usd: 0,\n });\n\n const [toggle, setToggle] = useState(false);\n\n // if price is monthly/anually\n const togglePrice = (checked) => {\n setToggle(checked);\n };\n\n useEffect(() => {\n console.table(pricing);\n\n let newArr = [...checkoutData]; // copy old data\n newArr[1] = pricing; //replace array index 1 (pricing) with new chosen subscription\n newArr[1].is_yearly = toggle; //if true then set yearly sub\n callbackSetCheckoutData(newArr); //set it\n }, [pricing, toggle]);\n\n // once pricing id is populated => user selected and proceed to next step\n useEffect(() => {\n if (pricing.pricing_id != null) {\n callbackHandleNext();\n }\n }, [pricing.pricing_id]);\n\n // this function is passed as a callback to select which button was selected from the button elements\n const handlePricingClick = (e) => {\n let pid = parseInt(e.target.value);\n switch (pid) {\n case 0:\n setPricing({\n pricing_id: 0,\n title: \"Starter Plan\",\n desc: \"description one\",\n pricing_monthly_usd: 15,\n pricing_anually_usd: 162,\n starting: 1,\n });\n break;\n case 1:\n setPricing({\n pricing_id: 1,\n title: \"Standard Plan\",\n desc: \"description two\",\n pricing_monthly_usd: 12,\n pricing_anually_usd: 126,\n starting: 6,\n });\n break;\n case 2:\n setPricing({\n pricing_id: 2,\n title: \"Standard Plus Plan\",\n desc: \"description three\",\n pricing_monthly_usd: 11,\n pricing_anually_usd: 105.6,\n starting: 31,\n });\n break;\n }\n };\n return (\n \n );\n};\n\nexport default StepTwoCont;\n","export default __webpack_public_path__ + \"static/media/validateInfo.935c0005.bin\";","import React, { useState } from \"react\";\nimport useForm from \"./useCreditForm\";\nimport { Button, Form, Alert, Row, Col } from \"react-bootstrap\";\nimport \"bootstrap/dist/css/bootstrap.min.css\";\nimport \"./StepThree.css\";\nimport \"react-credit-cards/es/styles-compiled.css\";\nimport StripeCheckout from \"react-stripe-checkout\";\n\nconst StepThree = ({ callbackHandleToken, checkoutData }) => {\n // const { handleChange, handleFocus, handleSubmit, values, errors } = useForm();\n\n // billing_when should be a dynamic date when payment succeeds => for now just a plain text\n\n return (\n
\n {/*
{JSON.stringify(checkoutData,null,2)}
*/}\n
\n

First Name: {checkoutData[0].firstName}

\n

Last Name: {checkoutData[0].lastName}

\n

Email: {checkoutData[0].email}

\n {/*

Plan: {checkoutData[1].title}

*/}\n {checkoutData[1].is_yearly ? (\n

\n Thank you! We have confirmed your option of{\" \"}\n {checkoutData[1].title} \n starting at{\" \"}\n \n ${checkoutData[1].pricing_anually_usd * checkoutData[1].starting}\n /year\n \n .
\n Yearly billing suggestion..?\n

\n ) : (\n

\n Thank you! We have confirmed your option of{\" \"}\n {checkoutData[1].title} \n starting at{\" \"}\n \n ${checkoutData[1].pricing_monthly_usd * checkoutData[1].starting}\n /month\n \n .
\n \n Don't worry! You won't be charged until the end of the month.\n \n

\n )}\n
\n\n \n
\n );\n};\n\nexport default StepThree;\n","import React, { useState, useEffect } from \"react\";\nimport StepThree from \"./StepThree\";\n\nconst StepThreeCont = ({ checkoutData, callbackSetCheckoutData }) => {\n const [cardInfo, setCardInfo] = useState({\n cardName: \"\",\n cardNumber: \"\",\n cardType: \"\",\n cardExpiration: \"\",\n cardSecurityCode: \"\",\n cardPostalCode: \"\",\n focus: \"\",\n });\n\n const handleToken = (token, address) => {\n console.log({ token, address });\n };\n\n return (\n \n );\n};\n\nexport default StepThreeCont;\n","import React, { useState, useEffect } from \"react\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport {\n Stepper,\n Step,\n StepLabel,\n Typography,\n Button,\n} from \"@material-ui/core\";\n\n// Component Imports\nimport StepOne from \"./StepOne\";\nimport StepTwoCont from \"./StepTwo/StepTwoCont\";\nimport StepThreeCont from \"./StepThree/StepThreeCont\";\n\nconst useStyles = makeStyles({\n root: {\n width: \"75%\",\n margin: \"0em auto\",\n border: \"1px solid #999\",\n \"& .MuiStepIcon-root.MuiStepIcon-active\": {\n color: \"red\",\n },\n \"& .MuiStepIcon-root.MuiStepIcon-completed\": {\n color: \"red\",\n },\n },\n});\n\nconst Register = ({ checkoutData, callbackSetCheckoutData }) => {\n // REACT HOOKS\n const [activeStep, setActiveStep] = useState(0);\n // steps\n const steps = [\"Sign up\", \"Choose a plan\", \"Checkout\"];\n // material ui style\n const classes = useStyles();\n\n const handleNext = () => {\n console.log(\"next\");\n setActiveStep((prevActiveStep) => prevActiveStep + 1);\n console.log(steps.length);\n };\n\n useEffect(() => {\n console.log(checkoutData);\n }, []);\n\n function getStepsContent(stepIndex) {\n switch (stepIndex) {\n case 0:\n return (\n \n );\n case 1:\n return (\n \n );\n case 2:\n return (\n \n );\n default:\n return \"Unknown Step\";\n }\n }\n\n return (\n
\n \n {steps.map((label) => (\n \n {label}\n \n ))}\n \n\n <>\n {activeStep === steps.length ? (\n \"The Steps completed\"\n ) : (\n <>\n {getStepsContent(activeStep)}\n \n \n )}\n \n
\n );\n};\n\nexport default Register;\n","import React, { useState, useEffect } from \"react\";\nimport Register from \"./Register\";\nimport { loadStripe } from \"@stripe/stripe-js\";\nimport stripe from \"@stripe/react-stripe-js\";\n\n//const stripePromise = require('stripe')('pk_live_51JRiXRBWsdetEdR0RNskAvglxtlJRDrmQbQ2Rop1X3BaWxFUl5YPbUGs9KB4bW7qdwc6QowV00U2dw4mFJO6N48K00FIUERxqB');\n\nconst RegisterContainer = () => {\n // logic should go here\n\n const [checkoutData, setCheckoutData] = useState([\n {\n firstName: \"\",\n lastName: \"\",\n email: \"\",\n dob: \"\",\n gender: \"\",\n pronouns: \"\",\n },\n {\n pricing_id: null,\n title: \"\",\n desc: \"\",\n price_monthly_usd: 0,\n price_anually_usd: 0,\n starting: 0,\n is_yearly: false,\n },\n ]);\n\n // changes in any array\n useEffect(() => {\n console.log(checkoutData);\n }, [checkoutData]);\n\n // only trigger when card form data changes\n useEffect(() => {\n console.log(checkoutData);\n }, [checkoutData[2]]);\n\n /*stripePromise.customers.create({ checkoutData }, (error, customer) => {\n if (error) {\n console.error(error);\n } else {\n console.log(customer);\n }\n }); */\n\n return (\n \n );\n};\n\nexport default RegisterContainer;\n","import React from \"react\";\nimport { connect } from \"react-redux\";\nimport \"./Navbar.scss\";\nimport { Link } from \"react-router-dom\";\n\nimport Logo from \"../../../assets/images/neurofit-logo.svg\";\nimport PermissionsService from \"../../../lib/PermissionsSystem\";\n\nconst Navbar = ({ onSignOutClick , privilege }) => {\n // my parent container is a display flex\n const showSchedule = false;\n return (\n
\n
\n \n \n \n
\n\n
\n \n

Manage Users

\n \n { showSchedule && \n

Session Schedule

\n }\n {/* \n

Session Schedule

\n */}\n \n

Manage Organizations

\n \n { PermissionsService.HasPermission(\"admin.billing.read\") && \n \n

Billing Details

\n \n }\n

\n Sign Out\n

\n
\n
\n );\n};\n\nexport default Navbar;\n","import React, { useState, useEffect } from \"react\";\nimport Navbar from \"./Navbar\";\nimport { useHistory } from \"react-router-dom\";\n\nconst NavbarContainer = ({ isAuthenticated, logoutUser , privilege}) => {\n const history = useHistory();\n\n const onSignOutClick = (e) => {\n logoutUser(e);\n history.push(\"/\");\n };\n if (isAuthenticated) {\n return ;\n }\n return null;\n};\n\nexport default NavbarContainer;\n","import styled from \"styled-components\";\nimport { FaTimes } from \"react-icons/fa\";\nimport { GiHamburgerMenu } from \"react-icons/gi\";\n\nexport const NavbarMobile = styled.div`\n\nposition:fixed;\nz-index: 999;\nwidth: 100%;\nheight 100%;\ndisplay: flex;\nalign-items: center;\njustify-content: center;\ntop: 0;\nleft:0;\ntransition: 0.3s ease-in-out;\nbackground-color: #c4dfef;\ntop:${(props) => (props.isNavbarMobileOpen ? \"0%\" : \"100%\")};\nopacity: ${(props) => (props.isNavbarMobileOpen ? \"100%\" : \"0%\")};\n\n\n @media screen and (min-width: 768px) {\n display: none;\n }\n\n`;\n\nexport const OpenIcon = styled(GiHamburgerMenu)`\n color: black;\n font-size: 2em;\n`;\n\nexport const OpenIconContainer = styled.div`\n position: fixed;\n top: 1.2rem;\n right: 1.5rem;\n background-color: transparent;\n font-size: 1.5rem;\n cursor: pointer;\n outline: none;\n z-index: 998;\n\n @media screen and (min-width: 768px) {\n display: none;\n }\n`;\n\nexport const CloseIcon = styled(FaTimes)`\n color: black;\n`;\n\nexport const Icon = styled.div`\n position: absolute;\n top: 1.2rem;\n right: 1.5rem;\n background-color: transparent;\n font-size: 2rem;\n cursor: pointer;\n outline: none;\n`;\n","import React, { useState, useEffect } from \"react\";\nimport {\n NavbarMobile,\n OpenIcon,\n OpenIconContainer,\n Icon,\n CloseIcon,\n} from \"./NavbarMobileElements\";\nimport { Link, useHistory } from \"react-router-dom\";\nimport \"./NavbarMobile.scss\";\nimport Logo from \"../../../../assets/images/neurofit-logo.svg\";\nimport PermissionsService from \"../../../../lib/PermissionsSystem\";\n\nconst NavbarMobileContainer = ({ logoutUser }) => {\n const [isNavbarMobileOpen, setIsNavbarMobileOpen] = useState(false);\n\n const history = useHistory();\n\n const onSignOutClick = (e) => {\n logoutUser(e);\n history.push(\"/\");\n };\n\n const setToggleOpen = () => {\n setIsNavbarMobileOpen(!isNavbarMobileOpen);\n };\n // hide scrollbar when the mobile navigation is popped out\n useEffect(() => {\n document.body.style.overflow = isNavbarMobileOpen ? \"hidden\" : \"auto\";\n }, [isNavbarMobileOpen]);\n\n return (\n
\n \n \n \n\n \n \n \n \n\n
\n
\n \n \n \n
\n\n \n

Manage Users

\n \n \n

Session Schedule

\n \n \n

Manage Organizations

\n \n {\n PermissionsService.HasPermission(\"admin.billing.read\") && \n \n

Billing Details

\n \n }\n \n

\n Sign Out\n

\n
\n \n
\n );\n};\n\nexport default NavbarMobileContainer;\n","import React, { Component } from \"react\";\n\nexport default function asyncComponent(importComponent) {\n class AsyncComponent extends Component {\n constructor(props) {\n super(props);\n this.state = {\n component: null,\n };\n }\n\n async componentDidMount() {\n const { default: component } = await importComponent();\n\n this.setState({\n component: component,\n });\n }\n\n render() {\n const Component = this.state.component;\n\n return Component ? :
;\n }\n }\n\n return AsyncComponent;\n}\n","import { createTheme } from \"@material-ui/core/styles\"\n\nconst theme = createTheme({\n palette: {\n secondary: {\n main: \"#57B8F1\",\n },\n white: \"rgba(255, 255, 255, 1)\",\n gray: {\n 100: \"rgba(248, 248, 248, 1)\",\n 200: \"rgba(237, 236, 236, 1)\",\n 300: \"rgba(212, 212, 212, 1)\",\n 400: \"rgba(158, 158, 158, 1)\",\n 500: \"rgba(112, 112, 112, 1)\",\n 600: \"rgba(28, 27, 26, 1)\",\n },\n blue: {\n 100: \"rgba(233, 245, 251, 1)\",\n 200: \"rgba(219, 238, 247, 1)\",\n 300: \"rgba(197, 223, 238, 1)\",\n 400: \"rgba(146, 202, 235, 1)\",\n 500: \"rgba(12, 131, 191, 1)\",\n },\n orange: {\n 100: \"rgba(255, 242, 227, 1)\",\n 200: \"rgba(242, 138, 20, 1)\",\n 300: \"rgba(199, 85, 4, 1)\",\n },\n red: {\n 100: \"rgba(255, 240, 240, 1)\",\n 200: \"rgba(218, 3, 3, 1)\",\n },\n green: {\n 100: \"rgba(238, 249, 213, 1)\",\n 200: \"rgba(9, 118, 38, 1)\",\n },\n },\n typography: {\n fontSize: 14,\n fontFamily: [\n \"Roboto\",\n '\"Helvetica Neue\"',\n \"Arial\",\n \"sans-serif\",\n '\"Apple Color Emoji\"',\n '\"Segoe UI Emoji\"',\n '\"Segoe UI Symbol\"',\n ].join(\",\"),\n h1: {\n fontSize: \"2rem\",\n fontWeight: 500,\n },\n h2: {\n fontSize: \"1.5rem\",\n fontWeight: 500,\n }\n },\n})\n\nexport default theme\n","import React, { Component } from \"react\";\nimport { BrowserRouter as Router, Switch, Route } from \"react-router-dom\";\nimport Login from \"./sharedComponents/Login\";\nimport ForgotPassword from \"./sharedComponents/ForgotPassword\";\nimport ResetPassword from \"./sharedComponents/ResetPassword\";\n\nimport Organizations from \"./adminView/Organizations\";\nimport BillingOrganizations from \"./adminView/BillingOrganizations\";\nimport MonthlyView from \"./scheduledSessions/MonthlyView\";\n\nimport Users from \"./organizationView/Users\";\n// import Practitioners from \"./organizationView/Practitioners\";\nimport UserGeneralGraph from \"./dashboards/profile_views/UserProfilePage\";\nimport UserFeedbackGraph from \"./d3Components/UserFeedbackGraph\";\nimport AppBar from \"./sharedComponents/AppBar\";\n\nimport { connect } from \"react-redux\";\nimport { signOut } from \"../actions\";\n\nimport { Debug } from \"../lib\";\n\nimport \"../styles/style.scss\";\nimport UserFile from \"./dashboards/profile_views/UserFile\";\nimport PermissionsPage from \"./adminView/PermissionsPage\";\nimport DeepDataDive from \"./adminView/DeepDataDive\";\nimport ActiveUsersChart from \"./adminView/ActiveUsersChart\";\nimport { MuiThemeProvider, createTheme } from \"@material-ui/core/styles\";\n\nimport PermissionsService from \"../lib/PermissionsSystem\";\n\n\n// Neurofit logo\nimport logo from \"../assets/images/neurofit-logo.svg\";\n\n// will be replaced with a parent component (sub-nav)\nimport BillingInformation from \"./Billing\";\n\n// register component\nimport RegisterContainer from \"./sharedComponents/Register/RegisterContainer\";\n\n// navbar 1.1\nimport NavbarContainer from \"./sharedComponents/Navbar/NavbarContainer\";\nimport NavbarMobileContainer from \"./sharedComponents/Navbar/NavbarMobile\";\n\n// Patient Profile 1.1\n\n// Main scss for App.js\nimport \"./App.scss\";\n\nimport asyncComponent from \"../highOrderComponents/asyncComponent/asyncComponent\";\n\nimport theme from \"./theme\";\n\nconst AsyncPractitionersComponent = asyncComponent(() =>\n import(\"./practitionersManagement/PractitionersManagement\")\n);\nconst AsyncScheduler = asyncComponent(() =>\n import(\"./scheduledSessions/index\")\n);\nconst AsyncPatientDashboard = asyncComponent(() =>\n import(\"./dashboards/PatientDashboard\")\n);\nconst AsyncOrgDashboard = asyncComponent(() =>\n import(\"./dashboards/OrganizationDashboard\")\n);\nconst AsyncPractitionerDashboard = asyncComponent(() =>\n import(\"./dashboards/PractitionerDashboard\")\n);\nconst AsyncError404Page = asyncComponent(() => import(\"./Error/404\"));\n\nconst AsyncBillingInformation = asyncComponent(() => import(\"./Billing\"))\n\nclass App extends Component {\n getPrivilege = async () => {\n parseInt(localStorage.getItem(\"privilege\"), 10);\n };\n\n renderRoutes = () => {\n if (this.props.isAuthenticated && this.props.privilege != undefined) {\n this.getPrivilege();\n if (this.props.privilege === 0) {\n return (\n \n \n {/* */}\n \n \n } />\n }\n />\n }\n />\n }\n />\n {\n PermissionsService.HasPermission(\"admin.billing.read\") && \n \n }\n \n \n {/* Setting the route to the component for the monthly view schedule */}\n \n \n \n \n );\n } else if (this.props.privilege === 1) {\n return (\n \n \n {\n PermissionsService.HasPermission(\"admin.billing.read\") && \n \n }\n }\n />\n }\n />\n {/* } /> */}\n \n \n \n \n \n {/*\n } />*/}\n \n \n \n \n );\n }\n } else {\n return (\n \n
\n \n (\n \n )}\n />\n }\n />\n }\n />\n \n \n \n
\n
\n );\n }\n };\n\n // hides and displays the appbar\n renderAppBar = () => {\n // if the authentication is false, the AppBar hides\n if (!this.props.isAuthenticated) {\n return (\n \n {/*
*/}\n {this.renderRoutes()}\n {/*
*/}\n
\n );\n }\n // else, the AppBar will display\n else {\n // navbar and dynamic components rendered here\n return (\n \n \n \n\n \n\n {/* */}\n
\n
{this.renderRoutes()}
\n
\n
\n );\n }\n };\n\n render() {\n return
{this.renderAppBar()}
;\n }\n}\n\nconst mapStateToProps = (state) => {\n // console.log(state.authReducer);\n return {\n isAuthenticated: state.authReducer.isAuthenticated,\n privilege: state.authReducer.privilege,\n user: state.authReducer.user,\n org: state.authReducer.org,\n };\n};\n\nexport default connect(mapStateToProps, { signOut })(App);\n","export default __webpack_public_path__ + \"static/media/EditPad.67bdd170.svg\";","import React from \"react\"\nimport { Link } from \"react-router-dom\"\nimport { makeStyles } from \"@material-ui/core/styles\"\nimport TableCell from \"@material-ui/core/TableCell\"\nimport TableRow from \"@material-ui/core/TableRow\"\n// Absolute import paths are not working with this configuration & CRA version\nimport EditPadIcon from \"../../../assets/images/EditPad.svg\"\n\nconst useStyles = makeStyles((theme) => ({\n tableRow: {\n // coupled with _variables.scss gray-200\n borderBottom: theme.palette.gray[200],\n },\n wideCell: {\n minWidth: \"150px\",\n },\n styledCell: {\n borderBottom: 0,\n },\n editLink: {\n width: \"1rem\",\n height: \"1rem\",\n // border: \"1px solid\",\n // borderColor: theme.palette.orange[200],\n borderRadius: \"0.25rem\",\n \"&:hover\": {\n // borderColor: theme.palette.orange[300],\n \"& > svg\": {\n color: theme.palette.orange[300],\n },\n },\n },\n editIcon: {\n color: theme.palette.orange[200],\n // position: \"relative\",\n // top: \"-0.5rem\",\n // right: \"-0.5rem\",\n },\n}))\n\nexport default function OrganizationsListRow(props) {\n function privilegeText(privilege) {\n switch (privilege) {\n case -1:\n return \"Inactive\"\n case 0:\n return \"Active\"\n\n case 1:\n return \"Admin\"\n\n default:\n return \"Error\"\n }\n }\n\n const classes = useStyles()\n\n const owner = props.Owner\n const first_name = owner ? owner.first_name : \"\"\n const last_name = owner ? owner.last_name : \"\"\n const email = owner ? owner.email : \"\"\n return (\n \n \n {props.name}\n \n Default\n \n {first_name} {last_name}\n \n {email}\n {props.updated_at.split(\" \")[0]}\n {props.created_at.split(\" \")[0]}\n\n {privilegeText(props.privilege)}\n Billing Status\n \n \n Users\n \n \n \n )\n}\n","import React, { useEffect } from \"react\"\nimport { makeStyles } from \"@material-ui/core/styles\"\nimport Table from \"@material-ui/core/Table\"\nimport TableBody from \"@material-ui/core/TableBody\"\nimport TableCell from \"@material-ui/core/TableCell\"\nimport TableContainer from \"@material-ui/core/TableContainer\"\nimport TableHead from \"@material-ui/core/TableHead\"\nimport TableRow from \"@material-ui/core/TableRow\"\nimport Paper from \"@material-ui/core/Paper\"\nimport OrganizationsListRow from \"./OrganizationsListRow\"\nimport TableSortLabel from \"@mui/material/TableSortLabel\"\n\nconst useStyles = makeStyles((theme) => ({\n table: {\n minWidth: 800,\n padding: theme.spacing(1),\n },\n paper: {\n // coupled with _variables.scss gray-200\n border: \"1px solid rgba(237, 236, 236, 1)\",\n borderRadius: \"0.75rem\",\n marginBottom: theme.spacing(3),\n boxShadow: \"none\",\n },\n sortTableActive: {\n color: \"rgba(34, 144, 209 , 0.87) !important\",\n },\n wideCell: {\n minWidth: \"150px\",\n },\n dataDeep: {\n minWidth: \"100px\",\n color: \"#2290D1\",\n },\n}))\n\nfunction renderTableRows(props, order, orderBy) {\n function descendingComparator(a, b, orderBy) {\n if (b[\"Owner\"] && a[\"Owner\"] && b[\"Owner\"][orderBy] < a[\"Owner\"][orderBy]) {\n return -1\n }\n if (b[\"Owner\"] && a[\"Owner\"] && b[\"Owner\"][orderBy] > a[\"Owner\"][orderBy]) {\n return 1\n }\n return 0\n }\n\n function descendingComparator_1(a, b, orderBy) {\n if (b && a && b[orderBy] < a[orderBy]) {\n return -1\n }\n if (b && a && b[orderBy] > a[orderBy]) {\n return 1\n }\n return 0\n }\n\n function getComparator(order, orderBy) {\n if (\n orderBy === \"name\" ||\n orderBy === \"created_at\" ||\n orderBy === \"updated_at\"\n ) {\n return order === \"desc\"\n ? (a, b) => descendingComparator_1(a, b, orderBy)\n : (a, b) => -descendingComparator_1(a, b, orderBy)\n }\n return order === \"desc\"\n ? (a, b) => descendingComparator(a, b, orderBy)\n : (a, b) => -descendingComparator(a, b, orderBy)\n }\n\n function stableSort(array, comparator) {\n const stabilizedThis = array.map((el, index) => [el, index])\n stabilizedThis.sort((a, b) => {\n const order = comparator(a[0], b[0])\n if (order !== 0) {\n return order\n }\n return a[1] - b[1]\n })\n return stabilizedThis.map((el) => el[0])\n }\n\n if (Array.isArray(props.organizations) && props.organizations.length > 0) {\n let data = props.hide_inactive\n ? props.organizations.filter((x) => x.privilege !== -1)\n : props.organizations\n return data.sort(getComparator(order, orderBy)).map((row) => {\n return (\n \n )\n })\n } else if (props.searchString && props.organizations.length === 0) {\n return (\n \n \n Your search {\"{props.searchString}\"} did not return any results.\n \n \n )\n } else if (props.organizations?.privilege === 0) {\n let data = props.organizations\n return (\n \n )\n } else {\n return (\n \n Failed to load organizations\n \n )\n }\n}\n\nexport default function OrganizationsList(props) {\n const classes = useStyles()\n const [order, setOrder] = React.useState(\"\")\n const [orderBy, setOrderBy] = React.useState(\"\")\n const [tableRows, setTableRows] = React.useState(\n renderTableRows(props, order, orderBy)\n )\n useEffect(() => {\n if (order || orderBy || props.hide_inactive !== null) {\n setTableRows(renderTableRows(props, order, orderBy))\n }\n }, [props, order, orderBy, props.hide_inactive])\n const handleRequestSort = (event, property) => {\n const isAsc = orderBy === property && order === \"asc\"\n setOrder(isAsc ? \"desc\" : \"asc\")\n setOrderBy(property)\n }\n\n const createSortHandler = (property) => (event) => {\n handleRequestSort(event, property)\n }\n\n return (\n \n \n \n \n \n \n ORGANIZATION\n \n \n \n \n TYPE\n \n \n \n \n ADMIN NAME\n \n \n \n \n EMAIL\n \n \n \n \n UPDATED\n \n \n \n \n CREATED\n \n \n \n \n STATUS\n \n \n \n \n BILLING\n \n \n \n \n \n {tableRows}\n
\n
\n )\n}\n","import React from \"react\"\nimport { useForm } from \"react-hook-form\"\n\nimport { makeStyles } from \"@material-ui/core/styles\"\nimport TextField from \"@material-ui/core/TextField\"\nimport Typography from \"@material-ui/core/Typography\"\nimport Button from \"@material-ui/core/Button\"\nimport Modal from \"@material-ui/core/Modal\"\nimport Alert from \"@material-ui/lab/Alert\"\nimport FormLabel from \"@material-ui/core/FormLabel\"\nimport { Grid } from \"@material-ui/core\"\n\nimport * as yup from \"yup\"\nimport { useSelector } from \"react-redux\"\nimport { yupResolver } from \"@hookform/resolvers/yup\"\n\nconst useStyles = makeStyles((theme) => ({\n form: {\n width: \"100%\",\n marginTop: theme.spacing(1),\n display: \"flex\",\n flexDirection: \"row\",\n flexWrap: \"wrap\",\n justifyContent: \"space-between\",\n },\n paper: {\n flexDirection: \"column\",\n justifyContent: \"center\",\n maxWidth: \"800px\",\n backgroundColor: \"#fdfdfd\",\n padding: theme.spacing(6),\n border: `3px solid ${theme.palette.primary.main}`,\n margin: \"auto\",\n position: \"fixed\",\n top: theme.spacing(8),\n bottom: theme.spacing(8),\n right: 0,\n left: 0,\n overflowY: \"scroll\",\n },\n addBtn: {\n height: \"3rem\",\n padding: \"0.5rem 0.75rem\",\n fontSize: \"15px\",\n fontWeight: 500,\n backgroundColor: theme.palette.orange[200],\n color: theme.palette.white,\n borderRadius: \"0.5rem\",\n boxShadow: \"none\",\n \"&:hover\": {\n backgroundColor: theme.palette.orange[300],\n boxShadow: \"none\",\n },\n },\n messageContainer: {\n marginTop: theme.spacing(3),\n },\n}))\n\nconst schema = yup.object().shape({\n org_name: yup.string().required(),\n user_email: yup.string().email(),\n user_password: yup\n .string()\n .required()\n .min(8, \"Password should be at least 6 characters!\"),\n passwordConfirmation: yup\n .string()\n .oneOf([yup.ref(\"user_password\")], \"Passwords must match\"),\n email: yup.string().email(),\n first_name: yup.string().required(),\n last_name: yup.string().required(),\n})\n\nexport default function AddOrganizationForm(props) {\n const classes = useStyles()\n\n const { register, handleSubmit, setValue, errors, reset } = useForm({\n resolver: yupResolver(schema),\n })\n\n const open = useSelector((state) => state.modalReducer.modalProps.open)\n const responseMessage = useSelector(\n (state) => state.organizationReducer.response\n )\n\n const handleOpen = () => {\n props.showModal({\n modalProps: {\n open: true,\n },\n modalType: \"addOrganizationModal\",\n })\n }\n\n const handleClose = () => props.hideModal()\n\n const onSubmit = async (data) => {\n const user_data = {\n email: data.user_email.trim(),\n password: data.user_password,\n first_name: data.first_name.trim(),\n last_name: data.last_name.trim(),\n }\n\n const org_data = {\n name: data.org_name,\n }\n\n const response = await props.registerOrganization({\n user: user_data,\n org: org_data,\n })\n\n if (response.status === 200) {\n reset()\n setTimeout(props.hideModal, 2000)\n }\n }\n\n const renderResponseMessage = () => {\n if (responseMessage.status === 200) {\n return (\n
\n \n {responseMessage.message}\n \n
\n )\n } else if (responseMessage.status === 400) {\n return (\n
\n {responseMessage.message}\n
\n )\n }\n }\n\n const renderFormError = (errorMessage) => {\n return (\n
\n {errorMessage}\n
\n )\n }\n\n const body = (\n
\n \n Create an Organization\n \n
\n \n \n \n \n\n \n Admin User Account Settings\n \n {/* first name */}\n \n \n \n {/* last name */}\n \n \n \n\n {/* email */}\n \n \n // )\n // }}\n />\n \n\n \n \n \n \n \n \n \n \n CREATE ORGANIZATION\n \n \n \n
\n {renderResponseMessage()}\n {errors.email && renderFormError(errors.email.message)}\n {errors.username && renderFormError(errors.username.message)}\n {errors.password && renderFormError(errors.password.message)}\n {errors.passwordConfirmation &&\n renderFormError(errors.passwordConfirmation.message)}\n
\n )\n\n return (\n
\n \n CREATE ORGANIZATION\n \n \n {body}\n \n
\n )\n}\n","import { useState } from \"react\"\nimport TextField from \"@material-ui/core/TextField\"\nimport { withStyles } from \"@material-ui/core/styles\"\nimport SearchIcon from \"@material-ui/icons/Search\"\nimport InputAdornment from \"@material-ui/core/InputAdornment\"\n\nconst styles = (theme) => ({\n root: {\n width: \"100%\",\n \"& svg\": {\n marginTop: \"1rem\",\n color: theme.palette.gray[500],\n zIndex: 100,\n },\n },\n input: {\n \"& input\": {\n zIndex: 200,\n height: \"1rem\",\n padding: 0,\n marginTop: \"1.5rem\",\n },\n\n \"& fieldset\": {\n background: theme.palette.white,\n border: \"1px solid\",\n borderColor: theme.palette.gray[300],\n borderRadius: \"0.5rem\",\n height: \"3rem\",\n padding: \"0.5rem 0.75rem\",\n top: 0,\n },\n },\n})\n\nconst TypeaheadSearch = ({ value, label, handleChange, classes }) => {\n const [shrink, setShrink] = useState(false)\n\n return (\n
\n setShrink(true)}\n onBlur={(e) => setShrink(!!e.target.value)}\n onChange={handleChange}\n className={classes.root}\n InputProps={{\n type: \"search\",\n className: classes.input,\n value: value,\n startAdornment: (\n \n \n \n ),\n }}\n />\n
\n )\n}\n\nexport default withStyles(styles)(TypeaheadSearch)\n","import { makeStyles, withStyles } from \"@material-ui/core/styles\"\nimport InputLabel from \"@material-ui/core/InputLabel\"\nimport MenuItem from \"@material-ui/core/MenuItem\"\nimport FormControl from \"@material-ui/core/FormControl\"\nimport Select from \"@material-ui/core/Select\"\nimport InputBase from \"@material-ui/core/InputBase\"\n\nconst BootstrapInput = withStyles((theme) => ({\n root: {\n margin: 0,\n width: \"100%\",\n },\n input: {\n height: \"3rem\",\n minWidth: \"12rem\",\n boxSizing: \"border-box\",\n borderRadius: \"0.5rem\",\n backgroundColor: theme.palette.white,\n border: `1px solid ${theme.palette.gray[300]}`,\n padding: \"10px 26px 10px 12px\",\n },\n}))(InputBase)\n\nconst useStyles = makeStyles((theme) => ({\n select: {\n borderRadius: \"0.5rem\",\n backgroundColor: theme.palette.white,\n border: `1px solid ${theme.palette.gray[300]}`,\n padding: \"10px 26px 10px 12px\",\n height: \"2rem\",\n },\n label: {\n zIndex: 200,\n paddingLeft: \"1rem\",\n transform: \"translate(0, 18px) scale(1)\",\n },\n}))\n\nconst SelectField = ({\n label = \"Select\",\n value = \"\",\n handleChange,\n options = [],\n}) => {\n const classes = useStyles()\n\n return (\n \n {label}\n \n \n )\n}\n\nexport default SelectField\n","export default function privilegeText(privilege) {\n switch (privilege) {\n case -1:\n return \"Inactive\"\n case 0:\n return \"Active\"\n\n case 1:\n return \"Admin\"\n\n default:\n return \"Error\"\n }\n}\n","import React, { Component } from \"react\"\n\nimport { withStyles } from \"@material-ui/core/styles\"\nimport { connect } from \"react-redux\"\nimport OrganizationsList from \"./OrganizationsList\"\nimport AddOrganizationForm from \"./AddOrganizationForm\"\nimport LoadingSpinner from \"../../sharedComponents/LoadingSpinner\"\nimport SearchField from \"../sharedComponents/SearchField\"\nimport SelectField from \"../sharedComponents/SelectField\"\nimport privilegeText from \"../sharedComponents/privilegeText\"\n\nimport Grid from \"@material-ui/core/Grid\"\nimport {\n getOrganizations,\n setPrivilege,\n registerOrganization,\n showModal,\n hideModal,\n} from \"../../../actions\"\n\nimport ActiveUsersChart from \"../../adminView/ActiveUsersChart\"\nimport moment from \"moment\"\n\nconst styles = (theme) => ({\n select: {\n width: \"50%\",\n height: \"40px\",\n },\n title: {\n fontSize: \"30px\",\n lineHeight: \"37px\",\n color: \"#333437\",\n fontWeight: \"500\",\n padding: \"6px 0.8em\",\n },\n controlRow: {\n display: \"flex\",\n justifyContent: \"space-between\",\n margin: \"1.5rem 0\",\n },\n controlSearch: {\n minWidth: \"20rem\",\n marginRight: \"0.75rem\",\n flexGrow: 1,\n },\n controlFilter: {\n minWidth: \"8rem\",\n maxWidth: \"12rem\",\n marginRight: \"0.75rem\",\n flexShrink: 0,\n },\n selectedItem: {\n backgroundColor: theme.palette.info.light,\n },\n selectContainer: {\n padding: \"6px 1.5em\",\n width: \"100%\",\n },\n gridContainer: {\n \"& .MuiFab-label\": {\n color: \"#333437\",\n fontWeight: \"700\",\n lineHeight: \"37px\",\n },\n },\n userTypesLabel: {\n display: \"inline-block !important\",\n marginRight: \"10px\",\n },\n})\n\nconst searchStringify = (o) =>\n `${o.name} ${o.Owner.first_name} ${o.Owner.last_name} ${o.Owner.email}`.toLowerCase()\n\nconst filterString = (searchString, organizations) => {\n if (!searchString) {\n return organizations\n }\n return organizations.filter((o) =>\n searchStringify(o).includes(searchString.toLowerCase())\n )\n}\n\nconst filterStatus = (status, organizations) => {\n if (status === \"\") {\n return organizations\n }\n\n return organizations.filter((o) => o.privilege === parseInt(status))\n}\n\nconst filter = (searchString, status, organizations) => {\n return filterStatus(status, filterString(searchString, organizations))\n}\n\nclass Organizations extends Component {\n constructor(props) {\n super(props)\n this.state = {\n hide_inactive: false,\n start_date: moment().subtract(1, \"month\").toISOString(),\n end_date: moment().toISOString(),\n searchString: \"\",\n statusFilter: \"\",\n }\n this.handleInactiveToggleChange = this.handleInactiveToggleChange.bind(this)\n this.handleSearch = this.handleSearch.bind(this)\n this.handleFilterSelect = this.handleFilterSelect.bind(this)\n this.handleFilter = this.handleFilter.bind(this)\n }\n\n componentDidMount() {\n if (!this.props.hasFetched) {\n this.props.getOrganizations()\n }\n }\n\n handleInactiveToggleChange(event) {\n this.setState({ ...this.state, hide_inactive: event.target.checked })\n this.forceUpdate()\n }\n\n handleFilter({ searchString = \"\", statusFilter = \"\" }) {\n this.setState({\n filteredOrganizations: filter(\n searchString,\n statusFilter,\n this.props.organizations\n ),\n searchString: searchString,\n statusFilter: statusFilter,\n })\n }\n\n handleSearch(event) {\n this.handleFilter({ searchString: event.target.value })\n }\n\n handleFilterSelect(event) {\n this.handleFilter({ statusFilter: event.target.value })\n }\n\n render() {\n const { classes, organizations } = this.props\n const { searchString, statusFilter } = this.state\n const filteredOrganizations = filter(\n searchString,\n statusFilter,\n this.props.organizations\n )\n\n return (\n <>\n \n

Manage Organizations

\n
\n
\n \n
\n
\n ({\n value: i,\n label: privilegeText(i),\n }))}\n value={this.state.statusFilter}\n handleChange={this.handleFilterSelect}\n />\n
\n {organizations?.privilege !== 0 && this.props.hasFetched && (\n
\n \n
\n )}\n
\n
\n
\n {this.props.hasFetched ? (\n \n ) : (\n \n )}\n {organizations?.privilege !== 0 && (\n
\n

Active Users

\n \n
\n )}\n
\n \n )\n }\n}\n\nconst mapStateToProps = (state) => {\n return {\n organizations: state.organizationReducer.organizations,\n hasFetched: state.organizationReducer.hasFetched,\n modal: state.modalReducer,\n }\n}\n\nexport default connect(mapStateToProps, {\n getOrganizations,\n setPrivilege,\n registerOrganization,\n showModal,\n hideModal,\n})(withStyles(styles)(Organizations))\n","import moment from \"moment\"\nimport {\n FormControl,\n FormControlLabel,\n FormLabel,\n TextField,\n Checkbox,\n} from \"@material-ui/core\"\nimport { makeStyles } from \"@material-ui/core/styles\"\nimport Autocomplete from \"@material-ui/lab/Autocomplete\"\n\nconst DAYS = [\"S\", \"M\", \"T\", \"W\", \"T\", \"F\", \"S\"]\n\nconst useStyles = makeStyles((theme) => ({\n form: {\n marginTop: theme.spacing(1),\n display: \"flex\",\n flexDirection: \"column\",\n },\n formControl: {\n marginTop: theme.spacing(2),\n display: \"block\",\n },\n textField: {\n padding: theme.spacing(1),\n width: 160,\n },\n fullTextField: {\n padding: theme.spacing(1),\n width: 320,\n },\n dayCheck: {\n width: \"2rem\",\n height: \"2rem\",\n padding: \"1rem\",\n margin: \"0 0.25rem\",\n borderRadius: \"2rem\",\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n cursor: \"pointer\",\n userSelect: \"none\",\n },\n dayCheckDeselected: {\n background: theme.palette.gray[200],\n color: theme.palette.gray[500],\n },\n dayCheckSelected: {\n backgroundColor: theme.palette.blue[500],\n color: theme.palette.gray[100],\n },\n paper: {\n borderRadius: \"0.75rem\",\n boxShadow: \"none\",\n padding: \"2rem\",\n },\n divider: {\n paddingTop: \"1rem\",\n paddingBottom: \"1rem\",\n },\n buttonPrimary: {\n height: \"3rem\",\n padding: \"0.5rem 0.75rem\",\n fontSize: \"15px\",\n fontWeight: 500,\n borderRadius: \"0.5rem\",\n boxShadow: \"none\",\n \"&:hover\": {\n boxShadow: \"none\",\n backgroundColor: theme.palette.orange[300],\n },\n backgroundColor: theme.palette.orange[200],\n color: theme.palette.white,\n maxWidth: \"8rem\",\n },\n buttonSecondary: {\n height: \"3rem\",\n padding: \"0.5rem 0.75rem\",\n fontSize: \"15px\",\n fontWeight: 500,\n borderRadius: \"0.5rem\",\n boxShadow: \"none\",\n \"&:hover\": {\n boxShadow: \"none\",\n backgroundColor: theme.palette.gray[100],\n },\n backgroundColor: theme.palette.gray[200],\n color: theme.palette.gray[600],\n },\n messageContainer: {\n marginTop: theme.spacing(3),\n },\n}))\n\nconst ActivityForm = ({ activity, index, onActivityChange }) => {\n const classes = useStyles()\n\n // const handleChange = (event) => {\n // const { id, value } = event.target\n // setActivity(index, id, value)\n // }\n\n // const handleDayChange = (event) => {\n // const { id } = event.target\n // const dayValue = parseInt(id.split(\"-\")[1])\n\n // if (isSelected(dayValue)) {\n // setActivity(index, \"days\", activity.days.filter(d => d !== dayValue))\n // } else {\n // setActivity(index, \"days\", [dayValue, ...activity.days])\n // }\n // }\n\n // const isSelected = (dayValue) => {\n // return activity.days.includes(dayValue)\n // }\n\n const handleChange = (field, value) => {\n onActivityChange(index, { ...activity, [field]: value })\n }\n\n const handleDayChange = (dayValue) => {\n const newDays = activity.days.includes(dayValue)\n ? activity.days.filter((d) => d !== dayValue)\n : [...activity.days, dayValue]\n handleChange(\"days\", newDays)\n }\n\n const isSelected = (dayValue) => {\n return activity.days.includes(dayValue)\n }\n\n const currentDate = moment().format(\"YYYY-MM-DD\")\n\n return (\n <>\n \n Days of Week\n {DAYS.map((title, i) => (\n handleDayChange(i)}>\n {title}\n \n ))}\n \n \n Time Window\n handleChange('time_start', e.target.value)}\n label='Start'\n variant='outlined'\n type='time'\n className={classes.textField}\n InputLabelProps={{\n shrink: true,\n }}\n inputProps={{\n step: 1800,\n }}\n />\n handleChange('time_end', e.target.value)}\n label='End'\n variant='outlined'\n type='time'\n className={classes.textField}\n InputLabelProps={{\n shrink: true,\n }}\n inputProps={{\n step: 1800,\n }}\n />\n \n \n Date Range\n handleChange('date_start', e.target.value)}\n label='Start'\n variant='outlined'\n type='date'\n className={classes.textField}\n InputLabelProps={{\n shrink: true,\n }}\n />\n handleChange('date_end', e.target.value)}\n label='End'\n variant='outlined'\n type='date'\n className={classes.textField}\n InputLabelProps={{\n shrink: true,\n }}\n />\n \n \n )\n}\n\nexport default ActivityForm\n","import {\n FormControl,\n FormLabel,\n Select,\n TextField,\n MenuItem,\n} from \"@material-ui/core\"\nimport Autocomplete from \"@material-ui/lab/Autocomplete\"\nimport { makeStyles } from \"@material-ui/core/styles\"\n\nconst useStyles = makeStyles((theme) => ({\n form: {\n marginTop: theme.spacing(1),\n display: \"flex\",\n flexDirection: \"column\",\n },\n formGroup: {\n marginTop: theme.spacing(2),\n },\n textField: {\n padding: theme.spacing(1),\n width: 160,\n },\n fullTextField: {\n padding: theme.spacing(1),\n width: 320,\n },\n paper: {\n borderRadius: \"0.75rem\",\n boxShadow: \"none\",\n padding: \"2rem\",\n },\n divider: {\n paddingTop: \"1rem\",\n paddingBottom: \"1rem\",\n },\n buttonPrimary: {\n height: \"3rem\",\n padding: \"0.5rem 0.75rem\",\n fontSize: \"15px\",\n fontWeight: 500,\n borderRadius: \"0.5rem\",\n boxShadow: \"none\",\n \"&:hover\": {\n boxShadow: \"none\",\n backgroundColor: theme.palette.orange[300],\n },\n backgroundColor: theme.palette.orange[200],\n color: theme.palette.white,\n maxWidth: \"8rem\",\n },\n buttonSecondary: {\n height: \"3rem\",\n padding: \"0.5rem 0.75rem\",\n fontSize: \"15px\",\n fontWeight: 500,\n borderRadius: \"0.5rem\",\n boxShadow: \"none\",\n \"&:hover\": {\n boxShadow: \"none\",\n backgroundColor: theme.palette.gray[100],\n },\n backgroundColor: theme.palette.gray[200],\n color: theme.palette.gray[600],\n },\n messageContainer: {\n marginTop: theme.spacing(3),\n },\n}))\n\nconst LevelForm = ({ index, levels, selectedLevels, setLevels }) => {\n const classes = useStyles()\n\n const handleLevelChange = (event) => {\n const { id } = event.target\n const levelId = parseInt(id.split(\"-\")[4])\n // levels are sequential 1-n, but option IDs overwritten by MUI\n setLevels(index, levelId + 1)\n }\n\n const handleChange = (event, newValue) => {\n const newSelectedLevels = newValue.map(level => level.id);\n setLevels(index, newSelectedLevels);\n };\n\n const levelOptions = levels.map((level) => ({\n ...level,\n levelId: level.id,\n }))\n\n return (\n <>\n \n Activity\n option.name}\n value={levels.filter(level => selectedLevels.includes(level.id))}\n onChange={handleChange}\n className={classes.fullTextField}\n renderInput={(params) => (\n \n )}\n />\n \n \n )\n}\n\nexport default LevelForm\n","import { makeStyles } from \"@material-ui/core/styles\"\n\nconst useStyles = makeStyles((theme) => ({\n dividerWrapper: {\n width: \"100%\",\n display: \"flex\",\n justifyContent: \"center\",\n },\n divider: {\n width: \"75%\",\n display: \"block\",\n marginTop: theme.spacing(2),\n marginBottom: theme.spacing(2),\n border: 0,\n borderBottomWidth: \"1px\",\n borderStyle: \"solid\",\n borderColor: theme.palette.gray[300],\n },\n}))\n\nconst Divider = () => {\n const classes = useStyles()\n\n return (\n
\n
\n
\n )\n}\n\nexport default Divider","import React from \"react\"\nimport { Grid, Typography } from \"@material-ui/core\"\nimport { makeStyles } from \"@material-ui/core/styles\"\nimport ArrowBackIosIcon from \"@material-ui/icons/ArrowBackIos\"\nimport NFButton from \"../sharedComponents/NFButton\"\nimport { useHistory } from \"react-router-dom\"\n\nconst useStyles = makeStyles((theme) => ({\n titleRow: {\n marginTop: theme.spacing(3),\n marginBottom: theme.spacing(3),\n },\n}))\n\nconst TitleRow = ({ title, backDestination }) => {\n const classes = useStyles()\n const history = useHistory()\n\n return (\n \n \n \n backDestination ? history.push(backDestination) : history.go(-1)\n }>\n \n Back\n \n \n \n \n {title}\n \n \n \n )\n}\n\nexport default TitleRow\n","import moment from \"moment\"\nimport React, { useState, useEffect } from \"react\"\nimport { useParams, useHistory } from \"react-router-dom\"\nimport { useDispatch, useSelector } from \"react-redux\"\nimport { useSnackbar } from \"notistack\"\nimport {\n Grid,\n Paper,\n Button,\n FormControl,\n FormLabel,\n TextField,\n Typography,\n} from \"@material-ui/core\"\nimport { makeStyles } from \"@material-ui/core/styles\"\nimport AddIcon from \"@material-ui/icons/Add\"\n\nimport {\n getLevels,\n getUserThunk,\n createAssignment,\n createAssignmentReset,\n getAssignments,\n} from \"../../../actions/index\"\nimport ActivityForm from \"./ActivityForm\"\nimport LevelForm from \"./LevelForm\"\nimport Divider from \"../sharedComponents/Divider\"\nimport NFButton from \"../sharedComponents/NFButton\"\nimport TitleRow from \"../sharedComponents/TitleRow\"\n\nconst ACTIVITY = {\n days: [],\n levels: [],\n time_start: \"09:00\",\n time_end: \"12:00\",\n date_start: moment().format(\"YYYY-MM-DD\"),\n date_end: moment().add(7, \"days\").format(\"YYYY-MM-DD\"),\n}\n\nconst useStyles = makeStyles((theme) => ({\n topRow: {\n marginTop: theme.spacing(3),\n marginBottom: theme.spacing(2),\n },\n form: {\n marginTop: theme.spacing(1),\n display: \"flex\",\n flexDirection: \"column\",\n },\n divider: {\n width: \"75%\",\n display: \"block\",\n margin: `${theme.spacing(1)} 0`,\n border: 0,\n borderBottomWidth: \"1px\",\n borderStyle: \"solid\",\n borderColor: theme.palette.gray[400],\n },\n paper: {\n borderRadius: \"0.75rem\",\n boxShadow: \"none\",\n padding: \"2rem\",\n },\n formGroup: {\n marginTop: theme.spacing(2),\n },\n textField: {\n margin: theme.spacing(1),\n width: 160,\n },\n buttonPrimary: {\n height: \"3rem\",\n padding: \"0.5rem 0.75rem\",\n fontSize: \"15px\",\n fontWeight: 500,\n borderRadius: \"0.5rem\",\n boxShadow: \"none\",\n \"&:hover\": {\n boxShadow: \"none\",\n backgroundColor: theme.palette.orange[300],\n },\n backgroundColor: theme.palette.orange[200],\n color: theme.palette.white,\n maxWidth: \"16rem\",\n marginTop: theme.spacing(1),\n },\n buttonSecondary: {\n height: \"3rem\",\n padding: \"0.5rem 0.75rem\",\n fontSize: \"15px\",\n fontWeight: 500,\n borderRadius: \"0.5rem\",\n boxShadow: \"none\",\n \"&:hover\": {\n boxShadow: \"none\",\n backgroundColor: theme.palette.gray[100],\n },\n backgroundColor: theme.palette.gray[200],\n color: theme.palette.gray[600],\n maxWidth: \"16rem\",\n marginTop: theme.spacing(1),\n },\n messageContainer: {\n marginTop: theme.spacing(3),\n },\n}))\n\nconst AssignmentCreate = () => {\n let { id } = useParams()\n const classes = useStyles()\n const dispatch = useDispatch()\n const history = useHistory()\n const { enqueueSnackbar } = useSnackbar()\n\n const levels = useSelector((state) => state.gameLevelReducer.levels)\n const creating = useSelector((state) => state.assignmentReducer.creating)\n const createSuccess = useSelector(\n (state) => state.assignmentReducer.createSuccess\n )\n const createError = useSelector(\n (state) => state.assignmentReducer.createError\n )\n const user = useSelector((state) => state.userReducer.viewed_user)\n\n const [activities, setActivities] = useState([{ ...ACTIVITY }])\n const [duration, setDuration] = useState(null)\n const [message, setMessage] = useState(\"\")\n let userId = id\n\n useEffect(() => {\n if (createSuccess) {\n setMessage(\"Assignments created successfully!\")\n dispatch(createAssignmentReset())\n enqueueSnackbar(`Assignment created successfully!`, {\n variant: \"success\",\n persist: false,\n })\n setActivities([]) // Clear the form\n history.push(`/user-profile/${id}`)\n } else if (createError) {\n setMessage(`Error creating assignments: ${createError}`)\n }\n }, [createSuccess, createError, dispatch, history, id])\n\n useEffect(() => {\n dispatch(getLevels())\n }, [dispatch])\n\n useEffect(() => {\n if (userId) {\n dispatch(getUserThunk(userId))\n }\n }, [dispatch, userId])\n\n const addActivity = () => {\n setActivities([...activities, { ...ACTIVITY }])\n console.log(activities)\n }\n\n const handleActivityChange = (index, updatedActivity) => {\n const newActivities = [...activities]\n newActivities[index] = updatedActivity\n setActivities(newActivities)\n }\n\n const setLevels = (idx, value) => {\n const newActivities = [...activities]\n newActivities[idx].levels = value\n setActivities(newActivities)\n }\n\n const handleDurationChange = (event) => {\n setDuration(parseInt(event.target.value))\n }\n\n const onSubmit = (e) => {\n e.preventDefault()\n if (activities.length === 0) {\n setMessage(\"Please add at least one assignment.\")\n return\n }\n dispatch(createAssignment(id, activities, duration))\n }\n\n return (\n <>\n \n \n \n
\n \n \n {message &&

{message}

}\n
\n {activities.map((activity, index) => (\n \n \n \n \n \n \n \n {/* {index !== activities.length - 1 && } */}\n \n
\n ))}\n \n \n \n \n (Optional) How much time should be spent on this assignment?\n \n \n \n addActivity()}>\n \n Add Another Activity\n \n \n \n
\n
\n
\n \n )\n}\n\nexport default AssignmentCreate\n","import { useEffect } from \"react\"\nimport { useLocation } from \"react-router-dom\"\n\nexport default function ScrollToTop() {\n const { pathname } = useLocation()\n\n useEffect(() => {\n window.scrollTo(0, 0)\n }, [pathname])\n\n return null\n}\n","import React from \"react\"\nimport {\n TextField,\n Select,\n MenuItem,\n Checkbox,\n FormControl,\n InputLabel,\n FormControlLabel,\n Typography,\n makeStyles,\n} from \"@material-ui/core\"\n\nconst useStyles = makeStyles((theme) => ({\n formControl: {\n margin: theme.spacing(1),\n minWidth: 120,\n },\n selectEmpty: {\n marginTop: theme.spacing(2),\n },\n textField: {\n backgroundColor: theme.palette.white,\n },\n}))\n\nconst ActivityInput = ({\n parameter,\n value,\n onChange,\n name,\n inputRef,\n error,\n}) => {\n const classes = useStyles()\n\n const renderParameter = (parameter) => {\n switch (parameter.type) {\n case \"integer\":\n return (\n onChange(parseInt(e.target.value, 10))}\n helperText={error ? error.message : parameter.description}\n error={!!error}\n fullWidth\n margin='normal'\n className={classes.textField}\n inputRef={inputRef}\n />\n )\n case \"enum\":\n return (\n \n {parameter.name}\n onChange(e.target.value)}\n inputRef={inputRef}>\n {parameter.values?.map((value) => (\n \n {value}\n \n )) || []}\n \n \n {error ? error.message : parameter.description}\n \n \n )\n case \"boolean\":\n return (\n onChange(e.target.checked)}\n inputRef={inputRef}\n />\n }\n label={\n
\n {parameter.name}\n \n {error ? error.message : parameter.description}\n \n
\n }\n />\n )\n default:\n return null\n }\n }\n\n if (!parameter || !parameter.type) {\n return <>\n }\n return
{renderParameter(parameter)}
\n}\n\nexport default ActivityInput\n","import React, { useState, useEffect } from \"react\"\nimport moment from \"moment\"\nimport { useSelector, useDispatch } from \"react-redux\"\nimport {\n CircularProgress,\n FormControl,\n FormControlLabel,\n FormLabel,\n Grid,\n Paper,\n Radio,\n RadioGroup,\n Slider,\n Switch,\n Typography,\n} from \"@material-ui/core\"\nimport { makeStyles } from \"@material-ui/core/styles\"\nimport { useForm, Controller } from \"react-hook-form\"\nimport { useHistory, useParams, useLocation } from \"react-router-dom\"\nimport { useSnackbar } from \"notistack\"\n\nimport ScrollToTop from \"../sharedComponents/ScrollToTop\"\nimport NFButton from \"../sharedComponents/NFButton\"\nimport ActivityInput from \"./ActivityInput\"\nimport {\n getLevel,\n updateActivity,\n updateActivityReset,\n deleteActivity,\n} from \"../../../actions/index\"\nimport TitleRow from \"../sharedComponents/TitleRow\"\n\nconst TOPLEVEL_ACTIVITY_PARAMS = [\n \"completion_condition_mode\",\n \"timer\",\n \"is_adaptive_difficulty\",\n \"difficulty\",\n \"completion_clears\",\n \"completion_duration\",\n]\n\nconst useStyles = makeStyles((theme) => ({\n paper: {\n padding: theme.spacing(6),\n borderRadius: \"0.25rem\",\n boxShadow: \"none\",\n border: `1px solid ${theme.palette.blue[200]}`,\n },\n formGroup: {\n marginBottom: theme.spacing(3),\n },\n slider: {\n width: \"100%\",\n },\n buttonPrimary: {\n marginTop: theme.spacing(2),\n },\n}))\n\nconst AssignmentEdit = () => {\n const dispatch = useDispatch()\n const history = useHistory()\n let { id } = useParams()\n const loadedActivity = useLocation().state?.activity\n const { enqueueSnackbar } = useSnackbar()\n\n const { levels, hasFetchedLevels } = useSelector(\n (state) => state.gameLevelReducer\n )\n const { updating, updateSuccess, updateError } = useSelector(\n (state) => state.assignmentReducer\n )\n\n useEffect(() => {\n if (!hasFetchedLevels) {\n dispatch(getLevel(loadedActivity.game_level.id))\n }\n }, [dispatch, hasFetchedLevels, loadedActivity])\n\n // @todo handle direct navigation case with no levels loaded, race condition\n const level = levels.find((l) => l.id === loadedActivity.game_level.id)\n const [activity, setActivity] = useState({ ...loadedActivity })\n // const [isClearsCompletion, setIsClearsCompletion] = useState(\n // loadedActivity.activity_parameters.completion_condition_mode === \"CLEARS\"\n // )\n // const [isAdaptiveDifficulty, setIsAdaptiveDifficulty] = useState(\n // loadedActivity.activity_parameters.is_adaptive_difficulty\n // )\n const classes = useStyles()\n\n const { control, handleSubmit, watch, errors } = useForm({\n defaultValues: {\n ...loadedActivity.activity_parameters,\n ...loadedActivity.gameplay_parameters,\n },\n })\n\n useEffect(() => {\n if (updateSuccess) {\n dispatch(updateActivityReset())\n enqueueSnackbar(\n `${activity.game_level.name} ${moment(activity.start).format(\n \"MMM D\"\n )} updated`,\n {\n variant: \"success\",\n persist: false,\n }\n )\n history.push(`/user-profile/${id}`)\n }\n }, [dispatch, updateSuccess, history, id, enqueueSnackbar, activity.game_level.name, activity.start])\n\n const isClearsCompletion = watch(\"completion_condition_mode\") === \"CLEARS\"\n const isAdaptiveDifficulty = watch(\"is_adaptive_difficulty\")\n\n const onSubmit = (data) => {\n // separate flattened form data back into activity and gameplay params\n const activityParams = Object.entries(data).reduce((acc, [key, value]) => {\n if (Object.keys(level.activity_parameters).includes(key)) {\n acc[key] = value\n }\n return acc\n }, {})\n const gameplayParams = Object.entries(data).reduce((acc, [key, value]) => {\n if (Object.keys(level.gameplay_parameters).includes(key)) {\n acc[key] = value\n }\n return acc\n }, {})\n activityParams.is_edited = true\n dispatch(\n updateActivity(activity.id, {\n activity_parameters: activityParams,\n gameplay_parameters: gameplayParams,\n })\n )\n }\n\n const nonTopLevelActivityParams =\n level.activity_parameters &&\n Object.fromEntries(\n Object.entries(level.activity_parameters).filter(\n ([key]) => !TOPLEVEL_ACTIVITY_PARAMS.includes(key)\n )\n )\n\n const handleGameParamChange = (key, value) => {\n setActivity({\n ...activity,\n gameplay_parameters: { ...activity.gameplay_parameters, [key]: value },\n })\n }\n\n const handleDelete = () => {\n if (window.confirm(\"Are you sure you want to delete this assignment?\")) {\n dispatch(deleteActivity(activity.id))\n history.push(`/user-profile/${id}`)\n }\n }\n\n if (!activity || !level.name) {\n return Loading Activity...\n }\n\n const formattedStartDate = moment(activity.start).isValid()\n ? moment(activity.start).format(\"- MM/D [at] h:mm A\")\n : null;\n\n const pageTitle = `Edit Activity: ${activity.game_level.name} ${formattedStartDate}`;\n\n return (\n <>\n \n \n \n \n \n
\n \n Completion Settings\n \n \n Completion Mode\n (\n onChange(e.target.value)}>\n {level.activity_parameters.completion_condition_mode.values.map(\n (mode) => (\n }\n label={mode}\n />\n )\n )}\n \n )}\n />\n {errors.completion_condition_mode && (\n \n {errors.completion_condition_mode.message}\n \n )}\n \n \n\n {isClearsCompletion && (\n \n \n \n )}\n\n {!isClearsCompletion && (\n \n \n \n )}\n\n \n \n \n\n \n \n \n Adaptive Difficulty\n \n (\n onChange(newValue)}\n inputRef={ref}\n />\n }\n label={value ? \"Enabled\" : \"Disabled\"}\n />\n )}\n />\n \n {\n level.activity_parameters.is_adaptive_difficulty\n .description\n }\n \n \n \n\n {!isAdaptiveDifficulty && (\n \n \n \n Difficulty (1-10)\n \n (\n onChange(newValue)}\n min={1}\n max={10}\n step={1}\n marks\n valueLabelDisplay='auto'\n className={classes.slider}\n ref={ref}\n />\n )}\n />\n \n \n )}\n\n {!isAdaptiveDifficulty && level.gameplay_parameters && (\n Difficulty Settings\n )}\n {!isAdaptiveDifficulty &&\n level.gameplay_parameters &&\n Object.entries(level.gameplay_parameters)\n .filter(([k, l]) => l.is_difficulty_dependent)\n ?.map(([key, param]) => (\n \n handleGameParamChange(key, v)}\n />\n \n ))}\n\n Activity Settings\n {Object.entries(nonTopLevelActivityParams)?.map(\n ([key, param]) => (\n \n \n \n )\n )}\n\n {Object.entries(level.gameplay_parameters).filter(\n ([k, l]) => !l.is_difficulty_dependent\n ).length > 0 && (\n {level.name} Settings\n )}\n {Object.entries(level.gameplay_parameters)\n .filter(([k, l]) => !l.is_difficulty_dependent)\n ?.map(([key, param]) => (\n \n \n \n ))}\n \n \n \n \n {updating ? \"Updating...\" : \"Update Assignment\"}\n {updating && (\n \n )}\n \n \n \n \n Delete Assignment\n \n \n \n \n \n
\n
\n
\n
\n \n )\n}\n\nexport default AssignmentEdit\n","import React, { useEffect } from \"react\"\n\nimport { Link } from \"react-router-dom\"\nimport { makeStyles } from \"@material-ui/core/styles\"\n\n//components\nimport { Button, Toolbar, IconButton } from \"@material-ui/core\"\n\nimport List from \"@material-ui/core/List\"\nimport ListItem from \"@material-ui/core/ListItem\"\nimport MenuItem from \"@material-ui/core/MenuItem\"\nimport Menu from \"@material-ui/core/Menu\"\nimport ExpandMore from \"@material-ui/icons/ExpandMore\"\nimport MaterialLink from \"@material-ui/core/Link\"\n\nimport MenuIcon from \"@material-ui/icons/Menu\"\n\nimport { useHistory } from \"react-router-dom\"\nimport { useDispatch, useSelector } from \"react-redux\"\n\nimport { useTranslation } from \"../../../i18n/translate\"\nimport { activeLinkChanged, setLanguage } from \"../../../actions\"\nimport PermissionsService from \"../../../lib/PermissionsSystem.js\"\nimport \"./AppBar.scss\"\n\nconst drawerWidth = 288\n\nconst useStyles = makeStyles((theme) => ({\n title: {\n flexGrow: 1,\n },\n navLink: {\n color: \"#ffffff\",\n textDecoration: \"none\",\n fontSize: \"18px\",\n },\n navLinkIcon: {\n marginRight: 0,\n marginLeft: \"auto\",\n paddingLeft: \"1em\",\n },\n drawerNavLink: {\n color: \"#222\",\n textDecoration: \"none\",\n borderBottom: 1,\n fontSize: \"24px\",\n },\n list: {\n width: 250,\n },\n fullList: {\n width: \"auto\",\n },\n logoutButton: {\n margin: 0,\n width: \"100%\",\n },\n feedbackButton: {\n width: \"100%\",\n height: \"48px\",\n textDecoration: \"none\",\n },\n drawer: {\n [theme.breakpoints.up(\"sm\")]: {\n width: drawerWidth,\n flexShrink: 0,\n },\n },\n appBar: {\n [theme.breakpoints.up(\"sm\")]: {\n paddingLeft: \"17.5%\",\n },\n },\n menuButton: {\n marginRight: 0,\n [theme.breakpoints.up(\"md\")]: {\n display: \"none\",\n },\n },\n // necessary for content to be below app bar\n toolbar: {\n display: \"flex\",\n ...theme.mixins.toolbar,\n },\n drawerPaper: {\n width: drawerWidth,\n },\n content: {\n flexGrow: 1,\n padding: theme.spacing(3),\n },\n brand: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n width: \"100%\",\n \"& img\": {\n width: \"40px\",\n },\n },\n active: {\n borderBottom: \"2px solid #333437\",\n },\n}))\n\n// MainLinks -- this renders the logout component\n// checks if the user is authenticated\n\nconst renderMainLinks = (\n props,\n classes,\n anchorEl,\n setAnchorEl,\n history,\n t,\n lng,\n setLng\n) => {\n const open = Boolean(anchorEl)\n\n const handleMenu = (event) => {\n setAnchorEl(event.currentTarget)\n }\n\n const handleClose = () => {\n setAnchorEl(null)\n }\n\n // if the user is authenticated, logout link renders\n if (props.isAuthenticated) {\n let user = PermissionsService.GetUser()\n const userInitial =\n (user && user.first_name && user.first_name.slice(0, 1).toUpperCase()) ||\n \"U\"\n return (\n
\n {userInitial}\n {user ? `${user.first_name}` : \"\"}\n \n \n \n \n \n \n {t(\"CONTACT_NEUROFIT\")}\n \n \n {\n props.logoutUser(e)\n history.push(\"/\")\n }}>\n {t(\"SIGN_OUT\")}\n \n \n setLng(lng === \"en-US\" ? \"fr-CA\" : \"en-US\")}\n color='inherit'\n underline='none'>\n {t(\"TOGGLE LANGUAGE\")}\n \n \n \n
\n )\n }\n}\n\nfunction renderDrawerLinks(props, classes, handleDrawerToggle) {\n return (\n
\n \n \n Manage Users\n \n \n Session Schedule\n \n \n Billing Info\n \n {props.privilege === 1 && (\n \n \n Manage Organizations\n \n \n )}\n {/* */}\n \n \n \n \n
\n )\n}\n\nexport default function AppBarr(props) {\n const classes = useStyles()\n\n const dispatch = useDispatch()\n let history = useHistory()\n\n const t = useTranslation()\n\n useEffect(() => {\n const handleActiveLinkChanged = (path) => dispatch(activeLinkChanged(path))\n handleActiveLinkChanged(history.location.pathname)\n const listener = history.listen((location, action) => {\n handleActiveLinkChanged(location.pathname)\n })\n return () => {\n listener()\n }\n }, [history, dispatch])\n const [mobileOpen, setMobileOpen] = React.useState(false)\n\n const handleDrawerToggle = () => {\n setMobileOpen(!mobileOpen)\n }\n\n const lng = useSelector((state) => state.userReducer.language)\n const setLng = (language) => dispatch(setLanguage(language))\n\n const [anchorEl, setAnchorEl] = React.useState(null)\n const MainLinks = renderMainLinks(\n props,\n classes,\n anchorEl,\n setAnchorEl,\n history,\n t,\n lng,\n setLng\n )\n const drawer = renderDrawerLinks(props, classes, handleDrawerToggle)\n\n return (\n
\n {MainLinks}\n \n \n \n \n \n
{mobileOpen && drawer}
\n
\n )\n}\n","import {\n NAV_COLLAPSE, NAV_EXPAND\n} from \"./types\";\n\nimport Store from \"../store.js\";\n\nexport const toggleNav =\n () => {\n const dispatch = Store.dispatch;\n const isExpanded = Store.getState().navReducer.isExpanded;\n const action = isExpanded ? NAV_COLLAPSE : NAV_EXPAND\n dispatch({type: action});\n };\n","export default __webpack_public_path__ + \"static/media/UserGroupOutline.5be3b343.svg\";","export default __webpack_public_path__ + \"static/media/CurrencyDollarOutline.597bfcd0.svg\";","export default __webpack_public_path__ + \"static/media/OfficeBuildingOutline.33540ed9.svg\";","export default __webpack_public_path__ + \"static/media/LogoutOutline.bff3771f.svg\";","export default __webpack_public_path__ + \"static/media/neurofit_icon.b0fac613.png\";","export default __webpack_public_path__ + \"static/media/neurofit_logotype.3fbd64e0.svg\";","import React from \"react\"\nimport { connect } from \"react-redux\"\nimport \"./Navbar.scss\"\nimport { Link } from \"react-router-dom\"\n\nimport { toggleNav } from \"../../../../actions/NavActions\"\nimport { useTranslation } from \"../../../../i18n/translate\"\n\n// Absolute import paths are not working with this configuration & CRA version\nimport UserGroupOutlineIcon from \"../../../../assets/images/UserGroupOutline.svg\"\nimport CurrencyDollarOutlineIcon from \"../../../../assets/images/CurrencyDollarOutline.svg\"\nimport OfficeBuildingOutlineIcon from \"../../../../assets/images/OfficeBuildingOutline.svg\"\nimport LogoutOutlineIcon from \"../../../../assets/images/LogoutOutline.svg\"\nimport { ArrowBack, ArrowForward } from \"@material-ui/icons\"\n\nimport Logo from \"../../../../assets/images/neurofit_icon.png\"\nimport Logotype from \"../../../../assets/images/neurofit_logotype.svg\"\nimport PermissionsService from \"../../../../lib/PermissionsSystem\"\n\nconst Navbar = ({ onSignOutClick, isExpanded, features }) => {\n let a = 1\n a += 1\n const t = useTranslation()\n\n const shouldShowBilling = !(features && features.find((f) => f.is_active && f.name === \"is_billing_hidden\"))\n\n return (\n \n \n neurofit brain icon\n {isExpanded && (\n neurofit\n )}\n \n\n
\n \n Users\n {isExpanded && {t(\"USERS\")}}\n \n \n Users\n {isExpanded && {t(\"ORGANIZATIONS\")}}\n \n {PermissionsService.HasPermission(\"admin.billing.read\") && (\n \n Users\n {isExpanded && {t(\"BILLING\")}}\n \n )}\n
\n \n Users\n {isExpanded && {t(\"SIGN_OUT\")}}\n
\n
\n
\n \n {isExpanded ? (\n
\n \n {isExpanded && {t(\"COLLAPSE\")}}\n
\n ) : (\n \n )}\n
\n
\n
\n )\n}\n\nconst mapStateToProps = (state) => {\n return {\n isExpanded: state.navReducer.isExpanded,\n features: state.authReducer.features,\n }\n}\n\nexport default connect(mapStateToProps)(Navbar)\n","import React from \"react\"\nimport Navbar from \"./Navbar\"\nimport { useHistory } from \"react-router-dom\"\n\nconst NavbarContainer = ({ isAuthenticated, logoutUser, privilege }) => {\n const history = useHistory()\n\n const onSignOutClick = (e) => {\n logoutUser(e)\n history.push(\"/\")\n }\n if (isAuthenticated) {\n return \n }\n return null\n}\n\nexport default NavbarContainer\n","import React, { Component } from \"react\"\nimport { BrowserRouter as Router, Switch, Route } from \"react-router-dom\"\n\nimport Login from \"../sharedComponents/Login\"\nimport ForgotPassword from \"../sharedComponents/ForgotPassword\"\nimport ResetPassword from \"../sharedComponents/ResetPassword\"\n\nimport Organizations from \"./adminView/Organizations\"\nimport CreateAssignment from \"./Assignments/AssignmentCreate\"\nimport AssignmentEdit from \"./Assignments/AssignmentEdit\"\n\nimport Users from \"../organizationView/Users\"\nimport UserFeedbackGraph from \"../d3Components/UserFeedbackGraph\"\nimport AppBar from \"./sharedComponents/AppBar\"\n\nimport { connect } from \"react-redux\"\nimport { signOut } from \"../../actions\"\n\nimport \"../../styles/v2/style.scss\"\nimport PermissionsPage from \"../adminView/PermissionsPage\"\nimport DeepDataDive from \"../adminView/DeepDataDive\"\nimport { ThemeProvider } from \"@material-ui/core/styles\"\n\nimport PermissionsService from \"../../lib/PermissionsSystem\"\n\n// register component\nimport RegisterContainer from \"../sharedComponents/Register/RegisterContainer\"\n\n// navbar 1.1\nimport NavbarContainer from \"./sharedComponents/Navbar/NavbarContainer\"\nimport NavbarMobileContainer from \"../sharedComponents/Navbar/NavbarMobile\"\n\n// Patient Profile 1.1\n\n// Main scss for App.js\nimport \"./App.scss\"\n\nimport asyncComponent from \"../../highOrderComponents/asyncComponent/asyncComponent\"\n\nimport theme from \"../theme\"\n\nconst AsyncScheduler = asyncComponent(() =>\n import(\"../scheduledSessions/index\")\n)\nconst AsyncPatientDashboard = asyncComponent(() =>\n import(\"../v2/dashboards/PatientDashboard\")\n)\nconst AsyncOrgDashboard = asyncComponent(() =>\n import(\"../dashboards/OrganizationDashboard\")\n)\nconst AsyncPractitionerDashboard = asyncComponent(() =>\n import(\"../dashboards/PractitionerDashboard\")\n)\nconst AsyncError404Page = asyncComponent(() => import(\"../Error/404\"))\n\nconst AsyncBillingInformation = asyncComponent(() => import(\"../Billing\"))\n\nclass App extends Component {\n getPrivilege = async () => {\n parseInt(localStorage.getItem(\"privilege\"), 10)\n }\n\n renderRoutes = () => {\n if (this.props.isAuthenticated && this.props.privilege !== undefined) {\n this.getPrivilege()\n if (this.props.privilege === 0) {\n return (\n \n \n {/* */}\n \n \n } />\n }\n />\n }\n />\n }\n />\n }\n />\n }\n />\n {PermissionsService.HasPermission(\"admin.billing.read\") && (\n \n )}\n\n \n {/* Setting the route to the component for the monthly view schedule */}\n \n \n \n \n )\n } else if (this.props.privilege === 1) {\n return (\n \n \n {PermissionsService.HasPermission(\"admin.billing.read\") && (\n \n )}\n }\n />\n }\n />\n {/* } /> */}\n \n }\n />\n }\n />\n \n \n \n \n {/*\n } />*/}\n \n \n \n \n )\n }\n } else {\n return (\n \n
\n \n (\n \n )}\n />\n }\n />\n }\n />\n \n \n \n
\n
\n )\n }\n }\n\n // hides and displays the appbar\n renderAppBar = () => {\n // if the authentication is false, the AppBar hides\n if (!this.props.isAuthenticated) {\n return (\n \n {/*
*/}\n {this.renderRoutes()}\n {/*
*/}\n
\n )\n }\n // else, the AppBar will display\n else {\n // navbar and dynamic components rendered here\n return (\n \n
\n
\n \n\n \n
\n \n
\n \n
\n
{this.renderRoutes()}
\n
\n
\n\n {/*
\n
{this.renderRoutes()}
\n
*/}\n \n )\n }\n }\n\n render() {\n return
{this.renderAppBar()}
\n }\n}\n\nconst mapStateToProps = ({ authReducer, navReducer }) => {\n // console.log(state.authReducer);\n return {\n isAuthenticated: authReducer.isAuthenticated,\n privilege: authReducer.privilege,\n user: authReducer.user,\n org: authReducer.org,\n isExpanded: navReducer.isExpanded,\n }\n}\n\nexport default connect(mapStateToProps, { signOut })(App)\n","import React from \"react\"\nimport { connect } from \"react-redux\"\n\nimport App from \"./App.js\"\nimport AppV2 from \"./v2/App.js\"\n\nconst AppVersionDispatcher = ({ features }) => {\n if (features && features.find((f) => f.is_active && f.name === \"dashboard_v2\")) {\n return \n }\n\n return \n}\n\nconst mapStateToProps = (state) => {\n return {\n features: state.authReducer.features,\n }\n}\n\nexport default connect(mapStateToProps)(AppVersionDispatcher)\n","import React from \"react\"\nimport ReactDOM from \"react-dom\"\nimport { BrowserRouter } from \"react-router-dom\"\n\nimport AppVersionDispatcher from \"./components/AppVersionDispatcher.js\"\nimport \"./assets/App.css\"\nimport { Provider } from \"react-redux\"\nimport { SnackbarProvider } from \"notistack\"\n\nimport store from \"./store\"\n\nReactDOM.render(\n \n \n \n \n \n \n ,\n document.getElementById(\"root\")\n)\n","import React from \"react\";\nimport { Link } from \"react-router-dom\";\n\nimport './index.scss'\nconst successPayment = (props) => {\n return (\n
\n
\n

\n Congratulations!
\n
\n You’ve successfully upgraded to the {props.currInfo?.product_name} Plan
\n
\n Start adding users to grow your organization!
\n

\n
\n
\n )\n}\n\nexport default successPayment","import React from \"react\"\nimport TableCell from \"@material-ui/core/TableCell\"\nimport TableRow from \"@material-ui/core/TableRow\"\nimport IconButton from \"@material-ui/core/IconButton\"\nimport MoreVertIcon from \"@material-ui/icons/MoreVert\"\nimport moment from \"moment\"\nimport { makeStyles } from \"@material-ui/core/styles\"\n\nconst useStyles = makeStyles((theme) => ({\n tableRow: {\n '&:hover': {\n backgroundColor: 'rgba(0, 0, 0, 0.04)',\n },\n },\n statusActive: {\n color: '#4CAF50',\n },\n statusInactive: {\n color: '#f44336',\n },\n}))\n\nexport default function PatientsListRow(props) {\n const classes = useStyles()\n\n const handleClick = () => {\n if (props.onPatientSelect) {\n props.onPatientSelect(props.id)\n }\n }\n\n return (\n \n \n {props.first_name} {props.last_name}\n \n \n {props.id}\n \n {props.email}\n \n {moment(props.created_at).format(\"MMM D, YYYY\")}\n \n \n {props.last_session \n ? moment(props.last_session).format(\"MMM D, YYYY\")\n : \"Never\"\n }\n \n \n )\n} ","import React, { useEffect } from \"react\"\nimport { makeStyles } from \"@material-ui/core/styles\"\nimport Table from \"@material-ui/core/Table\"\nimport TableBody from \"@material-ui/core/TableBody\"\nimport TableCell from \"@material-ui/core/TableCell\"\nimport TableContainer from \"@material-ui/core/TableContainer\"\nimport TableHead from \"@material-ui/core/TableHead\"\nimport TableRow from \"@material-ui/core/TableRow\"\nimport Paper from \"@material-ui/core/Paper\"\nimport TableSortLabel from \"@mui/material/TableSortLabel\"\nimport PatientsListRow from \"./PatientsListRow\"\n\nconst useStyles = makeStyles((theme) => ({\n table: {\n minWidth: 800,\n padding: theme.spacing(1),\n },\n paper: {\n border: \"1px solid rgba(237, 236, 236, 1)\",\n borderRadius: \"0.75rem\",\n marginBottom: theme.spacing(3),\n boxShadow: \"none\",\n },\n sortTableActive: {\n color: \"rgba(34, 144, 209 , 0.87) !important\",\n },\n wideCell: {\n minWidth: \"150px\",\n },\n dataDeep: {\n minWidth: \"100px\",\n color: \"#2290D1\",\n },\n}))\n\nfunction renderTableRows(props, order, orderBy) {\n function descendingComparator(a, b, orderBy) {\n if (b[orderBy] < a[orderBy]) {\n return -1\n }\n if (b[orderBy] > a[orderBy]) {\n return 1\n }\n return 0\n }\n\n function getComparator(order, orderBy) {\n return order === \"desc\"\n ? (a, b) => descendingComparator(a, b, orderBy)\n : (a, b) => -descendingComparator(a, b, orderBy)\n }\n\n if (Array.isArray(props.patients) && props.patients.length > 0) {\n return props.patients.sort(getComparator(order, orderBy)).map((row) => {\n return (\n \n )\n })\n } else if (props.searchString && props.patients.length === 0) {\n return (\n \n \n Your search {\"{props.searchString}\"} did not return any results.\n \n \n )\n } else {\n return (\n \n No patients found\n \n )\n }\n}\n\nexport default function PatientsList(props) {\n const classes = useStyles()\n const [order, setOrder] = React.useState(\"\")\n const [orderBy, setOrderBy] = React.useState(\"\")\n const [tableRows, setTableRows] = React.useState(\n renderTableRows(props, order, orderBy)\n )\n\n useEffect(() => {\n setTableRows(renderTableRows(props, order, orderBy))\n }, [props, order, orderBy])\n\n const handleRequestSort = (event, property) => {\n const isAsc = orderBy === property && order === \"asc\"\n setOrder(isAsc ? \"desc\" : \"asc\")\n setOrderBy(property)\n }\n\n const createSortHandler = (property) => (event) => {\n handleRequestSort(event, property)\n }\n\n return (\n \n \n \n \n \n \n PATIENT NAME\n \n \n \n USER ID\n \n \n \n EMAIL\n \n \n \n \n JOINED\n \n \n \n \n LAST ACTIVE\n \n \n \n \n {tableRows}\n
\n
\n )\n} ","import React, { useState, useEffect } from \"react\";\nimport { useDispatch, useSelector } from 'react-redux'\nimport Footer from \"../dashboards/Footer\";\nimport SuccessPayment from './SuccessPayment'\n\nimport { connect } from \"react-redux\";\n\nimport \"./index.scss\"\nimport { getDetailsForCurrOrg, getActivePatients } from \"../../actions\";\nimport { GetLocalStorageValueSafe } from \"../../lib\";\nimport LoadingSpinner from \"../sharedComponents/LoadingSpinner\";\nimport PatientsList from \"../v2/PatientsList\";\n\nimport moment from \"moment\";\nimport http from \"../../http-common\";\nimport PermissionsService from \"../../lib/PermissionsSystem\";\n\nconst BillingInformation = (props) => {\n const [stripeInfo , setStripeInfo] = useState(\"\")\n const [subscriptionINFO , setSubscriptionINFO] = useState(null)\n const [stripeID , setStripeID] = useState(null)\n const [numberOfPatients , setNumberOfPatients] = useState(0)\n const [subscriptionID , setSubscriptionID] = useState(null)\n const [userID , setUserID] = useState(JSON.parse(GetLocalStorageValueSafe('user_data')).id || \"\")\n const [trial , setTrial] = useState(true)\n const [loadingSpinner , setLoadingSpinner] = useState(true)\n \n // Update to handle three separate patient lists\n const [monthlyPatients, setMonthlyPatients] = useState({\n 1: { month: moment().subtract(1, 'months').format('MMMM'), patients: [] },\n 2: { month: moment().subtract(2, 'months').format('MMMM'), patients: [] },\n 3: { month: moment().subtract(3, 'months').format('MMMM'), patients: [] }\n })\n\n const dispatch = useDispatch()\n const features = useSelector(state => state.authReducer.features)\n\n const shouldShowBilling = !(features && features.find((f) => f.is_active && f.name === \"is_billing_hidden\"))\n\n useEffect(() => {\n dispatch(getActivePatients())\n .then(patientsData => {\n setMonthlyPatients({\n 1: { \n month: moment().subtract(1, 'months').format('MMMM'), \n patients: patientsData[0] || [] \n },\n 2: { \n month: moment().subtract(2, 'months').format('MMMM'), \n patients: patientsData[1] || [] \n },\n 3: { \n month: moment().subtract(3, 'months').format('MMMM'), \n patients: patientsData[2] || [] \n }\n });\n })\n .catch(error => {\n console.log(\"Error fetching patients\")\n })\n }, [dispatch])\n\n //params \n const params = new URLSearchParams(props.location.search).get(\"success\")\n\n useEffect(() => {\n if(stripeID) {\n createPortalSession()\n }\n },[stripeID])\n\n useEffect(() => {\n if(subscriptionID) {\n getSubscriptionsDetails()\n }\n },[stripeID , stripeInfo])\n\n\n useEffect(() => {\n (async () => {\n const {userEntry , noOfPatients } = await props.getDetailsForCurrOrg()\n setStripeID(userEntry.stripe_id)\n setSubscriptionID(userEntry.subscription)\n setLoadingSpinner(false)\n setTrial(userEntry.trial)\n setNumberOfPatients(noOfPatients)\n })();\n },[])\n\n useEffect(() => {\n if(props.user) {\n setUserID(props.user.id)\n }\n },[props.user])\n\n const getSubscriptionsDetails = async () => {\n const payload = {\n url: `/billing/retrieve_an_invoice/${subscriptionID}`,\n method: \"get\",\n }\n const result = await http(payload)\n if (!result) {\n console.log(result.error.message);\n } else {\n setSubscriptionINFO(result?.data || \"\")\n }\n }\n const createPortalSession = async () => {\n const payload = {\n url: `/billing/create-customer-portal-session`,\n method: \"post\",\n data : { stripe_id : stripeID },\n }\n const result = await http(payload)\n if (!result) {\n console.log(result.error.message);\n } else {\n setStripeInfo(result?.data || \"\")\n }\n };\n \n const Billing = () => (\n
\n {subscriptionID &&
\n
\n

\n Your Subscription\n

\n
\n {subscriptionID && subscriptionINFO && subscriptionINFO?.status !== 'canceled' &&
\n

\n {subscriptionINFO?.product_name} {subscriptionINFO?.items?.data[subscriptionINFO?.items?.data?.length -1 ]?.price?.recurring?.interval === 'month' ? 'Monthly' :'Yearly'}\n

\n

\n last updated on {moment.unix(subscriptionINFO?.current_period_start).local().format(\"DD MMM YYYY\")}\n

\n
}\n {subscriptionID && subscriptionINFO && subscriptionINFO?.status !== 'canceled' &&
\n

\n {numberOfPatients} / {subscriptionINFO?.quantity} {subscriptionINFO?.quantity > 1 ? 'users' : 'user'} \n

\n

\n last updated on {moment.unix(subscriptionINFO?.current_period_start).local().format(\"DD MMM YYYY\")}\n

\n
}\n
\n {subscriptionINFO?.status === 'trialing' && subscriptionINFO?.canceled_at === null &&

\n After your free trial ends on {moment.unix(subscriptionINFO?.current_period_end).local().format(\"DD MMM YYYY\")},

this plan will continue automatically.\n

}\n {subscriptionID && subscriptionINFO && subscriptionINFO?.canceled_at !== null &&

\n You've cancelled this plan. It will end automatically on {moment.unix(subscriptionINFO?.current_period_end).local().format(\"DD MMM YYYY\")}.\n

}\n
\n {(subscriptionID && subscriptionINFO && subscriptionINFO?.canceled_at === null) \n &&\n
\n

\n Your next bill\n

\n
\n

\n CA$ { (subscriptionINFO?.plan?.amount / 100) * (subscriptionINFO?.quantity)} \n

\n
\n

\n on {moment.unix(subscriptionINFO?.current_period_end).local().format(\"DD MMM YYYY\")}\n

\n {stripeID && subscriptionID && \n \n view details\n \n }\n
\n
\n
\n }\n
\n }\n {/*subscriptionID && subscriptionINFO?.status !== 'canceled' &&
\n

\n Get even more out of the Neurofit features you need.
Upgrade your subscription today.\n

\n

\n Want even more out of Neurofit? View all plans\n

\n
*/}\n {!subscriptionID && trial &&
\n \n
\n }\n {!subscriptionID && !trial &&
\n \n
\n }\n {stripeID && subscriptionID &&
\n \n Upgrade your subscription\n \n

\n \n View billing history\n \n

\n \n Update billing method\n \n

\n
}\n
\n )\n if(props.isAuthenticated) {\n if(loadingSpinner) {\n return ;\n }\n if(params) {\n return ;\n }\n return (\n <>\n {shouldShowBilling && PermissionsService.HasPermission(\"admin.billing.read\") && Billing()}\n \n
\n
\n

Active Patients: {monthlyPatients[1].month}

\n {}}\n />\n
\n \n
\n

Active Patients: {monthlyPatients[2].month}

\n {}}\n />\n
\n \n
\n

Active Patients: {monthlyPatients[3].month}

\n {}}\n />\n
\n
\n \n )\n }\n else { \n return <>\n }\n \n};\n\nconst mapStateToProps = (state) => {\n return {\n isAuthenticated: state.authReducer.isAuthenticated,\n privilege: state.authReducer.privilege,\n user: state.authReducer.user,\n org: state.authReducer.org,\n };\n};\n\nconst mapDispatchToProps = (dispatch) => {\n return {\n getDetailsForCurrOrg: () => dispatch(getDetailsForCurrOrg()),\n };\n};\n\nexport default connect(mapStateToProps , mapDispatchToProps)(BillingInformation);\n","export const ARCHIVE_MODAL = \"ARCHIVE_MODAL\";\nexport const EDIT_USERS_MODAL = \"EDIT_USERS_MODAL\";\nexport const ADD_NOTES_MODAL = \"ADD_NOTES_MODAL\";\nexport const EDIT_SESSION_MODAL = \"EDIT_SESSION_MODAL\";\nexport const DELETE_SESSION_MODAL = \"DELETE_SESSION_MODAL\";\nexport const RECURRING_SESSION_MODAL = \"RECURRING_SESSION_MODAL\";\nexport const NOT_ENOUGH_USERS_MODAL = \"NOT_ENOUGH_USERS_MODAL\";\n","class Utility {\n static isFloat(n) {\n return (n === +n && n !== (n | 0)) | Utility.isInteger(n);\n }\n\n static isInteger(n) {\n return n === +n && n === (n | 0);\n }\n\n /**\n * Uses a regular expression to escape characters within a regex string\n * @see https://stackoverflow.com/a/26156888/1725883\n * @param {String} strToEscape\n */\n static escapeRegExp(strToEscape) {\n // Escape special characters for use in a regular expression\n return strToEscape.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, \"\\\\$&\");\n }\n\n /**\n * Trims a character from a string, returning a new string\n * @see https://stackoverflow.com/a/26156888/1725883\n * @param {String} origString The string to trim\n * @param {String} charsToTrim The characters to trim from the string, will be escaped before passing to regex\n */\n static trimChar(origString, charsToTrim) {\n charsToTrim = Utility.escapeRegExp(charsToTrim);\n var regEx = new RegExp(\n \"^[\" + charsToTrim + \"]+|[\" + charsToTrim + \"]+$\",\n \"g\"\n );\n return origString.replace(regEx, \"\");\n }\n\n /**\n * Trims characters from the right of the string to the first character that does not match the list, returns a new string\n * @see https://stackoverflow.com/a/26156888/1725883\n * @param {String} origString The string to trim\n * @param {String} charsToTrim The characters to trim from the string, will be escaped before passing to regex\n */\n static rTrimChar(origString, charsToTrim) {\n charsToTrim = Utility.escapeRegExp(charsToTrim);\n var regEx = new RegExp(\"[\" + charsToTrim + \"]+$\", \"g\");\n return origString.replace(regEx, \"\");\n }\n\n /**\n * Trims characters from the left of the string to the first character that does not match the list, returns a new string\n * @see https://stackoverflow.com/a/26156888/1725883\n * @param {String} origString The string to trim\n * @param {String} charsToTrim The characters to trim from the string, will be escaped before passing to regex\n */\n static lTrimChar(origString, charsToTrim) {\n charsToTrim = Utility.escapeRegExp(charsToTrim);\n var regEx = new RegExp(\"^[\" + charsToTrim + \"]+\", \"g\");\n return origString.replace(regEx, \"\");\n }\n}\n\nexport { Utility };\n\nexport const updateObject = (oldObject, updateProp) => {\n return {\n ...oldObject,\n ...updateProp,\n };\n};\n\nexport const _calculateAge = (birthday) => { // birthday is a date\n var ageDifMs = Date.now() - birthday.getTime();\n var ageDate = new Date(ageDifMs); // miliseconds from epoch\n return Math.abs(ageDate.getUTCFullYear() - 1970);\n}\n","var _path;\n\nvar _excluded = [\"title\", \"titleId\"];\n\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgAccount(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 29,\n height: 29,\n viewBox: \"0 0 29 29\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M14.5 0.75C6.91 0.75 0.75 6.91 0.75 14.5C0.75 22.09 6.91 28.25 14.5 28.25C22.09 28.25 28.25 22.09 28.25 14.5C28.25 6.91 22.09 0.75 14.5 0.75ZM14.5 4.875C16.7825 4.875 18.625 6.7175 18.625 9C18.625 11.2825 16.7825 13.125 14.5 13.125C12.2175 13.125 10.375 11.2825 10.375 9C10.375 6.7175 12.2175 4.875 14.5 4.875ZM14.5 24.4C11.0625 24.4 8.02375 22.64 6.25 19.9725C6.29125 17.2362 11.75 15.7375 14.5 15.7375C17.2363 15.7375 22.7088 17.2362 22.75 19.9725C20.9763 22.64 17.9375 24.4 14.5 24.4Z\",\n fill: \"#8FCAED\"\n })));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgAccount);\nexport default __webpack_public_path__ + \"static/media/account.c31c6b49.svg\";\nexport { ForwardRef as ReactComponent };","import React, { useEffect, useRef } from \"react\";\nimport { useForm, Controller } from \"react-hook-form\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport TextField from \"@material-ui/core/TextField\";\nimport Input from \"@material-ui/core/Input\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Alert from \"@material-ui/lab/Alert\";\nimport FormControl from \"@material-ui/core/FormControl\";\nimport FormLabel from \"@material-ui/core/FormLabel\";\nimport DateFnsUtils from \"@date-io/date-fns\";\nimport Select from \"@material-ui/core/Select\";\nimport MenuItem from \"@material-ui/core/MenuItem\";\nimport Button from \"@material-ui/core/Button\";\nimport moment from \"moment\";\nimport Grid from \"@material-ui/core/Grid\";\nimport {\n MuiPickersUtilsProvider,\n KeyboardDatePicker,\n} from \"@material-ui/pickers\";\nimport * as yup from \"yup\";\nimport { yupResolver } from \"@hookform/resolvers/yup\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport useMediaQuery from \"@material-ui/core/useMediaQuery\";\nimport { useTheme } from \"@material-ui/core/styles\";\nimport { useStore } from \"react-redux\";\nimport { getUsersByOrg, updateUser } from \"../../../actions\";\nimport \"./index.scss\";\nimport { Education, UserTypes , DIAGNOSIS } from \"../../../lib/Constants\";\n\nconst useStyles = makeStyles((theme) => ({\n tiltStyle: {\n maxWidth: \"800px\",\n margin: \"2.5rem auto\",\n border: `2.5px solid #16A0D8`,\n borderRadius: \"10px\",\n outline: \"none\",\n height: \"90%\",\n },\n paper: {\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"flex-start\",\n maxWidth: \"800px\",\n width: \"auto\",\n height: \"auto\",\n // backgroundColor: '#fafafa',\n // padding: theme.spacing(6),\n padding: \"0\",\n // overflow: 'auto',\n margin: \"auto 0\",\n borderRadius: \"10px\",\n outline: \"none\",\n },\n form: {\n width: \"auto\",\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n padding: \"2.5rem 3.5rem\",\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n display: \"flex\",\n flexDirection: \"row\",\n flexWrap: \"wrap\",\n justifyContent: \"space-between\",\n \"@media (max-width: 600px)\": {\n padding: \"0\",\n },\n },\n addBtn: {\n marginTop: theme.spacing(1),\n backgroundColor: theme.palette.success.main,\n color: theme.palette.success.contrastText,\n \"&:hover\": {\n backgroundColor: theme.palette.success.light,\n },\n },\n messageContainer: {\n marginTop: theme.spacing(3),\n },\n inlineInput: {\n width: \"100%\",\n },\n radioContainer: {\n marginTop: theme.spacing(1),\n },\n radioGroup: {\n flexDirection: \"row\",\n },\n personIcon: {\n fontSize: \"3.5rem\",\n margin: \"0 auto\",\n backgroundColor: \"#E8F5FB\",\n borderRadius: \"50%\",\n padding: \"5px\",\n border: \"2px solid #16A0D8\",\n },\n heading: {\n textAlign: \"center\",\n padding: \"10px 0\",\n marginTop: \"0\",\n marginBottom: \"0\",\n },\n input_container: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n },\n}));\n\nconst USER_TYPES = {\n Patient: \"patient\",\n Practitioner: \"practitioner\",\n};\n\nconst OCCUPATION_TYPES = [\n { label: \"General Practitioner\", value: \"therapist\" },\n { label: \"Occupational Therapist\", value: \"ot\" },\n { label: \"Physical Therapist\", value: \"pt\" },\n { label: \"Speech Language Pathologist\", value: \"slp\" },\n];\n\nconst schema = yup.object().shape({\n email: yup.string().trim().email(),\n firstName: yup.string().trim().required().label(\"First Name\"),\n lastName: yup.string().trim().required().label(\"Last Name\"),\n gender: yup.string().trim().optional().label(\"Gender\"),\n dob: yup.string().label(\"Date of Birth\"),\n user_type: yup.string().optional(),\n practitioner: yup.string().optional().label(\"practitioner\"),\n user_password: yup.string().optional(),\n passwordConfirmation: yup.string().optional(),\n\n education: yup\n .string()\n .trim()\n .label(\"Education\"),\n diagnosis: yup\n .string()\n .trim()\n .label(\"Diagnosis\"),\n\n occupation: yup\n .string()\n .optional()\n .trim()\n .test(\"occupationTest\", function (value) {\n const { createError } = this;\n if(value === undefined) {\n return true;\n }else {\n const isContain = OCCUPATION_TYPES.filter(i => i.value.toLowerCase() === value.toLowerCase())\n if (!isContain) {\n return createError({\n message: \"Please, make sure that the Occupation is supported\",\n });\n } else {\n return true;\n }\n }\n \n })\n .label(\"Occupation\"),\n});\nexport const initialState = {\n user_type: USER_TYPES.Patient,\n email: \"\",\n firstName: \"\",\n lastName: \"\",\n dob: new Date(),\n gender: \"\",\n diagnosis: \"\",\n education : \"\",\n password: \"\",\n passwordConfirm: \"\",\n};\n\nexport default function EditUser(props) {\n const classes = useStyles();\n const theme = useTheme();\n const store = useStore();\n const dispatch = useDispatch();\n\n const responseMessage = useSelector((state) => state.userReducer.response);\n\n const { register, handleSubmit, setValue, errors, reset, control } = useForm({\n resolver: yupResolver(schema),\n });\n\n const open = useSelector((state) => state.modalReducer.modalProps.open);\n const fullScreen = useMediaQuery(theme.breakpoints.down(\"sm\"));\n\n let [user_type, handleUserTypeChanged] = React.useState(USER_TYPES.Patient);\n let [roels, setRoles] = React.useState([]);\n let [dob, handleDobChanged] = React.useState(new Date());\n\n useEffect(() => {\n const value = props.infoUser;\n let actualValue = {};\n var roles = value.roles.map(function(item) {\n return item['role_name'];\n });\n actualValue = {\n ...props.infoUser,\n user_type: value.user_type,\n email: value.email,\n firstName: value.first_name,\n lastName: value.last_name,\n dob: value.dob.split(\"T\")[0],\n gender: value.gender.toLowerCase(),\n practitioner : value.Patient?.practitioner_id || null,\n diagnosis : (value.Patient?.diagnosis !== 'N/A' ? value.Patient?.diagnosis : \"\") || \"\",\n education : (value.Patient?.education !== 'N/A' ? value.Patient?.education : \"\") || \"\"\n };\n setRoles(roles)\n handleDobChanged(actualValue.dob);\n handleUserTypeChanged(value.user_type);\n reset({ ...actualValue });\n }, []);\n\n const renderFormError = (errorMessage) => {\n return (\n
\n {errorMessage}\n
\n );\n };\n\n const renderResponseMessage = () => {\n if (responseMessage.status === 200) {\n return (\n
\n \n {responseMessage.message}\n \n
\n );\n } else if (responseMessage.status === 400) {\n return (\n
\n {responseMessage.message}\n
\n );\n }\n };\n\n const onSubmit = async (data) => {\n delete props.infoUser.email;\n delete props.infoUser.Patient\n // Prepare the data that will be saved for the patient\n let req_data = {\n ...props.infoUser,\n first_name: data.firstName || \"\",\n last_name: data.lastName || \"\",\n gender: data.gender || \"\",\n dob: data.dob?.split(\"T\")[0] || moment().toISOString().split(\"T\")[0],\n diagnosis: data.diagnosis || \"\",\n education: data.education || \"\",\n is_patient: user_type === USER_TYPES.Patient.toUpperCase(),\n password:\n user_type === USER_TYPES.Patient.toUpperCase() ? undefined : data.user_password,\n occupation:\n user_type === USER_TYPES.Patient.toUpperCase() ? undefined : data.occupation,\n practitioner : user_type === USER_TYPES.Patient.toUpperCase() ? data.practitioner : null\n };\n let result = await dispatch(updateUser(req_data.id, req_data));\n if (result !== undefined && result?.message.includes(\"updated\")) {\n await dispatch(getUsersByOrg());\n props.toggleEditUserModal();\n }\n };\n\n return (\n
\n
\n \n {/* first name */}\n \n \n \n {/* last name */}\n \n \n \n\n {/* email */}\n \n \n \n {(user_type === \"ORG_USER\" || roels.includes(UserTypes[1].value2)) && (\n <>\n {/* Occupation */}\n \n \n Occupation\n (\n {\n onChange(e);\n }}\n >\n {OCCUPATION_TYPES &&\n OCCUPATION_TYPES.map((el) => (\n \n {el.label}\n \n ))}\n \n )}\n />\n \n \n {/* Gender & Pronouns options */}\n \n \n Sex\n (\n {\n onChange(e);\n }}\n >\n Female\n Male\n Other\n \n )}\n />\n \n \n \n \n \n \n \n \n \n )}\n {(user_type === \"PATIENT\" || roels.length === 0) && (\n <>\n {/* date of birth */}\n \n \n \n {\n handleDobChanged(date);\n }}\n KeyboardButtonProps={{\n \"aria-label\": \"change date\",\n }}\n />\n \n \n\n {/* Gender & Pronouns options */}\n \n \n Sex\n (\n {\n onChange(e);\n }}\n >\n Female\n Male\n Other\n \n )}\n />\n \n \n \n \n \n Select Practitioner\n \n (\n \n onChange(e)\n }\n >\n {props.practitioners &&\n props.practitioners.map((prac) => {\n return (\n \n {prac.first_name.concat(\" \" + prac.last_name)}\n \n );\n })}\n \n )}\n />\n \n \n \n \n Education\n (\n {\n onChange(e);\n }}\n >\n {\n Education && Education.map(item => (\n \n {item}\n \n ))\n }\n \n )}\n />\n \n \n \n \n Diagnosis\n (\n {\n onChange(e);\n }}\n >\n {\n DIAGNOSIS && DIAGNOSIS.map(item => (\n \n {item}\n \n ))\n }\n \n )}\n />\n \n \n \n )}\n \n
\n {renderResponseMessage()}\n {errors.email && renderFormError(errors.email.message)}\n {errors.firstName && renderFormError(errors.firstName.message)}\n {errors.lastName && renderFormError(errors.lastName.message)}\n {errors.education && renderFormError(errors.education.message)}\n {errors.diagnosis && renderFormError(errors.diagnosis.message)}\n {errors.practitioner && renderFormError(errors.practitioner.message)}\n {errors.occupation && renderFormError(errors.occupation.message)}\n {errors.gender && renderFormError(errors.gender.message)}\n {errors.user_password && renderFormError(errors.user_password.message)}\n {errors.passwordConfirmation &&\n renderFormError(errors.passwordConfirmation.message)}\n\n
\n \n \n Save\n \n
\n
\n );\n}\n","import Paper from \"@material-ui/core/Paper\";\nimport {\n Checkbox,\n FormControl,\n ListSubheader,\n MenuItem,\n Select,\n InputLabel,\n Input\n} from \"@mui/material\";\nimport MaterialTable, { MTableBodyRow, MTableToolbar } from \"material-table\";\nimport React from \"react\";\n\nconst CustomMaterialTable = ({\n title,\n columns,\n customMenuItem,\n actions,\n className,\n customClassNameSelect,\n viewOptionClass,\n handleSelectChange,\n data,\n selectOptions,\n onRowClick,\n onRowDoubleClick,\n UserTypes,\n UserStatus,\n onChangeSelectedRowData,\n}) => {\n return (\n
\n (\n onRowClick(e, props)}\n onDoubleClick={(e) => onRowDoubleClick(e, props)}\n />\n ),\n Toolbar: (props) => (\n \n \n Filter\n {\n return (\n

\n {\"View Option \" + selected.length}\n

\n );\n }}\n style={{ width: \"151\", height: \"40px\", marginTop: \"10px\" }}\n className={customClassNameSelect}\n inputProps={{ \"aria-label\": \"Without label\" }}\n input={}\n MenuProps={customMenuItem}\n >\n \n Account Type\n \n {UserTypes &&\n UserTypes.map((type) => (\n \n -1}\n />\n {type.label}\n \n ))}\n \n Account Status\n \n {UserStatus &&\n UserStatus.map((status) => {\n return (\n \n -1}\n />\n {status.label}\n \n );\n })}\n \n \n \n
\n ),\n }}\n localization={{\n pagination: {\n labelDisplayedRows: \"Showing {from}-{to} of {count} items\",\n },\n toolbar: {\n searchTooltip: \"Quick Filter\",\n searchPlaceholder: \"Search\",\n nRowsSelected: \"\",\n },\n }}\n options={{\n search: true,\n selection: false,\n exportButton: false,\n headerStyle: {\n textAlign: \"left\",\n minWidth: \"100px\",\n position: \"sticky\",\n top: 0,\n backgroundColor: \"#D0EEFB\",\n color: \"#555\",\n fontFamily: \"OpenSans-SemiBold\",\n lineHeight: \"16px\",\n },\n rowStyle: (rowData) => ({\n transition: \"ease all .5s\",\n backgroundColor:\n // (selectedRow === rowData.id) ?\n // '#EEE' :\n // (rowData.status === \"ARCHIVED\") ?\n // '#DDD':\n \"#FFF\",\n padding: \"15px\",\n fontFamily: \"OpenSans-Regular\",\n fontSize: \"12px\",\n fontWeight: \"400\",\n lineHeight: \"16px\",\n }),\n paging: true,\n pageSize: 10,\n paginationType: \"stepped\",\n emptyRowsWhenPaging: false,\n showFirstLastPageButtons: false,\n pageSizeOptions: [], // [10, 25, 50, 100]\n searchFieldStyle: {\n borderRadius: \"5px\",\n width: \"355px\",\n height: \"40px\",\n backgroundColor: \"#FFFFFF\",\n },\n tableLayout: \"auto\"\n }}\n onSelectionChange={(rows) => onChangeSelectedRowData(rows)}\n />\n \n );\n};\n\nexport default CustomMaterialTable;\n","import React from \"react\";\nimport \"./NotEnoughNF.scss\";\nimport Button from \"@material-ui/core/Button\";\nimport PermissionsService from '../../../lib/PermissionsSystem'\n\nfunction NotEnoughNF(props) {\n return (\n
\n
\n {props.notEnoughNF}\n
\n\n {\n PermissionsService.HasPermission(\"admin.billing.read\")\n ?\n
\n \n Cancel\n \n \n
\n :\n
\n \n Cancel\n \n
\n }\n \n
\n );\n}\n\nexport default NotEnoughNF;\n","import React, { useState } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@material-ui/core/styles\";\nimport { withRouter } from \"react-router-dom\";\nimport { connect } from \"react-redux\";\n\nimport FormControlLabel from \"@material-ui/core/FormControlLabel\";\nimport Switch from \"@material-ui/core/Switch\";\nimport { Link } from \"react-router-dom\";\nimport ArchiveIcon from \"@material-ui/icons/Archive\";\nimport UnarchiveIcon from \"@material-ui/icons/Unarchive\";\nimport Button from \"@material-ui/core/Button\";\nimport {\n toggleLogin,\n archiveUser,\n updateUser,\n getUsersByOrg,\n} from \"../../actions/index\";\nimport { ReactComponent as AccountImage } from \"../../assets/images/account.svg\";\nimport { IconButton } from \"@material-ui/core\";\nimport PermissionsService from \"../../lib/PermissionsSystem\";\nimport { Debug } from \"../../lib\";\nimport EditUser from \"./EditUsers\";\n\nimport Store from \"../../store\";\nimport LoadingSpinner from \"../sharedComponents/LoadingSpinner\";\nimport CustomMaterialTable from \"../sharedComponents/CustomMaterialTable\";\nimport CustomDialog from \"../sharedComponents/CustomDialog\";\nimport {\n ARCHIVE_MODAL,\n EDIT_USERS_MODAL,\n NOT_ENOUGH_USERS_MODAL\n} from \"../sharedComponents/Modals/constants\";\nimport withModals from \"../sharedComponents/Modals/withModals\";\nimport { UserTypes, UserStatus, USER_TYPES } from \"../../lib/Constants\";\nimport \"./PatientsList.scss\";\nimport moment from \"moment\";\nimport { Edit } from \"@mui/icons-material\";\nimport { withSnackbar } from \"notistack\";\nimport NotEnoughNF from \"../practitionersManagement/addUsersStepper/NotEnoughNF\";\n\nconst styles = (theme) => ({\n table: {\n // minWidth: 650,\n maxWidth: \"100%\",\n margin: \"auto\",\n padding: theme.spacing(1),\n },\n paper: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(3),\n },\n // tableHead: {\n // backgroundColor: theme.palette.primary.main\n // backgroundColor: 'red'\n // },\n // tableHeadCell: {\n // color: theme.palette.common.white\n // color: 'red !important'\n // },\n archive: {\n color: \"#191919\",\n fontSize: \"22pt\",\n \"&:hover\": {\n color: \"#149FD8\",\n },\n },\n unarchive: {\n color: \"#149FD8\",\n fontSize: \"22pt\",\n },\n iconStyle: {\n color: \"#555555\",\n textAlign: \"center\",\n },\n select: {\n background: \"#FFFFFF\",\n border: \"2px solid #8FCAED\",\n borderRaduis: \"5px\",\n \"&:before\": {\n borderColor: \"white\",\n },\n \"&:after\": {\n borderColor: \"white\",\n },\n \"&:not(.Mui-disabled):hover::before\": {\n borderColor: \"white\",\n },\n },\n MenuItem: {\n \"&:hover\": {\n borderColor: \"#FFFFFF\",\n },\n },\n titleNF : {\n fontSize: \"30px\",\n width: \"auto\",\n lineHeight: \"37px\",\n margin: \"20px auto\",\n fontFamily: \"MontserratBold\",\n color: \"#333437\",\n }\n});\n\nclass PractitionersList extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n selectedDate: new Date(),\n is_archive_shown: false,\n selectedRowData: null,\n is_loaded: Array.isArray(props.users),\n is_error: false,\n selectOptions: [],\n roles : [],\n practitioners : [] ,\n NFErrorMsg : null\n };\n\n this.getTableSettings = this.getTableSettings.bind(this);\n this.handleDataLoad = this.handleDataLoad.bind(this);\n }\n\n async componentDidMount() {\n if (!this.state.is_loaded) {\n this.handleDataLoad();\n }\n }\n\n async componentDidUpdate (prevProps , prevState) {\n if(this.props.users && this.state.practitioners.length === 0){\n const prac = this.props.users.filter((x) => { \n var roles = x.roles.map(function(item) {\n return item['role_name'];\n });\n return roles.includes(UserTypes[1].value2)\n });\n if(prac && prac.length !== 0) { \n this.setState({\n ...this.state ,\n practitioners : prac\n })\n }\n } \n }\n\n handleSelectChange = (event) => {\n const {\n target: { value },\n } = event;\n\n this.setState({\n ...this.state,\n selectOptions: typeof value === \"string\" ? value.split(\",\") : value,\n });\n };\n\n async handleDataLoad() {\n try {\n this.setState({\n ...this.state,\n is_loaded: false,\n is_error: false,\n });\n await this.props.dispatch(getUsersByOrg());\n this.setState({\n ...this.state,\n is_loaded: true,\n is_error: false,\n });\n } catch (e) {\n Debug.log(e);\n this.setState({\n ...this.state,\n is_loaded: true,\n is_error: true,\n });\n }\n }\n\n getTableSettings() {\n const dispatch = Store.dispatch;\n\n let tableColumns = [\n {\n title: \"Report\",\n editable: \"never\",\n render: (row) => {\n return (\n \n \n \n \n \n );\n },\n },\n {\n title: \"Type\",\n field: \"roles\",\n editable: \"never\",\n render: (row) => {\n if(row.roles.length === 0) {\n return (\n {`${\n row.user_type === \"PATIENT\"&&\"Patient\"\n }`}\n );\n }else {\n const roles = row?.roles?.map(i=>{\n\n let role = \"\"\n if(i.role_name === UserTypes[1].value2) {\n role += UserTypes[1].label\n }else if(i.role_name === UserTypes[2].value) {\n role += UserTypes[2].label\n }else if(i.role_name === UserTypes[3].value) {\n role += UserTypes[3].label\n }\n return (<>{`${\n role\n }`}
)\n })\n return roles\n }\n \n },\n },\n {\n title: \"Name\",\n field: \"first_name\",\n editable: \"never\",\n render: (row) => {\n return (\n {`${row.first_name.trim()} ${row.last_name.trim()}`}\n );\n },\n },\n {\n title: \"Birth Date\",\n field: \"dob\",\n editable: \"never\",\n render: (row) => {\n return (\n {`${\n row.user_type === \"PATIENT\"\n ? moment(row.dob.split(\"T\")[0]).format(\"YYYY-MM-DD\") || \"\"\n : \"-\"\n }`}\n );\n },\n },\n {\n title: \"Gender\",\n field: \"gender\",\n editable: \"never\",\n render: (row) => {\n return {`${row.gender || \"\"}`};\n },\n },\n {\n title: \"Email\",\n field: \"email\",\n editable: \"never\",\n },\n {\n title: \"Login Status\",\n field: \"status\",\n editable: \"always\",\n render: (row) => {\n return row.user_type === \"PATIENT\" ? (\n {\n //row.status = row.status !== \"ENABLED\" ?

Can login

:

Can’t login

;\n row.status =\n row.status !== \"ENABLED\" ? \"ENABLED\" : \"DISABLED\";\n try {\n const response = await dispatch(toggleLogin(row.id, row.status === \"ENABLED\")); \n if(response) { \n row.status =\n row.status !== \"ENABLED\" ? \"ENABLED\" : \"DISABLED\";\n }\n } catch (e) {\n row.status = \"DISABLED\";\n this.props.enqueueSnackbar(e.response?.data?.message || \"You are not allow to modify patient login status\", {variant : 'error'})\n }\n }}\n disabled={\n row.id === PermissionsService.GetUserID() ||\n row.status === \"ARCHIVED\"\n ? true\n : row.user_type === \"PATIENT\" ||\n row.user_type === \"ORG_USER\"\n ? !PermissionsService.HasPermission(\n \"org.admin.patients.manage\"\n )\n : !PermissionsService.HasPermission(\n \"org.admin.users.update\"\n )\n }\n name=\"status\"\n sx={{\n \"& .MuiSwitch-switchBase.Mui-checked\": {\n color: \"#8FCAED\",\n },\n }}\n />\n }\n labelPlacement={\"start\"}\n label={\n row.status === \"ENABLED\" ? (\n

Can login

\n ) : (\n

Can’t login

\n )\n }\n />\n ) : (\n

\n Not applicable{\" \"}\n ?\n

\n );\n },\n },\n ];\n\n const canArchive =\n (this.props.user_types == undefined &&\n (PermissionsService.HasPermission(\"org.admin.patients.archive\") ||\n PermissionsService.HasPermission(\"org.admin.users.archive\"))) ||\n (this.props.user_types !== undefined &&\n ((this.props.user_types.includes(\"PATIENT\") &&\n PermissionsService.HasPermission(\"org.admin.patients.archive\")) ||\n (this.props.user_types.includes(\"USER\") &&\n PermissionsService.HasPermission(\"org.admin.users.archive\")) ||\n (this.props.user_types.includes(\"ORG_USER\") &&\n PermissionsService.HasPermission(\"org.admin.users.archive\"))));\n const row = this.state.selectedRowData;\n if (canArchive) {\n tableColumns.push(\n {\n title: \"Actions\",\n field: \"is_archive\",\n editable: \"never\",\n render: (row) => {\n var roles = row.roles.map(function(item) {\n return item['role_name'];\n });\n if (\n (row.id != PermissionsService.GetUserID()) &\n (row.user_type === \"PATIENT\" &&\n PermissionsService.HasPermission(\n \"org.admin.patients.archive\"\n )) ||\n (row.user_type === \"USER\" &&\n PermissionsService.HasPermission(\"org.admin.users.archive\")) ||\n (row.user_type === \"ORG_USER\" &&\n PermissionsService.HasPermission(\"org.admin.users.archive\")) ||\n (row.user_type === \"ORG_ADMIN\" &&\n PermissionsService.HasPermission(\"org.admin.users.archive\"))\n ) {\n // If the user not archived, show the archive button\n if (row.status != \"ARCHIVED\") {\n return (\n
\n {\n this.setState({\n selectedRowData: row,\n roles : roles\n });\n this.props.toggleEditUserModal();\n }}\n />\n {\n this.setState({\n selectedRowData: row,\n roles : roles\n });\n this.props.toggleEditUserModal();\n }}\n >\n {\"Edit\"}\n

\n {\n this.setState({\n selectedRowData: row,\n });\n this.props.toggleArchiveModal();\n }}\n />\n {\n this.setState({\n selectedRowData: row,\n });\n this.props.toggleArchiveModal();\n }}\n >\n {\"Archive\"}\n

\n
\n );\n }\n // If the user is archived, show the unarchive button\n else {\n return (\n
\n \n

{\"Edit\"}

\n {\n this.setState({\n selectedRowData: row,\n });\n this.props.toggleArchiveModal();\n }}\n />\n

{\"Unarchive\"}

\n
\n );\n }\n }\n },\n },\n );\n } else {\n return
;\n }\n\n return tableColumns;\n }\n\n onRowClick = (e, props) => {\n console.log(`Setting selected row to ${props.data.id}`);\n };\n\n onRowDoubleClick = (e, props) => {\n const row = props.data;\n this.props.history.push(`/user-profile/${row.id}`);\n };\n\n onRemoveSelectedClick = (e, data) => {\n this.setState({\n selectedRowData: data[0],\n });\n this.props.toggleArchiveModal();\n };\n\n onChangeSelectedRowData = (rows) => {\n\n this.setState({\n selectedRowData: rows[0],\n });\n };\n upgradePlanes = () => {\n this.props.history.push(\"/billing\")\n this.setState({\n NFErrorMsg : null\n })\n this.props.toggleErrorModalNF()\n }\n\n handleReset = () => {\n this.setState({\n NFErrorMsg : null\n })\n this.props.toggleErrorModalNF()\n }\n\n onArchiveUser = async () => {\n const canArchive =\n (this.props.user_types == undefined &&\n (PermissionsService.HasPermission(\"org.admin.patients.archive\") ||\n PermissionsService.HasPermission(\"org.admin.users.archive\"))) ||\n (this.props.user_types !== undefined &&\n ((this.props.user_types.includes(\"PATIENT\") &&\n PermissionsService.HasPermission(\"org.admin.patients.archive\")) ||\n (this.props.user_types.includes(\"USER\") &&\n PermissionsService.HasPermission(\"org.admin.users.archive\")) ||\n (this.props.user_types.includes(\"ORG_USER\") &&\n PermissionsService.HasPermission(\"org.admin.users.archive\"))) ||\n (this.props.user_types.includes(\"ORG_ADMIN\") &&\n PermissionsService.HasPermission(\"org.admin.users.archive\")));\n const row = this.state.selectedRowData;\n if (canArchive) {\n if (\n (row.id != PermissionsService.GetUserID()) &\n (row.user_type === \"PATIENT\" &&\n PermissionsService.HasPermission(\"org.admin.patients.archive\")) ||\n (row.user_type === \"USER\" &&\n PermissionsService.HasPermission(\"org.admin.users.archive\")) ||\n (row.user_type === \"ORG_USER\" &&\n PermissionsService.HasPermission(\"org.admin.users.archive\")) || \n (row.user_type === \"ORG_ADMIN\" &&\n PermissionsService.HasPermission(\"org.admin.users.archive\"))\n ) {\n this.props.toggleArchiveModal();\n if (row.status != \"ARCHIVED\") {\n try {\n await this.props.dispatch(archiveUser(row.id, true));\n }catch (err) {\n this.props.toggleErrorModalNF()\n this.setState({\n NFErrorMsg : err.response?.data?.message || \"You are not allowed to modify patient login status\"\n }) }\n } else {\n try {\n await this.props.dispatch(archiveUser(row.id, false));\n }catch (err) {\n this.props.toggleErrorModalNF()\n this.setState({\n NFErrorMsg : err.response?.data?.message || \"You are not allowed to modify patient login status\"\n })\n }\n }\n await this.props.dispatch(getUsersByOrg(this.props.user_types))\n } else {\n return
;\n }\n }\n };\n render() {\n const tableColumns = this.getTableSettings();\n const { classes, toggleArchiveModal, toggleEditUserModal, modals , toggleErrorModalNF} =\n this.props;\n const {practitioners} = this.state\n const tableActions = [];\n if (this.state.is_loaded) {\n if (!this.state.is_error) {\n let users = Array.isArray(this.props.users) ? this.props.users : [];\n if (\n this.state.selectOptions.includes(UserStatus[0].value) &&\n this.state.selectOptions.includes(UserStatus[1].value)\n ) {\n users = this.props.users;\n } else {\n if (\n this.state.selectOptions.includes(UserStatus[0].value) &&\n !this.state.selectOptions.includes(UserStatus[1].value)\n ) {\n users = users.filter((x) => x.status !== \"ARCHIVED\");\n }\n if (\n this.state.selectOptions.includes(UserStatus[1].value) &&\n !this.state.selectOptions.includes(UserStatus[0].value)\n ) {\n users = users.filter((x) => x.status === \"ARCHIVED\");\n }\n }\n if (Array.isArray(this.props.user_types)) {\n users = users.filter((x) =>\n this.props.user_types.includes(x.user_type)\n );\n }\n let userPat = [];\n let userPrac = [] \n let userOrg = [];\n let usersDeveloper = [] ;\n let usersAdmin = [];\n let isContainUserTypes = false\n if (this.state.selectOptions.includes(UserTypes[0].value)) {\n isContainUserTypes = true\n userPat = users.filter((x) => x.user_type === UserTypes[0].value);\n }\n if (this.state.selectOptions.includes(UserTypes[1].value)) {\n isContainUserTypes = true\n userPrac = users.filter((x) => { \n var roles = x.roles.map(function(item) {\n return item['role_name'];\n });\n return roles.includes(UserTypes[1].value2)\n });\n }\n if (this.state.selectOptions.includes(UserTypes[2].value)) {\n isContainUserTypes = true\n userOrg = users.filter((x) => { \n var roles = x.roles.map(function(item) {\n return item['role_name'];\n });\n return roles.includes(UserTypes[2].value)\n });\n }\n if (this.state.selectOptions.includes(UserTypes[3].value)) {\n isContainUserTypes = true\n usersAdmin = users.filter((x) => { \n var roles = x.roles.map(function(item) {\n return item['role_name'];\n });\n return roles.includes(UserTypes[3].value)\n });\n }\n const setUsers = [...new Set([...userPat,...userOrg,...userPrac,...usersDeveloper,...usersAdmin])]\n var filtered = [];\n for(var arr in users){\n for(var filter in setUsers){\n if(users[arr].id === setUsers[filter].id){\n filtered.push(users[arr]);\n }\n }\n }\n if(this.state.selectOptions.length !== 0 && isContainUserTypes ) {\n users = filtered\n }\n return (\n
\n
\n \n\n \n
\n

\n Are you sure you want to{\" \"}\n {this.state.selectedRowData?.status !== \"ARCHIVED\"\n ? \"archive\"\n : \"unarchive\"}{\" \"}\n {this.state.selectedRowData &&\n this.state.selectedRowData?.first_name +\n \" \" +\n this.state.selectedRowData?.last_name}\n ?\n

\n

\n {this.state.selectedRowData?.status !== \"ARCHIVED\" &&\n \"Archiving will remove their access to Neurofit VR and their patients will need to be reactivated\"}\n

\n \n this.onArchiveUser()}\n variant=\"contained\"\n color=\"primary\"\n >\n {this.state.selectedRowData?.status !== \"ARCHIVED\"\n ? \"Archive\"\n : \"Unarchive\"}\n \n
\n \n \n
\n

\n Edit{\" \"}\n {(this.state.selectedRowData?.user_type === \"PATIENT\" || this.state.roles.length === 0)\n ? \"Patient\"\n :(this.state.roles.includes(UserTypes[1].value2)) ? \"Practitioner\" : \"User\"}{\" \"}\n Profile\n

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

\n Not enough Neurofit?\n

\n \n
\n
\n
\n );\n } else {\n return (\n
\n

Failed to load users

\n
\n );\n }\n } else {\n return ;\n }\n }\n}\n\nPractitionersList.propTypes = {\n classes: PropTypes.object.isRequired,\n};\n\nPractitionersList.MapStateToProps = (state) => {\n let result = {};\n result.users = state.userReducer.user_list;\n Debug.log(state);\n return result;\n};\n\nconst modalsProps = {\n toggleArchiveModal: ARCHIVE_MODAL,\n toggleEditUserModal: EDIT_USERS_MODAL,\n toggleErrorModalNF : NOT_ENOUGH_USERS_MODAL\n};\n\nexport default connect(PractitionersList.MapStateToProps)(\n withStyles(styles)(withRouter(withModals(withSnackbar(PractitionersList), modalsProps)))\n);\n","import React, { Component } from \"react\";\nimport Dropzone from \"react-dropzone\";\nimport readXlsxFile from \"read-excel-file\";\nimport \"./UploadFile.scss\";\nimport { allowedExtensions, schemaPrac } from \"../../lib/Constants\";\n\nexport default class UploadFile extends Component {\n constructor(props) {\n super(props);\n this.upload = this.upload.bind(this);\n this.onDrop = this.onDrop.bind(this);\n this.state = {\n selectedFiles: undefined,\n currentFile: undefined,\n progress: 0,\n message: \"\",\n fileInfos: [],\n };\n }\n\n componentDidMount() {}\n\n upload() {\n let currentFile = this.state.selectedFiles[0];\n\n this.setState({\n progress: 0,\n currentFile: currentFile,\n });\n readXlsxFile(currentFile, { schemaPrac, ignoreEmptyRows: true })\n .then(async (rows) => {\n if (!rows.length || rows.length === 0 || rows.length === 1) {\n alert(\n \"Something went wrong with your uploaded file, Please download the sample template to see the shape of accepted files\"\n );\n return;\n }\n this.props.setUsers(rows);\n this.setState({\n progress: 100,\n fileInfos: currentFile,\n });\n })\n .catch((e) => {\n alert(\n \"Something went wrong with your uploaded file, Please download the sample template to see the shape of accepted files\"\n );\n return;\n });\n }\n\n onDrop(files) {\n if (files.length > 0) {\n this.setState({ selectedFiles: files });\n }\n }\n\n render() {\n const { selectedFiles, currentFile, progress, message, fileInfos } =\n this.state;\n const { isPatient } = this.props;\n return (\n <>\n
\n
\n
\n

\n Download the CSV template below to ensure you’ve got all the\n correct columns!\n

\n {isPatient ? (\n
    \n
  • First Name
  • \n
  • Last Name
  • \n
  • Date of Birth
  • \n
  • Sex
  • \n
  • Email
  • \n
  • Diagnosis
  • \n
\n ) : (\n
    \n
  • First Name
  • \n
  • Last Name
  • \n
  • Occupation
  • \n
  • Email
  • \n
  • Sex
  • \n
\n )}\n

\n \n Download Sample Template\n \n

\n
\n
\n {currentFile && (\n
\n \n {progress}%\n
\n
\n )}\n\n \n {({ getRootProps, getInputProps }) => (\n
\n
\n \n {selectedFiles && selectedFiles[0].name ? (\n
\n {selectedFiles && selectedFiles[0].name}\n
\n ) : (\n <>\n

\n Drag and drop or{\" \"}\n choose a file to\n upload your Users. All .csv, .xlsx, and .xls files\n types are supported\n

\n \n )}\n
\n \n
\n )}\n \n\n {message &&
\n {message}\n
}\n\n {fileInfos.length > 0 && (\n
\n
List of Files
\n
    \n {fileInfos.map((file, index) => (\n
  • \n {file.name}\n
  • \n ))}\n
\n
\n )}\n
\n
\n \n \n );\n }\n}\n","export default __webpack_public_path__ + \"static/media/individual.4e5b8346.svg\";","export default __webpack_public_path__ + \"static/media/multiple.bc2e36c7.svg\";","import React from \"react\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Card from \"@material-ui/core/Card\";\nimport CardActionArea from \"@material-ui/core/CardActionArea\";\nimport CardActions from \"@material-ui/core/CardActions\";\nimport CardContent from \"@material-ui/core/CardContent\";\nimport CardMedia from \"@material-ui/core/CardMedia\";\nimport Button from \"@material-ui/core/Button\";\nimport Typography from \"@material-ui/core/Typography\";\nimport individual from \"../../../assets/images/individual.svg\";\nimport multiple from \"../../../assets/images/multiple.svg\";\n\nconst useStyles = makeStyles({\n root: {\n width: 281,\n height: 202,\n backgroundColor: \"#E2EFF9\",\n \"@media (max-width: 950px)\": {\n margin: \"18px\",\n },\n },\n wizardButtonTitle: {\n fontSize: \"16px\",\n fontWeight: \"600\",\n },\n img: {\n marginBottom: \"0px !important\",\n border: \"0px !important\",\n },\n});\n\nexport default function AddTypeStep(props) {\n const [additionType, setAdditionType] = React.useState(\"additionType\");\n const classes = useStyles();\n\n const handleChange = (type) => {\n setAdditionType(type);\n if (\"onTypeChange\" in props) {\n props.onTypeChange(type);\n }\n };\n return (\n
\n
\n
\n
Individual User
\n {\n handleChange(\"individual\");\n }}\n >\n \n \n \n \n \n
\n
\n
\n
\n
\n
Multiple Users
\n {\n handleChange(\"multiple\");\n }}\n >\n \n \n \n \n \n
\n
\n \n \n );\n}\n","import React from \"react\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Card from \"@material-ui/core/Card\";\nimport CardActionArea from \"@material-ui/core/CardActionArea\";\n\nconst useStyles = makeStyles({\n root: {\n width: 281,\n height: 202,\n backgroundColor: \"#E2EFF9\",\n \"@media (max-width: 950px)\": {\n margin: \"18px\",\n },\n },\n wizardButtonTitle: {\n fontSize: \"16px\",\n fontWeight: \"600\",\n },\n});\n\nexport default function AddTypeStep(props) {\n const [additionType, setAdditionType] = React.useState(\"additionType\");\n const classes = useStyles();\n\n const handleChange = (type) => {\n setAdditionType(type);\n if (\"onTypeChange\" in props) {\n props.onTypeChange(type);\n }\n };\n return (\n
\n
\n
\n {\n handleChange(\"PATIENT\");\n }}\n >\n \n \n \n Patient\n

\n
\n \n
\n
\n
\n
\n
\n {\n handleChange(\"ORG_USER\");\n }}\n >\n \n \n \n Practitioner\n

\n
\n \n
\n
\n \n \n );\n}\n","import React, { useEffect, useRef } from \"react\";\nimport { useForm, Controller } from \"react-hook-form\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport TextField from \"@material-ui/core/TextField\";\nimport Input from \"@material-ui/core/Input\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Alert from \"@material-ui/lab/Alert\";\nimport FormControl from \"@material-ui/core/FormControl\";\nimport FormLabel from \"@material-ui/core/FormLabel\";\nimport DateFnsUtils from \"@date-io/date-fns\";\nimport Select from \"@material-ui/core/Select\";\nimport MenuItem from \"@material-ui/core/MenuItem\";\nimport moment from \"moment\";\nimport Grid from \"@material-ui/core/Grid\";\nimport {\n MuiPickersUtilsProvider,\n KeyboardDatePicker,\n} from \"@material-ui/pickers\";\nimport * as yup from \"yup\";\nimport { yupResolver } from \"@hookform/resolvers/yup\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport useMediaQuery from \"@material-ui/core/useMediaQuery\";\nimport { useTheme } from \"@material-ui/core/styles\";\nimport util from \"util\";\nimport { Debug } from \"../../lib\";\nimport {\n Education , \n DIAGNOSIS\n} from '../../lib/Constants'\nimport { useStore } from \"react-redux\";\nimport { createUser, getUsersByOrg } from \"../../actions\";\nimport \"./AddUserForm.scss\";\nimport { useSnackbar } from \"notistack\";\n\nconst useStyles = makeStyles((theme) => ({\n tiltStyle: {\n maxWidth: \"800px\",\n margin: \"2.5rem auto\",\n border: `2.5px solid #16A0D8`,\n borderRadius: \"10px\",\n outline: \"none\",\n height: \"90%\",\n },\n paper: {\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"flex-start\",\n maxWidth: \"800px\",\n width: \"auto\",\n height: \"auto\",\n // backgroundColor: '#fafafa',\n // padding: theme.spacing(6),\n padding: \"0\",\n // overflow: 'auto',\n margin: \"auto 0\",\n borderRadius: \"10px\",\n outline: \"none\",\n },\n form: {\n width: \"auto\",\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(0),\n padding: \"2.5rem 3.5rem\",\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(0),\n display: \"flex\",\n flexDirection: \"row\",\n flexWrap: \"wrap\",\n justifyContent: \"space-between\",\n \"@media (max-width: 600px)\": {\n padding: \"0\",\n },\n },\n addBtn: {\n marginTop: theme.spacing(1),\n backgroundColor: theme.palette.success.main,\n color: theme.palette.success.contrastText,\n \"&:hover\": {\n backgroundColor: theme.palette.success.light,\n },\n },\n messageContainer: {\n marginTop: theme.spacing(3),\n },\n inlineInput: {\n width: \"100%\",\n },\n radioContainer: {\n marginTop: theme.spacing(1),\n },\n radioGroup: {\n flexDirection: \"row\",\n },\n personIcon: {\n fontSize: \"3.5rem\",\n margin: \"0 auto\",\n backgroundColor: \"#E8F5FB\",\n borderRadius: \"50%\",\n padding: \"5px\",\n border: \"2px solid #16A0D8\",\n },\n heading: {\n textAlign: \"center\",\n padding: \"10px 0\",\n marginTop: \"0\",\n marginBottom: \"0\",\n },\n input_container: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n },\n}));\n\nconst USER_TYPES = {\n Patient: \"patient\",\n Practitioner: \"practitioner\",\n};\n\nconst schema = yup.object().shape({\n email: yup.string().trim().email().required().label(\"Email\"),\n firstName: yup.string().trim().required().label(\"First Name\"),\n lastName: yup.string().trim().required().label(\"Last Name\"),\n gender: yup.string().trim().required().label(\"Gender\"),\n dob: yup.string().required().label(\"Date of Birth\"),\n user_type: yup.string().optional(),\n practitioner : yup.string().required().label(\"practitioner\"),\n user_password: yup.string().optional(),\n passwordConfirmation: yup.string().optional(),\n\n education: yup\n .string()\n .trim()\n .when(\"user_type\", {\n is: USER_TYPES.Patient,\n then: yup.string().required(),\n otherwise: yup.string().strip(),\n })\n .label(\"Education\"),\n diagnosis: yup\n .string()\n .trim()\n .when(\"user_type\", {\n is: USER_TYPES.Patient,\n then: yup.string().required(),\n otherwise: yup.string().strip(),\n })\n .label(\"Education\"),\n});\n\nexport const initialState = {\n user_type: USER_TYPES.Patient,\n email: \"\",\n firstName: \"\",\n lastName: \"\",\n dob: new Date(),\n gender: \"\",\n diagnosis: \"\",\n password: \"\",\n passwordConfirm: \"\",\n practitioner : \"\"\n};\n\nclass AddUserFormComponent extends React.Component {\n constructor(props) {\n super(props);\n this.state = initialState;\n }\n}\n\nexport default function AddUserForm(props) {\n const classes = useStyles();\n const theme = useTheme();\n const store = useStore();\n const dispatch = useDispatch();\n\n const responseMessage = useSelector((state) => state.userReducer.response);\n const { enqueueSnackbar } = useSnackbar(); \n const { register, handleSubmit, setValue, errors, reset, control, setError } =\n useForm({\n resolver: yupResolver(schema),\n });\n\n const open = useSelector((state) => state.modalReducer.modalProps.open);\n const fullScreen = useMediaQuery(theme.breakpoints.down(\"sm\"));\n\n let [user_type, handleUserTypeChanged] = React.useState(USER_TYPES.Patient);\n let [dob, handleDobChanged] = React.useState(new Date());\n\n\n useEffect(() => {\n const unsubscribe = store.subscribe((action) => {\n handleSubmit(onSubmit)();\n });\n return () => unsubscribe();\n }, []);\n\n const onSubmit = async (data) => {\n // Prepare the data that will be saved for the patient\n let req_data = {\n email: data.email,\n first_name: data.firstName,\n last_name: data.lastName,\n gender: data.gender,\n practitioner : data.practitioner,\n dob: data.dob.split(\"T\")[0],\n diagnosis: data.diagnosis,\n education: data.education,\n is_patient: user_type === USER_TYPES.Patient,\n password:user_type === USER_TYPES.Patient ? undefined : data.user_password,\n };\n Debug.log(\"data: \" + util.inspect(data));\n Debug.log(\"req: \" + util.inspect(req_data));\n\n let result = await dispatch(createUser(req_data));\n\n if (result !== undefined && result.status === 200) {\n props.moveToFinalStep();\n await dispatch(getUsersByOrg(props.user_types));\n reset(initialState);\n handleDobChanged(new Date());\n } else {\n if (result.errorType === \"DuplicateEntryError\") {\n setError(\"email\", {\n type: \"manual\",\n message: \"This email already exists\",\n });\n }else {\n props.setActiveStep(result)\n }\n\n }\n };\n\n const renderResponseMessage = () => {\n if (responseMessage.status === 200) {\n return (\n
\n \n {responseMessage.message}\n \n
\n );\n } else if (responseMessage.status === 400) {\n return (\n
\n {responseMessage.message}\n
\n );\n }\n };\n\n const renderFormError = (errorMessage) => {\n return (\n
\n {errorMessage}\n
\n );\n };\n\n const renderPatientTooltip = () => {\n return (\n \n \n A patient cannot access the Neurofit dashboard, but can sign into the\n Neurofit web client via their email when their account is enabled\n \n \n );\n };\n\n const renderPractitionerTooltip = () => {\n return (\n \n \n A practitioner is a user that can create and manage patients within\n your organization. They can sign onto the dashboard using an email and\n password\n \n \n );\n };\n\n const body = (\n //
\n\n
\n
\n \n {/* first name */}\n \n \n \n {/* last name */}\n \n \n \n\n {/* email */}\n \n \n \n\n {/* date of birth */}\n \n \n \n {\n handleDobChanged(date);\n }}\n KeyboardButtonProps={{\n \"aria-label\": \"change date\",\n }}\n />\n \n \n\n {/* Gender & Pronouns options */}\n \n \n Sex\n (\n {\n onChange(e);\n }}\n >\n Female\n Male\n Other\n \n )}\n />\n \n \n {/*\n \n Pronouns\n (\n {\n onChange(e);\n }}\n >\n She/Her/Hers\n He/Him/His\n They/Them/Theirs\n \n )}\n />\n \n */}\n\n \n \n \n Select Practitioner\n \n (\n \n onChange(e)\n }\n >\n {props.practitioner &&\n props.practitioner.map((prac) => {\n return (\n \n {prac.first_name.concat(\" \" + prac.last_name)}\n \n );\n })}\n \n )}\n />\n \n \n \n \n Education\n (\n {\n onChange(e);\n }}\n >\n {\n Education && Education.map(item => (\n \n {item}\n \n ))\n }\n \n )}\n />\n \n \n \n \n Diagnosis\n (\n {\n onChange(e);\n }}\n >\n {\n DIAGNOSIS && DIAGNOSIS.map(item => (\n \n {item}\n \n ))\n }\n \n )}\n />\n \n \n \n
\n {renderResponseMessage()}\n {errors.email && renderFormError(errors.email.message)}\n {errors.firstName && renderFormError(errors.firstName.message)}\n {errors.lastName && renderFormError(errors.lastName.message)}\n {errors.education && renderFormError(errors.education.message)}\n {errors.diagnosis && renderFormError(errors.diagnosis.message)}\n {errors.gender && renderFormError(errors.gender.message)}\n {errors.practitioner && renderFormError(errors.practitioner.message)}\n {errors.user_password && renderFormError(errors.user_password.message)}\n {errors.passwordConfirmation &&\n renderFormError(errors.passwordConfirmation.message)}\n\n
\n //
\n );\n\n return {body};\n}\n","import React, { useEffect } from \"react\";\nimport * as yup from \"yup\";\nimport { makeStyles, useTheme } from \"@material-ui/core/styles/index\";\nimport { useForm, Controller } from \"react-hook-form\";\nimport { useDispatch, useSelector, useStore } from \"react-redux\";\nimport useMediaQuery from \"@material-ui/core/useMediaQuery/index\";\nimport Alert from \"@material-ui/lab/Alert\";\nimport { yupResolver } from \"@hookform/resolvers/yup\";\nimport Select from \"@material-ui/core/Select\";\nimport FormControl from \"@material-ui/core/FormControl\";\nimport FormLabel from \"@material-ui/core/FormLabel\";\nimport MenuItem from \"@material-ui/core/MenuItem\";\nimport Grid from \"@material-ui/core/Grid\";\nimport TextField from \"@material-ui/core/TextField\";\nimport { createUser, getUsersByOrg } from \"../../actions\";\nimport DateFnsUtils from \"@date-io/date-fns/build/index\";\nimport moment from \"moment/moment\";\nimport Input from \"@material-ui/core/Input\";\nimport {\n MuiPickersUtilsProvider,\n KeyboardDatePicker,\n} from \"@material-ui/pickers\";\n\nconst useStyles = makeStyles((theme) => ({\n tiltStyle: {\n maxWidth: \"800px\",\n margin: \"2.5rem auto\",\n border: `2.5px solid #16A0D8`,\n borderRadius: \"10px\",\n outline: \"none\",\n height: \"90%\",\n },\n paper: {\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"flex-start\",\n maxWidth: \"800px\",\n width: \"auto\",\n height: \"auto\",\n // backgroundColor: '#fafafa',\n // padding: theme.spacing(6),\n padding: \"0\",\n // overflow: 'auto',\n margin: \"auto 0\",\n borderRadius: \"10px\",\n outline: \"none\",\n },\n form: {\n width: \"auto\",\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(0),\n padding: \"2.5rem 3.5rem\",\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(0),\n display: \"flex\",\n flexDirection: \"row\",\n flexWrap: \"wrap\",\n justifyContent: \"space-between\",\n \"@media (max-width: 600px)\": {\n padding: \"0\",\n },\n },\n addBtn: {\n marginTop: theme.spacing(1),\n backgroundColor: theme.palette.success.main,\n color: theme.palette.success.contrastText,\n \"&:hover\": {\n backgroundColor: theme.palette.success.light,\n },\n },\n messageContainer: {\n marginTop: theme.spacing(3),\n },\n inlineInput: {\n width: \"100%\",\n },\n radioContainer: {\n marginTop: theme.spacing(1),\n },\n radioGroup: {\n flexDirection: \"row\",\n },\n personIcon: {\n fontSize: \"3.5rem\",\n margin: \"0 auto\",\n backgroundColor: \"#E8F5FB\",\n borderRadius: \"50%\",\n padding: \"5px\",\n border: \"2px solid #16A0D8\",\n },\n heading: {\n textAlign: \"center\",\n padding: \"10px 0\",\n marginTop: \"0\",\n marginBottom: \"0\",\n },\n input_container: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n },\n}));\n\nconst OCCUPATION_TYPES = [\n { label: \"General Practitioner\", value: \"therapist\" },\n { label: \"Occupational Therapist\", value: \"ot\" },\n { label: \"Physical Therapist\", value: \"pt\" },\n { label: \"Speech Language Pathologist\", value: \"slp\" },\n];\n\nconst schema = yup.object().shape({\n email: yup.string().trim().email().required().label(\"Email\"),\n firstName: yup.string().trim().required().label(\"First Name\"),\n lastName: yup.string().trim().required().label(\"Last Name\"),\n occupation: yup.string().trim().required().label(\"Occupation\"),\n gender: yup.string().trim().required().label(\"Gender\"),\n dob: yup.string().required().label(\"Date of Birth\"),\n user_password: yup.string().optional(),\n passwordConfirmation: yup.string().optional(),\n});\n\nexport default function AddPractitionerUsers(props) {\n const classes = useStyles();\n const theme = useTheme();\n const store = useStore();\n const dispatch = useDispatch();\n\n const [dob, handleDobChanged] = React.useState(new Date());\n\n const responseMessage = useSelector((state) => state.userReducer.response);\n\n const { register, handleSubmit, setValue, errors, reset, control, setError } =\n useForm({\n resolver: yupResolver(schema),\n });\n\n const open = useSelector((state) => state.modalReducer.modalProps.open);\n const fullScreen = useMediaQuery(theme.breakpoints.down(\"sm\"));\n\n useEffect(() => {\n const unsubscribe = store.subscribe((action) => {\n handleSubmit(onSubmit)();\n });\n return () => unsubscribe();\n }, []);\n\n const onSubmit = async (data) => {\n // Prepare the data that will be saved for the patient\n const pronounSelect = data.pronouns;\n let pronouns = {};\n // For now we'll just use the radio buttons to select a gender and assign the relevant pronoun options\n switch (pronounSelect) {\n case \"masculine\":\n pronouns.pronoun_subject = \"he\";\n pronouns.pronoun_object = \"him\";\n pronouns.pronoun_possessive = \"his\";\n break;\n case \"feminine\":\n pronouns.pronoun_subject = \"she\";\n pronouns.pronoun_object = \"her\";\n pronouns.pronoun_possessive = \"hers\";\n break;\n case \"neuter\":\n default:\n pronouns.pronoun_subject = \"they\";\n pronouns.pronoun_object = \"them\";\n pronouns.pronoun_possessive = \"theirs\";\n break;\n }\n let req_data = {\n email: data.email,\n first_name: data.firstName,\n last_name: data.lastName,\n occupation: data.occupation,\n gender: data.gender,\n dob: moment().toISOString().split(\"T\")[0],\n role: \"GENERAL_PRACTITIONER\",\n is_patient: false,\n password: data.user_password,\n };\n\n let result = await dispatch(createUser(req_data));\n\n if (result !== undefined && result.status === 200) {\n props.moveToFinalStep();\n await dispatch(getUsersByOrg(props.user_types));\n reset();\n } else {\n if (result.errorType === \"DuplicateEntryError\") {\n setError(\"email\", {\n type: \"manual\",\n message: \"This email already exists\",\n });\n }\n }\n };\n\n const renderResponseMessage = () => {\n if (responseMessage.status === 200) {\n return (\n
\n \n {responseMessage.message}\n \n
\n );\n } else if (responseMessage.status === 400) {\n return (\n
\n {responseMessage.message}\n
\n );\n }\n };\n\n const renderFormError = (errorMessage) => {\n return (\n
\n {errorMessage}\n
\n );\n };\n\n const body = (\n //
\n\n
\n
\n \n {/* first name */}\n \n \n \n {/* last name */}\n \n \n \n\n {/* email */}\n \n \n \n\n {/* Occupation */}\n \n \n Occupation\n (\n {\n onChange(e);\n }}\n >\n {OCCUPATION_TYPES &&\n OCCUPATION_TYPES.map((el) => (\n \n {el.label}\n \n ))}\n \n )}\n />\n \n \n\n {/* date of birth */}\n \n \n \n {\n handleDobChanged(date);\n }}\n KeyboardButtonProps={{\n \"aria-label\": \"change date\",\n }}\n />\n \n \n\n {/* Gender & Pronouns options */}\n \n \n Gender\n (\n {\n onChange(e);\n }}\n >\n Female\n Male\n Other\n \n )}\n />\n \n \n {/*} \n \n Pronouns\n (\n {\n onChange(e);\n }}\n >\n She/Her/Hers\n He/Him/His\n They/Them/Theirs\n \n )}\n />\n \n */}\n\n \n \n \n \n \n \n \n
\n {renderResponseMessage()}\n {errors.email && renderFormError(errors.email.message)}\n {errors.firstName && renderFormError(errors.firstName.message)}\n {errors.lastName && renderFormError(errors.lastName.message)}\n {errors.education && renderFormError(errors.education.message)}\n {errors.diagnosis && renderFormError(errors.diagnosis.message)}\n {errors.gender && renderFormError(errors.gender.message)}\n {errors.user_password && renderFormError(errors.user_password.message)}\n {errors.passwordConfirmation &&\n renderFormError(errors.passwordConfirmation.message)}\n
\n //
\n );\n\n return <>{body};\n}\n","import React from \"react\";\nimport \"./UserColumn.scss\";\nfunction UserColumn(props) {\n const column = props.column;\n const containerContnt = (\n \n {column.map((element, index) => {\n return index === 0 ? (\n
\n {element}\n
\n ) : (\n
\n {element}\n
\n );\n })}\n
\n );\n return (\n \n {containerContnt}\n \n );\n}\n\nexport default UserColumn;\n","export function formatDate(string) {\n var options = { year: \"numeric\", month: \"numeric\", day: \"numeric\" };\n return new Date(string).toLocaleDateString([], options);\n}\nexport const getColumn = (rows, col) => {\n const column = [];\n for (var i = 0; i < rows.length; i++) {\n if (\n formatDate(rows[i][col]) === \"Invalid Date\" ||\n i === 0 ||\n rows[i][col] === null ||\n typeof rows[i][col] == \"number\"\n ) {\n column.push(rows[i][col] === null ? \"\" : rows[i][col]);\n } else {\n column.push(formatDate(rows[i][col]));\n }\n }\n return column;\n};","import React, { useState } from \"react\";\nimport UserColumn from \"./helpers/UserColumn\";\nimport Stepper from \"@material-ui/core/Stepper\";\nimport Step from \"@material-ui/core/Step\";\nimport \"./ConfirmInputFields.scss\";\nimport {\n MAIN_COLUMN_PATIENT,\n MAIN_COLUMN_PRACTITONER,\n} from \"../../../lib/Constants\";\nimport { getColumn } from \"./Assets/HelperFunctions\";\n\nfunction ConfirmInputFields(props) {\n const userType = props.user_type;\n const [rows, setRows] = useState(props.users);\n const numberOfColumns = rows[0].length;\n const steps = userType === \"PATIENT\" ? 8 : 7;\n const [activeStep, setActiveStep] = useState(0);\n const [currentColumn, setCurrentColumn] = useState(null);\n const [selectedColumns, setSelectedColumns] = useState([]);\n const currentUserColumn =\n userType === \"PATIENT\" ? MAIN_COLUMN_PATIENT : MAIN_COLUMN_PRACTITONER;\n const handleNext = async () => {\n if (activeStep === steps - 1) {\n let copy = [];\n let criteria =\n userType === \"PATIENT\"\n ? [...MAIN_COLUMN_PATIENT]\n : [...MAIN_COLUMN_PRACTITONER];\n for (let i = 0; i < numberOfColumns; i++) {\n if (criteria.includes(rows[0][i])) {\n copy.push(getColumn(rows, i));\n }\n }\n props.setUsers(copy);\n } else {\n rows[0][currentColumn] =\n userType === \"PATIENT\"\n ? MAIN_COLUMN_PATIENT[activeStep - 1]\n : MAIN_COLUMN_PRACTITONER[activeStep - 1];\n setSelectedColumns((preVal) => {\n return [...preVal, currentColumn];\n });\n setCurrentColumn(null);\n setActiveStep((prevActiveStep) => prevActiveStep + 1);\n }\n };\n const handleCustomize = () => {\n if (activeStep === 0) {\n const copy = [...rows];\n for (let i = 0; i < numberOfColumns; i++) {\n copy[0][i] = \"\";\n }\n setRows(copy);\n setActiveStep((prevActiveStep) => prevActiveStep + 1);\n }\n };\n const handleImport = () => {\n let copy = [];\n let criteria =\n userType === \"PATIENT\"\n ? [...MAIN_COLUMN_PATIENT]\n : [...MAIN_COLUMN_PRACTITONER];\n for (let i = 0; i < numberOfColumns; i++) {\n if (criteria.includes(rows[0][i])) {\n copy.push(getColumn(rows, i));\n }\n }\n props.setUsers(copy);\n };\n const handleBack = () => {\n rows[0][selectedColumns[selectedColumns.length - 1]] = ``;\n const copy = [...selectedColumns];\n copy.pop();\n setSelectedColumns(copy);\n setCurrentColumn(null);\n setActiveStep((prevActiveStep) => prevActiveStep - 1);\n };\n\n const getStepTitle = (stepIndex) => {\n switch (stepIndex) {\n case 0:\n return \"Preview Import\";\n case 1:\n return \"Select “First Name” Column\";\n case 2:\n return \"Select “Last Name” Column\";\n case 3:\n return userType === \"PATIENT\"\n ? \"Select “Date of Birth” Column\"\n : \"Select “Occupation” Column\";\n case 4:\n return userType === \"PATIENT\"\n ? \"Select “Sex” Column\"\n : \"Select “Email” Column\";\n case 5:\n return userType === \"PATIENT\"\n ? \"Select “Email” Column\"\n : \"Select “Sex” Column\";\n case 6:\n return userType === \"PATIENT\"\n ? \"Select “Diagnosis” Column\"\n : \"Preview Columns\";\n case 7:\n return \"Preview Columns\";\n default:\n return \"Unknown stepIndex\";\n }\n };\n\n const columnClickedHandler = (index) => {\n if (activeStep !== 0) {\n setCurrentColumn(index);\n }\n };\n\n return (\n
\n
\n
{getStepTitle(activeStep)}
\n {activeStep === 0 ? (\n
\n Please confirm columns are labelled as you expect. You can customize\n columns if needed\n
\n ) : (\n (activeStep === 6 && userType !== \"PATIENT\") ||\n (activeStep !== 7 && (\n
\n Please select the column which contains the “\n {currentUserColumn[activeStep - 1]}” data.\n
\n ))\n )}\n
\n
Total Users: {rows.length - 1}
\n \n \n
\n {Array.from({ length: numberOfColumns }, (_, index) => (\n {\n return columnClickedHandler(index);\n }}\n selectedColumn={currentColumn}\n index={index}\n selectedColumns={selectedColumns}\n />\n ))}\n
\n \n \n
\n \n
\n {activeStep !== 0 ? (\n \n Back\n \n ) : (\n \n )}\n {activeStep !== 0 ? (\n \n Next\n \n ) : (\n \n )}\n
\n
\n
\n );\n}\n\nexport default ConfirmInputFields;\n","import React from \"react\";\nimport \"./ConfirmImport.scss\";\n\nfunction ConfirmImport(props) {\n return (\n
\n
\n
\n You’re ready to import {props.numberOfUsers} new{\" \"}\n {props.userType !== \"PATIENT\" ? \"Practitioners\" : \"Patients\"}\n
\n
\n Clicking the import button will create accounts for each{\" \"}\n {props.userType !== \"PATIENT\" ? \"Practitioners\" : \"Patients\"}\n
\n
\n
\n );\n}\n\nexport default ConfirmImport;\n","import React from \"react\";\nimport \"./ImportInProgress.scss\";\nimport LoadingSpinner from \"../../sharedComponents/LoadingSpinner\";\n\nfunction ImportInProgress(props) {\n return (\n
\n
\n
Import in Progress
\n
\n \n
\n
\n {props.numberOfUsers} users are being uploaded\n
\n
\n
\n );\n}\n\nexport default ImportInProgress;\n","import React from \"react\";\nimport \"./SuccessComponent.scss\";\nimport CheckCircleOutlineTwoToneIcon from \"@mui/icons-material/CheckCircleOutlineTwoTone\";\nimport Button from \"@material-ui/core/Button\";\n\nfunction SuccessComponent(props) {\n const { addingType, numberOfUsers } = props;\n return (\n
\n {addingType === \"individual\" && (\n
\n
\n \n
\n
\n New user has successfully been added!\n
\n
\n )}\n {addingType !== \"individual\" && (\n
\n
\n \n
\n
\n {numberOfUsers} Users have successfully been imported\n
\n
\n )}\n
\n \n {addingType === \"individual\" && \"Add Another User\"}\n {addingType !== \"individual\" && \"Upload Additional Users\"}\n \n \n
\n
\n );\n}\n\nexport default SuccessComponent;\n","import React, { useEffect, useRef, useState } from \"react\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport \"./InvalidInputRow.scss\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport { DIAGNOSIS, MAPPING_OCCUPATION } from \"../../../../lib/Constants\";\nconst useStyles = makeStyles((theme) => ({\n arrow: {\n \"&:before\": {\n border: \"1px solid #E5B8B8\",\n },\n color: \"#E5B8B8\",\n },\n tooltip: {\n backgroundColor: \"#E5B8B8\",\n border: \"1px solid #E5B8B8\",\n },\n}));\nfunction formatDate(date) {\n let d = date.getDate();\n let m = date.getMonth() + 1;\n let y = date.getFullYear();\n\n if (d < 10) {\n d = \"0\" + d;\n }\n if (m < 10) {\n m = \"0\" + m;\n }\n\n let newData = y + \"-\" + m + \"-\" + d;\n return newData;\n}\nfunction InvalidInputRow(props) {\n let classes = useStyles();\n const [FirstName, LastName, DateOfBirth, Sex, Email, Diagnosis] = [\n useRef(),\n useRef(),\n useRef(),\n useRef(),\n useRef(),\n useRef(),\n ];\n const errorStyle = { background: \"#E2D1D1\", border: \"1px solid #eee\" };\n const [invalidColumn, setInvalidColumn] = useState([]);\n const getErrors = (_path) => {\n const desiredElement = props.error.filter((el) => {\n return el.path === _path;\n });\n let errorJSX = (\n \n {desiredElement.map((el, index) => {\n return el.errors.map((el) => {\n return (\n \n {el}\n \n );\n });\n })}\n \n );\n return errorJSX;\n };\n useEffect(() => {\n let err = [];\n props.error.forEach((element) => {\n err.push(element.path);\n });\n setInvalidColumn(err);\n }, [props.error]);\n useEffect(() => {\n if (props.isClicked) {\n let req_data = {\n FirstName: FirstName.current.value,\n LastName: LastName.current.value,\n Sex: Sex.current.value,\n Email: Email.current.value,\n };\n if (props.userType === \"PATIENT\") {\n req_data = {\n ...req_data,\n DateOfBirth: DateOfBirth.current.value,\n Diagnosis: Diagnosis.current.value,\n };\n } else {\n req_data = {\n ...req_data,\n Occupation: Diagnosis.current.value,\n };\n }\n props.getUser(req_data);\n }\n }, [props.isClicked]);\n let cellContent;\n let mappedColumn = {\n \"First Name\": \"FirstName\",\n \"Last Name\": \"LastName\",\n Sex: \"Sex\",\n Email: \"Email\",\n };\n if (props.userType === \"PATIENT\") {\n mappedColumn = {\n ...mappedColumn,\n \"Date of Birth\": \"DateOfBirth\",\n Diagnosis: \"Diagnosis\",\n };\n cellContent = {\n \"First Name\": (\n \n ),\n \"Last Name\": (\n \n ),\n \"Date of Birth\": (\n \n ),\n Sex: (\n \n \n \n \n \n \n ),\n Email: (\n \n ),\n Diagnosis: (\n \n \n {DIAGNOSIS.map(item => {\n return \n })}\n \n ),\n };\n } else {\n mappedColumn = {\n ...mappedColumn,\n Occupation: \"Occupation\",\n };\n cellContent = {\n \"First Name\": (\n \n ),\n \"Last Name\": (\n \n ),\n Sex: (\n \n \n \n \n \n \n ),\n Email: (\n \n ),\n Occupation: (\n item.label === props.user.Occupation)?.id || props.user.Occupation).toLowerCase() || \"\"}\n style={\n invalidColumn.includes(\"Occupation\")\n ? errorStyle\n : { border: \"1px solid #eee\"}\n }\n >\n \n \n \n \n \n \n ),\n };\n }\n return (\n
\n {Array.from(\n { length: props.userType === \"PATIENT\" ? 6 : 5 },\n (_, index) =>\n invalidColumn.includes(mappedColumn[props.currentColumn[index]]) ? (\n \n
\n {cellContent[props.currentColumn[index]]}\n
\n \n ) : (\n
\n {cellContent[props.currentColumn[index]]}\n
\n )\n )}\n
\n );\n}\n\nexport default InvalidInputRow;\n","import React, { useEffect, useState } from \"react\";\nimport \"./UploadingResult.scss\";\nimport InvalidInputRow from \"./helpers/InvalidInputRow\";\nimport Button from \"@material-ui/core/Button\";\nimport {\n MAIN_COLUMN_PATIENT,\n MAIN_COLUMN_PRACTITONER,\n} from \"../../../lib/Constants\";\n\nfunction UploadingResult(props) {\n const { userType, errors, validUsersCount, numberOfUsers } = props;\n const [isClicked, setIsClicked] = useState(false);\n const [users, setUsers] = useState([]);\n const currentColumn =\n userType === \"PATIENT\"\n ? [...MAIN_COLUMN_PATIENT]\n : [...MAIN_COLUMN_PRACTITONER];\n\n useEffect(() => {\n if (users.length === errors.length) {\n props.tryUsersAfterEdit(users);\n }\n }, [users.length]);\n const handleNext = () => {\n setIsClicked(true);\n };\n const getUsers = (user) => {\n setUsers((preUser) => {\n return [...preUser, user];\n });\n };\n console.log(errors)\n return (\n \n
\n
\n {validUsersCount} of {numberOfUsers}{\" \"}\n {numberOfUsers === 1 ? `user` : `users`} were successfully uploaded\n
\n
\n
Please review an entry below:
\n
\n
\n {Array.from({ length: currentColumn.length }, (_, index) => (\n
{currentColumn[index]}
\n ))}\n
\n
\n {errors.map((element) => {\n return (\n \n );\n })}\n
\n
\n
\n
\n \n Next\n \n
\n );\n}\n\nexport default UploadingResult;\n","import React, { useEffect, useState } from \"react\";\nimport http from \"../../../http-common\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Stepper from \"@material-ui/core/Stepper\";\nimport Step from \"@material-ui/core/Step\";\nimport Button from \"@material-ui/core/Button\";\nimport UploadFile from \"../UploadFile\";\nimport AddTypeStep from \"./AddTypeStep\";\nimport AddUserTypes from \"./AddUserTypes\";\nimport AddUserForm from \"../../organizationView/AddUserForm\";\nimport { useDispatch } from \"react-redux\";\nimport { createUser, submitUserData } from \"../../../actions\";\nimport AddPractitionerUsers from \"../AddPractitionerUsers\";\nimport \"./AddUserStepper.scss\";\nimport ConfirmInputFields from \"./ConfirmInputFields\";\nimport ConfirmImport from \"./ConfirmImport\";\nimport ImportInProgress from \"./ImportInProgress\";\nimport * as yup from \"yup\";\nimport SuccessComponent from \"./SuccessComponent\";\nimport UploadingResult from \"./UploadingResult\";\nimport moment from \"moment/moment\";\nimport {\n MAIN_COLUMN_PATIENT,\n MAIN_COLUMN_PRACTITONER,\n SEX_TYPES,\n DIAGNOSIS,\n OCCUPATION,\n UserTypes,\n MAPPING_OCCUPATION,\n} from \"../../../lib/Constants\";\nimport { formatDate, getColumn } from \"./Assets/HelperFunctions\";\nimport { useSnackbar } from \"notistack\";\nimport NotEnoughNF from \"./NotEnoughNF\";\nimport { useHistory } from \"react-router\";\nconst patientSchema = yup.object().shape({\n FirstName: yup\n .string()\n .trim()\n .required(\"The First Name is required field\")\n .label(\"First Name\"),\n LastName: yup\n .string()\n .trim()\n .required(\"The Last Name is required field\")\n .label(\"Last Name\"),\n DateOfBirth: yup\n .date()\n .typeError(\"The Date of Birth must be valid\")\n .required()\n .test(\"dateOfBirthTest\", function (value) {\n const { createError } = this;\n if (formatDate(value) === \"Invalid Date\") {\n return createError({\n message: \"The Date of Birth must be valid\",\n });\n } else {\n return true;\n }\n })\n .label(\"Date of Birth\"),\n Sex: yup\n .string()\n .trim()\n .required()\n .test(\"sexTest\", function (value) {\n const { createError } = this;\n if (!SEX_TYPES.includes(value.toLowerCase())) {\n return createError({\n message: \"Please, make sure that the Sex is: male, female, or other\",\n });\n } else {\n return true;\n }\n })\n .label(\"Sex\"),\n Email: yup\n .string()\n .trim()\n .email()\n .required()\n .test(\"testForEmailDuplication\", function (value) {\n const { createError } = this;\n return new Promise((resolve) => {\n http\n .request({\n url: `/user/check/${value}/`,\n method: \"get\",\n params: {\n email: value,\n },\n })\n .then((response) => {\n resolve(true);\n })\n .catch((error) => {\n resolve(\n createError({\n message: \"This email is already taken\",\n })\n );\n });\n });\n })\n .label(\"Email\"),\n Diagnosis: yup\n .string()\n .required()\n .trim()\n .test(\"diagnosisTest\", function (value) {\n const { createError } = this;\n if (!DIAGNOSIS.includes(value)) {\n return createError({\n message: \"Please, make sure that the Diagnosis is supported\",\n });\n } else {\n return true;\n }\n })\n .label(\"Diagnosis\"),\n});\nconst practitionerSchema = yup.object().shape({\n FirstName: yup\n .string()\n .trim()\n .required(\"The First Name is required field\")\n .label(\"First Name\"),\n LastName: yup\n .string()\n .trim()\n .required(\"The Last Name is required field\")\n .label(\"Last Name\"),\n Occupation: yup\n .string()\n .required()\n .trim()\n .test(\"occupationTest\", function (value) {\n const { createError } = this;\n console.log(MAPPING_OCCUPATION.find( item => item.id === value))\n if (OCCUPATION.includes(value) || MAPPING_OCCUPATION.find( item => item.id === value) ) {\n return true;\n } else {\n return createError({\n message: \"Please, make sure that the Occupation is supported\",\n });\n }\n })\n .label(\"Occupation\"),\n Email: yup\n .string()\n .trim()\n .email()\n .required()\n .test(\"testForEmailDuplication\", function (value) {\n const { createError } = this;\n return new Promise((resolve) => {\n http\n .request({\n url: `/user/check/${value}/`,\n method: \"get\",\n })\n .then((response) => {\n resolve(true);\n })\n .catch((error) => {\n resolve(\n createError({\n message: \"This email is already taken\",\n })\n );\n });\n });\n })\n .label(\"Email\"),\n Sex: yup\n .string()\n .trim()\n .required()\n .test(\"sexTest\", function (value) {\n const { createError } = this;\n if (!SEX_TYPES.includes(value.toLowerCase())) {\n return createError({\n message: \"Please, make sure that the Sex is: male, female, or other\",\n });\n } else {\n return true;\n }\n })\n .label(\"Sex\"),\n});\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n width: \"100%\",\n },\n backButton: {\n marginRight: theme.spacing(1),\n textTransform: \"capitalize\",\n },\n instructions: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n },\n WizardTitle: {\n fontSize: \"30px\",\n width: \"auto\",\n lineHeight: \"37px\",\n margin: \"20px auto\",\n fontFamily: \"MontserratBold\",\n color: \"#333437\",\n },\n WizardTitle_2: {\n margin: \"0px auto\",\n fontSize: \"30px\",\n width: \"auto\",\n lineHeight: \"37px\",\n fontFamily: \"MontserratBold\",\n color: \"#333437\",\n },\n stepper: {\n padding: \"24px 113px\",\n display: \"block\",\n },\n buttons: {\n fontFamily: \"MontserratBold\",\n fontSize: \"16.86px\",\n color: \"#333437\",\n },\n buttonCnacel: {\n textTransform: \"capitalize\",\n },\n btnNext: {\n width: \"172px\",\n textTransform: \"capitalize\",\n \"@media (max-width: 600px)\": {\n width: \"100px\",\n padding: \"6px\",\n },\n },\n btnNextText: {\n textTransform: \"capitalize\",\n },\n resetbtn: {\n width: \"191px\",\n borderRaduis: \"5px\",\n textTransform: \"capitalize\",\n },\n divResetbutton: {\n margin: \"0px 5rem 7rem\",\n },\n}));\n\nexport default function AddUsersStepper(props) {\n const getSteps = () => {\n if (user_types === \"PATIENT\") {\n if (addingType === \"individual\") {\n return [\n \"Who are you creating an account for?\",\n \"How many users would you like to add?\",\n \"Create New User Profile\",\n ];\n }\n return [\n \"Select master blaster campaign settings\",\n \"Create an ad group\",\n \"Create an ad\",\n \"test test\",\n \"test test\",\n \"test test\",\n \"test test\",\n \"test test\",\n \"test test\",\n \"test test\",\n ];\n } else {\n if (addingType === \"individual\") {\n return [\n \"Who are you creating an account for?\",\n \"How many users would you like to add?\",\n \"Create New User Profile\",\n ];\n }\n return [\n \"Select master blaster campaign settings\",\n \"Create an ad group\",\n \"Create an ad\",\n \"test test\",\n \"test test\",\n \"test test\",\n \"test test\",\n \"test test\",\n \"test test\",\n \"test test\",\n ];\n }\n };\n\n const classes = useStyles();\n const dispatch = useDispatch();\n const [activeStep, setActiveStep] = React.useState(0);\n const [user_types, setUserTypes] = React.useState(\"\");\n const [addingType, setAddingType] = React.useState(\"\");\n const [users, setUsers] = React.useState(null);\n const [errors, setErrors] = React.useState([]);\n const [successImportedUser, setSuccessImportedUser] = useState(0);\n const [practitioner, setPractitioner] = useState([]);\n const [notEnoughNF,setNotEnoughNF] = useState(false)\n\n const { enqueueSnackbar } = useSnackbar();\n const steps = getSteps();\n let history = useHistory();\n\n const addUsers = async function (user) {\n // Prepare the data that will be saved for the patient\n let req_data;\n if (user_types === \"PATIENT\") {\n req_data = {\n email: user.Email,\n first_name: user.FirstName,\n last_name: user.LastName,\n gender: user.Sex,\n dob: formatDate(user.DateOfBirth),\n diagnosis: user.Diagnosis,\n education: user.education,\n is_patient: user_types === \"PATIENT\",\n password: undefined,\n };\n } else {\n req_data = {\n email: user.Email,\n first_name: user.FirstName,\n last_name: user.LastName,\n occupation: MAPPING_OCCUPATION.find(item => item.label === user.Occupation)?.id || user.Occupation,\n gender: user.Sex,\n dob: moment().toISOString().split(\"T\")[0],\n role: \"GENERAL_PRACTITIONER\",\n is_patient: false,\n };\n }\n return dispatch(createUser(req_data))\n .then((res) => {\n if (res && res.status === 200) {\n setSuccessImportedUser((preVal) => {\n return preVal + 1;\n });\n }\n return res;\n })\n .catch((err) => {\n return err;\n });\n };\n const validateUser = function (user) {\n let schema = user_types === \"PATIENT\" ? patientSchema : practitionerSchema;\n return schema\n .validate(user, { abortEarly: false })\n .then((res) => {\n return res;\n })\n .catch((err) => {\n return err;\n });\n };\n const tryUsers = async (users) => {\n const userPromises = [];\n users.forEach((user) => {\n userPromises.push(validateUser(user));\n });\n const _users = await new Promise((resolve) => {\n const validatedUsers = Promise.all(userPromises).then((res) => {\n return res;\n });\n resolve(validatedUsers);\n });\n const __errors = [];\n for (let i = 0; i < _users.length; i++) {\n if (_users[i].name !== \"ValidationError\") {\n await new Promise((resolve) => {\n return addUsers(_users[i]).then((res) => {\n if (res && res.status === 200) {\n enqueueSnackbar(res.message , {variant : 'success'})\n return resolve(true);\n }else {\n setNotEnoughNF(res.message)\n setActiveStep(8)\n }\n });\n });\n } else {\n let tempVar = [];\n _users[i].inner.forEach((inn) => {\n tempVar.push({\n errors: [...inn.errors],\n path: inn.path,\n oldValue: inn.value,\n });\n });\n __errors.push({ error: tempVar, user: _users[i].value });\n }\n }\n setErrors(__errors);\n setActiveStep(6);\n };\n const handleStartImport = () => {\n const numberOfUsers = users[0].length;\n const _columns = getColumn(users, 0);\n const _users = [];\n let forValidation;\n if (user_types === \"PATIENT\") {\n forValidation = [\n \"FirstName\",\n \"LastName\",\n \"DateOfBirth\",\n \"Sex\",\n \"Email\",\n \"Diagnosis\",\n ];\n } else {\n forValidation = [\n \"FirstName\",\n \"LastName\",\n \"Occupation\",\n \"Email\",\n \"Sex\",\n ];\n }\n for (let i = 1; i < numberOfUsers; i++) {\n const tempUser = {};\n for (let j = 0; j < users.length; j++) {\n tempUser[`${forValidation[j]}`] =\n users[\n _columns.indexOf(\n user_types === \"PATIENT\"\n ? MAIN_COLUMN_PATIENT[j]\n : MAIN_COLUMN_PRACTITONER[j]\n )\n ][i];\n }\n _users.push(tempUser);\n }\n tryUsers(_users);\n };\n const handleNext = async (users) => {\n if (activeStep === steps.length - 1) {\n await dispatch(submitUserData());\n } else {\n if (activeStep === 6) {\n if (errors && errors.length) {\n tryUsers(users);\n setActiveStep(5);\n } else {\n setActiveStep(7);\n }\n } else if (activeStep === 4) {\n setActiveStep(5);\n handleStartImport();\n } else {\n setActiveStep((prevActiveStep) => prevActiveStep + 1);\n }\n }\n };\n\n const handleBack = () => {\n if (activeStep === 4) {\n setUsers(null);\n setActiveStep(2);\n } else {\n if (activeStep === 1) {\n setUserTypes(\"\");\n } else if (activeStep === 2) {\n setAddingType(\"\");\n }\n setActiveStep((prevActiveStep) => prevActiveStep - 1);\n }\n };\n\n const handleReset = () => {\n setUserTypes(\"\");\n setAddingType(\"\");\n setUsers(null);\n setErrors([]);\n setActiveStep(0);\n setSuccessImportedUser(0);\n setNotEnoughNF(null)\n };\n\n const upgradePlanes = () => {\n history.push(\"/billing\")\n setNotEnoughNF(null)\n setActiveStep(0)\n }\n\n const handleSetAddingType = (type) => {\n setAddingType(type);\n };\n\n const handleSetUserType = (type) => {\n setUserTypes(type);\n };\n const handleConfirmInputFields = (users) => {\n setUsers(users);\n handleNext();\n };\n\n const showSuccessMessage = () => {\n setActiveStep(7);\n };\n const handleAddOrUpload = () => {\n setUsers(null);\n setActiveStep(2);\n setSuccessImportedUser(0);\n };\n\n useEffect(() => {\n if(props.users) {\n const prac = props.users.filter(user => {\n var roles = user.roles.map(function(item) {\n return item['role_name'];\n });\n return roles.includes(UserTypes[1].value2)\n })\n setPractitioner(prac)\n }\n },[props.users])\n const getStepTitle = (stepIndex) => {\n switch (stepIndex) {\n case 0:\n return \"Who are you creating an account for?\";\n case 1:\n return \"How many users would you like to add?\";\n case 2:\n return user_types === \"PATIENT\"\n ? addingType === \"individual\"\n ? \"Create New Patient Profile\"\n : \"Upload Your File\"\n : addingType === \"individual\"\n ? \"Create New Practitioner Profile\"\n : \"Upload Your File\";\n case 3:\n return \"\";\n case 4:\n return addingType !== \"individual\" ? \"Confirm Import\" : \"\";\n case 5:\n return \"\";\n case 6:\n return \"Uploading Result\";\n case 7:\n return \"\";\n case 8:\n return \"Not enough Neurofit?\";\n default:\n return \"Unknown stepIndex\";\n }\n };\n const setActiveStepNOTNF= (res) => {\n setNotEnoughNF(res?.message)\n setActiveStep(8)\n }\n const getStepContent = (stepIndex) => {\n switch (stepIndex) {\n case 0:\n return ;\n case 1:\n return ;\n case 2:\n return user_types === \"PATIENT\" ? (\n addingType === \"individual\" ? (\n \n ) : (\n \n )\n ) : addingType === \"individual\" ? (\n \n ) : (\n \n );\n case 3:\n return addingType !== \"individual\" ? (\n \n ) : (\n \"\"\n );\n case 4:\n return addingType !== \"individual\" ? (\n \n ) : (\n \"\"\n );\n case 5:\n return addingType !== \"individual\" ? (\n \n ) : (\n \"\"\n );\n case 6:\n return addingType !== \"individual\" ? (\n \n ) : (\n \"\"\n );\n case 7:\n return addingType !== \"individual\" ? (\n \n ) : (\n \n );\n\n case 8 : \n return ( \n \n )\n default:\n return \"Unknown stepIndex\";\n }\n };\n return (\n
\n

{getStepTitle(activeStep)}

\n \n {getStepContent(activeStep)}\n \n {activeStep !== 5 && activeStep !== 7 && activeStep !== 8 && (\n
\n {activeStep !== 3 && (\n \n Cancel\n \n )}\n {activeStep !== 3 && activeStep !== 6 && activeStep !== 7 && (\n
\n
\n \n Back\n \n \n \n {activeStep === 4\n ? \"Start Import\"\n : activeStep === 2 && addingType === \"individual\"\n ? \"Add User\"\n : \"Next\"}\n \n
\n
\n )}\n \n
\n )}\n
\n );\n}\n","import React, { Component } from \"react\";\nimport { withStyles } from \"@material-ui/core/styles\";\nimport Grid from \"@material-ui/core/Grid\";\nimport PractitionersList from \"./PractitionersList\";\nimport { connect } from \"react-redux\";\nimport {\n updateUser,\n createUser,\n showModal,\n hideModal,\n archiveUser,\n getUsersByOrg,\n downloadPractitionerPatientCsv,\n} from \"../../actions\";\nimport { ARCHIVE_MODAL } from \"../sharedComponents/Modals/constants\";\nimport CustomDialog from \"../sharedComponents/CustomDialog\";\nimport AddIcon from \"../sharedComponents/AddIcon\";\nimport withModals from \"../sharedComponents/Modals/withModals\";\nimport AddUsersStepper from \"../practitionersManagement/addUsersStepper/AddUsersStepper\";\n\nconst styles = (theme) => ({\n select: {\n width: \"50%\",\n height: \"40px\",\n },\n title: {\n fontSize: \"30px\",\n lineHeight: \"37px\",\n fontFamily: \"MontserratBold\",\n color: \"#333437\",\n fontWeight: \"700\",\n padding: \"6px 0.8em\",\n },\n selectedItem: {\n backgroundColor: theme.palette.info.light,\n },\n selectContainer: {\n padding: \"6px 1.5em\",\n width: \"100%\",\n },\n gridContainer: {\n marginTop: \"20px\",\n width: \"70%\",\n marginLeft: \"-18px\",\n \"& .MuiFab-label\": {\n fontFamily: \"MontserratBold\",\n color: \"#333437\",\n fontWeight: \"700\",\n lineHeight: \"37px\",\n },\n },\n userTypesLabel: {\n display: \"inline-block !important\",\n marginRight: \"10px\",\n },\n});\n\nclass Users extends Component {\n constructor(props) {\n super(props);\n this.state = {\n user_types: props.user_types || [\"PATIENT\"],\n checkedStates: {\n PATIENT: true,\n },\n menuAnchorTarget: null,\n hasFetched: false,\n users: undefined,\n };\n }\n\n toggleUploadModal(_, reason) {\n if (reason !== \"backdropClick\") {\n this.props.toggleArchiveModal();\n }\n }\n\n handleDownloadInvoice = () => {\n this.props.downloadPractitionerPatientCsv();\n }\n render() {\n const { classes, toggleArchiveModal, modals } = this.props;\n return (\n <>\n \n

Manage User Accounts

\n \n \n \n \n \n
\n \n \n
\n \n
\n \n \n );\n }\n}\n\nconst mapStateToProps = (state) => {\n return {\n users: state.userReducer.users,\n hasFetched: state.userReducer.hasFetched,\n modal: state.modalReducer,\n toggleArchiveModal: ARCHIVE_MODAL,\n };\n};\n\nconst modalsProps = {\n toggleArchiveModal: ARCHIVE_MODAL,\n};\n\nexport default connect(mapStateToProps, {\n getUsersByOrg,\n updateUser,\n createUser,\n showModal,\n hideModal,\n archiveUser,\n downloadPractitionerPatientCsv,\n})(withStyles(styles)(withModals(Users, modalsProps)));\n","import http from \"../http-common\";\nimport moment from \"moment\";\n\nimport {\n GET_PATIENT_NOTES,\n CREATE_PATIENT_NOTE,\n UPDATE_PATIENT_NOTE,\n DELETE_PATIENT_NOTE,\n} from \"./types\";\n\nfunction tryDispatch(dispatch, args) {\n if (dispatch) {\n dispatch(args);\n }\n}\n\nclass NotesActions {\n static USER_NOTES_ROUTE = \"organization/users/{user_id}/notes\";\n static USER_NOTE_INSTANCE_ROUTE =\n \"organization/users/{user_id}/notes/{note_id}\";\n\n static __ResolvePath(path, user_id, note_id = \"\") {\n return path.replace(\"{user_id}\", user_id).replace(\"{note_id}\", note_id);\n }\n\n static GetNotes(user_id, options) {\n const route = NotesActions.__ResolvePath(\n NotesActions.USER_NOTES_ROUTE,\n user_id\n );\n const start_date = options?.start_date;\n const end_date = options?.end_date;\n\n return async (dispatch) => {\n const response = await http\n .get(route, {\n params: {\n start_date: start_date,\n end_date: end_date,\n },\n })\n .then((response) => {\n return response;\n })\n .catch((error) => {\n return error.response;\n });\n\n tryDispatch(dispatch, {\n type: GET_PATIENT_NOTES,\n payload: response.data,\n response: response,\n });\n\n return response;\n };\n }\n\n /**\n * Creates a new note for the given user\n * @param { } user_id The UUID of the user to create the note for\n * @param { } note_data.note The text of the note in markdown format\n * @param { } note_data.note_date The date of the note, or null for the current date\n * @returns An axios HTTP response\n */\n static CreateNote(user_id, note_data) {\n const note = note_data.note;\n const note_date = moment(note_data.note_date).utc().toISOString(true);\n const route = NotesActions.__ResolvePath(\n NotesActions.USER_NOTES_ROUTE,\n user_id\n );\n\n return async (dispatch) => {\n const response = await http\n .post(route, {\n note,\n note_date,\n })\n .then((response) => {\n return response;\n })\n .catch((error) => {\n return error.response;\n });\n\n tryDispatch(dispatch, {\n type: CREATE_PATIENT_NOTE,\n payload: response.data,\n response: response,\n });\n\n return response;\n };\n }\n\n /**\n * Updates a given note, overriding it's text or date\n * @param { } user_id The UUID of the user that the note is on\n * @param { } note_id The UUID of the note to update\n * @param { } note_data.note The text of the note in markdown format\n * @param { } note_data.note_date The date of the note, or null for the current date\n * @returns An axios HTTP response\n */\n static UpdateNote(user_id, note_id, note_data) {\n const note = note_data.note;\n const note_date = moment(note_data.note_date).utc().toISOString(true);\n const route = NotesActions.__ResolvePath(\n NotesActions.USER_NOTE_INSTANCE_ROUTE,\n user_id,\n note_id\n );\n\n return async (dispatch) => {\n const response = await http\n .put(route, {\n note,\n note_date,\n })\n .then((response) => {\n return response;\n })\n .catch((error) => {\n return error.response;\n });\n\n tryDispatch(dispatch, {\n type: UPDATE_PATIENT_NOTE,\n payload: response.data,\n response: response,\n });\n\n return response;\n };\n }\n\n /**\n * Deletes a note associated with the user\n * @param {string} user_id The UUID of the user that the note is on\n * @param {string} note_id The UUID of the note to update\n * @returns An axios HTTP response\n */\n static DeleteNote(user_id, note_id) {\n const route = NotesActions.__ResolvePath(\n NotesActions.USER_NOTE_INSTANCE_ROUTE,\n user_id,\n note_id\n );\n\n return async (dispatch) => {\n const response = await http\n .delete(route)\n .then((response) => {\n return response;\n })\n .catch((error) => {\n return error.response;\n });\n\n tryDispatch(dispatch, {\n type: DELETE_PATIENT_NOTE,\n payload: response.data,\n response: response,\n });\n\n return response;\n };\n }\n}\n\nexport default NotesActions;\n","import moment from \"moment\"\nimport http from \"../http-common\"\nimport util from \"util\"\nimport { Debug } from \"../lib\"\nimport {\n ACTIVE_PATH_CHANGED,\n ARCHIVE_USER,\n CREATE_USER,\n CREATE_ASSIGNMENT_REQUEST,\n CREATE_ASSIGNMENT_SUCCESS,\n CREATE_ASSIGNMENT_FAILURE,\n CREATE_ASSIGNMENT_RESET,\n UPDATE_ACTIVITY_REQUEST,\n UPDATE_ACTIVITY_SUCCESS,\n UPDATE_ACTIVITY_FAILURE,\n UPDATE_ACTIVITY_RESET,\n DISPLAY_USERNAME,\n GET_ASSIGNED_PATIENTS,\n GET_ASSIGNMENTS,\n GET_DETAILS_CURRENT_AUTH_ORG,\n GET_GRAPH_DATA,\n GET_LONGEST_STREAK,\n GET_ORGANIZATIONS,\n GET_OVER_PROGRESS_OVER_TIME,\n GET_PATIENTS_SESSIONS_ORG,\n GET_RADAR_PLOT_DATA,\n GET_RATINGS_PAITENTS_ORG,\n GET_SELECTED_USER,\n GET_SESSIONS_BY_ORGANIZATION,\n GET_STACKED_BAR_CHART,\n GET_USER_SESSIONS,\n GET_USER_SKILL_LEVELS,\n GET_USER,\n GET_USERS_BY_ORG_ID,\n GET_USERS_BY_ORG,\n GET_USER_REQUEST,\n GET_USER_SUCCESS,\n GET_USER_FAILURE,\n GET_USER_ACTIVITY_STATS_REQUEST,\n GET_USER_ACTIVITY_STATS_SUCCESS,\n GET_USER_ACTIVITY_STATS_FAILURE,\n GET_PATIENT_REPORT_CONFIG_REQUEST,\n GET_PATIENT_REPORT_CONFIG_SUCCESS,\n GET_PATIENT_REPORT_CONFIG_FAILURE,\n CREATE_PATIENT_REPORT_CONFIG_REQUEST,\n CREATE_PATIENT_REPORT_CONFIG_SUCCESS,\n CREATE_PATIENT_REPORT_CONFIG_FAILURE,\n CREATE_PATIENT_REPORT_CONFIG_CLEAR,\n HIDE_MODAL,\n NAV_COLLAPSE,\n NAV_EXPAND,\n REGISTER_ORGANIZATION,\n SHOW_MODAL,\n SIGN_IN,\n SIGN_OUT,\n SUBMIT_USER_DATA,\n TOGGLE_ATTENTION_LINE,\n TOGGLE_DRAWER,\n TOGGLE_LOGIN_FOR_USERS,\n TOGGLE_LOGOUT_MODAL,\n TOGGLE_MEMORY_LINE,\n TOGGLE_PROCESSING_LINE,\n UPDATE_ACCOUNT_PRIVILEGE,\n UPDATE_END_DATE_SELECT,\n UPDATE_SELECTED_ORGANIZATION,\n UPDATE_SELECTED_USER,\n UPDATE_START_DATE_SELECT,\n UPDATE_USER,\n UPDATE_USER_REQUEST,\n UPDATE_USER_SUCCESS,\n UPDATE_USER_FAILURE,\n SET_LANGUAGE,\n UPDATE_WITHIN_DATE_SELECT,\n GET_LEVELS_REQUEST,\n GET_LEVELS_SUCCESS,\n GET_LEVELS_FAILURE,\n GET_LEVEL_REQUEST,\n GET_LEVEL_SUCCESS,\n GET_LEVEL_FAILURE,\n GET_LEVEL_CLEAR,\n DELETE_ACTIVITY,\n GET_ACTIVE_PATIENTS_REQUEST,\n GET_ACTIVE_PATIENTS_SUCCESS,\n GET_ACTIVE_PATIENTS_FAILURE\n} from \"./types\"\nimport PermissionsService from \"../lib/PermissionsSystem\"\n\nconst ACTIVITY_TEST_DATA = JSON.parse(`{\n \"dailyStats\": [\n {\n \"date\": \"2024-11-28\",\n \"completionTime\": 13.676,\n \"activityCount\": 1,\n \"hintsCount\": 0,\n \"activities\": [\n {\n \"type\": \"TrailMaking\",\n \"completionTime\": 13.676,\n \"difficulty\": 5,\n \"supportToggle\": 0,\n \"hintToggle\": 0,\n \"completion_time\": 13.676,\n \"correct\": 10,\n \"incorrect\": 1,\n \"support_toggle\": 0\n }\n ]\n },\n {\n \"date\": \"2024-12-07\",\n \"completionTime\": 35.7265,\n \"activityCount\": 2,\n \"hintsCount\": 0,\n \"activities\": [\n {\n \"type\": \"TrailMaking\",\n \"completionTime\": 0,\n \"difficulty\": 5,\n \"supportToggle\": 0,\n \"hintToggle\": 0,\n \"completion_time\": 0,\n \"correct\": 10,\n \"incorrect\": 1,\n \"support_toggle\": 0\n },\n {\n \"type\": \"MailRoom\",\n \"completionTime\": 35.7265,\n \"difficulty\": 5,\n \"completion_time\": 35.7265,\n \"correct\": 1,\n \"incorrect\": 0\n }\n ]\n },\n {\n \"date\": \"2024-12-09\",\n \"completionTime\": 0,\n \"activityCount\": 2,\n \"hintsCount\": 0,\n \"activities\": [\n {\n \"type\": \"TrailMaking\",\n \"completionTime\": 0,\n \"difficulty\": 5,\n \"supportToggle\": 0,\n \"hintToggle\": 0,\n \"completion_time\": 0,\n \"correct\": 10,\n \"incorrect\": 0,\n \"support_toggle\": 0\n },\n {\n \"type\": \"Western\",\n \"completionTime\": 0,\n \"difficulty\": 5,\n \"supportToggle\": 0,\n \"hintToggle\": 0,\n \"completion_time\": 0,\n \"correct\": 5,\n \"incorrect\": 0,\n \"missed\": 3,\n \"target_lifetime\": 31.3881,\n \"support_toggle\": 0\n }\n ]\n },\n {\n \"date\": \"2024-12-10\",\n \"completionTime\": 23.493,\n \"activityCount\": 2,\n \"hintsCount\": 0,\n \"activities\": [\n {\n \"type\": \"NaturePath\",\n \"completionTime\": 23.493,\n \"difficulty\": 5,\n \"supportToggle\": 0,\n \"hintToggle\": 0,\n \"completion_time\": 23.493,\n \"correct\": 7,\n \"incorrect\": 2,\n \"revisits\": 4,\n \"support_toggle\": 0,\n \"hint_toggle\": 0\n },\n {\n \"type\": \"TrailMaking\",\n \"completionTime\": 0,\n \"difficulty\": 5,\n \"supportToggle\": 0,\n \"hintToggle\": 0,\n \"completion_time\": 0,\n \"correct\": 10,\n \"incorrect\": 1,\n \"support_toggle\": 0\n }\n ]\n },\n {\n \"date\": \"2025-03-06\",\n \"completionTime\": 0,\n \"activityCount\": 1,\n \"hintsCount\": 0,\n \"activities\": [\n {\n \"type\": \"NaturePath\",\n \"completionTime\": 0,\n \"difficulty\": 0,\n \"supportToggle\": 0,\n \"hintToggle\": 0,\n \"completion_time\": 0,\n \"correct\": 2,\n \"incorrect\": 0,\n \"revisits\": 0,\n \"support_toggle\": 0,\n \"hint_toggle\": 0\n }\n ]\n }\n ],\n \"averageCompletionTimeByActivity\": {\n \"Western\": 147.92350822641512,\n \"MailRoom\": 41.399625,\n \"NaturePath\": 150.38099363309342,\n \"Restaurant\": 13.41531,\n \"TrailMaking\": 139.2391694576271,\n \"SpotTheDifference\": 0\n },\n \"averageDifficultyByActivity\": {\n \"Western\": 4.981102111320759,\n \"MailRoom\": 1.5005275,\n \"NaturePath\": 5.027435278417265,\n \"Restaurant\": 0.6705333333333333,\n \"TrailMaking\": 4.494371314915255,\n \"SpotTheDifference\": 0\n },\n \"averageHintsByActivity\": {\n \"Western\": 1.0150943396226415,\n \"MailRoom\": 0,\n \"NaturePath\": 2.0755395683453237,\n \"Restaurant\": 0,\n \"TrailMaking\": 0.8813559322033898,\n \"SpotTheDifference\": 0\n },\n \"totalAggregateCompletionTime\": 122287.04532999994,\n \"totalAggregateHints\": 1106,\n \"longestConsecutiveDays\": 264,\n \"totalGameSessions\": 1637,\n \"difficultyProgression\": {\n \"slope\": -0.00027456600577940697,\n \"intercept\": 5.0256687783895675,\n \"percentChange\": -100\n }\n}`)\n\n\nfunction tryDispatch(dispatch, args) {\n if (dispatch) {\n dispatch(args)\n }\n}\n\n//----------------------------- AUTH ACTIONS -----------------------------\nexport const signIn =\n ({ email, password }) =>\n async (dispatch) => {\n const response = await http\n .put(\"organization/login\", {\n email: email,\n password: password,\n })\n .then((response) => {\n Debug.log(\"Auth: \" + response.headers.authorization)\n Debug.log(\"Refresh: \" + response.headers.refresh_token)\n Debug.log(\"Permissions: \" + JSON.stringify(response.data.permissions))\n localStorage.setItem(\"auth_token\", response.headers.authorization)\n localStorage.setItem(\"refresh_token\", response.headers.refresh_token)\n localStorage.setItem(\n \"permissions_list\",\n JSON.stringify(response.data.permissions)\n )\n localStorage.setItem(\"privilege\", response.data.organization.privilege)\n localStorage.setItem(\"user_data\", JSON.stringify(response.data.user))\n localStorage.setItem(\n \"org_data\",\n JSON.stringify(response.data.organization)\n )\n localStorage.setItem(\"org_name\", response.data.organization.name)\n localStorage.setItem(\"org_status\", response.data.organization.status)\n localStorage.setItem(\"features\", JSON.stringify(response.data.features))\n PermissionsService.SetPermissions(response.data.permissions)\n PermissionsService.SetUserBlob(response.data.user)\n\n tryDispatch(dispatch, {\n type: SIGN_IN,\n payload: response,\n })\n return response.data\n })\n .catch((error) => {\n Debug.log(util.inspect(error))\n localStorage.clear()\n PermissionsService.Reset()\n if (error.response)\n return {\n status: error.response.status,\n is_error: true,\n message: error.response.data.message,\n }\n else\n return {\n status: 500,\n is_error: true,\n message: error.message || \"An unknown error has occurred\",\n }\n })\n\n return response\n }\n\nexport const signOut = () => {\n Debug.log(\"Logging Out!\")\n localStorage.clear()\n localStorage.removeItem(\"auth_token\")\n localStorage.removeItem(\"refresh_token\")\n localStorage.removeItem(\"permissions_list\")\n localStorage.removeItem(\"privilege\")\n localStorage.removeItem(\"org_name\")\n localStorage.removeItem(\"org_status\")\n localStorage.removeItem(\"features\")\n PermissionsService.Reset()\n\n return {\n type: SIGN_OUT,\n }\n}\n\nexport const reqPasswordReset =\n ({ email }) =>\n async (dispatch) => {\n const response = await http\n .post(\"user/request_reset_password\", {\n email,\n })\n .then((response) => {\n return true\n })\n .catch((error) => {\n return false\n })\n\n return response\n }\n\nexport const resetPassword =\n ({ new_password, token }) =>\n async (dispatch) => {\n const response = await http\n .post(\"user/reset_password\", {\n token,\n new_password,\n })\n .then((response) => {\n return true\n })\n .catch((error) => {\n return false\n })\n\n return response\n }\n\nexport const validateResetToken =\n ({ token }) =>\n async (dispatch) => {\n const response = await http\n .get(\"user/validate_reset_token\", {\n params: {\n token,\n },\n })\n .then((response) => {\n return true\n })\n .catch((error) => {\n return false\n })\n\n return response\n }\n\n//----------------------------- USER ACTIONS -----------------------------\n\nexport const getUsersByOrg = () => async (dispatch) => {\n const response = await http\n .post(\"/organization/users\", {\n include_archived: true,\n })\n .then((response) => {\n let data = response.data\n data.sort((a, b) => {\n if (a.last_name > b.last_name) return 1\n if (b.last_name > a.last_name) return -1\n return 0\n })\n return data\n })\n .catch((err) => {\n throw err\n })\n\n tryDispatch(dispatch, {\n type: GET_USERS_BY_ORG,\n payload: response,\n })\n return response\n}\n\nexport const getDetailsForCurrOrg = () => async (dispatch) => {\n const response = await http\n .get(\"/organization/details\")\n .then((response) => {\n let data = response.data\n return data\n })\n .catch((err) => {\n throw err\n })\n tryDispatch(dispatch, {\n type: GET_DETAILS_CURRENT_AUTH_ORG,\n payload: response,\n })\n return response\n}\n\nexport const getUsersByOrgId = (org_id) => async (dispatch) => {\n const response = await http\n .get(`/organization/${org_id}/practitioners`)\n .then((response) => {\n let data = response.data.selectPrac\n data.sort((a, b) => {\n if (a.last_name > b.last_name) return 1\n if (b.last_name > a.last_name) return -1\n return 0\n })\n return data\n })\n .catch((err) => {\n throw err\n })\n\n tryDispatch(dispatch, {\n type: GET_USERS_BY_ORG_ID,\n payload: response,\n })\n return response\n}\nexport const getUser = (user_id) => async (dispatch) => {\n const response = await http\n .get(`/organization/users/${user_id}`)\n .then((response) => {\n response.data.id = user_id\n return response\n })\n .catch((error) => {\n return error.response\n })\n\n tryDispatch(dispatch, {\n type: GET_USER,\n payload: response.data,\n response: response,\n })\n\n return response\n}\n\n// Action Creators\nconst getUserRequest = () => ({\n type: GET_USER_REQUEST,\n})\n\nconst getUserSuccess = (userData) => ({\n type: GET_USER_SUCCESS,\n payload: userData,\n})\n\nconst getUserFailure = (error) => ({\n type: GET_USER_FAILURE,\n payload: error,\n})\n\nexport const getUserThunk = (userId) => {\n return async (dispatch) => {\n dispatch(getUserRequest())\n\n try {\n const results = []\n const response = await http.get(`/organization/users/${userId}`)\n\n dispatch(getUserSuccess(response.data))\n return results\n } catch (error) {\n dispatch(getUserFailure(error.message))\n throw error\n }\n }\n}\n\nexport const updateSelectedUser = (userEmail) => (dispatch) => {\n tryDispatch(dispatch, {\n type: UPDATE_SELECTED_USER,\n userEmail: userEmail,\n })\n}\n\nexport const createUser = (formData) => async (dispatch) => {\n const response = await http\n .request({\n url: \"/user\",\n method: \"post\",\n data: {\n email: formData.email,\n first_name: formData.first_name,\n last_name: formData.last_name,\n dob: formData.dob,\n gender: formData.gender,\n education: formData.education,\n diagnosis: formData.diagnosis,\n is_patient: formData.is_patient,\n password: formData.password,\n role: formData.role,\n occupation: formData?.occupation,\n practitioner: formData?.practitioner,\n },\n })\n .then((response) => {\n return {\n status: response.status,\n message: response.data.message,\n }\n })\n .catch((error) => {\n return {\n status: 400,\n message: error.response.data.message,\n errorType: error.response.data.error_type,\n }\n })\n\n /*tryDispatch(dispatch, {\n type: CREATE_USER,\n payload: response\n });*/\n\n // dispatch(getUsersByOrg());\n\n return response\n}\n\nexport const updateUser = (id, formData) => async (dispatch) => {\n const response = await http\n .request({\n url: `/organization/users/${id}`,\n method: \"put\",\n data: formData,\n })\n .then((response) => {\n return response.data\n })\n .catch((error) => {\n throw error\n })\n //Dispatch get users action to update user and fetch new list of users\n tryDispatch(dispatch, {\n type: UPDATE_USER,\n payload: response,\n })\n tryDispatch(dispatch, getUsersByOrg())\n return response\n}\n\nexport const updateUserRequest = () => ({\n type: UPDATE_USER_REQUEST,\n})\nexport const updateUserSuccess = (responseData) => ({\n type: UPDATE_USER_SUCCESS,\n payload: responseData,\n})\nexport const updateUserFailure = (error) => ({\n type: UPDATE_USER_FAILURE,\n payload: error,\n})\n\nexport const updateUserThunk = (user) => {\n return async (dispatch) => {\n dispatch(updateUserRequest())\n\n try {\n const response = await http.request({\n url: `/organization/users/${user.id}`,\n method: \"put\",\n data: user,\n })\n\n dispatch(updateUserSuccess(response.data))\n return response.data\n } catch (error) {\n dispatch(updateUserFailure(error.message))\n }\n }\n}\n\nexport const setLanguage = (language) => ({\n type: SET_LANGUAGE,\n payload: language,\n})\n\nexport const archiveUser = (user, is_archived) => async (dispatch) => {\n const response = await http\n .request({\n url: `/organization/users/${user}/archive`,\n method: \"put\",\n params: {\n is_archived,\n },\n })\n .then((response) => {\n return response.data\n })\n .catch((error) => {\n throw error\n })\n\n console.log(response)\n tryDispatch(dispatch, {\n type: ARCHIVE_USER,\n payload: response,\n })\n}\n\nexport const toggleLogin = (userId, can_login) => async (dispatch) => {\n const response = await http\n .request({\n url: `/organization/users/${userId}/can_login`,\n method: \"put\",\n data: {\n can_login,\n },\n })\n .then((response) => {\n return response.data\n })\n .catch((error) => {\n throw error\n })\n\n tryDispatch(dispatch, getUsersByOrg())\n return response\n}\n\nexport const toggleAllUsers = (can_login) => async (dispatch) => {\n const response = await http\n .request({\n url: `/organization/users/can_login`,\n method: \"put\",\n data: {\n can_login,\n },\n })\n .then((response) => {\n return response.data\n })\n .catch((error) => {\n return error\n })\n\n tryDispatch(dispatch, {\n type: TOGGLE_LOGIN_FOR_USERS,\n payload: response,\n })\n\n tryDispatch(dispatch, getUsersByOrg())\n}\n\nexport const getSelectedUser = (user_id) => async (dispatch) => {\n const response = await http\n .request({\n url: `/organization/users/${user_id}/`,\n method: \"put\",\n params: {\n user_id: user_id,\n },\n })\n .then((response) => {\n return response.data\n })\n .catch((error) => {\n return error\n })\n\n tryDispatch(dispatch, {\n type: GET_SELECTED_USER,\n payload: response,\n })\n tryDispatch(dispatch, getUsersByOrg())\n}\n\nexport const submitUserData = () => async (dispatch) => {\n tryDispatch(dispatch, {\n type: SUBMIT_USER_DATA,\n })\n}\n\n//----------------------------- MODAL ACTIONS -----------------------------\n\nexport const showModal =\n ({ modalProps, modalType }) =>\n (dispatch) => {\n modalProps.open = true\n\n tryDispatch(dispatch, {\n type: SHOW_MODAL,\n modalProps,\n modalType,\n })\n }\n\nexport const hideModal = () => (dispatch) => {\n tryDispatch(dispatch, {\n type: HIDE_MODAL,\n })\n}\n\n//----------------------------- GENERAL GRAPH ACTIONS (COGNITIVE PROFILE) -----------------------------\n\nexport const toggleMemoryLine = (value) => (dispatch) => {\n dispatch({\n type: TOGGLE_MEMORY_LINE,\n value,\n })\n}\n\nexport const toggleAttentionLine = (value) => (dispatch) => {\n dispatch({\n type: TOGGLE_ATTENTION_LINE,\n value,\n })\n}\n\nexport const toggleProcessingLine = (value) => (dispatch) => {\n dispatch({\n type: TOGGLE_PROCESSING_LINE,\n value,\n })\n}\n\nexport const updateStartDateSelect = (date) => (dispatch) => {\n try {\n // date = date.toISOString()\n date = moment(date).utc()\n } catch {\n date = \"\"\n }\n\n dispatch({\n type: UPDATE_START_DATE_SELECT,\n date: date,\n })\n}\n\nexport const updateEndDateSelect = (date) => (dispatch) => {\n try {\n date = moment(date).utc()\n } catch {\n date = \"\"\n }\n dispatch({\n type: UPDATE_END_DATE_SELECT,\n date: date,\n })\n}\n\nexport const getGraphData = (user, startDate, endDate) => async (dispatch) => {\n const response = await http\n .request({\n url: decodeURIComponent(\n `/organization/users/${user}/sessions/aggregated`\n ),\n params: {\n fromDate: startDate,\n toDate: endDate,\n include_records: true,\n },\n method: \"get\",\n })\n .then((response) => {\n if (response.data.trail_making.session_count <= 0) {\n return undefined\n }\n return response.data\n })\n .catch((error) => {\n return error\n })\n\n dispatch({\n type: GET_GRAPH_DATA,\n payload: response,\n })\n return response\n}\n\n// Action Creators\nconst getUserActivityStatsRequest = (userId) => ({\n type: GET_USER_ACTIVITY_STATS_REQUEST,\n payload: {userId: userId},\n})\n\nconst getUserActivityStatsSuccess = (userId, data) => ({\n type: GET_USER_ACTIVITY_STATS_SUCCESS,\n payload: {data: data, userId: userId},\n})\n\nconst getUserActivityStatsFailure = (userId, error) => ({\n type: GET_USER_ACTIVITY_STATS_FAILURE,\n payload: {error: error, userId: userId},\n})\n\n// Thunk Action\nexport const getUserActivityStats = (userId) => {\n return async (dispatch) => {\n dispatch(getUserActivityStatsRequest(userId))\n\n try {\n const response = await http.get(`/user/${userId}/activity_stats`)\n dispatch(getUserActivityStatsSuccess(userId, ACTIVITY_TEST_DATA))\n return response.data\n } catch (error) {\n dispatch(getUserActivityStatsFailure(userId, error.message))\n throw error\n }\n }\n}\n\n// Action Creators\nconst getPatientReportConfigRequest = () => ({\n type: GET_PATIENT_REPORT_CONFIG_REQUEST,\n})\n\nconst getPatientReportConfigSuccess = (data) => ({\n type: GET_PATIENT_REPORT_CONFIG_SUCCESS,\n payload: data,\n})\n\nconst getPatientReportConfigFailure = (error) => ({\n type: GET_PATIENT_REPORT_CONFIG_FAILURE,\n payload: error,\n})\n\n// Thunk Action\nexport const getPatientReportConfig = (patientId) => {\n return async (dispatch) => {\n dispatch(getPatientReportConfigRequest())\n\n try {\n const response = await http.request({\n url: `/user/${patientId}/report_config`,\n method: \"get\",\n })\n dispatch(getPatientReportConfigSuccess(response.data.configuration))\n return response.data.configuration\n } catch (error) {\n dispatch(getPatientReportConfigFailure(error.message))\n throw error\n }\n }\n}\n\n// Action Creators\nconst createPatientReportConfigRequest = () => ({\n type: CREATE_PATIENT_REPORT_CONFIG_REQUEST,\n})\n\nconst createPatientReportConfigSuccess = (data) => ({\n type: CREATE_PATIENT_REPORT_CONFIG_SUCCESS,\n payload: data,\n})\n\nconst createPatientReportConfigFailure = (error) => ({\n type: CREATE_PATIENT_REPORT_CONFIG_FAILURE,\n payload: error,\n})\n\n// Thunk Action\nexport const createPatientReportConfig = (patientId, reportConfig) => {\n return async (dispatch) => {\n dispatch(createPatientReportConfigRequest())\n\n try {\n const response = await http.request({\n url: `/user/${patientId}/report_config`,\n method: \"post\",\n data: reportConfig,\n })\n dispatch(createPatientReportConfigSuccess(response.data.configuration))\n return response.data.configuration\n } catch (error) {\n dispatch(createPatientReportConfigFailure(error.message))\n throw error\n }\n }\n}\n\nexport const createPatientReportConfigClear = () => (dispatch) => {\n dispatch({\n type: CREATE_PATIENT_REPORT_CONFIG_CLEAR,\n })\n}\n\n\n\n//----------------------------- USER RADAR PLOT ACTIONS (FEEDBACK / RATINGS) -----------------------------\n\nexport const getRadarPlotData =\n (user, start_date, end_date = new Date()) =>\n async (dispatch) => {\n const response = await http\n .request({\n method: \"get\",\n url: `/organization/users/${user}/ratings/averages?from=${start_date}&to=${end_date}`,\n })\n .then((response) => {\n return response.data\n })\n .catch((err) => {\n return err.response\n })\n\n Debug.log(\"Radar data: \" + util.inspect(response))\n dispatch({\n type: GET_RADAR_PLOT_DATA,\n payload: response,\n })\n return response\n }\n\nexport const updateWithinDateRange = (date) => (dispatch) => {\n dispatch({\n type: UPDATE_WITHIN_DATE_SELECT,\n date: date,\n })\n}\n\n//----------------------------- APPBAR ACTIONS -----------------------------\n\nexport const toggleLogoutModal = (value) => (dispatch) => {\n dispatch({\n type: TOGGLE_LOGOUT_MODAL,\n value,\n })\n}\n\nexport const toggleDrawer = (value) => (dispatch) => {\n dispatch({\n type: TOGGLE_DRAWER,\n value,\n })\n}\n\nexport const activeLinkChanged = (value) => (dispatch) => {\n dispatch({\n type: ACTIVE_PATH_CHANGED,\n value,\n })\n}\n\n//----------------------------- ORGANIZATIONS ACTIONS -----------------------------\nexport const getOrganizations = () => async (dispatch) => {\n const response = await http\n .request({\n url: \"/organizations\",\n method: \"get\",\n })\n .then((response) => {\n return response.data\n })\n .catch((error) => {\n return error.response\n })\n\n dispatch({\n type: GET_ORGANIZATIONS,\n payload: response,\n })\n}\n\nexport const setPrivilege = (orgId, newPrivilege) => async (dispatch) => {\n const response = await http\n .request({\n url: `/organizations/${orgId}/privilege/${newPrivilege}`,\n method: \"put\",\n })\n .then((response) => {\n return response.data\n })\n .catch((error) => {\n return error.response\n })\n\n dispatch({\n type: UPDATE_ACCOUNT_PRIVILEGE,\n payload: response,\n })\n\n dispatch(getOrganizations())\n}\n\nexport const downloadPractitionerPatientCsv = () => async () => {\n try {\n const response = await http.request({\n url: '/organization/report/practitioner-patient-csv',\n method: 'get',\n responseType: 'blob',\n })\n \n // Create a filename with the current date\n const filename = `neurofit_usage_report_${moment().format('YYYY-MM-DD')}.csv`\n \n // Create a blob from the response data\n const blob = new Blob([response.data], { type: 'text/csv' })\n \n // Create a download link and trigger the download\n const url = window.URL.createObjectURL(blob)\n const link = document.createElement('a')\n link.href = url\n link.setAttribute('download', filename)\n document.body.appendChild(link)\n link.click()\n \n // Clean up\n window.URL.revokeObjectURL(url)\n document.body.removeChild(link)\n \n return { success: true }\n } catch (error) {\n console.error('Error downloading CSV:', error)\n return { success: false, error }\n }\n}\n\n\n\nexport const registerOrganization = (formData) => async (dispatch) => {\n // For now we'll hard code the roles :(\n formData.role = \"ORG_ADMIN\"\n\n const response = await http\n .post(\"/organizations/create\", formData)\n .then((res) => {\n return {\n status: res.status,\n message: res.data.message,\n }\n })\n .catch((err) => {\n return {\n status: 400,\n message: err.response.data.message || \"An error has occurred\",\n }\n })\n\n dispatch({\n type: REGISTER_ORGANIZATION,\n response: response,\n })\n\n dispatch(getOrganizations())\n return response\n}\n\nexport const getSessionsByOrganization =\n (orgId, startDate, endDate) => async (dispatch) => {\n const response = await http\n .request({\n url: `/organizations/${orgId}/time_tracking/total`,\n method: \"get\",\n params: {\n from: startDate,\n to: endDate,\n include_records: true,\n },\n })\n .then((response) => {\n dispatch({\n type: GET_SESSIONS_BY_ORGANIZATION,\n payload: response.data,\n })\n\n return response.data\n })\n .then((error) => {\n return error.response\n })\n }\n\nexport const ratingValueForOrganization =\n (org_id, start_date, end_date = new Date()) =>\n async (dispatch) => {\n const response = await http\n .request({\n method: \"get\",\n url: `/organization/${org_id}/ratings/averages?from=${start_date}&to=${end_date}`,\n })\n .then((response) => {\n return response.data\n })\n .catch((err) => {\n return err.response\n })\n dispatch({\n type: GET_RATINGS_PAITENTS_ORG,\n payload: response,\n })\n return response\n }\n\nexport const progressOverTimeDataBasedOnFilter =\n (values) => async (dispatch) => {\n let filter = {\n exercise: null,\n }\n const {\n org_id,\n start_date,\n end_date,\n exercise,\n practitioners,\n sex,\n age,\n attendance,\n } = values\n\n if (exercise && Array.isArray(exercise) && exercise.length > 0) {\n filter.exercise = exercise.map((item) => {\n return \"&exercise=\" + item\n })\n filter.exercise = filter.exercise.join(\"\")\n }\n\n if (\n practitioners &&\n Array.isArray(practitioners) &&\n practitioners.length > 0\n ) {\n filter.practitioners = practitioners\n }\n if (sex && Array.isArray(sex) && sex.length > 0) {\n filter.sex = sex\n }\n if (age || (Array.isArray(age) && age.length > 0)) {\n filter.age = age\n }\n if (attendance || (Array.isArray(attendance) && attendance.length > 0)) {\n filter.attendance = attendance\n }\n const response = await http\n .request({\n method: \"get\",\n url: `/graphing/progress_over_time?org_id=${org_id}&start_date=${start_date}&end_date=${end_date}${\n filter?.exercise ? filter?.exercise : \"\"\n }`,\n params: {\n practitioners: filter.practitioners,\n sex: filter.sex,\n age: filter.age,\n attendance: filter.attendance,\n },\n })\n .then((response) => {\n return response.data\n })\n .catch((err) => {\n return err.response\n })\n dispatch({\n type: GET_OVER_PROGRESS_OVER_TIME,\n payload: response,\n })\n return response\n }\nexport const StackedBarChart = (values) => async (dispatch) => {\n const { org_id, start_date, end_date } = values\n const response = await http\n .request({\n method: \"get\",\n url: `/graphing/stacked_chart?org_id=${org_id}&start_date=${start_date}&end_date=${end_date}`,\n })\n .then((response) => {\n return response.data\n })\n .catch((err) => {\n return err.response\n })\n dispatch({\n type: GET_STACKED_BAR_CHART,\n payload: response,\n })\n return response\n}\nexport const getSessionsForOrg =\n (org_id, startDate, endDate) => async (dispatch) => {\n const response = await http\n .request({\n url: decodeURIComponent(`/organization/${org_id}/sessions`),\n params: {\n form: startDate,\n to: endDate,\n },\n method: \"get\",\n })\n .then((response) => {\n if (!response.data) {\n return undefined\n }\n return response.data\n })\n .catch((error) => {\n return error\n })\n\n dispatch({\n type: GET_PATIENTS_SESSIONS_ORG,\n payload: response,\n })\n return response\n }\n\nexport const updateSelectedOrganization = (id) => (dispatch) => {\n dispatch({\n type: UPDATE_SELECTED_ORGANIZATION,\n id,\n })\n}\n\n/* ------------------- User Session: Correct vs Incorrect ------------------- */\n\nexport const getUserSession = (user_id) => async (dispatch) => {\n const response = await http\n .request({\n url: decodeURIComponent(`/organization/users/${user_id}/sessions`),\n method: \"get\",\n })\n .then((response) => {\n return response.data\n })\n .catch((error) => {\n return error\n })\n\n dispatch({\n type: GET_USER_SESSIONS,\n payload: response,\n })\n\n return response\n}\n\n/* --------------------------- Data for line graph -------------------------- */\n\nexport const getUserSessionData =\n (user_id, startDate, endDate, include_records = false) =>\n async (dispatch) => {\n const response = await http\n .request({\n url: `/organization/users/${user_id}/sessions/aggregated`,\n method: \"get\",\n params: {\n fromDate: startDate,\n toDate: endDate,\n include_records,\n },\n })\n .then((response) => {\n return response.data\n })\n .catch((err) => {\n return err.response\n })\n\n dispatch({\n type: GET_USER_SKILL_LEVELS,\n payload: response,\n })\n\n return response\n }\n\nexport const getLongestStreak =\n (user, start_date, end_date = new Date()) =>\n async (dispatch) => {\n const response = await http\n .request({\n method: \"get\",\n url: `/user/${user}/longest_streak?from=${start_date}&to=${end_date}`,\n })\n .then((response) => {\n return response.data\n })\n .catch((err) => {\n return err.response\n })\n dispatch({\n type: GET_LONGEST_STREAK,\n payload: response,\n })\n return response\n }\n\n/* --------------------------- practitioner -------------------------- */\nexport const getAssignedPatients = (user_id) => async (dispatch) => {\n const response = await http\n .request({\n method: \"get\",\n url: `/user/${user_id}/assign_patients`,\n })\n .then((response) => {\n return response.data\n })\n .catch((err) => {\n return err.response\n })\n dispatch({\n type: GET_ASSIGNED_PATIENTS,\n payload: response,\n })\n return response\n}\n\n//----------------------------- GAME LEVEL ACTIONS ----------------------------\nconst getLevelRequest = () => ({\n type: GET_LEVEL_REQUEST,\n})\n\nconst getLevelSuccess = (levelData) => ({\n type: GET_LEVEL_SUCCESS,\n payload: levelData,\n})\n\nconst getLevelFailure = (error) => ({\n type: GET_LEVEL_FAILURE,\n payload: error,\n})\n\nexport const getLevelClear = () => ({\n type: GET_LEVEL_CLEAR,\n})\n\nexport const getLevel = (id) => {\n return async (dispatch) => {\n dispatch(getLevelRequest())\n\n try {\n const response = await http.request({\n url: `/levels/${id}`,\n method: \"get\",\n })\n dispatch(getLevelSuccess(response.data))\n\n return response.data\n } catch (error) {\n dispatch(getLevelFailure(error.message))\n throw error\n }\n }\n}\n\nconst getLevelsRequest = () => ({\n type: GET_LEVELS_REQUEST,\n})\n\nconst getLevelsSuccess = (levelsData) => ({\n type: GET_LEVELS_SUCCESS,\n payload: levelsData,\n})\n\nconst getLevelsFailure = (error) => ({\n type: GET_LEVELS_FAILURE,\n payload: error,\n})\n\nexport const getLevels = () => {\n return async (dispatch) => {\n dispatch(getLevelsRequest())\n\n try {\n const response = await http.request({\n url: \"/levels/\",\n method: \"get\",\n })\n dispatch(getLevelsSuccess(response.data))\n\n return response.data\n } catch (error) {\n dispatch(getLevelsFailure(error.message))\n throw error\n }\n }\n}\n\n//---------------------------- ASSIGNMENTS ACTIONS ----------------------------\nexport const getAssignments = (userId) => async (dispatch) => {\n const result = await http\n .request({\n url: `assignments/${userId}?all_time=true`,\n method: \"get\",\n })\n .then((response) => {\n return response.data\n })\n .catch((error) => {\n return error.response\n })\n\n dispatch({\n type: GET_ASSIGNMENTS,\n payload: result,\n })\n}\n\n// Action Creators\nconst createAssignmentRequest = () => ({\n type: CREATE_ASSIGNMENT_REQUEST,\n})\n\nconst createAssignmentSuccess = (assignmentData) => ({\n type: CREATE_ASSIGNMENT_SUCCESS,\n payload: assignmentData,\n})\n\nconst createAssignmentFailure = (error) => ({\n type: CREATE_ASSIGNMENT_FAILURE,\n payload: error,\n})\n\nexport const createAssignmentReset = () => ({\n type: CREATE_ASSIGNMENT_RESET,\n})\n\nexport const createAssignment = (userId, activities, duration = null) => {\n return async (dispatch) => {\n dispatch(createAssignmentRequest())\n\n try {\n const response = await http.request({\n url: `/assignments/${userId}`,\n method: \"post\",\n data: { activities, duration },\n })\n\n dispatch(\n createAssignmentSuccess({ data: response.data, assignment: activities })\n )\n dispatch(getAssignments(userId))\n return response.data\n } catch (error) {\n dispatch(createAssignmentFailure(error.message))\n throw error\n }\n }\n}\n\nexport const updateActivityRequest = () => ({\n type: UPDATE_ACTIVITY_REQUEST,\n})\n\nexport const updateActivitySuccess = (updatedActivity) => ({\n type: UPDATE_ACTIVITY_SUCCESS,\n payload: updatedActivity,\n})\n\nexport const updateActivityFailure = (error) => ({\n type: UPDATE_ACTIVITY_FAILURE,\n payload: error,\n})\n\nexport const updateActivityReset = () => ({\n type: UPDATE_ACTIVITY_RESET,\n})\n\nexport const updateActivity = (activityId, updatedData) => {\n return async (dispatch) => {\n dispatch(updateActivityRequest())\n\n try {\n const response = await http.request({\n url: `/assignments/${activityId}`,\n method: \"put\",\n data: updatedData,\n })\n\n dispatch(updateActivitySuccess(response.data))\n return response.data\n } catch (error) {\n dispatch(updateActivityFailure(error.message))\n }\n }\n}\n\nexport const deleteActivity = (activityId) => async (dispatch) => {\n try {\n await http.request({\n url: `/assignments/${activityId}`,\n method: \"delete\",\n })\n\n dispatch({\n type: DELETE_ACTIVITY,\n payload: activityId,\n });\n } catch (error) {\n console.error('Error deleting activity:', error);\n }\n};\n\n// Action Creators\nconst getActivePatientRequest = () => ({\n type: GET_ACTIVE_PATIENTS_REQUEST\n})\n\nconst getActivePatientSuccess = (patients) => ({\n type: GET_ACTIVE_PATIENTS_SUCCESS,\n payload: patients\n})\n\nconst getActivePatientFailure = (error) => ({\n type: GET_ACTIVE_PATIENTS_FAILURE, \n payload: error\n})\n\n// Thunk Action\nexport const getActivePatients = () => {\n return async (dispatch) => {\n dispatch(getActivePatientRequest())\n\n try {\n const response = await http.get('/organization/active-patients')\n dispatch(getActivePatientSuccess(response.data))\n return response.data\n } catch (error) {\n dispatch(getActivePatientFailure(error.message))\n throw error\n }\n }\n}\n","import React, { Component } from \"react\";\nimport Dialog from \"@material-ui/core/Dialog\";\nimport Button from \"@material-ui/core/Button\";\nimport Link from \"@material-ui/core/Link\";\nimport ArrowBackIcon from \"@material-ui/icons/ArrowBack\";\n\nimport \"./customDialogStyle.scss\";\n\nclass CustomDialog extends Component {\n constructor(props) {\n super(props);\n }\n\n render() {\n const {\n toggle,\n children,\n className,\n open,\n hideCloseButton,\n closeButtonText,\n welcomeEnabled,\n ...rest\n } = this.props;\n return (\n \n
\n {!hideCloseButton && (\n \n {closeButtonText && }\n {closeButtonText || close}\n \n )}\n {!!children && (\n
{children}
\n )}\n
\n \n );\n }\n}\n\nexport default CustomDialog;\n","import React from \"react\"\nimport { makeStyles } from \"@material-ui/core/styles\"\nimport Button from \"@material-ui/core/Button\"\nimport { Link } from \"react-router-dom\"\n\nconst useStyles = makeStyles((theme) => ({\n button: {\n borderRadius: theme.spacing(1),\n padding: theme.spacing(1, 1.5),\n textTransform: \"uppercase\",\n fontWeight: 500,\n fontSize: \"0.875rem\",\n minWidth: \"80px\",\n },\n primary: {\n backgroundColor: theme.palette.orange[200],\n color: theme.palette.common.white,\n \"&:hover\": {\n backgroundColor: theme.palette.orange[300],\n },\n },\n secondary: {\n backgroundColor: theme.palette.common.white,\n color: theme.palette.orange[200],\n border: `1px solid ${theme.palette.orange[200]}`,\n \"&:hover\": {\n color: theme.palette.orange[200],\n backgroundColor: theme.palette.orange[100],\n },\n },\n}))\n\nconst NFButton = ({\n type = \"button\",\n variant = \"primary\",\n destination,\n onClick,\n children,\n className,\n ...props\n}) => {\n const classes = useStyles()\n\n const buttonProps = {\n className: `${classes.button} ${classes[variant]} ${className || \"\"}`,\n variant: \"contained\",\n disableElevation: true,\n ...props,\n }\n\n if (type === \"link\") {\n return (\n \n )\n }\n\n return (\n \n )\n}\n\nexport default NFButton\n","import { Debug, GetLocalStorageValueSafe } from \".\";\nimport React from \"react\";\n\nclass PermissionsService {\n static _perms;\n static _user;\n\n static _Hydrate() {\n Debug.log(\"Hydrating permissions\");\n PermissionsService._perms = JSON.parse(\n GetLocalStorageValueSafe(\"permissions_list\") || \"[]\"\n );\n PermissionsService._user = JSON.parse(\n GetLocalStorageValueSafe(\"user_data\") || \"{}\"\n );\n }\n\n static SetPermissions(permissions) {\n PermissionsService._perms = permissions;\n }\n static SetUserBlob(user) {\n PermissionsService._user = user;\n }\n\n static GetPermissions() {\n PermissionsService._perms = PermissionsService._perms || [];\n return PermissionsService._perms;\n }\n\n static HasPermission(perm) {\n PermissionsService._perms = PermissionsService._perms || [];\n return PermissionsService._perms.includes(perm);\n }\n\n static GetUserID() {\n PermissionsService._user = PermissionsService._user || {};\n return PermissionsService._user.id;\n }\n\n static GetUser() {\n PermissionsService._user = PermissionsService._user || {};\n return PermissionsService._user;\n }\n\n static Reset() {\n PermissionsService._perms = [];\n PermissionsService._user = undefined;\n }\n}\n\nexport default PermissionsService;\n","import moment from \"moment\";\n\nexport const createDateString = (days) => {\n let date = moment();\n date = date.subtract(days, \"days\");\n return date.format(\"YYYY-MM-DD\");\n};\n\n/**\n * Gets the value from local storage, or null if it is undefined or null\n * @param {string} keyName The name of the key to get from local storage\n */\nexport function GetLocalStorageValueSafe(keyName) {\n let result = localStorage.getItem(keyName);\n if (\n result === undefined ||\n result === null ||\n result === \"undefined\" ||\n result === \"null\"\n ) {\n result = null;\n }\n return result;\n}\n\nexport class Debug {\n static log(value) {\n if (process.env.NODE_ENV === \"development\") {\n console.log(value);\n }\n }\n\n static error(value) {\n console.error(value);\n }\n}\n\nexport function mapObjectPath(obj, path) {\n var paths = path.split(\".\");\n var current = obj;\n for (var i = 0; i < paths.length; i++) {\n if (current[paths[i]] === undefined) {\n return undefined;\n } else {\n current = current[paths[i]];\n }\n }\n return current;\n}\n\n/**\n * Returns a random number withing the given range\n * @param {number} min The minimum value of the range (inclusive)\n * @param {number} max The maximum value of the range (exclusive)\n */\nexport function random_range(min, max) {\n return min + Math.random() * (max - min);\n}\n\n/**\n * Clamps a value between an upper and lower bounds\n * @param {number} value The value to clamp\n * @param {number} min The minimum value of the range\n * @param {number} max The maximum value of the range\n */\nexport function clamp(value, min, max) {\n return Math.min(Math.max(value, min), max);\n}\n\nexport function trimRight(string, character) {\n if (character === \"]\") character = \"\\\\]\";\n if (character === \"^\") character = \"\\\\^\";\n if (character === \"\\\\\") character = \"\\\\\\\\\";\n return string.replace(new RegExp(\"[\" + character + \"]+$\", \"g\"), \"\");\n}\n\n/**\n * Capitalizes first letters of words in string.\n * @param {string} str String to be modified\n * @param {boolean=false} lower Whether all other letters should be lower cased\n * @return {string}\n * @see https://stackoverflow.com/questions/2332811/capitalize-words-in-string\n * @usage\n * capitalize('fix this string'); // -> 'Fix This String'\n * capitalize('javaSCrIPT'); // -> 'JavaSCrIPT'\n * capitalize('javaSCrIPT', true); // -> 'Javascript'\n */\nexport const capitalize = (str, lower = false) =>\n (lower ? str.toLowerCase() : str).replace(/(?:^|\\s|[\"'([{])+\\S/g, (match) =>\n match.toUpperCase()\n );\n","'use strict';\n\nimport Chart from 'chart.js';\nimport Hammer from 'hammerjs';\n\nvar helpers = Chart.helpers;\n\n// Take the zoom namespace of Chart\nvar zoomNS = Chart.Zoom = Chart.Zoom || {};\n\n// Where we store functions to handle different scale types\nvar zoomFunctions = zoomNS.zoomFunctions = zoomNS.zoomFunctions || {};\nvar panFunctions = zoomNS.panFunctions = zoomNS.panFunctions || {};\n\nChart.Zoom.defaults = Chart.defaults.global.plugins.zoom = {\n\tpan: {\n\t\tenabled: false,\n\t\tmode: 'xy',\n\t\tspeed: 20,\n\t\tthreshold: 10\n\t},\n\tzoom: {\n\t\tenabled: false,\n\t\tmode: 'xy',\n\t\tsensitivity: 3,\n\t\tspeed: 0.1\n\t}\n};\n\nfunction resolveOptions(chart, options) {\n\tvar deprecatedOptions = {};\n\tif (typeof chart.options.pan !== 'undefined') {\n\t\tdeprecatedOptions.pan = chart.options.pan;\n\t}\n\tif (typeof chart.options.zoom !== 'undefined') {\n\t\tdeprecatedOptions.zoom = chart.options.zoom;\n\t}\n\tvar props = chart.$zoom;\n\toptions = props._options = helpers.merge({}, [options, deprecatedOptions]);\n\n\t// Install listeners. Do this dynamically based on options so that we can turn zoom on and off\n\t// We also want to make sure listeners aren't always on. E.g. if you're scrolling down a page\n\t// and the mouse goes over a chart you don't want it intercepted unless the plugin is enabled\n\tvar node = props._node;\n\tvar zoomEnabled = options.zoom && options.zoom.enabled;\n\tvar dragEnabled = options.zoom.drag;\n\tif (zoomEnabled && !dragEnabled) {\n\t\tnode.addEventListener('wheel', props._wheelHandler);\n\t} else {\n\t\tnode.removeEventListener('wheel', props._wheelHandler);\n\t}\n\tif (zoomEnabled && dragEnabled) {\n\t\tnode.addEventListener('mousedown', props._mouseDownHandler);\n\t\tnode.ownerDocument.addEventListener('mouseup', props._mouseUpHandler);\n\t} else {\n\t\tnode.removeEventListener('mousedown', props._mouseDownHandler);\n\t\tnode.removeEventListener('mousemove', props._mouseMoveHandler);\n\t\tnode.ownerDocument.removeEventListener('mouseup', props._mouseUpHandler);\n\t}\n}\n\nfunction storeOriginalOptions(chart) {\n\tvar originalOptions = chart.$zoom._originalOptions;\n\thelpers.each(chart.scales, function(scale) {\n\t\tif (!originalOptions[scale.id]) {\n\t\t\toriginalOptions[scale.id] = helpers.clone(scale.options);\n\t\t}\n\t});\n\thelpers.each(originalOptions, function(opt, key) {\n\t\tif (!chart.scales[key]) {\n\t\t\tdelete originalOptions[key];\n\t\t}\n\t});\n}\n\n/**\n * @param {string} mode can be 'x', 'y' or 'xy'\n * @param {string} dir can be 'x' or 'y'\n * @param {Chart} chart instance of the chart in question\n */\nfunction directionEnabled(mode, dir, chart) {\n\tif (mode === undefined) {\n\t\treturn true;\n\t} else if (typeof mode === 'string') {\n\t\treturn mode.indexOf(dir) !== -1;\n\t} else if (typeof mode === 'function') {\n\t\treturn mode({chart: chart}).indexOf(dir) !== -1;\n\t}\n\n\treturn false;\n}\n\nfunction rangeMaxLimiter(zoomPanOptions, newMax) {\n\tif (zoomPanOptions.scaleAxes && zoomPanOptions.rangeMax &&\n\t\t\t!helpers.isNullOrUndef(zoomPanOptions.rangeMax[zoomPanOptions.scaleAxes])) {\n\t\tvar rangeMax = zoomPanOptions.rangeMax[zoomPanOptions.scaleAxes];\n\t\tif (newMax > rangeMax) {\n\t\t\tnewMax = rangeMax;\n\t\t}\n\t}\n\treturn newMax;\n}\n\nfunction rangeMinLimiter(zoomPanOptions, newMin) {\n\tif (zoomPanOptions.scaleAxes && zoomPanOptions.rangeMin &&\n\t\t\t!helpers.isNullOrUndef(zoomPanOptions.rangeMin[zoomPanOptions.scaleAxes])) {\n\t\tvar rangeMin = zoomPanOptions.rangeMin[zoomPanOptions.scaleAxes];\n\t\tif (newMin < rangeMin) {\n\t\t\tnewMin = rangeMin;\n\t\t}\n\t}\n\treturn newMin;\n}\n\nfunction zoomCategoryScale(scale, zoom, center, zoomOptions) {\n\tvar labels = scale.chart.data.labels;\n\tvar minIndex = scale.minIndex;\n\tvar lastLabelIndex = labels.length - 1;\n\tvar maxIndex = scale.maxIndex;\n\tvar sensitivity = zoomOptions.sensitivity;\n\tvar chartCenter = scale.isHorizontal() ? scale.left + (scale.width / 2) : scale.top + (scale.height / 2);\n\tvar centerPointer = scale.isHorizontal() ? center.x : center.y;\n\n\tzoomNS.zoomCumulativeDelta = zoom > 1 ? zoomNS.zoomCumulativeDelta + 1 : zoomNS.zoomCumulativeDelta - 1;\n\n\tif (Math.abs(zoomNS.zoomCumulativeDelta) > sensitivity) {\n\t\tif (zoomNS.zoomCumulativeDelta < 0) {\n\t\t\tif (centerPointer >= chartCenter) {\n\t\t\t\tif (minIndex <= 0) {\n\t\t\t\t\tmaxIndex = Math.min(lastLabelIndex, maxIndex + 1);\n\t\t\t\t} else {\n\t\t\t\t\tminIndex = Math.max(0, minIndex - 1);\n\t\t\t\t}\n\t\t\t} else if (centerPointer < chartCenter) {\n\t\t\t\tif (maxIndex >= lastLabelIndex) {\n\t\t\t\t\tminIndex = Math.max(0, minIndex - 1);\n\t\t\t\t} else {\n\t\t\t\t\tmaxIndex = Math.min(lastLabelIndex, maxIndex + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tzoomNS.zoomCumulativeDelta = 0;\n\t\t} else if (zoomNS.zoomCumulativeDelta > 0) {\n\t\t\tif (centerPointer >= chartCenter) {\n\t\t\t\tminIndex = minIndex < maxIndex ? minIndex = Math.min(maxIndex, minIndex + 1) : minIndex;\n\t\t\t} else if (centerPointer < chartCenter) {\n\t\t\t\tmaxIndex = maxIndex > minIndex ? maxIndex = Math.max(minIndex, maxIndex - 1) : maxIndex;\n\t\t\t}\n\t\t\tzoomNS.zoomCumulativeDelta = 0;\n\t\t}\n\t\tscale.options.ticks.min = rangeMinLimiter(zoomOptions, labels[minIndex]);\n\t\tscale.options.ticks.max = rangeMaxLimiter(zoomOptions, labels[maxIndex]);\n\t}\n}\n\nfunction zoomNumericalScale(scale, zoom, center, zoomOptions) {\n\tvar range = scale.max - scale.min;\n\tvar newDiff = range * (zoom - 1);\n\n\tvar centerPoint = scale.isHorizontal() ? center.x : center.y;\n\tvar minPercent = (scale.getValueForPixel(centerPoint) - scale.min) / range;\n\tvar maxPercent = 1 - minPercent;\n\n\tvar minDelta = newDiff * minPercent;\n\tvar maxDelta = newDiff * maxPercent;\n\n\tscale.options.ticks.min = rangeMinLimiter(zoomOptions, scale.min + minDelta);\n\tscale.options.ticks.max = rangeMaxLimiter(zoomOptions, scale.max - maxDelta);\n}\n\nfunction zoomTimeScale(scale, zoom, center, zoomOptions) {\n\tzoomNumericalScale(scale, zoom, center, zoomOptions);\n\n\tvar options = scale.options;\n\tif (options.time) {\n\t\tif (options.time.min) {\n\t\t\toptions.time.min = options.ticks.min;\n\t\t}\n\t\tif (options.time.max) {\n\t\t\toptions.time.max = options.ticks.max;\n\t\t}\n\t}\n}\n\nfunction zoomScale(scale, zoom, center, zoomOptions) {\n\tvar fn = zoomFunctions[scale.type];\n\tif (fn) {\n\t\tfn(scale, zoom, center, zoomOptions);\n\t}\n}\n\n/**\n * @param chart The chart instance\n * @param {number} percentZoomX The zoom percentage in the x direction\n * @param {number} percentZoomY The zoom percentage in the y direction\n * @param {{x: number, y: number}} focalPoint The x and y coordinates of zoom focal point. The point which doesn't change while zooming. E.g. the location of the mouse cursor when \"drag: false\"\n * @param {string} whichAxes `xy`, 'x', or 'y'\n * @param {number} animationDuration Duration of the animation of the redraw in milliseconds\n */\nfunction doZoom(chart, percentZoomX, percentZoomY, focalPoint, whichAxes, animationDuration) {\n\tvar ca = chart.chartArea;\n\tif (!focalPoint) {\n\t\tfocalPoint = {\n\t\t\tx: (ca.left + ca.right) / 2,\n\t\t\ty: (ca.top + ca.bottom) / 2,\n\t\t};\n\t}\n\n\tvar zoomOptions = chart.$zoom._options.zoom;\n\n\tif (zoomOptions.enabled) {\n\t\tstoreOriginalOptions(chart);\n\t\t// Do the zoom here\n\t\tvar zoomMode = typeof zoomOptions.mode === 'function' ? zoomOptions.mode({chart: chart}) : zoomOptions.mode;\n\n\t\t// Which axe should be modified when figers were used.\n\t\tvar _whichAxes;\n\t\tif (zoomMode === 'xy' && whichAxes !== undefined) {\n\t\t\t// based on fingers positions\n\t\t\t_whichAxes = whichAxes;\n\t\t} else {\n\t\t\t// no effect\n\t\t\t_whichAxes = 'xy';\n\t\t}\n\n\t\thelpers.each(chart.scales, function(scale) {\n\t\t\tif (scale.isHorizontal() && directionEnabled(zoomMode, 'x', chart) && directionEnabled(_whichAxes, 'x', chart)) {\n\t\t\t\tzoomOptions.scaleAxes = 'x';\n\t\t\t\tzoomScale(scale, percentZoomX, focalPoint, zoomOptions);\n\t\t\t} else if (!scale.isHorizontal() && directionEnabled(zoomMode, 'y', chart) && directionEnabled(_whichAxes, 'y', chart)) {\n\t\t\t\t// Do Y zoom\n\t\t\t\tzoomOptions.scaleAxes = 'y';\n\t\t\t\tzoomScale(scale, percentZoomY, focalPoint, zoomOptions);\n\t\t\t}\n\t\t});\n\n\t\tif (animationDuration) {\n\t\t\tchart.update({\n\t\t\t\tduration: animationDuration,\n\t\t\t\teasing: 'easeOutQuad',\n\t\t\t});\n\t\t} else {\n\t\t\tchart.update(0);\n\t\t}\n\n\t\tif (typeof zoomOptions.onZoom === 'function') {\n\t\t\tzoomOptions.onZoom({chart: chart});\n\t\t}\n\t}\n}\n\nfunction panCategoryScale(scale, delta, panOptions) {\n\tvar labels = scale.chart.data.labels;\n\tvar lastLabelIndex = labels.length - 1;\n\tvar offsetAmt = Math.max(scale.ticks.length, 1);\n\tvar panSpeed = panOptions.speed;\n\tvar minIndex = scale.minIndex;\n\tvar step = Math.round(scale.width / (offsetAmt * panSpeed));\n\tvar maxIndex;\n\n\tzoomNS.panCumulativeDelta += delta;\n\n\tminIndex = zoomNS.panCumulativeDelta > step ? Math.max(0, minIndex - 1) : zoomNS.panCumulativeDelta < -step ? Math.min(lastLabelIndex - offsetAmt + 1, minIndex + 1) : minIndex;\n\tzoomNS.panCumulativeDelta = minIndex !== scale.minIndex ? 0 : zoomNS.panCumulativeDelta;\n\n\tmaxIndex = Math.min(lastLabelIndex, minIndex + offsetAmt - 1);\n\n\tscale.options.ticks.min = rangeMinLimiter(panOptions, labels[minIndex]);\n\tscale.options.ticks.max = rangeMaxLimiter(panOptions, labels[maxIndex]);\n}\n\nfunction panNumericalScale(scale, delta, panOptions) {\n\tvar tickOpts = scale.options.ticks;\n\tvar prevStart = scale.min;\n\tvar prevEnd = scale.max;\n\tvar newMin = scale.getValueForPixel(scale.getPixelForValue(prevStart) - delta);\n\tvar newMax = scale.getValueForPixel(scale.getPixelForValue(prevEnd) - delta);\n\t// The time scale returns date objects so convert to numbers. Can remove at Chart.js v3\n\tnewMin = newMin.valueOf ? newMin.valueOf() : newMin;\n\tnewMax = newMax.valueOf ? newMax.valueOf() : newMax;\n\tvar rangeMin = newMin;\n\tvar rangeMax = newMax;\n\tvar diff;\n\n\tif (panOptions.scaleAxes && panOptions.rangeMin &&\n\t\t\t!helpers.isNullOrUndef(panOptions.rangeMin[panOptions.scaleAxes])) {\n\t\trangeMin = panOptions.rangeMin[panOptions.scaleAxes];\n\t}\n\tif (panOptions.scaleAxes && panOptions.rangeMax &&\n\t\t\t!helpers.isNullOrUndef(panOptions.rangeMax[panOptions.scaleAxes])) {\n\t\trangeMax = panOptions.rangeMax[panOptions.scaleAxes];\n\t}\n\n\tif (newMin >= rangeMin && newMax <= rangeMax) {\n\t\ttickOpts.min = newMin;\n\t\ttickOpts.max = newMax;\n\t} else if (newMin < rangeMin) {\n\t\tdiff = prevStart - rangeMin;\n\t\ttickOpts.min = rangeMin;\n\t\ttickOpts.max = prevEnd - diff;\n\t} else if (newMax > rangeMax) {\n\t\tdiff = rangeMax - prevEnd;\n\t\ttickOpts.max = rangeMax;\n\t\ttickOpts.min = prevStart + diff;\n\t}\n}\n\nfunction panTimeScale(scale, delta, panOptions) {\n\tpanNumericalScale(scale, delta, panOptions);\n\n\tvar options = scale.options;\n\tif (options.time) {\n\t\tif (options.time.min) {\n\t\t\toptions.time.min = options.ticks.min;\n\t\t}\n\t\tif (options.time.max) {\n\t\t\toptions.time.max = options.ticks.max;\n\t\t}\n\t}\n}\n\nfunction panScale(scale, delta, panOptions) {\n\tvar fn = panFunctions[scale.type];\n\tif (fn) {\n\t\tfn(scale, delta, panOptions);\n\t}\n}\n\nfunction doPan(chartInstance, deltaX, deltaY) {\n\tstoreOriginalOptions(chartInstance);\n\tvar panOptions = chartInstance.$zoom._options.pan;\n\tif (panOptions.enabled) {\n\t\tvar panMode = typeof panOptions.mode === 'function' ? panOptions.mode({chart: chartInstance}) : panOptions.mode;\n\n\t\thelpers.each(chartInstance.scales, function(scale) {\n\t\t\tif (scale.isHorizontal() && directionEnabled(panMode, 'x', chartInstance) && deltaX !== 0) {\n\t\t\t\tpanOptions.scaleAxes = 'x';\n\t\t\t\tpanScale(scale, deltaX, panOptions);\n\t\t\t} else if (!scale.isHorizontal() && directionEnabled(panMode, 'y', chartInstance) && deltaY !== 0) {\n\t\t\t\tpanOptions.scaleAxes = 'y';\n\t\t\t\tpanScale(scale, deltaY, panOptions);\n\t\t\t}\n\t\t});\n\n\t\tchartInstance.update(0);\n\n\t\tif (typeof panOptions.onPan === 'function') {\n\t\t\tpanOptions.onPan({chart: chartInstance});\n\t\t}\n\t}\n}\n\nfunction getXAxis(chartInstance) {\n\tvar scales = chartInstance.scales;\n\tvar scaleIds = Object.keys(scales);\n\tfor (var i = 0; i < scaleIds.length; i++) {\n\t\tvar scale = scales[scaleIds[i]];\n\n\t\tif (scale.isHorizontal()) {\n\t\t\treturn scale;\n\t\t}\n\t}\n}\n\nfunction getYAxis(chartInstance) {\n\tvar scales = chartInstance.scales;\n\tvar scaleIds = Object.keys(scales);\n\tfor (var i = 0; i < scaleIds.length; i++) {\n\t\tvar scale = scales[scaleIds[i]];\n\n\t\tif (!scale.isHorizontal()) {\n\t\t\treturn scale;\n\t\t}\n\t}\n}\n\n// Store these for later\nzoomNS.zoomFunctions.category = zoomCategoryScale;\nzoomNS.zoomFunctions.time = zoomTimeScale;\nzoomNS.zoomFunctions.linear = zoomNumericalScale;\nzoomNS.zoomFunctions.logarithmic = zoomNumericalScale;\nzoomNS.panFunctions.category = panCategoryScale;\nzoomNS.panFunctions.time = panTimeScale;\nzoomNS.panFunctions.linear = panNumericalScale;\nzoomNS.panFunctions.logarithmic = panNumericalScale;\n// Globals for category pan and zoom\nzoomNS.panCumulativeDelta = 0;\nzoomNS.zoomCumulativeDelta = 0;\n\n// Chartjs Zoom Plugin\nvar zoomPlugin = {\n\tid: 'zoom',\n\n\tafterInit: function(chartInstance) {\n\n\t\tchartInstance.resetZoom = function() {\n\t\t\tstoreOriginalOptions(chartInstance);\n\t\t\tvar originalOptions = chartInstance.$zoom._originalOptions;\n\t\t\thelpers.each(chartInstance.scales, function(scale) {\n\n\t\t\t\tvar timeOptions = scale.options.time;\n\t\t\t\tvar tickOptions = scale.options.ticks;\n\n\t\t\t\tif (originalOptions[scale.id]) {\n\n\t\t\t\t\tif (timeOptions) {\n\t\t\t\t\t\ttimeOptions.min = originalOptions[scale.id].time.min;\n\t\t\t\t\t\ttimeOptions.max = originalOptions[scale.id].time.max;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (tickOptions) {\n\t\t\t\t\t\ttickOptions.min = originalOptions[scale.id].ticks.min;\n\t\t\t\t\t\ttickOptions.max = originalOptions[scale.id].ticks.max;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\n\t\t\t\t\tif (timeOptions) {\n\t\t\t\t\t\tdelete timeOptions.min;\n\t\t\t\t\t\tdelete timeOptions.max;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (tickOptions) {\n\t\t\t\t\t\tdelete tickOptions.min;\n\t\t\t\t\t\tdelete tickOptions.max;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t});\n\n\t\t\tchartInstance.update();\n\t\t};\n\n\t},\n\n\tbeforeUpdate: function(chart, options) {\n\t\tresolveOptions(chart, options);\n\t},\n\n\tbeforeInit: function(chartInstance, pluginOptions) {\n\t\tchartInstance.$zoom = {\n\t\t\t_originalOptions: {}\n\t\t};\n\t\tvar node = chartInstance.$zoom._node = chartInstance.ctx.canvas;\n\t\tresolveOptions(chartInstance, pluginOptions);\n\n\t\tvar options = chartInstance.$zoom._options;\n\t\tvar panThreshold = options.pan && options.pan.threshold;\n\n\t\tchartInstance.$zoom._mouseDownHandler = function(event) {\n\t\t\tnode.addEventListener('mousemove', chartInstance.$zoom._mouseMoveHandler);\n\t\t\tchartInstance.$zoom._dragZoomStart = event;\n\t\t};\n\n\t\tchartInstance.$zoom._mouseMoveHandler = function(event) {\n\t\t\tif (chartInstance.$zoom._dragZoomStart) {\n\t\t\t\tchartInstance.$zoom._dragZoomEnd = event;\n\t\t\t\tchartInstance.update(0);\n\t\t\t}\n\t\t};\n\n\t\tchartInstance.$zoom._mouseUpHandler = function(event) {\n\t\t\tif (!chartInstance.$zoom._dragZoomStart) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tnode.removeEventListener('mousemove', chartInstance.$zoom._mouseMoveHandler);\n\n\t\t\tvar beginPoint = chartInstance.$zoom._dragZoomStart;\n\n\t\t\tvar offsetX = beginPoint.target.getBoundingClientRect().left;\n\t\t\tvar startX = Math.min(beginPoint.clientX, event.clientX) - offsetX;\n\t\t\tvar endX = Math.max(beginPoint.clientX, event.clientX) - offsetX;\n\n\t\t\tvar offsetY = beginPoint.target.getBoundingClientRect().top;\n\t\t\tvar startY = Math.min(beginPoint.clientY, event.clientY) - offsetY;\n\t\t\tvar endY = Math.max(beginPoint.clientY, event.clientY) - offsetY;\n\n\t\t\tvar dragDistanceX = endX - startX;\n\t\t\tvar dragDistanceY = endY - startY;\n\n\t\t\t// Remove drag start and end before chart update to stop drawing selected area\n\t\t\tchartInstance.$zoom._dragZoomStart = null;\n\t\t\tchartInstance.$zoom._dragZoomEnd = null;\n\n\t\t\tvar zoomThreshold = options.zoom && options.zoom.threshold || 0;\n\t\t\tif (dragDistanceX <= zoomThreshold && dragDistanceY <= zoomThreshold) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar chartArea = chartInstance.chartArea;\n\n\t\t\tvar zoomOptions = chartInstance.$zoom._options.zoom;\n\t\t\tvar chartDistanceX = chartArea.right - chartArea.left;\n\t\t\tvar xEnabled = directionEnabled(zoomOptions.mode, 'x', chartInstance);\n\t\t\tvar zoomX = xEnabled && dragDistanceX ? 1 + ((chartDistanceX - dragDistanceX) / chartDistanceX) : 1;\n\n\t\t\tvar chartDistanceY = chartArea.bottom - chartArea.top;\n\t\t\tvar yEnabled = directionEnabled(zoomOptions.mode, 'y', chartInstance);\n\t\t\tvar zoomY = yEnabled && dragDistanceY ? 1 + ((chartDistanceY - dragDistanceY) / chartDistanceY) : 1;\n\n\t\t\tdoZoom(chartInstance, zoomX, zoomY, {\n\t\t\t\tx: (startX - chartArea.left) / (1 - dragDistanceX / chartDistanceX) + chartArea.left,\n\t\t\t\ty: (startY - chartArea.top) / (1 - dragDistanceY / chartDistanceY) + chartArea.top\n\t\t\t}, undefined, zoomOptions.drag.animationDuration);\n\n\t\t\tif (typeof zoomOptions.onZoomComplete === 'function') {\n\t\t\t\tzoomOptions.onZoomComplete({chart: chartInstance});\n\t\t\t}\n\t\t};\n\n\t\tvar _scrollTimeout = null;\n\t\tchartInstance.$zoom._wheelHandler = function(event) {\n\t\t\t// Prevent the event from triggering the default behavior (eg. Content scrolling).\n\t\t\tif (event.cancelable) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\n\t\t\t// Firefox always fires the wheel event twice:\n\t\t\t// First without the delta and right after that once with the delta properties.\n\t\t\tif (typeof event.deltaY === 'undefined') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar rect = event.target.getBoundingClientRect();\n\t\t\tvar offsetX = event.clientX - rect.left;\n\t\t\tvar offsetY = event.clientY - rect.top;\n\n\t\t\tvar center = {\n\t\t\t\tx: offsetX,\n\t\t\t\ty: offsetY\n\t\t\t};\n\n\t\t\tvar zoomOptions = chartInstance.$zoom._options.zoom;\n\t\t\tvar speedPercent = zoomOptions.speed;\n\n\t\t\tif (event.deltaY >= 0) {\n\t\t\t\tspeedPercent = -speedPercent;\n\t\t\t}\n\t\t\tdoZoom(chartInstance, 1 + speedPercent, 1 + speedPercent, center);\n\n\t\t\tclearTimeout(_scrollTimeout);\n\t\t\t_scrollTimeout = setTimeout(function() {\n\t\t\t\tif (typeof zoomOptions.onZoomComplete === 'function') {\n\t\t\t\t\tzoomOptions.onZoomComplete({chart: chartInstance});\n\t\t\t\t}\n\t\t\t}, 250);\n\t\t};\n\n\t\tif (Hammer) {\n\t\t\tvar mc = new Hammer.Manager(node);\n\t\t\tmc.add(new Hammer.Pinch());\n\t\t\tmc.add(new Hammer.Pan({\n\t\t\t\tthreshold: panThreshold\n\t\t\t}));\n\n\t\t\t// Hammer reports the total scaling. We need the incremental amount\n\t\t\tvar currentPinchScaling;\n\t\t\tvar handlePinch = function(e) {\n\t\t\t\tvar diff = 1 / (currentPinchScaling) * e.scale;\n\t\t\t\tvar rect = e.target.getBoundingClientRect();\n\t\t\t\tvar offsetX = e.center.x - rect.left;\n\t\t\t\tvar offsetY = e.center.y - rect.top;\n\t\t\t\tvar center = {\n\t\t\t\t\tx: offsetX,\n\t\t\t\t\ty: offsetY\n\t\t\t\t};\n\n\t\t\t\t// fingers position difference\n\t\t\t\tvar x = Math.abs(e.pointers[0].clientX - e.pointers[1].clientX);\n\t\t\t\tvar y = Math.abs(e.pointers[0].clientY - e.pointers[1].clientY);\n\n\t\t\t\t// diagonal fingers will change both (xy) axes\n\t\t\t\tvar p = x / y;\n\t\t\t\tvar xy;\n\t\t\t\tif (p > 0.3 && p < 1.7) {\n\t\t\t\t\txy = 'xy';\n\t\t\t\t} else if (x > y) {\n\t\t\t\t\txy = 'x'; // x axis\n\t\t\t\t} else {\n\t\t\t\t\txy = 'y'; // y axis\n\t\t\t\t}\n\n\t\t\t\tdoZoom(chartInstance, diff, diff, center, xy);\n\n\t\t\t\tvar zoomOptions = chartInstance.$zoom._options.zoom;\n\t\t\t\tif (typeof zoomOptions.onZoomComplete === 'function') {\n\t\t\t\t\tzoomOptions.onZoomComplete({chart: chartInstance});\n\t\t\t\t}\n\n\t\t\t\t// Keep track of overall scale\n\t\t\t\tcurrentPinchScaling = e.scale;\n\t\t\t};\n\n\t\t\tmc.on('pinchstart', function() {\n\t\t\t\tcurrentPinchScaling = 1; // reset tracker\n\t\t\t});\n\t\t\tmc.on('pinch', handlePinch);\n\t\t\tmc.on('pinchend', function(e) {\n\t\t\t\thandlePinch(e);\n\t\t\t\tcurrentPinchScaling = null; // reset\n\t\t\t\tzoomNS.zoomCumulativeDelta = 0;\n\t\t\t});\n\n\t\t\tvar currentDeltaX = null;\n\t\t\tvar currentDeltaY = null;\n\t\t\tvar panning = false;\n\t\t\tvar handlePan = function(e) {\n\t\t\t\tif (currentDeltaX !== null && currentDeltaY !== null) {\n\t\t\t\t\tpanning = true;\n\t\t\t\t\tvar deltaX = e.deltaX - currentDeltaX;\n\t\t\t\t\tvar deltaY = e.deltaY - currentDeltaY;\n\t\t\t\t\tcurrentDeltaX = e.deltaX;\n\t\t\t\t\tcurrentDeltaY = e.deltaY;\n\t\t\t\t\tdoPan(chartInstance, deltaX, deltaY);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tmc.on('panstart', function(e) {\n\t\t\t\tcurrentDeltaX = 0;\n\t\t\t\tcurrentDeltaY = 0;\n\t\t\t\thandlePan(e);\n\t\t\t});\n\t\t\tmc.on('panmove', handlePan);\n\t\t\tmc.on('panend', function() {\n\t\t\t\tcurrentDeltaX = null;\n\t\t\t\tcurrentDeltaY = null;\n\t\t\t\tzoomNS.panCumulativeDelta = 0;\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\tpanning = false;\n\t\t\t\t}, 500);\n\n\t\t\t\tvar panOptions = chartInstance.$zoom._options.pan;\n\t\t\t\tif (typeof panOptions.onPanComplete === 'function') {\n\t\t\t\t\tpanOptions.onPanComplete({chart: chartInstance});\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tchartInstance.$zoom._ghostClickHandler = function(e) {\n\t\t\t\tif (panning && e.cancelable) {\n\t\t\t\t\te.stopImmediatePropagation();\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t};\n\t\t\tnode.addEventListener('click', chartInstance.$zoom._ghostClickHandler);\n\n\t\t\tchartInstance._mc = mc;\n\t\t}\n\t},\n\n\tbeforeDatasetsDraw: function(chartInstance) {\n\t\tvar ctx = chartInstance.ctx;\n\n\t\tif (chartInstance.$zoom._dragZoomEnd) {\n\t\t\tvar xAxis = getXAxis(chartInstance);\n\t\t\tvar yAxis = getYAxis(chartInstance);\n\t\t\tvar beginPoint = chartInstance.$zoom._dragZoomStart;\n\t\t\tvar endPoint = chartInstance.$zoom._dragZoomEnd;\n\n\t\t\tvar startX = xAxis.left;\n\t\t\tvar endX = xAxis.right;\n\t\t\tvar startY = yAxis.top;\n\t\t\tvar endY = yAxis.bottom;\n\n\t\t\tif (directionEnabled(chartInstance.$zoom._options.zoom.mode, 'x', chartInstance)) {\n\t\t\t\tvar offsetX = beginPoint.target.getBoundingClientRect().left;\n\t\t\t\tstartX = Math.min(beginPoint.clientX, endPoint.clientX) - offsetX;\n\t\t\t\tendX = Math.max(beginPoint.clientX, endPoint.clientX) - offsetX;\n\t\t\t}\n\n\t\t\tif (directionEnabled(chartInstance.$zoom._options.zoom.mode, 'y', chartInstance)) {\n\t\t\t\tvar offsetY = beginPoint.target.getBoundingClientRect().top;\n\t\t\t\tstartY = Math.min(beginPoint.clientY, endPoint.clientY) - offsetY;\n\t\t\t\tendY = Math.max(beginPoint.clientY, endPoint.clientY) - offsetY;\n\t\t\t}\n\n\t\t\tvar rectWidth = endX - startX;\n\t\t\tvar rectHeight = endY - startY;\n\t\t\tvar dragOptions = chartInstance.$zoom._options.zoom.drag;\n\n\t\t\tctx.save();\n\t\t\tctx.beginPath();\n\t\t\tctx.fillStyle = dragOptions.backgroundColor || 'rgba(225,225,225,0.3)';\n\t\t\tctx.fillRect(startX, startY, rectWidth, rectHeight);\n\n\t\t\tif (dragOptions.borderWidth > 0) {\n\t\t\t\tctx.lineWidth = dragOptions.borderWidth;\n\t\t\t\tctx.strokeStyle = dragOptions.borderColor || 'rgba(225,225,225)';\n\t\t\t\tctx.strokeRect(startX, startY, rectWidth, rectHeight);\n\t\t\t}\n\t\t\tctx.restore();\n\t\t}\n\t},\n\n\tdestroy: function(chartInstance) {\n\t\tif (!chartInstance.$zoom) {\n\t\t\treturn;\n\t\t}\n\t\tvar props = chartInstance.$zoom;\n\t\tvar node = props._node;\n\n\t\tnode.removeEventListener('mousedown', props._mouseDownHandler);\n\t\tnode.removeEventListener('mousemove', props._mouseMoveHandler);\n\t\tnode.ownerDocument.removeEventListener('mouseup', props._mouseUpHandler);\n\t\tnode.removeEventListener('wheel', props._wheelHandler);\n\t\tnode.removeEventListener('click', props._ghostClickHandler);\n\n\t\tdelete chartInstance.$zoom;\n\n\t\tvar mc = chartInstance._mc;\n\t\tif (mc) {\n\t\t\tmc.remove('pinchstart');\n\t\t\tmc.remove('pinch');\n\t\t\tmc.remove('pinchend');\n\t\t\tmc.remove('panstart');\n\t\t\tmc.remove('pan');\n\t\t\tmc.remove('panend');\n\t\t\tmc.destroy();\n\t\t}\n\t}\n};\n\nChart.plugins.register(zoomPlugin);\nexport default zoomPlugin;\n","import React from \"react\";\nconst withModals = (\n WrappedComponent,\n modalsToggleProps = {},\n modalsStatusProps = {}\n) => {\n return class extends React.Component {\n constructor(props) {\n super(props);\n this.toggleModal = this.toggleModal.bind(this);\n this.state = {\n modals: {},\n };\n }\n\n toggleModal(identifier) {\n this.setState((prevState) => ({\n modals: {\n ...prevState.modals,\n [identifier]: !prevState.modals[identifier],\n },\n }));\n }\n\n render() {\n // ... and renders the wrapped component with the fresh data!\n // Notice that we pass through any additional props\n const modalsProps = {};\n Object.keys(modalsToggleProps).forEach((modalProp) => {\n modalsProps[modalProp] = () =>\n this.toggleModal(modalsToggleProps[modalProp]);\n });\n Object.keys(modalsStatusProps).forEach((modalProp) => {\n modalsProps[modalProp] =\n this.state.modals[modalsStatusProps[modalProp]];\n });\n\n return (\n \n );\n }\n };\n};\nexport default withModals;\n","import { useSelector } from \"react-redux\"\nimport { useMemo } from \"react\"\n\nimport enUS from \"./en_US\"\nimport frCA from \"./fr_CA\"\n\nconst languageFiles = {\n \"en-US\": enUS,\n \"fr-CA\": frCA,\n}\n\nexport const useTranslation = () => {\n const language = useSelector((state) => state.userReducer.language)\n\n const t = (key) => {\n const translations = languageFiles[language] || enUS\n\n const translation = translations[key]\n return translation || key\n }\n\n return t\n}\n\n// export const useTranslation = () => {\n// const language = useSelector((state) => state.userReducer.language)\n\n// const t = () => {\n// const translations = languageFiles[language] || enUS // Fallback to English if language not found\n\n// // Return a function that retrieves the translation for a given key\n// return (key) => {\n// if (typeof key !== \"string\") {\n// console.warn(\"Invalid key provided to translation function:\", key)\n// return \"\"\n// }\n// const translation = translations[key]\n// return translation !== undefined ? translation : key\n// }\n// }\n\n// return t\n// }\n\n// export const translate = (key, language) => {\n// const translations = languageFiles[language] || enUS\n// return translations[key] || key\n// }\n","export const DEFAULT_PRONOUN_SETS = [\n { subject: \"he\", object: \"him\", possessive: \"his\" },\n { subject: \"she\", object: \"her\", possessive: \"her\" },\n { subject: \"they\", object: \"them\", possessive: \"their\" },\n];\n\nexport const DEFAULT_GENDERS = [\"pnts\", \"female\", \"male\", \"non-binary\"];\n\nexport const USER_TYPES = {\n Patient: \"PATIENT\",\n Practitioner: \"ORG_USER\",\n Admin: \"ORG_ADMIN\",\n};\n\nexport const MAPPING_OCCUPATION = [\n { label: \"General Practitioner\", id: \"therapist\" },\n { label: \"Occupational Therapist\", id: \"ot\" },\n { label: \"Physical Therapist\", id: \"pt\" },\n { label: \"Speech Language Pathologist\", id: \"slp\" },\n];\n\nexport const _calendarOptions = {\n Day: \"Day\",\n Week: \"Week\",\n Month: \"Month\",\n};\n\nexport const formatDate = {\n dateFormat: \"DD MMMM,YYYY\",\n defaultFormat: \"YYYY/MM/DD\",\n monthFormat: \"YYYY/MM\",\n};\n\nexport const urlSession = {\n createSession: {\n url: \"organization/scheduled_sessions\",\n },\n};\n\nexport const availableTime = (startTime, endTime) => {\n let times = []; // time array\n let time;\n let ap = [\" AM\", \" PM\"]; // AM-PM\n let quarterHours = [\"00\", \"15\", \"30\", \"45\"];\n\n for (let i = startTime; i < endTime; i++) {\n for (let j = 0; j < 4; j++) {\n if (i === 12) {\n time = i + \":\" + quarterHours[j] + ap[Math.floor(i / 12)];\n } else {\n time =\n (\"0\" + (i % 12)).slice(-2) +\n \":\" +\n (\"0\" + quarterHours[j]).slice(-2) +\n ap[Math.floor(i / 12)];\n }\n times.push(time);\n }\n }\n times.push(\n [\n (\"0\" + (endTime % 12)).slice(-2) +\n \":\" +\n (\"0\" + \"00\").slice(-2) +\n ap[Math.floor(endTime / 12)],\n ][0]\n );\n return times;\n};\n\n//timezone\nexport const defaultTimezone = [\n {\n label: \"UTC-8 Pacific Standard Time\",\n value: \"UTC-8\",\n },\n {\n label: \"UTC-7\tMountain Standard Time\",\n value: \"UTC-7\",\n },\n {\n label: \"UTC-6 Central Standard Time\",\n value: \"UTC-6\",\n },\n {\n label: \"UTC-5\tEastern Standard Time\",\n value: \"UTC-5\",\n },\n {\n label: \"UTC-4 Atlantic Standard Time\",\n value: \"UTC-4\",\n },\n];\n\nexport const duration = [\n {\n value: 15,\n label: \"15 Minutes\",\n },\n {\n value: 30,\n label: \"30 Minutes\",\n },\n {\n value: 45,\n label: \"45 Minutes\",\n },\n {\n value: 60,\n label: \"1 Hours\",\n },\n {\n value: 75,\n label: \"1.25 Hours\",\n },\n {\n value: 90,\n label: \"1.5 Hours\",\n },\n];\n\n// Allowed extensions for input file\nexport const allowedExtensions = [\n \"application/vnd.ms-excel\",\n \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\",\n \"text/csv\",\n];\n\nexport const schemaPrac = {\n \"First Name\": {\n prop: \"firstname\",\n type: String,\n required: true,\n },\n \"Last Name\": {\n prop: \"lastname\",\n type: String,\n required: true,\n },\n Email: {\n prop: \"email\",\n type: String,\n },\n \"Occupation \": {\n prop: \"contact\",\n required: true,\n type: String,\n oneOf: [\"therapist\", \"ot\", \"pt\", \"slp\"],\n },\n};\n\nexport const FeatureFlags = {\n recurringEvents: false,\n};\n\nexport const UserTypes = [\n { label: \"Patient\", value: \"PATIENT\" },\n { label: \"Practitioner\", value: \"ORG_USER\", value2: \"GENERAL_PRACTITIONER\"},\n { label: \"Org Administrator\", value: \"ORG_ADMIN\" },\n { label: \"Neurofit Admin\", value: \"NEUROFIT_ADMIN\" },\n];\nexport const filterArrayUserType = [ \"PATIENT\" , \"GENERAL_PRACTITIONER\" , \"NEUROFIT_ADMIN\" , \"ORG_ADMIN\"];\nexport const UserStatus = [\n { label: \"Active\", value: \"UNARCHIVED\" },\n { label: \"Archived\", value: \"ARCHIVED\" },\n];\nexport const MAIN_COLUMN_PATIENT = [\n \"First Name\",\n \"Last Name\",\n \"Date of Birth\",\n \"Sex\",\n \"Email\",\n \"Diagnosis\",\n];\nexport const MAIN_COLUMN_PRACTITONER = [\n \"First Name\",\n \"Last Name\",\n \"Occupation\",\n \"Email\",\n \"Sex\",\n];\nexport const SEX_TYPES = [\"male\", \"female\" , \"other\"];\nexport const DIAGNOSIS = [\"Concussion\", \"Attention deficit hyperactivity disorder\", \"Attention deficit disorder\", \"Transient ischemic attack\", \"Cerebrovascular accident\" ,\"Autism spectrum disorder\",\"Developmental learning disorder\",\"Alzheimer's disease\",\"Traumatic brain injury\",\"Other\"];\nexport const OCCUPATION = [\"General Practitioner\", \"Occupational Therapist\", \"Physical Therapist\", \"Speech Language Pathologist\"];\n\nexport const Education = [\n \"No schooling\",\n \"Some elementary school (unfinished)\",\n \"Completed elementary school\",\n \"Some secondary/high school (unfinished)\",\n \"Completed secondary/high school\",\n \"Some technical, community college (unfinished)\",\n \"Completed technical, community college\",\n \"Some university (unfinished)\",\n \"Bachelor's degree\",\n \"Master's degree \",\n \"Professional degree or doctorate\",\n];\nexport const TOOLTIP_AVG_PATIENT_MOOD = {\n achievement : \"a measure of perceived accomplishment by user within a session\",\n perceived_difficulty:\"a measure of perceived difficulty by user within a session\",\n difficulty :\"a measure of perceived difficulty by user within a session\",\n effort:\"a measure of perceived effort by user within a session\",\n enjoyment:\"a measure of perceived satisfaction by user within a session\",\n frustration:\"a measure of perceived frustration by user within a session\",\n impulsivity:\"a measure of perceived task intention/attention by user within a session\",\n motivation:\"a measure of users interacting with Neurofit sessions\",\n Accuracy:\"a measure of task precision by user within a session\",\n}\n\n","import React from \"react\";\nimport { Line } from \"react-chartjs-2\";\nimport moment from \"moment\";\nimport util from \"util\";\nimport { capitalize, Debug } from \"../../../lib/index\";\nimport pluginTrendLineLinear from \"../../../assets/js/chartjs-plugin-trendline\";\nimport { Chart } from \"react-chartjs-2\";\nimport { dispatch } from \"d3\";\nimport PropTypes from \"prop-types\";\nimport { getUserSessionData } from \"../../../actions/index\";\nimport LoadingSpinner from \"../../sharedComponents/LoadingSpinner\";\n\nexport default class ChartBase extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n isFetching: false,\n isError: false,\n chartData: undefined,\n chartOptions: undefined,\n };\n this.parseData = this.parseData.bind(this);\n this.fetchData = this.fetchData.bind(this);\n this.dispatchLoad = this.dispatchLoad.bind(this);\n this.dispatchAPI = this.dispatchAPI.bind(this);\n }\n\n /**\n * Invoked immediately after a component is mounted (inserted into the tree).\n * This will handle dispatching our initial request for the user's session data\n *\n * @see https://reactjs.org/docs/react-component.html#componentdidmount\n */\n componentDidMount() {\n this.dispatchLoad();\n }\n\n /**\n * Invoked immediately after updating occurs. This method is not called for the initial render.\n * If the properties have changed, we will dispatch another load request\n *\n * @param {*} prevProps The previous properties for the component\n * @param {*} prevState The previous state of the component\n * @see https://reactjs.org/docs/react-component.html#componentdidupdate\n */\n componentDidUpdate(prevProps, prevState) {\n if (\n prevProps.user_id !== this.props.user_id ||\n prevProps.start_date !== this.props.start_date ||\n prevProps.end_date !== this.props.end_date\n ) {\n this.dispatchLoad();\n }\n }\n\n /**\n * Dispatches the API request if the state is valid, and handles the result\n */\n dispatchLoad() {\n if (this.props.user_id !== undefined && !this.state.isFetching) {\n this.setState({ ...this.state, isFetching: true, isError: false });\n Debug.log(\"Fetching user data for skills: \" + this.props.user_id);\n // Dispatch the fetch request with our data\n this.fetchData().then(\n (result) => {\n // Store the parsed result into our state so that react will re-render\n this.setState({\n ...this.state,\n chartData: result.chartData,\n chartOptions: result.chartOptions,\n isFetching: false,\n });\n this.forceUpdate();\n },\n (error) => {\n Debug.error(error);\n this.setState({\n ...this.state,\n chartData: undefined,\n chartOptions: undefined,\n isFetching: false,\n isError: true,\n });\n }\n );\n } else {\n this.setState({\n ...this.state,\n chartData: undefined,\n chartOptions: undefined,\n isFetching: false,\n isError: true,\n });\n }\n }\n\n /**\n * Asyncronously gets the skill graphing data and parses it into the ChartJS data\n * @returns {Promise} A promise that returns a chartData and chartOptions pair\n */\n async fetchData() {\n const user_id = this.props.user_id;\n const start_date = this.props.start_date;\n const end_date = this.props.end_date;\n\n // Fetch data (async), using an empty dispatcher\n let response = await this.dispatchAPI(\n user_id,\n start_date,\n end_date\n )((x) => {});\n // Parse the results and return the graphing information\n return this.parseData(response);\n }\n\n dispatchAPI(user_id, start_date, end_date) {\n throw new Error(\"dispatchAPI must be overridden in child classes!\");\n }\n\n /**\n * Handles parsing the result of the API request and generating a ChartJS chart\n * @param {Object} payload\n */\n parseData(payload) {\n throw new Error(\"parseData must be overridden by child classes!\");\n }\n\n renderChart() {\n throw new Error(\"renderChart must be overridden by child classes!\");\n }\n\n render() {\n return this.state.isFetching ? (\n \n ) : this.state.chartData !== undefined ? (\n this.renderChart()\n ) : (\n
Data not loaded
\n );\n }\n}\n","import axios from \"axios\";\nimport util from \"util\";\nimport { Debug } from \"./lib\";\nimport { SIGN_OUT } from \"./actions/types\";\nimport PermissionsService from \"./lib/PermissionsSystem\";\n\nimport store from \"./store\";\n\nDebug.log(process.env);\nconst API_ROUTE =\n process.env.REACT_APP_API_ROUTE || \"https://api-staging.neurofit.ca/api\";\n\nconst client = axios.create({\n baseURL: API_ROUTE,\n headers: {\n \"Content-type\": \"application/json; charset=utf-8 \",\n },\n});\n\nclient.defaults.headers[\"Content-Type\"] = \"application/json; charset=utf-8\";\n\n// Middleware to load the auth token into the requests\nclient.interceptors.request.use(\n (config) => {\n const token = localStorage.getItem(\"auth_token\");\n if (token) {\n Debug.log(\"Attaching token!\");\n config.headers[\"Authorization\"] = token;\n }\n return config;\n },\n (error) => {\n Promise.reject(error);\n }\n);\n// Middleware to handle route refresh on 401/403 errors\nclient.interceptors.response.use(\n (response) => {\n return response;\n },\n (err) => {\n const originalReq = err.config;\n const refresh_route = API_ROUTE + \"/user/refresh_token\";\n\n const reject = (err) => {\n Debug.log(\"Refresh failed!\");\n localStorage.removeItem(\"auth_token\");\n localStorage.removeItem(\"refresh_token\");\n PermissionsService.Reset();\n throw err;\n };\n if (\n err.url !== refresh_route &&\n (err.response.status === 401) | (err.response.status === 403) &&\n err.config &&\n !err.config._retry\n ) {\n originalReq._retry = true;\n Debug.log(\"Attempting to refresh token!\");\n Debug.log(\"token: \" + localStorage.getItem(\"refresh_token\"));\n let result = axios\n .put(refresh_route, {\n refresh_token: localStorage.getItem(\"refresh_token\"),\n })\n .then((res) => {\n Debug.log(\"Got refresh, re-calling route\");\n Debug.log(\"Headers\" + util.inspect(res.headers));\n localStorage.setItem(\"auth_token\", res.headers.authorization);\n localStorage.setItem(\"refresh_token\", res.headers.refresh_token);\n originalReq.headers[\"Authorization\"] = res.headers.authorization;\n return axios(originalReq);\n })\n .catch((e) => {\n Debug.log(util.inspect(err));\n const thrown = {\n config: err.config,\n request: err.request,\n response: err.response,\n isAxiosError: err.isAxiosError,\n };\n store.dispatch({\n type: SIGN_OUT,\n payload: {},\n });\n reject(thrown);\n });\n\n return result;\n } else if (err.url === refresh_route) {\n store.dispatch({\n type: SIGN_OUT,\n payload: {},\n });\n reject(err);\n } else {\n return Promise.reject(err);\n }\n }\n);\n\nexport default client;\n","import React from \"react\";\nimport Fab from \"@material-ui/core/Fab\";\nimport AddIcon from \"@material-ui/icons/Add\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport { PersonAdd } from \"@material-ui/icons\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n width: \"100%\",\n padding: \"6px 1em\",\n boxSizing: \"border-box\",\n },\n button: {\n margin: \"0px 6px\",\n textTransform: \"none\",\n backgroundColor: \"#8FCAED\",\n borderRadius: \"5px\",\n display: \"flex\",\n padding: \"0 10px\",\n width: \"100%\",\n height: \"40px\",\n color: \"#333437\",\n fontWeight: \"700\",\n fontSize: \"17px\",\n \"&:hover\": {\n backgroundColor: \"#8FCAED\",\n },\n },\n extendedIcon: {\n marginRight: theme.spacing(1),\n },\n}));\n\nexport default function FabIcon(props) {\n const classes = useStyles();\n\n return (\n
\n \n {/* */}\n {props.iconText}\n \n
\n );\n}\n","import moment from \"moment\";\n\n/*!\n * chartjs-plugin-trendLine.js\n * Version: 0.1.3\n *\n * Copyright 2017 Marcus Alsterfjord\n * Released under the MIT license\n * https://github.com/Makanz/chartjs-plugin-trendLine/blob/master/README.md\n *\n * Mod by: vesal: accept also xy-data so works with scatter\n */\nvar pluginTrendLineLinear = {\n id: \"trendLineLinear\",\n beforeDraw: function (chartInstance) {\n var yScale;\n var xScale;\n for (var axis in chartInstance.scales) {\n if (axis[0] === \"x\") xScale = chartInstance.scales[axis];\n else yScale = chartInstance.scales[axis];\n if (xScale && yScale) break;\n }\n var ctx = chartInstance.chart.ctx;\n\n chartInstance.data.datasets.forEach(function (dataset, index) {\n if (dataset.trendLineLinear && chartInstance.isDatasetVisible(index)) {\n var datasetMeta = chartInstance.getDatasetMeta(index);\n let is_time =\n datasetMeta.controller.chart.scales[\"x-axis-0\"].type === \"time\";\n if (datasetMeta.data.length > 0) {\n addFitter(datasetMeta, ctx, is_time, dataset, xScale, yScale);\n }\n }\n });\n\n ctx.setLineDash([]);\n },\n};\n\nfunction addFitter(datasetMeta, ctx, isTime, dataset, xScale, yScale) {\n var style = dataset.trendLineLinear.style || dataset.borderColor;\n var lineWidth = dataset.trendLineLinear.width || dataset.borderWidth;\n var lineStyle = dataset.trendLineLinear.lineStyle || \"solid\";\n var linePattern = dataset.trendLineLinear.borderDash || [\n lineWidth,\n lineWidth,\n ];\n var timeFormat = dataset.trendLineLinear.timeFormat || \"MMM DD\";\n\n style = style !== undefined ? style : \"rgba(169,169,169, .6)\";\n lineWidth = lineWidth !== undefined ? lineWidth : 3;\n\n var fitter = new LineFitter();\n var lastIndex = dataset.data.length - 1;\n var startPos = datasetMeta.data[0]._model.x;\n var endPos = datasetMeta.data[lastIndex]._model.x;\n\n var xy = false;\n if (dataset.data && typeof dataset.data[0] === \"object\") xy = true;\n\n dataset.data.forEach(function (data, index) {\n if (data === null) return;\n if (xy)\n if (!isTime) {\n fitter.add(data.x, data.y);\n } else {\n fitter.add(moment(data.x, timeFormat), data.y);\n }\n else fitter.add(index, data);\n });\n\n var x1 = xScale.getPixelForValue(fitter.minx);\n var x2 = xScale.getPixelForValue(fitter.maxx);\n var y1 = yScale.getPixelForValue(fitter.f(fitter.minx));\n var y2 = yScale.getPixelForValue(fitter.f(fitter.maxx));\n if (!xy) {\n x1 = startPos;\n x2 = endPos;\n }\n\n var drawBottom = datasetMeta.controller.chart.chartArea.bottom;\n var chartWidth = datasetMeta.controller.chart.width;\n\n if (y1 > drawBottom) {\n // Left side is below zero\n var diff = y1 - drawBottom;\n var lineHeight = y1 - y2;\n var overlapPercentage = diff / lineHeight;\n var addition = chartWidth * overlapPercentage;\n\n y1 = drawBottom;\n x1 = x1 + addition;\n } else if (y2 > drawBottom) {\n // right side is below zero\n var diff = y2 - drawBottom;\n var lineHeight = y2 - y1;\n var overlapPercentage = diff / lineHeight;\n var subtraction = chartWidth - chartWidth * overlapPercentage;\n\n y2 = drawBottom;\n x2 = chartWidth - (x2 - subtraction);\n }\n\n ctx.lineWidth = lineWidth;\n if (lineStyle === \"dotted\") {\n ctx.setLineDash(linePattern);\n }\n ctx.beginPath();\n ctx.moveTo(x1, y1);\n ctx.lineTo(x2, y2);\n ctx.strokeStyle = style;\n ctx.stroke();\n}\n\nfunction LineFitter() {\n this.count = 0;\n this.sumX = 0;\n this.sumX2 = 0;\n this.sumXY = 0;\n this.sumY = 0;\n this.minx = 1e100;\n this.maxx = -1e100;\n}\n\nLineFitter.prototype = {\n add: function (x, y) {\n if (y != null && y !== undefined) {\n this.count++;\n this.sumX += x;\n this.sumX2 += x * x;\n this.sumXY += x * y;\n this.sumY += y;\n if (x < this.minx) this.minx = x;\n if (x > this.maxx) this.maxx = x;\n }\n },\n f: function (x) {\n var det = this.count * this.sumX2 - this.sumX * this.sumX;\n var offset = (this.sumX2 * this.sumY - this.sumX * this.sumXY) / det;\n var scale = (this.count * this.sumXY - this.sumX * this.sumY) / det;\n return offset + x * scale;\n },\n};\n\nexport default pluginTrendLineLinear;\n","import React, { useState, useEffect } from \"react\";\nimport { Line, BoxPlot } from \"react-chartjs-2\";\nimport moment from \"moment\";\nimport { capitalize } from \"../../../lib/index\";\nimport { Chart } from \"react-chartjs-2\";\nimport PropTypes from \"prop-types\";\nimport LoadingSpinner from \"../../sharedComponents/LoadingSpinner\";\nimport zoomPlugin from '../../../assets/js/chartjs-plugin-zoom';\nChart.plugins.register(zoomPlugin); \n\nconst UserSkillLevels = (props) => {\n const [chartData, setChartData] = useState({});\n\n useEffect(() => {\n parseData(props.userSessionData);\n }, [props.userSessionData]);\n\n const parseData = (payload) => {\n let datasets = [];\n\n const is_single_day =\n moment(props.start_date).local().add(1, \"second\").format(\"YYYYMMDD\") ==\n moment(props.end_date).local().format(\"YYYYMMDD\");\n const unit = is_single_day ? \"hour\" : \"day\";\n const time_format = is_single_day ? \"h:MMA\" : \"YYYY MMM DD\" ;\n\n if (payload !== null && payload !== undefined) {\n // do not delete this line\n\n let colorSet = [\"#79C5C8\", \"#FEC7C4\", \"#FFDBA6\"];\n\n let categories = {};\n\n // Group all related level categories into arrays\n for (let key in payload) {\n let category = payload[key].categories;\n if (category !== null && category !== \"null\") {\n categories[category] = categories[category] || [];\n categories[category].push(payload[key]);\n }\n }\n\n let ix = 0;\n // Iterate over all level categories\n for (let category in categories) {\n const levels = categories[category];\n\n // Will store all data for this line\n let combinedData = {};\n\n // Iterate over all levels within the category\n for (const level of levels) {\n // If the level has recorded sessions\n if (level.session_count !== 0) {\n // Add all days to the graph\n Object.keys(level.daily_aggregates).map((date) => {\n let local = moment.utc(date).local(true);\n combinedData[local] = combinedData[local] || [];\n combinedData[local].push({\n x: local,\n y: level.daily_aggregates[date].avg.difficulty,\n level: level.name,\n });\n return date; // avoid warnings\n });\n }\n }\n\n // This will be the dataset we sent to ChartJS\n let aggregated = [];\n\n // Iterate over each day per category, to make a line item for that day\n Object.keys(combinedData).map((date) => {\n let set = combinedData[date];\n // If there's more then one level type in the day, iterate over them and aggregate\n if (set.length > 1) {\n let min = 5;\n let max = 0;\n let avg = 0;\n let tags = [];\n\n for (let ix = 0; ix < set.length; ix++) {\n let item = set[ix];\n min = Math.min(min, item.y);\n max = Math.max(max, item.y);\n avg += item.y;\n tags.push({ name: item.level, value: item.y });\n }\n\n avg /= set.length;\n\n aggregated.push({\n x: moment(date),\n y: avg,\n yMin: min,\n yMax: max,\n tags: tags,\n });\n }\n // There was only 1 level played on this day, we can directly insert it\n else {\n aggregated.push({\n x: set[0].x,\n y: set[0].y,\n yMin: set[0].y,\n yMax: set[0].y,\n tags: [{ name: set[0].level, value: set[0].y }],\n });\n }\n return date; // avoid warnings\n });\n\n // Sort the dataset to make sure that they are graphed left to right\n aggregated.sort((a, b) => {\n if (moment(a.x) > moment(b.x)) return 1;\n if (moment(a.x) < moment(b.x)) return -1;\n return 0;\n });\n\n // Create the ChartJS dataset for the category\n let dataset = {\n label: capitalize(category),\n data: aggregated,\n borderColor: colorSet[ix],\n fill: false,\n tension: 0,\n };\n ix++;\n\n datasets.push(dataset);\n }\n }\n\n /* ----------------- convert to a data for the scatter plot ----------------- */\n const data = {\n maintainAspectRatio: false,\n responsive: false,\n datasets: datasets,\n };\n\n /* ----------------------- options for the line graph ----------------------- */\n const options = {\n maintainAspectRatio: false,\n legend: props.legend,\n responsive: true,\n type: \"line\",\n interaction: {\n mode: \"index\",\n intersect: false,\n },\n scales: {\n xAxes: [\n {\n type: \"time\",\n time: {\n unit: unit,\n minUnit: unit,\n round: unit,\n parser: time_format,\n },\n ticks: {\n fontSize: 14,\n min: moment(props.start_date).local(),\n max: moment(props.end_date).local(),\n },\n },\n ],\n yAxes: [\n {\n ticks: {\n beginAtZero: true,\n fontSize: 15,\n callback: function (value) {\n if (value % 1 === 0) {\n return value;\n }\n },\n suggestedMin: 0,\n suggestedMax: 5,\n },\n scaleLabel: {\n display: true,\n labelString: \"Performance Over Time\",\n fontSize: 20,\n },\n },\n ],\n },\n\n plugins: {\n zoom: {\n pan: {\n enabled: true,\n mode: \"xy\",\n threshold: 10,\n speed: 20,\n },\n zoom: {\n enabled: true,\n pinch : true,\n drag: false,\n mode: \"xy\",\n speed: 0.1,\n mode: \"xy\",\n },\n limits: {\n y: { min: \"original\", max: \"original\" },\n x: { min: \"original\", max: \"original\" }\n }\n }\n },\n };\n\n setChartData({ chartData: data, chartOptions: options });\n };\n\n return props.isFetching ? (\n \n ) : chartData.chartData !== undefined ? (\n \n ) : (\n
Data not loaded
\n );\n};\n\nUserSkillLevels.propTypes = {\n start_date: PropTypes.string.isRequired,\n end_date: PropTypes.string.isRequired,\n isFetching: PropTypes.string.isRequired,\n};\n\nexport default UserSkillLevels;\n","import React from \"react\";\nimport { Container, Box } from \"@material-ui/core\";\nimport PropTypes from \"prop-types\";\n\nconst TabPanel = (props) => {\n const { children, value, index, ...other } = props;\n\n return (\n