Added the ability for Corporate accounts to register without codes

This commit is contained in:
Tiago Ribeiro
2023-10-29 14:38:46 +00:00
parent 6e31a05f21
commit a20b980adb
9 changed files with 98 additions and 23 deletions

View File

@@ -47,6 +47,13 @@ export default function RegisterCorporate({isLoading, setIsLoading, mutateUser,
password,
type: "corporate",
profilePicture: "/defaultAvatar.png",
corporateInformation: {
companyInformation: {
name: companyName,
userAmount: companyUsers,
},
allowedUserAmount: companyUsers,
},
})
.then((response) => {
mutateUser(response.data.user).then(() => sendEmailVerification(setIsLoading, onSuccess, onError));
@@ -114,7 +121,9 @@ export default function RegisterCorporate({isLoading, setIsLoading, mutateUser,
<Button
className="lg:mt-8 w-full"
color="purple"
disabled={isLoading || !email || !name || !password || !confirmPassword || password !== confirmPassword}>
disabled={
isLoading || !email || !name || !password || !confirmPassword || password !== confirmPassword || !companyName || companyUsers <= 0
}>
Create account
</Button>
</form>