diff --git a/.gitignore b/.gitignore index 6e3981536..46ca0b553 100644 --- a/.gitignore +++ b/.gitignore @@ -572,3 +572,4 @@ obj /ReportImp/DiakonieKKKleve/Mitarbeiterarbeitszeitkonto.resx /ReportImp/DiakonieKKKleve/Mitarbeiterarbeitszeitkonto.cs /ReportImp/DiakonieKKKleve/CustomMitarbeiterstundenkontoBerechnungTagesansicht.cs +/BeWoDatabaseTerminator/.vs diff --git a/BeWo/Core/BeWoUtils.cs b/BeWo/Core/BeWoUtils.cs index 7c82910c2..564f24df9 100644 --- a/BeWo/Core/BeWoUtils.cs +++ b/BeWo/Core/BeWoUtils.cs @@ -1920,8 +1920,18 @@ namespace BeWo.Core var employeeOid = Convert.ToInt64(variablen["employeeOid"]); var serienTermine = (List)variablen["serienTermine"]; var mehrtaegigeTermine = (List)variablen["mehrtaegigeTermine"]; + var nullableAbsenceTimeOids = (List) variablen["absenceTimeOids"] ?? new List(); - ServiceFacade.DoReportServiceAsync(strom => strom.CreateKalenderReport(appointmentIds, employeeOid, serienTermine, selectedDays, mehrtaegigeTermine), ms => BeWoApp.MainControl.Dispatch(() => ShowReportWindow(ms, title))); + var absenceTimeOids = new List(); + foreach(var absenceTimeOid in nullableAbsenceTimeOids) + { + if(absenceTimeOid.HasValue) + { + absenceTimeOids.AddIfNotIn(absenceTimeOid.Value); + } + } + + ServiceFacade.DoReportServiceAsync(strom => strom.CreateKalenderReportWithAbsenceTimes(appointmentIds, employeeOid, serienTermine, selectedDays, mehrtaegigeTermine, absenceTimeOids), ms => BeWoApp.MainControl.Dispatch(() => ShowReportWindow(ms, title))); break; case ReportEnum.KassenbuchReportEnum: @@ -2168,11 +2178,11 @@ namespace BeWo.Core return BeWoApp.LoggedOnUser.HasRight(pUserRightType); } - public static bool CheckSchedulerRights(Appointment pAppointment, bool pIsNew, SchedulerRightsCheckType pCheckType) + public static bool CheckSchedulerRights(Appointment pAppointment, bool pIsNew, SchedulerRightsCheckType pCheckType, List teamMemberCustomerOids, bool ignoreViewEditCreateAllRights) { var storage = pAppointment.GetCustomFieldStorage(); - return Utils.CheckSchedulerRights(storage.CustomerList, storage.ResourceList, storage.EmployeeList.ToList(), storage.Originator, pIsNew, pCheckType, BeWoApp.LoggedOnUser); + return Utils.CheckSchedulerRights(storage.CustomerList, storage.ResourceList, storage.EmployeeList.ToList(), storage.Originator, pIsNew, pCheckType, BeWoApp.LoggedOnUser, teamMemberCustomerOids, ignoreViewEditCreateAllRights); } public static void EditServiceRecord(ServiceRecordDC dc, DispatcherObject p) diff --git a/BeWo/MainControl.xaml.cs b/BeWo/MainControl.xaml.cs index 78d069914..6d4ecf435 100644 --- a/BeWo/MainControl.xaml.cs +++ b/BeWo/MainControl.xaml.cs @@ -30,9 +30,6 @@ using BS.Shared; using BS.Shared.DataContracts; using BS.Shared.Extensions; using BS.Shared.Translation; -using DevExpress.Xpf.Editors; -using DevExpress.Xpf.Grid; -using DevExpress.Xpf.Scheduler; using Hyperlink = System.Windows.Documents.Hyperlink; namespace BeWo @@ -53,7 +50,7 @@ namespace BeWo Wohnheim, Vertretungen, CustomerTeam - } + } public partial class MainControl { @@ -118,7 +115,11 @@ namespace BeWo } this.button_Dokumente.Visibility = Visibility.Collapsed; #endif - } + + #if DEBUG + //DebugHelperViewButton.Visibility = Visibility.Visible; +#endif + } public List OpenedModalViewWindows { get; set; } @@ -1729,7 +1730,5 @@ namespace BeWo NavigateTo(GetViewForUIContext(UIContext.Vertretungen)); } } - - } } \ No newline at end of file diff --git a/BeWo/Scheduler/Utils/AppointmentExtensions.cs b/BeWo/Scheduler/Utils/AppointmentExtensions.cs index 81baae06e..7ebf3ec34 100644 --- a/BeWo/Scheduler/Utils/AppointmentExtensions.cs +++ b/BeWo/Scheduler/Utils/AppointmentExtensions.cs @@ -101,6 +101,11 @@ namespace BeWo.Scheduler.Utils } + public static long? CF_AbsenceTimeOid(this Appointment appointment) + { + return appointment.GetCustomFieldStorage()?.AbsenceTimeOid; + } + public static void CF_IsTask(this Appointment appointment, bool pIsTask) { @@ -122,7 +127,11 @@ namespace BeWo.Scheduler.Utils appointment.GetCustomFieldStorage().IsAllDay = pIsAllDay; } - + public static void CF_AbsenceTimeOid(this Appointment appointment, long? absenceTimeOid) + { + appointment.GetCustomFieldStorage().AbsenceTimeOid = absenceTimeOid; + } + public static void CF_EmployeeList(this Appointment appointment, ObservableCollection pEmployeeList) diff --git a/BeWo/Scheduler/View/NewSchedulerView.xaml b/BeWo/Scheduler/View/NewSchedulerView.xaml index e122060c8..bc2de893e 100644 --- a/BeWo/Scheduler/View/NewSchedulerView.xaml +++ b/BeWo/Scheduler/View/NewSchedulerView.xaml @@ -635,6 +635,7 @@ + @@ -644,8 +645,9 @@ - - + + + @@ -653,7 +655,7 @@ - +