mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Update JS, to use API auto complete routes.
This commit is contained in:
parent
f3a55e6cee
commit
3b56f4271e
2
public/v1/js/create_transaction.js
vendored
2
public/v1/js/create_transaction.js
vendored
File diff suppressed because one or more lines are too long
2
public/v1/js/edit_transaction.js
vendored
2
public/v1/js/edit_transaction.js
vendored
File diff suppressed because one or more lines are too long
@ -104,10 +104,9 @@
|
||||
},
|
||||
mounted() {
|
||||
this.target = this.$refs.input;
|
||||
let types = this.allowedTypes.join(',');
|
||||
this.updateACURI(this.allowedTypes.join(','));
|
||||
// console.log('mounted(): this.name = this.accountName (' + this.accountName + ')');
|
||||
this.name = this.accountName;
|
||||
this.accountAutoCompleteURI = document.getElementsByTagName('base')[0].href + "json/accounts?types=" + types + "&search=";
|
||||
this.triggerTransactionType();
|
||||
},
|
||||
|
||||
@ -124,7 +123,7 @@
|
||||
if (0 === this.accountTypeFilters.length) {
|
||||
types = this.defaultAccountTypeFilters.join(',');
|
||||
}
|
||||
this.accountAutoCompleteURI = document.getElementsByTagName('base')[0].href + "json/accounts?types=" + types + "&search=";
|
||||
this.updateACURI(types);
|
||||
},
|
||||
name() {
|
||||
// console.log('Watch: name()');
|
||||
@ -142,6 +141,15 @@
|
||||
// any error handler
|
||||
})
|
||||
},
|
||||
updateACURI: function (types) {
|
||||
this.accountAutoCompleteURI =
|
||||
document.getElementsByTagName('base')[0].href +
|
||||
'api/v1/autocomplete/accounts' +
|
||||
'?types=' +
|
||||
types +
|
||||
'&query=';
|
||||
console.log('Auto complete URI is now ' + this.accountAutoCompleteURI);
|
||||
},
|
||||
hasError: function () {
|
||||
return this.error.length > 0;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user