Skip to content

Commit 60e393c

Browse files
authored
fix(frontend): event stale fields (#49)
* fix(frontend): invalidate events query on field/tag changes
1 parent d5903b2 commit 60e393c

4 files changed

Lines changed: 9 additions & 1 deletion

File tree

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
## 🛠️ Scope & Verification
66

77
**Workspace:**
8-
- [ ] frontend | - [ ] backend | - [ ] common/config
8+
- [ ] frontend
9+
- [ ] backend
10+
- [ ] common/config
911

1012
**Checklist:**
1113
- [ ] Manually tested and verified locally

frontend/src/modules/fields/pages/FieldDetailsPage.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ const { mutate: deleteField, isPending: isDeleting } = useMutation({
3333
onSuccess: () => {
3434
showDeleted('Field')
3535
queryClient.invalidateQueries({ queryKey: ['fields'] })
36+
queryClient.invalidateQueries({ queryKey: ['events'] })
3637
router.push('/fields')
3738
},
3839
})
@@ -43,6 +44,7 @@ const { mutate: updateField, isPending: isSaving } = useMutation({
4344
showUpdated('Field')
4445
queryClient.invalidateQueries({ queryKey: ['fields', fieldId] })
4546
queryClient.invalidateQueries({ queryKey: ['fields'] })
47+
queryClient.invalidateQueries({ queryKey: ['events'] })
4648
showEditModal.value = false
4749
},
4850
})

frontend/src/modules/fields/pages/FieldsPage.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ const { mutate: deleteField, isPending: isDeleting } = useMutation({
4545
onSuccess: () => {
4646
showDeleted('Field')
4747
queryClient.invalidateQueries({ queryKey: ['fields'] })
48+
queryClient.invalidateQueries({ queryKey: ['events'] })
4849
},
4950
})
5051
@@ -54,6 +55,7 @@ const { mutate: updateField, isPending: isSaving } = useMutation({
5455
onSuccess: () => {
5556
showUpdated('Field')
5657
queryClient.invalidateQueries({ queryKey: ['fields'] })
58+
queryClient.invalidateQueries({ queryKey: ['events'] })
5759
},
5860
})
5961

frontend/src/modules/tags/pages/TagsPage.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ const { mutate: deleteTag, isPending: isDeleting } = useMutation({
4747
onSuccess: () => {
4848
showDeleted('Tag')
4949
queryClient.invalidateQueries({ queryKey: ['tags'] })
50+
queryClient.invalidateQueries({ queryKey: ['events'] })
5051
},
5152
})
5253
@@ -55,6 +56,7 @@ const { mutate: updateTag, isPending: isSaving } = useMutation({
5556
onSuccess: () => {
5657
showUpdated('Tag')
5758
queryClient.invalidateQueries({ queryKey: ['tags'] })
59+
queryClient.invalidateQueries({ queryKey: ['events'] })
5860
},
5961
})
6062

0 commit comments

Comments
 (0)