2022-04-01 16:53:55 +03:00
|
|
|
<div class="gh-dashboard5-stats" {{did-insert this.loadCharts}}>
|
2022-04-06 20:11:46 +03:00
|
|
|
<button class="gh-dashboard5-stats-button {{if this.chartShowingTotal 'is-selected'}}" type="button" {{on "click" (fn this.changeChartDisplay "total")}}>
|
|
|
|
<Dashboard::v5::parts::ChartMetric
|
|
|
|
@label={{gh-pluralize this.totalMembers "Total member" without-count=true}}
|
|
|
|
@value={{format-number this.totalMembers}}
|
|
|
|
@trends={{this.hasTrends}}
|
|
|
|
@percentage={{this.totalMembersTrend}}
|
|
|
|
@large={{true}} />
|
|
|
|
<div class="gh-dashboard5-stats-highlight"></div>
|
2022-04-01 16:53:55 +03:00
|
|
|
</button>
|
2022-04-01 19:02:30 +03:00
|
|
|
{{#if this.hasPaidTiers}}
|
2022-04-06 20:11:46 +03:00
|
|
|
<button class="gh-dashboard5-stats-button {{if this.chartShowingMonthly 'is-selected'}}" type="button" {{on "click" (fn this.changeChartDisplay "monthly")}}>
|
|
|
|
<Dashboard::v5::parts::ChartMetric
|
|
|
|
@label={{gh-pluralize this.paidMembers "Paid member" without-count=true}}
|
|
|
|
@value={{format-number this.paidMembers}}
|
|
|
|
@trends={{this.hasTrends}}
|
|
|
|
@percentage={{this.paidMembersTrend}}
|
|
|
|
@large={{true}} />
|
|
|
|
<div class="gh-dashboard5-stats-highlight"></div>
|
2022-04-01 19:02:30 +03:00
|
|
|
</button>
|
2022-04-06 20:11:46 +03:00
|
|
|
<button class="gh-dashboard5-stats-button {{if this.chartShowingPaid 'is-selected'}}" type="button" {{on "click" (fn this.changeChartDisplay "paid")}}>
|
|
|
|
<Dashboard::v5::parts::ChartMetric
|
|
|
|
@label="Monthly revenue (MRR)"
|
|
|
|
@value="${{gh-price-amount this.currentMRR}}"
|
|
|
|
@trends={{this.hasTrends}}
|
|
|
|
@percentage={{this.mrrTrend}}
|
|
|
|
@large={{true}} />
|
|
|
|
<div class="gh-dashboard5-stats-highlight"></div>
|
2022-04-01 19:02:30 +03:00
|
|
|
</button>
|
|
|
|
{{/if}}
|
2022-04-01 16:53:55 +03:00
|
|
|
</div>
|
2022-04-06 20:11:46 +03:00
|
|
|
|
2022-04-01 16:53:55 +03:00
|
|
|
<div class="gh-dashboard5-chart">
|
|
|
|
{{#if this.loading}}
|
2022-04-06 20:11:46 +03:00
|
|
|
<div class="gh-dashboard5-chart-loading" style={{html-safe (concat "height: " this.chartHeight "px;")}}/>
|
2022-04-01 16:53:55 +03:00
|
|
|
{{else}}
|
2022-04-06 20:11:46 +03:00
|
|
|
<div class="gh-dashboard5-chart-ticks">
|
|
|
|
<span>1,000</span>
|
|
|
|
<span>750</span>
|
|
|
|
<span>500</span>
|
|
|
|
<span>250</span>
|
|
|
|
</div>
|
|
|
|
<div class="gh-dashboard5-chart-container">
|
|
|
|
<EmberChart
|
|
|
|
@type={{this.chartType}}
|
|
|
|
@data={{this.chartData}}
|
|
|
|
@options={{this.chartOptions}}
|
|
|
|
@height={{this.chartHeight}} />
|
|
|
|
</div>
|
2022-04-01 16:53:55 +03:00
|
|
|
{{/if}}
|
|
|
|
</div>
|