Skip to content

Commit

Permalink
fix: styling of batch list headers
Browse files Browse the repository at this point in the history
  • Loading branch information
pateljannat committed Dec 13, 2024
1 parent 6cdfb82 commit 40aefba
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 14 deletions.
12 changes: 9 additions & 3 deletions frontend/src/components/Assessments.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div>
<div class="flex items-center justify-between">
<div class="text-lg font-semibold mb-4">
<div class="flex items-center justify-between mb-4">
<div class="text-lg font-semibold">
{{ __('Assessments') }}
</div>
<Button v-if="canSeeAddButton()" @click="showModal = true">
Expand Down Expand Up @@ -38,7 +38,10 @@
<ListRow :row="row" v-for="row in assessments.data">
<template #default="{ column, item }">
<ListRowItem :item="row[column.key]" :align="column.align">
<div>
<div v-if="column.key == 'assessment_type'">
{{ row[column.key] == 'LMS Quiz' ? 'Quiz' : 'Assignment' }}
</div>
<div v-else>
{{ row[column.key] }}
</div>
</ListRowItem>
Expand Down Expand Up @@ -177,10 +180,12 @@ const getAssessmentColumns = () => {
{
label: 'Assessment',
key: 'title',
width: '30rem',
},
{
label: 'Type',
key: 'assessment_type',
width: '10rem',
},
]
Expand All @@ -189,6 +194,7 @@ const getAssessmentColumns = () => {
label: 'Status/Score',
key: 'status',
align: 'center',
width: '10rem',
})
}
return columns
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/components/BatchCourses.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div>
<div class="flex items-center justify-between mb-4">
<div class="text-xl font-semibold">
<div class="text-lg font-semibold">
{{ __('Courses') }}
</div>
<Button v-if="canSeeAddButton()" @click="openCourseModal()">
Expand Down Expand Up @@ -110,7 +110,6 @@ const openCourseModal = () => {
}
const getCoursesColumns = () => {
console.log(courses.data)
return [
{
label: 'Title',
Expand Down
20 changes: 11 additions & 9 deletions frontend/src/components/BatchStudents.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<template>
<Button class="float-right mb-3" @click="openStudentModal()">
<template #prefix>
<Plus class="h-4 w-4" />
</template>
{{ __('Add') }}
</Button>
<div class="text-lg font-semibold mb-4">
{{ __('Students') }}
<div class="flex items-center justify-between mb-4">
<div class="text-lg font-semibold">
{{ __('Students') }}
</div>
<Button @click="openStudentModal()">
<template #prefix>
<Plus class="h-4 w-4" />
</template>
{{ __('Add') }}
</Button>
</div>
<div v-if="students.data?.length">
<ListView
Expand Down Expand Up @@ -147,7 +149,7 @@ const getStudentColumns = () => {
})
})
}
console.log(students.data?.[0].assessments)
if (students.data?.[0].assessments) {
Object.keys(students.data?.[0].assessments).forEach((assessment) => {
columns.push({
Expand Down

0 comments on commit 40aefba

Please sign in to comment.