forked from RiseUP/riseup-squad20
fix: changes-in-patients-appoiments
This commit is contained in:
parent
8df4239406
commit
fda4e5651a
@ -990,7 +990,7 @@ export default function ResultadosClient() {
|
|||||||
{/* 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="w-full h-10 rounded-full bg-primary text-primary-foreground hover:bg-primary/90"
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
setMoreTimesForDoctor(id)
|
setMoreTimesForDoctor(id)
|
||||||
void fetchSlotsForDate(id, moreTimesDate)
|
void fetchSlotsForDate(id, moreTimesDate)
|
||||||
@ -998,16 +998,6 @@ export default function ResultadosClient() {
|
|||||||
>
|
>
|
||||||
Agendar
|
Agendar
|
||||||
</Button>
|
</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>
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
)
|
)
|
||||||
@ -1175,8 +1165,17 @@ export default function ResultadosClient() {
|
|||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
|
|
||||||
<div className="flex items-center gap-2 mb-4">
|
<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)} />
|
<input
|
||||||
<Button className="h-10" onClick={async () => { if (moreTimesForDoctor) await fetchSlotsForDate(moreTimesForDoctor, moreTimesDate) }}>Buscar horários</Button>
|
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>
|
||||||
|
|
||||||
<div className="mt-2">
|
<div className="mt-2">
|
||||||
@ -1185,12 +1184,14 @@ export default function ResultadosClient() {
|
|||||||
) : moreTimesException ? (
|
) : moreTimesException ? (
|
||||||
<div className="text-sm text-red-500">{moreTimesException}</div>
|
<div className="text-sm text-red-500">{moreTimesException}</div>
|
||||||
) : (moreTimesSlots.length ? (
|
) : (moreTimesSlots.length ? (
|
||||||
<div className="grid grid-cols-3 gap-2">
|
<div className="max-h-[60vh] overflow-y-auto pr-2">
|
||||||
{moreTimesSlots.map(s => (
|
<div className="grid grid-cols-3 gap-2">
|
||||||
<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); } }}>
|
{moreTimesSlots.map(s => (
|
||||||
{s.label}
|
<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); } }}>
|
||||||
</button>
|
{s.label}
|
||||||
))}
|
</button>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className="text-sm text-muted-foreground">Sem horários para a data selecionada.</div>
|
<div className="text-sm text-muted-foreground">Sem horários para a data selecionada.</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user