Skip to content

Commit d77e537

Browse files
ft(cancel-invite):cancel a sent invitation
1 parent f0d1c91 commit d77e537

File tree

4 files changed

+294
-144
lines changed

4 files changed

+294
-144
lines changed

src/Mutations/invitationMutation.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,12 @@ export const DELETE_INVITATION = gql`
3636
}
3737
}
3838
`;
39+
40+
export const CANCEL_INVITATION = gql`
41+
mutation CancelInvitation($id: ID!, $orgToken: String!) {
42+
cancelInvitation(id: $id, orgToken: $orgToken) {
43+
status
44+
createdAt
45+
}
46+
}
47+
`;

src/Mutations/invitationStats.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ export const GET_INVITATIONS_STATISTICS_QUERY = gql`
1515
) {
1616
totalInvitations
1717
pendingInvitationsCount
18+
cancelledInvitationsCount
1819
getPendingInvitationsPercentsCount
1920
getAcceptedInvitationsPercentsCount
21+
getCancelledInvitationsPercentsCount
2022
acceptedInvitationsCount
2123
}
2224
}
23-
`;
25+
`;

src/components/InvitationTable.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,8 @@ function DataTableStats({ data, columns, error, loading }: TableData) {
6262
};
6363

6464
return (
65-
<div
66-
className={``}
67-
>
68-
<div className="flex items-center justify-between pb-6 ">
69-
</div>
65+
<div className="">
66+
<div className="flex items-center justify-between pb-6 " />
7067
<div style={{ overflowX: 'auto' }}>
7168
<table className="min-w-full leading-normal" {...getTableProps()}>
7269
<thead>
@@ -178,5 +175,4 @@ function DataTableStats({ data, columns, error, loading }: TableData) {
178175
);
179176
}
180177

181-
182-
export default DataTableStats;
178+
export default DataTableStats;

0 commit comments

Comments
 (0)