Skip to content

Commit

Permalink
Merge pull request #869 from gitmedha/sis/meilisearch_replacement_gra…
Browse files Browse the repository at this point in the history
…phql

replacement of meilisearch in the whole module
  • Loading branch information
Medha-Admin authored Jun 10, 2024
2 parents 266e44e + afd52f2 commit 681404a
Show file tree
Hide file tree
Showing 27 changed files with 504 additions and 891 deletions.
5 changes: 5 additions & 0 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion src/components/layout/Sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const routes = [
title: "Operations",
aliases: ['operations'],
icon: <FaUsersCog {...iconProps} />,
show: isAdmin(),
show: isSRM() ||isAdmin(),
},
{
to:'/calender',
Expand Down
5 changes: 2 additions & 3 deletions src/validations/Student.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ const district= Yup.string().required("District is required.");
const alumni_service_type = Yup.string().required("Type is required.");
const alumni_service_location= Yup.string().required("Location is required.");
const work_engagement = Yup.string().nullable().required("Work Engagement is required.");
const course_name_other=Yup.string().nullable().required("Other Course Name is required.");

export const ProgramEnrollmentValidations = Yup.object({
institution,
Expand All @@ -84,8 +83,8 @@ export const ProgramEnrollmentValidations = Yup.object({
fee_status,
course_name_other:Yup.string().when('course_name_in_current_sis', {
is: (course_name_in_current_sis) => course_name_in_current_sis === 'Other',
then: Yup.string().required('Field is required'),
otherwise: Yup.string(),
then: Yup.string().nullable().required('Field is required'),
otherwise: Yup.string().nullable(),
}),
});

Expand Down
25 changes: 1 addition & 24 deletions src/views/Batches/batchComponents/ProgramEnrollments.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,9 @@ import {GET_BATCH_PROGRAM_ENROLLMENTS } from "../../../graphql";
import { ProgressBarField } from "../../../components/content/Utils";
import { deleteFile } from "../../../common/commonActions";

const Styled = styled.div`
.img-profile-container {
position: relative;
.status-icon {
position: absolute;
top: 0;
right: 0;
padding: 1px 5px 5px 5px;
}
.img-profile {
width: 160px;
margin-left: auto;
}
}
.separator {
background-color: #C4C4C4;
margin-top: 30px;
margin-bottom: 30px;
}
hr {
height: 1px;
}
`;

const ProgramEnrollments = (props) => {
let { id, batch, students, onDataUpdate } = props;
let { id, batch, students } = props;
const [createModalShow, setCreateModalShow] = useState(false);
const [updateModalShow, setUpdateModalShow] = useState(false);
const [viewModalShow, setViewModalShow] = useState(false);
Expand Down
2 changes: 0 additions & 2 deletions src/views/Batches/sessions/updateSession.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@ const UpdateSession = (props) => {
const [gridIntialized, setInitialized] = useState(false);

// Original Copy of attendance List
const [oriAttendanceList, setOriAttendanceList] = useState([]);

// Update Flag
const [updated, setUpdated] = useState(false);

const history = useHistory();

Expand Down
10 changes: 0 additions & 10 deletions src/views/Dashboard/components/ProgramEnrollments.jsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
import nProgress from "nprogress";
import api from "../../../apis";
import moment from "moment";
import Avatar from "../../../components/content/Avatar";
import { useHistory } from "react-router-dom";
import { useState, useEffect, useMemo, useCallback } from "react";
import TabPicker from "../../../components/content/TabPicker";
import Table from '../../../components/content/Table';
import WidgetUtilTab from "../../../components/content/WidgetUtilTab";
import { GET_DASHBOARD_PROGRAM_ENROLLMENTS, } from "../../../graphql/dashboard";
import { setAlert } from "../../../store/reducers/Notifications/actions";
import { connect } from "react-redux";
import Collapse from "../../../components/content/CollapsiblePanels";
import { getOpportunitiesPickList } from "../../Opportunities/OpportunityComponents/opportunityAction";
import { FaBlackTie, FaBriefcase } from "react-icons/fa";
import { Badge } from "../../../components/content/Utils";
import { getProgramEnrollmentsPickList } from "../../Institutions/InstitutionComponents/instituteActions";

Expand All @@ -24,11 +19,8 @@ const tabPickerOptions = [
];

const ProgramEnrollments = (props) => {
const history = useHistory();
const [loading, setLoading] = useState(false);
const [programEnrollments, setProgramEnrollments] = useState([]);
const [pickList, setPickList] = useState([]);
const [activeTab, setActiveTab] = useState(tabPickerOptions[0]);
const [programEnrollmentAggregate, setProgramEnrollmentAggregate] = useState([]);
const [paginationPageSize, setPaginationPageSize] = useState(10);
const [programEnrollmentTableData, setProgramEnrollmentTableData] = useState([]);
Expand Down Expand Up @@ -83,7 +75,6 @@ const ProgramEnrollments = (props) => {

const getProgramEnrollment = async (limit=10) => {
nProgress.start();
setLoading(true);
await api.post("/graphql", {
query: GET_DASHBOARD_PROGRAM_ENROLLMENTS,
variables: {
Expand All @@ -98,7 +89,6 @@ const ProgramEnrollments = (props) => {
.catch(err => {
})
.finally(() => {
setLoading(false);
nProgress.done();
});
};
Expand Down
16 changes: 1 addition & 15 deletions src/views/Employers/EmployerComponents/Opportunities.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import nProgress from "nprogress";
import api from "../../../apis";
import moment from "moment";
import styled from "styled-components";
import Avatar from "../../../components/content/Avatar";
import { useHistory } from "react-router-dom";
import { useState, useEffect, useMemo, useCallback } from "react";
import { useState, useEffect, useMemo} from "react";
import Table from '../../../components/content/Table';
import { FaBlackTie, FaBriefcase } from "react-icons/fa";
import OpportunityForm from "./OpportunityForm";
import { createOpportunity } from "../../Opportunities/OpportunityComponents/opportunityAction";
import { setAlert } from "../../../store/reducers/Notifications/actions";
Expand All @@ -15,18 +10,9 @@ import { Badge } from "../../../components/content/Utils";
import NP from "nprogress";
import { connect } from "react-redux";

const StyledOpportunityIcon = styled.div`
border-radius: 50%;
height: 35px;
width: 35px;
display: flex;
align-items: center;
justify-content: center;
`;

const Opportunities = (props) => {
let { employer, opportunities, onDataUpdate } = props;
const history = useHistory();
const {setAlert} = props;
const [opportunitiesTableData, setOpportunitiesTableData] = useState([]);
const [createOpportunityModalShow, setCreateOpportunityModalShow] = useState(false);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import styled from "styled-components";
import moment from 'moment';
import { useState, useMemo, useEffect, useCallback } from "react";
import Table from "../../../components/content/Table";
Expand All @@ -20,33 +19,8 @@ import nProgress from "nprogress";
import api from "../../../apis";
import { deleteFile } from "../../../common/commonActions";

const Styled = styled.div`
.img-profile-container {
position: relative;
.status-icon {
position: absolute;
top: 0;
right: 0;
padding: 1px 5px 5px 5px;
}
.img-profile {
width: 160px;
margin-left: auto;
}
}
.separator {
background-color: #C4C4C4;
margin-top: 30px;
margin-bottom: 30px;
}
hr {
height: 1px;
}
`;

const ProgramEnrollments = (props) => {
let { id, institution, onDataUpdate } = props;
const [loading, setLoading] = useState(false);
let { id, institution } = props;
const [createModalShow, setCreateModalShow] = useState(false);
const [updateModalShow, setUpdateModalShow] = useState(false);
const [viewModalShow, setViewModalShow] = useState(false);
Expand All @@ -68,7 +42,6 @@ const ProgramEnrollments = (props) => {

const getInstitutionProgramEnrollments = async (limit=paginationPageSize, offset=0, sortBy='student.full_name', sortOrder = 'asc') => {
nProgress.start();
setLoading(true);
await api.post("/graphql", {
query: GET_INSTITUTION_PROGRAM_ENROLLMENTS,
variables: {
Expand All @@ -85,7 +58,6 @@ const ProgramEnrollments = (props) => {
.catch(err => {
})
.finally(() => {
setLoading(false);
nProgress.done();
});
};
Expand Down
9 changes: 1 addition & 8 deletions src/views/OperationsModule/Operation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,17 @@ import moment from "moment";
import api from "../../apis";
import ProgressBar from "../../components/content/ProgressBar";

// import Details from "./StudentComponents/Details";
// import Address from "./StudentComponents/Address";
// import ProgramEnrollments from "./StudentComponents/ProgramEnrollments";
// import AlumniServices from "./StudentComponents/AlumniServices";
import Collapsible from "../../components/content/CollapsiblePanels";
import SkeletonLoader from "../../components/content/SkeletonLoader";
import { setAlert } from "../../store/reducers/Notifications/actions";
// import { deleteStudent, getStudent, getStudentAlumniServices, getStudentEmploymentConnections, getStudentProgramEnrollments, updateStudent } from "./StudentComponents/StudentActions";
// import EmploymentConnections from "./StudentComponents/EmploymentConnections";
// import StudentForm from "./StudentComponents/StudentForm";
import { FaBlackTie, FaBriefcase } from "react-icons/fa";
import Tooltip from "../../components/content/Tooltip";
import { TitleWithLogo } from "../../components/content/Avatar";
import { UPDATE_STUDENT, GET_STUDENT } from "../../graphql";
import styled from 'styled-components';
import { deleteFile } from "../../common/commonActions";
import { uploadFile } from "../../components/content/Utils";
import { isAdmin, isChapterHead, isSRM } from "../../common/commonFunctions";
import { isAdmin, isSRM } from "../../common/commonFunctions";
import StudentForm from "../Students/StudentComponents/StudentForm";

const Styled = styled.div`
Expand Down
Loading

0 comments on commit 681404a

Please sign in to comment.