Skip to content

Commit

Permalink
Merge pull request #1044 from AI4Bharat/new-project-creation
Browse files Browse the repository at this point in the history
Update the L3 tab using the accoustic-enable-stage
  • Loading branch information
ishvindersethi22 authored Jun 7, 2024
2 parents cf230d2 + f8960ba commit 5062291
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/redux/actions/CL-Transcription/SaveTranscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default class SaveTranscriptAPI extends API {
super("PATCH", timeout, false);
this.GlossaryObj = GlossaryObj;
//this.type = constants.Add_GLOSSARY;
this.endpoint = `${super.apiEndPointAuto()}${ENDPOINTS.annotations}${annotationsId}/?cl_format=True`;
this.endpoint = `${super.apiEndPointAuto()}${ENDPOINTS.annotations}${annotationsId}/?cl_format=true`;
}

processResponse(res) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,7 @@ useEffect(() => {
<Box sx={{mb:2,}} >
<Tabs value={tabValue} onChange={handleTabChange} aria-label="user-tabs">
<Tab label="L1-L2 Transcription" sx={{ fontSize: 17, fontWeight: '700', marginRight: '28px !important' }} />
{ProjectDetails?.metadata_json?.acoustic_enabled_stage >=2 || ProjectDetails?.project_stage >=2 &&
{ProjectDetails?.metadata_json?.acoustic_enabled_stage <=1 &&
<Tab label="L3 Transcription" sx={{ fontSize: 17, fontWeight: '700' }} />
}
</Tabs>
Expand All @@ -1218,7 +1218,7 @@ useEffect(() => {
player={player}
ProjectDetails={ProjectDetails}
TaskDetails={taskData}
stage={2}
stage={tabValue+2}
handleStdTranscriptionSettings={setStdTranscriptionSettings}
advancedWaveformSettings={advancedWaveformSettings}
setAdvancedWaveformSettings={setAdvancedWaveformSettings}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1423,7 +1423,7 @@ useEffect(() => {
<Box sx={{mb:2,}} >
<Tabs value={tabValue} onChange={handleTabChange} aria-label="user-tabs">
<Tab label="L1 & L2 Transcription" sx={{ fontSize: 17, fontWeight: '700', marginRight: '28px !important' }} />
{ProjectDetails?.metadata_json?.acoustic_enabled_stage >=2 || ProjectDetails?.project_stage >=2 &&
{ProjectDetails?.metadata_json?.acoustic_enabled_stage <=2 &&
<Tab label="L3 Transcription" sx={{ fontSize: 17, fontWeight: '700' }} />
}
</Tabs>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1238,9 +1238,15 @@ useEffect(() => {
<FormControl>
<Box sx={{mb:2,}} >
<Tabs value={tabValue} onChange={handleTabChange} aria-label="user-tabs">
{ProjectDetails?.metadata_json?.acoustic_enabled_stage ==3 &&
<Tab label="L3 Transcription" sx={{ fontSize: 17, fontWeight: '700' }} />
}

{ProjectDetails?.metadata_json?.acoustic_enabled_stage <=2 &&
<React.Fragment>
<Tab label="L1 & L2 Transcription" sx={{ fontSize: 17, fontWeight: '700', marginRight: '28px !important' }} />
{ProjectDetails?.metadata_json?.acoustic_enabled_stage >=2 &&
<Tab label="L3 Transcription" sx={{ fontSize: 17, fontWeight: '700' }} />
</React.Fragment>
}
</Tabs>
</Box>
Expand All @@ -1254,7 +1260,7 @@ useEffect(() => {
player={player}
ProjectDetails={ProjectDetails}
TaskDetails={taskDetailList}
stage={tabValue+2}
stage={ProjectDetails?.metadata_json?.acoustic_enabled_stage <=2 ? tabValue+2 : 3}
handleStdTranscriptionSettings={setStdTranscriptionSettings}
advancedWaveformSettings={advancedWaveformSettings}
setAdvancedWaveformSettings={setAdvancedWaveformSettings}
Expand Down

0 comments on commit 5062291

Please sign in to comment.