Add firma flag to availability and show office/home label
Server query gets the last stamp's BU_TERM in the same OUTER APPLY as LAST_STAMP, exposing FIRMA (1 = Zeiterfassung/Büro). Three OUTER APPLYs reduced to two by combining MAX(BU_BU) with TOP 1 ORDER BY. Client model gains a firma boolean and the people-tile indicator appends "· Büro" or "· Home" next to the timestamp, but only when the user is logged in.
This commit is contained in:
+5
-1
@@ -859,7 +859,11 @@ class Availability {
|
||||
var pad = (n) => n.toString().padStart(2, '0');
|
||||
time = pad(d.getDate()) + '.' + pad(d.getMonth() + 1) + '. ' + pad(d.getHours()) + ':' + pad(d.getMinutes());
|
||||
}
|
||||
indicator.innerHTML = '<span class="tapi-dot ' + dotClass + '"></span><small>' + time + '</small>';
|
||||
var location = '';
|
||||
if (entry.loggedIn) {
|
||||
location = entry.firma ? ' · Büro' : ' · Home';
|
||||
}
|
||||
indicator.innerHTML = '<span class="tapi-dot ' + dotClass + '"></span><small>' + time + location + '</small>';
|
||||
}
|
||||
updateSquare(square) {
|
||||
var extension = square.dataset.tapiExtension;
|
||||
|
||||
Reference in New Issue
Block a user