Copyright, Financeiro, Lançamentos, aprimoramentos de ui
This commit is contained in:
@@ -1,4 +1,20 @@
|
||||
<!-- src/layout/AppRailSidebar.vue — Drawer mobile para Layout Rail -->
|
||||
<!--
|
||||
|--------------------------------------------------------------------------
|
||||
| Agência PSI
|
||||
|--------------------------------------------------------------------------
|
||||
| Criado e desenvolvido por Leonardo Nohama
|
||||
|
|
||||
| Tecnologia aplicada à escuta.
|
||||
| Estrutura para o cuidado.
|
||||
|
|
||||
| Arquivo: src/layout/AppRailSidebar.vue
|
||||
| Data: 2026
|
||||
| Local: São Carlos/SP — Brasil
|
||||
|--------------------------------------------------------------------------
|
||||
| © 2026 — Todos os direitos reservados
|
||||
|--------------------------------------------------------------------------
|
||||
-->
|
||||
<!-- Drawer mobile para Layout Rail -->
|
||||
<script setup>
|
||||
import { computed, ref, watch, nextTick } from 'vue'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
@@ -8,6 +24,9 @@ import { useLayout } from './composables/layout'
|
||||
import { useEntitlementsStore } from '@/stores/entitlementsStore'
|
||||
import { useMenuBadges } from '@/composables/useMenuBadges'
|
||||
|
||||
import PatientCreatePopover from '@/components/ui/PatientCreatePopover.vue'
|
||||
import ComponentCadastroRapido from '@/components/ComponentCadastroRapido.vue'
|
||||
|
||||
const menuStore = useMenuStore()
|
||||
const { layoutState, hideMobileMenu } = useLayout()
|
||||
const entitlements = useEntitlementsStore()
|
||||
@@ -244,6 +263,15 @@ function navigate (item) {
|
||||
|
||||
// Fecha ao navegar
|
||||
watch(() => route.path, () => hideMobileMenu())
|
||||
|
||||
// ── QuickCreate (Pacientes) ───────────────────────────────
|
||||
const createPopover = ref(null)
|
||||
const quickDialog = ref(false)
|
||||
|
||||
function openQuickCreate (event, item) {
|
||||
createPopover.value?.toggle(event)
|
||||
}
|
||||
function onQuickCreate () { quickDialog.value = true }
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -404,24 +432,51 @@ watch(() => route.path, () => hideMobileMenu())
|
||||
</template>
|
||||
|
||||
<!-- Item folha -->
|
||||
<button
|
||||
v-else
|
||||
class="rs__item"
|
||||
:class="{
|
||||
'rs__item--active': isActive(item),
|
||||
'rs__item--locked': isLocked(item)
|
||||
}"
|
||||
@click="navigate(item)"
|
||||
>
|
||||
<i v-if="item.icon" :class="item.icon" class="rs__item-icon" />
|
||||
<span>{{ item.label }}</span>
|
||||
<span v-if="isLocked(item)" class="rs__pro">PRO</span>
|
||||
<span v-if="menuBadgeLabel(item)" class="rs__badge">{{ menuBadgeLabel(item) }}</span>
|
||||
</button>
|
||||
<div v-else class="flex items-center gap-1">
|
||||
<button
|
||||
class="rs__item flex-1"
|
||||
:class="{
|
||||
'rs__item--active': isActive(item),
|
||||
'rs__item--locked': isLocked(item)
|
||||
}"
|
||||
@click="navigate(item)"
|
||||
>
|
||||
<i v-if="item.icon" :class="item.icon" class="rs__item-icon" />
|
||||
<span>{{ item.label }}</span>
|
||||
<span v-if="isLocked(item)" class="rs__pro">PRO</span>
|
||||
<span v-if="menuBadgeLabel(item)" class="rs__badge">{{ menuBadgeLabel(item) }}</span>
|
||||
</button>
|
||||
<button
|
||||
v-if="item.quickCreate"
|
||||
class="rs__quick-add"
|
||||
@click.stop="openQuickCreate($event, item)"
|
||||
title="Novo paciente"
|
||||
>
|
||||
<i class="pi pi-plus" />
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
</nav>
|
||||
|
||||
<!-- PatientCreatePopover (shared) -->
|
||||
<PatientCreatePopover
|
||||
ref="createPopover"
|
||||
@quick-create="onQuickCreate"
|
||||
/>
|
||||
|
||||
<!-- Cadastro Rápido Dialog -->
|
||||
<ComponentCadastroRapido
|
||||
v-model="quickDialog"
|
||||
title="Cadastro Rápido"
|
||||
table-name="patients"
|
||||
name-field="nome_completo"
|
||||
email-field="email_principal"
|
||||
phone-field="telefone"
|
||||
:extra-payload="{ status: 'Ativo' }"
|
||||
@created="quickDialog = false"
|
||||
/>
|
||||
</aside>
|
||||
</Transition>
|
||||
</template>
|
||||
@@ -693,6 +748,24 @@ watch(() => route.path, () => hideMobileMenu())
|
||||
color: #fff;
|
||||
line-height: 1;
|
||||
}
|
||||
.rs__quick-add {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
flex-shrink: 0;
|
||||
border-radius: 6px;
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: var(--text-color-secondary);
|
||||
cursor: pointer;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
font-size: 0.7rem;
|
||||
transition: background 0.13s, color 0.13s;
|
||||
}
|
||||
.rs__quick-add:hover {
|
||||
background: var(--surface-ground);
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
/* ── Slide-in da esquerda ────────────────────────────────── */
|
||||
.rs-slide-enter-active,
|
||||
|
||||
Reference in New Issue
Block a user