feat(import): Add per-entity auto-create controls and validation#71
Merged
feat(import): Add per-entity auto-create controls and validation#71
Conversation
Code Review SummaryThe PR introduces a robust validation and auto-creation mechanism for imports. It adds UI controls to allow users to opt-in to creating new entities (wallets, parties, categories) and visual feedback for invalid rows. 🚀 Key Improvements
💡 Minor Suggestions
|
Deploying trakli-dev with
|
| Latest commit: |
a5bc3e0
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d48c046e.trakli-dev.pages.dev |
| Branch Preview URL: | https://feat-import-auto-create-conf.trakli-dev.pages.dev |
Import confirmation dialog now shows checkboxes for creating new wallets, parties, and categories, disabled by default. The review table highlights rows with unresolved wallets in red and marks new entities with a (new) label in dropdowns. Shared data is refreshed after successful imports so re-importing doesn't incorrectly flag entities as new. Error messages are deduplicated for cleaner display.
305a1fd to
a5bc3e0
Compare
| <button class="btn btn--primary" :disabled="isConfirming" @click="$emit('confirm')"> | ||
| <button | ||
| class="btn btn--primary" | ||
| :disabled="isConfirming || walletRequired" |
There was a problem hiding this comment.
Preventing submission when wallets are required but not checked is good, but consider also showing a tooltip or more visible feedback if the button is disabled to improve UX.
Suggested change
| :disabled="isConfirming || walletRequired" | |
| :disabled="isConfirming || walletRequired" :title="walletRequired ? t('Please select Create new wallets to continue') : ''" |
| " | ||
| > | ||
| <option value="">--</option> | ||
| <option v-if="isNewParty(suggestion.party)" :value="suggestion.party!"> |
There was a problem hiding this comment.
The '(new)' option is added at the top of the dropdown. To maintain a consistent UI, ensure this option doesn't duplicate if the user manually selects the same name. Also, consider styling this option specifically to distinguish it from the rest of the list.
Suggested change
| <option v-if="isNewParty(suggestion.party)" :value="suggestion.party!"> | |
| <option v-if="isNewParty(suggestion.party)" :value="suggestion.party!" class="text-warning"> | |
| {{ suggestion.party }} ({{ t('new') }}) | |
| </option> |
Deploying webui with
|
| Latest commit: |
a5bc3e0
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5bc31289.webui-9fh.pages.dev |
| Branch Preview URL: | https://feat-import-auto-create-conf.webui-9fh.pages.dev |
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.
Import confirmation dialog now shows checkboxes for creating new wallets, parties, and categories, disabled by default. The review table highlights rows with unresolved wallets in red and marks new entities with a (new) label in dropdowns.
Shared data is refreshed after successful imports so re-importing doesn't incorrectly flag entities as new. Error messages are deduplicated for cleaner display.