From b695d152e09cbcfa283dc2be67589aabf5b4bf5e Mon Sep 17 00:00:00 2001 From: Lyndon Date: Fri, 19 Jul 2019 17:13:57 +0200 Subject: [PATCH] =?UTF-8?q?Mobilklient:=20=20-=20Ziele=20funktionieren=20?= =?UTF-8?q?=20-=20Hilfeplanauswahl=20optisch=20=C3=BCberarbeitet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BeWo/BeWo.csproj | 2 +- .../Detail/Report/FlexibleReportView.xaml.cs | 4 +- BeWo/View/HomeDragPanelView.xaml.cs | 44 +++--- BeWoPlanerMobil/BeWoPlanerMobil.csproj | 3 + BeWoPlanerMobil/Content/BeWoMobileStyle.css | 78 +++++++++- BeWoPlanerMobil/Controllers/MainController.cs | 40 +++-- BeWoPlanerMobil/Models/MainModel.cs | 79 ++++++++++ BeWoPlanerMobil/Scripts/goals.js | 112 ++++++++++++++ BeWoPlanerMobil/Scripts/initialization.js | 17 ++- BeWoPlanerMobil/Scripts/mainView.js | 139 ++---------------- .../Scripts/serviceRecordValidation.js | 16 +- .../Scripts/supportConceptDropDown.js | 25 ++++ BeWoPlanerMobil/Scripts/validation.js | 2 + BeWoPlanerMobil/Util/JSONCustomer.cs | 2 +- BeWoPlanerMobil/Views/Main/Main.cshtml | 58 +++++--- BeWoPlanerMobil/Views/Shared/_Layout.cshtml | 4 + Host/Multitenancy/demo.config | 6 +- .../OperationsServiceImp.cs | 2 +- .../ResourceServiceImp.cs | 11 +- 19 files changed, 427 insertions(+), 217 deletions(-) create mode 100644 BeWoPlanerMobil/Scripts/goals.js create mode 100644 BeWoPlanerMobil/Scripts/supportConceptDropDown.js diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj index 524133e55..1b9100372 100644 --- a/BeWo/BeWo.csproj +++ b/BeWo/BeWo.csproj @@ -2086,7 +2086,7 @@ - + {8a83c4dc-a0b1-4a51-ae1d-366d7a05b298} ChatController diff --git a/BeWo/View/Detail/Report/FlexibleReportView.xaml.cs b/BeWo/View/Detail/Report/FlexibleReportView.xaml.cs index d172020b0..4819f67a9 100644 --- a/BeWo/View/Detail/Report/FlexibleReportView.xaml.cs +++ b/BeWo/View/Detail/Report/FlexibleReportView.xaml.cs @@ -202,7 +202,7 @@ namespace BeWo.View.Detail.Report } if (entryDC.Customer == null) { - if (entryDC.Type == FlexibleReportEntryType.FullEntry) + if (entryDC.Type == FlexibleReportEntryType.ServiceRecordEntry) { returnValue.Customer = ""; } @@ -218,7 +218,7 @@ namespace BeWo.View.Detail.Report if (entryDC.Employee == null) { - if (entryDC.Type == FlexibleReportEntryType.FullEntry) + if (entryDC.Type == FlexibleReportEntryType.ServiceRecordEntry) { returnValue.Employee = ""; } diff --git a/BeWo/View/HomeDragPanelView.xaml.cs b/BeWo/View/HomeDragPanelView.xaml.cs index b3421b981..0ece7cfef 100644 --- a/BeWo/View/HomeDragPanelView.xaml.cs +++ b/BeWo/View/HomeDragPanelView.xaml.cs @@ -1709,15 +1709,15 @@ namespace BeWo.View if (!_Code.Equals("")) { - Login _login = new Login(_kundennummer, _Code, _benutzername, _passwort, _apikey); + //Login _login = new Login(_kundennummer, _Code, _benutzername, _passwort, _apikey); - var x = _login.AnmeldevorgangDurchFuehren(); + //var x = _login.AnmeldevorgangDurchFuehren(); - if (x != null) - { - ServiceChatView = new ChatView(x); - ServiceChatView.Show(); - } + //if (x != null) + //{ + // ServiceChatView = new ChatView(x); + // ServiceChatView.Show(); + //} } else { @@ -1729,23 +1729,23 @@ namespace BeWo.View MessageBox.Show("Sie benötigen einen gültigen Zugang zum Chat. Bitte wenden Sie sich an den Support.", "Info"); } } - else if (ServiceChatView.Visibility == Visibility.Visible) - { - ServiceChatView.Visibility = Visibility.Hidden; - } - else if (ServiceChatView.Visibility == Visibility.Hidden) - { - ServiceChatView.Visibility = Visibility.Visible; + //else if (ServiceChatView.Visibility == Visibility.Visible) + //{ + // ServiceChatView.Visibility = Visibility.Hidden; + //} + //else if (ServiceChatView.Visibility == Visibility.Hidden) + //{ + // ServiceChatView.Visibility = Visibility.Visible; - if (ServiceChatView.WindowState == WindowState.Minimized) - { - ServiceChatView.WindowState = WindowState.Normal; - ServiceChatView.Height = 700; - ServiceChatView.Width = 900; - } + // if (ServiceChatView.WindowState == WindowState.Minimized) + // { + // ServiceChatView.WindowState = WindowState.Normal; + // ServiceChatView.Height = 700; + // ServiceChatView.Width = 900; + // } - ServiceChatView.Activate(); - } + // ServiceChatView.Activate(); + //} //#endif } diff --git a/BeWoPlanerMobil/BeWoPlanerMobil.csproj b/BeWoPlanerMobil/BeWoPlanerMobil.csproj index 6eb8758b5..af5b69272 100644 --- a/BeWoPlanerMobil/BeWoPlanerMobil.csproj +++ b/BeWoPlanerMobil/BeWoPlanerMobil.csproj @@ -177,6 +177,7 @@ + @@ -213,6 +214,7 @@ + @@ -220,6 +222,7 @@ + diff --git a/BeWoPlanerMobil/Content/BeWoMobileStyle.css b/BeWoPlanerMobil/Content/BeWoMobileStyle.css index 929034ebf..bf252214a 100644 --- a/BeWoPlanerMobil/Content/BeWoMobileStyle.css +++ b/BeWoPlanerMobil/Content/BeWoMobileStyle.css @@ -173,7 +173,7 @@ span { margin-top: .2em; margin-bottom: 0; border: 1px solid #E6E6E6; - padding: 5px 0px; + padding: 5px 0; border-radius: 0; background-image: url("images/toggle-icon-d.svg"); background-repeat: no-repeat; @@ -815,11 +815,6 @@ input[type="checkbox"] { margin-top: .25em; } -/*#groupBookingOpenPopupBtn { - margin-bottom: 1em; - margin-top: .5em; -}*/ - .group-booking-tab { overflow: hidden; } @@ -867,6 +862,14 @@ input[type="checkbox"] { background-color: #f0f0f0; } +.tab-content-2 table tr:nth-child(4n-1) { + background-color: #f0f0f0; +} + +.tab-content-2 table tr:nth-child(4n+0) { + background-color: #f0f0f0; +} + #employeeCollapsible, #groupBookingCollapsible { overflow-y: auto; } @@ -892,6 +895,7 @@ input[type="checkbox"] { width: 20%; font-size: 13px; color: #555555; + white-space: normal; } .doku-tab-link.active { @@ -967,4 +971,66 @@ input[type="checkbox"] { #aktenzeichenTable tr:last-child hr { display: none; +} + +#supportConceptListContainer { + display: none; + width: 90%; + height: auto; + max-height: 90%; + background-color: white; + z-index: 900; + margin: 0; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + padding: .5em .5em 0 .5em; + overflow-y: scroll; +} + +.supportConceptDiv { + display: block; + background-color: #E6E6E6; + color: #555555; + margin-bottom: .35em; +} + +.supportConceptDiv:active { + background-color: #FF5A00; +} + +.listP { + font-size: 13px; + padding: 0 0.5em; + margin: 0; + min-height: 13px; +} + +.expiredSupportConceptSpan { + color: red; +} + +.isAboutToExpireSpan { + color: #FF9400; +} + +#supportConceptSelectionButton { + margin-bottom: .5em; + padding-right: 1em; + white-space: normal; +} + +#hidingModalWrapper { + display: none; + position: absolute; + width: 100%; + height: 100%; + z-index: 899; + background-color: gray; + opacity: .9; + top: 0; + left:0; + bottom:0; + right:0; } \ No newline at end of file diff --git a/BeWoPlanerMobil/Controllers/MainController.cs b/BeWoPlanerMobil/Controllers/MainController.cs index 7e287375a..676e4fd9d 100644 --- a/BeWoPlanerMobil/Controllers/MainController.cs +++ b/BeWoPlanerMobil/Controllers/MainController.cs @@ -179,6 +179,11 @@ namespace BeWoPlanerMobil.Controllers { Model.IsServiceRecordNoticeMandatory = true; } + + if(Model.SelectedSupportConceptListObject == null) + { + Model.SelectedSupportConceptListObject = Model.SupportConceptListObjects.First(); + } } catch (Exception e) { @@ -1649,7 +1654,9 @@ namespace BeWoPlanerMobil.Controllers a.CostBearer2SupportConceptOid.Value.Equals(Model.CostBearer2SupportConceptOid))); if(Model.SelectedSupportConcept != null) - { + { + Model.SelectedSupportConceptListObject = Model.SupportConceptListObjects.First(f => long.Parse(f.CostBearer2SupportConceptOid) == cb2scOid); + var details = OperationsService.GetSupportConceptTreeNodeDetailInfo(Model.SelectedSupportConcept.Customer.CustomerOid, Model.SelectedSupportConcept.SupportConceptOid, Model.CostBearer2SupportConceptOid); Model.ServiceCategories = details.ServiceAccountings.Count > 0 @@ -1659,13 +1666,15 @@ namespace BeWoPlanerMobil.Controllers Model.ServiceCategories = Model.ServiceCategories.Where(c => !c.OhneHilfeplan.HasValue || c.OhneHilfeplan.Value == AccountingvisibilityType.Beides || c.OhneHilfeplan.Value == AccountingvisibilityType.NurKlientenbezogen).ToList(); } else if(cb2scOid == -2) - { + { + Model.SelectedSupportConceptListObject = Model.SupportConceptListObjects.First(f => f.CostBearer2SupportConceptOid.Equals(cb2scOid.ToString())); Model.ServiceCategories = CreateServiceCategoryModels(OperationsService.GetAllServiceDescriptions()); Model.ServiceCategories = Model.ServiceCategories.Where(c => !c.OhneHilfeplan.HasValue || c.OhneHilfeplan.Value == AccountingvisibilityType.Beides || c.OhneHilfeplan.Value == AccountingvisibilityType.NichtKlientenbezogen).ToList(); } else if(cb2scOid == -1) { - Model.ServiceCategories.Clear(); + Model.SelectedSupportConceptListObject = Model.SupportConceptListObjects.First(f => f.CostBearer2SupportConceptOid.Equals(cb2scOid.ToString())); + Model.ServiceCategories.Clear(); } Model.Zeitraum = 7; @@ -1716,7 +1725,7 @@ namespace BeWoPlanerMobil.Controllers return _LeerzeichenFuerGetMethoden; } - public string UpdateGoals(long pGoalOid) + public string UpdateGoals(string pGoalOids) { if (Model == null) { @@ -1730,25 +1739,12 @@ namespace BeWoPlanerMobil.Controllers return _LeerzeichenFuerGetMethoden; } - var goal = sc.Goals.FirstOrDefault(first => first.ValueListEntryOid.HasValue && first.ValueListEntryOid.Value.Equals(pGoalOid)); - if (goal == null) //Parent Goal wurde ausgewählt - { - //Model. - } - if (Model.SelectedGoals == null) - { - Model.SelectedGoals = new List { goal }; - return _LeerzeichenFuerGetMethoden; - } + var splitOids = pGoalOids.Split(';'); + var selectedGoalOids = splitOids.Select(long.Parse).ToList(); - if (Model.SelectedGoals.Contains(goal)) - { - Model.SelectedGoals.Remove(goal); - } - else - { - Model.SelectedGoals.Add(goal); - } + var goals = sc.Goals.Where(w => w.ValueListEntryOid.HasValue && selectedGoalOids.Contains(w.ValueListEntryOid.Value)).ToList(); + + Model.SelectedGoals = goals; return _LeerzeichenFuerGetMethoden; } diff --git a/BeWoPlanerMobil/Models/MainModel.cs b/BeWoPlanerMobil/Models/MainModel.cs index bec367078..b29fac34f 100644 --- a/BeWoPlanerMobil/Models/MainModel.cs +++ b/BeWoPlanerMobil/Models/MainModel.cs @@ -135,6 +135,24 @@ namespace BeWoPlanerMobil.Models } } + public IEnumerable SupportConceptListObjects + { + get + { + var allCostBearerRelations = new List {new SupportConceptListObject("Hilfeplan auswählen", "", "-1", false, false), new SupportConceptListObject("Ohne Hilfeplan", "", "-2", false, false) }; + foreach(var sc in SupportConcepts.OrderBy(sc => sc.Customer.LastName)) + { + allCostBearerRelations.AddRange(sc.CostBearerRelations.Where(w => ShowExpiredSupportConcepts || w.EndDate == null || w.EndDate.Value >= DateTime.Now).Select( + cb => new SupportConceptListObject($"{sc.Customer.LastNameFirstName} {(sc.Customer.DateOfBirth.HasValue ? "*" + sc.Customer.DateOfBirth.Value.ToString("dd.MM.yyyy") : string.Empty)}", $"{cb.StartDate?.ToShortDateString().Remove(6, 2) ?? string.Empty}-{cb.EndDate?.ToShortDateString().Remove(6, 2) ?? string.Empty} {cb.CostBearer.Name}", cb.CostBearer2SupportConceptOid.ToString(), cb.SupportConcept.IsAboutToExpire, cb.SupportConcept.ExpiresIn3MonthOrLess)) + ); + } + + return allCostBearerRelations; + } + } + + public SupportConceptListObject SelectedSupportConceptListObject { get; set; } + public List SelectedConceptCostBearerRelations { get; set; } public IEnumerable SelectedRelations @@ -186,6 +204,23 @@ namespace BeWoPlanerMobil.Models } } + public IEnumerable SupportConceptListObjectsForGroupBooking + { + get + { + var allCostbearerRelations = new List(); + + foreach(var sc in SupportConcepts.OrderBy(sc => sc.Customer.LastName)) + { + allCostbearerRelations.AddRange(sc.CostBearerRelations.Where(w => ShowExpiredSupportConcepts || w.EndDate == null || w.EndDate.Value >= DateTime.Now).Select( + cb => new SupportConceptListObject($"{sc.Customer.LastNameFirstName} {(sc.Customer.DateOfBirth.HasValue ? "*" + sc.Customer.DateOfBirth.Value.ToString("dd.MM.yyyy") : string.Empty)}", $"{cb.StartDate?.ToShortDateString().Remove(6, 2) ?? string.Empty}-{cb.EndDate?.ToShortDateString().Remove(6, 2) ?? string.Empty} {cb.CostBearer.Name}", cb.CostBearer2SupportConceptOid.ToString(), cb.SupportConcept.IsAboutToExpire, cb.SupportConcept.ExpiresIn3MonthOrLess)) + ); + } + + return allCostbearerRelations; + } + } + public IEnumerable ServiceCategoryListItems { get @@ -348,4 +383,48 @@ namespace BeWoPlanerMobil.Models TextColor = pTextColor; } } + + public class SupportConceptListObject + { + public string NameAndDateOfBirth { get; set; } + + public string SupportConceptTimeSpan { get; set; } + + public string CostBearer2SupportConceptOid { get; set; } + + public string CostBearer2SupportConceptOidName { get; set; } + + public string SpanColor { get; set; } = string.Empty; + + public string DisplayString + { + get + { + if(string.IsNullOrEmpty(SupportConceptTimeSpan)) + { + return NameAndDateOfBirth; + } + + return $"{NameAndDateOfBirth ?? string.Empty} | {SupportConceptTimeSpan}"; + } + } + + public SupportConceptListObject(string pNameAndDateOfBirth, string pSupportConceptTimeSpan, string pCostBearer2SupportConceptOid, bool isAboutToExpire, bool isAboutToExpireIn3MonthsOrLess) + { + NameAndDateOfBirth = pNameAndDateOfBirth; + SupportConceptTimeSpan = pSupportConceptTimeSpan; + CostBearer2SupportConceptOid = pCostBearer2SupportConceptOid; + + CostBearer2SupportConceptOidName = "OidHolder_" + CostBearer2SupportConceptOid; + + if(isAboutToExpire) + { + SpanColor = "style=\"color: red;\""; + } + else if(isAboutToExpireIn3MonthsOrLess) + { + SpanColor = "style=\"color: #FF9400;\""; + } + } + } } \ No newline at end of file diff --git a/BeWoPlanerMobil/Scripts/goals.js b/BeWoPlanerMobil/Scripts/goals.js new file mode 100644 index 000000000..20b76fadc --- /dev/null +++ b/BeWoPlanerMobil/Scripts/goals.js @@ -0,0 +1,112 @@ +function buildCollapsibleSet(jsonString) { + try { + if(jsonString.length < 2) { + return; + } + + var kollektion = $.parseJSON(jsonString); + + actuallyBuildCollapsibleSet(kollektion, null); + } catch(exception) { + console.log("Fehler(BuildCollapsibleSet): " + exception.message); + } +} + +function actuallyBuildCollapsibleSet(kollektion, selectedGoalOids) { + var kollabierbar1 = $("#kollabierbar1"); + + kollabierbar1.empty(); + + collapsibleHtml = ""; + + $.each(kollektion, function (index) { + buildGoalTreeItem(kollektion[index], selectedGoalOids); + }); + + kollabierbar1.append(collapsibleHtml); +} + +var collapsibleHtml; + +function buildGoalTreeItem(goalItem, selectedGoalOids) { + var goalOid = goalItem.ValueListEntryOid; + var goalHeader = goalItem.Header; + var isChecked = selectedGoalOids !== null && isElementInArray(selectedGoalOids, goalOid) ? "checked" : ""; + + if (!goalItem.IsLeaf) { + collapsibleHtml += '
' + goalHeader + '
'; + collapsibleHtml += '"; + } else { + + collapsibleHtml += '
' + goalHeader + '
'; + } +} + +function loadGoalsOnSuccess(json) { + if (json === "SessionTimeout") { + window.location.href = redirectLink; + return; + } + + buildCollapsibleSet(json); +} + +function loadGoals(actionPath) { + var selectedServiceRecord = $($("#scDropDown")).find(":selected").val(); + + if (selectedServiceRecord === -1) { + return; + } + + makeAjaxCall("GET", actionPath, loadGoalsOnSuccess, { pCostbearer2SupportConceptOid: selectedServiceRecord }, null); +} + +function updateGoals() { + var selectedGoals = getSelectedGoals(); + + makeAjaxCall("GET", updateGoalsUrl, null, { pGoalOids: selectedGoals }, null); +} + +function updateChildGoals(goalOid, element) { + var clickedElement = $(element); + var next = clickedElement.parent().next("div").find("input"); + + if(next !== null || next !== undefined) { + $.each(next, function(index, item) { + $(item).prop("checked", clickedElement.prop("checked") === true); + }); + } + + updateGoals(); +} + +function getSelectedGoals() { + var rootElement = $("#kollabierbar1"); + var checkboxes = rootElement.find("input"); + + var selectedGoals = ""; + + $.each(checkboxes, function(index, checkbox) { + var box = $(checkbox); + var id = box.attr("id"); + + if(box.prop("checked") === true && !id.includes("goal")) { + selectedGoals += id + ";"; + } + }); + + return selectedGoals.substr(0, selectedGoals.length - 1); +} \ No newline at end of file diff --git a/BeWoPlanerMobil/Scripts/initialization.js b/BeWoPlanerMobil/Scripts/initialization.js index da99a63d2..6cdebf0da 100644 --- a/BeWoPlanerMobil/Scripts/initialization.js +++ b/BeWoPlanerMobil/Scripts/initialization.js @@ -102,17 +102,20 @@ function initBeWoMobile(actionPath) { return; } - $("#kategorien_select").val(serviceCategoryOid); + var kategorienSelect = $("#kategorien_select"); + + kategorienSelect.val(serviceCategoryOid); var liste = $.parseJSON(result); - $("#leistungen_select").empty(); - $("#leistungen_select").val(""); + var leistungenSelect = $("#leistungen_select"); + leistungenSelect.empty(); + leistungenSelect.val(""); $.each(liste, function (index, leistung) { - $("#leistungen_select").append(''); + leistungenSelect.append(''); }); - $("#leistungen_select").val(serviceDescriptionOid); + leistungenSelect.val(serviceDescriptionOid); makeAjaxCall("GET", window.setServiceDescriptionUrl, function () { hideSanduhr(); @@ -182,7 +185,7 @@ function initBeWoMobile(actionPath) { var employeesTableHasEntries = $("#employeeCollapsible input:checked").length; if (isInGroupBookingMode()) { - var value = supportConceptTableHasEntries > 0 && employeesTableHasEntries > 0 ? false : true; + var value = !(supportConceptTableHasEntries > 0 && employeesTableHasEntries > 0); $("#anlegenEditierenBtn").prop("disabled", value); } @@ -272,7 +275,7 @@ function initializeDocumentationTextareas() { } } - $(".doku-tab-link").css("height", height + "px"); + //$(".doku-tab-link").css("height", height + "px"); } if (numberOfDocumentationTypes > 0) { diff --git a/BeWoPlanerMobil/Scripts/mainView.js b/BeWoPlanerMobil/Scripts/mainView.js index 456bdee59..e0999366a 100644 --- a/BeWoPlanerMobil/Scripts/mainView.js +++ b/BeWoPlanerMobil/Scripts/mainView.js @@ -1,79 +1,7 @@ -var ZeiterfassungDatakonstrukt = []; -var KlientDatakonstrukt = []; - -var klientzwischenspeicher = []; - var timeOut = 10000; -function buildCollapsibleSet(jsonString) { - try { - if(jsonString.length < 2) { - return; - } - - var kollektion = $.parseJSON(jsonString); - - actuallyBuildCollapsibleSet(kollektion, null); - } catch(exception) { - console.log("Fehler(BuildCollapsibleSet): " + exception.message); - } -} - -function actuallyBuildCollapsibleSet(kollektion, selectedGoalOids) { - $("#kollabierbar1").empty(); - - collapsibleHtml = ""; - - $.each(kollektion, function (index) { - buildGoalTreeItem(kollektion[index], selectedGoalOids); - }); - - $("#kollabierbar1").append(collapsibleHtml); -} - -var level = 0; - -var collapsibleHtml; - zeitRegEx = /^(2[0-3]|[01]?[0-9])(:|,|\.|#|;)?([0-5][0-9])$/; -function buildGoalTreeItem(goalItem, selectedGoalOids) { - var goalOid = goalItem.ValueListEntryOid; - var goalHeader = goalItem.Header; - var isChecked = selectedGoalOids !== null && isElementInArray(selectedGoalOids, goalOid) ? "checked" : ""; - - if (!goalItem.IsLeaf) { - //collapsibleHtml += ''; - collapsibleHtml += '
' + goalHeader + '
'; - //collapsibleHtml += ''; - collapsibleHtml += '"; - } else { - - collapsibleHtml += '
' + goalHeader + '
'; - } -} - -function loadGoalsOnSuccess(json) { - if (json === "SessionTimeout") { - window.location.href = redirectLink; - return; - } - - buildCollapsibleSet(json); -} - function loadServiceDescriptionsOnSuccess(json) { if (json === "SessionTimeout") { window.location.href = window.redirectLink; @@ -81,16 +9,17 @@ function loadServiceDescriptionsOnSuccess(json) { } var liste = $.parseJSON(json); + var leistungenSelect = $("#leistungen_select"); - $("#leistungen_select").empty(); - $("#leistungen_select").val(""); + leistungenSelect.empty(); + leistungenSelect.val(""); $.each(liste, function (index, leistung) { - $("#leistungen_select").append('"); + leistungenSelect.append('"); }); if(liste[0] !== undefined) { - $("#leistungen_select").val(liste[0].ServiceDescriptionOid); + leistungenSelect.val(liste[0].ServiceDescriptionOid); makeAjaxCall("GET", window.setServiceDescriptionUrl, null, { pServiceDescriptionOid: liste[0].ServiceDescriptionOid }, null); } @@ -123,16 +52,6 @@ function resizeLabelColumns() { $("#tabLbl").css("width", $("#zieleLbl").css("width")); } -function loadGoals(actionPath) { - var selectedServiceRecord = $($("#scDropDown")).find(":selected").val(); - - if (selectedServiceRecord === -1) { - return; - } - - makeAjaxCall("GET", actionPath, loadGoalsOnSuccess, { pCostbearer2SupportConceptOid: selectedServiceRecord }, null); -} - function toggleMenu() { var menuDiv = $("#menu-div"); $(menuDiv).fadeToggle("fast"); @@ -150,39 +69,6 @@ function loadServiceDescriptions() { loadTextbausteineForServiceCategory(selectedCategory); } -function updateGoals(cbId) { - makeAjaxCall("GET", updateGoalsUrl, null, { pGoalOid: cbId }, null); -} - -var goalOidArray = new Array(); -function updateChildGoals(goalOid) { - goalOidArray = new Array(); - - var parent = document.getElementById("goal" + goalOid); - //alert("start"); - CheckChildGoalNodes(parent); - //makeAjaxCall("GET", updateGoalsUrl, null, { pGoalOid: cbId }, null); -} - -function CheckChildGoalNodes(parent) { - goalOidArray = new Array(); - - var next = parent.parentNode; - //alert(next); - //alert(next.nextSibling); - var nodeList = next.childNodes; - - //alert(nodeList.length); - for (var i = 0; i < nodeList.length; i++) { - var node = nodeList[i]; - - //alert(node.nodeName); - CheckChildGoalNodes(node); - } - - //makeAjaxCall("GET", updateGoalsUrl, null, { pGoalOid: cbId }, null); -} - function setServiceDescription() { var sdOid = $($("#leistungen_select")).find(":selected").val(); @@ -479,12 +365,13 @@ function validateTimeField(id) { function togglePopup(serviceRecordOid) { $("#oidHolder").val(serviceRecordOid); + var popupDiv = $("#popupDiv"); var isShowing = $(".modalWrapper").css("display") === "none"; var displayValue = $(".modalWrapper").css("display") === "block" ? "none" : "block"; toggleModalWrapper(); - $("#popupDiv").css("display", displayValue); + popupDiv.css("display", displayValue); if (isShowing) { var titleOuterHeight = $("#popupTitle").outerHeight(); @@ -494,12 +381,12 @@ function togglePopup(serviceRecordOid) { var newHeight = titleOuterHeight + textOuterHeight + buttonDivOuterHeight + btnOuterHeight + btnOuterHeight; - $("#popupDiv").css("height", newHeight + "px"); + popupDiv.css("height", newHeight + "px"); - $("#popupDiv").css("top", window.pageYOffset + window.innerHeight / 2 - newHeight / 2); - $("#popupDiv").css("margin-top", "0"); + popupDiv.css("top", window.pageYOffset + window.innerHeight / 2 - newHeight / 2); + popupDiv.css("margin-top", "0"); } else { - $("#popupDiv").css("margin-top", "auto"); + popupDiv.css("margin-top", "auto"); } } @@ -510,8 +397,6 @@ function toggleModalWrapper() { $(".modalWrapper").css("height", $(document).height()); } - - function ErfolgteSpx() { if (document.getElementById("SaveSignature").value === "True") { @@ -579,7 +464,7 @@ function showZeiterfassungsError(msg) { } function clearZED() { - $("#zeiterfassungsErrorTableRow").css("display", "none"); + $("#zeiterfassungsErrorTableRow").hide();//.css("display", "none"); $("#zeiterfassungsErrorDisplay").empty(); } diff --git a/BeWoPlanerMobil/Scripts/serviceRecordValidation.js b/BeWoPlanerMobil/Scripts/serviceRecordValidation.js index 03f715b95..675db8fc4 100644 --- a/BeWoPlanerMobil/Scripts/serviceRecordValidation.js +++ b/BeWoPlanerMobil/Scripts/serviceRecordValidation.js @@ -1,6 +1,4 @@ -var isValidRecord = true; - -function validateServiceRecordBeforeSubmit() { +function validateServiceRecordBeforeSubmit() { var hasDokutext = false; if (window.isServiceRecordNoticeMandatory) { @@ -31,18 +29,20 @@ function validateServiceRecordBeforeSubmit() { } } - + var datumBox = $("#datum_textbox"); + var startDateBox = $("#start_textbox"); + var endDateBox = $("#ende_textbox"); - var dateStr = $("#datum_textbox").val(); - var startStr = $("#start_textbox").val(); - var endStr = $("#ende_textbox").val(); + var dateStr = datumBox.val(); + var startStr = startDateBox.val(); + var endStr = endDateBox.val(); console.log("dateStr: " + dateStr + "\nstartStr: " + startStr + "\nendStr: " + endStr); if (!validateDate(dateStr) || !validateTime(startStr) || !validateTime(endStr)) { hideSanduhr(); - console.log("\nIst das Startdatum korrekt: " + validateDate($("#datum_textbox").val()) + "\nIst die Startzeit korrekt: " + validateTime($("#start_textbox").val()) + "\nIst die Endzeit korrekt: " + validateTime($("#ende_textbox").val())); + console.log("\nIst das Startdatum korrekt: " + validateDate(datumBox.val()) + "\nIst die Startzeit korrekt: " + validateTime(startDateBox.val()) + "\nIst die Endzeit korrekt: " + validateTime(endDateBox.val())); var errorMessage = "Bitte geben Sie gültige Datums- und/oder Zeitangaben ein"; toggleErrorPopup(errorMessage); diff --git a/BeWoPlanerMobil/Scripts/supportConceptDropDown.js b/BeWoPlanerMobil/Scripts/supportConceptDropDown.js new file mode 100644 index 000000000..cd6a1d7fd --- /dev/null +++ b/BeWoPlanerMobil/Scripts/supportConceptDropDown.js @@ -0,0 +1,25 @@ +function showSupportConceptList() { + var hidingModalWrapper = $("#hidingModalWrapper"); + var supportConceptListContainer = $("#supportConceptListContainer"); + + try { + hidingModalWrapper.show(); + hidingModalWrapper.css("height", $(document).height()); + + supportConceptListContainer.show(); + } catch(exception) { + hidingModalWrapper.hide(); + supportConceptListContainer.hide(); + + console.log("Fehler: " + exception.message); + } +} + +function selectSupportConcept(cb2scOid) { + $("#supportConceptForm_" + cb2scOid).submit(); +} + +function hideModalWrapper() { + $("#hidingModalWrapper").hide(); + $("#supportConceptListContainer").hide(); +} \ No newline at end of file diff --git a/BeWoPlanerMobil/Scripts/validation.js b/BeWoPlanerMobil/Scripts/validation.js index c6a9a20b1..051dfbd8f 100644 --- a/BeWoPlanerMobil/Scripts/validation.js +++ b/BeWoPlanerMobil/Scripts/validation.js @@ -94,6 +94,8 @@ function validateTime(time) { } function doTimeValidation(elementToValidate) { + console.log("Rufe doTimeValidation auf..."); + var obj = $(elementToValidate); var timeString = obj.val(); diff --git a/BeWoPlanerMobil/Util/JSONCustomer.cs b/BeWoPlanerMobil/Util/JSONCustomer.cs index d50929a09..c9c8ad2ac 100644 --- a/BeWoPlanerMobil/Util/JSONCustomer.cs +++ b/BeWoPlanerMobil/Util/JSONCustomer.cs @@ -37,7 +37,7 @@ namespace BeWoPlanerMobil.Util { Vorname = init.FirstName; Nachname = init.LastName; - Geburtstag = init.DateOfBirth?.ToShortDateString() ?? String.Empty; + Geburtstag = init.DateOfBirth?.ToShortDateString() ?? string.Empty; Geschlecht = init.Sex == Sex.Male ? "Männlich" : "Weiblich"; Adresszusatz = init.AddressLine1; diff --git a/BeWoPlanerMobil/Views/Main/Main.cshtml b/BeWoPlanerMobil/Views/Main/Main.cshtml index c32903c74..20dded4fb 100644 --- a/BeWoPlanerMobil/Views/Main/Main.cshtml +++ b/BeWoPlanerMobil/Views/Main/Main.cshtml @@ -97,14 +97,21 @@ @{ - var shouldShowSingleBookingElements = "display: block"; - - if (Model.IsInGroupBookingMode) - { - shouldShowSingleBookingElements = "display: none"; - } + var shouldShowSingleBookingElements = Model.IsInGroupBookingMode ? "display: none;" : "display: table"; } - @using (Html.BeginForm("SelectSupportConcept", "Main", FormMethod.Post, new { id = "selectSCForm", style = shouldShowSingleBookingElements })) + + + + + + +
+ + + +
+ + @using (Html.BeginForm("SelectSupportConcept", "Main", FormMethod.Post, new { id = "selectSCForm", style = "display: none;" })) { @@ -117,12 +124,25 @@
- +
} +
+ @foreach(var scListItem in Model.SupportConceptListObjects) { + using(Html.BeginForm("SelectSupportConcept", "Main", FormMethod.Post, new { id = "supportConceptForm_" + scListItem.CostBearer2SupportConceptOid })) + { +
+

@scListItem.NameAndDateOfBirth

+

@scListItem.SupportConceptTimeSpan

+ +
+ } + } +
+
@Html.LabelFor(m => m.SelectedEmployeeOid)
@@ -574,8 +594,6 @@ -
-

Eintrag löschen

Sind Sie sicher, dass Sie den Eintrag löschen möchten?

@@ -590,6 +608,7 @@
+

Fehler

@@ -629,16 +648,21 @@
-
+
- @foreach (var hp in Model.SupporConceptListItemsForGroupBooking) + @foreach (var hp in Model.SupportConceptListObjectsForGroupBooking) { - + + + } @@ -1094,8 +1118,8 @@ resetGroupBookingModeViaGETUrl = '@Url.Action("ResetGroupBookingModeViaGET")'; addSupportConceptCostBearerRelationsToGroupBookingUrl = '@Url.Action("AddSupportConceptCostBearerRelationsToGroupBooking")'; removeSupportConceptCostBearerRelationFromGroupBookingUrl = '@Url.Action("RemoveSupportConceptCostBearerRelationFromGroupBooking")'; - addEmployeesToGroupBookingUrl = '@Url.Action("AddEmployeesToGroupBooking")'; - resetSignatureImage = '@Url.Action("ResetSignatureImage")'; + addEmployeesToGroupBookingUrl = '@Url.Action("AddEmployeesToGroupBooking")'; + resetSignatureImage = '@Url.Action("ResetSignatureImage")'; var isServiceRecordNoticeMandatory = '@(Model.IsServiceRecordNoticeMandatory)'.toLowerCase() === "true"; diff --git a/BeWoPlanerMobil/Views/Shared/_Layout.cshtml b/BeWoPlanerMobil/Views/Shared/_Layout.cshtml index 33ef71a3a..60977ca85 100644 --- a/BeWoPlanerMobil/Views/Shared/_Layout.cshtml +++ b/BeWoPlanerMobil/Views/Shared/_Layout.cshtml @@ -11,6 +11,7 @@ + @@ -27,6 +28,9 @@ + + + @RenderBody() diff --git a/Host/Multitenancy/demo.config b/Host/Multitenancy/demo.config index 02057a7e3..05e74806d 100644 --- a/Host/Multitenancy/demo.config +++ b/Host/Multitenancy/demo.config @@ -16,8 +16,12 @@ - Server=localhost;Password=root;User ID=root; Initial Catalog=dakonielandshut + Server=localhost;Password=root;User ID= root; Initial Catalog=bewodemo + +
- + + - @hp.Text + @hp.NameAndDateOfBirth +
+

@hp.SupportConceptTimeSpan