diff --git a/BeWo/BeWoApp.xaml.cs b/BeWo/BeWoApp.xaml.cs index cc5b19546..1d64c33a6 100644 --- a/BeWo/BeWoApp.xaml.cs +++ b/BeWo/BeWoApp.xaml.cs @@ -197,6 +197,8 @@ namespace BeWo var hideServiceRecordInsertedByAndInsertedOn = false; bool isEndDateVisible = false; bool isOnlyYearMonthVisible = false; + bool isZeiterfassDateNormal = false; + bool isZeiterfassungInStdMin = false; AppSettings.ShowAdvisedAttendedFlag = false; String timeRecordingMenuName = "Zeiterfassung"; @@ -236,6 +238,19 @@ namespace BeWo isOnlyYearMonthVisible = true; } + val = GetSettingValue(_Mandator.Settings, "IsZeiterfassungInStdMin"); + if (val != null && val.Equals("1")) + { + isZeiterfassungInStdMin = true; + } + + val = GetSettingValue(_Mandator.Settings, "IsZeiterfassDateNormal"); + if (val != null && val.Equals("1")) + { + isZeiterfassDateNormal = true; + } + + val = GetSettingValue(_Mandator.Settings, "MaxDaysEditServiceRecordsAllowed"); int result; if (Int32.TryParse(val, out result)) @@ -381,6 +396,8 @@ namespace BeWo AppSettings.IsPasswordSecurityActiv = isPasswordSecurityActiv; AppSettings.IsEndDateVisible = isEndDateVisible; AppSettings.IsOnlyYearMonthVisible = isOnlyYearMonthVisible; + AppSettings.IsZeiterfassDateNormal = isZeiterfassDateNormal; + AppSettings.IsZeiterfassungInStdMin = isZeiterfassungInStdMin; AppSettings.MaxDaysEditServiceRecordsAllowed = maxDaysEditServiceRecordsAllowed; AppSettings.HilfeplanAuslaufAuswahl = hilfeplanAuslaufAuswahl; AppSettings.AnzTageZeiterfassErfolgt = anzTageZeiterfassErfolgt; diff --git a/BeWo/Core/Config/AppSettings.cs b/BeWo/Core/Config/AppSettings.cs index 85bad7187..7e34f0a23 100644 --- a/BeWo/Core/Config/AppSettings.cs +++ b/BeWo/Core/Config/AppSettings.cs @@ -14,6 +14,10 @@ namespace BeWo.Core.Config private bool misOnlyYearMonthVisible = true; + private bool misZeiterfassDateNormal = true; + + private bool misZeiterfassungInStdMin = true; + private bool mShowOnlyMySupportConcepts = true; private WindowStateType mWindowStateType = WindowStateType.Default; @@ -54,6 +58,19 @@ namespace BeWo.Core.Config set { misOnlyYearMonthVisible = value; } } + public bool IsZeiterfassDateNormal + { + get { return misZeiterfassDateNormal; } + set { misZeiterfassDateNormal = value; } + } + + public bool IsZeiterfassungInStdMin + { + get { return misZeiterfassungInStdMin; } + set { misZeiterfassungInStdMin = value; } + } + + public int MaxDaysEditServiceRecordsAllowed { get; set; } public int HilfeplanAuslaufAuswahl { get; set; } diff --git a/BeWo/View/Detail/MandatorView.xaml b/BeWo/View/Detail/MandatorView.xaml index f9b5a6443..e61e207b2 100644 --- a/BeWo/View/Detail/MandatorView.xaml +++ b/BeWo/View/Detail/MandatorView.xaml @@ -11,6 +11,7 @@ + @@ -85,21 +86,21 @@ - - - - - - - - - - - + + + - + + + + + + + + + diff --git a/BeWo/View/Detail/MandatorView.xaml.cs b/BeWo/View/Detail/MandatorView.xaml.cs index d796c9f63..a35bc83a7 100644 --- a/BeWo/View/Detail/MandatorView.xaml.cs +++ b/BeWo/View/Detail/MandatorView.xaml.cs @@ -1,4 +1,5 @@ -using BeWo.ServiceProxy; +using System.Windows; +using BeWo.ServiceProxy; using BeWo.ViewModel; using BS.Shared.Extensions; @@ -47,5 +48,6 @@ namespace BeWo.View.Detail BeWoApp.Mandator = m; }))); } + } } \ No newline at end of file diff --git a/BeWo/View/Detail/ServiceRecordEditView.xaml b/BeWo/View/Detail/ServiceRecordEditView.xaml index 06646730a..db82ba902 100644 --- a/BeWo/View/Detail/ServiceRecordEditView.xaml +++ b/BeWo/View/Detail/ServiceRecordEditView.xaml @@ -102,17 +102,240 @@ x:Name="chkServiceRecordTypeContent" IsChecked="{Binding Path=IsServiceRecordTypeContent}" Visibility="Visible" /> - + + + @@ -234,7 +461,7 @@ - + diff --git a/BeWo/View/Detail/ServiceRecordEditView.xaml.cs b/BeWo/View/Detail/ServiceRecordEditView.xaml.cs index 52a82c3ed..e9e93816f 100644 --- a/BeWo/View/Detail/ServiceRecordEditView.xaml.cs +++ b/BeWo/View/Detail/ServiceRecordEditView.xaml.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Windows; +using System.Windows.Controls; using System.Windows.Input; using BeWo.Controls; @@ -194,16 +195,40 @@ namespace BeWo.View.Detail if (Settings.IsEndDateVisible) { - - datepicker_newEndDate.Visibility = Visibility.Visible; - EndDateLabel.Visibility = Visibility.Visible; + GridMitEnddatum.Visibility = Visibility.Visible; + GridOhneEnddatum.Visibility = Visibility.Collapsed; + GridMitJahrMonat.Visibility = Visibility.Collapsed; + + // ein Bereich für istSTDMin gestzt abfrage + if (Settings.IsZeiterfassungInStdMin) + { + MinSTDMitEnd.Visibility = Visibility.Visible; + MinStdDauerlbl.SetValue(Grid.ColumnProperty, 0); + numeric_duration.SetValue(Grid.ColumnProperty, 1); + } } - else - { - datepicker_newEndDate.Visibility = Visibility.Collapsed; - EndDateLabel.Visibility = Visibility.Collapsed; - } - + else + if (Settings.IsOnlyYearMonthVisible) + { + GridMitJahrMonat.Visibility = Visibility.Visible; + GridOhneEnddatum.Visibility = Visibility.Collapsed; + GridMitEnddatum.Visibility = Visibility.Collapsed; + + }else + { + GridOhneEnddatum.Visibility = Visibility.Visible; + GridMitEnddatum.Visibility = Visibility.Collapsed; + GridMitJahrMonat.Visibility = Visibility.Collapsed; + + // ist STDMin gestzt abfrage + if (Settings.IsZeiterfassungInStdMin) + { + MinSTDOhneEnd.Visibility = Visibility.Visible; + MinStdDauerLabel.SetValue(Grid.ColumnProperty,0); + numerictb_duration.SetValue(Grid.ColumnProperty,1); + } + + } } public bool IsCustomerChangeAllowed() diff --git a/BeWo/View/Detail/ServiceRecordGroupEditView.xaml b/BeWo/View/Detail/ServiceRecordGroupEditView.xaml index 63fb2723e..f131aba62 100644 --- a/BeWo/View/Detail/ServiceRecordGroupEditView.xaml +++ b/BeWo/View/Detail/ServiceRecordGroupEditView.xaml @@ -5,6 +5,7 @@ xmlns:localViewControls="clr-namespace:BeWo.View.Controls" xmlns:val="clr-namespace:BeWo.Validation" xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" + xmlns:core="clr-namespace:BS.Shared.Core;assembly=BS.Shared" Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True"> @@ -99,7 +100,198 @@