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:
parent
7c8e3e6f80
commit
c28184263d
2 changed files with 22 additions and 11 deletions
|
@ -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':
|
||||
|
|
|
@ -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,18 +153,20 @@ 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>
|
||||
|
||||
<section>
|
||||
<div className='gh-portal-list-detail'>
|
||||
<h3>Billing Info</h3>
|
||||
<p>{getCardLabel({defaultCardLast4})}</p>
|
||||
</div>
|
||||
<button className='gh-portal-btn gh-portal-btn-list' onClick={e => onEditBilling(e)}>Update</button>
|
||||
</section>
|
||||
{(!isComplimentary ?
|
||||
<section>
|
||||
<div className='gh-portal-list-detail'>
|
||||
<h3>Billing Info</h3>
|
||||
<p>{getCardLabel({defaultCardLast4})}</p>
|
||||
</div>
|
||||
<button className='gh-portal-btn gh-portal-btn-list' onClick={e => onEditBilling(e)}>Update</button>
|
||||
</section>
|
||||
: '')}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue