diff --git a/modules/worker/front/create/index.js b/modules/worker/front/create/index.js index 7e837fe02..7966926b0 100644 --- a/modules/worker/front/create/index.js +++ b/modules/worker/front/create/index.js @@ -13,14 +13,20 @@ export default class Controller extends Section { }); } + get ibanCountry() { + if (!this.worker || !this.worker.iban) return false; + + let countryCode = this.worker.iban.substr(0, 2); + + return countryCode; + } + autofillBic() { if (!this.worker || !this.worker.iban) return; let bankEntityId = parseInt(this.worker.iban.substr(4, 4)); let filter = {where: {id: bankEntityId}}; - if (this.ibanCountry != 'ES') return; - this.$http.get(`BankEntities`, {filter}).then(response => { const hasData = response.data && response.data[0];