Added Content to HelpSlideover
Added Shortcut to Settings Added Feature Disabling Settings to tenant.vue
This commit is contained in:
@@ -9,16 +9,15 @@ const links = [{
|
||||
label: 'Shortcuts',
|
||||
icon: 'i-heroicons-key',
|
||||
trailingIcon: 'i-heroicons-arrow-right-20-solid',
|
||||
color: 'gray',
|
||||
onClick: () => {
|
||||
shortcuts.value = true
|
||||
}
|
||||
}, {
|
||||
label: 'Documentation',
|
||||
icon: 'i-heroicons-book-open',
|
||||
to: 'https://ui.nuxt.com/pro/guide',
|
||||
to: 'https://fedeo.de',
|
||||
target: '_blank'
|
||||
}, {
|
||||
}/*, {
|
||||
label: 'GitHub repository',
|
||||
icon: 'i-simple-icons-github',
|
||||
to: 'https://github.com/nuxt/ui-pro',
|
||||
@@ -28,31 +27,32 @@ const links = [{
|
||||
icon: 'i-heroicons-credit-card',
|
||||
to: 'https://ui.nuxt.com/pro/purchase',
|
||||
target: '_blank'
|
||||
}]
|
||||
}*/]
|
||||
|
||||
const categories = computed(() => [{
|
||||
title: 'General',
|
||||
items: [
|
||||
{ shortcuts: [metaSymbol.value, 'K'], name: 'Command menu' },
|
||||
{ shortcuts: ['N'], name: 'Notifications' },
|
||||
{ shortcuts: [metaSymbol.value, 'K'], name: 'Hauptmenü' },
|
||||
{ shortcuts: ['N'], name: 'Benachrichtigungen' },
|
||||
{ shortcuts: ['?'], name: 'Help & Support' },
|
||||
{ shortcuts: ['/'], name: 'Search' }
|
||||
{ shortcuts: ['/'], name: 'Suche' }
|
||||
]
|
||||
}, {
|
||||
title: 'Navigation',
|
||||
items: [
|
||||
{ shortcuts: ['G', 'H'], name: 'Go to Home' },
|
||||
{ shortcuts: ['G', 'H'], name: 'Gehe zu Dashboard' },
|
||||
{ shortcuts: ['G', 'A'], name: 'Gehe zu Aufgaben' },/*
|
||||
{ shortcuts: ['G', 'I'], name: 'Go to Inbox' },
|
||||
{ shortcuts: ['G', 'U'], name: 'Go to Users' },
|
||||
{ shortcuts: ['G', 'S'], name: 'Go to Settings' }
|
||||
{ shortcuts: ['G', 'U'], name: 'Go to Users' },*/
|
||||
{ shortcuts: ['G', 'S'], name: 'Gehe zu Einstellungen' }
|
||||
]
|
||||
}, {
|
||||
}, /*{
|
||||
title: 'Inbox',
|
||||
items: [
|
||||
{ shortcuts: ['↑'], name: 'Prev notification' },
|
||||
{ shortcuts: ['↓'], name: 'Next notification' }
|
||||
]
|
||||
}])
|
||||
}*/])
|
||||
|
||||
const filteredCategories = computed(() => {
|
||||
return categories.value.map(category => ({
|
||||
@@ -66,7 +66,7 @@ const filteredCategories = computed(() => {
|
||||
|
||||
<template>
|
||||
<UDashboardSlideover v-model="isHelpSlideoverOpen">
|
||||
<!-- <template #title>
|
||||
<template #title>
|
||||
<UButton
|
||||
v-if="shortcuts"
|
||||
color="gray"
|
||||
@@ -102,6 +102,6 @@ const filteredCategories = computed(() => {
|
||||
</div>
|
||||
<div v-else class="flex flex-col gap-y-3">
|
||||
<UButton v-for="(link, index) in links" :key="index" color="white" v-bind="link" />
|
||||
</div>-->
|
||||
</div>
|
||||
</UDashboardSlideover>
|
||||
</template>
|
||||
@@ -5,7 +5,6 @@ const supabase = useSupabaseClient()
|
||||
//const tenant = ref(dataStore.currentTenant)
|
||||
|
||||
const selectedProfile = ref(dataStore.activeProfile.id)
|
||||
console.log(dataStore.ownProfiles)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -9,6 +9,7 @@ const _useDashboard = () => {
|
||||
defineShortcuts({
|
||||
'g-h': () => router.push('/'),
|
||||
'g-a': () => router.push('/tasks'),
|
||||
'g-s': () => router.push('/settings'),
|
||||
'?': () => isHelpSlideoverOpen.value = !isHelpSlideoverOpen.value,
|
||||
n: () => isNotificationsSlideoverOpen.value = !isNotificationsSlideoverOpen.value
|
||||
})
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<script setup>
|
||||
|
||||
import TenantDropdown from "~/components/ProfileDropdown.vue";
|
||||
|
||||
const dataStore = useDataStore()
|
||||
const colorMode = useColorMode()
|
||||
@@ -12,7 +11,7 @@ const route = useRoute()
|
||||
dataStore.initializeData((await supabase.auth.getUser()).data.user.id)
|
||||
|
||||
|
||||
const isLight = computed({
|
||||
/*const isLight = computed({
|
||||
get() {
|
||||
return colorMode.value !== 'dark'
|
||||
},
|
||||
@@ -115,12 +114,12 @@ const navLinks = [
|
||||
icon: "i-heroicons-envelope"
|
||||
},
|
||||
]
|
||||
},/*
|
||||
},/!*
|
||||
{
|
||||
label: "Chat",
|
||||
to: "/chat",
|
||||
icon:'i-heroicons-chat-bubble-left-right'
|
||||
},*/
|
||||
},*!/
|
||||
{
|
||||
label: "Mitarbeiter",
|
||||
icon: 'i-heroicons-user',
|
||||
@@ -172,7 +171,7 @@ const navLinks = [
|
||||
},
|
||||
]
|
||||
},
|
||||
]
|
||||
]*/
|
||||
|
||||
//const activeFeatures = dataStore.tenants.find(dataStore.currentTenant).features
|
||||
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
<script setup>
|
||||
|
||||
const dataStore = useDataStore()
|
||||
const supabase = useSupabaseClient()
|
||||
|
||||
const features = ref(dataStore.ownTenant.features)
|
||||
|
||||
const updateTenant = async () => {
|
||||
const {data,error} = await supabase.from("tenants")
|
||||
.update({features: features.value})
|
||||
.eq("id",dataStore.currentTenant)
|
||||
.select()
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -13,6 +25,8 @@
|
||||
label: 'Rechnung & Kontakt'
|
||||
},{
|
||||
label: 'Lizenz'
|
||||
},{
|
||||
label: 'Funktionen'
|
||||
},{
|
||||
label: 'Bankkonten'
|
||||
},{
|
||||
@@ -25,6 +39,45 @@
|
||||
<div v-if="item.label === 'Rechnung & Kontakt'">
|
||||
|
||||
</div>
|
||||
<div v-else-if="item.label === 'Funktionen'">
|
||||
<UAlert
|
||||
title="Funktionen ausblenden"
|
||||
description="Nur Funktionen mit gesetztem Haken sind im Unternehmen verfügbar. Diese Einstellungen gelten für alle Mitarbeiter und sind unabhängig von Berechtigungen."
|
||||
color="rose"
|
||||
variant="outline"
|
||||
class="mb-5"
|
||||
/>
|
||||
<UCheckbox
|
||||
label="Kalendar"
|
||||
v-model="features.calendar"
|
||||
@change="updateTenant"
|
||||
/>
|
||||
<UCheckbox
|
||||
label="Plantafel"
|
||||
v-model="features.planningBoard"
|
||||
@change="updateTenant"
|
||||
/>
|
||||
<UCheckbox
|
||||
label="Zeiterfassung"
|
||||
v-model="features.timeTracking"
|
||||
@change="updateTenant"
|
||||
/>
|
||||
<UCheckbox
|
||||
label="Anwesenheiten"
|
||||
v-model="features.workingTimeTracking"
|
||||
@change="updateTenant"
|
||||
/>
|
||||
<UCheckbox
|
||||
label="Verträge"
|
||||
v-model="features.contracts"
|
||||
@change="updateTenant"
|
||||
/>
|
||||
<UCheckbox
|
||||
label="Fahrzeuge"
|
||||
v-model="features.vehicles"
|
||||
@change="updateTenant"
|
||||
/>
|
||||
</div>
|
||||
</UCard>
|
||||
</template>
|
||||
</UTabs>
|
||||
|
||||
@@ -570,8 +570,8 @@ export const useDataStore = defineStore('data', () => {
|
||||
async function fetchOwnProfiles () {
|
||||
let profiles = (await supabase.from("profiles").select().order("fullName")).data
|
||||
let conns = (await supabase.from("profileconnections").select()).data.map(i => i.profile_id)
|
||||
console.log(conns)
|
||||
console.log(profiles.filter(i => conns.includes(i.id)))
|
||||
//console.log(conns)
|
||||
//console.log(profiles.filter(i => conns.includes(i.id)))
|
||||
ownProfiles.value = profiles.filter(i => conns.includes(i.id))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user