Disable weekly overview when there's no data.
Build and Test App / Build-and-test-App (push) Successful in 34s Details

This commit is contained in:
Andrew Lalis 2025-09-01 16:29:14 -04:00
parent a6f2ba7f39
commit e0437b1a1d
1 changed files with 4 additions and 3 deletions

View File

@ -81,7 +81,7 @@ onMounted(async () => {
})
async function deleteThisStudent() {
if (!cls.value || !student.value) return
if (!cls.value || !student.value || cls.value.archived) return
const choice = await deleteConfirmDialog.value?.show()
if (!choice) return
await apiClient.deleteStudent(cls.value.id, student.value.id)
@ -107,8 +107,9 @@ function getFormattedDate(entry: Entry) {
<div class="button-bar align-center">
<button type="button"
@click="router.push(`/classroom-compliance/classes/${student.classId}/edit-student?studentId=${student.id}`)">Edit</button>
<button type="button" @click="deleteThisStudent">Delete</button>
<button type="button" @click="weekOverviewDialog?.showModal()">Week overview</button>
<button type="button" @click="deleteThisStudent" :disabled="cls?.archived">Delete</button>
<button type="button" @click="weekOverviewDialog?.showModal()" :disabled="lastWeeksEntries.length < 1">Week
overview</button>
</div>
<table class="student-properties-table">