mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
Update package image
This commit is contained in:
BIN
apps/edr-passenger-web/portal/public/packages/package.jpeg
Normal file
BIN
apps/edr-passenger-web/portal/public/packages/package.jpeg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 75 KiB |
@@ -531,9 +531,14 @@ function PassengerCountModal({
|
||||
// uses) — package pricing/currency is fixed per tier and is never affected by
|
||||
// this. No default: nationality is a deliberate choice, same as the normal
|
||||
// flow's search-step picker.
|
||||
const [nationality, setNationality] = useState<"" | "ETHIOPIAN" | "DJIBOUTIAN" | "OTHER">("");
|
||||
const [nationality, setNationality] = useState<
|
||||
"" | "ETHIOPIAN" | "DJIBOUTIAN" | "OTHER"
|
||||
>("");
|
||||
const [showNationalityError, setShowNationalityError] = useState(false);
|
||||
const natOptions: Array<{ value: "ETHIOPIAN" | "DJIBOUTIAN" | "OTHER"; label: string }> = [
|
||||
const natOptions: Array<{
|
||||
value: "ETHIOPIAN" | "DJIBOUTIAN" | "OTHER";
|
||||
label: string;
|
||||
}> = [
|
||||
{ value: "ETHIOPIAN", label: "🇪🇹 Ethiopian" },
|
||||
{ value: "DJIBOUTIAN", label: "🇩🇯 Djiboutian" },
|
||||
{ value: "OTHER", label: "🌍 Other" },
|
||||
@@ -1037,7 +1042,7 @@ export default function PackageDetailPage() {
|
||||
{/* Hero */}
|
||||
<div className="relative h-56 md:h-80 bg-gradient-to-br from-[rgb(14,80,54)] to-[rgb(20,140,90)] overflow-hidden">
|
||||
<Image
|
||||
src="/packages/kulubi.jpeg"
|
||||
src="/packages/package.jpeg"
|
||||
alt={pkg.name}
|
||||
fill
|
||||
className="object-cover"
|
||||
|
||||
@@ -51,7 +51,7 @@ interface HolidayPackage {
|
||||
includedServices?: string[];
|
||||
busTransferIncluded?: boolean;
|
||||
busTransferRoute?: string | null;
|
||||
journeyType?: 'ONE_WAY' | 'ROUND_TRIP';
|
||||
journeyType?: "ONE_WAY" | "ROUND_TRIP";
|
||||
returnSchedule?: Schedule | null;
|
||||
outboundSchedule?: Schedule;
|
||||
priceTiers: PriceTier[];
|
||||
@@ -65,7 +65,8 @@ interface HolidayPackage {
|
||||
function fmtDate(iso: string, opts?: Intl.DateTimeFormatOptions): string {
|
||||
try {
|
||||
return new Date(iso).toLocaleDateString("en-US", {
|
||||
month: "short", day: "numeric",
|
||||
month: "short",
|
||||
day: "numeric",
|
||||
...opts,
|
||||
timeZone: "Africa/Addis_Ababa",
|
||||
});
|
||||
@@ -91,7 +92,10 @@ function minPrice(
|
||||
): { amount: number; currency: string } | null {
|
||||
if (!tiers?.length) return null;
|
||||
const min = tiers.reduce((a, b) => (a.priceMinor < b.priceMinor ? a : b));
|
||||
return { amount: (min.priceMinor * multiplier) / 100, currency: min.currency };
|
||||
return {
|
||||
amount: (min.priceMinor * multiplier) / 100,
|
||||
currency: min.currency,
|
||||
};
|
||||
}
|
||||
|
||||
function fmtPrice(minor: number, currency: string): string {
|
||||
@@ -148,7 +152,7 @@ function AvailBar({ booked, total }: { booked: number; total: number }) {
|
||||
// ─── Featured Card (first package — full-width, image left) ───────────────────
|
||||
|
||||
function FeaturedCard({ pkg }: { pkg: HolidayPackage }) {
|
||||
const multiplier = pkg.journeyType === 'ROUND_TRIP' ? 2 : 1;
|
||||
const multiplier = pkg.journeyType === "ROUND_TRIP" ? 2 : 1;
|
||||
const price = minPrice(pkg.priceTiers, multiplier);
|
||||
const origin = pkg.outboundSchedule?.originStation;
|
||||
const dest = pkg.outboundSchedule?.destinationStation;
|
||||
@@ -161,7 +165,7 @@ function FeaturedCard({ pkg }: { pkg: HolidayPackage }) {
|
||||
{/* ── Left: Image ── */}
|
||||
<div className="relative md:w-[46%] h-64 md:h-auto flex-shrink-0 overflow-hidden">
|
||||
<Image
|
||||
src="/packages/kulubi.jpeg"
|
||||
src="/packages/package.jpeg"
|
||||
alt={pkg.name}
|
||||
fill
|
||||
className="object-cover group-hover:scale-105 transition-transform duration-700 ease-out"
|
||||
@@ -189,7 +193,6 @@ function FeaturedCard({ pkg }: { pkg: HolidayPackage }) {
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
</div>
|
||||
|
||||
{/* ── Right: Content ── */}
|
||||
@@ -319,7 +322,7 @@ function FeaturedCard({ pkg }: { pkg: HolidayPackage }) {
|
||||
// ─── Regular Package Card ─────────────────────────────────────────────────────
|
||||
|
||||
function PackageCard({ pkg }: { pkg: HolidayPackage }) {
|
||||
const multiplier = pkg.journeyType === 'ROUND_TRIP' ? 2 : 1;
|
||||
const multiplier = pkg.journeyType === "ROUND_TRIP" ? 2 : 1;
|
||||
const price = minPrice(pkg.priceTiers, multiplier);
|
||||
const origin = pkg.outboundSchedule?.originStation;
|
||||
const dest = pkg.outboundSchedule?.destinationStation;
|
||||
|
||||
Reference in New Issue
Block a user