Skip to content

Commit

Permalink
chore: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
francisvaut committed May 23, 2024
1 parent 38d9aff commit f44cebc
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 24 deletions.
2 changes: 1 addition & 1 deletion backend/api/serializers/project_serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,4 +214,4 @@ class CreateProjectSerializer(ProjectSerializer):


class TeacherCreateGroupSerializer(serializers.Serializer):
number_groups = serializers.IntegerField(min_value=1)
number_groups = serializers.IntegerField(min_value=1)
53 changes: 30 additions & 23 deletions frontend/src/components/submissions/ProjectMeter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,38 +25,45 @@ const meterItems = computed(() => {
const extraChecksFailed = structureChecksPassed - extraChecksPassed;
const green = '#76DD78'
const orange = '#FFB84F'
const red = '#F37142'
const green = '#76DD78';
const orange = '#FFB84F';
const red = '#F37142';
const submissionsFailedItem = {
value: (submissionsFailed / groups) * 100,
color: red,
label: t('components.card.testsFail'),
icon: 'pi pi-times',
}
value: (submissionsFailed / groups) * 100,
color: red,
label: t('components.card.testsFail'),
icon: 'pi pi-times',
};
const structureChecksPassedItem = {
value: (extraChecksFailed / groups) * 100,
color: orange,
label: t('components.card.structureTestsSucceed'),
icon: 'pi pi-exclamation-circle',
}
value: (extraChecksFailed / groups) * 100,
color: orange,
label: t('components.card.structureTestsSucceed'),
icon: 'pi pi-exclamation-circle',
};
const extraChecksPassedItem = {
value: (extraChecksPassed / groups) * 100,
color: green,
label: t('components.card.extraTestsSucceed'),
icon: 'pi pi-check',
}
value: (extraChecksPassed / groups) * 100,
color: green,
label: t('components.card.extraTestsSucceed'),
icon: 'pi pi-check',
};
if (hasStructurechecks) {
if (hasExtraChecks) {
return [submissionsFailedItem, structureChecksPassedItem, extraChecksPassedItem]
return [submissionsFailedItem, structureChecksPassedItem, extraChecksPassedItem];
}
structureChecksPassedItem.color = green
structureChecksPassedItem.icon = 'pi pi-check'
return [submissionsFailedItem, structureChecksPassedItem]
structureChecksPassedItem.color = green;
structureChecksPassedItem.icon = 'pi pi-check';
return [submissionsFailedItem, structureChecksPassedItem];
}
return [{ value: (groupsSubmitted / groups) * 100, color: green, label: t('components.card.successfulSubmission'), icon: 'pi pi-check' }]
return [
{
value: (groupsSubmitted / groups) * 100,
color: green,
label: t('components.card.successfulSubmission'),
icon: 'pi pi-check',
},
];
});
</script>

Expand Down

0 comments on commit f44cebc

Please sign in to comment.