2020-02-04 08:34:31 +00:00
|
|
|
import ngModule from '../module';
|
|
|
|
import './style.scss';
|
2020-03-17 13:43:46 +00:00
|
|
|
import Section from 'salix/components/section';
|
2020-02-04 08:34:31 +00:00
|
|
|
|
2020-03-17 13:43:46 +00:00
|
|
|
class Controller extends Section {
|
2020-02-04 08:34:31 +00:00
|
|
|
get entry() {
|
|
|
|
return this._entry;
|
|
|
|
}
|
|
|
|
|
|
|
|
set entry(value) {
|
|
|
|
this._entry = value;
|
|
|
|
|
2020-02-21 11:48:34 +00:00
|
|
|
if (value && value.id)
|
2020-02-25 09:39:21 +00:00
|
|
|
this.getEntryData();
|
2020-02-04 08:34:31 +00:00
|
|
|
}
|
|
|
|
|
2020-02-25 09:39:21 +00:00
|
|
|
getEntryData() {
|
2020-02-21 11:48:34 +00:00
|
|
|
return this.$http.get(`/api/Entries/${this.entry.id}/getEntry`).then(response => {
|
|
|
|
this.entryData = response.data;
|
|
|
|
});
|
|
|
|
}
|
2020-02-04 08:34:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ngModule.component('vnEntrySummary', {
|
|
|
|
template: require('./index.html'),
|
|
|
|
controller: Controller,
|
|
|
|
bindings: {
|
|
|
|
entry: '<'
|
|
|
|
}
|
|
|
|
});
|