@anker-in/ui 0.3.2 → 0.3.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/index.d.mts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +133 -42
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +133 -42
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -611,6 +611,9 @@ interface BookingFormPageData {
|
|
|
611
611
|
emailDescription?: string;
|
|
612
612
|
dealsType?: string;
|
|
613
613
|
agrees?: string[];
|
|
614
|
+
errorMsg?: {
|
|
615
|
+
[key: string]: string;
|
|
616
|
+
};
|
|
614
617
|
};
|
|
615
618
|
}
|
|
616
619
|
/**
|
|
@@ -645,6 +648,8 @@ interface BookingSuccessPageData {
|
|
|
645
648
|
* 活动标题
|
|
646
649
|
*/
|
|
647
650
|
event?: string;
|
|
651
|
+
contactUs?: string;
|
|
652
|
+
contactUsLink?: string;
|
|
648
653
|
/**
|
|
649
654
|
* Demo Room 标题
|
|
650
655
|
*/
|
|
@@ -665,6 +670,10 @@ interface BookingSuccessPageData {
|
|
|
665
670
|
* 取消预约按钮
|
|
666
671
|
*/
|
|
667
672
|
cancelAppointment?: string;
|
|
673
|
+
/**
|
|
674
|
+
* 改变领取状态按钮(门店店员身份时显示)
|
|
675
|
+
*/
|
|
676
|
+
changeStatusButton?: string;
|
|
668
677
|
/**
|
|
669
678
|
* 编辑预约按钮
|
|
670
679
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -611,6 +611,9 @@ interface BookingFormPageData {
|
|
|
611
611
|
emailDescription?: string;
|
|
612
612
|
dealsType?: string;
|
|
613
613
|
agrees?: string[];
|
|
614
|
+
errorMsg?: {
|
|
615
|
+
[key: string]: string;
|
|
616
|
+
};
|
|
614
617
|
};
|
|
615
618
|
}
|
|
616
619
|
/**
|
|
@@ -645,6 +648,8 @@ interface BookingSuccessPageData {
|
|
|
645
648
|
* 活动标题
|
|
646
649
|
*/
|
|
647
650
|
event?: string;
|
|
651
|
+
contactUs?: string;
|
|
652
|
+
contactUsLink?: string;
|
|
648
653
|
/**
|
|
649
654
|
* Demo Room 标题
|
|
650
655
|
*/
|
|
@@ -665,6 +670,10 @@ interface BookingSuccessPageData {
|
|
|
665
670
|
* 取消预约按钮
|
|
666
671
|
*/
|
|
667
672
|
cancelAppointment?: string;
|
|
673
|
+
/**
|
|
674
|
+
* 改变领取状态按钮(门店店员身份时显示)
|
|
675
|
+
*/
|
|
676
|
+
changeStatusButton?: string;
|
|
668
677
|
/**
|
|
669
678
|
* 编辑预约按钮
|
|
670
679
|
*/
|
package/dist/index.js
CHANGED
|
@@ -10867,7 +10867,9 @@ var QuestionnaireForm2 = ({
|
|
|
10867
10867
|
error,
|
|
10868
10868
|
initialResponses
|
|
10869
10869
|
}) => {
|
|
10870
|
-
const [responses, setResponses] = React15.useState(
|
|
10870
|
+
const [responses, setResponses] = React15.useState(
|
|
10871
|
+
() => initialResponses || {}
|
|
10872
|
+
);
|
|
10871
10873
|
const [errors, setErrors] = React15.useState({});
|
|
10872
10874
|
const [agreements, setAgreements] = React15.useState({});
|
|
10873
10875
|
const [agreementError, setAgreementError] = React15.useState("");
|
|
@@ -10889,8 +10891,12 @@ var QuestionnaireForm2 = ({
|
|
|
10889
10891
|
});
|
|
10890
10892
|
return seeded;
|
|
10891
10893
|
});
|
|
10892
|
-
const prevHasBookedBeforeRef = React15.useRef(
|
|
10893
|
-
|
|
10894
|
+
const prevHasBookedBeforeRef = React15.useRef(
|
|
10895
|
+
initialResponses?.["has_booked_before"] === "option2"
|
|
10896
|
+
);
|
|
10897
|
+
const hasBookedBeforeInitialized = React15.useRef(
|
|
10898
|
+
!!initialResponses?.["has_booked_before"]
|
|
10899
|
+
);
|
|
10894
10900
|
const hasBookedBeforeQuestion = questions.find(
|
|
10895
10901
|
(q) => (q.key || q.id) === "has_booked_before"
|
|
10896
10902
|
);
|
|
@@ -10908,6 +10914,7 @@ var QuestionnaireForm2 = ({
|
|
|
10908
10914
|
return true;
|
|
10909
10915
|
});
|
|
10910
10916
|
}, [questions, hasBookedBefore]);
|
|
10917
|
+
console.log(error, pageData);
|
|
10911
10918
|
React15.useEffect(() => {
|
|
10912
10919
|
if (hasBookedBeforeInitialized.current) return;
|
|
10913
10920
|
if (hasBookedBeforeQuestion && hasBookedBeforeQuestionId) {
|
|
@@ -11060,7 +11067,9 @@ var QuestionnaireForm2 = ({
|
|
|
11060
11067
|
onSubmit?.(finalResponses);
|
|
11061
11068
|
} else {
|
|
11062
11069
|
setTimeout(() => {
|
|
11063
|
-
const firstErrorElement = document.querySelector(
|
|
11070
|
+
const firstErrorElement = document.querySelector(
|
|
11071
|
+
'[data-has-error="true"]'
|
|
11072
|
+
);
|
|
11064
11073
|
if (firstErrorElement) {
|
|
11065
11074
|
firstErrorElement.scrollIntoView({
|
|
11066
11075
|
behavior: "smooth",
|
|
@@ -11416,7 +11425,7 @@ var QuestionnaireForm2 = ({
|
|
|
11416
11425
|
children: loading ? pageData?.submitting || "Submitting..." : pageData?.submit || "Submit Booking"
|
|
11417
11426
|
}
|
|
11418
11427
|
),
|
|
11419
|
-
error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center w-full p-4", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[#FF4D4D] font-bold", children: error.message }) })
|
|
11428
|
+
error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center w-full p-4", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[#FF4D4D] font-bold", children: pageData?.errorMsg?.[String(error.code)] || pageData?.errorMsg?.[error.code || ""] || error.message }) })
|
|
11420
11429
|
] })
|
|
11421
11430
|
] });
|
|
11422
11431
|
};
|
|
@@ -11578,22 +11587,34 @@ var DateTimePicker2 = ({
|
|
|
11578
11587
|
return `${start} - ${end}`;
|
|
11579
11588
|
};
|
|
11580
11589
|
React15.useEffect(() => {
|
|
11581
|
-
if (!booking
|
|
11590
|
+
if (!booking?.booking_date) return;
|
|
11591
|
+
setSelectedDate(dayjs4__default.default(booking.booking_date));
|
|
11592
|
+
setCalendarValue(dayjs4__default.default(booking.booking_date));
|
|
11593
|
+
setIsInitialized(true);
|
|
11594
|
+
if (booking.timeslot_id) {
|
|
11595
|
+
setSelectedTimeslotId(booking.timeslot_id);
|
|
11596
|
+
setHasResolvedBookingSlot(true);
|
|
11597
|
+
}
|
|
11598
|
+
}, [booking?.booking_date, booking?.timeslot_id]);
|
|
11599
|
+
React15.useEffect(() => {
|
|
11600
|
+
if (!booking || hasResolvedBookingSlot || !dayTimeslots.length) return;
|
|
11582
11601
|
if (booking.timeslot_id) {
|
|
11583
11602
|
setSelectedTimeslotId(booking.timeslot_id);
|
|
11584
11603
|
setHasResolvedBookingSlot(true);
|
|
11585
11604
|
return;
|
|
11586
11605
|
}
|
|
11587
|
-
if (booking.time_slot)
|
|
11588
|
-
|
|
11589
|
-
|
|
11590
|
-
|
|
11591
|
-
|
|
11592
|
-
|
|
11593
|
-
|
|
11594
|
-
|
|
11606
|
+
if (!booking.time_slot) return;
|
|
11607
|
+
const tz = demoRoom?.timezone || timezone5;
|
|
11608
|
+
const target = booking.time_slot.replace(/\s+/g, "");
|
|
11609
|
+
const match = dayTimeslots.find((slot) => {
|
|
11610
|
+
const toHm = (iso) => (tz ? dayjs4__default.default(iso).tz(tz) : dayjs4__default.default(iso)).format("HH:mm");
|
|
11611
|
+
return `${toHm(slot.start_time)}-${toHm(slot.end_time)}` === target;
|
|
11612
|
+
});
|
|
11613
|
+
if (match) {
|
|
11614
|
+
setSelectedTimeslotId(match.id);
|
|
11615
|
+
setHasResolvedBookingSlot(true);
|
|
11595
11616
|
}
|
|
11596
|
-
}, [booking,
|
|
11617
|
+
}, [booking, dayTimeslots, hasResolvedBookingSlot, demoRoom?.timezone, timezone5]);
|
|
11597
11618
|
const initialResponses = React15.useMemo(() => {
|
|
11598
11619
|
if (!booking) return void 0;
|
|
11599
11620
|
return {
|
|
@@ -12648,7 +12669,7 @@ var BookingFormO2O = ({
|
|
|
12648
12669
|
className: "mt-[12px] h-[220px] rounded-[8px] object-cover l:h-auto"
|
|
12649
12670
|
}
|
|
12650
12671
|
),
|
|
12651
|
-
!!selectedPodButtonText && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12672
|
+
!!selectedPodButtonText && (booking?.print_status === "unprinted" && booking?.design_project_id || !token) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12652
12673
|
"a",
|
|
12653
12674
|
{
|
|
12654
12675
|
href: selectedPodButtonLink || "#",
|
|
@@ -12747,10 +12768,14 @@ var BookingSuccessO2O = ({
|
|
|
12747
12768
|
const [loading, setLoading] = React15.useState(false);
|
|
12748
12769
|
const [bookingDesign, setBookingDesign] = React15.useState(null);
|
|
12749
12770
|
const [isCancelled, setIsCancelled] = React15.useState(false);
|
|
12771
|
+
const [isPending, setIsPending] = React15.useState(false);
|
|
12750
12772
|
const [showCancelDialog, setShowCancelDialog] = React15.useState(false);
|
|
12751
12773
|
const [cancelLoading, setCancelLoading] = React15.useState(false);
|
|
12752
12774
|
const [cancelError, setCancelError] = React15.useState(null);
|
|
12775
|
+
const [checkinLoading, setCheckinLoading] = React15.useState(false);
|
|
12776
|
+
const [checkinError, setCheckinError] = React15.useState(null);
|
|
12753
12777
|
const qrCodeContainerRef = React15.useRef(null);
|
|
12778
|
+
const isStore = Boolean(isStoreUser);
|
|
12754
12779
|
const handlePrintQRCode = () => {
|
|
12755
12780
|
const canvas = qrCodeContainerRef.current?.querySelector("canvas");
|
|
12756
12781
|
const qrImageSrc = canvas?.toDataURL("image/png");
|
|
@@ -12788,16 +12813,30 @@ var BookingSuccessO2O = ({
|
|
|
12788
12813
|
const subtitle = iframeDoc.createElement("p");
|
|
12789
12814
|
subtitle.textContent = pageData.podData?.QRCodeSubTitle || "";
|
|
12790
12815
|
const image = iframeDoc.createElement("img");
|
|
12791
|
-
image.src = qrImageSrc;
|
|
12792
12816
|
image.alt = "QR Code";
|
|
12793
12817
|
iframeDoc.body.appendChild(title);
|
|
12794
12818
|
iframeDoc.body.appendChild(subtitle);
|
|
12795
12819
|
iframeDoc.body.appendChild(image);
|
|
12796
|
-
|
|
12797
|
-
|
|
12798
|
-
|
|
12799
|
-
|
|
12800
|
-
|
|
12820
|
+
const doPrint = () => {
|
|
12821
|
+
iframe.contentWindow?.focus();
|
|
12822
|
+
iframe.contentWindow?.print();
|
|
12823
|
+
setTimeout(() => {
|
|
12824
|
+
document.body.removeChild(iframe);
|
|
12825
|
+
}, 1e3);
|
|
12826
|
+
};
|
|
12827
|
+
let printed = false;
|
|
12828
|
+
const triggerPrintOnce = () => {
|
|
12829
|
+
if (printed) return;
|
|
12830
|
+
printed = true;
|
|
12831
|
+
doPrint();
|
|
12832
|
+
};
|
|
12833
|
+
image.onload = triggerPrintOnce;
|
|
12834
|
+
image.onerror = triggerPrintOnce;
|
|
12835
|
+
setTimeout(triggerPrintOnce, 1500);
|
|
12836
|
+
image.src = qrImageSrc;
|
|
12837
|
+
if (image.complete) {
|
|
12838
|
+
triggerPrintOnce();
|
|
12839
|
+
}
|
|
12801
12840
|
};
|
|
12802
12841
|
React15.useEffect(() => {
|
|
12803
12842
|
if (token && apiConfig && !initialBookingData) {
|
|
@@ -12808,6 +12847,7 @@ var BookingSuccessO2O = ({
|
|
|
12808
12847
|
const booking = await apiClient.getBooking(token, apiConfig.locale);
|
|
12809
12848
|
setBookingData(booking);
|
|
12810
12849
|
setIsCancelled(booking.status === "cancelled");
|
|
12850
|
+
setIsPending(booking.status === "pending");
|
|
12811
12851
|
} catch (err) {
|
|
12812
12852
|
console.error("Failed to fetch booking data:", err);
|
|
12813
12853
|
} finally {
|
|
@@ -12871,6 +12911,33 @@ var BookingSuccessO2O = ({
|
|
|
12871
12911
|
setCancelLoading(false);
|
|
12872
12912
|
}
|
|
12873
12913
|
};
|
|
12914
|
+
const handleCheckin = async () => {
|
|
12915
|
+
if (!token || !apiConfig) {
|
|
12916
|
+
setCheckinError(
|
|
12917
|
+
pageData.cancelError || "Unable to check in: Missing token or API configuration"
|
|
12918
|
+
);
|
|
12919
|
+
return;
|
|
12920
|
+
}
|
|
12921
|
+
setCheckinLoading(true);
|
|
12922
|
+
setCheckinError(null);
|
|
12923
|
+
try {
|
|
12924
|
+
const apiClient = createDemoRoomApi(apiConfig);
|
|
12925
|
+
const checkedInBooking = await apiClient.checkinBooking({
|
|
12926
|
+
booking_token: token
|
|
12927
|
+
});
|
|
12928
|
+
if (checkedInBooking) {
|
|
12929
|
+
setBookingData(checkedInBooking);
|
|
12930
|
+
window.location.reload();
|
|
12931
|
+
}
|
|
12932
|
+
} catch (err) {
|
|
12933
|
+
console.error("Failed to check in booking:", err);
|
|
12934
|
+
setCheckinError(
|
|
12935
|
+
pageData.cancelError || "Failed to check in. Please try again."
|
|
12936
|
+
);
|
|
12937
|
+
} finally {
|
|
12938
|
+
setCheckinLoading(false);
|
|
12939
|
+
}
|
|
12940
|
+
};
|
|
12874
12941
|
if (loading) {
|
|
12875
12942
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `min-h-screen py-12 px-6 ${className || ""}`, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "animate-pulse space-y-6", children: [
|
|
12876
12943
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-8 bg-gray-200 rounded w-1/3" }),
|
|
@@ -12890,21 +12957,33 @@ var BookingSuccessO2O = ({
|
|
|
12890
12957
|
bookingDesign?.order_code;
|
|
12891
12958
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `min-h-screen l:py-0 l:px-0 py-12 px-6 ${className || ""}`, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mx-auto", children: [
|
|
12892
12959
|
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-[48px] xxl:text-[32px] font-bold text-[#080A0F] mb-8 print:hidden", children: pageData.yourAppointment }),
|
|
12893
|
-
isCancelled && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-white rounded-[16px] l:items-start p-6 mb-4 l:gap-2 flex l:flex-col items-center justify-between print:hidden", children: [
|
|
12960
|
+
isCancelled && !isStore && /* @__PURE__ */ jsxRuntime.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: [
|
|
12894
12961
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base text-[#080A0F]", children: pageData.appointmentCanceled }),
|
|
12895
|
-
|
|
12896
|
-
|
|
12897
|
-
|
|
12898
|
-
|
|
12899
|
-
|
|
12900
|
-
|
|
12901
|
-
|
|
12902
|
-
|
|
12962
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center l:gap-2 gap-4", children: [
|
|
12963
|
+
!!pageData.contactUs && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12964
|
+
"a",
|
|
12965
|
+
{
|
|
12966
|
+
href: pageData?.contactUsLink,
|
|
12967
|
+
target: "_blank",
|
|
12968
|
+
className: "text-[14px] cursor-pointer w-fit rounded-full text-[#080A0F] border-2 border-[#080A0F] px-[20px] l:px-[12px] py-[10px] leading-[1] hover:bg-gray-50 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
12969
|
+
rel: "noreferrer",
|
|
12970
|
+
children: pageData.contactUs
|
|
12971
|
+
}
|
|
12972
|
+
),
|
|
12973
|
+
onScheduleAgain && bookingData && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12974
|
+
"button",
|
|
12975
|
+
{
|
|
12976
|
+
onClick: () => onScheduleAgain(bookingData.demoroom_code),
|
|
12977
|
+
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",
|
|
12978
|
+
children: pageData.scheduleAgain
|
|
12979
|
+
}
|
|
12980
|
+
)
|
|
12981
|
+
] })
|
|
12903
12982
|
] }),
|
|
12904
12983
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
12905
12984
|
"div",
|
|
12906
12985
|
{
|
|
12907
|
-
className: bookingData.business_type === "pod" ? "grid grid-cols-2 gap-[16px] l:grid-cols-1 print:grid-cols-1" : "",
|
|
12986
|
+
className: bookingData.business_type === "pod" && !isCancelled && !isStore ? "grid grid-cols-2 gap-[16px] l:grid-cols-1 print:grid-cols-1" : "",
|
|
12908
12987
|
children: [
|
|
12909
12988
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-8 bg-white px-[48px] l:px-[16px] l:py-[16px] py-[32px] rounded-[16px] print:hidden", children: [
|
|
12910
12989
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
@@ -13016,7 +13095,7 @@ var BookingSuccessO2O = ({
|
|
|
13016
13095
|
] })
|
|
13017
13096
|
] })
|
|
13018
13097
|
] }),
|
|
13019
|
-
bookingData.business_type === "pod" && /* @__PURE__ */ jsxRuntime.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: [
|
|
13098
|
+
bookingData.business_type === "pod" && !isStore && !isCancelled && /* @__PURE__ */ jsxRuntime.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: [
|
|
13020
13099
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-[24px] l:text-[20px] text-[#4A4C56] text-center", children: pageData.podData?.QRCodeTitle }),
|
|
13021
13100
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-gray-500 text-center mt-2", children: pageData.podData?.QRCodeSubTitle }),
|
|
13022
13101
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -13034,19 +13113,19 @@ var BookingSuccessO2O = ({
|
|
|
13034
13113
|
}
|
|
13035
13114
|
),
|
|
13036
13115
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-center gap-3 mt-6 print:hidden", children: [
|
|
13037
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13116
|
+
!!pageData.podData?.btnToWallet && /* @__PURE__ */ jsxRuntime.jsx(
|
|
13038
13117
|
"button",
|
|
13039
13118
|
{
|
|
13040
13119
|
onClick: () => onAddToWallet?.(bookingData),
|
|
13041
|
-
className: "rounded-full border-2 border-[#080A0F] px-[20px] py-[10px]
|
|
13120
|
+
className: "text-[14px] cursor-pointer w-fit rounded-full text-[#080A0F] border-2 border-[#080A0F] px-[20px] py-[10px] leading-[1] hover:bg-gray-50 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
13042
13121
|
children: pageData.podData?.btnToWallet
|
|
13043
13122
|
}
|
|
13044
13123
|
),
|
|
13045
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13124
|
+
!!pageData.podData?.btnToPrint && /* @__PURE__ */ jsxRuntime.jsx(
|
|
13046
13125
|
"button",
|
|
13047
13126
|
{
|
|
13048
13127
|
onClick: handlePrintQRCode,
|
|
13049
|
-
className: "rounded-full border-2 border-[#080A0F] px-[20px] py-[10px]
|
|
13128
|
+
className: "text-[14px] cursor-pointer w-fit rounded-full text-[#080A0F] border-2 border-[#080A0F] px-[20px] py-[10px] leading-[1] hover:bg-gray-50 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
13050
13129
|
children: pageData.podData?.btnToPrint
|
|
13051
13130
|
}
|
|
13052
13131
|
)
|
|
@@ -13055,8 +13134,8 @@ var BookingSuccessO2O = ({
|
|
|
13055
13134
|
]
|
|
13056
13135
|
}
|
|
13057
13136
|
),
|
|
13058
|
-
|
|
13059
|
-
/* @__PURE__ */ jsxRuntime.
|
|
13137
|
+
isPending && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-[64px] pb-4 print:hidden", children: [
|
|
13138
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex md:w-full gap-4 md:flex-col md:items-center md:justify-center", children: [
|
|
13060
13139
|
onEditBooking && token && /* @__PURE__ */ jsxRuntime.jsx(
|
|
13061
13140
|
"button",
|
|
13062
13141
|
{
|
|
@@ -13065,7 +13144,7 @@ var BookingSuccessO2O = ({
|
|
|
13065
13144
|
bookingData.demoroom_code,
|
|
13066
13145
|
bookingData.business_type
|
|
13067
13146
|
),
|
|
13068
|
-
className: "text-[14px] cursor-pointer w-fit rounded-full
|
|
13147
|
+
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] py-[10px] leading-[1] transition-colors",
|
|
13069
13148
|
children: pageData.editAppointment
|
|
13070
13149
|
}
|
|
13071
13150
|
),
|
|
@@ -13074,13 +13153,25 @@ var BookingSuccessO2O = ({
|
|
|
13074
13153
|
{
|
|
13075
13154
|
onClick: () => setShowCancelDialog(true),
|
|
13076
13155
|
disabled: cancelLoading,
|
|
13077
|
-
className: "text-[14px] cursor-pointer w-fit rounded-full text-[#080A0F] border-2 border-[#080A0F] px-[20px] py-[10px] leading-[1] hover:bg-gray-50 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
13156
|
+
className: "text-[14px] cursor-pointer w-fit rounded-full text-[#080A0F] border-2 border-[#080A0F] px-[20px] l:px-[12px] py-[10px] leading-[1] hover:bg-gray-50 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
13078
13157
|
children: pageData.cancelAppointment
|
|
13079
13158
|
}
|
|
13080
13159
|
)
|
|
13081
|
-
] }),
|
|
13160
|
+
] }) }),
|
|
13082
13161
|
cancelError && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm mt-2", style: { color: "#FF4D4D" }, children: cancelError })
|
|
13083
13162
|
] }),
|
|
13163
|
+
isStore && bookingData?.print_status === "completed" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-[64px] pb-4 print:hidden", children: [
|
|
13164
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13165
|
+
"button",
|
|
13166
|
+
{
|
|
13167
|
+
onClick: handleCheckin,
|
|
13168
|
+
disabled: checkinLoading,
|
|
13169
|
+
className: "text-[14px] cursor-pointer w-fit rounded-full text-[#080A0F] border-2 border-[#080A0F] px-[20px] l:px-[12px] py-[10px] leading-[1] hover:bg-gray-50 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
13170
|
+
children: pageData.changeStatusButton || "Change Pickup Status"
|
|
13171
|
+
}
|
|
13172
|
+
) }),
|
|
13173
|
+
checkinError && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm mt-2", style: { color: "#FF4D4D" }, children: checkinError })
|
|
13174
|
+
] }),
|
|
13084
13175
|
showCancelDialog && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 px-4 print:hidden", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-white rounded-[24px] max-w-[600px] p-8 shadow-xl relative", children: [
|
|
13085
13176
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13086
13177
|
"button",
|