2022-02-03 16:42:41 +03:00
|
|
|
|
<div class="gh-member-settings" ...attributes {{did-insert this.setup}}>
|
2021-09-13 14:10:25 +03:00
|
|
|
|
<section class="gh-main-section columns-3">
|
2022-03-01 17:57:57 +03:00
|
|
|
|
<GhMemberDetails @member={{@member}} />
|
|
|
|
|
|
|
|
|
|
<div class="gh-main-section-block span-2 mt6">
|
2021-09-13 14:10:25 +03:00
|
|
|
|
<div class="gh-main-section-content grey">
|
2021-02-09 00:30:48 +03:00
|
|
|
|
<div>
|
2021-09-13 14:10:25 +03:00
|
|
|
|
<div class="gh-cp-member-email-name">
|
|
|
|
|
<GhFormGroup @errors={{this.member.errors}} @hasValidated={{this.member.hasValidated}} @property="name" @classNames="max-width">
|
|
|
|
|
<label for="member-name">Name</label>
|
2022-03-18 19:15:42 +03:00
|
|
|
|
<GhTextInput
|
|
|
|
|
@id="member-name"
|
|
|
|
|
@name="name"
|
|
|
|
|
@value={{this.scratchMember.name}}
|
|
|
|
|
@tabindex="1"
|
|
|
|
|
@shouldFocus="{{if this.member.isNew true}}"
|
|
|
|
|
@focus-out={{fn this.setProperty "name" this.scratchMember.name}}
|
|
|
|
|
data-test-input="member-name"
|
|
|
|
|
/>
|
2022-02-02 20:09:02 +03:00
|
|
|
|
<GhErrorMessage @errors={{this.member.errors}} @property="name" />
|
2021-09-13 14:10:25 +03:00
|
|
|
|
</GhFormGroup>
|
|
|
|
|
|
|
|
|
|
<GhFormGroup @errors={{this.member.errors}} @hasValidated={{this.member.hasValidated}} @property="email" @classNames="max-width">
|
|
|
|
|
<label for="member-email">Email</label>
|
2022-03-18 19:15:42 +03:00
|
|
|
|
<GhTextInput
|
|
|
|
|
@value={{this.scratchMember.email}}
|
|
|
|
|
@id="member-email"
|
|
|
|
|
@name="email"
|
|
|
|
|
@tabindex="2"
|
|
|
|
|
@autocapitalize="off"
|
|
|
|
|
@autocorrect="off"
|
|
|
|
|
@autocomplete="off"
|
|
|
|
|
@focus-out={{fn this.setProperty "email" this.scratchMember.email}}
|
|
|
|
|
data-test-input="member-email"
|
|
|
|
|
/>
|
2021-09-13 14:10:25 +03:00
|
|
|
|
<GhErrorMessage @errors={{this.member.errors}} @property="email" />
|
|
|
|
|
</GhFormGroup>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<GhFormGroup @classNames="gh-member-labels">
|
|
|
|
|
<label for="label-input">Labels</label>
|
2022-02-08 14:48:55 +03:00
|
|
|
|
<GhMemberLabelInput
|
2022-03-18 19:15:42 +03:00
|
|
|
|
@onChange={{this.setLabels}}
|
2022-02-11 18:20:28 +03:00
|
|
|
|
@allowEdit={{true}}
|
2021-10-01 13:04:56 +03:00
|
|
|
|
@onLabelEdit={{@onLabelEdit}}
|
|
|
|
|
@labels={{this.member.labels}}
|
|
|
|
|
@triggerId="label-input"
|
|
|
|
|
data-test-input=""
|
|
|
|
|
/>
|
2021-02-09 00:30:48 +03:00
|
|
|
|
</GhFormGroup>
|
2020-12-09 16:26:00 +03:00
|
|
|
|
|
2021-09-13 14:10:25 +03:00
|
|
|
|
<GhFormGroup @errors={{this.member.errors}} @hasValidated={{this.member.hasValidated}} @property="note" @classNames="mb0 gh-member-note">
|
2022-03-01 17:57:57 +03:00
|
|
|
|
<label for="member-note">Note <span class="midgrey-d1 fw4">(not visible to member)</span></label>
|
2022-03-18 19:15:42 +03:00
|
|
|
|
<GhTextarea
|
|
|
|
|
@id="member-note"
|
|
|
|
|
@name="note"
|
|
|
|
|
@class="gh-member-details-textarea"
|
|
|
|
|
@tabindex="3"
|
|
|
|
|
@value={{this.scratchMember.note}}
|
|
|
|
|
@focus-out={{fn this.setProperty "note" this.scratchMember.note}}
|
|
|
|
|
data-test-input="member-note"
|
|
|
|
|
/>
|
2021-09-13 14:10:25 +03:00
|
|
|
|
<GhErrorMessage @errors={{this.member.errors}} @property="note" />
|
|
|
|
|
<p> Maximum: <b>500</b> characters. You’ve used
|
|
|
|
|
{{gh-count-down-characters this.scratchMember.note 500}}</p>
|
2021-02-09 00:30:48 +03:00
|
|
|
|
</GhFormGroup>
|
2022-04-25 15:10:29 +03:00
|
|
|
|
{{#if this.hasSingleNewsletter}}
|
2022-04-14 18:13:33 +03:00
|
|
|
|
{{#if (not-eq this.settings.editorDefaultEmailRecipients "disabled")}}
|
|
|
|
|
<GhFormGroup @classNames="gh-members-subscribed-checkbox mb0">
|
|
|
|
|
<div class="flex justify-between items-center">
|
|
|
|
|
<div>
|
|
|
|
|
<h4 class="gh-setting-title m">Subscribed to newsletter</h4>
|
|
|
|
|
<p class="gh-setting-desc">If disabled, member will <em>not</em> receive newsletter emails</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="for-switch">
|
|
|
|
|
<label class="switch" for="subscribed-checkbox">
|
|
|
|
|
<Input
|
|
|
|
|
@checked={{this.member.subscribed}}
|
|
|
|
|
@type="checkbox"
|
|
|
|
|
id="subscribed-checkbox"
|
|
|
|
|
name="subscribed"
|
2022-04-25 15:10:29 +03:00
|
|
|
|
{{on "click" this.updateNewsletterPreference}}
|
2022-04-14 18:13:33 +03:00
|
|
|
|
data-test-checkbox="member-subscribed"
|
|
|
|
|
/>
|
|
|
|
|
<span class="input-toggle-component"></span>
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
2022-01-28 00:40:30 +03:00
|
|
|
|
</div>
|
2022-04-14 18:13:33 +03:00
|
|
|
|
</GhFormGroup>
|
|
|
|
|
{{/if}}
|
2022-01-28 00:40:30 +03:00
|
|
|
|
{{/if}}
|
2021-02-10 20:48:27 +03:00
|
|
|
|
</div>
|
2021-09-13 14:10:25 +03:00
|
|
|
|
</div>
|
2020-12-10 14:38:38 +03:00
|
|
|
|
|
2022-04-25 15:10:29 +03:00
|
|
|
|
{{#if this.hasMultipleNewsletters}}
|
2022-04-14 17:40:04 +03:00
|
|
|
|
<Member::NewsletterPreference
|
|
|
|
|
@member={{this.member}}
|
|
|
|
|
@newsletters={{this.newslettersList}}
|
|
|
|
|
@setMemberNewsletters={{this.setMemberNewsletters}}
|
|
|
|
|
/>
|
|
|
|
|
{{/if}}
|
|
|
|
|
|
2022-05-24 17:53:03 +03:00
|
|
|
|
{{#if this.membersUtils.paidMembersEnabled}}
|
2022-03-01 17:57:57 +03:00
|
|
|
|
<h4 class="gh-main-section-header small bn">Subscriptions</h4>
|
2021-09-13 14:10:25 +03:00
|
|
|
|
|
2022-05-11 20:11:54 +03:00
|
|
|
|
{{#unless this.tiers}}
|
2022-03-01 17:57:57 +03:00
|
|
|
|
<div class="gh-main-section-content grey">
|
2022-05-11 20:11:54 +03:00
|
|
|
|
<div class="gh-cp-membertier-notier">
|
2022-03-01 17:57:57 +03:00
|
|
|
|
{{#unless this.isCreatingComplimentary}}
|
2022-03-18 19:15:42 +03:00
|
|
|
|
<div class="gh-members-no-data gh-members-no-subs">
|
|
|
|
|
<span class="lightgrey">{{svg-jar "no-data-subscription"}}</span>
|
|
|
|
|
<h4>No subscriptions</h4>
|
|
|
|
|
</div>
|
2022-03-01 17:57:57 +03:00
|
|
|
|
{{/unless}}
|
2021-09-13 14:10:25 +03:00
|
|
|
|
|
2022-03-18 19:15:42 +03:00
|
|
|
|
{{#if this.isAddComplimentaryAllowed}}
|
|
|
|
|
{{#if this.isCreatingComplimentary}}
|
|
|
|
|
<GhLoadingSpinner />
|
|
|
|
|
{{else}}
|
|
|
|
|
<button
|
|
|
|
|
type="button"
|
2022-05-11 20:11:54 +03:00
|
|
|
|
class="gh-btn gh-btn-text green gh-btn-icon gh-btn-addtier"
|
|
|
|
|
{{on "click" (toggle-action "showMemberTierModal" this)}}
|
2022-03-18 19:15:42 +03:00
|
|
|
|
data-test-button="add-complimentary"
|
|
|
|
|
>
|
2022-09-02 18:56:02 +03:00
|
|
|
|
<span>{{svg-jar "plus"}} Add complimentary subscription</span>
|
2022-03-18 19:15:42 +03:00
|
|
|
|
</button>
|
2021-09-13 14:10:25 +03:00
|
|
|
|
{{/if}}
|
2022-03-18 19:15:42 +03:00
|
|
|
|
{{/if}}
|
2022-03-01 17:57:57 +03:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{{/unless}}
|
2019-10-04 17:31:56 +03:00
|
|
|
|
|
2022-05-11 20:11:54 +03:00
|
|
|
|
{{#each this.tiers as |tier|}}
|
|
|
|
|
<div class="gh-main-section-content grey gh-member-tier-container" data-test-tier={{tier.id}}>
|
2022-09-19 11:48:24 +03:00
|
|
|
|
{{#if (feature "sourceAttribution")}}
|
|
|
|
|
<div class="gh-main-content-card gh-cp-membertier gh-cp-membertier-attribution gh-membertier-subscription {{if (gt tier.subscriptions.length 1) "multiple-subs" ""}}">
|
|
|
|
|
{{#each tier.subscriptions as |sub index|}}
|
|
|
|
|
<div class="gh-tier-card-header flex items-center">
|
|
|
|
|
<div class="gh-tier-card-price">
|
|
|
|
|
<div class="flex items-start">
|
|
|
|
|
<span class="currency-symbol">{{sub.price.currencySymbol}}</span>
|
|
|
|
|
<span class="amount">{{sub.price.nonDecimalAmount}}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="period">{{if (eq sub.price.interval "year") "yearly" "monthly"}}</div>
|
|
|
|
|
</div>
|
2022-09-22 19:16:42 +03:00
|
|
|
|
<div style="margin-left: 16px; flex-grow: 1;">
|
2022-09-19 11:48:24 +03:00
|
|
|
|
<h3 class="gh-membertier-name" data-test-text="tier-name" style="align-items:center !important; justify-content:flex-start !important;">
|
|
|
|
|
{{tier.name}}
|
|
|
|
|
{{#if (eq sub.status "canceled")}}
|
|
|
|
|
<span class="gh-badge archived" data-test-text="member-subscription-status">Cancelled</span>
|
|
|
|
|
{{else if sub.cancel_at_period_end}}
|
|
|
|
|
<span class="gh-badge archived" data-test-text="member-subscription-status">Cancelled</span>
|
|
|
|
|
{{else if sub.compExpiry}}
|
|
|
|
|
<span class="gh-badge active" data-test-text="member-subscription-status">Active</span>
|
|
|
|
|
{{else if sub.trialUntil}}
|
|
|
|
|
<span class="gh-badge active" data-test-text="member-subscription-status">Active</span>
|
|
|
|
|
{{else}}
|
|
|
|
|
<span class="gh-badge active" data-test-text="member-subscription-status">Active</span>
|
|
|
|
|
{{/if}}
|
|
|
|
|
{{#if (gt tier.subscriptions.length 1)}}
|
|
|
|
|
<span class="gh-membertier-subcount">{{tier.subscriptions.length}} subscriptions</span>
|
|
|
|
|
{{/if}}
|
|
|
|
|
</h3>
|
|
|
|
|
<div>
|
|
|
|
|
{{#if sub.trialUntil}}
|
|
|
|
|
<span class="gh-cp-membertier-pricelabel">Free trial </span>
|
|
|
|
|
{{else}}
|
|
|
|
|
{{#if (or (eq sub.price.nickname "Monthly") (eq sub.price.nickname "Yearly"))}}
|
|
|
|
|
{{else}}
|
|
|
|
|
<span class="gh-cp-membertier-pricelabel">{{sub.price.nickname}}</span><span class="gh-cp-membertier-renewal"> –</span>
|
|
|
|
|
{{/if}}
|
|
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
|
|
{{#if (eq sub.status "canceled")}}
|
|
|
|
|
<span class="gh-cp-membertier-renewal">Ended {{sub.validUntil}}</span>
|
|
|
|
|
{{else if sub.cancel_at_period_end}}
|
|
|
|
|
<span class="gh-cp-membertier-renewal">Has access until {{sub.validUntil}}</span>
|
|
|
|
|
{{else if sub.compExpiry}}
|
|
|
|
|
<span class="gh-cp-membertier-renewal">Expires {{sub.compExpiry}}</span>
|
|
|
|
|
{{else if sub.trialUntil}}
|
|
|
|
|
<span class="gh-cp-membertier-renewal">Ends {{sub.trialUntil}}</span>
|
|
|
|
|
{{else}}
|
|
|
|
|
<span class="gh-cp-membertier-renewal">Renews {{sub.validUntil}}</span>
|
|
|
|
|
{{/if}}
|
|
|
|
|
</div>
|
2022-09-22 19:16:42 +03:00
|
|
|
|
<div class="flex flex-row gh-cp-membertier-details">
|
|
|
|
|
Details {{svg-jar "arrow-right-stroke"}}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="gh-membertier-advanced" data-test-subscription={{index}}>
|
|
|
|
|
<div class="gh-membertier-details-container">
|
|
|
|
|
{{#if sub.cancellationReason}}
|
|
|
|
|
<div class="mb4">
|
|
|
|
|
<h4>Cancellation reason</h4>
|
|
|
|
|
<div class="gh-membertier-cancelreason">{{sub.cancellationReason}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
{{/if}}
|
|
|
|
|
{{#if sub.offer}}
|
|
|
|
|
{{#if (eq sub.offer.type "trial")}}
|
|
|
|
|
<div class="mb4">
|
|
|
|
|
<h4>Offer</h4>
|
|
|
|
|
<span class="gh-cp-membertier-pricelabel"> {{sub.offer.name}} </span>
|
|
|
|
|
– {{sub.offer.amount}} days free
|
|
|
|
|
</div>
|
|
|
|
|
{{else}}
|
|
|
|
|
<div class="mb4">
|
|
|
|
|
<h4>Offer</h4>
|
|
|
|
|
<span class="gh-cp-membertier-pricelabel"> {{sub.offer.name}} </span>
|
|
|
|
|
{{#if (eq sub.offer.type 'fixed')}}
|
|
|
|
|
– {{currency-symbol sub.offer.currency}}{{gh-price-amount sub.offer.amount}} off
|
|
|
|
|
{{else}}
|
|
|
|
|
– {{sub.offer.amount}}% off
|
|
|
|
|
{{/if}}
|
|
|
|
|
</div>
|
|
|
|
|
{{/if}}
|
|
|
|
|
{{/if}}
|
|
|
|
|
<div class="gh-membertier-details">
|
|
|
|
|
<div class="gh-membertier-detail">
|
|
|
|
|
<h4>Subscription Source</h4>
|
|
|
|
|
<p><span class="fw6">Twitter / Social</span></p>
|
|
|
|
|
</div>
|
|
|
|
|
{{#if (and sub.attribution sub.attribution.url sub.attribution.title)}}
|
|
|
|
|
<div class="gh-membertier-detail">
|
|
|
|
|
<h4>Subscription page</h4>
|
|
|
|
|
<a href="{{sub.attribution.url}}" target="_blank" rel="noopener noreferrer">{{ sub.attribution.title }}</a>
|
|
|
|
|
</div>
|
|
|
|
|
{{/if}}
|
|
|
|
|
<p class="gh-membertier-detail-timestamp">Created on {{sub.startDate}}</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2022-09-19 11:48:24 +03:00
|
|
|
|
</div>
|
|
|
|
|
{{#if sub.isComplimentary}}
|
|
|
|
|
<span class="action-menu">
|
|
|
|
|
<GhDropdownButton
|
|
|
|
|
@dropdownName="subscription-menu-complimentary"
|
|
|
|
|
@classNames="gh-btn gh-btn-outline gh-btn-icon fill gh-btn-subscription-action icon-only"
|
|
|
|
|
@title="Actions"
|
|
|
|
|
data-test-button="subscription-actions"
|
|
|
|
|
>
|
|
|
|
|
<span>
|
|
|
|
|
{{svg-jar "dotdotdot"}}
|
|
|
|
|
<span class="hidden">Subscription menu</span>
|
|
|
|
|
</span>
|
|
|
|
|
</GhDropdownButton>
|
|
|
|
|
<GhDropdown
|
|
|
|
|
@name="subscription-menu-complimentary"
|
|
|
|
|
@tagName="ul"
|
|
|
|
|
@classNames="tier-actions-menu dropdown-menu dropdown-align-right"
|
|
|
|
|
>
|
|
|
|
|
<li>
|
|
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
{{on "click" (fn this.removeComplimentary (or tier.id tier.tier_id))}}
|
|
|
|
|
data-test-button="remove-complimentary"
|
|
|
|
|
>
|
|
|
|
|
<span class="red">Remove complimentary subscription</span>
|
|
|
|
|
</button>
|
|
|
|
|
</li>
|
|
|
|
|
</GhDropdown>
|
|
|
|
|
</span>
|
|
|
|
|
{{else}}
|
|
|
|
|
<span class="action-menu">
|
|
|
|
|
<GhDropdownButton @dropdownName="subscription-menu-{{sub.id}}" @classNames="gh-btn gh-btn-outline gh-btn-icon fill gh-btn-subscription-action icon-only" @title="Actions">
|
|
|
|
|
<span>
|
|
|
|
|
{{svg-jar "dotdotdot"}}
|
|
|
|
|
<span class="hidden">Subscription menu</span>
|
|
|
|
|
</span>
|
|
|
|
|
</GhDropdownButton>
|
|
|
|
|
<GhDropdown @name="subscription-menu-{{sub.id}}" @tagName="ul" @classNames="tier-actions-menu dropdown-menu dropdown-align-right">
|
|
|
|
|
<li>
|
|
|
|
|
<a href="https://dashboard.stripe.com/customers/{{sub.customer.id}}" target="_blank" rel="noopener noreferrer">
|
|
|
|
|
View Stripe customer
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="divider"></li>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="https://dashboard.stripe.com/subscriptions/{{sub.id}}" target="_blank" rel="noopener noreferrer">
|
|
|
|
|
View Stripe subscription
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
{{#if (not-eq sub.status "canceled")}}
|
|
|
|
|
{{#if sub.cancel_at_period_end}}
|
|
|
|
|
<button type="button" {{on "click" (fn this.continueSubscription sub.id)}}>
|
|
|
|
|
<span>Continue subscription</span>
|
|
|
|
|
</button>
|
|
|
|
|
{{else}}
|
|
|
|
|
<button type="button" {{on "click" (fn this.cancelSubscription sub.id)}}>
|
|
|
|
|
<span class="red">Cancel subscription</span>
|
|
|
|
|
</button>
|
|
|
|
|
{{/if}}
|
|
|
|
|
{{/if}}
|
|
|
|
|
</li>
|
|
|
|
|
</GhDropdown>
|
|
|
|
|
</span>
|
|
|
|
|
{{/if}}
|
|
|
|
|
</div>
|
|
|
|
|
{{/each}}
|
|
|
|
|
|
|
|
|
|
{{#if (eq tier.subscriptions.length 0)}}
|
|
|
|
|
<div class="gh-membertier-subscription">
|
|
|
|
|
<div>
|
|
|
|
|
<div>
|
|
|
|
|
<span class="gh-cp-membertier-pricelabel">Complimentary</span>
|
|
|
|
|
<span class="gh-badge active">Active</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="gh-membertier-created">Created on</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="flex items-center">
|
|
|
|
|
<div class="gh-tier-card-price">
|
|
|
|
|
<div class="flex items-start">
|
|
|
|
|
<span class="currency-symbol">$</span>
|
|
|
|
|
<span class="amount">0</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="period">yearly</div>
|
|
|
|
|
</div>
|
|
|
|
|
<span class="action-menu">
|
|
|
|
|
<GhDropdownButton @dropdownName="subscription-menu-complimentary" @classNames="gh-btn gh-btn-outline gh-btn-icon fill gh-btn-subscription-action icon-only" @title="Actions">
|
|
|
|
|
<span>
|
|
|
|
|
{{svg-jar "dotdotdot"}}
|
|
|
|
|
<span class="hidden">Subscription menu</span>
|
|
|
|
|
</span>
|
|
|
|
|
</GhDropdownButton>
|
|
|
|
|
<GhDropdown @name="subscription-menu-complimentary" @tagName="ul" @classNames="tier-actions-menu dropdown-menu dropdown-align-right">
|
|
|
|
|
<li>
|
|
|
|
|
<button type="button" {{on "click" (fn this.removeComplimentary tier.id)}}>
|
|
|
|
|
<span class="red">Remove complimentary subscription</span>
|
|
|
|
|
</button>
|
|
|
|
|
</li>
|
|
|
|
|
</GhDropdown>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{{/if}}
|
|
|
|
|
</div>
|
|
|
|
|
{{else}}
|
2022-05-11 20:11:54 +03:00
|
|
|
|
<div class="gh-main-content-card gh-cp-membertier {{if (gt tier.subscriptions.length 1) "multiple-subs" ""}}">
|
|
|
|
|
<h3 class="gh-membertier-name" data-test-text="tier-name">
|
|
|
|
|
{{tier.name}}
|
|
|
|
|
{{#if (gt tier.subscriptions.length 1)}}
|
|
|
|
|
<span class="gh-membertier-subcount">{{tier.subscriptions.length}} subscriptions</span>
|
2022-03-01 17:57:57 +03:00
|
|
|
|
{{/if}}
|
|
|
|
|
</h3>
|
2021-02-10 20:48:27 +03:00
|
|
|
|
|
2022-05-11 20:11:54 +03:00
|
|
|
|
{{#each tier.subscriptions as |sub index|}}
|
|
|
|
|
<div class="gh-membertier-subscription" data-test-subscription={{index}}>
|
2022-08-24 18:53:38 +03:00
|
|
|
|
<div class="gh-membertier-details-container">
|
2021-10-20 22:00:22 +03:00
|
|
|
|
<div>
|
2022-08-09 16:49:54 +03:00
|
|
|
|
{{#if sub.trialUntil}}
|
2022-08-11 15:30:22 +03:00
|
|
|
|
<span class="gh-cp-membertier-pricelabel">Free trial</span>
|
2022-08-09 16:49:54 +03:00
|
|
|
|
{{else}}
|
|
|
|
|
<span class="gh-cp-membertier-pricelabel">{{sub.price.nickname}}</span>
|
|
|
|
|
{{/if}}
|
|
|
|
|
|
2022-03-01 17:57:57 +03:00
|
|
|
|
–
|
2022-03-18 19:15:42 +03:00
|
|
|
|
{{#if (eq sub.status "canceled")}}
|
2022-05-11 20:11:54 +03:00
|
|
|
|
<span class="gh-cp-membertier-renewal">Ended {{sub.validUntil}}</span>
|
2022-03-18 19:15:42 +03:00
|
|
|
|
<span class="gh-badge archived" data-test-text="member-subscription-status">Cancelled</span>
|
|
|
|
|
{{else if sub.cancel_at_period_end}}
|
2022-05-11 20:11:54 +03:00
|
|
|
|
<span class="gh-cp-membertier-renewal">Has access until {{sub.validUntil}}</span>
|
2022-03-18 19:15:42 +03:00
|
|
|
|
<span class="gh-badge archived" data-test-text="member-subscription-status">Cancelled</span>
|
2022-08-19 14:17:55 +03:00
|
|
|
|
{{else if sub.compExpiry}}
|
|
|
|
|
<span class="gh-cp-membertier-renewal">Expires {{sub.compExpiry}}</span>
|
|
|
|
|
<span class="gh-badge active" data-test-text="member-subscription-status">Active</span>
|
2022-08-11 13:17:26 +03:00
|
|
|
|
{{else if sub.trialUntil}}
|
2022-08-19 23:39:18 +03:00
|
|
|
|
<span class="gh-cp-membertier-renewal">Ends {{sub.trialUntil}}</span>
|
|
|
|
|
<span class="gh-badge active" data-test-text="member-subscription-status">Active</span>
|
2021-10-20 22:00:22 +03:00
|
|
|
|
{{else}}
|
2022-05-11 20:11:54 +03:00
|
|
|
|
<span class="gh-cp-membertier-renewal">Renews {{sub.validUntil}}</span>
|
2022-03-18 19:15:42 +03:00
|
|
|
|
<span class="gh-badge active" data-test-text="member-subscription-status">Active</span>
|
2021-10-20 22:00:22 +03:00
|
|
|
|
{{/if}}
|
2021-10-21 14:43:12 +03:00
|
|
|
|
</div>
|
2022-03-01 17:57:57 +03:00
|
|
|
|
{{#if sub.cancellationReason}}
|
2022-05-11 20:11:54 +03:00
|
|
|
|
<div class="gh-membertier-cancelreason"><span class="fw6">Cancellation reason:</span> {{sub.cancellationReason}}</div>
|
2022-03-01 17:57:57 +03:00
|
|
|
|
{{/if}}
|
|
|
|
|
{{#if sub.offer}}
|
2022-08-10 15:30:11 +03:00
|
|
|
|
{{#if (eq sub.offer.type "trial")}}
|
|
|
|
|
<div>
|
|
|
|
|
<span class="gh-cp-membertier-pricelabel"> {{sub.offer.name}} </span>
|
|
|
|
|
offer
|
|
|
|
|
({{sub.offer.amount}} days free)
|
|
|
|
|
</div>
|
|
|
|
|
{{else}}
|
|
|
|
|
<div>
|
|
|
|
|
<span class="gh-cp-membertier-pricelabel"> {{sub.offer.name}} </span>
|
|
|
|
|
offer
|
|
|
|
|
{{#if (eq sub.offer.type 'fixed')}}
|
|
|
|
|
({{currency-symbol sub.offer.currency}}{{gh-price-amount sub.offer.amount}} off)
|
|
|
|
|
{{else}}
|
|
|
|
|
({{sub.offer.amount}}% off)
|
|
|
|
|
{{/if}}
|
|
|
|
|
applied to subscription
|
|
|
|
|
</div>
|
|
|
|
|
{{/if}}
|
2022-03-01 17:57:57 +03:00
|
|
|
|
{{/if}}
|
2022-08-24 18:53:38 +03:00
|
|
|
|
<div class="gh-membertier-details">
|
2022-08-19 23:39:18 +03:00
|
|
|
|
<span class="gh-membertier-created">Created on {{sub.startDate}}</span>
|
|
|
|
|
{{#if (and sub.attribution sub.attribution.url sub.attribution.title) }}
|
|
|
|
|
<span class="gh-membertier-separator">·</span>
|
2022-08-25 12:47:06 +03:00
|
|
|
|
<span class="gh-membertier-started">Subscribed on <a href="{{sub.attribution.url}}" target="_blank" rel="noopener noreferrer">{{ sub.attribution.title }}</a></span>
|
2022-08-19 23:39:18 +03:00
|
|
|
|
{{/if}}
|
2022-03-01 17:57:57 +03:00
|
|
|
|
</div>
|
2021-10-21 14:43:12 +03:00
|
|
|
|
</div>
|
2021-09-13 14:10:25 +03:00
|
|
|
|
|
2022-05-11 20:11:54 +03:00
|
|
|
|
<div class="gh-membertier-price-container">
|
|
|
|
|
<div class="gh-tier-card-price">
|
2022-03-01 17:57:57 +03:00
|
|
|
|
<div class="flex items-start">
|
|
|
|
|
<span class="currency-symbol">{{sub.price.currencySymbol}}</span>
|
|
|
|
|
<span class="amount">{{sub.price.nonDecimalAmount}}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="period">{{if (eq sub.price.interval "year") "yearly" "monthly"}}</div>
|
2021-02-10 20:48:27 +03:00
|
|
|
|
</div>
|
2022-03-18 19:15:42 +03:00
|
|
|
|
|
2022-03-01 17:57:57 +03:00
|
|
|
|
{{#if sub.isComplimentary}}
|
|
|
|
|
<span class="action-menu">
|
2022-03-18 19:15:42 +03:00
|
|
|
|
<GhDropdownButton
|
|
|
|
|
@dropdownName="subscription-menu-complimentary"
|
2022-09-02 18:56:02 +03:00
|
|
|
|
@classNames="gh-btn gh-btn-outline gh-btn-icon fill gh-btn-subscription-action icon-only"
|
2022-03-18 19:15:42 +03:00
|
|
|
|
@title="Actions"
|
|
|
|
|
data-test-button="subscription-actions"
|
|
|
|
|
>
|
2022-03-01 17:57:57 +03:00
|
|
|
|
<span>
|
|
|
|
|
{{svg-jar "dotdotdot"}}
|
|
|
|
|
<span class="hidden">Subscription menu</span>
|
|
|
|
|
</span>
|
|
|
|
|
</GhDropdownButton>
|
2022-03-18 19:15:42 +03:00
|
|
|
|
<GhDropdown
|
|
|
|
|
@name="subscription-menu-complimentary"
|
|
|
|
|
@tagName="ul"
|
2022-05-11 20:11:54 +03:00
|
|
|
|
@classNames="tier-actions-menu dropdown-menu dropdown-align-right"
|
2022-03-18 19:15:42 +03:00
|
|
|
|
>
|
2022-03-01 17:57:57 +03:00
|
|
|
|
<li>
|
2022-03-18 19:15:42 +03:00
|
|
|
|
<button
|
|
|
|
|
type="button"
|
2022-05-11 20:11:54 +03:00
|
|
|
|
{{on "click" (fn this.removeComplimentary (or tier.id tier.tier_id))}}
|
2022-03-18 19:15:42 +03:00
|
|
|
|
data-test-button="remove-complimentary"
|
|
|
|
|
>
|
2022-03-01 17:57:57 +03:00
|
|
|
|
<span class="red">Remove complimentary subscription</span>
|
|
|
|
|
</button>
|
|
|
|
|
</li>
|
|
|
|
|
</GhDropdown>
|
|
|
|
|
</span>
|
|
|
|
|
{{else}}
|
|
|
|
|
<span class="action-menu">
|
2022-09-02 18:56:02 +03:00
|
|
|
|
<GhDropdownButton @dropdownName="subscription-menu-{{sub.id}}" @classNames="gh-btn gh-btn-outline gh-btn-icon fill gh-btn-subscription-action icon-only" @title="Actions">
|
2022-03-01 17:57:57 +03:00
|
|
|
|
<span>
|
|
|
|
|
{{svg-jar "dotdotdot"}}
|
|
|
|
|
<span class="hidden">Subscription menu</span>
|
|
|
|
|
</span>
|
|
|
|
|
</GhDropdownButton>
|
2022-05-11 20:11:54 +03:00
|
|
|
|
<GhDropdown @name="subscription-menu-{{sub.id}}" @tagName="ul" @classNames="tier-actions-menu dropdown-menu dropdown-align-right">
|
2022-03-01 17:57:57 +03:00
|
|
|
|
<li>
|
|
|
|
|
<a href="https://dashboard.stripe.com/customers/{{sub.customer.id}}" target="_blank" rel="noopener noreferrer">
|
|
|
|
|
View Stripe customer
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="divider"></li>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="https://dashboard.stripe.com/subscriptions/{{sub.id}}" target="_blank" rel="noopener noreferrer">
|
|
|
|
|
View Stripe subscription
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
2022-03-18 19:15:42 +03:00
|
|
|
|
{{#if (not-eq sub.status "canceled")}}
|
|
|
|
|
{{#if sub.cancel_at_period_end}}
|
|
|
|
|
<button type="button" {{on "click" (fn this.continueSubscription sub.id)}}>
|
|
|
|
|
<span>Continue subscription</span>
|
|
|
|
|
</button>
|
|
|
|
|
{{else}}
|
|
|
|
|
<button type="button" {{on "click" (fn this.cancelSubscription sub.id)}}>
|
|
|
|
|
<span class="red">Cancel subscription</span>
|
|
|
|
|
</button>
|
|
|
|
|
{{/if}}
|
2022-03-01 17:57:57 +03:00
|
|
|
|
{{/if}}
|
|
|
|
|
</li>
|
|
|
|
|
</GhDropdown>
|
|
|
|
|
</span>
|
|
|
|
|
{{/if}}
|
|
|
|
|
</div>
|
2021-09-13 14:10:25 +03:00
|
|
|
|
</div>
|
2022-03-01 17:57:57 +03:00
|
|
|
|
{{/each}}
|
2021-02-10 20:48:27 +03:00
|
|
|
|
|
2022-05-11 20:11:54 +03:00
|
|
|
|
{{#if (eq tier.subscriptions.length 0)}}
|
|
|
|
|
<div class="gh-membertier-subscription">
|
2022-03-01 17:57:57 +03:00
|
|
|
|
<div>
|
2022-03-18 19:15:42 +03:00
|
|
|
|
<div>
|
2022-05-11 20:11:54 +03:00
|
|
|
|
<span class="gh-cp-membertier-pricelabel">Complimentary</span>
|
2022-03-18 19:15:42 +03:00
|
|
|
|
<span class="gh-badge active">Active</span>
|
|
|
|
|
</div>
|
2022-05-11 20:11:54 +03:00
|
|
|
|
<div class="gh-membertier-created">Created on</div>
|
2022-03-01 17:57:57 +03:00
|
|
|
|
</div>
|
2022-03-18 19:15:42 +03:00
|
|
|
|
<div class="flex items-center">
|
2022-05-11 20:11:54 +03:00
|
|
|
|
<div class="gh-tier-card-price">
|
2022-03-18 19:15:42 +03:00
|
|
|
|
<div class="flex items-start">
|
|
|
|
|
<span class="currency-symbol">$</span>
|
|
|
|
|
<span class="amount">0</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="period">yearly</div>
|
2022-03-01 17:57:57 +03:00
|
|
|
|
</div>
|
2022-03-18 19:15:42 +03:00
|
|
|
|
<span class="action-menu">
|
2022-09-02 18:56:02 +03:00
|
|
|
|
<GhDropdownButton @dropdownName="subscription-menu-complimentary" @classNames="gh-btn gh-btn-outline gh-btn-icon fill gh-btn-subscription-action icon-only" @title="Actions">
|
2022-03-18 19:15:42 +03:00
|
|
|
|
<span>
|
|
|
|
|
{{svg-jar "dotdotdot"}}
|
|
|
|
|
<span class="hidden">Subscription menu</span>
|
|
|
|
|
</span>
|
|
|
|
|
</GhDropdownButton>
|
2022-05-11 20:11:54 +03:00
|
|
|
|
<GhDropdown @name="subscription-menu-complimentary" @tagName="ul" @classNames="tier-actions-menu dropdown-menu dropdown-align-right">
|
2022-03-18 19:15:42 +03:00
|
|
|
|
<li>
|
2022-05-11 20:11:54 +03:00
|
|
|
|
<button type="button" {{on "click" (fn this.removeComplimentary tier.id)}}>
|
2022-03-18 19:15:42 +03:00
|
|
|
|
<span class="red">Remove complimentary subscription</span>
|
|
|
|
|
</button>
|
|
|
|
|
</li>
|
|
|
|
|
</GhDropdown>
|
|
|
|
|
</span>
|
2021-02-10 20:48:27 +03:00
|
|
|
|
</div>
|
2021-09-13 14:10:25 +03:00
|
|
|
|
</div>
|
|
|
|
|
{{/if}}
|
2022-01-27 14:40:11 +03:00
|
|
|
|
</div>
|
2022-09-19 11:48:24 +03:00
|
|
|
|
{{/if}}
|
2022-03-01 17:57:57 +03:00
|
|
|
|
</div>
|
|
|
|
|
{{/each}}
|
2022-03-18 19:15:42 +03:00
|
|
|
|
|
2022-05-11 20:11:54 +03:00
|
|
|
|
{{#if (and this.tiers this.isAddComplimentaryAllowed)}}
|
|
|
|
|
<div class="gh-membertier-list-footer {{if this.isCreatingComplimentary "min-height" ""}}">
|
2022-03-18 19:15:42 +03:00
|
|
|
|
{{#if this.isCreatingComplimentary}}
|
|
|
|
|
<GhLoadingSpinner />
|
|
|
|
|
{{else}}
|
|
|
|
|
<button
|
|
|
|
|
type="button"
|
2022-05-11 20:11:54 +03:00
|
|
|
|
class="gh-btn gh-btn-text green gh-btn-icon gh-btn-addtier"
|
|
|
|
|
{{on "click" (toggle-action "showMemberTierModal" this)}}
|
2022-03-18 19:15:42 +03:00
|
|
|
|
data-test-button="add-complimentary"
|
|
|
|
|
>
|
2022-09-02 18:56:02 +03:00
|
|
|
|
<span>{{svg-jar "plus"}} Add complimentary subscription</span>
|
2022-03-18 19:15:42 +03:00
|
|
|
|
</button>
|
|
|
|
|
{{/if}}
|
|
|
|
|
</div>
|
2022-03-01 17:57:57 +03:00
|
|
|
|
{{/if}}
|
2022-01-27 14:40:11 +03:00
|
|
|
|
{{/if}}
|
2021-09-13 14:10:25 +03:00
|
|
|
|
|
2022-03-30 14:43:52 +03:00
|
|
|
|
<Member::ActivityFeed @member={{this.member}} />
|
2021-02-10 20:48:27 +03:00
|
|
|
|
</div>
|
2022-03-01 17:57:57 +03:00
|
|
|
|
|
2021-02-10 20:48:27 +03:00
|
|
|
|
</section>
|
2021-09-13 14:10:25 +03:00
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
2022-05-11 20:11:54 +03:00
|
|
|
|
{{#if this.showMemberTierModal}}
|
|
|
|
|
<GhFullscreenModal @modifier="action wide member-tier">
|
|
|
|
|
<ModalMemberTier
|
2021-09-13 14:10:25 +03:00
|
|
|
|
@model={{this.member}}
|
2022-05-11 20:11:54 +03:00
|
|
|
|
@confirm={{this.addTier}}
|
|
|
|
|
@closeModal={{this.closeMemberTierModal}} />
|
2021-09-13 14:10:25 +03:00
|
|
|
|
</GhFullscreenModal>
|
|
|
|
|
{{/if}}
|