Added Frontend
This commit is contained in:
74
frontend/pages/mobile/index.vue
Normal file
74
frontend/pages/mobile/index.vue
Normal file
@@ -0,0 +1,74 @@
|
||||
<script setup>
|
||||
|
||||
|
||||
definePageMeta({
|
||||
layout: 'mobile'
|
||||
})
|
||||
|
||||
const auth = useAuthStore()
|
||||
|
||||
const pinnedLinks = computed(() => {
|
||||
return (auth.profile?.pinned_on_navigation || [])
|
||||
.map((pin) => {
|
||||
if (pin.type === "external") {
|
||||
return {
|
||||
label: pin.label,
|
||||
to: pin.link,
|
||||
icon: pin.icon,
|
||||
external: true,
|
||||
}
|
||||
} else if (pin.type === "standardEntity") {
|
||||
return {
|
||||
label: pin.label,
|
||||
to: `/standardEntity/${pin.datatype}/show/${pin.id}`,
|
||||
icon: pin.icon,
|
||||
external: false,
|
||||
}
|
||||
}
|
||||
})
|
||||
.filter(Boolean)
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UDashboardPanelContent>
|
||||
<UPageGrid>
|
||||
<UDashboardCard>
|
||||
<display-welcome/>
|
||||
</UDashboardCard>
|
||||
<UDashboardCard
|
||||
title="Aufgaben"
|
||||
>
|
||||
<display-open-tasks/>
|
||||
</UDashboardCard>
|
||||
<!--<UDashboardCard
|
||||
title="Anwesenheit"
|
||||
>
|
||||
<display-running-working-time/>
|
||||
</UDashboardCard>
|
||||
<UDashboardCard
|
||||
title="Zeit"
|
||||
>
|
||||
<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>
|
||||
<display-pinnend-links :links="pinnedLinks"/>
|
||||
|
||||
</UPageGrid>
|
||||
</UDashboardPanelContent>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
81
frontend/pages/mobile/menu.vue
Normal file
81
frontend/pages/mobile/menu.vue
Normal file
@@ -0,0 +1,81 @@
|
||||
<script setup>
|
||||
|
||||
definePageMeta({
|
||||
layout: 'mobile',
|
||||
})
|
||||
|
||||
const auth = useAuthStore()
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UDashboardPanelContent>
|
||||
<UDivider class="mb-3">Weiteres</UDivider>
|
||||
<UButton
|
||||
class="w-full my-1"
|
||||
to="/staff/time"
|
||||
icon="i-heroicons-clock"
|
||||
>
|
||||
Zeiten
|
||||
</UButton>
|
||||
<!-- <UButton
|
||||
class="w-full my-1"
|
||||
to="/standardEntity/absencerequests"
|
||||
icon="i-heroicons-document-text"
|
||||
>
|
||||
Abwesenheiten
|
||||
</UButton>-->
|
||||
|
||||
<UButton
|
||||
class="w-full my-1"
|
||||
to="/standardEntity/customers"
|
||||
icon="i-heroicons-user-group"
|
||||
>
|
||||
Kunden
|
||||
</UButton>
|
||||
<UButton
|
||||
class="w-full my-1"
|
||||
to="/standardEntity/vendors"
|
||||
icon="i-heroicons-truck"
|
||||
>
|
||||
Lieferanten
|
||||
</UButton>
|
||||
<UButton
|
||||
class="w-full my-1"
|
||||
to="/standardEntity/contacts"
|
||||
icon="i-heroicons-user-group"
|
||||
>
|
||||
Ansprechpartner
|
||||
</UButton>
|
||||
<UButton
|
||||
class="w-full my-1"
|
||||
to="/standardEntity/plants"
|
||||
icon="i-heroicons-clipboard-document"
|
||||
>
|
||||
Objekte
|
||||
</UButton>
|
||||
<UButton
|
||||
class="w-full my-1"
|
||||
@click="auth.logout()"
|
||||
color="rose"
|
||||
variant="outline"
|
||||
>
|
||||
Abmelden
|
||||
</UButton>
|
||||
|
||||
<UDivider class="my-5">Unternehmen wechseln</UDivider>
|
||||
|
||||
<div class="w-full flex flex-row justify-between my-3" v-for="tenant in auth.tenants">
|
||||
<span class="text-left">{{tenant.name}}</span>
|
||||
<UButton
|
||||
@click="auth.switchTenant(tenant.id)"
|
||||
>Wechseln</UButton>
|
||||
</div>
|
||||
|
||||
|
||||
</UDashboardPanelContent>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user