Files
BeWoPlaner/BeWoPlanerMobil/Views/Main/Main.cshtml
Lyndon cc388de591 BeWoPlanerMobil:
Das Unterschriftenfeld befindet sich jetzt unter den Buttons und ist größer. Ca. 80% des Browserfensters.
    Der Kommentar wird jetzt im Klientenfeld angezeigt.
2018-10-10 16:43:11 +02:00

1117 lines
66 KiB
Plaintext

@using BeWoPlanerMobil.Models;
@using BeWoPlanerMobil.Util
@model MainModel
@{
ViewBag.Title = "Main";
}
<div class="header-div">
<span class="header-span">Willkommen, @string.Format("{0} {1}", Model.Employee.FirstName, Model.Employee.LastName)</span>
<input type="button" id="menu-btn" onclick="toggleMenu()" />
</div>
<div id="colorRibbon"></div>
<div id="menu-div" style="display: none; position: absolute; right: 0; z-index: 10;">
<ul class="dark-bg">
<li class="menu-item menu-link" onclick="showCustomers()" @{if(!MainModel.IsAllowedToSeeCustomers) { @Html.Raw("style='display: none;'") }}>
<img src="@Url.Content("~/Content/images/klientenicon.svg")" alt="K" class="menu-img" />Klienten
</li>
<li class="menu-item menu-link" onclick="showServiceRecords(); ErfolgteSpx();">
<img src="@Url.Content("~/Content/images/zeiterfassungsicon.svg")" alt="Z" class="menu-img" />Zeiterfassung
</li>
<li class="menu-item menu-link" onclick="showKalender()">
<img src="@Url.Content("~/Content/images/calendar-bs-orange.svg")" alt="Z" class="menu-img" />Kalender
</li>
<li class="menu-item">
<img src="@Url.Content("~/Content/images/abmeldeicon.svg")" alt="A" class="abmelden-img" />
@using(Html.BeginForm("Logout", "Main", FormMethod.Post, new { id = "logout-form" }))
{
<input type="submit" value="Abmelden" class="logout-btn" onclick="clearRecords(); showSanduhr();" />
}
</li>
</ul>
</div>
<img id="sanduhr" class="warte-animation" alt="Lade..." src="@Url.Content("~/Content/images/spinner.png")">
<div id="zeiterfassung">
<div class="margin-div" style="overflow: hidden;">
@using(Html.BeginForm("SetShowOnlyOwnSupportConcepts", "Main", FormMethod.Post))
{
@Html.CheckBoxFor(m => m.ShowOnlyOwnSupportConcepts, new {onchange = "showSanduhr();this.form.submit();", id = "ShowOnlyOwnSupportConceptsCheckBox"})
@Html.LabelFor(m => m.ShowOnlyOwnSupportConcepts, new {id = "LabelForShowOnlyOwnSupporConceptsCB"})
}
@using(Html.BeginForm("SetShowExpiredSupportConcepts", "Main", FormMethod.Post))
{
@Html.CheckBoxFor(m => m.ShowExpiredSupportConcepts, new {onchange = "showSanduhr();this.form.submit();", id = "ShowExpiredSupportConceptsCheckBox"})
@Html.LabelFor(m => m.ShowExpiredSupportConcepts, new {id = "LabelForShowExpiredSupportConceptsCB"})
}
@using(Html.BeginForm("SetGroupBookingMode", "Main", FormMethod.Post, new { style = "display: none;"}))
{
@Html.CheckBoxFor(m => m.IsInGroupBookingMode, new {onchange = "showSanduhr();this.form.submit();", id = "changeBookingModeCheckBox"})
@Html.LabelFor(m => m.IsInGroupBookingMode, new {id = "labelForChangeBookingModeCheckBox"})
}
@using(Html.BeginForm("SelectSupportConcept", "Main", FormMethod.Post, new {id = "selectSCForm"}))
{
<table>
<tr>
<td>
<div class="combobox-label-parent" id="sc-dropdown-container">
@Html.LabelFor(m => m.CostBearer2SupportConceptOid)
<div class="styled-select-div">
@Html.DropDownListFor(m => m.CostBearer2SupportConceptOid, Model.SupportConceptListItems, new {onchange = "showSanduhr();$('#serviceRecords').empty();this.form.submit();", id = "scDropDown", @class = "dropdownlist-for", style = "display:block;"})
</div>
</div>
</td>
<td id="statistik-button-td">
<input type="button" id="statistik-button" onclick="showStatistics()"/>
</td>
</tr>
</table>
}
<div id="gruppenbuchungsContainer" style="display: none;">
<table>
<tr>
@using(Html.BeginForm("SelectSupportConceptForGroupBooking", "Main", FormMethod.Post))
{
<td>
<div class="combobox-label-parent" id="multi-sc-dropdown-container">
@Html.LabelFor(m => m.CostBearer2SupportConceptOid)
<div class="styled-select-div">
@Html.DropDownListFor(m => m.CostBearer2SupportConceptOid, Model.SupporConceptListItemsForGroupBooking, new {id = "multiScDropDown", @class = "dropdownlist-for", style = "display:block;"})
</div>
</div>
</td>
<td class="gruppenbuchungsCheckboxContainer">
<input type="button" id="add-sc-button" onclick="addSupportConceptToGroupBooking(this)"/>
</td>
}
</tr>
</table>
<table>
<tr>
@using(Html.BeginForm("SelectSupportConceptGroup", "Main", FormMethod.Post))
{
<td>
<div class="combobox-label-parent" id="sc-group-dropdown-container">
@Html.LabelFor(m => m.SelectedGroupInfo)
<div class="styled-select-div">
@Html.DropDownListFor(m => m.SelectedGroupInfo, Model.GroupOfPeopleListItems, new {id="groupDropDown", @class="dropdownlist-for", style="display:block;"})
</div>
</div>
</td>
<td class="gruppenbuchungsCheckboxContainer">
<input type="button" id="add-sc-group-button" onclick="addSupportConceptGroupToGroupBooking(this)" />
</td>
}
</tr>
</table>
<div class="collapsible-container">
<input type="button" id="showSelectedSCsButton" class="toggle-btn" value="Ausgewählte Hilfepläne @Html.Raw("(" + Model.SelectedSupportConcepts.Count + ")")"/>
<div style="display: none;" class="kollabierbar" id="kollabierbar3">
@using(Html.BeginForm("RemoveSupportConceptFromGruppenbuchung", "Main", FormMethod.Post))
{
<input type="hidden" name="elementToBeRemoved"/>
<table id="gruppenbuchungsSupportConceptTable">
@foreach(var sc in Model.SelectedSupportConceptListItemsForGroupBooking)
{
<tr id="supportconcept_tr_@(sc.Value)">
<td>@(sc.Text)</td>
<td><input type="button" class="removeButton" onclick="removeSupportConceptFromList(@(sc.Value), this)"/></td>
</tr>
}
</table>
}
</div>
</div>
<table>
<tr>
@using(Html.BeginForm("SelectEmployeeForGroupBooking", "Main", FormMethod.Post))
{
<td>
<div class="combobox-label-parent" style="@{ if(!MainModel.IsEmployeeSelectionVisible) { @Html.Raw("display: none;") }}">
@Html.LabelFor(m => m.SelectedEmployeeOid)
<div class="styled-select-div">
@Html.DropDownListFor(m => m.SelectedEmployeeOid, Model.EmployeeListItems, new {id = "groupBookingEmployeesDropDown", @class = "dropdownlist-for"})
</div>
</div>
</td>
<td class="gruppenbuchungsCheckboxContainer">
<input type="button" id="add-employee-button" onclick="addEmployeeToGruppenbuchung(this)" />
</td>
}
</tr>
</table>
<div class="collapsible-container">
<input type="button" id="showSelectedEmployeesButton" class="toggle-btn" value="Ausgewählte Mitarbeiter @Html.Raw("(" + Model.SelectedEmployees.Count + ")")"/>
<div style="display: none;" class="kollabierbar" id="kollabierbar4">
@using(Html.BeginForm("RemoveEmployeeFromGruppenbuchung", "Main", FormMethod.Post))
{
<input type="hidden" name="employeeToRemove" />
<table id="gruppenbuchungsEmployeeTable">
@foreach(var employee in Model.SelectedEmployees)
{
<tr id="employee_tr_@(employee.EmployeeOid)">
<td>@(employee.DetailDescription)</td>
<td><input type="button" class="removeButton" onclick="removeEmployeeFromList(@(employee.EmployeeOid), this)"/></td>
</tr>
}
</table>
}
</div>
</div>
</div>
<div class="combobox-label-parent" style="@{ if(!MainModel.IsEmployeeSelectionVisible) { @Html.Raw("display: none;") }}" id="singleSCEmployeeSelectionContainer">
@Html.LabelFor(m => m.SelectedEmployeeOid)
<div class="styled-select-div">
@Html.DropDownListFor(m => m.SelectedEmployeeOid, Model.EmployeeListItems, new { onchange = "setSelectedEmployee()", id = "employeesDropDown", @class = "dropdownlist-for" })
</div>
</div>
<div @{if(!MainModel.IsAllowedToCreateOrEditRecord) { @Html.Raw("style='height: 0; overflow: hidden; position: absolute;'") }}>
<input type="hidden" id="isInEditModeIndicator" value="@(Model.IsInEditingMode ? Html.Raw("true") : Html.Raw("false"))" />
@using(Html.BeginForm("CreateServiceRecord", "Main", FormMethod.Post, new {id = "createSRForm"}))
{
<table>
<tr @{
if(Model.SelectedSupportConcept == null || Model.SelectedSupportConcept.Goals.Count == 0 || Model.IsInGroupBookingMode)
{
@Html.Raw("style='display: none;'")
}
else
{
@Html.Raw("style='display: table-row;'")
}
}>
<td colspan="2">
<div class="collapsible-container">
<input type="button" id="kollabier-btn1" class="toggle-btn" value="Ziele" disabled/>
<div id="kollabierbar1" style="display: none;" class="kollabierbar">
</div>
</div>
</td>
</tr>
<tr>
<td colspan="2">
<div class="combobox-label-parent cell-content">
@Html.LabelFor(m => m.SelectedServiceCategoryConceptOid)
<div class="styled-select-div select-container" id="kategorien-select-container">
@Html.DropDownListFor(m => m.SelectedServiceCategoryConceptOid, Model.ServiceCategoryListItems, new {onchange = "loadServiceDescriptions();", id = "kategorien_select", required = "required", @class = "dropdownlist-for edit-form-input" })<!--ErfolgteSpx(); Speichern local-->
</div>
</div>
</td>
</tr>
<tr>
<td colspan="2">
<div class="combobox-label-parent cell-content">
<label for="leistungen_select">Leistung</label>
<div class="styled-select-div" id="leistungen-select-container">
<select class="dropdownlist-for edit-form-input" id="leistungen_select" onchange="setServiceDescription()" name="Leistungen" required></select>
</div>
</div>
</td>
</tr>
<tr>
<td colspan="2">
<div class="input-wrapper cell-content">
<input type="text" id="datum_textbox" name="Datum" class="date-input-css floating-label-input" required disabled @{if(Model.IsInEditingMode && Model.IsInGroupBookingMode && Model.SelectedServiceRecord != null && Model.SelectedServiceRecord.Start != null)
{
@Html.Raw("value='" + Model.SelectedServiceRecord.Start.Value.ToString("dd.MM.yyyy") + "'")
}}/>
<label class="floating-label" for="datum_textbox">Startdatum</label>
</div>
</td>
</tr>
<tr>
<td colspan="2">
<div class="input-wrapper cell-content" id="EndDate_div" style="display: none">
<input type="text" id="enddatum_textbox" name="Enddatum" class="date-input-css floating-label-input edit-form-input" required disabled onchange="actualDurationWithEndDate()" @{if(Model.IsInEditingMode && Model.IsInGroupBookingMode && Model.SelectedServiceRecord != null && Model.SelectedServiceRecord.End != null)
{
@Html.Raw("value='" + Model.SelectedServiceRecord.End.Value.ToString("dd.MM.yyyy") + "'")
}}/>
<label class="floating-label" for="enddatum_textbox">Enddatum</label>
</div>
</td>
</tr>
<tr id="zeiterfassungsErrorTableRow">
<td colspan="2" id="zeiterfassungsErrorTableCell">
<h4 id="zeiterfassungsErrorDisplay" class="error-text"></h4>
</td>
</tr>
<tr>
<td>
<div class="input-wrapper cell-content" id="start-cell">
<input class="not-required-input edit-form-input" type="text" id="start_textbox" name="Start" disabled @{if(Model.IsInEditingMode && Model.IsInGroupBookingMode && Model.SelectedServiceRecord != null && Model.SelectedServiceRecord.Start != null)
{
@Html.Raw("value=\"" + Model.SelectedServiceRecord.Start.Value.ToString("HH:mm") + "\"")
}}/>
<label for="start_textbox">Von</label>
</div>
</td>
<td>
<div class="input-wrapper cell-content" id="end-cell">
<input class="not-required-input edit-form-input" type="text" id="ende_textbox" name="Ende" disabled @{if(Model.IsInEditingMode && Model.IsInGroupBookingMode && Model.SelectedServiceRecord != null && Model.SelectedServiceRecord.End != null)
{
@Html.Raw("value=\"" + Model.SelectedServiceRecord.End.Value.ToString("HH:mm") + "\"")
}}/>
<label for="ende_textbox">Bis</label>
</div>
</td>
</tr>
<tr>
<td colspan="2">
<div class="input-wrapper cell-content">
<input class="not-required-input edit-form-input" type="text" id="duration_textbox" name="Dauer" disabled @{if(Model.IsInEditingMode && Model.IsInGroupBookingMode && Model.SelectedServiceRecord != null && Model.SelectedServiceRecord.GroupRoundedDuration != null)
{
@Html.Raw("value=\"" + Model.SelectedServiceRecord.GroupRoundedDuration.Value.ToString("###0.#") + "\"")
}}/>
<label for="duration_textbox">Dauer</label>
</div>
</td>
</tr>
<tr @{
if(!Model.ShowDistanceField)
{
@Html.Raw("style='display: none;'")
}}>
<td colspan="2">
<div class="input-wrapper cell-content">
<input class="not-required-input edit-form-input" type="number" id="distance_textbox" name="Distanz" disabled @{if(Model.IsInEditingMode && Model.IsInGroupBookingMode && Model.SelectedServiceRecord != null && Model.SelectedServiceRecord.DistanceInMeter != null)
{
@Html.Raw("value=\"" + Model.SelectedServiceRecord.DistanceInMeter + "\"")
}}/>
<label for="distance_textbox">Gefahrene Kilometer</label>
</div>
</td>
</tr>
<tr id="textModulesTr" @(MainModel.IsTextbausteineVisible ? Html.Raw("style='display: table-row;'") : Html.Raw("style='display: none;'"))>
<td colspan="2">
<input type="button" id="kollabier-btn2" class="toggle-btn" value="Textbausteine" onclick="showTextModulesPopup()" disabled />
</td>
</tr>
<tr id="trnormalDoku" style="display: none;">
<td colspan="2">
<div class="input-wrapper cell-content" id="divtrnormalDoku">
<textarea class="floating-label-input edit-form-input" id="notiz_textbox" name="Dokumentation6" required disabled>@{if(Model.IsInEditingMode && Model.IsInGroupBookingMode && Model.SelectedServiceRecord != null)
{
@Html.Raw(Model.SelectedServiceRecord.Notice)
}}</textarea>
<label class="floating-label" for="notiz_textbox" id="trnormalDokuLabel">Dokumentation</label>
</div>
</td>
</tr>
<tr>
<td colspan="2" id="tddokureiter">
<div class="input-wrapper cell-content" style="height: 90px;">
<article class="infobox">
<section id="Dokumentation1" style="display: none;">
<h2><a href="#Dokumentation1" onfocus="focusOnTab(1);" id="DokName1">Dok1</a>
</h2>
<textarea class="documentationTextArea edit-form-input" id="notiz_textbox1" name="Dokumentation" disabled>@{if(Model.IsInEditingMode && Model.IsInGroupBookingMode && Model.SelectedServiceRecord != null && Model.SelectedServiceRecord.Notice != null)
{
@Html.Raw(Model.SelectedServiceRecord.Notice)
}}</textarea>
</section>
<section id="Dokumentation2" style="display: none;">
<h2><a href="#Dokumentation2" onfocus="focusOnTab(2);" id="DokName2">Dok2</a>
</h2>
<textarea class="documentationTextArea edit-form-input" id="notiz_textbox2" name="Dokumentation2" disabled>@{if(Model.IsInEditingMode && Model.IsInGroupBookingMode && Model.SelectedServiceRecord != null && Model.SelectedServiceRecord.Notice2 != null)
{
@Html.Raw(Model.SelectedServiceRecord.Notice2)
}}</textarea>
</section>
<section id="Dokumentation3" style="display: none;">
<h2><a href="#Dokumentation3" onfocus="focusOnTab(3);" id="DokName3">Dok3</a>
</h2>
<textarea class="documentationTextArea edit-form-input" id="notiz_textbox3" name="Dokumentation3" disabled>@{if(Model.IsInEditingMode && Model.IsInGroupBookingMode && Model.SelectedServiceRecord != null && Model.SelectedServiceRecord.Notice3 != null)
{
@Html.Raw(Model.SelectedServiceRecord.Notice3)
}}</textarea>
</section>
<section id="Dokumentation4" style="display: none;">
<h2><a href="#Dokumentation4" onfocus="focusOnTab(4);" id="DokName4">Dok4</a>
</h2>
<textarea class="documentationTextArea edit-form-input" id="notiz_textbox4" name="Dokumentation4" disabled>@{if(Model.IsInEditingMode && Model.IsInGroupBookingMode && Model.SelectedServiceRecord != null && Model.SelectedServiceRecord.Notice4 != null)
{
@Html.Raw(Model.SelectedServiceRecord.Notice4)
}}</textarea>
</section>
<section id="Dokumentation5" style="display: none;">
<h2><a href="#Dokumentation5" onfocus="focusOnTab(5);" id="DokName5">Dok5</a>
</h2>
<textarea class="documentationTextArea edit-form-input" id="notiz_textbox5" name="Dokumentation5" disabled>@{if(Model.IsInEditingMode && Model.IsInGroupBookingMode && Model.SelectedServiceRecord != null && Model.SelectedServiceRecord.Notice5 != null)
{
@Html.Raw(Model.SelectedServiceRecord.Notice5)
}}</textarea>
</section>
</article>
</div>
</td>
</tr>
</table>
<table style="width: auto; float: right;">
<tr>
<td>
<input type="text" style="display: none" id="GeoLocSaveXCOOR" name="GeoLocSaveXCOOR"/>
</td>
<td>
<input type="text" style="display: none" id="GeoLocSaveYCOOR" name="GeoLocSaveYCOOR"/>
</td>
<td>
<input type="text" style="display: none" id="TimeStampSave" name="TimeStampSave"/>
</td>
<td>
<input type="text" style="display: none" id="URLSave" name="URLSave"/>
</td>
<td class="an-ie-angepasste-tabelle">
<input type="button" value="Abbrechen" class="anlegen-btn" id="abbrechenBtn" onclick="resetRecordForm();" disabled/>
</td>
<td class="an-ie-angepasste-tabelle">
<input type="hidden" id="versteckt" name="versteckt" @(MainModel.IsOnlyAllowedToEdit || Model.IsInGroupBookingMode && Model.IsInEditingMode ? Html.Raw("value=\"Speichern\"") : Html.Raw("value=\"Anlegen\""))/>
<input type="button" @(MainModel.IsOnlyAllowedToEdit || Model.IsInGroupBookingMode && Model.IsInEditingMode ? Html.Raw("value=\"Speichern\"") : Html.Raw("value=\"Anlegen\"")) class="anlegen-btn" name="anlegenEditierenBtn" id="anlegenEditierenBtn" onclick="saveCreateServicerecod();" disabled/>
</td>
</tr>
</table>
}
</div>
<input value="@Model.SaveSignature.ToString()" type="hidden" id="SaveSignature" />
<input type="hidden" id="Leistung" />
@using (Html.BeginForm("LoadServiceRecords", "Main", FormMethod.Post, new { id = "selectSCForm2" }))
{
<div class="combobox-label-parent" id="recordLoader_select_container" style="min-width: 120px">
<div class="styled-select-div" id="record-loader-select-container">
<select class="dropdownlist-for" id="recordLoader_select" onchange="showSanduhr();$('#serviceRecords').empty();this.form.submit();" name="Records">
<option value="-1"></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>
}
</div>
<hr />
<div class="margin-div" id="serviceRecords">
@foreach(var record in Model.ServiceRecords)
{
<div class="collapsible-container">
<input type="button" class="toggle-btn" value="@{
if (record.Start.Value.Second == 0)
{
if(record.Start.Value.Date != record.End.Value.Date) {
@(record.Start.Value.ToString("dd.MM.yyyy") + " "+ record.Start.Value.ToString(" HH:mm") + " - " + record.End.Value.ToString("dd.MM.yyyy") + " " + record.End.Value.ToString("HH:mm"))
} else {
@(record.Start.Value.ToString("dd.MM.yyyy") + " " + record.Start.Value.ToString(" HH:mm") + " - " + record.End.Value.ToString("HH:mm"))
}
}
else
{
@(record.Start.Value.ToShortDateString())
}
}" @(record.GroupOid != null ? Html.Raw("style=\"background-color: #FDC784;\"") : Html.Raw("")) />
<div style="display: none;" @(record.GroupOid != null ? Html.Raw("class=\"kollabierbarGruppenbuchung\"") : Html.Raw("class=\"kollabierbar\""))>
<table>
<tbody>
<tr class="testklasse">
<td colspan="2">
@using(Html.BeginForm("SetSelectedGroupServiceRecord", "Main", FormMethod.Post, new {id = "editGroupServiceRecord_" + record.ServiceRecordOid.Value}))
{
<input type="text" value="@(record.ServiceRecordOid.Value)" name="hiddenElement" style="display: none"/>
}
<input type="button" class="edit-button" onclick="@("showSanduhr();" + (record.GroupOid == null ? "selectServiceRecord('" + record.ServiceRecordOid + "')" : "selectGroupBookingForEditing('" + record.ServiceRecordOid + "')"))" @{if(!MainModel.IsEditBtnVisible) { @Html.Raw("style=\"display: none;\"") }}/>
@*<input type="button" class="edit-button" onclick="@("showSanduhr();" + ("selectServiceRecord('" + record.ServiceRecordOid) + "')")" @{if(!MainModel.IsEditBtnVisible || record.GroupOid != null) { @Html.Raw("style=\"display: none;\"") }}/>*@
<input type="button" onclick="@("togglePopup('" + record.ServiceRecordOid + "')")" class="delete-button" @{if(!MainModel.IsDeleteBtnVisible) { @Html.Raw("style=\"display: none;\"") }}/>
@{if((record.SignatureOid == null || record.SignatureOid.Equals("")) && Model.ShowSignature)
{
<input type="button" onclick="@("showUnterschrift(" + record.ServiceRecordOid + ")")" value="Unterschreiben" class="unterschreiben" style="color: #ff5a00; font-weight: bold; font-size: large"/>
}
}
</td>
</tr>
<tr class="testklasse">
<td class="recordHeader">Minuten (gerundet):</td>
<td>
@{
var rd = MobileUtils.GetDecimalValueWithMaxDecimal(record.RoundedDuration, 2);
if(record.ServiceDescription.Category.Percentage > 0 && record.ServiceDescription.Category.Percentage < 100)
{
rd = rd * record.ServiceDescription.Category.Percentage / 100;
}
@(record.GroupOid != null ? string.Format("{0:###0.#} ({0:###0.#})", rd) : string.Format("{0:###0.#} ({1:###0.#})", (record.End.Value - record.Start.Value).TotalMinutes, rd))
}
</td>
</tr>
@{
if(Model.ShowDistanceField && record.DistanceInMeter != null && record.DistanceInMeter.Value > 0)
{
<tr class="testklasse">
<td class="recordHeader">Gefahrene Kilometer:</td>
<td>@record.DistanceInMeter.ToString()</td>
</tr>
}
}
<tr class="testklasse" style="@{if (record.Goals != null && record.Goals.Count == 0) {@("display: none;")}}">
<td class="recordHeader">Ziele:</td>
<td>
@{
if(record.Goals != null)
{
foreach(var goal in record.Goals)
{
@(goal.TypeDescription)
if(record.Goals.IndexOf(goal) < record.Goals.Count - 1)
{
@(", ")
}
}
}
}
</td>
</tr>
<tr class="testklasse">
<td class="recordHeader">Leistungskategorie:</td>
<td>@record.ServiceDescription.CategoryName</td>
</tr>
<tr class="testklasse">
<td class="recordHeader">Leistung:</td>
<td>@record.ServiceDescription.Name</td>
</tr>
<tr class="testklasse">
<td class="recordHeader">Mitarbeiter:</td>
<td>@record.Employee</td>
</tr>
<tr class="testklasse">
<td class="recordHeader">Angelegt am:</td>
<td>@record.InsertedOn</td>
</tr>
@{
if(Model.Dokutypes.Length >= 1)
{
<tr class="testklasse" >
<td class="recordHeader">@Model.Dokutypes[0].TypeDescription:</td>
<td>@record.Notice</td>
</tr>
}
else if (record.Notice2 == null && record.Notice3 == null && record.Notice4 == null && record.Notice5 == null && Model.Dokutypes.Length == 0)
{
<tr class="testklasse" >
<td class="recordHeader">Dokumentation:</td>
<td>@record.Notice</td>
</tr>
}
else if (record.Notice2 != null || record.Notice3 != null || record.Notice4 != null || record.Notice5 != null)
{
<tr class="testklasse">
<td class="recordHeader">Dokumentation:</td>
<td>@record.Notice</td>
</tr>
}
}
@{if(record.Notice2 != null)
{
if (Model.Dokutypes.Length >= 2)
{
if (!record.Notice2.Equals("") && Model.Dokutypes[1] != null)
{
<tr class="testklasse">
<td class="recordHeader">@Model.Dokutypes[1].TypeDescription:</td>
<td> @record.Notice2</td>
</tr>
}
}
else if (!record.Notice2.Equals(""))
{
<tr class="testklasse">
<td class="recordHeader">Dokumentation 2:</td>
<td> @record.Notice2</td>
</tr>
}
}
if(record.Notice3 != null)
{
if(Model.Dokutypes.Length >= 3)
{
if(!record.Notice3.Equals("") && Model.Dokutypes[2] != null)
{
<tr class="testklasse">
<td class="recordHeader">@Model.Dokutypes[2].TypeDescription:</td>
<td> @record.Notice3</td>
</tr>
}
}
else if(!record.Notice3.Equals(""))
{
<tr class="testklasse">
<td class="recordHeader">Dokumentation 3:</td>
<td> @record.Notice3</td>
</tr>
}
}
if(record.Notice4 != null)
{
if(Model.Dokutypes.Length >= 4)
{
if(!record.Notice4.Equals("") && Model.Dokutypes[3] != null)
{
<tr class="testklasse">
<td class="recordHeader">@Model.Dokutypes[3].TypeDescription:</td>
<td> @record.Notice4</td>
</tr>
}
}
else if(!record.Notice4.Equals(""))
{
<tr class="testklasse">
<td class="recordHeader">Dokumentation 4:</td>
<td> @record.Notice4</td>
</tr>
}
}
if(record.Notice5 != null)
{
if(Model.Dokutypes.Length == 5)
{
if(!record.Notice5.Equals("") && Model.Dokutypes[4] != null)
{
<tr class="testklasse">
<td class="recordHeader">@Model.Dokutypes[4].TypeDescription:</td>
<td> @record.Notice5</td>
</tr>
}
}
else if(!record.Notice5.Equals(""))
{
<tr class="testklasse">
<td class="recordHeader">Dokumentation 5:</td>
<td> @record.Notice5</td>
</tr>
}
}
}
@{if(Model.ShowSignature)
{
<tr class="testklasse">
<td class="recordHeader">Unterschrieben:</td>
<td>@{if(record.SignatureOid == null || record.SignatureOid < 1)
{
@Html.Raw("NEIN")
}
else
{
@Html.Raw("JA")
}
}
</td>
</tr>}
}
</tbody>
</table>
</div>
</div>
}
</div>
</div>
<input value="@Model.ServiceRecordOid" id="ServiceRecordOIDSave" type="hidden" />
<input value="@Model.ErrorWert" id="ErrorZeiterfassungAfterCrashSchalter" type="hidden" />
<div class="modalWrapper"></div>
<div id="popupDiv">
<h4 id="popupTitle" class="center-aligned-text-element">Eintrag l&ouml;schen</h4>
<p id="popupText" class="center-aligned-text-element">Sind Sie sicher, dass Sie den Eintrag l&ouml;schen m&ouml;chten?</p>
<div id="popupBtnDiv" class="center-aligned-text-element">
@using (Html.BeginForm("DeleteServiceRecord", "Main", FormMethod.Post, new { id = "deletionForm" }))
{
<input type="button" class="popupBtn" value="OK" onclick="submitDeletionForm()" />
<input type="button" class="popupBtn" value="Abbrechen" onclick="togglePopup()" />
}
</div>
</div>
<div class="modalWrapper"></div>
<div id="errorPopupDiv">
<h4 id="errorPopupTitle" class="error-text">Fehler</h4>
<p id="errorPopupText" class="center-aligned-text-element">Ein Fehler ist aufgetreten</p>
<div id="errorPopupBtnDiv" class="center-aligned-text-element">
<input id="errorPopupOkBtn" type="button" class="popupBtn" value="OK" onclick="toggleErrorPopup('')" />
</div>
</div>
<div id="SuccessPopupDiv">
<h4 id="SuccessPopupTitle" style="text-align: center">Speichern erfolgreich</h4>
<p id="SuccessPopupText" class="center-aligned-text-element"></p>
<div id="SuccessPopupBtnDiv" class="center-aligned-text-element">
<input type="button" id="SuccessPopupOkBtn" class="SuccessPopupOkBtn" value="OK" onclick="toggleSuccessPopup(''), location.reload()" />
<input type="button" class="SuccessPopupUSchrift" value="Unterschreiben" onclick="showUnterschrift('', 1)"/>
</div>
</div>
<div id="AendernPopupDiv" style="display:none">
<p id="AendernPopupText" class="center-aligned-text-element"></p>
<div id="AendernPopupBtnDiv" class="center-aligned-text-element">
<input type="button" class="AendernPopupOkBtn" value="Ja" onclick="toggleUpdateAppointmentPopup(''), hideEditForm()" />
<input type="button" class="AendernPopupUSchrift" value="Nein" onclick="toggleUpdateAppointmentPopup('')" />
</div>
</div>
<div id="textModulePopupDivContainer" class="text-module-popup-div-background" onclick="hideTextModulePopup()"></div>
<div id="textModulePopupDiv" class="text-module-popup-div">
<div id="kollabierbar2" style="display: none; margin-right: 0; padding-right: 0;" class="kollabierbar-text-modules">
</div>
</div>
<div id="klienten">
<div class="combobox-label-parent">
@Html.LabelFor(m => m.SelectedCustomerOid)
<div class="styled-select-div">
@Html.DropDownListFor(m => m.SelectedCustomerOid, Model.CustomerListItems, new { onchange = "klientenLaden()", id = "customersDropDown", @class = "dropdownlist-for" })
</div>
</div>
<div id="klientenTabelle">
<div class="eigenschaftsdiv">
<h4>Eigenschaften</h4>
<hr />
<table class="width-inheriting-table">
<tr>
<td class="customer-td">Vorname:</td>
<td class="contentTd" id="KlientVorname" data-bind="text: vorname"></td>
</tr>
<tr>
<td class="customer-td">Nachname:</td>
<td class="contentTd" id="KlientNachname" data-bind="text: nachname"></td>
</tr>
<tr>
<td class="customer-td">Geburtstag:</td>
<td class="contentTd" id="KlientGeb" data-bind="text: geburtstag"></td>
</tr>
<tr>
<td class="customer-td">Geschlecht:</td>
<td class="contentTd" id="KlientSex" data-bind="text: geschlecht"></td>
</tr>
</table>
</div>
<div class="eigenschaftsdiv">
<h4 class="inline-display-element">Adresse</h4>
<input type="button" onclick="karteAnzeigen()" style="background-image:url(@Url.Content("~/Content/images/location-orange.svg"));background-repeat: no-repeat;background-position: center;background-size: 55%;background-color: transparent;margin-top:-0.6em;display:inline;width:auto;float:right;" />
<hr />
<table class="width-inheriting-table">
<tr>
<td class="customer-td">Adresszusatz:</td>
<td class="contentTd" id="KlientAdresse" data-bind="text: adresszusatz"></td>
</tr>
<tr>
<td class="customer-td">Stra&szlig;e:</td>
<td class="contentTd" data-bind="text: strasse" id="adressfeld"></td>
</tr>
<tr>
<td class="customer-td">PLZ:</td>
<td class="contentTd" data-bind="text: plz" id="plzfeld"></td>
</tr>
<tr>
<td class="customer-td">Ort:</td>
<td class="contentTd" data-bind="text: ort" id="ortfeld"></td>
</tr>
</table>
</div>
<div class="eigenschaftsdiv">
<h4>Rechnungsadresse</h4>
<hr />
<table class="width-inheriting-table">
<tr>
<td class="customer-td">Name:</td>
<td class="contentTd" id="KlientReName" data-bind="text: rechnungsadressename"></td>
</tr>
<tr>
<td class="customer-td">Stra&szlig;e:</td>
<td class="contentTd" id="KlientReStrasse" data-bind="text: rechnungsadressestrasse"></td>
</tr>
<tr>
<td class="customer-td">Postleitzahl:</td>
<td class="contentTd" id="KlientRePostleitzahl" data-bind="text: rechnungsadressepostleitzahl"></td>
</tr>
<tr>
<td class="customer-td">Ort:</td>
<td class="contentTd" id="KlientReOrt" data-bind="text: rechnungsadresseort"></td>
</tr>
</table>
</div>
<div class="eigenschaftsdiv">
<h4>Kontakt</h4>
<hr />
<table class="width-inheriting-table">
<tr>
<td class="customer-td">Handy:</td>
<td class="contentTd" id="KlientHandy">
<a style="color: black" data-bind="attr: { href: mobileLink, title: handy }, text: handy"></a>
</td>
</tr>
<tr>
<td class="customer-td">Telefon:</td>
<td class="contentTd" id="KlientTelefon">
<a style="color: black" data-bind="attr: { href: landLineLink, title: telefon }, text: telefon"></a>
</td>
</tr>
<tr>
<td class="customer-td">Fax:</td>
<td class="contentTd" id="KlientFax" data-bind="text: fax"></td>
</tr>
<tr>
<td class="customer-td">Mail:</td>
<td class="contentTd" id="KlientMail"><a style="color: black" data-bind="attr: { href: email, title: pureemail }, text: pureemail"></a></td>
</tr>
</table>
</div>
<!--############################################## Wohnheim gedöns #####################################################################################
<div class="eigenschaftsdiv" id="WohnheimContainer">
<h4>Wohnheim zugehörigkeit</h4>
<hr />
<table class="width-inheriting-table">
<tr>
<td class="customer-td">Name:</td>
<td class="contentTd" >a</td><!--data-bind="text: WohnheimName"
</tr>
<tr>
<td class="customer-td">Strasse:</td>
<td class="contentTd" >e</td>
</tr>
<tr>
<td class="customer-td">Postleitzahl:</td>
<td class="contentTd" >i</td>
</tr>
<tr>
<td class="customer-td">Ort:</td>
<td class="contentTd" >o</td>
</tr>
<tr>
<td class="customer-td">Bemerkung:</td>
<td class="contentTd" data-bind="text: WohnheimName" >u</td>
</tr>
</table>
</div>-->
</div>
<div style="padding-right: 1em;" id="kommentarContainer">
<h4 style="display: inline; color: #AB4A07;">Kommentar</h4>
<hr />
<pre data-bind="text: kommentar"></pre>
</div>
<div style="padding-right: 1em;" id="umfeldContainer">
<h4 style="display: inline; color: #AB4A07;">Umfeld</h4>
<hr />
<div data-bind="foreach: umfeldpersonen" style="width: inherit;">
<div class="collapsible-container">
<input type="button" class="toggle-btn2" data-bind="value: formattedName" />
<div style="display: none;" class="kollabierbar">
<table class="width-inheriting-table">
<tbody>
<tr class="testklasse">
<td class="customer-td">Rolle:</td>
<td class="contentTd" data-bind="text: umfrolle"></td>
</tr>
<tr class="testklasse">
<td class="customer-td">Adresse:</td>
<td class="contentTd" data-bind="text: umfstrnr"></td>
</tr>
<tr class="testklasse">
<td class="customer-td"></td>
<td class="contentTd" data-bind="text: umfplzort"></td>
</tr>
<tr class="testklasse">
<td class="customer-td">Tel.:</td>
<td class="contentTd">
<a style="color: black" data-bind="attr: { href: umftelnr, title: nurtelnr }, text: nurtelnr"></a>
</td>
</tr>
<tr class="testklasse">
<td class="customer-td">Mobil:</td>
<td class="contentTd">
<a style="color: black" data-bind="attr: { href: umfmobil, title: nurmobil }, text: nurmobil"></a>
</td>
</tr>
<tr class="testklasse">
<td class="customer-td">E-Mail</td>
<td class="contentTd">
<a style="color: black" data-bind="attr: { href: umfemail, title: nuremail }, text: nuremail"></a>
</td>
</tr>
<tr class="testklasse">
<td class="customer-td">Fax:</td>
<td class="contentTd" data-bind="text: umffax"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div id="Kalender">
<div class="margin-div">
<div id='KalenderNavigation' style="display: none;">
<table>
<tr>
<td class="navigation-table-td">
<input id="VorherigerTag" type="button" onclick="previousDayButtonClick()" />
</td>
<td class="navigation-table-td">
<input id="KalenderDatumFormat" class="date-input-css" style="font-weight: bold;" onchange="selectDate()" type="button" />
</td>
<td class="navigation-table-td">
<input id="NaechsterTag" type="button" onclick="nextDayButtonClick()" />
<input id="KalenderDatum" type="button" style="display: none;" disabled />
</td>
<td>
<input id="NeuenTerminAnlegen" type="button" onclick="initAppointmentEditForm()" />
</td>
</tr>
</table>
</div>
<div style="display: none;" id="AppointmentEditForm">
<table>
<tr>
<td>
<div class="input-wrapper cell-content" style="margin-top: 1em; margin-right: .15em">
<input class="floating-label-input date-input-css" id="StartDate" name="Datum" onchange="showUsAendern()" />
<label class="floating-label" for="StartDate">Start</label>
</div>
</td>
<td>
<div class="input-wrapper cell-content" style="margin-top: 1em; margin-left: .15em">
<input class="floating-label-input" id="TerminStartZeit" name="Startzeit" onchange="showUsAendern()"/>
<label class="floating-label" for="TerminStartZeit"></label>
</div>
</td>
</tr>
<tr>
<td>
<div class="input-wrapper cell-content" style="margin-top: 1em; margin-right: .15em">
<input class="floating-label-input date-input-css" id="EndDate" name="Datum" onchange="showUsAendern()" />
<label class="floating-label" for="EndDate">Ende</label>
</div>
</td>
<td>
<div class="input-wrapper cell-content" style="margin-top: 1em; margin-left: .15em">
<input class="floating-label-input" id="TerminEndZeit" name="Endzeit" onchange="showUsAendern()" />
<label class="floating-label" for="TerminEndZeit"></label>
</div>
</td>
</tr>
<tr>
<td colspan="2">
<div class="input-wrapper cell-content" style="margin-top: 1em;">
<input class="floating-label-input" id="TerminBetreff" name="Betreff" onchange="showUsAendern()" />
<label class="floating-label" for="TerminBetreff">Betreff</label>
</div>
</td>
</tr>
<tr>
<td colspan="2">
<div class="input-wrapper cell-content" style="margin-top: 1em; height: 150px;">
<textarea class="floating-label-input" style="height: 150px;" id="TerminNotiz" name="Notiz" onchange="showUsAendern()"></textarea>
<label class="floating-label" for="TerminNotiz">Notiz</label>
</div>
</td>
</tr>
<tr>
<td style="padding-right: .3em; width: 50%;">
<input type="button" value="Abbrechen" id="TerminSpeichernAbbrechen" onclick="showUsVerwerfen()" style="width: 100%;" />
</td>
<td style="padding-left: .3em; width: 50%;">
<input type="button" value="Speichern" id="TerminSpeichern" onclick="updateAppointmentOnClick()" style="width: 100%;" />
<input type="button" value="Speichern" id="InsertAppointmentButton" onclick="insertAppointmentOnClick()" style="width: 100%;" />
</td>
</tr>
</table>
</div>
<table id="KalenderTable"></table>
<br />
<table id="KalenderTableTask"></table>
</div>
</div>
<input value="@Html.Raw("false")" id="AenderePopupDivSchalter" type="hidden" />
<div id="UnterschriftBereich" style="display: none" align="center">
<h2>Unterschrift</h2>
<div onload="preloadData()">
<input class="floating-label-input" id="UnterschriftHilfeplan" readonly name="Hilfeplan" />
<input class="floating-label-input" id="UnterschriftEmployee" readonly name="Mitarbeiter" />
<input class="floating-label-input" id="UnterschriftKategorie" readonly name="Kategorie" />
<input class="floating-label-input" id="UnterschriftLeistung" readonly name="Leistung" />
<input class="floating-label-input" id="UnterschriftDatum" readonly name="Datum/Uhrzeit" />
<input id="SaveRecordOID" readonly name="OID" style="display: none" />
<p id="Geologie"></p>
<input type="button" style="width: 100px;" onclick="loescheUnterschrift(canvas, ctx)" value="Neu" />
<input type="button" style="width: 100px;" onclick="speichereUnterschrift()" value="Speichern" />
<input type="button" style="width: 100px;" onclick="backToZeiterfassung()" value="Abbrechen" />
</div>
<div>
<canvas id="sketchpad" height="150" style="cursor: default; border-color: black; margin-top: 1em;" width="325"></canvas>
</div>
</div>
<div id="SupportStatistik" style="display: none" align="center" >
<div>
<h5 id="StatisticUberschrift" name="uberschrift"></h5>
<p id="supportConceptStatisticsProvided"></p>
<p id="supportConceptStatisticsApproved"></p>
<p id="supportConceptStatisticsFree"></p>
</div>
<div id="statisticsChartContainer">
<div style=" width: 100%; margin: 2px;">
<fieldset>
<legend>Legende</legend>
<hr style="border: none; width: 8%; height: 30px; margin: 1px; color: #48FF31; background: #48FF31; float:left;" /><input type="text" style="width:90%; float:right; height:35px; text-align:center;" id="LegendStatistic1" readonly>
<br />
<br />
<hr style="width: 8%; height: 30px; margin: 1px; color: #EE4345; background: #EE4345; float:left;" /><input type="text" style="width:90%; float:right; height:35px; text-align:center;" id="LegendStatistic2" readonly>
</fieldset>
</div>
<canvas id="myChart" scaleheight="65%" scalewidth="65%"></canvas>
<input type="button" value="Zurück" onclick="goBackToZeiterfassung(), location.reload()" style="width: 100%;" />
</div>
</div>
<script>
getSelectedRecordInformationUrl = '@Url.Action("GetSelectedRecordInformation")';
setSelectedServiceRecordUrl = '@Url.Action("SetSelectedServiceRecord")';
setServiceDescriptionUrl = '@Url.Action("SetServiceDescription")';
updateGoalsUrl = '@Url.Action("UpdateGoals")';
loadServiceCategoriesUrl = '@Url.Action("LoadServiceCategories")';
loadServiceRecordsUrl = '@Url.Action("LoadServiceRecords")';
loadGoalsUrl = '@Url.Action("LoadGoals")';
setRecordForDeletionUrl = '@Url.Action("SetRecordOidToDelete")';
checkRightsUrl = '@Url.Action("CheckRights")';
getSelectedCustomerUrl = '@Url.Action("GetSelectedCustomer")';
loadAppointmentsUrl = '@Url.Action("LoadAppointments")';
loadBewoTasksUrl = '@Url.Action("LoadBeWoTasks")';
insertAppointmentUrl = '@Url.Action("InsertAppointment")';
setSelectedUnterschriftUrl = '@Url.Action("SaveUnterschrift")';
setServiceRecordEmployeeUrl = '@Url.Action("SetServiceRecordEmployee")';
toggleIconUContentUrl = '@Url.Content("~/Content/images/toggle-icon-u.svg")';
toggleIconDContentUrl = '@Url.Content("~/Content/images/toggle-icon-d.svg")';
redirectLink = '@Url.Action("Index", "Login")';
getSupportConceptCustomerUrl = '@Url.Action("GetSelectedSupportConceptCustomer")';
getSelectedRecordInformationUrlWithOid = '@Url.Action("GetSelectedRecordInformationWithOid")';
loadStatisticsUrl = '@Url.Action("LoadStatistics")';
updateAppointmentUrl = '@Url.Action("UpdateAppointment")';
saveZeiterfassungAfterCrashUrl = '@Url.Action("SaveZeiterfassungAfterCrash")';
CheckRightsAfterCrashUrl = '@Url.Action("CheckRightsAfterCrash")';
ErrorZeiterfassungAnzeigenUrl = '@Url.Action("ErrorZeiterfassungAnzeigen")';
LogoutUrl = '@Url.Action("Logout")';
LoadSessionSettingsFromBWPUrl = '@Url.Action("LoadBWPSettings")';
CheckEndDateUrl = '@Url.Action("CheckEndDate")';
CheckDokuReiterUrl = '@Url.Action("CheckDokuReiter")';
SetSaveSignatureUrl = '@Url.Action("SetSaveSignature")';
loadTextbausteineForCategoryUrl = '@Url.Action("LoadTextbausteineForServiceCategory")';
loadCompleteTextbausteinByOidUrl = '@Url.Action("LoadCompleteTextbausteinByOid")';
addSupportConceptForGruppenbuchungUrl = '@Url.Action("AddSupportConceptToGruppenbuchung")';
addEmployeeForGruppenbuchungUrl = '@Url.Action("AddEmployeeToGruppenbuchung")';
removeSupportConceptFromGruppenbuchungUrl = '@Url.Action("RemoveSupportConceptFromGruppenbuchung")';
removeEmployeeFromGruppenbuchungUrl = '@Url.Action("RemoveEmployeeFromGruppenbuchung")';
setGroupbookinModeUrl = '@Url.Action("SetGroupBookingMode")';
setSelectedGroupServiceRecordUrl = '@Url.Action("SetSelectedGroupServiceRecord")';
resetEditingModeUrl = '@Url.Action("ResetEditingMode")';
loadCategoryAndDescriptionUrl = '@Url.Action("LoadCategoryAndDescription")';
focusedDokuTextarea = null;
$.ajax({
type: "GET",
url: CheckDokuReiterUrl,
success: function (json) {
var s = $.parseJSON(json);
var x = s.length;
if (x === 0) {
window.focusedDokuTextarea = $("#notiz_textbox");
} else {
window.focusedDokuTextarea = $("#notiz_textbox1");
}
}
});
$(".toggle-btn").click(function () {
toggleOnclick(this);
});
serviceRecordEmployeeOid = '@Model.Employee.EmployeeOid';
function karteAnzeigen() {
var blubb = $("#adressfeld").html().split(' ');
var strString = "";
for(var it = 0; it < blubb.length; it++) {
strString += blubb[it];
if(it < blubb.length - 1) {
strString += "+";
}
}
strString += ',' + $("#plzfeld").html()+$("#ortfeld").html();
window.open("https://www.google.de/maps/place/" + strString);
}
@{
if(Model.IsInGroupBookingMode && Model.IsInEditingMode && Model.SelectedServiceRecord != null)
{
@Html.Raw("$(function() {" +
"adjustLabel(\"distance_textbox\");" +
"adjustLabel(\"duration_textbox\");" +
"adjustLabel(\"start_textbox\");" +
"adjustLabel(\"ende_textbox\");" +
"adjustLabel(\"enddatum_textbox\");" +
"});")
}
}
</script>