Updated the user card to have the corporate information
This commit is contained in:
@@ -221,7 +221,7 @@ const UserCard = ({user, onClose, onViewStudents, onViewTeachers}: Props) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{user.corporateInformation && (
|
{user.type === "corporate" && (
|
||||||
<>
|
<>
|
||||||
<Divider className="w-full" />
|
<Divider className="w-full" />
|
||||||
<div className="flex flex-col md:flex-row gap-8 w-full">
|
<div className="flex flex-col md:flex-row gap-8 w-full">
|
||||||
@@ -231,8 +231,7 @@ const UserCard = ({user, onClose, onViewStudents, onViewTeachers}: Props) => {
|
|||||||
name="companyName"
|
name="companyName"
|
||||||
onChange={() => null}
|
onChange={() => null}
|
||||||
placeholder="Enter company name"
|
placeholder="Enter company name"
|
||||||
defaultValue={user.corporateInformation.companyInformation.name}
|
defaultValue={user.corporateInformation?.companyInformation.name}
|
||||||
disabled
|
|
||||||
/>
|
/>
|
||||||
<Input
|
<Input
|
||||||
label="Amount of Users"
|
label="Amount of Users"
|
||||||
@@ -240,8 +239,7 @@ const UserCard = ({user, onClose, onViewStudents, onViewTeachers}: Props) => {
|
|||||||
name="userAmount"
|
name="userAmount"
|
||||||
onChange={() => null}
|
onChange={() => null}
|
||||||
placeholder="Enter amount of users"
|
placeholder="Enter amount of users"
|
||||||
defaultValue={user.corporateInformation.companyInformation.userAmount}
|
defaultValue={user.corporateInformation?.companyInformation.userAmount}
|
||||||
disabled
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
|||||||
Reference in New Issue
Block a user