#12-invite-user #13

Merged
jkeffects merged 2 commits from #12-invite-user into main 2024-11-24 11:36:59 +00:00
3 changed files with 9 additions and 3 deletions
Showing only changes of commit ed50d8e446 - Show all commits

View file

@ -40,7 +40,9 @@ export default defineComponent({
}, },
methods: { methods: {
...mapActions(useInviteStore, ["deleteInvite"]), ...mapActions(useInviteStore, ["deleteInvite"]),
triggerDeleteInvite() {}, triggerDeleteInvite() {
this.deleteInvite(this.invite.mail);
},
}, },
}); });
</script> </script>

View file

@ -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;
}); });

View file

@ -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>