Added the organization type in assignd organization list
This commit is contained in:
parent
d8329f1fab
commit
8ddb414e91
@ -11,6 +11,7 @@ namespace Marco.Pms.Model.ViewModels.Organization
|
||||
public string? ContactPerson { get; set; }
|
||||
public double SPRID { get; set; }
|
||||
public string? logoImage { get; set; }
|
||||
public string? OrganizationType { get; set; }
|
||||
public DateTime AssignedDate { get; set; }
|
||||
public BasicEmployeeVM? AssignedBy { get; set; }
|
||||
public ServiceMasterVM? Service { get; set; }
|
||||
|
@ -2679,6 +2679,8 @@ namespace Marco.Pms.Services.Service
|
||||
.AsNoTracking()
|
||||
.Include(po => po.ProjectService)
|
||||
.ThenInclude(ps => ps!.Service)
|
||||
.Include(po => po.AssignedBy)
|
||||
.Include(po => po.OrganizationType)
|
||||
.Include(po => po.Organization)
|
||||
.Where(po => po.ProjectService != null
|
||||
&& po.ProjectService.ProjectId == projectId
|
||||
@ -2695,7 +2697,7 @@ namespace Marco.Pms.Services.Service
|
||||
|
||||
// Filter and map the data to the desired view model
|
||||
var response = projectOrgMappings
|
||||
.Where(po => po.Organization != null)
|
||||
.Where(po => po.Organization != null && po.OrganizationType != null)
|
||||
.Select(po => new ProjectOrganizationVM
|
||||
{
|
||||
Id = po.Organization!.Id,
|
||||
@ -2704,6 +2706,7 @@ namespace Marco.Pms.Services.Service
|
||||
ContactPerson = po.Organization.ContactPerson,
|
||||
SPRID = po.Organization.SPRID,
|
||||
logoImage = po.Organization.logoImage,
|
||||
OrganizationType = po.OrganizationType!.Name,
|
||||
AssignedBy = _mapper.Map<BasicEmployeeVM>(po.AssignedBy),
|
||||
Service = _mapper.Map<ServiceMasterVM>(po.ProjectService!.Service),
|
||||
AssignedDate = po.AssignedDate,
|
||||
@ -2733,6 +2736,7 @@ namespace Marco.Pms.Services.Service
|
||||
ContactPerson = pmc.ContactPerson,
|
||||
SPRID = pmc.SPRID,
|
||||
logoImage = pmc.logoImage,
|
||||
OrganizationType = "PMC",
|
||||
AssignedBy = assignedBy,
|
||||
AssignedDate = assignedDate,
|
||||
CompletionDate = completionDate
|
||||
@ -2748,6 +2752,7 @@ namespace Marco.Pms.Services.Service
|
||||
ContactPerson = promoter.ContactPerson,
|
||||
SPRID = promoter.SPRID,
|
||||
logoImage = promoter.logoImage,
|
||||
OrganizationType = "Promotor",
|
||||
AssignedBy = assignedBy,
|
||||
AssignedDate = assignedDate,
|
||||
CompletionDate = completionDate
|
||||
@ -2763,6 +2768,7 @@ namespace Marco.Pms.Services.Service
|
||||
ContactPerson = organization.ContactPerson,
|
||||
SPRID = organization.SPRID,
|
||||
logoImage = organization.logoImage,
|
||||
OrganizationType = "Primary",
|
||||
AssignedBy = assignedBy,
|
||||
AssignedDate = assignedDate,
|
||||
CompletionDate = completionDate
|
||||
|
Loading…
x
Reference in New Issue
Block a user