Fix sofkey config and name
Added refresh alarm
This commit is contained in:
@@ -47,32 +47,32 @@ namespace Step.Controllers.WebApi
|
||||
public IHttpActionResult GetSoftKeysConfig()
|
||||
{
|
||||
Dictionary<int, List<DTOSoftKeyConfigModel>> output = new Dictionary<int, List<DTOSoftKeyConfigModel>>();
|
||||
foreach (var softkey in SoftKeysConfig)
|
||||
foreach (var softKey in SoftKeysConfig)
|
||||
{
|
||||
// Check if category exists
|
||||
if (!output.ContainsKey(softkey.Category))
|
||||
if (!output.ContainsKey(softKey.Category))
|
||||
{
|
||||
// Add category if not exits
|
||||
output.Add(softkey.Category, new List< DTOSoftKeyConfigModel>());
|
||||
output.Add(softKey.Category, new List< DTOSoftKeyConfigModel>());
|
||||
}
|
||||
|
||||
// Create subkeys dictionary for group
|
||||
Dictionary<int, string> tmpSubKey = new Dictionary<int, string>();
|
||||
if (softkey.Type == SOFTKEY_TYPE.GROUP && softkey.SubKeys != null)
|
||||
if (softKey.Type == SOFTKEY_TYPE.GROUP && softKey.SubKeys != null)
|
||||
{
|
||||
tmpSubKey = new Dictionary<int, string>();
|
||||
foreach (var subkey in softkey.SubKeys)
|
||||
foreach (var subKey in softKey.SubKeys)
|
||||
{
|
||||
tmpSubKey.Add(subkey.Id, subkey.Text);
|
||||
tmpSubKey.Add(subKey.Id, subKey.Text);
|
||||
}
|
||||
}
|
||||
// Add to the category the new softkey
|
||||
output[softkey.Category].Add(new DTOSoftKeyConfigModel()
|
||||
output[softKey.Category].Add(new DTOSoftKeyConfigModel()
|
||||
{
|
||||
Id = softkey.Id,
|
||||
Category = softkey.Category,
|
||||
OperatorConfirmationNeeded = softkey.OperatorConfirmationNeeded,
|
||||
Type = softkey.Type,
|
||||
Id = softKey.Id,
|
||||
Category = softKey.Category,
|
||||
OperatorConfirmationNeeded = softKey.OperatorConfirmationNeeded,
|
||||
Type = softKey.Type,
|
||||
SubKeys = tmpSubKey
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user