diff --git a/BeWo/ServiceProxy/Generated.cs b/BeWo/ServiceProxy/Generated.cs index a8d2cc95d..d037a83e7 100644 --- a/BeWo/ServiceProxy/Generated.cs +++ b/BeWo/ServiceProxy/Generated.cs @@ -322,6 +322,10 @@ namespace BeWo.ServiceProxy [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IEmployeeService/CountKrankheitstageBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] decimal CountKrankheitstage(BS.Shared.DataContracts.AbwesenheitsInformationDC infoDC); + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IEmployeeService/FindTeamByOid", ReplyAction="http://tempuri.org/IEmployeeService/FindTeamByOidResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IEmployeeService/FindTeamByOidBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] + BS.Shared.DataContracts.TeamDC FindTeamByOid(long teamOid, long employeeOid); + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IEmployeeService/CountUrlaubstage", ReplyAction="http://tempuri.org/IEmployeeService/CountUrlaubstageResponse")] [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IEmployeeService/CountUrlaubstageBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] decimal CountUrlaubstage(BS.Shared.DataContracts.AbwesenheitsInformationDC infoDC); @@ -902,6 +906,11 @@ namespace BeWo.ServiceProxy return base.Channel.CountKrankheitstage(infoDC); } + public BS.Shared.DataContracts.TeamDC FindTeamByOid(long teamOid, long employeeOid) + { + return base.Channel.FindTeamByOid(teamOid, employeeOid); + } + public decimal CountUrlaubstage(BS.Shared.DataContracts.AbwesenheitsInformationDC infoDC) { return base.Channel.CountUrlaubstage(infoDC); @@ -5449,6 +5458,21 @@ namespace BeWo.ServiceProxy "iterBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] BS.Shared.DataContracts.DienstplanerMonthlySummaryDC BerechneSollSaldoUndIstFuerEinzelnenMitarbeiter(out long stundenBeiAbwesenheitKey, out decimal stundenBeiAbwesenheitValue, System.DateTime date, long empOid, System.Collections.Generic.List dienstEintraege, System.Collections.Generic.List dienstvertretungen, System.Collections.Generic.List absenceTimes, System.Collections.Generic.List overtimes); + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetCustomerServiceRecordsWithStartEndDate", ReplyAction="http://tempuri.org/IOperationsService/GetCustomerServiceRecordsWithStartEndDateRe" + + "sponse")] + [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetCustomerServiceRecordsWithStartEndDateBe" + + "WoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] + System.Collections.Generic.List GetCustomerServiceRecordsWithStartEndDate(long pCustomerOid, long costbearer2SupportConceptOid, System.DateTime start, System.DateTime ende); + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetConfirmationReceiptSignatures", ReplyAction="http://tempuri.org/IOperationsService/GetConfirmationReceiptSignaturesResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetConfirmationReceiptSignaturesBeWoFaultFa" + + "ult", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] + System.Collections.Generic.List GetConfirmationReceiptSignatures(System.Collections.Generic.List oids); + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetRootAppointment", ReplyAction="http://tempuri.org/IOperationsService/GetRootAppointmentResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetRootAppointmentBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] + BS.Shared.DataContracts.SchedulerAppointmentDC GetRootAppointment(string recurrenceId); + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/VertretungsMitarbeiterListeWoechentlich", ReplyAction="http://tempuri.org/IOperationsService/VertretungsMitarbeiterListeWoechentlichResp" + "onse")] [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/VertretungsMitarbeiterListeWoechentlichBeWo" + @@ -6879,6 +6903,21 @@ namespace BeWo.ServiceProxy return base.Channel.BerechneSollSaldoUndIstFuerEinzelnenMitarbeiter(out stundenBeiAbwesenheitKey, out stundenBeiAbwesenheitValue, date, empOid, dienstEintraege, dienstvertretungen, absenceTimes, overtimes); } + public System.Collections.Generic.List GetCustomerServiceRecordsWithStartEndDate(long pCustomerOid, long costbearer2SupportConceptOid, System.DateTime start, System.DateTime ende) + { + return base.Channel.GetCustomerServiceRecordsWithStartEndDate(pCustomerOid, costbearer2SupportConceptOid, start, ende); + } + + public System.Collections.Generic.List GetConfirmationReceiptSignatures(System.Collections.Generic.List oids) + { + return base.Channel.GetConfirmationReceiptSignatures(oids); + } + + public BS.Shared.DataContracts.SchedulerAppointmentDC GetRootAppointment(string recurrenceId) + { + return base.Channel.GetRootAppointment(recurrenceId); + } + public System.Collections.Generic.List VertretungsMitarbeiterListeWoechentlich(System.DateTime start, System.DateTime ende) { return base.Channel.VertretungsMitarbeiterListeWoechentlich(start, ende); diff --git a/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user b/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user index 02caef65f..059ea230a 100644 --- a/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user +++ b/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user @@ -8,14 +8,14 @@ - Release|Any CPU + Debug|Any CPU ShowAllFiles 600 MvcControllerEmptyScaffolder root/Common/MVC/Controller 600 False - True + False False diff --git a/BeWoPlanerMobil/Global.asax.cs b/BeWoPlanerMobil/Global.asax.cs index fc871a623..172854eb6 100644 --- a/BeWoPlanerMobil/Global.asax.cs +++ b/BeWoPlanerMobil/Global.asax.cs @@ -24,7 +24,7 @@ namespace BeWoPlanerMobil FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); - + XmlConfigurator.Configure(); } diff --git a/BeWoPlanerMobil/Scripts/mobileUtils.js b/BeWoPlanerMobil/Scripts/mobileUtils.js index f380a2017..462242762 100644 --- a/BeWoPlanerMobil/Scripts/mobileUtils.js +++ b/BeWoPlanerMobil/Scripts/mobileUtils.js @@ -244,7 +244,7 @@ function cardHeaderClick(chevronId, cardBodyId) { toggleChevron(chevronId, cardBodyId); } catch(error) { - logError(error.message); + showErrorPopup(error); } } @@ -254,7 +254,7 @@ function cardHeaderButtonClick(cardBodyId) { $(cardBodyId).toggle(); } catch(error) { - logError(error.message); + showErrorPopup(error); } } @@ -269,7 +269,7 @@ function toggleChevron(chevronId, cardBodyId) { chevron.removeClass(iconToRemove); chevron.addClass(iconToAdd); } catch (error) { - logError(error.message); + showErrorPopup(error); } } @@ -287,7 +287,7 @@ function showCollapsable(collapsableElement) { collapsableElement.addClass("show"); } } catch (error) { - logError(error); + showErrorPopup(error); } } @@ -301,7 +301,7 @@ function hideCollapsable(collapsableElement) { collapsableElement.removeClass("show"); } } catch (error) { - logError(error.message); + showErrorPopup(error); } } @@ -361,7 +361,7 @@ function treeSearchOnChange(searchInputId, textClass, cardClass, nameLabelClass, $(item).hide(); }); } catch (error) { - logError(error); + showErrorPopup(error); } } @@ -378,6 +378,6 @@ function resetTreeSearch(searchInputId, textClass, cardClass) { hideCollapsable(collapsable); } catch (error) { - logError(error); + showErrorPopup(error); } } \ No newline at end of file diff --git a/BeWoPlanerMobil/Scripts/support-concept-statistics.js b/BeWoPlanerMobil/Scripts/support-concept-statistics.js index 64a6c2f64..4d0e7b468 100644 --- a/BeWoPlanerMobil/Scripts/support-concept-statistics.js +++ b/BeWoPlanerMobil/Scripts/support-concept-statistics.js @@ -46,7 +46,7 @@ function getSupportConceptStatistics(cb2ScRRelOid) { $("#statistic-canvas").hide(); } } catch (error) { - logError(error.message); + showErrorPopup(error); } }); } diff --git a/BeWoPlanerMobil/Scripts/utils/dateUtils.js b/BeWoPlanerMobil/Scripts/utils/dateUtils.js index b5e69dbd1..12e2ff0f0 100644 --- a/BeWoPlanerMobil/Scripts/utils/dateUtils.js +++ b/BeWoPlanerMobil/Scripts/utils/dateUtils.js @@ -24,7 +24,7 @@ function getDateFromPicker(pickerId) { return new Date(); } catch(error) { - logError(error.message); + showErrorPopup(error); } finally { return new Date(); } @@ -53,7 +53,7 @@ function getTimeFromPicker(pickerId) { } } } catch (error) { - logError(error.message); + showErrorPopup(error); } finally { return result; } @@ -91,7 +91,7 @@ function dateToShortDateString(date) { return dd + "." + mm + "." + yyyy; } } catch (error) { - logError("Fehler in dateToShortDateString:" + error.message); + showErrorPopup(error); } } @@ -109,7 +109,7 @@ function mergeDateAndTime(date, time) { result = new Date(year, month, day, hours, minutes, 0, 0); } } catch (error) { - logError(error.message); + showErrorPopup(error); } finally { return result; } diff --git a/BeWoPlanerMobil/Scripts/utils/js-helper.js b/BeWoPlanerMobil/Scripts/utils/js-helper.js index f5bba4118..ea594d5ca 100644 --- a/BeWoPlanerMobil/Scripts/utils/js-helper.js +++ b/BeWoPlanerMobil/Scripts/utils/js-helper.js @@ -63,7 +63,7 @@ function checkArraysForEquality(a1, a2) { return false; } catch(error) { - logError(error); + showErrorPopup(error); } finally { return false; } diff --git a/BeWoPlanerMobil/Scripts/utils/list-utils.js b/BeWoPlanerMobil/Scripts/utils/list-utils.js index 9b9cb1fb6..6a13cebbb 100644 --- a/BeWoPlanerMobil/Scripts/utils/list-utils.js +++ b/BeWoPlanerMobil/Scripts/utils/list-utils.js @@ -21,7 +21,7 @@ function changeItemListSelection(url, popupId, listId, itemIdPrefix, isCustomer, $("#one-day-scheduler-partial-container").load(filterAppointmentsUrl); }); } catch(error) { - logError("Fehler in changeItemListSelection: " + error.message); + showErrorPopup(error); } } @@ -78,7 +78,7 @@ function updateSelectedList(jsonResult, listId, itemIdPrefix, isCustomer, popupI list.append(html); }); } catch(error) { - logError("Fehler in updateSelectedList: " + error.message); + showErrorPopup(error); } } @@ -94,6 +94,6 @@ function removeSelectedItem(itemOid, itemSuffix, isCustomer, url, popupId, listI changeItemListSelection(url, popupId, listId, itemIdPrefix, isCustomer, itemSuffix, filterAppointmentsUrl, allItemsCheckBoxSuffix, teamMemberOids, allItemsCheckBoxId); } catch(error) { - logError("Fehler in removeSelectedItem: " + error); + showErrorPopup(error); } } \ No newline at end of file diff --git a/BeWoPlanerMobil/Scripts/utils/resources-list-utils.js b/BeWoPlanerMobil/Scripts/utils/resources-list-utils.js index 9242a0ed1..9485b6abe 100644 --- a/BeWoPlanerMobil/Scripts/utils/resources-list-utils.js +++ b/BeWoPlanerMobil/Scripts/utils/resources-list-utils.js @@ -75,6 +75,6 @@ function removeSelectedResource(listItemId, checkBoxId, popupId, url, listId, fe changeResourceSelection(popupId, url, listId, listItemIdPrefix, checkBoxIdPrefix, fetchAppointmentsUrl, selectAllCheckBoxId); } catch (error) { - logError(error); + showErrorPopup(error); } } diff --git a/BeWoPlanerMobil/Scripts/utils/service-record-time-calc.js b/BeWoPlanerMobil/Scripts/utils/service-record-time-calc.js index 30f1e4342..d62239fc4 100644 --- a/BeWoPlanerMobil/Scripts/utils/service-record-time-calc.js +++ b/BeWoPlanerMobil/Scripts/utils/service-record-time-calc.js @@ -70,7 +70,7 @@ function onDurationChange(startTimeId, endTimeId, startDateId, endDateId, durati $("#" + startDateId).val(startDate.format("DD.MM.yyyy")); } } catch(error) { - logError(error); + showErrorPopup(error); } } diff --git a/BeWoPlanerMobil/Scripts/view-scripts/main.js b/BeWoPlanerMobil/Scripts/view-scripts/main.js index 8f4d94e87..76f402731 100644 --- a/BeWoPlanerMobil/Scripts/view-scripts/main.js +++ b/BeWoPlanerMobil/Scripts/view-scripts/main.js @@ -14,8 +14,7 @@ function setSelectedEmployee() { $.get(getSetServiceRecordEmployeeUrl(), { employeeOid: employeeOid }); } -function checkJson(str) -{ +function checkJson(str) { try { JSON.parse(str); } catch (error) { @@ -165,7 +164,7 @@ function deleteServiceRecord(serviceRecordOid) { } function validateForm(form, prefix) { - if (form === undefined || form === null) { + if(form === undefined || form === null) { hideSpinner(); return; } @@ -180,31 +179,31 @@ function validateForm(form, prefix) { var isValid = true; - if (isNoticeMandatory) { - if (numberOfNoticeTextareas === 0) { + if(isNoticeMandatory) { + if(numberOfNoticeTextareas === 0) { var doku = $("#" + prefix + "dokufeld").val(); isValid = doku.length > 0; } else { - for (var i = 0; i < numberOfNoticeTextareas; i++) { + for(var i = 0; i < numberOfNoticeTextareas; i++) { var d = $("#" + prefix + "doku-textarea-" + i).val(); isValid = d.length > 0; - if (isValid) { + if(isValid) { break; } } } - if (isValid === false) { + if(isValid === false) { errorMessage = "Bitte füllen Sie " + (numberOfNoticeTextareas > 1 ? "mindestens ein" : "das") + " Dokumentationsfeld aus.
"; } } var startAndEndDates = getStartAndEndDate(prefix); - if (startAndEndDates === null && isValid) { + if(startAndEndDates === null && isValid) { isValid = false; errorMessage += "Die Datums- und / oder Zeitangaben sind nicht korrekt.
"; } @@ -224,28 +223,21 @@ function validateForm(form, prefix) { return; } - logDebug("startAndEndDates !== null && isValid: " + (startAndEndDates !== null && isValid)); - if(startAndEndDates !== null && isValid) { var start = startAndEndDates[0]; var end = startAndEndDates[1]; - logDebug("Validiere Eingaben auf dem Server"); $.get(getCheckRightsUrl(), { von: start.format("DD.MM.YYYY"), bis: end.format("DD.MM.YYYY"), inEditMode: isInEditingMode, dateString: start.format("DD.MM.YYYY"), startString: start.format("HH:mm"), endString: end.format("HH:mm") }).done(function (result) { - logDebug("Eingaben auf dem Server validiert"); var message = $.parseJSON(result); - if (message.Message === null) { - logDebug("Message-Eigenschaft der Serverantwort ist null. Schicke Formular zum Server"); + if(message.Message === null) { form.submit(); } else { - logDebug("Message-Eigenschaft der Serverantwort hat einen Wert. Beende Warteanimation"); hideSpinner(); var kannTrotzdemGespeichertWerden = message.KannTrotzdemGespeichertWerden; var testCallback = function () { - logDebug("Kann trotzdem gespeichert werden: " + kannTrotzdemGespeichertWerden); $("#messagePopup .modal-body").html(); if(kannTrotzdemGespeichertWerden) { showSpinner(); @@ -253,7 +245,7 @@ function validateForm(form, prefix) { } }; - if (kannTrotzdemGespeichertWerden) { + if(kannTrotzdemGespeichertWerden) { showWarningMessageBox("Fehler", message.Message, testCallback, false); } else { showAlertMessageBox("Fehler", message.Message, testCallback, false); @@ -268,7 +260,7 @@ function showGoalRatingPopup(goalOid) { $("#goal-rating-popup").modal("show"); $("#goal-to-rate-oid").val(goalOid); } catch (error) { - logError(error.message); + showErrorPopup(error); } } @@ -276,7 +268,7 @@ function hideGoalRatingPopup() { try { $("#goal-rating-popup").modal("hide"); } catch (error) { - logError(error.message); + showErrorPopup(error); } } @@ -296,8 +288,8 @@ function rateGoal(ratingTypeOid) { $("#goal-to-rate-oid").val(""); } ); - } catch (error) { - logError(error.message); + } catch(error) { + showErrorPopup(error); } } @@ -327,7 +319,7 @@ function getCheckedGoals() { var box = $(checkbox); var id = box.attr("id"); - if (box.prop("checked") === true && !id.includes("goal")) { + if(box.prop("checked") === true && !id.includes("goal")) { selectedGoals += id + ";"; } }); @@ -355,7 +347,7 @@ function checkNumberInput(inputId) { // Wird bei der Validierung des Formulars benutzt function getStartAndEndDate(prefix) { - if (prefix === undefined || prefix === null) { + if(prefix === undefined || prefix === null) { prefix = ""; } @@ -366,7 +358,7 @@ function getStartAndEndDate(prefix) { // Bei leeren Start- und Endfeldern. Muss ein Dummydate zurückgeben, // damit das Speichern ohne Angabe der Start- und Endzeit möglich ist. - if ($("#" + prefix + "start-time").val().length === 0 || $("#" + prefix + "end-time").val().length === 0) { + if($("#" + prefix + "start-time").val().length === 0 || $("#" + prefix + "end-time").val().length === 0) { var bareDate = new Date(); bareDate.setHours(0); @@ -458,7 +450,7 @@ function supportConceptSearchOnChange() { }); } catch (error) { - logError(error.message); + showErrorPopup(error); } } @@ -467,7 +459,7 @@ function resetSupportConceptSearch() { $("#support-concept-search-input").val(""); $(".blubb-test").show(); } catch (error) { - logError(error.message); + showErrorPopup(error); } } @@ -487,7 +479,7 @@ function getSignatureImage(serviceRecordOid, signatureOid) { $("#signature-img-popup").modal("show"); }); } catch (error) { - logError(error.message); + showErrorPopup(error); } } @@ -499,6 +491,6 @@ function setServiceDescription(id) { $.get(url, { pServiceDescriptionOid: selectedServiceDescription}); } catch (error) { - logError(error.message); + showErrorPopup(error); } } \ No newline at end of file diff --git a/BeWoPlanerMobil/Scripts/view-scripts/report.js b/BeWoPlanerMobil/Scripts/view-scripts/report.js index 338ee2ca9..2e3550b9e 100644 --- a/BeWoPlanerMobil/Scripts/view-scripts/report.js +++ b/BeWoPlanerMobil/Scripts/view-scripts/report.js @@ -52,8 +52,8 @@ function hideSigningParts(canSign) { $(".signingContent").show(); } } - } catch (error) { - logError("Fehler hideSigningParts: " + error.message); + } catch(error) { + showErrorPopup(error); } } @@ -179,8 +179,7 @@ function getSignatures(signatureOidStrings, containerId) { hideSpinner(); }); } catch(error) { - logError("Fehler getSignatures: " + error.message); - hideSpinner(); + showErrorPopup(error); } } @@ -202,8 +201,8 @@ function cancelSignature(canSign, signaturePad) { signaturePad.clear(); }, false); - } catch (ex) { - logError("Fehler getSignatures: " + ex); + } catch (error) { + showErrorPopup(error); } } @@ -262,8 +261,8 @@ function showSignaturePad(overwrite, signatureOidsString, canSign, cardBodyId, c clearButton.addEventListener("click", function() { signaturePad.clear(); }); - } catch (ex) { - logError("Fehler showSignaturePad: " + ex); + } catch(error) { + showErrorPopup(error); } } @@ -304,12 +303,12 @@ function saveSignature(customerOid, isEmployeeSignature, overwrite, signaturePad } }); } catch (innerEx) { - logError("Popup callback: " + innerEx); + showErrorPopup(innerEx); } }, false); } catch (ex) { - logError("saveSignature: " + ex); + showErrorPopup(ex); } } \ No newline at end of file diff --git a/BeWoPlanerMobil/Scripts/view-scripts/scheduler.js b/BeWoPlanerMobil/Scripts/view-scripts/scheduler.js index 71582d567..d742ec445 100644 --- a/BeWoPlanerMobil/Scripts/view-scripts/scheduler.js +++ b/BeWoPlanerMobil/Scripts/view-scripts/scheduler.js @@ -158,8 +158,7 @@ function validateAppointmentForm() { return; } } catch(error) { - console.log("%c" + error.message, "color:red;"); - hideSpinner(); + showErrorPopup(error); return; } } @@ -237,7 +236,7 @@ function listSearchOnChange(searchInputId, entryClass, textClass) { } }); } catch (error) { - logError(error.message); + showErrorPopup(error); } } @@ -246,6 +245,6 @@ function resetSearch(searchInputId, entryClass) { $("#" + searchInputId).val(""); $("." + entryClass).show(); } catch (error) { - logError(error.message); + showErrorPopup(error); } } \ No newline at end of file diff --git a/BeWoPlanerMobil/Util/FormCollectionConstants.cs b/BeWoPlanerMobil/Util/FormCollectionConstants.cs index 1b198bedf..5d973c31c 100644 --- a/BeWoPlanerMobil/Util/FormCollectionConstants.cs +++ b/BeWoPlanerMobil/Util/FormCollectionConstants.cs @@ -59,6 +59,7 @@ public static string MainModelKey => "MainModel"; public static string DevelopmentModelKey => "DevelopmentModel"; public static string DevExpressReportModelKey => "DevExpressReportModel"; + public static string ReportViewerModelKey => "ReportViewerModel"; } public class SessionConstants diff --git a/BeWoPlanerMobil/Views/Customer/Customer.cshtml b/BeWoPlanerMobil/Views/Customer/Customer.cshtml index 6ffdbba94..59cab0b6e 100644 --- a/BeWoPlanerMobil/Views/Customer/Customer.cshtml +++ b/BeWoPlanerMobil/Views/Customer/Customer.cshtml @@ -42,8 +42,7 @@ showSpinner(); $("#stammdaten-form").submit(); } catch(error) { - hideSpinner(); - logError(error); + showErrorPopup(error); } } diff --git a/BeWoPlanerMobil/Views/Main/GoalTreePartial.cshtml b/BeWoPlanerMobil/Views/Main/GoalTreePartial.cshtml index 726cedd44..92c11b3e0 100644 --- a/BeWoPlanerMobil/Views/Main/GoalTreePartial.cshtml +++ b/BeWoPlanerMobil/Views/Main/GoalTreePartial.cshtml @@ -8,7 +8,7 @@ try { $(branchId).collapse("toggle"); } catch(error) { - logError(error); + showErrorPopup(error); } } @@ -16,7 +16,7 @@ try { e.stopPropagation(); } catch(error) { - logError(error); + showErrorPopup(error);; } } @@ -74,7 +74,7 @@ } }); } catch(error) { - logError(error); + showErrorPopup(error); } } @@ -91,7 +91,7 @@ hideCollapsable(collapsable); } catch (error) { - logError(error); + showErrorPopup(error); } } diff --git a/BeWoPlanerMobil/Views/Main/Main.cshtml b/BeWoPlanerMobil/Views/Main/Main.cshtml index 5c3b09cb3..b5b4333fd 100644 --- a/BeWoPlanerMobil/Views/Main/Main.cshtml +++ b/BeWoPlanerMobil/Views/Main/Main.cshtml @@ -237,7 +237,7 @@ } } } catch(error) { - logError(error); + showErrorPopup(error); } }); @@ -340,7 +340,7 @@ }); } } catch (error) { - logError(error); + showErrorPopup(error); } } @@ -352,7 +352,7 @@ $("#signature-text").html(""); }); } catch(error) { - logError(error); + showErrorPopup(error); } } diff --git a/BeWoPlanerMobil/Views/Main/MultiBookingPartial.cshtml b/BeWoPlanerMobil/Views/Main/MultiBookingPartial.cshtml index ea23b5e32..51f7255e8 100644 --- a/BeWoPlanerMobil/Views/Main/MultiBookingPartial.cshtml +++ b/BeWoPlanerMobil/Views/Main/MultiBookingPartial.cshtml @@ -28,7 +28,7 @@ calculateDuration(true, 'mb-start-time', 'mb-end-time', 'mb-duration', 'mb-hours-minutes-dropdown-btn', 'mb-start-date-picker', 'mb-end-date-picker', false, false); }); } catch(error) { - logError(error); + showErrorPopup(error); } }); @@ -66,7 +66,7 @@ $.get("@Url.Action("AddSupportConceptCostBearerRelationsToMultiBooking")", { pRelOids: scOidString, pGroupOids: groupOidString }).done(updateMultiBookingCb2ScList); } catch(error) { - logError(error); + showErrorPopup(error); } } @@ -107,7 +107,7 @@ updateMultiBookingGroupList(multiBookingSelectionObject); } catch (error) { - logError(error); + showErrorPopup(error); } } @@ -143,7 +143,7 @@ activateMultiBookingForm(); } } catch (error) { - logError(error); + showErrorPopup(error); } } @@ -167,7 +167,7 @@ updateMultiBookingGroupList($.parseJSON(result)); }); } catch (error) { - logError(error); + showErrorPopup(error); } } @@ -197,7 +197,7 @@ $("#multi-booking-create-button").prop("disabled", numberOfSelectedEmployees === "0" ? true : false); }); } catch (error) { - logError(error); + showErrorPopup(error); } } @@ -205,7 +205,7 @@ try { $("#multi-booking-employees-button, #mb-category-select, #mb-leistung-select, #mb-start-date, #mb-end-date, #mb-start-time, #mb-end-time, #mb-duration, #mb-distance, textarea, #mb-reset-button, #mb-create-button, #mb-textbausteine-button, #mb-hours-minutes-dropdown-btn").prop("disabled", true); } catch (error) { - logError(error); + showErrorPopup(error); } } @@ -213,7 +213,7 @@ try { $("#multi-booking-employees-button, #mb-category-select, #mb-leistung-select, #mb-start-date, #mb-end-date, #mb-start-time, #mb-end-time, #mb-duration, #mb-distance, textarea, #mb-reset-button, #mb-create-button, #mb-textbausteine-button, #mb-hours-minutes-dropdown-btn").prop("disabled", false); } catch (error) { - logError(error); + showErrorPopup(error); } } @@ -246,7 +246,7 @@ }); }); } catch (error) { - logError(error); + showErrorPopup(error); } } diff --git a/BeWoPlanerMobil/Views/Main/SingleBookingPartial.cshtml b/BeWoPlanerMobil/Views/Main/SingleBookingPartial.cshtml index a36ae9245..6aaa1d061 100644 --- a/BeWoPlanerMobil/Views/Main/SingleBookingPartial.cshtml +++ b/BeWoPlanerMobil/Views/Main/SingleBookingPartial.cshtml @@ -604,7 +604,7 @@ try { initializeIntervalSelection(); } catch(error) { - logError(error); + showErrorPopup(error); } } @@ -645,7 +645,7 @@ } } catch (error) { - logError(error); + showErrorPopup(error); } } @@ -695,8 +695,7 @@ break; } } catch (error) { - logError(error); - hideSpinner(); + showErrorPopup(error); } } diff --git a/BeWoPlanerMobil/Views/Report/QuittierungsbelegsResultPartial.cshtml b/BeWoPlanerMobil/Views/Report/QuittierungsbelegsResultPartial.cshtml index 70d52a507..fd9be24e3 100644 --- a/BeWoPlanerMobil/Views/Report/QuittierungsbelegsResultPartial.cshtml +++ b/BeWoPlanerMobil/Views/Report/QuittierungsbelegsResultPartial.cshtml @@ -12,7 +12,7 @@ $("#delCSigForm-" + resultIdentifier).submit(); }, false); } catch(error) { - logError(error); + showErrorPopup(error); } } @@ -25,7 +25,7 @@ $("#delESigForm-" + resultIdentifier).submit(); }, false); } catch(error) { - logError(error); + showErrorPopup(error); } } diff --git a/BeWoPlanerMobil/Views/Report/Report.cshtml b/BeWoPlanerMobil/Views/Report/Report.cshtml index 1f1b538d8..1a2b32d59 100644 --- a/BeWoPlanerMobil/Views/Report/Report.cshtml +++ b/BeWoPlanerMobil/Views/Report/Report.cshtml @@ -67,7 +67,7 @@ try { $("#report-signatures-container").load("@Url.Action("LoadServiceOverview")"); } catch (error) { - logError(error); + showErrorPopup(error); } } @@ -86,7 +86,7 @@ $(".sm-report-prepend-input-group-text").width(newWidth); } catch (error) { - logError(error); + showErrorPopup(error); } } @@ -98,7 +98,7 @@ $.get("@Url.Action("ChangeIsForSelectedEmployeesOnly")", { isForSelectedEmployeeOnly: isChecked, employeeOid: employeeOid}); } catch (error) { - logError(error); + showErrorPopup(error); } } @@ -110,7 +110,7 @@ $.get("@Url.Action("ChangeIsForSelectedOrganisationOnly")", { isForSelectedOrganisationOnly: isChecked, organisationOid: organisationOid}); } catch(error) { - logError(error); + showErrorPopup(error); } } @@ -122,7 +122,7 @@ $.get("@Url.Action("ChangeIsForSelectedServiceCategoryOnly")", { isForSelectedServiceCategoryOnly: isChecked, serviceCategoryOid: serviceCategoryOid}); } catch(error) { - logError(error); + showErrorPopup(error); } } @@ -135,7 +135,7 @@ logWarning("employeeOid '" + employeeOid + "' ist nicht numerisch!"); } } catch(error) { - logError(error); + showErrorPopup(error); } } @@ -148,7 +148,7 @@ logWarning("organisationOid '" + organisationOid + "' ist nicht numerisch!"); } } catch(error) { - logError(error); + showErrorPopup(error); } } @@ -161,7 +161,7 @@ logWarning("serviceCategoryOid '" + serviceCategoryOid + "' ist nicht numerisch!"); } } catch (error) { - logError(error); + showErrorPopup(error); } } diff --git a/BeWoPlanerMobil/Views/Scheduler/AppointmentFormPartial.cshtml b/BeWoPlanerMobil/Views/Scheduler/AppointmentFormPartial.cshtml index f82785996..e00fac7b4 100644 --- a/BeWoPlanerMobil/Views/Scheduler/AppointmentFormPartial.cshtml +++ b/BeWoPlanerMobil/Views/Scheduler/AppointmentFormPartial.cshtml @@ -6,7 +6,7 @@ try { $("#scheduler-start-time, #scheduler-end-time").attr("disabled", $("#IsAllDay").prop("checked")); } catch (error) { - logError(error.message); + showErrorPopup(error); } } @@ -24,7 +24,7 @@ $(".scheduler-form-prepend-text").width(width); } catch(error) { - logError(error); + showErrorPopup(error); } } @@ -369,7 +369,7 @@ $("#employee-search-input").val(""); $(".employee-text").show(); } catch (error) { - logError(error.message); + showErrorPopup(error); } } @@ -393,7 +393,7 @@ } }); } catch(error) { - logError(error.message); + showErrorPopup(error); } } @@ -405,7 +405,7 @@ changeEmployeeListSelection(); } catch(error) { - logError(error); + showErrorPopup(error); } } @@ -422,7 +422,7 @@ $("#one-day-scheduler-partial-container").load('@Url.Action("FetchAppointments", "Scheduler")'); }); } catch(error) { - logError(error); + showErrorPopup(error); } } @@ -461,7 +461,7 @@ list.append(html); }); } catch (error) { - logError(error); + showErrorPopup(error); } } @@ -475,7 +475,7 @@ changeEmployeeListSelection(); } catch (error) { - logError(error); + showErrorPopup(error); } } @@ -499,7 +499,7 @@ changeEmployeeListSelection(); }); } catch(error) { - logError(error); + showErrorPopup(error); } } diff --git a/BeWoPlanerMobil/Views/Scheduler/AppointmentIntervalFinderPartial.cshtml b/BeWoPlanerMobil/Views/Scheduler/AppointmentIntervalFinderPartial.cshtml index 2bffb5350..aeeb6b2b6 100644 --- a/BeWoPlanerMobil/Views/Scheduler/AppointmentIntervalFinderPartial.cshtml +++ b/BeWoPlanerMobil/Views/Scheduler/AppointmentIntervalFinderPartial.cshtml @@ -53,7 +53,7 @@ $("#hidden-submit-btn").click(); } } catch(error) { - logError(error.message); + showErrorPopup(error); } } @@ -106,7 +106,7 @@ validationAlert.collapse("show"); } } catch(error) { - logError(error.message); + showErrorPopup(error); } finally { return isValid; } @@ -132,7 +132,7 @@ return null; } catch (error) { - logError(error); + showErrorPopup(error); } } @@ -164,7 +164,7 @@ changeItemListSelection('@Url.Action("SelectEmployeesForIntervalFinder", "Scheduler")', 'employees-interval-finder-popup', 'selected-employees-interval-finder-list', 'related-employee-interval-finder-', false, '-interval-finder-checkbox', '@Url.Action("FetchAppointments", "Scheduler")'); }); } catch(error) { - logError(error); + showErrorPopup(error); } } diff --git a/BeWoPlanerMobil/Views/Scheduler/CustomerFilterSelectionPartial.cshtml b/BeWoPlanerMobil/Views/Scheduler/CustomerFilterSelectionPartial.cshtml index 2c30c8f04..18204ccd8 100644 --- a/BeWoPlanerMobil/Views/Scheduler/CustomerFilterSelectionPartial.cshtml +++ b/BeWoPlanerMobil/Views/Scheduler/CustomerFilterSelectionPartial.cshtml @@ -8,7 +8,7 @@ $("#customer-search-input2").val(""); $(".customer-text2").show(); } catch (error) { - logError(error.message); + showErrorPopup(error); } } @@ -19,7 +19,7 @@ $("#customers-for-filtering-container").load('@Url.Action("FetchCustomerFilteringModalBody")'); } } catch (error) { - logError(error.message); + showErrorPopup(error); } } @@ -43,7 +43,7 @@ } }); } catch (error) { - logError(error.message); + showErrorPopup(error); } } @@ -78,7 +78,7 @@ $("#customer-count2").text(customerCount); }); } catch (error) { - logError(error.message); + showErrorPopup(error); } } @@ -90,7 +90,7 @@ selectCustomersForFiltering(); } catch (error) { - logError(error.message); + showErrorPopup(error); } } diff --git a/BeWoPlanerMobil/Views/Scheduler/EmployeeForFilteringPartial.cshtml b/BeWoPlanerMobil/Views/Scheduler/EmployeeForFilteringPartial.cshtml index 56bebb4bc..85a965b8a 100644 --- a/BeWoPlanerMobil/Views/Scheduler/EmployeeForFilteringPartial.cshtml +++ b/BeWoPlanerMobil/Views/Scheduler/EmployeeForFilteringPartial.cshtml @@ -10,7 +10,7 @@ closeEmployeeForFilteringPopup(); } catch (error) { - logError(error.message); + showErrorPopup(error); } } @@ -27,7 +27,7 @@ }); } } catch (error) { - logError(error.message); + showErrorPopup(error); } } @@ -51,7 +51,7 @@ } }); } catch (error) { - logError(error.message); + showErrorPopup(error); } } @@ -88,7 +88,7 @@ $("#employe-count2").text(employeeCount); }); } catch (error) { - logError(error.message); + showErrorPopup(error); } } @@ -101,7 +101,7 @@ selectEmployeesForFiltering(); } catch (error) { - logError(error.message); + showErrorPopup(error); } } @@ -111,7 +111,7 @@ updateEmployeeForFilteringPopup(); }); } catch(error) { - logError(error); + showErrorPopup(error); } } diff --git a/BeWoPlanerMobil/Views/Scheduler/OneDaySchedulerPartial.cshtml b/BeWoPlanerMobil/Views/Scheduler/OneDaySchedulerPartial.cshtml index dcde53a55..4a49f8131 100644 --- a/BeWoPlanerMobil/Views/Scheduler/OneDaySchedulerPartial.cshtml +++ b/BeWoPlanerMobil/Views/Scheduler/OneDaySchedulerPartial.cshtml @@ -16,7 +16,7 @@ submitDeletionForm(appointmentIdentifier, false); } } catch(error) { - logError(error); + showErrorPopup(error); } } @@ -27,7 +27,7 @@ $("#delete-occurring-appoinment-popup").modal("hide"); }); } catch(error) { - logError(error); + showErrorPopup(error); } } @@ -37,8 +37,7 @@ $("#transformAppToServiceRecForm-" + appointmentIdentifier).submit(); } catch(error) { - hideSpinner(); - logError(error); + showErrorPopup(error); } } diff --git a/BeWoPlanerMobil/Views/Scheduler/Scheduler.cshtml b/BeWoPlanerMobil/Views/Scheduler/Scheduler.cshtml index cd872742a..e202a36e8 100644 --- a/BeWoPlanerMobil/Views/Scheduler/Scheduler.cshtml +++ b/BeWoPlanerMobil/Views/Scheduler/Scheduler.cshtml @@ -87,7 +87,7 @@ changeResourceSelection(popupId, url, listId, itemIdPrefix, checkBoxIdSuffix, filterAppointmentsUrl, checkboxId); } } catch(error) { - logError(error); + showErrorPopup(error); } } @@ -107,7 +107,7 @@ changeResourceSelection('resources-popup2', '@Url.Action("SelectResourcesForAppointmentFiltering")', null, null, '-checkbox2', '@Url.Action("FetchAppointments")', 'all-resources-checkbox2', 'all-resources-checkbox2'); } catch (error) { - logError(error); + showErrorPopup(error); } } @@ -127,7 +127,7 @@ $("#employees-popup2").modal("show"); $("#collapsable-teams-selection2").attr("class", "collapse"); } catch (error) { - logError(error); + showErrorPopup(error); } } @@ -136,7 +136,7 @@ $("#employees-popup2").modal("hide"); $("#collapsable-teams-selection2").attr("class", "collapse"); } catch (error) { - logError(error); + showErrorPopup(error); } } @@ -150,7 +150,7 @@ $("#collapsable-teams-selection2").attr("class", "collapse,show"); } } catch (error) { - logError(error); + showErrorPopup(error); } } @@ -162,7 +162,7 @@ }); } catch(error) { - logError(error); + showErrorPopup(error); } } diff --git a/BeWoPlanerMobil/Views/Shared/_Layout.cshtml b/BeWoPlanerMobil/Views/Shared/_Layout.cshtml index 84fdb4fff..7f133075c 100644 --- a/BeWoPlanerMobil/Views/Shared/_Layout.cshtml +++ b/BeWoPlanerMobil/Views/Shared/_Layout.cshtml @@ -1,6 +1,5 @@ @using BeWoPlanerMobil.Controllers @using BeWoPlanerMobil.Models -@using BeWoPlanerMobil.Util @@ -18,10 +17,10 @@ - + @@ -30,7 +29,7 @@ - + @@ -48,49 +47,41 @@ - - @*@Html.DevExpress().GetStyleSheets( - new StyleSheet { ExtensionSuite = ExtensionSuite.NavigationAndLayout }, - new StyleSheet { ExtensionSuite = ExtensionSuite.Editors }, - new StyleSheet { ExtensionSuite = ExtensionSuite.HtmlEditor }, - new StyleSheet { ExtensionSuite = ExtensionSuite.GridView }, - new StyleSheet { ExtensionSuite = ExtensionSuite.PivotGrid }, - new StyleSheet { ExtensionSuite = ExtensionSuite.Chart }, - new StyleSheet { ExtensionSuite = ExtensionSuite.Report }, - new StyleSheet { ExtensionSuite = ExtensionSuite.Scheduler }, - new StyleSheet { ExtensionSuite = ExtensionSuite.TreeList }, - new StyleSheet { ExtensionSuite = ExtensionSuite.Spreadsheet }, - new StyleSheet { ExtensionSuite = ExtensionSuite.SpellChecker } - ) - - @Html.DevExpress().GetScripts( - new Script { ExtensionSuite = ExtensionSuite.NavigationAndLayout }, - new Script { ExtensionSuite = ExtensionSuite.HtmlEditor }, - new Script { ExtensionSuite = ExtensionSuite.GridView }, - new Script { ExtensionSuite = ExtensionSuite.PivotGrid }, - new Script { ExtensionSuite = ExtensionSuite.Editors }, - new Script { ExtensionSuite = ExtensionSuite.Chart }, - new Script { ExtensionSuite = ExtensionSuite.Report }, - new Script { ExtensionSuite = ExtensionSuite.Scheduler }, - new Script { ExtensionSuite = ExtensionSuite.TreeList }, - new Script { ExtensionSuite = ExtensionSuite.Spreadsheet }, - new Script { ExtensionSuite = ExtensionSuite.SpellChecker } - )*@ - - @**@ - @@ -259,17 +250,17 @@ + + @RenderBody() diff --git a/BeWoPlanerMobil/package-lock.json b/BeWoPlanerMobil/package-lock.json index dc03ca22e..6be97ab35 100644 --- a/BeWoPlanerMobil/package-lock.json +++ b/BeWoPlanerMobil/package-lock.json @@ -1,234 +1,8 @@ { "name": "bewoplanermobil", "version": "1.0.0", - "lockfileVersion": 2, + "lockfileVersion": 1, "requires": true, - "packages": { - "": { - "name": "bewoplanermobil", - "version": "1.0.0", - "license": "ISC", - "dependencies": { - "bootstrap": "^4.4.1", - "globalize": "^1.7.0", - "sass": "^1.27.0" - } - }, - "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "engines": { - "node": ">=8" - } - }, - "node_modules/bootstrap": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.4.1.tgz", - "integrity": "sha512-tbx5cHubwE6e2ZG7nqM3g/FZ5PQEDMWmMGNrCUBVRPHXTJaH7CBDdsLeu3eCh3B1tzAxTnAbtmrzvWEvT2NNEA==", - "engines": { - "node": ">=6" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/bootstrap" - }, - "peerDependencies": { - "jquery": "1.9.1 - 3", - "popper.js": "^1.16.0" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/cldrjs": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/cldrjs/-/cldrjs-0.5.5.tgz", - "integrity": "sha512-KDwzwbmLIPfCgd8JERVDpQKrUUM1U4KpFJJg2IROv89rF172lLufoJnqJ/Wea6fXL5bO6WjuLMzY8V52UWPvkA==" - }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/globalize": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/globalize/-/globalize-1.7.0.tgz", - "integrity": "sha512-faR46vTIbFCeAemyuc9E6/d7Wrx9k2ae2L60UhakztFg6VuE42gENVJNuPFtt7Sdjrk9m2w8+py7Jj+JTNy59w==", - "dependencies": { - "cldrjs": "^0.5.4" - } - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/sass": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.27.0.tgz", - "integrity": "sha512-0gcrER56OkzotK/GGwgg4fPrKuiFlPNitO7eUJ18Bs+/NBlofJfMxmxqpqJxjae9vu0Wq8TZzrSyxZal00WDig==", - "dependencies": { - "chokidar": ">=2.0.0 <4.0.0" - }, - "bin": { - "sass": "sass.js" - }, - "engines": { - "node": ">=8.9.0" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - } - }, "dependencies": { "anymatch": { "version": "3.1.2", @@ -247,8 +21,7 @@ "bootstrap": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.4.1.tgz", - "integrity": "sha512-tbx5cHubwE6e2ZG7nqM3g/FZ5PQEDMWmMGNrCUBVRPHXTJaH7CBDdsLeu3eCh3B1tzAxTnAbtmrzvWEvT2NNEA==", - "requires": {} + "integrity": "sha512-tbx5cHubwE6e2ZG7nqM3g/FZ5PQEDMWmMGNrCUBVRPHXTJaH7CBDdsLeu3eCh3B1tzAxTnAbtmrzvWEvT2NNEA==" }, "braces": { "version": "3.0.2", diff --git a/Service/Security/SecurityUtils.cs b/Service/Security/SecurityUtils.cs index ac2a414e2..3568d54ab 100644 --- a/Service/Security/SecurityUtils.cs +++ b/Service/Security/SecurityUtils.cs @@ -73,16 +73,27 @@ namespace BeWo.Service.Security { var guid = Guid.NewGuid(); - string tokendata = string.Format("expdate={0};guid={1};tenant={2};user={3};password={4};permalink={5};link={6}", DateTime.Now.AddMinutes(10), guid, - MultitenancyOperationContextExt.Current.Tenant, - LoggedInUserOperationContextExt.Current.User.LoginName, - LoggedInUserOperationContextExt.Current.User.RC2EncryptedHash, - ispermalink, - Utils.GetSHA256(link)); + string loginName, rc2EncryptedHash; + var tenant = MultitenancyOperationContextExt.Current is null ? SessionFacade.Tenant : MultitenancyOperationContextExt.Current.Tenant; + + if(LoggedInUserOperationContextExt.Current is null) + { + loginName = SessionFacade.LoggedInUser.LoginName; + rc2EncryptedHash = SessionFacade.LoggedInUser.RC2EncryptedHash; + } + else + { + loginName = LoggedInUserOperationContextExt.Current.User.LoginName; + rc2EncryptedHash = LoggedInUserOperationContextExt.Current.User.RC2EncryptedHash; + } + + var tokendata = $"expdate={DateTime.Now.AddMinutes(10)};guid={guid};tenant={tenant};user={loginName};password={rc2EncryptedHash};permalink={ispermalink};link={Utils.GetSHA256(link)}"; return HttpUtility.UrlEncode(EncryptString(tokendata)); } + + public static bool CheckToken(string token, string link) { if (string.IsNullOrEmpty(token))