From 3f3eebfb0bca9cecced4f1d6ac8fc90a0d4b3f90 Mon Sep 17 00:00:00 2001 From: Alessandro Francia Date: Mon, 28 May 2018 10:58:02 +0200 Subject: [PATCH] get modify depot Lucio --- Step/wwwroot/src/components/depot.ts | 30 ++++++++++++++++++++++++++ Step/wwwroot/src/components/depot.vue | 4 ++-- Step/wwwroot/src/components/tooling.ts | 2 -- 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/Step/wwwroot/src/components/depot.ts b/Step/wwwroot/src/components/depot.ts index af926e66..7de05495 100644 --- a/Step/wwwroot/src/components/depot.ts +++ b/Step/wwwroot/src/components/depot.ts @@ -23,6 +23,12 @@ export default class depot extends Vue { public get availableMultiTools(): server.MultiTools[] { return (this.$store.state as AppModel).depot.availableMultiTool; } public get availableTools(): server.Tools[] { return (this.$store.state as AppModel).depot.availableTool; } + public magazines: server.MagazineModel[] = (this.$store.state as AppModel).tooling.magazines; + + public enableModify: any = false; + + + // Ottengo il tool alla posizione corrente public toolAtPosition(position): server.DepotModel { @@ -52,6 +58,12 @@ export default class depot extends Vue { toggleEdit() { this.editable = !this.editable; + if(this.editable){ + this.enableModify = true; + } + else{ + this.enableModify = false; + } } public returnChildId(elem) { @@ -69,4 +81,22 @@ export default class depot extends Vue { public StartToolingWizard() { depotBL.showToolingWizard(); } + public disableFastButton(){ + if(this.enableModify){ + return true; + } + else{ + return false; + } + } + public changeMagazine(){ + // new DepotService().GetMagazine(this.$route.params.id); + debugger + this.magazines; + for(let i in this.magazines){ + if(this.magazines[i].id == this.$route.params.id){ + + } + } + } } diff --git a/Step/wwwroot/src/components/depot.vue b/Step/wwwroot/src/components/depot.vue index 1e8ab272..17534645 100644 --- a/Step/wwwroot/src/components/depot.vue +++ b/Step/wwwroot/src/components/depot.vue @@ -28,9 +28,9 @@
- + {{'depot_title' | localize("Magazzino")}} {{depotId}} - Lineare - +
diff --git a/Step/wwwroot/src/components/tooling.ts b/Step/wwwroot/src/components/tooling.ts index 1c301390..22b77f3d 100644 --- a/Step/wwwroot/src/components/tooling.ts +++ b/Step/wwwroot/src/components/tooling.ts @@ -7,9 +7,7 @@ import { AppModel, store } from "../store"; @Component({ name: "tooling", components: { card: card } }) export default class Tooling extends Vue { - $route: any; - public magazines: server.MagazineModel[] = (this.$store.state as AppModel).tooling.magazines; // public get magazines(): server.MagazineModel[] {