added support for optional checkboxes
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
||||
import { X } from 'lucide-vue-next';
|
||||
import Button from '@/components/ui/button/Button.vue';
|
||||
import TrainingReportForm from '@/components/trainingReport/trainingReportForm.vue';
|
||||
import Checkbox from '@/components/ui/checkbox/Checkbox.vue';
|
||||
|
||||
enum sidePanelState { view, create, closed };
|
||||
|
||||
@@ -113,10 +114,15 @@ onMounted(async () => {
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="scroll-m-20 text-xl font-semibold tracking-tight">Trainees</label>
|
||||
<div v-for="person in focusedTrainingTrainees" class="grid grid-cols-4 my-2 items-center">
|
||||
<div class="grid grid-cols-5"><label
|
||||
class="scroll-m-20 text-xl font-semibold tracking-tight">Trainees</label></div>
|
||||
<div v-for="person in focusedTrainingTrainees" class="grid grid-cols-5 my-2 items-center">
|
||||
<p>{{ person.attendee_name }}</p>
|
||||
<p class="text-right px-5">{{ person.passed ? "Passed" : "Failed" }}</p>
|
||||
<!-- <p class="text-right px-5">{{ person.passed ? "Passed" : "Failed" }}</p> -->
|
||||
<Checkbox v-if="focusedTrainingReport.course.hasBookwork" :default-value="person.passed_bookwork ? true : false" class="pointer-events-none">
|
||||
</Checkbox>
|
||||
<Checkbox v-if="focusedTrainingReport.course.hasQual" :default-value="person.passed_qual ? true : false" class="pointer-events-none">
|
||||
</Checkbox>
|
||||
<p class="bg-muted p-2 rounded-lg min-h-10 col-span-2 text-right">{{ person.remarks }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -136,7 +142,8 @@ onMounted(async () => {
|
||||
</button>
|
||||
</div>
|
||||
<div class="overflow-y-auto max-h-[70vh] mt-5 scrollbar-themed">
|
||||
<TrainingReportForm class="w-full" @submit="(newID) => {viewTrainingReport(newID); loadTrainingReports()}"></TrainingReportForm>
|
||||
<TrainingReportForm class="w-full"
|
||||
@submit="(newID) => { viewTrainingReport(newID); loadTrainingReports() }"></TrainingReportForm>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user