Copyright, Financeiro, Lançamentos, aprimoramentos de ui
This commit is contained in:
@@ -1,3 +1,19 @@
|
||||
<!--
|
||||
|--------------------------------------------------------------------------
|
||||
| Agência PSI
|
||||
|--------------------------------------------------------------------------
|
||||
| Criado e desenvolvido por Leonardo Nohama
|
||||
|
|
||||
| Tecnologia aplicada à escuta.
|
||||
| Estrutura para o cuidado.
|
||||
|
|
||||
| Arquivo: src/features/patients/prontuario/PatientProntuario.vue
|
||||
| Data: 2026
|
||||
| Local: São Carlos/SP — Brasil
|
||||
|--------------------------------------------------------------------------
|
||||
| © 2026 — Todos os direitos reservados
|
||||
|--------------------------------------------------------------------------
|
||||
-->
|
||||
<script setup>
|
||||
import { ref, computed, watch, nextTick, onMounted, onBeforeUnmount } from 'vue'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
@@ -26,7 +42,7 @@ const props = defineProps({
|
||||
patient: { type: Object, default: () => ({}) } // precisa ter id
|
||||
})
|
||||
|
||||
const emit = defineEmits(['update:modelValue', 'close'])
|
||||
const emit = defineEmits(['update:modelValue', 'close', 'edit'])
|
||||
|
||||
const model = computed({
|
||||
get: () => props.modelValue,
|
||||
@@ -481,17 +497,8 @@ function close() {
|
||||
function editPatient() {
|
||||
const id = patientData.value?.id
|
||||
if (!id) return
|
||||
|
||||
// Detecta área pelo path atual — mesmo padrão do PatientsCadastroPage
|
||||
const isTherapist = String(route.path || '').startsWith('/therapist')
|
||||
|
||||
close()
|
||||
|
||||
if (isTherapist) {
|
||||
router.push({ name: 'therapist-patients-edit', params: { id } })
|
||||
} else {
|
||||
router.push({ name: 'admin-pacientes-cadastro-edit', params: { id } })
|
||||
}
|
||||
emit('edit', String(id))
|
||||
}
|
||||
|
||||
// ---------------------------------------------
|
||||
@@ -578,7 +585,6 @@ Tags: ${(tags.value || []).map(t => t.name).filter(Boolean).join(', ') || '—'}
|
||||
pt:title:class="text-[0.95rem] font-bold text-[var(--text-color)] truncate"
|
||||
@hide="close"
|
||||
>
|
||||
<Toast />
|
||||
|
||||
<!-- ── CONTEÚDO ── -->
|
||||
<div class="bg-[var(--surface-ground,#f5f7fa)]">
|
||||
|
||||
Reference in New Issue
Block a user