invite management
This commit is contained in:
parent
61052805ae
commit
ed50d8e446
3 changed files with 9 additions and 3 deletions
|
@ -40,7 +40,9 @@ export default defineComponent({
|
|||
},
|
||||
methods: {
|
||||
...mapActions(useInviteStore, ["deleteInvite"]),
|
||||
triggerDeleteInvite() {},
|
||||
triggerDeleteInvite() {
|
||||
this.deleteInvite(this.invite.mail);
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -24,8 +24,8 @@ export const useInviteStore = defineStore("invite", {
|
|||
this.loading = "failed";
|
||||
});
|
||||
},
|
||||
deleteInvite(invite: number): Promise<AxiosResponse<any, any>> {
|
||||
return http.delete(`/admin/invite/${invite}`).then((result) => {
|
||||
deleteInvite(mail: string): Promise<AxiosResponse<any, any>> {
|
||||
return http.delete(`/admin/invite/${mail}`).then((result) => {
|
||||
this.fetchInvites();
|
||||
return result;
|
||||
});
|
||||
|
|
|
@ -41,6 +41,10 @@ export default defineComponent({
|
|||
},
|
||||
methods: {
|
||||
...mapActions(useUserStore, ["fetchUsers"]),
|
||||
...mapActions(useModalStore, ["openModal"]),
|
||||
inviteUser() {
|
||||
this.openModal(markRaw(defineAsyncComponent(() => import("@/components/admin/user/user/InviteUserModal.vue"))));
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue