Skip to content

Commit

Permalink
fx-rating-error (#492)
Browse files Browse the repository at this point in the history
this commit refines the functions of validating
this commit utilizes zod library for validating

ttl rating trainees (#494)

Fetch invitation statistics (#463)
  • Loading branch information
shebz2023 authored and GSinseswa721 committed Sep 24, 2024
1 parent f0d1c91 commit f031dba
Show file tree
Hide file tree
Showing 4 changed files with 510 additions and 172 deletions.
32 changes: 32 additions & 0 deletions src/Mutations/invitationMutation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,35 @@ export const DELETE_INVITATION = gql`
}
}
`;

export const UPDATE_INVITATION = gql`
mutation UpdateInvitation(
$invitationId: ID!
$orgToken: String!
$newEmail: String
$newRole: String
) {
updateInvitation(
invitationId: $invitationId
orgToken: $orgToken
newEmail: $newEmail
newRole: $newRole
) {
id
invitees {
email
role
}
inviterId
orgToken
}
}
`;
export const CANCEL_INVITATION = gql`
mutation CancelInvitation($id: ID!, $orgToken: String!) {
cancelInvitation(id: $id, orgToken: $orgToken) {
status
createdAt
}
}
`;
4 changes: 3 additions & 1 deletion src/Mutations/invitationStats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ export const GET_INVITATIONS_STATISTICS_QUERY = gql`
) {
totalInvitations
pendingInvitationsCount
cancelledInvitationsCount
getPendingInvitationsPercentsCount
getAcceptedInvitationsPercentsCount
getCancelledInvitationsPercentsCount
acceptedInvitationsCount
}
}
`;
`;
8 changes: 2 additions & 6 deletions src/components/InvitationTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,8 @@ function DataTableStats({ data, columns, error, loading }: TableData) {
};

return (
<div
className={``}
>
<div className="flex items-center justify-between pb-6 ">
</div>
<div className="">
<div className="flex items-center justify-between pb-6 " />
<div style={{ overflowX: 'auto' }}>
<table className="min-w-full leading-normal" {...getTableProps()}>
<thead>
Expand Down Expand Up @@ -178,5 +175,4 @@ function DataTableStats({ data, columns, error, loading }: TableData) {
);
}


export default DataTableStats;
Loading

0 comments on commit f031dba

Please sign in to comment.