diff --git a/BeWo/Scheduler/View/NewSchedulerView.xaml.cs b/BeWo/Scheduler/View/NewSchedulerView.xaml.cs index 50b353f73..e1f670e14 100644 --- a/BeWo/Scheduler/View/NewSchedulerView.xaml.cs +++ b/BeWo/Scheduler/View/NewSchedulerView.xaml.cs @@ -2138,7 +2138,7 @@ namespace BeWo.Scheduler.View if(oid != null) { - appointmentToOpen = apps.Find(app => + appointmentToOpen = apps.FirstOrDefault(app => { var oidValue = app.CF_SchedulerAppointmentOid(); @@ -2153,7 +2153,7 @@ namespace BeWo.Scheduler.View } else if(_SelectedAppointmentFromHomePanelView.RecurrenceId != null && _SelectedAppointmentFromHomePanelView.RecurrenceIndex > 0) { - appointmentToOpen = apps.Find(appointment => appointment.RecurrenceInfo.Id.ToString().Equals(_SelectedAppointmentFromHomePanelView.RecurrenceId)); + appointmentToOpen = apps.FirstOrDefault(appointment => appointment.RecurrenceInfo.Id.ToString().Equals(_SelectedAppointmentFromHomePanelView.RecurrenceId)); if(appointmentToOpen != null) { diff --git a/BeWo/View/Detail/CustomerView.xaml b/BeWo/View/Detail/CustomerView.xaml index 35865cf0f..ebbc9036d 100644 --- a/BeWo/View/Detail/CustomerView.xaml +++ b/BeWo/View/Detail/CustomerView.xaml @@ -897,7 +897,7 @@ - + @@ -1111,7 +1111,7 @@ - + diff --git a/BeWoPlanerMobil/BeWoPlanerMobil.csproj b/BeWoPlanerMobil/BeWoPlanerMobil.csproj index d56dc58d1..022df8fa3 100644 --- a/BeWoPlanerMobil/BeWoPlanerMobil.csproj +++ b/BeWoPlanerMobil/BeWoPlanerMobil.csproj @@ -4476,7 +4476,7 @@ - + @@ -4652,21 +4652,21 @@ - + - + - - - - - - - - + + + + + + + + @@ -4676,10 +4676,10 @@ - - - - + + + + Designer @@ -4699,7 +4699,7 @@ - + @@ -5084,6 +5084,10 @@ + + + + 10.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) diff --git a/BeWoPlanerMobil/Controllers/CustomerController.cs b/BeWoPlanerMobil/Controllers/CustomerController.cs index df6239ff1..a156e3946 100644 --- a/BeWoPlanerMobil/Controllers/CustomerController.cs +++ b/BeWoPlanerMobil/Controllers/CustomerController.cs @@ -113,7 +113,10 @@ namespace BeWoPlanerMobil.Controllers Model.FolderTree = OperationsService.GetFolderTree(TableID.Customer, customerOid.Value); var customer = CustomerService.LoadCustomer(customerOid.Value); Model.ICD10Diagnosen = OperationsService.GetDiagiosisStringsForICD10Codes(customer.ICD10DiagnosisCodes); - Model.SelectedCustomer = customer; + Model.SelectedCustomer = customer; + + var bargeldkassen = OperationsService.LoadBargeldkassenForObject(TableID.Customer, customerOid.Value); + Model.Bargeldkassen = bargeldkassen; } return RedirectToActionPermanent("Customer"); @@ -147,6 +150,9 @@ namespace BeWoPlanerMobil.Controllers } Model.SelectedCustomer = customer; + + var bargeldkassen = OperationsService.LoadBargeldkassenForObject(TableID.Customer, selectedCustomerOid); + Model.Bargeldkassen = bargeldkassen; } } diff --git a/BeWoPlanerMobil/Controllers/MainController.cs b/BeWoPlanerMobil/Controllers/MainController.cs index 0f7d1bfb1..dd5cf98d6 100644 --- a/BeWoPlanerMobil/Controllers/MainController.cs +++ b/BeWoPlanerMobil/Controllers/MainController.cs @@ -141,7 +141,8 @@ namespace BeWoPlanerMobil.Controllers Model.SetStartTimeToEndTimeAfterSave = UserSettingsUtils.GetSettingValueAsBool(mandatorSettings, SettingsKeys.SetStartTimeToEndTimeAfterSave); - var userSettings = AbstractModel.UserSettings; + var user = GetUser(); + var userSettings = user?.Settings.FirstOrDefault(f => f.Type.Equals(SettingsType.ApplicationSettings))?.Value; Model.ShowExpiredSupportConcepts = UserSettingsUtils.GetSettingValueAsBool(userSettings, SettingsKeys.ShowExpiredSupportConcepts); Model.ShowOnlyOwnSupportConcepts = UserSettingsUtils.GetSettingValueAsBool(userSettings, SettingsKeys.ShowOnlyMySupportConcepts); @@ -305,7 +306,37 @@ namespace BeWoPlanerMobil.Controllers { Model.LastSelectedServiceRecordMonth = UserSettingsUtils.GetSettingValueAsDateTime(userSettings, SettingsKeys.LastSelectedServiceRecordMonth) ?? DateTime.Today; - var serviceRecordTimeInterval = LoadServiceRecordTimeIntervalFromSession(); + //int zeitraum; + var serviceRecordTimeInterval = UserSettingsUtils.GetSettingValueAsEnum(userSettings, SettingsKeys.LastSelectedServiceRecordTimeInterval, ServiceRecordTimeInterval.LastWeek); + + Model.ServiceRecordTimeInterval = serviceRecordTimeInterval; + + //switch(serviceRecordTimeInterval) + //{ + // case ServiceRecordTimeInterval.LastWeek: + // zeitraum = 7; + // break; + // case ServiceRecordTimeInterval.LastMonth: + // zeitraum = 30; + // break; + // case ServiceRecordTimeInterval.Last3Month: + // zeitraum = 90; + // break; + // case ServiceRecordTimeInterval.All: + // zeitraum = 0; + // break; + // case ServiceRecordTimeInterval.ZeitraumWaehlen: + // zeitraum = -1; + // break; + // case ServiceRecordTimeInterval.XTage: + // zeitraum = + // break; + // default: + // zeitraum = 7; + // break; + //} + + //Model.Zeitraum = zeitraum; if(serviceRecordTimeInterval == ServiceRecordTimeInterval.ZeitraumWaehlen && (Model.SelectedZeitraum?.StartDate is null || Model.SelectedZeitraum.EndDate is null)) { @@ -315,14 +346,36 @@ namespace BeWoPlanerMobil.Controllers Model.LastSelectedServiceRecordTimeIntervalDays = UserSettingsUtils.GetSettingValueAsInteger(userSettings, SettingsKeys.LastSelectedServiceRecordTimeIntervalDays); - Model.ServiceRecordTimeInterval = LoadServiceRecordTimeIntervalFromSession(); + //Model.ServiceRecordTimeInterval = LoadServiceRecordTimeIntervalFromSession(); if(Model.ServiceRecordTimeInterval == ServiceRecordTimeInterval.Monatsauswahl) { Model.SelectedZeitraum = new NullableDateTimeSpan(Model.LastSelectedServiceRecordMonth.Date.GetFirstOfMonth(), Model.LastSelectedServiceRecordMonth.Date.GetLastOfMonth()); } - CalculateSelectedDayCount(Model.LastSelectedServiceRecordTimeIntervalDays, Model.LastSelectedServiceRecordMonth, Model.SelectedZeitraum?.StartDate, Model.SelectedZeitraum?.EndDate); + CalculateSelectedDayCount(Model.LastSelectedServiceRecordTimeIntervalDays, Model.LastSelectedServiceRecordMonth, Model.SelectedZeitraum?.StartDate, Model.SelectedZeitraum?.EndDate, null); + } + + [Authorize] + private void UpdateSettings(string key, string value) + { + if(Model is null) + { + return; + } + + var loggedInUser = GetUser(); + + if(loggedInUser?.UserOid is null) + { + return; + } + + var userSettings = loggedInUser.Settings; + + UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, key, value, userSettings); + + UserService.UpdateUserSettings(loggedInUser.UserOid.Value, userSettings); } [Authorize] @@ -1857,16 +1910,12 @@ namespace BeWoPlanerMobil.Controllers Model.ServiceRecordTimeInterval = serviceRecordTimeInterval; - CalculateSelectedDayCount(dayCountNumber, lastSelectedServiceRecordMonth, parsedVon, parsedBis); - - SaveServiceRecordTimeIntervalToSession(serviceRecordTimeInterval); - - //LoadRecordsToModel(); + CalculateSelectedDayCount(dayCountNumber, lastSelectedServiceRecordMonth, parsedVon, parsedBis, serviceRecordTimeInterval); return RedirectToActionPermanent("Main"); } - private void CalculateSelectedDayCount(int? dayCountNumber, DateTime? lastSelectedServiceRecordMonth, DateTime? von, DateTime? bis) + private void CalculateSelectedDayCount(int? dayCountNumber, DateTime? lastSelectedServiceRecordMonth, DateTime? von, DateTime? bis, ServiceRecordTimeInterval? serviceRecordTimeInterval) { if(dayCountNumber is null) { @@ -1911,6 +1960,13 @@ namespace BeWoPlanerMobil.Controllers Model.SelectedZeitraum = new NullableDateTimeSpan(von.Value, bis.Value); break; } + + if(serviceRecordTimeInterval is null) + { + return; + } + + UpdateSettings(SettingsKeys.LastSelectedServiceRecordTimeInterval, ((int) serviceRecordTimeInterval.Value).ToString()); } private void LoadRecordsToModel() diff --git a/BeWoPlanerMobil/Controllers/ReportViewerController.cs b/BeWoPlanerMobil/Controllers/ReportViewerController.cs index 960701e73..050b6ea08 100644 --- a/BeWoPlanerMobil/Controllers/ReportViewerController.cs +++ b/BeWoPlanerMobil/Controllers/ReportViewerController.cs @@ -58,7 +58,7 @@ namespace BeWoPlanerMobil.Controllers Model.SelectedMonth = Model.SelectedMonth ?? first.Month; Model.AllEmployees = AbstractModel.HasRightMitarbeiterstundenkontoViewAll - ? EmployeeService.GetActiveCompactEmployeesForEmployee(MobileSessionFacade.LoggedInCompactEmployee.EmployeeOid) + ? EmployeeService.GetAllActiveEmployeesCompact() : new List { MobileSessionFacade.LoggedInCompactEmployee }; // Alle Teams darf man nur sehen, wenn man das Recht "HasRightMitarbeiterstundenkontoViewAll" hat. @@ -217,6 +217,7 @@ namespace BeWoPlanerMobil.Controllers long? employeeOid = null; List teamOids = null; long? oid = null; + if(long.TryParse(splitParameters[4], out var oOid)) { oid = oOid; @@ -224,10 +225,6 @@ namespace BeWoPlanerMobil.Controllers var ansicht = int.Parse(splitParameters[5]); - var siteOfOrigin = GetSiteOfOrigin(); - - //var url = $"{siteOfOrigin}/ReportView.aspx?type={Utils.EnumName(ReportTypes.EmployeeHourReport)}"; - if(isEmployee) { employeeOid = oid; @@ -246,11 +243,6 @@ namespace BeWoPlanerMobil.Controllers { employeeOid = Model.Employee.EmployeeOid; } - - if(employeeOid > 0) - { - //url += $"&eoid={employeeOid}"; - } } else { @@ -268,41 +260,16 @@ namespace BeWoPlanerMobil.Controllers teamOid = oid; } - //url += "&toid="; - if(teamOid > 0 && !all) { - //url += $"{teamOid}"; teamOids.Add(teamOid.Value); } else if(all) { - // url += string.Join(",", Model.AllTeams.Select(team => team.TeamOid)); teamOids.AddRange(Model.AllTeams.Select(team => team.TeamOid)); } } - //url += $"&m={month}&y={year}"; - - //if(ansicht != 0) - //{ - // url += $"&ansicht={ansicht}"; - //} - - //var tempToken = DownloadService.CreateTemporaryToken(url, true); - - //url += $"&token={tempToken}"; - - //var webClient = new WebClient(); - - //var data = webClient.DownloadData(url); - - //var report = new XtraReport(); - - //using(var memoryStream = new MemoryStream(data)) - //{ - // report.PrintingSystem.LoadDocument(memoryStream); - //} var start = new DateTime(year, month, 1); var end = start.AddMonths(1); var report = Model.ReportCreator.CreateEmployeeHourReport(employeeOid, teamOids, start, end, ansicht); diff --git a/BeWoPlanerMobil/Models/AbstractModel.cs b/BeWoPlanerMobil/Models/AbstractModel.cs index f672d878f..ec5657694 100644 --- a/BeWoPlanerMobil/Models/AbstractModel.cs +++ b/BeWoPlanerMobil/Models/AbstractModel.cs @@ -189,5 +189,17 @@ namespace BeWoPlanerMobil.Models public static bool HasRightToViewDiagnosen => CheckRight(UserRightType.Customer_ViewDiagnosis); public static bool HasRightToProvideSingleSignature => CheckRight(UserRightType.Signature_ProvideSingleSignature); + + public static bool HasRightToViewOwnCustomersBargeldkassen => CheckRight(UserRightType.BargeldverwaltungNurEigeneAnsehen); + + public static bool HasRightToViewAllCustomersBargeldkassen => CheckRight(UserRightType.BargeldverwaltungAnsehen); + + public static bool HasRightToDeleteCustomerBargeldkassen => CheckRight(UserRightType.BargeldverwaltungLoeschen); + + public static bool HasRightToCreateCustomerBargeldkassen => CheckRight(UserRightType.BargeldverwaltungAnlegen); + + public static bool HasRightToEditCustomerBargeldkassen => CheckRight(UserRightType.BargeldverwaltungBearbeiten); + + public static bool HasRightToViewCustomerAbsenceTimes => CheckRight(UserRightType.Customer_ViewAbsenceTimes); } } \ No newline at end of file diff --git a/BeWoPlanerMobil/Models/CustomerModel.cs b/BeWoPlanerMobil/Models/CustomerModel.cs index 273fad8ae..fd205c6be 100644 --- a/BeWoPlanerMobil/Models/CustomerModel.cs +++ b/BeWoPlanerMobil/Models/CustomerModel.cs @@ -132,43 +132,6 @@ namespace BeWoPlanerMobil.Models public string ReportName { get; set; } - public double ReportRatio - { - get - { - if(Report is null) - { - return 0d; - } - - var width = 1f; - var height = 1f; - - foreach(PSPage page in Report.Pages) - { - var size = page.Size; - if(size.Width > width) - { - width = size.Width; - } - - if(size.Height > height) - { - height = size.Height; - } - } - - // US Letter: 0,77 bzw. 1,29 - // DIN A4: 0,71 bzw. 1,33 - var ratio = width < height ? width / height : height / width; - - #if DEBUG - var landscape = width > height; - ratio = landscape ? 210f / 279f : 297f / 210f; - #endif - - return Math.Round(ratio, 2); - } - } + public List Bargeldkassen { get; set; } } } \ No newline at end of file diff --git a/BeWoPlanerMobil/Scripts/group-booking.js b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/group-booking.js similarity index 100% rename from BeWoPlanerMobil/Scripts/group-booking.js rename to BeWoPlanerMobil/Scripts/ownSoft-Scripts/group-booking.js diff --git a/BeWoPlanerMobil/Scripts/mobileUtils.js b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/mobileUtils.js similarity index 96% rename from BeWoPlanerMobil/Scripts/mobileUtils.js rename to BeWoPlanerMobil/Scripts/ownSoft-Scripts/mobileUtils.js index 4f8ab7cea..e619ee5ab 100644 --- a/BeWoPlanerMobil/Scripts/mobileUtils.js +++ b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/mobileUtils.js @@ -259,16 +259,22 @@ function cardHeaderButtonClick(cardBodyId) { } } +// ToDo: Hier am 21.08.2023 weitermachen! function toggleChevron(chevronId, cardBodyId) { try { var isDown = $(cardBodyId).css("display") !== "none"; - + logInfo3("toggleChevron: is chevron down. " + isDown); var chevron = $(chevronId); + logInfo3("toggleChevron: chevron exists: " + (chevron.length > 0)); var iconToRemove = isDown ? "fa-chevron-down" : "fa-chevron-up"; + logInfo3("toggleChevron: icon to remove: " + iconToRemove); var iconToAdd = isDown ? "fa-chevron-up" : "fa-chevron-down"; + logInfo3("toggleChevron: icon to add: " + iconToAdd); chevron.removeClass(iconToRemove); chevron.addClass(iconToAdd); + + logInfo3(`toggleChevron: removed ${iconToRemove} and added ${iconToAdd}`); } catch (error) { showErrorPopup(error); } diff --git a/BeWoPlanerMobil/Scripts/signature.js b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/signature.js similarity index 100% rename from BeWoPlanerMobil/Scripts/signature.js rename to BeWoPlanerMobil/Scripts/ownSoft-Scripts/signature.js diff --git a/BeWoPlanerMobil/Scripts/support-concept-statistics.js b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/support-concept-statistics.js similarity index 100% rename from BeWoPlanerMobil/Scripts/support-concept-statistics.js rename to BeWoPlanerMobil/Scripts/ownSoft-Scripts/support-concept-statistics.js diff --git a/BeWoPlanerMobil/Scripts/utils/dateUtils.js b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/dateUtils.js similarity index 100% rename from BeWoPlanerMobil/Scripts/utils/dateUtils.js rename to BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/dateUtils.js diff --git a/BeWoPlanerMobil/Scripts/utils/js-helper.js b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/js-helper.js similarity index 100% rename from BeWoPlanerMobil/Scripts/utils/js-helper.js rename to BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/js-helper.js diff --git a/BeWoPlanerMobil/Scripts/utils/list-utils.js b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/list-utils.js similarity index 100% rename from BeWoPlanerMobil/Scripts/utils/list-utils.js rename to BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/list-utils.js diff --git a/BeWoPlanerMobil/Scripts/utils/logging.js b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/logging.js similarity index 100% rename from BeWoPlanerMobil/Scripts/utils/logging.js rename to BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/logging.js diff --git a/BeWoPlanerMobil/Scripts/utils/password-security.js b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/password-security.js similarity index 100% rename from BeWoPlanerMobil/Scripts/utils/password-security.js rename to BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/password-security.js diff --git a/BeWoPlanerMobil/Scripts/utils/resources-list-utils.js b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/resources-list-utils.js similarity index 100% rename from BeWoPlanerMobil/Scripts/utils/resources-list-utils.js rename to BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/resources-list-utils.js diff --git a/BeWoPlanerMobil/Scripts/utils/service-record-time-calc.js b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/service-record-time-calc.js similarity index 100% rename from BeWoPlanerMobil/Scripts/utils/service-record-time-calc.js rename to BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/service-record-time-calc.js diff --git a/BeWoPlanerMobil/Scripts/utils/trimCanvas.js b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/trimCanvas.js similarity index 100% rename from BeWoPlanerMobil/Scripts/utils/trimCanvas.js rename to BeWoPlanerMobil/Scripts/ownSoft-Scripts/utils/trimCanvas.js diff --git a/BeWoPlanerMobil/Scripts/view-scripts/customer.js b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/view-scripts/customer.js similarity index 100% rename from BeWoPlanerMobil/Scripts/view-scripts/customer.js rename to BeWoPlanerMobil/Scripts/ownSoft-Scripts/view-scripts/customer.js diff --git a/BeWoPlanerMobil/Scripts/view-scripts/main.js b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/view-scripts/main.js similarity index 100% rename from BeWoPlanerMobil/Scripts/view-scripts/main.js rename to BeWoPlanerMobil/Scripts/ownSoft-Scripts/view-scripts/main.js diff --git a/BeWoPlanerMobil/Scripts/view-scripts/report.js b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/view-scripts/report.js similarity index 100% rename from BeWoPlanerMobil/Scripts/view-scripts/report.js rename to BeWoPlanerMobil/Scripts/ownSoft-Scripts/view-scripts/report.js diff --git a/BeWoPlanerMobil/Scripts/view-scripts/scheduler.js b/BeWoPlanerMobil/Scripts/ownSoft-Scripts/view-scripts/scheduler.js similarity index 100% rename from BeWoPlanerMobil/Scripts/view-scripts/scheduler.js rename to BeWoPlanerMobil/Scripts/ownSoft-Scripts/view-scripts/scheduler.js diff --git a/BeWoPlanerMobil/Service/ASPHibernateSessionManager.cs b/BeWoPlanerMobil/Service/ASPHibernateSessionManager.cs index 0f758cf75..5651c8a98 100644 --- a/BeWoPlanerMobil/Service/ASPHibernateSessionManager.cs +++ b/BeWoPlanerMobil/Service/ASPHibernateSessionManager.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Configuration; +using System.Diagnostics; using System.Globalization; using System.IO; using System.ServiceModel; @@ -35,6 +36,8 @@ namespace BeWoPlanerMobil.Service { try { + Debug.WriteLine(">>>>Retrieving Session!"); + Monitor.Enter(_Lock); if(!SessionFactories.ContainsKey(MobileSessionFacade.Tenant)) @@ -57,7 +60,9 @@ namespace BeWoPlanerMobil.Service return null; } - SessionFactories[MobileSessionFacade.Tenant] = new Configuration().Configure(serverPath).SetInterceptor(new MobileUpdInsInterceptor()).BuildSessionFactory(); + var config = new Configuration().Configure(serverPath).SetInterceptor(new MobileUpdInsInterceptor()).BuildSessionFactory(); + + SessionFactories[MobileSessionFacade.Tenant] = config; } return SessionFactories[MobileSessionFacade.Tenant]; @@ -84,7 +89,7 @@ namespace BeWoPlanerMobil.Service if(ShouldConfigureHibernateSession(context)) { // TEST FOR DEVEXPRESS. PROBLEMS WITH THIS MODULE WHEN USING AJAX! - if(HttpContext.Current.Session == null) + if(HttpContext.Current.Session is null) { return; } @@ -105,13 +110,18 @@ namespace BeWoPlanerMobil.Service }; context.EndRequest += (s, e) => + { + if(HttpContext.Current.Items["hibernateSession"] is null) { - if(HttpContext.Current.Items["hibernateSession"] != null) - { - ((ISession)HttpContext.Current.Items["hibernateSession"]).Close(); - HttpContext.Current.Items.Remove("hibernateSession"); - } - }; + Debug.WriteLine("+++>Ending Request; Session is null!"); + return; + } + + ((ISession)HttpContext.Current.Items["hibernateSession"]).Close(); + HttpContext.Current.Items.Remove("hibernateSession"); + + Debug.WriteLine("####Ending Request; Closing and removing Session!"); + }; } private static bool ShouldConfigureHibernateSession(HttpApplication context) diff --git a/BeWoPlanerMobil/Views/Customer/Customer.cshtml b/BeWoPlanerMobil/Views/Customer/Customer.cshtml index aa04f226c..dedf6bbad 100644 --- a/BeWoPlanerMobil/Views/Customer/Customer.cshtml +++ b/BeWoPlanerMobil/Views/Customer/Customer.cshtml @@ -163,750 +163,843 @@ { var inputDisabled = !AbstractModel.HasRightToEditCustomers ? "disabled" : string.Empty; -
-
-
-
-
- Eigenschaften +
+
+
+
+
+ Eigenschaften +
+
+
+
+
+
+ Vorname +
+
+ +
+ Dieses Feld darf nicht leer sein! +
-
-
-
-
-
- Vorname -
-
- -
- Dieses Feld darf nicht leer sein! -
+
+
+
+
+
+
+
+ Nachname +
+
+ +
+ Dieses Feld darf nicht leer sein! +
+
+
+
+
+
+
+
+
+ Geburtstag +
+
+ +
+
+
-
-
-
-
-
- Nachname -
-
- -
- Dieses Feld darf nicht leer sein! -
+
+
+
+
+
+
+
+ Geschlecht
-
-
-
-
-
-
- Geburtstag -
-
- -
-
- -
-
-
-
-
-
-
-
-
-
- Geschlecht -
-
- @{ - var selectedMale = Model.SelectedJsonCustomer.CustomerSex == Sex.Male ? "selected" : string.Empty; - var selectedFemale = Model.SelectedJsonCustomer.CustomerSex == Sex.Female ? "selected" : string.Empty; - var selectedDiverse = Model.SelectedJsonCustomer.CustomerSex == Sex.Divers ? "selected" : string.Empty; - var selectedNull = Model.SelectedJsonCustomer.CustomerSex is null ? "selected" : string.Empty; - } + @{ + var selectedMale = Model.SelectedJsonCustomer.CustomerSex == Sex.Male ? "selected" : string.Empty; + var selectedFemale = Model.SelectedJsonCustomer.CustomerSex == Sex.Female ? "selected" : string.Empty; + var selectedDiverse = Model.SelectedJsonCustomer.CustomerSex == Sex.Divers ? "selected" : string.Empty; + var selectedNull = Model.SelectedJsonCustomer.CustomerSex is null ? "selected" : string.Empty; + } - -
-
+
-
-
-
-
- Adresse -
-
-
-
-
-
- Adresszusatz -
-
- +
+
+
+
+
+
+ Adresse +
+
+
+
+
+
+ Adresszusatz
+
-
-
-
-
-
- Straße -
-
- +
+
+
+
+
+
+
+ Straße
+
-
-
-
-
-
- PLZ -
-
- +
+
+
+
+
+
+
+ PLZ
+
-
-
-
-
-
- Ort -
-
- +
+
+
+
+
+
+
+ Ort
+
-
-
-
-
- Rechnungsadresse -
-
-
-
-
-
- Name -
-
- +
+
+
+
+
+
+ Rechnungsadresse +
+
+
+
+
+
+ Name
+
-
-
-
-
-
- Straße -
-
- +
+
+
+
+
+
+
+ Straße
+
-
-
-
-
-
- PLZ -
-
- +
+
+
+
+
+
+
+ PLZ
+
-
-
-
-
-
- Ort -
-
- +
+
+
+
+
+
+
+ Ort
+
-
-
-
-
- Kontakt -
-
-
-
-
-
- Handy -
-
- -
- -
+
+
+
+
+
+
+ Kontakt +
+
+
+
+
+
+ Handy
-
-
-
-
-
-
- Telefon -
-
- -
- -
-
-
-
-
-
-
-
-
- Fax -
-
- -
-
-
-
-
-
-
-
- Mail -
-
- -
- -
-
-
-
-
-
-
- -
-
-
-
-
Kommentar
-
-
-
-
- -
-
-
-
- - @if(AbstractModel.HasRightToEditCustomers) - { -
- -
- } - - -
-
-
- - - @if(Model.SelectedJsonCustomer.ReferenceNumbers.Any()) - { -
-
-
-
Aktenzeichen pro Kostenträger
-
-
-
- - - - - - - - - @foreach(var x in Model.SelectedJsonCustomer.ReferenceNumbers) - { - - - - - } - -
- Kostenträger - - Aktenzeichen -
- @x.Costbearer - - @x.ReferenceNumber -
-
-
-
-
- } - - - @if(Model.SelectedJsonCustomer.Umfeldpersonen.Any()) - { -
-
-
-
Umfeld
-
-
-
- @foreach(var umfeldPerson in Model.SelectedJsonCustomer.Umfeldpersonen) - { -
-
-
- -
-
- -
-
-
-
-
-
-
- Rolle: -
-
- @umfeldPerson.Rolle -
-
-
-
- Adresse: -
-
- @umfeldPerson.StrNameNr
@umfeldPerson.PLZOrt -
-
-
-
- Tel.: -
- -
-
-
- Mobil: -
- -
-
-
- E-Mail: -
- -
-
-
- Fax: -
-
- @umfeldPerson.Fax -
-
-
-
-
-
- } -
-
-
-
- } - - - @if(Model.SelectedJsonCustomer.Organisations.Any()) - { -
-
-
-
Organisationen des Umfelds
-
-
-
- @foreach(var organisation in Model.SelectedJsonCustomer.Organisations) - { -
-
-
- -
-
- -
-
-
-
-
-
-
- Ansprechpartner -
-
- @organisation.ContactPerson -
-
-
-
- Rolle -
-
- @organisation.Role -
-
-
-
- Adresse -
-
- @organisation.StreetName - @if(!string.IsNullOrEmpty(organisation.StreetName) && !string.IsNullOrEmpty(organisation.ZipCode2Town)) - { -
- } - @organisation.ZipCode2Town -
-
-
-
- Tel.: -
- -
-
-
- Fax: -
-
- @organisation.FaxNumber -
-
-
-
- E-Mail: -
- -
-
-
- Internet: -
- -
-
-
- Info -
-
- @organisation.Info -
-
-
-
- Notiz -
-
- @organisation.Notice -
-
-
-
-
-
- } -
-
-
-
- } - - -
-
-
-
Dokumente
-
-
-
- @Html.Partial("DocumentPartial", Model) -
-
-
-
- - - @if(Html.IsInDebugMode() && AbstractModel.IsAllowedToSeeMedikamentenliste) - { -
-
-
-
Medikamentenverordnungen
-
-
-
-
-
- @Html.DropDownListFor(m => m.SelectedReportType, Model.ReportTypeItems, new { @class = "custom-select", id = "report-type-select", onchange = "changeReportTypeSelection()" }) -
-
- -
-
- @if(!(Model.SelectedCustomer is null)) - { - - - - - - - - - - @foreach(var list in Model.SelectedCustomer.Medikamentenverordnungslisten.Where(w => !w.Gueltig)) - { - var listName = $"{(list.MedListType ? "Medikamentenverordnungsliste" : "Bedarfsmedikamentenverordnungsliste")} vom {list.ErstellDatum}"; - var name = $"{listName} von {list.Ersteller}"; - - - - - - } - -
- Liste - - Ersteller -
- @listName - - @list.Ersteller - - - -
- } -
-
-
-
-
-
- } - - @if(AbstractModel.HasRightToViewDiagnosen && (Model.SelectedJsonCustomer.HasDiagnosen || Model.SelectedJsonCustomer.HasDisabilities || Model.SelectedJsonCustomer.HasSchwebi)) - { -
-
-
-
- -
-
-
-
-
- @{ - var hasDiagnosen = Model.SelectedJsonCustomer.HasDiagnosen; - var hasDisabilities = Model.SelectedJsonCustomer.HasDisabilities; - var diagnosenCol = hasDiagnosen && hasDisabilities ? "col-lg-6" : "col-lg-12"; - var schwebiCol = hasDiagnosen ? "col-lg-6" : "col-lg-12"; - } -
- @if(hasDiagnosen) - { -
-
Diagnosen
- - - - - - - - - @foreach(var code2Text in Model.SelectedJsonCustomer.ICD10Diagnosen) - { - - - - - } - - - - - - - - - -
ICD10Beschreibung
@code2Text.Key@code2Text.Value
Medikation@Model.SelectedCustomer.Medication
Bemerkungen@Model.SelectedCustomer.Diagnosis
-
- } - @if(Model.SelectedJsonCustomer.HasSchwebi) - { -
-
Schwerbehindertenausweis
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Aust. Vers. -amt@Model.SelectedJsonCustomer.SchwebiAusstAmt
Ausweis unbefristet gültig@Model.SelectedJsonCustomer.SchwebiIsUnlimited
Ausweis gültig von@Model.SelectedJsonCustomer.SchwebiGueltigVon
Ausweis gültig bis@Model.SelectedJsonCustomer.SchwebiGueltigBis
Beiblatt gültig bis@Model.SelectedJsonCustomer.SchwebiBeiblattGueltigBis
Grad der Behinderung@Model.SelectedJsonCustomer.SchwebiGradDerBehinderung
Merkzeichen@Model.SelectedJsonCustomer.SchwebiMerkzeichen
Behinderungsart@Model.SelectedJsonCustomer.SchwebiBehinderungsart
Pflegegrad@Model.SelectedJsonCustomer.SchwebiPflegegrad
Aktenzeichen@Model.SelectedJsonCustomer.SchwebiAktenzeichen
-
- } +
+
+
+
+
+
+
+ Telefon
- @if(Model.SelectedJsonCustomer.HasDisabilities) +
+ +
+ +
+
+
+
+
+
+
+
+
+ Fax +
+
+ +
+
+
+
+
+
+
+
+ Mail +
+
+ +
+ +
+
+
+
+
+
+
+ +
+
+
+
+
Kommentar
+
+
+
+
+ +
+
+
+
+ + @if(AbstractModel.HasRightToEditCustomers) + { +
+ +
+ } + + +
+
+
+ + + @if(Model.SelectedJsonCustomer.ReferenceNumbers.Any()) + { +
+
+
+
+ +
+
+ +
+
+
+
+
+ + + + + + + + + @foreach(var x in Model.SelectedJsonCustomer.ReferenceNumbers) { -
-
-
Behinderungen
-
+ Kostenträger + + Aktenzeichen +
- - @foreach(var behinderung in Model.SelectedCustomer.Disabilities) - { - - - - } - -
@behinderung.DisplayName
+ + + @x.Costbearer + + + @x.ReferenceNumber + + + } + + +
+
+
+
+
+ } + + + @if(Model.SelectedJsonCustomer.Umfeldpersonen.Any()) + { +
+
+
+
+ +
+
+ +
+
+
+
+
+ @foreach(var umfeldPerson in Model.SelectedJsonCustomer.Umfeldpersonen) + { +
+
+
+ +
+
+
+
+
+
+
+
+ Rolle: +
+
+ @umfeldPerson.Rolle +
+
+
+
+ Adresse: +
+
+ @umfeldPerson.StrNameNr
@umfeldPerson.PLZOrt +
+
+
+
+ Tel.: +
+ +
+
+
+ Mobil: +
+ +
+
+
+ E-Mail: +
+ +
+
+
+ Fax: +
+
+ @umfeldPerson.Fax +
+
+
+
+
+
+ } +
+
+
+
+
+ } + + + @if(Model.SelectedJsonCustomer.Organisations.Any()) + { +
+
+
+
+ +
+
+ +
+
+
+
+
+ @foreach(var organisation in Model.SelectedJsonCustomer.Organisations) + { +
+
+
+ +
+
+ +
+
+
+
+
+
+
+ Ansprechpartner +
+
+ @organisation.ContactPerson +
+
+
+
+ Rolle +
+
+ @organisation.Role +
+
+
+
+ Adresse +
+
+ @organisation.StreetName + @if(!string.IsNullOrEmpty(organisation.StreetName) && !string.IsNullOrEmpty(organisation.ZipCode2Town)) + { +
+ } + @organisation.ZipCode2Town +
+
+
+
+ Tel.: +
+ +
+
+
+ Fax: +
+
+ @organisation.FaxNumber +
+
+
+
+ E-Mail: +
+ +
+
+
+ Internet: +
+ +
+
+
+ Info +
+
+ @organisation.Info +
+
+
+
+ Notiz +
+
+ @organisation.Notice +
+
+
+
+
+
+ } +
+
+
+
+
+ } + +
+
+
+
+ +
+
+ +
+
+
+
+
+ @Html.Partial("DocumentPartial", Model) +
+
+
+
+
+ + + @if(Html.IsInDebugMode() && AbstractModel.IsAllowedToSeeMedikamentenliste) + { +
+
+
+
Medikamentenverordnungen
+
+
+
+
+
+ @Html.DropDownListFor(m => m.SelectedReportType, Model.ReportTypeItems, new { @class = "custom-select", id = "report-type-select", onchange = "changeReportTypeSelection()" }) +
+
+ +
+
+ @if(!(Model.SelectedCustomer is null)) + { + + + + + + + + + + @foreach(var list in Model.SelectedCustomer.Medikamentenverordnungslisten.Where(w => !w.Gueltig)) + { + var listName = $"{(list.MedListType ? "Medikamentenverordnungsliste" : "Bedarfsmedikamentenverordnungsliste")} vom {list.ErstellDatum}"; + var name = $"{listName} von {list.Ersteller}"; + + + + + + } + +
+ Liste + + Ersteller +
+ @listName + + @list.Ersteller + + + +
}
- } +
} + + + @if(AbstractModel.HasRightToViewDiagnosen && (Model.SelectedJsonCustomer.HasDiagnosen || Model.SelectedJsonCustomer.HasDisabilities || Model.SelectedJsonCustomer.HasSchwebi)) + { +
+
+
+
+ +
+
+ +
+
+
+
+ @{ + var hasDiagnosen = Model.SelectedJsonCustomer.HasDiagnosen; + var hasDisabilities = Model.SelectedJsonCustomer.HasDisabilities; + var diagnosenCol = hasDiagnosen && hasDisabilities ? "col-lg-6" : "col-lg-12"; + var schwebiCol = hasDiagnosen ? "col-lg-6" : "col-lg-12"; + } +
+ @if(hasDiagnosen) + { +
+
Diagnosen
+ + + + + + + + + @foreach(var code2Text in Model.SelectedJsonCustomer.ICD10Diagnosen) + { + + + + + } + + + + + + + + + +
ICD10Beschreibung
@code2Text.Key@code2Text.Value
Medikation@Model.SelectedCustomer.Medication
Bemerkungen@Model.SelectedCustomer.Diagnosis
+
+ } + @if(Model.SelectedJsonCustomer.HasSchwebi) + { +
+
Schwerbehindertenausweis
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Aust. Vers. -amt@Model.SelectedJsonCustomer.SchwebiAusstAmt
Ausweis unbefristet gültig@Model.SelectedJsonCustomer.SchwebiIsUnlimited
Ausweis gültig von@Model.SelectedJsonCustomer.SchwebiGueltigVon
Ausweis gültig bis@Model.SelectedJsonCustomer.SchwebiGueltigBis
Beiblatt gültig bis@Model.SelectedJsonCustomer.SchwebiBeiblattGueltigBis
Grad der Behinderung@Model.SelectedJsonCustomer.SchwebiGradDerBehinderung
Merkzeichen@Model.SelectedJsonCustomer.SchwebiMerkzeichen
Behinderungsart@Model.SelectedJsonCustomer.SchwebiBehinderungsart
Pflegegrad@Model.SelectedJsonCustomer.SchwebiPflegegrad
Aktenzeichen@Model.SelectedJsonCustomer.SchwebiAktenzeichen
+
+ } +
+ @if(Model.SelectedJsonCustomer.HasDisabilities) + { +
+
+
Behinderungen
+ + + @foreach(var behinderung in Model.SelectedCustomer.Disabilities) + { + + + + } + +
@behinderung.DisplayName
+
+
+ } +
+
+
+
+ } + + @{ + var isRelatedCustomer = Model.SelectedCustomerOid.HasValue && Model.Employee.RelatedCustomers.Any(cer => cer.Customer.CustomerOid.Equals(Model.SelectedCustomerOid.Value)); + + var isAllowedToViewBargeldkassen = AbstractModel.HasRightToViewAllCustomersBargeldkassen || (isRelatedCustomer && AbstractModel.HasRightToViewOwnCustomersBargeldkassen); + } + + @if(Html.IsInDebugMode() && isAllowedToViewBargeldkassen && !(Model.Bargeldkassen is null) && Model.Bargeldkassen.Any()) + { + +
+
+
+
+ +
+
+ +
+
+
+
+ @foreach(var bargeldkasse in Model.Bargeldkassen) + { +

@bargeldkasse.Kassenname

+ } +
+
+
+
+ } + + @if(Html.IsInDebugMode() && AbstractModel.HasRightToViewCustomerAbsenceTimes) + { +
+
+
+
+ +
+
+ +
+
+
+
+ @Html.Partial("CustomerAbsenceTimePartial", Model) +
+
+
+
+ } + +
+ } }
diff --git a/BeWoPlanerMobil/Views/Customer/CustomerAbsenceTimePartial.cshtml b/BeWoPlanerMobil/Views/Customer/CustomerAbsenceTimePartial.cshtml new file mode 100644 index 000000000..1357e6522 --- /dev/null +++ b/BeWoPlanerMobil/Views/Customer/CustomerAbsenceTimePartial.cshtml @@ -0,0 +1 @@ +

Hier wird für Sie gebaut!

\ No newline at end of file diff --git a/BeWoPlanerMobil/Views/Shared/_Layout.cshtml b/BeWoPlanerMobil/Views/Shared/_Layout.cshtml index ed6152a16..db3ef2887 100644 --- a/BeWoPlanerMobil/Views/Shared/_Layout.cshtml +++ b/BeWoPlanerMobil/Views/Shared/_Layout.cshtml @@ -1,7 +1,6 @@ @using BeWoPlanerMobil.Controllers @using BeWoPlanerMobil.Models @using BeWoPlanerMobil.Service -@using BeWoPlanerMobil.Util @@ -45,34 +44,34 @@ - + - + - - - + + + - - - + + + - + - - - - - - - + + + + + + +