From 64fbb2e106123ed5f291e80ec551fcbf55811fac Mon Sep 17 00:00:00 2001 From: Thermo_SIM Date: Tue, 9 Mar 2021 12:39:20 +0100 Subject: [PATCH] Fix Under the hood + adv mode --- .../Assi/components/assi/assi.css | 13 +++++++ .../Assi/components/assi/assi.less | 15 +++++++ .../sotto-cofano/Assi/components/assi/assi.ts | 39 ++++++++++++++++++- .../Assi/components/assi/assi.vue | 17 +++++++- .../tables/assi-table/asse-row-item.ts | 9 ++++- .../tables/assi-table/asse-row-item.vue | 23 +++++------ .../tables/assi-table/assi-table.css | 3 ++ .../tables/assi-table/assi-table.less | 3 ++ .../tables/assi-table/assi-table.ts | 5 +++ .../tables/assi-table/assi-table.vue | 2 + .../sotto-cofano/sotto-cofano.ts | 5 +-- .../wwwroot/src/services/logsService.ts | 4 +- .../src/services/underTheHoodService.ts | 21 +++++++--- 13 files changed, 130 insertions(+), 29 deletions(-) create mode 100644 Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/Assi/components/assi/assi.css diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/Assi/components/assi/assi.css b/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/Assi/components/assi/assi.css new file mode 100644 index 00000000..1edd2655 --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/Assi/components/assi/assi.css @@ -0,0 +1,13 @@ +.labelOnOff { + display: flex; + flex-flow: row; + justify-content: center; + align-items: center; + color: #e8e8e8; + font-size: 18px; +} +.labelOnOff label { + width: 200px; + text-align: end; + padding-right: 10px; +} diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/Assi/components/assi/assi.less b/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/Assi/components/assi/assi.less index 8fad87c5..359fce58 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/Assi/components/assi/assi.less +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/Assi/components/assi/assi.less @@ -1 +1,16 @@ @import "../../../variable.less"; + +.labelOnOff{ + + display: flex; + flex-flow: row; + justify-content: center; + align-items: center; + color: #e8e8e8; + font-size: 18px; + label{ + width: 200px; + text-align: end; + padding-right: 10px; + } +} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/Assi/components/assi/assi.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/Assi/components/assi/assi.ts index 9080b923..b8d9171a 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/Assi/components/assi/assi.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/Assi/components/assi/assi.ts @@ -2,8 +2,45 @@ import { Component, Vue } from "vue-property-decorator"; import Header from "../../../header/my-header.vue"; import MenuSx from "../../../menu-sx/menu-sx.vue"; import AssiTable from "../../../Assi/components/tables/assi-table/assi-table.vue"; +import { underTheHoodService } from "@/services/underTheHoodService"; +import { awaiter, messageService } from "@/_base"; +import { Modal as modal, ModalHelper } from "@/components/modals"; @Component({ components: { Header, MenuSx, AssiTable } }) -export default class Assi extends Vue {} +export default class Assi extends Vue { + + isEditable = false; + isComunicating = false; + + async mounted(){ + this.isComunicating = true; + this.isEditable = await awaiter (underTheHoodService.GetAxesAdvMode()); + this.isComunicating = false; + } + + async enableDisable(evt){ + this.isComunicating = true; + evt.preventDefault(); + + if(!this.isEditable) + { + ModalHelper.AskConfirm( this.$options.filters.localize("modal_confirm_title", "Richiesta di conferma"), + this.$options.filters.localize("softkey_confirm", "Confirm?"), + async() => { + await awaiter (underTheHoodService.SetAxesAdvMode(!this.isEditable)); + this.isEditable = !this.isEditable; + }, null, "modal"); + } + else + { + await awaiter (underTheHoodService.SetAxesAdvMode(!this.isEditable)); + this.isEditable = !this.isEditable; + } + + this.isComunicating = false; + } + + +} diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/Assi/components/assi/assi.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/Assi/components/assi/assi.vue index a5d8604d..20b80f01 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/Assi/components/assi/assi.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/Assi/components/assi/assi.vue @@ -1,6 +1,21 @@