2022-04-13 15:52:12 +03:00
|
|
|
<section class="gh-dashboard5-section gh-dashboard5-anchor" {{did-insert this.loadCharts}}>
|
2022-04-12 15:29:10 +03:00
|
|
|
<article class="gh-dashboard5-box">
|
2022-04-12 18:03:52 +03:00
|
|
|
<div class="gh-dashboard5-hero {{unless this.hasPaidTiers 'is-solo'}}">
|
|
|
|
{{#unless this.hasPaidTiers}}
|
2022-04-12 15:29:10 +03:00
|
|
|
<Dashboard::v5::Parts::Metric
|
|
|
|
@label={{gh-pluralize this.totalMembers "Total member" without-count=true}}
|
|
|
|
@value={{format-number this.totalMembers}}
|
|
|
|
@trends={{this.hasTrends}}
|
|
|
|
@percentage={{this.totalMembersTrend}}
|
|
|
|
@large={{true}} />
|
2022-04-12 18:03:52 +03:00
|
|
|
{{/unless}}
|
|
|
|
|
|
|
|
<div class="gh-dashboard5-chart">
|
|
|
|
{{#if this.loading}}
|
|
|
|
<div class="gh-dashboard5-chart-loading" style={{html-safe (concat "height: " this.chartHeight "px;")}}/>
|
|
|
|
{{else}}
|
|
|
|
<div class="gh-dashboard5-chart-container">
|
2022-04-13 15:52:12 +03:00
|
|
|
{{#if (eq this.chartType 'bar')}}
|
|
|
|
<EmberChart
|
|
|
|
@type="bar"
|
|
|
|
@data={{this.chartData}}
|
|
|
|
@options={{this.chartOptions}}
|
|
|
|
@height={{if this.hasPaidTiers this.chartHeight this.chartHeightSmall}} />
|
|
|
|
{{else}}
|
|
|
|
<EmberChart
|
|
|
|
@type="line"
|
|
|
|
@data={{this.chartData}}
|
|
|
|
@options={{this.chartOptions}}
|
|
|
|
@height={{if this.hasPaidTiers this.chartHeight this.chartHeightSmall}} />
|
|
|
|
{{/if}}
|
2022-04-12 18:03:52 +03:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
|
2022-04-12 15:29:10 +03:00
|
|
|
{{#if this.hasPaidTiers}}
|
2022-04-13 15:52:12 +03:00
|
|
|
<div class="gh-dashboard5-stats{{unless this.hasPaidTiers ' is-solo'}}">
|
2022-04-12 18:03:52 +03:00
|
|
|
<button class="gh-dashboard5-stats-button {{if this.chartShowingTotal 'is-selected'}}" type="button" {{on "click" (fn this.changeChartDisplay "total")}}>
|
|
|
|
<Dashboard::v5::Parts::Metric
|
|
|
|
@label={{gh-pluralize this.totalMembers "Total member" without-count=true}}
|
|
|
|
@value={{format-number this.totalMembers}}
|
|
|
|
@trends={{this.hasTrends}}
|
|
|
|
@percentage={{this.totalMembersTrend}}
|
|
|
|
@large={{true}} />
|
|
|
|
</button>
|
2022-04-13 15:52:12 +03:00
|
|
|
<button class="gh-dashboard5-stats-button {{if this.chartShowingPaid 'is-selected'}}" type="button" {{on "click" (fn this.changeChartDisplay "paid-total")}}>
|
2022-04-12 18:03:52 +03:00
|
|
|
<Dashboard::v5::Parts::Metric
|
|
|
|
@label={{gh-pluralize this.paidMembers "Total paid member" without-count=true}}
|
|
|
|
@value={{format-number this.paidMembers}}
|
|
|
|
@trends={{this.hasTrends}}
|
|
|
|
@percentage={{this.paidMembersTrend}}
|
|
|
|
@large={{true}} />
|
|
|
|
</button>
|
2022-04-13 15:52:12 +03:00
|
|
|
<button class="gh-dashboard5-stats-button {{if this.chartShowingMrr 'is-selected'}}" type="button" {{on "click" (fn this.changeChartDisplay "mrr")}}>
|
2022-04-12 18:03:52 +03:00
|
|
|
<Dashboard::v5::Parts::Metric
|
|
|
|
@label="MRR"
|
|
|
|
@value="${{gh-price-amount this.currentMRR}}"
|
|
|
|
@trends={{this.hasTrends}}
|
|
|
|
@percentage={{this.mrrTrend}}
|
|
|
|
@large={{true}} />
|
|
|
|
</button>
|
|
|
|
</div>
|
2022-04-12 15:29:10 +03:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
2022-04-11 19:17:31 +03:00
|
|
|
|
2022-04-12 18:03:52 +03:00
|
|
|
<div class="gh-dashboard5-selects">
|
2022-04-12 15:29:10 +03:00
|
|
|
{{#if this.chartShowingPaid}}
|
2022-04-12 18:03:52 +03:00
|
|
|
<div class="gh-dashboard5-select">
|
2022-04-12 15:29:10 +03:00
|
|
|
<PowerSelect
|
|
|
|
@selected={{this.selectedPaidOption}}
|
|
|
|
@options={{this.paidOptions}}
|
|
|
|
@searchEnabled={{false}}
|
2022-04-12 18:03:52 +03:00
|
|
|
@onChange={{this.onPaidChange}}
|
2022-04-12 15:29:10 +03:00
|
|
|
@triggerComponent="gh-power-select/trigger"
|
|
|
|
@triggerClass="gh-contentfilter-menu-trigger"
|
|
|
|
@dropdownClass="gh-contentfilter-menu-dropdown"
|
|
|
|
@matchTriggerWidth={{false}}
|
|
|
|
as |option|
|
|
|
|
>
|
|
|
|
{{#if option.name}}{{option.name}}{{else}}<span class="red">Unknown option</span>{{/if}}
|
|
|
|
</PowerSelect>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2022-04-12 18:03:52 +03:00
|
|
|
<div class="gh-dashboard5-select">
|
2022-04-12 15:29:10 +03:00
|
|
|
<PowerSelect
|
2022-04-12 18:03:52 +03:00
|
|
|
@selected={{this.selectedDaysOption}}
|
|
|
|
@options={{this.daysOptions}}
|
2022-04-12 15:29:10 +03:00
|
|
|
@searchEnabled={{false}}
|
2022-04-12 18:03:52 +03:00
|
|
|
@onChange={{this.onDaysChange}}
|
2022-04-12 15:29:10 +03:00
|
|
|
@triggerComponent="gh-power-select/trigger"
|
|
|
|
@triggerClass="gh-contentfilter-menu-trigger"
|
|
|
|
@dropdownClass="gh-contentfilter-menu-dropdown"
|
|
|
|
@matchTriggerWidth={{false}}
|
|
|
|
as |option|
|
|
|
|
>
|
|
|
|
{{#if option.name}}{{option.name}}{{else}}<span class="red">Unknown option</span>{{/if}}
|
|
|
|
</PowerSelect>
|
|
|
|
</div>
|
2022-04-11 19:17:31 +03:00
|
|
|
</div>
|
2022-04-12 15:29:10 +03:00
|
|
|
</article>
|
|
|
|
</section>
|