<script setup>

definePageMeta({
  layout: 'mobile',
})

const auth = useAuthStore()

</script>

<template>
  <UDashboardPanelContent>
    <UDivider class="mb-3">Weiteres</UDivider>
    <UButton
        class="w-full my-1"
        to="/times"
        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="/workingtimes"
        icon="i-heroicons-clock"
    >
      Anwesenheiten
    </UButton>
<!--    <UButton
        class="w-full my-1">
      Kalender
    </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>