2018-12-04 12:18:27 +00:00
|
|
|
import ngModule from '../module';
|
2020-03-16 17:54:22 +00:00
|
|
|
import Section from 'salix/components/section';
|
2018-09-19 13:05:07 +00:00
|
|
|
|
2020-03-16 17:54:22 +00:00
|
|
|
export default class Controller extends Section {
|
2020-04-25 09:50:04 +00:00
|
|
|
preview(zone) {
|
2019-03-14 14:07:24 +00:00
|
|
|
this.selectedZone = zone;
|
2020-03-07 12:52:02 +00:00
|
|
|
this.$.summary.show();
|
2019-03-14 14:07:24 +00:00
|
|
|
}
|
|
|
|
|
2020-03-16 17:54:22 +00:00
|
|
|
onCloneAccept(zone) {
|
|
|
|
return this.$http.post(`Zones/${zone.id}/clone`)
|
2020-03-07 12:52:02 +00:00
|
|
|
.then(res => {
|
|
|
|
this.$state.go('zone.card.basicData', {id: res.data.id});
|
|
|
|
});
|
2019-03-14 14:07:24 +00:00
|
|
|
}
|
2018-09-19 13:05:07 +00:00
|
|
|
}
|
|
|
|
|
2020-07-24 12:22:30 +00:00
|
|
|
ngModule.vnComponent('vnZoneIndex', {
|
2018-09-19 13:05:07 +00:00
|
|
|
template: require('./index.html'),
|
|
|
|
controller: Controller
|
|
|
|
});
|