Reorganized entries table components.
This commit is contained in:
parent
49a167fb68
commit
39e0c9ee6e
|
@ -8,10 +8,10 @@ import {
|
|||
} from '@/api/classroom_compliance'
|
||||
import { useAuthStore } from '@/stores/auth'
|
||||
import { computed, onMounted, ref, watch, type Ref } from 'vue'
|
||||
import EntryTableCell from '@/apps/classroom_compliance/EntryTableCell.vue'
|
||||
import { RouterLink } from 'vue-router'
|
||||
import StudentScoreCell from '@/apps/classroom_compliance/StudentScoreCell.vue'
|
||||
import DateHeaderCell from '@/apps/classroom_compliance/DateHeaderCell.vue'
|
||||
import EntryTableCell from '@/apps/classroom_compliance/entries_table/EntryTableCell.vue'
|
||||
import StudentScoreCell from '@/apps/classroom_compliance/entries_table/StudentScoreCell.vue'
|
||||
import DateHeaderCell from '@/apps/classroom_compliance/entries_table/DateHeaderCell.vue'
|
||||
import StudentNameCell from '@/apps/classroom_compliance/entries_table/StudentNameCell.vue'
|
||||
|
||||
const authStore = useAuthStore()
|
||||
const props = defineProps<{
|
||||
|
@ -232,13 +232,7 @@ function addAllEntriesForDate(dateStr: string) {
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="student in students" :key="student.id">
|
||||
<!-- Student's name: -->
|
||||
<td :class="{ 'student-removed': student.removed }">
|
||||
<RouterLink :to="'/classroom-compliance/classes/' + classId + '/students/' + student.id"
|
||||
class="student-link">
|
||||
<span v-text="student.name"></span>
|
||||
</RouterLink>
|
||||
</td>
|
||||
<StudentNameCell :student="student" :class-id="classId" />
|
||||
<!-- Desk Number: -->
|
||||
<td v-if="assignedDesks" v-text="student.deskNumber"></td>
|
||||
<!-- A cell for each entry in the table's date range: -->
|
||||
|
@ -269,13 +263,4 @@ function addAllEntriesForDate(dateStr: string) {
|
|||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.student-link {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.student-removed {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
<script setup lang="ts">
|
||||
import type { EntriesResponseStudent } from '@/api/classroom_compliance';
|
||||
defineProps<{
|
||||
student: EntriesResponseStudent,
|
||||
classId: number
|
||||
}>()
|
||||
</script>
|
||||
<template>
|
||||
<td :class="{ 'student-removed': student.removed }">
|
||||
<RouterLink :to="'/classroom-compliance/classes/' + classId + '/students/' + student.id" class="student-link">
|
||||
<span v-text="student.name"></span>
|
||||
</RouterLink>
|
||||
</td>
|
||||
</template>
|
||||
<style scoped>
|
||||
.student-link {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.student-removed {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue