Skip to content

Commit

Permalink
fx<invitation table> fixing invitation table by improving its loading…
Browse files Browse the repository at this point in the history
… state

fx<invitation table> fixing invitation table by improving its loading state

advancing calender functionality (#480)
  • Loading branch information
Ndevu12 committed Oct 4, 2024
1 parent 73792fb commit 4024b55
Show file tree
Hide file tree
Showing 24 changed files with 1,449 additions and 350 deletions.
3 changes: 3 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
export default {
preset: 'ts-jest',
testEnvironment: 'jsdom',
testEnvironmentOptions: {
customExportConditions: [] // don't load "browser" field
},
verbose: true,
collectCoverage: true,
coverageReporters: ['lcov', 'text'],
Expand Down
97 changes: 44 additions & 53 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
"@babel/preset-react": "^7.22.5",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@fullcalendar/core": "^5.11.5",
"@fullcalendar/daygrid": "^5.11.5",
"@fullcalendar/interaction": "^5.11.5",
"@fullcalendar/list": "^5.11.5",
"@fullcalendar/react": "^5.11.5",
"@fullcalendar/timegrid": "^5.11.5",
"@fullcalendar/core": "^6.1.15",
"@fullcalendar/daygrid": "^6.1.15",
"@fullcalendar/interaction": "^6.1.15",
"@fullcalendar/list": "^6.1.15",
"@fullcalendar/react": "^6.1.15",
"@fullcalendar/timegrid": "^6.1.15",
"@headlessui/react": "^1.7.15",
"@heroicons/react": "^1.0.6",
"@iconify/react": "^3.2.2",
Expand Down
2 changes: 2 additions & 0 deletions src/Mutations/User.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ export const GET_ALL_TTL_USERS = gql`
getAllTTLUsers(orgToken: $orgToken) {
profile {
name
id
}
email
role
team {
name
cohort {
Expand Down
110 changes: 107 additions & 3 deletions src/Mutations/event.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,96 @@ import { gql } from '@apollo/client';
export const GET_EVENTS = gql`
query GetEvents($authToken: String) {
getEvents(authToken: $authToken) {
id
user
end
hostName
start
timeToEnd
timeToStart
title
invitees {
email
}
}
}
`;

export const GET_EVENT = gql`
query GetEvent($eventId: String!, $authToken: String!) {
getEvent(eventId: $eventId,authToken: $authToken) {
id
user
end
hostName
start
timeToEnd
timeToStart
title
invitees {
email
}
}
}
`

export const ADD_EVENT = gql`
mutation CreateEvent(
$title: String!
$end: String!
$timeToStart: String!
$timeToFinish: String!
$timeToEnd: String!
$hostName: String!
$start: String!
$authToken: String
$authToken: String!
$orgToken: String!
$invitees: [String]!
) {
createEvent(
title: $title
end: $end
timeToStart: $timeToStart
timeToEnd: $timeToFinish
timeToEnd: $timeToEnd
hostName: $hostName
start: $start
authToken: $authToken
orgToken: $orgToken
invitees: $invitees
) {
end
hostName
start
timeToEnd
title
timeToStart
}
}
`;

export const EDIT_EVENT = gql`
mutation EditEvent(
$eventId: String!
$title: String!
$end: String!
$timeToStart: String!
$timeToEnd: String!
$hostName: String!
$start: String!
$authToken: String!
$orgToken: String!
$invitees: [String]!
) {
editEvent(
eventId: $eventId
title: $title
end: $end
timeToStart: $timeToStart
timeToEnd: $timeToEnd
hostName: $hostName
start: $start
authToken: $authToken
orgToken: $orgToken
invitees: $invitees
) {
end
hostName
Expand All @@ -41,3 +103,45 @@ export const ADD_EVENT = gql`
}
}
`;

export const CANCEL_EVENT = gql`
mutation CancelEvent(
$eventId: String!
$authToken: String!
) {
cancelEvent(
eventId: $eventId
authToken: $authToken
) {
end
hostName
start
timeToEnd
title
timeToStart
}
}
`

export const RESPOND_TO_EVENT_INVITATION = gql`
mutation RespondToEventInvitation(
$eventToken: String!
$authToken: String!
) {
respondToEventInvitation(
eventToken: $eventToken,
authToken: $authToken
) {
end
hostName
start
timeToEnd
title
timeToStart
invitees {
email,
status
}
}
}
`
15 changes: 15 additions & 0 deletions src/Mutations/manageStudentMutations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@ export const GET_USERS_QUERY = gql`
}
`;

export const GET_ALL_USERS_QUERY = gql`
query GetUsers($orgToken: String) {
getAllUsers(orgToken: $orgToken) {
id
email
role
profile{
firstName
lastName
}
}
}
`;

export const DROP_TRAINEE = gql`
mutation DropTrainee(
$traineeId: String!
Expand All @@ -36,6 +50,7 @@ export const GET_TRAINEES_QUERY = gql`
id
user {
id
role
status {
status
date
Expand Down
Loading

0 comments on commit 4024b55

Please sign in to comment.