diff --git a/Marco.Pms.Model/ViewModels/Organization/OrganizationDetailsVM.cs b/Marco.Pms.Model/ViewModels/Organization/OrganizationDetailsVM.cs index ca12c1c..3dc8c49 100644 --- a/Marco.Pms.Model/ViewModels/Organization/OrganizationDetailsVM.cs +++ b/Marco.Pms.Model/ViewModels/Organization/OrganizationDetailsVM.cs @@ -1,4 +1,5 @@ -using Marco.Pms.Model.ViewModels.Activities; +using Marco.Pms.Model.Master; +using Marco.Pms.Model.ViewModels.Activities; namespace Marco.Pms.Model.ViewModels.Organization { @@ -19,6 +20,7 @@ namespace Marco.Pms.Model.ViewModels.Organization public DateTime? UpdatedAt { get; set; } public bool IsActive { get; set; } public List? Projects { get; set; } + public List? Services { get; set; } public string? logoImage { get; set; } } } diff --git a/Marco.Pms.Services/Controllers/OrganizationController.cs b/Marco.Pms.Services/Controllers/OrganizationController.cs index de2546b..47d3030 100644 --- a/Marco.Pms.Services/Controllers/OrganizationController.cs +++ b/Marco.Pms.Services/Controllers/OrganizationController.cs @@ -233,6 +233,7 @@ namespace Marco.Pms.Services.Controllers response.CreatedBy = _mapper.Map(createdByEmployee); response.UpdatedBy = _mapper.Map(updatedByEmployee); response.Projects = _mapper.Map>(projectOrgMappings.Select(po => po.ProjectService).ToList()); + response.Services = orgServiceMappings.Where(os => os.Service != null).Select(os => os.Service!).ToList(); _logger.LogInfo("Fetched organization details for OrganizationId: {OrganizationId}, Employee count: {EmployeeCount}, App user count: {AppUserCount}, Project count: {ProjectCount}", id, activeEmployeeCount, activeApplicationUserCount, response.Projects.Count);