Ziele Massnahmen Trennung
This commit is contained in:
@@ -54,7 +54,10 @@ namespace AICore.Context.Entry.Navigation
|
||||
[JsonPropertyName("Mitarbeiter")]
|
||||
public string Employee { get; set; }
|
||||
|
||||
[JsonPropertyName("Ziele")]
|
||||
[JsonPropertyName("Massnahmen")]
|
||||
public List<string> Goals { get; set; }
|
||||
|
||||
[JsonPropertyName("Ziele")]
|
||||
public List<string> GoalCategories { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using AICore.Context.Entry.Navigation;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.Extensions;
|
||||
|
||||
namespace AICore.Context.EntryMapper.Detail
|
||||
{
|
||||
@@ -26,10 +28,31 @@ namespace AICore.Context.EntryMapper.Detail
|
||||
pContext.InsUser = pObject.InsUser;
|
||||
pContext.Employee = pObject.Employee.FirstNameLastName;
|
||||
pContext.Goals = new System.Collections.Generic.List<string>();
|
||||
pContext.GoalCategories = new System.Collections.Generic.List<string>();
|
||||
|
||||
if (pObject.Goals is object && pObject.Goals.Any())
|
||||
{
|
||||
pContext.Goals.AddRange(pObject.Goals.Select(x => x.TypeDescription));
|
||||
foreach (var goal in pObject.Goals)
|
||||
{
|
||||
if(goal.Type == ValueListEntryType.SupportConceptGoalCategoryType
|
||||
|| goal.Type == ValueListEntryType.SupportConceptIndividualGoalCategoryType)
|
||||
{
|
||||
// Ziel
|
||||
|
||||
pContext.GoalCategories.Add(goal.TypeDescription);
|
||||
}
|
||||
else if (goal.Type == ValueListEntryType.SupportConceptGoalType
|
||||
|| goal.Type == ValueListEntryType.SupportConceptIndividualGoalType)
|
||||
{
|
||||
// Massnahme
|
||||
|
||||
pContext.Goals.Add(goal.TypeDescription);
|
||||
}
|
||||
else
|
||||
{
|
||||
// sonst
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user