Agenda, Agendador, Configurações

This commit is contained in:
Leonardo
2026-03-12 08:58:36 -03:00
parent f733db8436
commit f4b185ae17
197 changed files with 33405 additions and 6507 deletions
+3 -7
View File
@@ -9,12 +9,12 @@ import therapistMenu from './menus/therapist.menu'
import supervisorMenu from './menus/supervisor.menu'
import editorMenu from './menus/editor.menu'
import portalMenu from './menus/portal.menu'
import sakaiDemoMenu from './menus/sakai.demo.menu'
import saasMenu from './menus/saas.menu'
import { useSaasHealthStore } from '@/stores/saasHealthStore'
import { useTenantFeaturesStore } from '@/stores/tenantFeaturesStore'
import { useEntitlementsStore } from '@/stores/entitlementsStore'
import { countAtencao } from '@/composables/useDocsHealth'
// ======================================================
// 🎭 Mapeamento de role → menu base
@@ -225,17 +225,13 @@ export function getMenuByRole (role, sessionCtx = {}) {
const base = decorateMenu(baseRaw, hasFeature)
const saasRaw = typeof saasMenu === 'function'
? saasMenu(ctx, { mismatchCount })
? saasMenu(ctx, { mismatchCount, docsAtencaoCount: countAtencao.value })
: saasMenu
const saas = decorateMenu(saasRaw, hasFeature)
// 🔒 SaaS master: somente área SaaS
if (isSaas) {
const out = [
...(saas.length ? saas : coreMenu()),
...(import.meta.env.DEV ? [{ separator: true }, ...sakaiDemoMenu] : [])
]
return out
return saas.length ? saas : coreMenu()
}
// ✅ fallback: nunca retorna vazio
+7
View File
@@ -73,6 +73,13 @@ export default function adminMenu (ctx = {}) {
to: { name: 'admin-online-scheduling' },
feature: 'online_scheduling.manage',
proBadge: true
},
{
label: 'Agendamentos Recebidos',
icon: 'pi pi-fw pi-inbox',
to: { name: 'admin-agendamentos-recebidos' },
feature: 'online_scheduling.manage',
proBadge: true
}
]
}
+25 -2
View File
@@ -3,12 +3,17 @@
export default function saasMenu (sessionCtx, opts = {}) {
if (!sessionCtx?.isSaasAdmin) return []
const mismatchCount = Number(opts?.mismatchCount || 0)
const mismatchCount = Number(opts?.mismatchCount || 0)
const docsAtencaoCount = Number(opts?.docsAtencaoCount || 0)
const mismatchBadge = mismatchCount > 0
? { badge: String(mismatchCount), badgeClass: 'p-badge p-badge-danger' }
: {}
const docsBadge = docsAtencaoCount > 0
? { badge: String(docsAtencaoCount), badgeClass: 'p-badge p-badge-danger' }
: {}
return [
{
label: 'SaaS',
@@ -47,7 +52,25 @@ export default function saasMenu (sessionCtx, opts = {}) {
]
},
{ label: 'Clínicas (Tenants)', icon: 'pi pi-users', to: '/saas/tenants' }
{ label: 'Clínicas (Tenants)', icon: 'pi pi-users', to: '/saas/tenants' },
{ label: 'Feriados', icon: 'pi pi-star', to: '/saas/feriados' },
{ label: 'Suporte Técnico', icon: 'pi pi-headphones', to: '/saas/support' },
{
label: 'Conteúdo',
icon: 'pi pi-book',
path: '/saas/content',
...(docsAtencaoCount > 0 ? { badge: String(docsAtencaoCount), badgeClass: 'p-badge p-badge-danger' } : {}),
items: [
{
label: 'Documentação',
icon: 'pi pi-question-circle',
to: '/saas/docs',
...docsBadge
},
{ label: 'FAQ', icon: 'pi pi-comments', to: '/saas/faq' }
]
}
]
}
]
-59
View File
@@ -1,59 +0,0 @@
export default [
{
label: 'UI Components',
path: '/uikit',
items: [
{ label: 'Form Layout', icon: 'pi pi-fw pi-id-card', to: '/demo/uikit/formlayout' },
{ label: 'Input', icon: 'pi pi-fw pi-check-square', to: '/demo/uikit/input' },
{ label: 'Button', icon: 'pi pi-fw pi-mobile', to: '/demo/uikit/button', class: 'rotated-icon' },
{ label: 'Table', icon: 'pi pi-fw pi-table', to: '/demo/uikit/table' },
{ label: 'List', icon: 'pi pi-fw pi-list', to: '/demo/uikit/list' },
{ label: 'Tree', icon: 'pi pi-fw pi-share-alt', to: '/demo/uikit/tree' },
{ label: 'Panel', icon: 'pi pi-fw pi-tablet', to: '/demo/uikit/panel' },
{ label: 'Overlay', icon: 'pi pi-fw pi-clone', to: '/demo/uikit/overlay' },
{ label: 'Media', icon: 'pi pi-fw pi-image', to: '/demo/uikit/media' },
{ label: 'Menu', icon: 'pi pi-fw pi-bars', to: '/demo/uikit/menu' },
{ label: 'Message', icon: 'pi pi-fw pi-comment', to: '/demo/uikit/message' },
{ label: 'File', icon: 'pi pi-fw pi-file', to: '/demo/uikit/file' },
{ label: 'Chart', icon: 'pi pi-fw pi-chart-bar', to: '/demo/uikit/charts' },
{ label: 'Timeline', icon: 'pi pi-fw pi-calendar', to: '/demo/uikit/timeline' },
{ label: 'Misc', icon: 'pi pi-fw pi-circle', to: '/demo/uikit/misc' }
]
},
{
label: 'Prime Blocks',
icon: 'pi pi-fw pi-prime',
path: '/blocks',
items: [
{ label: 'All Blocks', icon: 'pi pi-fw pi-globe', url: 'https://blocks.primevue.org/', target: '_blank' }
]
},
{
label: 'Pages',
icon: 'pi pi-fw pi-briefcase',
path: '/pages',
items: [
{ label: 'Landing', icon: 'pi pi-fw pi-globe', to: '/landing' },
{
label: 'Auth',
icon: 'pi pi-fw pi-user',
path: '/auth',
items: [
{ label: 'Login', icon: 'pi pi-fw pi-sign-in', to: '/auth/login' },
{ label: 'Error', icon: 'pi pi-fw pi-times-circle', to: '/auth/error' },
{ label: 'Access Denied', icon: 'pi pi-fw pi-lock', to: '/auth/access' }
]
},
{ label: 'Not Found', icon: 'pi pi-fw pi-exclamation-circle', to: '/pages/notfound' },
{ label: 'Empty', icon: 'pi pi-fw pi-circle-off', to: '/pages/empty' }
]
},
{
label: 'Get Started',
path: '/start',
items: [
{ label: 'Documentation', icon: 'pi pi-fw pi-book', url: 'https://sakai.primevue.org/documentation', target: '_blank' },
{ label: 'View Source', icon: 'pi pi-fw pi-github', url: 'https://github.com/primefaces/sakai-vue', target: '_blank' }
]
}
]
+13 -1
View File
@@ -37,9 +37,21 @@ export default [
label: 'Online Scheduling',
icon: 'pi pi-fw pi-globe',
to: '/therapist/online-scheduling',
feature: 'online_scheduling',
feature: 'online_scheduling.manage',
proBadge: true
},
{
label: 'Agendamentos Recebidos',
icon: 'pi pi-fw pi-inbox',
to: '/therapist/agendamentos-recebidos',
feature: 'online_scheduling.manage',
proBadge: true
},
// ======================================================
// 📈 RELATÓRIOS
// ======================================================
{ label: 'Relatórios', icon: 'pi pi-fw pi-chart-bar', to: '/therapist/relatorios', feature: 'agenda.view' },
// ======================================================
// 👤 ACCOUNT