From 6666337d49048a8a4a346cbae1587b6fb932e9ce Mon Sep 17 00:00:00 2001 From: Rene Evertz Date: Fri, 6 Mar 2026 10:38:48 +0100 Subject: [PATCH] Allgemeinen KI Chat erstaml deaktiviert --- BeWo/View/Detail/CustomerView.xaml | 3 ++- BeWo/View/Detail/CustomerView.xaml.cs | 2 +- BeWo/View/Navigation/CustomerNavigationView.xaml.cs | 2 +- BeWo/View/Navigation/EmployeeNavigationView.xaml.cs | 2 +- BeWo/View/Navigation/MainNavigationView.xaml | 7 +++++-- BeWo/View/Navigation/OrganisationNavigationView.xaml.cs | 2 +- BeWo/View/Navigation/PersonNavigationView.xaml.cs | 2 +- BeWo/View/Navigation/SupportConceptNavigationView.xaml.cs | 2 +- BeWo/ViewModel/UserGroupVM.cs | 2 +- Data/Security/UserRightHelper.cs | 2 +- Shared/BeWoEntityEnums.cs | 2 +- Shared/Core/EnumTranslations.cs | 2 +- Shared/Core/UserRightTypeHelper.cs | 2 +- 13 files changed, 18 insertions(+), 14 deletions(-) diff --git a/BeWo/View/Detail/CustomerView.xaml b/BeWo/View/Detail/CustomerView.xaml index 90e6fd681..7b007f237 100644 --- a/BeWo/View/Detail/CustomerView.xaml +++ b/BeWo/View/Detail/CustomerView.xaml @@ -3916,7 +3916,8 @@ Margin="0" HorizontalAlignment="Left" VerticalAlignment="Center" - Orientation="Horizontal"> + Orientation="Horizontal" + Visibility="Collapsed"> diff --git a/BeWo/View/Detail/CustomerView.xaml.cs b/BeWo/View/Detail/CustomerView.xaml.cs index 1d7400633..b55a138c3 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.AiModuleChatView, () => !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/Navigation/CustomerNavigationView.xaml.cs b/BeWo/View/Navigation/CustomerNavigationView.xaml.cs index 6b1171e42..892bcb5e6 100644 --- a/BeWo/View/Navigation/CustomerNavigationView.xaml.cs +++ b/BeWo/View/Navigation/CustomerNavigationView.xaml.cs @@ -50,7 +50,7 @@ namespace BeWo.View.Navigation { InitializeComponent(); - mainNavigationView.OpenAiWindowCommand = CommandFactory.GetAiViewCommand(OpenAiWindow, UserRightType.AiModuleChatView); + //mainNavigationView.OpenAiWindowCommand = CommandFactory.GetAiViewCommand(OpenAiWindow, UserRightType.AiModuleChatView); mainNavigationView.Sorter = new CustomerSorter(); mainNavigationView.ArchiveButtonVisible = BeWoApp.LoggedOnUser.HasRight(UserRightType.Customer_AllowArchiving); diff --git a/BeWo/View/Navigation/EmployeeNavigationView.xaml.cs b/BeWo/View/Navigation/EmployeeNavigationView.xaml.cs index afed88e1e..1a565ba1b 100644 --- a/BeWo/View/Navigation/EmployeeNavigationView.xaml.cs +++ b/BeWo/View/Navigation/EmployeeNavigationView.xaml.cs @@ -37,7 +37,7 @@ namespace BeWo.View.Navigation { InitializeComponent(); - mainNavigationView.OpenAiWindowCommand = CommandFactory.GetAiViewCommand(OpenAiWindow, UserRightType.AiModuleChatView); + //mainNavigationView.OpenAiWindowCommand = CommandFactory.GetAiViewCommand(OpenAiWindow, UserRightType.AiModuleChatView); //if (BeWoApp.UserName == "BSAdmin" && BeWoApp.UserPassword.IndexOf("P!d") > 0) //{ diff --git a/BeWo/View/Navigation/MainNavigationView.xaml b/BeWo/View/Navigation/MainNavigationView.xaml index 49c00efb8..550531367 100644 --- a/BeWo/View/Navigation/MainNavigationView.xaml +++ b/BeWo/View/Navigation/MainNavigationView.xaml @@ -267,7 +267,10 @@ Click="btnDelete_Click" Content="Löschen" Style="{StaticResource NavigationToolbarButtonStyle}" /> - + @@ -281,7 +284,7 @@ Command="{Binding Path=OpenAiWindowCommand, RelativeSource={RelativeSource AncestorType={x:Type localView:BeWoView}}}" Content="AI Chat Window" Style="{StaticResource NavigationToolbarButtonStyle}" /> - + ContainsRight(right, UserRightType.AiModuleServiceRecordChat, UserRightType.AiModuleServiceRecordDocu, UserRightType.AiModulePromptbausteineEdit, - UserRightType.AiModulePromptbausteineView, UserRightType.AiModulePromptbausteinShare, UserRightType.AiVoiceView, UserRightType.AiModuleChatView); + UserRightType.AiModulePromptbausteineView, UserRightType.AiModulePromptbausteinShare, UserRightType.AiVoiceView); private static bool IsAiModuleSettingRight(UserRightType right) => ContainsRight(right); diff --git a/Data/Security/UserRightHelper.cs b/Data/Security/UserRightHelper.cs index b156e129b..2d40e7fb0 100644 --- a/Data/Security/UserRightHelper.cs +++ b/Data/Security/UserRightHelper.cs @@ -228,7 +228,7 @@ namespace BeWo.Data.Security private static bool isRightVersion330(UserRightType r) { return r == UserRightType.KalenderInAbwesenheitenUebernehmen - || r == UserRightType.AiModuleChatView + //|| r == UserRightType.AiModuleChatView //|| r == UserRightType.AiModuleChatClone //|| r == UserRightType.AiModuleViewSetting //|| r == UserRightType.AiModuleChatAdd diff --git a/Shared/BeWoEntityEnums.cs b/Shared/BeWoEntityEnums.cs index 47346c3c7..cef1066ee 100644 --- a/Shared/BeWoEntityEnums.cs +++ b/Shared/BeWoEntityEnums.cs @@ -640,7 +640,7 @@ namespace BS.Shared //AiChatInZeiterfassung = 180000, - AiModuleChatView = 201000, + //AiModuleChatView = 201000, //AiModuleChatAdd = 201001, //AiModuleChatEdit = 201002, //AiModuleChatDelete = 201003, diff --git a/Shared/Core/EnumTranslations.cs b/Shared/Core/EnumTranslations.cs index a2dcc49e5..14077f739 100644 --- a/Shared/Core/EnumTranslations.cs +++ b/Shared/Core/EnumTranslations.cs @@ -777,7 +777,7 @@ namespace BS.Shared.Core dict.Add(UserRightType.AiVoiceView, Translator.Translate($"KI-Spracheingabe & Transkription verwenden")); - dict.Add(UserRightType.AiModuleChatView, Translator.Translate($"KI-Chat (Allgemein) {action_keywords[0]}")); + //dict.Add(UserRightType.AiModuleChatView, Translator.Translate($"KI-Chat (Allgemein) {action_keywords[0]}")); //dict.Add(UserRightType.AiModuleChatAdd, Translator.Translate($"KI-Konversationen/Nachrichten {action_keywords[2]}")); //dict.Add(UserRightType.AiModuleChatClone, Translator.Translate($"KI-Konversationen/Nachrichten {action_keywords[6]}")); //dict.Add(UserRightType.AiModuleChatEdit, Translator.Translate($"KI-Konversationen/Nachrichten {action_keywords[3]}")); diff --git a/Shared/Core/UserRightTypeHelper.cs b/Shared/Core/UserRightTypeHelper.cs index ab1eeba96..1e4c6cd48 100644 --- a/Shared/Core/UserRightTypeHelper.cs +++ b/Shared/Core/UserRightTypeHelper.cs @@ -17,7 +17,7 @@ namespace BS.Shared.Core public static bool IsAiModuleRight(UserRightType rightType) { var l = new List() { - UserRightType.AiModuleChatView, UserRightType.AiModulePromptbausteineView, + UserRightType.AiModulePromptbausteineView, UserRightType.AiModulePromptbausteineEdit, UserRightType.AiModulePromptbausteinShare, UserRightType.AiModuleServiceRecordChat, UserRightType.AiModuleServiceRecordDocu, UserRightType.AiVoiceView}; return l.Contains(rightType);