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

48
pages/mobile/index.vue Normal file
View File

@@ -0,0 +1,48 @@
<script setup>
import DisplayPresentProfiles from "~/components/noAutoLoad/displayPresentProfiles.vue";
definePageMeta({
layout: 'mobile'
})
const profileStore = useProfileStore()
</script>
<template>
<UDashboardPanelContent>
<UPageGrid>
<UDashboardCard>
<display-welcome/>
</UDashboardCard>
<UDashboardCard
title="Aufgaben"
>
<display-open-tasks/>
</UDashboardCard>
<UDashboardCard
title="Anwesenheit"
>
<display-running-time/>
</UDashboardCard>
<UDashboardCard
title="Buchhaltung"
v-if="profileStore.ownTenant.features.accounting"
>
<display-open-balances/>
</UDashboardCard>
<UDashboardCard
title="Projekte"
>
<display-projects-in-phases/>
</UDashboardCard>
</UPageGrid>
</UDashboardPanelContent>
</template>
<style scoped>
</style>

39
pages/mobile/menu.vue Normal file
View File

@@ -0,0 +1,39 @@
<script setup>
definePageMeta({
layout: 'mobile',
})
</script>
<template>
<UDashboardPanelContent>
<UButton
class="w-full my-1">
Abwesenheiten
</UButton>
<UButton
class="w-full my-1">
Kalender
</UButton>
<UButton
class="w-full my-1">
Kunden
</UButton>
<UButton
class="w-full my-1">
Lieferanten
</UButton>
<UButton
class="w-full my-1">
Objekte
</UButton>
</UDashboardPanelContent>
</template>
<style scoped>
</style>

View File

@@ -1,9 +1,19 @@
<script setup>
import {setPageLayout} from "#app";
import {useCapacitor} from "~/composables/useCapacitor.js";
definePageMeta({
middleware: "auth",
layout: "default",
})
const route = useRoute()
const dataStore = useDataStore()
const supabase = useSupabaseClient()
const type = route.params.type
const platform = useCapacitor().getIsPhone() ? "mobile" : "default"
const dataType = dataStore.dataTypes[route.params.type]
@@ -13,6 +23,11 @@ const items = ref([])
const item = ref({})
const setupPage = async () => {
if(platform === "mobile") {
setPageLayout("mobile")
}
if(route.params.mode) mode.value = route.params.mode
if(mode.value === "show") {
@@ -58,6 +73,7 @@ setupPage()
v-else-if="loaded && mode === 'list'"
:type="type"
:items="items"
:platform="platform"
/>
<UProgress
v-else