Termine werden beim Anlegen und Bearbeiten auf Überschneidungen geprüft und es wird gewarnt, wenn dem so ist. Das Unterschriftenfeld hat jetzt eine Breite von 90% des Browsers.
1601 lines
88 KiB
Plaintext
1601 lines
88 KiB
Plaintext
@using BeWoPlanerMobil.Models;
|
|
@using BeWoPlanerMobil.Util;
|
|
|
|
@model MainModel
|
|
@{
|
|
ViewBag.Title = "BeWoPlaner Mobil";
|
|
|
|
if (TempData[MobileUtils.TempDataLoginStateKey] is BeWoLoginState loginState && loginState.Message != null)
|
|
{
|
|
var loginStateMessage = new HtmlString(loginState.Message.Replace("\n", "<br/>").Replace("\"", "\\"));
|
|
|
|
<script>
|
|
showMessagePopupWithHtml("Warnung", "@loginStateMessage");
|
|
</script>
|
|
}
|
|
}
|
|
|
|
<script>
|
|
nodeIds = [];
|
|
|
|
$(function() {
|
|
$("#start-date-picker").datetimepicker({
|
|
locale: "de",
|
|
format: "L"
|
|
});
|
|
|
|
$("#end-date-picker").datetimepicker({
|
|
locale: "de",
|
|
format: "L"
|
|
});
|
|
|
|
$("#start-time-picker").datetimepicker({
|
|
locale: "de",
|
|
format: "LT"
|
|
});
|
|
|
|
if ($("#end-time-picker").length !== 0) {
|
|
$("#end-time-picker").datetimepicker({
|
|
locale: "de",
|
|
format: "LT"
|
|
});
|
|
}
|
|
});
|
|
|
|
$(document).ready(function () {
|
|
var supportConceptOid = parseInt($("#CostBearer2SupportConceptOid").val());
|
|
|
|
var isSupportConceptSelected = supportConceptOid !== -1;
|
|
|
|
$("#employeesDropDown, #category-select, #leistung-select, #start-date, #end-date, #start-time, #end-time, #duration, #distance, #textbausteine-button, #goals-button, textarea, #reset-button, #create-button, #statistics-button, #timeFrameSelect, #hours-minutes-dropdown-btn").prop("disabled", (isSupportConceptSelected ? false : true));
|
|
|
|
if(getIsInGroupBookingMode()) {
|
|
var hasSelectedSupportConcepts = "@Model.SelectedConceptCostBearerRelations.Any()".toLowerCase() === "true";
|
|
|
|
$("#employees-button, #category-select, #leistung-select, #start-date, #end-date, #start-time, #end-time, #duration, #distance, textarea, #reset-button, #create-button, #textbausteine-button, #hours-minutes-dropdown-btn").prop("disabled", (hasSelectedSupportConcepts ? false : true));
|
|
}
|
|
|
|
loadServiceDescriptions();
|
|
|
|
$("#start-time-picker, #end-time-picker").on("change.datetimepicker", ({ date, oldDate }) => {
|
|
calculateDuration(false);
|
|
});
|
|
|
|
$("#start-date-picker").on("change.datetimepicker", ({ date, oldDate }) => {
|
|
calculateDuration(false);
|
|
});
|
|
|
|
if ($("#end-time-picker").length !== 0) {
|
|
$("#end-date-picker").on("change.datetimepicker",
|
|
({ date, oldDate }) => {
|
|
calculateDuration(false);
|
|
});
|
|
}
|
|
|
|
if ($("#signature-img-popup").length !== 0) {
|
|
$("#signature-img-popup").modal(
|
|
{
|
|
backdrop: "static",
|
|
keyboard: false
|
|
}
|
|
);
|
|
}
|
|
|
|
resizeCanvas();
|
|
|
|
@if (Model != null && Model.IsInEditingMode)
|
|
{
|
|
<text>
|
|
$("#start-time-picker").trigger("change");
|
|
</text>
|
|
}
|
|
|
|
@if(Model != null && Model.SelectedSupportConcept != null && Model.SelectedSupportConcept.Goals.Any())
|
|
{
|
|
<text>
|
|
initializeGoalsTreeView();
|
|
</text>
|
|
}
|
|
|
|
setInputFilter();
|
|
});
|
|
|
|
function setInputFilter() {
|
|
$("#duration, #distance").inputFilter(function(value) {
|
|
var result = /^\d*$/;
|
|
var dropdownButton = $("#hours-minutes-dropdown-btn");
|
|
|
|
if (dropdownButton.length && dropdownButton.text() === "Stunden") {
|
|
result = /^-?\d*[.,]?\d*$/;
|
|
}
|
|
|
|
return result.test(value);
|
|
});
|
|
}
|
|
|
|
(function($) {
|
|
$.fn.inputFilter = function(inputFilter) {
|
|
return this.on("input keydown keyup mouseup select mousedown contextmenu drop", function() {
|
|
if(inputFilter(this.value)) {
|
|
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() {
|
|
resizeCanvas();
|
|
});
|
|
|
|
function resizeCanvas() {
|
|
if($("#sketch-pad").length !== 0) {
|
|
var rowWidth = $("#canvas-row").innerWidth();
|
|
var canvasWidth = $("#sketch-pad").innerWidth();
|
|
|
|
var newWidth = rowWidth;
|
|
|
|
if (newWidth !== canvasWidth) {
|
|
$("#sketch-pad").prop("width", newWidth);
|
|
new Signature();
|
|
}
|
|
}
|
|
}
|
|
|
|
function getSetServiceRecordEmployeeUrl() {
|
|
return "@Url.Action("SetServiceRecordEmployee")";
|
|
}
|
|
|
|
function getLoadServiceCategoriesUrl() {
|
|
return "@Url.Action("LoadServiceCategories")";
|
|
}
|
|
|
|
function getSetServiceDescriptionUrl() {
|
|
return "@Url.Action("SetServiceDescription")";
|
|
}
|
|
|
|
function getLoadTextbausteineForServiceCategoryUrl() {
|
|
return "@Url.Action("LoadTextbausteineForServiceCategory")";
|
|
}
|
|
|
|
function getLoadCompleteTextbausteinByOidUrl() {
|
|
return "@Url.Action("LoadCompleteTextbausteinByOid")";
|
|
}
|
|
|
|
function getAddSupportConceptsLink() {
|
|
return "@Url.Action("AddSupportConceptCostBearerRelationsToGroupBooking")";
|
|
}
|
|
|
|
function getNumberOfDokutypes() {
|
|
return @Model.NumberOfDokuTypes;
|
|
}
|
|
|
|
function getRedirectLink() {
|
|
return '@Url.Action("Index", "Login")';
|
|
}
|
|
|
|
function getRemoveCb2ScRelFromGroupBookingUrl() {
|
|
return '@Url.Action("RemoveSupportConceptCostBearerRelationFromGroupBooking")';
|
|
}
|
|
|
|
function getLoadStatisticsUrl() {
|
|
return '@Url.Action("LoadStatistics")';
|
|
}
|
|
|
|
function getAddEmployeesToGroupBookingUrl() {
|
|
return '@Url.Action("AddEmployeesToGroupBooking")';
|
|
}
|
|
|
|
function getResetSignatureImageUrl() {
|
|
return '@Url.Action("ResetSignatureImage")';
|
|
}
|
|
|
|
function getSelectedRecordInformationUrlWithOid() {
|
|
return '@Url.Action("GetSelectedRecordInformationWithOid")';
|
|
}
|
|
|
|
function getSetSelectedSignatureUrl() {
|
|
return '@Url.Action("SaveUnterschrift")';
|
|
}
|
|
|
|
function getDeleteServiceRecordUrl() {
|
|
return '@Url.Action("DeleteServiceRecord")';
|
|
}
|
|
|
|
function getLoadStatisticsUrl() {
|
|
return '@Url.Action("LoadStatistics")';
|
|
}
|
|
|
|
function getResetSignatureImageUrl() {
|
|
return '@Url.Action("ResetSignatureImage")';
|
|
}
|
|
|
|
function getIsDocumentationMandatory() {
|
|
return @(Model != null && Model.IsServiceRecordNoticeMandatory ? "true" : "false");
|
|
}
|
|
|
|
function initializeGoalsTreeView() {
|
|
$.get("@Url.Action("LoadGoals")").done(function(jsonGoals) {
|
|
buildGoalsTree($.parseJSON(jsonGoals));
|
|
});
|
|
}
|
|
|
|
function getSelectedGoalOids() {
|
|
return @Html.Raw(Json.Encode(Model.SelectedGoals.Select(s => s.ValueListEntryOid.Value).ToArray()));
|
|
}
|
|
|
|
function getUpdateGoalsUrl() {
|
|
return "@Url.Action("UpdateGoals")";
|
|
}
|
|
|
|
function getCheckRightsUrl() {
|
|
return "@Url.Action("CheckRights")";
|
|
}
|
|
|
|
function getIsInEditingMode() {
|
|
var boolString = "@Model.IsInEditingMode";
|
|
|
|
return boolString.toLowerCase() === "true";
|
|
}
|
|
|
|
function getIsInGroupBookingMode() {
|
|
var boolString = "@Model.IsInGroupBookingMode";
|
|
|
|
return boolString.toLowerCase() === "true";
|
|
}
|
|
|
|
function getServiceDescriptionToEdit() {
|
|
if (getIsInEditingMode()) {
|
|
var floatString = "@Model.SelectedServiceRecordsServiceDescriptionOid";
|
|
|
|
return parseFloat(floatString);
|
|
} else {
|
|
return 0;
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<div class="container mt-3" id="checkbox-container">
|
|
<div class="row">
|
|
@if(AbstractModel.HasRightToSeeAllSupportConcepts)
|
|
{
|
|
<div class="col-md">
|
|
@using(Html.BeginForm("SetShowOnlyOwnSupportConcepts", "Main", FormMethod.Post))
|
|
{
|
|
<div class="custom-control custom-checkbox custom-control-inline">
|
|
@Html.CheckBoxFor(m => m.ShowOnlyOwnSupportConcepts, new { onchange = "submitForm(this)", @class = "custom-control-input" })
|
|
@Html.LabelFor(m => m.ShowOnlyOwnSupportConcepts, new { @class = "custom-control-label" })
|
|
</div>
|
|
}
|
|
</div>
|
|
}
|
|
|
|
<div class="col-md">
|
|
@using(Html.BeginForm("SetShowExpiredSupportConcepts", "Main", FormMethod.Post))
|
|
{
|
|
<div class="custom-control custom-checkbox 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(AbstractModel.HasRightForGroupBookings)
|
|
{
|
|
<div class="col-md">
|
|
@using(Html.BeginForm("SetGroupBookingMode", "Main", FormMethod.Post))
|
|
{
|
|
<div class="custom-control custom-checkbox 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>
|
|
}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="container-fluid mb-3" id="main-container">
|
|
@if(!Model.IsInGroupBookingMode)
|
|
{
|
|
<div class="row">
|
|
<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>
|
|
<div class="modal" role="dialog" tabindex="-1" id="supportConceptList">
|
|
<div class="modal-dialog modal-dialog-centered text-center" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-body">
|
|
<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" onclick="selectSupportConcept(@supportConceptListObject.CostBearer2SupportConceptOid)" data-dismiss="modal">
|
|
<div class="justify-content-between">
|
|
<h5 class="mb-1 text-dark text-left">
|
|
@supportConceptListObject.NameAndDateOfBirth
|
|
</h5>
|
|
</div>
|
|
<p class="mb-1 text-left @timeSpanColorClass">
|
|
@supportConceptListObject.SupportConceptTimeSpan
|
|
</p>
|
|
</a>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<input type="text" class="d-none" name="CostBearer2SupportConceptOid" id="CostBearer2SupportConceptOid" value="@Model.SelectedSupportConceptListObject.CostBearer2SupportConceptOid">
|
|
}
|
|
|
|
using (Html.BeginForm("CreateOrUpdateServiceRecord", "Main", FormMethod.Post, new { onreset = "serviceDescriptionSelectOnReset()", id = "singleBookingForm" }))
|
|
{
|
|
<div class="mt-3">
|
|
<!-- Einzelbuchung: Mitarbeiter -->
|
|
<div class="form-row">
|
|
<div class="col-md">
|
|
<div class="form-group mb-1">
|
|
@Html.LabelFor(m => m.SelectedEmployeeOid)
|
|
@Html.DropDownListFor(m => m.SelectedEmployeeOid, Model.EmployeeListItems, new { id = "employeesDropDown", @class = "form-control", onchange = "setSelectedEmployee()" })
|
|
</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="collapse" data-target="#goals-container" 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>
|
|
|
|
}
|
|
<div class="form-row">
|
|
<div class="col-md">
|
|
<div class="form-group mb-1">
|
|
@Html.LabelFor(m => m.SelectedServiceCategoryOid)
|
|
@Html.DropDownListFor(m => m.SelectedServiceCategoryOid, Model.ServiceCategoryListItems, new { onchange = "loadServiceDescriptions()", @class = "form-control", Id = "category-select" })
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Einzelbuchung: Leistung -->
|
|
<div class="form-row">
|
|
<div class="col-md">
|
|
<div class="form-group mb-1">
|
|
<label for="leistung-select">Leistung</label>
|
|
<select class="form-control" id="leistung-select" name="ServiceDescription">
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Einzelbuchung: Startdatum -->
|
|
<div class="form-row">
|
|
<div class="col-md">
|
|
<div class="form-group mb-1">
|
|
<label for="start-date">Startdatum</label>
|
|
<div class="input-group date" id="start-date-picker" data-target-input="nearest">
|
|
<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"><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 mb-1">
|
|
<label for="start-date">Enddatum</label>
|
|
<div class="input-group date" id="end-date-picker" data-target-input="nearest">
|
|
<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"><i class="fas fa-calendar-alt"></i></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
<div class="form-row">
|
|
<!-- Einzelbuchung: Von -->
|
|
<div class="col-md">
|
|
<div class="form-group mb-1">
|
|
<label for="start-time">Von</label>
|
|
<div class="input-group date" id="start-time-picker" data-target-input="nearest">
|
|
<input type="text" id="start-time" name="Start" class="form-control datetimepicker-input" data-target="#start-time-picker" value="@Model.StartTimeToEdit" />
|
|
<div class="input-group-append" data-target="#start-time-picker" data-toggle="datetimepicker">
|
|
<div class="input-group-text"><i class="fas fa-clock"></i></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Einzelbuchung: Bis -->
|
|
<div class="col-md">
|
|
<div class="form-group mb-1">
|
|
<label for="end-time">Bis</label>
|
|
<div class="input-group date" id="end-time-picker" data-target-input="nearest">
|
|
<input type="text" id="end-time" name="Ende" class="form-control datetimepicker-input" data-target="#end-time-picker" value="@Model.EndTimeToEdit" />
|
|
<div class="input-group-append" data-target="#end-time-picker" data-toggle="datetimepicker">
|
|
<div class="input-group-text"><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 mb-1">
|
|
<label for="duration">Dauer</label>
|
|
<input type="text" class="form-control" id="duration" name="Dauer" onchange="onDurationChange()" value="@Model.DurationToEdit">
|
|
</div>
|
|
</div>
|
|
@if(Model.IsZeiterfassungInStdMin)
|
|
{
|
|
<div class="col-md">
|
|
<div class="form-group mb-1">
|
|
<label for="hours-minutes-dropdown-btn">Minuten/Stunden</label>
|
|
<div class="dropdown">
|
|
<button id="hours-minutes-dropdown-btn" class="btn btn-outline-primary dropdown-toggle w-100" type="button" data-toggle="dropdown">
|
|
Minuten
|
|
</button>
|
|
<div class="dropdown-menu w-100">
|
|
<a class="dropdown-item" href="#" onclick="toggleHoursMinutesDropdownButton(this)">Minuten</a>
|
|
<a class="dropdown-item" href="#" onclick="toggleHoursMinutesDropdownButton(this)">Stunden</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
<!-- Einzelbuchung: Distanz -->
|
|
<div class="form-row">
|
|
<div class="col-md">
|
|
<div class="form-group mb-1">
|
|
<label for="distance">Gefahrene Kilometer</label>
|
|
<input class="form-control" id="distance" name="Distanz" onchange="validateDistanceInput()" value="@Model.DistanceToEdit">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@if(AbstractModel.HasRightToSeeTextModules)
|
|
{
|
|
<!-- Einzelbuchung: Textbausteine -->
|
|
<div class="form-row">
|
|
<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">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[0]</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
|
|
{
|
|
<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>
|
|
|
|
<!-- Liste mit den Einträgen und dem Auswahl-Select -->
|
|
<div class="col col-12 col-md-7">
|
|
@if(Model != null)
|
|
{
|
|
if (Model.SelectedSupportConcept != null)
|
|
{
|
|
<div class="container-fluid w-100 mt-3 p-0">
|
|
@using(Html.BeginForm("LoadServiceRecords", "Main", FormMethod.Post, new { id = "selectServiceRecordForm" }))
|
|
{
|
|
<select name="Records" class="form-control" onchange="showSpinner(); this.form.submit();" id="timeFrameSelect">
|
|
<option value="-1">Zeitraum wählen</option>
|
|
<option value="7"
|
|
@{if(Model.Zeitraum == 7) { @Html.Raw("selected") }}>
|
|
Letzte 7 Tage
|
|
</option>
|
|
<option value="30"
|
|
@{if(Model.Zeitraum == 30) { @Html.Raw("selected") }}>
|
|
Letzte 30 Tage
|
|
</option>
|
|
<option value="90"
|
|
@{if(Model.Zeitraum == 90) { @Html.Raw("selected") }}>
|
|
Letzte 90 Tage
|
|
</option>
|
|
<option value="0"
|
|
@{if(Model.Zeitraum == 0) { @Html.Raw("selected") }}>
|
|
Alle
|
|
</option>
|
|
</select>
|
|
}
|
|
</div>
|
|
}
|
|
|
|
|
|
<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" data-toggle="collapse" data-target="#collapse-service-record-@serviceRecord.ServiceRecordOid">
|
|
<h5 class="mb-0">
|
|
<button class="btn btn-link collapsed" data-toggle="collapse" data-target="#collapse-service-record-@serviceRecord.ServiceRecordOid">
|
|
<div class="text-left">
|
|
<span>@MainModel.GetServiceRecordTimeHeader(serviceRecord, true)</span>
|
|
</div>
|
|
</button>
|
|
</h5>
|
|
</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="prepareSigningPopup(@serviceRecord.ServiceRecordOid)">
|
|
<span class="fas fa-signature"></span>
|
|
</button>
|
|
</div>
|
|
}
|
|
else if(Model.ShowSignature && serviceRecord.SignatureOid.HasValue)
|
|
{
|
|
<div class="col-auto">
|
|
|
|
@using(Html.BeginForm("LoadSignatureImage", "Main", FormMethod.Post, new { id = $"signature-loading-form{serviceRecord.SignatureOid.Value}" }))
|
|
{
|
|
<input type="hidden" value="@serviceRecord.SignatureOid.Value" name="signatureOidHolder" />
|
|
<input type="hidden" value="@serviceRecord.ServiceRecordOid.Value" name="service-record-oid-holder" />
|
|
<button type="submit" data-toggle="modal" class="btn btn-primary" onclick="showSpinner()">
|
|
<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">
|
|
Mitarbeiter:
|
|
</div>
|
|
<div class="col">
|
|
@serviceRecord.Employee.ToString()
|
|
</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))
|
|
{
|
|
continue;
|
|
}
|
|
|
|
var header = $"Dokumentation { i + 1 }";
|
|
|
|
if(Model.NumberOfDokuTypes >= 2)
|
|
{
|
|
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>
|
|
</div>
|
|
}
|
|
</div>
|
|
|
|
<div class="container mb-3">
|
|
@if(Model.IsInGroupBookingMode)
|
|
{
|
|
if(!Model.IsInEditingMode)
|
|
{
|
|
<div class="row">
|
|
<div class="col col-12">
|
|
@if(Model != null)
|
|
{
|
|
using(Html.BeginForm("CreateGroupBooking", "Main", FormMethod.Post, new { onreset = "serviceDescriptionSelectOnReset()", id = "groupBookingCreationForm" }))
|
|
{
|
|
<div class="mt-3">
|
|
<div class="form-row">
|
|
<div class="col-md">
|
|
<div class="alert alert-danger collapse" role="alert" id="form-alert">
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Gruppenbuchung: Hilfepläne und Gruppen -->
|
|
<div class="form-row">
|
|
<div class="col-md">
|
|
<button type="button" class="btn btn-primary btn-block" data-toggle="modal" data-target="#group-booking-popup" id="support-concepts-and-groups-button">Hilfepläne und Gruppen hinzufügen</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Gruppenbuchung: ausgewählte Hilfepläne und Gruppen -->
|
|
<div class="form-row">
|
|
<div class="col-md">
|
|
<div class="form-group my-1">
|
|
<div class="list-group" id="selected-cb2sc-list">
|
|
@foreach(var selectedCb2ScRelation in Model.GroupBookingSelectionObject.SelectedRelations)
|
|
{
|
|
<div class="list-group-item" id="relation-item-@selectedCb2ScRelation.Value">
|
|
<div class="row">
|
|
<div class="col">
|
|
<span>
|
|
@selectedCb2ScRelation.Text1
|
|
<br />
|
|
<span class="@selectedCb2ScRelation.TextColor">
|
|
@selectedCb2ScRelation.Text2
|
|
</span>
|
|
</span>
|
|
</div>
|
|
<div class="col-auto my-auto">
|
|
<button type="button" class="btn btn-primary" onclick="removeCb2ScRelation(@selectedCb2ScRelation.Value)">
|
|
<span class="fas fa-times-circle"></span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Gruppenbuchung: Mitarbeiter hinzufügen -->
|
|
<div class="form-row">
|
|
<div class="col-md">
|
|
<div class="form-group mb-1">
|
|
<button type="button" class="btn btn-primary btn-block" data-toggle="modal" data-target="#group-booking-employee-selection-popup" id="employees-button">Mitarbeiter hinzufügen</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Gruppenbuchung: Leistungskategorien -->
|
|
<div class="form-row">
|
|
<div class="col-md">
|
|
<div class="form-group mb-1">
|
|
@Html.LabelFor(m => m.SelectedServiceCategoryOid)
|
|
@Html.DropDownListFor(m => m.SelectedServiceCategoryOid, Model.ServiceCategoryListItems, new { onchange = "loadServiceDescriptions()", @class = "form-control", Id = "category-select" })
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Gruppenbuchung: Leistung -->
|
|
<div class="form-row">
|
|
<div class="col-md">
|
|
<div class="form-group mb-1">
|
|
<label for="leistung-select">Leistung</label>
|
|
<select class="form-control" id="leistung-select" name="ServiceDescription">
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Gruppenbuchung: Datum -->
|
|
<div class="form-row">
|
|
<div class="col-md">
|
|
<div class="form-group mb-1">
|
|
<label for="start-date">Startdatum</label>
|
|
<div class="input-group date" id="start-date-picker" data-target-input="nearest">
|
|
<input type="text" id="start-date" name="Datum" class="form-control datetimepicker-input" data-target="#start-date-picker" data-toggle="datetimepicker" value="@DateTime.Today.ToShortDateString()" />
|
|
<div class="input-group-append" data-target="#start-date-picker" data-toggle="datetimepicker">
|
|
<div class="input-group-text"><i class="fas fa-calendar-alt"></i></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Gruppenbuchung: Enddatum -->
|
|
@if(Model.IsEndDateVisible)
|
|
{
|
|
<div class="col-md">
|
|
<div class="form-group mb-1">
|
|
<label for="start-date">Enddatum</label>
|
|
<div class="input-group date" id="end-date-picker" data-target-input="nearest">
|
|
<input type="text" id="end-date" name="Enddatum" class="form-control datetimepicker-input" data-target="#end-date-picker" data-toggle="datetimepicker" value="@DateTime.Today.ToShortDateString()" />
|
|
<div class="input-group-append" data-target="#end-date-picker" data-toggle="datetimepicker">
|
|
<div class="input-group-text"><i class="fas fa-calendar-alt"></i></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
|
|
<!-- Gruppenbuchung: Start- und Endzeit -->
|
|
<div class="form-row">
|
|
<div class="col-md">
|
|
<div class="form-group mb-1">
|
|
<label for="start-time">Von</label>
|
|
<div class="input-group date" id="start-time-picker" data-target-input="nearest">
|
|
<input type="text" id="start-time" name="Start" class="form-control datetimepicker-input" data-target="#start-time-picker" />
|
|
<div class="input-group-append" data-target="#start-time-picker" data-toggle="datetimepicker">
|
|
<div class="input-group-text"><i class="fas fa-clock"></i></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md">
|
|
<div class="form-group mb-1">
|
|
<label for="end-time">Bis</label>
|
|
<div class="input-group date" id="end-time-picker" data-target-input="nearest">
|
|
<input type="text" id="end-time" name="Ende" class="form-control datetimepicker-input" data-target="#end-time-picker" />
|
|
<div class="input-group-append" data-target="#end-time-picker" data-toggle="datetimepicker">
|
|
<div class="input-group-text"><i class="fas fa-clock"></i></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Gruppenbuchung: Dauer -->
|
|
<div class="form-row">
|
|
<div class="col-md">
|
|
<div class="form-group mb-1">
|
|
<label for="duration">Dauer</label>
|
|
<input type="text" class="form-control" id="duration" name="Dauer" onchange="onDurationChange()">
|
|
</div>
|
|
</div>
|
|
@if(Model.IsZeiterfassungInStdMin)
|
|
{
|
|
<div class="col-md">
|
|
<div class="form-group mb-1">
|
|
<label for="hours-minutes-dropdown-btn">Minuten/Stunden</label>
|
|
<div class="dropdown">
|
|
<button id="hours-minutes-dropdown-btn" class="btn btn-outline-primary dropdown-toggle w-100" type="button" data-toggle="dropdown">
|
|
Minuten
|
|
</button>
|
|
<div class="dropdown-menu w-100">
|
|
<a class="dropdown-item" href="#" onclick="toggleHoursMinutesDropdownButton(this)">Minuten</a>
|
|
<a class="dropdown-item" href="#" onclick="toggleHoursMinutesDropdownButton(this)">Stunden</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
|
|
<!-- Gruppenbuchung: Distanz -->
|
|
<div class="form-row">
|
|
<div class="col-md">
|
|
<div class="form-group mb-1">
|
|
<label for="distance">Gefahrene Kilometer</label>
|
|
<input type="text" class="form-control" id="distance" name="Distanz" onchange="validateDistanceInput()">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Gruppenbuchung: Textbausteine -->
|
|
@if(AbstractModel.HasRightToSeeTextModules)
|
|
{
|
|
<div class="form-row">
|
|
<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">Textbausteine</button>
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
<!-- Gruppenbuchung: Dokufelder -->
|
|
<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"></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"></textarea>
|
|
</div>
|
|
}
|
|
</div>
|
|
}
|
|
</div>
|
|
<input type="hidden" name="versteckt" value="Anlegen">
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
<div class="d-flex bd-highlight mt-3">
|
|
<div class="mr-auto bd-highlight">
|
|
<!-- dient nur als Abstandshalter-->
|
|
</div>
|
|
<div class="ml-3 bd-highlight">
|
|
<button type="button" class="btn btn-primary" id="reset-button" onclick="resetGroupBookingForm()">Abbrechen</button>
|
|
</div>
|
|
<div class="ml-3 bd-highlight">
|
|
<button type="button" class="btn btn-primary" id="create-button" onclick="submitGroupBookingForm()">Anlegen</button>
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<div class="row">
|
|
<div class="col col-12">
|
|
@if(Model != null)
|
|
{
|
|
using(Html.BeginForm("EditServiceRecord", "Main", FormMethod.Post, new { onreset = "serviceDescriptionSelectOnReset()", id = "groupBookingEditingForm" }))
|
|
{
|
|
<div class="mt-3">
|
|
<div class="form-row">
|
|
<div class="col-md">
|
|
<div class="alert alert-danger collapse" role="alert" id="form-alert">
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
<div class="col-md">
|
|
<button type="button" class="btn btn-primary btn-block" data-toggle="modal" data-target="#group-booking-popup">Hilfepläne und Gruppen hinzufügen</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Hilfepläne hinzufügen -->
|
|
<div class="form-row">
|
|
<div class="col-md">
|
|
<div class="form-group my-1">
|
|
<div class="list-group" id="selected-cb2sc-list">
|
|
@foreach(var selectedCb2ScRelation in Model.GroupBookingSelectionObject.SelectedRelations)
|
|
{
|
|
<div class="list-group-item" id="relation-item-@selectedCb2ScRelation.Value">
|
|
<div class="row">
|
|
<div class="col">
|
|
<span>
|
|
@selectedCb2ScRelation.Text1
|
|
<br />
|
|
<span class="@selectedCb2ScRelation.TextColor">
|
|
@selectedCb2ScRelation.Text2
|
|
</span>
|
|
</span>
|
|
</div>
|
|
<div class="col-auto my-auto">
|
|
<button type="button" class="btn btn-primary" onclick="removeCb2ScRelation(@selectedCb2ScRelation.Value)">
|
|
<span class="fas fa-times-circle"></span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Mitarbeiter hinzufügen -->
|
|
<div class="form-row">
|
|
<div class="col-md">
|
|
<div class="form-group mb-1">
|
|
<button type="button" class="btn btn-primary btn-block" data-toggle="modal" data-target="#group-booking-employee-selection-popup">Mitarbeiter hinzufügen</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Leistungskategorien -->
|
|
<div class="form-row">
|
|
<div class="col-md">
|
|
<div class="form-group mb-1">
|
|
@Html.LabelFor(m => m.SelectedServiceCategoryOid)
|
|
@Html.DropDownListFor(m => m.SelectedServiceCategoryOid, Model.ServiceCategoryListItems, new { onchange = "loadServiceDescriptions()", @class = "form-control", Id = "category-select" })
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Leistung -->
|
|
<div class="form-row">
|
|
<div class="col-md">
|
|
<div class="form-group mb-1">
|
|
<label for="leistung-select">Leistung</label>
|
|
<select class="form-control" id="leistung-select"></select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Datum -->
|
|
<div class="form-row">
|
|
<div class="col-md">
|
|
<div class="form-group mb-1">
|
|
<label for="start-date">Startdatum</label>
|
|
<div class="input-group date" id="start-date-picker" data-target-input="nearest">
|
|
<input type="text" id="start-date" name="Datum" class="form-control datetimepicker-input" data-target="#start-date-picker" data-toggle="datetimepicker" value="@Model.SelectedServiceRecord.Start.Value.ToShortDateString()" />
|
|
<div class="input-group-append" data-target="#start-date-picker" data-toggle="datetimepicker">
|
|
<div class="input-group-text"><i class="fas fa-calendar-alt"></i></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@if(Model.IsEndDateVisible)
|
|
{
|
|
<div class="col-md">
|
|
<div class="form-group mb-1">
|
|
<label for="start-date">Enddatum</label>
|
|
<div class="input-group date" id="end-date-picker" data-target-input="nearest">
|
|
<input type="text" id="end-date" name="Enddatum" class="form-control datetimepicker-input" data-target="#end-date-picker" data-toggle="datetimepicker" value="@Model.SelectedServiceRecord.End.Value.ToString("dd.MM.yyyy")" />
|
|
<div class="input-group-append" data-target="#end-date-picker" data-toggle="datetimepicker">
|
|
<div class="input-group-text"><i class="fas fa-calendar-alt"></i></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
|
|
<!-- Start- und Endzeit -->
|
|
<div class="form-row">
|
|
<div class="col-md">
|
|
<div class="form-group mb-1">
|
|
<label for="start-time">Von</label>
|
|
<div class="input-group date" id="start-time-picker" data-target-input="nearest">
|
|
<input type="text" id="start-time" name="Start" class="form-control datetimepicker-input" data-target="#start-time-picker" value="@Model.SelectedServiceRecord.Start.Value.ToShortTimeString()" />
|
|
<div class="input-group-append" data-target="#start-time-picker" data-toggle="datetimepicker">
|
|
<div class="input-group-text"><i class="fas fa-clock"></i></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md">
|
|
<div class="form-group mb-1">
|
|
<label for="end-time">Bis</label>
|
|
<div class="input-group date" id="end-time-picker" data-target-input="nearest">
|
|
<input type="text" id="end-time" name="Ende" class="form-control datetimepicker-input" data-target="#end-time-picker" value="@Model.SelectedServiceRecord.End.Value.ToShortTimeString()" />
|
|
<div class="input-group-append" data-target="#end-time-picker" data-toggle="datetimepicker">
|
|
<div class="input-group-text"><i class="fas fa-clock"></i></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Dauer -->
|
|
<div class="form-row">
|
|
<div class="col-md">
|
|
<div class="form-group mb-1">
|
|
<label for="duration">Dauer</label>
|
|
<input type="text" class="form-control" id="duration" name="Dauer" onchange="onDurationChange()" value="@Model.SelectedServiceRecord.GroupRoundedDuration">
|
|
</div>
|
|
</div>
|
|
@if(Model.IsZeiterfassungInStdMin)
|
|
{
|
|
<div class="col-md">
|
|
<div class="form-group mb-1">
|
|
<label for="hours-minutes-dropdown-btn">Minuten/Stunden</label>
|
|
<div class="dropdown">
|
|
<button id="hours-minutes-dropdown-btn" class="btn btn-outline-primary dropdown-toggle w-100" type="button" data-toggle="dropdown">
|
|
Minuten
|
|
</button>
|
|
<div class="dropdown-menu w-100">
|
|
<a class="dropdown-item" href="#" onclick="toggleHoursMinutesDropdownButton(this)">Minuten</a>
|
|
<a class="dropdown-item" href="#" onclick="toggleHoursMinutesDropdownButton(this)">Stunden</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
|
|
<!-- Distanz -->
|
|
<div class="form-row">
|
|
<div class="col-md">
|
|
<div class="form-group mb-1">
|
|
<label for="distance">Gefahrene Kilometer</label>
|
|
<input type="text" class="form-control" id="distance" name="Distanz" value="@Model.SelectedServiceRecord.DistanceInMeter">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Textbausteine -->
|
|
@if(AbstractModel.HasRightToSeeTextModules)
|
|
{
|
|
<div class="form-row">
|
|
<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">Textbausteine</button>
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
<!-- Dokufelder -->
|
|
<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"></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.SelectedServiceRecord.NoticeList[i]</textarea>
|
|
</div>
|
|
}
|
|
</div>
|
|
}
|
|
</div>
|
|
<input type="hidden" name="versteckt" value="Speichern">
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
<div class="d-flex bd-highlight mt-3">
|
|
<div class="mr-auto bd-highlight">
|
|
<!-- dient nur als Abstandshalter-->
|
|
</div>
|
|
<div class="ml-3 bd-highlight">
|
|
@using(Html.BeginForm("ResetEditingMode", "Main", FormMethod.Post))
|
|
{
|
|
<button type="submit" class="btn btn-primary" onclick="showSpinner()">Abbrechen</button>
|
|
}
|
|
</div>
|
|
<div class="ml-3 bd-highlight">
|
|
<button type="button" class="btn btn-primary" id="create-button" onclick="submitGroupBookingEditForm()">Speichern</button>
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
}
|
|
}
|
|
</div>
|
|
|
|
<div class="modal" tabindex="-1" role="dialog" id="textbausteine-popup">
|
|
<div class="modal-dialog" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h6 class="modal-title">Textbausteine</h6>
|
|
<button type="button" class="close" data-dismiss="modal">
|
|
<span>×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div id="tree"></div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-primary" data-dismiss="modal">Schließen</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal" tabindex="-1" role="dialog" id="goal-popup">
|
|
<div class="modal-dialog" 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">
|
|
<span>×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div id="goals-tree"></div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-primary" data-dismiss="modal">Schließen</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal" tabindex="-1" role="dialog" id="group-booking-popup">
|
|
<div class="modal-dialog" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-body">
|
|
<nav class="nav nav-pills nav-fill">
|
|
<a class="nav-item nav-link active" href="#group-booking-supportconcepts" data-toggle="tab" role="tab">Hilfepläne</a>
|
|
<a class="nav-item nav-link" href="#group-booking-groups" data-toggle="tab" role="tab">Gruppen</a>
|
|
</nav>
|
|
<div class="tab-content">
|
|
<div class="tab-pane show active" role="tabpanel" id="group-booking-supportconcepts">
|
|
<ul class="list-group">
|
|
@foreach(var cb2Sc in Model.SupportConceptListObjectsForGroupBooking)
|
|
{
|
|
<li class="list-group-item">
|
|
@{
|
|
var timeSpanColorClass2 = cb2Sc.IsAboutToExpire ? "text-bewo-is-about-to-expire" : cb2Sc.ExpiresInThreeMonthsOrLess ? "text-bewo-expires-in-three-months" : "text-dark";
|
|
|
|
long cb2ScOid;
|
|
var wasSuccessful = long.TryParse(cb2Sc.CostBearer2SupportConceptOid, out cb2ScOid);
|
|
|
|
var checkedValue = wasSuccessful ? Model.SelectedConceptCostBearerRelations.Any(a => a.CostBearer2SupportConceptOid.Equals(cb2ScOid)) : wasSuccessful;
|
|
}
|
|
|
|
<div class="custom-control custom-checkbox custom-control-inline">
|
|
<input type="checkbox" @{ if (checkedValue) { @Html.Raw("checked=\"checked\""); } } class="custom-control-input" id="cb2sc-checkbox-@cb2Sc.CostBearer2SupportConceptOid" onchange="addCostBearer2SupportConceptsToGroupBooking()" name="cb2sc-checkbox-@cb2Sc.CostBearer2SupportConceptOid" value="@cb2Sc.CostBearer2SupportConceptOid">
|
|
<label for="cb2sc-checkbox-@cb2Sc.CostBearer2SupportConceptOid" class="custom-control-label">
|
|
<span class="justify-content-between mb-1 text-dark text-left">
|
|
@cb2Sc.NameAndDateOfBirth
|
|
</span>
|
|
<br/>
|
|
<span class="mb-1 text-left @timeSpanColorClass2">
|
|
@cb2Sc.SupportConceptTimeSpan
|
|
</span>
|
|
</label>
|
|
</div>
|
|
</li>
|
|
}
|
|
</ul>
|
|
</div>
|
|
<div class="tab-pane show" role="tabpanel" id="group-booking-groups">
|
|
<ul class="list-group">
|
|
@foreach(var group in Model.GroupOfPeopleListItems)
|
|
{
|
|
<li class="list-group-item">
|
|
@{
|
|
long groupOid;
|
|
var wasSuccessful = long.TryParse(group.Value, out groupOid);
|
|
|
|
var shouldBeChecked = wasSuccessful ? Model.SelectedGroupOfPeopleOids.Contains(groupOid) : wasSuccessful;
|
|
|
|
var attribute = shouldBeChecked ? "checked=\"checked\"" : string.Empty;
|
|
}
|
|
<div class="custom-control custom-checkbox custom-control-inline">
|
|
<input type="checkbox" @attribute class="custom-control-input" id="group-checkbox-@group.Value" value="@group.Value" onchange="addCostBearer2SupportConceptsToGroupBooking()" />
|
|
<label for="group-checkbox-@group.Value" class="custom-control-label">
|
|
@group.Text
|
|
</label>
|
|
</div>
|
|
</li>
|
|
}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal" tabindex="-1" role="dialog" id="group-booking-employee-selection-popup">
|
|
<div class="modal-dialog" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-body">
|
|
<ul class="list-group" id="employee-list">
|
|
@foreach (var employee in Model.Employees)
|
|
{
|
|
<li class="list-group-item">
|
|
@{
|
|
var checkedValue = Model.SelectedEmployees.Contains(employee) ? "checked=\"checked\"" : string.Empty;
|
|
}
|
|
|
|
<div class="custom-control custom-checkbox custom-control-inline">
|
|
<input type="checkbox" @checkedValue class="custom-control-input" id="group-employee-@employee.EmployeeOid" onchange="addEmployeeToGroupBooking()" value="@employee.EmployeeOid"/>
|
|
<label for="group-employee-@employee.EmployeeOid" class="custom-control-label">@employee.DetailDescription</label>
|
|
</div>
|
|
</li>
|
|
}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="container-fluid d-none mb-3" 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" onclick="confirmCancellation()">
|
|
<span class="fas fa-times-circle"></span>
|
|
</button>
|
|
</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 mt-3" id="canvas-row">
|
|
<div class="canvas-container" id="canvas-container">
|
|
<canvas id="sketch-pad" width="500" height="200" class="bg-white rounded" style="border: 1px solid #343A40;"></canvas>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<button type="button" class="btn btn-primary float-right" onclick="saveSignature()">Speichern</button>
|
|
<button type="button" class="btn btn-secondary float-right mr-3" id="clear-canvas-btn">Neu</button>
|
|
</div>
|
|
</div>
|
|
<input type="hidden" id="service-record-oid-holder" />
|
|
</div>
|
|
</div>
|
|
|
|
@if(AbstractModel.IsDeleteBtnVisible)
|
|
{
|
|
using(Html.BeginForm("DeleteServiceRecord", "Main", FormMethod.Post, new { id = "deletion-form" }))
|
|
{
|
|
<input type="hidden" name="serviceRecordOidHolder" id="oidHolder" />
|
|
}
|
|
}
|
|
|
|
<div id="statistics-popup" class="modal" tabindex="-1" role="dialog">
|
|
<div class="modal-dialog" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h6 class="modal-title" id="statistics-header"></h6>
|
|
<button type="button" class="close" data-dismiss="modal">
|
|
<span>×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col text-secondary">
|
|
Geleistet diese Woche / gesamt:
|
|
</div>
|
|
<div class="col-auto" id="provided-per-week-total-col">
|
|
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col text-secondary">
|
|
Bewilligt pro Woche / gesamt:
|
|
</div>
|
|
<div class="col-auto" id="approved-per-week-total-col">
|
|
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col text-secondary">
|
|
Frei pro Woche(Ø) / gesamt:
|
|
</div>
|
|
<div class="col-auto" id="free-per-week-total-col">
|
|
|
|
</div>
|
|
</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>
|
|
|
|
@if(Model.ShowSignature && !string.IsNullOrEmpty(Model.SignatureImage))
|
|
{
|
|
<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">@Model.SignatureServiceRecordHeader</h5>
|
|
<button type="button" class="close" data-dismiss="modal" onclick="hideSignature()">
|
|
<span>×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<img src="@Model.SignatureImage" 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>
|
|
} |