Add category and payment fields for bills - #103
Conversation
|
Merging this would also fix the problem addressed in #98 |
|
Hi @magshee, I'm delighted to see what you have come up with – thank you for your contribution! Also having the courage to see a wrong heading and to start over for better code quality is an honorable approach, kind of the opposite of vibe coding till it functions, incorporating a lot of bloat along the way. I'd choose a slightly different approach to the input of such "extra data" (make the crucial inputs more easily available) – but this can be adapted later on when I finally get to do the improved workflow UI designs, so no worries. Also, it would be a better feedback mechanism to not make the new inputs disappear when unavailable, but to disable them (and explain). But this is a detail not worth holding back your PR as well. I'll do my review when I'm back home again, do some on device tests and publish an app update this month to get this feature (and bug fixes) out this month! |
First of all, sorry for the long wait. I got a little busier than expected in the last weeks. Also I kind of ran too far on my first attempt, which resulted in changing more code than necessary for this PR. I threw my original branch away and started all over.
How this works
Category and payment tags are shipped via the general project endpoint. Every time when bills and members are loaded, we also load the category and payment tags. If they are not available for some reason, this does not cause the bill details to not show. Simply the picker for both category and payment tag is not shown then. Existing id's for both are kept upon updating in that case.
Design
The current design is like this, but feel free to propose changes.
Final note
This PR also fixes a bug where a reoccuring bill is set to non-reoccuring after it is edited in PayForMe.
I used claude code to get a better understand of the cospend API, translations, as well as for getting test coverage and figuring out what weird behaviour may appear, in order to get the best result possible. I am aware that the solution may still not be optimal. However, I thought that even a suboptimal solution may be better than waiting for anything at all.
I am still happy to be able to present something here, thanks for your patience!