34 lines
703 B
JavaScript
34 lines
703 B
JavaScript
import ngModule from '../module';
|
|
import './style.scss';
|
|
import Summary from 'salix/components/summary';
|
|
|
|
class Controller extends Summary {
|
|
get entry() {
|
|
if (!this._entry)
|
|
return this.$params;
|
|
|
|
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: '<'
|
|
}
|
|
});
|