/** * YATRA DEPARTURE MANAGEMENT * Comprehensive departure view for travel booking businesses * Complete operational insights for tour operators */ import React, { useState } from "react"; import { useQuery } from "@tanstack/react-query"; import { __ } from "../lib/i18n"; import { formatDate as formatDateUtil } from "../lib/dateFormat"; import { apiClient } from "../lib/api-client"; import { Card, CardContent, CardHeader, CardTitle, CardDescription, } from "../components/ui/card"; // Button available for future use // import { Button } from '../components/ui/button'; import { Badge } from "../components/ui/badge"; // Skeleton Loading Components const SkeletonMetricCard = () => (
{__( "Missing or invalid departure ID or trip ID in the URL.", "yatra", )}
{(error as any)?.message || __("Unable to load departure details.", "yatra")}
{trip.starting_location || "--"}
{trip.ending_location || "--"}
{trip.difficulty_level || "--"}
{trip.group_type || "--"}
{trip.min_travelers || "--"}
{trip.max_travelers || "--"}
{trip.duration} {__("days", "yatra")}
{formatDate(trip.created_at)}
{formatCurrency(trip.price)}
{departure.notes}
{__("Click to view booking details", "yatra")}
{__( "This departure doesn't have any linked bookings.", "yatra", )}
{traveler.email && ( {traveler.email} )} {traveler.phone && ( {traveler.phone} )}
{__( "No travelers have been assigned to this departure.", "yatra", )}
{__("This departure has a custom price of", "yatra")}{" "} {formatCurrency(departure.price_override)} {__("instead of the standard trip price.", "yatra")}