Added an API to Get a list of buckets Assigned to that employee
This commit is contained in:
parent
b161ed7c15
commit
fd14670914
@ -144,23 +144,6 @@ namespace Marco.Pms.Services.Helpers
|
||||
return ApiResponse<object>.SuccessResponse(new { }, "Category deleted successfully", 200);
|
||||
}
|
||||
|
||||
|
||||
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 --------------------------------
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user