diff --git a/Libs/CMS_CORE_Library.dll b/Libs/CMS_CORE_Library.dll index 81303a64..54bef2fa 100644 Binary files a/Libs/CMS_CORE_Library.dll and b/Libs/CMS_CORE_Library.dll differ diff --git a/Step.Database/Controllers/AlarmsController.cs b/Step.Database/Controllers/AlarmsController.cs index 6a0f9ea9..a5ef2f53 100644 --- a/Step.Database/Controllers/AlarmsController.cs +++ b/Step.Database/Controllers/AlarmsController.cs @@ -46,7 +46,8 @@ namespace Step.Database.Controllers // Get Plc messages ids List plcAlarmDescIds = plcMessages - .Where(x => x.Value.Contains(title)) + .Where(x => x.Value.IndexOf(title, StringComparison.OrdinalIgnoreCase) >= 0) + //.Where(x => x.Value.Contains(title)) .Select(x => x.Key) .ToList(); @@ -62,9 +63,9 @@ namespace Step.Database.Controllers && ((x.Source == ALARM_SOURCE.NC && ncAlarmDescIds.Contains(x.AlarmDescriptionId.Value)) // Check if message is contained in NC messages || (x.Source == ALARM_SOURCE.PLC && plcAlarmDescIds.Contains(x.AlarmId))) // Check if message is contained in PLC messages - ).OrderByDescending(t => t.TimeStamp); + ).OrderByDescending(t => t.AlarmOccurrenceId); - double tmpPages = occurrencesQuery.Count() / pageSize; + double tmpPages = (double)occurrencesQuery.Count() / (double)pageSize; pages = (int)Math.Ceiling(tmpPages); var paginatedQuery = occurrencesQuery diff --git a/Step/Controllers/WebApi/FavoriteUserSoftKeyController.cs b/Step/Controllers/WebApi/FavoriteUserSoftKeyController.cs index 0b5f81e1..3aaff953 100644 --- a/Step/Controllers/WebApi/FavoriteUserSoftKeyController.cs +++ b/Step/Controllers/WebApi/FavoriteUserSoftKeyController.cs @@ -16,7 +16,7 @@ namespace Step.Controllers.WebApi public class FavoriteUserSoftkeyController : ApiController { [Route("favorite"), HttpGet] - [WebApiAuthorize(FunctionAccess = FUNCTIONALITY_NAMES.USER_SOFTKEY, Action = ACTIONS.WRITE)] + [WebApiAuthorize(FunctionAccess = FUNCTIONALITY_NAMES.USER_SOFTKEY, Action = ACTIONS.READ)] public IHttpActionResult GetFavoriteSoftkeys() { var identity = User.Identity as ClaimsIdentity; diff --git a/Step/wwwroot/src/app_modules/tooling/components/tooling-equipment.vue b/Step/wwwroot/src/app_modules/tooling/components/tooling-equipment.vue index 607eadce..e2315caa 100644 --- a/Step/wwwroot/src/app_modules/tooling/components/tooling-equipment.vue +++ b/Step/wwwroot/src/app_modules/tooling/components/tooling-equipment.vue @@ -69,7 +69,7 @@
- +
{{'tooling_equipment_editlabel' | localize("Modifica utensile %d",selectedTool.id,selectedTool.familyName)}}
{{'tooling_equipment_editlabel' | localize("Modifica utensile %d",selectedTool.id)}}
{{'tooling_equipment_newlabel' | localize("Creazione Nuovo Utensile")}}
diff --git a/Step/wwwroot/src/store/tooling.store.ts b/Step/wwwroot/src/store/tooling.store.ts index 7567e8e7..02da74f0 100644 --- a/Step/wwwroot/src/store/tooling.store.ts +++ b/Step/wwwroot/src/store/tooling.store.ts @@ -215,6 +215,14 @@ export const toolingStore = { store._ncTools.set(model.id, model); store.ncTools = Array.from(store._ncTools.values()); }, + UpdateNcTools(store, model: server.ToolNc[]){ + // populate _ncTools + for(var i = 0; i < model.length; i ++){ + store._ncTools.set(model[i].id, model[i]); + } + // Copy into data + store.ncTools = Array.from(store._ncTools.values()); + }, UpdateEdgeData(store, model: server.EdgesData){ store._edgesData.set(model.id, model); store.edgesData = Array.from(store._edgesData.values()); @@ -766,10 +774,13 @@ export const toolingStore = { } }, updateNcTools(context, model: server.ToolNc[]) { - for (const key in model) { - const element = model[key]; - context.commit("UpdateNcTool", element); - } + context.commit("UpdateNcTools", model); + + + //for (const key in model) { + //const element = model[key]; + //context.commit("UpdateNcTool", element); + //} }, updateFamily(context, model: server.Families) { context.commit("UpdateFamily", model);