Added check to check the Designation in create contact API

This commit is contained in:
ashutosh.nehete 2025-09-29 11:15:14 +05:30
parent 31da8a4402
commit 5df66b79ca

View File

@ -956,10 +956,14 @@ namespace Marco.Pms.Services.Service
try try
{ {
var contact = _mapper.Map<Contact>(createContact); var contact = _mapper.Map<Contact>(createContact);
if (string.IsNullOrWhiteSpace(createContact.Name)) if (string.IsNullOrWhiteSpace(createContact.Description))
{ {
contact.Description = string.Empty; contact.Description = string.Empty;
} }
if (string.IsNullOrWhiteSpace(createContact.Designation))
{
contact.Designation = string.Empty;
}
contact.CreatedAt = DateTime.UtcNow; contact.CreatedAt = DateTime.UtcNow;
contact.CreatedById = loggedInEmployeeId; contact.CreatedById = loggedInEmployeeId;
contact.TenantId = tenantId; contact.TenantId = tenantId;