Second step, add component bankEntity

This commit is contained in:
Jorge Padawan 2021-01-08 10:46:50 +01:00
parent 31f18db72d
commit 5e201419f8
6 changed files with 8 additions and 15 deletions

View File

@ -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">

View File

@ -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', {

View File

@ -1,5 +1,5 @@
<vn-dialog class="edit"
vn-id="bankentityDialog"
vn-id="bankEntityDialog"
on-open="$ctrl.onOpen()"
on-accept="$ctrl.onAccept()"
message="New bank entity">
@ -9,7 +9,7 @@
<vn-textfield
vn-one
vn-focus
vn-id="entityname"
vn-id="entityName"
label="Name"
ng-model="$ctrl.location.name"
required="true">
@ -35,6 +35,6 @@
</tpl-body>
<tpl-buttons>
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
<button id= "savePostcode" response="accept" translate>Save</button>
<button id= "saveBankEntity" response="accept" translate>Save</button>
</tpl-buttons>
</vn-dialog>

View File

@ -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) {

View File

@ -8,6 +8,7 @@ import './search-panel';
import './summary';
import './basic-data';
import './fiscal-data';
import './bankentity';
import './account';
import './contact';
import './log';