fix(#15): Fix several UI bugs
This commit is contained in:
@@ -7,14 +7,24 @@
|
||||
</template>
|
||||
|
||||
<template #right>
|
||||
<UDropdownMenu :items="items">
|
||||
<UButton icon="i-lucide-plus" size="md" class="rounded-full" />
|
||||
</UDropdownMenu>
|
||||
<UButton
|
||||
icon="i-lucide-circle-plus"
|
||||
label="Neuer Mitbestimmungsantrag"
|
||||
to="/create"
|
||||
:disabled="!canWriteApplicationForms"
|
||||
size="xl"
|
||||
variant="outline"
|
||||
color="neutral"
|
||||
:ui="{
|
||||
leadingIcon: 'text-primary'
|
||||
}"
|
||||
/>
|
||||
</template>
|
||||
</UDashboardNavbar>
|
||||
|
||||
<UDashboardToolbar>
|
||||
<UNavigationMenu :items="links" highlight class="-mx-1 flex-1" />
|
||||
<USeparator orientation="vertical" class="h-8 mx-2" />
|
||||
<FormValidationIndicator :status="validationStatus" />
|
||||
</UDashboardToolbar>
|
||||
</template>
|
||||
@@ -59,12 +69,12 @@ const applicationFormId = Array.isArray(route.params.id) ? route.params.id[0] :
|
||||
const {
|
||||
applicationForm,
|
||||
navigationLinks: links,
|
||||
dropdownItems: items,
|
||||
updateApplicationForm
|
||||
} = await useApplicationFormNavigation(applicationFormId!)
|
||||
|
||||
const { updateApplicationForm: updateForm, submitApplicationForm } = useApplicationForm()
|
||||
const { validateFormElements, getHighestComplianceStatus } = useApplicationFormValidator()
|
||||
const { canWriteApplicationForms } = usePermissions()
|
||||
const userStore = useUserStore()
|
||||
const { user } = storeToRefs(userStore)
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
</UDashboardNavbar>
|
||||
|
||||
<UDashboardToolbar>
|
||||
<div class="flex-1" />
|
||||
<USeparator orientation="vertical" class="h-8 mx-2" />
|
||||
<FormValidationIndicator :status="validationStatus" />
|
||||
</UDashboardToolbar>
|
||||
</template>
|
||||
@@ -28,7 +30,7 @@
|
||||
@add-input-form="handleAddInputForm"
|
||||
>
|
||||
<UFormField label="Name" class="mb-4">
|
||||
<UInput v-model="applicationFormTemplate.name" />
|
||||
<UInput v-model="applicationFormTemplate.name" class="w-full" />
|
||||
</UFormField>
|
||||
</FormStepperWithNavigation>
|
||||
</div>
|
||||
|
||||
@@ -29,15 +29,20 @@
|
||||
</UButton>
|
||||
</UTooltip>
|
||||
|
||||
<UDropdownMenu :items="items">
|
||||
<UButton icon="i-lucide-plus" size="md" class="rounded-full" />
|
||||
</UDropdownMenu>
|
||||
<UButton
|
||||
icon="i-lucide-circle-plus"
|
||||
label="Neuer Mitbestimmungsantrag"
|
||||
to="/create"
|
||||
:disabled="!canWriteApplicationForms"
|
||||
size="xl"
|
||||
variant="outline"
|
||||
color="neutral"
|
||||
:ui="{
|
||||
leadingIcon: 'text-primary'
|
||||
}"
|
||||
/>
|
||||
</template>
|
||||
</UDashboardNavbar>
|
||||
|
||||
<UDashboardToolbar>
|
||||
<template #left> toolbar left </template>
|
||||
</UDashboardToolbar>
|
||||
</template>
|
||||
|
||||
<template #body>
|
||||
@@ -54,9 +59,7 @@
|
||||
<h3 class="font-semibold text-lg text-highlighted truncate">
|
||||
{{ applicationFormElem.name }}
|
||||
</h3>
|
||||
<p class="text-xs text-muted mt-1">
|
||||
#{{ index }}
|
||||
</p>
|
||||
<p class="text-xs text-muted mt-1">#{{ index }}</p>
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<UBadge
|
||||
@@ -163,17 +166,6 @@ const selectedOrganizationId = computed({
|
||||
|
||||
const { canWriteApplicationForms } = usePermissions()
|
||||
|
||||
const items = computed(() => [
|
||||
[
|
||||
{
|
||||
label: 'Neuer Mitbestimmungsantrag',
|
||||
icon: 'i-lucide-send',
|
||||
to: '/create',
|
||||
disabled: !canWriteApplicationForms.value
|
||||
}
|
||||
]
|
||||
])
|
||||
|
||||
const applicationForms = computed({
|
||||
get: () => data?.value?.content ?? [],
|
||||
set: (val) => {
|
||||
|
||||
Reference in New Issue
Block a user