ServiceRecords werden wie im FaC validiert, d.h. dass Arbeitszeiten und Pausenzeiten keine Überschneidungswarnung bekommen.
790 lines
44 KiB
Plaintext
790 lines
44 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>
|
|
$(document).ready(function () {
|
|
$("#hours-minutes-dropdown-btn").on("click", function() {
|
|
$("#hours-minutes-dropdown-btn").data("text", $("#hours-minutes-dropdown-btn").text().replaceAll(/\s/g, ""));
|
|
});
|
|
|
|
$(".hours-minutes-link").on("click", function () {
|
|
var previousText = $("#hours-minutes-dropdown-btn").data("text");
|
|
var currentText = $(this).text().replaceAll(/\s/g, "");
|
|
|
|
if(previousText === currentText) {
|
|
return;
|
|
}
|
|
|
|
var buttonText = $(this).text();
|
|
$("#hours-minutes-dropdown-btn").text(buttonText);
|
|
|
|
setInputFilter('duration', 'distance', 'hours-minutes-dropdown-btn');
|
|
|
|
$.get('@Url.Action("ToggleDurationUnit")', { isInHoursMode: buttonText === "Stunden" });
|
|
|
|
calculateDuration(true, 'start-time', 'end-time', 'duration', 'hours-minutes-dropdown-btn', 'start-date-picker', 'end-date-picker', false, false);
|
|
});
|
|
});
|
|
|
|
function deleteSigntarue(signatureOid, serviceRecordOid, customerName, dateOfRecord) {
|
|
try {
|
|
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);
|
|
} catch(error) {
|
|
showErrorPopup(error);
|
|
}
|
|
}
|
|
|
|
function resetSingleBookingForm() {
|
|
try {
|
|
showSpinner();
|
|
$("#singleBookingForm").trigger("reset");
|
|
|
|
var test = $("#has-any-rating-types").val().toLowerCase() === "true";
|
|
|
|
if (test) {
|
|
$(".goal-rating-badge").text("Bewerten");
|
|
} else {
|
|
$(".goal-rating-badge").text("");
|
|
}
|
|
|
|
$("#reset-single-booking-form-form").submit();
|
|
} catch(error) {
|
|
showErrorPopup(error);
|
|
}
|
|
}
|
|
</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-dark";
|
|
<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" data-toggle="modal" data-target="#supportConceptList">
|
|
<div class="d-flex">
|
|
<h5 class="mb-1 text-dark text-left" id="selectedSupportConceptCustomerInfo">@Model.SelectedCostBearer2SupportConceptRelListObject.NameAndDateOfBirth</h5>
|
|
</div>
|
|
<p class="mb-1 text-left @selectedSuportConceptTimeSpanColorClass" id="selectedSupportConceptInfo">
|
|
@Model.SelectedCostBearer2SupportConceptRelListObject.SupportConceptTimeSpan
|
|
</p>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
@if(Model.CostBearer2SupportConceptOid != null && Model.CostBearer2SupportConceptOid > 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 modal-dialog-centered-->
|
|
<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">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" 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="text" class="d-none" name="CostBearer2SupportConceptOid" id="CostBearer2SupportConceptOid" value="@Model.SelectedCostBearer2SupportConceptRelListObject.CostBearer2SupportConceptOid">
|
|
}
|
|
|
|
if(Model.IsCustomerAbsence)
|
|
{
|
|
<div class="container mt-3 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">@Model.CustomerAbsenceInfo</p>
|
|
</span>
|
|
</div>
|
|
}
|
|
|
|
using(Html.BeginForm("CreateOrUpdateServiceRecord", "Main", FormMethod.Post, new { id = "singleBookingForm" }))
|
|
{
|
|
<div class="mt-3">
|
|
@* ----- Einzelbuchung: Mitarbeiter ----- *@
|
|
<div class="form-row">
|
|
<div class="col-md">
|
|
<div class="form-group my-2">
|
|
<div class="input-group">
|
|
<div class="input-group-prepend">
|
|
<div class="input-group-text prepend-input-group-text">Mitarbeiter</div>
|
|
</div>
|
|
@Html.DropDownListFor(m => m.SelectedEmployeeOid, Model.EmployeeListItems, new { id = "employeesDropDown", @class = "custom-select", onchange = "setSelectedEmployee()" })
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@if(Model.SelectedSupportConcept != null && Model.SelectedSupportConcept.Goals.Any())
|
|
{
|
|
<!-- Einzelbuchung: Ziele -->
|
|
<div class="form-row">
|
|
<div class="col-md">
|
|
<button type="button" class="btn btn-primary form-control my-3" 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 w-100 mt-1 max-vw-50" 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">
|
|
<div class="custom-control custom-checkbox custom-control-inline">
|
|
<input type="checkbox" class="custom-control-input" name="marker-cb" id="marker-cb" @markerCheckedValue />
|
|
<label class="custom-control-label" for="marker-cb">Marker</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
<div class="form-row">
|
|
<div class="col-md">
|
|
<hr />
|
|
</div>
|
|
</div>
|
|
|
|
@* ----- Einzelbuchung: Startdatum und gegebenenfalls Enddatum ----- *@
|
|
<div class="form-row">
|
|
<div class="col-md">
|
|
<div class="form-group my-2">
|
|
<div class="input-group date" id="start-date-picker" data-target-input="nearest">
|
|
<div class="input-group-prepend">
|
|
<div class="input-group-text prepend-input-group-text">
|
|
Startdatum
|
|
</div>
|
|
</div>
|
|
<input type="text" id="start-date" name="Datum" class="form-control datetimepicker-input" data-target="#start-date-picker" data-toggle="datetimepicker" value="@Model.StartDateToEdit" />
|
|
<div class="input-group-append" data-target="#start-date-picker" data-toggle="datetimepicker">
|
|
<div class="input-group-text px-2">
|
|
<i class="fas fa-calendar-alt"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@* ----- Einzelbuchung: Enddatum ----- *@
|
|
@if(Model.IsEndDateVisible)
|
|
{
|
|
<div class="col-md">
|
|
<div class="form-group my-2">
|
|
<div class="input-group date" id="end-date-picker" data-target-input="nearest">
|
|
<div class="input-group-prepend">
|
|
<div class="input-group-text prepend-input-group-text">
|
|
Enddatum
|
|
</div>
|
|
</div>
|
|
<input type="text" id="end-date" name="Enddatum" class="form-control datetimepicker-input" data-target="#end-date-picker" data-toggle="datetimepicker" value="@Model.EndDateToEdit" />
|
|
<div class="input-group-append" data-target="#end-date-picker" data-toggle="datetimepicker">
|
|
<div class="input-group-text px-2">
|
|
<i class="fas fa-calendar-alt"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
|
|
@* ----- Einzelbuchung: Von ----- *@
|
|
<div class="form-row">
|
|
@{
|
|
var startTimeValue = Model.StartTimeToEdit;
|
|
var endTimeValue = Model.EndTimeToEdit;
|
|
var divisor = Model.SelectedDurationUnit == "Stunden" ? 60 : 1;
|
|
var durationValue = Model.DurationToEdit;
|
|
|
|
var afterValidationState = TempData[TempDataConstants.AfterValidationStateKey];
|
|
|
|
if(Model.SetStartTimeToEndTimeAfterSave && !Model.IsInEditingMode && afterValidationState is bool isAfterValidation && isAfterValidation == false)
|
|
{
|
|
startTimeValue = Model.NewStartTime;
|
|
endTimeValue = Model.NewEndTime;
|
|
durationValue = Model.NewDuration?.ToString();
|
|
if(Model.NewDuration.HasValue)
|
|
{
|
|
durationValue = (Model.NewDuration / divisor).ToString();
|
|
}
|
|
}
|
|
}
|
|
<div class="col-md">
|
|
<div class="form-group my-2">
|
|
<div class="input-group date" id="start-time-picker" data-target-input="nearest">
|
|
<div class="input-group-prepend">
|
|
<div class="input-group-text sm-prepend-input-group-text px-2">
|
|
Von
|
|
</div>
|
|
</div>
|
|
<input type="text" id="start-time" name="Start" class="form-control datetimepicker-input" data-target="#start-time-picker" value="@startTimeValue" />
|
|
<div class="input-group-append" data-target="#start-time-picker" data-toggle="datetimepicker">
|
|
<div class="input-group-text px-2">
|
|
<i class="fas fa-clock"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@* ----- Einzelbuchung: Bis ----- *@
|
|
<div class="col-md">
|
|
<div class="form-group my-2">
|
|
<div class="input-group date" id="end-time-picker" data-target-input="nearest">
|
|
<div class="input-group-prepend">
|
|
<div class="input-group-text sm-prepend-input-group-text px-2">
|
|
Bis
|
|
</div>
|
|
</div>
|
|
<input type="text" id="end-time" name="Ende" class="form-control datetimepicker-input" data-target="#end-time-picker" value="@endTimeValue" />
|
|
<div class="input-group-append" data-target="#end-time-picker" data-toggle="datetimepicker">
|
|
<div class="input-group-text px-2">
|
|
<i class="fas fa-clock"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@* ----- Einzelbuchung: Dauer ----- *@
|
|
<div class="form-row">
|
|
<div class="col-md">
|
|
<div class="form-group my-2">
|
|
<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="duration" name="Dauer" onchange="onDurationChange('start-time', 'end-time', 'start-date', 'end-date', 'duration', 'hours-minutes-dropdown-btn', 'start-date-picker', 'end-date-picker')" value="@durationValue">
|
|
@if(Model.IsZeiterfassungInStdMin)
|
|
{
|
|
<div class="input-group-append">
|
|
<button id="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 w-100">
|
|
<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">
|
|
<div class="col-md">
|
|
<div class="form-group my-2">
|
|
<div class="input-group">
|
|
<div class="input-group-prepend">
|
|
<div class="input-group-text">
|
|
Gefahrene Kilometer
|
|
</div>
|
|
</div>
|
|
<input class="form-control" id="distance" name="Distanz" onchange="validateDistanceInput()" value="@Model.DistanceToEdit">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
@* ----- Einzelbuchung: Textbausteine ----- *@
|
|
@if(AbstractModel.HasRightToSeeTextModules)
|
|
{
|
|
<script>
|
|
function textModuleButtonOnClick() {
|
|
$('#tree').load('@Url.Action("LoadUpToDateTextModules")');
|
|
}
|
|
</script>
|
|
<!-- Einzelbuchung: Textbausteine -->
|
|
<div class="form-row" id="textmodule-container">
|
|
<div class="col-md">
|
|
<button type="button" class="btn btn-primary form-control mt-3" 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">
|
|
<label for="dokufeld">Dokumentation</label>
|
|
<textarea class="form-control" style="overflow: scroll;" name="Dokumentation6" id="dokufeld">@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="#doku_@i" id="doku_@i-tab" data-toggle="tab" role="tab" aria-controls="doku_@i" class="nav-link@(i == 0 ? " active" : string.Empty)" aria-selected="true">
|
|
@currentDokuType.DisplayName
|
|
</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="doku_@i" role="tabpanel" aria-labelledby="doku_@i-tab">
|
|
<textarea class="form-control doku-form-control" style="overflow: scroll;" id="doku-textarea-@i" name="@textareaName">@Model.NoticeListToEdit[i]</textarea>
|
|
</div>
|
|
}
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
<div class="d-flex bd-highlight mt-3">
|
|
<div class="mr-auto bd-highlight">
|
|
|
|
</div>
|
|
@if(Model.IsInEditingMode)
|
|
{
|
|
using(Html.BeginForm("ResetEditingMode", "Main", FormMethod.Post))
|
|
{
|
|
<button type="submit" class="btn btn-primary" 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" onclick="showSpinner()">Abbrechen</button>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
<div class="ml-3 bd-highlight">
|
|
<button type="button" class="btn btn-primary" id="reset-button" onclick="resetSingleBookingForm()">Abbrechen</button>
|
|
</div>
|
|
}
|
|
|
|
<div class="ml-3 bd-highlight">
|
|
<button type="button" class="btn btn-primary" id="create-button" onclick="submitSingleBookingForm()">@Model.SubmitButtonValue</button>
|
|
</div>
|
|
</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.CostBearer2SupportConceptOid == -2)
|
|
{
|
|
<div class="container-fluid w-100 mt-3 p-0">
|
|
@using(Html.BeginForm("LoadServiceRecords", "Main", FormMethod.Post, new { id = "selectServiceRecordForm" }))
|
|
{
|
|
<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="showSpinner();$('#selectServiceRecordForm').submit();">
|
|
<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 ----- *@
|
|
var defaultStartDate = DateTime.Now.GetFirstOfMonth().ToShortDateString();
|
|
var defaultEndDate = DateTime.Today.ToShortDateString();
|
|
<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" 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" 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">
|
|
<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">
|
|
@{
|
|
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>
|
|
}
|
|
|
|
<script>
|
|
@{
|
|
if(Model.SelectedSupportConcept != null || Model.CostBearer2SupportConceptOid == -2)
|
|
{
|
|
<text>
|
|
try {
|
|
initializeIntervalSelection();
|
|
} catch (error) {
|
|
showErrorPopup(error);
|
|
}
|
|
</text>
|
|
}
|
|
}
|
|
|
|
function initializeIntervalSelection() {
|
|
try {
|
|
var selectedOption = $("#timeFrameSelect").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;
|
|
}
|
|
} catch (error) {
|
|
showErrorPopup(error);
|
|
}
|
|
}
|
|
|
|
function changeServiceRecordIntervalSelection(select) {
|
|
var form = $("#selectServiceRecordForm");
|
|
|
|
try {
|
|
var selectedOption = $(select).val();
|
|
|
|
showSpinner();
|
|
|
|
switch (selectedOption) {
|
|
case "0":
|
|
$("#last-x-interval-container, #custom-interval-container, #month-interval-container").hide();
|
|
form.submit();
|
|
break;
|
|
case "1":
|
|
$("#last-x-interval-container, #custom-interval-container, #month-interval-container").hide();
|
|
form.submit();
|
|
break;
|
|
case "2":
|
|
$("#last-x-interval-container, #custom-interval-container, #month-interval-container").hide();
|
|
form.submit();
|
|
break;
|
|
case "3":
|
|
$("#last-x-interval-container, #custom-interval-container, #month-interval-container").hide();
|
|
form.submit();
|
|
break;
|
|
case "4":
|
|
$("#last-x-interval-container, #custom-interval-container, #month-interval-container").hide();
|
|
form.submit();
|
|
break;
|
|
case "5":
|
|
$("#last-x-interval-container").show();
|
|
$("#custom-interval-container, #month-interval-container").hide();
|
|
hideSpinner();
|
|
break;
|
|
case "6":
|
|
$("#custom-interval-container").show();
|
|
$("#last-x-interval-container, #month-interval-container").hide();
|
|
hideSpinner();
|
|
break;
|
|
case "7":
|
|
$("#month-interval-container").show();
|
|
$("#last-x-interval-container, #custom-interval-container").hide();
|
|
hideSpinner();
|
|
break;
|
|
}
|
|
} catch (error) {
|
|
showErrorPopup(error);
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<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" />
|
|
} |