diff --git a/BeWo/BeWoApp.xaml.cs b/BeWo/BeWoApp.xaml.cs index 2b85a65a3..adb341446 100644 --- a/BeWo/BeWoApp.xaml.cs +++ b/BeWo/BeWoApp.xaml.cs @@ -239,6 +239,18 @@ namespace BeWo isServiceRecordNoticeMandatory = false; } + val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.IsServiceRecordGoalMandatory); + if (val != null && val.Equals("1")) + { + AppSettings.IsServiceRecordGoalMandatory = true; + } + + val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.IsServiceRecordRatingMandatory); + if (val != null && val.Equals("1")) + { + AppSettings.IsServiceRecordRatingMandatory = true; + } + val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.IsPasswordSecurityActiv); if (val != null && val.Equals("1")) { @@ -491,9 +503,9 @@ namespace BeWo AppSettings.ShowKlientenBetreuungszeiten = true; } val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.FilterGroupServiceCategories); - if (val != null && val.Equals("0")) + if (val != null && val.Equals("1")) { - AppSettings.FilterGroupServiceCategories = false; + AppSettings.FilterGroupServiceCategories = true; } val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.ShowInfoButtonInCalender); if (val != null && val.Equals("1")) diff --git a/BeWo/Core/BeWoUtils.cs b/BeWo/Core/BeWoUtils.cs index 4179e7049..a09166a22 100644 --- a/BeWo/Core/BeWoUtils.cs +++ b/BeWo/Core/BeWoUtils.cs @@ -63,6 +63,7 @@ using BeWo.View.Detail.Zeiterfassung; using DevExpress.Xpf.Scheduling; using CommandBarStyle = DevExpress.Xpf.DocumentViewer.CommandBarStyle; using ImageSource = System.Windows.Media.ImageSource; +using BS.Shared.Translation; namespace BeWo.Core { @@ -1666,11 +1667,19 @@ namespace BeWo.Core MessageBox.Show("Bitte wählen Sie eine Leistung aus. Sollten keine Leistungen für die gewählte Kategorie verfügbar sein, müssen diese zunächst in der Verwaltung angelegt werden.", "Speichern", MessageBoxButton.OK, MessageBoxImage.Information); return false; } - if(vm.GoalTree != null && vm.GoalTree.Count > 0 && (cb2ScOids == null || cb2ScOids.Count < 2)) + if(vm.GoalTree != null && vm.GoalTree.Count > 0) { - if(vm.SelectedGoals.Count == 0 && MessageBox.Show("Es wurde kein Ziel zugeordnet. Sind Sie sicher, dass Sie speichern möchten?", "Speichern", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.No) + if(vm.SelectedGoals.Count == 0) { - return false; + if (BeWoApp.AppSettings.IsServiceRecordGoalMandatory) + { + MessageBox.Show(Translator.Translate("Sie müssen mindestens ein Ziel auswählen, bevor Sie speichern können."), "Speichern", MessageBoxButton.OK, MessageBoxImage.Exclamation); + return false; + } + else if (MessageBox.Show("Es wurde kein Ziel zugeordnet. Sind Sie sicher, dass Sie speichern möchten?", "Speichern", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.No) + { + return false; + } } } diff --git a/BeWo/Core/Config/AppSettings.cs b/BeWo/Core/Config/AppSettings.cs index 30b0b0f66..9e94d1c87 100644 --- a/BeWo/Core/Config/AppSettings.cs +++ b/BeWo/Core/Config/AppSettings.cs @@ -11,6 +11,8 @@ namespace BeWo.Core.Config public class AppSettings { private bool mIsServiceRecordNoticeMandatory = true; + private bool mIsServiceRecordGoalMandatory = false; + private bool mIsServiceRecordRatingMandatory = false; private bool mIsPasswordSecurityActiv = false; @@ -28,7 +30,7 @@ namespace BeWo.Core.Config private bool _showExpiredSupportConcepts = true; private bool _showServiceRecordGridControl = true; - private bool _filterGroupServiceCategories = true; + private bool _filterGroupServiceCategories = false; private bool mOpenReportInNewWindow = false; private WindowStateType mWindowStateType = WindowStateType.Default; @@ -67,6 +69,19 @@ namespace BeWo.Core.Config set { mIsServiceRecordNoticeMandatory = value; } } + public bool IsServiceRecordGoalMandatory + { + get { return mIsServiceRecordGoalMandatory; } + + set { mIsServiceRecordGoalMandatory = value; } + } + + public bool IsServiceRecordRatingMandatory + { + get { return mIsServiceRecordRatingMandatory; } + + set { mIsServiceRecordRatingMandatory = value; } + } public bool IsPasswordSecurityActiv { get { return mIsPasswordSecurityActiv; } diff --git a/BeWo/View/Detail/MandatorView.xaml b/BeWo/View/Detail/MandatorView.xaml index 91bdc02c1..95aca54f6 100644 --- a/BeWo/View/Detail/MandatorView.xaml +++ b/BeWo/View/Detail/MandatorView.xaml @@ -346,6 +346,9 @@ + + + @@ -358,9 +361,26 @@ Margin="3,5,3,5" Content="{markup:Translate Dokumentationstext in der Zeiterfassung Pflichtfeld}" IsChecked="{Binding Path=IsServiceRecordNoticeMandatory}" /> - - + + + a.Name.Equals(newName))) + while(ViewModel.VMList.Any(a => a.Name != null && a.Name.Equals(newName))) { newName = pName + " " + counter; counter++; diff --git a/BeWo/View/EmployeeArbeitszeitView.xaml b/BeWo/View/EmployeeArbeitszeitView.xaml index aaf2e3308..ff5fd42da 100644 --- a/BeWo/View/EmployeeArbeitszeitView.xaml +++ b/BeWo/View/EmployeeArbeitszeitView.xaml @@ -96,109 +96,108 @@ - + /> - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - + + - - - - - -