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.6.2 Patch #950

Merged
merged 82 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
7deadc9
SN-800 Added a new drowndown Contract basis
Rahul-538 Feb 26, 2024
82d67d2
updated indic-transliterate module to use dhruva api
kartikvirendrar Feb 27, 2024
6fd77e3
updated indic-transliterate module to use dhruva api
kartikvirendrar Feb 27, 2024
669b300
updated the labeling of files and added labels
Pursottam6003 Feb 27, 2024
6c4df76
Update LSF.jsx
ishvindersethi22 Feb 27, 2024
ce46dd6
Update LSF.jsx
ishvindersethi22 Feb 27, 2024
0f396b2
Update AllTaskLSF.jsx
ishvindersethi22 Feb 27, 2024
741283e
Update ReviewLSF.jsx
ishvindersethi22 Feb 27, 2024
fd21e6e
Update SuperCheckerLSF.jsx
ishvindersethi22 Feb 27, 2024
448a065
Update LSF.jsx
ishvindersethi22 Feb 27, 2024
db79424
Update AllTaskLSF.jsx
ishvindersethi22 Feb 27, 2024
124240c
Update ReviewLSF.jsx
ishvindersethi22 Feb 27, 2024
054b132
Update SuperCheckerLSF.jsx
ishvindersethi22 Feb 27, 2024
ab11fe6
Update LSF.jsx
ishvindersethi22 Feb 27, 2024
d3df276
Update labelConfigJSX.js
ishvindersethi22 Feb 27, 2024
7598cad
Merge pull request #943 from AI4Bharat/pursottam-dev
ishvindersethi22 Feb 27, 2024
bb6bbf6
ressolved the errors
Pursottam6003 Feb 27, 2024
1820cf7
merged with develop branch
Pursottam6003 Feb 27, 2024
efbd471
fixed LSF auto save for relation type
kartikvirendrar Feb 28, 2024
1ee3334
Merge pull request #946 from AI4Bharat/temp_lsf
ishvindersethi22 Feb 28, 2024
12379fe
Merge branch 'master' into SN-800
ishvindersethi22 Feb 28, 2024
9682e46
Merge branch 'develop' into SN-800
ishvindersethi22 Feb 28, 2024
d9bd9f5
Merge pull request #944 from AI4Bharat/SN-800
ishvindersethi22 Feb 28, 2024
86aa024
fixed LSF auto save for relation type
kartikvirendrar Feb 28, 2024
7c8970b
Merge branch 'develop' into temp_lsf
kartikvirendrar Feb 28, 2024
e46c925
Update AllTaskLSF.jsx
kartikvirendrar Feb 28, 2024
a1d7a79
Merge pull request #947 from AI4Bharat/temp_lsf
ishvindersethi22 Feb 28, 2024
d4427fd
Update DataitemsTable.jsx
ishvindersethi22 Feb 28, 2024
dbe0887
make wfplayer default for cl ui
kartikvirendrar Feb 29, 2024
c40ea13
make wfplayer default for cl ui
kartikvirendrar Feb 29, 2024
eea6f87
updated the label keymap hotkey
Pursottam6003 Feb 29, 2024
5a51b73
Merge pull request #949 from AI4Bharat/pursottam-dev
ishvindersethi22 Feb 29, 2024
08139da
added props for accessing options and selectedSuggestion
kartikvirendrar Feb 29, 2024
800b058
set default player for audio files above 700 seconds to wavesurfer
kartikvirendrar Feb 29, 2024
7b9f169
Merge branch 'develop' into temp_wfplayer
ishvindersethi22 Feb 29, 2024
4af6bce
Merge pull request #948 from AI4Bharat/temp_wfplayer
ishvindersethi22 Feb 29, 2024
859f387
added a new drop down Contract basis
Rahul-538 Mar 1, 2024
50a640a
updated the deallocation by task id for annotators
Pursottam6003 Mar 1, 2024
3773245
updated with merge
Pursottam6003 Mar 1, 2024
a6987bf
Merge pull request #952 from AI4Bharat/SN_800
aparna-aa Mar 1, 2024
d85648b
Merge branch 'develop' into pursottam-dev
ishvindersethi22 Mar 1, 2024
dc7e106
Revert "updated the deallocation by task id for annotators"
Pursottam6003 Mar 1, 2024
16832cb
Merge branch 'pursottam-dev' of https://github.com/AI4Bharat/Shoonya-…
Pursottam6003 Mar 1, 2024
f95b889
updated the deallocation by task id
Pursottam6003 Mar 1, 2024
2a46b1b
removed unnecessary changes
Pursottam6003 Mar 1, 2024
1f89c7e
added transliteration logging
kartikvirendrar Mar 1, 2024
2632a0b
added transliteration logging
kartikvirendrar Mar 1, 2024
8e7776f
Merge branch 'develop' into new-transliteration-logging1
kartikvirendrar Mar 1, 2024
1bc71c3
Merge pull request #955 from AI4Bharat/new-transliteration-logging1
ishvindersethi22 Mar 1, 2024
7ff165f
fixed minor issue in transliteration logging
kartikvirendrar Mar 2, 2024
d67a606
Merge branch 'develop' into new-trans-logging
ishvindersethi22 Mar 2, 2024
64c54d0
Merge pull request #956 from AI4Bharat/new-trans-logging
ishvindersethi22 Mar 2, 2024
95ec095
pursottam-dev
Pursottam6003 Mar 2, 2024
92ca2c5
Merge branch 'develop' into pursottam-dev
Pursottam6003 Mar 2, 2024
2ad8c5c
fixed indic transliterate logging
kartikvirendrar Mar 4, 2024
1104418
Merge branch 'develop' into trans-logging-new
kartikvirendrar Mar 4, 2024
8c3338c
Merge pull request #959 from AI4Bharat/trans-logging-new
aparna-aa Mar 4, 2024
a1b3bd3
added uuid and parent uuid for logging
kartikvirendrar Mar 5, 2024
66eddf3
Merge branch 'develop' into trans-logging-new1
kartikvirendrar Mar 5, 2024
953ba66
Merge pull request #960 from AI4Bharat/trans-logging-new1
ishvindersethi22 Mar 5, 2024
ebe6a91
retained transliteration, rtl and fontsize preferences in local storage
Chetan-Gudagamanal Mar 5, 2024
187b574
added space for enter key in transliteration
kartikvirendrar Mar 5, 2024
b523df9
Merge branch 'develop' into trans-logging-new2
kartikvirendrar Mar 5, 2024
0de004e
Merge pull request #962 from AI4Bharat/trans-logging-new2
ishvindersethi22 Mar 5, 2024
a72585d
reverted dhruva api to xlit one
kartikvirendrar Mar 6, 2024
73bcd5e
Merge branch 'develop' into trans-logging-new3
kartikvirendrar Mar 6, 2024
69e791f
Merge pull request #963 from AI4Bharat/trans-logging-new3
ishvindersethi22 Mar 6, 2024
8f6213c
Merge branch 'develop' of https://github.com/AI4Bharat/Shoonya-Fronte…
Pursottam6003 Mar 6, 2024
929879a
updated the unused files
Pursottam6003 Mar 6, 2024
46084ed
Merge pull request #957 from AI4Bharat/pursottam-dev
ishvindersethi22 Mar 6, 2024
35b6091
Changed default starting date.
Rahul-538 Mar 6, 2024
a28a324
minor fix in transliteration logging
kartikvirendrar Mar 7, 2024
f5d88f2
Merge branch 'develop' into trans-logging-new4
kartikvirendrar Mar 7, 2024
665e6ac
Merge pull request #965 from AI4Bharat/trans-logging-new4
ishvindersethi22 Mar 7, 2024
5d415dd
updated the deallocation & reviewer by id
Pursottam6003 Mar 7, 2024
2af3161
Merge branch 'develop' of https://github.com/AI4Bharat/Shoonya-Fronte…
Pursottam6003 Mar 7, 2024
ddbd261
added deallocation for super checker
Pursottam6003 Mar 7, 2024
d3e3826
Merge pull request #966 from AI4Bharat/pursottam-dev
ishvindersethi22 Mar 7, 2024
4d70c50
Merge branch 'develop' into Rahul-539
ishvindersethi22 Mar 7, 2024
e616e9b
Merge pull request #964 from AI4Bharat/Rahul-539
ishvindersethi22 Mar 7, 2024
2a7033c
Merge branch 'develop' into trancription-user-preferences-retention-i…
ishvindersethi22 Mar 7, 2024
d68e511
Merge pull request #961 from AI4Bharat/trancription-user-preferences-…
ishvindersethi22 Mar 7, 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
8 changes: 4 additions & 4 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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@ai4bharat/indic-transliterate": "^1.2.14",
"@ai4bharat/indic-transliterate": "github:AI4Bharat/indic-transliterate-js-new",
"@emotion/react": "^11.9.0",
"@emotion/styled": "^11.8.1",
"@heartexlabs/label-studio": "^1.4.0",
Expand Down
31 changes: 31 additions & 0 deletions src/IndicTransliterate/index.css

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

2 changes: 1 addition & 1 deletion src/config/dropDownValues.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const participationType = ["FULL_TIME", "PART_TIME", "NA"];
export const participationType = ["FULL_TIME", "PART_TIME", "NA", "CONTRACT_BASIS"];
Original file line number Diff line number Diff line change
@@ -1,42 +1,88 @@
import API from "../../../api";
import ENDPOINTS from "../../../../config/apiendpoint";
import constants from "../../../constants";

export default class DeallocationAnnotatorsAndReviewersAPI extends API {
constructor(projectId,radiobutton,annotatorsUser,reviewerssUser,annotationStatus,reviewStatus,superCheckUser,SuperCheckStatus,projectObj, timeout = 2000) {
super("GET", timeout, false);
this.projectObj = projectObj;
const queryString = radiobutton === "annotation" ? `unassign_tasks/?annotator_id=${annotatorsUser}&annotation_status=["${annotationStatus}"]` : radiobutton === "review"? `unassign_review_tasks/?reviewer_id=${reviewerssUser}&review_status=["${reviewStatus}"]`:`unassign_supercheck_tasks/?superchecker_id=${superCheckUser}&supercheck_status=["${SuperCheckStatus}"]`;
console.log(queryString,"queryStringqueryString")
this.endpoint = `${super.apiEndPointAuto()}${ENDPOINTS.getProjects}${projectId}/${queryString}`;
}

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

apiEndPoint() {
return this.endpoint;
}
getBody() {
return this.projectObj;
}

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

getPayload() {
return this.deallocationAnnotatorsAndReviewers
}

export class DeallocateTaskById extends API {
constructor(projectId, taskId, selectedUser, timeout = 2000) {
super("POST", timeout, false);
this.projectId = projectId;

this.payload = {
task_ids: Array.isArray(taskId) ? taskId.map(id => parseInt(id)) : [parseInt(taskId)],
};
const baseEndpoint = `${super.apiEndPointAuto()}/${ENDPOINTS.getProjects}${projectId}/`;

const endpointMap = {
annotation: 'unassign_tasks/',
review: `unassign_review_tasks/`,
superChecker: 'unassign_supercheck_task/',
};

const selectedUserEndpoint = endpointMap[selectedUser];

if (selectedUserEndpoint) {
this.endpoint = baseEndpoint + selectedUserEndpoint;
} else {
console.error('Invalid selectedUser:', selectedUser);
}
}

processResponse(res) {
super.processResponse(res);
if (res) {
this.deallocateTaskById = res;
}
}
apiEndPoint() {
return this.endpoint;
}
getBody() {
return this.payload;
}
getHeaders() {
return {
"Content-Type": "application/json",
Authorization: `JWT ${localStorage.getItem("shoonya_access_token")}`,
};
}
getPayload() {
return this.deallocateTaskById;
}
}

export default class DeallocationAnnotatorsAndReviewersAPI extends API {
constructor(projectId,radiobutton,annotatorsUser,reviewerssUser,annotationStatus,reviewStatus,superCheckUser,SuperCheckStatus,projectObj, timeout = 2000) {
super("POST", timeout, false);
this.projectObj = projectObj;
const queryString = radiobutton === "annotation" ? `unassign_tasks/?annotator_id=${annotatorsUser}&annotation_status=["${annotationStatus}"]` : radiobutton === "review"? `unassign_review_tasks/?reviewer_id=${reviewerssUser}&review_status=["${reviewStatus}"]`:`unassign_supercheck_tasks/?superchecker_id=${superCheckUser}&supercheck_status=["${SuperCheckStatus}"]`;
this.endpoint = `${super.apiEndPointAuto()}${ENDPOINTS.getProjects}${projectId}/${queryString}`;
}

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

apiEndPoint() {
return this.endpoint;
}
getBody() {
return this.projectObj;
}


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

getPayload() {
return this.deallocationAnnotatorsAndReviewers
}
}
2 changes: 1 addition & 1 deletion src/redux/actions/api/Tasks/DeAllocateSuperCheckerTasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import constants from "../../../constants";
export default class DeallocateSuperCheckerTasksAPI extends API {

constructor(projectId,selectedFilters, timeout = 2000) {
super("GET", timeout, false);
super("POST", timeout, false);
this.projectId = projectId;
this.type = constants.DE_ALLOCATE_SUPERCHECKER_TASKS;
this.endpoint = `${super.apiEndPointAuto()}${ENDPOINTS.getProjects}${projectId}/unassign_supercheck_tasks/?supercheck_status=['${selectedFilters}']`;
Expand Down
2 changes: 1 addition & 1 deletion src/redux/actions/api/Tasks/DeallocateReviewTasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
export default class DeallocateReviewTasksAPI extends API {

constructor(projectId,selectedFilters, timeout = 2000) {
super("GET", timeout, false);
super("POST", timeout, false);
this.projectId = projectId;
this.type = constants.DE_ALLOCATE_REVIEW_TASKS;
this.endpoint = `${super.apiEndPointAuto()}${ENDPOINTS.getProjects}${projectId}/unassign_review_tasks/?review_status=['${selectedFilters}']`;
Expand Down
2 changes: 1 addition & 1 deletion src/redux/actions/api/Tasks/DeallocateTasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

export default class DeallocateTasksAPI extends API {
constructor(projectId,selectedFilters, timeout = 2000) {
super("GET", timeout, false);
super("POST", timeout, false);
this.projectId = projectId;
this.type = constants.DE_ALLOCATE_TASKS;
this.endpoint = `${super.apiEndPointAuto()}${ENDPOINTS.getProjects}${projectId}/unassign_tasks/?annotation_status=['${selectedFilters}']`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ const SettingsButtonComponent = ({
checked={enableTransliteration}
onChange={() => {
setAnchorElSettings(null);
localStorage.setItem("userCustomTranscriptionSettings",JSON.stringify({...JSON.parse(localStorage.getItem("userCustomTranscriptionSettings")),"enableTransliteration":!enableTransliteration}))
setTransliteration(!enableTransliteration);
}}
/>
Expand All @@ -155,6 +156,7 @@ const SettingsButtonComponent = ({
checked={enableRTL_Typing}
onChange={() => {
setAnchorElSettings(null);
localStorage.setItem("userCustomTranscriptionSettings",JSON.stringify({...JSON.parse(localStorage.getItem("userCustomTranscriptionSettings")),"enableRTL_Typing":!enableRTL_Typing}))
setRTL_Typing(!enableRTL_Typing);
}}
/>
Expand Down Expand Up @@ -297,6 +299,7 @@ const SettingsButtonComponent = ({
<MenuItem
key={index}
onClick={() => {
localStorage.setItem("userCustomTranscriptionSettings",JSON.stringify({...JSON.parse(localStorage.getItem("userCustomTranscriptionSettings")),"fontSize":item.size}))
setFontSize(item.size);
}}
>
Expand Down
2 changes: 1 addition & 1 deletion src/ui/pages/component/Project/TaskTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ const TaskTable = (props) => {
? new DeallocateTasksAPI(id, selectedFilters.annotation_status)
: new DeallocateReviewTasksAPI(id, selectedFilters.review_status);
const res = await fetch(deallocateObj.apiEndPoint(), {
method: "GET",
method: "POST",
body: JSON.stringify(deallocateObj.getBody()),
headers: deallocateObj.getHeaders().headers,
});
Expand Down
2 changes: 1 addition & 1 deletion src/ui/pages/component/Tabs/AdvancedOperation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -759,4 +759,4 @@ const AdvancedOperation = (props) => {
);
};

export default AdvancedOperation;
export default AdvancedOperation;
4 changes: 2 additions & 2 deletions src/ui/pages/component/Tabs/MyProgress.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ const MyProgress = () => {
{
label: "Till Date",
range: () => ({
startDate: new Date(Date.parse(UserDetails?.date_joined, 'yyyy-MM-ddTHH:mm:ss.SSSZ')),
startDate: new Date('2021-01-01'),
endDate: new Date(),
}),
isSelected(range) {
Expand All @@ -370,7 +370,7 @@ const MyProgress = () => {
moveRangeOnFirstSelection={false}
months={2}
ranges={selectRange}
minDate={new Date(Date.parse(UserDetails?.date_joined, 'yyyy-MM-ddTHH:mm:ss.SSSZ'))}
minDate={new Date('2021-01-01')}
maxDate={new Date()}
direction="horizontal"
/>
Expand Down
2 changes: 1 addition & 1 deletion src/ui/pages/component/common/DataitemsTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ useEffect(() => {
align: "center",
customHeadLabelRender: customColumnHead,
customBodyRender: (value) => {
if ((key == "metadata_json" || key == "prediction_json"|| key == "ocr_prediction_json"|| key == "transcribed_json"|| key == "draft_data_json" || key == "ocr_transcribed_json") && value !== null ) {
if ((key == "metadata_json" || key == "prediction_json"|| key == "ocr_prediction_json"|| key == "transcribed_json"|| key == "draft_data_json" || key == "ocr_transcribed_json" || key == "bboxes_relation_json") && value !== null ) {
const data = JSON.stringify(value)
const metadata = data.replace(/\\/g, "");
return metadata;
Expand Down
4 changes: 4 additions & 0 deletions src/ui/pages/component/common/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ const Header = () => {
//const[checkClUI,setCheckClUI]=useState(null)
const [moreHorizonAnchorEl, setMoreHorizonAnchorEl] = useState(null);

if(localStorage.getItem("source") !== undefined){
localStorage.setItem("source", "shoonya-frontend");
}

const handleMoreHorizonClick = (event) => {
setMoreHorizonAnchorEl(event.currentTarget);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ const AudioTranscriptionLandingPage = () => {
const [advancedWaveformSettings, setAdvancedWaveformSettings] = useState(false);
const [assignedUsers, setAssignedUsers] = useState(null);
const [autoSave, setAutoSave] = useState(true);
const [autoSaveTrigger, setAutoSaveTrigger] = useState(false);
const [waveSurfer, setWaveSurfer] = useState(true);
const [autoSaveTrigger, setAutoSaveTrigger] = useState(false);

// useEffect(() => {
// let intervalId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ const ReviewAudioTranscriptionLandingPage = () => {
const [advancedWaveformSettings, setAdvancedWaveformSettings] = useState(false);
const [assignedUsers, setAssignedUsers] = useState(null);
const [autoSave, setAutoSave] = useState(true);
const [autoSaveTrigger, setAutoSaveTrigger] = useState(false);
const [waveSurfer, setWaveSurfer] = useState(true);
const [autoSaveTrigger, setAutoSaveTrigger] = useState(false);

// useEffect(() => {
// let intervalId;
Expand Down Expand Up @@ -304,11 +304,11 @@ const ReviewAudioTranscriptionLandingPage = () => {
variant: "error",
});
}else{setTaskDetailList(resp);
if (resp?.data?.audio_duration < 700){
setWaveSurfer(false);
}else{
setWaveSurfer(true);
}}
if (resp?.data?.audio_duration < 700){
setWaveSurfer(false);
}else{
setWaveSurfer(true);
}}
setLoading(false);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ const SuperCheckerAudioTranscriptionLandingPage = () => {
const [advancedWaveformSettings, setAdvancedWaveformSettings] = useState(false);
const [assignedUsers, setAssignedUsers] = useState(null);
const [autoSave, setAutoSave] = useState(true);
const [waveSurfer, setWaveSurfer] = useState(false);
const [autoSaveTrigger, setAutoSaveTrigger] = useState(false);
const [waveSurfer, setWaveSurfer] = useState(true);

// useEffect(() => {
// let intervalId;
Expand Down Expand Up @@ -1142,6 +1142,7 @@ useEffect(() => {
/>
</div>
)}

/>
) : (
<div className={classes.relative} style={{ width: "100%" }}>
Expand Down Expand Up @@ -1253,4 +1254,4 @@ useEffect(() => {
</>
);
};
export default SuperCheckerAudioTranscriptionLandingPage;
export default SuperCheckerAudioTranscriptionLandingPage;
Loading
Loading