PluginProbe
Yatra – Travel Booking & Tour Operator Software / 3.0.14.1
Yatra – Travel Booking & Tour Operator Software v3.0.14.1
3.0.17 3.0.16 3.0.15 3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 All 85 releases
yatra / assets / dist / js / ViewBooking-DtCdk4c_.js

ViewBooking-DtCdk4c_.js in Yatra – Travel Booking & Tour Operator Software 3.0.14.1, at assets/dist/js/ViewBooking-DtCdk4c_.js

1,169 lines 69.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { j as jsxRuntimeExports, a5 as React, v as useMutation, d as Mail, x as ChevronDown, r as reactExports, u as useQuery, z as ArrowLeft, p as Calendar, U as Users, aY as Phone, az as AlertCircle, k as FileText, i as CreditCard, F as FileSignature, av as CheckCircle, ar as Clock, bj as Send } from "./react-vendor-xzSqHjRF.js";
2 import { u as useToast, _ as __, a as apiClient, i as getCountryName, e as formatDate, f as formatYatraMoney, b as apiService } from "./index-CbMRo6lO.js";
3 import { a9 as Popover, aa as PopoverTrigger, B as Button, ab as PopoverContent, u as usePermissions, N as Skeleton, C as Card, f as CardHeader, d as CardContent, P as PageHeader, r as ConditionalRender, g as CardTitle } from "../../admin/dist/js/app.js";
4 function phoneData() {
5 return window.yatraPhoneData || {};
6 }
7 function detectPhoneCountry(raw) {
8 raw = (raw || "").trim();
9 if (!raw || raw.charAt(0) !== "+") return null;
10 const digits = raw.replace(/\D+/g, "");
11 if (!digits) return null;
12 const countries = phoneData().countries || [];
13 const priority = phoneData().priority || {};
14 for (let len = Math.min(4, digits.length); len >= 1; len--) {
15 const prefix = digits.slice(0, len);
16 const matches = countries.filter((c) => c.dial === prefix);
17 if (matches.length) {
18 const iso = priority[prefix] || matches[0].iso;
19 return { iso, dial: prefix, national: digits.slice(len) };
20 }
21 }
22 return null;
23 }
24 function flagUrl(iso) {
25 const base = phoneData().flagBase || "";
26 return base ? `${base}${String(iso).toLowerCase()}.svg` : "";
27 }
28 function formatPhone(raw) {
29 const d = detectPhoneCountry(raw);
30 if (!d) return raw;
31 return `+${d.dial}${d.national ? " " + d.national : ""}`;
32 }
33 const PhoneDisplay = ({
34 value,
35 className
36 }) => {
37 const raw = (value || "").trim();
38 if (!raw) return null;
39 const detected = detectPhoneCountry(raw);
40 const url = detected ? flagUrl(detected.iso) : "";
41 return /* @__PURE__ */ jsxRuntimeExports.jsxs(
42 "span",
43 {
44 className,
45 style: { display: "inline-flex", alignItems: "center", gap: 6 },
46 children: [
47 url && /* @__PURE__ */ jsxRuntimeExports.jsx(
48 "img",
49 {
50 src: url,
51 alt: detected ? detected.iso : "",
52 width: 18,
53 height: 13,
54 loading: "lazy",
55 style: {
56 borderRadius: 2,
57 objectFit: "cover",
58 boxShadow: "0 0 0 1px rgba(0,0,0,0.08)",
59 flex: "0 0 auto"
60 }
61 }
62 ),
63 /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: detected ? formatPhone(raw) : raw })
64 ]
65 }
66 );
67 };
68 const EMAIL_ITEMS = [
69 { type: "confirmation", label: __("Booking confirmation", "yatra"), group: "customer" },
70 {
71 type: "payment_confirmation",
72 label: __("Payment confirmation", "yatra"),
73 group: "customer",
74 needsPayment: true
75 },
76 { type: "reminder", label: __("Trip reminder", "yatra"), group: "customer" },
77 {
78 type: "cancellation",
79 label: __("Cancellation notice", "yatra"),
80 group: "customer",
81 statuses: ["cancelled"]
82 },
83 {
84 type: "completed",
85 label: __("Trip completed / thank-you", "yatra"),
86 group: "customer",
87 statuses: ["completed"]
88 },
89 { type: "admin_new_booking", label: __("New booking", "yatra"), group: "admin" },
90 {
91 type: "admin_payment_received",
92 label: __("Payment received", "yatra"),
93 group: "admin",
94 needsPayment: true
95 }
96 ];
97 const ResendEmailMenu = ({
98 bookingId,
99 status = "",
100 amountPaid = 0
101 }) => {
102 const { showToast } = useToast();
103 const [open, setOpen] = React.useState(false);
104 const mutation = useMutation({
105 mutationFn: async (type) => {
106 const res = await apiClient.post(`/bookings/${bookingId}/send-email`, {
107 type
108 });
109 if (res && res.success === false) {
110 throw new Error(res.message || __("Failed to send email.", "yatra"));
111 }
112 return res;
113 },
114 onSuccess: (res) => {
115 showToast((res == null ? void 0 : res.message) || __("Email sent.", "yatra"), "success");
116 setOpen(false);
117 },
118 onError: (err) => {
119 showToast((err == null ? void 0 : err.message) || __("Failed to send email.", "yatra"), "error");
120 }
121 });
122 const paid = Number(amountPaid || 0) > 0;
123 const items = EMAIL_ITEMS.filter((item) => {
124 if (item.needsPayment && !paid) return false;
125 if (item.statuses && !item.statuses.includes(status)) return false;
126 return true;
127 });
128 const customerItems = items.filter((i) => i.group === "customer");
129 const adminItems = items.filter((i) => i.group === "admin");
130 const renderItem = (item) => /* @__PURE__ */ jsxRuntimeExports.jsx(
131 "button",
132 {
133 type: "button",
134 disabled: mutation.isPending,
135 onClick: () => mutation.mutate(item.type),
136 className: "w-full text-left px-3 py-2 text-sm rounded-md text-gray-700 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 disabled:opacity-50 disabled:cursor-not-allowed",
137 children: item.label
138 },
139 item.type
140 );
141 const groupLabel = (text) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-3 pt-2 pb-1 text-[11px] font-semibold uppercase tracking-wide text-gray-400 dark:text-gray-500", children: text });
142 return /* @__PURE__ */ jsxRuntimeExports.jsxs(Popover, { open, onOpenChange: setOpen, children: [
143 /* @__PURE__ */ jsxRuntimeExports.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { variant: "outline", className: "flex items-center gap-2", children: [
144 /* @__PURE__ */ jsxRuntimeExports.jsx(Mail, { className: "w-4 h-4" }),
145 __("Resend Email", "yatra"),
146 /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDown, { className: "w-4 h-4" })
147 ] }) }),
148 /* @__PURE__ */ jsxRuntimeExports.jsxs(PopoverContent, { align: "end", className: "w-64 p-1", children: [
149 customerItems.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
150 groupLabel(__("To customer", "yatra")),
151 customerItems.map(renderItem)
152 ] }),
153 adminItems.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
154 groupLabel(__("To admin", "yatra")),
155 adminItems.map(renderItem)
156 ] }),
157 mutation.isPending && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-3 py-2 text-xs text-gray-400", children: __("Sending…", "yatra") })
158 ] })
159 ] });
160 };
161 const ViewBooking = () => {
162 var _a, _b, _c, _d, _e, _f, _g, _h;
163 const { can } = usePermissions();
164 const bookingId = reactExports.useMemo(() => {
165 const params = new URLSearchParams(window.location.search);
166 return params.get("id") ? parseInt(params.get("id") || "0") : null;
167 }, []);
168 const { data: formConfig } = useQuery({
169 queryKey: ["booking-form-config"],
170 queryFn: async () => {
171 var _a2;
172 const response = await apiService.getSettings();
173 return ((_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.booking_form_config) || (response == null ? void 0 : response.booking_form_config) || null;
174 }
175 });
176 const travelerFields = reactExports.useMemo(() => {
177 var _a2;
178 if (!((_a2 = formConfig == null ? void 0 : formConfig.traveler_form) == null ? void 0 : _a2.fields)) return [];
179 return formConfig.traveler_form.fields.filter((field) => field.enabled).sort((a, b) => a.order - b.order);
180 }, [formConfig]);
181 const emergencyFields = reactExports.useMemo(() => {
182 var _a2;
183 if (!((_a2 = formConfig == null ? void 0 : formConfig.emergency_contact_form) == null ? void 0 : _a2.fields)) return [];
184 return formConfig.emergency_contact_form.fields.filter((field) => field.enabled).sort((a, b) => a.order - b.order);
185 }, [formConfig]);
186 const contactFields = reactExports.useMemo(() => {
187 var _a2;
188 if (!((_a2 = formConfig == null ? void 0 : formConfig.contact_form) == null ? void 0 : _a2.fields)) return [];
189 return formConfig.contact_form.fields.filter((field) => field.enabled).sort((a, b) => a.order - b.order);
190 }, [formConfig]);
191 const getFieldLabel = (fieldId, fields) => {
192 const field = fields.find((f) => f.id === fieldId);
193 return (field == null ? void 0 : field.label) || fieldId.replace(/_/g, " ").replace(/\b\w/g, (l) => l.toUpperCase());
194 };
195 const {
196 data: booking,
197 isLoading,
198 error
199 } = useQuery({
200 queryKey: ["booking", bookingId],
201 queryFn: async () => {
202 var _a2, _b2;
203 if (!bookingId) return null;
204 const result = await apiService.getBooking(bookingId);
205 if (!result) {
206 throw new Error("Failed to fetch booking");
207 }
208 const data = (result == null ? void 0 : result.data) ?? result;
209 if (data && data.id) {
210 const contact = data.contact || {};
211 return {
212 id: data.id,
213 booking_number: data.reference,
214 customer_name: data.customer_name || (((_a2 = data.contact) == null ? void 0 : _a2.first_name) && ((_b2 = data.contact) == null ? void 0 : _b2.last_name) ? `${data.contact.first_name} ${data.contact.last_name}`.trim() : `${data.contact_first_name || ""} ${data.contact_last_name || ""}`.trim()) || "N/A",
215 customer_email: data.customer_email || data.contact_email || contact.email || "",
216 customer_phone: data.customer_phone || data.contact_phone || contact.phone || "",
217 customer_country: data.contact_country || contact.country || "",
218 trip_id: data.trip_id,
219 trip_title: data.trip_title || `Trip #${data.trip_id}`,
220 trip_image: data.trip_image,
221 trip_price: (parseFloat(data.subtotal) || data.total_amount || 0) / (data.travelers_count || 1),
222 booking_date: data.created_at,
223 travel_date: data.travel_date,
224 travelers: data.travelers_count,
225 travelers_data: data.travelers || [],
226 total_amount: data.total_amount,
227 amount_paid: data.amount_paid || 0,
228 amount_due: data.amount_due || 0,
229 discount_amount: data.discount_amount || 0,
230 discount_code: data.discount_code || null,
231 currency: data.currency || "USD",
232 // Tax fields
233 subtotal: data.subtotal,
234 tax_amount: data.tax_amount,
235 tax_rate: data.tax_rate,
236 tax_inclusive: data.tax_inclusive,
237 tax_details: data.tax_details,
238 tax_breakdown: data.tax_breakdown,
239 taxable_amount: data.taxable_amount,
240 // Itinerary costs
241 itinerary_costs: data.itinerary_costs,
242 itinerary_costs_total: data.itinerary_costs_total,
243 // Additional services
244 additional_services: data.additional_services,
245 services_total: data.services_total,
246 // End tax fields
247 payment_status: data.payment_status,
248 booking_status: data.status,
249 payment_method: data.payment_gateway,
250 payment_date: data.payment_date,
251 notes: data.special_requests,
252 internal_notes: data.internal_notes,
253 emergency_contact: data.emergency_contact,
254 contact_data: data.contact_data,
255 payments: data.payments || [],
256 created_at: data.created_at,
257 updated_at: data.updated_at,
258 confirmed_at: data.confirmed_at,
259 completed_at: data.completed_at,
260 cancelled_at: data.cancelled_at,
261 cancellation_reason: data.cancellation_reason,
262 trip_details: data.trip_details,
263 google_calendar: data.google_calendar
264 };
265 }
266 return null;
267 },
268 enabled: !!bookingId && can("yatra_view_bookings")
269 });
270 const isPro = !!((_a = window.yatraAdmin) == null ? void 0 : _a.isPro);
271 const { data: consentStatus } = useQuery({
272 queryKey: ["booking-consent-status", bookingId],
273 queryFn: async () => {
274 if (!bookingId) return null;
275 const response = await apiClient.get(
276 `/bookings/${bookingId}/consent-status`
277 );
278 return (response == null ? void 0 : response.data) || null;
279 },
280 enabled: !!bookingId && isPro
281 });
282 const formatDate$1 = (dateString) => {
283 return formatDate(dateString);
284 };
285 const formatPrice = (price, currencyCode = "USD") => formatYatraMoney(Number(price) || 0, currencyCode, {
286 zeroAsUnknown: false
287 });
288 const getBookingStatusBadge = (status) => {
289 const statusMap = {
290 confirmed: {
291 className: "bg-green-100 text-green-700 dark:bg-green-900/20 dark:text-green-400",
292 label: __("Confirmed", "yatra")
293 },
294 pending: {
295 className: "bg-yellow-100 text-yellow-700 dark:bg-yellow-900/20 dark:text-yellow-400",
296 label: __("Pending", "yatra")
297 },
298 cancelled: {
299 className: "bg-red-100 text-red-700 dark:bg-red-900/20 dark:text-red-400",
300 label: __("Cancelled", "yatra")
301 },
302 completed: {
303 className: "bg-blue-100 text-blue-700 dark:bg-blue-900/20 dark:text-blue-400",
304 label: __("Completed", "yatra")
305 }
306 };
307 const statusInfo = statusMap[status] || {
308 className: "bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-400",
309 label: status
310 };
311 return /* @__PURE__ */ jsxRuntimeExports.jsx(
312 "span",
313 {
314 className: `inline-flex items-center px-3 py-1 rounded-md text-sm font-medium ${statusInfo.className}`,
315 children: statusInfo.label
316 }
317 );
318 };
319 const getPaymentStatusBadge = (status) => {
320 const statusMap = {
321 paid: {
322 className: "bg-green-100 text-green-700 dark:bg-green-900/20 dark:text-green-400",
323 label: __("Paid", "yatra")
324 },
325 pending: {
326 className: "bg-yellow-100 text-yellow-700 dark:bg-yellow-900/20 dark:text-yellow-400",
327 label: __("Pending", "yatra")
328 },
329 partial: {
330 className: "bg-orange-100 text-orange-700 dark:bg-orange-900/20 dark:text-orange-400",
331 label: __("Partial", "yatra")
332 },
333 refunded: {
334 className: "bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-400",
335 label: __("Refunded", "yatra")
336 }
337 };
338 const statusInfo = statusMap[status] || {
339 className: "bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-400",
340 label: status
341 };
342 return /* @__PURE__ */ jsxRuntimeExports.jsx(
343 "span",
344 {
345 className: `inline-flex items-center px-3 py-1 rounded-md text-sm font-medium ${statusInfo.className}`,
346 children: statusInfo.label
347 }
348 );
349 };
350 const handleBack = () => {
351 var _a2;
352 window.location.href = `${((_a2 = window.yatraAdmin) == null ? void 0 : _a2.siteUrl) || ""}/wp-admin/admin.php?page=yatra&subpage=bookings`;
353 };
354 const handleEdit = () => {
355 var _a2;
356 window.location.href = `${((_a2 = window.yatraAdmin) == null ? void 0 : _a2.siteUrl) || ""}/wp-admin/admin.php?page=yatra&subpage=bookings&action=edit&id=${bookingId}`;
357 };
358 if (isLoading) {
359 return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-3", children: [
360 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
361 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-2", children: [
362 /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-8 w-48" }),
363 /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-4 w-64" })
364 ] }),
365 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-2", children: [
366 /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-10 w-28" }),
367 /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-10 w-20" })
368 ] })
369 ] }),
370 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-3 gap-3", children: [
371 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "lg:col-span-2 space-y-3", children: [
372 /* @__PURE__ */ jsxRuntimeExports.jsxs(Card, { children: [
373 /* @__PURE__ */ jsxRuntimeExports.jsx(CardHeader, { className: "pb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
374 /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-5 w-36" }),
375 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
376 /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-6 w-20 rounded-md" }),
377 /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-6 w-16 rounded-md" })
378 ] })
379 ] }) }),
380 /* @__PURE__ */ jsxRuntimeExports.jsx(CardContent, { className: "space-y-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [...Array(6)].map((_, i) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1", children: [
381 /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-3 w-24" }),
382 /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-5 w-32" })
383 ] }, i)) }) })
384 ] }),
385 /* @__PURE__ */ jsxRuntimeExports.jsxs(Card, { children: [
386 /* @__PURE__ */ jsxRuntimeExports.jsx(CardHeader, { className: "pb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-5 w-40" }) }),
387 /* @__PURE__ */ jsxRuntimeExports.jsxs(CardContent, { className: "space-y-3", children: [
388 /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-5 w-36" }),
389 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-4", children: [
390 /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-4 w-48" }),
391 /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-4 w-32" })
392 ] })
393 ] })
394 ] }),
395 /* @__PURE__ */ jsxRuntimeExports.jsxs(Card, { children: [
396 /* @__PURE__ */ jsxRuntimeExports.jsx(CardHeader, { className: "pb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-5 w-16" }) }),
397 /* @__PURE__ */ jsxRuntimeExports.jsx(CardContent, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-20 w-full" }) })
398 ] })
399 ] }),
400 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-3", children: [
401 /* @__PURE__ */ jsxRuntimeExports.jsxs(Card, { children: [
402 /* @__PURE__ */ jsxRuntimeExports.jsx(CardHeader, { className: "pb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-5 w-36" }) }),
403 /* @__PURE__ */ jsxRuntimeExports.jsxs(CardContent, { className: "space-y-3", children: [
404 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1", children: [
405 /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-3 w-24" }),
406 /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-6 w-16 rounded-md" })
407 ] }),
408 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1", children: [
409 /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-3 w-28" }),
410 /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-4 w-24" })
411 ] }),
412 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1", children: [
413 /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-3 w-32" }),
414 /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-4 w-20" })
415 ] }),
416 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1", children: [
417 /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-3 w-24" }),
418 /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-6 w-28" })
419 ] })
420 ] })
421 ] }),
422 /* @__PURE__ */ jsxRuntimeExports.jsxs(Card, { children: [
423 /* @__PURE__ */ jsxRuntimeExports.jsx(CardHeader, { className: "pb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-5 w-20" }) }),
424 /* @__PURE__ */ jsxRuntimeExports.jsxs(CardContent, { className: "space-y-3", children: [
425 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1", children: [
426 /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-3 w-16" }),
427 /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-4 w-40" })
428 ] }),
429 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1", children: [
430 /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-3 w-24" }),
431 /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { className: "h-4 w-40" })
432 ] })
433 ] })
434 ] })
435 ] })
436 ] })
437 ] });
438 }
439 if (error || !booking) {
440 return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-3", children: [
441 /* @__PURE__ */ jsxRuntimeExports.jsx(
442 PageHeader,
443 {
444 title: __("Booking Not Found", "yatra"),
445 description: __(
446 "The booking you are looking for does not exist",
447 "yatra"
448 ),
449 actions: /* @__PURE__ */ jsxRuntimeExports.jsxs(
450 Button,
451 {
452 variant: "outline",
453 onClick: handleBack,
454 className: "flex items-center gap-2",
455 children: [
456 /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowLeft, { className: "w-4 h-4" }),
457 __("Back to Bookings", "yatra")
458 ]
459 }
460 )
461 }
462 ),
463 /* @__PURE__ */ jsxRuntimeExports.jsx(Card, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(CardContent, { className: "p-8 text-center text-red-500", children: __("Error loading booking or booking not found", "yatra") }) })
464 ] });
465 }
466 return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-3", children: [
467 /* @__PURE__ */ jsxRuntimeExports.jsx(
468 PageHeader,
469 {
470 title: __("Booking Details", "yatra"),
471 description: __("View complete booking information", "yatra"),
472 actions: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-2", children: [
473 /* @__PURE__ */ jsxRuntimeExports.jsx(ConditionalRender, { capability: "yatra_edit_bookings", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
474 ResendEmailMenu,
475 {
476 bookingId: Number(booking.id),
477 status: booking.booking_status,
478 amountPaid: Number(booking.amount_paid) || 0
479 }
480 ) }),
481 /* @__PURE__ */ jsxRuntimeExports.jsx(ConditionalRender, { capability: "yatra_edit_bookings", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { onClick: handleEdit, className: "flex items-center gap-2", children: __("Edit Booking", "yatra") }) }),
482 /* @__PURE__ */ jsxRuntimeExports.jsxs(
483 Button,
484 {
485 variant: "outline",
486 onClick: handleBack,
487 className: "flex items-center gap-2",
488 children: [
489 /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowLeft, { className: "w-4 h-4" }),
490 __("Back", "yatra")
491 ]
492 }
493 )
494 ] })
495 }
496 ),
497 /* @__PURE__ */ jsxRuntimeExports.jsx(ConditionalRender, { capability: "yatra_view_bookings", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-3 gap-3", children: [
498 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "lg:col-span-2 space-y-3", children: [
499 /* @__PURE__ */ jsxRuntimeExports.jsxs(Card, { children: [
500 /* @__PURE__ */ jsxRuntimeExports.jsx(CardHeader, { className: "pb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
501 /* @__PURE__ */ jsxRuntimeExports.jsx(CardTitle, { className: "text-base", children: __("Booking Overview", "yatra") }),
502 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
503 getBookingStatusBadge(booking.booking_status),
504 getPaymentStatusBadge(booking.payment_status)
505 ] })
506 ] }) }),
507 /* @__PURE__ */ jsxRuntimeExports.jsxs(CardContent, { className: "space-y-4", children: [
508 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
509 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
510 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-gray-500 dark:text-gray-400 uppercase tracking-wide mb-1", children: __("Booking Number", "yatra") }),
511 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-lg font-semibold text-gray-900 dark:text-white", children: booking.booking_number })
512 ] }),
513 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
514 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-gray-500 dark:text-gray-400 uppercase tracking-wide mb-1", children: __("Trip", "yatra") }),
515 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-lg font-semibold text-gray-900 dark:text-white", children: booking.trip_title }),
516 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-xs text-gray-500 dark:text-gray-400 mt-1", children: [
517 __("Trip ID", "yatra"),
518 ": #",
519 booking.trip_id
520 ] })
521 ] }),
522 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
523 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-xs text-gray-500 dark:text-gray-400 uppercase tracking-wide mb-1 flex items-center gap-1", children: [
524 /* @__PURE__ */ jsxRuntimeExports.jsx(Calendar, { className: "w-3 h-3" }),
525 __("Booking Date", "yatra")
526 ] }),
527 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-gray-900 dark:text-white", children: formatDate$1(booking.booking_date) })
528 ] }),
529 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
530 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-xs text-gray-500 dark:text-gray-400 uppercase tracking-wide mb-1 flex items-center gap-1", children: [
531 /* @__PURE__ */ jsxRuntimeExports.jsx(Calendar, { className: "w-3 h-3" }),
532 __("Travel Date", "yatra")
533 ] }),
534 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-gray-900 dark:text-white", children: formatDate$1(booking.travel_date) })
535 ] }),
536 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
537 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-xs text-gray-500 dark:text-gray-400 uppercase tracking-wide mb-1 flex items-center gap-1", children: [
538 /* @__PURE__ */ jsxRuntimeExports.jsx(Users, { className: "w-3 h-3" }),
539 __("Number of Travelers", "yatra")
540 ] }),
541 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-sm text-gray-900 dark:text-white", children: [
542 booking.travelers,
543 " ",
544 booking.travelers === 1 ? __("Traveler", "yatra") : __("Travelers", "yatra")
545 ] })
546 ] })
547 ] }),
548 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-4 pt-4 border-t border-gray-200 dark:border-gray-700", children: [
549 /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { className: "text-sm font-semibold text-gray-900 dark:text-white mb-3", children: __("Payment Summary", "yatra") }),
550 (() => {
551 const dbSubtotal = parseFloat(booking.subtotal) || booking.total_amount || 0;
552 const discountAmount = booking.discount_amount || 0;
553 const itineraryCostsTotal = parseFloat(booking.itinerary_costs_total) || 0;
554 const taxAmount = parseFloat(booking.tax_amount) || 0;
555 const taxInclusiveRaw = booking.tax_inclusive;
556 const taxInclusive = taxInclusiveRaw === true || parseInt(String(taxInclusiveRaw), 10) === 1;
557 const totalAmount = booking.total_amount || 0;
558 const amountPaid = booking.amount_paid || 0;
559 const amountDue = booking.amount_due || 0;
560 let taxLines = [];
561 const taxBreakdownRaw = booking.tax_breakdown;
562 if (Array.isArray(taxBreakdownRaw) && taxBreakdownRaw.length > 0) {
563 taxLines = taxBreakdownRaw;
564 } else {
565 const taxDetailsRaw = booking.tax_details;
566 if (taxDetailsRaw) {
567 try {
568 const parsed = typeof taxDetailsRaw === "string" ? JSON.parse(taxDetailsRaw) : taxDetailsRaw;
569 if (Array.isArray(parsed) && parsed.length > 0)
570 taxLines = parsed;
571 } catch (_) {
572 }
573 }
574 if (taxLines.length === 0 && taxAmount > 0) {
575 taxLines = [
576 {
577 name: __("Tax", "yatra"),
578 rate: parseFloat(booking.tax_rate) || 0,
579 amount: taxAmount
580 }
581 ];
582 }
583 }
584 let itineraryCosts = [];
585 const itineraryCostsRaw = booking.itinerary_costs;
586 if (typeof itineraryCostsRaw === "string") {
587 try {
588 itineraryCosts = JSON.parse(itineraryCostsRaw);
589 } catch (_) {
590 }
591 } else if (Array.isArray(itineraryCostsRaw)) {
592 itineraryCosts = itineraryCostsRaw;
593 }
594 const rawServices = booking.additional_services;
595 const selectedServices = Array.isArray(rawServices) ? rawServices.filter((s) => (s == null ? void 0 : s.selected) !== false) : [];
596 const getServiceAmt = (s) => parseFloat(
597 (s == null ? void 0 : s.total_price) ?? (s == null ? void 0 : s.calculated_price) ?? (s == null ? void 0 : s.total_cost) ?? (s == null ? void 0 : s.amount) ?? (s == null ? void 0 : s.unit_price) ?? (s == null ? void 0 : s.price) ?? 0
598 );
599 const servicesTotal = selectedServices.reduce(
600 (sum, s) => sum + getServiceAmt(s),
601 0
602 );
603 const baseTripCost = dbSubtotal - servicesTotal;
604 const taxableAmount = Math.max(0, dbSubtotal - discountAmount) + itineraryCostsTotal;
605 const hasServices = selectedServices.length > 0;
606 const hasDiscount = discountAmount > 0;
607 const hasItinerary = itineraryCosts.length > 0 && itineraryCostsTotal > 0;
608 const hasTax = taxLines.length > 0;
609 const showTaxableRow = hasTax && (hasDiscount || hasItinerary);
610 const Row = ({
611 label,
612 value,
613 sub = false,
614 green = false,
615 bold = false
616 }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
617 "div",
618 {
619 className: `flex justify-between text-sm${sub ? " ml-4" : ""}`,
620 children: [
621 /* @__PURE__ */ jsxRuntimeExports.jsx(
622 "span",
623 {
624 className: bold ? "font-semibold text-gray-900 dark:text-white" : "text-gray-600 dark:text-gray-400",
625 children: label
626 }
627 ),
628 /* @__PURE__ */ jsxRuntimeExports.jsx(
629 "span",
630 {
631 className: bold ? "font-semibold text-gray-900 dark:text-white" : green ? "text-green-600 dark:text-green-400" : "text-gray-900 dark:text-white",
632 children: value
633 }
634 )
635 ]
636 }
637 );
638 return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1.5", children: [
639 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between text-sm", children: [
640 /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-gray-600 dark:text-gray-400 flex items-center gap-1.5", children: [
641 __("Trip Base Price", "yatra"),
642 taxInclusive && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-blue-50 text-blue-700 dark:bg-blue-900/30 dark:text-blue-300", children: __("Tax Incl.", "yatra") })
643 ] }),
644 /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-gray-900 dark:text-white", children: formatPrice(baseTripCost, booking.currency) })
645 ] }),
646 hasServices && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
647 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between text-xs font-semibold uppercase tracking-wide text-gray-400 dark:text-gray-500 mt-1", children: [
648 /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
649 "+ ",
650 __("Additional Services", "yatra")
651 ] }),
652 /* @__PURE__ */ jsxRuntimeExports.jsx("span", {})
653 ] }),
654 selectedServices.map((s, i) => /* @__PURE__ */ jsxRuntimeExports.jsx(
655 Row,
656 {
657 sub: true,
658 label: (s == null ? void 0 : s.service_name) || (s == null ? void 0 : s.name) || (s == null ? void 0 : s.title) || (s == null ? void 0 : s.label) || __("Service", "yatra"),
659 value: formatPrice(
660 getServiceAmt(s),
661 booking.currency
662 )
663 },
664 i
665 )),
666 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between text-sm font-semibold border-t border-gray-200 dark:border-gray-600 pt-1.5 mt-0.5", children: [
667 /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-gray-900 dark:text-white", children: __("Gross Total", "yatra") }),
668 /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-gray-900 dark:text-white", children: formatPrice(dbSubtotal, booking.currency) })
669 ] })
670 ] }),
671 hasDiscount && /* @__PURE__ */ jsxRuntimeExports.jsx(
672 Row,
673 {
674 label: __("Discount", "yatra"),
675 value: `-${formatPrice(discountAmount, booking.currency)}`,
676 green: true
677 }
678 ),
679 hasItinerary && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
680 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between text-xs font-semibold uppercase tracking-wide text-gray-400 dark:text-gray-500 mt-1", children: [
681 /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
682 "+ ",
683 __("Itinerary Costs", "yatra")
684 ] }),
685 /* @__PURE__ */ jsxRuntimeExports.jsx("span", {})
686 ] }),
687 itineraryCosts.map((cost, i) => /* @__PURE__ */ jsxRuntimeExports.jsx(
688 Row,
689 {
690 sub: true,
691 label: `${cost.name} ${cost.price_per === "person" ? __("(per person)", "yatra") : cost.price_per === "group" ? __("(per booking)", "yatra") : __("(flat rate)", "yatra")}`,
692 value: formatPrice(
693 cost.total_cost ?? cost.price,
694 booking.currency
695 )
696 },
697 i
698 ))
699 ] }),
700 !taxInclusive && showTaxableRow && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between text-sm font-semibold border-t border-dashed border-gray-300 dark:border-gray-600 pt-1.5 mt-0.5", children: [
701 /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-gray-700 dark:text-gray-300", children: __("Taxable Amount", "yatra") }),
702 /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-gray-900 dark:text-white", children: formatPrice(taxableAmount, booking.currency) })
703 ] }),
704 hasTax && !taxInclusive && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
705 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between text-xs font-semibold uppercase tracking-wide text-gray-400 dark:text-gray-500 mt-1", children: [
706 /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
707 "+ ",
708 __("Tax", "yatra")
709 ] }),
710 /* @__PURE__ */ jsxRuntimeExports.jsx("span", {})
711 ] }),
712 taxLines.map((tax, i) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
713 "div",
714 {
715 className: "flex justify-between text-sm ml-4",
716 children: [
717 /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-gray-600 dark:text-gray-400", children: [
718 tax.name,
719 tax.rate > 0 ? ` (${tax.rate}%)` : ""
720 ] }),
721 /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-gray-900 dark:text-white", children: [
722 "+",
723 formatPrice(
724 parseFloat(tax.amount) || 0,
725 booking.currency
726 )
727 ] })
728 ]
729 },
730 i
731 ))
732 ] }),
733 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between text-base font-bold border-t-2 border-gray-800 dark:border-gray-300 pt-2 mt-1", children: [
734 /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-gray-900 dark:text-white", children: __("Net Amount", "yatra") }),
735 /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-gray-900 dark:text-white", children: formatPrice(totalAmount, booking.currency) })
736 ] }),
737 hasTax && taxInclusive && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-1 space-y-0.5", children: taxLines.map((tax, i) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
738 "div",
739 {
740 className: "text-xs text-gray-400 dark:text-gray-500 italic",
741 children: [
742 __("Incl.", "yatra"),
743 " ",
744 tax.name,
745 tax.rate > 0 ? ` (${tax.rate}%)` : "",
746 ":",
747 " ",
748 formatPrice(
749 parseFloat(tax.amount) || 0,
750 booking.currency
751 )
752 ]
753 },
754 i
755 )) }),
756 amountPaid > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(
757 Row,
758 {
759 label: __("Amount Paid", "yatra"),
760 value: formatPrice(amountPaid, booking.currency),
761 green: true
762 }
763 ),
764 amountDue > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between text-sm font-semibold", children: [
765 /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-orange-600 dark:text-orange-400", children: __("Due Now", "yatra") }),
766 /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-orange-600 dark:text-orange-400", children: formatPrice(amountDue, booking.currency) })
767 ] })
768 ] });
769 })()
770 ] })
771 ] })
772 ] }),
773 /* @__PURE__ */ jsxRuntimeExports.jsxs(Card, { children: [
774 /* @__PURE__ */ jsxRuntimeExports.jsx(CardHeader, { className: "pb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CardTitle, { className: "text-base", children: __("Customer Information", "yatra") }) }),
775 /* @__PURE__ */ jsxRuntimeExports.jsxs(CardContent, { className: "space-y-3", children: [
776 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
777 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm font-medium text-gray-900 dark:text-white mb-1", children: booking.customer_name }),
778 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-4 text-sm text-gray-600 dark:text-gray-400", children: [
779 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1.5", children: [
780 /* @__PURE__ */ jsxRuntimeExports.jsx(Mail, { className: "w-4 h-4" }),
781 booking.customer_email
782 ] }),
783 booking.customer_phone && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1.5", children: [
784 /* @__PURE__ */ jsxRuntimeExports.jsx(Phone, { className: "w-4 h-4" }),
785 /* @__PURE__ */ jsxRuntimeExports.jsx(PhoneDisplay, { value: booking.customer_phone })
786 ] })
787 ] })
788 ] }),
789 (() => {
790 const cd = booking.contact_data && typeof booking.contact_data === "object" ? booking.contact_data : {};
791 const CORE = ["first_name", "last_name", "email", "phone"];
792 const extras = Object.entries(cd).filter(
793 ([k, v]) => !CORE.includes(k) && k !== "country" && v != null && String(v).trim() !== ""
794 );
795 const countryCode = booking.customer_country || (cd.country ? String(cd.country) : "");
796 if (!countryCode && extras.length === 0) return null;
797 return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-3 pt-1 border-t border-gray-100 dark:border-gray-700", children: [
798 countryCode && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
799 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-gray-500 dark:text-gray-400 mb-0.5", children: getFieldLabel("country", contactFields) }),
800 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm font-medium text-gray-900 dark:text-white", children: getCountryName(countryCode) })
801 ] }),
802 extras.map(([fieldId, value]) => {
803 const field = contactFields.find(
804 (f) => f.id === fieldId
805 );
806 const display = (field == null ? void 0 : field.type) === "country" ? getCountryName(String(value)) : String(value);
807 return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
808 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-gray-500 dark:text-gray-400 mb-0.5", children: getFieldLabel(fieldId, contactFields) }),
809 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm font-medium text-gray-900 dark:text-white", children: display })
810 ] }, fieldId);
811 })
812 ] });
813 })()
814 ] })
815 ] }),
816 booking.travelers_data && booking.travelers_data.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(Card, { children: [
817 /* @__PURE__ */ jsxRuntimeExports.jsx(CardHeader, { className: "pb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(CardTitle, { className: "text-base flex items-center gap-2", children: [
818 /* @__PURE__ */ jsxRuntimeExports.jsx(Users, { className: "w-4 h-4" }),
819 ((_b = formConfig == null ? void 0 : formConfig.traveler_form) == null ? void 0 : _b.title) || __("Travelers Information", "yatra"),
820 /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "ml-2 text-xs font-normal text-gray-500 dark:text-gray-400", children: [
821 "(",
822 booking.travelers_data.length,
823 " ",
824 booking.travelers_data.length === 1 ? __("traveler", "yatra") : __("travelers", "yatra"),
825 ")"
826 ] })
827 ] }) }),
828 /* @__PURE__ */ jsxRuntimeExports.jsx(CardContent, { className: "space-y-4", children: booking.travelers_data.map(
829 (traveler, index) => {
830 const travelerFieldsData = traveler.fields || traveler;
831 const systemFields = [
832 "id",
833 "booking_id",
834 "traveller_index",
835 "is_lead",
836 "created_at",
837 "updated_at",
838 "fields"
839 ];
840 const travelerEntries = Object.entries(
841 travelerFieldsData
842 ).filter(([key, value]) => {
843 if (systemFields.includes(key)) return false;
844 if (!value || typeof value === "string" && value.trim() === "")
845 return false;
846 if (typeof value === "object" && !Array.isArray(value))
847 return false;
848 return true;
849 });
850 const firstName = travelerFieldsData.first_name || traveler.first_name || "";
851 const lastName = travelerFieldsData.last_name || traveler.last_name || "";
852 return /* @__PURE__ */ jsxRuntimeExports.jsxs(
853 "div",
854 {
855 className: `p-4 rounded-lg ${index === 0 ? "bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800" : "bg-gray-50 dark:bg-gray-800 border border-gray-200 dark:border-gray-700"}`,
856 children: [
857 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between mb-3", children: [
858 /* @__PURE__ */ jsxRuntimeExports.jsxs("h4", { className: "text-sm font-semibold text-gray-900 dark:text-white", children: [
859 index === 0 ? __("Lead Traveler", "yatra") : `${__("Traveler", "yatra")} ${index + 1}`,
860 (firstName || lastName) && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "font-normal text-gray-500 dark:text-gray-400 ml-2", children: [
861 "-",
862 " ",
863 [firstName, lastName].filter(Boolean).join(" ")
864 ] })
865 ] }),
866 index === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300 px-2 py-0.5 rounded", children: __("Primary Contact", "yatra") })
867 ] }),
868 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-2 md:grid-cols-3 gap-3", children: travelerEntries.map(([fieldId, fieldValue]) => {
869 if (fieldId === "first_name" || fieldId === "last_name")
870 return null;
871 const fieldConfig = travelerFields.find(
872 (f) => f.id === fieldId
873 );
874 const label = (fieldConfig == null ? void 0 : fieldConfig.label) || getFieldLabel(fieldId, travelerFields);
875 const isLongField = (fieldConfig == null ? void 0 : fieldConfig.type) === "textarea" || String(fieldValue).length > 50;
876 let displayValue = String(fieldValue);
877 if ((fieldConfig == null ? void 0 : fieldConfig.type) === "date" || fieldId.includes("date") || fieldId.includes("birth") || fieldId.includes("dob") || fieldId.includes("expiry")) {
878 displayValue = formatDate$1(fieldValue);
879 }
880 if ((fieldId === "nationality" || fieldId === "country") && fieldValue && typeof fieldValue === "string" && fieldValue.length === 2) {
881 displayValue = getCountryName(fieldValue);
882 }
883 return /* @__PURE__ */ jsxRuntimeExports.jsxs(
884 "div",
885 {
886 className: isLongField ? "col-span-2 md:col-span-3" : "",
887 children: [
888 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-gray-500 dark:text-gray-400 mb-0.5", children: label }),
889 /* @__PURE__ */ jsxRuntimeExports.jsx(
890 "div",
891 {
892 className: `text-sm text-gray-900 dark:text-white ${fieldId === "passport" ? "font-mono" : ""} capitalize`,
893 children: displayValue
894 }
895 )
896 ]
897 },
898 fieldId
899 );
900 }) }),
901 travelerEntries.length <= 2 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-gray-400 dark:text-gray-500 italic mt-2", children: __(
902 "Limited traveler information provided",
903 "yatra"
904 ) })
905 ]
906 },
907 index
908 );
909 }
910 ) })
911 ] }),
912 booking.emergency_contact && Object.values(booking.emergency_contact).some(
913 (v) => v && String(v).trim() !== ""
914 ) && /* @__PURE__ */ jsxRuntimeExports.jsxs(Card, { children: [
915 /* @__PURE__ */ jsxRuntimeExports.jsx(CardHeader, { className: "pb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(CardTitle, { className: "text-base flex items-center gap-2", children: [
916 /* @__PURE__ */ jsxRuntimeExports.jsx(AlertCircle, { className: "w-4 h-4" }),
917 ((_c = formConfig == null ? void 0 : formConfig.emergency_contact_form) == null ? void 0 : _c.title) || __("Emergency Contact", "yatra")
918 ] }) }),
919 /* @__PURE__ */ jsxRuntimeExports.jsx(CardContent, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-3", children: Object.entries(booking.emergency_contact).filter(
920 ([_, value]) => value && String(value).trim() !== ""
921 ).map(([fieldId, fieldValue]) => {
922 const label = getFieldLabel(fieldId, emergencyFields);
923 return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
924 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-gray-500 dark:text-gray-400 mb-0.5", children: label }),
925 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm font-medium text-gray-900 dark:text-white capitalize", children: String(fieldValue) })
926 ] }, fieldId);
927 }) }) })
928 ] }),
929 booking.notes && /* @__PURE__ */ jsxRuntimeExports.jsxs(Card, { children: [
930 /* @__PURE__ */ jsxRuntimeExports.jsx(CardHeader, { className: "pb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(CardTitle, { className: "text-base flex items-center gap-2", children: [
931 /* @__PURE__ */ jsxRuntimeExports.jsx(FileText, { className: "w-4 h-4" }),
932 __("Special Requests", "yatra")
933 ] }) }),
934 /* @__PURE__ */ jsxRuntimeExports.jsx(CardContent, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-gray-700 dark:text-gray-300 whitespace-pre-wrap", children: booking.notes }) })
935 ] })
936 ] }),
937 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-3", children: [
938 ((_d = window.yatraAdmin) == null ? void 0 : _d.isPro) && !!((_f = (_e = window.yatraAdmin) == null ? void 0 : _e.googleCalendar) == null ? void 0 : _f.enabled) && booking.google_calendar && /* @__PURE__ */ jsxRuntimeExports.jsxs(Card, { children: [
939 /* @__PURE__ */ jsxRuntimeExports.jsx(CardHeader, { className: "pb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CardTitle, { className: "text-base", children: __("Google Calendar Sync", "yatra") }) }),
940 /* @__PURE__ */ jsxRuntimeExports.jsx(CardContent, { className: "space-y-3", children: (() => {
941 const gc = booking.google_calendar;
942 const status = gc.sync_status || (gc.synced ? "synced" : "not_synced");
943 const statusClass = status === "synced" ? "bg-green-100 text-green-700 dark:bg-green-900/20 dark:text-green-400" : status === "failed" ? "bg-red-100 text-red-700 dark:bg-red-900/20 dark:text-red-400" : "bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-400";
944 return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
945 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
946 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-gray-500 dark:text-gray-400 uppercase tracking-wide mb-1", children: __("Status", "yatra") }),
947 /* @__PURE__ */ jsxRuntimeExports.jsx(
948 "span",
949 {
950 className: `inline-flex items-center px-3 py-1 rounded-md text-sm font-medium ${statusClass}`,
951 children: status
952 }
953 )
954 ] }),
955 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
956 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-gray-500 dark:text-gray-400 uppercase tracking-wide mb-1", children: __("Last Synced", "yatra") }),
957 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-gray-900 dark:text-white", children: gc.last_synced_at ? formatDate$1(gc.last_synced_at) : __("—", "yatra") })
958 ] }),
959 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
960 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-gray-500 dark:text-gray-400 uppercase tracking-wide mb-1", children: __("Calendar", "yatra") }),
961 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-gray-900 dark:text-white break-all", children: gc.calendar_id || __("—", "yatra") })
962 ] }),
963 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
964 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-gray-500 dark:text-gray-400 uppercase tracking-wide mb-1", children: __("Event ID", "yatra") }),
965 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-gray-900 dark:text-white font-mono break-all", children: gc.event_id || __("—", "yatra") })
966 ] }),
967 gc.error_message && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
968 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-gray-500 dark:text-gray-400 uppercase tracking-wide mb-1", children: __("Error", "yatra") }),
969 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-red-600 dark:text-red-400 whitespace-pre-wrap", children: gc.error_message })
970 ] })
971 ] });
972 })() })
973 ] }),
974 /* @__PURE__ */ jsxRuntimeExports.jsxs(Card, { children: [
975 /* @__PURE__ */ jsxRuntimeExports.jsx(CardHeader, { className: "pb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CardTitle, { className: "text-base", children: __("Payment Information", "yatra") }) }),
976 /* @__PURE__ */ jsxRuntimeExports.jsxs(CardContent, { className: "space-y-3", children: [
977 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
978 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-gray-500 dark:text-gray-400 uppercase tracking-wide mb-1", children: __("Payment Status", "yatra") }),
979 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-1", children: getPaymentStatusBadge(booking.payment_status) })
980 ] }),
981 booking.payment_method && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
982 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-xs text-gray-500 dark:text-gray-400 uppercase tracking-wide mb-1 flex items-center gap-1", children: [
983 /* @__PURE__ */ jsxRuntimeExports.jsx(CreditCard, { className: "w-3 h-3" }),
984 __("Payment Method", "yatra")
985 ] }),
986 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-gray-900 dark:text-white", children: booking.payment_method })
987 ] }),
988 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
989 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-xs text-gray-500 dark:text-gray-400 uppercase tracking-wide mb-1 flex items-center gap-1", children: [
990 __("Trip Price per Person", "yatra"),
991 ((v) => v === true || parseInt(String(v), 10) === 1)(
992 booking.tax_inclusive
993 ) && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-blue-50 text-blue-700 dark:bg-blue-900/30 dark:text-blue-300 normal-case tracking-normal", children: __("Tax Incl.", "yatra") })
994 ] }),
995 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-gray-900 dark:text-white", children: (() => {
996 const subtotal = parseFloat(booking.subtotal) || booking.total_amount || 0;
997 const travelers = booking.travelers || 1;
998 const rawServices = booking.additional_services;
999 const servicesTotal = Array.isArray(rawServices) ? rawServices.filter((s) => (s == null ? void 0 : s.selected) !== false).reduce(
1000 (sum, s) => sum + parseFloat(
1001 (s == null ? void 0 : s.total_price) ?? (s == null ? void 0 : s.calculated_price) ?? (s == null ? void 0 : s.total_cost) ?? (s == null ? void 0 : s.amount) ?? (s == null ? void 0 : s.unit_price) ?? (s == null ? void 0 : s.price) ?? 0
1002 ),
1003 0
1004 ) : 0;
1005 const baseTripCost = subtotal - servicesTotal;
1006 return formatPrice(
1007 baseTripCost / travelers,
1008 booking.currency
1009 );
1010 })() })
1011 ] }),
1012 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
1013 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-xs text-gray-500 dark:text-gray-400 uppercase tracking-wide mb-1 flex items-center gap-1", children: [
1014 __("Total Amount", "yatra"),
1015 ((v) => v === true || parseInt(String(v), 10) === 1)(
1016 booking.tax_inclusive
1017 ) && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-blue-50 text-blue-700 dark:bg-blue-900/30 dark:text-blue-300 normal-case tracking-normal", children: __("Tax Incl.", "yatra") })
1018 ] }),
1019 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-lg font-semibold text-gray-900 dark:text-white", children: formatPrice(booking.total_amount || 0, booking.currency) })
1020 ] })
1021 ] })
1022 ] }),
1023 booking.discount_amount > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(Card, { className: "border-emerald-200 dark:border-emerald-800 bg-emerald-50 dark:bg-emerald-900/20", children: [
1024 /* @__PURE__ */ jsxRuntimeExports.jsx(CardHeader, { className: "pb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(CardTitle, { className: "text-base flex items-center gap-2 text-emerald-700 dark:text-emerald-400", children: [
1025 /* @__PURE__ */ jsxRuntimeExports.jsxs(
1026 "svg",
1027 {
1028 width: "16",
1029 height: "16",
1030 viewBox: "0 0 24 24",
1031 fill: "none",
1032 stroke: "currentColor",
1033 strokeWidth: "2",
1034 className: "w-4 h-4",
1035 children: [
1036 /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M12 2L2 7l10 5 10-5-10-5z" }),
1037 /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M2 17l10 5 10-5" }),
1038 /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M2 12l10 5 10-5" })
1039 ]
1040 }
1041 ),
1042 __("Discount Applied", "yatra")
1043 ] }) }),
1044 /* @__PURE__ */ jsxRuntimeExports.jsxs(CardContent, { className: "space-y-3", children: [
1045 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
1046 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-emerald-600 dark:text-emerald-400 uppercase tracking-wide mb-1", children: __("Discount Type", "yatra") }),
1047 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm font-medium text-emerald-700 dark:text-emerald-300", children: ((_g = booking.discount_code) == null ? void 0 : _g.toLowerCase().includes("group")) || ((_h = booking.discount_code) == null ? void 0 : _h.includes("GROUP")) ? __("Group Discount", "yatra") : __("Coupon Discount", "yatra") })
1048 ] }),
1049 booking.discount_code && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
1050 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-emerald-600 dark:text-emerald-400 uppercase tracking-wide mb-1", children: __("Code", "yatra") }),
1051 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm font-mono font-medium text-emerald-700 dark:text-emerald-300 bg-emerald-100 dark:bg-emerald-900/40 px-2 py-1 rounded inline-block", children: booking.discount_code })
1052 ] }),
1053 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
1054 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-emerald-600 dark:text-emerald-400 uppercase tracking-wide mb-1", children: __("Savings", "yatra") }),
1055 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-xl font-bold text-emerald-700 dark:text-emerald-300", children: [
1056 "-",
1057 formatPrice(booking.discount_amount, booking.currency)
1058 ] })
1059 ] })
1060 ] })
1061 ] }),
1062 isPro && consentStatus && consentStatus.total_required > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(
1063 Card,
1064 {
1065 className: consentStatus.all_signed ? "border-green-200 dark:border-green-800 bg-green-50 dark:bg-green-900/20" : "border-amber-200 dark:border-amber-800 bg-amber-50 dark:bg-amber-900/20",
1066 children: [
1067 /* @__PURE__ */ jsxRuntimeExports.jsx(CardHeader, { className: "pb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
1068 CardTitle,
1069 {
1070 className: `text-base flex items-center gap-2 ${consentStatus.all_signed ? "text-green-700 dark:text-green-400" : "text-amber-700 dark:text-amber-400"}`,
1071 children: [
1072 /* @__PURE__ */ jsxRuntimeExports.jsx(FileSignature, { className: "w-4 h-4" }),
1073 __("Consent Status", "yatra")
1074 ]
1075 }
1076 ) }),
1077 /* @__PURE__ */ jsxRuntimeExports.jsxs(CardContent, { className: "space-y-3", children: [
1078 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1079 "span",
1080 {
1081 className: `text-sm ${consentStatus.all_signed ? "text-green-600 dark:text-green-400" : "text-amber-600 dark:text-amber-400"}`,
1082 children: consentStatus.all_signed ? /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "flex items-center gap-1", children: [
1083 /* @__PURE__ */ jsxRuntimeExports.jsx(CheckCircle, { className: "w-4 h-4" }),
1084 __("All Consents Signed", "yatra")
1085 ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "flex items-center gap-1", children: [
1086 /* @__PURE__ */ jsxRuntimeExports.jsx(Clock, { className: "w-4 h-4" }),
1087 __("Pending Signatures", "yatra")
1088 ] })
1089 }
1090 ) }),
1091 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between text-sm", children: [
1092 /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-gray-600 dark:text-gray-400", children: __("Signed", "yatra") }),
1093 /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "font-medium text-gray-900 dark:text-white", children: [
1094 consentStatus.total_signed,
1095 " /",
1096 " ",
1097 consentStatus.total_required
1098 ] })
1099 ] }),
1100 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full bg-gray-200 dark:bg-gray-700 rounded-full h-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1101 "div",
1102 {
1103 className: `h-2 rounded-full ${consentStatus.all_signed ? "bg-green-500" : "bg-amber-500"}`,
1104 style: {
1105 width: `${consentStatus.total_signed / consentStatus.total_required * 100}%`
1106 }
1107 }
1108 ) }),
1109 consentStatus.pending_requests && consentStatus.pending_requests.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "pt-2 border-t border-amber-200 dark:border-amber-700", children: [
1110 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-amber-600 dark:text-amber-400 uppercase tracking-wide mb-2", children: __("Pending", "yatra") }),
1111 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1", children: [
1112 consentStatus.pending_requests.slice(0, 3).map((req, idx) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
1113 "div",
1114 {
1115 className: "text-xs text-gray-600 dark:text-gray-400 flex items-center gap-1",
1116 children: [
1117 /* @__PURE__ */ jsxRuntimeExports.jsx(Send, { className: "w-3 h-3" }),
1118 req.recipient_name || req.recipient_email
1119 ]
1120 },
1121 idx
1122 )),
1123 consentStatus.pending_requests.length > 3 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-xs text-gray-500", children: [
1124 "+",
1125 consentStatus.pending_requests.length - 3,
1126 " ",
1127 __("more", "yatra")
1128 ] })
1129 ] })
1130 ] }),
1131 /* @__PURE__ */ jsxRuntimeExports.jsx(
1132 Button,
1133 {
1134 variant: "outline",
1135 size: "sm",
1136 className: "w-full mt-2",
1137 onClick: () => {
1138 var _a2;
1139 window.location.href = `${((_a2 = window.yatraAdmin) == null ? void 0 : _a2.siteUrl) || ""}/wp-admin/admin.php?page=yatra&subpage=trips&tab=trip-consent`;
1140 },
1141 children: __("Manage Consents", "yatra")
1142 }
1143 )
1144 ] })
1145 ]
1146 }
1147 ),
1148 /* @__PURE__ */ jsxRuntimeExports.jsxs(Card, { children: [
1149 /* @__PURE__ */ jsxRuntimeExports.jsx(CardHeader, { className: "pb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CardTitle, { className: "text-base", children: __("Timeline", "yatra") }) }),
1150 /* @__PURE__ */ jsxRuntimeExports.jsxs(CardContent, { className: "space-y-3", children: [
1151 /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
1152 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-gray-500 dark:text-gray-400 uppercase tracking-wide mb-1", children: __("Created", "yatra") }),
1153 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-gray-900 dark:text-white", children: formatDate$1(booking.created_at) })
1154 ] }),
1155 booking.updated_at && booking.updated_at !== booking.created_at && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
1156 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-gray-500 dark:text-gray-400 uppercase tracking-wide mb-1", children: __("Last Updated", "yatra") }),
1157 /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-gray-900 dark:text-white", children: formatDate$1(booking.updated_at) })
1158 ] })
1159 ] })
1160 ] })
1161 ] })
1162 ] }) })
1163 ] });
1164 };
1165 export {
1166 ViewBooking as default
1167 };
1168 //# sourceMappingURL=ViewBooking-DtCdk4c_.js.map
1169