diff --git a/resources/assets/js/views/banking/accounts.js b/resources/assets/js/views/banking/accounts.js index 13c00a7de..f2b5f97b7 100644 --- a/resources/assets/js/views/banking/accounts.js +++ b/resources/assets/js/views/banking/accounts.js @@ -29,6 +29,11 @@ const app = new Vue({ return { form: new Form('account'), bulk_action: new BulkAction('accounts'), + connect: { + show: false, + currency: {}, + documents: [], + }, } }, @@ -55,5 +60,32 @@ const app = new Vue({ onBank() { }, + + onConnect(route) { + let dial_promise = Promise.resolve(window.axios.get(route)); + + dial_promise.then(response => { + this.connect.show = true; + + this.connect.transaction = JSON.parse(response.data.transaction); + + let currency = JSON.parse(response.data.currency); + + this.connect.currency = { + decimal_mark: currency.decimal_mark, + precision: currency.precision, + symbol: currency.symbol, + symbol_first: currency.symbol_first, + thousands_separator: currency.thousands_separator, + }; + + this.connect.documents = JSON.parse(response.data.documents); + }) + .catch(error => { + }) + .finally(function () { + // always executed + }); + }, } }); diff --git a/resources/views/banking/accounts/show.blade.php b/resources/views/banking/accounts/show.blade.php index 6e75ee539..060163ee0 100644 --- a/resources/views/banking/accounts/show.blade.php +++ b/resources/views/banking/accounts/show.blade.php @@ -291,11 +291,17 @@ {{ $item->contact->name }} - + @if ($item->document) +
{{ $item->document->document_number }} + +
+ + +
@else @endif @@ -444,6 +450,16 @@ + +