diff --git a/BeWo/AI/View/AiChatView.xaml.cs b/BeWo/AI/View/AiChatView.xaml.cs index 344b919b3..535d21ed6 100644 --- a/BeWo/AI/View/AiChatView.xaml.cs +++ b/BeWo/AI/View/AiChatView.xaml.cs @@ -31,21 +31,41 @@ 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; - public AiChatView(long c2sOid, DateTime start, DateTime end) + public AiChatView() { InitializeComponent(); + + } + + public void InitServiceRecordQuery(long c2sOid, DateTime start, DateTime end) + { + type = 0; this.cb2scOid = c2sOid; this.startDate = start; this.endDate = end; } - - + + public void InitSingleCustomerQuery(long customerOid) + { + type = 1; + this.customerOid = customerOid; + } + + public void InitObjectQuery(TableID tableId) + { + type = 2; + tableID = tableId; + } private void ReloadViewModel(AiChatDC dc) { @@ -57,14 +77,39 @@ namespace BeWo.AI.View var acdc = new AiChatDC(); acdc.Prompt = TextBoxAnfrage.Text; - ServiceFacade.DoOperationsServiceAsync(s => s.CreateAiQueryForServiceRecords(acdc, cb2scOid, startDate, endDate), - dc => - { - this.Dispatch(delegate + if (type == 1) + { + ServiceFacade.DoOperationsServiceAsync(s => s.CreateAiQueryForSingleCustomer(acdc, customerOid), + dc => { - ReloadViewModel(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) { diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj index 79227a577..8e898f11b 100644 --- a/BeWo/BeWo.csproj +++ b/BeWo/BeWo.csproj @@ -39,16 +39,16 @@ false true false - https://app.ownsoft.de/ + https://app.ownsoft.de/test/ de-DE BeWoPlaner ownSoft GmbH - 2.0.1.240 + 2.0.1.242 true publish.htm false true - 241 + 243 2.0.1.%2a false true @@ -826,6 +826,7 @@ MSBuild:Compile Designer + AiChatView.xaml diff --git a/BeWo/BeWo.csproj.user b/BeWo/BeWo.csproj.user index 3eff8c8d2..5b9016668 100644 --- a/BeWo/BeWo.csproj.user +++ b/BeWo/BeWo.csproj.user @@ -2,7 +2,7 @@ D:\Projects\beyondsoft\BeWoPlaner\Publish\|publish\|D:\Projects\beyondsoft\BeWoPlaner\PublishTest\|D:\Projects\beyondsoft\BeWoPlaner\PublishDev\|D:\Projects\beyondsoft\BeWoPlaner\Publish45\ - https://app.ownsoft.de/|https://app.ownsoft.de/test/|https://app.ownsoft.de/dev/|http://app.ownsoft.de/dev/|http://app.beyondsoft.de/dev/ + https://app.ownsoft.de/test/|https://app.ownsoft.de/|https://app.ownsoft.de/dev/|http://app.ownsoft.de/dev/|http://app.beyondsoft.de/dev/ https://app.ownsoft.de/|https://app.ownsoft.de/bewoplaner.application/ diff --git a/BeWo/BeWoApp.xaml.cs b/BeWo/BeWoApp.xaml.cs index 072729246..761d0808d 100644 --- a/BeWo/BeWoApp.xaml.cs +++ b/BeWo/BeWoApp.xaml.cs @@ -50,7 +50,7 @@ namespace BeWo public static MainControl MainControl; public static string ShortVersion = "3.21"; - public static string Version = "Version 3.21"; + public static string Version = "Version 3.21 (GKV Test)"; public static int RenderTier = 0; @@ -368,10 +368,10 @@ namespace BeWo showDienstplanung = true; } - val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.Arbeitszeiterfassung); + val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.ShowWorktime); if (val != null && val.Equals("1")) { - AppSettings.Arbeitszeiterfassung = true; + AppSettings.ShowWorktime = true; } val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.EnableArbeitszeiterfassung); if (val != null && val.Equals("1")) @@ -508,6 +508,9 @@ namespace BeWo val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.ShowAI); AppSettings.ShowAI = val != null && val.Equals("1"); + val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.ShowAIInternal); + AppSettings.ShowAIInternal = val != null && val.Equals("1"); + val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.MoKSessionTimeout); if(int.TryParse(val, out var sessionTimeout)) { @@ -592,6 +595,7 @@ namespace BeWo showHilfeplanBezeichnung = true; AppSettings.AllowStorno = true; AppSettings.ShowAI = true; + AppSettings.ShowAIInternal = true; //showInfoButtonInCalender = true; #endif diff --git a/BeWo/Core/Config/AppSettings.cs b/BeWo/Core/Config/AppSettings.cs index 8256fc352..3126d116d 100644 --- a/BeWo/Core/Config/AppSettings.cs +++ b/BeWo/Core/Config/AppSettings.cs @@ -425,7 +425,7 @@ namespace BeWo.Core.Config public bool DontShowSpitzabrechnung { get; set; } public bool ShowDienstplanung { get; set; } - public bool Arbeitszeiterfassung { get; set; } + public bool ShowWorktime { get; set; } public bool EnableArbeitszeiterfassung { get; set; } public bool EnableAutomaticPauses { get; set; } public bool EnableRestTimeWarning { get; set; } @@ -447,6 +447,8 @@ namespace BeWo.Core.Config public bool ShowAI { get; set; } + public bool ShowAIInternal { get; set; } + public bool AllowGkvAbrechnung { get; set; } public bool ShowImportAbschlagszahlungen { get; set; } diff --git a/BeWo/LoginControl.xaml.cs b/BeWo/LoginControl.xaml.cs index 39df78623..166e1bb66 100644 --- a/BeWo/LoginControl.xaml.cs +++ b/BeWo/LoginControl.xaml.cs @@ -924,6 +924,8 @@ namespace BeWo { if (result == UserValidationResult.UserValidTwoFactorAuthenticationNeeded) { + Translator t = new Translator(new MultiLanguage.ServiceTranslator()); + grid_root.Children.Remove(lWaitLayer); var dlg = new TwoFactorAuthMessageDialog(lUserName, lPassword); var message = Translator.Translate("Zwei Faktor Authentifizierung erforderlich"); diff --git a/BeWo/ServiceProxy/Generated.cs b/BeWo/ServiceProxy/Generated.cs index 00fc5a290..1a7b9c55a 100644 --- a/BeWo/ServiceProxy/Generated.cs +++ b/BeWo/ServiceProxy/Generated.cs @@ -5465,6 +5465,15 @@ namespace BeWo.ServiceProxy "t", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] BS.Shared.DataContracts.AiChatDC CreateAiQueryForServiceRecords(BS.Shared.DataContracts.AiChatDC acdc, long cb2scOid, System.DateTime startdate, System.DateTime enddate); + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/CreateAiQueryForSingleCustomer", ReplyAction="http://tempuri.org/IOperationsService/CreateAiQueryForSingleCustomerResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/CreateAiQueryForSingleCustomerBeWoFaultFaul" + + "t", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] + BS.Shared.DataContracts.AiChatDC CreateAiQueryForSingleCustomer(BS.Shared.DataContracts.AiChatDC acdc, long customerOid); + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/CreateAiQueryForObjects", ReplyAction="http://tempuri.org/IOperationsService/CreateAiQueryForObjectsResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/CreateAiQueryForObjectsBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] + BS.Shared.DataContracts.AiChatDC CreateAiQueryForObjects(BS.Shared.DataContracts.AiChatDC acdc, long objectTid); + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/DeleteCertainDienstEintragOutOfTable", ReplyAction="http://tempuri.org/IOperationsService/DeleteCertainDienstEintragOutOfTableRespons" + "e")] [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/DeleteCertainDienstEintragOutOfTableBeWoFau" + @@ -7475,6 +7484,16 @@ namespace BeWo.ServiceProxy return base.Channel.CreateAiQueryForServiceRecords(acdc, cb2scOid, startdate, enddate); } + public BS.Shared.DataContracts.AiChatDC CreateAiQueryForSingleCustomer(BS.Shared.DataContracts.AiChatDC acdc, long customerOid) + { + return base.Channel.CreateAiQueryForSingleCustomer(acdc, customerOid); + } + + public BS.Shared.DataContracts.AiChatDC CreateAiQueryForObjects(BS.Shared.DataContracts.AiChatDC acdc, long objectTid) + { + return base.Channel.CreateAiQueryForObjects(acdc, objectTid); + } + public void DeleteCertainDienstEintragOutOfTable(long dienstEintragOid) { base.Channel.DeleteCertainDienstEintragOutOfTable(dienstEintragOid); diff --git a/BeWo/View/Detail/Accounting/ServiceInvoiceCreatePopUpView.xaml b/BeWo/View/Detail/Accounting/ServiceInvoiceCreatePopUpView.xaml index 082070e1e..22c2af212 100644 --- a/BeWo/View/Detail/Accounting/ServiceInvoiceCreatePopUpView.xaml +++ b/BeWo/View/Detail/Accounting/ServiceInvoiceCreatePopUpView.xaml @@ -68,8 +68,11 @@ -