From 2e1457d84d5189d8f0f4d29dcb9162bcf7df47f7 Mon Sep 17 00:00:00 2001 From: Lyndon Jetten Date: Wed, 22 Jan 2025 16:42:02 +0100 Subject: [PATCH] MoK: Marker-Bug behoben. --- BeWoPlanerMobil/BeWoPlanerMobil.csproj | 2 +- BeWoPlanerMobil/Controllers/MainController.cs | 8 +++-- .../Scripts/ownSoft-Scripts/mobileUtils.js | 6 ++-- BeWoPlanerMobil/Views/Main/Main.cshtml | 32 +++++++++++++++++-- .../Views/Main/SingleBookingPartial.cshtml | 26 +-------------- 5 files changed, 41 insertions(+), 33 deletions(-) diff --git a/BeWoPlanerMobil/BeWoPlanerMobil.csproj b/BeWoPlanerMobil/BeWoPlanerMobil.csproj index f1ee55223..a1c5ed314 100644 --- a/BeWoPlanerMobil/BeWoPlanerMobil.csproj +++ b/BeWoPlanerMobil/BeWoPlanerMobil.csproj @@ -708,7 +708,7 @@ - False + True False 8808 / diff --git a/BeWoPlanerMobil/Controllers/MainController.cs b/BeWoPlanerMobil/Controllers/MainController.cs index e60f94cc5..63941f904 100644 --- a/BeWoPlanerMobil/Controllers/MainController.cs +++ b/BeWoPlanerMobil/Controllers/MainController.cs @@ -2336,7 +2336,9 @@ namespace BeWoPlanerMobil.Controllers var formId = formCollection[FormCollectionConstants.FormIdKey]; - var marker = formCollection[FormCollectionConstants.MarkerKey]; + var markerRaw = formCollection[FormCollectionConstants.MarkerKey]; + var marker = "on" == markerRaw; + var serviceDescription = formCollection[FormCollectionConstants.ServiceDescriptionKey]; var startHoursDt = ConvertTimeStringToDateTime(start); @@ -2376,6 +2378,8 @@ namespace BeWoPlanerMobil.Controllers checkServiceRecord = new ServiceRecordDC(); } + checkServiceRecord.ServiceRecordType = marker ? ServiceRecordTypeId.Content : ServiceRecordTypeId.DefaultActivity; + checkServiceRecord.Notice = doku1; checkServiceRecord.Notice2 = doku2; checkServiceRecord.Notice3 = doku3; @@ -2735,7 +2739,7 @@ namespace BeWoPlanerMobil.Controllers [FormCollectionConstants.DurationKey] = durationRaw, [FormCollectionConstants.DistanceKey] = distanceRaw, [FormCollectionConstants.BetragKey] = betragRaw, - [FormCollectionConstants.MarkerKey] = marker, + [FormCollectionConstants.MarkerKey] = markerRaw, [FormCollectionConstants.ServiceDescriptionKey] = serviceDescription, [FormCollectionConstants.Dokumentation1Key] = doku1, [FormCollectionConstants.Dokumentation2Key] = doku2, diff --git a/BeWoPlanerMobil/Scripts/ownSoft-Scripts/mobileUtils.js b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/mobileUtils.js index 7d8603bab..6cceeafdb 100644 --- a/BeWoPlanerMobil/Scripts/ownSoft-Scripts/mobileUtils.js +++ b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/mobileUtils.js @@ -273,8 +273,8 @@ function cardHeaderClick2(element, callback) { return; } - var chevronDown = $(element).find(".fa-chevron-down"); - var chevronUp = $(element).find(".fa-chevron-up"); + const chevronDown = $(element).find(".fa-chevron-down"); + const chevronUp = $(element).find(".fa-chevron-up"); chevronDown.removeClass("fa-chevron-down").addClass("fa-chevron-up"); @@ -286,7 +286,7 @@ function cardHeaderClick2(element, callback) { callback(); } } catch (error) { - showErrorPopup(error); + window.showErrorPopup(error); } } diff --git a/BeWoPlanerMobil/Views/Main/Main.cshtml b/BeWoPlanerMobil/Views/Main/Main.cshtml index 55be0fab4..621269fc1 100644 --- a/BeWoPlanerMobil/Views/Main/Main.cshtml +++ b/BeWoPlanerMobil/Views/Main/Main.cshtml @@ -25,6 +25,30 @@ }
@@ -794,10 +822,10 @@ } else { - + } - +
diff --git a/BeWoPlanerMobil/Views/Main/SingleBookingPartial.cshtml b/BeWoPlanerMobil/Views/Main/SingleBookingPartial.cshtml index 812ed9897..149d2ba02 100644 --- a/BeWoPlanerMobil/Views/Main/SingleBookingPartial.cshtml +++ b/BeWoPlanerMobil/Views/Main/SingleBookingPartial.cshtml @@ -103,30 +103,6 @@ } } - function loadServiceRecords() { - try { - const selectedOption = $("#timeFrameSelect").val(); - const start = $("#time-frame-start-date").val(); - const end = $("#time-frame-end-date").val(); - const dayCount = $("#day-count-number").val(); - const year = $("#year-select").val(); - const month = $("#month-select").val(); - - if(areUndefinedOrNull([dayCount, start, end, month, year, selectedOption])) { - return; - } - - showSpinner(); - - $("#service-record-list-container").load("@Url.Action("LoadServiceRecordsNonPost")", {dayCountNumber: dayCount, start: start, end: end, month: parseInt(month), year: parseInt(year), recordsKey: parseInt(selectedOption)}, - () => { - hideSpinner(); - }); - } catch (error) { - window.showErrorPopup(error); - } - } - function initializeIntervalSelection() { try { const selectedOption = $("#timeFrameSelect option:selected").val(); @@ -304,7 +280,7 @@
- @Html.PopupWithSearchForIFilterables(Model.AllEmployees, "setSelectedEmployeeForSingleBooking", null, Model.SelectedEmployee?.DetailDescription, "single-booking-employee-modal-popup") + @Html.PopupWithSearchForIFilterables(Model.Employees, "setSelectedEmployeeForSingleBooking", null, Model.SelectedEmployee?.DetailDescription, "single-booking-employee-modal-popup")