diff --git a/BeWoPlanerMobil.sln b/BeWoPlanerMobil.sln index 036a7f5a1..0dcc5d657 100644 --- a/BeWoPlanerMobil.sln +++ b/BeWoPlanerMobil.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.14.36408.4 d17.14 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31729.503 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BeWoPlanerMobil", "BeWoPlanerMobil\BeWoPlanerMobil.csproj", "{284B02ED-114A-426C-9162-31BB6CF05589}" EndProject @@ -25,7 +25,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HausDuelken", "ReportImp\Ha EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FeidPartnerReports", "ReportImp\FeidPartnerReports\FeidPartnerReports.csproj", "{36E7D251-2F15-4589-81C2-6BDDC67F16AE}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Host", "Host\Host.csproj", "{E1154C7B-BB77-4155-9854-DAD8FC5A8BC3}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PaSMoenchengladbach", "ReportImp\PaSMoenchengladbach\PaSMoenchengladbach.csproj", "{EA3C4BE1-6128-4FC9-8194-3C4202233371}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -94,12 +94,12 @@ Global {36E7D251-2F15-4589-81C2-6BDDC67F16AE}.DebugRemote|Any CPU.Build.0 = DebugRemote|Any CPU {36E7D251-2F15-4589-81C2-6BDDC67F16AE}.Release|Any CPU.ActiveCfg = Release|Any CPU {36E7D251-2F15-4589-81C2-6BDDC67F16AE}.Release|Any CPU.Build.0 = Release|Any CPU - {E1154C7B-BB77-4155-9854-DAD8FC5A8BC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E1154C7B-BB77-4155-9854-DAD8FC5A8BC3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E1154C7B-BB77-4155-9854-DAD8FC5A8BC3}.DebugRemote|Any CPU.ActiveCfg = Debug|Any CPU - {E1154C7B-BB77-4155-9854-DAD8FC5A8BC3}.DebugRemote|Any CPU.Build.0 = Debug|Any CPU - {E1154C7B-BB77-4155-9854-DAD8FC5A8BC3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E1154C7B-BB77-4155-9854-DAD8FC5A8BC3}.Release|Any CPU.Build.0 = Release|Any CPU + {EA3C4BE1-6128-4FC9-8194-3C4202233371}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EA3C4BE1-6128-4FC9-8194-3C4202233371}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EA3C4BE1-6128-4FC9-8194-3C4202233371}.DebugRemote|Any CPU.ActiveCfg = Debug|Any CPU + {EA3C4BE1-6128-4FC9-8194-3C4202233371}.DebugRemote|Any CPU.Build.0 = Debug|Any CPU + {EA3C4BE1-6128-4FC9-8194-3C4202233371}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EA3C4BE1-6128-4FC9-8194-3C4202233371}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -108,6 +108,7 @@ Global {FC9F4E38-977B-4877-9E05-D04068D3C807} = {30DD24EE-2ED9-4E31-BCB5-AD995E8541BD} {ED3DBD24-B774-41E5-A856-99FF78D828A8} = {30DD24EE-2ED9-4E31-BCB5-AD995E8541BD} {36E7D251-2F15-4589-81C2-6BDDC67F16AE} = {30DD24EE-2ED9-4E31-BCB5-AD995E8541BD} + {EA3C4BE1-6128-4FC9-8194-3C4202233371} = {30DD24EE-2ED9-4E31-BCB5-AD995E8541BD} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {75267284-7070-4045-9FC8-0FC3C56C1AD3} diff --git a/BeWoPlanerMobil/Controllers/AbstractBaseController.cs b/BeWoPlanerMobil/Controllers/AbstractBaseController.cs index 80733ca9f..2fd327997 100644 --- a/BeWoPlanerMobil/Controllers/AbstractBaseController.cs +++ b/BeWoPlanerMobil/Controllers/AbstractBaseController.cs @@ -154,6 +154,16 @@ namespace BeWoPlanerMobil.Controllers public abstract string SaveCollapsibleStatus(bool isOpen, string identifier); + public string SaveCollapsibleStatusToModel(AbstractModel model, bool isOpen, string identifier) + { + if (model?.Collapsibles2IsShown != null) + { + model.Collapsibles2IsShown[identifier] = isOpen; + } + + return LeerzeichenFuerGetMethoden; + } + public ActionResult Error() { #if DEBUG diff --git a/BeWoPlanerMobil/Controllers/CustomerController.cs b/BeWoPlanerMobil/Controllers/CustomerController.cs index d7bd42ba0..8c82ded8b 100644 --- a/BeWoPlanerMobil/Controllers/CustomerController.cs +++ b/BeWoPlanerMobil/Controllers/CustomerController.cs @@ -1443,9 +1443,7 @@ namespace BeWoPlanerMobil.Controllers [Authorize] public override string SaveCollapsibleStatus(bool isOpen, string identifier) { - Model.Collapsibles2IsShown[identifier] = isOpen; - - return LeerzeichenFuerGetMethoden; + return SaveCollapsibleStatusToModel(Model, isOpen, identifier); } } diff --git a/BeWoPlanerMobil/Controllers/DevExpressSchedulerController.cs b/BeWoPlanerMobil/Controllers/DevExpressSchedulerController.cs index 4a5f6c2a4..801b71f6d 100644 --- a/BeWoPlanerMobil/Controllers/DevExpressSchedulerController.cs +++ b/BeWoPlanerMobil/Controllers/DevExpressSchedulerController.cs @@ -87,9 +87,7 @@ namespace BeWoPlanerMobil.Controllers [Authorize] public override string SaveCollapsibleStatus(bool isOpen, string identifier) { - Model.Collapsibles2IsShown[identifier] = isOpen; - - return LeerzeichenFuerGetMethoden; + return SaveCollapsibleStatusToModel(Model, isOpen, identifier); } } } \ No newline at end of file diff --git a/BeWoPlanerMobil/Controllers/DevToolsController.cs b/BeWoPlanerMobil/Controllers/DevToolsController.cs index 23f9c131b..1fd7cfa8c 100644 --- a/BeWoPlanerMobil/Controllers/DevToolsController.cs +++ b/BeWoPlanerMobil/Controllers/DevToolsController.cs @@ -63,9 +63,7 @@ namespace BeWoPlanerMobil.Controllers [Authorize] public override string SaveCollapsibleStatus(bool isOpen, string identifier) { - Model.Collapsibles2IsShown[identifier] = isOpen; - - return LeerzeichenFuerGetMethoden; + return SaveCollapsibleStatusToModel(Model, isOpen, identifier); } private Faker _AddressFaker = new Faker("de"); diff --git a/BeWoPlanerMobil/Controllers/MainController.cs b/BeWoPlanerMobil/Controllers/MainController.cs index 0a71a17a7..dd818c4b3 100644 --- a/BeWoPlanerMobil/Controllers/MainController.cs +++ b/BeWoPlanerMobil/Controllers/MainController.cs @@ -5114,9 +5114,7 @@ namespace BeWoPlanerMobil.Controllers return LeerzeichenFuerGetMethoden; } - Model.Collapsibles2IsShown[identifier] = isOpen; - - return LeerzeichenFuerGetMethoden; + return SaveCollapsibleStatusToModel(Model, isOpen, identifier); } [Authorize] diff --git a/BeWoPlanerMobil/Controllers/ReportController.cs b/BeWoPlanerMobil/Controllers/ReportController.cs index 2fcaba04b..ffa750c79 100644 --- a/BeWoPlanerMobil/Controllers/ReportController.cs +++ b/BeWoPlanerMobil/Controllers/ReportController.cs @@ -1003,7 +1003,10 @@ namespace BeWoPlanerMobil.Controllers } var s = Model.QuittierungsbelegsReportSettings; - var report = Model.ReportCreator.CreateServiceOverviewReportNew(s.Month, s.Year, s.FilterEnum, s.CustomerOid, s.TeamOid, s.EmployeeOid, s.OrganisationOid, s.ServiceCategoryOid, s.StartDay, s.EndDay, false); + DateTime startDate = new DateTime(s.Year, s.Month, s.StartDay); + DateTime endDate = new DateTime(s.Year, s.Month, s.EndDay); + + var report = Model.ReportCreator.CreateServiceOverviewReportNew(s.FilterEnum, s.CustomerOid, s.TeamOid, s.EmployeeOid, s.OrganisationOid, s.ServiceCategoryOid, startDate, endDate, false); report.ExportOptions.PrintPreview.DefaultFileName = CreateFileName(); report.DisplayName = CreateFileName(); @@ -1377,9 +1380,7 @@ namespace BeWoPlanerMobil.Controllers [Authorize] public override string SaveCollapsibleStatus(bool isOpen, string identifier) { - Model.Collapsibles2IsShown[identifier] = isOpen; - - return LeerzeichenFuerGetMethoden; + return SaveCollapsibleStatusToModel(Model, isOpen, identifier); } } diff --git a/BeWoPlanerMobil/Controllers/ReportViewerController.cs b/BeWoPlanerMobil/Controllers/ReportViewerController.cs index 276bcaabc..e6f982bdd 100644 --- a/BeWoPlanerMobil/Controllers/ReportViewerController.cs +++ b/BeWoPlanerMobil/Controllers/ReportViewerController.cs @@ -805,9 +805,7 @@ namespace BeWoPlanerMobil.Controllers [Authorize] public override string SaveCollapsibleStatus(bool isOpen, string identifier) { - Model.Collapsibles2IsShown[identifier] = isOpen; - - return LeerzeichenFuerGetMethoden; + return SaveCollapsibleStatusToModel(Model, isOpen, identifier); } } } \ No newline at end of file diff --git a/BeWoPlanerMobil/Controllers/SchedulerController.cs b/BeWoPlanerMobil/Controllers/SchedulerController.cs index f43d57cf4..9f81d1594 100644 --- a/BeWoPlanerMobil/Controllers/SchedulerController.cs +++ b/BeWoPlanerMobil/Controllers/SchedulerController.cs @@ -1444,9 +1444,7 @@ namespace BeWoPlanerMobil.Controllers [Authorize] public override string SaveCollapsibleStatus(bool isOpen, string identifier) { - Model.Collapsibles2IsShown[identifier] = isOpen; - - return LeerzeichenFuerGetMethoden; + return SaveCollapsibleStatusToModel(Model, isOpen, identifier); } } } diff --git a/BeWoPlanerMobil/Views/Customer/CustomerAbsenceTimePartial.cshtml b/BeWoPlanerMobil/Views/Customer/CustomerAbsenceTimePartial.cshtml index be5b8f9c6..4ce899de4 100644 --- a/BeWoPlanerMobil/Views/Customer/CustomerAbsenceTimePartial.cshtml +++ b/BeWoPlanerMobil/Views/Customer/CustomerAbsenceTimePartial.cshtml @@ -61,7 +61,7 @@ } -@foreach(var absenceTime in Model.SelectedCustomer.AbsenceTimes.OrderBy(at => at.Start)) +@foreach(var absenceTime in Model.SelectedCustomer.AbsenceTimes.OrderByDescending(at => at.Start)) { if(absenceTime.Start is null) { diff --git a/BeWoPlanerMobil/Views/Main/Main.cshtml b/BeWoPlanerMobil/Views/Main/Main.cshtml index 581f8b32d..9938dca2a 100644 --- a/BeWoPlanerMobil/Views/Main/Main.cshtml +++ b/BeWoPlanerMobil/Views/Main/Main.cshtml @@ -60,7 +60,7 @@ function validatePasswordStrength() { try{ - (new window.MoKPasswordSecurity("pw-strength-feedback")).validatePassword($("#new-password").val()); + (new MoKPasswordSecurity("pw-strength-feedback")).validatePassword($("#new-password").val()); } catch(error) { window.showErrorPopup(error); }