@burdenoff/microfe-ggnomad 2026.1016.1 → 2026.1029.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ggnomad/GGNomadRoot.js +4 -2
- package/dist/ggnomad/GGNomadRoot.js.map +1 -1
- package/dist/ggnomad/GGNomadRoutes.js.map +1 -1
- package/dist/ggnomad/components/AuditTrailDialog.js.map +1 -1
- package/dist/ggnomad/components/AvailabilityPanel.js.map +1 -1
- package/dist/ggnomad/components/BookingPanel.d.ts.map +1 -1
- package/dist/ggnomad/components/BookingPanel.js +53 -70
- package/dist/ggnomad/components/BookingPanel.js.map +1 -1
- package/dist/ggnomad/components/CreateProviderDialog.js.map +1 -1
- package/dist/ggnomad/components/CreateTravelPolicyDialog.js.map +1 -1
- package/dist/ggnomad/components/GroupTripPanel.js.map +1 -1
- package/dist/ggnomad/components/ListingEditDialog.js.map +1 -1
- package/dist/ggnomad/components/ListingFilters.js.map +1 -1
- package/dist/ggnomad/components/PhotoGallery.js.map +1 -1
- package/dist/ggnomad/components/ProviderCard.js.map +1 -1
- package/dist/ggnomad/components/ProviderDashboardCard.js.map +1 -1
- package/dist/ggnomad/components/RatingSummary.js.map +1 -1
- package/dist/ggnomad/components/RedeemTicketPanel.js.map +1 -1
- package/dist/ggnomad/components/ReviewsSection.js.map +1 -1
- package/dist/ggnomad/components/StatusBadge.js.map +1 -1
- package/dist/ggnomad/components/TicketDialog.js +1 -1
- package/dist/ggnomad/components/TicketDialog.js.map +1 -1
- package/dist/ggnomad/components/index.js +26 -25
- package/dist/ggnomad/index.js +3 -2
- package/dist/ggnomad/pages/ActivityDetailsPage.js.map +1 -1
- package/dist/ggnomad/pages/AnalyticsPage.js.map +1 -1
- package/dist/ggnomad/pages/BookingsPage.d.ts.map +1 -1
- package/dist/ggnomad/pages/BookingsPage.js +54 -52
- package/dist/ggnomad/pages/BookingsPage.js.map +1 -1
- package/dist/ggnomad/pages/DashboardPage.js.map +1 -1
- package/dist/ggnomad/pages/EntertainmentPage.js.map +1 -1
- package/dist/ggnomad/pages/EventDetailsPage.js.map +1 -1
- package/dist/ggnomad/pages/FavoritesPage.js.map +1 -1
- package/dist/ggnomad/pages/HospitalityPage.js.map +1 -1
- package/dist/ggnomad/pages/OperationsQueuePage.js.map +1 -1
- package/dist/ggnomad/pages/PageShell.js.map +1 -1
- package/dist/ggnomad/pages/PropertyDetailsPage.js.map +1 -1
- package/dist/ggnomad/pages/ProviderAnalyticsPage.js.map +1 -1
- package/dist/ggnomad/pages/SearchPage.js +1 -1
- package/dist/ggnomad/pages/SearchPage.js.map +1 -1
- package/dist/ggnomad/pages/StorefrontPage.js.map +1 -1
- package/dist/ggnomad/pages/StorefrontPublicPage.js.map +1 -1
- package/dist/ggnomad/pages/TourDetailsPage.js.map +1 -1
- package/dist/ggnomad/pages/TourismPage.js.map +1 -1
- package/dist/ggnomad/pages/TravelPage.js +1 -1
- package/dist/ggnomad/pages/TravelPage.js.map +1 -1
- package/dist/ggnomad/pages/TravelPolicyPage.js.map +1 -1
- package/dist/ggnomad/pages/TripPlanDetailPage.d.ts.map +1 -1
- package/dist/ggnomad/pages/TripPlanDetailPage.js +278 -273
- package/dist/ggnomad/pages/TripPlanDetailPage.js.map +1 -1
- package/dist/ggnomad/pages/TripsPage.js.map +1 -1
- package/dist/ggnomad/providers/GGNomadProvider.js.map +1 -1
- package/dist/ggnomad/utils/bookingDates.d.ts +21 -0
- package/dist/ggnomad/utils/bookingDates.d.ts.map +1 -0
- package/dist/ggnomad/utils/bookingDates.js +22 -0
- package/dist/ggnomad/utils/bookingDates.js.map +1 -0
- package/dist/ggnomad/utils/format.js.map +1 -1
- package/dist/ggnomad/utils/notify.js +1 -1
- package/dist/ggnomad/utils/providerListControls.js +1 -1
- package/dist/ggnomad/utils/providerListControls.js.map +1 -1
- package/dist/ggnomad/utils/providerTypeMeta.js.map +1 -1
- package/dist/utils/pageContext.js +1 -1
- package/dist/utils/pageContext.js.map +1 -1
- package/package.json +18 -17
|
@@ -1,157 +1,162 @@
|
|
|
1
|
-
import { ADD_GGNOMAD_TRIP_PLAN_ITEM_MUTATION as e, CREATE_GGNOMAD_BOOKING_MUTATION as t, GGNOMAD_ACTIVITIES_QUERY as n, GGNOMAD_EVENTS_QUERY as
|
|
2
|
-
import { PageShell as
|
|
3
|
-
import { useGGNomad as
|
|
4
|
-
import { joinPath as
|
|
5
|
-
import { notify as
|
|
6
|
-
import { GroupTripPanel as
|
|
1
|
+
import { ADD_GGNOMAD_TRIP_PLAN_ITEM_MUTATION as e, CREATE_GGNOMAD_BOOKING_MUTATION as t, GGNOMAD_ACTIVITIES_QUERY as n, GGNOMAD_EVENTS_QUERY as ee, GGNOMAD_PROPERTIES_QUERY as te, GGNOMAD_TOURS_QUERY as ne, GGNOMAD_TRIP_PLAN_QUERY as r, REMOVE_GGNOMAD_TRIP_PLAN_ITEM_MUTATION as i, UPDATE_GGNOMAD_TRIP_PLAN_MUTATION as a } from "../graphql.js";
|
|
2
|
+
import { PageShell as o } from "./PageShell.js";
|
|
3
|
+
import { useGGNomad as s } from "../providers/GGNomadProvider.js";
|
|
4
|
+
import { joinPath as c } from "../utils/navigation.js";
|
|
5
|
+
import { notify as l } from "../utils/notify.js";
|
|
6
|
+
import { GroupTripPanel as re } from "../components/GroupTripPanel.js";
|
|
7
7
|
import "../components/index.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
8
|
+
import { stayDates as ie } from "../utils/bookingDates.js";
|
|
9
|
+
import { useState as u } from "react";
|
|
10
|
+
import { ChevronDown as d, Plus as ae, Users as oe, X as se } from "lucide-react";
|
|
11
|
+
import { useI18n as ce } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
12
|
+
import { useNavigate as f, useParams as p } from "react-router";
|
|
13
|
+
import { useMutation as m, useQuery as h } from "@apollo/client/react";
|
|
14
|
+
import { AlertDialog as g, AlertDialogAction as _, AlertDialogCancel as v, AlertDialogContent as y, AlertDialogDescription as b, AlertDialogFooter as x, AlertDialogHeader as S, AlertDialogTitle as C, GlassCard as w, IllustratedEmptyState as le, Tabs as ue, TabsContent as T, TabsList as de, TabsTrigger as E } from "@burdenoff/fe-libs/ui";
|
|
15
|
+
import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
|
|
15
16
|
//#region src/ggnomad/pages/TripPlanDetailPage.tsx
|
|
16
|
-
function
|
|
17
|
-
let { t:
|
|
18
|
-
variables: { id:
|
|
19
|
-
skip: !
|
|
20
|
-
}),
|
|
17
|
+
function A() {
|
|
18
|
+
let { t: A } = ce(), j = f(), { basePath: M = "/" } = s(), { id: N = "" } = p(), [P, F] = u(null), [I, L] = u(!1), [R, z] = u(null), [B, V] = u("itinerary"), { data: H, refetch: U } = h(r, {
|
|
19
|
+
variables: { id: N },
|
|
20
|
+
skip: !N
|
|
21
|
+
}), W = H?.ggnomadTripPlan, { data: fe } = h(te, { variables: {
|
|
21
22
|
limit: 20,
|
|
22
23
|
offset: 0
|
|
23
|
-
} }), { data:
|
|
24
|
+
} }), { data: pe } = h(ne, { variables: {
|
|
24
25
|
limit: 20,
|
|
25
26
|
offset: 0
|
|
26
|
-
} }), { data:
|
|
27
|
+
} }), { data: me } = h(ee, { variables: {
|
|
27
28
|
limit: 20,
|
|
28
29
|
offset: 0
|
|
29
|
-
} }), { data:
|
|
30
|
+
} }), { data: he } = h(n, { variables: {
|
|
30
31
|
limit: 20,
|
|
31
32
|
offset: 0
|
|
32
|
-
} }), [
|
|
33
|
-
if (!(!
|
|
34
|
-
let e = await
|
|
35
|
-
tripPlanId:
|
|
33
|
+
} }), [ge, { loading: G }] = m(e), [_e, { loading: K }] = m(i), [q] = m(a), [ve] = m(t), J = async () => {
|
|
34
|
+
if (!(!P || !W)) try {
|
|
35
|
+
let e = await ge({ variables: {
|
|
36
|
+
tripPlanId: W.id,
|
|
36
37
|
input: {
|
|
37
|
-
itemType:
|
|
38
|
-
itemId:
|
|
39
|
-
itemName:
|
|
40
|
-
price:
|
|
41
|
-
currency:
|
|
38
|
+
itemType: P.itemType,
|
|
39
|
+
itemId: P.itemId,
|
|
40
|
+
itemName: P.itemName,
|
|
41
|
+
price: P.price,
|
|
42
|
+
currency: P.currency
|
|
42
43
|
}
|
|
43
44
|
} });
|
|
44
45
|
if (e.error) {
|
|
45
|
-
|
|
46
|
+
l.error(A("ggnomad.tripPlan.toast.addItemErrorTitle", "Could not add item"), e.error.message);
|
|
46
47
|
return;
|
|
47
48
|
}
|
|
48
|
-
|
|
49
|
+
l.success(A("ggnomad.tripPlan.toast.addItemSuccessTitle", "Item added"), P.itemName), F(null), await U();
|
|
49
50
|
} catch (e) {
|
|
50
|
-
|
|
51
|
+
l.error(A("ggnomad.tripPlan.toast.addItemErrorTitle", "Could not add item"), e instanceof Error ? e.message : String(e));
|
|
51
52
|
}
|
|
52
|
-
},
|
|
53
|
-
if (
|
|
54
|
-
let e = await
|
|
53
|
+
}, ye = async () => {
|
|
54
|
+
if (R) try {
|
|
55
|
+
let e = await _e({ variables: { id: R } });
|
|
55
56
|
if (e.error) {
|
|
56
|
-
|
|
57
|
+
l.error(A("ggnomad.tripPlan.toast.removeItemErrorTitle", "Could not remove item"), e.error.message);
|
|
57
58
|
return;
|
|
58
59
|
}
|
|
59
|
-
|
|
60
|
+
l.success(A("ggnomad.tripPlan.toast.removeItemSuccessTitle", "Item removed"), ""), z(null), await U();
|
|
60
61
|
} catch (e) {
|
|
61
|
-
|
|
62
|
+
l.error(A("ggnomad.tripPlan.toast.removeItemErrorTitle", "Could not remove item"), e instanceof Error ? e.message : String(e));
|
|
62
63
|
}
|
|
63
|
-
},
|
|
64
|
-
if (
|
|
65
|
-
for (let e of
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
64
|
+
}, be = async () => {
|
|
65
|
+
if (W) try {
|
|
66
|
+
for (let e of W.items) {
|
|
67
|
+
let t = e.itemType === "PROPERTY" ? ie(e.scheduledAt ?? W.startDate, W.endDate) : e.scheduledAt ? { eventDate: e.scheduledAt } : {};
|
|
68
|
+
await ve({ variables: { input: {
|
|
69
|
+
bookingType: e.itemType,
|
|
70
|
+
itemId: e.itemId,
|
|
71
|
+
itemName: e.itemName,
|
|
72
|
+
guestName: "Guest",
|
|
73
|
+
guestEmail: "guest@burdenoff.com",
|
|
74
|
+
guests: W.travelers,
|
|
75
|
+
totalPrice: e.price,
|
|
76
|
+
currency: e.currency,
|
|
77
|
+
paymentMethod: "card",
|
|
78
|
+
...t
|
|
79
|
+
} } });
|
|
80
|
+
}
|
|
81
|
+
await q({ variables: {
|
|
82
|
+
id: W.id,
|
|
78
83
|
input: { status: "BOOKED" }
|
|
79
|
-
} }),
|
|
84
|
+
} }), l.success(A("ggnomad.tripPlan.toast.checkoutSuccessTitle", "Trip booked!"), A("ggnomad.tripPlan.toast.checkoutSuccessBody", "All items have been booked")), await U(), L(!1), j(c(M, "bookings"));
|
|
80
85
|
} catch (e) {
|
|
81
|
-
|
|
86
|
+
l.error(A("ggnomad.tripPlan.toast.checkoutErrorTitle", "Booking failed"), e instanceof Error ? e.message : String(e));
|
|
82
87
|
}
|
|
83
88
|
};
|
|
84
|
-
if (!
|
|
85
|
-
title:
|
|
86
|
-
subtitle:
|
|
87
|
-
children: /* @__PURE__ */
|
|
89
|
+
if (!W) return /* @__PURE__ */ O(o, {
|
|
90
|
+
title: A("ggnomad.tripPlan.loadingTitle", "Trip Plan"),
|
|
91
|
+
subtitle: A("ggnomad.tripPlan.loadingSubtitle", "Loading trip plan"),
|
|
92
|
+
children: /* @__PURE__ */ O(le, {
|
|
88
93
|
illustration: "empty-data",
|
|
89
|
-
title:
|
|
90
|
-
description:
|
|
94
|
+
title: A("ggnomad.tripPlan.notFoundTitle", "Trip plan not found"),
|
|
95
|
+
description: A("ggnomad.tripPlan.notFoundDescription", "This trip may have been deleted or is unavailable.")
|
|
91
96
|
})
|
|
92
97
|
});
|
|
93
98
|
let Y = {};
|
|
94
|
-
|
|
99
|
+
W.items.forEach((e) => {
|
|
95
100
|
let t = e.day ?? 0;
|
|
96
101
|
Y[t] || (Y[t] = []), Y[t].push(e);
|
|
97
102
|
});
|
|
98
|
-
let
|
|
99
|
-
return /* @__PURE__ */
|
|
100
|
-
title:
|
|
101
|
-
subtitle:
|
|
103
|
+
let xe = Object.keys(Y).map((e) => Number(e)).sort((e, t) => e - t), X = fe?.ggnomadProperties ?? [], Z = pe?.ggnomadTours ?? [], Q = me?.ggnomadEvents ?? [], $ = he?.ggnomadActivities ?? [];
|
|
104
|
+
return /* @__PURE__ */ k(o, {
|
|
105
|
+
title: W.name,
|
|
106
|
+
subtitle: A("ggnomad.tripPlan.subtitle", "Build your complete itinerary"),
|
|
102
107
|
children: [
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
-
value:
|
|
105
|
-
onValueChange:
|
|
108
|
+
/* @__PURE__ */ k(ue, {
|
|
109
|
+
value: B,
|
|
110
|
+
onValueChange: V,
|
|
106
111
|
className: "w-full",
|
|
107
112
|
children: [
|
|
108
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ k(de, {
|
|
109
114
|
className: "mb-6 w-full justify-start",
|
|
110
115
|
children: [
|
|
111
|
-
/* @__PURE__ */
|
|
116
|
+
/* @__PURE__ */ O(E, {
|
|
112
117
|
value: "itinerary",
|
|
113
|
-
children:
|
|
118
|
+
children: A("ggnomad.tripPlan.tabs.itinerary", "Itinerary")
|
|
114
119
|
}),
|
|
115
|
-
/* @__PURE__ */
|
|
120
|
+
/* @__PURE__ */ O(E, {
|
|
116
121
|
value: "timeline",
|
|
117
|
-
children:
|
|
122
|
+
children: A("ggnomad.tripPlan.tabs.timeline", "Timeline")
|
|
118
123
|
}),
|
|
119
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ O(E, {
|
|
120
125
|
value: "group",
|
|
121
|
-
children:
|
|
126
|
+
children: A("ggnomad.tripPlan.tabs.group", "Group")
|
|
122
127
|
})
|
|
123
128
|
]
|
|
124
129
|
}),
|
|
125
|
-
/* @__PURE__ */
|
|
130
|
+
/* @__PURE__ */ O(T, {
|
|
126
131
|
value: "itinerary",
|
|
127
132
|
className: "space-y-6",
|
|
128
|
-
children: /* @__PURE__ */
|
|
133
|
+
children: /* @__PURE__ */ k("div", {
|
|
129
134
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-4",
|
|
130
135
|
children: [
|
|
131
|
-
/* @__PURE__ */
|
|
136
|
+
/* @__PURE__ */ O("div", {
|
|
132
137
|
className: "space-y-4",
|
|
133
|
-
children: /* @__PURE__ */
|
|
138
|
+
children: /* @__PURE__ */ k(w, {
|
|
134
139
|
treatment: "glass",
|
|
135
140
|
glow: !0,
|
|
136
141
|
className: "border-border-seam p-4",
|
|
137
|
-
children: [/* @__PURE__ */
|
|
142
|
+
children: [/* @__PURE__ */ k("h3", {
|
|
138
143
|
className: "mb-3 flex items-center gap-2 font-medium text-text-primary",
|
|
139
|
-
children: [/* @__PURE__ */
|
|
140
|
-
}), /* @__PURE__ */
|
|
144
|
+
children: [/* @__PURE__ */ O(ae, { className: "size-4" }), A("ggnomad.tripPlan.addToTrip", "Add to trip")]
|
|
145
|
+
}), /* @__PURE__ */ k("div", {
|
|
141
146
|
className: "space-y-3",
|
|
142
147
|
children: [
|
|
143
|
-
/* @__PURE__ */
|
|
148
|
+
/* @__PURE__ */ k("details", {
|
|
144
149
|
className: "group",
|
|
145
|
-
children: [/* @__PURE__ */
|
|
150
|
+
children: [/* @__PURE__ */ k("summary", {
|
|
146
151
|
className: "flex cursor-pointer items-center justify-between rounded-md bg-bg-canvas-inverted p-2 text-sm font-medium text-text-primary hover:bg-opacity-80",
|
|
147
|
-
children: [
|
|
148
|
-
}), /* @__PURE__ */
|
|
152
|
+
children: [A("ggnomad.tripPlan.stays", "Stays"), /* @__PURE__ */ O(d, { className: "size-4 transition-transform group-open:rotate-180" })]
|
|
153
|
+
}), /* @__PURE__ */ O("div", {
|
|
149
154
|
className: "mt-2 space-y-2",
|
|
150
|
-
children: X.length === 0 ? /* @__PURE__ */
|
|
155
|
+
children: X.length === 0 ? /* @__PURE__ */ O("p", {
|
|
151
156
|
className: "text-xs text-text-secondary",
|
|
152
|
-
children:
|
|
153
|
-
}) : X.map((e) => /* @__PURE__ */
|
|
154
|
-
onClick: () =>
|
|
157
|
+
children: A("ggnomad.tripPlan.noStaysAvailable", "No stays available")
|
|
158
|
+
}) : X.map((e) => /* @__PURE__ */ k("button", {
|
|
159
|
+
onClick: () => F({
|
|
155
160
|
itemType: "PROPERTY",
|
|
156
161
|
itemId: e.id,
|
|
157
162
|
itemName: e.name,
|
|
@@ -159,10 +164,10 @@ function j() {
|
|
|
159
164
|
currency: e.currency
|
|
160
165
|
}),
|
|
161
166
|
className: "w-full rounded-md border border-border-seam bg-bg-canvas p-2 text-left text-xs text-text-primary hover:bg-action-primary-bg hover:text-action-primary-text",
|
|
162
|
-
children: [/* @__PURE__ */
|
|
167
|
+
children: [/* @__PURE__ */ O("div", {
|
|
163
168
|
className: "font-medium",
|
|
164
169
|
children: e.name
|
|
165
|
-
}), /* @__PURE__ */
|
|
170
|
+
}), /* @__PURE__ */ k("div", {
|
|
166
171
|
className: "text-text-secondary",
|
|
167
172
|
children: [
|
|
168
173
|
e.currency,
|
|
@@ -173,18 +178,18 @@ function j() {
|
|
|
173
178
|
}, e.id))
|
|
174
179
|
})]
|
|
175
180
|
}),
|
|
176
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ k("details", {
|
|
177
182
|
className: "group",
|
|
178
|
-
children: [/* @__PURE__ */
|
|
183
|
+
children: [/* @__PURE__ */ k("summary", {
|
|
179
184
|
className: "flex cursor-pointer items-center justify-between rounded-md bg-bg-canvas-inverted p-2 text-sm font-medium text-text-primary hover:bg-opacity-80",
|
|
180
|
-
children: [
|
|
181
|
-
}), /* @__PURE__ */
|
|
185
|
+
children: [A("ggnomad.tripPlan.tours", "Tours"), /* @__PURE__ */ O(d, { className: "size-4 transition-transform group-open:rotate-180" })]
|
|
186
|
+
}), /* @__PURE__ */ O("div", {
|
|
182
187
|
className: "mt-2 space-y-2",
|
|
183
|
-
children: Z.length === 0 ? /* @__PURE__ */
|
|
188
|
+
children: Z.length === 0 ? /* @__PURE__ */ O("p", {
|
|
184
189
|
className: "text-xs text-text-secondary",
|
|
185
|
-
children:
|
|
186
|
-
}) : Z.map((e) => /* @__PURE__ */
|
|
187
|
-
onClick: () =>
|
|
190
|
+
children: A("ggnomad.tripPlan.noToursAvailable", "No tours available")
|
|
191
|
+
}) : Z.map((e) => /* @__PURE__ */ k("button", {
|
|
192
|
+
onClick: () => F({
|
|
188
193
|
itemType: "TOUR",
|
|
189
194
|
itemId: e.id,
|
|
190
195
|
itemName: e.name,
|
|
@@ -192,10 +197,10 @@ function j() {
|
|
|
192
197
|
currency: e.currency
|
|
193
198
|
}),
|
|
194
199
|
className: "w-full rounded-md border border-border-seam bg-bg-canvas p-2 text-left text-xs text-text-primary hover:bg-action-primary-bg hover:text-action-primary-text",
|
|
195
|
-
children: [/* @__PURE__ */
|
|
200
|
+
children: [/* @__PURE__ */ O("div", {
|
|
196
201
|
className: "font-medium",
|
|
197
202
|
children: e.name
|
|
198
|
-
}), /* @__PURE__ */
|
|
203
|
+
}), /* @__PURE__ */ k("div", {
|
|
199
204
|
className: "text-text-secondary",
|
|
200
205
|
children: [
|
|
201
206
|
e.currency,
|
|
@@ -206,18 +211,18 @@ function j() {
|
|
|
206
211
|
}, e.id))
|
|
207
212
|
})]
|
|
208
213
|
}),
|
|
209
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ k("details", {
|
|
210
215
|
className: "group",
|
|
211
|
-
children: [/* @__PURE__ */
|
|
216
|
+
children: [/* @__PURE__ */ k("summary", {
|
|
212
217
|
className: "flex cursor-pointer items-center justify-between rounded-md bg-bg-canvas-inverted p-2 text-sm font-medium text-text-primary hover:bg-opacity-80",
|
|
213
|
-
children: [
|
|
214
|
-
}), /* @__PURE__ */
|
|
218
|
+
children: [A("ggnomad.tripPlan.events", "Events"), /* @__PURE__ */ O(d, { className: "size-4 transition-transform group-open:rotate-180" })]
|
|
219
|
+
}), /* @__PURE__ */ O("div", {
|
|
215
220
|
className: "mt-2 space-y-2",
|
|
216
|
-
children: Q.length === 0 ? /* @__PURE__ */
|
|
221
|
+
children: Q.length === 0 ? /* @__PURE__ */ O("p", {
|
|
217
222
|
className: "text-xs text-text-secondary",
|
|
218
|
-
children:
|
|
219
|
-
}) : Q.map((e) => /* @__PURE__ */
|
|
220
|
-
onClick: () =>
|
|
223
|
+
children: A("ggnomad.tripPlan.noEventsAvailable", "No events available")
|
|
224
|
+
}) : Q.map((e) => /* @__PURE__ */ k("button", {
|
|
225
|
+
onClick: () => F({
|
|
221
226
|
itemType: "EVENT",
|
|
222
227
|
itemId: e.id,
|
|
223
228
|
itemName: e.name,
|
|
@@ -225,10 +230,10 @@ function j() {
|
|
|
225
230
|
currency: e.currency
|
|
226
231
|
}),
|
|
227
232
|
className: "w-full rounded-md border border-border-seam bg-bg-canvas p-2 text-left text-xs text-text-primary hover:bg-action-primary-bg hover:text-action-primary-text",
|
|
228
|
-
children: [/* @__PURE__ */
|
|
233
|
+
children: [/* @__PURE__ */ O("div", {
|
|
229
234
|
className: "font-medium",
|
|
230
235
|
children: e.name
|
|
231
|
-
}), /* @__PURE__ */
|
|
236
|
+
}), /* @__PURE__ */ k("div", {
|
|
232
237
|
className: "text-text-secondary",
|
|
233
238
|
children: [
|
|
234
239
|
e.currency,
|
|
@@ -239,18 +244,18 @@ function j() {
|
|
|
239
244
|
}, e.id))
|
|
240
245
|
})]
|
|
241
246
|
}),
|
|
242
|
-
/* @__PURE__ */
|
|
247
|
+
/* @__PURE__ */ k("details", {
|
|
243
248
|
className: "group",
|
|
244
|
-
children: [/* @__PURE__ */
|
|
249
|
+
children: [/* @__PURE__ */ k("summary", {
|
|
245
250
|
className: "flex cursor-pointer items-center justify-between rounded-md bg-bg-canvas-inverted p-2 text-sm font-medium text-text-primary hover:bg-opacity-80",
|
|
246
|
-
children: [
|
|
247
|
-
}), /* @__PURE__ */
|
|
251
|
+
children: [A("ggnomad.tripPlan.activities", "Activities"), /* @__PURE__ */ O(d, { className: "size-4 transition-transform group-open:rotate-180" })]
|
|
252
|
+
}), /* @__PURE__ */ O("div", {
|
|
248
253
|
className: "mt-2 space-y-2",
|
|
249
|
-
children: $.length === 0 ? /* @__PURE__ */
|
|
254
|
+
children: $.length === 0 ? /* @__PURE__ */ O("p", {
|
|
250
255
|
className: "text-xs text-text-secondary",
|
|
251
|
-
children:
|
|
252
|
-
}) : $.map((e) => /* @__PURE__ */
|
|
253
|
-
onClick: () =>
|
|
256
|
+
children: A("ggnomad.tripPlan.noActivitiesAvailable", "No activities available")
|
|
257
|
+
}) : $.map((e) => /* @__PURE__ */ k("button", {
|
|
258
|
+
onClick: () => F({
|
|
254
259
|
itemType: "ACTIVITY",
|
|
255
260
|
itemId: e.id,
|
|
256
261
|
itemName: e.name,
|
|
@@ -258,10 +263,10 @@ function j() {
|
|
|
258
263
|
currency: e.currency
|
|
259
264
|
}),
|
|
260
265
|
className: "w-full rounded-md border border-border-seam bg-bg-canvas p-2 text-left text-xs text-text-primary hover:bg-action-primary-bg hover:text-action-primary-text",
|
|
261
|
-
children: [/* @__PURE__ */
|
|
266
|
+
children: [/* @__PURE__ */ O("div", {
|
|
262
267
|
className: "font-medium",
|
|
263
268
|
children: e.name
|
|
264
|
-
}), /* @__PURE__ */
|
|
269
|
+
}), /* @__PURE__ */ k("div", {
|
|
265
270
|
className: "text-text-secondary",
|
|
266
271
|
children: [
|
|
267
272
|
e.currency,
|
|
@@ -276,39 +281,39 @@ function j() {
|
|
|
276
281
|
})]
|
|
277
282
|
})
|
|
278
283
|
}),
|
|
279
|
-
/* @__PURE__ */
|
|
284
|
+
/* @__PURE__ */ O("div", {
|
|
280
285
|
className: "space-y-4 lg:col-span-2",
|
|
281
|
-
children: /* @__PURE__ */
|
|
286
|
+
children: /* @__PURE__ */ k(w, {
|
|
282
287
|
treatment: "glass",
|
|
283
288
|
glow: !0,
|
|
284
289
|
className: "border-border-seam p-5",
|
|
285
|
-
children: [/* @__PURE__ */
|
|
290
|
+
children: [/* @__PURE__ */ O("h2", {
|
|
286
291
|
className: "mb-4 text-lg font-medium tracking-tight text-text-primary",
|
|
287
|
-
children:
|
|
288
|
-
}),
|
|
292
|
+
children: A("ggnomad.tripPlan.itineraryHeader", "Your itinerary")
|
|
293
|
+
}), W.items.length === 0 ? /* @__PURE__ */ O("p", {
|
|
289
294
|
className: "text-sm text-text-secondary",
|
|
290
|
-
children:
|
|
291
|
-
}) : /* @__PURE__ */
|
|
295
|
+
children: A("ggnomad.tripPlan.noItemsYet", "No items added yet. Start adding stays, tours, events and activities from the left.")
|
|
296
|
+
}) : /* @__PURE__ */ O("div", {
|
|
292
297
|
className: "space-y-6",
|
|
293
|
-
children:
|
|
298
|
+
children: xe.map((e) => /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("h3", {
|
|
294
299
|
className: "mb-2 text-sm font-medium text-text-secondary",
|
|
295
|
-
children: e === 0 ?
|
|
296
|
-
}), /* @__PURE__ */
|
|
300
|
+
children: e === 0 ? A("ggnomad.tripPlan.unscheduled", "Unscheduled") : A("ggnomad.tripPlan.day", "Day {{day}}").replace("{{day}}", String(e))
|
|
301
|
+
}), /* @__PURE__ */ O("div", {
|
|
297
302
|
className: "space-y-2",
|
|
298
|
-
children: (Y[e] || []).map((e) => /* @__PURE__ */
|
|
303
|
+
children: (Y[e] || []).map((e) => /* @__PURE__ */ k("div", {
|
|
299
304
|
className: "flex items-start justify-between rounded-md border border-border-seam bg-bg-canvas p-3",
|
|
300
|
-
children: [/* @__PURE__ */
|
|
305
|
+
children: [/* @__PURE__ */ k("div", {
|
|
301
306
|
className: "flex-1",
|
|
302
307
|
children: [
|
|
303
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ O("p", {
|
|
304
309
|
className: "font-medium text-text-primary",
|
|
305
310
|
children: e.itemName
|
|
306
311
|
}),
|
|
307
|
-
/* @__PURE__ */
|
|
312
|
+
/* @__PURE__ */ O("p", {
|
|
308
313
|
className: "text-xs text-text-secondary",
|
|
309
314
|
children: e.itemType.charAt(0) + e.itemType.slice(1).toLowerCase()
|
|
310
315
|
}),
|
|
311
|
-
/* @__PURE__ */
|
|
316
|
+
/* @__PURE__ */ k("p", {
|
|
312
317
|
className: "mt-1 font-semibold text-status-success-text",
|
|
313
318
|
children: [
|
|
314
319
|
e.currency,
|
|
@@ -317,117 +322,117 @@ function j() {
|
|
|
317
322
|
]
|
|
318
323
|
})
|
|
319
324
|
]
|
|
320
|
-
}), /* @__PURE__ */
|
|
321
|
-
onClick: () =>
|
|
325
|
+
}), /* @__PURE__ */ O("button", {
|
|
326
|
+
onClick: () => z(e.id),
|
|
322
327
|
className: "ml-2 rounded-md p-1 text-text-secondary hover:bg-action-danger-bg hover:text-action-danger-text",
|
|
323
|
-
"aria-label":
|
|
324
|
-
children: /* @__PURE__ */
|
|
328
|
+
"aria-label": A("ggnomad.tripPlan.removeItem", "Remove item"),
|
|
329
|
+
children: /* @__PURE__ */ O(se, { className: "size-4" })
|
|
325
330
|
})]
|
|
326
331
|
}, e.id))
|
|
327
332
|
})] }, String(e)))
|
|
328
333
|
})]
|
|
329
334
|
})
|
|
330
335
|
}),
|
|
331
|
-
/* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ O("div", {
|
|
332
337
|
className: "space-y-4",
|
|
333
|
-
children: /* @__PURE__ */
|
|
338
|
+
children: /* @__PURE__ */ k(w, {
|
|
334
339
|
treatment: "glass",
|
|
335
340
|
glow: !0,
|
|
336
341
|
className: "sticky top-6 border-border-seam p-5",
|
|
337
342
|
children: [
|
|
338
|
-
/* @__PURE__ */
|
|
343
|
+
/* @__PURE__ */ O("h3", {
|
|
339
344
|
className: "mb-4 font-medium text-text-primary",
|
|
340
|
-
children:
|
|
345
|
+
children: A("ggnomad.tripPlan.tripTotal", "Trip total")
|
|
341
346
|
}),
|
|
342
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ k("div", {
|
|
343
348
|
className: "space-y-3 border-b border-border-seam pb-4",
|
|
344
|
-
children: [/* @__PURE__ */
|
|
349
|
+
children: [/* @__PURE__ */ k("div", {
|
|
345
350
|
className: "flex items-center justify-between text-sm",
|
|
346
|
-
children: [/* @__PURE__ */
|
|
351
|
+
children: [/* @__PURE__ */ O("span", {
|
|
347
352
|
className: "text-text-secondary",
|
|
348
|
-
children:
|
|
349
|
-
}), /* @__PURE__ */
|
|
353
|
+
children: A("ggnomad.tripPlan.items", "Items")
|
|
354
|
+
}), /* @__PURE__ */ O("span", {
|
|
350
355
|
className: "font-medium text-text-primary",
|
|
351
|
-
children:
|
|
356
|
+
children: W.itemCount
|
|
352
357
|
})]
|
|
353
|
-
}), /* @__PURE__ */
|
|
358
|
+
}), /* @__PURE__ */ k("div", {
|
|
354
359
|
className: "flex items-center justify-between text-sm",
|
|
355
|
-
children: [/* @__PURE__ */
|
|
360
|
+
children: [/* @__PURE__ */ O("span", {
|
|
356
361
|
className: "text-text-secondary",
|
|
357
|
-
children:
|
|
358
|
-
}), /* @__PURE__ */
|
|
362
|
+
children: A("ggnomad.tripPlan.travelers", "Travelers")
|
|
363
|
+
}), /* @__PURE__ */ k("span", {
|
|
359
364
|
className: "font-medium text-text-primary flex items-center gap-1",
|
|
360
|
-
children: [/* @__PURE__ */
|
|
365
|
+
children: [/* @__PURE__ */ O(oe, { className: "size-3" }), W.travelers]
|
|
361
366
|
})]
|
|
362
367
|
})]
|
|
363
368
|
}),
|
|
364
|
-
/* @__PURE__ */
|
|
369
|
+
/* @__PURE__ */ k("div", {
|
|
365
370
|
className: "my-4",
|
|
366
|
-
children: [/* @__PURE__ */
|
|
371
|
+
children: [/* @__PURE__ */ k("div", {
|
|
367
372
|
className: "text-2xl font-bold text-text-primary",
|
|
368
|
-
children: ["USD ",
|
|
369
|
-
}),
|
|
373
|
+
children: ["USD ", W.total.toFixed(2)]
|
|
374
|
+
}), W.travelers > 0 && /* @__PURE__ */ k("div", {
|
|
370
375
|
className: "mt-3 rounded-md border border-border-seam bg-bg-canvas/50 p-3",
|
|
371
376
|
children: [
|
|
372
|
-
/* @__PURE__ */
|
|
377
|
+
/* @__PURE__ */ O("p", {
|
|
373
378
|
className: "text-xs font-medium text-text-secondary",
|
|
374
|
-
children:
|
|
379
|
+
children: A("ggnomad.tripPlan.costSplit", "Split {{count}} ways").replace("{{count}}", String(W.travelers))
|
|
375
380
|
}),
|
|
376
|
-
/* @__PURE__ */
|
|
381
|
+
/* @__PURE__ */ k("p", {
|
|
377
382
|
className: "mt-1 text-lg font-semibold text-action-primary-text",
|
|
378
383
|
children: [
|
|
379
384
|
"USD ",
|
|
380
|
-
(
|
|
385
|
+
(W.total / W.travelers).toFixed(2),
|
|
381
386
|
" each"
|
|
382
387
|
]
|
|
383
388
|
}),
|
|
384
|
-
/* @__PURE__ */
|
|
389
|
+
/* @__PURE__ */ O("p", {
|
|
385
390
|
className: "mt-2 text-xs text-text-secondary",
|
|
386
|
-
children:
|
|
391
|
+
children: A("ggnomad.tripPlan.costSplitNote", "This trip plan is shared with everyone in your workspace.")
|
|
387
392
|
})
|
|
388
393
|
]
|
|
389
394
|
})]
|
|
390
395
|
}),
|
|
391
|
-
/* @__PURE__ */
|
|
396
|
+
/* @__PURE__ */ k("div", {
|
|
392
397
|
className: "space-y-2",
|
|
393
|
-
children: [/* @__PURE__ */
|
|
394
|
-
onClick: () =>
|
|
395
|
-
disabled:
|
|
398
|
+
children: [/* @__PURE__ */ O("button", {
|
|
399
|
+
onClick: () => L(!0),
|
|
400
|
+
disabled: W.items.length === 0,
|
|
396
401
|
className: "w-full rounded-md bg-action-primary-bg px-4 py-2 font-medium text-action-primary-text hover:bg-action-primary-bgHover disabled:opacity-50",
|
|
397
|
-
children:
|
|
398
|
-
}), /* @__PURE__ */
|
|
402
|
+
children: A("ggnomad.tripPlan.checkout", "Checkout")
|
|
403
|
+
}), /* @__PURE__ */ O("div", {
|
|
399
404
|
className: "flex items-center gap-2",
|
|
400
|
-
children: /* @__PURE__ */
|
|
401
|
-
value:
|
|
405
|
+
children: /* @__PURE__ */ k("select", {
|
|
406
|
+
value: W.status,
|
|
402
407
|
onChange: async (e) => {
|
|
403
|
-
await
|
|
404
|
-
id:
|
|
408
|
+
await q({ variables: {
|
|
409
|
+
id: W.id,
|
|
405
410
|
input: { status: e.target.value }
|
|
406
|
-
} }), await
|
|
411
|
+
} }), await U();
|
|
407
412
|
},
|
|
408
413
|
className: "flex-1 rounded-md border border-border-seam bg-bg-canvas px-2 py-1 text-sm text-text-primary",
|
|
409
414
|
children: [
|
|
410
|
-
/* @__PURE__ */
|
|
415
|
+
/* @__PURE__ */ O("option", {
|
|
411
416
|
value: "DRAFT",
|
|
412
417
|
children: "Draft"
|
|
413
418
|
}),
|
|
414
|
-
/* @__PURE__ */
|
|
419
|
+
/* @__PURE__ */ O("option", {
|
|
415
420
|
value: "PLANNED",
|
|
416
421
|
children: "Planned"
|
|
417
422
|
}),
|
|
418
|
-
/* @__PURE__ */
|
|
423
|
+
/* @__PURE__ */ O("option", {
|
|
419
424
|
value: "BOOKED",
|
|
420
425
|
children: "Booked"
|
|
421
426
|
}),
|
|
422
|
-
/* @__PURE__ */
|
|
427
|
+
/* @__PURE__ */ O("option", {
|
|
423
428
|
value: "CONFIRMED",
|
|
424
429
|
children: "Confirmed"
|
|
425
430
|
}),
|
|
426
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ O("option", {
|
|
427
432
|
value: "COMPLETED",
|
|
428
433
|
children: "Completed"
|
|
429
434
|
}),
|
|
430
|
-
/* @__PURE__ */
|
|
435
|
+
/* @__PURE__ */ O("option", {
|
|
431
436
|
value: "CANCELLED",
|
|
432
437
|
children: "Cancelled"
|
|
433
438
|
})
|
|
@@ -441,50 +446,50 @@ function j() {
|
|
|
441
446
|
]
|
|
442
447
|
})
|
|
443
448
|
}),
|
|
444
|
-
/* @__PURE__ */
|
|
449
|
+
/* @__PURE__ */ O(T, {
|
|
445
450
|
value: "timeline",
|
|
446
451
|
className: "space-y-4",
|
|
447
|
-
children: /* @__PURE__ */
|
|
452
|
+
children: /* @__PURE__ */ k(w, {
|
|
448
453
|
treatment: "glass",
|
|
449
454
|
glow: !0,
|
|
450
455
|
className: "border-border-seam p-5",
|
|
451
|
-
children: [/* @__PURE__ */
|
|
456
|
+
children: [/* @__PURE__ */ O("h2", {
|
|
452
457
|
className: "mb-4 text-lg font-medium tracking-tight text-text-primary",
|
|
453
|
-
children:
|
|
454
|
-
}), /* @__PURE__ */
|
|
458
|
+
children: A("ggnomad.tripPlan.timeline", "Trip timeline")
|
|
459
|
+
}), /* @__PURE__ */ k("div", {
|
|
455
460
|
className: "space-y-6",
|
|
456
461
|
children: [
|
|
457
|
-
/* @__PURE__ */
|
|
462
|
+
/* @__PURE__ */ k("div", {
|
|
458
463
|
className: "flex gap-4",
|
|
459
|
-
children: [/* @__PURE__ */
|
|
464
|
+
children: [/* @__PURE__ */ k("div", {
|
|
460
465
|
className: "flex flex-col items-center",
|
|
461
|
-
children: [/* @__PURE__ */
|
|
462
|
-
}), /* @__PURE__ */
|
|
466
|
+
children: [/* @__PURE__ */ O("div", { className: "size-3 rounded-full bg-status-info-bg" }), /* @__PURE__ */ O("div", { className: "my-2 h-8 w-0.5 bg-border-seam" })]
|
|
467
|
+
}), /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("h3", {
|
|
463
468
|
className: "font-medium text-text-primary",
|
|
464
|
-
children:
|
|
465
|
-
}), /* @__PURE__ */
|
|
469
|
+
children: A("ggnomad.tripPlan.milestone.started", "Trip started")
|
|
470
|
+
}), /* @__PURE__ */ O("p", {
|
|
466
471
|
className: "text-xs text-text-secondary",
|
|
467
|
-
children:
|
|
472
|
+
children: A("ggnomad.tripPlan.milestone.startedDesc", "Created your itinerary")
|
|
468
473
|
})] })]
|
|
469
474
|
}),
|
|
470
|
-
|
|
475
|
+
W.items.length === 0 ? /* @__PURE__ */ O("p", {
|
|
471
476
|
className: "text-sm text-text-secondary",
|
|
472
|
-
children:
|
|
473
|
-
}) :
|
|
477
|
+
children: A("ggnomad.tripPlan.noItemsInTimeline", "No items in your timeline yet")
|
|
478
|
+
}) : W.items.map((e, t) => /* @__PURE__ */ k("div", {
|
|
474
479
|
className: "flex gap-4",
|
|
475
|
-
children: [/* @__PURE__ */
|
|
480
|
+
children: [/* @__PURE__ */ k("div", {
|
|
476
481
|
className: "flex flex-col items-center",
|
|
477
|
-
children: [/* @__PURE__ */
|
|
478
|
-
}), /* @__PURE__ */
|
|
479
|
-
/* @__PURE__ */
|
|
482
|
+
children: [/* @__PURE__ */ O("div", { className: `size-3 rounded-full ${W.status === "BOOKED" || W.status === "COMPLETED" ? "bg-status-success-bg" : "bg-status-warning-bg"}` }), t < W.items.length - 1 && /* @__PURE__ */ O("div", { className: "my-2 h-8 w-0.5 bg-border-seam" })]
|
|
483
|
+
}), /* @__PURE__ */ k("div", { children: [
|
|
484
|
+
/* @__PURE__ */ O("h3", {
|
|
480
485
|
className: "font-medium text-text-primary",
|
|
481
486
|
children: e.itemName
|
|
482
487
|
}),
|
|
483
|
-
/* @__PURE__ */
|
|
488
|
+
/* @__PURE__ */ k("p", {
|
|
484
489
|
className: "text-xs text-text-secondary",
|
|
485
490
|
children: [e.itemType.charAt(0) + e.itemType.slice(1).toLowerCase(), e.day && ` · Day ${e.day}`]
|
|
486
491
|
}),
|
|
487
|
-
/* @__PURE__ */
|
|
492
|
+
/* @__PURE__ */ k("p", {
|
|
488
493
|
className: "mt-1 text-sm font-semibold text-status-success-text",
|
|
489
494
|
children: [
|
|
490
495
|
e.currency,
|
|
@@ -492,36 +497,36 @@ function j() {
|
|
|
492
497
|
e.price.toFixed(2)
|
|
493
498
|
]
|
|
494
499
|
}),
|
|
495
|
-
/* @__PURE__ */
|
|
500
|
+
/* @__PURE__ */ O("p", {
|
|
496
501
|
className: "mt-1 text-xs text-text-secondary",
|
|
497
|
-
children:
|
|
502
|
+
children: W.status === "BOOKED" || W.status === "COMPLETED" ? A("ggnomad.tripPlan.milestone.booked", "Booked") : A("ggnomad.tripPlan.milestone.planned", "Planned")
|
|
498
503
|
})
|
|
499
504
|
] })]
|
|
500
505
|
}, e.id)),
|
|
501
|
-
|
|
506
|
+
W.items.length > 0 && /* @__PURE__ */ O(D, { children: /* @__PURE__ */ k("div", {
|
|
502
507
|
className: "flex gap-4",
|
|
503
|
-
children: [/* @__PURE__ */
|
|
508
|
+
children: [/* @__PURE__ */ O("div", {
|
|
504
509
|
className: "flex flex-col items-center",
|
|
505
|
-
children: /* @__PURE__ */
|
|
506
|
-
}), /* @__PURE__ */
|
|
510
|
+
children: /* @__PURE__ */ O("div", { className: `size-3 rounded-full ${W.status === "COMPLETED" ? "bg-status-success-bg" : "bg-status-secondary-bg"}` })
|
|
511
|
+
}), /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("h3", {
|
|
507
512
|
className: "font-medium text-text-primary",
|
|
508
|
-
children:
|
|
509
|
-
}), /* @__PURE__ */
|
|
513
|
+
children: W.status === "COMPLETED" ? A("ggnomad.tripPlan.milestone.completed", "Trip completed") : A("ggnomad.tripPlan.milestone.confirming", "Awaiting completion")
|
|
514
|
+
}), /* @__PURE__ */ O("p", {
|
|
510
515
|
className: "text-xs text-text-secondary",
|
|
511
|
-
children:
|
|
516
|
+
children: W.status === "COMPLETED" ? A("ggnomad.tripPlan.milestone.completedDesc", "Your trip is complete") : A("ggnomad.tripPlan.milestone.confirmingDesc", "Update status as your trip progresses")
|
|
512
517
|
})] })]
|
|
513
518
|
}) })
|
|
514
519
|
]
|
|
515
520
|
})]
|
|
516
521
|
})
|
|
517
522
|
}),
|
|
518
|
-
/* @__PURE__ */
|
|
523
|
+
/* @__PURE__ */ O(T, {
|
|
519
524
|
value: "group",
|
|
520
525
|
className: "space-y-4",
|
|
521
|
-
children: /* @__PURE__ */
|
|
522
|
-
tripPlanId:
|
|
523
|
-
tripPlanName:
|
|
524
|
-
items:
|
|
526
|
+
children: /* @__PURE__ */ O(re, {
|
|
527
|
+
tripPlanId: W.id,
|
|
528
|
+
tripPlanName: W.name,
|
|
529
|
+
items: W.items.map((e) => ({
|
|
525
530
|
id: e.id,
|
|
526
531
|
itemName: e.itemName,
|
|
527
532
|
price: e.price,
|
|
@@ -531,59 +536,59 @@ function j() {
|
|
|
531
536
|
})
|
|
532
537
|
]
|
|
533
538
|
}),
|
|
534
|
-
/* @__PURE__ */
|
|
535
|
-
open:
|
|
536
|
-
onOpenChange: (e) => !e &&
|
|
537
|
-
children: /* @__PURE__ */
|
|
538
|
-
|
|
539
|
+
/* @__PURE__ */ O(g, {
|
|
540
|
+
open: P !== null,
|
|
541
|
+
onOpenChange: (e) => !e && F(null),
|
|
542
|
+
children: /* @__PURE__ */ k(y, { children: [/* @__PURE__ */ k(S, { children: [/* @__PURE__ */ O(C, { children: A("ggnomad.tripPlan.addItemDialog.title", "Add to itinerary?") }), /* @__PURE__ */ O(b, { children: P && /* @__PURE__ */ k(D, { children: [
|
|
543
|
+
P.itemName,
|
|
539
544
|
" · ",
|
|
540
|
-
|
|
545
|
+
P.currency,
|
|
541
546
|
" ",
|
|
542
|
-
|
|
543
|
-
] }) })] }), /* @__PURE__ */
|
|
544
|
-
disabled:
|
|
545
|
-
children:
|
|
546
|
-
}), /* @__PURE__ */
|
|
547
|
-
disabled:
|
|
547
|
+
P.price.toFixed(2)
|
|
548
|
+
] }) })] }), /* @__PURE__ */ k(x, { children: [/* @__PURE__ */ O(v, {
|
|
549
|
+
disabled: G,
|
|
550
|
+
children: A("ggnomad.tripPlan.addItemDialog.cancel", "Cancel")
|
|
551
|
+
}), /* @__PURE__ */ O(_, {
|
|
552
|
+
disabled: G,
|
|
548
553
|
onClick: (e) => {
|
|
549
|
-
e.preventDefault(),
|
|
554
|
+
e.preventDefault(), J();
|
|
550
555
|
},
|
|
551
|
-
children:
|
|
556
|
+
children: G ? A("ggnomad.tripPlan.addItemDialog.adding", "Adding…") : A("ggnomad.tripPlan.addItemDialog.add", "Add item")
|
|
552
557
|
})] })] })
|
|
553
558
|
}),
|
|
554
|
-
/* @__PURE__ */
|
|
555
|
-
open:
|
|
556
|
-
onOpenChange: (e) => !e &&
|
|
557
|
-
children: /* @__PURE__ */
|
|
558
|
-
disabled:
|
|
559
|
-
children:
|
|
560
|
-
}), /* @__PURE__ */
|
|
559
|
+
/* @__PURE__ */ O(g, {
|
|
560
|
+
open: R !== null,
|
|
561
|
+
onOpenChange: (e) => !e && z(null),
|
|
562
|
+
children: /* @__PURE__ */ k(y, { children: [/* @__PURE__ */ k(S, { children: [/* @__PURE__ */ O(C, { children: A("ggnomad.tripPlan.removeItemDialog.title", "Remove item from trip?") }), /* @__PURE__ */ O(b, { children: A("ggnomad.tripPlan.removeItemDialog.description", "This item will be removed from your itinerary.") })] }), /* @__PURE__ */ k(x, { children: [/* @__PURE__ */ O(v, {
|
|
563
|
+
disabled: K,
|
|
564
|
+
children: A("ggnomad.tripPlan.removeItemDialog.cancel", "Keep item")
|
|
565
|
+
}), /* @__PURE__ */ O(_, {
|
|
561
566
|
className: "bg-action-danger-bg text-action-danger-text hover:bg-action-danger-bgHover",
|
|
562
|
-
disabled:
|
|
567
|
+
disabled: K,
|
|
563
568
|
onClick: (e) => {
|
|
564
|
-
e.preventDefault(),
|
|
569
|
+
e.preventDefault(), ye();
|
|
565
570
|
},
|
|
566
|
-
children:
|
|
571
|
+
children: K ? A("ggnomad.tripPlan.removeItemDialog.removing", "Removing…") : A("ggnomad.tripPlan.removeItemDialog.remove", "Remove item")
|
|
567
572
|
})] })] })
|
|
568
573
|
}),
|
|
569
|
-
/* @__PURE__ */
|
|
570
|
-
open:
|
|
571
|
-
onOpenChange:
|
|
572
|
-
children: /* @__PURE__ */
|
|
574
|
+
/* @__PURE__ */ O(g, {
|
|
575
|
+
open: I,
|
|
576
|
+
onOpenChange: L,
|
|
577
|
+
children: /* @__PURE__ */ k(y, {
|
|
573
578
|
className: "max-w-2xl",
|
|
574
579
|
children: [
|
|
575
|
-
/* @__PURE__ */
|
|
576
|
-
/* @__PURE__ */
|
|
580
|
+
/* @__PURE__ */ k(S, { children: [/* @__PURE__ */ O(C, { children: A("ggnomad.tripPlan.checkoutDialog.title", "Review and book") }), /* @__PURE__ */ O(b, { children: A("ggnomad.tripPlan.checkoutDialog.description", "Review your items and confirm to book everything at once.") })] }),
|
|
581
|
+
/* @__PURE__ */ k("div", {
|
|
577
582
|
className: "space-y-4 max-h-96 overflow-y-auto",
|
|
578
|
-
children: [
|
|
583
|
+
children: [W.items.map((e) => /* @__PURE__ */ k("div", {
|
|
579
584
|
className: "flex items-center justify-between rounded-md border border-border-seam bg-bg-canvas p-3",
|
|
580
|
-
children: [/* @__PURE__ */
|
|
585
|
+
children: [/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
|
|
581
586
|
className: "font-medium text-text-primary",
|
|
582
587
|
children: e.itemName
|
|
583
|
-
}), /* @__PURE__ */
|
|
588
|
+
}), /* @__PURE__ */ O("p", {
|
|
584
589
|
className: "text-xs text-text-secondary",
|
|
585
590
|
children: e.itemType.charAt(0) + e.itemType.slice(1).toLowerCase()
|
|
586
|
-
})] }), /* @__PURE__ */
|
|
591
|
+
})] }), /* @__PURE__ */ k("p", {
|
|
587
592
|
className: "font-semibold text-text-primary",
|
|
588
593
|
children: [
|
|
589
594
|
e.currency,
|
|
@@ -591,50 +596,50 @@ function j() {
|
|
|
591
596
|
e.price.toFixed(2)
|
|
592
597
|
]
|
|
593
598
|
})]
|
|
594
|
-
}, e.id)), /* @__PURE__ */
|
|
599
|
+
}, e.id)), /* @__PURE__ */ k("div", {
|
|
595
600
|
className: "space-y-2 border-t border-border-seam pt-4",
|
|
596
601
|
children: [
|
|
597
|
-
/* @__PURE__ */
|
|
602
|
+
/* @__PURE__ */ k("div", {
|
|
598
603
|
className: "flex justify-between text-sm",
|
|
599
|
-
children: [/* @__PURE__ */
|
|
604
|
+
children: [/* @__PURE__ */ O("span", {
|
|
600
605
|
className: "text-text-secondary",
|
|
601
606
|
children: "Subtotal"
|
|
602
|
-
}), /* @__PURE__ */
|
|
607
|
+
}), /* @__PURE__ */ k("span", {
|
|
603
608
|
className: "text-text-primary",
|
|
604
|
-
children: ["USD ",
|
|
609
|
+
children: ["USD ", W.total.toFixed(2)]
|
|
605
610
|
})]
|
|
606
611
|
}),
|
|
607
|
-
/* @__PURE__ */
|
|
612
|
+
/* @__PURE__ */ k("div", {
|
|
608
613
|
className: "flex justify-between text-sm",
|
|
609
|
-
children: [/* @__PURE__ */
|
|
614
|
+
children: [/* @__PURE__ */ O("span", {
|
|
610
615
|
className: "text-text-secondary",
|
|
611
616
|
children: "Taxes (10%)"
|
|
612
|
-
}), /* @__PURE__ */
|
|
617
|
+
}), /* @__PURE__ */ k("span", {
|
|
613
618
|
className: "text-text-primary",
|
|
614
|
-
children: ["USD ", (
|
|
619
|
+
children: ["USD ", (W.total * .1).toFixed(2)]
|
|
615
620
|
})]
|
|
616
621
|
}),
|
|
617
|
-
/* @__PURE__ */
|
|
622
|
+
/* @__PURE__ */ k("div", {
|
|
618
623
|
className: "flex justify-between border-t border-border-seam pt-2 text-lg font-bold",
|
|
619
|
-
children: [/* @__PURE__ */
|
|
624
|
+
children: [/* @__PURE__ */ O("span", {
|
|
620
625
|
className: "text-text-primary",
|
|
621
626
|
children: "Total"
|
|
622
|
-
}), /* @__PURE__ */
|
|
627
|
+
}), /* @__PURE__ */ k("span", {
|
|
623
628
|
className: "text-status-success-text",
|
|
624
|
-
children: ["USD ", (
|
|
629
|
+
children: ["USD ", (W.total * 1.1).toFixed(2)]
|
|
625
630
|
})]
|
|
626
631
|
})
|
|
627
632
|
]
|
|
628
633
|
})]
|
|
629
634
|
}),
|
|
630
|
-
/* @__PURE__ */
|
|
635
|
+
/* @__PURE__ */ k(x, { children: [/* @__PURE__ */ O(v, {
|
|
631
636
|
disabled: !1,
|
|
632
|
-
children:
|
|
633
|
-
}), /* @__PURE__ */
|
|
637
|
+
children: A("ggnomad.tripPlan.checkoutDialog.cancel", "Cancel")
|
|
638
|
+
}), /* @__PURE__ */ O(_, {
|
|
634
639
|
onClick: (e) => {
|
|
635
|
-
e.preventDefault(),
|
|
640
|
+
e.preventDefault(), be();
|
|
636
641
|
},
|
|
637
|
-
children:
|
|
642
|
+
children: A("ggnomad.tripPlan.checkoutDialog.confirm", "Confirm & book all")
|
|
638
643
|
})] })
|
|
639
644
|
]
|
|
640
645
|
})
|
|
@@ -643,6 +648,6 @@ function j() {
|
|
|
643
648
|
});
|
|
644
649
|
}
|
|
645
650
|
//#endregion
|
|
646
|
-
export {
|
|
651
|
+
export { A as TripPlanDetailPage };
|
|
647
652
|
|
|
648
653
|
//# sourceMappingURL=TripPlanDetailPage.js.map
|