2017-06-03 11:01:47 +00:00
|
|
|
import ngModule from '../module';
|
2017-12-20 13:36:12 +00:00
|
|
|
|
2017-06-03 11:01:47 +00:00
|
|
|
export default class Controller {
|
2018-09-14 11:43:51 +00:00
|
|
|
constructor($scope, $stateParams, $http) {
|
2018-05-02 09:54:13 +00:00
|
|
|
this.$scope = $scope;
|
2018-09-14 11:43:51 +00:00
|
|
|
this.$http = $http;
|
|
|
|
this.$stateParams = $stateParams;
|
2017-05-23 08:58:17 +00:00
|
|
|
this.client = null;
|
2017-01-31 13:13:06 +00:00
|
|
|
}
|
2018-05-02 09:54:13 +00:00
|
|
|
|
2018-09-14 11:43:51 +00:00
|
|
|
$onInit() {
|
|
|
|
this.getCard();
|
|
|
|
}
|
|
|
|
|
|
|
|
getCard() {
|
2019-10-24 22:53:53 +00:00
|
|
|
this.$http.get(`Clients/${this.$stateParams.id}/getCard`).then(response => {
|
2018-09-14 11:43:51 +00:00
|
|
|
this.client = response.data;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2018-05-02 09:54:13 +00:00
|
|
|
reload() {
|
2018-09-14 11:43:51 +00:00
|
|
|
this.getCard();
|
2018-05-02 09:54:13 +00:00
|
|
|
}
|
2017-05-23 08:58:17 +00:00
|
|
|
}
|
2018-09-14 11:43:51 +00:00
|
|
|
Controller.$inject = ['$scope', '$stateParams', '$http'];
|
2017-05-23 07:20:21 +00:00
|
|
|
|
2017-06-03 11:01:47 +00:00
|
|
|
ngModule.component('vnClientCard', {
|
2018-05-23 12:26:51 +00:00
|
|
|
template: require('./index.html'),
|
2017-10-05 07:20:40 +00:00
|
|
|
controller: Controller
|
2017-05-23 08:58:17 +00:00
|
|
|
});
|
2018-05-02 09:54:13 +00:00
|
|
|
|