This will become a problem when we merge MuckRock/documentcloud#355
A child org may not have their own plan, but their parent does. We don't correctly show that they have a credit balance inherited from their parent.
We should either show them the balance as if it was their own plan and not show the upgrade button
or
Show them the upgrade button AND show them their balance but state that this is inherited from the parent org.
Determining whether an org is premium or not is done here:
|
export function isPremiumOrg(org?: Nullable<Org>): boolean { |
and the logic for setting the org bar is here
|
{#if isPremium && active_org.monthly_credits && active_org.credit_reset_date} |
This will become a problem when we merge MuckRock/documentcloud#355
A child org may not have their own plan, but their parent does. We don't correctly show that they have a credit balance inherited from their parent.
We should either show them the balance as if it was their own plan and not show the upgrade button
or
Show them the upgrade button AND show them their balance but state that this is inherited from the parent org.
Determining whether an org is premium or not is done here:
documentcloud-frontend/src/lib/api/accounts.ts
Line 118 in 0091f0c
and the logic for setting the org bar is here
documentcloud-frontend/src/lib/components/navigation/OrgMenu.svelte
Line 100 in 0091f0c