Changes
This commit is contained in:
48
pages/mobile/index.vue
Normal file
48
pages/mobile/index.vue
Normal 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
39
pages/mobile/menu.vue
Normal 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>
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user