Skip to content

Commit

Permalink
advancing calender functionality (#480)
Browse files Browse the repository at this point in the history
  • Loading branch information
RWEMAREMY authored and Yvan-David committed Oct 5, 2024
1 parent 213831b commit caf14ad
Show file tree
Hide file tree
Showing 64 changed files with 1,037 additions and 1,010 deletions.
65 changes: 0 additions & 65 deletions src/Mutations/Attendance.tsx
Original file line number Diff line number Diff line change
@@ -1,70 +1,5 @@
import {gql} from '@apollo/client';

export const GET_TEAM_ATTENDANCE = gql`
query GetTeamAttendance($team: String!, $orgToken: String) {
getTeamAttendance(team: $team, orgToken: $orgToken) {
id
week
phase {
id
name
}
cohort {
id
name
}
teams {
team {
id
name
}
trainees {
trainee {
id
email
profile {
id
name
}
}
status {
day
date
score
}
}
}
}
}
`;
export const GET_ATTENDANCE_BY_ID = gql`
query GetAttendance($id: ID!) {
getTraineeAttendanceByID(id: $id) {
id
week
trainees {
traineeId
traineeEmail
status {
days
value
}
}
}
}
`;
export const GET_WEEKLY_ATTENDANCE = gql`
query GetTraineeAttendanceByID($traineeEmail: String!) {
getTraineeAttendanceByID(traineeEmail: $traineeEmail) {
weekNumber
traineeAttendance {
days
value
}
}
}
`;

export const RECORD_ATTENDANCE = gql`
mutation RecordAttendance(
$week: Int!
Expand Down
15 changes: 1 addition & 14 deletions src/Mutations/MakeDefault.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,9 @@
import { gql } from '@apollo/client';

export const DEFAULT_GRADE = gql`
query GetDefaultGrading {
getDefaultGrading {
id
name
grade
description
percentage
userId
defaultGrading
}
}
`;

const MAKE_DEFAULT_GRADING_SYSTEM = gql`
mutation MakeRatingdefault($makeRatingdefaultId: ID) {
makeRatingdefault(id: $makeRatingdefaultId)
}
`;

export default MAKE_DEFAULT_GRADING_SYSTEM;
240 changes: 3 additions & 237 deletions src/Mutations/Ratings.tsx
Original file line number Diff line number Diff line change
@@ -1,127 +1,5 @@
import { gql } from '@apollo/client';

export const GET_RATINGS = gql`
query Query($orgToken: String) {
fetchRatings(orgToken: $orgToken) {
user {
id
email
}
sprint
quantity
bodyQuantity
quantityRemark
quality
bodyProfessional
qualityRemark
professional_Skills
professionalRemark
bodyQuality
coordinator
average
cohort {
name
phase {
name
}
}
}
}
`;
export const RATING_BY_COHORT = gql`
query GetAllCohorts($cohortName: String) {
fetchRatingByCohort(CohortName: $cohortName) {
sprint
quantity
approved
coordinator
average
cohort {
name
id
phase {
name
}
}
user {
id
email
profile {
name
}
}
quantityRemark
bodyQuantity
quality
qualityRemark
bodyQuality
professional_Skills
professionalRemark
bodyProfessional
feedbacks {
sender {
email
id
profile {
avatar
name
}
role
}
content
createdAt
}
user {
id
email
}
quantityRemark
bodyQuantity
quality
qualityRemark
bodyQuality
professional_Skills
professionalRemark
bodyProfessional
}
}
`;
export const FETCH_ALL_RATINGS = gql`
query FetchAllRatings($orgToken: String) {
fetchAllRatings(orgToken: $orgToken) {
user {
id
email
profile {
firstName
lastName
}
team {
name
}
}
sprint
quantity
quantityRemark
quality
qualityRemark
professional_Skills
professionalRemark
average
cohort {
name
phase {
name
}
}
coordinator
feedbacks {
content
}
}
}
`;

export const ADD_RATING = gql`
mutation AddRatings(
$user: String!
Expand Down Expand Up @@ -247,6 +125,7 @@ export const ADD_FEEDBACK = gql`
}
}
`;

export const GET_FEEDBACK_SUBSCRIPTION = gql`
subscription Newfeedback($sprint: String, $user: String) {
newfeedback(sprint: $sprint, user: $user) {
Expand All @@ -260,6 +139,7 @@ export const GET_FEEDBACK_SUBSCRIPTION = gql`
}
}
`;

export const GET_FEEDBACKS_SUBSCRIPTION = gql`
subscription Newfeedbacks($sprintUser: String) {
newfeedbacks(sprint_user: $sprintUser) {
Expand All @@ -277,6 +157,7 @@ export const GET_FEEDBACKS_SUBSCRIPTION = gql`
}
}
`;

export const APPROVE_RATING = gql`
mutation Mutation($user: String!, $sprint: Int!) {
approveRating(user: $user, sprint: $sprint) {
Expand All @@ -298,118 +179,3 @@ export const REJECT_RATING = gql`
rejectRating(user: $user, sprint: $sprint)
}
`;

export const TRAINEE_RATING = gql`
query Query {
fetchRatingsTrainee {
user {
id
email
}
sprint
phase
sprint
quantity
quantityRemark
quality
qualityRemark
professional_Skills
professionalRemark
average
cohort {
name
phase {
name
}
coordinator {
email
profile {
name
}
}
}
feedbacks {
sender {
email
id
profile {
avatar
name
}
role
}
content
createdAt
}
}
}
`;

export const GET_USERS = gql`
query GetAllUsers($cohortName: ID!) {
fetchCohortsCoordinator(cohortName: $cohortName) {
name
phase {
name
}
coordinator {
id
}
members {
id
role
email
}
program {
name
}
id
}
}
`;

export const GET_COORDINATOR_COHORTS_QUERY = gql`
query GetCoordinatorCohorts($orgToken: String) {
getCoordinatorCohorts(orgToken: $orgToken) {
name
id
}
}
`;

export const GET_ALL_TRAINEES = gql`
query GetAllUsers($orgToken: String) {
getAllUsers(orgToken: $orgToken) {
role
email
team {
name
cohort {
endDate
startDate
phase {
name
description
}
name
program {
organization {
name
}
name
manager {
role
email
profile {
name
firstName
lastName
}
}
}
}
}
}
}
`;
Loading

0 comments on commit caf14ad

Please sign in to comment.