fix(portal): add onClick handler to Reschedule button
Reschedule buttons in Dashboard and Appointments had no onClick handler, making them no-ops. Add type="button" to prevent accidental form submission and an alert() placeholder until the reschedule modal is implemented. Fixes GRO-166. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -176,7 +176,11 @@ function AppointmentCard({
|
|||||||
)}
|
)}
|
||||||
{appt.status !== "completed" && appt.status !== "cancelled" && !readOnly && (
|
{appt.status !== "completed" && appt.status !== "cancelled" && !readOnly && (
|
||||||
<div className="flex gap-2 mt-3">
|
<div className="flex gap-2 mt-3">
|
||||||
<button className="text-xs px-3 py-1.5 border border-stone-200 rounded-lg text-stone-600 hover:bg-stone-50">
|
<button
|
||||||
|
type="button"
|
||||||
|
className="text-xs px-3 py-1.5 border border-stone-200 rounded-lg text-stone-600 hover:bg-stone-50"
|
||||||
|
onClick={() => alert("Rescheduling is coming soon!")}
|
||||||
|
>
|
||||||
Reschedule
|
Reschedule
|
||||||
</button>
|
</button>
|
||||||
<CancelAppointmentButton appointment={appt} sessionId={sessionId} />
|
<CancelAppointmentButton appointment={appt} sessionId={sessionId} />
|
||||||
|
|||||||
@@ -77,7 +77,11 @@ export function Dashboard({ onNavigate, readOnly }: Props) {
|
|||||||
</div>
|
</div>
|
||||||
{!readOnly && (
|
{!readOnly && (
|
||||||
<div className="flex gap-2 mt-4">
|
<div className="flex gap-2 mt-4">
|
||||||
<button className="text-sm px-3 py-1.5 border border-stone-200 rounded-lg text-stone-600 hover:bg-stone-50">
|
<button
|
||||||
|
type="button"
|
||||||
|
className="text-sm px-3 py-1.5 border border-stone-200 rounded-lg text-stone-600 hover:bg-stone-50"
|
||||||
|
onClick={() => alert("Rescheduling is coming soon!")}
|
||||||
|
>
|
||||||
Reschedule
|
Reschedule
|
||||||
</button>
|
</button>
|
||||||
<button className="text-sm px-3 py-1.5 border border-stone-200 rounded-lg text-stone-600 hover:bg-stone-50">
|
<button className="text-sm px-3 py-1.5 border border-stone-200 rounded-lg text-stone-600 hover:bg-stone-50">
|
||||||
|
|||||||
Reference in New Issue
Block a user