Compare commits
2 Commits
898ce2e0c0
...
13f2ada2ee
Author | SHA1 | Date |
---|---|---|
|
13f2ada2ee | |
|
1cbdcc893c |
|
@ -4,44 +4,16 @@
|
||||||
<slot name="fields"></slot>
|
<slot name="fields"></slot>
|
||||||
</div>
|
</div>
|
||||||
</ui-popup>
|
</ui-popup>
|
||||||
<div class="px-6 py-2 border-b border-gray-600" :class="visibleDesktopBlock">
|
<div class="px-6 py-2 border-b border-gray-600 items-center space-x-3">
|
||||||
<div class="flex items-end space-x-3">
|
|
||||||
<slot name="buttons"></slot>
|
|
||||||
<ui-icon-button v-if="filterable" icon="filter" @click="filterVisible = !filterVisible">Filtern</ui-icon-button>
|
|
||||||
</div>
|
|
||||||
<ui-box v-if="filterVisible" class="mt-3">
|
|
||||||
<div class="grid grid-cols-4 gap-3 items-end">
|
|
||||||
<slot name="fields"></slot>
|
|
||||||
<ui-icon-button class="col-start-1" icon="close" @click="filterVisible = false">Schließen</ui-icon-button>
|
|
||||||
</div>
|
|
||||||
</ui-box>
|
|
||||||
</div>
|
|
||||||
<div class="px-6 py-2 border-b border-gray-600 items-center space-x-3" :class="visibleMobile">
|
|
||||||
<div class="flex flex-col sm:flex-row items-stretch sm:items-end space-y-1 sm:space-y-0 sm:space-x-3">
|
<div class="flex flex-col sm:flex-row items-stretch sm:items-end space-y-1 sm:space-y-0 sm:space-x-3">
|
||||||
<slot name="buttons"></slot>
|
<slot name="buttons"></slot>
|
||||||
<ui-icon-button v-if="filterable" icon="filter" @click="visible = true">Filtern</ui-icon-button>
|
<ui-icon-button v-if="!!$slots.fields" icon="filter" @click="visible = true">Filtern</ui-icon-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {defineProps, ref} from 'vue';
|
import {ref} from 'vue';
|
||||||
import useBreakpoints from '../../composables/useBreakpoints.js';
|
|
||||||
|
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
|
|
||||||
const filterVisible = ref(false);
|
|
||||||
|
|
||||||
const props = defineProps({
|
|
||||||
breakpoint: {
|
|
||||||
type: String,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
filterable: {
|
|
||||||
type: Boolean,
|
|
||||||
default: () => true,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const {visibleDesktopBlock, visibleMobile} = useBreakpoints(props);
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,9 +1,15 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="flex-none w-maxc flex flex-col justify-between border-b-2 group-[.is-popup]:border-zinc-500 mb-3">
|
<div class="flex-none w-maxc flex flex-col justify-between border-b-2 border-gray-500 group-[.is-popup]:border-zinc-500 mb-3">
|
||||||
<div class="flex space-x-1 px-2">
|
<div class="flex space-x-1 px-2">
|
||||||
<a v-for="(item, index) in entries" :key="index" href="#" class="rounded-t-lg py-1 px-3 text-zinc-300"
|
<a
|
||||||
:class="index === modelValue ? `group-[.is-popup]:bg-zinc-600` : ''" @click.prevent="openMenu(index)"
|
v-for="(item, index) in entries"
|
||||||
v-text="item.title"></a>
|
:key="index"
|
||||||
|
href="#"
|
||||||
|
class="rounded-t-lg py-1 px-3 text-zinc-300"
|
||||||
|
:class="index === modelValue ? `bg-gray-700 group-[.is-popup]:bg-zinc-600` : ''"
|
||||||
|
@click.prevent="openMenu(index)"
|
||||||
|
v-text="item.title"
|
||||||
|
></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -11,9 +17,18 @@
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
modelValue: {},
|
modelValue: {
|
||||||
entries: {},
|
type: Number,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
entries: {
|
||||||
|
required: true,
|
||||||
|
validator: function (entries) {
|
||||||
|
return entries.filter((e) => e.title === undefined || typeof e.title !== 'string' || e.title.length === 0).length === 0;
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
emits: ['update:modelValue'],
|
||||||
methods: {
|
methods: {
|
||||||
openMenu(index) {
|
openMenu(index) {
|
||||||
this.$emit('update:modelValue', index);
|
this.$emit('update:modelValue', index);
|
||||||
|
|
|
@ -1,46 +0,0 @@
|
||||||
import {computed} from 'vue';
|
|
||||||
|
|
||||||
export default function (props) {
|
|
||||||
const visibleMobile = computed(() => {
|
|
||||||
return {
|
|
||||||
sm: 'flex sm:hidden',
|
|
||||||
md: 'flex md:hidden',
|
|
||||||
lg: 'flex lg:hidden',
|
|
||||||
xl: 'flex xl:hidden',
|
|
||||||
}[props.breakpoint];
|
|
||||||
});
|
|
||||||
|
|
||||||
const visibleDesktop = computed(() => {
|
|
||||||
return {
|
|
||||||
sm: 'hidden sm:flex',
|
|
||||||
md: 'hidden md:flex',
|
|
||||||
lg: 'hidden lg:flex',
|
|
||||||
xl: 'hidden xl:flex',
|
|
||||||
}[props.breakpoint];
|
|
||||||
});
|
|
||||||
|
|
||||||
const visibleMobileBlock = computed(() => {
|
|
||||||
return {
|
|
||||||
sm: 'block sm:hidden',
|
|
||||||
md: 'block md:hidden',
|
|
||||||
lg: 'block lg:hidden',
|
|
||||||
xl: 'block xl:hidden',
|
|
||||||
}[props.breakpoint];
|
|
||||||
});
|
|
||||||
|
|
||||||
const visibleDesktopBlock = computed(() => {
|
|
||||||
return {
|
|
||||||
sm: 'hidden sm:block',
|
|
||||||
md: 'hidden md:block',
|
|
||||||
lg: 'hidden lg:block',
|
|
||||||
xl: 'hidden xl:block',
|
|
||||||
}[props.breakpoint];
|
|
||||||
});
|
|
||||||
|
|
||||||
return {
|
|
||||||
visibleMobile,
|
|
||||||
visibleDesktop,
|
|
||||||
visibleDesktopBlock,
|
|
||||||
visibleMobileBlock,
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -144,7 +144,7 @@
|
||||||
<conditions-form id="filesettings" :single="single" :value="fileSettingPopup.properties.conditions" @save="saveFileConditions"> </conditions-form>
|
<conditions-form id="filesettings" :single="single" :value="fileSettingPopup.properties.conditions" @save="saveFileConditions"> </conditions-form>
|
||||||
</ui-popup>
|
</ui-popup>
|
||||||
|
|
||||||
<page-filter breakpoint="xl" :filterable="false">
|
<page-filter>
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<f-text id="search" :model-value="getFilter('search')" label="Suchen …" size="sm" @update:model-value="setFilter('search', $event)"></f-text>
|
<f-text id="search" :model-value="getFilter('search')" label="Suchen …" size="sm" @update:model-value="setFilter('search', $event)"></f-text>
|
||||||
<f-switch id="past" :model-value="getFilter('past')" label="vergangene zeigen" name="past" size="sm" @update:model-value="setFilter('past', $event)"></f-switch>
|
<f-switch id="past" :model-value="getFilter('past')" label="vergangene zeigen" name="past" size="sm" @update:model-value="setFilter('past', $event)"></f-switch>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ui-popup>
|
</ui-popup>
|
||||||
<page-filter breakpoint="lg">
|
<page-filter>
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<f-text id="search" v-model="innerFilter.search" name="search" label="Suchen" size="sm"></f-text>
|
<f-text id="search" v-model="innerFilter.search" name="search" label="Suchen" size="sm"></f-text>
|
||||||
<ui-icon-button icon="plus" @click="editing = {participant: null, preview: JSON.stringify(meta.form_config)}">Hinzufügen</ui-icon-button>
|
<ui-icon-button icon="plus" @click="editing = {participant: null, preview: JSON.stringify(meta.form_config)}">Hinzufügen</ui-icon-button>
|
||||||
|
|
|
@ -72,7 +72,7 @@
|
||||||
</section>
|
</section>
|
||||||
</form>
|
</form>
|
||||||
</ui-popup>
|
</ui-popup>
|
||||||
<page-filter breakpoint="xl" :filterable="false">
|
<page-filter>
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<f-text id="search" :model-value="getFilter('search')" label="Suchen …" size="sm" @update:model-value="setFilter('search', $event)"></f-text>
|
<f-text id="search" :model-value="getFilter('search')" label="Suchen …" size="sm" @update:model-value="setFilter('search', $event)"></f-text>
|
||||||
<f-multipleselect
|
<f-multipleselect
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
<span class="hidden xl:inline">Anwenden</span>
|
<span class="hidden xl:inline">Anwenden</span>
|
||||||
</button>
|
</button>
|
||||||
</ui-popup>
|
</ui-popup>
|
||||||
<page-filter breakpoint="xl">
|
<page-filter>
|
||||||
<template #fields>
|
<template #fields>
|
||||||
<f-switch
|
<f-switch
|
||||||
v-show="hasModule('bill')"
|
v-show="hasModule('bill')"
|
||||||
|
|
Loading…
Reference in New Issue