import ngModule from '../module'; import Section from 'salix/components/section'; export default class Controller extends Section { preview(event, zone) { this.stopEvent(event); this.selectedZone = zone; this.$.summary.show(); } clone(event, zone) { this.stopEvent(event); this.$.clone.show(zone); } onCloneAccept(zone) { return this.$http.post(`Zones/${zone.id}/clone`) .then(res => { this.$state.go('zone.card.basicData', {id: res.data.id}); }); } } ngModule.component('vnZoneIndex', { template: require('./index.html'), controller: Controller });