Compare commits
No commits in common. "24ee3f685a9167ba779dba42ae46e5720e567369" and "fc6ecd059c204b457fceaf6c30231ccc10c32a13" have entirely different histories.
24ee3f685a
...
fc6ecd059c
@ -721,8 +721,7 @@ namespace Marco.Pms.Services.Controllers
|
|||||||
[HttpGet("contact-tags")]
|
[HttpGet("contact-tags")]
|
||||||
public async Task<IActionResult> GetContactTagMasterList()
|
public async Task<IActionResult> GetContactTagMasterList()
|
||||||
{
|
{
|
||||||
var response = await _masterHelper.GetContactTags();
|
return Ok();
|
||||||
return Ok(response);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet("contact-tag/{id})")]
|
[HttpGet("contact-tag/{id})")]
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
using System.Linq;
|
using Marco.Pms.DataAccess.Data;
|
||||||
using Marco.Pms.DataAccess.Data;
|
|
||||||
using Marco.Pms.Model.Directory;
|
using Marco.Pms.Model.Directory;
|
||||||
using Marco.Pms.Model.Dtos.Master;
|
using Marco.Pms.Model.Dtos.Master;
|
||||||
using Marco.Pms.Model.Mapper;
|
using Marco.Pms.Model.Mapper;
|
||||||
@ -66,23 +65,6 @@ namespace Marco.Pms.Services.Helpers
|
|||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------- Contact Tag --------------------------------
|
// -------------------------------- Contact Tag --------------------------------
|
||||||
|
|
||||||
|
|
||||||
public async Task<ApiResponse<Object>> GetContactTags()
|
|
||||||
{
|
|
||||||
Guid tenantId = _userHelper.GetTenantId();
|
|
||||||
|
|
||||||
var LoggedInEmployee = await _userHelper.GetCurrentEmployeeAsync();
|
|
||||||
|
|
||||||
var taglist = await _context.ContactTagMasters.Where(t => t.TenantId == tenantId).ToListAsync();
|
|
||||||
List<ContactTagVM> contactTags = new List<ContactTagVM>();
|
|
||||||
foreach (var tag in taglist) {
|
|
||||||
ContactTagVM tagVm = tag.ToContactTagVMFromContactTagMaster();
|
|
||||||
contactTags.Add(tagVm);
|
|
||||||
}
|
|
||||||
_logger.LogInfo("{count} contact Tags are fetched by Employee with ID {LoggedInEmployeeId}", contactTags.Count, LoggedInEmployee.Id);
|
|
||||||
return ApiResponse<object>.SuccessResponse(contactTags, System.String.Format("{0} contact tags fetched successfully", contactTags.Count),200);
|
|
||||||
}
|
|
||||||
// -------------------------------- Bucket --------------------------------
|
// -------------------------------- Bucket --------------------------------
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user