feat: make shift dialog time-slot help collapsible
Made-with: Cursor
This commit is contained in:
@@ -71,6 +71,14 @@ const form = ref({
|
|||||||
const errors = ref<Record<string, string>>({})
|
const errors = ref<Record<string, string>>({})
|
||||||
const refVForm = ref<VForm>()
|
const refVForm = ref<VForm>()
|
||||||
|
|
||||||
|
/** Single accordion panel id for time-slot help; `undefined` = collapsed (saves vertical space). */
|
||||||
|
const timeSlotHelpPanel = ref<string | undefined>(undefined)
|
||||||
|
|
||||||
|
watch(modelValue, (open) => {
|
||||||
|
if (open)
|
||||||
|
timeSlotHelpPanel.value = undefined
|
||||||
|
})
|
||||||
|
|
||||||
// Populate form when editing
|
// Populate form when editing
|
||||||
watch(
|
watch(
|
||||||
() => props.shift,
|
() => props.shift,
|
||||||
@@ -232,22 +240,36 @@ function onSubmit() {
|
|||||||
@submit.prevent="onSubmit"
|
@submit.prevent="onSubmit"
|
||||||
>
|
>
|
||||||
<VCardText class="pt-5">
|
<VCardText class="pt-5">
|
||||||
<VAlert
|
<VExpansionPanels
|
||||||
v-if="showInfoTooltip && tooltipText"
|
v-if="showInfoTooltip && tooltipText"
|
||||||
type="info"
|
v-model="timeSlotHelpPanel"
|
||||||
variant="tonal"
|
class="mb-6 border rounded-lg"
|
||||||
density="compact"
|
variant="accordion"
|
||||||
class="mb-6"
|
elevation="0"
|
||||||
title="Tijdsloten in dit evenement"
|
|
||||||
>
|
>
|
||||||
<p class="text-body-2 mb-0">
|
<VExpansionPanel value="time-slot-help">
|
||||||
{{ tooltipText.main }}
|
<VExpansionPanelTitle class="py-3 min-h-0">
|
||||||
</p>
|
<div class="d-flex align-center text-start">
|
||||||
<p class="text-caption text-medium-emphasis mb-0 mt-2">
|
<VIcon
|
||||||
<span class="font-weight-medium text-high-emphasis">Tip:</span>
|
icon="tabler-info-circle"
|
||||||
{{ tooltipText.tip }}
|
color="info"
|
||||||
</p>
|
size="22"
|
||||||
</VAlert>
|
class="me-3 flex-shrink-0"
|
||||||
|
/>
|
||||||
|
<span class="text-body-1 font-weight-medium">Tijdsloten in dit evenement</span>
|
||||||
|
</div>
|
||||||
|
</VExpansionPanelTitle>
|
||||||
|
<VExpansionPanelText class="text-body-2">
|
||||||
|
<p class="mb-0">
|
||||||
|
{{ tooltipText.main }}
|
||||||
|
</p>
|
||||||
|
<p class="text-caption text-medium-emphasis mb-0 mt-3">
|
||||||
|
<span class="font-weight-medium text-high-emphasis">Tip:</span>
|
||||||
|
{{ tooltipText.tip }}
|
||||||
|
</p>
|
||||||
|
</VExpansionPanelText>
|
||||||
|
</VExpansionPanel>
|
||||||
|
</VExpansionPanels>
|
||||||
|
|
||||||
<p class="text-overline text-medium-emphasis letter-spacing-normal mb-3">
|
<p class="text-overline text-medium-emphasis letter-spacing-normal mb-3">
|
||||||
Tijd & rol
|
Tijd & rol
|
||||||
|
|||||||
Reference in New Issue
Block a user