Skip to content

Commit

Permalink
Fetch invitation statistics (#463)
Browse files Browse the repository at this point in the history
  • Loading branch information
UwicyezaG authored and kanu-cast committed Oct 2, 2024
1 parent c4ba4bf commit 472b0a1
Show file tree
Hide file tree
Showing 41 changed files with 995 additions and 935 deletions.
12 changes: 12 additions & 0 deletions src/Mutations/invitationStats.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { gql } from '@apollo/client';
export const GET_INVITATIONS_STATISTICS_QUERY = gql`
query GetInvitationStatistics($orgToken: String!){
getInvitationStatistics(orgToken: $orgToken){
totalInvitations
pendingInvitationsCount
getPendingInvitationsPercentsCount
getAcceptedInvitationsPercentsCount
acceptedInvitationsCount
}
}
`;
219 changes: 91 additions & 128 deletions src/components/tests/__snapshots__/AdminTraineeDashboard.test.tsx.snap

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`Button Loading Renders the button 1`] = `
<div
className="flex w-fit py-1 px-3 bg-primary justify-center font-bold md"
className="flex w-fit py-1 px-3 bg-primary justify-center font-bold md font-serif"
>
<div
className="flex w-full gap-2 justify-center items-center"
Expand Down
6 changes: 3 additions & 3 deletions src/components/tests/__snapshots__/DashHeader.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

exports[`DashHeader test Should render DashHeader 1`] = `
<div
className="w-screen py-4 z-20 bg-indigo-100 dark:bg-dark-bg page-header"
className="font-serif w-screen py-4 z-20 bg-indigo-100 dark:bg-dark-bg page-header"
>
<div
className="px-3 flex items-center w-full "
className="px-3 flex items-center w-full font-serif"
>
<div
className="flex px-5 lg:hidden"
Expand Down Expand Up @@ -107,7 +107,7 @@ exports[`DashHeader test Should render DashHeader 1`] = `
className="inline-flex relative items-center p-0 text-sm font-medium text-center text-black ml-auto dark:bg-dark-bg rounded-lg focus:ring-4 focus:outline-none focus:ring-blue-300 dark:focus:ring-blue-800"
>
<button
className="min-w-fit px-4 cursor-pointer "
className="min-w-fit px-4 cursor-pointer font-serif"
id="theme-switch"
onClick={[Function]}
type="button"
Expand Down
2 changes: 1 addition & 1 deletion src/components/tests/__snapshots__/Footer.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`<Footer/> Renders Header 1`] = `
<div
className="w-full bg-indigo-100 dark:bg-dark-bg undefined page-footer"
className="w-full bg-indigo-100 dark:bg-dark-bg undefined page-footer font-serif"
>
<div
className="px-2 flex flex-col lg:flex-row justify-between items-center w-full h-full"
Expand Down
72 changes: 36 additions & 36 deletions src/components/tests/__snapshots__/Header.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`Header Tests Should render the header with home 1`] = `
<div
className="w-screen h-[8vh] z-10 bg-white dark:bg-dark-bg page-header undefined"
className="w-screen h-[8vh] z-10 bg-white dark:bg-dark-bg page-header undefined font-serif"
>
<div
className="px-3 flex justify-between items-center w-full h-full"
Expand Down Expand Up @@ -103,7 +103,7 @@ exports[`Header Tests Should render the header with home 1`] = `
className="hidden lg:flex w-2/3 justify-end "
>
<button
className="min-w-fit px-4 cursor-pointer "
className="min-w-fit px-4 cursor-pointer font-serif"
id="theme-switch"
onClick={[Function]}
type="button"
Expand All @@ -127,7 +127,7 @@ exports[`Header Tests Should render the header with home 1`] = `
onClick={[Function]}
>
<button
className="btn primary lg undefined"
className="btn primary lg undefined font-serif"
disabled={false}
type="button"
>
Expand All @@ -141,7 +141,7 @@ exports[`Header Tests Should render the header with home 1`] = `
onClick={[Function]}
>
<button
className="btn transparentbtn lg mr-8"
className="btn transparentbtn lg mr-8 font-serif"
disabled={false}
type="button"
>
Expand All @@ -155,7 +155,7 @@ exports[`Header Tests Should render the header with home 1`] = `
className="flex px-5 lg:hidden"
>
<button
className="min-w-fit px-4 cursor-pointer "
className="min-w-fit px-4 cursor-pointer font-serif"
id="theme-switch"
onClick={[Function]}
type="button"
Expand Down Expand Up @@ -257,7 +257,7 @@ exports[`Header Tests Should render the header with home 1`] = `
onClick={[Function]}
>
<button
className="btn transparentbtn lg mr-8"
className="btn transparentbtn lg mr-8 font-serif"
disabled={false}
type="button"
>
Expand All @@ -272,7 +272,7 @@ exports[`Header Tests Should render the header with home 1`] = `

exports[`Header Tests Should render the header with no active 1`] = `
<div
className="w-screen h-[8vh] z-10 bg-white dark:bg-dark-bg page-header undefined"
className="w-screen h-[8vh] z-10 bg-white dark:bg-dark-bg page-header undefined font-serif"
>
<div
className="px-3 flex justify-between items-center w-full h-full"
Expand Down Expand Up @@ -372,7 +372,7 @@ exports[`Header Tests Should render the header with no active 1`] = `
className="hidden lg:flex w-2/3 justify-end "
>
<button
className="min-w-fit px-4 cursor-pointer "
className="min-w-fit px-4 cursor-pointer font-serif"
id="theme-switch"
onClick={[Function]}
type="button"
Expand All @@ -396,7 +396,7 @@ exports[`Header Tests Should render the header with no active 1`] = `
onClick={[Function]}
>
<button
className="btn primary lg undefined"
className="btn primary lg undefined font-serif"
disabled={false}
type="button"
>
Expand All @@ -410,7 +410,7 @@ exports[`Header Tests Should render the header with no active 1`] = `
onClick={[Function]}
>
<button
className="btn transparentbtn lg mr-8"
className="btn transparentbtn lg mr-8 font-serif"
disabled={false}
type="button"
>
Expand All @@ -424,7 +424,7 @@ exports[`Header Tests Should render the header with no active 1`] = `
className="flex px-5 lg:hidden"
>
<button
className="min-w-fit px-4 cursor-pointer "
className="min-w-fit px-4 cursor-pointer font-serif"
id="theme-switch"
onClick={[Function]}
type="button"
Expand Down Expand Up @@ -526,7 +526,7 @@ exports[`Header Tests Should render the header with no active 1`] = `
onClick={[Function]}
>
<button
className="btn transparentbtn lg mr-8"
className="btn transparentbtn lg mr-8 font-serif"
disabled={false}
type="button"
>
Expand All @@ -541,7 +541,7 @@ exports[`Header Tests Should render the header with no active 1`] = `

exports[`Header Tests Should render the header with no active 2`] = `
<div
className="w-screen h-[8vh] z-10 bg-white dark:bg-dark-bg page-header undefined"
className="w-screen h-[8vh] z-10 bg-white dark:bg-dark-bg page-header undefined font-serif"
>
<div
className="px-3 flex justify-between items-center w-full h-full"
Expand Down Expand Up @@ -631,7 +631,7 @@ exports[`Header Tests Should render the header with no active 2`] = `
className="hidden lg:flex w-2/3 justify-end "
>
<button
className="min-w-fit px-4 cursor-pointer "
className="min-w-fit px-4 cursor-pointer font-serif"
id="theme-switch"
onClick={[Function]}
type="button"
Expand All @@ -655,7 +655,7 @@ exports[`Header Tests Should render the header with no active 2`] = `
onClick={[Function]}
>
<button
className="btn primary lg undefined"
className="btn primary lg undefined font-serif"
disabled={false}
type="button"
>
Expand All @@ -665,7 +665,7 @@ exports[`Header Tests Should render the header with no active 2`] = `
</button>
</a>
<button
className="btn transparentbtn lg text-red-500 font-bolf dark:text-dark-text-fill mr-8 border border-red-600 dark:border-dark-text-fill"
className="btn transparentbtn lg text-red-500 font-bolf dark:text-dark-text-fill mr-8 border border-red-600 dark:border-dark-text-fill font-serif"
disabled={false}
onClick={[Function]}
type="button"
Expand All @@ -679,7 +679,7 @@ exports[`Header Tests Should render the header with no active 2`] = `
className="flex px-5 lg:hidden"
>
<button
className="min-w-fit px-4 cursor-pointer "
className="min-w-fit px-4 cursor-pointer font-serif"
id="theme-switch"
onClick={[Function]}
type="button"
Expand Down Expand Up @@ -768,7 +768,7 @@ exports[`Header Tests Should render the header with no active 2`] = `
</a>
</li>
<button
className="btn transparentbtn lg text-red-500 font-bolf dark:text-dark-text-fill mr-8 border border-red-600 dark:border-dark-text-fill"
className="btn transparentbtn lg text-red-500 font-bolf dark:text-dark-text-fill mr-8 border border-red-600 dark:border-dark-text-fill font-serif"
disabled={false}
onClick={[Function]}
type="button"
Expand All @@ -781,7 +781,7 @@ exports[`Header Tests Should render the header with no active 2`] = `

exports[`Header Tests Should render the header with no active 3`] = `
<div
className="w-screen h-[8vh] z-10 bg-white dark:bg-dark-bg page-header undefined"
className="w-screen h-[8vh] z-10 bg-white dark:bg-dark-bg page-header undefined font-serif"
>
<div
className="px-3 flex justify-between items-center w-full h-full"
Expand Down Expand Up @@ -882,7 +882,7 @@ exports[`Header Tests Should render the header with no active 3`] = `
className="hidden lg:flex w-2/3 justify-end "
>
<button
className="min-w-fit px-4 cursor-pointer "
className="min-w-fit px-4 cursor-pointer font-serif"
id="theme-switch"
onClick={[Function]}
type="button"
Expand All @@ -906,7 +906,7 @@ exports[`Header Tests Should render the header with no active 3`] = `
onClick={[Function]}
>
<button
className="btn primary lg undefined"
className="btn primary lg undefined font-serif"
disabled={false}
type="button"
>
Expand All @@ -920,7 +920,7 @@ exports[`Header Tests Should render the header with no active 3`] = `
onClick={[Function]}
>
<button
className="btn transparentbtn lg mr-8"
className="btn transparentbtn lg mr-8 font-serif"
disabled={false}
type="button"
>
Expand All @@ -934,7 +934,7 @@ exports[`Header Tests Should render the header with no active 3`] = `
className="flex px-5 lg:hidden"
>
<button
className="min-w-fit px-4 cursor-pointer "
className="min-w-fit px-4 cursor-pointer font-serif"
id="theme-switch"
onClick={[Function]}
type="button"
Expand Down Expand Up @@ -1036,7 +1036,7 @@ exports[`Header Tests Should render the header with no active 3`] = `
onClick={[Function]}
>
<button
className="btn transparentbtn lg mr-8"
className="btn transparentbtn lg mr-8 font-serif"
disabled={false}
type="button"
>
Expand All @@ -1051,7 +1051,7 @@ exports[`Header Tests Should render the header with no active 3`] = `

exports[`Header Tests Should render the header with pricing active 1`] = `
<div
className="w-screen h-[8vh] z-10 bg-white dark:bg-dark-bg page-header undefined"
className="w-screen h-[8vh] z-10 bg-white dark:bg-dark-bg page-header undefined font-serif"
>
<div
className="px-3 flex justify-between items-center w-full h-full"
Expand Down Expand Up @@ -1152,7 +1152,7 @@ exports[`Header Tests Should render the header with pricing active 1`] = `
className="hidden lg:flex w-2/3 justify-end "
>
<button
className="min-w-fit px-4 cursor-pointer "
className="min-w-fit px-4 cursor-pointer font-serif"
id="theme-switch"
onClick={[Function]}
type="button"
Expand All @@ -1176,7 +1176,7 @@ exports[`Header Tests Should render the header with pricing active 1`] = `
onClick={[Function]}
>
<button
className="btn primary lg undefined"
className="btn primary lg undefined font-serif"
disabled={false}
type="button"
>
Expand All @@ -1190,7 +1190,7 @@ exports[`Header Tests Should render the header with pricing active 1`] = `
onClick={[Function]}
>
<button
className="btn transparentbtn lg mr-8"
className="btn transparentbtn lg mr-8 font-serif"
disabled={false}
type="button"
>
Expand All @@ -1204,7 +1204,7 @@ exports[`Header Tests Should render the header with pricing active 1`] = `
className="flex px-5 lg:hidden"
>
<button
className="min-w-fit px-4 cursor-pointer "
className="min-w-fit px-4 cursor-pointer font-serif"
id="theme-switch"
onClick={[Function]}
type="button"
Expand Down Expand Up @@ -1306,7 +1306,7 @@ exports[`Header Tests Should render the header with pricing active 1`] = `
onClick={[Function]}
>
<button
className="btn transparentbtn lg mr-8"
className="btn transparentbtn lg mr-8 font-serif"
disabled={false}
type="button"
>
Expand All @@ -1321,7 +1321,7 @@ exports[`Header Tests Should render the header with pricing active 1`] = `

exports[`Header Tests Should render the header with product active 1`] = `
<div
className="w-screen h-[8vh] z-10 bg-white dark:bg-dark-bg page-header undefined"
className="w-screen h-[8vh] z-10 bg-white dark:bg-dark-bg page-header undefined font-serif"
>
<div
className="px-3 flex justify-between items-center w-full h-full"
Expand Down Expand Up @@ -1421,7 +1421,7 @@ exports[`Header Tests Should render the header with product active 1`] = `
className="hidden lg:flex w-2/3 justify-end "
>
<button
className="min-w-fit px-4 cursor-pointer "
className="min-w-fit px-4 cursor-pointer font-serif"
id="theme-switch"
onClick={[Function]}
type="button"
Expand All @@ -1445,7 +1445,7 @@ exports[`Header Tests Should render the header with product active 1`] = `
onClick={[Function]}
>
<button
className="btn primary lg undefined"
className="btn primary lg undefined font-serif"
disabled={false}
type="button"
>
Expand All @@ -1459,7 +1459,7 @@ exports[`Header Tests Should render the header with product active 1`] = `
onClick={[Function]}
>
<button
className="btn transparentbtn lg mr-8"
className="btn transparentbtn lg mr-8 font-serif"
disabled={false}
type="button"
>
Expand All @@ -1473,7 +1473,7 @@ exports[`Header Tests Should render the header with product active 1`] = `
className="flex px-5 lg:hidden"
>
<button
className="min-w-fit px-4 cursor-pointer "
className="min-w-fit px-4 cursor-pointer font-serif"
id="theme-switch"
onClick={[Function]}
type="button"
Expand Down Expand Up @@ -1575,7 +1575,7 @@ exports[`Header Tests Should render the header with product active 1`] = `
onClick={[Function]}
>
<button
className="btn transparentbtn lg mr-8"
className="btn transparentbtn lg mr-8 font-serif"
disabled={false}
type="button"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`<ProfileTabs/> Renders Profile Tabs 1`] = `
<div
className="bg-cover bg-no-repeat bg-defaultCover bg-center bg-fixed h-[28vh] md:h-[26vh] flex flex-row text-center align-center items-center"
className="font-serif bg-cover bg-no-repeat bg-defaultCover bg-center bg-fixed h-[28vh] md:h-[26vh] flex flex-row text-center align-center items-center"
style={
Object {
"backgroundImage": "url(https://images.unsplash.com/photo-1483168527879-c66136b56105?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=3016&q=80)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`<ProfileDropdown/> Renders the Dropdown 1`] = `
<div
className="w-screen h-screen fixed top-0 left-0 z-50 px-4"
className="font-serif w-screen h-screen fixed top-0 left-0 z-50 px-4"
>
<div
aria-label="background"
Expand Down
Loading

0 comments on commit 472b0a1

Please sign in to comment.