@burdenoff/microfe-tours 2026.720.1 → 2026.731.1
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/tours/components/MarkdownEditor.js +144 -0
- package/dist/tours/components/MarkdownEditor.js.map +1 -0
- package/dist/tours/pages/MyToursPage.js +66 -63
- package/dist/tours/pages/MyToursPage.js.map +1 -1
- package/dist/tours/pages/StepEditorPage.js +219 -222
- package/dist/tours/pages/StepEditorPage.js.map +1 -1
- package/dist/tours/pages/TourBuilderPage.js +76 -79
- package/dist/tours/pages/TourBuilderPage.js.map +1 -1
- package/dist/tours/pages/TourPreviewPage.js +112 -111
- package/dist/tours/pages/TourPreviewPage.js.map +1 -1
- package/dist/tours/pages/ToursListPage.js +85 -84
- package/dist/tours/pages/ToursListPage.js.map +1 -1
- package/package.json +7 -7
|
@@ -5,18 +5,19 @@ import { useToursPermissionAccess as r } from "../hooks/useToursPermissionAccess
|
|
|
5
5
|
import { TOUR_PERMISSIONS as i } from "../../constants/permissions.js";
|
|
6
6
|
import { useToursI18n as ee } from "../i18n.js";
|
|
7
7
|
import { emitToursApiFailed as te } from "../telemetry.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
8
|
+
import { MarkdownEditor as ne } from "../components/MarkdownEditor.js";
|
|
9
|
+
import { useTourBuilder as re } from "../hooks/useTourBuilder.js";
|
|
10
|
+
import { useEffect as a, useMemo as o, useRef as ie, useState as s } from "react";
|
|
11
|
+
import { PermissionGate as ae } from "@burdenoff/fe-libs/shared/components";
|
|
12
|
+
import { ArrowLeft as oe, BarChart3 as c, Calendar as l, Eye as u, LayoutTemplate as se, ListOrdered as d, Save as ce, Sparkles as f } from "lucide-react";
|
|
13
|
+
import { Fragment as le, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
14
|
+
import { useNavigate as ue, useParams as de } from "react-router-dom";
|
|
15
|
+
import { Button as fe, CTAOverflowMenu as pe, EmphasisPanel as me, GlassCard as he, NextSteps as ge, PagePurpose as _e } from "@burdenoff/fe-libs/ui";
|
|
16
|
+
import { useGatewayClient as ve } from "@burdenoff/fe-libs/shared/graphql";
|
|
17
|
+
import { useEventBus as ye } from "@burdenoff/fe-libs/shared/events";
|
|
17
18
|
import { gql as h } from "@apollo/client/core";
|
|
18
19
|
//#region src/tours/pages/TourBuilderPage.tsx
|
|
19
|
-
var
|
|
20
|
+
var be = 250, xe = h`
|
|
20
21
|
mutation SeedVibeControlsUserTours {
|
|
21
22
|
seedVibeControlsUserTours {
|
|
22
23
|
productId
|
|
@@ -33,7 +34,7 @@ var ye = 250, be = h`
|
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
|
-
`,
|
|
37
|
+
`, Se = h`
|
|
37
38
|
mutation SeedBuildmyiqUserTours {
|
|
38
39
|
seedBuildmyiqUserTours {
|
|
39
40
|
productId
|
|
@@ -51,7 +52,7 @@ var ye = 250, be = h`
|
|
|
51
52
|
}
|
|
52
53
|
}
|
|
53
54
|
`;
|
|
54
|
-
function
|
|
55
|
+
function Ce(e) {
|
|
55
56
|
if (!e || typeof e != "object") return null;
|
|
56
57
|
let t = e, n = t.error;
|
|
57
58
|
if (n instanceof Error) return n.message;
|
|
@@ -665,7 +666,7 @@ function v(e) {
|
|
|
665
666
|
let t = _(e);
|
|
666
667
|
return t ? g.filter((e) => e.productId === t) : [];
|
|
667
668
|
}
|
|
668
|
-
function
|
|
669
|
+
function we(e) {
|
|
669
670
|
let t = /* @__PURE__ */ new Map();
|
|
670
671
|
for (let n of v(e)) (!t.get(n.moduleId) || n.isModuleHome) && t.set(n.moduleId, {
|
|
671
672
|
moduleId: n.moduleId,
|
|
@@ -674,7 +675,7 @@ function Ce(e) {
|
|
|
674
675
|
});
|
|
675
676
|
return [...t.values()];
|
|
676
677
|
}
|
|
677
|
-
function
|
|
678
|
+
function Te(e, t) {
|
|
678
679
|
let n = _(t);
|
|
679
680
|
return n ? v(e).flatMap((e) => e.moduleId === n ? [{
|
|
680
681
|
pageId: e.pageId,
|
|
@@ -683,9 +684,9 @@ function we(e, t) {
|
|
|
683
684
|
}] : []) : [];
|
|
684
685
|
}
|
|
685
686
|
function y() {
|
|
686
|
-
let { tr: h } = ee(), { tourId: g } =
|
|
687
|
+
let { tr: h } = ee(), { tourId: g } = de(), _ = ue(), v = e(), { basePath: y = "/" } = v, b = ye(), x = ve("global"), { hasPermission: S, isLoading: C } = r(), w = !g || g === "new", T = S(i.TOUR_CREATE), E = S(i.TOUR_UPDATE), Ee = S(i.TOUR_TEMPLATE_CREATE), D = w ? T : E, O = T && E, k = T && E, { tour: A, loadTour: j, createTour: De, updateTour: Oe, saving: M, validationErrors: N, error: ke } = re(g), { saveAsTemplate: Ae } = n(), { data: je, loading: P } = t({
|
|
687
688
|
variables: {
|
|
688
|
-
limit:
|
|
689
|
+
limit: be,
|
|
689
690
|
offset: 0
|
|
690
691
|
},
|
|
691
692
|
fetchPolicy: "cache-and-network",
|
|
@@ -703,7 +704,7 @@ function y() {
|
|
|
703
704
|
displayOrder: 1,
|
|
704
705
|
startDate: "",
|
|
705
706
|
endDate: ""
|
|
706
|
-
}), [L, R] = s(!1), [z, B] = s(!1), [V, H] = s(!1), [
|
|
707
|
+
}), [L, R] = s(!1), [z, B] = s(!1), [V, H] = s(!1), [Me, Ne] = s(!1), [U, Pe] = s(null), [Fe, Ie] = s(null), [Le, Re] = s(!1), [W, ze] = s(null), [Be, Ve] = s(null), G = ie(!1), K = o(() => [...je?.platformProducts.items ?? []].sort((e, t) => e.name.localeCompare(t.name)), [je]), q = o(() => new Set(K.map((e) => e.slug)), [K]), J = o(() => we(F.productId), [F.productId]), Y = o(() => new Set(J.map((e) => e.moduleId)), [J]), X = o(() => Te(F.productId, F.moduleId), [F.moduleId, F.productId]), Z = o(() => new Set(X.map((e) => e.pageId)), [X]);
|
|
707
708
|
a(() => {
|
|
708
709
|
G.current || !C && D && g && g !== "new" && j(g);
|
|
709
710
|
}, [
|
|
@@ -747,26 +748,26 @@ function y() {
|
|
|
747
748
|
Z,
|
|
748
749
|
X.length
|
|
749
750
|
]);
|
|
750
|
-
let
|
|
751
|
+
let He = !!(F.productId && !L && !q.has(F.productId)), Ue = !!(F.moduleId && !z && !Y.has(F.moduleId)), We = !!(F.pageId && !V && !Z.has(F.pageId)), Ge = async (e) => {
|
|
751
752
|
e.preventDefault();
|
|
752
753
|
try {
|
|
753
|
-
g && g !== "new" ? await
|
|
754
|
+
g && g !== "new" ? await Oe(g, F) : await De(F);
|
|
754
755
|
} catch {
|
|
755
756
|
te(b, "tour.save", v);
|
|
756
757
|
}
|
|
757
|
-
},
|
|
758
|
+
}, Q = () => {
|
|
758
759
|
_(`${y}/list`);
|
|
759
|
-
},
|
|
760
|
+
}, Ke = (e) => {
|
|
760
761
|
if (!e) return "";
|
|
761
762
|
let t = new Date(e);
|
|
762
763
|
return Number.isNaN(t.getTime()) ? "" : (/* @__PURE__ */ new Date(t.getTime() - t.getTimezoneOffset() * 6e4)).toISOString().slice(0, 16);
|
|
763
|
-
},
|
|
764
|
+
}, qe = async () => {
|
|
764
765
|
if (!g || g === "new") return;
|
|
765
766
|
let e = `${F.name || A?.name || "Tour"} Template`, t = window.prompt("Template name", e);
|
|
766
767
|
if (!t) return;
|
|
767
768
|
let n = window.prompt("Template category (ONBOARDING, FEATURE_ANNOUNCEMENT, HELP, CUSTOM)", "ONBOARDING") || "ONBOARDING";
|
|
768
769
|
try {
|
|
769
|
-
await
|
|
770
|
+
await Ae(g, {
|
|
770
771
|
name: t,
|
|
771
772
|
description: F.description,
|
|
772
773
|
category: n,
|
|
@@ -775,18 +776,18 @@ function y() {
|
|
|
775
776
|
} catch {
|
|
776
777
|
te(b, "template.save", v);
|
|
777
778
|
}
|
|
778
|
-
},
|
|
779
|
+
}, Je = async () => {
|
|
779
780
|
if (window.confirm(h("tourBuilder.seedVibeControls.confirm"))) {
|
|
780
|
-
|
|
781
|
+
Ne(!0), Pe(null), Ie(null);
|
|
781
782
|
try {
|
|
782
|
-
let e = await x.mutate({ mutation:
|
|
783
|
+
let e = await x.mutate({ mutation: xe }), t = Ce(e);
|
|
783
784
|
if (t) throw Error(t);
|
|
784
785
|
let n = e.data?.seedVibeControlsUserTours;
|
|
785
786
|
if (!n) throw Error("Seed mutation returned no result.");
|
|
786
|
-
|
|
787
|
+
Pe(n);
|
|
787
788
|
} catch (e) {
|
|
788
789
|
let t = e instanceof Error ? e.message : h("tourBuilder.seedVibeControls.error");
|
|
789
|
-
|
|
790
|
+
Ie(t), b.emit("tours.api.failed", {
|
|
790
791
|
route: "/tours",
|
|
791
792
|
operation: "tour.seed_vibecontrols_user_tours",
|
|
792
793
|
errorMessage: t,
|
|
@@ -794,21 +795,21 @@ function y() {
|
|
|
794
795
|
workspaceId: v.workspaceId
|
|
795
796
|
}, { component: "microfe-tours" });
|
|
796
797
|
} finally {
|
|
797
|
-
|
|
798
|
+
Ne(!1);
|
|
798
799
|
}
|
|
799
800
|
}
|
|
800
|
-
},
|
|
801
|
+
}, Ye = async () => {
|
|
801
802
|
if (window.confirm(h("tourBuilder.seedBuildmyiq.confirm"))) {
|
|
802
|
-
|
|
803
|
+
Re(!0), ze(null), Ve(null);
|
|
803
804
|
try {
|
|
804
|
-
let e = await x.mutate({ mutation:
|
|
805
|
+
let e = await x.mutate({ mutation: Se }), t = Ce(e);
|
|
805
806
|
if (t) throw Error(t);
|
|
806
807
|
let n = e.data?.seedBuildmyiqUserTours;
|
|
807
808
|
if (!n) throw Error("Seed mutation returned no result.");
|
|
808
|
-
|
|
809
|
+
ze(n);
|
|
809
810
|
} catch (e) {
|
|
810
811
|
let t = e instanceof Error ? e.message : h("tourBuilder.seedBuildmyiq.error");
|
|
811
|
-
|
|
812
|
+
Ve(t), b.emit("tours.api.failed", {
|
|
812
813
|
route: "/tours",
|
|
813
814
|
operation: "tour.seed_buildmyiq_user_tours",
|
|
814
815
|
errorMessage: t,
|
|
@@ -816,10 +817,10 @@ function y() {
|
|
|
816
817
|
workspaceId: v.workspaceId
|
|
817
818
|
}, { component: "microfe-tours" });
|
|
818
819
|
} finally {
|
|
819
|
-
|
|
820
|
+
Re(!1);
|
|
820
821
|
}
|
|
821
822
|
}
|
|
822
|
-
},
|
|
823
|
+
}, Xe = g && g !== "new" ? [
|
|
823
824
|
{
|
|
824
825
|
label: A?.steps && A.steps.length > 0 ? `${h("tourBuilder.editSteps")} (${A.steps.length})` : h("tourBuilder.editSteps"),
|
|
825
826
|
onSelect: () => _(`${y}/${g}/steps`),
|
|
@@ -840,10 +841,10 @@ function y() {
|
|
|
840
841
|
onSelect: () => _(`${y}/${g}/schedule`),
|
|
841
842
|
icon: /* @__PURE__ */ p(l, { size: 16 })
|
|
842
843
|
},
|
|
843
|
-
...
|
|
844
|
+
...Ee ? [{
|
|
844
845
|
label: "Save as Template",
|
|
845
|
-
onSelect: () => void
|
|
846
|
-
icon: /* @__PURE__ */ p(
|
|
846
|
+
onSelect: () => void qe(),
|
|
847
|
+
icon: /* @__PURE__ */ p(se, { size: 16 })
|
|
847
848
|
}] : []
|
|
848
849
|
] : [], $ = g && g !== "new" && E ? [
|
|
849
850
|
{
|
|
@@ -888,10 +889,10 @@ function y() {
|
|
|
888
889
|
className: "flex items-center gap-4",
|
|
889
890
|
children: [/* @__PURE__ */ p("button", {
|
|
890
891
|
type: "button",
|
|
891
|
-
onClick:
|
|
892
|
+
onClick: Q,
|
|
892
893
|
className: "p-2 hover:bg-accent rounded-md",
|
|
893
894
|
"aria-label": h("tourBuilder.goBack"),
|
|
894
|
-
children: /* @__PURE__ */ p(
|
|
895
|
+
children: /* @__PURE__ */ p(oe, { size: 20 })
|
|
895
896
|
}), /* @__PURE__ */ m("div", {
|
|
896
897
|
className: "flex-1",
|
|
897
898
|
children: [/* @__PURE__ */ p("h1", {
|
|
@@ -903,13 +904,13 @@ function y() {
|
|
|
903
904
|
})]
|
|
904
905
|
})]
|
|
905
906
|
}),
|
|
906
|
-
/* @__PURE__ */ p(
|
|
907
|
-
$.length > 0 ? /* @__PURE__ */ p(
|
|
907
|
+
/* @__PURE__ */ p(_e, { children: h("tourBuilder.purpose") }),
|
|
908
|
+
$.length > 0 ? /* @__PURE__ */ p(ge, {
|
|
908
909
|
storageKey: "tours-builder",
|
|
909
910
|
title: h("tourBuilder.nextStepsTitle"),
|
|
910
911
|
steps: $
|
|
911
912
|
}) : null,
|
|
912
|
-
w ? /* @__PURE__ */ m(
|
|
913
|
+
w ? /* @__PURE__ */ m(le, { children: [/* @__PURE__ */ m(me, {
|
|
913
914
|
className: "p-4 sm:p-6",
|
|
914
915
|
children: [
|
|
915
916
|
/* @__PURE__ */ m("div", {
|
|
@@ -925,19 +926,19 @@ function y() {
|
|
|
925
926
|
})]
|
|
926
927
|
}), /* @__PURE__ */ m("button", {
|
|
927
928
|
type: "button",
|
|
928
|
-
onClick: () => void
|
|
929
|
-
disabled:
|
|
929
|
+
onClick: () => void Je(),
|
|
930
|
+
disabled: Me || !O,
|
|
930
931
|
className: "inline-flex min-h-11 items-center justify-center gap-2 rounded-md border border-border-subtle bg-secondary px-4 py-2 text-sm font-medium text-secondary-foreground hover:bg-secondary/80 disabled:cursor-not-allowed disabled:opacity-50",
|
|
931
|
-
children: [/* @__PURE__ */ p(f, { size: 18 }), h(
|
|
932
|
+
children: [/* @__PURE__ */ p(f, { size: 18 }), h(Me ? "tourBuilder.seedVibeControls.loading" : "tourBuilder.seedVibeControls.button")]
|
|
932
933
|
})]
|
|
933
934
|
}),
|
|
934
935
|
O ? null : /* @__PURE__ */ p("p", {
|
|
935
936
|
className: "mt-3 text-sm text-text-secondary",
|
|
936
937
|
children: h("tourBuilder.seedVibeControls.permissionHint")
|
|
937
938
|
}),
|
|
938
|
-
|
|
939
|
+
Fe ? /* @__PURE__ */ p("p", {
|
|
939
940
|
className: "mt-3 text-sm text-status-error-text",
|
|
940
|
-
children:
|
|
941
|
+
children: Fe
|
|
941
942
|
}) : null,
|
|
942
943
|
U ? /* @__PURE__ */ p("div", {
|
|
943
944
|
className: "mt-3 rounded-md border border-border-seam bg-bg-surface p-3 text-sm text-text-secondary",
|
|
@@ -950,7 +951,7 @@ function y() {
|
|
|
950
951
|
})
|
|
951
952
|
}) : null
|
|
952
953
|
]
|
|
953
|
-
}), /* @__PURE__ */ m(
|
|
954
|
+
}), /* @__PURE__ */ m(me, {
|
|
954
955
|
className: "p-4 sm:p-6",
|
|
955
956
|
children: [
|
|
956
957
|
/* @__PURE__ */ m("div", {
|
|
@@ -966,19 +967,19 @@ function y() {
|
|
|
966
967
|
})]
|
|
967
968
|
}), /* @__PURE__ */ m("button", {
|
|
968
969
|
type: "button",
|
|
969
|
-
onClick: () => void
|
|
970
|
-
disabled:
|
|
970
|
+
onClick: () => void Ye(),
|
|
971
|
+
disabled: Le || !k,
|
|
971
972
|
className: "inline-flex min-h-11 items-center justify-center gap-2 rounded-md border border-border-subtle bg-secondary px-4 py-2 text-sm font-medium text-secondary-foreground hover:bg-secondary/80 disabled:cursor-not-allowed disabled:opacity-50",
|
|
972
|
-
children: [/* @__PURE__ */ p(f, { size: 18 }), h(
|
|
973
|
+
children: [/* @__PURE__ */ p(f, { size: 18 }), h(Le ? "tourBuilder.seedBuildmyiq.loading" : "tourBuilder.seedBuildmyiq.button")]
|
|
973
974
|
})]
|
|
974
975
|
}),
|
|
975
976
|
k ? null : /* @__PURE__ */ p("p", {
|
|
976
977
|
className: "mt-3 text-sm text-text-secondary",
|
|
977
978
|
children: h("tourBuilder.seedBuildmyiq.permissionHint")
|
|
978
979
|
}),
|
|
979
|
-
|
|
980
|
+
Be ? /* @__PURE__ */ p("p", {
|
|
980
981
|
className: "mt-3 text-sm text-status-error-text",
|
|
981
|
-
children:
|
|
982
|
+
children: Be
|
|
982
983
|
}) : null,
|
|
983
984
|
W ? /* @__PURE__ */ p("div", {
|
|
984
985
|
className: "mt-3 rounded-md border border-border-seam bg-bg-surface p-3 text-sm text-text-secondary",
|
|
@@ -993,10 +994,10 @@ function y() {
|
|
|
993
994
|
]
|
|
994
995
|
})] }) : null,
|
|
995
996
|
/* @__PURE__ */ m("form", {
|
|
996
|
-
onSubmit:
|
|
997
|
+
onSubmit: Ge,
|
|
997
998
|
className: "space-y-6",
|
|
998
999
|
children: [
|
|
999
|
-
/* @__PURE__ */ m(
|
|
1000
|
+
/* @__PURE__ */ m(he, {
|
|
1000
1001
|
treatment: "plain",
|
|
1001
1002
|
className: "p-4 sm:p-6 border-border-seam",
|
|
1002
1003
|
children: [/* @__PURE__ */ p("h2", {
|
|
@@ -1021,21 +1022,17 @@ function y() {
|
|
|
1021
1022
|
required: !0,
|
|
1022
1023
|
"aria-label": h("tourBuilder.labelName")
|
|
1023
1024
|
})] }),
|
|
1024
|
-
/* @__PURE__ */
|
|
1025
|
-
className: "block text-sm font-medium mb-2",
|
|
1026
|
-
htmlFor: "tour-description",
|
|
1027
|
-
children: h("tourBuilder.labelDescription")
|
|
1028
|
-
}), /* @__PURE__ */ p("textarea", {
|
|
1025
|
+
/* @__PURE__ */ p(ne, {
|
|
1029
1026
|
id: "tour-description",
|
|
1027
|
+
label: h("tourBuilder.labelDescription"),
|
|
1030
1028
|
value: F.description || "",
|
|
1031
1029
|
onChange: (e) => I({
|
|
1032
1030
|
...F,
|
|
1033
|
-
description: e
|
|
1031
|
+
description: e
|
|
1034
1032
|
}),
|
|
1035
|
-
rows:
|
|
1036
|
-
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1033
|
+
rows: 4,
|
|
1037
1034
|
"aria-label": h("tourBuilder.labelDescription")
|
|
1038
|
-
})
|
|
1035
|
+
}),
|
|
1039
1036
|
/* @__PURE__ */ m("div", { children: [
|
|
1040
1037
|
/* @__PURE__ */ p("label", {
|
|
1041
1038
|
className: "block text-sm font-medium mb-2",
|
|
@@ -1083,7 +1080,7 @@ function y() {
|
|
|
1083
1080
|
")"
|
|
1084
1081
|
]
|
|
1085
1082
|
}, e.id)),
|
|
1086
|
-
|
|
1083
|
+
He ? /* @__PURE__ */ m("option", {
|
|
1087
1084
|
value: F.productId,
|
|
1088
1085
|
children: ["Current: ", F.productId]
|
|
1089
1086
|
}) : null,
|
|
@@ -1152,7 +1149,7 @@ function y() {
|
|
|
1152
1149
|
")"
|
|
1153
1150
|
]
|
|
1154
1151
|
}, e.moduleId)),
|
|
1155
|
-
|
|
1152
|
+
Ue ? /* @__PURE__ */ m("option", {
|
|
1156
1153
|
value: F.moduleId,
|
|
1157
1154
|
children: ["Current: ", F.moduleId]
|
|
1158
1155
|
}) : null,
|
|
@@ -1214,7 +1211,7 @@ function y() {
|
|
|
1214
1211
|
")"
|
|
1215
1212
|
]
|
|
1216
1213
|
}, e.pageId)),
|
|
1217
|
-
|
|
1214
|
+
We ? /* @__PURE__ */ m("option", {
|
|
1218
1215
|
value: F.pageId,
|
|
1219
1216
|
children: ["Current: ", F.pageId]
|
|
1220
1217
|
}) : null,
|
|
@@ -1257,7 +1254,7 @@ function y() {
|
|
|
1257
1254
|
]
|
|
1258
1255
|
})]
|
|
1259
1256
|
}),
|
|
1260
|
-
/* @__PURE__ */ m(
|
|
1257
|
+
/* @__PURE__ */ m(he, {
|
|
1261
1258
|
treatment: "plain",
|
|
1262
1259
|
className: "p-4 sm:p-6 border-border-seam",
|
|
1263
1260
|
children: [/* @__PURE__ */ p("h2", {
|
|
@@ -1331,7 +1328,7 @@ function y() {
|
|
|
1331
1328
|
}), /* @__PURE__ */ p("input", {
|
|
1332
1329
|
id: "tour-start-date",
|
|
1333
1330
|
type: "datetime-local",
|
|
1334
|
-
value:
|
|
1331
|
+
value: Ke(F.startDate),
|
|
1335
1332
|
onChange: (e) => I({
|
|
1336
1333
|
...F,
|
|
1337
1334
|
startDate: e.target.value ? new Date(e.target.value).toISOString() : void 0
|
|
@@ -1345,7 +1342,7 @@ function y() {
|
|
|
1345
1342
|
}), /* @__PURE__ */ p("input", {
|
|
1346
1343
|
id: "tour-end-date",
|
|
1347
1344
|
type: "datetime-local",
|
|
1348
|
-
value:
|
|
1345
|
+
value: Ke(F.endDate),
|
|
1349
1346
|
onChange: (e) => I({
|
|
1350
1347
|
...F,
|
|
1351
1348
|
endDate: e.target.value ? new Date(e.target.value).toISOString() : void 0
|
|
@@ -1357,14 +1354,14 @@ function y() {
|
|
|
1357
1354
|
]
|
|
1358
1355
|
})]
|
|
1359
1356
|
}),
|
|
1360
|
-
|
|
1357
|
+
ke && /* @__PURE__ */ m("div", {
|
|
1361
1358
|
className: "border border-status-error-border rounded-md p-4 bg-status-error-bg/10",
|
|
1362
1359
|
children: [/* @__PURE__ */ p("h3", {
|
|
1363
1360
|
className: "font-semibold text-status-error-text mb-2",
|
|
1364
1361
|
children: h("tourBuilder.errorTitle")
|
|
1365
1362
|
}), /* @__PURE__ */ p("p", {
|
|
1366
1363
|
className: "text-sm text-status-error-text",
|
|
1367
|
-
children:
|
|
1364
|
+
children: ke.message
|
|
1368
1365
|
})]
|
|
1369
1366
|
}),
|
|
1370
1367
|
N.length > 0 && /* @__PURE__ */ m("div", {
|
|
@@ -1382,15 +1379,15 @@ function y() {
|
|
|
1382
1379
|
}),
|
|
1383
1380
|
/* @__PURE__ */ m("div", {
|
|
1384
1381
|
className: "flex flex-wrap items-center gap-3",
|
|
1385
|
-
children: [/* @__PURE__ */ p(
|
|
1382
|
+
children: [/* @__PURE__ */ p(ae, {
|
|
1386
1383
|
permission: w ? i.TOUR_CREATE : i.TOUR_UPDATE,
|
|
1387
|
-
children: /* @__PURE__ */ m(
|
|
1384
|
+
children: /* @__PURE__ */ m(fe, {
|
|
1388
1385
|
type: "submit",
|
|
1389
1386
|
disabled: M || !D,
|
|
1390
1387
|
className: "flex-1 min-w-[200px] min-h-[44px]",
|
|
1391
|
-
children: [/* @__PURE__ */ p(
|
|
1388
|
+
children: [/* @__PURE__ */ p(ce, { size: 20 }), h(M ? "tourBuilder.saving" : g && g !== "new" ? "tourBuilder.updateTour" : "tourBuilder.createAndAddSteps")]
|
|
1392
1389
|
})
|
|
1393
|
-
}), g && g !== "new" &&
|
|
1390
|
+
}), g && g !== "new" && Xe.length > 0 && /* @__PURE__ */ p(pe, { actions: Xe })]
|
|
1394
1391
|
})
|
|
1395
1392
|
]
|
|
1396
1393
|
})
|
|
@@ -1407,7 +1404,7 @@ function y() {
|
|
|
1407
1404
|
children: h(w ? "tourBuilder.createAccessDeniedMessage" : "tourBuilder.updateAccessDeniedMessage")
|
|
1408
1405
|
})] }), /* @__PURE__ */ p("button", {
|
|
1409
1406
|
type: "button",
|
|
1410
|
-
onClick:
|
|
1407
|
+
onClick: Q,
|
|
1411
1408
|
className: "inline-flex items-center justify-center rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent",
|
|
1412
1409
|
children: h("tourBuilder.goBack")
|
|
1413
1410
|
})]
|