Show revenue only for ROLE_ADMIN (#227)

This commit is contained in:
Kevin Papst
2018-07-22 15:31:59 +02:00
committed by GitHub
parent 75246e9db2
commit 194a1f204c
4 changed files with 36 additions and 28 deletions

View File

@@ -102,9 +102,7 @@ class DashboardController extends Controller
'header' => 'dashboard.all',
'widgets' => [
"{{ widgets.info_box_counter('stats.durationThisMonth', timesheetGlobal.durationThisMonth|duration(true), 'far fa-hourglass', 'blue') }}",
//"{{ widgets.info_box_counter('stats.amountThisMonth', timesheetGlobal.amountThisMonth|money, 'money', 'green') }}",
"{{ widgets.info_box_counter('stats.durationTotal', timesheetGlobal.durationTotal|duration(true), 'far fa-hourglass', 'yellow') }}",
//"{{ widgets.info_box_counter('stats.amountTotal', timesheetGlobal.amountTotal|money, 'money', 'red') }}",
"{{ widgets.info_box_counter('stats.activeRecordings', timesheetGlobal.activeCurrently, 'far fa-hourglass', 'red', path('admin_timesheet', {'state': " . TimesheetQuery::STATE_RUNNING . '})) }}',
],
];
@@ -123,6 +121,15 @@ class DashboardController extends Controller
return $widgets;
}
$widgets[] = [
'id' => 'alluser.money_stats',
'header' => '',
'widgets' => [
"{{ widgets.info_box_counter('stats.amountThisMonth', timesheetGlobal.amountThisMonth|money, 'far fa-money-bill-alt', 'green') }}",
"{{ widgets.info_box_counter('stats.amountTotal', timesheetGlobal.amountTotal|money, 'far fa-money-bill-alt', 'red') }}",
],
];
$widgets[] = [
'id' => 'admin.stats',
'header' => 'dashboard.admin',