big refactor

This commit is contained in:
2026-04-29 16:25:11 -05:00
parent 6c411ce2b6
commit 8265fb689a
156 changed files with 15845 additions and 50373 deletions

View File

@@ -1,8 +1,55 @@
<script setup lang="ts">
usePageTitle('Settings')
const { isSuperAdmin } = useSuperAdmin()
const sidebarFeatures = useSidebarFeatures()
const isSuperAdmin = computed(() => {
if (import.meta.client) {
const stored = localStorage.getItem('policy-ui.superadmin')
return stored !== '0'
}
return true
})
const sidebarFeatures = reactive({
showWorkstations: computed({
get: () => {
if (import.meta.client) {
return localStorage.getItem('policy-ui.sidebar.workstations') !== 'false'
}
return true
},
set: (value: boolean) => {
if (import.meta.client) {
localStorage.setItem('policy-ui.sidebar.workstations', String(value))
}
}
}),
showAiTools: computed({
get: () => {
if (import.meta.client) {
return localStorage.getItem('policy-ui.sidebar.ai-tools') !== 'false'
}
return true
},
set: (value: boolean) => {
if (import.meta.client) {
localStorage.setItem('policy-ui.sidebar.ai-tools', String(value))
}
}
}),
showLeadsHub: computed({
get: () => {
if (import.meta.client) {
return localStorage.getItem('policy-ui.sidebar.leads-hub') !== 'false'
}
return true
},
set: (value: boolean) => {
if (import.meta.client) {
localStorage.setItem('policy-ui.sidebar.leads-hub', String(value))
}
}
})
})
const cards = computed(() => {
const base: { to: string; title: string; description: string; icon: string }[] = []