mirror of https://github.com/abpframework/abp.git
committed by
GitHub
4 changed files with 58 additions and 76 deletions
@ -1,21 +1,26 @@ |
|||||
(function() { |
abp.widgets = abp.widgets || {}; //TODO: Remove later
|
||||
function refresh(args) { |
(function () { |
||||
args.container |
abp.widgets.CountersWidget = function ($wrapper) { |
||||
.find('.counters-widget') |
|
||||
.each(function () { |
var refresh = function (filters) { |
||||
var $this = $(this); |
dashboardDemo.dashboard.getCountersWidget({ |
||||
dashboardDemo.dashboard |
startDate: filters.startDate, |
||||
.getCountersWidget({ |
endDate: filters.endDate |
||||
startDate: args.filters.startDate, |
}).then(function (result) { |
||||
endDate: args.filters.endDate |
$wrapper.find('.new-user-count').text(result.newUsers); |
||||
}).then(function (result) { |
$wrapper.find('.active-user-count').text(result.activeUsers); |
||||
$this.find('.new-user-count').text(result.newUsers); |
$wrapper.find('.total-income').text('$' + result.totalIncome.toFixed(2)); |
||||
$this.find('.active-user-count').text(result.activeUsers); |
$wrapper.find('.total-profit').text('$' + result.totalProfit.toFixed(2)); |
||||
$this.find('.total-income').text('$' + result.totalIncome.toFixed(2)); |
|
||||
$this.find('.total-profit').text('$' + result.totalProfit.toFixed(2)); |
|
||||
}); |
|
||||
}); |
}); |
||||
} |
}; |
||||
|
|
||||
|
var init = function (filters) { |
||||
|
// there is no initial process for this widget.
|
||||
|
}; |
||||
|
|
||||
abp.event.on('refresh-widgets', refresh); |
return { |
||||
|
init: init, |
||||
|
refresh: refresh |
||||
|
}; |
||||
|
}; |
||||
})(); |
})(); |
||||
@ -1,12 +1,10 @@ |
|||||
<div class="license-statistic-widget"> |
<abp-card background="Light"> |
||||
<abp-card background="Light"> |
<abp-card-header background="Secondary" class="text-white"> |
||||
<abp-card-header background="Secondary" class="text-white"> |
License Statistics |
||||
License Statistics |
</abp-card-header> |
||||
</abp-card-header> |
<abp-card-body> |
||||
<abp-card-body> |
<div class="row"> |
||||
<div class="row"> |
<canvas class="LicenseStatisticChart"></canvas> |
||||
<canvas class="LicenseStatisticChart"></canvas> |
</div> |
||||
</div> |
</abp-card-body> |
||||
</abp-card-body> |
</abp-card> |
||||
</abp-card> |
|
||||
</div> |
|
||||
|
|||||
Loading…
Reference in new issue