diff --git a/BeWo/AI/AiChatController.cs b/BeWo/AI/AiChatController.cs new file mode 100644 index 000000000..616133547 --- /dev/null +++ b/BeWo/AI/AiChatController.cs @@ -0,0 +1,45 @@ +using BeWo.AI.View; +using BeWo.View; +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.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..82c471f1a 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.243 true publish.htm false true - 241 + 244 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 e85092947..56ac2d87c 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/GkvAbrechnungOverview.xaml.cs b/BeWo/View/Detail/Accounting/GkvAbrechnungOverview.xaml.cs index ceba9eff2..e48c3c17c 100644 --- a/BeWo/View/Detail/Accounting/GkvAbrechnungOverview.xaml.cs +++ b/BeWo/View/Detail/Accounting/GkvAbrechnungOverview.xaml.cs @@ -137,10 +137,13 @@ namespace BeWo.View.Detail.Accounting if (checked_invoice_bases.Count == 0) { +#if DEBUG if (MessageBox.Show("Sie haben keine Rechnung hinzugefügt. Wollen Sie fortfahren?", "GKV-Abrechnung erstellen", MessageBoxButton.YesNo, MessageBoxImage.Warning) != MessageBoxResult.Yes) - { return; - } +#else + MessageBox.Show("Sie haben keine Rechnung hinzugefügt.", "GKV-Abrechnung erstellen", MessageBoxButton.OK, MessageBoxImage.Warning); + return; +#endif } MainControl.CloseCurrentPopUp(); 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 @@ - '; - - list.append(html); - }); - - updateGroupBookingGroupList(groupBookingSelectionObject); - } catch (error) { - if (stringContainsDoctype(result)) { - showErrorPopup(error, result); - } else { - showErrorPopup(error); - } - } -} - -function removeCb2ScRelation(relOid) { - try { - $("#relation-item-" + relOid).remove(); - - if($("#cb2sc-checkbox-" + relOid).length) { - $("#cb2sc-checkbox-" + relOid).prop("checked", false); - } - - if($("#selected-cb2sc-list").find(".list-group-item").length === 0) { - deactivateGroupBookingForm(); - - $("#group-booking-supportconcepts input:checked").each(function () { - $(this).prop("checked", false); - }); - } - - $.get(getRemoveCb2ScRelFromGroupBookingUrl(), {pRelOid: relOid}).done(function (result) { - try { - updateGroupBookingGroupList($.parseJSON(result)); - } catch (error) { - if(stringContainsDoctype(result)) { - showErrorPopup(error, result); - } else { - showErrorPopup(error); - } - } - }); - } catch (error) { - showErrorPopup(error); - } -} - -function updateGroupBookingGroupList(groupBookingSelectionObject) { - var groupOids = groupBookingSelectionObject.GroupOids === undefined ? [] : groupBookingSelectionObject.GroupOids; - var relOids = []; - - if(groupBookingSelectionObject.SelectedRelations !== undefined){ - for(var i = 0; i < groupBookingSelectionObject.SelectedRelations.length; i++) { - var oidStringValue = groupBookingSelectionObject.SelectedRelations[i].Value; - var oidIntValue = parseInt(oidStringValue, 10); - - relOids.push(oidIntValue); - } - } - - $("#group-booking-supportconcepts input").each(function() { - var value = $(this).val(); - - $(this).prop("checked", isInArray(value, relOids)); - }); - - $("#group-booking-groups input").each(function() { - var value = $(this).val(); - - $(this).prop("checked", isInArray(value, groupOids)); - }); - - if(relOids.length === 0 && groupOids.length === 0) { - deactivateGroupBookingForm(); - } else { - activateGroupBookingForm(); - } -} - -function addEmployeeToGroupBooking() { - var url = getAddEmployeesToGroupBookingUrl(); - - var selectedEmployees = []; - - var oidString = ""; - - $("#group-booking-employee-selection-popup input:checked").each(function() { - var oid = $(this).val(); - - selectedEmployees.push(oid); - }); - - for(var i = 0; i < selectedEmployees.length; i++) { - oidString += selectedEmployees[i]; - - if(i < selectedEmployees.length - 1) { - oidString += ","; - } - } - - $.get(url, { pEmployeeOids: oidString }).done(function(numberOfSelectedEmployees) { - $("#selected-employees-count-badge").text(numberOfSelectedEmployees); - - $("#create-button").prop("disabled", numberOfSelectedEmployees === "0" ? true : false); - }); -} \ No newline at end of file diff --git a/BeWoPlanerMobil/Scripts/ownSoft-Scripts/signature.js b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/signature.js index cc7867828..037fc5259 100644 --- a/BeWoPlanerMobil/Scripts/ownSoft-Scripts/signature.js +++ b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/signature.js @@ -77,6 +77,12 @@ function initializeSignature(selectedServiceRecordOid) { return; } + if(false === checkJson(jsonServiceRecord2Monatsunterschrift)) { + logWarning("initializeSignature: Der zurückgegebene Wert ist kein gültiges JSON!"); + hideSpinner(); + return; + } + var serviceRecord2Monatsunterschrift = parseJason(jsonServiceRecord2Monatsunterschrift); var hasMonatsunterschrift = serviceRecord2Monatsunterschrift.HasMonatsunterschrift; diff --git a/BeWoPlanerMobil/Scripts/ownSoft-Scripts/support-concept-statistics.js b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/support-concept-statistics.js index 0e2a3249d..b73f5ba0d 100644 --- a/BeWoPlanerMobil/Scripts/ownSoft-Scripts/support-concept-statistics.js +++ b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/support-concept-statistics.js @@ -18,6 +18,12 @@ function getSupportConceptStatistics(cb2ScRRelOid) { $.get(url, { oid: cb2ScRRelOid }).done(function(jsonObject) { try { + if(false === checkJson(jsonObject)) { + logWarning("getSupportConceptStatistics: Der zurückgegebene Wert ist kein gültiges JSON!"); + hideSpinner(); + return; + } + var scStatistics = parseJason(jsonObject); $("#period-statistics-container").empty(); diff --git a/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/password-security.js b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/MoKPasswordSecurity.js similarity index 100% rename from BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/password-security.js rename to BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/MoKPasswordSecurity.js diff --git a/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/js-helper.js b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/js-helper.js index ea594d5ca..51e6fa587 100644 --- a/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/js-helper.js +++ b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/js-helper.js @@ -67,4 +67,13 @@ function checkArraysForEquality(a1, a2) { } finally { return false; } +} + +function checkJson(jsonToParse) { + try { + $.parseJSON(jsonToParse); + return true; + } catch(parsingError) { + return false; + } } \ No newline at end of file diff --git a/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/list-utils.js b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/list-utils.js index 5072a40d8..c6cb3782a 100644 --- a/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/list-utils.js +++ b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/list-utils.js @@ -28,7 +28,9 @@ function changeItemListSelection(url, popupId, listId, itemIdPrefix, isCustomer, // Wird aufgerufen, um die Liste mit den ausgewählten Objekten zu aktualisieren function updateSelectedList(jsonResult, listId, itemIdPrefix, isCustomer, popupId, checkBoxIdSuffix, url, filterAppointmentsUrl, allItemsCheckBoxSuffix, teamMemberOids, allItemsCheckBoxId) { try { - if(isEmptyOrSpaces(jsonResult)) { + if(false === checkJson(jsonResult)) { + logWarning("updateSelectedList: Der zurückgegebene Wert ist kein gültiges JSON!"); + hideSpinner(); return; } diff --git a/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/resources-list-utils.js b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/resources-list-utils.js index d3a1e4943..651331013 100644 --- a/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/resources-list-utils.js +++ b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/resources-list-utils.js @@ -34,7 +34,9 @@ function updateSelectedResourceList(jsonResult, listId, listItemIdPrefix, popupI list.empty(); - if(isEmptyOrSpaces(jsonResult)) { + if(false === checkJson(jsonResult)) { + logWarning("updateSelectedResourceList: Der zurückgegebene Wert ist kein gültiges JSON!"); + hideSpinner(); return; } diff --git a/BeWoPlanerMobil/Scripts/ownSoft-Scripts/view-scripts/main.js b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/view-scripts/main.js index 84a1bc502..20d53f72f 100644 --- a/BeWoPlanerMobil/Scripts/ownSoft-Scripts/view-scripts/main.js +++ b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/view-scripts/main.js @@ -91,11 +91,18 @@ function deleteServiceRecord(serviceRecordOid) { var url = getValidateServiceRecordDeletionUrl(); $.get(url, { serviceRecordOidString: serviceRecordOid }).done(function(result) { - if (result === "Error") { + if(result === "Error") { + hideSpinner(); showAlertMessageBox("Fehler", "Es ist ein Fehler aufgetreten", null, false); return; } + if(false === checkJson(result)) { + logWarning("deleteServiceRecord: Der zurückgegebene Wert ist kein gültiges JSON!"); + hideSpinner(); + return; + } + var form = $("#deletion-form"); if(result.length === 0) { @@ -291,26 +298,7 @@ function hideGoalRatingPopup() { } } -function rateGoal(ratingTypeOid) { - try { - var url = getRateSelectedGoalUrl(); - var goalOid = $("#goal-to-rate-oid").val(); - - $.get(url, { ratingTypeOid: ratingTypeOid, goalOid: goalOid }).done( - function (result) { - var obj = parseJason(result); - - $("#goal-rating-" + goalOid).text(obj.RatingName); - - hideGoalRatingPopup(); - $("#goal-to-rate-oid").val(""); - } - ); - } catch(error) { - showErrorPopup(error); - } -} function checkChildNodes(parentOid) { var rootElement = $("#c-" + parentOid); diff --git a/BeWoPlanerMobil/Scripts/ownSoft-Scripts/view-scripts/scheduler.js b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/view-scripts/scheduler.js index 02aaab2bf..588c528d7 100644 --- a/BeWoPlanerMobil/Scripts/ownSoft-Scripts/view-scripts/scheduler.js +++ b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/view-scripts/scheduler.js @@ -191,6 +191,11 @@ function insertOrUpdateAppointment(formattedStartDate, formattedEndDate, formatt endTimeRaw: formattedEndTime } ).done(function(result) { + if(false === checkJson(result)) { + logWarning("insertOrUpdateAppointment: Der zurückgegebene Wert ist kein gültiges JSON!"); + return; + } + var isOverlapping = parseJason(result); if(isOverlapping === true) { diff --git a/BeWoPlanerMobil/Util/FormCollectionConstants.cs b/BeWoPlanerMobil/Util/FormCollectionConstants.cs index 9140e5781..864b5eb10 100644 --- a/BeWoPlanerMobil/Util/FormCollectionConstants.cs +++ b/BeWoPlanerMobil/Util/FormCollectionConstants.cs @@ -75,5 +75,6 @@ public static string AutoEndOfSessionLogoutMessageKey => "ein_schluessel"; public static string HasWarningMessageKey => "HasWarningMessage"; public static string ErrorMessageKey => "ErrorMessage"; + public static string DoLogoutKey => "DoLogout"; } } \ No newline at end of file diff --git a/BeWoPlanerMobil/Util/GroupBookingSelectionObject.cs b/BeWoPlanerMobil/Util/GroupBookingSelectionObject.cs index 5ba637b52..c1967077b 100644 --- a/BeWoPlanerMobil/Util/GroupBookingSelectionObject.cs +++ b/BeWoPlanerMobil/Util/GroupBookingSelectionObject.cs @@ -8,6 +8,7 @@ namespace BeWoPlanerMobil.Util { public List SelectedRelations { get; set; } = new List(); public IEnumerable GroupOids { get; set; } + public GroupBookingSelectionObject(IEnumerable selectedConceptCostBearerRelations, IEnumerable groupOids) { @@ -26,7 +27,7 @@ namespace BeWoPlanerMobil.Util "text-bewo-expires-in-three-months" : "text-dark"; - var listItem = new CustomSelectListItem(text1, text2, value, textColor); + var listItem = new CustomSelectListItem(text1, text2, value, textColor, rel.SupportConcept?.SupportConceptOid, rel.CostBearer2SupportConceptOid); SelectedRelations.Add(listItem); } diff --git a/BeWoPlanerMobil/Views/Login/Index.cshtml b/BeWoPlanerMobil/Views/Login/Index.cshtml index f4e56f2ff..10b95a04d 100644 --- a/BeWoPlanerMobil/Views/Login/Index.cshtml +++ b/BeWoPlanerMobil/Views/Login/Index.cshtml @@ -80,4 +80,20 @@ $("#login-btn").click(); } }); - \ No newline at end of file + + +@if(Html.IsInDebugMode()) +{ + if(!(TempData[TempDataConstants.ErrorMessageKey] is null)) + { +
+
+
+ +
+
+
+ } +} diff --git a/BeWoPlanerMobil/Views/Main/Category2ServiceDescriptionPartial.cshtml b/BeWoPlanerMobil/Views/Main/Category2ServiceDescriptionPartial.cshtml index d0f999cc0..67d394a65 100644 --- a/BeWoPlanerMobil/Views/Main/Category2ServiceDescriptionPartial.cshtml +++ b/BeWoPlanerMobil/Views/Main/Category2ServiceDescriptionPartial.cshtml @@ -1,4 +1,16 @@ -@model BeWoPlanerMobil.Models.MainModel +@using BeWoPlanerMobil.Util +@model BeWoPlanerMobil.Models.MainModel + +@{ + if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout) + { + + + + } +} +@{ + var selectedServiceDescription = Model.GetSelectedOrFirstServiceDescription(); + var selectedCategory = selectedServiceDescription?.Category; +} +
@@ -45,9 +62,14 @@ { var category = serviceCategory2ServiceDescriptions.Key; - var selected = Model.SelectedServiceCategory?.Equals(category) ?? false ? "selected" : string.Empty; + if(category is null) + { + continue; + } - + var selected = selectedCategory != null && selectedCategory.Equals(category) ? " selected" : string.Empty; + + }
@@ -66,16 +88,17 @@
diff --git a/BeWoPlanerMobil/Views/Main/GoalRatingPopupContentPartial.cshtml b/BeWoPlanerMobil/Views/Main/GoalRatingPopupContentPartial.cshtml new file mode 100644 index 000000000..cdb51cf1d --- /dev/null +++ b/BeWoPlanerMobil/Views/Main/GoalRatingPopupContentPartial.cshtml @@ -0,0 +1,51 @@ +@using BeWoPlanerMobil.Models +@using BeWoPlanerMobil.Util +@model BeWoPlanerMobil.Models.MainModel + +@{ + if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout) + { + + + + } +} + + + +@if(AbstractModel.HasRightToRateGoals) +{ +
    + @foreach(var ratingType in Model.GoalRatingTypes) + { +
  • @ratingType.DisplayName
  • + } +
+} diff --git a/BeWoPlanerMobil/Views/Main/GroupBookingFormPartial.cshtml b/BeWoPlanerMobil/Views/Main/GroupBookingFormPartial.cshtml index 9b36c62af..c0f4b0fcc 100644 --- a/BeWoPlanerMobil/Views/Main/GroupBookingFormPartial.cshtml +++ b/BeWoPlanerMobil/Views/Main/GroupBookingFormPartial.cshtml @@ -3,22 +3,82 @@ @using BS.Shared @model BeWoPlanerMobil.Models.MainModel +@{ + if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout) + { + + + + } +} + + + } +} @using(Html.BeginForm("ResetGroupBookingForm", "Main", FormMethod.Post, new { Id = "reset-group-booking-form-form" })) diff --git a/BeWoPlanerMobil/Views/Main/GroupBookingScCbRelList.cshtml b/BeWoPlanerMobil/Views/Main/GroupBookingScCbRelList.cshtml index fde1dfd8d..d8dd6ddc9 100644 --- a/BeWoPlanerMobil/Views/Main/GroupBookingScCbRelList.cshtml +++ b/BeWoPlanerMobil/Views/Main/GroupBookingScCbRelList.cshtml @@ -1,31 +1,16 @@ -@model BeWoPlanerMobil.Models.MainModel +@using BeWoPlanerMobil.Util +@model BeWoPlanerMobil.Models.MainModel - + } - +}
    @@ -42,7 +27,7 @@