0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00

Removed plan and billing for complimentary

no refs.
- removed the ability to change plan and billing info section from account home for members with complimentary plan
- refined copy for plan section
This commit is contained in:
Peter Zimon 2020-09-07 17:16:17 +02:00
parent 7c8e3e6f80
commit c28184263d
2 changed files with 22 additions and 11 deletions

View file

@ -17,7 +17,7 @@ export const PlanSectionStyles = `
font-size: 1.4rem;
line-height: 1.35em;
border-right: 1px solid var(--grey10);
padding: 16px;
padding: 16px 10px;
cursor: pointer;
}
@ -185,6 +185,7 @@ function PlanOptions({plans, selectedPlan, onPlanSelect}) {
planDetails.feature = 'Free preview';
break;
case 'Monthly':
case 'Complimentary':
planDetails.feature = 'Full access';
break;
case 'Yearly':

View file

@ -132,8 +132,16 @@ const PaidAccountActions = ({member, openUpdatePlan, onEditBilling}) => {
if (defaultCardLast4) {
return `**** **** **** ${defaultCardLast4}`;
}
return `Complimentary`;
};
let isComplimentary = false;
if (member && member.paid && member.subscriptions[0]) {
const {plan} = member.subscriptions[0];
if (plan.nickname === 'Complimentary') {
isComplimentary = true;
}
}
if (member.paid) {
const {subscriptions} = member;
const {
@ -145,11 +153,12 @@ const PaidAccountActions = ({member, openUpdatePlan, onEditBilling}) => {
<section>
<div className='gh-portal-list-detail'>
<h3>Plan</h3>
<p>{getPlanLabel(plan)}</p>
<p>{(isComplimentary ? 'Complimentary (' + getPlanLabel(plan) + ')' : getPlanLabel(plan))}</p>
</div>
<button className='gh-portal-btn gh-portal-btn-list' onClick={e => openUpdatePlan(e)}>Change</button>
{(!isComplimentary ? <button className='gh-portal-btn gh-portal-btn-list' onClick={e => openUpdatePlan(e)}>Change</button> : '')}
</section>
{(!isComplimentary ?
<section>
<div className='gh-portal-list-detail'>
<h3>Billing Info</h3>
@ -157,6 +166,7 @@ const PaidAccountActions = ({member, openUpdatePlan, onEditBilling}) => {
</div>
<button className='gh-portal-btn gh-portal-btn-list' onClick={e => onEditBilling(e)}>Update</button>
</section>
: '')}
</>
);
}