26 lines
531 B
JavaScript
26 lines
531 B
JavaScript
import ngModule from '../module';
|
|
import Descriptor from 'salix/components/descriptor';
|
|
|
|
class Controller extends Descriptor {
|
|
get zone() {
|
|
return this.entity;
|
|
}
|
|
|
|
set zone(value) {
|
|
this.entity = value;
|
|
}
|
|
|
|
onDeleteAccept() {
|
|
return this.$http.delete(`Zones/${this.id}`)
|
|
.then(() => this.$state.go('zone.index'));
|
|
}
|
|
}
|
|
|
|
ngModule.vnComponent('vnZoneDescriptor', {
|
|
template: require('./index.html'),
|
|
controller: Controller,
|
|
bindings: {
|
|
zone: '<'
|
|
}
|
|
});
|