From 255d0d7c7a2ed8ba9a67cd5057b74205e12e75e2 Mon Sep 17 00:00:00 2001 From: Lyndon Jetten Date: Tue, 19 Dec 2023 10:58:34 +0100 Subject: [PATCH] =?UTF-8?q?PSM-Quittierungsbeleg=20alle=20Unterschriften?= =?UTF-8?q?=20werden=20jetzt=20angezeigt=20MoK:=20Betreuung=20beim=20Klien?= =?UTF-8?q?ten=20hinzugef=C3=BCgt,=20ist=20aber=20bisher=20nur=20im=20Debu?= =?UTF-8?q?g-Modus=20sichtbar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BeWoPlanerMobil/Controllers/MainController.cs | 19 ++- .../ownSoft-Scripts/view-scripts/main.js | 46 ++++++- .../Views/Customer/Customer.cshtml | 2 +- .../Customer/CustomerBetreuungPartial.cshtml | 124 ++++++++---------- .../PSM/QuittierungsbelegMitDatum.Designer.cs | 1 - Service/Plugins/PluginLoader.cs | 6 +- 6 files changed, 120 insertions(+), 78 deletions(-) diff --git a/BeWoPlanerMobil/Controllers/MainController.cs b/BeWoPlanerMobil/Controllers/MainController.cs index bbfc7fb77..274066908 100644 --- a/BeWoPlanerMobil/Controllers/MainController.cs +++ b/BeWoPlanerMobil/Controllers/MainController.cs @@ -1952,6 +1952,11 @@ namespace BeWoPlanerMobil.Controllers return; } + if(Model.IsInGroupBookingMode || Model.IsInMultiBookingMode) + { + return; + } + Model.ServiceRecords = new List(); if(Model.CostBearer2SupportConceptOid.HasValue && Model.CostBearer2SupportConceptOid.Value == -1) @@ -1976,6 +1981,7 @@ namespace BeWoPlanerMobil.Controllers OperationsService.GetEmployeesServiceRecordsWithStartEndDate(Model.Employee.EmployeeOid.Value, Model.SelectedZeitraum.StartDate.Value, Model.SelectedZeitraum.EndDate.Value).ToList() : OperationsService.GetEmployeesServiceRecords2(Model.Employee.EmployeeOid.Value, selectedDayCount).ToList(); } + // ToDo: Nicht bei Gruppenbuchung! else { records = Model.ServiceRecordTimeInterval == ServiceRecordTimeInterval.ZeitraumWaehlen || Model.ServiceRecordTimeInterval == ServiceRecordTimeInterval.Monatsauswahl ? @@ -2110,8 +2116,9 @@ namespace BeWoPlanerMobil.Controllers return SerializeObject(serviceRecord2Monatsunterschrift); } + // ToDo: Dokutexte übergeben! [Authorize] - public string CheckRights(string von, string bis, bool inEditMode, string dateString, string startString, string endString) + public string CheckRights(string von, string bis, bool inEditMode, string dateString, string startString, string endString, string doku1, string doku2, string doku3, string doku4, string doku5) { if (Model is null) { @@ -2150,16 +2157,22 @@ namespace BeWoPlanerMobil.Controllers } var checkServiceRecord = new ServiceRecordDC(); - if (inEditMode) + if(inEditMode) { checkServiceRecord = Model.ServiceRecords.FirstOrDefault(f => f.ServiceRecordOid.HasValue && f.ServiceRecordOid.Value.Equals(Model.SelectedServiceRecordOid)); } - if (checkServiceRecord is null) + if(checkServiceRecord is null) { checkServiceRecord = new ServiceRecordDC(); } + checkServiceRecord.Notice = doku1; + checkServiceRecord.Notice2 = doku2; + checkServiceRecord.Notice3 = doku3; + checkServiceRecord.Notice4 = doku4; + checkServiceRecord.Notice5 = doku5; + checkServiceRecord.Goals = Model.SelectedGoals; checkServiceRecord.Start = startDt; diff --git a/BeWoPlanerMobil/Scripts/ownSoft-Scripts/view-scripts/main.js b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/view-scripts/main.js index f24506a2c..10ec43641 100644 --- a/BeWoPlanerMobil/Scripts/ownSoft-Scripts/view-scripts/main.js +++ b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/view-scripts/main.js @@ -227,7 +227,8 @@ function validateForm(form, prefix) { var start = startAndEndDates[0]; var end = startAndEndDates[1]; - $.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) { + var [doku1, doku2, doku3, doku4, doku5] = getDokuTexte(); + $.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"), doku1, doku2, doku3, doku4, doku5 }).done(function (result) { var message = $.parseJSON(result); if(message.Message === null) { @@ -255,6 +256,49 @@ function validateForm(form, prefix) { } } +function getDokuTexte() { + try { + var noticeList = [null, null, null, null, null]; + + var isMultiBooking = $("#mb-dokufeld").length > 0 || $("#mb-doku-textarea-0").length > 0; + + var multiBookingPrefix = isMultiBooking ? "mb-" : ""; + + var hasMultipleDokufelder = $("#" + multiBookingPrefix + "dokufeld").length === 0; + + var dokufeldCounter = 0; + + if(hasMultipleDokufelder) { + for(var i = 0; i < 5; i++) { + var dokufeld = $("#" + multiBookingPrefix + "doku-textarea-" + i); + + if(dokufeld.length > 0) { + noticeList[i] = dokufeld.val(); + dokufeldCounter++; + } + } + } else { + noticeList[0] = $("#" + multiBookingPrefix + "dokufeld").val(); + dokufeldCounter = 1; + } + + var x = ""; + for (var ii = 0; ii < dokufeldCounter; ii++) { + x += noticeList[ii]; + + if (ii < noticeList.length - 1) { + x += ", "; + } + } + + logInfo3(`Es wurden ${dokufeldCounter} Dokufelder identifiziert mit folgenden Werten: ${x}`); + + return noticeList; + } catch (error) { + showErrorPopup(error); + } +} + function showGoalRatingPopup(goalOid) { try { $("#goal-rating-popup").modal("show"); diff --git a/BeWoPlanerMobil/Views/Customer/Customer.cshtml b/BeWoPlanerMobil/Views/Customer/Customer.cshtml index 6e6033a0f..bf3d0323b 100644 --- a/BeWoPlanerMobil/Views/Customer/Customer.cshtml +++ b/BeWoPlanerMobil/Views/Customer/Customer.cshtml @@ -969,7 +969,7 @@ var isAllowedToViewBargeldkassen = AbstractModel.HasRightToViewAllCustomersBargeldkassen || (isRelatedCustomer && AbstractModel.HasRightToViewOwnCustomersBargeldkassen); } - @* Bargeldverwaltung *@ + @* Bargeldverwaltung TODO: NOCH NICHT FERTIG! *@ @if(Html.IsInDebugMode() && isAllowedToViewBargeldkassen && !(Model.Bargeldkassen is null) && Model.Bargeldkassen.Any()) { diff --git a/BeWoPlanerMobil/Views/Customer/CustomerBetreuungPartial.cshtml b/BeWoPlanerMobil/Views/Customer/CustomerBetreuungPartial.cshtml index 62ef3f5e1..7dab04419 100644 --- a/BeWoPlanerMobil/Views/Customer/CustomerBetreuungPartial.cshtml +++ b/BeWoPlanerMobil/Views/Customer/CustomerBetreuungPartial.cshtml @@ -12,70 +12,50 @@
Betreuung
-
- @foreach(var relation in Model.SelectedCustomer.RelatedEmployees) - { - var start = relation.StartDate.HasValue ? $"{relation.StartDate.Value:dd.MM.yyyy}" : ""; - var end = relation.EndDate.HasValue ? $"{relation.EndDate.Value:dd.MM.yyyy}" : ""; -
-
-
-
-
- Betreuer -
-
- @relation.Employee -
-
-
-
- Rolle -
-
- @relation.RelationRole.DisplayName -
-
- @if(!string.IsNullOrWhiteSpace(start)) - { -
-
- Startdatum -
-
- @start -
-
- } - - @if(!string.IsNullOrWhiteSpace(end)) - { -
-
- Enddatum -
-
- @end -
-
- } - - @if(!string.IsNullOrWhiteSpace(relation.Notice)) - { -
-
- Erläuterung -
-
- @relation.Notice -
-
- } -
+ @foreach(var relation in Model.SelectedCustomer.RelatedEmployees) + { + var start = relation.StartDate.HasValue ? $"{relation.StartDate.Value:dd.MM.yyyy}" : ""; + var end = relation.EndDate.HasValue ? $"{relation.EndDate.Value:dd.MM.yyyy}" : ""; +
+
+
+ + + + + + + + + + + @if(!string.IsNullOrWhiteSpace(start)) + { + + + + + } + @if(!string.IsNullOrWhiteSpace(end)) + { + + + + + } + @if(!string.IsNullOrWhiteSpace(relation.Notice)) + { + + + + + } + +
Betreuer:@relation.Employee
Rolle:@relation.RelationRole.DisplayName
Startdatum:@start
Enddatum:@end
Erläuterung:@relation.Notice
- } -
+
+ }
} @@ -86,13 +66,19 @@ foreach(var teamRelation in Model.SelectedCustomer.RelatedTeams) { -
-
-
- Team -
-
- @teamRelation.Team.Name +
+
+
+
+ + + + + + + +
Team:@teamRelation.Team.Name
+
diff --git a/ReportImp/PSM/QuittierungsbelegMitDatum.Designer.cs b/ReportImp/PSM/QuittierungsbelegMitDatum.Designer.cs index 8d274436a..361a3363b 100644 --- a/ReportImp/PSM/QuittierungsbelegMitDatum.Designer.cs +++ b/ReportImp/PSM/QuittierungsbelegMitDatum.Designer.cs @@ -1017,7 +1017,6 @@ namespace PSM this.xrLabel14.SizeF = new System.Drawing.SizeF(137.3333F, 35.50008F); this.xrLabel14.StylePriority.UseTextAlignment = false; this.xrLabel14.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomCenter; - this.xrLabel14.Visible = false; // // lblUnterschriftKlient // diff --git a/Service/Plugins/PluginLoader.cs b/Service/Plugins/PluginLoader.cs index a168c3002..89f6a85e3 100644 --- a/Service/Plugins/PluginLoader.cs +++ b/Service/Plugins/PluginLoader.cs @@ -31,7 +31,7 @@ namespace BeWo.Service.Plugins //t = "1076891970"; // Assistenza //t = "0216265667"; // LH Hannover //t = "1774789565"; // LH Essen - //t = "9342168675"; // ABC Betreuungen - jetzt Schubkraft + t = "9342168675"; // ABC Betreuungen - jetzt Schubkraft //t = "1193188501"; // Aids Hilfe Dortmund //t = "7860351957"; // SKF Alsdorf //t = "3311520228"; // Die Düne @@ -147,7 +147,7 @@ namespace BeWo.Service.Plugins //t = "9975231461"; // Selwo //t = "8181286349"; // BeWo am Rhein //t = "4595275645"; // Eigenständig - t = "7912635399"; // Prof. Dr. Eggers Stiftung + //t = "7912635399"; // Prof. Dr. Eggers Stiftung //t = "3549726254"; // Socia //t = "1992495802"; // Monvita //t = "7381352241"; // Ressource e.V. @@ -373,7 +373,7 @@ namespace BeWo.Service.Plugins //t = "4431610343"; // B-B-C-Terwort GmbH //t = "2235342307"; // Suchtkrankenhilfe Ostfriesland //t = "1733934665"; // Auf eigenen Füßen stehen (Birgit Apel de Santos & Stefan Haefs) - //t = "9814444882"; // PSM gGmbH (Paritätische Sozialdienste in Meerbusch) + t = "9814444882"; // PSM gGmbH (Paritätische Sozialdienste in Meerbusch) return t; #else if (MultitenancyOperationContextExt.Current != null)