diff --git a/BeWo/BeWoApp.xaml.cs b/BeWo/BeWoApp.xaml.cs index 68ff9b797..3116517e8 100644 --- a/BeWo/BeWoApp.xaml.cs +++ b/BeWo/BeWoApp.xaml.cs @@ -32,6 +32,7 @@ using BS.Shared.Core; using ChatController.HauptKlassen; using DevExpress.Xpf.Core; using DevExpress.Xpf.Grid; +using DevExpress.Xpf.Scheduling; using DevExpress.XtraScheduler; namespace BeWo @@ -839,8 +840,9 @@ namespace BeWo UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, SettingsKeys.LastKassenSortOrder, _AppSettings.LastKassenSortOrder.ToString(), _LoggedOnUser.Settings); UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, SettingsKeys.LetzteZeiterfassungsDauer, ((int)_AppSettings.LetzteZeiterfassungsDauer).ToString(), _LoggedOnUser.Settings); UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, SettingsKeys.SchedulerViewType, ((int) _AppSettings.SchedulerViewType).ToString(), _LoggedOnUser.Settings); - UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, SettingsKeys.SchedulerTimelineViewDayCount, (_AppSettings.SchedulerTimelineViewDayCount).ToString(), _LoggedOnUser.Settings); + UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, SettingsKeys.SchedulerTimelineViewDayCount, _AppSettings.SchedulerTimelineViewDayCount.ToString(), _LoggedOnUser.Settings); UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, SettingsKeys.SchedulerDayViewDayCount, _AppSettings.SchedulerDayViewDayCount.ToString(), _LoggedOnUser.Settings); + UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, SettingsKeys.SchedulingViewType, ((int) _AppSettings.SchedulingViewType).ToString(), _LoggedOnUser.Settings); string val = string.Empty; if (_AppSettings.StartupPanelOrder != null) @@ -1062,6 +1064,12 @@ namespace BeWo } } + val = UserSettingsUtils.GetSettingValue(SettingsType.ApplicationSettings, SettingsKeys.SchedulingViewType, settings); + if(int.TryParse(val, out var schedulingViewTypeInt)) + { + _AppSettings.SchedulingViewType = (ViewType)schedulingViewTypeInt; + } + _AppSettings.IsDirty = false; } @@ -1309,7 +1317,7 @@ namespace BeWo public static void LogMessage(string message) { #if DEBUG - if(_DebugMessageLogView == null) + if(_DebugMessageLogView is null) { _DebugMessageLogView = new DebugMessageLogView(); } @@ -1324,7 +1332,7 @@ namespace BeWo public static void LogMessage(string message, Color customColor) { #if DEBUG - if(_DebugMessageLogView == null) + if(_DebugMessageLogView is null) { _DebugMessageLogView = new DebugMessageLogView(); } diff --git a/BeWo/Core/Service/Cache.cs b/BeWo/Core/Service/Cache.cs index 2b4b7c043..73ff24fa9 100644 --- a/BeWo/Core/Service/Cache.cs +++ b/BeWo/Core/Service/Cache.cs @@ -611,6 +611,25 @@ namespace BeWo.Core.Service callback(_FilteredCustomers); } } + + private List _TeamRelatedCustomerOids; + + public void GetTeamRelatedCustomerOidsForEmployee(long employeeOid, bool forceReload, Action> callback) + { + if(_TeamRelatedCustomerOids is null || forceReload) + { + ServiceFacade.DoEmployeeServiceAsync(s => s.LoadTeamsRelatedCustomerOids(employeeOid), customerOids => + { + _TeamRelatedCustomerOids = customerOids; + callback?.Invoke(_TeamRelatedCustomerOids); + }); + } + else + { + callback?.Invoke(_TeamRelatedCustomerOids); + } + } + public void ClearFilteredCustomers() { _FilteredCustomers = null; diff --git a/BeWo/DebugConfig.cs b/BeWo/DebugConfig.cs index 904ee51c2..86dc0cf95 100644 --- a/BeWo/DebugConfig.cs +++ b/BeWo/DebugConfig.cs @@ -38,7 +38,7 @@ namespace BeWo public static DebugConfig SimpleAutoLogin => new DebugConfig() { DebugConfigMode = DebugConfigMode.SimpleAutoLogin, - AutoLogin = true + AutoLogin = !Environment.MachineName.Equals("OWNSOFT-JETTEN") }; public static DebugConfig FeatureWohnhilfe => new DebugConfig() diff --git a/BeWo/Scheduler/ViewModel/SchedulerAppointmentListVM.cs b/BeWo/Scheduler/ViewModel/SchedulerAppointmentListVM.cs index 77cf7f097..ab35d0705 100644 --- a/BeWo/Scheduler/ViewModel/SchedulerAppointmentListVM.cs +++ b/BeWo/Scheduler/ViewModel/SchedulerAppointmentListVM.cs @@ -45,8 +45,7 @@ namespace BeWo.Scheduler.ViewModel public SchedulerSettings GetDefaultSchedulerSettings() { - var settings = new SchedulerSettings(AppointmentKind.General, AppointmentViewType.WorkWeek); - return settings; + return new SchedulerSettings(AppointmentKind.General, AppointmentViewType.WorkWeek); } private BindingList _AppointmentList; diff --git a/BeWo/Scheduling/View/AppointmentEditView.xaml b/BeWo/Scheduling/View/AppointmentEditView.xaml index 8f59624a7..0768bec29 100644 --- a/BeWo/Scheduling/View/AppointmentEditView.xaml +++ b/BeWo/Scheduling/View/AppointmentEditView.xaml @@ -249,70 +249,51 @@ - - + + + - + - - - - - + - - - - + - - - - + - - - - - - - - - - - +