diff --git a/BeWo/ServiceProxy/GeneratedAiEnhancedService.cs b/BeWo/ServiceProxy/GeneratedAiEnhancedService.cs index 8dc820890..c1d8f9169 100644 --- a/BeWo/ServiceProxy/GeneratedAiEnhancedService.cs +++ b/BeWo/ServiceProxy/GeneratedAiEnhancedService.cs @@ -31,7 +31,7 @@ namespace BeWo.ServiceProxy [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAiEnhancedService/GetAiConversations", ReplyAction="http://tempuri.org/IAiEnhancedService/GetAiConversationsResponse")] [System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IAiEnhancedService/GetAiConversationsBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")] - System.Collections.Generic.List GetAiConversations(BS.Shared.AiContextType uicontext, System.Nullable oid); + System.Collections.Generic.List GetAiConversations(BS.Shared.AiActionType actionType, System.Nullable oid); [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAiEnhancedService/CreateAiConversation", ReplyAction="http://tempuri.org/IAiEnhancedService/CreateAiConversationResponse")] [System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IAiEnhancedService/CreateAiConversationBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")] @@ -61,7 +61,7 @@ namespace BeWo.ServiceProxy [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAiEnhancedService/CheckContextSize", ReplyAction="http://tempuri.org/IAiEnhancedService/CheckContextSizeResponse")] [System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IAiEnhancedService/CheckContextSizeBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")] - bool CheckContextSize(BS.Shared.AiContextType aiContextType, System.Collections.Generic.Dictionary> context, System.Nullable modell_oid); + bool CheckContextSize(BS.Shared.AiActionType actionType, System.Collections.Generic.Dictionary> context, System.Nullable modell_oid); [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAiEnhancedService/GetAiPromptbausteinFolder", ReplyAction="http://tempuri.org/IAiEnhancedService/GetAiPromptbausteinFolderResponse")] [System.ServiceModel.FaultContractAttribute(typeof(BS.Shared.Core.BeWoFault), Action="http://tempuri.org/IAiEnhancedService/GetAiPromptbausteinFolderBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BS.Shared.Core")] @@ -171,9 +171,9 @@ namespace BeWo.ServiceProxy return base.Channel.GetAiModels(); } - public System.Collections.Generic.List GetAiConversations(BS.Shared.AiContextType uicontext, System.Nullable oid) + public System.Collections.Generic.List GetAiConversations(BS.Shared.AiActionType actionType, System.Nullable oid) { - return base.Channel.GetAiConversations(uicontext, oid); + return base.Channel.GetAiConversations(actionType, oid); } public BS.Shared.DataContracts.Feature.AI.AiConversationDC CreateAiConversation(BS.Shared.DataContracts.Feature.AI.AiConversationDC conversation, long modell_oid) @@ -206,9 +206,9 @@ namespace BeWo.ServiceProxy return base.Channel.SendNewMessage(conversation, message); } - public bool CheckContextSize(BS.Shared.AiContextType aiContextType, System.Collections.Generic.Dictionary> context, System.Nullable modell_oid) + public bool CheckContextSize(BS.Shared.AiActionType actionType, System.Collections.Generic.Dictionary> context, System.Nullable modell_oid) { - return base.Channel.CheckContextSize(aiContextType, context, modell_oid); + return base.Channel.CheckContextSize(actionType, context, modell_oid); } public System.Collections.Generic.List GetAiPromptbausteinFolder(BS.Shared.AiActionType aiActionType) diff --git a/BeWo/Services/BeWoControlFactory.cs b/BeWo/Services/BeWoControlFactory.cs index d0a1791a6..7abf386d0 100644 --- a/BeWo/Services/BeWoControlFactory.cs +++ b/BeWo/Services/BeWoControlFactory.cs @@ -19,7 +19,7 @@ namespace BeWo.Services { public Control GetAiConversationControl(AiConversationChatViewModel vm) { - var styleString = getStyleString(vm.AiContext); + var styleString = getStyleString(vm.ActionType); var control = styleString is object ? new AiConversationChatView(vm, styleString) : new AiConversationChatView(vm); @@ -52,18 +52,21 @@ namespace BeWo.Services return control; } - private string getStyleString(AiContextType uIContext) { - switch (uIContext) + private string getStyleString(AiActionType actionType) { + switch (actionType) { - case AiContextType.SupportConceptNavigation: return "ModuleAiControlSupportConceptStyle"; - case AiContextType.CustomerNavigation: return "ModuleAiControlCustomerStyle"; - case AiContextType.PersonNavigation: return "ModuleAiControlPersonStyle"; - case AiContextType.EmployeeNavigation: return "ModuleAiControlEmployeeStyle"; - case AiContextType.OrganisationNavigation: return "ModuleAiControlOrganisationStyle"; - case AiContextType.ServiceRecord: return "ModuleAiControlZeiterfassungStyle"; - case AiContextType.CustomerDetail: return "ModuleAiControlCustomerStyle"; - case AiContextType.PersonDetail: return "ModuleAiControlPersonStyle"; - case AiContextType.EmployeeDetail: return "ModuleAiControlEmployeeStyle"; + case AiActionType.ServiceRecordConversation: return "ModuleAiControlZeiterfassungStyle"; + case AiActionType.ServiceRecordDocumentation: return "ModuleAiControlZeiterfassungStyle"; + + //case AiContextType.SupportConceptNavigation: return "ModuleAiControlSupportConceptStyle"; + //case AiContextType.CustomerNavigation: return "ModuleAiControlCustomerStyle"; + //case AiContextType.PersonNavigation: return "ModuleAiControlPersonStyle"; + //case AiContextType.EmployeeNavigation: return "ModuleAiControlEmployeeStyle"; + //case AiContextType.OrganisationNavigation: return "ModuleAiControlOrganisationStyle"; + //case AiContextType.ServiceRecord: return "ModuleAiControlZeiterfassungStyle"; + //case AiContextType.CustomerDetail: return "ModuleAiControlCustomerStyle"; + //case AiContextType.PersonDetail: return "ModuleAiControlPersonStyle"; + //case AiContextType.EmployeeDetail: return "ModuleAiControlEmployeeStyle"; } return null; diff --git a/BeWo/Services/BeWoWindowFactory.cs b/BeWo/Services/BeWoWindowFactory.cs index 7b648a29e..cbed91849 100644 --- a/BeWo/Services/BeWoWindowFactory.cs +++ b/BeWo/Services/BeWoWindowFactory.cs @@ -17,15 +17,10 @@ namespace BeWo.Services { public class BeWoWindowFactory { - private Dictionary _UIContext2Header = new Dictionary() + private Dictionary _UIContext2Header = new Dictionary() { - {AiContextType.ServiceRecord, "KI Chat: Zeiterfassung" }, - {AiContextType.CustomerNavigation, "KI Chat: Klienten Übersicht" }, - {AiContextType.PersonNavigation, "KI Chat: Personen Übersicht" }, - {AiContextType.EmployeeNavigation, "KI Chat: Mitarbeiter Übersicht" }, - {AiContextType.OrganisationNavigation, "KI Chat: Organisation Übersicht" }, - {AiContextType.SupportConceptNavigation, "KI Chat: Hilfeplan Übersicht" }, - {AiContextType.CustomerDetail, "KI Chat: Klient" }, + {AiActionType.ServiceRecordConversation, "KI Chat: Zeiterfassung" }, + {AiActionType.ServiceRecordDocumentation, "KI Doku: Zeiterfassung" } }; public Control GetModalViewWindow(string title, Control control, double height = 600, double width = 1200) @@ -69,9 +64,9 @@ namespace BeWo.Services return "GKV-Abrechnung Nr. " + vm.Oid; } - public string GetAiTitle(AiContextType aiContextType) + public string GetAiTitle(AiActionType actionType) { - if (_UIContext2Header.TryGetValue(aiContextType, out string str)) + if (_UIContext2Header.TryGetValue(actionType, out string str)) return str; return "default"; diff --git a/BeWo/Services/BeWoWindowService.cs b/BeWo/Services/BeWoWindowService.cs index fee6d373d..6c460acea 100644 --- a/BeWo/Services/BeWoWindowService.cs +++ b/BeWo/Services/BeWoWindowService.cs @@ -81,7 +81,7 @@ namespace BeWo.Services public void ShowAiConversationWindow(AiConversationChatViewModel viewModel) { var control = _controlFactory.GetAiConversationControl(viewModel); - var title = _windowFactory.GetAiTitle(viewModel.AiContext); + var title = _windowFactory.GetAiTitle(viewModel.ActionType); var options = new BeWoWindowOptions() { Height = 600, diff --git a/BeWo/View/Controls/AI/AiChatButton.xaml b/BeWo/View/Controls/AI/AiChatButton.xaml index ad62fe95c..802fde657 100644 --- a/BeWo/View/Controls/AI/AiChatButton.xaml +++ b/BeWo/View/Controls/AI/AiChatButton.xaml @@ -2,11 +2,16 @@ x:Class="BeWo.View.Controls.AI.AiChatButton" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:ai="clr-namespace:BeWo.ViewModel.Controls.AI" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:draw="clr-namespace:System.Drawing;assembly=System.Drawing" + xmlns:i="http://schemas.devexpress.com/winfx/2008/xaml/mvvm" xmlns:local="clr-namespace:BeWo.View.Controls.AI" - xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:ai="clr-namespace:BeWo.ViewModel.Controls.AI" xmlns:i="http://schemas.devexpress.com/winfx/2008/xaml/mvvm" d:DataContext="{d:DesignInstance Type=ai:AiChatButtonViewModel}" - mc:Ignorable="d"> + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + d:DataContext="{d:DesignInstance Type=ai:AiChatButtonWithHistoryViewModel}" + mc:Ignorable="d" + Loaded="UserControl_Loaded" + Visibility="{Binding IsEnabled, Converter={StaticResource BoolVisibilityConverter}}"> @@ -26,9 +31,9 @@ Background="Transparent" Content="{StaticResource AiDesignsIconKIChatWeissOrange}" ToolTip="KI Chat öffnen" - ToolTipService.ShowOnDisabled="True" > + ToolTipService.ShowOnDisabled="True"> - + diff --git a/BeWo/View/Detail/CustomerView.xaml.cs b/BeWo/View/Detail/CustomerView.xaml.cs index d3642a1a0..a864bfc4f 100644 --- a/BeWo/View/Detail/CustomerView.xaml.cs +++ b/BeWo/View/Detail/CustomerView.xaml.cs @@ -292,8 +292,6 @@ namespace BeWo.View.Detail #endif } - public DelegateCommand OpenAiWindowCommand { get; } - public Dictionary GetVisibleInformationReferences() { var visible = ViewModel; @@ -312,13 +310,14 @@ namespace BeWo.View.Detail private AiConversationChatViewModel getAiConversationChatViewModel() { - var customer_oid = ViewModel.DataContract.CustomerOid; - var context = GetVisibleInformationReferences(); + throw new NotImplementedException(); + //var customer_oid = ViewModel.DataContract.CustomerOid; + //var context = GetVisibleInformationReferences(); - var vm = VMFactory.CreateAiConversationChatViewModel(AiContextType.CustomerDetail, context, customer_oid); + // var vm = VMFactory.CreateAiConversationChatViewModel(AiContextType.CustomerDetail, context, customer_oid); - return vm; - } + // return vm; + } private void OpenAiWindow() { diff --git a/BeWo/View/Detail/Zeiterfassung/ServiceRecordEditView.xaml b/BeWo/View/Detail/Zeiterfassung/ServiceRecordEditView.xaml index e6385e473..c0455fcbc 100644 --- a/BeWo/View/Detail/Zeiterfassung/ServiceRecordEditView.xaml +++ b/BeWo/View/Detail/Zeiterfassung/ServiceRecordEditView.xaml @@ -2,6 +2,7 @@ x:Class="BeWo.View.Detail.Zeiterfassung.ServiceRecordEditView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:ai="clr-namespace:BeWo.View.Controls.AI" xmlns:core="clr-namespace:BS.Shared.Core;assembly=BS.Shared" xmlns:detail="clr-namespace:BeWo.View.Detail" xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars" @@ -16,7 +17,6 @@ xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls" xmlns:val="clr-namespace:BeWo.Validation" xmlns:zeit="clr-namespace:BeWo.View.Detail.Zeiterfassung" - xmlns:ai="clr-namespace:BeWo.View.Controls.AI" x:Name="root" Width="Auto" Height="Auto" @@ -1508,12 +1508,11 @@ + Orientation="Horizontal"> @@ -1521,25 +1520,8 @@ -