mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 20:03:12 +03:00
Updated MRR display value on dashboard
closes https://github.com/TryGhost/Team/issues/568 Displaying amount in cents in context of overall MRR forecast/estimate doesn't add much value, the change rounds MRR value to nearest whole number on dashboard
This commit is contained in:
parent
fde76becc4
commit
43c83c77f2
@ -82,7 +82,7 @@ export default class DashboardController extends Controller {
|
||||
};
|
||||
if (currencyStats) {
|
||||
const currencyStatsData = this.membersStats.fillDates(currencyStats.data) || {};
|
||||
const dateValues = Object.values(currencyStatsData).map(val => val / 100);
|
||||
const dateValues = Object.values(currencyStatsData).map(val => Math.round((val / 100)));
|
||||
const currentMRR = dateValues.length ? dateValues[dateValues.length - 1] : 0;
|
||||
const rangeStartMRR = dateValues.length ? dateValues[0] : 0;
|
||||
const percentGrowth = rangeStartMRR !== 0 ? ((currentMRR - rangeStartMRR) / rangeStartMRR) * 100 : 0;
|
||||
|
Loading…
Reference in New Issue
Block a user