mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 08:48:11 +00:00
feat(bookings): Introduce DRAFT booking workflow with comprehensive features for pricing, document management, submission, and cancellation.
This commit is contained in:
@@ -8,7 +8,11 @@ import type {
|
||||
UpdateFileUploadFieldDto,
|
||||
UpdateFileUploadSettingDto,
|
||||
} from "@/types/fileUploadSettings";
|
||||
import { bookingsService, CreateBookingPayload } from "./bookings.service";
|
||||
import {
|
||||
bookingsService,
|
||||
CreateBookingPayload,
|
||||
GeneratePriceResponse,
|
||||
} from "./bookings.service";
|
||||
import { consignmentsService } from "./consignments.service";
|
||||
import { trackingService } from "./tracking.service";
|
||||
import { fileUploadSettingsService } from "./fileUploadSettings.service";
|
||||
@@ -144,6 +148,31 @@ export const api = {
|
||||
remove: endpoint<{ id: string }, void>("bookings", "remove", ({ id }) =>
|
||||
bookingsService.remove(id),
|
||||
),
|
||||
|
||||
cancel: endpoint<{ id: string; reason: string }, Freight.IBooking>(
|
||||
"bookings",
|
||||
"cancel",
|
||||
({ id, reason }) => bookingsService.cancel(id, reason),
|
||||
),
|
||||
|
||||
generatePrice: endpoint<{ id: string }, GeneratePriceResponse>(
|
||||
"bookings",
|
||||
"generatePrice",
|
||||
({ id }) => bookingsService.generatePrice(id),
|
||||
),
|
||||
|
||||
submit: endpoint<{ id: string }, Freight.IBooking>(
|
||||
"bookings",
|
||||
"submit",
|
||||
({ id }) => bookingsService.submit(id),
|
||||
),
|
||||
|
||||
uploadDocuments: endpoint<
|
||||
{ id: string; files: Record<string, File | File[] | null> },
|
||||
Freight.IBooking
|
||||
>("bookings", "uploadDocuments", ({ id, files }) =>
|
||||
bookingsService.uploadDocuments(id, files),
|
||||
),
|
||||
},
|
||||
|
||||
consignments: {
|
||||
|
||||
Reference in New Issue
Block a user