Merge branch 'develop' into 5.8-dev

This commit is contained in:
James Cole 2023-01-03 08:45:04 +01:00
commit c3e0ce0c08
4 changed files with 13 additions and 3 deletions

View File

@ -58,6 +58,7 @@ class BillController extends Controller
/**
* Documentation for this endpoint is at:
* https://api-docs.firefly-iii.org/#/autocomplete/getBillsAC
* TODO expand API to add active field.
*
* @param AutocompleteRequest $request
*
@ -72,6 +73,7 @@ class BillController extends Controller
return [
'id' => (string)$item->id,
'name' => $item->name,
'active' => $item->active
];
}
);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -98,9 +98,17 @@ export default {
];
for (const key in res.data) {
if (res.data.hasOwnProperty(key) && /^0$|^[1-9]\d*$/.test(key) && key <= 4294967294) {
this.bills.push(res.data[key]);
let current = res.data[key];
if(current.active) {
this.bills.push(res.data[key]);
}
}
}
this.bills.sort(function(a, b) {
if (a.name < b.name) return -1;
if (a.name > b.name) return 1;
return 0;
});
});
}
}