diff --git a/Thermo.Active/wwwroot/assets/styles/base/paddle.less b/Thermo.Active/wwwroot/assets/styles/base/paddle.less
index 71720491..636f3ec0 100644
--- a/Thermo.Active/wwwroot/assets/styles/base/paddle.less
+++ b/Thermo.Active/wwwroot/assets/styles/base/paddle.less
@@ -75,6 +75,7 @@
display: grid;
grid-template-rows: 50px 1fr 50px;
padding: 1rem;
+ position: relative;
header {
display: flex;
diff --git a/Thermo.Active/wwwroot/assets/styles/style.css b/Thermo.Active/wwwroot/assets/styles/style.css
index 7b5f1bd0..85dee545 100644
--- a/Thermo.Active/wwwroot/assets/styles/style.css
+++ b/Thermo.Active/wwwroot/assets/styles/style.css
@@ -4812,6 +4812,7 @@ article .box .body {
display: grid;
grid-template-rows: 50px 1fr 50px;
padding: 1rem;
+ position: relative;
}
.paddle section header {
display: flex;
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/paddle.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/paddle.ts
index 5bfbda3c..c17d48f9 100644
--- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/paddle.ts
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/paddle.ts
@@ -32,7 +32,7 @@ export default class Paddle extends Vue {
return this.softKeys[id];
}
- get allSoftKeys() {
+ get allSoftKeys(): SoftKeysConfigurationModel[] {
var result = [];
for (const key in this.softKeys) {
const element = this.softKeys[key];
@@ -45,8 +45,12 @@ export default class Paddle extends Vue {
return store.state.machineInfo.softkeysFavorites;
}
- getSoftKeyById(id: number) {
- return machineInfoStore.getters.getSoftkey(id);
+ get Favourites(): SoftKeysConfigurationModel[] {
+ return this.favourites.map(i => this.getSoftKeyById(i) as SoftKeysConfigurationModel)
+ }
+
+ getSoftKeyById(id: number): SoftKeysConfigurationModel {
+ return this.allSoftKeys.find(i => i.id == id);
}
isFavourite(id: number) {
@@ -81,13 +85,11 @@ export default class Paddle extends Vue {
}
getSoftKeyStatus(id) {
- var sk = this.$store.getters.getSoftKeyStatus(id);
- if (sk)
- return sk.value;
- return false;
+ return this.$store.getters.getSoftKeyStatus(id);
}
async toggleFavourite(id: number, add: boolean) {
+
if (add)
await dataService.AddUserSoftkeyFavorite(id)
else
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/paddle.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/paddle.vue
index 928db334..93739101 100644
--- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/paddle.vue
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/paddle.vue
@@ -12,18 +12,21 @@
{{'preferred-softkeys' | localize("Soft Keys")}}
-
+
+
+
+
{{'preferred-softkeys' | localize("Tutte")}}
-
+
+
+
-
-
\ No newline at end of file
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/softkey.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/softkey.ts
index 0aaa455c..8c76853d 100644
--- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/softkey.ts
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/softkey.ts
@@ -12,11 +12,20 @@ export default class SoftKey extends Vue {
@Prop({ default: 0 })
type: number;
+ @Prop({ default: false })
+ value: boolean;
+
@Prop({ default: false })
configMode: boolean;
@Prop({ default: false })
isFavourite: boolean;
+ doclick() {
+ if (!this.configMode && this.type != 0) this.$emit('click');
+ }
+
+ get Checked() { return this.value; }
+ set Checked(value: boolean) { this.$emit("input", value); this.$emit("checkChanged") }
}
\ No newline at end of file
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/softkey.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/softkey.vue
index 189cec22..1974d3f8 100644
--- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/softkey.vue
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/paddle/softkey.vue
@@ -1,9 +1,10 @@
-
+
+
{{title}}
diff --git a/Thermo.Active/wwwroot/src/modules/app-footer.ts b/Thermo.Active/wwwroot/src/modules/app-footer.ts
index 1273e0ea..3473ef55 100644
--- a/Thermo.Active/wwwroot/src/modules/app-footer.ts
+++ b/Thermo.Active/wwwroot/src/modules/app-footer.ts
@@ -1,6 +1,7 @@
import Vue from "vue";
import Component from "vue-class-component";
import { appModelActions, store, machineStatusActions } from "@/store";
+import { prodService } from "@/services/prodService";
// import VueGesture from "@/_base/gestures.vue";
// import { Factory, messageService } from "src/_base";
@@ -66,4 +67,12 @@ export default class AppFooter extends Vue {
showDashboard() {
appModelActions.ShowDashboard(this.$store);
}
+
+ async runManual() {
+ await prodService.Manual();
+ }
+
+ async runAuto() {
+ await prodService.Auto();
+ }
}
diff --git a/Thermo.Active/wwwroot/src/modules/app-footer.vue b/Thermo.Active/wwwroot/src/modules/app-footer.vue
index 031ff8e3..9d2cbdc2 100644
--- a/Thermo.Active/wwwroot/src/modules/app-footer.vue
+++ b/Thermo.Active/wwwroot/src/modules/app-footer.vue
@@ -69,8 +69,8 @@
-
-
+
+
diff --git a/Thermo.Active/wwwroot/src/services/hub.ts b/Thermo.Active/wwwroot/src/services/hub.ts
index 48c79536..dcdd6500 100644
--- a/Thermo.Active/wwwroot/src/services/hub.ts
+++ b/Thermo.Active/wwwroot/src/services/hub.ts
@@ -23,6 +23,7 @@ import { ToolingService } from "./toolingService";
import { CONFIGURATION } from "@/config";
import { recipeActions } from "@/store/recipe.store";
import { prodActions } from "@/store/prod.store";
+import { Model } from "vue-property-decorator";
declare let $: any;
declare let cmsClient: any;
@@ -242,6 +243,7 @@ export class Hub {
}
private static userSoftKeyChanged(status) {
+
for (const k in status) {
if (status.hasOwnProperty(k)) {
machineStatusActions.setSoftKeyStatus(store, status[k] as SoftKeyModel);
diff --git a/Thermo.Active/wwwroot/src/services/prodService.ts b/Thermo.Active/wwwroot/src/services/prodService.ts
index ef7b58e8..02129208 100644
--- a/Thermo.Active/wwwroot/src/services/prodService.ts
+++ b/Thermo.Active/wwwroot/src/services/prodService.ts
@@ -24,5 +24,14 @@ export class ProdService extends baseRestService {
return result;
}
+
+ async Manual() {
+ await this.Put((await this.BASE_URL()) + "mode/manual", null);
+ }
+
+ async Auto() {
+ await this.Put((await this.BASE_URL()) + "mode/auto", null);
+ }
+
}
export const prodService = new ProdService();
\ No newline at end of file
diff --git a/Thermo.Active/wwwroot/src/store/machineInfo.store.ts b/Thermo.Active/wwwroot/src/store/machineInfo.store.ts
index dd4f16ad..e10c7a1f 100644
--- a/Thermo.Active/wwwroot/src/store/machineInfo.store.ts
+++ b/Thermo.Active/wwwroot/src/store/machineInfo.store.ts
@@ -92,15 +92,6 @@ export const machineInfoStore = {
}
}
return null;
- },
- getSoftkey: state => id => {
- for (const key in state.softKeys) {
- if (state.softKeys.hasOwnProperty(key)) {
- const element = state.softKeys[key];
- if (element.id == id) return element;
- }
- }
- return null;
}
},
mutations: {
diff --git a/Thermo.Active/wwwroot/src/store/machineStatus.store.ts b/Thermo.Active/wwwroot/src/store/machineStatus.store.ts
index 76f89d0b..7761c997 100644
--- a/Thermo.Active/wwwroot/src/store/machineStatus.store.ts
+++ b/Thermo.Active/wwwroot/src/store/machineStatus.store.ts
@@ -1,4 +1,5 @@
import { Factory, messageService } from "@/_base";
+import Vue from "vue";
// Check if
declare let cmsClient: any;
@@ -182,6 +183,14 @@ export const machineStatusStore = {
}
},
SetSoftKeyStatus(store, model: any) {
+ if (!store._softKeys.has(model.id))
+ store._softKeys.set(model.id, model);
+ else {
+ let g = store._softKeys.get(model.id);
+ for (const key in model) {
+ Vue.set(g, key, model[key])
+ }
+ }
store._softKeys.set(model.id, model);
store.softKeys = Array.from(store._softKeys.values());
},