This commit is contained in:
2018-09-07 18:48:50 +00:00
parent a70f599008
commit d2783cf626
3 changed files with 51 additions and 45 deletions

View File

@@ -134,7 +134,7 @@ namespace AyaNova.Api.Controllers
/// </summary>
/// <param name="id">TagGroupId</param>
/// <returns>name value list of all tags in group</returns>
[HttpGet("TagsInGroupPickList")]
[HttpGet("TagsInGroupPickList/{id}")]
public async Task<IActionResult> TagsInGroupPickList([FromRoute] long id)
{
if (!serverState.IsOpen)

View File

@@ -145,9 +145,12 @@ namespace AyaNova.Biz
//get picklist (simple non-paged)
internal async Task<List<NameIdItem>> GetTagsInGroupPickListAsync(long tagGroupId)
{
TODO: change this to return a name value list of tags in group
//first, get an array of the tagId's in this group
var tagGroupTags = await ct.TagGroupMap.Where(m => m.TagGroupId == tagGroupId).Select(m => m.TagId).ToArrayAsync();
List<NameIdItem> l = new List<NameIdItem>();
l = await ct.Locale
l = await ct.Tag
.Where(m => tagGroupTags.Contains(m.Id))
.OrderBy(m => m.Name)
.Select(m => new NameIdItem()
{