Name | -Deactivate | -|||
---|---|---|---|---|
{account.firstName} {account.lastName} | -{account.email} | -- - | -
Name | +Deactivate | + {checkedAccountIds.length > 0 && ++ + | + } +||
---|---|---|---|---|
+ |
+ {account.firstName} {account.lastName} | +{account.email} | + {checkedAccountIds.length > 0 && +} - |
Name | -Action | +Name | +Action | + {checkedAccountIds.length > 0 && ++ + + | + }||||
---|---|---|---|---|---|---|---|---|
{account.firstName} {account.lastName} | -{account.email} | -- - + | ||||||
{account.firstName} {account.lastName} | +{account.email} | + {checkedAccountIds.length > 0 && ++ } + { + accountStatus[account.id] === "pending" ? ( + | + + | -Approved | + ) : ( +Declined | + ) + } + ) ) } @@ -69,6 +191,7 @@ const PendingAccounts = ( {accountType} ) => { PendingAccounts.propTypes = { accountType: PropTypes.string.isRequired, + setHasPendingAccounts: PropTypes.func.isRequired }; -export default PendingAccounts; \ No newline at end of file +export default PendingAccounts; diff --git a/src/components/Authentication/SignUp.jsx b/src/components/Authentication/SignUp.jsx index 95a1c98..5b9168c 100644 --- a/src/components/Authentication/SignUp.jsx +++ b/src/components/Authentication/SignUp.jsx @@ -6,7 +6,7 @@ import emailtemplate from '../EmailTemplates/emailtemplate'; import { Box, Heading, Text, FormControl, Button, Center, Link, Input, Alert, AlertDescription } from '@chakra-ui/react'; import AUTH_ROLES from '../../utils/auth_config'; -const { USER_ROLE } = AUTH_ROLES.AUTH_ROLES; +const { ADMIN_ROLE, USER_ROLE } = AUTH_ROLES.AUTH_ROLES; const SignUp = () => { const [firstName, setFirstName] = useState(); @@ -45,7 +45,7 @@ const SignUp = () => { } // register email and password - await registerWithEmailAndPassword(email, password, USER_ROLE, navigate, '/awaitConfirmation', firstName, lastName); + await registerWithEmailAndPassword(email, password, userType, navigate, '/awaitConfirmation', firstName, lastName); // send email to Debbie const subject = "New User Created Account"; @@ -86,7 +86,7 @@ const SignUp = () => { }} >