Add current job indicator

master
Skylar Ittner 6 years ago
parent 15ebdccd00
commit c0fab1e596

@ -155,5 +155,6 @@ define("STRINGS", [
"choose a group" => "Choose a group",
"all groups" => "All Groups",
"shift name" => "Shift Name",
"workers" => "Workers"
"workers" => "Workers",
"current job" => "Current job: "
]);

@ -8,6 +8,17 @@ require_once __DIR__ . '/../required.php';
redirectifnotloggedin();
?>
<div class="btn-group mgn-btm-10px">
<div class="btn btn-default">
<?php
lang("current job");
$currentjob = $database->get('job_tracking', ['[>]jobs' => ['jobid']], ['jobname (name)', 'color'], ["AND" => ["uid" => $_SESSION['uid'], 'end' => null]]);
if (!$currentjob) {
$currentjob = ["color" => "white", "name" => lang("none", false)];
}
echo ' <span class="label label-' . $currentjob['color'] . '">&nbsp;&nbsp;</span> ' . $currentjob['name'];
?>
</div>
<?php
if (account_has_permission($_SESSION['username'], "QWIKCLOCK_ADMIN")) {
?>

Loading…
Cancel
Save