Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated security roles page with reg date and email confirmed columns/data - 1458 #1536

Merged
merged 1 commit into from
Nov 27, 2023
Merged
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
28 changes: 24 additions & 4 deletions client/src/components/Roles.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import UserContext from "../contexts/UserContext";
import Popup from "reactjs-popup";
import "reactjs-popup/dist/index.css";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faEllipsisV } from "@fortawesome/free-solid-svg-icons";
import { faCheck, faEllipsisV } from "@fortawesome/free-solid-svg-icons";
import RolesContextMenu from "./ArchiveDelete/RolesContextMenu";

const useStyles = createUseStyles({
Expand Down Expand Up @@ -228,6 +228,12 @@ const Roles = () => {
<td className={`${classes.tdCenter} ${classes.tdheadLabel}`}>
Security Admin
</td>
<td className={`${classes.tdCenter} ${classes.tdheadLabel}`}>
Email Confirmed
</td>
<td className={`${classes.td} ${classes.tdheadLabel}`}>
Registration Date
</td>
<td className={`${classes.tdCenter} ${classes.tdheadLabel}`}>
Options
</td>
Expand All @@ -241,9 +247,9 @@ const Roles = () => {
className={hoveredRow === account.id ? classes.hoveredRow : ""}
>
<td className={classes.td}>{account.email}</td>
<td
className={classes.td}
>{`${account.lastName}, ${account.firstName}`}</td>
<td className={classes.td}>
{`${account.lastName}, ${account.firstName}`}
</td>
<td className={classes.tdCenter}>
<input
type="checkbox"
Expand All @@ -262,6 +268,20 @@ const Roles = () => {
name="isSecurityAdmin"
/>
</td>
<td className={classes.tdCenter}>
{account.emailConfirmed ? (
<FontAwesomeIcon icon={faCheck} alt="Email confirmed" />
) : (
""
)}
</td>
<td className={classes.td}>
{new Date(account.dateCreated).toLocaleDateString("en-US", {
month: "numeric",
day: "numeric",
year: "numeric"
})}
</td>
<td className={classes.tdCenter}>
<Popup
trigger={
Expand Down