Removed Capacitor
This commit is contained in:
@@ -80,9 +80,6 @@
|
||||
import Nimbot from "~/components/nimbot.vue";
|
||||
import LabelPrintModal from "~/components/LabelPrintModal.vue";
|
||||
|
||||
definePageMeta({
|
||||
middleware: 'redirect-to-mobile-index'
|
||||
})
|
||||
|
||||
const modal = useModal();
|
||||
|
||||
|
||||
@@ -7,19 +7,14 @@ const auth = useAuthStore()
|
||||
const toast = useToast()
|
||||
const router = useRouter()
|
||||
|
||||
const platformIsNative = useCapacitor().getIsNative()
|
||||
|
||||
|
||||
const doLogin = async (data:any) => {
|
||||
try {
|
||||
await auth.login(data.email, data.password)
|
||||
// Weiterleiten nach erfolgreichem Login
|
||||
toast.add({title:"Einloggen erfolgreich"})
|
||||
if(platformIsNative) {
|
||||
await router.push("/mobile")
|
||||
} else {
|
||||
await router.push("/")
|
||||
}
|
||||
|
||||
await router.push("/")
|
||||
|
||||
} catch (err: any) {
|
||||
toast.add({title:"Zugangsdaten falsch. Bitte überprüfen Sie Ihre Eingaben",color:"rose"})
|
||||
}
|
||||
@@ -27,7 +22,7 @@ const doLogin = async (data:any) => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UCard class="max-w-sm w-full mx-auto mt-5" v-if="!platformIsNative">
|
||||
<UCard class="max-w-sm w-full mx-auto mt-5">
|
||||
|
||||
<UColorModeImage
|
||||
light="/Logo.png"
|
||||
@@ -68,7 +63,7 @@ const doLogin = async (data:any) => {
|
||||
</template>
|
||||
</UAuthForm>
|
||||
</UCard>
|
||||
<div v-else class="mt-20 m-2 p-2">
|
||||
<!-- <div v-else class="mt-20 m-2 p-2">
|
||||
<UColorModeImage
|
||||
light="/Logo.png"
|
||||
dark="/Logo_Dark.png"
|
||||
@@ -98,5 +93,5 @@ const doLogin = async (data:any) => {
|
||||
<NuxtLink to="/password-reset" class="text-primary font-medium">Passwort vergessen?</NuxtLink>
|
||||
</template>
|
||||
</UAuthForm>
|
||||
</div>
|
||||
</div>-->
|
||||
</template>
|
||||
@@ -1,74 +0,0 @@
|
||||
<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>
|
||||
@@ -1,81 +0,0 @@
|
||||
<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>
|
||||
@@ -24,7 +24,7 @@ const workingTimeInfo = ref<{
|
||||
} | null; // Neue Struktur für die Zusammenfassung
|
||||
} | null>(null)
|
||||
|
||||
const platformIsNative = ref(useCapacitor().getIsNative())
|
||||
const platformIsNative = ref(false)
|
||||
|
||||
const selectedPresetRange = ref("Dieser Monat bis heute")
|
||||
const selectedStartDay = ref("")
|
||||
|
||||
@@ -14,7 +14,7 @@ const toast = useToast()
|
||||
const { $dayjs } = useNuxtApp()
|
||||
|
||||
// MOBILE DETECTION
|
||||
const platformIsNative = useCapacitor().getIsNative()
|
||||
const platformIsNative = false
|
||||
|
||||
// STATE
|
||||
const loading = ref(false)
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
<script setup>
|
||||
import {setPageLayout} from "#app";
|
||||
import {useCapacitor} from "~/composables/useCapacitor.js";
|
||||
|
||||
|
||||
const route = useRoute()
|
||||
const dataStore = useDataStore()
|
||||
@@ -9,7 +7,7 @@ const api = useNuxtApp().$api
|
||||
|
||||
|
||||
const type = route.params.type
|
||||
const platform = await useCapacitor().getIsNative() ? "mobile" : "default"
|
||||
const platform = "default"
|
||||
|
||||
|
||||
const dataType = dataStore.dataTypes[route.params.type]
|
||||
|
||||
@@ -7,7 +7,7 @@ import {setPageLayout} from "#app";
|
||||
|
||||
const { has } = usePermission()
|
||||
|
||||
const platformIsNative = useCapacitor().getIsNative()
|
||||
const platformIsNative = false
|
||||
|
||||
defineShortcuts({
|
||||
'/': () => {
|
||||
|
||||
@@ -39,10 +39,7 @@ const setup = async () => {
|
||||
times.value = await useSupabaseSelect("times","*, profile(*), project(id, name)")
|
||||
projects.value = await useSupabaseSelect("projects","*")
|
||||
|
||||
if(await useCapacitor().getIsPhone()) {
|
||||
platform.value = "mobile"
|
||||
setPageLayout("mobile")
|
||||
}
|
||||
|
||||
|
||||
runningTimeInfo.value = (await supabase
|
||||
.from("times")
|
||||
|
||||
Reference in New Issue
Block a user