Cleaned warehouse related UI and made all 15 pages consisitent

This commit is contained in:
Hagernesh
2026-07-11 06:50:33 +00:00
parent 290f013525
commit eec3d1863a
14 changed files with 985 additions and 361 deletions

View File

@@ -0,0 +1,48 @@
import { api as client } from "../auth/http";
export interface AiExtractedBooking {
customerName: string | null;
origin: string | null;
destination: string | null;
cargoType: string | null;
containerType: "20FT" | "40FT" | "BULK" | "RO_RO" | null;
quantity: number | null;
direction: "IMPORT" | "EXPORT" | null;
weightKg: number | null;
pickupRequired: boolean | null;
deliveryRequired: boolean | null;
}
export interface AiValidationResult {
valid: boolean;
errors: string[];
}
export interface AiRecommendation {
action: "CREATE_DRAFT_BOOKING" | "REQUEST_MISSING_INFORMATION";
message: string;
confidence: number;
}
export interface AiBookingExtractResult {
provider: "mock";
extracted: AiExtractedBooking;
validation: AiValidationResult;
recommendation: AiRecommendation;
}
interface AiBookingExtractResponse {
success: boolean;
data: AiBookingExtractResult;
timestamp: string;
}
export const extractBookingFromText = async (
text: string,
): Promise<AiBookingExtractResult> => {
const response = await client.post<AiBookingExtractResponse>(
"/ai/booking/extract",
{ text },
);
return response.data.data;
};