Skip to content
Snippets Groups Projects
Commit 4366a66d authored by Nithya Santhanam's avatar Nithya Santhanam
Browse files
changes updated
parent 2de6202b
No related branches found
No related tags found
1 merge request!435TMSS-228
......@@ -13,7 +13,7 @@
"@testing-library/user-event": "^7.1.2",
"ag-grid-community": "^24.1.0",
"ag-grid-react": "^24.1.1",
"axios": "^0.19.2",
"axios": "^0.21.1",
"bootstrap": "^4.5.0",
"cleave.js": "^1.6.0",
"flatpickr": "^4.6.3",
......
......@@ -245,4 +245,9 @@ div[data-schemapath='root.$schema'] {
.disableContainer {
pointer-events: none;
opacity: 0.7;
}
\ No newline at end of file
}
.workflow-header a span {
display: block !important;
height: auto !important;
}
\ No newline at end of file
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
class Done extends Component {
render(){
......@@ -9,7 +9,7 @@ return(
<label htmlFor="addline" style={{paddingLeft:"2px"},{color:"black"}}>This scheduling unit has been fully handled. No further action is required.</label><br/>
<label htmlFor="addline" style={{paddingLeft:"2px"},{color:"black"}}>Please find the data in the Long Term Archive<a rel="noopener noreferrer" href= "https://lta.lofar.eu/" target="_blank"> https://lta.lofar.eu/ </a>if it was ingested or revisit the Quality Assessment report <link to TO report page></link></label>
<label htmlFor="addline" style={{paddingLeft:"2px"},{color:"black"}}>Please find the data in the Long Term Archive<a rel="noopener noreferrer" href= "https://lta.lofar.eu/" target="_blank"> https://lta.lofar.eu/ </a>if it was ingested or revisit the Quality Assessment report <Link onClick={this.props.reportingPage}>QA Reporting</Link></label>
</div>
</>
)
......
......@@ -39,6 +39,7 @@ export default (props) => {
// const [disableNextButton, setDisableNextButton] = useState(false);
const [loader, setLoader] = useState(false);
const [state, setState] = useState({});
const [currentProcessStep, setCurrentProcessStep] = useState();
const [tasks, setTasks] = useState([]);
const [QASUProcess, setQASUProcess] = useState();
const [currentStep, setCurrentStep] = useState();
......@@ -109,23 +110,29 @@ export default (props) => {
// const workflowLastTask = responses[1].find(task => task.process === suQAProcess.id);
const workflowLastTask = (_.orderBy(suQAProcessTasks, ['id'], ['desc']))[0];
setCurrentStep(RedirectionMap[workflowLastTask.flow_task.toLowerCase()]);
setCurrentProcessStep(RedirectionMap[workflowLastTask.flow_task.toLowerCase()]);
// Need to cross check below if condition if it fails in next click
if (workflowLastTask.status === 'NEW') {
setCurrentStep(RedirectionMap[workflowLastTask.flow_task.toLowerCase()]);
await getDataProductDetails(taskList);
setCurrentProcessStep(RedirectionMap[workflowLastTask.flow_task.toLowerCase()]);
} //else {
// setCurrentStep(3);
// }
else if (workflowLastTask.status.toLowerCase() === 'done' || workflowLastTask.status.toLowerCase() === 'finished') {
await getDataProductDetails(taskList);
// setDisableNextButton(true);
setCurrentStep(9);
setCurrentProcessStep(9);
}
setLoader(false);
});
}
const qaReporting = () => {
setCurrentStep(3)
};
const getIngestTask = () => {
return tasks.find(task => task.specifications_template.type_value==='ingest')
}
......@@ -183,46 +190,46 @@ export default (props) => {
</label>
</div>
</div>}
<TabView activeIndex={currentStep - 1}>
<TabView activeIndex={currentStep - 1} key={currentStep}>
<TabPanel header="Waiting To Be Scheduled" disabled={currentStep < 1} headerClassName="workflow-header">
<Scheduled onNext={onNext} onCancel={onCancel} readOnly={ currentStep !== 1 }
<Scheduled onNext={onNext} onCancel={onCancel} readOnly={ currentProcessStep !== 1 }
schedulingUnit={schedulingUnit} /*disableNextButton={disableNextButton}*/ />
</TabPanel>
<TabPanel header="Scheduled" disabled={currentStep < 2} headerClassName="workflow-header">
<ProcessingDone onNext={onNext} onCancel={onCancel} readOnly={ currentStep !== 2 }
<ProcessingDone onNext={onNext} onCancel={onCancel} readOnly={ currentProcessStep !== 2 }
schedulingUnit={schedulingUnit} />
</TabPanel>
<TabPanel header="QA Reporting (TO)" disabled={currentStep < 3} headerClassName="workflow-header">
<QAreporting onNext={onNext} onCancel={onCancel} id={QASUProcess.id} readOnly={ currentStep !== 3 }
<QAreporting onNext={onNext} onCancel={onCancel} id={QASUProcess.id} readOnly={ currentProcessStep !== 3 }
process={QASUProcess} getCurrentTaskDetails={getCurrentTaskDetails}
onError={showMessage} />
</TabPanel>
<TabPanel header="QA Reporting (SDCO)" disabled={currentStep < 4} headerClassName="workflow-header">
<QAsos onNext={onNext} onCancel={onCancel} id={QASUProcess.id} readOnly={ currentStep !== 4 }
<QAsos onNext={onNext} onCancel={onCancel} id={QASUProcess.id} readOnly={ currentProcessStep !== 4 }
process={QASUProcess} getCurrentTaskDetails={getCurrentTaskDetails}
onError={showMessage} />
</TabPanel>
<TabPanel header="PI Verification" disabled={currentStep < 5} headerClassName="workflow-header">
<PIverification onNext={onNext} onCancel={onCancel} id={QASUProcess.id} readOnly={ currentStep !== 5 }
<PIverification onNext={onNext} onCancel={onCancel} id={QASUProcess.id} readOnly={ currentProcessStep !== 5 }
process={QASUProcess} getCurrentTaskDetails={getCurrentTaskDetails}
onError={showMessage} />
</TabPanel>
<TabPanel header="Decide Acceptance" disabled={currentStep < 6} headerClassName="workflow-header">
<DecideAcceptance onNext={onNext} onCancel={onCancel} id={QASUProcess.id} readOnly={ currentStep !== 6 }
<DecideAcceptance onNext={onNext} onCancel={onCancel} id={QASUProcess.id} readOnly={ currentProcessStep !== 6 }
process={QASUProcess} getCurrentTaskDetails={getCurrentTaskDetails}
onError={showMessage} />
</TabPanel>
<TabPanel header="Ingesting" disabled={currentStep < 7} headerClassName="workflow-header">
<Ingesting onNext={onNext} onCancel={onCancel} id={QASUProcess.id} readOnly={ currentStep !== 7 }
<Ingesting onNext={onNext} onCancel={onCancel} id={QASUProcess.id} readOnly={ currentProcessStep !== 7 }
onError={showMessage} task={getIngestTask()} />
</TabPanel>
<TabPanel header="Unpin Data" disabled={currentStep < 8} headerClassName="workflow-header">
<DataProduct onNext={onNext} onCancel={onCancel} id={QASUProcess.id} onError={showMessage} readOnly={ currentStep !== 8 }
tasks={tasks} getCurrentTaskDetails={getCurrentTaskDetails}
<DataProduct onNext={onNext} onCancel={onCancel} id={QASUProcess.id} onError={showMessage} readOnly={ currentProcessStep !== 8 }
tasks={tasks} getCurrentTaskDetails={getCurrentTaskDetails} onError={showMessage}
schedulingUnit={schedulingUnit} />
</TabPanel>
<TabPanel header="Done" disabled={currentStep < 9} headerClassName="workflow-header">
<Done onNext={onNext} onCancel={onCancel} onError={showMessage} readOnly={ currentStep !== 9 } />
<Done onNext={onNext} onCancel={onCancel} onError={showMessage} reportingPage={qaReporting} readOnly={ currentProcessStep !== 9 } />
</TabPanel>
</TabView>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment