2020-02-14 12:34:01 +03:00
|
|
|
|
<div class="flex items-stretch mt2">
|
|
|
|
|
<div class="flex-auto br4 shadow-1 bg-grouped-table mt2 flex flex-column justify-between items-stretch gh-member-settings-primary mr6">
|
2020-12-09 16:26:00 +03:00
|
|
|
|
<div>
|
|
|
|
|
<div class="flex items-center pa5 pb3 pt6">
|
|
|
|
|
{{#if (or this.member.name this.member.email)}}
|
|
|
|
|
<GhMemberAvatar
|
|
|
|
|
@member={{this.member}}
|
|
|
|
|
@sizeClass={{if this.member.name 'f-subheadline fw4 lh-zero tracked-1' 'f-headline fw4 lh-zero tracked-1'}}
|
|
|
|
|
@containerClass="w20 h20 mr4 gh-member-detail-avatar"
|
|
|
|
|
/>
|
|
|
|
|
{{else}}
|
|
|
|
|
<div class="flex items-center justify-center br-100 w18 h18 mr4 gh-new-member-avatar">
|
|
|
|
|
<span class="gh-member-avatar-label f-subheadline fw4 lh-zero tracked-1">N</span>
|
|
|
|
|
</div>
|
|
|
|
|
{{/if}}
|
|
|
|
|
<div>
|
|
|
|
|
<h3 class="f2 fw6 ma0 pa0">
|
|
|
|
|
{{or this.member.name this.member.email}}
|
|
|
|
|
</h3>
|
|
|
|
|
<p class="f7 pa0 ma0 midlightgrey-d1">
|
|
|
|
|
{{#if (and this.member.name this.member.email)}}
|
2020-12-09 19:23:25 +03:00
|
|
|
|
<a href="mailto:{{this.member.email}}" class="darkgrey fw5">{{this.member.email}}</a>
|
2020-12-09 16:26:00 +03:00
|
|
|
|
{{/if}}
|
|
|
|
|
</p>
|
|
|
|
|
{{#unless this.member.isNew}}
|
|
|
|
|
<p class="f7 pa0 ma0 midgrey-d1 {{if this.member.name "nudge-bottom--2"}}">
|
|
|
|
|
{{#if this.member.geolocation}}
|
|
|
|
|
{{#if (eq this.member.geolocation.country_code "US")}}
|
|
|
|
|
{{this.member.geolocation.region}}, US
|
|
|
|
|
{{else}}
|
|
|
|
|
{{this.member.geolocation.country}}
|
|
|
|
|
{{/if}}
|
|
|
|
|
{{else}}
|
|
|
|
|
Unknown location
|
|
|
|
|
{{/if}}
|
|
|
|
|
– Created on {{moment-format @member.createdAtUTC "D MMM YYYY"}}
|
|
|
|
|
</p>
|
|
|
|
|
{{/unless}}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2019-11-28 14:30:21 +03:00
|
|
|
|
|
2020-12-09 16:26:00 +03:00
|
|
|
|
<div class="flex mb5 pa5 pt3 pb5 bb b--whitegrey">
|
|
|
|
|
<div class="flex-auto flex flex-column justify-center items-start">
|
|
|
|
|
<div class="f7 midgrey-d1">Emails received</div>
|
|
|
|
|
<div class="f2 fw6">{{@member.emailCount}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="flex-auto flex flex-column justify-center items-start">
|
|
|
|
|
<div class="f7 midgrey-d1">Emails opened</div>
|
|
|
|
|
<div class="f2 fw6">{{@member.emailOpenedCount}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="flex-auto flex flex-column justify-center items-start">
|
|
|
|
|
<div class="f7 midgrey-d1">Avg. open rate</div>
|
|
|
|
|
<div class="f2 fw6">
|
|
|
|
|
{{#if (is-empty @member.emailOpenRate)}}
|
|
|
|
|
<span data-tooltip="Insufficient data available">–</span>
|
|
|
|
|
{{else}}
|
|
|
|
|
{{@member.emailOpenRate}}%
|
|
|
|
|
{{/if}}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="flex">
|
|
|
|
|
<GhFormGroup @errors={{this.member.errors}} @hasValidated={{this.member.hasValidated}} @property="name" @classNames="max-width pl5">
|
|
|
|
|
<label for="member-name">Name</label>
|
|
|
|
|
<GhTextInput @id="member-name" @name="name" @value={{this.scratchMember.name}} @tabindex="1"
|
|
|
|
|
@focus-out={{action "setProperty" "name" this.scratchMember.name}} />
|
|
|
|
|
<GhErrorMessage @errors={{member.errors}} @property="name" />
|
|
|
|
|
</GhFormGroup>
|
|
|
|
|
|
|
|
|
|
<GhFormGroup @errors={{this.member.errors}} @hasValidated={{this.member.hasValidated}} @property="email" @classNames="max-width pl4 pr5">
|
|
|
|
|
<label for="member-email">Email</label>
|
|
|
|
|
<GhTextInput @value={{this.scratchMember.email}} @id="member-email" @name="email" @tabindex="2"
|
|
|
|
|
@autocapitalize="off" @autocorrect="off" @autocomplete="off"
|
|
|
|
|
@focus-out={{action "setProperty" "email" this.scratchMember.email}} />
|
|
|
|
|
<GhErrorMessage @errors={{this.member.errors}} @property="email" />
|
|
|
|
|
</GhFormGroup>
|
|
|
|
|
</div>
|
2019-11-05 14:00:07 +03:00
|
|
|
|
</div>
|
2020-12-09 16:26:00 +03:00
|
|
|
|
|
|
|
|
|
<div class="pa5 pb6 bt b--whitegrey">
|
2020-02-14 12:34:01 +03:00
|
|
|
|
<GhFormGroup @classNames="gh-members-subscribed-checkbox mb0">
|
|
|
|
|
<div class="flex justify-between items-center">
|
|
|
|
|
<div>
|
|
|
|
|
<h4 class="gh-setting-title">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" />
|
|
|
|
|
<span class="input-toggle-component"></span>
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2020-01-16 18:14:03 +03:00
|
|
|
|
</GhFormGroup>
|
2019-11-06 14:00:03 +03:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2020-12-09 16:26:00 +03:00
|
|
|
|
|
2020-02-14 12:34:01 +03:00
|
|
|
|
<div class="flex-auto br4 shadow-1 bg-grouped-table mt2 flex flex-column items-stretch gh-member-settings-secondary">
|
2020-12-09 16:26:00 +03:00
|
|
|
|
<div class="pa5 pt6 pb6">
|
2020-02-14 12:34:01 +03:00
|
|
|
|
<GhFormGroup>
|
|
|
|
|
<label for="label-input">Labels</label>
|
2020-12-09 22:32:31 +03:00
|
|
|
|
<GhMemberLabelInput @onChange={{action "setLabels"}} @labels={{this.member.labels}} @triggerId="label-input" />
|
2020-02-14 12:34:01 +03:00
|
|
|
|
</GhFormGroup>
|
|
|
|
|
<GhFormGroup @errors={{this.member.errors}} @hasValidated={{this.member.hasValidated}} @property="note" @classNames="mb0">
|
|
|
|
|
<label for="member-note">Note <span class="midgrey-l2 fw4">(not visible to member)</span></label>
|
|
|
|
|
<GhTextarea @id="member-note" @name="note" @class="gh-member-details-textarea" @tabindex="3"
|
|
|
|
|
@value={{this.scratchMember.note}} @focus-out={{action "setProperty" "note" this.scratchMember.note}} />
|
|
|
|
|
<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>
|
|
|
|
|
</GhFormGroup>
|
|
|
|
|
</div>
|
2019-10-02 07:00:03 +03:00
|
|
|
|
</div>
|
2019-10-03 20:42:33 +03:00
|
|
|
|
</div>
|
|
|
|
|
|
2020-02-24 12:08:47 +03:00
|
|
|
|
{{#if canShowStripeInfo}}
|
2019-10-05 13:41:47 +03:00
|
|
|
|
<h4 class="midlightgrey f-small fw5 ttu mt12">Stripe info</h4>
|
2019-10-04 17:31:56 +03:00
|
|
|
|
|
2019-12-13 17:20:29 +03:00
|
|
|
|
{{#if this.isLoading}}
|
2019-10-05 14:01:43 +03:00
|
|
|
|
<div class="pa20 br4 shadow-1 bg-grouped-table mt2">
|
2019-10-07 15:26:32 +03:00
|
|
|
|
<div class="flex justify-center flex-auto">
|
|
|
|
|
<div class="gh-loading-spinner"> </div>
|
|
|
|
|
</div>
|
2019-10-04 17:31:56 +03:00
|
|
|
|
</div>
|
2019-10-07 15:26:32 +03:00
|
|
|
|
{{else}}
|
2020-01-28 07:27:19 +03:00
|
|
|
|
<div class="br4 shadow-1 bg-grouped-table mt2">
|
|
|
|
|
{{#if this.subscriptions}}
|
2019-12-13 17:20:29 +03:00
|
|
|
|
{{#if this.hasMultipleSubscriptions}}
|
2019-10-07 15:26:32 +03:00
|
|
|
|
<div class="pa2 flex flex-column flex-row-ns items-center justify-center f7 fw5 bg-whitegrey-l2 bb b--whitegrey br4 br--top">
|
|
|
|
|
{{svg-jar "info" class="gh-member-info-icon mr2 fill-darkgrey"}} Member has multiple Stripe subscriptions
|
|
|
|
|
</div>
|
|
|
|
|
{{/if}}
|
2019-12-13 17:20:29 +03:00
|
|
|
|
{{#each this.subscriptions as |subscription|}}
|
2019-10-07 15:26:32 +03:00
|
|
|
|
<section class="gh-member-stripe-info pa5 pb0 pt4 flex flex-column flex-row-ns items-start justify-between">
|
|
|
|
|
<div class="flex items-start w-100">
|
|
|
|
|
<div class="w-50 flex-auto mr8">
|
2020-08-21 14:35:45 +03:00
|
|
|
|
<div class="gh-member-header-stripeinfo">
|
|
|
|
|
<h4 class="f6 fw6">Customer</h4>
|
|
|
|
|
</div>
|
2019-10-07 15:26:32 +03:00
|
|
|
|
<table class="gh-member-stripe-table">
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="gh-member-stripe-label">Stripe customer ID</td>
|
2019-10-10 11:24:19 +03:00
|
|
|
|
<td class="gh-member-stripe-data">
|
2019-10-24 13:31:55 +03:00
|
|
|
|
<a href="https://dashboard.stripe.com/customers/{{subscription.customer.id}}" target="_blank" rel="noopener" data-tooltip="View on Stripe">
|
2019-10-10 11:24:19 +03:00
|
|
|
|
{{subscription.customer.id}}
|
|
|
|
|
</a>
|
|
|
|
|
</td>
|
2019-10-07 15:26:32 +03:00
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="gh-member-stripe-label">Name</td>
|
|
|
|
|
<td class="gh-member-stripe-data">
|
2019-10-21 18:24:57 +03:00
|
|
|
|
{{#if subscription.customer.name}}
|
|
|
|
|
{{subscription.customer.name}}
|
2019-10-07 15:26:32 +03:00
|
|
|
|
{{else}}
|
2020-08-21 14:35:45 +03:00
|
|
|
|
<span class="midgrey-d1">No name</span>
|
2019-10-07 15:26:32 +03:00
|
|
|
|
{{/if}}
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="gh-member-stripe-label">Email</td>
|
|
|
|
|
<td class="gh-member-stripe-data">
|
2019-10-10 11:24:19 +03:00
|
|
|
|
{{#if subscription.customer.email}}
|
|
|
|
|
{{subscription.customer.email}}
|
2019-10-07 15:26:32 +03:00
|
|
|
|
{{else}}
|
2020-08-21 14:35:45 +03:00
|
|
|
|
<span class="midgrey-d1">No email</span>
|
2019-10-07 15:26:32 +03:00
|
|
|
|
{{/if}}
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="gh-member-stripe-label">Customer since</td>
|
|
|
|
|
<td class="gh-member-stripe-data">
|
|
|
|
|
{{#if subscription.startDate}}
|
|
|
|
|
{{subscription.startDate}}
|
|
|
|
|
{{else}}
|
2020-08-21 14:35:45 +03:00
|
|
|
|
<span class="midgrey-d1">No data</span>
|
2019-10-07 15:26:32 +03:00
|
|
|
|
{{/if}}
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="w-50 flex-auto">
|
2020-08-21 14:35:45 +03:00
|
|
|
|
<div class="gh-member-header-stripeinfo">
|
|
|
|
|
<h4 class="f6 fw6">Subscription</h4>
|
|
|
|
|
{{#if (eq subscription.status "active")}}
|
|
|
|
|
{{#if subscription.cancelAtPeriodEnd}}
|
|
|
|
|
<GhTaskButton
|
|
|
|
|
@buttonText="Continue subscription"
|
|
|
|
|
@successText=""
|
|
|
|
|
@task={{this.continueSubscription}}
|
|
|
|
|
@taskArgs={{subscription.id}}
|
|
|
|
|
@class="gh-btn gh-btn-icon gh-member-btn-cancelsub"
|
|
|
|
|
data-test-button="continue-subscription"
|
|
|
|
|
/>
|
|
|
|
|
{{else}}
|
|
|
|
|
<GhTaskButton
|
|
|
|
|
@buttonText="Cancel subscription"
|
|
|
|
|
@successText=""
|
|
|
|
|
@task={{this.cancelSubscription}}
|
|
|
|
|
@taskArgs={{subscription.id}}
|
|
|
|
|
@class="gh-btn gh-btn-icon gh-member-btn-cancelsub"
|
|
|
|
|
data-test-button="cancel-subscription"
|
|
|
|
|
/>
|
|
|
|
|
{{/if}}
|
|
|
|
|
{{/if}}
|
|
|
|
|
</div>
|
2019-10-07 15:26:32 +03:00
|
|
|
|
<table class="gh-member-stripe-table">
|
|
|
|
|
<tr>
|
2019-12-12 16:00:57 +03:00
|
|
|
|
<td class="gh-member-stripe-label">Stripe subscription ID</td>
|
|
|
|
|
<td class="gh-member-stripe-data">
|
|
|
|
|
<a href="https://dashboard.stripe.com/subscriptions/{{subscription.id}}" target="_blank" rel="noopener"
|
|
|
|
|
data-tooltip="View on Stripe">
|
|
|
|
|
{{subscription.id}}
|
|
|
|
|
</a>
|
|
|
|
|
</td>
|
2019-10-07 15:26:32 +03:00
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2019-12-12 16:00:57 +03:00
|
|
|
|
<td class="gh-member-stripe-label">Plan</td>
|
|
|
|
|
<td class="gh-member-stripe-data">
|
2019-12-12 21:22:31 +03:00
|
|
|
|
{{subscription.plan.nickname}}
|
2020-08-21 14:35:45 +03:00
|
|
|
|
<span class="midgrey-d1">({{subscription.amount}}
|
2019-12-12 16:00:57 +03:00
|
|
|
|
<span class="ttu">{{subscription.plan.currency}}</span>/{{subscription.plan.interval}})
|
|
|
|
|
</span>
|
|
|
|
|
</td>
|
2019-10-07 15:26:32 +03:00
|
|
|
|
</tr>
|
2019-12-12 16:00:57 +03:00
|
|
|
|
<tr>
|
|
|
|
|
<td class="gh-member-stripe-label">Status</td>
|
|
|
|
|
<td class="gh-member-stripe-data">
|
2020-11-25 13:45:18 +03:00
|
|
|
|
{{#if (and subscription.cancelAtPeriodEnd (not-eq subscription.status 'canceled'))}}
|
2019-12-12 16:00:57 +03:00
|
|
|
|
<span class="gh-member-cancels-on-label">Cancels on {{subscription.validUntil}}</span>
|
|
|
|
|
{{else}}
|
2020-10-27 12:57:31 +03:00
|
|
|
|
<span class="gh-member-stripe-status">{{subscription.statusLabel}}</span>
|
2019-12-12 16:00:57 +03:00
|
|
|
|
{{/if}}
|
|
|
|
|
</td>
|
2019-12-12 21:22:31 +03:00
|
|
|
|
</tr>
|
2020-11-24 13:20:21 +03:00
|
|
|
|
{{#if subscription.cancellationReason}}
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="gh-member-stripe-label">Cancellation reason</td>
|
|
|
|
|
<td class="gh-member-stripe-data">
|
|
|
|
|
<span class="gh-member-stripe-cancellation-reason">{{subscription.cancellationReason}}</span>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{{/if}}
|
2019-10-07 15:26:32 +03:00
|
|
|
|
<tr>
|
|
|
|
|
<td class="gh-member-stripe-label">Next renewal date</td>
|
2019-12-12 16:00:57 +03:00
|
|
|
|
<td class="gh-member-stripe-data">
|
|
|
|
|
{{#if subscription.cancelAtPeriodEnd}}
|
|
|
|
|
No further renewal
|
|
|
|
|
{{else}}
|
|
|
|
|
{{subscription.validUntil}}
|
|
|
|
|
{{/if}}
|
|
|
|
|
</td>
|
2019-10-07 15:26:32 +03:00
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
{{/each}}
|
2020-01-28 07:27:19 +03:00
|
|
|
|
{{else}}
|
|
|
|
|
<div class="pa20">
|
|
|
|
|
<p class="ma0 pa0 tc midgrey">Member doesn't have an active Stripe subscription</p>
|
|
|
|
|
</div>
|
|
|
|
|
{{/if}}
|
|
|
|
|
<div class="pa5 pb0 pt4 flex flex-column justify-between bt b--whitegrey">
|
|
|
|
|
<GhFormGroup @classNames="gh-members-comped-checkbox">
|
|
|
|
|
<div class="flex justify-between items-center">
|
|
|
|
|
<div>
|
|
|
|
|
<h4 class="gh-setting-title">Complimentary premium plan</h4>
|
|
|
|
|
<p class="gh-setting-desc">If enabled, member will be placed onto a free of charge premium subscription</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="for-switch">
|
|
|
|
|
<label class="switch" for="comped-checkbox">
|
|
|
|
|
<Input @checked={{this.member.comped}} @type="checkbox" @id="comped-checkbox" @name="comped" />
|
|
|
|
|
<span class="input-toggle-component"></span>
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</GhFormGroup>
|
2019-10-07 15:26:32 +03:00
|
|
|
|
</div>
|
2020-01-28 07:27:19 +03:00
|
|
|
|
</div>
|
2019-10-24 13:31:55 +03:00
|
|
|
|
{{/if}}
|
2020-02-24 12:08:47 +03:00
|
|
|
|
{{/if}}
|