axis)
{
diff --git a/Thermo.Active.Model/DTOModels/DTOMessageModel.cs b/Thermo.Active.Model/DTOModels/DTOMessageModel.cs
index 05424e14..ad14286d 100644
--- a/Thermo.Active.Model/DTOModels/DTOMessageModel.cs
+++ b/Thermo.Active.Model/DTOModels/DTOMessageModel.cs
@@ -10,10 +10,5 @@ namespace Thermo.Active.Model.DTOModels
public string Department { get; set; }
- public DateTime TimeStamp { get; set; }
-
- public string UserId { get; set; }
-
- public Guid Id { get; set; }
}
}
\ No newline at end of file
diff --git a/Thermo.Active/Controllers/WebApi/CmsConnectController.cs b/Thermo.Active/Controllers/WebApi/CmsConnectController.cs
index 1ec77b6f..9f1e4e97 100644
--- a/Thermo.Active/Controllers/WebApi/CmsConnectController.cs
+++ b/Thermo.Active/Controllers/WebApi/CmsConnectController.cs
@@ -3,11 +3,13 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Net;
+using System.Security.Claims;
using System.Web.Http;
using TeamDev.SDK.MVVM;
using Thermo.Active.CmsConnectGateway;
using Thermo.Active.CmsConnectGateway.Events;
using Thermo.Active.CmsConnectGateway.Exceptions;
+using Thermo.Active.Database.Controllers;
using Thermo.Active.Model.DTOModels;
using static Thermo.Active.Model.Constants;
@@ -238,5 +240,28 @@ namespace Thermo.Active.Controllers.WebApi
}
}
+ [Route("message"), HttpPost]
+ public IHttpActionResult sendMessages([FromBody][Required]DTOMessageModel message)
+ {
+ var identity = User.Identity as ClaimsIdentity;
+ // Find user id from the bearer token
+ var userId = identity.Claims.FirstOrDefault(c => c.Type == USER_ID_KEY);
+ if (userId == null)
+ return Unauthorized();
+
+ int userIdInt = Convert.ToInt32(userId.Value);
+ using (UsersController usersController = new UsersController())
+ {
+ // Update database with new language
+ DTOMessageUserModel user = usersController.GetUserInfo(userIdInt);
+ String username = user.Username + " (" +user.FirstName + " " + user.LastName + ")";
+
+ var ts = DateTime.UtcNow.ToString("o");
+ var a = "{\"v\": { \"userId\": \"" + username + "\", \"text\": \"" + message.Message + "\", \"resolutionHrs\": " + message.EstimateTime + ", \"department\": \"" + message.Department + "\"},\"ts\": \"" + ts + "\"}";
+ RedisController.SendMessage(a);
+ }
+ return Ok();
+ }
+
}
}
diff --git a/Thermo.Active/wwwroot/src/app_modules/machine/components/cmsconnect-info-dialog.vue b/Thermo.Active/wwwroot/src/app_modules/machine/components/cmsconnect-info-dialog.vue
index 134d2004..56a756a8 100644
--- a/Thermo.Active/wwwroot/src/app_modules/machine/components/cmsconnect-info-dialog.vue
+++ b/Thermo.Active/wwwroot/src/app_modules/machine/components/cmsconnect-info-dialog.vue
@@ -211,7 +211,7 @@
:isEnrolled="cmsConnectActivationData().isEnrolled">
-
+
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.ts
index 53372579..7f0cd0bf 100644
--- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.ts
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.ts
@@ -5,6 +5,8 @@ import { Prop } from 'vue-property-decorator';
import { Hub } from "@/services";
import Numeric from "./numeric";
import { unitOfTime } from "moment";
+import { KeyboardHelper } from "@/app_modules_thermo/components/KeyboardHelper";
+
@Component({ name: "slider" })
export default class Slider extends Vue {
@@ -54,10 +56,18 @@ export default class Slider extends Vue {
startIncrementTouch(event){
event.preventDefault();
this.startIncrement();
+ KeyboardHelper.hideKeyboard();
+
}
+
+ touchSlider(event){
+ KeyboardHelper.hideKeyboard();
+ }
+
startDecrementTouch(event){
event.preventDefault();
this.startDecrement();
+ KeyboardHelper.hideKeyboard();
}
startIncrement() {
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.vue
index 9eb0cf50..07405c73 100644
--- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.vue
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.vue
@@ -15,6 +15,7 @@
:max="this.value.range.max"
:step="this.initalStep"
v-model.number="actualvalue"
+ v-on:touchstart="touchSlider"
type="range"
/>
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/thermocamera.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/thermocamera.ts
index 0158c78b..113ab46c 100644
--- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/thermocamera.ts
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/thermocamera.ts
@@ -48,7 +48,15 @@ export default class Thermocamera extends Vue {
if(this.modeEnabled.checkpointHMI != this.modeEnabled.setpointHMI)
this.$emit("enabChanged");
if(this.modeEnabled.setpointHMI == 1)
+ {
store.state.warmers.tCamStatus.thermoCamMode = true;
+ store.state.warmers.channels.forEach(function(element, index){
+ if (element.setpointHMI==0)
+ store.state.warmers.channels[index].tCamActive = false;
+ else
+ store.state.warmers.channels[index].tCamActive = true;
+ });
+ }
else
store.state.warmers.tCamStatus.thermoCamMode = false;
}
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/show-riscaldi-info.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/show-riscaldi-info.ts
index b37531f5..7c0b9d97 100644
--- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/show-riscaldi-info.ts
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/show-riscaldi-info.ts
@@ -166,13 +166,7 @@ export default class ShowRiscaldamentoSuperioreInfo extends Vue {
// recipeActions.setCurrent(store, this.recipe);
this.isLoading = true;
- if(this.warmersEdited){
- store.state.warmers.channels.forEach(function(element, index){
- if (element.setpointHMI==0)
- store.state.warmers.channels[index].tCamActive = false;
- else
- store.state.warmers.channels[index].tCamActive = true;
- });
+ if(this.warmersEdited){
await warmersService.Update(store.state.warmers.channels.reduce((p, c) => { p[c.idChannel] = c.setpointHMI; return p; }, {}));
}
if(this.tempsEdited)