();
}
public class CustomSelectListItem
diff --git a/BeWoPlanerMobil/Scripts/utils/list-utils.js b/BeWoPlanerMobil/Scripts/utils/list-utils.js
index 79c45b955..1350c6ca7 100644
--- a/BeWoPlanerMobil/Scripts/utils/list-utils.js
+++ b/BeWoPlanerMobil/Scripts/utils/list-utils.js
@@ -1,4 +1,4 @@
-function changeItemListSelection(url, popupId, listId, itemIdPrefix, isCustomer, checkBoxIdSuffix) {
+function changeItemListSelection(url, popupId, listId, itemIdPrefix, isCustomer, checkBoxIdSuffix, filterAppointmentsUrl) {
try {
if (url === undefined || url === null) {
return;
@@ -12,7 +12,9 @@
});
$.get(url, { oidString: oidStr }).done(function (jsonResult) {
- updateSelectedList(jsonResult, listId, itemIdPrefix, isCustomer, popupId, checkBoxIdSuffix, url);
+ updateSelectedList(jsonResult, listId, itemIdPrefix, isCustomer, popupId, checkBoxIdSuffix, url, filterAppointmentsUrl);
+
+ $("#one-day-scheduler-partial-container").load(filterAppointmentsUrl);
});
} catch(error) {
logError(error.message);
@@ -20,7 +22,7 @@
}
// Col-Value berechnen
-function updateSelectedList(jsonResult, listId, itemIdPrefix, isCustomer, popupId, checkBoxIdSuffix, url) {
+function updateSelectedList(jsonResult, listId, itemIdPrefix, isCustomer, popupId, checkBoxIdSuffix, url, filterAppointmentsUrl) {
try {
if(isEmptyOrSpaces(jsonResult)) {
return;
@@ -48,7 +50,7 @@ function updateSelectedList(jsonResult, listId, itemIdPrefix, isCustomer, popupI
var id = itemIdPrefix + oid;
- var removeParams = oid + ", '" + checkBoxIdSuffix + "', " + isCustomer + ", '" + url + "', '" + popupId + "', '" + listId + "', '" + itemIdPrefix + "'";
+ var removeParams = oid + ", '" + checkBoxIdSuffix + "', " + isCustomer + ", '" + url + "', '" + popupId + "', '" + listId + "', '" + itemIdPrefix + "', '" + filterAppointmentsUrl + "'";
var html =
"" +
@@ -76,7 +78,7 @@ function updateSelectedList(jsonResult, listId, itemIdPrefix, isCustomer, popupI
}
}
-function removeSelectedItem(itemOid, itemSuffix, isCustomer, url, popupId, listId, itemIdPrefix) {
+function removeSelectedItem(itemOid, itemSuffix, isCustomer, url, popupId, listId, itemIdPrefix, filterAppointmentsUrl) {
try {
var prefix = isCustomer ? "customer-" : "employee-";
@@ -86,7 +88,7 @@ function removeSelectedItem(itemOid, itemSuffix, isCustomer, url, popupId, listI
checkBox.prop("checked", false);
}
- changeItemListSelection(url, popupId, listId, itemIdPrefix, isCustomer, itemSuffix);
+ changeItemListSelection(url, popupId, listId, itemIdPrefix, isCustomer, itemSuffix, filterAppointmentsUrl);
} catch(error) {
logError(error);
}
diff --git a/BeWoPlanerMobil/Scripts/utils/resources-list-utils.js b/BeWoPlanerMobil/Scripts/utils/resources-list-utils.js
index 1e72f871b..c87864adc 100644
--- a/BeWoPlanerMobil/Scripts/utils/resources-list-utils.js
+++ b/BeWoPlanerMobil/Scripts/utils/resources-list-utils.js
@@ -1,4 +1,4 @@
-function changeResourceSelection(popupId, url, listId, listItemIdPrefix, checkBoxIdPrefix) {
+function changeResourceSelection(popupId, url, listId, listItemIdPrefix, checkBoxIdPrefix, filterAppointmentsUrl) {
var selectedOids = [];
var oidString = "";
@@ -13,11 +13,13 @@
}
$.get(url, { resourceOids: oidString }).done(function (jsonResult) {
- updateSelectedResourceList(jsonResult, listId, listItemIdPrefix, popupId, checkBoxIdPrefix, url);
+ updateSelectedResourceList(jsonResult, listId, listItemIdPrefix, popupId, checkBoxIdPrefix, url, filterAppointmentsUrl);
+
+ $("#one-day-scheduler-partial-container").load(filterAppointmentsUrl);
});
}
-function updateSelectedResourceList(jsonResult, listId, listItemIdPrefix, popupId, checkBoxIdPrefix, url) {
+function updateSelectedResourceList(jsonResult, listId, listItemIdPrefix, popupId, checkBoxIdPrefix, url, filterAppointmentsUrl) {
var list = $("#" + listId);
list.empty();
@@ -41,7 +43,7 @@ function updateSelectedResourceList(jsonResult, listId, listItemIdPrefix, popupI
"
" +
"" + customListItem.Name + "
" +
"
" +
- "" +
+ "" +
"
" +
"" +
"" +
@@ -51,7 +53,8 @@ function updateSelectedResourceList(jsonResult, listId, listItemIdPrefix, popupI
});
}
-function removeSelectedResource(listItemId, checkBoxId, popupId, url, listId) {
+// ToDo: FetchAppointments-Url hinzufügen
+function removeSelectedResource(listItemId, checkBoxId, popupId, url, listId, fetchAppointmentsUrl) {
$("#" + listItemId).remove();
var checkbox = $("#" + checkBoxId);
@@ -60,5 +63,5 @@ function removeSelectedResource(listItemId, checkBoxId, popupId, url, listId) {
checkbox.prop("checked", false);
}
- changeResourceSelection(popupId, url, listId);
+ changeResourceSelection(popupId, url, listId, null, null, fetchAppointmentsUrl);
}
diff --git a/BeWoPlanerMobil/Scripts/view-scripts/main.js b/BeWoPlanerMobil/Scripts/view-scripts/main.js
index 1e55196fd..06d5103ef 100644
--- a/BeWoPlanerMobil/Scripts/view-scripts/main.js
+++ b/BeWoPlanerMobil/Scripts/view-scripts/main.js
@@ -440,53 +440,8 @@ function validateForm(form) {
}
}
-var treeHtml = "";
-
-function buildGoalsTree(treeData) {
- var container = $("#goals-container");
-
- container.empty();
- treeHtml = "";
-
- $.each(treeData, function(index) {
- buildGoaldTreeBranch(treeData[index]);
- });
-
- container.append(treeHtml);
-}
-
-function buildGoaldTreeBranch(goalItem) {
- var goalOid = goalItem.ValueListEntryOid;
- var goalHeader = goalItem.Header;
- var isChecked = getSelectedGoalOids() !== null && isInArray(goalOid, getSelectedGoalOids()) ? "checked" : "";
- var ratingName = goalItem.RatingName;
-
- if(!goalItem.IsLeaf) {
- treeHtml +=
- '' +
- '" +
- '
';
-
- $.each(goalItem.Children, function(index) {
- buildGoaldTreeBranch(goalItem.Children[index]);
- });
-
- treeHtml +=
- "
" +
- "
";
- } else {
- treeHtml +=
- '' +
- '' +
- '" +
- "" + ratingName + "" +
- "
";
- }
-}
-
function showGoalRatingPopup(goalOid) {
try {
- console.log("jquery version " + $().jquery);
$("#goal-rating-popup").modal("show");
$("#goal-to-rate-oid").val(goalOid);
} catch (error) {
@@ -540,7 +495,7 @@ function checkChildNodes(parentOid) {
}
function getCheckedGoals() {
- var rootElement = $("#goals-container");
+ var rootElement = $("#goals-tree");
var checkboxes = rootElement.find("input");
var selectedGoals = "";
diff --git a/BeWoPlanerMobil/Scripts/view-scripts/report.js b/BeWoPlanerMobil/Scripts/view-scripts/report.js
index c1cd7d48e..c903ea9e7 100644
--- a/BeWoPlanerMobil/Scripts/view-scripts/report.js
+++ b/BeWoPlanerMobil/Scripts/view-scripts/report.js
@@ -177,7 +177,7 @@ function getSignatures(signatureOidStrings, containerId) {
if(isUndefinedOrNull(json) || !checkJson(json)) {
if(!checkJson(json)) {
hideSpinner();
- logError("Fehler loadConfirmationReceiptSignatures: " + json);
+ logError("Fehler loadConfirmationReceiptSignatures: <" + json + ">");
}
}
@@ -236,10 +236,10 @@ function hideSignatureContainer() {
$("#report-form-container").show();
}
-function showSignaturePad(overwrite, signatureOidsString, canSign, cardBodyId, customerOid, numberOfEntries, customerName, timeSpan, isEmployeeSignature) {
+function showSignaturePad(overwrite, signatureOidsString, canSign, cardBodyId, customerOid, numberOfEntries, customerName, timeSpan, isEmployeeSignature, employeeName) {
try {
cardHeaderButtonClick(cardBodyId);
-
+
$("#report-form-container").hide();
$("#report-signature-container-div").addClass("d-block");
@@ -252,7 +252,9 @@ function showSignaturePad(overwrite, signatureOidsString, canSign, cardBodyId, c
var leistungPlural = entryCount > 1 ? "en" : "";
- $("#report-info-column-h4").html("Unterschrift" + plural + " für " + numberOfEntries + " erbrachte Leistung" + leistungPlural + " von " + customerName + " (" + timeSpan + ")");
+ var signatureGiverName = isEmployeeSignature ? employeeName : customerName;
+
+ $("#report-info-column-h4").html("Unterschrift" + plural + " von " + signatureGiverName + " für " + numberOfEntries + " erbrachte Leistung" + leistungPlural + " von " + customerName + " (" + timeSpan + ")");
if(overwrite) {
$("#overwriting-signature-alert").addClass("d-block");
diff --git a/BeWoPlanerMobil/Util/GoalTreeItem.cs b/BeWoPlanerMobil/Util/GoalTreeItem.cs
index 647d7035c..94b799771 100644
--- a/BeWoPlanerMobil/Util/GoalTreeItem.cs
+++ b/BeWoPlanerMobil/Util/GoalTreeItem.cs
@@ -16,6 +16,6 @@ namespace BeWoPlanerMobil.Util
public long? TopmostParentOid { get; set; }
- public string RatingName { get; set; } = "Bewerten";//string.Empty;
+ public string RatingName { get; set; } = "Bewerten";
}
}
diff --git a/BeWoPlanerMobil/Views/Main/Main.cshtml b/BeWoPlanerMobil/Views/Main/Main.cshtml
index d27e0bc53..b5f7eb097 100644
--- a/BeWoPlanerMobil/Views/Main/Main.cshtml
+++ b/BeWoPlanerMobil/Views/Main/Main.cshtml
@@ -117,13 +117,6 @@
}
- @if(Model?.SelectedSupportConcept != null && Model.SelectedSupportConcept.Goals.Any())
- {
-
- initializeGoalsTreeView();
-
- }
-
setInputFilter();
@if(Model.IsInGroupBookingMode)
@@ -248,12 +241,6 @@
return @(Model != null && Model.IsServiceRecordNoticeMandatory ? "true" : "false");
}
- function initializeGoalsTreeView() {
- $.get("@Url.Action("LoadGoals")").done(function(jsonGoals) {
- buildGoalsTree($.parseJSON(jsonGoals));
- });
- }
-
function getSelectedGoalOids() {
return @Html.Raw(Json.Encode(Model.SelectedGoals.Select(s => s.ValueListEntryOid.Value).ToArray()));
}
@@ -372,27 +359,6 @@
-
-
-
-
diff --git a/BeWoPlanerMobil/Views/Main/SingleBookingPartial.cshtml b/BeWoPlanerMobil/Views/Main/SingleBookingPartial.cshtml
index e2fb60d53..651003fc0 100644
--- a/BeWoPlanerMobil/Views/Main/SingleBookingPartial.cshtml
+++ b/BeWoPlanerMobil/Views/Main/SingleBookingPartial.cshtml
@@ -5,9 +5,9 @@
- @if (Model != null)
+ @if(Model != null)
{
- using (Html.BeginForm("SelectSupportConcept", "Main", FormMethod.Post, new { Id = "selectSupportConceptForm" }))
+ using(Html.BeginForm("SelectSupportConcept", "Main", FormMethod.Post, new { Id = "selectSupportConceptForm" }))
{
var selectedSuportConceptTimeSpanColorClass = Model.SelectedSupportConceptListObject.IsAboutToExpire ? "text-bewo-is-about-to-expire" : Model.SelectedSupportConceptListObject.ExpiresInThreeMonthsOrLess ? "text-bewo-expires-in-three-months" : "text-dark";
@@ -25,7 +25,7 @@
- @if (Model.CostBearer2SupportConceptOid != null && Model.CostBearer2SupportConceptOid > 0)
+ @if(Model.CostBearer2SupportConceptOid != null && Model.CostBearer2SupportConceptOid > 0)
{
- @if (Model.SelectedSupportConcept != null && Model.SelectedSupportConcept.Goals.Any())
+ @if(Model.SelectedSupportConcept != null && Model.SelectedSupportConcept.Goals.Any())
{
@@ -151,7 +151,7 @@
- @if (Model.IsEndDateVisible)
+ @if(Model.IsEndDateVisible)
{
- @if (Model.IsZeiterfassungInStdMin)
+ @if(Model.IsZeiterfassungInStdMin)
{
@@ -219,7 +219,7 @@
}
- @if (Model.ShowDistanceField)
+ @if(Model.ShowDistanceField)
{
}
- @if (AbstractModel.HasRightToSeeTextModules)
+ @if(AbstractModel.HasRightToSeeTextModules)
{