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