diff --git a/BeWoPlanerMobil/Controllers/MainController.cs b/BeWoPlanerMobil/Controllers/MainController.cs
index 684047232..f786576d5 100644
--- a/BeWoPlanerMobil/Controllers/MainController.cs
+++ b/BeWoPlanerMobil/Controllers/MainController.cs
@@ -22,6 +22,7 @@ using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using BS.Shared.Extensions;
using BS.Shared.Services;
+using DevExpress.Mvvm.ModuleInjection.Native;
using DevExpress.XtraScheduler;
using DevExpress.XtraScheduler.Compatibility;
using Newtonsoft.Json;
@@ -105,10 +106,10 @@ namespace BeWoPlanerMobil.Controllers
switch(MobileSessionFacade.PasswordStrength)
{
case 0:
- tempDataValue = "Sie benutzen ein sehr schwaches Passwort.
Bitte ändern Sie Ihr Passwort, indem Sie im Menü auf 'Password ändern' klicken.";
+ tempDataValue = "Sie benutzen ein sehr schwaches Passwort.
Bitte ändern Sie Ihr Passwort, indem Sie im Menü auf 'Password ändern' klicken.";
break;
case 1:
- tempDataValue = "Sie benutzen ein schwaches Passwort.
Bitte ändern Sie Ihr Passwort, indem Sie im Menü auf 'Password ändern' klicken.";
+ tempDataValue = "Sie benutzen ein schwaches Passwort.
Bitte ändern Sie Ihr Passwort, indem Sie im Menü auf 'Password ändern' klicken.";
break;
}
@@ -246,7 +247,7 @@ namespace BeWoPlanerMobil.Controllers
if(Model.SelectedCostBearer2SupportConceptRelListObject is null || !isInList)
{
- if(!(Model.SelectedCostBearer2SupportConceptRelListObject is null) && !isInList)
+ if(Model.SelectedCostBearer2SupportConceptRelListObject != null && !isInList)
{
Log.Info($"Model.SelectedSupportConceptListObject.Oid = {Model.SelectedCostBearer2SupportConceptRelListObject.CostBearer2SupportConceptOid} is not in list !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
@@ -481,6 +482,7 @@ namespace BeWoPlanerMobil.Controllers
if(supportConcept is null)
{
+ Log.Info($"Hilfeplan von Bewilligung mit Oid {Model.CostBearer2SupportConceptOid} nicht gefunden beim Laden der Ziele (LoadGoals).");
return;
}
@@ -958,6 +960,7 @@ namespace BeWoPlanerMobil.Controllers
{
if(Model is null)
{
+ Log.Info($"Model ist null bei CreateOrUpdateServiceRecord; User: {MobileSessionFacade.LoggedInUser.Oid} {MobileSessionFacade.LoggedInUser.LoginName} ({MobileSessionFacade.LoggedInUser.Employee})");
TempData[TempDataConstants.DoLogoutKey] = true;
return Logout();
}
@@ -993,6 +996,7 @@ namespace BeWoPlanerMobil.Controllers
if(string.IsNullOrEmpty(collection[FormCollectionConstants.DateKey]))
{
+ Log.Info($"CreateOrUpdateServiceRecord: Das Startdatum ist null. Breche das {(Model.IsInEditingMode ? "Speichern" : "Anlegen")} ab.");
return View("Main", Model);
}
@@ -1080,6 +1084,7 @@ namespace BeWoPlanerMobil.Controllers
if(Model.NewServiceRecord is null)
{
+ Log.Info("CreateOrUpdateServiceRecord: NewServiceRecord ist null. Breche ab.");
return RedirectToActionPermanent("Main");
}
@@ -1743,6 +1748,7 @@ namespace BeWoPlanerMobil.Controllers
{
if(Model is null)
{
+ Log.Info($"Model ist null in Methode LoadServiceCategoriesToModel({cb2ScOid})");
return;
}
@@ -1757,6 +1763,8 @@ namespace BeWoPlanerMobil.Controllers
if(cb2ScOid is null && (Model.IsInGroupBookingMode || Model.IsInMultiBookingMode))
{
+ Log.Info("Oid der Bewilligung ist null und der MoK befindet sich im Gruppen- oder Mehrfachbuchungsmodus");
+
var selectedSupportConcepts = Model.IsInGroupBookingMode ?
Model.GroupBookingSelectedSupportConcepts :
Model.IsInMultiBookingMode ?
@@ -1930,7 +1938,7 @@ namespace BeWoPlanerMobil.Controllers
var serviceRecordDC = Model.ServiceRecords.FirstOrDefault(f => f.ServiceRecordOid != null && f.ServiceRecordOid.Value.Equals(Model.ServiceRecordOidToDelete));
var version = serviceRecordDC?.ServiceRecordVersion;
- if(version != null && MainModel.IsAllowedToDeleteServiceRecord(serviceRecordDC))
+ if(version != null && Model.IsAllowedToDeleteServiceRecord(serviceRecordDC))
{
OperationsService.DeleteServiceRecord(Model.ServiceRecordOidToDelete.Value, version.Value);
@@ -1938,9 +1946,7 @@ namespace BeWoPlanerMobil.Controllers
}
}
- ResetEditingMode();
-
- return RedirectToActionPermanent("Main");
+ return ResetEditingMode();
}
[Authorize]
@@ -3064,7 +3070,6 @@ namespace BeWoPlanerMobil.Controllers
}
LoadSupportConceptThings(Model.CostBearer2SupportConceptOid);
- //LoadGoals();
}
private void ResetMultiBookingMode()
@@ -4731,6 +4736,12 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public override string SaveCollapsibleStatus(bool isOpen, string identifier)
{
+ if(Model is null)
+ {
+ TempData[TempDataConstants.DoLogoutKey] = true;
+ return LeerzeichenFuerGetMethoden;
+ }
+
Model.Collapsibles2IsShown[identifier] = isOpen;
return LeerzeichenFuerGetMethoden;
diff --git a/BeWoPlanerMobil/Models/MainModel.cs b/BeWoPlanerMobil/Models/MainModel.cs
index afed56927..25c2bd539 100644
--- a/BeWoPlanerMobil/Models/MainModel.cs
+++ b/BeWoPlanerMobil/Models/MainModel.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
+using System.Diagnostics;
using System.Linq;
using System.Web.Mvc;
using BeWo.View.Navigation.Filter;
@@ -16,6 +17,10 @@ namespace BeWoPlanerMobil.Models
{
public class MainModel : AbstractModel
{
+ protected static readonly log4net.ILog Log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
+
+
+
public long? SelectedCostBearerSupportConceptRelOid { get; set; }
[Display(Name = "Nur meine Klienten anzeigen")]
@@ -94,8 +99,19 @@ namespace BeWoPlanerMobil.Models
[Display(Name = "Abgelaufene Hilfepläne anzeigen")]
public bool ShowExpiredSupportConcepts { get; set; }
- [Display(Name = "Hilfeplan")]
- public long? CostBearer2SupportConceptOid { get; set; }
+ private long? _CostBearer2SupportConceptOid;
+
+ [Display(Name = "Hilfeplan")]
+ public long? CostBearer2SupportConceptOid
+ {
+ get => _CostBearer2SupportConceptOid;
+
+ set
+ {
+ Log.Info($"CostBearer2SupportConceptOid ausgewählt: {value}. Vorher: {_CostBearer2SupportConceptOid}; Benutzer: {MobileSessionFacade.LoggedInUser.LoginName} UserOid: {MobileSessionFacade.LoggedInUser.Oid}");
+ _CostBearer2SupportConceptOid = value;
+ }
+ }
public long? SelectedServiceCategoryOid => SelectedServiceCategory?.ServiceCategoryOid;
@@ -103,7 +119,7 @@ namespace BeWoPlanerMobil.Models
public long? SelectedServiceRecordOid { get; set; }
- public static bool IsAllowedToDeleteServiceRecord(ServiceRecordDC serviceRecord)
+ public bool IsAllowedToDeleteServiceRecord(ServiceRecordDC serviceRecord)
{
var allowed = false;
@@ -176,8 +192,22 @@ namespace BeWoPlanerMobil.Models
}
public ServiceRecordDC SelectedServiceRecord { get; set; }
-
- public SupportConceptDC SelectedSupportConcept { get; set; }
+
+ private SupportConceptDC _SelectedSupportConcept;
+
+ public SupportConceptDC SelectedSupportConcept
+ {
+ get => _SelectedSupportConcept;
+
+ set
+ {
+ var stackTrace = new StackTrace();
+ var callingMethodsName = stackTrace.GetFrame(1).GetMethod().Name;
+ Log.Info($"SC mit Oid {value?.SupportConceptOid} ausgewählt. Vorheriger SC: {_SelectedSupportConcept?.SupportConceptOid}. Aufrufende Methode: {callingMethodsName}");
+
+ _SelectedSupportConcept = value;
+ }
+ }
public int Zeitraum { get; set; }
@@ -256,8 +286,6 @@ namespace BeWoPlanerMobil.Models
}
}
-
-
public CostBearer2SupportConceptRelListObject SelectedCostBearer2SupportConceptRelListObject { get; set; }
public List SelectedConceptCostBearerRelations { get; set; }
@@ -386,7 +414,23 @@ namespace BeWoPlanerMobil.Models
public CompactEmployeeDC PreviouslySelectedEmployee { get; set; }
public SupportConceptDC PreviouslySelectedSupportConcept { get; set; }
- public long? PreviouslySelectedCostbearer2SupportConceptOid { get; set; }
+ private long? _PreviouslySelectedCostbearer2SupportConceptOid;
+
+ public long? PreviouslySelectedCostbearer2SupportConceptOid
+ {
+ get => _PreviouslySelectedCostbearer2SupportConceptOid;
+ set
+ {
+ var stackTrace = new StackTrace();
+ var callingMethodsName = stackTrace.GetFrame(1).GetMethod().Name;
+
+ var alt = _PreviouslySelectedCostbearer2SupportConceptOid;
+
+ Log.Info($"PreviouslySelectedCostbearer2SupportConceptOid-Set von {alt} zu {value} von Methode: {callingMethodsName}");
+
+ _PreviouslySelectedCostbearer2SupportConceptOid = value;
+ }
+ }
public bool IsEndDateVisible { get; set; }
public static string GetServiceRecordTimeHeader(ServiceRecordDC serviceRecord, bool isForServiceRecordsList)
@@ -742,7 +786,7 @@ namespace BeWoPlanerMobil.Models
public ServiceDescriptionDC GetSelectedOrFirstServiceDescription()
{
- if(!(SelectedServiceDescription is null) || Categories2Descriptions is null)
+ if(SelectedServiceDescription != null || Categories2Descriptions is null)
{
return SelectedServiceDescription;
}
diff --git a/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/service-record-time-calc.js b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/service-record-time-calc.js
index 28d21d752..3335129f1 100644
--- a/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/service-record-time-calc.js
+++ b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/service-record-time-calc.js
@@ -317,12 +317,14 @@ function calcTimeWithDuration(timeAsString, timeElement, start, duration, isForm
}
function beiDaueraenderung(idPrefix) {
+ const hoursMinutesDropdown = $(`#${idPrefix}-hours-minutes-dropdown-btn`);
+
const startTimeInput = $(`#${idPrefix}-start-time-input`);
const endTimeInput = $(`#${idPrefix}-end-time-input`);
const durationInput = $(`#${idPrefix}-duration-input`);
const startDateInput = $(`#${idPrefix}-start-date-input`);
const endDateInput = $(`#${idPrefix}-end-date-input`);
- const isInMin = $(`#${idPrefix}-hours-minutes-dropdown-btn`).text().replaceAll(/\s/g, "") === "Minuten";
+ const isInMin = getIsZeiterfassungseinheitInMinutes();//hoursMinutesDropdown.length && hoursMinutesDropdown.text().replaceAll(/\s/g, "") === "Minuten" || 0 === hoursMinutesDropdown.length;
const startTimeCondition = startTimeInput.val().length > 0;
const endTimeCondition = endTimeInput.val().length > 0;
diff --git a/BeWoPlanerMobil/Scripts/ownSoft-Scripts/view-scripts/main.js b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/view-scripts/main.js
index 25421d09e..04bf6b4e1 100644
--- a/BeWoPlanerMobil/Scripts/ownSoft-Scripts/view-scripts/main.js
+++ b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/view-scripts/main.js
@@ -269,7 +269,7 @@ function getDokuTexte(prefix) {
x += ", ";
}
}
- } catch (error) {
+ } catch(error) {
window.showErrorPopup(error);
} finally {
return noticeList;
@@ -326,7 +326,6 @@ function checkNumberInput(inputId) {
}
// Wird bei der Validierung des Formulars benutzt
-// ToDo: Umbauen zu JavaScript-Date-Objekt
function getStartAndEndDate(prefix) {
if(prefix === undefined || prefix === null) {
prefix = "";
@@ -337,6 +336,19 @@ function getStartAndEndDate(prefix) {
const startTimeInput = $(`#${prefix}-start-time-input`);
const endTimeInput = $(`#${prefix}-end-time-input`);
+ return validateStartAndEndInputs(startDateInput, startTimeInput, endDateInput, endTimeInput, true, false);
+}
+
+// ToDo: eine Validierungsmethode für alle Anwendungsfälle (Zeiterfassung, Abwesenheiten, Kalendertermine)
+function validateStartAndEndInputs(startDateInput, startTimeInput, endDateInput, endTimeInput, isServiceRecord, hasOpenEnd) {
+ if(hasOpenEnd === undefined || hasOpenEnd === null) {
+ hasOpenEnd = false;
+ }
+
+ if(isServiceRecord === undefined || isServiceRecord === null) {
+ isServiceRecord = false;
+ }
+
const startDate = new Date(startDateInput.val());
const startTime = startTimeInput.val();
@@ -347,13 +359,13 @@ function getStartAndEndDate(prefix) {
const isEndDateValid = endDateInput.length ? false === isNaN(endDate.getTime()) : true;
if(false === isStartDateValid && startTimeInput.length === 0 || false === isEndDateValid && endTimeInput.length === 0) {
- return [new Date(`${startDate}T00:00:01`), new Date(`${endDate}T00:00:01`)];
+ return [new Date(`${startDate}T00:00:0${(isServiceRecord ? "1" : "0")}`), new Date(`${endDate}T00:00:0${(isServiceRecord ? "1" : "0")}`)];
}
const isStartTimeValid = startTime.length > 0;
const isEndTimeValid = endTime.length > 0;
-
- if (false === isStartTimeValid || false === isStartDateValid || false === isEndTimeValid || false === isEndDateValid) {
+
+ if(false === isStartTimeValid || false === isStartDateValid || false === isEndTimeValid || false === isEndDateValid) {
return null;
}
@@ -361,7 +373,6 @@ function getStartAndEndDate(prefix) {
}
-
function supportConceptSearchOnChange() {
try {
var text = $("#support-concept-search-input").val().toLowerCase();
diff --git a/BeWoPlanerMobil/Service/ASPHibernateSessionManager.cs b/BeWoPlanerMobil/Service/ASPHibernateSessionManager.cs
index a98e72eb0..5068ce9fb 100644
--- a/BeWoPlanerMobil/Service/ASPHibernateSessionManager.cs
+++ b/BeWoPlanerMobil/Service/ASPHibernateSessionManager.cs
@@ -49,13 +49,22 @@ namespace BeWoPlanerMobil.Service
var serverPath = HttpContext.Current.Server.MapPath(null);
- serverPath = Path.Combine(serverPath, ConfigurationManager.AppSettings.Get("MultitenancyPath"));
+ var multitenancyPath = ConfigurationManager.AppSettings.Get("MultitenancyPath");
+ var configFileName = $"{MobileSessionFacade.Tenant}.config";
- serverPath = Path.Combine(serverPath, MobileSessionFacade.Tenant + ".config");
+ serverPath = Path.Combine(serverPath, multitenancyPath);
+
+ serverPath = Path.Combine(serverPath, configFileName);
if(!File.Exists(serverPath))
{
- return null;
+ serverPath = HttpContext.Current.Server.MapPath(null);
+ serverPath = Path.Combine(serverPath, Path.Combine("..\\", Path.Combine(multitenancyPath, configFileName)));
+
+ if(!File.Exists(serverPath))
+ {
+ return null;
+ }
}
var config = new Configuration().Configure(serverPath).SetInterceptor(new MobileUpdInsInterceptor()).BuildSessionFactory();
diff --git a/BeWoPlanerMobil/Util/JsonCustomer.cs b/BeWoPlanerMobil/Util/JsonCustomer.cs
index bee20bd36..53e9ed0b1 100644
--- a/BeWoPlanerMobil/Util/JsonCustomer.cs
+++ b/BeWoPlanerMobil/Util/JsonCustomer.cs
@@ -76,16 +76,16 @@ namespace BeWoPlanerMobil.Util
public JsonCustomer(CustomerDC customer, List folderTree, Dictionary icd10Diagnosen)
{
- Krankenkasse = customer.HealthInsurance;
+ Krankenkasse = customer.HealthInsurance;
Versichertennummer = customer.InsuranceNumber;
Versichertenstatus = customer.VersichertenStatus;
- HasDisabilities = customer.Disabilities.Any();
- SchwebiIsUnlimited = customer.AusweisUnbefristetGueltig == true ? "JA" : "NEIN";
+ HasDisabilities = customer.Disabilities.Any();
+ SchwebiIsUnlimited = customer.AusweisUnbefristetGueltig == true ? "JA" : "NEIN";
SchwebiGradDerBehinderung = customer.GradDerBehinderung;
- SchwebiPflegegrad = customer.Pflegegrad?.ToString() ?? string.Empty;
- SchwebiAktenzeichen = customer.AusweisAktenzeichen;
- SchwebiMerkzeichen = string.Empty;
+ SchwebiPflegegrad = customer.Pflegegrad?.ToString() ?? string.Empty;
+ SchwebiAktenzeichen = customer.AusweisAktenzeichen;
+ SchwebiMerkzeichen = string.Empty;
foreach(var mz in customer.MerkzeichenListe)
{
SchwebiMerkzeichen += $"{mz}; ";
@@ -119,7 +119,7 @@ namespace BeWoPlanerMobil.Util
Vorname = customer.FirstName;
Nachname = customer.LastName;
Alias = customer.CustomerAlias;
- Geburtstag = customer.DateOfBirth?.ToShortDateString() ?? string.Empty;
+ Geburtstag = customer.DateOfBirth?.ToString("yyyy-MM-dd") ?? string.Empty;
switch(customer.Sex)
{
diff --git a/BeWoPlanerMobil/Views/Customer/Customer.cshtml b/BeWoPlanerMobil/Views/Customer/Customer.cshtml
index a69a055b9..69d9b24fd 100644
--- a/BeWoPlanerMobil/Views/Customer/Customer.cshtml
+++ b/BeWoPlanerMobil/Views/Customer/Customer.cshtml
@@ -10,7 +10,6 @@
diff --git a/BeWoPlanerMobil/Views/Shared/_Layout.cshtml b/BeWoPlanerMobil/Views/Shared/_Layout.cshtml
index 1bbe5fd49..49f634e5a 100644
--- a/BeWoPlanerMobil/Views/Shared/_Layout.cshtml
+++ b/BeWoPlanerMobil/Views/Shared/_Layout.cshtml
@@ -92,6 +92,12 @@
new Script { ExtensionSuite = ExtensionSuite.Icons },
new Script { ExtensionType = ExtensionType.WebDocumentViewer }
)
+
+