Globalen Exception-Handler im MoK hinzugefügt und das Fehlerfenster in alle Catch-Teile eingebaut.

This commit is contained in:
2023-03-08 20:17:19 +01:00
parent 4a31af06f0
commit 90203d56ad
30 changed files with 256 additions and 425 deletions

View File

@@ -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<BS.Shared.DataContracts.DienstEintragDC> dienstEintraege, System.Collections.Generic.List<BS.Shared.DataContracts.DienstvertretungDC> dienstvertretungen, System.Collections.Generic.List<BS.Shared.DataContracts.AbsenceTimeDC> absenceTimes, System.Collections.Generic.List<BS.Shared.DataContracts.OvertimeDC> 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<BS.Shared.DataContracts.ServiceRecordDC> 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<BS.Shared.DataContracts.ConfirmationReceiptSignatureDC> GetConfirmationReceiptSignatures(System.Collections.Generic.List<long> 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<BS.Shared.DataContracts.ServiceRecordDC> GetCustomerServiceRecordsWithStartEndDate(long pCustomerOid, long costbearer2SupportConceptOid, System.DateTime start, System.DateTime ende)
{
return base.Channel.GetCustomerServiceRecordsWithStartEndDate(pCustomerOid, costbearer2SupportConceptOid, start, ende);
}
public System.Collections.Generic.List<BS.Shared.DataContracts.ConfirmationReceiptSignatureDC> GetConfirmationReceiptSignatures(System.Collections.Generic.List<long> oids)
{
return base.Channel.GetConfirmationReceiptSignatures(oids);
}
public BS.Shared.DataContracts.SchedulerAppointmentDC GetRootAppointment(string recurrenceId)
{
return base.Channel.GetRootAppointment(recurrenceId);
}
public System.Collections.Generic.List<BS.Shared.DataContracts.VertretungsListeMitarbeiterItemsDC> VertretungsMitarbeiterListeWoechentlich(System.DateTime start, System.DateTime ende)
{
return base.Channel.VertretungsMitarbeiterListeWoechentlich(start, ende);

View File

@@ -8,14 +8,14 @@
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<ProjectView>ShowAllFiles</ProjectView>
<WebStackScaffolding_ViewDialogWidth>600</WebStackScaffolding_ViewDialogWidth>
<Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID>
<Controller_SelectedScaffolderCategoryPath>root/Common/MVC/Controller</Controller_SelectedScaffolderCategoryPath>
<WebStackScaffolding_ControllerDialogWidth>600</WebStackScaffolding_ControllerDialogWidth>
<WebStackScaffolding_IsLayoutPageSelected>False</WebStackScaffolding_IsLayoutPageSelected>
<WebStackScaffolding_IsPartialViewSelected>True</WebStackScaffolding_IsPartialViewSelected>
<WebStackScaffolding_IsPartialViewSelected>False</WebStackScaffolding_IsPartialViewSelected>
<WebStackScaffolding_IsReferencingScriptLibrariesSelected>False</WebStackScaffolding_IsReferencingScriptLibrariesSelected>
<WebStackScaffolding_LayoutPageFile>
</WebStackScaffolding_LayoutPageFile>

View File

@@ -24,7 +24,7 @@ namespace BeWoPlanerMobil
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
XmlConfigurator.Configure();
}

View File

@@ -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);
}
}

View File

@@ -46,7 +46,7 @@ function getSupportConceptStatistics(cb2ScRRelOid) {
$("#statistic-canvas").hide();
}
} catch (error) {
logError(error.message);
showErrorPopup(error);
}
});
}

View File

@@ -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;
}

View File

@@ -63,7 +63,7 @@ function checkArraysForEquality(a1, a2) {
return false;
} catch(error) {
logError(error);
showErrorPopup(error);
} finally {
return false;
}

View File

@@ -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);
}
}

View File

@@ -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);
}
}

View File

@@ -70,7 +70,7 @@ function onDurationChange(startTimeId, endTimeId, startDateId, endDateId, durati
$("#" + startDateId).val(startDate.format("DD.MM.yyyy"));
}
} catch(error) {
logError(error);
showErrorPopup(error);
}
}

View File

@@ -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.<br/>";
}
}
var startAndEndDates = getStartAndEndDate(prefix);
if (startAndEndDates === null && isValid) {
if(startAndEndDates === null && isValid) {
isValid = false;
errorMessage += "Die Datums- und / oder Zeitangaben sind nicht korrekt.<br/>";
}
@@ -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);
}
}

View File

@@ -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);
}
}

View File

@@ -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);
}
}

View File

@@ -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

View File

@@ -42,8 +42,7 @@
showSpinner();
$("#stammdaten-form").submit();
} catch(error) {
hideSpinner();
logError(error);
showErrorPopup(error);
}
}

View File

@@ -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);
}
}
</script>

View File

@@ -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);
}
}

View File

@@ -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);
}
}
</script>

View File

@@ -604,7 +604,7 @@
try {
initializeIntervalSelection();
} catch(error) {
logError(error);
showErrorPopup(error);
}
</text>
}
@@ -645,7 +645,7 @@
}
}
catch (error) {
logError(error);
showErrorPopup(error);
}
}
@@ -695,8 +695,7 @@
break;
}
} catch (error) {
logError(error);
hideSpinner();
showErrorPopup(error);
}
}
</script>

View File

@@ -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);
}
}
</script>

View File

@@ -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);
}
}
</script>

View File

@@ -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);
}
}
</script>
@@ -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);
}
}
</script>

View File

@@ -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);
}
}
</script>

View File

@@ -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);
}
}
</script>

View File

@@ -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);
}
}
</script>

View File

@@ -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);
}
}
</script>

View File

@@ -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);
}
}
</script>

View File

@@ -1,6 +1,5 @@
@using BeWoPlanerMobil.Controllers
@using BeWoPlanerMobil.Models
@using BeWoPlanerMobil.Util
<!DOCTYPE html>
<html>
<head>
@@ -18,10 +17,10 @@
<script src="@Url.Content("~/Scripts/jquery-ui-1.13.0.min.js")"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.js")"></script>
<script src="@Url.Content("~/Scripts/src-min/ace.js")"></script>
<script src="@Url.Content("~/Scripts/devexpress-scripts/knockout-3.5.1.js")"></script>
<script src="@Url.Content("~/node_modules/cldrjs/dist/cldr.js")"></script>
<script src="@Url.Content("~/node_modules/cldrjs/dist/cldr/event.js")"></script>
<script src="@Url.Content("~/node_modules/globalize/dist/globalize.js")"></script>
<script src="@Url.Content("~/Scripts/devexpress-scripts/knockout-3.5.1.js")"></script>
<script src="~/Scripts/umd/popper.min.js"></script>
<script src="~/node_modules/bootstrap/dist/js/bootstrap.js" type="text/javascript"></script>
@@ -30,7 +29,7 @@
<script src="~/Scripts/moment.min.js"></script>
<script src="~/Scripts/locale/de.js?v=1.18"></script>
<script src="~/Scripts/group-booking.js?v=1.18"></script>
<script src="~/Scripts/view-scripts/main.js?v=1.18"></script>
<script src="~/Scripts/view-scripts/main.js?v=1.19"></script>
<script src="~/Scripts/signature.js?v=1.18"></script>
<script src="~/Scripts/tempusdominus-boostrap-4.min.js"></script>
<link rel="stylesheet" href="~/Content/tempusdominus-bootstrap-4.min.css" />
@@ -48,49 +47,41 @@
<script src="~/Scripts/utils/js-helper.js?v=1.18"></script>
<script src="~/Scripts/utils/logging.js?v=1.18"></script>
@*@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 }
)*@
@*<script type="text/javascript">
function UpdateSchedulerHeight() {
scheduler.SetHeight(1);
var containerHeight = ASPxClientUtils.GetDocumentClientHeight();
if (document.body.scrollHeight > containerHeight) {
containerHeight = document.body.scrollHeight;
}
scheduler.SetHeight(containerHeight);
}
</script>*@
<script>
window.addEventListener("error", (event) => {
hideSpinner();
var textToShow = "Message: " + event.message + "\r\n" +
"File name: " + event.filename + "\r\n" +
"Line: " + event.lineno + "\r\n" +
"Column: " + event.colno + "\r\n" +
"Stack: " + event.error.stack;
configureErrorPopup(textToShow);
});
function copyErrorToClipboard() {
var element = document.querySelector("#fehlerdetail-textarea");
element.select();
element.setSelectionRange(0, 99999);
document.execCommand("copy");
}
function showErrorPopup(error) {
hideSpinner();
var textToShow = "name: " + error.name + ";\r\nmessage: " + error.message + ";\r\nstack: " + error.stack;
configureErrorPopup(textToShow);
}
function configureErrorPopup(textToShow) {
$("#fehlerdetail-textarea").text(textToShow);
$("#error-message-popup").modal("show");
}
$(document).ready(function() {
try {
var timeoutInMilliseconds = parseInt("@AbstractBaseController.TimeoutLimit", 10) * 60 * 1000;
@@ -134,7 +125,7 @@
calcPrependWidth();
} catch (error) {
console.log("%c" + error.message, "font-size:12px;color:red;font-weight:bold;");
showErrorPopup(error);
}
});
@@ -189,7 +180,7 @@
return result;
} catch(error) {
logError(error);
showErrorPopup(error);
}
}
@@ -220,7 +211,7 @@
$(".sm-prepend-input-group-text").width(initialVonWidth);
}
} catch(error) {
logError(error);
showErrorPopup(error);
}
}
@@ -228,7 +219,7 @@
try {
return Math.max.apply(Math, $('.' + elementClassName).map(function () { return $(this).width(); }).get());
} catch (error) {
logError(error);
showErrorPopup(error);
}
}
</script>
@@ -259,17 +250,17 @@
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
@*@if(Html.IsInDebugMode())
{
using(Html.BeginForm("RedirectToDevExpressScheduler", "Main", FormMethod.Post))
{
<li class="nav-item">
<button class="btn btn-link text-light no-underline" onclick="showSpinner()">
<i class="fas fa-hand-middle-finger"></i>
Scheduler
</button>
</li>
}
}*@
{
using(Html.BeginForm("RedirectToDevExpressScheduler", "Main", FormMethod.Post))
{
<li class="nav-item">
<button class="btn btn-link text-light no-underline" onclick="showSpinner()">
<i class="fas fa-hand-middle-finger"></i>
Scheduler
</button>
</li>
}
}*@
@if(AbstractModel.IsAllowedToSeeCustomers)
{
@@ -376,6 +367,35 @@
</div>
</div>
<div class="modal" tabindex="-1" role="dialog" id="error-message-popup">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title text-danger">Es ist ein Fehler aufgetreten</h5>
<button class="close" type="button" data-dismiss="modal" aria-label="close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>
Es ist leider ein unbekannter Fehler aufgetreten. Prüfen Sie Ihre Internetverbindung oder versuchen Sie es später erneut. Wir sind stets bemüht, das Programm zu verbessern, daher freuen wir uns auch, wenn Sie die Fehlerdetails unten in einer Mail an <a href="mailto:support@bewoplaner.de" id="error-popup-mailto">support@bewoplaner.de</a> senden.
</p>
<hr/>
<div class="form-group">
<label for="fehlerdetail-textarea">Fehlerdetails:</label>
<textarea class="form-control font-italic text-monospace" style="height: 20em;" id="fehlerdetail-textarea"></textarea>
</div>
</div>
<div class="modal-footer">
<div class="clearfix w-100">
<button class="btn btn-primary float-left" type="button" onclick="copyErrorToClipboard()">In die Zwischenablage kopieren</button>
<button class="btn btn-primary float-right" type="button" data-dismiss="modal">OK</button>
</div>
</div>
</div>
</div>
</div>
@RenderBody()
</body>
</html>

View File

@@ -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",

View File

@@ -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))