Skip to content

Commit

Permalink
fix admin dashboard (#328)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gentille-dev authored and NTElissa committed Nov 28, 2023
1 parent d6bd997 commit 6227e1b
Show file tree
Hide file tree
Showing 25 changed files with 1,018 additions and 315 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"plugins": ["react", "@typescript-eslint"],
"ignorePatterns": ["/root/webpack.config.js"],
"rules": {
"react/prop-types": "off",
"no-console": ["error"],
"import/extensions": "off",
"react/jsx-filename-extension": 0,
Expand Down
9 changes: 9 additions & 0 deletions src/Mutations/User.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,13 @@ export const DROP_TTL_USER = gql`
dropTTLUser(email: $email, reason: $reason)
}
`;
export const GET_USERS = gql`
query GetUserEmails {
GetUserEmails {
email
}
}
`;

export default GET_PROFILE;

40 changes: 40 additions & 0 deletions src/Mutations/event.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,23 @@ export const GET_EVENTS = gql`
start
timeToEnd
timeToStart
guests
title
guests
}
}
`;
export const GET_ACCEPTED_EVENTS = gql`
query GetAcceptedEvents($authToken: String) {
getAcceptedEvents(authToken: $authToken) {
end
hostName
start
timeToEnd
timeToStart
guests
title
guests
}
}
`;
Expand All @@ -21,6 +37,7 @@ export const ADD_EVENT = gql`
$timeToFinish: String!
$hostName: String!
$start: String!
$guests: [String!]!
$authToken: String
) {
createEvent(
Expand All @@ -30,6 +47,7 @@ export const ADD_EVENT = gql`
timeToEnd: $timeToFinish
hostName: $hostName
start: $start
guests: $guests
authToken: $authToken
) {
end
Expand All @@ -38,6 +56,28 @@ export const ADD_EVENT = gql`
timeToEnd
title
timeToStart
guests
}
}
`;

export const SEND_INVITATION_EMAIL = gql`
mutation SendInvitationEmail($email: String!, $title: String!) {
sendInvitationEmail(email: $email, title: $title) {
email
title
}
}
`;

export const GET_ALL_COHORTS = gql`
query($orgToken: String) {
getAllCohorts(orgToken: $orgToken) {
name
}
}
`;




28 changes: 26 additions & 2 deletions src/Mutations/manageStudentMutations.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// import { gql } from '@apollo/client';
import { gql, ApolloClient, InMemoryCache } from '@apollo/client';

import GET_PROFILE from './User';

export const GET_USERS_QUERY = gql`
query GetUsers($orgToken: String) {
getUsers(orgToken: $orgToken) {
Expand Down Expand Up @@ -46,6 +44,7 @@ export const GET_TRAINEES_QUERY = gql`
githubUsername
resume
}
id
email
cohort {
coordinator {
Expand Down Expand Up @@ -351,6 +350,31 @@ export const INVITE_USER_MUTATION = gql`
inviteUser(email: $email, orgToken: $orgToken, type: $type)
}
`;
export const ACCEPT_EVENT_MUTATION = gql`
mutation RespondToEventInvitation(
$eventId: ID!
$status: String!
$reason: String!
$authToken: String
) {
respondToEventInvitation(
eventId: $eventId
status: $status
reason: $reason
authToken: $authToken
) {
title
timeToStart
timeToEnd
invitationStatus
invitationReason
hostName
guests
end
start
}
}
`;
export const GET_TEAM_QUERY = gql`
query GetAllTeamInCohort($orgToken: String, $cohort: String) {
getAllTeamInCohort(orgToken: $orgToken, cohort: $cohort) {
Expand Down
Loading

0 comments on commit 6227e1b

Please sign in to comment.