mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 14:38:12 +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
|
// 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
|
// this. No default: nationality is a deliberate choice, same as the normal
|
||||||
// flow's search-step picker.
|
// 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 [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: "ETHIOPIAN", label: "🇪🇹 Ethiopian" },
|
||||||
{ value: "DJIBOUTIAN", label: "🇩🇯 Djiboutian" },
|
{ value: "DJIBOUTIAN", label: "🇩🇯 Djiboutian" },
|
||||||
{ value: "OTHER", label: "🌍 Other" },
|
{ value: "OTHER", label: "🌍 Other" },
|
||||||
@@ -1037,7 +1042,7 @@ export default function PackageDetailPage() {
|
|||||||
{/* Hero */}
|
{/* 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">
|
<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
|
<Image
|
||||||
src="/packages/kulubi.jpeg"
|
src="/packages/package.jpeg"
|
||||||
alt={pkg.name}
|
alt={pkg.name}
|
||||||
fill
|
fill
|
||||||
className="object-cover"
|
className="object-cover"
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ interface HolidayPackage {
|
|||||||
includedServices?: string[];
|
includedServices?: string[];
|
||||||
busTransferIncluded?: boolean;
|
busTransferIncluded?: boolean;
|
||||||
busTransferRoute?: string | null;
|
busTransferRoute?: string | null;
|
||||||
journeyType?: 'ONE_WAY' | 'ROUND_TRIP';
|
journeyType?: "ONE_WAY" | "ROUND_TRIP";
|
||||||
returnSchedule?: Schedule | null;
|
returnSchedule?: Schedule | null;
|
||||||
outboundSchedule?: Schedule;
|
outboundSchedule?: Schedule;
|
||||||
priceTiers: PriceTier[];
|
priceTiers: PriceTier[];
|
||||||
@@ -65,7 +65,8 @@ interface HolidayPackage {
|
|||||||
function fmtDate(iso: string, opts?: Intl.DateTimeFormatOptions): string {
|
function fmtDate(iso: string, opts?: Intl.DateTimeFormatOptions): string {
|
||||||
try {
|
try {
|
||||||
return new Date(iso).toLocaleDateString("en-US", {
|
return new Date(iso).toLocaleDateString("en-US", {
|
||||||
month: "short", day: "numeric",
|
month: "short",
|
||||||
|
day: "numeric",
|
||||||
...opts,
|
...opts,
|
||||||
timeZone: "Africa/Addis_Ababa",
|
timeZone: "Africa/Addis_Ababa",
|
||||||
});
|
});
|
||||||
@@ -91,7 +92,10 @@ function minPrice(
|
|||||||
): { amount: number; currency: string } | null {
|
): { amount: number; currency: string } | null {
|
||||||
if (!tiers?.length) return null;
|
if (!tiers?.length) return null;
|
||||||
const min = tiers.reduce((a, b) => (a.priceMinor < b.priceMinor ? a : b));
|
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 {
|
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) ───────────────────
|
// ─── Featured Card (first package — full-width, image left) ───────────────────
|
||||||
|
|
||||||
function FeaturedCard({ pkg }: { pkg: HolidayPackage }) {
|
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 price = minPrice(pkg.priceTiers, multiplier);
|
||||||
const origin = pkg.outboundSchedule?.originStation;
|
const origin = pkg.outboundSchedule?.originStation;
|
||||||
const dest = pkg.outboundSchedule?.destinationStation;
|
const dest = pkg.outboundSchedule?.destinationStation;
|
||||||
@@ -161,7 +165,7 @@ function FeaturedCard({ pkg }: { pkg: HolidayPackage }) {
|
|||||||
{/* ── Left: Image ── */}
|
{/* ── Left: Image ── */}
|
||||||
<div className="relative md:w-[46%] h-64 md:h-auto flex-shrink-0 overflow-hidden">
|
<div className="relative md:w-[46%] h-64 md:h-auto flex-shrink-0 overflow-hidden">
|
||||||
<Image
|
<Image
|
||||||
src="/packages/kulubi.jpeg"
|
src="/packages/package.jpeg"
|
||||||
alt={pkg.name}
|
alt={pkg.name}
|
||||||
fill
|
fill
|
||||||
className="object-cover group-hover:scale-105 transition-transform duration-700 ease-out"
|
className="object-cover group-hover:scale-105 transition-transform duration-700 ease-out"
|
||||||
@@ -189,7 +193,6 @@ function FeaturedCard({ pkg }: { pkg: HolidayPackage }) {
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* ── Right: Content ── */}
|
{/* ── Right: Content ── */}
|
||||||
@@ -319,7 +322,7 @@ function FeaturedCard({ pkg }: { pkg: HolidayPackage }) {
|
|||||||
// ─── Regular Package Card ─────────────────────────────────────────────────────
|
// ─── Regular Package Card ─────────────────────────────────────────────────────
|
||||||
|
|
||||||
function PackageCard({ pkg }: { pkg: HolidayPackage }) {
|
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 price = minPrice(pkg.priceTiers, multiplier);
|
||||||
const origin = pkg.outboundSchedule?.originStation;
|
const origin = pkg.outboundSchedule?.originStation;
|
||||||
const dest = pkg.outboundSchedule?.destinationStation;
|
const dest = pkg.outboundSchedule?.destinationStation;
|
||||||
|
|||||||
Reference in New Issue
Block a user