trips) adding package-tours option

This commit is contained in:
2026-02-19 13:08:25 -05:00
parent 50e216daec
commit dba9aa0416
51 changed files with 5581 additions and 57 deletions

View File

@@ -133,6 +133,7 @@ export interface FlightRoute {
export interface CreateFlightInput {
tripId: string;
userId: string;
parentId?: string;
confirmationNumber?: string;
price?: number;
currency?: string;
@@ -233,9 +234,17 @@ export function createFlight(input: CreateFlightInput): FlightBooking {
: 'Flight';
db.run(
`INSERT INTO plans (id, trip_id, user_id, type, status, title, position)
VALUES (?, ?, ?, 'transport', ?, ?, ?)`,
[planId, input.tripId, input.userId, input.status ?? 'idea', title, position]
`INSERT INTO plans (id, trip_id, user_id, type, status, title, parent_id, position)
VALUES (?, ?, ?, 'transport', ?, ?, ?, ?)`,
[
planId,
input.tripId,
input.userId,
input.status ?? 'idea',
title,
input.parentId ?? null,
position
]
);
// Create the flight booking