adjustments do mongoDB output

This commit is contained in:
Delucse
2020-11-27 17:21:42 +01:00
parent 28720edeea
commit a2c571c1e7
9 changed files with 36 additions and 35 deletions
+2 -2
View File
@@ -50,9 +50,9 @@ const styles = (theme) => ({
class StepperHorizontal extends Component {
render() {
var tutorialId = this.props.tutorial.id;
var tutorialId = this.props.tutorial._id;
var tutorialIndex = this.props.currentTutorialIndex;
var status = this.props.status.filter(status => status.id === tutorialId)[0];
var status = this.props.status.filter(status => status._id === tutorialId)[0];
var tasks = status.tasks;
var error = tasks.filter(task => task.type === 'error').length > 0;
var success = tasks.filter(task => task.type === 'success').length / tasks.length;