fix: add missing properties to IStation interface

- Add 'country' property to match shared types package
- Add 'createdAt' property to match shared types package
- Add 'updatedAt' property to match shared types package

This fixes the TypeScript type mismatch error in StationsPage.tsx where
the local IStation type was missing properties required by the shared
@edr/types/passenger package during the Docker build.

Fixes: https://github.com/Tria-plc/edr-platform/actions/runs/26325256104/job/77502650459
This commit is contained in:
Stephanos A.
2026-05-28 10:13:11 +03:00
parent 1c65c326e5
commit c838e77349

View File

@@ -1,22 +1,25 @@
// ── Enums ──────────────────────────────────────────────────────────────────────
// ── Enums ────────────────────────────────────────────────────────────────
export type TripStatus = 'SCHEDULED' | 'BOARDING' | 'EN_ROUTE' | 'ARRIVED' | 'CANCELLED' | 'DELAYED';
export type SeatStatus = 'AVAILABLE' | 'HELD' | 'BOOKED' | 'BLOCKED';
export type ServiceClass = 'ECONOMY' | 'BUSINESS' | 'FIRST';
export type BookingStatus = 'DRAFT' | 'PENDING_PAYMENT' | 'CONFIRMED' | 'CANCELLED' | 'COMPLETED' | 'NO_SHOW';
export type PaymentMethod = 'TELEBIRR' | 'CBE_BIRR' | 'EBIRR' | 'CARD' | 'WALLET';
// ── Station ────────────────────────────────────────────────────────────────────
// ── Station ────────────────────────────────────────────────────────────────
export interface IStation {
id: string;
code: string;
name: string;
city: string;
country: string;
timezone: string;
lat: number;
lng: number;
createdAt: string | Date;
updatedAt: string | Date;
}
// ── Trip / Schedule ────────────────────────────────────────────────────────────
// ── Trip / Schedule ────────────────────────────────────────────────────────
export interface ITripStation {
id: string;
code: string;
@@ -62,7 +65,7 @@ export interface IStopTime {
station: IStation;
}
// ── Seat ───────────────────────────────────────────────────────────────────────
// ── Seat ────────────────────────────────────────────────────────────────────
export interface ISeat {
id: string;
number: string; // label from API
@@ -81,7 +84,7 @@ export interface ISeatMap {
coaches: ICoach[];
}
// ── Segment-based seats ────────────────────────────────────────────────────────
// ── Segment-based seats ────────────────────────────────────────────────────
export interface ISegment {
fromStationId: string;
toStationId: string;
@@ -119,7 +122,7 @@ export interface ISegmentConfirmResult {
segments: Array<{ fromStationId: string; toStationId: string; fromSequence: number; toSequence: number }>;
}
// ── Booking ────────────────────────────────────────────────────────────────────
// ── Booking ────────────────────────────────────────────────────────────────
export interface IBooking {
id: string;
bookingRef: string;
@@ -140,7 +143,7 @@ export interface IBooking {
payment?: { method: PaymentMethod; status: string };
}
// ── Ticket ─────────────────────────────────────────────────────────────────────
// ── Ticket ─────────────────────────────────────────────────────────────────
export interface ITicket {
id: string;
bookingId: string;
@@ -158,7 +161,7 @@ export interface ITicket {
qrPayload: string;
}
// ── Fare quote ─────────────────────────────────────────────────────────────────
// ── Fare quote ─────────────────────────────────────────────────────────────
export interface IFareQuote {
tripId: string;
serviceClass: ServiceClass;
@@ -171,7 +174,7 @@ export interface IFareQuote {
currency: string;
}
// ── Passenger ─────────────────────────────────────────────────────────────────
// ── Passenger ──────────────────────────────────────────────────────────────
export interface IPassengerProfile {
id: string;
fullName: string;
@@ -181,7 +184,7 @@ export interface IPassengerProfile {
bookings: IBooking[];
}
// ── Loyalty ────────────────────────────────────────────────────────────────────
// ── Loyalty ────────────────────────────────────────────────────────────────
export interface ILoyaltyAccount {
id: string;
passengerId: string;
@@ -192,7 +195,7 @@ export interface ILoyaltyAccount {
tierProgressPercent: number;
}
// ── Wallet ─────────────────────────────────────────────────────────────────────
// ── Wallet ─────────────────────────────────────────────────────────────────
export interface IWallet {
id: string;
passengerId: string;
@@ -200,7 +203,7 @@ export interface IWallet {
currency: string;
}
// ── Notification ───────────────────────────────────────────────────────────────
// ── Notification ───────────────────────────────────────────────────────────
export interface INotification {
id: string;
passengerId: string;
@@ -212,7 +215,7 @@ export interface INotification {
createdAt: string;
}
// ── Promotion ──────────────────────────────────────────────────────────────────
// ── Promotion ──────────────────────────────────────────────────────────────
export interface IPromotion {
id: string;
title: string;
@@ -225,7 +228,7 @@ export interface IPromotion {
active: boolean;
}
// ── Live tracking ──────────────────────────────────────────────────────────────
// ── Live tracking ──────────────────────────────────────────────────────────
export interface ILiveStatus {
tripId: string;
trainName: string;
@@ -241,7 +244,7 @@ export interface ILiveStatus {
updatedAt: string;
}
// ── Dashboard ──────────────────────────────────────────────────────────────────
// ── Dashboard ──────────────────────────────────────────────────────────────
export interface IDashboard {
user: { firstName: string; greetingKey: 'MORNING' | 'AFTERNOON' | 'EVENING' };
upcomingTicket: {