diff --git a/BeWo/Core/Commands/CommandFactory.cs b/BeWo/Core/Commands/CommandFactory.cs index 88f4f9c02..5e74a02d0 100644 --- a/BeWo/Core/Commands/CommandFactory.cs +++ b/BeWo/Core/Commands/CommandFactory.cs @@ -13,12 +13,22 @@ namespace BeWo.Core.Commands // new DelegateCommand(OpenAiWindow, () => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModuleView) && !ViewModel.IsNew) public static DelegateCommand GetAiViewCommand(Action openView, UserRightType userRightType, Func additionalCheckup = null) { - Func checkup = (right) => BeWoApp.AppSettings.ModuleAiEnabled && BeWoApp.HasLoggedOnUserRight(right); + Func checkup1 = () => BeWoApp.AppSettings.ModuleAiEnabled; + Func checkup2 = (right) => BeWoApp.HasLoggedOnUserRight(right); + + Func checkup = (right) => CheckupTestVersion() && checkup1() && checkup2(right); if (additionalCheckup == null) - return new DelegateCommand(openView, () => checkup(userRightType)); + return new DelegateCommand(openView, () => checkup(userRightType), false); else - return new DelegateCommand(openView, () => checkup(userRightType) && additionalCheckup()); + return new DelegateCommand(openView, () => checkup(userRightType) && additionalCheckup(), false); + } + + private static bool CheckupTestVersion() + { + var version = BeWoApp.Version.Split(' '); + var test_string = version[version.Length - 1].ToLower(); + return test_string == "test"; } } } diff --git a/BeWo/View/Detail/Zeiterfassung/ServiceRecordView2.xaml b/BeWo/View/Detail/Zeiterfassung/ServiceRecordView2.xaml index c3eec0acf..60846fc7d 100644 --- a/BeWo/View/Detail/Zeiterfassung/ServiceRecordView2.xaml +++ b/BeWo/View/Detail/Zeiterfassung/ServiceRecordView2.xaml @@ -626,7 +626,7 @@