Intervallfinder überarbeitet & Bug gefixt, der zu einem Fehler beim Suchen nach freien Intervallen über mehrere Tage geführt hatte, wenn die Enduhrzeit vor der Startuhrzeit lag. Berichte mit Parametern. Verbesserte Mitarbeiter-, Klienten-, Team-, und Organisationsdropdowns mit Suche. Quittierungsbelegresultate (zum Unterschreiben) wird wie die Zeiterfassung paginiert. FaC: neuer Kalender noch nicht fertig.
42 lines
1.3 KiB
JavaScript
42 lines
1.3 KiB
JavaScript
function resetEntitySearch(cancelButtonJQueryObject) {
|
|
try {
|
|
const button = cancelButtonJQueryObject;
|
|
const inputGroupAppend = button.parent();
|
|
const inputGroup = inputGroupAppend.parent();
|
|
const modalBody = inputGroup.parent();
|
|
const input = inputGroupAppend.siblings("input");
|
|
|
|
input.val("");
|
|
modalBody.children(".list-group").children(".list-group-item").show();
|
|
} catch(error) {
|
|
window.showErrorPopup(error);
|
|
}
|
|
}
|
|
|
|
function onEntitySearchInput(searchInput) {
|
|
try {
|
|
const input = $(searchInput);
|
|
const modalBody = input.parent().parent();
|
|
|
|
var searchText = input.val();
|
|
|
|
if(searchText === null || searchText === undefined || searchText.length === 0) {
|
|
modalBody.find(".list-group").children(".list-group-item").show();
|
|
return;
|
|
}
|
|
|
|
const listGroupItems = modalBody.find(".list-group").children(".list-group-item").show();
|
|
|
|
listGroupItems.hide();
|
|
|
|
searchText = searchText.toLowerCase();
|
|
|
|
$.each(listGroupItems, function (index, item) {
|
|
if($(item).text().toLowerCase().includes(searchText)) {
|
|
$(item).show();
|
|
}
|
|
});
|
|
} catch(error) {
|
|
window.showErrorPopup(error);
|
|
}
|
|
} |