Mobilklient:

- Ziele funktionieren
 - Hilfeplanauswahl optisch überarbeitet
This commit is contained in:
Lyndon
2019-07-19 17:13:57 +02:00
parent f8d11f2762
commit b695d152e0
19 changed files with 427 additions and 217 deletions

View File

@@ -2086,7 +2086,7 @@
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Chat\ChatController\ChatController.csproj">
<ProjectReference Include="..\..\Chat\ChatController\ChatController.csproj">
<Project>{8a83c4dc-a0b1-4a51-ae1d-366d7a05b298}</Project>
<Name>ChatController</Name>
</ProjectReference>

View File

@@ -202,7 +202,7 @@ namespace BeWo.View.Detail.Report
}
if (entryDC.Customer == null)
{
if (entryDC.Type == FlexibleReportEntryType.FullEntry)
if (entryDC.Type == FlexibleReportEntryType.ServiceRecordEntry)
{
returnValue.Customer = "<Nicht angegeben>";
}
@@ -218,7 +218,7 @@ namespace BeWo.View.Detail.Report
if (entryDC.Employee == null)
{
if (entryDC.Type == FlexibleReportEntryType.FullEntry)
if (entryDC.Type == FlexibleReportEntryType.ServiceRecordEntry)
{
returnValue.Employee = "<Nicht angegeben>";
}

View File

@@ -1709,15 +1709,15 @@ namespace BeWo.View
if (!_Code.Equals(""))
{
Login _login = new Login(_kundennummer, _Code, _benutzername, _passwort, _apikey);
//Login _login = new Login(_kundennummer, _Code, _benutzername, _passwort, _apikey);
var x = _login.AnmeldevorgangDurchFuehren();
//var x = _login.AnmeldevorgangDurchFuehren();
if (x != null)
{
ServiceChatView = new ChatView(x);
ServiceChatView.Show();
}
//if (x != null)
//{
// ServiceChatView = new ChatView(x);
// ServiceChatView.Show();
//}
}
else
{
@@ -1729,23 +1729,23 @@ namespace BeWo.View
MessageBox.Show("Sie benötigen einen gültigen Zugang zum Chat. Bitte wenden Sie sich an den Support.", "Info");
}
}
else if (ServiceChatView.Visibility == Visibility.Visible)
{
ServiceChatView.Visibility = Visibility.Hidden;
}
else if (ServiceChatView.Visibility == Visibility.Hidden)
{
ServiceChatView.Visibility = Visibility.Visible;
//else if (ServiceChatView.Visibility == Visibility.Visible)
//{
// ServiceChatView.Visibility = Visibility.Hidden;
//}
//else if (ServiceChatView.Visibility == Visibility.Hidden)
//{
// ServiceChatView.Visibility = Visibility.Visible;
if (ServiceChatView.WindowState == WindowState.Minimized)
{
ServiceChatView.WindowState = WindowState.Normal;
ServiceChatView.Height = 700;
ServiceChatView.Width = 900;
}
// if (ServiceChatView.WindowState == WindowState.Minimized)
// {
// ServiceChatView.WindowState = WindowState.Normal;
// ServiceChatView.Height = 700;
// ServiceChatView.Width = 900;
// }
ServiceChatView.Activate();
}
// ServiceChatView.Activate();
//}
//#endif
}

View File

@@ -177,6 +177,7 @@
</Compile>
<Compile Include="Util\JSONCustomer.cs" />
<Compile Include="Util\MobileUtils.cs" />
<Compile Include="Util\ReferenceNumberWithNotice.cs" />
<Compile Include="Util\ServiceRecord2Validation.cs" />
<Compile Include="Util\TextbausteinDisplayItem.cs" />
<Compile Include="Util\Umfeldsperson.cs" />
@@ -213,6 +214,7 @@
<Content Include="Scripts\calendar.js" />
<Content Include="Scripts\dateHelper.js" />
<Content Include="Scripts\datepicker.js" />
<Content Include="Scripts\goals.js" />
<Content Include="Scripts\gruppenbuchung.js" />
<Content Include="Scripts\initialization.js" />
<Content Include="Scripts\localServiceRecord.js" />
@@ -220,6 +222,7 @@
<Content Include="Scripts\modernizr-2.8.3.js" />
<Content Include="Scripts\serviceRecordValidation.js" />
<Content Include="Scripts\statistics.js" />
<Content Include="Scripts\supportConceptDropDown.js" />
<Content Include="Scripts\textbausteine.js" />
<Content Include="Scripts\unterschrift.js" />
<Content Include="Scripts\utils.js" />

View File

@@ -173,7 +173,7 @@ span {
margin-top: .2em;
margin-bottom: 0;
border: 1px solid #E6E6E6;
padding: 5px 0px;
padding: 5px 0;
border-radius: 0;
background-image: url("images/toggle-icon-d.svg");
background-repeat: no-repeat;
@@ -815,11 +815,6 @@ input[type="checkbox"] {
margin-top: .25em;
}
/*#groupBookingOpenPopupBtn {
margin-bottom: 1em;
margin-top: .5em;
}*/
.group-booking-tab {
overflow: hidden;
}
@@ -867,6 +862,14 @@ input[type="checkbox"] {
background-color: #f0f0f0;
}
.tab-content-2 table tr:nth-child(4n-1) {
background-color: #f0f0f0;
}
.tab-content-2 table tr:nth-child(4n+0) {
background-color: #f0f0f0;
}
#employeeCollapsible, #groupBookingCollapsible {
overflow-y: auto;
}
@@ -892,6 +895,7 @@ input[type="checkbox"] {
width: 20%;
font-size: 13px;
color: #555555;
white-space: normal;
}
.doku-tab-link.active {
@@ -967,4 +971,66 @@ input[type="checkbox"] {
#aktenzeichenTable tr:last-child hr {
display: none;
}
#supportConceptListContainer {
display: none;
width: 90%;
height: auto;
max-height: 90%;
background-color: white;
z-index: 900;
margin: 0;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
padding: .5em .5em 0 .5em;
overflow-y: scroll;
}
.supportConceptDiv {
display: block;
background-color: #E6E6E6;
color: #555555;
margin-bottom: .35em;
}
.supportConceptDiv:active {
background-color: #FF5A00;
}
.listP {
font-size: 13px;
padding: 0 0.5em;
margin: 0;
min-height: 13px;
}
.expiredSupportConceptSpan {
color: red;
}
.isAboutToExpireSpan {
color: #FF9400;
}
#supportConceptSelectionButton {
margin-bottom: .5em;
padding-right: 1em;
white-space: normal;
}
#hidingModalWrapper {
display: none;
position: absolute;
width: 100%;
height: 100%;
z-index: 899;
background-color: gray;
opacity: .9;
top: 0;
left:0;
bottom:0;
right:0;
}

View File

@@ -179,6 +179,11 @@ namespace BeWoPlanerMobil.Controllers
{
Model.IsServiceRecordNoticeMandatory = true;
}
if(Model.SelectedSupportConceptListObject == null)
{
Model.SelectedSupportConceptListObject = Model.SupportConceptListObjects.First();
}
}
catch (Exception e)
{
@@ -1649,7 +1654,9 @@ namespace BeWoPlanerMobil.Controllers
a.CostBearer2SupportConceptOid.Value.Equals(Model.CostBearer2SupportConceptOid)));
if(Model.SelectedSupportConcept != null)
{
{
Model.SelectedSupportConceptListObject = Model.SupportConceptListObjects.First(f => long.Parse(f.CostBearer2SupportConceptOid) == cb2scOid);
var details = OperationsService.GetSupportConceptTreeNodeDetailInfo(Model.SelectedSupportConcept.Customer.CustomerOid, Model.SelectedSupportConcept.SupportConceptOid, Model.CostBearer2SupportConceptOid);
Model.ServiceCategories = details.ServiceAccountings.Count > 0
@@ -1659,13 +1666,15 @@ namespace BeWoPlanerMobil.Controllers
Model.ServiceCategories = Model.ServiceCategories.Where(c => !c.OhneHilfeplan.HasValue || c.OhneHilfeplan.Value == AccountingvisibilityType.Beides || c.OhneHilfeplan.Value == AccountingvisibilityType.NurKlientenbezogen).ToList();
}
else if(cb2scOid == -2)
{
{
Model.SelectedSupportConceptListObject = Model.SupportConceptListObjects.First(f => f.CostBearer2SupportConceptOid.Equals(cb2scOid.ToString()));
Model.ServiceCategories = CreateServiceCategoryModels(OperationsService.GetAllServiceDescriptions());
Model.ServiceCategories = Model.ServiceCategories.Where(c => !c.OhneHilfeplan.HasValue || c.OhneHilfeplan.Value == AccountingvisibilityType.Beides || c.OhneHilfeplan.Value == AccountingvisibilityType.NichtKlientenbezogen).ToList();
}
else if(cb2scOid == -1)
{
Model.ServiceCategories.Clear();
Model.SelectedSupportConceptListObject = Model.SupportConceptListObjects.First(f => f.CostBearer2SupportConceptOid.Equals(cb2scOid.ToString()));
Model.ServiceCategories.Clear();
}
Model.Zeitraum = 7;
@@ -1716,7 +1725,7 @@ namespace BeWoPlanerMobil.Controllers
return _LeerzeichenFuerGetMethoden;
}
public string UpdateGoals(long pGoalOid)
public string UpdateGoals(string pGoalOids)
{
if (Model == null)
{
@@ -1730,25 +1739,12 @@ namespace BeWoPlanerMobil.Controllers
return _LeerzeichenFuerGetMethoden;
}
var goal = sc.Goals.FirstOrDefault(first => first.ValueListEntryOid.HasValue && first.ValueListEntryOid.Value.Equals(pGoalOid));
if (goal == null) //Parent Goal wurde ausgewählt
{
//Model.
}
if (Model.SelectedGoals == null)
{
Model.SelectedGoals = new List<ValueListEntryDC> { goal };
return _LeerzeichenFuerGetMethoden;
}
var splitOids = pGoalOids.Split(';');
var selectedGoalOids = splitOids.Select(long.Parse).ToList();
if (Model.SelectedGoals.Contains(goal))
{
Model.SelectedGoals.Remove(goal);
}
else
{
Model.SelectedGoals.Add(goal);
}
var goals = sc.Goals.Where(w => w.ValueListEntryOid.HasValue && selectedGoalOids.Contains(w.ValueListEntryOid.Value)).ToList();
Model.SelectedGoals = goals;
return _LeerzeichenFuerGetMethoden;
}

View File

@@ -135,6 +135,24 @@ namespace BeWoPlanerMobil.Models
}
}
public IEnumerable<SupportConceptListObject> SupportConceptListObjects
{
get
{
var allCostBearerRelations = new List<SupportConceptListObject> {new SupportConceptListObject("Hilfeplan auswählen", "", "-1", false, false), new SupportConceptListObject("Ohne Hilfeplan", "", "-2", false, false) };
foreach(var sc in SupportConcepts.OrderBy(sc => sc.Customer.LastName))
{
allCostBearerRelations.AddRange(sc.CostBearerRelations.Where(w => ShowExpiredSupportConcepts || w.EndDate == null || w.EndDate.Value >= DateTime.Now).Select(
cb => new SupportConceptListObject($"{sc.Customer.LastNameFirstName} {(sc.Customer.DateOfBirth.HasValue ? "*" + sc.Customer.DateOfBirth.Value.ToString("dd.MM.yyyy") : string.Empty)}", $"{cb.StartDate?.ToShortDateString().Remove(6, 2) ?? string.Empty}-{cb.EndDate?.ToShortDateString().Remove(6, 2) ?? string.Empty} {cb.CostBearer.Name}", cb.CostBearer2SupportConceptOid.ToString(), cb.SupportConcept.IsAboutToExpire, cb.SupportConcept.ExpiresIn3MonthOrLess))
);
}
return allCostBearerRelations;
}
}
public SupportConceptListObject SelectedSupportConceptListObject { get; set; }
public List<SupportConceptCostBearerRelDC> SelectedConceptCostBearerRelations { get; set; }
public IEnumerable<CustomSelectListItem> SelectedRelations
@@ -186,6 +204,23 @@ namespace BeWoPlanerMobil.Models
}
}
public IEnumerable<SupportConceptListObject> SupportConceptListObjectsForGroupBooking
{
get
{
var allCostbearerRelations = new List<SupportConceptListObject>();
foreach(var sc in SupportConcepts.OrderBy(sc => sc.Customer.LastName))
{
allCostbearerRelations.AddRange(sc.CostBearerRelations.Where(w => ShowExpiredSupportConcepts || w.EndDate == null || w.EndDate.Value >= DateTime.Now).Select(
cb => new SupportConceptListObject($"{sc.Customer.LastNameFirstName} {(sc.Customer.DateOfBirth.HasValue ? "*" + sc.Customer.DateOfBirth.Value.ToString("dd.MM.yyyy") : string.Empty)}", $"{cb.StartDate?.ToShortDateString().Remove(6, 2) ?? string.Empty}-{cb.EndDate?.ToShortDateString().Remove(6, 2) ?? string.Empty} {cb.CostBearer.Name}", cb.CostBearer2SupportConceptOid.ToString(), cb.SupportConcept.IsAboutToExpire, cb.SupportConcept.ExpiresIn3MonthOrLess))
);
}
return allCostbearerRelations;
}
}
public IEnumerable<SelectListItem> ServiceCategoryListItems
{
get
@@ -348,4 +383,48 @@ namespace BeWoPlanerMobil.Models
TextColor = pTextColor;
}
}
public class SupportConceptListObject
{
public string NameAndDateOfBirth { get; set; }
public string SupportConceptTimeSpan { get; set; }
public string CostBearer2SupportConceptOid { get; set; }
public string CostBearer2SupportConceptOidName { get; set; }
public string SpanColor { get; set; } = string.Empty;
public string DisplayString
{
get
{
if(string.IsNullOrEmpty(SupportConceptTimeSpan))
{
return NameAndDateOfBirth;
}
return $"{NameAndDateOfBirth ?? string.Empty} | {SupportConceptTimeSpan}";
}
}
public SupportConceptListObject(string pNameAndDateOfBirth, string pSupportConceptTimeSpan, string pCostBearer2SupportConceptOid, bool isAboutToExpire, bool isAboutToExpireIn3MonthsOrLess)
{
NameAndDateOfBirth = pNameAndDateOfBirth;
SupportConceptTimeSpan = pSupportConceptTimeSpan;
CostBearer2SupportConceptOid = pCostBearer2SupportConceptOid;
CostBearer2SupportConceptOidName = "OidHolder_" + CostBearer2SupportConceptOid;
if(isAboutToExpire)
{
SpanColor = "style=\"color: red;\"";
}
else if(isAboutToExpireIn3MonthsOrLess)
{
SpanColor = "style=\"color: #FF9400;\"";
}
}
}
}

View File

@@ -0,0 +1,112 @@
function buildCollapsibleSet(jsonString) {
try {
if(jsonString.length < 2) {
return;
}
var kollektion = $.parseJSON(jsonString);
actuallyBuildCollapsibleSet(kollektion, null);
} catch(exception) {
console.log("Fehler(BuildCollapsibleSet): " + exception.message);
}
}
function actuallyBuildCollapsibleSet(kollektion, selectedGoalOids) {
var kollabierbar1 = $("#kollabierbar1");
kollabierbar1.empty();
collapsibleHtml = "";
$.each(kollektion, function (index) {
buildGoalTreeItem(kollektion[index], selectedGoalOids);
});
kollabierbar1.append(collapsibleHtml);
}
var collapsibleHtml;
function buildGoalTreeItem(goalItem, selectedGoalOids) {
var goalOid = goalItem.ValueListEntryOid;
var goalHeader = goalItem.Header;
var isChecked = selectedGoalOids !== null && isElementInArray(selectedGoalOids, goalOid) ? "checked" : "";
if (!goalItem.IsLeaf) {
collapsibleHtml += '<div onclick="toggleOnclick(this);" class="toggle-btn-div" style="margin-right: 0; padding-right: 0;display: block;"><input type="checkbox" style="width: auto;" onclick="updateChildGoals(' + goalOid + ', this);event.stopPropagation();" id="goal' + goalOid + '" value="' + goalOid + '" ' + isChecked + ' />' + goalHeader + '</div>';
collapsibleHtml += '<div style="margin-right: 0; padding-right: 0;display: none;" class="kollabierbar">';
try {
$.each(goalItem.Children,
function(index) {
buildGoalTreeItem(goalItem.Children[index], selectedGoalOids);
});
} catch(exception) {
console.log('Fehler bei der Baumkonstruktion: ' + exception.message);
}
collapsibleHtml += "</div>";
} else {
collapsibleHtml += '<div style="margin-right: 0; padding-right: 0;display: block;"><input type="checkbox" style="width: auto;" onclick="updateGoals(' + goalOid + ')" id="' + goalOid + '" value="' + goalHeader + '" ' + isChecked + ' />' + goalHeader + '</div>';
}
}
function loadGoalsOnSuccess(json) {
if (json === "SessionTimeout") {
window.location.href = redirectLink;
return;
}
buildCollapsibleSet(json);
}
function loadGoals(actionPath) {
var selectedServiceRecord = $($("#scDropDown")).find(":selected").val();
if (selectedServiceRecord === -1) {
return;
}
makeAjaxCall("GET", actionPath, loadGoalsOnSuccess, { pCostbearer2SupportConceptOid: selectedServiceRecord }, null);
}
function updateGoals() {
var selectedGoals = getSelectedGoals();
makeAjaxCall("GET", updateGoalsUrl, null, { pGoalOids: selectedGoals }, null);
}
function updateChildGoals(goalOid, element) {
var clickedElement = $(element);
var next = clickedElement.parent().next("div").find("input");
if(next !== null || next !== undefined) {
$.each(next, function(index, item) {
$(item).prop("checked", clickedElement.prop("checked") === true);
});
}
updateGoals();
}
function getSelectedGoals() {
var rootElement = $("#kollabierbar1");
var checkboxes = rootElement.find("input");
var selectedGoals = "";
$.each(checkboxes, function(index, checkbox) {
var box = $(checkbox);
var id = box.attr("id");
if(box.prop("checked") === true && !id.includes("goal")) {
selectedGoals += id + ";";
}
});
return selectedGoals.substr(0, selectedGoals.length - 1);
}

View File

@@ -102,17 +102,20 @@ function initBeWoMobile(actionPath) {
return;
}
$("#kategorien_select").val(serviceCategoryOid);
var kategorienSelect = $("#kategorien_select");
kategorienSelect.val(serviceCategoryOid);
var liste = $.parseJSON(result);
$("#leistungen_select").empty();
$("#leistungen_select").val("");
var leistungenSelect = $("#leistungen_select");
leistungenSelect.empty();
leistungenSelect.val("");
$.each(liste, function (index, leistung) {
$("#leistungen_select").append('<option value="' + leistung.ServiceDescriptionOid + '">' + leistung.Name + '</option>');
leistungenSelect.append('<option value="' + leistung.ServiceDescriptionOid + '">' + leistung.Name + '</option>');
});
$("#leistungen_select").val(serviceDescriptionOid);
leistungenSelect.val(serviceDescriptionOid);
makeAjaxCall("GET", window.setServiceDescriptionUrl, function () {
hideSanduhr();
@@ -182,7 +185,7 @@ function initBeWoMobile(actionPath) {
var employeesTableHasEntries = $("#employeeCollapsible input:checked").length;
if (isInGroupBookingMode()) {
var value = supportConceptTableHasEntries > 0 && employeesTableHasEntries > 0 ? false : true;
var value = !(supportConceptTableHasEntries > 0 && employeesTableHasEntries > 0);
$("#anlegenEditierenBtn").prop("disabled", value);
}
@@ -272,7 +275,7 @@ function initializeDocumentationTextareas() {
}
}
$(".doku-tab-link").css("height", height + "px");
//$(".doku-tab-link").css("height", height + "px");
}
if (numberOfDocumentationTypes > 0) {

View File

@@ -1,79 +1,7 @@
var ZeiterfassungDatakonstrukt = [];
var KlientDatakonstrukt = [];
var klientzwischenspeicher = [];
var timeOut = 10000;
function buildCollapsibleSet(jsonString) {
try {
if(jsonString.length < 2) {
return;
}
var kollektion = $.parseJSON(jsonString);
actuallyBuildCollapsibleSet(kollektion, null);
} catch(exception) {
console.log("Fehler(BuildCollapsibleSet): " + exception.message);
}
}
function actuallyBuildCollapsibleSet(kollektion, selectedGoalOids) {
$("#kollabierbar1").empty();
collapsibleHtml = "";
$.each(kollektion, function (index) {
buildGoalTreeItem(kollektion[index], selectedGoalOids);
});
$("#kollabierbar1").append(collapsibleHtml);
}
var level = 0;
var collapsibleHtml;
zeitRegEx = /^(2[0-3]|[01]?[0-9])(:|,|\.|#|;)?([0-5][0-9])$/;
function buildGoalTreeItem(goalItem, selectedGoalOids) {
var goalOid = goalItem.ValueListEntryOid;
var goalHeader = goalItem.Header;
var isChecked = selectedGoalOids !== null && isElementInArray(selectedGoalOids, goalOid) ? "checked" : "";
if (!goalItem.IsLeaf) {
//collapsibleHtml += '<input type="checkbox" style="width: auto;" onclick="updateGoals(' + goalOid + ')" id="' + goalOid + '" value="' + goalHeader + '" ' + isChecked + '/><label class="toggle-btnLabel" for="' + goalHeader + '">' + goalHeader + '</label>';
collapsibleHtml += '<div onclick="toggleOnclick(this);" class="toggle-btn-div" style="margin-right: 0; padding-right: 0;display: block;"><input type="checkbox" style="width: auto;" onclick="updateChildGoals(' + goalOid + ');event.stopPropagation();" id="goal' + goalOid + '" value="' + goalOid + '" ' + isChecked + ' />' + goalHeader + '</div>';
//collapsibleHtml += '<input onclick="toggleOnclick(this);" type="button" class="toggle-btn" value="' + goalHeader + '" style="margin-right: 0; padding-right: 0;" />';
collapsibleHtml += '<div style="margin-right: 0; padding-right: 0;display: none;" class="kollabierbar">';
try {
$.each(goalItem.Children,
function(index) {
buildGoalTreeItem(goalItem.Children[index], selectedGoalOids);
});
} catch(exception) {
console.log('Fehler bei der Baumkonstruktion: ' + exception.message);
}
collapsibleHtml += "</div>";
} else {
collapsibleHtml += '<div style="margin-right: 0; padding-right: 0;display: block;"><input type="checkbox" style="width: auto;" onclick="updateGoals(' + goalOid + ')" id="' + goalOid + '" value="' + goalHeader + '" ' + isChecked + ' />' + goalHeader + '</div>';
}
}
function loadGoalsOnSuccess(json) {
if (json === "SessionTimeout") {
window.location.href = redirectLink;
return;
}
buildCollapsibleSet(json);
}
function loadServiceDescriptionsOnSuccess(json) {
if (json === "SessionTimeout") {
window.location.href = window.redirectLink;
@@ -81,16 +9,17 @@ function loadServiceDescriptionsOnSuccess(json) {
}
var liste = $.parseJSON(json);
var leistungenSelect = $("#leistungen_select");
$("#leistungen_select").empty();
$("#leistungen_select").val("");
leistungenSelect.empty();
leistungenSelect.val("");
$.each(liste, function (index, leistung) {
$("#leistungen_select").append('<option value="' + leistung.ServiceDescriptionOid + '">' + leistung.Name + "</option>");
leistungenSelect.append('<option value="' + leistung.ServiceDescriptionOid + '">' + leistung.Name + "</option>");
});
if(liste[0] !== undefined) {
$("#leistungen_select").val(liste[0].ServiceDescriptionOid);
leistungenSelect.val(liste[0].ServiceDescriptionOid);
makeAjaxCall("GET", window.setServiceDescriptionUrl, null, { pServiceDescriptionOid: liste[0].ServiceDescriptionOid }, null);
}
@@ -123,16 +52,6 @@ function resizeLabelColumns() {
$("#tabLbl").css("width", $("#zieleLbl").css("width"));
}
function loadGoals(actionPath) {
var selectedServiceRecord = $($("#scDropDown")).find(":selected").val();
if (selectedServiceRecord === -1) {
return;
}
makeAjaxCall("GET", actionPath, loadGoalsOnSuccess, { pCostbearer2SupportConceptOid: selectedServiceRecord }, null);
}
function toggleMenu() {
var menuDiv = $("#menu-div");
$(menuDiv).fadeToggle("fast");
@@ -150,39 +69,6 @@ function loadServiceDescriptions() {
loadTextbausteineForServiceCategory(selectedCategory);
}
function updateGoals(cbId) {
makeAjaxCall("GET", updateGoalsUrl, null, { pGoalOid: cbId }, null);
}
var goalOidArray = new Array();
function updateChildGoals(goalOid) {
goalOidArray = new Array();
var parent = document.getElementById("goal" + goalOid);
//alert("start");
CheckChildGoalNodes(parent);
//makeAjaxCall("GET", updateGoalsUrl, null, { pGoalOid: cbId }, null);
}
function CheckChildGoalNodes(parent) {
goalOidArray = new Array();
var next = parent.parentNode;
//alert(next);
//alert(next.nextSibling);
var nodeList = next.childNodes;
//alert(nodeList.length);
for (var i = 0; i < nodeList.length; i++) {
var node = nodeList[i];
//alert(node.nodeName);
CheckChildGoalNodes(node);
}
//makeAjaxCall("GET", updateGoalsUrl, null, { pGoalOid: cbId }, null);
}
function setServiceDescription() {
var sdOid = $($("#leistungen_select")).find(":selected").val();
@@ -479,12 +365,13 @@ function validateTimeField(id) {
function togglePopup(serviceRecordOid) {
$("#oidHolder").val(serviceRecordOid);
var popupDiv = $("#popupDiv");
var isShowing = $(".modalWrapper").css("display") === "none";
var displayValue = $(".modalWrapper").css("display") === "block" ? "none" : "block";
toggleModalWrapper();
$("#popupDiv").css("display", displayValue);
popupDiv.css("display", displayValue);
if (isShowing) {
var titleOuterHeight = $("#popupTitle").outerHeight();
@@ -494,12 +381,12 @@ function togglePopup(serviceRecordOid) {
var newHeight = titleOuterHeight + textOuterHeight + buttonDivOuterHeight + btnOuterHeight + btnOuterHeight;
$("#popupDiv").css("height", newHeight + "px");
popupDiv.css("height", newHeight + "px");
$("#popupDiv").css("top", window.pageYOffset + window.innerHeight / 2 - newHeight / 2);
$("#popupDiv").css("margin-top", "0");
popupDiv.css("top", window.pageYOffset + window.innerHeight / 2 - newHeight / 2);
popupDiv.css("margin-top", "0");
} else {
$("#popupDiv").css("margin-top", "auto");
popupDiv.css("margin-top", "auto");
}
}
@@ -510,8 +397,6 @@ function toggleModalWrapper() {
$(".modalWrapper").css("height", $(document).height());
}
function ErfolgteSpx() {
if (document.getElementById("SaveSignature").value === "True") {
@@ -579,7 +464,7 @@ function showZeiterfassungsError(msg) {
}
function clearZED() {
$("#zeiterfassungsErrorTableRow").css("display", "none");
$("#zeiterfassungsErrorTableRow").hide();//.css("display", "none");
$("#zeiterfassungsErrorDisplay").empty();
}

View File

@@ -1,6 +1,4 @@
var isValidRecord = true;
function validateServiceRecordBeforeSubmit() {
function validateServiceRecordBeforeSubmit() {
var hasDokutext = false;
if (window.isServiceRecordNoticeMandatory) {
@@ -31,18 +29,20 @@ function validateServiceRecordBeforeSubmit() {
}
}
var datumBox = $("#datum_textbox");
var startDateBox = $("#start_textbox");
var endDateBox = $("#ende_textbox");
var dateStr = $("#datum_textbox").val();
var startStr = $("#start_textbox").val();
var endStr = $("#ende_textbox").val();
var dateStr = datumBox.val();
var startStr = startDateBox.val();
var endStr = endDateBox.val();
console.log("dateStr: " + dateStr + "\nstartStr: " + startStr + "\nendStr: " + endStr);
if (!validateDate(dateStr) || !validateTime(startStr) || !validateTime(endStr)) {
hideSanduhr();
console.log("\nIst das Startdatum korrekt: " + validateDate($("#datum_textbox").val()) + "\nIst die Startzeit korrekt: " + validateTime($("#start_textbox").val()) + "\nIst die Endzeit korrekt: " + validateTime($("#ende_textbox").val()));
console.log("\nIst das Startdatum korrekt: " + validateDate(datumBox.val()) + "\nIst die Startzeit korrekt: " + validateTime(startDateBox.val()) + "\nIst die Endzeit korrekt: " + validateTime(endDateBox.val()));
var errorMessage = "Bitte geben Sie gültige Datums- und/oder Zeitangaben ein";
toggleErrorPopup(errorMessage);

View File

@@ -0,0 +1,25 @@
function showSupportConceptList() {
var hidingModalWrapper = $("#hidingModalWrapper");
var supportConceptListContainer = $("#supportConceptListContainer");
try {
hidingModalWrapper.show();
hidingModalWrapper.css("height", $(document).height());
supportConceptListContainer.show();
} catch(exception) {
hidingModalWrapper.hide();
supportConceptListContainer.hide();
console.log("Fehler: " + exception.message);
}
}
function selectSupportConcept(cb2scOid) {
$("#supportConceptForm_" + cb2scOid).submit();
}
function hideModalWrapper() {
$("#hidingModalWrapper").hide();
$("#supportConceptListContainer").hide();
}

View File

@@ -94,6 +94,8 @@ function validateTime(time) {
}
function doTimeValidation(elementToValidate) {
console.log("Rufe doTimeValidation auf...");
var obj = $(elementToValidate);
var timeString = obj.val();

View File

@@ -37,7 +37,7 @@ namespace BeWoPlanerMobil.Util
{
Vorname = init.FirstName;
Nachname = init.LastName;
Geburtstag = init.DateOfBirth?.ToShortDateString() ?? String.Empty;
Geburtstag = init.DateOfBirth?.ToShortDateString() ?? string.Empty;
Geschlecht = init.Sex == Sex.Male ? "Männlich" : "Weiblich";
Adresszusatz = init.AddressLine1;

View File

@@ -97,14 +97,21 @@
<input id="groupBookingOpenEmployeeSelectionPopupBtn" type="button" value="Mitarbeiter" onclick="openEmployeePopup()" style="@groupBookingElementDisplayValue;" />
@{
var shouldShowSingleBookingElements = "display: block";
if (Model.IsInGroupBookingMode)
{
shouldShowSingleBookingElements = "display: none";
}
var shouldShowSingleBookingElements = Model.IsInGroupBookingMode ? "display: none;" : "display: table";
}
@using (Html.BeginForm("SelectSupportConcept", "Main", FormMethod.Post, new { id = "selectSCForm", style = shouldShowSingleBookingElements }))
<table style="@shouldShowSingleBookingElements">
<tr>
<td style="vertical-align: middle!important;">
<input style="margin: auto; display: block;" id="supportConceptSelectionButton" type="button" value="@Model.SelectedSupportConceptListObject.DisplayString" class="toggle-btn" onclick="showSupportConceptList()" />
</td>
<td id="statistik-button-td">
<input type="button" id="statistik-button" onclick="showStatistics()" disabled />
</td>
</tr>
</table>
@using (Html.BeginForm("SelectSupportConcept", "Main", FormMethod.Post, new { id = "selectSCForm", style = "display: none;" }))
{
<table>
<tr>
@@ -117,12 +124,25 @@
</div>
</td>
<td id="statistik-button-td">
<input type="button" id="statistik-button" onclick="showStatistics()" disabled />
<input type="button" id="statistik-button_ALT" onclick="showStatistics()" disabled />
</td>
</tr>
</table>
}
<div id="supportConceptListContainer">
@foreach(var scListItem in Model.SupportConceptListObjects) {
using(Html.BeginForm("SelectSupportConcept", "Main", FormMethod.Post, new { id = "supportConceptForm_" + scListItem.CostBearer2SupportConceptOid }))
{
<div class="supportConceptDiv" onclick="selectSupportConcept('@scListItem.CostBearer2SupportConceptOid')">
<p class="listP">@scListItem.NameAndDateOfBirth</p>
<p class="listP"><span @Html.Raw(scListItem.SpanColor)>@scListItem.SupportConceptTimeSpan</span></p>
<input type="hidden" name="CostBearer2SupportConceptOid" value="@scListItem.CostBearer2SupportConceptOid" />
</div>
}
}
</div>
<div class="combobox-label-parent" style="@{ if(!MainModel.IsEmployeeSelectionVisible || Model.IsInGroupBookingMode) { @Html.Raw("display: none;") }}" id="singleSCEmployeeSelectionContainer">
@Html.LabelFor(m => m.SelectedEmployeeOid)
<div class="disabled-select-container" id="employee-select-container">
@@ -574,8 +594,6 @@
<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>
@@ -590,6 +608,7 @@
</div>
<div class="modalWrapper"></div>
<div id="hidingModalWrapper" onclick="hideModalWrapper()"></div>
<div id="errorPopupDiv">
<h4 id="errorPopupTitle" class="error-text">Fehler</h4>
@@ -629,16 +648,21 @@
<button id="leftBtn" class="tab-links" onclick="openGroupBookingTab(true)">Hilfepläne</button>
<button id="rightBtn" class="tab-links" onclick="openGroupBookingTab(false)">Gruppen</button>
</div>
<div id="leftContent" class="tab-content">
<div id="leftContent" class="tab-content-2">
<table>
@foreach (var hp in Model.SupporConceptListItemsForGroupBooking)
@foreach (var hp in Model.SupportConceptListObjectsForGroupBooking)
{
<tr>
<td style="width: 1%; white-space: nowrap;">
<input type="checkbox" value="@hp.Value" onchange="addSupportConcepts()" name="costbearer2supportconcept_@hp.Value" id="costbearer2supportconcept_@hp.Value" @if (Model.SelectedCostbearerRelOids.Contains(long.Parse(hp.Value))) { @Html.Raw("checked=\"checked\"") } />
<td style="width: 1%; white-space: nowrap;" rowspan="2">
<input type="checkbox" value="@hp.CostBearer2SupportConceptOid" onchange="addSupportConcepts()" name="costbearer2supportconcept_@hp.CostBearer2SupportConceptOid" id="costbearer2supportconcept_@hp.CostBearer2SupportConceptOid" @if (Model.SelectedCostbearerRelOids.Contains(long.Parse(hp.CostBearer2SupportConceptOid))) { @Html.Raw("checked=\"checked\"") } />
</td>
<td class="group-booking-text-cell">
@hp.Text
@hp.NameAndDateOfBirth
</td>
</tr>
<tr>
<td class="group-booking-text-cell">
<p style="display: inline"><span @Html.Raw(hp.SpanColor)>@hp.SupportConceptTimeSpan</span></p>
</td>
</tr>
}
@@ -1094,8 +1118,8 @@
resetGroupBookingModeViaGETUrl = '@Url.Action("ResetGroupBookingModeViaGET")';
addSupportConceptCostBearerRelationsToGroupBookingUrl = '@Url.Action("AddSupportConceptCostBearerRelationsToGroupBooking")';
removeSupportConceptCostBearerRelationFromGroupBookingUrl = '@Url.Action("RemoveSupportConceptCostBearerRelationFromGroupBooking")';
addEmployeesToGroupBookingUrl = '@Url.Action("AddEmployeesToGroupBooking")';
resetSignatureImage = '@Url.Action("ResetSignatureImage")';
addEmployeesToGroupBookingUrl = '@Url.Action("AddEmployeesToGroupBooking")';
resetSignatureImage = '@Url.Action("ResetSignatureImage")';
var isServiceRecordNoticeMandatory = '@(Model.IsServiceRecordNoticeMandatory)'.toLowerCase() === "true";

View File

@@ -11,6 +11,7 @@
<link rel="stylesheet" href="~/Content/datepicker.css?v=1.2" />
<link rel="stylesheet" href="~/Content/BeWoMobileStyle.css?v=1.3" />
<link rel="stylesheet" href="~/Content/statisticsStyle.css?v=1.2" />
<link rel="stylesheet" href="~/Content/appointmentStyle.css"/>
<script src="~/Scripts/appointment.js?v=1.2"></script>
<script src="~/Scripts/utils.js?v=1.3"></script>
@@ -27,6 +28,9 @@
<script src="~/Scripts/textbausteine.js?v=1.0"></script>
<script src="~/Scripts/serviceRecordValidation.js?v=1.0"></script>
<script src="~/Scripts/unterschrift.js?v=1.0"></script>
<script src="~/Scripts/supportConceptDropDown.js?v=1.0"></script>
<script src="~/Scripts/validation.js?v=1.0"></script>
<script src="~/Scripts/goals.js?v=1.0"></script>
</head>
<body>
@RenderBody()

View File

@@ -16,8 +16,12 @@
</property>
<property name="connection.connection_string">
Server=localhost;Password=root;User ID=root; Initial Catalog=dakonielandshut
Server=localhost;Password=root;User ID= root; Initial Catalog=bewodemo
</property>
<!--<property name="connection.connection_string">
Server=localhost;Password=root;User ID=root; Initial Catalog=dakonielandshut
</property>-->
<!--<property name="connection.connection_string">
Server=localhost;Password=root;User ID=root;Initial Catalog=delete_for_good_database

View File

@@ -5801,7 +5801,7 @@ namespace BeWo.Service.ServiceImplementations
resultEntry.Employee = MapperFactory.CompactEmployeeDC_Employee.MapToNewDC(serviceRecordListEntry.Employee);
resultEntry.Leistung = serviceRecordListEntry.ServiceDescription.Name;
resultEntry.Leistungskategorie = serviceRecordListEntry.ServiceDescription.ServiceCategory.Name;
resultEntry.Type = FlexibleReportEntryType.FullEntry;
resultEntry.Type = FlexibleReportEntryType.ServiceRecordEntry;
if (serviceRecordListEntry.Customer != null)
{

View File

@@ -1645,7 +1645,6 @@ namespace BeWo.Service.ServiceImplementations
var saturday = monday.AddDays(5);
var sunday = monday.AddDays(6);
//Originator ist angemeldeten Mitarbeiter
GenerateAppointments(monday, false, employee, fiveCustomers, fiveOfMyOwnCustomers, fiveResources, employeesWithoutEmployee.TakeWhile((t, i) => i != 5).Select(t => new Employee2SchedulerAppointment(t)).ToList(), null);
@@ -1658,7 +1657,6 @@ namespace BeWo.Service.ServiceImplementations
//Originator ist nicht angemeldeter Mitarbeiter und der ist auch nicht in der Liste
GenerateAppointments(thursday, false, secondEmployee, fiveCustomers, fiveOfSecondEmployeesCustomers, fiveResources, employeesWithoutEmployee.TakeWhile((t, i) => i != 5).Select(t => new Employee2SchedulerAppointment(t)).ToList(), null);
//Private Termine
GenerateAppointments(friday, true, employee, fiveCustomers, fiveOfMyOwnCustomers, fiveResources, employeesWithoutEmployee.TakeWhile((t, i) => i != 5).Select(t => new Employee2SchedulerAppointment(t)).ToList(), null);
GenerateAppointments(saturday, true, secondEmployee, fiveCustomers, fiveOfSecondEmployeesCustomers, fiveResources, employeesWithoutEmployee.TakeWhile((t, i) => i != 5).Select(t => new Employee2SchedulerAppointment(t)).ToList(), null);
@@ -1695,6 +1693,15 @@ namespace BeWo.Service.ServiceImplementations
GenerateAppointments(fri.AddHours(12), true, employee, fiveCustomers, fiveOfMyOwnCustomers, fiveResources, employeeListIncludingLoggedInEmployee8, null, true);
// --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
var ttttttt1 = employeeListIncludingLoggedInEmployee1.Select(s => s.Oid).ToList();
var ttttttt2 = employeeListIncludingLoggedInEmployee2.Select(s => s.Oid).ToList();
var ttttttt3 = employeeListIncludingLoggedInEmployee3.Select(s => s.Oid).ToList();
var ttttttt4 = employeeListIncludingLoggedInEmployee4.Select(s => s.Oid).ToList();
var ttttttt5 = employeeListIncludingLoggedInEmployee5.Select(s => s.Oid).ToList();
var ttttttt6 = employeeListIncludingLoggedInEmployee6.Select(s => s.Oid).ToList();
var ttttttt7 = employeeListIncludingLoggedInEmployee7.Select(s => s.Oid).ToList();
var ttttttt8 = employeeListIncludingLoggedInEmployee8.Select(s => s.Oid).ToList();
var mo = mon.AddDays(7);
var tu = tue.AddDays(7);