@@ -14,7 +14,6 @@ import { ACCEPT_INVITATION, REJECT_INVITATION } from "@/graphql/member";
|
||||
import { IMember } from "@/types/actor";
|
||||
import { Component, Prop, Vue } from "vue-property-decorator";
|
||||
import InvitationCard from "@/components/Group/InvitationCard.vue";
|
||||
import { SnackbarProgrammatic as Snackbar } from "buefy";
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
@@ -33,10 +32,13 @@ export default class Invitations extends Vue {
|
||||
},
|
||||
});
|
||||
if (data) {
|
||||
this.$emit("acceptInvitation", data.acceptInvitation);
|
||||
this.$emit("accept-invitation", data.acceptInvitation);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
if (error.graphQLErrors && error.graphQLErrors.length > 0) {
|
||||
this.$notifier.error(error.graphQLErrors[0].message);
|
||||
}
|
||||
} catch (e) {
|
||||
Snackbar.open({ message: e.message, type: "is-danger", position: "is-bottom" });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,10 +51,13 @@ export default class Invitations extends Vue {
|
||||
},
|
||||
});
|
||||
if (data) {
|
||||
this.$emit("rejectInvitation", data.rejectInvitation);
|
||||
this.$emit("reject-invitation", data.rejectInvitation);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
if (error.graphQLErrors && error.graphQLErrors.length > 0) {
|
||||
this.$notifier.error(error.graphQLErrors[0].message);
|
||||
}
|
||||
} catch (e) {
|
||||
Snackbar.open({ message: e.message, type: "is-danger", position: "is-bottom" });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
<b-loading :active.sync="$apollo.loading"></b-loading>
|
||||
<invitations
|
||||
:invitations="invitations"
|
||||
@acceptInvitation="acceptInvitation"
|
||||
@rejectInvitation="rejectInvitation"
|
||||
@accept-invitation="acceptInvitation"
|
||||
@reject-invitation="rejectInvitation"
|
||||
/>
|
||||
<section v-if="memberships && memberships.length > 0">
|
||||
<GroupMemberCard
|
||||
@@ -43,7 +43,6 @@ import Invitations from "@/components/Group/Invitations.vue";
|
||||
import { Paginate } from "@/types/paginate";
|
||||
import { IGroup, IMember, MemberRole, usernameWithDomain } from "@/types/actor";
|
||||
import { Route } from "vue-router";
|
||||
import { ApolloError } from "apollo-client";
|
||||
import RouteName from "../../router/name";
|
||||
|
||||
@Component({
|
||||
|
||||
Reference in New Issue
Block a user