Extracted the user types

This commit is contained in:
Tiago Ribeiro
2023-11-27 11:35:04 +00:00
parent facac33a89
commit 5f76e430af
5 changed files with 55 additions and 74 deletions

View File

@@ -94,7 +94,7 @@ export default function PaymentDue({user, hasExpired = false, clientID, reload}:
</div>
</div>
)}
{!isIndividual() && user?.corporateInformation && user?.corporateInformation.payment && (
{!isIndividual() && user.type === "corporate" && user?.corporateInformation.payment && (
<div className="flex flex-col items-center">
<span className="max-w-lg">
To add to your use of EnCoach and that of your students and teachers, please pay your designated package below:
@@ -138,14 +138,25 @@ export default function PaymentDue({user, hasExpired = false, clientID, reload}:
</div>
</div>
)}
{!isIndividual() && (!user?.corporateInformation || !user?.corporateInformation?.payment) && (
{!isIndividual() && user.type !== "corporate" && (
<div className="flex flex-col items-center">
<span className="max-w-lg">
You are not the person in charge of your time credits, please contact your administrator about this situation.
</span>
<span className="max-w-lg">
If you believe this to be a mistake, please contact the platform&apos;s administration, thank you for your
patience.
</span>
</div>
)}
{!isIndividual() && user.type === "corporate" && !user.corporateInformation.payment && (
<div className="flex flex-col items-center">
<span className="max-w-lg">
An admin nor your agent have yet set the price intended to your requirements in terms of the amount of users you
desire and your expected monthly duration.
</span>
<span className="max-w-lg">
Please try again again later or contact your agent or an admin, thank you for your patience.
Please try again later or contact your agent or an admin, thank you for your patience.
</span>
</div>
)}