refs #5834 perf: remove front code
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Javier Segarra 2024-01-12 13:05:00 +01:00
parent 3ace078705
commit fe4c529bfe
4 changed files with 7 additions and 11 deletions

View File

@ -32,17 +32,11 @@
value-field="id" value-field="id"
label="Country"> label="Country">
</vn-autocomplete> </vn-autocomplete>
<vn-icon-button
vn-auto
icon="info"
vn-tooltip="IBAN: ES21 1465 0100 72 2030876293">
</vn-icon-button>
<vn-textfield <vn-textfield
vn-one vn-one
ng-show="country.selection.code === 'ES'" ng-show="country.selection.code === 'ES'"
label="Entity code" label="Entity code"
ng-model="$ctrl.data.id" ng-model="$ctrl.data.id">
required="true">
</vn-textfield> </vn-textfield>
</vn-horizontal> </vn-horizontal>
</tpl-body> </tpl-body>

View File

@ -10,7 +10,7 @@ class Controller extends Dialog {
if (!this.data.countryFk) if (!this.data.countryFk)
throw new Error(`The country can't be empty`); throw new Error(`The country can't be empty`);
return this.$http.post(`BankEntities`, this.data) return this.$http.post(`bankEntities`, this.data)
.then(res => this.data.id = res.data.id) .then(res => this.data.id = res.data.id)
.then(() => super.responseHandler(response)) .then(() => super.responseHandler(response))
.then(() => this.vnApp.showSuccess(this.$t('Data saved!'))); .then(() => this.vnApp.showSuccess(this.$t('Data saved!')));

View File

@ -51,12 +51,15 @@ export default class Controller extends Section {
autofillBic() { autofillBic() {
if (!this.client || !this.client.iban) return; if (!this.client || !this.client.iban) return;
let bankEntityId = parseInt(this.client.iban.substr(4, 4)); let bankEntityId = parseInt(this.client.iban.substr(4, 4));
let filter = {where: {id: bankEntityId}}; let filter = {where: {id: bankEntityId}};
if (this.ibanCountry != 'ES') return; if (this.ibanCountry != 'ES') return;
this.$http.get(`BankEntities`, {filter}).then(response => { this.$http.get(`BankEntities`, {filter}).then(response => {
const hasData = response.data && response.data[0]; const hasData = response.data && response.data[0];
if (hasData) if (hasData)
this.client.bankEntityFk = response.data[0].id; this.client.bankEntityFk = response.data[0].id;
else if (!hasData) else if (!hasData)

View File

@ -30,8 +30,7 @@ export default class Controller extends Section {
} }
autofillBic() { autofillBic() {
AutoFillBicComponent.controller.prototype.autofillBic(this.client); if (!this.worker || !this.worker.iban) return;
/* if (!this.worker || !this.worker.iban) return;
let bankEntityId = parseInt(this.worker.iban.substr(4, 4)); let bankEntityId = parseInt(this.worker.iban.substr(4, 4));
let filter = {where: {id: bankEntityId}}; let filter = {where: {id: bankEntityId}};
@ -43,7 +42,7 @@ export default class Controller extends Section {
this.worker.bankEntityFk = response.data[0].id; this.worker.bankEntityFk = response.data[0].id;
else if (!hasData) else if (!hasData)
this.worker.bankEntityFk = null; this.worker.bankEntityFk = null;
}); */ });
} }
generateCodeUser() { generateCodeUser() {