Repository navigation
Duplicate a receipt line straight into the edit dialog - #112
Merged
Merged
Conversation
The item dialog gets a copy button for an existing line. It closes the dialog and opens a new one prefilled with that line, so the copy can be adjusted before saving; cancelling it adds nothing. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016DkYAYEsi4gPN6uX9BfQZa
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Frognar · project thread
Before: repeating a line on a receipt meant adding it again and retyping the item, category, amount and description.
After: the edit dialog of a line has a copy button next to "Delete". It opens "Duplicate item" prefilled with that line, so quantity or amount can be changed before saving. Cancelling adds nothing; saving appends the new line to the same receipt.
How:
ItemDialogtakes an optionalCopyline that prefills a new line, and the copy button closes the dialog with the line as its result;Receipt.razorthen opens the dialog again in add mode. No API change, the save goes through the existing add-item endpoint and its validation. The button is an icon so the four actions fit on a 360 px wide phone.Checked:
dotnet buildwith no warnings,dotnet test172/172, and clicked through on a phone viewport against a local Postgres.🤖 Generated with Claude Code
https://claude.ai/code/session_016DkYAYEsi4gPN6uX9BfQZa
Generated by Claude Code