From bd67f3d4968d10c32743b6a0a49eeece19b99537 Mon Sep 17 00:00:00 2001 From: Rene Evertz Date: Thu, 18 Dec 2025 14:05:12 +0100 Subject: [PATCH] =?UTF-8?q?Vorbereitung=20f=C3=BCr=20Rename?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BeWo/AI/AiChatController.cs | 46 ----- BeWo/AI/View/AiChatView.xaml | 149 ---------------- BeWo/AI/View/AiChatView.xaml.cs | 160 ------------------ BeWo/BeWo.csproj | 8 - BeWo/MainControl.xaml | 21 --- BeWo/MainControl.xaml.cs | 27 +-- BeWo/View/Detail/CustomerView.xaml | 39 +---- BeWo/View/Detail/CustomerView.xaml.cs | 16 -- .../Zeiterfassung/ServiceRecordView2.xaml | 26 +-- .../Zeiterfassung/ServiceRecordView2.xaml.cs | 29 +--- .../Navigation/CustomerNavigationView.xaml | 1 - .../Navigation/CustomerNavigationView.xaml.cs | 11 -- BeWo/View/Navigation/MainNavigationView.xaml | 7 - .../Navigation/MainNavigationView.xaml.cs | 46 ----- .../ListViewModel/ServiceRecordListVM.cs | 5 - 15 files changed, 11 insertions(+), 580 deletions(-) delete mode 100644 BeWo/AI/AiChatController.cs delete mode 100644 BeWo/AI/View/AiChatView.xaml delete mode 100644 BeWo/AI/View/AiChatView.xaml.cs diff --git a/BeWo/AI/AiChatController.cs b/BeWo/AI/AiChatController.cs deleted file mode 100644 index 437ac29a5..000000000 --- a/BeWo/AI/AiChatController.cs +++ /dev/null @@ -1,46 +0,0 @@ -using BeWo.AI.View; -using BeWo.View; -using BeWo.View.Windows; -using BS.Shared; -using BS.Shared.Translation; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace BeWo.AI -{ - class AiChatController - { - private static void CreateAiChatWindow(AiChatView view, double height, double width) - { - var beWoWindow = BeWoWindowBuilder.GetBeWoWindow(Translator.Translate("Frage unsere KI"), view, height, width); - - view.CloseButtonClicked += () => beWoWindow.Close(); - - beWoWindow.ShowDialog(); - } - - public static void ShowAiChatViewForServiceRecords(long c2sOid, DateTime start, DateTime end, double height, double width) - { - var ctrl = new AiChatView(); - ctrl.InitServiceRecordQuery(c2sOid, start, end); - CreateAiChatWindow(ctrl, height, width); - } - - public static void ShowAiChatViewForSingleCustomer(long customerOid, double height, double width) - { - var ctrl = new AiChatView(); - ctrl.InitSingleCustomerQuery(customerOid); - CreateAiChatWindow(ctrl, height, width); - } - - public static void ShowAiChatViewForObjects(TableID tableId, double height, double width) - { - var ctrl = new AiChatView(); - ctrl.InitObjectQuery(tableId); - CreateAiChatWindow(ctrl, height, width); - } - } -} diff --git a/BeWo/AI/View/AiChatView.xaml b/BeWo/AI/View/AiChatView.xaml deleted file mode 100644 index f58bfce2b..000000000 --- a/BeWo/AI/View/AiChatView.xaml +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - - - - - - - - - - - - - - - + Style="{StaticResource NavigationToolbarButtonStyle}" /> + o.StartDate).First().StartDate : DateTime.Now; - var latestEndDate = sr.Any() - ? sr.OrderByDescending(o => o.EndDate).First().EndDate - : DateTime.Now.AddSeconds(1); - - if (latestEndDate.Hour == 0 && latestEndDate.Minute == 0 && latestEndDate.Second == 1) - { - latestEndDate = latestEndDate.AddHours(23); - latestEndDate = latestEndDate.AddMinutes(59); - } - - AiChatController.ShowAiChatViewForServiceRecords(c2sOid, earliestStartDate, latestEndDate, Math.Min(800, this.ActualHeight), Math.Min(1200, this.ActualWidth)); - - } private void multiSupportConceptControl_ListChanged(object sender, EventArgs> e) { ViewModel.UpdateGroupServiceAccountings(e.Data); diff --git a/BeWo/View/Navigation/CustomerNavigationView.xaml b/BeWo/View/Navigation/CustomerNavigationView.xaml index c57cf6fc9..3330f0873 100644 --- a/BeWo/View/Navigation/CustomerNavigationView.xaml +++ b/BeWo/View/Navigation/CustomerNavigationView.xaml @@ -331,7 +331,6 @@ MainGroupHeader="{markup:Translate Klienten}" MainListItemStyle="{StaticResource CustomerDetailStyle}" OnReloadData="MainNavigationView_OnReloadData" - OpenAiChat="MainNavigationView_OpenAiChat" OpenMailMergeWindow="MainNavigationView_OnOpenMailMergeWindow" OpenObject="mainNavigationView_OpenObject" Print="mainNavigationView_Print" diff --git a/BeWo/View/Navigation/CustomerNavigationView.xaml.cs b/BeWo/View/Navigation/CustomerNavigationView.xaml.cs index 9a9ce96bb..efb092902 100644 --- a/BeWo/View/Navigation/CustomerNavigationView.xaml.cs +++ b/BeWo/View/Navigation/CustomerNavigationView.xaml.cs @@ -23,7 +23,6 @@ using BS.Shared.Extensions; using BS.Shared.Translation; using Microsoft.Win32; -using BeWo.AI; using BeWo.View.Document; using DevExpress.Mvvm; using System; @@ -71,11 +70,6 @@ namespace BeWo.View.Navigation //supportConceptFilterComboBox.SelectionChanged = "sortCombo_SelectionChanged"; supportConceptFilterComboBox.Style = FindResource("SortComboBox") as Style; - if (BeWoApp.AppSettings.ShowAIInternal) - { - mainNavigationView.btnOpenAi.Visibility = Visibility.Visible; - } - if (BeWoApp.LoggedOnUser.HasRight(UserRightType.CustomerView_View) || BeWoApp.LoggedOnUser.HasRight(UserRightType.ViewAll)) { supportConceptFilterComboBox.Items.Add(new CustomerFilterItem(CustomerFilterEnum.All)); @@ -549,10 +543,5 @@ namespace BeWo.View.Navigation }); }); } - - private void MainNavigationView_OpenAiChat() - { - AiChatController.ShowAiChatViewForObjects(TableID.Customer, 800, 1200); - } } } \ No newline at end of file diff --git a/BeWo/View/Navigation/MainNavigationView.xaml b/BeWo/View/Navigation/MainNavigationView.xaml index 71d990746..0d32d5946 100644 --- a/BeWo/View/Navigation/MainNavigationView.xaml +++ b/BeWo/View/Navigation/MainNavigationView.xaml @@ -267,13 +267,6 @@ Click="btnDelete_Click" Content="Löschen" Style="{StaticResource NavigationToolbarButtonStyle}" /> -