29 lines
569 B
JavaScript
29 lines
569 B
JavaScript
|
import ngModule from '../module';
|
||
|
|
||
|
class Controller {
|
||
|
constructor($http) {
|
||
|
this.$http = $http;
|
||
|
}
|
||
|
|
||
|
getSummary() {
|
||
|
this.$http.get(`/claim/api/Claims/${this.claim.id}/getSummary`).then(response => {
|
||
|
this.summary = response.data;
|
||
|
});
|
||
|
}
|
||
|
|
||
|
$onChanges() {
|
||
|
if (this.claim && this.claim.id)
|
||
|
this.getSummary();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
Controller.$inject = ['$http'];
|
||
|
|
||
|
ngModule.component('vnClaimSummary', {
|
||
|
template: require('./index.html'),
|
||
|
controller: Controller,
|
||
|
bindings: {
|
||
|
claim: '<'
|
||
|
}
|
||
|
});
|