Disable weekly overview when there's no data.
	
		
			
	
		
	
	
		
			
				
	
				Build and Test App / Build-and-test-App (push) Successful in 34s
				
					Details
				
			
		
	
				
					
				
			
				
	
				Build and Test App / Build-and-test-App (push) Successful in 34s
				
					Details
				
			
		
	This commit is contained in:
		
							parent
							
								
									a6f2ba7f39
								
							
						
					
					
						commit
						e0437b1a1d
					
				| 
						 | 
				
			
			@ -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">
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue