From 1c4bd11446e10ab266d4475b4161d9daf7260e68 Mon Sep 17 00:00:00 2001 From: Lyndon Jetten Date: Wed, 21 Jul 2021 15:36:18 +0200 Subject: [PATCH] =?UTF-8?q?MoK:=20-=20Zeiterfassungseintr=C3=A4ge=20mit=20?= =?UTF-8?q?ServiceDescription=20"Arbeitszeit"=20und=20"Pause"=20d=C3=BCrfe?= =?UTF-8?q?n=20sich=20bei=20Kunde=20Synprax=20=C3=BCberschneiden=20-=20Bei?= =?UTF-8?q?=20Klienten=20werden=20jetzt=20auch=20die=20Organisationen=20de?= =?UTF-8?q?s=20Umfelds=20angezeigt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/SchedulerController.cs | 2 +- BeWoPlanerMobil/Models/MainModel.cs | 2 +- BeWoPlanerMobil/Scripts/group-booking.js | 2 - BeWoPlanerMobil/Scripts/view-scripts/main.js | 13 +- BeWoPlanerMobil/Util/JsonCustomer.cs | 3 + BeWoPlanerMobil/Util/JsonOrganisation.cs | 75 +++++++++++ .../Views/Customer/Customer.cshtml | 122 +++++++++++++++++- BeWoPlanerMobil/Views/Main/Main.cshtml | 12 +- .../Views/Scheduler/Scheduler.cshtml | 20 +++ Service/Plugins/PluginLoader.cs | 6 +- 10 files changed, 236 insertions(+), 21 deletions(-) create mode 100644 BeWoPlanerMobil/Util/JsonOrganisation.cs diff --git a/BeWoPlanerMobil/Controllers/SchedulerController.cs b/BeWoPlanerMobil/Controllers/SchedulerController.cs index 6df7705a9..5ccfce9be 100644 --- a/BeWoPlanerMobil/Controllers/SchedulerController.cs +++ b/BeWoPlanerMobil/Controllers/SchedulerController.cs @@ -380,7 +380,7 @@ namespace BeWoPlanerMobil.Controllers isOverlapping = KalenderService.OverlappingAppointmentsExist(startDate, endDate, employeeOidList, customerOidList, resourceOidList, originator.EmployeeOid, oid, recurrenceId, recurrenceIndex); - // Serientermine überprüfen + // TODO: Serientermine überprüfen if(Model.Appointments != null) { foreach(var appointment in Model.Appointments.Where(app => app.SchedulerAppointmentOid == null && app.IsTask == false)) diff --git a/BeWoPlanerMobil/Models/MainModel.cs b/BeWoPlanerMobil/Models/MainModel.cs index 8ee8b997e..2bce2f6cd 100644 --- a/BeWoPlanerMobil/Models/MainModel.cs +++ b/BeWoPlanerMobil/Models/MainModel.cs @@ -542,7 +542,7 @@ namespace BeWoPlanerMobil.Models public ValueListEntryDC GetGoalByOid(long goalOid) { - return SelectedSupportConcept != null ? SelectedSupportConcept.Goals.FirstOrDefault(goal => goal.ValueListEntryOid == goalOid) : null; + return SelectedSupportConcept?.Goals.FirstOrDefault(goal => goal.ValueListEntryOid == goalOid); } public bool HasAnyRatingTypes { get; set; } diff --git a/BeWoPlanerMobil/Scripts/group-booking.js b/BeWoPlanerMobil/Scripts/group-booking.js index 62ef24ed7..5a44ee59b 100644 --- a/BeWoPlanerMobil/Scripts/group-booking.js +++ b/BeWoPlanerMobil/Scripts/group-booking.js @@ -82,8 +82,6 @@ function updateGroupBookingGroupList(groupBookingSelectionObject) { var groupOids = groupBookingSelectionObject.GroupOids === undefined ? [] : groupBookingSelectionObject.GroupOids; var relOids = []; - console.log(groupBookingSelectionObject); - if (groupBookingSelectionObject.SelectedRelations !== undefined){ for(var i = 0; i < groupBookingSelectionObject.SelectedRelations.length; i++) { var oidStringValue = groupBookingSelectionObject.SelectedRelations[i].Value; diff --git a/BeWoPlanerMobil/Scripts/view-scripts/main.js b/BeWoPlanerMobil/Scripts/view-scripts/main.js index f09b5d918..e0f75f214 100644 --- a/BeWoPlanerMobil/Scripts/view-scripts/main.js +++ b/BeWoPlanerMobil/Scripts/view-scripts/main.js @@ -728,7 +728,6 @@ function resetSupportConceptSearch() { } } -//GetSignatureImage(long serviceRecordOid, long signatureOid) function getSignatureImage(serviceRecordOid, signatureOid) { try { var url = getGetSignatureImageUrl(); @@ -747,4 +746,16 @@ function getSignatureImage(serviceRecordOid, signatureOid) { } catch (error) { logError(error.message); } +} + +function setServiceDescription(id) { + try { + var url = getSetServiceDescriptionUrl(); + + var selectedServiceDescription = $("#" + id).find(":selected").val(); + + $.get(url, { pServiceDescriptionOid: selectedServiceDescription}); + } catch (error) { + logError(error.message); + } } \ No newline at end of file diff --git a/BeWoPlanerMobil/Util/JsonCustomer.cs b/BeWoPlanerMobil/Util/JsonCustomer.cs index 0d76dd2f6..e3f41b0cc 100644 --- a/BeWoPlanerMobil/Util/JsonCustomer.cs +++ b/BeWoPlanerMobil/Util/JsonCustomer.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; using System.Web; +using BeWo.Data.Access; using BS.Shared; using BS.Shared.DataContracts; using BS.Shared.Extensions; @@ -121,6 +122,8 @@ namespace BeWoPlanerMobil.Util { Organisations.Add(new JsonOrganisation(organisation)); } + + // TODO: Dokumente anzeigen und herunterladbar machen } } } \ No newline at end of file diff --git a/BeWoPlanerMobil/Util/JsonOrganisation.cs b/BeWoPlanerMobil/Util/JsonOrganisation.cs new file mode 100644 index 000000000..37b8fb3b2 --- /dev/null +++ b/BeWoPlanerMobil/Util/JsonOrganisation.cs @@ -0,0 +1,75 @@ +using BS.Shared.DataContracts; + +namespace BeWoPlanerMobil.Util +{ + public class JsonOrganisation + { + public long? Customer2OrganisationOid { get; set; } + + public string ContactPerson { get; set; } + + public string Name { get; set; } + + public string Role { get; set; } + + public string StreetName { get; set; } + public string ZipCode2Town { get; set; } + + public string PhoneNumber { get; set; } + public string FaxNumber { get; set; } + public string Email { get; set; } + public string Website { get; set; } + + public string Info { get; set; } + + public string Notice { get; set; } + + public string Address + { + get + { + var result = string.Empty; + + if(!string.IsNullOrEmpty(StreetName)) + { + result += StreetName; + if(!string.IsNullOrEmpty(ZipCode2Town)) + { + result += "
"; + } + } + + if(!string.IsNullOrEmpty(ZipCode2Town)) + { + result += ZipCode2Town; + } + + return result; + } + } + + public JsonOrganisation(CustomerOrganisationRelationDC customer2Organisation) + { + Customer2OrganisationOid = customer2Organisation.Customer2OrganisationOid; + + ContactPerson = customer2Organisation.Person?.ToString() ?? string.Empty; + + Name = customer2Organisation.Organisation.Name ?? string.Empty; + + Role = customer2Organisation.RelationRole?.DisplayName ?? string.Empty; + + StreetName = customer2Organisation.Organisation.Street ?? string.Empty; + + ZipCode2Town = $"{customer2Organisation.Organisation.PostalCode ?? string.Empty} {customer2Organisation.Organisation.Town ?? string.Empty}"; + + PhoneNumber = customer2Organisation.Organisation.Communication1 ?? string.Empty; + FaxNumber = customer2Organisation.Organisation.Communication2 ?? string.Empty; + Email = customer2Organisation.Organisation.Communication3 ?? string.Empty; + Website = customer2Organisation.Organisation.Communication4 ?? string.Empty; + + Info = customer2Organisation.Info1 ?? string.Empty; + + Notice = customer2Organisation.Customer2OrganisationNotice ?? string.Empty; + } + } +} \ No newline at end of file diff --git a/BeWoPlanerMobil/Views/Customer/Customer.cshtml b/BeWoPlanerMobil/Views/Customer/Customer.cshtml index 29d938593..8f30fe6a4 100644 --- a/BeWoPlanerMobil/Views/Customer/Customer.cshtml +++ b/BeWoPlanerMobil/Views/Customer/Customer.cshtml @@ -236,7 +236,7 @@ @if(Model.SelectedJsonCustomer.ReferenceNumbers.Any()) { -
+
Aktenzeichen pro Kostenträger
@@ -277,7 +277,7 @@ @if(Model.SelectedJsonCustomer.Umfeldpersonen.Any()) { -
+
Umfeld
@@ -358,6 +358,122 @@
} -
+ + @if(Model.SelectedJsonCustomer.Organisations.Any()) + { +
+
+
+
Organisationen des Umfelds
+
+
+
+ @foreach(var organisation in Model.SelectedJsonCustomer.Organisations) + { +
+
+
+ +
+
+ +
+
+
+
+
+
+
+ Ansprechpartner +
+
+ @organisation.ContactPerson +
+
+
+
+ Rolle +
+
+ @organisation.Role +
+
+
+
+ Adresse +
+
+ @organisation.StreetName + @if(!string.IsNullOrEmpty(organisation.StreetName) && !string.IsNullOrEmpty(organisation.ZipCode2Town)) + { +
+ } + @organisation.ZipCode2Town +
+
+
+
+ Tel.: +
+ +
+
+
+ Fax: +
+
+ @organisation.FaxNumber +
+
+
+
+ E-Mail: +
+ +
+
+
+ Internet: +
+ +
+
+
+ Info +
+
+ @organisation.Info +
+
+
+
+ Notiz +
+
+ @organisation.Notice +
+
+
+
+
+
+ } +
+
+
+
+ } + + + +
}
\ No newline at end of file diff --git a/BeWoPlanerMobil/Views/Main/Main.cshtml b/BeWoPlanerMobil/Views/Main/Main.cshtml index 909b007b6..0b9edbde7 100644 --- a/BeWoPlanerMobil/Views/Main/Main.cshtml +++ b/BeWoPlanerMobil/Views/Main/Main.cshtml @@ -299,14 +299,6 @@ function getRateSelectedGoalUrl() { return "@Url.Action("RateSelectedGoal")"; } - - function getSelectGoalToRateUrl() { - return "@Url.Action("SelectGoalOidToRate")"; - } - - function getResetSelectedGoalToRateUrl() { - return "@Url.Action("ResetSelectedGoalToRate")"; - }
@@ -477,7 +469,7 @@
-
@@ -1017,7 +1009,7 @@
- +
diff --git a/BeWoPlanerMobil/Views/Scheduler/Scheduler.cshtml b/BeWoPlanerMobil/Views/Scheduler/Scheduler.cshtml index 50ead5973..f1875a6b6 100644 --- a/BeWoPlanerMobil/Views/Scheduler/Scheduler.cshtml +++ b/BeWoPlanerMobil/Views/Scheduler/Scheduler.cshtml @@ -316,6 +316,26 @@
}
+ + +
diff --git a/Service/Plugins/PluginLoader.cs b/Service/Plugins/PluginLoader.cs index d05bca4df..143a67321 100644 --- a/Service/Plugins/PluginLoader.cs +++ b/Service/Plugins/PluginLoader.cs @@ -109,7 +109,7 @@ namespace BeWo.Service.Plugins //t = "8677523325"; // BeWo Richartz //t = "1765854593"; // Mein Betreutes Wohnen //t = "6802909544"; // Lebenshilfe Coburg - //t = "9417634361"; // Synprax + t = "9417634361"; // Synprax //t = "5761861730"; // Lebenshilfe Warendorf //t = "6712648331"; // BeWo Färber //t = "4982295287"; // ASB Hamm @@ -142,7 +142,7 @@ namespace BeWo.Service.Plugins //t = "5712358157"; // FINDUS //t = "8828216586"; // Caritas Aachen //t = "7062943632"; // ABW Elsebrock - t = "3956369664"; // LH Wetterau + //t = "3956369664"; // LH Wetterau //t = "3984525482"; // API Berlin //t = "9975231461"; // Selwo //t = "8181286349"; // BeWo am Rhein @@ -279,7 +279,7 @@ namespace BeWo.Service.Plugins //t = "8283849714"; // Forum e.V. (proviel GmbH) //t = "3915346496"; // Sprungbrett 2. DB (Haus Theresia) //t = "5595701056"; // Domiziel Ansbach - t = "9430188510"; // Pro INTEGRA + //t = "9430188510"; // Pro INTEGRA return t; #else