Leonardo 2dae4a11ae roadmap #11: recently viewed (ultimos 5 pacientes acessados)
ROADMAP item #1.3 #11. localStorage por user_id pra isolar sessoes
diferentes no mesmo browser. ROADMAP sugeria localStorage OU tabela
user_recent_access — escolhi localStorage por simplicidade (sem
migration adicional + zero round-trip por visita).

composables/useRecentPatients.js:
- useRecentPatients() — composable reativo Tipo A: items + hasItems
  + addVisit + remove + clear + refresh
- registerPatientVisit(patient) — helper stateless pra usar fora
  de setup (ex: navigation guards, action handlers)
- Sincroniza entre instancias na mesma aba via CustomEvent + 'storage'
- Max 5 items. Dedup por id, novo no topo.

Wire-up de visita (registra ao carregar prontuario):
- MelissaPaciente.vue: registerPatientVisit no loadAll apos detail.load
- PatientProntuario.vue: registerPatientVisit em loadDetail apos p resolved

Wire-up de visualizacao (mostra quando query vazia):
- GlobalSearch.vue: grupo "Acessados recentemente" antes dos Atalhos.
  goTo("recent") navega pra /therapist/patients/:id.
- MelissaBusca.vue: grupo "Acessados recentemente". emit('paciente')
  reusando a logica do MelissaLayout que ja navega pra
  /melissa/paciente?id=X.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 05:17:51 -03:00
2024-07-29 10:14:47 +03:00
2024-07-25 16:41:34 +03:00
2026-02-18 22:36:45 -03:00
2026-03-06 06:37:13 -03:00
2024-07-29 10:14:47 +03:00
2024-07-25 16:41:34 +03:00
2026-02-18 22:36:45 -03:00
2026-03-06 06:37:13 -03:00
2024-07-25 16:41:34 +03:00
2022-12-28 14:04:39 +03:00
2024-08-03 11:36:25 +03:00
2026-03-12 08:58:36 -03:00
2024-03-18 10:33:41 +03:00

Sakai is an application template for Vue based on the create-vue, the recommended way to start a Vite-powered Vue projects.

Visit the documentation to get started.

S
Description
No description provided
Readme 56 MiB
Languages
Vue 61.3%
PLpgSQL 17.4%
JavaScript 16%
HTML 2.7%
TypeScript 2.3%
Other 0.3%