Sending Is Active in Object Of Contact notes

This commit is contained in:
ashutosh.nehete 2025-05-29 11:49:08 +05:30
parent 0db199e74f
commit 361a2ab5c3
3 changed files with 4 additions and 2 deletions

View File

@ -234,7 +234,8 @@ namespace Marco.Pms.Model.Mapper
Note = note.Note, Note = note.Note,
ContactId = note.ContactId, ContactId = note.ContactId,
CreatedAt = note.CreatedAt, CreatedAt = note.CreatedAt,
CreatedBy = note.Createdby != null ? note.Createdby.ToBasicEmployeeVMFromEmployee() : null CreatedBy = note.Createdby != null ? note.Createdby.ToBasicEmployeeVMFromEmployee() : null,
IsActive = note.IsActive
}; };
} }
} }

View File

@ -11,5 +11,6 @@ namespace Marco.Pms.Model.ViewModels.Directory
public DateTime? UpdatedAt { get; set; } public DateTime? UpdatedAt { get; set; }
public BasicEmployeeVM? UpdatedBy { get; set; } public BasicEmployeeVM? UpdatedBy { get; set; }
public Guid ContactId { get; set; } public Guid ContactId { get; set; }
public bool IsActive { get; set; }
} }
} }

View File

@ -2150,7 +2150,7 @@ namespace Marco.Pms.Services.Helpers
if (notes.Any()) if (notes.Any())
{ {
List<Guid>? noteIds = notes.Select(n => n.Id).ToList(); List<Guid>? noteIds = notes.Select(n => n.Id).ToList();
List<DirectoryUpdateLog>? noteUpdateLogs = await _context.DirectoryUpdateLogs.Include(l => l.Employee).Where(l => noteIds.Contains(l.Id)).OrderByDescending(l => l.UpdateAt).ToListAsync(); List<DirectoryUpdateLog>? noteUpdateLogs = await _context.DirectoryUpdateLogs.Include(l => l.Employee).Where(l => noteIds.Contains(l.RefereanceId)).OrderByDescending(l => l.UpdateAt).ToListAsync();
List<ContactNoteVM>? noteVMs = new List<ContactNoteVM>(); List<ContactNoteVM>? noteVMs = new List<ContactNoteVM>();
foreach (var note in notes) foreach (var note in notes)
{ {