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 @@