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: {
|
methods: {
|
||||||
...mapActions(useInviteStore, ["deleteInvite"]),
|
...mapActions(useInviteStore, ["deleteInvite"]),
|
||||||
triggerDeleteInvite() {},
|
triggerDeleteInvite() {
|
||||||
|
this.deleteInvite(this.invite.mail);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -24,8 +24,8 @@ export const useInviteStore = defineStore("invite", {
|
||||||
this.loading = "failed";
|
this.loading = "failed";
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
deleteInvite(invite: number): Promise<AxiosResponse<any, any>> {
|
deleteInvite(mail: string): Promise<AxiosResponse<any, any>> {
|
||||||
return http.delete(`/admin/invite/${invite}`).then((result) => {
|
return http.delete(`/admin/invite/${mail}`).then((result) => {
|
||||||
this.fetchInvites();
|
this.fetchInvites();
|
||||||
return result;
|
return result;
|
||||||
});
|
});
|
||||||
|
|
|
@ -41,6 +41,10 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(useUserStore, ["fetchUsers"]),
|
...mapActions(useUserStore, ["fetchUsers"]),
|
||||||
|
...mapActions(useModalStore, ["openModal"]),
|
||||||
|
inviteUser() {
|
||||||
|
this.openModal(markRaw(defineAsyncComponent(() => import("@/components/admin/user/user/InviteUserModal.vue"))));
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue