This commit is contained in:
2025-03-27 14:33:34 +01:00
parent 7deffc885e
commit 57a4512a0e
8 changed files with 427 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
<script setup>
import {useTempStore} from "~/stores/temp.js";
import FloatingActionButton from "~/components/mobile/FloatingActionButton.vue";
const props = defineProps({
type: {
@@ -9,6 +10,9 @@ const props = defineProps({
items: {
required: true,
type: Array
},
platform: {
required: true,
}
})
@@ -104,6 +108,12 @@ const filteredRows = computed(() => {
</script>
<template>
<FloatingActionButton
:label="`+ ${dataType.labelSingle}`"
variant="outline"
v-if="platform === 'mobile'"
@click="router.push(`/mobile/standardEntity/${type}/create`)"
/>
<UDashboardNavbar :title="dataType.label" :badge="filteredRows.length">
<template #right>
<UInput
@@ -129,7 +139,7 @@ const filteredRows = computed(() => {
/>
<UButton
v-if="useRole().checkRight(`${type}-create`)"
v-if="platform !== 'mobile' && useRole().checkRight(`${type}-create`)"
@click="router.push(`/standardEntity/${type}/create`)"
class="ml-3"
>+ {{dataType.labelSingle}}</UButton>

View File

@@ -0,0 +1,26 @@
<script setup>
const supabase = useSupabaseClient()
const router = useRouter()
const profileStore = useProfileStore()
const tenant = ref({})
const setupPage = async () => {
tenant.value = (await supabase.from("tenants").select().eq("id",profileStore.currentTenant).single()).data
}
setupPage()
</script>
<template>
<div>
<h1 class="font-bold text-xl">Willkommen zurück {{profileStore.activeProfile.fullName}}</h1>
<span v-if="tenant.id">bei {{tenant.name}}</span>
</div>
</template>
<style scoped>
</style>

View File

@@ -0,0 +1,41 @@
<script setup>
const props = defineProps({
label: {
type: String,
required: true,
},
icon: {
type: String,
},
variant: {
type: String,
default: 'solid'
},
color: {
type: String,
default: 'primary'
}
})
const emit = defineEmits(['click'])
</script>
<template>
<UButton
id="fab"
:icon="props.icon"
:label="props.label"
:variant="props.variant"
:color="props.color"
@click="emit('click')"
/>
</template>
<style scoped>
#fab {
position: fixed;
right: 15px;
bottom: 10vh;
}
</style>