fix(frontend): event stale fields#49
Merged
Merged
Conversation
This ensures that event forms display the most up-to-date fields and tags, preventing errors when submitting events that reference deleted items.
|
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.



✨ Overview
This PR fixes a bug where event editing forms could contain stale field or tag data after a field or tag was deleted or updated.
Previously, deleting a field from the fields list page did not invalidate the
['events']query. If a user then attempted to edit an event that referenced the deleted field, the form would initialize with the stale field ID, leading to a "One or more referenced fields do not exist" error upon submission.Changes:
FieldsPage.vueto invalidate the['events']query when a field is deleted or updated.FieldDetailsPage.vueto invalidate the['events']query when a field is deleted or updated.TagsPage.vueto invalidate the['events']query when a tag is deleted or updated.🛠️ Scope & Verification
Workspace:
Checklist:
📝 Developer Notes (Optional)
Invalidating the
['events']query ensures that any component displaying event data (including the edit modal) will fetch the latest information from the server, which will have automatically unlinked the deleted fields or tags.