summaryrefslogtreecommitdiff
path: root/includes/controller/public_dashboard_controller.php
blob: bf909bedd7849055450e030484e399dacccdfb3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php

/**
 * Loads all data for the public dashboard
 */
function public_dashboard_controller()
{
    $stats = [
        'needed-3-hours' => stats_angels_needed_three_hours(),
        'needed-night' => stats_angels_needed_for_nightshifts(),
        'angels-working' => stats_currently_working(),
        'hours-to-work' => stats_hours_to_work()
    ];
    
    $free_shifts = Shifts_free(time(), time() + 12 * 60 * 60);
    
    return [
        _('Engelsystem Public Dashboard'),
        public_dashboard_view($stats, $free_shifts)
    ];
}
?>