s-platform-landing-section 0.1.12 → 0.1.14
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.js +833 -833
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +829 -829
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default, { useState, useRef, useEffect, forwardRef, useImperativeHandle, createElement, memo } from 'react';
|
|
2
2
|
import { IoCartOutline, IoChevronDownOutline, IoInformationCircleOutline, IoLogOutOutline, IoBagOutline, IoSearchOutline, IoChevronBackOutline, IoChevronForwardOutline, IoLocationOutline, IoCallOutline } from 'react-icons/io5';
|
|
3
|
-
import { FaUserCircle, FaFacebookF, FaFacebookMessenger, FaAngleUp, FaAngleDown, FaCheckCircle,
|
|
3
|
+
import { FaUserCircle, FaFacebookF, FaFacebookMessenger, FaBoxOpen, FaAngleUp, FaAngleDown, FaCheckCircle, FaArrowLeft, FaArrowRight } from 'react-icons/fa';
|
|
4
4
|
import { FiMenu, FiShoppingCart, FiSearch } from 'react-icons/fi';
|
|
5
5
|
import { RxCross2 } from 'react-icons/rx';
|
|
6
6
|
import { SiZalo, SiVisa } from 'react-icons/si';
|
|
@@ -985,54 +985,7 @@ var Hero10 = function Hero10(props) {
|
|
|
985
985
|
})));
|
|
986
986
|
};
|
|
987
987
|
|
|
988
|
-
var Dash = function Dash(props) {
|
|
989
|
-
var _props$color = props.color,
|
|
990
|
-
color = _props$color === void 0 ? "#ccc" : _props$color,
|
|
991
|
-
_props$className = props.className,
|
|
992
|
-
className = _props$className === void 0 ? "" : _props$className;
|
|
993
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
994
|
-
className: "mx-auto w-full max-w-[240px] md:max-w-[720px] border-b-0 " + className,
|
|
995
|
-
style: {
|
|
996
|
-
backgroundImage: "repeating-linear-gradient(to right, " + color + " 0, " + color + " 10px, transparent 10px, transparent 20px)",
|
|
997
|
-
height: "1px"
|
|
998
|
-
}
|
|
999
|
-
});
|
|
1000
|
-
};
|
|
1001
|
-
|
|
1002
|
-
var SECTION_DEFAULT_CLASS = "my-12 mx-4 xl:mx-20 bg-background";
|
|
1003
|
-
var SECTION_CLASS = "my-6 md:my-12 px-4 xl:px-20 bg-background";
|
|
1004
|
-
|
|
1005
988
|
var Hero11 = function Hero11(props) {
|
|
1006
|
-
var _data$data;
|
|
1007
|
-
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
1008
|
-
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
1009
|
-
_props$data = props.data,
|
|
1010
|
-
data = _props$data === void 0 ? {} : _props$data,
|
|
1011
|
-
_props$SectionTitle = props.SectionTitle,
|
|
1012
|
-
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
1013
|
-
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
1014
|
-
_shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
|
|
1015
|
-
secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3;
|
|
1016
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
1017
|
-
className: "" + SECTION_DEFAULT_CLASS
|
|
1018
|
-
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
1019
|
-
data: data,
|
|
1020
|
-
shopConfigStyle: shopConfigStyle
|
|
1021
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
1022
|
-
className: "mt-6 grid grid-cols-2 md:grid-cols-4 gap-1 md:gap-2"
|
|
1023
|
-
}, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (it, index) {
|
|
1024
|
-
var _it$srcImages;
|
|
1025
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
1026
|
-
key: index
|
|
1027
|
-
}, /*#__PURE__*/React__default.createElement("img", {
|
|
1028
|
-
src: it === null || it === void 0 ? void 0 : (_it$srcImages = it.srcImages) === null || _it$srcImages === void 0 ? void 0 : _it$srcImages[0]
|
|
1029
|
-
}));
|
|
1030
|
-
}))), /*#__PURE__*/React__default.createElement(Dash, {
|
|
1031
|
-
color: secondary
|
|
1032
|
-
}));
|
|
1033
|
-
};
|
|
1034
|
-
|
|
1035
|
-
var Hero11$1 = function Hero11(props) {
|
|
1036
989
|
var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data3, _data$data3$;
|
|
1037
990
|
var _props$data = props.data,
|
|
1038
991
|
data = _props$data === void 0 ? {} : _props$data;
|
|
@@ -7331,55 +7284,8 @@ var Hero13 = function Hero13(props) {
|
|
|
7331
7284
|
}));
|
|
7332
7285
|
};
|
|
7333
7286
|
|
|
7334
|
-
var
|
|
7335
|
-
|
|
7336
|
-
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
7337
|
-
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
7338
|
-
_props$data = props.data,
|
|
7339
|
-
data = _props$data === void 0 ? {} : _props$data,
|
|
7340
|
-
_props$SectionTitle = props.SectionTitle,
|
|
7341
|
-
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
7342
|
-
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
7343
|
-
_shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
|
|
7344
|
-
secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3;
|
|
7345
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
7346
|
-
className: SECTION_DEFAULT_CLASS + " relative"
|
|
7347
|
-
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
7348
|
-
data: data
|
|
7349
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7350
|
-
className: "mt-6 grid grid-cols-3 gap-4 md:gap-8"
|
|
7351
|
-
}, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (it, index) {
|
|
7352
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
7353
|
-
key: index,
|
|
7354
|
-
className: "pt-6 col-span-3 md:col-span-1"
|
|
7355
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7356
|
-
className: "relative w-40 h-24 flex items-center justify-center m-auto md:m-0"
|
|
7357
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7358
|
-
className: "absolute w-40 h-24 rounded-2xl z-10 bg-primary"
|
|
7359
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7360
|
-
className: "absolute w-24 h-16 rounded-2xl -right-2 -top-2 z-0 bg-secondary"
|
|
7361
|
-
}), it !== null && it !== void 0 && it.svgImage ? /*#__PURE__*/React__default.createElement("div", {
|
|
7362
|
-
className: "w-12 text-primary h-16 w-16 z-20 m-auto"
|
|
7363
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7364
|
-
dangerouslySetInnerHTML: {
|
|
7365
|
-
__html: configSvg(it === null || it === void 0 ? void 0 : it.svgImage)
|
|
7366
|
-
}
|
|
7367
|
-
})) : /*#__PURE__*/React__default.createElement("div", {
|
|
7368
|
-
className: "h-16 m-auto bg-center w-16 bg-cover bg-no-repeat z-20",
|
|
7369
|
-
style: {
|
|
7370
|
-
backgroundImage: "url(" + it.srcImage + ")"
|
|
7371
|
-
}
|
|
7372
|
-
})), /*#__PURE__*/React__default.createElement("p", {
|
|
7373
|
-
className: "mx-auto md:mt-3 md:mx-0 text-xl py-2 font-medium w-fit rounded-lg"
|
|
7374
|
-
}, it.title), /*#__PURE__*/React__default.createElement("div", {
|
|
7375
|
-
className: "mx-auto md:mx-0 mb-2 w-28 h-2px rounded-full bg-secondary"
|
|
7376
|
-
}), /*#__PURE__*/React__default.createElement("p", {
|
|
7377
|
-
className: "text-base mx-auto md:mx-0 text-center md:text-start"
|
|
7378
|
-
}, it.description));
|
|
7379
|
-
}))), /*#__PURE__*/React__default.createElement(Dash, {
|
|
7380
|
-
color: secondary
|
|
7381
|
-
}));
|
|
7382
|
-
};
|
|
7287
|
+
var SECTION_DEFAULT_CLASS = "my-12 mx-4 xl:mx-20 bg-background";
|
|
7288
|
+
var SECTION_CLASS = "my-6 md:my-12 px-4 xl:px-20 bg-background";
|
|
7383
7289
|
|
|
7384
7290
|
var Features2 = function Features2(props) {
|
|
7385
7291
|
var data = props.data;
|
|
@@ -7539,7 +7445,7 @@ var ProductController = function ProductController(props) {
|
|
|
7539
7445
|
};
|
|
7540
7446
|
};
|
|
7541
7447
|
|
|
7542
|
-
var _path
|
|
7448
|
+
var _path;
|
|
7543
7449
|
function _extends$1() {
|
|
7544
7450
|
return _extends$1 = Object.assign ? Object.assign.bind() : function (n) {
|
|
7545
7451
|
for (var e = 1; e < arguments.length; e++) {
|
|
@@ -7549,13 +7455,130 @@ function _extends$1() {
|
|
|
7549
7455
|
return n;
|
|
7550
7456
|
}, _extends$1.apply(null, arguments);
|
|
7551
7457
|
}
|
|
7552
|
-
function
|
|
7458
|
+
function SvgAngleSmallLeft(props) {
|
|
7553
7459
|
return /*#__PURE__*/createElement("svg", _extends$1({
|
|
7460
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7461
|
+
viewBox: "0 0 24 24",
|
|
7462
|
+
width: 512,
|
|
7463
|
+
height: 512
|
|
7464
|
+
}, props), _path || (_path = /*#__PURE__*/createElement("path", {
|
|
7465
|
+
d: "M10.6 12.71a1 1 0 010-1.42l4.59-4.58a1 1 0 000-1.42 1 1 0 00-1.41 0L9.19 9.88a3 3 0 000 4.24l4.59 4.59a1 1 0 00.7.29 1 1 0 00.71-.29 1 1 0 000-1.42z"
|
|
7466
|
+
})));
|
|
7467
|
+
}
|
|
7468
|
+
|
|
7469
|
+
var _path$1;
|
|
7470
|
+
function _extends$2() {
|
|
7471
|
+
return _extends$2 = Object.assign ? Object.assign.bind() : function (n) {
|
|
7472
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
7473
|
+
var t = arguments[e];
|
|
7474
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
7475
|
+
}
|
|
7476
|
+
return n;
|
|
7477
|
+
}, _extends$2.apply(null, arguments);
|
|
7478
|
+
}
|
|
7479
|
+
function SvgAngleSmallRight(props) {
|
|
7480
|
+
return /*#__PURE__*/createElement("svg", _extends$2({
|
|
7481
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7482
|
+
viewBox: "0 0 24 24",
|
|
7483
|
+
width: 512,
|
|
7484
|
+
height: 512
|
|
7485
|
+
}, props), _path$1 || (_path$1 = /*#__PURE__*/createElement("path", {
|
|
7486
|
+
d: "M15.4 9.88l-4.59-4.59a1 1 0 00-1.41 0 1 1 0 000 1.42l4.6 4.58a1 1 0 010 1.42l-4.6 4.58a1 1 0 001.41 1.42l4.59-4.59a3 3 0 000-4.24z"
|
|
7487
|
+
})));
|
|
7488
|
+
}
|
|
7489
|
+
|
|
7490
|
+
var ScrollHorizontal = function ScrollHorizontal(props) {
|
|
7491
|
+
var _props$datas = props.datas,
|
|
7492
|
+
datas = _props$datas === void 0 ? [] : _props$datas,
|
|
7493
|
+
_props$className = props.className,
|
|
7494
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
7495
|
+
_props$style = props.style,
|
|
7496
|
+
style = _props$style === void 0 ? {} : _props$style,
|
|
7497
|
+
_props$renderItem = props.renderItem,
|
|
7498
|
+
renderItem = _props$renderItem === void 0 ? function () {} : _props$renderItem;
|
|
7499
|
+
var scrollContainerRef = useRef(null);
|
|
7500
|
+
var _useState = useState(true),
|
|
7501
|
+
isScrolledToLeft = _useState[0],
|
|
7502
|
+
setIsScrolledToLeft = _useState[1];
|
|
7503
|
+
var _useState2 = useState(false),
|
|
7504
|
+
isScrolledToRight = _useState2[0],
|
|
7505
|
+
setIsScrolledToRight = _useState2[1];
|
|
7506
|
+
var checkScrollPosition = function checkScrollPosition() {
|
|
7507
|
+
if (scrollContainerRef.current) {
|
|
7508
|
+
var _scrollContainerRef$c = scrollContainerRef.current,
|
|
7509
|
+
_scrollLeft = _scrollContainerRef$c.scrollLeft,
|
|
7510
|
+
scrollWidth = _scrollContainerRef$c.scrollWidth,
|
|
7511
|
+
clientWidth = _scrollContainerRef$c.clientWidth;
|
|
7512
|
+
setIsScrolledToLeft(_scrollLeft === 0);
|
|
7513
|
+
setIsScrolledToRight(_scrollLeft + clientWidth >= scrollWidth);
|
|
7514
|
+
}
|
|
7515
|
+
};
|
|
7516
|
+
var scrollLeft = function scrollLeft() {
|
|
7517
|
+
if (scrollContainerRef.current) {
|
|
7518
|
+
scrollContainerRef.current.scrollBy({
|
|
7519
|
+
left: -200,
|
|
7520
|
+
behavior: "smooth"
|
|
7521
|
+
});
|
|
7522
|
+
setTimeout(checkScrollPosition, 300);
|
|
7523
|
+
}
|
|
7524
|
+
};
|
|
7525
|
+
var scrollRight = function scrollRight() {
|
|
7526
|
+
if (scrollContainerRef.current) {
|
|
7527
|
+
scrollContainerRef.current.scrollBy({
|
|
7528
|
+
left: 200,
|
|
7529
|
+
behavior: "smooth"
|
|
7530
|
+
});
|
|
7531
|
+
setTimeout(checkScrollPosition, 300);
|
|
7532
|
+
}
|
|
7533
|
+
};
|
|
7534
|
+
useEffect(function () {
|
|
7535
|
+
checkScrollPosition();
|
|
7536
|
+
}, [datas]);
|
|
7537
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7538
|
+
className: "flex " + className,
|
|
7539
|
+
style: style
|
|
7540
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7541
|
+
className: "flex w-full overflow-x-hidden",
|
|
7542
|
+
ref: scrollContainerRef,
|
|
7543
|
+
onScroll: checkScrollPosition
|
|
7544
|
+
}, datas === null || datas === void 0 ? void 0 : datas.map(function (item, index) {
|
|
7545
|
+
return renderItem(item, index);
|
|
7546
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
7547
|
+
className: "flex gap-2 items-center px-4"
|
|
7548
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7549
|
+
onClick: scrollLeft,
|
|
7550
|
+
className: "cursor-pointer w-8 h-8 rounded-full flex justify-center items-center " + (isScrolledToLeft ? "bg-gray4" : "bg-primary")
|
|
7551
|
+
}, /*#__PURE__*/React__default.createElement(SvgAngleSmallLeft, {
|
|
7552
|
+
width: 24,
|
|
7553
|
+
height: 24,
|
|
7554
|
+
fill: "#fff"
|
|
7555
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
7556
|
+
onClick: scrollRight,
|
|
7557
|
+
className: "cursor-pointer w-8 h-8 rounded-full flex justify-center items-center " + (isScrolledToRight ? "bg-gray4" : "bg-primary")
|
|
7558
|
+
}, /*#__PURE__*/React__default.createElement(SvgAngleSmallRight, {
|
|
7559
|
+
width: 24,
|
|
7560
|
+
height: 24,
|
|
7561
|
+
fill: "#fff"
|
|
7562
|
+
}))));
|
|
7563
|
+
};
|
|
7564
|
+
|
|
7565
|
+
var _path$2, _path2, _path3;
|
|
7566
|
+
function _extends$3() {
|
|
7567
|
+
return _extends$3 = Object.assign ? Object.assign.bind() : function (n) {
|
|
7568
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
7569
|
+
var t = arguments[e];
|
|
7570
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
7571
|
+
}
|
|
7572
|
+
return n;
|
|
7573
|
+
}, _extends$3.apply(null, arguments);
|
|
7574
|
+
}
|
|
7575
|
+
function SvgImageGallery(props) {
|
|
7576
|
+
return /*#__PURE__*/createElement("svg", _extends$3({
|
|
7554
7577
|
height: 512,
|
|
7555
7578
|
viewBox: "0 0 24 24",
|
|
7556
7579
|
width: 512,
|
|
7557
7580
|
xmlns: "http://www.w3.org/2000/svg"
|
|
7558
|
-
}, props), _path || (_path = /*#__PURE__*/createElement("path", {
|
|
7581
|
+
}, props), _path$2 || (_path$2 = /*#__PURE__*/createElement("path", {
|
|
7559
7582
|
d: "M17.453 24c-.168 0-.34-.021-.51-.066L1.48 19.793a2.018 2.018 0 01-1.414-2.45l1.951-7.272a.5.5 0 01.966.258l-1.95 7.27c-.139.53.179 1.082.71 1.229L17.2 22.967a.995.995 0 001.217-.704l.781-2.894a.499.499 0 11.966.26l-.78 2.89A1.997 1.997 0 0117.453 24z"
|
|
7560
7583
|
})), _path2 || (_path2 = /*#__PURE__*/createElement("path", {
|
|
7561
7584
|
d: "M22 18H6c-1.103 0-2-.897-2-2V4c0-1.103.897-2 2-2h16c1.103 0 2 .897 2 2v12c0 1.103-.897 2-2 2zM6 3c-.551 0-1 .449-1 1v12c0 .551.449 1 1 1h16c.551 0 1-.449 1-1V4c0-.551-.449-1-1-1z"
|
|
@@ -7608,233 +7631,285 @@ var ProductImage = function ProductImage(props) {
|
|
|
7608
7631
|
});
|
|
7609
7632
|
};
|
|
7610
7633
|
|
|
7611
|
-
var
|
|
7612
|
-
|
|
7613
|
-
|
|
7614
|
-
|
|
7615
|
-
|
|
7616
|
-
|
|
7617
|
-
|
|
7618
|
-
if (modalRef.current && !modalRef.current.contains(event.target)) {
|
|
7619
|
-
if (onClose) onClose();
|
|
7620
|
-
if (onCloseFormBooking && typeof onCloseFormBooking === 'function') {
|
|
7621
|
-
onCloseFormBooking();
|
|
7622
|
-
}
|
|
7623
|
-
}
|
|
7624
|
-
};
|
|
7625
|
-
useEffect(function () {
|
|
7626
|
-
document.addEventListener('click', handleClickOutside);
|
|
7627
|
-
return function () {
|
|
7628
|
-
document.removeEventListener('click', handleClickOutside);
|
|
7629
|
-
};
|
|
7630
|
-
}, []);
|
|
7631
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
7632
|
-
className: "fixed inset-0 bg-black flex items-center justify-center bg-opacity-50 z-50 "
|
|
7633
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7634
|
-
className: " flex items-center justify-center relative bg-red",
|
|
7635
|
-
ref: modalRef
|
|
7636
|
-
}, props === null || props === void 0 ? void 0 : props.children, isButtonClose && /*#__PURE__*/React__default.createElement("button", {
|
|
7637
|
-
className: "absolute top-4 right-4",
|
|
7638
|
-
onClick: onClose
|
|
7639
|
-
}, /*#__PURE__*/React__default.createElement(RxCross2, null))));
|
|
7634
|
+
var formatCurrency = function formatCurrency(amount) {
|
|
7635
|
+
if (isNaN(amount)) {
|
|
7636
|
+
return '0 ₫';
|
|
7637
|
+
}
|
|
7638
|
+
var roundedAmount = Math.round(amount);
|
|
7639
|
+
var formattedAmount = roundedAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
|
|
7640
|
+
return formattedAmount + " \u20AB";
|
|
7640
7641
|
};
|
|
7642
|
+
var pattern = {
|
|
7643
|
+
phoneNumberPattern: /^(?:\+84|0)\d{9}$/
|
|
7644
|
+
};
|
|
7645
|
+
var numberPattern = /^\d+$/;
|
|
7641
7646
|
|
|
7642
|
-
|
|
7643
|
-
|
|
7644
|
-
|
|
7645
|
-
|
|
7646
|
-
|
|
7647
|
-
|
|
7648
|
-
|
|
7649
|
-
|
|
7650
|
-
|
|
7651
|
-
|
|
7652
|
-
|
|
7653
|
-
|
|
7654
|
-
|
|
7655
|
-
|
|
7656
|
-
|
|
7657
|
-
|
|
7658
|
-
|
|
7659
|
-
|
|
7660
|
-
|
|
7661
|
-
|
|
7647
|
+
function getMinMax(array, field) {
|
|
7648
|
+
if (!(array !== null && array !== void 0 && array.length) || !array[0].hasOwnProperty(field)) {
|
|
7649
|
+
return null;
|
|
7650
|
+
}
|
|
7651
|
+
var _array$reduce = array.reduce(function (acc, obj) {
|
|
7652
|
+
var value = obj[field];
|
|
7653
|
+
return {
|
|
7654
|
+
min: value < acc.min ? value : acc.min,
|
|
7655
|
+
max: value > acc.max ? value : acc.max
|
|
7656
|
+
};
|
|
7657
|
+
}, {
|
|
7658
|
+
min: array[0][field],
|
|
7659
|
+
max: array[0][field]
|
|
7660
|
+
}),
|
|
7661
|
+
min = _array$reduce.min,
|
|
7662
|
+
max = _array$reduce.max;
|
|
7663
|
+
return {
|
|
7664
|
+
min: min,
|
|
7665
|
+
max: max
|
|
7666
|
+
};
|
|
7667
|
+
}
|
|
7668
|
+
var ProductPrice = function ProductPrice(props) {
|
|
7669
|
+
var product = props.product,
|
|
7670
|
+
variant = props.variant,
|
|
7671
|
+
_props$className = props.className,
|
|
7672
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
7673
|
+
_props$style = props.style,
|
|
7674
|
+
style = _props$style === void 0 ? {} : _props$style;
|
|
7675
|
+
var _useState = useState(),
|
|
7676
|
+
displayPrice = _useState[0],
|
|
7677
|
+
setDisplayPrice = _useState[1];
|
|
7678
|
+
var _useState2 = useState(),
|
|
7679
|
+
displayPriceBeforeDiscount = _useState2[0],
|
|
7680
|
+
setDisplayPriceBeforeDiscount = _useState2[1];
|
|
7662
7681
|
useEffect(function () {
|
|
7663
|
-
if (
|
|
7664
|
-
|
|
7682
|
+
if (variant) {
|
|
7683
|
+
genProductPrice([variant]);
|
|
7684
|
+
} else if (product) {
|
|
7685
|
+
genProductPrice(product.variants);
|
|
7665
7686
|
}
|
|
7666
|
-
}, [
|
|
7667
|
-
var
|
|
7668
|
-
|
|
7669
|
-
|
|
7670
|
-
|
|
7671
|
-
|
|
7672
|
-
|
|
7673
|
-
|
|
7674
|
-
|
|
7675
|
-
|
|
7676
|
-
|
|
7677
|
-
|
|
7678
|
-
}
|
|
7679
|
-
|
|
7680
|
-
|
|
7681
|
-
}
|
|
7682
|
-
|
|
7687
|
+
}, [product, variant]);
|
|
7688
|
+
var genProductPrice = function genProductPrice(variants) {
|
|
7689
|
+
var mPrice = getMinMax(variants, 'price');
|
|
7690
|
+
var mPriceBeforeDiscount = getMinMax(variants, 'priceBeforeDiscount');
|
|
7691
|
+
if (mPrice && mPriceBeforeDiscount) {
|
|
7692
|
+
var _displayPriceBeforeDiscount = formatCurrency(mPriceBeforeDiscount.min);
|
|
7693
|
+
var _displayPrice = formatCurrency(mPrice.min);
|
|
7694
|
+
if (mPrice.min !== mPrice.max) {
|
|
7695
|
+
_displayPrice += " - " + formatCurrency(mPrice.max);
|
|
7696
|
+
}
|
|
7697
|
+
if (mPriceBeforeDiscount.min !== mPriceBeforeDiscount.max) {
|
|
7698
|
+
_displayPriceBeforeDiscount += " - " + formatCurrency(mPriceBeforeDiscount.max);
|
|
7699
|
+
}
|
|
7700
|
+
setDisplayPrice(_displayPrice);
|
|
7701
|
+
setDisplayPriceBeforeDiscount(_displayPriceBeforeDiscount);
|
|
7702
|
+
} else {
|
|
7703
|
+
var _displayPrice2 = formatCurrency(product === null || product === void 0 ? void 0 : product.price);
|
|
7704
|
+
setDisplayPrice(_displayPrice2);
|
|
7683
7705
|
}
|
|
7684
7706
|
};
|
|
7685
|
-
return {
|
|
7686
|
-
|
|
7687
|
-
|
|
7688
|
-
|
|
7707
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7708
|
+
className: className
|
|
7709
|
+
}, displayPriceBeforeDiscount !== displayPrice && displayPriceBeforeDiscount != null ? /*#__PURE__*/React__default.createElement("span", {
|
|
7710
|
+
className: "text-gray3 line-through mr-2"
|
|
7711
|
+
}, displayPriceBeforeDiscount) : null, /*#__PURE__*/React__default.createElement("span", {
|
|
7712
|
+
className: "text-primary font-semibold",
|
|
7713
|
+
style: style
|
|
7714
|
+
}, displayPrice));
|
|
7689
7715
|
};
|
|
7690
7716
|
|
|
7691
|
-
var
|
|
7692
|
-
|
|
7693
|
-
|
|
7694
|
-
|
|
7695
|
-
|
|
7696
|
-
|
|
7697
|
-
|
|
7698
|
-
|
|
7699
|
-
|
|
7717
|
+
var ProductItem1 = function ProductItem1(props) {
|
|
7718
|
+
var product = props.product;
|
|
7719
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7720
|
+
className: "flex"
|
|
7721
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
7722
|
+
product: product,
|
|
7723
|
+
className: "!w-20 rounded-lg"
|
|
7724
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7725
|
+
className: "ml-4 border-b border-stroke flex-1"
|
|
7726
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7727
|
+
className: "text-lg"
|
|
7728
|
+
}, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement("div", {
|
|
7729
|
+
className: "flex mt-2"
|
|
7730
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7731
|
+
className: "flex-1 text-gray3"
|
|
7732
|
+
}, getDurationValue(product === null || product === void 0 ? void 0 : product.attributes)), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
7733
|
+
product: product
|
|
7734
|
+
}))));
|
|
7700
7735
|
};
|
|
7701
|
-
|
|
7702
|
-
|
|
7703
|
-
|
|
7704
|
-
|
|
7705
|
-
|
|
7706
|
-
|
|
7707
|
-
|
|
7708
|
-
|
|
7709
|
-
|
|
7710
|
-
|
|
7736
|
+
|
|
7737
|
+
var Dash = function Dash(props) {
|
|
7738
|
+
var _props$color = props.color,
|
|
7739
|
+
color = _props$color === void 0 ? "#ccc" : _props$color,
|
|
7740
|
+
_props$className = props.className,
|
|
7741
|
+
className = _props$className === void 0 ? "" : _props$className;
|
|
7742
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7743
|
+
className: "mx-auto w-full max-w-[240px] md:max-w-[720px] border-b-0 " + className,
|
|
7744
|
+
style: {
|
|
7745
|
+
backgroundImage: "repeating-linear-gradient(to right, " + color + " 0, " + color + " 10px, transparent 10px, transparent 20px)",
|
|
7746
|
+
height: "1px"
|
|
7711
7747
|
}
|
|
7712
7748
|
});
|
|
7713
7749
|
};
|
|
7714
7750
|
|
|
7715
|
-
var
|
|
7716
|
-
var
|
|
7717
|
-
|
|
7718
|
-
|
|
7719
|
-
|
|
7720
|
-
|
|
7721
|
-
|
|
7722
|
-
|
|
7723
|
-
appId: "SSPA",
|
|
7724
|
-
customerName: customerName,
|
|
7725
|
-
customerPhone: customerPhone === null || customerPhone === void 0 ? void 0 : customerPhone.replace("+", ""),
|
|
7726
|
-
isSellService: true,
|
|
7727
|
-
scheduleDate: (_Date = new Date(scheduleDate)) === null || _Date === void 0 ? void 0 : _Date.getTime(),
|
|
7728
|
-
services: services === null || services === void 0 ? void 0 : services.map(function (_ref) {
|
|
7729
|
-
var productName = _ref.productName,
|
|
7730
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
7731
|
-
return rest;
|
|
7732
|
-
}),
|
|
7733
|
-
shopId: shopId
|
|
7734
|
-
};
|
|
7735
|
-
return Promise.resolve(createSpaScheduleApi(shopId, data));
|
|
7736
|
-
}, function (e) {
|
|
7737
|
-
console.log(e);
|
|
7738
|
-
}));
|
|
7739
|
-
} catch (e) {
|
|
7740
|
-
return Promise.reject(e);
|
|
7751
|
+
var Loading = function Loading(props) {
|
|
7752
|
+
var _props$size = props.size,
|
|
7753
|
+
size = _props$size === void 0 ? 24 : _props$size;
|
|
7754
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7755
|
+
className: "border-4 boder-[rgba(255, 255, 255, 0.2)] rounded-full border-t-4 border-t-primary animate-spin",
|
|
7756
|
+
style: {
|
|
7757
|
+
width: size,
|
|
7758
|
+
height: size
|
|
7741
7759
|
}
|
|
7742
|
-
};
|
|
7743
|
-
return {
|
|
7744
|
-
createSchedule: createSchedule
|
|
7745
|
-
};
|
|
7760
|
+
});
|
|
7746
7761
|
};
|
|
7747
7762
|
|
|
7748
|
-
var
|
|
7749
|
-
var _props$
|
|
7750
|
-
|
|
7751
|
-
_props$
|
|
7752
|
-
|
|
7753
|
-
_props$
|
|
7754
|
-
|
|
7755
|
-
|
|
7756
|
-
|
|
7757
|
-
|
|
7758
|
-
|
|
7759
|
-
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
|
-
|
|
7767
|
-
|
|
7768
|
-
|
|
7769
|
-
|
|
7770
|
-
|
|
7771
|
-
|
|
7772
|
-
|
|
7773
|
-
|
|
7774
|
-
|
|
7775
|
-
|
|
7776
|
-
|
|
7777
|
-
|
|
7778
|
-
|
|
7779
|
-
|
|
7780
|
-
|
|
7781
|
-
|
|
7782
|
-
|
|
7783
|
-
|
|
7784
|
-
|
|
7785
|
-
|
|
7786
|
-
|
|
7787
|
-
|
|
7788
|
-
|
|
7789
|
-
|
|
7790
|
-
|
|
7791
|
-
|
|
7792
|
-
|
|
7793
|
-
|
|
7794
|
-
|
|
7795
|
-
|
|
7796
|
-
|
|
7797
|
-
|
|
7798
|
-
|
|
7799
|
-
|
|
7800
|
-
|
|
7801
|
-
|
|
7802
|
-
if (isMulti) setValue(defaultValue);
|
|
7803
|
-
}, [defaultValue]);
|
|
7804
|
-
useEffect(function () {
|
|
7805
|
-
setListOptions(options);
|
|
7806
|
-
if (!isMulti) setValue(defaultValue);
|
|
7807
|
-
}, [options]);
|
|
7808
|
-
useEffect(function () {
|
|
7809
|
-
var _inputRef$current;
|
|
7810
|
-
inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
7811
|
-
var updateDropdownPosition = function updateDropdownPosition() {
|
|
7812
|
-
if (selectRef.current && dropdownRef.current) {
|
|
7813
|
-
var _selectRef$current, _window;
|
|
7814
|
-
var selectRect = selectRef === null || selectRef === void 0 ? void 0 : (_selectRef$current = selectRef.current) === null || _selectRef$current === void 0 ? void 0 : _selectRef$current.getBoundingClientRect();
|
|
7815
|
-
var spaceBelow = ((_window = window) === null || _window === void 0 ? void 0 : _window.innerHeight) - (selectRect === null || selectRect === void 0 ? void 0 : selectRect.bottom);
|
|
7816
|
-
var spaceAbove = selectRect === null || selectRect === void 0 ? void 0 : selectRect.top;
|
|
7817
|
-
if (spaceBelow < spaceAbove) {
|
|
7818
|
-
setDropdownPosition('top');
|
|
7819
|
-
} else {
|
|
7820
|
-
setDropdownPosition('bottom');
|
|
7763
|
+
var TreatmentsCategory7 = function TreatmentsCategory7(props) {
|
|
7764
|
+
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
7765
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
7766
|
+
_props$data = props.data,
|
|
7767
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
7768
|
+
_props$SectionTitle = props.SectionTitle,
|
|
7769
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
7770
|
+
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
7771
|
+
_shopConfigStyle$colo2 = _shopConfigStyle$colo.secondary,
|
|
7772
|
+
secondary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2;
|
|
7773
|
+
var _useState = useState({
|
|
7774
|
+
types: "1"
|
|
7775
|
+
}),
|
|
7776
|
+
params = _useState[0],
|
|
7777
|
+
setParams = _useState[1];
|
|
7778
|
+
var _CategoryController = CategoryController(_extends({}, props, {
|
|
7779
|
+
types: "1"
|
|
7780
|
+
})),
|
|
7781
|
+
categories = _CategoryController.categories;
|
|
7782
|
+
var _ProductController = ProductController(_extends({}, props, {
|
|
7783
|
+
params: params
|
|
7784
|
+
})),
|
|
7785
|
+
_ProductController$pr = _ProductController.products,
|
|
7786
|
+
products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
|
|
7787
|
+
loading = _ProductController.loading;
|
|
7788
|
+
var _useState2 = useState(0),
|
|
7789
|
+
selectedCategory = _useState2[0],
|
|
7790
|
+
setSelectedCategory = _useState2[1];
|
|
7791
|
+
useEffect(function () {
|
|
7792
|
+
var newParams = _extends({}, params, {
|
|
7793
|
+
categoryId: selectedCategory
|
|
7794
|
+
});
|
|
7795
|
+
if (!selectedCategory) {
|
|
7796
|
+
delete newParams.categoryId;
|
|
7797
|
+
}
|
|
7798
|
+
setParams(newParams);
|
|
7799
|
+
}, [selectedCategory]);
|
|
7800
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
7801
|
+
className: SECTION_DEFAULT_CLASS + " relative"
|
|
7802
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
7803
|
+
data: data,
|
|
7804
|
+
shopConfigStyle: shopConfigStyle
|
|
7805
|
+
}), /*#__PURE__*/React__default.createElement(ScrollHorizontal, {
|
|
7806
|
+
datas: [{
|
|
7807
|
+
categoryId: 0,
|
|
7808
|
+
cateName: "Tất cả"
|
|
7809
|
+
}].concat(categories),
|
|
7810
|
+
className: "mt-6 rounded-lg overflow-hidden bg-bgSecondary",
|
|
7811
|
+
renderItem: function renderItem(item, index) {
|
|
7812
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7813
|
+
key: index,
|
|
7814
|
+
className: "p-3 flex gap-3 shrink-0 cursor-pointer text-base " + (selectedCategory === item.categoryId ? "bg-primary text-textButton" : ""),
|
|
7815
|
+
onClick: function onClick() {
|
|
7816
|
+
return setSelectedCategory(item.categoryId);
|
|
7821
7817
|
}
|
|
7822
|
-
}
|
|
7823
|
-
};
|
|
7824
|
-
if (isOpen) {
|
|
7825
|
-
updateDropdownPosition();
|
|
7826
|
-
window.addEventListener('resize', updateDropdownPosition);
|
|
7818
|
+
}, item === null || item === void 0 ? void 0 : item.cateName);
|
|
7827
7819
|
}
|
|
7828
|
-
|
|
7829
|
-
|
|
7830
|
-
|
|
7831
|
-
|
|
7820
|
+
}), loading ? /*#__PURE__*/React__default.createElement("div", {
|
|
7821
|
+
className: "flex w-full justify-center p-12"
|
|
7822
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null)) : products !== null && products !== void 0 && products.length ? /*#__PURE__*/React__default.createElement("div", {
|
|
7823
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-10 mt-6"
|
|
7824
|
+
}, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
|
|
7825
|
+
return /*#__PURE__*/React__default.createElement(ProductItem1, {
|
|
7826
|
+
key: index,
|
|
7827
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo
|
|
7828
|
+
});
|
|
7829
|
+
})) : /*#__PURE__*/React__default.createElement("div", {
|
|
7830
|
+
className: "text-gray3 text-center p-12"
|
|
7831
|
+
}, "Kh\xF4ng c\xF3 d\u1ECBch v\u1EE5")), /*#__PURE__*/React__default.createElement(Dash, {
|
|
7832
|
+
color: secondary
|
|
7833
|
+
}));
|
|
7834
|
+
};
|
|
7835
|
+
|
|
7836
|
+
var NotFoundProduct = function NotFoundProduct() {
|
|
7837
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7838
|
+
className: "h-60 flex flex-col justify-center items-center text-xl text-gray3"
|
|
7839
|
+
}, /*#__PURE__*/React__default.createElement(FaBoxOpen, {
|
|
7840
|
+
size: 80
|
|
7841
|
+
}), /*#__PURE__*/React__default.createElement("div", null, "Kh\xF4ng c\xF3 s\u1EA3n ph\u1EA9m"));
|
|
7842
|
+
};
|
|
7843
|
+
|
|
7844
|
+
var TreatmentsList6 = function TreatmentsList6(props) {
|
|
7845
|
+
var _products$slice;
|
|
7846
|
+
var data = props.data,
|
|
7847
|
+
_props$Link = props.Link,
|
|
7848
|
+
Link = _props$Link === void 0 ? null : _props$Link,
|
|
7849
|
+
_props$SectionTitle = props.SectionTitle,
|
|
7850
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
|
|
7851
|
+
_props$TreatmentItem = props.TreatmentItem,
|
|
7852
|
+
TreatmentItem = _props$TreatmentItem === void 0 ? null : _props$TreatmentItem,
|
|
7853
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
7854
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
|
|
7855
|
+
var _useState = useState({
|
|
7856
|
+
size: 12,
|
|
7857
|
+
types: "1"
|
|
7858
|
+
}),
|
|
7859
|
+
params = _useState[0],
|
|
7860
|
+
setParams = _useState[1];
|
|
7861
|
+
var _useState2 = useState(true),
|
|
7862
|
+
isGetMore = _useState2[0],
|
|
7863
|
+
setIsGetMore = _useState2[1];
|
|
7864
|
+
var _ProductController = ProductController(_extends({}, props, {
|
|
7865
|
+
params: params
|
|
7866
|
+
})),
|
|
7867
|
+
products = _ProductController.products,
|
|
7868
|
+
loading = _ProductController.loading;
|
|
7869
|
+
var handleGetMoreProducts = function handleGetMoreProducts() {
|
|
7870
|
+
setIsGetMore(false);
|
|
7871
|
+
setParams(function (prev) {
|
|
7872
|
+
return _extends({}, prev, {
|
|
7873
|
+
size: (prev === null || prev === void 0 ? void 0 : prev.size) + 4
|
|
7874
|
+
});
|
|
7875
|
+
});
|
|
7876
|
+
};
|
|
7877
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7878
|
+
className: SECTION_CLASS + " flex flex-col gap-8 "
|
|
7879
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
7880
|
+
data: data,
|
|
7881
|
+
shopConfigStyle: shopConfigStyle
|
|
7882
|
+
}), loading && isGetMore ? /*#__PURE__*/React__default.createElement("div", {
|
|
7883
|
+
className: "m-auto mt-20 min-h-32"
|
|
7884
|
+
}, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
|
|
7885
|
+
className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-x-2 gap-y-4 md:gap-4 xl:gap-6"
|
|
7886
|
+
}, products === null || products === void 0 ? void 0 : (_products$slice = products.slice(0, params.size - 4)) === null || _products$slice === void 0 ? void 0 : _products$slice.map(function (product, idx) {
|
|
7887
|
+
return /*#__PURE__*/React__default.createElement(TreatmentItem, {
|
|
7888
|
+
Link: Link,
|
|
7889
|
+
shopConfigStyle: shopConfigStyle,
|
|
7890
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
7891
|
+
key: "htrhr-" + idx
|
|
7892
|
+
});
|
|
7893
|
+
})) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), !loading && (products === null || products === void 0 ? void 0 : products.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement(Button, {
|
|
7894
|
+
label: "Xem thêm",
|
|
7895
|
+
onClick: handleGetMoreProducts,
|
|
7896
|
+
className: "mx-auto " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass),
|
|
7897
|
+
type: "outline"
|
|
7898
|
+
}) : null);
|
|
7899
|
+
};
|
|
7900
|
+
|
|
7901
|
+
var ModalNotification = function ModalNotification(props) {
|
|
7902
|
+
var modalRef = useRef(null);
|
|
7903
|
+
var onClose = props.onClose,
|
|
7904
|
+
onCloseFormBooking = props.onCloseFormBooking,
|
|
7905
|
+
_props$isButtonClose = props.isButtonClose,
|
|
7906
|
+
isButtonClose = _props$isButtonClose === void 0 ? true : _props$isButtonClose;
|
|
7832
7907
|
var handleClickOutside = function handleClickOutside(event) {
|
|
7833
|
-
|
|
7834
|
-
|
|
7835
|
-
|
|
7836
|
-
|
|
7837
|
-
|
|
7908
|
+
if (modalRef.current && !modalRef.current.contains(event.target)) {
|
|
7909
|
+
if (onClose) onClose();
|
|
7910
|
+
if (onCloseFormBooking && typeof onCloseFormBooking === 'function') {
|
|
7911
|
+
onCloseFormBooking();
|
|
7912
|
+
}
|
|
7838
7913
|
}
|
|
7839
7914
|
};
|
|
7840
7915
|
useEffect(function () {
|
|
@@ -7843,45 +7918,260 @@ var Select = forwardRef(function (props, ref) {
|
|
|
7843
7918
|
document.removeEventListener('click', handleClickOutside);
|
|
7844
7919
|
};
|
|
7845
7920
|
}, []);
|
|
7846
|
-
|
|
7847
|
-
|
|
7848
|
-
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
|
|
7853
|
-
|
|
7854
|
-
|
|
7921
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7922
|
+
className: "fixed inset-0 bg-black flex items-center justify-center bg-opacity-50 z-50 "
|
|
7923
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7924
|
+
className: " flex items-center justify-center relative bg-red",
|
|
7925
|
+
ref: modalRef
|
|
7926
|
+
}, props === null || props === void 0 ? void 0 : props.children, isButtonClose && /*#__PURE__*/React__default.createElement("button", {
|
|
7927
|
+
className: "absolute top-4 right-4",
|
|
7928
|
+
onClick: onClose
|
|
7929
|
+
}, /*#__PURE__*/React__default.createElement(RxCross2, null))));
|
|
7930
|
+
};
|
|
7931
|
+
|
|
7932
|
+
var getEmployeeListApi = function getEmployeeListApi(shopId) {
|
|
7933
|
+
return api({
|
|
7934
|
+
method: "get",
|
|
7935
|
+
url: "/chain-employment-profile/filter-employ-by-customer",
|
|
7936
|
+
params: {
|
|
7937
|
+
shopIds: shopId
|
|
7938
|
+
},
|
|
7939
|
+
headers: {
|
|
7940
|
+
shopId: shopId
|
|
7941
|
+
}
|
|
7855
7942
|
});
|
|
7856
|
-
|
|
7857
|
-
|
|
7858
|
-
|
|
7859
|
-
|
|
7860
|
-
|
|
7861
|
-
|
|
7862
|
-
var
|
|
7863
|
-
|
|
7864
|
-
|
|
7865
|
-
|
|
7866
|
-
|
|
7867
|
-
|
|
7868
|
-
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
7869
|
-
count++;
|
|
7870
|
-
break;
|
|
7871
|
-
} else if ((e === null || e === void 0 ? void 0 : e.type) === 'pattern' && !(e !== null && e !== void 0 && (_e$pattern = e.pattern) !== null && _e$pattern !== void 0 && _e$pattern.test(value))) {
|
|
7872
|
-
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
7873
|
-
count++;
|
|
7874
|
-
break;
|
|
7875
|
-
}
|
|
7943
|
+
};
|
|
7944
|
+
|
|
7945
|
+
var EmployeeController = function EmployeeController(props) {
|
|
7946
|
+
var _props$isAutoGetList = props.isAutoGetList,
|
|
7947
|
+
isAutoGetList = _props$isAutoGetList === void 0 ? true : _props$isAutoGetList,
|
|
7948
|
+
shopConfig = props.shopConfig;
|
|
7949
|
+
var _useState = useState([]),
|
|
7950
|
+
listEmployment = _useState[0],
|
|
7951
|
+
setListEmployment = _useState[1];
|
|
7952
|
+
useEffect(function () {
|
|
7953
|
+
if (isAutoGetList) {
|
|
7954
|
+
getListEmployee();
|
|
7876
7955
|
}
|
|
7877
|
-
|
|
7878
|
-
|
|
7879
|
-
|
|
7880
|
-
|
|
7881
|
-
|
|
7956
|
+
}, [isAutoGetList]);
|
|
7957
|
+
var getListEmployee = function getListEmployee() {
|
|
7958
|
+
try {
|
|
7959
|
+
return Promise.resolve(_catch(function () {
|
|
7960
|
+
return Promise.resolve(getEmployeeListApi(shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopId)).then(function (res) {
|
|
7961
|
+
var _res$data, _res$data$status;
|
|
7962
|
+
if ((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : (_res$data$status = _res$data.status) === null || _res$data$status === void 0 ? void 0 : _res$data$status.code) == 200) {
|
|
7963
|
+
var _res$data2;
|
|
7964
|
+
setListEmployment((res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data) || []);
|
|
7965
|
+
}
|
|
7966
|
+
return res;
|
|
7967
|
+
});
|
|
7968
|
+
}, function (e) {
|
|
7969
|
+
console.log(e);
|
|
7970
|
+
}));
|
|
7971
|
+
} catch (e) {
|
|
7972
|
+
return Promise.reject(e);
|
|
7882
7973
|
}
|
|
7883
7974
|
};
|
|
7884
|
-
|
|
7975
|
+
return {
|
|
7976
|
+
listEmployment: listEmployment,
|
|
7977
|
+
getListEmployee: getListEmployee
|
|
7978
|
+
};
|
|
7979
|
+
};
|
|
7980
|
+
|
|
7981
|
+
var createSpaScheduleApi = function createSpaScheduleApi(shopId, data) {
|
|
7982
|
+
return api({
|
|
7983
|
+
method: "post",
|
|
7984
|
+
url: "/spa-schedule/customer/create",
|
|
7985
|
+
data: data,
|
|
7986
|
+
headers: {
|
|
7987
|
+
shopId: shopId
|
|
7988
|
+
}
|
|
7989
|
+
});
|
|
7990
|
+
};
|
|
7991
|
+
var draftOrderWithoutLoginApi = function draftOrderWithoutLoginApi(shopId, data) {
|
|
7992
|
+
return api({
|
|
7993
|
+
method: "post",
|
|
7994
|
+
url: "/spa/orders/draft-online-without-login",
|
|
7995
|
+
params: {
|
|
7996
|
+
shopId: shopId
|
|
7997
|
+
},
|
|
7998
|
+
data: data,
|
|
7999
|
+
headers: {
|
|
8000
|
+
shopId: shopId
|
|
8001
|
+
}
|
|
8002
|
+
});
|
|
8003
|
+
};
|
|
8004
|
+
|
|
8005
|
+
var _excluded$1 = ["productName"];
|
|
8006
|
+
var BookingController = function BookingController(props) {
|
|
8007
|
+
_objectDestructuringEmpty(props);
|
|
8008
|
+
var createSchedule = function createSchedule(customerName, customerPhone, scheduleDate, services, shopId) {
|
|
8009
|
+
try {
|
|
8010
|
+
return Promise.resolve(_catch(function () {
|
|
8011
|
+
var _Date;
|
|
8012
|
+
var data = {
|
|
8013
|
+
appId: "SSPA",
|
|
8014
|
+
customerName: customerName,
|
|
8015
|
+
customerPhone: customerPhone === null || customerPhone === void 0 ? void 0 : customerPhone.replace("+", ""),
|
|
8016
|
+
isSellService: true,
|
|
8017
|
+
scheduleDate: (_Date = new Date(scheduleDate)) === null || _Date === void 0 ? void 0 : _Date.getTime(),
|
|
8018
|
+
services: services === null || services === void 0 ? void 0 : services.map(function (_ref) {
|
|
8019
|
+
var productName = _ref.productName,
|
|
8020
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
8021
|
+
return rest;
|
|
8022
|
+
}),
|
|
8023
|
+
shopId: shopId
|
|
8024
|
+
};
|
|
8025
|
+
return Promise.resolve(createSpaScheduleApi(shopId, data));
|
|
8026
|
+
}, function (e) {
|
|
8027
|
+
console.log(e);
|
|
8028
|
+
}));
|
|
8029
|
+
} catch (e) {
|
|
8030
|
+
return Promise.reject(e);
|
|
8031
|
+
}
|
|
8032
|
+
};
|
|
8033
|
+
return {
|
|
8034
|
+
createSchedule: createSchedule
|
|
8035
|
+
};
|
|
8036
|
+
};
|
|
8037
|
+
|
|
8038
|
+
var Select = forwardRef(function (props, ref) {
|
|
8039
|
+
var _props$label = props.label,
|
|
8040
|
+
label = _props$label === void 0 ? "" : _props$label,
|
|
8041
|
+
_props$labelClassName = props.labelClassName,
|
|
8042
|
+
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
8043
|
+
_props$placeholder = props.placeholder,
|
|
8044
|
+
placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
|
|
8045
|
+
_props$className = props.className,
|
|
8046
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
8047
|
+
_props$optionClassNam = props.optionClassName,
|
|
8048
|
+
optionClassName = _props$optionClassNam === void 0 ? "" : _props$optionClassNam,
|
|
8049
|
+
_props$wrapClassName = props.wrapClassName,
|
|
8050
|
+
wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
|
|
8051
|
+
_props$selectClassNam = props.selectClassName,
|
|
8052
|
+
selectClassName = _props$selectClassNam === void 0 ? "" : _props$selectClassNam,
|
|
8053
|
+
_props$rules = props.rules,
|
|
8054
|
+
rules = _props$rules === void 0 ? [] : _props$rules,
|
|
8055
|
+
options = props.options,
|
|
8056
|
+
_props$defaultValue = props.defaultValue,
|
|
8057
|
+
defaultValue = _props$defaultValue === void 0 ? {} : _props$defaultValue,
|
|
8058
|
+
handleSearchOption = props.handleSearchOption,
|
|
8059
|
+
_props$isMulti = props.isMulti,
|
|
8060
|
+
isMulti = _props$isMulti === void 0 ? false : _props$isMulti,
|
|
8061
|
+
_props$onClick = props.onClick,
|
|
8062
|
+
onClick = _props$onClick === void 0 ? function () {} : _props$onClick,
|
|
8063
|
+
_props$isButtonDelete = props.isButtonDelete,
|
|
8064
|
+
isButtonDelete = _props$isButtonDelete === void 0 ? false : _props$isButtonDelete,
|
|
8065
|
+
_props$funcDelete = props.funcDelete,
|
|
8066
|
+
funcDelete = _props$funcDelete === void 0 ? function () {} : _props$funcDelete,
|
|
8067
|
+
_props$isSearch = props.isSearch,
|
|
8068
|
+
isSearch = _props$isSearch === void 0 ? true : _props$isSearch,
|
|
8069
|
+
renderItem = props.renderItem;
|
|
8070
|
+
var _useState = useState(false),
|
|
8071
|
+
isOpen = _useState[0],
|
|
8072
|
+
setIsOpen = _useState[1];
|
|
8073
|
+
var selectRef = useRef(null);
|
|
8074
|
+
var _useState2 = useState(""),
|
|
8075
|
+
error = _useState2[0],
|
|
8076
|
+
_setError = _useState2[1];
|
|
8077
|
+
var _useState3 = useState(""),
|
|
8078
|
+
inputSearch = _useState3[0],
|
|
8079
|
+
setInputSearch = _useState3[1];
|
|
8080
|
+
var _useState4 = useState(defaultValue),
|
|
8081
|
+
value = _useState4[0],
|
|
8082
|
+
setValue = _useState4[1];
|
|
8083
|
+
var _useState5 = useState(options),
|
|
8084
|
+
listOptions = _useState5[0],
|
|
8085
|
+
setListOptions = _useState5[1];
|
|
8086
|
+
var dropdownRef = useRef(null);
|
|
8087
|
+
var _useState6 = useState('bottom'),
|
|
8088
|
+
dropdownPosition = _useState6[0],
|
|
8089
|
+
setDropdownPosition = _useState6[1];
|
|
8090
|
+
var inputRef = useRef(null);
|
|
8091
|
+
useEffect(function () {
|
|
8092
|
+
if (isMulti) setValue(defaultValue);
|
|
8093
|
+
}, [defaultValue]);
|
|
8094
|
+
useEffect(function () {
|
|
8095
|
+
setListOptions(options);
|
|
8096
|
+
if (!isMulti) setValue(defaultValue);
|
|
8097
|
+
}, [options]);
|
|
8098
|
+
useEffect(function () {
|
|
8099
|
+
var _inputRef$current;
|
|
8100
|
+
inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
8101
|
+
var updateDropdownPosition = function updateDropdownPosition() {
|
|
8102
|
+
if (selectRef.current && dropdownRef.current) {
|
|
8103
|
+
var _selectRef$current, _window;
|
|
8104
|
+
var selectRect = selectRef === null || selectRef === void 0 ? void 0 : (_selectRef$current = selectRef.current) === null || _selectRef$current === void 0 ? void 0 : _selectRef$current.getBoundingClientRect();
|
|
8105
|
+
var spaceBelow = ((_window = window) === null || _window === void 0 ? void 0 : _window.innerHeight) - (selectRect === null || selectRect === void 0 ? void 0 : selectRect.bottom);
|
|
8106
|
+
var spaceAbove = selectRect === null || selectRect === void 0 ? void 0 : selectRect.top;
|
|
8107
|
+
if (spaceBelow < spaceAbove) {
|
|
8108
|
+
setDropdownPosition('top');
|
|
8109
|
+
} else {
|
|
8110
|
+
setDropdownPosition('bottom');
|
|
8111
|
+
}
|
|
8112
|
+
}
|
|
8113
|
+
};
|
|
8114
|
+
if (isOpen) {
|
|
8115
|
+
updateDropdownPosition();
|
|
8116
|
+
window.addEventListener('resize', updateDropdownPosition);
|
|
8117
|
+
}
|
|
8118
|
+
return function () {
|
|
8119
|
+
window.removeEventListener('resize', updateDropdownPosition);
|
|
8120
|
+
};
|
|
8121
|
+
}, [isOpen]);
|
|
8122
|
+
var handleClickOutside = function handleClickOutside(event) {
|
|
8123
|
+
var _selectRef$current2;
|
|
8124
|
+
if (selectRef !== null && selectRef !== void 0 && selectRef.current && !(selectRef !== null && selectRef !== void 0 && (_selectRef$current2 = selectRef.current) !== null && _selectRef$current2 !== void 0 && _selectRef$current2.contains(event.target))) {
|
|
8125
|
+
setIsOpen(false);
|
|
8126
|
+
setInputSearch("");
|
|
8127
|
+
setListOptions(options);
|
|
8128
|
+
}
|
|
8129
|
+
};
|
|
8130
|
+
useEffect(function () {
|
|
8131
|
+
document.addEventListener('click', handleClickOutside);
|
|
8132
|
+
return function () {
|
|
8133
|
+
document.removeEventListener('click', handleClickOutside);
|
|
8134
|
+
};
|
|
8135
|
+
}, []);
|
|
8136
|
+
useImperativeHandle(ref, function () {
|
|
8137
|
+
return {
|
|
8138
|
+
validateData: function validateData() {
|
|
8139
|
+
return _validateData();
|
|
8140
|
+
},
|
|
8141
|
+
setError: function setError(err) {
|
|
8142
|
+
return _setError(err);
|
|
8143
|
+
}
|
|
8144
|
+
};
|
|
8145
|
+
});
|
|
8146
|
+
var isEmpty = function isEmpty(value) {
|
|
8147
|
+
var _Object$keys;
|
|
8148
|
+
if (Array !== null && Array !== void 0 && Array.isArray(value)) return (value === null || value === void 0 ? void 0 : value.length) <= 0;
|
|
8149
|
+
if (typeof value === 'object') return (Object === null || Object === void 0 ? void 0 : (_Object$keys = Object.keys(value)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) <= 0;
|
|
8150
|
+
return false;
|
|
8151
|
+
};
|
|
8152
|
+
var _validateData = function _validateData() {
|
|
8153
|
+
var count = 0;
|
|
8154
|
+
for (var _iterator = _createForOfIteratorHelperLoose(rules), _step; !(_step = _iterator()).done;) {
|
|
8155
|
+
var _e$pattern;
|
|
8156
|
+
var e = _step.value;
|
|
8157
|
+
if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && isEmpty(value)) {
|
|
8158
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8159
|
+
count++;
|
|
8160
|
+
break;
|
|
8161
|
+
} else if ((e === null || e === void 0 ? void 0 : e.type) === 'pattern' && !(e !== null && e !== void 0 && (_e$pattern = e.pattern) !== null && _e$pattern !== void 0 && _e$pattern.test(value))) {
|
|
8162
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
8163
|
+
count++;
|
|
8164
|
+
break;
|
|
8165
|
+
}
|
|
8166
|
+
}
|
|
8167
|
+
if (count) {
|
|
8168
|
+
return false;
|
|
8169
|
+
} else {
|
|
8170
|
+
_setError('');
|
|
8171
|
+
return true;
|
|
8172
|
+
}
|
|
8173
|
+
};
|
|
8174
|
+
var handleSearch = function handleSearch(e) {
|
|
7885
8175
|
var searchValue = e.target.value;
|
|
7886
8176
|
setInputSearch(searchValue);
|
|
7887
8177
|
if (handleSearchOption && typeof handleSearchOption === 'function') {
|
|
@@ -8225,19 +8515,6 @@ var InputPhoneNumber = forwardRef(function (props, ref) {
|
|
|
8225
8515
|
}, error) : null);
|
|
8226
8516
|
});
|
|
8227
8517
|
|
|
8228
|
-
var formatCurrency = function formatCurrency(amount) {
|
|
8229
|
-
if (isNaN(amount)) {
|
|
8230
|
-
return '0 ₫';
|
|
8231
|
-
}
|
|
8232
|
-
var roundedAmount = Math.round(amount);
|
|
8233
|
-
var formattedAmount = roundedAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
|
|
8234
|
-
return formattedAmount + " \u20AB";
|
|
8235
|
-
};
|
|
8236
|
-
var pattern = {
|
|
8237
|
-
phoneNumberPattern: /^(?:\+84|0)\d{9}$/
|
|
8238
|
-
};
|
|
8239
|
-
var numberPattern = /^\d+$/;
|
|
8240
|
-
|
|
8241
8518
|
var dayjs_min = createCommonjsModule(function (module, exports) {
|
|
8242
8519
|
!function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return b.s(e.$y,4,"0");case"M":return a+1;case"MM":return b.s(a+1,2,"0");case"MMM":return h(n.monthsShort,a,c,3);case"MMMM":return h(c,a);case"D":return e.$D;case"DD":return b.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,o,2);case"ddd":return h(n.weekdaysShort,e.$W,o,3);case"dddd":return o[e.$W];case"H":return String(s);case"HH":return b.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return $(s,u,!0);case"A":return $(s,u,!1);case"m":return String(u);case"mm":return b.s(u,2,"0");case"s":return String(e.$s);case"ss":return b.s(e.$s,2,"0");case"SSS":return b.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
|
|
8243
8520
|
});
|
|
@@ -8694,492 +8971,135 @@ var BookingForm = function BookingForm(props) {
|
|
|
8694
8971
|
})) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
8695
8972
|
className: "text-center"
|
|
8696
8973
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
8697
|
-
label: "Đặt lịch ngay",
|
|
8698
|
-
shopConfigStyle: shopConfigStyle,
|
|
8699
|
-
onClick: handleSubmit
|
|
8700
|
-
})), isOpenPopup && /*#__PURE__*/React__default.createElement(ModalNotification, {
|
|
8701
|
-
onCloseFormBooking: onCloseFormBooking,
|
|
8702
|
-
onClose: handleClosePopup
|
|
8703
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
8704
|
-
className: "bg-white rounded-lg shadow-lg p-6 max-w-sm flex flex-col items-center justify-center min-w-[320px] md:min-w-[650px] min-h-[420px] md:min-h-[380px] lg:h-auto "
|
|
8705
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
8706
|
-
className: "h-20 mb-4 flex items-center justify-center"
|
|
8707
|
-
}, /*#__PURE__*/React__default.createElement(FaCheckCircle, {
|
|
8708
|
-
className: "h-full text-green-500",
|
|
8709
|
-
style: {
|
|
8710
|
-
fontSize: "150px"
|
|
8711
|
-
}
|
|
8712
|
-
})), /*#__PURE__*/React__default.createElement("div", {
|
|
8713
|
-
className: "mb-2"
|
|
8714
|
-
}, "Kh\xE1ch h\xE0ng: ", dataBooking === null || dataBooking === void 0 ? void 0 : dataBooking.customerName), /*#__PURE__*/React__default.createElement("div", {
|
|
8715
|
-
className: "mb-2"
|
|
8716
|
-
}, "S\u1ED1 \u0111i\u1EC7n tho\u1EA1i: ", dataBooking === null || dataBooking === void 0 ? void 0 : dataBooking.customerPhone), /*#__PURE__*/React__default.createElement("div", {
|
|
8717
|
-
className: "mb-4"
|
|
8718
|
-
}, "Th\u1EDDi gian: ", dayjs_min(dataBooking === null || dataBooking === void 0 ? void 0 : dataBooking.scheduleDate).format("DD/MM/YYYY")), token ? /*#__PURE__*/React__default.createElement("div", null) : /*#__PURE__*/React__default.createElement("div", {
|
|
8719
|
-
className: "flex flex-col items-center"
|
|
8720
|
-
}, /*#__PURE__*/React__default.createElement("p", {
|
|
8721
|
-
className: "mb-4 text-center"
|
|
8722
|
-
}, "B\u1EA1n \u0111\xE3 c\xF3 t\xE0i kho\u1EA3n, vui l\xF2ng \u0111\u0103ng nh\u1EADp \u0111\u1EC3 xem chi ti\u1EBFt c\xE1c s\u1EA3n ph\u1EA9m, d\u1ECBch v\u1EE5 li\u1EC7u tr\xECnh m\xE0 b\u1EA1n \u0111ang s\u1EDF h\u1EEFu"), /*#__PURE__*/React__default.createElement(Button, {
|
|
8723
|
-
label: "Đăng nhập",
|
|
8724
|
-
shopConfigStyle: shopConfigStyle
|
|
8725
|
-
})))));
|
|
8726
|
-
};
|
|
8727
|
-
|
|
8728
|
-
var Treatments1 = function Treatments1(props) {
|
|
8729
|
-
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
8730
|
-
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
8731
|
-
_props$shopConfig = props.shopConfig,
|
|
8732
|
-
shopConfig = _props$shopConfig === void 0 ? {} : _props$shopConfig,
|
|
8733
|
-
_props$data = props.data,
|
|
8734
|
-
data = _props$data === void 0 ? {} : _props$data,
|
|
8735
|
-
_props$SectionTitle = props.SectionTitle,
|
|
8736
|
-
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
8737
|
-
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
8738
|
-
_shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
|
|
8739
|
-
secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3;
|
|
8740
|
-
var _useState = useState({
|
|
8741
|
-
size: 10,
|
|
8742
|
-
types: "1,10",
|
|
8743
|
-
isHighlight: true
|
|
8744
|
-
}),
|
|
8745
|
-
params = _useState[0];
|
|
8746
|
-
var _useState2 = useState(false),
|
|
8747
|
-
isOpenModal = _useState2[0],
|
|
8748
|
-
setIsOpenModal = _useState2[1];
|
|
8749
|
-
var _useState3 = useState([]),
|
|
8750
|
-
dataBooking = _useState3[0],
|
|
8751
|
-
setDataBooking = _useState3[1];
|
|
8752
|
-
var _ProductController = ProductController(_extends({}, props, {
|
|
8753
|
-
params: params
|
|
8754
|
-
})),
|
|
8755
|
-
_ProductController$pr = _ProductController.products,
|
|
8756
|
-
products = _ProductController$pr === void 0 ? [] : _ProductController$pr;
|
|
8757
|
-
console.log("treatment1:", products);
|
|
8758
|
-
var handleOpenModalBooking = function handleOpenModalBooking(event, data) {
|
|
8759
|
-
try {
|
|
8760
|
-
var _data$productInfo, _data$productInfo2;
|
|
8761
|
-
event.stopPropagation();
|
|
8762
|
-
setDataBooking([_extends({}, data, {
|
|
8763
|
-
quantity: 1,
|
|
8764
|
-
technical: {},
|
|
8765
|
-
oldService: false,
|
|
8766
|
-
label: data === null || data === void 0 ? void 0 : (_data$productInfo = data.productInfo) === null || _data$productInfo === void 0 ? void 0 : _data$productInfo.productName,
|
|
8767
|
-
value: data === null || data === void 0 ? void 0 : (_data$productInfo2 = data.productInfo) === null || _data$productInfo2 === void 0 ? void 0 : _data$productInfo2.productId
|
|
8768
|
-
})]);
|
|
8769
|
-
setIsOpenModal(true);
|
|
8770
|
-
} catch (error) {
|
|
8771
|
-
console.log("::::::::::errrorrrrr::::::", error);
|
|
8772
|
-
}
|
|
8773
|
-
};
|
|
8774
|
-
var handleCloseModal = function handleCloseModal() {
|
|
8775
|
-
setIsOpenModal(false);
|
|
8776
|
-
setDataBooking([]);
|
|
8777
|
-
};
|
|
8778
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
8779
|
-
className: "" + SECTION_DEFAULT_CLASS
|
|
8780
|
-
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
8781
|
-
data: data,
|
|
8782
|
-
shopConfigStyle: shopConfigStyle
|
|
8783
|
-
}), products === null || products === void 0 ? void 0 : products.map(function (product, index) {
|
|
8784
|
-
var _product$productInfo, _product$productInfo2;
|
|
8785
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
8786
|
-
className: "grid grid-cols-1 md:grid-cols-2 gap-6 mt-12",
|
|
8787
|
-
key: "rthirr-" + index
|
|
8788
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
8789
|
-
className: "block " + (index % 2 ? "md:hidden" : "")
|
|
8790
|
-
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
8791
|
-
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
8792
|
-
className: "aspect-video rounded-2xl"
|
|
8793
|
-
})), /*#__PURE__*/React__default.createElement("div", {
|
|
8794
|
-
className: "text-left " + (index % 2 ? "md:text-right" : "")
|
|
8795
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
8796
|
-
className: "font-medium text-2xl"
|
|
8797
|
-
}, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement("div", {
|
|
8798
|
-
className: "mt-4 text-textBody",
|
|
8799
|
-
dangerouslySetInnerHTML: {
|
|
8800
|
-
__html: product === null || product === void 0 ? void 0 : (_product$productInfo2 = product.productInfo) === null || _product$productInfo2 === void 0 ? void 0 : _product$productInfo2.description
|
|
8801
|
-
}
|
|
8802
|
-
}), /*#__PURE__*/React__default.createElement(Button, {
|
|
8803
|
-
label: "Đặt lịch ngay",
|
|
8804
|
-
shopConfigStyle: shopConfigStyle,
|
|
8805
|
-
className: "mt-4",
|
|
8806
|
-
onClick: function onClick(event) {
|
|
8807
|
-
handleOpenModalBooking(event, product);
|
|
8808
|
-
}
|
|
8809
|
-
})), /*#__PURE__*/React__default.createElement("div", {
|
|
8810
|
-
className: "hidden " + (index % 2 ? "md:block" : "")
|
|
8811
|
-
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
8812
|
-
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
8813
|
-
className: "aspect-video rounded-2xl"
|
|
8814
|
-
})));
|
|
8815
|
-
})), /*#__PURE__*/React__default.createElement(Dash, {
|
|
8816
|
-
color: secondary
|
|
8817
|
-
}), isOpenModal ? /*#__PURE__*/React__default.createElement(ModalNotification, {
|
|
8818
|
-
onClose: handleCloseModal
|
|
8819
|
-
}, /*#__PURE__*/React__default.createElement(BookingForm, {
|
|
8820
|
-
className: "overflow-y-auto hide-scrollbar max-h-[80vh] !bg-bgSecondary",
|
|
8821
|
-
onCloseFormBooking: handleCloseModal,
|
|
8822
|
-
defaultValue: dataBooking,
|
|
8823
|
-
shopConfig: shopConfig,
|
|
8824
|
-
shopConfigStyle: shopConfigStyle
|
|
8825
|
-
})) : null);
|
|
8826
|
-
};
|
|
8827
|
-
|
|
8828
|
-
var _path$1;
|
|
8829
|
-
function _extends$2() {
|
|
8830
|
-
return _extends$2 = Object.assign ? Object.assign.bind() : function (n) {
|
|
8831
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
8832
|
-
var t = arguments[e];
|
|
8833
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
8834
|
-
}
|
|
8835
|
-
return n;
|
|
8836
|
-
}, _extends$2.apply(null, arguments);
|
|
8837
|
-
}
|
|
8838
|
-
function SvgAngleSmallLeft(props) {
|
|
8839
|
-
return /*#__PURE__*/createElement("svg", _extends$2({
|
|
8840
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
8841
|
-
viewBox: "0 0 24 24",
|
|
8842
|
-
width: 512,
|
|
8843
|
-
height: 512
|
|
8844
|
-
}, props), _path$1 || (_path$1 = /*#__PURE__*/createElement("path", {
|
|
8845
|
-
d: "M10.6 12.71a1 1 0 010-1.42l4.59-4.58a1 1 0 000-1.42 1 1 0 00-1.41 0L9.19 9.88a3 3 0 000 4.24l4.59 4.59a1 1 0 00.7.29 1 1 0 00.71-.29 1 1 0 000-1.42z"
|
|
8846
|
-
})));
|
|
8847
|
-
}
|
|
8848
|
-
|
|
8849
|
-
var _path$2;
|
|
8850
|
-
function _extends$3() {
|
|
8851
|
-
return _extends$3 = Object.assign ? Object.assign.bind() : function (n) {
|
|
8852
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
8853
|
-
var t = arguments[e];
|
|
8854
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
8855
|
-
}
|
|
8856
|
-
return n;
|
|
8857
|
-
}, _extends$3.apply(null, arguments);
|
|
8858
|
-
}
|
|
8859
|
-
function SvgAngleSmallRight(props) {
|
|
8860
|
-
return /*#__PURE__*/createElement("svg", _extends$3({
|
|
8861
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
8862
|
-
viewBox: "0 0 24 24",
|
|
8863
|
-
width: 512,
|
|
8864
|
-
height: 512
|
|
8865
|
-
}, props), _path$2 || (_path$2 = /*#__PURE__*/createElement("path", {
|
|
8866
|
-
d: "M15.4 9.88l-4.59-4.59a1 1 0 00-1.41 0 1 1 0 000 1.42l4.6 4.58a1 1 0 010 1.42l-4.6 4.58a1 1 0 001.41 1.42l4.59-4.59a3 3 0 000-4.24z"
|
|
8867
|
-
})));
|
|
8868
|
-
}
|
|
8869
|
-
|
|
8870
|
-
var ScrollHorizontal = function ScrollHorizontal(props) {
|
|
8871
|
-
var _props$datas = props.datas,
|
|
8872
|
-
datas = _props$datas === void 0 ? [] : _props$datas,
|
|
8873
|
-
_props$className = props.className,
|
|
8874
|
-
className = _props$className === void 0 ? "" : _props$className,
|
|
8875
|
-
_props$style = props.style,
|
|
8876
|
-
style = _props$style === void 0 ? {} : _props$style,
|
|
8877
|
-
_props$renderItem = props.renderItem,
|
|
8878
|
-
renderItem = _props$renderItem === void 0 ? function () {} : _props$renderItem;
|
|
8879
|
-
var scrollContainerRef = useRef(null);
|
|
8880
|
-
var _useState = useState(true),
|
|
8881
|
-
isScrolledToLeft = _useState[0],
|
|
8882
|
-
setIsScrolledToLeft = _useState[1];
|
|
8883
|
-
var _useState2 = useState(false),
|
|
8884
|
-
isScrolledToRight = _useState2[0],
|
|
8885
|
-
setIsScrolledToRight = _useState2[1];
|
|
8886
|
-
var checkScrollPosition = function checkScrollPosition() {
|
|
8887
|
-
if (scrollContainerRef.current) {
|
|
8888
|
-
var _scrollContainerRef$c = scrollContainerRef.current,
|
|
8889
|
-
_scrollLeft = _scrollContainerRef$c.scrollLeft,
|
|
8890
|
-
scrollWidth = _scrollContainerRef$c.scrollWidth,
|
|
8891
|
-
clientWidth = _scrollContainerRef$c.clientWidth;
|
|
8892
|
-
setIsScrolledToLeft(_scrollLeft === 0);
|
|
8893
|
-
setIsScrolledToRight(_scrollLeft + clientWidth >= scrollWidth);
|
|
8894
|
-
}
|
|
8895
|
-
};
|
|
8896
|
-
var scrollLeft = function scrollLeft() {
|
|
8897
|
-
if (scrollContainerRef.current) {
|
|
8898
|
-
scrollContainerRef.current.scrollBy({
|
|
8899
|
-
left: -200,
|
|
8900
|
-
behavior: "smooth"
|
|
8901
|
-
});
|
|
8902
|
-
setTimeout(checkScrollPosition, 300);
|
|
8903
|
-
}
|
|
8904
|
-
};
|
|
8905
|
-
var scrollRight = function scrollRight() {
|
|
8906
|
-
if (scrollContainerRef.current) {
|
|
8907
|
-
scrollContainerRef.current.scrollBy({
|
|
8908
|
-
left: 200,
|
|
8909
|
-
behavior: "smooth"
|
|
8910
|
-
});
|
|
8911
|
-
setTimeout(checkScrollPosition, 300);
|
|
8912
|
-
}
|
|
8913
|
-
};
|
|
8914
|
-
useEffect(function () {
|
|
8915
|
-
checkScrollPosition();
|
|
8916
|
-
}, [datas]);
|
|
8917
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
8918
|
-
className: "flex " + className,
|
|
8919
|
-
style: style
|
|
8920
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
8921
|
-
className: "flex w-full overflow-x-hidden",
|
|
8922
|
-
ref: scrollContainerRef,
|
|
8923
|
-
onScroll: checkScrollPosition
|
|
8924
|
-
}, datas === null || datas === void 0 ? void 0 : datas.map(function (item, index) {
|
|
8925
|
-
return renderItem(item, index);
|
|
8926
|
-
})), /*#__PURE__*/React__default.createElement("div", {
|
|
8927
|
-
className: "flex gap-2 items-center px-4"
|
|
8928
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
8929
|
-
onClick: scrollLeft,
|
|
8930
|
-
className: "cursor-pointer w-8 h-8 rounded-full flex justify-center items-center " + (isScrolledToLeft ? "bg-gray4" : "bg-primary")
|
|
8931
|
-
}, /*#__PURE__*/React__default.createElement(SvgAngleSmallLeft, {
|
|
8932
|
-
width: 24,
|
|
8933
|
-
height: 24,
|
|
8934
|
-
fill: "#fff"
|
|
8935
|
-
})), /*#__PURE__*/React__default.createElement("div", {
|
|
8936
|
-
onClick: scrollRight,
|
|
8937
|
-
className: "cursor-pointer w-8 h-8 rounded-full flex justify-center items-center " + (isScrolledToRight ? "bg-gray4" : "bg-primary")
|
|
8938
|
-
}, /*#__PURE__*/React__default.createElement(SvgAngleSmallRight, {
|
|
8939
|
-
width: 24,
|
|
8940
|
-
height: 24,
|
|
8941
|
-
fill: "#fff"
|
|
8942
|
-
}))));
|
|
8943
|
-
};
|
|
8944
|
-
|
|
8945
|
-
function getMinMax(array, field) {
|
|
8946
|
-
if (!(array !== null && array !== void 0 && array.length) || !array[0].hasOwnProperty(field)) {
|
|
8947
|
-
return null;
|
|
8948
|
-
}
|
|
8949
|
-
var _array$reduce = array.reduce(function (acc, obj) {
|
|
8950
|
-
var value = obj[field];
|
|
8951
|
-
return {
|
|
8952
|
-
min: value < acc.min ? value : acc.min,
|
|
8953
|
-
max: value > acc.max ? value : acc.max
|
|
8954
|
-
};
|
|
8955
|
-
}, {
|
|
8956
|
-
min: array[0][field],
|
|
8957
|
-
max: array[0][field]
|
|
8958
|
-
}),
|
|
8959
|
-
min = _array$reduce.min,
|
|
8960
|
-
max = _array$reduce.max;
|
|
8961
|
-
return {
|
|
8962
|
-
min: min,
|
|
8963
|
-
max: max
|
|
8964
|
-
};
|
|
8965
|
-
}
|
|
8966
|
-
var ProductPrice = function ProductPrice(props) {
|
|
8967
|
-
var product = props.product,
|
|
8968
|
-
variant = props.variant,
|
|
8969
|
-
_props$className = props.className,
|
|
8970
|
-
className = _props$className === void 0 ? "" : _props$className,
|
|
8971
|
-
_props$style = props.style,
|
|
8972
|
-
style = _props$style === void 0 ? {} : _props$style;
|
|
8973
|
-
var _useState = useState(),
|
|
8974
|
-
displayPrice = _useState[0],
|
|
8975
|
-
setDisplayPrice = _useState[1];
|
|
8976
|
-
var _useState2 = useState(),
|
|
8977
|
-
displayPriceBeforeDiscount = _useState2[0],
|
|
8978
|
-
setDisplayPriceBeforeDiscount = _useState2[1];
|
|
8979
|
-
useEffect(function () {
|
|
8980
|
-
if (variant) {
|
|
8981
|
-
genProductPrice([variant]);
|
|
8982
|
-
} else if (product) {
|
|
8983
|
-
genProductPrice(product.variants);
|
|
8984
|
-
}
|
|
8985
|
-
}, [product, variant]);
|
|
8986
|
-
var genProductPrice = function genProductPrice(variants) {
|
|
8987
|
-
var mPrice = getMinMax(variants, 'price');
|
|
8988
|
-
var mPriceBeforeDiscount = getMinMax(variants, 'priceBeforeDiscount');
|
|
8989
|
-
if (mPrice && mPriceBeforeDiscount) {
|
|
8990
|
-
var _displayPriceBeforeDiscount = formatCurrency(mPriceBeforeDiscount.min);
|
|
8991
|
-
var _displayPrice = formatCurrency(mPrice.min);
|
|
8992
|
-
if (mPrice.min !== mPrice.max) {
|
|
8993
|
-
_displayPrice += " - " + formatCurrency(mPrice.max);
|
|
8994
|
-
}
|
|
8995
|
-
if (mPriceBeforeDiscount.min !== mPriceBeforeDiscount.max) {
|
|
8996
|
-
_displayPriceBeforeDiscount += " - " + formatCurrency(mPriceBeforeDiscount.max);
|
|
8997
|
-
}
|
|
8998
|
-
setDisplayPrice(_displayPrice);
|
|
8999
|
-
setDisplayPriceBeforeDiscount(_displayPriceBeforeDiscount);
|
|
9000
|
-
} else {
|
|
9001
|
-
var _displayPrice2 = formatCurrency(product === null || product === void 0 ? void 0 : product.price);
|
|
9002
|
-
setDisplayPrice(_displayPrice2);
|
|
9003
|
-
}
|
|
9004
|
-
};
|
|
9005
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
9006
|
-
className: className
|
|
9007
|
-
}, displayPriceBeforeDiscount !== displayPrice && displayPriceBeforeDiscount != null ? /*#__PURE__*/React__default.createElement("span", {
|
|
9008
|
-
className: "text-gray3 line-through mr-2"
|
|
9009
|
-
}, displayPriceBeforeDiscount) : null, /*#__PURE__*/React__default.createElement("span", {
|
|
9010
|
-
className: "text-primary font-semibold",
|
|
9011
|
-
style: style
|
|
9012
|
-
}, displayPrice));
|
|
9013
|
-
};
|
|
9014
|
-
|
|
9015
|
-
var ProductItem1 = function ProductItem1(props) {
|
|
9016
|
-
var product = props.product;
|
|
9017
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
9018
|
-
className: "flex"
|
|
9019
|
-
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
9020
|
-
product: product,
|
|
9021
|
-
className: "!w-20 rounded-lg"
|
|
9022
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
9023
|
-
className: "ml-4 border-b border-stroke flex-1"
|
|
9024
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9025
|
-
className: "text-lg"
|
|
9026
|
-
}, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement("div", {
|
|
9027
|
-
className: "flex mt-2"
|
|
9028
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9029
|
-
className: "flex-1 text-gray3"
|
|
9030
|
-
}, getDurationValue(product === null || product === void 0 ? void 0 : product.attributes)), /*#__PURE__*/React__default.createElement(ProductPrice, {
|
|
9031
|
-
product: product
|
|
9032
|
-
}))));
|
|
9033
|
-
};
|
|
9034
|
-
|
|
9035
|
-
var Loading = function Loading(props) {
|
|
9036
|
-
var _props$size = props.size,
|
|
9037
|
-
size = _props$size === void 0 ? 24 : _props$size;
|
|
9038
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
9039
|
-
className: "border-4 boder-[rgba(255, 255, 255, 0.2)] rounded-full border-t-4 border-t-primary animate-spin",
|
|
9040
|
-
style: {
|
|
9041
|
-
width: size,
|
|
9042
|
-
height: size
|
|
9043
|
-
}
|
|
9044
|
-
});
|
|
9045
|
-
};
|
|
9046
|
-
|
|
9047
|
-
var Treatments1$1 = function Treatments1(props) {
|
|
9048
|
-
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
9049
|
-
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
9050
|
-
_props$data = props.data,
|
|
9051
|
-
data = _props$data === void 0 ? {} : _props$data,
|
|
9052
|
-
_props$SectionTitle = props.SectionTitle,
|
|
9053
|
-
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
9054
|
-
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
9055
|
-
_shopConfigStyle$colo2 = _shopConfigStyle$colo.secondary,
|
|
9056
|
-
secondary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2;
|
|
9057
|
-
var _useState = useState({
|
|
9058
|
-
types: "1"
|
|
9059
|
-
}),
|
|
9060
|
-
params = _useState[0],
|
|
9061
|
-
setParams = _useState[1];
|
|
9062
|
-
var _CategoryController = CategoryController(_extends({}, props, {
|
|
9063
|
-
types: "1"
|
|
9064
|
-
})),
|
|
9065
|
-
categories = _CategoryController.categories;
|
|
9066
|
-
var _ProductController = ProductController(_extends({}, props, {
|
|
9067
|
-
params: params
|
|
9068
|
-
})),
|
|
9069
|
-
_ProductController$pr = _ProductController.products,
|
|
9070
|
-
products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
|
|
9071
|
-
loading = _ProductController.loading;
|
|
9072
|
-
var _useState2 = useState(0),
|
|
9073
|
-
selectedCategory = _useState2[0],
|
|
9074
|
-
setSelectedCategory = _useState2[1];
|
|
9075
|
-
useEffect(function () {
|
|
9076
|
-
var newParams = _extends({}, params, {
|
|
9077
|
-
categoryId: selectedCategory
|
|
9078
|
-
});
|
|
9079
|
-
if (!selectedCategory) {
|
|
9080
|
-
delete newParams.categoryId;
|
|
9081
|
-
}
|
|
9082
|
-
setParams(newParams);
|
|
9083
|
-
}, [selectedCategory]);
|
|
9084
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
9085
|
-
className: SECTION_DEFAULT_CLASS + " relative"
|
|
9086
|
-
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
9087
|
-
data: data,
|
|
9088
|
-
shopConfigStyle: shopConfigStyle
|
|
9089
|
-
}), /*#__PURE__*/React__default.createElement(ScrollHorizontal, {
|
|
9090
|
-
datas: [{
|
|
9091
|
-
categoryId: 0,
|
|
9092
|
-
cateName: "Tất cả"
|
|
9093
|
-
}].concat(categories),
|
|
9094
|
-
className: "mt-6 rounded-lg overflow-hidden bg-bgSecondary",
|
|
9095
|
-
renderItem: function renderItem(item, index) {
|
|
9096
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
9097
|
-
key: index,
|
|
9098
|
-
className: "p-3 flex gap-3 shrink-0 cursor-pointer text-base " + (selectedCategory === item.categoryId ? "bg-primary text-textButton" : ""),
|
|
9099
|
-
onClick: function onClick() {
|
|
9100
|
-
return setSelectedCategory(item.categoryId);
|
|
9101
|
-
}
|
|
9102
|
-
}, item === null || item === void 0 ? void 0 : item.cateName);
|
|
8974
|
+
label: "Đặt lịch ngay",
|
|
8975
|
+
shopConfigStyle: shopConfigStyle,
|
|
8976
|
+
onClick: handleSubmit
|
|
8977
|
+
})), isOpenPopup && /*#__PURE__*/React__default.createElement(ModalNotification, {
|
|
8978
|
+
onCloseFormBooking: onCloseFormBooking,
|
|
8979
|
+
onClose: handleClosePopup
|
|
8980
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
8981
|
+
className: "bg-white rounded-lg shadow-lg p-6 max-w-sm flex flex-col items-center justify-center min-w-[320px] md:min-w-[650px] min-h-[420px] md:min-h-[380px] lg:h-auto "
|
|
8982
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
8983
|
+
className: "h-20 mb-4 flex items-center justify-center"
|
|
8984
|
+
}, /*#__PURE__*/React__default.createElement(FaCheckCircle, {
|
|
8985
|
+
className: "h-full text-green-500",
|
|
8986
|
+
style: {
|
|
8987
|
+
fontSize: "150px"
|
|
9103
8988
|
}
|
|
9104
|
-
}),
|
|
9105
|
-
className: "
|
|
9106
|
-
},
|
|
9107
|
-
className: "
|
|
9108
|
-
},
|
|
9109
|
-
|
|
9110
|
-
|
|
9111
|
-
|
|
9112
|
-
|
|
9113
|
-
|
|
9114
|
-
|
|
9115
|
-
|
|
9116
|
-
|
|
9117
|
-
}));
|
|
9118
|
-
};
|
|
9119
|
-
|
|
9120
|
-
var NotFoundProduct = function NotFoundProduct() {
|
|
9121
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
9122
|
-
className: "h-60 flex flex-col justify-center items-center text-xl text-gray3"
|
|
9123
|
-
}, /*#__PURE__*/React__default.createElement(FaBoxOpen, {
|
|
9124
|
-
size: 80
|
|
9125
|
-
}), /*#__PURE__*/React__default.createElement("div", null, "Kh\xF4ng c\xF3 s\u1EA3n ph\u1EA9m"));
|
|
8989
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
8990
|
+
className: "mb-2"
|
|
8991
|
+
}, "Kh\xE1ch h\xE0ng: ", dataBooking === null || dataBooking === void 0 ? void 0 : dataBooking.customerName), /*#__PURE__*/React__default.createElement("div", {
|
|
8992
|
+
className: "mb-2"
|
|
8993
|
+
}, "S\u1ED1 \u0111i\u1EC7n tho\u1EA1i: ", dataBooking === null || dataBooking === void 0 ? void 0 : dataBooking.customerPhone), /*#__PURE__*/React__default.createElement("div", {
|
|
8994
|
+
className: "mb-4"
|
|
8995
|
+
}, "Th\u1EDDi gian: ", dayjs_min(dataBooking === null || dataBooking === void 0 ? void 0 : dataBooking.scheduleDate).format("DD/MM/YYYY")), token ? /*#__PURE__*/React__default.createElement("div", null) : /*#__PURE__*/React__default.createElement("div", {
|
|
8996
|
+
className: "flex flex-col items-center"
|
|
8997
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
8998
|
+
className: "mb-4 text-center"
|
|
8999
|
+
}, "B\u1EA1n \u0111\xE3 c\xF3 t\xE0i kho\u1EA3n, vui l\xF2ng \u0111\u0103ng nh\u1EADp \u0111\u1EC3 xem chi ti\u1EBFt c\xE1c s\u1EA3n ph\u1EA9m, d\u1ECBch v\u1EE5 li\u1EC7u tr\xECnh m\xE0 b\u1EA1n \u0111ang s\u1EDF h\u1EEFu"), /*#__PURE__*/React__default.createElement(Button, {
|
|
9000
|
+
label: "Đăng nhập",
|
|
9001
|
+
shopConfigStyle: shopConfigStyle
|
|
9002
|
+
})))));
|
|
9126
9003
|
};
|
|
9127
9004
|
|
|
9128
|
-
var
|
|
9129
|
-
var
|
|
9130
|
-
|
|
9131
|
-
_props$
|
|
9132
|
-
|
|
9005
|
+
var TreatmentsList7 = function TreatmentsList7(props) {
|
|
9006
|
+
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
9007
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
9008
|
+
_props$shopConfig = props.shopConfig,
|
|
9009
|
+
shopConfig = _props$shopConfig === void 0 ? {} : _props$shopConfig,
|
|
9010
|
+
_props$data = props.data,
|
|
9011
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
9133
9012
|
_props$SectionTitle = props.SectionTitle,
|
|
9134
|
-
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle
|
|
9135
|
-
|
|
9136
|
-
|
|
9137
|
-
|
|
9138
|
-
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
|
|
9013
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
9014
|
+
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
9015
|
+
_shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
|
|
9016
|
+
secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3;
|
|
9139
9017
|
var _useState = useState({
|
|
9140
|
-
size:
|
|
9141
|
-
types: "1"
|
|
9018
|
+
size: 10,
|
|
9019
|
+
types: "1,10",
|
|
9020
|
+
isHighlight: true
|
|
9142
9021
|
}),
|
|
9143
|
-
params = _useState[0]
|
|
9144
|
-
|
|
9145
|
-
|
|
9146
|
-
|
|
9147
|
-
|
|
9022
|
+
params = _useState[0];
|
|
9023
|
+
var _useState2 = useState(false),
|
|
9024
|
+
isOpenModal = _useState2[0],
|
|
9025
|
+
setIsOpenModal = _useState2[1];
|
|
9026
|
+
var _useState3 = useState([]),
|
|
9027
|
+
dataBooking = _useState3[0],
|
|
9028
|
+
setDataBooking = _useState3[1];
|
|
9148
9029
|
var _ProductController = ProductController(_extends({}, props, {
|
|
9149
9030
|
params: params
|
|
9150
9031
|
})),
|
|
9151
|
-
|
|
9152
|
-
|
|
9153
|
-
|
|
9154
|
-
|
|
9155
|
-
|
|
9156
|
-
|
|
9157
|
-
|
|
9158
|
-
}
|
|
9159
|
-
|
|
9032
|
+
_ProductController$pr = _ProductController.products,
|
|
9033
|
+
products = _ProductController$pr === void 0 ? [] : _ProductController$pr;
|
|
9034
|
+
console.log("treatment1:", products);
|
|
9035
|
+
var handleOpenModalBooking = function handleOpenModalBooking(event, data) {
|
|
9036
|
+
try {
|
|
9037
|
+
var _data$productInfo, _data$productInfo2;
|
|
9038
|
+
event.stopPropagation();
|
|
9039
|
+
setDataBooking([_extends({}, data, {
|
|
9040
|
+
quantity: 1,
|
|
9041
|
+
technical: {},
|
|
9042
|
+
oldService: false,
|
|
9043
|
+
label: data === null || data === void 0 ? void 0 : (_data$productInfo = data.productInfo) === null || _data$productInfo === void 0 ? void 0 : _data$productInfo.productName,
|
|
9044
|
+
value: data === null || data === void 0 ? void 0 : (_data$productInfo2 = data.productInfo) === null || _data$productInfo2 === void 0 ? void 0 : _data$productInfo2.productId
|
|
9045
|
+
})]);
|
|
9046
|
+
setIsOpenModal(true);
|
|
9047
|
+
} catch (error) {
|
|
9048
|
+
console.log("::::::::::errrorrrrr::::::", error);
|
|
9049
|
+
}
|
|
9160
9050
|
};
|
|
9161
|
-
|
|
9162
|
-
|
|
9051
|
+
var handleCloseModal = function handleCloseModal() {
|
|
9052
|
+
setIsOpenModal(false);
|
|
9053
|
+
setDataBooking([]);
|
|
9054
|
+
};
|
|
9055
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
9056
|
+
className: "" + SECTION_DEFAULT_CLASS
|
|
9163
9057
|
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
9164
9058
|
data: data,
|
|
9165
9059
|
shopConfigStyle: shopConfigStyle
|
|
9166
|
-
}),
|
|
9167
|
-
|
|
9168
|
-
|
|
9169
|
-
|
|
9170
|
-
|
|
9171
|
-
|
|
9172
|
-
|
|
9060
|
+
}), products === null || products === void 0 ? void 0 : products.map(function (product, index) {
|
|
9061
|
+
var _product$productInfo, _product$productInfo2;
|
|
9062
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
9063
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-6 mt-12",
|
|
9064
|
+
key: "rthirr-" + index
|
|
9065
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9066
|
+
className: "block " + (index % 2 ? "md:hidden" : "")
|
|
9067
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
9068
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
9069
|
+
className: "aspect-video rounded-2xl"
|
|
9070
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
9071
|
+
className: "text-left " + (index % 2 ? "md:text-right" : "")
|
|
9072
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9073
|
+
className: "font-medium text-2xl"
|
|
9074
|
+
}, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement("div", {
|
|
9075
|
+
className: "mt-4 text-textBody",
|
|
9076
|
+
dangerouslySetInnerHTML: {
|
|
9077
|
+
__html: product === null || product === void 0 ? void 0 : (_product$productInfo2 = product.productInfo) === null || _product$productInfo2 === void 0 ? void 0 : _product$productInfo2.description
|
|
9078
|
+
}
|
|
9079
|
+
}), /*#__PURE__*/React__default.createElement(Button, {
|
|
9080
|
+
label: "Đặt lịch ngay",
|
|
9173
9081
|
shopConfigStyle: shopConfigStyle,
|
|
9082
|
+
className: "mt-4",
|
|
9083
|
+
onClick: function onClick(event) {
|
|
9084
|
+
handleOpenModalBooking(event, product);
|
|
9085
|
+
}
|
|
9086
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
9087
|
+
className: "hidden " + (index % 2 ? "md:block" : "")
|
|
9088
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
9174
9089
|
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
9175
|
-
|
|
9176
|
-
});
|
|
9177
|
-
}))
|
|
9178
|
-
|
|
9179
|
-
|
|
9180
|
-
|
|
9181
|
-
|
|
9182
|
-
|
|
9090
|
+
className: "aspect-video rounded-2xl"
|
|
9091
|
+
})));
|
|
9092
|
+
})), /*#__PURE__*/React__default.createElement(Dash, {
|
|
9093
|
+
color: secondary
|
|
9094
|
+
}), isOpenModal ? /*#__PURE__*/React__default.createElement(ModalNotification, {
|
|
9095
|
+
onClose: handleCloseModal
|
|
9096
|
+
}, /*#__PURE__*/React__default.createElement(BookingForm, {
|
|
9097
|
+
className: "overflow-y-auto hide-scrollbar max-h-[80vh] !bg-bgSecondary",
|
|
9098
|
+
onCloseFormBooking: handleCloseModal,
|
|
9099
|
+
defaultValue: dataBooking,
|
|
9100
|
+
shopConfig: shopConfig,
|
|
9101
|
+
shopConfigStyle: shopConfigStyle
|
|
9102
|
+
})) : null);
|
|
9183
9103
|
};
|
|
9184
9104
|
|
|
9185
9105
|
var ProductDetailController = function ProductDetailController(props) {
|
|
@@ -9610,7 +9530,7 @@ var TreatmentItem1 = function TreatmentItem1(props) {
|
|
|
9610
9530
|
}))));
|
|
9611
9531
|
};
|
|
9612
9532
|
|
|
9613
|
-
var
|
|
9533
|
+
var ProductsList7 = function ProductsList7(props) {
|
|
9614
9534
|
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
9615
9535
|
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
9616
9536
|
_props$data = props.data,
|
|
@@ -10746,6 +10666,36 @@ var Banner3 = function Banner3(props) {
|
|
|
10746
10666
|
}));
|
|
10747
10667
|
};
|
|
10748
10668
|
|
|
10669
|
+
var Banner7 = function Banner7(props) {
|
|
10670
|
+
var _data$data;
|
|
10671
|
+
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
10672
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
10673
|
+
_props$data = props.data,
|
|
10674
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
10675
|
+
_props$SectionTitle = props.SectionTitle,
|
|
10676
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
10677
|
+
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
10678
|
+
_shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
|
|
10679
|
+
secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3;
|
|
10680
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
10681
|
+
className: "" + SECTION_DEFAULT_CLASS
|
|
10682
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
10683
|
+
data: data,
|
|
10684
|
+
shopConfigStyle: shopConfigStyle
|
|
10685
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10686
|
+
className: "mt-6 grid grid-cols-2 md:grid-cols-4 gap-1 md:gap-2"
|
|
10687
|
+
}, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (it, index) {
|
|
10688
|
+
var _it$srcImages;
|
|
10689
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10690
|
+
key: index
|
|
10691
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
10692
|
+
src: it === null || it === void 0 ? void 0 : (_it$srcImages = it.srcImages) === null || _it$srcImages === void 0 ? void 0 : _it$srcImages[0]
|
|
10693
|
+
}));
|
|
10694
|
+
}))), /*#__PURE__*/React__default.createElement(Dash, {
|
|
10695
|
+
color: secondary
|
|
10696
|
+
}));
|
|
10697
|
+
};
|
|
10698
|
+
|
|
10749
10699
|
var BannerFull1 = function BannerFull1(props) {
|
|
10750
10700
|
var data = props.data;
|
|
10751
10701
|
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
@@ -12747,5 +12697,55 @@ var ShopHighlights6 = function ShopHighlights6(props) {
|
|
|
12747
12697
|
}));
|
|
12748
12698
|
};
|
|
12749
12699
|
|
|
12750
|
-
|
|
12700
|
+
var ShopHighlights7 = function ShopHighlights7(props) {
|
|
12701
|
+
var _data$data;
|
|
12702
|
+
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
12703
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
12704
|
+
_props$data = props.data,
|
|
12705
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
12706
|
+
_props$SectionTitle = props.SectionTitle,
|
|
12707
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
12708
|
+
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
12709
|
+
_shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
|
|
12710
|
+
secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3;
|
|
12711
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
12712
|
+
className: SECTION_DEFAULT_CLASS + " relative"
|
|
12713
|
+
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
12714
|
+
data: data
|
|
12715
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
12716
|
+
className: "mt-6 grid grid-cols-3 gap-4 md:gap-8"
|
|
12717
|
+
}, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (it, index) {
|
|
12718
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
12719
|
+
key: index,
|
|
12720
|
+
className: "pt-6 col-span-3 md:col-span-1"
|
|
12721
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
12722
|
+
className: "relative w-40 h-24 flex items-center justify-center m-auto md:m-0"
|
|
12723
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
12724
|
+
className: "absolute w-40 h-24 rounded-2xl z-10 bg-primary"
|
|
12725
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
12726
|
+
className: "absolute w-24 h-16 rounded-2xl -right-2 -top-2 z-0 bg-secondary"
|
|
12727
|
+
}), it !== null && it !== void 0 && it.svgImage ? /*#__PURE__*/React__default.createElement("div", {
|
|
12728
|
+
className: "w-12 text-primary h-16 w-16 z-20 m-auto"
|
|
12729
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
12730
|
+
dangerouslySetInnerHTML: {
|
|
12731
|
+
__html: configSvg(it === null || it === void 0 ? void 0 : it.svgImage)
|
|
12732
|
+
}
|
|
12733
|
+
})) : /*#__PURE__*/React__default.createElement("div", {
|
|
12734
|
+
className: "h-16 m-auto bg-center w-16 bg-cover bg-no-repeat z-20",
|
|
12735
|
+
style: {
|
|
12736
|
+
backgroundImage: "url(" + it.srcImage + ")"
|
|
12737
|
+
}
|
|
12738
|
+
})), /*#__PURE__*/React__default.createElement("p", {
|
|
12739
|
+
className: "mx-auto md:mt-3 md:mx-0 text-xl py-2 font-medium w-fit rounded-lg"
|
|
12740
|
+
}, it.title), /*#__PURE__*/React__default.createElement("div", {
|
|
12741
|
+
className: "mx-auto md:mx-0 mb-2 w-28 h-2px rounded-full bg-secondary"
|
|
12742
|
+
}), /*#__PURE__*/React__default.createElement("p", {
|
|
12743
|
+
className: "text-base mx-auto md:mx-0 text-center md:text-start"
|
|
12744
|
+
}, it.description));
|
|
12745
|
+
}))), /*#__PURE__*/React__default.createElement(Dash, {
|
|
12746
|
+
color: secondary
|
|
12747
|
+
}));
|
|
12748
|
+
};
|
|
12749
|
+
|
|
12750
|
+
export { About1, About5, Address1, Banner1, Banner3, Banner7, BannerFull1, BannerFull2, Booking1, BookingForm6, Breadcrumb1, Button, Carts1, Contact1, CustomerRating1, CustomerRating10, CustomerRating5, CustomerRating6, DateTimePicker, Employees1, Features2, Features3, Footer1, Footer7, Gallery1, Hero1, Hero10, Hero11 as Hero12, Hero13, Hero2, Hero5, Hero6, Input, InputPhoneNumber, Links1, ModalNotification, NavBar1, NavBar7, PageTitle1, Partner1, ProductCategory2, ProductDetail10, ProductHighlight1, ProductHot1, ProductHot3, ProductItem2, ProductItem3, ProductItem4, ProductItem5, ProductItem6, ProductItem7, ProductList5, ProductSale2, ProductSearch1, Products10, Products2, Products3, ProductsList7, ProductsTop1, SearchBar2, SearchBar5, SearchBar6, SearchProduct1, SectionTitle1, SectionTitle2, SectionTitle3, Select$1 as Select, ServiceDetail1, ShopHighlights2, ShopHighlights5, ShopHighlights6, ShopHighlights7, TextArea, TreatmentDetail1, TreatmentItem1, TreatmentsCategory7, TreatmentsList6, TreatmentsList7 };
|
|
12751
12751
|
//# sourceMappingURL=index.modern.js.map
|