feat(appointments): show pickup appointments with source scope warnings

This commit is contained in:
2026-10-10 11:43:49 +08:00
parent 33e7e1e41b
commit 871c8c021b
5 changed files with 97 additions and 14 deletions
+23
View File
@@ -12,6 +12,29 @@ export interface ArrivalCalendarEntry {
arrivalType: 'ACTUAL' | 'ESTIMATED'
}
export interface PickupCalendarEntry {
containerBookingId: string
bookingNo: string
containerNo: string | null
destinationPortName: string | null
destinationWarehouseCode: string | null
fleetSupplierName: string | null
pickupAppointmentAt: string
actualPickupAt: string | null
}
export interface PickupCalendar {
records: PickupCalendarEntry[]
truncated: boolean
unclassifiedCount: number
scopeBasis: 'US_DESTINATION_WAREHOUSE'
timeBasis: 'SOURCE_LOCAL_UNSPECIFIED'
}
export async function listPickupCalendar(query: { from: string; to: string }, signal?: AbortSignal) {
return unwrapApiResponse(await http.get<ApiEnvelope<PickupCalendar>, ApiEnvelope<PickupCalendar>>(
'/platform/v1/terminal-drayages/calendar', { params: query, signal },
))
}
export async function listArrivalCalendar(query: { from: string; to: string }, signal?: AbortSignal) {
const response = await http.get<ApiEnvelope<ArrivalCalendarEntry[]>, ApiEnvelope<ArrivalCalendarEntry[]>>(
'/platform/v1/port-schedules/arrival-calendar', { params: query, signal },