This commit is contained in:
@@ -80,16 +80,10 @@ TODO CLIENT STUFF
|
|||||||
|
|
||||||
TODO SERVER STUFF
|
TODO SERVER STUFF
|
||||||
|
|
||||||
- TAGS: REally need to have a think about how tags are used in the UI, probably need a autofill route that has a source of used or common tags to drive it
|
|
||||||
- so user can type first fiew characters adn select
|
|
||||||
- So consistency is maintained and not sloppy multiple spellings
|
|
||||||
- Maybe a db stored procedure and trigger or biz code that feeds a consolidated tag table of all entered tags in the system?
|
|
||||||
- Maybe a reference count for each tag to drive a tag cloud feature and also a order by commonality feature when offering and also to know when to remove from
|
|
||||||
the tag repository when no one is using that tag anymore in any records
|
|
||||||
|
|
||||||
- TAG ROUTE: LIST route to fetch tags in Alphabetical order by name based on starts with (or maybe contains) used for quickly autofilling a list at UI level
|
|
||||||
- TAG ROUTE: CLOUD route to fetch tags in order of refcount decreasing
|
- TAG ROUTE: CLOUD route to fetch tags in order of refcount decreasing
|
||||||
- TAG repo tests: ensure updates delete and add properly, ensure new adds properly, ensure lists work properly
|
- TAG repo tests: ensure updates delete and add properly, ensure new adds properly, ensure lists work properly
|
||||||
|
- TAG Ref count test:
|
||||||
|
|
||||||
- Boot server and seed with debug log turned on, see what is being tracked by EF that doesn't need to, seems some of that shit is being tracked.
|
- Boot server and seed with debug log turned on, see what is being tracked by EF that doesn't need to, seems some of that shit is being tracked.
|
||||||
- Docs: pagingOptions, sort and filter need to be documented for API
|
- Docs: pagingOptions, sort and filter need to be documented for API
|
||||||
|
|||||||
@@ -47,8 +47,8 @@ namespace AyaNova.Api.Controllers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="query">The query to filter the returned list by</param>
|
/// <param name="query">The query to filter the returned list by</param>
|
||||||
/// <returns>List</returns>
|
/// <returns>List</returns>
|
||||||
[HttpGet("list/{query}")]
|
[HttpGet("picklist")]
|
||||||
public ActionResult GetPickList([FromRoute]string query)
|
public ActionResult GetPickList([FromQuery]string query)
|
||||||
{
|
{
|
||||||
if (!serverState.IsOpen)
|
if (!serverState.IsOpen)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -153,8 +153,17 @@ namespace AyaNova.Biz
|
|||||||
//going with contains for now as I think it's more useful in the long run and still captures startswith intent by user
|
//going with contains for now as I think it's more useful in the long run and still captures startswith intent by user
|
||||||
public static List<string> PickListFiltered(AyContext ct, string q)
|
public static List<string> PickListFiltered(AyContext ct, string q)
|
||||||
{
|
{
|
||||||
q = NormalizeTag(q);
|
//This path is intended for internal use and accepts that there may not be a filter specified
|
||||||
return ct.Tag.Where(x => x.Name.Contains(q)).OrderBy(x => x.Name).Select(x => x.Name).ToList();
|
//however the client will always require a filter to display a tag list for choosing from
|
||||||
|
if (string.IsNullOrWhiteSpace(q))
|
||||||
|
{
|
||||||
|
return ct.Tag.OrderBy(x => x.Name).Select(x => x.Name).ToList();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
q = NormalizeTag(q);
|
||||||
|
return ct.Tag.Where(x => x.Name.Contains(q)).OrderBy(x => x.Name).Select(x => x.Name).ToList();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user