From 1234388bfb6815173227d098a342e450c2fc705a Mon Sep 17 00:00:00 2001 From: Christian Date: Sun, 16 Mar 2025 20:42:21 +0100 Subject: [PATCH] =?UTF-8?q?-=20Neue=20Einstellungen=20beim=20Mandator=20-?= =?UTF-8?q?=20History=20f=C3=BCr=20Abwesenheiten=20-=20History=20=C3=BCber?= =?UTF-8?q?arbeitet=20-=20Berichte=20f=C3=BCr=20Eintr=C3=A4ge=20ohne=20Unt?= =?UTF-8?q?erschriften?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BeWo/BeWoApp.xaml.cs | 16 +- BeWo/Core/BeWoUtils.cs | 15 +- BeWo/Core/Config/AppSettings.cs | 17 +- BeWo/View/Detail/MandatorView.xaml | 50 +- BeWo/View/Detail/TextbausteinView.xaml.cs | 2 +- BeWo/View/EmployeeArbeitszeitView.xaml | 139 ++-- BeWo/ViewModel/MandatorVM.cs | 42 + Data/Data.csproj | 5 + Data/Entities/AbsenceTimeHistory.cs | 34 + Data/Entities/ContractHistory.cs | 24 +- Data/Mappings/AbsenceTime.hbm.xml | 1 + Data/Mappings/AbsenceTimeHistory.hbm.xml | 28 + Data/Mappings/Contract.hbm.xml | 1 + Data/Mappings/ContractHistory.hbm.xml | 9 +- Data/Utils/ServiceRecord2SignatureStates.cs | 43 + Host/Host.csproj.user | 4 +- .../Changes_2025_03_07 AbsenceTimeHistory.txt | 31 + Model/Changes_alle_fuer_neue_db.txt | 41 +- ...e Monatsunterschrift der Hauptbetreuung.txt | 5 +- ...ge ohne Monatsunterschrift des Klienten.txt | 2 +- ...unterschriften im ausgewählten Zeitaum.txt | 2 +- .../Invoicing/CustomInvoiceCreation.cs | 6 +- .../Leistungsnachweis.designer.cs | 4 +- .../Helferentgelt.cs | 31 +- ...CustomMitarbeiterstundenkontoBerechnung.cs | 11 +- .../Service/CustomVacationService.cs | 21 +- .../SettlementDC_SettlementInvoice.cs | 4 +- Service/Import/Perseh/PersehReader.cs | 107 ++- Service/Plugins/CustomerService.cs | 86 +- Service/Plugins/OperationService.cs | 106 +-- Service/Plugins/PluginLoader.cs | 2 +- Service/Service.csproj | 1 + .../CustomerServiceImp.cs | 266 +------ .../EmployeeServiceImp.cs | 111 +-- .../OperationsServiceImp.cs | 136 +--- .../ServiceUtils/History/HistoryCreator.cs | 741 ++++++++++++++++++ Shared/BeWoEntityEnums.cs | 3 +- Shared/Core/SettingsKeys.cs | 2 + 38 files changed, 1342 insertions(+), 807 deletions(-) create mode 100644 Data/Entities/AbsenceTimeHistory.cs create mode 100644 Data/Mappings/AbsenceTimeHistory.hbm.xml create mode 100644 Data/Utils/ServiceRecord2SignatureStates.cs create mode 100644 Model/Changes_2025_03_07 AbsenceTimeHistory.txt create mode 100644 Service/ServiceUtils/History/HistoryCreator.cs 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 @@ - + /> - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - + + - - - - - -