Added autocomplete on bank entity
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
a2ad1887a4
commit
f10092d2cf
|
@ -6,6 +6,7 @@ class Controller extends Component {
|
|||
open() {
|
||||
this.$.bankEntityDialog.show();
|
||||
}
|
||||
|
||||
resetData() {
|
||||
this.data = {};
|
||||
}
|
||||
|
@ -15,9 +16,9 @@ class Controller extends Component {
|
|||
if (!this.data.countryFk)
|
||||
throw new Error(`The country can't be empty`);
|
||||
|
||||
this.$http.post(`bankEntities`, this.data).then(() => {
|
||||
this.$http.post(`bankEntities`, this.data).then(res => {
|
||||
this.vnApp.showMessage(this.$t('The bank entity has been created. You can save the data now'));
|
||||
this.emit('response', {$response: this.data});
|
||||
this.emit('response', {$response: res.data});
|
||||
});
|
||||
} catch (e) {
|
||||
this.vnApp.showError(this.$t(e.message));
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<vn-icon-button
|
||||
icon="add_circle"
|
||||
vn-tooltip="New bank entity"
|
||||
ng-click="bankentity.open()">
|
||||
ng-click="$ctrl.showBankEntity($event, $index)">
|
||||
</vn-icon-button>
|
||||
</append>
|
||||
<vn-none>
|
||||
|
@ -62,6 +62,6 @@
|
|||
</form>
|
||||
<!-- New bankentity dialog -->
|
||||
<vn-new-bank-entity
|
||||
vn-id="bankentity"
|
||||
vn-id="bankEntity"
|
||||
on-response="$ctrl.onResponse($response)">
|
||||
</vn-new-bank-entity>
|
|
@ -19,14 +19,17 @@ class Controller extends Section {
|
|||
}
|
||||
|
||||
onResponse(response) {
|
||||
this.name = response.name;
|
||||
console.log(this.name);
|
||||
console.log(response);
|
||||
const data = this.$.model.data;
|
||||
const supplierAccount = data[this.currentRowIndex];
|
||||
supplierAccount.bankEntityFk = response.id;
|
||||
}
|
||||
|
||||
showBankEntity(event) {
|
||||
showBankEntity(event, $index) {
|
||||
if (event.defaultPrevented) return;
|
||||
event.preventDefault();
|
||||
this.$.bankEntity.show();
|
||||
this.currentRowIndex = $index;
|
||||
this.$.bankEntity.open();
|
||||
}
|
||||
|
||||
onBankEntityAccept() {
|
||||
|
|
Loading…
Reference in New Issue