diff --git a/README.md b/README.md index 80af4b6..0532308 100644 --- a/README.md +++ b/README.md @@ -62,4 +62,4 @@ - [ ] Filter users in Users Modal - [ ] EditForms for Project and Ticket - [ ] Admin Page -- [ ] Use auth0 user info to create appUser account +- [x] Use auth0 user info to create appUser account diff --git a/client/src/authentication/config.json b/client/src/authentication/config.json index 4d92418..fb5e40d 100644 --- a/client/src/authentication/config.json +++ b/client/src/authentication/config.json @@ -1,4 +1,5 @@ { "domain": "dev-fyjrvohx.auth0.com", - "clientId": "NOTxfOhjCLkdvsstLm2tcS1kiAjCdWm9" + "clientId": "NOTxfOhjCLkdvsstLm2tcS1kiAjCdWm9", + "audience": "https://localhost:5001/api/V1/" } \ No newline at end of file diff --git a/client/src/components/Cards/HorizontalCard.tsx b/client/src/components/Cards/HorizontalCard.tsx index a8d5732..1199860 100644 --- a/client/src/components/Cards/HorizontalCard.tsx +++ b/client/src/components/Cards/HorizontalCard.tsx @@ -1,7 +1,13 @@ import React, { FC, ReactNode } from "react"; -import { Link } from "react-router-dom"; +import { Link as RouterLink } from "react-router-dom"; import { makeStyles } from "@material-ui/core/styles"; -import { Card, CardActions, CardContent, Typography } from "@material-ui/core"; +import { + Card, + CardActions, + CardContent, + Typography, + Link, +} from "@material-ui/core"; import ProgressBar from "../Progress/ProgressBar"; interface IProps { @@ -33,7 +39,7 @@ const HorizontalCard: FC = ({ - + {title ?? "Nothing to do"} diff --git a/client/src/components/UsersModal.tsx b/client/src/components/UsersModal.tsx deleted file mode 100644 index 4b4a971..0000000 --- a/client/src/components/UsersModal.tsx +++ /dev/null @@ -1,91 +0,0 @@ -import React, { FC, useState, ChangeEvent, FormEvent, useEffect } from "react"; -import { Modal } from "./Modal"; -import { AvatarList } from "./AvatarList"; -import { User } from "../types/User"; -import { FilterBar } from "./FilterBar"; -import { patch } from "../utils/http"; -import { Constants } from "../utils/Constants"; -import { UsersModalEntry } from "./UsersModalEntry"; -import { useParams } from "react-router-dom"; - -interface IProps { - show: boolean; - users: User[]; - allUsers: User[]; - handleClose(): void; -} - -export const UsersModal: FC = ({ - show, - handleClose, - users, - allUsers -}) => { - const [filterText, setFilterText] = useState(""); - const [members, setMembers] = useState(users); - const { id } = useParams(); - - const handleChange: (e: ChangeEvent) => void = ( - e: ChangeEvent - ) => { - setFilterText(e.target.value); - }; - - const handleSubmit: (event: FormEvent) => void = async ( - e: FormEvent - ) => { - e.preventDefault(); - await patch( - `${Constants.projectsURI}/${id}/members`, - members.map(m => m.id) - ); - handleClose(); - }; - - return ( - -
-
-

Manage users

-
-
- - close - -
-
-
- - setFilterText("")} - handleChange={handleChange} - /> -
- -
-
    - {allUsers.map((u: User) => ( -
  • - -
  • - ))} -
-
- -
-
-
- ); -};