mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-20 18:21:21 +00:00
Code for #2534
This commit is contained in:
@@ -74,6 +74,12 @@
|
||||
default: function () {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
defaultAccountTypeFilters: {
|
||||
type: Array,
|
||||
default: function () {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -84,7 +90,8 @@
|
||||
trType: this.transactionType,
|
||||
target: null,
|
||||
inputDisabled: false,
|
||||
allowedTypes: this.accountTypeFilters
|
||||
allowedTypes: this.accountTypeFilters,
|
||||
defaultAllowedTypes: this.defaultAccountTypeFilters
|
||||
}
|
||||
},
|
||||
ready() {
|
||||
@@ -94,6 +101,8 @@
|
||||
this.target = this.$refs.input;
|
||||
let types = this.allowedTypes.join(',');
|
||||
this.name = this.accountName;
|
||||
// console.log('Mounted Types:');
|
||||
// console.log(this.allowedTypes);
|
||||
this.accountAutoCompleteURI = document.getElementsByTagName('base')[0].href + "json/accounts?types=" + types + "&search=";
|
||||
this.triggerTransactionType();
|
||||
},
|
||||
@@ -104,6 +113,10 @@
|
||||
},
|
||||
accountTypeFilters() {
|
||||
let types = this.accountTypeFilters.join(',');
|
||||
if (0 === this.accountTypeFilters.length) {
|
||||
types = this.defaultAccountTypeFilters.join(',');
|
||||
// console.log('types was empty: ' + types);
|
||||
}
|
||||
this.accountAutoCompleteURI = document.getElementsByTagName('base')[0].href + "json/accounts?types=" + types + "&search=";
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user