\n\n\n
\n\n\n
\n window.open(DOCS_URL, \"_blank\")}\n aria-label={t(\"docs\")}\n aria-haspopup=\"false\">\n \n \n \n
\n
\n\n\n
\n \n \n \n \n\n\n {languageMenu}\n {userMenu}\n \n )\n});\n","import {makeStyles} from \"@material-ui/core/styles\";\nimport createStyles from \"@material-ui/styles/createStyles\";\nimport React, {useEffect} from \"react\";\nimport CssBaseline from \"@material-ui/core/CssBaseline\";\nimport AppBar from \"@material-ui/core/AppBar\";\nimport clsx from \"clsx\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport Drawer from \"@material-ui/core/Drawer\";\nimport ChevronRightIcon from \"@material-ui/icons/ChevronRight\";\nimport ChevronLeftIcon from \"@material-ui/icons/ChevronLeft\";\nimport Divider from \"@material-ui/core/Divider\";\nimport List from \"@material-ui/core/List\";\nimport ListItem from \"@material-ui/core/ListItem\";\nimport ListItemIcon from \"@material-ui/core/ListItemIcon\";\nimport Tooltip from '@material-ui/core/Tooltip';\nimport ListItemText from \"@material-ui/core/ListItemText\";\nimport useTheme from \"@material-ui/core/styles/useTheme\";\nimport Routes from \"./routes\";\nimport {BrowserRouter, Switch, Link, Route, Redirect} from \"react-router-dom\";\nimport {useTranslation} from \"react-i18next\";\nimport HomeToolbar from \"../_components/toolbar.home.component\";\nimport {useNeeds} from \"../_helpers/needs\";\nimport {\n Backdrop,\n CircularProgress,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n useMediaQuery\n} from \"@material-ui/core\";\nimport {loadingContext} from '../_context/loading-context';\nimport {tabContext} from '../_context/tab-context';\nimport { useHistory } from \"react-router-dom\";\nimport { useRouteMatch, useLocation } from \"react-router-dom\";\n\nconst drawerWidth = 240;\nconst useStyles = makeStyles(theme => (createStyles({\n root: {\n display: 'flex',\n height: '100vh'\n },\n appBar: {\n zIndex: theme.zIndex.drawer + 1,\n transition: theme.transitions.create(['width', 'margin'], {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n background: theme.palette.neutral.main,\n color: theme.palette.neutral.emphasisText.medium,\n },\n appBarShift: {\n marginLeft: drawerWidth,\n width: `calc(100% - ${drawerWidth}px)`,\n transition: theme.transitions.create(['width', 'margin'], {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen,\n }),\n },\n menuButton: {\n marginRight: 36,\n },\n hide: {\n display: 'none',\n },\n drawer: {\n width: drawerWidth,\n flexShrink: 0,\n whiteSpace: 'nowrap',\n },\n drawerOpen: {\n width: drawerWidth,\n transition: theme.transitions.create('width', {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen,\n }),\n },\n drawerClose: {\n transition: theme.transitions.create('width', {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n overflowX: 'hidden',\n width: theme.spacing(7) + 1,\n [theme.breakpoints.up('sm')]: {\n width: theme.spacing(9) + 1,\n },\n },backdrop: {\n zIndex: theme.zIndex.drawer + 1,\n color: '#fff',\n },\n toolbar: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-end',\n padding: theme.spacing(0, 1),\n // necessary for content to be below app bar\n ...theme.mixins.toolbar,\n },\n content: {\n display: 'flex',\n flexFlow: 'column',\n height: \"100%\",\n width: \"100%\",\n overflow: 'auto'\n },\n main: {\n flex: 1,\n padding: theme.spacing(3),\n overflow: 'auto'\n },\n icon: {\n '&': {\n color: theme.palette.neutral.emphasisText.medium,\n }\n },\n selectedIcon: {\n '&': {\n color: theme.palette.primary.main,\n }\n },\n grow: {\n flexGrow: 1,\n },\n})));\n\nconst HomePage = (props) => {\n const theme = useTheme();\n const classes = useStyles();\n\n const baseRouter = props.baseRouter;\n\n const { t } = useTranslation();\n\n const [open, setOpen] = React.useState(false);\n\n let match = useRouteMatch();\n const location = useLocation();\n const currentRoute = location.pathname;\n const [hasNeeds, NEEDS] = useNeeds();\n\n const handleDrawerOpen = () => {\n setOpen(true);\n };\n const handleDrawerClose = () => {\n setOpen(false);\n };\n\n const [loading, setLoading] = React.useState(false);\n const handleClose = () => {\n setLoading(false);\n };\n\n const routerRef = React.createRef();\n let history = useHistory();\n\n return (\n
\n
\n
{setLoading(true)}, stopLoading: () =>{setLoading(false)}}}>\n \n \n \n \n \n \n \n {\n if (id === null) {\n history.replace(`/home/${res}`);\n } else {\n history.replace(`/home/${res}?id=${id}`);\n }\n }}}>\n \n \n \n {theme.direction === 'rtl' ? : }\n \n
\n \n \n {Routes\n .filter(route => hasNeeds(route.needs))\n .map((prop) =>(\n \n \n \n {}\n \n \n \n \n ))}\n
\n \n\n\n \n
\n \n \n \n \n {Routes\n .filter(route => hasNeeds(route.needs))\n .map((prop) => )\n }\n \n
\n \n \n\n
\n \n \n\n \n\n \n
\n );\n}\n\nexport default HomePage;","import axios from \"axios\";\nimport {authHeader} from \"../_helpers/auth-header\";\nimport {BACKEND_URL} from \"../config\";\n\nexport const passwordResetService = {\n reset,\n startReset\n};\n\nfunction reset(username, password, token, recaptcha) {\n\n return new Promise(function(resolve, reject) {\n axios({url: `${BACKEND_URL}/password-reset/v1/redeem`,\n method: 'POST',\n data: {\n email: username,\n password: password,\n token: token,\n recaptcha: recaptcha\n },\n headers: {...{'Cache-Control': 'no-cache'}, ...authHeader()}\n }).then(response => {\n resolve(true);\n }).catch(function (err) {\n reject(err);\n });\n });\n}\n\nfunction startReset(username, recaptcha) {\n\n return new Promise(function(resolve, reject) {\n axios({url: `${BACKEND_URL}/password-reset/v1/request`,\n method: 'POST',\n data: {\n email: username,\n recaptcha: recaptcha\n },\n headers: {...{'Cache-Control': 'no-cache'}, ...authHeader()}\n }).then(response => {\n resolve(true);\n }).catch(function (err) {\n reject(err);\n });\n });\n}\n","import { useEffect } from \"react\";\n\nexport const useOnMount = handler => {\n return useEffect(() => {\n return handler();\n }, []);\n};","import React from 'react';\nimport {useFormik} from 'formik';\nimport {authenticationService} from '../_services/auth.service';\nimport {userContext} from \"../_context/user-context\";\nimport * as yup from 'yup';\nimport {TextField} from \"@material-ui/core\";\nimport {useTranslation} from \"react-i18next\";\nimport Grid from \"@material-ui/core/Grid\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport Box from \"@material-ui/core/Box\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Button from \"@material-ui/core/Button\";\nimport Typography from \"@material-ui/core/Typography\";\nimport {themeContext} from \"../_context/theme-context\";\nimport Link from \"@material-ui/core/Link\";\nimport {passwordResetService} from \"../_services/password-reset.service\";\nimport {useSnackbar} from \"notistack\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport {useOnMount} from \"../_helpers/on-mount\";\nimport {safe_username_required} from \"../_yup/validators\";\nimport ReCAPTCHA from \"react-google-recaptcha\";\nimport {PUBLIC_URL, RECAPTCHA} from \"../config\";\nimport TranslateButton from \"../_components/translate_button.component\";\nimport ThemeButton from \"../_components/theme_button.component\";\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\nimport {Checkbox} from \"@material-ui/core\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: \"flex\",\n flexGrow: 1,\n height: \"100vh\"\n },\n field: {\n width: \"100%\",\n margin: \"5px\"\n },\n details: {\n width: \"100%\",\n display: 'flex',\n verticalAlign: 'middle'\n },\n paper: {\n height: \"50%\",\n [theme.breakpoints.up('md')]:{minWidth: \"500px\", width: \"50%\"},\n [theme.breakpoints.down('md')]:{width: \"100%\"},\n margin: \"auto\",\n padding: \"50px\"\n },\n reset: {\n width: \"100%\",\n textAlign: \"end\",\n cursor: \"\",\n display: 'flex',\n flexDirection: { xs: 'column', md: 'row' },\n verticalAlign: 'middle'\n },\n remember: {\n width: \"100%\",\n textAlign: \"start\",\n cursor: \"\",\n verticalAlign: 'middle'\n }\n}));\n\n\nconst LoginPage = (props) => {\n const classes = useStyles();\n const userCtx = React.useContext(userContext);\n const themeCtx = React.useContext(themeContext);\n const mobile = useMediaQuery('(max-width:960px)');\n const [recaptcha, setRecaptcha] = React.useState(null);\n const [showRecaptcha, setShowRecaptcha] = React.useState(false);\n function onChange(value) {\n setRecaptcha(value);\n }\n\n const errorHandler = useErrorHandler();\n\n const {enqueueSnackbar} = useSnackbar();\n\n const logged = (needs) => {\n const setLogged = userCtx[\"setUser\"];\n const setNeeds = userCtx[\"setNeeds\"];\n const setTeacher = userCtx[\"setTeacher\"];\n setLogged({logged: true, ping: true});\n setNeeds(needs[\"needs\"]);\n setTeacher(needs[\"teacher\"]);\n const {from} = props.location.state || {from: {pathname: \"/home/students\"}};\n props.history.push(from);\n }\n\n const {t} = useTranslation();\n const formik = useFormik({\n initialValues: {\n username: '',\n password: '',\n totp: '',\n rememberMe: false\n },\n validationSchema: yup.object({\n username: safe_username_required(t),\n password: yup.string().required(t(\"password_required\")),\n totp: yup.string().required(t(\"2FA_needed\")).test('len', t(\"2FA_6digits\"), (val) => (val === undefined ? \"\": val).toString().length === 6).test('digits', t(\"2FA_invalid\"), (val) => Number(val)? true: false)\n }),\n enableReinitialize: true,\n onSubmit: ({username, password, totp, rememberMe}, {setStatus, setSubmitting}) => {\n setStatus();\n authenticationService\n .login(username, password, totp, rememberMe)\n .then(...errorHandler({handle401: false}))\n .then(function (res) {\n if (!res['logged']) {\n setStatus(true);\n return;\n }\n logged(res['needs']);\n })\n\n .finally(() => {\n setSubmitting(false);\n });\n }\n });\n\n useOnMount(() => {\n if (userCtx[\"user\"][\"logged\"]) {\n props.history.push('/home/students');\n return null;\n }\n\n if (userCtx[\"user\"][\"ping\"] !== false){\n authenticationService\n .ping()\n .then(...errorHandler({}))\n .then((response) => {\n if (response.isLoggedIn) logged(response.needs);\n })\n\n }\n\n });\n\n const resetPassword = () => {\n setShowRecaptcha(true);\n }\n\n const resetPassword2 = () => {\n const username = formik.values[\"username\"];\n if (username === null || username === '' || username === undefined) {\n enqueueSnackbar(t(\"username_required_password_reset\"), { variant: \"warning\"});\n } else {\n passwordResetService\n .startReset(username, recaptcha)\n .then(...errorHandler({}))\n .then(r => {\n setShowRecaptcha(false);\n enqueueSnackbar(t(\"started_password_reset\"), { variant: \"success\"});\n })\n }\n }\n\n return (\n \n\n
\n {!mobile && }\n\n \n \n\n \n \n {mobile && <>\n \n >\n }\n \n\n \n\n \n\n {showRecaptcha &&\n \n \n \n \n
}\n\n \n \n \n\n \n \n {!mobile && \n \n \n }\n );\n\n}\n\nexport default LoginPage;","import axios from \"axios\";\nimport {authHeader} from \"../_helpers/auth-header\";\nimport {BACKEND_URL} from \"../config\";\n\nexport const authenticationService = {\n signup\n};\n\nfunction signup(username, password, email, name, surname1, surname2, token) {\n\n return new Promise(function(resolve, reject) {\n axios({url: `${BACKEND_URL}/user-invites/v1/redeem`,\n method: 'POST',\n data: {\n password: password,\n email: email,\n name: name,\n surname1: surname1,\n surname2: surname2,\n token: token\n },\n headers: {...{'Cache-Control': 'no-cache'}, ...authHeader()}\n }).then(response => {\n resolve(response.data);\n }).catch(function (err) {\n reject(err);\n });\n });\n}\n","import React, {useState} from 'react';\nimport {useFormik} from 'formik';\nimport * as yup from 'yup';\nimport {TextField} from \"@material-ui/core\";\nimport {useTranslation} from \"react-i18next\";\nimport Grid from \"@material-ui/core/Grid\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport Box from \"@material-ui/core/Box\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Button from \"@material-ui/core/Button\";\nimport Typography from \"@material-ui/core/Typography\";\nimport {themeContext} from \"../_context/theme-context\";\nimport {authenticationService as signupService} from \"../_services/signup.service\";\nimport {useSnackbar} from \"notistack\";\nimport i18next from \"i18next\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport {useOnMount} from \"../_helpers/on-mount\";\nimport {safe_password_repetition, safe_email_required, safe_password, safe_username_required} from \"../_yup/validators\";\nimport TranslateButton from \"../_components/translate_button.component\";\nimport ThemeButton from \"../_components/theme_button.component\";\nimport {PUBLIC_URL} from \"../config\";\nimport QRCode from \"react-qr-code\";\nimport Link from '@material-ui/core/Link';\nimport {confirmContext} from \"../_context/confirm-context\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: \"flex\",\n flexGrow: 1,\n height: \"100vh\"\n },\n field: {\n width: \"100%\",\n margin: \"5px\"\n },\n paper: {\n width: \"50%\",\n minWidth: \"500px\",\n height: \"50%\",\n padding: \"50px\",\n margin: \"auto\"\n }\n}));\n\nconst STEP_REGISTER = 0;\nconst STEP_TOTP = 1;\n\nconst SignupPage = (props) => {\n const classes = useStyles();\n const themeCtx = React.useContext(themeContext);\n const {enqueueSnackbar} = useSnackbar();\n const [step, setStep] = useState(STEP_REGISTER);\n const [totpUri, setTotpUri] = useState(null);\n const confirm = React.useContext(confirmContext);\n\n useOnMount(() => {\n i18next.changeLanguage(query.get('lan')).then();\n })\n\n const {t} = useTranslation();\n const errorHandler = useErrorHandler();\n const query = new URLSearchParams(window.location.search);\n const token = query.get('token')\n const email = query.get('email')\n const formik = useFormik({\n initialValues: {\n username: email,\n email: email,\n password: '',\n name: '',\n surname1: '',\n surname2: '',\n password2: '',\n },\n validationSchema: yup.object({ // todo translate\n username: safe_username_required(t),\n email: safe_email_required(t),\n password: safe_password(t),\n password2: safe_password_repetition(t),\n name: yup.string().required(t(\"name_required\")),\n surname1: yup.string().required(t(\"surname1_required\")),\n surname2: yup.string().required(t(\"surname2_required\"))\n }),\n enableReinitialize: true,\n onSubmit: ({username, email, password, name, surname1, surname2, password2}, {setStatus, setSubmitting}) => {\n setStatus();\n\n signupService.signup(username, password, email, name, surname1, surname2, token)\n .then(...errorHandler({handle401: false, handle400: false}))\n .then(\n function (result) {\n enqueueSnackbar(t(\"sign_up_success\"), {variant: \"success\"});\n setSubmitting(false);\n setStep(STEP_TOTP);\n setTotpUri(result['totp']);\n },\n function (error) {\n setSubmitting(false);\n setStatus(error);\n\n if (error.response.status === 401){\n enqueueSnackbar(t(\"invalid_expired_invite\"), { variant: \"warning\"});\n } else if (error.response.status === 400) {\n enqueueSnackbar(t(\"used_invite\"), { variant: \"warning\"});\n }\n });\n }\n });\n\n const RegisterStep = () => \n \n {t(\"been_invited\")}\n \n \n ;\n\n const TotpStep = () => \n \n {t(\"setup_2FA\")}\n \n \n \n - {t(\"2FA_tip1\")}
\n - {t(\"2FA_tip2\")}
\n - {t(\"2FA_tip3\")}
\n
\n \n \n \n {totpUri !== null && }\n \n\n \n {t(\"learn_how_2FA\")}\n \n\n \n \n \n \n\n return (\n \n
\n \n\n \n \n \n \n \n \n\n {step === STEP_REGISTER && RegisterStep()}\n {step === STEP_TOTP && TotpStep()}\n \n \n \n \n \n \n \n \n );\n\n}\n\nexport default SignupPage;","import React from 'react';\nimport {useFormik} from 'formik';\nimport * as yup from 'yup';\nimport {TextField} from \"@material-ui/core\";\nimport {useTranslation} from \"react-i18next\";\nimport Grid from \"@material-ui/core/Grid\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport Box from \"@material-ui/core/Box\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Button from \"@material-ui/core/Button\";\nimport Typography from \"@material-ui/core/Typography\";\nimport {themeContext} from \"../_context/theme-context\";\nimport {useSnackbar} from \"notistack\";\nimport {passwordResetService} from \"../_services/password-reset.service\";\nimport i18next from \"i18next\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport {useOnMount} from \"../_helpers/on-mount\";\nimport {safe_password, safe_password_repetition, safe_username_required} from \"../_yup/validators\";\nimport {PUBLIC_URL, RECAPTCHA} from \"../config\";\nimport ReCAPTCHA from \"react-google-recaptcha\";\nimport TranslateButton from \"../_components/translate_button.component\";\nimport ThemeButton from \"../_components/theme_button.component\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: \"flex\",\n flexGrow: 1,\n height: \"100vh\"\n },\n field: {\n width: \"100%\",\n margin: \"5px\"\n },\n recaptcha: {\n margin: theme.spacing(3)\n },\n paper: {\n width: \"50%\",\n minWidth: \"500px\",\n height: \"50%\",\n padding: \"50px\",\n margin: \"auto\"\n }\n}));\n\n\nconst ResetPage = (props) => {\n const classes = useStyles();\n const themeCtx = React.useContext(themeContext);\n\n const [recaptcha, setRecaptcha] = React.useState(null);\n function onChange(value) {\n setRecaptcha(value);\n }\n\n const {enqueueSnackbar} = useSnackbar();\n\n useOnMount(() => {\n i18next.changeLanguage(query.get('lan')).then();\n })\n\n const {t} = useTranslation();\n const query = new URLSearchParams(window.location.search);\n const errorHandler = useErrorHandler();\n const token = query.get('token')\n const email = query.get('email')\n const formik = useFormik({\n initialValues: {\n email: email,\n password: '',\n password2: '',\n },\n validationSchema: yup.object({\n email: safe_username_required(t),\n password: safe_password(t),\n password2: safe_password_repetition(t)\n }),\n enableReinitialize: true,\n onSubmit: ({email, password, password2}, {setStatus, setSubmitting}) => {\n setStatus();\n\n passwordResetService\n .reset(email, password, token, recaptcha)\n .then(...errorHandler({handle401: false}))\n .then(\n function (result) {\n enqueueSnackbar(t(\"reset_password_success\"), {variant: \"success\"});\n setSubmitting(false);\n props.history.push(\"/login\");\n },\n function (error) {\n setSubmitting(false);\n setStatus(error);\n\n if (error.response.status === 401){\n enqueueSnackbar(t(\"invalid_expired_reset\"), { variant: \"warning\"});\n } // TODO report, same in the signup\n });\n }\n });\n\n console.log(\"***\", formik.error, formik.errors, formik.errors['email'], formik.touched, formik.values, formik.initialValues);\n\n return (\n \n
\n \n\n \n \n \n \n \n \n\n \n {t(\"new_password\")}\n \n\n \n \n \n \n \n \n \n \n \n \n );\n\n}\n\nexport default ResetPage;","import React from 'react';\nimport Box from \"@material-ui/core/Box\";\nimport {themeContext} from \"../_context/theme-context\";\nimport {PUBLIC_URL, RECAPTCHA} from \"../config\";\n\n\nexport default function XamfraLogo() {\n const themeCtx = React.useContext(themeContext);\n\n\n return \n \n \n}","import axios from \"axios\";\nimport {authHeader} from \"../_helpers/auth-header\";\nimport {API_VERSION, BACKEND_URL} from \"../config\";\n\nexport const preEnrolmentService = {\n getCourses,\n postPreEnrollment\n};\n\nfunction getCourses() {\n return new Promise(function (resolve, reject) {\n\n axios({\n method: 'get',\n url: `${BACKEND_URL}/pre-enrolment/v1/courses`,\n headers: {\n ...{\n 'Content-Type': 'application/json',\n 'Cache-Control': 'no-cache'\n }, ...authHeader() // todo are auth headers needed for gets?\n }\n }).then(function (response) {\n resolve(response.data);\n }).catch(function (err) {\n reject(err);\n });\n });\n }\n\n\n function postPreEnrollment(data, recaptcha) {\n return new Promise(function (resolve, reject) {\n\n axios({\n method: 'post',\n url: `${BACKEND_URL}/pre-enrolment/v1/pre-enrolment`,\n data: {\n body: data,\n recaptcha: recaptcha\n },\n headers: {\n ...{\n 'Content-Type': 'application/json',\n 'Cache-Control': 'no-cache'\n }, ...authHeader()\n }\n }).then(function (response) {\n resolve(response);\n }).catch(function (err) {\n reject(err);\n });\n });\n }\n","export const getNextDayOfWeek = (date, dayOfWeek) => {\n // Code to check that date and dayOfWeek are valid left as an exercise ;)\n\n var resultDate = new Date(date.getTime());\n\n resultDate.setDate(date.getDate() + (7 + dayOfWeek - date.getDay()) % 7);\n\n return resultDate;\n}\n\nexport const getLocalisedWeekday = (dayOfWeek) => {\n let today = new Date();\n let nextDayOfWeek = getNextDayOfWeek(today, dayOfWeek);\n return nextDayOfWeek.toLocaleString(window.navigator.language, {weekday: 'short'});\n}\n\nexport const textSchedulesForCourse = (course) => {\n if (!course[\"base_schedules\"]) return null;\n return course[\"base_schedules\"].map(s => getLocalisedWeekday(s.day_week) + \", \" + s.start_time.slice(0, -3) + \" - \" + s.end_time.slice(0, -3)).join(\"; \");\n}\n\n","import React from 'react';\nimport { Divider } from '@material-ui/core';\nimport Box from \"@material-ui/core/Box\";\nimport XamfraLogo from './xamfra.logo.component';\nimport {makeStyles} from \"@material-ui/core/styles\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n backgroundColor: theme.palette.background.paper\n }\n }));\n \n\nexport default function XamfraHeader(props) {\n \n const classes = useStyles();\n\n return \n \n {props.children}\n \n \n\n \n}","import React, {useEffect, useRef, useState} from 'react';\nimport * as yup from 'yup';\nimport {\n BottomNavigation,\n Card, CardActions,\n Checkbox,\n FormControlLabel, ListItemIcon, ListItemSecondaryAction,\n MenuItem, MobileStepper,\n Step,\n StepLabel,\n Stepper, Tooltip, withStyles\n} from \"@material-ui/core\";\nimport XamfraLogo from '../_components/xamfra.logo.component';\nimport NavigateNextIcon from '@material-ui/icons/NavigateNext';\nimport NavigateBeforeIcon from '@material-ui/icons/NavigateBefore';\nimport {useTranslation} from \"react-i18next\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport Box from \"@material-ui/core/Box\";\nimport SkipNextIcon from '@material-ui/icons/SkipNext';\nimport Paper from \"@material-ui/core/Paper\";\nimport Button from \"@material-ui/core/Button\";\nimport Typography from \"@material-ui/core/Typography\";\nimport {themeContext} from \"../_context/theme-context\";\nimport {useSnackbar} from \"notistack\";\nimport i18next from \"i18next\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport {useOnMount} from \"../_helpers/on-mount\";\nimport ReCAPTCHA from \"react-google-recaptcha\"\nimport DirtyTextField from \"../_components/dirtytextfield.component\";\nimport Divider from \"@material-ui/core/Divider\";\nimport DirtyCountrySelect from \"../_components/contry-select.component\";\nimport {education_years} from \"../_data/education\";\nimport {emptyAttendee} from \"../_data/empty_objects\";\nimport {useNormik} from \"../_helpers/normik\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport {student_guardian_relations} from \"../_data/relations\";\nimport SearchBar from \"../_components/searchbar.component\";\nimport List from \"@material-ui/core/List\";\nimport ListItem from \"@material-ui/core/ListItem\";\nimport ListItemText from \"@material-ui/core/ListItemText\";\nimport CardContent from \"@material-ui/core/CardContent\";\nimport DeleteIcon from \"@material-ui/icons/Delete\";\nimport {PUBLIC_URL, RECAPTCHA} from \"../config\";\nimport ThemeButton from \"../_components/theme_button.component\";\nimport Link from \"@material-ui/core/Link\";\nimport TranslateButton from \"../_components/translate_button.component\";\nimport {preEnrolmentService} from \"../_services/pre-enrolment.service\";\nimport {DNI_OR_NIE_REGEX, safe_email, safe_email_required} from \"../_yup/validators\";\nimport {KeyboardArrowLeft, KeyboardArrowRight} from \"@material-ui/icons\";\nimport useTheme from \"@material-ui/core/styles/useTheme\";\nimport DoneIcon from '@material-ui/icons/Done';\nimport CheckCircleIcon from '@material-ui/icons/CheckCircle';\nimport {textSchedulesForCourse} from \"../utils/localized-weekdays\";\n\nimport XamfraHeader from '../_components/xamfra.header.component';\nconst useStyles = makeStyles((theme) => ({\n root: {\n width: \"100%\"\n },\n field: {\n width: \"100%\",\n margin: \"5px\"\n },\n cards: {\n '& > *': {\n margin: theme.spacing(3),\n },\n },\n buttons: {\n '& > *': {\n margin: theme.spacing(1),\n },\n }, line: {\n width: \"100%\",\n marginTop: theme.spacing(1)\n },\n card: {\n minWidth: 200,\n width: 'fit-content',\n maxWidth: 500,\n display: 'inline-block'\n },\n recaptcha: {\n margin: theme.spacing(4)\n },\n bullet: {\n display: 'inline-block',\n margin: '0 2px',\n transform: 'scale(0.8)',\n },\n title: {\n fontSize: 14,\n },\n pos: {\n marginBottom: 12,\n },\n list: {\n minHeight: '150px',\n overflow: 'auto'\n },\n composite: {\n display: \"flex\", flexDirection: \"row\", flex: 1, flexWrap: \"wrap\",\n gap: theme.spacing(1), width: \"100%\"\n }\n}));\n\n\n\nconst isUnderage = (birthDateString) => {\n let today = new Date();\n let birthDate = new Date(birthDateString);\n let age = today.getFullYear() - birthDate.getFullYear();\n let m = today.getMonth() - birthDate.getMonth();\n if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) age--;\n return age < 18;\n}\nconst PreEnrolmentPage = (props) => {\n const {t} = useTranslation();\n\n const can_pay_75 = \"Puc pagar la quota trimestral de 75€/estudiant\";\n\n const classes = useStyles();\n\n\n const [recaptcha, setRecaptcha] = React.useState(null);\n function onChange(value) {\n setRecaptcha(value);\n }\n\n const {enqueueSnackbar} = useSnackbar();\n const [skipped, setSkipped] = React.useState(new Set());\n const [availableCourses, setAvailableCourses] = React.useState([]);\n const [filteredCourses, setFilteredCourses] = React.useState([]);\n const [chosenCourses, setChosenCourses] = React.useState([]);\n const [raw_economic_comments, setRawEconomicComments] = React.useState([]);\n const isStepSkipped = (step) => {\n return skipped.has(step);\n };\n\n const [activeStep, setActiveStep] = React.useState(0);\n const steps = [t(\"data_protection\"), t(\"student_info\"), t(\"contact_person_1\"), t(\"contact_person_2\"), t(\"courses\"), t(\"payment\"), t(\"confirmation\")];\n\n const handleSkip = () => {\n if (!isStepOptional(activeStep)) {\n // You probably want to guard against something like this,\n // it should never occur unless someone's actively trying to break something.\n throw new Error(\"You can't skip a step that isn't optional.\");\n }\n\n setActiveStep((prevActiveStep) => prevActiveStep + 1);\n setSkipped((prevSkipped) => {\n const newSkipped = new Set(prevSkipped.values());\n newSkipped.add(activeStep);\n return newSkipped;\n });\n };\n const handleBack = () => {\n setActiveStep((prevActiveStep) => prevActiveStep - 1);\n };\n\n const handleReset = () => {\n setActiveStep(0);\n };\n\n useOnMount(() => {\n i18next.changeLanguage('cat').then(); // set catalan for all visiting families as default\n preEnrolmentService.getCourses()\n .then(...errorHandler({}))\n .then(courses => {\n setAvailableCourses(courses);\n setFilteredCourses(courses);\n })\n });\n\n const theme = useTheme();\n\n\n const [searchTerm, setSearchTerm] = useState('');\n\n const errorHandler = useErrorHandler();\n const required = t(\"required\");\n const formik = useNormik(false,{\n initialValues: {...emptyAttendee,\n __person1__name: '', __person2__name: '',\n__person1__surname1: '',\n __person1__surname2: '',\n __person1__email: '', __person1__phone: '', __person1__relation: '',\n __person1__is_studying: '', __person1__is_working: '', __person1__career: '',\n __person1__education_entity: '', __person1__education_year: '',\n __person2__surname1: '',\n __person2__surname2: '',\n __person2__email: '', __person2__phone: '', __person2__relation: '',\n __person2__is_studying: '', __person2__is_working: '', __person2__career: '',\n __person2__education_entity: '', __person2__education_year: '',\n image_agreement: false\n\n\n },\n validationSchema: yup.object({ // todo translate\n name: yup.string(required).required(required),\n surname1: yup.string(required).required(required),\n surname2: yup.string(required).required(required),\n email: safe_email(t).when('birth_date', (other, schema) => ((other && !isUnderage(other))? schema.required(required): schema)),\n phone: yup.string().when('birth_date', (other, schema) => ((other && !isUnderage(other))? schema.required(required): schema)),\n address: yup.string(required).required(required),\n city: yup.string(required).required(required),\n zip: yup.number(required).required(required),\n country_of_origin: yup.string(required).notOneOf(['empty']).test( // one of the array\n 'countryNonEmpty',\n required,\n v => v !== undefined\n ),\n gender: yup.string(required).required(required),\n is_studying: yup.boolean(required).required(required),\n is_working: yup.boolean(required).required(required),\n career: yup.string(required).when('is_working', {\n is: true,\n then: yup.string().required(required)\n }),\n education_entity: yup.string(required).when('is_studying', {\n is: true,\n then: yup.string().required(required)\n }),\n education_year: yup.string(required).when('is_studying', {\n is: true,\n then: yup.string().required(required)\n }),\n birth_date: yup.date(required).required(required),\n years_in_xamfra: yup.number(required).required(required),\n __person1__name: yup.string(required).test( // one of the array\n 'requiredIfNotSkipped',\n required,\n v => {\n return v !== undefined && v !== \"\" || isStepSkipped(2)\n }\n ),\n __person1__surname1: yup.string(required).test( // one of the array\n 'requiredIfNotSkipped',\n required,\n v => v !== undefined && v !== \"\"|| isStepSkipped(2)\n ),\n __person1__surname2: yup.string(required).test( // one of the array\n 'requiredIfNotSkipped',\n required,\n v => v !== undefined && v !== \"\" || isStepSkipped(2)\n ),\n __person1__email: safe_email(t).test( // one of the array\n 'requiredIfNotSkipped',\n required,\n v =>v !== undefined && v !== \"\"|| isStepSkipped(2)\n ),\n __person1__phone: yup.string(required).test( // one of the array\n 'requiredIfNotSkipped',\n required,\n v =>v !== undefined && v !== \"\" || isStepSkipped(2)\n ),\n __person1__relation: yup.string(required).test( // one of the array\n 'requiredIfNotSkipped',\n required,\n v => v !== undefined && v !== \"\"|| isStepSkipped(2)\n ),\n __person1__is_studying: yup.boolean(required).test( // one of the array\n 'requiredIfNotSkipped',\n required,\n v => v !== undefined && v !== \"\" || isStepSkipped(2)\n ),\n __person1__is_working: yup.boolean(required).test( // one of the array\n 'requiredIfNotSkipped',\n required,\n v => v !== undefined && v !== \"\" || isStepSkipped(2)\n\n ),\n __person1__career: yup.string(required).when('__person1__is_working', {\n is: true,\n then: yup.string().required(required)\n }),\n __person2__name: yup.string(required).test( // one of the array\n 'requiredIfNotSkipped',\n required,\n v =>v !== undefined && v !== \"\" || isStepSkipped(3)\n ),\n __person2__surname1: yup.string(required).test( // one of the array\n 'requiredIfNotSkipped',\n required,\n v => v !== undefined && v !== \"\" || isStepSkipped(3)\n ),\n __person2__surname2: yup.string(required).test( // one of the array\n 'requiredIfNotSkipped',\n required,\n v => v !== undefined && v !== \"\"|| isStepSkipped(3)\n ),\n __person2__email: safe_email(t).test( // one of the array\n 'requiredIfNotSkipped',\n required,\n v => v !== undefined && v !== \"\" || isStepSkipped(3)\n ),\n __person2__phone: yup.string(required).test( // one of the array\n 'requiredIfNotSkipped',\n required,\n v => v !== undefined && v !== \"\"|| isStepSkipped(3)\n ),\n __person2__relation: yup.string(required).test( // one of the array\n 'requiredIfNotSkipped',\n required,\n v =>v !== undefined && v !== \"\"|| isStepSkipped(3)\n ),\n __person2__is_studying: yup.boolean(required).test( // one of the array\n 'requiredIfNotSkipped',\n required,\n v => v !== undefined && v !== \"\" || isStepSkipped(3)\n ),\n __person2__is_working: yup.boolean(required).test( // one of the array\n 'requiredIfNotSkipped',\n required,\n v => v !== undefined && v !== \"\" || isStepSkipped(3)\n ),\n __person2__career: yup.string(required).when('__person2__is_working', {\n is: true,\n then: yup.string().required(required)\n }),\n __person2__education_entity: yup.string(required).when('__person2__is_studying', {\n is: true,\n then: yup.string().required(required)\n }),\n image_agreement: yup.boolean(required)\n }),\n enableReinitialize: true,\n onSubmit: (values, {setStatus, setSubmitting}) => {\n setStatus();\n\n let body = {};\n\n body['image_agreement'] = values.image_agreement;\n body['name'] = values.name;\n body['surname1'] = values.surname1;\n body['surname2'] = values.surname2;\n body['email'] = values.email;\n body['address'] = values.address;\n body['city'] = values.city;\n body['zip'] = values.zip;\n body['dni'] = values.dni;\n body['phone'] = values.phone;\n body['country_of_origin'] = values.country_of_origin;\n body['gender'] = values.gender;\n body['is_studying'] = values.is_studying;\n body['is_working'] = values.is_working;\n body['education_entity'] = values.education_entity;\n body['education_year'] = values.education_year;\n body['career'] = values.career;\n body['birth_date'] = values.birth_date;\n body['years_in_xamfra'] = values.years_in_xamfra;\n body['guardians'] = [];\n [2,3].map(idx => {\n if (!isStepSkipped(idx)){\n let guardian = {};\n const prefix = `__person${idx-1}__`;\n guardian['name'] = values[prefix+\"name\"];\n guardian['surname1'] = values[prefix+\"surname1\"];\n guardian['surname2'] = values[prefix+\"surname2\"];\n guardian['email'] = values[prefix+\"email\"];\n guardian['phone'] = values[prefix+\"phone\"];\n guardian['is_studying'] = values[prefix+\"is_studying\"];\n guardian['is_working'] = values[prefix+\"is_working\"];\n guardian['education_entity'] = values[prefix+\"education_entity\"];\n guardian['career'] = values[prefix+\"career\"];\n guardian['relation'] = values[prefix+\"relation\"];\n\n body['guardians'].push(guardian);\n }\n })\n body['payment_comments'] = raw_economic_comments.join('. ');\n if (raw_economic_comments.includes(can_pay_75)){\n body['price_term'] = 75;\n } else {\n body['price_term'] = null;\n }\n body['other_comments'] = values['other_comments'];\n body['courses'] = chosenCourses.map(x => x.id);\n\n setSubmitting(false);\n\n preEnrolmentService.postPreEnrollment(body, recaptcha)\n .then(...errorHandler({snackbarSuccess: true}))\n .then(() => {\n setActiveStep(steps.length);\n })\n }\n });\n\n useEffect(() => {\n let labels = [];\n if (!isUnderage(formik.values['birth_date']) || formik.values['is_working'] ){\n labels.push(\"adult\");\n }\n if (formik.values['is_studying']){\n labels.push(formik.values['education_year']);\n }\n\n setFilteredCourses(availableCourses.filter(x => labels.some(l => x['labels'].includes(l))));\n\n }, [availableCourses, formik.values['education_year'], formik.values['birth_date']]);\n\n\n const isStepOptional = (step) => {\n return step === 3 || (step === 2 && formik.values['birth_date'] !== '' && !isUnderage(formik.values['birth_date']));\n };\n const fieldsToValidatePerStep = [ // to have coinciding indexes with steps\n [],\n ['birth_date', 'name', 'surname1', 'surname2', 'address', 'city', 'zip', 'gender', 'is_studying', 'is_working', 'education_entity', 'education_year', 'career', 'years_in_xamfra', 'country_of_origin', 'phone', 'email'],\n ['__person1__name', '__person1__surname1', '__person1__surname2', '__person1__email', '__person1__phone', '__person1__phone', '__person1__relation', '__person1__is_studying', '__person1__education_entity', '__person1__education_year', '__person1__is_working', '__person1__career'],\n ['__person2__name', '__person2__surname1', '__person2__surname2', '__person2__email', '__person2__phone', '__person2__phone', '__person2__relation', '__person2__is_studying', '__person2__education_entity', '__person2__education_year', '__person2__is_working', '__person2__career'],\n [], [], ['image_agreement'], []];\n\n const scrollToTop = () => {\n window.scrollTo(0,0);\n }\n\n const handleNext = () => {\n formik.setFieldTouched('');\n\n let newSkipped = skipped;\n if (isStepSkipped(activeStep)) {\n newSkipped = new Set(newSkipped.values());\n newSkipped.delete(activeStep);\n }\n\n setActiveStep((prevActiveStep) => prevActiveStep + 1);\n setSkipped(newSkipped);\n\n scrollToTop();\n };\n\n const secondaryListItemTextForCourse = (course) => {\n const schedules = textSchedulesForCourse(course);\n const description = course['description'];\n if (!description && !schedules) return null;\n if (description && schedules) return description + \" · \" + schedules;\n if (!description) return schedules;\n if (!schedules) return description;\n }\n\n\n const themeCtx = React.useContext(themeContext);\n const canNotGoNext = (activeStep === steps.length - 1)\n || !fieldsToValidatePerStep[activeStep].every(f => (!formik.errors[f]))\n || (activeStep === steps.length - 3 && chosenCourses.length === 0);\n\n const courseToListItem = (course) =>\n {\n if (chosenCourses.includes(course)) {\n setChosenCourses(chosenCourses.filter(x => x.id !== course.id));\n } else {\n setChosenCourses([...chosenCourses, course]);\n }\n }}>\n \n {}}\n inputProps={{ 'aria-label': 'primary checkbox' }}\n />\n \n\n\n \n\n \n ;\n\n\n\n return (\n \n \n \n \n \n \n\n \n
\n \n \n {activeStep === steps.length ? (\n
\n \n Prematrícula completada amb èxit!
\n ¡Prematrícula completada con éxito!
\n Pre-enrolment successful!\n \n \n \n
\n ) : (\n
\n )}\n
\n\n\n\n \n\n\n\n\n );\n\n}\n\nexport default PreEnrolmentPage;","import Tooltip from \"@material-ui/core/Tooltip\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport HomeIcon from \"@material-ui/icons/Home\";\nimport React from \"react\";\nimport {useTranslation} from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nexport default function HomeButton({...props}){\n const {t} = useTranslation();\n let history = useHistory();\n\n return \n history.replace(\"/home\")}>\n \n \n ;\n}","import React, {useEffect, useRef, useState} from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Card from '@material-ui/core/Card';\nimport CardActions from '@material-ui/core/CardActions';\nimport CardContent from '@material-ui/core/CardContent';\nimport Button from '@material-ui/core/Button';\nimport Typography from '@material-ui/core/Typography';\nimport {useTranslation} from \"react-i18next\";\nimport {textSchedulesForCourse} from \"../../utils/localized-weekdays\";\nimport Box from \"@material-ui/core/Box\";\nimport {userContext} from \"../../_context/user-context\";\n\nconst useStyles = makeStyles((theme) => ({\n welcomeMessage: {\n '-webkit-touch-callout': 'none',\n '-webkit-user-select': 'none',\n '-khtml-user-select': 'none',\n '-moz-user-select': 'none',\n '-ms-user-select': 'none',\n 'user-select': 'none'\n}\n}));\n\nexport default function WelcomeTitle({course}) {\n const classes = useStyles();\n const userCtx = React.useContext(userContext);\n const {t} = useTranslation();\n\n const hi = \"😄\";\n const hiii = \"🥰\";\n const [welcomeEmoji, setWelcomeEmoji] = useState(hi);\n const switchWelcomeEmoji = () => {\n setWelcomeEmoji(welcomeEmoji == hi? hiii: hi);\n }\n return (\n \n \n {t(\"hi\")} {userCtx.teacher === undefined? '': userCtx.teacher.name} \n \n setWelcomeEmoji(hiii)} onMouseOut={() => setWelcomeEmoji(hi)}>\n {welcomeEmoji}\n \n \n );\n}","import React from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Card from '@material-ui/core/Card';\nimport CardActions from '@material-ui/core/CardActions';\nimport CardContent from '@material-ui/core/CardContent';\nimport Button from '@material-ui/core/Button';\nimport Typography from '@material-ui/core/Typography';\nimport {useTranslation} from \"react-i18next\";\nimport {textSchedulesForCourse} from \"../../utils/localized-weekdays\";\nimport { useHistory } from \"react-router-dom\";\nimport Skeleton from '@material-ui/lab/Skeleton';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n flexDirection: \"column\"\n },\n title: {\n fontSize: 14,\n },\n pos: {\n marginBottom: 12,\n },\n action: {\n float: \"bottom\"\n },\n flexGrow: {\n flexGrow: 1 \n }\n}));\n\nexport default function CourseCard(props) {\n const classes = useStyles();\n let history = useHistory();\n const { course = null} = props;\n const loading = course === null;\n const {t} = useTranslation();\n\n const courseId = course === null? null: course[\"id\"];\n const handleViewCourse = () => history.replace(`/home/courses?id=${courseId}`);\n const handleTakeAttendance = () => history.replace(`/attendance?id=${courseId}`)\n return (\n \n \n \n {loading? : t(\"course\")}\n \n\n \n {loading? : course[\"name\"]}\n \n\n \n {loading? : textSchedulesForCourse(course)}\n \n \n \n \n \n {loading? :\n }\n {loading? :\n }\n \n \n );\n}","import React from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Chip from '@material-ui/core/Chip';\nimport {useTranslation} from \"react-i18next\";\nimport MoreHorizIcon from '@material-ui/icons/MoreHoriz';\n\nconst useStyles = makeStyles((theme) => ({\n \n }));\n \n export default function MoreButton(props) {\n const classes = useStyles();\n const {t} = useTranslation();\n \n return (\n }\n {...props}\n />\n );\n }","import React, {useEffect, useRef, useState} from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Card from '@material-ui/core/Card';\nimport CardActions from '@material-ui/core/CardActions';\nimport CardContent from '@material-ui/core/CardContent';\nimport Button from '@material-ui/core/Button';\nimport Typography from '@material-ui/core/Typography';\nimport {useTranslation} from \"react-i18next\";\nimport {textSchedulesForCourse} from \"../../utils/localized-weekdays\";\nimport Box from \"@material-ui/core/Box\";\nimport {userContext} from \"../../_context/user-context\";\n\nconst useStyles = makeStyles((theme) => ({\n welcomeMessage: {\n '-webkit-touch-callout': 'none',\n '-webkit-user-select': 'none',\n '-khtml-user-select': 'none',\n '-moz-user-select': 'none',\n '-ms-user-select': 'none',\n 'user-select': 'none'\n}\n}));\n\nexport default function NotATeacherTitle({course}) {\n const classes = useStyles();\n const {t} = useTranslation();\n\n return (\n \n \n 🎓 {t(\"teachers-only-zone\")} 🎓\n \n \n );\n}","import React, {useEffect, useState} from 'react';\nimport * as yup from 'yup';\nimport XamfraHeader from '../_components/xamfra.header.component';\nimport Grid from '@material-ui/core/Grid';\nimport HomeButton from '../_components/home_button';\nimport {useTranslation} from \"react-i18next\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport WelcomeTitle from \"./components/WelcomeTitle\";\nimport Box from \"@material-ui/core/Box\";\nimport {themeContext} from \"../_context/theme-context\";\nimport {useSnackbar} from \"notistack\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport {useNormik} from \"../_helpers/normik\";\nimport ThemeButton from \"../_components/theme_button.component\";\nimport TranslateButton from \"../_components/translate_button.component\";\nimport useTheme from \"@material-ui/core/styles/useTheme\";\nimport CourseCard from \"./components/CourseCard.js\";\nimport TeacherCoursesService from \"../_services/teachers_courses.service\";\nimport {userContext} from \"../_context/user-context\";\nimport MoreButton from \"./components/MoreButton\";\nimport NotATeacherTitle from './components/NotATeacherTitle';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n flexGrow: 1,\n \n },\n rootBase: {\n display: 'flex',\n flexDirection: 'column',\n height: \"100vh\",\n },\n more: {\n width: '100%',\n textAlign: 'center'\n }\n}));\n\nconst TeacherDashboardPage = (props) => {\n const {t} = useTranslation();\n const classes = useStyles();\n const {enqueueSnackbar} = useSnackbar();\n const theme = useTheme();\n\n\n const errorHandler = useErrorHandler();\n \n const formik = useNormik(false,{\n initialValues: {},\n validationSchema: yup.object({}),\n enableReinitialize: true,\n onSubmit: (values, {setStatus, setSubmitting}) => {\n setStatus();\n setSubmitting(false);\n }\n });\n\n const themeCtx = React.useContext(themeContext);\n\n const [courses, setCourses] = useState([]);\n const [maxPage, setMaxPage] = useState(null);\n const [loadedUntilPage, setLoadedUntilPage] = useState(0);\n const [attemptLoadedUntilPage, setAttemptLoadedUntilPage] = useState(1);\n const [attemptingLoad, setAttemptingLoad] = useState(false);\n\n const loading = attemptingLoad && loadedUntilPage == 0;\n\n const incrementPage = (i=1) => {\n if (maxPage === null) return;\n if (loadedUntilPage >= maxPage) return;\n setAttemptLoadedUntilPage(loadedUntilPage+1);\n }\n \n const userCtx = React.useContext(userContext);\n useEffect(() => {\n if (userCtx.teacher === null || userCtx.teacher === undefined) return;\n \n const page = attemptLoadedUntilPage;\n setAttemptingLoad(true);\n TeacherCoursesService.getAll(null, page, null, null, userCtx.teacher.id).then(...errorHandler({})).then(newCourses => {\n setCourses([...courses, ...newCourses[\"data\"]]);\n setMaxPage(newCourses[\"_pagination\"][\"totalPages\"]);\n setLoadedUntilPage(page);\n }).finally(() => setAttemptingLoad(false));\n }, [attemptLoadedUntilPage, userCtx.teacher]);\n\n \n return (\n \n \n \n \n \n \n\n \n {\n (userCtx.teacher === null || userCtx.teacher === undefined) && \n \n }\n\n {\n !(userCtx.teacher === null || userCtx.teacher === undefined) && \n \n \n\n \n \n {\n loading && [1,2,3,4,5,6,7,8,9, 10].map(_ => \n \n )\n }\n {courses.map(course => \n \n \n \n )}\n \n \n \n \n {loadedUntilPage < maxPage && }\n \n \n }\n \n \n );\n}\n\nexport default TeacherDashboardPage;","import Tooltip from \"@material-ui/core/Tooltip\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport Brightness4Icon from \"@material-ui/icons/Brightness4\";\nimport Box from \"@material-ui/core/Box\";\nimport React from \"react\";\nimport {themeContext} from \"../_context/theme-context\";\nimport {useTranslation} from \"react-i18next\";\nimport Typography from \"@material-ui/core/Typography\";\n\nexport default function NotFound({}){\n const themeCtx = React.useContext(themeContext);\n const {t} = useTranslation();\n\n return Nope, not found... 👻;\n}","import serviceFactory from \"./service-factory\";\n\n\nexport default new (serviceFactory('attendances'))();\n\n","import React, {useEffect, useState} from 'react';\nimport {makeStyles} from '@material-ui/core/styles';\nimport {useTranslation} from \"react-i18next\";\nimport {Checkbox, Box, ListItem, ListItemIcon, ListItemText, Tooltip} from \"@material-ui/core\";\nimport Divider from \"@material-ui/core/Divider\";\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 { styled } from \"@material-ui/core/styles\";\nimport InsertCommentIcon from '@material-ui/icons/InsertComment';\nimport {STATUS_ATTENDANCE, STATUS_ABSENT, STATUS_ABSENT_JUSTIFIED} from './status';\nimport IconButton from '@material-ui/core/IconButton';\n\nimport OutlinedInput from \"@material-ui/core/OutlinedInput\";\n\n\nconst useStyles = makeStyles((theme) => ({\n formControl: {\n [theme.breakpoints.down('sm')]: {minWidth: '50%', maxWidth: '50%'},\n [theme.breakpoints.up('sm')]: {minWidth: '25%', maxWidth: '25%'}\n },\n selectStatus: {\n '&:before': {\n borderColor: 'red',\n },\n '&:after': {\n borderColor: 'red',\n }\n },\n root: {\n width: '100%'\n }\n }));\n\nexport default function AttendanceItem({student, attendance, setAttendance, handleOpenCommentBox}) {\n \n const classes = useStyles();\n const labelId = `checkbox-list-label-${student[\"id\"]}`;\n const { t } = useTranslation();\n\n const status = attendance === null? null: attendance[\"status\"];\n const setStatus = (newStatus) => setAttendance({...attendance, status: newStatus});\n \n const handleChange = (event) => {\n setStatus(event.target.value);\n };\n const toggleStatus = () => {\n if (status === STATUS_ATTENDANCE) return setStatus(STATUS_ABSENT);\n setStatus(STATUS_ATTENDANCE);\n }\n\n const useOutlinedInputStyles = makeStyles(theme => ({\n root: {\n \"& $notchedOutline\": {\n borderColor: status === STATUS_ATTENDANCE? theme.palette.neutral.status.success: status === STATUS_ABSENT? theme.palette.neutral.status.error: theme.palette.neutral.status.dirty \n },\n },\n focused: {},\n notchedOutline: {}\n }));\n const outlinedInputClasses = useOutlinedInputStyles();\n\n return (\n \n \n \n \n \n \n \n {\n e.stopPropagation();\n handleOpenCommentBox();\n }}>\n \n \n \n \n \n \n );\n}","export const STATUS_ATTENDANCE = 0;\nexport const STATUS_ABSENT = 1;\nexport const STATUS_ABSENT_JUSTIFIED = 2;\n","import React from 'react';\nimport {useTranslation} from \"react-i18next\";\nimport TextField from '@material-ui/core/TextField';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport {Button} from \"@material-ui/core\";\n\nexport default function CommentDialog({commentBox, setCommentBoxValue, handleCloseCommentBox, commentBoxValue, handleCloseCancelCommentBox}){\n const { t } = useTranslation();\n\n return ;\n}","import React, {useEffect, useState} from 'react';\nimport {makeStyles} from '@material-ui/core/styles';\nimport {useTranslation} from \"react-i18next\";\nimport Fab from \"@material-ui/core/Fab\";\nimport {Checkbox, ListItem, ListItemIcon, Button, ListItemText, Tooltip} from \"@material-ui/core\";\nimport CourseStudentsDataService from \"../../_services/course_students.service\";\nimport {attendanceService} from \"../../_services/course_attendance.service\";\nimport AttendanceService from \"../../_services/attendance.service\";\nimport CloseIcon from '@material-ui/icons/Close';\nimport dataService from \"../../_services/courses.service\";\nimport * as yup from \"yup\";\nimport {useFormik} from \"formik\";\nimport {useErrorHandler} from \"../../_helpers/handle-response\";\nimport EmailTo from \"../../_components/emailTo.component\";\nimport Box from \"@material-ui/core/Box\";\nimport SaveIcon from '@material-ui/icons/Save';\nimport DirtyTextField from \"../../_components/dirtytextfield.component\";\nimport TextField from '@material-ui/core/TextField';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogContentText from '@material-ui/core/DialogContentText';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport List from \"@material-ui/core/List\";\nimport {STATUS_ATTENDANCE, STATUS_ABSENT, STATUS_ABSENT_JUSTIFIED} from './status';\nimport AttendanceItem from './attendance.component.item';\nimport DoneAllIcon from '@material-ui/icons/DoneAll';\nimport EventAvailableIcon from '@material-ui/icons/EventAvailable';\nimport EventBusyIcon from '@material-ui/icons/EventBusy';\nimport CommentDialog from './commentDialog';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n height: '100%',\n [theme.breakpoints.down('sm')]: {paddingBottom: '100px'}\n },\n textBox: {\n width: \"100%\",\n border: \"red\"\n },\n line: {\n width: \"100%\",\n marginTop: theme.spacing(1)\n },\n composite: {\n display: \"flex\", flexDirection: \"row\", flex: 1, flexWrap: \"wrap\",\n gap: theme.spacing(1), width: \"100%\"\n },\n chip: {\n margin: theme.spacing(0.5)\n },\n chips: {\n marginBottom: theme.spacing(1)\n },\n in: {\n marginBottom: theme.spacing(1)\n },fabs: {\n position: 'fixed',\n bottom: theme.spacing(4),\n right: theme.spacing(4),\n },fab: {\n marginLeft: theme.spacing(2),\n }\n}));\n\nfunction areArraysEqualSets(a1, a2) {\n const superSet = {};\n for (const i of a1) {\n const e = i + typeof i;\n superSet[e] = 1;\n }\n\n for (const i of a2) {\n const e = i + typeof i;\n if (!superSet[e]) {\n return false;\n }\n superSet[e] = 2;\n }\n\n for (let e in superSet) {\n if (superSet[e] === 1) {\n return false;\n }\n }\n\n return true;\n}\n\n\nexport default function Attendance({...other}) {\n const classes = useStyles();\n const { t } = useTranslation();\n\n const id = new URLSearchParams(window.location.search).get('id');\n\n const [initialAttendances, setInitialAttendances] = useState(null);\n const [attendances, setAttendances] = useState(null);\n const resetAttendances = () => setAttendances(createEmptyAttendances(students, initialAttendances, date));\n\n\n const getAddedStudentIds = () => {\n const studentsInInitial = Object.keys(initialAttendances);\n return Object.keys(attendances).filter(studentId => !studentsInInitial.includes(studentId) && \n (attendances[studentId]['status'] !== null || attendances[studentId]['comment'] !== null))\n }\n\n const hasNewAttendances = () => {\n const addedStudentIds = getAddedStudentIds();\n if (addedStudentIds.length === 0) return false;\n return true;\n }\n\n const getNewAttendances = () => {\n const addedStudentIds = getAddedStudentIds();\n if (addedStudentIds.length === 0) return null;\n\n const filtered = Object.keys(attendances)\n .filter(key => addedStudentIds.includes(key))\n .reduce((obj, key) => {\n obj[key] = attendances[key];\n return obj;\n }, {});\n return filtered;\n }\n\n const hasChanges = (initial, updated) => {\n console.log(\"iu\", initial, updated);\n if (initial['student_id'] !== updated['student_id']) throw new Error(`student id has changed from ${initial['student_id']} to ${updated['student_id']}`);\n if (initial['course_id'] !== updated['course_id']) throw new Error(`course id has changed from ${initial['course_id']} to ${updated['course_id']}`);\n if (initial['date'] !== updated['date']) return true;\n if (initial['comment'] !== updated['comment']) return true;\n if (initial['status'] !== updated['status']) return true;\n return false;\n }\n\n const hasChangesGlobal = () => {\n if (initialAttendances === null) return false;\n if (attendances === null) return false;\n if (hasNewAttendances()) return true;\n if (hasUpdatedAttendances()) return true;\n return false;\n }\n\n const [dirty, setDirty] = useState(false);\n useEffect(() => {\n setDirty(hasChangesGlobal());\n }, [initialAttendances, attendances]);\n\n const hasUpdatedAttendances = () => Object.keys(initialAttendances).some(key => \n hasChanges(initialAttendances[key], attendances[key]));\n\n const getUpdatedAttendances = () => {\n const filtered = Object.keys(initialAttendances)\n .reduce((obj, key) => {\n if (hasChanges(initialAttendances[key], attendances[key])) obj[key] = attendances[key];\n return obj;\n }, {});\n return filtered;\n }\n\n const [students, setStudents] = useState(null);\n const [courseId, setCourseId] = useState(id);\n const [allDone, setAllDone] = useState(true);\n \n\n useEffect(() => {\n if (attendances === null) return;\n const allDone = !Object.keys(attendances).some(studentId => attendances[studentId]['status'] !== STATUS_ATTENDANCE);\n setAllDone(allDone);\n }, [attendances]);\n\n const createEmptyAttendances = (students, attendances, date) => {\n if (attendances === null) return;\n if (students === null) return;\n \n const newAttendances = {...attendances};\n\n students.forEach(student => {\n const id = student['id'];\n if (attendances[id] === undefined) {\n newAttendances[id] = {\n status: null,\n comment: null,\n course_id: courseId,\n student_id: id,\n date: date\n };\n } \n });\n return newAttendances;\n }\n\n const loadAttendances = () => {\n if (courseId === null) return;\n if (formik.values[\"start\"] === '') return;\n if (students === null) return;\n \n AttendanceService \n .getAll(null, \"*\", null, {\n course_id: courseId,\n date: formik.values[\"start\"]\n }\n )\n .then(...errorHandler({}))\n .then(function (res) {\n const newAttendances = res[\"data\"].reduce((a,x) => ({...a, [x['student_id']]: x}), {});\n setInitialAttendances(newAttendances);\n setAttendances(createEmptyAttendances(students, newAttendances, date));\n });\n }\n\n useEffect(() => {\n if (courseId === null) return;\n CourseStudentsDataService\n .getAll(null, '*', [\"full_name\", \"id\"], {enrolment_status: \"enrolled\"}, courseId)\n .then(...errorHandler({}))\n .then(function (res) {\n setStudents(res[\"data\"]);\n });\n }, [courseId]);\n\n \n const errorHandler = useErrorHandler();\n const today = new Date().toISOString().split(\"T\")[0];\n\nconst formik = useFormik({\n initialValues: {start: today, course_id: id},\n validationSchema: yup.object({}),\n enableReinitialize: true,\n onSubmit: (values, {setStatus, setSubmitting}) => {\n setSubmitting(true);\n }\n });\n const date = formik.values['start'];\n\n useEffect(loadAttendances, [formik.values[\"start\"], courseId, students]);\n\n const markAll = (targetStatus) => {\n const newAttendances = {...attendances};\n Object.keys(newAttendances).map(function(studentId, index) {\n newAttendances[studentId]['status'] = targetStatus;\n });\n setAttendances(newAttendances);\n }\n\n const setAttendance = (studentId, attendance) => {\n const newAttendances = {...attendances};\n newAttendances[studentId] = attendance;\n setAttendances(newAttendances);\n }\n\n const [commentBox, setCommentBox] = useState(false);\n const handleCloseCancelCommentBox = () => {\n setCommentBox(false);\n }\n const handleCloseCommentBox = () => {\n handleCloseCancelCommentBox();\n setAttendance(commentBoxId, {...attendances[commentBoxId], comment: commentBoxValue});\n }\n const handleOpenCommentBox = (studentId) => {\n setCommentBoxValue(attendances[studentId]['comment']);\n setCommentBox(true);\n setCommentBoxId(studentId);\n }\n const [commentBoxValue, setCommentBoxValue] = useState(null);\n const [commentBoxId, setCommentBoxId] = useState(null);\n\n \n\n return (\n \n
\n \n {false &&
{setCourseId(x.id)}}\n name={\"course_id\"}\n label={t(\"courses\")}\n />}\n \n {t(\"attendance\")}
\n \n \n \n \n \n \n {students && \n \n {attendances && students && students.map((student) => setAttendance(student['id'], x)}\n handleOpenCommentBox={() => handleOpenCommentBox(student['id'])}\n attendance={attendances[student['id']] ?? null} \n />)}\n
}\n \n \n {\n markAll(allDone? STATUS_ABSENT: STATUS_ATTENDANCE);\n }} disabled={formik.isSubmitting}>\n {allDone? : }\n \n \n \n \n \n \n \n \n {\n let promises = [];\n\n const newAttendances = getNewAttendances();\n if (newAttendances !== null) {\n Object.keys(newAttendances).forEach(studentId => {\n const attendance = newAttendances[studentId];\n promises.push(AttendanceService.post(attendance))\n })\n }\n \n\n const updatedAttendances = getUpdatedAttendances();\n if (updatedAttendances !== null) {\n Object.keys(updatedAttendances).forEach(studentId => {\n const attendance = updatedAttendances[studentId];\n const initialAttendance = initialAttendances[studentId];\n promises.push(AttendanceService\n .patch({\n id:initialAttendance['id'], \n body:attendance, \n initial_values:initialAttendance\n }));\n })\n }\n\n Promise.all(promises)\n .then(...errorHandler({}))\n .then(function (res) {\n loadAttendances();\n })\n }} disabled={formik.isSubmitting || !dirty}>\n \n \n \n
\n\n \n );\n}\n","import React, {useEffect, useState} from 'react';\nimport XamfraHeader from '../_components/xamfra.header.component';\nimport HomeButton from '../_components/home_button';\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport Box from \"@material-ui/core/Box\";\nimport ThemeButton from \"../_components/theme_button.component\";\nimport TranslateButton from \"../_components/translate_button.component\";\nimport Attendance from \"./components/attendance.component\";\nimport TeacherDashboardButton from '../_components/teacher_dashboard_button';\n\nconst useStyles = makeStyles((theme) => ({\n list: {\n flexGrow: 4\n },\n listCard: {\n height: '100%'\n },\n header: {\n },\n rootBase: {\n display: 'flex',\n flexDirection: 'column',\n height: \"100vh\",\n minHeight: 0,\n alignItems: 'stretch'\n },\n more: {\n width: '100%',\n textAlign: 'center'\n }\n}));\n\nconst AttendancePage = (props) => {\n const classes = useStyles();\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default AttendancePage;","import React, {useState} from 'react';\nimport CssBaseline from '@material-ui/core/CssBaseline';\nimport {createMuiTheme} from '@material-ui/core/styles';\nimport {ThemeProvider} from '@material-ui/styles';\nimport {darkTheme, lightTheme} from '../theme';\nimport {SnackbarProvider} from 'notistack';\nimport {confirmContext} from '../_context/confirm-context';\nimport PrivateRoute from '../_components/PrivateRoute';\nimport HomePage from '../HomePage/HomePage';\nimport LoginPage from '../LoginPage/LoginPage';\nimport {BrowserRouter, Route, Router, Switch} from 'react-router-dom';\nimport {userContext} from '../_context/user-context';\nimport {themeContext} from '../_context/theme-context';\nimport SignupPage from \"../SignupPage/SignupPage\";\nimport ResetPage from \"../ResetPage/ResetPage\";\nimport PreEnrolmentPage from \"../PreEnrolmentPage/PreEnrolmentPage\";\nimport TeacherDashboardPage from \"../TeacherDashboardPage/TeacherDashboardPage\";\nimport NotFound from \"../_components/not_found\";\nimport AttendancePage from '../AttendancePage/AttendancePage';\nimport {useTranslation} from \"react-i18next\";\nimport {\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle\n} from \"@material-ui/core\";\nimport Button from \"@material-ui/core/Button\";\nimport DialogContentText from \"@material-ui/core/DialogContentText\";\n\nfunction App() {\n const [theme, setTheme] = useState(localStorage.getItem(\"darkTheme\") === \"true\");\n const appliedTheme = createMuiTheme(theme ? darkTheme : lightTheme);\n\n\n const [user, setUser] = useState({logged: false, ping: true});\n const [needs, _setNeeds] = useState([]);\n const setNeeds = (needs) => {\n if (!Array.isArray(needs)) return _setNeeds([]);\n return _setNeeds(needs);\n }\n const [teacher, setTeacher] = useState(null);\n const routerRef = React.createRef();\n\n const [confirmDialog, setConfirmDialog] = React.useState({\n open: false,\n title: null,\n subtitle: null,\n success: () => {},\n cancel: () => {},\n args: []\n });\n const confirm = (title, subtitle, successCallable, cancelCallable=null, args=[]) => {\n setConfirmDialog(\n {\n open: true,\n title: title,\n subtitle: subtitle,\n success: successCallable,\n cancel: cancelCallable === null? () => {}: cancelCallable,\n args: args\n }\n );\n }\n const handleCloseConfirm = () => {\n setConfirmDialog({...confirmDialog, open: false});\n }\n const { t } = useTranslation();\n\n\n return (\n \n \n \n \n {\n localStorage.setItem(\"darkTheme\", (!theme).toString());\n setTheme(!theme);\n }, label: theme? \"dark\": \"light\"}}>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default App\n","const reportWebVitals = onPerfEntry => {\n if (onPerfEntry && onPerfEntry instanceof Function) {\n import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\n getCLS(onPerfEntry);\n getFID(onPerfEntry);\n getFCP(onPerfEntry);\n getLCP(onPerfEntry);\n getTTFB(onPerfEntry);\n });\n }\n};\n\nexport default reportWebVitals;\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport App from './App/App';\nimport reportWebVitals from './reportWebVitals';\nimport {Helmet} from 'react-helmet';\nimport \"./i18nextConf\";\n\nReactDOM.render(\n \n \n centrífuga4\n \n \n \n \n \n \n ,\n document.getElementById('root')\n);\n\n// If you want to start measuring performance in your app, pass a function\n// to log results (for example: reportWebVitals(console.log))\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\nreportWebVitals();\n"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"sources":["theme.js","_context/confirm-context.js","_context/user-context.js","_components/PrivateRoute.js","_helpers/auth-header.js","config.js","_services/service-factory.js","_services/students.service.js","_skeletons/iconButton.js","_components/dirtytextfield.component.js","_data/countries.js","_components/contry-select.component.js","_helpers/handle-response.js","_helpers/normik.js","_data/education.js","_components/formik_discard_button.js","_helpers/needs.js","_components/formik_save_button.js","_data/password_regex.js","_yup/validators.js","_components/students.student.person.component.js","_services/guardians.service.js","_services/payments.service.js","_data/payment_methods.js","_data/empty_objects.js","_context/loading-context.js","_components/students.student.attendee.component.js","_services/emailsGrants.service.js","_services/emailsEnrollment.service.js","_services/student_guardians.service.js","_data/relations.js","_components/students.student.guardian.component.js","_components/students.student.payments.payment.component.js","_services/emailsReceipts.service.js","_components/students.student.payments.component.js","_services/schedules.service.js","_context/tab-context.js","_components/scheduler.component.js","_components/students.student.schedule.component.js","_services/student_courses.service.js","_services/courses.service.js","_components/searchbar.component.js","_context/theme-context.js","_components/ExportSearchChip.component.js","_components/items_list.component.js","_components/items_list_secondary.component.js","_components/items_list_terciary.component.js","_components/subresource_add_delete.component.js","_components/tab.js","_components/students.student.component.js","_components/items_list_main.component.js","_components/students.component.js","_components/user.role-select.component.js","_services/userInvites.service.js","_services/users.service.js","_services/teachers.service.js","_components/users.user.userperson.component.js","_services/user_needs.service.js","_components/dirty_checkbox.js","_helpers/set_operations.js","_components/users.user.permissions.component.js","_components/users.user.component.js","_components/users.component.js","_components/payments.component.js","_services/rooms.service.js","_components/rooms.room.schedule.component.js","_components/rooms.room.details.component.js","_components/rooms.room.component.js","_components/rooms.component.js","_services/teachers_courses.service.js","_services/calendar.service.js","_components/teachers.teacher.details.component.js","_components/teachers.teacher.schedule.component.js","_components/teachers.teacher.component.js","_components/teachers.component.js","_services/course_rooms.service.js","_services/course_students.service.js","_services/course_teachers.service.js","_components/courses.course.details.component.js","_data/price_term.js","_services/course_labels.service.js","_components/labels_selection.component.js","_components/courses.course.labels.component.js","_components/courses.course.schedule.component.js","_components/courses.course.component.js","_components/courses.component.js","_services/bulkEmail.service.js","_components/emailTo.component.js","_components/email.component.js","HomePage/routes.js","_services/god.service.js","_services/auth.service.js","i18nextConf.js","_translations/utils.js","_components/translate_button.component.js","_components/theme_button.component.js","_components/teacher_dashboard_button.js","_components/toolbar.home.component.js","HomePage/HomePage.js","_services/password-reset.service.js","_helpers/on-mount.js","LoginPage/LoginPage.js","_services/signup.service.js","SignupPage/SignupPage.js","ResetPage/ResetPage.js","_components/xamfra.logo.component.js","_services/pre-enrolment.service.js","utils/localized-weekdays.js","_components/xamfra.header.component.js","PreEnrolmentPage/PreEnrolmentPage.js","_components/home_button.js","TeacherDashboardPage/components/WelcomeTitle.js","TeacherDashboardPage/components/CourseCard.js","TeacherDashboardPage/components/MoreButton.js","TeacherDashboardPage/components/NotATeacherTitle.js","TeacherDashboardPage/TeacherDashboardPage.js","_components/not_found.js","_services/attendance.service.js","AttendancePage/components/attendance.component.item.js","AttendancePage/components/status.js","AttendancePage/components/commentDialog.js","AttendancePage/components/attendance.component.js","AttendancePage/AttendancePage.js","App/App.js","reportWebVitals.js","index.js"],"names":["lightTheme","createMuiTheme","palette","type","primary","main","light","dark","contrastText","emphasisText","high","medium","low","secondary","neutral","status","dirty","success","error","darkTheme","confirmContext","React","createContext","confirm","title","subtitle","successCallable","userContext","user","setUser","needs","setNeeds","teacher","setTeacher","PrivateRoute","Component","component","rest","userCtx","useContext","render","props","to","pathname","state","from","location","authHeader","Cookies","get","API_VERSION","process","BACKEND_URL","RECAPTCHA","PUBLIC_URL","CHECK_NEEDS","REACT_CHECK_NEEDS","axios","require","serviceFactory","resource","subresource","serviceName","baseUrl","apiVersion","url","likeSearchText","page","include","filters","parent_id","Promise","resolve","reject","myFilters","JSON","stringify","name","value","Object","keys","forEach","key","method","params","headers","then","response","data","catch","err","id","ids","length","getOne","join","res","body","initial_values","dirtyBody","reduce","filtered","subresourcId","subresourceid","subresourceId","all","map","delete","searchtermfield","searchterm","responseType","filename","split","window","URL","createObjectURL","Blob","link","document","createElement","href","setAttribute","appendChild","click","remove","IconButtonSkeleton","Skeleton","variant","IconButton","useStyles","makeStyles","theme","createStyles","root","color","borderBottomColor","DirtyTextField","formik","noDirty","values","initialValues","classes","formikProps","undefined","onChange","handleChange","onBlur","handleBlur","errors","helperText","touched","TextField","className","InputLabelProps","shrink","countries","code","label","phone","suggested","textField","borderColor","option","fontSize","marginRight","DirtyCountrySelect","style","width","getInitialOption","find","x","useState","_setOption","useEffect","inputValue","setInputValue","t","useTranslation","Autocomplete","options","autoHighlight","getOptionLabel","getOptionSelected","o","event","newValue","newOption","setFieldValue","setOption","onInputChange","newInputValue","renderOption","Fragment","isoCode","String","fromCodePoint","toUpperCase","replace","char","charCodeAt","renderInput","inputProps","autoComplete","useErrorHandler","useSnackbar","enqueueSnackbar","closeSnackbar","successHandlerFactory","snackbarSuccess","successHandler","failureHandler401","logged","ping","failureHandler403","failureHandler","handle401","handle403","handle400","errorOut","reportUnexpected","handler","showSnackbar","message","autoHideDuration","action","src","alt","height","Button","onClick","navigator","clipboard","writeText","platform","userAgent","appVersion","vendor","r","alert","request","text","parse","failureHandlerUnexpected","failureHandlerFactory","useNormik","onlyChangedValuesOnSubmit","allowArrays","originalInitialValues","nullSafeInitialValues","entries","oldOnSubmit","onSubmit","nullSafeOnSubmit","actions","normalizedValues","normalizedValue","Array","isArray","useFormik","education_years","DiscardButton","handleReset","disabled","isSubmitting","Tooltip","NEEDS","patch","post","send_email","invite_users","students","courses","guardians","payments","rooms","schedules","teachers","users","paymentReceipts","attendance","useNeeds","every","need","includes","SaveButton","hasNeeds","longer_8","shorter_64","has_lowercase","has_uppercase","has_digit","has_special","no_plus","safe_password","RegExp","source","yup","required","matches","safe_password_repetition","oneOf","safe_username_email","email","safe_username_email_required","safe_username_required","safe_email_required","safe_email","one_of","test","toString","v","line","marginTop","spacing","composite","display","flexDirection","flex","flexWrap","gap","actionIcon","float","Person","elements","currentPerson","dataService","patchService","newPerson","updateCurrentPerson","updateCurrentStudent","additionalFields","additionalValidation","onUpdate","studentId","loading","errorHandler","validationSchema","is_studying","is_working","career","when","is","education_entity","education_year","enableReinitialize","changedValues","setStatus","setSubmitting","new_id","finally","patched_body","resetForm","Box","clear","idx","py","handleSubmit","my","Divider","select","MenuItem","level","idx2","cloneElement","payment_methods","surname1","surname2","address","city","zip","dni","gender","country_of_origin","emptyGuardian","relation","emptyAttendee","price_term","payment_comments","birth_date","other_comments","image_agreement","enrolment_status","default_payment_method","loadingContext","startLoading","stopLoading","button","margin","Attendee","children","setNewStudent","addStudentId","newStudent","currentStudent","deleteStudent","addNewGuardian","loadingCtx","sendGrantLetter","sendEnrollmentAgreement","p","px","e","StudentsDataService","PaymentsDataService","deleteMany","GuardiansDataService","deleteFullStudent","changedBody","InputProps","endAdornment","InputAdornment","position","multiline","rowsMax","s","startIcon","downloadSubresource","student_guardian_relations","Guardian","guardianId","deleteGuardianId","addGuardianId","deleteNewGuardian","newGuardian","guardian","setGuardian","StudentGuardianDataService","postWithId","maxWidth","backgroundColor","expand","transform","marginLeft","transition","transitions","create","duration","shortest","expandOpen","avatar","PaymentCard","payment","updatePayment","deletePayment","newPayment","addPaymentId","student_id","expanded","setExpanded","sendReceipt","sendReceiptEmail","quantity","date","Card","CardHeader","Avatar","subheader","CardActions","disableSpacing","clsx","Collapse","in","timeout","unmountOnExit","CardContent","DialogActions","getDefaultValues","Date","dd","getDate","mm","getMonth","yyyy","getFullYear","newLine","Payments","paymentIds","deletePaymentFromStudent","setPayments","newPaymentCard","setNewPaymentCard","getMany","sort","p1","p2","localeCompare","_","Typography","tabContext","currentTab","goTo","eventFromSchedule","schedule","daysOfWeek","groupId","startTime","endTime","textColor","extendedProps","evaluate","expression","console","log","args","Scheduler","snapDuration","allowView","viewUrl","allowDelete","selectable","scheduleIds","viewStudent","deleteCustom","setScheduleIds","onEventSelected","onEventClick","onEventChange","editable","useTheme","calendarRef","createRef","StyleWrapper","styled","div","setSchedules","SchedulesDataService","withScheduleInfo","info","getDay","toLocaleTimeString","hour12","open","currentSchedule","setCurrentSchedule","handleClose","minHeight","Dialog","onClose","DialogTitle","filter","plugins","timeGridPlugin","interactionPlugin","initialView","firstDay","ref","buttonText","prev","next","prevYear","nextYear","today","month","week","day","selectMirror","dayMaxEvents","weekends","events","eventAdd","eventChange","clickInfo","eventRemove","selectInfo","view","calendar","unselect","start","end","eventContent","eventClick","handleClickOpen","eventTimeFormat","hour","minute","eventResize","eventDrop","Schedule","padding","alignItems","input","iconButton","SearchBar","searchTitle","onSearch","Paper","InputBase","placeholder","onKeyPress","preventDefault","themeContext","switchTheme","ExportSearchChip","searchTermField","searchTerm","exportAll","getFilters","Chip","size","downloadCsv","overflow","list","searchAndFilters","pagination","chip","selectedAvatar","chips","heading","typography","pxToRem","fontWeight","fontWeightRegular","noResults","textAlign","ItemsList","setCurrentItemId","auxFields","displayText","onItemClick","secondaryDisplayNameField","secondaryAction","secondaryActionNeeds","secondaryActionTooltip","secondaryActionIcon","secondaryActionCallable","withAvatar","withFiltersBox","currentItemId","items","setItems","displayNameField","usableFilters","defaultSearchBy","searchByOptions","searchBarLabel","exportPage","exportAllPages","setSearchTerm","f","initialValue","setFilters","searchBy","setSearchBy","setPage","count","setCount","fromEntries","search","getAll","Set","target","Accordion","AccordionSummary","expandIcon","AccordionDetails","tooltip","Pagination","showFirstButton","showLastButton","siblingCount","boundaryCount","List","item","ListItem","ListItemAvatar","charAt","ListItemText","ListItemSecondaryAction","edge","ItemsListSecondary","deleteTooltip","delete_message","onItemDeleted","ItemsListTerciary","dataServiceSR","add_message","onAdded","newItem","Transition","forwardRef","Slide","direction","box","appBar","AddDeleteSubresource","parentItemDataService","itemDataService","add_message_confirm","resourceName","onSubresourceAdded","onSubresourceDeleted","addDialogOpen","setAddDialogOpen","handleAddDialogClose","fullScreen","TransitionComponent","AppBar","Toolbar","autoFocus","m","a11yProps","index","TabFrame","other","role","hidden","contentPanel","boxSizing","content","overflowX","overflowY","tab","Student","currentStudentId","student","setStudent","setNewGuardian","setValue","elevation","square","Tabs","indicatorColor","scrollButtons","Tab","contact","axis","containerStyle","onChangeIndex","dir","is_base","course_id","day_week","start_time","end_time","newEvent","calendarApi","addEvent","revert","payment_id","StudentsCourseDataService","CoursesDataService","gId","ItemsListMain","downloadOneCsv","left","fab","bottom","right","RoleSelect","invitationsService","inviteUser","userEmail","user_email","role_id","UserPerson","nullable","UsersDataService","TeachersDataService","setFieldTouched","deleteFullUser","DirtyCheckbox","Checkbox","checked","symmetricDifference","setA","setB","_difference","elem","has","add","User","currentUserId","deleteUser","root2","formControl","maxHeight","minWidth","dialog","RoomSchedule","RoomDetails","setNewRoom","newRoom","RoomsDataService","Room","currentRoomId","deleteRoom","addRoomId","room","setRoom","downloadCalendar","resource_id","calendar_id","TeacherDetails","TeacherSchedule","setSchedulesIds","Teacher","currentTeacherId","setNewTeacher","newTeacher","addTeacherId","deleteTeacher","TeachersCoursesDataService","c","choose","marginBottom","CourseDetails","addCourseId","setNewCourse","newCourse","currentCourse","updateCurrentCourse","deleteCourse","history","useHistory","openDownloadAttendanceList","setOpenDownloadAttendanceList","is_published","formik2","startDate","endDate","DialogContent","id_","deleteFullCourse","LabelsSelection","FormControlLabel","control","CourseLabels","a","b","difference","jobs","CourseLabelsDataService","labels","CourseSchedule","Course","currentCourseId","course","setCourse","CourseStudentsDataService","defaultValue","CourseTeachersDataService","CourseRoomsDataService","bulkEmailService","bulkSend","courseIds","subject","emailPreference","studentEnrolmentStatus","files","FormData","append","EmailTo","addTo","fullWidth","textBox","border","attach","card","Routes","path","setStudents","setCurrentStudentId","handleError","URLSearchParams","Grid","container","xs","Fab","icon","PersonIcon","setCourses","setCurrentCourseId","ClassIcon","setTeachers","setCurrentTeacherId","SchoolIcon","setRooms","setCurrentRoomId","RoomIcon","AccountBalanceIcon","setUsers","setCurrentUserId","setOpen","userId","ContactMailIcon","groups","setGroups","setTo","selectedFiles","setSelectedFiles","g","rows","selectedFile","titleTypographyProps","multiple","htmlFor","EmailIcon","authenticationService","login","username","password","totp","rememberMe","auth","logout","isLoggedIn","fallbackLng","resources","eng","translation","translationEN","cat","translationCAT","i18n","use","Backend","LanguageDetector","initReactI18next","init","detection","checkWhitelist","debug","whitelist","interpolation","escapeValue","getCurrentLanguage","localStorage","getItem","TranslateButton","selectedLanguage","i18next","changeLanguage","ThemeButton","themeCtx","TeacherDashboardButton","languageMap","active","toolbar","justifyContent","mixins","grow","flexGrow","withRouter","selected","anchorEl","setAnchorEl","isMenuOpen","Boolean","handleMenuClose","anchorElLan","setAnchorElLan","isLanguageMenuOpen","handleLanguageMenuClose","languageMenu","anchorOrigin","vertical","horizontal","keepMounted","transformOrigin","language","userMenuId","userMenu","handleDrawerOpen","menuButton","hide","noWrap","currentTarget","drawerWidth","zIndex","drawer","easing","sharp","leavingScreen","background","appBarShift","enteringScreen","flexShrink","whiteSpace","drawerOpen","drawerClose","breakpoints","up","backdrop","flexFlow","selectedIcon","HomePage","baseRouter","currentRoute","useRouteMatch","useLocation","handleDrawerClose","setLoading","routerRef","CssBaseline","Provider","changeTheme","Drawer","paper","route","prop","Link","ListItemIcon","exact","Backdrop","CircularProgress","passwordResetService","reset","token","recaptcha","startReset","useOnMount","field","details","verticalAlign","down","cursor","md","remember","LoginPage","mobile","useMediaQuery","setRecaptcha","showRecaptcha","setShowRecaptcha","setLogged","push","val","Number","align","justify","resetPa","sitekey","signup","SignupPage","step","setStep","totpUri","setTotpUri","query","password2","signupService","result","isValid","ResetPage","XamfraLogo","mx","preEnrolmentService","getCourses","postPreEnrollment","getLocalisedWeekday","dayOfWeek","resultDate","getTime","setDate","getNextDayOfWeek","toLocaleString","weekday","textSchedulesForCourse","slice","XamfraHeader","cards","buttons","bullet","pos","isUnderage","birthDateString","birthDate","age","PreEnrolmentPage","can_pay_75","skipped","setSkipped","availableCourses","setAvailableCourses","filteredCourses","setFilteredCourses","chosenCourses","setChosenCourses","raw_economic_comments","setRawEconomicComments","isStepSkipped","activeStep","setActiveStep","steps","handleSkip","isStepOptional","Error","prevActiveStep","prevSkipped","newSkipped","__person1__name","__person2__name","__person1__surname1","__person1__surname2","__person1__email","__person1__phone","__person1__relation","__person1__is_studying","__person1__is_working","__person1__career","__person1__education_entity","__person1__education_year","__person2__surname1","__person2__surname2","__person2__email","__person2__phone","__person2__relation","__person2__is_studying","__person2__is_working","__person2__career","__person2__education_entity","__person2__education_year","schema","notOneOf","years_in_xamfra","prefix","some","l","fieldsToValidatePerStep","secondaryListItemTextForCourse","description","canNotGoNext","courseToListItem","disableRipple","tabIndex","autocomplete","defaultChecked","BottomNavigation","showLabels","MobileStepper","nextButton","scrollTo","backButton","HomeButton","welcomeMessage","WelcomeTitle","hi","welcomeEmoji","setWelcomeEmoji","onMouseOver","onMouseOut","CourseCard","courseId","gutterBottom","MoreButton","clickable","NotATeacherTitle","rootBase","more","TeacherDashboardPage","maxPage","setMaxPage","loadedUntilPage","setLoadedUntilPage","attemptLoadedUntilPage","setAttemptLoadedUntilPage","attemptingLoad","setAttemptingLoad","TeacherCoursesService","newCourses","sm","NotFound","selectStatus","AttendanceItem","setAttendance","handleOpenCommentBox","labelId","newStatus","outlinedInputClasses","focused","notchedOutline","useOutlinedInputStyles","dense","FormControl","Select","stopPropagation","OutlinedInput","CommentDialog","commentBox","setCommentBoxValue","handleCloseCommentBox","commentBoxValue","handleCloseCancelCommentBox","paddingBottom","fabs","Attendance","initialAttendances","setInitialAttendances","attendances","setAttendances","getAddedStudentIds","studentsInInitial","hasChanges","initial","updated","hasChangesGlobal","hasUpdatedAttendances","setDirty","allDone","setAllDone","createEmptyAttendances","newAttendances","comment","loadAttendances","AttendanceService","toISOString","setCommentBox","commentBoxId","setCommentBoxId","targetStatus","markAll","promises","addedStudentIds","obj","getNewAttendances","updatedAttendances","initialAttendance","listCard","header","AttendancePage","App","setTheme","appliedTheme","_setNeeds","cancel","confirmDialog","setConfirmDialog","handleCloseConfirm","ThemeProvider","maxSnack","setItem","cancelCallable","basename","DialogContentText","reportWebVitals","onPerfEntry","Function","getCLS","getFID","getFCP","getLCP","getTTFB","ReactDOM","StrictMode","Helmet","nonce","rel","getElementById"],"mappings":"g3mCAEaA,EAAaC,YAAe,CACvCC,QAAS,CACPC,KAAM,QACNC,QAAS,CACPC,KAAM,UACNC,MAAO,UACPC,KAAM,UACNC,aAAc,UACdC,aAAc,CACZC,KAAM,YACNC,OAAQ,YACRC,IAAK,cAGTC,UAAW,CACTR,KAAM,UACNC,MAAO,UACPC,KAAM,UACNC,aAAc,UACdC,aAAc,CACZC,KAAM,YACNC,OAAQ,YACRC,IAAK,cAITE,QAAS,CACPT,KAAM,U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AD,WACA,cAAC7O,GAAA,EAAD,CAAQsd,WAAS,EAACrd,QAAS,WACvBo+B,EAAcD,OAAd,MAAAC,EAAa,YAAWA,EAAcltB,OACtCotB,KACDrkC,MAAM,UAHT,SAIK0C,EAAE,YAEP,cAACoD,GAAA,EAAD,CAAQC,QAAS,WACbo+B,EAAcxrC,QAAd,MAAAwrC,EAAa,YAAYA,EAAcltB,OACvCotB,KACDrkC,MAAM,UAAUojB,WAAS,EAH5B,SAIK1gB,EAAE,iCCjHpBkiC,GAZS,SAAAC,GAClBA,GAAeA,aAAuBC,UACxC,8BAAqB9nC,MAAK,YAAkD,IAA/C+nC,EAA8C,EAA9CA,OAAQC,EAAsC,EAAtCA,OAAQC,EAA8B,EAA9BA,OAAQC,EAAsB,EAAtBA,OAAQC,EAAc,EAAdA,QAC3DJ,EAAOF,GACPG,EAAOH,GACPI,EAAOJ,GACPK,EAAOL,GACPM,EAAQN,O,UCCdO,IAASlrC,OACP,eAAC,IAAMmrC,WAAP,WACI,eAACC,GAAA,EAAD,WACI,mDACM,sBAAMpmC,KAAI,UAAKrE,wBAAL,OAChB,sBAAM0qC,MAAM,kBAAkBC,IAAI,aAAatmC,KAAK,gFACpD,sBAAMqmC,MAAM,kBAAkBC,IAAI,aAAatmC,KAAK,4DACpD,sBACI3C,KAAK,WACLunB,QAAQ,4DAEhB,cAAC,GAAD,OAEJ9kB,SAASymC,eAAe,SAM1Bb,O","file":"static/js/main.e85fb0f1.chunk.js","sourcesContent":["import {createMuiTheme} from \"@material-ui/core/styles\";\n\nexport const lightTheme = createMuiTheme({\n palette: {\n type: 'light',\n primary: {\n main: '#e98300',\n light: '#ffb342',\n dark: '#b05500',\n contrastText: '#000000', // todo deprecate\n emphasisText: {\n high: '#000000DF',\n medium: '#00000098',\n low: '#0000005E',\n },\n },\n secondary: {\n main: '#934d98',\n light: '#c57bc9',\n dark: '#63206a',\n contrastText: '#000000', // todo deprecate\n emphasisText: {\n high: '#000000DF',\n medium: '#00000098',\n low: '#0000005E',\n },\n\n },\n neutral: {\n main: '#ffffff',\n contrastText: '#000000',\n emphasisText: {\n high: '#000000DF',\n medium: '#00000098',\n low: '#0000005E',\n },\n status: {\n dirty: '#fbc02d',\n success: '#43a047',\n error: '#ff5252'\n }\n }\n }\n})\n\nexport const darkTheme = createMuiTheme({\n palette: {\n type: 'dark',\n primary: {\n main: '#934d98',\n light: '#c57bc9',\n dark: '#63206a',\n contrastText: '#000000', // todo deprecate\n emphasisText: {\n high: '#000000DF',\n medium: '#00000098',\n low: '#0000005E',\n },\n },\n secondary: {\n main: '#ffcc80',\n light: '#ffffb0',\n dark: '#ca9b52',\n contrastText: '#000000', // todo deprecate\n emphasisText: {\n high: '#000000DF',\n medium: '#00000098',\n low: '#0000005E',\n },\n },\n neutral: {\n main: '#1f1f1f',\n contrastText: '#ffffff', // todo deprecate\n emphasisText: {\n high: '#ffffffDF',\n medium: '#ffffff98',\n low: '#ffffff5E',\n },\n status: {\n dirty: '#ffcf3d',\n success: '#c0e882',\n error: '#ff5252'\n }\n }\n }\n})\n","import React from \"react\";\n\nconst confirmContext = React.createContext(\n {confirm: (title, subtitle, successCallable, cancelCallable=null) => {}}); // Create a context object\n\nexport {\n confirmContext // Export it so it can be used by other Components\n};","import React from \"react\";\n\nconst userContext = React.createContext({\n user: null, \n setUser: () => {}, \n needs: [], \n setNeeds: () => {},\n teacher: [],\n setTeacher: () => {}\n}); // Create a context object\n\nexport {\n userContext // Export it so it can be used by other Components\n};","import {Redirect, Route} from 'react-router-dom';\nimport React from \"react\";\nimport {userContext} from '../_context/user-context';\n\nfunction PrivateRoute({ component: Component, ...rest }) {\n const userCtx = React.useContext(userContext);\n return (\n \n {\n if (!userCtx[\"user\"][\"logged\"]) {\n // not logged in so redirect to login page with the return url\n return \n }\n\n // authorised so return component\n return \n }}/>\n );\n}\n\n\nexport default PrivateRoute;","import Cookies from 'js-cookie';\n\nexport function authHeader() {\n // return authorization header with jwt token\n return { 'X-CSRFToken': Cookies.get('X-CSRF-TOKEN')};\n}","export const API_VERSION = process.env.REACT_APP_API_VERSION;\nexport const BACKEND_URL = process.env.REACT_APP_BACKEND_URL;\nexport const RECAPTCHA = process.env.REACT_APP_RECAPTCHA;\nexport const PUBLIC_URL = process.env.PUBLIC_URL;\nexport const CHECK_NEEDS = process.env.REACT_CHECK_NEEDS === \"true\";\nexport const DOCS_URL = process.env.REACT_APP_DOCS_URL;","import {authHeader} from \"../_helpers/auth-header\";\nimport {API_VERSION, BACKEND_URL} from \"../config\";\n\nconst axios = require('axios'); // todo default headers\n\nexport default function serviceFactory(resource, subresource=null, serviceName=null, baseUrl=null, apiVersion=null){ // todo subresource for all methods?\n \n baseUrl = baseUrl === null? BACKEND_URL: baseUrl;\n serviceName = serviceName === null? 'api': serviceName;\n apiVersion = apiVersion === null? API_VERSION: apiVersion;\n const url = `${baseUrl}/${serviceName}/${apiVersion}`;\n\n return class {\n \n\n getAll(likeSearchText=null, page = 1, include=null, filters=null, parent_id=null) {\n return new Promise(function (resolve, reject) {\n\n let myFilters = {\n \"page\": page,\n \"include\": include === null? null: JSON.stringify(include)\n };\n if (likeSearchText !== null) {\n myFilters[`filter.${likeSearchText.name}.match`] = likeSearchText.value;\n }\n\n if (filters !== null) {\n Object.keys(filters).forEach((key) => {\n myFilters[`filter.${key}.eq`] = filters[key];\n })\n }\n \n axios({\n method: 'get',\n url: `${url}/${resource}${subresource===null? '': `/${parent_id}/${subresource}`}`,\n params: myFilters,\n headers: {\n ...{\n 'Content-Type': 'application/json',\n 'Cache-Control': 'no-cache'\n }, ...authHeader() // todo are auth headers needed for gets?\n }\n }).then(function (response) {\n resolve(response.data);\n }).catch(function (err) {\n reject(err);\n });\n });\n }\n\n getOne(id, include=null, expect_batch=false) {\n return new Promise(function (resolve, reject) {\n axios({\n method: 'get',\n url: `${url}/${resource}/${id}`,\n params: {\n \"include\": include === null? null: JSON.stringify(include)\n },\n headers: {\n ...{\n 'Content-Type': 'application/json',\n 'Cache-Control': 'no-cache'\n }, ...authHeader() // todo are auth headers needed for gets?\n }\n }).then(function (response) {\n resolve(response.data);\n }).catch(function (err) {\n reject(err);\n });\n });\n }\n\n getMany(ids) {\n return new Promise((resolve, reject) => {\n if (ids.length === 0) {\n resolve([]);\n }\n this.getOne(ids.join(','))\n .then(res => {\n if (ids.length === 1) {\n resolve([res]);\n } else {\n resolve(res);\n }\n })\n .catch(err => {\n reject(err);\n })\n });\n }\n\n patch({id, body, initial_values = null}) {\n if (initial_values !== null) {\n var dirtyBody = Object.keys(body).reduce(function (filtered, key) {\n if (!(key in initial_values && initial_values[key] === body[key])){\n filtered[key] = body[key];\n }\n return filtered;\n }, {});\n }\n\n if (\"id\" in dirtyBody) {\n delete dirtyBody[\"id\"]; // no id is to be sent in the body, since it is sent as url param\n }\n return new Promise(function (resolve, reject) {\n axios({\n method: 'patch',\n url: `${url}/${resource}/${id}`,\n data: dirtyBody,\n headers: {\n ...{\n 'Content-Type': 'application/json',\n 'Cache-Control': 'no-cache'\n }, ...authHeader()\n }\n }).then(function (response) {\n resolve(response.data);\n }).catch(function (err) {\n reject(err);\n });\n });\n }\n\n post(body, subresourcId=null) {\n if (\"id\" in body) delete body[\"id\"]; // no id is to be sent in the body, since it is sent as url param\n\n return new Promise(function (resolve, reject) {\n axios({\n method: 'post',\n url: `${url}/${resource}${subresource !== null? `/${subresourcId}/${subresource}`: ''}`,\n data: body,\n headers: {\n ...{\n 'Content-Type': 'application/json',\n 'Cache-Control': 'no-cache'\n }, ...authHeader()\n }\n }).then(function (res) {\n resolve(res.data);\n }).catch(function (err) {\n reject(err);\n });\n });\n }\n\n // todo arent post and postwith id nearly same? merge\n\n postWithId(id, subresourceid=null) {\n return new Promise(function (resolve, reject) {\n axios({\n method: 'post',\n url: `${url}/${resource}/${id}${subresourceid === null?\n '': `/${subresource}/${subresourceid}`}`,\n headers: {\n ...{\n 'Content-Type': 'application/json',\n 'Cache-Control': 'no-cache'\n }, ...authHeader()\n }\n }).then(function (res) {\n resolve(res);\n }).catch(function (err) {\n reject(err);\n });\n });\n }\n\n delete(id, subresourceId=null) {\n return new Promise(function (resolve, reject) {\n axios({\n method: 'delete',\n url: `${url}/${resource}/${id}${subresource !== null? `/${subresource}/${subresourceId}`: ''}`,\n headers: {\n ...{\n 'Content-Type': 'application/json',\n 'Cache-Control': 'no-cache'\n }, ...authHeader()\n }\n }).then(function (response) {\n resolve(response);\n }).catch(function (err) {\n reject(err);\n });\n });\n }\n\n deleteMany(ids) {\n return Promise.all(ids.map(id => (this.delete(id))));\n }\n\n downloadCsv(searchtermfield, searchterm, page = 1, filters=null) {\n return new Promise(function (resolve, reject) {\n let myFilters = {\n \"page\": page\n };\n\n if (searchtermfield !== null){\n myFilters[`filter.${searchtermfield}.like`]= `%${searchterm}%`;\n }\n\n if (filters !== null){\n Object.keys(filters).forEach((key) => {\n myFilters[`filter.${key}.eq`] = filters[key];\n })\n }\n\n axios({\n url: `${url}/${resource}`,\n method: 'GET',\n responseType: 'blob', // important\n params: myFilters,\n headers: {\n ...{\n 'Accept': 'text/csv',\n 'Cache-Control': 'no-cache'\n }, ...authHeader()\n }\n }).then(response => {\n let filename = response.headers[\"content-disposition\"].split(\"filename=\")[1];\n if (filename === null) filename = \"export.csv\";\n\n const url = window.URL.createObjectURL(new Blob([response.data]));\n const link = document.createElement('a');\n link.href = url;\n link.setAttribute('download', filename);\n document.body.appendChild(link);\n link.click();\n link.remove();\n resolve();\n }).catch(function (err) {\n reject(err);\n });\n\n });\n }\n\n\n downloadOneCsv(id) {\n return new Promise(function (resolve, reject) {\n axios({\n url: `${url}/${resource}/${id}`,\n method: 'GET',\n responseType: 'blob', // important\n headers: {\n ...{\n 'Accept': 'text/csv',\n 'Cache-Control': 'no-cache'\n }, ...authHeader()\n }\n }).then(response => {\n /*\n _download(response){\n let filename = response.headers[\"content-disposition\"].split(\"filename=\")[1];\n if (filename === null) filename = \"export.csv\";\n\n const url = window.URL.createObjectURL(new Blob([response.data]));\n const link = document.createElement('a');\n link.href = url;\n link.setAttribute('download', filename);\n document.body.appendChild(link);\n link.click();\n link.remove();\n resolve();\n }\n **/\n let filename = response.headers[\"content-disposition\"].split(\"filename=\")[1];\n if (filename === null) filename = \"export.csv\";\n\n const url = window.URL.createObjectURL(new Blob([response.data]));\n const link = document.createElement('a');\n link.href = url;\n link.setAttribute('download', filename);\n document.body.appendChild(link);\n link.click();\n link.remove();\n resolve();\n }).catch(function (err) {\n reject(err);\n });\n\n });\n }\n\n\n downloadSubresource(id, subresource, params) {\n return new Promise(function (resolve, reject) {\n axios({\n url: `${url}/${resource}/${id}/${subresource}`,\n method: 'POST',\n params: params,\n responseType: 'blob', // important\n headers: {\n ...{\n 'Cache-Control': 'no-cache'\n }, ...authHeader()\n }\n }).then(response => {\n let filename = response.headers[\"content-disposition\"].split(\"filename=\")[1];\n const url = window.URL.createObjectURL(new Blob([response.data]));\n const link = document.createElement('a');\n link.href = url;\n link.setAttribute('download', filename);\n document.body.appendChild(link);\n link.click();\n link.remove();\n resolve();\n }).catch(function (err) {\n reject(err);\n });\n\n });\n }\n }\n}\n","import serviceFactory from \"./service-factory\";\n\n\nexport default new (serviceFactory('students'))();\n\n","import IconButton from \"@material-ui/core/IconButton\";\nimport PersonAddIcon from \"@material-ui/icons/PersonAdd\";\nimport {Skeleton} from \"@material-ui/lab\";\nimport React from \"react\";\n\nexport const IconButtonSkeleton = ({...props}) => {\n return \n \n \n}","import React from 'react';\nimport TextField from '@material-ui/core/TextField';\nimport {makeStyles} from \"@material-ui/core\";\nimport createStyles from \"@material-ui/styles/createStyles\";\n\n\nconst useStyles = makeStyles(theme => (createStyles({\n root: dirty => ({\n '& label.Mui-focused': {color: dirty? theme.palette.neutral.status.dirty: theme.palette.primary.main},\n '& .MuiInput-underline:after': {borderBottomColor: dirty? theme.palette.neutral.status.dirty: theme.palette.primary.main},\n '& label': {color: dirty? theme.palette.neutral.status.dirty: theme.palette.neutral.emphasisText.medium}\n })\n})));\n\n\nconst DirtyTextField = (props) => {\n const name = props.name;\n const formik = props.formik;\n const dirty = props.noDirty === true? false: formik.values[name] !== formik.initialValues[name];\n const classes = useStyles(dirty);\n const formikProps = {\n value: formik.values[name] === undefined? '': formik.values[name], // todo why is this being called with undefined tho\n onChange: formik.handleChange,\n onBlur: formik.handleBlur,\n error: formik.status || formik.errors[name] !== undefined,\n helperText: formik.touched[name] && formik.errors[name]\n }\n return \n}\n\nexport default DirtyTextField;","export const countries = [\n { code: 'ES', label: 'Spain', phone: '34' },\n { code: 'AD', label: 'Andorra', phone: '376' },\n { code: 'AE', label: 'United Arab Emirates', phone: '971' },\n { code: 'AF', label: 'Afghanistan', phone: '93' },\n { code: 'AG', label: 'Antigua and Barbuda', phone: '1-268' },\n { code: 'AI', label: 'Anguilla', phone: '1-264' },\n { code: 'AL', label: 'Albania', phone: '355' },\n { code: 'AM', label: 'Armenia', phone: '374' },\n { code: 'AO', label: 'Angola', phone: '244' },\n { code: 'AQ', label: 'Antarctica', phone: '672' },\n { code: 'AR', label: 'Argentina', phone: '54' },\n { code: 'AS', label: 'American Samoa', phone: '1-684' },\n { code: 'AT', label: 'Austria', phone: '43' },\n { code: 'AU', label: 'Australia', phone: '61', suggested: true },\n { code: 'AW', label: 'Aruba', phone: '297' },\n { code: 'AX', label: 'Alland Islands', phone: '358' },\n { code: 'AZ', label: 'Azerbaijan', phone: '994' },\n { code: 'BA', label: 'Bosnia and Herzegovina', phone: '387' },\n { code: 'BB', label: 'Barbados', phone: '1-246' },\n { code: 'BD', label: 'Bangladesh', phone: '880' },\n { code: 'BE', label: 'Belgium', phone: '32' },\n { code: 'BF', label: 'Burkina Faso', phone: '226' },\n { code: 'BG', label: 'Bulgaria', phone: '359' },\n { code: 'BH', label: 'Bahrain', phone: '973' },\n { code: 'BI', label: 'Burundi', phone: '257' },\n { code: 'BJ', label: 'Benin', phone: '229' },\n { code: 'BL', label: 'Saint Barthelemy', phone: '590' },\n { code: 'BM', label: 'Bermuda', phone: '1-441' },\n { code: 'BN', label: 'Brunei Darussalam', phone: '673' },\n { code: 'BO', label: 'Bolivia', phone: '591' },\n { code: 'BR', label: 'Brazil', phone: '55' },\n { code: 'BS', label: 'Bahamas', phone: '1-242' },\n { code: 'BT', label: 'Bhutan', phone: '975' },\n { code: 'BV', label: 'Bouvet Island', phone: '47' },\n { code: 'BW', label: 'Botswana', phone: '267' },\n { code: 'BY', label: 'Belarus', phone: '375' },\n { code: 'BZ', label: 'Belize', phone: '501' },\n { code: 'CA', label: 'Canada', phone: '1', suggested: true },\n { code: 'CC', label: 'Cocos (Keeling) Islands', phone: '61' },\n { code: 'CD', label: 'Congo, Democratic Republic of the', phone: '243' },\n { code: 'CF', label: 'Central African Republic', phone: '236' },\n { code: 'CG', label: 'Congo, Republic of the', phone: '242' },\n { code: 'CH', label: 'Switzerland', phone: '41' },\n { code: 'CI', label: \"Cote d'Ivoire\", phone: '225' },\n { code: 'CK', label: 'Cook Islands', phone: '682' },\n { code: 'CL', label: 'Chile', phone: '56' },\n { code: 'CM', label: 'Cameroon', phone: '237' },\n { code: 'CN', label: 'China', phone: '86' },\n { code: 'CO', label: 'Colombia', phone: '57' },\n { code: 'CR', label: 'Costa Rica', phone: '506' },\n { code: 'CU', label: 'Cuba', phone: '53' },\n { code: 'CV', label: 'Cape Verde', phone: '238' },\n { code: 'CW', label: 'Curacao', phone: '599' },\n { code: 'CX', label: 'Christmas Island', phone: '61' },\n { code: 'CY', label: 'Cyprus', phone: '357' },\n { code: 'CZ', label: 'Czech Republic', phone: '420' },\n { code: 'DE', label: 'Germany', phone: '49', suggested: true },\n { code: 'DJ', label: 'Djibouti', phone: '253' },\n { code: 'DK', label: 'Denmark', phone: '45' },\n { code: 'DM', label: 'Dominica', phone: '1-767' },\n { code: 'DO', label: 'Dominican Republic', phone: '1-809' },\n { code: 'DZ', label: 'Algeria', phone: '213' },\n { code: 'EC', label: 'Ecuador', phone: '593' },\n { code: 'EE', label: 'Estonia', phone: '372' },\n { code: 'EG', label: 'Egypt', phone: '20' },\n { code: 'EH', label: 'Western Sahara', phone: '212' },\n { code: 'ER', label: 'Eritrea', phone: '291' },\n { code: 'ET', label: 'Ethiopia', phone: '251' },\n { code: 'FI', label: 'Finland', phone: '358' },\n { code: 'FJ', label: 'Fiji', phone: '679' },\n { code: 'FK', label: 'Falkland Islands (Malvinas)', phone: '500' },\n { code: 'FM', label: 'Micronesia, Federated States of', phone: '691' },\n { code: 'FO', label: 'Faroe Islands', phone: '298' },\n { code: 'FR', label: 'France', phone: '33', suggested: true },\n { code: 'GA', label: 'Gabon', phone: '241' },\n { code: 'GB', label: 'United Kingdom', phone: '44' },\n { code: 'GD', label: 'Grenada', phone: '1-473' },\n { code: 'GE', label: 'Georgia', phone: '995' },\n { code: 'GF', label: 'French Guiana', phone: '594' },\n { code: 'GG', label: 'Guernsey', phone: '44' },\n { code: 'GH', label: 'Ghana', phone: '233' },\n { code: 'GI', label: 'Gibraltar', phone: '350' },\n { code: 'GL', label: 'Greenland', phone: '299' },\n { code: 'GM', label: 'Gambia', phone: '220' },\n { code: 'GN', label: 'Guinea', phone: '224' },\n { code: 'GP', label: 'Guadeloupe', phone: '590' },\n { code: 'GQ', label: 'Equatorial Guinea', phone: '240' },\n { code: 'GR', label: 'Greece', phone: '30' },\n { code: 'GS', label: 'South Georgia and the South Sandwich Islands', phone: '500' },\n { code: 'GT', label: 'Guatemala', phone: '502' },\n { code: 'GU', label: 'Guam', phone: '1-671' },\n { code: 'GW', label: 'Guinea-Bissau', phone: '245' },\n { code: 'GY', label: 'Guyana', phone: '592' },\n { code: 'HK', label: 'Hong Kong', phone: '852' },\n { code: 'HM', label: 'Heard Island and McDonald Islands', phone: '672' },\n { code: 'HN', label: 'Honduras', phone: '504' },\n { code: 'HR', label: 'Croatia', phone: '385' },\n { code: 'HT', label: 'Haiti', phone: '509' },\n { code: 'HU', label: 'Hungary', phone: '36' },\n { code: 'ID', label: 'Indonesia', phone: '62' },\n { code: 'IE', label: 'Ireland', phone: '353' },\n { code: 'IL', label: 'Israel', phone: '972' },\n { code: 'IM', label: 'Isle of Man', phone: '44' },\n { code: 'IN', label: 'India', phone: '91' },\n { code: 'IO', label: 'British Indian Ocean Territory', phone: '246' },\n { code: 'IQ', label: 'Iraq', phone: '964' },\n { code: 'IR', label: 'Iran, Islamic Republic of', phone: '98' },\n { code: 'IS', label: 'Iceland', phone: '354' },\n { code: 'IT', label: 'Italy', phone: '39' },\n { code: 'JE', label: 'Jersey', phone: '44' },\n { code: 'JM', label: 'Jamaica', phone: '1-876' },\n { code: 'JO', label: 'Jordan', phone: '962' },\n { code: 'JP', label: 'Japan', phone: '81', suggested: true },\n { code: 'KE', label: 'Kenya', phone: '254' },\n { code: 'KG', label: 'Kyrgyzstan', phone: '996' },\n { code: 'KH', label: 'Cambodia', phone: '855' },\n { code: 'KI', label: 'Kiribati', phone: '686' },\n { code: 'KM', label: 'Comoros', phone: '269' },\n { code: 'KN', label: 'Saint Kitts and Nevis', phone: '1-869' },\n { code: 'KP', label: \"Korea, Democratic People's Republic of\", phone: '850' },\n { code: 'KR', label: 'Korea, Republic of', phone: '82' },\n { code: 'KW', label: 'Kuwait', phone: '965' },\n { code: 'KY', label: 'Cayman Islands', phone: '1-345' },\n { code: 'KZ', label: 'Kazakhstan', phone: '7' },\n { code: 'LA', label: \"Lao People's Democratic Republic\", phone: '856' },\n { code: 'LB', label: 'Lebanon', phone: '961' },\n { code: 'LC', label: 'Saint Lucia', phone: '1-758' },\n { code: 'LI', label: 'Liechtenstein', phone: '423' },\n { code: 'LK', label: 'Sri Lanka', phone: '94' },\n { code: 'LR', label: 'Liberia', phone: '231' },\n { code: 'LS', label: 'Lesotho', phone: '266' },\n { code: 'LT', label: 'Lithuania', phone: '370' },\n { code: 'LU', label: 'Luxembourg', phone: '352' },\n { code: 'LV', label: 'Latvia', phone: '371' },\n { code: 'LY', label: 'Libya', phone: '218' },\n { code: 'MA', label: 'Morocco', phone: '212' },\n { code: 'MC', label: 'Monaco', phone: '377' },\n { code: 'MD', label: 'Moldova, Republic of', phone: '373' },\n { code: 'ME', label: 'Montenegro', phone: '382' },\n { code: 'MF', label: 'Saint Martin (French part)', phone: '590' },\n { code: 'MG', label: 'Madagascar', phone: '261' },\n { code: 'MH', label: 'Marshall Islands', phone: '692' },\n { code: 'MK', label: 'Macedonia, the Former Yugoslav Republic of', phone: '389' },\n { code: 'ML', label: 'Mali', phone: '223' },\n { code: 'MM', label: 'Myanmar', phone: '95' },\n { code: 'MN', label: 'Mongolia', phone: '976' },\n { code: 'MO', label: 'Macao', phone: '853' },\n { code: 'MP', label: 'Northern Mariana Islands', phone: '1-670' },\n { code: 'MQ', label: 'Martinique', phone: '596' },\n { code: 'MR', label: 'Mauritania', phone: '222' },\n { code: 'MS', label: 'Montserrat', phone: '1-664' },\n { code: 'MT', label: 'Malta', phone: '356' },\n { code: 'MU', label: 'Mauritius', phone: '230' },\n { code: 'MV', label: 'Maldives', phone: '960' },\n { code: 'MW', label: 'Malawi', phone: '265' },\n { code: 'MX', label: 'Mexico', phone: '52' },\n { code: 'MY', label: 'Malaysia', phone: '60' },\n { code: 'MZ', label: 'Mozambique', phone: '258' },\n { code: 'NA', label: 'Namibia', phone: '264' },\n { code: 'NC', label: 'New Caledonia', phone: '687' },\n { code: 'NE', label: 'Niger', phone: '227' },\n { code: 'NF', label: 'Norfolk Island', phone: '672' },\n { code: 'NG', label: 'Nigeria', phone: '234' },\n { code: 'NI', label: 'Nicaragua', phone: '505' },\n { code: 'NL', label: 'Netherlands', phone: '31' },\n { code: 'NO', label: 'Norway', phone: '47' },\n { code: 'NP', label: 'Nepal', phone: '977' },\n { code: 'NR', label: 'Nauru', phone: '674' },\n { code: 'NU', label: 'Niue', phone: '683' },\n { code: 'NZ', label: 'New Zealand', phone: '64' },\n { code: 'OM', label: 'Oman', phone: '968' },\n { code: 'PA', label: 'Panama', phone: '507' },\n { code: 'PE', label: 'Peru', phone: '51' },\n { code: 'PF', label: 'French Polynesia', phone: '689' },\n { code: 'PG', label: 'Papua New Guinea', phone: '675' },\n { code: 'PH', label: 'Philippines', phone: '63' },\n { code: 'PK', label: 'Pakistan', phone: '92' },\n { code: 'PL', label: 'Poland', phone: '48' },\n { code: 'PM', label: 'Saint Pierre and Miquelon', phone: '508' },\n { code: 'PN', label: 'Pitcairn', phone: '870' },\n { code: 'PR', label: 'Puerto Rico', phone: '1' },\n { code: 'PS', label: 'Palestine, State of', phone: '970' },\n { code: 'PT', label: 'Portugal', phone: '351' },\n { code: 'PW', label: 'Palau', phone: '680' },\n { code: 'PY', label: 'Paraguay', phone: '595' },\n { code: 'QA', label: 'Qatar', phone: '974' },\n { code: 'RE', label: 'Reunion', phone: '262' },\n { code: 'RO', label: 'Romania', phone: '40' },\n { code: 'RS', label: 'Serbia', phone: '381' },\n { code: 'RU', label: 'Russian Federation', phone: '7' },\n { code: 'RW', label: 'Rwanda', phone: '250' },\n { code: 'SA', label: 'Saudi Arabia', phone: '966' },\n { code: 'SB', label: 'Solomon Islands', phone: '677' },\n { code: 'SC', label: 'Seychelles', phone: '248' },\n { code: 'SD', label: 'Sudan', phone: '249' },\n { code: 'SE', label: 'Sweden', phone: '46' },\n { code: 'SG', label: 'Singapore', phone: '65' },\n { code: 'SH', label: 'Saint Helena', phone: '290' },\n { code: 'SI', label: 'Slovenia', phone: '386' },\n { code: 'SJ', label: 'Svalbard and Jan Mayen', phone: '47' },\n { code: 'SK', label: 'Slovakia', phone: '421' },\n { code: 'SL', label: 'Sierra Leone', phone: '232' },\n { code: 'SM', label: 'San Marino', phone: '378' },\n { code: 'SN', label: 'Senegal', phone: '221' },\n { code: 'SO', label: 'Somalia', phone: '252' },\n { code: 'SR', label: 'Suriname', phone: '597' },\n { code: 'SS', label: 'South Sudan', phone: '211' },\n { code: 'ST', label: 'Sao Tome and Principe', phone: '239' },\n { code: 'SV', label: 'El Salvador', phone: '503' },\n { code: 'SX', label: 'Sint Maarten (Dutch part)', phone: '1-721' },\n { code: 'SY', label: 'Syrian Arab Republic', phone: '963' },\n { code: 'SZ', label: 'Swaziland', phone: '268' },\n { code: 'TC', label: 'Turks and Caicos Islands', phone: '1-649' },\n { code: 'TD', label: 'Chad', phone: '235' },\n { code: 'TF', label: 'French Southern Territories', phone: '262' },\n { code: 'TG', label: 'Togo', phone: '228' },\n { code: 'TH', label: 'Thailand', phone: '66' },\n { code: 'TJ', label: 'Tajikistan', phone: '992' },\n { code: 'TK', label: 'Tokelau', phone: '690' },\n { code: 'TL', label: 'Timor-Leste', phone: '670' },\n { code: 'TM', label: 'Turkmenistan', phone: '993' },\n { code: 'TN', label: 'Tunisia', phone: '216' },\n { code: 'TO', label: 'Tonga', phone: '676' },\n { code: 'TR', label: 'Turkey', phone: '90' },\n { code: 'TT', label: 'Trinidad and Tobago', phone: '1-868' },\n { code: 'TV', label: 'Tuvalu', phone: '688' },\n { code: 'TW', label: 'Taiwan, Province of China', phone: '886' },\n { code: 'TZ', label: 'United Republic of Tanzania', phone: '255' },\n { code: 'UA', label: 'Ukraine', phone: '380' },\n { code: 'UG', label: 'Uganda', phone: '256' },\n { code: 'US', label: 'United States', phone: '1', suggested: true },\n { code: 'UY', label: 'Uruguay', phone: '598' },\n { code: 'UZ', label: 'Uzbekistan', phone: '998' },\n { code: 'VA', label: 'Holy See (Vatican City State)', phone: '379' },\n { code: 'VC', label: 'Saint Vincent and the Grenadines', phone: '1-784' },\n { code: 'VE', label: 'Venezuela', phone: '58' },\n { code: 'VG', label: 'British Virgin Islands', phone: '1-284' },\n { code: 'VI', label: 'US Virgin Islands', phone: '1-340' },\n { code: 'VN', label: 'Vietnam', phone: '84' },\n { code: 'VU', label: 'Vanuatu', phone: '678' },\n { code: 'WF', label: 'Wallis and Futuna', phone: '681' },\n { code: 'WS', label: 'Samoa', phone: '685' },\n { code: 'XK', label: 'Kosovo', phone: '383' },\n { code: 'YE', label: 'Yemen', phone: '967' },\n { code: 'YT', label: 'Mayotte', phone: '262' },\n { code: 'ZA', label: 'South Africa', phone: '27' },\n { code: 'ZM', label: 'Zambia', phone: '260' },\n { code: 'ZW', label: 'Zimbabwe', phone: '263' },\n { code: '', label: \"empty\", phone: '-'},\n { code: 'OTHER', label: 'other', phone: '-'}\n];\n\nexport default countries;","import {makeStyles} from \"@material-ui/core/styles\";\nimport {useTranslation} from \"react-i18next\";\nimport React from \"react\";\nimport {Autocomplete} from \"@material-ui/lab\";\nimport {countries} from \"../_data/countries\";\nimport TextField from \"@material-ui/core/TextField\";\nimport createStyles from \"@material-ui/styles/createStyles\";\n\n// ISO 3166-1 alpha-2\n// ⚠️ No support for IE 11\nfunction countryToFlag(isoCode) {\n return typeof String.fromCodePoint !== 'undefined'\n ? isoCode\n .toUpperCase()\n .replace(/./g, (char) => String.fromCodePoint(char.charCodeAt(0) + 127397))\n : isoCode;\n}\n\n\nconst useStyles = makeStyles(theme => (createStyles({\n textField: dirty => ({\n '& label.Mui-focused': {color: dirty? theme.palette.neutral.status.dirty: theme.palette.primary.main}, // todo color to theme\n '& .MuiInput-underline:after': {borderBottomColor: dirty? theme.palette.neutral.status.dirty: theme.palette.primary.main},\n '& label': {color: dirty? theme.palette.neutral.status.dirty: theme.palette.neutral.emphasisText.medium},\n '& fieldset': {borderColor: dirty? theme.palette.neutral.status.dirty: theme.palette.neutral.emphasisText.medium},\n }\n ),\n option: {\n fontSize: 15,\n '& > span': {\n marginRight: 10,\n fontSize: 18,\n },\n },})));\n\nexport default function DirtyCountrySelect({formik, noDirty, name, label, style={ width: 300 }, ...textFieldProps}) {\n const getInitialOption = (code) => {\n if (code === undefined) return countries.find(x=>x.code==='');\n return countries.find(x=>x.code===code);\n }\n\n const [option, _setOption] = React.useState(getInitialOption(formik.values[name]));\n\n React.useEffect(() => {\n _setOption(getInitialOption(formik.values[name]));\n }, [formik.values, name]);\n\n const setOption = (option) => {\n const newOption = (option !== null)? option.code: '';\n formik.setFieldValue(name, newOption);\n _setOption(option);\n }\n\n const dirty = noDirty === true? false: formik.values[name] !== formik.initialValues[name];\n const classes = useStyles(dirty);\n\n const [inputValue, setInputValue] = React.useState('');\n\n const { t } = useTranslation();\n\n return (\n t(option.code) }\n getOptionSelected={(o) => o.code === option.code}\n value={option}\n onChange={(event, newValue) => {\n setOption(newValue);\n }}\n inputValue={inputValue}\n onInputChange={(event, newInputValue) => {\n setInputValue(newInputValue);\n }}\n name={name}\n onBlur={formik.handleBlur}\n renderOption={(option) => (\n \n {option.code !== \"\" && option.code !== \"OTHER\"? countryToFlag(option.code): \"\"}\n {option.code !== \"\" && option.code !== \"OTHER\"? t(option.code): t(option.label)} {option.code !== \"\" && option.code !== \"OTHER\"? \"(\"+option.code+\") +\"+option.phone: \"\"}\n \n )}\n\n renderInput={(params) => (\n \n )}\n />\n );\n}","import {userContext} from \"../_context/user-context\";\nimport React from 'react';\nimport {useSnackbar} from \"notistack\";\nimport {useTranslation} from \"react-i18next\";\nimport {Button} from \"@material-ui/core\";\n\n\nexport function useErrorHandler() {\n\n const userCtx = React.useContext(userContext);\n const {enqueueSnackbar, closeSnackbar} = useSnackbar();\n const {t} = useTranslation();\n\n const successHandler = (res, snackbarSuccess) => {\n if (snackbarSuccess) enqueueSnackbar(t(\"success\"), {variant: \"success\"});\n return Promise.resolve(res);\n }\n\n const successHandlerFactory = (snackbarSuccess) => {\n return (res) => successHandler(res, snackbarSuccess)\n }\n\n const failureHandler401 = (res) => {\n // auto logout if 401 unauthenticated\n userCtx[\"setUser\"]({logged: false, ping: false});\n\n enqueueSnackbar(t(\"warning_not_logged_in\"), {variant: \"warning\"});\n\n return Promise.reject(res);\n }\n\n const failureHandler403 = (res) => {\n // unauthorized\n enqueueSnackbar(t(\"warning_not_enough_privileges\"), {variant: \"warning\"});\n\n return Promise.reject(res);\n }\n\n const failureHandlerUnexpected = (res, reportUnexpected) => {\n // an unexpected error happened\n \n \n const showSnackbar = (message) => {\n enqueueSnackbar(`Something went wrong! 😣 ${message}`,\n {\n variant: \"error\",\n autoHideDuration: 10000,\n action: key => {\n return \n \n\n {reportUnexpected? : null}\n \n\n \n }\n });\n }\n\n if (res.request.responseType == 'blob'){\n res.response.data.text().then(res => {\n showSnackbar(JSON.parse(res)['message']);\n });\n } else {\n showSnackbar('');\n }\n\n return Promise.reject(res);\n }\n\n const failureHandler = (res, handle401, handle403, handle400, errorOut, reportUnexpected) => {\n // decide which handler is going to handle the error response depending on status code\n let handler = (res) => failureHandlerUnexpected(res, reportUnexpected);\n if (res.request.status === 401) {\n if (handle401) { handler = failureHandler401; }\n else { return Promise.reject(res) }\n }\n if (res.request.status === 403) {\n if (handle403) { handler = failureHandler403; }\n else { return Promise.reject(res) }\n }\n if (res.request.status === 400) {\n if (!handle400) { return Promise.reject(res) }\n // else just use the default handler\n }\n\n // use the handler, return a rejected promise if errorOut,\n // else just execute the handler but don't return a rejected catch\n // (otherwise there will be either empty rejection handlers or unhandled rejections everywhere)\n if (errorOut) {\n return handler(res);\n } else {\n handler(res).catch(()=>{}); // ignores the rejection response\n return null;\n }\n }\n\n const failureHandlerFactory = (handle401, handle403, handle400, errorOut, reportUnexpected) => {\n return (res) => (failureHandler(res, handle401, handle403, handle400, errorOut, reportUnexpected))\n }\n\n return ({\n handle401 = true,\n handle403 = true,\n handle400 = true,\n errorOut = true,\n reportUnexpected = true,\n snackbarSuccess = false\n }) => {\n return [successHandlerFactory(snackbarSuccess),\n failureHandlerFactory(handle401, handle403, handle400, errorOut, reportUnexpected)]\n };\n}","import {useFormik} from \"formik\";\n\n\nexport function useNormik(onlyChangedValuesOnSubmit, props, allowArrays=false) {\n let originalInitialValues = {};\n if (\"initialValues\" in props) {\n let nullSafeInitialValues = {};\n originalInitialValues = props.initialValues;\n for (const [key, value] of Object.entries(originalInitialValues)) {\n if (value === null) {\n nullSafeInitialValues[key] = '';\n } else {\n nullSafeInitialValues[key] = value;\n }\n }\n props.initialValues = nullSafeInitialValues;\n }\n\n if (\"onSubmit\" in props){\n const oldOnSubmit = props.onSubmit;\n const nullSafeOnSubmit = (values, actions) => {\n let normalizedValues = {};\n for (const [key, value] of Object.entries(values)) {\n const normalizedValue = value === ''? null : value;\n if (!onlyChangedValuesOnSubmit ||\n (onlyChangedValuesOnSubmit && normalizedValue !== originalInitialValues[key] &&\n (allowArrays || !Array.isArray(originalInitialValues[key])) )){\n normalizedValues[key] = normalizedValue;\n }\n\n }\n oldOnSubmit(normalizedValues, actions);\n }\n props.onSubmit = nullSafeOnSubmit;\n }\n\n return useFormik(props);\n}","export const education_years = [\n \"kindergarten_p0\",\n \"kindergarten_p1\",\n \"kindergarten_p2\",\n \"kindergarten_p3\",\n \"kindergarten_p4\",\n \"kindergarten_p5\",\n \"primary_1\",\n \"primary_2\",\n \"primary_3\",\n \"primary_4\",\n \"primary_5\",\n \"primary_6\",\n \"eso_1\",\n \"eso_2\",\n \"eso_3\",\n \"eso_4\",\n \"baccalaureate_1\",\n \"baccalaureate_2\",\n \"FP_lower\",\n \"FP_higher\",\n \"undergraduate\",\n \"master\",\n \"phd\",\n \"other\"\n];\n","import React, {useEffect} from 'react';\nimport {makeStyles} from '@material-ui/core/styles';\nimport {useTranslation} from \"react-i18next\";\nimport {Checkbox, FormControlLabel} from \"@material-ui/core\";\nimport {allNeeds} from \"../_data/needs\";\nimport Typography from \"@material-ui/core/Typography\";\nimport createStyles from \"@material-ui/styles/createStyles\";\nimport TextField from \"@material-ui/core/TextField\";\nimport useTheme from \"@material-ui/core/styles/useTheme\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport SaveIcon from \"@material-ui/icons/Save\";\nimport RestoreIcon from \"@material-ui/icons/Restore\";\n\n\nconst DiscardButton = ({formik, ...props}) => {\n const {t} = useTranslation();\n\n return \n \n \n \n \n}\n\nexport default DiscardButton;","import {userContext} from \"../_context/user-context\";\nimport React from 'react';\nimport {useSnackbar} from \"notistack\";\nimport {useTranslation} from \"react-i18next\";\nimport {Button} from \"@material-ui/core\";\nimport {CHECK_NEEDS} from \"../config\";\n\n\nexport const NEEDS = {\n get: \"get\",\n patch: \"patch\",\n delete: \"delete\",\n post: \"post\",\n send_email: \"send_email\",\n invite_users: \"invite_users\",\n students: \"students\",\n courses: \"courses\",\n guardians: \"guardians\",\n payments: \"payments\",\n rooms: \"rooms\",\n schedules: \"schedules\",\n teachers: \"teachers\",\n users: \"users\",\n paymentReceipts: \"payments-receipts\",\n attendance: \"attendance\"\n };\n\n\nexport function useNeeds() {\n\n const userCtx = React.useContext(userContext);\n\n const hasNeed = (needs) => (!CHECK_NEEDS || needs.every(need => userCtx.needs.includes(need)));\n\n return [hasNeed, NEEDS];\n}","import React, {useEffect} from 'react';\nimport {makeStyles} from '@material-ui/core/styles';\nimport {useTranslation} from \"react-i18next\";\nimport {Checkbox, FormControlLabel} from \"@material-ui/core\";\nimport {allNeeds} from \"../_data/needs\";\nimport Typography from \"@material-ui/core/Typography\";\nimport createStyles from \"@material-ui/styles/createStyles\";\nimport TextField from \"@material-ui/core/TextField\";\nimport useTheme from \"@material-ui/core/styles/useTheme\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport SaveIcon from \"@material-ui/icons/Save\";\nimport {useNeeds} from \"../_helpers/needs\";\n\n\nconst SaveButton = ({formik, ...props}) => {\n const {t} = useTranslation();\n const [hasNeeds, NEEDS] = useNeeds();\n return hasNeeds([NEEDS.patch]) && \n \n \n \n \n}\n\nexport default SaveButton;","export const longer_8 = /^.{8,}$/;\nexport const shorter_64 = /^.{0,64}$/;\nexport const has_lowercase = /(?=.*[a-z])/;\nexport const has_uppercase = /(?=.*[A-Z])/;\nexport const has_digit = /(?=.*\\d)/;\nexport const has_special = /(?=.*[-\\/:-@\\!.,+`´\\-%&\\(\\)#$€_[-`{-~]{1,})/;\nexport const no_plus = /^((?!\\+).)*$/;\n","import * as yup from \"yup\";\nimport {\n has_digit,\n has_lowercase,\n has_special,\n has_uppercase,\n longer_8,\n no_plus,\n shorter_64\n} from \"../_data/password_regex\";\n\nexport const DNI_REGEX = /^[0-9]{8}[TRWAGMYFPDXBNJZSQVHLCKE]$/i;\nexport const NIE_REGEX = /^[XYZ][0-9]{7}[A-Z]$/i;\nexport const DNI_OR_NIE_REGEX = new RegExp(DNI_REGEX.source + \"|\" + NIE_REGEX.source).source;\nexport const safe_password = (t) => (\n yup.string()\n .required(t(\"password_required\"))\n .matches(longer_8, t(\"longer_8\"))\n .matches(shorter_64, t(\"shorter_64\"))\n .matches(has_lowercase, t(\"has_lowercase\"))\n .matches(has_uppercase, t(\"has_uppercase\"))\n .matches(has_digit, t(\"has_digit\"))\n .matches(has_special, t(\"has_special\"))\n)\n\nexport const safe_password_repetition = (t) => (\n yup.string()\n .required(t(\"password_required\"))\n .oneOf([yup.ref('password'), null], t(\"passwords_unmatched\"))\n)\n\n\nconst safe_username_email = (t) => (\n yup.string()\n .email(t(\"invalid_email\"))\n .matches(no_plus, t(\"no_plus\"))\n)\n\nconst safe_username_email_required = (t) => (\n safe_username_email(t).required(t(\"email_required\"))\n);\n\n\nexport const safe_username_required = safe_username_email_required;\nexport const safe_email_required = safe_username_email_required;\nexport const safe_email = safe_username_email;\n\nexport const one_of = (t, options) => yup.string().required(t('field_required'))\n .test( // one of the array\n 'oneOfRequired',\n `${t(\"one_of\")}: ${options.toString()}`,\n v => options.includes(v)\n )","import {useTranslation} from \"react-i18next\";\nimport Box from \"@material-ui/core/Box\";\nimport {MenuItem} from \"@material-ui/core\";\nimport React from \"react\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport {Skeleton} from \"@material-ui/lab\";\nimport DirtyTextField from \"./dirtytextfield.component\";\nimport * as yup from 'yup';\nimport DirtyCountrySelect from \"./contry-select.component\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport {useNormik} from \"../_helpers/normik\";\nimport {education_years} from \"../_data/education\";\nimport Divider from \"@material-ui/core/Divider\";\nimport {IconButtonSkeleton} from \"../_skeletons/iconButton\";\nimport DiscardButton from \"./formik_discard_button\";\nimport SaveButton from \"./formik_save_button\";\nimport {safe_email} from \"../_yup/validators\";\n\nconst useStyles = makeStyles((theme) => ({\n line: {\n width: \"100%\",\n marginTop: theme.spacing(1)\n },\n composite: {\n display: \"flex\", flexDirection: \"row\", flex: 1, flexWrap: \"wrap\",\n gap: theme.spacing(1), width: \"100%\"\n },\n actionIcon: {\n float: 'right'\n }\n}));\n\nfunction Person(props) {\n const currentPerson = props.currentPerson;\n const dataService = props.patchService;\n const newPerson = props.newPerson;\n const updateCurrentPerson = props.updateCurrentStudent;\n const additionalFields = props.additionalFields;\n const additionalValidation = props.additionalValidation === undefined? {}: props.additionalValidation;\n const studentId = props.studentId;\n const onUpdate = props.onUpdate;\n const loading = currentPerson === null;\n\n const {t} = useTranslation();\n const classes = useStyles();\n const errorHandler = useErrorHandler();\n let initialValues = loading ? {} : currentPerson;\n\n\n const formik = useNormik(!newPerson, {\n initialValues: initialValues,\n validationSchema: yup.object({...{\n email: safe_email(t),\n name: yup.string().required(t(\"name_required\")),\n is_studying: yup.boolean().required(t(\"studying_required\")),\n is_working: yup.boolean().required(t(\"working_required\")),\n career: yup.string().when('is_working', {\n is: true,\n then: yup.string().required(t(\"career_required\"))\n }),\n education_entity: yup.string().when('is_studying', {\n is: true,\n then: yup.string().required(t(\"education_entity_required\"))\n }),\n education_year: yup.string().when('is_studying', {\n is: true,\n then: yup.string().required(t(\"education_year_required\"))\n })\n }, ...additionalValidation}),\n enableReinitialize: true,\n onSubmit: (changedValues, {setStatus, setSubmitting}) => {\n if (newPerson) {\n setStatus();\n dataService.post({...changedValues})\n .then(...errorHandler({snackbarSuccess: true}))\n .then(function (new_id) {\n updateCurrentPerson(new_id['id']);\n if (typeof onUpdate === 'function') onUpdate(changedValues);\n }).catch(function (err) {\n setStatus(true);\n }).finally(() => {\n setSubmitting(false);\n });\n } else {\n if (Object.keys(changedValues).length > 0) {\n setStatus();\n dataService.patch({\n id: initialValues[\"id\"],\n body: changedValues,\n initial_values: initialValues\n }).then(...errorHandler({snackbarSuccess: true}))\n .then(function (patched_body) {\n formik.resetForm(patched_body);\n updateCurrentPerson(patched_body);\n\n if (typeof onUpdate === 'function') onUpdate(changedValues);\n }).catch(function (err) {\n setStatus(true);\n }).finally(() => {\n setSubmitting(false);\n });\n\n\n } else {\n setSubmitting(false);\n }\n }\n }\n });\n\n function recursiveForm(elements) {\n if (elements === undefined) return null;\n\n return \n
\n \n \n {\n elements.map((res, idx) => (\n res == null?
\n \n :\n
\n {res instanceof Array ?\n res.map((r, idx2) => (\n React.cloneElement(r, {formik: formik, key: idx+\"-\"+idx2})\n ))\n : React.cloneElement(res, {formik: formik})}\n ))\n }\n
;\n }\n\n\n return (\n \n {loading?\n (\n\n \n \n \n\n\n \n { [\"100%\", \"100%\", \"100%\", \"100%\", \"100%\", \"100%\"].map((value, idx) => {\n return (\n \n \n );\n })}\n
\n \n )\n :\n (\n \n )\n\n }\n \n );\n}\n\n\nexport default Person;","import serviceFactory from \"./service-factory\";\n\n\nexport default new (serviceFactory('guardians'))();\n\n","import serviceFactory from \"./service-factory\";\n\n\nexport default new (serviceFactory('payments'))();\n\n","export const payment_methods = [\n \"bank-transfer\",\n \"cash\",\n \"bank-direct-debit\"\n]","const newPerson = {\n name: null,\n surname1: null,\n surname2: null,\n email: null,\n address: null,\n city: null,\n zip: null,\n dni: null,\n phone: null,\n gender: null,\n\n country_of_origin: null,\n is_studying: null,\n education_entity: null,\n education_year: null,\n is_working: null,\n career: null\n };\nexport const emptyGuardian = {...newPerson, relation: null};\nexport const emptyAttendee = {...newPerson,\n price_term: null,\n payment_comments: null,\n birth_date: null,\n other_comments: null,\n image_agreement: null,\n enrolment_status: null,\n default_payment_method: null\n};\n","import React from \"react\";\n\nconst loadingContext = React.createContext({loading: false,\n startLoading: () => {},\n stopLoading: () => {},\n}); // Create a context object\n\nexport {\n loadingContext // Export it so it can be used by other Components\n};","import {useTranslation} from \"react-i18next\";\nimport Box from \"@material-ui/core/Box\";\nimport PersonAddIcon from '@material-ui/icons/PersonAdd';\nimport {MenuItem} from \"@material-ui/core\";\nimport PropTypes from \"prop-types\";\nimport React from \"react\";\nimport StudentsDataService from \"../_services/students.service\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport * as yup from 'yup';\nimport {IconButtonSkeleton} from \"../_skeletons/iconButton\"\nimport Person from \"./students.student.person.component\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport Button from \"@material-ui/core/Button\";\nimport GuardiansDataService from \"../_services/guardians.service\";\nimport PaymentsDataService from \"../_services/payments.service\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport DeleteIcon from \"@material-ui/icons/Delete\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport DirtyTextField from \"./dirtytextfield.component\";\nimport SendIcon from \"@material-ui/icons/Send\";\nimport {sendEnrollmentEmail} from \"../_services/emailsEnrollment.service\";\nimport Divider from \"@material-ui/core/Divider\";\nimport {sendGrantEmail} from \"../_services/emailsGrants.service\";\nimport GetAppIcon from \"@material-ui/icons/GetApp\";\nimport {payment_methods} from \"../_data/payment_methods\";\nimport {emptyAttendee} from \"../_data/empty_objects\";\nimport {useNeeds} from \"../_helpers/needs\";\nimport {loadingContext} from \"../_context/loading-context\";\nimport {confirmContext} from \"../_context/confirm-context\";\nimport TextField from \"@material-ui/core/TextField\";\n\n\nconst useStyles = makeStyles((theme) => ({\n actionIcon: {\n float: 'right'\n },\n button: {\n margin: theme.spacing(1),\n },\n line: {\n width: \"100%\",\n marginTop: theme.spacing(1)\n },\n composite: {\n display: \"flex\", flexDirection: \"row\", flex: 1, flexWrap: \"wrap\",\n gap: theme.spacing(1), width: \"100%\"\n }\n}));\n\nfunction Attendee({ children, setNewStudent, addStudentId, newStudent, title, currentStudent, updateCurrentStudent, patchService, deleteStudent, addNewGuardian, ...other }) {\n const { t } = useTranslation();\n const loading = currentStudent === null;\n const classes = useStyles();\n const errorHandler = useErrorHandler();\n const [hasNeeds, NEEDS] = useNeeds();\n const confirm = React.useContext(confirmContext);\n\n const deleteFullStudent = () => {\n StudentsDataService\n .delete(currentStudent['id'])\n .then(...errorHandler({snackbarSuccess: true})) // todo everywhere\n .then(function (res) {\n PaymentsDataService\n .deleteMany(currentStudent['payments'])\n .then(...errorHandler({})) // todo everywhere\n .then(function (res) {\n\n });\n\n GuardiansDataService\n .deleteMany(currentStudent['guardians'])\n .then(...errorHandler({})) // todo everywhere\n .then(function (res) {\n\n });\n\n\n // todo schedules, courses\n\n\n deleteStudent(currentStudent['id']);\n });\n }\n const loadingCtx = React.useContext(loadingContext);\n const sendGrantLetter = () => {\n loadingCtx.startLoading();\n sendGrantEmail(currentStudent['id'])\n .then(...errorHandler({snackbarSuccess: true}))\n .finally(() => {\n loadingCtx.stopLoading();\n });\n }\n const sendEnrollmentAgreement = () => {\n loadingCtx.startLoading();\n sendEnrollmentEmail(currentStudent['id'])\n .then(...errorHandler({snackbarSuccess: true}))\n .finally(() => {\n loadingCtx.stopLoading();\n });\n }\n\n\n\n return (\n \n\n \n \n {loading?\n !newStudent && \n :\n !newStudent && hasNeeds([NEEDS.guardians, NEEDS.post]) && \n {\n addNewGuardian();\n }}>\n \n \n \n }\n\n\n {loading && !newStudent ?\n \n :\n hasNeeds([NEEDS.delete]) && \n {\n if (newStudent) {\n setNewStudent(false);\n } else {\n confirm.confirm(\"delete_student_question\",\n \"student_also_deletes\",\n () => {\n deleteFullStudent(currentStudent['id'])\n });\n }\n\n }}>\n \n \n \n }\n\n {\n if (!newStudent) return updateCurrentStudent(x);\n addStudentId(x);\n }}\n patchService={patchService}\n onUpdate={(changedBody) => {\n if (\"enrolment_status\" in changedBody && changedBody[\"enrolment_status\"] === \"enrolled\"){\n confirm.confirm(\"send_grant_letter_question\",\n \"this_will_be_sent\",\n () => {\n sendGrantLetter();\n });\n }\n }}\n additionalValidation={{\n enrolment_status: yup.string().required(t(\"status_required\")),\n image_agreement: yup.boolean().required(t(\"image_required\")),\n birth_date: yup.date().required(t(\"birthdate_required\"))\n }}\n additionalFields={\n [[€,}}\n />,\n \n { payment_methods.map(\n (method) => (\n \n )\n )\n }\n ],\n ,\n null,\n [,\n ],\n [\n \n {['enrolled', 'early-unenrolled', 'pre-enrolled'].map((s) => (\n \n ))}\n ,\n \n \n \n \n ], [,\n ,\n \n ],\n ]}\n >\n\n \n\n {!loading && !newStudent && \n \n }\n\n \n {!loading && !newStudent && hasNeeds([NEEDS.send_email]) &&\n \n \n }\n\n {!loading && !newStudent &&\n \n \n }\n \n\n \n {!loading && !newStudent && hasNeeds([NEEDS.send_email]) &&\n \n \n }\n\n {!loading && !newStudent && \n \n }\n \n \n \n \n );\n}\n\n\nexport default Attendee;","import serviceFactory from \"./service-factory\";\nimport {API_VERSION, BACKEND_URL} from \"../config\";\nimport {authHeader} from \"../_helpers/auth-header\";\nimport axios from \"axios\";\n\n\nexport const sendGrantEmail = (id) => { // todo abstract\n return new Promise(function (resolve, reject) {\n axios({\n method: 'post',\n url: `${BACKEND_URL}/emails/v1/grantEmail/${id}`,\n headers: {\n ...{\n 'Content-Type': 'application/json',\n 'Cache-Control': 'no-cache'\n }, ...authHeader()\n }\n }).then(function (res) {\n resolve(res);\n }).catch(function (err) {\n reject(err);\n });\n });\n };\n\n","import serviceFactory from \"./service-factory\";\nimport {API_VERSION, BACKEND_URL} from \"../config\";\nimport {authHeader} from \"../_helpers/auth-header\";\nimport axios from \"axios\";\n\n\nexport const sendEnrollmentEmail = (id) => { // todo abstract\n return new Promise(function (resolve, reject) {\n axios({\n method: 'post',\n url: `${BACKEND_URL}/emails/v1/enrolmentEmail/${id}`,\n headers: {\n ...{\n 'Content-Type': 'application/json',\n 'Cache-Control': 'no-cache'\n }, ...authHeader()\n }\n }).then(function (res) {\n resolve(res);\n }).catch(function (err) {\n reject(err);\n });\n });\n };\n\n","import serviceFactory from \"./service-factory\";\n\n\nexport default new (serviceFactory('students', 'guardians'))();\n\n","export const student_guardian_relations = [\n 'father',\n 'mother',\n 'grandfather',\n 'grandmother',\n 'brother',\n 'sister',\n 'uncle',\n 'aunt',\n 'cousin',\n 'legal_guardian',\n 'ss_agent',\n 'other'\n]","import {useTranslation} from \"react-i18next\";\nimport Box from \"@material-ui/core/Box\";\nimport {MenuItem} from \"@material-ui/core\";\nimport PropTypes from \"prop-types\";\nimport React, {useEffect, useState} from \"react\";\nimport StudentGuardianDataService from \"../_services/student_guardians.service\"\nimport {student_guardian_relations} from \"../_data/relations\"\nimport Person from \"./students.student.person.component\";\nimport GuardiansDataService from \"../_services/guardians.service\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport DeleteIcon from \"@material-ui/icons/Delete\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport * as yup from \"yup\";\nimport DirtyTextField from \"./dirtytextfield.component\";\nimport {emptyGuardian} from \"../_data/empty_objects\";\nimport {useNeeds} from \"../_helpers/needs\";\nimport {confirmContext} from \"../_context/confirm-context\";\n\nfunction Guardian({ studentId, title, guardianId, deleteGuardianId, addGuardianId, deleteNewGuardian, newGuardian=false, ...other }) {\n const { t } = useTranslation();\n const errorHandler = useErrorHandler();\n\n const [guardian, setGuardian] = useState(null);\n\n const [hasNeeds, NEEDS] = useNeeds();\n useEffect(() => {\n if (newGuardian) return;\n\n GuardiansDataService\n .getOne(guardianId)\n .then(...errorHandler({})) // todo everywhere\n .then(function (res) {\n setGuardian(res[\"data\"]);\n\n });\n }, [guardianId]);\nconst confirm = React.useContext(confirmContext);\n return (\n \n\n\n \n \n\n\n {hasNeeds([NEEDS.delete]) && {\n if (!newGuardian) {\n confirm.confirm(\"delete_guardian_question\", \"not_undone\", () => {\n GuardiansDataService\n .delete(guardianId)\n .then(...errorHandler({snackbarSuccess: true})) // todo everywhere\n .then(function (res) {\n deleteGuardianId(guardianId);\n });\n })\n return;\n }\n deleteNewGuardian();\n }}>\n \n \n \n }\n\n\n {\n if (!newGuardian) return setGuardian(x);\n StudentGuardianDataService.postWithId(studentId, x)\n .then(...errorHandler({snackbarSuccess: true}))\n .then(() => {\n addGuardianId(x);\n });\n }}\n patchService={GuardiansDataService}\n additionalValidation={{\n relation: yup.string().required(t(\"relation_required\"))}}\n additionalFields={\n [[\n {student_guardian_relations.map((r) => (\n \n ))}\n ))}\n\n ]]}\n />\n\n \n \n\n \n );\n}\n\nexport default Guardian;","import {useTranslation} from \"react-i18next\";\nimport React from \"react\";\nimport AccountBalanceIcon from '@material-ui/icons/AccountBalance';\nimport MoreHorizIcon from '@material-ui/icons/MoreHoriz';\nimport SendIcon from '@material-ui/icons/Send';\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport clsx from 'clsx';\nimport AccountBalanceWalletIcon from '@material-ui/icons/AccountBalanceWallet';\nimport DeleteIcon from '@material-ui/icons/Delete';\nimport ReceiptIcon from '@material-ui/icons/Receipt';\nimport Card from '@material-ui/core/Card';\nimport CardHeader from '@material-ui/core/CardHeader';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardActions from '@material-ui/core/CardActions';\nimport Collapse from '@material-ui/core/Collapse';\nimport Avatar from '@material-ui/core/Avatar';\nimport IconButton from '@material-ui/core/IconButton';\nimport EuroIcon from '@material-ui/icons/Euro';\nimport PaymentsDataService from '../_services/payments.service';\nimport {sendReceiptEmail} from '../_services/emailsReceipts.service';\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport Box from \"@material-ui/core/Box\";\nimport {Skeleton} from \"@material-ui/lab\";\nimport DirtyTextField from \"./dirtytextfield.component\";\nimport {Button, DialogActions, MenuItem} from \"@material-ui/core\";\nimport {useNormik} from \"../_helpers/normik\";\nimport * as yup from \"yup\";\nimport {one_of} from \"../_yup/validators\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport {payment_methods} from \"../_data/payment_methods\"\nimport {useNeeds} from \"../_helpers/needs\";\nimport {loadingContext} from \"../_context/loading-context\";\nimport {confirmContext} from \"../_context/confirm-context\";\nconst useStyles = makeStyles((theme) => ({\n root: {\n maxWidth: '100%',\n backgroundColor: theme.palette.type === 'dark'? '#575757': null\n },\n expand: {\n transform: 'rotate(0deg)',\n marginLeft: 'auto',\n transition: theme.transitions.create('transform', {\n duration: theme.transitions.duration.shortest,\n }),\n },\n expandOpen: {\n transform: 'rotate(180deg)',\n },\n avatar: {\n backgroundColor: theme.palette.secondary.main,\n },\n line: {\n width: \"100%\",\n marginTop: theme.spacing(1)\n },\n composite: {\n display: \"flex\", flexDirection: \"row\", flex: 1, flexWrap: \"wrap\",\n gap: theme.spacing(1), width: \"100%\"\n }\n}));\n\nexport default function PaymentCard({ payment, updatePayment, deletePayment, newPayment=false, addPaymentId, student_id} ) {\n const { t } = useTranslation();\n const classes = useStyles();\n const [expanded, setExpanded] = React.useState(newPayment);\n const errorHandler = useErrorHandler();\n const [hasNeeds, NEEDS] = useNeeds();\n const handleExpandClick = () => {\n setExpanded(!expanded);\n };\n\n const confirm = React.useContext(confirmContext);\nconst loadingCtx = React.useContext(loadingContext);\n\nconst sendReceipt = (id) => {\n loadingCtx.startLoading();\n sendReceiptEmail(id)\n .then(...errorHandler({snackbarSuccess:true}))\n .finally(() => {\n loadingCtx.stopLoading();\n });\n}\n const formik = useNormik(!newPayment, {\n initialValues: payment,\n validationSchema: yup.object({method: one_of(t, payment_methods),\n quantity: yup.number().required(t(\"import_required\")),\n date: yup.date().required(t(\"date_required\"))}), // todo\n enableReinitialize: true,\n onSubmit: (changedValues, {setStatus, setSubmitting}) => {\n if (Object.keys(changedValues).length > 0){\n setStatus();\n\n if (newPayment) {\n PaymentsDataService\n .post({...changedValues, student_id: student_id})\n .then(...errorHandler({snackbarSuccess:true}))\n .then(function (res) {\n addPaymentId(res['id']);\n confirm.confirm(\"send_receipt\", \"send_receipt\",\n () => sendReceipt(res['id']))\n }).catch(function (err){\n setStatus(true);\n })\n .finally(() => {\n setSubmitting(false);\n\n });\n } else {\n PaymentsDataService.patch({\n id: payment[\"id\"], // id\n body: changedValues,\n initial_values: payment // todo doesnt normik do this?\n }).then(...errorHandler({snackbarSuccess:true}))\n .then(function (patched_body) {\n formik.resetForm(patched_body);\n updatePayment(patched_body['id'], patched_body);\n }).catch(function (err){\n setStatus(true);\n })\n .finally(() => {\n setSubmitting(false);\n });\n\n }\n\n } else {\n setSubmitting(false);\n }\n\n }\n });\n\n\n return (\n \n \n \n \n {payment[\"method\"] === 'cash'? :\n payment[\"method\"] === 'bank-transfer'? :\n payment[\"method\"] === 'bank-direct-debit'? :\n \n }\n \n \n\n }\n action={\n hasNeeds([NEEDS.delete]) && \n {\n confirm.confirm(\"delete_payment\", \"not_undone\", () => {\n deletePayment(payment['id'])\n });\n\n }}>\n \n \n \n }\n title={newPayment? t('new_payment') : `${t(\"has_paid\")} ${payment['quantity']}€`}\n subheader={payment['date']}\n />\n\n {!newPayment && \n {hasNeeds([NEEDS.paymentReceipts]) &&\n \n {\n loadingCtx.startLoading();\n PaymentsDataService\n .downloadSubresource(payment[\"id\"], 'receipt')\n .then(...errorHandler({snackbarSuccess:true}))\n .finally(() => {\n loadingCtx.stopLoading();\n })\n }}>\n \n \n }\n {hasNeeds([NEEDS.paymentReceipts, NEEDS.send_email]) &&\n \n sendReceipt(payment['id'])}>\n \n \n }\n \n \n \n }\n \n \n \n {payment === null\n ?\n (\n\n \n {\n [\"100%\", \"100%\", \"100%\"].map((value, idx) => {\n return (\n \n \n );\n })\n }\n \n )\n :\n (\n \n )\n\n }\n \n \n \n \n );\n}\n","import serviceFactory from \"./service-factory\";\nimport {API_VERSION, BACKEND_URL} from \"../config\";\nimport {authHeader} from \"../_helpers/auth-header\";\nimport axios from \"axios\";\n\n\nexport const sendReceiptEmail = (id) => { // todo abstract\n return new Promise(function (resolve, reject) {\n axios({\n method: 'post',\n url: `${BACKEND_URL}/emails/v1/paymentReceipt/${id}`,\n headers: {\n ...{\n 'Content-Type': 'application/json',\n 'Cache-Control': 'no-cache'\n }, ...authHeader()\n }\n }).then(function (res) {\n resolve(res);\n }).catch(function (err) {\n reject(err);\n });\n });\n };\n\n","import {useTranslation} from \"react-i18next\";\nimport Box from \"@material-ui/core/Box\";\nimport Typography from \"@material-ui/core/Typography\";\nimport PropTypes from \"prop-types\";\nimport React, {useEffect, useState} from \"react\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport PaymentsDataService from \"../_services/payments.service\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport PaymentCard from \"./students.student.payments.payment.component\";\nimport {Skeleton} from \"@material-ui/lab\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport AddCircleIcon from '@material-ui/icons/AddCircle';\nimport {IconButtonSkeleton} from \"../_skeletons/iconButton\";\nimport {useNeeds} from \"../_helpers/needs\";\n\nconst getDefaultValues = () => {\n const date = new Date();\n const dd = date.getDate();\n const mm = date.getMonth() + 1; //Month from 0 to 11\n const yyyy = date.getFullYear();\n return {'id': null, 'date': `${yyyy}-${mm<=9 ? '0' + mm : mm}-${dd <= 9 ? '0' + dd : dd}`, 'quantity': null, 'concept': null, 'method': null}\n}\nconst useStyles = makeStyles((theme) => ({\n\n actionIcon: {\n float: 'right'\n },\n newLine: {\n width: '100%',\n marginTop: theme.spacing(1),\n display: \"flex\",\n flexDirection: \"column\"\n }\n}));\n\nfunction Payments({ children, title, paymentIds, deletePaymentFromStudent, addPaymentId, student_id, ...other }) {\n const { t } = useTranslation();\n const classes = useStyles();\n const errorHandler = useErrorHandler();\n const loading = paymentIds === null;\n\n const [payments, setPayments] = useState([]);\n const [newPaymentCard, setNewPaymentCard] = useState(false);\n\n useEffect(()=>{\n setNewPaymentCard(false);\n }, [payments])\n\n const updatePayment = (id, body) => {\n setPayments(payments.map(payment => {\n if (payment.id !== id) return payment;\n return body;\n }))\n }\n const [hasNeeds, NEEDS] = useNeeds();\n\n const deletePayment = (id) => {\n PaymentsDataService.delete(id)\n .then(...errorHandler({snackbarSuccess:true}))\n .then(function (r) {\n deletePaymentFromStudent(id);\n });\n }\n\n useEffect(() => {\n if (paymentIds === null) return;\n\n if (paymentIds.length === 0){\n setPayments([]);\n } else {\n PaymentsDataService\n .getMany(paymentIds)\n .then(...errorHandler({})) // todo everywhere\n .then(function (res) {\n setPayments(res.map(res => res[\"data\"]).sort((p1, p2) => p1.date.localeCompare(p2.date)));\n });\n }\n }, [paymentIds])\n\n return (\n {// todo simplify everywhere\n } \n\n {loading?\n \n :\n hasNeeds([NEEDS.post]) && \n { setNewPaymentCard(true); }}>\n \n \n \n }\n\n \n\n {\n payments && payments.map(payment =>\n (
)\n )\n }\n\n {newPaymentCard &&\n {setNewPaymentCard(false)}}\n newPayment={true}\n student_id={student_id}\n addPaymentId={addPaymentId}/>\n }\n\n {loading &&\n // todo we can do better\n }\n\n {!loading && payments.length === 0 && !newPaymentCard &&\n {t(\"no_payments\")}\n }\n \n \n \n );\n}\n\nPayments.propTypes = {\n children: PropTypes.node,\n index: PropTypes.any.isRequired,\n value: PropTypes.any.isRequired,\n};\n\nexport default Payments;","import serviceFactory from \"./service-factory\";\n\n\nexport default new (serviceFactory('schedules'))();\n\n","import React from \"react\";\n\nconst tabContext = React.createContext(\n {currentTab: null, goTo: (res) => {}}); // Create a context object\n\nexport {\n tabContext // Export it so it can be used by other Components\n};","import Box from \"@material-ui/core/Box\";\nimport React, {useEffect, useState} from \"react\";\nimport SchedulesDataService from \"../_services/schedules.service\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport FullCalendar from \"@fullcalendar/react\";\nimport timeGridPlugin from '@fullcalendar/timegrid';\nimport styled from \"@emotion/styled\";\nimport {useTheme} from '@material-ui/core/styles';\nimport interactionPlugin from '@fullcalendar/interaction';\nimport Skeleton from \"@material-ui/lab/Skeleton\";\nimport {Dialog, DialogActions, DialogContent, DialogTitle, TextField} from \"@material-ui/core\";\nimport DialogContentText from \"@material-ui/core/DialogContentText\";\nimport Button from \"@material-ui/core/Button\";\nimport {useTranslation} from \"react-i18next\";\nimport {confirmContext} from \"../_context/confirm-context\";\nimport {tabContext} from \"../_context/tab-context\";\n\n\nexport const eventFromSchedule = (theme, schedule) => {\n return {\n daysOfWeek: [schedule['day_week']],\n title: schedule['display_name'],\n groupId: [schedule['id']],\n id: schedule['id'],\n startTime: schedule['start_time'],\n endTime: schedule['end_time'],\n color: schedule[\"is_base\"] ? theme.palette.secondary.main : theme.palette.secondary.light,\n textColor: schedule[\"is_base\"] ? theme.palette.secondary.contrastText : theme.palette.secondary.contrastText,\n extendedProps: {\n schedule: schedule\n },\n }\n}\n\nfunction evaluate(expression, ...args){\n console.log(typeof expression);\n if (typeof expression === 'function'){\n return expression(...args);\n }\n\n return expression;\n}\n\nfunction Scheduler({snapDuration = '00:15',\n allowView=false, viewUrl=null,\n allowDelete=false,\n selectable=false,\n viewStudent=false, deleteCustom=false,\n scheduleIds,\n setScheduleIds,\n onEventClick, onEventSelected,\n onEventChange, editable=false, ...other}) {\n const errorHandler = useErrorHandler();\n const theme = useTheme();\n const calendarRef = React.createRef();\n const StyleWrapper = styled.div`\n .fc-button, .fc-button.fc-button-primary {\n background: ${theme.palette.primary.main};\n color: ${theme.palette.primary.contrastText};\n border-color: ${theme.palette.primary.main};\n background-image: none;\n }\n .fc-button:enabled:hover {\n background: ${theme.palette.primary.dark};\n color: ${theme.palette.primary.contrastText};\n border-color: ${theme.palette.primary.dark};\n background-image: none;\n }\n `\n\n const [schedules, setSchedules] = useState(null);\n\n\n const loading = scheduleIds === null;\n const {t} = useTranslation();\n // todo right click menu to delete\n\n\n useEffect(() => {\n if (scheduleIds === null) return;\n\n if (scheduleIds.length === 0) {\n setSchedules([]);\n } else {\n SchedulesDataService\n .getMany(scheduleIds)\n .then(...errorHandler({}))\n .then(function (res) {\n setSchedules(res.map(res => res[\"data\"]).map(schedule => {\n return eventFromSchedule(theme, schedule);\n }));\n });\n }\n }, [scheduleIds, theme]);\n\n const withScheduleInfo = (method, info) => {\n return method(info,\n info.event['start'].getDay(),\n info.event['start'].toLocaleTimeString('en-US', {hour12: false}),\n info.event['end'].toLocaleTimeString('en-US', {hour12: false}),\n info.event.extendedProps[\"schedule\"]);\n }\n const navigator = React.useContext(tabContext);\n\n const [currentSchedule, setCurrentSchedule] = React.useState({open: false, event: null, schedule: null})\n\n const handleClickOpen = (info) => {\n setCurrentSchedule({open: true, event: info.event, schedule: info.event.extendedProps['schedule']});\n };\n\n const handleClose = () => {\n setCurrentSchedule({open: false, event: null, schedule: null});\n };\n const handleView = () => {\n navigator.goTo(...evaluate(viewUrl, currentSchedule.schedule));\n handleClose();\n }\n const handleDelete = () => {\n SchedulesDataService\n .delete(currentSchedule.schedule.id)\n .then(...errorHandler({snackbarSuccess: true}))\n .then(function (res) {\n handleClose();\n setScheduleIds(scheduleIds.filter(id => id !== currentSchedule.schedule.id));\n setSchedules(schedules.filter(s => s.id !== currentSchedule.schedule.id));\n });\n }\n\n return (\n \n {loading ? \n :\n \n \n \n ', // >\n prevYear: '<<', // <<\n nextYear: '>>', // >>\n today: 'today',\n month: 'month',\n week: 'week',\n day: 'day'\n }}\n selectable={selectable}\n selectMirror={true}\n dayMaxEvents={true}\n weekends={true}\n snapDuration={snapDuration}\n events={schedules}\n eventAdd={function () {\n }}\n eventChange={function (clickInfo) {\n // const schedule = clickInfo.event.extendedProps[\"schedule\"];\n // if (schedule[\"is_base\"] === true) return enqueueSnackbar(t(\"cant_remove_schedule\"), {'variant': 'warning'});\n }}\n eventRemove={function () {\n }}\n select={function (selectInfo) {\n selectInfo.view.calendar.unselect();\n onEventSelected( selectInfo.start.getDay(),\n selectInfo.start.toLocaleTimeString('en-US', {hour12: false}),\n selectInfo.end.toLocaleTimeString('en-US', {hour12: false}),)\n }}\n eventContent={function () {\n }} // custom render function\n eventClick={(info) => {\n /* let calendarApi = calendarRef.current.getApi();\n console.log(calendarApi.getEventById(info.event.id).remove());\n setSchedules(schedules.filter(s=>s.id !== info.event.id));*/\n handleClickOpen(info);\n }}\n eventTimeFormat={{\n hour: '2-digit',\n minute: '2-digit',\n hour12: false\n }}\n eventResize={(info) => (withScheduleInfo(onEventChange, info))}\n eventDrop={(info) => (withScheduleInfo(onEventChange, info))}\n />\n \n \n }\n \n );\n}\n\nexport default Scheduler;","import {useTranslation} from \"react-i18next\";\nimport React from \"react\";\nimport SchedulesDataService from \"../_services/schedules.service\";\nimport {makeStyles, useTheme} from \"@material-ui/core/styles\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport {useSnackbar} from \"notistack\";\nimport Scheduler, {eventFromSchedule} from \"./scheduler.component\";\nimport {confirmContext} from \"../_context/confirm-context\";\nconst useStyles = makeStyles((theme) => ({\n button: {\n margin: theme.spacing(1),\n },\n calendar: {\n margin: theme.spacing(2)\n }\n\n}));\n\n\nfunction Schedule({ title, scheduleIds, setScheduleIds, student_id, ...other }) {\n const classes = useStyles();\n const errorHandler = useErrorHandler();\n const theme = useTheme();\n\n return (\n \n\n
\n );\n}\n\nexport default Schedule;","import serviceFactory from \"./service-factory\";\n\n\nexport default new (serviceFactory('students', 'courses'))();\n\n","import serviceFactory from \"./service-factory\";\n\n\nexport default new (serviceFactory('courses'))();\n\n","import React from 'react';\nimport {makeStyles} from '@material-ui/core/styles';\nimport Paper from '@material-ui/core/Paper';\nimport InputBase from '@material-ui/core/InputBase';\nimport IconButton from '@material-ui/core/IconButton';\nimport SearchIcon from '@material-ui/icons/Search';\nimport {useTranslation} from \"react-i18next\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n padding: '2px 4px',\n display: 'flex',\n alignItems: 'center',\n width: '100%',\n },\n input: {\n marginLeft: theme.spacing(1),\n flex: 1,\n },\n iconButton: {\n padding: 10,\n }\n}));\n\nexport default function SearchBar({label, searchTitle, onChange, onSearch}) {\n const classes = useStyles();\n\n const { t } = useTranslation();\n\n return (\n \n \n { if(e.key === 'Enter'){\n onSearch();\n e.preventDefault();\n } }}\n\n />\n \n \n \n \n );\n}","import React from \"react\";\n\nconst themeContext = React.createContext({theme: null, switchTheme: () => {}, label: null}); // Create a context object\n\nexport {\n themeContext // Export it so it can be used by other Components\n};","import React from 'react';\nimport {makeStyles} from '@material-ui/core/styles';\nimport {useTranslation} from \"react-i18next\";\nimport {Chip, CircularProgress} from \"@material-ui/core\";\nimport Avatar from \"@material-ui/core/Avatar\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport {themeContext} from \"../_context/theme-context\";\nimport {loadingContext} from \"../_context/loading-context\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n padding: '2px 4px',\n display: 'flex',\n alignItems: 'center',\n flexWrap: 'wrap'\n },\n}));\n\nexport default function ExportSearchChip({searchTermField=\"full_name\", searchTerm=null, page=null, dataService, exportAll=false, getFilters=null}) {\n const classes = useStyles();\n\n const {t} = useTranslation();\n const errorHandler = useErrorHandler();\n const loadingCtx = React.useContext(loadingContext);\n\n return (\n \n\n csv}\n label={t(exportAll ? \"export_all\" : \"export\")}\n onClick={() => {\n if (loadingCtx.loading) return;\n\n loadingCtx.startLoading();\n dataService\n .downloadCsv(searchTermField, searchTerm,\n exportAll ? \"*\" : page,\n getFilters === null ? {} : getFilters(),\n exportAll)\n .then(...errorHandler({}))\n .finally(() => {\n loadingCtx.stopLoading();\n })\n }}/>\n \n\n );\n}","import React, {useEffect, useState} from \"react\";\nimport Pagination from '@material-ui/lab/Pagination';\nimport ListItem from \"@material-ui/core/ListItem\";\nimport List from \"@material-ui/core/List\";\nimport ListItemAvatar from \"@material-ui/core/ListItemAvatar\";\nimport Avatar from \"@material-ui/core/Avatar\";\nimport ListItemText from \"@material-ui/core/ListItemText\";\nimport makeStyles from \"@material-ui/core/styles/makeStyles\";\nimport Divider from \"@material-ui/core/Divider\";\nimport SearchBar from './searchbar.component'\nimport Box from \"@material-ui/core/Box\";\nimport {useTranslation} from \"react-i18next\";\nimport {Accordion, AccordionDetails, AccordionSummary, Chip, ListItemSecondaryAction} from \"@material-ui/core\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport GetAppIcon from '@material-ui/icons/GetApp';\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport ExpandMoreIcon from \"@material-ui/icons/ExpandMore\";\nimport Typography from \"@material-ui/core/Typography\";\nimport ExportSearchChip from \"./ExportSearchChip.component\";\nimport {useNeeds} from \"../_helpers/needs\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n flex: 1,\n overflow: 'auto',\n display: \"flex\",\n flexDirection: \"column\"\n },\n list: {\n overflow: \"auto\",\n display: \"flex\",\n flexDirection: \"column\",\n flex: 1,\n minHeight: '150px'\n },\n searchAndFilters: {\n display: \"flex\",\n flexDirection: \"column\",\n },\n pagination: {\n margin: theme.spacing(3)\n },\n chip: {\n margin: theme.spacing(2)\n },\n avatar: {},\n selectedAvatar: {\n backgroundColor: theme.palette.primary.dark\n },\n chips: {\n flexWrap: 'wrap',\n '& > *': {\n margin: theme.spacing(0.5),\n },\n heading: {\n fontSize: theme.typography.pxToRem(15),\n fontWeight: theme.typography.fontWeightRegular,\n },\n },\n noResults: {\n textAlign: 'center'\n }\n}));\n\nconst ItemsList = ({setCurrentItemId=() => {}, auxFields = [], displayText = null, onItemClick = () => {}, parent_id=null, secondaryDisplayNameField=null,\n secondaryAction=null, secondaryActionNeeds=[], secondaryActionTooltip=null, secondaryActionIcon=null, secondaryActionCallable=null,\n withAvatar=true, withFiltersBox = true,\n chips=[], currentItemId = null, items, setItems, displayNameField=\"full_name\",\n usableFilters=[], defaultSearchBy=\"full_name\", searchByOptions=[\"full_name\"],\n dataService, searchBarLabel, exportPage=true, exportAllPages=true}) => {\n \n \n const [searchTerm, setSearchTerm] = useState(\"\");\n const [filters, setFilters] = useState(usableFilters.reduce((map, f) => {\n map[f.name] = f.initialValue;\n return map;\n }, {})\n );\n const [searchBy, setSearchBy] = useState(defaultSearchBy);\n\n const {t} = useTranslation();\n\n const [page, setPage] = useState(1);\n const [count, setCount] = useState(0);\n const errorHandler = useErrorHandler();\n const [hasNeeds, NEEDS] = useNeeds();\n\n const classes = useStyles();\n\n const onChangeSearchTerm = (e) => {\n setSearchTerm(e.target.value);\n };\n\n const resetSearchBy = () => {\n setSearchBy(defaultSearchBy);\n }\n\n function getFilters(){\n return Object.fromEntries(Object.entries(filters).filter(([k,v]) => (v !== null)))\n }\n\n function search() {\n dataService\n .getAll({name: searchBy, value: searchTerm}, page, [...new Set(['id', displayNameField, secondaryDisplayNameField === null? 'id': secondaryDisplayNameField, ...auxFields])], getFilters(), parent_id)\n .then(...errorHandler({}))\n .then(function (res) {\n setItems(res[\"data\"]);\n setCount(res[\"_pagination\"][\"totalPages\"]);\n });\n }\n\n // we don't want the search to trigger for each searchTerm change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(() => {\n if (page === 1) {\n search(); // no need to change page, since we are at page 1\n } else {\n setPage(1); // will trigger search due tot the effect below\n }\n }, [filters]); // todo\n\n useEffect(search, [page, searchBy, parent_id]);\n\n const handlePageChange = (event, value) => {\n setPage(value);\n };\n\n return (\n \n \n {\n if (page === 1){\n search();\n } else {\n setPage(1); // search will be triggered\n }\n\n }}\n />\n\n {withFiltersBox && \n }>\n {t(\"filters_actions\")}\n \n \n \n\n {exportPage && Array.isArray(items) && items.length > 0 && }\n {exportAllPages && Array.isArray(items) && items.length > 0 && }\n\n {chips.map((chip) => (\n chip\n ))}\n\n ·\n\n {searchByOptions.map(option => (\n \n {\n if (searchBy === option) {\n resetSearchBy();\n } else {\n setSearchBy(option);\n }\n }}/>\n \n ))}\n\n\n {usableFilters.map(f => (\n \n · {f['options'].map(option => (\n \n {\n setFilters({\n ...filters,\n [f.name]: (filters[f.name] === option.name) ? null : option.name\n })\n }}/>\n \n )\n )}\n\n ))\n }\n \n \n }\n\n\n \n \n \n \n \n {items && items.map((item) => (\n \n
{\n onItemClick(item['id']);\n setCurrentItemId(item['id']);\n }}>\n {withAvatar && \n {item[displayNameField].charAt(0).toUpperCase()}\n }\n \n\n {secondaryAction && hasNeeds(secondaryActionNeeds) &&\n \n \n {\n secondaryActionCallable(item['id']);\n }}>\n {secondaryActionIcon}\n \n \n }\n \n
\n
\n ))}\n {\n (items.length === 0) && \n {t(\"no_results\") +\" 👀\"}\n \n }\n
\n \n );\n};\n\nexport default ItemsList;\n","import React from \"react\";\nimport {useTranslation} from \"react-i18next\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport ItemsList from \"./items_list.component\";\nimport DeleteIcon from \"@material-ui/icons/Delete\";\nimport {NEEDS} from \"../_helpers/needs\";\nimport {confirmContext} from \"../_context/confirm-context\";\n\n\nconst ItemsListSecondary = ({dataService, displayText, auxFields, parent_id, deleteTooltip, delete_message, onItemDeleted = () => {}, ...props}) => {\n const errorHandler = useErrorHandler();\n const confirm = React.useContext(confirmContext);\n const {t} = useTranslation();\n\n return {\n confirm.confirm(delete_message, \"not_undone\", () => {\n dataService\n .delete(parent_id, id)\n .then(...errorHandler({snackbarSuccess:true}))\n .then(function (r) {\n onItemDeleted(id);\n });\n });\n }}\n parent_id={parent_id}\n displayText={displayText}\n auxFields={auxFields}\n secondaryActionTooltip={deleteTooltip}\n secondaryActionNeeds={[NEEDS.delete]}\n secondaryActionIcon={}\n dataService={dataService}\n {...props}\n />\n};\n\nexport default ItemsListSecondary;\n","import React, {useState} from \"react\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport ItemsList from \"./items_list.component\";\nimport {confirmContext} from \"../_context/confirm-context\";\n\n\nconst ItemsListTerciary = ({dataService, dataServiceSR, add_message, parent_id, onAdded = () => {}, ...props}) => {\n const errorHandler = useErrorHandler();\n const confirm = React.useContext(confirmContext);\n const [items, setItems] = useState([]);\n return {\n confirm.confirm(add_message,null, () => {\n if (dataServiceSR === null) return onAdded(id, null);\n dataServiceSR\n .postWithId(parent_id, id)\n .then(...errorHandler({snackbarSuccess: true}))\n .then((newItem) => {\n onAdded(id, newItem[\"data\"]);\n })\n });\n\n }\n }\n {...props}\n />\n};\n\nexport default ItemsListTerciary;\n","import {useTranslation} from \"react-i18next\";\nimport Box from \"@material-ui/core/Box\";\nimport Typography from \"@material-ui/core/Typography\";\nimport React, {useState} from \"react\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport AddCircleIcon from '@material-ui/icons/AddCircle';\nimport {\n AppBar,\n Dialog,\n Slide\n} from \"@material-ui/core\";\nimport Toolbar from \"@material-ui/core/Toolbar\";\nimport Button from \"@material-ui/core/Button\";\nimport {IconButtonSkeleton} from \"../_skeletons/iconButton\";\nimport {useNeeds} from \"../_helpers/needs\";\nimport ItemsListSecondary from \"./items_list_secondary.component\";\nimport ItemsListTerciary from \"./items_list_terciary.component\";\nimport Skeleton from \"@material-ui/lab/Skeleton\";\nimport {tabContext} from \"../_context/tab-context\";\n\nconst Transition = React.forwardRef(function Transition(props, ref) {\n return ;\n});\n\n\nconst useStyles = makeStyles((theme) => ({\n list: {\n overflow: \"auto\",\n display: \"flex\",\n flexDirection: \"column\",\n flex: 1\n },\n box: {\n display: \"flex\",\n flexDirection: \"column\",\n },\n pagination: {\n margin: '30px'\n },\n appBar: {\n position: 'relative',\n },\n newLine: {\n width: '100%',\n marginTop: theme.spacing(1),\n display: \"flex\",\n flexDirection: \"column\"\n },\n title: {\n marginLeft: theme.spacing(2),\n flex: 1,\n }, actionIcon: {\n float: 'right'\n }\n}));\n\n\nfunction AddDeleteSubresource({ defaultSearchBy, withFiltersBox=false, displayText, auxFields, parentItemDataService, itemDataService, add_message_confirm, parent_id, secondaryDisplayNameField, searchByOptions, resourceName, displayNameField, add_message,onSubresourceAdded, onSubresourceDeleted, usableFilters, ...other}) {\n const { t } = useTranslation();\n const classes = useStyles();\n\n const [addDialogOpen, setAddDialogOpen] = useState(false);\n const handleAddDialogClose = () => {\n setAddDialogOpen(false);\n };\n const handleAddDialogOpen = () => {\n setAddDialogOpen(true);\n }\n\n const [hasNeeds, NEEDS] = useNeeds();\n const loading = parent_id === null;\n const [items, setItems] = useState([]);\nconst navigator = React.useContext(tabContext);\n\n return (\n\n {// todo simplify everywhere\n } \n\n \n\n {loading?\n \n :\n hasNeeds([NEEDS.post]) && \n \n \n \n \n }\n\n\n \n {loading?\n \n :\n {\n setItems(items.filter(x => x.id !== id));\n onSubresourceDeleted(id);\n }}\n onItemClick={(id) => {\n navigator.goTo(resourceName, id);\n }}\n />}\n
\n \n \n\n );\n}\n\nexport default AddDeleteSubresource;\n","import React from \"react\";\n\nexport function a11yProps(index) {\n return {\n id: `full-width-tab-${index}`,\n 'aria-controls': `full-width-tabpanel-${index}`,\n };\n}\n\nfunction TabFrame({ value, index, children, ...other }) {\n return (\n \n {children}\n
\n );\n}\n\nexport default TabFrame;","import React, {useEffect, useState} from 'react';\nimport {makeStyles} from '@material-ui/core/styles';\nimport Paper from '@material-ui/core/Paper';\nimport {useTranslation} from \"react-i18next\";\nimport SwipeableViews from 'react-swipeable-views';\nimport AppBar from '@material-ui/core/AppBar';\nimport Tabs from '@material-ui/core/Tabs';\nimport Tab from '@material-ui/core/Tab';\nimport useTheme from \"@material-ui/core/styles/useTheme\";\nimport Attendee from \"./students.student.attendee.component\";\nimport Guardian from \"./students.student.guardian.component\";\nimport StudentsDataService from \"../_services/students.service\";\nimport Payments from \"./students.student.payments.component\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport Schedule from \"./students.student.schedule.component\";\nimport StudentsCourseDataService from \"../_services/student_courses.service\";\nimport CoursesDataService from \"../_services/courses.service\";\nimport {useNeeds} from \"../_helpers/needs\";\nimport AddDeleteSubresource from \"./subresource_add_delete.component\";\nimport TabFrame, {a11yProps} from \"./tab\";\nimport SchedulesDataService from \"../_services/schedules.service\";\nimport Scheduler, {eventFromSchedule} from \"./scheduler.component\";\n\nconst useStyles = makeStyles((theme) => ({\n contentPanel: {\n //flex: 1,\n position: 'relative', // todo proper scrollbar\n overflow: \"auto\",\n boxSizing: \"border-box\",\n height: '100%', // todo proper,\n display: 'flex',\n flexDirection: 'column'\n },\n content: {\n overflowX: 'hidden',\n display: 'flex',\n flexDirection: 'column',\n overflowY: 'auto',\n flex: 1,\n height: '100%'\n },\n tab: {\n height: '100%'\n }\n}));\n\n\n\n\nexport default function Student({setNewStudent,newStudent,addStudentId, currentStudentId, deleteStudent, ...props}) {\n\n const loading = currentStudentId === null;\n\n const errorHandler = useErrorHandler();\n\n const [student, setStudent] = useState(null); // todo rename to student\n const [newGuardian, setNewGuardian] = useState(false);\n const [hasNeeds, NEEDS] = useNeeds();\n\n\n useEffect(() => {\n if (loading) return setStudent(null);\n StudentsDataService\n .getOne(currentStudentId)\n .then(...errorHandler({})) // todo everywhere\n .then(function (res) {\n setStudent(res[\"data\"]);\n });\n }, [currentStudentId])\n\n const classes = useStyles();\n const theme = useTheme();\n const { t } = useTranslation();\n const [value, setValue] = React.useState(0);\n const handleChange = (event, newValue) => {\n setValue(newValue);\n };\n\n useEffect(()=>{\n setValue(0);\n }, [currentStudentId])\n\n const handleChangeIndex = (index) => {\n setValue(index);\n };\n\n\n\n const guardians = student === null? []: student.guardians;\n // todo maybe tabs with or only with icons\n return (\n \n \n \n \n\n { !newStudent && hasNeeds([NEEDS.schedules]) &&\n }\n { !newStudent && hasNeeds([NEEDS.payments]) && }\n { !newStudent && hasNeeds([NEEDS.courses]) && }\n\n {\n (!newStudent && guardians && hasNeeds([NEEDS.guardians]) ) && guardians.map((contact, index) => (\n \n ))}\n\n\n {\n (!newStudent && newGuardian) &&\n \n }\n\n\n \n \n \n \n {\n setNewGuardian(true);\n setValue(4+guardians.length);\n }}/>\n \n\n {hasNeeds([NEEDS.schedules]) && \n !s.is_base}\n allowView={true}\n viewUrl={(s) => ['/courses', s.course_id]}\n setScheduleIds={(ids) => setStudent({...student, schedules: ids})}\n onEventChange={(info, day_week, start_time, end_time, schedule) => {\n const newEvent = info.event;\n let body = {};\n body['day_week'] = day_week;\n body['start_time'] = start_time;\n body['end_time'] = end_time;\n\n if (schedule[\"is_base\"]) {\n body['course_id'] = schedule[\"course_id\"];\n body['student_id'] = currentStudentId;\n SchedulesDataService\n .post(body)\n .then(...errorHandler({errorOut: true, snackbarSuccess: true}))\n .then(function (res) {\n let calendarApi = info.view.calendar;\n newEvent['is_base'] = false; // todo needed?\n calendarApi.addEvent(eventFromSchedule(theme, res));\n info.revert();\n setStudent({...student, schedules: [...student.schedules, res.id]})\n }).catch(function(err){\n info.revert();\n });\n\n } else {\n SchedulesDataService\n .patch({id: schedule['id'],\n body: body,\n initial_values: schedule})\n .then(...errorHandler({errorOut: true, snackbarSuccess: true}))\n .then(function (res) {\n }).catch(function (err){\n info.revert();\n });\n }\n }}\n scheduleIds={student === null ? null : student['schedules']}\n editable={true}\n selectable={false}\n />\n\n }\n {hasNeeds([NEEDS.payments]) && \n {\n setStudent({...student, payments: [...student.payments, payment_id]})\n }}\n student_id={currentStudentId}\n deletePaymentFromStudent={(payment_id) => {\n setStudent({\n ...student,\n payments: student.payments.filter((p) => p !== payment_id)\n });\n }}\n />}\n\n {hasNeeds([NEEDS.courses]) &&\n\n {\n setStudent({...student, courses: [...student[\"courses\"], id]})\n }}\n onSubresourceDeleted={(id) => {\n setStudent({...student, courses: student[\"courses\"].filter(x => x !== id)});\n }}\n />\n }\n\n {\n guardians && hasNeeds([NEEDS.guardians]) && guardians.map((guardian, index) => (\n \n {\n setStudent({...student, guardians: student['guardians'].filter((gId) => gId !== id)});\n setValue(0);\n }}\n />\n ))}\n\n \n {\n setNewGuardian(false);\n setValue(0);\n }}\n studentId={currentStudentId}\n addGuardianId={(id) => {\n setNewGuardian(false);\n setStudent({...student, guardians: [...student.guardians, id]});\n setValue(4+guardians.length);\n }\n }\n deleteGuardianId={(id) => {\n setStudent({...student, guardians: student['guardians'].filter((gId) => gId !== id)});\n setValue(0);\n }}\n />\n\n \n\n \n );\n}\n","import React from \"react\";\nimport {useTranslation} from \"react-i18next\";\nimport GetAppIcon from '@material-ui/icons/GetApp';\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport ItemsList from \"./items_list.component\";\n\n\nconst ItemsListMain = ({dataService, ...props}) => {\n const errorHandler = useErrorHandler();\n const {t} = useTranslation();\n\n\n return {\n dataService\n .downloadOneCsv(id)\n .then(...errorHandler({}));\n }}\n secondaryActionTooltip={t(\"export\") + \" .csv\"}\n secondaryActionIcon={}\n dataService={dataService}\n {...props}\n />\n};\n\nexport default ItemsListMain;\n","import React, {useEffect, useState} from 'react';\nimport {makeStyles} from '@material-ui/core/styles';\nimport Grid from '@material-ui/core/Grid';\nimport {useTranslation} from \"react-i18next\";\nimport Student from \"./students.student.component\";\nimport Fab from \"@material-ui/core/Fab\";\nimport AddIcon from \"@material-ui/icons/Add\";\nimport {Chip, Tooltip} from \"@material-ui/core\";\nimport StudentsDataService from \"../_services/students.service\";\nimport ItemsList from \"./items_list.component\";\nimport ExportSearchChip from \"./ExportSearchChip.component\";\nimport Avatar from \"@material-ui/core/Avatar\";\nimport {downloadGodFile} from \"../_services/god.service\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport {useNeeds} from \"../_helpers/needs\";\nimport {loadingContext} from \"../_context/loading-context\";\nimport ItemsListMain from \"./items_list_main.component\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n height: '100%'\n },\n left: {\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n position: 'relative',\n\n },fab: {\n position: 'absolute',\n bottom: theme.spacing(2),\n right: theme.spacing(2),\n }\n}));\n\n\nexport default function Students({...other}) {\n const classes = useStyles();\n const { t } = useTranslation();\n\n const [students, setStudents] = useState([]);\n const [newStudent, setNewStudent] = useState(false);\n const [currentStudentId, setCurrentStudentId] = useState(null);\n const handleError = useErrorHandler();\n const query = new URLSearchParams(window.location.search);\n const id = query.get('id');\n const [hasNeeds, NEEDS] = useNeeds();\n useEffect(() => {\n if (id !== null && id !== undefined) setCurrentStudentId(id);\n }, [id]);\n const loadingCtx = React.useContext(loadingContext);\n\n\n useEffect(() => {\n if (currentStudentId !== null) setNewStudent(false);\n }, [currentStudentId])\n\n return (\n \n \n {t(\"students\")}
\n \n csv}\n label={t(\"export_all_plus\")}\n onClick={() => {\n if (loadingCtx.loading) return;\n loadingCtx.startLoading();\n downloadGodFile()\n .then(...handleError({}))\n .finally(() => {\n loadingCtx.stopLoading();\n })\n }}/>\n \n ]}\n usableFilters={[{\n name: 'enrolment_status',\n defaultValue: null,\n options: [\n {\n label: \"enrolled\",\n tooltip: \"only_enrolled\",\n name: 'enrolled'\n }, {\n label: \"pre-enrolled\",\n tooltip: \"only_preenrolled\",\n name: 'pre-enrolled'\n }, {\n label: \"early-unenrolled\",\n tooltip: \"only_earlyunenrolled\",\n name: 'early-unenrolled'\n }\n ]\n },\n {\n name: 'default_payment_method',\n defaultValue: null,\n options: [\n {label: \"cash\", tooltip: \"only_cash\", name: 'cash'},\n {label: \"bank-transfer\", tooltip: \"only_banktransfer\", name: 'bank-transfer'},\n {\n label: \"bank-direct-debit\",\n tooltip: \"only_bankdirectdebit\",\n name: 'bank-direct-debit'\n }\n ]\n }]}\n defaultSearchBy=\"full_name\"\n searchByOptions={[\"full_name\", \"id\"]}\n dataService={StudentsDataService}\n searchBarLabel=\"students\"\n />\n\n {hasNeeds([NEEDS.post]) && \n {\n setCurrentStudentId(null);\n setNewStudent(true);\n }}>\n \n \n }\n \n\n \n {\n setCurrentStudentId(id);\n }}\n deleteStudent={(studentId) => {\n if (studentId === currentStudentId) setCurrentStudentId(null);\n\n setStudents(students.filter((s) => s['id'] !== studentId));\n }}\n />\n \n \n );\n}\n","import DirtyTextField from \"./dirtytextfield.component\";\nimport {useTranslation} from \"react-i18next\";\nimport {MenuItem} from \"@material-ui/core\";\n\nexport default function RoleSelect({formik}) {\n const { t } = useTranslation();\n\n return \n {[{name: 'administrator',\n id: 'administrator'},\n {name: 'administrative',\n id: 'administrative'},\n {name: 'layman',\n id: 'layman'},\n {name: 'teacher',\n id: 'teacher'},\n {name: 'empty',\n id: 'empty'},\n {name: 'no role',\n id: null}].map((role) => (\n \n ))}\n;\n}","import axios from \"axios\";\nimport {authHeader} from \"../_helpers/auth-header\";\nimport {BACKEND_URL} from \"../config\";\n\nexport const invitationsService = {\n inviteUser\n};\n\nfunction inviteUser(userEmail, role) {\n return new Promise(function(resolve, reject) {\n axios({url: `${BACKEND_URL}/user-invites/v1/request`, // todo server url\n method: 'POST',\n headers: {...{'Cache-Control': 'no-cache'}, ...authHeader()},\n data: {\n user_email: userEmail,\n role_id: role\n }\n }).then(res => {\n resolve(true);\n }).catch(function (res) {\n reject(res);\n });\n });\n}\n","import serviceFactory from \"./service-factory\";\n\n\nexport default new (serviceFactory('users'))();\n\n","import serviceFactory from \"./service-factory\";\n\n\nexport default new (serviceFactory('teachers'))();\n\n","import {useTranslation} from \"react-i18next\";\nimport Box from \"@material-ui/core/Box\";\nimport React, {useState} from \"react\";\nimport Typography from \"@material-ui/core/Typography\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport AddCircleIcon from '@material-ui/icons/AddCircle';\nimport {\n AppBar,\n Dialog,\n Slide\n} from \"@material-ui/core\";\nimport InputAdornment from '@material-ui/core/InputAdornment';\nimport EditIcon from '@material-ui/icons/Edit';\nimport TeachersDataService from \"../_services/teachers.service\";\nimport Toolbar from \"@material-ui/core/Toolbar\";\nimport Button from \"@material-ui/core/Button\";\nimport {IconButtonSkeleton} from \"../_skeletons/iconButton\";\nimport {useNeeds} from \"../_helpers/needs\";\nimport ItemsListTerciary from \"./items_list_terciary.component\";\nimport Skeleton from \"@material-ui/lab/Skeleton\";\nimport * as yup from 'yup';\nimport DialogTitle from \"@material-ui/core/DialogTitle\";\nimport DialogActions from \"@material-ui/core/DialogActions\";\nimport UsersDataService from \"../_services/users.service\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport DeleteIcon from \"@material-ui/icons/Delete\";\nimport DirtyTextField from \"./dirtytextfield.component\";\nimport {useNormik} from \"../_helpers/normik\";\nimport SaveButton from \"./formik_save_button\";\nimport DiscardButton from \"./formik_discard_button\";\nimport {safe_email_required} from \"../_yup/validators\";\nimport {confirmContext} from \"../_context/confirm-context\";\nimport RoleSelect from \"./user.role-select.component\";\n\n\nconst Transition = React.forwardRef(function Transition(props, ref) {\n return ;\n });\n\nconst useStyles = makeStyles((theme) => ({\n actionIcon: {\n float: 'right'\n },\n button: {\n margin: theme.spacing(1),\n },\n line: {\n width: \"100%\",\n marginTop: theme.spacing(1)\n },\n composite: {\n display: \"flex\", flexDirection: \"row\", flex: 1, flexWrap: \"wrap\",\n gap: theme.spacing(1), width: \"100%\"\n },\n list: {\n overflow: \"auto\",\n display: \"flex\",\n flexDirection: \"column\",\n flex: 1\n },\n box: {\n display: \"flex\",\n flexDirection: \"column\",\n },\n pagination: {\n margin: '30px'\n },\n appBar: {\n position: 'relative',\n },\n newLine: {\n width: '100%',\n marginTop: theme.spacing(1),\n display: \"flex\",\n flexDirection: \"column\"\n },\n title: {\n marginLeft: theme.spacing(2),\n flex: 1,\n }, actionIcon: {\n float: 'right'\n }\n}));\n\n\n \nfunction UserPerson({ children, addStudentId, newStudent, title, currentStudent, updateCurrentStudent, patchService, deleteStudent, addNewGuardian, ...other }) {\n const { t } = useTranslation();\n const loading = currentStudent === null;\n const classes = useStyles();\n const errorHandler = useErrorHandler();\n const [addDialogOpen, setAddDialogOpen] = useState(false);\n const handleAddDialogClose = () => {\n setAddDialogOpen(false);\n };\n const handleAddDialogOpen = () => {\n setAddDialogOpen(true);\n }\nconst confirm = React.useContext(confirmContext);\nconst deleteFullUser = () => {\n UsersDataService\n .delete(currentStudent['id'])\n .then(...errorHandler({snackbarSuccess: true})) // todo everywhere\n .then(function (res) {\n deleteStudent(currentStudent['id']);\n });\n }\n\n\n let initialValues = loading ? {} : currentStudent;\n\n\n const formik = useNormik(true, {\n initialValues: initialValues,\n validationSchema: yup.object({\n email: safe_email_required(t),\n name: yup.string().required(t(\"name_required\")),\n role_id: yup.string().nullable()\n }),\n enableReinitialize: true,\n onSubmit: (changedValues, {setStatus, setSubmitting}) => {\n if (Object.keys(changedValues).length > 0) {\n setStatus();\n\n UsersDataService.patch({\n id: initialValues[\"id\"],\n body: changedValues,\n initial_values: initialValues\n }).then(...errorHandler({snackbarSuccess: true}))\n .then(function (patched_body) {\n formik.resetForm(patched_body);\n updateCurrentStudent(patched_body);\n }).catch(function (err) {\n setStatus(true);\n }).finally(() => {\n setSubmitting(false);\n });\n } else {\n setSubmitting(false);\n }\n }\n });\nconst [hasNeeds, NEEDS] = useNeeds();\n return (\n \n \n \n\n {loading ?\n \n :\n hasNeeds([NEEDS.delete]) && \n {\n confirm.confirm(\"delete_user_question\", \"not_undone\", () => {\n deleteFullUser();\n })\n }}>\n \n \n \n }\n\n {loading?\n (\n\n \n \n \n\n\n \n { [\"100%\", \"100%\", \"100%\"].map((value, idx) => {\n return (\n \n \n );\n })}\n
\n \n )\n :\n (\n \n )\n\n }\n\n \n \n\n );\n}\n\nexport default UserPerson;","import serviceFactory from \"./service-factory\";\n\n\nexport default new (serviceFactory('users', 'needs'))();\n\n","import React, {useEffect} from 'react';\nimport {makeStyles} from '@material-ui/core/styles';\nimport {useTranslation} from \"react-i18next\";\nimport {Checkbox, FormControlLabel} from \"@material-ui/core\";\nimport {allNeeds} from \"../_data/needs\";\nimport Typography from \"@material-ui/core/Typography\";\nimport createStyles from \"@material-ui/styles/createStyles\";\nimport TextField from \"@material-ui/core/TextField\";\nimport useTheme from \"@material-ui/core/styles/useTheme\";\n\nconst useStyles = makeStyles(theme => (createStyles({\n root: dirty => ({\n color: dirty? theme.palette.neutral.status.dirty: theme.palette.neutral.emphasisText.medium,\n \"&.Mui-checked\": {\n color: dirty? theme.palette.neutral.status.dirty: theme.palette.primary.main\n }\n\n})})));\n\n\nconst DirtyCheckbox = ({name, value, formik, noDirty=false, ...props}) => {\n const dirty = noDirty === true? false: formik.values[name] !== undefined && formik.initialValues[name] !== undefined && formik.values[name].includes(value) !== formik.initialValues[name].includes(value);\n\n const classes = useStyles(dirty);\n\n\n return \n}\n\nexport default DirtyCheckbox;","export const symmetricDifference = (setA, setB) => {\n let _difference = new Set(setA)\n for (let elem of setB) {\n if (_difference.has(elem)) {\n _difference.delete(elem)\n } else {\n _difference.add(elem)\n }\n }\n return _difference\n}","import {useTranslation} from \"react-i18next\";\nimport Box from \"@material-ui/core/Box\";\nimport React from \"react\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport {Skeleton} from \"@material-ui/lab\";\nimport {IconButtonSkeleton} from \"../_skeletons/iconButton\"\nimport UsersNeedsDataService from \"../_services/user_needs.service\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport {useNormik} from \"../_helpers/normik\";\nimport NeedsSelection from \"./needs_selection.component\";\nimport SaveButton from \"./formik_save_button\";\nimport DiscardButton from \"./formik_discard_button\";\nimport {symmetricDifference} from \"../_helpers/set_operations\";\n\nconst useStyles = makeStyles((theme) => ({\n actionIcon: {\n float: 'right'\n },\n button: {\n margin: theme.spacing(1),\n },\n line: {\n width: \"100%\",\n marginTop: theme.spacing(1)\n },\n composite: {\n display: \"flex\", flexDirection: \"row\", flex: 1, flexWrap: \"wrap\",\n gap: theme.spacing(1), width: \"100%\"\n }\n}));\n\nfunction UserPerson({ children, addStudentId, newStudent, currentStudent, updateCurrentStudent, patchService, deleteStudent, addNewGuardian, ...other }) {\n const { t } = useTranslation();\n const loading = currentStudent === null;\n const classes = useStyles();\n const errorHandler = useErrorHandler();\n\n let initialValues = loading ? {} : currentStudent;\n\n\n const formik = useNormik(false, {\n initialValues: initialValues,\n enableReinitialize: true,\n onSubmit: (values, {setStatus, setSubmitting}) => {\n setStatus();\n\n const a = new Set(values[\"needs\"]);\n const b = new Set(initialValues[\"needs\"]);\n const difference = Array.from(symmetricDifference(a, b));\n\n if (difference.size !== 0){\n setSubmitting(true);\n const jobs = difference.map(need => {\n if (b.has(need)){\n // has been removed\n return UsersNeedsDataService.delete(currentStudent['id'], need)\n .then(...errorHandler({}));\n } else {\n // has been added\n return UsersNeedsDataService.postWithId(currentStudent['id'], need)\n .then(...errorHandler({}));\n }\n });\n Promise\n .all(jobs)\n .then(...errorHandler({snackbarSuccess: true}))\n .then(() => {\n updateCurrentStudent({...currentStudent, needs: values[\"needs\"]});\n })\n .finally(() => {\n setSubmitting(false);\n })\n }\n\n\n\n\n }\n }, true);\n\n return (\n\n \n \n\n {loading?\n (\n\n \n \n \n\n\n \n \n \n \n
\n \n )\n :\n (\n \n )\n\n }\n\n \n \n\n );\n}\n\nexport default UserPerson;","import React, {useEffect, useState} from 'react';\nimport {makeStyles} from '@material-ui/core/styles';\nimport Paper from '@material-ui/core/Paper';\nimport {useTranslation} from \"react-i18next\";\nimport SwipeableViews from 'react-swipeable-views';\nimport AppBar from '@material-ui/core/AppBar';\nimport Tabs from '@material-ui/core/Tabs';\nimport Tab from '@material-ui/core/Tab';\nimport useTheme from \"@material-ui/core/styles/useTheme\";\nimport UsersDataService from \"../_services/users.service\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport UserPerson from \"./users.user.userperson.component\";\nimport UserPermissions from \"./users.user.permissions.component\";\nimport * as PropTypes from \"prop-types\";\nimport TabFrame, {a11yProps} from \"./tab\";\n\nconst useStyles = makeStyles((theme) => ({\n contentPanel: {\n //flex: 1,\n position: 'relative', // todo proper scrollbar\n overflow: \"auto\",\n boxSizing: \"border-box\",\n height: '100%', // todo proper,\n display: 'flex',\n flexDirection: 'column'\n },\n content: {\n overflowX: 'hidden',\n display: 'flex',\n flexDirection: 'column',\n overflowY: 'auto',\n flex: 1,\n height: '100%'\n },\n tab: {\n height: '100%'\n }\n}));\n\n\n\nexport default function User({currentUserId, deleteUser}) {\n const loading = currentUserId === null;\n\n const errorHandler = useErrorHandler();\n\n const [user, setUser] = useState(null);\n\n useEffect(() => {\n if (loading) return setUser(null);\n UsersDataService\n .getOne(currentUserId)\n .then(...errorHandler({})) // todo everywhere\n .then(function (res) {\n setUser(res[\"data\"]);\n });\n }, [currentUserId, loading])\n\n const classes = useStyles();\n const theme = useTheme();\n const { t } = useTranslation();\n const [value, setValue] = React.useState(0);\n const handleChange = (event, newValue) => {\n setValue(newValue);\n };\n\n useEffect(()=>{\n setValue(0);\n }, [currentUserId])\n\n const handleChangeIndex = (index) => {\n setValue(index);\n };\n\n\n return (\n \n \n \n \n \n \n \n \n \n\n \n\n \n );\n}\n","import React, {useEffect, useState} from 'react';\nimport {makeStyles} from '@material-ui/core/styles';\nimport Grid from '@material-ui/core/Grid';\nimport {useTranslation} from \"react-i18next\";\nimport Fab from \"@material-ui/core/Fab\";\nimport {\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n TextField,\n Tooltip\n} from \"@material-ui/core\";\nimport RoleSelect from './user.role-select.component';\nimport PersonAddIcon from '@material-ui/icons/PersonAdd';\nimport Button from \"@material-ui/core/Button\";\nimport Box from \"@material-ui/core/Box\";\nimport * as yup from \"yup\";\nimport {useFormik} from \"formik\";\nimport {invitationsService} from \"../_services/userInvites.service\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport User from \"./users.user.component\";\nimport UsersDataService from \"../_services/users.service\";\nimport {useNeeds} from \"../_helpers/needs\";\nimport {safe_email_required} from \"../_yup/validators\";\nimport ItemsListMain from \"./items_list_main.component\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n height: '100%'\n },\n root2: {\n display: 'flex',\n },\n line: {\n width: \"100%\",\n marginTop: theme.spacing(1)\n },\n composite: {\n display: \"flex\", flexDirection: \"row\", flex: 1, flexWrap: \"wrap\",\n gap: theme.spacing(1), width: \"100%\"\n },\n formControl: {\n padding: theme.spacing(2),\n maxHeight: '50vh',\n overflow: 'auto',\n minWidth: '40vw'\n },\n dialog: {\n\n },\n left: {\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n position: 'relative',\n\n },fab: {\n position: 'absolute',\n bottom: theme.spacing(2),\n right: theme.spacing(2),\n }\n}));\n\nexport default function Users({...other}) {\n const classes = useStyles();\n const { t } = useTranslation();\n\n const [users, setUsers] = useState([]);\n const [currentUserId, setCurrentUserId] = useState(null);\n const [open, setOpen] = React.useState(false);\n const [hasNeeds, NEEDS] = useNeeds();\n\n const handleClickOpen = () => {\n setOpen(true);\n };\n\n const handleClose = () => {\n setOpen(false);\n };\n\n const query = new URLSearchParams(window.location.search);\n const id = query.get('id');\n useEffect(() => {\n if (id !== null && id !== undefined) setCurrentUserId(id);\n }, [id]);\n const errorHandler = useErrorHandler();\n\n const formik = useFormik({\n initialValues: {email: '', needs: []},\n validationSchema: yup.object({\n email: safe_email_required(t)}),\n enableReinitialize: true,\n onSubmit: (values, {setStatus, setSubmitting}) => {\n setSubmitting(true);\n invitationsService\n .inviteUser(values['email'], values['role_id'])\n .then(...errorHandler({snackbarSuccess: true}))\n .then(res => {\n handleClose();\n }).catch(_ => {\n setStatus(true);\n }).finally(() => {\n setSubmitting(false);\n })\n }\n });\n\n\n return (\n \n \n \n {t(\"users\")}
\n \n {hasNeeds([NEEDS.invite_users]) && \n \n \n \n }\n \n\n \n {\n if (userId === currentUserId) setCurrentUserId(null);\n\n setUsers(users.filter((s) => s['id'] !== userId));\n }}\n />\n \n \n );\n}\n","import React, {useEffect, useState} from 'react';\nimport {makeStyles} from '@material-ui/core/styles';\nimport Grid from '@material-ui/core/Grid';\nimport {useTranslation} from \"react-i18next\";\nimport PaymentsDataService from \"../_services/payments.service\";\nimport ListItem from \"@material-ui/core/ListItem\";\nimport ListItemAvatar from \"@material-ui/core/ListItemAvatar\";\nimport Avatar from \"@material-ui/core/Avatar\";\nimport ListItemText from \"@material-ui/core/ListItemText\";\nimport Divider from \"@material-ui/core/Divider\";\nimport List from \"@material-ui/core/List\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport {loadingContext} from \"../_context/loading-context\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n height: '100%'\n },\n root2: {\n display: 'flex',\n },\n formControl: {\n padding: theme.spacing(2),\n maxHeight: '50vh',\n overflow: 'auto',\n minWidth: '40vw'\n },\n dialog: {\n\n },\n left: {\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n position: 'relative',\n\n },fab: {\n position: 'absolute',\n bottom: theme.spacing(2),\n right: theme.spacing(2),\n }\n}));\n\n\nexport default function Payments({...other}) {\n const classes = useStyles();\n const { t } = useTranslation();\n const errorHandler = useErrorHandler();\n const loadingCtx = React.useContext(loadingContext);\n return (\n \n
{t(\"payments\")}
\n\n
\n {\n if (loadingCtx.loading) return;\n loadingCtx.startLoading();\n PaymentsDataService\n .downloadCsv(null, null,'*', null)\n .then(...errorHandler({}))\n .finally(() => {\n loadingCtx.stopLoading();\n })\n\n }}>\n \n \n csv\n \n \n \n\n \n \n
\n );\n}\n","import serviceFactory from \"./service-factory\";\n\n\nexport default new (serviceFactory('rooms'))();\n\n","import {useTranslation} from \"react-i18next\";\nimport React from \"react\";\nimport {makeStyles, useTheme} from \"@material-ui/core/styles\";\nimport Scheduler, {eventFromSchedule} from \"./scheduler.component\";\nconst useStyles = makeStyles((theme) => ({\n button: {\n margin: theme.spacing(1),\n },\n calendar: {\n margin: theme.spacing(2)\n }\n\n}));\n\n\nfunction RoomSchedule({ scheduleIds, ...other }) {\n const { t } = useTranslation();\n const classes = useStyles();\n\n // todo no minHeight ? and also tabpanel component\n return (\n \n ['/courses', s.course_id]}\n />\n
\n );\n}\n\nexport default RoomSchedule;","import {useTranslation} from \"react-i18next\";\nimport Box from \"@material-ui/core/Box\";\nimport React from \"react\";\nimport RoomsDataService from \"../_services/rooms.service\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport {Skeleton} from \"@material-ui/lab\";\nimport * as yup from 'yup';\nimport {IconButtonSkeleton} from \"../_skeletons/iconButton\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport DeleteIcon from \"@material-ui/icons/Delete\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport DirtyTextField from \"./dirtytextfield.component\";\nimport {useNormik} from \"../_helpers/normik\";\nimport SaveButton from \"./formik_save_button\";\nimport DiscardButton from \"./formik_discard_button\";\nimport {useNeeds} from \"../_helpers/needs\";\nimport {safe_email_required} from \"../_yup/validators\";\nimport {confirmContext} from \"../_context/confirm-context\";\n\n\nconst useStyles = makeStyles((theme) => ({\n actionIcon: {\n float: 'right'\n },\n button: {\n margin: theme.spacing(1),\n },\n line: {\n width: \"100%\",\n marginTop: theme.spacing(1)\n },\n composite: {\n display: \"flex\", flexDirection: \"row\", flex: 1, flexWrap: \"wrap\",\n gap: theme.spacing(1), width: \"100%\"\n }\n}));\n\nfunction RoomDetails({ children, addStudentId, setNewRoom, newRoom, newStudent, title, currentStudent, updateCurrentStudent, patchService, deleteStudent, addNewGuardian, ...other }) {\n const { t } = useTranslation();\n const loading = currentStudent === null;\n const classes = useStyles();\n const errorHandler = useErrorHandler();\n\nconst confirm = React.useContext(confirmContext);\n const deleteFullStudent = () => {\n RoomsDataService\n .delete(currentStudent['id'])\n .then(...errorHandler({snackbarSuccess: true})) // todo everywhere\n .then(function (res) {\n deleteStudent(currentStudent['id']);\n });\n }\n\n\n let initialValues = loading ? {} : currentStudent;\n\n\n const formik = useNormik(!newRoom, {\n initialValues: initialValues,\n validationSchema: yup.object({\n name: yup.string().required(t(\"name_required\")),\n }),\n enableReinitialize: true,\n onSubmit: (changedValues, {setStatus, setSubmitting}) => {\n if (Object.keys(changedValues).length > 0) {\n setStatus();\n\n if (newRoom) {\n RoomsDataService.post(changedValues)\n .then(...errorHandler({snackbarSuccess: true}))\n .then(function (new_id) {\n updateCurrentStudent(new_id);\n setNewRoom(false);\n }).catch(function (err) {\n setStatus(true);\n }).finally(() => {\n setSubmitting(false);\n });\n } else {\n RoomsDataService.patch({\n id: initialValues[\"id\"],\n body: changedValues,\n initial_values: initialValues\n }).then(...errorHandler({snackbarSuccess: true}))\n .then(function (patched_body) {\n formik.resetForm(patched_body);\n updateCurrentStudent(patched_body);\n }).catch(function (err) {\n setStatus(true);\n }).finally(() => {\n setSubmitting(false);\n });\n }\n\n\n\n\n } else {\n setSubmitting(false);\n }\n }\n });const [hasNeeds, NEEDS] = useNeeds();\n\n return (\n\n \n \n\n {!newRoom && loading ?\n \n : hasNeeds([NEEDS.delete]) &&\n \n {\n if (newRoom) {\n setNewRoom(false);\n } else{\n confirm.confirm(\"delete_room_question\", \"not_undone\", () => {\n deleteFullStudent();\n })\n }\n\n }}>\n \n \n \n }\n\n {!newRoom && loading?\n (\n\n \n \n \n\n\n \n { [\"100%\", \"100%\", \"100%\", \"100%\"].map((value, idx) => {\n return (\n \n \n );\n })}\n
\n \n )\n :\n (\n \n )\n\n }\n\n \n \n );\n}\n\nexport default RoomDetails;","import React, {useEffect, useState} from 'react';\nimport {makeStyles} from '@material-ui/core/styles';\nimport Paper from '@material-ui/core/Paper';\nimport {useTranslation} from \"react-i18next\";\nimport SwipeableViews from 'react-swipeable-views';\nimport AppBar from '@material-ui/core/AppBar';\nimport Tabs from '@material-ui/core/Tabs';\nimport Tab from '@material-ui/core/Tab';\nimport useTheme from \"@material-ui/core/styles/useTheme\";\nimport RoomsDataService from \"../_services/rooms.service\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport RoomSchedule from \"./rooms.room.schedule.component\";\nimport RoomDetails from \"./rooms.room.details.component\";\nimport {useNeeds} from \"../_helpers/needs\";\nimport TabFrame from \"./tab\";\n\nconst useStyles = makeStyles((theme) => ({\n contentPanel: {\n //flex: 1,\n position: 'relative', // todo proper scrollbar\n overflow: \"auto\",\n boxSizing: \"border-box\",\n height: '100%', // todo proper,\n display: 'flex',\n flexDirection: 'column'\n },\n content: {\n overflowX: 'hidden',\n display: 'flex',\n flexDirection: 'column',\n overflowY: 'auto',\n flex: 1,\n height: '100%'\n },\n tab: {\n height: '100%'\n }\n}));\n\n\nfunction a11yProps(index) {\n return {\n id: `full-width-tab-${index}`,\n 'aria-controls': `full-width-tabpanel-${index}`,\n };\n}\n\n\nexport default function Room({setNewRoom, currentRoomId, deleteRoom, newRoom, addRoomId}) {\n const loading = currentRoomId === null;\n\n const errorHandler = useErrorHandler();\n\n const [room, setRoom] = useState(null);\n\n useEffect(() => {\n if (loading) return setRoom(null);\n RoomsDataService\n .getOne(currentRoomId)\n .then(...errorHandler({})) // todo everywhere\n .then(function (res) {\n setRoom(res[\"data\"]);\n });\n }, [currentRoomId])\n\n const classes = useStyles();\n const theme = useTheme();\n const { t } = useTranslation();\n const [value, setValue] = React.useState(0);\n const handleChange = (event, newValue) => {\n setValue(newValue);\n };\n\n useEffect(()=>{\n setValue(0);\n }, [currentRoomId])\n\n const handleChangeIndex = (index) => {\n setValue(index);\n };const [hasNeeds, NEEDS] = useNeeds();\n\n return (\n \n \n \n \n\n { !newRoom && hasNeeds([NEEDS.schedules]) &&\n }\n\n \n \n \n \n\n\n {hasNeeds([NEEDS.schedules]) && }\n\n \n\n \n );\n}\n","import React, {useEffect, useState} from 'react';\nimport {makeStyles} from '@material-ui/core/styles';\nimport Grid from '@material-ui/core/Grid';\nimport {useTranslation} from \"react-i18next\";\nimport Student from \"./students.student.component\";\nimport Fab from \"@material-ui/core/Fab\";\nimport AddIcon from \"@material-ui/icons/Add\";\nimport {Tooltip} from \"@material-ui/core\";\nimport ItemsList from \"./items_list.component\";\nimport RoomsDataService from \"../_services/rooms.service\";\nimport Room from \"./rooms.room.component\";\nimport {useNeeds} from \"../_helpers/needs\";\nimport ItemsListMain from \"./items_list_main.component\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n height: '100%'\n },\n left: {\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n position: 'relative',\n\n },fab: {\n position: 'absolute',\n bottom: theme.spacing(2),\n right: theme.spacing(2),\n }\n}));\n\n\nexport default function Rooms({...other}) {\n const classes = useStyles();\n const { t } = useTranslation();\n\n const [rooms, setRooms] = useState([]);\n const [newRoom, setNewRoom] = useState(false);\n const [currentRoomId, setCurrentRoomId] = useState(null);\n\n const query = new URLSearchParams(window.location.search);\n const id = query.get('id');\n useEffect(() => {\n if (id !== null && id !== undefined) setCurrentRoomId(id);\n }, [id])\n\n useEffect(() => {\n if (currentRoomId !== null) setNewRoom(false);\n }, [currentRoomId])\nconst [hasNeeds, NEEDS] = useNeeds();\n return (\n \n \n {t(\"rooms\")}
\n \n {hasNeeds([NEEDS.post]) && \n {\n setCurrentRoomId(null);\n setNewRoom(true);\n }}>\n \n \n }\n \n\n \n {\n setCurrentRoomId(id);\n }}\n deleteRoom={(studentId) => {\n if (studentId === currentRoomId) setCurrentRoomId(null);\n\n setRooms(rooms.filter((s) => s['id'] !== studentId));\n }}\n />\n \n \n );\n}\n","import serviceFactory from \"./service-factory\";\n\n\nexport default new (serviceFactory('teachers', 'courses'))();\n\n","import axios from \"axios\";\nimport {authHeader} from \"../_helpers/auth-header\";\nimport {BACKEND_URL} from \"../config\";\n\n\nexport function downloadCalendar(resource, resource_id, calendar_id) {\n\n return new Promise(function(resolve, reject) {\n axios({url: `${BACKEND_URL}/calendars/v1/${resource}/${resource_id}/${calendar_id}`,\n method: 'GET',\n headers: {...{'Cache-Control': 'no-cache'}, ...authHeader()}\n }).then(response => {\n let filename = response.headers[\"content-disposition\"].split(\"filename=\")[1];\n if (filename === null) filename = \"calendar.ics\";\n\n const url = window.URL.createObjectURL(new Blob([response.data]));\n const link = document.createElement('a');\n link.href = url;\n link.setAttribute('download', filename);\n document.body.appendChild(link);\n link.click();\n link.remove();\n resolve();\n }).catch(function (err) {\n reject(err);\n });\n });\n}\n","import {useTranslation} from \"react-i18next\";\nimport Box from \"@material-ui/core/Box\";\nimport React from \"react\";\nimport TeachersDataService from \"../_services/teachers.service\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport {Skeleton} from \"@material-ui/lab\";\nimport * as yup from 'yup';\nimport {IconButtonSkeleton} from \"../_skeletons/iconButton\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport DeleteIcon from \"@material-ui/icons/Delete\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport DirtyTextField from \"./dirtytextfield.component\";\nimport {useNormik} from \"../_helpers/normik\";\nimport SaveButton from \"./formik_save_button\";\nimport DiscardButton from \"./formik_discard_button\";\nimport Divider from \"@material-ui/core/Divider\";\nimport {useNeeds} from \"../_helpers/needs\";\nimport {safe_email_required} from \"../_yup/validators\";\nimport {confirmContext} from \"../_context/confirm-context\";\nimport Button from \"@material-ui/core/Button\";\nimport GetAppIcon from \"@material-ui/icons/GetApp\";\nimport {downloadCalendar} from \"../_services/calendar.service\";\n\n\nconst useStyles = makeStyles((theme) => ({\n actionIcon: {\n float: 'right'\n },\n button: {\n margin: theme.spacing(1),\n },\n line: {\n width: \"100%\",\n marginTop: theme.spacing(1)\n },\n composite: {\n display: \"flex\", flexDirection: \"row\", flex: 1, flexWrap: \"wrap\",\n gap: theme.spacing(1), width: \"100%\"\n }\n}));\n\nfunction TeacherDetails({ children, addStudentId, setNewRoom, newRoom, title, currentStudent, updateCurrentStudent, patchService, deleteStudent, addNewGuardian, ...other }) {\n const { t } = useTranslation();\n const loading = currentStudent === null;\n const classes = useStyles();\n const errorHandler = useErrorHandler();\n const deleteFullStudent = () => {\n TeachersDataService\n .delete(currentStudent['id'])\n .then(...errorHandler({snackbarSuccess: true})) // todo everywhere\n .then(function (res) {\n deleteStudent(currentStudent['id']);\n });\n }\n\n\nconst confirm = React.useContext(confirmContext);\n let initialValues = loading ? {} : currentStudent;\n\n\n const formik = useNormik(!newRoom, {\n initialValues: initialValues,\n validationSchema: yup.object({\n email: safe_email_required(t), // todo\n name: yup.string().required(t(\"name_required\")),\n }),\n enableReinitialize: true,\n onSubmit: (changedValues, {setStatus, setSubmitting}) => {\n if (Object.keys(changedValues).length > 0) {\n setStatus();\n\n if (newRoom) {\n TeachersDataService.post(changedValues)\n .then(...errorHandler({snackbarSuccess: true}))\n .then(function (new_id) {\n updateCurrentStudent(new_id);\n setNewRoom(false);\n }).catch(function (err) {\n setStatus(true);\n }).finally(() => {\n setSubmitting(false);\n });\n } else {\n TeachersDataService.patch({\n id: initialValues[\"id\"],\n body: changedValues,\n initial_values: initialValues\n }).then(...errorHandler({snackbarSuccess: true}))\n .then(function (patched_body) {\n formik.resetForm(patched_body);\n updateCurrentStudent(patched_body);\n }).catch(function (err) {\n setStatus(true);\n }).finally(() => {\n setSubmitting(false);\n });\n }\n\n\n\n\n } else {\n setSubmitting(false);\n }\n }\n });\nconst [hasNeeds, NEEDS] = useNeeds();\n return (\n \n \n\n {!newRoom && loading ?\n \n :\n hasNeeds([NEEDS.delete]) && \n {\n if (newRoom) {\n setNewRoom(false);\n } else{\n confirm.confirm(\"delete_teacher\", \"not_undone\", () => {\n deleteFullStudent();\n })\n }\n\n }}>\n \n \n \n }\n\n {!newRoom && loading?\n (\n\n \n \n \n\n\n \n { [\"100%\", \"100%\", \"100%\", \"100%\"].map((value, idx) => {\n return (\n \n \n );\n })}\n
\n \n )\n :\n (\n \n )\n\n }\n\n \n \n );\n}\n\nexport default TeacherDetails;","import {useTranslation} from \"react-i18next\";\nimport React from \"react\";\nimport {makeStyles, useTheme} from \"@material-ui/core/styles\";\nimport Scheduler, {eventFromSchedule} from \"./scheduler.component\";\nconst useStyles = makeStyles((theme) => ({\n button: {\n margin: theme.spacing(1),\n },\n calendar: {\n margin: theme.spacing(2)\n }\n\n}));\n\n\nfunction TeacherSchedule({ setSchedulesIds, scheduleIds, ...other }) {\n const { t } = useTranslation();\n const classes = useStyles();\n\n return (\n \n ['/courses', s.course_id]}\n />\n
\n );\n}\n\nexport default TeacherSchedule;","import React, {useEffect, useState} from 'react';\nimport {makeStyles} from '@material-ui/core/styles';\nimport Paper from '@material-ui/core/Paper';\nimport {useTranslation} from \"react-i18next\";\nimport SwipeableViews from 'react-swipeable-views';\nimport AppBar from '@material-ui/core/AppBar';\nimport Tabs from '@material-ui/core/Tabs';\nimport Tab from '@material-ui/core/Tab';\nimport useTheme from \"@material-ui/core/styles/useTheme\";\nimport TeachersDataService from \"../_services/teachers.service\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport TeachersCoursesDataService from \"../_services/teachers_courses.service\";\nimport TeacherDetails from \"./teachers.teacher.details.component\";\nimport TeacherSchedule from \"./teachers.teacher.schedule.component\";\nimport {useNeeds} from \"../_helpers/needs\";\nimport CoursesDataService from \"../_services/courses.service\";\nimport AddDeleteSubresource from \"./subresource_add_delete.component\";\nimport TabFrame, {a11yProps} from \"./tab\";\n\nconst useStyles = makeStyles((theme) => ({\n contentPanel: {\n //flex: 1,\n position: 'relative', // todo proper scrollbar\n overflow: \"auto\",\n boxSizing: \"border-box\",\n height: '100%', // todo proper,\n display: 'flex',\n flexDirection: 'column'\n },\n content: {\n overflowX: 'hidden',\n display: 'flex',\n flexDirection: 'column',\n overflowY: 'auto',\n flex: 1,\n height: '100%'\n },\n tab: {\n height: '100%'\n }\n}));\n\n\n\nexport default function Teacher({currentTeacherId, setNewTeacher, addTeacherId, newTeacher, deleteTeacher}) {\n const loading = currentTeacherId === null;\n\n const errorHandler = useErrorHandler();\n\n const [teacher, setTeacher] = useState(null); // todo rename to student\n\n useEffect(() => {\n if (loading) return setTeacher(null);\n TeachersDataService\n .getOne(currentTeacherId)\n .then(...errorHandler({})) // todo everywhere\n .then(function (res) {\n setTeacher(res[\"data\"]);\n });\n }, [currentTeacherId])\n\n const classes = useStyles();\n const theme = useTheme();\n const { t } = useTranslation();\n const [value, setValue] = React.useState(0);\n const handleChange = (event, newValue) => {\n setValue(newValue);\n };\n\n useEffect(()=>{\n setValue(0);\n }, [currentTeacherId])\n\n const handleChangeIndex = (index) => {\n setValue(index);\n };const [hasNeeds, NEEDS] = useNeeds();\n\n return (\n \n \n \n \n\n { !newTeacher && hasNeeds([NEEDS.schedules]) &&\n }\n\n { !newTeacher && hasNeeds([NEEDS.courses]) &&\n }\n\n \n \n \n\n \n \n\n\n {hasNeeds([NEEDS.schedules]) && \n }\n\n {hasNeeds([NEEDS.courses]) &&\n\n {\n setTeacher({\n ...teacher,\n courses: [...teacher['courses'], id]\n })\n }}\n onSubresourceDeleted={(id) => {\n setTeacher({\n ...teacher,\n courses: teacher['courses'].filter((c) => c !== id)\n });\n }}\n />}\n\n\n \n\n \n );\n}\n","import React, {useEffect, useState} from 'react';\nimport {makeStyles} from '@material-ui/core/styles';\nimport Grid from '@material-ui/core/Grid';\nimport {useTranslation} from \"react-i18next\";\nimport Fab from \"@material-ui/core/Fab\";\nimport AddIcon from \"@material-ui/icons/Add\";\nimport {Tooltip} from \"@material-ui/core\";\nimport TeachersDataService from \"../_services/teachers.service\";\nimport ItemsList from \"./items_list.component\";\nimport Teacher from \"./teachers.teacher.component\";\nimport {useNeeds} from \"../_helpers/needs\";\nimport ItemsListMain from \"./items_list_main.component\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n height: '100%'\n },\n left: {\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n position: 'relative',\n\n },fab: {\n position: 'absolute',\n bottom: theme.spacing(2),\n right: theme.spacing(2),\n }\n}));\n\n\nexport default function Teachers({...other}) {\n const classes = useStyles();\n const { t } = useTranslation();\n\n const [teachers, setTeachers] = useState([]);\n const [newTeacher, setNewTeacher] = useState(false);\n const [currentTeacherId, setCurrentTeacherId] = useState(null);\nconst [hasNeeds, NEEDS] = useNeeds();\n const query = new URLSearchParams(window.location.search);\n const id = query.get('id');\n useEffect(() => {\n if (id !== null && id !== undefined) setCurrentTeacherId(id);\n }, [id])\n\n useEffect(() => {\n if (currentTeacherId !== null) setNewTeacher(false);\n }, [currentTeacherId])\n\n return (\n \n \n {t(\"teachers\")}
\n \n\n {hasNeeds([NEEDS.post]) && \n {\n setCurrentTeacherId(null);\n setNewTeacher(true);\n }}>\n \n \n }\n \n\n \n {\n setCurrentTeacherId(id);\n }}\n deleteTeacher={(studentId) => {\n if (studentId === currentTeacherId) setCurrentTeacherId(null);\n\n setTeachers(teachers.filter((s) => s['id'] !== studentId));\n }}\n />\n \n \n );\n}\n","import serviceFactory from \"./service-factory\";\n\n\nexport default new (serviceFactory('courses', 'rooms'))();\n\n","import serviceFactory from \"./service-factory\";\n\n\nexport default new (serviceFactory('courses', 'students'))();\n\n","import serviceFactory from \"./service-factory\";\n\n\nexport default new (serviceFactory('courses', 'teachers'))();\n\n","import {useTranslation} from \"react-i18next\";\nimport Box from \"@material-ui/core/Box\";\nimport React from \"react\";\nimport CoursesDataService from \"../_services/courses.service\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport {Skeleton} from \"@material-ui/lab\";\nimport * as yup from 'yup';\nimport {IconButtonSkeleton} from \"../_skeletons/iconButton\";\nimport DialogTitle from \"@material-ui/core/DialogTitle\";\nimport DialogActions from \"@material-ui/core/DialogActions\";\nimport Button from \"@material-ui/core/Button\";\nimport Dialog from \"@material-ui/core/Dialog\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport DeleteIcon from \"@material-ui/icons/Delete\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport DirtyTextField from \"./dirtytextfield.component\";\nimport {useNormik} from \"../_helpers/normik\";\nimport SaveButton from \"./formik_save_button\";\nimport DiscardButton from \"./formik_discard_button\";\nimport Divider from \"@material-ui/core/Divider\";\nimport {DialogContent, MenuItem, TextField} from \"@material-ui/core\";\nimport SendIcon from \"@material-ui/icons/Send\";\nimport GetAppIcon from \"@material-ui/icons/GetApp\";\nimport StudentsDataService from \"../_services/students.service\";\nimport Typography from \"@material-ui/core/Typography\";\nimport {useSnackbar} from \"notistack\";\nimport {useFormik} from \"formik\";\nimport {DEFAULT_COURSE_PRICE_TERM} from \"../_data/price_term\";\nimport {useNeeds} from \"../_helpers/needs\";\nimport {loadingContext} from \"../_context/loading-context\";\nimport {confirmContext} from \"../_context/confirm-context\";\nimport { useHistory } from \"react-router-dom\";\nimport {downloadCalendar} from \"../_services/calendar.service\";\nimport AssignmentTurnedInIcon from '@material-ui/icons/AssignmentTurnedIn';\n\nconst useStyles = makeStyles((theme) => ({\n actionIcon: {\n float: 'right'\n },\n textField: {\n marginRight: theme.spacing(1),\n width: 200,\n },\n button: {\n margin: theme.spacing(1),\n },\n line: {\n width: \"100%\",\n marginTop: theme.spacing(1)\n },\n composite: {\n display: \"flex\", flexDirection: \"row\", flex: 1, flexWrap: \"wrap\",\n gap: theme.spacing(1), width: \"100%\"\n },\n choose: {\n marginBottom: theme.spacing(3)\n }\n}));\n\nfunction CourseDetails({ children, addCourseId, setNewCourse, newCourse, currentCourse, updateCurrentCourse, patchService, deleteCourse, ...other }) {\n const { t } = useTranslation();\n let history = useHistory();\n const loading = currentCourse === null;\n const classes = useStyles();\n const errorHandler = useErrorHandler();\n const deleteFullCourse = (id_) => {\n CoursesDataService\n .delete(id_)\n .then(...errorHandler({snackbarSuccess: true})) // todo everywhere\n .then(function (res) {\n deleteCourse(id_);\n });\n }\n\n const [openDownloadAttendanceList, setOpenDownloadAttendanceList] = React.useState(false);\n\nconst confirm = React.useContext(confirmContext);\n\n let initialValues = loading ? {} : currentCourse;\n if (newCourse) {\n initialValues = {\n price_term: DEFAULT_COURSE_PRICE_TERM,\n is_published: false\n }\n }\n\n const formik2 = useFormik({\n initialValues: {},\n validationSchema: yup.object({\n startDate: yup.date().required(t(\"required\")),\n endDate: yup.date().required(t(\"required\")),\n }),\n enableReinitialize: true,\n onSubmit: (values, {setStatus, setSubmitting}) => {\n\n\n setSubmitting(true);\n setStatus();\n\n CoursesDataService\n .downloadSubresource(currentCourse[\"id\"], 'attendance-list/v1', values)\n .then(...errorHandler({snackbarSuccess: true}))\n .then(() => {\n setOpenDownloadAttendanceList(false);\n })\n .catch(() => {\n setStatus(true);\n })\n .finally(() => {\n setSubmitting(false);\n })\n\n\n }\n });\n\n const downloadAttendances = () => {\n CoursesDataService\n .downloadSubresource(currentCourse[\"id\"], 'attendance-list/v2')\n .then(...errorHandler({snackbarSuccess: true}));\n }\n\n const formik = useNormik(!newCourse, {\n initialValues: initialValues,\n validationSchema: yup.object({\n name: yup.string().required(t(\"name_required\")),\n }),\n enableReinitialize: true,\n onSubmit: (changedValues, {setStatus, setSubmitting}) => {\n if (Object.keys(changedValues).length > 0) {\n setStatus();\n\n if (newCourse) {\n CoursesDataService.post(changedValues)\n .then(...errorHandler({snackbarSuccess: true}))\n .then(function (new_id) {\n updateCurrentCourse(new_id);\n setNewCourse(false);\n }).catch(function (err) {\n setStatus(true);\n }).finally(() => {\n setSubmitting(false);\n });\n } else {\n CoursesDataService.patch({\n id: initialValues[\"id\"],\n body: changedValues,\n initial_values: initialValues\n }).then(...errorHandler({snackbarSuccess: true}))\n .then(function (patched_body) {\n formik.resetForm(patched_body);\n updateCurrentCourse(patched_body);\n }).catch(function (err) {\n setStatus(true);\n }).finally(() => {\n setSubmitting(false);\n });\n }\n\n\n\n\n } else {\n setSubmitting(false);\n }\n }\n });\n const loadingCtx = React.useContext(loadingContext);\nconst [hasNeeds, NEEDS] = useNeeds();\n return (\n \n\n\n
\n\n\n
\n \n\n {!newCourse && loading ?\n \n :\n hasNeeds([NEEDS.delete]) && \n {\n if (newCourse) {\n setNewCourse(false);\n } else{\n confirm.confirm(\"delete_course_question\", \"not_undone\", () => {\n deleteFullCourse(currentCourse['id']);\n })\n }\n\n }}>\n \n \n \n }\n\n {!newCourse && loading?\n (\n\n \n \n \n\n\n \n { [\"100%\", \"100%\", \"100%\", \"100%\"].map((value, idx) => {\n return (\n \n \n );\n })}\n
\n \n )\n :\n (\n \n\n\n )\n\n\n\n }\n\n {!loading && !newCourse && \n \n }\n\n\n \n {!loading && !newCourse &&\n \n \n }\n \n\n \n {!loading && hasNeeds([NEEDS.students]) && !newCourse &&\n \n \n }\n\n {!loading && hasNeeds([NEEDS.students]) && !newCourse &&\n \n \n }\n\n \n \n\n\n \n {!loading && !newCourse &&\n \n \n }\n\n {!loading && hasNeeds([NEEDS.students, NEEDS.guardians]) && !newCourse &&\n \n \n }\n \n\n\n\n\n \n \n
\n );\n}\n\nexport default CourseDetails;","export const DEFAULT_COURSE_PRICE_TERM = 75;","import serviceFactory from \"./service-factory\";\n\n\nexport default new (serviceFactory('courses', 'labels'))();\n\n","import React from 'react';\nimport {useTranslation} from \"react-i18next\";\nimport {FormControlLabel} from \"@material-ui/core\";\nimport Typography from \"@material-ui/core/Typography\";\nimport DirtyCheckbox from \"./dirty_checkbox\";\nimport {education_years} from \"../_data/education\";\n\nexport default function LabelsSelection({formik, name=\"labels\", noDirty=false}) {\n const { t } = useTranslation();\n\n return \n {t(\"labels\")}\n {education_years.map(label => (\n \n }\n key={label}\n label={t(label)}\n />))}\n\n \n }\n label={t(\"adult\")}\n />\n \n}\n","import {useTranslation} from \"react-i18next\";\nimport Box from \"@material-ui/core/Box\";\nimport React from \"react\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport {Skeleton} from \"@material-ui/lab\";\nimport {IconButtonSkeleton} from \"../_skeletons/iconButton\"\nimport CourseLabelsDataService from \"../_services/course_labels.service\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport {useNormik} from \"../_helpers/normik\";\nimport SaveButton from \"./formik_save_button\";\nimport DiscardButton from \"./formik_discard_button\";\nimport LabelsSelection from \"./labels_selection.component\";\nimport {symmetricDifference} from \"../_helpers/set_operations\";\n\nconst useStyles = makeStyles((theme) => ({\n actionIcon: {\n float: 'right'\n },\n button: {\n margin: theme.spacing(1),\n },\n line: {\n width: \"100%\",\n marginTop: theme.spacing(1)\n },\n composite: {\n display: \"flex\", flexDirection: \"row\", flex: 1, flexWrap: \"wrap\",\n gap: theme.spacing(1), width: \"100%\"\n }\n}));\n\nfunction CourseLabels({ currentCourse, updateCurrentCourse, patchService, deleteCourse, ...other }) {\n const { t } = useTranslation();\n const loading = currentCourse === null;\n const classes = useStyles();\n const errorHandler = useErrorHandler();\n\n let initialValues = loading ? {} : currentCourse;\n\n\n const formik = useNormik(false, {\n initialValues: initialValues,\n enableReinitialize: true,\n onSubmit: (values, {setStatus, setSubmitting}) => {\n setStatus();\n\n const a = new Set(values[\"labels\"]);\n const b = new Set(initialValues[\"labels\"]);\n const difference = Array.from(symmetricDifference(a, b));\n\n if (difference.size !== 0){\n setSubmitting(true);\n const jobs = difference.map(need => {\n if (b.has(need)){\n // has been removed\n return CourseLabelsDataService.delete(currentCourse['id'], need)\n .then(...errorHandler({}));\n } else {\n // has been added\n return CourseLabelsDataService.postWithId(currentCourse['id'], need)\n .then(...errorHandler({}));\n }\n });\n Promise\n .all(jobs)\n .then(...errorHandler({snackbarSuccess: true}))\n .then(() => {\n updateCurrentCourse({...currentCourse, labels: values[\"labels\"]});\n })\n .finally(() => {\n setSubmitting(false);\n })\n }\n\n\n\n\n }\n }, true);\n\n return (\n \n \n\n {loading?\n (\n\n \n \n \n\n\n \n \n \n \n
\n \n )\n :\n (\n \n )\n\n }\n\n \n \n );\n}\n\nexport default CourseLabels;","import {useTranslation} from \"react-i18next\";\nimport React from \"react\";\nimport SchedulesDataService from \"../_services/schedules.service\";\nimport {makeStyles, useTheme} from \"@material-ui/core/styles\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport {useSnackbar} from \"notistack\";\nimport Scheduler, {eventFromSchedule} from \"./scheduler.component\";\nimport {confirmContext} from \"../_context/confirm-context\";\nconst useStyles = makeStyles((theme) => ({\n button: {\n margin: theme.spacing(1),\n },\n calendar: {\n margin: theme.spacing(2)\n }\n\n}));\n\n\nfunction CourseSchedule({ title, scheduleIds, setScheduleIds, student_id, ...other }) {\n const errorHandler = useErrorHandler();\n\n return (\n \n true}\n allowView={(s) => !s.is_base}\n viewUrl={(s) => ['/students', s.student_id]}\n setScheduleIds={setScheduleIds}\n onEventChange={(info, day_week, start_time, end_time, schedule) => {\n SchedulesDataService\n .patch({id: schedule['id'],\n body: {day_week: day_week, start_time: start_time, end_time: end_time},\n initial_values: schedule})\n .then(...errorHandler({errorOut: true, snackbarSuccess: true}))\n .then(function (res) {})\n .catch(function (err){ info.revert(); });\n }}\n viewStudent={true}\n scheduleIds={scheduleIds}\n editable={true}\n selectable={true}\n onEventSelected={(day_week, start_time, end_time) => {\n SchedulesDataService\n .post({day_week: day_week, start_time: start_time, end_time: end_time, course_id: student_id})\n .then(res => {\n setScheduleIds([...scheduleIds, res['id']])\n })\n }}\n />\n
\n );\n}\n\nexport default CourseSchedule;","import React, {useEffect, useState} from 'react';\nimport {makeStyles} from '@material-ui/core/styles';\nimport Paper from '@material-ui/core/Paper';\nimport {useTranslation} from \"react-i18next\";\nimport SwipeableViews from 'react-swipeable-views';\nimport AppBar from '@material-ui/core/AppBar';\nimport Tabs from '@material-ui/core/Tabs';\nimport Tab from '@material-ui/core/Tab';\nimport useTheme from \"@material-ui/core/styles/useTheme\";\nimport CoursesDataService from \"../_services/courses.service\";\nimport StudentsDataService from \"../_services/students.service\";\nimport TeachersDataService from \"../_services/teachers.service\";\nimport CourseRoomsDataService from \"../_services/course_rooms.service\";\nimport RoomsDataService from \"../_services/rooms.service\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport CourseStudentsDataService from \"../_services/course_students.service\";\nimport CourseTeachersDataService from \"../_services/course_teachers.service\";\nimport CourseDetails from \"./courses.course.details.component\";\nimport CourseLabels from \"./courses.course.labels.component\";\nimport CourseSchedule from \"./courses.course.schedule.component\";\nimport {useNeeds} from \"../_helpers/needs\";\nimport AddDeleteSubresource from \"./subresource_add_delete.component\";\nimport TabFrame, {a11yProps} from \"./tab\";\n\nconst useStyles = makeStyles((theme) => ({\n contentPanel: {\n //flex: 1,\n position: 'relative', // todo proper scrollbar\n overflow: \"auto\",\n boxSizing: \"border-box\",\n height: '100%', // todo proper,\n display: 'flex',\n flexDirection: 'column'\n },\n content: {\n overflowX: 'hidden',\n display: 'flex',\n flexDirection: 'column',\n overflowY: 'auto',\n flex: 1,\n height: '100%'\n },\n tab: {\n height: '100%'\n }\n}));\n\n\nexport default function Course({currentCourseId, setNewCourse, addCourseId, newCourse, deleteCourse}) {\n const loading = currentCourseId === null;\n\n const errorHandler = useErrorHandler();\n\n const [course, setCourse] = useState(null); // todo rename to student\nconst [hasNeeds, NEEDS] = useNeeds();\n useEffect(() => {\n if (loading) return setCourse(null);\n CoursesDataService\n .getOne(currentCourseId)\n .then(...errorHandler({})) // todo everywhere\n .then(function (res) {\n setCourse(res[\"data\"]);\n });\n }, [currentCourseId])\n\n const classes = useStyles();\n const theme = useTheme();\n const { t } = useTranslation();\n const [value, setValue] = React.useState(0);\n const handleChange = (event, newValue) => {\n setValue(newValue);\n };\n\n useEffect(()=>{\n setValue(0);\n }, [currentCourseId])\n\n const handleChangeIndex = (index) => {\n setValue(index);\n };\n\n return (\n \n \n \n \n { !newCourse &&\n }\n\n { !newCourse && hasNeeds([NEEDS.schedules]) &&\n }\n\n { !newCourse && hasNeeds([NEEDS.students]) &&\n }\n\n { !newCourse && hasNeeds([NEEDS.teachers]) &&\n }\n\n { !newCourse && hasNeeds([NEEDS.rooms]) &&\n }\n\n \n \n \n\n \n\n \n\n {hasNeeds([NEEDS.schedules]) && \n setCourse({...course, schedules: ids})}\n className={classes.tab}\n dir={theme.direction}\n scheduleIds={course === null ? null : course.schedules}\n student_id={currentCourseId}\n />}\n\n {hasNeeds([NEEDS.students]) &&\n\n student['full_name'] + (student['enrolment_status'] === 'enrolled'? ' ☑️': '')}\n add_message=\"enroll_to_course\"\n onSubresourceAdded={(id) => {\n setCourse({\n ...course,\n students: [...course['students'], id]\n })\n }}\n onSubresourceDeleted={(id) => {\n setCourse({\n ...course,\n students: course['students'].filter((s) => s !== id)\n });\n }}\n />\n\n\n\n }\n\n {hasNeeds([NEEDS.teachers]) &&\n\n {\n setCourse({\n ...course,\n teachers: [...course['teachers'], id]\n })\n }}\n onSubresourceDeleted={(id) => {\n setCourse({\n ...course,\n teachers: course['teachers'].filter((c) => c !== id)\n });\n }}\n />\n\n }\n\n {hasNeeds([NEEDS.rooms]) &&\n\n {\n setCourse({\n ...course,\n rooms: [...course['rooms'], id]\n })\n }}\n onSubresourceDeleted={(id) => {\n setCourse({\n ...course,\n rooms: course['rooms'].filter((c) => c !== id)\n });\n }}\n />\n\n }\n\n\n \n\n \n );\n}\n","import React, {useEffect, useState} from 'react';\nimport {makeStyles} from '@material-ui/core/styles';\nimport Grid from '@material-ui/core/Grid';\nimport {useTranslation} from \"react-i18next\";\nimport Fab from \"@material-ui/core/Fab\";\nimport AddIcon from \"@material-ui/icons/Add\";\nimport {Tooltip} from \"@material-ui/core\";\nimport CoursesDataService from \"../_services/courses.service\";\nimport Course from \"./courses.course.component\";\nimport {useNeeds} from \"../_helpers/needs\";\nimport ItemsListMain from \"./items_list_main.component\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n height: '100%'\n },\n left: {\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n position: 'relative',\n\n },fab: {\n position: 'absolute',\n bottom: theme.spacing(2),\n right: theme.spacing(2),\n }\n}));\n\n\nexport default function Courses({...other}) {\n const classes = useStyles();\n const { t } = useTranslation();\n\n const [courses, setCourses] = useState([]);\n const [newCourse, setNewCourse] = useState(false);\n const [currentCourseId, setCurrentCourseId] = useState(null);\n\n const query = new URLSearchParams(window.location.search);\n const id = query.get('id');\n useEffect(() => {\n if (id !== null && id !== undefined) setCurrentCourseId(id);\n }, [id])\n\n useEffect(() => {\n if (currentCourseId !== null) setNewCourse(false);\n }, [currentCourseId])\nconst [hasNeeds, NEEDS] = useNeeds();\n return (\n \n \n {t(\"courses\")}
\n \n\n\n {hasNeeds([NEEDS.post]) && \n {\n setCurrentCourseId(null);\n setNewCourse(true);\n }}>\n \n \n }\n \n\n \n {\n setCurrentCourseId(id);\n }}\n deleteCourse={(studentId) => {\n if (studentId === currentCourseId) setCurrentCourseId(null);\n\n setCourses(courses.filter((s) => s['id'] !== studentId));\n }}\n />\n \n \n );\n}\n","import axios from \"axios\";\nimport {authHeader} from \"../_helpers/auth-header\";\nimport {BACKEND_URL} from \"../config\";\n\nexport const bulkEmailService = {\n bulkSend\n};\n\nfunction bulkSend(courseIds, subject, body, emailPreference, studentEnrolmentStatus, files) {\n const data = new FormData();\n data.append(\"courseIds\", JSON.stringify(courseIds));\n data.append(\"emailPreference\", emailPreference);\n data.append(\"subject\", subject);\n data.append(\"studentEnrolmentStatus\", studentEnrolmentStatus);\n data.append(\"body\", body);\n files.forEach(f => {\n data.append(f.name, f);\n })\n return new Promise(function(resolve, reject) {\n axios({url: `${BACKEND_URL}/emails/v1/bulk`, // todo server url\n method: 'POST',\n headers: {...{'Cache-Control': 'no-cache'}, ...authHeader()},\n data: data\n }).then(res => {\n resolve(true);\n }).catch(function (res) {\n reject(res);\n });\n });\n}\n","import {makeStyles} from \"@material-ui/core/styles\";\nimport {useTranslation} from \"react-i18next\";\nimport React, {useEffect} from \"react\";\nimport {Autocomplete} from \"@material-ui/lab\";\nimport TextField from \"@material-ui/core/TextField\";\nimport createStyles from \"@material-ui/styles/createStyles\";\n\n// ISO 3166-1 alpha-2\n// ⚠️ No support for IE 11\nfunction countryToFlag(isoCode) {\n return typeof String.fromCodePoint !== 'undefined'\n ? isoCode\n .toUpperCase()\n .replace(/./g, (char) => String.fromCodePoint(char.charCodeAt(0) + 127397))\n : isoCode;\n}\n\n\nconst useStyles = makeStyles(theme => (createStyles({\n textField: {\n '& label.Mui-focused': {color: theme.palette.primary.main}, // todo color to theme\n '& .MuiInput-underline:after': {borderBottomColor: theme.palette.primary.main},\n '& label': {color:theme.palette.neutral.emphasisText.medium},\n '& fieldset': {borderColor: theme.palette.neutral.emphasisText.medium},\n },\n option: {\n fontSize: 15,\n '& > span': {\n marginRight: 10,\n fontSize: 18,\n },\n },})));\n\nexport default function EmailTo({formik, name, label, options, addTo, ...textFieldProps}) {\n\n const [option, _setOption] = React.useState(null);\n\n React.useEffect(() => {\n _setOption(null);\n }, [name]);\n\n const setOption = (option) => {\n const newOption = (option !== null)? option.code: '';\n formik.setFieldValue(name, newOption);\n _setOption(option);\n if (option) addTo(option);\n }\n\n const classes = useStyles();\n\n const [inputValue, setInputValue] = React.useState('');\n\n const { t } = useTranslation();\n\n return (\n option.name }\n getOptionSelected={(o) => o.id === option.id}\n value={option}\n onChange={(event, newValue) => {\n setOption(newValue);\n }}\n inputValue={inputValue}\n onInputChange={(event, newInputValue) => {\n setInputValue(newInputValue);\n }}\n name={name}\n onBlur={formik.handleBlur}\n renderOption={(option) => (\n \n {option.name}\n \n )}\n\n renderInput={(params) => (\n \n )}\n />\n );\n}","import React, {useEffect, useState} from 'react';\nimport {makeStyles} from '@material-ui/core/styles';\nimport Grid from '@material-ui/core/Grid';\nimport {useTranslation} from \"react-i18next\";\nimport Fab from \"@material-ui/core/Fab\";\nimport {\n Chip,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle, MenuItem,\n TextField,\n Tooltip\n} from \"@material-ui/core\";\nimport SendIcon from '@material-ui/icons/Send';\nimport dataService from \"../_services/courses.service\";\nimport * as yup from \"yup\";\nimport {useFormik} from \"formik\";\nimport {bulkEmailService} from \"../_services/bulkEmail.service\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport {safe_email_required} from \"../_yup/validators\";\nimport EmailTo from \"./emailTo.component\";\nimport Avatar from \"@material-ui/core/Avatar\";\nimport Box from \"@material-ui/core/Box\";\nimport Button from \"@material-ui/core/Button\";\nimport CardHeader from \"@material-ui/core/CardHeader\";\nimport EuroIcon from \"@material-ui/icons/Euro\";\nimport AccountBalanceWalletIcon from \"@material-ui/icons/AccountBalanceWallet\";\nimport AccountBalanceIcon from \"@material-ui/icons/AccountBalance\";\nimport MoreHorizIcon from \"@material-ui/icons/MoreHoriz\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport DeleteIcon from \"@material-ui/icons/Delete\";\nimport CardActions from \"@material-ui/core/CardActions\";\nimport PaymentsDataService from \"../_services/payments.service\";\nimport ReceiptIcon from \"@material-ui/icons/Receipt\";\nimport clsx from \"clsx\";\nimport ExpandMoreIcon from \"@material-ui/icons/ExpandMore\";\nimport Collapse from \"@material-ui/core/Collapse\";\nimport CardContent from \"@material-ui/core/CardContent\";\nimport {Skeleton} from \"@material-ui/lab\";\nimport DirtyTextField from \"./dirtytextfield.component\";\nimport {payment_methods} from \"../_data/payment_methods\";\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\nimport Card from \"@material-ui/core/Card\";\nimport {loadingContext} from \"../_context/loading-context\";\nimport {confirmContext} from \"../_context/confirm-context\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n height: '100%'\n },\n\n textBox: {\n width: \"100%\",\n border: \"red\"\n },\n chip: {\n margin: theme.spacing(0.5)\n },\n chips: {\n marginBottom: theme.spacing(1)\n },\n in: {\n marginBottom: theme.spacing(1),\n marginTop: theme.spacing(2)\n },fab: {\n position: 'absolute',\n bottom: theme.spacing(4),\n right: theme.spacing(4),\n }, attach: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1)\n },\n card: {\n marginTop: theme.spacing(1)\n }\n}));\n\nexport default function Email({...other}) {\n const classes = useStyles();\n const { t } = useTranslation();\n\n const [groups, setGroups] = useState([]);\n const [to, setTo] = useState([]);\n const [selectedFiles, setSelectedFiles] = useState([]);\n\n const addTo = (t) => {\n setTo([...to, t]);\n }\n const removeTo = (id) => {\n setTo(to.filter(x => x.id !== id));\n }\n const loadingCtx = React.useContext(loadingContext);\n const confirm = React.useContext(confirmContext);\n const handleSendEmail = () => {\n if (loadingCtx.loading) return;\n if (formik.isSubmitting) return;\n\n confirm.confirm(\"send_bulk_email\", \"send_bulk_email_description\", () => {\n loadingCtx.startLoading();\n formik.setSubmitting(true);\n bulkEmailService\n .bulkSend(to.map(g => g.id), formik.values[\"subject\"],\n formik.values[\"body\"], formik.values[\"emailPreference\"], formik.values[\"studentEnrolmentStatus\"], selectedFiles)\n\n .then(...errorHandler({snackbarSuccess: true}))\n .finally(() => {\n formik.setSubmitting(false);\n loadingCtx.stopLoading();\n })\n });\n\n }\n\n const errorHandler = useErrorHandler();\n\n const formik = useFormik({\n initialValues: {emailPreference: \"resolved\", studentEnrolmentStatus: \"enrolled\"},\n validationSchema: yup.object({\n email: safe_email_required(t)}),\n enableReinitialize: true,\n onSubmit: (values, {setStatus, setSubmitting}) => {\n setSubmitting(true);\n\n }\n });\n useEffect(() => {\n dataService\n .getAll(null, \"*\", ['id', \"name\"])\n .then(...errorHandler({}))\n .then(function (res) {\n setGroups(res[\"data\"]);\n });\n }, [])\n const onFileChange = event => {\n // Update the state\n setSelectedFiles([...event.target.files]);\n };\n const getFormData = () => {\n if (selectedFiles.length === 0) return null;\n // Create an object of formData\n const formData = new FormData();\n\n // Update the formData object\n selectedFiles.forEach(sf => {\n formData.append(\n sf.name,\n sf,\n sf.name\n );\n })\n\n\n return formData;\n };\n\n const fileDataRepresentation = () => {\n console.log(\"sfs\", selectedFiles);\n return selectedFiles.map(selectedFile => (\n \n \n {\n setSelectedFiles(selectedFiles.filter(x => x !== selectedFile));\n }}>\n \n \n \n }\n titleTypographyProps={{variant: 'subheading'}}\n title={selectedFile.name}\n />\n ));\n }\n\n\n return (\n \n
{t(\"email\")}
\n
\n {t(\"to\")}: {\n to.length > 0? to.map(x =>\n \n G}\n label={x.name}\n onClick={() => {\n removeTo(x.id);\n }}/>\n ) : \" - \"\n }\n \n\n
\n \n \n \n \n \n\n
\n \n \n \n \n \n\n \n\n\n\n
!to.includes(g))}\n addTo={addTo}\n name={\"courses\"}\n label={t(\"courses\")}\n />\n \n\n \n \n {fileDataRepresentation()}\n \n \n
\n \n \n \n \n \n \n );\n}\n","import React from \"react\";\nimport PersonIcon from \"@material-ui/icons/Person\";\nimport ClassIcon from \"@material-ui/icons/Class\";\nimport RoomIcon from \"@material-ui/icons/Room\";\nimport SchoolIcon from \"@material-ui/icons/School\";\nimport AccountBalanceIcon from \"@material-ui/icons/AccountBalance\";\nimport EmailIcon from '@material-ui/icons/Email';\nimport ContactMailIcon from \"@material-ui/icons/ContactMail\";\nimport AssignmentTurnedInIcon from '@material-ui/icons/AssignmentTurnedIn';\nimport Students from \"../_components/students.component\";\nimport Users from \"../_components/users.component\";\nimport Payments from \"../_components/payments.component\";\nimport Rooms from \"../_components/rooms.component\";\nimport Teachers from \"../_components/teachers.component\";\nimport Courses from \"../_components/courses.component\";\nimport {NEEDS} from \"../_helpers/needs\";\nimport Email from \"../_components/email.component\";\n\nconst Routes = [\n {\n path: 'students',\n component: Students,\n title: 'students',\n icon: PersonIcon,\n needs: [NEEDS.students, NEEDS.get]\n },\n {\n path: 'courses',\n component: Courses,\n title: 'courses',\n icon: ClassIcon,\n needs: [NEEDS.courses, NEEDS.get]\n },\n {\n path: 'teachers',\n component: Teachers,\n title: 'teachers',\n icon: SchoolIcon,\n needs: [NEEDS.teachers, NEEDS.get]\n },\n {\n path: 'rooms',\n component: Rooms,\n title: 'rooms',\n icon: RoomIcon,\n needs: [NEEDS.rooms, NEEDS.get]\n },{\n path: 'payments',\n component: Payments,\n title: 'payments',\n icon: AccountBalanceIcon,\n needs: [NEEDS.payments, NEEDS.get]\n },{\n path: 'users',\n component: Users,\n title: 'users',\n icon: ContactMailIcon,\n needs: [NEEDS.users, NEEDS.get]\n },{\n path: 'email',\n component: Email,\n title: 'email',\n icon: EmailIcon,\n needs: [NEEDS.send_email, NEEDS.get]\n }\n];\n\n\nexport default Routes;","import {API_VERSION, BACKEND_URL} from \"../config\";\nimport {authHeader} from \"../_helpers/auth-header\";\nimport axios from \"axios\";\n\nexport const downloadGodFile = () => {\n return new Promise(function (resolve, reject) {\n axios({\n url: `${BACKEND_URL}/api/${API_VERSION}/files/god`,\n method: 'POST',\n responseType: 'blob', // important\n headers: {\n ...{\n 'Accept': 'text/csv',\n 'Cache-Control': 'no-cache'\n }, ...authHeader()\n }\n }).then(response => {\n let filename = response.headers[\"content-disposition\"].split(\"filename=\")[1];\n if (filename === null) filename = \"export.zip\";\n\n const url = window.URL.createObjectURL(new Blob([response.data]));\n const link = document.createElement('a');\n link.href = url;\n link.setAttribute('download', filename);\n document.body.appendChild(link);\n link.click();\n link.remove();\n resolve();\n }).catch(function (err) {\n reject(err);\n });\n });\n}","import axios from \"axios\";\nimport {authHeader} from \"../_helpers/auth-header\";\nimport {BACKEND_URL} from \"../config\";\n\nexport const authenticationService = {\n login,\n logout,\n ping\n};\n\nfunction login(username, password, totp, rememberMe=false) {\n return new Promise(function(resolve, reject) {\n axios({url: `${BACKEND_URL}/auth/v1/login?totp=${totp}&rememberMe=${rememberMe? 1:0}`,\n method: 'POST',\n auth: {\n username: username,\n password: password\n },\n headers: {...{'Cache-Control': 'no-cache'}, ...authHeader()}\n }).then(res => {\n resolve({logged: true, needs: res[\"data\"]});\n }).catch(function (res) {\n try { if (res[\"response\"][\"status\"] === 401) resolve({logged: false}) } catch(err){}\n reject(res);\n });\n });\n}\n\nfunction logout() {\n return new Promise(function(resolve, reject) {\n axios({url: `${BACKEND_URL}/auth/v1/logout`,\n method: 'GET',\n headers: {...{'Cache-Control': 'no-cache'}, ...authHeader()}\n }).then(response => {\n resolve(false);\n }).catch(function (err) {\n reject(err);\n });});\n}\n\nfunction ping() {\n return new Promise(function(resolve, reject) {\n axios({url: `${BACKEND_URL}/auth/v1/ping`,\n method: 'GET',\n headers: {'Cache-Control': 'no-cache'}\n }).then(res => {\n resolve({isLoggedIn: true, needs: res.data});\n }).catch(function (res) {\n try { if (res[\"response\"][\"status\"] === 401) resolve({isLoggedIn: false, needs: null}) } catch(err){}\n\n reject(res);\n });});\n}","import i18n from 'i18next';\nimport {initReactI18next} from 'react-i18next';\nimport Backend from 'i18next-xhr-backend';\nimport LanguageDetector from 'i18next-browser-languagedetector';\nimport translationEN from \"./_translations/locales/eng/translation.json\";\nimport translationCAT from \"./_translations/locales/cat/translation.json\";\n\nexport const fallbackLng = [\"cat\"];\nconst availableLanguages = [\"eng\", \"cat\"];\n\nconst resources = {\n eng: {\n translation: translationEN\n },\n cat: {\n translation: translationCAT\n }\n};\n\ni18n\n .use(Backend) // load _translations using http (default public/assets/locals/en/_translations)\n .use(LanguageDetector) // detect user language\n .use(initReactI18next) // pass the i18n instance to react-i18next.\n .init({\n resources,\n fallbackLng, // fallback language is english.\n\n detection: {\n checkWhitelist: true, // options for language detection\n },\n\n debug: false,\n\n whitelist: availableLanguages,\n\n interpolation: {\n escapeValue: false, // no need for react. it escapes by default\n },\n }).then(_ => ({}));\n\nexport default i18n;","/**\n * returns the selected language, defaults to fallbackLng if none is selected\n *\n * @returns string, the selected language\n */\nimport {fallbackLng} from \"../i18nextConf\";\n\nexport const getCurrentLanguage = () => {\n return localStorage.getItem(\"i18nextLng\") || fallbackLng;\n}\n","import Tooltip from \"@material-ui/core/Tooltip\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport Brightness4Icon from \"@material-ui/icons/Brightness4\";\nimport Box from \"@material-ui/core/Box\";\nimport React from \"react\";\nimport {themeContext} from \"../_context/theme-context\";\nimport {useTranslation} from \"react-i18next\";\nimport TranslateIcon from \"@material-ui/icons/Translate\";\nimport i18next from \"i18next\";\nimport {getCurrentLanguage} from \"../_translations/utils\";\n\n\n\nexport default function TranslateButton({...props}){\n const {t} = useTranslation();\n const selectedLanguage = getCurrentLanguage();\n\n return \n {\n\n i18next.changeLanguage(getCurrentLanguage() === \"eng\"? \"cat\": \"eng\").then();\n }}\n aria-label={selectedLanguage === \"cat\"? t(\"use_eng\"): t(\"use_cat\")}>\n \n \n\n ;\n}","import Tooltip from \"@material-ui/core/Tooltip\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport Brightness4Icon from \"@material-ui/icons/Brightness4\";\nimport Box from \"@material-ui/core/Box\";\nimport React from \"react\";\nimport {themeContext} from \"../_context/theme-context\";\nimport {useTranslation} from \"react-i18next\";\n\nexport default function ThemeButton({...props}){\n const themeCtx = React.useContext(themeContext);\n const {t} = useTranslation();\n\n return \n \n \n \n ;\n}","import Tooltip from \"@material-ui/core/Tooltip\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport FolderSharedIcon from \"@material-ui/icons/FolderShared\";\nimport React from \"react\";\nimport {useTranslation} from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nexport default function TeacherDashboardButton({...props}){\n const {t} = useTranslation();\n let history = useHistory();\n\n return \n history.replace(\"/teacher-dashboard\")}\n aria-label={t(\"teacher_dashboard\")}\n aria-haspopup=\"false\">\n \n \n\n;\n}","import IconButton from \"@material-ui/core/IconButton\";\nimport clsx from \"clsx\";\nimport MenuIcon from \"@material-ui/icons/Menu\";\nimport Typography from \"@material-ui/core/Typography\";\nimport Tooltip from \"@material-ui/core/Tooltip\";\nimport AccountCircleIcon from \"@material-ui/icons/AccountCircle\";\nimport Toolbar from \"@material-ui/core/Toolbar\";\nimport React, {useContext} from \"react\";\nimport {useTranslation} from \"react-i18next\";\nimport Menu from \"@material-ui/core/Menu\";\nimport MenuItem from \"@material-ui/core/MenuItem\";\nimport i18next from \"i18next\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport createStyles from \"@material-ui/styles/createStyles\";\nimport {userContext} from \"../_context/user-context\";\nimport {authenticationService} from \"../_services/auth.service\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport TranslateButton from \"./translate_button.component\";\nimport ThemeButton from \"./theme_button.component\";\nimport {DOCS_URL} from \"../config\";\nimport DescriptionIcon from '@material-ui/icons/Description';\nimport SchoolIcon from '@material-ui/icons/School';\nimport { withRouter } from \"react-router\";\nimport { useHistory } from \"react-router-dom\";\nimport FolderSharedIcon from '@material-ui/icons/FolderShared';\nimport TeacherDashboardButton from \"./teacher_dashboard_button\";\n\nconst languageMap = {\n eng: { label: \"english\", dir: \"ltr\", active: true },\n cat: { label: \"català\", dir: \"ltr\", active: false }\n};\n\n\nconst useStyles = makeStyles(theme => (createStyles({\n toolbar: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-end',\n padding: theme.spacing(0, 1),\n // necessary for content to be below app bar\n ...theme.mixins.toolbar,\n },\n grow: {\n flexGrow: 1,\n },\n})));\n\nexport default withRouter(function HomeToolbar(props){\n let history = useHistory();\n const classes = useStyles();\n const errorHandler = useErrorHandler();\n\n const selected = localStorage.getItem(\"i18nextLng\") || \"eng\";\n const { t } = useTranslation();\n\n const title = \"centrífuga4\";\n\n const [anchorEl, setAnchorEl] = React.useState(null);\n const isMenuOpen = Boolean(anchorEl);\n const handleProfileMenuOpen = (event, ) => {\n setAnchorEl(event.currentTarget);\n };\n const handleMenuClose = () => {\n setAnchorEl(null);\n };\n\n const [anchorElLan, setAnchorElLan] = React.useState(null);\n const isLanguageMenuOpen = Boolean(anchorElLan);\n const handleLanguageMenuOpen = (event) => {\n setAnchorElLan(event.currentTarget);\n };\n const handleLanguageMenuClose = () => {\n setAnchorElLan(null);\n };\n const changeLanguage = (language) => {\n i18next.changeLanguage(language).then();\n handleLanguageMenuClose();\n }\n React.useEffect(() => {\n document.body.dir = languageMap[selected].dir;\n }, [anchorElLan, selected]);\n\n const languageMenuId = 'primary-language-select-menu';\n const languageMenu = (\n \n );\n\n const userCtx = useContext(userContext);\n\n\n const userMenuId = 'primary-search-account-menu';\n const userMenu = (\n \n );\n\n return (\n \n \n\n \n \n \n \n {title}\n \n \n\n\n
\n\n\n
\n window.open(DOCS_URL, \"_blank\")}\n aria-label={t(\"docs\")}\n aria-haspopup=\"false\">\n \n \n \n
\n
\n\n\n
\n \n \n \n \n\n\n {languageMenu}\n {userMenu}\n \n )\n});\n","import {makeStyles} from \"@material-ui/core/styles\";\nimport createStyles from \"@material-ui/styles/createStyles\";\nimport React, {useEffect} from \"react\";\nimport CssBaseline from \"@material-ui/core/CssBaseline\";\nimport AppBar from \"@material-ui/core/AppBar\";\nimport clsx from \"clsx\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport Drawer from \"@material-ui/core/Drawer\";\nimport ChevronRightIcon from \"@material-ui/icons/ChevronRight\";\nimport ChevronLeftIcon from \"@material-ui/icons/ChevronLeft\";\nimport Divider from \"@material-ui/core/Divider\";\nimport List from \"@material-ui/core/List\";\nimport ListItem from \"@material-ui/core/ListItem\";\nimport ListItemIcon from \"@material-ui/core/ListItemIcon\";\nimport Tooltip from '@material-ui/core/Tooltip';\nimport ListItemText from \"@material-ui/core/ListItemText\";\nimport useTheme from \"@material-ui/core/styles/useTheme\";\nimport Routes from \"./routes\";\nimport {BrowserRouter, Switch, Link, Route, Redirect} from \"react-router-dom\";\nimport {useTranslation} from \"react-i18next\";\nimport HomeToolbar from \"../_components/toolbar.home.component\";\nimport {useNeeds} from \"../_helpers/needs\";\nimport {\n Backdrop,\n CircularProgress,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n useMediaQuery\n} from \"@material-ui/core\";\nimport {loadingContext} from '../_context/loading-context';\nimport {tabContext} from '../_context/tab-context';\nimport { useHistory } from \"react-router-dom\";\nimport { useRouteMatch, useLocation } from \"react-router-dom\";\n\nconst drawerWidth = 240;\nconst useStyles = makeStyles(theme => (createStyles({\n root: {\n display: 'flex',\n height: '100vh'\n },\n appBar: {\n zIndex: theme.zIndex.drawer + 1,\n transition: theme.transitions.create(['width', 'margin'], {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n background: theme.palette.neutral.main,\n color: theme.palette.neutral.emphasisText.medium,\n },\n appBarShift: {\n marginLeft: drawerWidth,\n width: `calc(100% - ${drawerWidth}px)`,\n transition: theme.transitions.create(['width', 'margin'], {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen,\n }),\n },\n menuButton: {\n marginRight: 36,\n },\n hide: {\n display: 'none',\n },\n drawer: {\n width: drawerWidth,\n flexShrink: 0,\n whiteSpace: 'nowrap',\n },\n drawerOpen: {\n width: drawerWidth,\n transition: theme.transitions.create('width', {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen,\n }),\n },\n drawerClose: {\n transition: theme.transitions.create('width', {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n overflowX: 'hidden',\n width: theme.spacing(7) + 1,\n [theme.breakpoints.up('sm')]: {\n width: theme.spacing(9) + 1,\n },\n },backdrop: {\n zIndex: theme.zIndex.drawer + 1,\n color: '#fff',\n },\n toolbar: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-end',\n padding: theme.spacing(0, 1),\n // necessary for content to be below app bar\n ...theme.mixins.toolbar,\n },\n content: {\n display: 'flex',\n flexFlow: 'column',\n height: \"100%\",\n width: \"100%\",\n overflow: 'auto'\n },\n main: {\n flex: 1,\n padding: theme.spacing(3),\n overflow: 'auto'\n },\n icon: {\n '&': {\n color: theme.palette.neutral.emphasisText.medium,\n }\n },\n selectedIcon: {\n '&': {\n color: theme.palette.primary.main,\n }\n },\n grow: {\n flexGrow: 1,\n },\n})));\n\nconst HomePage = (props) => {\n const theme = useTheme();\n const classes = useStyles();\n\n const baseRouter = props.baseRouter;\n\n const { t } = useTranslation();\n\n const [open, setOpen] = React.useState(false);\n\n let match = useRouteMatch();\n const location = useLocation();\n const currentRoute = location.pathname;\n const [hasNeeds, NEEDS] = useNeeds();\n\n const handleDrawerOpen = () => {\n setOpen(true);\n };\n const handleDrawerClose = () => {\n setOpen(false);\n };\n\n const [loading, setLoading] = React.useState(false);\n const handleClose = () => {\n setLoading(false);\n };\n\n const routerRef = React.createRef();\n let history = useHistory();\n\n return (\n
\n
\n
{setLoading(true)}, stopLoading: () =>{setLoading(false)}}}>\n \n \n \n \n \n \n \n {\n if (id === null) {\n history.replace(`/home/${res}`);\n } else {\n history.replace(`/home/${res}?id=${id}`);\n }\n }}}>\n \n \n \n {theme.direction === 'rtl' ? : }\n \n
\n \n \n {Routes\n .filter(route => hasNeeds(route.needs))\n .map((prop) =>(\n \n \n \n {}\n \n \n \n \n ))}\n
\n \n\n\n \n
\n \n \n \n \n {Routes\n .filter(route => hasNeeds(route.needs))\n .map((prop) => )\n }\n \n
\n \n \n\n
\n \n \n\n \n\n \n
\n );\n}\n\nexport default HomePage;","import axios from \"axios\";\nimport {authHeader} from \"../_helpers/auth-header\";\nimport {BACKEND_URL} from \"../config\";\n\nexport const passwordResetService = {\n reset,\n startReset\n};\n\nfunction reset(username, password, token, recaptcha) {\n\n return new Promise(function(resolve, reject) {\n axios({url: `${BACKEND_URL}/password-reset/v1/redeem`,\n method: 'POST',\n data: {\n email: username,\n password: password,\n token: token,\n recaptcha: recaptcha\n },\n headers: {...{'Cache-Control': 'no-cache'}, ...authHeader()}\n }).then(response => {\n resolve(true);\n }).catch(function (err) {\n reject(err);\n });\n });\n}\n\nfunction startReset(username, recaptcha) {\n\n return new Promise(function(resolve, reject) {\n axios({url: `${BACKEND_URL}/password-reset/v1/request`,\n method: 'POST',\n data: {\n email: username,\n recaptcha: recaptcha\n },\n headers: {...{'Cache-Control': 'no-cache'}, ...authHeader()}\n }).then(response => {\n resolve(true);\n }).catch(function (err) {\n reject(err);\n });\n });\n}\n","import { useEffect } from \"react\";\n\nexport const useOnMount = handler => {\n return useEffect(() => {\n return handler();\n }, []);\n};","import React from 'react';\nimport {useFormik} from 'formik';\nimport {authenticationService} from '../_services/auth.service';\nimport {userContext} from \"../_context/user-context\";\nimport * as yup from 'yup';\nimport {TextField} from \"@material-ui/core\";\nimport {useTranslation} from \"react-i18next\";\nimport Grid from \"@material-ui/core/Grid\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport Box from \"@material-ui/core/Box\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Button from \"@material-ui/core/Button\";\nimport Typography from \"@material-ui/core/Typography\";\nimport {themeContext} from \"../_context/theme-context\";\nimport Link from \"@material-ui/core/Link\";\nimport {passwordResetService} from \"../_services/password-reset.service\";\nimport {useSnackbar} from \"notistack\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport {useOnMount} from \"../_helpers/on-mount\";\nimport {safe_username_required} from \"../_yup/validators\";\nimport ReCAPTCHA from \"react-google-recaptcha\";\nimport {PUBLIC_URL, RECAPTCHA} from \"../config\";\nimport TranslateButton from \"../_components/translate_button.component\";\nimport ThemeButton from \"../_components/theme_button.component\";\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\nimport {Checkbox} from \"@material-ui/core\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: \"flex\",\n flexGrow: 1,\n height: \"100vh\"\n },\n field: {\n width: \"100%\",\n margin: \"5px\"\n },\n details: {\n width: \"100%\",\n display: 'flex',\n verticalAlign: 'middle'\n },\n paper: {\n height: \"50%\",\n [theme.breakpoints.up('md')]:{minWidth: \"500px\", width: \"50%\"},\n [theme.breakpoints.down('md')]:{width: \"100%\"},\n margin: \"auto\",\n padding: \"50px\"\n },\n reset: {\n width: \"100%\",\n textAlign: \"end\",\n cursor: \"\",\n display: 'flex',\n flexDirection: { xs: 'column', md: 'row' },\n verticalAlign: 'middle'\n },\n remember: {\n width: \"100%\",\n textAlign: \"start\",\n cursor: \"\",\n verticalAlign: 'middle'\n }\n}));\n\n\nconst LoginPage = (props) => {\n const classes = useStyles();\n const userCtx = React.useContext(userContext);\n const themeCtx = React.useContext(themeContext);\n const mobile = useMediaQuery('(max-width:960px)');\n const [recaptcha, setRecaptcha] = React.useState(null);\n const [showRecaptcha, setShowRecaptcha] = React.useState(false);\n function onChange(value) {\n setRecaptcha(value);\n }\n\n const errorHandler = useErrorHandler();\n\n const {enqueueSnackbar} = useSnackbar();\n\n const logged = (needs) => {\n const setLogged = userCtx[\"setUser\"];\n const setNeeds = userCtx[\"setNeeds\"];\n const setTeacher = userCtx[\"setTeacher\"];\n setLogged({logged: true, ping: true});\n setNeeds(needs[\"needs\"]);\n setTeacher(needs[\"teacher\"]);\n const {from} = props.location.state || {from: {pathname: \"/home/students\"}};\n props.history.push(from);\n }\n\n const {t} = useTranslation();\n const formik = useFormik({\n initialValues: {\n username: '',\n password: '',\n totp: '',\n rememberMe: false\n },\n validationSchema: yup.object({\n username: safe_username_required(t),\n password: yup.string().required(t(\"password_required\")),\n totp: yup.string().required(t(\"2FA_needed\")).test('len', t(\"2FA_6digits\"), (val) => (val === undefined ? \"\": val).toString().length === 6).test('digits', t(\"2FA_invalid\"), (val) => Number(val)? true: false)\n }),\n enableReinitialize: true,\n onSubmit: ({username, password, totp, rememberMe}, {setStatus, setSubmitting}) => {\n setStatus();\n authenticationService\n .login(username, password, totp, rememberMe)\n .then(...errorHandler({handle401: false}))\n .then(function (res) {\n if (!res['logged']) {\n setStatus(true);\n return;\n }\n logged(res['needs']);\n })\n\n .finally(() => {\n setSubmitting(false);\n });\n }\n });\n\n useOnMount(() => {\n if (userCtx[\"user\"][\"logged\"]) {\n props.history.push('/home/students');\n return null;\n }\n\n if (userCtx[\"user\"][\"ping\"] !== false){\n authenticationService\n .ping()\n .then(...errorHandler({}))\n .then((response) => {\n if (response.isLoggedIn) logged(response.needs);\n })\n\n }\n\n });\n\n const resetPassword = () => {\n setShowRecaptcha(true);\n }\n\n const resetPassword2 = () => {\n const username = formik.values[\"username\"];\n if (username === null || username === '' || username === undefined) {\n enqueueSnackbar(t(\"username_required_password_reset\"), { variant: \"warning\"});\n } else {\n passwordResetService\n .startReset(username, recaptcha)\n .then(...errorHandler({}))\n .then(r => {\n setShowRecaptcha(false);\n enqueueSnackbar(t(\"started_password_reset\"), { variant: \"success\"});\n })\n }\n }\n\n return (\n \n\n
\n {!mobile && }\n\n \n \n\n \n \n {mobile && <>\n \n >\n }\n \n\n \n\n \n\n {showRecaptcha &&\n \n \n \n \n
}\n\n \n \n \n\n \n \n {!mobile && \n \n \n }\n );\n\n}\n\nexport default LoginPage;","import axios from \"axios\";\nimport {authHeader} from \"../_helpers/auth-header\";\nimport {BACKEND_URL} from \"../config\";\n\nexport const authenticationService = {\n signup\n};\n\nfunction signup(username, password, email, name, surname1, surname2, token) {\n\n return new Promise(function(resolve, reject) {\n axios({url: `${BACKEND_URL}/user-invites/v1/redeem`,\n method: 'POST',\n data: {\n password: password,\n email: email,\n name: name,\n surname1: surname1,\n surname2: surname2,\n token: token\n },\n headers: {...{'Cache-Control': 'no-cache'}, ...authHeader()}\n }).then(response => {\n resolve(response.data);\n }).catch(function (err) {\n reject(err);\n });\n });\n}\n","import React, {useState} from 'react';\nimport {useFormik} from 'formik';\nimport * as yup from 'yup';\nimport {TextField} from \"@material-ui/core\";\nimport {useTranslation} from \"react-i18next\";\nimport Grid from \"@material-ui/core/Grid\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport Box from \"@material-ui/core/Box\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Button from \"@material-ui/core/Button\";\nimport Typography from \"@material-ui/core/Typography\";\nimport {themeContext} from \"../_context/theme-context\";\nimport {authenticationService as signupService} from \"../_services/signup.service\";\nimport {useSnackbar} from \"notistack\";\nimport i18next from \"i18next\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport {useOnMount} from \"../_helpers/on-mount\";\nimport {safe_password_repetition, safe_email_required, safe_password, safe_username_required} from \"../_yup/validators\";\nimport TranslateButton from \"../_components/translate_button.component\";\nimport ThemeButton from \"../_components/theme_button.component\";\nimport {PUBLIC_URL} from \"../config\";\nimport QRCode from \"react-qr-code\";\nimport Link from '@material-ui/core/Link';\nimport {confirmContext} from \"../_context/confirm-context\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: \"flex\",\n flexGrow: 1,\n height: \"100vh\"\n },\n field: {\n width: \"100%\",\n margin: \"5px\"\n },\n paper: {\n width: \"50%\",\n minWidth: \"500px\",\n height: \"50%\",\n padding: \"50px\",\n margin: \"auto\"\n }\n}));\n\nconst STEP_REGISTER = 0;\nconst STEP_TOTP = 1;\n\nconst SignupPage = (props) => {\n const classes = useStyles();\n const themeCtx = React.useContext(themeContext);\n const {enqueueSnackbar} = useSnackbar();\n const [step, setStep] = useState(STEP_REGISTER);\n const [totpUri, setTotpUri] = useState(null);\n const confirm = React.useContext(confirmContext);\n\n useOnMount(() => {\n i18next.changeLanguage(query.get('lan')).then();\n })\n\n const {t} = useTranslation();\n const errorHandler = useErrorHandler();\n const query = new URLSearchParams(window.location.search);\n const token = query.get('token')\n const email = query.get('email')\n const formik = useFormik({\n initialValues: {\n username: email,\n email: email,\n password: '',\n name: '',\n surname1: '',\n surname2: '',\n password2: '',\n },\n validationSchema: yup.object({ // todo translate\n username: safe_username_required(t),\n email: safe_email_required(t),\n password: safe_password(t),\n password2: safe_password_repetition(t),\n name: yup.string().required(t(\"name_required\")),\n surname1: yup.string().required(t(\"surname1_required\")),\n surname2: yup.string().required(t(\"surname2_required\"))\n }),\n enableReinitialize: true,\n onSubmit: ({username, email, password, name, surname1, surname2, password2}, {setStatus, setSubmitting}) => {\n setStatus();\n\n signupService.signup(username, password, email, name, surname1, surname2, token)\n .then(...errorHandler({handle401: false, handle400: false}))\n .then(\n function (result) {\n enqueueSnackbar(t(\"sign_up_success\"), {variant: \"success\"});\n setSubmitting(false);\n setStep(STEP_TOTP);\n setTotpUri(result['totp']);\n },\n function (error) {\n setSubmitting(false);\n setStatus(error);\n\n if (error.response.status === 401){\n enqueueSnackbar(t(\"invalid_expired_invite\"), { variant: \"warning\"});\n } else if (error.response.status === 400) {\n enqueueSnackbar(t(\"used_invite\"), { variant: \"warning\"});\n }\n });\n }\n });\n\n const RegisterStep = () => \n \n {t(\"been_invited\")}\n \n \n ;\n\n const TotpStep = () => \n \n {t(\"setup_2FA\")}\n \n \n \n - {t(\"2FA_tip1\")}
\n - {t(\"2FA_tip2\")}
\n - {t(\"2FA_tip3\")}
\n
\n \n \n \n {totpUri !== null && }\n \n\n \n {t(\"learn_how_2FA\")}\n \n\n \n \n \n \n\n return (\n \n
\n \n\n \n \n \n \n \n \n\n {step === STEP_REGISTER && RegisterStep()}\n {step === STEP_TOTP && TotpStep()}\n \n \n \n \n \n \n \n \n );\n\n}\n\nexport default SignupPage;","import React from 'react';\nimport {useFormik} from 'formik';\nimport * as yup from 'yup';\nimport {TextField} from \"@material-ui/core\";\nimport {useTranslation} from \"react-i18next\";\nimport Grid from \"@material-ui/core/Grid\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport Box from \"@material-ui/core/Box\";\nimport Paper from \"@material-ui/core/Paper\";\nimport Button from \"@material-ui/core/Button\";\nimport Typography from \"@material-ui/core/Typography\";\nimport {themeContext} from \"../_context/theme-context\";\nimport {useSnackbar} from \"notistack\";\nimport {passwordResetService} from \"../_services/password-reset.service\";\nimport i18next from \"i18next\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport {useOnMount} from \"../_helpers/on-mount\";\nimport {safe_password, safe_password_repetition, safe_username_required} from \"../_yup/validators\";\nimport {PUBLIC_URL, RECAPTCHA} from \"../config\";\nimport ReCAPTCHA from \"react-google-recaptcha\";\nimport TranslateButton from \"../_components/translate_button.component\";\nimport ThemeButton from \"../_components/theme_button.component\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: \"flex\",\n flexGrow: 1,\n height: \"100vh\"\n },\n field: {\n width: \"100%\",\n margin: \"5px\"\n },\n recaptcha: {\n margin: theme.spacing(3)\n },\n paper: {\n width: \"50%\",\n minWidth: \"500px\",\n height: \"50%\",\n padding: \"50px\",\n margin: \"auto\"\n }\n}));\n\n\nconst ResetPage = (props) => {\n const classes = useStyles();\n const themeCtx = React.useContext(themeContext);\n\n const [recaptcha, setRecaptcha] = React.useState(null);\n function onChange(value) {\n setRecaptcha(value);\n }\n\n const {enqueueSnackbar} = useSnackbar();\n\n useOnMount(() => {\n i18next.changeLanguage(query.get('lan')).then();\n })\n\n const {t} = useTranslation();\n const query = new URLSearchParams(window.location.search);\n const errorHandler = useErrorHandler();\n const token = query.get('token')\n const email = query.get('email')\n const formik = useFormik({\n initialValues: {\n email: email,\n password: '',\n password2: '',\n },\n validationSchema: yup.object({\n email: safe_username_required(t),\n password: safe_password(t),\n password2: safe_password_repetition(t)\n }),\n enableReinitialize: true,\n onSubmit: ({email, password, password2}, {setStatus, setSubmitting}) => {\n setStatus();\n\n passwordResetService\n .reset(email, password, token, recaptcha)\n .then(...errorHandler({handle401: false}))\n .then(\n function (result) {\n enqueueSnackbar(t(\"reset_password_success\"), {variant: \"success\"});\n setSubmitting(false);\n props.history.push(\"/login\");\n },\n function (error) {\n setSubmitting(false);\n setStatus(error);\n\n if (error.response.status === 401){\n enqueueSnackbar(t(\"invalid_expired_reset\"), { variant: \"warning\"});\n } // TODO report, same in the signup\n });\n }\n });\n\n console.log(\"***\", formik.error, formik.errors, formik.errors['email'], formik.touched, formik.values, formik.initialValues);\n\n return (\n \n
\n \n\n \n \n \n \n \n \n\n \n {t(\"new_password\")}\n \n\n \n \n \n \n \n \n \n \n \n \n );\n\n}\n\nexport default ResetPage;","import React from 'react';\nimport Box from \"@material-ui/core/Box\";\nimport {themeContext} from \"../_context/theme-context\";\nimport {PUBLIC_URL, RECAPTCHA} from \"../config\";\n\n\nexport default function XamfraLogo() {\n const themeCtx = React.useContext(themeContext);\n\n\n return \n \n \n}","import axios from \"axios\";\nimport {authHeader} from \"../_helpers/auth-header\";\nimport {API_VERSION, BACKEND_URL} from \"../config\";\n\nexport const preEnrolmentService = {\n getCourses,\n postPreEnrollment\n};\n\nfunction getCourses() {\n return new Promise(function (resolve, reject) {\n\n axios({\n method: 'get',\n url: `${BACKEND_URL}/pre-enrolment/v1/courses`,\n headers: {\n ...{\n 'Content-Type': 'application/json',\n 'Cache-Control': 'no-cache'\n }, ...authHeader() // todo are auth headers needed for gets?\n }\n }).then(function (response) {\n resolve(response.data);\n }).catch(function (err) {\n reject(err);\n });\n });\n }\n\n\n function postPreEnrollment(data, recaptcha) {\n return new Promise(function (resolve, reject) {\n\n axios({\n method: 'post',\n url: `${BACKEND_URL}/pre-enrolment/v1/pre-enrolment`,\n data: {\n body: data,\n recaptcha: recaptcha\n },\n headers: {\n ...{\n 'Content-Type': 'application/json',\n 'Cache-Control': 'no-cache'\n }, ...authHeader()\n }\n }).then(function (response) {\n resolve(response);\n }).catch(function (err) {\n reject(err);\n });\n });\n }\n","export const getNextDayOfWeek = (date, dayOfWeek) => {\n // Code to check that date and dayOfWeek are valid left as an exercise ;)\n\n var resultDate = new Date(date.getTime());\n\n resultDate.setDate(date.getDate() + (7 + dayOfWeek - date.getDay()) % 7);\n\n return resultDate;\n}\n\nexport const getLocalisedWeekday = (dayOfWeek) => {\n let today = new Date();\n let nextDayOfWeek = getNextDayOfWeek(today, dayOfWeek);\n return nextDayOfWeek.toLocaleString(window.navigator.language, {weekday: 'short'});\n}\n\nexport const textSchedulesForCourse = (course) => {\n if (!course[\"base_schedules\"]) return null;\n return course[\"base_schedules\"].map(s => getLocalisedWeekday(s.day_week) + \", \" + s.start_time.slice(0, -3) + \" - \" + s.end_time.slice(0, -3)).join(\"; \");\n}\n\n","import React from 'react';\nimport { Divider } from '@material-ui/core';\nimport Box from \"@material-ui/core/Box\";\nimport XamfraLogo from './xamfra.logo.component';\nimport {makeStyles} from \"@material-ui/core/styles\";\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n backgroundColor: theme.palette.background.paper\n }\n }));\n \n\nexport default function XamfraHeader(props) {\n \n const classes = useStyles();\n\n return \n \n {props.children}\n \n \n\n \n}","import React, {useEffect, useRef, useState} from 'react';\nimport * as yup from 'yup';\nimport {\n BottomNavigation,\n Card, CardActions,\n Checkbox,\n FormControlLabel, ListItemIcon, ListItemSecondaryAction,\n MenuItem, MobileStepper,\n Step,\n StepLabel,\n Stepper, Tooltip, withStyles\n} from \"@material-ui/core\";\nimport XamfraLogo from '../_components/xamfra.logo.component';\nimport NavigateNextIcon from '@material-ui/icons/NavigateNext';\nimport NavigateBeforeIcon from '@material-ui/icons/NavigateBefore';\nimport {useTranslation} from \"react-i18next\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport Box from \"@material-ui/core/Box\";\nimport SkipNextIcon from '@material-ui/icons/SkipNext';\nimport Paper from \"@material-ui/core/Paper\";\nimport Button from \"@material-ui/core/Button\";\nimport Typography from \"@material-ui/core/Typography\";\nimport {themeContext} from \"../_context/theme-context\";\nimport {useSnackbar} from \"notistack\";\nimport i18next from \"i18next\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport {useOnMount} from \"../_helpers/on-mount\";\nimport ReCAPTCHA from \"react-google-recaptcha\"\nimport DirtyTextField from \"../_components/dirtytextfield.component\";\nimport Divider from \"@material-ui/core/Divider\";\nimport DirtyCountrySelect from \"../_components/contry-select.component\";\nimport {education_years} from \"../_data/education\";\nimport {emptyAttendee} from \"../_data/empty_objects\";\nimport {useNormik} from \"../_helpers/normik\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport {student_guardian_relations} from \"../_data/relations\";\nimport SearchBar from \"../_components/searchbar.component\";\nimport List from \"@material-ui/core/List\";\nimport ListItem from \"@material-ui/core/ListItem\";\nimport ListItemText from \"@material-ui/core/ListItemText\";\nimport CardContent from \"@material-ui/core/CardContent\";\nimport DeleteIcon from \"@material-ui/icons/Delete\";\nimport {PUBLIC_URL, RECAPTCHA} from \"../config\";\nimport ThemeButton from \"../_components/theme_button.component\";\nimport Link from \"@material-ui/core/Link\";\nimport TranslateButton from \"../_components/translate_button.component\";\nimport {preEnrolmentService} from \"../_services/pre-enrolment.service\";\nimport {DNI_OR_NIE_REGEX, safe_email, safe_email_required} from \"../_yup/validators\";\nimport {KeyboardArrowLeft, KeyboardArrowRight} from \"@material-ui/icons\";\nimport useTheme from \"@material-ui/core/styles/useTheme\";\nimport DoneIcon from '@material-ui/icons/Done';\nimport CheckCircleIcon from '@material-ui/icons/CheckCircle';\nimport {textSchedulesForCourse} from \"../utils/localized-weekdays\";\n\nimport XamfraHeader from '../_components/xamfra.header.component';\nconst useStyles = makeStyles((theme) => ({\n root: {\n width: \"100%\"\n },\n field: {\n width: \"100%\",\n margin: \"5px\"\n },\n cards: {\n '& > *': {\n margin: theme.spacing(3),\n },\n },\n buttons: {\n '& > *': {\n margin: theme.spacing(1),\n },\n }, line: {\n width: \"100%\",\n marginTop: theme.spacing(1)\n },\n card: {\n minWidth: 200,\n width: 'fit-content',\n maxWidth: 500,\n display: 'inline-block'\n },\n recaptcha: {\n margin: theme.spacing(4)\n },\n bullet: {\n display: 'inline-block',\n margin: '0 2px',\n transform: 'scale(0.8)',\n },\n title: {\n fontSize: 14,\n },\n pos: {\n marginBottom: 12,\n },\n list: {\n minHeight: '150px',\n overflow: 'auto'\n },\n composite: {\n display: \"flex\", flexDirection: \"row\", flex: 1, flexWrap: \"wrap\",\n gap: theme.spacing(1), width: \"100%\"\n }\n}));\n\n\n\nconst isUnderage = (birthDateString) => {\n let today = new Date();\n let birthDate = new Date(birthDateString);\n let age = today.getFullYear() - birthDate.getFullYear();\n let m = today.getMonth() - birthDate.getMonth();\n if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) age--;\n return age < 18;\n}\nconst PreEnrolmentPage = (props) => {\n const {t} = useTranslation();\n\n const can_pay_75 = \"Puc pagar la quota trimestral de 75€/estudiant\";\n\n const classes = useStyles();\n\n\n const [recaptcha, setRecaptcha] = React.useState(null);\n function onChange(value) {\n setRecaptcha(value);\n }\n\n const {enqueueSnackbar} = useSnackbar();\n const [skipped, setSkipped] = React.useState(new Set());\n const [availableCourses, setAvailableCourses] = React.useState([]);\n const [filteredCourses, setFilteredCourses] = React.useState([]);\n const [chosenCourses, setChosenCourses] = React.useState([]);\n const [raw_economic_comments, setRawEconomicComments] = React.useState([]);\n const isStepSkipped = (step) => {\n return skipped.has(step);\n };\n\n const [activeStep, setActiveStep] = React.useState(0);\n const steps = [t(\"data_protection\"), t(\"student_info\"), t(\"contact_person_1\"), t(\"contact_person_2\"), t(\"courses\"), t(\"payment\"), t(\"confirmation\")];\n\n const handleSkip = () => {\n if (!isStepOptional(activeStep)) {\n // You probably want to guard against something like this,\n // it should never occur unless someone's actively trying to break something.\n throw new Error(\"You can't skip a step that isn't optional.\");\n }\n\n setActiveStep((prevActiveStep) => prevActiveStep + 1);\n setSkipped((prevSkipped) => {\n const newSkipped = new Set(prevSkipped.values());\n newSkipped.add(activeStep);\n return newSkipped;\n });\n };\n const handleBack = () => {\n setActiveStep((prevActiveStep) => prevActiveStep - 1);\n };\n\n const handleReset = () => {\n setActiveStep(0);\n };\n\n useOnMount(() => {\n i18next.changeLanguage('cat').then(); // set catalan for all visiting families as default\n preEnrolmentService.getCourses()\n .then(...errorHandler({}))\n .then(courses => {\n setAvailableCourses(courses);\n setFilteredCourses(courses);\n })\n });\n\n const theme = useTheme();\n\n\n const [searchTerm, setSearchTerm] = useState('');\n\n const errorHandler = useErrorHandler();\n const required = t(\"required\");\n const formik = useNormik(false,{\n initialValues: {...emptyAttendee,\n __person1__name: '', __person2__name: '',\n__person1__surname1: '',\n __person1__surname2: '',\n __person1__email: '', __person1__phone: '', __person1__relation: '',\n __person1__is_studying: '', __person1__is_working: '', __person1__career: '',\n __person1__education_entity: '', __person1__education_year: '',\n __person2__surname1: '',\n __person2__surname2: '',\n __person2__email: '', __person2__phone: '', __person2__relation: '',\n __person2__is_studying: '', __person2__is_working: '', __person2__career: '',\n __person2__education_entity: '', __person2__education_year: '',\n image_agreement: false\n\n\n },\n validationSchema: yup.object({ // todo translate\n name: yup.string(required).required(required),\n surname1: yup.string(required).required(required),\n surname2: yup.string(required).required(required),\n email: safe_email(t).when('birth_date', (other, schema) => ((other && !isUnderage(other))? schema.required(required): schema)),\n phone: yup.string().when('birth_date', (other, schema) => ((other && !isUnderage(other))? schema.required(required): schema)),\n address: yup.string(required).required(required),\n city: yup.string(required).required(required),\n zip: yup.number(required).required(required),\n country_of_origin: yup.string(required).notOneOf(['empty']).test( // one of the array\n 'countryNonEmpty',\n required,\n v => v !== undefined\n ),\n gender: yup.string(required).required(required),\n is_studying: yup.boolean(required).required(required),\n is_working: yup.boolean(required).required(required),\n career: yup.string(required).when('is_working', {\n is: true,\n then: yup.string().required(required)\n }),\n education_entity: yup.string(required).when('is_studying', {\n is: true,\n then: yup.string().required(required)\n }),\n education_year: yup.string(required).when('is_studying', {\n is: true,\n then: yup.string().required(required)\n }),\n birth_date: yup.date(required).required(required),\n years_in_xamfra: yup.number(required).required(required),\n __person1__name: yup.string(required).test( // one of the array\n 'requiredIfNotSkipped',\n required,\n v => {\n return v !== undefined && v !== \"\" || isStepSkipped(2)\n }\n ),\n __person1__surname1: yup.string(required).test( // one of the array\n 'requiredIfNotSkipped',\n required,\n v => v !== undefined && v !== \"\"|| isStepSkipped(2)\n ),\n __person1__surname2: yup.string(required).test( // one of the array\n 'requiredIfNotSkipped',\n required,\n v => v !== undefined && v !== \"\" || isStepSkipped(2)\n ),\n __person1__email: safe_email(t).test( // one of the array\n 'requiredIfNotSkipped',\n required,\n v =>v !== undefined && v !== \"\"|| isStepSkipped(2)\n ),\n __person1__phone: yup.string(required).test( // one of the array\n 'requiredIfNotSkipped',\n required,\n v =>v !== undefined && v !== \"\" || isStepSkipped(2)\n ),\n __person1__relation: yup.string(required).test( // one of the array\n 'requiredIfNotSkipped',\n required,\n v => v !== undefined && v !== \"\"|| isStepSkipped(2)\n ),\n __person1__is_studying: yup.boolean(required).test( // one of the array\n 'requiredIfNotSkipped',\n required,\n v => v !== undefined && v !== \"\" || isStepSkipped(2)\n ),\n __person1__is_working: yup.boolean(required).test( // one of the array\n 'requiredIfNotSkipped',\n required,\n v => v !== undefined && v !== \"\" || isStepSkipped(2)\n\n ),\n __person1__career: yup.string(required).when('__person1__is_working', {\n is: true,\n then: yup.string().required(required)\n }),\n __person2__name: yup.string(required).test( // one of the array\n 'requiredIfNotSkipped',\n required,\n v =>v !== undefined && v !== \"\" || isStepSkipped(3)\n ),\n __person2__surname1: yup.string(required).test( // one of the array\n 'requiredIfNotSkipped',\n required,\n v => v !== undefined && v !== \"\" || isStepSkipped(3)\n ),\n __person2__surname2: yup.string(required).test( // one of the array\n 'requiredIfNotSkipped',\n required,\n v => v !== undefined && v !== \"\"|| isStepSkipped(3)\n ),\n __person2__email: safe_email(t).test( // one of the array\n 'requiredIfNotSkipped',\n required,\n v => v !== undefined && v !== \"\" || isStepSkipped(3)\n ),\n __person2__phone: yup.string(required).test( // one of the array\n 'requiredIfNotSkipped',\n required,\n v => v !== undefined && v !== \"\"|| isStepSkipped(3)\n ),\n __person2__relation: yup.string(required).test( // one of the array\n 'requiredIfNotSkipped',\n required,\n v =>v !== undefined && v !== \"\"|| isStepSkipped(3)\n ),\n __person2__is_studying: yup.boolean(required).test( // one of the array\n 'requiredIfNotSkipped',\n required,\n v => v !== undefined && v !== \"\" || isStepSkipped(3)\n ),\n __person2__is_working: yup.boolean(required).test( // one of the array\n 'requiredIfNotSkipped',\n required,\n v => v !== undefined && v !== \"\" || isStepSkipped(3)\n ),\n __person2__career: yup.string(required).when('__person2__is_working', {\n is: true,\n then: yup.string().required(required)\n }),\n __person2__education_entity: yup.string(required).when('__person2__is_studying', {\n is: true,\n then: yup.string().required(required)\n }),\n image_agreement: yup.boolean(required)\n }),\n enableReinitialize: true,\n onSubmit: (values, {setStatus, setSubmitting}) => {\n setStatus();\n\n let body = {};\n\n body['image_agreement'] = values.image_agreement;\n body['name'] = values.name;\n body['surname1'] = values.surname1;\n body['surname2'] = values.surname2;\n body['email'] = values.email;\n body['address'] = values.address;\n body['city'] = values.city;\n body['zip'] = values.zip;\n body['dni'] = values.dni;\n body['phone'] = values.phone;\n body['country_of_origin'] = values.country_of_origin;\n body['gender'] = values.gender;\n body['is_studying'] = values.is_studying;\n body['is_working'] = values.is_working;\n body['education_entity'] = values.education_entity;\n body['education_year'] = values.education_year;\n body['career'] = values.career;\n body['birth_date'] = values.birth_date;\n body['years_in_xamfra'] = values.years_in_xamfra;\n body['guardians'] = [];\n [2,3].map(idx => {\n if (!isStepSkipped(idx)){\n let guardian = {};\n const prefix = `__person${idx-1}__`;\n guardian['name'] = values[prefix+\"name\"];\n guardian['surname1'] = values[prefix+\"surname1\"];\n guardian['surname2'] = values[prefix+\"surname2\"];\n guardian['email'] = values[prefix+\"email\"];\n guardian['phone'] = values[prefix+\"phone\"];\n guardian['is_studying'] = values[prefix+\"is_studying\"];\n guardian['is_working'] = values[prefix+\"is_working\"];\n guardian['education_entity'] = values[prefix+\"education_entity\"];\n guardian['career'] = values[prefix+\"career\"];\n guardian['relation'] = values[prefix+\"relation\"];\n\n body['guardians'].push(guardian);\n }\n })\n body['payment_comments'] = raw_economic_comments.join('. ');\n if (raw_economic_comments.includes(can_pay_75)){\n body['price_term'] = 75;\n } else {\n body['price_term'] = null;\n }\n body['other_comments'] = values['other_comments'];\n body['courses'] = chosenCourses.map(x => x.id);\n\n setSubmitting(false);\n\n preEnrolmentService.postPreEnrollment(body, recaptcha)\n .then(...errorHandler({snackbarSuccess: true}))\n .then(() => {\n setActiveStep(steps.length);\n })\n }\n });\n\n useEffect(() => {\n let labels = [];\n if (!isUnderage(formik.values['birth_date']) || formik.values['is_working'] ){\n labels.push(\"adult\");\n }\n if (formik.values['is_studying']){\n labels.push(formik.values['education_year']);\n }\n\n setFilteredCourses(availableCourses.filter(x => labels.some(l => x['labels'].includes(l))));\n\n }, [availableCourses, formik.values['education_year'], formik.values['birth_date']]);\n\n\n const isStepOptional = (step) => {\n return step === 3 || (step === 2 && formik.values['birth_date'] !== '' && !isUnderage(formik.values['birth_date']));\n };\n const fieldsToValidatePerStep = [ // to have coinciding indexes with steps\n [],\n ['birth_date', 'name', 'surname1', 'surname2', 'address', 'city', 'zip', 'gender', 'is_studying', 'is_working', 'education_entity', 'education_year', 'career', 'years_in_xamfra', 'country_of_origin', 'phone', 'email'],\n ['__person1__name', '__person1__surname1', '__person1__surname2', '__person1__email', '__person1__phone', '__person1__phone', '__person1__relation', '__person1__is_studying', '__person1__education_entity', '__person1__education_year', '__person1__is_working', '__person1__career'],\n ['__person2__name', '__person2__surname1', '__person2__surname2', '__person2__email', '__person2__phone', '__person2__phone', '__person2__relation', '__person2__is_studying', '__person2__education_entity', '__person2__education_year', '__person2__is_working', '__person2__career'],\n [], [], ['image_agreement'], []];\n\n const scrollToTop = () => {\n window.scrollTo(0,0);\n }\n\n const handleNext = () => {\n formik.setFieldTouched('');\n\n let newSkipped = skipped;\n if (isStepSkipped(activeStep)) {\n newSkipped = new Set(newSkipped.values());\n newSkipped.delete(activeStep);\n }\n\n setActiveStep((prevActiveStep) => prevActiveStep + 1);\n setSkipped(newSkipped);\n\n scrollToTop();\n };\n\n const secondaryListItemTextForCourse = (course) => {\n const schedules = textSchedulesForCourse(course);\n const description = course['description'];\n if (!description && !schedules) return null;\n if (description && schedules) return description + \" · \" + schedules;\n if (!description) return schedules;\n if (!schedules) return description;\n }\n\n\n const themeCtx = React.useContext(themeContext);\n const canNotGoNext = (activeStep === steps.length - 1)\n || !fieldsToValidatePerStep[activeStep].every(f => (!formik.errors[f]))\n || (activeStep === steps.length - 3 && chosenCourses.length === 0);\n\n const courseToListItem = (course) =>\n {\n if (chosenCourses.includes(course)) {\n setChosenCourses(chosenCourses.filter(x => x.id !== course.id));\n } else {\n setChosenCourses([...chosenCourses, course]);\n }\n }}>\n \n {}}\n inputProps={{ 'aria-label': 'primary checkbox' }}\n />\n \n\n\n \n\n \n ;\n\n\n\n return (\n \n \n \n \n \n \n\n \n
\n \n \n {activeStep === steps.length ? (\n
\n \n Prematrícula completada amb èxit!
\n ¡Prematrícula completada con éxito!
\n Pre-enrolment successful!\n \n \n \n
\n ) : (\n
\n )}\n
\n\n\n\n \n\n\n\n\n );\n\n}\n\nexport default PreEnrolmentPage;","import Tooltip from \"@material-ui/core/Tooltip\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport HomeIcon from \"@material-ui/icons/Home\";\nimport React from \"react\";\nimport {useTranslation} from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nexport default function HomeButton({...props}){\n const {t} = useTranslation();\n let history = useHistory();\n\n return \n history.replace(\"/home\")}>\n \n \n ;\n}","import React, {useEffect, useRef, useState} from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Card from '@material-ui/core/Card';\nimport CardActions from '@material-ui/core/CardActions';\nimport CardContent from '@material-ui/core/CardContent';\nimport Button from '@material-ui/core/Button';\nimport Typography from '@material-ui/core/Typography';\nimport {useTranslation} from \"react-i18next\";\nimport {textSchedulesForCourse} from \"../../utils/localized-weekdays\";\nimport Box from \"@material-ui/core/Box\";\nimport {userContext} from \"../../_context/user-context\";\n\nconst useStyles = makeStyles((theme) => ({\n welcomeMessage: {\n '-webkit-touch-callout': 'none',\n '-webkit-user-select': 'none',\n '-khtml-user-select': 'none',\n '-moz-user-select': 'none',\n '-ms-user-select': 'none',\n 'user-select': 'none'\n}\n}));\n\nexport default function WelcomeTitle({course}) {\n const classes = useStyles();\n const userCtx = React.useContext(userContext);\n const {t} = useTranslation();\n\n const hi = \"😄\";\n const hiii = \"🥰\";\n const [welcomeEmoji, setWelcomeEmoji] = useState(hi);\n const switchWelcomeEmoji = () => {\n setWelcomeEmoji(welcomeEmoji == hi? hiii: hi);\n }\n return (\n \n \n {t(\"hi\")} {userCtx.teacher === undefined? '': userCtx.teacher.name} \n \n setWelcomeEmoji(hiii)} onMouseOut={() => setWelcomeEmoji(hi)}>\n {welcomeEmoji}\n \n \n );\n}","import React from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Card from '@material-ui/core/Card';\nimport CardActions from '@material-ui/core/CardActions';\nimport CardContent from '@material-ui/core/CardContent';\nimport Button from '@material-ui/core/Button';\nimport Typography from '@material-ui/core/Typography';\nimport {useTranslation} from \"react-i18next\";\nimport {textSchedulesForCourse} from \"../../utils/localized-weekdays\";\nimport { useHistory } from \"react-router-dom\";\nimport Skeleton from '@material-ui/lab/Skeleton';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n flexDirection: \"column\"\n },\n title: {\n fontSize: 14,\n },\n pos: {\n marginBottom: 12,\n },\n action: {\n float: \"bottom\"\n },\n flexGrow: {\n flexGrow: 1 \n }\n}));\n\nexport default function CourseCard(props) {\n const classes = useStyles();\n let history = useHistory();\n const { course = null} = props;\n const loading = course === null;\n const {t} = useTranslation();\n\n const courseId = course === null? null: course[\"id\"];\n const handleViewCourse = () => history.replace(`/home/courses?id=${courseId}`);\n const handleTakeAttendance = () => history.replace(`/attendance?id=${courseId}`)\n return (\n \n \n \n {loading? : t(\"course\")}\n \n\n \n {loading? : course[\"name\"]}\n \n\n \n {loading? : textSchedulesForCourse(course)}\n \n \n \n \n \n {loading? :\n }\n {loading? :\n }\n \n \n );\n}","import React from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Chip from '@material-ui/core/Chip';\nimport {useTranslation} from \"react-i18next\";\nimport MoreHorizIcon from '@material-ui/icons/MoreHoriz';\n\nconst useStyles = makeStyles((theme) => ({\n \n }));\n \n export default function MoreButton(props) {\n const classes = useStyles();\n const {t} = useTranslation();\n \n return (\n }\n {...props}\n />\n );\n }","import React, {useEffect, useRef, useState} from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Card from '@material-ui/core/Card';\nimport CardActions from '@material-ui/core/CardActions';\nimport CardContent from '@material-ui/core/CardContent';\nimport Button from '@material-ui/core/Button';\nimport Typography from '@material-ui/core/Typography';\nimport {useTranslation} from \"react-i18next\";\nimport {textSchedulesForCourse} from \"../../utils/localized-weekdays\";\nimport Box from \"@material-ui/core/Box\";\nimport {userContext} from \"../../_context/user-context\";\n\nconst useStyles = makeStyles((theme) => ({\n welcomeMessage: {\n '-webkit-touch-callout': 'none',\n '-webkit-user-select': 'none',\n '-khtml-user-select': 'none',\n '-moz-user-select': 'none',\n '-ms-user-select': 'none',\n 'user-select': 'none'\n}\n}));\n\nexport default function NotATeacherTitle({course}) {\n const classes = useStyles();\n const {t} = useTranslation();\n\n return (\n \n \n 🎓 {t(\"teachers-only-zone\")} 🎓\n \n \n );\n}","import React, {useEffect, useState} from 'react';\nimport * as yup from 'yup';\nimport XamfraHeader from '../_components/xamfra.header.component';\nimport Grid from '@material-ui/core/Grid';\nimport HomeButton from '../_components/home_button';\nimport {useTranslation} from \"react-i18next\";\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport WelcomeTitle from \"./components/WelcomeTitle\";\nimport Box from \"@material-ui/core/Box\";\nimport {themeContext} from \"../_context/theme-context\";\nimport {useSnackbar} from \"notistack\";\nimport {useErrorHandler} from \"../_helpers/handle-response\";\nimport {useNormik} from \"../_helpers/normik\";\nimport ThemeButton from \"../_components/theme_button.component\";\nimport TranslateButton from \"../_components/translate_button.component\";\nimport useTheme from \"@material-ui/core/styles/useTheme\";\nimport CourseCard from \"./components/CourseCard.js\";\nimport TeacherCoursesService from \"../_services/teachers_courses.service\";\nimport {userContext} from \"../_context/user-context\";\nimport MoreButton from \"./components/MoreButton\";\nimport NotATeacherTitle from './components/NotATeacherTitle';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n flexGrow: 1,\n \n },\n rootBase: {\n display: 'flex',\n flexDirection: 'column',\n height: \"100vh\",\n },\n more: {\n width: '100%',\n textAlign: 'center'\n }\n}));\n\nconst TeacherDashboardPage = (props) => {\n const {t} = useTranslation();\n const classes = useStyles();\n const {enqueueSnackbar} = useSnackbar();\n const theme = useTheme();\n\n\n const errorHandler = useErrorHandler();\n \n const formik = useNormik(false,{\n initialValues: {},\n validationSchema: yup.object({}),\n enableReinitialize: true,\n onSubmit: (values, {setStatus, setSubmitting}) => {\n setStatus();\n setSubmitting(false);\n }\n });\n\n const themeCtx = React.useContext(themeContext);\n\n const [courses, setCourses] = useState([]);\n const [maxPage, setMaxPage] = useState(null);\n const [loadedUntilPage, setLoadedUntilPage] = useState(0);\n const [attemptLoadedUntilPage, setAttemptLoadedUntilPage] = useState(1);\n const [attemptingLoad, setAttemptingLoad] = useState(false);\n\n const loading = attemptingLoad && loadedUntilPage == 0;\n\n const incrementPage = (i=1) => {\n if (maxPage === null) return;\n if (loadedUntilPage >= maxPage) return;\n setAttemptLoadedUntilPage(loadedUntilPage+1);\n }\n \n const userCtx = React.useContext(userContext);\n useEffect(() => {\n if (userCtx.teacher === null || userCtx.teacher === undefined) return;\n \n const page = attemptLoadedUntilPage;\n setAttemptingLoad(true);\n TeacherCoursesService.getAll(null, page, null, null, userCtx.teacher.id).then(...errorHandler({})).then(newCourses => {\n setCourses([...courses, ...newCourses[\"data\"]]);\n setMaxPage(newCourses[\"_pagination\"][\"totalPages\"]);\n setLoadedUntilPage(page);\n }).finally(() => setAttemptingLoad(false));\n }, [attemptLoadedUntilPage, userCtx.teacher]);\n\n \n return (\n \n \n \n \n \n \n\n \n {\n (userCtx.teacher === null || userCtx.teacher === undefined) && \n \n }\n\n {\n !(userCtx.teacher === null || userCtx.teacher === undefined) && \n \n \n\n \n \n {\n loading && [1,2,3,4,5,6,7,8,9, 10].map(_ => \n \n )\n }\n {courses.map(course => \n \n \n \n )}\n \n \n \n \n {loadedUntilPage < maxPage && }\n \n \n }\n \n \n );\n}\n\nexport default TeacherDashboardPage;","import Tooltip from \"@material-ui/core/Tooltip\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport Brightness4Icon from \"@material-ui/icons/Brightness4\";\nimport Box from \"@material-ui/core/Box\";\nimport React from \"react\";\nimport {themeContext} from \"../_context/theme-context\";\nimport {useTranslation} from \"react-i18next\";\nimport Typography from \"@material-ui/core/Typography\";\n\nexport default function NotFound({}){\n const themeCtx = React.useContext(themeContext);\n const {t} = useTranslation();\n\n return Nope, not found... 👻;\n}","import serviceFactory from \"./service-factory\";\n\n\nexport default new (serviceFactory('attendances'))();\n\n","import React, {useEffect, useState} from 'react';\nimport {makeStyles} from '@material-ui/core/styles';\nimport {useTranslation} from \"react-i18next\";\nimport {Checkbox, Box, ListItem, ListItemIcon, ListItemText, Tooltip} from \"@material-ui/core\";\nimport Divider from \"@material-ui/core/Divider\";\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 { styled } from \"@material-ui/core/styles\";\nimport InsertCommentIcon from '@material-ui/icons/InsertComment';\nimport {STATUS_ATTENDANCE, STATUS_ABSENT, STATUS_ABSENT_JUSTIFIED} from './status';\nimport IconButton from '@material-ui/core/IconButton';\n\nimport OutlinedInput from \"@material-ui/core/OutlinedInput\";\n\n\nconst useStyles = makeStyles((theme) => ({\n formControl: {\n [theme.breakpoints.down('sm')]: {minWidth: '50%', maxWidth: '50%'},\n [theme.breakpoints.up('sm')]: {minWidth: '25%', maxWidth: '25%'}\n },\n selectStatus: {\n '&:before': {\n borderColor: 'red',\n },\n '&:after': {\n borderColor: 'red',\n }\n },\n root: {\n width: '100%'\n }\n }));\n\nexport default function AttendanceItem({student, attendance, setAttendance, handleOpenCommentBox}) {\n \n const classes = useStyles();\n const labelId = `checkbox-list-label-${student[\"id\"]}`;\n const { t } = useTranslation();\n\n const status = attendance === null? null: attendance[\"status\"];\n const setStatus = (newStatus) => setAttendance({...attendance, status: newStatus});\n \n const handleChange = (event) => {\n setStatus(event.target.value);\n };\n const toggleStatus = () => {\n if (status === STATUS_ATTENDANCE) return setStatus(STATUS_ABSENT);\n setStatus(STATUS_ATTENDANCE);\n }\n\n const useOutlinedInputStyles = makeStyles(theme => ({\n root: {\n \"& $notchedOutline\": {\n borderColor: status === STATUS_ATTENDANCE? theme.palette.neutral.status.success: status === STATUS_ABSENT? theme.palette.neutral.status.error: theme.palette.neutral.status.dirty \n },\n },\n focused: {},\n notchedOutline: {}\n }));\n const outlinedInputClasses = useOutlinedInputStyles();\n\n return (\n \n \n \n \n \n \n \n {\n e.stopPropagation();\n handleOpenCommentBox();\n }}>\n \n \n \n \n \n \n );\n}","export const STATUS_ATTENDANCE = 0;\nexport const STATUS_ABSENT = 1;\nexport const STATUS_ABSENT_JUSTIFIED = 2;\n","import React from 'react';\nimport {useTranslation} from \"react-i18next\";\nimport TextField from '@material-ui/core/TextField';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport {Button} from \"@material-ui/core\";\n\nexport default function CommentDialog({commentBox, setCommentBoxValue, handleCloseCommentBox, commentBoxValue, handleCloseCancelCommentBox}){\n const { t } = useTranslation();\n\n return ;\n}","import React, {useEffect, useState} from 'react';\nimport {makeStyles} from '@material-ui/core/styles';\nimport {useTranslation} from \"react-i18next\";\nimport Fab from \"@material-ui/core/Fab\";\nimport {Checkbox, ListItem, ListItemIcon, Button, ListItemText, Tooltip} from \"@material-ui/core\";\nimport CourseStudentsDataService from \"../../_services/course_students.service\";\nimport {attendanceService} from \"../../_services/course_attendance.service\";\nimport AttendanceService from \"../../_services/attendance.service\";\nimport CloseIcon from '@material-ui/icons/Close';\nimport dataService from \"../../_services/courses.service\";\nimport * as yup from \"yup\";\nimport {useFormik} from \"formik\";\nimport {useErrorHandler} from \"../../_helpers/handle-response\";\nimport EmailTo from \"../../_components/emailTo.component\";\nimport Box from \"@material-ui/core/Box\";\nimport SaveIcon from '@material-ui/icons/Save';\nimport DirtyTextField from \"../../_components/dirtytextfield.component\";\nimport TextField from '@material-ui/core/TextField';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogContentText from '@material-ui/core/DialogContentText';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport List from \"@material-ui/core/List\";\nimport {STATUS_ATTENDANCE, STATUS_ABSENT, STATUS_ABSENT_JUSTIFIED} from './status';\nimport AttendanceItem from './attendance.component.item';\nimport DoneAllIcon from '@material-ui/icons/DoneAll';\nimport EventAvailableIcon from '@material-ui/icons/EventAvailable';\nimport EventBusyIcon from '@material-ui/icons/EventBusy';\nimport CommentDialog from './commentDialog';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n height: '100%',\n [theme.breakpoints.down('sm')]: {paddingBottom: '100px'}\n },\n textBox: {\n width: \"100%\",\n border: \"red\"\n },\n line: {\n width: \"100%\",\n marginTop: theme.spacing(1)\n },\n composite: {\n display: \"flex\", flexDirection: \"row\", flex: 1, flexWrap: \"wrap\",\n gap: theme.spacing(1), width: \"100%\"\n },\n chip: {\n margin: theme.spacing(0.5)\n },\n chips: {\n marginBottom: theme.spacing(1)\n },\n in: {\n marginBottom: theme.spacing(1)\n },fabs: {\n position: 'fixed',\n bottom: theme.spacing(4),\n right: theme.spacing(4),\n },fab: {\n marginLeft: theme.spacing(2),\n }\n}));\n\nfunction areArraysEqualSets(a1, a2) {\n const superSet = {};\n for (const i of a1) {\n const e = i + typeof i;\n superSet[e] = 1;\n }\n\n for (const i of a2) {\n const e = i + typeof i;\n if (!superSet[e]) {\n return false;\n }\n superSet[e] = 2;\n }\n\n for (let e in superSet) {\n if (superSet[e] === 1) {\n return false;\n }\n }\n\n return true;\n}\n\n\nexport default function Attendance({...other}) {\n const classes = useStyles();\n const { t } = useTranslation();\n\n const id = new URLSearchParams(window.location.search).get('id');\n\n const [initialAttendances, setInitialAttendances] = useState(null);\n const [attendances, setAttendances] = useState(null);\n const resetAttendances = () => setAttendances(createEmptyAttendances(students, initialAttendances, date));\n\n\n const getAddedStudentIds = () => {\n const studentsInInitial = Object.keys(initialAttendances);\n return Object.keys(attendances).filter(studentId => !studentsInInitial.includes(studentId) && \n (attendances[studentId]['status'] !== null || attendances[studentId]['comment'] !== null))\n }\n\n const hasNewAttendances = () => {\n const addedStudentIds = getAddedStudentIds();\n if (addedStudentIds.length === 0) return false;\n return true;\n }\n\n const getNewAttendances = () => {\n const addedStudentIds = getAddedStudentIds();\n if (addedStudentIds.length === 0) return null;\n\n const filtered = Object.keys(attendances)\n .filter(key => addedStudentIds.includes(key))\n .reduce((obj, key) => {\n obj[key] = attendances[key];\n return obj;\n }, {});\n return filtered;\n }\n\n const hasChanges = (initial, updated) => {\n console.log(\"iu\", initial, updated);\n if (initial['student_id'] !== updated['student_id']) throw new Error(`student id has changed from ${initial['student_id']} to ${updated['student_id']}`);\n if (initial['course_id'] !== updated['course_id']) throw new Error(`course id has changed from ${initial['course_id']} to ${updated['course_id']}`);\n if (initial['date'] !== updated['date']) return true;\n if (initial['comment'] !== updated['comment']) return true;\n if (initial['status'] !== updated['status']) return true;\n return false;\n }\n\n const hasChangesGlobal = () => {\n if (initialAttendances === null) return false;\n if (attendances === null) return false;\n if (hasNewAttendances()) return true;\n if (hasUpdatedAttendances()) return true;\n return false;\n }\n\n const [dirty, setDirty] = useState(false);\n useEffect(() => {\n setDirty(hasChangesGlobal());\n }, [initialAttendances, attendances]);\n\n const hasUpdatedAttendances = () => Object.keys(initialAttendances).some(key => \n hasChanges(initialAttendances[key], attendances[key]));\n\n const getUpdatedAttendances = () => {\n const filtered = Object.keys(initialAttendances)\n .reduce((obj, key) => {\n if (hasChanges(initialAttendances[key], attendances[key])) obj[key] = attendances[key];\n return obj;\n }, {});\n return filtered;\n }\n\n const [students, setStudents] = useState(null);\n const [courseId, setCourseId] = useState(id);\n const [allDone, setAllDone] = useState(true);\n \n\n useEffect(() => {\n if (attendances === null) return;\n const allDone = !Object.keys(attendances).some(studentId => attendances[studentId]['status'] !== STATUS_ATTENDANCE);\n setAllDone(allDone);\n }, [attendances]);\n\n const createEmptyAttendances = (students, attendances, date) => {\n if (attendances === null) return;\n if (students === null) return;\n \n const newAttendances = {...attendances};\n\n students.forEach(student => {\n const id = student['id'];\n if (attendances[id] === undefined) {\n newAttendances[id] = {\n status: null,\n comment: null,\n course_id: courseId,\n student_id: id,\n date: date\n };\n } \n });\n return newAttendances;\n }\n\n const loadAttendances = () => {\n if (courseId === null) return;\n if (formik.values[\"start\"] === '') return;\n if (students === null) return;\n \n AttendanceService \n .getAll(null, \"*\", null, {\n course_id: courseId,\n date: formik.values[\"start\"]\n }\n )\n .then(...errorHandler({}))\n .then(function (res) {\n const newAttendances = res[\"data\"].reduce((a,x) => ({...a, [x['student_id']]: x}), {});\n setInitialAttendances(newAttendances);\n setAttendances(createEmptyAttendances(students, newAttendances, date));\n });\n }\n\n useEffect(() => {\n if (courseId === null) return;\n CourseStudentsDataService\n .getAll(null, '*', [\"full_name\", \"id\"], {enrolment_status: \"enrolled\"}, courseId)\n .then(...errorHandler({}))\n .then(function (res) {\n setStudents(res[\"data\"]);\n });\n }, [courseId]);\n\n \n const errorHandler = useErrorHandler();\n const today = new Date().toISOString().split(\"T\")[0];\n\nconst formik = useFormik({\n initialValues: {start: today, course_id: id},\n validationSchema: yup.object({}),\n enableReinitialize: true,\n onSubmit: (values, {setStatus, setSubmitting}) => {\n setSubmitting(true);\n }\n });\n const date = formik.values['start'];\n\n useEffect(loadAttendances, [formik.values[\"start\"], courseId, students]);\n\n const markAll = (targetStatus) => {\n const newAttendances = {...attendances};\n Object.keys(newAttendances).map(function(studentId, index) {\n newAttendances[studentId]['status'] = targetStatus;\n });\n setAttendances(newAttendances);\n }\n\n const setAttendance = (studentId, attendance) => {\n const newAttendances = {...attendances};\n newAttendances[studentId] = attendance;\n setAttendances(newAttendances);\n }\n\n const [commentBox, setCommentBox] = useState(false);\n const handleCloseCancelCommentBox = () => {\n setCommentBox(false);\n }\n const handleCloseCommentBox = () => {\n handleCloseCancelCommentBox();\n setAttendance(commentBoxId, {...attendances[commentBoxId], comment: commentBoxValue});\n }\n const handleOpenCommentBox = (studentId) => {\n setCommentBoxValue(attendances[studentId]['comment']);\n setCommentBox(true);\n setCommentBoxId(studentId);\n }\n const [commentBoxValue, setCommentBoxValue] = useState(null);\n const [commentBoxId, setCommentBoxId] = useState(null);\n\n \n\n return (\n \n
\n \n {false &&
{setCourseId(x.id)}}\n name={\"course_id\"}\n label={t(\"courses\")}\n />}\n \n {t(\"attendance\")}
\n \n \n \n \n \n \n {students && \n \n {attendances && students && students.map((student) => setAttendance(student['id'], x)}\n handleOpenCommentBox={() => handleOpenCommentBox(student['id'])}\n attendance={attendances[student['id']] ?? null} \n />)}\n
}\n \n \n {\n markAll(allDone? STATUS_ABSENT: STATUS_ATTENDANCE);\n }} disabled={formik.isSubmitting}>\n {allDone? : }\n \n \n \n \n \n \n \n \n {\n let promises = [];\n\n const newAttendances = getNewAttendances();\n if (newAttendances !== null) {\n Object.keys(newAttendances).forEach(studentId => {\n const attendance = newAttendances[studentId];\n promises.push(AttendanceService.post(attendance))\n })\n }\n \n\n const updatedAttendances = getUpdatedAttendances();\n if (updatedAttendances !== null) {\n Object.keys(updatedAttendances).forEach(studentId => {\n const attendance = updatedAttendances[studentId];\n const initialAttendance = initialAttendances[studentId];\n promises.push(AttendanceService\n .patch({\n id:initialAttendance['id'], \n body:attendance, \n initial_values:initialAttendance\n }));\n })\n }\n\n Promise.all(promises)\n .then(...errorHandler({}))\n .then(function (res) {\n loadAttendances();\n })\n }} disabled={formik.isSubmitting || !dirty}>\n \n \n \n
\n\n \n );\n}\n","import React, {useEffect, useState} from 'react';\nimport XamfraHeader from '../_components/xamfra.header.component';\nimport HomeButton from '../_components/home_button';\nimport {makeStyles} from \"@material-ui/core/styles\";\nimport Box from \"@material-ui/core/Box\";\nimport ThemeButton from \"../_components/theme_button.component\";\nimport TranslateButton from \"../_components/translate_button.component\";\nimport Attendance from \"./components/attendance.component\";\nimport TeacherDashboardButton from '../_components/teacher_dashboard_button';\n\nconst useStyles = makeStyles((theme) => ({\n list: {\n flexGrow: 4\n },\n listCard: {\n height: '100%'\n },\n header: {\n },\n rootBase: {\n display: 'flex',\n flexDirection: 'column',\n height: \"100vh\",\n minHeight: 0,\n alignItems: 'stretch'\n },\n more: {\n width: '100%',\n textAlign: 'center'\n }\n}));\n\nconst AttendancePage = (props) => {\n const classes = useStyles();\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default AttendancePage;","import React, {useState} from 'react';\nimport CssBaseline from '@material-ui/core/CssBaseline';\nimport {createMuiTheme} from '@material-ui/core/styles';\nimport {ThemeProvider} from '@material-ui/styles';\nimport {darkTheme, lightTheme} from '../theme';\nimport {SnackbarProvider} from 'notistack';\nimport {confirmContext} from '../_context/confirm-context';\nimport PrivateRoute from '../_components/PrivateRoute';\nimport HomePage from '../HomePage/HomePage';\nimport LoginPage from '../LoginPage/LoginPage';\nimport {BrowserRouter, Route, Router, Switch} from 'react-router-dom';\nimport {userContext} from '../_context/user-context';\nimport {themeContext} from '../_context/theme-context';\nimport SignupPage from \"../SignupPage/SignupPage\";\nimport ResetPage from \"../ResetPage/ResetPage\";\nimport PreEnrolmentPage from \"../PreEnrolmentPage/PreEnrolmentPage\";\nimport TeacherDashboardPage from \"../TeacherDashboardPage/TeacherDashboardPage\";\nimport NotFound from \"../_components/not_found\";\nimport AttendancePage from '../AttendancePage/AttendancePage';\nimport {useTranslation} from \"react-i18next\";\nimport {\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle\n} from \"@material-ui/core\";\nimport Button from \"@material-ui/core/Button\";\nimport DialogContentText from \"@material-ui/core/DialogContentText\";\n\nfunction App() {\n const [theme, setTheme] = useState(localStorage.getItem(\"darkTheme\") === \"true\");\n const appliedTheme = createMuiTheme(theme ? darkTheme : lightTheme);\n\n\n const [user, setUser] = useState({logged: false, ping: true});\n const [needs, _setNeeds] = useState([]);\n const setNeeds = (needs) => {\n if (!Array.isArray(needs)) return _setNeeds([]);\n return _setNeeds(needs);\n }\n const [teacher, setTeacher] = useState(null);\n const routerRef = React.createRef();\n\n const [confirmDialog, setConfirmDialog] = React.useState({\n open: false,\n title: null,\n subtitle: null,\n success: () => {},\n cancel: () => {},\n args: []\n });\n const confirm = (title, subtitle, successCallable, cancelCallable=null, args=[]) => {\n setConfirmDialog(\n {\n open: true,\n title: title,\n subtitle: subtitle,\n success: successCallable,\n cancel: cancelCallable === null? () => {}: cancelCallable,\n args: args\n }\n );\n }\n const handleCloseConfirm = () => {\n setConfirmDialog({...confirmDialog, open: false});\n }\n const { t } = useTranslation();\n\n\n return (\n \n \n \n \n {\n localStorage.setItem(\"darkTheme\", (!theme).toString());\n setTheme(!theme);\n }, label: theme? \"dark\": \"light\"}}>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default App\n","const reportWebVitals = onPerfEntry => {\n if (onPerfEntry && onPerfEntry instanceof Function) {\n import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\n getCLS(onPerfEntry);\n getFID(onPerfEntry);\n getFCP(onPerfEntry);\n getLCP(onPerfEntry);\n getTTFB(onPerfEntry);\n });\n }\n};\n\nexport default reportWebVitals;\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport App from './App/App';\nimport reportWebVitals from './reportWebVitals';\nimport {Helmet} from 'react-helmet';\nimport \"./i18nextConf\";\n\nReactDOM.render(\n \n \n centrífuga4\n \n \n \n \n \n \n ,\n document.getElementById('root')\n);\n\n// If you want to start measuring performance in your app, pass a function\n// to log results (for example: reportWebVitals(console.log))\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\nreportWebVitals();\n"],"sourceRoot":""}
\ No newline at end of file
diff --git a/web_app/build/static/js/runtime-main.c99b2fa0.js b/web_app/build/static/js/runtime-main.c99b2fa0.js
new file mode 100644
index 0000000..081de7d
--- /dev/null
+++ b/web_app/build/static/js/runtime-main.c99b2fa0.js
@@ -0,0 +1,2 @@
+!function(e){function t(t){for(var n,a,i=t[0],c=t[1],f=t[2],s=0,p=[];s