Merge branch 'devWithMobile' into dev
This commit is contained in:
@@ -2569,7 +2569,7 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = {
|
||||
:data="uri"
|
||||
v-if="showDocument"
|
||||
type="application/pdf"
|
||||
class="w-full previewDocument"
|
||||
class="w-full previewDocumentMobile"
|
||||
/>
|
||||
|
||||
</div>
|
||||
@@ -2598,7 +2598,13 @@ td {
|
||||
border: 1px solid #69c350;
|
||||
}*/
|
||||
|
||||
.previewDocumentMobile {
|
||||
aspect-ratio: 1 / 1.414;
|
||||
|
||||
}
|
||||
|
||||
.previewDocument {
|
||||
height: 80vh;
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -170,22 +170,14 @@ const openEmail = () => {
|
||||
<UDashboardPanelContent>
|
||||
<object
|
||||
:data="linkedDocument.url"
|
||||
class="h-full"
|
||||
class="w-full previewDocumentMobile"
|
||||
/>
|
||||
</UDashboardPanelContent>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- <DocumentDisplay
|
||||
:document-data="dataStore.documents.find(i => i.createdDocument === itemInfo.id)"
|
||||
/>-->
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.previewDocumentMobile {
|
||||
aspect-ratio: 1 / 1.414;
|
||||
|
||||
}
|
||||
</style>
|
||||
113
pages/index.vue
113
pages/index.vue
@@ -1,64 +1,53 @@
|
||||
<template>
|
||||
<UDashboardPage>
|
||||
<UDashboardPanel grow>
|
||||
<UDashboardNavbar title="Home">
|
||||
<template #right>
|
||||
<UTooltip text="Notifications" :shortcuts="['N']">
|
||||
<UButton color="gray" variant="ghost" square @click="isNotificationsSlideoverOpen = true">
|
||||
<UChip :show="unreadMessages" color="primary" inset>
|
||||
<UIcon name="i-heroicons-bell" class="w-5 h-5" />
|
||||
</UChip>
|
||||
</UButton>
|
||||
</UTooltip>
|
||||
</template>
|
||||
</UDashboardNavbar>
|
||||
<UDashboardNavbar title="Home">
|
||||
<template #right>
|
||||
<UTooltip text="Notifications" :shortcuts="['N']">
|
||||
<UButton color="gray" variant="ghost" square @click="isNotificationsSlideoverOpen = true">
|
||||
<UChip :show="unreadMessages" color="primary" inset>
|
||||
<UIcon name="i-heroicons-bell" class="w-5 h-5" />
|
||||
</UChip>
|
||||
</UButton>
|
||||
</UTooltip>
|
||||
</template>
|
||||
</UDashboardNavbar>
|
||||
|
||||
<UDashboardPanelContent class="flex flex-col">
|
||||
<div class="mb-5">
|
||||
<UDashboardCard
|
||||
title="Einnahmen und Ausgaben(netto)"
|
||||
class="mt-3"
|
||||
>
|
||||
<display-income-and-expenditure/>
|
||||
</UDashboardCard>
|
||||
</div>
|
||||
<UPageGrid>
|
||||
<UDashboardCard
|
||||
title="Buchhaltung"
|
||||
v-if="profileStore.ownTenant.features.accounting"
|
||||
>
|
||||
<display-open-balances/>
|
||||
</UDashboardCard>
|
||||
<UDashboardCard
|
||||
title="Projekte"
|
||||
>
|
||||
<display-projects-in-phases/>
|
||||
</UDashboardCard>
|
||||
<UDashboardCard
|
||||
title="Anwesenheiten"
|
||||
>
|
||||
<display-present-profiles/>
|
||||
</UDashboardCard>
|
||||
<UDashboardCard
|
||||
>
|
||||
<display-running-time/>
|
||||
</UDashboardCard>
|
||||
<UDashboardCard
|
||||
title="Aufgaben"
|
||||
>
|
||||
<display-open-tasks/>
|
||||
</UDashboardCard>
|
||||
</UPageGrid>
|
||||
|
||||
|
||||
|
||||
<div class="flex flex-row">
|
||||
|
||||
</div>
|
||||
|
||||
</UDashboardPanelContent>
|
||||
</UDashboardPanel>
|
||||
</UDashboardPage>
|
||||
<UDashboardPanelContent>
|
||||
<div class="mb-5">
|
||||
<UDashboardCard
|
||||
title="Einnahmen und Ausgaben(netto)"
|
||||
class="mt-3"
|
||||
>
|
||||
<display-income-and-expenditure/>
|
||||
</UDashboardCard>
|
||||
</div>
|
||||
<UPageGrid>
|
||||
<UDashboardCard
|
||||
title="Buchhaltung"
|
||||
v-if="profileStore.ownTenant.features.accounting"
|
||||
>
|
||||
<display-open-balances/>
|
||||
</UDashboardCard>
|
||||
<UDashboardCard
|
||||
title="Projekte"
|
||||
>
|
||||
<display-projects-in-phases/>
|
||||
</UDashboardCard>
|
||||
<UDashboardCard
|
||||
title="Anwesenheiten"
|
||||
>
|
||||
<display-present-profiles/>
|
||||
</UDashboardCard>
|
||||
<UDashboardCard
|
||||
>
|
||||
<display-running-time/>
|
||||
</UDashboardCard>
|
||||
<UDashboardCard
|
||||
title="Aufgaben"
|
||||
>
|
||||
<display-open-tasks/>
|
||||
</UDashboardCard>
|
||||
</UPageGrid>
|
||||
</UDashboardPanelContent>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -66,7 +55,7 @@
|
||||
import DisplayPresentProfiles from "~/components/noAutoLoad/displayPresentProfiles.vue";
|
||||
|
||||
definePageMeta({
|
||||
middleware: "auth"
|
||||
middleware: ["auth","redirect-to-mobile-index"]
|
||||
})
|
||||
|
||||
const dataStore = useDataStore()
|
||||
@@ -99,9 +88,5 @@ setup()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.card {
|
||||
border: 1px solid darkgray;
|
||||
border-radius: 20px;
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -1,6 +1,7 @@
|
||||
<script setup >
|
||||
|
||||
import {useProfileStore} from "~/stores/profile.js";
|
||||
import {useCapacitor} from "~/composables/useCapacitor.js";
|
||||
|
||||
definePageMeta({
|
||||
layout: "notLoggedIn"
|
||||
@@ -64,7 +65,14 @@ const onSubmit = async (data) => {
|
||||
} else {
|
||||
//console.log("Login Successful")
|
||||
profileStore.initializeData(user.id)
|
||||
router.push("/")
|
||||
|
||||
if(await useCapacitor().getIsPhone()) {
|
||||
router.push("/mobile")
|
||||
} else {
|
||||
router.push("/")
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
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 = await useCapacitor().getIsPhone() ? "mobile" : "default"
|
||||
console.log(platform)
|
||||
|
||||
|
||||
const dataType = dataStore.dataTypes[route.params.type]
|
||||
|
||||
@@ -13,6 +23,11 @@ const items = ref([])
|
||||
const item = ref({})
|
||||
|
||||
const setupPage = async () => {
|
||||
|
||||
if(await useCapacitor().getIsPhone()) {
|
||||
setPageLayout("mobile")
|
||||
}
|
||||
|
||||
if(route.params.mode) mode.value = route.params.mode
|
||||
|
||||
if(mode.value === "show") {
|
||||
@@ -48,16 +63,19 @@ setupPage()
|
||||
:item="item"
|
||||
@updateNeeded="setupPage"
|
||||
:key="item"
|
||||
:platform="platform"
|
||||
/>
|
||||
<EntityEdit
|
||||
v-else-if="loaded && (mode === 'edit' || mode === 'create')"
|
||||
:type="route.params.type"
|
||||
:item="item"
|
||||
:mode="mode"
|
||||
/>
|
||||
<EntityList
|
||||
v-else-if="loaded && mode === 'list'"
|
||||
:type="type"
|
||||
:items="items"
|
||||
:platform="platform"
|
||||
/>
|
||||
<UProgress
|
||||
v-else
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<script setup>
|
||||
import dayjs from "dayjs";
|
||||
import customParseFormat from "dayjs/plugin/customParseFormat"
|
||||
import {useCapacitor} from "~/composables/useCapacitor.js";
|
||||
import {setPageLayout} from "#app";
|
||||
import FloatingActionButton from "~/components/mobile/FloatingActionButton.vue";
|
||||
|
||||
dayjs.extend(customParseFormat)
|
||||
|
||||
@@ -14,11 +17,18 @@ const supabase = useSupabaseClient()
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
|
||||
const platform = useCapacitor().getIsPhone() ? "mobile" : "default"
|
||||
|
||||
|
||||
const filterUser = ref(profileStore.activeProfile.id || "")
|
||||
|
||||
const workingtimes = ref([])
|
||||
|
||||
const setupPage = async () => {
|
||||
if(platform === "mobile") {
|
||||
setPageLayout("mobile")
|
||||
}
|
||||
|
||||
if(route.query) {
|
||||
if(route.query.profile) filterUser.value = route.query.profile
|
||||
}
|
||||
@@ -71,43 +81,35 @@ const itemInfo = ref({
|
||||
const columns = [
|
||||
{
|
||||
key:"state",
|
||||
label: "Status",
|
||||
sortable:true
|
||||
label: "Status"
|
||||
},
|
||||
{
|
||||
key: "approved",
|
||||
label: "Genehmigt",
|
||||
sortable:true
|
||||
label: "Genehmigt"
|
||||
},
|
||||
{
|
||||
key: "profile",
|
||||
label: "Mitarbeiter",
|
||||
sortable:true
|
||||
label: "Mitarbeiter"
|
||||
},
|
||||
{
|
||||
key: "date",
|
||||
label: "Datum",
|
||||
sortable:true
|
||||
label: "Datum"
|
||||
},
|
||||
{
|
||||
key:"startDate",
|
||||
label:"Start",
|
||||
sortable:true
|
||||
label:"Start"
|
||||
},
|
||||
{
|
||||
key: "endDate",
|
||||
label: "Ende",
|
||||
sortable:true
|
||||
label: "Ende"
|
||||
},
|
||||
{
|
||||
key: "duration",
|
||||
label: "Dauer",
|
||||
sortable:true
|
||||
label: "Dauer"
|
||||
},
|
||||
{
|
||||
key: "notes",
|
||||
label: "Notizen",
|
||||
sortable:true
|
||||
label: "Notizen"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -155,7 +157,21 @@ const setEndDate = (row) => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UDashboardNavbar title="Anwesenheiten">
|
||||
<FloatingActionButton
|
||||
:label="`+ Anwesenheit`"
|
||||
variant="outline"
|
||||
v-if="platform === 'mobile'"
|
||||
@click="router.push(`/workingtimes/create`)"
|
||||
:pos="0"
|
||||
/>
|
||||
<FloatingActionButton
|
||||
:label="`Auswertung`"
|
||||
variant="outline"
|
||||
v-if="platform === 'mobile'"
|
||||
@click="router.push(`/workingtimes/evaluate/${profileStore.activeProfile.id}`)"
|
||||
:pos="1"
|
||||
/>
|
||||
<UDashboardNavbar title="Anwesenheiten" v-if="platform !== 'mobile'">
|
||||
<template #right>
|
||||
<UButton
|
||||
@click="router.push(`/workingtimes/edit?profile=${filterUser}`)"
|
||||
@@ -164,7 +180,12 @@ const setEndDate = (row) => {
|
||||
</UButton>
|
||||
</template>
|
||||
</UDashboardNavbar>
|
||||
<UDashboardToolbar>
|
||||
<UDashboardNavbar title="Anwesenheiten" v-else>
|
||||
<template #toggle>
|
||||
<div></div>
|
||||
</template>
|
||||
</UDashboardNavbar>
|
||||
<UDashboardToolbar v-if="platform !== 'mobile'">
|
||||
<template #left>
|
||||
|
||||
<USelectMenu
|
||||
|
||||
Reference in New Issue
Block a user