Lots of things
Add QC shifts, add proper icon, check for app permissions, adjust styles, fix UI bugs, prepare login UI for quick access modemaster
parent
40ddfb39fd
commit
875457953f
Binary file not shown.
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 1014 B |
@ -0,0 +1,41 @@
|
||||
/*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
$(".card_qwikclock_myshifts").each(function () {
|
||||
var card = $(this);
|
||||
$(this).find(".card_title").prepend("Shifts | ");
|
||||
var shiftbox = $(this).find(".shift-box");
|
||||
var shifttable = $(this).find(".shift-table");
|
||||
var url = $(this).data("apiurl");
|
||||
$.post(url, {
|
||||
username: getuser(),
|
||||
password: getAPIKey(),
|
||||
action: "getassignedshifts"
|
||||
}, function (resp) {
|
||||
if (resp.status == "OK") {
|
||||
var shifts = resp.shifts;
|
||||
if (shifts.length > 0) {
|
||||
shifttable.html('<thead><tr><th>Shift</th><th><i class="fas fa-play d-sm-none d-lg-inline"></i> Start</th><th><i class="fas fa-stop d-sm-none d-lg-inline"></i> End</th><th><i class="far fa-calendar-alt d-sm-none d-lg-inline"></i> Days</th></tr></thead>');
|
||||
shifttable.append("<tbody>");
|
||||
for (var shift in shifts) {
|
||||
var days = "";
|
||||
for (var day in shifts[shift]["day_list"]) {
|
||||
days += " " + shifts[shift]["day_list"][day];
|
||||
}
|
||||
days = days.trim();
|
||||
shifttable.append('<tr><td>' + shifts[shift]['shiftname'] + '</td><td>' + shifts[shift]['start_f'] + '</td><td>' + shifts[shift]['end_f'] + '</td><td>' + days + '</td></tr>');
|
||||
}
|
||||
shifttable.append("</tbody>");
|
||||
} else {
|
||||
shifttable.html('<div class="alert alert-primary"><i class="fas fa-info-circle"></i> No shifts assigned.</div>');
|
||||
}
|
||||
} else {
|
||||
showmsg(resp.msg, "danger");
|
||||
}
|
||||
}, "json").fail(function () {
|
||||
card.css("display", "none");
|
||||
});
|
||||
});
|
@ -0,0 +1,9 @@
|
||||
<!--
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
-->
|
||||
<h3 class="card-header" style="background-color: #2196F3; color: white;"><i class="far fa-calendar-alt"></i> <span class="card_title">QwikClock | Shifts</span></h3>
|
||||
<table class="table table-striped table-responsive shift-table" style="width: 100%;">
|
||||
|
||||
</table>
|
Loading…
Reference in New Issue