refactor(principal): remove legenda global do AppShell

This commit is contained in:
EdilbertoC
2026-04-28 14:00:14 -03:00
parent 000abb39ac
commit 77079e173c
7 changed files with 770 additions and 915 deletions

View File

@@ -301,43 +301,43 @@ async function deletePatient(patientId) {
) : null}
<div className="overflow-x-auto rounded-lg border border-[#404040]">
<table className="w-full whitespace-nowrap text-left text-sm">
<table className="w-full min-w-full table-fixed text-left text-sm">
<thead className="bg-[#171717] text-xs font-semibold uppercase text-[#a3a3a3]">
<tr>
<th className="px-6 py-4">Nome</th>
<th className="px-6 py-4">Telefone</th>
<th className="px-6 py-4">Cidade</th>
<th className="px-6 py-4">Estado</th>
<th className="px-6 py-4">Ultimo atendimento</th>
<th className="px-6 py-4">Proximo atendimento</th>
<th className="px-6 py-4 text-right">Acoes</th>
<th className="w-[24%] px-6 py-4">Nome</th>
<th className="w-[14%] px-6 py-4">Telefone</th>
<th className="w-[12%] px-6 py-4">Cidade</th>
<th className="w-[8%] px-6 py-4">Estado</th>
<th className="w-[16%] px-6 py-4">Ultimo atendimento</th>
<th className="w-[18%] px-6 py-4">Proximo atendimento</th>
<th className="sticky right-0 w-[8.5rem] bg-[#171717] px-6 py-4 text-right">Acoes</th>
</tr>
</thead>
<tbody className="divide-y divide-[#404040] bg-[#262626]">
{paginatedPatients.length ? (
paginatedPatients.map((patient) => (
<tr className="transition hover:bg-[#303030]" key={patient.id}>
<td className="px-6 py-4">
<td className="px-6 py-4 align-top">
<button className="flex items-center gap-3 text-left" onClick={() => openDetail(patient)} type="button">
<span className="grid size-8 place-items-center rounded-full bg-[#333333] text-xs font-bold text-[#3b82f6]">
<span className="grid size-8 shrink-0 place-items-center rounded-full bg-[#333333] text-xs font-bold text-[#3b82f6]">
{patient.name.charAt(0)}
</span>
<span>
<span className="block font-medium text-[#e5e5e5] transition hover:text-[#3b82f6]">
<span className="min-w-0">
<span className="block whitespace-normal break-words font-medium text-[#e5e5e5] transition hover:text-[#3b82f6]">
{patient.name}
</span>
<span className="mt-0.5 block text-xs text-[#a3a3a3]">
<span className="mt-0.5 block whitespace-normal break-words text-xs text-[#a3a3a3]">
{patient.insurance || 'Sem convenio'} {patient.vip ? ' | VIP' : ''}
</span>
</span>
</button>
</td>
<td className="px-6 py-4 text-[#a3a3a3]">{patient.phone}</td>
<td className="px-6 py-4 text-[#a3a3a3]">{patient.city}</td>
<td className="px-6 py-4 text-[#a3a3a3]">{patient.state}</td>
<td className="px-6 py-4 text-[#a3a3a3]">{patient.lastVisit || 'Ainda nao houve atendimento'}</td>
<td className="px-6 py-4 text-[#a3a3a3]">{patient.nextVisit || 'Nenhum atendimento agendado'}</td>
<td className="relative px-6 py-4 text-right">
<td className="px-6 py-4 align-top whitespace-normal break-words text-[#a3a3a3]">{patient.phone}</td>
<td className="px-6 py-4 align-top whitespace-normal break-words text-[#a3a3a3]">{patient.city}</td>
<td className="px-6 py-4 align-top text-[#a3a3a3]">{patient.state}</td>
<td className="px-6 py-4 align-top whitespace-normal break-words text-[#a3a3a3]">{patient.lastVisit || 'Ainda nao houve atendimento'}</td>
<td className="px-6 py-4 align-top whitespace-normal break-words text-[#a3a3a3]">{patient.nextVisit || 'Nenhum atendimento agendado'}</td>
<td className="relative sticky right-0 bg-[#262626] px-6 py-4 text-right shadow-[-10px_0_12px_-12px_rgba(0,0,0,0.75)]">
<button
aria-label={`Acoes de ${patient.name}`}
className="rounded p-1 text-[#a3a3a3] transition hover:bg-[#333333] hover:text-[#e5e5e5]"
@@ -779,7 +779,7 @@ function PatientVisits({ navigate, patient }) {
<div className="grid gap-3">
{[
{ date: patient.nextVisit, status: 'Agendada', description: `Retorno para ${patient.condition}` },
{ date: patient.lastVisit, status: 'Finalizada', description: 'Consulta registrada no historico local.' },
{ date: patient.lastVisit, status: 'Finalizada', description: 'Consulta registrada no historico do paciente.' },
].map((visit) => (
<div className="rounded-xl border border-[#404040] bg-[#171717] p-4" key={`${visit.date}-${visit.status}`}>
<div className="flex flex-wrap items-start justify-between gap-3">
@@ -814,7 +814,7 @@ function PatientDocuments({ patient }) {
{patient.exams.map((exam) => (
<div className="rounded-xl border border-[#404040] bg-[#171717] p-4" key={exam}>
<p className="font-semibold text-[#f5f5f5]">{exam}</p>
<p className="mt-2 text-sm text-[#a3a3a3]">Pendente de revisão mockada.</p>
<p className="mt-2 text-sm text-[#a3a3a3]">Pendente de revisão.</p>
<span className="mt-4 inline-flex rounded bg-amber-500/20 px-2.5 py-1 text-xs font-bold text-amber-400">
A revisar
</span>
@@ -1276,4 +1276,4 @@ function maskCEPInput(event) {
.replace(/\D/g, '')
.replace(/(\d{5})(\d)/, '$1-$2')
.replace(/(-\d{3})\d+?$/, '$1')
}
}