Die ServiceRecord-Validierung geschieht jetzt ausschließlich auf dem Server. Der Benutzer wird lediglich gefragt, ob trotz vorhandener Überschneidungen etc. gespeichert werden soll, sofern er die Rechte dazu hat.

This commit is contained in:
Lyndon
2018-12-10 23:40:38 -04:00
parent 199f114d29
commit f4e7d42d44
16 changed files with 795 additions and 554 deletions

View File

@@ -216,6 +216,7 @@
<Content Include="Scripts\localServiceRecord.js" />
<Content Include="Scripts\mainView.js" />
<Content Include="Scripts\modernizr-2.8.3.js" />
<Content Include="Scripts\serviceRecordValidation.js" />
<Content Include="Scripts\statistics.js" />
<Content Include="Scripts\textbausteine.js" />
<Content Include="Scripts\utils.js" />

View File

@@ -16,6 +16,11 @@ table {
margin: 1em auto;
}
button {
-webkit-border-radius: 0;
border-radius: 0;
}
hr {
border: 0;
height: 0;
@@ -386,19 +391,19 @@ ul {
right:0;
}
#popupDiv, #errorPopupDiv,#SuccessPopupDiv,#AendernPopupDiv {
width:90%;
height: 20%;
background-color: #ffffff;
border: 1px solid #FF5A00;
display: none;
margin: auto;
position: absolute;
#popupDiv, #errorPopupDiv, #SuccessPopupDiv, #AendernPopupDiv, #validationPopupDiv {
width: 90%;
height: 20%;
background-color: #ffffff;
border: 1px solid #FF5A00;
display: none;
margin: auto;
position: absolute;
z-index: 900;
top: 0;
left: 0;
bottom: 0;
right: 0;
top: 0;
left: 0;
bottom: 0;
right: 0;
}
.popupBtn{
@@ -681,81 +686,10 @@ input[type="checkbox"] {
background-size: contain;
}
article.infobox section {
position: absolute;
display: table-row;
width: 100%;
background-color: #ffffff;
top: 30px;
}
article.infobox section textarea:focus {
border-color: #FF5A00;
}
article.infobox section h2 {
position: absolute;
left: 0;
top: -30px;
width: 25%;
height: 29px;
font-size: 12px;
font-weight: normal;
margin: 0;
background-color: rgba(0, 0, 0, 0.1);
border-radius: 0 0 0 0;
border: double #ffffff;
border-width: 1px 1px 0 1px;
z-index: 0;
word-wrap: break-word;
border-color: rgba(0, 0, 0, 0.1);
}
article.infobox section:nth-child(2) h2{
left: 25%;
z-index: 1;
}
article.infobox section:nth-child(3) h2{
left: 50%;
z-index:2;
}
article.infobox section:nth-child(4) h2{
left: 75%;
z-index: 3;
}
article.infobox section:nth-child(5) h2{
left: 90%;
z-index: 4;
}
article.infobox section h2 a {
display: block;
margin: 5px 0 0 0;
text-align: center;
text-decoration: none;
color:#000000;
}
article.infobox section:target, article.infobox section:target h2 {
color: #000000;
z-index: 1;
background-color: #FFFFFF;
border-color:#FF5A00;
}
article.infobox section:target h2 a {
color: #000000;
border-color:#FF5A00;
}
.documentationTextArea {
height: 60px;
display: none;
margin-top: 0;
}
.removeButton {
@@ -897,5 +831,48 @@ article.infobox section:target h2 a {
}
#employeeCollapsible {
max-height: 50%;
overflow-y: auto;
}
#employeePopupDiv {
overflow-y: hidden;
}
/* Neue Dokumentationstabs */
.doku-tab {
overflow: hidden;
margin-bottom: 0;
word-wrap: break-word;
}
.doku-tab-link {
display: none;
padding: 10px 20px;
float: left;
border: none;
outline: none;
background-color: #e5e5e5;
width: 20%;
font-size: 13px;
}
.doku-tab-link.active {
background-color: #ff5a00;
color: white;
}
.doku-tab-link:disabled {
background-color: #e5e5e5;
color: black;
}
.doku-tab-content {
display: none;
}
#validationPopupDiv {
height: auto;
z-index: 9999;
padding: 0 1.5em;
}

View File

@@ -4,7 +4,7 @@ using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using BeWo.Service.DCEntityMapper;
using BeWo.Service.ServiceImplementations;
using BeWoPlanerMobil.Models;
@@ -23,6 +23,7 @@ using BS.Shared.Services;
using DevExpress.XtraScheduler;
using DevExpress.XtraScheduler.Compatibility;
using static BS.Shared.ServiceRecordValidationResult;
using ServiceRecordDC = BS.Shared.DataContracts.ServiceRecordDC;
namespace BeWoPlanerMobil.Controllers
@@ -158,6 +159,11 @@ namespace BeWoPlanerMobil.Controllers
{
LoadRecordsToModel();
}
if (Model.SelectedEmployee == null)
{
Model.SelectedEmployee = MobileSessionFacade.LoggedInCompactEmployee;
}
}
catch (Exception e)
{
@@ -171,6 +177,11 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public ActionResult SetShowOnlyOwnSupportConcepts(FormCollection collection)
{
if (Model == null)
{
return RedirectToActionPermanent("Index", "Login");
}
var newValue = "true,false" == collection["ShowOnlyOwnSupportConcepts"];
Model.ShowOnlyOwnSupportConcepts = newValue;
@@ -182,6 +193,11 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public ActionResult SetShowExpiredSupportConcepts(FormCollection pCollection)
{
if (Model == null)
{
return RedirectToActionPermanent("Index", "Login");
}
var newValue = "true,false" == pCollection["ShowExpiredSupportConcepts"];
Model.ShowExpiredSupportConcepts = newValue;
@@ -191,6 +207,12 @@ namespace BeWoPlanerMobil.Controllers
public ActionResult UpdateSettings(string pKey, string pValue)
{
if (Model == null)
{
RedirectToActionPermanent("Index", "Login");
return null;
}
var userSettings = GetUser().Settings;
UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, pKey, pValue, userSettings);
@@ -211,7 +233,8 @@ namespace BeWoPlanerMobil.Controllers
{
if (Model == null)
{
return "SessionTimeout";
RedirectToActionPermanent("Index", "Login");
return null;
}
var sc = Model.SupportConcepts.FirstOrDefault(f => f.CostBearerRelations.Any(cbr => cbr.CostBearer2SupportConceptOid.HasValue && cbr.CostBearer2SupportConceptOid.Value.Equals(pCostbearer2SupportConceptOid)));
@@ -305,8 +328,15 @@ namespace BeWoPlanerMobil.Controllers
}
}
[Authorize]
public string LoadBWPSettings()
{
if (Model == null)
{
RedirectToActionPermanent("Index", "Login");
return null;
}
var m = OperationsService.GetMandator();
var time = MobileUtils.GetSettingValue(m.Settings, "TimeUntilUILock");
@@ -315,6 +345,12 @@ namespace BeWoPlanerMobil.Controllers
public string CheckEndDate()
{
if (Model == null)
{
RedirectToActionPermanent("Index", "Login");
return null;
}
var m = OperationsService.GetMandator();
var endtime = MobileUtils.GetSettingValue(m.Settings, "IsEndDateVisible");
@@ -323,6 +359,12 @@ namespace BeWoPlanerMobil.Controllers
public string CheckOnlyYearMonth()
{
if (Model == null)
{
RedirectToActionPermanent("Index", "Login");
return null;
}
var m = OperationsService.GetMandator();
var yearMonth = MobileUtils.GetSettingValue(m.Settings, "IsOnlyYearMonthVisible");
@@ -331,6 +373,12 @@ namespace BeWoPlanerMobil.Controllers
public string CheckIsZeiterfassDateNormal()
{
if (Model == null)
{
RedirectToActionPermanent("Index", "Login");
return null;
}
var m = OperationsService.GetMandator();
var normal = MobileUtils.GetSettingValue(m.Settings, "IsZeiterfassDateNormal");
@@ -339,6 +387,12 @@ namespace BeWoPlanerMobil.Controllers
public string CheckIsZeiterfassungInStdMin()
{
if (Model == null)
{
RedirectToActionPermanent("Index", "Login");
return null;
}
var m = OperationsService.GetMandator();
var zeiterInStdMin = MobileUtils.GetSettingValue(m.Settings, "IsZeiterfassungInStdMin");
@@ -347,6 +401,12 @@ namespace BeWoPlanerMobil.Controllers
public string CheckDokuReiter()
{
if (Model == null)
{
RedirectToActionPermanent("Index", "Login");
return null;
}
return SerializeObject(Model.Dokutypes);
}
@@ -370,10 +430,11 @@ namespace BeWoPlanerMobil.Controllers
{
try
{
if (Model == null)
{
return "SessionTimeout";
RedirectToActionPermanent("Index", "Login");
return null;
}
var date = DateTime.ParseExact(newtoday, "dd.MM.yyyy", null);
@@ -470,9 +531,10 @@ namespace BeWoPlanerMobil.Controllers
{
try
{
if(Model == null)
if (Model == null)
{
return "SessionTimeout";
RedirectToActionPermanent("Index", "Login");
return null;
}
var supportConceptStatistics = OperationsService.CreateSupportConceptStatistics(oid, DateTime.Now);
@@ -493,7 +555,8 @@ namespace BeWoPlanerMobil.Controllers
{
if (Model == null)
{
SerializeObject("SessionTimeout");
RedirectToActionPermanent("Index", "Login");
return;
}
var date = DateTime.Parse(day);
@@ -523,7 +586,8 @@ namespace BeWoPlanerMobil.Controllers
{
if (Model == null)
{
SerializeObject("SessionTimeout");
RedirectToActionPermanent("Index", "Login");
return;
}
var date = DateTime.Parse(pStartDate);
@@ -542,13 +606,14 @@ namespace BeWoPlanerMobil.Controllers
Originator = MobileSessionFacade.LoggedInCompactEmployee
};
var newE2S = new Employee2SchedulerAppointmentDC();
newE2S.Employee = MobileSessionFacade.LoggedInCompactEmployee;
var newE2S = new Employee2SchedulerAppointmentDC
{
Employee = MobileSessionFacade.LoggedInCompactEmployee
};
newApp.EmployeeList.Add(newE2S);
var list = new List<SchedulerAppointmentDC>();
list.Add(newApp);
var list = new List<SchedulerAppointmentDC> {newApp};
//var a1 = new List<SchedulerAppointmentDC> {
// new SchedulerAppointmentDC
// {
@@ -579,7 +644,8 @@ namespace BeWoPlanerMobil.Controllers
{
if (Model == null)
{
return "SessionTimeout";
RedirectToActionPermanent("Index", "Login");
return null;
}
var date = DateTime.ParseExact(newtoday, "dd.MM.yyyy", null);
@@ -603,7 +669,8 @@ namespace BeWoPlanerMobil.Controllers
{
if (Model == null)
{
SerializeObject("SessionTimeout");
RedirectToActionPermanent("Index", "Login");
return;
}
var date = DateTime.Parse(zeitstempel);
@@ -630,7 +697,8 @@ namespace BeWoPlanerMobil.Controllers
{
if (Model == null)
{
return SerializeObject("SessionTimeout");
RedirectToActionPermanent("Index", "Login");
return null;
}
Model.SaveSignature = save;
@@ -645,7 +713,13 @@ namespace BeWoPlanerMobil.Controllers
public string LoadServiceCategories(long pServiceCategoryOid)
{
try
if (Model == null)
{
RedirectToActionPermanent("Index", "Login");
return null;
}
try
{
var scm = Model?.ServiceCategories.FirstOrDefault(s => s.ServiceCategoryOid.Value == pServiceCategoryOid);
@@ -661,6 +735,12 @@ namespace BeWoPlanerMobil.Controllers
[Authorize]
public string LoadTextbausteineForServiceCategory(long pServiceCategoryOid)
{
if (Model == null)
{
RedirectToActionPermanent("Index", "Login");
return null;
}
try
{
if (!MobileSessionFacade.CheckForUserRight(UserRightType.TextbausteineNurEigeneAnsehen) && !MobileSessionFacade.CheckForUserRight(UserRightType.TextbausteineAlleAnsehen))
@@ -709,6 +789,12 @@ namespace BeWoPlanerMobil.Controllers
public string LoadCompleteTextbausteinByOid(long pTextbausteinOid)
{
if (Model == null)
{
RedirectToActionPermanent("Index", "Login");
return null;
}
var abc = Model.Textbausteine.FirstOrDefault(f => f.TextModuleOid.HasValue && f.TextModuleOid.Value == pTextbausteinOid);
return abc?.Text;
@@ -718,14 +804,13 @@ namespace BeWoPlanerMobil.Controllers
{
try
{
if (Model == null)
if (Model == null)
{
SerializeObject("SessionTimeout");
}
else
{
Model.ErrorWert = errorwert;
RedirectToActionPermanent("Index", "Login");
return;
}
Model.ErrorWert = errorwert;
}
catch (Exception e)
{
@@ -891,12 +976,12 @@ namespace BeWoPlanerMobil.Controllers
Model.NewServiceRecord.ServiceRecordFormat = ServiceRecordFormate.OriginaleZeiterfassung;
Model.NewServiceRecord.Notice = doku1 == string.Empty ? null : doku1;
Model.NewServiceRecord.Notice = string.IsNullOrEmpty(doku1) ? null : doku1;
Model.NewServiceRecord.Notice2 = doku2 == string.Empty ? null : doku2;
Model.NewServiceRecord.Notice3 = doku3 == string.Empty ? null : doku3;
Model.NewServiceRecord.Notice4 = doku4 == string.Empty ? null : doku4;
Model.NewServiceRecord.Notice5 = doku5 == string.Empty ? null : doku5;
Model.NewServiceRecord.Notice2 = string.IsNullOrEmpty(doku2) ? null : doku2;
Model.NewServiceRecord.Notice3 = string.IsNullOrEmpty(doku3) ? null : doku3;
Model.NewServiceRecord.Notice4 = string.IsNullOrEmpty(doku4) ? null : doku4;
Model.NewServiceRecord.Notice5 = string.IsNullOrEmpty(doku5) ? null : doku5;
var serviceDescOid = 0L;
@@ -1357,52 +1442,6 @@ namespace BeWoPlanerMobil.Controllers
}
}
}
private static ServiceRecordDC CloneServiceRecordForGroupBooking(ServiceRecordDC pOriginal)
{
var m = pOriginal;
var clone = new ServiceRecordDC
{
CostBearer = m.CostBearer,
CostBearer2SupportConceptOid = m.CostBearer2SupportConceptOid,
Customer = m.Customer,
Employee = m.Employee,
End = m.End,
Goals = m.Goals,
GroupEmployeeCount = m.GroupEmployeeCount,
GroupOid = m.GroupOid,
SignatureOid = m.SignatureOid,
GroupPersonCount = m.GroupPersonCount,
GroupRoundedDuration = m.GroupRoundedDuration,
InsUser = m.InsUser,
InsertedOn = m.InsertedOn,
Notice = m.Notice,
Notice2 = m.Notice2,
Notice3 = m.Notice3,
Notice4 = m.Notice4,
Notice5 = m.Notice5,
RTFNotice1 = m.RTFNotice1,
RTFNotice2 = m.RTFNotice2,
RTFNotice3 = m.RTFNotice3,
RTFNotice4 = m.RTFNotice4,
RTFNotice5 = m.RTFNotice5,
RoundedDuration = m.RoundedDuration,
ServiceDescription = m.ServiceDescription,
Start = m.Start,
SupportConcept = m.SupportConcept,
ServiceRecordType = m.ServiceRecordType,
DistanceInMeter = m.DistanceInMeter,
IP = m.IP,
Relevance = m.Relevance,
IsCreatedInMobileClient = true,
WohnheimbuchungsOid = m.WohnheimbuchungsOid,
DurationInStunden = m.DurationInStunden,
ServiceRecordFormat = m.ServiceRecordFormat
};
return clone;
}
[Authorize]
public ActionResult SaveZeiterfassungAfterCrash(string pDatum, string pStartDate, string pEndDate, string pDuration, string pNotice, string pServiceDescription, string pNotice2, string pNotice3, string pNotice4, string pNotice5, string pEndDate2)
@@ -1699,7 +1738,7 @@ namespace BeWoPlanerMobil.Controllers
if (Model == null)
{
RedirectToActionPermanent("Index", "Login");
return " ";
return null;
}
Model.SelectedServiceDescriptionOid = pServiceDescriptionOid;
@@ -1730,7 +1769,13 @@ namespace BeWoPlanerMobil.Controllers
private void LoadRecordsToModel()
{
if(Model.Zeitraum < 0 || Model.CostBearer2SupportConceptOid.HasValue && Model.CostBearer2SupportConceptOid.Value == -1)
if (Model == null)
{
RedirectToActionPermanent("Index", "Login");
return;
}
if (Model.Zeitraum < 0 || Model.CostBearer2SupportConceptOid.HasValue && Model.CostBearer2SupportConceptOid.Value == -1)
{
Model.ServiceRecords = new List<ServiceRecordDC>();
return;
@@ -1833,6 +1878,12 @@ namespace BeWoPlanerMobil.Controllers
public string GetSelectedRecordInformation()
{
if (Model == null)
{
RedirectToActionPermanent("Index", "Login");
return null;
}
var result = string.Empty;
if (Model.SelectedServiceRecordOid.HasValue)
@@ -1845,16 +1896,24 @@ namespace BeWoPlanerMobil.Controllers
public string GetSelectedRecordInformationWithOid(long oid)
{
if (Model == null)
{
RedirectToActionPermanent("Index", "Login");
return null;
}
LoadRecordsToModel();
return SerializeObject(Model.ServiceRecords.First(f => f.ServiceRecordOid == oid));
}
[Authorize]
public string CheckRights(string von, string bis, bool inEditMode, string dateString, string startString, string endString)
{
{
if (Model == null)
{
return "SessionTimeout";
RedirectToActionPermanent("Index", "Login");
return null;
}
log.Info($"CheckRights: von:{von};bis:{bis};inEditMode:{inEditMode};dateString:{dateString};startString:{startString};endString:{endString}");
@@ -1898,10 +1957,14 @@ namespace BeWoPlanerMobil.Controllers
checkSR.Start = startDt;
checkSR.End = endDt;
if (Model.Employee.EmployeeOid != null)
checkSR.IP = Request.UserHostAddress;
checkSR.ServiceDescription = OperationsService.GetServiceDescription(Model.SelectedServiceDescriptionOid.Value);
checkSR.Employee = Model.SelectedEmployee ?? MobileSessionFacade.LoggedInCompactEmployee;
if (Model.SelectedEmployee != null && !Model.IsInGroupBookingMode)
{
checkSR.Employee = MobileSessionFacade.LoggedInCompactEmployee;
var sc = Model.SupportConcepts.FirstOrDefault(fod => fod.CostBearerRelations.Any(a => a.CostBearer2SupportConceptOid.HasValue && a.CostBearer2SupportConceptOid.Value.Equals(Model.CostBearer2SupportConceptOid)));
if (sc != null)
@@ -1918,26 +1981,25 @@ namespace BeWoPlanerMobil.Controllers
if (intervall > 0)
{
checkSR.RoundedDuration = dauer % intervall != 0 ? dauer + (intervall - (dauer % intervall)) : dauer;
checkSR.RoundedDuration = dauer % intervall != 0 ? dauer + (intervall - dauer % intervall) : dauer;
}
checkSR.CostBearer2SupportConceptOid = Model.CostBearer2SupportConceptOid;
}
}
checkSR.IP = Request.UserHostAddress;
checkSR.InsertedOn = DateTime.Now;
checkSR.InsUser = $"{MobileSessionFacade.LoggedInEmployee.FirstName} {MobileSessionFacade.LoggedInEmployee.LastName}";
checkSR.ServiceDescription = OperationsService.GetServiceDescription(Model.SelectedServiceDescriptionOid.Value);
var mandator = OperationsService.GetMandator();
var settings = mandator.Settings ?? string.Empty;
var splitSettings = settings.Split(';');
var maxDaysEditSRsAllowedSetting = splitSettings.ToList().FirstOrDefault(f => f.Contains("MaxDaysEditServiceRecordsAllowed"));
var maxDaysEditSRsAllowed = maxDaysEditSRsAllowedSetting != null ? int.Parse(maxDaysEditSRsAllowedSetting.Split('=')[1]) : 0;
var limitFuerZeiterfassungSetting = splitSettings.ToList().FirstOrDefault(f => f.Contains("AnzTageZeiterfassErfolgt"));
var limitFuerZeiterfassung = limitFuerZeiterfassungSetting != null ? limitFuerZeiterfassungSetting.Split('=')[1] : "0";
var limitFuerZeiterfassung = limitFuerZeiterfassungSetting != null ? int.Parse(limitFuerZeiterfassungSetting.Split('=')[1]) : 0;
if (MobileSessionFacade.CheckForUserRight(UserRightType.ServiceRecord_AllowEditAfterMaxDaysInNextMonth))
{
maxDaysEditSRsAllowed = -1;
}
SupportConceptStatisticsDC stats = null;
@@ -1948,7 +2010,10 @@ namespace BeWoPlanerMobil.Controllers
var employees = new List<long> {checkSR.Employee.EmployeeOid};
var newResult = new ValidationResult();
var validationResults = new List<ServiceRecord2Validation>();
checkSR.ServiceRecordFormat = ServiceRecordFormate.OriginaleZeiterfassung;
checkSR.DurationInStunden = ZeiterfassungsDauer.Minuten;
string dateRangeString;
@@ -1967,33 +2032,21 @@ namespace BeWoPlanerMobil.Controllers
var cb2scOids = (from scDc in Model.SelectedSupportConcepts where scDc.CostBearerRelations != null && scDc.CostBearerRelations.Count > 0 select scDc.CostBearerRelations[0].CostBearer2SupportConceptOid.Value).ToList();
var nodes = new List<FlatSupportConceptTreeNodeDC>();
foreach (var sc in CustomerService.LoadCompactSupportConceptsById(Model.SelectedSupportConcepts.Select(s => s.SupportConceptOid.Value)))
var relations = CustomerService.GetSupportConceptCostBearerRelationsById(cb2scOids);
foreach (var rel in relations)
{
nodes.Add(CreateFlatSupportConceptItem(sc, null));
}
var sr = CloneServiceRecordForGroupBooking(checkSR);
foreach (var node in nodes)
{
if (node?.SupportConceptTreeNodeDC != null)
{
var scDc = node.SupportConceptTreeNodeDC.SupportConcept;
var cbDc = node.SupportConceptTreeNodeDC.CostBearer;
var relDc = node.SupportConceptTreeNodeDC.SupportConceptCostBearerRelDC;
sr.SupportConcept = rel.SupportConcept;
sr.CostBearer = rel.CostBearer;
sr.CostBearer2SupportConceptOid = rel.CostBearer2SupportConceptOid;
checkSR.SupportConcept = scDc;
checkSR.CostBearer = cbDc;
var result = OperationsService.ValidateServiceRecord(sr, null, maxDaysEditSRsAllowed, employees, cb2scOids);
dateRangeString = rel.DateRangeString;
if (relDc != null)
{
checkSR.CostBearer2SupportConceptOid = relDc.CostBearer2SupportConceptOid;
}
}
var result = OperationsService.ValidateServiceRecord(checkSR, stats, maxDaysEditSRsAllowed, employees, cb2scOids);
dateRangeString = node?.SupportConceptTreeNodeDC != null ? node.SupportConceptTreeNodeDC.SupportConceptCostBearerRelDC.DateRangeString : "";
newResult.ServiceRecord2Validations.Add(new ServiceRecord2Validation(checkSR, result, dateRangeString));
validationResults.Add(new ServiceRecord2Validation(sr, result, dateRangeString));
}
}
else
@@ -2002,15 +2055,142 @@ namespace BeWoPlanerMobil.Controllers
dateRangeString = node?.SupportConceptTreeNodeDC != null ? node.SupportConceptTreeNodeDC.SupportConceptCostBearerRelDC.DateRangeString : "";
var result = OperationsService.ValidateServiceRecordEntry(checkSR, stats, maxDaysEditSRsAllowed, checkSR.GroupOid.HasValue, employees);
newResult.ServiceRecord2Validations.Add(new ServiceRecord2Validation(checkSR, result, dateRangeString));
validationResults.Add(new ServiceRecord2Validation(checkSR, result, dateRangeString));
}
newResult.MaxDaysEditServiceRecordsAllowed = maxDaysEditSRsAllowed.ToString();
newResult.LimitFuerZeiterfassung = limitFuerZeiterfassung;
newResult.Rights.Add(0, MobileSessionFacade.LoggedInUser.UserGroups.Any(a => a.Rights.Any(f => f.RightType.Equals(UserRightType.ServiceRecord_AllowCreateOverlappingFLS))));
newResult.Rights.Add(1, MobileSessionFacade.LoggedInUser.UserGroups.Any(a => a.Rights.Any(f => f.RightType.Equals(UserRightType.ServiceRecord_AllowCreateMoreFLSThanApproved))));
newResult.Rights.Add(2, MobileSessionFacade.LoggedInUser.UserGroups.Any(a => a.Rights.Any(f => f.RightType.Equals(UserRightType.BookServiceRecordAfterSettlementInvoice))));
var allowOverlappingFLS = MobileSessionFacade.CheckForUserRight(UserRightType.ServiceRecord_AllowCreateOverlappingFLS);
var allowMoreFLSThanApproved = MobileSessionFacade.CheckForUserRight(UserRightType.ServiceRecord_AllowCreateMoreFLSThanApproved);
var bookAfterSettlementInvoice = MobileSessionFacade.CheckForUserRight(UserRightType.BookServiceRecordAfterSettlementInvoice);
var newResult = new ValidationResult();
var exitLoop = false;
foreach (var sr2v in validationResults)
{
if(exitLoop)
{
break;
}
foreach (var vr in sr2v.ValidationResults)
{
if (exitLoop)
{
break;
}
switch(vr.ResultType)
{
case ServiceRecordOverlapping:
if (allowOverlappingFLS)
{
newResult.KannTrotzdemGespeichertWerden = true;
newResult.Message += "An dem gewählten Datum '" + von + "' existiert bereits ein Eintrag (" + vr.Message + " bei Klient/in " + vr.CustomerName + "). Möchten Sie trotzdem speichern?<br />";
exitLoop = false;
}
else
{
newResult.Message += "An dem gewählten Datum '" + von + "' existiert bereits ein Eintrag (" + vr.Message + " bei Klient/in " + vr.CustomerName + "). Speichern nicht möglich.<br />";
exitLoop = true;
newResult.KannTrotzdemGespeichertWerden = false;
}
break;
case EmployeeOverlapping:
if (allowOverlappingFLS)
{
newResult.Message += "An dem gewählten Datum " + von + " existiert bereits ein Eintrag von " + vr.EmployeeName + " (" + vr.Message + "). Möchten Sie trotzdem speichern?<br />";
exitLoop = false;
newResult.KannTrotzdemGespeichertWerden = true;
}
else
{
newResult.Message += "An dem gewählten Datum " + von + " existiert bereits ein Eintrag von " + vr.EmployeeName + " (" + vr.Message + "). Speichern nicht möglich.<br />";
exitLoop = true;
newResult.KannTrotzdemGespeichertWerden = false;
}
break;
case OutsideOfSupportConcept:
newResult.Message += "Das gewählte Datum " + von.Substring(0, 10) + " liegt außerhalb des Zeitraumes des gewählten Hilfeplans (" + sr2v.HilfePlanZeitraum + "). Speichern nicht möglich.<br />";
newResult.KannTrotzdemGespeichertWerden = false;
exitLoop = true;
break;
case ApprovedFLSOverspending:
var klient = "diesen Hilfeplan";
if (!string.IsNullOrEmpty(vr.CustomerName))
{
klient = "Klient/in " + vr.CustomerName;
}
var msg = "Die für " + klient + " genehmigten FLS (" + vr.ApprovedHours + ") werden mit diesem Eintrag überschritten. (" + vr.HoursNew + ").";
if (allowMoreFLSThanApproved)
{
newResult.Message += msg + " Möchten Sie trotzdem speichern?<br />";
exitLoop = false;
newResult.KannTrotzdemGespeichertWerden = true;
}
else
{
newResult.Message += msg + " Speichern nicht möglich.<br />";
exitLoop = true;
newResult.KannTrotzdemGespeichertWerden = false;
}
break;
case OutOfEditLimit:
newResult.Message += "Sie können keine neuen Leistungen für den " + von + " dokumentieren, da bereits der " + maxDaysEditSRsAllowed + ". des nachfolgenden Monats überschritten ist. Speichern nicht möglich.<br />";
exitLoop = true;
newResult.KannTrotzdemGespeichertWerden = false;
break;
case Error:
newResult.Message += "Beim Speichern ist ein Fehler aufgetreten. Speichern nicht möglich.<br />";
exitLoop = true;
newResult.KannTrotzdemGespeichertWerden = false;
break;
case SettlementInvoiceAlreadyExisting:
var klient2 = "diesen Hilfeplan";
if(!string.IsNullOrEmpty(vr.CustomerName))
{
klient2 = "Klient/in " + vr.CustomerName;
}
if (bookAfterSettlementInvoice)
{
newResult.Message += "Es existiert bereits eine Spitzabrechnung für " + klient2 + ". Um diesen Eintrag zu berücksichtigen, muss eventuell eine neue Spitzabrechnung erstellt werden. Möchten Sie trotzdem speichern?<br />";
exitLoop = false;
newResult.KannTrotzdemGespeichertWerden = true;
}
else
{
newResult.Message += "Sie können den Eintrag nicht bearbeiten, da bereits eine Spitzabrechnung für " + klient2 + " erstellt wurde. Speichern nicht möglich.<br />";
exitLoop = true;
newResult.KannTrotzdemGespeichertWerden = false;
}
break;
case FristAbgelaufen:
var intervall = "einem Tag";
if (limitFuerZeiterfassung != 1)
{
intervall = "" + limitFuerZeiterfassung + " Tagen";
}
newResult.Message += "Sie können keine neuen Leistungen für den " + von + " dokumentieren, da die Zeiterfassung innerhalb von " + intervall + " erfolgen muss. Das Speichern ist nicht möglich.<br />";
exitLoop = true;
newResult.KannTrotzdemGespeichertWerden = false;
break;
case Custom:
newResult.Message += vr.Message + "<br />";
exitLoop = true;
newResult.KannTrotzdemGespeichertWerden = false;
break;
}
}
}
Model.NewServiceRecord = new ServiceRecordDC();
@@ -2264,6 +2444,8 @@ namespace BeWoPlanerMobil.Controllers
Model.SelectedEmployees.Clear();
Model.SelectedSupportConcepts.Clear();
Model.SelectedEmployee = MobileSessionFacade.LoggedInCompactEmployee;
if (Model.SelectedSupportConcept != null)
{
var details = OperationsService.GetSupportConceptTreeNodeDetailInfo(Model.SelectedSupportConcept.Customer.CustomerOid, Model.SelectedSupportConcept.SupportConceptOid, Model.CostBearer2SupportConceptOid);
@@ -2429,5 +2611,104 @@ namespace BeWoPlanerMobil.Controllers
return MainModel.IsEmployeeSelectionVisible.ToString();
}
private IEnumerable<ServiceRecordDC> CalculateGroupBookingDuration(int pEmployeeCount, int pCustomerCount, ICollection<long> cb2ScOids, ServiceRecordDC pBaseRecord)
{
var compactSupportConcepts = CustomerServiceImp.GetCompactSupportConcepts((from sc in Model.SelectedSupportConcepts where sc.SupportConceptOid != null select sc.SupportConceptOid.Value).ToList(), GetUser().Employee.EmployeeOid);
var nodes = (from supportConcept in Model.SelectedSupportConcepts let cb = supportConcept.CostBearerRelations.FirstOrDefault(f => cb2ScOids.Contains(f.CostBearer2SupportConceptOid.Value)) let sc = compactSupportConcepts.FirstOrDefault(f => f.SupportConceptOid == supportConcept.SupportConceptOid) where cb != null && sc != null select SupportConceptService.CreateFlatSupportConceptItem(sc, CustomerService.LoadOrganisationCompact(cb.CostBearer.OrganisationOid))).ToList();
var list = new List<ServiceRecordDC>();
foreach(var node in nodes)
{
var sc = CloneServiceRecordForGroupBooking(pBaseRecord);
if(pBaseRecord.RoundedDuration == 0)
{
if(pBaseRecord.Start.HasValue && pBaseRecord.End.HasValue)
{
var minutes = pBaseRecord.End.Value.Subtract(pBaseRecord.Start.Value).TotalMinutes;
pBaseRecord.RoundedDuration = (decimal)minutes;
}
}
sc.GroupRoundedDuration = pBaseRecord.RoundedDuration;
sc.CostBearer2SupportConceptOid = node.SupportConceptTreeNodeDC.SupportConceptCostBearerRelDC.CostBearer2SupportConceptOid;
sc.SupportConcept = node.SupportConceptTreeNodeDC.SupportConcept;
sc.CostBearer = node.SupportConceptTreeNodeDC.CostBearer;
sc.Customer = node.SupportConceptTreeNodeDC.Customer;
sc.GroupEmployeeCount = pEmployeeCount;
sc.GroupPersonCount = pCustomerCount;
list.Add(sc);
}
var roundDuration = false;
var minuteInterval = 0;
string calcdId = null;
var lastMinuteInterval = -1;
if(Model.SelectedServiceDescriptionOid.HasValue && IsBillable(Model.SelectedServiceDescriptionOid.Value, Model.GetServiceDesctiptions()))
{
roundDuration = true;
foreach(var org in from dc in Model.SelectedSupportConcepts where dc.CostBearerRelations.Count > 0 select dc.CostBearerRelations.First().CostBearer)
{
if(org != null)
{
minuteInterval = org.ActualMinuteIntervall;
if(lastMinuteInterval == -1)
{
lastMinuteInterval = minuteInterval;
calcdId = org.CostBearerID;
}
else if(lastMinuteInterval != minuteInterval)
{
roundDuration = false;
}
}
else if(minuteInterval >= 0)
{
roundDuration = false;
}
else
{
minuteInterval = 0;
}
}
}
var duration = Model.NewServiceRecord.RoundedDuration;
var totalDuration = duration;
var groupDuration = OperationsService.CalculateGroupDuration2(pCustomerCount, pEmployeeCount, Model.NewServiceRecord.RoundedDuration, nodes.Select(s => s.SupportConceptTreeNodeDC.SupportConceptCostBearerRelDC.CostBearer2SupportConceptOid.Value).ToArray());
if(groupDuration != null)
{
pBaseRecord.GroupRoundedDuration = groupDuration.TotalDuration;
pBaseRecord.RoundedDuration = groupDuration.SingleDuration;
}
else
{
if(minuteInterval > 0 && roundDuration)
{
var calc = Calculations.GetInstance(calcdId);
totalDuration = calc.GetRoundedDuration(minuteInterval, duration);
}
pBaseRecord.RoundedDuration = Math.Round(totalDuration / pCustomerCount, 0, MidpointRounding.AwayFromZero);
pBaseRecord.GroupRoundedDuration = totalDuration;
}
return list;
}
}
}

View File

@@ -1,8 +1,6 @@
function selectGroupBookingForEditing(serviceRecordOid) {
hideSanduhr();
console.log("Gruppenbuchung wird bearbeitet");
setGroupEditingFlag(true);
$("#editGroupServiceRecord_" + serviceRecordOid).submit();
@@ -39,7 +37,8 @@ function getGroupEditingFlag() {
return flagData.obj || {};
}
/* NEUE GRUPPENBUCHUNG */
function hideGroupBookingPopup() {
var btn = $("#groupBookingOpenPopupBtn");
var container = $("#groupBookingPopupDivContainer");
@@ -48,12 +47,12 @@ function hideGroupBookingPopup() {
var rightContent = $("#rightContent");
var leftContent = $("#leftContent");
hideElement(container);
hideElement(popup);
hideElement(collapsible);
container.hide();
popup.hide();
collapsible.hide();
hideElement(rightContent);
hideElement(leftContent);
rightContent.hide();
leftContent.hide();
btn.css("background-image", "url('../Content/images/toggle-icon-d.svg')");
}
@@ -70,9 +69,8 @@ function openGroupBookingDiv() {
var popup = $("#groupBookingPopupDiv");
showElement(container);
showElement(popup);
container.show();
popup.show();
btn.css("background-image", "url('../Content/images/toggle-icon-u.svg')");
@@ -84,7 +82,7 @@ function openGroupBookingDiv() {
popup.css("top", parseInt(sum) + "px");
popup.css("width", (btn.innerWidth() - 2) + "px");
showElement(collapsible);
collapsible.show();
openGroupBookingTab(true);
}
@@ -98,13 +96,13 @@ function openGroupBookingTab(isSupportConceptTab) {
if (isSupportConceptTab) {
leftBtn.addClass("active");
rightBtn.removeClass("active");
showElement(leftContent);
hideElement(rightContent);
leftContent.show();
rightContent.hide();
} else {
rightBtn.addClass("active");
leftBtn.removeClass("active");
showElement(rightContent);
hideElement(leftContent);
rightContent.show();
leftContent.hide();
}
}
@@ -115,10 +113,9 @@ function addSupportConcepts() {
$("#groupBookingSupportConceptSelectionForm").submit();
}
/* ------------------- */
/* NEUE MITARBEITERMEHRFACHAUSWAHL */
function openEmployeePopup() {
var container = $("#employeePopupContainer");
@@ -131,8 +128,8 @@ function openEmployeePopup() {
var collapsible = $("#employeeCollapsible");
var popup = $("#employeePopupDiv");
showElement(container);
showElement(popup);
container.show();
popup.show();
btn.css("background-image", "url('../Content/images/toggle-icon-u.svg')");
@@ -143,8 +140,11 @@ function openEmployeePopup() {
popup.css("top", parseInt(sum) + "px");
popup.css("width", (btn.innerWidth() - 2) + "px");
popup.css("max-width", (btn.innerWidth() - 2) + "px");
showElement(collapsible);
collapsible.height(($(window).height() / 2) + "px");
collapsible.show();
}
function hideEmployeePopup() {
@@ -158,9 +158,9 @@ function hideEmployeePopup() {
var collapsible = $("#employeeCollapsible");
var popup = $("#employeePopupDiv");
hideElement(container);
hideElement(popup);
hideElement(collapsible);
container.hide();
popup.hide();
collapsible.hide();
btn.css("background-image", "url('../Content/images/toggle-icon-d.svg')");
}
@@ -172,4 +172,3 @@ function addEmployees() {
$("#groupBookingEmployeeSelectionForm").submit();
}
/* ------------------------------- */

View File

@@ -94,7 +94,7 @@ function initBeWoMobile(actionPath) {
toggleSelectClassesForElement("#recordLoader_select", "#record-loader-select-container");
toggleSelectClassesForElement("#textbausteine_select", "#textbausteine-select-container");
var selectedServiceCategory = $($("#scDropDown")).find(":selected").val();
var selectedServiceCategory = $("#scDropDown").find(":selected").val()
if(isInGroupBookingMode() && isInEditingMode()) {
if(getGroupEditingFlag().flag === false) {
@@ -164,10 +164,10 @@ function initBeWoMobile(actionPath) {
});
var supportConceptTableHasEntries = $("#leftContent input:checked").length;
var employeesTableHasEntries = $("#rightContent input:checked").length;
var employeesTableHasEntries = $("#employeeCollapsible input:checked").length;
if (isInGroupBookingMode()) {
var value = (supportConceptTableHasEntries === 0 || employeesTableHasEntries === 0) ? false : true;
var value = supportConceptTableHasEntries > 0 && employeesTableHasEntries > 0 ? false : true;
$("#anlegenEditierenBtn").prop("disabled", value);
}
@@ -254,14 +254,18 @@ function loadSettingsAccordingToBWP() {
}
function initializeDocumentationTextareas() {
$.ajax({
type: "GET",
url: CheckDokuReiterUrl,
success: function (json) {
var documentationTypes = $.parseJSON(json);
numberOfDocumentationTypes = documentationTypes.length;
makeAjaxCall(
"GET",
CheckDokuReiterUrl,
function (json) {
var dokuTypes = $.parseJSON(json);
if(numberOfDocumentationTypes === 0) {
numberOfDocumentationTypes = dokuTypes.length;
var tabWidth = 100 / numberOfDocumentationTypes;
$(".doku-tab-link").css("width", tabWidth + "%");
if (numberOfDocumentationTypes === 0) {
$("#tddokureiter").css("display", "none");
$("#trnormalDoku").css("display", "table-row");
window.focusedDokuTextarea = $("#notiz_textbox");
@@ -269,28 +273,44 @@ function initializeDocumentationTextareas() {
window.focusedDokuTextarea = $("#notiz_textbox1");
}
if(numberOfDocumentationTypes === 1) {
if (numberOfDocumentationTypes === 1) {
$("#tddokureiter").css("display", "none");
$("#trnormalDoku").css("display", "table-row");
$("#trnormalDokuLabel").text(documentationTypes[0].TypeDescription);
$("#trnormalDokuLabel").text(dokuTypes[0].TypeDescription);
}
if(numberOfDocumentationTypes > 1) {
for(var i = 0; i < numberOfDocumentationTypes; i++) {
if (numberOfDocumentationTypes > 1) {
var height = 0;
for (var i = 0; i < numberOfDocumentationTypes; i++) {
var idNumber = i + 1;
$('#DokName' + idNumber).text(documentationTypes[i].TypeDescription);
$('#Dokumentation' + idNumber).css("display", "block");
var dokuTab = $("#doku-name-" + idNumber);
dokuTab.html(dokuTypes[i].TypeDescription);
showElement(dokuTab);
var outerHeight = dokuTab.outerHeight();
if (outerHeight > height) {
height = outerHeight;
}
}
$(".doku-tab-link").css("height", height + "px");
}
if(numberOfDocumentationTypes > 0) {
focusOnTab(1);
if (numberOfDocumentationTypes > 0) {
focusOnDoku(1);
}
}
});
},
null,
null
);
}
// Formulardaten im Browser speichern, um nach einem erneuten Laden der Seite (z.B. beim Hinzufügen von Hilfeplänen bzw. Gruppen oder Mitarbeitern) die Daten wiederherzustellen.
var savedEditFormValues = {};
$(document).on("change", ".edit-form-input",
@@ -298,8 +318,6 @@ $(document).on("change", ".edit-form-input",
saveFormValuesLocally();
});
//$(document).change(function() { console.log("test"); });
function saveFormValuesLocally() {
var recordObject = {
category: $("#kategorien_select").val(),

View File

@@ -43,7 +43,7 @@ var collapsibleHtml;
function buildGoalTreeItem(goalItem, selectedGoalOids) {
var goalOid = goalItem.ValueListEntryOid;
var goalHeader = goalItem.Header;
var isChecked = selectedGoalOids != null && isElementInArray(selectedGoalOids, goalOid) ? "checked" : "";
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>';
@@ -354,8 +354,8 @@ function selectServiceRecord(oid) {
showElement($("#singleSCEmployeeSelectionContainer"));
}
hideElement($("#groupBookingOpenPopupBtn"));
hideElement($("#groupBookingOpenEmployeeSelectionPopupBtn"));
$("#groupBookingOpenPopupBtn").hide();
$("#groupBookingOpenEmployeeSelectionPopupBtn").hide();
}, null, null);
}
@@ -381,7 +381,8 @@ function selectServiceRecord(oid) {
function activateForm(actionPath) {
$("input").prop("disabled", false);
$("textarea").prop("disabled", false);
$("textarea").prop("disabled", false);
$(".doku-tab-link").prop("disabled", false);
$("#kategorien_select, #leistungen_select, #recordLoader_select, #textbausteine_select").prop("disabled", false);
toggleSelectClassesForElement("#kategorien_select", "#kategorien-select-container");
@@ -529,201 +530,7 @@ function toggleModalWrapper() {
$(".modalWrapper").css("height", $(document).height());
}
function validateServiceRecordBeforeSubmit() {
function getLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition, showError);
} else {
console.log("Ortung wird von diesem Browser nicht unterstützt");
showPosition(null);
}
}
var dateStr = $("#datum_textbox").val();
var startStr = $("#start_textbox").val();
var endStr = $("#ende_textbox").val();
var x = getDateObj(true);
var y;
if ($("#enddatum_textbox").val() !== "") {
y = getEndDateObj();
} else {
y = getDateObj(false);
}
var vonDatum = getDateTimeStringWithLeadingZeros(x);
var bisDatum = getDateTimeStringWithLeadingZeros(y);
var isValidRecord = true;
makeAjaxCall("POST", checkRightsUrl, function(json) {
if (json === "SessionTimeout") {
window.location.href = redirectLink;
return;
}
if (json === "StartGreaterEnd") {
hideSanduhr();
writeFatalErrorMessage("Die Startzeit darf nicht größer als die Endzeit sein!");
return;
}
var meldungen = $.parseJSON(json);
console.log(meldungen);
var relations = meldungen.ServiceRecord2Validations;
var results = null;
var allowOverlappingFLS = false;
var allowMoreFLSThanApproved = false;
var bookAfterSettlementInvoice = false;
$.each(meldungen.Rights, function(position) {
var value = meldungen.Rights[position];
var key = parseInt(position);
switch (key) {
case 0:
allowOverlappingFLS = value;
break;
case 1:
allowMoreFLSThanApproved = value;
break;
case 2:
bookAfterSettlementInvoice = value;
break;
default:
break;
}
});
for (var j = 0; j < relations.length; j++) {
results = relations[j].ValidationResults;
var exitLoop = false;
for (var i = 0; i < results.length; i++) {
if (exitLoop) {
break;
}
switch (results[i].ResultType) {
case 0:
// ServiceRecordOverlapping: ServiceRecord überschneidet sich mit einem anderen Eintrag
var msg1 = "An dem gewählten Datum '" + vonDatum + "' existiert bereits ein Eintrag (" + results[i].Message + " bei Klient/in " + results[i].CustomerName + "). Speichern nicht möglich.";
if (allowOverlappingFLS === true) {
var r = confirm("An dem gewählten Datum '" + vonDatum + "' existiert bereits ein Eintrag (" + results[i].Message + " bei Klient/in " + results[i].CustomerName + "). Möchten Sie trotzdem speichern?");
isValidRecord = r;
exitLoop = !isValidRecord;
} else {
alert(msg1);
isValidRecord = false;
exitLoop = true;
}
break;
case 1:
// EmployeeOverlapping: Employee hat einen mit diesem Eintrag sich überschneidenden Eintrag
var msg2 = "An dem gewählten Datum " + vonDatum + " existiert bereits ein Eintrag von " + results[i].EmployeeName + "(" + results[i].Message + "). Speichern nicht möglich.";
if (allowOverlappingFLS === true) {
var r2 = confirm("An dem gewählten Datum " + vonDatum + " existiert bereits ein Eintrag von " + results[i].EmployeeName + "(" + results[i].Message + "). Möchten Sie trotzdem speichern?");
isValidRecord = r2;
exitLoop = !isValidRecord;
} else {
alert(msg2);
isValidRecord = false;
exitLoop = true;
}
break;
case 2:
// OutsideOfSupportConcept: Der Eintrag liegt außerhalb des Hilfeplanzeitraumes
alert("Das gewählte Datum " + vonDatum.slice(0, 10) + " liegt außerhalb des Zeitraumes des gewählten Hilfeplans (" + relations[j].HilfePlanZeitraum + "). Speichern nicht möglich.");
//writeFatalErrorMessage("Das gewählte Datum " + vonDatum.slice(0, 10) + " liegt außerhalb des Zeitraumes des gewählten Hilfeplans (" + relations[j].HilfePlanZeitraum + "). Speichern nicht möglich.");
isValidRecord = false;
exitLoop = true;
break;
case 3:
// ApprovedFLSOverspending: Die Anzahl der genehmigten FLS wird überschritten
var klient = "diesen Hilfeplan";
if (results[i].CustomerName !== null && results[i].CustomerName.length >= 0) {
klient = "Klient/in " + results[i].CustomerName;
}
var msg3 = "Die für " + klient + " genehmigten FLS (" + results[i].ApprovedHours + ") werden mit diesem Eintrag überschritten. (" + results[i].HoursNew + ").";
if (allowMoreFLSThanApproved === true) {
var r3 = confirm(msg3 + " Möchten Sie trotzdem speichern?");
isValidRecord = r3;
exitLoop = !isValidRecord;
} else {
alert(msg3);
isValidRecord = false;
exitLoop = true;
}
break;
case 4:
// OutOfEditLimit: MaxDaysEditServiceRecordAllowed überschritten
alert("Sie können keine neuen Leistungen für den " + vonDatum + " dokumentieren, da bereits der " + meldungen.MaxDaysEditServiceRecordsAllowed + ". des nachfolgenden Monats überschritten ist.");
isValidRecord = false;
exitLoop = true;
break;
case 5:
// Error: Ein genereller Fehler ist bei der Validierung aufgetreten
alert("Beim Speichern ist ein Fehler aufgetreten. Speichern nicht möglich.");
isValidRecord = false;
exitLoop = true;
break;
case 6:
// SettlementInvoiceAlreadyExisting: Es existiert bereits eine Spitzabrechnung
var klient2 = "diesen Hilfeplan";
if (results[i].CustomerName !== null && results[i].CustomerName.length >= 0) {
klient2 = "Klient/in " + results[i].CustomerName;
}
var msg6 = "Es existiert bereits eine Spitzabrechnung für " + klient2 + ". Um diesen Eintrag zu berücksichtigen, muss eventuell eine neue Spitzabrechnung erstellt werden. Das Speichern ist nicht möglich.";
if (bookAfterSettlementInvoice === true) {
msg6 = "Sie können den Eintrag nicht bearbeiten, da bereits eine Spitzabrechnung für " + klient2 + " erstellt wurde. Speichern nicht möglich.";
}
alert(msg6);
isValidRecord = false;
exitLoop = true;
break;
case 7:
// FristAbgelaufen: Die Frist zur Bearbeitung ist abgelaufen
var intervall = "einem Tag";
if (results[i].LimitFuerZeiterfassung !== "1") {
intervall = results[i].LimitFuerZeiterfassung + " Tagen";
}
var msg7 = "Sie können keine neuen Leistungen für den " + vonDatum + " dokumentieren, da die Zeiterfassung innerhalb von " + intervall + " erfolgen muss. Das Speichern ist nicht möglich.";
alert(msg7);
isValidRecord = false;
exitLoop = true;
break;
default:
// Custom(8), da default: ServiceRecordValidationResult.Custom
alert(results[i].Message);
isValidRecord = false;
exitLoop = true;
break;
}
}
}
$("#URLSave").val(dataURL);
$("#TimeStampSave").val(newday);
$("#GeoLocSaveXCOOR").val(langenGrad);
$("#GeoLocSaveYCOOR").val(breitenGrad);
if (isValidRecord) {
$("#createSRForm").submit();
} else {
hideSanduhr();
}
},
{ von: vonDatum, bis: bisDatum, inEditMode: $("#anlegenEditierenBtn").val() === "Speichern", dateString: dateStr, startString: startStr, endString: endStr });
}
function ErfolgteSpx() {
if (document.getElementById("SaveSignature").value === "True") {
@@ -887,10 +694,10 @@ function initAppointmentEditForm() {
currTime.setMinutes(currTime.getMinutes() + j);
}
$("#AppointmentEditForm").css("display", "block");
$("#KalenderTable").css("display", "none");
$("#KalenderNavigation").css("display", "none");
$("#KalenderTableTask").css("display", "none");
$("#AppointmentEditForm").show();//css("display", "block");
$("#KalenderTable").hide();//css("display", "none");
$("#KalenderNavigation").hide();//css("display", "none");
$("#KalenderTableTask").hide();//css("display", "none");
$("#StartDate").val($("#KalenderDatumFormat").val());
$("#EndDate").val($("#KalenderDatumFormat").val());
$("#TerminStartZeit").val(getHoursAndMinutesWithLeadingZeros(currTime));
@@ -908,21 +715,22 @@ function initAppointmentEditForm() {
$("#TerminSpeichern").val("Speichern");
$("#TerminSpeichernAbbrechen").val("Abbrechen");
$("#TerminSpeichern").css("display", "none");
$("#TerminSpeichern").hide();//css("display", "none");
$("#InsertAppointmentButton").css("display", "inline");
}
function hideEditForm() {
$("#AppointmentEditForm").css("display", "none");
$("#KalenderTable").css("display", "block");
$("#KalenderNavigation").css("display", "block");
$("#KalenderTableTask").css("display", "block");
$("#AppointmentEditForm").hide();
$("#KalenderTable").show();
$("#KalenderNavigation").show();
$("#KalenderTableTask").show();
$("#StartDate").val("");
}
function nextDayButtonClick() {
var nextdatum = new Date($("#KalenderDatum").val());
var nextdatum = new Date($("#KalenderDatum").val() + "T00:00:00Z");
nextdatum.setDate((nextdatum.getDate() + 1));
$("#KalenderDatum").val(toDateStringYearMonthDay(nextdatum));
@@ -1206,6 +1014,7 @@ function loescheUnterschrift(canvas, ctx) {
function preloadData(serviceRecordOid) {
initSignatureInfo(serviceRecordOid);
}
@@ -1419,7 +1228,7 @@ function updateEigenschaftsfelder() {
$("#map-canvas").css("width", customerTableWidth - 16);
$("#map-canvas").css("height", customerTableWidth - 16);
if(minSizes == undefined) {
if(minSizes === undefined) {
return;
}
@@ -1446,6 +1255,8 @@ $(window).resize(function () {
if($("#klientenTabelle").css("display") === "block") {
updateEigenschaftsfelder();
}
updateDokuTabLinks();
});
function showSanduhr() {
@@ -1457,21 +1268,21 @@ function showSanduhr() {
function hideSanduhr() {
if($("#errorPopupDiv").css("display") === "none" && $("#popupDiv").css("display") === "none") {
$(".modalWrapper").css("display", "none");
$(".modalWrapper").hide();
$(".modalWrapper").css("height", "0");
}
if($("#SuccessPopupDiv").css("display") === "none" && $("#popupDiv").css("display") === "none") {
$(".modalWrapper").css("display", "none");
$(".modalWrapper").hide();
$(".modalWrapper").css("height", "0");
}
if($("#AendernPopupDiv").css("display") === "none" && $("#popupDiv").css("display") === "none") {
$(".modalWrapper").css("display", "none");
$(".modalWrapper").hide();
$(".modalWrapper").css("height", "0");
}
$(".warte-animation").css("display", "none");
$(".warte-animation").hide();
}
function submitDeletionForm() {
@@ -1630,8 +1441,6 @@ function preselectCustomer() {
function setSelectedEmployee() {
var oid = parseInt($("#employeesDropDown").find(":selected").val());
console.log('selected employee oid: ' + oid);
if(isNaN(oid)) {
return;
}
@@ -1642,7 +1451,7 @@ function setSelectedEmployee() {
}
function SaveOnly() {
if(typeof(Storage) != "undefined") {
if(typeof Storage !== "undefined") {
clearLocalStorage(1);
var costBearer2SupportConceptOid = $("#scDropDown").val();
@@ -1776,19 +1585,50 @@ function showErrorAfterCrash() {
}
function focusOnTab(tabIdentifier) {
focusOnDoku(tabIdentifier);
}
function focusOnDoku(number) {
setTimeout(function() {
var displayValue;
for(var i = 0; i < window.numberOfDocumentationTypes; i++) {
for (var i = 0; i < window.numberOfDocumentationTypes; i++) {
var idNumber = i + 1;
displayValue = idNumber === tabIdentifier ? "block" : "none";
displayValue = idNumber === number ? "block" : "none";
$('#notiz_textbox' + idNumber).css("display", displayValue);
if (idNumber === number) {
$("#doku-name-" + idNumber).addClass("active");
} else {
$("#doku-name-" + idNumber).removeClass("active");
}
$("#doku-tab-content-" + idNumber).css("display", displayValue);
$("#notiz_textbox" + idNumber).css("display", displayValue);
}
$('#notiz_textbox' + tabIdentifier).get(0).focus();
window.focusedDokuTextarea = $('#notiz_textbox' + tabIdentifier);
$("#notiz_textbox" + number).get(0).focus();
window.focusedDokuTextarea = $("#notiz_textbox" + number);
}, 100);
}
function updateDokuTabLinks() {
if (numberOfDocumentationTypes !== undefined && numberOfDocumentationTypes > 1) {
var height = 0;
$(".doku-tab-link").css("height", "auto");
for (var i = 0; i < numberOfDocumentationTypes; i++) {
var idNumber = i + 1;
var dokuTab = $("#doku-name-" + idNumber);
var outerHeight = dokuTab.outerHeight();
if (outerHeight > height) {
height = outerHeight;
}
}
$(".doku-tab-link").css("height", height + "px");
}
}

View File

@@ -0,0 +1,104 @@
var isValidRecord = true;
function validateServiceRecordBeforeSubmit() {
function getLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition, showError);
} else {
console.log("Ortung wird von diesem Browser nicht unterstützt");
showPosition(null);
}
}
var dateStr = $("#datum_textbox").val();
var startStr = $("#start_textbox").val();
var endStr = $("#ende_textbox").val();
var x = getDateObj(true);
var y;
if ($("#enddatum_textbox").val() !== "") {
y = getEndDateObj();
} else {
y = getDateObj(false);
}
var vonDatum = getDateTimeStringWithLeadingZeros(x);
var bisDatum = getDateTimeStringWithLeadingZeros(y);
//console.log("Validiere Eintrag...");
makeAjaxCall("POST", window.checkRightsUrl, function (json) {
$("#URLSave").val(dataURL);
$("#TimeStampSave").val(newday);
$("#GeoLocSaveXCOOR").val(langenGrad);
$("#GeoLocSaveYCOOR").val(breitenGrad);
if (json === "SessionTimeout") {
window.location.href = redirectLink;
return;
}
if (json === "StartGreaterEnd") {
hideSanduhr();
writeFatalErrorMessage("Die Startzeit darf nicht größer als die Endzeit sein!");
return;
}
var meldungen = $.parseJSON(json);
kannTrotzdemGespeichertWerden = meldungen.KannTrotzdemGespeichertWerden;
//console.log("Validierung abgeschlossen. Meldung: " + meldungen.Message + "; Kann trotzdem gespeichert werden: " + meldungen.KannTrotzdemGespeichertWerden);
if (meldungen.Message === null) {
submitCreationForm();
return;
}
toggleValidationPopup(meldungen.Message);
},
{ von: vonDatum, bis: bisDatum, inEditMode: $("#anlegenEditierenBtn").val() === "Speichern", dateString: dateStr, startString: startStr, endString: endStr });
}
var kannTrotzdemGespeichertWerden = false;
function submitCreationForm() {
toggleValidationPopup(null);
if (kannTrotzdemGespeichertWerden) {
$(".modalWrapper").show();
$(".warte-animation").show();
$("#createSRForm").submit();
} else {
$(".warte-animation").hide();
}
}
function toggleValidationPopup(validationMessage) {
$(".warte-animation").hide();
var popupDiv = $("#validationPopupDiv");
popupDiv.toggle();
if (popupDiv.css("display") === "block" && validationMessage !== null && validationMessage !== undefined && validationMessage.length > 0) {
$("#validationPopupText").html(validationMessage);
var t = $("#validationPopupTitle").outerHeight();
var u = $("#validationPopupText").outerHeight();
var v = $("#validationBtn1").outerHeight();
var w = $("#validationBtn2").outerHeight();
var x = $("#validationResultList").outerHeight();
var h = t + u + v + w + w + x;
popupDiv.css("height", h + "px");
popupDiv.css("top", window.pageYOffset + window.innerHeight / 2 - h / 2);
popupDiv.css("margin-top", "0");
} else {
$(".modalWrapper").hide();
popupDiv.css("margin-top", "auto");
}
}

View File

@@ -3,7 +3,7 @@
}
function loadTextbausteineForCategoryOnSuccess(json) {
if (json == null) {
if (json === null) {
return;
}
@@ -56,7 +56,7 @@ function buildTreeRecursively(textmodule) {
}
function setTextModule(moduleOid) {
if (window.focusedDokuTextarea == null) {
if (window.focusedDokuTextarea === null) {
if ($("#trnormalDoku").css("display") !== "none") {
window.focusedDokuTextarea = $("#notiz_textbox");
} else {
@@ -78,7 +78,7 @@ function setTextbaustein() {
}
function loadTextbausteinContentOnSuccess(textbausteintext) {
if (focusedDokuTextarea != null) {
if (focusedDokuTextarea !== null) {
var cursorPosition = focusedDokuTextarea.prop("selectionStart");
var v = focusedDokuTextarea.val();
var textBefore = v.substring(0, cursorPosition);
@@ -104,7 +104,7 @@ function showTextModulesPopup() {
}
function hideTextModulePopup() {
hideElement($("#textModulePopupDivContainer"));
hideElement($("#textModulePopupDiv"));
hideElement($("#kollabierbar2"));
$("#textModulePopupDivContainer").hide();
$("#textModulePopupDiv").hide();
$("#kollabierbar2").hide();
}

View File

@@ -328,5 +328,51 @@ namespace BeWoPlanerMobil.Util
return flatNode;
}
public static ServiceRecordDC CloneServiceRecordForGroupBooking(ServiceRecordDC pOriginal)
{
var m = pOriginal;
var clone = new ServiceRecordDC
{
CostBearer = m.CostBearer,
CostBearer2SupportConceptOid = m.CostBearer2SupportConceptOid,
Customer = m.Customer,
Employee = m.Employee,
End = m.End,
Goals = m.Goals,
GroupEmployeeCount = m.GroupEmployeeCount,
GroupOid = m.GroupOid,
SignatureOid = m.SignatureOid,
GroupPersonCount = m.GroupPersonCount,
GroupRoundedDuration = m.GroupRoundedDuration,
InsUser = m.InsUser,
InsertedOn = m.InsertedOn,
Notice = m.Notice,
Notice2 = m.Notice2,
Notice3 = m.Notice3,
Notice4 = m.Notice4,
Notice5 = m.Notice5,
RTFNotice1 = m.RTFNotice1,
RTFNotice2 = m.RTFNotice2,
RTFNotice3 = m.RTFNotice3,
RTFNotice4 = m.RTFNotice4,
RTFNotice5 = m.RTFNotice5,
RoundedDuration = m.RoundedDuration,
ServiceDescription = m.ServiceDescription,
Start = m.Start,
SupportConcept = m.SupportConcept,
ServiceRecordType = m.ServiceRecordType,
DistanceInMeter = m.DistanceInMeter,
IP = m.IP,
Relevance = m.Relevance,
IsCreatedInMobileClient = true,
WohnheimbuchungsOid = m.WohnheimbuchungsOid,
DurationInStunden = m.DurationInStunden,
ServiceRecordFormat = m.ServiceRecordFormat
};
return clone;
}
}
}

View File

@@ -1,12 +1,13 @@
using System.Collections.Generic;
using BS.Shared.DataContracts;
namespace BeWoPlanerMobil.Util
{
public class ServiceRecord2Validation
{
public ServiceRecordDC ServiceRecord { get; set; }
public List<ServiceRecordValidationResultDC> ValidationResults { get; set; }
public ServiceRecordDC ServiceRecord { get; }
public List<ServiceRecordValidationResultDC> ValidationResults { get; }
public string HilfePlanZeitraum { get; }
public ServiceRecord2Validation(ServiceRecordDC pServiceRecord, List<ServiceRecordValidationResultDC> pValidationResults, string pHilfePlanZeitraum)

View File

@@ -1,13 +1,8 @@
using System.Collections.Generic;
namespace BeWoPlanerMobil.Util
namespace BeWoPlanerMobil.Util
{
public class ValidationResult
{
public Dictionary<int, bool> Rights { get; set; } = new Dictionary<int, bool>();
public string MaxDaysEditServiceRecordsAllowed { get; set; }
public string LimitFuerZeiterfassung { get; set; } = "0";
public List<ServiceRecord2Validation> ServiceRecord2Validations { get; set; } = new List<ServiceRecord2Validation>();
public bool KannTrotzdemGespeichertWerden { get; set; } = true;
public string Message { get; set; }
}
}

View File

@@ -196,64 +196,37 @@
<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>
<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 class="input-wrapper cell-content">
<div class="doku-tab">
<button class="doku-tab-link" id="doku-name-1" onclick="focusOnDoku(1)" disabled></button>
<button class="doku-tab-link" id="doku-name-2" onclick="focusOnDoku(2)" disabled></button>
<button class="doku-tab-link" id="doku-name-3" onclick="focusOnDoku(3)" disabled></button>
<button class="doku-tab-link" id="doku-name-4" onclick="focusOnDoku(4)" disabled></button>
<button class="doku-tab-link" id="doku-name-5" onclick="focusOnDoku(5)" disabled></button>
</div>
<div class="doku-tab-content" id="doku-tab-content-1">
<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>
</div>
<div class="doku-tab-content" id="doku-tab-content-2">
<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>
</div>
<div class="doku-tab-content" id="doku-tab-content-3">
<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>
</div>
<div class="doku-tab-content" id="doku-tab-content-4">
<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>
</div>
<div class="doku-tab-content" id="doku-tab-content-5">
<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>
</div>
</div>
</td>
</tr>
@@ -664,16 +637,15 @@
<div id="employeePopupContainer" class="see-thru-popup-container" onclick="hideEmployeePopup()"></div>
<div id="employeePopupDiv" class="group-booking-popup-div">
<div id="employeeCollapsible" class="collapsible-group-booking">
@using (Html.BeginForm("AddEmployeesToGroupBooking", "Main", FormMethod.Post, new { id = "groupBookingEmployeeSelectionForm" }))
@using(Html.BeginForm("AddEmployeesToGroupBooking", "Main", FormMethod.Post, new { id = "groupBookingEmployeeSelectionForm" }))
{
var i = 0;
<table>
@foreach (var ma in Model.EmployeeListItems)
<table id="groupBookingEmployeeTable">
@foreach(var ma in Model.EmployeeListItems)
{
<tr>
<td style="width: 1px; white-space: nowrap;">
<input type="checkbox" value="@ma.Value" name="employee_@i"
@if (Model.SelectedEmployees.Any(a => long.Parse(ma.Value).Equals(a.EmployeeOid))) { @Html.Raw("checked=\"checked\"") } />
<input type="checkbox" value="@ma.Value" name="employee_@i" @if(Model.SelectedEmployees.Any(a => long.Parse(ma.Value).Equals(a.EmployeeOid))) { @Html.Raw("checked=\"checked\"") } />
</td>
<td class="group-booking-text-cell">
@ma.Text
@@ -683,8 +655,8 @@
}
</table>
}
<input type="button" onclick="addEmployees()" value="Hinzufügen" />
</div>
<input type="button" onclick="addEmployees()" value="Hinzufügen" />
</div>
<div id="klienten">
@@ -964,6 +936,15 @@
</div>
</div>
<div id="validationPopupDiv">
<h4 id="validationPopupTitle" class="center-aligned-text-element" style="padding-top: 0;">Validierung</h4>
<p id="validationPopupText" class="center-aligned-text-element"></p>
<div id="validationPopupBtnDiv" class="center-aligned-text-element" style="margin: 0; padding: 0;">
<input type="button" id="validationBtn1" class="popupBtn" value="OK" onclick="submitCreationForm()" />
<input type="button" id="validationBtn2" class="popupBtn" value="Abbrechen" onclick="toggleValidationPopup()" />
</div>
</div>
<input value="@Html.Raw("false")" id="AenderePopupDivSchalter" type="hidden" />
<div id="UnterschriftBereich" style="display: none" align="center">

View File

@@ -25,6 +25,7 @@
<script src="https://ajax.aspnetcdn.com/ajax/knockout/knockout-3.0.0.js"></script>
<script>$(function () { $(".date-input-css").datepicker(); })</script>
<script src="~/Scripts/textbausteine.js?v=1.0"></script>
<script src="~/Scripts/serviceRecordValidation.js?v=1.0"></script>
</head>
<body>
@RenderBody()

View File

@@ -79,7 +79,7 @@ namespace BeWo.Service.Plugins
//t = "8001550599"; // Biallas BeWo
//t = "7282396774"; // Caritas Unna
//t = "6884855402"; // IBP
t = "4867997795"; // ADiK Kleve
//t = "4867997795"; // ADiK Kleve
//t = "3184859776"; // Sergej Becker
//t = "7752610643"; // BWK Gbr
//t = "3785623125"; // Betreuwo

View File

@@ -198,14 +198,11 @@ namespace BeWo.Service.Plugins
return result;
}
public virtual List<ServiceRecordValidationResultDC> ValidateServiceRecord(ServiceRecordDC newServiceRecord,
SupportConceptStatisticsDC statistics, int maxDaysEditServiceRecordsAllowed,
IList<long> employeeOids, IList<long> cb2scOids)
public virtual List<ServiceRecordValidationResultDC> ValidateServiceRecord(ServiceRecordDC newServiceRecord, SupportConceptStatisticsDC statistics, int maxDaysEditServiceRecordsAllowed, IList<long> employeeOids, IList<long> cb2scOids)
{
var result = new List<ServiceRecordValidationResultDC>();
if (!newServiceRecord.Start.HasValue)
if (!newServiceRecord.Start.HasValue)
return result;

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using BS.Shared.DataContracts.Compact;
@@ -121,6 +122,5 @@ namespace BS.Shared.DataContracts
[DataMember]
public ServiceRecordFormate? ServiceRecordFormat { get; set; }
}
}
}