Currencies: rate editing works via upsert but is not discoverable (no Edit button) #12
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_planner#12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Editing a currency rate looks impossible, so people delete the rate and add it again.
It actually already works: the "Add / Update" form updates a rate if you re-enter the same code. The problem is there's no Edit button to make that obvious.
Fix: add an Edit button on each rate row that fills the form with that row's values. No backend change needed.
Fixed. Added an Edit (pencil) button on each currency rate row. It pre-fills the Add/Update form with that row's code, name, and rate and focuses the rate field. Submitting calls
currency_rate.upsert, which keys on the unchanged code and updates the existing rate — so there is no longer any need to delete and re-create a rate to change it. No backend change required.Implemented in
crates/hero_planner_web/src/index.html(integration@f8eb177,main@5ced595). Visible after thehero_planner_webbinary is rebuilt/redeployed.