get modify depot Lucio
This commit is contained in:
@@ -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){
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
<div class="box-right">
|
||||
<div class="single-depot">
|
||||
<div class="sd-header">
|
||||
<button class="btn" :v-if="false"><i class="fa fa-chevron-left"></i></button>
|
||||
<button class="btn" :disabled="disableFastButton()" @click="changeMagazine()"><i class="fa fa-chevron-left"></i></button>
|
||||
<span>{{'depot_title' | localize("Magazzino")}} {{depotId}} - Lineare</span>
|
||||
<button class="btn" :v-if="false"><i class="fa fa-chevron-right"></i></button>
|
||||
<button class="btn" :disabled="disableFastButton()" @click="changeMagazine()"><i class="fa fa-chevron-right"></i></button>
|
||||
</div>
|
||||
<div class="sd-section scrollable">
|
||||
<detail-card v-for="pos in positions" :key="pos.positionId" :number="pos.positionId">
|
||||
|
||||
@@ -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[] {
|
||||
|
||||
Reference in New Issue
Block a user