diff --git a/BeWo/View/Detail/EmployeeView.xaml.cs b/BeWo/View/Detail/EmployeeView.xaml.cs index c1decd0fc..8b0002443 100644 --- a/BeWo/View/Detail/EmployeeView.xaml.cs +++ b/BeWo/View/Detail/EmployeeView.xaml.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.ComponentModel; +using System.IO; using System.Linq; using System.Runtime.CompilerServices; using System.ServiceModel; @@ -148,14 +149,21 @@ namespace BeWo.View.Detail //Employee Image if (_ViewModel.EmployeeImage != null) { - using (var ms = new System.IO.MemoryStream(_ViewModel.EmployeeImage)) + try { - var image = new BitmapImage(); - image.BeginInit(); - image.CacheOption = BitmapCacheOption.OnLoad; // here - image.StreamSource = ms; - image.EndInit(); - Img.Source = image; + using (var ms = new MemoryStream(_ViewModel.EmployeeImage)) + { + var image = new BitmapImage(); + image.BeginInit(); + image.CacheOption = BitmapCacheOption.OnLoad; // here + image.StreamSource = ms; + image.EndInit(); + Img.Source = image; + } + } + catch(Exception exception) + { + } } diff --git a/BeWoPlanerMobil/BeWoPlanerMobil.csproj b/BeWoPlanerMobil/BeWoPlanerMobil.csproj index 98b1aae69..1434649d7 100644 --- a/BeWoPlanerMobil/BeWoPlanerMobil.csproj +++ b/BeWoPlanerMobil/BeWoPlanerMobil.csproj @@ -25828,7 +25828,7 @@ - True + False False 8808 / diff --git a/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user b/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user index bcc1a01ff..29ada5c86 100644 --- a/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user +++ b/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user @@ -8,7 +8,7 @@ - Debug|Any CPU + Release|Any CPU ShowAllFiles 600 MvcControllerEmptyScaffolder @@ -29,7 +29,7 @@ http://localhost/BeWoPlanerMobil - CurrentPage + URL True False False diff --git a/BeWoPlanerMobil/Controllers/MainController.cs b/BeWoPlanerMobil/Controllers/MainController.cs index 49ea29297..e955d94ce 100644 --- a/BeWoPlanerMobil/Controllers/MainController.cs +++ b/BeWoPlanerMobil/Controllers/MainController.cs @@ -1888,11 +1888,10 @@ namespace BeWoPlanerMobil.Controllers else { records = Model.ServiceRecordTimeInterval == ServiceRecordTimeInterval.ZeitraumWaehlen || Model.ServiceRecordTimeInterval == ServiceRecordTimeInterval.Monatsauswahl ? - OperationsService.GetCustomerServiceRecordsWithStartEndDate(Model.SelectedSupportConcept.Customer.CustomerOid, Model.CostBearer2SupportConceptOid.Value, Model.SelectedZeitraum.StartDate.Value, Model.SelectedZeitraum.EndDate.Value) : + OperationsService.GetCustomerServiceRecordsCompactWithStartEndDate(Model.SelectedSupportConcept.Customer.CustomerOid, Model.CostBearer2SupportConceptOid.Value, Model.SelectedZeitraum.StartDate.Value, Model.SelectedZeitraum.EndDate.Value) : OperationsService.FindServiceRecordsForLastDays(Model.CostBearer2SupportConceptOid, Model.SelectedDayCount, Model.Employee.EmployeeOid.Value).ToList(); } - //records = OperationsService.FindServiceRecordsForLastDays(Model.CostBearer2SupportConceptOid < 1 ? null : Model.CostBearer2SupportConceptOid, dayCount, Model.Employee.EmployeeOid).ToList(); var recordsOhneDuplikate = new List(); foreach(var r in records.Where(r => !recordsOhneDuplikate.Any(a => a.GroupOid.HasValue && a.GroupOid.Value.Equals(r.GroupOid)))) diff --git a/BeWoPlanerMobil/Controllers/SchedulerController.cs b/BeWoPlanerMobil/Controllers/SchedulerController.cs index 75a9d7b14..c0694ed73 100644 --- a/BeWoPlanerMobil/Controllers/SchedulerController.cs +++ b/BeWoPlanerMobil/Controllers/SchedulerController.cs @@ -464,11 +464,11 @@ namespace BeWoPlanerMobil.Controllers if(Model.SelectedAppointment != null) { - // ToDo: Handelt es sich um einen Ganztagstermin, muss auf das Enddatum eine Minute addiert werden! - if(Model.SelectedAppointment.EndDate.HasValue) + if(Model.SelectedAppointment.AllDay && Model.SelectedAppointment.EndDate.HasValue) { Model.SelectedAppointment.EndDate = Model.SelectedAppointment.EndDate.Value.AddMinutes(1).AddDays(-1); } + Model.IsAllDay = Model.SelectedAppointment.AllDay; Model.IsPrivate = Model.SelectedAppointment.IsPrivate; Model.SelectedResources = Model.SelectedAppointment?.ResourceList ?? new List(); diff --git a/BeWoPlanerMobil/Models/AbstractModel.cs b/BeWoPlanerMobil/Models/AbstractModel.cs index d5066d6d1..fa2022647 100644 --- a/BeWoPlanerMobil/Models/AbstractModel.cs +++ b/BeWoPlanerMobil/Models/AbstractModel.cs @@ -141,5 +141,7 @@ namespace BeWoPlanerMobil.Models public static bool HasRightToDeleteReceiptSignatures => CheckRight(UserRightType.ConfirmationReceiptSignatures_Delete); public static bool HasRightToRateGoals => CheckRight(UserRightType.BewertenInZeiterfassung); + + public static bool HasRightToEditCustomers => CheckRight(UserRightType.CustomerView_Edit); } } \ No newline at end of file diff --git a/BeWoPlanerMobil/Scripts/view-scripts/scheduler.js b/BeWoPlanerMobil/Scripts/view-scripts/scheduler.js index d742ec445..9dda53ba8 100644 --- a/BeWoPlanerMobil/Scripts/view-scripts/scheduler.js +++ b/BeWoPlanerMobil/Scripts/view-scripts/scheduler.js @@ -67,9 +67,10 @@ function validateAppointmentForm() { var d = isAllDay ? false : endTime === undefined || endTime === null || !endTime.isValid(); if (a || b || c || d || isStartDateInputEmpty || isStartTimeInputEmpty || isEndTimeInputEmpty || isEndDateInputEmpty) { - hideSpinner(); + logInfo3("Datumsproblem!"); + showMessagePopupWithHtml("Fehler", ''); $("#scheduler-start-time, #scheduler-end-time").val(""); @@ -100,8 +101,8 @@ function validateAppointmentForm() { if(endDate.isBefore(startDate)) { hideSpinner(); - $("#messagePopup .modal-body").html(''); - showMessagePopup("Fehler"); + //$("#messagePopup .modal-body").html(''); + showMessagePopupWithHtml("Fehler", ''); return; } diff --git a/BeWoPlanerMobil/Views/Customer/Customer.cshtml b/BeWoPlanerMobil/Views/Customer/Customer.cshtml index 59cab0b6e..80a4fd182 100644 --- a/BeWoPlanerMobil/Views/Customer/Customer.cshtml +++ b/BeWoPlanerMobil/Views/Customer/Customer.cshtml @@ -101,6 +101,8 @@ { using(Html.BeginForm("UpdateCustomer", "Customer", FormMethod.Post, new { id = "stammdaten-form", @class = "needs-validation", novalidate="novalidate" })) { + var inputDisabled = !AbstractModel.HasRightToEditCustomers ? "disabled" : string.Empty; +
@@ -116,7 +118,7 @@ Vorname
- +
Dieses Feld darf nicht leer sein!
@@ -131,7 +133,7 @@ Nachname
- +
Dieses Feld darf nicht leer sein!
@@ -146,7 +148,7 @@ Geburtstag - +
@@ -170,9 +172,9 @@ var selectedNull = Model.SelectedJsonCustomer.CustomerSex is null ? "selected" : string.Empty; } - - + @@ -196,7 +198,7 @@ Adresszusatz
- + @@ -205,10 +207,10 @@
- Straße + Straße
- +
@@ -220,7 +222,7 @@ PLZ - + @@ -232,7 +234,7 @@ Ort - + @@ -253,7 +255,7 @@ Name - + @@ -262,10 +264,10 @@
- Straße + Straße
- +
@@ -277,7 +279,7 @@ PLZ - + @@ -289,7 +291,7 @@ Ort - + @@ -310,7 +312,7 @@ Handy - +
- +
- + @@ -356,7 +358,7 @@ Mail - +
- +
- -
- -
- + + @if(AbstractModel.HasRightToEditCustomers) + { +
+ +
+ } + +
-
+
@@ -398,7 +404,7 @@
-
Aktenzeichen pro Kostenträger
+
Aktenzeichen pro Kostenträger
@@ -406,7 +412,7 @@ - Kostenträger + Kostenträger Aktenzeichen diff --git a/BeWoPlanerMobil/Views/Shared/_Layout.cshtml b/BeWoPlanerMobil/Views/Shared/_Layout.cshtml index 6eb5dcb3e..bfe71902e 100644 --- a/BeWoPlanerMobil/Views/Shared/_Layout.cshtml +++ b/BeWoPlanerMobil/Views/Shared/_Layout.cshtml @@ -59,7 +59,7 @@ - + @@ -354,7 +354,7 @@ { using(Html.BeginForm("RedirectToReportViewer", "Main", FormMethod.Post)) { -