diff --git a/e-suite.API.Common/e-suite.API.Common/GetMyAssignments.cs b/e-suite.API.Common/e-suite.API.Common/GetMyAssignments.cs index 17bc6c4..5e9f8c9 100644 --- a/e-suite.API.Common/e-suite.API.Common/GetMyAssignments.cs +++ b/e-suite.API.Common/e-suite.API.Common/GetMyAssignments.cs @@ -1,4 +1,5 @@ -using e_suite.Database.Core.Extensions; +using System.Diagnostics; +using e_suite.Database.Core.Extensions; using e_suite.Database.Core.Models; using eSuite.Core.Miscellaneous; @@ -14,13 +15,18 @@ public class GetMyAssignments : IGeneralId Role = assignment.Role?.ToGeneralIdRef(); TaskType = assignment.Task.TaskType; TaskName = assignment.Task.TaskName; + ActivityId = assignment.Task.Activity.ToGeneralIdRef(); + ActivityName = assignment.Task.Activity.Name; StartDateTime = assignment.StartDateTime; } + public long Id { get; set; } public Guid Guid { get; set; } public string TaskType { get; set; } public string TaskName { get; set; } + public GeneralIdRef ActivityId { get; set; } + public string ActivityName { get; set; } public GeneralIdRef? User { get; set; } public GeneralIdRef? Role { get; set; } diff --git a/e-suite.Core/eSuite.Core/Miscellaneous/GeneralIdRef.cs b/e-suite.Core/eSuite.Core/Miscellaneous/GeneralIdRef.cs index 72601f4..e28e7e5 100644 --- a/e-suite.Core/eSuite.Core/Miscellaneous/GeneralIdRef.cs +++ b/e-suite.Core/eSuite.Core/Miscellaneous/GeneralIdRef.cs @@ -12,7 +12,8 @@ public class GeneralIdRef : IGeneralIdRef, IEquatable { [JsonPropertyName("id")] public long? Id { get; set; } - [JsonPropertyName("Guid")] + + [JsonPropertyName("guid")] public Guid? Guid { get; set; } public bool Equals(GeneralIdRef? other) diff --git a/e-suite.Modules.RunningActivityManager/repository/ActivityRepository.cs b/e-suite.Modules.RunningActivityManager/repository/ActivityRepository.cs index 1eba58a..bc2537d 100644 --- a/e-suite.Modules.RunningActivityManager/repository/ActivityRepository.cs +++ b/e-suite.Modules.RunningActivityManager/repository/ActivityRepository.cs @@ -65,6 +65,7 @@ public class ActivityRepository : RepositoryBase, IActivityRepository .Include(x => x.Role) .ThenInclude(x => x.UserRoles.Where(ur => !ur.Deleted)) .ThenInclude(x => x.User) - .Include(x => x.Task); + .Include(x => x.Task) + .ThenInclude( x => x.Activity); } } \ No newline at end of file