diff --git a/BeWo/Core/Service/GoalService.cs b/BeWo/Core/Service/GoalService.cs index a2925b21c..d26a97c62 100644 --- a/BeWo/Core/Service/GoalService.cs +++ b/BeWo/Core/Service/GoalService.cs @@ -311,7 +311,9 @@ namespace BeWo.Core.Service copyVe.TypeDescription = ve.TypeDescription; copyVe.ValueListEntryOid = ve.ValueListEntryOid; copyVe.ValueListEntryVersion = ve.ValueListEntryVersion; - if (ve.Parent != null) + copyVe.CatalogOid = ve.CatalogOid; + copyVe.CatalogItem = ve.CatalogItem; + if (ve.Parent != null) { copyVe.Parent = ve.Parent; } diff --git a/BeWo/Core/Service/SupportConceptService.cs b/BeWo/Core/Service/SupportConceptService.cs index ed7fac0ea..40137c3f7 100644 --- a/BeWo/Core/Service/SupportConceptService.cs +++ b/BeWo/Core/Service/SupportConceptService.cs @@ -17,6 +17,14 @@ namespace BeWo.Core.Service if (allGoalsAndCategories != null) { + foreach (var goal in allGoalsAndCategories) + { + if (goal.CatalogOid.HasValue) + { + var catalogItem = Cache.GetInstance().GetValueListEntry(ValueListEntryType.MassnahmenKatalog, goal.CatalogOid.Value); + goal.CatalogItem = catalogItem; + } + } var ziele = allGoalsAndCategories.Where(w => w.Type.Equals(ValueListEntryType.SupportConceptGoalCategoryType) || w.Type.Equals(ValueListEntryType.SupportConceptIndividualGoalCategoryType)).OrderBy(s => s.DisplayName).ToList(); var massnahmen = allGoalsAndCategories.Where(w => w.Type.Equals(ValueListEntryType.SupportConceptGoalType) || w.Type.Equals(ValueListEntryType.SupportConceptIndividualGoalType)).OrderBy(s => s.DisplayName).ToList(); var goalCategoryDict = new Dictionary(); @@ -72,7 +80,7 @@ namespace BeWo.Core.Service foreach (var goal in massnahmen) { var kind = new SupportConceptGoalDC { GoalEntryDC = goal, CheckRecursive = false }; - + CheckIfSelected(kind, selectedGoals); if (goal.ParentOid != null && goalCategoryDict.ContainsKey(goal.ParentOid.Value)) diff --git a/BeWo/Scheduler/ViewModel/CustomFieldStorage.cs b/BeWo/Scheduler/ViewModel/CustomFieldStorage.cs index bfd9ada68..7649bb7ae 100644 --- a/BeWo/Scheduler/ViewModel/CustomFieldStorage.cs +++ b/BeWo/Scheduler/ViewModel/CustomFieldStorage.cs @@ -58,6 +58,7 @@ namespace BeWo.Scheduler.ViewModel public DateTime? DueDate { get; set; } public DateTime? CompletedDate { get; set; } public string CompletedNotice { get; set; } + public string CompletedUser { get; set; } public string TaskDescription { get; set; } public long? SchedulerAppointmentOid { get; set; } diff --git a/BeWo/Scheduler/ViewModel/SchedulerAppointmentVM.cs b/BeWo/Scheduler/ViewModel/SchedulerAppointmentVM.cs index 960299982..b70be57bc 100644 --- a/BeWo/Scheduler/ViewModel/SchedulerAppointmentVM.cs +++ b/BeWo/Scheduler/ViewModel/SchedulerAppointmentVM.cs @@ -34,7 +34,8 @@ namespace BeWo.Scheduler.ViewModel public static string PropertyName_DueDate = nameof(DueDate); public static string PropertyName_CompletedDate = nameof(CompletedDate); public static string PropertyName_CompletedNotice = nameof(CompletedNotice); - public static string PropertyName_TaskDescription = nameof(TaskDescription); + public static string PropertyName_CompletedUser = nameof(CompletedUser); + public static string PropertyName_TaskDescription = nameof(TaskDescription); private bool _AllDay; private string _Description; @@ -55,7 +56,8 @@ namespace BeWo.Scheduler.ViewModel private bool _IsTask; private string _TaskDescription; private string _CompletedNotice; - private DateTime? _CompletedDate; + private string _CompletedUser; + private DateTime? _CompletedDate; private DateTime? _DueDate; private DateTime? _DueTime; private bool _HasServiceRecordEntry; @@ -121,7 +123,8 @@ namespace BeWo.Scheduler.ViewModel TaskDescription = customFieldStorage.TaskDescription; CompletedDate = customFieldStorage.CompletedDate; CompletedNotice = customFieldStorage.CompletedNotice; - SupportConceptList = customFieldStorage.SupportConceptList; + CompletedUser = customFieldStorage.CompletedUser; + SupportConceptList = customFieldStorage.SupportConceptList; } } @@ -490,7 +493,28 @@ namespace BeWo.Scheduler.ViewModel } } - public DateTime? CompletedDate + public string CompletedUser + { + get => _CompletedUser; + + set + { + if (AreDifferent(_CompletedUser, value)) + { + _CompletedUser = value; + + if (IsAbsenceTime) + { + return; + } + + StoreDirtyInformation(AreDifferent(DataContract.CompletedUser, value), nameof(CompletedUser)); + FirePropertyChanged(nameof(CompletedUser)); + } + } + } + + public DateTime? CompletedDate { get => _CompletedDate; @@ -626,7 +650,8 @@ namespace BeWo.Scheduler.ViewModel _IsTask = pDataContract.IsTask; _TaskDescription = pDataContract.TaskDescription; _CompletedNotice = pDataContract.CompletedNotice; - _CompletedDate = pDataContract.CompletedDate; + _CompletedUser = pDataContract.CompletedUser; + _CompletedDate = pDataContract.CompletedDate; _SupportConceptList = pDataContract.SupportConceptList ?? new List(); _HasServiceRecordEntry = pDataContract.HasServiceRecordEntry; @@ -660,7 +685,8 @@ namespace BeWo.Scheduler.ViewModel pDataContract.IsTask = _IsTask; pDataContract.TaskDescription = _TaskDescription; pDataContract.CompletedNotice = _CompletedNotice; - pDataContract.CompletedDate = _CompletedDate; + pDataContract.CompletedUser = _CompletedUser; + pDataContract.CompletedDate = _CompletedDate; pDataContract.SupportConceptList = _SupportConceptList; pDataContract.HasServiceRecordEntry = _HasServiceRecordEntry; pDataContract.ActivationType = _IsArchived ? ActivationTypeId.Archived : ActivationTypeId.Active; @@ -722,7 +748,8 @@ namespace BeWo.Scheduler.ViewModel Equals(CompletedDate, obj.CompletedDate) && Equals(DueDate, obj.DueDate) && Equals(CompletedNotice, obj.CompletedNotice) && - customFieldsAreEqual && + Equals(CompletedUser, obj.CompletedUser) && + customFieldsAreEqual && CustomerList.AreEqual(obj.CustomerList) && Equals(Description, obj.Description) && EmployeeList.AreEqual(obj.EmployeeList) && diff --git a/BeWo/View/Controls/ValueListEntryEditControl.xaml b/BeWo/View/Controls/ValueListEntryEditControl.xaml index e30d42c7f..57bccde61 100644 --- a/BeWo/View/Controls/ValueListEntryEditControl.xaml +++ b/BeWo/View/Controls/ValueListEntryEditControl.xaml @@ -14,18 +14,29 @@ + + -