feat: load more in quiz submissions

This commit is contained in:
Jannat Patel
2024-12-17 12:23:44 +05:30
parent 1ea47a008c
commit 65dc2838d3
2 changed files with 26 additions and 21 deletions

View File

@@ -52,7 +52,7 @@
{{ row[column.key] }}
</div>
<div v-else-if="column.icon == 'book-open'">
{{ Math.ceil(row.courses[column.key]) }}%
{{ Math.ceil(row.courses[column.key]) }}
</div>
<div v-else-if="column.icon == 'help-circle'">
<Badge
@@ -62,7 +62,7 @@
>
{{ row.assessments[column.key] }}
</Badge>
<div v-else>{{ parseInt(row.assessments[column.key]) }}%</div>
<div v-else>{{ parseInt(row.assessments[column.key]) }}</div>
</div>
</ListRowItem>
</template>
@@ -134,22 +134,10 @@ const getStudentColumns = () => {
{
label: 'Full Name',
key: 'full_name',
width: '10rem',
width: '15rem',
},
]
if (students.data?.[0].courses) {
Object.keys(students.data?.[0].courses).forEach((course) => {
columns.push({
label: course,
key: course,
width: '10rem',
icon: 'book-open',
align: 'center',
})
})
}
if (students.data?.[0].assessments) {
Object.keys(students.data?.[0].assessments).forEach((assessment) => {
columns.push({
@@ -163,6 +151,19 @@ const getStudentColumns = () => {
})
})
}
if (students.data?.[0].courses) {
Object.keys(students.data?.[0].courses).forEach((course) => {
columns.push({
label: course,
key: course,
width: '10rem',
icon: 'book-open',
align: 'center',
})
})
}
return columns
}