Transfer edit fixed currency rate #nz9k0y
This commit is contained in:
27
resources/assets/js/views/banking/transfers.js
vendored
27
resources/assets/js/views/banking/transfers.js
vendored
@ -30,6 +30,11 @@ const app = new Vue({
|
||||
form: new Form('transfer'),
|
||||
bulk_action: new BulkAction('transfers'),
|
||||
show_rate: false,
|
||||
edit: {
|
||||
status: false,
|
||||
form_account: false,
|
||||
to_account: false,
|
||||
},
|
||||
|
||||
transfer_form: new Form('template'),
|
||||
template: {
|
||||
@ -48,6 +53,11 @@ const app = new Vue({
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.edit.status && this.edit.form_account < 2) {
|
||||
this.edit.form_account++;
|
||||
return;
|
||||
}
|
||||
|
||||
let from_promise = Promise.resolve(window.axios.get(url + '/banking/accounts/currency', {
|
||||
params: {
|
||||
account_id: from_account_id
|
||||
@ -77,6 +87,11 @@ const app = new Vue({
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.edit.status && this.edit.to_account < 2) {
|
||||
this.edit.to_account++;
|
||||
return;
|
||||
}
|
||||
|
||||
let to_promise = Promise.resolve(window.axios.get(url + '/banking/accounts/currency', {
|
||||
params: {
|
||||
account_id: to_account_id
|
||||
@ -126,5 +141,15 @@ const app = new Vue({
|
||||
errors: this.transfer_form.errors
|
||||
};
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
if (typeof transfer_edit !== 'undefined' && transfer_edit) {
|
||||
this.show_rate = true;
|
||||
|
||||
this.edit.status = true;
|
||||
this.edit.form_account = 1;
|
||||
this.edit.to_account = 1;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
Reference in New Issue
Block a user