NullPointerException bei Zusagen/Absagen von Serienterminen gefixt. Terminanzeige im HomeView hat "In Zeiterfassung übertragen"-Icons Terminanzeige Termine werden wie folgt dargestellt: [Datum]: [Betreff] MoK: Auswahl des Ladeintervalls der Zeiterfassungseinträge ist standardmäßig auf "Letzte 7 Tage" und die Änderung wird nur in der Session gespeichert. Termine in die Zeiterfassung übertragen
972 lines
55 KiB
Plaintext
972 lines
55 KiB
Plaintext
@using BeWoPlanerMobil.Models
|
|
@using BeWoPlanerMobil.Util
|
|
@using BS.Shared
|
|
@using BS.Shared.Extensions
|
|
@model MainModel
|
|
|
|
<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);
|
|
});
|
|
});
|
|
</script>
|
|
|
|
<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" }))
|
|
{
|
|
var selectedSuportConceptTimeSpanColorClass = Model.SelectedSupportConceptListObject.IsAboutToExpire ? "text-bewo-is-about-to-expire" : Model.SelectedSupportConceptListObject.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.SelectedSupportConceptListObject.NameAndDateOfBirth</h5>
|
|
</div>
|
|
<p class="mb-1 text-left @selectedSuportConceptTimeSpanColorClass" id="selectedSupportConceptInfo">
|
|
@Model.SelectedSupportConceptListObject.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" 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.SelectedSupportConceptListObject.CostBearer2SupportConceptOid">
|
|
}
|
|
|
|
using(Html.BeginForm("CreateOrUpdateServiceRecord", "Main", FormMethod.Post, new { onreset = "serviceDescriptionSelectOnReset('category-select', 'leistung-select', 'textmodule-container', 'tree')", 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</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: Leistungskategorie -->
|
|
<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">
|
|
Kategorie
|
|
</div>
|
|
</div>
|
|
@Html.DropDownListFor(m => m.SelectedServiceCategoryOid, Model.ServiceCategoryListItems, new { onchange = "loadServiceDescriptions('category-select', 'leistung-select', 'textmodule-container', 'tree')", @class = "custom-select", Id = "category-select" })
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Einzelbuchung: Leistung -->
|
|
<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">
|
|
Leistung
|
|
</div>
|
|
</div>
|
|
<select class="custom-select" id="leistung-select" name="ServiceDescription" onchange="setServiceDescription('leistung-select')">
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Einzelbuchung: Startdatum -->
|
|
<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;
|
|
|
|
if(Model.SetStartTimeToEndTimeAfterSave && !Model.IsInEditingMode)
|
|
{
|
|
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">
|
|
<div class="input-group-text prepend-input-group-text">
|
|
Dauer
|
|
</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>
|
|
}
|
|
@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>
|
|
}
|
|
<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" 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" 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) {
|
|
logError(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) {
|
|
logError(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) {
|
|
logError(error);
|
|
hideSpinner();
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<div class="container-fluid mt-3">
|
|
@{
|
|
foreach(var serviceRecord in Model.ServiceRecords)
|
|
{
|
|
if(serviceRecord.Start == null || serviceRecord.End == null)
|
|
{
|
|
continue;
|
|
}
|
|
|
|
var start = serviceRecord.Start.Value;
|
|
var end = serviceRecord.End.Value;
|
|
var hasSignatureStr = serviceRecord.SignatureOid.HasValue ? "JA" : "NEIN";
|
|
|
|
var duration = (end - start).TotalMinutes;
|
|
var roundedDuration = MobileUtils.GetDecimalValueWithMaxDecimal(serviceRecord.RoundedDuration, 2);
|
|
|
|
if(serviceRecord.ServiceDescription.Category.Percentage > 0 && serviceRecord.ServiceDescription.Category.Percentage < 100)
|
|
{
|
|
roundedDuration = roundedDuration * serviceRecord.ServiceDescription.Category.Percentage / 100;
|
|
}
|
|
|
|
var durationStr = serviceRecord.GroupOid.HasValue ? string.Format("{0:###0.#} ({0:###0.#})", roundedDuration) : $"{duration:###0.#} ({roundedDuration:###0.#})";
|
|
|
|
var goalsString = string.Empty;
|
|
|
|
if(serviceRecord.Goals != null && serviceRecord.Goals.Count > 0)
|
|
{
|
|
foreach(var goal in serviceRecord.Goals)
|
|
{
|
|
goalsString += goal.TypeDescription;
|
|
|
|
if(serviceRecord.Goals.IndexOf(goal) < serviceRecord.Goals.Count - 1)
|
|
{
|
|
goalsString += ", ";
|
|
}
|
|
}
|
|
}
|
|
|
|
var cardBackground = serviceRecord.GroupOid.HasValue ? "bg-bewo-group-booking" : string.Empty;
|
|
|
|
<div class="row mb-3">
|
|
<div class="card w-100 @cardBackground">
|
|
<div class="card-header" onclick="cardHeaderClick('#chevron-@serviceRecord.ServiceRecordOid', '#collapse-service-record-@serviceRecord.ServiceRecordOid')">
|
|
<div class="d-inline-flex">
|
|
<i class="fas fa-chevron-down h-100 text-primary" id="chevron-@serviceRecord.ServiceRecordOid"></i>
|
|
</div>
|
|
<div class="p2 d-inline-flex text-primary h-100">
|
|
<button type="button" class="btn btn-link">
|
|
@MainModel.GetServiceRecordTimeHeader(serviceRecord, true)
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div id="collapse-service-record-@serviceRecord.ServiceRecordOid" class="collapse">
|
|
<div class="card-body">
|
|
<div class="container">
|
|
<div class="row mb-3">
|
|
@if(Model.HasRightToEditServiceRecord(serviceRecord))
|
|
{
|
|
using(Html.BeginForm("SelectRecordToEdit", "Main", FormMethod.Post))
|
|
{
|
|
<div class="col-auto">
|
|
<button type="submit" class="btn btn-primary">
|
|
<span class="fas fa-edit"></span>
|
|
</button>
|
|
<input type="hidden" name="service-record-oid-holder" value="@serviceRecord.ServiceRecordOid" />
|
|
</div>
|
|
}
|
|
}
|
|
|
|
@if(MainModel.IsAllowedToDeleteServiceRecord(serviceRecord))
|
|
{
|
|
<div class="col-auto">
|
|
<button type="button" class="btn btn-primary" onclick="deleteServiceRecord(@serviceRecord.ServiceRecordOid)">
|
|
<span class="fas fa-trash-alt"></span>
|
|
</button>
|
|
</div>
|
|
}
|
|
|
|
@if(Model.ShowSignature && !serviceRecord.SignatureOid.HasValue)
|
|
{
|
|
<div class="col-auto">
|
|
<button type="button" class="btn btn-primary" onclick="initializeSignature(@serviceRecord.ServiceRecordOid)">
|
|
<span class="fas fa-signature"></span>
|
|
</button>
|
|
</div>
|
|
}
|
|
else if(Model.ShowSignature && serviceRecord.SignatureOid.HasValue)
|
|
{
|
|
<div class="col-auto">
|
|
<button type="submit" data-toggle="modal" class="btn btn-primary" onclick="getSignatureImage(@serviceRecord.ServiceRecordOid.Value, @serviceRecord.SignatureOid.Value)">
|
|
<span class="fas fa-file-contract"></span>
|
|
</button>
|
|
</div>
|
|
}
|
|
</div>
|
|
<div class="row">
|
|
<div class="col text-secondary">
|
|
Minuten (gerundet):
|
|
</div>
|
|
<div class="col text-info">
|
|
@durationStr
|
|
</div>
|
|
</div>
|
|
@if(Model.ShowDistanceField && serviceRecord.DistanceInMeter != null && serviceRecord.DistanceInMeter.Value > 0)
|
|
{
|
|
<div class="row">
|
|
<div class="col text-secondary">
|
|
Gefahrene Kilometer:
|
|
</div>
|
|
<div class="col">
|
|
@serviceRecord.DistanceInMeter.ToString()
|
|
</div>
|
|
</div>
|
|
}
|
|
@if(serviceRecord.Goals != null && serviceRecord.Goals.Count > 0)
|
|
{
|
|
<div class="row">
|
|
<div class="col text-secondary">
|
|
Ziele:
|
|
</div>
|
|
<div class="col">
|
|
@goalsString
|
|
</div>
|
|
</div>
|
|
}
|
|
<div class="row">
|
|
<div class="col text-secondary">
|
|
Leistungskategorie:
|
|
</div>
|
|
<div class="col">
|
|
@serviceRecord.ServiceDescription.CategoryName
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col text-secondary">
|
|
Leistung:
|
|
</div>
|
|
<div class="col">
|
|
@serviceRecord.ServiceDescription.Name
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col text-secondary">
|
|
Angelegt für:
|
|
</div>
|
|
<div class="col">
|
|
@serviceRecord.Employee.ToString()
|
|
</div>
|
|
</div>
|
|
|
|
@if(AbstractModel.ShowServiceRecordInsertedOn)
|
|
{
|
|
<div class="row">
|
|
<div class="col text-secondary">
|
|
Angelegt von:
|
|
</div>
|
|
<div class="col">
|
|
@serviceRecord.InsUser
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col text-secondary">
|
|
Angelegt am:
|
|
</div>
|
|
<div class="col">
|
|
@serviceRecord.InsertedOn
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
@{
|
|
var header1 = "Dokumentation";
|
|
if(Model.NumberOfDokuTypes >= 1)
|
|
{
|
|
header1 = Model.Dokutypes[0].TypeDescription;
|
|
}
|
|
|
|
<div class="row">
|
|
<div class="col text-secondary">
|
|
@header1:
|
|
</div>
|
|
<div class="col">
|
|
@serviceRecord.Notice
|
|
</div>
|
|
</div>
|
|
|
|
for(var i = 1; i < serviceRecord.NoticeList.Count; i++)
|
|
{
|
|
var notice = serviceRecord.NoticeList[i];
|
|
|
|
if(string.IsNullOrWhiteSpace(notice) || Model.NumberOfDokuTypes <= i)
|
|
{
|
|
continue;
|
|
}
|
|
|
|
var header = $"Dokumentation {i + 1}";
|
|
|
|
if(Model.NumberOfDokuTypes >= 2)
|
|
{
|
|
if(Model.NumberOfDokuTypes <= i)
|
|
{
|
|
continue;
|
|
}
|
|
|
|
header = Model.Dokutypes[i].TypeDescription;
|
|
}
|
|
<div class="row">
|
|
<div class="col text-secondary">
|
|
@header:
|
|
</div>
|
|
<div class="col">
|
|
@notice
|
|
</div>
|
|
</div>
|
|
|
|
}
|
|
}
|
|
<div class="row">
|
|
<div class="col text-secondary">
|
|
Unterschrieben:
|
|
</div>
|
|
<div class="col">
|
|
@hasSignatureStr
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
}
|
|
</div>
|
|
}
|
|
</div>
|
|
<!-- /Liste mit den Einträgen und dem Auswahl-Select -->
|
|
|
|
<!-- Ziele/Maßnahmen-Popup -->
|
|
<div class="modal" tabindex="-1" role="dialog" id="goal-popup">
|
|
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h6 class="modal-title">Ziele und Maßnahmen</h6>
|
|
<button type="button" class="close" data-dismiss="modal" onclick="resetGoalTreeSearch()">
|
|
<span>×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body pb-0">
|
|
<div class="container-fluid px-0">
|
|
<div class="input-group mb-3">
|
|
<input class="form-control w-100" type="text" placeholder="Suchen..." oninput="goalTreeSearchOnChangeV2()" id="goal-search-input" />
|
|
<div class="input-group-append">
|
|
<button class="btn btn-outline-secondary" type="button" onclick="resetGoalTreeSearch()">
|
|
<span class="fas fa-times-circle"></span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="goals-tree">
|
|
@Html.Partial("GoalTreePartial", Model)
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-primary" data-dismiss="modal">Schließen</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div> |