Close #124 fixed checkmark visual state and added tooltip

This commit is contained in:
2025-12-28 14:46:04 -05:00
parent 7661b3c8d5
commit 3c689fbb30
2 changed files with 19 additions and 11 deletions

View File

@@ -6,7 +6,7 @@ defineProps<{
</script>
<template>
<div class="relative inline-flex items-center group">
<div class="relative inline-flex items-center group w-min">
<slot></slot>
<div v-if="open" class="pointer-events-none absolute -top-9 left-1/2 -translate-x-1/2
whitespace-nowrap rounded-md bg-popover px-2 py-1 text-xs

View File

@@ -32,6 +32,7 @@ import {
PaginationNext,
PaginationPrevious,
} from '@/components/ui/pagination'
import Tooltip from '@/components/tooltip/Tooltip.vue';
enum sidePanelState { view, create, closed };
@@ -197,8 +198,8 @@ function setPage(pagenum: number) {
</TableBody>
</Table>
</div>
<div class="mt-5 flex justify-between" :class="sidePanel !== sidePanelState.closed ? 'flex-col items-center' : 'items-center justify-between'"
>
<div class="mt-5 flex justify-between"
:class="sidePanel !== sidePanelState.closed ? 'flex-col items-center' : 'items-center justify-between'">
<div></div>
<Pagination v-slot="{ page }" :items-per-page="pageData?.pageSize || 10" :total="pageData?.total || 10"
:default-page="2" :page="pageNum" @update:page="setPage">
@@ -214,7 +215,7 @@ function setPage(pagenum: number) {
<PaginationNext />
</PaginationContent>
</Pagination>
<div class="flex items-center gap-3 text-sm" :class="sidePanel !== sidePanelState.closed ? 'mt-3' : ''" >
<div class="flex items-center gap-3 text-sm" :class="sidePanel !== sidePanelState.closed ? 'mt-3' : ''">
<p class="text-muted-foreground text-nowrap">Per page:</p>
<button v-for="size in pageSizeOptions" :key="size" @click="setPageSize(size)"
@@ -293,12 +294,19 @@ function setPage(pagenum: number) {
class="justify-self-start"></MemberCard>
<p v-else>{{ person.attendee_name }}</p>
</div>
<Checkbox :disabled="!focusedTrainingReport.course.hasQual"
<Tooltip :open="!focusedTrainingReport.course.hasBookwork"
message="This course does not have bookwork">
<Checkbox :disabled="!focusedTrainingReport.course.hasBookwork"
:model-value="person.passed_bookwork" class="pointer-events-none ml-5">
</Checkbox>
</Tooltip>
<Tooltip :open="!focusedTrainingReport.course.hasQual"
message="This course does not have a qualification">
<Checkbox :disabled="!focusedTrainingReport.course.hasQual"
:model-value="person.passed_qual" class="pointer-events-none ml-1">
</Checkbox>
</Tooltip>
<p class="col-span-2 text-right px-2"
:class="person.remarks == '' ? 'text-muted-foreground' : ''">
{{ person.remarks == "" ?