add payment, trust badge, handle race condition, fix booking schema
This commit is contained in:
@@ -73,7 +73,7 @@ export default function CreateTripPage() {
|
||||
setLoading(true);
|
||||
|
||||
const formData = new FormData(e.currentTarget);
|
||||
// Hari kalender lokal → YYYY-MM-DD (bukan toISOString, supaya tidak geser ke UTC)
|
||||
// Tanggal dari picker → string tanggal untuk server action
|
||||
formData.set("date", formatLocalCalendarYmd(startDate));
|
||||
if (endDate) {
|
||||
const startYmd = formatLocalCalendarYmd(startDate);
|
||||
@@ -215,10 +215,63 @@ export default function CreateTripPage() {
|
||||
name="description"
|
||||
rows={4}
|
||||
className="w-full rounded-xl border border-neutral-200 bg-neutral-50 px-4 py-2.5 text-sm text-neutral-800 placeholder:text-neutral-400 focus:bg-white"
|
||||
placeholder="Detail trip, itinerary, meeting point, fasilitas..."
|
||||
placeholder="Ringkasan trip, vibe, level kesulitan..."
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label htmlFor="meetingPoint" className="mb-1.5 block text-sm font-semibold text-neutral-700">
|
||||
Meeting point
|
||||
</label>
|
||||
<input
|
||||
id="meetingPoint"
|
||||
name="meetingPoint"
|
||||
type="text"
|
||||
className="w-full rounded-xl border border-neutral-200 bg-neutral-50 px-4 py-2.5 text-sm text-neutral-800 placeholder:text-neutral-400 focus:bg-white"
|
||||
placeholder="contoh: Alfamart Cicaheum, 05:00 WIB"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label htmlFor="itinerary" className="mb-1.5 block text-sm font-semibold text-neutral-700">
|
||||
Itinerary
|
||||
</label>
|
||||
<textarea
|
||||
id="itinerary"
|
||||
name="itinerary"
|
||||
rows={5}
|
||||
className="w-full rounded-xl border border-neutral-200 bg-neutral-50 px-4 py-2.5 text-sm text-neutral-800 placeholder:text-neutral-400 focus:bg-white"
|
||||
placeholder={"Hari 1: …\nHari 2: …"}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="grid gap-4 sm:grid-cols-2">
|
||||
<div>
|
||||
<label htmlFor="whatsIncluded" className="mb-1.5 block text-sm font-semibold text-neutral-700">
|
||||
Termasuk
|
||||
</label>
|
||||
<textarea
|
||||
id="whatsIncluded"
|
||||
name="whatsIncluded"
|
||||
rows={4}
|
||||
className="w-full rounded-xl border border-neutral-200 bg-neutral-50 px-4 py-2.5 text-sm text-neutral-800 placeholder:text-neutral-400 focus:bg-white"
|
||||
placeholder="Transport, konsumsi, tenda, …"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label htmlFor="whatsExcluded" className="mb-1.5 block text-sm font-semibold text-neutral-700">
|
||||
Tidak termasuk
|
||||
</label>
|
||||
<textarea
|
||||
id="whatsExcluded"
|
||||
name="whatsExcluded"
|
||||
rows={4}
|
||||
className="w-full rounded-xl border border-neutral-200 bg-neutral-50 px-4 py-2.5 text-sm text-neutral-800 placeholder:text-neutral-400 focus:bg-white"
|
||||
placeholder="Tiket masuk TN, sleeping bag, …"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ImageUrlInput />
|
||||
|
||||
{/* Date Range & Participants & Price */}
|
||||
@@ -226,14 +279,8 @@ export default function CreateTripPage() {
|
||||
{/* Date Range Picker */}
|
||||
<div>
|
||||
<label className="mb-1.5 block text-sm font-semibold text-neutral-700">
|
||||
Tanggal Berangkat — Pulang
|
||||
Tanggal berangkat — pulang
|
||||
</label>
|
||||
<p className="mb-1.5 text-[11px] leading-snug text-neutral-500 sm:text-xs">
|
||||
Pilih satu tanggal untuk trip <span className="font-medium">satu hari</span>
|
||||
. Pilih rentang untuk trip <span className="font-medium">lebih dari satu hari</span>
|
||||
. Tanggal disimpan sebagai hari kalender yang kamu klik; filter Open Trip memakai{" "}
|
||||
<span className="font-medium">UTC</span> yang sama.
|
||||
</p>
|
||||
<div className="relative">
|
||||
<span className="absolute left-3 top-1/2 z-10 -translate-y-1/2 text-neutral-400">
|
||||
<svg
|
||||
|
||||
Reference in New Issue
Block a user