diff --git a/ui/src/pages/TrainingReport.vue b/ui/src/pages/TrainingReport.vue index a273e01..00480b7 100644 --- a/ui/src/pages/TrainingReport.vue +++ b/ui/src/pages/TrainingReport.vue @@ -23,11 +23,15 @@ const loaded = ref(false); const focusedTrainingReport = ref(null); const focusedTrainingTrainees = computed(() => { if (focusedTrainingReport == null) return null; - return focusedTrainingReport.value.attendees.filter((attendee) => attendee.attendee_role_id == 2); + return focusedTrainingReport.value.attendees.filter((attendee) => attendee.role.name == 'Trainee'); +}) +const focusedNoShows = computed(() => { + if (focusedTrainingReport == null) return null; + return focusedTrainingReport.value.attendees.filter((attendee) => attendee.role.name == 'No-Show'); }) const focusedTrainingTrainers = computed(() => { if (focusedTrainingReport == null) return null; - return focusedTrainingReport.value.attendees.filter((attendee) => attendee.attendee_role_id != 2); + return focusedTrainingReport.value.attendees.filter((attendee) => attendee.role.name != 'Trainee' && attendee.role.name != 'No-Show'); }) async function viewTrainingReport(id: number) { focusedTrainingReport.value = await getTrainingReport(id); @@ -61,7 +65,9 @@ onMounted(async () => {

Training Reports

- +
@@ -72,7 +78,7 @@ onMounted(async () => { Date - Posted By + Posted By @@ -83,52 +89,94 @@ onMounted(async () => { {{ report.date }}{{ report.created_by_name === null ? "Unknown User" : report.created_by_name - }} + }}
-
-
-
-

{{ focusedTrainingReport.course_name }}

-

{{ focusedTrainingReport.event_date }}

-

Created by {{ focusedTrainingReport.created_by_name === null ? "Unknown User" : - focusedTrainingReport.created_by_name - }}

-
+
+
+

Training Report Details

-
- +
+

{{ focusedTrainingReport.course_name }}

+
+

{{ focusedTrainingReport.event_date }}

+

Created by {{ focusedTrainingReport.created_by_name === null ? "Unknown User" : + focusedTrainingReport.created_by_name + }} +

+
+
+
+
-
+
+ Name + Role + Remarks +
+ +

{{ person.attendee_name }}

-

{{ person.role.name }}

-

{{ person.remarks }}

+

{{ person.role.name }}

+

{{ person.remarks == "" ? '--' : person.remarks }}

+
-
-
+
+ +
+ Name + Bookwork + Qual + Remarks +
+
+

{{ person.attendee_name }}

- - + - + -

{{ person.remarks }}

+

{{ person.remarks == "" ? '--' : person.remarks }}

+
+
+ +
+
+ +
+ Name + +
+
+ Remarks +
+
+
+

{{ person.attendee_name }}

+ +
+
+

{{ person.remarks == "" ? '--' : person.remarks }}

-

{{ focusedTrainingReport.remarks }}

+

{{ focusedTrainingReport.remarks == "" ? 'None' : focusedTrainingReport.remarks }}