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 Oct 23, 2023
1 parent 9403126 commit 0592a4c
Show file tree
Hide file tree
Showing 9 changed files with 102 additions and 286 deletions.
12 changes: 1 addition & 11 deletions src/Mutations/manageStudentMutations.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +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) {
Expand All @@ -12,13 +11,6 @@ export const GET_USERS_QUERY = gql`
}
`;

export const DROP_TRAINEE = gql`
mutation DropTrainee($traineeId: String!, $reason: String!, $date: DateTime!) {
dropTrainee(traineeId: $traineeId, reason: $reason, date: $date)
}
`;


export const GET_TRAINEES_QUERY = gql`
query GetTrainees($orgToken: String) {
getTrainees(orgToken: $orgToken) {
Expand Down Expand Up @@ -71,8 +63,6 @@ export const GET_TRAINEES_QUERY = gql`
}
}
`;


export const GET_COHORT_TRAINEES_QUERY = gql`
query GetCohortTrainees($cohort: String, $orgToken: String) {
getCohortTrainees(cohort: $cohort, orgToken: $orgToken) {
Expand Down Expand Up @@ -417,4 +407,4 @@ export const GET_TEAM_TRAINEE_QUERY = gql`
}
}
}
`;
`;
2 changes: 1 addition & 1 deletion src/components/Calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ const Calendar = () => {
};

/* istanbul ignore next */

const handleAddEvent = (e: any) => {
e.preventDefault();
const updatedNewEvent = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Docs/OthersDocs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -408,4 +408,4 @@ function TraineeDocs() {
);
}

export default TraineeDocs;
export default TraineeDocs;
9 changes: 4 additions & 5 deletions src/containers/DashRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,12 @@ const AdminManageRoles = React.lazy(
const AdminTraineeDashboard = React.lazy(
() => import('../pages/AdminTraineeDashboard'),
);
const ViewTraineeRatings = React.lazy(
() => import('../pages/ratings/ViewTraineeRatings'),
);
const TtlTraineeDashboard = React.lazy(
() => import('../pages/ttlTraineeDashboard'),
);

const ViewTraineeRatings = React.lazy(
() => import('../pages/ratings/ViewTraineeRatings'),
);
const TraineeRatingDashboard = React.lazy(
() => import('../pages/TraineeRatingDashboard'),
);
Expand Down Expand Up @@ -166,4 +165,4 @@ function DashRoutes() {
);
}

export default DashRoutes;
export default DashRoutes;
2 changes: 1 addition & 1 deletion src/containers/Routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,4 @@ function MainRoutes() {
);
}

export default MainRoutes;
export default MainRoutes;
7 changes: 4 additions & 3 deletions src/pages/AdminDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ function SupAdDashboard() {
const inviteModel = () => {
const newState = !inviteTraineeModel;
setInviteTraineeModel(newState);
// this is true
};

const [inviteUser] = useMutation(INVITE_USER_MUTATION, {
Expand Down Expand Up @@ -137,7 +138,7 @@ function SupAdDashboard() {
<div>
{/* <div className="bg-light-bg dark:bg-dark-frame-bg ">
<div className="flex items-left px-10 lg:px-60 pt-24 pb-8"> */}
<div className="flex gap-2 pt-5">
{/* <div className="flex gap-2 pt-5">
{user?.role === 'coordinator' || undefined ? (
''
) : (
Expand All @@ -151,7 +152,7 @@ function SupAdDashboard() {
{t('Invite an organization')}
</Button>
)}
</div>
</div> */}
</div>

{/* </div>
Expand All @@ -165,4 +166,4 @@ function SupAdDashboard() {
);
}

export default SupAdDashboard;
export default SupAdDashboard;
Loading

0 comments on commit 0592a4c

Please sign in to comment.