mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-11-22 00:21:50 +01:00
Saved filter presets have to be picked from the menu every time a page opens, so a view someone always wants, like hiding projected transactions (#521), takes a few clicks on every visit or a bookmarked URL. A preset can now be set as the default from the presets menu, with the star next to its name. All transactions and the Monthly overview then open with it applied, relative dates moved to today, whenever their URL has no filters of its own: - `FilterPreset.is_default`, with a constraint allowing one default per user. Starring another preset moves the default to it, and starring the default again turns it off. - Filters in the URL, like `/transactions/?is_paid=1`, take precedence over the default, and Clear still empties the filter for the visit. - The star stays visible on the default preset and shows on hover for the others, like the delete button. - Building a filter from a preset moves into `TransactionsFilter.from_preset`, shared by applying a preset and opening a page with the default one.