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"
label="Country">
</vn-autocomplete>
<vn-icon-button
vn-auto
icon="info"
vn-tooltip="IBAN: ES21 1465 0100 72 2030876293">
</vn-icon-button>
<vn-textfield
vn-one
ng-show="country.selection.code === 'ES'"
label="Entity code"
ng-model="$ctrl.data.id"
required="true">
ng-model="$ctrl.data.id">
</vn-textfield>
</vn-horizontal>
</tpl-body>

View File

@ -10,7 +10,7 @@ class Controller extends Dialog {
if (!this.data.countryFk)
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(() => super.responseHandler(response))
.then(() => this.vnApp.showSuccess(this.$t('Data saved!')));

View File

@ -51,12 +51,15 @@ export default class Controller extends Section {
autofillBic() {
if (!this.client || !this.client.iban) return;
let bankEntityId = parseInt(this.client.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];
if (hasData)
this.client.bankEntityFk = response.data[0].id;
else if (!hasData)

View File

@ -30,8 +30,7 @@ export default class Controller extends Section {
}
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 filter = {where: {id: bankEntityId}};
@ -43,7 +42,7 @@ export default class Controller extends Section {
this.worker.bankEntityFk = response.data[0].id;
else if (!hasData)
this.worker.bankEntityFk = null;
}); */
});
}
generateCodeUser() {