salix/modules/entry/front/summary/index.js

31 lines
643 B
JavaScript

import ngModule from '../module';
import './style.scss';
import Summary from 'salix/components/summary';
class Controller extends Summary {
get entry() {
return this._entry;
}
set entry(value) {
this._entry = value;
if (value && value.id)
this.getEntryData();
}
getEntryData() {
return this.$http.get(`Entries/${this.entry.id}/getEntry`).then(response => {
this.entryData = response.data;
});
}
}
ngModule.vnComponent('vnEntrySummary', {
template: require('./index.html'),
controller: Controller,
bindings: {
entry: '<'
}
});