salix/modules/zone/front/index/index.js

22 lines
540 B
JavaScript

import ngModule from '../module';
import Section from 'salix/components/section';
export default class Controller extends Section {
preview(zone) {
this.selectedZone = zone;
this.$.summary.show();
}
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
});