This commit is contained in:
@@ -21,10 +21,10 @@ namespace AyaNova.Api.Controllers
|
||||
[Route("api/v{version:apiVersion}/[controller]")]
|
||||
[Produces("application/json")]
|
||||
[Authorize]
|
||||
public class EnumPickListController : ControllerBase
|
||||
public class EnumListController : ControllerBase
|
||||
{
|
||||
private readonly AyContext ct;
|
||||
private readonly ILogger<EnumPickListController> log;
|
||||
private readonly ILogger<EnumListController> log;
|
||||
private readonly ApiServerState serverState;
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace AyaNova.Api.Controllers
|
||||
/// <param name="dbcontext"></param>
|
||||
/// <param name="logger"></param>
|
||||
/// <param name="apiServerState"></param>
|
||||
public EnumPickListController(AyContext dbcontext, ILogger<EnumPickListController> logger, ApiServerState apiServerState)
|
||||
public EnumListController(AyContext dbcontext, ILogger<EnumListController> logger, ApiServerState apiServerState)
|
||||
{
|
||||
ct = dbcontext;
|
||||
log = logger;
|
||||
@@ -48,7 +48,7 @@ namespace AyaNova.Api.Controllers
|
||||
/// <param name="enumkey">The key name of the enumerated type</param>
|
||||
/// <returns>List</returns>
|
||||
[HttpGet("list/{enumkey}")]
|
||||
public ActionResult GetPickList([FromRoute]string enumkey)
|
||||
public ActionResult GetList([FromRoute]string enumkey)
|
||||
{
|
||||
if (!serverState.IsOpen)
|
||||
{
|
||||
@@ -166,9 +166,9 @@ namespace AyaNova.Api.Controllers
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Get all possible enumerated values picklist key names
|
||||
/// Get all possible enumerated values list key names
|
||||
/// </summary>
|
||||
/// <returns>List of AyaNova enumerated type list key names that can be fetched from the AyaEnumPickList/GetPickListRoute</returns>
|
||||
/// <returns>List of AyaNova enumerated type list key names that can be fetched from the GetList Route</returns>
|
||||
[HttpGet("listkeys")]
|
||||
public ActionResult GetTypesList()
|
||||
{
|
||||
|
||||
@@ -98,7 +98,7 @@ namespace AyaNova.Api.Controllers
|
||||
/// Get available types allowed for Custom fields
|
||||
/// Used to build UI for customizing a form
|
||||
/// These values are a subset of the AyaDataTypes values
|
||||
/// which can be fetched from the EnumPickList route
|
||||
/// which can be fetched from the EnumList route
|
||||
/// </summary>
|
||||
/// <returns>A list of valid values for custom field types</returns>
|
||||
[HttpGet("AvailableCustomTypes")]
|
||||
|
||||
@@ -8,9 +8,6 @@ namespace AyaNova.DataList
|
||||
public static class DataListSqlFilterOrderByBuilder
|
||||
{
|
||||
|
||||
// public static string DefaultGetManyOrderBy => "ORDER BY ID DESC";
|
||||
|
||||
// public static string DefaultPickListOrderBy => "ORDER BY NAME ASC";
|
||||
|
||||
public static string DataFilterToSQLOrderBy(List<AyaDataListFieldDefinition> objectFieldsList, JArray listViewArray)
|
||||
{
|
||||
@@ -60,8 +57,8 @@ namespace AyaNova.DataList
|
||||
if (sb.Length == 0)
|
||||
{
|
||||
//no sort specified so default it
|
||||
AyaDataListFieldDefinition rid = objectFieldsList.FirstOrDefault(x => x.IsRowId == true);
|
||||
if (rid!=null)
|
||||
AyaDataListFieldDefinition rid = objectFieldsList.FirstOrDefault(x => x.IsRowId == true);
|
||||
if (rid != null)
|
||||
{
|
||||
return $"ORDER BY {rid.SqlIdColumnName} DESC";
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ namespace AyaNova.Biz
|
||||
|
||||
|
||||
|
||||
//get picklist (NOT PAGED)
|
||||
//get ViewList (NOT PAGED)
|
||||
internal async Task<List<NameIdItem>> GetViewListAsync(string listKey)
|
||||
{
|
||||
List<NameIdItem> items = new List<NameIdItem>();
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace AyaNova.Biz
|
||||
|
||||
|
||||
|
||||
//get picklist (simple non-paged)
|
||||
//get list (simple non-paged)
|
||||
internal async Task<List<NameIdItem>> GetTranslationListAsync()
|
||||
{
|
||||
List<NameIdItem> l = new List<NameIdItem>();
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace AyaNova.Models
|
||||
public uint ConcurrencyToken { get; set; }
|
||||
|
||||
[Required]
|
||||
public long UserId { get; set; }//only relevant if non-public for fetching either in picklist or single (public true OR userid matches)
|
||||
public long UserId { get; set; }//only relevant if non-public for fetching either in list or single (public true OR userid matches)
|
||||
[Required, MaxLength(255)]
|
||||
public string Name { get; set; }//max 255 characters ascii set
|
||||
[Required]
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace AyaNova.Models
|
||||
- FieldKey "fld"
|
||||
- Hide "hide"
|
||||
- Required "required"
|
||||
- Type One of values from AyDataType but not tags or enum (bool, date, date time, decimal, number, picklist(FUTURE), and text)
|
||||
- Type One of values from AyDataType but not tags or enum (bool, date, date time, decimal, number, p icklist(FUTURE), and text)
|
||||
- e.g.: [{fld:"ltkeyfieldname",hide:"true/false",required:"true/false", type:"bool"},{fld:"ltkeyfieldname",hide:"true/false",required:"true/false", type:"text"]
|
||||
|
||||
*/
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
namespace AyaNova.Models
|
||||
{
|
||||
|
||||
public partial class PickListResult
|
||||
{
|
||||
public int TotalRecordCount { get; set; }
|
||||
public NameIdItem[] Items { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user