745 lines
38 KiB
Plaintext
745 lines
38 KiB
Plaintext
@using BeWoPlanerMobil.Models
|
|
@using BeWoPlanerMobil.Util
|
|
@using BS.Shared
|
|
@using BS.Shared.Extensions
|
|
@model MainModel
|
|
|
|
@{
|
|
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
|
|
{
|
|
<text>
|
|
<script type="text/javascript">
|
|
$("#second-logout-form").submit();
|
|
</script>
|
|
</text>
|
|
}
|
|
}
|
|
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
const dropdownBtn = $("#sb-hours-minutes-dropdown-btn");
|
|
|
|
dropdownBtn.on("click", function() {
|
|
dropdownBtn.data("text", dropdownBtn.text().replaceAll(/\s/g, ""));
|
|
});
|
|
|
|
$(".hours-minutes-link").on("click", function () {
|
|
const previousText = dropdownBtn.data("text");
|
|
const currentText = $(this).text().replaceAll(/\s/g, "");
|
|
|
|
if(previousText === currentText) {
|
|
return;
|
|
}
|
|
|
|
const buttonText = $(this).text();
|
|
dropdownBtn.text(buttonText);
|
|
|
|
window.setInputFilter();
|
|
|
|
$.get('@Url.Action("ToggleDurationUnit")', { isInHoursMode: buttonText === "Stunden" });
|
|
|
|
calcDuration("sb", true, false, false);
|
|
});
|
|
|
|
@{
|
|
if(Model.SelectedSupportConcept != null || Model.SelectedCostBearerSupportConceptOid == -2)
|
|
{
|
|
<text>
|
|
initializeIntervalSelection();
|
|
</text>
|
|
}
|
|
}
|
|
|
|
window.calcPrependWidth();
|
|
});
|
|
|
|
function deleteSigntarue(signatureOid, serviceRecordOid, customerName, dateOfRecord) {
|
|
showMessagePopupWithCallback("Unterschrift löschen",
|
|
`Sind Sie sicher, dass Sie die Unterschrift von ${customerName} vom ${dateOfRecord} löschen möchten?`,
|
|
function () {
|
|
$("#sr-signature-to-del-oid-input").val(signatureOid);
|
|
$("#sr-sig-to-del-record-oid-input").val(serviceRecordOid);
|
|
showSpinner();
|
|
$("#delete-signature-form").submit();
|
|
},
|
|
false);
|
|
}
|
|
|
|
function resetSingleBookingForm() {
|
|
showSpinner();
|
|
$("#singleBookingForm").trigger("reset");
|
|
|
|
if($("#has-any-rating-types").val().toLowerCase() === "true") {
|
|
$(".goal-rating-badge").text("Bewerten");
|
|
} else {
|
|
$(".goal-rating-badge").text("");
|
|
}
|
|
|
|
$("#reset-single-booking-form-form").submit();
|
|
}
|
|
|
|
function setSelectedEmployeeForSingleBooking(selectedListElement, employeeOid) {
|
|
if(employeeOid !== null && employeeOid !== undefined && $.isNumeric(employeeOid) === true && employeeOid > 0) {
|
|
$.get("@Url.Action("SetServiceRecordEmployee")", {employeeOid: parseFloat(employeeOid)}, function (employeeName) {
|
|
$("#single-booking-employee-modal-popup").parent().find(".dropdown-toggle").text(employeeName);
|
|
$("#single-booking-employee-modal-popup").modal("hide");
|
|
|
|
window.loadServiceRecords();
|
|
});
|
|
}
|
|
}
|
|
|
|
function initializeIntervalSelection() {
|
|
const selectedOption = $("#timeFrameSelect option:selected").val();
|
|
|
|
switch (selectedOption) {
|
|
case "0":
|
|
$("#last-x-interval-container, #custom-interval-container, #month-interval-container").hide();
|
|
break;
|
|
case "1":
|
|
$("#last-x-interval-container, #custom-interval-container, #month-interval-container").hide();
|
|
break;
|
|
case "2":
|
|
$("#last-x-interval-container, #custom-interval-container, #month-interval-container").hide();
|
|
break;
|
|
case "3":
|
|
$("#last-x-interval-container, #custom-interval-container, #month-interval-container").hide();
|
|
break;
|
|
case "4":
|
|
$("#last-x-interval-container, #custom-interval-container, #month-interval-container").hide();
|
|
break;
|
|
case "5":
|
|
$("#last-x-interval-container").show();
|
|
$("#custom-interval-container, #month-interval-container").hide();
|
|
break;
|
|
case "6":
|
|
$("#custom-interval-container").show();
|
|
$("#last-x-interval-container, #month-interval-container").hide();
|
|
break;
|
|
case "7":
|
|
$("#month-interval-container").show();
|
|
$("#last-x-interval-container, #custom-interval-container").hide();
|
|
break;
|
|
}
|
|
}
|
|
|
|
function changeServiceRecordIntervalSelection(select) {
|
|
const selectedOption = $(select).val();
|
|
|
|
showSpinner();
|
|
|
|
if(["0", "1", "2", "3", "4"].includes(selectedOption)) {
|
|
$("#last-x-interval-container, #custom-interval-container, #month-interval-container").hide();
|
|
}
|
|
else if(selectedOption === "5") {
|
|
$("#last-x-interval-container").show();
|
|
$("#custom-interval-container, #month-interval-container").hide();
|
|
}
|
|
else if(selectedOption === "6") {
|
|
$("#custom-interval-container").show();
|
|
$("#last-x-interval-container, #month-interval-container").hide();
|
|
}
|
|
else if(selectedOption === "7") {
|
|
$("#month-interval-container").show();
|
|
$("#last-x-interval-container, #custom-interval-container").hide();
|
|
}
|
|
|
|
window.loadServiceRecords();
|
|
}
|
|
</script>
|
|
|
|
@using(Html.BeginForm("ResetSingleBookingForm", "Main", FormMethod.Post, new { Id = "reset-single-booking-form-form" })) { }
|
|
|
|
<div class="row">
|
|
@* ----- Einzelbuchungsformular ----- *@
|
|
<div class="col col-12 col-md-5">
|
|
@if (Model != null)
|
|
{
|
|
using (Html.BeginForm("SelectSupportConcept", "Main", FormMethod.Post, new { Id = "selectSupportConceptForm", onreset = "resetSingleBookingForm()" }))
|
|
{
|
|
var selectedSuportConceptTimeSpanColorClass = Model.SelectedCostBearer2SupportConceptRelListObject.IsAboutToExpire
|
|
? "text-bewo-is-about-to-expire"
|
|
: Model.SelectedCostBearer2SupportConceptRelListObject.ExpiresInThreeMonthsOrLess
|
|
? "text-bewo-expires-in-three-months"
|
|
: "text-light";
|
|
|
|
var isFormDisabled = Model.SelectedCostBearerSupportConceptOid.HasValue ? string.Empty : "disabled";
|
|
|
|
<div>
|
|
<div class="container p-0">
|
|
<div class="row">
|
|
<div class="col mt-3">
|
|
<div class="list-group">
|
|
<a href="#" class="list-group-item flex-column align-items-start no-underline bg-bewo-task-red" data-toggle="modal" data-target="#supportConceptList">
|
|
<div class="d-flex">
|
|
<h5 class="mb-1 text-light text-left" id="selectedSupportConceptCustomerInfo">@Model.SelectedCostBearer2SupportConceptRelListObject.NameAndDateOfBirth</h5>
|
|
</div>
|
|
@if(Model.SelectedCostBearerSupportConceptOid > 0)
|
|
{
|
|
<div class="dropdown-divider my-0 py-0"></div>
|
|
}
|
|
<p class="mb-1 text-left small @selectedSuportConceptTimeSpanColorClass" id="selectedSupportConceptInfo">
|
|
@Model.SelectedCostBearer2SupportConceptRelListObject.SupportConceptTimeSpan
|
|
</p>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
@if (Model.SelectedCostBearerSupportConceptOid != null && Model.SelectedCostBearerSupportConceptOid > 0)
|
|
{
|
|
<div class="col-md-auto mt-3">
|
|
<button type="button" class="btn btn-outline-primary w-100 h-100" id="statistics-button" data-toggle="modal" data-target="#statistics-popup" onclick="showPieChart()">
|
|
<span class="d-md-none align-middle">Statistik</span>
|
|
<span class="fas fa-chart-pie align-middle" style="font-size: 2rem;"></span>
|
|
</button>
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@* Hilfeplanauswahlpopup *@
|
|
<div class="modal" role="dialog" tabindex="-1" id="supportConceptList">
|
|
<div class="modal-dialog text-center modal-dialog-scrollable" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title font-weight-bold">Hilfeplanauswahl</h5>
|
|
<button type="button" class="close" data-dismiss="modal" onclick="resetSupportConceptSearch()">
|
|
<span>×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
@* Hilfeplansuche *@
|
|
<div class="input-group mb-3">
|
|
<input class="form-control w-100" autocomplete="on" type="text" placeholder="Suchen..." oninput="supportConceptSearchOnChange()" id="support-concept-search-input" />
|
|
<div class="input-group-append">
|
|
<button class="btn btn-outline-secondary" type="button" onclick="resetSupportConceptSearch()">
|
|
<span class="fas fa-times-circle"></span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<hr />
|
|
@* Hilfeplanliste *@
|
|
<div class="list-group">
|
|
@foreach (var supportConceptListObject in Model.SupportConceptListObjects)
|
|
{
|
|
var timeSpanColorClass = supportConceptListObject.IsAboutToExpire ? "text-bewo-is-about-to-expire" : supportConceptListObject.ExpiresInThreeMonthsOrLess ? "text-bewo-expires-in-three-months" : "text-dark";
|
|
|
|
<a href="#" class="list-group-item flex-column align-items-start no-underline blubb-test" onclick="selectSupportConcept(@supportConceptListObject.CostBearer2SupportConceptOid)" data-dismiss="modal">
|
|
<div class="justify-content-between">
|
|
<h5 class="mb-1 text-dark text-left supportconcept-name-header">
|
|
@supportConceptListObject.NameAndDateOfBirth
|
|
</h5>
|
|
</div>
|
|
<p class="mb-1 text-left @timeSpanColorClass">
|
|
@supportConceptListObject.SupportConceptTimeSpan
|
|
</p>
|
|
</a>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@* /Hilfeplanauswahlpopup *@
|
|
|
|
<input type="hidden" name="CostBearer2SupportConceptOid" id="CostBearer2SupportConceptOid" value="@Model.SelectedCostBearer2SupportConceptRelListObject.CostBearer2SupportConceptOid">
|
|
}
|
|
|
|
if(Model.IsCustomerAbsence)
|
|
{
|
|
<div class="container my-1 mb-0 mx-auto p-0 w-100 text-center">
|
|
<span>
|
|
<i class="fas fa-exclamation-triangle text-warning"></i>
|
|
<div class="text-danger d-inline">Klient ist abwesend</div>
|
|
<p class="text-danger mb-0 pb-0">@Model.CustomerAbsenceInfo</p>
|
|
</span>
|
|
</div>
|
|
}
|
|
|
|
using(Html.BeginForm("CreateOrUpdateServiceRecord", "Main", FormMethod.Post, new { id = "singleBookingForm" }))
|
|
{
|
|
<div>
|
|
@* ----- Einzelbuchung: Mitarbeiter ----- *@
|
|
<div class="form-row">
|
|
<div class="col-md">
|
|
<div class="mt-2" id="single-booking-employee-container">
|
|
@Html.PopupWithSearchForIFilterables(Model.Employees, "setSelectedEmployeeForSingleBooking", null, Model.SelectedEmployee?.DetailDescription, "single-booking-employee-modal-popup", false)
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@* ----- Einzelbuchung: Ziele ----- *@
|
|
@if(Model.SelectedSupportConcept != null && Model.SelectedSupportConcept.Goals.Any())
|
|
{
|
|
<!-- Einzelbuchung: Ziele -->
|
|
<div class="form-row">
|
|
<div class="col-md mt-2">
|
|
<button type="button" class="btn btn-primary form-control" data-toggle="modal" data-target="#goal-popup" id="goals-button">
|
|
Ziele <span class="badge badge-light text-primary">@Model.SelectedGoals.Count</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="col-md">
|
|
<div class="collapse mt-2 w-100 max-vw-50 @Html.GetCollapsibleClass(Model.Collapsibles2IsShown, "goals-container")" id="goals-container"></div>
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
@* ----- Einzelbuchung: Kategorie & Leistung ----- *@
|
|
<div id="category-to-description-container">
|
|
@Html.Partial("Category2ServiceDescriptionPartial", Model)
|
|
</div>
|
|
|
|
@* ----- Marker ----- *@
|
|
@if(Model.ShowMarker)
|
|
{
|
|
var markerCheckedValue = Model.SelectedServiceRecord?.ServiceRecordType == ServiceRecordTypeId.Content ? "checked" : string.Empty;
|
|
|
|
<div class="form-row">
|
|
<div class="col-md mt-1">
|
|
<div class=" custom-control custom-checkbox custom-control-inline my-0">
|
|
<input type="checkbox" class="custom-control-input" name="@FormCollectionConstants.MarkerKey" id="sb-marker-cb" @markerCheckedValue />
|
|
<label class="custom-control-label" for="sb-marker-cb">Marker</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
@* ----- Betrag ----- *@
|
|
@if(Model.ShowBetrag)
|
|
{
|
|
var betrag = string.Empty;
|
|
if(Model.SelectedServiceRecord?.Betrag != null && Model.SelectedServiceRecord.Betrag.Value > 0)
|
|
{
|
|
betrag = Model.SelectedServiceRecord.Betrag.Value.ToString("#.00");
|
|
}
|
|
|
|
<div class="form-row mt-1">
|
|
<div class="col-md">
|
|
<div class="form-group my-0">
|
|
<div class="input-group">
|
|
<div class="input-group-prepend">
|
|
<div class="input-group-text prepend-input-group-text">
|
|
Betrag
|
|
</div>
|
|
</div>
|
|
<input class="form-control" autocomplete="on" type="text" id="betrag" name="betrag" value="@betrag" />
|
|
<div class="input-group-append">
|
|
<div class="input-group-text">€</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
<hr class="mt-2 mb-0" />
|
|
|
|
@* ----- Einzelbuchung: Startdatum und gegebenenfalls Enddatum ----- *@
|
|
@{
|
|
var divisor = Model.SelectedDurationUnit == "Stunden" ? 60 : 1;
|
|
var durationValue = Model.DurationToEdit;
|
|
|
|
var afterValidationState = TempData[TempDataConstants.AfterValidationStateKey];
|
|
|
|
if(Model.SetStartTimeToEndTimeAfterSave && !Model.IsInEditingMode && afterValidationState is bool and false)
|
|
{
|
|
durationValue = Model.NewDuration?.ToString();
|
|
if(Model.NewDuration.HasValue)
|
|
{
|
|
durationValue = (Model.NewDuration / divisor).ToString();
|
|
}
|
|
}
|
|
|
|
var columnWidth = Model.IsEndDateVisible ? "col-md-6" : "col";
|
|
}
|
|
|
|
<div class="form-row">
|
|
<div class="@columnWidth mt-2">
|
|
<div class="input-group">
|
|
<div class="input-group-prepend">
|
|
<span class="input-group-text prepend-input-group-text">
|
|
Startdatum
|
|
</span>
|
|
</div>
|
|
<input class="form-control" type="date" name="Datum" id="sb-start-date-input" onchange="calcDuration('sb', false, true, false)" value="@Model.StartDateToEditJSFormat" />
|
|
</div>
|
|
</div>
|
|
@if(Model.IsEndDateVisible)
|
|
{
|
|
<div class="col-md-6 mt-2">
|
|
<div class="input-group">
|
|
<div class="input-group-prepend">
|
|
<span class="input-group-text prepend-input-group-text">
|
|
Enddatum
|
|
</span>
|
|
</div>
|
|
<input class="form-control" type="date" name="Enddatum" id="sb-end-date-input" onchange="calcDuration('sb', false, false, true)" value="@Model.EndDateToEditJSFormat" />
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="col mt-2">
|
|
<div class="input-group">
|
|
<div class="input-group-prepend">
|
|
<span class="input-group-text">
|
|
Von
|
|
</span>
|
|
</div>
|
|
<input class="form-control" type="time" name="Start" id="sb-start-time-input" onchange="calcDuration('sb', false, true, false)" value="@Model.StartTimeToEdit" />
|
|
<span class="input-group-text rounded-0 border-left-0 border-right-0">
|
|
Bis
|
|
</span>
|
|
<input class="form-control" type="time" name="Ende" id="sb-end-time-input" onchange="calcDuration('sb', false, false, true)" value="@Model.EndTimeToEdit" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@* ----- Einzelbuchung: Dauer ----- *@
|
|
<div class="form-row mt-2">
|
|
<div class="col-md">
|
|
<div class="form-group my-0">
|
|
<div class="input-group">
|
|
<div class="input-group-prepend">
|
|
@{
|
|
var labelText = Model.EinheitZeiterfassung == 1 ? "Dauer (h)" : "Dauer";
|
|
}
|
|
<div class="input-group-text prepend-input-group-text">
|
|
@labelText
|
|
</div>
|
|
</div>
|
|
<input type="text" class="form-control" id="sb-duration-input" name="Dauer" onchange="beiDaueraenderung('sb')" value="@durationValue">
|
|
@if(Model.IsZeiterfassungInStdMin)
|
|
{
|
|
<div class="input-group-append">
|
|
<button id="sb-hours-minutes-dropdown-btn" class="btn btn-outline-primary dropdown-toggle w-100" type="button" data-toggle="dropdown">
|
|
@Model.SelectedDurationUnit
|
|
</button>
|
|
<div class="dropdown-menu">
|
|
<a class="dropdown-item hours-minutes-link" href="#">Minuten</a>
|
|
<a class="dropdown-item hours-minutes-link" href="#">Stunden</a>
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@* ----- Einzelbuchung: Distanz ----- *@
|
|
@if(Model.ShowDistanceField)
|
|
{
|
|
<div class="form-row mt-2">
|
|
<div class="col-md">
|
|
<div class="form-group my-0">
|
|
<div class="input-group">
|
|
<div class="input-group-prepend">
|
|
<div class="input-group-text">
|
|
Gefahrene Kilometer
|
|
</div>
|
|
</div>
|
|
<input class="form-control" autocomplete="on" id="sb-distance-input" name="Distanz" onchange="validateDistanceInput()" value="@Model.DistanceToEdit">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
@* ----- Einzelbuchung: Textbausteine ----- *@
|
|
@if(Model.HasRightToSeeTextModules)
|
|
{
|
|
<script type="text/javascript">
|
|
function textModuleButtonOnClick() {
|
|
$('#tree').load('@Url.Action("LoadUpToDateTextModules")');
|
|
}
|
|
</script>
|
|
<div class="form-row mt-2" id="textmodule-container">
|
|
<div class="col-md">
|
|
<button type="button" class="btn btn-primary form-control" data-toggle="modal" data-target="#textbausteine-popup" id="textbausteine-button" onclick="textModuleButtonOnClick()">Textbausteine</button>
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
@* ----- Einzelbuchung: Dokumentation ----- *@
|
|
<div class="form-row">
|
|
<div class="col-md mt-3">
|
|
@if(Model.NumberOfDokuTypes == 0)
|
|
{
|
|
<div class="form-group my-0">
|
|
<label for="sb-dokufeld-textarea">Dokumentation</label>
|
|
<button type="button" class="btn btn-outline-bewo-dev btn-sm sb-restore-btn" onclick="restoreField('sb-dokufeld-textarea')">
|
|
<i class="fas fa-recycle"></i>
|
|
</button>
|
|
<textarea class="form-control" autocomplete="on" style="overflow: scroll;" name="Dokumentation6" id="sb-dokufeld-textarea">@Model.NoticeToEdit</textarea>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<ul class="nav nav-tabs" role="tab-list">
|
|
@for(var i = 0; i < Model.Dokutypes.Length; i++)
|
|
{
|
|
var currentDokuType = Model.Dokutypes[i];
|
|
|
|
<li class="nav-item">
|
|
<a href="#sb-doku_@i" id="sb-doku_@i-tab" data-toggle="tab" role="tab" class="nav-link@(i == 0 ? " active" : string.Empty)">
|
|
@currentDokuType.DisplayName
|
|
<button type="button" class="btn btn-outline-bewo-dev btn-sm sb-restore-btn" onclick="restoreField('sb-doku-textarea-@i')">
|
|
<i class="fas fa-recycle"></i>
|
|
</button>
|
|
</a>
|
|
|
|
</li>
|
|
}
|
|
</ul>
|
|
<div class="tab-content" id="dokufelderTab">
|
|
@for(var i = 0; i < Model.Dokutypes.Length; i++)
|
|
{
|
|
var textareaName = i + 1 < 1 ? "Dokumentation" : "Dokumentation" + (i + 1);
|
|
|
|
<div class="tab-pane show@(i == 0 ? " active" : string.Empty)" id="sb-doku_@i" role="tabpanel">
|
|
<textarea class="form-control doku-form-control" autocomplete="on" style="overflow: scroll;" id="sb-doku-textarea-@i" name="@textareaName">@Model.NoticeListToEdit[i]</textarea>
|
|
</div>
|
|
}
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
<div class="w-100 mt-2">
|
|
<button type="button" class="btn btn-primary float-right ml-1" id="create-button" onclick="submitSingleBookingForm()">@Model.SubmitButtonValue</button>
|
|
|
|
@if(Model.IsInEditingMode)
|
|
{
|
|
using(Html.BeginForm("ResetEditingMode", "Main", FormMethod.Post))
|
|
{
|
|
<button type="submit" class="btn btn-primary float-right" onclick="showSpinner()">Abbrechen</button>
|
|
}
|
|
}
|
|
else if(TempData[TempDataConstants.IsInTransferModeKey] is bool isInTransferMode && isInTransferMode)
|
|
{
|
|
using(Html.BeginForm("ResetTransferMode", "Main", FormMethod.Post))
|
|
{
|
|
<button type="submit" class="btn btn-primary float-right" onclick="showSpinner()">Abbrechen</button>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
<button type="button" class="btn btn-primary float-right" id="reset-button" onclick="resetSingleBookingForm()">Abbrechen</button>
|
|
}
|
|
</div>
|
|
}
|
|
</div>
|
|
@* /Einzelbuchungsformular *@
|
|
|
|
@* ----- Liste mit den Einträgen und dem Auswahl-Select ----- *@
|
|
<div class="col col-12 col-md-7">
|
|
@if(Model != null)
|
|
{
|
|
if(Model.SelectedSupportConcept != null || Model.SelectedCostBearerSupportConceptOid == -2)
|
|
{
|
|
var defaultStartDate = DateTime.Now.GetFirstOfMonth().ToShortDateString();
|
|
var defaultEndDate = DateTime.Today.ToShortDateString();
|
|
|
|
if (Model.SelectedZeitraum != null && Model.SelectedZeitraum.StartDate.HasValue && Model.SelectedZeitraum.EndDate.HasValue)
|
|
{
|
|
defaultStartDate = Model.SelectedZeitraum.StartDate.Value.ToShortDateString();
|
|
defaultEndDate = Model.SelectedZeitraum.EndDate.Value.ToShortDateString();
|
|
}
|
|
<div class="container-fluid w-100 mt-3 p-0">
|
|
<div class="form-row">
|
|
<div class="col">
|
|
<div class="form-group">
|
|
<select name="Records" class="custom-select" onchange="changeServiceRecordIntervalSelection(this)" id="timeFrameSelect">
|
|
<option value="5"
|
|
@{if(Model.ServiceRecordTimeInterval == ServiceRecordTimeInterval.XTage) { @Html.Raw("selected") }}>
|
|
Letzten x Tage
|
|
</option>
|
|
<option value="0"
|
|
@{if(Model.ServiceRecordTimeInterval == ServiceRecordTimeInterval.LastWeek) { @Html.Raw("selected") }}>
|
|
Letzten 7 Tage
|
|
</option>
|
|
<option value="1"
|
|
@{if(Model.ServiceRecordTimeInterval == ServiceRecordTimeInterval.LastMonth) { @Html.Raw("selected") }}>
|
|
Letzten 30 Tage
|
|
</option>
|
|
<option value="2"
|
|
@{if(Model.ServiceRecordTimeInterval == ServiceRecordTimeInterval.Last3Month) { @Html.Raw("selected") }}>
|
|
Letzten 90 Tage
|
|
</option>
|
|
<option value="3"
|
|
@{if(Model.ServiceRecordTimeInterval == ServiceRecordTimeInterval.All) { @Html.Raw("selected") }}>
|
|
Alle
|
|
</option>
|
|
<option value="6"
|
|
@{if(Model.ServiceRecordTimeInterval == ServiceRecordTimeInterval.ZeitraumWaehlen) { @Html.Raw("selected") }}>
|
|
Zeitraum wählen
|
|
</option>
|
|
<option value="7"
|
|
@{if(Model.ServiceRecordTimeInterval == ServiceRecordTimeInterval.Monatsauswahl) { @Html.Raw("selected") }}>
|
|
Monat wählen
|
|
</option>
|
|
</select>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="col-auto">
|
|
<button type="button" class="btn btn-success w-100" onclick="loadServiceRecords()">
|
|
<span class="fas fa-sync-alt"></span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
@*----- Anzahl Tage: [Nummern-Input] ----- *@
|
|
<div class="form-row" id="last-x-interval-container">
|
|
<div class="col-12">
|
|
<div class="form-group">
|
|
<div class="input-group">
|
|
<div class="input-group-prepend">
|
|
<span class="input-group-text">Anzahl Tage:</span>
|
|
</div>
|
|
<input class="form-control" id="day-count-number" type="number" name="day-count-number" min="0" value="@Model.LastSelectedServiceRecordTimeIntervalDays" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@*----- Zeitraum wählen: [Von-Datum] bis [Bis-Datum] erster des Monats bis aktuelles Datum ----- *@
|
|
<div class="form-row" id="custom-interval-container">
|
|
<div class="col-12">
|
|
<div class="form-group">
|
|
<div class="form-row">
|
|
<div class="col-6">
|
|
<div class="form-group mb-1">
|
|
<div class="input-group date" id="time-frame-start-date-picker" data-target-input="nearest">
|
|
<div class="input-group-prepend">
|
|
<span class="input-group-text">Von</span>
|
|
</div>
|
|
<input type="text" id="time-frame-start-date" name="von" onfocusout="loadServiceRecords()" class="form-control datetimepicker-input" data-target="#time-frame-start-date-picker" value="@defaultStartDate" />
|
|
<div class="input-group-append" data-target="#time-frame-start-date-picker" data-toggle="datetimepicker">
|
|
<div class="input-group-text"><i class="fas fa-calendar-alt"></i></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-6">
|
|
<div class="form-group mb-1">
|
|
<div class="input-group date" id="time-frame-end-date-picker" data-target-input="nearest">
|
|
<div class="input-group-prepend">
|
|
<span class="input-group-text">Bis</span>
|
|
</div>
|
|
<input type="text" id="time-frame-end-date" name="bis" onfocusout="loadServiceRecords()" class="form-control datetimepicker-input" data-target="#time-frame-end-date-picker" value="@defaultEndDate" />
|
|
<div class="input-group-append" data-target="#time-frame-end-date-picker" data-toggle="datetimepicker">
|
|
<div class="input-group-text"><i class="fas fa-calendar-alt"></i></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-row" id="month-interval-container">
|
|
<div class="col-6">
|
|
<div class="form-group">
|
|
<div class="input-group">
|
|
<div class="input-group-prepend">
|
|
<span class="input-group-text">Monat</span>
|
|
</div>
|
|
<select name="month-select" class="custom-select" id="month-select" onchange="loadServiceRecords()">
|
|
<option value="1"
|
|
@{if(Model.LastSelectedServiceRecordMonth.Month == 1) { @Html.Raw("selected") } }>
|
|
Januar
|
|
</option>
|
|
<option value="2"
|
|
@{if(Model.LastSelectedServiceRecordMonth.Month == 2) { @Html.Raw("selected") } }>
|
|
Februar
|
|
</option>
|
|
<option value="3"
|
|
@{ if(Model.LastSelectedServiceRecordMonth.Month == 3) { @Html.Raw("selected") } }>
|
|
März
|
|
</option>
|
|
<option value="4"
|
|
@{if(Model.LastSelectedServiceRecordMonth.Month == 4) { @Html.Raw("selected") }}>
|
|
April
|
|
</option>
|
|
<option value="5"
|
|
@{if(Model.LastSelectedServiceRecordMonth.Month == 5) { @Html.Raw("selected") }}>
|
|
Mai
|
|
</option>
|
|
<option value="6"
|
|
@{if(Model.LastSelectedServiceRecordMonth.Month == 6) { @Html.Raw("selected") }}>
|
|
Juni
|
|
</option>
|
|
<option value="7"
|
|
@{if(Model.LastSelectedServiceRecordMonth.Month == 7) { @Html.Raw("selected") }}>
|
|
Juli
|
|
</option>
|
|
<option value="8"
|
|
@{if(Model.LastSelectedServiceRecordMonth.Month == 8) { @Html.Raw("selected") }}>
|
|
August
|
|
</option>
|
|
<option value="9"
|
|
@{if(Model.LastSelectedServiceRecordMonth.Month == 9) { @Html.Raw("selected") }}>
|
|
September
|
|
</option>
|
|
<option value="10"
|
|
@{if(Model.LastSelectedServiceRecordMonth.Month == 10) { @Html.Raw("selected") }}>
|
|
Oktober
|
|
</option>
|
|
<option value="11"
|
|
@{if(Model.LastSelectedServiceRecordMonth.Month == 11) { @Html.Raw("selected") }}>
|
|
November
|
|
</option>
|
|
<option value="12"
|
|
@{if(Model.LastSelectedServiceRecordMonth.Month == 12) { @Html.Raw("selected") }}>
|
|
Dezember
|
|
</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-6">
|
|
<div class="form-group">
|
|
<div class="input-group">
|
|
<div class="input-group-prepend">
|
|
<span class="input-group-text">Jahr</span>
|
|
</div>
|
|
<select class="custom-select" name="year-select" id="year-select" onchange="loadServiceRecords()">
|
|
@{
|
|
var heuer = DateTime.Today.Year;
|
|
for(var year = heuer + 1; year >= heuer - 10; year--)
|
|
{
|
|
<option value="@year"
|
|
@{if(Model.LastSelectedServiceRecordMonth.Year == year) { @Html.Raw("selected") }}>
|
|
@year
|
|
</option>
|
|
}
|
|
}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
<hr class="mt-2"/>
|
|
|
|
<div class="container-fluid mt-3" id="service-record-list-container">
|
|
@Html.Partial("ServiceRecordListPartial", Model)
|
|
</div>
|
|
}
|
|
</div>
|
|
@* ----- /Liste mit den Einträgen und dem Auswahl-Select ----- *@
|
|
</div>
|
|
|
|
@using(Html.BeginForm("DeleteSignature", "Main", FormMethod.Post, new { id = "delete-signature-form" }))
|
|
{
|
|
<input type="hidden" name="sr-signature-to-del-oid" id="sr-signature-to-del-oid-input" />
|
|
<input type="hidden" name="sr-sig-to-del-record-oid" id="sr-sig-to-del-record-oid-input" />
|
|
} |