mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 08:48:11 +00:00
add goverment booking
This commit is contained in:
@@ -659,6 +659,22 @@ export const api = {
|
||||
() => TRAIN_SCHEDULING_INVALIDATIONS,
|
||||
),
|
||||
|
||||
switchGovernmentBooking: endpoint<
|
||||
{ id: string; governmentBookingId: string; removeBookingIds: string[] },
|
||||
TrainScheduleDetail
|
||||
>(
|
||||
"train-scheduling",
|
||||
"switch-government-booking",
|
||||
({ id, governmentBookingId, removeBookingIds }) =>
|
||||
trainSchedulingService.switchGovernmentBooking(
|
||||
id,
|
||||
governmentBookingId,
|
||||
removeBookingIds,
|
||||
),
|
||||
undefined,
|
||||
() => TRAIN_SCHEDULING_INVALIDATIONS,
|
||||
),
|
||||
|
||||
setLoadingStatus: endpoint<
|
||||
{ id: string; bookingIds: string[]; loadingStatus: LoadingStatus },
|
||||
TrainScheduleDetail
|
||||
|
||||
@@ -114,6 +114,7 @@ export interface ContractView {
|
||||
savedSignature?: {
|
||||
signerDisplayName: string;
|
||||
signatureImageUrl?: string | null;
|
||||
stampImageUrl?: string | null;
|
||||
} | null;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,11 +6,14 @@ const SIGNATURE_URL = "/me/signature";
|
||||
export interface SavedSignature {
|
||||
signerDisplayName: string;
|
||||
signatureImageUrl?: string | null;
|
||||
stampImageUrl?: string | null;
|
||||
}
|
||||
|
||||
export interface SaveSignaturePayload {
|
||||
signerDisplayName: string;
|
||||
signatureImageBase64: string;
|
||||
/** Omit to keep the existing saved stamp. */
|
||||
stampImageBase64?: string;
|
||||
}
|
||||
|
||||
export const signaturesService = {
|
||||
|
||||
@@ -367,6 +367,18 @@ export const trainSchedulingService = {
|
||||
return unwrap(response.data);
|
||||
},
|
||||
|
||||
switchGovernmentBooking: async (
|
||||
scheduleId: string,
|
||||
governmentBookingId: string,
|
||||
removeBookingIds: string[],
|
||||
): Promise<TrainScheduleDetail> => {
|
||||
const response = await client.post<TrainScheduleDetail>(
|
||||
URL_CONSTANTS.TRAIN_SCHEDULING.SWITCH_GOVERNMENT_BOOKING(scheduleId),
|
||||
{ governmentBookingId, removeBookingIds },
|
||||
);
|
||||
return unwrap(response.data);
|
||||
},
|
||||
|
||||
pinWagons: async (
|
||||
scheduleId: string,
|
||||
payload: PinWagonsPayload,
|
||||
|
||||
Reference in New Issue
Block a user