client address index
gitea/salix/1983-client_address There was a failure building this commit Details

This commit is contained in:
Bernat Exposito Domenech 2020-01-09 12:39:03 +01:00
parent 83d2ec40d4
commit 5511ef2537
1 changed files with 5 additions and 2 deletions

View File

@ -2,10 +2,12 @@ import ngModule from '../../module';
import './style.scss'; import './style.scss';
class Controller { class Controller {
constructor($http, $scope, $stateParams) { constructor($http, $scope, $stateParams, $translate, vnApp) {
this.$http = $http; this.$http = $http;
this.$scope = $scope; this.$scope = $scope;
this.$stateParams = $stateParams; this.$stateParams = $stateParams;
this.$translate = $translate;
this.vnApp = vnApp;
this.filter = { this.filter = {
fields: [ fields: [
'id', 'id',
@ -51,6 +53,7 @@ class Controller {
if (res.data) { if (res.data) {
this.client.defaultAddressFk = res.data.defaultAddressFk; this.client.defaultAddressFk = res.data.defaultAddressFk;
this.sortAddresses(); this.sortAddresses();
this.vnApp.showSuccess(this.$translate.instant('Data saved!'));
} }
}); });
} }
@ -69,7 +72,7 @@ class Controller {
}); });
} }
} }
Controller.$inject = ['$http', '$scope', '$stateParams']; Controller.$inject = ['$http', '$scope', '$stateParams', '$translate', 'vnApp'];
ngModule.component('vnClientAddressIndex', { ngModule.component('vnClientAddressIndex', {
template: require('./index.html'), template: require('./index.html'),