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

Shoonya v2.3 Patch #627

Merged
merged 26 commits into from
Jul 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
adcbb43
Added multiselect in managers
sagarika-padmanaban Jul 10, 2023
5a79a09
Merge branch 'develop' into SN_773
sagarika-padmanaban Jul 10, 2023
7b22266
added unified messages
sagarika-padmanaban Jul 14, 2023
eb897b5
Merge branch 'develop' into SN_773
sagarika-padmanaban Jul 14, 2023
d7be364
autosave disable in view mode
ayushpanwar25 Jul 18, 2023
7c6f84c
minor fix
ayushpanwar25 Jul 18, 2023
3517367
fixed the issue in superchecker noise tag
ganavikumarswamy Jul 19, 2023
e568979
Merge branch 'develop' into noise_tag
ganavikumarswamy Jul 19, 2023
bae1f13
Merge pull request #621 from AI4Bharat/noise_tag
aparna-aa Jul 19, 2023
cea7ccc
Merge branch 'develop' into SN-780
ayushpanwar25 Jul 19, 2023
e7053de
Merge pull request #618 from AI4Bharat/SN-780
aparna-aa Jul 19, 2023
b800a95
Merge pull request #613 from AI4Bharat/SN_773
aparna-aa Jul 19, 2023
5686a3b
SN-790: payment reports
ayushpanwar25 Jul 19, 2023
c1bbc80
participation type update
ayushpanwar25 Jul 20, 2023
bf45505
Merge pull request #622 from AI4Bharat/SN-790
ishvindersethi22 Jul 20, 2023
1c76b00
Update OrganizationReports.jsx
ayushpanwar25 Jul 20, 2023
6a38357
workspace payment reports
ayushpanwar25 Jul 21, 2023
508a1d3
Added public analytics
sagarika-padmanaban Jul 22, 2023
f88ce56
Merge branch 'develop' into SN_773
sagarika-padmanaban Jul 22, 2023
77185c5
Merge pull request #623 from AI4Bharat/SN-790
ishvindersethi22 Jul 24, 2023
95038d0
Merge pull request #624 from AI4Bharat/SN_773
aparna-aa Jul 24, 2023
1db1871
added the project filter in workspace report
ganavikumarswamy Jul 24, 2023
cb581eb
Merge pull request #625 from AI4Bharat/WorkSpace-Report
ishvindersethi22 Jul 24, 2023
cbc77dc
Added new two tabs in intraautomate datasets
sagarika-padmanaban Jul 25, 2023
b3b32d3
Merge branch 'develop' into SN_773
sagarika-padmanaban Jul 25, 2023
9b208af
Merge pull request #626 from AI4Bharat/SN_773
ishvindersethi22 Jul 25, 2023
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
2 changes: 1 addition & 1 deletion src/config/apiendpoint.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const apiendpoint = {
login: "/users/auth/jwt/create",
login:"/users/auth/jwt/create",
getProjects:"/projects/",
getWorkspaces:"/workspaces/",
fetch:"/users/account/",
Expand Down
53 changes: 53 additions & 0 deletions src/redux/actions/api/Dataset/aiModel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/**
* Automate Datasets API
*/
import API from "../../../api";
import ENDPOINTS from "../../../../config/apiendpoint";
import constants from '../../../constants';

export default class aiModel extends API {
constructor(srcInstanceId,translationmodel,org_id,checked, timeout = 2000) {
super("POST", timeout, false);
// this.type = constants.AUTOMATE_DATASETS;
this.input_dataset_instance_id = srcInstanceId;
this.api_type = translationmodel;
this.org = org_id;
this.automate_missing_data_items= checked;
this.endpoint = `${super.apiEndPointAuto()}${ENDPOINTS.functions}schedule_ocr_prediction_json_population`;
}

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

apiEndPoint() {
return this.endpoint;
}

getBody() {
return {
dataset_instance_id: this.input_dataset_instance_id,
api_type: this.api_type,
organization_id: this.org,
automate_missing_data_items:this.automate_missing_data_items
}
}

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

getPayload() {
return this.res;
}
}

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

export default class SendOrganizationUserReportsAPI extends API {
constructor(orgId, userId, projectType, participationTypes, timeout = 2000) {
super("POST", timeout, false);
this.projectType = projectType;
this.participationTypes = participationTypes;
this.userId = userId;
this.type = constants.SEND_ORGANIZATION_USER_REPORTS;
this.endpoint = `${super.apiEndPointAuto()}${ENDPOINTS.getOrganizations}${orgId}/send_user_analytics/`;
}

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

apiEndPoint() {
return this.endpoint;
}

getBody() {
return {
project_type: this.projectType,
participation_types: this.participationTypes,
user_id: this.userId
};
}

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

getPayload() {
return this.orgUserReport;
}
}
4 changes: 3 additions & 1 deletion src/redux/actions/api/WorkspaceDetails/CreateWorkspace.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ import ENDPOINTS from "../../../../config/apiendpoint";
import constants from "../../../constants";

export default class CreateWorkspaceAPI extends API {
constructor(orgId, workspaceName, timeout = 2000) {
constructor(orgId, workspaceName,publicanalytics, timeout = 2000) {
super("POST", timeout, false);
this.type = constants.ADD_MEMBERS_TO_PROJECT;
this.organization = orgId;
this.workspace_name = workspaceName;
this.is_archived = false;
this.public_analytics = publicanalytics;
this.endpoint = `${super.apiEndPointAuto()}${ENDPOINTS.getWorkspaces
}`;
}
Expand All @@ -32,6 +33,7 @@ export default class CreateWorkspaceAPI extends API {
organization: this.organization,
workspace_name: this.workspace_name,
is_archived: this.is_archived,
public_analytics: this.public_analytics
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
import constants from "../../../constants";

export default class GetWorkspaceUserReportsAPI extends API {
constructor(workspaceId, projectType, fromDate, toDate, language,reportsType, timeout = 2000) {
constructor(workspaceId, projectType, fromDate, toDate, language,reportsType,reportfilter, timeout = 2000) {
super("POST", timeout, false);
this.type = constants.GET_WORKSPACE_USER_REPORTS;
this.projectType = projectType;
this.fromDate = fromDate;
this.toDate = toDate;
this.language = language;
this.reportsType = reportsType ;
this.reportfilter = reportfilter;
this.endpoint = `${super.apiEndPointAuto()}${ENDPOINTS.getWorkspaces}${workspaceId}/user_analytics/`;
}

Expand All @@ -34,12 +35,15 @@ import constants from "../../../constants";
from_date: this.fromDate,
to_date: this.toDate,
reports_type: this.reportsType,
...(this.reportfilter !== "AllStage" && {project_progress_stage: this.reportfilter}),
} : {
project_type: this.projectType,
from_date: this.fromDate,
to_date: this.toDate,
tgt_language: this.language,
reports_type: this.reportsType,
...(this.reportfilter !== "AllStage" && {project_progress_stage: this.reportfilter}),

}
}

Expand Down
50 changes: 50 additions & 0 deletions src/redux/actions/api/WorkspaceDetails/SendWorkspaceUserReports.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/**
* Send Workspace User Reports API
*/
import API from "../../../api";
import ENDPOINTS from "../../../../config/apiendpoint";
import constants from "../../../constants";

export default class SendWorkspaceUserReportsAPI extends API {
constructor(wsId, userId, projectType, participationTypes, timeout = 2000) {
super("POST", timeout, false);
this.projectType = projectType;
this.participationTypes = participationTypes;
this.userId = userId;
this.type = constants.SEND_WORKSPACE_USER_REPORTS;
this.endpoint = `${super.apiEndPointAuto()}${ENDPOINTS.getWorkspaces}${wsId}/send_user_analytics/`;
}

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

apiEndPoint() {
return this.endpoint;
}

getBody() {
return {
project_type: this.projectType,
participation_types: this.participationTypes,
user_id: this.userId
};
}

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

getPayload() {
return this.wsUserReport;
}
}
2 changes: 2 additions & 0 deletions src/redux/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ const constants = {
WS_META_ANALYTICS: "WS_META_ANALYTICS",
WS_PERODICAL_TASK: "WS_PERODICAL_TASK",
WS_TASK_ANALYTICS: "WS_TASK_ANALYTICS",
SEND_ORGANIZATION_USER_REPORTS: "SEND_ORGANIZATION_USER_REPORTS",
SEND_WORKSPACE_USER_REPORTS: "SEND_WORKSPACE_USER_REPORTS",

};

Expand Down
21 changes: 21 additions & 0 deletions src/redux/reducers/Organization/SendOrganizationUserReports.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.SEND_ORGANIZATION_USER_REPORTS:
return {
...state,
data: action.payload
}

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

export default reducer;
21 changes: 21 additions & 0 deletions src/redux/reducers/WorkspaceDetails/SendWorkspaceUserReports.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.SEND_WORKSPACE_USER_REPORTS:
return {
...state,
data: action.payload
}

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

export default reducer;
5 changes: 4 additions & 1 deletion src/redux/reducers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ import wsCumulativeTasks from "./WorkspaceDetails/GetCumulativeTasks";
import wsMetaAnalytics from "./WorkspaceDetails/GetMetaAnalytics";
import wsPeriodicalTasks from "./WorkspaceDetails/GetPeriodicalTasks";
import wsTaskAnalytics from "./WorkspaceDetails/GetTaskAnalytics";
import sendOrganizationUserReports from "./Organization/SendOrganizationUserReports";
import sendWorkspaceUserReports from './WorkspaceDetails/SendWorkspaceUserReports';

const index = {
apiStatus,
Expand Down Expand Up @@ -179,7 +181,8 @@ const index = {
wsMetaAnalytics,
wsPeriodicalTasks,
wsTaskAnalytics,

sendOrganizationUserReports,
sendWorkspaceUserReports,

};

Expand Down
Loading
Loading