diff --git a/BeWoAllReports.sln b/BeWoAllReports.sln index 3dc902993..8f69fd07d 100644 --- a/BeWoAllReports.sln +++ b/BeWoAllReports.sln @@ -389,8 +389,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Humanitas", "ReportImp\Huma EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiakonischesWerkHerne", "ReportImp\DiakonischesWerkHerne\DiakonischesWerkHerne.csproj", "{25AE0253-30AC-4E85-9FA4-2F8FADA62787}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SabGmbH", "ReportImp\SabGmbH\SabGmbH.csproj", "{491FE69C-49BF-4003-85CE-755DE9C99E7C}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BeWoWalzPaiva", "ReportImp\BeWoWalzPaiva\BeWoWalzPaiva.csproj", "{FE709CF1-6579-4A69-8E43-5C3BF7BD96D7}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AbwDziallasMuhrin", "ReportImp\AbwDziallasMuhrin\AbwDziallasMuhrin.csproj", "{4ACCB582-3B1C-42E8-B658-9D506B8620AD}" @@ -791,8 +789,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Alloheim", "ReportImp\Alloh EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZuhauseWohnenIrisThimm", "ReportImp\ZuhauseWohnenIrisThimm\ZuhauseWohnenIrisThimm.csproj", "{22E7F5F8-BB34-4243-896B-221F78837F83}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PetraWagnerMatthes", "ReportImp\PetraWagnerMatthes\PetraWagnerMatthes.csproj", "{644F73A6-7EA0-456D-B7BC-22F44B851812}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SKMAachen", "ReportImp\SKMAachen\SKMAachen.csproj", "{95342759-C161-4A44-8130-9740E57FE3A1}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DieLebenslotsen", "ReportImp\DieLebenslotsen\DieLebenslotsen.csproj", "{1D72670D-FC74-4806-B6B8-847BB01718B9}" @@ -4964,30 +4960,6 @@ Global {25AE0253-30AC-4E85-9FA4-2F8FADA62787}.Release|Mixed Platforms.Build.0 = Release|Any CPU {25AE0253-30AC-4E85-9FA4-2F8FADA62787}.Release|x86.ActiveCfg = Release|Any CPU {25AE0253-30AC-4E85-9FA4-2F8FADA62787}.Release|x86.Build.0 = Release|Any CPU - {491FE69C-49BF-4003-85CE-755DE9C99E7C}.Debug|.NET.ActiveCfg = Debug|Any CPU - {491FE69C-49BF-4003-85CE-755DE9C99E7C}.Debug|.NET.Build.0 = Debug|Any CPU - {491FE69C-49BF-4003-85CE-755DE9C99E7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {491FE69C-49BF-4003-85CE-755DE9C99E7C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {491FE69C-49BF-4003-85CE-755DE9C99E7C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {491FE69C-49BF-4003-85CE-755DE9C99E7C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {491FE69C-49BF-4003-85CE-755DE9C99E7C}.Debug|x86.ActiveCfg = Debug|Any CPU - {491FE69C-49BF-4003-85CE-755DE9C99E7C}.Debug|x86.Build.0 = Debug|Any CPU - {491FE69C-49BF-4003-85CE-755DE9C99E7C}.DebugRemote|.NET.ActiveCfg = Debug|Any CPU - {491FE69C-49BF-4003-85CE-755DE9C99E7C}.DebugRemote|.NET.Build.0 = Debug|Any CPU - {491FE69C-49BF-4003-85CE-755DE9C99E7C}.DebugRemote|Any CPU.ActiveCfg = Debug|Any CPU - {491FE69C-49BF-4003-85CE-755DE9C99E7C}.DebugRemote|Any CPU.Build.0 = Debug|Any CPU - {491FE69C-49BF-4003-85CE-755DE9C99E7C}.DebugRemote|Mixed Platforms.ActiveCfg = Debug|Any CPU - {491FE69C-49BF-4003-85CE-755DE9C99E7C}.DebugRemote|Mixed Platforms.Build.0 = Debug|Any CPU - {491FE69C-49BF-4003-85CE-755DE9C99E7C}.DebugRemote|x86.ActiveCfg = Debug|Any CPU - {491FE69C-49BF-4003-85CE-755DE9C99E7C}.DebugRemote|x86.Build.0 = Debug|Any CPU - {491FE69C-49BF-4003-85CE-755DE9C99E7C}.Release|.NET.ActiveCfg = Release|Any CPU - {491FE69C-49BF-4003-85CE-755DE9C99E7C}.Release|.NET.Build.0 = Release|Any CPU - {491FE69C-49BF-4003-85CE-755DE9C99E7C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {491FE69C-49BF-4003-85CE-755DE9C99E7C}.Release|Any CPU.Build.0 = Release|Any CPU - {491FE69C-49BF-4003-85CE-755DE9C99E7C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {491FE69C-49BF-4003-85CE-755DE9C99E7C}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {491FE69C-49BF-4003-85CE-755DE9C99E7C}.Release|x86.ActiveCfg = Release|Any CPU - {491FE69C-49BF-4003-85CE-755DE9C99E7C}.Release|x86.Build.0 = Release|Any CPU {FE709CF1-6579-4A69-8E43-5C3BF7BD96D7}.Debug|.NET.ActiveCfg = Debug|Any CPU {FE709CF1-6579-4A69-8E43-5C3BF7BD96D7}.Debug|.NET.Build.0 = Debug|Any CPU {FE709CF1-6579-4A69-8E43-5C3BF7BD96D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU @@ -9788,30 +9760,6 @@ Global {22E7F5F8-BB34-4243-896B-221F78837F83}.Release|Mixed Platforms.Build.0 = Release|Any CPU {22E7F5F8-BB34-4243-896B-221F78837F83}.Release|x86.ActiveCfg = Release|Any CPU {22E7F5F8-BB34-4243-896B-221F78837F83}.Release|x86.Build.0 = Release|Any CPU - {644F73A6-7EA0-456D-B7BC-22F44B851812}.Debug|.NET.ActiveCfg = Debug|Any CPU - {644F73A6-7EA0-456D-B7BC-22F44B851812}.Debug|.NET.Build.0 = Debug|Any CPU - {644F73A6-7EA0-456D-B7BC-22F44B851812}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {644F73A6-7EA0-456D-B7BC-22F44B851812}.Debug|Any CPU.Build.0 = Debug|Any CPU - {644F73A6-7EA0-456D-B7BC-22F44B851812}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {644F73A6-7EA0-456D-B7BC-22F44B851812}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {644F73A6-7EA0-456D-B7BC-22F44B851812}.Debug|x86.ActiveCfg = Debug|Any CPU - {644F73A6-7EA0-456D-B7BC-22F44B851812}.Debug|x86.Build.0 = Debug|Any CPU - {644F73A6-7EA0-456D-B7BC-22F44B851812}.DebugRemote|.NET.ActiveCfg = Debug|Any CPU - {644F73A6-7EA0-456D-B7BC-22F44B851812}.DebugRemote|.NET.Build.0 = Debug|Any CPU - {644F73A6-7EA0-456D-B7BC-22F44B851812}.DebugRemote|Any CPU.ActiveCfg = Debug|Any CPU - {644F73A6-7EA0-456D-B7BC-22F44B851812}.DebugRemote|Any CPU.Build.0 = Debug|Any CPU - {644F73A6-7EA0-456D-B7BC-22F44B851812}.DebugRemote|Mixed Platforms.ActiveCfg = Debug|Any CPU - {644F73A6-7EA0-456D-B7BC-22F44B851812}.DebugRemote|Mixed Platforms.Build.0 = Debug|Any CPU - {644F73A6-7EA0-456D-B7BC-22F44B851812}.DebugRemote|x86.ActiveCfg = Debug|Any CPU - {644F73A6-7EA0-456D-B7BC-22F44B851812}.DebugRemote|x86.Build.0 = Debug|Any CPU - {644F73A6-7EA0-456D-B7BC-22F44B851812}.Release|.NET.ActiveCfg = Release|Any CPU - {644F73A6-7EA0-456D-B7BC-22F44B851812}.Release|.NET.Build.0 = Release|Any CPU - {644F73A6-7EA0-456D-B7BC-22F44B851812}.Release|Any CPU.ActiveCfg = Release|Any CPU - {644F73A6-7EA0-456D-B7BC-22F44B851812}.Release|Any CPU.Build.0 = Release|Any CPU - {644F73A6-7EA0-456D-B7BC-22F44B851812}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {644F73A6-7EA0-456D-B7BC-22F44B851812}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {644F73A6-7EA0-456D-B7BC-22F44B851812}.Release|x86.ActiveCfg = Release|Any CPU - {644F73A6-7EA0-456D-B7BC-22F44B851812}.Release|x86.Build.0 = Release|Any CPU {95342759-C161-4A44-8130-9740E57FE3A1}.Debug|.NET.ActiveCfg = Debug|Any CPU {95342759-C161-4A44-8130-9740E57FE3A1}.Debug|.NET.Build.0 = Debug|Any CPU {95342759-C161-4A44-8130-9740E57FE3A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU @@ -11540,7 +11488,6 @@ Global {062698EA-8477-4F07-BF2A-CE4FAE4DCFA3} = {D8A691C5-146D-4613-86CC-438F02FE9106} {DB03F765-7CE2-40A6-B469-BCEBE61ACF9E} = {D8A691C5-146D-4613-86CC-438F02FE9106} {25AE0253-30AC-4E85-9FA4-2F8FADA62787} = {D8A691C5-146D-4613-86CC-438F02FE9106} - {491FE69C-49BF-4003-85CE-755DE9C99E7C} = {D8A691C5-146D-4613-86CC-438F02FE9106} {FE709CF1-6579-4A69-8E43-5C3BF7BD96D7} = {D8A691C5-146D-4613-86CC-438F02FE9106} {4ACCB582-3B1C-42E8-B658-9D506B8620AD} = {D8A691C5-146D-4613-86CC-438F02FE9106} {FE14BABA-B6FD-47C8-BB38-DD4479EADA39} = {D8A691C5-146D-4613-86CC-438F02FE9106} @@ -11741,7 +11688,6 @@ Global {8404C9FB-662A-4676-8454-64ED3CED2014} = {D8A691C5-146D-4613-86CC-438F02FE9106} {D2821E8E-76BE-4865-B5B3-381457BB5D71} = {D8A691C5-146D-4613-86CC-438F02FE9106} {22E7F5F8-BB34-4243-896B-221F78837F83} = {D8A691C5-146D-4613-86CC-438F02FE9106} - {644F73A6-7EA0-456D-B7BC-22F44B851812} = {D8A691C5-146D-4613-86CC-438F02FE9106} {95342759-C161-4A44-8130-9740E57FE3A1} = {D8A691C5-146D-4613-86CC-438F02FE9106} {1D72670D-FC74-4806-B6B8-847BB01718B9} = {D8A691C5-146D-4613-86CC-438F02FE9106} {BEAE2DED-A98E-4EF9-8390-A2432CF88E8B} = {D8A691C5-146D-4613-86CC-438F02FE9106} diff --git a/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user b/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user index e261725c0..11a6c3e60 100644 --- a/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user +++ b/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user @@ -1,4 +1,4 @@ - + false diff --git a/BeWoPlanerMobil/Controllers/DevExpressSchedulerController.cs b/BeWoPlanerMobil/Controllers/DevExpressSchedulerController.cs index 3d19afac8..d5efe7300 100644 --- a/BeWoPlanerMobil/Controllers/DevExpressSchedulerController.cs +++ b/BeWoPlanerMobil/Controllers/DevExpressSchedulerController.cs @@ -16,27 +16,19 @@ namespace BeWoPlanerMobil.Controllers { get { - if (!MobileSessionFacade.IsUserLoggedIn()) + if(false == MobileSessionFacade.IsUserLoggedIn()) { Logout(); return null; } - if (_Model == null) + if(_Model != null) { - _Model = new DevExpressSchedulerModel(); - InitModel(_Model); + return _Model; } - //if (((DevExpressSchedulerModel)Session["DevExpressSchedulerModel"])?.LoggedInEmployee is null) - //{ - // _Model = new DevExpressSchedulerModel(); - // InitModel(_Model); - // Session["DevExpressSchedulerModel"] = _Model; - //} - //else - //{ - // _Model = (DevExpressSchedulerModel)Session["DevExpressSchedulerModel"]; - //} + + _Model = new DevExpressSchedulerModel(); + InitModel(_Model); return _Model; } @@ -45,14 +37,14 @@ namespace BeWoPlanerMobil.Controllers [Authorize] public ActionResult DevExpressScheduler() { - if (!MobileSessionFacade.IsUserLoggedIn() || Model == null) + if(!MobileSessionFacade.IsUserLoggedIn() || Model == null) { return RedirectToActionPermanent("Index", "Login"); } var appointments = KalenderService.LoadFilteredAppointments( true, - Model?.LoggedInEmployee?.EmployeeOid ?? 1, + Model.LoggedInEmployee?.EmployeeOid ?? 1, DateTime.Today.AddDays(-60), DateTime.Today.AddDays(60), new List(), @@ -66,6 +58,8 @@ namespace BeWoPlanerMobil.Controllers Model.Appointments = appointments; + Model.Resources = new List(); + return View(Model); } diff --git a/BeWoPlanerMobil/Controllers/MainController.cs b/BeWoPlanerMobil/Controllers/MainController.cs index 7aae2f4a3..f7d959929 100644 --- a/BeWoPlanerMobil/Controllers/MainController.cs +++ b/BeWoPlanerMobil/Controllers/MainController.cs @@ -2,7 +2,6 @@ using BeWo.Data.Entities; using BeWo.Service.DCEntityMapper; using BeWo.Service.Plugins; -using BeWo.Service.ServiceImplementations; using BeWo.View.Navigation.Filter; using BeWoPlanerMobil.Models; using BeWoPlanerMobil.Service; @@ -15,7 +14,6 @@ using BS.Shared.Extensions; using BS.Shared.Services; using DevExpress.XtraScheduler; using DevExpress.XtraScheduler.Compatibility; -using DevExpress.XtraScheduler.Native; using Newtonsoft.Json; using System; using System.Collections.Generic; @@ -95,28 +93,27 @@ namespace BeWoPlanerMobil.Controllers Model.GroupsOfPeople = EmployeeService.GetAllGroups(LoggedInEmployee.EmployeeOid).OrderBy(gop => gop.Name).ToList(); Model.Dokutypes = ValueListService.GetAllValueListEntrysByType(ValueListEntryType.DocumentType); - if (Model.Dokutypes != null) + if(Model.Dokutypes != null) { Model.Dokutypes = Model.Dokutypes.OrderBy(s => s.ValueListEntryOid).ToArray(); } //Load Employees - if (Model.AllEmployees is null) + if(Model.AllEmployees is null) { - //Model.AllEmployees = EmployeeService.GetAllActiveEmployeesCompact().OrderBy(e => e.LastName).ToList(); Model.AllEmployees = EmployeeService.GetAllCompactEmployees().Where(e => e.ActivationType == ActivationTypeId.Active).OrderBy(e => e.LastName).ToList(); } - if (Model.EmployeesForGroupAndMultiBooking is null) + if(Model.EmployeesForGroupAndMultiBooking is null) { Model.EmployeesForGroupAndMultiBooking = Model.AllEmployees; } - if (LoggedInUser.HasRight(UserRightType.ServiceRecord_AllowCreationForOtherEmployees)) + if(LoggedInUser.HasRight(UserRightType.ServiceRecord_AllowCreationForOtherEmployees)) { Model.Employees = Model.AllEmployees; } - else if (LoggedInUser.HasRight(UserRightType.ServiceRecord_AllowCreationForOtherTeamMember) && Model.LoggedInEmployee.EmployeeOid != null) + else if(LoggedInUser.HasRight(UserRightType.ServiceRecord_AllowCreationForOtherTeamMember) && Model.LoggedInEmployee.EmployeeOid != null) { Model.Employees = EmployeeService.GetAllTeamMember(LoggedInUser.Employee).Where(e => e.ActivationType == ActivationTypeId.Active).ToList(); } @@ -138,9 +135,9 @@ namespace BeWoPlanerMobil.Controllers public void CreateModelSupportConceptListObjects(bool forceReload) { //Load SupportConcepts - if (Model.SupportConceptListObjects == null || Model.SupportConceptListObjects.Count == 0 || forceReload || (Model.SelectedCostBearerSupportConceptOid.HasValue && Model.SelectedCostBearerSupportConceptOid.Value != -1)) + if(Model.SupportConceptListObjects is null || Model.SupportConceptListObjects.Count == 0 || forceReload || (Model.SelectedCostBearerSupportConceptOid.HasValue && Model.SelectedCostBearerSupportConceptOid.Value != -1)) { - if (Model.LoggedInEmployee?.EmployeeOid.HasValue ?? false) + if(Model.LoggedInEmployee?.EmployeeOid.HasValue ?? false) { //Model.SupportConcepts = new List(); @@ -153,21 +150,16 @@ namespace BeWoPlanerMobil.Controllers Model.SupportConcepts = new List(); } - if (Model.ShowExpiredSupportConcepts == false) + if(Model.ShowExpiredSupportConcepts == false) { - Model.SupportConcepts = Model.SupportConcepts.Where(sc => - { - var endDate = sc.EndDate; - - return endDate is null || endDate.Value >= DateTime.Now.Date; - }).ToList(); + Model.SupportConcepts = Model.SupportConcepts.Where(sc => sc.EndDate is null || sc.EndDate.Value >= DateTime.Now.Date).ToList(); } - foreach (var sc in Model.SupportConcepts) + foreach(var supportConcept in Model.SupportConcepts) { - if (sc.Goals == null) + if(supportConcept.Goals is null) { - sc.Goals = new List(); + supportConcept.Goals = new List(); } } //Einfachbuchung @@ -190,8 +182,8 @@ namespace BeWoPlanerMobil.Controllers { foreach (var cb in sc.CostBearerList) { - String customerName = $"{sc.Customer.SimpleDescription} {(sc.Customer.DateOfBirth.HasValue ? "*" + sc.Customer.DateOfBirth.Value.ToString("dd.MM.yyyy") : string.Empty)}"; - String scNameSingle = $"{cb.Bezeichnung} {sc.StartDate?.ToShortDateString().Remove(6, 2) ?? string.Empty}-{sc.EndDate?.ToShortDateString().Remove(6, 2) ?? string.Empty} {cb.OrganisationName}"; // {Model.GetIsNotApproved(sc)}"; + var customerName = $"{sc.Customer.SimpleDescription} {(sc.Customer.DateOfBirth.HasValue ? "*" + sc.Customer.DateOfBirth.Value.ToString("dd.MM.yyyy") : string.Empty)}"; + var scNameSingle = $"{cb.Bezeichnung} {sc.StartDate?.ToShortDateString().Remove(6, 2) ?? string.Empty}-{sc.EndDate?.ToShortDateString().Remove(6, 2) ?? string.Empty} {cb.OrganisationName}"; // {Model.GetIsNotApproved(sc)}"; scNameSingle = sc.CostBearer; allCostBearerRelationsMultiBooking.Add(new MokSupportConceptListObject(sc.SupportConceptOid, sc.CostBearerRelOids[0], sc.IsAboutToExpire, sc.ExpiresIn3MonthOrLess) @@ -217,8 +209,6 @@ namespace BeWoPlanerMobil.Controllers private void SetSelectedObjects() { - - Model.SelectedEmployee = Model.SelectedEmployeeOid.HasValue ? Model.AllEmployees.First(f => f.EmployeeOid.Equals(Model.SelectedEmployeeOid.Value)) : LoggedInUser.Employee; @@ -257,25 +247,24 @@ namespace BeWoPlanerMobil.Controllers Model.HasAnyRatingTypes = Model.HasRightToRateGoals && Model.GoalRatingTypes.Any(); - if (Model.GroupBookingSelectedCostBearerSupportConceptOids.Count > 0) + if(Model.GroupBookingSelectedCostBearerSupportConceptOids.Count > 0) { Model.GroupBookingSelectedCostBearerSupportConcepts = CustomerService.GetSupportConceptCostBearerRelationsById(Model.GroupBookingSelectedCostBearerSupportConceptOids); } Model.GroupBookingSelectedEmployees = Model.AllEmployees.Where(employee => Model.GroupBookingSelectedEmployeeOids.Contains(employee.EmployeeOid)).ToList(); - //Model.Group = Model.SupportConceptListObjectsForGroupBooking.Where(s => Model.GroupBookingSelectedSupportConceptOids.Contains(s.SupportConceptOid.Value)).ToList(); - if (Model.SelectedCostBearerSupportConceptOid.HasValue && Model.SelectedCostBearerSupportConceptOid != -1) + if(Model.SelectedCostBearerSupportConceptOid.HasValue && Model.SelectedCostBearerSupportConceptOid != -1) { LoadSupportConceptThings(Model.SelectedCostBearerSupportConceptOid, true); LoadPaginatedServiceRecordsToModel(Model.CurrentPage); } - else if (Model.IsInGroupBookingMode || Model.IsInMultiBookingMode) + else if(Model.IsInGroupBookingMode || Model.IsInMultiBookingMode) { LoadSupportConceptThings(null, true); } - if (Model.AllGoals != null) + if(Model.AllGoals != null) { if (Model.SelectedGoals.Count == 0 && Model.SelectedGoalOids.Count > 0) // Diese Abfrage muss bleiben, sonst werden vorher gewählte Bewertungen überschrieben { @@ -284,11 +273,10 @@ namespace BeWoPlanerMobil.Controllers } - if (Model.IsInEditingMode && Model.SelectedServiceRecordOid.HasValue) + if(Model.IsInEditingMode && Model.SelectedServiceRecordOid.HasValue) { Model.SelectedServiceRecord = Model.ServiceRecords.FirstOrDefault(sr => sr.ServiceRecordOid.Equals(Model.SelectedServiceRecordOid.Value)); } - } private void InitSettings() @@ -2110,10 +2098,14 @@ namespace BeWoPlanerMobil.Controllers private void LoadServiceCategoriesToModel(List infos) { - Model.Categories2Descriptions = new Dictionary>(); - - if (infos != null && infos.Count > 0) + + if(infos is null) + { + infos = new List(); + } + + if(infos.Count > 0) { Model.Categories2Descriptions = CreateServiceCategory2ServiceDescription(infos); } @@ -2121,7 +2113,6 @@ namespace BeWoPlanerMobil.Controllers { //Sonst ohne Hilfeplan var allServiceDescriptions = OperationsService.GetAllServiceDescriptions(); - allServiceDescriptions.AsParallel().DoForEach(serviceDescription => { @@ -2130,7 +2121,6 @@ namespace BeWoPlanerMobil.Controllers Model.Categories2Descriptions.AddOrUpdateValueInDictionary(serviceDescription.Category, serviceDescription); } }); - } SelectFirstServiceDescription(); @@ -2138,21 +2128,21 @@ namespace BeWoPlanerMobil.Controllers private void SelectFirstServiceDescription() { - if (Model?.Categories2Descriptions is null || Model.Categories2Descriptions.Count == 0) + if(Model?.Categories2Descriptions is null || Model.Categories2Descriptions.Count == 0) { UpdateSelectedServiceCategorieAndDescription(null, null); return; } //Nur, wenn Kategorie und Leistung null sind oder nicht in der Liste alle Kategorien enthalten sind, soll weiter unten die erste Leistung in der Liste gesetzt werden - if (Model.SelectedServiceCategoryOid.HasValue && Model.SelectedServiceDescriptionOid.HasValue) + if(Model.SelectedServiceCategoryOid.HasValue && Model.SelectedServiceDescriptionOid.HasValue) { - var cat = Model.Categories2Descriptions.Keys.Where(c => c.ServiceCategoryOid == Model.SelectedServiceCategoryOid).FirstOrDefault(); - if (cat != null) + var cat = Model.Categories2Descriptions.Keys.FirstOrDefault(c => c.ServiceCategoryOid == Model.SelectedServiceCategoryOid); + if(cat != null) { - var desc = Model.Categories2Descriptions[cat].Where(d => d.ServiceDescriptionOid == Model.SelectedServiceDescriptionOid).FirstOrDefault(); + var desc = Model.Categories2Descriptions[cat].FirstOrDefault(d => d.ServiceDescriptionOid == Model.SelectedServiceDescriptionOid); - if (desc != null) + if(desc != null) { //Setzte Objekte im Model, sonst wird unten die erste Leistung gesetzt Model.SelectedServiceCategory = cat; @@ -2163,8 +2153,6 @@ 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 is null) @@ -2187,7 +2175,6 @@ namespace BeWoPlanerMobil.Controllers Model.SelectedServiceDescriptionOid = Model.SelectedServiceDescription?.ServiceDescriptionOid; } - private Dictionary> CreateServiceCategory2ServiceDescription(List nodes) { var result = new Dictionary>(); @@ -3274,10 +3261,10 @@ namespace BeWoPlanerMobil.Controllers } [Authorize] - public ActionResult RedirectToDebuggingTools() + public ActionResult RedirectToDevTools() { #if DEBUG - return RedirectToActionPermanent("DebuggingTools", "DebuggingTools"); + return RedirectToActionPermanent("DevTools", "DevTools"); #endif return RedirectToMain(); } diff --git a/BeWoPlanerMobil/Controllers/ReportViewerController.cs b/BeWoPlanerMobil/Controllers/ReportViewerController.cs index a3682d914..9d6d543a4 100644 --- a/BeWoPlanerMobil/Controllers/ReportViewerController.cs +++ b/BeWoPlanerMobil/Controllers/ReportViewerController.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Web.Mvc; +using BeWo.Data.Entities; using BeWo.Report; using BeWo.Service.Plugins; using BeWo.View.Navigation.Filter; @@ -173,10 +174,7 @@ namespace BeWoPlanerMobil.Controllers Model.AllTeamsForQueries = EmployeeService.GetAllActiveCompactTeamsForEmployee(null); Model.AllServiceCategoriesForQueries = OperationsService.GetAllServiceCategories(); - - } - #endif if (Model.HasRightToViewMitarbeiterstundenkonto) @@ -187,8 +185,6 @@ namespace BeWoPlanerMobil.Controllers Value = "1" }); } - - #if !DEBUG Model.SelectedReportType = ReportType.Mitarbeiterstundenkonto; #endif @@ -585,6 +581,11 @@ namespace BeWoPlanerMobil.Controllers [Authorize] public ActionResult SelectQueryParameter(long? objectOid, int parameterType, long? parameterOid, string textValue) { + if(Model?.SelectedQueryOid.HasValue ?? false) + { + Model.SelectedQuery = Model.Queries.FirstOrDefault(q => q.Oid.Equals(Model.SelectedQueryOid.Value)); + } + if(Model?.SelectedQuery is null) { TempData[TempDataConstants.DoLogoutKey] = true; diff --git a/BeWoPlanerMobil/Controllers/SchedulerController.cs b/BeWoPlanerMobil/Controllers/SchedulerController.cs index 3fb1047c2..4cb90f93e 100644 --- a/BeWoPlanerMobil/Controllers/SchedulerController.cs +++ b/BeWoPlanerMobil/Controllers/SchedulerController.cs @@ -731,9 +731,9 @@ namespace BeWoPlanerMobil.Controllers var durationString = formCollection["Duration"]; var intervalStartDateString = formCollection["IntervalStart"].Substring(0, 10); - var intervalStartTimeString = formCollection["IntervalStartTime"]; + var intervalStartTimeString = formCollection["IntervalStart"].Substring(11, 5); var intervalEndDateString = formCollection["IntervalEnd"].Substring(0, 10); - var intervalEndTimeString = formCollection["IntervalEndTime"]; + var intervalEndTimeString = formCollection["IntervalEnd"].Substring(11, 5); if(int.TryParse(durationString, out var intervalDuration) && DateTime.TryParse($"{intervalStartDateString} {intervalStartTimeString}", out var intervalStart) && DateTime.TryParse($"{intervalEndDateString} {intervalEndTimeString}", out var intervalEnd) && Model.LoggedInEmployee.EmployeeOid.HasValue) { diff --git a/BeWoPlanerMobil/Models/DevExpressSchedulerModel.cs b/BeWoPlanerMobil/Models/DevExpressSchedulerModel.cs index b99ff5d2e..8be77a67b 100644 --- a/BeWoPlanerMobil/Models/DevExpressSchedulerModel.cs +++ b/BeWoPlanerMobil/Models/DevExpressSchedulerModel.cs @@ -7,6 +7,7 @@ namespace BeWoPlanerMobil.Models { public IEnumerable Appointments { get; set; } public IEnumerable Resources { get; set; } + public string Type { get; set; } } public class CustomAppointmentTemplateContainer : AppointmentFormTemplateContainer diff --git a/BeWoPlanerMobil/Models/MainModel.cs b/BeWoPlanerMobil/Models/MainModel.cs index dc0c17716..3610906be 100644 --- a/BeWoPlanerMobil/Models/MainModel.cs +++ b/BeWoPlanerMobil/Models/MainModel.cs @@ -268,6 +268,12 @@ namespace BeWoPlanerMobil.Models set => MainSessionModel.LastCreatedServiceRecordOid = value; } + public List SupportConceptOids + { + get => MainSessionModel.SupportConceptOids; + set => MainSessionModel.SupportConceptOids = value; + } + public List SupportConcepts { get; set; } public List Textbausteine { get; set; } = new List(); diff --git a/BeWoPlanerMobil/Models/MainSessionModel.cs b/BeWoPlanerMobil/Models/MainSessionModel.cs index 3a9ed460d..717553c6c 100644 --- a/BeWoPlanerMobil/Models/MainSessionModel.cs +++ b/BeWoPlanerMobil/Models/MainSessionModel.cs @@ -37,6 +37,7 @@ namespace BeWoPlanerMobil.Models public IList SupportConceptListObjects { get; internal set; } public bool IsInTransferMode { get; internal set; } public IList SelectedGoals { get; internal set; } + public List SupportConceptOids { get; set; } public void ResetValues() { @@ -81,6 +82,8 @@ namespace BeWoPlanerMobil.Models TransferringAppointmentOid = null; SupportConceptListObjects = new List(); SelectedGoals = new List(); + + SupportConceptOids = new List(); } } } \ No newline at end of file diff --git a/BeWoPlanerMobil/Models/ReportViewerModel.cs b/BeWoPlanerMobil/Models/ReportViewerModel.cs index 3291b8733..d9eb1d018 100644 --- a/BeWoPlanerMobil/Models/ReportViewerModel.cs +++ b/BeWoPlanerMobil/Models/ReportViewerModel.cs @@ -167,7 +167,11 @@ namespace BeWoPlanerMobil.Models //public List SelectedEmployees { get; set; } //public List SelectedTeams { get; set; } - public long? SelectedQueryOid { get { return ReportViewerSessionModel.SelectedQueryOid; } set { ReportViewerSessionModel.SelectedQueryOid = value; } } + public long? SelectedQueryOid + { + get => ReportViewerSessionModel.SelectedQueryOid; + set => ReportViewerSessionModel.SelectedQueryOid = value; + } public QueryDC SelectedQuery { get; set; } diff --git a/BeWoPlanerMobil/Views/Customer/CustomerBargeldkassen.cshtml b/BeWoPlanerMobil/Views/Customer/CustomerBargeldkassen.cshtml index e3d5ffd9b..065bbd980 100644 --- a/BeWoPlanerMobil/Views/Customer/CustomerBargeldkassen.cshtml +++ b/BeWoPlanerMobil/Views/Customer/CustomerBargeldkassen.cshtml @@ -405,13 +405,13 @@ var kassenbestand = ((bargeldkasse.Anfangsbestand ?? 0m) + einzahlungen - auszahlungen).ToString("0.00 €"); - var startDate = DateTime.Today.GetFirstOfMonth().ToString("dd.MM.yyyy"); - var endDate = DateTime.Today.GetLastOfMonth().ToString("dd.MM.yyyy"); + var startDate = DateTime.Today.GetFirstOfMonth().ToString("yyyy-MM-dd"); + var endDate = DateTime.Today.GetLastOfMonth().ToString("yyyy-MM-dd"); }
-
+
@*----- Startdatum, Enddatum und Stichtag -----*@ -
-
-
-
-
-
- Startdatum -
-
- -
-
- -
-
-
-
-
+
+
+
+
+ + Startdatum + +
+ +
+
-
-
-
-
-
- Enddatum -
-
- -
-
- -
-
-
-
-
+
+
+
+ + Enddatum + +
+ +
+
-
-
-
-
-
- Stichtag -
-
- -
-
- -
-
-
-
-
+
+
+
+ + Stichtag + +
+ +
+
@*----- Kassenbestand und Anfangsbestand -----*@ @@ -537,7 +505,7 @@
- +
@{ var count = 0; @@ -551,7 +519,7 @@
-
+
@if(transaktion.SignatureOid is null) {