Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed audio urls for ANTE project type #1018

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
77433a0
Merge branch 'develop' of https://github.com/ai4Bharat/Shoonya-Fronte…
Pursottam6003 Mar 26, 2024
bc35283
Merge branch 'develop' of https://github.com/ai4Bharat/Shoonya-Fronte…
Pursottam6003 Apr 14, 2024
8de861b
updated the front end design for details view page
Pursottam6003 Apr 22, 2024
1252c71
Merge branch 'develop' of https://github.com/ai4Bharat/Shoonya-Fronte…
Pursottam6003 Apr 22, 2024
c6b53f9
tested the code properly
Pursottam6003 Apr 23, 2024
9bf77ef
minor fix
Pursottam6003 Apr 23, 2024
4594dd5
updated the code and minor fixes:
Pursottam6003 Apr 26, 2024
26522c8
Merge branch 'develop' of https://github.com/ai4Bharat/Shoonya-Fronte…
Pursottam6003 Apr 26, 2024
753df6e
Merge branch 'develop' into decentralized_approvals
ishvindersethi22 Apr 29, 2024
8c3b1d3
Merge pull request #1008 from AI4Bharat/decentralized_approvals
ishvindersethi22 Apr 29, 2024
fe5e124
updated the members table
Pursottam6003 Apr 29, 2024
9832aea
Merge pull request #1014 from AI4Bharat/decentralized_approvals
ishvindersethi22 Apr 29, 2024
7fdc681
updated the styling and api calls for page refresh in managers sugges…
Pursottam6003 Apr 30, 2024
65e531e
Merge branch 'develop' of https://github.com/ai4Bharat/Shoonya-Fronte…
Pursottam6003 Apr 30, 2024
712c8ab
Merge pull request #1015 from AI4Bharat/decentralized_approvals
ishvindersethi22 May 1, 2024
dca4202
changed audio urls for ANTE type
kartikvirendrar May 2, 2024
2a5862a
Merge branch 'develop' into clearChildren
kartikvirendrar May 2, 2024
37765f8
Merge pull request #1016 from AI4Bharat/clearChildren
ishvindersethi22 May 2, 2024
8e9c88d
Revert "changed audio urls for ANTE type"
ishvindersethi22 May 2, 2024
41c41d7
Merge pull request #1017 from AI4Bharat/revert-1016-clearChildren
ishvindersethi22 May 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/config/apiendpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const apiendpoint = {
fetch:"/users/account/",
getTasks:"/task/",
getOrganizations:"/organizations/",
getPendingUsers:"/users/invite/",
notification:"/notifications/",
getLanguages:"/users/languages/",
getDatasets:"/data/",
Expand Down
43 changes: 43 additions & 0 deletions src/redux/actions/api/Organization/ApproveManagerSuggestions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/**
* ApproveManagerSuggestions API
*/
import API from "../../../api";
import ENDPOINTS from "../../../../config/apiendpoint";
import constants from "../../../constants";

export default class ApproveManagerSuggestionsAPI extends API {
constructor(userId, timeout = 2000) {
super("POST", timeout, false);
this.type = constants.APPROVE_MANAGER_SUGGESTIONS;
this.userId = userId;
this.endpoint = `${super.apiEndPointAuto()}${ENDPOINTS.getPendingUsers}approve_user/?userId=${this.userId}`;
}

processResponse(res) {
super.processResponse(res);
if (res) {
this.approveManagerSuggestions = res;
}
}

apiEndPoint() {
return this.endpoint;
}

getBody() {}

getHeaders() {
this.headers = {
headers: {
"Content-Type": "application/json",
"Authorization":`JWT ${localStorage.getItem('shoonya_access_token')}`
},
};
return this.headers;
}

getPayload() {
return this.approveManagerSuggestions;
}
}

43 changes: 43 additions & 0 deletions src/redux/actions/api/Organization/GetManagerSuggestions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/**
* GetManagerSuggestion API
*/
import API from "../../../api";
import ENDPOINTS from "../../../../config/apiendpoint";
import constants from "../../../constants";

export default class GetManagerSuggestionsAPI extends API {
constructor(orgId, timeout = 2000) {
super("GET", timeout, false);
this.type = constants.GET_MANAGER_SUGGESTIONS;
this.orgId = orgId;
this.endpoint = `${super.apiEndPointAuto()}${ENDPOINTS.getPendingUsers}pending_users/?organisation_id=${this.orgId}`;
}

processResponse(res) {
super.processResponse(res);
if (res) {
this.managerSuggestions = res;
}
}

apiEndPoint() {
return this.endpoint;
}

getBody() {}

getHeaders() {
this.headers = {
headers: {
"Content-Type": "application/json",
"Authorization":`JWT ${localStorage.getItem('shoonya_access_token')}`
},
};
return this.headers;
}

getPayload() {
return this.managerSuggestions;
}
}

51 changes: 51 additions & 0 deletions src/redux/actions/api/Organization/InviteManagerSuggestions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/**
* RequestUsersToOrg API
*/
import API from "../../../api";
import ENDPOINTS from "../../../../config/apiendpoint";
import constants from "../../../constants";

export default class InviteManagerSuggestions extends API {
constructor(orgId, emails, role, timeout = 2000) {
super("POST", timeout, false);
this.type = constants.REQUEST_MANAGER_SUGGESTIONS;
this.organization_id = orgId;
this.emails = emails;
this.role = role;
this.endpoint = `${super.apiEndPointAuto()}${ENDPOINTS.getPendingUsers}request_user/`;
}

processResponse(res) {
super.processResponse(res);
if (res) {
this.InviteManagerSuggestions = res;
}
}

apiEndPoint() {
return this.endpoint;
}

getBody() {
return {
organization_id: this.organization_id,
emails : this.emails,
role : this.role
}
}

getHeaders() {
this.headers = {
headers: {
"Content-Type": "application/json",
"Authorization":`JWT ${localStorage.getItem('shoonya_access_token')}`
},
};
return this.headers;
}

getPayload() {
return this.InviteManagerSuggestions;
}
}

43 changes: 43 additions & 0 deletions src/redux/actions/api/Organization/RejectManagerSuggestions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/**
* RejectManagerSuggestions API
*/
import API from "../../../api";
import ENDPOINTS from "../../../../config/apiendpoint";
import constants from "../../../constants";

export default class RejectManagerSuggestionsAPI extends API {
constructor(userId, timeout = 2000) {
super("DELETE", timeout, false);
this.type = constants.DELETE_MANAGER_SUGGESTIONS;
this.userId = userId;
this.endpoint = `${super.apiEndPointAuto()}${ENDPOINTS.getPendingUsers}reject_user/?userId=${this.userId}`;
}

processResponse(res) {
super.processResponse(res);
if (res) {
this.rejecManagerSuggestion = res;
}
}

apiEndPoint() {
return this.endpoint;
}

getBody() {}

getHeaders() {
this.headers = {
headers: {
"Content-Type": "application/json",
"Authorization":`JWT ${localStorage.getItem('shoonya_access_token')}`
},
};
return this.headers;
}

getPayload() {
return this.rejecManagerSuggestion;
}
}

4 changes: 4 additions & 0 deletions src/redux/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ const constants = {
GET_TASK_PREDICTION:"GET_TASK_PREDICTION",
GET_LANGUAGES:"GET_LANGUAGES",
GET_ORGANIZATION_USERS:"GET_ORGANIZATION_USERS",
GET_MANAGER_SUGGESTIONS:"GET_MANAGER_SUGGESTIONS",
DELETE_MANAGER_SUGGESTIONS:"DEL_MANAGER_SUGGESTIONS",
APPROVE_MANAGER_SUGGESTIONS:"APPROVE_MANAGER_SUGGESTIONS",
REQUEST_MANAGER_SUGGESTIONS:"REQUEST_MANAGER_SUGGESTIONS",
GET_DATASET_LIST:"GET_DATASET_LIST",
GET_TASK_DETAILS:"GET_TASK_DETAILS",
GET_QUEUED_TASK_DETAILS:"GET_QUEUED_TASK_DETAILS",
Expand Down
21 changes: 21 additions & 0 deletions src/redux/reducers/Organization/GetManagerSuggestions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import constants from "../../constants";

let initialState = {
data: []
}
const reducer = (state = initialState, action) => {
switch (action.type) {
case constants.GET_MANAGER_SUGGESTIONS:
return {
...state,
data: action.payload
}

default:
return {
...state
}
}
};

export default reducer;
3 changes: 2 additions & 1 deletion src/redux/reducers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import getWorkspaceDetails from './WorkspaceDetails/GetWorkspaceDetails'
import getTaskPrediction from './Tasks/GetTaskPrediction';
import fetchLanguages from './UserManagement/FetchLanguages';
import getOrganizationUsers from './Organization/GetOragnizationUsers';
import getManagerSuggestions from './Organization/GetManagerSuggestions';
import getDatasetList from './Dataset/GetDatasetList';
import getTaskDetails from './Tasks/GetTaskDetails'
import getQueuedTaskDetails from './Tasks/GetQueuedTaskDetails'
Expand Down Expand Up @@ -202,7 +203,7 @@ const index = {
getAnnotationsTask,
patchAnnotation,
updateUIPrefs,

getManagerSuggestions,
};

export default index;
Loading
Loading