Merge branch 'develop' into faeture/payment-history

This commit is contained in:
Tiago Ribeiro
2023-12-04 16:01:30 +00:00
9 changed files with 309 additions and 21 deletions

View File

@@ -35,9 +35,10 @@ interface Props {
onClose: (reload?: boolean) => void;
onViewStudents?: () => void;
onViewTeachers?: () => void;
onViewCorporate?: () => void;
}
const UserCard = ({user, loggedInUser, onClose, onViewStudents, onViewTeachers}: Props) => {
const UserCard = ({user, loggedInUser, onClose, onViewStudents, onViewTeachers, onViewCorporate}: Props) => {
const [expiryDate, setExpiryDate] = useState<Date | null | undefined>(user.subscriptionExpirationDate);
const [type, setType] = useState(user.type);
const [status, setStatus] = useState(user.status);
@@ -456,6 +457,11 @@ const UserCard = ({user, loggedInUser, onClose, onViewStudents, onViewTeachers}:
<div className="flex gap-4 justify-between mt-4 w-full">
<div className="self-start flex gap-4 justify-start items-center w-full">
{onViewCorporate && (
<Button className="w-full max-w-[200px]" variant="outline" color="rose" onClick={onViewCorporate}>
View Corporate
</Button>
)}
{onViewStudents && (
<Button className="w-full max-w-[200px]" variant="outline" color="rose" onClick={onViewStudents}>
View Students