mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-18 02:21:47 -05:00
Refined attribution source modal on dashboard
- removes static text for unavailable data on all sources modal - updates dashboard mocks for attribution data
This commit is contained in:
parent
17f587ca0e
commit
6301307d41
3 changed files with 18 additions and 9 deletions
|
@ -51,7 +51,9 @@
|
|||
</div>
|
||||
|
||||
</div>
|
||||
{{#if @data.unavailableSource}}
|
||||
<div class="modal-footer">
|
||||
<p class="gh-dashboard-attribution-footnote"><sup>*</sup>{{if (eq @data.sortColumn "paid") "Paid subscriptions" "Members"}} created during this time period that do not have attribution data associated with them.</p>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
|
@ -14,6 +14,7 @@ export default class SourceAttributionTable extends Component {
|
|||
|
||||
this.modals.open(AllSourcesModal, {
|
||||
sources: allSources,
|
||||
unavailableSource: this.unavailableSource,
|
||||
sortColumn: this.args.sortColumn
|
||||
});
|
||||
}
|
||||
|
|
|
@ -271,11 +271,16 @@ export default class DashboardMocksService extends Service {
|
|||
});
|
||||
|
||||
// More than 5 sources
|
||||
const attributionSources = ['Twitter', 'Ghost Network', 'Product Hunt', 'Direct', 'Ghost Newsletter', 'Rediverge Newsletter', 'Reddit', 'The Lever Newsletter', 'The Browser Newsletter', 'Green Newsletter', 'Yellow Newsletter', 'Brown Newsletter', 'Red Newsletter'];
|
||||
// const attributionSources = ['Twitter', 'Ghost Network', 'Product Hunt', 'Direct'];
|
||||
let attributionSources = ['Twitter', 'Ghost Network', 'Product Hunt', 'Direct', 'Ghost Newsletter', 'Rediverge Newsletter', 'Reddit', 'The Lever Newsletter', 'The Browser Newsletter', 'Green Newsletter', 'Yellow Newsletter', 'Brown Newsletter', 'Red Newsletter'];
|
||||
const hasPaidConversions = true;
|
||||
const hasFreeSignups = true;
|
||||
const showEmptyState = false;
|
||||
const hasUnavailableSources = true;
|
||||
const hasExtraSources = true;
|
||||
|
||||
if (!hasExtraSources) {
|
||||
attributionSources = attributionSources.slice(0, 5);
|
||||
}
|
||||
|
||||
if (!showEmptyState) {
|
||||
this.memberAttributionStats.push({
|
||||
|
@ -285,13 +290,14 @@ export default class DashboardMocksService extends Service {
|
|||
paidConversions: hasPaidConversions ? Math.floor(Math.random() * 30) : 0
|
||||
});
|
||||
|
||||
// Comment this out to hide Unavailable source
|
||||
this.memberAttributionStats.push({
|
||||
date: date.toISOString().split('T')[0],
|
||||
source: null,
|
||||
signups: hasFreeSignups ? Math.floor(Math.random() * 5) : 0,
|
||||
paidConversions: hasPaidConversions ? Math.floor(Math.random() * 3) : 0
|
||||
});
|
||||
if (hasUnavailableSources) {
|
||||
this.memberAttributionStats.push({
|
||||
date: date.toISOString().split('T')[0],
|
||||
source: null,
|
||||
signups: hasFreeSignups ? Math.floor(Math.random() * 5) : 0,
|
||||
paidConversions: hasPaidConversions ? Math.floor(Math.random() * 3) : 0
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue