develop #83

Merged
M-Gabrielly merged 426 commits from develop into main 2025-12-04 04:13:15 +00:00
Showing only changes of commit fda4e5651a - Show all commits

View File

@ -990,7 +990,7 @@ export default function ResultadosClient() {
{/* Ações */}
<div className="flex gap-2 pt-2">
<Button
className="flex-1 h-10 rounded-full bg-primary text-primary-foreground hover:bg-primary/90"
className="w-full h-10 rounded-full bg-primary text-primary-foreground hover:bg-primary/90"
onClick={async () => {
setMoreTimesForDoctor(id)
void fetchSlotsForDate(id, moreTimesDate)
@ -998,16 +998,6 @@ export default function ResultadosClient() {
>
Agendar
</Button>
<Button
variant="outline"
className="flex-1 h-10 rounded-full border-primary/40 text-primary hover:bg-primary/10"
onClick={() => {
setMoreTimesForDoctor(id)
void fetchSlotsForDate(id, moreTimesDate)
}}
>
Mais horários
</Button>
</div>
</Card>
)
@ -1175,8 +1165,17 @@ export default function ResultadosClient() {
</DialogHeader>
<div className="flex items-center gap-2 mb-4">
<input type="date" className="flex-1 rounded-md border border-border px-3 py-2 text-sm" value={moreTimesDate} onChange={(e) => setMoreTimesDate(e.target.value)} />
<Button className="h-10" onClick={async () => { if (moreTimesForDoctor) await fetchSlotsForDate(moreTimesForDoctor, moreTimesDate) }}>Buscar horários</Button>
<input
type="date"
className="flex-1 rounded-md border border-border px-3 py-2 text-sm"
value={moreTimesDate}
onChange={(e) => {
setMoreTimesDate(e.target.value)
if (moreTimesForDoctor) {
void fetchSlotsForDate(moreTimesForDoctor, e.target.value)
}
}}
/>
</div>
<div className="mt-2">
@ -1185,13 +1184,15 @@ export default function ResultadosClient() {
) : moreTimesException ? (
<div className="text-sm text-red-500">{moreTimesException}</div>
) : (moreTimesSlots.length ? (
<div className="max-h-[60vh] overflow-y-auto pr-2">
<div className="grid grid-cols-3 gap-2">
{moreTimesSlots.map(s => (
<button key={s.iso} type="button" className="rounded-lg bg-primary/10 px-3 py-2 text-sm text-primary hover:bg-primary hover:text-primary-foreground" onClick={() => { if (moreTimesForDoctor) { openConfirmDialog(moreTimesForDoctor, s.iso); setMoreTimesForDoctor(null); } }}>
<button key={s.iso} type="button" className="rounded-lg bg-primary/10 px-3 py-2 text-sm text-primary hover:bg-primary hover:text-primary-foreground transition-colors" onClick={() => { if (moreTimesForDoctor) { openConfirmDialog(moreTimesForDoctor, s.iso); setMoreTimesForDoctor(null); } }}>
{s.label}
</button>
))}
</div>
</div>
) : (
<div className="text-sm text-muted-foreground">Sem horários para a data selecionada.</div>
))}