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