@odynn/awayz-core 0.9.20 → 0.9.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/TripsService-GImsS17_.js +148 -0
- package/dist/assets/_styles6.css +1 -1
- package/dist/components/Bookings/FlightBooking/FlightBooking.js +123 -85
- package/dist/components/CashValue/CashValue.js +1 -1
- package/dist/components/CashValue/CashValue.stories.js +1 -1
- package/dist/components/ClientPointsValue/ClientPointsValue.js +1 -1
- package/dist/components/Wallet/Card/Card.stories.js +1 -1
- package/dist/hooks/useAwayzAuth/useAwayzAuth.js +1 -1
- package/dist/hooks/useBookingManagement/useBookingManagement.js +1 -1
- package/dist/hooks/useBookingManagement/useBookingManagement.test.js +1 -1
- package/dist/hooks/useFeatureFlags.js +1 -1
- package/dist/hooks/useSearchLimit.js +1 -1
- package/dist/hooks/useTripManagement/mocks/index.js +12 -12
- package/dist/hooks/useTripManagement/useTripManagement.js +2 -2
- package/dist/hooks/useTripManagement/useTripManagement.test.js +122 -92
- package/dist/hooks/useWallet/useWallet.js +41 -41
- package/dist/hooks/useWallet/useWallet.test.js +1 -1
- package/dist/lib/components/Bookings/FlightBooking/FlightBooking.d.ts +15 -3
- package/dist/lib/hooks/useTripManagement/mocks/UncategorisedBookings200.json.d.ts +88 -0
- package/dist/lib/services/trips/TripService.types.d.ts +11 -0
- package/dist/main.js +1 -1
- package/dist/{noRetryInstance-De2sH_IH.js → noRetryInstance-DKhe8ju0.js} +35 -35
- package/dist/providers/AwayzProvider.js +1 -1
- package/dist/services/account/AccountService.js +1 -1
- package/dist/services/bookings/BookingService.js +1 -1
- package/dist/services/currency/CurrencyService.js +1 -1
- package/dist/services/features/featureService.js +1 -1
- package/dist/services/index.js +1 -1
- package/dist/services/instance.js +1 -1
- package/dist/services/instanceConfig.js +1 -1
- package/dist/services/noRetryInstance.js +1 -1
- package/dist/services/preferences/PreferencesService.js +1 -1
- package/dist/services/rewards/RewardsService.js +1 -1
- package/dist/services/trips/TripsService.js +3 -3
- package/dist/services/wallet/WalletService.js +1 -1
- package/dist/utils/clientPoints.js +1 -1
- package/package.json +1 -1
- package/dist/TripsService-BJPYRlRO.js +0 -141
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
var v = Object.defineProperty;
|
|
2
|
+
var f = (r, e, a) => e in r ? v(r, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : r[e] = a;
|
|
3
|
+
var n = (r, e, a) => f(r, typeof e != "symbol" ? e + "" : e, a);
|
|
4
|
+
import "./arrayExtensions-DlcBOj5a.js";
|
|
5
|
+
import { c as i, f as u, b as d, r as D } from "./noRetryInstance-DKhe8ju0.js";
|
|
6
|
+
import "react";
|
|
7
|
+
import { DEFAULT_LOGO as S } from "./configs/defaultAwayzConfig.js";
|
|
8
|
+
import { EMyTripsEndpoints as o } from "./configs/endpoints.js";
|
|
9
|
+
import { EBookingType as y } from "./services/trips/TripService.types.js";
|
|
10
|
+
const I = "https://assets.duffel.com/img/airlines/for-light-background/full-color-lockup/";
|
|
11
|
+
class O {
|
|
12
|
+
constructor() {
|
|
13
|
+
n(this, "createTrip", async (e) => {
|
|
14
|
+
const { data: a } = await i.post(
|
|
15
|
+
o.TRIPS,
|
|
16
|
+
u({
|
|
17
|
+
...e,
|
|
18
|
+
hotel_bookings: [],
|
|
19
|
+
flight_bookings: []
|
|
20
|
+
})
|
|
21
|
+
);
|
|
22
|
+
return a;
|
|
23
|
+
});
|
|
24
|
+
n(this, "getTripsByStatus", async (e) => {
|
|
25
|
+
const { data: a } = await i.get(
|
|
26
|
+
o.TRIPS,
|
|
27
|
+
{
|
|
28
|
+
params: { status: e }
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
if (!(a != null && a.success))
|
|
32
|
+
return [];
|
|
33
|
+
const s = a.data.map((c) => ({
|
|
34
|
+
...c,
|
|
35
|
+
flightBookings: T(c.flight_bookings ?? []),
|
|
36
|
+
hotelBookings: b(c.hotel_bookings ?? [])
|
|
37
|
+
}));
|
|
38
|
+
return d(s);
|
|
39
|
+
});
|
|
40
|
+
n(this, "updateTrip", async (e, a) => {
|
|
41
|
+
const { data: s } = await i.put(
|
|
42
|
+
`${o.TRIPS}/${e}`,
|
|
43
|
+
D(u(a))
|
|
44
|
+
);
|
|
45
|
+
return s != null && s.success ? {
|
|
46
|
+
success: !0,
|
|
47
|
+
data: d(s.data),
|
|
48
|
+
message: "Trip updated successfully."
|
|
49
|
+
} : {
|
|
50
|
+
success: !1,
|
|
51
|
+
message: "An error occurred while trying to update the trip."
|
|
52
|
+
};
|
|
53
|
+
});
|
|
54
|
+
n(this, "deleteTrip", async (e) => {
|
|
55
|
+
const { data: a } = await i.delete(
|
|
56
|
+
`${o.TRIPS}/${e}`
|
|
57
|
+
);
|
|
58
|
+
return a;
|
|
59
|
+
});
|
|
60
|
+
n(this, "getUncategorisedBookings", async () => {
|
|
61
|
+
const { data: e } = await i.get(
|
|
62
|
+
o.UNCATEGORISED_BOOKINGS
|
|
63
|
+
);
|
|
64
|
+
return e != null && e.success ? {
|
|
65
|
+
flightBookings: T(e.data.flight_bookings ?? []),
|
|
66
|
+
hotelBookings: b(e.data.hotel_bookings ?? [])
|
|
67
|
+
} : {
|
|
68
|
+
flightBookings: [],
|
|
69
|
+
hotelBookings: []
|
|
70
|
+
};
|
|
71
|
+
});
|
|
72
|
+
n(this, "addBookingToTrip", async (e, a, s) => {
|
|
73
|
+
const { data: t } = await i.put(o.ADD_BOOKING, {
|
|
74
|
+
trip_id: e,
|
|
75
|
+
booking_id: a,
|
|
76
|
+
booking_type: s
|
|
77
|
+
});
|
|
78
|
+
return t.success;
|
|
79
|
+
});
|
|
80
|
+
n(this, "removeBookingFromTrip", async (e, a, s) => {
|
|
81
|
+
const { data: t } = await i.put(
|
|
82
|
+
o.REMOVE_BOOKING,
|
|
83
|
+
u({
|
|
84
|
+
trip_id: e,
|
|
85
|
+
booking_id: a,
|
|
86
|
+
booking_type: s
|
|
87
|
+
})
|
|
88
|
+
);
|
|
89
|
+
return t.success;
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
const T = (r) => r.map((e) => {
|
|
94
|
+
var c, l, _, g;
|
|
95
|
+
const a = e.slices.length > 1, s = e.slices[0], t = a ? e.slices.getLast() : void 0;
|
|
96
|
+
return d({
|
|
97
|
+
id: e._id,
|
|
98
|
+
reference: e.booking_reference,
|
|
99
|
+
startDate: e.departure_date,
|
|
100
|
+
endDate: e.arrival_date,
|
|
101
|
+
bookingType: y.FLIGHT,
|
|
102
|
+
airlines: e.slices.map((p) => {
|
|
103
|
+
var m;
|
|
104
|
+
return {
|
|
105
|
+
logo: (m = p.carriers.operating_iata_codes) != null && m.length ? `${I}${p.carriers.operating_iata_codes[0]}.svg` : S,
|
|
106
|
+
name: p.carriers.operating[0]
|
|
107
|
+
};
|
|
108
|
+
}),
|
|
109
|
+
arrival: {
|
|
110
|
+
airportCode: s.destination,
|
|
111
|
+
location: ""
|
|
112
|
+
},
|
|
113
|
+
departure: {
|
|
114
|
+
airportCode: s.origin,
|
|
115
|
+
location: ""
|
|
116
|
+
},
|
|
117
|
+
class: s.fare_brand_name,
|
|
118
|
+
passengers: e.passengers.length,
|
|
119
|
+
hasAirlineChanges: !1,
|
|
120
|
+
orderId: e.order_id,
|
|
121
|
+
type: e.type,
|
|
122
|
+
cancelledAt: e.cancelled_at,
|
|
123
|
+
isRoundTrip: a,
|
|
124
|
+
outboundArrivalDate: (l = (c = s.segments) == null ? void 0 : c.getLast()) == null ? void 0 : l.arriving_at,
|
|
125
|
+
inboundDepartureDate: t ? (g = (_ = t.segments) == null ? void 0 : _[0]) == null ? void 0 : g.departing_at : void 0,
|
|
126
|
+
inboundDeparture: t ? { airportCode: t.origin, location: "" } : void 0,
|
|
127
|
+
inboundArrival: t ? { airportCode: t.destination, location: "" } : void 0
|
|
128
|
+
});
|
|
129
|
+
}), b = (r) => r.map(
|
|
130
|
+
(e) => d({
|
|
131
|
+
id: e._id,
|
|
132
|
+
reference: e.reference,
|
|
133
|
+
startDate: e.check_in_date,
|
|
134
|
+
endDate: e.check_out_date,
|
|
135
|
+
bookingType: y.HOTEL,
|
|
136
|
+
name: e.rooms[0].name,
|
|
137
|
+
image: e.images[0],
|
|
138
|
+
guests: e.guests.length,
|
|
139
|
+
address: Object.values(e.address).filter((a) => a).map((a) => a.trim()).join(", "),
|
|
140
|
+
rooms: e.rooms.length,
|
|
141
|
+
bookingId: e.booking_id,
|
|
142
|
+
cancelledAt: e.cancelled_at
|
|
143
|
+
})
|
|
144
|
+
), L = new O();
|
|
145
|
+
export {
|
|
146
|
+
I as D,
|
|
147
|
+
L as T
|
|
148
|
+
};
|
package/dist/assets/_styles6.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import"https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap";*{font-family:Inter,sans-serif!important;margin:0;padding:0;box-sizing:border-box}:root{font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.selected-flight-card{width:380px;padding:1px;border-radius:.5rem;position:relative;overflow:hidden;background:linear-gradient(90deg,transparent 0%,transparent 10%,var(--border, #e7eef3) 10%,var(--border, #e7eef3) 90%,transparent 90%,transparent 100%);animation:fade-in .3s ease-in-out both;transition:all .2s ease-in-out;cursor:pointer}.selected-flight-card:nth-child(1){animation-delay:.1s}.selected-flight-card:nth-child(2){animation-delay:.2s}.selected-flight-card:nth-child(3){animation-delay:.3s}.selected-flight-card:nth-child(4){animation-delay:.4s}.selected-flight-card:nth-child(5){animation-delay:.5s}.selected-flight-card:nth-child(6){animation-delay:.6s}.selected-flight-card:nth-child(7){animation-delay:.7s}.selected-flight-card:nth-child(8){animation-delay:.8s}.selected-flight-card:nth-child(9){animation-delay:.9s}.selected-flight-card:nth-child(10){animation-delay:1s}.selected-flight-card:hover{filter:drop-shadow(0px 0px 20px rgba(2,66,109,.1))}.selected-flight-card:before{content:"";position:absolute;box-sizing:content-box;aspect-ratio:1;height:30px;width:30px;border-radius:100%;border:14rem solid var(--border, #e7eef3);top:
|
|
1
|
+
@import"https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap";*{font-family:Inter,sans-serif!important;margin:0;padding:0;box-sizing:border-box}:root{font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.selected-flight-card{--cutout-top: 180px;width:380px;padding:1px;border-radius:.5rem;position:relative;overflow:hidden;background:linear-gradient(90deg,transparent 0%,transparent 10%,var(--border, #e7eef3) 10%,var(--border, #e7eef3) 90%,transparent 90%,transparent 100%);animation:fade-in .3s ease-in-out both;transition:all .2s ease-in-out;cursor:pointer}.selected-flight-card:nth-child(1){animation-delay:.1s}.selected-flight-card:nth-child(2){animation-delay:.2s}.selected-flight-card:nth-child(3){animation-delay:.3s}.selected-flight-card:nth-child(4){animation-delay:.4s}.selected-flight-card:nth-child(5){animation-delay:.5s}.selected-flight-card:nth-child(6){animation-delay:.6s}.selected-flight-card:nth-child(7){animation-delay:.7s}.selected-flight-card:nth-child(8){animation-delay:.8s}.selected-flight-card:nth-child(9){animation-delay:.9s}.selected-flight-card:nth-child(10){animation-delay:1s}.selected-flight-card:hover{filter:drop-shadow(0px 0px 20px rgba(2,66,109,.1))}.selected-flight-card:before{content:"";position:absolute;box-sizing:content-box;aspect-ratio:1;height:30px;width:30px;border-radius:100%;border:14rem solid var(--border, #e7eef3);top:var(--cutout-top);left:0;transform:translate(-50%,-50%)}.selected-flight-card:after{content:"";position:absolute;box-sizing:content-box;aspect-ratio:1;height:30px;width:30px;border-radius:100%;border:14rem solid var(--border, #e7eef3);top:var(--cutout-top);right:0;transform:translate(50%,-50%)}.selected-flight-card .cancelled-notice{background-color:rgba(var(--warning, #ff7f2f),.1);font-weight:600;padding:.25rem;border-radius:.5rem;border:2px solid var(--warning, #ff7f2f);color:var(--warning, #ff7f2f);font-size:.8rem;text-align:center;width:fit-content}.selected-flight-card .content{overflow:hidden;padding:1rem;padding-bottom:0;border-radius:.4rem;width:100%;margin:0 auto;position:relative;height:100%;z-index:1;display:flex;flex-direction:column;gap:1rem;background:linear-gradient(90deg,transparent 0%,transparent 10%,var(--foreground, #fff) 10%,var(--foreground, #fff) 90%,transparent 90%,transparent 100%)}.selected-flight-card .content *{z-index:2}.selected-flight-card .content:before{content:"";position:absolute;box-sizing:content-box;aspect-ratio:1;height:31px;width:31px;border-radius:100%;border:14rem solid var(--foreground, #fff);top:calc(var(--cutout-top) - 1px);left:-1.5px;transform:translate(-50%,-50%)}.selected-flight-card .content:after{content:"";position:absolute;box-sizing:content-box;aspect-ratio:1;height:31px;width:31px;border-radius:100%;border:14rem solid var(--foreground, #fff);top:calc(var(--cutout-top) - 1px);right:-1px;transform:translate(49.99%,-50%)}.selected-flight-card .top-section{flex:1;min-height:calc(var(--cutout-top) - 1rem - 20px)}.selected-flight-card .top-section .header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem}.selected-flight-card .top-section .header>div{display:flex;align-items:center;gap:.5rem}.selected-flight-card .top-section .header .airline-logo,.selected-flight-card .top-section .header .airline-logo img{max-height:20px}.selected-flight-card .top-section .header .id-and-icon{display:flex;align-items:center;gap:1rem}.selected-flight-card .top-section .header .id-and-icon>span{font-weight:700}.selected-flight-card .top-section .header .id-and-icon .context-button{display:flex;border:1px solid var(--border, #e7eef3);border-radius:.5rem;padding:.5rem;color:var(--text-light, rgba(37, 46, 52, .2509803922));cursor:pointer}.selected-flight-card .top-section .header .id-and-icon .context-button:hover{background-color:var(--border, #e7eef3)}.selected-flight-card .top-section .flight{display:flex;align-items:center;font-size:1.8rem;position:relative;justify-content:space-between}.selected-flight-card .top-section .flight *{z-index:2}.selected-flight-card .top-section .flight .flight-trail{margin:5px 0;height:2px;background:repeating-linear-gradient(90deg,var(--border, #e7eef3) 0 20px,rgba(0,0,0,0) 0 30px);width:80%;position:absolute;left:50%;transform:translate(-50%);z-index:1}.selected-flight-card .top-section .flight svg{fill:#d8e3ea}.selected-flight-card .top-section .flight>p{font-weight:600;background-color:var(--foreground, #fff)}.selected-flight-card .top-section .flight .departure-title{padding-right:.5rem}.selected-flight-card .top-section .flight .arrival-title{padding-left:.5rem}.selected-flight-card .top-section .flight-details .destination span{font-size:1rem;font-weight:400}.selected-flight-card .top-section .flight-details .destination span:last-child{text-align:right}.selected-flight-card .top-section .flight-details .time p{color:var(--text-light, rgba(37, 46, 52, .2509803922))}.selected-flight-card .top-section .flight-details .destination,.selected-flight-card .top-section .flight-details .time{display:flex;justify-content:space-between}.selected-flight-card .top-section .leg-separator{margin:.5rem 0;border-top:1px solid var(--border, #e7eef3)}.selected-flight-card.round-trip .content{gap:.5rem}.selected-flight-card.round-trip .top-section .header{margin-bottom:.5rem}.selected-flight-card.round-trip .top-section .flight{font-size:1.2rem}.selected-flight-card.round-trip .top-section .flight svg{font-size:1.6rem}.selected-flight-card.round-trip .top-section .flight-details .destination span{font-size:.8rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.selected-flight-card.round-trip .top-section .flight-details .time p{font-size:.8rem}.selected-flight-card.round-trip .top-section .leg-separator{margin:.25rem 0}.selected-flight-card .mid-section{height:10px}.selected-flight-card .mid-section .dashes{position:absolute;top:calc(var(--cutout-top) - 1px);left:20px;right:20px;border:dashed 2px var(--border, #e7eef3)}.selected-flight-card .bottom-section{display:flex;flex-direction:column;gap:1rem;font-size:.8rem}.selected-flight-card .bottom-section .bottom-header{display:flex;justify-content:space-between;border:1px solid var(--border, #e7eef3);border-radius:.5rem;padding:.5rem}.selected-flight-card .bottom-section .bottom-header .id-and-icon{display:flex;gap:1rem}.selected-flight-card .bottom-section .bottom-header .id-and-icon>span{font-weight:700}.selected-flight-card .bottom-section .bottom-header .id-and-icon .copy-icon{font-size:larger}.selected-flight-card .bottom-section .bottom-section-details{display:flex;gap:1rem}.selected-flight-card .bottom-section .bottom-section-details>div{display:flex;width:50%;justify-content:space-between;margin-bottom:1rem;border:1px solid var(--border, #e7eef3);border-radius:.5rem;padding:.5rem}.selected-flight-card .bottom-section .bottom-section-details>div>span{font-weight:700}
|
|
@@ -1,96 +1,134 @@
|
|
|
1
|
-
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as e, jsxs as i, Fragment as D } from "react/jsx-runtime";
|
|
2
2
|
import { h as t } from "../../../arrayExtensions-DlcBOj5a.js";
|
|
3
|
-
import { E as
|
|
3
|
+
import { E as d } from "../../../DateFormats-DZD30Nea.js";
|
|
4
4
|
import { E as r } from "../../../_styles.flight-booking-CaUgKcMC.js";
|
|
5
5
|
import "react";
|
|
6
|
-
import { useTranslation as
|
|
7
|
-
import { F as
|
|
8
|
-
import
|
|
9
|
-
const
|
|
10
|
-
airlines:
|
|
11
|
-
departure:
|
|
12
|
-
arrival:
|
|
13
|
-
bookingRef:
|
|
14
|
-
flightClass:
|
|
15
|
-
numberOfPassengers:
|
|
16
|
-
cancelledAt:
|
|
17
|
-
hasAirlineChanges:
|
|
18
|
-
onClick:
|
|
19
|
-
|
|
6
|
+
import { useTranslation as I } from "react-i18next";
|
|
7
|
+
import { F as v } from "../../../index-C8p5kinH.js";
|
|
8
|
+
import _ from "../../Menu/Menu.js";
|
|
9
|
+
const B = ({
|
|
10
|
+
airlines: n,
|
|
11
|
+
departure: o,
|
|
12
|
+
arrival: m,
|
|
13
|
+
bookingRef: f,
|
|
14
|
+
flightClass: E,
|
|
15
|
+
numberOfPassengers: T,
|
|
16
|
+
cancelledAt: h,
|
|
17
|
+
hasAirlineChanges: p,
|
|
18
|
+
onClick: M,
|
|
19
|
+
inboundDeparture: s,
|
|
20
|
+
inboundArrival: l,
|
|
21
|
+
contextOptions: N = []
|
|
20
22
|
}) => {
|
|
21
|
-
var
|
|
22
|
-
const { t:
|
|
23
|
-
return /* @__PURE__ */ e(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
/* @__PURE__ */ e("p", { className: "arrival-title", children: l.airportCode }),
|
|
44
|
-
/* @__PURE__ */ e("span", { className: "flight-trail" })
|
|
45
|
-
] }),
|
|
46
|
-
/* @__PURE__ */ i("div", { className: "flight-details", children: [
|
|
47
|
-
/* @__PURE__ */ i("div", { className: "destination", children: [
|
|
48
|
-
/* @__PURE__ */ e("span", { children: c.location }),
|
|
49
|
-
/* @__PURE__ */ e("span", { children: l.location })
|
|
50
|
-
] }),
|
|
51
|
-
/* @__PURE__ */ i("div", { className: "time", children: [
|
|
52
|
-
/* @__PURE__ */ e("p", { children: t(c.dateTime).format(
|
|
53
|
-
n(r.DATE_TIME_MEDIUM, o.FlightShortDate)
|
|
54
|
-
) }),
|
|
55
|
-
/* @__PURE__ */ e("p", { children: t(l.dateTime).format(
|
|
56
|
-
n(r.DATE_TIME_MEDIUM, o.FlightShortDate)
|
|
57
|
-
) })
|
|
58
|
-
] })
|
|
59
|
-
] })
|
|
60
|
-
] }),
|
|
61
|
-
/* @__PURE__ */ e("div", { className: "mid-section", children: /* @__PURE__ */ e("div", { className: "dashes" }) }),
|
|
62
|
-
/* @__PURE__ */ i("div", { className: "bottom-section", children: [
|
|
63
|
-
(d || m) && /* @__PURE__ */ i("div", { className: "notices", children: [
|
|
64
|
-
d && /* @__PURE__ */ e("div", { className: "cancelled-notice", children: /* @__PURE__ */ i("p", { children: [
|
|
65
|
-
"Cancelled:",
|
|
66
|
-
" ",
|
|
67
|
-
(p = t(d)) == null ? void 0 : p.format(
|
|
68
|
-
n(
|
|
69
|
-
r.DISPLAY_MEDIUM_WITH_YEAR,
|
|
70
|
-
o.USStringDateFormat
|
|
23
|
+
var g;
|
|
24
|
+
const { t: c } = I();
|
|
25
|
+
return /* @__PURE__ */ e(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
className: `selected-flight-card${!!(s && l) ? " round-trip" : ""}`,
|
|
29
|
+
onClick: M,
|
|
30
|
+
children: /* @__PURE__ */ i("div", { className: "content", children: [
|
|
31
|
+
/* @__PURE__ */ i("div", { className: "top-section", children: [
|
|
32
|
+
/* @__PURE__ */ i("div", { className: "header", children: [
|
|
33
|
+
/* @__PURE__ */ e("div", { children: n == null ? void 0 : n.map((a) => /* @__PURE__ */ i("div", { className: "airline-logo tip", children: [
|
|
34
|
+
/* @__PURE__ */ e("img", { src: a.logo, alt: a.name }),
|
|
35
|
+
/* @__PURE__ */ e("span", { className: "right", children: a.name })
|
|
36
|
+
] }, a.name)) }),
|
|
37
|
+
N.length > 0 && /* @__PURE__ */ e(
|
|
38
|
+
"div",
|
|
39
|
+
{
|
|
40
|
+
onClick: (a) => {
|
|
41
|
+
a.stopPropagation();
|
|
42
|
+
},
|
|
43
|
+
children: /* @__PURE__ */ e(_, { options: N })
|
|
44
|
+
}
|
|
71
45
|
)
|
|
72
|
-
)
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
46
|
+
] }),
|
|
47
|
+
/* @__PURE__ */ i("div", { className: "flight", children: [
|
|
48
|
+
/* @__PURE__ */ e("p", { className: "departure-title", children: o.airportCode }),
|
|
49
|
+
/* @__PURE__ */ e(v, {}),
|
|
50
|
+
/* @__PURE__ */ e("p", { className: "arrival-title", children: m.airportCode }),
|
|
51
|
+
/* @__PURE__ */ e("span", { className: "flight-trail" })
|
|
52
|
+
] }),
|
|
53
|
+
/* @__PURE__ */ i("div", { className: "flight-details", children: [
|
|
54
|
+
/* @__PURE__ */ i("div", { className: "destination", children: [
|
|
55
|
+
/* @__PURE__ */ e("span", { children: o.location }),
|
|
56
|
+
/* @__PURE__ */ e("span", { children: m.location })
|
|
57
|
+
] }),
|
|
58
|
+
/* @__PURE__ */ i("div", { className: "time", children: [
|
|
59
|
+
/* @__PURE__ */ e("p", { children: t(o.dateTime).format(
|
|
60
|
+
c(r.DATE_TIME_MEDIUM, d.FlightShortDate)
|
|
61
|
+
) }),
|
|
62
|
+
/* @__PURE__ */ e("p", { children: t(m.dateTime).format(
|
|
63
|
+
c(r.DATE_TIME_MEDIUM, d.FlightShortDate)
|
|
64
|
+
) })
|
|
65
|
+
] })
|
|
66
|
+
] }),
|
|
67
|
+
s && l && /* @__PURE__ */ i(D, { children: [
|
|
68
|
+
/* @__PURE__ */ e("div", { className: "leg-separator" }),
|
|
69
|
+
/* @__PURE__ */ i("div", { className: "flight return", children: [
|
|
70
|
+
/* @__PURE__ */ e("p", { className: "departure-title", children: s.airportCode }),
|
|
71
|
+
/* @__PURE__ */ e(v, { className: "return-icon" }),
|
|
72
|
+
/* @__PURE__ */ e("p", { className: "arrival-title", children: l.airportCode }),
|
|
73
|
+
/* @__PURE__ */ e("span", { className: "flight-trail" })
|
|
74
|
+
] }),
|
|
75
|
+
/* @__PURE__ */ i("div", { className: "flight-details", children: [
|
|
76
|
+
/* @__PURE__ */ i("div", { className: "destination", children: [
|
|
77
|
+
/* @__PURE__ */ e("span", { children: s.location }),
|
|
78
|
+
/* @__PURE__ */ e("span", { children: l.location })
|
|
79
|
+
] }),
|
|
80
|
+
/* @__PURE__ */ i("div", { className: "time", children: [
|
|
81
|
+
/* @__PURE__ */ e("p", { children: t(s.dateTime).format(
|
|
82
|
+
c(
|
|
83
|
+
r.DATE_TIME_MEDIUM,
|
|
84
|
+
d.FlightShortDate
|
|
85
|
+
)
|
|
86
|
+
) }),
|
|
87
|
+
/* @__PURE__ */ e("p", { children: t(l.dateTime).format(
|
|
88
|
+
c(
|
|
89
|
+
r.DATE_TIME_MEDIUM,
|
|
90
|
+
d.FlightShortDate
|
|
91
|
+
)
|
|
92
|
+
) })
|
|
93
|
+
] })
|
|
94
|
+
] })
|
|
95
|
+
] })
|
|
85
96
|
] }),
|
|
86
|
-
/* @__PURE__ */
|
|
87
|
-
|
|
88
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ e("div", { className: "mid-section", children: /* @__PURE__ */ e("div", { className: "dashes" }) }),
|
|
98
|
+
/* @__PURE__ */ i("div", { className: "bottom-section", children: [
|
|
99
|
+
(h || p) && /* @__PURE__ */ i("div", { className: "notices", children: [
|
|
100
|
+
h && /* @__PURE__ */ e("div", { className: "cancelled-notice", children: /* @__PURE__ */ i("p", { children: [
|
|
101
|
+
"Cancelled:",
|
|
102
|
+
" ",
|
|
103
|
+
(g = t(h)) == null ? void 0 : g.format(
|
|
104
|
+
c(
|
|
105
|
+
r.DISPLAY_MEDIUM_WITH_YEAR,
|
|
106
|
+
d.USStringDateFormat
|
|
107
|
+
)
|
|
108
|
+
)
|
|
109
|
+
] }) }),
|
|
110
|
+
p && /* @__PURE__ */ e("div", { className: "cancelled-notice", children: /* @__PURE__ */ e("p", { children: "Changes Pending Review" }) })
|
|
111
|
+
] }),
|
|
112
|
+
/* @__PURE__ */ i("div", { className: "bottom-header", children: [
|
|
113
|
+
/* @__PURE__ */ e("p", { children: "Booking Confirmation" }),
|
|
114
|
+
" ",
|
|
115
|
+
/* @__PURE__ */ e("div", { className: "id-and-icon", children: /* @__PURE__ */ e("span", { children: f }) })
|
|
116
|
+
] }),
|
|
117
|
+
/* @__PURE__ */ i("div", { className: "bottom-section-details", children: [
|
|
118
|
+
/* @__PURE__ */ i("div", { children: [
|
|
119
|
+
/* @__PURE__ */ e("p", { children: "Class" }),
|
|
120
|
+
/* @__PURE__ */ e("span", { children: E })
|
|
121
|
+
] }),
|
|
122
|
+
/* @__PURE__ */ i("div", { children: [
|
|
123
|
+
/* @__PURE__ */ e("p", { children: "Passengers" }),
|
|
124
|
+
/* @__PURE__ */ e("span", { children: T })
|
|
125
|
+
] })
|
|
126
|
+
] })
|
|
89
127
|
] })
|
|
90
128
|
] })
|
|
91
|
-
|
|
92
|
-
|
|
129
|
+
}
|
|
130
|
+
);
|
|
93
131
|
};
|
|
94
132
|
export {
|
|
95
|
-
|
|
133
|
+
B as FlightBooking
|
|
96
134
|
};
|
|
@@ -2,7 +2,7 @@ import { jsx as r, jsxs as l } from "react/jsx-runtime";
|
|
|
2
2
|
import { useQuery as E } from "@tanstack/react-query";
|
|
3
3
|
import "../../arrayExtensions-DlcBOj5a.js";
|
|
4
4
|
import { g as R, a as N, b as u } from "../../cashUtils-sBirmFfL.js";
|
|
5
|
-
import { E as _ } from "../../noRetryInstance-
|
|
5
|
+
import { E as _ } from "../../noRetryInstance-DKhe8ju0.js";
|
|
6
6
|
import { useMemo as S } from "react";
|
|
7
7
|
import { a as f } from "../../index-C8p5kinH.js";
|
|
8
8
|
import "react-i18next";
|
|
@@ -9,7 +9,7 @@ import { CashValue as n } from "./CashValue.js";
|
|
|
9
9
|
import { EToolTipPosition as t, EInvalidAmountDisplayOption as o } from "./CashValueTypes.js";
|
|
10
10
|
import "@tanstack/react-query";
|
|
11
11
|
import "../../context/AwayzContext.js";
|
|
12
|
-
import "../../noRetryInstance-
|
|
12
|
+
import "../../noRetryInstance-DKhe8ju0.js";
|
|
13
13
|
import "../../configs/awayzClient.js";
|
|
14
14
|
/* empty css */
|
|
15
15
|
import { AwayzProvider as a } from "../../providers/AwayzProvider.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import { useQuery as p } from "@tanstack/react-query";
|
|
3
3
|
import "../../arrayExtensions-DlcBOj5a.js";
|
|
4
|
-
import { E as u } from "../../noRetryInstance-
|
|
4
|
+
import { E as u } from "../../noRetryInstance-DKhe8ju0.js";
|
|
5
5
|
import { useMemo as f } from "react";
|
|
6
6
|
import { useAwayzContext as l } from "../../hooks/useAwayzContext.js";
|
|
7
7
|
import "react-i18next";
|
|
@@ -7,7 +7,7 @@ import "../../../_styles.flight-booking-CaUgKcMC.js";
|
|
|
7
7
|
/* empty css */
|
|
8
8
|
import "@tanstack/react-query";
|
|
9
9
|
import "../../../configs/awayzClient.js";
|
|
10
|
-
import "../../../noRetryInstance-
|
|
10
|
+
import "../../../noRetryInstance-DKhe8ju0.js";
|
|
11
11
|
/* empty css */
|
|
12
12
|
/* empty css */
|
|
13
13
|
import "../../../index-Cv-wvFlM.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../arrayExtensions-DlcBOj5a.js";
|
|
2
2
|
import { c as M } from "../../cashUtils-sBirmFfL.js";
|
|
3
|
-
import { e as P, A as l, E as N } from "../../noRetryInstance-
|
|
3
|
+
import { e as P, A as l, E as N } from "../../noRetryInstance-DKhe8ju0.js";
|
|
4
4
|
import { a as o } from "../../_styles.flight-booking-CaUgKcMC.js";
|
|
5
5
|
import { useState as f, useCallback as I, useEffect as h } from "react";
|
|
6
6
|
import { awayzClient as O } from "../../configs/awayzClient.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useQuery as m, useMutation as c } from "@tanstack/react-query";
|
|
2
2
|
import "../../arrayExtensions-DlcBOj5a.js";
|
|
3
|
-
import { E as o } from "../../noRetryInstance-
|
|
3
|
+
import { E as o } from "../../noRetryInstance-DKhe8ju0.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "react/jsx-runtime";
|
|
6
6
|
import "react-i18next";
|
|
@@ -7,7 +7,7 @@ import '../../assets/_styles3.css';import '../../assets/_styles5.css';import '..
|
|
|
7
7
|
import "../../_styles.flight-booking-CaUgKcMC.js";
|
|
8
8
|
/* empty css */
|
|
9
9
|
import "@tanstack/react-query";
|
|
10
|
-
import { c } from "../../noRetryInstance-
|
|
10
|
+
import { c } from "../../noRetryInstance-DKhe8ju0.js";
|
|
11
11
|
/* empty css */
|
|
12
12
|
/* empty css */
|
|
13
13
|
import "../../index-Cv-wvFlM.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useQuery as U } from "@tanstack/react-query";
|
|
2
2
|
import "../arrayExtensions-DlcBOj5a.js";
|
|
3
|
-
import { E as e, t as F } from "../noRetryInstance-
|
|
3
|
+
import { E as e, t as F } from "../noRetryInstance-DKhe8ju0.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { FeatureService as r } from "../services/features/featureService.js";
|
|
6
6
|
const L = [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useQuery as u } from "@tanstack/react-query";
|
|
2
2
|
import "../arrayExtensions-DlcBOj5a.js";
|
|
3
|
-
import { E as m, A as c, b as f } from "../noRetryInstance-
|
|
3
|
+
import { E as m, A as c, b as f } from "../noRetryInstance-DKhe8ju0.js";
|
|
4
4
|
import { useEffect as d } from "react";
|
|
5
5
|
import { useAwayzContext as y } from "./useAwayzContext.js";
|
|
6
6
|
var i = /* @__PURE__ */ ((r) => (r.HOTEL = "Hotel", r.FLIGHT = "Flight", r))(i || {});
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
const e = [{ _id: "682f2c81a6cc24f39d99eefe", name: "Jet's Landed", user_id: "67fd23bc3a7cbcd0a8757cdc", start_date: "2025-01-21", end_date: "2025-01-26", hotel_bookings: [], flight_bookings: [], created_at: "2025-05-22T13:54:09.085Z", updated_at: "2025-05-22T13:57:31.638Z", __v: 0 }],
|
|
1
|
+
const e = [{ _id: "682f2c81a6cc24f39d99eefe", name: "Jet's Landed", user_id: "67fd23bc3a7cbcd0a8757cdc", start_date: "2025-01-21", end_date: "2025-01-26", hotel_bookings: [], flight_bookings: [], created_at: "2025-05-22T13:54:09.085Z", updated_at: "2025-05-22T13:57:31.638Z", __v: 0 }], i = {
|
|
2
2
|
success: !0,
|
|
3
3
|
data: e
|
|
4
|
-
}, a = !0, t = [{ _id: "682f2c51a6cc24f39d99eecb", name: "Jet's JumpOff", user_id: "67fd23bc3a7cbcd0a8757cdc", start_date: "2077-06-23", end_date: "2077-06-26", hotel_bookings: [], flight_bookings: [], created_at: "2077-05-22T13:53:21.392Z", updated_at: "2077-05-22T13:53:21.392Z", __v: 0 }],
|
|
4
|
+
}, a = !0, t = [{ _id: "682f2c51a6cc24f39d99eecb", name: "Jet's JumpOff", user_id: "67fd23bc3a7cbcd0a8757cdc", start_date: "2077-06-23", end_date: "2077-06-26", hotel_bookings: [], flight_bookings: [], created_at: "2077-05-22T13:53:21.392Z", updated_at: "2077-05-22T13:53:21.392Z", __v: 0 }], d = {
|
|
5
5
|
success: a,
|
|
6
6
|
data: t
|
|
7
|
-
},
|
|
8
|
-
success:
|
|
9
|
-
data:
|
|
10
|
-
},
|
|
11
|
-
success:
|
|
12
|
-
data:
|
|
7
|
+
}, n = !0, c = { _id: "682ffebaa6cc24f39d99fdc7", name: "Updated Trip", user_id: "67fd23bc3a7cbcd0a8757cdc", start_date: "2025-09-09", end_date: "2025-09-21", hotel_bookings: [], flight_bookings: [], created_at: "2025-05-23T04:51:06.811Z", updated_at: "2025-05-23T05:30:47.144Z", __v: 0 }, s = {
|
|
8
|
+
success: n,
|
|
9
|
+
data: c
|
|
10
|
+
}, r = !0, _ = { hotel_bookings: [{ _id: "6839bfd88672ca8a09862823", user_id: "67d82b1c52c4a4dbe4e640c0", status: "booking confirmed", accommodation_id: "acc_0000AWPszvlu6zjbTePuxQ", number_of_guests: 2, rate_id: "rat_0000Aucdmscz0HEHDGqxfc", quote_id: "quo_0000AucdnqAnrnymNn6EzF", base_amount: "2970.00", base_currency: "EUR", tax_amount: "0.00", tax_currency: "EUR", fee_amount: "0.00", fee_currency: "EUR", total_amount: "2970.00", total_currency: "EUR", check_in_date: "2025-06-23", check_out_date: "2025-06-29", images: ["https://travelport.leonardocontentcloud.com/imageRepo/7/0/166/647/121/vierz-entrance-6310-hor-clsc_H.jpg", "https://travelport.leonardocontentcloud.com/imageRepo/3/0/183/668/598/rz-vierz-vienna-sunset-38389_Classic-Hor_H.jpg"], rooms: [{ beds: null, photos: [], total_amount: "2970.00", name: "Deluxe, Guest Room, 1 King" }], address: { line_one: "Schubertring 5-7", city_name: "Vienna", postal_code: "1010 ", country_code: "AT", region: null }, guests: [{ family_name: "Botha", given_name: "Adriaan", user_id: null }, { family_name: "Doe", given_name: "John", user_id: null }], created_at: "2025-05-30T14:25:28.716Z", updated_at: "2025-05-30T14:27:08.631Z", __v: 0, booking_id: "bok_0000Aucdx2TzTC0lAMSc24", reference: "OY3EHG" }], flight_bookings: [{ _id: "6839beb48672ca8a09862483", flight_offer_id: "off_0000AucdLMS6m6Um63c7m8", user_id: "67d82b1c52c4a4dbe4e640c0", status: "flight confirmed", available_actions: ["cancel", "change", "update"], total_currency: "USD", arrival_date: "2025-07-04T02:16:00.000Z", base_amount: "76.27", extras_amount: "0.00", extras_currency: "USD", base_currency: "USD", conditions: { refund_before_departure: { penalty_currency: "GBP", penalty_amount: "10.00", allowed: !0 }, change_before_departure: { penalty_currency: null, penalty_amount: null, allowed: !1 } }, departure_date: "2025-07-04T00:19:00.000Z", passengers: [{ id: "pas_0000AucdLMBnkjS3HTz6NZ", type: null }], slices: [{ id: "sli_0000AucdLMS6m6Um63c7m7", origin: "VIE", destination: "CDG", fare_brand_name: null, carriers: { marketing: ["Duffel Airways"], operating: ["Duffel Airways"] } }], tax_amount: "13.73", tax_currency: "USD", total_amount: "90.00", type: "instant", synced_at: "2025-05-30T14:21:11Z", order_id: "ord_0000AucdQ6tTnRRInXiCLg", booking_reference: "QGEHM5", cancelled_at: null, payment_status: { paid_at: "2025-05-30T14:21:11Z", price_guarantee_expires_at: null, payment_required_by: null, awaiting_payment: !1 }, documents: [{ passenger_ids: ["pas_0000AucdLMBnkjS3HTz6NZ"], unique_identifier: "1", type: "electronic_ticket" }], services: [], createdAt: "2025-05-30T14:20:36.839Z", updatedAt: "2025-05-30T14:21:11.541Z", __v: 0 }, { _id: "6839beb48672ca8a09862484", flight_offer_id: "off_0000AucdLMS6m6Um63c7m9", user_id: "67d82b1c52c4a4dbe4e640c0", status: "flight confirmed", available_actions: ["cancel", "change", "update"], total_currency: "USD", arrival_date: "2025-07-10T21:35:00.000Z", base_amount: "210.72", extras_amount: "0.00", extras_currency: "USD", base_currency: "USD", conditions: { refund_before_departure: { penalty_currency: "USD", penalty_amount: "25.00", allowed: !0 }, change_before_departure: { penalty_currency: null, penalty_amount: null, allowed: !1 } }, departure_date: "2025-07-06T17:01:00.000Z", passengers: [{ id: "pas_0000AucdLMBnkjS3HTz6N1", type: null }], slices: [{ id: "sli_0000AucdLMS6m6Um63c7m8", origin: "LAX", destination: "HRL", fare_brand_name: "Basic Economy", carriers: { marketing: ["American Airlines"], operating: ["American Airlines"], operating_iata_codes: ["AA"] }, segments: [{ departing_at: "2025-07-06T17:01:00.000Z", arriving_at: "2025-07-06T22:29:00.000Z" }] }, { id: "sli_0000AucdLMS6m6Um63c7m9", origin: "HRL", destination: "LAX", fare_brand_name: "Basic Economy", carriers: { marketing: ["American Airlines"], operating: ["American Airlines"], operating_iata_codes: ["AA"] }, segments: [{ departing_at: "2025-07-10T20:07:00.000Z", arriving_at: "2025-07-10T21:35:00.000Z" }] }], tax_amount: "37.92", tax_currency: "USD", total_amount: "248.64", type: "instant", synced_at: "2025-05-30T14:21:11Z", order_id: "ord_0000AucdQ6tTnRRInXiCLh", booking_reference: "T4DNFX", cancelled_at: null, payment_status: { paid_at: "2025-05-30T14:21:11Z", price_guarantee_expires_at: null, payment_required_by: null, awaiting_payment: !1 }, documents: [{ passenger_ids: ["pas_0000AucdLMBnkjS3HTz6N1"], unique_identifier: "1", type: "electronic_ticket" }], services: [], createdAt: "2025-05-30T14:20:36.839Z", updatedAt: "2025-05-30T14:21:11.541Z", __v: 0 }] }, o = {
|
|
11
|
+
success: r,
|
|
12
|
+
data: _
|
|
13
13
|
};
|
|
14
14
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
i as PastTrip200,
|
|
16
|
+
o as UncategorisedBookings200,
|
|
17
|
+
d as UpcomingTrip200,
|
|
18
|
+
s as UpdatedTrip200
|
|
19
19
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useQuery as u, useMutation as p } from "@tanstack/react-query";
|
|
2
2
|
import { h as m } from "../../arrayExtensions-DlcBOj5a.js";
|
|
3
|
-
import { E as e } from "../../noRetryInstance-
|
|
3
|
+
import { E as e } from "../../noRetryInstance-DKhe8ju0.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "react/jsx-runtime";
|
|
6
6
|
import "react-i18next";
|
|
@@ -13,7 +13,7 @@ import { awayzClient as o } from "../../configs/awayzClient.js";
|
|
|
13
13
|
import "../../index-Cv-wvFlM.js";
|
|
14
14
|
import "../../context/AwayzContext.js";
|
|
15
15
|
/* empty css */
|
|
16
|
-
import { T as n } from "../../TripsService-
|
|
16
|
+
import { T as n } from "../../TripsService-GImsS17_.js";
|
|
17
17
|
const b = ({
|
|
18
18
|
tripId: t,
|
|
19
19
|
tripDetails: s
|