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