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 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/BeWo/AI/View/AiChatView.xaml.cs b/BeWo/AI/View/AiChatView.xaml.cs
deleted file mode 100644
index d8754b408..000000000
--- a/BeWo/AI/View/AiChatView.xaml.cs
+++ /dev/null
@@ -1,160 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.IO;
-using System.Linq;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Forms;
-using System.Windows.Input;
-
-using BeWo.Annotations;
-using BeWo.Core;
-using BeWo.ServiceProxy;
-using BeWo.Validation;
-using BeWo.View;
-using BeWo.ViewModel;
-using BeWo.ViewModel.ListViewModel;
-
-using BS.Shared;
-using BS.Shared.Core;
-using BS.Shared.DataContracts;
-using BS.Shared.Extensions;
-using BS.Shared.Translation;
-using DevExpress.Utils;
-using DevExpress.Xpf.Editors;
-using DevExpress.Xpf.Grid;
-using MessageBox = System.Windows.MessageBox;
-
-namespace BeWo.AI.View
-{
- public partial class AiChatView : BeWoView
- {
- public event Action CloseButtonClicked;
-
- int type = 0; //0 = ServiceRecordQuery, 1 = SingleCustomerQuery, 2 = AllCustomerQuery
-
- private long cb2scOid;
- private long customerOid;
- private TableID tableID;
- private DateTime startDate;
- private DateTime endDate;
- private AiSettingsDC aiSettings;
-
- public AiChatView()
- {
- InitializeComponent();
-
- }
-
- public void InitServiceRecordQuery(long c2sOid, DateTime start, DateTime end)
- {
- type = 0;
- this.cb2scOid = c2sOid;
- this.startDate = start;
- this.endDate = end;
-
- LoadAiSettings(1);
- }
-
-
- public void InitSingleCustomerQuery(long customerOid)
- {
- type = 1;
- this.customerOid = customerOid;
- }
-
- public void InitObjectQuery(TableID tableId)
- {
- type = 2;
- tableID = tableId;
- }
-
- private void LoadAiSettings(int settingsType)
- {
- aiSettings = ServiceFacade.DoOperationsServiceSync(s => s.GetAiSettings(settingsType));
- }
-
- private void ReloadViewModel(AiChatDC dc)
- {
- TextBoxErgebnis.Text = dc.Result;
- }
-
- private void btnSend_Click(object sender, RoutedEventArgs e)
- {
- var acdc = new AiChatDC();
- acdc.Prompt = TextBoxAnfrage.Text;
-
- if (type == 1)
- {
- ServiceFacade.DoOperationsServiceAsync(s => s.CreateAiQueryForSingleCustomer(acdc, customerOid),
- dc =>
- {
- this.Dispatch(delegate
- {
- ReloadViewModel(dc);
- });
- });
- }
- else if (type == 2)
- {
- ServiceFacade.DoOperationsServiceAsync(s => s.CreateAiQueryForObjects(acdc, (int)tableID),
- dc =>
- {
- this.Dispatch(delegate
- {
- ReloadViewModel(dc);
- });
- });
- }
- else
- {
- ServiceFacade.DoOperationsServiceAsync(s => s.CreateAiQueryForServiceRecords(acdc, cb2scOid, startDate, endDate),
- dc =>
- {
- this.Dispatch(delegate
- {
- ReloadViewModel(dc);
- });
- });
- }
- }
- private void btnClose_Click(object sender, RoutedEventArgs e)
- {
- CloseButtonClicked?.Invoke();
- }
-
- private void btnSettings_Click(object sender, RoutedEventArgs e)
- {
- if (aiSettings != null)
- {
- TextBoxTemplate.Text = aiSettings.Settings;
- }
- PopupTemplate.IsOpen = true;
- }
-
-
- private void btnSaveSettings_Click(object sender, RoutedEventArgs e)
- {
- PopupTemplate.IsOpen = false;
- if (aiSettings != null)
- {
- aiSettings.Settings = TextBoxTemplate.Text;
-
- ServiceFacade.DoOperationsServiceAsync(s => s.UpdateAiSettings(aiSettings),
- dc =>
- {
- this.Dispatch(delegate
- {
- aiSettings = dc;
- });
- });
- }
- }
-
- private void btnCancelSettings_Click(object sender, RoutedEventArgs e)
- {
- PopupTemplate.IsOpen = false;
- }
- }
-}
diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj
index 57c3c4287..77f59d37e 100644
--- a/BeWo/BeWo.csproj
+++ b/BeWo/BeWo.csproj
@@ -331,10 +331,6 @@
3.0
-
- MSBuild:Compile
- Designer
-
MSBuild:Compile
Designer
@@ -1130,10 +1126,6 @@
MSBuild:Compile
Designer
-
-
- AiChatView.xaml
-
BSLogoControl.xaml
diff --git a/BeWo/MainControl.xaml b/BeWo/MainControl.xaml
index cde587290..787dc8f0c 100644
--- a/BeWo/MainControl.xaml
+++ b/BeWo/MainControl.xaml
@@ -829,27 +829,6 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/BeWo/MainControl.xaml.cs b/BeWo/MainControl.xaml.cs
index 05cc56a9a..6380ccfbe 100644
--- a/BeWo/MainControl.xaml.cs
+++ b/BeWo/MainControl.xaml.cs
@@ -61,9 +61,7 @@ namespace BeWo
Scheduling = 14,
Finance = 15,
Administration = 16,
- AiConversation = 17,
- AiConversationPopup = 18,
- ServiceRecord = 19
+ ServiceRecord = 19,
}
public partial class MainControl
@@ -357,12 +355,6 @@ namespace BeWo
case UIContext.Finance:
view = new FinanceView();
break;
- case UIContext.AiConversation:
- view = new AiConversationView();
- break;
- case UIContext.AiConversationPopup:
- view = new AiConversationView();
- break;
}
_Views[uiContext] = view;
@@ -1261,14 +1253,6 @@ namespace BeWo
}
}
- private void button_ai_chat_Click(object sender, RoutedEventArgs e)
- {
- if (DoSaveCheck())
- {
- NavigateTo(GetViewForUIContext(UIContext.AiConversation));
- }
- }
-
//private void button_assessmentSheetEntry_Click(object sender, RoutedEventArgs e)
//{
// if (this.DoSaveCheck())
@@ -1944,14 +1928,5 @@ namespace BeWo
NavigateTo(GetViewForUIContext(UIContext.Scheduling));
}
}
-
- private void button_ai_chat_popup_Click(object sender, RoutedEventArgs e)
- {
- var view = GetViewForUIContext(UIContext.AiConversationPopup);
-
- var window = BeWoWindowBuilder.GetBeWoWindow("Ai Chat", view, 800, 1200);
-
- window.Show();
- }
}
}
\ No newline at end of file
diff --git a/BeWo/View/Detail/CustomerView.xaml b/BeWo/View/Detail/CustomerView.xaml
index a867fa235..6fb5213d2 100644
--- a/BeWo/View/Detail/CustomerView.xaml
+++ b/BeWo/View/Detail/CustomerView.xaml
@@ -923,9 +923,9 @@
Content="Geburtstag" />
-
-
-
+
+
+
-
+
+ UpdateSourceTrigger=PropertyChanged}" />
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ 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}" />
-
diff --git a/BeWo/View/Navigation/MainNavigationView.xaml.cs b/BeWo/View/Navigation/MainNavigationView.xaml.cs
index e2416ea32..1ba8eb082 100644
--- a/BeWo/View/Navigation/MainNavigationView.xaml.cs
+++ b/BeWo/View/Navigation/MainNavigationView.xaml.cs
@@ -96,8 +96,6 @@ namespace BeWo.View.Navigation
public delegate void ImportObjectsDelegate();
- public delegate void OpenAiChatDelegate();
-
public delegate bool DeleteObjectDelegate(IFilterableDC obj);
public delegate void OpenObjectDelegate(IFilterableDC obj);
@@ -114,8 +112,6 @@ namespace BeWo.View.Navigation
public event ImportObjectsDelegate ImportObjects;
- public event OpenAiChatDelegate OpenAiChat;
-
public event DeleteObjectDelegate DeleteObject;
public event EventHandler>> ExcelExport;
@@ -225,19 +221,6 @@ namespace BeWo.View.Navigation
}
}
- public bool OpenAiButtonVisible
- {
- get
- {
- return btnOpenAi.Visibility == Visibility.Visible;
- }
-
- set
- {
- btnOpenAi.Visibility = value ? Visibility.Visible : Visibility.Collapsed;
- }
- }
-
//[TypeConverter(typeof(UserRightTypeArrayConverter))]
//public UserRightType[] ImportDemands
//{
@@ -627,35 +610,6 @@ namespace BeWo.View.Navigation
}
}
- // Christian
- private void btnOpenAi_Click(object sender, RoutedEventArgs e)
- {
- if (OpenAiChat != null)
- {
- OpenAiChat();
- }
- }
-
- // Rene Window
- private void btnOpenAi2_Click(object sender, RoutedEventArgs e)
- {
-
-
- if (OpenAiChat != null)
- {
- OpenAiChat();
- }
- }
-
- // Rene ModalPopup
- private void btnOpenAi3_Click(object sender, RoutedEventArgs e)
- {
- if (OpenAiChat != null)
- {
- OpenAiChat();
- }
- }
-
private void btnCopy_Click(object sender, RoutedEventArgs e)
{
if (CopyObject != null)
diff --git a/BeWo/ViewModel/ListViewModel/ServiceRecordListVM.cs b/BeWo/ViewModel/ListViewModel/ServiceRecordListVM.cs
index 4a42787b1..127a227a0 100644
--- a/BeWo/ViewModel/ListViewModel/ServiceRecordListVM.cs
+++ b/BeWo/ViewModel/ListViewModel/ServiceRecordListVM.cs
@@ -453,11 +453,6 @@ namespace BeWo.ViewModel.ListViewModel
get { return BeWoApp.AppSettings.ShowHilfeplanStatistikReport && SelectedCustomerNode != null && SelectedCustomerNode.SupportConceptTreeNodeDC != null; }
}
- public bool OpenAiChatButtonVisible
- {
- get { return BeWoApp.AppSettings.ShowAI && (BeWoApp.LoggedOnUser.HasRight(UserRightType.AiChatInZeiterfassung)) && SelectedCustomerNode != null && SelectedCustomerNode.SupportConceptTreeNodeDC != null; }
- }
-
public ServiceRecordTimeInterval ServiceRecordTimeInterval
{
get { return _ServiceRecordTimeInterval; }