This commit is contained in:
@@ -43,10 +43,10 @@ namespace AyaNova.Api.Controllers
|
|||||||
///
|
///
|
||||||
/// Required roles: Any
|
/// Required roles: Any
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="enumName"></param>
|
/// <param name="enumkey">The key name of the enumerated type</param>
|
||||||
/// <returns>List</returns>
|
/// <returns>List</returns>
|
||||||
[HttpGet("{enumname}")]
|
[HttpGet("list/{enumkey}")]
|
||||||
public ActionResult GetPickList([FromRoute]string enumName)
|
public ActionResult GetPickList([FromRoute]string enumkey)
|
||||||
{
|
{
|
||||||
if (!serverState.IsOpen)
|
if (!serverState.IsOpen)
|
||||||
{
|
{
|
||||||
@@ -58,7 +58,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
|
|
||||||
List<NameIdItem> ReturnList = new List<NameIdItem>();
|
List<NameIdItem> ReturnList = new List<NameIdItem>();
|
||||||
|
|
||||||
switch (enumName)
|
switch (enumkey)
|
||||||
{
|
{
|
||||||
case "usertypes":
|
case "usertypes":
|
||||||
{
|
{
|
||||||
@@ -101,28 +101,28 @@ namespace AyaNova.Api.Controllers
|
|||||||
var LT = LocaleBiz.GetSubsetStatic(LocaleKeysToFetch, LocaleId).Result;
|
var LT = LocaleBiz.GetSubsetStatic(LocaleKeysToFetch, LocaleId).Result;
|
||||||
|
|
||||||
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleNoRole"], Id = (long)AuthorizationRoles.NoRole });
|
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleNoRole"], Id = (long)AuthorizationRoles.NoRole });
|
||||||
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleBizAdminLimited"], Id = (long)AuthorizationRoles.NoRole });
|
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleBizAdminLimited"], Id = (long)AuthorizationRoles.BizAdminLimited });
|
||||||
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleBizAdminFull"], Id = (long)AuthorizationRoles.NoRole });
|
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleBizAdminFull"], Id = (long)AuthorizationRoles.BizAdminFull });
|
||||||
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleDispatchLimited"], Id = (long)AuthorizationRoles.NoRole });
|
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleDispatchLimited"], Id = (long)AuthorizationRoles.DispatchLimited });
|
||||||
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleDispatchFull"], Id = (long)AuthorizationRoles.NoRole });
|
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleDispatchFull"], Id = (long)AuthorizationRoles.DispatchFull });
|
||||||
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleInventoryLimited"], Id = (long)AuthorizationRoles.NoRole });
|
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleInventoryLimited"], Id = (long)AuthorizationRoles.InventoryLimited });
|
||||||
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleInventoryFull"], Id = (long)AuthorizationRoles.NoRole });
|
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleInventoryFull"], Id = (long)AuthorizationRoles.InventoryFull });
|
||||||
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleAccountingFull"], Id = (long)AuthorizationRoles.NoRole });
|
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleAccountingFull"], Id = (long)AuthorizationRoles.AccountingFull });
|
||||||
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleTechLimited"], Id = (long)AuthorizationRoles.NoRole });
|
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleTechLimited"], Id = (long)AuthorizationRoles.TechLimited });
|
||||||
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleTechFull"], Id = (long)AuthorizationRoles.NoRole });
|
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleTechFull"], Id = (long)AuthorizationRoles.TechFull });
|
||||||
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleSubContractorLimited"], Id = (long)AuthorizationRoles.NoRole });
|
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleSubContractorLimited"], Id = (long)AuthorizationRoles.SubContractorLimited });
|
||||||
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleSubContractorFull"], Id = (long)AuthorizationRoles.NoRole });
|
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleSubContractorFull"], Id = (long)AuthorizationRoles.SubContractorFull });
|
||||||
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleClientLimited"], Id = (long)AuthorizationRoles.NoRole });
|
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleClientLimited"], Id = (long)AuthorizationRoles.ClientLimited });
|
||||||
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleClientFull"], Id = (long)AuthorizationRoles.NoRole });
|
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleClientFull"], Id = (long)AuthorizationRoles.ClientFull });
|
||||||
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleOpsAdminLimited"], Id = (long)AuthorizationRoles.NoRole });
|
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleOpsAdminLimited"], Id = (long)AuthorizationRoles.OpsAdminLimited });
|
||||||
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleOpsAdminFull"], Id = (long)AuthorizationRoles.NoRole });
|
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleOpsAdminFull"], Id = (long)AuthorizationRoles.OpsAdminFull });
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ReturnList.Add(new NameIdItem() { Name = $"Unknown enum type list key value {enumName}", Id = (long)UserType.Administrator });
|
ReturnList.Add(new NameIdItem() { Name = $"Unknown enum type list key value {enumkey}", Id = (long)UserType.Administrator });
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -138,8 +138,8 @@ namespace AyaNova.Api.Controllers
|
|||||||
///
|
///
|
||||||
/// Required roles: Any
|
/// Required roles: Any
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>List of AyaNova enumerated type list keys that can be fetched from the AyaEnumPickList/GetPickListRoute</returns>
|
/// <returns>List of AyaNova enumerated type list key names that can be fetched from the AyaEnumPickList/GetPickListRoute</returns>
|
||||||
[HttpGet()]
|
[HttpGet("listkeys")]
|
||||||
public ActionResult GetTypesList()
|
public ActionResult GetTypesList()
|
||||||
{
|
{
|
||||||
if (!serverState.IsOpen)
|
if (!serverState.IsOpen)
|
||||||
|
|||||||
@@ -380,7 +380,7 @@ namespace AyaNova
|
|||||||
// ******************** TESTING WIPE DB *****************************
|
// ******************** TESTING WIPE DB *****************************
|
||||||
//
|
//
|
||||||
//Set this to true to wipe the db and reinstall a trial license and re-seed the data
|
//Set this to true to wipe the db and reinstall a trial license and re-seed the data
|
||||||
var TESTING_REFRESH_DB = false;//#############################################################################################
|
var TESTING_REFRESH_DB = true;//#############################################################################################
|
||||||
|
|
||||||
#if (DEBUG)
|
#if (DEBUG)
|
||||||
//TESTING
|
//TESTING
|
||||||
|
|||||||
Reference in New Issue
Block a user