@anker-in/ui 0.3.7 → 0.3.9
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/demo-room.js +19 -1
- package/dist/demo-room.js.map +1 -1
- package/dist/demo-room.mjs +19 -1
- package/dist/demo-room.mjs.map +1 -1
- package/dist/index.d.mts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +446 -201
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +446 -201
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/.next-refresh +0 -1
package/dist/index.mjs
CHANGED
|
@@ -9,6 +9,8 @@ import 'antd-mobile/es/components/list/list.css';
|
|
|
9
9
|
import dayjs4 from 'dayjs';
|
|
10
10
|
import utc from 'dayjs/plugin/utc';
|
|
11
11
|
import timezone from 'dayjs/plugin/timezone';
|
|
12
|
+
import 'dayjs/locale/de';
|
|
13
|
+
import 'dayjs/locale/fr';
|
|
12
14
|
import 'dayjs/locale/zh-cn';
|
|
13
15
|
import { Image, QRCode, theme, ConfigProvider, Calendar, Select } from 'antd';
|
|
14
16
|
import dayLocaleData from 'dayjs/plugin/localeData';
|
|
@@ -1719,7 +1721,25 @@ var DemoRoomApiClient = class {
|
|
|
1719
1721
|
`/api/v1/store/bookings/${token}`,
|
|
1720
1722
|
{ headers }
|
|
1721
1723
|
);
|
|
1722
|
-
|
|
1724
|
+
const { questionnaire, booking } = response;
|
|
1725
|
+
if (questionnaire?.length) {
|
|
1726
|
+
const normalized = questionnaire.reduce(
|
|
1727
|
+
(acc, item) => {
|
|
1728
|
+
if (!item.key) return acc;
|
|
1729
|
+
acc[item.key] = item.value;
|
|
1730
|
+
return acc;
|
|
1731
|
+
},
|
|
1732
|
+
{}
|
|
1733
|
+
);
|
|
1734
|
+
return {
|
|
1735
|
+
...booking,
|
|
1736
|
+
questionnaire_response: {
|
|
1737
|
+
...booking.questionnaire_response || {},
|
|
1738
|
+
...normalized
|
|
1739
|
+
}
|
|
1740
|
+
};
|
|
1741
|
+
}
|
|
1742
|
+
return booking;
|
|
1723
1743
|
}
|
|
1724
1744
|
/**
|
|
1725
1745
|
* 取消预约(支持多语言邮件通知)
|
|
@@ -2666,6 +2686,60 @@ var LocationFilter2 = ({
|
|
|
2666
2686
|
LocationFilter2.displayName = "LocationFilter";
|
|
2667
2687
|
dayjs4.extend(utc);
|
|
2668
2688
|
dayjs4.extend(timezone);
|
|
2689
|
+
var EU_COUNTRIES = /* @__PURE__ */ new Set([
|
|
2690
|
+
"AT",
|
|
2691
|
+
"BE",
|
|
2692
|
+
"BG",
|
|
2693
|
+
"HR",
|
|
2694
|
+
"CY",
|
|
2695
|
+
"CZ",
|
|
2696
|
+
"DK",
|
|
2697
|
+
"EE",
|
|
2698
|
+
"FI",
|
|
2699
|
+
"GR",
|
|
2700
|
+
"HU",
|
|
2701
|
+
"IE",
|
|
2702
|
+
"IT",
|
|
2703
|
+
"LV",
|
|
2704
|
+
"LT",
|
|
2705
|
+
"LU",
|
|
2706
|
+
"MT",
|
|
2707
|
+
"NL",
|
|
2708
|
+
"PL",
|
|
2709
|
+
"PT",
|
|
2710
|
+
"RO",
|
|
2711
|
+
"SK",
|
|
2712
|
+
"SI",
|
|
2713
|
+
"ES",
|
|
2714
|
+
"SE"
|
|
2715
|
+
]);
|
|
2716
|
+
function resolveTimeFormat(locale) {
|
|
2717
|
+
const normalized = locale?.toUpperCase() || "";
|
|
2718
|
+
const region = normalized.split("-")[1] || normalized.split("_")[1] || normalized;
|
|
2719
|
+
if (region === "US" || region === "CA") return "us";
|
|
2720
|
+
if (region === "AU" || region === "GB" || region === "UK") return "au";
|
|
2721
|
+
if (region === "DE") return "de";
|
|
2722
|
+
if (region === "FR") return "fr";
|
|
2723
|
+
if (EU_COUNTRIES.has(region)) return "eu";
|
|
2724
|
+
return "us";
|
|
2725
|
+
}
|
|
2726
|
+
function formatAvailableTime(startTime, timezone5, locale) {
|
|
2727
|
+
const format = resolveTimeFormat(locale);
|
|
2728
|
+
const timeInZone = dayjs4(startTime).tz(timezone5);
|
|
2729
|
+
switch (format) {
|
|
2730
|
+
case "au":
|
|
2731
|
+
return timeInZone.format("D MMM, h:mm A");
|
|
2732
|
+
case "de":
|
|
2733
|
+
return timeInZone.locale("de").format("D. MMMM, HH:mm");
|
|
2734
|
+
case "fr":
|
|
2735
|
+
return timeInZone.locale("fr").format("D MMMM, HH:mm");
|
|
2736
|
+
case "eu":
|
|
2737
|
+
return timeInZone.format("D MMMM, HH:mm");
|
|
2738
|
+
case "us":
|
|
2739
|
+
default:
|
|
2740
|
+
return timeInZone.format("MMM D, h:mm A");
|
|
2741
|
+
}
|
|
2742
|
+
}
|
|
2669
2743
|
var isAllOption = (option) => {
|
|
2670
2744
|
const normalizedType = option.type.trim().toLowerCase();
|
|
2671
2745
|
return normalizedType === "" || normalizedType.startsWith("all ");
|
|
@@ -2866,6 +2940,7 @@ var RoomsList2 = ({
|
|
|
2866
2940
|
googleMapsApiKey,
|
|
2867
2941
|
className,
|
|
2868
2942
|
apiClient,
|
|
2943
|
+
locale,
|
|
2869
2944
|
teamCode,
|
|
2870
2945
|
brandWebsite,
|
|
2871
2946
|
onSchedule,
|
|
@@ -2983,13 +3058,11 @@ var RoomsList2 = ({
|
|
|
2983
3058
|
let formattedTime = mergedPageData.noAvailableTime;
|
|
2984
3059
|
if (nextAvailableTimeslot) {
|
|
2985
3060
|
try {
|
|
2986
|
-
|
|
2987
|
-
|
|
3061
|
+
formattedTime = formatAvailableTime(
|
|
3062
|
+
nextAvailableTimeslot.start_time,
|
|
3063
|
+
room.timezone || "America/Los_Angeles",
|
|
3064
|
+
locale
|
|
2988
3065
|
);
|
|
2989
|
-
const month = timeInZone.format("MMM");
|
|
2990
|
-
const day = timeInZone.format("D");
|
|
2991
|
-
const time = timeInZone.format("h:mm A");
|
|
2992
|
-
formattedTime = `${month}.${day}, ${time}`;
|
|
2993
3066
|
} catch (error2) {
|
|
2994
3067
|
formattedTime = nextAvailableTimeslot.start_time;
|
|
2995
3068
|
}
|
|
@@ -3011,7 +3084,12 @@ var RoomsList2 = ({
|
|
|
3011
3084
|
storeType: room.store_type || room.storeType || ""
|
|
3012
3085
|
};
|
|
3013
3086
|
});
|
|
3014
|
-
}, [
|
|
3087
|
+
}, [
|
|
3088
|
+
demoRooms,
|
|
3089
|
+
mergedPageData.defaultCountry,
|
|
3090
|
+
mergedPageData.noAvailableTime,
|
|
3091
|
+
locale
|
|
3092
|
+
]);
|
|
3015
3093
|
const filteredStudioLocations = useMemo(() => {
|
|
3016
3094
|
return studioLocations.filter((location) => {
|
|
3017
3095
|
if (selectedPurposeType) {
|
|
@@ -3041,13 +3119,6 @@ var RoomsList2 = ({
|
|
|
3041
3119
|
selectedPurposeType,
|
|
3042
3120
|
selectedStoreType
|
|
3043
3121
|
]);
|
|
3044
|
-
const getSelectedLocationName = () => {
|
|
3045
|
-
if (!selectedLocation) return mergedPageData.locationFilter.allLocations;
|
|
3046
|
-
if (selectedLocation.city) return selectedLocation.city;
|
|
3047
|
-
if (selectedLocation.state) return selectedLocation.state;
|
|
3048
|
-
if (selectedLocation.country) return selectedLocation.country;
|
|
3049
|
-
return mergedPageData.locationFilter.allLocations;
|
|
3050
|
-
};
|
|
3051
3122
|
const handleLocationSelect = (selection) => {
|
|
3052
3123
|
setSelectedLocation(selection);
|
|
3053
3124
|
setShowLocationFilter(false);
|
|
@@ -3126,27 +3197,8 @@ var RoomsList2 = ({
|
|
|
3126
3197
|
style: { height: "794px" },
|
|
3127
3198
|
children: [
|
|
3128
3199
|
/* @__PURE__ */ jsxs("div", { className: "relative z-20 mb-5", children: [
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
{
|
|
3132
|
-
type: "button",
|
|
3133
|
-
"aria-haspopup": "dialog",
|
|
3134
|
-
"aria-expanded": showLocationFilter,
|
|
3135
|
-
className: cn(
|
|
3136
|
-
"flex h-[68px] w-full items-center justify-between border bg-white px-[20px] text-left text-[16px] font-bold text-[#4A4C54] transition-colors hover:text-[#080A0F] l:h-[56px] l:px-[16px] l:text-[14px]",
|
|
3137
|
-
showLocationFilter ? "rounded-t-[12px] rounded-b-none border-[#080A0F]" : "rounded-[12px] border-[#E4E5E6]"
|
|
3138
|
-
),
|
|
3139
|
-
onClick: () => {
|
|
3140
|
-
setOpenFilterDropdown(null);
|
|
3141
|
-
setShowLocationFilter(!showLocationFilter);
|
|
3142
|
-
},
|
|
3143
|
-
children: [
|
|
3144
|
-
/* @__PURE__ */ jsx("span", { className: "truncate pr-2", children: getSelectedLocationName() }),
|
|
3145
|
-
/* @__PURE__ */ jsx("span", { className: "flex-none text-[#080A0F]", children: /* @__PURE__ */ jsx(ChevronIcon, { open: showLocationFilter }) })
|
|
3146
|
-
]
|
|
3147
|
-
}
|
|
3148
|
-
),
|
|
3149
|
-
/* @__PURE__ */ jsxs("div", { className: "mt-3 grid grid-cols-2 gap-2", children: [
|
|
3200
|
+
false,
|
|
3201
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
|
|
3150
3202
|
renderFilterDropdown(
|
|
3151
3203
|
"purpose",
|
|
3152
3204
|
purposeOptions,
|
|
@@ -3170,8 +3222,8 @@ var RoomsList2 = ({
|
|
|
3170
3222
|
/* @__PURE__ */ jsx(
|
|
3171
3223
|
"div",
|
|
3172
3224
|
{
|
|
3173
|
-
style: { maxHeight: "
|
|
3174
|
-
className: "rounded-[12px] bg-white border h-[
|
|
3225
|
+
style: { maxHeight: "708px", overflow: "auto" },
|
|
3226
|
+
className: "rounded-[12px] bg-white border h-[708px] border-[#E4E5E6]",
|
|
3175
3227
|
children: filteredStudioLocations.length === 0 ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center h-[200px] text-[#767880]", children: mergedPageData.locationFilter.noStudiosFound }) : filteredStudioLocations.map((item) => {
|
|
3176
3228
|
return /* @__PURE__ */ jsx(
|
|
3177
3229
|
StudioCard2,
|
|
@@ -3254,6 +3306,7 @@ var DemoRoomO2O = ({
|
|
|
3254
3306
|
className: layoutClassName,
|
|
3255
3307
|
googleMapsApiKey,
|
|
3256
3308
|
apiClient,
|
|
3309
|
+
locale: apiConfig.locale,
|
|
3257
3310
|
teamCode,
|
|
3258
3311
|
brandWebsite,
|
|
3259
3312
|
onSchedule,
|
|
@@ -10839,9 +10892,27 @@ var BookingSuccess = ({
|
|
|
10839
10892
|
] }) })
|
|
10840
10893
|
] }) });
|
|
10841
10894
|
};
|
|
10895
|
+
var EMAIL_REGEX = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
10896
|
+
var normalizeInitialResponses = (questions, initialResponses) => {
|
|
10897
|
+
if (!initialResponses) return {};
|
|
10898
|
+
const normalized = { ...initialResponses };
|
|
10899
|
+
questions.forEach((question) => {
|
|
10900
|
+
const questionId = question.key || question.id || "";
|
|
10901
|
+
if (!questionId) return;
|
|
10902
|
+
const value = normalized[questionId];
|
|
10903
|
+
if (value === void 0 || value === null) return;
|
|
10904
|
+
if (question.type === "checkbox") {
|
|
10905
|
+
normalized[questionId] = Array.isArray(value) ? value : [value];
|
|
10906
|
+
} else if (Array.isArray(value)) {
|
|
10907
|
+
normalized[questionId] = value[0];
|
|
10908
|
+
}
|
|
10909
|
+
});
|
|
10910
|
+
return normalized;
|
|
10911
|
+
};
|
|
10842
10912
|
var QuestionnaireForm2 = ({
|
|
10843
10913
|
questions,
|
|
10844
10914
|
onSubmit,
|
|
10915
|
+
onCancel,
|
|
10845
10916
|
pageData,
|
|
10846
10917
|
selectedTimeslotId,
|
|
10847
10918
|
loading = false,
|
|
@@ -10849,24 +10920,28 @@ var QuestionnaireForm2 = ({
|
|
|
10849
10920
|
error,
|
|
10850
10921
|
initialResponses
|
|
10851
10922
|
}) => {
|
|
10923
|
+
const normalizedInitialResponses = useMemo(
|
|
10924
|
+
() => normalizeInitialResponses(questions, initialResponses),
|
|
10925
|
+
[questions, initialResponses]
|
|
10926
|
+
);
|
|
10852
10927
|
const [responses, setResponses] = useState(
|
|
10853
|
-
() =>
|
|
10928
|
+
() => normalizedInitialResponses
|
|
10854
10929
|
);
|
|
10855
10930
|
const [errors, setErrors] = useState({});
|
|
10856
10931
|
const [agreements, setAgreements] = useState({});
|
|
10857
10932
|
const [agreementError, setAgreementError] = useState("");
|
|
10858
10933
|
const [phoneCountryCodes, setPhoneCountryCodes] = useState(() => {
|
|
10859
|
-
const code =
|
|
10934
|
+
const code = normalizedInitialResponses?.["phone_code"] || normalizedInitialResponses?.["customer_phone_code"];
|
|
10860
10935
|
if (!code) return {};
|
|
10861
10936
|
return { phone: code, customer_phone_number: code };
|
|
10862
10937
|
});
|
|
10863
10938
|
const [otherInputs, setOtherInputs] = useState(() => {
|
|
10864
|
-
if (!
|
|
10939
|
+
if (!normalizedInitialResponses) return {};
|
|
10865
10940
|
const seeded = {};
|
|
10866
10941
|
questions.forEach((q) => {
|
|
10867
10942
|
if (q.type !== "radio_with_other") return;
|
|
10868
10943
|
const qId = q.key || q.id || "";
|
|
10869
|
-
const val =
|
|
10944
|
+
const val = normalizedInitialResponses[qId];
|
|
10870
10945
|
if (val && !q.options?.some((opt) => (opt.value || opt.label) === val)) {
|
|
10871
10946
|
seeded[qId] = val;
|
|
10872
10947
|
}
|
|
@@ -10874,10 +10949,10 @@ var QuestionnaireForm2 = ({
|
|
|
10874
10949
|
return seeded;
|
|
10875
10950
|
});
|
|
10876
10951
|
const prevHasBookedBeforeRef = useRef(
|
|
10877
|
-
|
|
10952
|
+
normalizedInitialResponses?.["has_booked_before"] === "option2"
|
|
10878
10953
|
);
|
|
10879
10954
|
const hasBookedBeforeInitialized = useRef(
|
|
10880
|
-
!!
|
|
10955
|
+
!!normalizedInitialResponses?.["has_booked_before"]
|
|
10881
10956
|
);
|
|
10882
10957
|
const hasBookedBeforeQuestion = questions.find(
|
|
10883
10958
|
(q) => (q.key || q.id) === "has_booked_before"
|
|
@@ -10964,12 +11039,17 @@ var QuestionnaireForm2 = ({
|
|
|
10964
11039
|
};
|
|
10965
11040
|
const handleEmailBlur = (questionId, value) => {
|
|
10966
11041
|
if (!value) return;
|
|
10967
|
-
|
|
10968
|
-
if (!emailRegex.test(value)) {
|
|
11042
|
+
if (!EMAIL_REGEX.test(value)) {
|
|
10969
11043
|
setErrors((prev) => ({
|
|
10970
11044
|
...prev,
|
|
10971
11045
|
[questionId]: pageData?.emailValidError || "Please enter a valid email address"
|
|
10972
11046
|
}));
|
|
11047
|
+
} else {
|
|
11048
|
+
setErrors((prev) => {
|
|
11049
|
+
const newErrors = { ...prev };
|
|
11050
|
+
delete newErrors[questionId];
|
|
11051
|
+
return newErrors;
|
|
11052
|
+
});
|
|
10973
11053
|
}
|
|
10974
11054
|
};
|
|
10975
11055
|
const handleCountryCodeChange = (questionId, code) => {
|
|
@@ -11002,13 +11082,18 @@ var QuestionnaireForm2 = ({
|
|
|
11002
11082
|
const validateForm = () => {
|
|
11003
11083
|
const newErrors = {};
|
|
11004
11084
|
visibleQuestions.forEach((question) => {
|
|
11085
|
+
const questionId = getQuestionId(question);
|
|
11086
|
+
const value = responses[questionId];
|
|
11005
11087
|
if (question.required) {
|
|
11006
|
-
const questionId = getQuestionId(question);
|
|
11007
|
-
const value = responses[questionId];
|
|
11008
11088
|
if (!value || Array.isArray(value) && value.length === 0) {
|
|
11009
11089
|
newErrors[questionId] = pageData?.fieldRuquired || "This field is required";
|
|
11010
11090
|
}
|
|
11011
11091
|
}
|
|
11092
|
+
if (question.type === "email" && value && typeof value === "string") {
|
|
11093
|
+
if (!EMAIL_REGEX.test(value)) {
|
|
11094
|
+
newErrors[questionId] = pageData?.emailValidError || "Please enter a valid email address";
|
|
11095
|
+
}
|
|
11096
|
+
}
|
|
11012
11097
|
});
|
|
11013
11098
|
const agrees = pageData?.agrees || [];
|
|
11014
11099
|
if (agrees.length > 0) {
|
|
@@ -11073,7 +11158,7 @@ var QuestionnaireForm2 = ({
|
|
|
11073
11158
|
onChange: (e) => handleChange(questionId, e.target.value),
|
|
11074
11159
|
placeholder: question.placeholder,
|
|
11075
11160
|
className: cn(
|
|
11076
|
-
"w-full px-4 py-3 rounded-lg border text-base bg-white dark:bg-white dark:text-
|
|
11161
|
+
"w-full px-4 py-3 rounded-lg border text-base bg-white dark:bg-white dark:text-[#080A0F]",
|
|
11077
11162
|
"focus:outline-none focus:ring-2 focus:ring-[#3ADB67] focus:border-transparent",
|
|
11078
11163
|
hasError ? "border-red-500" : "border-[#E4E5E6]"
|
|
11079
11164
|
)
|
|
@@ -11089,7 +11174,7 @@ var QuestionnaireForm2 = ({
|
|
|
11089
11174
|
onBlur: (e) => handleEmailBlur(questionId, e.target.value),
|
|
11090
11175
|
placeholder: question.placeholder,
|
|
11091
11176
|
className: cn(
|
|
11092
|
-
"w-full px-4 py-3 rounded-lg border text-base bg-white dark:bg-white dark:text-
|
|
11177
|
+
"w-full px-4 py-3 rounded-lg border text-base bg-white dark:bg-white dark:text-[#080A0F]",
|
|
11093
11178
|
"focus:outline-none focus:ring-2 focus:ring-[#3ADB67] focus:border-transparent",
|
|
11094
11179
|
hasError ? "border-red-500" : "border-[#E4E5E6]"
|
|
11095
11180
|
)
|
|
@@ -11108,7 +11193,7 @@ var QuestionnaireForm2 = ({
|
|
|
11108
11193
|
"appearance-none pl-3 pr-8 py-3 rounded-lg border text-base",
|
|
11109
11194
|
"focus:outline-none focus:ring-2 focus:ring-[#3ADB67] focus:border-transparent",
|
|
11110
11195
|
"bg-white cursor-pointer w-[80px]",
|
|
11111
|
-
"dark:bg-white dark:text-
|
|
11196
|
+
"dark:bg-white dark:text-[#080A0F]",
|
|
11112
11197
|
hasError ? "border-red-500" : "border-[#E4E5E6]"
|
|
11113
11198
|
),
|
|
11114
11199
|
children: countryCodes.map((item) => /* @__PURE__ */ jsx("option", { value: item.code, children: item.code }, item.code))
|
|
@@ -11143,7 +11228,7 @@ var QuestionnaireForm2 = ({
|
|
|
11143
11228
|
onChange: (e) => handleChange(questionId, e.target.value),
|
|
11144
11229
|
placeholder: question.placeholder,
|
|
11145
11230
|
className: cn(
|
|
11146
|
-
"flex-1 px-4 py-3 rounded-lg border text-base bg-white dark:bg-white dark:text-
|
|
11231
|
+
"flex-1 px-4 py-3 rounded-lg border text-base bg-white dark:bg-white dark:text-[#080A0F]",
|
|
11147
11232
|
"focus:outline-none focus:ring-2 focus:ring-[#3ADB67] focus:border-transparent",
|
|
11148
11233
|
hasError ? "border-red-500" : "border-[#E4E5E6]"
|
|
11149
11234
|
)
|
|
@@ -11161,7 +11246,7 @@ var QuestionnaireForm2 = ({
|
|
|
11161
11246
|
className: cn(
|
|
11162
11247
|
"w-full px-4 py-3 rounded-lg border text-base resize-none bg-white",
|
|
11163
11248
|
"focus:outline-none focus:ring-2 focus:ring-[#3ADB67] focus:border-transparent",
|
|
11164
|
-
"dark:bg-white dark:text-
|
|
11249
|
+
"dark:bg-white dark:text-[#080A0F]",
|
|
11165
11250
|
hasError ? "border-red-500" : "border-[#E4E5E6]"
|
|
11166
11251
|
)
|
|
11167
11252
|
}
|
|
@@ -11189,7 +11274,7 @@ var QuestionnaireForm2 = ({
|
|
|
11189
11274
|
}
|
|
11190
11275
|
}
|
|
11191
11276
|
),
|
|
11192
|
-
/* @__PURE__ */ jsx("span", { className: "text-base text-
|
|
11277
|
+
/* @__PURE__ */ jsx("span", { className: "text-base text-[#080A0F] dark:text-[#080A0F] font-bold transition-colors", children: option.label })
|
|
11193
11278
|
]
|
|
11194
11279
|
},
|
|
11195
11280
|
option.value || option.label
|
|
@@ -11230,7 +11315,7 @@ var QuestionnaireForm2 = ({
|
|
|
11230
11315
|
}
|
|
11231
11316
|
}
|
|
11232
11317
|
),
|
|
11233
|
-
/* @__PURE__ */ jsx("span", { className: "text-base text-
|
|
11318
|
+
/* @__PURE__ */ jsx("span", { className: "text-base text-[#080A0F] dark:text-[#080A0F] font-bold transition-colors", children: option.label })
|
|
11234
11319
|
] }),
|
|
11235
11320
|
isOtherOption && isOtherSelected && /* @__PURE__ */ jsx(
|
|
11236
11321
|
"input",
|
|
@@ -11240,7 +11325,7 @@ var QuestionnaireForm2 = ({
|
|
|
11240
11325
|
onChange: (e) => handleOtherInputChange(questionId, e.target.value),
|
|
11241
11326
|
placeholder: question.placeholder || "Please specify...",
|
|
11242
11327
|
className: cn(
|
|
11243
|
-
"w-full px-4 py-3 rounded-lg border text-base bg-white dark:bg-white dark:text-
|
|
11328
|
+
"w-full px-4 py-3 rounded-lg border text-base bg-white dark:bg-white dark:text-[#080A0F]",
|
|
11244
11329
|
"focus:outline-none focus:ring-2 focus:ring-[#3ADB67] focus:border-transparent",
|
|
11245
11330
|
hasError ? "border-red-500" : "border-[#E4E5E6]"
|
|
11246
11331
|
)
|
|
@@ -11270,13 +11355,13 @@ var QuestionnaireForm2 = ({
|
|
|
11270
11355
|
optionValue,
|
|
11271
11356
|
e.target.checked
|
|
11272
11357
|
),
|
|
11273
|
-
className: "w-
|
|
11358
|
+
className: "w-4 h-4 text-[#fff] rounded",
|
|
11274
11359
|
style: {
|
|
11275
|
-
accentColor: "#
|
|
11360
|
+
accentColor: "#080A0F"
|
|
11276
11361
|
}
|
|
11277
11362
|
}
|
|
11278
11363
|
),
|
|
11279
|
-
/* @__PURE__ */ jsx("span", { className: "text-base text-
|
|
11364
|
+
/* @__PURE__ */ jsx("span", { className: "text-base text-[#080A0F] dark:text-[#080A0F] font-bold transition-colors", children: option.label })
|
|
11280
11365
|
]
|
|
11281
11366
|
},
|
|
11282
11367
|
optionValue
|
|
@@ -11295,7 +11380,7 @@ var QuestionnaireForm2 = ({
|
|
|
11295
11380
|
value: defaultValue,
|
|
11296
11381
|
onChange: (e) => handleChange(questionId, e.target.value),
|
|
11297
11382
|
className: cn(
|
|
11298
|
-
"w-full px-4 py-3 rounded-lg border text-base bg-white dark:bg-white dark:text-
|
|
11383
|
+
"w-full px-4 py-3 rounded-lg border text-base bg-white dark:bg-white dark:text-[#080A0F]",
|
|
11299
11384
|
"focus:outline-none focus:ring-2 focus:ring-[#3ADB67] focus:border-transparent",
|
|
11300
11385
|
"cursor-pointer",
|
|
11301
11386
|
hasError ? "border-red-500" : "border-[#E4E5E6]"
|
|
@@ -11326,7 +11411,7 @@ var QuestionnaireForm2 = ({
|
|
|
11326
11411
|
"data-has-error": hasError ? "true" : "false",
|
|
11327
11412
|
children: [
|
|
11328
11413
|
/* @__PURE__ */ jsxs("label", { className: "block", children: [
|
|
11329
|
-
/* @__PURE__ */ jsxs("span", { className: "text-base font-bold text-
|
|
11414
|
+
/* @__PURE__ */ jsxs("span", { className: "text-base font-bold text-[#080A0F] dark:text-[#080A0F]", children: [
|
|
11330
11415
|
question.label,
|
|
11331
11416
|
question.required && /* @__PURE__ */ jsx("span", { className: "text-red-500 ml-1", children: "*" })
|
|
11332
11417
|
] }),
|
|
@@ -11348,7 +11433,7 @@ var QuestionnaireForm2 = ({
|
|
|
11348
11433
|
questionId
|
|
11349
11434
|
);
|
|
11350
11435
|
}) }) }),
|
|
11351
|
-
!!selectedTimeslotId && /* @__PURE__ */ jsxs("div", { className: "flex flex-col
|
|
11436
|
+
!!selectedTimeslotId && /* @__PURE__ */ jsxs("div", { className: "flex flex-col justify-center", children: [
|
|
11352
11437
|
pageData?.agrees && pageData.agrees.length > 0 && /* @__PURE__ */ jsxs(
|
|
11353
11438
|
"div",
|
|
11354
11439
|
{
|
|
@@ -11363,9 +11448,9 @@ var QuestionnaireForm2 = ({
|
|
|
11363
11448
|
id: `agreement-${index}`,
|
|
11364
11449
|
checked: agreements[index] || false,
|
|
11365
11450
|
onChange: (e) => handleAgreementChange(index, e.target.checked),
|
|
11366
|
-
className: "w-
|
|
11451
|
+
className: "w-4 h-4 border border-[#080A0F] rounded text-[#fff] cursor-pointer flex-shrink-0",
|
|
11367
11452
|
style: {
|
|
11368
|
-
accentColor: "#
|
|
11453
|
+
accentColor: "#080A0F"
|
|
11369
11454
|
}
|
|
11370
11455
|
}
|
|
11371
11456
|
),
|
|
@@ -11390,22 +11475,40 @@ var QuestionnaireForm2 = ({
|
|
|
11390
11475
|
]
|
|
11391
11476
|
}
|
|
11392
11477
|
),
|
|
11393
|
-
/* @__PURE__ */
|
|
11394
|
-
|
|
11395
|
-
|
|
11396
|
-
|
|
11397
|
-
|
|
11398
|
-
|
|
11399
|
-
|
|
11400
|
-
|
|
11401
|
-
|
|
11402
|
-
|
|
11403
|
-
|
|
11404
|
-
|
|
11405
|
-
|
|
11406
|
-
|
|
11407
|
-
|
|
11408
|
-
|
|
11478
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-4", children: [
|
|
11479
|
+
/* @__PURE__ */ jsx(
|
|
11480
|
+
"button",
|
|
11481
|
+
{
|
|
11482
|
+
type: "submit",
|
|
11483
|
+
disabled: loading,
|
|
11484
|
+
onClick: handleSubmit,
|
|
11485
|
+
className: cn(
|
|
11486
|
+
"w-fit mt-6 px-6 py-4 rounded-full",
|
|
11487
|
+
"bg-[#080A0F] text-white font-bold text-base",
|
|
11488
|
+
"hover:bg-[#2FC257] hover:text-[#080A0F] transition-colors",
|
|
11489
|
+
"focus:outline-none focus:ring-2 focus:ring-[#3ADB67] focus:ring-offset-2",
|
|
11490
|
+
"disabled:opacity-50 disabled:cursor-not-allowed"
|
|
11491
|
+
),
|
|
11492
|
+
children: loading ? pageData?.submitting || "Submitting..." : pageData?.submit || "Submit Booking"
|
|
11493
|
+
}
|
|
11494
|
+
),
|
|
11495
|
+
pageData?.discardEdit && !!initialResponses && /* @__PURE__ */ jsx(
|
|
11496
|
+
"button",
|
|
11497
|
+
{
|
|
11498
|
+
type: "submit",
|
|
11499
|
+
onClick: () => {
|
|
11500
|
+
onCancel?.();
|
|
11501
|
+
},
|
|
11502
|
+
className: cn(
|
|
11503
|
+
"w-fit mt-6 px-6 py-4 rounded-full",
|
|
11504
|
+
"border-[#080A0F] border-2 text-[#080A0F] font-bold text-base",
|
|
11505
|
+
"transition-colors",
|
|
11506
|
+
"disabled:opacity-50 disabled:cursor-not-allowed"
|
|
11507
|
+
),
|
|
11508
|
+
children: pageData?.discardEdit
|
|
11509
|
+
}
|
|
11510
|
+
)
|
|
11511
|
+
] }),
|
|
11409
11512
|
error && /* @__PURE__ */ jsx("div", { className: "text-center w-full p-4", children: /* @__PURE__ */ jsx("p", { className: "text-[#FF4D4D] font-bold", children: pageData?.errorMsg?.[String(error.code)] || pageData?.errorMsg?.[error.code || ""] || error.message }) })
|
|
11410
11513
|
] })
|
|
11411
11514
|
] });
|
|
@@ -11665,7 +11768,7 @@ var DateTimePicker2 = ({
|
|
|
11665
11768
|
borderRadius: 16
|
|
11666
11769
|
};
|
|
11667
11770
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
11668
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
11771
|
+
/* @__PURE__ */ jsxs("div", { className: "grid gap-[16px] grid-cols-2 l:grid-cols-1", children: [
|
|
11669
11772
|
/* @__PURE__ */ jsx(
|
|
11670
11773
|
ConfigProvider,
|
|
11671
11774
|
{
|
|
@@ -11685,13 +11788,13 @@ var DateTimePicker2 = ({
|
|
|
11685
11788
|
"div",
|
|
11686
11789
|
{
|
|
11687
11790
|
style: wrapperStyle,
|
|
11688
|
-
className: "calendar-custom-cell
|
|
11791
|
+
className: "calendar-custom-cell min-l:max-w-[824px] l:w-full",
|
|
11689
11792
|
children: [
|
|
11690
11793
|
/* @__PURE__ */ jsx("style", { children: `
|
|
11691
11794
|
.calendar-custom-cell {
|
|
11692
11795
|
border-radius: 16px !important;
|
|
11693
11796
|
overflow: hidden;
|
|
11694
|
-
padding: 0 24px
|
|
11797
|
+
padding: 0 24px 24px 24px !important;
|
|
11695
11798
|
}
|
|
11696
11799
|
@media (max-width: 1023px) {
|
|
11697
11800
|
.calendar-custom-cell {
|
|
@@ -11700,6 +11803,9 @@ var DateTimePicker2 = ({
|
|
|
11700
11803
|
padding: 0 16px 16px 16px !important;
|
|
11701
11804
|
}
|
|
11702
11805
|
}
|
|
11806
|
+
.ant-picker-body{
|
|
11807
|
+
padding-bottom: 0px !important;
|
|
11808
|
+
}
|
|
11703
11809
|
.calendar-custom-cell,
|
|
11704
11810
|
.calendar-custom-cell *,
|
|
11705
11811
|
.calendar-custom-cell .ant-picker-panel,
|
|
@@ -11710,7 +11816,7 @@ var DateTimePicker2 = ({
|
|
|
11710
11816
|
font-family: 'MontForAnker' !important;
|
|
11711
11817
|
}
|
|
11712
11818
|
.calendar-custom-cell .ant-picker-cell {
|
|
11713
|
-
padding: 6px !important;
|
|
11819
|
+
padding: 6px 0 !important;
|
|
11714
11820
|
text-align: center !important;
|
|
11715
11821
|
}
|
|
11716
11822
|
.calendar-custom-cell .ant-picker-cell .ant-picker-cell-inner {
|
|
@@ -11857,7 +11963,7 @@ var DateTimePicker2 = ({
|
|
|
11857
11963
|
label,
|
|
11858
11964
|
value: index
|
|
11859
11965
|
}));
|
|
11860
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-
|
|
11966
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-4 l:pb-[0px]", children: [
|
|
11861
11967
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
11862
11968
|
/* @__PURE__ */ jsx(
|
|
11863
11969
|
Select,
|
|
@@ -11869,7 +11975,7 @@ var DateTimePicker2 = ({
|
|
|
11869
11975
|
onChange(now2);
|
|
11870
11976
|
},
|
|
11871
11977
|
variant: "borderless",
|
|
11872
|
-
className: "text-[32px] l:text-[20px] font-bold",
|
|
11978
|
+
className: "text-[32px] l:text-[20px] !p-0 font-bold",
|
|
11873
11979
|
popupMatchSelectWidth: false,
|
|
11874
11980
|
suffixIcon: null,
|
|
11875
11981
|
style: {
|
|
@@ -12073,7 +12179,7 @@ var DateTimePicker2 = ({
|
|
|
12073
12179
|
"div",
|
|
12074
12180
|
{
|
|
12075
12181
|
className: cn(
|
|
12076
|
-
"text-[48px] l:text-[32px] pb-[24px] pt-[64px] l:pt-[32px] font-bold"
|
|
12182
|
+
"text-[48px] l:text-[32px] leading-[1.1] pb-[24px] pt-[64px] l:pt-[32px] font-bold"
|
|
12077
12183
|
),
|
|
12078
12184
|
children: pageData?.fillOutForm
|
|
12079
12185
|
}
|
|
@@ -12087,6 +12193,9 @@ var DateTimePicker2 = ({
|
|
|
12087
12193
|
selectedTimeslotId,
|
|
12088
12194
|
error: bookingError || editError,
|
|
12089
12195
|
initialResponses,
|
|
12196
|
+
onCancel: () => {
|
|
12197
|
+
onBookingSuccess?.(token || "");
|
|
12198
|
+
},
|
|
12090
12199
|
onSubmit: async (responses) => {
|
|
12091
12200
|
if (onQuestionnaireSubmit) {
|
|
12092
12201
|
await onQuestionnaireSubmit(responses);
|
|
@@ -12220,7 +12329,7 @@ var DemoRoomDetail2 = ({
|
|
|
12220
12329
|
),
|
|
12221
12330
|
children: [
|
|
12222
12331
|
/* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
12223
|
-
/* @__PURE__ */ jsx("h1", { className: "text-[48px] l:text-[32px] font-bold text-
|
|
12332
|
+
/* @__PURE__ */ jsx("h1", { className: "text-[48px] l:text-[32px] font-bold text-[#080A0F] leading-tight", children: title }),
|
|
12224
12333
|
/* @__PURE__ */ jsx("div", { className: "mt-[20px]", children: descriptions?.map((desc, index) => /* @__PURE__ */ jsx(
|
|
12225
12334
|
"p",
|
|
12226
12335
|
{
|
|
@@ -12263,7 +12372,7 @@ var DemoRoomDetail2 = ({
|
|
|
12263
12372
|
]
|
|
12264
12373
|
}
|
|
12265
12374
|
),
|
|
12266
|
-
/* @__PURE__ */ jsx("span", { className: "text-base text-
|
|
12375
|
+
/* @__PURE__ */ jsx("span", { className: "text-base text-[#080A0F]", children: devices })
|
|
12267
12376
|
] }),
|
|
12268
12377
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
|
|
12269
12378
|
/* @__PURE__ */ jsxs(
|
|
@@ -12300,7 +12409,7 @@ var DemoRoomDetail2 = ({
|
|
|
12300
12409
|
}
|
|
12301
12410
|
),
|
|
12302
12411
|
/* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
|
|
12303
|
-
/* @__PURE__ */ jsx("p", { className: "text-base text-
|
|
12412
|
+
/* @__PURE__ */ jsx("p", { className: "text-base text-[#080A0F]", children: address }),
|
|
12304
12413
|
/* @__PURE__ */ jsxs(
|
|
12305
12414
|
"a",
|
|
12306
12415
|
{
|
|
@@ -12438,20 +12547,63 @@ function buildMirWelcomeUrl({
|
|
|
12438
12547
|
url.searchParams.set("redirect_url", encodeURIComponent(redirectSource));
|
|
12439
12548
|
return url.toString();
|
|
12440
12549
|
}
|
|
12441
|
-
var
|
|
12550
|
+
var PurposeCheckedIcon = () => /* @__PURE__ */ jsxs(
|
|
12442
12551
|
"svg",
|
|
12443
12552
|
{
|
|
12444
12553
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12445
|
-
width: "
|
|
12446
|
-
height: "
|
|
12447
|
-
viewBox: "0 0
|
|
12554
|
+
width: "20",
|
|
12555
|
+
height: "20",
|
|
12556
|
+
viewBox: "0 0 20 20",
|
|
12557
|
+
fill: "none",
|
|
12558
|
+
"aria-hidden": "true",
|
|
12559
|
+
className: "shrink-0",
|
|
12560
|
+
children: [
|
|
12561
|
+
/* @__PURE__ */ jsx("rect", { x: "0.8", y: "0.8", width: "18.4", height: "18.4", rx: "9.2", fill: "#000F16" }),
|
|
12562
|
+
/* @__PURE__ */ jsx(
|
|
12563
|
+
"rect",
|
|
12564
|
+
{
|
|
12565
|
+
x: "0.8",
|
|
12566
|
+
y: "0.8",
|
|
12567
|
+
width: "18.4",
|
|
12568
|
+
height: "18.4",
|
|
12569
|
+
rx: "9.2",
|
|
12570
|
+
stroke: "#000F16",
|
|
12571
|
+
strokeWidth: "1.6"
|
|
12572
|
+
}
|
|
12573
|
+
),
|
|
12574
|
+
/* @__PURE__ */ jsx(
|
|
12575
|
+
"path",
|
|
12576
|
+
{
|
|
12577
|
+
d: "M6 9.58333L8.94737 12.5L14 7.5",
|
|
12578
|
+
strokeWidth: "1.6",
|
|
12579
|
+
strokeLinecap: "round",
|
|
12580
|
+
strokeLinejoin: "round",
|
|
12581
|
+
stroke: "white"
|
|
12582
|
+
}
|
|
12583
|
+
)
|
|
12584
|
+
]
|
|
12585
|
+
}
|
|
12586
|
+
);
|
|
12587
|
+
var PurposeRadioIcon = () => /* @__PURE__ */ jsx(
|
|
12588
|
+
"svg",
|
|
12589
|
+
{
|
|
12590
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
12591
|
+
width: "20",
|
|
12592
|
+
height: "20",
|
|
12593
|
+
viewBox: "0 0 20 20",
|
|
12448
12594
|
fill: "none",
|
|
12449
12595
|
"aria-hidden": "true",
|
|
12596
|
+
className: "shrink-0",
|
|
12450
12597
|
children: /* @__PURE__ */ jsx(
|
|
12451
|
-
"
|
|
12598
|
+
"rect",
|
|
12452
12599
|
{
|
|
12453
|
-
|
|
12454
|
-
|
|
12600
|
+
x: "0.8",
|
|
12601
|
+
y: "0.8",
|
|
12602
|
+
width: "18.4",
|
|
12603
|
+
height: "18.4",
|
|
12604
|
+
rx: "9.2",
|
|
12605
|
+
stroke: "currentColor",
|
|
12606
|
+
strokeWidth: "1.6"
|
|
12455
12607
|
}
|
|
12456
12608
|
)
|
|
12457
12609
|
}
|
|
@@ -12556,11 +12708,15 @@ var BookingFormO2O = ({
|
|
|
12556
12708
|
const [isPurposeConfirmed, setIsPurposeConfirmed] = useState(
|
|
12557
12709
|
() => !!initialBusinessType && purposeOptions.some((item) => item.type === initialBusinessType)
|
|
12558
12710
|
);
|
|
12711
|
+
const podDesignId = useMemo(() => getQueryParam("design_id"), []);
|
|
12559
12712
|
useEffect(() => {
|
|
12560
12713
|
setSelectedPurposeType((currentType) => {
|
|
12561
12714
|
if (purposeOptions.some((item) => item.type === currentType)) {
|
|
12562
12715
|
return currentType;
|
|
12563
12716
|
}
|
|
12717
|
+
if (podDesignId) {
|
|
12718
|
+
return "pod";
|
|
12719
|
+
}
|
|
12564
12720
|
if (initialBusinessType && purposeOptions.some((item) => item.type === initialBusinessType)) {
|
|
12565
12721
|
return initialBusinessType;
|
|
12566
12722
|
}
|
|
@@ -12573,14 +12729,13 @@ var BookingFormO2O = ({
|
|
|
12573
12729
|
if (resolvedFromExplicitSource || purposeOptions.length > 0) {
|
|
12574
12730
|
setIsPurposeConfirmed(true);
|
|
12575
12731
|
}
|
|
12576
|
-
}, [purposeOptions, initialBusinessType, booking?.business_type]);
|
|
12732
|
+
}, [purposeOptions, initialBusinessType, booking?.business_type, podDesignId]);
|
|
12577
12733
|
const selectedPurpose = useMemo(() => {
|
|
12578
12734
|
return purposeOptions.find((item) => item.type === selectedPurposeType) || {};
|
|
12579
12735
|
}, [purposeOptions, selectedPurposeType]);
|
|
12580
12736
|
const isPodSelected = isPurposeConfirmed && selectedPurpose?.type === "pod";
|
|
12581
12737
|
const selectedPodContent = isPodSelected ? selectedPurpose?.podContent : void 0;
|
|
12582
12738
|
const selectedPodDescription = getPodContentDescription(selectedPodContent);
|
|
12583
|
-
const podDesignId = useMemo(() => getQueryParam("design_id"), []);
|
|
12584
12739
|
const isPodDesignEditMode = !!podDesignId || !!booking?.design_project_id;
|
|
12585
12740
|
const storeManagerIdFromUrl = useMemo(
|
|
12586
12741
|
() => getQueryParam("store_manager_id"),
|
|
@@ -12598,7 +12753,7 @@ var BookingFormO2O = ({
|
|
|
12598
12753
|
const selectedPodImage = getSafePageDataUrl(
|
|
12599
12754
|
isPodDesignEditMode && bookingDesign?.thumb_url || getPodContentImage(selectedPodContent)
|
|
12600
12755
|
);
|
|
12601
|
-
|
|
12756
|
+
getSafePageDataUrl(
|
|
12602
12757
|
isPodDesignEditMode ? selectedPodContent?.btnEditIcon : selectedPodContent?.btnIcon
|
|
12603
12758
|
);
|
|
12604
12759
|
const managerId = demoRoom?.contact?.manager_hash;
|
|
@@ -12668,7 +12823,7 @@ var BookingFormO2O = ({
|
|
|
12668
12823
|
"div",
|
|
12669
12824
|
{
|
|
12670
12825
|
className: cn(
|
|
12671
|
-
"text-[48px] l:text-[32px] pb-[24px] pt-[128px] l:pt-[64px] font-bold",
|
|
12826
|
+
"text-[48px] l:text-[32px] leading-[1.1] pb-[24px] pt-[128px] l:pt-[64px] font-bold",
|
|
12672
12827
|
className
|
|
12673
12828
|
),
|
|
12674
12829
|
children: dateTimePickerPageData?.scheduleYourVisit
|
|
@@ -12682,55 +12837,105 @@ var BookingFormO2O = ({
|
|
|
12682
12837
|
isPodSelected && "grid-cols-2"
|
|
12683
12838
|
),
|
|
12684
12839
|
children: [
|
|
12685
|
-
/* @__PURE__ */ jsxs(
|
|
12686
|
-
|
|
12687
|
-
|
|
12688
|
-
|
|
12689
|
-
|
|
12690
|
-
|
|
12691
|
-
|
|
12692
|
-
|
|
12693
|
-
|
|
12694
|
-
|
|
12840
|
+
/* @__PURE__ */ jsxs(
|
|
12841
|
+
"section",
|
|
12842
|
+
{
|
|
12843
|
+
className: cn(
|
|
12844
|
+
"flex flex-col rounded-[16px] bg-white px-[32px] py-[24px] l:px-[16px] l:py-[20px]",
|
|
12845
|
+
// 双栏时左卡高度由右侧 POD 卡撑开(与下拉版一致),选项列表内部滚动,
|
|
12846
|
+
// 避免选项+说明过多把左卡撑得比右卡高;h-0 让本卡不参与 grid 行高计算
|
|
12847
|
+
isPodSelected && "min-l:h-0 min-l:min-h-full min-l:overflow-hidden"
|
|
12848
|
+
),
|
|
12849
|
+
children: [
|
|
12850
|
+
/* @__PURE__ */ jsx(
|
|
12851
|
+
"p",
|
|
12852
|
+
{
|
|
12853
|
+
id: "booking-purpose-label",
|
|
12854
|
+
className: "block text-[16px] font-bold text-[#080A0F] l:text-[14px]",
|
|
12855
|
+
children: getPurposeLabel(pageData)
|
|
12856
|
+
}
|
|
12857
|
+
),
|
|
12858
|
+
/* @__PURE__ */ jsx(
|
|
12859
|
+
"div",
|
|
12860
|
+
{
|
|
12861
|
+
role: "radiogroup",
|
|
12862
|
+
"aria-labelledby": "booking-purpose-label",
|
|
12863
|
+
className: cn(
|
|
12864
|
+
"mt-[14px] flex min-h-0 flex-col gap-[16px] overflow-y-auto pr-[4px]",
|
|
12865
|
+
// 仅桌面双栏时列表受右卡高度约束内部滚动;独占一行(未选 POD / 移动端)不限高
|
|
12866
|
+
isPodSelected && "min-l:flex-1"
|
|
12867
|
+
),
|
|
12868
|
+
children: purposeOptions.map((item, index) => {
|
|
12869
|
+
const isSelected = !!item.type && selectedPurpose?.type === item.type;
|
|
12870
|
+
const selectItem = () => {
|
|
12871
|
+
if (token) return;
|
|
12872
|
+
setSelectedPurposeType(item.type || "");
|
|
12873
|
+
setIsPurposeConfirmed(true);
|
|
12874
|
+
};
|
|
12875
|
+
return /* @__PURE__ */ jsxs(
|
|
12876
|
+
"div",
|
|
12877
|
+
{
|
|
12878
|
+
role: "radio",
|
|
12879
|
+
"aria-checked": isSelected,
|
|
12880
|
+
tabIndex: token ? -1 : 0,
|
|
12881
|
+
onClick: selectItem,
|
|
12882
|
+
onKeyDown: (event2) => {
|
|
12883
|
+
if (event2.key === "Enter" || event2.key === " ") {
|
|
12884
|
+
event2.preventDefault();
|
|
12885
|
+
selectItem();
|
|
12886
|
+
}
|
|
12887
|
+
},
|
|
12888
|
+
className: cn(
|
|
12889
|
+
"shrink-0 cursor-pointer overflow-hidden rounded-[8px] bg-[#F5F6F7] outline-none",
|
|
12890
|
+
token && "pointer-events-none cursor-not-allowed"
|
|
12891
|
+
),
|
|
12892
|
+
children: [
|
|
12893
|
+
/* @__PURE__ */ jsxs(
|
|
12894
|
+
"div",
|
|
12895
|
+
{
|
|
12896
|
+
className: cn(
|
|
12897
|
+
"group flex h-[60px] w-full items-center gap-[12px] px-[16px] text-left text-[16px] font-bold text-[#000F16] transition-[box-shadow,color] l:text-[14px]",
|
|
12898
|
+
isSelected ? "bg-[#93E0EC]" : "rounded-[8px] bg-white text-[#5A5E66] shadow-[inset_0_0_0_1px_#D9DCE1] hover:text-[#000F16] hover:shadow-[inset_0_0_0_1.6px_#00CBEB]"
|
|
12899
|
+
),
|
|
12900
|
+
children: [
|
|
12901
|
+
/* @__PURE__ */ jsx(
|
|
12902
|
+
"span",
|
|
12903
|
+
{
|
|
12904
|
+
className: cn(
|
|
12905
|
+
!isSelected && "text-[#D9DCE1] group-hover:text-[#00CBEB]"
|
|
12906
|
+
),
|
|
12907
|
+
children: isSelected ? /* @__PURE__ */ jsx(PurposeCheckedIcon, {}) : /* @__PURE__ */ jsx(PurposeRadioIcon, {})
|
|
12908
|
+
}
|
|
12909
|
+
),
|
|
12910
|
+
item.label || item.type
|
|
12911
|
+
]
|
|
12912
|
+
}
|
|
12913
|
+
),
|
|
12914
|
+
!!item.purposeNote && /* @__PURE__ */ jsx("p", { className: " px-[16px] py-[8px] text-[14px] font-medium leading-[1.35] text-[#080A0F] l:text-[13px]", children: item.purposeNote })
|
|
12915
|
+
]
|
|
12916
|
+
},
|
|
12917
|
+
`${item.type || item.label || "purpose"}-${index}`
|
|
12918
|
+
);
|
|
12919
|
+
})
|
|
12920
|
+
}
|
|
12921
|
+
)
|
|
12922
|
+
]
|
|
12923
|
+
}
|
|
12924
|
+
),
|
|
12925
|
+
isPodSelected && !!selectedPodContent && /* @__PURE__ */ jsxs("section", { className: "rounded-[16px] bg-white px-[28px] py-[20px] l:px-[16px] l:py-[20px]", children: [
|
|
12926
|
+
!!selectedPodContent.title && /* @__PURE__ */ jsx("h2", { className: "text-[16px] font-bold text-[#080A0F] l:text-[14px]", children: selectedPodContent.title }),
|
|
12927
|
+
!!selectedPodDescription && /* @__PURE__ */ jsx("p", { className: "mt-[6px] text-[13px] font-medium leading-[1.35] text-[#080A0F] l:text-[12px]", children: selectedPodDescription }),
|
|
12928
|
+
!!selectedPodImage && /* @__PURE__ */ jsxs("div", { className: "w-full rounded-[8px] flex mt-4 bg-[#F5F6F7] flex-col items-center justify-center", children: [
|
|
12695
12929
|
/* @__PURE__ */ jsx(
|
|
12696
|
-
"
|
|
12930
|
+
"img",
|
|
12697
12931
|
{
|
|
12698
|
-
|
|
12699
|
-
|
|
12700
|
-
|
|
12701
|
-
setSelectedPurposeType(event2.target.value);
|
|
12702
|
-
setIsPurposeConfirmed(true);
|
|
12703
|
-
},
|
|
12704
|
-
disabled: !!token,
|
|
12705
|
-
className: cn(
|
|
12706
|
-
"h-[48px] w-full appearance-none rounded-[8px] border border-[#D9DCE1] bg-white px-[16px] pr-[48px] text-[16px] font-medium text-[#2A2C32] outline-none transition-colors focus:border-[#080A0F] focus:ring-2 focus:ring-[#3ADB67]/30 l:text-[14px]",
|
|
12707
|
-
token && "pointer-events-none cursor-not-allowed opacity-50"
|
|
12708
|
-
),
|
|
12709
|
-
children: purposeOptions.map((item, index) => /* @__PURE__ */ jsx(
|
|
12710
|
-
"option",
|
|
12711
|
-
{
|
|
12712
|
-
value: item.type || "",
|
|
12713
|
-
children: item.label || item.type
|
|
12714
|
-
},
|
|
12715
|
-
`${item.type || item.label || "purpose"}-${index}`
|
|
12716
|
-
))
|
|
12932
|
+
src: selectedPodImage,
|
|
12933
|
+
alt: selectedPodContent.imageAlt || selectedPodContent.title || "",
|
|
12934
|
+
className: "mt-[12px] h-[220px] rounded-[8px] object-cover max-h-[360px]"
|
|
12717
12935
|
}
|
|
12718
12936
|
),
|
|
12719
|
-
/* @__PURE__ */ jsx("
|
|
12937
|
+
bookingDesign?.material && /* @__PURE__ */ jsx("div", { className: "mt-4 text-[16px] l:text-[14px] text-[#080A0F] font-bold mb-2", children: bookingDesign?.material })
|
|
12720
12938
|
] }),
|
|
12721
|
-
!!selectedPurpose?.purposeNote && /* @__PURE__ */ jsx("p", { className: "mt-[16px] max-w-[720px] text-[14px] font-medium leading-[1.35] text-[#080A0F] l:text-[13px]", children: selectedPurpose.purposeNote })
|
|
12722
|
-
] }),
|
|
12723
|
-
isPodSelected && !!selectedPodContent && /* @__PURE__ */ jsxs("section", { className: "rounded-[16px] bg-white px-[28px] py-[20px] l:px-[16px] l:py-[20px]", children: [
|
|
12724
|
-
!!selectedPodContent.title && /* @__PURE__ */ jsx("h2", { className: "text-[16px] font-bold text-[#080A0F] l:text-[14px]", children: selectedPodContent.title }),
|
|
12725
|
-
!!selectedPodDescription && /* @__PURE__ */ jsx("p", { className: "mt-[6px] text-[13px] font-medium leading-[1.35] text-[#080A0F] l:text-[12px]", children: selectedPodDescription }),
|
|
12726
|
-
!!selectedPodImage && /* @__PURE__ */ jsx(
|
|
12727
|
-
"img",
|
|
12728
|
-
{
|
|
12729
|
-
src: selectedPodImage,
|
|
12730
|
-
alt: selectedPodContent.imageAlt || selectedPodContent.title || "",
|
|
12731
|
-
className: "mt-[12px] h-[220px] rounded-[8px] object-cover max-h-[360px]"
|
|
12732
|
-
}
|
|
12733
|
-
),
|
|
12734
12939
|
!!selectedPodButtonText && (booking?.print_status === "unprinted" && booking?.design_project_id || !token) && /* @__PURE__ */ jsxs(
|
|
12735
12940
|
"a",
|
|
12736
12941
|
{
|
|
@@ -12742,17 +12947,35 @@ var BookingFormO2O = ({
|
|
|
12742
12947
|
},
|
|
12743
12948
|
rel: "noopener noreferrer",
|
|
12744
12949
|
className: cn(
|
|
12745
|
-
"mt-[
|
|
12746
|
-
isPodButtonDisabled && "pointer-events-none cursor-not-allowed opacity-50"
|
|
12950
|
+
"mt-[16px] h-[42px] inline-flex items-center border-2 justify-center gap-[6px] rounded-full px-[24px] text-[14px] font-bold transition-colors",
|
|
12951
|
+
isPodButtonDisabled && "pointer-events-none cursor-not-allowed opacity-50",
|
|
12952
|
+
isPodDesignEditMode ? "text-[#080A0F] border-[#080A0F]" : "text-white bg-[#080A0F] border-[#080A0F]"
|
|
12747
12953
|
),
|
|
12748
12954
|
children: [
|
|
12749
|
-
|
|
12750
|
-
"
|
|
12955
|
+
/* @__PURE__ */ jsxs(
|
|
12956
|
+
"svg",
|
|
12751
12957
|
{
|
|
12752
|
-
|
|
12753
|
-
|
|
12754
|
-
|
|
12755
|
-
|
|
12958
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
12959
|
+
width: "20",
|
|
12960
|
+
height: "20",
|
|
12961
|
+
viewBox: "0 0 20 20",
|
|
12962
|
+
fill: "none",
|
|
12963
|
+
children: [
|
|
12964
|
+
/* @__PURE__ */ jsx(
|
|
12965
|
+
"path",
|
|
12966
|
+
{
|
|
12967
|
+
d: "M17.0833 16.666C17.5436 16.666 17.9167 17.0391 17.9167 17.4993C17.9167 17.9596 17.5436 18.3327 17.0833 18.3327L2.91668 18.3327C2.45644 18.3327 2.08334 17.9596 2.08334 17.4993C2.08334 17.0391 2.45644 16.666 2.91668 16.666H17.0833Z",
|
|
12968
|
+
fill: "currentColor"
|
|
12969
|
+
}
|
|
12970
|
+
),
|
|
12971
|
+
/* @__PURE__ */ jsx(
|
|
12972
|
+
"path",
|
|
12973
|
+
{
|
|
12974
|
+
d: "M13.2064 1.66602C13.4274 1.66604 13.6393 1.75387 13.7956 1.91016L16.8392 4.9554C17.1645 5.28081 17.1645 5.80838 16.8392 6.13379L8.22185 14.7552C8.06556 14.9116 7.85292 14.9993 7.63185 14.9993L4.58334 14.9993C4.12311 14.9993 3.75001 14.6263 3.75001 14.166V11.133C3.75001 10.9122 3.83741 10.7 3.99334 10.5438L12.6164 1.91016L12.6774 1.85482C12.8257 1.7331 13.0128 1.66605 13.2064 1.66602ZM5.41668 11.4772V13.3327H7.28679L15.0716 5.54378L13.2064 3.67773L5.41668 11.4772Z",
|
|
12975
|
+
fill: "currentColor"
|
|
12976
|
+
}
|
|
12977
|
+
)
|
|
12978
|
+
]
|
|
12756
12979
|
}
|
|
12757
12980
|
),
|
|
12758
12981
|
selectedPodButtonText
|
|
@@ -12867,7 +13090,7 @@ var BookingSuccessO2O = ({
|
|
|
12867
13090
|
text-align: center;
|
|
12868
13091
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
12869
13092
|
}
|
|
12870
|
-
h2 { font-size: 24px; color: #
|
|
13093
|
+
h2 { font-size: 24px; color: #080A0F; margin: 0; }
|
|
12871
13094
|
p { font-size: 14px; color: #6B7280; margin: 8px 0 0; }
|
|
12872
13095
|
img { width: 200px; height: 200px; margin-top: 32px; }
|
|
12873
13096
|
`;
|
|
@@ -13022,7 +13245,29 @@ var BookingSuccessO2O = ({
|
|
|
13022
13245
|
return /* @__PURE__ */ jsx("div", { className: `min-h-screen l:py-0 l:px-0 py-12 px-6 ${className || ""}`, children: /* @__PURE__ */ jsxs("div", { className: "mx-auto", children: [
|
|
13023
13246
|
/* @__PURE__ */ jsx("h1", { className: "text-[48px] xxl:text-[32px] font-bold text-[#080A0F] mb-8 print:hidden", children: pageData.yourAppointment }),
|
|
13024
13247
|
isCancelled && !isStore && /* @__PURE__ */ jsxs("div", { className: "bg-white rounded-[16px] l:items-start l:p-3 p-6 mb-4 l:gap-2 flex l:flex-col items-center justify-between print:hidden", children: [
|
|
13025
|
-
/* @__PURE__ */
|
|
13248
|
+
/* @__PURE__ */ jsxs("p", { className: "text-base flex items-center gap-1 text-[#080A0F]", children: [
|
|
13249
|
+
/* @__PURE__ */ jsxs(
|
|
13250
|
+
"svg",
|
|
13251
|
+
{
|
|
13252
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
13253
|
+
width: "24",
|
|
13254
|
+
height: "24",
|
|
13255
|
+
viewBox: "0 0 24 24",
|
|
13256
|
+
fill: "none",
|
|
13257
|
+
children: [
|
|
13258
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10.5", fill: "#4A4C56" }),
|
|
13259
|
+
/* @__PURE__ */ jsx(
|
|
13260
|
+
"path",
|
|
13261
|
+
{
|
|
13262
|
+
d: "M11.998 15.2842C12.7436 15.2842 13.3486 15.8892 13.3486 16.6348C13.3484 17.3802 12.7435 17.9844 11.998 17.9844C11.2528 17.9842 10.6486 17.38 10.6484 16.6348C10.6484 15.8893 11.2526 15.2844 11.998 15.2842ZM11.998 6.00781C12.6194 6.00781 13.123 6.51149 13.123 7.13281V13.1328C13.123 13.7541 12.6194 14.2578 11.998 14.2578C11.3767 14.2578 10.873 13.7541 10.873 13.1328V7.13281C10.873 6.51149 11.3767 6.00781 11.998 6.00781Z",
|
|
13263
|
+
fill: "white"
|
|
13264
|
+
}
|
|
13265
|
+
)
|
|
13266
|
+
]
|
|
13267
|
+
}
|
|
13268
|
+
),
|
|
13269
|
+
pageData.appointmentCanceled
|
|
13270
|
+
] }),
|
|
13026
13271
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center l:gap-2 gap-4", children: [
|
|
13027
13272
|
!!pageData.contactUs && /* @__PURE__ */ jsx(
|
|
13028
13273
|
"a",
|
|
@@ -13038,7 +13283,7 @@ var BookingSuccessO2O = ({
|
|
|
13038
13283
|
"button",
|
|
13039
13284
|
{
|
|
13040
13285
|
onClick: () => onScheduleAgain(bookingData.demoroom_code),
|
|
13041
|
-
className: "text-[14px] cursor-pointer w-fit bg-black text-white rounded-full hover:bg-gray-800 border-2 border-[#080A0F] px-[20px] l:px-[12px] py-[10px] leading-[1] transition-colors",
|
|
13286
|
+
className: "text-[16px] l:text-[14px] cursor-pointer w-fit bg-black text-white rounded-full hover:bg-gray-800 border-2 border-[#080A0F] px-[20px] l:px-[12px] py-[14px] l:py-[10px] leading-[1] transition-colors",
|
|
13042
13287
|
children: pageData.scheduleAgain
|
|
13043
13288
|
}
|
|
13044
13289
|
)
|
|
@@ -13051,10 +13296,10 @@ var BookingSuccessO2O = ({
|
|
|
13051
13296
|
children: [
|
|
13052
13297
|
/* @__PURE__ */ jsxs("div", { className: "space-y-8 bg-white px-[48px] l:px-[16px] l:py-[16px] py-[32px] rounded-[16px] print:hidden", children: [
|
|
13053
13298
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
13054
|
-
/* @__PURE__ */ jsx("h2", { className: "text-[24px] l:text-[20px] text-[#
|
|
13299
|
+
/* @__PURE__ */ jsx("h2", { className: "text-[24px] l:text-[20px] text-[#080A0F] mb-3", children: pageData.location }),
|
|
13055
13300
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
13056
|
-
bookingData.demoroom_name && /* @__PURE__ */ jsx("p", { className: "text-base text-[#
|
|
13057
|
-
bookingData.address && /* @__PURE__ */ jsx("p", { className: "text-base text-
|
|
13301
|
+
bookingData.demoroom_name && /* @__PURE__ */ jsx("p", { className: "text-base text-[#080A0F]", children: bookingData.demoroom_name }),
|
|
13302
|
+
bookingData.address && /* @__PURE__ */ jsx("p", { className: "text-base text-[#080A0F]", children: bookingData.address }),
|
|
13058
13303
|
bookingData.latitude && bookingData.longitude && /* @__PURE__ */ jsx(
|
|
13059
13304
|
"a",
|
|
13060
13305
|
{
|
|
@@ -13068,26 +13313,26 @@ var BookingSuccessO2O = ({
|
|
|
13068
13313
|
] })
|
|
13069
13314
|
] }),
|
|
13070
13315
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
13071
|
-
/* @__PURE__ */ jsx("h2", { className: "text-[24px] l:text-[20px] text-[#
|
|
13072
|
-
/* @__PURE__ */ jsxs("p", { className: "text-base text-[#
|
|
13316
|
+
/* @__PURE__ */ jsx("h2", { className: "text-[24px] l:text-[20px] text-[#080A0F] mb-3", children: pageData.dateAndTime }),
|
|
13317
|
+
/* @__PURE__ */ jsxs("p", { className: "text-base text-[#080A0F]", children: [
|
|
13073
13318
|
bookingData.booking_date,
|
|
13074
13319
|
bookingData.time_slot && `, ${bookingData.time_slot}`,
|
|
13075
13320
|
!bookingData.time_slot && bookingData.booking_time && `, ${bookingData.booking_time}`
|
|
13076
13321
|
] })
|
|
13077
13322
|
] }),
|
|
13078
13323
|
bookingData.equipment && /* @__PURE__ */ jsxs("div", { children: [
|
|
13079
|
-
/* @__PURE__ */ jsx("h2", { className: "text-[24px] l:text-[20px] text-[#
|
|
13080
|
-
/* @__PURE__ */ jsx("p", { className: "text-base text-[#
|
|
13324
|
+
/* @__PURE__ */ jsx("h2", { className: "text-[24px] l:text-[20px] text-[#080A0F] mb-3", children: pageData.event }),
|
|
13325
|
+
/* @__PURE__ */ jsx("p", { className: "text-base text-[#080A0F]", children: Array.isArray(bookingData.equipment) ? bookingData.equipment.join(", ") : bookingData.equipment })
|
|
13081
13326
|
] }),
|
|
13082
13327
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
13083
|
-
/* @__PURE__ */ jsx("h2", { className: "text-[24px] l:text-[20px] text-[#
|
|
13084
|
-
/* @__PURE__ */ jsx("p", { className: "text-base text-[#
|
|
13328
|
+
/* @__PURE__ */ jsx("h2", { className: "text-[24px] l:text-[20px] text-[#080A0F] mb-3", children: pageData.demoRoom }),
|
|
13329
|
+
/* @__PURE__ */ jsx("p", { className: "text-base text-[#080A0F]", children: bookingData.demoroom_code })
|
|
13085
13330
|
] }),
|
|
13086
13331
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
13087
|
-
/* @__PURE__ */ jsx("h2", { className: "text-[24px] l:text-[20px] text-[#
|
|
13332
|
+
/* @__PURE__ */ jsx("h2", { className: "text-[24px] l:text-[20px] text-[#080A0F] mb-3", children: pageData.visitorInfo }),
|
|
13088
13333
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
13089
|
-
/* @__PURE__ */ jsx("p", { className: "text-base text-[#
|
|
13090
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-base text-
|
|
13334
|
+
/* @__PURE__ */ jsx("p", { className: "text-base text-[#080A0F]", children: bookingData.customer_name }),
|
|
13335
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-base text-[#080A0F]", children: [
|
|
13091
13336
|
/* @__PURE__ */ jsx(
|
|
13092
13337
|
"svg",
|
|
13093
13338
|
{
|
|
@@ -13112,7 +13357,7 @@ var BookingSuccessO2O = ({
|
|
|
13112
13357
|
bookingData.phone_number
|
|
13113
13358
|
] }) : /* @__PURE__ */ jsx("span", { children: pageData.noPhoneProvided })
|
|
13114
13359
|
] }),
|
|
13115
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-base text-
|
|
13360
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-base text-[#080A0F]", children: [
|
|
13116
13361
|
/* @__PURE__ */ jsx(
|
|
13117
13362
|
"svg",
|
|
13118
13363
|
{
|
|
@@ -13136,8 +13381,8 @@ var BookingSuccessO2O = ({
|
|
|
13136
13381
|
] })
|
|
13137
13382
|
] }),
|
|
13138
13383
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
13139
|
-
/* @__PURE__ */ jsx("h2", { className: "text-[24px] l:text-[20px] text-[#
|
|
13140
|
-
/* @__PURE__ */ jsx("p", { className: "text-base text-[#
|
|
13384
|
+
/* @__PURE__ */ jsx("h2", { className: "text-[24px] l:text-[20px] text-[#080A0F] mb-3", children: pageData.purposeOfVisit }),
|
|
13385
|
+
/* @__PURE__ */ jsx("p", { className: "text-base text-[#080A0F]", children: pageData?.purposeNote?.[bookingData?.business_type || ""] }),
|
|
13141
13386
|
!!bookingDesign && /* @__PURE__ */ jsxs("div", { className: "mt-4 bg-[#F5F5F5] rounded-[12px] px-6 py-5 flex items-center justify-between gap-4 l:flex-col l:items-start l:gap-3", children: [
|
|
13142
13387
|
/* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
|
|
13143
13388
|
/* @__PURE__ */ jsxs("h3", { className: "text-base font-medium text-[#080A0F]", children: [
|
|
@@ -13146,7 +13391,7 @@ var BookingSuccessO2O = ({
|
|
|
13146
13391
|
" ",
|
|
13147
13392
|
podDesignName
|
|
13148
13393
|
] }),
|
|
13149
|
-
bookingData?.print_status && pageData.podData?.status?.[bookingData.print_status] && /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-[#
|
|
13394
|
+
bookingData?.print_status && pageData.podData?.status?.[bookingData.print_status] && /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-[#080A0F]", children: pageData.podData.status[bookingData.print_status] })
|
|
13150
13395
|
] }),
|
|
13151
13396
|
podDesignImage && /* @__PURE__ */ jsx(
|
|
13152
13397
|
Image,
|
|
@@ -13160,7 +13405,7 @@ var BookingSuccessO2O = ({
|
|
|
13160
13405
|
] })
|
|
13161
13406
|
] }),
|
|
13162
13407
|
bookingData.business_type === "pod" && !isStore && !isCancelled && /* @__PURE__ */ jsxs("div", { className: "bg-white rounded-[16px] px-[48px] l:px-[16px] l:py-[16px] py-[32px] flex flex-col items-center justify-center text-center print:w-full", children: [
|
|
13163
|
-
/* @__PURE__ */ jsx("h2", { className: "text-[24px] l:text-[20px] text-[#
|
|
13408
|
+
/* @__PURE__ */ jsx("h2", { className: "text-[24px] l:text-[20px] text-[#080A0F] text-center", children: pageData.podData?.QRCodeTitle }),
|
|
13164
13409
|
/* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500 text-center mt-2", children: pageData.podData?.QRCodeSubTitle }),
|
|
13165
13410
|
/* @__PURE__ */ jsx(
|
|
13166
13411
|
"div",
|
|
@@ -13181,7 +13426,7 @@ var BookingSuccessO2O = ({
|
|
|
13181
13426
|
"button",
|
|
13182
13427
|
{
|
|
13183
13428
|
onClick: () => onAddToWallet?.(bookingData),
|
|
13184
|
-
className: "text-[14px] cursor-pointer w-fit rounded-full text-[#080A0F] border-2 border-[#080A0F] px-[20px]
|
|
13429
|
+
className: "text-[16px] l:text-[14px] py-[14px] l:py-[10px] cursor-pointer w-fit rounded-full text-[#080A0F] border-2 border-[#080A0F] px-[20px] leading-[1] hover:bg-gray-50 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
13185
13430
|
children: pageData.podData?.btnToWallet
|
|
13186
13431
|
}
|
|
13187
13432
|
),
|
|
@@ -13189,7 +13434,7 @@ var BookingSuccessO2O = ({
|
|
|
13189
13434
|
"button",
|
|
13190
13435
|
{
|
|
13191
13436
|
onClick: handlePrintQRCode,
|
|
13192
|
-
className: "text-[14px] cursor-pointer w-fit rounded-full text-[#080A0F] border-2 border-[#080A0F] px-[20px]
|
|
13437
|
+
className: "text-[16px] l:text-[14px] py-[14px] l:py-[10px] cursor-pointer w-fit rounded-full text-[#080A0F] border-2 border-[#080A0F] px-[20px] leading-[1] hover:bg-gray-50 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
13193
13438
|
children: pageData.podData?.btnToPrint
|
|
13194
13439
|
}
|
|
13195
13440
|
)
|
|
@@ -13198,8 +13443,8 @@ var BookingSuccessO2O = ({
|
|
|
13198
13443
|
]
|
|
13199
13444
|
}
|
|
13200
13445
|
),
|
|
13201
|
-
isPending && !isCancelled && !isStore && /* @__PURE__ */ jsxs("div", { className: "mt-[64px] pb-4 print:hidden", children: [
|
|
13202
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ jsxs("div", { className: "flex md:w-full gap-4
|
|
13446
|
+
isPending && !isCancelled && !isStore && /* @__PURE__ */ jsxs("div", { className: "mt-[64px] l:mt-[32px] pb-4 print:hidden", children: [
|
|
13447
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ jsxs("div", { className: "flex md:w-full gap-4", children: [
|
|
13203
13448
|
onEditBooking && token && /* @__PURE__ */ jsx(
|
|
13204
13449
|
"button",
|
|
13205
13450
|
{
|
|
@@ -13208,7 +13453,7 @@ var BookingSuccessO2O = ({
|
|
|
13208
13453
|
bookingData.demoroom_code,
|
|
13209
13454
|
bookingData.business_type
|
|
13210
13455
|
),
|
|
13211
|
-
className: "text-[14px] cursor-pointer w-fit bg-black text-white rounded-full hover:bg-gray-800 border-2 border-[#080A0F] l:px-[12px] px-[20px]
|
|
13456
|
+
className: "text-[16px] l:text-[14px] py-[14px] l:py-[10px] cursor-pointer w-fit bg-black text-white rounded-full hover:bg-gray-800 border-2 border-[#080A0F] l:px-[12px] px-[20px] leading-[1] transition-colors",
|
|
13212
13457
|
children: pageData.editAppointment
|
|
13213
13458
|
}
|
|
13214
13459
|
),
|
|
@@ -13217,56 +13462,56 @@ var BookingSuccessO2O = ({
|
|
|
13217
13462
|
{
|
|
13218
13463
|
onClick: () => setShowCancelDialog(true),
|
|
13219
13464
|
disabled: cancelLoading,
|
|
13220
|
-
className: "text-[14px] cursor-pointer w-fit rounded-full text-[#080A0F] border-2 border-[#080A0F] px-[20px] l:px-[12px]
|
|
13465
|
+
className: "text-[16px] l:text-[14px] py-[14px] l:py-[10px] cursor-pointer w-fit rounded-full text-[#080A0F] border-2 border-[#080A0F] px-[20px] l:px-[12px] leading-[1] hover:bg-gray-50 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
13221
13466
|
children: pageData.cancelAppointment
|
|
13222
13467
|
}
|
|
13223
13468
|
)
|
|
13224
13469
|
] }) }),
|
|
13225
13470
|
cancelError && /* @__PURE__ */ jsx("p", { className: "text-sm mt-2", style: { color: "#FF4D4D" }, children: cancelError })
|
|
13226
13471
|
] }),
|
|
13227
|
-
isStore && bookingData?.print_status === "completed" && /* @__PURE__ */ jsxs("div", { className: "mt-[64px] pb-4 print:hidden", children: [
|
|
13472
|
+
isStore && bookingData?.print_status === "completed" && /* @__PURE__ */ jsxs("div", { className: "mt-[64px] l:mt-[32px] pb-4 print:hidden", children: [
|
|
13228
13473
|
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ jsx(
|
|
13229
13474
|
"button",
|
|
13230
13475
|
{
|
|
13231
13476
|
onClick: handleCheckin,
|
|
13232
13477
|
disabled: checkinLoading,
|
|
13233
|
-
className: "text-[14px] cursor-pointer w-fit rounded-full text-[#080A0F] border-2 border-[#080A0F] px-[20px] l:px-[12px]
|
|
13478
|
+
className: "text-[16px] l:text-[14px] py-[14px] l:py-[10px] cursor-pointer w-fit rounded-full text-[#080A0F] border-2 border-[#080A0F] px-[20px] l:px-[12px] leading-[1] hover:bg-gray-50 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
13234
13479
|
children: pageData.changeStatusButton || "Change Pickup Status"
|
|
13235
13480
|
}
|
|
13236
13481
|
) }),
|
|
13237
13482
|
checkinError && /* @__PURE__ */ jsx("p", { className: "text-sm mt-2", style: { color: "#FF4D4D" }, children: checkinError })
|
|
13238
13483
|
] }),
|
|
13239
|
-
showCancelDialog && /* @__PURE__ */ jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 px-4 print:hidden", children: /* @__PURE__ */ jsxs("div", { className: "bg-white rounded-[24px] max-w-[600px] p-
|
|
13484
|
+
showCancelDialog && /* @__PURE__ */ jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 px-4 print:hidden", children: /* @__PURE__ */ jsxs("div", { className: "bg-white rounded-[24px] l:rounded-[16px] max-w-[600px] md:w-[90vw] p-4 shadow-xl relative", children: [
|
|
13240
13485
|
/* @__PURE__ */ jsx(
|
|
13241
13486
|
"button",
|
|
13242
13487
|
{
|
|
13243
13488
|
onClick: () => setShowCancelDialog(false),
|
|
13244
13489
|
disabled: cancelLoading,
|
|
13245
|
-
className: "absolute top-
|
|
13490
|
+
className: "absolute top-4 right-[16px] w-8 h-8 flex items-center justify-center text-gray-400 hover:text-[#080A0F] transition-colors disabled:opacity-50",
|
|
13246
13491
|
"aria-label": "Close",
|
|
13247
|
-
children: /* @__PURE__ */
|
|
13492
|
+
children: /* @__PURE__ */ jsxs(
|
|
13248
13493
|
"svg",
|
|
13249
13494
|
{
|
|
13495
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
13250
13496
|
width: "24",
|
|
13251
13497
|
height: "24",
|
|
13252
13498
|
viewBox: "0 0 24 24",
|
|
13253
13499
|
fill: "none",
|
|
13254
|
-
|
|
13255
|
-
|
|
13256
|
-
|
|
13257
|
-
|
|
13258
|
-
|
|
13259
|
-
|
|
13260
|
-
|
|
13261
|
-
|
|
13262
|
-
|
|
13263
|
-
|
|
13264
|
-
)
|
|
13500
|
+
children: [
|
|
13501
|
+
/* @__PURE__ */ jsx("g", { clipPath: "url(#clip0_609_103733)", children: /* @__PURE__ */ jsx(
|
|
13502
|
+
"path",
|
|
13503
|
+
{
|
|
13504
|
+
d: "M5.63545 5.63604C6.02592 5.24546 6.65913 5.24551 7.04966 5.63604L11.9994 10.5858L16.9492 5.63604C17.3397 5.24551 17.9729 5.24546 18.3634 5.63604C18.7538 6.02659 18.7538 6.65972 18.3634 7.05025L13.4136 12L18.3634 16.9497C18.7538 17.3403 18.7538 17.9734 18.3634 18.364C17.9729 18.7545 17.3397 18.7545 16.9492 18.364L11.9994 13.4142L7.04966 18.364C6.65913 18.7545 6.02592 18.7545 5.63545 18.364C5.24501 17.9734 5.24502 17.3403 5.63545 16.9497L10.5852 12L5.63545 7.05025C5.24502 6.65972 5.24501 6.02659 5.63545 5.63604Z",
|
|
13505
|
+
fill: "#080A0F"
|
|
13506
|
+
}
|
|
13507
|
+
) }),
|
|
13508
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "clip0_609_103733", children: /* @__PURE__ */ jsx("rect", { width: "24", height: "24", fill: "white" }) }) })
|
|
13509
|
+
]
|
|
13265
13510
|
}
|
|
13266
13511
|
)
|
|
13267
13512
|
}
|
|
13268
13513
|
),
|
|
13269
|
-
/* @__PURE__ */ jsx("div", { className: "flex justify-center mb-6", children: /* @__PURE__ */ jsx("div", { className: "w-
|
|
13514
|
+
/* @__PURE__ */ jsx("div", { className: "flex justify-center mt-12 mb-6", children: /* @__PURE__ */ jsx("div", { className: "w-[24px] h-[24px] rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsxs(
|
|
13270
13515
|
"svg",
|
|
13271
13516
|
{
|
|
13272
13517
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -13286,9 +13531,9 @@ var BookingSuccessO2O = ({
|
|
|
13286
13531
|
]
|
|
13287
13532
|
}
|
|
13288
13533
|
) }) }),
|
|
13289
|
-
/* @__PURE__ */ jsxs("div", { className: "text-center mb-8", children: [
|
|
13290
|
-
/* @__PURE__ */ jsx("h3", { className: "text-[
|
|
13291
|
-
/* @__PURE__ */ jsx("p", { className: "text-[14px] text-
|
|
13534
|
+
/* @__PURE__ */ jsxs("div", { className: "text-center max-w-[80%] mb-8 mx-auto", children: [
|
|
13535
|
+
/* @__PURE__ */ jsx("h3", { className: "text-[16px] leading-[1.4] text-[#333] mb-2", children: pageData.cancelDialog?.title }),
|
|
13536
|
+
pageData.cancelDialog?.description && /* @__PURE__ */ jsx("p", { className: "text-[14px] leading-[1.4] text-[#333]", children: pageData.cancelDialog?.description })
|
|
13292
13537
|
] }),
|
|
13293
13538
|
/* @__PURE__ */ jsxs("div", { className: "flex gap-3 justify-center", children: [
|
|
13294
13539
|
/* @__PURE__ */ jsx(
|
|
@@ -13296,7 +13541,7 @@ var BookingSuccessO2O = ({
|
|
|
13296
13541
|
{
|
|
13297
13542
|
onClick: () => setShowCancelDialog(false),
|
|
13298
13543
|
disabled: cancelLoading,
|
|
13299
|
-
className: "
|
|
13544
|
+
className: "text-[16px] l:text-[14px] py-[14px] l:py-[10px] px-4 leading-[1.1] border-2 border-black rounded-full text-black hover:bg-gray-50 transition-colors disabled:opacity-50",
|
|
13300
13545
|
children: pageData.cancelDialog?.backButton
|
|
13301
13546
|
}
|
|
13302
13547
|
),
|
|
@@ -13305,7 +13550,7 @@ var BookingSuccessO2O = ({
|
|
|
13305
13550
|
{
|
|
13306
13551
|
onClick: handleCancelAppointment,
|
|
13307
13552
|
disabled: cancelLoading,
|
|
13308
|
-
className: "px-
|
|
13553
|
+
className: "text-[16px] l:text-[14px] px-4 py-[14px] l:py-[10px] leading-[1.1] bg-black text-white rounded-full hover:bg-gray-800 transition-colors disabled:opacity-50 flex items-center gap-2 min-w-[180px] justify-center",
|
|
13309
13554
|
children: cancelLoading ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
13310
13555
|
/* @__PURE__ */ jsxs(
|
|
13311
13556
|
"svg",
|