diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj
index c9274041b..453f76189 100644
--- a/BeWo/BeWo.csproj
+++ b/BeWo/BeWo.csproj
@@ -669,6 +669,10 @@
MSBuild:UpdateDesignTimeXaml
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
@@ -1546,6 +1550,9 @@
DokumenteView.xaml
+
+ AiConversationView.xaml
+
SchedulingMasterView.xaml
@@ -3444,7 +3451,9 @@
-
+
+
+
diff --git a/BeWo/BeWoApp.xaml.cs b/BeWo/BeWoApp.xaml.cs
index 2b85a65a3..15468fcdf 100644
--- a/BeWo/BeWoApp.xaml.cs
+++ b/BeWo/BeWoApp.xaml.cs
@@ -611,6 +611,7 @@ namespace BeWo
//AppSettings.AllowGkvAbrechnung = true;
//AppSettings.AllowGkvAbrechnung = false;
//showInfoButtonInCalender = true;
+ AppSettings.ModuleAiEnabled = true;
#endif
AppSettings.ShowDatevFields = showDatevFields;
diff --git a/BeWo/Core/Config/AppSettings.cs b/BeWo/Core/Config/AppSettings.cs
index 30b0b0f66..f3cc65903 100644
--- a/BeWo/Core/Config/AppSettings.cs
+++ b/BeWo/Core/Config/AppSettings.cs
@@ -470,6 +470,9 @@ namespace BeWo.Core.Config
public bool ShowAIInternal { get; set; }
public bool AllowGkvAbrechnung { get; set; }
+
+ public bool ModuleAiEnabled { get; set; }
+
public bool ShowWohnhilfe { get; set; }
public bool ShowImportAbschlagszahlungen { get; set; }
diff --git a/BeWo/DebugConfig.cs b/BeWo/DebugConfig.cs
index e64ec478c..ded744c46 100644
--- a/BeWo/DebugConfig.cs
+++ b/BeWo/DebugConfig.cs
@@ -10,7 +10,8 @@ namespace BeWo
FeatureCustomerWohnhilfe,
FeatureWohnheimWohneinheit,
FeatureAuswertungenQuittierungsbelege,
- FeatureDakota
+ FeatureDakota,
+ FeatureAiModule
}
public class DebugConfig
@@ -139,6 +140,19 @@ namespace BeWo
EnableAutoRemoteDebugging = true
});
+ name2config.Add("FeatureAiModule",
+ new DebugConfig()
+ {
+ DebugConfigMode = DebugConfigMode.FeatureAiModule,
+ AutoLogin = true,
+ //SelectView = UIContext.Finance,
+ //SelectIndex = 8,
+ //DefaultLoginUsername = "m1",
+ //DefaultLoginPassword = "bewobewo",
+ //DefaultProfilename = "5000000000",
+ EnableAutoRemoteDebugging = true
+ });
+
return name2config;
}
#endif
diff --git a/BeWo/MainControl.xaml b/BeWo/MainControl.xaml
index de5241718..f6745cc14 100644
--- a/BeWo/MainControl.xaml
+++ b/BeWo/MainControl.xaml
@@ -8,8 +8,8 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:r="clr-namespace:BeWo.Security"
xmlns:t="clr-namespace:BeWo.MultiLanguage.Markup"
- d:DesignHeight="300"
- d:DesignWidth="300"
+ d:DesignHeight="1080"
+ d:DesignWidth="1920"
Background="{DynamicResource ApplicationBackground}"
RenderTransformOrigin="0.5,0.5"
SnapsToDevicePixels="True"
@@ -830,6 +830,27 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/BeWo/MainControl.xaml.cs b/BeWo/MainControl.xaml.cs
index 0f2cee935..389e385d1 100644
--- a/BeWo/MainControl.xaml.cs
+++ b/BeWo/MainControl.xaml.cs
@@ -54,7 +54,8 @@ namespace BeWo
CustomerTeam,
Scheduling,
Finance,
- Administration
+ Administration,
+ AiConversation
}
public partial class MainControl
@@ -307,6 +308,9 @@ namespace BeWo
case UIContext.Finance:
view = new FinanceView();
break;
+ case UIContext.AiConversation:
+ view = new AiConversationView();
+ break;
}
_Views[uiContext] = view;
}
@@ -1171,6 +1175,14 @@ 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())
@@ -1179,7 +1191,7 @@ namespace BeWo
// }
//}
-
+
private void button_resources_Click(object sender, RoutedEventArgs e)
{
if (DoSaveCheck())
diff --git a/BeWo/Ressources/Icons/chatbot2.png b/BeWo/Ressources/Icons/chatbot2.png
new file mode 100644
index 000000000..14a9a69b5
Binary files /dev/null and b/BeWo/Ressources/Icons/chatbot2.png differ
diff --git a/BeWo/View/Master/AiConversationView.xaml b/BeWo/View/Master/AiConversationView.xaml
new file mode 100644
index 000000000..db8928fcd
--- /dev/null
+++ b/BeWo/View/Master/AiConversationView.xaml
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/BeWo/View/Master/AiConversationView.xaml.cs b/BeWo/View/Master/AiConversationView.xaml.cs
new file mode 100644
index 000000000..e7bc5ffdf
--- /dev/null
+++ b/BeWo/View/Master/AiConversationView.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace BeWo.View.Master
+{
+ ///
+ /// Interaktionslogik für AiConversationView.xaml
+ ///
+ public partial class AiConversationView : BeWoView
+ {
+ public AiConversationView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/BeWo/ViewModel/UserGroupVM.cs b/BeWo/ViewModel/UserGroupVM.cs
index dc1b3d587..924b8702f 100644
--- a/BeWo/ViewModel/UserGroupVM.cs
+++ b/BeWo/ViewModel/UserGroupVM.cs
@@ -102,6 +102,7 @@ namespace BeWo.ViewModel
{(r) => r == UserRightType.SupportConcept_ImportData, BeWoApp.AppSettings.ShowPersehImport},
{(r) => r == UserRightType.AiChatInZeiterfassung, BeWoApp.AppSettings.ShowAI},
{IsDakotaRight, BeWoApp.AppSettings.AllowGkvAbrechnung},
+ {IsAiModuleRight, BeWoApp.AppSettings.ModuleAiEnabled},
};
public List PossibleRights
@@ -287,9 +288,14 @@ namespace BeWo.ViewModel
=> right == UserRightType.Finance_Gkv_Create ||
right == UserRightType.Finance_Gkv_Delete ||
right == UserRightType.Finance_Gkv_Send ||
- right == UserRightType.Finance_Gkv_View;
+ right == UserRightType.Finance_Gkv_View;
+ private static bool IsAiModuleRight(UserRightType right)
+ => right == UserRightType.AiModuleView ||
+ right == UserRightType.AiModuleChatAdd ||
+ right == UserRightType.AiModuleChatDelete ||
+ right == UserRightType.AiModuleChatEdit;
- protected override void InitByDataContract(UserGroupDC pDataContract)
+ protected override void InitByDataContract(UserGroupDC pDataContract)
{
_Name = pDataContract.Name;
_Description = pDataContract.Description;
diff --git a/Data/Security/UserRightHelper.cs b/Data/Security/UserRightHelper.cs
index 388a7b77d..ed464f7fd 100644
--- a/Data/Security/UserRightHelper.cs
+++ b/Data/Security/UserRightHelper.cs
@@ -181,7 +181,20 @@ namespace BeWo.Data.Security
return "3.22";
}
+ if (isRightVersion324(r))
+ {
+ return "3.24";
+ }
+
return BASE_VERSION;
}
- }
+
+ private static bool isRightVersion324(UserRightType r)
+ {
+ return r == UserRightType.AiModuleView
+ || r == UserRightType.AiModuleChatAdd
+ || r == UserRightType.AiModuleChatDelete
+ || r == UserRightType.AiModuleChatEdit;
+ }
+ }
}
diff --git a/Service/Plugins/AiService.cs b/Service/Plugins/AiService.cs
index 9420dc89a..b9da83942 100644
--- a/Service/Plugins/AiService.cs
+++ b/Service/Plugins/AiService.cs
@@ -79,8 +79,6 @@ namespace BeWo.Service.Plugins
acdc.Prompt = String.Format("{0}\n{1}\n{2}", json.pmt.pre, acdc.Prompt, json.pmt.post);
}
}
-
-
}
public AiChatDC CreateAiQuery(AiChatDC acdc)
diff --git a/Shared/BeWoEntityEnums.cs b/Shared/BeWoEntityEnums.cs
index d5434be8a..f089c8559 100644
--- a/Shared/BeWoEntityEnums.cs
+++ b/Shared/BeWoEntityEnums.cs
@@ -612,8 +612,13 @@ namespace BS.Shared
ServiceRecord_AllowEditAfterEmployeeSignature = 171724,
ServiceRecord_AllowDeleteAfterEmployeeSignature = 171725,
- AiChatInZeiterfassung = 180000
- }
+ AiChatInZeiterfassung = 180000,
+
+ AiModuleView = 201000,
+ AiModuleChatAdd = 201001,
+ AiModuleChatEdit = 201002,
+ AiModuleChatDelete = 201003
+ }
public enum PersonType
{
diff --git a/Shared/Core/EnumTranslations.cs b/Shared/Core/EnumTranslations.cs
index 3ad07a81d..f3980bea0 100644
--- a/Shared/Core/EnumTranslations.cs
+++ b/Shared/Core/EnumTranslations.cs
@@ -715,7 +715,12 @@ namespace BS.Shared.Core
dict.Add(UserRightType.Finance_Gkv_Send, Translator.Translate($"Finanzen-> Gkv Abrechnung {action_keywords[5]}"));
dict.Add(UserRightType.Finance_Gkv_Delete, Translator.Translate($"Finanzen-> Gkv Abrechnung {action_keywords[4]}"));
- dict.Add(UserRightType.PersonView_Create, Translator.Translate("Personen anlegen"));
+ dict.Add(UserRightType.AiModuleView, Translator.Translate($"Module AI {action_keywords[0]}"));
+ dict.Add(UserRightType.AiModuleChatAdd, Translator.Translate($"Module AI-> Konversationen/Nachrichten {action_keywords[2]}"));
+ dict.Add(UserRightType.AiModuleChatEdit, Translator.Translate($"Module AI-> Konversationen/Nachrichten {action_keywords[3]}"));
+ dict.Add(UserRightType.AiModuleChatDelete, Translator.Translate($"Module AI-> Konversationen/Nachrichten {action_keywords[4]}"));
+
+ dict.Add(UserRightType.PersonView_Create, Translator.Translate("Personen anlegen"));
dict.Add(UserRightType.PersonView_Delete, Translator.Translate("Personen löschen"));
dict.Add(UserRightType.Person_AllowArchiving, Translator.Translate("Personen archivieren"));
dict.Add(UserRightType.PersonView_Edit, Translator.Translate("Personen ändern"));
@@ -893,7 +898,7 @@ namespace BS.Shared.Core
dict.Add(UserRightType.Customer_ViewBetreuung, Translator.Translate($"{Translator.Translate("Klienten")} Betreuung ansehen"));
dict.Add(UserRightType.AiChatInZeiterfassung, Translator.Translate("Zeiterfassung->Anfragen an die KI stellen"));
dict.Add(UserRightType.FinanzenRechnungenNachVersandBearbeiten, Translator.Translate($"Finanzen->Rechnungen nach Versand bearbeiten"));
-
+
UserRightType2Translations = dict;
}
@@ -1093,6 +1098,6 @@ namespace BS.Shared.Core
Gkv2Translation = dict;
- }
+ }
}
}
\ No newline at end of file