Update client deletion

Optimized client deletion
This commit is contained in:
Donald Zou
2025-08-12 17:21:08 +08:00
parent 0a8692dcc0
commit 3dd065dd7b
3 changed files with 9 additions and 5 deletions

View File

@@ -12,7 +12,7 @@ const values = reactive({
</script> </script>
<template> <template>
<div class="position-absolute w-100 h-100 top-0 start-0 z-1 rounded-3 d-flex p-2" style="background-color: #00000070;"> <div class="position-absolute w-100 h-100 top-0 start-0 z-1 rounded-3 d-flex p-2" style="background-color: #00000070; z-index: 9999">
<div class="card m-auto rounded-3" style="width: 700px"> <div class="card m-auto rounded-3" style="width: 700px">
<div class="card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"> <div class="card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2">
<h4 class="mb-0"> <h4 class="mb-0">

View File

@@ -64,9 +64,9 @@ const updateProfile = async () => {
updatingProfile.value = false updatingProfile.value = false
}) })
} }
const deleteSuccess = () => { const deleteSuccess = async () => {
router.push('/clients') await router.push('/clients')
emits("deleteSuccess") await assignmentStore.getClients()
} }
</script> </script>

View File

@@ -22,6 +22,10 @@ const oidc = computed(() => {
) )
) )
}) })
const deleteSuccess = async () => {
await assignmentStore.getClients();
}
</script> </script>
<template> <template>
@@ -62,7 +66,7 @@ const oidc = computed(() => {
<div <div
:class="{'hide': !route.params.id}" :class="{'hide': !route.params.id}"
class="col-sm-8 clientViewerContainer"> class="col-sm-8 clientViewerContainer">
<RouterView @deleteSuccess="async () => { await assignmentStore.getClients()}"></RouterView> <RouterView></RouterView>
</div> </div>
</div> </div>
</div> </div>