MoK: Reports werden alle in einem einzigen PartialView angezeigt und das AbstractModel von dem alle Model erben, hat die Report- und ReportTitle-Eigenschaften.
ServiceRecords werden wie im FaC validiert, d.h. dass Arbeitszeiten und Pausenzeiten keine Überschneidungswarnung bekommen.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
using BS.Shared.DataContracts;
|
||||
@@ -17,6 +18,16 @@ namespace BeWo.Scheduler.ViewModel
|
||||
{
|
||||
var result = Subject;
|
||||
|
||||
// Man darf den Betreff nicht sehen, wenn man der Originator ist und nicht in der nicht leeren EmployeeList ist oder man weder Originator noch in der EmployeeList ist
|
||||
|
||||
var isInEmployeeList = EmployeeList.Any(e2A => e2A.Employee.Equals(BeWoApp.CompactLoggedOnEmployee));
|
||||
var isOriginator = Originator.Equals(BeWoApp.CompactLoggedOnEmployee);
|
||||
|
||||
if(IsPrivate && (!isOriginator && !isInEmployeeList || !isInEmployeeList))
|
||||
{
|
||||
result = "Privat";
|
||||
}
|
||||
|
||||
if(IsTask)
|
||||
{
|
||||
result = result ?? string.Empty;
|
||||
|
||||
@@ -283,6 +283,7 @@
|
||||
<Compile Include="Controllers\CustomerController.cs" />
|
||||
<Compile Include="Controllers\DevExpressSchedulerController.cs" />
|
||||
<Compile Include="Controllers\ExternalSignatureController.cs" />
|
||||
<Compile Include="Controllers\ReportBaseController.cs" />
|
||||
<Compile Include="Controllers\ReportController.cs" />
|
||||
<Compile Include="Controllers\ReportViewerController.cs" />
|
||||
<Compile Include="Controllers\SchedulerController.cs" />
|
||||
@@ -575,7 +576,7 @@
|
||||
<Content Include="Views\Customer\DocumentPartial.cshtml" />
|
||||
<Content Include="Scripts\moment\moment.min.js.map" />
|
||||
<Content Include="Scripts\moment\moment-with-locales.min.js.map" />
|
||||
<Content Include="Views\Customer\CustomerReportPartial.cshtml" />
|
||||
<Content Include="Views\Shared\BeWoReportPartial.cshtml" />
|
||||
<Content Include="Views\Scheduler\FiveDaySchedulerPartial.cshtml" />
|
||||
<Content Include="Views\Scheduler\OneDaySchedulerPartial.cshtml" />
|
||||
<Content Include="Views\Scheduler\SevenDaySchedulerPartial.cshtml" />
|
||||
@@ -593,7 +594,6 @@
|
||||
<Content Include="Views\Main\MultiBookingPartial.cshtml" />
|
||||
<Content Include="Views\Report\QuittierungsbelegsResultPartial.cshtml" />
|
||||
<Content Include="Views\ReportViewer\ReportViewer.cshtml" />
|
||||
<Content Include="Views\ReportViewer\DocumentWebViewerPartial.cshtml" />
|
||||
<Content Include="Views\Report\ConfirmationReceiptSignaturePartial.cshtml" />
|
||||
<Content Include="Views\ReportViewer\ReportViewerFormPartial.cshtml" />
|
||||
<Content Include="Views\Main\OneTimeLinkCreationPartial.cshtml" />
|
||||
@@ -607,6 +607,7 @@
|
||||
<Content Include="Views\Main\MultiBookingSelectionPartial.cshtml" />
|
||||
<Content Include="Views\Main\MultiBookingScCbRelList.cshtml" />
|
||||
<Content Include="Views\Main\GoalRatingPopupContentPartial.cshtml" />
|
||||
<Content Include="Views\ReportViewer\BerichteFormPartialView.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="packages.config" />
|
||||
|
||||
@@ -110,6 +110,10 @@ textarea {
|
||||
background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
|
||||
}
|
||||
|
||||
.collapsing {
|
||||
transition: none !important;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Bootstrap v4.4.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2019 The Bootstrap Authors
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -138,4 +138,8 @@ $font-family-sans-serif: 'Signika Negative', sans-serif;
|
||||
|
||||
.needs-validation {}
|
||||
|
||||
.collapsing {
|
||||
transition: none !important;
|
||||
}
|
||||
|
||||
@import "bootstrap/scss/bootstrap";
|
||||
@@ -17,7 +17,7 @@ using DevExpress.XtraReports.UI;
|
||||
|
||||
namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
public class CustomerController : AbstractBaseController
|
||||
public class CustomerController : ReportBaseController
|
||||
{
|
||||
private CustomerModel _Model;
|
||||
public CustomerModel Model
|
||||
@@ -240,6 +240,10 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
var notice = formCollection["notiz"]?.RemoveUppercaseEsszett();
|
||||
|
||||
var krankenkasse = formCollection["krankenkasse"];
|
||||
var versichertennummer = formCollection["versichertennummer"];
|
||||
var versichertenstatus = formCollection["versichertenstatus"];
|
||||
|
||||
var customer = Model.SelectedCustomer;
|
||||
|
||||
if(customer is null)
|
||||
@@ -263,6 +267,10 @@ namespace BeWoPlanerMobil.Controllers
|
||||
customer.Sex = castSex;
|
||||
}
|
||||
|
||||
customer.HealthInsurance = krankenkasse;
|
||||
customer.InsuranceNumber = versichertennummer;
|
||||
customer.VersichertenStatus = versichertenstatus;
|
||||
|
||||
customer.AddressLine1 = adresszusatz;
|
||||
customer.Street = street;
|
||||
customer.PostalCode = postalCode;
|
||||
@@ -315,6 +323,22 @@ namespace BeWoPlanerMobil.Controllers
|
||||
}
|
||||
|
||||
|
||||
[Authorize]
|
||||
public override string ResetReport()
|
||||
{
|
||||
if(Model is null)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
Model.Report = null;
|
||||
Model.ReportName = null;
|
||||
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
|
||||
#region Medikamentenverordnungen
|
||||
[Authorize]
|
||||
public ActionResult ShowMedList(int reportType)
|
||||
@@ -322,14 +346,14 @@ namespace BeWoPlanerMobil.Controllers
|
||||
if(Model is null || !MobileSessionFacade.IsUserLoggedIn() || Request.Browser.Browser.Equals("InternetExplorer") || !AbstractModel.IsAllowedToSeeMedikamentenliste)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return PartialView("CustomerReportPartial", Model);
|
||||
return PartialView("BeWoReportPartial", Model);
|
||||
}
|
||||
|
||||
var selectedReportType = (CustomerReportType)reportType;
|
||||
|
||||
SelectReport(selectedReportType);
|
||||
|
||||
return PartialView("CustomerReportPartial", Model);
|
||||
return PartialView("BeWoReportPartial", Model);
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
@@ -338,14 +362,14 @@ namespace BeWoPlanerMobil.Controllers
|
||||
if(Model is null || !MobileSessionFacade.IsUserLoggedIn() || Request.Browser.Browser.Equals("InternetExplorer") || !AbstractModel.IsAllowedToSeeMedikamentenliste)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return PartialView("CustomerReportPartial", Model);
|
||||
return PartialView("BeWoReportPartial", Model);
|
||||
}
|
||||
|
||||
Model.SelectedReportType = CustomerReportType.Historie;
|
||||
|
||||
GenerateMobileMedListForSelectedCustomer(medListOid);
|
||||
|
||||
return PartialView("CustomerReportPartial", Model);
|
||||
return PartialView("BeWoReportPartial", Model);
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
@@ -416,14 +440,6 @@ namespace BeWoPlanerMobil.Controllers
|
||||
Model.ZahlungsbelegsReportObject = null;
|
||||
}
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
public string ResetReport()
|
||||
{
|
||||
Model.Report = null;
|
||||
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Bargeldkassen
|
||||
@@ -614,7 +630,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
if(Model is null)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return PartialView("CustomerReportPartial", Model);
|
||||
return PartialView("BeWoReportPartial", Model);
|
||||
}
|
||||
|
||||
var bargeldkasse = Model.Bargeldkassen.FirstOrDefault(f => f.BargeldkassenOid.HasValue && f.BargeldkassenOid.Value.Equals(kassenbuchOid));
|
||||
@@ -624,7 +640,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
if(bargeldkasse?.ObjectOid is null)
|
||||
{
|
||||
return PartialView("CustomerReportPartial", Model);
|
||||
return PartialView("BeWoReportPartial", Model);
|
||||
}
|
||||
|
||||
var bargeldkassenReportZeitraum = startDate.Equals(startDate.GetFirstOfMonth()) && endDate.Equals(startDate.GetLastOfMonth()) ?
|
||||
@@ -642,7 +658,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
Model.Report = report;
|
||||
Model.ReportName = name;
|
||||
|
||||
return PartialView("CustomerReportPartial", Model);
|
||||
return PartialView("BeWoReportPartial", Model);
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
@@ -659,7 +675,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
if(Model is null)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return PartialView("CustomerReportPartial", Model);
|
||||
return PartialView("BeWoReportPartial", Model);
|
||||
}
|
||||
|
||||
var kassenbuch = Model.Bargeldkassen.FirstOrDefault(bargeldkasse => bargeldkasse.Bargeldtransaktionen.Any(transaktion => transaktion.BargeldtransaktionOid.Equals(transaktionsOid)));
|
||||
@@ -678,7 +694,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
Model.ReportName = "Zahlungsbeleg";
|
||||
}
|
||||
|
||||
return PartialView("CustomerReportPartial", Model);
|
||||
return PartialView("BeWoReportPartial", Model);
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
@@ -155,7 +154,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
var customerFilter = MobileUserSettingsUtils.GetSettingValueAsEnum(userSettings, SettingsKeys.CustomerFilterInZeiterfassung, CustomerFilterEnum.MyCustomer);
|
||||
|
||||
if (customerFilter != CustomerFilterEnum.MyCustomer && !AbstractModel.IsAllowedToSeeSupportConceptFilter)
|
||||
if(customerFilter != CustomerFilterEnum.MyCustomer && !AbstractModel.IsAllowedToSeeSupportConceptFilter)
|
||||
{
|
||||
customerFilter = CustomerFilterEnum.MyCustomer;
|
||||
}
|
||||
@@ -174,11 +173,6 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
Model.GroupsOfPeople = EmployeeService.GetAllGroups(GetUser().Employee.EmployeeOid).OrderBy(gop => gop.Name).ToList();
|
||||
|
||||
if(!Model.IsInEditingMode)
|
||||
{
|
||||
Model.SelectedGoals.Clear();
|
||||
}
|
||||
|
||||
Model.ShowDistanceField = UserSettingsUtils.GetSettingValueAsBool(mandatorSettings, SettingsKeys.ShowDistanceFields);
|
||||
|
||||
Model.Dokutypes = ValueListService.GetAllValueListEntrysByType(ValueListEntryType.DocumentType);
|
||||
@@ -231,11 +225,6 @@ namespace BeWoPlanerMobil.Controllers
|
||||
}).ToList();
|
||||
}
|
||||
|
||||
if(Model.ServiceCategories is null)
|
||||
{
|
||||
Model.ServiceCategories = new List<ServiceCategoryModel>();
|
||||
}
|
||||
|
||||
if(Model.SelectedConceptCostBearerRelations is null)
|
||||
{
|
||||
Model.SelectedConceptCostBearerRelations = new List<SupportConceptCostBearerRelDC>();
|
||||
@@ -255,13 +244,13 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
Model.IsServiceRecordNoticeMandatory = settingsValue is null || !settingsValue.Equals("0");
|
||||
|
||||
var isInList = !(Model.SelectedSupportConceptListObject is null) && Model.SupportConceptListObjects.Contains(Model.SelectedSupportConceptListObject);
|
||||
var isInList = !(Model.SelectedCostBearer2SupportConceptRelListObject is null) && Model.SupportConceptListObjects.Contains(Model.SelectedCostBearer2SupportConceptRelListObject);
|
||||
|
||||
if(Model.SelectedSupportConceptListObject is null || !isInList)
|
||||
if(Model.SelectedCostBearer2SupportConceptRelListObject is null || !isInList)
|
||||
{
|
||||
if(!(Model.SelectedSupportConceptListObject is null) && !isInList)
|
||||
if(!(Model.SelectedCostBearer2SupportConceptRelListObject is null) && !isInList)
|
||||
{
|
||||
Log.Info($"Model.SelectedSupportConceptListObject.Oid = {Model.SelectedSupportConceptListObject.CostBearer2SupportConceptOid} is not in list !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
|
||||
Log.Info($"Model.SelectedSupportConceptListObject.Oid = {Model.SelectedCostBearer2SupportConceptRelListObject.CostBearer2SupportConceptOid} is not in list !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
|
||||
|
||||
var sb = new StringBuilder();
|
||||
foreach(var o in Model.SupportConceptListObjects)
|
||||
@@ -277,7 +266,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
}
|
||||
|
||||
Model.SelectedSupportConceptListObject = Model.SupportConceptListObjects.FirstOrDefault(f => f.CostBearer2SupportConceptOid == "-1") ?? Model.SupportConceptListObjects.First();
|
||||
Model.SelectedCostBearer2SupportConceptRelListObject = Model.SupportConceptListObjects.FirstOrDefault(f => f.CostBearer2SupportConceptOid == "-1") ?? Model.SupportConceptListObjects.First();
|
||||
Model.CostBearer2SupportConceptOid = -1;
|
||||
|
||||
Model.HasAnyRatingTypes = AbstractModel.HasRightToRateGoals && OperationsService.GetAllRatingTypes().Any();
|
||||
@@ -530,11 +519,16 @@ namespace BeWoPlanerMobil.Controllers
|
||||
var massnahmen = goals.Where(w => Massnahmentypen.Contains(w.Type)).OrderBy(s => s.DisplayName).ToList();
|
||||
var goalTree = new List<GoalTreeItem>();
|
||||
var goalTreeDic = new Dictionary<long, GoalTreeItem>();
|
||||
var goalsWithRating = Model.SelectedServiceRecord?.Goals.Where(goal => goal.RatingTypeOid.HasValue).ToList() ?? new List<ValueListEntryDC>();
|
||||
var goalsWithRating = Model.SelectedServiceRecord?.Goals?.Where(goal => goal.RatingTypeOid.HasValue).ToList() ?? new List<ValueListEntryDC>();
|
||||
var ratingTypes = OperationsService.GetRatingTypesByOids(goalsWithRating.Where(goal => goal.RatingTypeOid.HasValue).Select(goal => goal.RatingTypeOid.Value).Distinct().ToList());
|
||||
|
||||
foreach(var ziel in ziele.Where(z => z.ValueListEntryOid.HasValue))
|
||||
foreach(var ziel in ziele)
|
||||
{
|
||||
if(ziel.ValueListEntryOid is null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var treeItem = new GoalTreeItem(true, ziel.Type)
|
||||
{
|
||||
Children = new List<GoalTreeItem>(),
|
||||
@@ -553,6 +547,11 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
foreach(var zielMitEltern in goalTreeDic.Values.Where(zielMitEltern => zielMitEltern.ParentOid != null))
|
||||
{
|
||||
if(zielMitEltern.ParentOid is null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
goalTreeDic[zielMitEltern.ParentOid.Value].Children.Add(zielMitEltern);
|
||||
}
|
||||
|
||||
@@ -590,12 +589,9 @@ namespace BeWoPlanerMobil.Controllers
|
||||
goalTreeDic[ziel.ParentOid.Value].Children.Add(kind);
|
||||
}
|
||||
|
||||
foreach(var item in goalTreeDic.Values)
|
||||
foreach(var item in goalTreeDic.Values.Where(item => item.Children.Count == 0))
|
||||
{
|
||||
if(item.Children.Count == 0)
|
||||
{
|
||||
item.IsLeaf = true;
|
||||
}
|
||||
item.IsLeaf = true;
|
||||
}
|
||||
|
||||
goalTree = goalTree.OrderBy(o => o.ValueListEntryOid).ToList();
|
||||
@@ -622,6 +618,11 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
var parentDC = ValueListService.GetValueListEntryByOid(pParentOid);
|
||||
|
||||
if(parentDC?.ValueListEntryOid is null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!_ParentGoals.ContainsKey(parentDC.ValueListEntryOid.Value))
|
||||
{
|
||||
_ParentGoals.Add(parentDC.ValueListEntryOid.Value, parentDC);
|
||||
@@ -866,34 +867,6 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return "data:image/png;base64," + SignatureUtils.ConvertImageToBase64String(watermarker.Image);
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
public string LoadServiceCategories(long pServiceCategoryOid)
|
||||
{
|
||||
if (Model is null)
|
||||
{
|
||||
Logout();
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var serviceCategoryModel = Model.ServiceCategories.FirstOrDefault(s => s.ServiceCategoryOid.HasValue && s.ServiceCategoryOid.Value == pServiceCategoryOid);
|
||||
|
||||
if(serviceCategoryModel != null)
|
||||
{
|
||||
Model.SelectedServiceCategoryOid = serviceCategoryModel.ServiceCategoryOid;
|
||||
Model.SelectedServiceDescriptionOid = serviceCategoryModel.ServiceDescriptions.OrderBy(serviceDescription => serviceDescription.Position).FirstOrDefault()?.ServiceDescriptionOid;
|
||||
}
|
||||
|
||||
return SerializeObject(serviceCategoryModel != null ? serviceCategoryModel.ServiceDescriptions.OrderBy(serviceDescription => serviceDescription.Position).ToList() : new List<ServiceDescriptionDC>());
|
||||
}
|
||||
catch(Exception exception)
|
||||
{
|
||||
Debug.WriteLine(exception);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
public string LoadCompleteTextbausteinByOid(long pTextbausteinOid)
|
||||
{
|
||||
@@ -1719,17 +1692,15 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
try
|
||||
{
|
||||
if (Model is null)
|
||||
if(Model is null)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
TempData[TempDataConstants.ErrorMessageKey] = "Model ist null!";
|
||||
return Logout();
|
||||
}
|
||||
|
||||
long? cb2ScOid = Convert.ToInt64(formCollection[FormCollectionConstants.CostBearer2SupportConceptOidKey]);
|
||||
Log.Info($"SelectSupportConcept: {cb2ScOid}");
|
||||
|
||||
Model.SelectedServiceDescriptionOid = null;
|
||||
Model.SelectedCostBearerSupportConceptRelOid = cb2ScOid;
|
||||
|
||||
LoadSupportConceptThings(cb2ScOid);
|
||||
|
||||
@@ -1755,17 +1726,9 @@ namespace BeWoPlanerMobil.Controllers
|
||||
Model.Categories2Descriptions = new Dictionary<ServiceCategoryDC, List<ServiceDescriptionDC>>();
|
||||
}
|
||||
|
||||
if(Model.ServiceCategories is null)
|
||||
{
|
||||
Model.ServiceCategories = new List<ServiceCategoryModel>();
|
||||
}
|
||||
|
||||
Model.ServiceCategories.Clear();
|
||||
Model.Categories2Descriptions.Clear();
|
||||
Model.SelectedServiceCategory = null;
|
||||
Model.SelectedServiceCategoryOid = null;
|
||||
Model.SelectedServiceDescription = null;
|
||||
Model.SelectedServiceDescriptionOid = null;
|
||||
|
||||
if(cb2ScOid is null && (Model.IsInGroupBookingMode || Model.IsInMultiBookingMode))
|
||||
{
|
||||
@@ -1778,20 +1741,8 @@ namespace BeWoPlanerMobil.Controllers
|
||||
// Alle ServiceDescriptions der ausgewählten Hilfepläne laden
|
||||
var nodes = OperationsService.GetSupportConceptTreeNodeDetailInfos(selectedSupportConcepts.Where(sc => sc.SupportConceptOid.HasValue).Select(sc => sc.SupportConceptOid.Value).ToList());
|
||||
|
||||
if(Model.Categories2Descriptions is null)
|
||||
{
|
||||
Model.Categories2Descriptions = new Dictionary<ServiceCategoryDC, List<ServiceDescriptionDC>>();
|
||||
}
|
||||
|
||||
Model.Categories2Descriptions = CreateServiceCategory2ServiceDescription(nodes, true);
|
||||
|
||||
if(Model.Categories2Descriptions.Count == 0 && nodes.Any())
|
||||
{
|
||||
var allServiceDescriptions = OperationsService.GetAllServiceDescriptions();
|
||||
|
||||
allServiceDescriptions.DoForEach(serviceDescription => Model.Categories2Descriptions.AddOrUpdateValueInDictionary(serviceDescription.Category, serviceDescription));
|
||||
}
|
||||
|
||||
SelectFirstServiceDescription();
|
||||
|
||||
return;
|
||||
@@ -1800,33 +1751,25 @@ namespace BeWoPlanerMobil.Controllers
|
||||
Model.CostBearer2SupportConceptOid = cb2ScOid;
|
||||
Model.SelectedSupportConcept =
|
||||
Model.SupportConcepts.FirstOrDefault(
|
||||
f =>
|
||||
f.CostBearerRelations.Any(
|
||||
a =>
|
||||
a.CostBearer2SupportConceptOid.HasValue &&
|
||||
a.CostBearer2SupportConceptOid.Value.Equals(Model.CostBearer2SupportConceptOid)));
|
||||
supportConcept =>
|
||||
supportConcept.CostBearerRelations.Any(
|
||||
supportConceptCostBearerRel =>
|
||||
supportConceptCostBearerRel.CostBearer2SupportConceptOid.HasValue &&
|
||||
supportConceptCostBearerRel.CostBearer2SupportConceptOid.Value.Equals(Model.CostBearer2SupportConceptOid)));
|
||||
|
||||
if(Model.SelectedSupportConcept != null)
|
||||
{
|
||||
Model.SelectedSupportConceptListObject = Model.SupportConceptListObjects.First(f => long.Parse(f.CostBearer2SupportConceptOid) == cb2ScOid);
|
||||
Model.SelectedCostBearer2SupportConceptRelListObject = Model.SupportConceptListObjects.First(f => long.Parse(f.CostBearer2SupportConceptOid) == cb2ScOid);
|
||||
|
||||
var node = OperationsService.GetSupportConceptTreeNodeDetailInfo(Model.SelectedSupportConcept.Customer.CustomerOid, Model.SelectedSupportConcept.SupportConceptOid, Model.CostBearer2SupportConceptOid);
|
||||
|
||||
Model.ServiceCategories = node.ServiceAccountings.Count > 0
|
||||
? CreateServiceCategoryModels(node.ServiceAccountings.Select(sa => sa.ServiceDescription).ToList())
|
||||
: CreateServiceCategoryModels(OperationsService.GetAllServiceDescriptions());
|
||||
|
||||
Model.ServiceCategories = Model.ServiceCategories.Where(c => !c.OhneHilfeplan.HasValue || c.OhneHilfeplan.Value == AccountingvisibilityType.Beides || c.OhneHilfeplan.Value == AccountingvisibilityType.NurKlientenbezogen).ToList();
|
||||
|
||||
Model.Categories2Descriptions = CreateServiceCategory2ServiceDescription(new List<SupportConceptTreeNodeDetailInfoDC> { node }, false);
|
||||
}
|
||||
else if(cb2ScOid == -2) // Ohne Hilfeplan
|
||||
{
|
||||
var allServiceDescriptions = OperationsService.GetAllServiceDescriptions();
|
||||
|
||||
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();
|
||||
Model.SelectedCostBearer2SupportConceptRelListObject = Model.SupportConceptListObjects.First(f => f.CostBearer2SupportConceptOid.Equals(cb2ScOid.ToString()));
|
||||
|
||||
if(Model.Categories2Descriptions is null)
|
||||
{
|
||||
@@ -1848,8 +1791,8 @@ namespace BeWoPlanerMobil.Controllers
|
||||
}
|
||||
else if(cb2ScOid == -1) // Hilfeplan Auswählen
|
||||
{
|
||||
Model.SelectedSupportConceptListObject = Model.SupportConceptListObjects.First(f => f.CostBearer2SupportConceptOid.Equals(cb2ScOid.ToString()));
|
||||
Model.ServiceCategories.Clear();
|
||||
Model.SelectedCostBearer2SupportConceptRelListObject = Model.SupportConceptListObjects.First(f => f.CostBearer2SupportConceptOid.Equals(cb2ScOid.ToString()));
|
||||
|
||||
if(Model.Categories2Descriptions is null)
|
||||
{
|
||||
Model.Categories2Descriptions = new Dictionary<ServiceCategoryDC, List<ServiceDescriptionDC>>();
|
||||
@@ -1860,12 +1803,6 @@ namespace BeWoPlanerMobil.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
// Kategorien werden nach Position sortiert
|
||||
if (Model.ServiceCategories != null)
|
||||
{
|
||||
Model.ServiceCategories = Model.ServiceCategories.OrderBy(serviceCategory => serviceCategory.Position).ToList();
|
||||
}
|
||||
|
||||
// Ist der Klient abwesend, wird dies wie im FaC angezeigt
|
||||
if(Model.SelectedSupportConcept?.Customer?.AbsenceTimes?.Any() ?? false)
|
||||
{
|
||||
@@ -1900,18 +1837,18 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
var firstServiceCategory2ServiceDescriptions = Model.Categories2Descriptions.OrderBy(c2d => c2d.Key.Position).ThenBy(c2d => c2d.Key.ServiceCategoryOid).FirstOrDefault(c2d => c2d.Value.Any());
|
||||
|
||||
if(firstServiceCategory2ServiceDescriptions.Key != null)
|
||||
if(firstServiceCategory2ServiceDescriptions.Key is null)
|
||||
{
|
||||
var serviceDescription = firstServiceCategory2ServiceDescriptions.Value.OrderBy(sd => sd.Position).ThenBy(sd => sd.ServiceDescriptionOid).First();
|
||||
|
||||
Model.SelectedServiceDescription = serviceDescription;
|
||||
Model.SelectedServiceCategory = serviceDescription.Category;
|
||||
Model.SelectedServiceDescriptionOid = serviceDescription.ServiceDescriptionOid;
|
||||
Model.SelectedServiceCategoryOid = serviceDescription.Category.ServiceCategoryOid;
|
||||
return;
|
||||
}
|
||||
|
||||
var serviceDescription = firstServiceCategory2ServiceDescriptions.Value.OrderBy(sd => sd.Position).ThenBy(sd => sd.ServiceDescriptionOid).First();
|
||||
|
||||
Model.SelectedServiceDescription = serviceDescription;
|
||||
Model.SelectedServiceCategory = serviceDescription.Category;
|
||||
}
|
||||
|
||||
private static Dictionary<ServiceCategoryDC, List<ServiceDescriptionDC>> CreateServiceCategory2ServiceDescription(List<SupportConceptTreeNodeDetailInfoDC> nodes, bool isGroupBooking)
|
||||
private Dictionary<ServiceCategoryDC, List<ServiceDescriptionDC>> CreateServiceCategory2ServiceDescription(List<SupportConceptTreeNodeDetailInfoDC> nodes, bool isGroupBooking)
|
||||
{
|
||||
var result = new Dictionary<ServiceCategoryDC, List<ServiceDescriptionDC>>();
|
||||
|
||||
@@ -1926,7 +1863,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
firstNode.ServiceAccountings.DoForEach(serviceAccounting => result.AddOrUpdateValueInDictionary(serviceAccounting.ServiceDescription.Category, serviceAccounting.ServiceDescription));
|
||||
}
|
||||
|
||||
|
||||
foreach(var serviceAccounting in firstNode.ServiceAccountings)
|
||||
{
|
||||
var serviceDescription = serviceAccounting.ServiceDescription;
|
||||
@@ -1938,7 +1875,17 @@ namespace BeWoPlanerMobil.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
return result.OrderBy(kvp => kvp.Key.Position).ToDictionary(category2Descriptions => category2Descriptions.Key, category2Descriptions => category2Descriptions.Value);
|
||||
if(firstNode.ServiceAccountings.Count == 0)
|
||||
{
|
||||
var allServiceDescriptions = OperationsService.GetAllServiceDescriptions().Where(sd => sd.Category.OhneHilfeplan != AccountingvisibilityType.NichtKlientenbezogen).ToList();
|
||||
|
||||
foreach(var serviceDescription in allServiceDescriptions)
|
||||
{
|
||||
result.AddOrUpdateValueInDictionary(serviceDescription.Category, serviceDescription);
|
||||
}
|
||||
}
|
||||
|
||||
return result.OrderBy(kvp => kvp.Key.Position).ToDictionary(category2Descriptions => category2Descriptions.Key, category2Descriptions => category2Descriptions.Value.OrderBy(serviceDescription => serviceDescription.Position).ToList());
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
@@ -1991,20 +1938,20 @@ namespace BeWoPlanerMobil.Controllers
|
||||
if (Model is null)
|
||||
{
|
||||
Logout();
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
return "0";
|
||||
}
|
||||
|
||||
var sc = Model.SelectedSupportConcept;
|
||||
if (!Model.IsInGroupBookingMode && sc is null)
|
||||
{
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
return "0";
|
||||
}
|
||||
|
||||
if(string.IsNullOrEmpty(pGoalOids))
|
||||
{
|
||||
Model.SelectedGoals.Clear();
|
||||
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
return "0";
|
||||
}
|
||||
|
||||
var splitOids = pGoalOids.Trim(';').Split(';');
|
||||
@@ -2028,15 +1975,13 @@ namespace BeWoPlanerMobil.Controllers
|
||||
allGoals.AddRangeIfElementsNotIn(parents);
|
||||
|
||||
var goals = allGoals.Where(w => w.ValueListEntryOid.HasValue && selectedGoalOids.Contains(w.ValueListEntryOid.Value)).ToList();
|
||||
|
||||
// ToDo: Hier liegt der Bug!
|
||||
// ToDo: vorhandene Bewertungen beachten!
|
||||
|
||||
var stillSelectedGoals = Model.SelectedGoals.Where(s => goals.Any(a => a.ValueListEntryOid.HasValue && a.ValueListEntryOid.Value == s.ValueListEntryOid)).ToList();
|
||||
|
||||
Model.SelectedGoals = stillSelectedGoals;
|
||||
Model.SelectedGoals.AddRangeIfElementsNotIn(goals);
|
||||
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
return Model.SelectedGoals?.Count.ToString() ?? "0";
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
@@ -2052,7 +1997,6 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
Model.SelectedServiceDescription = serviceDescription;
|
||||
|
||||
Model.SelectedServiceDescriptionOid = pServiceDescriptionOid;
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
@@ -2171,7 +2115,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
var wasSuccessful = long.TryParse(oidString, out var serviceRecordOid);
|
||||
|
||||
if (!wasSuccessful)
|
||||
if(!wasSuccessful)
|
||||
{
|
||||
return RedirectToActionPermanent("Main");
|
||||
}
|
||||
@@ -2191,8 +2135,8 @@ namespace BeWoPlanerMobil.Controllers
|
||||
var selectedServiceDescription = selectedServiceRecord.ServiceDescription;
|
||||
var selectedServiceCategory = selectedServiceDescription.Category;
|
||||
|
||||
Model.SelectedServiceDescriptionOid = selectedServiceDescription.ServiceDescriptionOid;
|
||||
Model.SelectedServiceCategoryOid = selectedServiceCategory.ServiceCategoryOid;
|
||||
Model.SelectedServiceDescription = selectedServiceDescription;
|
||||
Model.SelectedServiceCategory = selectedServiceCategory;
|
||||
|
||||
Model.PreviouslySelectedEmployee = Model.SelectedEmployee;
|
||||
Model.SelectedEmployee = selectedServiceRecord.Employee;
|
||||
@@ -2210,8 +2154,6 @@ namespace BeWoPlanerMobil.Controllers
|
||||
Model.SelectedSupportConcept = null;
|
||||
Model.SelectedEmployee = null;
|
||||
|
||||
Model.ServiceCategories = CreateServiceCategoryModels(OperationsService.GetAllServiceDescriptions());
|
||||
|
||||
var group = OperationsService.GetServiceRecordGroup(selectedServiceRecord.GroupOid.Value);
|
||||
|
||||
var employees = group.ServiceRecordList.Select(serviceRecord => serviceRecord.Employee).Distinct().ToList();
|
||||
@@ -2228,8 +2170,6 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
LoadServiceCategoriesToModel(null);
|
||||
|
||||
Model.SelectedServiceDescriptionOid = selectedServiceRecord.ServiceDescription.ServiceDescriptionOid;
|
||||
Model.SelectedServiceCategoryOid = selectedServiceRecord.ServiceDescription.Category.ServiceCategoryOid;
|
||||
Model.SelectedServiceDescription = selectedServiceDescription;
|
||||
Model.SelectedServiceCategory = selectedServiceCategory;
|
||||
|
||||
@@ -2242,7 +2182,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
[Authorize]
|
||||
public string GetSelectedRecordInformation()
|
||||
{
|
||||
if (Model is null)
|
||||
if(Model is null)
|
||||
{
|
||||
Logout();
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
@@ -2250,7 +2190,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
var result = LeerzeichenFuerGetMethoden;
|
||||
|
||||
if (Model.SelectedServiceRecordOid.HasValue)
|
||||
if(Model.SelectedServiceRecordOid.HasValue)
|
||||
{
|
||||
result = SerializeObject(Model.ServiceRecords.First(f => f.ServiceRecordOid == Model.SelectedServiceRecordOid));
|
||||
}
|
||||
@@ -2498,7 +2438,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
dateRangeString = node?.SupportConceptTreeNodeDC != null ? node.SupportConceptTreeNodeDC.SupportConceptCostBearerRelDC.DateRangeString : "";
|
||||
}
|
||||
|
||||
var result = OperationsService.ValidateServiceRecordEntry(checkServiceRecord, stats, maxDaysEditSRsAllowed, checkServiceRecord.GroupOid.HasValue, employeeOids);
|
||||
var result = OperationsService.ValidateServiceRecord(checkServiceRecord, stats, maxDaysEditSRsAllowed, null, null);
|
||||
validationResults.Add(new ServiceRecord2Validation(checkServiceRecord, result, dateRangeString ?? ""));
|
||||
} // Mehrfachbuchung
|
||||
else if(Model.IsInMultiBookingMode && !Model.IsInGroupBookingMode)
|
||||
@@ -2642,9 +2582,20 @@ namespace BeWoPlanerMobil.Controllers
|
||||
intervall = "" + limitFuerZeiterfassung + " Tagen";
|
||||
}
|
||||
|
||||
newResult.Message += "Sie können keine neuen Leistungen für den " + von + " dokumentieren, da die Zeiterfassung innerhalb von " + intervall + " erfolgen muss.<br /><br />";
|
||||
exitLoop = true;
|
||||
newResult.KannTrotzdemGespeichertWerden = false;
|
||||
|
||||
if(!MobileSessionFacade.CheckForUserRight(UserRightType.ServiceRecordAllowEditAfterMindays))
|
||||
{
|
||||
if(limitFuerZeiterfassung == 1)
|
||||
{
|
||||
newResult.Message += $"Sie können keine neuen Leistungen für den {von} dokumentieren, da die Zeiterfassung innerhalb von einem Tag erfolgen muss.<br /><br />";
|
||||
}
|
||||
else
|
||||
{
|
||||
newResult.Message += $"Sie können keine neuen Leistungen für den {von} dokumentieren, da die Zeiterfassung innerhalb von {intervall} erfolgen muss.<br /><br />";
|
||||
}
|
||||
|
||||
exitLoop = true;
|
||||
}
|
||||
|
||||
break;
|
||||
case Custom:
|
||||
@@ -2753,10 +2704,6 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
var allowDeleteAfterEmployeeSignature = MobileSessionFacade.CheckForUserRight(UserRightType.ServiceRecord_AllowDeleteAfterEmployeeSignature);
|
||||
|
||||
var allowDeleteAll = MobileSessionFacade.CheckForUserRight(UserRightType.CreateAll);
|
||||
|
||||
var validationResultList = OperationsService.ValidateServiceRecordDeletion(serviceRecord, Model.Employee.EmployeeOid.Value);
|
||||
|
||||
if(validationResultList.Count > 0)
|
||||
@@ -2813,7 +2760,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
try
|
||||
{
|
||||
if (Model is null)
|
||||
if(Model is null)
|
||||
{
|
||||
Logout();
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
@@ -2822,7 +2769,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
Model.SelectedEmployee = Model.AllEmployees.First(f => f.EmployeeOid.Equals(employeeOid));
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
catch (Exception e)
|
||||
catch(Exception e)
|
||||
{
|
||||
Log.Info("Error in SetServiceRecordEmployee:");
|
||||
Log.Error(e.Message, e);
|
||||
@@ -2923,7 +2870,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
[Authorize]
|
||||
public ActionResult SetGroupBookingMode(FormCollection pFormCollection)
|
||||
{
|
||||
if (Model is null)
|
||||
if(Model is null)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return Logout();
|
||||
@@ -2947,7 +2894,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
/// </param>
|
||||
private void ResetBookingMode(BookingMode bookingMode)
|
||||
{
|
||||
if (Model is null)
|
||||
if(Model is null)
|
||||
{
|
||||
Logout();
|
||||
return;
|
||||
@@ -3015,28 +2962,14 @@ namespace BeWoPlanerMobil.Controllers
|
||||
}
|
||||
|
||||
ResetGroupBookingMode();
|
||||
|
||||
if (Model.SelectedSupportConcept != null)
|
||||
{
|
||||
var details = OperationsService.GetSupportConceptTreeNodeDetailInfo(Model.SelectedSupportConcept.Customer.CustomerOid, Model.SelectedSupportConcept.SupportConceptOid, Model.CostBearer2SupportConceptOid);
|
||||
|
||||
Model.ServiceCategories = details.ServiceAccountings.Count > 0
|
||||
? CreateServiceCategoryModels(details.ServiceAccountings.Select(sa => sa.ServiceDescription).ToList())
|
||||
: CreateServiceCategoryModels(OperationsService.GetAllServiceDescriptions());
|
||||
|
||||
Model.ServiceCategories = Model.ServiceCategories.Where(c => !c.OhneHilfeplan.HasValue || c.OhneHilfeplan.Value == AccountingvisibilityType.Beides || c.OhneHilfeplan.Value == AccountingvisibilityType.NurKlientenbezogen).ToList();
|
||||
}
|
||||
else if (Model.CostBearer2SupportConceptOid == -2)
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
LoadGoals();
|
||||
}
|
||||
|
||||
private void ResetMultiBookingMode()
|
||||
{
|
||||
Model.ServiceCategories.Clear();
|
||||
Model.Categories2Descriptions.Clear();
|
||||
Model.MultiBookingSelectedConceptCostBearerRelations.Clear();
|
||||
Model.MultiBookingSelectedEmployees.Clear();
|
||||
Model.MultiBookingSelectedGroupOfPeopleOids.Clear();
|
||||
@@ -3047,7 +2980,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
private void ResetGroupBookingMode()
|
||||
{
|
||||
Model.ServiceCategories.Clear();
|
||||
Model.Categories2Descriptions.Clear();
|
||||
Model.GroupBookingSelectedCostbearerRelOids.Clear();
|
||||
Model.GroupBookingSelectedEmployees.Clear();
|
||||
Model.GroupBookingSelectedSupportConcepts.Clear();
|
||||
@@ -3066,6 +2999,8 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
ResetBookingMode(BookingMode.SingleBookingMode);
|
||||
|
||||
LoadServiceCategoriesToModel(Model.SelectedCostBearerSupportConceptRelOid);
|
||||
|
||||
return View("Main", Model);
|
||||
}
|
||||
|
||||
@@ -3162,33 +3097,12 @@ namespace BeWoPlanerMobil.Controllers
|
||||
Model.MultiBookingSelectedEmployees = new List<CompactEmployeeDC> { MobileSessionFacade.LoggedInCompactEmployee };
|
||||
Model.MultiBookingSelectedGroupOfPeopleOids.Clear();
|
||||
Model.MultiBookingSelectedSupportConcepts.Clear();
|
||||
Model.SelectedGoals.Clear();
|
||||
|
||||
Model.SelectedServiceCategory = null;
|
||||
Model.SelectedServiceCategoryOid = null;
|
||||
Model.SelectedServiceDescription = null;
|
||||
Model.SelectedServiceDescriptionOid = null;
|
||||
|
||||
LoadServiceCategoriesToModel(Model.CostBearer2SupportConceptOid);
|
||||
|
||||
var serviceDescriptions = Model.GetServiceDesctiptions();
|
||||
|
||||
if(!Model.ServiceCategories.Any() || !serviceDescriptions.Any())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Hier erst nach Kategorie gehen und dann die Leistung mit der niedrigsten Position nehmen!
|
||||
|
||||
var firstCategory = serviceDescriptions.Select(sd => sd.Category).OrderBy(sc => sc.Position).ThenBy(sc => sc.ServiceCategoryOid).First();
|
||||
var firstServiceDescription = serviceDescriptions.Where(sd => sd.Category.ServiceCategoryOid.Value.Equals(firstCategory.ServiceCategoryOid.Value)).OrderBy(sd => sd.Position).ThenBy(sd => sd.ServiceDescriptionOid).First();
|
||||
|
||||
if(serviceDescriptions.Any(a => a.ServiceDescriptionOid.HasValue && Model.SelectedServiceDescriptionOid.HasValue && a.ServiceDescriptionOid.Value.Equals(Model.SelectedServiceDescriptionOid)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Model.SelectedServiceDescriptionOid = firstServiceDescription.ServiceDescriptionOid;
|
||||
Model.SelectedServiceCategoryOid = firstServiceDescription.Category.ServiceCategoryOid;
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
@@ -3788,85 +3702,95 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
LoadSupportConceptThings(-2);
|
||||
|
||||
var serviceCategory = Model.ServiceCategories.FirstOrDefault();
|
||||
var serviceDescription = serviceCategory?.ServiceDescriptions.FirstOrDefault();
|
||||
|
||||
if(!(serviceDescription is null))
|
||||
if(Model.SelectedServiceDescription != null)
|
||||
{
|
||||
Model.SelectedServiceCategoryOid = serviceDescription.Category.ServiceCategoryOid;
|
||||
Model.SelectedServiceCategory = Model.SelectedServiceDescription.Category;
|
||||
var serviceRecord = CreateServiceRecordFromScratch(start.Value, end.Value, null, Model.SelectedEmployee, notice);
|
||||
serviceRecord.ServiceDescription = serviceDescription;
|
||||
Model.SelectedServiceRecord = serviceRecord;
|
||||
}
|
||||
}
|
||||
// Einzelbuchung
|
||||
else if(supportConceptList.Count == 1 && employeeOids.Count == 1)
|
||||
{
|
||||
ResetBookingMode(BookingMode.SingleBookingMode);
|
||||
|
||||
Model.SelectedEmployee = Model.AllEmployees.FirstOrDefault(e => e.EmployeeOid.Equals(employeeOids.FirstOrDefault()));
|
||||
|
||||
var compactSupportConcept = supportConceptList.First();
|
||||
var supportConcept = Model.SupportConcepts.FirstOrDefault(f => f.SupportConceptOid.HasValue && f.SupportConceptOid.Value.Equals(compactSupportConcept.SupportConceptOid));
|
||||
|
||||
var serviceRecord = CreateServiceRecordFromScratch(start.Value, end.Value, supportConcept?.Customer, Model.SelectedEmployee, notice);
|
||||
|
||||
var costBearer2SupportConcept = supportConcept?.CostBearerRelations.FirstOrDefault();
|
||||
|
||||
LoadSupportConceptThings(costBearer2SupportConcept?.CostBearer2SupportConceptOid ?? -2);
|
||||
|
||||
var serviceCategory = Model.ServiceCategories.FirstOrDefault();
|
||||
var serviceDescription = serviceCategory?.ServiceDescriptions.FirstOrDefault();
|
||||
|
||||
serviceRecord.CostBearer = costBearer2SupportConcept?.CostBearer;
|
||||
serviceRecord.CostBearer2SupportConceptOid = costBearer2SupportConcept?.CostBearer2SupportConceptOid;
|
||||
serviceRecord.ServiceDescription = serviceDescription;
|
||||
|
||||
if(!(serviceDescription is null))
|
||||
{
|
||||
serviceRecord.ServiceDescription = Model.SelectedServiceDescription;
|
||||
Model.SelectedServiceRecord = serviceRecord;
|
||||
}
|
||||
}
|
||||
else // Gruppenbuchung
|
||||
// Einzelbuchung
|
||||
else
|
||||
{
|
||||
ResetBookingMode(BookingMode.GroupBookingMode);
|
||||
|
||||
Model.GroupBookingSelectedEmployees = Model.AllEmployees.Where(w => employeeOids.Contains(w.EmployeeOid)).ToList();
|
||||
|
||||
var roundedDuration = (int)((end - start)?.TotalMinutes ?? 0);
|
||||
|
||||
Model.SelectedServiceRecord = new ServiceRecordDC()
|
||||
var availableRelOids = new List<long>();
|
||||
Model.SupportConceptListObjects.DoForEach(sclo =>
|
||||
{
|
||||
Start = start,
|
||||
End = end,
|
||||
RoundedDuration = roundedDuration,
|
||||
Notice = notice,
|
||||
ServiceDescription = Model.ServiceCategories.FirstOrDefault()?.ServiceDescriptions.FirstOrDefault()
|
||||
};
|
||||
|
||||
var supportConceptsForGroupBooking = Model.SupportConcepts.Where(sc => sc.SupportConceptOid.HasValue && supportConceptList.Any(csc => csc.SupportConceptOid.Equals(sc.SupportConceptOid.Value))).ToList();
|
||||
|
||||
var costBearer2SupportConceptOids = new List<long>();
|
||||
var costBearer2SupportConcepts = new List<SupportConceptCostBearerRelDC>();
|
||||
|
||||
foreach(var supportConcept in supportConceptsForGroupBooking)
|
||||
{
|
||||
var costBearer2SupportConcept = supportConcept.CostBearerRelations.FirstOrDefault();
|
||||
|
||||
if(costBearer2SupportConcept?.CostBearer2SupportConceptOid is null)
|
||||
if(long.TryParse(sclo.CostBearer2SupportConceptOid, out var costBearer2SupportConceptRelOid))
|
||||
{
|
||||
continue;
|
||||
availableRelOids.AddIfNotIn(costBearer2SupportConceptRelOid);
|
||||
}
|
||||
});
|
||||
|
||||
if(supportConceptList.Count == 1 && employeeOids.Count == 1)
|
||||
{
|
||||
ResetBookingMode(BookingMode.SingleBookingMode);
|
||||
|
||||
Model.SelectedEmployee = Model.AllEmployees.FirstOrDefault(e => e.EmployeeOid.Equals(employeeOids.FirstOrDefault()));
|
||||
|
||||
var compactSupportConcept = supportConceptList.First();
|
||||
var supportConcept = Model.SupportConcepts.FirstOrDefault(f => f.SupportConceptOid.HasValue && f.SupportConceptOid.Value.Equals(compactSupportConcept.SupportConceptOid));
|
||||
|
||||
var serviceRecord = CreateServiceRecordFromScratch(start.Value, end.Value, supportConcept?.Customer, Model.SelectedEmployee, notice);
|
||||
|
||||
var costBearer2SupportConcept = supportConcept?.CostBearerRelations.FirstOrDefault(cbRel => cbRel.CostBearer2SupportConceptOid.HasValue && availableRelOids.Contains(cbRel.CostBearer2SupportConceptOid.Value));
|
||||
|
||||
LoadSupportConceptThings(costBearer2SupportConcept?.CostBearer2SupportConceptOid ?? -2);
|
||||
|
||||
serviceRecord.CostBearer = costBearer2SupportConcept?.CostBearer;
|
||||
serviceRecord.CostBearer2SupportConceptOid = costBearer2SupportConcept?.CostBearer2SupportConceptOid;
|
||||
serviceRecord.ServiceDescription = Model.SelectedServiceDescription;
|
||||
|
||||
if(Model.SelectedServiceDescription != null)
|
||||
{
|
||||
Model.SelectedServiceRecord = serviceRecord;
|
||||
}
|
||||
}
|
||||
else // Gruppenbuchung
|
||||
{
|
||||
ResetBookingMode(BookingMode.GroupBookingMode);
|
||||
|
||||
Model.GroupBookingSelectedEmployees = Model.AllEmployees.Where(w => employeeOids.Contains(w.EmployeeOid)).ToList();
|
||||
|
||||
var roundedDuration = (int) ((end - start)?.TotalMinutes ?? 0);
|
||||
|
||||
Model.SelectedServiceRecord = new ServiceRecordDC()
|
||||
{
|
||||
Start = start,
|
||||
End = end,
|
||||
RoundedDuration = roundedDuration,
|
||||
Notice = notice,
|
||||
ServiceDescription = Model.GetSelectedOrFirstServiceDescription()
|
||||
};
|
||||
|
||||
var supportConceptsForGroupBooking = Model.SupportConcepts.Where(sc => sc.SupportConceptOid.HasValue && supportConceptList.Any(csc => csc.SupportConceptOid.Equals(sc.SupportConceptOid.Value))).ToList();
|
||||
|
||||
var costBearer2SupportConceptOids = new List<long>();
|
||||
var costBearer2SupportConcepts = new List<SupportConceptCostBearerRelDC>();
|
||||
|
||||
foreach(var supportConcept in supportConceptsForGroupBooking)
|
||||
{
|
||||
var costBearer2SupportConcept = supportConcept?.CostBearerRelations.FirstOrDefault(cbRel => cbRel.CostBearer2SupportConceptOid.HasValue && availableRelOids.Contains(cbRel.CostBearer2SupportConceptOid.Value));
|
||||
|
||||
if(costBearer2SupportConcept?.CostBearer2SupportConceptOid is null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
costBearer2SupportConceptOids.AddIfNotIn(costBearer2SupportConcept.CostBearer2SupportConceptOid.Value);
|
||||
costBearer2SupportConcepts.AddIfNotIn(costBearer2SupportConcept);
|
||||
}
|
||||
|
||||
costBearer2SupportConceptOids.AddIfNotIn(costBearer2SupportConcept.CostBearer2SupportConceptOid.Value);
|
||||
costBearer2SupportConcepts.AddIfNotIn(costBearer2SupportConcept);
|
||||
}
|
||||
if(costBearer2SupportConceptOids.Any())
|
||||
{
|
||||
Model.GroupBookingSelectedCostbearerRelOids = costBearer2SupportConceptOids;
|
||||
Model.SelectedConceptCostBearerRelations = costBearer2SupportConcepts;
|
||||
Model.GroupBookingSelectedSupportConcepts = supportConceptsForGroupBooking;
|
||||
}
|
||||
|
||||
if(costBearer2SupportConceptOids.Any())
|
||||
{
|
||||
Model.GroupBookingSelectedCostbearerRelOids = costBearer2SupportConceptOids;
|
||||
Model.SelectedConceptCostBearerRelations = costBearer2SupportConcepts;
|
||||
Model.GroupBookingSelectedSupportConcepts = supportConceptsForGroupBooking;
|
||||
LoadServiceCategoriesToModel(null);
|
||||
|
||||
LoadGoals();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4560,7 +4484,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
var serviceRecord = Model.GetServiceRecord(serviceRecordOid);
|
||||
|
||||
var hilfeplan = Model.SelectedSupportConceptListObject.NameAndDateOfBirth + " | " + Model.SelectedSupportConceptListObject.SupportConceptTimeSpan;
|
||||
var hilfeplan = Model.SelectedCostBearer2SupportConceptRelListObject.NameAndDateOfBirth + " | " + Model.SelectedCostBearer2SupportConceptRelListObject.SupportConceptTimeSpan;
|
||||
var leistung = serviceRecord.ServiceDescription.Name;
|
||||
var kategorie = serviceRecord.ServiceDescription.Category;
|
||||
var employee = $"{serviceRecord.Employee.FirstName} {serviceRecord.Employee.LastName}";
|
||||
@@ -4616,15 +4540,15 @@ namespace BeWoPlanerMobil.Controllers
|
||||
if(Model is null)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return PartialView("Category2ServiceDescriptionPartial", Model);
|
||||
return PartialView("Category2ServiceDescriptionPartial");
|
||||
}
|
||||
|
||||
if(long.TryParse(categoryOidStr, out var categoryOid))
|
||||
{
|
||||
Model.SelectedServiceCategory = Model.Categories2Descriptions.FirstOrDefault(f => f.Key?.ServiceCategoryOid != null && f.Key.ServiceCategoryOid.Value.Equals(categoryOid)).Key;
|
||||
Model.SelectedServiceCategoryOid = Model.SelectedServiceCategory?.ServiceCategoryOid;
|
||||
//Model.SelectedServiceCategoryOid = Model.SelectedServiceCategory?.ServiceCategoryOid;
|
||||
Model.SelectedServiceDescription = null;
|
||||
Model.SelectedServiceDescriptionOid = null;
|
||||
//Model.SelectedServiceDescriptionOid = null;
|
||||
|
||||
if(Model.SelectedServiceCategory is null)
|
||||
{
|
||||
@@ -4634,7 +4558,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
var selectedServiceDescription = Model.Categories2Descriptions[Model.SelectedServiceCategory].OrderBy(sd => sd.Position).ThenBy(sd => sd.ServiceDescriptionOid).FirstOrDefault();
|
||||
|
||||
Model.SelectedServiceDescription = selectedServiceDescription;
|
||||
Model.SelectedServiceDescriptionOid = selectedServiceDescription?.ServiceDescriptionOid;
|
||||
//Model.SelectedServiceDescriptionOid = selectedServiceDescription?.ServiceDescriptionOid;
|
||||
}
|
||||
|
||||
return PartialView("Category2ServiceDescriptionPartial", Model);
|
||||
|
||||
10
BeWoPlanerMobil/Controllers/ReportBaseController.cs
Normal file
10
BeWoPlanerMobil/Controllers/ReportBaseController.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
public abstract class ReportBaseController : AbstractBaseController
|
||||
{
|
||||
[Authorize]
|
||||
public abstract string ResetReport();
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using BeWo.Report;
|
||||
using BeWo.Service.Plugins;
|
||||
using BeWo.View.Navigation.Filter;
|
||||
using BeWoPlanerMobil.Models;
|
||||
using BeWoPlanerMobil.Service;
|
||||
using BeWoPlanerMobil.Util;
|
||||
@@ -14,7 +15,7 @@ using BS.Shared.DataContracts.Compact;
|
||||
|
||||
namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
public class ReportViewerController : AbstractBaseController
|
||||
public class ReportViewerController : ReportBaseController
|
||||
{
|
||||
private ReportViewerModel _Model;
|
||||
|
||||
@@ -79,6 +80,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
Model.ReportTypes = new List<SelectListItem>();
|
||||
|
||||
#if DEBUG
|
||||
//if(AbstractModel.HasRightToViewReports)
|
||||
//{
|
||||
// Model.ReportTypes.Add(new SelectListItem
|
||||
@@ -87,6 +89,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
// Value = "0"
|
||||
// });
|
||||
//}
|
||||
#endif
|
||||
|
||||
if(AbstractModel.HasRightToViewMitarbeiterstundenkonto)
|
||||
{
|
||||
@@ -97,11 +100,38 @@ namespace BeWoPlanerMobil.Controllers
|
||||
});
|
||||
}
|
||||
|
||||
// ToDo: Bis auf weiteres nur Mitarbeiterstundenkonto anzeigen!
|
||||
Model.SelectedReportType = ReportType.Mitarbeiterstundenkonto;//ReportType.Berichte;
|
||||
Model.SelectedReportType = ReportType.Mitarbeiterstundenkonto;
|
||||
|
||||
#if DEBUG
|
||||
//Model.SelectedReportType = ReportType.Berichte;
|
||||
#endif
|
||||
|
||||
Model.Queries = QueryService.GetAllQueriesOfType(QueryType.Public);
|
||||
|
||||
if(Model.Employee?.EmployeeOid.HasValue ?? false)
|
||||
{
|
||||
Model.SupportConcepts = EmployeeService.GetActiveSupportConceptsForEmployee(Model.Employee.EmployeeOid, CustomerFilterEnum.All);
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.SupportConcepts = new List<SupportConceptDC>();
|
||||
}
|
||||
|
||||
if(Model.SelectedCostBearer2SupportConceptRelListObject is null)
|
||||
{
|
||||
Model.SelectedCostBearer2SupportConceptRelListObject = Model.CostBearer2SupportConceptRelListObjects.FirstOrDefault(f => f.CostBearer2SupportConceptOid == "-1") ?? Model.CostBearer2SupportConceptRelListObjects.First();
|
||||
}
|
||||
|
||||
if(Model.SelectedMonthForBericht is null)
|
||||
{
|
||||
Model.SelectedMonthForBericht = Model.Months.FirstOrDefault(m => m.Value.Equals(DateTime.Today.Month.ToString()));
|
||||
}
|
||||
|
||||
if(Model.SelectedYearForBericht is null || Model.SelectedYearForBericht.Value < DateTime.Today.AddYears(-10).Year)
|
||||
{
|
||||
Model.SelectedYearForBericht = DateTime.Today.Year;
|
||||
}
|
||||
|
||||
return View(Model);
|
||||
}
|
||||
|
||||
@@ -113,7 +143,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
}
|
||||
|
||||
return PartialView("DocumentWebViewerPartial", Model);
|
||||
return PartialView("BeWoReportPartial", Model);
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
@@ -121,42 +151,74 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
try
|
||||
{
|
||||
if (Model?.Employee?.EmployeeOid is null || reportOid is null)
|
||||
if(Model?.Employee?.EmployeeOid is null || reportOid is null)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return PartialView("DocumentWebViewerPartial");
|
||||
return PartialView("BeWoReportPartial");
|
||||
}
|
||||
|
||||
var selectedQuery = Model.Queries.FirstOrDefault(query => query.Oid.Equals(reportOid.Value));
|
||||
|
||||
var queryParameter = selectedQuery?.Parameter ?? new List<QueryParamDC>();
|
||||
|
||||
if (selectedQuery is null)
|
||||
if(selectedQuery is null)
|
||||
{
|
||||
Model.Report = null;
|
||||
return PartialView("DocumentWebViewerPartial", Model);
|
||||
return PartialView("BeWoReportPartial", Model);
|
||||
}
|
||||
|
||||
Model.SelectedQuery = selectedQuery;
|
||||
|
||||
var dcid = $"{MobileSessionFacade.Tenant}queryeoid{Model.Employee.EmployeeOid.Value}";
|
||||
|
||||
var test = QueryService.ExecuteQuery(selectedQuery.Oid, null);
|
||||
var queryResult = QueryService.ExecuteQuery(selectedQuery.Oid, null);
|
||||
|
||||
if (test is null)
|
||||
if(queryResult is null)
|
||||
{
|
||||
return PartialView("DocumentWebViewerPartial", Model);
|
||||
return PartialView("BeWoReportPartial", Model);
|
||||
}
|
||||
|
||||
QueryService.PrepareQueryReport(test, dcid);
|
||||
QueryService.PrepareQueryReport(queryResult, dcid);
|
||||
var queryReport = Model.ReportCreator.CreateQueryReport(selectedQuery.Oid, dcid);
|
||||
|
||||
Model.Report = queryReport;
|
||||
Model.ReportName = selectedQuery.Title;
|
||||
}
|
||||
catch (Exception e)
|
||||
catch(Exception e)
|
||||
{
|
||||
Log.Error(e);
|
||||
TempData[TempDataConstants.ErrorMessageKey] = e.Message;
|
||||
if(Model != null)
|
||||
{
|
||||
Model.ReportName = "Fehler";
|
||||
}
|
||||
TempData[TempDataConstants.ReportErrorMessageKey] = e.Message;
|
||||
}
|
||||
|
||||
return PartialView("DocumentWebViewerPartial", Model);
|
||||
return PartialView("BeWoReportPartial", Model);
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
public ActionResult LoadBerichteForm(long? reportOid)
|
||||
{
|
||||
try
|
||||
{
|
||||
if(Model?.Employee?.EmployeeOid is null || reportOid is null)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return PartialView("BerichteFormPartialView");
|
||||
}
|
||||
|
||||
var selectedQuery = Model.Queries.FirstOrDefault(query => query.Oid.Equals(reportOid.Value));
|
||||
|
||||
Model.SelectedQuery = selectedQuery;
|
||||
|
||||
return PartialView("BerichteFormPartialView", Model);
|
||||
}
|
||||
catch(Exception exception)
|
||||
{
|
||||
Log.Error(exception);
|
||||
TempData[TempDataConstants.ReportErrorMessageKey] = exception.Message;
|
||||
}
|
||||
|
||||
return PartialView("BerichteFormPartialView", Model);
|
||||
}
|
||||
|
||||
//[Authorize]
|
||||
@@ -214,7 +276,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
if(Model?.Employee?.EmployeeOid is null)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return PartialView("DocumentWebViewerPartial");
|
||||
return PartialView("BeWoReportPartial");
|
||||
}
|
||||
|
||||
if(!string.IsNullOrWhiteSpace(parameters))
|
||||
@@ -290,7 +352,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
return PartialView("DocumentWebViewerPartial", Model);
|
||||
return PartialView("BeWoReportPartial", Model);
|
||||
}
|
||||
|
||||
private static AbstractReportCreator GetReportCreator()
|
||||
@@ -305,5 +367,88 @@ namespace BeWoPlanerMobil.Controllers
|
||||
#endif
|
||||
return creator;
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
public override string ResetReport()
|
||||
{
|
||||
if(Model is null)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
Model.Report = null;
|
||||
Model.ReportName = null;
|
||||
|
||||
return LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
// ToDo: Parameter hinzufügen
|
||||
[Authorize]
|
||||
public ActionResult CreateBerichtWithParameters()
|
||||
{
|
||||
if(Model?.SelectedQuery is null)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return PartialView("BeWoReportPartial");
|
||||
}
|
||||
|
||||
|
||||
|
||||
return PartialView("BeWoReportPartial", Model);
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
public ActionResult SelectCostBearer2SupportConceptRel(long? relOid)
|
||||
{
|
||||
if(Model?.SelectedQuery is null)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return PartialView("BerichteFormPartialView", Model);
|
||||
}
|
||||
|
||||
if(relOid != null)
|
||||
{
|
||||
Model.SelectedCostBearer2SupportConceptRelListObject = Model.CostBearer2SupportConceptRelListObjects.FirstOrDefault(f => f.CostBearer2SupportConceptOid != null && f.CostBearer2SupportConceptOid.Equals(relOid.Value.ToString()));
|
||||
}
|
||||
|
||||
return PartialView("BerichteFormPartialView", Model);
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
public ActionResult SelectMonth(string selectedMonth)
|
||||
{
|
||||
if(Model?.SelectedQuery is null)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return PartialView("BerichteFormPartialView");
|
||||
}
|
||||
|
||||
var month = Model.Months.FirstOrDefault(f => f.Value.Equals(selectedMonth));
|
||||
|
||||
if(month != null)
|
||||
{
|
||||
Model.SelectedMonthForBericht = month;
|
||||
}
|
||||
|
||||
return PartialView("BerichteFormPartialView", Model);
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
public ActionResult SelectYear(string selectedYear)
|
||||
{
|
||||
if(Model?.SelectedQuery is null)
|
||||
{
|
||||
TempData[TempDataConstants.DoLogoutKey] = true;
|
||||
return PartialView("BerichteFormPartialView");
|
||||
}
|
||||
|
||||
if(int.TryParse(selectedYear, out var year))
|
||||
{
|
||||
Model.SelectedYearForBericht = year;
|
||||
}
|
||||
|
||||
return PartialView("BerichteFormPartialView", Model);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ using BeWoPlanerMobil.Util;
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using DevExpress.XtraReports.UI;
|
||||
|
||||
namespace BeWoPlanerMobil.Models
|
||||
{
|
||||
@@ -50,7 +51,7 @@ namespace BeWoPlanerMobil.Models
|
||||
#if DEBUG
|
||||
showEmployeeSignatureSetting = "1";
|
||||
#endif
|
||||
return CheckRights(new List<UserRightType>{ UserRightType.Analysis_ServiceOverview_View, UserRightType.Signature_ProvideMonthlySignature }) && showEmployeeSignatureSetting != null && showEmployeeSignatureSetting.Equals("1");
|
||||
return CheckRights(new List<UserRightType> { UserRightType.Analysis_ServiceOverview_View, UserRightType.Signature_ProvideMonthlySignature }) && showEmployeeSignatureSetting != null && showEmployeeSignatureSetting.Equals("1");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,5 +213,34 @@ namespace BeWoPlanerMobil.Models
|
||||
public static bool HasRightToViewBetreuung => CheckRight(UserRightType.Customer_ViewBetreuung);
|
||||
|
||||
public static string UserMessage { get; set; }
|
||||
|
||||
public XtraReport Report { get; set; }
|
||||
public string ReportName { get; set; }
|
||||
|
||||
protected static string GetIsNotApproved(SupportConceptCostBearerRelDC rel)
|
||||
{
|
||||
var result = string.Empty;
|
||||
|
||||
var customer = rel.SupportConcept.Customer;
|
||||
|
||||
if(customer.TerminationDate.HasValue)
|
||||
{
|
||||
var terminationReason = string.Empty;
|
||||
|
||||
if(!string.IsNullOrEmpty(customer.TerminationReason))
|
||||
{
|
||||
terminationReason += $", Begründung: {customer.TerminationReason}";
|
||||
}
|
||||
|
||||
result += $" (Betreuung beendet am: {customer.TerminationDate:dd.MM.yyyy}{terminationReason})";
|
||||
}
|
||||
|
||||
if(rel.ApprovedStartDate is null || rel.ApprovedEndDate is null)
|
||||
{
|
||||
result += " nicht bewilligt!";
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -106,32 +106,6 @@ namespace BeWoPlanerMobil.Models
|
||||
}
|
||||
}
|
||||
|
||||
// ToDo: KGW
|
||||
//public List<SelectListItem> OldMedLists
|
||||
//{
|
||||
// get
|
||||
// {
|
||||
// var result = new List<SelectListItem>();
|
||||
|
||||
// var ungueltigeListen = SelectedCustomer.Medikamentenverordnungslisten.Where(w => !w.Gueltig).OrderByDescending(x => x.ErstellDatum).ToList();
|
||||
|
||||
// foreach(var list in ungueltigeListen)
|
||||
// {
|
||||
// result.Add(new SelectListItem
|
||||
// {
|
||||
// Value = list.MedikamentenverordnungslistenOid.Value.ToString(),
|
||||
// Text = $"{(list.MedListType ? "Medikamentenverordnungsliste" : "Bedarfsmedikamentenverordnungsliste")} vom {list.ErstellDatum}"
|
||||
// });
|
||||
// }
|
||||
|
||||
// return result;
|
||||
// }
|
||||
//}
|
||||
|
||||
public XtraReport Report { get; set; }
|
||||
|
||||
public string ReportName { get; set; }
|
||||
|
||||
public List<BargeldkassenDC> Bargeldkassen { get; set; } = new List<BargeldkassenDC>();
|
||||
|
||||
[Display(Name = "Kategorie")]
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
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;
|
||||
@@ -17,6 +16,8 @@ namespace BeWoPlanerMobil.Models
|
||||
{
|
||||
public class MainModel : AbstractModel
|
||||
{
|
||||
public long? SelectedCostBearerSupportConceptRelOid { get; set; }
|
||||
|
||||
[Display(Name = "Nur meine Klienten anzeigen")]
|
||||
public bool ShowOnlyOwnSupportConcepts { get; set; }
|
||||
|
||||
@@ -96,10 +97,9 @@ namespace BeWoPlanerMobil.Models
|
||||
[Display(Name = "Hilfeplan")]
|
||||
public long? CostBearer2SupportConceptOid { get; set; }
|
||||
|
||||
[Display(Name = "Kategorie")]
|
||||
public long? SelectedServiceCategoryOid { get; set; }
|
||||
|
||||
public long? SelectedServiceDescriptionOid { get; set; }
|
||||
public long? SelectedServiceCategoryOid => SelectedServiceCategory?.ServiceCategoryOid;
|
||||
|
||||
public long? SelectedServiceDescriptionOid => SelectedServiceDescription?.ServiceDescriptionOid;
|
||||
|
||||
public long? SelectedServiceRecordOid { get; set; }
|
||||
|
||||
@@ -188,6 +188,7 @@ namespace BeWoPlanerMobil.Models
|
||||
public long ServiceRecordOid { get; set; }
|
||||
|
||||
public List<SupportConceptDC> SupportConcepts { get; set; }
|
||||
// ToDo: Veraltet!
|
||||
public List<ServiceCategoryModel> ServiceCategories { get; set; }
|
||||
|
||||
public List<TextModuleDC> Textbausteine { get; set; } = new List<TextModuleDC>();
|
||||
@@ -239,15 +240,15 @@ namespace BeWoPlanerMobil.Models
|
||||
ErrorWert = 1;
|
||||
}
|
||||
|
||||
public IEnumerable<SupportConceptListObject> SupportConceptListObjects
|
||||
public IEnumerable<CostBearer2SupportConceptRelListObject> SupportConceptListObjects
|
||||
{
|
||||
get
|
||||
{
|
||||
var allCostBearerRelations = new List<SupportConceptListObject> {new SupportConceptListObject("Hilfeplan auswählen", "", "-1", false, false), new SupportConceptListObject("Ohne Hilfeplan", "", "-2", false, false) };
|
||||
var allCostBearerRelations = new List<CostBearer2SupportConceptRelListObject> {new CostBearer2SupportConceptRelListObject("Hilfeplan auswählen", "", "-1", false, false), new CostBearer2SupportConceptRelListObject("Ohne Hilfeplan", "", "-2", false, false) };
|
||||
foreach(var sc in SupportConcepts.OrderBy(sc => sc.Customer.LastName))
|
||||
{
|
||||
allCostBearerRelations.AddRange(sc.CostBearerRelations.Where(w => ShowExpiredSupportConcepts || w.EndDate is null || w.EndDate.Value >= DateTime.Now.Date).Select(
|
||||
cb => new SupportConceptListObject(
|
||||
cb => new CostBearer2SupportConceptRelListObject(
|
||||
$"{sc.Customer.SimpleDescription} {(sc.Customer.DateOfBirth.HasValue ? "*" + sc.Customer.DateOfBirth.Value.ToString("dd.MM.yyyy") : string.Empty)}",
|
||||
$"{cb.AuswahlBezeichnung} {cb.StartDate?.ToShortDateString().Remove(6, 2) ?? string.Empty}-{cb.EndDate?.ToShortDateString().Remove(6, 2) ?? string.Empty} {cb.CostBearer.Name}{GetIsNotApproved(cb)}",
|
||||
cb.CostBearer2SupportConceptOid.ToString(),
|
||||
@@ -259,48 +260,24 @@ namespace BeWoPlanerMobil.Models
|
||||
}
|
||||
}
|
||||
|
||||
private static string GetIsNotApproved(SupportConceptCostBearerRelDC rel)
|
||||
{
|
||||
var result = string.Empty;
|
||||
|
||||
|
||||
var customer = rel.SupportConcept.Customer;
|
||||
|
||||
if(customer.TerminationDate.HasValue)
|
||||
{
|
||||
var terminationReason = string.Empty;
|
||||
|
||||
if(!string.IsNullOrEmpty(customer.TerminationReason))
|
||||
{
|
||||
terminationReason += $", Begründung: {customer.TerminationReason}";
|
||||
}
|
||||
|
||||
result += $" (Betreuung beendet am: {customer.TerminationDate:dd.MM.yyyy}{terminationReason})";
|
||||
}
|
||||
|
||||
if(rel.ApprovedStartDate is null || rel.ApprovedEndDate is null)
|
||||
{
|
||||
result += " nicht bewilligt!";
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public SupportConceptListObject SelectedSupportConceptListObject { get; set; }
|
||||
public CostBearer2SupportConceptRelListObject SelectedCostBearer2SupportConceptRelListObject { get; set; }
|
||||
|
||||
public List<SupportConceptCostBearerRelDC> SelectedConceptCostBearerRelations { get; set; }
|
||||
|
||||
public GroupBookingSelectionObject GroupBookingSelectionObject => new GroupBookingSelectionObject(SelectedConceptCostBearerRelations, GroupBookingSelectedGroupOfPeopleOids);
|
||||
|
||||
public IEnumerable<SupportConceptListObject> SupportConceptListObjectsForGroupBooking
|
||||
public IEnumerable<CostBearer2SupportConceptRelListObject> SupportConceptListObjectsForGroupBooking
|
||||
{
|
||||
get
|
||||
{
|
||||
var allCostbearerRelations = new List<SupportConceptListObject>();
|
||||
var allCostbearerRelations = new List<CostBearer2SupportConceptRelListObject>();
|
||||
|
||||
foreach(var sc in SupportConcepts.OrderBy(sc => sc.Customer.LastName))
|
||||
{
|
||||
allCostbearerRelations.AddRange(sc.CostBearerRelations.Where(w => ShowExpiredSupportConcepts || w.EndDate is null || w.EndDate.Value >= DateTime.Now).Select(
|
||||
cb => new SupportConceptListObject(
|
||||
cb => new CostBearer2SupportConceptRelListObject(
|
||||
$"{sc.Customer.SimpleDescription} {(sc.Customer.DateOfBirth.HasValue ? "*" + sc.Customer.DateOfBirth.Value.ToString("dd.MM.yyyy") : string.Empty)}",
|
||||
$"{cb.AuswahlBezeichnung} {cb.StartDate?.ToShortDateString().Remove(6, 2) ?? string.Empty}-{cb.EndDate?.ToShortDateString().Remove(6, 2) ?? string.Empty} {cb.CostBearer.Name}",
|
||||
cb.CostBearer2SupportConceptOid.ToString(),
|
||||
@@ -719,16 +696,16 @@ namespace BeWoPlanerMobil.Models
|
||||
public List<long> MultiBookingSelectedCostbearerRelOids { get; set; } = new List<long>();
|
||||
public List<CompactEmployeeDC> MultiBookingSelectedEmployees { get; set; } = new List<CompactEmployeeDC>();
|
||||
|
||||
public List<SupportConceptListObject> MultiBookingSupportConceptListObjects
|
||||
public List<CostBearer2SupportConceptRelListObject> MultiBookingSupportConceptListObjects
|
||||
{
|
||||
get
|
||||
{
|
||||
var allCostbearerRelations = new List<SupportConceptListObject>();
|
||||
var allCostbearerRelations = new List<CostBearer2SupportConceptRelListObject>();
|
||||
|
||||
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(
|
||||
cb => new CostBearer2SupportConceptRelListObject(
|
||||
$"{sc.Customer.SimpleDescription} {(sc.Customer.DateOfBirth.HasValue ? "*" + sc.Customer.DateOfBirth.Value.ToString("dd.MM.yyyy") : string.Empty)}",
|
||||
$"{cb.AuswahlBezeichnung} {cb.StartDate?.ToShortDateString().Remove(6, 2) ?? string.Empty}-{cb.EndDate?.ToShortDateString().Remove(6, 2) ?? string.Empty} {cb.CostBearer.Name}",
|
||||
cb.CostBearer2SupportConceptOid.ToString(),
|
||||
@@ -772,12 +749,10 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
public bool FilterGroupServiceCategories { get; set; }
|
||||
|
||||
public Dictionary<ServiceCategoryDC, List<ServiceDescriptionDC>> Categories2Descriptions { get; set; }
|
||||
public Dictionary<ServiceCategoryDC, List<ServiceDescriptionDC>> Categories2Descriptions { get; set; } = new Dictionary<ServiceCategoryDC, List<ServiceDescriptionDC>>();
|
||||
|
||||
public ServiceCategoryDC SelectedServiceCategory { get; set; }
|
||||
|
||||
private ServiceDescriptionDC _SelectedServiceDescription;
|
||||
|
||||
public ServiceDescriptionDC SelectedServiceDescription { get; set; }
|
||||
|
||||
public ServiceDescriptionDC GetSelectedOrFirstServiceDescription()
|
||||
@@ -818,7 +793,7 @@ namespace BeWoPlanerMobil.Models
|
||||
}
|
||||
}
|
||||
|
||||
public class SupportConceptListObject
|
||||
public class CostBearer2SupportConceptRelListObject
|
||||
{
|
||||
public string NameAndDateOfBirth { get; }
|
||||
|
||||
@@ -832,7 +807,7 @@ namespace BeWoPlanerMobil.Models
|
||||
public bool ExpiresInThreeMonthsOrLess { get; }
|
||||
|
||||
|
||||
public SupportConceptListObject(string pNameAndDateOfBirth, string pSupportConceptTimeSpan, string pCostBearer2SupportConceptOid, bool isAboutToExpire, bool expiresIn3MonthOrLess)
|
||||
public CostBearer2SupportConceptRelListObject(string pNameAndDateOfBirth, string pSupportConceptTimeSpan, string pCostBearer2SupportConceptOid, bool isAboutToExpire, bool expiresIn3MonthOrLess)
|
||||
{
|
||||
NameAndDateOfBirth = pNameAndDateOfBirth;
|
||||
SupportConceptTimeSpan = pSupportConceptTimeSpan;
|
||||
@@ -846,12 +821,12 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (!(obj is SupportConceptListObject))
|
||||
if (!(obj is CostBearer2SupportConceptRelListObject))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var obj2 = (SupportConceptListObject) obj;
|
||||
var obj2 = (CostBearer2SupportConceptRelListObject) obj;
|
||||
|
||||
return Equals(CostBearer2SupportConceptOid, obj2.CostBearer2SupportConceptOid);
|
||||
}
|
||||
|
||||
@@ -6,8 +6,6 @@ using System.Web.Mvc;
|
||||
using BeWo.Report;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using DevExpress.XtraPrinting.Native;
|
||||
using DevExpress.XtraReports.UI;
|
||||
|
||||
namespace BeWoPlanerMobil.Models
|
||||
{
|
||||
@@ -80,11 +78,13 @@ namespace BeWoPlanerMobil.Models
|
||||
return result;
|
||||
}
|
||||
|
||||
result.Add(new SelectListItem { Text = "", Value = "0" });
|
||||
result.Add(new SelectListItem { Text = "", Value = "0_0" });
|
||||
|
||||
foreach(var query in Queries)
|
||||
{
|
||||
result.Add(new SelectListItem { Text = query.Title, Value = query.Oid.ToString() });
|
||||
var hasParameters = query.Parameter != null && query.Parameter.Count > 0;
|
||||
|
||||
result.Add(new SelectListItem { Text = query.Title, Value = $"{query.Oid}_{(hasParameters ? "1" : "0")}" });
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -150,48 +150,35 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
public List<CompactEmployeeDC> SelectedEmployees { get; set; }
|
||||
public List<CompactTeamDC> SelectedTeams { get; set; }
|
||||
public QueryDC SelectedQuery { get; set; }
|
||||
|
||||
|
||||
public List<SupportConceptDC> SupportConcepts { get; set; }
|
||||
|
||||
public XtraReport Report { get; set; }
|
||||
public CostBearer2SupportConceptRelListObject SelectedCostBearer2SupportConceptRelListObject { get; set; }
|
||||
|
||||
public double ReportRatio
|
||||
public IEnumerable<CostBearer2SupportConceptRelListObject> CostBearer2SupportConceptRelListObjects
|
||||
{
|
||||
get
|
||||
{
|
||||
if(Report is null)
|
||||
var allCostBearerRelations = new List<CostBearer2SupportConceptRelListObject> { new CostBearer2SupportConceptRelListObject("Hilfeplan auswählen", "", "-1", false, false), new CostBearer2SupportConceptRelListObject("Ohne Hilfeplan", "", "-2", false, false) };
|
||||
foreach(var sc in SupportConcepts.OrderBy(sc => sc.Customer.LastName))
|
||||
{
|
||||
return 0d;
|
||||
allCostBearerRelations.AddRange(sc.CostBearerRelations.Select(
|
||||
cb => new CostBearer2SupportConceptRelListObject(
|
||||
$"{sc.Customer.SimpleDescription} {(sc.Customer.DateOfBirth.HasValue ? "*" + sc.Customer.DateOfBirth.Value.ToString("dd.MM.yyyy") : string.Empty)}",
|
||||
$"{cb.AuswahlBezeichnung} {cb.StartDate?.ToShortDateString().Remove(6, 2) ?? string.Empty}-{cb.EndDate?.ToShortDateString().Remove(6, 2) ?? string.Empty} {cb.CostBearer.Name}{GetIsNotApproved(cb)}",
|
||||
cb.CostBearer2SupportConceptOid.ToString(),
|
||||
cb.SupportConcept.IsAboutToExpire,
|
||||
cb.SupportConcept.ExpiresIn3MonthOrLess))
|
||||
);
|
||||
}
|
||||
|
||||
var width = 1f;
|
||||
var height = 1f;
|
||||
var ratio = 1d;
|
||||
|
||||
if(Report.Pages.Count == 0)
|
||||
{
|
||||
return Math.Round(21d / 27d, 2);
|
||||
}
|
||||
|
||||
foreach(PSPage page in Report.Pages)
|
||||
{
|
||||
var size = page.Size;
|
||||
if(size.Width > width)
|
||||
{
|
||||
width = size.Width;
|
||||
}
|
||||
|
||||
if(size.Height > height)
|
||||
{
|
||||
height = size.Height;
|
||||
}
|
||||
}
|
||||
|
||||
ratio = width < height ? width / height : height / width;
|
||||
|
||||
return Math.Round(ratio, 2);
|
||||
return allCostBearerRelations;
|
||||
}
|
||||
}
|
||||
|
||||
public SelectListItem SelectedMonthForBericht { get; set; }
|
||||
public int? SelectedYearForBericht { get; set; }
|
||||
}
|
||||
|
||||
public enum ReportType
|
||||
|
||||
@@ -24,12 +24,6 @@ function checkJson(str) {
|
||||
return true;
|
||||
}
|
||||
|
||||
function serviceDescriptionSelectOnReset(categorySelectId, leistungSelectId, textmoduleContainerId, treeId) {
|
||||
setTimeout(function () {
|
||||
loadServiceDescriptions(categorySelectId, leistungSelectId, textmoduleContainerId, treeId);
|
||||
}, 100);
|
||||
}
|
||||
|
||||
function showAlertMessage(message) {
|
||||
$("#form-alert").html(message);
|
||||
$("#form-alert").show();
|
||||
@@ -316,29 +310,9 @@ function checkChildNodes(parentOid) {
|
||||
});
|
||||
}
|
||||
|
||||
function getCheckedGoals() {
|
||||
var rootElement = $("#goals-tree");
|
||||
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);
|
||||
}
|
||||
|
||||
function updateSelectedGoals() {
|
||||
var selectedGoals = getCheckedGoals();
|
||||
|
||||
$.get(getUpdateGoalsUrl(), { pGoalOids: selectedGoals });
|
||||
}
|
||||
|
||||
function validateDistanceInput() {
|
||||
checkNumberInput("distance");
|
||||
|
||||
@@ -76,5 +76,6 @@
|
||||
public static string HasWarningMessageKey => "HasWarningMessage";
|
||||
public static string ErrorMessageKey => "ErrorMessage";
|
||||
public static string DoLogoutKey => "DoLogout";
|
||||
public static string ReportErrorMessageKey => "ReportErrorMessage";
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using BeWo.Data.Entities;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.Extensions;
|
||||
@@ -58,12 +55,6 @@ namespace BeWoPlanerMobil.Util
|
||||
|
||||
public Dictionary<string, string> ICD10Diagnosen { get; }
|
||||
|
||||
/*
|
||||
var gueltigVon = Model.SelectedCustomer.AusweisGueltigVon?.ToString("dd.MM.yyyy");
|
||||
var gueltigBis = Model.SelectedCustomer.AusweisGueltigBis?.ToString("dd.MM.yyyy");
|
||||
var beiblattGueltigBis = Model.SelectedCustomer.BeiblattGueltigBis?.ToString("dd.MM.yyyy");
|
||||
*/
|
||||
|
||||
public bool HasDiagnosen => ICD10Diagnosen?.Any() ?? false;
|
||||
public bool HasDisabilities { get; }
|
||||
|
||||
@@ -78,9 +69,17 @@ namespace BeWoPlanerMobil.Util
|
||||
public string SchwebiPflegegrad { get; }
|
||||
public string SchwebiAktenzeichen { get; }
|
||||
public bool HasSchwebi { get; }
|
||||
public string Krankenkasse { get; }
|
||||
public string Versichertennummer { get; }
|
||||
public string Versichertenstatus { get; }
|
||||
|
||||
|
||||
public JsonCustomer(CustomerDC customer, List<BeWoFolderDC> folderTree, Dictionary<string, string> icd10Diagnosen)
|
||||
{
|
||||
Krankenkasse = customer.HealthInsurance;
|
||||
Versichertennummer = customer.InsuranceNumber;
|
||||
Versichertenstatus = customer.VersichertenStatus;
|
||||
|
||||
HasDisabilities = customer.Disabilities.Any();
|
||||
SchwebiIsUnlimited = customer.AusweisUnbefristetGueltig == true ? "JA" : "NEIN";
|
||||
SchwebiGradDerBehinderung = customer.GradDerBehinderung;
|
||||
@@ -190,9 +189,6 @@ namespace BeWoPlanerMobil.Util
|
||||
{
|
||||
Organisations.Add(new JsonOrganisation(organisation));
|
||||
}
|
||||
|
||||
// TODO: Dokumente anzeigen und herunterladbar machen
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using BeWoPlanerMobil.Models;
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
@@ -25,6 +26,23 @@ namespace BeWoPlanerMobil.Util
|
||||
public static string TempDataServiceRecordValidationKey => "ServiceRecordValidationResults";
|
||||
public static string TempDataFormIdKey => "form-id";
|
||||
|
||||
public static List<int> Years
|
||||
{
|
||||
get
|
||||
{
|
||||
var heuer = DateTime.Today.Year;
|
||||
|
||||
var result = new List<int>();
|
||||
|
||||
for(var i = heuer + 1; i >= heuer - 10; i--)
|
||||
{
|
||||
result.AddIfNotIn(i);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public static DateTime ConvertTimeStringToDateTime(string timeString)
|
||||
{
|
||||
var dt = DateTime.Now.Date;
|
||||
@@ -367,12 +385,13 @@ namespace BeWoPlanerMobil.Util
|
||||
{
|
||||
var result = new BeWoLoginState(-1, null);
|
||||
|
||||
const string baseUrl = "https://support.bewoplaner.de/api";
|
||||
const string resource = "getstate.php";
|
||||
#if DEBUG
|
||||
return result;
|
||||
#endif
|
||||
|
||||
var client = new RestClient(baseUrl);
|
||||
var client = new RestClient("https://support.bewoplaner.de/api");
|
||||
|
||||
var request = new RestRequest(resource, Method.GET);
|
||||
var request = new RestRequest("getstate.php", Method.GET);
|
||||
|
||||
request.AddParameter("k", tenant, ParameterType.QueryString);
|
||||
request.AddParameter("type", 1, ParameterType.QueryString);
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace BeWoPlanerMobil.Util
|
||||
public string Titel { get; set; }
|
||||
public string FormattedName => $"{Titel}{(!string.IsNullOrWhiteSpace(Titel) ? " " : "")}{Vorname} {Nachname}";
|
||||
|
||||
public string Notice { get; set; }
|
||||
public long? Customer2PersonOid { get; }
|
||||
|
||||
public Umfeldsperson(CustomerPersonRelationDC umfeldspersonDC)
|
||||
@@ -32,6 +33,7 @@ namespace BeWoPlanerMobil.Util
|
||||
EMail = person.Communication3 ?? string.Empty;
|
||||
Fax = person.Communication4 ?? string.Empty;
|
||||
Titel = person.Title ?? string.Empty;
|
||||
Notice = umfeldspersonDC.Customer2PersonNotice;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -222,6 +222,42 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group w-100">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text customer-prepend-text-eigenschaften">
|
||||
Krankenkasse
|
||||
</div>
|
||||
</div>
|
||||
<input @inputDisabled maxlength="45" type="text" class="form-control" id="krankenkasse" name="krankenkasse" value="@Model.SelectedJsonCustomer.Krankenkasse" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group w-100">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text customer-prepend-text-eigenschaften">
|
||||
Versichertennummer
|
||||
</div>
|
||||
</div>
|
||||
<input @inputDisabled maxlength="45" type="text" class="form-control" id="versichertennummer" name="versichertennummer" value="@Model.SelectedJsonCustomer.Versichertennummer" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group w-100">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text customer-prepend-text-eigenschaften">
|
||||
Versichertenstatus
|
||||
</div>
|
||||
</div>
|
||||
<input @inputDisabled maxlength="16" type="text" class="form-control" id="versichertenstatus" name="versichertenstatus" value="@Model.SelectedJsonCustomer.Versichertenstatus" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -411,8 +447,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-6 col-lg-12 my-3">
|
||||
|
||||
<div class="col-sm-12 col-md-6 col-lg-12 my-3">
|
||||
<div class="card w-100 h-100">
|
||||
<div class="card-header">
|
||||
<div class="clearfix">
|
||||
@@ -572,6 +608,14 @@
|
||||
@umfeldPerson.Fax
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col text-secondary text-left">
|
||||
Notiz:
|
||||
</div>
|
||||
<div class="col-auto text-right">
|
||||
@umfeldPerson.Notice
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1005,7 +1049,7 @@
|
||||
|
||||
@* ----- Reports; Medikamentenlisten, Bargeldkassenreport, Zahlungsbelege ----- *@
|
||||
<div id="customer-report-popup-container">
|
||||
@Html.Partial("CustomerReportPartial", Model)
|
||||
@Html.Partial("BeWoReportPartial", Model)
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -97,8 +97,7 @@
|
||||
function () {
|
||||
hideSpinner();
|
||||
|
||||
//$("#customer-report-container").height($(window).height() * .8);
|
||||
$("#customer-report-popup").modal("show");
|
||||
$("#bewo-report-popup").modal("show");
|
||||
}
|
||||
);
|
||||
} catch(error) {
|
||||
@@ -311,8 +310,7 @@
|
||||
function () {
|
||||
hideSpinner();
|
||||
|
||||
//$("#customer-report-container").height($(window).height() * .8);
|
||||
$("#customer-report-popup").modal("show");
|
||||
$("#bewo-report-popup").modal("show");
|
||||
}
|
||||
);
|
||||
} catch(error) {
|
||||
|
||||
@@ -32,8 +32,7 @@
|
||||
medListOid: oid
|
||||
},
|
||||
function () {
|
||||
//$("#customer-report-container").height($(window).height() * .8);
|
||||
$("#customer-report-popup").modal("show");
|
||||
$("#bewo-report-popup").modal("show");
|
||||
hideSpinner();
|
||||
}
|
||||
);
|
||||
@@ -72,7 +71,7 @@
|
||||
reportType: selectedReportType
|
||||
},
|
||||
function () {
|
||||
$("#customer-report-popup").modal("show");
|
||||
$("#bewo-report-popup").modal("show");
|
||||
hideSpinner();
|
||||
});
|
||||
} catch(error) {
|
||||
|
||||
@@ -45,7 +45,14 @@
|
||||
<ul class="list-group">
|
||||
@foreach(var ratingType in Model.GoalRatingTypes)
|
||||
{
|
||||
<li class="list-group-item" id="grt-@ratingType.RatingTypeOid" onclick="rateGoal(@ratingType.RatingTypeOid)">@ratingType.DisplayName</li>
|
||||
<li class="list-group-item" style="cursor: pointer;">
|
||||
<div class="form-check" style="cursor: pointer;">
|
||||
<input style="cursor: pointer;" class="form-check-input" type="radio" name="goal-rating-radios" id="grt-radio-@ratingType.RatingTypeOid" onclick="rateGoal(@ratingType.RatingTypeOid)"/>
|
||||
<label style="cursor: pointer;" class="form-check-label" for="grt-radio-@ratingType.RatingTypeOid">
|
||||
@ratingType.DisplayName
|
||||
</label>
|
||||
</div>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
}
|
||||
|
||||
@@ -25,52 +25,26 @@
|
||||
try {
|
||||
var text = $("#goal-search-input").val().toLowerCase();
|
||||
|
||||
if (text.length === 0 || !text.replace(/\s\g/, '').length) {
|
||||
if(text.length === 0 || !text.replace(/\s\g/, '').length) {
|
||||
resetGoalTreeSearch();
|
||||
return;
|
||||
}
|
||||
|
||||
$(".goal-card").hide();
|
||||
$(".goal-card, .goal-text").hide();
|
||||
|
||||
var goalLabels = $(".goal-name-label");
|
||||
|
||||
$.each(goalLabels, function(index, item) {
|
||||
var goalText = $.trim($(item).text());
|
||||
$.each(goalLabels, function (index, item) {
|
||||
var label = $(item);
|
||||
|
||||
var isLeaf = $(item).parent().prop("class").includes("goal-text");
|
||||
|
||||
if(goalText.toLowerCase().includes(text)) {
|
||||
$.each($($(item).parents(".goal-card")), function(cardIndex, card) {
|
||||
$(card).show();
|
||||
$(card).find(".collapse").collapse("show");
|
||||
});
|
||||
} else if(isLeaf) {
|
||||
var parent1 = $($(item).parent());
|
||||
|
||||
if(parent1 !== undefined && parent1 !== null) {
|
||||
var parent2 = $(parent1.parent());
|
||||
|
||||
if(parent2 !== undefined && parent2 !== null) {
|
||||
var parent3 = $(parent2.parent());
|
||||
|
||||
if (parent3 !== undefined && parent3 !== null && parent3.siblings().length > 0) {
|
||||
var cardHeader = $(parent3.siblings()[0]);
|
||||
|
||||
if (cardHeader !== undefined && cardHeader !== null && cardHeader.children().length > 0) {
|
||||
var clearFix = $(cardHeader.children()[0]);
|
||||
|
||||
if (clearFix !== undefined && clearFix !== null && clearFix.children().length > 0) {
|
||||
var goalCardHeader = $(clearFix.children()[0]);
|
||||
|
||||
if(goalCardHeader !== undefined && goalCardHeader === null){
|
||||
$(item).parent().hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var goalText = $.trim(label.text());
|
||||
|
||||
if (false === goalText.toLowerCase().includes(text)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var parents = label.parents(".goal-card, .goal-text");
|
||||
parents.show();
|
||||
});
|
||||
} catch(error) {
|
||||
showErrorPopup(error);
|
||||
@@ -93,10 +67,76 @@
|
||||
showErrorPopup(error);
|
||||
}
|
||||
}
|
||||
|
||||
function getCheckedGoals() {
|
||||
try {
|
||||
var rootElement = $("#goals-tree");
|
||||
var checkboxes = rootElement.find("input");
|
||||
|
||||
var selectedGoals = "";
|
||||
|
||||
$.each(checkboxes, function(index, checkbox) {
|
||||
var box = $(checkbox);
|
||||
var id = box.attr("id").split("-")[2];
|
||||
|
||||
if(box.prop("checked") === true && !id.includes("goal")) {
|
||||
selectedGoals += id + ";";
|
||||
}
|
||||
});
|
||||
|
||||
return selectedGoals.substr(0, selectedGoals.length - 1);
|
||||
} catch(error) {
|
||||
showErrorPopup(error);
|
||||
}
|
||||
}
|
||||
|
||||
function updateSelectedGoals() {
|
||||
try {
|
||||
var selectedGoals = getCheckedGoals();
|
||||
|
||||
$.get("@Url.Action("UpdateGoals")", {pGoalOids: selectedGoals}, function (numberOfSelectedGoals) {
|
||||
$("#goals-button").html(`Ziele <span class='badge badge-light text-primary'>${numberOfSelectedGoals}</span>`);
|
||||
});
|
||||
} catch(error) {
|
||||
showErrorPopup(error);
|
||||
}
|
||||
}
|
||||
|
||||
function toggleAllGoalsSelection(element) {
|
||||
try {
|
||||
$('.goal-input').prop("checked", $(element).is(':checked'));
|
||||
updateSelectedGoals();
|
||||
} catch(error) {
|
||||
showErrorPopup(error);
|
||||
}
|
||||
}
|
||||
|
||||
function showAllGoals() {
|
||||
try {
|
||||
$(".goal-collapse").collapse("show");
|
||||
} catch(error) {
|
||||
showErrorPopup(error);
|
||||
}
|
||||
}
|
||||
|
||||
function hideAllGoals() {
|
||||
try {
|
||||
$(".goal-collapse").collapse("hide");
|
||||
} catch(error) {
|
||||
showErrorPopup(error);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@*
|
||||
ToDo für Montag, 15.07.2024: Bis 30 Ziele/Maßnahmen standardmäßig alles ausklappen, ansonsten einklappen
|
||||
ToDo: Alles/Nichts auswählen implementieren
|
||||
*@
|
||||
|
||||
@helper BuildGoalTreeBranch(GoalTreeItem goalTreeItem)
|
||||
{
|
||||
var collapseClass = Model.GoalTree.Count <= 30 ? "collapse show" : "collapse";
|
||||
|
||||
var isChecked = Model.SelectedGoals.Any(a => a.ValueListEntryOid.HasValue && a.ValueListEntryOid.Value == goalTreeItem.ValueListEntryOid);
|
||||
var isCheckedValue = isChecked ? "checked" : string.Empty;
|
||||
|
||||
@@ -123,12 +163,12 @@
|
||||
<div class="card-header px-2" onclick="cardHeaderClick('#goal-chevron-@goalTreeItem.ValueListEntryOid', '#collapsable-goal-tree-branch-@goalTreeItem.ValueListEntryOid')">
|
||||
<div class="clearfix">
|
||||
<div class="custom-control custom-checkbox goal-card-header float-left" onclick="stopToggle(event)" >
|
||||
<input type="checkbox" class="custom-control-input" value="@goalTreeItem.ValueListEntryOid" @isCheckedValue id="@goalTreeItem.ValueListEntryOid" onchange="updateSelectedGoals()" />
|
||||
<label class="custom-control-label goal-name-label @textClass" for="@goalTreeItem.ValueListEntryOid">@goalTreeItem.Header</label>
|
||||
@if(AbstractModel.HasRightToRateGoals)
|
||||
<input type="checkbox" class="custom-control-input goal-input" value="@goalTreeItem.ValueListEntryOid" @isCheckedValue id="goal-cb-@goalTreeItem.ValueListEntryOid" onchange="updateSelectedGoals()" />
|
||||
<label class="custom-control-label goal-name-label @textClass" for="goal-cb-@goalTreeItem.ValueListEntryOid">@goalTreeItem.Header</label>
|
||||
@if(AbstractModel.HasRightToRateGoals && ratingType != null)
|
||||
{
|
||||
<span id="goal-rating-@goalTreeItem.ValueListEntryOid" class="badge badge-bewo-goal-rating goal-rating-badge ml-1" onclick="showGoalRatingPopup(@goalTreeItem.ValueListEntryOid)">
|
||||
@(ratingType?.DisplayName ?? goalTreeItem.RatingName)
|
||||
<span style="cursor: pointer;" id="goal-rating-@goalTreeItem.ValueListEntryOid" class="badge badge-bewo-goal-rating goal-rating-badge ml-1" onclick="showGoalRatingPopup(@goalTreeItem.ValueListEntryOid)">
|
||||
@(ratingType.DisplayName ?? goalTreeItem.RatingName)
|
||||
</span>
|
||||
}
|
||||
</div>
|
||||
@@ -137,7 +177,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse" id="collapsable-goal-tree-branch-@goalTreeItem.ValueListEntryOid">
|
||||
<div class="@collapseClass goal-collapse" id="collapsable-goal-tree-branch-@goalTreeItem.ValueListEntryOid">
|
||||
<div class="card-body p-1 goal-list">
|
||||
@foreach(var child in goalTreeItem.Children.OrderBy(child => child.Header))
|
||||
{
|
||||
@@ -152,12 +192,12 @@
|
||||
var marginBottom = goalTreeItem.IsGoal ? "mb-3 mx-2" : "";
|
||||
|
||||
<div class="custom-control custom-checkbox goal-text @marginBottom">
|
||||
<input type="checkbox" class="custom-control-input" id="@goalTreeItem.ValueListEntryOid" @isCheckedValue onchange="updateSelectedGoals()">
|
||||
<label for="@goalTreeItem.ValueListEntryOid" class="custom-control-label goal-name-label @textClass">@goalTreeItem.Header</label>
|
||||
@if(AbstractModel.HasRightToRateGoals)
|
||||
<input type="checkbox" class="custom-control-input goal-input" id="goal-cb-@goalTreeItem.ValueListEntryOid" @isCheckedValue onchange="updateSelectedGoals()">
|
||||
<label for="goal-cb-@goalTreeItem.ValueListEntryOid" class="custom-control-label goal-name-label @textClass">@goalTreeItem.Header</label>
|
||||
@if(AbstractModel.HasRightToRateGoals && ratingType != null)
|
||||
{
|
||||
<span id="goal-rating-@goalTreeItem.ValueListEntryOid" class="badge badge-bewo-goal-rating goal-rating-badge ml-1" onclick="showGoalRatingPopup(@goalTreeItem.ValueListEntryOid)">
|
||||
@(ratingType?.DisplayName ?? goalTreeItem.RatingName)
|
||||
<span id="goal-rating-@goalTreeItem.ValueListEntryOid" style="cursor: pointer;" class="badge badge-bewo-goal-rating goal-rating-badge ml-1" onclick="showGoalRatingPopup(@goalTreeItem.ValueListEntryOid)">
|
||||
@(ratingType.DisplayName ?? goalTreeItem.RatingName)
|
||||
</span>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -66,7 +66,9 @@
|
||||
{
|
||||
<div class="form-row">
|
||||
<div class="col-md">
|
||||
<button type="button" class="btn btn-primary form-control my-3" data-toggle="modal" data-target="#goal-popup" id="goals-button">Ziele</button>
|
||||
<button type="button" class="btn btn-primary form-control my-3" data-toggle="modal" data-target="#goal-popup" id="goals-button">
|
||||
Ziele <span class="badge badge-light text-primary">@Model.SelectedGoals.Count</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
|
||||
@@ -110,74 +110,6 @@
|
||||
});
|
||||
}
|
||||
|
||||
function loadServiceDescriptions(categorySelectId, leistungSelectId, textmoduleContainerId, treeId) {
|
||||
showSpinner();
|
||||
var selectedCategoryOid = $(`#${categorySelectId}`).find(":selected").val();
|
||||
|
||||
if (selectedCategoryOid === null || selectedCategoryOid === undefined) {
|
||||
hideSpinner();
|
||||
return;
|
||||
}
|
||||
|
||||
$.get("@Url.Action("LoadServiceCategories")", { pServiceCategoryOid: selectedCategoryOid })
|
||||
.done(function (data) {
|
||||
if(false === checkJson(data)) {
|
||||
logWarning("loadServiceDescriptions: Der zurückgegebene Wert ist kein gültiges JSON!");
|
||||
hideSpinner();
|
||||
return;
|
||||
}
|
||||
|
||||
var serviceDescriptions = parseJason(data);
|
||||
var serviceDescriptionsSelect = $(`#${leistungSelectId}`);
|
||||
|
||||
serviceDescriptionsSelect.empty();
|
||||
serviceDescriptionsSelect.val("");
|
||||
|
||||
$.each(serviceDescriptions, function (index, serviceDescription) {
|
||||
serviceDescriptionsSelect.append(`<option value="${serviceDescription.ServiceDescriptionOid}">${serviceDescription.Name}</option>`);
|
||||
});
|
||||
|
||||
var serviceDescriptionToEdit = 0;
|
||||
|
||||
if(@Model.SelectedServiceRecordsServiceDescriptionOid > 0) {
|
||||
serviceDescriptionToEdit = parseFloat("@Model.SelectedServiceRecordsServiceDescriptionOid");
|
||||
} else if ("@Model.SelectedServiceDescriptionOid.HasValue.ToString().ToLower()" === "true") {
|
||||
serviceDescriptionToEdit = parseFloat("@Model.SelectedServiceDescriptionOid");
|
||||
}
|
||||
|
||||
var selectedOid = 0;
|
||||
|
||||
if(serviceDescriptionToEdit > 0) {
|
||||
$(`#${leistungSelectId} > option`).each(function() {
|
||||
var val = $(this).val();
|
||||
|
||||
if(serviceDescriptionToEdit == val) {
|
||||
serviceDescriptionsSelect.val(val);
|
||||
selectedOid = val;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if(serviceDescriptions[0] !== undefined) {
|
||||
var servDescrOid = serviceDescriptions[0].ServiceDescriptionOid;
|
||||
logInfo(`ServiceDescriptionOid: ${servDescrOid}`);
|
||||
serviceDescriptionsSelect.val(servDescrOid);
|
||||
selectedOid = servDescrOid;
|
||||
}
|
||||
}
|
||||
|
||||
if(selectedOid > 0) {
|
||||
$.get(getSetServiceDescriptionUrl(), { pServiceDescriptionOid: selectedOid }).done(function() {
|
||||
hideSpinner();
|
||||
});
|
||||
}
|
||||
|
||||
$("#" + textmoduleContainerId).show();
|
||||
$("#" + treeId).load('@Url.Action("LoadUpToDateTextModules")', null, function () {
|
||||
hideSpinner();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$("#start-date-picker").datetimepicker({
|
||||
locale: "de",
|
||||
@@ -282,9 +214,9 @@
|
||||
leistungSelectId = "mb-leistung-select";
|
||||
}*@
|
||||
|
||||
if("@Model.IsInGroupBookingMode".toLowerCase() === "false") {
|
||||
@*if("@Model.IsInGroupBookingMode".toLowerCase() === "false") {
|
||||
loadServiceDescriptions("category-select", "leistung-select", 'textmodule-container', 'tree');
|
||||
}
|
||||
}*@
|
||||
|
||||
|
||||
initializeTimeInputs();
|
||||
@@ -491,10 +423,6 @@
|
||||
return "@Url.Action("SetServiceRecordEmployee")";
|
||||
}
|
||||
|
||||
function getLoadServiceCategoriesUrl() {
|
||||
return "@Url.Action("LoadServiceCategories")";
|
||||
}
|
||||
|
||||
function getSetServiceDescriptionUrl() {
|
||||
return "@Url.Action("SetServiceDescription")";
|
||||
}
|
||||
@@ -539,10 +467,6 @@
|
||||
return @Html.Raw(Json.Encode(Model.SelectedGoals.Select(s => s.ValueListEntryOid.Value).ToArray()));
|
||||
}
|
||||
|
||||
function getUpdateGoalsUrl() {
|
||||
return "@Url.Action("UpdateGoals")";
|
||||
}
|
||||
|
||||
function getIsInEditingMode() {
|
||||
var boolString = "@Model.IsInEditingMode";
|
||||
|
||||
@@ -969,7 +893,7 @@
|
||||
|
||||
@*----- Ziele/Maßnahmen-Popup ----- *@
|
||||
<div class="modal" tabindex="-1" role="dialog" id="goal-popup">
|
||||
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
||||
<div class="modal-dialog modal-dialog-scrollable h-100" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title">Ziele und Maßnahmen</h6>
|
||||
@@ -993,7 +917,21 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal">Schließen</button>
|
||||
<div class="clearfix w-100">
|
||||
<div class="custom-control custom-checkbox float-left mr-3">
|
||||
<input type="checkbox" class="custom-control-input" id="checkAllGoalsButton" onchange="toggleAllGoalsSelection(this)" />
|
||||
<label for="checkAllGoalsButton" class="custom-control-label">
|
||||
Alle Ziele
|
||||
</label>
|
||||
</div>
|
||||
<button type="button" class="btn btn-primary float-left mr-2" onclick="showAllGoals()">
|
||||
Alle auf
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary float-left" onclick="hideAllGoals()">
|
||||
Alle zu
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary float-right" data-dismiss="modal">Schließen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
@if(!(Model is null))
|
||||
{
|
||||
using(Html.BeginForm("CreateMultiBooking", "Main", FormMethod.Post, new { onreset = "serviceDescriptionSelectOnReset('mb-category-select', 'mb-leistung-select', 'textmodule-container', 'tree')", id = "multiBookingForm" }))
|
||||
using(Html.BeginForm("CreateMultiBooking", "Main", FormMethod.Post, new { id = "multiBookingForm" }))
|
||||
{
|
||||
var startDate = Model.SelectedServiceRecord?.Start?.ToShortDateString() ?? DateTime.Today.ToShortDateString();
|
||||
var endDate = Model.SelectedServiceRecord?.End?.ToShortDateString() ?? DateTime.Today.ToShortDateString();
|
||||
|
||||
@@ -204,15 +204,15 @@
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
if(goal.RatingTypeOid.HasValue)
|
||||
{
|
||||
var goalRating = Model.GoalRatingTypes.FirstOrDefault(g => g.RatingTypeOid.HasValue && g.RatingTypeOid.Equals(goal.RatingTypeOid.Value));
|
||||
if(goal.RatingTypeOid.HasValue)
|
||||
{
|
||||
var goalRating = Model.GoalRatingTypes.FirstOrDefault(g => g.RatingTypeOid.HasValue && g.RatingTypeOid.Equals(goal.RatingTypeOid.Value));
|
||||
|
||||
if(goalRating?.DisplayName != null && goalRating.DisplayName.Length > 0)
|
||||
{
|
||||
massnahmenString += $"<strong style='color: blue;'>({goalRating.DisplayName})</strong>";
|
||||
}
|
||||
}
|
||||
if(goalRating?.DisplayName != null && goalRating.DisplayName.Length > 0)
|
||||
{
|
||||
massnahmenString += $" <strong style='color: blue;'>({goalRating.DisplayName})</strong>";
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if(serviceRecord.Goals.IndexOf(goal) < serviceRecord.Goals.Count - 1)
|
||||
@@ -223,10 +223,42 @@
|
||||
|
||||
if(serviceRecord.ServiceRecordOid.HasValue && Model.ServiceRecordOids2GoalHeader.ContainsKey(serviceRecord.ServiceRecordOid.Value))
|
||||
{
|
||||
foreach(var goalHeader in Model.ServiceRecordOids2GoalHeader[serviceRecord.ServiceRecordOid.Value])
|
||||
var ziele = serviceRecord.Goals.Where(g => g.Type == ValueListEntryType.SupportConceptIndividualGoalCategoryType || g.Type == ValueListEntryType.SupportConceptGoalCategoryType).ToList();
|
||||
|
||||
foreach(var ziel in ziele)
|
||||
{
|
||||
zieleString += $"{goalHeader}, ";
|
||||
if(ziel.Abbreviation != null && ziel.TypeDescription != null)
|
||||
{
|
||||
zieleString += $"{ziel.Abbreviation}: {ziel.TypeDescription} ";
|
||||
}
|
||||
else if(ziel.Abbreviation is null && ziel.TypeDescription != null)
|
||||
{
|
||||
zieleString += ziel.TypeDescription;
|
||||
}
|
||||
else if(ziel.Abbreviation != null && ziel.TypeDescription is null)
|
||||
{
|
||||
zieleString += ziel.Abbreviation;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
if(ziel.RatingTypeOid.HasValue)
|
||||
{
|
||||
var zielbewertung = Model.GoalRatingTypes.FirstOrDefault(goalRatingType => goalRatingType.RatingTypeOid.HasValue && goalRatingType.RatingTypeOid.Equals(ziel.RatingTypeOid.Value));
|
||||
|
||||
if(zielbewertung?.DisplayName != null && zielbewertung.DisplayName.Length > 0)
|
||||
{
|
||||
zieleString += $" <strong style='color: blue;'>({zielbewertung.DisplayName})</strong>";
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
zieleString += ", ";
|
||||
}
|
||||
|
||||
//foreach(var goalHeader in Model.ServiceRecordOids2GoalHeader[serviceRecord.ServiceRecordOid.Value])
|
||||
//{
|
||||
// zieleString += $"{goalHeader}, ";
|
||||
//}
|
||||
}
|
||||
|
||||
zieleString = zieleString.TrimEnd(' ').TrimEnd(',');
|
||||
@@ -328,14 +360,18 @@
|
||||
}
|
||||
@if(serviceRecord.Goals != null && serviceRecord.Goals.Count > 0)
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col text-secondary">
|
||||
Ziele:
|
||||
if(!string.IsNullOrEmpty(zieleString))
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col text-secondary">
|
||||
Ziele:
|
||||
</div>
|
||||
<div class="col">
|
||||
@(new HtmlString(zieleString))
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
@zieleString
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
if(serviceRecord.Goals.Any(goal => goal.Type == ValueListEntryType.SupportConceptGoalType || goal.Type == ValueListEntryType.SupportConceptIndividualGoalType))
|
||||
{
|
||||
<div class="row">
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
{
|
||||
using(Html.BeginForm("SelectSupportConcept", "Main", FormMethod.Post, new { Id = "selectSupportConceptForm", onreset = "resetSingleBookingForm()" }))
|
||||
{
|
||||
var selectedSuportConceptTimeSpanColorClass = Model.SelectedSupportConceptListObject.IsAboutToExpire ? "text-bewo-is-about-to-expire" : Model.SelectedSupportConceptListObject.ExpiresInThreeMonthsOrLess ? "text-bewo-expires-in-three-months" : "text-dark";
|
||||
var selectedSuportConceptTimeSpanColorClass = Model.SelectedCostBearer2SupportConceptRelListObject.IsAboutToExpire ? "text-bewo-is-about-to-expire" : Model.SelectedCostBearer2SupportConceptRelListObject.ExpiresInThreeMonthsOrLess ? "text-bewo-expires-in-three-months" : "text-dark";
|
||||
<div>
|
||||
<div class="container p-0">
|
||||
<div class="row">
|
||||
@@ -96,10 +96,10 @@
|
||||
<div class="list-group">
|
||||
<a href="#" class="list-group-item flex-column align-items-start no-underline" data-toggle="modal" data-target="#supportConceptList">
|
||||
<div class="d-flex">
|
||||
<h5 class="mb-1 text-dark text-left" id="selectedSupportConceptCustomerInfo">@Model.SelectedSupportConceptListObject.NameAndDateOfBirth</h5>
|
||||
<h5 class="mb-1 text-dark text-left" id="selectedSupportConceptCustomerInfo">@Model.SelectedCostBearer2SupportConceptRelListObject.NameAndDateOfBirth</h5>
|
||||
</div>
|
||||
<p class="mb-1 text-left @selectedSuportConceptTimeSpanColorClass" id="selectedSupportConceptInfo">
|
||||
@Model.SelectedSupportConceptListObject.SupportConceptTimeSpan
|
||||
@Model.SelectedCostBearer2SupportConceptRelListObject.SupportConceptTimeSpan
|
||||
</p>
|
||||
</a>
|
||||
</div>
|
||||
@@ -118,7 +118,7 @@
|
||||
</div>
|
||||
<!-- Hilfeplanauswahlpopup modal-dialog-centered-->
|
||||
<div class="modal" role="dialog" tabindex="-1" id="supportConceptList">
|
||||
<div class="modal-dialog text-center" role="document">
|
||||
<div class="modal-dialog text-center modal-dialog-scrollable" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Hilfeplanauswahl</h5>
|
||||
@@ -163,7 +163,7 @@
|
||||
</div>
|
||||
<!-- /Hilfeplanauswahlpopup -->
|
||||
|
||||
<input type="text" class="d-none" name="CostBearer2SupportConceptOid" id="CostBearer2SupportConceptOid" value="@Model.SelectedSupportConceptListObject.CostBearer2SupportConceptOid">
|
||||
<input type="text" class="d-none" name="CostBearer2SupportConceptOid" id="CostBearer2SupportConceptOid" value="@Model.SelectedCostBearer2SupportConceptRelListObject.CostBearer2SupportConceptOid">
|
||||
}
|
||||
|
||||
if(Model.IsCustomerAbsence)
|
||||
@@ -177,7 +177,7 @@
|
||||
</div>
|
||||
}
|
||||
|
||||
using(Html.BeginForm("CreateOrUpdateServiceRecord", "Main", FormMethod.Post, new { onreset = "serviceDescriptionSelectOnReset('category-select', 'leistung-select', 'textmodule-container', 'tree')", id = "singleBookingForm" }))
|
||||
using(Html.BeginForm("CreateOrUpdateServiceRecord", "Main", FormMethod.Post, new { id = "singleBookingForm" }))
|
||||
{
|
||||
<div class="mt-3">
|
||||
@* ----- Einzelbuchung: Mitarbeiter ----- *@
|
||||
@@ -198,7 +198,9 @@
|
||||
<!-- Einzelbuchung: Ziele -->
|
||||
<div class="form-row">
|
||||
<div class="col-md">
|
||||
<button type="button" class="btn btn-primary form-control my-3" data-toggle="modal" data-target="#goal-popup" id="goals-button">Ziele</button>
|
||||
<button type="button" class="btn btn-primary form-control my-3" data-toggle="modal" data-target="#goal-popup" id="goals-button">
|
||||
Ziele <span class="badge badge-light text-primary">@Model.SelectedGoals.Count</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
@@ -208,39 +210,10 @@
|
||||
</div>
|
||||
|
||||
}
|
||||
|
||||
@* ----- Einzelbuchung: Leistungskategorie ----- *@
|
||||
<div class="form-row">
|
||||
<div class="col-md">
|
||||
<div class="form-group my-2">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text prepend-input-group-text">
|
||||
Kategorie
|
||||
</div>
|
||||
</div>
|
||||
@Html.DropDownListFor(m => m.SelectedServiceCategoryOid, Model.ServiceCategoryListItems, new { onchange = "loadServiceDescriptions('category-select', 'leistung-select', 'textmodule-container', 'tree')", @class = "custom-select", Id = "category-select" })
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* ----- Einzelbuchung: Leistung ----- *@
|
||||
<div class="form-row">
|
||||
<div class="col-md">
|
||||
<div class="form-group my-2">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text prepend-input-group-text">
|
||||
Leistung
|
||||
</div>
|
||||
</div>
|
||||
<select class="custom-select" id="leistung-select" name="ServiceDescription" onchange="setServiceDescription('leistung-select')">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* ----- Einzelbuchung: Kategorie & Leistung ----- *@
|
||||
<div id="category-to-description-container">
|
||||
@Html.Partial("Category2ServiceDescriptionPartial", Model)
|
||||
</div>
|
||||
|
||||
@* ----- Marker ----- *@
|
||||
|
||||
@@ -0,0 +1,209 @@
|
||||
@using BeWoPlanerMobil.Util
|
||||
@using BS.Shared
|
||||
@model BeWoPlanerMobil.Models.ReportViewerModel
|
||||
|
||||
@{
|
||||
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
|
||||
{
|
||||
<text>
|
||||
<script type="text/javascript">
|
||||
$("#second-logout-form").submit();
|
||||
</script>
|
||||
</text>
|
||||
}
|
||||
}
|
||||
|
||||
@*
|
||||
Formular-Inputs:
|
||||
|
||||
1. SupportConcept wie in SingleBookingFormPartial.cshtml
|
||||
2. Employee
|
||||
3. Customer
|
||||
4. Team
|
||||
5. Organisation
|
||||
6. Month
|
||||
7. Year (DateTime.Now.Year - 10 bis DateTime.Now.Year + 1)
|
||||
8. Date
|
||||
9. DateRange (Start & Ende)
|
||||
10. ValueListEntry, z.B. Betreuungsart_8 -> Name: Betreuungsart, ValueListEntryType: 8
|
||||
11. ServiceCategory
|
||||
12. Custom
|
||||
13. Text
|
||||
|
||||
|
||||
|
||||
|
||||
// ToDo: Beim Auswählen eines Hilfeplans etc. berichte-form-container neu laden!
|
||||
*@
|
||||
|
||||
<script type="text/javascript">
|
||||
function selectCostBearer2SupportConceptRel(relOid) {
|
||||
try {
|
||||
$("#berichte-form-container").load("@Url.Action("SelectCostBearer2SupportConceptRel")", {relOid: relOid});
|
||||
} catch (error) {
|
||||
showErrorPopup(error);
|
||||
}
|
||||
}
|
||||
|
||||
function selectMonth() {
|
||||
try {
|
||||
var selectedMonth = $("#month-select").find(":selected").val();
|
||||
|
||||
$("#berichte-form-container").load("@Url.Action("SelectMonth")", {selectedMonth: selectedMonth});
|
||||
} catch(error) {
|
||||
showErrorPopup(error);
|
||||
}
|
||||
}
|
||||
|
||||
function selectYear() {
|
||||
try {
|
||||
var selectedYear = $("#year-select").find(":selected").val();
|
||||
|
||||
$("#berichte-form-container").load("@Url.Action("SelectYear")", {selectedYear: selectedYear});
|
||||
} catch(error) {
|
||||
showErrorPopup(error);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@if(Model.SelectedQuery != null && Model.SelectedQuery.Parameter != null && Model.SelectedQuery.Parameter.Count > 0)
|
||||
{
|
||||
<div class="mt-3">
|
||||
@foreach(var parameter in Model.SelectedQuery.Parameter)
|
||||
{
|
||||
switch(parameter.ParamType)
|
||||
{
|
||||
case QueryParameterType.SupportConcept:
|
||||
var selectedSuportConceptTimeSpanColorClass = Model.SelectedCostBearer2SupportConceptRelListObject.IsAboutToExpire ? "text-bewo-is-about-to-expire" : Model.SelectedCostBearer2SupportConceptRelListObject.ExpiresInThreeMonthsOrLess ? "text-bewo-expires-in-three-months" : "text-dark";
|
||||
<div class="form-row">
|
||||
<div>
|
||||
<div class="container p-0">
|
||||
<div class="row">
|
||||
<div class="col mt-3">
|
||||
<div class="list-group">
|
||||
<a href="#" class="list-group-item flex-column align-items-start no-underline" data-toggle="modal" data-target="#supportConceptList">
|
||||
<div class="d-flex">
|
||||
<h5 class="mb-1 text-dark text-left" id="selectedSupportConceptCustomerInfo">@Model.SelectedCostBearer2SupportConceptRelListObject.NameAndDateOfBirth</h5>
|
||||
</div>
|
||||
<p class="mb-1 text-left @selectedSuportConceptTimeSpanColorClass" id="selectedSupportConceptInfo">
|
||||
@Model.SelectedCostBearer2SupportConceptRelListObject.SupportConceptTimeSpan
|
||||
</p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal" role="dialog" tabindex="-1" id="supportConceptList">
|
||||
<div class="modal-dialog text-center modal-dialog-scrollable" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Hilfeplanauswahl</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" onclick="resetSupportConceptSearch()">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- Hilfeplansuche -->
|
||||
<div class="input-group mb-3">
|
||||
<input class="form-control w-100" type="text" placeholder="Suchen..." oninput="supportConceptSearchOnChange()" id="support-concept-search-input" />
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-outline-secondary" type="button" onclick="resetSupportConceptSearch()">
|
||||
<span class="fas fa-times-circle"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<!-- Hilfeplanliste -->
|
||||
<div class="list-group">
|
||||
@foreach(var supportConceptListObject in Model.CostBearer2SupportConceptRelListObjects)
|
||||
{
|
||||
var timeSpanColorClass = supportConceptListObject.IsAboutToExpire ? "text-bewo-is-about-to-expire" : supportConceptListObject.ExpiresInThreeMonthsOrLess ? "text-bewo-expires-in-three-months" : "text-dark";
|
||||
|
||||
<a href="#" class="list-group-item flex-column align-items-start no-underline blubb-test" onclick="selectCostBearer2SupportConceptRel(@supportConceptListObject.CostBearer2SupportConceptOid)" data-dismiss="modal">
|
||||
<div class="justify-content-between">
|
||||
<h5 class="mb-1 text-dark text-left supportconcept-name-header">
|
||||
@supportConceptListObject.NameAndDateOfBirth
|
||||
</h5>
|
||||
</div>
|
||||
<p class="mb-1 text-left @timeSpanColorClass">
|
||||
@supportConceptListObject.SupportConceptTimeSpan
|
||||
</p>
|
||||
</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
break;
|
||||
case QueryParameterType.Employee:
|
||||
break;
|
||||
case QueryParameterType.Customer:
|
||||
break;
|
||||
case QueryParameterType.Month:
|
||||
<div class="form-row">
|
||||
<div class="col-md">
|
||||
<div class="form-group my-2">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text prepend-input-group-text">
|
||||
Monat
|
||||
</div>
|
||||
</div>
|
||||
<select class="custom-select" id="month-select" onchange="selectMonth()">
|
||||
@foreach(var month in Model.Months)
|
||||
{
|
||||
var selected = Model.SelectedMonthForBericht != null && month.Equals(Model.SelectedMonthForBericht) ? " selected" : string.Empty;
|
||||
|
||||
<option value="@month.Value"@selected>@month.Text</option>
|
||||
}
|
||||
</select>
|
||||
<select class="custom-select" id="year-select" onchange="selectYear()">
|
||||
@foreach(var year in MobileUtils.Years)
|
||||
{
|
||||
var selected = Model.SelectedYearForBericht.HasValue && year.Equals(Model.SelectedYearForBericht.Value) ? " selected" : string.Empty;
|
||||
|
||||
<option value="@MobileUtils.Years.IndexOf(year)"@selected>@year</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
break;
|
||||
case QueryParameterType.Date:
|
||||
break;
|
||||
case QueryParameterType.DateRange:
|
||||
break;
|
||||
case QueryParameterType.Team:
|
||||
break;
|
||||
case QueryParameterType.CostCenter:
|
||||
break;
|
||||
case QueryParameterType.ServiceCategory:
|
||||
break;
|
||||
case QueryParameterType.ServiceDescription:
|
||||
break;
|
||||
case QueryParameterType.Text:
|
||||
break;
|
||||
case QueryParameterType.Year:
|
||||
break;
|
||||
case QueryParameterType.CurrentUser:
|
||||
break;
|
||||
case QueryParameterType.CurrentEmployee:
|
||||
break;
|
||||
case QueryParameterType.ValueListEntryType:
|
||||
break;
|
||||
case QueryParameterType.Organisation:
|
||||
break;
|
||||
case QueryParameterType.Custom:
|
||||
break;
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
|
||||
@using BeWoPlanerMobil.Util
|
||||
@model BeWoPlanerMobil.Models.ReportViewerModel
|
||||
|
||||
@{
|
||||
if(TempData[TempDataConstants.DoLogoutKey] is bool doLogout && doLogout)
|
||||
{
|
||||
<text>
|
||||
<script type="text/javascript">
|
||||
$("#second-logout-form").submit();
|
||||
</script>
|
||||
</text>
|
||||
}
|
||||
}
|
||||
|
||||
<script type="text/javascript">
|
||||
function initEvent(s, e) {
|
||||
var viewer = $("#webDocumentViewer1");
|
||||
|
||||
var newHeight = parseFloat('@Model.ReportRatio.ToString().Replace(',', '.')') * parseFloat(viewer.width().toString());
|
||||
|
||||
logInfo3(viewer.width() + " x " + newHeight);
|
||||
|
||||
$("#webDocumentViewer1").height(newHeight);
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="mt-3">
|
||||
@Html.DevExpress().WebDocumentViewer(settings =>
|
||||
{
|
||||
settings.MobileMode = true;
|
||||
settings.Name = "webDocumentViewer1";
|
||||
settings.SettingsMobile.ReaderMode = true;
|
||||
settings.Width = Unit.Percentage(100);
|
||||
settings.ClientSideEvents.Init = "initEvent";
|
||||
|
||||
}).Bind(Model.Report).GetHtml()
|
||||
</div>
|
||||
@@ -28,21 +28,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
// ToDo: Nicht hier laden, sondern nur, wenn keine weiteren Variablen benötigt werden!
|
||||
function loadCustomReport() {
|
||||
try {
|
||||
var selectedReportOid = $("#msk-customReportSelect").val();
|
||||
|
||||
showSpinner();
|
||||
$("#msk-report-container").load("@Url.Action("LoadCustomReport")", { reportOid: selectedReportOid }, function () {
|
||||
toggleMitarbeiterstundenForm();
|
||||
hideSpinner();
|
||||
});
|
||||
} catch (error) {
|
||||
showErrorPopup(error);
|
||||
}
|
||||
}
|
||||
|
||||
function updateForm() {
|
||||
try {
|
||||
var selectedReportType = $("#msk-report-type-select").val();
|
||||
@@ -57,6 +42,14 @@
|
||||
showErrorPopup(error);
|
||||
}
|
||||
}
|
||||
|
||||
function closeReport() {
|
||||
try {
|
||||
$.get("@Url.Action("ResetReport")");
|
||||
} catch (error) {
|
||||
showErrorPopup(error);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="container-fluid my-3">
|
||||
@@ -74,11 +67,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-8 col-lg-8 col-xl-9" id="msk-report-container">
|
||||
@if(!(Model.Report is null))
|
||||
{
|
||||
@Html.Partial("DocumentWebViewerPartial", Model)
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="msk-report-container">
|
||||
@Html.Partial("BeWoReportPartial", Model)
|
||||
</div>
|
||||
@@ -111,24 +111,67 @@
|
||||
}
|
||||
}
|
||||
|
||||
parameterString += ";" + ansicht;
|
||||
parameterString += `;${ansicht}`;
|
||||
|
||||
showSpinner();
|
||||
$("#msk-report-container").load("@Url.Action("LoadMitarbeiterstundenkonto")", { parameters: parameterString }, function() {
|
||||
hideSpinner();
|
||||
$("#bewo-report-popup").modal("show");
|
||||
});
|
||||
} catch (error) {
|
||||
showErrorPopup(error);
|
||||
}
|
||||
}
|
||||
|
||||
function loadCustomReport() {
|
||||
try {
|
||||
var selectedReportOid2HasParameters = $("#msk-customReportSelect").val();
|
||||
|
||||
if(selectedReportOid2HasParameters === undefined || selectedReportOid2HasParameters === null || selectedReportOid2HasParameters.includes("_") === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
var oid2HasParams = selectedReportOid2HasParameters.split("_");
|
||||
|
||||
var hasParameters = oid2HasParams[1] === "1";
|
||||
|
||||
var selectedReportOid = oid2HasParams[0];
|
||||
|
||||
if(hasParameters) {
|
||||
$("#berichte-form-container").load("@Url.Action("LoadBerichteForm")", {reportOid: selectedReportOid}, function() {
|
||||
hideSpinner();
|
||||
toggleMitarbeiterstundenForm();
|
||||
$("#berichte-form-container").show();
|
||||
});
|
||||
} else {
|
||||
showSpinner();
|
||||
$("#berichte-form-container").empty();
|
||||
$("#berichte-form-container").hide();
|
||||
$("#msk-report-container").load("@Url.Action("LoadCustomReport")", {reportOid: selectedReportOid}, function () {
|
||||
hideSpinner();
|
||||
toggleMitarbeiterstundenForm();
|
||||
$("#bewo-report-popup").modal("show");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
} catch (error) {
|
||||
showErrorPopup(error);
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@*ToDo: Bis auf weiteres nur Mitarbeiterstundenkonto anzeigen!*@
|
||||
@*@if(Model.SelectedReportType == ReportType.Berichte)
|
||||
{
|
||||
@Html.DropDownListFor(model => model.SelectedCustomReport, Model.CustomReports, new { @class = "custom-select", id = "msk-customReportSelect", onchange = "loadCustomReport()" })
|
||||
}*@
|
||||
@if(Model.SelectedReportType == ReportType.Berichte)
|
||||
{
|
||||
@Html.DropDownListFor(model => model.SelectedCustomReport, Model.CustomReports, new { @class = "custom-select", id = "msk-customReportSelect", onchange = "loadCustomReport()" })
|
||||
|
||||
<div id="berichte-form-container" style="display: none;">
|
||||
@Html.Partial("BerichteFormPartialView", Model)
|
||||
</div>
|
||||
|
||||
}
|
||||
|
||||
@if(Model.SelectedReportType == ReportType.Mitarbeiterstundenkonto && AbstractModel.HasRightToViewMitarbeiterstundenkonto)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
@model BeWoPlanerMobil.Models.CustomerModel
|
||||
@using BeWoPlanerMobil.Util
|
||||
@model BeWoPlanerMobil.Models.AbstractModel
|
||||
|
||||
<script type="text/javascript">
|
||||
function customerReportViewerInit(s, e) {
|
||||
function bewoReportViewerInit(s, e) {
|
||||
try {
|
||||
s.UpdateLocalization({
|
||||
'Page': 'Seite',
|
||||
@@ -12,12 +13,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
$(document).on("shown.bs.modal", "#customer-report-popup", function() {
|
||||
customerReportViewer.AdjustControl();
|
||||
$(document).on("shown.bs.modal", "#bewo-report-popup", function () {
|
||||
if(bewoReportViewer === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
bewoReportViewer.AdjustControl();
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="modal" data-backdrop="static" tabindex="-1" role="dialog" id="customer-report-popup">
|
||||
<div class="modal" data-backdrop="static" tabindex="-1" role="dialog" id="bewo-report-popup">
|
||||
<div class="modal-dialog modal-xl modal-dialog-scrollable" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
@@ -26,17 +31,23 @@
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body" id="customer-report-container" style="height: 90vh !important;">
|
||||
@if(Model?.Report != null)
|
||||
<div class="modal-body" style="height: 90vh !important;">
|
||||
@if(TempData[TempDataConstants.ReportErrorMessageKey] is string reportErrorMessage)
|
||||
{
|
||||
<div class="alert alert-danger" role="alert">
|
||||
@(new HtmlString(reportErrorMessage))
|
||||
</div>
|
||||
}
|
||||
else if(Model?.Report != null)
|
||||
{
|
||||
@Html.DevExpress().WebDocumentViewer(settings =>
|
||||
{
|
||||
settings.Name = "customerReportViewer";
|
||||
settings.Name = "bewoReportViewer";
|
||||
settings.Width = Unit.Percentage(100);
|
||||
settings.Height = Unit.Percentage(100);
|
||||
settings.MobileMode = true;
|
||||
settings.SettingsMobile.ReaderMode = true;
|
||||
settings.ClientSideEvents.Init = "customerReportViewerInit";
|
||||
settings.ClientSideEvents.Init = "bewoReportViewerInit";
|
||||
}).Bind(Model.Report).GetHtml()
|
||||
}
|
||||
</div>
|
||||
@@ -551,14 +551,25 @@
|
||||
</div>
|
||||
|
||||
|
||||
@if(!(TempData[TempDataConstants.ErrorMessageKey] is null))
|
||||
@if(TempData[TempDataConstants.ErrorMessageKey] != null)
|
||||
{
|
||||
<div class="container-fluid mt-3">
|
||||
<script type="text/javascript">
|
||||
function clearErrorLog() {
|
||||
try {
|
||||
$("#error-message-alert").html("");
|
||||
$("#error-alert-container").hide();
|
||||
} catch (error) {
|
||||
showErrorPopup(error);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<div class="container-fluid mt-3" id="error-alert-container">
|
||||
<div class="row d-flex justify-content-center">
|
||||
<div class="col-md-3 col-lg-4">
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<div class="alert alert-danger" id="error-message-alert" role="alert">
|
||||
@TempData[TempDataConstants.ErrorMessageKey]
|
||||
</div>
|
||||
<button type="button" class="btn btn-primary" onclick="clearErrorLog()">Error Log leeren</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace BeWo.Service.Plugins
|
||||
//t = "5351926758"; // Viva a Vida
|
||||
//t = "2215396183"; // Diakonie Remscheid Lennep
|
||||
//t = "5157599087"; // SHG Schwerte
|
||||
t = "4526293996"; // Fortis
|
||||
//t = "4526293996"; // Fortis
|
||||
//t = "3647969417"; // Caritas Bottrop
|
||||
//t = "3057313346"; // SSB Mainz
|
||||
//t = "6246287823"; // BeWo Alsdorf
|
||||
@@ -109,7 +109,7 @@ namespace BeWo.Service.Plugins
|
||||
//t = "8677523325"; // BeWo Richartz
|
||||
//t = "1765854593"; // Mein Betreutes Wohnen
|
||||
//t = "6802909544"; // Lebenshilfe Coburg
|
||||
//t = "9417634361"; // Synprax
|
||||
t = "9417634361"; // Synprax
|
||||
//t = "5761861730"; // Lebenshilfe Warendorf
|
||||
//t = "6712648331"; // BeWo Färber
|
||||
//t = "4982295287"; // ASB Hamm
|
||||
@@ -386,8 +386,9 @@ namespace BeWo.Service.Plugins
|
||||
//t = "7113513872"; // Verein für Beratung und Therapie - LOK
|
||||
//t = "1676990640"; // Perspektive - Selbständiges Leben
|
||||
//t = "2544632712"; // Wabe gGmbH
|
||||
t = "7077286353"; // PariSozial
|
||||
//t = "7077286353"; // PariSozial
|
||||
//t = "5000000000";
|
||||
//t = "3788859817"; // Zukunft Leben (Stephan Hekermann)
|
||||
|
||||
return t;
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user