Skip to content

Commit

Permalink
Merge pull request #114 from sdslabs/development
Browse files Browse the repository at this point in the history
merge development
  • Loading branch information
ayanchoudhary authored Oct 9, 2021
2 parents 5f1e4f4 + 1888aee commit 3b8c676
Show file tree
Hide file tree
Showing 74 changed files with 3,003 additions and 16,495 deletions.
4,477 changes: 2,116 additions & 2,361 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
"node-sass": "^4.13.1",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-google-docs-viewer": "^1.0.1",
"react-lottie": "^1.2.3",
"react-redux": "^7.1.1",
"react-router-dom": "^5.0.0",
"react-scripts": "3.0.1",
"react-select": "^4.2.1",
"react-swipeable-views": "^0.13.9",
"react-toastify": "^7.0.3",
"redux": "^4.0.4",
"websocket": "^1.0.31"
},
Expand Down
6 changes: 6 additions & 0 deletions src/actions/adminPanelActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
SWITCH_TAB,
SET_TABLE_DATA,
RESET_ADMIN_MENU,
TOGGLE_ADMIN_LOADER,
} from 'constants/action-types';

export const SwitchMainMenu = (data) => ({
Expand All @@ -29,3 +30,8 @@ export const SetTableData = (data) => ({
export const ResetAdminMenu = () => ({
type: RESET_ADMIN_MENU,
});

export const ToggleAdminLoader = (data) => ({
type: TOGGLE_ADMIN_LOADER,
payload: data,
});
15 changes: 13 additions & 2 deletions src/api/notificationApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,18 @@ function getNewNotification(token) {
}
function deleteNotification(notification) {
return axiosInstance
.delete('/notifications', { params: { notification } })
.delete('/notifications', { params: { notification: notification, userid: 'null' } })
.then((response) => {
const res = JSON.parse(response.request.response);
return res;
})
.catch((error) => {
return Promise.reject(error);
});
}
function deleteAllNotifications(userid) {
return axiosInstance
.delete('/notifications', { params: { notification: 'null', userid: userid } })
.then((response) => {
const res = JSON.parse(response.request.response);
return res;
Expand All @@ -40,4 +51,4 @@ function deleteNotification(notification) {
});
}

export { getNewNotification, getAllNotifications, deleteNotification };
export { getNewNotification, getAllNotifications, deleteNotification, deleteAllNotifications };
14 changes: 13 additions & 1 deletion src/api/searchApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,16 @@ function getSearchResults(query) {
});
}

export { getSearchResults };
function getSearchCourseResults(query, dept, user) {
return axiosInstance
.get(`/filtercourse`, { params: { q: query, format: 'json', dept: dept, user: user } })
.then((response) => {
const res = JSON.parse(response.request.response);
return res;
})
.catch((error) => {
return Promise.reject(error);
});
}

export { getSearchResults, getSearchCourseResults };
4 changes: 4 additions & 0 deletions src/assets/account.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/head_search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions src/assets/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/notif_approved.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 3b8c676

Please sign in to comment.