diff --git a/modules/supplier/front/account/index.html b/modules/supplier/front/account/index.html index 864b36228..6d391e06a 100644 --- a/modules/supplier/front/account/index.html +++ b/modules/supplier/front/account/index.html @@ -2,7 +2,7 @@ vn-id="model" url="SupplierAccounts" fields="['id', 'supplierFk', 'iban', 'bankEntityFk']" - link="{bankEntityFk: $ctrl.$params.id}" + link="{supplierFk: $ctrl.$params.id}" include="$ctrl.include" data="$ctrl.supplierAccounts" auto-load="true"> diff --git a/modules/supplier/front/account/index.js b/modules/supplier/front/account/index.js index e72e6d0db..069601a20 100644 --- a/modules/supplier/front/account/index.js +++ b/modules/supplier/front/account/index.js @@ -38,13 +38,6 @@ class Controller extends Section { return this.$http.patch(query, this.newBankEntity) .then(res => this.supplierAccount.bankEntityFk = res.data.id); } - - onResponse(response) { - this.supplier.postcode = response.code; - this.supplier.city = response.city; - this.supplier.provinceFk = response.provinceFk; - this.supplier.countryFk = response.countryFk; - } } ngModule.vnComponent('vnSupplierAccount', { diff --git a/modules/supplier/front/bankentity/index.html b/modules/supplier/front/bankentity/index.html index ed1691f27..55b40f481 100644 --- a/modules/supplier/front/bankentity/index.html +++ b/modules/supplier/front/bankentity/index.html @@ -1,5 +1,5 @@ @@ -9,7 +9,7 @@ @@ -35,6 +35,6 @@ - + diff --git a/modules/supplier/front/bankentity/index.js b/modules/supplier/front/bankentity/index.js index 20be668da..babf64c11 100644 --- a/modules/supplier/front/bankentity/index.js +++ b/modules/supplier/front/bankentity/index.js @@ -4,12 +4,11 @@ import './style.scss'; class Controller extends Component { open() { - this.$.bankentityDialog.show(); + this.$.bankEntityDialog.show(); } onOpen() { this.location = {}; - this.$.bankentity.focus(); } onCountryResponse(response) { @@ -22,7 +21,7 @@ class Controller extends Component { throw new Error(`The country can't be empty`); this.$http.patch(`bankentities`, this.location).then(() => { - this.vnApp.showMessage(this.$t('The bankentity has been created. You can save the data now')); + this.vnApp.showMessage(this.$t('The bank entity has been created. You can save the data now')); this.emit('response', {$response: this.location}); }); } catch (e) { diff --git a/modules/supplier/front/bankentity/index.spec.js b/modules/supplier/front/bankentity/index.spec.js index bb5591f35..b999ab21f 100644 --- a/modules/supplier/front/bankentity/index.spec.js +++ b/modules/supplier/front/bankentity/index.spec.js @@ -27,7 +27,7 @@ describe('Supplier', () => { controller.onAccept(); $httpBackend.flush(); - expect(controller.vnApp.showMessage).toHaveBeenCalledWith('The bankentity has been created. You can save the data now'); + expect(controller.vnApp.showMessage).toHaveBeenCalledWith('The bank entity has been created. You can save the data now'); }); }); }); diff --git a/modules/supplier/front/index.js b/modules/supplier/front/index.js index 80c49a8b4..f24fb997e 100644 --- a/modules/supplier/front/index.js +++ b/modules/supplier/front/index.js @@ -8,6 +8,7 @@ import './search-panel'; import './summary'; import './basic-data'; import './fiscal-data'; +import './bankentity'; import './account'; import './contact'; import './log';