diff --git a/BeWo/Core/Commands/CommandFactory.cs b/BeWo/Core/Commands/CommandFactory.cs index 9852acdb8..46d22dffd 100644 --- a/BeWo/Core/Commands/CommandFactory.cs +++ b/BeWo/Core/Commands/CommandFactory.cs @@ -14,7 +14,7 @@ namespace BeWo.Core.Commands public static DelegateCommand GetAiViewCommand(Action openView, UserRightType? userRightType, Func additionalCheckup = null, bool? useCommandManager = null) { bool canExecute() => - (BeWoApp.AppSettings?.ModuleAiEnabled ?? BeWoApp.AppSettings?.ShowAI ?? false) && + (BeWoApp.AppSettings?.ShowAI ?? false) && (userRightType is null || BeWoApp.HasLoggedOnUserRight(userRightType.Value)) && (additionalCheckup is null || additionalCheckup()); diff --git a/BeWo/View/Detail/AI/AiConversationChatView.xaml b/BeWo/View/Detail/AI/AiConversationChatView.xaml index 31f9a14a5..920a55652 100644 --- a/BeWo/View/Detail/AI/AiConversationChatView.xaml +++ b/BeWo/View/Detail/AI/AiConversationChatView.xaml @@ -248,7 +248,6 @@ - @@ -303,7 +302,6 @@ - diff --git a/BeWo/View/Detail/CustomerView.xaml.cs b/BeWo/View/Detail/CustomerView.xaml.cs index f9704ae1d..1d7400633 100644 --- a/BeWo/View/Detail/CustomerView.xaml.cs +++ b/BeWo/View/Detail/CustomerView.xaml.cs @@ -102,7 +102,7 @@ namespace BeWo.View.Detail InitializeComponent(); DataContext = ViewModel; - OpenAiWindowCommand = CommandFactory.GetAiViewCommand(OpenAiWindow, UserRightType.AiModuleView, () => !ViewModel.IsNew); + OpenAiWindowCommand = CommandFactory.GetAiViewCommand(OpenAiWindow, UserRightType.AiModuleChatView, () => !ViewModel.IsNew); BehinderungsartenSelection.CommandBindings.Add(new CommandBinding(ApplicationCommands.Close, (s, e) => this.Dispatch(() => { PopupBehinderungsarten.IsOpen = false; }))); MerkzeichenSelection.CommandBindings.Add(new CommandBinding(ApplicationCommands.Close, (s, e) => this.Dispatch(() => { PopupMerkzeichen.IsOpen = false; }))); diff --git a/BeWo/View/Detail/Zeiterfassung/ServiceRecordEditView.xaml b/BeWo/View/Detail/Zeiterfassung/ServiceRecordEditView.xaml index 85e2d2505..738d66cb0 100644 --- a/BeWo/View/Detail/Zeiterfassung/ServiceRecordEditView.xaml +++ b/BeWo/View/Detail/Zeiterfassung/ServiceRecordEditView.xaml @@ -1510,7 +1510,8 @@ Grid.ColumnSpan="2" HorizontalAlignment="Right" DataContext="" - Orientation="Horizontal"> + Orientation="Horizontal" + Visibility="{Binding IsAiDocuButtonVisible, Converter={StaticResource BoolVisibilityConverter}}"> diff --git a/BeWo/View/Detail/Zeiterfassung/ServiceRecordView2.xaml b/BeWo/View/Detail/Zeiterfassung/ServiceRecordView2.xaml index 772f7559d..1d7ee3a44 100644 --- a/BeWo/View/Detail/Zeiterfassung/ServiceRecordView2.xaml +++ b/BeWo/View/Detail/Zeiterfassung/ServiceRecordView2.xaml @@ -1693,8 +1693,7 @@ Grid.Row="1" Grid.ColumnSpan="4" HorizontalAlignment="Right" - Orientation="Horizontal" - Visibility="{Binding IsAiButtonVisible, Converter={StaticResource BoolVisibilityConverter}}"> + Orientation="Horizontal"> @@ -1702,26 +1701,31 @@ + +