Allow Master Corporate to pay for their subscription
This commit is contained in:
@@ -160,15 +160,20 @@ export default function PaymentDue({user, hasExpired = false, reload}: Props) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{!isIndividual() && user.type === "corporate" && user?.corporateInformation.payment && (
|
{!isIndividual() &&
|
||||||
|
(user?.type === "corporate" || user?.type === "mastercorporate") &&
|
||||||
|
user?.corporateInformation.payment && (
|
||||||
<div className="flex flex-col items-center">
|
<div className="flex flex-col items-center">
|
||||||
<span className="max-w-lg">
|
<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:
|
To add to your use of EnCoach and that of your students and teachers, please pay your designated package
|
||||||
|
below:
|
||||||
</span>
|
</span>
|
||||||
<div className={clsx("flex flex-col items-start gap-6 rounded-xl bg-white p-4")}>
|
<div className={clsx("flex flex-col items-start gap-6 rounded-xl bg-white p-4")}>
|
||||||
<div className="mb-2 flex flex-col items-start">
|
<div className="mb-2 flex flex-col items-start">
|
||||||
<img src="/logo_title.png" alt="EnCoach's Logo" className="w-32" />
|
<img src="/logo_title.png" alt="EnCoach's Logo" className="w-32" />
|
||||||
<span className="text-xl font-semibold">EnCoach - {user.corporateInformation?.monthlyDuration} Months</span>
|
<span className="text-xl font-semibold">
|
||||||
|
EnCoach - {user.corporateInformation?.monthlyDuration} Months
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex w-full flex-col items-start gap-2">
|
<div className="flex w-full flex-col items-start gap-2">
|
||||||
<span className="text-2xl">
|
<span className="text-2xl">
|
||||||
@@ -191,8 +196,8 @@ export default function PaymentDue({user, hasExpired = false, reload}: Props) {
|
|||||||
<span>This includes:</span>
|
<span>This includes:</span>
|
||||||
<ul className="flex flex-col items-start text-sm">
|
<ul className="flex flex-col items-start text-sm">
|
||||||
<li>
|
<li>
|
||||||
- Allow a total of {user.corporateInformation.companyInformation.userAmount} students and teachers to
|
- Allow a total of {user.corporateInformation.companyInformation.userAmount} students and teachers
|
||||||
use EnCoach
|
to use EnCoach
|
||||||
</li>
|
</li>
|
||||||
<li>- Train their abilities for the IELTS exam</li>
|
<li>- Train their abilities for the IELTS exam</li>
|
||||||
<li>- Gain insights into your students' weaknesses and strengths</li>
|
<li>- Gain insights into your students' weaknesses and strengths</li>
|
||||||
@@ -202,7 +207,7 @@ export default function PaymentDue({user, hasExpired = false, reload}: Props) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{!isIndividual() && user.type !== "corporate" && (
|
{!isIndividual() && !(user?.type === "corporate" || user?.type === "mastercorporate") && (
|
||||||
<div className="flex flex-col items-center">
|
<div className="flex flex-col items-center">
|
||||||
<span className="max-w-lg">
|
<span className="max-w-lg">
|
||||||
You are not the person in charge of your time credits, please contact your administrator about this situation.
|
You are not the person in charge of your time credits, please contact your administrator about this situation.
|
||||||
@@ -213,11 +218,13 @@ export default function PaymentDue({user, hasExpired = false, reload}: Props) {
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{!isIndividual() && user.type === "corporate" && !user.corporateInformation.payment && (
|
{!isIndividual() &&
|
||||||
|
(user?.type === "corporate" || user?.type === "mastercorporate") &&
|
||||||
|
!user.corporateInformation.payment && (
|
||||||
<div className="flex flex-col items-center">
|
<div className="flex flex-col items-center">
|
||||||
<span className="max-w-lg">
|
<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
|
An admin nor your agent have yet set the price intended to your requirements in terms of the amount of users
|
||||||
desire and your expected monthly duration.
|
you desire and your expected monthly duration.
|
||||||
</span>
|
</span>
|
||||||
<span className="max-w-lg">
|
<span className="max-w-lg">
|
||||||
Please try 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.
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export const propagateStatusChange = (userId: string, status: UserStatus) =>
|
|||||||
const user = docUser.data() as User;
|
const user = docUser.data() as User;
|
||||||
|
|
||||||
// only update the status of the user's groups if the user is a corporate user
|
// only update the status of the user's groups if the user is a corporate user
|
||||||
if (user.type === "corporate") {
|
if (user.type === "corporate" || user.type === "mastercorporate") {
|
||||||
getDocs(query(collection(db, "groups"), where("admin", "==", userId))).then(async (userGroupsRef) => {
|
getDocs(query(collection(db, "groups"), where("admin", "==", userId))).then(async (userGroupsRef) => {
|
||||||
const userGroups = userGroupsRef.docs.map((x) => x.data());
|
const userGroups = userGroupsRef.docs.map((x) => x.data());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user