Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 13 additions & 16 deletions client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ import VolunteersPage from "./components/volunteersPage/VolunteersPage";
import { InitialScreenerTable } from "./components/initialScreener/initialScreenerTable";
import CommentForm from "./components/initialScreener/commentForm";
import {AdminFormsHub} from "./components/adminClientForms/adminFormsHub"
import { Playground } from "./themes/play";
import { ClientLandingPage, ChooseForm } from "./components/clientLandingPage/ClientLandingPage";

const App = () => {
Expand Down Expand Up @@ -142,7 +141,7 @@ const App = () => {
/>
<Route
path="/admin-client-list"
element={<AdminClientList />}
element={<ProtectedRoute element={<AdminClientList />} allowedRoles={['admin']} />}
/>
<Route
path="/accounts"
Expand All @@ -155,7 +154,7 @@ const App = () => {
/>
<Route
path="/clientlist"
element={<ClientList />}
element={<ProtectedRoute element={<ClientList />} allowedRoles={['user']} />}
/>

<Route
Expand All @@ -182,11 +181,11 @@ const App = () => {
<Route
path="/casemanager"
element={<ProtectedRoute element={<CaseManager />} allowedRoles={['admin', 'user']} />}
/>

<Route
path="/random-client-survey/:language?"
//element={<ProtectedRoute element={<RandomClientSurvey />} allowedRoles={['client']} />}
element={<RandomClientSurvey/>}
element={<ProtectedRoute element={<RandomClientSurvey />} allowedRoles={['client']} />}
/>
<Route
path ="/frontDesk"
Expand All @@ -198,29 +197,28 @@ const App = () => {
/>
<Route
path ="/personal/:language?"
element = {<ProtectedRoute element={<PersonalInformation hidden={false}/>} />}
element = {<ProtectedRoute element={<PersonalInformation hidden={false}/>} allowedRoles={['client']}/>}
/>
<Route
path ="/financial/:language?"
element ={<ProtectedRoute element={<FinancialInformation hidden={false}/>} />}
element ={<ProtectedRoute element={<FinancialInformation hidden={false}/>} allowedRoles={['client']}/>}
/>
<Route
path ="/health/:language?"
element ={<ProtectedRoute element={<HealthSocialInformation hidden={false}/>}/>}
element ={<ProtectedRoute element={<HealthSocialInformation hidden={false}/>} allowedRoles={['client']}/>}
/>
<Route
path ="/additional/:language?"
element ={<ProtectedRoute element={<AdditionalInformation hidden={false}/>}/>}
element ={<ProtectedRoute element={<AdditionalInformation hidden={false}/>} allowedRoles={['client']}/>}
/>
<Route
path ="/review/:language?"
element ={<ProtectedRoute element={<ReviewInformation/>}/>}
element ={<ProtectedRoute element={<ReviewInformation/>} allowedRoles={['client']}/>}
/>
<Route
path ="/success/:language?"
element ={<ProtectedRoute element={<Success/>} />}
element ={<ProtectedRoute element={<Success/>} allowedRoles={['client']}/>}
/>
<Route path="/playground" element={<Playground/>}/>
<Route
path = "/initial-screener-table"
element = {<ProtectedRoute element={<InitialScreenerTable />} allowedRoles={["user"]}/>}
Expand All @@ -231,11 +229,10 @@ const App = () => {
/>
<Route
path = "/client-landing-page/:form"
element = {<ClientLandingPage />} />
<Route
element = {<ProtectedRoute element={<ClientLandingPage />} allowedRoles={['client']} />} />
<Route
path = "/choose-form"
element = {<ChooseForm />} />

element = {<ProtectedRoute element={<ChooseForm />} allowedRoles={['client']} />} />
<Route
path="/"
element={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ export const RandomClientTable = () => {
<FilterTemplate
setFilterQuery={setFilterQuery}
type={"randomSurvey"}
/>
/></HStack>
<HStack
justifyContent="space-between"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ export const SuccessStoryTable = () => {
<FilterTemplate
setFilterQuery={setFilterQuery}
type={"successStory"}
/>
/></HStack>
<HStack
justifyContent="space-between"
>
Expand Down
4 changes: 3 additions & 1 deletion client/src/components/authentification/authentification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const Authentification = () => {
const toast = useToast();
const { userType } = useParams<{ userType: string }>();
const { isOpen, onOpen, onClose } = useDisclosure();
const userAbbreviation = userType === "Case Manager" ? "CM" : "AD";
const userAbbreviation = userType === "Case Manager" ? "CM" : (userType === "Client" ? "CL": "AD");

const { handleRedirectResult, createCode, authenticate } = useAuthContext();
const { backend } = useBackendContext();
Expand All @@ -68,6 +68,8 @@ export const Authentification = () => {
}
else if (userType === "Admin") {
navigate("/admin-client-list");
} else if (userType === "Client") {
navigate("/choose-form");
}
} catch (error) {
// toast({
Expand Down
Loading
Loading