Compare commits
No commits in common. "4d508f43eb6c84531592b372845eac39e53082d3" and "173b23f7d3392f80834f2a5a3fe443994e1c831f" have entirely different histories.
4d508f43eb
...
173b23f7d3
@ -676,8 +676,7 @@ namespace Marco.Pms.Services.Controllers
|
|||||||
[HttpGet("contact-categories")]
|
[HttpGet("contact-categories")]
|
||||||
public async Task<IActionResult> GetContactCategoryMasterList()
|
public async Task<IActionResult> GetContactCategoryMasterList()
|
||||||
{
|
{
|
||||||
var response = await _masterHelper.GetContactCategoriesList();
|
return Ok();
|
||||||
return Ok(response);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet("contact-category/{id})")]
|
[HttpGet("contact-category/{id})")]
|
||||||
@ -716,7 +715,7 @@ namespace Marco.Pms.Services.Controllers
|
|||||||
return Ok();
|
return Ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------- Contact Tag --------------------------------
|
// -------------------------------- Contact Category --------------------------------
|
||||||
|
|
||||||
[HttpGet("contact-tags")]
|
[HttpGet("contact-tags")]
|
||||||
public async Task<IActionResult> GetContactTagMasterList()
|
public async Task<IActionResult> GetContactTagMasterList()
|
||||||
|
@ -48,22 +48,6 @@ namespace Marco.Pms.Services.Helpers
|
|||||||
return ApiResponse<object>.ErrorResponse("User Send empty Payload", "User Send empty Payload", 400);
|
return ApiResponse<object>.ErrorResponse("User Send empty Payload", "User Send empty Payload", 400);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<ApiResponse<object>> GetContactCategoriesList()
|
|
||||||
{
|
|
||||||
Guid tenantId = _userHelper.GetTenantId();
|
|
||||||
var LoggedInEmployee = await _userHelper.GetCurrentEmployeeAsync();
|
|
||||||
|
|
||||||
var categoryList = await _context.ContactCategoryMasters.Where(c => c.TenantId == tenantId).ToListAsync();
|
|
||||||
List<ContactCategoryVM> contactCategories = new List<ContactCategoryVM>();
|
|
||||||
foreach (var category in categoryList)
|
|
||||||
{
|
|
||||||
ContactCategoryVM categoryVM = category.ToContactCategoryVMFromContactCategoryMaster();
|
|
||||||
contactCategories.Add(categoryVM);
|
|
||||||
}
|
|
||||||
_logger.LogInfo("{count} contact categoires are fetched by Employee with ID {LoggedInEmployeeId}", contactCategories.Count, LoggedInEmployee.Id);
|
|
||||||
return ApiResponse<object>.SuccessResponse(contactCategories, System.String.Format("{0} contact categories fetched successfully", contactCategories.Count), 200);
|
|
||||||
}
|
|
||||||
|
|
||||||
// -------------------------------- Contact Tag --------------------------------
|
// -------------------------------- Contact Tag --------------------------------
|
||||||
// -------------------------------- Bucket --------------------------------
|
// -------------------------------- Bucket --------------------------------
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user