@burdenoff/microfe-ggnomad 2026.1029.2 → 2026.1029.3
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/ggnomad/components/ListingEditDialog.d.ts.map +1 -1
- package/dist/ggnomad/components/ListingEditDialog.js +130 -96
- package/dist/ggnomad/components/ListingEditDialog.js.map +1 -1
- package/dist/ggnomad/components/TicketDialog.d.ts +2 -1
- package/dist/ggnomad/components/TicketDialog.d.ts.map +1 -1
- package/dist/ggnomad/components/TicketDialog.js +4 -1
- package/dist/ggnomad/components/TicketDialog.js.map +1 -1
- package/dist/ggnomad/graphql.js +31 -33
- package/dist/ggnomad/graphql.js.map +1 -1
- package/dist/stories/ListingEditDialog.stories.d.ts +6 -0
- package/dist/stories/ListingEditDialog.stories.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListingEditDialog.d.ts","sourceRoot":"","sources":["../../../src/ggnomad/components/ListingEditDialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ListingEditDialog.d.ts","sourceRoot":"","sources":["../../../src/ggnomad/components/ListingEditDialog.tsx"],"names":[],"mappings":"AA2BA,KAAK,UAAU,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC;AAoB7D,UAAU,sBAAsB;IAC9B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,UAAU,EAAE,UAAU,CAAC;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE;QACP,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;KACnB,CAAC;IACF,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,yEAAyE;AACzE,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,YAAY,EACZ,UAAU,EACV,EAAE,EACF,OAAO,EACP,OAAO,GACR,EAAE,sBAAsB,+BAoXxB"}
|
|
@@ -1,161 +1,195 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { notify as
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import { Pencil as
|
|
5
|
-
import { useI18n as
|
|
6
|
-
import { useMutation as
|
|
7
|
-
import { AlertDialog as
|
|
8
|
-
import { jsx as
|
|
1
|
+
import { PAUSE_GGNOMAD_LISTING_MUTATION as e, RESUME_GGNOMAD_LISTING_MUTATION as t, SUBMIT_GGNOMAD_LISTING_FOR_REVIEW_MUTATION as n, UPDATE_GGNOMAD_ACTIVITY_MUTATION as r, UPDATE_GGNOMAD_EVENT_MUTATION as i, UPDATE_GGNOMAD_PROPERTY_MUTATION as a, UPDATE_GGNOMAD_TOUR_MUTATION as o } from "../graphql.js";
|
|
2
|
+
import { notify as s } from "../utils/notify.js";
|
|
3
|
+
import { useMemo as c, useState as l } from "react";
|
|
4
|
+
import { Pencil as u } from "lucide-react";
|
|
5
|
+
import { useI18n as d } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
6
|
+
import { useMutation as f } from "@apollo/client/react";
|
|
7
|
+
import { AlertDialog as p, AlertDialogAction as m, AlertDialogCancel as ee, AlertDialogContent as h, AlertDialogDescription as g, AlertDialogFooter as _, AlertDialogHeader as v, AlertDialogTitle as te } from "@burdenoff/fe-libs/ui";
|
|
8
|
+
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
9
9
|
//#region src/ggnomad/components/ListingEditDialog.tsx
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
var x = {
|
|
11
|
+
DRAFT: "SUBMIT",
|
|
12
|
+
ACTIVE: "PAUSE",
|
|
13
|
+
PAUSED: "RESUME"
|
|
14
|
+
};
|
|
15
|
+
function S({ open: S, onOpenChange: C, targetType: w, id: T, initial: E, onSaved: D }) {
|
|
16
|
+
let { t: O } = d(), [k, A] = l(E.name ?? ""), [j, M] = l(E.description ?? ""), N = E.pricePerNight ?? E.price ?? 0, [P, F] = l(String(N)), I = (E.status ?? "").toUpperCase(), L = x[I], [R, z] = l((E.images ?? []).join("\n")), [B, { loading: V }] = f(a), [H, { loading: U }] = f(o), [W, { loading: G }] = f(i), [K, { loading: q }] = f(r), [J, { loading: Y }] = f(n), [X, { loading: Z }] = f(e), [ne, { loading: Q }] = f(t), $ = c(() => V || U || G || q || Y || Z || Q, [
|
|
13
17
|
V,
|
|
14
18
|
U,
|
|
15
|
-
G
|
|
16
|
-
|
|
19
|
+
G,
|
|
20
|
+
q,
|
|
21
|
+
Y,
|
|
22
|
+
Z,
|
|
23
|
+
Q
|
|
24
|
+
]), re = async (e) => {
|
|
25
|
+
let t = e === "SUBMIT" ? J : e === "PAUSE" ? X : ne;
|
|
26
|
+
try {
|
|
27
|
+
let n = await t({ variables: {
|
|
28
|
+
listingType: w,
|
|
29
|
+
id: T
|
|
30
|
+
} });
|
|
31
|
+
if (n.error) {
|
|
32
|
+
s.error(O("ggnomad.listingEdit.lifecycleErrorTitle", "Could not change listing status"), n.error.message);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
s.success(O("ggnomad.listingEdit.lifecycleSuccessTitle", "Listing status updated"), e === "SUBMIT" ? O("ggnomad.listingEdit.submittedBody", "Submitted for review. It goes live once a marketplace operator approves it.") : e === "PAUSE" ? O("ggnomad.listingEdit.pausedBody", "The listing is paused and hidden from booking.") : O("ggnomad.listingEdit.resumedBody", "The listing is live again.")), C(!1), D?.();
|
|
36
|
+
} catch (e) {
|
|
37
|
+
s.error(O("ggnomad.listingEdit.lifecycleErrorTitle", "Could not change listing status"), e instanceof Error ? e.message : String(e));
|
|
38
|
+
}
|
|
39
|
+
}, ie = {
|
|
40
|
+
DRAFT: O("ggnomad.listingEdit.statusDraft", "Draft"),
|
|
41
|
+
PENDING_REVIEW: O("ggnomad.listingEdit.statusPendingReview", "Pending review"),
|
|
42
|
+
ACTIVE: O("ggnomad.listingEdit.statusActive", "Active"),
|
|
43
|
+
PAUSED: O("ggnomad.listingEdit.statusPaused", "Paused"),
|
|
44
|
+
ARCHIVED: O("ggnomad.listingEdit.statusArchived", "Archived")
|
|
45
|
+
}, ae = {
|
|
46
|
+
SUBMIT: O("ggnomad.listingEdit.submitForReview", "Submit for review"),
|
|
47
|
+
PAUSE: O("ggnomad.listingEdit.pause", "Pause listing"),
|
|
48
|
+
RESUME: O("ggnomad.listingEdit.resume", "Resume listing")
|
|
49
|
+
}, oe = async () => {
|
|
17
50
|
try {
|
|
18
51
|
let e = {};
|
|
19
|
-
|
|
20
|
-
let t = parseFloat(
|
|
21
|
-
t !== (
|
|
22
|
-
let n =
|
|
52
|
+
k !== (E.name ?? "") && (e.name = k), j !== (E.description ?? "") && (e.description = j);
|
|
53
|
+
let t = parseFloat(P);
|
|
54
|
+
t !== (E.pricePerNight ?? E.price ?? 0) && (w === "PROPERTY" ? e.pricePerNight = t : e.price = t);
|
|
55
|
+
let n = R.split("\n").map((e) => e.trim()).filter(Boolean), r = E.images ?? [];
|
|
23
56
|
if (JSON.stringify(n) !== JSON.stringify(r) && (e.images = n), Object.keys(e).length === 0) {
|
|
24
|
-
|
|
57
|
+
s.info(O("ggnomad.listingEdit.noChangesTitle", "No changes"), O("ggnomad.listingEdit.noChangesBody", "Nothing was modified.")), C(!1);
|
|
25
58
|
return;
|
|
26
59
|
}
|
|
27
|
-
let
|
|
28
|
-
if (
|
|
29
|
-
id:
|
|
60
|
+
let i;
|
|
61
|
+
if (i = w === "PROPERTY" ? await B({ variables: {
|
|
62
|
+
id: T,
|
|
30
63
|
input: e
|
|
31
|
-
} }) :
|
|
32
|
-
id:
|
|
64
|
+
} }) : w === "TOUR" ? await H({ variables: {
|
|
65
|
+
id: T,
|
|
33
66
|
input: e
|
|
34
|
-
} }) :
|
|
35
|
-
id:
|
|
67
|
+
} }) : w === "EVENT" ? await W({ variables: {
|
|
68
|
+
id: T,
|
|
36
69
|
input: e
|
|
37
|
-
} }) : await
|
|
38
|
-
id:
|
|
70
|
+
} }) : await K({ variables: {
|
|
71
|
+
id: T,
|
|
39
72
|
input: e
|
|
40
|
-
} }),
|
|
41
|
-
|
|
73
|
+
} }), i?.error) {
|
|
74
|
+
s.error(O("ggnomad.listingEdit.errorTitle", "Could not update listing"), i.error.message);
|
|
42
75
|
return;
|
|
43
76
|
}
|
|
44
|
-
|
|
77
|
+
s.success(O("ggnomad.listingEdit.successTitle", "Listing updated"), O("ggnomad.listingEdit.successBody", "Your changes have been saved.")), C(!1), D?.();
|
|
45
78
|
} catch (e) {
|
|
46
|
-
|
|
79
|
+
s.error(O("ggnomad.listingEdit.errorTitle", "Could not update listing"), e instanceof Error ? e.message : String(e));
|
|
47
80
|
}
|
|
48
|
-
},
|
|
49
|
-
return /* @__PURE__ */
|
|
50
|
-
open:
|
|
51
|
-
onOpenChange:
|
|
52
|
-
children: /* @__PURE__ */
|
|
81
|
+
}, se = w === "PROPERTY" ? "Price per night" : "Price";
|
|
82
|
+
return /* @__PURE__ */ y(p, {
|
|
83
|
+
open: S,
|
|
84
|
+
onOpenChange: C,
|
|
85
|
+
children: /* @__PURE__ */ b(h, {
|
|
53
86
|
className: "max-w-2xl",
|
|
54
87
|
children: [
|
|
55
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ b(v, { children: [/* @__PURE__ */ b(te, {
|
|
56
89
|
className: "flex items-center gap-2",
|
|
57
|
-
children: [/* @__PURE__ */
|
|
58
|
-
}), /* @__PURE__ */
|
|
59
|
-
/* @__PURE__ */
|
|
90
|
+
children: [/* @__PURE__ */ y(u, { className: "size-4" }), O("ggnomad.listingEdit.title", "Edit listing")]
|
|
91
|
+
}), /* @__PURE__ */ y(g, { children: O("ggnomad.listingEdit.description", "Update the details for this listing.") })] }),
|
|
92
|
+
/* @__PURE__ */ b("div", {
|
|
60
93
|
className: "space-y-4",
|
|
61
94
|
children: [
|
|
62
|
-
/* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
63
96
|
htmlFor: "listing-edit-name",
|
|
64
97
|
className: "block text-sm font-medium text-text-primary",
|
|
65
|
-
children:
|
|
66
|
-
}), /* @__PURE__ */
|
|
98
|
+
children: O("ggnomad.listingEdit.nameLabel", "Name")
|
|
99
|
+
}), /* @__PURE__ */ y("input", {
|
|
67
100
|
id: "listing-edit-name",
|
|
68
101
|
type: "text",
|
|
69
|
-
value:
|
|
70
|
-
onChange: (e) =>
|
|
71
|
-
disabled:
|
|
102
|
+
value: k,
|
|
103
|
+
onChange: (e) => A(e.target.value),
|
|
104
|
+
disabled: $,
|
|
72
105
|
className: "mt-1 w-full rounded-md border border-border-seam bg-bg-canvas px-3 py-2 text-sm text-text-primary placeholder-text-secondary focus:border-action-primary-bg focus:outline-none focus:ring-1 focus:ring-action-primary-bg disabled:opacity-50",
|
|
73
|
-
placeholder:
|
|
106
|
+
placeholder: O("ggnomad.listingEdit.namePlaceholder", "Enter name")
|
|
74
107
|
})] }),
|
|
75
|
-
/* @__PURE__ */
|
|
108
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
76
109
|
htmlFor: "listing-edit-description",
|
|
77
110
|
className: "block text-sm font-medium text-text-primary",
|
|
78
|
-
children:
|
|
79
|
-
}), /* @__PURE__ */
|
|
111
|
+
children: O("ggnomad.listingEdit.descriptionLabel", "Description")
|
|
112
|
+
}), /* @__PURE__ */ y("textarea", {
|
|
80
113
|
id: "listing-edit-description",
|
|
81
|
-
value:
|
|
82
|
-
onChange: (e) =>
|
|
83
|
-
disabled:
|
|
114
|
+
value: j,
|
|
115
|
+
onChange: (e) => M(e.target.value),
|
|
116
|
+
disabled: $,
|
|
84
117
|
rows: 3,
|
|
85
118
|
className: "mt-1 w-full rounded-md border border-border-seam bg-bg-canvas px-3 py-2 text-sm text-text-primary placeholder-text-secondary focus:border-action-primary-bg focus:outline-none focus:ring-1 focus:ring-action-primary-bg disabled:opacity-50",
|
|
86
|
-
placeholder:
|
|
119
|
+
placeholder: O("ggnomad.listingEdit.descriptionPlaceholder", "Enter description")
|
|
87
120
|
})] }),
|
|
88
|
-
/* @__PURE__ */
|
|
121
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
89
122
|
htmlFor: "listing-edit-price",
|
|
90
123
|
className: "block text-sm font-medium text-text-primary",
|
|
91
|
-
children:
|
|
92
|
-
}), /* @__PURE__ */
|
|
124
|
+
children: O("ggnomad.listingEdit.priceLabel", se)
|
|
125
|
+
}), /* @__PURE__ */ y("input", {
|
|
93
126
|
id: "listing-edit-price",
|
|
94
127
|
type: "number",
|
|
95
128
|
step: "0.01",
|
|
96
129
|
min: "0",
|
|
97
|
-
value:
|
|
98
|
-
onChange: (e) =>
|
|
99
|
-
disabled:
|
|
130
|
+
value: P,
|
|
131
|
+
onChange: (e) => F(e.target.value),
|
|
132
|
+
disabled: $,
|
|
100
133
|
className: "mt-1 w-full rounded-md border border-border-seam bg-bg-canvas px-3 py-2 text-sm text-text-primary placeholder-text-secondary focus:border-action-primary-bg focus:outline-none focus:ring-1 focus:ring-action-primary-bg disabled:opacity-50",
|
|
101
134
|
placeholder: "0.00"
|
|
102
135
|
})] }),
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
className: "block text-sm font-medium text-text-primary",
|
|
106
|
-
children: E("ggnomad.listingEdit.statusLabel", "Status")
|
|
107
|
-
}), /* @__PURE__ */ y("select", {
|
|
108
|
-
id: "listing-edit-status",
|
|
109
|
-
value: P,
|
|
110
|
-
onChange: (e) => F(e.target.value),
|
|
111
|
-
disabled: K,
|
|
112
|
-
className: "mt-1 w-full rounded-md border border-border-seam bg-bg-canvas px-3 py-2 text-sm text-text-primary focus:border-action-primary-bg focus:outline-none focus:ring-1 focus:ring-action-primary-bg disabled:opacity-50",
|
|
136
|
+
I ? /* @__PURE__ */ b("div", {
|
|
137
|
+
"data-testid": "listing-edit-status",
|
|
113
138
|
children: [
|
|
114
|
-
/* @__PURE__ */
|
|
115
|
-
|
|
116
|
-
children:
|
|
139
|
+
/* @__PURE__ */ y("span", {
|
|
140
|
+
className: "block text-sm font-medium text-text-primary",
|
|
141
|
+
children: O("ggnomad.listingEdit.statusLabel", "Status")
|
|
117
142
|
}),
|
|
118
|
-
/* @__PURE__ */
|
|
119
|
-
|
|
120
|
-
children:
|
|
143
|
+
/* @__PURE__ */ b("div", {
|
|
144
|
+
className: "mt-1 flex flex-wrap items-center gap-3",
|
|
145
|
+
children: [/* @__PURE__ */ y("span", {
|
|
146
|
+
className: "rounded-md border border-border-seam bg-bg-sunken px-2 py-1 text-sm text-text-primary",
|
|
147
|
+
children: ie[I] ?? I
|
|
148
|
+
}), L ? /* @__PURE__ */ y("button", {
|
|
149
|
+
type: "button",
|
|
150
|
+
onClick: () => void re(L),
|
|
151
|
+
disabled: $,
|
|
152
|
+
className: "rounded-md border border-border-seam px-3 py-1 text-sm font-medium text-text-primary hover:bg-bg-surface disabled:opacity-50",
|
|
153
|
+
children: ae[L]
|
|
154
|
+
}) : null]
|
|
121
155
|
}),
|
|
122
|
-
/* @__PURE__ */
|
|
123
|
-
|
|
124
|
-
children:
|
|
125
|
-
})
|
|
156
|
+
I === "PENDING_REVIEW" ? /* @__PURE__ */ y("p", {
|
|
157
|
+
className: "mt-1 text-xs text-text-secondary",
|
|
158
|
+
children: O("ggnomad.listingEdit.pendingReviewHint", "A marketplace operator is reviewing this listing. It goes live once approved.")
|
|
159
|
+
}) : null
|
|
126
160
|
]
|
|
127
|
-
})
|
|
128
|
-
/* @__PURE__ */
|
|
161
|
+
}) : null,
|
|
162
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
129
163
|
htmlFor: "listing-edit-images",
|
|
130
164
|
className: "block text-sm font-medium text-text-primary",
|
|
131
|
-
children:
|
|
132
|
-
}), /* @__PURE__ */
|
|
165
|
+
children: O("ggnomad.listingEdit.imagesLabel", "Images (one URL per line)")
|
|
166
|
+
}), /* @__PURE__ */ y("textarea", {
|
|
133
167
|
id: "listing-edit-images",
|
|
134
|
-
value:
|
|
135
|
-
onChange: (e) =>
|
|
136
|
-
disabled:
|
|
168
|
+
value: R,
|
|
169
|
+
onChange: (e) => z(e.target.value),
|
|
170
|
+
disabled: $,
|
|
137
171
|
rows: 3,
|
|
138
172
|
className: "mt-1 w-full rounded-md border border-border-seam bg-bg-canvas px-3 py-2 text-sm font-mono text-text-primary placeholder-text-secondary focus:border-action-primary-bg focus:outline-none focus:ring-1 focus:ring-action-primary-bg disabled:opacity-50",
|
|
139
|
-
placeholder:
|
|
173
|
+
placeholder: O("ggnomad.listingEdit.imagesPlaceholder", "https://example.com/image1.jpg\nhttps://example.com/image2.jpg")
|
|
140
174
|
})] })
|
|
141
175
|
]
|
|
142
176
|
}),
|
|
143
|
-
/* @__PURE__ */
|
|
144
|
-
disabled:
|
|
145
|
-
children:
|
|
146
|
-
}), /* @__PURE__ */
|
|
177
|
+
/* @__PURE__ */ b(_, { children: [/* @__PURE__ */ y(ee, {
|
|
178
|
+
disabled: $,
|
|
179
|
+
children: O("ggnomad.listingEdit.cancel", "Cancel")
|
|
180
|
+
}), /* @__PURE__ */ y(m, {
|
|
147
181
|
onClick: (e) => {
|
|
148
|
-
e.preventDefault(),
|
|
182
|
+
e.preventDefault(), oe();
|
|
149
183
|
},
|
|
150
|
-
disabled:
|
|
184
|
+
disabled: $,
|
|
151
185
|
className: "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bgHover",
|
|
152
|
-
children:
|
|
186
|
+
children: $ ? O("ggnomad.listingEdit.saving", "Saving…") : O("ggnomad.listingEdit.save", "Save changes")
|
|
153
187
|
})] })
|
|
154
188
|
]
|
|
155
189
|
})
|
|
156
190
|
});
|
|
157
191
|
}
|
|
158
192
|
//#endregion
|
|
159
|
-
export {
|
|
193
|
+
export { S as ListingEditDialog };
|
|
160
194
|
|
|
161
195
|
//# sourceMappingURL=ListingEditDialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListingEditDialog.js","names":[],"sources":["../../../src/ggnomad/components/ListingEditDialog.tsx"],"sourcesContent":["import { useState, useMemo } from 'react';\nimport { useMutation } from '@apollo/client/react';\nimport type { TypedDocumentNode } from '@apollo/client';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { Pencil } from 'lucide-react';\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n} from '@burdenoff/fe-libs/ui';\n\nimport {\n UPDATE_GGNOMAD_PROPERTY_MUTATION,\n UPDATE_GGNOMAD_TOUR_MUTATION,\n UPDATE_GGNOMAD_EVENT_MUTATION,\n UPDATE_GGNOMAD_ACTIVITY_MUTATION,\n} from '../graphql';\nimport { notify } from '../utils/notify';\n\ntype TargetType = 'PROPERTY' | 'TOUR' | 'EVENT' | 'ACTIVITY';\n\ninterface ListingEditDialogProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n targetType: TargetType;\n id: string;\n initial: {\n name?: string;\n description?: string;\n price?: number;\n pricePerNight?: number;\n status?: string;\n images?: string[];\n };\n onSaved?: () => void;\n}\n\n/** Edit dialog for listing details (property, tour, event, activity). */\nexport function ListingEditDialog({\n open,\n onOpenChange,\n targetType,\n id,\n initial,\n onSaved,\n}: ListingEditDialogProps) {\n const { t } = useI18n();\n const [name, setName] = useState(initial.name ?? '');\n const [description, setDescription] = useState(initial.description ?? '');\n const priceField = initial.pricePerNight ?? initial.price ?? 0;\n const [price, setPrice] = useState(String(priceField));\n const [status, setStatus] = useState(initial.status ?? 'ACTIVE');\n const [imagesText, setImagesText] = useState((initial.images ?? []).join('\\n'));\n\n const [updateProperty, { loading: updatingProperty }] = useMutation(\n UPDATE_GGNOMAD_PROPERTY_MUTATION as TypedDocumentNode<\n { updateGgnomadProperty: { id: string; name: string } },\n {\n id: string;\n input: {\n name?: string;\n description?: string;\n pricePerNight?: number;\n status?: string;\n images?: string[];\n };\n }\n >\n );\n\n const [updateTour, { loading: updatingTour }] = useMutation(\n UPDATE_GGNOMAD_TOUR_MUTATION as TypedDocumentNode<\n { updateGgnomadTour: { id: string; name: string } },\n {\n id: string;\n input: {\n name?: string;\n description?: string;\n price?: number;\n status?: string;\n images?: string[];\n };\n }\n >\n );\n\n const [updateEvent, { loading: updatingEvent }] = useMutation(\n UPDATE_GGNOMAD_EVENT_MUTATION as TypedDocumentNode<\n { updateGgnomadEvent: { id: string; name: string } },\n {\n id: string;\n input: {\n name?: string;\n description?: string;\n price?: number;\n status?: string;\n images?: string[];\n };\n }\n >\n );\n\n const [updateActivity, { loading: updatingActivity }] = useMutation(\n UPDATE_GGNOMAD_ACTIVITY_MUTATION as TypedDocumentNode<\n { updateGgnomadActivity: { id: string; name: string } },\n {\n id: string;\n input: {\n name?: string;\n description?: string;\n price?: number;\n status?: string;\n images?: string[];\n };\n }\n >\n );\n\n const loading = useMemo(\n () => updatingProperty || updatingTour || updatingEvent || updatingActivity,\n [updatingProperty, updatingTour, updatingEvent, updatingActivity]\n );\n\n const handleSave = async () => {\n try {\n // Build input with only changed fields\n const input: Record<string, unknown> = {};\n\n if (name !== (initial.name ?? '')) {\n input.name = name;\n }\n if (description !== (initial.description ?? '')) {\n input.description = description;\n }\n\n const priceValue = parseFloat(price);\n const initialPrice = initial.pricePerNight ?? initial.price ?? 0;\n if (priceValue !== initialPrice) {\n if (targetType === 'PROPERTY') {\n input.pricePerNight = priceValue;\n } else {\n input.price = priceValue;\n }\n }\n\n if (status !== (initial.status ?? 'ACTIVE')) {\n input.status = status;\n }\n\n const newImages = imagesText\n .split('\\n')\n .map((line) => line.trim())\n .filter(Boolean);\n const initialImages = initial.images ?? [];\n if (JSON.stringify(newImages) !== JSON.stringify(initialImages)) {\n input.images = newImages;\n }\n\n // If nothing changed, just close\n if (Object.keys(input).length === 0) {\n notify.info(\n t('ggnomad.listingEdit.noChangesTitle', 'No changes'),\n t('ggnomad.listingEdit.noChangesBody', 'Nothing was modified.')\n );\n onOpenChange(false);\n return;\n }\n\n let result;\n if (targetType === 'PROPERTY') {\n result = await updateProperty({\n variables: { id, input },\n });\n } else if (targetType === 'TOUR') {\n result = await updateTour({\n variables: { id, input },\n });\n } else if (targetType === 'EVENT') {\n result = await updateEvent({\n variables: { id, input },\n });\n } else {\n result = await updateActivity({\n variables: { id, input },\n });\n }\n\n if (result?.error) {\n notify.error(\n t('ggnomad.listingEdit.errorTitle', 'Could not update listing'),\n result.error.message\n );\n return;\n }\n\n notify.success(\n t('ggnomad.listingEdit.successTitle', 'Listing updated'),\n t('ggnomad.listingEdit.successBody', 'Your changes have been saved.')\n );\n\n onOpenChange(false);\n onSaved?.();\n } catch (err) {\n notify.error(\n t('ggnomad.listingEdit.errorTitle', 'Could not update listing'),\n err instanceof Error ? err.message : String(err)\n );\n }\n };\n\n const priceLabel = targetType === 'PROPERTY' ? 'Price per night' : 'Price';\n\n return (\n <AlertDialog open={open} onOpenChange={onOpenChange}>\n <AlertDialogContent className=\"max-w-2xl\">\n <AlertDialogHeader>\n <AlertDialogTitle className=\"flex items-center gap-2\">\n <Pencil className=\"size-4\" />\n {t('ggnomad.listingEdit.title', 'Edit listing')}\n </AlertDialogTitle>\n <AlertDialogDescription>\n {t('ggnomad.listingEdit.description', 'Update the details for this listing.')}\n </AlertDialogDescription>\n </AlertDialogHeader>\n\n <div className=\"space-y-4\">\n {/* Name */}\n <div>\n <label\n htmlFor=\"listing-edit-name\"\n className=\"block text-sm font-medium text-text-primary\"\n >\n {t('ggnomad.listingEdit.nameLabel', 'Name')}\n </label>\n <input\n id=\"listing-edit-name\"\n type=\"text\"\n value={name}\n onChange={(e) => setName(e.target.value)}\n disabled={loading}\n className=\"mt-1 w-full rounded-md border border-border-seam bg-bg-canvas px-3 py-2 text-sm text-text-primary placeholder-text-secondary focus:border-action-primary-bg focus:outline-none focus:ring-1 focus:ring-action-primary-bg disabled:opacity-50\"\n placeholder={t('ggnomad.listingEdit.namePlaceholder', 'Enter name')}\n />\n </div>\n\n {/* Description */}\n <div>\n <label\n htmlFor=\"listing-edit-description\"\n className=\"block text-sm font-medium text-text-primary\"\n >\n {t('ggnomad.listingEdit.descriptionLabel', 'Description')}\n </label>\n <textarea\n id=\"listing-edit-description\"\n value={description}\n onChange={(e) => setDescription(e.target.value)}\n disabled={loading}\n rows={3}\n className=\"mt-1 w-full rounded-md border border-border-seam bg-bg-canvas px-3 py-2 text-sm text-text-primary placeholder-text-secondary focus:border-action-primary-bg focus:outline-none focus:ring-1 focus:ring-action-primary-bg disabled:opacity-50\"\n placeholder={t('ggnomad.listingEdit.descriptionPlaceholder', 'Enter description')}\n />\n </div>\n\n {/* Price */}\n <div>\n <label\n htmlFor=\"listing-edit-price\"\n className=\"block text-sm font-medium text-text-primary\"\n >\n {t(`ggnomad.listingEdit.priceLabel`, priceLabel)}\n </label>\n <input\n id=\"listing-edit-price\"\n type=\"number\"\n step=\"0.01\"\n min=\"0\"\n value={price}\n onChange={(e) => setPrice(e.target.value)}\n disabled={loading}\n className=\"mt-1 w-full rounded-md border border-border-seam bg-bg-canvas px-3 py-2 text-sm text-text-primary placeholder-text-secondary focus:border-action-primary-bg focus:outline-none focus:ring-1 focus:ring-action-primary-bg disabled:opacity-50\"\n placeholder=\"0.00\"\n />\n </div>\n\n {/* Status */}\n <div>\n <label\n htmlFor=\"listing-edit-status\"\n className=\"block text-sm font-medium text-text-primary\"\n >\n {t('ggnomad.listingEdit.statusLabel', 'Status')}\n </label>\n <select\n id=\"listing-edit-status\"\n value={status}\n onChange={(e) => setStatus(e.target.value)}\n disabled={loading}\n className=\"mt-1 w-full rounded-md border border-border-seam bg-bg-canvas px-3 py-2 text-sm text-text-primary focus:border-action-primary-bg focus:outline-none focus:ring-1 focus:ring-action-primary-bg disabled:opacity-50\"\n >\n <option value=\"ACTIVE\">{t('ggnomad.listingEdit.statusActive', 'Active')}</option>\n <option value=\"PAUSED\">{t('ggnomad.listingEdit.statusPaused', 'Paused')}</option>\n <option value=\"DRAFT\">{t('ggnomad.listingEdit.statusDraft', 'Draft')}</option>\n </select>\n </div>\n\n {/* Images */}\n <div>\n <label\n htmlFor=\"listing-edit-images\"\n className=\"block text-sm font-medium text-text-primary\"\n >\n {t('ggnomad.listingEdit.imagesLabel', 'Images (one URL per line)')}\n </label>\n <textarea\n id=\"listing-edit-images\"\n value={imagesText}\n onChange={(e) => setImagesText(e.target.value)}\n disabled={loading}\n rows={3}\n className=\"mt-1 w-full rounded-md border border-border-seam bg-bg-canvas px-3 py-2 text-sm font-mono text-text-primary placeholder-text-secondary focus:border-action-primary-bg focus:outline-none focus:ring-1 focus:ring-action-primary-bg disabled:opacity-50\"\n placeholder={t(\n 'ggnomad.listingEdit.imagesPlaceholder',\n 'https://example.com/image1.jpg\\nhttps://example.com/image2.jpg'\n )}\n />\n </div>\n </div>\n\n <AlertDialogFooter>\n <AlertDialogCancel disabled={loading}>\n {t('ggnomad.listingEdit.cancel', 'Cancel')}\n </AlertDialogCancel>\n <AlertDialogAction\n onClick={(event) => {\n event.preventDefault();\n void handleSave();\n }}\n disabled={loading}\n className=\"bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bgHover\"\n >\n {loading\n ? t('ggnomad.listingEdit.saving', 'Saving…')\n : t('ggnomad.listingEdit.save', 'Save changes')}\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n );\n}\n"],"mappings":";;;;;;;;;AA2CA,SAAgB,EAAkB,EAChC,SACA,iBACA,eACA,OACA,YACA,cACyB;CACzB,IAAM,EAAE,SAAM,EAAQ,GAChB,CAAC,GAAM,KAAW,EAAS,EAAQ,QAAQ,EAAE,GAC7C,CAAC,GAAa,KAAkB,EAAS,E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;OACH,OAAO;OACP,WAAW,MAAM,EAAc,EAAE,OAAO,KAAK;OAC7C,UAAU;OACV,MAAM;OACN,WAAU;OACV,aAAa,EACX,yCACA,gEACF;MACD,CAAA,CACE,EAAA,CAAA;KACF;;IAEL,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD;KAAmB,UAAU;eAC1B,EAAE,8BAA8B,QAAQ;IACxB,CAAA,GACnB,kBAAC,GAAD;KACE,UAAU,MAAU;MAElB,AADA,EAAM,eAAe,GACrB,EAAgB;KAClB;KACA,UAAU;KACV,WAAU;eAET,IACG,EAAE,8BAA8B,SAAS,IACzC,EAAE,4BAA4B,cAAc;IAC/B,CAAA,CACF,EAAA,CAAA;GACD;;CACT,CAAA;AAEjB"}
|
|
1
|
+
{"version":3,"file":"ListingEditDialog.js","names":[],"sources":["../../../src/ggnomad/components/ListingEditDialog.tsx"],"sourcesContent":["import { useState, useMemo } from 'react';\nimport { useMutation } from '@apollo/client/react';\nimport type { TypedDocumentNode } from '@apollo/client';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { Pencil } from 'lucide-react';\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n} from '@burdenoff/fe-libs/ui';\n\nimport {\n UPDATE_GGNOMAD_PROPERTY_MUTATION,\n UPDATE_GGNOMAD_TOUR_MUTATION,\n UPDATE_GGNOMAD_EVENT_MUTATION,\n UPDATE_GGNOMAD_ACTIVITY_MUTATION,\n SUBMIT_GGNOMAD_LISTING_FOR_REVIEW_MUTATION,\n PAUSE_GGNOMAD_LISTING_MUTATION,\n RESUME_GGNOMAD_LISTING_MUTATION,\n} from '../graphql';\nimport { notify } from '../utils/notify';\n\ntype TargetType = 'PROPERTY' | 'TOUR' | 'EVENT' | 'ACTIVITY';\n\ntype LifecycleAction = 'SUBMIT' | 'PAUSE' | 'RESUME';\n\n/**\n * BOFF-10194 — a listing's status is a verification-workflow state, so it is\n * no longer an editable field here. Each status offers the one transition the\n * host may run; going live from review is an operator's approval.\n */\nconst LIFECYCLE_ACTION_BY_STATUS: Record<string, LifecycleAction | undefined> = {\n DRAFT: 'SUBMIT',\n ACTIVE: 'PAUSE',\n PAUSED: 'RESUME',\n};\n\ntype LifecycleMutation = TypedDocumentNode<\n Record<string, { id: string; status: string }>,\n { listingType: TargetType; id: string }\n>;\n\ninterface ListingEditDialogProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n targetType: TargetType;\n id: string;\n initial: {\n name?: string;\n description?: string;\n price?: number;\n pricePerNight?: number;\n status?: string;\n images?: string[];\n };\n onSaved?: () => void;\n}\n\n/** Edit dialog for listing details (property, tour, event, activity). */\nexport function ListingEditDialog({\n open,\n onOpenChange,\n targetType,\n id,\n initial,\n onSaved,\n}: ListingEditDialogProps) {\n const { t } = useI18n();\n const [name, setName] = useState(initial.name ?? '');\n const [description, setDescription] = useState(initial.description ?? '');\n const priceField = initial.pricePerNight ?? initial.price ?? 0;\n const [price, setPrice] = useState(String(priceField));\n const status = (initial.status ?? '').toUpperCase();\n const lifecycleAction = LIFECYCLE_ACTION_BY_STATUS[status];\n const [imagesText, setImagesText] = useState((initial.images ?? []).join('\\n'));\n\n const [updateProperty, { loading: updatingProperty }] = useMutation(\n UPDATE_GGNOMAD_PROPERTY_MUTATION as TypedDocumentNode<\n { updateGgnomadProperty: { id: string; name: string } },\n {\n id: string;\n input: {\n name?: string;\n description?: string;\n pricePerNight?: number;\n images?: string[];\n };\n }\n >\n );\n\n const [updateTour, { loading: updatingTour }] = useMutation(\n UPDATE_GGNOMAD_TOUR_MUTATION as TypedDocumentNode<\n { updateGgnomadTour: { id: string; name: string } },\n {\n id: string;\n input: {\n name?: string;\n description?: string;\n price?: number;\n images?: string[];\n };\n }\n >\n );\n\n const [updateEvent, { loading: updatingEvent }] = useMutation(\n UPDATE_GGNOMAD_EVENT_MUTATION as TypedDocumentNode<\n { updateGgnomadEvent: { id: string; name: string } },\n {\n id: string;\n input: {\n name?: string;\n description?: string;\n price?: number;\n images?: string[];\n };\n }\n >\n );\n\n const [updateActivity, { loading: updatingActivity }] = useMutation(\n UPDATE_GGNOMAD_ACTIVITY_MUTATION as TypedDocumentNode<\n { updateGgnomadActivity: { id: string; name: string } },\n {\n id: string;\n input: {\n name?: string;\n description?: string;\n price?: number;\n images?: string[];\n };\n }\n >\n );\n\n const [submitForReview, { loading: submitting }] = useMutation(\n SUBMIT_GGNOMAD_LISTING_FOR_REVIEW_MUTATION as LifecycleMutation\n );\n const [pauseListing, { loading: pausing }] = useMutation(\n PAUSE_GGNOMAD_LISTING_MUTATION as LifecycleMutation\n );\n const [resumeListing, { loading: resuming }] = useMutation(\n RESUME_GGNOMAD_LISTING_MUTATION as LifecycleMutation\n );\n\n const loading = useMemo(\n () =>\n updatingProperty ||\n updatingTour ||\n updatingEvent ||\n updatingActivity ||\n submitting ||\n pausing ||\n resuming,\n [updatingProperty, updatingTour, updatingEvent, updatingActivity, submitting, pausing, resuming]\n );\n\n const handleLifecycle = async (action: LifecycleAction) => {\n const run =\n action === 'SUBMIT' ? submitForReview : action === 'PAUSE' ? pauseListing : resumeListing;\n try {\n const result = await run({ variables: { listingType: targetType, id } });\n if (result.error) {\n notify.error(\n t('ggnomad.listingEdit.lifecycleErrorTitle', 'Could not change listing status'),\n result.error.message\n );\n return;\n }\n notify.success(\n t('ggnomad.listingEdit.lifecycleSuccessTitle', 'Listing status updated'),\n action === 'SUBMIT'\n ? t(\n 'ggnomad.listingEdit.submittedBody',\n 'Submitted for review. It goes live once a marketplace operator approves it.'\n )\n : action === 'PAUSE'\n ? t('ggnomad.listingEdit.pausedBody', 'The listing is paused and hidden from booking.')\n : t('ggnomad.listingEdit.resumedBody', 'The listing is live again.')\n );\n onOpenChange(false);\n onSaved?.();\n } catch (err) {\n notify.error(\n t('ggnomad.listingEdit.lifecycleErrorTitle', 'Could not change listing status'),\n err instanceof Error ? err.message : String(err)\n );\n }\n };\n\n const statusLabel: Record<string, string> = {\n DRAFT: t('ggnomad.listingEdit.statusDraft', 'Draft'),\n PENDING_REVIEW: t('ggnomad.listingEdit.statusPendingReview', 'Pending review'),\n ACTIVE: t('ggnomad.listingEdit.statusActive', 'Active'),\n PAUSED: t('ggnomad.listingEdit.statusPaused', 'Paused'),\n ARCHIVED: t('ggnomad.listingEdit.statusArchived', 'Archived'),\n };\n\n const lifecycleLabel: Record<LifecycleAction, string> = {\n SUBMIT: t('ggnomad.listingEdit.submitForReview', 'Submit for review'),\n PAUSE: t('ggnomad.listingEdit.pause', 'Pause listing'),\n RESUME: t('ggnomad.listingEdit.resume', 'Resume listing'),\n };\n\n const handleSave = async () => {\n try {\n // Build input with only changed fields\n const input: Record<string, unknown> = {};\n\n if (name !== (initial.name ?? '')) {\n input.name = name;\n }\n if (description !== (initial.description ?? '')) {\n input.description = description;\n }\n\n const priceValue = parseFloat(price);\n const initialPrice = initial.pricePerNight ?? initial.price ?? 0;\n if (priceValue !== initialPrice) {\n if (targetType === 'PROPERTY') {\n input.pricePerNight = priceValue;\n } else {\n input.price = priceValue;\n }\n }\n\n const newImages = imagesText\n .split('\\n')\n .map((line) => line.trim())\n .filter(Boolean);\n const initialImages = initial.images ?? [];\n if (JSON.stringify(newImages) !== JSON.stringify(initialImages)) {\n input.images = newImages;\n }\n\n // If nothing changed, just close\n if (Object.keys(input).length === 0) {\n notify.info(\n t('ggnomad.listingEdit.noChangesTitle', 'No changes'),\n t('ggnomad.listingEdit.noChangesBody', 'Nothing was modified.')\n );\n onOpenChange(false);\n return;\n }\n\n let result;\n if (targetType === 'PROPERTY') {\n result = await updateProperty({\n variables: { id, input },\n });\n } else if (targetType === 'TOUR') {\n result = await updateTour({\n variables: { id, input },\n });\n } else if (targetType === 'EVENT') {\n result = await updateEvent({\n variables: { id, input },\n });\n } else {\n result = await updateActivity({\n variables: { id, input },\n });\n }\n\n if (result?.error) {\n notify.error(\n t('ggnomad.listingEdit.errorTitle', 'Could not update listing'),\n result.error.message\n );\n return;\n }\n\n notify.success(\n t('ggnomad.listingEdit.successTitle', 'Listing updated'),\n t('ggnomad.listingEdit.successBody', 'Your changes have been saved.')\n );\n\n onOpenChange(false);\n onSaved?.();\n } catch (err) {\n notify.error(\n t('ggnomad.listingEdit.errorTitle', 'Could not update listing'),\n err instanceof Error ? err.message : String(err)\n );\n }\n };\n\n const priceLabel = targetType === 'PROPERTY' ? 'Price per night' : 'Price';\n\n return (\n <AlertDialog open={open} onOpenChange={onOpenChange}>\n <AlertDialogContent className=\"max-w-2xl\">\n <AlertDialogHeader>\n <AlertDialogTitle className=\"flex items-center gap-2\">\n <Pencil className=\"size-4\" />\n {t('ggnomad.listingEdit.title', 'Edit listing')}\n </AlertDialogTitle>\n <AlertDialogDescription>\n {t('ggnomad.listingEdit.description', 'Update the details for this listing.')}\n </AlertDialogDescription>\n </AlertDialogHeader>\n\n <div className=\"space-y-4\">\n {/* Name */}\n <div>\n <label\n htmlFor=\"listing-edit-name\"\n className=\"block text-sm font-medium text-text-primary\"\n >\n {t('ggnomad.listingEdit.nameLabel', 'Name')}\n </label>\n <input\n id=\"listing-edit-name\"\n type=\"text\"\n value={name}\n onChange={(e) => setName(e.target.value)}\n disabled={loading}\n className=\"mt-1 w-full rounded-md border border-border-seam bg-bg-canvas px-3 py-2 text-sm text-text-primary placeholder-text-secondary focus:border-action-primary-bg focus:outline-none focus:ring-1 focus:ring-action-primary-bg disabled:opacity-50\"\n placeholder={t('ggnomad.listingEdit.namePlaceholder', 'Enter name')}\n />\n </div>\n\n {/* Description */}\n <div>\n <label\n htmlFor=\"listing-edit-description\"\n className=\"block text-sm font-medium text-text-primary\"\n >\n {t('ggnomad.listingEdit.descriptionLabel', 'Description')}\n </label>\n <textarea\n id=\"listing-edit-description\"\n value={description}\n onChange={(e) => setDescription(e.target.value)}\n disabled={loading}\n rows={3}\n className=\"mt-1 w-full rounded-md border border-border-seam bg-bg-canvas px-3 py-2 text-sm text-text-primary placeholder-text-secondary focus:border-action-primary-bg focus:outline-none focus:ring-1 focus:ring-action-primary-bg disabled:opacity-50\"\n placeholder={t('ggnomad.listingEdit.descriptionPlaceholder', 'Enter description')}\n />\n </div>\n\n {/* Price */}\n <div>\n <label\n htmlFor=\"listing-edit-price\"\n className=\"block text-sm font-medium text-text-primary\"\n >\n {t(`ggnomad.listingEdit.priceLabel`, priceLabel)}\n </label>\n <input\n id=\"listing-edit-price\"\n type=\"number\"\n step=\"0.01\"\n min=\"0\"\n value={price}\n onChange={(e) => setPrice(e.target.value)}\n disabled={loading}\n className=\"mt-1 w-full rounded-md border border-border-seam bg-bg-canvas px-3 py-2 text-sm text-text-primary placeholder-text-secondary focus:border-action-primary-bg focus:outline-none focus:ring-1 focus:ring-action-primary-bg disabled:opacity-50\"\n placeholder=\"0.00\"\n />\n </div>\n\n {/* Status: read-only; changed only through the verification workflow (BOFF-10194) */}\n {status ? (\n <div data-testid=\"listing-edit-status\">\n <span className=\"block text-sm font-medium text-text-primary\">\n {t('ggnomad.listingEdit.statusLabel', 'Status')}\n </span>\n <div className=\"mt-1 flex flex-wrap items-center gap-3\">\n <span className=\"rounded-md border border-border-seam bg-bg-sunken px-2 py-1 text-sm text-text-primary\">\n {statusLabel[status] ?? status}\n </span>\n {lifecycleAction ? (\n <button\n type=\"button\"\n onClick={() => void handleLifecycle(lifecycleAction)}\n disabled={loading}\n className=\"rounded-md border border-border-seam px-3 py-1 text-sm font-medium text-text-primary hover:bg-bg-surface disabled:opacity-50\"\n >\n {lifecycleLabel[lifecycleAction]}\n </button>\n ) : null}\n </div>\n {status === 'PENDING_REVIEW' ? (\n <p className=\"mt-1 text-xs text-text-secondary\">\n {t(\n 'ggnomad.listingEdit.pendingReviewHint',\n 'A marketplace operator is reviewing this listing. It goes live once approved.'\n )}\n </p>\n ) : null}\n </div>\n ) : null}\n\n {/* Images */}\n <div>\n <label\n htmlFor=\"listing-edit-images\"\n className=\"block text-sm font-medium text-text-primary\"\n >\n {t('ggnomad.listingEdit.imagesLabel', 'Images (one URL per line)')}\n </label>\n <textarea\n id=\"listing-edit-images\"\n value={imagesText}\n onChange={(e) => setImagesText(e.target.value)}\n disabled={loading}\n rows={3}\n className=\"mt-1 w-full rounded-md border border-border-seam bg-bg-canvas px-3 py-2 text-sm font-mono text-text-primary placeholder-text-secondary focus:border-action-primary-bg focus:outline-none focus:ring-1 focus:ring-action-primary-bg disabled:opacity-50\"\n placeholder={t(\n 'ggnomad.listingEdit.imagesPlaceholder',\n 'https://example.com/image1.jpg\\nhttps://example.com/image2.jpg'\n )}\n />\n </div>\n </div>\n\n <AlertDialogFooter>\n <AlertDialogCancel disabled={loading}>\n {t('ggnomad.listingEdit.cancel', 'Cancel')}\n </AlertDialogCancel>\n <AlertDialogAction\n onClick={(event) => {\n event.preventDefault();\n void handleSave();\n }}\n disabled={loading}\n className=\"bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bgHover\"\n >\n {loading\n ? t('ggnomad.listingEdit.saving', 'Saving…')\n : t('ggnomad.listingEdit.save', 'Save changes')}\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n );\n}\n"],"mappings":";;;;;;;;;AAoCA,IAAM,IAA0E;CAC9E,OAAO;CACP,QAAQ;CACR,QAAQ;AACV;AAwBA,SAAgB,EAAkB,EAChC,SACA,iBACA,eACA,OACA,YACA,cACyB;CACzB,IAAM,EAAE,SAAM,EAAQ,GAChB,CAAC,GAAM,KAAW,EAAS,EAAQ,QAAQ,EAAE,GAC7C,CAAC,GAAa,KAAkB,EAAS,EAAQ,eAAe,EAAE,GAClE,IAAa,EAAQ,iBAAiB,EAAQ,SAAS,GACvD,CAAC,GAAO,KAAY,EAAS,OAAO,CAAU,CAAC,GAC/C,KAAU,EAAQ,UAAU,GAAA,CAAI,YAAY,GAC5C,IAAkB,EAA2B,IAC7C,CAAC,GAAY,KAAiB,GAAU,EAAQ,UAAU,CAAC,EAAA,CAAG,KAAK,IAAI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 @@ export interface GgnomadTicket {
|
|
|
2
2
|
id: string;
|
|
3
3
|
bookingId: string;
|
|
4
4
|
ticketCode: string;
|
|
5
|
-
|
|
5
|
+
/** BOFF-10194 — null unless the viewer made the booking; hosts scan the traveler's QR instead. */
|
|
6
|
+
qrCodeDataUrl: string | null;
|
|
6
7
|
status: 'ISSUED' | 'REDEEMED' | 'REVOKED';
|
|
7
8
|
issuedAt: string;
|
|
8
9
|
redeemedAt: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TicketDialog.d.ts","sourceRoot":"","sources":["../../../src/ggnomad/components/TicketDialog.tsx"],"names":[],"mappings":"AAkBA,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"TicketDialog.d.ts","sourceRoot":"","sources":["../../../src/ggnomad/components/TicketDialog.tsx"],"names":[],"mappings":"AAkBA,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,kGAAkG;IAClG,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,MAAM,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAKD,UAAU,iBAAiB;IACzB,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACvB;AASD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,YAAY,EACZ,SAAS,EACT,aAAa,EACb,aAAa,GACd,EAAE,iBAAiB,+BA6JnB"}
|
|
@@ -81,7 +81,10 @@ function b({ open: b, onOpenChange: x, bookingId: S, referenceCode: C, bookingSt
|
|
|
81
81
|
live: e.status === "ISSUED"
|
|
82
82
|
})]
|
|
83
83
|
}),
|
|
84
|
-
e.status === "ISSUED" ? /* @__PURE__ */ g("
|
|
84
|
+
e.status === "ISSUED" && !e.qrCodeDataUrl ? /* @__PURE__ */ g("div", {
|
|
85
|
+
className: "flex size-48 items-center justify-center rounded-md border border-dashed border-border-seam bg-bg-sunken p-3 text-center text-xs text-text-secondary",
|
|
86
|
+
children: T("ggnomad.ticket.qrTravelerOnly", "The QR code is shown only to the traveler. Scan it from their device at check-in.")
|
|
87
|
+
}) : e.status === "ISSUED" && e.qrCodeDataUrl ? /* @__PURE__ */ g("img", {
|
|
85
88
|
src: e.qrCodeDataUrl,
|
|
86
89
|
alt: T("ggnomad.ticket.qrAlt", "QR code for ticket {{code}}").replace("{{code}}", e.ticketCode),
|
|
87
90
|
className: "size-48 rounded-md border border-border-seam bg-white p-2",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TicketDialog.js","names":[],"sources":["../../../src/ggnomad/components/TicketDialog.tsx"],"sourcesContent":["import { useMutation, useQuery } from '@apollo/client/react';\nimport type { TypedDocumentNode } from '@apollo/client';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { QrCode, Ticket as TicketIcon } from 'lucide-react';\nimport {\n AlertDialog,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n} from '@burdenoff/fe-libs/ui';\n\nimport { GGNOMAD_TICKETS_QUERY, ISSUE_GGNOMAD_TICKET_MUTATION } from '../graphql';\nimport { StatusBadge } from './StatusBadge';\nimport { notify } from '../utils/notify';\n\nexport interface GgnomadTicket {\n id: string;\n bookingId: string;\n ticketCode: string;\n qrCodeDataUrl: string;\n status: 'ISSUED' | 'REDEEMED' | 'REVOKED';\n issuedAt: string;\n redeemedAt: string | null;\n redeemedBy: string | null;\n revokedAt: string | null;\n revokedReason: string | null;\n}\n\n/** Bookings reach CONFIRMED (payment verified) before a ticket can ever exist. */\nconst TICKET_ELIGIBLE_STATUSES = new Set(['CONFIRMED', 'CHECKED_IN', 'COMPLETED']);\n\ninterface TicketDialogProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n bookingId: string;\n referenceCode: string;\n bookingStatus: string;\n}\n\nfunction formatDateTime(value: string | null): string {\n if (!value) return '';\n const date = new Date(value);\n if (Number.isNaN(date.getTime())) return value;\n return date.toLocaleString();\n}\n\n/**\n * Traveler-facing mobile ticket view (BOFF-4362). Shows every QR ticket\n * issued for a booking — each ticket's QR code is rendered server-side from\n * its signed, revocable token (see wspace-ggnomad-svc `qrCodeDataUrl`), so\n * what's displayed here always reflects the ticket's live redemption state.\n */\nexport function TicketDialog({\n open,\n onOpenChange,\n bookingId,\n referenceCode,\n bookingStatus,\n}: TicketDialogProps) {\n const { t } = useI18n();\n\n const { data, loading, refetch } = useQuery(\n GGNOMAD_TICKETS_QUERY as TypedDocumentNode<\n { ggnomadTickets: GgnomadTicket[] },\n { bookingId: string }\n >,\n { variables: { bookingId }, skip: !open || !bookingId, fetchPolicy: 'network-only' }\n );\n\n const [issueTicket, { loading: issuing }] = useMutation(\n ISSUE_GGNOMAD_TICKET_MUTATION as TypedDocumentNode<\n { issueGgnomadTicket: GgnomadTicket },\n { bookingId: string }\n >\n );\n\n const tickets = data?.ggnomadTickets ?? [];\n const canIssue = TICKET_ELIGIBLE_STATUSES.has(bookingStatus.toUpperCase());\n\n const handleIssue = async () => {\n try {\n const result = await issueTicket({ variables: { bookingId } });\n if (result.error) {\n notify.error(\n t('ggnomad.ticket.issueErrorTitle', 'Could not issue ticket'),\n result.error.message\n );\n return;\n }\n notify.success(\n t('ggnomad.ticket.issueSuccessTitle', 'Ticket issued'),\n t('ggnomad.ticket.issueSuccessBody', 'A new QR ticket is ready to show at check-in.')\n );\n await refetch();\n } catch (err) {\n notify.error(\n t('ggnomad.ticket.issueErrorTitle', 'Could not issue ticket'),\n err instanceof Error ? err.message : String(err)\n );\n }\n };\n\n return (\n <AlertDialog open={open} onOpenChange={onOpenChange}>\n <AlertDialogContent className=\"max-w-md\">\n <AlertDialogHeader>\n <AlertDialogTitle className=\"flex items-center gap-2\">\n <TicketIcon className=\"size-4\" />\n {t('ggnomad.ticket.title', 'Mobile ticket')}\n </AlertDialogTitle>\n <AlertDialogDescription>\n {t('ggnomad.ticket.description', 'Show this QR code at check-in for {{ref}}.').replace(\n '{{ref}}',\n referenceCode\n )}\n </AlertDialogDescription>\n </AlertDialogHeader>\n\n <div className=\"max-h-[65vh] space-y-4 overflow-y-auto\">\n {loading ? (\n <p className=\"py-6 text-center text-sm text-text-secondary\">\n {t('ggnomad.ticket.loading', 'Loading your ticket…')}\n </p>\n ) : tickets.length === 0 ? (\n <div className=\"flex flex-col items-center gap-3 rounded-lg border border-dashed border-border-seam py-8 text-center\">\n <QrCode className=\"size-8 text-text-secondary\" aria-hidden=\"true\" />\n <p className=\"text-sm text-text-secondary\">\n {canIssue\n ? t(\n 'ggnomad.ticket.noneYet',\n 'No QR ticket has been issued for this booking yet.'\n )\n : t(\n 'ggnomad.ticket.notConfirmed',\n 'A QR ticket will be issued automatically once this booking is confirmed.'\n )}\n </p>\n {canIssue ? (\n <button\n type=\"button\"\n onClick={() => void handleIssue()}\n disabled={issuing}\n className=\"rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bgHover disabled:opacity-50\"\n >\n {issuing\n ? t('ggnomad.ticket.issuing', 'Issuing…')\n : t('ggnomad.ticket.issueAction', 'Issue QR ticket')}\n </button>\n ) : null}\n </div>\n ) : (\n tickets.map((ticket) => (\n <div\n key={ticket.id}\n className=\"flex flex-col items-center gap-3 rounded-lg border border-border-seam bg-bg-surface/40 p-4\"\n >\n <div className=\"flex w-full items-center justify-between\">\n <span className=\"font-mono text-xs text-text-secondary\">{ticket.ticketCode}</span>\n <StatusBadge status={ticket.status} live={ticket.status === 'ISSUED'} />\n </div>\n\n {ticket.status === 'ISSUED' ? (\n <img\n src={ticket.qrCodeDataUrl}\n alt={t('ggnomad.ticket.qrAlt', 'QR code for ticket {{code}}').replace(\n '{{code}}',\n ticket.ticketCode\n )}\n className=\"size-48 rounded-md border border-border-seam bg-white p-2\"\n width={192}\n height={192}\n />\n ) : (\n <div className=\"flex size-48 items-center justify-center rounded-md border border-dashed border-border-seam bg-bg-sunken text-center text-xs text-text-secondary\">\n {ticket.status === 'REDEEMED'\n ? t('ggnomad.ticket.alreadyRedeemed', 'Already redeemed — QR retired')\n : t('ggnomad.ticket.revokedNotice', 'Revoked — no longer valid')}\n </div>\n )}\n\n <div className=\"w-full space-y-1 text-xs text-text-secondary\">\n <p>\n {t('ggnomad.ticket.issuedAt', 'Issued')} {formatDateTime(ticket.issuedAt)}\n </p>\n {ticket.redeemedAt ? (\n <p>\n {t('ggnomad.ticket.redeemedAt', 'Redeemed')}{' '}\n {formatDateTime(ticket.redeemedAt)}\n </p>\n ) : null}\n {ticket.revokedAt ? (\n <p>\n {t('ggnomad.ticket.revokedAt', 'Revoked')} {formatDateTime(ticket.revokedAt)}\n {ticket.revokedReason ? ` — ${ticket.revokedReason}` : ''}\n </p>\n ) : null}\n </div>\n </div>\n ))\n )}\n </div>\n\n <AlertDialogFooter>\n <AlertDialogCancel>{t('ggnomad.ticket.close', 'Close')}</AlertDialogCancel>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n );\n}\n"],"mappings":";;;;;;;;;AAgCA,IAAM,oBAA2B,IAAI,IAAI;CAAC;CAAa;CAAc;A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,UAAU;UAAG;UAC5C,EAAe,EAAO,UAAU;SAChC,EAAA,CAAA,IACD;SACH,EAAO,YACN,kBAAC,KAAD,EAAA,UAAA;UACG,EAAE,4BAA4B,SAAS;UAAE;UAAE,EAAe,EAAO,SAAS;UAC1E,EAAO,gBAAgB,MAAM,EAAO,kBAAkB;SACtD,EAAA,CAAA,IACD;QACD;;MACF;QA5CE,EAAO,EA4CT,CACN;IAEA,CAAA;IAEL,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,EAAA,UAAoB,EAAE,wBAAwB,OAAO,EAAqB,CAAA,EACzD,CAAA;GACD;;CACT,CAAA;AAEjB"}
|
|
1
|
+
{"version":3,"file":"TicketDialog.js","names":[],"sources":["../../../src/ggnomad/components/TicketDialog.tsx"],"sourcesContent":["import { useMutation, useQuery } from '@apollo/client/react';\nimport type { TypedDocumentNode } from '@apollo/client';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { QrCode, Ticket as TicketIcon } from 'lucide-react';\nimport {\n AlertDialog,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n} from '@burdenoff/fe-libs/ui';\n\nimport { GGNOMAD_TICKETS_QUERY, ISSUE_GGNOMAD_TICKET_MUTATION } from '../graphql';\nimport { StatusBadge } from './StatusBadge';\nimport { notify } from '../utils/notify';\n\nexport interface GgnomadTicket {\n id: string;\n bookingId: string;\n ticketCode: string;\n /** BOFF-10194 — null unless the viewer made the booking; hosts scan the traveler's QR instead. */\n qrCodeDataUrl: string | null;\n status: 'ISSUED' | 'REDEEMED' | 'REVOKED';\n issuedAt: string;\n redeemedAt: string | null;\n redeemedBy: string | null;\n revokedAt: string | null;\n revokedReason: string | null;\n}\n\n/** Bookings reach CONFIRMED (payment verified) before a ticket can ever exist. */\nconst TICKET_ELIGIBLE_STATUSES = new Set(['CONFIRMED', 'CHECKED_IN', 'COMPLETED']);\n\ninterface TicketDialogProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n bookingId: string;\n referenceCode: string;\n bookingStatus: string;\n}\n\nfunction formatDateTime(value: string | null): string {\n if (!value) return '';\n const date = new Date(value);\n if (Number.isNaN(date.getTime())) return value;\n return date.toLocaleString();\n}\n\n/**\n * Traveler-facing mobile ticket view (BOFF-4362). Shows every QR ticket\n * issued for a booking — each ticket's QR code is rendered server-side from\n * its signed, revocable token (see wspace-ggnomad-svc `qrCodeDataUrl`), so\n * what's displayed here always reflects the ticket's live redemption state.\n */\nexport function TicketDialog({\n open,\n onOpenChange,\n bookingId,\n referenceCode,\n bookingStatus,\n}: TicketDialogProps) {\n const { t } = useI18n();\n\n const { data, loading, refetch } = useQuery(\n GGNOMAD_TICKETS_QUERY as TypedDocumentNode<\n { ggnomadTickets: GgnomadTicket[] },\n { bookingId: string }\n >,\n { variables: { bookingId }, skip: !open || !bookingId, fetchPolicy: 'network-only' }\n );\n\n const [issueTicket, { loading: issuing }] = useMutation(\n ISSUE_GGNOMAD_TICKET_MUTATION as TypedDocumentNode<\n { issueGgnomadTicket: GgnomadTicket },\n { bookingId: string }\n >\n );\n\n const tickets = data?.ggnomadTickets ?? [];\n const canIssue = TICKET_ELIGIBLE_STATUSES.has(bookingStatus.toUpperCase());\n\n const handleIssue = async () => {\n try {\n const result = await issueTicket({ variables: { bookingId } });\n if (result.error) {\n notify.error(\n t('ggnomad.ticket.issueErrorTitle', 'Could not issue ticket'),\n result.error.message\n );\n return;\n }\n notify.success(\n t('ggnomad.ticket.issueSuccessTitle', 'Ticket issued'),\n t('ggnomad.ticket.issueSuccessBody', 'A new QR ticket is ready to show at check-in.')\n );\n await refetch();\n } catch (err) {\n notify.error(\n t('ggnomad.ticket.issueErrorTitle', 'Could not issue ticket'),\n err instanceof Error ? err.message : String(err)\n );\n }\n };\n\n return (\n <AlertDialog open={open} onOpenChange={onOpenChange}>\n <AlertDialogContent className=\"max-w-md\">\n <AlertDialogHeader>\n <AlertDialogTitle className=\"flex items-center gap-2\">\n <TicketIcon className=\"size-4\" />\n {t('ggnomad.ticket.title', 'Mobile ticket')}\n </AlertDialogTitle>\n <AlertDialogDescription>\n {t('ggnomad.ticket.description', 'Show this QR code at check-in for {{ref}}.').replace(\n '{{ref}}',\n referenceCode\n )}\n </AlertDialogDescription>\n </AlertDialogHeader>\n\n <div className=\"max-h-[65vh] space-y-4 overflow-y-auto\">\n {loading ? (\n <p className=\"py-6 text-center text-sm text-text-secondary\">\n {t('ggnomad.ticket.loading', 'Loading your ticket…')}\n </p>\n ) : tickets.length === 0 ? (\n <div className=\"flex flex-col items-center gap-3 rounded-lg border border-dashed border-border-seam py-8 text-center\">\n <QrCode className=\"size-8 text-text-secondary\" aria-hidden=\"true\" />\n <p className=\"text-sm text-text-secondary\">\n {canIssue\n ? t(\n 'ggnomad.ticket.noneYet',\n 'No QR ticket has been issued for this booking yet.'\n )\n : t(\n 'ggnomad.ticket.notConfirmed',\n 'A QR ticket will be issued automatically once this booking is confirmed.'\n )}\n </p>\n {canIssue ? (\n <button\n type=\"button\"\n onClick={() => void handleIssue()}\n disabled={issuing}\n className=\"rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bgHover disabled:opacity-50\"\n >\n {issuing\n ? t('ggnomad.ticket.issuing', 'Issuing…')\n : t('ggnomad.ticket.issueAction', 'Issue QR ticket')}\n </button>\n ) : null}\n </div>\n ) : (\n tickets.map((ticket) => (\n <div\n key={ticket.id}\n className=\"flex flex-col items-center gap-3 rounded-lg border border-border-seam bg-bg-surface/40 p-4\"\n >\n <div className=\"flex w-full items-center justify-between\">\n <span className=\"font-mono text-xs text-text-secondary\">{ticket.ticketCode}</span>\n <StatusBadge status={ticket.status} live={ticket.status === 'ISSUED'} />\n </div>\n\n {ticket.status === 'ISSUED' && !ticket.qrCodeDataUrl ? (\n <div className=\"flex size-48 items-center justify-center rounded-md border border-dashed border-border-seam bg-bg-sunken p-3 text-center text-xs text-text-secondary\">\n {t(\n 'ggnomad.ticket.qrTravelerOnly',\n 'The QR code is shown only to the traveler. Scan it from their device at check-in.'\n )}\n </div>\n ) : ticket.status === 'ISSUED' && ticket.qrCodeDataUrl ? (\n <img\n src={ticket.qrCodeDataUrl}\n alt={t('ggnomad.ticket.qrAlt', 'QR code for ticket {{code}}').replace(\n '{{code}}',\n ticket.ticketCode\n )}\n className=\"size-48 rounded-md border border-border-seam bg-white p-2\"\n width={192}\n height={192}\n />\n ) : (\n <div className=\"flex size-48 items-center justify-center rounded-md border border-dashed border-border-seam bg-bg-sunken text-center text-xs text-text-secondary\">\n {ticket.status === 'REDEEMED'\n ? t('ggnomad.ticket.alreadyRedeemed', 'Already redeemed — QR retired')\n : t('ggnomad.ticket.revokedNotice', 'Revoked — no longer valid')}\n </div>\n )}\n\n <div className=\"w-full space-y-1 text-xs text-text-secondary\">\n <p>\n {t('ggnomad.ticket.issuedAt', 'Issued')} {formatDateTime(ticket.issuedAt)}\n </p>\n {ticket.redeemedAt ? (\n <p>\n {t('ggnomad.ticket.redeemedAt', 'Redeemed')}{' '}\n {formatDateTime(ticket.redeemedAt)}\n </p>\n ) : null}\n {ticket.revokedAt ? (\n <p>\n {t('ggnomad.ticket.revokedAt', 'Revoked')} {formatDateTime(ticket.revokedAt)}\n {ticket.revokedReason ? ` — ${ticket.revokedReason}` : ''}\n </p>\n ) : null}\n </div>\n </div>\n ))\n )}\n </div>\n\n <AlertDialogFooter>\n <AlertDialogCancel>{t('ggnomad.ticket.close', 'Close')}</AlertDialogCancel>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n );\n}\n"],"mappings":";;;;;;;;;AAiCA,IAAM,oBAA2B,IAAI,IAAI;CAAC;CAAa;CAAc;AAAW,CAAC;AAUjF,SAAS,EAAe,GAA8B;CACpD,IAAI,CAAC,GAAO,OAAO;CACnB,IAAM,IAAO,IAAI,KAAK,CAAK;CAE3B,OADI,OAAO,MAAM,EAAK,QAAQ,CAAC,IAAU,IAClC,EA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AAA,CAAA,IACD;SACH,EAAO,YACN,kBAAC,KAAD,EAAA,UAAA;UACG,EAAE,4BAA4B,SAAS;UAAE;UAAE,EAAe,EAAO,SAAS;UAC1E,EAAO,gBAAgB,MAAM,EAAO,kBAAkB;SACtD,EAAA,CAAA,IACD;QACD;;MACF;QAnDE,EAAO,EAmDT,CACN;IAEA,CAAA;IAEL,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,EAAA,UAAoB,EAAE,wBAAwB,OAAO,EAAqB,CAAA,EACzD,CAAA;GACD;;CACT,CAAA;AAEjB"}
|
package/dist/ggnomad/graphql.js
CHANGED
|
@@ -838,47 +838,45 @@ var R = e`
|
|
|
838
838
|
${H}
|
|
839
839
|
}
|
|
840
840
|
}
|
|
841
|
-
|
|
842
|
-
e`
|
|
841
|
+
`, W = e`
|
|
843
842
|
mutation SubmitGGNomadListingForReview($listingType: GgnomadListingType!, $id: ID!) {
|
|
844
843
|
submitGgnomadListingForReview(listingType: $listingType, id: $id) {
|
|
845
844
|
${H}
|
|
846
845
|
}
|
|
847
846
|
}
|
|
848
|
-
|
|
849
|
-
var W = e`
|
|
847
|
+
`, G = e`
|
|
850
848
|
mutation ApproveGGNomadListing($listingType: GgnomadListingType!, $id: ID!, $note: String) {
|
|
851
849
|
approveGgnomadListing(listingType: $listingType, id: $id, note: $note) {
|
|
852
850
|
${H}
|
|
853
851
|
}
|
|
854
852
|
}
|
|
855
|
-
`,
|
|
853
|
+
`, K = e`
|
|
856
854
|
mutation RejectGGNomadListing($listingType: GgnomadListingType!, $id: ID!, $reason: String!) {
|
|
857
855
|
rejectGgnomadListing(listingType: $listingType, id: $id, reason: $reason) {
|
|
858
856
|
${H}
|
|
859
857
|
}
|
|
860
858
|
}
|
|
861
|
-
|
|
862
|
-
e`
|
|
859
|
+
`, q = e`
|
|
863
860
|
mutation PauseGGNomadListing($listingType: GgnomadListingType!, $id: ID!, $reason: String) {
|
|
864
861
|
pauseGgnomadListing(listingType: $listingType, id: $id, reason: $reason) {
|
|
865
862
|
${H}
|
|
866
863
|
}
|
|
867
864
|
}
|
|
868
|
-
`, e`
|
|
865
|
+
`, J = e`
|
|
869
866
|
mutation ResumeGGNomadListing($listingType: GgnomadListingType!, $id: ID!) {
|
|
870
867
|
resumeGgnomadListing(listingType: $listingType, id: $id) {
|
|
871
868
|
${H}
|
|
872
869
|
}
|
|
873
870
|
}
|
|
874
|
-
|
|
871
|
+
`;
|
|
872
|
+
e`
|
|
875
873
|
mutation ArchiveGGNomadListing($listingType: GgnomadListingType!, $id: ID!, $reason: String) {
|
|
876
874
|
archiveGgnomadListing(listingType: $listingType, id: $id, reason: $reason) {
|
|
877
875
|
${H}
|
|
878
876
|
}
|
|
879
877
|
}
|
|
880
878
|
`;
|
|
881
|
-
var
|
|
879
|
+
var Y = e`
|
|
882
880
|
query GGNomadBookingQueue($limit: Int, $offset: Int) {
|
|
883
881
|
ggnomadBookingQueue(pagination: { limit: $limit, offset: $offset }) {
|
|
884
882
|
id
|
|
@@ -896,28 +894,28 @@ var K = e`
|
|
|
896
894
|
createdAt
|
|
897
895
|
}
|
|
898
896
|
}
|
|
899
|
-
`,
|
|
897
|
+
`, X = e`
|
|
900
898
|
mutation CheckInGGNomadBooking($id: ID!) {
|
|
901
899
|
checkInGgnomadBooking(id: $id) {
|
|
902
900
|
id
|
|
903
901
|
status
|
|
904
902
|
}
|
|
905
903
|
}
|
|
906
|
-
`,
|
|
904
|
+
`, Z = e`
|
|
907
905
|
mutation CompleteGGNomadBooking($id: ID!) {
|
|
908
906
|
completeGgnomadBooking(id: $id) {
|
|
909
907
|
id
|
|
910
908
|
status
|
|
911
909
|
}
|
|
912
910
|
}
|
|
913
|
-
`,
|
|
911
|
+
`, Q = e`
|
|
914
912
|
mutation MarkGGNomadBookingNoShow($id: ID!, $reason: String) {
|
|
915
913
|
markGgnomadBookingNoShow(id: $id, reason: $reason) {
|
|
916
914
|
id
|
|
917
915
|
status
|
|
918
916
|
}
|
|
919
917
|
}
|
|
920
|
-
`,
|
|
918
|
+
`, $ = e`
|
|
921
919
|
query GGNomadAuditLog($entityType: String!, $entityId: String!, $limit: Int, $offset: Int) {
|
|
922
920
|
ggnomadAuditLog(
|
|
923
921
|
entityType: $entityType
|
|
@@ -933,7 +931,7 @@ var K = e`
|
|
|
933
931
|
createdAt
|
|
934
932
|
}
|
|
935
933
|
}
|
|
936
|
-
`,
|
|
934
|
+
`, te = e`
|
|
937
935
|
query GGNomadMyProviders {
|
|
938
936
|
myGgnomadProviders {
|
|
939
937
|
id
|
|
@@ -942,7 +940,7 @@ var K = e`
|
|
|
942
940
|
status
|
|
943
941
|
}
|
|
944
942
|
}
|
|
945
|
-
`,
|
|
943
|
+
`, ne = e`
|
|
946
944
|
query GGNomadMyProviderAnalytics(
|
|
947
945
|
$providerId: ID!
|
|
948
946
|
$dateFrom: DateTime
|
|
@@ -981,7 +979,7 @@ var K = e`
|
|
|
981
979
|
}
|
|
982
980
|
}
|
|
983
981
|
}
|
|
984
|
-
`,
|
|
982
|
+
`, re = e`
|
|
985
983
|
query GGNomadOperatorStorefront($providerId: ID!) {
|
|
986
984
|
ggnomadOperatorStorefront(providerId: $providerId) {
|
|
987
985
|
id
|
|
@@ -995,7 +993,7 @@ var K = e`
|
|
|
995
993
|
publishedAt
|
|
996
994
|
}
|
|
997
995
|
}
|
|
998
|
-
`,
|
|
996
|
+
`, ie = e`
|
|
999
997
|
query GGNomadStorefrontBySlug($workspaceId: ID!, $slug: String!) {
|
|
1000
998
|
ggnomadStorefrontBySlug(workspaceId: $workspaceId, slug: $slug) {
|
|
1001
999
|
storefront {
|
|
@@ -1044,7 +1042,7 @@ var K = e`
|
|
|
1044
1042
|
}
|
|
1045
1043
|
}
|
|
1046
1044
|
}
|
|
1047
|
-
`,
|
|
1045
|
+
`, ae = e`
|
|
1048
1046
|
mutation CreateGGNomadOperatorStorefront($input: CreateGgnomadOperatorStorefrontInput!) {
|
|
1049
1047
|
createGgnomadOperatorStorefront(input: $input) {
|
|
1050
1048
|
id
|
|
@@ -1058,7 +1056,7 @@ var K = e`
|
|
|
1058
1056
|
publishedAt
|
|
1059
1057
|
}
|
|
1060
1058
|
}
|
|
1061
|
-
`,
|
|
1059
|
+
`, oe = e`
|
|
1062
1060
|
mutation UpdateGGNomadOperatorStorefront(
|
|
1063
1061
|
$id: ID!
|
|
1064
1062
|
$input: UpdateGgnomadOperatorStorefrontInput!
|
|
@@ -1075,7 +1073,7 @@ var K = e`
|
|
|
1075
1073
|
publishedAt
|
|
1076
1074
|
}
|
|
1077
1075
|
}
|
|
1078
|
-
`,
|
|
1076
|
+
`, se = e`
|
|
1079
1077
|
mutation PublishGGNomadOperatorStorefront($id: ID!) {
|
|
1080
1078
|
publishGgnomadOperatorStorefront(id: $id) {
|
|
1081
1079
|
id
|
|
@@ -1083,7 +1081,7 @@ var K = e`
|
|
|
1083
1081
|
publishedAt
|
|
1084
1082
|
}
|
|
1085
1083
|
}
|
|
1086
|
-
`,
|
|
1084
|
+
`, ce = e`
|
|
1087
1085
|
mutation UnpublishGGNomadOperatorStorefront($id: ID!) {
|
|
1088
1086
|
unpublishGgnomadOperatorStorefront(id: $id) {
|
|
1089
1087
|
id
|
|
@@ -1091,7 +1089,7 @@ var K = e`
|
|
|
1091
1089
|
publishedAt
|
|
1092
1090
|
}
|
|
1093
1091
|
}
|
|
1094
|
-
`,
|
|
1092
|
+
`, le = e`
|
|
1095
1093
|
query GGNomadBookingSlots(
|
|
1096
1094
|
$listingId: ID!
|
|
1097
1095
|
$listingType: GgnomadListingType!
|
|
@@ -1116,7 +1114,7 @@ var K = e`
|
|
|
1116
1114
|
isActive
|
|
1117
1115
|
}
|
|
1118
1116
|
}
|
|
1119
|
-
`,
|
|
1117
|
+
`, ue = e`
|
|
1120
1118
|
query GGNomadTransportSearch($input: SearchGgnomadTransportInput!) {
|
|
1121
1119
|
searchGgnomadTransport(input: $input) {
|
|
1122
1120
|
offerId
|
|
@@ -1141,7 +1139,7 @@ var K = e`
|
|
|
1141
1139
|
providerName
|
|
1142
1140
|
}
|
|
1143
1141
|
}
|
|
1144
|
-
`,
|
|
1142
|
+
`, de = e`
|
|
1145
1143
|
mutation CreateGGNomadTrip($input: CreateGgnomadTripInput!) {
|
|
1146
1144
|
createGgnomadTrip(input: $input) {
|
|
1147
1145
|
id
|
|
@@ -1154,7 +1152,7 @@ var K = e`
|
|
|
1154
1152
|
currency
|
|
1155
1153
|
}
|
|
1156
1154
|
}
|
|
1157
|
-
`,
|
|
1155
|
+
`, fe = e`
|
|
1158
1156
|
query GGNomadMyGroupTrips {
|
|
1159
1157
|
myGgnomadGroupTrips {
|
|
1160
1158
|
id
|
|
@@ -1173,7 +1171,7 @@ var K = e`
|
|
|
1173
1171
|
}
|
|
1174
1172
|
}
|
|
1175
1173
|
}
|
|
1176
|
-
`,
|
|
1174
|
+
`, pe = e`
|
|
1177
1175
|
query GGNomadGroupTripCostSplit($groupTripId: ID!) {
|
|
1178
1176
|
ggnomadGroupTripCostSplit(groupTripId: $groupTripId) {
|
|
1179
1177
|
currency
|
|
@@ -1189,7 +1187,7 @@ var K = e`
|
|
|
1189
1187
|
}
|
|
1190
1188
|
}
|
|
1191
1189
|
}
|
|
1192
|
-
`,
|
|
1190
|
+
`, me = e`
|
|
1193
1191
|
query GGNomadGroupTripVotes($groupTripId: ID!) {
|
|
1194
1192
|
ggnomadGroupTripVotes(groupTripId: $groupTripId) {
|
|
1195
1193
|
tripPlanItemId
|
|
@@ -1205,7 +1203,7 @@ var K = e`
|
|
|
1205
1203
|
}
|
|
1206
1204
|
}
|
|
1207
1205
|
}
|
|
1208
|
-
`,
|
|
1206
|
+
`, he = e`
|
|
1209
1207
|
mutation CreateGGNomadGroupTrip($input: CreateGgnomadGroupTripInput!) {
|
|
1210
1208
|
createGgnomadGroupTrip(input: $input) {
|
|
1211
1209
|
id
|
|
@@ -1215,7 +1213,7 @@ var K = e`
|
|
|
1215
1213
|
currency
|
|
1216
1214
|
}
|
|
1217
1215
|
}
|
|
1218
|
-
`,
|
|
1216
|
+
`, ge = e`
|
|
1219
1217
|
mutation AddGGNomadGroupTripMember($groupTripId: ID!, $input: AddGgnomadGroupTripMemberInput!) {
|
|
1220
1218
|
addGgnomadGroupTripMember(groupTripId: $groupTripId, input: $input) {
|
|
1221
1219
|
id
|
|
@@ -1224,11 +1222,11 @@ var K = e`
|
|
|
1224
1222
|
email
|
|
1225
1223
|
}
|
|
1226
1224
|
}
|
|
1227
|
-
`,
|
|
1225
|
+
`, _e = e`
|
|
1228
1226
|
mutation RemoveGGNomadGroupTripMember($groupTripId: ID!, $memberId: ID!) {
|
|
1229
1227
|
removeGgnomadGroupTripMember(groupTripId: $groupTripId, memberId: $memberId)
|
|
1230
1228
|
}
|
|
1231
|
-
`,
|
|
1229
|
+
`, ve = e`
|
|
1232
1230
|
mutation VoteGGNomadTripPlanItem($groupTripId: ID!, $input: VoteGgnomadTripPlanItemInput!) {
|
|
1233
1231
|
voteGgnomadTripPlanItem(groupTripId: $groupTripId, input: $input) {
|
|
1234
1232
|
id
|
|
@@ -1239,6 +1237,6 @@ var K = e`
|
|
|
1239
1237
|
}
|
|
1240
1238
|
`;
|
|
1241
1239
|
//#endregion
|
|
1242
|
-
export {
|
|
1240
|
+
export { ge as ADD_GGNOMAD_GROUP_TRIP_MEMBER_MUTATION, E as ADD_GGNOMAD_TRIP_PLAN_ITEM_MUTATION, z as APPROVE_GGNOMAD_BOOKING_APPROVAL_MUTATION, G as APPROVE_GGNOMAD_LISTING_MUTATION, v as CANCEL_GGNOMAD_BOOKING_MUTATION, X as CHECK_IN_GGNOMAD_BOOKING_MUTATION, Z as COMPLETE_GGNOMAD_BOOKING_MUTATION, g as CREATE_GGNOMAD_BOOKING_MUTATION, he as CREATE_GGNOMAD_GROUP_TRIP_MUTATION, ae as CREATE_GGNOMAD_OPERATOR_STOREFRONT_MUTATION, O as CREATE_GGNOMAD_PROVIDER_MUTATION, j as CREATE_GGNOMAD_REVIEW_MUTATION, L as CREATE_GGNOMAD_TRAVEL_POLICY_MUTATION, de as CREATE_GGNOMAD_TRIP_MUTATION, w as CREATE_GGNOMAD_TRIP_PLAN_MUTATION, R as DELETE_GGNOMAD_TRAVEL_POLICY_MUTATION, d as GGNOMAD_ACTIVITIES_QUERY, f as GGNOMAD_ACTIVITY_QUERY, $ as GGNOMAD_AUDIT_LOG_QUERY, n as GGNOMAD_BOOKABLE_SAMPLE_QUERY, m as GGNOMAD_BOOKINGS_QUERY, ee as GGNOMAD_BOOKING_APPROVALS_QUERY, Y as GGNOMAD_BOOKING_QUEUE_QUERY, le as GGNOMAD_BOOKING_SLOTS_QUERY, l as GGNOMAD_EVENTS_QUERY, u as GGNOMAD_EVENT_QUERY, h as GGNOMAD_FAVORITES_QUERY, r as GGNOMAD_FAVORITE_TARGETS_QUERY, pe as GGNOMAD_GROUP_TRIP_COST_SPLIT_QUERY, me as GGNOMAD_GROUP_TRIP_VOTES_QUERY, U as GGNOMAD_LISTING_REVIEW_QUEUE_QUERY, fe as GGNOMAD_MY_GROUP_TRIPS_QUERY, te as GGNOMAD_MY_PROVIDERS_QUERY, ne as GGNOMAD_MY_PROVIDER_ANALYTICS_QUERY, re as GGNOMAD_OPERATOR_STOREFRONT_QUERY, t as GGNOMAD_OVERVIEW_QUERY, a as GGNOMAD_PROPERTIES_QUERY, o as GGNOMAD_PROPERTY_QUERY, i as GGNOMAD_PROVIDERS_QUERY, A as GGNOMAD_REVIEWS_QUERY, k as GGNOMAD_REVIEW_SUMMARY_QUERY, V as GGNOMAD_SPEND_SUMMARY_QUERY, ie as GGNOMAD_STOREFRONT_BY_SLUG_QUERY, y as GGNOMAD_TICKETS_QUERY, s as GGNOMAD_TOURS_QUERY, c as GGNOMAD_TOUR_QUERY, ue as GGNOMAD_TRANSPORT_SEARCH_QUERY, I as GGNOMAD_TRAVEL_POLICIES_QUERY, p as GGNOMAD_TRIPS_QUERY, S as GGNOMAD_TRIP_PLANS_QUERY, C as GGNOMAD_TRIP_PLAN_QUERY, b as ISSUE_GGNOMAD_TICKET_MUTATION, Q as MARK_GGNOMAD_BOOKING_NO_SHOW_MUTATION, q as PAUSE_GGNOMAD_LISTING_MUTATION, se as PUBLISH_GGNOMAD_OPERATOR_STOREFRONT_MUTATION, x as REDEEM_GGNOMAD_TICKET_MUTATION, B as REJECT_GGNOMAD_BOOKING_APPROVAL_MUTATION, K as REJECT_GGNOMAD_LISTING_MUTATION, _e as REMOVE_GGNOMAD_GROUP_TRIP_MEMBER_MUTATION, D as REMOVE_GGNOMAD_TRIP_PLAN_ITEM_MUTATION, J as RESUME_GGNOMAD_LISTING_MUTATION, W as SUBMIT_GGNOMAD_LISTING_FOR_REVIEW_MUTATION, _ as TOGGLE_GGNOMAD_FAVORITE_MUTATION, ce as UNPUBLISH_GGNOMAD_OPERATOR_STOREFRONT_MUTATION, F as UPDATE_GGNOMAD_ACTIVITY_MUTATION, P as UPDATE_GGNOMAD_EVENT_MUTATION, oe as UPDATE_GGNOMAD_OPERATOR_STOREFRONT_MUTATION, M as UPDATE_GGNOMAD_PROPERTY_MUTATION, N as UPDATE_GGNOMAD_TOUR_MUTATION, T as UPDATE_GGNOMAD_TRIP_PLAN_MUTATION, ve as VOTE_GGNOMAD_TRIP_PLAN_ITEM_MUTATION };
|
|
1243
1241
|
|
|
1244
1242
|
//# sourceMappingURL=graphql.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql.js","names":[],"sources":["../../src/ggnomad/graphql.ts"],"sourcesContent":["import { gql } from '@apollo/client/core';\n\nexport const GGNOMAD_OVERVIEW_QUERY = gql`\n query GGNomadOverview {\n ggnomadOverviewStats {\n users\n listings\n bookings\n monthlyRevenue\n }\n ggnomadAnalytics {\n totalRevenue\n totalBookings\n totalUsers\n conversionRate\n revenueByCategory\n monthlyTrends\n topDestinations\n }\n }\n`;\n\n/**\n * One bookable item of each type (properties are priced per night, the rest\n * carry a flat price). Used to seed the Bookings \"create demo booking\" action\n * with a REAL listing id so the mutation passes the backend's\n * assertTargetInWorkspace check instead of failing on a synthetic id.\n */\nexport const GGNOMAD_BOOKABLE_SAMPLE_QUERY = gql`\n query GGNomadBookableSample {\n ggnomadProperties(pagination: { limit: 1, offset: 0 }) {\n id\n name\n pricePerNight\n currency\n }\n ggnomadTours(pagination: { limit: 1, offset: 0 }) {\n id\n name\n price\n currency\n }\n ggnomadEvents(pagination: { limit: 1, offset: 0 }) {\n id\n name\n price\n currency\n }\n ggnomadActivities(pagination: { limit: 1, offset: 0 }) {\n id\n name\n price\n currency\n }\n }\n`;\n\n/**\n * id + name for every favouritable listing type, used to (a) resolve the real\n * entity name for a saved favorite (which the backend only exposes as\n * targetType + targetId) and (b) seed the \"toggle demo favorite\" action with a\n * real target id.\n */\nexport const GGNOMAD_FAVORITE_TARGETS_QUERY = gql`\n query GGNomadFavoriteTargets {\n ggnomadProperties(pagination: { limit: 100, offset: 0 }) {\n id\n name\n type\n pricePerNight\n currency\n rating\n reviewCount\n images\n }\n ggnomadTours(pagination: { limit: 100, offset: 0 }) {\n id\n name\n type\n price\n currency\n rating\n reviewCount\n images\n }\n ggnomadEvents(pagination: { limit: 100, offset: 0 }) {\n id\n name\n category\n price\n currency\n rating\n reviewCount\n images\n }\n ggnomadActivities(pagination: { limit: 100, offset: 0 }) {\n id\n name\n category\n price\n currency\n rating\n reviewCount\n images\n }\n ggnomadTrips(pagination: { limit: 100, offset: 0 }) {\n id\n name\n transportMode\n price\n currency\n }\n }\n`;\n\nexport const GGNOMAD_PROVIDERS_QUERY = gql`\n query GGNomadProviders($limit: Int, $offset: Int) {\n ggnomadProviders(pagination: { limit: $limit, offset: $offset }) {\n id\n name\n type\n status\n listingCount\n totalRevenue\n rating\n reviewCount\n description\n contactEmail\n contactPhone\n website\n createdAt\n }\n }\n`;\n\nexport const GGNOMAD_PROPERTIES_QUERY = gql`\n query GGNomadProperties(\n $limit: Int\n $offset: Int\n $status: GgnomadListingStatus\n $minSustainabilityScore: Int\n $hasAccessibilityFeatures: [GgnomadAccessibilityFeature!]\n ) {\n ggnomadProperties(\n pagination: { limit: $limit, offset: $offset }\n status: $status\n minSustainabilityScore: $minSustainabilityScore\n hasAccessibilityFeatures: $hasAccessibilityFeatures\n ) {\n id\n name\n type\n status\n description\n pricePerNight\n currency\n rating\n reviewCount\n maxGuests\n amenities\n images\n providerId\n instantBook\n sustainabilityScore\n accessibilityFeatures\n }\n }\n`;\n\nexport const GGNOMAD_PROPERTY_QUERY = gql`\n query GGNomadProperty($id: ID!) {\n ggnomadProperty(id: $id) {\n id\n name\n type\n status\n description\n address\n pricePerNight\n currency\n rating\n reviewCount\n bedrooms\n bathrooms\n maxGuests\n checkInTime\n checkOutTime\n amenities\n images\n instantBook\n sustainabilityScore\n sustainabilityPractices\n accessibilityFeatures\n provider {\n id\n name\n type\n rating\n reviewCount\n listingCount\n contactEmail\n website\n }\n }\n }\n`;\n\n// Query to get property details for booking - ensures id is included\nexport const GGNOMAD_PROPERTY_FOR_BOOKING_QUERY = gql`\n query GGNomadPropertyForBooking($id: ID!) {\n ggnomadProperty(id: $id) {\n id\n name\n pricePerNight\n currency\n }\n }\n`;\n\nexport const GGNOMAD_TOURS_QUERY = gql`\n query GGNomadTours(\n $limit: Int\n $offset: Int\n $status: GgnomadListingStatus\n $minSustainabilityScore: Int\n $hasAccessibilityFeatures: [GgnomadAccessibilityFeature!]\n ) {\n ggnomadTours(\n pagination: { limit: $limit, offset: $offset }\n status: $status\n minSustainabilityScore: $minSustainabilityScore\n hasAccessibilityFeatures: $hasAccessibilityFeatures\n ) {\n id\n name\n description\n type\n status\n duration\n difficulty\n price\n currency\n rating\n reviewCount\n highlights\n images\n maxGroupSize\n instantBook\n sustainabilityScore\n accessibilityFeatures\n }\n }\n`;\n\nexport const GGNOMAD_TOUR_QUERY = gql`\n query GGNomadTour($id: ID!) {\n ggnomadTour(id: $id) {\n id\n name\n description\n type\n status\n duration\n difficulty\n price\n currency\n rating\n reviewCount\n highlights\n images\n languages\n guideName\n location\n maxGroupSize\n instantBook\n sustainabilityScore\n sustainabilityPractices\n accessibilityFeatures\n provider {\n id\n name\n type\n rating\n reviewCount\n listingCount\n contactEmail\n website\n }\n }\n }\n`;\n\nexport const GGNOMAD_EVENTS_QUERY = gql`\n query GGNomadEvents(\n $limit: Int\n $offset: Int\n $status: GgnomadListingStatus\n $minSustainabilityScore: Int\n $hasAccessibilityFeatures: [GgnomadAccessibilityFeature!]\n ) {\n ggnomadEvents(\n pagination: { limit: $limit, offset: $offset }\n status: $status\n minSustainabilityScore: $minSustainabilityScore\n hasAccessibilityFeatures: $hasAccessibilityFeatures\n ) {\n id\n name\n description\n category\n status\n startsAt\n price\n currency\n rating\n reviewCount\n performers\n images\n venue\n instantBook\n sustainabilityScore\n accessibilityFeatures\n }\n }\n`;\n\nexport const GGNOMAD_EVENT_QUERY = gql`\n query GGNomadEvent($id: ID!) {\n ggnomadEvent(id: $id) {\n id\n name\n description\n category\n status\n startsAt\n endsAt\n venue\n price\n currency\n rating\n reviewCount\n performers\n images\n instantBook\n sustainabilityScore\n sustainabilityPractices\n accessibilityFeatures\n provider {\n id\n name\n type\n rating\n reviewCount\n listingCount\n contactEmail\n website\n }\n }\n }\n`;\n\nexport const GGNOMAD_ACTIVITIES_QUERY = gql`\n query GGNomadActivities(\n $limit: Int\n $offset: Int\n $status: GgnomadListingStatus\n $minSustainabilityScore: Int\n $hasAccessibilityFeatures: [GgnomadAccessibilityFeature!]\n ) {\n ggnomadActivities(\n pagination: { limit: $limit, offset: $offset }\n status: $status\n minSustainabilityScore: $minSustainabilityScore\n hasAccessibilityFeatures: $hasAccessibilityFeatures\n ) {\n id\n name\n description\n category\n status\n duration\n difficulty\n price\n currency\n rating\n reviewCount\n maxParticipants\n includes\n requirements\n images\n location\n instantBook\n sustainabilityScore\n accessibilityFeatures\n }\n }\n`;\n\nexport const GGNOMAD_ACTIVITY_QUERY = gql`\n query GGNomadActivity($id: ID!) {\n ggnomadActivity(id: $id) {\n id\n name\n description\n category\n status\n location\n duration\n difficulty\n price\n currency\n rating\n reviewCount\n maxParticipants\n includes\n requirements\n safetyInfo\n images\n instantBook\n sustainabilityScore\n sustainabilityPractices\n accessibilityFeatures\n provider {\n id\n name\n type\n rating\n reviewCount\n listingCount\n contactEmail\n website\n }\n }\n }\n`;\n\nexport const GGNOMAD_TRIPS_QUERY = gql`\n query GGNomadTrips($limit: Int, $offset: Int) {\n ggnomadTrips(pagination: { limit: $limit, offset: $offset }) {\n id\n name\n transportMode\n status\n origin\n destination\n departureAt\n arrivalAt\n isRoundTrip\n carrier\n class\n price\n currency\n passengers\n ecoFriendly\n carrierCode\n co2Emissions\n stops\n returnDepartureAt\n returnArrivalAt\n }\n }\n`;\n\nexport const GGNOMAD_BOOKINGS_QUERY = gql`\n query GGNomadBookings($limit: Int, $offset: Int, $status: GgnomadBookingStatus) {\n ggnomadBookings(pagination: { limit: $limit, offset: $offset }, status: $status) {\n id\n referenceCode\n bookingType\n status\n itemId\n itemName\n guestName\n guestEmail\n guestPhone\n guests\n checkIn\n checkOut\n eventDate\n totalPrice\n currency\n paymentStatus\n paymentMethod\n specialRequests\n carbonEstimateKg\n carbonEstimateMethod\n createdAt\n }\n }\n`;\n\nexport const GGNOMAD_FAVORITES_QUERY = gql`\n query GGNomadFavorites {\n ggnomadFavorites\n }\n`;\n\nexport const CREATE_GGNOMAD_BOOKING_MUTATION = gql`\n mutation CreateGGNomadBooking($input: CreateGgnomadBookingInput!) {\n createGgnomadBooking(input: $input) {\n id\n referenceCode\n bookingType\n status\n itemId\n itemName\n guestName\n totalPrice\n currency\n createdAt\n }\n }\n`;\n\nexport const TOGGLE_GGNOMAD_FAVORITE_MUTATION = gql`\n mutation ToggleGGNomadFavorite($input: ToggleGgnomadFavoriteInput!) {\n toggleGgnomadFavorite(input: $input)\n }\n`;\n\nexport const CANCEL_GGNOMAD_BOOKING_MUTATION = gql`\n mutation CancelGGNomadBooking($id: ID!, $reason: String) {\n cancelGgnomadBooking(id: $id, reason: $reason) {\n id\n status\n }\n }\n`;\n\n// Mobile tickets / QR-code redemption (BOFF-4362)\nexport const GGNOMAD_TICKETS_QUERY = gql`\n query GGNomadTickets($bookingId: String) {\n ggnomadTickets(bookingId: $bookingId) {\n id\n bookingId\n ticketCode\n qrCodeDataUrl\n status\n issuedAt\n redeemedAt\n redeemedBy\n revokedAt\n revokedReason\n }\n }\n`;\n\nexport const ISSUE_GGNOMAD_TICKET_MUTATION = gql`\n mutation IssueGGNomadTicket($bookingId: ID!) {\n issueGgnomadTicket(bookingId: $bookingId) {\n id\n bookingId\n ticketCode\n qrCodeDataUrl\n status\n issuedAt\n }\n }\n`;\n\nexport const REDEEM_GGNOMAD_TICKET_MUTATION = gql`\n mutation RedeemGGNomadTicket($token: String!) {\n redeemGgnomadTicket(token: $token) {\n id\n bookingId\n ticketCode\n status\n redeemedAt\n redeemedBy\n }\n }\n`;\n\nexport const REVOKE_GGNOMAD_TICKET_MUTATION = gql`\n mutation RevokeGGNomadTicket($id: ID!, $reason: String) {\n revokeGgnomadTicket(id: $id, reason: $reason) {\n id\n status\n revokedAt\n revokedReason\n }\n }\n`;\n\n// Trip Plan Queries\nexport const GGNOMAD_TRIP_PLANS_QUERY = gql`\n query GGNomadTripPlans($limit: Int, $offset: Int) {\n ggnomadTripPlans(pagination: { limit: $limit, offset: $offset }) {\n id\n name\n description\n startDate\n endDate\n travelers\n status\n total\n itemCount\n createdAt\n }\n }\n`;\n\nexport const GGNOMAD_TRIP_PLAN_QUERY = gql`\n query GGNomadTripPlan($id: ID!) {\n ggnomadTripPlan(id: $id) {\n id\n name\n description\n startDate\n endDate\n travelers\n status\n total\n itemCount\n items {\n id\n itemType\n itemId\n itemName\n day\n scheduledAt\n price\n currency\n notes\n }\n createdAt\n updatedAt\n }\n }\n`;\n\n// Trip Plan Mutations\nexport const CREATE_GGNOMAD_TRIP_PLAN_MUTATION = gql`\n mutation CreateGGNomadTripPlan($input: CreateGgnomadTripPlanInput!) {\n createGgnomadTripPlan(input: $input) {\n id\n name\n description\n startDate\n endDate\n travelers\n status\n total\n itemCount\n createdAt\n }\n }\n`;\n\nexport const UPDATE_GGNOMAD_TRIP_PLAN_MUTATION = gql`\n mutation UpdateGGNomadTripPlan($id: ID!, $input: UpdateGgnomadTripPlanInput!) {\n updateGgnomadTripPlan(id: $id, input: $input) {\n id\n name\n description\n startDate\n endDate\n travelers\n status\n total\n itemCount\n updatedAt\n }\n }\n`;\n\nexport const DELETE_GGNOMAD_TRIP_PLAN_MUTATION = gql`\n mutation DeleteGGNomadTripPlan($id: ID!) {\n deleteGgnomadTripPlan(id: $id)\n }\n`;\n\nexport const ADD_GGNOMAD_TRIP_PLAN_ITEM_MUTATION = gql`\n mutation AddGGNomadTripPlanItem($tripPlanId: ID!, $input: AddGgnomadTripPlanItemInput!) {\n addGgnomadTripPlanItem(tripPlanId: $tripPlanId, input: $input) {\n id\n itemType\n itemId\n itemName\n day\n scheduledAt\n price\n currency\n notes\n }\n }\n`;\n\nexport const REMOVE_GGNOMAD_TRIP_PLAN_ITEM_MUTATION = gql`\n mutation RemoveGGNomadTripPlanItem($id: ID!) {\n removeGgnomadTripPlanItem(id: $id)\n }\n`;\n\nexport const CREATE_GGNOMAD_PROVIDER_MUTATION = gql`\n mutation CreateGGNomadProvider($input: CreateGgnomadProviderInput!) {\n createGgnomadProvider(input: $input) {\n id\n name\n type\n status\n listingCount\n totalRevenue\n rating\n reviewCount\n description\n contactEmail\n contactPhone\n website\n createdAt\n }\n }\n`;\n\n// Review Queries\nexport const GGNOMAD_REVIEW_SUMMARY_QUERY = gql`\n query GGNomadReviewSummary($targetType: GgnomadBookingType!, $targetId: String!) {\n ggnomadReviewSummary(targetType: $targetType, targetId: $targetId) {\n average\n count\n distribution\n }\n }\n`;\n\nexport const GGNOMAD_REVIEWS_QUERY = gql`\n query GGNomadReviews(\n $targetType: GgnomadBookingType!\n $targetId: String!\n $limit: Int\n $offset: Int\n ) {\n ggnomadReviews(\n targetType: $targetType\n targetId: $targetId\n pagination: { limit: $limit, offset: $offset }\n ) {\n id\n rating\n title\n content\n images\n isVerified\n helpfulCount\n response\n respondedAt\n createdAt\n }\n }\n`;\n\n// Review Mutations\nexport const CREATE_GGNOMAD_REVIEW_MUTATION = gql`\n mutation CreateGGNomadReview($input: CreateGgnomadReviewInput!) {\n createGgnomadReview(input: $input) {\n id\n rating\n title\n content\n }\n }\n`;\n\nexport const RESPOND_GGNOMAD_REVIEW_MUTATION = gql`\n mutation RespondGGNomadReview($id: ID!, $response: String!) {\n respondGgnomadReview(id: $id, response: $response) {\n id\n response\n respondedAt\n }\n }\n`;\n\n// Listing Edit Mutations\nexport const UPDATE_GGNOMAD_PROPERTY_MUTATION = gql`\n mutation UpdateGGNomadProperty($id: ID!, $input: UpdateGgnomadPropertyInput!) {\n updateGgnomadProperty(id: $id, input: $input) {\n id\n name\n description\n pricePerNight\n status\n images\n }\n }\n`;\n\nexport const UPDATE_GGNOMAD_TOUR_MUTATION = gql`\n mutation UpdateGGNomadTour($id: ID!, $input: UpdateGgnomadTourInput!) {\n updateGgnomadTour(id: $id, input: $input) {\n id\n name\n description\n price\n status\n images\n }\n }\n`;\n\nexport const UPDATE_GGNOMAD_EVENT_MUTATION = gql`\n mutation UpdateGGNomadEvent($id: ID!, $input: UpdateGgnomadEventInput!) {\n updateGgnomadEvent(id: $id, input: $input) {\n id\n name\n description\n price\n status\n images\n }\n }\n`;\n\nexport const UPDATE_GGNOMAD_ACTIVITY_MUTATION = gql`\n mutation UpdateGGNomadActivity($id: ID!, $input: UpdateGgnomadActivityInput!) {\n updateGgnomadActivity(id: $id, input: $input) {\n id\n name\n description\n price\n status\n images\n }\n }\n`;\n\n// Corporate travel management — policy, budgets, approvals (BOFF-4365)\nexport const GGNOMAD_TRAVEL_POLICIES_QUERY = gql`\n query GGNomadTravelPolicies($limit: Int, $offset: Int) {\n ggnomadTravelPolicies(pagination: { limit: $limit, offset: $offset }) {\n id\n name\n isActive\n costCenter\n currency\n maxBookingAmount\n maxMonthlyPerTraveler\n blockedDestinations\n allowedTravelClasses\n requireApprovalAlways\n createdAt\n }\n }\n`;\n\nexport const CREATE_GGNOMAD_TRAVEL_POLICY_MUTATION = gql`\n mutation CreateGGNomadTravelPolicy($input: CreateGgnomadTravelPolicyInput!) {\n createGgnomadTravelPolicy(input: $input) {\n id\n name\n isActive\n costCenter\n currency\n maxBookingAmount\n maxMonthlyPerTraveler\n blockedDestinations\n allowedTravelClasses\n requireApprovalAlways\n }\n }\n`;\n\nexport const UPDATE_GGNOMAD_TRAVEL_POLICY_MUTATION = gql`\n mutation UpdateGGNomadTravelPolicy($id: ID!, $input: UpdateGgnomadTravelPolicyInput!) {\n updateGgnomadTravelPolicy(id: $id, input: $input) {\n id\n isActive\n }\n }\n`;\n\nexport const DELETE_GGNOMAD_TRAVEL_POLICY_MUTATION = gql`\n mutation DeleteGGNomadTravelPolicy($id: ID!) {\n deleteGgnomadTravelPolicy(id: $id)\n }\n`;\n\nexport const GGNOMAD_BOOKING_APPROVALS_QUERY = gql`\n query GGNomadBookingApprovals($status: GgnomadApprovalStatus, $limit: Int, $offset: Int) {\n ggnomadBookingApprovals(status: $status, pagination: { limit: $limit, offset: $offset }) {\n id\n bookingId\n requestedBy\n costCenter\n reasons\n status\n reviewedBy\n reviewedAt\n reviewNote\n createdAt\n booking {\n id\n referenceCode\n itemName\n totalPrice\n currency\n status\n paymentStatus\n }\n }\n }\n`;\n\nexport const APPROVE_GGNOMAD_BOOKING_APPROVAL_MUTATION = gql`\n mutation ApproveGGNomadBookingApproval($id: ID!, $note: String) {\n approveGgnomadBookingApproval(id: $id, note: $note) {\n id\n status\n reviewedBy\n reviewedAt\n }\n }\n`;\n\nexport const REJECT_GGNOMAD_BOOKING_APPROVAL_MUTATION = gql`\n mutation RejectGGNomadBookingApproval($id: ID!, $reason: String!) {\n rejectGgnomadBookingApproval(id: $id, reason: $reason) {\n id\n status\n reviewedBy\n reviewedAt\n reviewNote\n }\n }\n`;\n\nexport const GGNOMAD_SPEND_SUMMARY_QUERY = gql`\n query GGNomadSpendSummary($costCenter: String) {\n ggnomadSpendSummary(costCenter: $costCenter) {\n totalSpend\n bookingCount\n pendingApprovalCount\n pendingApprovalAmount\n byCostCenter\n }\n }\n`;\n\n// ─── BOFF-4388 — listing verification + booking lifecycle operations queue ─\n\nconst LISTING_QUEUE_FIELDS = `\n __typename\n ... on GgnomadProperty {\n id\n name\n status\n pricePerNight\n currency\n providerId\n updatedAt\n }\n ... on GgnomadTour {\n id\n name\n status\n price\n currency\n providerId\n updatedAt\n }\n ... on GgnomadEvent {\n id\n name\n status\n price\n currency\n providerId\n updatedAt\n }\n ... on GgnomadActivity {\n id\n name\n status\n price\n currency\n providerId\n updatedAt\n }\n`;\n\nexport const GGNOMAD_LISTING_REVIEW_QUEUE_QUERY = gql`\n query GGNomadListingReviewQueue($limit: Int, $offset: Int) {\n ggnomadListingReviewQueue(pagination: { limit: $limit, offset: $offset }) {\n ${LISTING_QUEUE_FIELDS}\n }\n }\n`;\n\nexport const SUBMIT_GGNOMAD_LISTING_FOR_REVIEW_MUTATION = gql`\n mutation SubmitGGNomadListingForReview($listingType: GgnomadListingType!, $id: ID!) {\n submitGgnomadListingForReview(listingType: $listingType, id: $id) {\n ${LISTING_QUEUE_FIELDS}\n }\n }\n`;\n\nexport const APPROVE_GGNOMAD_LISTING_MUTATION = gql`\n mutation ApproveGGNomadListing($listingType: GgnomadListingType!, $id: ID!, $note: String) {\n approveGgnomadListing(listingType: $listingType, id: $id, note: $note) {\n ${LISTING_QUEUE_FIELDS}\n }\n }\n`;\n\nexport const REJECT_GGNOMAD_LISTING_MUTATION = gql`\n mutation RejectGGNomadListing($listingType: GgnomadListingType!, $id: ID!, $reason: String!) {\n rejectGgnomadListing(listingType: $listingType, id: $id, reason: $reason) {\n ${LISTING_QUEUE_FIELDS}\n }\n }\n`;\n\nexport const PAUSE_GGNOMAD_LISTING_MUTATION = gql`\n mutation PauseGGNomadListing($listingType: GgnomadListingType!, $id: ID!, $reason: String) {\n pauseGgnomadListing(listingType: $listingType, id: $id, reason: $reason) {\n ${LISTING_QUEUE_FIELDS}\n }\n }\n`;\n\nexport const RESUME_GGNOMAD_LISTING_MUTATION = gql`\n mutation ResumeGGNomadListing($listingType: GgnomadListingType!, $id: ID!) {\n resumeGgnomadListing(listingType: $listingType, id: $id) {\n ${LISTING_QUEUE_FIELDS}\n }\n }\n`;\n\nexport const ARCHIVE_GGNOMAD_LISTING_MUTATION = gql`\n mutation ArchiveGGNomadListing($listingType: GgnomadListingType!, $id: ID!, $reason: String) {\n archiveGgnomadListing(listingType: $listingType, id: $id, reason: $reason) {\n ${LISTING_QUEUE_FIELDS}\n }\n }\n`;\n\nexport const GGNOMAD_BOOKING_QUEUE_QUERY = gql`\n query GGNomadBookingQueue($limit: Int, $offset: Int) {\n ggnomadBookingQueue(pagination: { limit: $limit, offset: $offset }) {\n id\n referenceCode\n bookingType\n status\n itemName\n guestName\n guests\n checkIn\n checkOut\n eventDate\n totalPrice\n currency\n createdAt\n }\n }\n`;\n\nexport const CHECK_IN_GGNOMAD_BOOKING_MUTATION = gql`\n mutation CheckInGGNomadBooking($id: ID!) {\n checkInGgnomadBooking(id: $id) {\n id\n status\n }\n }\n`;\n\nexport const COMPLETE_GGNOMAD_BOOKING_MUTATION = gql`\n mutation CompleteGGNomadBooking($id: ID!) {\n completeGgnomadBooking(id: $id) {\n id\n status\n }\n }\n`;\n\nexport const MARK_GGNOMAD_BOOKING_NO_SHOW_MUTATION = gql`\n mutation MarkGGNomadBookingNoShow($id: ID!, $reason: String) {\n markGgnomadBookingNoShow(id: $id, reason: $reason) {\n id\n status\n }\n }\n`;\n\nexport const GGNOMAD_AUDIT_LOG_QUERY = gql`\n query GGNomadAuditLog($entityType: String!, $entityId: String!, $limit: Int, $offset: Int) {\n ggnomadAuditLog(\n entityType: $entityType\n entityId: $entityId\n pagination: { limit: $limit, offset: $offset }\n ) {\n id\n action\n fromStatus\n toStatus\n reason\n actorId\n createdAt\n }\n }\n`;\n\n// ─── BOFF-4390 — provider analytics dashboards ─────────────────────────────\n\nexport const GGNOMAD_MY_PROVIDERS_QUERY = gql`\n query GGNomadMyProviders {\n myGgnomadProviders {\n id\n name\n type\n status\n }\n }\n`;\n\nexport const GGNOMAD_MY_PROVIDER_ANALYTICS_QUERY = gql`\n query GGNomadMyProviderAnalytics(\n $providerId: ID!\n $dateFrom: DateTime\n $dateTo: DateTime\n $granularity: String\n ) {\n myGgnomadProviderAnalytics(\n providerId: $providerId\n dateFrom: $dateFrom\n dateTo: $dateTo\n granularity: $granularity\n ) {\n providerId\n providerName\n dateFrom\n dateTo\n granularity\n totalBookings\n totalRevenue\n cancelledBookings\n cancellationRate\n capacityUtilizationRate\n bookingsOverTime {\n period\n bookings\n revenue\n }\n topListings {\n listingId\n listingType\n listingName\n bookings\n revenue\n cancellationRate\n capacityUtilizationRate\n }\n }\n }\n`;\n\n// ─── BOFF-4363 — white-label operator storefront ───────────────────────────\n\nexport const GGNOMAD_OPERATOR_STOREFRONT_QUERY = gql`\n query GGNomadOperatorStorefront($providerId: ID!) {\n ggnomadOperatorStorefront(providerId: $providerId) {\n id\n providerId\n slug\n displayName\n logoUrl\n primaryColor\n aboutText\n isPublished\n publishedAt\n }\n }\n`;\n\nexport const GGNOMAD_STOREFRONT_BY_SLUG_QUERY = gql`\n query GGNomadStorefrontBySlug($workspaceId: ID!, $slug: String!) {\n ggnomadStorefrontBySlug(workspaceId: $workspaceId, slug: $slug) {\n storefront {\n id\n displayName\n logoUrl\n primaryColor\n aboutText\n publishedAt\n }\n properties {\n id\n name\n pricePerNight\n currency\n images\n rating\n sustainabilityScore\n }\n tours {\n id\n name\n price\n currency\n images\n rating\n sustainabilityScore\n }\n events {\n id\n name\n price\n currency\n images\n startsAt\n sustainabilityScore\n }\n activities {\n id\n name\n price\n currency\n images\n rating\n sustainabilityScore\n }\n }\n }\n`;\n\nexport const CREATE_GGNOMAD_OPERATOR_STOREFRONT_MUTATION = gql`\n mutation CreateGGNomadOperatorStorefront($input: CreateGgnomadOperatorStorefrontInput!) {\n createGgnomadOperatorStorefront(input: $input) {\n id\n providerId\n slug\n displayName\n logoUrl\n primaryColor\n aboutText\n isPublished\n publishedAt\n }\n }\n`;\n\nexport const UPDATE_GGNOMAD_OPERATOR_STOREFRONT_MUTATION = gql`\n mutation UpdateGGNomadOperatorStorefront(\n $id: ID!\n $input: UpdateGgnomadOperatorStorefrontInput!\n ) {\n updateGgnomadOperatorStorefront(id: $id, input: $input) {\n id\n providerId\n slug\n displayName\n logoUrl\n primaryColor\n aboutText\n isPublished\n publishedAt\n }\n }\n`;\n\nexport const PUBLISH_GGNOMAD_OPERATOR_STOREFRONT_MUTATION = gql`\n mutation PublishGGNomadOperatorStorefront($id: ID!) {\n publishGgnomadOperatorStorefront(id: $id) {\n id\n isPublished\n publishedAt\n }\n }\n`;\n\nexport const UNPUBLISH_GGNOMAD_OPERATOR_STOREFRONT_MUTATION = gql`\n mutation UnpublishGGNomadOperatorStorefront($id: ID!) {\n unpublishGgnomadOperatorStorefront(id: $id) {\n id\n isPublished\n publishedAt\n }\n }\n`;\n\n// ─── BOFF-4361 — real-time availability slots for one listing ──────────────\n\nexport const GGNOMAD_BOOKING_SLOTS_QUERY = gql`\n query GGNomadBookingSlots(\n $listingId: ID!\n $listingType: GgnomadListingType!\n $dateFrom: DateTime\n $onlyAvailable: Boolean\n $limit: Int\n $offset: Int\n ) {\n ggnomadBookingSlots(\n listingId: $listingId\n listingType: $listingType\n dateFrom: $dateFrom\n onlyAvailable: $onlyAvailable\n pagination: { limit: $limit, offset: $offset }\n ) {\n id\n startAt\n endAt\n capacity\n bookedCount\n remainingCapacity\n isActive\n }\n }\n`;\n\n// ─── BOFF-4406 — transport inventory search + booking a searched leg ───────\n\nexport const GGNOMAD_TRANSPORT_SEARCH_QUERY = gql`\n query GGNomadTransportSearch($input: SearchGgnomadTransportInput!) {\n searchGgnomadTransport(input: $input) {\n offerId\n origin\n destination\n transportMode\n departureAt\n arrivalAt\n returnDepartureAt\n returnArrivalAt\n isRoundTrip\n carrier\n carrierCode\n class\n price\n currency\n passengers\n stops\n durationMinutes\n ecoFriendly\n co2Emissions\n providerName\n }\n }\n`;\n\nexport const CREATE_GGNOMAD_TRIP_MUTATION = gql`\n mutation CreateGGNomadTrip($input: CreateGgnomadTripInput!) {\n createGgnomadTrip(input: $input) {\n id\n name\n status\n transportMode\n departureAt\n arrivalAt\n price\n currency\n }\n }\n`;\n\n// ─── BOFF-4374 — group trips: members, item votes, cost split ──────────────\n\nexport const GGNOMAD_MY_GROUP_TRIPS_QUERY = gql`\n query GGNomadMyGroupTrips {\n myGgnomadGroupTrips {\n id\n name\n tripPlanId\n splitMethod\n currency\n createdBy\n createdAt\n members {\n id\n actorId\n displayName\n email\n createdAt\n }\n }\n }\n`;\n\nexport const GGNOMAD_GROUP_TRIP_COST_SPLIT_QUERY = gql`\n query GGNomadGroupTripCostSplit($groupTripId: ID!) {\n ggnomadGroupTripCostSplit(groupTripId: $groupTripId) {\n currency\n totalCost\n splitMethod\n shares {\n memberId\n actorId\n displayName\n amountOwed\n assignedTotal\n sharedTotal\n }\n }\n }\n`;\n\nexport const GGNOMAD_GROUP_TRIP_VOTES_QUERY = gql`\n query GGNomadGroupTripVotes($groupTripId: ID!) {\n ggnomadGroupTripVotes(groupTripId: $groupTripId) {\n tripPlanItemId\n yes\n no\n abstain\n votes {\n id\n actorId\n choice\n comment\n createdAt\n }\n }\n }\n`;\n\nexport const CREATE_GGNOMAD_GROUP_TRIP_MUTATION = gql`\n mutation CreateGGNomadGroupTrip($input: CreateGgnomadGroupTripInput!) {\n createGgnomadGroupTrip(input: $input) {\n id\n name\n tripPlanId\n splitMethod\n currency\n }\n }\n`;\n\nexport const ADD_GGNOMAD_GROUP_TRIP_MEMBER_MUTATION = gql`\n mutation AddGGNomadGroupTripMember($groupTripId: ID!, $input: AddGgnomadGroupTripMemberInput!) {\n addGgnomadGroupTripMember(groupTripId: $groupTripId, input: $input) {\n id\n actorId\n displayName\n email\n }\n }\n`;\n\nexport const REMOVE_GGNOMAD_GROUP_TRIP_MEMBER_MUTATION = gql`\n mutation RemoveGGNomadGroupTripMember($groupTripId: ID!, $memberId: ID!) {\n removeGgnomadGroupTripMember(groupTripId: $groupTripId, memberId: $memberId)\n }\n`;\n\nexport const VOTE_GGNOMAD_TRIP_PLAN_ITEM_MUTATION = gql`\n mutation VoteGGNomadTripPlanItem($groupTripId: ID!, $input: VoteGgnomadTripPlanItemInput!) {\n voteGgnomadTripPlanItem(groupTripId: $groupTripId, input: $input) {\n id\n tripPlanItemId\n choice\n comment\n }\n }\n`;\n"],"mappings":";;AAEA,IAAa,IAAyB,CAAG;;;;;;;;;;;;;;;;;;GA0B5B,IAAgC,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCnC,IAAiC,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDpC,IAA0B,CAAG;;;;;;;;;;;;;;;;;;GAoB7B,IAA2B,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkC9B,IAAyB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCS,CAAG;;;;;;;;;;AAWrD,IAAa,IAAsB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCzB,IAAqB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCxB,IAAuB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkC1B,IAAsB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCzB,IAA2B,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqC9B,IAAyB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsC5B,IAAsB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;GA2BzB,IAAyB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;GA4B5B,IAA0B,CAAG;;;;GAM7B,IAAkC,CAAG;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AqB;;;GAKkB,CAAG;;;QAG1C,EAAqB;;;GAKmB,CAAG;;;QAG3C,EAAqB;;;;AAK7B,IAAa,IAA8B,CAAG;;;;;;;;;;;;;;;;;;GAoBjC,IAAoC,CAAG;;;;;;;GASvC,IAAoC,CAAG;;;;;;;GASvC,IAAwC,CAAG;;;;;;;GAS3C,IAA0B,CAAG;;;;;;;;;;;;;;;;GAoB7B,IAA6B,CAAG;;;;;;;;;GAWhC,IAAsC,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CzC,IAAoC,CAAG;;;;;;;;;;;;;;GAgBvC,KAAmC,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDtC,KAA8C,CAAG;;;;;;;;;;;;;;GAgBjD,KAA8C,CAAG;;;;;;;;;;;;;;;;;GAmBjD,KAA+C,CAAG;;;;;;;;GAUlD,KAAiD,CAAG;;;;;;;;GAYpD,KAA8B,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;GA6BjC,KAAiC,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;GA2BpC,KAA+B,CAAG;;;;;;;;;;;;;GAiBlC,KAA+B,CAAG;;;;;;;;;;;;;;;;;;;GAqBlC,KAAsC,CAAG;;;;;;;;;;;;;;;;GAkBzC,KAAiC,CAAG;;;;;;;;;;;;;;;;GAkBpC,KAAqC,CAAG;;;;;;;;;;GAYxC,KAAyC,CAAG;;;;;;;;;GAW5C,KAA4C,CAAG;;;;GAM/C,KAAuC,CAAG"}
|
|
1
|
+
{"version":3,"file":"graphql.js","names":[],"sources":["../../src/ggnomad/graphql.ts"],"sourcesContent":["import { gql } from '@apollo/client/core';\n\nexport const GGNOMAD_OVERVIEW_QUERY = gql`\n query GGNomadOverview {\n ggnomadOverviewStats {\n users\n listings\n bookings\n monthlyRevenue\n }\n ggnomadAnalytics {\n totalRevenue\n totalBookings\n totalUsers\n conversionRate\n revenueByCategory\n monthlyTrends\n topDestinations\n }\n }\n`;\n\n/**\n * One bookable item of each type (properties are priced per night, the rest\n * carry a flat price). Used to seed the Bookings \"create demo booking\" action\n * with a REAL listing id so the mutation passes the backend's\n * assertTargetInWorkspace check instead of failing on a synthetic id.\n */\nexport const GGNOMAD_BOOKABLE_SAMPLE_QUERY = gql`\n query GGNomadBookableSample {\n ggnomadProperties(pagination: { limit: 1, offset: 0 }) {\n id\n name\n pricePerNight\n currency\n }\n ggnomadTours(pagination: { limit: 1, offset: 0 }) {\n id\n name\n price\n currency\n }\n ggnomadEvents(pagination: { limit: 1, offset: 0 }) {\n id\n name\n price\n currency\n }\n ggnomadActivities(pagination: { limit: 1, offset: 0 }) {\n id\n name\n price\n currency\n }\n }\n`;\n\n/**\n * id + name for every favouritable listing type, used to (a) resolve the real\n * entity name for a saved favorite (which the backend only exposes as\n * targetType + targetId) and (b) seed the \"toggle demo favorite\" action with a\n * real target id.\n */\nexport const GGNOMAD_FAVORITE_TARGETS_QUERY = gql`\n query GGNomadFavoriteTargets {\n ggnomadProperties(pagination: { limit: 100, offset: 0 }) {\n id\n name\n type\n pricePerNight\n currency\n rating\n reviewCount\n images\n }\n ggnomadTours(pagination: { limit: 100, offset: 0 }) {\n id\n name\n type\n price\n currency\n rating\n reviewCount\n images\n }\n ggnomadEvents(pagination: { limit: 100, offset: 0 }) {\n id\n name\n category\n price\n currency\n rating\n reviewCount\n images\n }\n ggnomadActivities(pagination: { limit: 100, offset: 0 }) {\n id\n name\n category\n price\n currency\n rating\n reviewCount\n images\n }\n ggnomadTrips(pagination: { limit: 100, offset: 0 }) {\n id\n name\n transportMode\n price\n currency\n }\n }\n`;\n\nexport const GGNOMAD_PROVIDERS_QUERY = gql`\n query GGNomadProviders($limit: Int, $offset: Int) {\n ggnomadProviders(pagination: { limit: $limit, offset: $offset }) {\n id\n name\n type\n status\n listingCount\n totalRevenue\n rating\n reviewCount\n description\n contactEmail\n contactPhone\n website\n createdAt\n }\n }\n`;\n\nexport const GGNOMAD_PROPERTIES_QUERY = gql`\n query GGNomadProperties(\n $limit: Int\n $offset: Int\n $status: GgnomadListingStatus\n $minSustainabilityScore: Int\n $hasAccessibilityFeatures: [GgnomadAccessibilityFeature!]\n ) {\n ggnomadProperties(\n pagination: { limit: $limit, offset: $offset }\n status: $status\n minSustainabilityScore: $minSustainabilityScore\n hasAccessibilityFeatures: $hasAccessibilityFeatures\n ) {\n id\n name\n type\n status\n description\n pricePerNight\n currency\n rating\n reviewCount\n maxGuests\n amenities\n images\n providerId\n instantBook\n sustainabilityScore\n accessibilityFeatures\n }\n }\n`;\n\nexport const GGNOMAD_PROPERTY_QUERY = gql`\n query GGNomadProperty($id: ID!) {\n ggnomadProperty(id: $id) {\n id\n name\n type\n status\n description\n address\n pricePerNight\n currency\n rating\n reviewCount\n bedrooms\n bathrooms\n maxGuests\n checkInTime\n checkOutTime\n amenities\n images\n instantBook\n sustainabilityScore\n sustainabilityPractices\n accessibilityFeatures\n provider {\n id\n name\n type\n rating\n reviewCount\n listingCount\n contactEmail\n website\n }\n }\n }\n`;\n\n// Query to get property details for booking - ensures id is included\nexport const GGNOMAD_PROPERTY_FOR_BOOKING_QUERY = gql`\n query GGNomadPropertyForBooking($id: ID!) {\n ggnomadProperty(id: $id) {\n id\n name\n pricePerNight\n currency\n }\n }\n`;\n\nexport const GGNOMAD_TOURS_QUERY = gql`\n query GGNomadTours(\n $limit: Int\n $offset: Int\n $status: GgnomadListingStatus\n $minSustainabilityScore: Int\n $hasAccessibilityFeatures: [GgnomadAccessibilityFeature!]\n ) {\n ggnomadTours(\n pagination: { limit: $limit, offset: $offset }\n status: $status\n minSustainabilityScore: $minSustainabilityScore\n hasAccessibilityFeatures: $hasAccessibilityFeatures\n ) {\n id\n name\n description\n type\n status\n duration\n difficulty\n price\n currency\n rating\n reviewCount\n highlights\n images\n maxGroupSize\n instantBook\n sustainabilityScore\n accessibilityFeatures\n }\n }\n`;\n\nexport const GGNOMAD_TOUR_QUERY = gql`\n query GGNomadTour($id: ID!) {\n ggnomadTour(id: $id) {\n id\n name\n description\n type\n status\n duration\n difficulty\n price\n currency\n rating\n reviewCount\n highlights\n images\n languages\n guideName\n location\n maxGroupSize\n instantBook\n sustainabilityScore\n sustainabilityPractices\n accessibilityFeatures\n provider {\n id\n name\n type\n rating\n reviewCount\n listingCount\n contactEmail\n website\n }\n }\n }\n`;\n\nexport const GGNOMAD_EVENTS_QUERY = gql`\n query GGNomadEvents(\n $limit: Int\n $offset: Int\n $status: GgnomadListingStatus\n $minSustainabilityScore: Int\n $hasAccessibilityFeatures: [GgnomadAccessibilityFeature!]\n ) {\n ggnomadEvents(\n pagination: { limit: $limit, offset: $offset }\n status: $status\n minSustainabilityScore: $minSustainabilityScore\n hasAccessibilityFeatures: $hasAccessibilityFeatures\n ) {\n id\n name\n description\n category\n status\n startsAt\n price\n currency\n rating\n reviewCount\n performers\n images\n venue\n instantBook\n sustainabilityScore\n accessibilityFeatures\n }\n }\n`;\n\nexport const GGNOMAD_EVENT_QUERY = gql`\n query GGNomadEvent($id: ID!) {\n ggnomadEvent(id: $id) {\n id\n name\n description\n category\n status\n startsAt\n endsAt\n venue\n price\n currency\n rating\n reviewCount\n performers\n images\n instantBook\n sustainabilityScore\n sustainabilityPractices\n accessibilityFeatures\n provider {\n id\n name\n type\n rating\n reviewCount\n listingCount\n contactEmail\n website\n }\n }\n }\n`;\n\nexport const GGNOMAD_ACTIVITIES_QUERY = gql`\n query GGNomadActivities(\n $limit: Int\n $offset: Int\n $status: GgnomadListingStatus\n $minSustainabilityScore: Int\n $hasAccessibilityFeatures: [GgnomadAccessibilityFeature!]\n ) {\n ggnomadActivities(\n pagination: { limit: $limit, offset: $offset }\n status: $status\n minSustainabilityScore: $minSustainabilityScore\n hasAccessibilityFeatures: $hasAccessibilityFeatures\n ) {\n id\n name\n description\n category\n status\n duration\n difficulty\n price\n currency\n rating\n reviewCount\n maxParticipants\n includes\n requirements\n images\n location\n instantBook\n sustainabilityScore\n accessibilityFeatures\n }\n }\n`;\n\nexport const GGNOMAD_ACTIVITY_QUERY = gql`\n query GGNomadActivity($id: ID!) {\n ggnomadActivity(id: $id) {\n id\n name\n description\n category\n status\n location\n duration\n difficulty\n price\n currency\n rating\n reviewCount\n maxParticipants\n includes\n requirements\n safetyInfo\n images\n instantBook\n sustainabilityScore\n sustainabilityPractices\n accessibilityFeatures\n provider {\n id\n name\n type\n rating\n reviewCount\n listingCount\n contactEmail\n website\n }\n }\n }\n`;\n\nexport const GGNOMAD_TRIPS_QUERY = gql`\n query GGNomadTrips($limit: Int, $offset: Int) {\n ggnomadTrips(pagination: { limit: $limit, offset: $offset }) {\n id\n name\n transportMode\n status\n origin\n destination\n departureAt\n arrivalAt\n isRoundTrip\n carrier\n class\n price\n currency\n passengers\n ecoFriendly\n carrierCode\n co2Emissions\n stops\n returnDepartureAt\n returnArrivalAt\n }\n }\n`;\n\nexport const GGNOMAD_BOOKINGS_QUERY = gql`\n query GGNomadBookings($limit: Int, $offset: Int, $status: GgnomadBookingStatus) {\n ggnomadBookings(pagination: { limit: $limit, offset: $offset }, status: $status) {\n id\n referenceCode\n bookingType\n status\n itemId\n itemName\n guestName\n guestEmail\n guestPhone\n guests\n checkIn\n checkOut\n eventDate\n totalPrice\n currency\n paymentStatus\n paymentMethod\n specialRequests\n carbonEstimateKg\n carbonEstimateMethod\n createdAt\n }\n }\n`;\n\nexport const GGNOMAD_FAVORITES_QUERY = gql`\n query GGNomadFavorites {\n ggnomadFavorites\n }\n`;\n\nexport const CREATE_GGNOMAD_BOOKING_MUTATION = gql`\n mutation CreateGGNomadBooking($input: CreateGgnomadBookingInput!) {\n createGgnomadBooking(input: $input) {\n id\n referenceCode\n bookingType\n status\n itemId\n itemName\n guestName\n totalPrice\n currency\n createdAt\n }\n }\n`;\n\nexport const TOGGLE_GGNOMAD_FAVORITE_MUTATION = gql`\n mutation ToggleGGNomadFavorite($input: ToggleGgnomadFavoriteInput!) {\n toggleGgnomadFavorite(input: $input)\n }\n`;\n\nexport const CANCEL_GGNOMAD_BOOKING_MUTATION = gql`\n mutation CancelGGNomadBooking($id: ID!, $reason: String) {\n cancelGgnomadBooking(id: $id, reason: $reason) {\n id\n status\n }\n }\n`;\n\n// Mobile tickets / QR-code redemption (BOFF-4362)\nexport const GGNOMAD_TICKETS_QUERY = gql`\n query GGNomadTickets($bookingId: String) {\n ggnomadTickets(bookingId: $bookingId) {\n id\n bookingId\n ticketCode\n qrCodeDataUrl\n status\n issuedAt\n redeemedAt\n redeemedBy\n revokedAt\n revokedReason\n }\n }\n`;\n\nexport const ISSUE_GGNOMAD_TICKET_MUTATION = gql`\n mutation IssueGGNomadTicket($bookingId: ID!) {\n issueGgnomadTicket(bookingId: $bookingId) {\n id\n bookingId\n ticketCode\n qrCodeDataUrl\n status\n issuedAt\n }\n }\n`;\n\nexport const REDEEM_GGNOMAD_TICKET_MUTATION = gql`\n mutation RedeemGGNomadTicket($token: String!) {\n redeemGgnomadTicket(token: $token) {\n id\n bookingId\n ticketCode\n status\n redeemedAt\n redeemedBy\n }\n }\n`;\n\nexport const REVOKE_GGNOMAD_TICKET_MUTATION = gql`\n mutation RevokeGGNomadTicket($id: ID!, $reason: String) {\n revokeGgnomadTicket(id: $id, reason: $reason) {\n id\n status\n revokedAt\n revokedReason\n }\n }\n`;\n\n// Trip Plan Queries\nexport const GGNOMAD_TRIP_PLANS_QUERY = gql`\n query GGNomadTripPlans($limit: Int, $offset: Int) {\n ggnomadTripPlans(pagination: { limit: $limit, offset: $offset }) {\n id\n name\n description\n startDate\n endDate\n travelers\n status\n total\n itemCount\n createdAt\n }\n }\n`;\n\nexport const GGNOMAD_TRIP_PLAN_QUERY = gql`\n query GGNomadTripPlan($id: ID!) {\n ggnomadTripPlan(id: $id) {\n id\n name\n description\n startDate\n endDate\n travelers\n status\n total\n itemCount\n items {\n id\n itemType\n itemId\n itemName\n day\n scheduledAt\n price\n currency\n notes\n }\n createdAt\n updatedAt\n }\n }\n`;\n\n// Trip Plan Mutations\nexport const CREATE_GGNOMAD_TRIP_PLAN_MUTATION = gql`\n mutation CreateGGNomadTripPlan($input: CreateGgnomadTripPlanInput!) {\n createGgnomadTripPlan(input: $input) {\n id\n name\n description\n startDate\n endDate\n travelers\n status\n total\n itemCount\n createdAt\n }\n }\n`;\n\nexport const UPDATE_GGNOMAD_TRIP_PLAN_MUTATION = gql`\n mutation UpdateGGNomadTripPlan($id: ID!, $input: UpdateGgnomadTripPlanInput!) {\n updateGgnomadTripPlan(id: $id, input: $input) {\n id\n name\n description\n startDate\n endDate\n travelers\n status\n total\n itemCount\n updatedAt\n }\n }\n`;\n\nexport const DELETE_GGNOMAD_TRIP_PLAN_MUTATION = gql`\n mutation DeleteGGNomadTripPlan($id: ID!) {\n deleteGgnomadTripPlan(id: $id)\n }\n`;\n\nexport const ADD_GGNOMAD_TRIP_PLAN_ITEM_MUTATION = gql`\n mutation AddGGNomadTripPlanItem($tripPlanId: ID!, $input: AddGgnomadTripPlanItemInput!) {\n addGgnomadTripPlanItem(tripPlanId: $tripPlanId, input: $input) {\n id\n itemType\n itemId\n itemName\n day\n scheduledAt\n price\n currency\n notes\n }\n }\n`;\n\nexport const REMOVE_GGNOMAD_TRIP_PLAN_ITEM_MUTATION = gql`\n mutation RemoveGGNomadTripPlanItem($id: ID!) {\n removeGgnomadTripPlanItem(id: $id)\n }\n`;\n\nexport const CREATE_GGNOMAD_PROVIDER_MUTATION = gql`\n mutation CreateGGNomadProvider($input: CreateGgnomadProviderInput!) {\n createGgnomadProvider(input: $input) {\n id\n name\n type\n status\n listingCount\n totalRevenue\n rating\n reviewCount\n description\n contactEmail\n contactPhone\n website\n createdAt\n }\n }\n`;\n\n// Review Queries\nexport const GGNOMAD_REVIEW_SUMMARY_QUERY = gql`\n query GGNomadReviewSummary($targetType: GgnomadBookingType!, $targetId: String!) {\n ggnomadReviewSummary(targetType: $targetType, targetId: $targetId) {\n average\n count\n distribution\n }\n }\n`;\n\nexport const GGNOMAD_REVIEWS_QUERY = gql`\n query GGNomadReviews(\n $targetType: GgnomadBookingType!\n $targetId: String!\n $limit: Int\n $offset: Int\n ) {\n ggnomadReviews(\n targetType: $targetType\n targetId: $targetId\n pagination: { limit: $limit, offset: $offset }\n ) {\n id\n rating\n title\n content\n images\n isVerified\n helpfulCount\n response\n respondedAt\n createdAt\n }\n }\n`;\n\n// Review Mutations\nexport const CREATE_GGNOMAD_REVIEW_MUTATION = gql`\n mutation CreateGGNomadReview($input: CreateGgnomadReviewInput!) {\n createGgnomadReview(input: $input) {\n id\n rating\n title\n content\n }\n }\n`;\n\nexport const RESPOND_GGNOMAD_REVIEW_MUTATION = gql`\n mutation RespondGGNomadReview($id: ID!, $response: String!) {\n respondGgnomadReview(id: $id, response: $response) {\n id\n response\n respondedAt\n }\n }\n`;\n\n// Listing Edit Mutations\nexport const UPDATE_GGNOMAD_PROPERTY_MUTATION = gql`\n mutation UpdateGGNomadProperty($id: ID!, $input: UpdateGgnomadPropertyInput!) {\n updateGgnomadProperty(id: $id, input: $input) {\n id\n name\n description\n pricePerNight\n status\n images\n }\n }\n`;\n\nexport const UPDATE_GGNOMAD_TOUR_MUTATION = gql`\n mutation UpdateGGNomadTour($id: ID!, $input: UpdateGgnomadTourInput!) {\n updateGgnomadTour(id: $id, input: $input) {\n id\n name\n description\n price\n status\n images\n }\n }\n`;\n\nexport const UPDATE_GGNOMAD_EVENT_MUTATION = gql`\n mutation UpdateGGNomadEvent($id: ID!, $input: UpdateGgnomadEventInput!) {\n updateGgnomadEvent(id: $id, input: $input) {\n id\n name\n description\n price\n status\n images\n }\n }\n`;\n\nexport const UPDATE_GGNOMAD_ACTIVITY_MUTATION = gql`\n mutation UpdateGGNomadActivity($id: ID!, $input: UpdateGgnomadActivityInput!) {\n updateGgnomadActivity(id: $id, input: $input) {\n id\n name\n description\n price\n status\n images\n }\n }\n`;\n\n// Corporate travel management — policy, budgets, approvals (BOFF-4365)\nexport const GGNOMAD_TRAVEL_POLICIES_QUERY = gql`\n query GGNomadTravelPolicies($limit: Int, $offset: Int) {\n ggnomadTravelPolicies(pagination: { limit: $limit, offset: $offset }) {\n id\n name\n isActive\n costCenter\n currency\n maxBookingAmount\n maxMonthlyPerTraveler\n blockedDestinations\n allowedTravelClasses\n requireApprovalAlways\n createdAt\n }\n }\n`;\n\nexport const CREATE_GGNOMAD_TRAVEL_POLICY_MUTATION = gql`\n mutation CreateGGNomadTravelPolicy($input: CreateGgnomadTravelPolicyInput!) {\n createGgnomadTravelPolicy(input: $input) {\n id\n name\n isActive\n costCenter\n currency\n maxBookingAmount\n maxMonthlyPerTraveler\n blockedDestinations\n allowedTravelClasses\n requireApprovalAlways\n }\n }\n`;\n\nexport const UPDATE_GGNOMAD_TRAVEL_POLICY_MUTATION = gql`\n mutation UpdateGGNomadTravelPolicy($id: ID!, $input: UpdateGgnomadTravelPolicyInput!) {\n updateGgnomadTravelPolicy(id: $id, input: $input) {\n id\n isActive\n }\n }\n`;\n\nexport const DELETE_GGNOMAD_TRAVEL_POLICY_MUTATION = gql`\n mutation DeleteGGNomadTravelPolicy($id: ID!) {\n deleteGgnomadTravelPolicy(id: $id)\n }\n`;\n\nexport const GGNOMAD_BOOKING_APPROVALS_QUERY = gql`\n query GGNomadBookingApprovals($status: GgnomadApprovalStatus, $limit: Int, $offset: Int) {\n ggnomadBookingApprovals(status: $status, pagination: { limit: $limit, offset: $offset }) {\n id\n bookingId\n requestedBy\n costCenter\n reasons\n status\n reviewedBy\n reviewedAt\n reviewNote\n createdAt\n booking {\n id\n referenceCode\n itemName\n totalPrice\n currency\n status\n paymentStatus\n }\n }\n }\n`;\n\nexport const APPROVE_GGNOMAD_BOOKING_APPROVAL_MUTATION = gql`\n mutation ApproveGGNomadBookingApproval($id: ID!, $note: String) {\n approveGgnomadBookingApproval(id: $id, note: $note) {\n id\n status\n reviewedBy\n reviewedAt\n }\n }\n`;\n\nexport const REJECT_GGNOMAD_BOOKING_APPROVAL_MUTATION = gql`\n mutation RejectGGNomadBookingApproval($id: ID!, $reason: String!) {\n rejectGgnomadBookingApproval(id: $id, reason: $reason) {\n id\n status\n reviewedBy\n reviewedAt\n reviewNote\n }\n }\n`;\n\nexport const GGNOMAD_SPEND_SUMMARY_QUERY = gql`\n query GGNomadSpendSummary($costCenter: String) {\n ggnomadSpendSummary(costCenter: $costCenter) {\n totalSpend\n bookingCount\n pendingApprovalCount\n pendingApprovalAmount\n byCostCenter\n }\n }\n`;\n\n// ─── BOFF-4388 — listing verification + booking lifecycle operations queue ─\n\nconst LISTING_QUEUE_FIELDS = `\n __typename\n ... on GgnomadProperty {\n id\n name\n status\n pricePerNight\n currency\n providerId\n updatedAt\n }\n ... on GgnomadTour {\n id\n name\n status\n price\n currency\n providerId\n updatedAt\n }\n ... on GgnomadEvent {\n id\n name\n status\n price\n currency\n providerId\n updatedAt\n }\n ... on GgnomadActivity {\n id\n name\n status\n price\n currency\n providerId\n updatedAt\n }\n`;\n\nexport const GGNOMAD_LISTING_REVIEW_QUEUE_QUERY = gql`\n query GGNomadListingReviewQueue($limit: Int, $offset: Int) {\n ggnomadListingReviewQueue(pagination: { limit: $limit, offset: $offset }) {\n ${LISTING_QUEUE_FIELDS}\n }\n }\n`;\n\nexport const SUBMIT_GGNOMAD_LISTING_FOR_REVIEW_MUTATION = gql`\n mutation SubmitGGNomadListingForReview($listingType: GgnomadListingType!, $id: ID!) {\n submitGgnomadListingForReview(listingType: $listingType, id: $id) {\n ${LISTING_QUEUE_FIELDS}\n }\n }\n`;\n\nexport const APPROVE_GGNOMAD_LISTING_MUTATION = gql`\n mutation ApproveGGNomadListing($listingType: GgnomadListingType!, $id: ID!, $note: String) {\n approveGgnomadListing(listingType: $listingType, id: $id, note: $note) {\n ${LISTING_QUEUE_FIELDS}\n }\n }\n`;\n\nexport const REJECT_GGNOMAD_LISTING_MUTATION = gql`\n mutation RejectGGNomadListing($listingType: GgnomadListingType!, $id: ID!, $reason: String!) {\n rejectGgnomadListing(listingType: $listingType, id: $id, reason: $reason) {\n ${LISTING_QUEUE_FIELDS}\n }\n }\n`;\n\nexport const PAUSE_GGNOMAD_LISTING_MUTATION = gql`\n mutation PauseGGNomadListing($listingType: GgnomadListingType!, $id: ID!, $reason: String) {\n pauseGgnomadListing(listingType: $listingType, id: $id, reason: $reason) {\n ${LISTING_QUEUE_FIELDS}\n }\n }\n`;\n\nexport const RESUME_GGNOMAD_LISTING_MUTATION = gql`\n mutation ResumeGGNomadListing($listingType: GgnomadListingType!, $id: ID!) {\n resumeGgnomadListing(listingType: $listingType, id: $id) {\n ${LISTING_QUEUE_FIELDS}\n }\n }\n`;\n\nexport const ARCHIVE_GGNOMAD_LISTING_MUTATION = gql`\n mutation ArchiveGGNomadListing($listingType: GgnomadListingType!, $id: ID!, $reason: String) {\n archiveGgnomadListing(listingType: $listingType, id: $id, reason: $reason) {\n ${LISTING_QUEUE_FIELDS}\n }\n }\n`;\n\nexport const GGNOMAD_BOOKING_QUEUE_QUERY = gql`\n query GGNomadBookingQueue($limit: Int, $offset: Int) {\n ggnomadBookingQueue(pagination: { limit: $limit, offset: $offset }) {\n id\n referenceCode\n bookingType\n status\n itemName\n guestName\n guests\n checkIn\n checkOut\n eventDate\n totalPrice\n currency\n createdAt\n }\n }\n`;\n\nexport const CHECK_IN_GGNOMAD_BOOKING_MUTATION = gql`\n mutation CheckInGGNomadBooking($id: ID!) {\n checkInGgnomadBooking(id: $id) {\n id\n status\n }\n }\n`;\n\nexport const COMPLETE_GGNOMAD_BOOKING_MUTATION = gql`\n mutation CompleteGGNomadBooking($id: ID!) {\n completeGgnomadBooking(id: $id) {\n id\n status\n }\n }\n`;\n\nexport const MARK_GGNOMAD_BOOKING_NO_SHOW_MUTATION = gql`\n mutation MarkGGNomadBookingNoShow($id: ID!, $reason: String) {\n markGgnomadBookingNoShow(id: $id, reason: $reason) {\n id\n status\n }\n }\n`;\n\nexport const GGNOMAD_AUDIT_LOG_QUERY = gql`\n query GGNomadAuditLog($entityType: String!, $entityId: String!, $limit: Int, $offset: Int) {\n ggnomadAuditLog(\n entityType: $entityType\n entityId: $entityId\n pagination: { limit: $limit, offset: $offset }\n ) {\n id\n action\n fromStatus\n toStatus\n reason\n actorId\n createdAt\n }\n }\n`;\n\n// ─── BOFF-4390 — provider analytics dashboards ─────────────────────────────\n\nexport const GGNOMAD_MY_PROVIDERS_QUERY = gql`\n query GGNomadMyProviders {\n myGgnomadProviders {\n id\n name\n type\n status\n }\n }\n`;\n\nexport const GGNOMAD_MY_PROVIDER_ANALYTICS_QUERY = gql`\n query GGNomadMyProviderAnalytics(\n $providerId: ID!\n $dateFrom: DateTime\n $dateTo: DateTime\n $granularity: String\n ) {\n myGgnomadProviderAnalytics(\n providerId: $providerId\n dateFrom: $dateFrom\n dateTo: $dateTo\n granularity: $granularity\n ) {\n providerId\n providerName\n dateFrom\n dateTo\n granularity\n totalBookings\n totalRevenue\n cancelledBookings\n cancellationRate\n capacityUtilizationRate\n bookingsOverTime {\n period\n bookings\n revenue\n }\n topListings {\n listingId\n listingType\n listingName\n bookings\n revenue\n cancellationRate\n capacityUtilizationRate\n }\n }\n }\n`;\n\n// ─── BOFF-4363 — white-label operator storefront ───────────────────────────\n\nexport const GGNOMAD_OPERATOR_STOREFRONT_QUERY = gql`\n query GGNomadOperatorStorefront($providerId: ID!) {\n ggnomadOperatorStorefront(providerId: $providerId) {\n id\n providerId\n slug\n displayName\n logoUrl\n primaryColor\n aboutText\n isPublished\n publishedAt\n }\n }\n`;\n\nexport const GGNOMAD_STOREFRONT_BY_SLUG_QUERY = gql`\n query GGNomadStorefrontBySlug($workspaceId: ID!, $slug: String!) {\n ggnomadStorefrontBySlug(workspaceId: $workspaceId, slug: $slug) {\n storefront {\n id\n displayName\n logoUrl\n primaryColor\n aboutText\n publishedAt\n }\n properties {\n id\n name\n pricePerNight\n currency\n images\n rating\n sustainabilityScore\n }\n tours {\n id\n name\n price\n currency\n images\n rating\n sustainabilityScore\n }\n events {\n id\n name\n price\n currency\n images\n startsAt\n sustainabilityScore\n }\n activities {\n id\n name\n price\n currency\n images\n rating\n sustainabilityScore\n }\n }\n }\n`;\n\nexport const CREATE_GGNOMAD_OPERATOR_STOREFRONT_MUTATION = gql`\n mutation CreateGGNomadOperatorStorefront($input: CreateGgnomadOperatorStorefrontInput!) {\n createGgnomadOperatorStorefront(input: $input) {\n id\n providerId\n slug\n displayName\n logoUrl\n primaryColor\n aboutText\n isPublished\n publishedAt\n }\n }\n`;\n\nexport const UPDATE_GGNOMAD_OPERATOR_STOREFRONT_MUTATION = gql`\n mutation UpdateGGNomadOperatorStorefront(\n $id: ID!\n $input: UpdateGgnomadOperatorStorefrontInput!\n ) {\n updateGgnomadOperatorStorefront(id: $id, input: $input) {\n id\n providerId\n slug\n displayName\n logoUrl\n primaryColor\n aboutText\n isPublished\n publishedAt\n }\n }\n`;\n\nexport const PUBLISH_GGNOMAD_OPERATOR_STOREFRONT_MUTATION = gql`\n mutation PublishGGNomadOperatorStorefront($id: ID!) {\n publishGgnomadOperatorStorefront(id: $id) {\n id\n isPublished\n publishedAt\n }\n }\n`;\n\nexport const UNPUBLISH_GGNOMAD_OPERATOR_STOREFRONT_MUTATION = gql`\n mutation UnpublishGGNomadOperatorStorefront($id: ID!) {\n unpublishGgnomadOperatorStorefront(id: $id) {\n id\n isPublished\n publishedAt\n }\n }\n`;\n\n// ─── BOFF-4361 — real-time availability slots for one listing ──────────────\n\nexport const GGNOMAD_BOOKING_SLOTS_QUERY = gql`\n query GGNomadBookingSlots(\n $listingId: ID!\n $listingType: GgnomadListingType!\n $dateFrom: DateTime\n $onlyAvailable: Boolean\n $limit: Int\n $offset: Int\n ) {\n ggnomadBookingSlots(\n listingId: $listingId\n listingType: $listingType\n dateFrom: $dateFrom\n onlyAvailable: $onlyAvailable\n pagination: { limit: $limit, offset: $offset }\n ) {\n id\n startAt\n endAt\n capacity\n bookedCount\n remainingCapacity\n isActive\n }\n }\n`;\n\n// ─── BOFF-4406 — transport inventory search + booking a searched leg ───────\n\nexport const GGNOMAD_TRANSPORT_SEARCH_QUERY = gql`\n query GGNomadTransportSearch($input: SearchGgnomadTransportInput!) {\n searchGgnomadTransport(input: $input) {\n offerId\n origin\n destination\n transportMode\n departureAt\n arrivalAt\n returnDepartureAt\n returnArrivalAt\n isRoundTrip\n carrier\n carrierCode\n class\n price\n currency\n passengers\n stops\n durationMinutes\n ecoFriendly\n co2Emissions\n providerName\n }\n }\n`;\n\nexport const CREATE_GGNOMAD_TRIP_MUTATION = gql`\n mutation CreateGGNomadTrip($input: CreateGgnomadTripInput!) {\n createGgnomadTrip(input: $input) {\n id\n name\n status\n transportMode\n departureAt\n arrivalAt\n price\n currency\n }\n }\n`;\n\n// ─── BOFF-4374 — group trips: members, item votes, cost split ──────────────\n\nexport const GGNOMAD_MY_GROUP_TRIPS_QUERY = gql`\n query GGNomadMyGroupTrips {\n myGgnomadGroupTrips {\n id\n name\n tripPlanId\n splitMethod\n currency\n createdBy\n createdAt\n members {\n id\n actorId\n displayName\n email\n createdAt\n }\n }\n }\n`;\n\nexport const GGNOMAD_GROUP_TRIP_COST_SPLIT_QUERY = gql`\n query GGNomadGroupTripCostSplit($groupTripId: ID!) {\n ggnomadGroupTripCostSplit(groupTripId: $groupTripId) {\n currency\n totalCost\n splitMethod\n shares {\n memberId\n actorId\n displayName\n amountOwed\n assignedTotal\n sharedTotal\n }\n }\n }\n`;\n\nexport const GGNOMAD_GROUP_TRIP_VOTES_QUERY = gql`\n query GGNomadGroupTripVotes($groupTripId: ID!) {\n ggnomadGroupTripVotes(groupTripId: $groupTripId) {\n tripPlanItemId\n yes\n no\n abstain\n votes {\n id\n actorId\n choice\n comment\n createdAt\n }\n }\n }\n`;\n\nexport const CREATE_GGNOMAD_GROUP_TRIP_MUTATION = gql`\n mutation CreateGGNomadGroupTrip($input: CreateGgnomadGroupTripInput!) {\n createGgnomadGroupTrip(input: $input) {\n id\n name\n tripPlanId\n splitMethod\n currency\n }\n }\n`;\n\nexport const ADD_GGNOMAD_GROUP_TRIP_MEMBER_MUTATION = gql`\n mutation AddGGNomadGroupTripMember($groupTripId: ID!, $input: AddGgnomadGroupTripMemberInput!) {\n addGgnomadGroupTripMember(groupTripId: $groupTripId, input: $input) {\n id\n actorId\n displayName\n email\n }\n }\n`;\n\nexport const REMOVE_GGNOMAD_GROUP_TRIP_MEMBER_MUTATION = gql`\n mutation RemoveGGNomadGroupTripMember($groupTripId: ID!, $memberId: ID!) {\n removeGgnomadGroupTripMember(groupTripId: $groupTripId, memberId: $memberId)\n }\n`;\n\nexport const VOTE_GGNOMAD_TRIP_PLAN_ITEM_MUTATION = gql`\n mutation VoteGGNomadTripPlanItem($groupTripId: ID!, $input: VoteGgnomadTripPlanItemInput!) {\n voteGgnomadTripPlanItem(groupTripId: $groupTripId, input: $input) {\n id\n tripPlanItemId\n choice\n comment\n }\n }\n`;\n"],"mappings":";;AAEA,IAAa,IAAyB,CAAG;;;;;;;;;;;;;;;;;;GA0B5B,IAAgC,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCnC,IAAiC,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDpC,IAA0B,CAAG;;;;;;;;;;;;;;;;;;GAoB7B,IAA2B,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkC9B,IAAyB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCS,CAAG;;;;;;;;;;AAWrD,IAAa,IAAsB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCzB,IAAqB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCxB,IAAuB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkC1B,IAAsB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCzB,IAA2B,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqC9B,IAAyB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsC5B,IAAsB,C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Price: Story;
|
|
26
|
+
/**
|
|
27
|
+
* BOFF-10194 — status is read-only in the edit dialog. An ACTIVE listing
|
|
28
|
+
* offers "Pause listing", which runs pauseGgnomadListing (an audited
|
|
29
|
+
* transition) instead of writing status through the generic update.
|
|
30
|
+
*/
|
|
31
|
+
export declare const PausesActiveListing: Story;
|
|
26
32
|
//# sourceMappingURL=ListingEditDialog.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListingEditDialog.stories.d.ts","sourceRoot":"","sources":["../../src/stories/ListingEditDialog.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAKvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"ListingEditDialog.stories.d.ts","sourceRoot":"","sources":["../../src/stories/ListingEditDialog.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAKvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAgB5E,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,iBAAiB,CAYxC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,YAAY,EAAE,KAY1B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAYtB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAM1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAUlC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,KA6BnC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,KA4B5B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAmCjC,CAAC"}
|