|
|
|
|
@@ -4,15 +4,13 @@ var blob, newday, longrider;
|
|
|
|
|
var xinner = $("#GeoLocSaveXCOOR");
|
|
|
|
|
var yinner = $("#GeoLocSaveYCOOR");
|
|
|
|
|
|
|
|
|
|
var KalenderDatakonstrukt = [];
|
|
|
|
|
|
|
|
|
|
var ZeiterfassungDatakonstrukt = [];
|
|
|
|
|
var KlientDatakonstrukt = [];
|
|
|
|
|
var kalenderzwischenspeicher = [];
|
|
|
|
|
|
|
|
|
|
var klientzwischenspeicher = [];
|
|
|
|
|
|
|
|
|
|
var SetTimeoutTime = 10000;
|
|
|
|
|
|
|
|
|
|
var UpdatekalenderOid, Updatekalenderbetreff, Updatekalendernotice, UpdatekalenderstartZ, UpdatekalenderendZ, Updatekalenderday;
|
|
|
|
|
var timeOut = 10000;
|
|
|
|
|
|
|
|
|
|
function BuildCollapsibleSet(jsonString) {
|
|
|
|
|
try {
|
|
|
|
|
@@ -100,7 +98,7 @@ function showAjaxError(jqXHR, textStatus, errorThrown) {
|
|
|
|
|
// " Die Daten werden zwischengespeichert und beim nächsten Login an den Server gesendet. " + errorThrown,2);
|
|
|
|
|
//setTimeout(function () {
|
|
|
|
|
//showServiceRecords();
|
|
|
|
|
//}, SetTimeoutTime);
|
|
|
|
|
//}, timeOut);
|
|
|
|
|
//}
|
|
|
|
|
//else
|
|
|
|
|
toggleErrorPopup(jqXHR.status + " " + errorThrown);
|
|
|
|
|
@@ -1204,160 +1202,7 @@ function selectDate() {
|
|
|
|
|
loadAppointments(dp);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
array2 = new Array();
|
|
|
|
|
appointments = new Array();
|
|
|
|
|
|
|
|
|
|
function loadAppointments(newtoday) {
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "GET",
|
|
|
|
|
url: getSelectedKalenderUrl,
|
|
|
|
|
data: { newtoday: newtoday },
|
|
|
|
|
success: function (json) {
|
|
|
|
|
var kalenderRec = $.parseJSON(json);
|
|
|
|
|
|
|
|
|
|
var html = "";
|
|
|
|
|
|
|
|
|
|
$("#KalenderTable").empty();
|
|
|
|
|
|
|
|
|
|
var i = 0;
|
|
|
|
|
$.each(kalenderRec, function (index, termin) {
|
|
|
|
|
var description = termin.Subject;
|
|
|
|
|
var startD = termin.StartDate;
|
|
|
|
|
var endD = termin.EndDate;
|
|
|
|
|
var date = new Date(startD);
|
|
|
|
|
var dateend = new Date(endD);
|
|
|
|
|
|
|
|
|
|
console.log("" + index + ": " + startD.toString() + " - " + endD.toString());
|
|
|
|
|
|
|
|
|
|
var farbe = "2B508B";
|
|
|
|
|
|
|
|
|
|
appointments[termin.SchedulerAppointmentOid] = termin;
|
|
|
|
|
|
|
|
|
|
html +=
|
|
|
|
|
'<tr class="testklasse">' +
|
|
|
|
|
'<td class="kalender-td kalender-uhrzeit">' + getHoursAndMinutesWithLeadingZeros(date) + " - " + getHoursAndMinutesWithLeadingZeros(dateend).fontcolor(farbe) + "</td>" +
|
|
|
|
|
'<td class="kalender-td" onclick="appointmentOnClick(' + termin.SchedulerAppointmentOid + ')">' + description + "</td>" +
|
|
|
|
|
"</tr>";
|
|
|
|
|
|
|
|
|
|
i++;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$("#KalenderTable").append(html);
|
|
|
|
|
loadBeWoTask(newtoday);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function appointmentOnClick(appointmentOid) {
|
|
|
|
|
if(appointmentOid === null) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var selectedAppointment = appointments[appointmentOid];
|
|
|
|
|
|
|
|
|
|
if(selectedAppointment.RecurrenceInfo !== null) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var startDate = new Date(selectedAppointment.StartDate);
|
|
|
|
|
var endDate = new Date(selectedAppointment.EndDate);
|
|
|
|
|
|
|
|
|
|
var startTime = getHoursAndMinutesWithLeadingZeros(startDate);
|
|
|
|
|
var endTime = getHoursAndMinutesWithLeadingZeros(endDate);
|
|
|
|
|
|
|
|
|
|
UpdatekalenderOid = selectedAppointment.SchedulerAppointmentOid;
|
|
|
|
|
|
|
|
|
|
$("#AppointmentEditForm").css("display", "block");
|
|
|
|
|
$("#KalenderTable").css("display", "none");
|
|
|
|
|
$("#KalenderNavigation").css("display", "none");
|
|
|
|
|
$("#KalenderTableTask").css("display", "none");
|
|
|
|
|
$("#StartDate").val(getDateStringWithLeadingZeros(startDate));
|
|
|
|
|
$("#EndDate").val(getDateStringWithLeadingZeros(endDate));
|
|
|
|
|
|
|
|
|
|
$("#TerminStartZeit").val(startTime);
|
|
|
|
|
$("#TerminEndZeit").val(endTime);
|
|
|
|
|
$("#TerminBetreff").val(selectedAppointment.Subject);
|
|
|
|
|
$("#TerminNotiz").val(selectedAppointment.Description);
|
|
|
|
|
|
|
|
|
|
$("#TerminSpeichernAbbrechen").val("Schließen");
|
|
|
|
|
$("#TerminSpeichern").val("Speichern");
|
|
|
|
|
$("#TerminSpeichern").prop("disabled", true);
|
|
|
|
|
$("#TerminSpeichern").css("display", "inline");
|
|
|
|
|
|
|
|
|
|
$("#InsertAppointmentButton").css("display", "none");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function updateSelectedAppointment(){
|
|
|
|
|
Updatekalenderbetreff = $("#TerminBetreff").val();
|
|
|
|
|
Updatekalendernotice = $("#TerminNotiz").val();
|
|
|
|
|
UpdatekalenderstartZ = $("#TerminStartZeit").val();
|
|
|
|
|
UpdatekalenderendZ = $("#TerminEndZeit").val();
|
|
|
|
|
Updatekalenderday = $("#KalenderDatumFormat").val();
|
|
|
|
|
var newEndDate = $("#EndDate").val();
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "POST",
|
|
|
|
|
url: UpdateKalenderUrl,
|
|
|
|
|
data: {
|
|
|
|
|
oid: UpdatekalenderOid,
|
|
|
|
|
betreff: Updatekalenderbetreff,
|
|
|
|
|
notice: Updatekalendernotice,
|
|
|
|
|
startZeit: UpdatekalenderstartZ,
|
|
|
|
|
endZeit: UpdatekalenderendZ,
|
|
|
|
|
day: Updatekalenderday,
|
|
|
|
|
endDate: newEndDate
|
|
|
|
|
}, success: function() {
|
|
|
|
|
var dp = $("#KalenderDatumFormat").val();
|
|
|
|
|
var dateParts = dp.split(".");
|
|
|
|
|
var nextdatum2 = new Date(dateParts[2], (dateParts[1] - 1), dateParts[0]);
|
|
|
|
|
|
|
|
|
|
$("#KalenderDatum").val(toDateStringYearMonthDay(nextdatum2));
|
|
|
|
|
$("#KalenderDatumFormat").val(dp);
|
|
|
|
|
|
|
|
|
|
$("#AppointmentEditForm").css("display", "none");
|
|
|
|
|
$("#KalenderTable").css("display", "block");
|
|
|
|
|
$("#KalenderNavigation").css("display", "block");
|
|
|
|
|
$("#KalenderTableTask").css("display", "block");
|
|
|
|
|
|
|
|
|
|
loadAppointments(dp);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function updateAppointmentOnClick() {
|
|
|
|
|
if (checkAppointmentFields()) {
|
|
|
|
|
updateSelectedAppointment();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function insertAppointmentOnClick() {
|
|
|
|
|
if (checkAppointmentFields()) {
|
|
|
|
|
kalenderzwischenspeicher[0] = $("#StartDate").val();
|
|
|
|
|
kalenderzwischenspeicher[5] = $("#EndDate").val();
|
|
|
|
|
kalenderzwischenspeicher[1] = $("#TerminStartZeit").val();
|
|
|
|
|
kalenderzwischenspeicher[2] = $("#TerminEndZeit").val();
|
|
|
|
|
kalenderzwischenspeicher[3] = $("#TerminBetreff").val();
|
|
|
|
|
kalenderzwischenspeicher[4] = $("#TerminNotiz").val();
|
|
|
|
|
|
|
|
|
|
insertNewAppointment(kalenderzwischenspeicher[0], kalenderzwischenspeicher[1], kalenderzwischenspeicher[2], kalenderzwischenspeicher[3], kalenderzwischenspeicher[4], kalenderzwischenspeicher[5]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function checkAppointmentFields() {
|
|
|
|
|
var newTerminDatum = $("#StartDate").val();
|
|
|
|
|
var newEndDate = $("#EndDate").val();
|
|
|
|
|
var newTerminStartZeit = $("#TerminStartZeit").val();
|
|
|
|
|
var newTerminEndZeit = $("#TerminEndZeit").val();
|
|
|
|
|
var newTerminBetreff = $("#TerminBetreff").val();
|
|
|
|
|
|
|
|
|
|
if (newTerminDatum === "" || newEndDate === "" || newTerminStartZeit === "" || newTerminEndZeit === "" || newTerminBetreff === "") {
|
|
|
|
|
writeFatalErrorMessage("Bitte geben Sie Uhrzeit und Betreff ein.");
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function insertNewAppointment(datum, startZ, endZ, betreff, notice, endDate) {
|
|
|
|
|
$.ajax({
|
|
|
|
|
@@ -1945,21 +1790,21 @@ function submitDeletionForm() {
|
|
|
|
|
$("#deletionForm").submit();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function toggleErrorPopup(errorMessage, i , zeit) {
|
|
|
|
|
var isDisplayNone = $("#errorPopupDiv").css("display") == "none";
|
|
|
|
|
var displayValue = isDisplayNone ? "block" : "none";
|
|
|
|
|
function toggleErrorPopup(errorMessage, i, zeit) {
|
|
|
|
|
const isDisplayNone = $("#errorPopupDiv").css("display") === "none";
|
|
|
|
|
const displayValue = isDisplayNone ? "block" : "none";
|
|
|
|
|
|
|
|
|
|
$("#errorPopupDiv").css("display", displayValue);
|
|
|
|
|
$(".modalWrapper").css("display", displayValue);
|
|
|
|
|
$(".modalWrapper").css("height", $(document).height());
|
|
|
|
|
|
|
|
|
|
if (isDisplayNone ) {
|
|
|
|
|
if(isDisplayNone ) {
|
|
|
|
|
$("#errorPopupText").text(errorMessage);
|
|
|
|
|
|
|
|
|
|
if (i == 1) {
|
|
|
|
|
if (i === 1) {
|
|
|
|
|
$("#errorPopupTitle").text("Info");
|
|
|
|
|
$("#errorPopupOkBtn").onclick = "toggleErrorPopup('')";
|
|
|
|
|
} else if (i == 2) {
|
|
|
|
|
} else if (i === 2) {
|
|
|
|
|
$("#errorPopupTitle").text("Fehler");
|
|
|
|
|
$("#errorPopupOkBtn").onclick = "toggleErrorPopup('')";
|
|
|
|
|
|
|
|
|
|
@@ -1971,19 +1816,16 @@ function toggleErrorPopup(errorMessage, i , zeit) {
|
|
|
|
|
$("#errorPopupOkBtn").onclick = "toggleErrorPopup('')";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const errorPopupTitleOuterHeight = $("#errorPopupTitle").outerHeight();
|
|
|
|
|
const errorPopupTextOuterHeight = $("#errorPopupText").outerHeight();
|
|
|
|
|
const errorPopupButtonOuterHeight = $("#errorPopupBtnDiv").outerHeight();
|
|
|
|
|
const errorPopupOkButtonOuterHeight = $("#errorPopupOkBtn").outerHeight();
|
|
|
|
|
|
|
|
|
|
var h = 0;
|
|
|
|
|
var t = $("#errorPopupTitle").outerHeight();
|
|
|
|
|
var u = $("#errorPopupText").outerHeight();
|
|
|
|
|
var v = $("#errorPopupBtnDiv").outerHeight();
|
|
|
|
|
var w = $("#errorPopupOkBtn").outerHeight();
|
|
|
|
|
const height = errorPopupTitleOuterHeight + errorPopupTextOuterHeight + errorPopupButtonOuterHeight + errorPopupOkButtonOuterHeight + errorPopupOkButtonOuterHeight;
|
|
|
|
|
|
|
|
|
|
h += t + u + v + w + w;
|
|
|
|
|
$("#errorPopupDiv").css("height", height + "px");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#errorPopupDiv").css("height", h + "px");
|
|
|
|
|
|
|
|
|
|
$("#errorPopupDiv").css("top", window.pageYOffset + window.innerHeight / 2 - h / 2);
|
|
|
|
|
$("#errorPopupDiv").css("top", window.pageYOffset + window.innerHeight / 2 - height / 2);
|
|
|
|
|
$("#errorPopupDiv").css("margin-top", "0");
|
|
|
|
|
} else {
|
|
|
|
|
$("#errorPopupDiv").css("margin-top", "auto");
|
|
|
|
|
@@ -1991,8 +1833,8 @@ function toggleErrorPopup(errorMessage, i , zeit) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function toggleSuccessPopup(message, i) {
|
|
|
|
|
var isDisplayNone = $("#SuccessPopupDiv").css("display") == "none";
|
|
|
|
|
var displayValue = isDisplayNone ? "block" : "none";
|
|
|
|
|
const isDisplayNone = $("#SuccessPopupDiv").css("display") === "none";
|
|
|
|
|
const displayValue = isDisplayNone ? "block" : "none";
|
|
|
|
|
|
|
|
|
|
$("#SuccessPopupDiv").css("display", displayValue);
|
|
|
|
|
$(".modalWrapper").css("display", displayValue);
|
|
|
|
|
@@ -2000,35 +1842,35 @@ function toggleSuccessPopup(message, i) {
|
|
|
|
|
|
|
|
|
|
$("#SuccessPopupOkBtn").val("OK");
|
|
|
|
|
|
|
|
|
|
if (i == 2) {
|
|
|
|
|
if (i === 2) {
|
|
|
|
|
$(".SuccessPopupUSchrift").css("display", "none");
|
|
|
|
|
}
|
|
|
|
|
else if (i == 3) {
|
|
|
|
|
else if (i === 3) {
|
|
|
|
|
$(".SuccessPopupUSchrift").css("display", "none");
|
|
|
|
|
$("#SuccessPopupTitle").text("Es ist leider ein Fehler aufgetreten!");
|
|
|
|
|
}
|
|
|
|
|
else if (i == 4) {
|
|
|
|
|
else if (i === 4) {
|
|
|
|
|
$(".SuccessPopupUSchrift").css("display", "inline");
|
|
|
|
|
$("#SuccessPopupOkBtn").val("Nein");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
else {
|
|
|
|
|
$(".SuccessPopupUSchrift").css("display", "inline");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (isDisplayNone) {
|
|
|
|
|
$("#SuccessPopupText").text(message);
|
|
|
|
|
|
|
|
|
|
var h = 0;
|
|
|
|
|
var t = $("#SuccessPopupTitle").outerHeight();
|
|
|
|
|
var u = $("#SuccessPopupText").outerHeight();
|
|
|
|
|
var v = $("#SuccessPopupBtnDiv").outerHeight();
|
|
|
|
|
var w = $(".SuccessPopupOkBtn").outerHeight();
|
|
|
|
|
var x = $(".SuccessPopupUSchrift").outerHeight();
|
|
|
|
|
const successPopupTitleOuterHeight = $("#SuccessPopupTitle").outerHeight();
|
|
|
|
|
const successPopupTextOuterHeight = $("#SuccessPopupText").outerHeight();
|
|
|
|
|
const successPopupButtonOuterHeight = $("#SuccessPopupBtnDiv").outerHeight();
|
|
|
|
|
const successPopupOkButtonOuterHeight = $(".SuccessPopupOkBtn").outerHeight();
|
|
|
|
|
const successPopupSignatureButtonOuterHeight = $(".SuccessPopupUSchrift").outerHeight();
|
|
|
|
|
|
|
|
|
|
h += t + u + v + w + x;
|
|
|
|
|
const height = successPopupTitleOuterHeight + successPopupTextOuterHeight + successPopupButtonOuterHeight + successPopupOkButtonOuterHeight + successPopupSignatureButtonOuterHeight;
|
|
|
|
|
|
|
|
|
|
$("#SuccessPopupDiv").css("height", h + "px");
|
|
|
|
|
$("#SuccessPopupDiv").css("height", height + "px");
|
|
|
|
|
|
|
|
|
|
$("#SuccessPopupDiv").css("top", window.pageYOffset + window.innerHeight / 2 - h / 2);
|
|
|
|
|
$("#SuccessPopupDiv").css("top", window.pageYOffset + window.innerHeight / 2 - height / 2);
|
|
|
|
|
$("#SuccessPopupDiv").css("margin-top", "0");
|
|
|
|
|
} else {
|
|
|
|
|
$("#SuccessPopupDiv").css("margin-top", "auto");
|
|
|
|
|
@@ -2036,8 +1878,8 @@ function toggleSuccessPopup(message, i) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function AendereTerminPopup(message) {
|
|
|
|
|
var isDisplayNone = $("#AendernPopupDiv").css("display") == "none";
|
|
|
|
|
var displayValue = isDisplayNone ? "block" : "none";
|
|
|
|
|
const isDisplayNone = $("#AendernPopupDiv").css("display") === "none";
|
|
|
|
|
const displayValue = isDisplayNone ? "block" : "none";
|
|
|
|
|
|
|
|
|
|
$("#AendernPopupDiv").css("display", displayValue);
|
|
|
|
|
$(".modalWrapper").css("display", displayValue);
|
|
|
|
|
@@ -2046,18 +1888,17 @@ function AendereTerminPopup(message) {
|
|
|
|
|
if (isDisplayNone) {
|
|
|
|
|
$("#AendernPopupText").text(message);
|
|
|
|
|
|
|
|
|
|
var h = 0;
|
|
|
|
|
var t = $("#AendernPopupTitle").outerHeight();
|
|
|
|
|
var u = $("#AendernPopupText").outerHeight();
|
|
|
|
|
var v = $("#AendernPopupBtnDiv").outerHeight();
|
|
|
|
|
var w = $(".AendernPopupOkBtn").outerHeight();
|
|
|
|
|
var x = $(".AendernPopupUSchrift").outerHeight();
|
|
|
|
|
const aendernPopupTitleOuterHeight = $("#AendernPopupTitle").outerHeight();
|
|
|
|
|
const aenderPopupTextOuterHeight = $("#AendernPopupText").outerHeight();
|
|
|
|
|
const aendernPopupButtonDivOuterHeight = $("#AendernPopupBtnDiv").outerHeight();
|
|
|
|
|
const aendernPopupOkButtonOuterHeight = $(".AendernPopupOkBtn").outerHeight();
|
|
|
|
|
const aendernPopupSignatureOuterHeight = $(".AendernPopupUSchrift").outerHeight();
|
|
|
|
|
|
|
|
|
|
h += t + u + v + w + x;
|
|
|
|
|
const height = aendernPopupTitleOuterHeight + aenderPopupTextOuterHeight + aendernPopupButtonDivOuterHeight + aendernPopupOkButtonOuterHeight + aendernPopupSignatureOuterHeight;
|
|
|
|
|
|
|
|
|
|
$("#AendernPopupDiv").css("height", h + "px");
|
|
|
|
|
$("#AendernPopupDiv").css("height", height + "px");
|
|
|
|
|
|
|
|
|
|
$("#AendernPopupDiv").css("top", window.pageYOffset + window.innerHeight / 2 - h / 2);
|
|
|
|
|
$("#AendernPopupDiv").css("top", window.pageYOffset + window.innerHeight / 2 - height / 2);
|
|
|
|
|
$("#AendernPopupDiv").css("margin-top", "0");
|
|
|
|
|
} else {
|
|
|
|
|
$("#AendernPopupDiv").css("margin-top", "auto");
|
|
|
|
|
@@ -2097,21 +1938,21 @@ function preselectCustomer() {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function mitarbeiterLaden() {
|
|
|
|
|
var oid = parseInt($("#employeesDropDown").find(":selected").val());
|
|
|
|
|
function setSelectedEmployee() {
|
|
|
|
|
const oid = parseInt($("#employeesDropDown").find(":selected").val());
|
|
|
|
|
|
|
|
|
|
if (isNaN(oid)) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
serviceRecordEmployeeOid = oid;
|
|
|
|
|
window.serviceRecordEmployeeOid = oid;
|
|
|
|
|
|
|
|
|
|
makeAjaxCall("GET", setServiceRecordEmployeeUrl, function () { }, { employeeOid: serviceRecordEmployeeOid }, null);
|
|
|
|
|
makeAjaxCall("GET", setServiceRecordEmployeeUrl, null, { employeeOid: window.serviceRecordEmployeeOid }, null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SaveOnly() {
|
|
|
|
|
if (navigator.onLine == true) {
|
|
|
|
|
if(typeof (Storage) != "undefined") {
|
|
|
|
|
if (navigator.onLine === true) {
|
|
|
|
|
if(typeof(Storage) != "undefined") {
|
|
|
|
|
deleteLocalStorage(1);
|
|
|
|
|
|
|
|
|
|
var zahl = $("#scDropDown").val();
|
|
|
|
|
@@ -2125,27 +1966,26 @@ function SaveOnly() {
|
|
|
|
|
var notiz2, notiz3, notiz4, notiz5;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($("#notiz_textbox1").val() != "") {
|
|
|
|
|
if ($("#notiz_textbox1").val() !== "") {
|
|
|
|
|
notiz = $("#notiz_textbox1").val();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($("#notiz_textbox2").val() != "") {
|
|
|
|
|
if ($("#notiz_textbox2").val() !== "") {
|
|
|
|
|
notiz2 = $("#notiz_textbox2").val();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($("#notiz_textbox3").val() != "") {
|
|
|
|
|
if ($("#notiz_textbox3").val() !== "") {
|
|
|
|
|
notiz3 = $("#notiz_textbox3").val();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($("#notiz_textbox4").val() != "") {
|
|
|
|
|
if ($("#notiz_textbox4").val() !== "") {
|
|
|
|
|
notiz4 = $("#notiz_textbox4").val();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($("#notiz_textbox5").val() != "") {
|
|
|
|
|
if ($("#notiz_textbox5").val() !== "") {
|
|
|
|
|
notiz5 = $("#notiz_textbox5").val();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ZeiterfassungDatakonstrukt.push(zahl, hilfeplan, mitarbeiter, kategorie,
|
|
|
|
|
leistung, $("#datum_textbox").val(), $("#start_textbox").val(), $("#ende_textbox").val(),
|
|
|
|
|
duration, notiz, zahl, notiz2, notiz3, notiz4, notiz5, $("#enddatum_textbox").val());
|
|
|
|
|
@@ -2206,27 +2046,6 @@ function deleteLocalStorage(i) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function saveOnlyKalender() {
|
|
|
|
|
if (navigator.onLine) {
|
|
|
|
|
deleteLocalStorage(2);
|
|
|
|
|
|
|
|
|
|
const [terminDatum, terminStratZeit, terminEndZeit, terminBetreff, terminNotiz] = kalenderzwischenspeicher;
|
|
|
|
|
|
|
|
|
|
KalenderDatakonstrukt.push(terminDatum, terminStratZeit, terminEndZeit, terminBetreff, terminNotiz);
|
|
|
|
|
localStorage.setItem("Kalenderdaten", KalenderDatakonstrukt);
|
|
|
|
|
|
|
|
|
|
location.reload();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function insertNewAppointmentfterCrash(Datum, StartZ, EndZ, Betreff, Notice) {
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "GET",
|
|
|
|
|
url: setSelectedKalenderUrl,
|
|
|
|
|
data: { day: Datum, startZeit: StartZ, endZeit: EndZ, betreff: Betreff, notice: Notice }, success: function () { }, error: function () { }
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function saveZeiterfassungAfterCrash(datum,startd,endd,dauer,doku,leistung, oid, doku2,doku3,doku4,doku5,enddatum) {
|
|
|
|
|
var x = getDateObj(true);
|
|
|
|
|
var y = getDateObj(false);
|
|
|
|
|
@@ -2290,7 +2109,7 @@ function LoadOnly(i, x) {
|
|
|
|
|
saveZeiterfassungAfterCrash(zeit[6], zeit[7], zeit[8], zeit[8], zeit[10], zeit[5], zeit[11], zeit[12], zeit[13], zeit[14], zeit[15], zeit[16]);
|
|
|
|
|
deleteLocalStorage(1);
|
|
|
|
|
showServiceRecords();
|
|
|
|
|
}, SetTimeoutTime);
|
|
|
|
|
}, timeOut);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -2306,62 +2125,37 @@ function LoadOnly(i, x) {
|
|
|
|
|
insertNewAppointmentfterCrash(kalezeit[0], kalezeit[1], kalezeit[2], kalezeit[3], kalezeit[4]);
|
|
|
|
|
deleteLocalStorage(2);
|
|
|
|
|
showServiceRecords();
|
|
|
|
|
}, SetTimeoutTime);
|
|
|
|
|
}, timeOut);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function ErrorZeiterfassungAfterCrash() {
|
|
|
|
|
var errorwert = 1;
|
|
|
|
|
const errorAfterCrashSwitch = $("#ErrorZeiterfassungAfterCrashSchalter");
|
|
|
|
|
const switchValue = errorAfterCrashSwitch.val();
|
|
|
|
|
var errorMessage = "";
|
|
|
|
|
|
|
|
|
|
if (document.getElementById("ErrorZeiterfassungAfterCrashSchalter").value == 1 || document.getElementById("ErrorZeiterfassungAfterCrashSchalter").value == null || document.getElementById("ErrorZeiterfassungAfterCrashSchalter").value == 0) {
|
|
|
|
|
// Es soll nix passieren
|
|
|
|
|
console.log("Bin in error zeiterfassung ");
|
|
|
|
|
} else if (document.getElementById("ErrorZeiterfassungAfterCrashSchalter").value == 2) {
|
|
|
|
|
writeFatalErrorMessage("Es konnte keine Verbindung zum Server aufgebaut werden. Bitte überprüfen sie ihre Internet Verbindung.");
|
|
|
|
|
document.getElementById("ErrorZeiterfassungAfterCrashSchalter").value = 1;
|
|
|
|
|
deleteLocalStorage(1);
|
|
|
|
|
setTimeout(function(){
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "GET",
|
|
|
|
|
url: ErrorZeiterfassungAnzeigenUrl,
|
|
|
|
|
data: { errorwert: errorwert }
|
|
|
|
|
});
|
|
|
|
|
}, SetTimeoutTime);
|
|
|
|
|
} else if (document.getElementById("ErrorZeiterfassungAfterCrashSchalter").value == 3) {
|
|
|
|
|
writeFatalErrorMessage("Es konnte keine Verbindung zum Server aufgebaut werden. Bitte überprüfen Sie Ihre Internet Verbindung.");
|
|
|
|
|
document.getElementById("ErrorZeiterfassungAfterCrashSchalter").value = 1;
|
|
|
|
|
deleteLocalStorage(1);
|
|
|
|
|
setTimeout(function(){
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "GET",
|
|
|
|
|
url: ErrorZeiterfassungAnzeigenUrl,
|
|
|
|
|
data: { errorwert: errorwert }
|
|
|
|
|
});
|
|
|
|
|
}, SetTimeoutTime);
|
|
|
|
|
} else if (document.getElementById("ErrorZeiterfassungAfterCrashSchalter").value == 4) {
|
|
|
|
|
writeFatalErrorMessage("Das Datum liegt außerhalb des Zeitraumes des gewählten Hilfeplans. Der Eintrag kann nicht gespeichert werden.");
|
|
|
|
|
document.getElementById("ErrorZeiterfassungAfterCrashSchalter").value = 1;
|
|
|
|
|
if(switchValue === 2 || switchValue === 3) {
|
|
|
|
|
errorMessage = "Es konnte keine Verbindung zum Server aufgebaut werden. Bitte überprüfen sie ihre Internet Verbindung.";
|
|
|
|
|
} else if(switchValue === 4) {
|
|
|
|
|
errorMessage = "Das Datum liegt außerhalb des Zeitraumes des gewählten Hilfeplans. Der Eintrag kann nicht gespeichert werden.";
|
|
|
|
|
} else if(switchValue === 5) {
|
|
|
|
|
errorMessage = "Die eingegebene Uhrzeit ist ungültig. Der Eintrag kann nicht gespeichert werden.";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(errorAfterCrashSwitch.val() > 1) {
|
|
|
|
|
writeFatalErrorMessage(errorMessage);
|
|
|
|
|
|
|
|
|
|
errorAfterCrashSwitch.val(1);
|
|
|
|
|
deleteLocalStorage(1);
|
|
|
|
|
setTimeout(function(){
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "GET",
|
|
|
|
|
url: ErrorZeiterfassungAnzeigenUrl,
|
|
|
|
|
data: { errorwert: errorwert }
|
|
|
|
|
data: { errorwert: 1 }
|
|
|
|
|
});
|
|
|
|
|
}, SetTimeoutTime);
|
|
|
|
|
} else if (document.getElementById("ErrorZeiterfassungAfterCrashSchalter").value == 5) {
|
|
|
|
|
writeFatalErrorMessage("Die eingegebene Uhrzeit ist ungültig. Der Eintrag kann nicht gespeichert werden.");
|
|
|
|
|
document.getElementById("ErrorZeiterfassungAfterCrashSchalter").value = 1;
|
|
|
|
|
deleteLocalStorage(1);
|
|
|
|
|
setTimeout(function(){
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "GET",
|
|
|
|
|
url: ErrorZeiterfassungAnzeigenUrl,
|
|
|
|
|
data: { errorwert: errorwert }
|
|
|
|
|
});
|
|
|
|
|
}, SetTimeoutTime);
|
|
|
|
|
}, timeOut);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|