fix-appoiments-save
This commit is contained in:
parent
383390ce8e
commit
82ac502553
@ -504,15 +504,9 @@ export default function LaudosEditorPage() {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Solicitante e Prazo */}
|
{/* Prazo */}
|
||||||
{pacienteSelecionado && (
|
{pacienteSelecionado && (
|
||||||
<div className="mt-3 sm:mt-4 grid grid-cols-1 sm:grid-cols-2 gap-2 sm:gap-3">
|
<div className="mt-3 sm:mt-4">
|
||||||
<div>
|
|
||||||
<Label htmlFor="solicitante" className="text-xs sm:text-sm">
|
|
||||||
Solicitante
|
|
||||||
</Label>
|
|
||||||
<Input id="solicitante" value={solicitanteNome} readOnly disabled className="text-xs sm:text-sm mt-1 h-8 sm:h-10" />
|
|
||||||
</div>
|
|
||||||
<div>
|
<div>
|
||||||
<Label htmlFor="prazoDate" className="text-xs sm:text-sm">
|
<Label htmlFor="prazoDate" className="text-xs sm:text-sm">
|
||||||
Prazo do Laudo
|
Prazo do Laudo
|
||||||
|
|||||||
@ -977,48 +977,13 @@ export default function ResultadosClient() {
|
|||||||
<span className="ml-auto text-sm font-semibold text-primary">{precoTipoConsulta}</span>
|
<span className="ml-auto text-sm font-semibold text-primary">{precoTipoConsulta}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Próximos horários */}
|
|
||||||
{!isLoadingAgenda && (
|
|
||||||
<div className="space-y-2">
|
|
||||||
<p className="text-xs font-semibold text-muted-foreground">Próximos horários disponíveis:</p>
|
|
||||||
{proximos3Horarios.length > 0 ? (
|
|
||||||
<div className="flex gap-2 flex-wrap">
|
|
||||||
{proximos3Horarios.map(slot => (
|
|
||||||
<button
|
|
||||||
key={slot.iso}
|
|
||||||
type="button"
|
|
||||||
className="px-3 py-1.5 text-xs font-medium rounded-lg bg-primary/10 text-primary hover:bg-primary hover:text-primary-foreground transition"
|
|
||||||
onClick={() => openConfirmDialog(id, slot.iso)}
|
|
||||||
>
|
|
||||||
{slot.label}
|
|
||||||
</button>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
<p className="text-xs text-muted-foreground">Carregando horários...</p>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* Ações */}
|
{/* Ações */}
|
||||||
<div className="flex gap-2 pt-2">
|
<div className="flex gap-2 pt-2">
|
||||||
<Button
|
<Button
|
||||||
className="flex-1 h-10 rounded-full bg-primary text-primary-foreground hover:bg-primary/90"
|
className="flex-1 h-10 rounded-full bg-primary text-primary-foreground hover:bg-primary/90"
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
if (!agendaByDoctor[id]) {
|
setMoreTimesForDoctor(id)
|
||||||
const nearest = await loadAgenda(id)
|
void fetchSlotsForDate(id, moreTimesDate)
|
||||||
if (nearest) {
|
|
||||||
openConfirmDialog(id, nearest.iso)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const nearest = nearestSlotByDoctor[id]
|
|
||||||
if (nearest) {
|
|
||||||
openConfirmDialog(id, nearest.iso)
|
|
||||||
} else {
|
|
||||||
setMoreTimesForDoctor(id)
|
|
||||||
void fetchSlotsForDate(id, moreTimesDate)
|
|
||||||
}
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Agendar
|
Agendar
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user