refund roadmap pr-1 and pr-2
This commit is contained in:
@@ -23,6 +23,9 @@ interface JoinTripButtonProps {
|
||||
tripStatus: string;
|
||||
/** Tanggal berangkat trip sudah lewat */
|
||||
isDeparturePast?: boolean;
|
||||
/** Sembunyikan tombol cancel — dipakai saat booking PAID dan parent
|
||||
* menampilkan CancelBookingButton (refund flow) di tempat terpisah. */
|
||||
hideCancelButton?: boolean;
|
||||
}
|
||||
|
||||
export function JoinTripButton({
|
||||
@@ -36,6 +39,7 @@ export function JoinTripButton({
|
||||
isFull,
|
||||
tripStatus,
|
||||
isDeparturePast,
|
||||
hideCancelButton,
|
||||
}: JoinTripButtonProps) {
|
||||
const router = useRouter();
|
||||
const [loading, setLoading] = useState(false);
|
||||
@@ -163,13 +167,15 @@ export function JoinTripButton({
|
||||
</Link>
|
||||
)}
|
||||
{isJoined ? (
|
||||
<button
|
||||
onClick={handleCancel}
|
||||
disabled={loading}
|
||||
className="w-full rounded-xl border-2 border-red-200 py-3 text-sm font-bold text-red-600 transition-colors hover:bg-red-50 disabled:opacity-50"
|
||||
>
|
||||
{loading ? "Memproses..." : "Batal Ikut"}
|
||||
</button>
|
||||
hideCancelButton ? null : (
|
||||
<button
|
||||
onClick={handleCancel}
|
||||
disabled={loading}
|
||||
className="w-full rounded-xl border-2 border-red-200 py-3 text-sm font-bold text-red-600 transition-colors hover:bg-red-50 disabled:opacity-50"
|
||||
>
|
||||
{loading ? "Memproses..." : "Batal Ikut"}
|
||||
</button>
|
||||
)
|
||||
) : (
|
||||
<button
|
||||
onClick={handleJoin}
|
||||
|
||||
Reference in New Issue
Block a user