Some Changes

This commit is contained in:
2025-03-27 20:36:08 +01:00
parent 57a4512a0e
commit b3fd996f3f
4 changed files with 50 additions and 21 deletions

View File

@@ -115,6 +115,9 @@ const filteredRows = computed(() => {
@click="router.push(`/mobile/standardEntity/${type}/create`)" @click="router.push(`/mobile/standardEntity/${type}/create`)"
/> />
<UDashboardNavbar :title="dataType.label" :badge="filteredRows.length"> <UDashboardNavbar :title="dataType.label" :badge="filteredRows.length">
<template #toggle>
<div v-if="platform === 'mobile'"></div>
</template>
<template #right> <template #right>
<UInput <UInput
id="searchinput" id="searchinput"

View File

@@ -14,6 +14,10 @@ const props = defineProps({
color: { color: {
type: String, type: String,
default: 'primary' default: 'primary'
},
pos: {
type: Number,
default: 0
} }
}) })
@@ -29,6 +33,8 @@ const emit = defineEmits(['click'])
:variant="props.variant" :variant="props.variant"
:color="props.color" :color="props.color"
@click="emit('click')" @click="emit('click')"
:style="`bottom: ${10 + props.pos * 5}vh;`"
class="bg-white dark:bg-gray-950"
/> />
</template> </template>
@@ -36,6 +42,6 @@ const emit = defineEmits(['click'])
#fab { #fab {
position: fixed; position: fixed;
right: 15px; right: 15px;
bottom: 10vh; z-index: 5;
} }
</style> </style>

View File

@@ -148,7 +148,7 @@ const footerLinks = [/*{
</UDashboardPanel> </UDashboardPanel>
</UDashboardPage> </UDashboardPage>
<div class="mobileFooter"> <div class="mobileFooter bg-white dark:bg-gray-950">
<UButton <UButton
icon="i-heroicons-home" icon="i-heroicons-home"
to="/mobile/" to="/mobile/"
@@ -233,7 +233,6 @@ const footerLinks = [/*{
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
padding: 1em; padding: 1em;
background-color: white;
} }
.mobileFooter > a { .mobileFooter > a {

View File

@@ -1,6 +1,9 @@
<script setup> <script setup>
import dayjs from "dayjs"; import dayjs from "dayjs";
import customParseFormat from "dayjs/plugin/customParseFormat" 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) dayjs.extend(customParseFormat)
@@ -14,11 +17,18 @@ const supabase = useSupabaseClient()
const router = useRouter() const router = useRouter()
const route = useRoute() const route = useRoute()
const platform = useCapacitor().getIsPhone() ? "mobile" : "default"
const filterUser = ref(profileStore.activeProfile.id || "") const filterUser = ref(profileStore.activeProfile.id || "")
const workingtimes = ref([]) const workingtimes = ref([])
const setupPage = async () => { const setupPage = async () => {
if(platform === "mobile") {
setPageLayout("mobile")
}
if(route.query) { if(route.query) {
if(route.query.profile) filterUser.value = route.query.profile if(route.query.profile) filterUser.value = route.query.profile
} }
@@ -71,43 +81,35 @@ const itemInfo = ref({
const columns = [ const columns = [
{ {
key:"state", key:"state",
label: "Status", label: "Status"
sortable:true
}, },
{ {
key: "approved", key: "approved",
label: "Genehmigt", label: "Genehmigt"
sortable:true
}, },
{ {
key: "profile", key: "profile",
label: "Mitarbeiter", label: "Mitarbeiter"
sortable:true
}, },
{ {
key: "date", key: "date",
label: "Datum", label: "Datum"
sortable:true
}, },
{ {
key:"startDate", key:"startDate",
label:"Start", label:"Start"
sortable:true
}, },
{ {
key: "endDate", key: "endDate",
label: "Ende", label: "Ende"
sortable:true
}, },
{ {
key: "duration", key: "duration",
label: "Dauer", label: "Dauer"
sortable:true
}, },
{ {
key: "notes", key: "notes",
label: "Notizen", label: "Notizen"
sortable:true
} }
] ]
@@ -155,7 +157,21 @@ const setEndDate = (row) => {
</script> </script>
<template> <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> <template #right>
<UButton <UButton
@click="router.push(`/workingtimes/edit?profile=${filterUser}`)" @click="router.push(`/workingtimes/edit?profile=${filterUser}`)"
@@ -164,7 +180,12 @@ const setEndDate = (row) => {
</UButton> </UButton>
</template> </template>
</UDashboardNavbar> </UDashboardNavbar>
<UDashboardToolbar> <UDashboardNavbar title="Anwesenheiten" v-else>
<template #toggle>
<div></div>
</template>
</UDashboardNavbar>
<UDashboardToolbar v-if="platform !== 'mobile'">
<template #left> <template #left>
<USelectMenu <USelectMenu