Files
agenciapsilmno/src/router/routes.therapist.js
T
Leonardo 86311ef305 Melissa: hub Configuracoes + Embed + 9 Pages novas + dialog blueprint dark
Sprints 04-29 + 04-30 acumuladas.

- MelissaConfiguracoes: hub 2-col com 6 grupos (Layout/Conta/Agenda/
  Financeiro/WhatsApp/Sistema), tudo embedado via MelissaEmbed.
- MelissaEmbed: wrapper generico que injeta layout-variant=melissa
  e remove cromos pra reaproveitar Pages tradicionais.
- 9 Melissa Pages novas: CadastrosRecebidos, Compromissos, Configuracoes,
  Conversas, Embed, Grupos, Medicos, Recorrencias, Tags.
- Dialog blueprint atualizado: bg-gray-100 (hardcoded light) ->
  bg-[var(--surface-ground)] (tema-aware). 22 dialogs migrados em
  9 arquivos. Anti-pattern documentado.
- PatientsCadastroPage: bug fix dropdown Grupo (optionLabel nome->name),
  toggle vertical/abas com persist localStorage, sticky margin-top.
- Surface picker no popover do MelissaLayout (8 swatches).
- useTopbarPlanMenu, useMelissaWhatsapp, useMelissaPacientesAside novos.
- Migration: status agenda remarcado/confirmado.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 11:41:19 -03:00

227 lines
8.7 KiB
JavaScript

/*
|--------------------------------------------------------------------------
| Agência PSI
|--------------------------------------------------------------------------
| Criado e desenvolvido por Leonardo Nohama
|
| Tecnologia aplicada à escuta.
| Estrutura para o cuidado.
|
| Arquivo: src/router/routes.therapist.js
| Data: 2026
| Local: São Carlos/SP — Brasil
|--------------------------------------------------------------------------
| © 2026 — Todos os direitos reservados
|--------------------------------------------------------------------------
*/
import RouterPassthrough from '@/layout/RouterPassthrough.vue';
// ── Rotas fullscreen — ficam fora do AppLayout compartilhado ──────────────
export const therapistStandalone = [
{
path: '/therapist/setup',
name: 'therapist.setup',
component: () => import('@/features/setup/SetupWizardPage.vue'),
meta: { area: 'therapist', requiresAuth: true, roles: ['therapist'], fullscreen: true }
}
];
// ── Rotas de app — serão filhas do AppLayout compartilhado no index.js ────
export default {
path: 'therapist',
component: RouterPassthrough,
meta: { area: 'therapist', requiresAuth: true, roles: ['therapist'] },
children: [
// ======================================================
// 📊 DASHBOARD
// ======================================================
{ path: '', name: 'therapist.dashboard', component: () => import('@/views/pages/therapist/TherapistDashboard.vue') },
// ======================================================
// 💬 CONVERSAS (CRM de WhatsApp)
// ======================================================
// Redirect pro layout Melissa (versão oficial). A `CRMConversasPage`
// antiga continua no repo (sem rota apontando) até validarmos a versão
// Melissa por algumas semanas; depois pode ser removida.
{
path: 'conversas',
name: 'therapist-conversas',
redirect: { name: 'Melissa', params: { secao: 'conversas' } }
},
// ======================================================
// 📅 AGENDA
// ======================================================
{
path: 'agenda',
name: 'therapist-agenda',
component: () => import('@/features/agenda/pages/AgendaTerapeutaPage.vue'),
meta: { feature: 'agenda.view' }
},
// Recorrências
{
path: 'agenda/recorrencias',
name: 'therapist-agenda-recorrencias',
component: () => import('@/features/agenda/pages/AgendaRecorrenciasPage.vue'),
meta: { feature: 'agenda.view', mode: 'therapist' }
},
// ✅ Compromissos determinísticos
{
path: 'agenda/compromissos',
name: 'therapist-agenda-compromissos',
component: () => import('@/features/agenda/pages/CompromissosDeterminados.vue'),
meta: {
feature: 'agenda.view',
roles: ['therapist']
}
},
// ======================================================
// 💳 MEU PLANO
// ======================================================
{
path: 'meu-plano',
name: 'therapist-meu-plano',
component: () => import('@/views/pages/billing/TherapistMeuPlanoPage.vue')
},
{
path: 'upgrade',
name: 'therapist-upgrade',
component: () => import('@/views/pages/billing/TherapistUpgradePage.vue')
},
// ======================================================
// 👥 PATIENTS
// ======================================================
{
path: 'patients',
name: 'therapist-patients',
component: () => import('@/features/patients/PatientsListPage.vue')
},
{
path: 'patients/cadastro',
name: 'therapist-patients-create',
component: () => import('@/features/patients/cadastro/PatientsCadastroPage.vue')
},
{
path: 'patients/cadastro/:id',
name: 'therapist-patients-edit',
component: () => import('@/features/patients/cadastro/PatientsCadastroPage.vue'),
props: true
},
{
path: 'patients/grupos',
name: 'therapist-patients-groups',
component: () => import('@/features/patients/grupos/GruposPacientesPage.vue')
},
{
path: 'patients/tags',
name: 'therapist-patients-tags',
component: () => import('@/features/patients/tags/TagsPage.vue')
},
{
path: 'patients/medicos',
name: 'therapist-patients-medicos',
component: () => import('@/features/patients/medicos/MedicosPage.vue')
},
{
path: 'patients/link-externo',
name: 'therapist-patients-link-externo',
component: () => import('@/features/patients/cadastro/PatientsExternalLinkPage.vue')
},
{
path: 'patients/cadastro/recebidos',
name: 'therapist-patients-recebidos',
component: () => import('@/features/patients/cadastro/recebidos/CadastrosRecebidosPage.vue')
},
// ======================================================
// 📄 DOCUMENTOS
// ======================================================
{
path: 'documents',
name: 'therapist-documents',
component: () => import('@/features/documents/DocumentsListPage.vue'),
meta: { feature: 'documents.upload' }
},
{
path: 'documents/templates',
name: 'therapist-documents-templates',
component: () => import('@/features/documents/DocumentTemplatesPage.vue'),
meta: { feature: 'documents.templates' }
},
{
path: 'patients/:id/documents',
name: 'therapist-patient-documents',
component: () => import('@/features/documents/DocumentsListPage.vue'),
props: true,
meta: { feature: 'documents.upload' }
},
// ======================================================
// 🔒 PRO — Online Scheduling
// ======================================================
{
path: 'online-scheduling',
name: 'therapist-online-scheduling',
component: () => import('@/views/pages/therapist/OnlineSchedulingPage.vue'),
meta: { feature: 'online_scheduling.manage' }
},
// ======================================================
// 🔒 PRO — Agendamentos Recebidos
// ======================================================
{
path: 'agendamentos-recebidos',
name: 'therapist-agendamentos-recebidos',
component: () => import('@/features/agenda/pages/AgendamentosRecebidosPage.vue'),
meta: { feature: 'online_scheduling.manage' }
},
// ======================================================
// 💰 FINANCEIRO
// ======================================================
{
path: 'financeiro',
name: 'therapist-financeiro',
component: () => import('@/features/financeiro/pages/FinanceiroDashboardPage.vue')
},
{
path: 'financeiro/lancamentos',
name: 'therapist-financeiro-lancamentos',
component: () => import('@/features/financeiro/pages/FinanceiroPage.vue')
},
// ======================================================
// 📈 RELATÓRIOS
// ======================================================
{
path: 'relatorios',
name: 'therapist-relatorios',
component: () => import('@/views/pages/therapist/RelatoriosPage.vue'),
meta: { feature: 'agenda.view' }
},
// ======================================================
// 🔔 NOTIFICAÇÕES
// ======================================================
{
path: 'notificacoes',
name: 'therapist-notificacoes',
component: () => import('@/views/pages/therapist/NotificationsHistoryPage.vue')
},
// ======================================================
// 🔐 SECURITY
// ======================================================
{
path: 'settings/security',
name: 'therapist-settings-security',
component: () => import('@/views/pages/auth/SecurityPage.vue')
}
]
};