MelissaPaciente: addFinancial navega pra Financeiro + novo botao Agendar
- addFinancial(): antes so abria o dialog inline. Agora primeiro navega pra activeTab='financ' (da contexto visual), fecha drawer mobile e entao abre o dialog. User ve a aba Financeiro atualizar imediatamente apos salvar. - goAgendar() novo: navega pra activeTab='agenda', fecha drawer mobile. Sem dialog — a aba Agenda ja tem KPIs + lista por mes + acoes inline (realizada/falta/cancelar). Pra criar nova sessao o user usa MelissaAgenda direto (fora do prontuario). - Botao "Agendar" novo na sidebar Acoes Rapidas, abaixo de "Lancamento", com icon pi-calendar-plus verde #10b981. ESLint: 0 errors. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -404,6 +404,9 @@ function addFinancial() {
|
|||||||
toast.add({ severity: 'warn', summary: 'Paciente sem ID', life: 2500 });
|
toast.add({ severity: 'warn', summary: 'Paciente sem ID', life: 2500 });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// Navega pra aba Financeiro pra dar contexto antes do dialog abrir.
|
||||||
|
activeTab.value = 'financ';
|
||||||
|
if (isMobile.value) drawerOpen.value = false;
|
||||||
novoLancForm.value = {
|
novoLancForm.value = {
|
||||||
description: '',
|
description: '',
|
||||||
amount: null,
|
amount: null,
|
||||||
@@ -412,6 +415,14 @@ function addFinancial() {
|
|||||||
};
|
};
|
||||||
novoLancOpen.value = true;
|
novoLancOpen.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Atalho: navega pra aba Agenda (mesma logica do "Lancamento" so que sem
|
||||||
|
// dialog — a aba Agenda ja mostra todas as sessoes com acoes de marcar
|
||||||
|
// realizada/falta/cancelar inline).
|
||||||
|
function goAgendar() {
|
||||||
|
activeTab.value = 'agenda';
|
||||||
|
if (isMobile.value) drawerOpen.value = false;
|
||||||
|
}
|
||||||
async function salvarLancamento() {
|
async function salvarLancamento() {
|
||||||
const f = novoLancForm.value;
|
const f = novoLancForm.value;
|
||||||
if (!f.amount || Number(f.amount) <= 0) {
|
if (!f.amount || Number(f.amount) <= 0) {
|
||||||
@@ -592,6 +603,10 @@ onBeforeUnmount(() => {
|
|||||||
<i class="pi pi-plus" :style="{ color: '#f59e0b' }" />
|
<i class="pi pi-plus" :style="{ color: '#f59e0b' }" />
|
||||||
<span>Lançamento</span>
|
<span>Lançamento</span>
|
||||||
</button>
|
</button>
|
||||||
|
<button type="button" class="mpa-quick-btn" @click="goAgendar">
|
||||||
|
<i class="pi pi-calendar-plus" :style="{ color: '#10b981' }" />
|
||||||
|
<span>Agendar</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user