824 lines
31 KiB
Plaintext
824 lines
31 KiB
Plaintext
@using BeWoPlanerMobil.Models;
|
|
@using BeWoPlanerMobil.Util;
|
|
|
|
@model MainModel
|
|
@{
|
|
ViewBag.Title = "BeWoPlaner Mobil";
|
|
|
|
if(TempData[MobileUtils.TempDataLoginStateKey] is BeWoLoginState { Message: not null } loginState)
|
|
{
|
|
var loginStateMessage = new HtmlString(loginState.Message.Replace("\n", "<br/>").Replace("\"", "\\"));
|
|
|
|
<script type="text/javascript">
|
|
showMessagePopupWithHtml("Warnung", "@loginStateMessage");
|
|
</script>
|
|
}
|
|
|
|
if(TempData[TempDataConstants.DoLogoutKey] is true)
|
|
{
|
|
<text>
|
|
<script type="text/javascript">
|
|
$("#second-logout-form").submit();
|
|
</script>
|
|
</text>
|
|
}
|
|
}
|
|
|
|
<script type="text/javascript">
|
|
function loadServiceRecords() {
|
|
try {
|
|
const selectedOption = $("#timeFrameSelect").val();
|
|
const start = $("#time-frame-start-date").val();
|
|
const end = $("#time-frame-end-date").val();
|
|
const dayCount = $("#day-count-number").val();
|
|
const year = $("#year-select").val();
|
|
const month = $("#month-select").val();
|
|
|
|
if(areUndefinedOrNull([dayCount, start, end, month, year, selectedOption])) {
|
|
return;
|
|
}
|
|
|
|
showSpinner();
|
|
|
|
$("#service-record-list-container").load("@Url.Action("LoadServiceRecordsNonPost")",
|
|
{
|
|
dayCountNumber: dayCount,
|
|
start: start,
|
|
end: end,
|
|
month: parseInt(month),
|
|
year: parseInt(year),
|
|
recordsKey: parseInt(selectedOption)
|
|
},
|
|
() => {
|
|
hideSpinner();
|
|
});
|
|
} catch (error) {
|
|
window.showErrorPopup(error);
|
|
}
|
|
}
|
|
|
|
function validatePasswordStrength() {
|
|
try{
|
|
(new MoKPasswordSecurity("pw-strength-feedback")).validatePassword($("#new-password").val());
|
|
} catch(error) {
|
|
window.showErrorPopup(error);
|
|
}
|
|
}
|
|
|
|
function submitChangePasswordForm() {
|
|
try {
|
|
showSpinner();
|
|
const form = $('#change-password-form');
|
|
|
|
var isValid = true;
|
|
|
|
$.each($(".pw-ch-in-container"),
|
|
function (index, item) {
|
|
const input = $(item).find("input");
|
|
const feedback = $(item).find(".pw-chng-inv-fdb");
|
|
|
|
if (isEmptyOrSpaces(input.val())) {
|
|
feedback.addClass("d-block");
|
|
isValid = false;
|
|
} else {
|
|
feedback.removeClass("was-validated");
|
|
feedback.removeClass("d-block");
|
|
}
|
|
|
|
feedback.addClass("was-validated");
|
|
});
|
|
|
|
if(true === isValid) {
|
|
form.submit();
|
|
} else {
|
|
hideSpinner();
|
|
}
|
|
} catch (error) {
|
|
window.showErrorPopup(error);
|
|
}
|
|
}
|
|
|
|
$(document).ready(function() {
|
|
try {
|
|
$(".collapse").on("shown.bs.collapse", function () {
|
|
window.saveCollapsibleState($(this).attr("id"), "@Url.Action("SaveCollapsibleStatus")");
|
|
});
|
|
|
|
$(".collapse").on("hidden.bs.collapse", function () {
|
|
window.saveCollapsibleState($(this).attr("id"), "@Url.Action("SaveCollapsibleStatus")");
|
|
});
|
|
|
|
@if(TempData[TempDataConstants.PwChErrKey] is string passwordChangeError)
|
|
{
|
|
<text>
|
|
$("#password-change-error-alert").html("@passwordChangeError");
|
|
$("#password-change-error-alert").removeClass("d-none");
|
|
$("#password-changing-popup").modal("show");
|
|
|
|
$(".pw-prepend").ready(calcChPwPrepend);
|
|
</text>
|
|
}
|
|
|
|
const supportConceptOid = parseInt($("#sb-cb2ScRelOid").val());
|
|
|
|
const isSupportConceptSelected = supportConceptOid !== -1;
|
|
|
|
$("#single-booking-employee-container").find(".dropdown-toggle").prop("disabled", (isSupportConceptSelected ? false : true));
|
|
|
|
changeSingleBookingFormEnableState(!isSupportConceptSelected);
|
|
|
|
if("@Model.IsInGroupBookingMode".toLowerCase() === "true") {
|
|
const hasSelectedSupportConcepts = "@Model.GroupBookingSelectedCostBearerSupportConceptOids.Any()".toLowerCase() === "true";
|
|
|
|
changeGroupBookingFormEnableState(!hasSelectedSupportConcepts);
|
|
}
|
|
|
|
$("#fehlerdetail-textarea").prop("disabled", false);
|
|
|
|
if ("@Model.IsInMultiBookingMode".toLowerCase() === "true") {
|
|
const isMultiBookingFormDisabled = "@Model.GroupBookingSelectedCostBearerSupportConceptOids.Any()".toLowerCase() === "false";
|
|
|
|
changeMultiBookingFormEnableState(isMultiBookingFormDisabled);
|
|
}
|
|
|
|
initializeSignatureImagePopup();
|
|
|
|
@if(TempData[TempDataConstants.ShowPwChPopupKey] is string passwordWarning && !string.IsNullOrEmpty(passwordWarning))
|
|
{
|
|
<text>
|
|
showMessagePopupWithHtml("Achtung!", "@Html.Raw(passwordWarning)");
|
|
</text>
|
|
}
|
|
|
|
setInputFilter();
|
|
|
|
@if(Model.IsInGroupBookingMode)
|
|
{
|
|
<text>
|
|
$("#create-button").prop("disabled", @Model.GroupBookingSelectedEmployees.Count === 0 ? true : false);
|
|
</text>
|
|
}
|
|
|
|
@{
|
|
var shouldShowSignaturePopup = TempData[TempDataConstants.ShowSignatureSuggestionPopup] is true;
|
|
|
|
if(TempData[TempDataConstants.AfterInsertKey] is true)
|
|
{
|
|
<text>
|
|
window.clearLocalBeWoStorage("@Model.BookingModePrefix");
|
|
</text>
|
|
}
|
|
|
|
if(Model.LastCreatedServiceRecordOid > 0)
|
|
{
|
|
if(shouldShowSignaturePopup && Model.ShowSignature)
|
|
{
|
|
<text>
|
|
showMessagePopupWithCallback("Erfolgreich gespeichert", "Möchten Sie den Eintrag unterschreiben lassen?", function() {
|
|
window.showNewSignaturePopup(@Model.LastCreatedServiceRecordOid);
|
|
}, false);
|
|
</text>
|
|
}
|
|
}
|
|
}
|
|
|
|
@if(TempData[TempDataConstants.AppointmentOidKey] is long && false == Model.IsInGroupBookingMode && false == Model.IsInMultiBookingMode)
|
|
{
|
|
<text>
|
|
loadServiceRecords();
|
|
</text>
|
|
}
|
|
} catch(error) {
|
|
window.showErrorPopup(error);
|
|
}
|
|
});
|
|
|
|
function initializeSignatureImagePopup() {
|
|
$("#signature-img-popup").on("hidden.bs.modal",
|
|
function() {
|
|
$("#signature-img").attr("src", null);
|
|
$("#signature-text").html("");
|
|
}
|
|
);
|
|
}
|
|
|
|
function setInputFilter() {
|
|
$(`#sb-duration-input, #gb-duration-input, #mb-duration-input`).inputFilter(function(value, id) {
|
|
var result = /^\d*$/;
|
|
|
|
const prefix = id.split("-")[0];
|
|
const dropdownButton = $(`#${prefix}-hours-minutes-dropdown-btn`);
|
|
|
|
const labelText = $(`#${prefix}-duration-label`).text().trim();
|
|
|
|
if(dropdownButton.length && dropdownButton.text().trim() === "Stunden" || labelText.endsWith("(h)")) {
|
|
result = /^\d*[.,]?\d*$/;
|
|
}
|
|
|
|
return result.test(value);
|
|
});
|
|
|
|
$(`#sb-distance-input, #gb-distance-input, #mb-distance-input`).inputFilter(function(value, id) {
|
|
return /^\d*[.,]?\d*$/.test(value);
|
|
});
|
|
|
|
$(`#sb-betrag-input, #gb-betrag-input, #mb-betrag-input`).inputFilter(function(value, id) {
|
|
return /^\d*([.,]?\d{0,2})?$/.test(value);
|
|
});
|
|
}
|
|
|
|
(function($) {
|
|
$.fn.inputFilter = function(inputFilter) {
|
|
return this.on("input keydown keyup mouseup select mousedown contextmenu drop", function() {
|
|
if(inputFilter(this.value, this.id)) {
|
|
this.oldValue = this.value;
|
|
this.oldSelectionStart = this.selectionStart;
|
|
this.oldSelectionEnd = this.selectionEnd;
|
|
} else if (this.hasOwnProperty("oldValue")) {
|
|
this.value = this.oldValue;
|
|
this.setSelectionRange(this.oldSelectionStart, this.oldSelectionEnd);
|
|
} else {
|
|
this.value = "";
|
|
}
|
|
});
|
|
}
|
|
}(jQuery));
|
|
|
|
$(window).resize(function() {
|
|
@* Wird für die neue Unterschriftenle *@
|
|
updateCanvasSize($("#sketch-pad"));
|
|
});
|
|
|
|
function getSetServiceRecordEmployeeUrl() {
|
|
return "@Url.Action("SetServiceRecordEmployee")";
|
|
}
|
|
|
|
function getSetServiceDescriptionUrl() {
|
|
return "@Url.Action("SetServiceDescription")";
|
|
}
|
|
|
|
function getNumberOfDokutypes() {
|
|
return @Model.NumberOfDokuTypes;
|
|
}
|
|
|
|
function getRedirectLink() {
|
|
return '@Url.Action("Index", "Login")';
|
|
}
|
|
|
|
function getLoadStatisticsUrl() {
|
|
return '@Url.Action("LoadStatistics")';
|
|
}
|
|
|
|
function getSelectedRecordInformationUrlWithOid() {
|
|
return '@Url.Action("GetSelectedRecordInformationWithOid")';
|
|
}
|
|
|
|
function getDeleteServiceRecordUrl() {
|
|
return '@Url.Action("DeleteServiceRecord")';
|
|
}
|
|
|
|
function getLoadStatisticsUrl() {
|
|
return '@Url.Action("LoadStatistics")';
|
|
}
|
|
|
|
function getIsDocumentationMandatory() {
|
|
return @(Model is { IsServiceRecordNoticeMandatory: true } ? "true" : "false");
|
|
}
|
|
|
|
function getIsServiceRecordGoalMandatory() {
|
|
return @(Model is { IsServiceRecordGoalMandatory: true } ? "true" : "false");
|
|
}
|
|
|
|
function getSelectedGoalOids() {
|
|
return @Html.Raw(Json.Encode(Model.SelectedGoals.Select(s => s.ValueListEntryOid.Value).ToArray()));
|
|
}
|
|
|
|
function getIsInEditingMode() {
|
|
const boolString = "@Model.IsInEditingMode";
|
|
|
|
return boolString.toLowerCase() === "true";
|
|
}
|
|
|
|
function getIsInGroupBookingMode() {
|
|
const boolString = "@Model.IsInGroupBookingMode";
|
|
|
|
return boolString.toLowerCase() === "true";
|
|
}
|
|
|
|
function getServiceDescriptionToEdit() {
|
|
if(getIsInEditingMode()) {
|
|
const floatString = "@Model.SelectedServiceRecordsServiceDescriptionOid";
|
|
|
|
return parseFloat(floatString);
|
|
} else {
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
function getValidateServiceRecordDeletionUrl() {
|
|
return "@Url.Action("ValidateServiceRecordDeletion")";
|
|
}
|
|
|
|
function getGetSignatureImageUrl() {
|
|
return "@Url.Action("GetSignatureImage")";
|
|
}
|
|
|
|
function reloadServiceRecordsAfterValidation() {
|
|
|
|
}
|
|
|
|
function getSelectedScCbRelOids(prefix) {
|
|
const checkedCheckboxes = $(`#${prefix}-cb2sc-list input[type=checkbox]:checked`);
|
|
const oids = [];
|
|
|
|
checkedCheckboxes.each(
|
|
(index, item) => {
|
|
oids.push(parseInt($(item).val(), 10));
|
|
}
|
|
);
|
|
|
|
return oids;
|
|
}
|
|
|
|
function updateScCbRelOids(prefix, isGroupTabActive) {
|
|
const oids = getSelectedScCbRelOids(prefix);
|
|
const selectedGroups = [];
|
|
|
|
$(`#${prefix}-g-list input[type=hidden]`).each(
|
|
(index, item) => {
|
|
const memberOids = commaSeparatedOid2Array($(item).val());
|
|
|
|
let isSelected = true;
|
|
for(let i = 0; i < memberOids.length; i++) {
|
|
if(false === oids.includes(memberOids[i])) {
|
|
isSelected = false;
|
|
break;
|
|
}
|
|
}
|
|
|
|
const groupOid = $(item).attr("id").split("-")[2];
|
|
|
|
if(isSelected) {
|
|
selectedGroups.push(groupOid);
|
|
}
|
|
|
|
$(`#${prefix}-group-checkbox-${groupOid}`).prop("checked", isSelected);
|
|
}
|
|
);
|
|
|
|
if(prefix === "gb") {
|
|
window.updateLocallyStoredGroupBookingCb2ScRelOids();
|
|
} else if(prefix === "mb") {
|
|
window.updateLocallyStoredMultiBookingCb2ScRelOids();
|
|
}
|
|
|
|
const addScCbRelOidsUrl = prefix === "gb" ? "@Url.Action("AddScCbRelsToGroupBooking")" : "@Url.Action("AddScCbRelsToMultiBooking")";
|
|
const reloadBookingFormUrl = prefix === "gb" ? "@Url.Action("ReloadGroupBookingForm")" : "@Url.Action("ReloadMultiBookingForm")";
|
|
|
|
$(`#${prefix}-sc-cb-rel-tab-content`).load(addScCbRelOidsUrl,
|
|
{
|
|
relOids: oids,
|
|
groupOids: selectedGroups,
|
|
isGroupTabActive: isGroupTabActive
|
|
},
|
|
() => {
|
|
$(`#${prefix}-selection-container`).load(reloadBookingFormUrl, () => {
|
|
if(prefix === "gb") {
|
|
window.updateCategory("@Model.BookingModePrefix", @Model.SelectedServiceCategoryOid);
|
|
window.updateServiceDescription("@Model.BookingModePrefix", @Model.SelectedServiceDescriptionOid);
|
|
window.updateEmployeeOids("@Model.BookingModePrefix", getGroupBookingEmployeeOids());
|
|
window.updateStartDate("@Model.BookingModePrefix", $(`#@Model.BookingModePrefix-start-date-input`).val());
|
|
window.updateStartTime("@Model.BookingModePrefix", $(`#@Model.BookingModePrefix-start-time-input`).val());
|
|
window.updateEndDate("@Model.BookingModePrefix", $(`#@Model.BookingModePrefix-end-date-input`).val());
|
|
window.updateEndTime("@Model.BookingModePrefix", $(`#@Model.BookingModePrefix-end-time-input`).val());
|
|
window.updateDurationUnit("gb", ($("#gb-hours-minutes-dropdown-btn").text().trim() === "Stunden" ? "h" : "m"));
|
|
toggleGroupBookingForm();
|
|
} else if(prefix === "mb") {
|
|
changeMultiBookingFormEnableState($(".mb-cb2sc-input:checkbox:checked").length > 0 ? false : true);
|
|
|
|
window.updateCategory("@Model.BookingModePrefix", @Model.SelectedServiceCategoryOid);
|
|
window.updateServiceDescription("@Model.BookingModePrefix", @Model.SelectedServiceDescriptionOid);
|
|
window.updateEmployeeOids("@Model.BookingModePrefix", getMultiBookingEmployeeOids());
|
|
window.updateStartDate("@Model.BookingModePrefix", $(`#@Model.BookingModePrefix-start-date-input`).val());
|
|
window.updateStartTime("@Model.BookingModePrefix", $(`#@Model.BookingModePrefix-start-time-input`).val());
|
|
window.updateEndDate("@Model.BookingModePrefix", $(`#@Model.BookingModePrefix-end-date-input`).val());
|
|
window.updateEndTime("@Model.BookingModePrefix", $(`#@Model.BookingModePrefix-end-time-input`).val());
|
|
window.updateDurationUnit("mb", ($("#mb-hours-minutes-dropdown-btn").text().trim() === "Stunden" ? "h" : "m"));
|
|
}
|
|
|
|
$("#goals-tree").load("@Url.Action("ReloadGoals")", () => {
|
|
$("#tree").load("@Url.Action("LoadUpToDateTextModules")", () => { logDebug("Textbausteine geladen"); });
|
|
});
|
|
});
|
|
});
|
|
}
|
|
|
|
function updateGroupOfPeople(element, prefix) {
|
|
const item = $(element);
|
|
const groupOid = item.attr("id").split("-")[3];
|
|
const isSelected = item.prop("checked");
|
|
|
|
const memberOids = commaSeparatedOid2Array($(`#${prefix}-i-${groupOid}`).val());
|
|
|
|
for(let i = 0; i < memberOids.length; i++) {
|
|
$(`#${prefix}-cb2sc-checkbox-${memberOids[i]}`).prop("checked", isSelected);
|
|
}
|
|
|
|
updateScCbRelOids(prefix, true);
|
|
}
|
|
</script>
|
|
|
|
<div class="container mt-3 lg-max-width" id="checkbox-container">
|
|
<div class="row">
|
|
@if(Model.IsAllowedToSeeSupportConceptFilter)
|
|
{
|
|
<div class="col-md">
|
|
@using(Html.BeginForm("SetSupportConceptFilter", "Main", FormMethod.Post))
|
|
{
|
|
@Html.DropDownListFor(m => m.SelectedSupportConceptFilter, Model.SupportConceptFilter, new { onchange = "submitForm(this)", @class = "custom-select" })
|
|
}
|
|
</div>
|
|
}
|
|
|
|
<div class="col-md pt-1">
|
|
@using(Html.BeginForm("SetShowExpiredSupportConcepts", "Main", FormMethod.Post))
|
|
{
|
|
<div class="custom-control custom-switch custom-control-inline">
|
|
@Html.CheckBoxFor(m => m.ShowExpiredSupportConcepts, new { onchange = "submitForm(this)", @class = "custom-control-input" })
|
|
@Html.LabelFor(m => m.ShowExpiredSupportConcepts, new { @class = "custom-control-label" })
|
|
</div>
|
|
}
|
|
</div>
|
|
|
|
@if(Model.HasRightForGroupBookings)
|
|
{
|
|
<div class="col-md pt-1">
|
|
@using(Html.BeginForm("SetGroupBookingMode", "Main", FormMethod.Post))
|
|
{
|
|
<div class="custom-control custom-switch custom-control-inline">
|
|
@Html.CheckBoxFor(m => m.IsInGroupBookingMode, new { onchange = "submitForm(this)", @class = "custom-control-input" })
|
|
@Html.LabelFor(m => m.IsInGroupBookingMode, new { @class = "custom-control-label" })
|
|
</div>
|
|
}
|
|
</div>
|
|
}
|
|
|
|
@if(Model.HasRightForMultiBooking)
|
|
{
|
|
<div class="col-md pt-1">
|
|
@using(Html.BeginForm("SetMultiBookingMode", "Main", FormMethod.Post))
|
|
{
|
|
<div class="custom-control custom-switch custom-control-inline">
|
|
@Html.CheckBoxFor(m => m.IsInMultiBookingMode, new { onchange = "submitForm(this)", @class = "custom-control-input" })
|
|
@Html.LabelFor(m => m.IsInMultiBookingMode, new { @class = "custom-control-label" })
|
|
</div>
|
|
}
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
|
|
@* ----- Formularcontainer für Einzel-, Gruppen-, und Mehrfachbuchungen ----- *@
|
|
<div class="container-fluid mb-3 lg-max-width" id="form-container">
|
|
@Html.Partial("Zeiterfassungspartial", Model)
|
|
</div>
|
|
|
|
@* ----- Textbausteine-Popup ----- *@
|
|
<div class="modal" tabindex="-1" role="dialog" id="textbausteine-popup">
|
|
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h6 class="modal-title font-weight-bold">Textbausteine</h6>
|
|
<button type="button" class="close" data-dismiss="modal">
|
|
<span>×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div id="tree">
|
|
@{ Html.RenderPartial("TextModulePartial", Model); }
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-primary" data-dismiss="modal">Schließen</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@* ----- Neues Unterschriftenpopup ----- *@
|
|
<div id="single-signature-popup-container" class="m-0 p-0 bg-info">
|
|
|
|
</div>
|
|
|
|
@* ----- Unterschriften-Layover ----- *@
|
|
<div class="container-fluid d-none mb-3 lg-max-width" id="signature-container">
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col">
|
|
<h4 class="d-inline">Unterschrift</h4>
|
|
<button type="button" class="btn btn-primary float-right" id="cancel-signature-btn">
|
|
<span class="fas fa-times-circle"></span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div class="row mt-3">
|
|
<div class="col">
|
|
<div class="alert alert-info d-none" role="alert" id="signature-alert">
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col text-secondary">
|
|
Hilfeplan:
|
|
</div>
|
|
<div class="col" id="signature-support-concept">
|
|
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col text-secondary">
|
|
Kategorie:
|
|
</div>
|
|
<div class="col" id="signature-service-description">
|
|
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col text-secondary">
|
|
Leistung:
|
|
</div>
|
|
<div class="col" id="signature-service-category">
|
|
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col text-secondary">
|
|
Mitarbeiter:
|
|
</div>
|
|
<div class="col" id="signature-employee">
|
|
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col text-secondary" id="signature-date-time-left">
|
|
Datum / Uhrzeit:
|
|
</div>
|
|
<div class="col" id="signature-date-time">
|
|
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<button type="button" class="btn btn-primary float-right" id="save-signature-btn">Speichern</button>
|
|
<button type="button" class="btn btn-secondary float-right mr-3" id="clear-canvas-btn">Neu</button>
|
|
</div>
|
|
</div>
|
|
<div class="row mt-3" id="canvas-row">
|
|
<div class="canvas-container" id="canvas-container">
|
|
<canvas id="sketch-pad" width="500" height="200" class="bg-white" style="border: 1px solid #343A40;"></canvas>
|
|
</div>
|
|
</div>
|
|
|
|
<input type="hidden" id="service-record-oid-holder" />
|
|
</div>
|
|
</div>
|
|
|
|
@* ----- Löschformular ----- *@
|
|
@using(Html.BeginForm("DeleteServiceRecord", "Main", FormMethod.Post, new { id = "deletion-form" }))
|
|
{
|
|
<input type="hidden" name="serviceRecordOidHolder" id="oidHolder" />
|
|
}
|
|
|
|
@* ----- Statistik-Popup ----- *@
|
|
<div id="statistics-popup" class="modal" tabindex="-1" role="dialog">
|
|
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h6 class="modal-title font-weight-bold" id="statistics-header"></h6>
|
|
<button type="button" class="close" data-dismiss="modal">
|
|
<span>×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="container">
|
|
<div id="period-statistics-container">
|
|
|
|
</div>
|
|
<canvas class="mt-3" id="statistic-canvas" scaleheight="65%" scalewidth="65%"></canvas>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-primary" data-dismiss="modal">Zurück</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@* ----- Unterschriftenanzeige-Popup ----- *@
|
|
<div id="signature-img-popup" class="modal" tabindex="-1" role="dialog">
|
|
<div class="modal-dialog modal-lg" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title font-weight-bold" id="signature-text"></h5>
|
|
<button type="button" class="close" data-dismiss="modal" onclick="hideSignature()">
|
|
<span>×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<img id="signature-img" alt="Unterschrift" class="img-fluid mx-auto d-block" />
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-primary" data-dismiss="modal" onclick="hideSignature()">Zurück</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@* ----- Bewertungspopup für Ziele ----- *@
|
|
@if(Model.HasRightToRateGoals)
|
|
{
|
|
<div id="goal-rating-popup" class="modal" tabindex="-1" role="dialog" style="z-index: 9999 !important">
|
|
<div class="modal-dialog modal-lg" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title font-weight-bold">Bewertungsskala</h5>
|
|
<button class="close" type="button" data-dismiss="modal" onclick="hideGoalRatingPopup()">
|
|
<span>×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<ul class="list-group" id="goal-ratings-container">
|
|
@Html.Partial("GoalRatingPopupContentPartial", Model)
|
|
</ul>
|
|
<input type="hidden" id="goal-to-rate-oid" />
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-primary" data-dismiss="modal" onclick="hideGoalRatingPopup()">Zurück</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
@{
|
|
var hasRatingTypes = Model?.HasAnyRatingTypes ?? false;
|
|
}
|
|
<input type="hidden" id="has-any-rating-types" value="@hasRatingTypes" />
|
|
|
|
@* ----- Passwort ändern Popup ----- *@
|
|
@using(Html.BeginForm("ChangePassword", "Main", FormMethod.Post, new { id = "change-password-form" }))
|
|
{
|
|
<div class="modal" id="password-changing-popup" tabindex="-1" role="dialog">
|
|
<div class="modal-dialog modal-lg" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title font-weight-bold">Passwort ändern</h5>
|
|
<button type="button" class="close" data-dismiss="modal" onclick="$('#password-change-error-alert').html(''); $('#password-change-error-alert').modal('hide');">
|
|
<span>×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="alert alert-danger d-none" rolw="alert" id="password-change-error-alert">
|
|
|
|
</div>
|
|
<div class="row">
|
|
<div class="col">
|
|
<div class="input-group mb-3 pw-ch-in-container">
|
|
<div class="input-group-prepend">
|
|
<div class="input-group-text pw-prepend">Altes Passwort</div>
|
|
</div>
|
|
<input type="password" class="form-control" name="old-password" autocomplete="on" required />
|
|
<div class="invalid-feedback pw-chng-inv-fdb">
|
|
Dieses Feld darf nicht leer sein.
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col">
|
|
<div class="input-group mb-3 pw-ch-in-container">
|
|
<div class="input-group-prepend">
|
|
<div class="input-group-text pw-prepend">Neues Passwort</div>
|
|
</div>
|
|
<input type="password" class="form-control" name="new-password" id="new-password" autocomplete="on" onkeyup="validatePasswordStrength()" required />
|
|
<div class="invalid-feedback pw-chng-inv-fdb">
|
|
Dieses Feld darf nicht leer sein.
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col">
|
|
<div class="input-group mb-3 pw-ch-in-container">
|
|
<div class="input-group-prepend">
|
|
<span class="input-group-text pw-prepend">Passwort bestätigen</span>
|
|
</div>
|
|
<input type="password" class="form-control" name="confirm-new-password" autocomplete="on" id="confirm-new-password" required />
|
|
<div class="invalid-feedback pw-chng-inv-fdb">
|
|
Dieses Feld darf nicht leer sein.
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col">
|
|
<p id="pw-strength-feedback" class="d-block"></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-primary" onclick="submitChangePasswordForm()">OK</button>
|
|
<button type="button" class="btn btn-primary" data-dismiss="modal">Abbrechen</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
|
|
@* ----- Validierungspopup ----- *@
|
|
@{
|
|
var validationMessage = TempData[MobileUtils.TempDataServiceRecordValidationKey] as ValidationResult;
|
|
var formId = TempData[MobileUtils.TempDataFormIdKey];
|
|
// ToDo: Bei Klick auf Abbrechen den EditModus zurücksetzen
|
|
if(validationMessage != null)
|
|
{
|
|
<div class="modal modal-open" data-backdrop="static" tabindex="-1" role="dialog" id="service-record-validation-message-modal">
|
|
<div class="modal-dialog" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title font-weight-bold" id="staticBackdropLabel">Warnung</h5>
|
|
<button type="button" class="close" data-dismiss="modal">
|
|
<span>×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
@Html.Raw(validationMessage.Message)
|
|
</div>
|
|
<div class="modal-footer">
|
|
@if (validationMessage.KannTrotzdemGespeichertWerden)
|
|
{
|
|
<button type="button" class="btn btn-primary" data-dismiss="modal" onclick="showSpinner(); $('#@formId').submit();">OK</button>
|
|
}
|
|
else
|
|
{
|
|
<button type="button" class="btn btn-primary" data-dismiss="modal" onclick="loadServiceRecords()">OK</button>
|
|
}
|
|
|
|
@if (Model.IsInEditingMode)
|
|
{
|
|
using(Html.BeginForm("ResetEditingMode", "Main", FormMethod.Post))
|
|
{
|
|
<button type="submit" class="btn btn-primary" onclick="showSpinner()">Schließen</button>
|
|
}
|
|
}
|
|
else if(Model.IsInTransferMode)
|
|
{
|
|
using(Html.BeginForm("ResetTransferMode", "Main", FormMethod.Post))
|
|
{
|
|
<button type="submit" class="btn btn-primary" onclick="showSpinner()">Schließen</button>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
<button type="button" class="btn btn-secondary" data-dismiss="modal" onclick="loadServiceRecords()">Schließen</button>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
$("#service-record-validation-message-modal").modal("show");
|
|
</script>
|
|
}
|
|
else if(formId != null)
|
|
{
|
|
<text>
|
|
<script type="text/javascript">
|
|
showSpinner();
|
|
$("#@formId").submit();
|
|
</script>
|
|
</text>
|
|
}
|
|
}
|
|
|
|
@using(Html.BeginForm("ValidateServiceRecord", "Main", FormMethod.Post, new { id = "service-record-validation-form" }))
|
|
{
|
|
<input type="hidden" name="@FormCollectionConstants.DateKey" id="srv-date" />
|
|
<input type="hidden" name="@FormCollectionConstants.EndKey" id="srv-end" />
|
|
<input type="hidden" name="@FormCollectionConstants.StartKey" id="srv-start" />
|
|
<input type="hidden" name="@FormCollectionConstants.EndDateKey" id="srv-end-date" />
|
|
<input type="hidden" name="@FormCollectionConstants.Dokumentation1Key" id="srv-doku1" />
|
|
<input type="hidden" name="@FormCollectionConstants.Dokumentation2Key" id="srv-doku2" />
|
|
<input type="hidden" name="@FormCollectionConstants.Dokumentation3Key" id="srv-doku3" />
|
|
<input type="hidden" name="@FormCollectionConstants.Dokumentation4Key" id="srv-doku4" />
|
|
<input type="hidden" name="@FormCollectionConstants.Dokumentation5Key" id="srv-doku5" />
|
|
<input type="hidden" name="@FormCollectionConstants.DistanceKey" id="srv-distance" />
|
|
<input type="hidden" name="@FormCollectionConstants.FormIdKey" id="srv-form-id" />
|
|
<input type="hidden" name="@FormCollectionConstants.MarkerKey" id="srv-marker" />
|
|
<input type="hidden" name="@FormCollectionConstants.ServiceDescriptionKey" id="srv-service-description" />
|
|
<input type="hidden" name="@FormCollectionConstants.DurationKey" id="srv-duration" />
|
|
<input type="hidden" name="@FormCollectionConstants.BetragKey" id="srv-betrag" />
|
|
}
|