\r\n sessionStorage.getItem(\"user\") ? (\r\n \r\n ) : (\r\n \r\n )\r\n }\r\n />\r\n );\r\n};\r\n\r\nexport default PrivateRoute;\r\n","import alertConstants from \"../constants/alertConstants\";\r\n\r\nconst notice = (message, altType) => {\r\n return { type: alertConstants.NOTICE, message, altType: altType };\r\n};\r\n\r\nfunction success(message, altType) {\r\n //console.log(message, altType);\r\n return { type: alertConstants.SUCCESS, message, altType: altType };\r\n}\r\n\r\nfunction error(message, altType) {\r\n return { type: alertConstants.ERROR, message, altType: altType };\r\n}\r\n\r\nfunction clear() {\r\n return { type: alertConstants.CLEAR };\r\n}\r\n\r\nconst alertActions = {\r\n success,\r\n error,\r\n clear,\r\n notice,\r\n};\r\n\r\nexport default alertActions;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { Alert } from \"reactstrap\";\r\nimport alertActions from \"../actions/alertActions\";\r\nimport alertConstants from \"../constants/alertConstants\";\r\n\r\nconst Alerts = (props) => {\r\n const dispatch = useDispatch();\r\n const [visible, setVisible] = useState(true);\r\n const alert = useSelector((state) => state.alert);\r\n\r\n useEffect(() => {\r\n if (Object.keys(alert).length !== 0) {\r\n setVisible(true);\r\n window.setTimeout(() => {\r\n setVisible(false);\r\n dispatch(alertActions.clear());\r\n }, 5000);\r\n }\r\n }, [alert]);\r\n\r\n const toggle = () => {\r\n setVisible(false);\r\n };\r\n\r\n return (\r\n \r\n {props.alert.type === alertConstants.SUCCESS && (\r\n
{\r\n toggle();\r\n }}\r\n >\r\n {props.alert.type} - {props.alert.message}\r\n \r\n )}\r\n {props.alert.type === alertConstants.ERROR && (\r\n
{\r\n toggle();\r\n }}\r\n >\r\n {props.alert.type} - {props.alert.message}\r\n \r\n )}\r\n {props.alert.type === alertConstants.NOTICE && (\r\n
{\r\n toggle();\r\n }}\r\n >\r\n {props.alert.type} - {props.alert.message}\r\n \r\n )}\r\n
\r\n );\r\n};\r\n\r\nexport default Alerts;\r\n","import React from \"react\";\r\nimport { Row, Col } from \"reactstrap\";\r\n\r\nconst SealAndTitle = (props) => {\r\n return (\r\n \r\n \r\n \r\n \r\n United States District Court District of Arizona\r\n \r\n \r\n Federal Court Advice-Only Clinic\r\n \r\n \r\n
\r\n );\r\n};\r\nexport default SealAndTitle;\r\n","const authHeader = () => {\r\n // return authorization header with jwt token\r\n let user = JSON.parse(sessionStorage.getItem(\"user\"));\r\n\r\n if (user && user.token) {\r\n return { Authorization: \"Bearer \" + user.token };\r\n } else {\r\n return {};\r\n }\r\n};\r\n\r\nexport default authHeader;\r\n","//import config from \"config\";\r\nimport authHeader from \"../helpers/authHeader\";\r\nimport history from \"../helpers/history\";\r\nimport alertActions from \"../actions/alertActions\";\r\n\r\nconst login = (username, password) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: { \"Content-Type\": \"application/json\" },\r\n body: JSON.stringify({ username, password }),\r\n };\r\n //console.log(\"login request\");\r\n return fetch(\r\n `${process.env.REACT_APP_API_URL}/AuthenticateLitigant/Login`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((user) => {\r\n // store user details and jwt token in local storage to keep user logged in between page refreshes\r\n sessionStorage.setItem(\"user\", JSON.stringify(user));\r\n alertActions.success(\"Successfully logged in.\")\r\n return user;\r\n });\r\n};\r\n\r\nconst updateLogin = async (userValues) => {\r\n const user = {\r\n ...JSON.parse(sessionStorage.getItem(\"user\")),\r\n firstName: userValues.firstName,\r\n lastName: userValues.lastName,\r\n userName: userValues.userName,\r\n dob: userValues.dob,\r\n };\r\n //console.log(user);\r\n sessionStorage.setItem(\"user\", JSON.stringify(user));\r\n return user;\r\n};\r\n\r\nconst register = (\r\n dob,\r\n firstName,\r\n lastName,\r\n email,\r\n password,\r\n confirmPassword,\r\n phoneNumber\r\n) => {\r\n //console.log(dob, firstName, lastName, email, password, confirmPassword);\r\n return fetch(\r\n `${process.env.REACT_APP_API_URL}/AuthenticateLitigant/Register`,\r\n {\r\n credentials: \"include\",\r\n method: \"POST\",\r\n headers: { \"Content-Type\": \"application/json\" },\r\n body: JSON.stringify({\r\n dob,\r\n firstName,\r\n lastName,\r\n email,\r\n password,\r\n confirmPassword,\r\n phoneNumber,\r\n }),\r\n }\r\n )\r\n .then(handleResponse)\r\n .then((user) => {\r\n // store user details and jwt token in local storage to keep user logged in between page refreshes\r\n sessionStorage.setItem(\"user\", JSON.stringify(user));\r\n\r\n return user;\r\n });\r\n};\r\n\r\nconst resetPasswordRequest = (resetRequest) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: { \"Content-Type\": \"application/json\" },\r\n body: JSON.stringify(resetRequest),\r\n };\r\n //console.log(\"login request\");\r\n return fetch(\r\n `${process.env.REACT_APP_API_URL}/AuthenticateLitigant/RequestResetPassword`,\r\n requestOptions\r\n );\r\n};\r\n\r\nconst resetPassword = (newPassword) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: { \"Content-Type\": \"application/json\" },\r\n body: JSON.stringify(newPassword),\r\n };\r\n //console.log(\"login request\");\r\n return fetch(\r\n `${process.env.REACT_APP_API_URL}/AuthenticateLitigant/ResetPassword`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then(() => {\r\n return;\r\n });\r\n};\r\n\r\nconst logoutServer = async () => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: authHeader(),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/AuthenticateLitigant/Logout`,\r\n requestOptions\r\n );\r\n};\r\n\r\nconst logout = () => {\r\n // remove user from local storage to log user out\r\n if (sessionStorage.getItem(\"user\")) {\r\n logoutServer().then(() => {\r\n sessionStorage.clear();\r\n history.go(0);\r\n });\r\n }\r\n};\r\n\r\nconst verifyStaff = async () => {\r\n const requestOptions = {\r\n method: \"GET\",\r\n headers: authHeader(),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/AuthenticateLitigant/VerifyStaff`,\r\n requestOptions\r\n );\r\n};\r\n\r\nconst verifyAttorney = async () => {\r\n const requestOptions = {\r\n method: \"GET\",\r\n headers: authHeader(),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/AuthenticateLitigant/VerifyAttorney`,\r\n requestOptions\r\n );\r\n};\r\n\r\nconst confirmEmail = (emailConfirmation) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: { \"Content-Type\": \"application/json\" },\r\n body: JSON.stringify(emailConfirmation),\r\n };\r\n //console.log(\"login request\");\r\n return fetch(\r\n `${process.env.REACT_APP_API_URL}/AuthenticateLitigant/ConfirmEmail`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then(() => {\r\n setInterval(() => {\r\n history.push(\"/\");\r\n }, 5000);\r\n });\r\n};\r\n\r\nconst handleResponse = (response) => {\r\n //console.log(response);\r\n return response.text().then((text) => {\r\n const data = text && JSON.parse(text);\r\n if (!response.ok) {\r\n if (response.status === 401) {\r\n // auto logout if 401 response returned from api\r\n logout();\r\n }\r\n if (response.status === 400) {\r\n }\r\n //console.log(data);\r\n const error =\r\n response.status === 400\r\n ? data.map((a) => a.description)\r\n : (data && data.message) || response.statusText;\r\n return Promise.reject(error);\r\n }\r\n\r\n return data;\r\n });\r\n};\r\n\r\nconst refreshToken = () => {\r\n let user = JSON.parse(sessionStorage.getItem(\"user\"));\r\n if(user !== null) {\r\n const tokenModel = { accessToken: user.token, refreshToken: user.refreshToken}\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify(tokenModel),\r\n };\r\n //console.log(\"login request\");\r\n return fetch(\r\n `${process.env.REACT_APP_API_URL}/AuthenticateLitigant/refreshToken`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((user) => {\r\n // store user details and jwt token in local storage to keep user logged in between page refreshes\r\n sessionStorage.setItem(\"user\", JSON.stringify(user));\r\n alertActions.success(\"Successfully refreshed token.\" + user)\r\n return;\r\n });\r\n }\r\n};\r\n\r\nconst userService = {\r\n login,\r\n logout,\r\n register,\r\n updateLogin,\r\n verifyStaff,\r\n verifyAttorney,\r\n resetPassword,\r\n resetPasswordRequest,\r\n confirmEmail,\r\n refreshToken\r\n};\r\n\r\nexport default userService;\r\n","import userConstants from \"../constants/userConstants\";\r\nimport userService from \"../services/userService\";\r\nimport alertActions from \"./alertActions\";\r\nimport history from \"../helpers/history\";\r\n\r\nconst login = (username, password) => {\r\n const request = (user) => {\r\n return { type: userConstants.LOGIN_REQUEST, user };\r\n };\r\n const success = (user) => {\r\n return { type: userConstants.LOGIN_SUCCESS, user };\r\n };\r\n const failure = (error) => {\r\n return { type: userConstants.LOGIN_FAILURE, error };\r\n };\r\n\r\n return (dispatch) => {\r\n dispatch(request({ username }));\r\n\r\n userService.login(username, password).then(\r\n (user) => {\r\n dispatch(success(user));\r\n dispatch(alertActions.success(\"Successfully logged in.\"));\r\n userService.verifyStaff().then((response) => {\r\n //console.log(response);\r\n if (response.status === 200) {\r\n history.push(\"/staff\");\r\n return;\r\n }\r\n userService.verifyAttorney().then((attResponse) => {\r\n if (attResponse.status === 200) {\r\n history.push(\"/attorney\");\r\n return;\r\n } else {\r\n history.push(\"/user\");\r\n return;\r\n }\r\n });\r\n });\r\n },\r\n (error) => {\r\n dispatch(failure(error));\r\n dispatch(alertActions.error(\"There was an error logging you in. Make sure your username and password are correct.\"));\r\n }\r\n );\r\n };\r\n};\r\n\r\nconst register = (\r\n dob,\r\n firstName,\r\n lastName,\r\n email,\r\n password,\r\n confirmPassword,\r\n phoneNumber\r\n) => {\r\n const request = (registerApplicationUser) => {\r\n return {\r\n type: userConstants.REGISTER_REQUEST,\r\n registerApplicationUser,\r\n };\r\n };\r\n const success = (user) => {\r\n return { type: userConstants.REGISTER_SUCCESS, user };\r\n };\r\n const failure = (error) => {\r\n return { type: userConstants.REGISTER_FAILURE, error };\r\n };\r\n\r\n return (dispatch) => {\r\n dispatch(request(email));\r\n\r\n userService\r\n .register(\r\n dob,\r\n firstName,\r\n lastName,\r\n email,\r\n password,\r\n confirmPassword,\r\n phoneNumber\r\n )\r\n .then(\r\n (user) => {\r\n dispatch(success(user));\r\n history.push(\"/user\");\r\n },\r\n (error) => {\r\n dispatch(failure(error));\r\n dispatch(alertActions.error(error));\r\n }\r\n );\r\n };\r\n};\r\n\r\nconst logout = () => {\r\n userService.logout();\r\n return { type: userConstants.LOGOUT };\r\n};\r\n\r\nconst updateLogin = (user) => {\r\n const request = (user) => {\r\n return { type: userConstants.UPDATE_LOGIN_REQUEST, user };\r\n };\r\n const success = (user) => {\r\n return { type: userConstants.UPDATE_LOGIN_SUCCESS, user };\r\n };\r\n const failure = (error) => {\r\n return { type: userConstants.UPDATE_LOGIN_FAILURE, error };\r\n };\r\n\r\n return (dispatch) => {\r\n dispatch(request(user));\r\n\r\n userService.updateLogin(user).then(\r\n (user) => {\r\n dispatch(success(user));\r\n },\r\n (error) => {\r\n dispatch(failure(error));\r\n dispatch(alertActions.error(error));\r\n }\r\n );\r\n };\r\n};\r\n\r\nconst passwordReset = (newPassword) => {\r\n const request = (newPassword) => {\r\n return { type: userConstants.PASSWORD_RESET_REQUEST, newPassword };\r\n };\r\n const success = () => {\r\n return { type: userConstants.PASSWORD_RESET_SUCCESS };\r\n };\r\n const failure = (error) => {\r\n return { type: userConstants.PASSWORD_RESET_FAILURE, error };\r\n };\r\n\r\n return (dispatch) => {\r\n dispatch(request({ newPassword }));\r\n\r\n userService.resetPassword(newPassword).then(\r\n () => {\r\n dispatch(success());\r\n dispatch(login(newPassword.email, newPassword.password));\r\n },\r\n (error) => {\r\n dispatch(failure(error));\r\n dispatch(alertActions.error(error));\r\n }\r\n );\r\n };\r\n};\r\n\r\nconst confirmEmail = (token) => {\r\n const request = () => {\r\n return { type: userConstants.CONFIRM_EMAIL_REQUEST };\r\n };\r\n const success = () => {\r\n return { type: userConstants.CONFIRM_EMAIL_SUCCESS };\r\n };\r\n const failure = (error) => {\r\n return { type: userConstants.CONFIRM_EMAIL_FAILURE, error };\r\n };\r\n\r\n return (dispatch) => {\r\n dispatch(request());\r\n\r\n userService.confirmEmail(token).then(\r\n () => {\r\n dispatch(success());\r\n },\r\n (error) => {\r\n dispatch(failure(error));\r\n dispatch(alertActions.error(error));\r\n }\r\n );\r\n };\r\n};\r\n\r\nconst userActions = {\r\n login,\r\n logout,\r\n register,\r\n updateLogin,\r\n passwordReset,\r\n confirmEmail,\r\n};\r\n\r\nexport default userActions;\r\n","import authHeader from \"../helpers/authHeader\";\r\nimport userActions from \"../actions/userActions\";\r\n\r\nconst getLitigantMenuOptions = (id) => {\r\n const requestOptions = {\r\n method: \"GET\",\r\n headers: authHeader(),\r\n };\r\n //console.log(\"login request\");\r\n return fetch(\r\n `${process.env.REACT_APP_API_URL}/LitigantMenuOptions`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((litigantMenu) => {\r\n // store user details and jwt token in local storage to keep user logged in between page refreshes\r\n //console.log(litigantMenu);\r\n sessionStorage.setItem(\"litigantMenu\", JSON.stringify(litigantMenu));\r\n\r\n return litigantMenu;\r\n });\r\n};\r\n\r\nconst handleResponse = (response) => {\r\n //console.log(response);\r\n return response.text().then((text) => {\r\n const data = text && JSON.parse(text);\r\n if (!response.ok) {\r\n if (response.status === 401) {\r\n // auto logout if 401 response returned from api\r\n userActions.logout();\r\n window.Location.reload(true);\r\n }\r\n\r\n const error = (data && data.message) || response.statusText;\r\n return Promise.reject(error);\r\n }\r\n\r\n return data;\r\n });\r\n};\r\n\r\nconst litigantMenuService = {\r\n getLitigantMenuOptions,\r\n};\r\n\r\nexport default litigantMenuService;\r\n","import litigantMenuConstants from \"../constants/litigantMenuConstants\";\r\nimport litigantMenuService from \"../services/litigantMenuService\";\r\nimport alertActions from \"./alertActions\";\r\n\r\nconst getLitigantMenuOptions = id => {\r\n //console.log(\"Action triggered\");\r\n const request = token => {\r\n //console.log(\"Request triggered\");\r\n return { type: litigantMenuConstants.REQUEST_MENU_OPTIONS, id };\r\n };\r\n const success = payload => {\r\n //console.log(\"Success triggered\");\r\n //console.log(payload);\r\n return {\r\n type: litigantMenuConstants.REQUEST_MENU_OPTIONS_SUCCESS,\r\n payload\r\n };\r\n };\r\n const failure = error => {\r\n //console.log(\"Failure triggered\");\r\n return { type: litigantMenuConstants.REQUEST_MENU_OPTIONS_FAILURE, error };\r\n };\r\n\r\n return dispatch => {\r\n dispatch(request(id));\r\n\r\n litigantMenuService.getLitigantMenuOptions(id).then(\r\n litigantMenu => {\r\n dispatch(success(litigantMenu));\r\n //history.push(\"/user\");\r\n },\r\n error => {\r\n dispatch(failure(error));\r\n dispatch(alertActions.error(error));\r\n }\r\n );\r\n };\r\n};\r\n\r\nconst litigantMenuActions = {\r\n getLitigantMenuOptions\r\n};\r\n\r\nexport default litigantMenuActions;\r\n","import authHeader from \"../helpers/authHeader\";\r\nimport history from \"../helpers/history\";\r\nimport userService from \"./userService\";\r\n\r\nconst getAppointmentsByMonth = async (date) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify(date),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/Appointment/GetAppointmentsByMonth`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((dates) => {\r\n return dates;\r\n });\r\n};\r\n\r\nconst getLitigant = async (id) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify(id),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/ApplicationUser/GetUserWithId`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((user) => {\r\n return user;\r\n });\r\n};\r\n\r\nconst getAttorney = async (id) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify(id),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/ApplicationUser/GetAttorneyWithId`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((user) => {\r\n return user;\r\n });\r\n};\r\n\r\nconst getLitigantByEmail = async (id) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify(id),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/ApplicationUser/GetUserWithEmail`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((user) => {\r\n return user;\r\n });\r\n};\r\n\r\nconst getAppointmentsByMonthAtt = async (date) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify(date),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/Appointment/GetAppointmentsByMonthAtt`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((dates) => {\r\n return dates;\r\n });\r\n};\r\n\r\nconst getAppointmentsForRequest = async (date) => {\r\n const requestOptions = {\r\n method: \"GET\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/Appointment/GetAppointmentsForRequest`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((dates) => {\r\n return dates;\r\n });\r\n};\r\n\r\nconst setAppointmentLitigant = async (apptId) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify(apptId),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/Appointment/SetAppointmentLitigant`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then(() => {\r\n return;\r\n });\r\n};\r\n\r\nconst sendAttorneyQuestionnaire = async (apptId) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify(apptId),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/Appointment/SendAttorneyQuestionnaire`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then(() => {\r\n return;\r\n });\r\n};\r\n\r\nconst sendLitigantReminder = async (apptId) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify(apptId),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/Appointment/SendLitigantReminder`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then(() => {\r\n return;\r\n });\r\n};\r\n\r\nconst userRescheduleAppointment = async (apptId) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify(apptId),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/Appointment/UserRescheduleAppointment`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then(() => {\r\n history.push(\"/user\");\r\n return;\r\n });\r\n};\r\n\r\nconst cancelAppointmentUser = async (apptId) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify(apptId),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/Appointment/CancelAppointmentUser`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then(() => {\r\n history.push(\"/user\");\r\n return;\r\n });\r\n};\r\n\r\nconst setAppointmentAttorney = async (apptId) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify(apptId),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/Appointment/SetAppointmentAttorney`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then(() => {\r\n return;\r\n });\r\n};\r\n\r\nconst deleteAppointment = async (apptId) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify(apptId),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/Appointment/DeleteAppointment`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then(() => {\r\n return;\r\n });\r\n};\r\n\r\nconst reAddAppointment = async (apptId) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify(apptId),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/Appointment/ReAddAppointment`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then(() => {\r\n return;\r\n });\r\n};\r\n\r\nconst createAppointments = async (date) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify(date),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/Appointment/CreateAppointments`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((dates) => {\r\n return dates;\r\n });\r\n};\r\n\r\nconst createCustomAppointments = async (dates) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify(dates),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/Appointment/CreateCustomAppointments`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((payload) => {\r\n return payload;\r\n });\r\n};\r\n\r\nconst getAttorneyAppointments = async () => {\r\n const requestOptions = {\r\n method: \"GET\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/Appointment/GetAttorneyAppointments`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((dates) => {\r\n return dates;\r\n });\r\n};\r\n\r\nconst attorneyCancelAppointment = async (appt) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify(appt),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/Appointment/CancelAppointmentAttorney`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((dates) => {\r\n return dates;\r\n });\r\n};\r\n\r\nconst attorneyCompleteAppointment = async (appt) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify(appt),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/Appointment/CompleteAppointmentAttorney`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((dates) => {\r\n return dates;\r\n });\r\n};\r\n\r\nconst userRequestAppointment = async () => {\r\n const requestOptions = {\r\n method: \"GET\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/Appointment/UserRequestAppointment`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((dates) => {\r\n return dates;\r\n });\r\n};\r\n\r\nconst attorneyAssignToMe = async (appt) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify(appt),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/Appointment/AttorneyAssignToMe`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((dates) => {\r\n return dates;\r\n });\r\n};\r\n\r\nconst handleResponse = (response) => {\r\n //console.log(response);\r\n return response.text().then((text) => {\r\n const data = text && JSON.parse(text);\r\n if (!response.ok) {\r\n console.log(response);\r\n if (response.status === 401) {\r\n // auto logout if 401 response returned from api\r\n userService.logout();\r\n }\r\n\r\n const error = (data && data.message) || response.statusText;\r\n return Promise.reject(error);\r\n }\r\n\r\n return data;\r\n });\r\n};\r\n\r\nconst appointmentService = {\r\n getAppointmentsByMonth,\r\n getAppointmentsByMonthAtt,\r\n setAppointmentAttorney,\r\n setAppointmentLitigant,\r\n deleteAppointment,\r\n createAppointments,\r\n reAddAppointment,\r\n getAttorneyAppointments,\r\n attorneyCancelAppointment,\r\n attorneyCompleteAppointment,\r\n getLitigant,\r\n attorneyAssignToMe,\r\n userRequestAppointment,\r\n getLitigantByEmail,\r\n getAppointmentsForRequest,\r\n getAttorney,\r\n userRescheduleAppointment,\r\n cancelAppointmentUser,\r\n createCustomAppointments,\r\n sendAttorneyQuestionnaire,\r\n sendLitigantReminder,\r\n};\r\n\r\nexport default appointmentService;\r\n","import React, { useState } from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter } from \"reactstrap\";\r\n\r\nimport appointmentService from \"../../services/appointmentService\";\r\nimport litigantMenuActions from \"../../actions/litigantMenuActions\";\r\nimport alertActions from \"../../actions/alertActions\";\r\n\r\nconst CancelAppointmentModal = () => {\r\n const menuOptions = useSelector(\r\n (state) => state.litigantMenu.litigantMenuOptions\r\n );\r\n const dispatch = useDispatch();\r\n const [modal, setModal] = useState(false);\r\n const toggle = () => setModal(!modal);\r\n\r\n const cancelAppointment = () => {\r\n appointmentService\r\n .cancelAppointmentUser({\r\n userId: \"0\",\r\n appointmentId: menuOptions.appointmentId,\r\n })\r\n .then(() => {\r\n dispatch(alertActions.success(\"Successfully cancelled appointment.\"));\r\n dispatch(litigantMenuActions.getLitigantMenuOptions());\r\n\r\n toggle();\r\n });\r\n };\r\n\r\n const rescheduleAppointment = () => {\r\n appointmentService\r\n .userRescheduleAppointment({\r\n userId: \"0\",\r\n appointmentId: menuOptions.appointmentId,\r\n })\r\n .then(() => {\r\n dispatch(\r\n alertActions.success(\r\n \"Successfully cancelled appointment. Request for a reschedule sent to staff.\"\r\n )\r\n );\r\n dispatch(litigantMenuActions.getLitigantMenuOptions());\r\n\r\n toggle();\r\n });\r\n };\r\n return (\r\n \r\n
\r\n Reschedule/Cancel appointment\r\n \r\n
\r\n \r\n Reschedule/Cancel appointment!\r\n \r\n \r\n \r\n Clicking cancel below will cancel your appointment. Clicking{\" \"}\r\n reschedule will cancel your appointment and notify staff that\r\n you would like to reschedule.\r\n
\r\n \r\n \r\n \r\n Cancel Appointment!\r\n {\" \"}\r\n \r\n Reschedule Appointment!\r\n {\" \"}\r\n \r\n Close\r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default CancelAppointmentModal;\r\n","import React, { useState } from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter } from \"reactstrap\";\r\n\r\nimport appointmentService from \"../../services/appointmentService\";\r\nimport litigantMenuActions from \"../../actions/litigantMenuActions\";\r\nimport alertActions from \"../../actions/alertActions\";\r\n\r\nconst RequestAppointmentModal = () => {\r\n const [modal, setModal] = useState(false);\r\n const toggle = () => setModal(!modal);\r\n const dispatch = useDispatch();\r\n\r\n const requestAppointment = () => {\r\n appointmentService.userRequestAppointment().then(() => {\r\n dispatch(alertActions.success(\"Request for appointment submitted.\"));\r\n dispatch(litigantMenuActions.getLitigantMenuOptions());\r\n toggle();\r\n });\r\n };\r\n return (\r\n \r\n \r\n Request an appointment\r\n \r\n \r\n Request appointment! \r\n \r\n Make sure you are satisfied with the responses in your questionnaire\r\n before confirming.\r\n \r\n \r\n \r\n Request Appointment!\r\n {\" \"}\r\n \r\n Close\r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default RequestAppointmentModal;\r\n","import React, { useEffect } from \"react\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { Row, Col } from \"reactstrap\";\r\nimport moment from \"moment\";\r\n\r\nimport litigantMenuActions from \"../../actions/litigantMenuActions\";\r\nimport CancelAppointmentModal from \"./CancelAppointmentModal\";\r\nimport RequestAppointmentModal from \"./RequestAppointmentModal\";\r\n\r\nconst LitigantMenu = () => {\r\n const menuOptions = useSelector(\r\n (state) => state.litigantMenu.litigantMenuOptions\r\n );\r\n const dispatch = useDispatch();\r\n useEffect(() => {\r\n //console.log(\"dispatch on load\");\r\n //console.log(user.id, user.token);\r\n dispatch(litigantMenuActions.getLitigantMenuOptions());\r\n }, [dispatch]);\r\n return (\r\n \r\n \r\n LITIGANT RESOURCES \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Home \r\n \r\n Home \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Personal Info \r\n \r\n Update personal info \r\n \r\n \r\n \r\n Update password \r\n \r\n \r\n \r\n \r\n \r\n \r\n Questionnaires \r\n {menuOptions && !menuOptions.hasCurrentQuestionnaire && (\r\n \r\n \r\n New questionnaire \r\n \r\n \r\n \r\n )}\r\n {menuOptions && menuOptions.hasCurrentQuestionnaire && (\r\n \r\n {!menuOptions.hasAppointment && (\r\n \r\n Edit questionnaire \r\n \r\n )}\r\n {menuOptions.hasAppointment && (\r\n \r\n View questionnaire \r\n \r\n )}\r\n \r\n \r\n )}\r\n {menuOptions && menuOptions.HasPreviousQuestionnaires && (\r\n \r\n \r\n View previous questionnaires \r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n Appointments \r\n {menuOptions && menuOptions.hasAppointment && (\r\n \r\n \r\n Scheduled for{\" \"}\r\n {moment(menuOptions.appointmentDate).format(\r\n \"MMMM Do YYYY, h:mm a\"\r\n )}\r\n \r\n \r\n \r\n \r\n )}\r\n {menuOptions &&\r\n !menuOptions.hasAppointment &&\r\n menuOptions.hasCurrentQuestionnaire && (\r\n \r\n {menuOptions.hasSubmittedRequestInAWeek && (\r\n \r\n Your request for an appointment is being processed.\r\n \r\n )}{\" \"}\r\n {menuOptions &&\r\n !menuOptions.hasAppointment &&\r\n !menuOptions.hasSubmittedRequestInAWeek && (\r\n \r\n )}\r\n \r\n \r\n )}\r\n {menuOptions &&\r\n !menuOptions.hasAppointment &&\r\n !menuOptions.hasCurrentQuestionnaire && (\r\n \r\n \r\n Start by filling out a questionnaire \r\n \r\n \r\n \r\n )}\r\n {menuOptions && menuOptions.metYearlyLimitOfThree && (\r\n \r\n Appointment limit met for the year \r\n \r\n \r\n )}\r\n {menuOptions && menuOptions.HasPreviousAppointments && (\r\n \r\n View previous appointments \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n \r\n Sign Out \r\n \r\n Sign out \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default LitigantMenu;\r\n","import React from \"react\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { Row, Col, Button } from \"reactstrap\";\r\nimport moment from \"moment\";\r\n\r\nimport RequestAppointmentModal from \"./RequestAppointmentModal\";\r\n\r\nconst Welcome = () => {\r\n const user = useSelector((state) => state.authentication.user);\r\n const menuOptions = useSelector(\r\n (state) => state.litigantMenu.litigantMenuOptions\r\n );\r\n return (\r\n \r\n \r\n Hi {user ? user.firstName : \" \"}! \r\n {menuOptions && menuOptions.hasAppointment && (\r\n \r\n You are currently scheduled for an appointment on\r\n \r\n \r\n {moment(menuOptions.appointmentDate).format(\r\n \"MMMM Do YYYY, h:mm a\"\r\n )}\r\n .\r\n \r\n \r\n
\r\n )}\r\n {menuOptions && !menuOptions.hasCurrentQuestionnaire && (\r\n \r\n Please fill out a{\" \"}\r\n \r\n New questionnaire \r\n {\" \"}\r\n questionnaire in order to begin.\r\n
\r\n )}\r\n {menuOptions &&\r\n menuOptions.hasCurrentQuestionnaire &&\r\n menuOptions.hasSubmittedRequestInAWeek && (\r\n \r\n
\r\n You've requested an appointment. Please be patient, someone will\r\n contact you soon.\r\n
\r\n
\r\n )}\r\n {menuOptions &&\r\n menuOptions.hasCurrentQuestionnaire &&\r\n !menuOptions.hasAppointment && (\r\n \r\n
Now that you have a questionnaire filled out you can
\r\n
\r\n {menuOptions && menuOptions.hasCurrentQuestionnaire && (\r\n \r\n \r\n Edit current questionnaire \r\n \r\n \r\n )}\r\n {menuOptions &&\r\n !menuOptions.hasAppointment &&\r\n !menuOptions.hasSubmittedRequestInAWeek && (\r\n \r\n \r\n \r\n )}\r\n
\r\n
\r\n )}\r\n {menuOptions && menuOptions.metYearlyLimitOfThree && (\r\n \r\n In order for the court to provide the Pro Se Clinic for everyone we\r\n limit the appointments to 3 a year. You have met your limit of 3\r\n appointments for the year. View your{\" \"}\r\n \r\n previous appointments \r\n \r\n
\r\n )}\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default Welcome;\r\n","import authHeader from \"../helpers/authHeader\";\r\n\r\nconst getNewQuestionnaire = async () => {\r\n const requestOptions = {\r\n method: \"GET\",\r\n headers: authHeader(),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/UserQuestionnaire/GetNewQuestionnaire`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((questionnaire) => {\r\n return questionnaire;\r\n });\r\n};\r\n\r\nconst getNewQuestionnaireStaff = async (id) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify({ id: id }),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/UserQuestionnaire/GetNewQuestionnaireStaff`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((questionnaire) => {\r\n return questionnaire;\r\n });\r\n};\r\n\r\nconst getCurrentQuestionnaire = () => {\r\n const requestOptions = {\r\n method: \"GET\",\r\n headers: authHeader(),\r\n };\r\n //console.log(\"login request\");\r\n return fetch(\r\n `${process.env.REACT_APP_API_URL}/UserQuestionnaire/GetCurrentQuestionnaire`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((questionnaire) => {\r\n // store user details and jwt token in local storage to keep user logged in between page refreshes\r\n //console.log(questionnaire);\r\n sessionStorage.setItem(\"litigantMenu\", JSON.stringify(questionnaire));\r\n\r\n return questionnaire;\r\n });\r\n};\r\n\r\nconst getCurrentQuestionnaireStaff = (id) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify({ id: id }),\r\n };\r\n //console.log(\"login request\");\r\n return fetch(\r\n `${process.env.REACT_APP_API_URL}/UserQuestionnaire/GetCurrentQuestionnaireStaff`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((questionnaire) => {\r\n // store user details and jwt token in local storage to keep user logged in between page refreshes\r\n //console.log(questionnaire);\r\n return questionnaire;\r\n });\r\n};\r\n\r\nconst getCurrentUserQuestionnaireStaff = (id) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify({ id: id }),\r\n };\r\n //console.log(\"login request\");\r\n return fetch(\r\n `${process.env.REACT_APP_API_URL}/UserQuestionnaire/GetCurrentUserQuestionnaireStaff`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((questionnaire) => {\r\n // store user details and jwt token in local storage to keep user logged in between page refreshes\r\n //console.log(questionnaire);\r\n return questionnaire;\r\n });\r\n};\r\n\r\nconst getCurrentQuestionnaireAtt = (id) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify({ id: id }),\r\n };\r\n //console.log(\"login request\");\r\n return fetch(\r\n `${process.env.REACT_APP_API_URL}/UserQuestionnaire/GetCurrentQuestionnaireAtt`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((questionnaire) => {\r\n // store user details and jwt token in local storage to keep user logged in between page refreshes\r\n //console.log(questionnaire);\r\n return questionnaire;\r\n });\r\n};\r\n\r\nconst submitNewQuestionnaire = async (questionnaireForm) => {\r\n //console.log(questionnaireForm);\r\n await fetch(\r\n `${process.env.REACT_APP_API_URL}/UserQuestionnaire/PostUserQuestionnaireAnswers`,\r\n {\r\n credentials: \"include\",\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify(questionnaireForm),\r\n }\r\n )\r\n .then(handleResponse)\r\n .then((statusMessage) => {\r\n return statusMessage;\r\n });\r\n};\r\n\r\nconst submitNewQuestionnaireStaff = async (questionnaireForm) => {\r\n //console.log(questionnaireForm);\r\n await fetch(\r\n `${process.env.REACT_APP_API_URL}/UserQuestionnaire/PostUserQuestionnaireAnswersStaff`,\r\n {\r\n credentials: \"include\",\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify(questionnaireForm),\r\n }\r\n )\r\n .then(handleResponse)\r\n .then((statusMessage) => {\r\n return statusMessage;\r\n });\r\n};\r\n\r\nconst updateCurrentQuestionnaire = async (questionnaireForm) => {\r\n await fetch(\r\n `${process.env.REACT_APP_API_URL}/UserQuestionnaire/UpdateQuestionnaireAnswers`,\r\n {\r\n credentials: \"include\",\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify(questionnaireForm),\r\n }\r\n )\r\n .then(handleResponse)\r\n .then((statusMessage) => {\r\n //return submitNewQuestionnaireAnswers(statusMessage, questionnaireAnswers);\r\n return statusMessage;\r\n });\r\n};\r\n\r\nconst updateCurrentQuestionnaireStaff = async (questionnaireForm) => {\r\n await fetch(\r\n `${process.env.REACT_APP_API_URL}/UserQuestionnaire/UpdateQuestionnaireAnswersStaff`,\r\n {\r\n credentials: \"include\",\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify(questionnaireForm),\r\n }\r\n )\r\n .then(handleResponse)\r\n .then((statusMessage) => {\r\n //return submitNewQuestionnaireAnswers(statusMessage, questionnaireAnswers);\r\n return statusMessage;\r\n });\r\n};\r\n\r\nconst checkForQuestionnaire = async (id) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify({ id: id }),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/UserQuestionnaire/ValidUserQuestionnaireExists`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((payload) => {\r\n return payload;\r\n });\r\n};\r\n\r\nconst handleResponse = (response) => {\r\n //console.log(response);\r\n return response.text().then((text) => {\r\n const data = text && JSON.parse(text);\r\n if (!response.ok) {\r\n if (response.status === 401) {\r\n // auto logout if 401 response returned from api\r\n // logout();\r\n // window.Location.reload(true);\r\n }\r\n\r\n const error = (data && data.message) || response.statusText;\r\n return Promise.reject(error);\r\n }\r\n\r\n return data;\r\n });\r\n};\r\n\r\nconst questionnaireService = {\r\n getNewQuestionnaire,\r\n getNewQuestionnaireStaff,\r\n getCurrentQuestionnaire,\r\n getCurrentQuestionnaireStaff,\r\n getCurrentQuestionnaireAtt,\r\n submitNewQuestionnaire,\r\n submitNewQuestionnaireStaff,\r\n updateCurrentQuestionnaire,\r\n updateCurrentQuestionnaireStaff,\r\n checkForQuestionnaire,\r\n getCurrentUserQuestionnaireStaff,\r\n};\r\n\r\nexport default questionnaireService;\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport {\r\n Row,\r\n Col,\r\n Input,\r\n Form,\r\n Button,\r\n FormGroup,\r\n Label,\r\n FormText,\r\n} from \"reactstrap\";\r\n\r\nimport questionnaireService from \"../../services/questionnaireService\";\r\nimport litigantMenuActions from \"../../actions/litigantMenuActions\";\r\nimport alertActions from \"../../actions/alertActions\";\r\n\r\nconst Questionnaire = () => {\r\n const menuOptions = useSelector(\r\n (state) => state.litigantMenu.litigantMenuOptions\r\n );\r\n const [questionnaire, setQuestionnaire] = useState({});\r\n const [acceptDisclaimer, setAcceptDisclaimer] = useState(false);\r\n const [formState, setFormState] = useState([]);\r\n const dispatch = useDispatch();\r\n\r\n useEffect(() => {\r\n if (menuOptions) {\r\n if (!menuOptions.hasCurrentQuestionnaire) {\r\n questionnaireService.getNewQuestionnaire().then((payload) => {\r\n setQuestionnaire(payload);\r\n setFormState(payload.formVmList);\r\n });\r\n } else {\r\n questionnaireService.getCurrentQuestionnaire().then((payload) => {\r\n setQuestionnaire(payload);\r\n setFormState(payload.formVmList);\r\n });\r\n }\r\n }\r\n }, [menuOptions]); //If we pass an empty array to useEffect, it’s only executed after the first render.\r\n\r\n const handleChange = (evt) => {\r\n //map target\r\n const { target } = evt;\r\n //create state dupe\r\n var dummyFormState = formState.slice();\r\n //set index\r\n var index = parseInt(target.name);\r\n //get object\r\n var arrayObject = dummyFormState[parseInt(index)];\r\n // update object\r\n arrayObject = { ...arrayObject, answerText: target.value };\r\n //replace original object with copy in formState\r\n dummyFormState[index] = arrayObject;\r\n //update state\r\n setFormState(dummyFormState);\r\n };\r\n\r\n const handleSubmit = (evt) => {\r\n evt.preventDefault();\r\n if (!menuOptions.hasCurrentQuestionnaire) {\r\n questionnaireService.submitNewQuestionnaire(formState).then((result) => {\r\n dispatch(litigantMenuActions.getLitigantMenuOptions());\r\n dispatch(alertActions.success(\"Successfully created questionnaire.\"));\r\n });\r\n } else {\r\n questionnaireService.updateCurrentQuestionnaire(formState).then(() => {\r\n dispatch(alertActions.success(\"Successfully edited questionnaire.\"));\r\n });\r\n }\r\n };\r\n\r\n const getDropDownMenuItems = (dropDownMenuName) => {\r\n //console.log(dropDownMenuName);\r\n const getAll = questionnaire.dropDownGroups.filter(\r\n (x) => x.dropDownGroupName === dropDownMenuName\r\n );\r\n return getAll;\r\n };\r\n return (\r\n \r\n \r\n \r\n Questionnaire \r\n \r\n
\r\n \r\n \r\n Federal Pro Se Clinic \r\n \r\n Please read and acknowledge the rules and disclaimer below in order\r\n to access the questionnaire.\r\n
\r\n Federal Court Advice-Only Clinic Rules and Policies \r\n \r\n Prior to meeting with a Advice-Only Clinic volunteer attorney you\r\n must:\r\n
\r\n \r\n Read and acknowledge the Disclaimer (below) \r\n Complete the General Information Form \r\n \r\n Your appointment: \r\n \r\n \r\n Be early for your meeting with the volunteer attorney. We are sure\r\n your time is valuable, as is that of our attorneys.\r\n \r\n \r\n Be sure to make a list of your questions so that the volunteer\r\n lawyer can address all of your issues.\r\n \r\n \r\n If you are late for your meeting the next person waiting will be\r\n given your appointment. It may not be possible to reschedule you\r\n on that same date.\r\n \r\n \r\n If you are not able to make your meeting time, then you must call\r\n to cancel your meeting. Remember, hundreds of individuals need\r\n this service. If you fail to release your time slot then someone\r\n who is in desperate need may be told that they cannot be helped.\r\n Your appointment is limited to 20 or 30 minutes. Be aware of the\r\n time and try to honor the needs of the next person waiting to see\r\n the attorney.\r\n \r\n \r\n If you fail to make an appointment, it is possible that an\r\n attorney may see you; but to guarantee that appointment you must\r\n schedule with Clerk’s Office personnel in advance.\r\n \r\n \r\n There is no fee for meeting with the volunteer attorney, or for\r\n any of the documents in the Advice-Only Clinic.\r\n \r\n \r\n Disclaimer: \r\n \r\n The Volunteer Lawyers Program asks lawyers to volunteer to come to\r\n the Court for scheduled appointments to provide brief help for\r\n people with civil -not criminal- legal issues who do not have\r\n lawyers. This service is free. The Clinic offers brief appointments\r\n (20-30 minutes). The attorney may let you know what steps you can\r\n take about your case. The volunteer lawyers who help at the clinic\r\n have not agreed to go to court hearings or to file court documents\r\n for you.\r\n
\r\n \r\n
\r\n\r\n \r\n \r\n setAcceptDisclaimer(!acceptDisclaimer)}\r\n />{\" \"}\r\n I acknowledge the above disclaimer. \r\n \r\n
\r\n {menuOptions && (\r\n \r\n \r\n \r\n {\" \"}\r\n {!menuOptions.hasCurrentQuestionnaire ? \"New \" : \"Edit \"}{\" \"}\r\n {questionnaire ? questionnaire.questionnaireName : \"\"}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default Questionnaire;\r\n","import { DragDropContext } from \"react-dnd\";\r\nimport HTML5Backend from \"react-dnd-html5-backend\";\r\n\r\nexport default DragDropContext(HTML5Backend);\r\n","import React, { Component } from \"react\";\r\nimport Scheduler, {\r\n SchedulerData,\r\n ViewTypes,\r\n DemoData,\r\n} from \"react-big-scheduler\";\r\nimport withDragDropContext from \"../../helpers/withDnDContext\";\r\nimport moment from \"moment\";\r\n//include `react-big-scheduler/lib/css/style.\r\nimport \"react-big-scheduler/lib/css/style.css\";\r\n\r\nclass Basic extends Component {\r\n constructor(props) {\r\n super(props);\r\n\r\n let schedulerData = new SchedulerData(\r\n \"2020-04-16\",\r\n ViewTypes.Month,\r\n false,\r\n false,\r\n {\r\n eventItemPopoverEnabled: true,\r\n views: [\r\n {\r\n viewName: \"Appointments\",\r\n viewType: ViewTypes.Month,\r\n showAgenda: false,\r\n isEventPerspective: false,\r\n },\r\n ],\r\n }\r\n );\r\n //set locale moment to the schedulerData, if your locale isn't English. By default, Scheduler comes with English(en, United States).\r\n moment.locale(\"en\");\r\n schedulerData.setLocaleMoment(moment);\r\n //set resources here or later\r\n let resources = [\r\n {\r\n id: \"r0\",\r\n name: \"12:00 PM - 12:30 PM\",\r\n },\r\n {\r\n id: \"r1\",\r\n name: \"12:30 PM - 1:00 PM\",\r\n },\r\n {\r\n id: \"r2\",\r\n name: \"1:00 PM - 1:30 PM\",\r\n },\r\n {\r\n id: \"r3\",\r\n name: \"1:30 PM - 2:00 PM\",\r\n },\r\n {\r\n id: \"r4\",\r\n name: \"2:00 PM - 2:30 PM\",\r\n },\r\n {\r\n id: \"r5\",\r\n name: \"2:30 PM - 3:00 PM\",\r\n },\r\n {\r\n id: \"r6\",\r\n name: \"3:00 PM - 3:30 PM\",\r\n },\r\n {\r\n id: \"r7\",\r\n name: \"3:30 PM - 4:00 PM\",\r\n },\r\n ];\r\n schedulerData.setResources(resources);\r\n //set events here or later,\r\n //the event array should be sorted in ascending order by event.start property, otherwise there will be some rendering errors\r\n let events = [\r\n {\r\n id: 1,\r\n start: \"2020-04-16 12:00:00\",\r\n end: \"2020-04-16 12:30:00\",\r\n resourceId: \"r0\",\r\n title: \"I am finished\",\r\n bgColor: \"#D9D9D9\",\r\n resizable: false,\r\n },\r\n {\r\n id: 2,\r\n start: \"2020-04-16 12:30:00\",\r\n end: \"2020-04-16 13:00:00\",\r\n resourceId: \"r1\",\r\n title: \"I am not resizable\",\r\n resizable: false,\r\n },\r\n {\r\n id: 3,\r\n start: \"2020-04-16 13:00:00\",\r\n end: \"2020-04-16 13:30:00\",\r\n resourceId: \"r2\",\r\n title: \"I am not movable\",\r\n movable: false,\r\n },\r\n {\r\n id: 4,\r\n start: \"2020-04-16 13:30:00\",\r\n end: \"2020-04-16 14:00:00\",\r\n resourceId: \"r3\",\r\n title: \"I am not start-resizable\",\r\n startResizable: false,\r\n },\r\n {\r\n id: 5,\r\n start: \"2020-04-16 14:00:00\",\r\n end: \"2020-04-16 14:30:00\",\r\n resourceId: \"r4\",\r\n title: \"I am not start-resizable\",\r\n startResizable: false,\r\n },\r\n {\r\n id: 6,\r\n start: \"2020-04-16 14:30:00\",\r\n end: \"2020-04-16 15:00:00\",\r\n resourceId: \"r5\",\r\n title: \"I am not start-resizable\",\r\n startResizable: false,\r\n },\r\n {\r\n id: 7,\r\n start: \"2020-04-16 15:00:00\",\r\n end: \"2020-04-16 15:30:00\",\r\n resourceId: \"r6\",\r\n title: \"I am not start-resizable\",\r\n startResizable: false,\r\n },\r\n {\r\n id: 8,\r\n start: \"2020-04-16 15:30:00\",\r\n end: \"2020-04-16 16:00:00\",\r\n resourceId: \"r7\",\r\n title: \"I am not start-resizable\",\r\n startResizable: false,\r\n },\r\n // {\r\n // id: 5,\r\n // start: \"2020-04-16 15:30:00\",\r\n // end: \"2020-04-16 23:30:00\",\r\n // resourceId: \"r2\",\r\n // title: \"R2 has recurring tasks every week on Tuesday, Friday\",\r\n // rrule: \"FREQ=WEEKLY;DTSTART=20200416T013000Z;BYDAY=TH\",\r\n // bgColor: \"#f759ab\",\r\n // },\r\n ];\r\n schedulerData.setEvents(events);\r\n\r\n // let schedulerData = new SchedulerData(\r\n // \"2020-04-16\",\r\n // ViewTypes.Month,\r\n // false,\r\n // false,\r\n // {\r\n // eventItemPopoverEnabled: false,\r\n // views: [\r\n // {\r\n // viewName: \"Agenda View\",\r\n // viewType: ViewTypes.Month,\r\n // showAgenda: true,\r\n // isEventPerspective: false,\r\n // },\r\n // {\r\n // viewName: \"Resource View\",\r\n // viewType: ViewTypes.Month,\r\n // showAgenda: false,\r\n // isEventPerspective: false,\r\n // },\r\n // {\r\n // viewName: \"Task View\",\r\n // viewType: ViewTypes.Month,\r\n // showAgenda: false,\r\n // isEventPerspective: true,\r\n // },\r\n // ],\r\n // }\r\n // );\r\n // schedulerData.localeMoment.locale(\"en\");\r\n // schedulerData.setResources(DemoData.resources);\r\n // schedulerData.setEvents(DemoData.eventsForTaskView);\r\n schedulerData.config.schedulerWidth = \"60%\";\r\n this.state = {\r\n viewModel: schedulerData,\r\n };\r\n }\r\n\r\n render() {\r\n const { viewModel } = this.state;\r\n return (\r\n \r\n \r\n \r\n );\r\n }\r\n\r\n prevClick = (schedulerData) => {\r\n schedulerData.prev();\r\n schedulerData.setEvents(DemoData.eventsForTaskView);\r\n this.setState({\r\n viewModel: schedulerData,\r\n });\r\n };\r\n\r\n nextClick = (schedulerData) => {\r\n schedulerData.next();\r\n schedulerData.setEvents(DemoData.eventsForTaskView);\r\n this.setState({\r\n viewModel: schedulerData,\r\n });\r\n };\r\n\r\n onViewChange = (schedulerData, view) => {\r\n schedulerData.setViewType(\r\n view.viewType,\r\n view.showAgenda,\r\n view.isEventPerspective\r\n );\r\n schedulerData.config.creatable = !view.isEventPerspective;\r\n schedulerData.setEvents(DemoData.eventsForTaskView);\r\n this.setState({\r\n viewModel: schedulerData,\r\n });\r\n };\r\n\r\n onSelectDate = (schedulerData, date) => {\r\n schedulerData.setDate(date);\r\n schedulerData.setEvents(DemoData.eventsForTaskView);\r\n this.setState({\r\n viewModel: schedulerData,\r\n });\r\n };\r\n\r\n eventClicked = (schedulerData, event) => {\r\n alert(\r\n `You just clicked an event: {id: ${event.id}, title: ${event.title}}`\r\n );\r\n };\r\n\r\n ops1 = (schedulerData, event) => {\r\n alert(\r\n `You just executed ops1 to event: {id: ${event.id}, title: ${event.title}}`\r\n );\r\n };\r\n\r\n ops2 = (schedulerData, event) => {\r\n alert(\r\n `You just executed ops2 to event: {id: ${event.id}, title: ${event.title}}`\r\n );\r\n };\r\n\r\n newEvent = (schedulerData, slotId, slotName, start, end, type, item) => {\r\n if (\r\n window.confirm(\r\n `Do you want to create a new event? {slotId: ${slotId}, slotName: ${slotName}, start: ${start}, end: ${end}, type: ${type}, item: ${item}}`\r\n )\r\n ) {\r\n let newFreshId = 0;\r\n schedulerData.events.forEach((item) => {\r\n if (item.id >= newFreshId) newFreshId = item.id + 1;\r\n });\r\n\r\n let newEvent = {\r\n id: newFreshId,\r\n title: \"New event you just created\",\r\n start: start,\r\n end: end,\r\n resourceId: slotId,\r\n bgColor: \"purple\",\r\n };\r\n schedulerData.addEvent(newEvent);\r\n this.setState({\r\n viewModel: schedulerData,\r\n });\r\n }\r\n };\r\n\r\n updateEventStart = (schedulerData, event, newStart) => {\r\n if (\r\n window.confirm(\r\n `Do you want to adjust the start of the event? {eventId: ${event.id}, eventTitle: ${event.title}, newStart: ${newStart}}`\r\n )\r\n ) {\r\n schedulerData.updateEventStart(event, newStart);\r\n }\r\n this.setState({\r\n viewModel: schedulerData,\r\n });\r\n };\r\n\r\n updateEventEnd = (schedulerData, event, newEnd) => {\r\n if (\r\n window.confirm(\r\n `Do you want to adjust the end of the event? {eventId: ${event.id}, eventTitle: ${event.title}, newEnd: ${newEnd}}`\r\n )\r\n ) {\r\n schedulerData.updateEventEnd(event, newEnd);\r\n }\r\n this.setState({\r\n viewModel: schedulerData,\r\n });\r\n };\r\n\r\n moveEvent = (schedulerData, event, slotId, slotName, start, end) => {\r\n if (\r\n window.confirm(\r\n `Do you want to move the event? {eventId: ${event.id}, eventTitle: ${event.title}, newSlotId: ${slotId}, newSlotName: ${slotName}, newStart: ${start}, newEnd: ${end}`\r\n )\r\n ) {\r\n schedulerData.moveEvent(event, slotId, slotName, start, end);\r\n this.setState({\r\n viewModel: schedulerData,\r\n });\r\n }\r\n };\r\n\r\n subtitleGetter = (schedulerData, event) => {\r\n return schedulerData.isEventPerspective\r\n ? schedulerData.getResourceById(event.resourceId).name\r\n : event.groupName;\r\n };\r\n\r\n toggleExpandFunc = (schedulerData, slotId) => {\r\n schedulerData.toggleExpandStatus(slotId);\r\n this.setState({\r\n viewModel: schedulerData,\r\n });\r\n };\r\n}\r\n\r\nexport default withDragDropContext(Basic);\r\n","import React from \"react\";\r\nimport { Row, Col } from \"reactstrap\";\r\nimport Scheduler from \"./Scheduler\";\r\n\r\nconst Appointment = () => {\r\n //2. create the view model, put it in the props obj\r\n\r\n return (\r\n \r\n \r\n \r\n Appointment \r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n );\r\n};\r\n\r\nexport default Appointment;\r\n","import authHeader from \"../helpers/authHeader\";\r\nimport userService from \"./userService\";\r\nimport history from \"../helpers/history\";\r\n\r\nconst updatePersonalInfo = async (personalInfo) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify(personalInfo),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/ApplicationUser/UpdateUserInfo`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((userInfo) => {\r\n return userInfo;\r\n });\r\n};\r\n\r\nconst updatePassword = async (updatePass) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify(updatePass),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/ApplicationUser/UpdatePassword`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((data) => {\r\n if (data.code === \"PasswordUpdated\") {\r\n userService.logout();\r\n history.push(\"/\");\r\n }\r\n //console.log(data);\r\n return;\r\n });\r\n};\r\n\r\nconst handleResponse = (response) => {\r\n //console.log(response);\r\n return response.text().then((text) => {\r\n const data = text && JSON.parse(text);\r\n if (!response.ok) {\r\n if (response.status === 401) {\r\n // auto logout if 401 response returned from api\r\n userService.logout();\r\n history.push(\"/\");\r\n }\r\n if (response.status === 400) {\r\n }\r\n const error =\r\n response.status === 400\r\n ? data.isArray(data)\r\n ? data.map((a) => a.description)\r\n : data.description\r\n : (data && data.message) || response.statusText;\r\n return Promise.reject(error);\r\n }\r\n\r\n return data;\r\n });\r\n};\r\n\r\nconst personalInfoService = { updatePersonalInfo, updatePassword };\r\n\r\nexport default personalInfoService;\r\n","import React, { useState } from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { useForm } from \"react-hook-form\";\r\nimport moment from \"moment\";\r\nimport {\r\n Row,\r\n Col,\r\n Input,\r\n FormFeedback,\r\n FormText,\r\n Button,\r\n FormGroup,\r\n Label,\r\n} from \"reactstrap\";\r\n\r\nimport personalInfoService from \"../../services/personalInfoService\";\r\nimport userActions from \"../../actions/userActions\";\r\nimport alertActions from \"../../actions/alertActions\";\r\n\r\nconst UpdatePersonalInfo = () => {\r\n const dispatch = useDispatch();\r\n const { register, handleSubmit, errors } = useForm();\r\n\r\n const { firstName, lastName, dob, userName } = useSelector(\r\n (state) => state.authentication.user\r\n );\r\n\r\n const [formState, setFormState] = useState({\r\n firstName: firstName,\r\n lastName: lastName,\r\n dob: moment(dob).format(\"MM/DD/YYYY\"),\r\n userName: userName,\r\n token: \"token\",\r\n tokenExp: moment().format(),\r\n });\r\n\r\n const onChange = (evt) => {\r\n const { target } = evt;\r\n if (target) setFormState({ ...formState, [target.name]: target.value });\r\n //console.log(watchAll);\r\n };\r\n\r\n const onSubmit = (data) => {\r\n const fs = { ...formState, dob: moment(formState.dob).format() };\r\n //dispatch(userActions.updateLogin(fs));\r\n personalInfoService.updatePersonalInfo(fs).then((payload) => {\r\n dispatch(userActions.updateLogin(payload));\r\n console.log(\"dispatch\");\r\n dispatch(alertActions.success(\"Sucessfully updated personal info\"));\r\n });\r\n };\r\n\r\n //const watchAll = watch();\r\n return (\r\n \r\n \r\n \r\n Update personal information \r\n \r\n
\r\n \r\n \r\n \r\n Update your personal information here. If you have an existing\r\n appointmen the assigned attorney will be notified of your change.\r\n The attorney is notifed so that they can verfy that there is no\r\n conflict of interst.\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n );\r\n};\r\n\r\nexport default UpdatePersonalInfo;\r\n","import React, { useState } from \"react\";\r\nimport { useForm } from \"react-hook-form\";\r\nimport {\r\n Row,\r\n Col,\r\n Input,\r\n FormFeedback,\r\n FormText,\r\n Button,\r\n FormGroup,\r\n Label,\r\n} from \"reactstrap\";\r\n\r\nimport personalInfoService from \"../../services/personalInfoService\";\r\n\r\nconst UpdatePassword = () => {\r\n const { register, handleSubmit, errors } = useForm();\r\n\r\n const [formState, setFormState] = useState({\r\n oldPassword: \"\",\r\n newPassword: \"\",\r\n newPasswordConfirm: \"\",\r\n });\r\n\r\n const onChange = (evt) => {\r\n const { target } = evt;\r\n if (target) setFormState({ ...formState, [target.name]: target.value });\r\n };\r\n\r\n const onSubmit = (data) => {\r\n if (formState.newPassword !== formState.newPasswordConfirm) {\r\n return;\r\n }\r\n\r\n personalInfoService.updatePassword(formState);\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n Update password \r\n \r\n
\r\n \r\n \r\n \r\n Update your password here. Once you make your change you will be\r\n logged off and will need to log back in.\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n );\r\n};\r\n\r\nexport default UpdatePassword;\r\n","import React from \"react\";\r\nimport { Row, Col } from \"reactstrap\";\r\n\r\nconst Footer = (props) => {\r\n return (\r\n \r\n \r\n \r\n \r\n Disclaimer \r\n\r\n \r\n Disclaimer The United States District Court, District of Arizona\r\n cannot provide legal advice to the public. The United States\r\n District Court, District of Arizona, does not supervise or monitor\r\n the volunteer lawyers. Volunteer lawyers donate their time. The\r\n consultations serve as a guide for self-represented litigants. The\r\n consultations are only intended to assist individuals in gathering\r\n information about the civil litigation process. The consultations\r\n cannot replace individual lawyer representation. The consultations\r\n are not intended to, shall not be construed to, and may not be\r\n relied upon, to create or to limit any rights, substantive or\r\n procedural, enforceable at law, by any party in any matter, civil\r\n or criminal.\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n {/* Honorable G. Murray Snow, Chief Judge | Debra D. Lucas, Acting\r\n District Court Executive & Clerk of Court */}\r\n United States District Court District of Arizona | Federal Court\r\n Advice-Only Clinic\r\n \r\n \r\n
\r\n \r\n
\r\n );\r\n};\r\nexport default Footer;\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { Link, Switch, Route } from \"react-router-dom\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { Row, Col } from \"reactstrap\";\r\n\r\nimport Alerts from \"./Alerts\";\r\nimport SealAndTitle from \"./Home/SealAndTitle\";\r\nimport LitigantMenu from \"./User/LitigantMenu\";\r\nimport Welcome from \"./User/Welcome\";\r\nimport Questionnaire from \"./User/Questionnaire\";\r\nimport Appointment from \"./User/Appointment\";\r\nimport UpdatePersonalInfo from \"./User/UpdatePersonalInfo\";\r\nimport UpdatePassword from \"./User/UpdatePassword\";\r\nimport Footer from \"./Home/Footer\";\r\n\r\nimport userService from '../services/userService';\r\nimport courtSeal from \"./Home/images/CourtSeal-no-back.png\";\r\nimport \"./Home/style/home.css\";\r\n\r\n\r\nconst User = () => {\r\n const user = useSelector((state) => state.authentication.user);\r\n const alert = useSelector((state) => state.alert);\r\n\r\n useEffect(() => {\r\n console.log(\"start\");\r\n const interval = setInterval(() => {\r\n userService.refreshToken();\r\n }, 240000);\r\n return () => {\r\n clearInterval(interval);\r\n };\r\n }, []);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n {!user.emailConfirmed && (\r\n \r\n \r\n \r\n \r\n \r\n Hi {user ? user.firstName : \" \"}! \r\n \r\n Thank you for registering, an email confirmation has been\r\n submitted to your email account. You cannot proceed if you\r\n do not confirm your email.\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n )}\r\n {user.emailConfirmed && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n )}\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n );\r\n};\r\n\r\nexport default User;\r\n","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M160,0C93.726,0,40,53.726,40,120v88c0.035,30.913,25.087,55.965,56,56h8v-16h-8c-22.08-0.026-39.974-17.92-40-40v-88 c0-57.438,46.562-104,104-104s104,46.562,104,104v88c-0.026,22.08-17.92,39.974-40,40h-8v16h8c30.913-0.035,55.965-25.087,56-56 v-88C280,53.726,226.274,0,160,0z\"\n})));\n\nvar _ref3 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M65.928,377.032l5.848-9.208l-13.512-8.576l-5.848,9.216c-17.687,27.872-16.374,63.76,3.304,90.264V480h16v-24 c0.001-1.817-0.617-3.581-1.752-5C52.96,429.738,51.337,400.02,65.928,377.032z\"\n})));\n\nvar _ref4 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M440,0H336c-22.08,0.026-39.974,17.92-40,40v80c0.026,22.08,17.92,39.974,40,40h16v32 c-0.001,3.235,1.947,6.153,4.936,7.392c0.971,0.405,2.012,0.611,3.064,0.608c2.122,0,4.156-0.844,5.656-2.344L403.312,160H440 c22.08-0.026,39.974-17.92,40-40V40C479.974,17.92,462.08,0.026,440,0z M464,120c0,13.255-10.745,24-24,24h-40 c-2.122,0-4.156,0.844-5.656,2.344L368,172.688V152c0-4.418-3.582-8-8-8h-24c-13.255,0-24-10.745-24-24V40 c0-13.255,10.745-24,24-24h104c13.255,0,24,10.745,24,24V120z\"\n})));\n\nvar _ref5 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"rect\", {\n x: 336,\n y: 40,\n width: 56,\n height: 16\n})));\n\nvar _ref6 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"rect\", {\n x: 408,\n y: 40,\n width: 32,\n height: 16\n})));\n\nvar _ref7 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"rect\", {\n x: 336,\n y: 72,\n width: 104,\n height: 16\n})));\n\nvar _ref8 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"rect\", {\n x: 336,\n y: 104,\n width: 56,\n height: 16\n})));\n\nvar _ref9 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M267.584,368.464l-5.848-9.216l-13.512,8.576l5.848,9.216c14.592,22.985,12.969,52.701-4.04,73.96 c-1.135,1.419-1.753,3.183-1.752,5v24h16v-21.272C283.958,432.224,285.271,396.336,267.584,368.464z\"\n})));\n\nvar _ref10 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M472,272h-72c-30.016,0.035-54.666,23.729-55.888,53.72L320,369.128V336c-0.035-30.913-25.087-55.965-56-56h-29.24 l-0.216-0.168L234.4,280H216c-8.837,0-16-7.163-16-16v-18.824c24.719-14.272,39.962-40.633,40-69.176v-64 c-0.012-13.255-3.31-26.3-9.6-37.968c-2.015-3.712-6.569-5.219-10.4-3.44L84.592,134.304c-2.804,1.32-4.593,4.141-4.592,7.24V176 c0.038,28.543,15.281,54.904,40,69.176V264c0,8.837-7.163,16-16,16H56c-30.913,0.035-55.965,25.087-56,56v144h16V336 c0.026-22.08,17.92-39.974,40-40h25.456l72.04,100.656c1.48,2.069,3.856,3.31,6.4,3.344H160c2.518,0,4.889-1.186,6.4-3.2l76-100.8 H264c22.08,0.026,39.974,17.92,40,40v64c0.004,4.418,3.589,7.997,8.007,7.993c2.902-0.003,5.575-1.576,6.985-4.113L356.704,336 h45.864l-78,144h18.2L420.8,336h3.2c30.913-0.035,55.965-25.087,56-56C480,275.582,476.418,272,472,272z M96,176v-29.376 l123.528-58.128C222.483,95.98,224,103.954,224,112v64c0,35.346-28.654,64-64,64C124.654,240,96,211.346,96,176z M160.168,378.496 L135.48,344h50.688L160.168,378.496z M198.272,328H124l-22.904-32H104c17.673,0,32-14.327,32-32v-11.688 c15.622,4.917,32.378,4.917,48,0V264c0,17.673,14.327,32,32,32h6.4L198.272,328z M424,320h-63.2 c3.825-18.613,20.198-31.979,39.2-32h63.2C459.375,306.613,443.002,319.979,424,320z\"\n})));\n\nvar _ref11 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref12 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref13 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref14 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref15 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref16 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref17 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref18 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref19 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref20 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref21 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref22 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref23 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref24 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref25 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar Svg002Support = function Svg002Support(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n id: \"Capa_1\",\n x: \"0px\",\n y: \"0px\",\n viewBox: \"0 0 480 480\",\n style: {\n enableBackground: \"new 0 0 480 480\"\n },\n xmlSpace: \"preserve\",\n ref: svgRef\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", null, title) : null, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref20, _ref21, _ref22, _ref23, _ref24, _ref25);\n};\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(Svg002Support, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/002-support.3440b552.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M421.054,414.843c-4.142,0-7.5,3.358-7.5,7.5v70.514c0,2.283-1.858,4.141-4.141,4.141h-40.317V349.301 c0-4.142-3.358-7.5-7.5-7.5c-4.142,0-7.5,3.358-7.5,7.5v147.698h-81.185l23.543-25.9c2.572-2.83,3.785-6.861,3.244-10.787 c-0.01-0.076-0.022-0.152-0.035-0.228L277.24,327.617l6.041-9.094c3.34,2.372,5.913,4.656,10.738,4.656 c4.908,0,9.497-2.747,11.755-7.269v-0.001l23.65-47.4l53.876,20.865c1.949,0.836,30.252,13.582,30.252,47.238v50.73 c-0.001,4.141,3.357,7.5,7.5,7.5c4.142,0,7.5-3.358,7.5-7.5v-50.73c0-44.344-37.969-60.463-39.585-61.128 c-0.047-0.02-0.095-0.039-0.143-0.057l-89.668-34.726v-21.03c14.242-11.076,24.117-27.495,26.596-46.227 c7.101-0.5,13.69-3.152,19.071-7.779c7.027-6.043,11.059-14.838,11.059-24.126c0-7.708-2.781-15.068-7.737-20.803V92.953 C348.144,41.699,306.446,0,255.192,0c-51.254,0-92.952,41.699-92.952,92.953v28.511c-5.009,5.677-7.733,12.665-7.733,20.074 c0,9.291,4.03,18.085,11.059,24.129c5.377,4.625,11.962,7.274,19.061,7.775c2.499,19.083,12.662,36.114,28.117,47.339v19.92 l-89.571,34.725c-0.047,0.018-0.094,0.037-0.141,0.056c-1.617,0.665-39.585,16.784-39.585,61.128v156.245 c0,10.555,8.587,19.142,19.142,19.142h71.457c4.142,0,7.5-3.358,7.5-7.5c0-4.142-3.358-7.5-7.5-7.5h-16.137V349.301 c0-4.142-3.358-7.5-7.5-7.5c-4.142,0-7.5,3.358-7.5,7.5v147.698h-40.319c-2.283,0-4.141-1.858-4.141-4.141V336.611 c0-33.769,28.493-46.486,30.243-47.234l53.834-20.87l23.652,47.402c2.263,4.533,6.858,7.27,11.756,7.27 c4.801,0,7.349-2.249,10.738-4.656l6.041,9.094l-22.421,132.468c-0.013,0.075-0.024,0.15-0.035,0.226 c-0.542,3.924,0.671,7.957,3.244,10.789l23.543,25.9h-29.995c-4.142,0-7.5,3.358-7.5,7.5s3.358,7.5,7.5,7.5h200.365 c10.555,0,19.142-8.588,19.142-19.142v-70.514C428.554,418.201,425.196,414.843,421.054,414.843z M315.375,263.069l-22.049,44.19 c-0.548-0.389-12.233-8.691-26.517-18.834c6.198-7.651-1.053,1.299,27.235-33.617L315.375,263.069z M271.043,309.833l-5.718,8.607 h-18.703l-5.718-8.607l15.07-10.703L271.043,309.833z M227.743,243.121v-14.036c9.112,3.673,18.85,5.376,28.36,5.376 c9.833,0,19.476-2.096,28.052-5.846v14.567l-28.181,34.785L227.743,243.121z M340.881,141.539 c-0.001,4.913-2.129,9.562-5.839,12.753c-2.453,2.11-5.416,3.459-8.661,3.987v-33.477 C335.001,126.202,340.881,133.352,340.881,141.539z M184.007,158.279c-8.718-1.415-14.5-8.623-14.5-16.741 c0-8.018,6.647-14.544,14.5-16.359V158.279z M184.41,109.896c-2.389,0.274-5.127,0.921-7.168,1.615V92.953 c0-42.983,34.968-77.952,77.951-77.952c42.983,0,77.951,34.969,77.951,77.952v18.043c-2.18-0.663-4.441-1.101-6.762-1.307 c0-7.237,0.063-5.841-23.612-31.294c-4.354-4.678-11.556-5.658-17.037-2.077c-26.13,17.069-58.005,25.644-87.415,23.532 C191.867,99.367,185.991,103.616,184.41,109.896z M199.008,164.184v-46.792v-2.465c32.375,1.896,66.318-7.722,93.739-25.283 c10.858,11.658,16.738,17.773,18.634,20.099c0,5.884,0,47.705,0,54.44c0,30.447-24.826,55.276-55.277,55.276 C221.91,219.46,199.008,192.934,199.008,164.184z M218.623,307.259l-22.049-44.19l21.293-8.247l27.241,33.625 C231.255,298.284,219.88,306.366,218.623,307.259z M227.228,461.702l21.709-128.263h14.071l21.709,128.263l-28.744,31.623 L227.228,461.702z\"\n})));\n\nvar _ref3 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref4 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref5 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref6 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref7 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref8 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref9 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref10 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref11 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref12 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref13 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref14 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref15 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref16 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref17 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar Svg001Employee = function Svg001Employee(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n id: \"Capa_1\",\n x: \"0px\",\n y: \"0px\",\n viewBox: \"0 0 512 512\",\n style: {\n enableBackground: \"new 0 0 512 512\"\n },\n xmlSpace: \"preserve\",\n ref: svgRef\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", null, title) : null, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17);\n};\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(Svg001Employee, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/001-employee.04e78049.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M477.867,0H34.133C15.309,0,0,15.309,0,34.133v341.333C0,394.291,15.309,409.6,34.133,409.6h443.733 c18.825,0,34.133-15.309,34.133-34.133V34.133C512,15.309,496.691,0,477.867,0z M494.933,375.467 c0,9.412-7.654,17.067-17.067,17.067H34.133c-9.412,0-17.067-7.654-17.067-17.067V34.133c0-9.412,7.654-17.067,17.067-17.067 h443.733c9.412,0,17.067,7.654,17.067,17.067V375.467z\"\n})));\n\nvar _ref3 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M324.147,502.067l-17.067-102.4c-0.683-4.113-4.241-7.134-8.414-7.134h-85.333c-4.173,0-7.731,3.021-8.414,7.125 l-17.067,102.4c-0.41,2.475,0.282,5.001,1.903,6.921s4.002,3.021,6.511,3.021h119.467c2.509,0,4.89-1.101,6.502-3.012 C323.866,507.068,324.565,504.542,324.147,502.067z M206.345,494.933L220.57,409.6h70.878l14.217,85.333H206.345z\"\n})));\n\nvar _ref4 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"rect\", {\n x: 8.533,\n y: 324.267,\n width: 494.933,\n height: 17.067\n})));\n\nvar _ref5 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M341.333,494.933H170.667c-4.71,0-8.533,3.814-8.533,8.533c0,4.719,3.823,8.533,8.533,8.533h170.667 c4.719,0,8.533-3.814,8.533-8.533C349.867,498.748,346.052,494.933,341.333,494.933z\"\n})));\n\nvar _ref6 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M418.133,76.8H93.867c-4.71,0-8.533,3.823-8.533,8.533V281.6c0,4.719,3.823,8.533,8.533,8.533h324.267 c4.719,0,8.533-3.814,8.533-8.533V85.333C426.667,80.623,422.852,76.8,418.133,76.8z M409.6,273.067H102.4v-179.2h307.2V273.067z\"\n})));\n\nvar _ref7 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M425.182,80.521c-2.654-3.883-7.962-4.89-11.861-2.227L256,185.924L98.688,78.285c-3.891-2.662-9.19-1.664-11.861,2.227 c-2.662,3.891-1.664,9.199,2.227,11.861l162.133,110.933c1.442,0.998,3.132,1.493,4.813,1.493c1.681,0,3.371-0.495,4.821-1.485 L422.955,92.382C426.846,89.719,427.844,84.412,425.182,80.521z\"\n})));\n\nvar _ref8 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M201.83,155.665c-3.567-3.063-8.969-2.645-12.032,0.922l-102.4,119.467c-3.072,3.575-2.654,8.96,0.922,12.023 c1.604,1.382,3.584,2.057,5.547,2.057c2.398,0,4.796-1.007,6.485-2.97l102.4-119.467 C205.824,164.122,205.406,158.729,201.83,155.665z\"\n})));\n\nvar _ref9 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M424.602,276.036l-102.4-119.467c-3.055-3.576-8.448-3.985-12.023-0.922c-3.584,3.063-3.994,8.457-0.922,12.032 l102.4,119.467c1.681,1.98,4.079,2.987,6.477,2.987c1.963,0,3.942-0.674,5.547-2.074 C427.264,284.996,427.674,279.612,424.602,276.036z\"\n})));\n\nvar _ref10 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"rect\", {\n x: 42.667,\n y: 34.133,\n width: 17.067,\n height: 17.067\n})));\n\nvar _ref11 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"rect\", {\n x: 76.8,\n y: 34.133,\n width: 17.067,\n height: 17.067\n})));\n\nvar _ref12 = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"rect\", {\n x: 110.933,\n y: 34.133,\n width: 17.067,\n height: 17.067\n})));\n\nvar _ref13 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref14 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref15 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref16 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref17 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref18 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref19 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref20 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref21 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref22 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref23 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref24 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref25 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref26 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar _ref27 = /*#__PURE__*/React.createElement(\"g\", null);\n\nvar Svg003Email = function Svg003Email(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n id: \"Capa_1\",\n x: \"0px\",\n y: \"0px\",\n viewBox: \"0 0 512 512\",\n style: {\n enableBackground: \"new 0 0 512 512\"\n },\n xmlSpace: \"preserve\",\n ref: svgRef\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", null, title) : null, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref20, _ref21, _ref22, _ref23, _ref24, _ref25, _ref26, _ref27);\n};\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(Svg003Email, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/003-email.b3bb0327.svg\";\nexport { ForwardRef as ReactComponent };","import React from \"react\";\r\nimport { Row, Col } from \"reactstrap\";\r\n\r\nimport { ReactComponent as LitigantSvg } from \"./images/002-support.svg\";\r\nimport { ReactComponent as AttorneysSvg } from \"./images/001-employee.svg\";\r\nimport { ReactComponent as EmailSvg } from \"./images/003-email.svg\";\r\n\r\nconst TopMenu = props => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n Litigants \r\n \r\n \r\n \r\n \r\n \r\n Attorneys \r\n \r\n \r\n \r\n \r\n \r\n Contact us \r\n \r\n \r\n
\r\n \r\n
\r\n );\r\n};\r\nexport default TopMenu;\r\n","import React from \"react\";\r\nimport { Row, Col } from \"reactstrap\";\r\n\r\nconst ProSeInfo = (props) => {\r\n return (\r\n \r\n \r\n \r\n Federal Court Advice-Only Clinic\r\n \r\n \r\n \r\n Welcome to the new Advice-Only Clinic. Whether you are a new user or\r\n used our old application you will need to register an account. Once\r\n you have registered you can then fill out a questionnaire and request\r\n a meeting.\r\n
\r\n \r\n \r\n {/* Volunteer lawyers provide consultations by appointment for individuals\r\n who cannot afford a lawyer and who are representing themselves in\r\n civil lawsuits. Volunteer lawyers will provide consultations at the\r\n court for 20 - 30 minutes without charge on the second and fourth\r\n Thursdays of each month, between 12:00 p.m. and 4:00 p.m. */}\r\n Volunteer lawyers will provide phone consultations for 20-30 minutes without charge for scheduled appointments.\r\n
\r\n \r\n
\r\n );\r\n};\r\nexport default ProSeInfo;\r\n","import React, { useState } from \"react\";\r\nimport { useForm } from \"react-hook-form\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport {\r\n Button,\r\n Modal,\r\n ModalHeader,\r\n ModalBody,\r\n ModalFooter,\r\n Col,\r\n Input,\r\n FormFeedback,\r\n FormText,\r\n FormGroup,\r\n Label,\r\n} from \"reactstrap\";\r\n\r\nimport userService from \"../../services/userService\";\r\nimport alertActions from \"../../actions/alertActions\";\r\n\r\nconst ResetPasswordModal = (props) => {\r\n const dispatch = useDispatch();\r\n const { buttonLabel } = props;\r\n const [modal, setModal] = useState(false);\r\n const toggle = () => {\r\n setModal(!modal);\r\n setFormState({\r\n email: \"\",\r\n submitted: false,\r\n });\r\n };\r\n const { register, handleSubmit, errors } = useForm();\r\n const [formState, setFormState] = useState({\r\n email: \"\",\r\n submitted: false,\r\n });\r\n\r\n const onChange = (evt) => {\r\n const { target } = evt;\r\n if (target) setFormState({ ...formState, [target.name]: target.value });\r\n };\r\n\r\n const onSubmit = (data) => {\r\n setFormState({ ...formState, submitted: true });\r\n userService.resetPasswordRequest(data).then(() => {\r\n dispatch(\r\n alertActions.success(\"Successfully sent password reset request.\")\r\n );\r\n });\r\n return;\r\n };\r\n\r\n return (\r\n \r\n
\r\n {buttonLabel}\r\n \r\n
\r\n {buttonLabel} \r\n \r\n \r\n Thank you your request has been submitted.\r\n
\r\n \r\n
\r\n Enter your email or username. We'll email instructions on how to\r\n reset your password.\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n Cancel\r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default ResetPasswordModal;\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { Row, Col, Input, Form, Button, FormText, Spinner } from \"reactstrap\";\r\nimport { useForm } from \"react-hook-form\";\r\nimport moment from \"moment\";\r\n\r\nimport ResetPasswordModal from \"./ResetPasswordModal\";\r\nimport alertConstants from \"../../constants/alertConstants\";\r\nimport userActions from \"../../actions/userActions\";\r\n\r\nconst Litigants = () => {\r\n const dispatch = useDispatch();\r\n const alert = useSelector((state) => state.alert);\r\n const [submittedStep, setSubmittedStep] = useState(\"0\");\r\n const [submittedStepRegister, setSubmittedStepRegister] = useState(\"0\");\r\n const { register, handleSubmit, errors } = useForm({\r\n mode: \"onChange\",\r\n });\r\n const {\r\n register: registerRegister,\r\n errors: errorsRegister,\r\n handleSubmit: handleSubmitRegister,\r\n watch,\r\n } = useForm({\r\n mode: \"onChange\",\r\n });\r\n const passwordWatch = watch(\"password\", \"\");\r\n\r\n const onSubmit = (data) => {\r\n if (data.username && data.password) {\r\n setSubmittedStep(\"1\");\r\n dispatch(userActions.login(data.username, data.password));\r\n }\r\n };\r\n\r\n const onSubmitRegister = (data) => {\r\n setSubmittedStepRegister(\"1\");\r\n const registerUser = {\r\n ...data,\r\n dob: moment(data.dob).toISOString(),\r\n };\r\n dispatch(\r\n userActions.register(\r\n registerUser.dob,\r\n registerUser.firstName,\r\n registerUser.lastName,\r\n registerUser.email,\r\n registerUser.password,\r\n registerUser.confirmPassword,\r\n registerUser.phoneNumber\r\n )\r\n );\r\n };\r\n\r\n useEffect(() => {\r\n dispatch(userActions.logout());\r\n }, [dispatch]);\r\n\r\n useEffect(() => {\r\n //console.log(alert);\r\n if (alert.type === alertConstants.ERROR) {\r\n setSubmittedStepRegister(\"0\");\r\n setSubmittedStep(\"0\");\r\n }\r\n }, [alert]);\r\n return (\r\n \r\n \r\n Litigants \r\n \r\n \r\n \r\n \r\n Are you seeking assistance as a Plaintiff (a person who brings a\r\n case against another in a court of law) or a Defendant (an\r\n individual, company, or institution sued or accused in a court of\r\n law)?\r\n
\r\n \r\n
\r\n \r\n \r\n Sign in \r\n \r\n Need to change an upcoming appointment, update your questionnaire\r\n or schedule a new appointment? Log in here.\r\n
\r\n \r\n \r\n Register \r\n \r\n Register below to begin scheduling an appointment.{\" \"}\r\n \r\n All fields below are required. Passwords must be at least six\r\n characters long, contain an uppercase character, lowercase\r\n character, a digit, and a non-alphanumeric character.\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n {/* Login */}\r\n \r\n \r\n \r\n {/* Register */}\r\n \r\n \r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default Litigants;\r\n","const attorneyConstants = {\r\n ATTORNEY_REGISTER_REQUEST: \"ATTORNEY_REGISTER_REQUEST\",\r\n ATTORNEY_REGISTER_SUCCESS: \"ATTORNEY_REGISTER_SUCCESS\",\r\n ATTORNEY_REGISTER_FAILURE: \"ATTORNEY_REGISTER_FAILURE\",\r\n};\r\n\r\nexport default attorneyConstants;\r\n","import authHeader from \"../helpers/authHeader\";\r\nimport history from \"../helpers/history\";\r\nimport userService from \"./userService\";\r\n//import alertActions from \"../actions/alertActions\";\r\n\r\nconst register = (firstName, lastName, email, phoneNumber, barNumber) => {\r\n //console.log(dob, firstName, lastName, email, password, confirmPassword);\r\n return fetch(\r\n `${process.env.REACT_APP_API_URL}/AttorneyRegistration/Register`,\r\n {\r\n method: \"POST\",\r\n headers: { \"Content-Type\": \"application/json\" },\r\n body: JSON.stringify({\r\n firstName,\r\n lastName,\r\n email,\r\n phoneNumber,\r\n barNumber,\r\n }),\r\n }\r\n )\r\n .then(handleResponse)\r\n .then((data) => {\r\n //console.log(data);\r\n // store user details and jwt token in local storage to keep user logged in between page refreshes\r\n //sessionStorage.setItem(\"user\", JSON.stringify(user));\r\n return;\r\n });\r\n};\r\n\r\nconst updatePassword = async (updatePass) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify(updatePass),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/ApplicationUser/UpdatePasswordAtt`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((data) => {\r\n if (data.code === \"PasswordUpdated\") {\r\n userService.logout();\r\n history.push(\"/\");\r\n }\r\n console.log(data);\r\n return;\r\n });\r\n};\r\n\r\nconst updatePersonalInfo = async (personalInfo) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify(personalInfo),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/ApplicationUser/UpdateUserInfoAtt`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((userInfo) => {\r\n return userInfo;\r\n });\r\n};\r\n\r\nconst handleResponse = (response) => {\r\n //console.log(response);\r\n return response.text().then((text) => {\r\n const data = text && JSON.parse(text);\r\n if (!response.ok) {\r\n //console.log(response.message);\r\n if (response.status === 401) {\r\n // auto logout if 401 response returned from api\r\n userService.logout();\r\n }\r\n const error = (data && data.message) || response.statusText;\r\n\r\n return Promise.reject(error);\r\n }\r\n\r\n return data;\r\n });\r\n};\r\n\r\nconst attorneyService = {\r\n register,\r\n updatePersonalInfo,\r\n updatePassword,\r\n};\r\n\r\nexport default attorneyService;\r\n","import attorneyConstants from \"../constants/attorneyConstants\";\r\nimport attorneyService from \"../services/attorneyService\";\r\nimport alertActions from \"./alertActions\";\r\n//import history from \"../helpers/history\";\r\n\r\nconst register = (dob, firstName, lastName, email, phoneNumber, barNumber) => {\r\n const request = (registerApplicationUser) => {\r\n return {\r\n type: attorneyConstants.ATTORNEY_REGISTER_REQUEST,\r\n registerApplicationUser,\r\n };\r\n };\r\n const success = (user) => {\r\n return { type: attorneyConstants.ATTORNEY_REGISTER_SUCCESS, user };\r\n };\r\n const failure = (error) => {\r\n //console.log(error);\r\n return { type: attorneyConstants.ATTORNEY_REGISTER_FAILURE, error };\r\n };\r\n\r\n return (dispatch) => {\r\n dispatch(request(email));\r\n\r\n attorneyService\r\n .register(dob, firstName, lastName, email, phoneNumber, barNumber)\r\n .then(\r\n (user) => {\r\n dispatch(success(user));\r\n //history.push(\"/user\");\r\n //console.log(user);\r\n dispatch(alertActions.success(\"Successfully registered attorney.\"));\r\n },\r\n (error) => {\r\n dispatch(failure(error));\r\n dispatch(alertActions.error(error));\r\n }\r\n );\r\n };\r\n};\r\n\r\nconst userActions = {\r\n register,\r\n};\r\n\r\nexport default userActions;\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { Row, Col, Input, Form, Button, FormText, Spinner } from \"reactstrap\";\r\nimport { useForm } from \"react-hook-form\";\r\n\r\nimport ResetPasswordModal from \"./ResetPasswordModal\";\r\nimport userActions from \"../../actions/userActions\";\r\nimport alertConstants from \"../../constants/alertConstants\";\r\nimport attorneyActions from \"../../actions/attorneyActions\";\r\n\r\nfunction Attorneys() {\r\n const dispatch = useDispatch();\r\n const alert = useSelector((state) => state.alert);\r\n const [submittedStep, setSubmittedStep] = useState(\"0\");\r\n const [registerStep, setRegisterStep] = useState(\"0\");\r\n const { register, handleSubmit, errors } = useForm({\r\n mode: \"onChange\",\r\n });\r\n\r\n const {\r\n register: registerRegister,\r\n errors: errorsRegister,\r\n handleSubmit: handleSubmitRegister,\r\n reset: resetRegister,\r\n } = useForm({\r\n mode: \"onChange\",\r\n });\r\n\r\n const onSubmit = (data) => {\r\n if (data.username && data.password) {\r\n setSubmittedStep(\"1\");\r\n dispatch(userActions.login(data.username, data.password));\r\n }\r\n };\r\n\r\n const onSubmitRegister = (data) => {\r\n dispatch(\r\n attorneyActions.register(\r\n data.firstName,\r\n data.lastName,\r\n data.email,\r\n data.phoneNumber,\r\n data.barNumber\r\n )\r\n );\r\n setRegisterStep(\"1\");\r\n resetRegister({});\r\n //console.log(test);\r\n };\r\n\r\n useEffect(() => {\r\n dispatch(userActions.logout());\r\n }, [dispatch]);\r\n\r\n useEffect(() => {\r\n //console.log(alert);\r\n if (alert.type === alertConstants.ERROR) {\r\n setSubmittedStep(\"0\");\r\n }\r\n }, [alert]);\r\n\r\n return (\r\n \r\n \r\n Attorneys \r\n \r\n \r\n \r\n \r\n Volunteer attorneys should be available to answer questions,\r\n review filings, and address other matters that pro se litigants\r\n may encounter. Please fill out the form below in order to be\r\n considered for volunteer work:\r\n
\r\n \r\n
\r\n \r\n \r\n Sign in \r\n View and confirm your appointments. Log in here.
\r\n \r\n \r\n Register \r\n Register below and a staff member will get back to you.
\r\n \r\n
\r\n \r\n \r\n {/* Login */}\r\n \r\n \r\n \r\n \r\n Thank you for registering. A staff member will contact you soon.\r\n \r\n \r\n \r\n {/* Register */}\r\n \r\n \r\n
\r\n \r\n
\r\n );\r\n}\r\n\r\nexport default Attorneys;\r\n","import React from \"react\";\r\nimport { Row, Col } from \"reactstrap\";\r\n\r\nconst ContactUs = () => {\r\n return (\r\n \r\n \r\n Court information \r\n \r\n \r\n \r\n \r\n \r\n Address: \r\n \r\n \r\n \r\n 401 W. Washington St., Suite 130, SPC 1 Phoenix, AZ 85003-2118\r\n \r\n \r\n
\r\n \r\n \r\n Courthouse: \r\n \r\n \r\n \r\n 7:30 a.m. - 5:30 p.m. M-F, excluding court-observed holidays\r\n \r\n \r\n
\r\n \r\n \r\n Phone: \r\n \r\n \r\n {\r\n \r\n 602-258-3434 – ext 3422\r\n /* 602-322-7230 */\r\n }\r\n \r\n
\r\n \r\n \r\n Email: \r\n \r\n \r\n \r\n \r\n FedCrtClinic@clsaz.org\r\n \r\n \r\n {/* \r\n \r\n adviceonlyclinic@azd.uscourts.gov\r\n \r\n */}\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n );\r\n};\r\nexport default ContactUs;\r\n","import React from \"react\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { Row, Col } from \"reactstrap\";\r\nimport { Link, Element } from \"react-scroll\";\r\nimport Alerts from \"./Alerts\";\r\nimport SealAndTitle from \"./Home/SealAndTitle\";\r\nimport TopMenu from \"./Home/TopMenu\";\r\nimport ProSeInfo from \"./Home/ProSeInfo\";\r\nimport Litigants from \"./Home/Litigants\";\r\nimport Attorneys from \"./Home/Attorneys\";\r\nimport ContactUs from \"./Home/ContactUs\";\r\nimport Footer from \"./Home/Footer\";\r\n\r\nimport \"./Home/style/home.css\";\r\n\r\nimport courtSeal from \"./Home/images/CourtSeal-no-back.png\";\r\n\r\nconst Home = () => {\r\n const alert = useSelector((state) => state.alert);\r\n\r\n return (\r\n \r\n {alert && }\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n );\r\n};\r\nexport default Home;\r\n","import React from \"react\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { Row, Col } from \"reactstrap\";\r\n\r\nconst StaffMenu = () => {\r\n return (\r\n \r\n \r\n STAFF MENU \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Home \r\n \r\n Home \r\n \r\n \r\n \r\n \r\n \r\n \r\n Update Litigants \r\n \r\n Update litigant personal info \r\n \r\n \r\n \r\n View/Edit litigant questionnaires \r\n \r\n \r\n \r\n \r\n \r\n \r\n Attorneys \r\n \r\n Approve/Deny attorney registration \r\n \r\n \r\n \r\n Update attorney info \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n Appointments \r\n \r\n Create/Edit appointments \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Sign Out \r\n \r\n Sign out \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default StaffMenu;\r\n","import authHeader from \"../helpers/authHeader\";\r\n//import history from \"../helpers/history\";\r\nimport userService from \"./userService\";\r\n\r\nconst getUsers = async () => {\r\n const requestOptions = {\r\n method: \"GET\",\r\n headers: authHeader(),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/ApplicationUser/GetAllUsersWithId`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((users) => {\r\n return users;\r\n });\r\n};\r\n\r\nconst getUsersWithNoAppt = async () => {\r\n const requestOptions = {\r\n method: \"GET\",\r\n headers: authHeader(),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/ApplicationUser/GetAllUsersWithIdNoAppt`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((users) => {\r\n return users;\r\n });\r\n};\r\n\r\nconst updatePersonalInfo = async (personalInfo) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify(personalInfo),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/ApplicationUser/UpdateUserInfoStaff`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((userInfo) => {\r\n return userInfo;\r\n });\r\n};\r\n\r\nconst updateAttorneyInfo = async (personalInfo) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify(personalInfo),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/ApplicationUser/UpdateAttorneyInfoStaff`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((userInfo) => {\r\n return userInfo;\r\n });\r\n};\r\n\r\nconst resetPasswordRequest = (resetRequest) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: { \"Content-Type\": \"application/json\" },\r\n body: JSON.stringify(resetRequest),\r\n };\r\n //console.log(\"login request\");\r\n return fetch(\r\n `${process.env.REACT_APP_API_URL}/AuthenticateLitigant/RequestResetPassword`,\r\n requestOptions\r\n );\r\n};\r\n\r\nconst register = (dob, firstName, lastName, email, phoneNumber) => {\r\n //console.log(dob, firstName, lastName, email, password, confirmPassword);\r\n return fetch(\r\n `${process.env.REACT_APP_API_URL}/AuthenticateLitigant/RegisterStaff`,\r\n {\r\n credentials: \"include\",\r\n method: \"POST\",\r\n headers: { \"Content-Type\": \"application/json\", ...authHeader() },\r\n body: JSON.stringify({\r\n dob,\r\n firstName,\r\n lastName,\r\n email,\r\n phoneNumber,\r\n }),\r\n }\r\n )\r\n .then(handleResponse)\r\n .then((user) => {\r\n // store user details and jwt token in local storage to keep user logged in between page refreshes\r\n //sessionStorage.setItem(\"user\", JSON.stringify(user));\r\n return;\r\n });\r\n};\r\n\r\nconst registerAttorney = (\r\n dob,\r\n firstName,\r\n lastName,\r\n email,\r\n phoneNumber,\r\n barNumber\r\n) => {\r\n //console.log(dob, firstName, lastName, email, password, confirmPassword);\r\n return fetch(\r\n `${process.env.REACT_APP_API_URL}/AttorneyRegistration/RegisterAttorneyStaff`,\r\n {\r\n method: \"POST\",\r\n headers: { \"Content-Type\": \"application/json\", ...authHeader() },\r\n body: JSON.stringify({\r\n dob,\r\n firstName,\r\n lastName,\r\n email,\r\n phoneNumber,\r\n barNumber,\r\n }),\r\n }\r\n )\r\n .then(handleResponse)\r\n .then((user) => {\r\n // store user details and jwt token in local storage to keep user logged in between page refreshes\r\n //sessionStorage.setItem(\"user\", JSON.stringify(user));\r\n return;\r\n });\r\n};\r\n\r\nconst getNotifications = async () => {\r\n const requestOptions = {\r\n credentials: \"include\",\r\n method: \"GET\",\r\n headers: authHeader(),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/StaffNotification/GetNewStaffNotifications`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((notifications) => {\r\n //console.log(notifications);\r\n return notifications;\r\n });\r\n};\r\n\r\nconst clearNotification = async (id) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify({ id: id }),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/StaffNotification/ClearNotification`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((payload) => {\r\n return payload;\r\n });\r\n};\r\n\r\nconst getAttorneyRegistrations = async () => {\r\n const requestOptions = {\r\n credentials: \"include\",\r\n method: \"GET\",\r\n headers: authHeader(),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/AttorneyRegistration/GetNewAttorneyRegistrations`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((notifications) => {\r\n //console.log(notifications);\r\n return notifications;\r\n });\r\n};\r\n\r\nconst checkEmail = async (email) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify({ id: email }),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/AttorneyRegistration/CheckEmail`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((payload) => {\r\n return payload;\r\n });\r\n};\r\n\r\nconst approveAttorney = async (id) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify({ id: id }),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/AttorneyRegistration/ApproveAttorneyRegistration`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((payload) => {\r\n return payload;\r\n });\r\n};\r\n\r\nconst denyAttorney = async (id) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify({ id: id }),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/AttorneyRegistration/DenyAttorneyRegistration`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((payload) => {\r\n return payload;\r\n });\r\n};\r\n\r\nconst getAttorneys = async () => {\r\n const requestOptions = {\r\n method: \"GET\",\r\n headers: authHeader(),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/ApplicationUser/GetAllAttorneysWithId`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((users) => {\r\n return users;\r\n });\r\n};\r\n\r\nconst getAllQuestionnaires = async (id) => {\r\n const requestOptions = {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n body: JSON.stringify({ id: id }),\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/UserQuestionnaire/GetAllUserQuestionnaires`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((payload) => {\r\n return payload;\r\n });\r\n};\r\n\r\nconst getScheduledAppointmentsByDate = async (date) => {\r\n const requestOptions = {\r\n method: \"GET\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n ...authHeader(),\r\n },\r\n };\r\n //console.log(\"login request\");\r\n return await fetch(\r\n `${process.env.REACT_APP_API_URL}/Appointment/GetScheduledAppointmentsByDate?date=${date}`,\r\n requestOptions\r\n )\r\n .then(handleResponse)\r\n .then((payload) => {\r\n return payload;\r\n });\r\n};\r\n\r\nconst handleResponse = (response) => {\r\n //console.log(response);\r\n return response.text().then((text) => {\r\n const data = text && JSON.parse(text);\r\n if (!response.ok) {\r\n //console.log(response);\r\n if (response.status === 401 || response.status === 403) {\r\n // auto logout if 401 response returned from api\r\n userService.logout();\r\n }\r\n\r\n const error = (data && data.message) || response.statusText;\r\n return Promise.reject(error);\r\n }\r\n\r\n return data;\r\n });\r\n};\r\n\r\nconst staffService = {\r\n getUsers,\r\n updatePersonalInfo,\r\n updateAttorneyInfo,\r\n resetPasswordRequest,\r\n register,\r\n getNotifications,\r\n clearNotification,\r\n getAttorneyRegistrations,\r\n denyAttorney,\r\n approveAttorney,\r\n getAttorneys,\r\n registerAttorney,\r\n getAllQuestionnaires,\r\n checkEmail,\r\n getUsersWithNoAppt,\r\n getScheduledAppointmentsByDate,\r\n};\r\n\r\nexport default staffService;\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport {\r\n Row,\r\n Col,\r\n Input,\r\n Form,\r\n Button,\r\n FormGroup,\r\n Label,\r\n FormText,\r\n Modal,\r\n ModalHeader,\r\n ModalBody,\r\n ModalFooter,\r\n} from \"reactstrap\";\r\n\r\nimport questionnaireService from \"../../services/questionnaireService\";\r\nimport alertActions from \"../../actions/alertActions\";\r\n\r\nconst QuestionnaireModal = (props) => {\r\n const dispatch = useDispatch();\r\n const {\r\n buttonLabel,\r\n color,\r\n userId,\r\n qId,\r\n modalTitle,\r\n readOnly,\r\n getQuestionnaireButton,\r\n } = props;\r\n\r\n const [questionnaire, setQuestionnaire] = useState({});\r\n const [formState, setFormState] = useState([]);\r\n const [modal, setModal] = useState(false);\r\n\r\n const toggle = () => setModal(!modal);\r\n\r\n useEffect(() => {\r\n if (props) {\r\n console.log(props.hasCurrentQuestionnaire);\r\n if (!props.hasCurrentQuestionnaire) {\r\n questionnaireService\r\n .getNewQuestionnaireStaff(userId)\r\n .then((payload) => {\r\n setQuestionnaire(payload);\r\n setFormState(payload.formVmList);\r\n });\r\n } else {\r\n questionnaireService\r\n .getCurrentQuestionnaireStaff(userId)\r\n .then((payload) => {\r\n setQuestionnaire(payload);\r\n setFormState(payload.formVmList);\r\n });\r\n }\r\n }\r\n }, [qId, props, userId]); //If we pass an empty array to useEffect, it’s only executed after the first render.\r\n\r\n const handleChange = (evt) => {\r\n //map target\r\n const { target } = evt;\r\n //create state dupe\r\n var dummyFormState = formState.slice();\r\n //set index\r\n var index = parseInt(target.name);\r\n //get object\r\n var arrayObject = dummyFormState[parseInt(index)];\r\n // update object\r\n arrayObject = { ...arrayObject, answerText: target.value };\r\n //replace original object with copy in formState\r\n dummyFormState[index] = arrayObject;\r\n //update state\r\n setFormState(dummyFormState);\r\n };\r\n\r\n const handleSubmit = (evt) => {\r\n evt.preventDefault();\r\n const newObj = { formVms: formState, justIdVm: { id: userId } };\r\n if (props.hasCurrentQuestionnaire) {\r\n if (getQuestionnaireButton !== null) {\r\n questionnaireService\r\n .updateCurrentQuestionnaireStaff(newObj)\r\n .then(() => {\r\n getQuestionnaireButton(userId);\r\n dispatch(\r\n alertActions.success(\"Sucessfully updated questionnaire.\")\r\n );\r\n });\r\n } else {\r\n questionnaireService\r\n .updateCurrentQuestionnaireStaff(newObj)\r\n .then(() =>\r\n dispatch(alertActions.success(\"Sucessfully updated questionnaire.\"))\r\n );\r\n }\r\n } else {\r\n if (getQuestionnaireButton !== null) {\r\n questionnaireService.submitNewQuestionnaireStaff(newObj).then(() => {\r\n getQuestionnaireButton(userId);\r\n dispatch(alertActions.success(\"Sucessfully created questionnaire.\"));\r\n });\r\n } else {\r\n questionnaireService\r\n .submitNewQuestionnaireStaff(newObj)\r\n .then(() =>\r\n dispatch(alertActions.success(\"Sucessfully created questionnaire.\"))\r\n );\r\n }\r\n toggle();\r\n }\r\n //console.log(formState, userId);\r\n };\r\n\r\n const getDropDownMenuItems = (dropDownMenuName) => {\r\n //console.log(dropDownMenuName);\r\n const getAll = questionnaire.dropDownGroups.filter(\r\n (x) => x.dropDownGroupName === dropDownMenuName\r\n );\r\n return getAll;\r\n };\r\n\r\n return (\r\n \r\n \r\n {buttonLabel}\r\n \r\n \r\n {modalTitle} \r\n \r\n \r\n \r\n \r\n {\" \"}\r\n {!props.hasCurrentQuestionnaire ? \"New \" : \"Edit \"}{\" \"}\r\n {questionnaire ? questionnaire.questionnaireName : \"\"}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n Close\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default QuestionnaireModal;\r\n","import React, { useEffect, useState } from \"react\";\r\nimport {\r\n Button,\r\n Modal,\r\n ModalHeader,\r\n ModalBody,\r\n ModalFooter,\r\n Row,\r\n Col,\r\n FormGroup,\r\n Input,\r\n Label,\r\n} from \"reactstrap\";\r\nimport moment from \"moment\";\r\nimport SelectSearch from \"react-select-search\";\r\n\r\nimport appointmentService from \"../../services/appointmentService\";\r\nimport questionnaireService from \"../../services/questionnaireService\";\r\nimport QuestionnaireModal from \"./QuestionnaireModal\";\r\nimport { map } from \"jquery\";\r\n\r\nconst RequestAppointmentModal = (props) => {\r\n const { buttonLabel, id, clearNotification, target } = props;\r\n const [modal, setModal] = useState(false);\r\n const [user, setUser] = useState({});\r\n const [questionnaire, setQuestionnaire] = useState({});\r\n const [dates, setDates] = useState([]);\r\n const [selectedDate, setSelectedDate] = useState(\"0\");\r\n const [attorney, setAttorney] = useState({});\r\n\r\n useEffect(() => {\r\n if (id !== \"\") {\r\n //console.log(id);\r\n appointmentService.getLitigantByEmail({ id: id }).then((payload) => {\r\n setUser(payload);\r\n //console.log(payload);\r\n });\r\n }\r\n }, [id]);\r\n\r\n useEffect(() => {\r\n if (Object.keys(user).length !== 0) {\r\n //console.log(user.token);\r\n questionnaireService\r\n .getCurrentUserQuestionnaireStaff(user.token)\r\n .then((payload) => setQuestionnaire(payload));\r\n }\r\n }, [user]);\r\n\r\n useEffect(() => {\r\n appointmentService.getAppointmentsForRequest().then((payload) => {\r\n let renamedArray = payload.map((a) => {\r\n return {\r\n name:\r\n moment(a.timeSlotStart).format(\"ddd MMM-DD-YYYY hh:mm A\") +\r\n \" - \" +\r\n moment(a.timeSlotEnd).format(\"hh:mm A\"),\r\n value: a.appointmentId,\r\n lit: { ...a },\r\n };\r\n });\r\n console.log(renamedArray);\r\n setDates(renamedArray);\r\n });\r\n }, []);\r\n\r\n const onSelect = (id) => {\r\n setSelectedDate(id);\r\n const date = dates.find((val) => val.value === id);\r\n const att = { ...date.lit };\r\n //console.log(att);\r\n appointmentService.getAttorney({ id: att.attorneyId }).then((payload) => {\r\n setAttorney(payload);\r\n });\r\n };\r\n\r\n const toggle = () => setModal(!modal);\r\n\r\n const confirmAppt = () => {\r\n const apptId = { userId: user.token, appointmentId: selectedDate };\r\n appointmentService.setAppointmentLitigant(apptId).then(() => {\r\n clearNotification(target.toString());\r\n toggle();\r\n });\r\n };\r\n return (\r\n \r\n
\r\n {buttonLabel}\r\n \r\n
\r\n {buttonLabel} \r\n \r\n \r\n \r\n \r\n \r\n Litigant info \r\n \r\n {user.firstName} {user.lastName}\r\n \r\n {moment(user.dob).format(\"MM/DD/YYYY\")}\r\n \r\n {user.userName}\r\n \r\n {user.phoneNumber}\r\n \r\n \r\n {user.userId}\r\n
\r\n \r\n
\r\n \r\n \r\n Available appointments \r\n \r\n \r\n The appointments below have an attorney assinged and are available. \r\n onSelect(id)}\r\n />\r\n {/* onSelect(e.target.value)}\r\n multiple\r\n >\r\n {dates.map((m) => (\r\n {m.name} \r\n ))}\r\n */}\r\n \r\n \r\n
\r\n \r\n \r\n \r\n {Object.keys(attorney).length !== 0 && (\r\n \r\n
Attorney info \r\n
\r\n {attorney.firstName} {attorney.lastName}\r\n \r\n {attorney.token}\r\n \r\n {attorney.userName}\r\n \r\n {attorney.phoneNumber}\r\n \r\n
\r\n
\r\n )}\r\n \r\n
\r\n \r\n \r\n \r\n Clicking submit will assign the appointment and clear the\r\n notification.\r\n \r\n 0 ? false : true}\r\n onClick={confirmAppt}\r\n >\r\n Submit\r\n {\" \"}\r\n \r\n Close\r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default RequestAppointmentModal;\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { Row, Col, Table, Button } from \"reactstrap\";\r\nimport moment from \"moment\";\r\n\r\nimport staffService from \"../../services/staffService\";\r\nimport RequestAppointmentModal from \"./RequestAppointmentModal\";\r\n\r\nconst Welcome = () => {\r\n const user = useSelector((state) => state.authentication.user);\r\n const [notifications, setNotifications] = useState([]);\r\n\r\n useEffect(() => {\r\n staffService\r\n .getNotifications()\r\n .then((payload) => setNotifications(payload));\r\n window.scrollTo(0, 0);\r\n }, []);\r\n\r\n useEffect(() => {\r\n const interval = setInterval(() => {\r\n staffService\r\n .getNotifications()\r\n .then((payload) => setNotifications(payload));\r\n }, 30000);\r\n return () => {\r\n clearInterval(interval);\r\n };\r\n }, []);\r\n\r\n const clearNotification = (evt) => {\r\n evt.preventDefault();\r\n const { value } = evt.target;\r\n staffService\r\n .clearNotification(value)\r\n .then(() =>\r\n staffService\r\n .getNotifications()\r\n .then((payload) => setNotifications(payload))\r\n );\r\n };\r\n\r\n const clearAllNotifications = (evt) => {\r\n evt.preventDefault();\r\n notifications.forEach((item, index, arr) => {\r\n let id = arr[index].staffNotificationId;\r\n staffService\r\n .clearNotification(id.toString())\r\n .then(() =>\r\n staffService\r\n .getNotifications()\r\n .then((payload) => setNotifications(payload))\r\n );\r\n });\r\n };\r\n const altClearNotification = (id) => {\r\n staffService.clearNotification(id).then(() =>\r\n staffService.getNotifications().then((payload) => {\r\n setNotifications(payload);\r\n document.querySelector(\"body\").classList.remove(\"modal-open\");\r\n })\r\n );\r\n };\r\n return (\r\n \r\n \r\n Hi {user ? user.firstName : \" \"}! \r\n Notifications.
\r\n 0 ? false : true}\r\n onClick={(evt) => {\r\n clearAllNotifications(evt);\r\n }}\r\n style={{ marginBottom: \"5px\" }}\r\n >\r\n Clear all\r\n \r\n {notifications && (\r\n \r\n \r\n \r\n # \r\n Description \r\n By \r\n Role \r\n Created on \r\n Clear \r\n \r\n \r\n \r\n {notifications.map((n) => (\r\n \r\n {n.staffNotificationId} \r\n \r\n {(n.request && (\r\n \r\n )) ||\r\n n.description}\r\n \r\n {n.causedById} \r\n {n.causedByRole} \r\n \r\n {moment(n.createdDate).format(\"ddd MMM-DD-YYYY hh:mm A\")}\r\n \r\n \r\n {\r\n clearNotification(evt);\r\n }}\r\n >\r\n Clear\r\n \r\n \r\n \r\n ))}\r\n \r\n
\r\n )}\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default Welcome;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport SelectSearch from \"react-select-search\";\r\nimport moment from \"moment\";\r\nimport { Row, Col, FormGroup, Label, Table } from \"reactstrap\";\r\n\r\nimport QuestionnaireModal from \"./QuestionnaireModal\";\r\nimport staffService from \"../../services/staffService\";\r\n\r\nconst UpdateLitigantQuestionnaire = () => {\r\n const [selected, setSelected] = useState({ id: \"0\" });\r\n const [getUsers, setGetUsers] = useState(\"get\");\r\n const [selectedLit, setSelectedLit] = useState([]);\r\n const [questionnaireList, setQuestionnaireList] = useState([]);\r\n const [users, setUsers] = useState([]);\r\n const [questionnaireButton, setQuestionnaireButton] = useState({\r\n color: \"primary\",\r\n msg: \"New Questionnaire\",\r\n id: 0,\r\n });\r\n const defaultFormState = {\r\n firstName: \"\",\r\n lastName: \"\",\r\n dob: moment().format(\"MM/DD/YYYY\"),\r\n userName: \"\",\r\n token: \"\",\r\n tokenExp: moment().format(),\r\n };\r\n const [formState, setFormState] = useState({ ...defaultFormState });\r\n\r\n // useEffect(() => {\r\n // staffService.getUsers().then((payload) => setUsers(payload));\r\n // }, []); //If we pass an empty array to useEffect, it’s only executed after the first render.\r\n useEffect(() => {\r\n if (getUsers === \"get\") {\r\n //console.log(\"--------\");\r\n staffService.getUsers().then((payload) => {\r\n setUsers(payload);\r\n let renamedArray = payload.map((a) => {\r\n return {\r\n name: a.lastName + \", \" + a.firstName,\r\n value: a.id,\r\n lit: { ...a },\r\n };\r\n });\r\n\r\n setSelectedLit(renamedArray);\r\n });\r\n setGetUsers(\"set\");\r\n }\r\n }, [getUsers]);\r\n\r\n const onSelect = (id) => {\r\n //const { target } = evt;\r\n if (id) {\r\n setSelected({ ...selected, id: id });\r\n if (id !== \"0\") {\r\n let user = users.find((user) => user.id === id);\r\n var fs = formState;\r\n //console.log(fs);\r\n var fsu = Object.assign(fs, user);\r\n //console.log(fsu);\r\n fsu = { ...fsu, token: id };\r\n setFormState({ ...fsu });\r\n staffService\r\n .getAllQuestionnaires(id)\r\n .then((payload) => setQuestionnaireList(payload));\r\n return;\r\n }\r\n setFormState({ ...defaultFormState });\r\n }\r\n };\r\n\r\n const getQuestionnaireButton = (value) => {\r\n //keep just in castab\r\n setGetUsers(\"get\");\r\n onSelect(value);\r\n return;\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n View/Edit litigant questionnaires \r\n \r\n \r\n
\r\n \r\n \r\n \r\n Select a user \r\n \r\n {/* onSelect(e)}\r\n >\r\n Select a litigant \r\n {users.map((u) => (\r\n \r\n {u.lastName}, {u.firstName}\r\n \r\n ))}\r\n */}\r\n onSelect(id)}\r\n printOptions=\"always\"\r\n />\r\n \r\n \r\n \r\n {formState.lastName !== \"\" && (\r\n \r\n \r\n {formState.lastName}, {formState.firstName}\r\n \r\n \r\n DOB: {moment(formState.dob).format(\"MM/DD/YYYY\")},{\" \"}\r\n Email: {formState.userName}, Phone: {\" \"}\r\n {formState.phoneNumber}\r\n
\r\n Existing questionnaires \r\n {questionnaireList.length === 0 && (\r\n \r\n No existing questionnaire \r\n {selected.id !== \"0\" && (\r\n 0 ? true : false\r\n }\r\n getQuestionnaireButton={getQuestionnaireButton}\r\n modalTitle={questionnaireButton.msg}\r\n />\r\n )}\r\n
\r\n )}\r\n {questionnaireList.length !== 0 && (\r\n \r\n \r\n \r\n Questionnaire \r\n Created \r\n Appointment \r\n Status \r\n View/Edit \r\n \r\n \r\n \r\n {questionnaireList.map((q) => (\r\n \r\n {q.userQuestionnaireId} \r\n {moment(q.createdDate).format(\"MM/DD/YYYY\")} \r\n \r\n {q.appointmentId === 0\r\n ? \"None\"\r\n : moment(q.appointment.timeSlotStart).format(\r\n \"MMMM Do YYYY, h:mm a\"\r\n )}\r\n \r\n \r\n {q.questionnaireStatus === 1\r\n ? \"In progress\"\r\n : q.questionnaireStatus === 2\r\n ? \"Complete\"\r\n : \"Deleted\"}\r\n \r\n {/* \r\n 0 ? true : false\r\n }\r\n modalTitle={\r\n q.questionnaireStatus === 1\r\n ? \"Edit Questionnaire\"\r\n : \"View Questionnaire\"\r\n }\r\n getQuestionnaireButton={getQuestionnaireButton}\r\n readOnly={q.questionnaireStatus === 1 ? false : true}\r\n />\r\n */}\r\n \r\n 0 ? true : false\r\n }\r\n modalTitle={\r\n q.questionnaireStatus === 1\r\n ? \"Edit Questionnaire\"\r\n : \"View Questionnaire\"\r\n }\r\n readOnly={q.questionnaireStatus === 1 ? false : true}\r\n />\r\n \r\n \r\n ))}\r\n \r\n
\r\n )}\r\n \r\n )}\r\n
\r\n \r\n );\r\n};\r\n\r\nexport default UpdateLitigantQuestionnaire;\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { Row, Col, Input, Button, FormGroup, Label } from \"reactstrap\";\r\n\r\nimport staffService from \"../../services/staffService\";\r\nimport alertActions from \"../../actions/alertActions\";\r\n\r\nconst ApproveAttorneys = () => {\r\n const dispatch = useDispatch();\r\n const [users, setUsers] = useState([]);\r\n const [selected, setSelected] = useState({\r\n att: { attorneyRegistrationId: 0 },\r\n });\r\n const [getAttys, setGetAttys] = useState(true);\r\n const [hideApprove, setHideApprove] = useState(false);\r\n const size = users.length + 1;\r\n\r\n // useEffect(() => {\r\n // staffService.getAttorneyRegistrations().then((payload) => {\r\n // setUsers(payload);\r\n // if (payload.length === 0) {\r\n // setSelected({ ...selected, att: { attorneyRegistrationId: \"0\" } });\r\n // } else {\r\n // setSelected({ ...selected, att: payload[0] });\r\n // }\r\n // });\r\n // }, []); //If we pass an empty array to useEffect, it’s only executed after the first render.\r\n\r\n useEffect(() => {\r\n if (getAttys) {\r\n staffService.getAttorneyRegistrations().then((payload) => {\r\n setUsers(payload);\r\n if (payload.length === 0) {\r\n setSelected({ ...selected, att: { attorneyRegistrationId: \"0\" } });\r\n } else {\r\n console.log(payload[0]);\r\n setSelected({ ...selected, att: payload[0] });\r\n checkEmail(payload[0].email);\r\n }\r\n setGetAttys(false);\r\n });\r\n }\r\n }, [getAttys, selected]);\r\n\r\n const onSelect = (evt) => {\r\n const { value } = evt.target;\r\n let foundAtt = users.find((user) => user.attorneyRegistrationId == value);\r\n //console.log(foundAtt);\r\n setSelected({ ...selected, att: foundAtt });\r\n checkEmail(foundAtt.email);\r\n };\r\n\r\n const deny = (evt) => {\r\n const { value } = evt.target;\r\n staffService.denyAttorney(value).then(() => {\r\n setGetAttys(true);\r\n dispatch(alertActions.success(\"Successfully denied attorney.\"));\r\n });\r\n };\r\n\r\n const approve = (evt) => {\r\n const { value } = evt.target;\r\n staffService.approveAttorney(value).then(() => {\r\n setGetAttys(true);\r\n dispatch(alertActions.success(\"Successfully approved attorney.\"));\r\n });\r\n };\r\n\r\n const checkEmail = (email) => {\r\n staffService.checkEmail(email).then((payload) => {\r\n if (payload.boolVal) {\r\n setHideApprove(true);\r\n } else {\r\n setHideApprove(false);\r\n }\r\n });\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n Approve/Deny attorney registration \r\n \r\n \r\n
\r\n \r\n \r\n \r\n {users.length > 0 && (\r\n Select an attorney for approval \r\n )}\r\n \r\n {users.length > 0 && (\r\n onSelect(e)}\r\n >\r\n {users.map((u) => (\r\n \r\n {u.lastName}, {u.firstName}\r\n \r\n ))}\r\n \r\n )}\r\n \r\n \r\n \r\n {users.length === 0 && (\r\n \r\n There are no attorneys pending approval \r\n \r\n )}\r\n\r\n {users.length > 0 && selected.att.attorneyRegistrationId !== \"0\" && (\r\n \r\n \r\n \r\n \r\n {selected.att.lastName}, {selected.att.firstName}\r\n \r\n \r\n
\r\n \r\n \r\n Phone number \r\n \r\n {selected.att.phoneNumber}\r\n
\r\n \r\n \r\n Email \r\n \r\n \r\n {selected.att.email}\r\n \r\n {hideApprove\r\n ? \" - This email is already taken and cannot be reused!\"\r\n : \"\"}\r\n \r\n \r\n
\r\n \r\n \r\n Bar number \r\n \r\n {selected.att.barNumber}\r\n
\r\n \r\n \r\n approve(evt)}\r\n color={hideApprove ? \"secondary\" : \"primary\"}\r\n disabled={hideApprove}\r\n >\r\n Approve\r\n {\" \"}\r\n deny(evt)}\r\n color=\"danger\"\r\n >\r\n Deny\r\n \r\n {hideApprove}\r\n \r\n
\r\n \r\n )}\r\n
\r\n \r\n );\r\n};\r\n\r\nexport default ApproveAttorneys;\r\n","const staffConstants = {\r\n UPDATE_USER_INFO_REQUEST: \"STAFF_UPDATE_USER_INFO_REQUEST\",\r\n UPDATE_USER_INFO_SUCCESS: \"STAFF_UPDATE_USER_INFO_SUCCESS\",\r\n UPDATE_USER_INFO_FAILURE: \"STAFF_UPDATE_USER_INFO_FAILURE\",\r\n\r\n UPDATE_ATTORNEY_INFO_REQUEST: \"STAFF_UPDATE_ATTORNEY_INFO_REQUEST\",\r\n UPDATE_ATTORNEY_INFO_SUCCESS: \"STAFF_UPDATE_ATTORNEY_INFO_SUCCESS\",\r\n UPDATE_ATTORNEY_INFO_FAILURE: \"STAFF_UPDATE_ATTORNEY_INFO_FAILURE\",\r\n\r\n PASSWORD_RESET_REQUEST: \"STAFF_PASSWORD_RESET_REQUEST\",\r\n PASSWORD_RESET_SUCCESS: \"STAFF_PASSWORD_RESET_SUCCESS\",\r\n PASSWORD_RESET_FAILURE: \"STAFF_PASSWORD_RESET_FAILURE\",\r\n\r\n REGISTER_REQUEST: \"STAFF_REGISTER_REQUEST\",\r\n REGISTER_SUCCESS: \"STAFF_REGISTER_SUCCESS\",\r\n REGISTER_FAILURE: \"STAFF_REGISTER_FAILURE\",\r\n\r\n REGISTER_ATTORNEY_REQUEST: \"STAFF_REGISTER_ATTORNEY_REQUEST\",\r\n REGISTER_ATTORNEY_SUCCESS: \"STAFF_REGISTER_ATTORNEY_SUCCESS\",\r\n REGISTER_ATTORNEY_FAILURE: \"STAFF_REGISTER_ATTORNEY_FAILURE\",\r\n // GETALL_REQUEST: \"USERS_GETALL_REQUEST\",\r\n // GETALL_SUCCESS: \"USERS_GETALL_SUCCESS\",\r\n // GETALL_FAILURE: \"USERS_GETALL_FAILURE\"\r\n};\r\n\r\nexport default staffConstants;\r\n","import staffConstants from \"../constants/staffConstants\";\r\nimport staffService from \"../services/staffService\";\r\nimport alertActions from \"./alertActions\";\r\n//import history from \"../helpers/history\";\r\n\r\nconst register = (dob, firstName, lastName, email, phoneNumber) => {\r\n const request = (registerApplicationUser) => {\r\n return {\r\n type: staffConstants.REGISTER_REQUEST,\r\n registerApplicationUser,\r\n };\r\n };\r\n const success = (user) => {\r\n return { type: staffConstants.REGISTER_SUCCESS, user };\r\n };\r\n const failure = (error) => {\r\n return { type: staffConstants.REGISTER_FAILURE, error };\r\n };\r\n\r\n return (dispatch) => {\r\n //console.log(dob, firstName, lastName, email, phoneNumber);\r\n dispatch(request(email));\r\n\r\n staffService.register(dob, firstName, lastName, email, phoneNumber).then(\r\n (user) => {\r\n dispatch(\r\n alertActions.success(\r\n \"Successfully registered user.\",\r\n staffConstants.REGISTER_SUCCESS\r\n )\r\n );\r\n dispatch(success(user));\r\n //history.push(\"/user\");\r\n },\r\n (error) => {\r\n dispatch(\r\n alertActions.error(\r\n \"There was an error, please try again.\",\r\n staffConstants.REGISTER_FAILURE\r\n )\r\n );\r\n dispatch(failure(error));\r\n }\r\n );\r\n };\r\n};\r\n\r\nconst registerAttorney = (\r\n dob,\r\n firstName,\r\n lastName,\r\n email,\r\n phoneNumber,\r\n barNumber\r\n) => {\r\n const request = (registerApplicationUser) => {\r\n return {\r\n type: staffConstants.REGISTER_ATTORNEY_REQUEST,\r\n registerApplicationUser,\r\n };\r\n };\r\n const success = (user) => {\r\n return { type: staffConstants.REGISTER_ATTORNEY_SUCCESS, user };\r\n };\r\n const failure = (error) => {\r\n return { type: staffConstants.REGISTER_ATTORNEY_FAILURE, error };\r\n };\r\n\r\n return (dispatch) => {\r\n //console.log(dob, firstName, lastName, email, phoneNumber);\r\n dispatch(request(email));\r\n\r\n staffService\r\n .registerAttorney(dob, firstName, lastName, email, phoneNumber, barNumber)\r\n .then(\r\n (user) => {\r\n dispatch(success(user));\r\n dispatch(\r\n alertActions.success(staffConstants.REGISTER_ATTORNEY_SUCCESS)\r\n );\r\n //history.push(\"/user\");\r\n },\r\n (error) => {\r\n dispatch(failure(error));\r\n dispatch(alertActions.error(error));\r\n }\r\n );\r\n };\r\n};\r\n\r\nconst updateUserInfo = (personalInfo) => {\r\n const request = (personalInfo) => {\r\n return { type: staffConstants.UPDATE_USER_INFO_REQUEST, personalInfo };\r\n };\r\n const success = (personalInfo) => {\r\n return { type: staffConstants.UPDATE_USER_INFO_SUCCESS, personalInfo };\r\n };\r\n const failure = (error) => {\r\n return { type: staffConstants.UPDATE_USER_INFO_FAILURE, error };\r\n };\r\n\r\n return (dispatch) => {\r\n dispatch(request(personalInfo));\r\n\r\n staffService.updatePersonalInfo(personalInfo).then(\r\n (personalInfo) => {\r\n dispatch(\r\n alertActions.success(\r\n \"Successfully updated user.\",\r\n staffConstants.UPDATE_USER_INFO_SUCCESS\r\n )\r\n );\r\n dispatch(success(personalInfo));\r\n },\r\n (error) => {\r\n dispatch(\r\n alertActions.error(\r\n \"There was an error, please try again.\",\r\n staffConstants.UPDATE_USER_INFO_FAILURE\r\n )\r\n );\r\n dispatch(failure(error));\r\n dispatch(alertActions.error(error));\r\n }\r\n );\r\n };\r\n};\r\n\r\nconst updateAttorneyInfo = (personalInfo) => {\r\n const request = (personalInfo) => {\r\n return { type: staffConstants.UPDATE_ATTORNEY_INFO_REQUEST, personalInfo };\r\n };\r\n const success = (personalInfo) => {\r\n return { type: staffConstants.UPDATE_ATTORNEY_INFO_SUCCESS, personalInfo };\r\n };\r\n const failure = (error) => {\r\n return { type: staffConstants.UPDATE_ATTORNEY_INFO_FAILURE, error };\r\n };\r\n\r\n return (dispatch) => {\r\n dispatch(request(personalInfo));\r\n\r\n staffService.updateAttorneyInfo(personalInfo).then(\r\n (personalInfo) => {\r\n dispatch(success(personalInfo));\r\n dispatch(\r\n alertActions.success(staffConstants.UPDATE_ATTORNEY_INFO_SUCCESS)\r\n );\r\n },\r\n (error) => {\r\n dispatch(failure(error));\r\n dispatch(alertActions.error(error));\r\n }\r\n );\r\n };\r\n};\r\n\r\nconst passwordReset = (newPassword) => {\r\n const request = (newPassword) => {\r\n return { type: staffConstants.PASSWORD_RESET_REQUEST, newPassword };\r\n };\r\n const success = () => {\r\n return { type: staffConstants.PASSWORD_RESET_SUCCESS };\r\n };\r\n const failure = (error) => {\r\n return { type: staffConstants.PASSWORD_RESET_FAILURE, error };\r\n };\r\n\r\n return (dispatch) => {\r\n dispatch(request({ newPassword }));\r\n\r\n staffService.resetPassword(newPassword).then(\r\n () => {\r\n dispatch(success());\r\n },\r\n (error) => {\r\n dispatch(failure(error));\r\n dispatch(alertActions.error(error));\r\n }\r\n );\r\n };\r\n};\r\n\r\nconst userActions = {\r\n register,\r\n registerAttorney,\r\n updateUserInfo,\r\n passwordReset,\r\n updateAttorneyInfo,\r\n};\r\n\r\nexport default userActions;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { useForm } from \"react-hook-form\";\r\nimport SelectSearch from \"react-select-search\";\r\nimport moment from \"moment\";\r\nimport {\r\n Row,\r\n Col,\r\n Input,\r\n FormFeedback,\r\n FormText,\r\n Button,\r\n FormGroup,\r\n Label,\r\n} from \"reactstrap\";\r\n\r\nimport staffService from \"../../services/staffService\";\r\nimport staffActions from \"../../actions/staffActions\";\r\nimport alertActions from \"../../actions/alertActions\";\r\n\r\nconst UpdateAttorneyInfo = () => {\r\n const dispatch = useDispatch();\r\n const { register, watch, handleSubmit, errors, reset, getValues } = useForm();\r\n const [selectedAtt, setSelectedAtt] = useState([]);\r\n const [getUsers, setGetUsers] = useState(\"get\");\r\n const [users, setUsers] = useState([]);\r\n const [selected, setSelected] = useState({ id: \"0\" });\r\n const watchToken = watch(\"token\");\r\n\r\n const defaultFormState = {\r\n firstName: \"\",\r\n lastName: \"\",\r\n dob: \"\",\r\n userName: \"\",\r\n phoneNumber: \"\",\r\n barNumber: \"\",\r\n token: \"0\",\r\n tokenExp: moment().format(),\r\n };\r\n const [formState, setFormState] = useState({ ...defaultFormState });\r\n\r\n useEffect(() => {\r\n if (getUsers === \"get\") {\r\n //console.log(\"getting\");\r\n staffService.getAttorneys().then((payload) => {\r\n setUsers(payload);\r\n let renamedArray = payload.map((a) => {\r\n return {\r\n name: a.lastName + \", \" + a.firstName,\r\n value: a.id,\r\n lit: { ...a },\r\n };\r\n });\r\n\r\n renamedArray.unshift({\r\n name: \"Enter new attorney\",\r\n value: \"0\",\r\n lit: {},\r\n });\r\n\r\n setSelectedAtt(renamedArray);\r\n });\r\n\r\n setGetUsers(\"set\");\r\n }\r\n }, []);\r\n\r\n useEffect(() => {\r\n reset(defaultFormState);\r\n }, []);\r\n\r\n const onSelect = (evt) => {\r\n // const formValues = getValues();\r\n // const { value } = evt.target;\r\n\r\n // setSelected({ ...selected, id: value });\r\n // if (value !== \"0\") {\r\n // const user = users.find((user) => user.id === value);\r\n // //console.log(user);\r\n // const newValues = {\r\n // ...{ ...formValues, ...user },\r\n // token: value,\r\n // dob: moment(user.dob).format(\"MM/DD/YYYY\"),\r\n // tokenExp: moment().format(),\r\n // };\r\n // reset(newValues);\r\n // return;\r\n // }\r\n // reset(defaultFormState);\r\n\r\n const formValues = getValues();\r\n const value = evt;\r\n\r\n setSelected({ ...selected, id: value });\r\n if (value !== \"0\") {\r\n const user = users.find((user) => user.id === value);\r\n //console.log(user);\r\n const newValues = {\r\n ...{ ...formValues, ...user },\r\n token: value,\r\n dob: moment(user.dob).format(\"MM/DD/YYYY\"),\r\n tokenExp: moment().format(),\r\n };\r\n reset(newValues);\r\n return;\r\n }\r\n reset(defaultFormState);\r\n };\r\n\r\n const onSubmit = (data) => {\r\n const fs = { ...data, dob: moment(data.dob).format() };\r\n if (fs.token === \"0\") {\r\n dispatch(\r\n staffActions.registerAttorney(\r\n fs.dob,\r\n fs.firstName,\r\n fs.lastName,\r\n fs.userName,\r\n fs.phoneNumber,\r\n fs.barNumber\r\n )\r\n );\r\n reset(defaultFormState);\r\n } else {\r\n dispatch(staffActions.updateAttorneyInfo(fs));\r\n }\r\n };\r\n\r\n const onButtonReset = (e) => {\r\n let email = { email: formState.userName };\r\n staffService.resetPasswordRequest(email).then(() => {\r\n dispatch(\r\n alertActions.success(\"Successfully sent password reset request.\")\r\n );\r\n });\r\n return;\r\n };\r\n //const size = users.length + 1;\r\n return (\r\n \r\n \r\n \r\n \r\n Select a user \r\n \r\n {/* onSelect(e)}\r\n >\r\n Enter a new Attorney \r\n {users.map((u) => (\r\n \r\n {u.lastName}, {u.firstName}\r\n \r\n ))}\r\n */}\r\n onSelect(id)}\r\n printOptions=\"always\"\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n );\r\n};\r\n\r\nexport default UpdateAttorneyInfo;\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, Button } from \"reactstrap\";\r\nimport SelectSearch from \"react-select-search\";\r\nimport moment from \"moment\";\r\n\r\nimport appointmentService from \"../../services/appointmentService\";\r\n\r\nconst AppointmentListItemForm = (props) => {\r\n const [attorneys, setAttorneys] = useState([]);\r\n const [litigants, setLitigants] = useState([]);\r\n\r\n //console.log(props);\r\n\r\n useEffect(() => {\r\n let renamedArray = props.attorneys.map((a) => {\r\n return {\r\n name: a.lastName + \", \" + a.firstName,\r\n value: a.id,\r\n att: { ...a },\r\n };\r\n });\r\n renamedArray.unshift({\r\n name: \"Unassigned\",\r\n value: \"0\",\r\n att: {},\r\n });\r\n setAttorneys(renamedArray);\r\n }, [props]);\r\n\r\n useEffect(() => {\r\n let renamedArray = props.litigants.map((a) => {\r\n return {\r\n name: a.lastName + \", \" + a.firstName,\r\n value: a.id,\r\n lit: { ...a },\r\n };\r\n });\r\n renamedArray.unshift({\r\n name: \"Unassigned\",\r\n value: \"0\",\r\n lit: {},\r\n });\r\n setLitigants(renamedArray);\r\n }, [props]);\r\n\r\n const renderStatus = () => {\r\n if (props.deleted) return \"Deleted\";\r\n switch (props.appointmentStatus) {\r\n case 1:\r\n return \"Accepted by attorney\";\r\n case 2:\r\n return \"Assigned to litigant\";\r\n case 3:\r\n return \"Appointment completed\";\r\n default:\r\n return \"New unassigned\";\r\n }\r\n };\r\n\r\n const getTextColor = () => {\r\n //console.log(status, deleted);\r\n return {\r\n color: props.deleted\r\n ? \"#d9534f\"\r\n : props.appointmentStatus === 0\r\n ? \"#292b2c\"\r\n : props.appointmentStatus === 1\r\n ? \"#5bc0de\"\r\n : props.appointmentStatus === 2\r\n ? \"#0275d8\"\r\n : \"#5cb85c\", //3\r\n };\r\n };\r\n\r\n const renderAttorney = (props, option, snapshot, className) => {\r\n //console.log(props);\r\n return (\r\n \r\n \r\n
{option.name}
\r\n
\r\n Bar number: {option.att.barNumber} | Phone:{\" \"}\r\n {option.att.phoneNumber}\r\n
\r\n
\r\n \r\n );\r\n };\r\n\r\n const renderLitigant = (props, option, snapshot, className) => {\r\n //console.log(props);\r\n return (\r\n \r\n \r\n
{option.name}
\r\n
\r\n DOB: {moment(option.lit.dob).format(\"MM/DD/YYYY\")} | {\" \"}\r\n Email: {option.lit.userName} | Phone:{\" \"}\r\n {option.lit.phoneNumber} \r\n
\r\n
\r\n \r\n );\r\n };\r\n\r\n const changeAttorney = (id) => {\r\n const apptId = { userId: id, appointmentId: props.appointmentId };\r\n appointmentService\r\n .setAppointmentAttorney(apptId)\r\n .then(() => props.refreshMonth());\r\n };\r\n\r\n const changeLitigant = (id) => {\r\n //console.log(id);\r\n const apptId = { userId: id, appointmentId: props.appointmentId };\r\n appointmentService\r\n .setAppointmentLitigant(apptId)\r\n .then(() => props.refreshMonth());\r\n };\r\n\r\n const sendQuestionnaire = () => {\r\n const apptId = { userId: props.user, appointmentId: props.appointmentId };\r\n appointmentService.sendAttorneyQuestionnaire(apptId);\r\n };\r\n const sendReminder = () => {\r\n const apptId = { userId: props.user, appointmentId: props.appointmentId };\r\n appointmentService.sendLitigantReminder(apptId);\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n Status\r\n \r\n {renderStatus()} \r\n \r\n
\r\n \r\n Attorney\r\n \r\n changeAttorney(id)}\r\n disabled={\r\n props.deleted === true\r\n ? true\r\n : moment().isAfter(moment(props.timeSlotStart))\r\n ? true\r\n : false\r\n }\r\n />\r\n \r\n
\r\n \r\n Litigant\r\n \r\n changeLitigant(id)}\r\n disabled={\r\n props.deleted === true\r\n ? true\r\n : moment().isAfter(moment(props.timeSlotStart))\r\n ? true\r\n : false\r\n }\r\n />\r\n \r\n
\r\n \r\n Litigant\r\n \r\n sendQuestionnaire()}>\r\n Send attorney questionnaire\r\n {\" \"}\r\n sendReminder()}>\r\n Send litigant reminder\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n );\r\n};\r\n\r\nexport default AppointmentListItemForm;\r\n","import React, { useState } from \"react\";\r\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter } from \"reactstrap\";\r\n\r\nimport appointmentService from \"../../services/appointmentService\";\r\n\r\nconst AppointmentDeleteModal = (props) => {\r\n const { buttonLabel, className, appointmentId } = props;\r\n\r\n const [modal, setModal] = useState(false);\r\n\r\n const toggle = () => setModal(!modal);\r\n\r\n const confirmDelete = () => {\r\n const aid = { appointmentId: appointmentId, userId: \"\" };\r\n appointmentService.deleteAppointment(aid).then(() => {\r\n props.refreshMonth();\r\n toggle();\r\n });\r\n };\r\n\r\n return (\r\n \r\n \r\n {buttonLabel}\r\n \r\n \r\n Delete appointment? \r\n Are you sure you want to delete this appointment? \r\n \r\n \r\n Delete\r\n {\" \"}\r\n \r\n Cancel\r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default AppointmentDeleteModal;\r\n","import React, { useState } from \"react\";\r\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter } from \"reactstrap\";\r\n\r\nimport appointmentService from \"../../services/appointmentService\";\r\n\r\nconst AppointmentReAddModal = (props) => {\r\n const { buttonLabel, className, appointmentId } = props;\r\n\r\n const [modal, setModal] = useState(false);\r\n\r\n const toggle = () => setModal(!modal);\r\n\r\n const confirmReAdd = () => {\r\n const aid = { appointmentId: appointmentId, userId: \"\" };\r\n appointmentService.reAddAppointment(aid).then(() => {\r\n props.refreshMonth();\r\n toggle();\r\n });\r\n };\r\n\r\n return (\r\n \r\n \r\n {buttonLabel}\r\n \r\n \r\n Re-Add appointment? \r\n Are you sure you want to re-add this appointment? \r\n \r\n \r\n Re-Add\r\n {\" \"}\r\n \r\n Cancel\r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default AppointmentReAddModal;\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col } from \"reactstrap\";\r\nimport moment from \"moment\";\r\n\r\nimport AppointmentListItemForm from \"./AppointmentListItemForm\";\r\nimport AppointmentDeleteModal from \"./AppointmentDeleteModal\";\r\nimport AppointmentReAddModal from \"./AppointmentReAddModal\";\r\nimport staffService from \"../../services/staffService\";\r\n\r\nconst AppointmentListItems = (props) => {\r\n const [litigants, setLitigants] = useState([]);\r\n const [attorneys, setAttorneys] = useState([]);\r\n\r\n useEffect(() => {\r\n staffService.getUsersWithNoAppt().then((payload) => {\r\n setLitigants(payload);\r\n });\r\n }, []);\r\n\r\n useEffect(() => {\r\n staffService.getAttorneys().then((payload) => {\r\n setAttorneys(payload);\r\n });\r\n }, []);\r\n\r\n const getBorderColor = (status, deleted) => {\r\n //console.log(status, deleted);\r\n return {\r\n margin: \"7px 0px\",\r\n borderRight: deleted\r\n ? \"#d9534f solid 2px\"\r\n : status === 0\r\n ? \"#292b2c solid 2px\"\r\n : status === 1\r\n ? \"#5bc0de solid 2px\"\r\n : status === 2\r\n ? \"#0275d8 solid 2px\"\r\n : \"#5cb85c solid 2px\",\r\n verticalAlign: \"top\",\r\n };\r\n };\r\n return (\r\n \r\n \r\n \r\n \r\n {props.date}\r\n {moment().isAfter(moment(props.date), \"day\")\r\n ? \" - This date has passed, no more changes can be made.\"\r\n : \"\"}\r\n \r\n \r\n
\r\n \r\n \r\n \r\n {props.dateTimes.map((dt) => (\r\n
\r\n \r\n \r\n {moment(dt.timeSlotStart).format(\"LT\")} -{\" \"}\r\n {moment(dt.timeSlotEnd).format(\"LT\")}\r\n \r\n {!dt.deleted && (\r\n \r\n )}\r\n {dt.deleted && (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n
\r\n ))}\r\n
\r\n \r\n
\r\n \r\n );\r\n};\r\n\r\nexport default AppointmentListItems;\r\n","import React, { useState } from \"react\";\r\nimport Calendar from \"react-calendar\";\r\nimport {\r\n Button,\r\n Modal,\r\n ModalHeader,\r\n ModalBody,\r\n ModalFooter,\r\n Row,\r\n Col,\r\n ListGroup,\r\n ListGroupItem,\r\n} from \"reactstrap\";\r\nimport moment from \"moment\";\r\n\r\nimport appointmentService from \"../../services/appointmentService\";\r\n\r\nconst AppointmentCustomCreate = (props) => {\r\n const { startOfMonth, endOfMonth, currentDate, refreshMonth } = props;\r\n const [modal, setModal] = useState(false);\r\n const [selectedDates, setSelectedDates] = useState([]);\r\n\r\n const toggle = () => {\r\n setSelectedDates([]);\r\n setModal(!modal);\r\n };\r\n const addAppointment = (date) => {\r\n //console.log(date);\r\n var filtered = selectedDates.filter((el) => {\r\n return el.date === moment(date).format(\"MM-DD-YY\");\r\n });\r\n //console.log(filtered.length);\r\n if (filtered.length !== 0) {\r\n return;\r\n }\r\n setSelectedDates((selectedDates) => [\r\n ...selectedDates,\r\n { date: moment(date).format(\"MM-DD-YY\") },\r\n ]);\r\n //setSelectedDates({ ...sd });\r\n //console.log(selectedDates);\r\n };\r\n const removeAppointment = (dateFilter) => {\r\n //console.log(selectedDates);\r\n var filtered = selectedDates.filter((el) => {\r\n return el.date !== dateFilter;\r\n });\r\n setSelectedDates(filtered);\r\n //console.log(filtered);\r\n };\r\n\r\n const submitDates = () => {\r\n appointmentService.createCustomAppointments(selectedDates).then(() => {\r\n refreshMonth();\r\n toggle();\r\n });\r\n };\r\n return (\r\n \r\n \r\n Create custom appointments\r\n \r\n \r\n Add a new appointment \r\n \r\n \r\n \r\n Select a date to add \r\n addAppointment(date)}\r\n activeStartDate={\r\n new Date(currentDate.year, currentDate.month - 1, 1)\r\n }\r\n tileDisabled={({ activeStartDate, date, view }) => {\r\n if (date < startOfMonth) {\r\n return date;\r\n }\r\n if (date > endOfMonth) {\r\n return date;\r\n }\r\n }}\r\n />\r\n \r\n \r\n Selected dates \r\n \r\n {selectedDates.map((a) => (\r\n \r\n {a.date}{\" \"}\r\n \r\n {\" \"}\r\n removeAppointment(a.date)}\r\n style={{\r\n verticalAlign: \"super\",\r\n padding: \"0\",\r\n margin: \"0\",\r\n color: \"red\",\r\n }}\r\n >\r\n x\r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n
\r\n \r\n \r\n \r\n Add Dates\r\n {\" \"}\r\n \r\n Cancel\r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default AppointmentCustomCreate;\r\n","import React from \"react\";\r\nimport {\r\n Button,\r\n Card,\r\n CardHeader,\r\n CardBody,\r\n CardTitle,\r\n CardText,\r\n} from \"reactstrap\";\r\nimport moment from \"moment\";\r\n\r\nexport default class PrintMeetingDayCards extends React.Component {\r\n render() {\r\n const dateArr = this.props.dateArr;\r\n return (\r\n \r\n
{this.props.date} \r\n \r\n {dateArr.map((a) => (\r\n \r\n \r\n {moment(a.timeSlotStart).format(\"MMMM Do YYYY, h:mm a\")}\r\n \r\n \r\n \r\n \r\n Litigant: {a.litigantFirstName} {a.litigantLastName}\r\n \r\n \r\n Attorney: {a.attorneyFirstName} {a.attorneyLastName}\r\n \r\n \r\n \r\n \r\n \r\n \r\n {a.questionAndAnswers.map((qad, index) => (\r\n \r\n \r\n {qad.question}\r\n \r\n \r\n {qad.answer} \r\n \r\n \r\n ))}\r\n \r\n \r\n \r\n ))}\r\n \r\n );\r\n }\r\n}\r\n","import React, { useEffect, useState } from \"react\";\r\nimport {\r\n Button,\r\n Modal,\r\n ModalHeader,\r\n ModalBody,\r\n ModalFooter,\r\n Card,\r\n CardHeader,\r\n CardBody,\r\n CardTitle,\r\n CardText,\r\n} from \"reactstrap\";\r\nimport moment from \"moment\";\r\n\r\nimport staffService from \"../../services/staffService\";\r\nimport PrintMeetingDayCards from \"./PrintMeetingDayCards\";\r\nimport { useReactToPrint } from \"react-to-print\";\r\n\r\nconst PrintMeetingDay = (props) => {\r\n const componentRef = React.useRef();\r\n const handlePrint = useReactToPrint({ content: () => componentRef.current });\r\n\r\n const [modal, setModal] = useState(false);\r\n const [hideButton, setHideButton] = useState(false);\r\n const [dateArr, setDateArr] = useState([]);\r\n\r\n const toggle = () => setModal(!modal);\r\n useEffect(() => {\r\n if (props.date === \"\") {\r\n setHideButton(true);\r\n setDateArr([]);\r\n } else {\r\n setHideButton(false);\r\n staffService\r\n .getScheduledAppointmentsByDate(props.date)\r\n .then((payload) => {\r\n //console.log(payload);\r\n\r\n setDateArr(payload);\r\n });\r\n }\r\n }, [props.date]);\r\n\r\n // For tomorrow I can send a\r\n return (\r\n \r\n
\r\n Print daily calendar\r\n \r\n
\r\n Print calendar \r\n \r\n \r\n \r\n \r\n Print {\" \"}\r\n \r\n Cancel\r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default PrintMeetingDay;\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, ListGroup, ListGroupItem, Label, Button } from \"reactstrap\";\r\nimport moment from \"moment\";\r\n\r\nimport appointmentService from \"../../services/appointmentService\";\r\nimport AppointmentListItems from \"./AppointmentListItems\";\r\nimport AppointmentCustomCreate from \"./AppointmentCustomCreate\";\r\nimport PrintMeetingDay from \"./PrintMeetingDay\";\r\n\r\nconst AppointmentsCreate = () => {\r\n const [dateTimes, setDateTimes] = useState([]);\r\n const [dates, setDates] = useState([]);\r\n const [active, setActive] = useState(\"\");\r\n const [currentDate, setCurrentDate] = useState({\r\n month: moment().month() + 1,\r\n year: moment().year(),\r\n });\r\n\r\n useEffect(() => {\r\n appointmentService.getAppointmentsByMonth(currentDate).then((payload) => {\r\n //console.log(payload);\r\n setDateTimes(payload.appointments);\r\n setDates(payload.dates);\r\n setActive(payload.dates[0]);\r\n });\r\n }, [currentDate]);\r\n\r\n useEffect(() => {\r\n appointmentService.getAppointmentsByMonth(currentDate).then((payload) => {\r\n //console.log(payload);\r\n setDateTimes(payload.appointments);\r\n setDates(payload.dates);\r\n setActive(payload.dates[0]);\r\n });\r\n }, [currentDate]);\r\n\r\n const filterArray = () => {\r\n const filterDate = active;\r\n const filteredArray = dateTimes.filter((dateTime) => {\r\n return moment(dateTime.timeSlotStart).isSame(moment(filterDate), \"day\");\r\n });\r\n return filteredArray;\r\n };\r\n\r\n const monthPrior = () => {\r\n if (currentDate.month === 1) {\r\n return setCurrentDate({\r\n ...currentDate,\r\n month: 12,\r\n year: currentDate.year - 1,\r\n });\r\n }\r\n return setCurrentDate({ ...currentDate, month: currentDate.month - 1 });\r\n };\r\n\r\n const monthAfter = () => {\r\n if (currentDate.month === 12) {\r\n return setCurrentDate({\r\n ...currentDate,\r\n month: 1,\r\n year: currentDate.year + 1,\r\n });\r\n }\r\n return setCurrentDate({ ...currentDate, month: currentDate.month + 1 });\r\n };\r\n\r\n const refreshMonth = () => {\r\n appointmentService.getAppointmentsByMonth(currentDate).then((payload) => {\r\n //console.log(payload);\r\n setDateTimes(payload.appointments);\r\n setDates(payload.dates);\r\n });\r\n };\r\n\r\n const createAppointments = () => {\r\n appointmentService\r\n .createAppointments(currentDate)\r\n .then(() => refreshMonth());\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n Create/Edit appointments \r\n \r\n \r\n
\r\n \r\n \r\n Dates \r\n \r\n \r\n monthPrior()}\r\n >\r\n <\r\n \r\n \r\n \r\n \r\n \r\n {moment(\r\n currentDate.month, // Desired month\r\n \"MM\" // Tells MomentJs the number is a reference to month\r\n ).format(\"MMMM\") // Formats month as name\r\n }{\" \"}\r\n {currentDate.year}\r\n \r\n \r\n \r\n \r\n monthAfter()}\r\n >\r\n >\r\n \r\n \r\n
\r\n {dateTimes.length === 0 &&\r\n (currentDate.year > moment().year() ||\r\n (currentDate.year === moment().year() &&\r\n currentDate.month >= moment().month() + 1)) && (\r\n \r\n \r\n createAppointments()}\r\n style={{ marginBottom: \"10px\", width: \"100%\" }}\r\n >\r\n Create appointments\r\n \r\n \r\n \r\n \r\n )}\r\n\r\n {dateTimes.length === 0 &&\r\n (currentDate.year < moment().year() ||\r\n (currentDate.year === moment().year() &&\r\n currentDate.month < moment().month() + 1)) && (\r\n \r\n \r\n \r\n Cannot create appoints in the past. {currentDate.year}\r\n \r\n {currentDate.year < moment().year() ? \"true\" : \"false\"}\r\n
\r\n \r\n )}\r\n \r\n {dates.map((date) => (\r\n setActive(date)}\r\n action\r\n key={date}\r\n >\r\n {date}\r\n \r\n ))}\r\n \r\n \r\n {active !== \"\" && active !== undefined && (\r\n \r\n )}\r\n \r\n \r\n {active !== \"\" && (\r\n \r\n )}\r\n \r\n
\r\n \r\n );\r\n};\r\n\r\nexport default AppointmentsCreate;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { useDispatch, useSelector } from \"react-redux\";\r\nimport { useForm } from \"react-hook-form\";\r\nimport SelectSearch from \"react-select-search\";\r\nimport moment from \"moment\";\r\nimport {\r\n Row,\r\n Col,\r\n Input,\r\n FormText,\r\n Button,\r\n FormGroup,\r\n Label,\r\n} from \"reactstrap\";\r\n\r\nimport QuestionnaireModal from \"./QuestionnaireModal\";\r\nimport staffService from \"../../services/staffService\";\r\nimport questionnaireService from \"../../services/questionnaireService\";\r\nimport staffActions from \"../../actions/staffActions\";\r\nimport alertActions from \"../../actions/alertActions\";\r\nimport staffConstants from \"../../constants/staffConstants\";\r\n\r\nconst UpdateLitigantInfo = () => {\r\n const alert = useSelector((state) => state.alert);\r\n const dispatch = useDispatch();\r\n const { register, handleSubmit, errors, reset, getValues } = useForm();\r\n\r\n const [users, setUsers] = useState([]);\r\n const [selected, setSelected] = useState({ id: \"0\" });\r\n const [selectedLit, setSelectedLit] = useState([]);\r\n const [getUsers, setGetUsers] = useState(\"get\");\r\n const [questionnaireButton, setQuestionnaireButton] = useState({\r\n color: \"primary\",\r\n msg: \"New Questionnaire\",\r\n id: 0,\r\n });\r\n const defaultFormState = {\r\n firstName: \"\",\r\n lastName: \"\",\r\n dob: \"\",\r\n userName: \"\",\r\n phoneNumber: \"\",\r\n token: \"0\",\r\n tokenExp: moment().format(),\r\n };\r\n\r\n useEffect(() => {\r\n if (getUsers === \"get\") {\r\n //console.log(\"--------\");\r\n staffService.getUsers().then((payload) => {\r\n setUsers(payload);\r\n let renamedArray = payload.map((a) => {\r\n return {\r\n name: a.lastName + \", \" + a.firstName,\r\n value: a.id,\r\n lit: { ...a },\r\n };\r\n });\r\n\r\n renamedArray.unshift({\r\n name: \"Enter new litigant\",\r\n value: \"0\",\r\n lit: {},\r\n });\r\n\r\n setSelectedLit(renamedArray);\r\n });\r\n setGetUsers(\"set\");\r\n }\r\n }, []);\r\n\r\n useEffect(() => {\r\n reset(defaultFormState);\r\n }, []); //If we pass an empty array to useEffect, it’s only executed after the first render.\r\n\r\n useEffect(() => {\r\n if (Object.keys(alert).length !== 0) {\r\n //console.log(alert);\r\n if (alert.altType === staffConstants.REGISTER_SUCCESS) {\r\n reset(defaultFormState);\r\n setGetUsers(\"get\");\r\n }\r\n if (alert.altType === staffConstants.UPDATE_USER_INFO_SUCCESS) {\r\n setGetUsers(\"get\");\r\n }\r\n }\r\n }, [alert, reset, defaultFormState]);\r\n\r\n const onSelect = (evt) => {\r\n const formValues = getValues();\r\n const value = evt;\r\n\r\n setSelected({ ...selected, id: value });\r\n if (value !== \"0\") {\r\n const user = users.find((user) => user.id === value);\r\n //console.log(user);\r\n const newValues = {\r\n ...{ ...formValues, ...user },\r\n token: value,\r\n dob: moment(user.dob).format(\"MM/DD/YYYY\"),\r\n tokenExp: moment().format(),\r\n };\r\n reset(newValues);\r\n getQuestionnaireButton(value);\r\n return;\r\n }\r\n reset(defaultFormState);\r\n };\r\n\r\n const getQuestionnaireButton = (value) => {\r\n questionnaireService.checkForQuestionnaire(value).then((color) => {\r\n if (parseInt(color.id) === 0) {\r\n setQuestionnaireButton({\r\n ...questionnaireButton,\r\n color: \"primary\",\r\n id: color.id,\r\n msg: \"New questionnaire\",\r\n });\r\n }\r\n if (parseInt(color.id) < 0) {\r\n setQuestionnaireButton({\r\n ...questionnaireButton,\r\n color: \"danger\",\r\n id: color.id,\r\n msg: \"Errors found\",\r\n });\r\n }\r\n if (parseInt(color.id) >= 1) {\r\n setQuestionnaireButton({\r\n ...questionnaireButton,\r\n color: \"info\",\r\n id: color.id,\r\n msg: \"View/Edit questionnaire\",\r\n });\r\n }\r\n });\r\n };\r\n\r\n const onSubmit = (data) => {\r\n const fs = { ...data, dob: moment(data.dob).format() };\r\n if (fs.token === \"0\") {\r\n dispatch(\r\n staffActions.register(\r\n fs.dob,\r\n fs.firstName,\r\n fs.lastName,\r\n fs.userName,\r\n fs.phoneNumber\r\n )\r\n );\r\n } else {\r\n dispatch(staffActions.updateUserInfo(fs));\r\n }\r\n //console.log(fs);\r\n };\r\n\r\n const onButtonReset = () => {\r\n const formValue = getValues(\"userName\");\r\n dispatch(alertActions.notice(\"Submitting password reset request\"));\r\n const email = { email: formValue };\r\n staffService.resetPasswordRequest(email).then(() => {\r\n dispatch(\r\n alertActions.success(\"Successfully sent password reset request.\")\r\n );\r\n });\r\n return;\r\n };\r\n //const size = users.length + 1;\r\n return (\r\n \r\n \r\n \r\n Update litigant personal info \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n onSelect(id)}\r\n printOptions=\"always\"\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n );\r\n};\r\n\r\nexport default UpdateLitigantInfo;\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { Link, Switch, Route } from \"react-router-dom\";\r\nimport { Row, Col } from \"reactstrap\";\r\n\r\nimport Alerts from \"./Alerts\";\r\nimport SealAndTitle from \"./Home/SealAndTitle\";\r\nimport StaffMenu from \"./Staff/StaffMenu\";\r\nimport Welcome from \"./Staff/Welcome\";\r\nimport UpdateLitigantQuestionnaire from \"./Staff/UpdateLitigantQuestionnaire\";\r\nimport ApproveAttorneys from \"./Staff/ApproveAttorneys\";\r\nimport UpdateAttorneyInfo from \"./Staff/UpdateAttorneyInfo\";\r\nimport Appointment from \"./User/Appointment\";\r\nimport AppointmentCreate from \"./Staff/AppointmentsCreate\";\r\nimport UpdateLitigantInfo from \"./Staff/UpdateLitigantInfo\";\r\nimport Footer from \"./Home/Footer\";\r\nimport courtSeal from \"./Home/images/CourtSeal-no-back.png\";\r\nimport userService from \"../services/userService\";\r\nimport \"./Home/style/home.css\";\r\n\r\nconst Staff = () => {\r\n const alert = useSelector((state) => state.alert);\r\n\r\n useEffect(() => {\r\n console.log(\"start\");\r\n const interval = setInterval(() => {\r\n userService.refreshToken();\r\n }, 240000);\r\n return () => {\r\n clearInterval(interval);\r\n };\r\n }, []);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n );\r\n};\r\n\r\nexport default Staff;\r\n","import React, { useEffect } from \"react\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { Row, Col } from \"reactstrap\";\r\n\r\nconst AttorneyMenu = () => {\r\n const dispatch = useDispatch();\r\n useEffect(() => {\r\n //dispatch(litigantMenuActions.getLitigantMenuOptions());\r\n }, [dispatch]);\r\n\r\n return (\r\n \r\n \r\n ATTORNEY RESOURCES \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Personal Info \r\n \r\n Update personal info \r\n \r\n \r\n \r\n Update password \r\n \r\n \r\n \r\n \r\n \r\n \r\n Appointments \r\n \r\n Upcoming appointments \r\n \r\n \r\n \r\n Available appointments \r\n \r\n \r\n \r\n \r\n \r\n \r\n Sign Out \r\n \r\n Sign out \r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default AttorneyMenu;\r\n","import React from \"react\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { Row, Col } from \"reactstrap\";\r\n\r\nconst Welcome = () => {\r\n const user = useSelector((state) => state.authentication.user);\r\n const menuOptions = useSelector(\r\n (state) => state.litigantMenu.litigantMenuOptions\r\n );\r\n return (\r\n \r\n \r\n Hi {user ? user.firstName : \" \"}! \r\n {menuOptions && menuOptions.hasAppointment && (\r\n \r\n You are currently scheduled for an appointment on{\" \"}\r\n \r\n {menuOptions.appointmentDate}. \r\n \r\n
\r\n )}\r\n {menuOptions && !menuOptions.hasCurrentQuestionnaire && (\r\n \r\n Please fill out a{\" \"}\r\n \r\n New questionnaire \r\n {\" \"}\r\n questionnaire in order to begin.\r\n
\r\n )}\r\n {menuOptions && menuOptions.hasCurrentQuestionnaire && (\r\n \r\n Edit your existing{\" \"}\r\n \r\n questionnaire \r\n {\" \"}\r\n here.\r\n
\r\n )}\r\n {menuOptions &&\r\n menuOptions.hasCurrentQuestionnaire &&\r\n !menuOptions.hasAppointment && (\r\n \r\n Now that you have a questionnaire filled out you can{\" \"}\r\n \r\n schedule an appointment. \r\n {\" \"}\r\n
\r\n )}\r\n {menuOptions && menuOptions.metYearlyLimitOfThree && (\r\n \r\n In order for the court to provide the Pro Se Clinic for everyone we\r\n limit the appointments to 3 a year. You have met your limit of 3\r\n appointments for the year. View your{\" \"}\r\n \r\n previous appointments \r\n \r\n
\r\n )}\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default Welcome;\r\n","import React, { useEffect, useState } from \"react\";\r\nimport {\r\n Row,\r\n Col,\r\n Input,\r\n Form,\r\n Button,\r\n FormGroup,\r\n Label,\r\n FormText,\r\n Modal,\r\n ModalHeader,\r\n ModalBody,\r\n ModalFooter,\r\n} from \"reactstrap\";\r\n\r\nimport questionnaireService from \"../../services/questionnaireService\";\r\n\r\nconst QuestionnaireModal = (props) => {\r\n const { buttonLabel, color, userId, qId, modalTitle, readOnly } = props;\r\n\r\n const [questionnaire, setQuestionnaire] = useState({});\r\n const [formState, setFormState] = useState([]);\r\n const [modal, setModal] = useState(false);\r\n\r\n const toggle = () => setModal(!modal);\r\n useEffect(() => {\r\n if (props) {\r\n //console.log(props.hasCurrentQuestionnaire);\r\n if (!props.hasCurrentQuestionnaire) {\r\n questionnaireService.getNewQuestionnaireAtt(userId).then((payload) => {\r\n setQuestionnaire(payload);\r\n setFormState(payload.formVmList);\r\n });\r\n } else {\r\n questionnaireService\r\n .getCurrentQuestionnaireAtt(userId)\r\n .then((payload) => {\r\n setQuestionnaire(payload);\r\n setFormState(payload.formVmList);\r\n });\r\n }\r\n }\r\n }, [qId, props, userId]);\r\n\r\n const handleChange = (evt) => {\r\n return;\r\n };\r\n const handleSubmit = (evt) => {\r\n return;\r\n };\r\n const getDropDownMenuItems = (dropDownMenuName) => {\r\n //console.log(dropDownMenuName);\r\n const getAll = questionnaire.dropDownGroups.filter(\r\n (x) => x.dropDownGroupName === dropDownMenuName\r\n );\r\n return getAll;\r\n };\r\n return (\r\n \r\n \r\n {buttonLabel}\r\n \r\n \r\n {modalTitle} \r\n \r\n \r\n \r\n \r\n {\" \"}\r\n {!props.hasCurrentQuestionnaire ? \"New \" : \"Edit \"}{\" \"}\r\n {questionnaire ? questionnaire.questionnaireName : \"\"}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n Close\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default QuestionnaireModal;\r\n","import React, { useState } from \"react\";\r\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter } from \"reactstrap\";\r\n\r\nimport appointmentService from \"../../services/appointmentService\";\r\n\r\nconst AppointmentCancelModal = (props) => {\r\n const { appointmentId, type, refreshAppointments } = props;\r\n\r\n const [modal, setModal] = useState(false);\r\n\r\n const toggle = () => setModal(!modal);\r\n\r\n const cancelAppt = () => {\r\n const appt = { appointmentId: appointmentId, userId: \"\" };\r\n appointmentService.attorneyCancelAppointment(appt).then(() => {\r\n refreshAppointments();\r\n toggle();\r\n });\r\n };\r\n\r\n const completeAppt = () => {\r\n const appt = { appointmentId: appointmentId, userId: \"\" };\r\n appointmentService.attorneyCompleteAppointment(appt).then(() => {\r\n refreshAppointments();\r\n toggle();\r\n });\r\n };\r\n\r\n return (\r\n \r\n \r\n Cancel appointment\r\n \r\n \r\n {type} appointment \r\n Are you sure you want to {type} the appointment? \r\n \r\n {type === \"Cancel\" && (\r\n \r\n Cancel appointment\r\n \r\n )}\r\n {type === \"Complete\" && (\r\n \r\n Complete appointment\r\n \r\n )}{\" \"}\r\n \r\n Close\r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default AppointmentCancelModal;\r\n","import React, { useEffect, useState } from \"react\";\r\nimport {\r\n Row,\r\n Col,\r\n Card,\r\n CardTitle,\r\n CardText,\r\n} from \"reactstrap\";\r\nimport moment from \"moment\";\r\n\r\nimport QuestionnaireModal from \"./QuestionnaireModal\";\r\nimport AppointmentCancelModal from \"./AppointmentCancelModal\";\r\nimport appointmentService from \"../../services/appointmentService\";\r\n\r\nconst Appointment = () => {\r\n const [appointments, setAppointments] = useState([]);\r\n\r\n useEffect(() => {\r\n appointmentService\r\n .getAttorneyAppointments()\r\n .then((payload) => setAppointments(payload));\r\n }, []);\r\n\r\n const refreshAppointments = () => {\r\n appointmentService\r\n .getAttorneyAppointments()\r\n .then((payload) => setAppointments(payload));\r\n };\r\n\r\n const getbackgroundColor = (status) => {\r\n //console.log(status, deleted);\r\n\r\n switch (status) {\r\n case 0:\r\n return \"primary\";\r\n case 1:\r\n return \"primary\";\r\n case 2:\r\n return \"info\";\r\n default:\r\n return \"success\";\r\n }\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n Upcoming appointments \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n {appointments.map((a) => (\r\n \r\n \r\n \r\n {moment(a.timeSlotStart).format(\"MMMM Do YYYY, h:mm a\")}\r\n \r\n \r\n {(a.userId === \"\" || a.userId === \"0\") && (\r\n No litigant assigned \r\n )}\r\n\r\n {a.userId !== \"\" && a.userId !== \"0\" && (\r\n \r\n \r\n \r\n \r\n )}\r\n \r\n {moment().isBefore(a.timeSlotStart) && (\r\n \r\n )}\r\n {moment().isSameOrAfter(a.timeSlotStart) && (\r\n \r\n )}\r\n \r\n \r\n ))}\r\n
\r\n \r\n
\r\n \r\n );\r\n};\r\n\r\nconst GetLitigant = (props) => {\r\n const id = { id: props.litId };\r\n const [litigant, setLitigant] = useState({});\r\n\r\n useEffect(() => {\r\n appointmentService.getLitigant(id).then((payload) => setLitigant(payload));\r\n }, [id]);\r\n\r\n return (\r\n \r\n {litigant.lastName}, {litigant.firstName} \r\n {moment(litigant.dob).format(\"MM/DD/YYYY\")} \r\n {litigant.userName}\r\n \r\n );\r\n};\r\n\r\nexport default Appointment;\r\n","import React, { useState } from \"react\";\r\nimport { Button, Modal, ModalHeader, ModalBody, ModalFooter } from \"reactstrap\";\r\n\r\nimport appointmentService from \"../../services/appointmentService\";\r\n\r\nconst AppointmentAssignModal = (props) => {\r\n const { appointmentId, attorneyId, refreshMonth } = props;\r\n\r\n const [modal, setModal] = useState(false);\r\n\r\n const toggle = () => setModal(!modal);\r\n\r\n const assignToMeAppt = () => {\r\n const appt = { appointmentId: appointmentId, userId: attorneyId };\r\n appointmentService.attorneyAssignToMe(appt).then(() => {\r\n refreshMonth();\r\n toggle();\r\n });\r\n };\r\n\r\n return (\r\n \r\n \r\n Assign to me!\r\n \r\n \r\n Assign appointment to me \r\n Are you sure you want to accept this appointment? \r\n \r\n \r\n Assign to me!\r\n {\" \"}\r\n \r\n Close\r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default AppointmentAssignModal;\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col } from \"reactstrap\";\r\nimport moment from \"moment\";\r\n\r\nimport QuestionnaireModal from \"./QuestionnaireModal\";\r\nimport AppointmentAssignModal from \"./AppointmentAssignModal\";\r\nimport appointmentService from \"../../services/appointmentService\";\r\n\r\nconst AppointmentListItemForm = (props) => {\r\n const { user, userQuestionnaireId } = props;\r\n const [litigant, setLitigant] = useState({});\r\n\r\n useEffect(() => {\r\n if (user !== \"\" && user !== \"0\") {\r\n const id = { id: user };\r\n appointmentService\r\n .getLitigant(id)\r\n .then((payload) => setLitigant(payload));\r\n }\r\n }, [user]);\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {user !== \"\" && user !== \"0\" && (\r\n \r\n \r\n {litigant.lastName}, {litigant.firstName}\r\n \r\n \r\n {moment(litigant.dob).format(\"MM/DD/YYYY\")} \r\n \r\n {litigant.userName} \r\n \r\n \r\n \r\n )}\r\n\r\n {(user === \"\" || user === \"0\") && (\r\n \r\n No litigant assigned. \r\n \r\n \r\n )}\r\n\r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n );\r\n};\r\n\r\nexport default AppointmentListItemForm;\r\n","import React from \"react\";\r\nimport { Row, Col } from \"reactstrap\";\r\nimport moment from \"moment\";\r\n\r\nimport AppointmentListItemForm from \"./AppointmentListItemForm\";\r\n\r\nconst AppointmentListItems = (props) => {\r\n const getBorderColor = (status, deleted) => {\r\n //console.log(status, deleted);\r\n return {\r\n margin: \"7px 0px\",\r\n borderRight: deleted\r\n ? \"#d9534f solid 2px\"\r\n : status === 0\r\n ? \"#292b2c solid 2px\"\r\n : status === 1\r\n ? \"#5bc0de solid 2px\"\r\n : status === 2\r\n ? \"#0275d8 solid 2px\"\r\n : \"#5cb85c solid 2px\",\r\n verticalAlign: \"top\",\r\n };\r\n };\r\n return (\r\n \r\n \r\n \r\n \r\n {props.date}\r\n {moment().isAfter(moment(props.date), \"day\")\r\n ? \" - This date has passed, no more changes can be made.\"\r\n : \"\"}\r\n \r\n \r\n
\r\n \r\n \r\n \r\n {props.dateTimes.map((dt) => (\r\n
\r\n \r\n \r\n {moment(dt.timeSlotStart).format(\"LT\")} -{\" \"}\r\n {moment(dt.timeSlotEnd).format(\"LT\")}\r\n \r\n \r\n \r\n \r\n \r\n
\r\n ))}\r\n
\r\n \r\n
\r\n \r\n );\r\n};\r\n\r\nexport default AppointmentListItems;\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { Row, Col, ListGroup, ListGroupItem, Label, Button } from \"reactstrap\";\r\nimport moment from \"moment\";\r\n\r\nimport appointmentService from \"../../services/appointmentService\";\r\nimport AppointmentListItems from \"./AppointmentListItems\";\r\n\r\nconst AvailableAppointments = () => {\r\n const [dateTimes, setDateTimes] = useState([]);\r\n const [dates, setDates] = useState([]);\r\n const [active, setActive] = useState(\"\");\r\n const [currentDate, setCurrentDate] = useState({\r\n month: moment().month() + 1,\r\n year: moment().year(),\r\n });\r\n\r\n useEffect(() => {\r\n appointmentService\r\n .getAppointmentsByMonthAtt(currentDate)\r\n .then((payload) => {\r\n //console.log(payload);\r\n setDateTimes(payload.appointments);\r\n setDates(payload.dates);\r\n setActive(payload.dates[0]);\r\n });\r\n }, [currentDate]);\r\n\r\n useEffect(() => {\r\n appointmentService\r\n .getAppointmentsByMonthAtt(currentDate)\r\n .then((payload) => {\r\n //console.log(payload);\r\n setDateTimes(payload.appointments);\r\n setDates(payload.dates);\r\n setActive(payload.dates[0]);\r\n });\r\n }, [currentDate]);\r\n\r\n const filterArray = () => {\r\n const filterDate = active;\r\n const filteredArray = dateTimes.filter((dateTime) => {\r\n return moment(dateTime.timeSlotStart).isSame(moment(filterDate), \"day\");\r\n });\r\n return filteredArray;\r\n };\r\n\r\n const monthPrior = () => {\r\n if (currentDate.month === 1) {\r\n return setCurrentDate({\r\n ...currentDate,\r\n month: 12,\r\n year: currentDate.year - 1,\r\n });\r\n }\r\n return setCurrentDate({ ...currentDate, month: currentDate.month - 1 });\r\n };\r\n\r\n const monthAfter = () => {\r\n if (currentDate.month === 12) {\r\n return setCurrentDate({\r\n ...currentDate,\r\n month: 1,\r\n year: currentDate.year + 1,\r\n });\r\n }\r\n return setCurrentDate({ ...currentDate, month: currentDate.month + 1 });\r\n };\r\n\r\n const refreshMonth = () => {\r\n appointmentService\r\n .getAppointmentsByMonthAtt(currentDate)\r\n .then((payload) => {\r\n //console.log(payload);\r\n setDateTimes(payload.appointments);\r\n setDates(payload.dates);\r\n });\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n Available appointments \r\n \r\n \r\n
\r\n \r\n \r\n Dates \r\n \r\n \r\n monthPrior()}\r\n >\r\n <\r\n \r\n \r\n \r\n \r\n \r\n {moment(\r\n currentDate.month, // Desired month\r\n \"MM\" // Tells MomentJs the number is a reference to month\r\n ).format(\"MMMM\") // Formats month as name\r\n }{\" \"}\r\n {currentDate.year}\r\n \r\n \r\n \r\n \r\n monthAfter()}\r\n >\r\n >\r\n \r\n \r\n
\r\n \r\n {dates.map((date) => (\r\n setActive(date)}\r\n action\r\n key={date}\r\n >\r\n {date}\r\n \r\n ))}\r\n \r\n \r\n \r\n {active !== \"\" && (\r\n \r\n )}\r\n \r\n
\r\n \r\n );\r\n};\r\n\r\nexport default AvailableAppointments;\r\n","import React, { useState } from \"react\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { useForm } from \"react-hook-form\";\r\nimport moment from \"moment\";\r\nimport {\r\n Row,\r\n Col,\r\n Input,\r\n FormFeedback,\r\n FormText,\r\n Button,\r\n FormGroup,\r\n Label,\r\n} from \"reactstrap\";\r\n\r\nimport attorneyService from \"../../services/attorneyService\";\r\nimport userActions from \"../../actions/userActions\";\r\n\r\nconst UpdatePersonalInfo = () => {\r\n const dispatch = useDispatch();\r\n const { register, handleSubmit, errors } = useForm();\r\n\r\n const { firstName, lastName, dob, userName } = useSelector(\r\n (state) => state.authentication.user\r\n );\r\n\r\n const [formState, setFormState] = useState({\r\n firstName: firstName,\r\n lastName: lastName,\r\n dob: moment(dob).format(\"MM/DD/YYYY\"),\r\n userName: userName,\r\n token: \"token\",\r\n tokenExp: moment().format(),\r\n });\r\n\r\n const onChange = (evt) => {\r\n const { target } = evt;\r\n if (target) setFormState({ ...formState, [target.name]: target.value });\r\n //console.log(watchAll);\r\n };\r\n\r\n const onSubmit = (data) => {\r\n const fs = { ...formState, dob: moment(formState.dob).format() };\r\n //dispatch(userActions.updateLogin(fs));\r\n attorneyService\r\n .updatePersonalInfo(fs)\r\n .then((payload) => dispatch(userActions.updateLogin(payload)));\r\n };\r\n\r\n //const watchAll = watch();\r\n return (\r\n \r\n \r\n \r\n Update personal information \r\n \r\n
\r\n \r\n \r\n \r\n Update your personal information here. If you have an existing\r\n appointmen the assigned attorney will be notified of your change.\r\n The attorney is notifed so that they can verfy that there is no\r\n conflict of interst.\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n );\r\n};\r\n\r\nexport default UpdatePersonalInfo;\r\n","import React, { useState } from \"react\";\r\nimport { useForm } from \"react-hook-form\";\r\n\r\nimport {\r\n Row,\r\n Col,\r\n Input,\r\n FormFeedback,\r\n FormText,\r\n Button,\r\n FormGroup,\r\n Label,\r\n} from \"reactstrap\";\r\n\r\nimport attorneyService from \"../../services/attorneyService\";\r\n\r\nconst UpdatePassword = () => {\r\n const { register, handleSubmit, errors } = useForm();\r\n\r\n const [formState, setFormState] = useState({\r\n oldPassword: \"\",\r\n newPassword: \"\",\r\n newPasswordConfirm: \"\",\r\n });\r\n\r\n const onChange = (evt) => {\r\n const { target } = evt;\r\n if (target) setFormState({ ...formState, [target.name]: target.value });\r\n };\r\n\r\n const onSubmit = (data) => {\r\n if (formState.newPassword !== formState.newPasswordConfirm) {\r\n return;\r\n }\r\n attorneyService.updatePassword(formState);\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n Update password \r\n \r\n
\r\n \r\n \r\n \r\n Update your password here. Once you make your change you will be\r\n logged off and will need to log back in.\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n );\r\n};\r\n\r\nexport default UpdatePassword;\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { Link, Switch, Route } from \"react-router-dom\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { Row, Col } from \"reactstrap\";\r\n\r\nimport SealAndTitle from \"./Home/SealAndTitle\";\r\nimport AttorneyMenu from \"./Attorney/AttorneyMenu\";\r\nimport Welcome from \"./Attorney/Welcome\";\r\nimport Appointment from \"./Attorney/Appointment\";\r\nimport AvailableAppointments from \"./Attorney/AvailableAppointmets\";\r\nimport UpdatePersonalInfo from \"./Attorney/UpdatePersonalInfo\";\r\nimport UpdatePassword from \"./Attorney/UpdatePassword\";\r\nimport Footer from \"./Home/Footer\";\r\nimport userService from '../services/userService';\r\nimport courtSeal from \"./Home/images/CourtSeal-no-back.png\";\r\nimport \"./Home/style/home.css\";\r\n\r\nconst Attorney = () => {\r\n const user = useSelector((state) => state.authentication.user);\r\n useEffect(() => {\r\n console.log(\"start\");\r\n const interval = setInterval(() => {\r\n userService.refreshToken();\r\n }, 240000);\r\n return () => {\r\n clearInterval(interval);\r\n };\r\n }, []);\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n {!user.emailConfirmed && (\r\n \r\n \r\n \r\n \r\n \r\n Hi {user ? user.firstName : \" \"}! \r\n \r\n Thank you for registering, an email confirmation has been\r\n submitted to your email account. You cannot proceed if you\r\n do not confirm your email.\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n )}\r\n {user.emailConfirmed && (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n )}\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n );\r\n};\r\n\r\nexport default Attorney;\r\n","import { useLocation } from \"react-router-dom\";\r\n\r\n// A custom hook that builds on useLocation to parse\r\n// the query string for you.\r\nconst useQuery = () => {\r\n return new URLSearchParams(useLocation().search);\r\n};\r\n\r\nexport default useQuery;\r\n","import React, { useState } from \"react\";\r\nimport { useForm } from \"react-hook-form\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { Row, Col, Input, Button, FormFeedback, FormText } from \"reactstrap\";\r\n\r\nimport getQueryString from \"../../helpers/getQueryString\";\r\nimport userActions from \"../../actions/userActions\";\r\n\r\nconst PasswordResetForm = () => {\r\n const query = getQueryString();\r\n const dispatch = useDispatch();\r\n\r\n const { register, handleSubmit, errors } = useForm();\r\n const [formState, setFormState] = useState({\r\n email: \"\",\r\n password: \"\",\r\n confirmPassword: \"\",\r\n token: query.get(\"token\"),\r\n submitted: false,\r\n });\r\n\r\n const onChange = (evt) => {\r\n const { target } = evt;\r\n if (target) setFormState({ ...formState, [target.name]: target.value });\r\n };\r\n\r\n const onSubmit = (data) => {\r\n if (\r\n formState.password === formState.confirmPassword &&\r\n formState.email !== \"\"\r\n ) {\r\n setFormState({ ...formState, submitted: true });\r\n dispatch(userActions.passwordReset(formState));\r\n }\r\n\r\n return;\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default PasswordResetForm;\r\n","import React from \"react\";\r\nimport { Row, Col } from \"reactstrap\";\r\nimport { Link, Element } from \"react-scroll\";\r\n\r\nimport SealAndTitle from \"./Home/SealAndTitle\";\r\nimport PasswordResetForm from \"./PasswordReset/PasswordResetForm\";\r\nimport Footer from \"./Home/Footer\";\r\n\r\nimport \"./Home/style/home.css\";\r\n\r\nimport courtSeal from \"./Home/images/CourtSeal-no-back.png\";\r\n\r\nconst PasswordReset = (props) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n {props.match.params.token}\r\n \r\n \r\n
\r\n\r\n \r\n \r\n \r\n \r\n
\r\n \r\n );\r\n};\r\nexport default PasswordReset;\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { Row, Col } from \"reactstrap\";\r\n\r\nimport getQueryString from \"../../helpers/getQueryString\";\r\nimport userActions from \"../../actions/userActions\";\r\n\r\nconst ConfirmEmailForm = () => {\r\n const query = getQueryString();\r\n const dispatch = useDispatch();\r\n\r\n const [state, setState] = useState({\r\n email: query.get(\"email\"),\r\n token: query.get(\"token\"),\r\n });\r\n\r\n useEffect(() => {\r\n if (state.email === \"\") {\r\n const tempState = {\r\n email: query.get(\"email\"),\r\n token: query.get(\"token\"),\r\n };\r\n setState({ ...tempState }, () => {\r\n dispatch(userActions.confirmEmail(state));\r\n });\r\n } else {\r\n dispatch(userActions.confirmEmail(state));\r\n }\r\n }, [dispatch, state, query]);\r\n\r\n return (\r\n \r\n \r\n Email confirmation \r\n \r\n \r\n \r\n Email confirmed \r\n \r\n \r\n \r\n Thank you for confirming your email. Your are being redirected\r\n to the login page.\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default ConfirmEmailForm;\r\n","import React from \"react\";\r\nimport { Row, Col } from \"reactstrap\";\r\nimport { Link, Element } from \"react-scroll\";\r\n\r\nimport SealAndTitle from \"./Home/SealAndTitle\";\r\nimport ConfirmEmailForm from \"./ConfirmEmail/ConfirmEmailForm\";\r\nimport Footer from \"./Home/Footer\";\r\n\r\nimport \"./Home/style/home.css\";\r\n\r\nimport courtSeal from \"./Home/images/CourtSeal-no-back.png\";\r\n\r\nconst ConfirmEmail = (props) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n {props.match.params.token}\r\n \r\n \r\n
\r\n\r\n \r\n \r\n \r\n \r\n
\r\n \r\n );\r\n};\r\nexport default ConfirmEmail;\r\n","import React from \"react\";\nimport { Router, Route, Switch } from \"react-router\";\nimport Layout from \"./components/Layout\";\nimport history from \"./helpers/history\";\nimport PrivateRoute from \"./components/PrivateRoute\";\nimport User from \"./components/User\";\nimport Home from \"./components/Home\";\nimport Staff from \"./components/Staff\";\nimport Attorney from \"./components/Attorney\";\nimport PasswordReset from \"./components/PasswordReset\";\nimport ConfirmEmail from \"./components/ConfirmEmail\";\n\nfunction App() {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n );\n}\n\nexport default App;\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.0/8 are considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { 'Service-Worker': 'script' }\n })\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready\n .then(registration => {\n registration.unregister();\n })\n .catch(error => {\n console.error(error.message);\n });\n }\n}\n","import \"react-app-polyfill/ie11\";\nimport \"react-app-polyfill/stable\";\nimport React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Provider } from \"react-redux\";\nimport store from \"./helpers/store\";\nimport App from \"./App\";\nimport * as serviceWorker from \"./serviceWorker\";\n\nimport \"react-calendar/dist/Calendar.css\";\nimport \"bootstrap/dist/css/bootstrap.css\";\nimport \"./style/index.css\";\n\nReactDOM.render(\n \n \n ,\n document.getElementById(\"root\")\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""}