Skip to content

Commit 8a011c9

Browse files
shebz2023GSinseswa721
authored andcommitted
fx-rating-error (#492)
this commit refines the functions of validating this commit utilizes zod library for validating ttl rating trainees (#494) Fetch invitation statistics (#463)
1 parent f0d1c91 commit 8a011c9

File tree

4 files changed

+515
-183
lines changed

4 files changed

+515
-183
lines changed

src/Mutations/invitationMutation.tsx

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,35 @@ export const DELETE_INVITATION = gql`
3636
}
3737
}
3838
`;
39+
40+
export const UPDATE_INVITATION = gql`
41+
mutation UpdateInvitation(
42+
$invitationId: ID!
43+
$orgToken: String!
44+
$newEmail: String
45+
$newRole: String
46+
) {
47+
updateInvitation(
48+
invitationId: $invitationId
49+
orgToken: $orgToken
50+
newEmail: $newEmail
51+
newRole: $newRole
52+
) {
53+
id
54+
invitees {
55+
email
56+
role
57+
}
58+
inviterId
59+
orgToken
60+
}
61+
}
62+
`;
63+
export const CANCEL_INVITATION = gql`
64+
mutation CancelInvitation($id: ID!, $orgToken: String!) {
65+
cancelInvitation(id: $id, orgToken: $orgToken) {
66+
status
67+
createdAt
68+
}
69+
}
70+
`;

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: 2 additions & 6 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-
182178
export default DataTableStats;

0 commit comments

Comments
 (0)