Ajuste Layout, Dashboard Terapeuta, Timeline, Suporte técnico, Documentação e FAQ

This commit is contained in:
Leonardo
2026-03-15 19:46:06 -03:00
parent ee09b30987
commit f66f6f3fde
21 changed files with 24146 additions and 721 deletions
+11 -2
View File
@@ -27,11 +27,20 @@ function isLocked (item) {
try { return !entitlements.has(item.feature) } catch { return false }
}
function toPath (to) {
if (!to) return ''
if (typeof to === 'string') return to
try { return router.resolve(to).path || '' } catch { return '' }
}
function isActive (item) {
const active = String(layoutState.activePath || route.path || '')
if (!item.to) return false
const p = typeof item.to === 'string' ? item.to : ''
return active === p || active.startsWith(p + '/')
const p = toPath(item.to)
if (!p) return false
if (active === p) return true
const segments = p.split('/').filter(Boolean)
return segments.length >= 2 && active.startsWith(p + '/')
}
function navigate (item) {