Skip to content

Commit

Permalink
advancing calender functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
RWEMAREMY authored and shema-surge committed Sep 26, 2024
1 parent 6b88737 commit acee092
Show file tree
Hide file tree
Showing 10 changed files with 834 additions and 152 deletions.
4 changes: 3 additions & 1 deletion 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 All @@ -79,7 +81,7 @@ export const GET_TTL_TRAINEES = gql`
role
team {
name
cohort{
cohort {
name
}
}
Expand Down
107 changes: 104 additions & 3 deletions src/Mutations/event.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { gql } from '@apollo/client';
export const GET_EVENTS = gql`
query GetEvents($authToken: String) {
getEvents(authToken: $authToken) {
id
end
hostName
start
Expand All @@ -13,24 +14,45 @@ export const GET_EVENTS = gql`
}
`;

export const GET_EVENT = gql`
query GetEvent($eventId: String!, $authToken: String!) {
getEvent(eventId: $eventId,authToken: $authToken) {
id
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
Expand All @@ -41,3 +63,82 @@ export const ADD_EVENT = gql`
}
}
`;

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
start
timeToEnd
title
timeToStart
}
}
`;

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(
$eventId: String!
$inviteeResponse: String!
$authToken: String!
) {
respondToEventInvitation(
eventId: $eventId,
inviteeResponse: $inviteeResponse,
authToken: $authToken
) {
end
hostName
start
timeToEnd
title
timeToStart
invitees {
email,
status
}
}
}
`
7 changes: 4 additions & 3 deletions src/Mutations/invitationStats.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { gql } from '@apollo/client';

export const GET_INVITATIONS_STATISTICS_QUERY = gql`
query GetInvitationStatistics($orgToken: String!){
getInvitationStatistics(orgToken: $orgToken){
query GetInvitationStatistics($orgToken: String!) {
getInvitationStatistics(orgToken: $orgToken) {
totalInvitations
pendingInvitationsCount
getPendingInvitationsPercentsCount
getAcceptedInvitationsPercentsCount
acceptedInvitationsCount
}
}
`;
`;
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 acee092

Please sign in to comment.