fix: query refetchen ipv hele pagina reloaden
This commit is contained in:
parent
a227694f7d
commit
0abd91373d
1 changed files with 3 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed, onMounted, watch } from "vue";
|
import { ref, computed, onMounted } from "vue";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import authState from "@/services/auth/auth-service.ts";
|
import authState from "@/services/auth/auth-service.ts";
|
||||||
|
@ -101,9 +101,9 @@
|
||||||
deleteAssignmentMutation.mutate(
|
deleteAssignmentMutation.mutate(
|
||||||
{ cid: clsId, an: num },
|
{ cid: clsId, an: num },
|
||||||
{
|
{
|
||||||
onSuccess: (data) => {
|
onSuccess: async (data) => {
|
||||||
if (data?.assignment) {
|
if (data?.assignment) {
|
||||||
window.location.reload();
|
await assignmentsQueryResult.refetch();
|
||||||
}
|
}
|
||||||
showSnackbar(t("success"), "success");
|
showSnackbar(t("success"), "success");
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue