s-platform-landing-section 0.1.10-alpha.1 → 0.1.10-alpha.2
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 +3 -0
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1112 -921
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -14,20 +14,44 @@ import 'react-icons/io';
|
|
|
14
14
|
import { SiVisa, SiZalo } from 'react-icons/si';
|
|
15
15
|
import { GoCreditCard } from 'react-icons/go';
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
function _extends() {
|
|
18
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
19
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
20
|
+
var t = arguments[e];
|
|
21
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
22
|
+
}
|
|
23
|
+
return n;
|
|
24
|
+
}, _extends.apply(null, arguments);
|
|
25
|
+
}
|
|
26
|
+
function _objectDestructuringEmpty(t) {
|
|
27
|
+
if (null == t) throw new TypeError("Cannot destructure " + t);
|
|
28
|
+
}
|
|
29
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
30
|
+
if (null == r) return {};
|
|
31
|
+
var t = {};
|
|
32
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
33
|
+
if (e.includes(n)) continue;
|
|
34
|
+
t[n] = r[n];
|
|
35
|
+
}
|
|
36
|
+
return t;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
var Button = function Button(props) {
|
|
18
40
|
var _shopConfigStyle$colo;
|
|
19
|
-
|
|
20
|
-
label = "",
|
|
21
|
-
className =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
41
|
+
var _props$label = props.label,
|
|
42
|
+
label = _props$label === void 0 ? "" : _props$label,
|
|
43
|
+
_props$className = props.className,
|
|
44
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
45
|
+
_props$style = props.style,
|
|
46
|
+
style = _props$style === void 0 ? {} : _props$style,
|
|
47
|
+
_props$shopConfigStyl = props.shopConfigStyle,
|
|
48
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
49
|
+
_props$onClick = props.onClick,
|
|
50
|
+
onClick = _props$onClick === void 0 ? function () {} : _props$onClick;
|
|
51
|
+
var _className = "text-white font-medium rounded-lg text-sm px-4 py-2.5 " + ((shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass) || "") + " " + className;
|
|
52
|
+
var _style = _extends({
|
|
53
|
+
backgroundColor: shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : (_shopConfigStyle$colo = shopConfigStyle.color) === null || _shopConfigStyle$colo === void 0 ? void 0 : _shopConfigStyle$colo.primary
|
|
54
|
+
}, style);
|
|
31
55
|
return /*#__PURE__*/React__default.createElement("button", {
|
|
32
56
|
type: "button",
|
|
33
57
|
className: _className,
|
|
@@ -36,33 +60,49 @@ const Button = props => {
|
|
|
36
60
|
}, label);
|
|
37
61
|
};
|
|
38
62
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
63
|
+
var NavBar7 = function NavBar7(props) {
|
|
64
|
+
var listRef = useRef(null);
|
|
65
|
+
var _useState = useState(false),
|
|
66
|
+
isOpen = _useState[0],
|
|
67
|
+
setIsOpen = _useState[1];
|
|
68
|
+
var _props$shopConfig = props.shopConfig,
|
|
69
|
+
shopConfig = _props$shopConfig === void 0 ? {} : _props$shopConfig,
|
|
70
|
+
shopConfigStyle = props.shopConfigStyle,
|
|
71
|
+
_props$routes = props.routes,
|
|
72
|
+
routes = _props$routes === void 0 ? [] : _props$routes,
|
|
73
|
+
_props$section = props.section,
|
|
74
|
+
section = _props$section === void 0 ? {} : _props$section,
|
|
75
|
+
_props$userInfo = props.userInfo,
|
|
76
|
+
userInfo = _props$userInfo === void 0 ? null : _props$userInfo,
|
|
77
|
+
_props$cartItems = props.cartItems,
|
|
78
|
+
cartItems = _props$cartItems === void 0 ? [] : _props$cartItems,
|
|
79
|
+
_props$navToLogin = props.navToLogin,
|
|
80
|
+
navToLogin = _props$navToLogin === void 0 ? function () {} : _props$navToLogin,
|
|
81
|
+
_props$navToRegister = props.navToRegister,
|
|
82
|
+
navToRegister = _props$navToRegister === void 0 ? function () {} : _props$navToRegister;
|
|
83
|
+
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
84
|
+
_shopConfigStyle$colo2 = _shopConfigStyle$colo.primary,
|
|
85
|
+
primary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
|
|
86
|
+
_shopConfigStyle$colo3 = _shopConfigStyle$colo.textHeading,
|
|
87
|
+
textHeading = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
|
|
88
|
+
_shopConfigStyle$colo4 = _shopConfigStyle$colo.textBody,
|
|
89
|
+
textBody = _shopConfigStyle$colo4 === void 0 ? "#000" : _shopConfigStyle$colo4,
|
|
90
|
+
_shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
|
|
91
|
+
background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5,
|
|
92
|
+
_shopConfigStyle$colo6 = _shopConfigStyle$colo.bgSecondary,
|
|
93
|
+
bgSecondary = _shopConfigStyle$colo6 === void 0 ? "#fff" : _shopConfigStyle$colo6,
|
|
94
|
+
_shopConfigStyle$colo7 = _shopConfigStyle$colo.textButton,
|
|
95
|
+
textButton = _shopConfigStyle$colo7 === void 0 ? "#fff" : _shopConfigStyle$colo7;
|
|
96
|
+
console.log("NavBar7 routes", routes);
|
|
97
|
+
console.log("NavBar7 userInfo", userInfo);
|
|
98
|
+
console.log("NavBar7 cartItems", cartItems);
|
|
99
|
+
var totalItem = cartItems.reduce(function (total, item) {
|
|
100
|
+
return total + item.quantity;
|
|
101
|
+
}, 0);
|
|
62
102
|
if (totalItem > 9) {
|
|
63
103
|
totalItem = "9+";
|
|
64
104
|
}
|
|
65
|
-
|
|
105
|
+
var cart = function cart() {
|
|
66
106
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
67
107
|
className: "flex"
|
|
68
108
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -105,17 +145,19 @@ const NavBar7 = props => {
|
|
|
105
145
|
}
|
|
106
146
|
}, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName)), /*#__PURE__*/React__default.createElement("div", {
|
|
107
147
|
className: "hidden lg:flex flex-1 items-center gap-4"
|
|
108
|
-
}, routes === null || routes === void 0 ? void 0 : routes.map((route, index)
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
148
|
+
}, routes === null || routes === void 0 ? void 0 : routes.map(function (route, index) {
|
|
149
|
+
return /*#__PURE__*/React__default.createElement("a", {
|
|
150
|
+
href: route === null || route === void 0 ? void 0 : route.route
|
|
151
|
+
}, (section === null || section === void 0 ? void 0 : section.pageRoute) === (route === null || route === void 0 ? void 0 : route.name) ? /*#__PURE__*/React__default.createElement("div", {
|
|
152
|
+
className: "py-1 border-b",
|
|
153
|
+
style: {
|
|
154
|
+
color: textHeading,
|
|
155
|
+
borderColor: textHeading
|
|
156
|
+
}
|
|
157
|
+
}, route === null || route === void 0 ? void 0 : route.label) : /*#__PURE__*/React__default.createElement("div", {
|
|
158
|
+
className: "py-1"
|
|
159
|
+
}, route === null || route === void 0 ? void 0 : route.label));
|
|
160
|
+
})), cart(), !userInfo ?
|
|
119
161
|
/*#__PURE__*/
|
|
120
162
|
React__default.createElement("div", {
|
|
121
163
|
className: "flex justify-center"
|
|
@@ -133,7 +175,9 @@ const NavBar7 = props => {
|
|
|
133
175
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
134
176
|
label: "Đăng nhập",
|
|
135
177
|
shopConfigStyle: shopConfigStyle,
|
|
136
|
-
onClick: ()
|
|
178
|
+
onClick: function onClick() {
|
|
179
|
+
return navToLogin();
|
|
180
|
+
}
|
|
137
181
|
}), /*#__PURE__*/React__default.createElement(Button, {
|
|
138
182
|
label: "Đăng ký",
|
|
139
183
|
shopConfigStyle: shopConfigStyle,
|
|
@@ -143,7 +187,9 @@ const NavBar7 = props => {
|
|
|
143
187
|
color: primary
|
|
144
188
|
},
|
|
145
189
|
className: "border",
|
|
146
|
-
onClick: ()
|
|
190
|
+
onClick: function onClick() {
|
|
191
|
+
return navToRegister();
|
|
192
|
+
}
|
|
147
193
|
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
148
194
|
className: "relative lg:hidden flex gap-4 items-center px-4 py-2"
|
|
149
195
|
}, /*#__PURE__*/React__default.createElement("a", {
|
|
@@ -160,7 +206,7 @@ const NavBar7 = props => {
|
|
|
160
206
|
}
|
|
161
207
|
}, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName)), /*#__PURE__*/React__default.createElement("button", {
|
|
162
208
|
type: "button",
|
|
163
|
-
onClick: ()
|
|
209
|
+
onClick: function onClick() {
|
|
164
210
|
setIsOpen(true);
|
|
165
211
|
}
|
|
166
212
|
}, /*#__PURE__*/React__default.createElement(FiMenu, {
|
|
@@ -168,7 +214,7 @@ const NavBar7 = props => {
|
|
|
168
214
|
color: primary
|
|
169
215
|
})), isOpen ? /*#__PURE__*/React__default.createElement("div", {
|
|
170
216
|
className: "absolute bg-[rgba(0,0,0,0.5)] h-screen w-full top-0 left-0 z-50 flex justify-end",
|
|
171
|
-
onClick: ()
|
|
217
|
+
onClick: function onClick() {
|
|
172
218
|
setIsOpen(false);
|
|
173
219
|
}
|
|
174
220
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -176,35 +222,38 @@ const NavBar7 = props => {
|
|
|
176
222
|
style: {
|
|
177
223
|
background: bgSecondary
|
|
178
224
|
},
|
|
179
|
-
onClick:
|
|
225
|
+
onClick: function onClick(event) {
|
|
226
|
+
return event.stopPropagation();
|
|
227
|
+
}
|
|
180
228
|
}, /*#__PURE__*/React__default.createElement("button", {
|
|
181
229
|
className: "flex w-full justify-end text-gray4",
|
|
182
|
-
onClick: ()
|
|
230
|
+
onClick: function onClick() {
|
|
183
231
|
setIsOpen(false);
|
|
184
232
|
}
|
|
185
233
|
}, /*#__PURE__*/React__default.createElement(RxCross2, {
|
|
186
234
|
size: 24
|
|
187
|
-
})), /*#__PURE__*/React__default.createElement("div", null, routes === null || routes === void 0 ? void 0 : routes.map((route, index)
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
235
|
+
})), /*#__PURE__*/React__default.createElement("div", null, routes === null || routes === void 0 ? void 0 : routes.map(function (route, index) {
|
|
236
|
+
return /*#__PURE__*/React__default.createElement("a", {
|
|
237
|
+
href: route === null || route === void 0 ? void 0 : route.route
|
|
238
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
239
|
+
className: "py-2",
|
|
240
|
+
style: (section === null || section === void 0 ? void 0 : section.pageRoute) === (route === null || route === void 0 ? void 0 : route.name) ? {
|
|
241
|
+
color: textHeading
|
|
242
|
+
} : null
|
|
243
|
+
}, route === null || route === void 0 ? void 0 : route.label));
|
|
244
|
+
})))) : null, cart()));
|
|
195
245
|
};
|
|
196
246
|
|
|
197
|
-
|
|
198
|
-
className,
|
|
199
|
-
|
|
200
|
-
}) => {
|
|
247
|
+
var SvgIcon = function SvgIcon(_ref) {
|
|
248
|
+
var className = _ref.className,
|
|
249
|
+
style = _ref.style;
|
|
201
250
|
return /*#__PURE__*/React__default.createElement("svg", {
|
|
202
251
|
width: "42",
|
|
203
252
|
height: "42",
|
|
204
253
|
viewBox: "0 0 42 42",
|
|
205
254
|
fill: "none",
|
|
206
255
|
xmlns: "http://www.w3.org/2000/svg",
|
|
207
|
-
className:
|
|
256
|
+
className: "" + className,
|
|
208
257
|
style: style
|
|
209
258
|
}, /*#__PURE__*/React__default.createElement("path", {
|
|
210
259
|
d: "M21.0006 3C18.7312 3 15.091 6.90509 14.572 11.5982C10.1417 10.0788 5.15787 11.9531 4.22675 14.0991C3.22704 16.4034 5.59115 22.0699 10.1707 24.1839C10.2897 24.2388 10.417 24.2778 10.5387 24.3279C10.4967 24.3782 10.4491 24.4219 10.408 24.4731C7.21527 28.4646 7.53641 34.625 9.42347 36.2318C10.0159 36.7357 11.0046 37 12.183 37C14.7586 36.9993 18.2373 35.7431 20.4297 33.0032C20.6374 32.7437 20.8279 32.4797 21.0019 32.2141C21.181 32.4887 21.3716 32.7533 21.5728 33.0045C23.7645 35.7431 27.2401 37 29.817 37C30.9954 37 31.9853 36.7363 32.5778 36.2331C34.4648 34.625 34.7847 28.4646 31.592 24.4744C31.5521 24.4247 31.5092 24.3829 31.4689 24.3344C31.5897 24.2846 31.713 24.2382 31.8305 24.1839C36.4094 22.0699 38.7729 16.4027 37.7732 14.0991C36.8378 11.9444 31.8174 10.0959 27.4267 11.5916C26.9098 6.86354 23.2507 3 21.0006 3ZM21.0006 4.34011C22.3907 4.34011 25.8805 7.69855 26.1694 12.136C24.0016 13.2466 22.6195 14.9602 21.838 16.2414C21.647 16.5543 21.7382 16.9684 22.0422 17.1654C22.3462 17.3624 22.747 17.2689 22.938 16.9547C23.9669 15.2668 25.4278 13.9249 27.0524 13.1751C31.2559 11.2333 35.9724 13.2276 36.5882 14.6461C37.204 16.0646 35.503 21.0198 31.2989 22.9603C31.0314 23.084 30.7493 23.1895 30.4628 23.2861C29.0772 22.0357 27.5654 21.3484 26.4308 20.9855C26.0865 20.8769 25.7234 21.074 25.6175 21.4278C25.511 21.7809 25.7034 22.1555 26.0463 22.2654C27.3306 22.6761 29.1619 23.542 30.5897 25.3277C33.5213 28.9902 32.9127 34.2083 31.7505 35.1979C30.5884 36.1856 25.5067 35.8138 22.5738 32.15C22.2616 31.7601 21.9827 31.3316 21.7339 30.8805C22.3864 29.478 22.6678 28.11 22.7756 27.0657C22.8132 26.6978 22.5556 26.3684 22.1983 26.3289C21.8449 26.2893 21.5223 26.5558 21.484 26.9243C21.3404 28.3147 20.8663 30.3502 19.4261 32.15C16.4945 35.8138 11.4115 36.1883 10.2507 35.1979C9.08856 34.2089 8.4787 28.9903 11.4103 25.3264C11.5663 25.1318 11.737 24.9533 11.9064 24.7754C12.7322 24.9798 13.5911 25.0961 14.4667 25.0961C15.1448 25.0961 15.8317 25.0343 16.5119 24.9076C16.8652 24.842 17.0995 24.4928 17.0358 24.1289C16.9722 23.7644 16.6343 23.5201 16.2822 23.5871C14.3412 23.9476 12.3588 23.7248 10.7011 22.959C6.49758 21.0185 4.7972 16.0633 5.41301 14.6448C5.98748 13.3195 10.4467 11.3878 14.5174 12.9985C14.5864 15.5355 15.5457 17.5709 16.3634 18.8444C16.4881 19.0394 16.6947 19.1441 16.9052 19.1441C17.0286 19.1441 17.1538 19.1079 17.2642 19.0329C17.5637 18.8285 17.645 18.4132 17.4469 18.105C16.6973 16.9371 15.8039 15.0529 15.8039 12.7158C15.8039 7.9651 19.4936 4.34011 21.0006 4.34011Z",
|
|
@@ -217,23 +266,25 @@ const SvgIcon = ({
|
|
|
217
266
|
fill: "currentColor"
|
|
218
267
|
}));
|
|
219
268
|
};
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
shopConfigStyle = {},
|
|
223
|
-
data =
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
269
|
+
var SectionTitle1 = function SectionTitle1(props) {
|
|
270
|
+
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
271
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
272
|
+
_props$data = props.data,
|
|
273
|
+
data = _props$data === void 0 ? {} : _props$data;
|
|
274
|
+
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
275
|
+
_shopConfigStyle$colo2 = _shopConfigStyle$colo.textHeading,
|
|
276
|
+
textHeading = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
|
|
277
|
+
_shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
|
|
278
|
+
secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
|
|
279
|
+
_shopConfigStyle$colo4 = _shopConfigStyle$colo.textSecondary,
|
|
280
|
+
textSecondary = _shopConfigStyle$colo4 === void 0 ? "#000" : _shopConfigStyle$colo4;
|
|
230
281
|
return /*#__PURE__*/React__default.createElement("div", null, data !== null && data !== void 0 && data.sectionTitle ? /*#__PURE__*/React__default.createElement("div", {
|
|
231
282
|
className: "text-center text-2xl md:text-4xl font-merienda font-semibold leading-relaxed",
|
|
232
283
|
style: {
|
|
233
284
|
color: textHeading
|
|
234
285
|
}
|
|
235
286
|
}, data === null || data === void 0 ? void 0 : data.sectionTitle) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
236
|
-
className:
|
|
287
|
+
className: "flex items-center justify-center"
|
|
237
288
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
238
289
|
className: "w-32 h-0.5 rounded-full",
|
|
239
290
|
style: {
|
|
@@ -257,58 +308,57 @@ const SectionTitle1 = props => {
|
|
|
257
308
|
}, data === null || data === void 0 ? void 0 : data.sectionDescription) : null);
|
|
258
309
|
};
|
|
259
310
|
|
|
260
|
-
|
|
311
|
+
var Hero10 = function Hero10(props) {
|
|
261
312
|
var _data$data, _data$data$, _data$data$$srcImages, _sectionData$, _sectionData$2, _sectionData$2$button;
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
} = props;
|
|
266
|
-
const sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
313
|
+
var shopConfigStyle = props.shopConfigStyle,
|
|
314
|
+
data = props.data;
|
|
315
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
267
316
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
268
317
|
className: "relative w-full bg-cover bg-center bg-no-repeat ",
|
|
269
318
|
style: {
|
|
270
|
-
backgroundImage:
|
|
319
|
+
backgroundImage: "url(" + (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0]) + ")"
|
|
271
320
|
}
|
|
272
321
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
273
322
|
className: "absolute top-0 w-full h-full bg-black opacity-40 z-0"
|
|
274
323
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
275
324
|
className: "relative w-full min-h-[540px] p-12 z-10 flex flex-col gap-6 items-center justify-center"
|
|
276
325
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
277
|
-
className:
|
|
278
|
-
}, sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.title), sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$2 = sectionData[0]) === null || _sectionData$2 === void 0 ? void 0 : (_sectionData$2$button = _sectionData$2.buttons) === null || _sectionData$2$button === void 0 ? void 0 : _sectionData$2$button.map(
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
326
|
+
className: "text-3xl md:text-5xl text-white leading-[1.6] md:leading-[1.6] text-center " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.headingFont)
|
|
327
|
+
}, sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : _sectionData$.title), sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$2 = sectionData[0]) === null || _sectionData$2 === void 0 ? void 0 : (_sectionData$2$button = _sectionData$2.buttons) === null || _sectionData$2$button === void 0 ? void 0 : _sectionData$2$button.map(function (button) {
|
|
328
|
+
return /*#__PURE__*/React__default.createElement(Button, {
|
|
329
|
+
label: button === null || button === void 0 ? void 0 : button.label,
|
|
330
|
+
shopConfigStyle: shopConfigStyle
|
|
331
|
+
});
|
|
332
|
+
})));
|
|
282
333
|
};
|
|
283
334
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
color = "#ccc",
|
|
287
|
-
className =
|
|
288
|
-
|
|
335
|
+
var Dash = function Dash(props) {
|
|
336
|
+
var _props$color = props.color,
|
|
337
|
+
color = _props$color === void 0 ? "#ccc" : _props$color,
|
|
338
|
+
_props$className = props.className,
|
|
339
|
+
className = _props$className === void 0 ? "" : _props$className;
|
|
289
340
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
290
|
-
className:
|
|
341
|
+
className: "mx-auto w-full max-w-[240px] md:max-w-[720px] border-b-0 " + className,
|
|
291
342
|
style: {
|
|
292
|
-
backgroundImage:
|
|
343
|
+
backgroundImage: "repeating-linear-gradient(to right, " + color + " 0, " + color + " 10px, transparent 10px, transparent 20px)",
|
|
293
344
|
height: "1px"
|
|
294
345
|
}
|
|
295
346
|
});
|
|
296
347
|
};
|
|
297
348
|
|
|
298
|
-
|
|
349
|
+
var Hero11 = function Hero11(props) {
|
|
299
350
|
var _data$data;
|
|
300
|
-
|
|
301
|
-
shopConfigStyle = {},
|
|
302
|
-
|
|
303
|
-
data = {},
|
|
304
|
-
SectionTitle =
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
secondary = "#000",
|
|
309
|
-
|
|
310
|
-
background = "#fff"
|
|
311
|
-
} = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color;
|
|
351
|
+
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
352
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
353
|
+
_props$data = props.data,
|
|
354
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
355
|
+
_props$SectionTitle = props.SectionTitle,
|
|
356
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
357
|
+
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
358
|
+
_shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
|
|
359
|
+
secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
|
|
360
|
+
_shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
|
|
361
|
+
background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
|
|
312
362
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
313
363
|
className: "relative w-full py-12 px-4 xl:px-20",
|
|
314
364
|
style: {
|
|
@@ -319,7 +369,7 @@ const Hero11 = props => {
|
|
|
319
369
|
shopConfigStyle: shopConfigStyle
|
|
320
370
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
321
371
|
className: "mt-6 grid grid-cols-2 md:grid-cols-4 gap-1 md:gap-2"
|
|
322
|
-
}, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map((it, index)
|
|
372
|
+
}, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (it, index) {
|
|
323
373
|
var _it$srcImages;
|
|
324
374
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
325
375
|
key: index
|
|
@@ -331,26 +381,20 @@ const Hero11 = props => {
|
|
|
331
381
|
}));
|
|
332
382
|
};
|
|
333
383
|
|
|
334
|
-
|
|
384
|
+
var Hero11$1 = function Hero11(props) {
|
|
335
385
|
var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data3, _data$data3$;
|
|
336
|
-
|
|
337
|
-
shopConfigStyle = {},
|
|
338
|
-
|
|
339
|
-
data = {}
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
textHeading = "#000",
|
|
344
|
-
primary = "#000",
|
|
345
|
-
secondary = "#000",
|
|
346
|
-
textBody = "#000",
|
|
347
|
-
background = "#fff"
|
|
348
|
-
} = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color;
|
|
386
|
+
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
387
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
388
|
+
_props$data = props.data,
|
|
389
|
+
data = _props$data === void 0 ? {} : _props$data;
|
|
390
|
+
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
391
|
+
_shopConfigStyle$colo2 = _shopConfigStyle$colo.textHeading,
|
|
392
|
+
textHeading = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2;
|
|
349
393
|
console.log("Hero11 data", data);
|
|
350
394
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
351
395
|
className: "relative w-full bg-cover bg-center bg-no-repeat grid grid-cols-1 md:grid-cols-2",
|
|
352
396
|
style: {
|
|
353
|
-
backgroundImage:
|
|
397
|
+
backgroundImage: "url(" + (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0]) + ")"
|
|
354
398
|
}
|
|
355
399
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
356
400
|
className: "absolute top-0 w-full h-full bg-white opacity-60 z-0 md:hidden"
|
|
@@ -359,7 +403,7 @@ const Hero11$1 = props => {
|
|
|
359
403
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
360
404
|
className: "relative p-12 z-1"
|
|
361
405
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
362
|
-
className:
|
|
406
|
+
className: "text-2xl md:text-4xl leading-[1.6] " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.headingFont),
|
|
363
407
|
style: {
|
|
364
408
|
color: textHeading
|
|
365
409
|
}
|
|
@@ -368,6 +412,25 @@ const Hero11$1 = props => {
|
|
|
368
412
|
}, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.description)));
|
|
369
413
|
};
|
|
370
414
|
|
|
415
|
+
// A type of promise-like that resolves synchronously and supports only one observer
|
|
416
|
+
|
|
417
|
+
const _iteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator"))) : "@@iterator";
|
|
418
|
+
|
|
419
|
+
const _asyncIteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator"))) : "@@asyncIterator";
|
|
420
|
+
|
|
421
|
+
// Asynchronously call a function and send errors to recovery continuation
|
|
422
|
+
function _catch(body, recover) {
|
|
423
|
+
try {
|
|
424
|
+
var result = body();
|
|
425
|
+
} catch(e) {
|
|
426
|
+
return recover(e);
|
|
427
|
+
}
|
|
428
|
+
if (result && result.then) {
|
|
429
|
+
return result.then(void 0, recover);
|
|
430
|
+
}
|
|
431
|
+
return result;
|
|
432
|
+
}
|
|
433
|
+
|
|
371
434
|
function bind(fn, thisArg) {
|
|
372
435
|
return function wrap() {
|
|
373
436
|
return fn.apply(thisArg, arguments);
|
|
@@ -1688,12 +1751,12 @@ const hasStandardBrowserWebWorkerEnv = (() => {
|
|
|
1688
1751
|
const origin = hasBrowserEnv && window.location.href || 'http://localhost';
|
|
1689
1752
|
|
|
1690
1753
|
var utils$1 = {
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1754
|
+
__proto__: null,
|
|
1755
|
+
hasBrowserEnv: hasBrowserEnv,
|
|
1756
|
+
hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
|
|
1757
|
+
hasStandardBrowserEnv: hasStandardBrowserEnv,
|
|
1758
|
+
navigator: _navigator,
|
|
1759
|
+
origin: origin
|
|
1697
1760
|
};
|
|
1698
1761
|
|
|
1699
1762
|
var platform$1 = {
|
|
@@ -4832,8 +4895,8 @@ var callBound = function callBoundIntrinsic(name, allowMissing) {
|
|
|
4832
4895
|
var _nodeResolve_empty = {};
|
|
4833
4896
|
|
|
4834
4897
|
var _nodeResolve_empty$1 = {
|
|
4835
|
-
|
|
4836
|
-
|
|
4898
|
+
__proto__: null,
|
|
4899
|
+
'default': _nodeResolve_empty
|
|
4837
4900
|
};
|
|
4838
4901
|
|
|
4839
4902
|
var utilInspect = getCjsExportFromNamespace(_nodeResolve_empty$1);
|
|
@@ -6419,116 +6482,125 @@ var lib = {
|
|
|
6419
6482
|
stringify: stringify_1
|
|
6420
6483
|
};
|
|
6421
6484
|
|
|
6422
|
-
|
|
6485
|
+
var getBaseUrl = function getBaseUrl() {
|
|
6423
6486
|
return process.env.NEXT_PUBLIC_BASE_URL || "https://test-apigateway.sfin.vn";
|
|
6424
6487
|
};
|
|
6425
|
-
|
|
6426
|
-
request.interceptors.request.use(config
|
|
6488
|
+
var request = axios.create();
|
|
6489
|
+
request.interceptors.request.use(function (config) {
|
|
6427
6490
|
return config;
|
|
6428
|
-
}, error
|
|
6491
|
+
}, function (error) {
|
|
6429
6492
|
return Promise.reject(error.response || {
|
|
6430
6493
|
data: {}
|
|
6431
6494
|
});
|
|
6432
6495
|
});
|
|
6433
|
-
request.interceptors.response.use(response
|
|
6496
|
+
request.interceptors.response.use(function (response) {
|
|
6434
6497
|
return response;
|
|
6435
|
-
}, error
|
|
6498
|
+
}, function (error) {
|
|
6436
6499
|
return Promise.reject((error === null || error === void 0 ? void 0 : error.response) || {
|
|
6437
6500
|
data: {}
|
|
6438
6501
|
});
|
|
6439
6502
|
});
|
|
6440
|
-
|
|
6441
|
-
|
|
6442
|
-
baseURL: getBaseUrl()
|
|
6443
|
-
|
|
6444
|
-
paramsSerializer:
|
|
6445
|
-
|
|
6446
|
-
|
|
6447
|
-
|
|
6448
|
-
|
|
6449
|
-
}
|
|
6450
|
-
};
|
|
6503
|
+
var api = function api(options) {
|
|
6504
|
+
var config = _extends({
|
|
6505
|
+
baseURL: getBaseUrl()
|
|
6506
|
+
}, options, {
|
|
6507
|
+
paramsSerializer: function paramsSerializer(params) {
|
|
6508
|
+
return lib.stringify(params, {
|
|
6509
|
+
arrayFormat: "repeat"
|
|
6510
|
+
});
|
|
6511
|
+
},
|
|
6512
|
+
headers: _extends({}, options.headers)
|
|
6513
|
+
});
|
|
6451
6514
|
return request(config);
|
|
6452
6515
|
};
|
|
6453
6516
|
|
|
6454
|
-
|
|
6517
|
+
var getShopCategoriesApi = function getShopCategoriesApi(shopId, types) {
|
|
6455
6518
|
return api({
|
|
6456
6519
|
method: "get",
|
|
6457
|
-
url:
|
|
6520
|
+
url: "/landing-shop/get-product-category-on-landing",
|
|
6458
6521
|
params: {
|
|
6459
|
-
shopId,
|
|
6460
|
-
types,
|
|
6522
|
+
shopId: shopId,
|
|
6523
|
+
types: types,
|
|
6461
6524
|
isShowOnLanding: true
|
|
6462
6525
|
},
|
|
6463
6526
|
headers: {
|
|
6464
|
-
shopId
|
|
6527
|
+
shopId: shopId
|
|
6465
6528
|
}
|
|
6466
6529
|
});
|
|
6467
6530
|
};
|
|
6468
|
-
|
|
6531
|
+
var getProductListApi = function getProductListApi(shopId, params) {
|
|
6532
|
+
if (params === void 0) {
|
|
6533
|
+
params = {};
|
|
6534
|
+
}
|
|
6469
6535
|
return api({
|
|
6470
6536
|
method: "get",
|
|
6471
|
-
url:
|
|
6472
|
-
params: {
|
|
6473
|
-
shopId,
|
|
6474
|
-
isShowOnLanding: true
|
|
6475
|
-
|
|
6476
|
-
},
|
|
6537
|
+
url: "/landing-shop/get-product-on-landing",
|
|
6538
|
+
params: _extends({
|
|
6539
|
+
shopId: shopId,
|
|
6540
|
+
isShowOnLanding: true
|
|
6541
|
+
}, params),
|
|
6477
6542
|
headers: {
|
|
6478
|
-
shopId
|
|
6543
|
+
shopId: shopId
|
|
6479
6544
|
}
|
|
6480
6545
|
});
|
|
6481
6546
|
};
|
|
6482
6547
|
|
|
6483
|
-
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
|
|
6490
|
-
useEffect(()
|
|
6548
|
+
var CategoryController = function CategoryController(props) {
|
|
6549
|
+
var shopConfig = props.shopConfig,
|
|
6550
|
+
params = props.params;
|
|
6551
|
+
var _useState = useState([]),
|
|
6552
|
+
categories = _useState[0],
|
|
6553
|
+
setCategories = _useState[1];
|
|
6554
|
+
var defaultParams = {};
|
|
6555
|
+
useEffect(function () {
|
|
6491
6556
|
getCategoryList();
|
|
6492
6557
|
}, []);
|
|
6493
|
-
|
|
6558
|
+
var getCategoryList = function getCategoryList() {
|
|
6494
6559
|
try {
|
|
6495
|
-
var
|
|
6496
|
-
|
|
6497
|
-
|
|
6498
|
-
|
|
6560
|
+
var _temp = _catch(function () {
|
|
6561
|
+
return Promise.resolve(getShopCategoriesApi(shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopId, _extends({}, defaultParams, params))).then(function (res) {
|
|
6562
|
+
var _res$data, _res$data$status;
|
|
6563
|
+
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) {
|
|
6564
|
+
var _res$data2;
|
|
6565
|
+
setCategories(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data);
|
|
6566
|
+
}
|
|
6567
|
+
});
|
|
6568
|
+
}, function (e) {
|
|
6569
|
+
console.log(e);
|
|
6499
6570
|
});
|
|
6500
|
-
|
|
6501
|
-
var _res$data2;
|
|
6502
|
-
setCategories(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data);
|
|
6503
|
-
}
|
|
6571
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
6504
6572
|
} catch (e) {
|
|
6505
|
-
|
|
6573
|
+
return Promise.reject(e);
|
|
6506
6574
|
}
|
|
6507
6575
|
};
|
|
6508
6576
|
return {
|
|
6509
|
-
categories
|
|
6577
|
+
categories: categories
|
|
6510
6578
|
};
|
|
6511
6579
|
};
|
|
6512
6580
|
|
|
6513
|
-
|
|
6514
|
-
|
|
6515
|
-
|
|
6516
|
-
|
|
6517
|
-
|
|
6518
|
-
|
|
6519
|
-
|
|
6520
|
-
|
|
6521
|
-
|
|
6522
|
-
|
|
6523
|
-
|
|
6524
|
-
|
|
6525
|
-
|
|
6526
|
-
|
|
6527
|
-
|
|
6528
|
-
|
|
6529
|
-
|
|
6530
|
-
|
|
6531
|
-
|
|
6581
|
+
var Hero13 = function Hero13(props) {
|
|
6582
|
+
var listRef = useRef(null);
|
|
6583
|
+
var _useState = useState(false),
|
|
6584
|
+
isOpen = _useState[0],
|
|
6585
|
+
setIsOpen = _useState[1];
|
|
6586
|
+
var shopConfigStyle = props.shopConfigStyle,
|
|
6587
|
+
data = props.data;
|
|
6588
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
6589
|
+
var _CategoryController = CategoryController(props),
|
|
6590
|
+
_CategoryController$c = _CategoryController.categories,
|
|
6591
|
+
categories = _CategoryController$c === void 0 ? [] : _CategoryController$c;
|
|
6592
|
+
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
6593
|
+
_shopConfigStyle$colo2 = _shopConfigStyle$colo.primary,
|
|
6594
|
+
primary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
|
|
6595
|
+
_shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
|
|
6596
|
+
textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
|
|
6597
|
+
_shopConfigStyle$colo4 = _shopConfigStyle$colo.background,
|
|
6598
|
+
background = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4,
|
|
6599
|
+
_shopConfigStyle$colo5 = _shopConfigStyle$colo.bgSecondary,
|
|
6600
|
+
bgSecondary = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5,
|
|
6601
|
+
_shopConfigStyle$colo6 = _shopConfigStyle$colo.textButton,
|
|
6602
|
+
textButton = _shopConfigStyle$colo6 === void 0 ? "#fff" : _shopConfigStyle$colo6;
|
|
6603
|
+
var handleClickPrevImg = function handleClickPrevImg() {
|
|
6532
6604
|
if (listRef.current) {
|
|
6533
6605
|
listRef.current.scrollBy({
|
|
6534
6606
|
left: -90,
|
|
@@ -6536,7 +6608,7 @@ const Hero13 = props => {
|
|
|
6536
6608
|
});
|
|
6537
6609
|
}
|
|
6538
6610
|
};
|
|
6539
|
-
|
|
6611
|
+
var handleClickNextImg = function handleClickNextImg() {
|
|
6540
6612
|
if (listRef.current) {
|
|
6541
6613
|
listRef.current.scrollBy({
|
|
6542
6614
|
left: 90,
|
|
@@ -6571,7 +6643,7 @@ const Hero13 = props => {
|
|
|
6571
6643
|
}, /*#__PURE__*/React__default.createElement("a", {
|
|
6572
6644
|
href: "/"
|
|
6573
6645
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6574
|
-
className:
|
|
6646
|
+
className: "border-b-2",
|
|
6575
6647
|
style: {
|
|
6576
6648
|
color: primary,
|
|
6577
6649
|
borderColor: primary
|
|
@@ -6579,18 +6651,18 @@ const Hero13 = props => {
|
|
|
6579
6651
|
}, "Trang ch\u1EE7")), /*#__PURE__*/React__default.createElement("div", {
|
|
6580
6652
|
className: "relative group "
|
|
6581
6653
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6582
|
-
className:
|
|
6654
|
+
className: " mx-4 "
|
|
6583
6655
|
}, "Danh m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
|
|
6584
6656
|
className: "absolute hidden grid group-hover:grid grid-cols-3 lg:w-[400px] 2xl:w-[600px] ms-4 py-2 px-2 gap-2 leading-10 rounded-xl z-50",
|
|
6585
6657
|
style: {
|
|
6586
6658
|
background: bgSecondary
|
|
6587
6659
|
}
|
|
6588
|
-
}, categories && categories.length > 0 && categories.map(item
|
|
6660
|
+
}, categories && categories.length > 0 && categories.map(function (item) {
|
|
6589
6661
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
6590
|
-
key:
|
|
6662
|
+
key: "hover-" + item.categoryId,
|
|
6591
6663
|
className: "hover:bg-gray4 hover:text-white mx-auto px-6"
|
|
6592
6664
|
}, /*#__PURE__*/React__default.createElement("a", {
|
|
6593
|
-
href:
|
|
6665
|
+
href: "#"
|
|
6594
6666
|
}, /*#__PURE__*/React__default.createElement("div", null, item.cateName)));
|
|
6595
6667
|
}))), /*#__PURE__*/React__default.createElement("a", {
|
|
6596
6668
|
href: "/introduction"
|
|
@@ -6652,7 +6724,7 @@ const Hero13 = props => {
|
|
|
6652
6724
|
className: ""
|
|
6653
6725
|
}, isOpen === false ? /*#__PURE__*/React__default.createElement("button", {
|
|
6654
6726
|
type: "button",
|
|
6655
|
-
onClick: ()
|
|
6727
|
+
onClick: function onClick() {
|
|
6656
6728
|
setIsOpen(true);
|
|
6657
6729
|
}
|
|
6658
6730
|
}, /*#__PURE__*/React__default.createElement(FiMenu, {
|
|
@@ -6678,7 +6750,7 @@ const Hero13 = props => {
|
|
|
6678
6750
|
}
|
|
6679
6751
|
}, data !== null && data !== void 0 && data.sectionTitle ? data.sectionTitle : "Điện thoại Hải Anh")), /*#__PURE__*/React__default.createElement("button", {
|
|
6680
6752
|
className: "text-4xl text-gray3",
|
|
6681
|
-
onClick: ()
|
|
6753
|
+
onClick: function onClick() {
|
|
6682
6754
|
setIsOpen(false);
|
|
6683
6755
|
}
|
|
6684
6756
|
}, /*#__PURE__*/React__default.createElement(RxCross2, null))), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -6688,15 +6760,15 @@ const Hero13 = props => {
|
|
|
6688
6760
|
}, /*#__PURE__*/React__default.createElement("a", {
|
|
6689
6761
|
href: "/"
|
|
6690
6762
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6691
|
-
className:
|
|
6763
|
+
className: " border-2 rounded-lg p-4"
|
|
6692
6764
|
}, "Trang ch\u1EE7")), /*#__PURE__*/React__default.createElement("a", {
|
|
6693
6765
|
href: "/product/category"
|
|
6694
6766
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6695
|
-
className:
|
|
6767
|
+
className: "border-2 rounded-lg p-4"
|
|
6696
6768
|
}, "Danh m\u1EE5c")), /*#__PURE__*/React__default.createElement("a", {
|
|
6697
6769
|
href: "/introduction"
|
|
6698
6770
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6699
|
-
className:
|
|
6771
|
+
className: "border-2 rounded-lg p-4"
|
|
6700
6772
|
}, "Gi\u1EDBi thi\u1EC7u"))))))), /*#__PURE__*/React__default.createElement("a", {
|
|
6701
6773
|
href: "/",
|
|
6702
6774
|
className: "flex items-center"
|
|
@@ -6745,12 +6817,12 @@ const Hero13 = props => {
|
|
|
6745
6817
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6746
6818
|
className: " flex my-auto h-full overflow-x-auto hide-scrollbar",
|
|
6747
6819
|
ref: listRef
|
|
6748
|
-
}, categories && categories.length > 0 && categories.map(item
|
|
6820
|
+
}, categories && categories.length > 0 && categories.map(function (item) {
|
|
6749
6821
|
return /*#__PURE__*/React__default.createElement("button", {
|
|
6750
|
-
key:
|
|
6822
|
+
key: "cateN-" + item.categoryId,
|
|
6751
6823
|
className: "items whitespace-nowrap border-r-2 border-r-white px-6 "
|
|
6752
6824
|
}, /*#__PURE__*/React__default.createElement("a", {
|
|
6753
|
-
href:
|
|
6825
|
+
href: "/products/category?id=" + item.categoryId
|
|
6754
6826
|
}, item.cateName));
|
|
6755
6827
|
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
6756
6828
|
className: "lg:block hidden lg:col-span-1 my-auto flex "
|
|
@@ -6778,20 +6850,23 @@ const Hero13 = props => {
|
|
|
6778
6850
|
})));
|
|
6779
6851
|
};
|
|
6780
6852
|
|
|
6781
|
-
|
|
6853
|
+
var Features1 = function Features1(props) {
|
|
6782
6854
|
var _data$data;
|
|
6783
|
-
|
|
6784
|
-
shopConfigStyle = {},
|
|
6785
|
-
|
|
6786
|
-
data = {},
|
|
6787
|
-
SectionTitle =
|
|
6788
|
-
|
|
6789
|
-
|
|
6790
|
-
|
|
6791
|
-
|
|
6792
|
-
|
|
6793
|
-
|
|
6794
|
-
|
|
6855
|
+
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
6856
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
6857
|
+
_props$data = props.data,
|
|
6858
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
6859
|
+
_props$SectionTitle = props.SectionTitle,
|
|
6860
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
6861
|
+
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
6862
|
+
_shopConfigStyle$colo2 = _shopConfigStyle$colo.primary,
|
|
6863
|
+
primary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
|
|
6864
|
+
_shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
|
|
6865
|
+
secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
|
|
6866
|
+
_shopConfigStyle$colo4 = _shopConfigStyle$colo.textBody,
|
|
6867
|
+
textBody = _shopConfigStyle$colo4 === void 0 ? "#000" : _shopConfigStyle$colo4,
|
|
6868
|
+
_shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
|
|
6869
|
+
background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
|
|
6795
6870
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
6796
6871
|
className: "relative w-full py-12 px-4 xl:px-20",
|
|
6797
6872
|
style: {
|
|
@@ -6802,58 +6877,61 @@ const Features1 = props => {
|
|
|
6802
6877
|
shopConfigStyle: shopConfigStyle
|
|
6803
6878
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
6804
6879
|
className: "mt-6 grid grid-cols-3 gap-4 md:gap-8"
|
|
6805
|
-
}, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map((it, index)
|
|
6806
|
-
|
|
6807
|
-
|
|
6808
|
-
|
|
6809
|
-
|
|
6810
|
-
|
|
6811
|
-
|
|
6812
|
-
|
|
6813
|
-
|
|
6814
|
-
|
|
6815
|
-
|
|
6816
|
-
|
|
6817
|
-
|
|
6818
|
-
|
|
6819
|
-
|
|
6820
|
-
|
|
6821
|
-
|
|
6822
|
-
|
|
6823
|
-
|
|
6824
|
-
|
|
6825
|
-
|
|
6826
|
-
|
|
6827
|
-
|
|
6828
|
-
|
|
6829
|
-
|
|
6830
|
-
|
|
6831
|
-
|
|
6832
|
-
|
|
6833
|
-
|
|
6834
|
-
|
|
6835
|
-
|
|
6836
|
-
|
|
6837
|
-
|
|
6838
|
-
|
|
6839
|
-
|
|
6840
|
-
|
|
6880
|
+
}, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (it, index) {
|
|
6881
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
6882
|
+
key: index,
|
|
6883
|
+
className: "pt-6 col-span-3 md:col-span-1"
|
|
6884
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6885
|
+
className: "relative w-40 h-24 flex items-center justify-center m-auto md:m-0"
|
|
6886
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
6887
|
+
className: "absolute w-40 h-24 rounded-2xl z-10",
|
|
6888
|
+
style: {
|
|
6889
|
+
backgroundColor: primary
|
|
6890
|
+
}
|
|
6891
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
6892
|
+
className: "absolute w-24 h-16 rounded-2xl -right-2 -top-2 z-0",
|
|
6893
|
+
style: {
|
|
6894
|
+
backgroundColor: secondary
|
|
6895
|
+
}
|
|
6896
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
6897
|
+
className: "h-16 m-auto bg-center w-16 bg-cover bg-no-repeat z-20",
|
|
6898
|
+
style: {
|
|
6899
|
+
backgroundImage: "url(" + it.srcImage + ")"
|
|
6900
|
+
}
|
|
6901
|
+
})), /*#__PURE__*/React__default.createElement("p", {
|
|
6902
|
+
className: "mx-auto md:mt-3 md:mx-0 text-xl py-2 font-medium w-fit rounded-lg",
|
|
6903
|
+
style: {
|
|
6904
|
+
color: textBody
|
|
6905
|
+
}
|
|
6906
|
+
}, it.title), /*#__PURE__*/React__default.createElement("div", {
|
|
6907
|
+
className: "mx-auto md:mx-0 mb-2 w-28 h-2px rounded-full",
|
|
6908
|
+
style: {
|
|
6909
|
+
backgroundColor: secondary
|
|
6910
|
+
}
|
|
6911
|
+
}), /*#__PURE__*/React__default.createElement("p", {
|
|
6912
|
+
className: "text-base mx-auto md:mx-0 text-center md:text-start",
|
|
6913
|
+
style: {
|
|
6914
|
+
color: textBody
|
|
6915
|
+
}
|
|
6916
|
+
}, it.description));
|
|
6917
|
+
}))), /*#__PURE__*/React__default.createElement(Dash, {
|
|
6841
6918
|
color: secondary
|
|
6842
6919
|
}));
|
|
6843
6920
|
};
|
|
6844
6921
|
|
|
6845
|
-
|
|
6846
|
-
|
|
6847
|
-
|
|
6848
|
-
|
|
6849
|
-
|
|
6850
|
-
|
|
6851
|
-
|
|
6852
|
-
textBody = "#000",
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
|
|
6856
|
-
|
|
6922
|
+
var Features2 = function Features2(props) {
|
|
6923
|
+
var data = props.data,
|
|
6924
|
+
shopConfigStyle = props.shopConfigStyle;
|
|
6925
|
+
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
6926
|
+
_shopConfigStyle$colo2 = _shopConfigStyle$colo.primary,
|
|
6927
|
+
primary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
|
|
6928
|
+
_shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
|
|
6929
|
+
textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
|
|
6930
|
+
_shopConfigStyle$colo4 = _shopConfigStyle$colo.background,
|
|
6931
|
+
background = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4,
|
|
6932
|
+
_shopConfigStyle$colo5 = _shopConfigStyle$colo.bgSecondary,
|
|
6933
|
+
bgSecondary = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
|
|
6934
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
6857
6935
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
6858
6936
|
className: "w-full pt-10 px-4 xl:px-20",
|
|
6859
6937
|
style: {
|
|
@@ -6865,10 +6943,10 @@ const Features2 = props => {
|
|
|
6865
6943
|
style: {
|
|
6866
6944
|
background: bgSecondary
|
|
6867
6945
|
}
|
|
6868
|
-
}, sectionData && sectionData.length > 0 && sectionData.map((item, index)
|
|
6946
|
+
}, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
|
|
6869
6947
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
6870
6948
|
className: "flex flex-col gap-2 items-center text-sm lg:text-lg font-semibold text-center",
|
|
6871
|
-
key:
|
|
6949
|
+
key: "dfgg-" + index,
|
|
6872
6950
|
style: {
|
|
6873
6951
|
color: textBody
|
|
6874
6952
|
}
|
|
@@ -6883,20 +6961,19 @@ const Features2 = props => {
|
|
|
6883
6961
|
})));
|
|
6884
6962
|
};
|
|
6885
6963
|
|
|
6886
|
-
|
|
6887
|
-
|
|
6888
|
-
|
|
6889
|
-
|
|
6890
|
-
|
|
6891
|
-
} = props;
|
|
6892
|
-
const sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
6964
|
+
var Features3 = function Features3(props) {
|
|
6965
|
+
var shopConfigStyle = props.shopConfigStyle,
|
|
6966
|
+
shopConfig = props.shopConfig,
|
|
6967
|
+
data = props.data;
|
|
6968
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
6893
6969
|
data.sectionTitle = data.sectionTitle.replace("{shopName}", shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName);
|
|
6894
|
-
|
|
6895
|
-
|
|
6896
|
-
textBody = "#000",
|
|
6897
|
-
|
|
6898
|
-
|
|
6899
|
-
|
|
6970
|
+
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
6971
|
+
_shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
|
|
6972
|
+
textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
|
|
6973
|
+
_shopConfigStyle$colo4 = _shopConfigStyle$colo.background,
|
|
6974
|
+
background = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4,
|
|
6975
|
+
_shopConfigStyle$colo5 = _shopConfigStyle$colo.bgSecondary,
|
|
6976
|
+
bgSecondary = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
|
|
6900
6977
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
6901
6978
|
className: " w-full pt-10 px-4 xl:px-20",
|
|
6902
6979
|
style: {
|
|
@@ -6909,10 +6986,10 @@ const Features3 = props => {
|
|
|
6909
6986
|
className: "text-gray3 text-lg sm:text-xl md:text-2xl"
|
|
6910
6987
|
}, data === null || data === void 0 ? void 0 : data.sectionDescription), /*#__PURE__*/React__default.createElement("div", {
|
|
6911
6988
|
className: "grid grid-cols-2 sm:grid-cols-4 gap-6 mt-6 text-sm md:text-base"
|
|
6912
|
-
}, sectionData && sectionData.length > 0 && sectionData.map((item, index)
|
|
6989
|
+
}, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
|
|
6913
6990
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
6914
6991
|
className: "grid grid-cols-2 p-3 rounded-lg font-semibold",
|
|
6915
|
-
key:
|
|
6992
|
+
key: "dfsdfj-" + index,
|
|
6916
6993
|
style: {
|
|
6917
6994
|
background: bgSecondary
|
|
6918
6995
|
}
|
|
@@ -6923,55 +7000,59 @@ const Features3 = props => {
|
|
|
6923
7000
|
})));
|
|
6924
7001
|
};
|
|
6925
7002
|
|
|
6926
|
-
|
|
6927
|
-
|
|
6928
|
-
|
|
6929
|
-
|
|
6930
|
-
isAutoGetList = true
|
|
6931
|
-
|
|
6932
|
-
|
|
6933
|
-
|
|
7003
|
+
var ProductController = function ProductController(props) {
|
|
7004
|
+
var shopConfig = props.shopConfig,
|
|
7005
|
+
params = props.params,
|
|
7006
|
+
_props$isAutoGetList = props.isAutoGetList,
|
|
7007
|
+
isAutoGetList = _props$isAutoGetList === void 0 ? true : _props$isAutoGetList;
|
|
7008
|
+
var _useState = useState([]),
|
|
7009
|
+
products = _useState[0],
|
|
7010
|
+
setProducts = _useState[1];
|
|
7011
|
+
var defaultParams = {
|
|
6934
7012
|
page: 0,
|
|
6935
7013
|
size: 8,
|
|
6936
7014
|
types: "0"
|
|
6937
7015
|
};
|
|
6938
|
-
useEffect(()
|
|
7016
|
+
useEffect(function () {
|
|
6939
7017
|
if (isAutoGetList) {
|
|
6940
7018
|
getProductList();
|
|
6941
7019
|
}
|
|
6942
7020
|
}, [params, isAutoGetList]);
|
|
6943
|
-
|
|
7021
|
+
var getProductList = function getProductList() {
|
|
6944
7022
|
try {
|
|
6945
|
-
var
|
|
6946
|
-
|
|
6947
|
-
|
|
6948
|
-
|
|
7023
|
+
var _temp = _catch(function () {
|
|
7024
|
+
return Promise.resolve(getProductListApi(shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopId, _extends({}, defaultParams, params))).then(function (res) {
|
|
7025
|
+
var _res$data, _res$data$status;
|
|
7026
|
+
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) {
|
|
7027
|
+
var _res$data2;
|
|
7028
|
+
setProducts(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data);
|
|
7029
|
+
}
|
|
7030
|
+
});
|
|
7031
|
+
}, function (e) {
|
|
7032
|
+
console.log(e);
|
|
6949
7033
|
});
|
|
6950
|
-
|
|
6951
|
-
var _res$data2;
|
|
6952
|
-
setProducts(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data);
|
|
6953
|
-
}
|
|
7034
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
6954
7035
|
} catch (e) {
|
|
6955
|
-
|
|
7036
|
+
return Promise.reject(e);
|
|
6956
7037
|
}
|
|
6957
7038
|
};
|
|
6958
7039
|
return {
|
|
6959
|
-
products
|
|
7040
|
+
products: products
|
|
6960
7041
|
};
|
|
6961
7042
|
};
|
|
6962
7043
|
|
|
6963
7044
|
var _path, _path2, _path3;
|
|
6964
|
-
function _extends() {
|
|
6965
|
-
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
7045
|
+
function _extends$1() {
|
|
7046
|
+
return _extends$1 = Object.assign ? Object.assign.bind() : function (n) {
|
|
6966
7047
|
for (var e = 1; e < arguments.length; e++) {
|
|
6967
7048
|
var t = arguments[e];
|
|
6968
7049
|
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
6969
7050
|
}
|
|
6970
7051
|
return n;
|
|
6971
|
-
}, _extends.apply(null, arguments);
|
|
7052
|
+
}, _extends$1.apply(null, arguments);
|
|
6972
7053
|
}
|
|
6973
7054
|
function SvgImageGallery(props) {
|
|
6974
|
-
return /*#__PURE__*/createElement("svg", _extends({
|
|
7055
|
+
return /*#__PURE__*/createElement("svg", _extends$1({
|
|
6975
7056
|
height: 512,
|
|
6976
7057
|
viewBox: "0 0 24 24",
|
|
6977
7058
|
width: 512,
|
|
@@ -6985,13 +7066,11 @@ function SvgImageGallery(props) {
|
|
|
6985
7066
|
})));
|
|
6986
7067
|
}
|
|
6987
7068
|
|
|
6988
|
-
|
|
6989
|
-
|
|
6990
|
-
|
|
6991
|
-
className = ""
|
|
6992
|
-
} = props;
|
|
7069
|
+
var DefaultImage = function DefaultImage(props) {
|
|
7070
|
+
var _props$className = props.className,
|
|
7071
|
+
className = _props$className === void 0 ? "" : _props$className;
|
|
6993
7072
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
6994
|
-
className:
|
|
7073
|
+
className: "flex justify-center items-center w-full aspect-square " + className,
|
|
6995
7074
|
style: {
|
|
6996
7075
|
backgroundColor: "#FAFAFA"
|
|
6997
7076
|
}
|
|
@@ -7001,24 +7080,26 @@ const DefaultImage = props => {
|
|
|
7001
7080
|
fill: "#D9D9D9"
|
|
7002
7081
|
}));
|
|
7003
7082
|
};
|
|
7004
|
-
|
|
7005
|
-
|
|
7006
|
-
size = 0,
|
|
7007
|
-
|
|
7008
|
-
|
|
7009
|
-
|
|
7010
|
-
|
|
7011
|
-
|
|
7083
|
+
var ProductImage = function ProductImage(props) {
|
|
7084
|
+
var _props$size2 = props.size,
|
|
7085
|
+
size = _props$size2 === void 0 ? 0 : _props$size2,
|
|
7086
|
+
_props$className2 = props.className,
|
|
7087
|
+
className = _props$className2 === void 0 ? "" : _props$className2,
|
|
7088
|
+
product = props.product;
|
|
7089
|
+
var _useState = useState(""),
|
|
7090
|
+
src = _useState[0],
|
|
7091
|
+
setSrc = _useState[1];
|
|
7092
|
+
useEffect(function () {
|
|
7012
7093
|
getProductImage();
|
|
7013
7094
|
}, [product]);
|
|
7014
|
-
|
|
7095
|
+
var getProductImage = function getProductImage() {
|
|
7015
7096
|
var _JSON$parse, _JSON$parse$;
|
|
7016
|
-
|
|
7097
|
+
var src = (_JSON$parse = JSON.parse((product === null || product === void 0 ? void 0 : product.imagesUrl) || "[]")) === null || _JSON$parse === void 0 ? void 0 : (_JSON$parse$ = _JSON$parse[0]) === null || _JSON$parse$ === void 0 ? void 0 : _JSON$parse$.imageUrl;
|
|
7017
7098
|
setSrc(src);
|
|
7018
7099
|
};
|
|
7019
7100
|
return src ? /*#__PURE__*/React__default.createElement("img", {
|
|
7020
7101
|
src: src,
|
|
7021
|
-
className:
|
|
7102
|
+
className: "w-full aspect-square " + className,
|
|
7022
7103
|
style: size ? {
|
|
7023
7104
|
width: size,
|
|
7024
7105
|
height: size
|
|
@@ -7029,28 +7110,29 @@ const ProductImage = props => {
|
|
|
7029
7110
|
});
|
|
7030
7111
|
};
|
|
7031
7112
|
|
|
7032
|
-
|
|
7033
|
-
|
|
7034
|
-
shopConfigStyle = {},
|
|
7035
|
-
|
|
7036
|
-
data = {},
|
|
7037
|
-
SectionTitle =
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
secondary = "#000",
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
|
|
7045
|
-
|
|
7046
|
-
|
|
7047
|
-
|
|
7048
|
-
|
|
7049
|
-
|
|
7050
|
-
|
|
7051
|
-
|
|
7052
|
-
|
|
7053
|
-
|
|
7113
|
+
var Treatments1 = function Treatments1(props) {
|
|
7114
|
+
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
7115
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
7116
|
+
_props$data = props.data,
|
|
7117
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
7118
|
+
_props$SectionTitle = props.SectionTitle,
|
|
7119
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
7120
|
+
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
7121
|
+
_shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
|
|
7122
|
+
secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
|
|
7123
|
+
_shopConfigStyle$colo4 = _shopConfigStyle$colo.textBody,
|
|
7124
|
+
textBody = _shopConfigStyle$colo4 === void 0 ? "#000" : _shopConfigStyle$colo4,
|
|
7125
|
+
_shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
|
|
7126
|
+
background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
|
|
7127
|
+
var _useState = useState({
|
|
7128
|
+
size: 1
|
|
7129
|
+
}),
|
|
7130
|
+
params = _useState[0];
|
|
7131
|
+
var _ProductController = ProductController(_extends({}, props, {
|
|
7132
|
+
params: params
|
|
7133
|
+
})),
|
|
7134
|
+
_ProductController$pr = _ProductController.products,
|
|
7135
|
+
products = _ProductController$pr === void 0 ? [] : _ProductController$pr;
|
|
7054
7136
|
console.log("Treatments1 products 1", products);
|
|
7055
7137
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
7056
7138
|
className: "relative w-full py-12 px-4 xl:px-20",
|
|
@@ -7060,7 +7142,7 @@ const Treatments1 = props => {
|
|
|
7060
7142
|
}, /*#__PURE__*/React__default.createElement(SectionTitle, {
|
|
7061
7143
|
data: data,
|
|
7062
7144
|
shopConfigStyle: shopConfigStyle
|
|
7063
|
-
}), products === null || products === void 0 ? void 0 : products.map((product, index)
|
|
7145
|
+
}), products === null || products === void 0 ? void 0 : products.map(function (product, index) {
|
|
7064
7146
|
var _product$productInfo, _product$productInfo2;
|
|
7065
7147
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7066
7148
|
className: "grid grid-cols-1 md:grid-cols-2 gap-6 mt-12",
|
|
@@ -7069,7 +7151,7 @@ const Treatments1 = props => {
|
|
|
7069
7151
|
product: product === null || product === void 0 ? void 0 : product.productInfo,
|
|
7070
7152
|
className: "aspect-video rounded-2xl"
|
|
7071
7153
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7072
|
-
className:
|
|
7154
|
+
className: "" + (index % 2 ? "text-right" : "text-left")
|
|
7073
7155
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7074
7156
|
className: "font-medium text-2xl",
|
|
7075
7157
|
style: {
|
|
@@ -7097,17 +7179,17 @@ const Treatments1 = props => {
|
|
|
7097
7179
|
};
|
|
7098
7180
|
|
|
7099
7181
|
var _path$1;
|
|
7100
|
-
function _extends$
|
|
7101
|
-
return _extends$
|
|
7182
|
+
function _extends$2() {
|
|
7183
|
+
return _extends$2 = Object.assign ? Object.assign.bind() : function (n) {
|
|
7102
7184
|
for (var e = 1; e < arguments.length; e++) {
|
|
7103
7185
|
var t = arguments[e];
|
|
7104
7186
|
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
7105
7187
|
}
|
|
7106
7188
|
return n;
|
|
7107
|
-
}, _extends$
|
|
7189
|
+
}, _extends$2.apply(null, arguments);
|
|
7108
7190
|
}
|
|
7109
7191
|
function SvgAngleSmallLeft(props) {
|
|
7110
|
-
return /*#__PURE__*/createElement("svg", _extends$
|
|
7192
|
+
return /*#__PURE__*/createElement("svg", _extends$2({
|
|
7111
7193
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7112
7194
|
viewBox: "0 0 24 24",
|
|
7113
7195
|
width: 512,
|
|
@@ -7118,17 +7200,17 @@ function SvgAngleSmallLeft(props) {
|
|
|
7118
7200
|
}
|
|
7119
7201
|
|
|
7120
7202
|
var _path$2;
|
|
7121
|
-
function _extends$
|
|
7122
|
-
return _extends$
|
|
7203
|
+
function _extends$3() {
|
|
7204
|
+
return _extends$3 = Object.assign ? Object.assign.bind() : function (n) {
|
|
7123
7205
|
for (var e = 1; e < arguments.length; e++) {
|
|
7124
7206
|
var t = arguments[e];
|
|
7125
7207
|
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
7126
7208
|
}
|
|
7127
7209
|
return n;
|
|
7128
|
-
}, _extends$
|
|
7210
|
+
}, _extends$3.apply(null, arguments);
|
|
7129
7211
|
}
|
|
7130
7212
|
function SvgAngleSmallRight(props) {
|
|
7131
|
-
return /*#__PURE__*/createElement("svg", _extends$
|
|
7213
|
+
return /*#__PURE__*/createElement("svg", _extends$3({
|
|
7132
7214
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7133
7215
|
viewBox: "0 0 24 24",
|
|
7134
7216
|
width: 512,
|
|
@@ -7138,29 +7220,35 @@ function SvgAngleSmallRight(props) {
|
|
|
7138
7220
|
})));
|
|
7139
7221
|
}
|
|
7140
7222
|
|
|
7141
|
-
|
|
7142
|
-
|
|
7143
|
-
datas = [],
|
|
7144
|
-
className =
|
|
7145
|
-
|
|
7146
|
-
|
|
7147
|
-
|
|
7148
|
-
|
|
7149
|
-
|
|
7150
|
-
|
|
7151
|
-
|
|
7152
|
-
|
|
7223
|
+
var ScrollHorizontal = function ScrollHorizontal(props) {
|
|
7224
|
+
var _props$datas = props.datas,
|
|
7225
|
+
datas = _props$datas === void 0 ? [] : _props$datas,
|
|
7226
|
+
_props$className = props.className,
|
|
7227
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
7228
|
+
_props$style = props.style,
|
|
7229
|
+
style = _props$style === void 0 ? {} : _props$style,
|
|
7230
|
+
_props$primaryColor = props.primaryColor,
|
|
7231
|
+
primaryColor = _props$primaryColor === void 0 ? "" : _props$primaryColor,
|
|
7232
|
+
_props$renderItem = props.renderItem,
|
|
7233
|
+
renderItem = _props$renderItem === void 0 ? function () {} : _props$renderItem;
|
|
7234
|
+
var scrollContainerRef = useRef(null);
|
|
7235
|
+
var _useState = useState(true),
|
|
7236
|
+
isScrolledToLeft = _useState[0],
|
|
7237
|
+
setIsScrolledToLeft = _useState[1];
|
|
7238
|
+
var _useState2 = useState(false),
|
|
7239
|
+
isScrolledToRight = _useState2[0],
|
|
7240
|
+
setIsScrolledToRight = _useState2[1];
|
|
7241
|
+
var checkScrollPosition = function checkScrollPosition() {
|
|
7153
7242
|
if (scrollContainerRef.current) {
|
|
7154
|
-
|
|
7155
|
-
scrollLeft,
|
|
7156
|
-
scrollWidth,
|
|
7157
|
-
clientWidth
|
|
7158
|
-
|
|
7159
|
-
|
|
7160
|
-
setIsScrolledToRight(scrollLeft + clientWidth >= scrollWidth);
|
|
7243
|
+
var _scrollContainerRef$c = scrollContainerRef.current,
|
|
7244
|
+
_scrollLeft = _scrollContainerRef$c.scrollLeft,
|
|
7245
|
+
scrollWidth = _scrollContainerRef$c.scrollWidth,
|
|
7246
|
+
clientWidth = _scrollContainerRef$c.clientWidth;
|
|
7247
|
+
setIsScrolledToLeft(_scrollLeft === 0);
|
|
7248
|
+
setIsScrolledToRight(_scrollLeft + clientWidth >= scrollWidth);
|
|
7161
7249
|
}
|
|
7162
7250
|
};
|
|
7163
|
-
|
|
7251
|
+
var scrollLeft = function scrollLeft() {
|
|
7164
7252
|
if (scrollContainerRef.current) {
|
|
7165
7253
|
scrollContainerRef.current.scrollBy({
|
|
7166
7254
|
left: -200,
|
|
@@ -7169,7 +7257,7 @@ const ScrollHorizontal = props => {
|
|
|
7169
7257
|
setTimeout(checkScrollPosition, 300);
|
|
7170
7258
|
}
|
|
7171
7259
|
};
|
|
7172
|
-
|
|
7260
|
+
var scrollRight = function scrollRight() {
|
|
7173
7261
|
if (scrollContainerRef.current) {
|
|
7174
7262
|
scrollContainerRef.current.scrollBy({
|
|
7175
7263
|
left: 200,
|
|
@@ -7178,17 +7266,19 @@ const ScrollHorizontal = props => {
|
|
|
7178
7266
|
setTimeout(checkScrollPosition, 300);
|
|
7179
7267
|
}
|
|
7180
7268
|
};
|
|
7181
|
-
useEffect(()
|
|
7269
|
+
useEffect(function () {
|
|
7182
7270
|
checkScrollPosition();
|
|
7183
7271
|
}, [datas]);
|
|
7184
7272
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7185
|
-
className:
|
|
7273
|
+
className: "flex " + className,
|
|
7186
7274
|
style: style
|
|
7187
7275
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7188
|
-
className:
|
|
7276
|
+
className: "flex w-full overflow-x-hidden",
|
|
7189
7277
|
ref: scrollContainerRef,
|
|
7190
7278
|
onScroll: checkScrollPosition
|
|
7191
|
-
}, datas === null || datas === void 0 ? void 0 : datas.map(
|
|
7279
|
+
}, datas === null || datas === void 0 ? void 0 : datas.map(function (item, index) {
|
|
7280
|
+
return renderItem(item, index);
|
|
7281
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
7192
7282
|
className: "flex gap-2 items-center px-4"
|
|
7193
7283
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7194
7284
|
onClick: scrollLeft,
|
|
@@ -7213,27 +7303,29 @@ const ScrollHorizontal = props => {
|
|
|
7213
7303
|
}))));
|
|
7214
7304
|
};
|
|
7215
7305
|
|
|
7216
|
-
|
|
7306
|
+
var getDurationValue = function getDurationValue(attributes) {
|
|
7217
7307
|
var _parsedAttributes$fin;
|
|
7218
|
-
|
|
7219
|
-
return ((_parsedAttributes$fin = parsedAttributes.find(
|
|
7308
|
+
var parsedAttributes = JSON.parse(attributes || "[]");
|
|
7309
|
+
return ((_parsedAttributes$fin = parsedAttributes.find(function (attr) {
|
|
7310
|
+
return attr.name === "Thời lượng (phút) / buổi";
|
|
7311
|
+
})) === null || _parsedAttributes$fin === void 0 ? void 0 : _parsedAttributes$fin.value[0]) || "0";
|
|
7220
7312
|
};
|
|
7221
7313
|
|
|
7222
|
-
|
|
7314
|
+
var formatCurrency = function formatCurrency(amount) {
|
|
7223
7315
|
if (isNaN(amount)) {
|
|
7224
7316
|
return '0 ₫';
|
|
7225
7317
|
}
|
|
7226
|
-
|
|
7227
|
-
|
|
7228
|
-
return
|
|
7318
|
+
var roundedAmount = Math.round(amount);
|
|
7319
|
+
var formattedAmount = roundedAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
|
|
7320
|
+
return formattedAmount + " \u20AB";
|
|
7229
7321
|
};
|
|
7230
7322
|
|
|
7231
|
-
|
|
7232
|
-
|
|
7233
|
-
|
|
7234
|
-
className = "",
|
|
7235
|
-
style =
|
|
7236
|
-
|
|
7323
|
+
var ProductPrice = function ProductPrice(props) {
|
|
7324
|
+
var product = props.product,
|
|
7325
|
+
_props$className = props.className,
|
|
7326
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
7327
|
+
_props$style = props.style,
|
|
7328
|
+
style = _props$style === void 0 ? {} : _props$style;
|
|
7237
7329
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7238
7330
|
className: className
|
|
7239
7331
|
}, product !== null && product !== void 0 && product.priceBeforeDiscount ? /*#__PURE__*/React__default.createElement("span", {
|
|
@@ -7244,10 +7336,8 @@ const ProductPrice = props => {
|
|
|
7244
7336
|
}, formatCurrency(product === null || product === void 0 ? void 0 : product.price)));
|
|
7245
7337
|
};
|
|
7246
7338
|
|
|
7247
|
-
|
|
7248
|
-
|
|
7249
|
-
product
|
|
7250
|
-
} = props;
|
|
7339
|
+
var ProductItem1 = function ProductItem1(props) {
|
|
7340
|
+
var product = props.product;
|
|
7251
7341
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7252
7342
|
className: "flex"
|
|
7253
7343
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
@@ -7266,33 +7356,36 @@ const ProductItem1 = props => {
|
|
|
7266
7356
|
}))));
|
|
7267
7357
|
};
|
|
7268
7358
|
|
|
7269
|
-
|
|
7270
|
-
|
|
7271
|
-
shopConfigStyle = {},
|
|
7272
|
-
|
|
7273
|
-
data = {},
|
|
7274
|
-
SectionTitle =
|
|
7275
|
-
|
|
7276
|
-
|
|
7277
|
-
|
|
7278
|
-
|
|
7279
|
-
|
|
7280
|
-
|
|
7281
|
-
|
|
7282
|
-
|
|
7283
|
-
|
|
7284
|
-
|
|
7285
|
-
|
|
7286
|
-
|
|
7287
|
-
|
|
7288
|
-
|
|
7289
|
-
|
|
7290
|
-
|
|
7291
|
-
|
|
7292
|
-
|
|
7293
|
-
|
|
7294
|
-
|
|
7295
|
-
|
|
7359
|
+
var Treatments1$1 = function Treatments1(props) {
|
|
7360
|
+
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
7361
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
7362
|
+
_props$data = props.data,
|
|
7363
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
7364
|
+
_props$SectionTitle = props.SectionTitle,
|
|
7365
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
7366
|
+
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
7367
|
+
_shopConfigStyle$colo2 = _shopConfigStyle$colo.primary,
|
|
7368
|
+
primary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
|
|
7369
|
+
_shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
|
|
7370
|
+
secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
|
|
7371
|
+
_shopConfigStyle$colo4 = _shopConfigStyle$colo.textBody,
|
|
7372
|
+
textBody = _shopConfigStyle$colo4 === void 0 ? "#000" : _shopConfigStyle$colo4,
|
|
7373
|
+
_shopConfigStyle$colo5 = _shopConfigStyle$colo.textButton,
|
|
7374
|
+
textButton = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5,
|
|
7375
|
+
_shopConfigStyle$colo6 = _shopConfigStyle$colo.background,
|
|
7376
|
+
background = _shopConfigStyle$colo6 === void 0 ? "#fff" : _shopConfigStyle$colo6;
|
|
7377
|
+
var _useState = useState({}),
|
|
7378
|
+
params = _useState[0];
|
|
7379
|
+
var _CategoryController = CategoryController(_extends({}, props)),
|
|
7380
|
+
categories = _CategoryController.categories;
|
|
7381
|
+
var _ProductController = ProductController(_extends({}, props, {
|
|
7382
|
+
params: params
|
|
7383
|
+
})),
|
|
7384
|
+
_ProductController$pr = _ProductController.products,
|
|
7385
|
+
products = _ProductController$pr === void 0 ? [] : _ProductController$pr;
|
|
7386
|
+
var _useState2 = useState(0),
|
|
7387
|
+
selectedCategory = _useState2[0],
|
|
7388
|
+
setSelectedCategory = _useState2[1];
|
|
7296
7389
|
console.log("Treatments2 products");
|
|
7297
7390
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
7298
7391
|
className: "relative w-full py-12 px-4 xl:px-20",
|
|
@@ -7306,35 +7399,39 @@ const Treatments1$1 = props => {
|
|
|
7306
7399
|
datas: [{
|
|
7307
7400
|
categoryId: 0,
|
|
7308
7401
|
cateName: "Tất cả"
|
|
7309
|
-
}
|
|
7402
|
+
}].concat(categories),
|
|
7310
7403
|
style: {
|
|
7311
7404
|
backgroundColor: secondary
|
|
7312
7405
|
},
|
|
7313
7406
|
className: "mt-6 rounded-lg overflow-hidden",
|
|
7314
7407
|
primaryColor: primary,
|
|
7315
|
-
renderItem: (item, index)
|
|
7316
|
-
|
|
7317
|
-
|
|
7318
|
-
|
|
7319
|
-
|
|
7320
|
-
|
|
7321
|
-
|
|
7322
|
-
|
|
7323
|
-
|
|
7408
|
+
renderItem: function renderItem(item, index) {
|
|
7409
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7410
|
+
key: index,
|
|
7411
|
+
className: "p-3 flex gap-3 shrink-0 cursor-pointer text-base",
|
|
7412
|
+
onClick: function onClick() {
|
|
7413
|
+
return setSelectedCategory(item.categoryId);
|
|
7414
|
+
},
|
|
7415
|
+
style: {
|
|
7416
|
+
backgroundColor: selectedCategory === item.categoryId ? primary : "inherit",
|
|
7417
|
+
color: selectedCategory === item.categoryId ? textButton : textBody
|
|
7418
|
+
}
|
|
7419
|
+
}, item === null || item === void 0 ? void 0 : item.cateName);
|
|
7420
|
+
}
|
|
7324
7421
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7325
7422
|
className: "grid grid-cols-1 md:grid-cols-2 gap-10 mt-6"
|
|
7326
|
-
}, products === null || products === void 0 ? void 0 : products.map((product, index)
|
|
7327
|
-
|
|
7328
|
-
|
|
7329
|
-
|
|
7423
|
+
}, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
|
|
7424
|
+
return /*#__PURE__*/React__default.createElement(ProductItem1, {
|
|
7425
|
+
key: index,
|
|
7426
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo
|
|
7427
|
+
});
|
|
7428
|
+
}))), /*#__PURE__*/React__default.createElement(Dash, {
|
|
7330
7429
|
color: secondary
|
|
7331
7430
|
}));
|
|
7332
7431
|
};
|
|
7333
7432
|
|
|
7334
|
-
|
|
7335
|
-
|
|
7336
|
-
product
|
|
7337
|
-
} = props;
|
|
7433
|
+
var ProductItem2 = function ProductItem2(props) {
|
|
7434
|
+
var product = props.product;
|
|
7338
7435
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7339
7436
|
className: "text-center"
|
|
7340
7437
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
@@ -7348,29 +7445,27 @@ const ProductItem2 = props => {
|
|
|
7348
7445
|
}, product === null || product === void 0 ? void 0 : product.productName));
|
|
7349
7446
|
};
|
|
7350
7447
|
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
shopConfigStyle = {},
|
|
7354
|
-
|
|
7355
|
-
data = {},
|
|
7356
|
-
SectionTitle =
|
|
7357
|
-
|
|
7358
|
-
|
|
7359
|
-
|
|
7360
|
-
secondary = "#000",
|
|
7361
|
-
|
|
7362
|
-
|
|
7363
|
-
|
|
7364
|
-
|
|
7365
|
-
|
|
7366
|
-
|
|
7367
|
-
}
|
|
7368
|
-
|
|
7369
|
-
|
|
7370
|
-
|
|
7371
|
-
|
|
7372
|
-
params
|
|
7373
|
-
});
|
|
7448
|
+
var Products1 = function Products1(props) {
|
|
7449
|
+
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
7450
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
7451
|
+
_props$data = props.data,
|
|
7452
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
7453
|
+
_props$SectionTitle = props.SectionTitle,
|
|
7454
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
7455
|
+
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
7456
|
+
_shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
|
|
7457
|
+
secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
|
|
7458
|
+
_shopConfigStyle$colo6 = _shopConfigStyle$colo.background,
|
|
7459
|
+
background = _shopConfigStyle$colo6 === void 0 ? "#fff" : _shopConfigStyle$colo6;
|
|
7460
|
+
var _useState = useState({
|
|
7461
|
+
size: 4
|
|
7462
|
+
}),
|
|
7463
|
+
params = _useState[0];
|
|
7464
|
+
var _ProductController = ProductController(_extends({}, props, {
|
|
7465
|
+
params: params
|
|
7466
|
+
})),
|
|
7467
|
+
_ProductController$pr = _ProductController.products,
|
|
7468
|
+
products = _ProductController$pr === void 0 ? [] : _ProductController$pr;
|
|
7374
7469
|
console.log("Products1 products");
|
|
7375
7470
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
7376
7471
|
className: "w-full py-12 px-4 xl:px-20 text-center",
|
|
@@ -7382,10 +7477,12 @@ const Products1 = props => {
|
|
|
7382
7477
|
shopConfigStyle: shopConfigStyle
|
|
7383
7478
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7384
7479
|
className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-10 mt-12"
|
|
7385
|
-
}, products === null || products === void 0 ? void 0 : products.map((product, index)
|
|
7386
|
-
|
|
7387
|
-
|
|
7388
|
-
|
|
7480
|
+
}, products === null || products === void 0 ? void 0 : products.map(function (product, index) {
|
|
7481
|
+
return /*#__PURE__*/React__default.createElement(ProductItem2, {
|
|
7482
|
+
key: index,
|
|
7483
|
+
product: product === null || product === void 0 ? void 0 : product.productInfo
|
|
7484
|
+
});
|
|
7485
|
+
})), /*#__PURE__*/React__default.createElement(Button, {
|
|
7389
7486
|
label: "Xem tất cả",
|
|
7390
7487
|
shopConfigStyle: shopConfigStyle,
|
|
7391
7488
|
className: "mt-12"
|
|
@@ -7394,12 +7491,10 @@ const Products1 = props => {
|
|
|
7394
7491
|
}));
|
|
7395
7492
|
};
|
|
7396
7493
|
|
|
7397
|
-
|
|
7494
|
+
var ItemProduct = function ItemProduct(props) {
|
|
7398
7495
|
var _shopConfigStyle$colo, _shopConfigStyle$colo2, _shopConfigStyle$colo3;
|
|
7399
|
-
|
|
7400
|
-
|
|
7401
|
-
shopConfigStyle
|
|
7402
|
-
} = props;
|
|
7496
|
+
var product = props.product,
|
|
7497
|
+
shopConfigStyle = props.shopConfigStyle;
|
|
7403
7498
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7404
7499
|
className: "pb-4 rounded-2xl w-full",
|
|
7405
7500
|
style: {
|
|
@@ -7408,7 +7503,7 @@ const ItemProduct = props => {
|
|
|
7408
7503
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7409
7504
|
className: "relative pt-2 flex justify-center h-32 sm:h-40 lg:h-52"
|
|
7410
7505
|
}, /*#__PURE__*/React__default.createElement("a", {
|
|
7411
|
-
href:
|
|
7506
|
+
href: "#"
|
|
7412
7507
|
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
7413
7508
|
product: product,
|
|
7414
7509
|
className: "aspect-w-1 aspect-h-1 max-h-32 sm:max-h-40 lg:max-h-52 object-cover"
|
|
@@ -7432,18 +7527,25 @@ const ItemProduct = props => {
|
|
|
7432
7527
|
}))));
|
|
7433
7528
|
};
|
|
7434
7529
|
|
|
7435
|
-
|
|
7436
|
-
|
|
7437
|
-
|
|
7438
|
-
|
|
7439
|
-
|
|
7440
|
-
|
|
7441
|
-
|
|
7442
|
-
|
|
7443
|
-
|
|
7444
|
-
|
|
7445
|
-
|
|
7446
|
-
|
|
7530
|
+
var Carousel = function Carousel(props) {
|
|
7531
|
+
var carouselRef = useRef(null);
|
|
7532
|
+
var _useState = useState(false),
|
|
7533
|
+
isScrolledToLeft = _useState[0],
|
|
7534
|
+
setIsScrolledToLeft = _useState[1];
|
|
7535
|
+
var _useState2 = useState(true),
|
|
7536
|
+
isScrolledToRight = _useState2[0],
|
|
7537
|
+
setIsScrolledToRight = _useState2[1];
|
|
7538
|
+
var _props$datas = props.datas,
|
|
7539
|
+
datas = _props$datas === void 0 ? [] : _props$datas,
|
|
7540
|
+
_props$className = props.className,
|
|
7541
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
7542
|
+
_props$style = props.style,
|
|
7543
|
+
style = _props$style === void 0 ? {} : _props$style,
|
|
7544
|
+
_props$primaryColor = props.primaryColor,
|
|
7545
|
+
primaryColor = _props$primaryColor === void 0 ? "" : _props$primaryColor,
|
|
7546
|
+
_props$renderItem = props.renderItem,
|
|
7547
|
+
renderItem = _props$renderItem === void 0 ? function () {} : _props$renderItem;
|
|
7548
|
+
var handleClickPrevImg = function handleClickPrevImg() {
|
|
7447
7549
|
if (carouselRef.current) {
|
|
7448
7550
|
setIsScrolledToLeft(true);
|
|
7449
7551
|
setIsScrolledToRight(false);
|
|
@@ -7453,7 +7555,7 @@ const Carousel = props => {
|
|
|
7453
7555
|
});
|
|
7454
7556
|
}
|
|
7455
7557
|
};
|
|
7456
|
-
|
|
7558
|
+
var handleClickNextImg = function handleClickNextImg() {
|
|
7457
7559
|
setIsScrolledToRight(true);
|
|
7458
7560
|
setIsScrolledToLeft(false);
|
|
7459
7561
|
if (carouselRef.current) {
|
|
@@ -7464,12 +7566,14 @@ const Carousel = props => {
|
|
|
7464
7566
|
}
|
|
7465
7567
|
};
|
|
7466
7568
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7467
|
-
className:
|
|
7569
|
+
className: "relative " + className + " ",
|
|
7468
7570
|
style: style
|
|
7469
7571
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7470
7572
|
className: " w-full pe-2 h-full flex overflow-x-auto hide-scrollbar",
|
|
7471
7573
|
ref: carouselRef
|
|
7472
|
-
}, datas && datas.length > 0 && datas.map(
|
|
7574
|
+
}, datas && datas.length > 0 && datas.map(function (item, index) {
|
|
7575
|
+
return renderItem(item, index);
|
|
7576
|
+
})), datas && datas.length > 0 && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("button", {
|
|
7473
7577
|
className: " hidden md:block bg-gray3 p-3 rounded-full absolute top-[45%] left-[-8px] lg:left-[-1%]",
|
|
7474
7578
|
style: {
|
|
7475
7579
|
backgroundColor: isScrolledToLeft ? primaryColor : "#BDBDBD"
|
|
@@ -7488,21 +7592,23 @@ const Carousel = props => {
|
|
|
7488
7592
|
}))));
|
|
7489
7593
|
};
|
|
7490
7594
|
|
|
7491
|
-
|
|
7492
|
-
|
|
7493
|
-
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
|
|
7497
|
-
|
|
7498
|
-
secondary = "#000",
|
|
7499
|
-
|
|
7500
|
-
|
|
7501
|
-
|
|
7502
|
-
|
|
7503
|
-
|
|
7504
|
-
|
|
7505
|
-
|
|
7595
|
+
var Products2 = function Products2(props) {
|
|
7596
|
+
var shopConfigStyle = props.shopConfigStyle,
|
|
7597
|
+
data = props.data;
|
|
7598
|
+
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
7599
|
+
_shopConfigStyle$colo2 = _shopConfigStyle$colo.primary,
|
|
7600
|
+
primary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
|
|
7601
|
+
_shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
|
|
7602
|
+
secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
|
|
7603
|
+
_shopConfigStyle$colo4 = _shopConfigStyle$colo.textBody,
|
|
7604
|
+
textBody = _shopConfigStyle$colo4 === void 0 ? "#000" : _shopConfigStyle$colo4,
|
|
7605
|
+
_shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
|
|
7606
|
+
background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5,
|
|
7607
|
+
_shopConfigStyle$colo6 = _shopConfigStyle$colo.textButton,
|
|
7608
|
+
textButton = _shopConfigStyle$colo6 === void 0 ? "#fff" : _shopConfigStyle$colo6;
|
|
7609
|
+
var _ProductController = ProductController(props),
|
|
7610
|
+
_ProductController$pr = _ProductController.products,
|
|
7611
|
+
products = _ProductController$pr === void 0 ? [] : _ProductController$pr;
|
|
7506
7612
|
console.log("Products2 products");
|
|
7507
7613
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7508
7614
|
className: "pt-10 px-4 xl:px-20",
|
|
@@ -7523,29 +7629,39 @@ const Products2 = props => {
|
|
|
7523
7629
|
}, data === null || data === void 0 ? void 0 : data.sectionTitle), /*#__PURE__*/React__default.createElement(Carousel, {
|
|
7524
7630
|
datas: products,
|
|
7525
7631
|
primaryColor: primary,
|
|
7526
|
-
renderItem: (item, index)
|
|
7527
|
-
|
|
7528
|
-
|
|
7529
|
-
|
|
7530
|
-
|
|
7531
|
-
|
|
7532
|
-
|
|
7632
|
+
renderItem: function renderItem(item, index) {
|
|
7633
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7634
|
+
key: "carousel-" + index,
|
|
7635
|
+
className: " min-w-[40vw] object-cover sm:min-w-[25vw] lg:min-w-[22vw] xl:min-w-[20vw] pe-4 xl:pe-6"
|
|
7636
|
+
}, /*#__PURE__*/React__default.createElement(ItemProduct, {
|
|
7637
|
+
product: item.productInfo,
|
|
7638
|
+
shopConfigStyle: shopConfigStyle
|
|
7639
|
+
}));
|
|
7640
|
+
}
|
|
7533
7641
|
})));
|
|
7534
7642
|
};
|
|
7535
7643
|
|
|
7536
|
-
|
|
7537
|
-
|
|
7538
|
-
|
|
7539
|
-
|
|
7540
|
-
|
|
7541
|
-
|
|
7542
|
-
|
|
7543
|
-
|
|
7544
|
-
|
|
7545
|
-
|
|
7546
|
-
|
|
7547
|
-
|
|
7548
|
-
|
|
7644
|
+
var CarouselItem = function CarouselItem(props) {
|
|
7645
|
+
var listRef = useRef(null);
|
|
7646
|
+
var _useState = useState(false),
|
|
7647
|
+
isScrolledToLeft = _useState[0],
|
|
7648
|
+
setIsScrolledToLeft = _useState[1];
|
|
7649
|
+
var _useState2 = useState(true),
|
|
7650
|
+
isScrolledToRight = _useState2[0],
|
|
7651
|
+
setIsScrolledToRight = _useState2[1];
|
|
7652
|
+
var _props$datas = props.datas,
|
|
7653
|
+
datas = _props$datas === void 0 ? [] : _props$datas,
|
|
7654
|
+
_props$className = props.className,
|
|
7655
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
7656
|
+
_props$style = props.style,
|
|
7657
|
+
style = _props$style === void 0 ? {} : _props$style,
|
|
7658
|
+
_props$primaryColor = props.primaryColor,
|
|
7659
|
+
primaryColor = _props$primaryColor === void 0 ? "" : _props$primaryColor,
|
|
7660
|
+
_props$textButtonColo = props.textButtonColor,
|
|
7661
|
+
textButtonColor = _props$textButtonColo === void 0 ? "" : _props$textButtonColo,
|
|
7662
|
+
_props$renderItem = props.renderItem,
|
|
7663
|
+
renderItem = _props$renderItem === void 0 ? function () {} : _props$renderItem;
|
|
7664
|
+
var handleClickPrevImg = function handleClickPrevImg() {
|
|
7549
7665
|
if (listRef.current) {
|
|
7550
7666
|
setIsScrolledToLeft(true);
|
|
7551
7667
|
setIsScrolledToRight(false);
|
|
@@ -7555,7 +7671,7 @@ const CarouselItem = props => {
|
|
|
7555
7671
|
});
|
|
7556
7672
|
}
|
|
7557
7673
|
};
|
|
7558
|
-
|
|
7674
|
+
var handleClickNextImg = function handleClickNextImg() {
|
|
7559
7675
|
setIsScrolledToRight(true);
|
|
7560
7676
|
setIsScrolledToLeft(false);
|
|
7561
7677
|
if (listRef.current) {
|
|
@@ -7567,14 +7683,16 @@ const CarouselItem = props => {
|
|
|
7567
7683
|
};
|
|
7568
7684
|
console.log("check propsss::::::::", datas);
|
|
7569
7685
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7570
|
-
className:
|
|
7686
|
+
className: "grid grid-cols-12 h-12 " + className,
|
|
7571
7687
|
style: style
|
|
7572
7688
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7573
7689
|
className: "col-span-12 lg:col-span-10 md:col-span-9 overflow-hidden "
|
|
7574
7690
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7575
7691
|
className: "flex overflow-x-auto gap-2 hide-scrollbar items-center",
|
|
7576
7692
|
ref: listRef
|
|
7577
|
-
}, datas && datas.length > 0 && datas.map(
|
|
7693
|
+
}, datas && datas.length > 0 && datas.map(function (item, index) {
|
|
7694
|
+
return renderItem(item, index);
|
|
7695
|
+
}))), datas && datas.length > 0 && /*#__PURE__*/React__default.createElement("div", {
|
|
7578
7696
|
className: "hidden my-auto col-span-5 md:col-span-3 lg:col-span-2 gap-4 md:flex justify-end "
|
|
7579
7697
|
}, /*#__PURE__*/React__default.createElement("button", {
|
|
7580
7698
|
className: " px-4 py-3 rounded-full",
|
|
@@ -7601,38 +7719,46 @@ const CarouselItem = props => {
|
|
|
7601
7719
|
}))));
|
|
7602
7720
|
};
|
|
7603
7721
|
|
|
7604
|
-
|
|
7605
|
-
|
|
7606
|
-
datas = [],
|
|
7607
|
-
style =
|
|
7608
|
-
|
|
7609
|
-
|
|
7610
|
-
|
|
7722
|
+
var ListProduct = function ListProduct(props) {
|
|
7723
|
+
var _props$datas = props.datas,
|
|
7724
|
+
datas = _props$datas === void 0 ? [] : _props$datas,
|
|
7725
|
+
_props$style = props.style,
|
|
7726
|
+
style = _props$style === void 0 ? {} : _props$style,
|
|
7727
|
+
_props$className = props.className,
|
|
7728
|
+
className = _props$className === void 0 ? {} : _props$className,
|
|
7729
|
+
_props$renderItem = props.renderItem,
|
|
7730
|
+
renderItem = _props$renderItem === void 0 ? function () {} : _props$renderItem;
|
|
7611
7731
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7612
|
-
className:
|
|
7732
|
+
className: "grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-4 2xl:grid-cols-5 mt-6 " + className,
|
|
7613
7733
|
style: style
|
|
7614
|
-
}, datas && datas.length > 0 && datas.map((item, index)
|
|
7615
|
-
|
|
7616
|
-
|
|
7617
|
-
|
|
7618
|
-
|
|
7619
|
-
|
|
7620
|
-
|
|
7621
|
-
|
|
7622
|
-
|
|
7623
|
-
|
|
7624
|
-
|
|
7625
|
-
|
|
7626
|
-
|
|
7627
|
-
|
|
7628
|
-
|
|
7629
|
-
|
|
7630
|
-
|
|
7631
|
-
|
|
7632
|
-
|
|
7633
|
-
|
|
7634
|
-
|
|
7635
|
-
|
|
7734
|
+
}, datas && datas.length > 0 && datas.map(function (item, index) {
|
|
7735
|
+
return renderItem(item, index);
|
|
7736
|
+
}));
|
|
7737
|
+
};
|
|
7738
|
+
|
|
7739
|
+
var Products10 = function Products10(props) {
|
|
7740
|
+
var _useState = useState(""),
|
|
7741
|
+
selectCategory = _useState[0],
|
|
7742
|
+
setSelectCategory = _useState[1];
|
|
7743
|
+
var shopConfigStyle = props.shopConfigStyle,
|
|
7744
|
+
data = props.data;
|
|
7745
|
+
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
7746
|
+
_shopConfigStyle$colo2 = _shopConfigStyle$colo.primary,
|
|
7747
|
+
primary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
|
|
7748
|
+
_shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
|
|
7749
|
+
textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
|
|
7750
|
+
_shopConfigStyle$colo4 = _shopConfigStyle$colo.textButton,
|
|
7751
|
+
textButton = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4,
|
|
7752
|
+
_shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
|
|
7753
|
+
background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5,
|
|
7754
|
+
_shopConfigStyle$colo6 = _shopConfigStyle$colo.bgSecondary,
|
|
7755
|
+
bgSecondary = _shopConfigStyle$colo6 === void 0 ? "#fff" : _shopConfigStyle$colo6;
|
|
7756
|
+
var _CategoryController = CategoryController(props),
|
|
7757
|
+
_CategoryController$c = _CategoryController.categories,
|
|
7758
|
+
categories = _CategoryController$c === void 0 ? [] : _CategoryController$c;
|
|
7759
|
+
var _ProductController = ProductController(props),
|
|
7760
|
+
_ProductController$pr = _ProductController.products,
|
|
7761
|
+
products = _ProductController$pr === void 0 ? [] : _ProductController$pr;
|
|
7636
7762
|
console.log("Products10 products");
|
|
7637
7763
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7638
7764
|
className: "w-full pt-10 px-4 xl:px-20",
|
|
@@ -7646,40 +7772,42 @@ const Products10 = props => {
|
|
|
7646
7772
|
datas: categories,
|
|
7647
7773
|
primaryColor: primary,
|
|
7648
7774
|
textButtonColor: textButton,
|
|
7649
|
-
renderItem: (item, index)
|
|
7650
|
-
|
|
7651
|
-
|
|
7652
|
-
|
|
7653
|
-
|
|
7654
|
-
|
|
7655
|
-
|
|
7656
|
-
|
|
7657
|
-
|
|
7658
|
-
|
|
7659
|
-
|
|
7660
|
-
|
|
7775
|
+
renderItem: function renderItem(item, index) {
|
|
7776
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7777
|
+
key: item.categoryId + "-" + index,
|
|
7778
|
+
className: "border-2 items whitespace-nowrap p-2 rounded-lg cursor-pointer ",
|
|
7779
|
+
style: {
|
|
7780
|
+
borderColor: primary,
|
|
7781
|
+
color: selectCategory === item.categoryId ? textButton : primary,
|
|
7782
|
+
background: selectCategory === item.categoryId ? primary : bgSecondary
|
|
7783
|
+
},
|
|
7784
|
+
onClick: function onClick() {
|
|
7785
|
+
setSelectCategory(item.categoryId);
|
|
7786
|
+
}
|
|
7787
|
+
}, item.cateName);
|
|
7788
|
+
}
|
|
7661
7789
|
}), /*#__PURE__*/React__default.createElement(ListProduct, {
|
|
7662
7790
|
datas: products,
|
|
7663
|
-
renderItem: (item, index)
|
|
7664
|
-
|
|
7665
|
-
|
|
7666
|
-
|
|
7667
|
-
|
|
7668
|
-
|
|
7791
|
+
renderItem: function renderItem(item, index) {
|
|
7792
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7793
|
+
key: "productfsd-" + index
|
|
7794
|
+
}, /*#__PURE__*/React__default.createElement(ItemProduct, {
|
|
7795
|
+
product: item.productInfo,
|
|
7796
|
+
shopConfigStyle: shopConfigStyle
|
|
7797
|
+
}));
|
|
7798
|
+
}
|
|
7669
7799
|
}));
|
|
7670
7800
|
};
|
|
7671
7801
|
|
|
7672
|
-
|
|
7673
|
-
|
|
7674
|
-
|
|
7675
|
-
|
|
7676
|
-
|
|
7677
|
-
|
|
7678
|
-
|
|
7679
|
-
|
|
7680
|
-
|
|
7681
|
-
products = []
|
|
7682
|
-
} = ProductController(props);
|
|
7802
|
+
var ProductsTop1 = function ProductsTop1(props) {
|
|
7803
|
+
var data = props.data,
|
|
7804
|
+
shopConfigStyle = props.shopConfigStyle;
|
|
7805
|
+
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
7806
|
+
_shopConfigStyle$colo2 = _shopConfigStyle$colo.background,
|
|
7807
|
+
background = _shopConfigStyle$colo2 === void 0 ? "#fff" : _shopConfigStyle$colo2;
|
|
7808
|
+
var _ProductController = ProductController(props),
|
|
7809
|
+
_ProductController$pr = _ProductController.products,
|
|
7810
|
+
products = _ProductController$pr === void 0 ? [] : _ProductController$pr;
|
|
7683
7811
|
console.log("ProductsTop1 products");
|
|
7684
7812
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7685
7813
|
className: "w-full pt-10 px-4 xl:px-20",
|
|
@@ -7690,93 +7818,155 @@ const ProductsTop1 = props => {
|
|
|
7690
7818
|
className: "text-2xl md:text-3xl lg:text-4xl font-semibold mb-6"
|
|
7691
7819
|
}, data === null || data === void 0 ? void 0 : data.sectionTitle), /*#__PURE__*/React__default.createElement(ListProduct, {
|
|
7692
7820
|
datas: products,
|
|
7693
|
-
renderItem: (item, index)
|
|
7694
|
-
|
|
7695
|
-
|
|
7696
|
-
|
|
7697
|
-
|
|
7698
|
-
|
|
7821
|
+
renderItem: function renderItem(item, index) {
|
|
7822
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7823
|
+
key: "productfsd-" + index
|
|
7824
|
+
}, /*#__PURE__*/React__default.createElement(ItemProduct, {
|
|
7825
|
+
product: item.productInfo,
|
|
7826
|
+
shopConfigStyle: shopConfigStyle
|
|
7827
|
+
}));
|
|
7828
|
+
}
|
|
7699
7829
|
}));
|
|
7700
7830
|
};
|
|
7701
7831
|
|
|
7702
|
-
|
|
7832
|
+
var getEmployeeListApi = function getEmployeeListApi(shopId) {
|
|
7703
7833
|
return api({
|
|
7704
7834
|
method: "post",
|
|
7705
|
-
url:
|
|
7835
|
+
url: "/chain-employment-profile/filter-employ-by-customer",
|
|
7706
7836
|
headers: {
|
|
7707
|
-
shopId
|
|
7837
|
+
shopId: shopId
|
|
7708
7838
|
}
|
|
7709
7839
|
});
|
|
7710
7840
|
};
|
|
7711
7841
|
|
|
7712
|
-
|
|
7713
|
-
|
|
7714
|
-
isAutoGetList = true,
|
|
7715
|
-
shopConfig
|
|
7716
|
-
|
|
7717
|
-
|
|
7718
|
-
|
|
7842
|
+
var EmployeeController = function EmployeeController(props) {
|
|
7843
|
+
var _props$isAutoGetList = props.isAutoGetList,
|
|
7844
|
+
isAutoGetList = _props$isAutoGetList === void 0 ? true : _props$isAutoGetList,
|
|
7845
|
+
shopConfig = props.shopConfig;
|
|
7846
|
+
var _useState = useState([]),
|
|
7847
|
+
listEmployment = _useState[0],
|
|
7848
|
+
setListEmployment = _useState[1];
|
|
7849
|
+
useEffect(function () {
|
|
7719
7850
|
if (isAutoGetList) {
|
|
7720
7851
|
getListEmployee();
|
|
7721
7852
|
}
|
|
7722
7853
|
}, [isAutoGetList]);
|
|
7723
|
-
|
|
7854
|
+
var getListEmployee = function getListEmployee() {
|
|
7724
7855
|
try {
|
|
7725
|
-
|
|
7726
|
-
|
|
7727
|
-
|
|
7728
|
-
|
|
7729
|
-
|
|
7730
|
-
|
|
7731
|
-
|
|
7856
|
+
return Promise.resolve(_catch(function () {
|
|
7857
|
+
return Promise.resolve(getEmployeeListApi(shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopId)).then(function (res) {
|
|
7858
|
+
var _res$data, _res$data$status;
|
|
7859
|
+
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) {
|
|
7860
|
+
var _res$data2;
|
|
7861
|
+
setListEmployment((res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data) || []);
|
|
7862
|
+
}
|
|
7863
|
+
return res;
|
|
7864
|
+
});
|
|
7865
|
+
}, function (e) {
|
|
7866
|
+
console.log(e);
|
|
7867
|
+
}));
|
|
7732
7868
|
} catch (e) {
|
|
7733
|
-
|
|
7869
|
+
return Promise.reject(e);
|
|
7734
7870
|
}
|
|
7735
7871
|
};
|
|
7736
7872
|
return {
|
|
7737
|
-
listEmployment,
|
|
7738
|
-
getListEmployee
|
|
7873
|
+
listEmployment: listEmployment,
|
|
7874
|
+
getListEmployee: getListEmployee
|
|
7739
7875
|
};
|
|
7740
7876
|
};
|
|
7741
7877
|
|
|
7742
|
-
|
|
7743
|
-
|
|
7744
|
-
|
|
7745
|
-
|
|
7746
|
-
|
|
7747
|
-
|
|
7748
|
-
|
|
7749
|
-
onChange = () => {},
|
|
7750
|
-
defaultValue = "",
|
|
7751
|
-
type = "text",
|
|
7752
|
-
rules = []
|
|
7753
|
-
} = props;
|
|
7754
|
-
const [value, setValue] = useState(defaultValue);
|
|
7755
|
-
const [error, setError] = useState("");
|
|
7756
|
-
useImperativeHandle(ref, () => ({
|
|
7757
|
-
validateData() {
|
|
7758
|
-
return validateData();
|
|
7759
|
-
},
|
|
7760
|
-
setValue(text) {
|
|
7761
|
-
return setValue(text);
|
|
7762
|
-
},
|
|
7763
|
-
getValue() {
|
|
7764
|
-
return value();
|
|
7765
|
-
},
|
|
7766
|
-
setError(err) {
|
|
7767
|
-
return setError(err);
|
|
7878
|
+
var createSpaScheduleApi = function createSpaScheduleApi(shopId, data) {
|
|
7879
|
+
return api({
|
|
7880
|
+
method: "post",
|
|
7881
|
+
url: "/spa-schedule/customer/create",
|
|
7882
|
+
data: data,
|
|
7883
|
+
headers: {
|
|
7884
|
+
shopId: shopId
|
|
7768
7885
|
}
|
|
7769
|
-
})
|
|
7770
|
-
|
|
7771
|
-
|
|
7772
|
-
|
|
7886
|
+
});
|
|
7887
|
+
};
|
|
7888
|
+
|
|
7889
|
+
var _excluded = ["productName"];
|
|
7890
|
+
var BookingController = function BookingController(props) {
|
|
7891
|
+
_objectDestructuringEmpty(props);
|
|
7892
|
+
var createSchedule = function createSchedule(customerName, customerPhone, scheduleDate, services, shopId) {
|
|
7893
|
+
try {
|
|
7894
|
+
return Promise.resolve(_catch(function () {
|
|
7895
|
+
var data = {
|
|
7896
|
+
appId: "SSPA",
|
|
7897
|
+
customerName: customerName,
|
|
7898
|
+
customerPhone: customerPhone.replace("+", ""),
|
|
7899
|
+
isSellService: true,
|
|
7900
|
+
scheduleDate: new Date(scheduleDate).getTime(),
|
|
7901
|
+
services: services === null || services === void 0 ? void 0 : services.map(function (_ref) {
|
|
7902
|
+
var productName = _ref.productName,
|
|
7903
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
7904
|
+
return rest;
|
|
7905
|
+
}),
|
|
7906
|
+
shopId: shopId
|
|
7907
|
+
};
|
|
7908
|
+
return Promise.resolve(createSpaScheduleApi(shopId, data));
|
|
7909
|
+
}, function (e) {
|
|
7910
|
+
console.log(e);
|
|
7911
|
+
}));
|
|
7912
|
+
} catch (e) {
|
|
7913
|
+
return Promise.reject(e);
|
|
7914
|
+
}
|
|
7915
|
+
};
|
|
7916
|
+
return {
|
|
7917
|
+
createSchedule: createSchedule
|
|
7918
|
+
};
|
|
7919
|
+
};
|
|
7920
|
+
|
|
7921
|
+
var Input = forwardRef(function (props, ref) {
|
|
7922
|
+
var _props$label = props.label,
|
|
7923
|
+
label = _props$label === void 0 ? "" : _props$label,
|
|
7924
|
+
_props$placeholder = props.placeholder,
|
|
7925
|
+
placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
|
|
7926
|
+
_props$className = props.className,
|
|
7927
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
7928
|
+
_props$name = props.name,
|
|
7929
|
+
name = _props$name === void 0 ? "" : _props$name,
|
|
7930
|
+
_props$onChange = props.onChange,
|
|
7931
|
+
onChange = _props$onChange === void 0 ? function () {} : _props$onChange,
|
|
7932
|
+
_props$defaultValue = props.defaultValue,
|
|
7933
|
+
defaultValue = _props$defaultValue === void 0 ? "" : _props$defaultValue,
|
|
7934
|
+
_props$type = props.type,
|
|
7935
|
+
type = _props$type === void 0 ? "text" : _props$type,
|
|
7936
|
+
_props$rules = props.rules,
|
|
7937
|
+
rules = _props$rules === void 0 ? [] : _props$rules;
|
|
7938
|
+
var _useState = useState(defaultValue),
|
|
7939
|
+
value = _useState[0],
|
|
7940
|
+
_setValue = _useState[1];
|
|
7941
|
+
var _useState2 = useState(""),
|
|
7942
|
+
error = _useState2[0],
|
|
7943
|
+
_setError = _useState2[1];
|
|
7944
|
+
useImperativeHandle(ref, function () {
|
|
7945
|
+
return {
|
|
7946
|
+
validateData: function validateData() {
|
|
7947
|
+
return _validateData();
|
|
7948
|
+
},
|
|
7949
|
+
setValue: function setValue(text) {
|
|
7950
|
+
return _setValue(text);
|
|
7951
|
+
},
|
|
7952
|
+
getValue: function getValue() {
|
|
7953
|
+
return value();
|
|
7954
|
+
},
|
|
7955
|
+
setError: function setError(err) {
|
|
7956
|
+
return _setError(err);
|
|
7957
|
+
}
|
|
7958
|
+
};
|
|
7959
|
+
});
|
|
7960
|
+
var _validateData = function _validateData() {
|
|
7961
|
+
var count = 0;
|
|
7962
|
+
rules.forEach(function (e) {
|
|
7773
7963
|
var _e$pattern;
|
|
7774
7964
|
if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && value === '') {
|
|
7775
|
-
|
|
7965
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
7776
7966
|
count++;
|
|
7777
7967
|
return false;
|
|
7778
7968
|
} 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))) {
|
|
7779
|
-
|
|
7969
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
7780
7970
|
count++;
|
|
7781
7971
|
return false;
|
|
7782
7972
|
}
|
|
@@ -7784,20 +7974,20 @@ const Input = forwardRef((props, ref) => {
|
|
|
7784
7974
|
if (count) {
|
|
7785
7975
|
return false;
|
|
7786
7976
|
} else {
|
|
7787
|
-
|
|
7977
|
+
_setError('');
|
|
7788
7978
|
return true;
|
|
7789
7979
|
}
|
|
7790
7980
|
};
|
|
7791
|
-
|
|
7792
|
-
|
|
7793
|
-
|
|
7794
|
-
} = event.target;
|
|
7795
|
-
setValue(value);
|
|
7981
|
+
var handleOnChange = function handleOnChange(event) {
|
|
7982
|
+
var value = event.target.value;
|
|
7983
|
+
_setValue(value);
|
|
7796
7984
|
onChange === null || onChange === void 0 ? void 0 : onChange(value);
|
|
7797
7985
|
};
|
|
7798
|
-
|
|
7799
|
-
|
|
7800
|
-
|
|
7986
|
+
var _className = "h-10 py-1 px-2 border border-stroke rounded " + className;
|
|
7987
|
+
var required = !!(rules !== null && rules !== void 0 && rules.find(function (e) {
|
|
7988
|
+
return (e === null || e === void 0 ? void 0 : e.type) === "required";
|
|
7989
|
+
}));
|
|
7990
|
+
var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
|
|
7801
7991
|
className: "text-danger"
|
|
7802
7992
|
}, " *") : null;
|
|
7803
7993
|
return /*#__PURE__*/React__default.createElement("div", null, label ? /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -7813,46 +8003,57 @@ const Input = forwardRef((props, ref) => {
|
|
|
7813
8003
|
}), error ? /*#__PURE__*/React__default.createElement("div", null, error) : null);
|
|
7814
8004
|
});
|
|
7815
8005
|
|
|
7816
|
-
|
|
7817
|
-
|
|
7818
|
-
label = "",
|
|
7819
|
-
placeholder =
|
|
7820
|
-
|
|
7821
|
-
|
|
7822
|
-
|
|
7823
|
-
|
|
7824
|
-
|
|
7825
|
-
|
|
7826
|
-
|
|
7827
|
-
|
|
7828
|
-
|
|
7829
|
-
|
|
7830
|
-
|
|
7831
|
-
|
|
7832
|
-
|
|
7833
|
-
|
|
7834
|
-
|
|
7835
|
-
|
|
7836
|
-
|
|
7837
|
-
|
|
7838
|
-
|
|
7839
|
-
|
|
7840
|
-
|
|
7841
|
-
|
|
7842
|
-
|
|
7843
|
-
|
|
7844
|
-
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
|
|
7848
|
-
|
|
8006
|
+
var Select = forwardRef(function (props, ref) {
|
|
8007
|
+
var _props$label = props.label,
|
|
8008
|
+
label = _props$label === void 0 ? "" : _props$label,
|
|
8009
|
+
_props$placeholder = props.placeholder,
|
|
8010
|
+
placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
|
|
8011
|
+
_props$className = props.className,
|
|
8012
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
8013
|
+
_props$name = props.name,
|
|
8014
|
+
name = _props$name === void 0 ? "" : _props$name,
|
|
8015
|
+
_props$onChange = props.onChange,
|
|
8016
|
+
onChange = _props$onChange === void 0 ? function () {} : _props$onChange,
|
|
8017
|
+
_props$defaultValue = props.defaultValue,
|
|
8018
|
+
defaultValue = _props$defaultValue === void 0 ? null : _props$defaultValue,
|
|
8019
|
+
_props$rules = props.rules,
|
|
8020
|
+
rules = _props$rules === void 0 ? [] : _props$rules,
|
|
8021
|
+
_props$options = props.options,
|
|
8022
|
+
options = _props$options === void 0 ? [] : _props$options,
|
|
8023
|
+
_props$required = props.required,
|
|
8024
|
+
required = _props$required === void 0 ? false : _props$required;
|
|
8025
|
+
var _useState = useState(defaultValue),
|
|
8026
|
+
value = _useState[0],
|
|
8027
|
+
_setValue = _useState[1];
|
|
8028
|
+
var _useState2 = useState(""),
|
|
8029
|
+
error = _useState2[0],
|
|
8030
|
+
_setError = _useState2[1];
|
|
8031
|
+
useImperativeHandle(ref, function () {
|
|
8032
|
+
return {
|
|
8033
|
+
validateData: function validateData() {
|
|
8034
|
+
return _validateData();
|
|
8035
|
+
},
|
|
8036
|
+
setValue: function setValue(text) {
|
|
8037
|
+
return _setValue(text);
|
|
8038
|
+
},
|
|
8039
|
+
getValue: function getValue() {
|
|
8040
|
+
return value();
|
|
8041
|
+
},
|
|
8042
|
+
setError: function setError(err) {
|
|
8043
|
+
return _setError(err);
|
|
8044
|
+
}
|
|
8045
|
+
};
|
|
8046
|
+
});
|
|
8047
|
+
var _validateData = function _validateData() {
|
|
8048
|
+
var count = 0;
|
|
8049
|
+
rules.forEach(function (e) {
|
|
7849
8050
|
var _e$pattern;
|
|
7850
8051
|
if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && value === '') {
|
|
7851
|
-
|
|
8052
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
7852
8053
|
count++;
|
|
7853
8054
|
return false;
|
|
7854
8055
|
} 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))) {
|
|
7855
|
-
|
|
8056
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
7856
8057
|
count++;
|
|
7857
8058
|
return false;
|
|
7858
8059
|
}
|
|
@@ -7860,19 +8061,17 @@ const Select = forwardRef((props, ref) => {
|
|
|
7860
8061
|
if (count) {
|
|
7861
8062
|
return false;
|
|
7862
8063
|
} else {
|
|
7863
|
-
|
|
8064
|
+
_setError('');
|
|
7864
8065
|
return true;
|
|
7865
8066
|
}
|
|
7866
8067
|
};
|
|
7867
|
-
|
|
7868
|
-
|
|
7869
|
-
|
|
7870
|
-
} = event.target;
|
|
7871
|
-
setValue(value);
|
|
8068
|
+
var handleOnChange = function handleOnChange(event) {
|
|
8069
|
+
var value = event.target.value;
|
|
8070
|
+
_setValue(value);
|
|
7872
8071
|
onChange === null || onChange === void 0 ? void 0 : onChange(value);
|
|
7873
8072
|
};
|
|
7874
|
-
|
|
7875
|
-
|
|
8073
|
+
var _className = "h-10 py-1 px-2 border border-stroke rounded " + className;
|
|
8074
|
+
var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
|
|
7876
8075
|
className: "text-danger"
|
|
7877
8076
|
}, " *") : null;
|
|
7878
8077
|
return /*#__PURE__*/React__default.createElement("div", null, label ? /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -7888,45 +8087,51 @@ const Select = forwardRef((props, ref) => {
|
|
|
7888
8087
|
disabled: true,
|
|
7889
8088
|
selected: true,
|
|
7890
8089
|
hidden: true
|
|
7891
|
-
}, placeholder), options === null || options === void 0 ? void 0 : options.map((option, index)
|
|
7892
|
-
|
|
7893
|
-
|
|
7894
|
-
|
|
8090
|
+
}, placeholder), options === null || options === void 0 ? void 0 : options.map(function (option, index) {
|
|
8091
|
+
return /*#__PURE__*/React__default.createElement("option", {
|
|
8092
|
+
value: option.value,
|
|
8093
|
+
key: index
|
|
8094
|
+
}, option === null || option === void 0 ? void 0 : option.label);
|
|
8095
|
+
})), error ? /*#__PURE__*/React__default.createElement("div", null, error) : null);
|
|
7895
8096
|
});
|
|
7896
8097
|
|
|
7897
|
-
|
|
7898
|
-
|
|
7899
|
-
label = "",
|
|
7900
|
-
|
|
7901
|
-
className = "",
|
|
7902
|
-
|
|
7903
|
-
|
|
7904
|
-
|
|
7905
|
-
|
|
7906
|
-
|
|
7907
|
-
|
|
7908
|
-
|
|
7909
|
-
|
|
7910
|
-
|
|
7911
|
-
|
|
8098
|
+
var DateTimePicker = function DateTimePicker(props) {
|
|
8099
|
+
var _props$label = props.label,
|
|
8100
|
+
label = _props$label === void 0 ? "" : _props$label,
|
|
8101
|
+
_props$className = props.className,
|
|
8102
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
8103
|
+
_props$defaultValue = props.defaultValue,
|
|
8104
|
+
defaultValue = _props$defaultValue === void 0 ? new Date() : _props$defaultValue,
|
|
8105
|
+
_props$required = props.required,
|
|
8106
|
+
required = _props$required === void 0 ? false : _props$required;
|
|
8107
|
+
var _useState = useState(defaultValue),
|
|
8108
|
+
value = _useState[0],
|
|
8109
|
+
setValue = _useState[1];
|
|
8110
|
+
var _useState2 = useState(""),
|
|
8111
|
+
error = _useState2[0];
|
|
8112
|
+
var _className = "h-10 flex items-center py-1 px-2 border border-stroke rounded bg-white cursor-pointer " + className;
|
|
8113
|
+
var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
|
|
7912
8114
|
className: "text-danger"
|
|
7913
8115
|
}, " *") : null;
|
|
7914
|
-
|
|
7915
|
-
value,
|
|
7916
|
-
|
|
7917
|
-
|
|
7918
|
-
|
|
7919
|
-
|
|
7920
|
-
|
|
7921
|
-
|
|
7922
|
-
|
|
8116
|
+
var CustomInput = forwardRef(function (_ref, ref) {
|
|
8117
|
+
var value = _ref.value,
|
|
8118
|
+
onClick = _ref.onClick,
|
|
8119
|
+
className = _ref.className;
|
|
8120
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
8121
|
+
className: className,
|
|
8122
|
+
onClick: onClick,
|
|
8123
|
+
ref: ref
|
|
8124
|
+
}, value);
|
|
8125
|
+
});
|
|
7923
8126
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7924
8127
|
className: "w-full"
|
|
7925
8128
|
}, label ? /*#__PURE__*/React__default.createElement("div", {
|
|
7926
8129
|
className: "mb-1"
|
|
7927
8130
|
}, label, labelRequired) : null, /*#__PURE__*/React__default.createElement(DatePicker, {
|
|
7928
8131
|
selected: value,
|
|
7929
|
-
onChange:
|
|
8132
|
+
onChange: function onChange(date) {
|
|
8133
|
+
return setValue(date);
|
|
8134
|
+
},
|
|
7930
8135
|
customInput: /*#__PURE__*/React__default.createElement(CustomInput, {
|
|
7931
8136
|
className: _className
|
|
7932
8137
|
}),
|
|
@@ -7934,37 +8139,30 @@ const DateTimePicker = props => {
|
|
|
7934
8139
|
}), error ? /*#__PURE__*/React__default.createElement("div", null, error) : null);
|
|
7935
8140
|
};
|
|
7936
8141
|
|
|
7937
|
-
|
|
7938
|
-
|
|
7939
|
-
|
|
7940
|
-
|
|
7941
|
-
|
|
7942
|
-
|
|
7943
|
-
|
|
7944
|
-
|
|
7945
|
-
|
|
7946
|
-
|
|
7947
|
-
|
|
7948
|
-
|
|
7949
|
-
|
|
7950
|
-
|
|
7951
|
-
|
|
7952
|
-
|
|
7953
|
-
|
|
7954
|
-
|
|
7955
|
-
|
|
7956
|
-
|
|
7957
|
-
|
|
7958
|
-
|
|
7959
|
-
});
|
|
7960
|
-
const {
|
|
7961
|
-
products
|
|
7962
|
-
} = ProductController({
|
|
7963
|
-
...props,
|
|
7964
|
-
isAutoGetList: isAutoGetListProduct,
|
|
7965
|
-
params: productsParams
|
|
7966
|
-
});
|
|
8142
|
+
var BookingForm = function BookingForm(props) {
|
|
8143
|
+
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
8144
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
|
|
8145
|
+
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
8146
|
+
_shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
|
|
8147
|
+
secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3;
|
|
8148
|
+
var _useState = useState(false),
|
|
8149
|
+
isAutoGetListProduct = _useState[0];
|
|
8150
|
+
var _useState2 = useState({
|
|
8151
|
+
types: "1,10"
|
|
8152
|
+
}),
|
|
8153
|
+
productsParams = _useState2[0];
|
|
8154
|
+
var _useState3 = useState(false),
|
|
8155
|
+
isAutoGetListEmployee = _useState3[0];
|
|
8156
|
+
var _useState4 = useState(new Date());
|
|
8157
|
+
var _EmployeeController = EmployeeController(_extends({}, props, {
|
|
8158
|
+
isAutoGetList: isAutoGetListEmployee
|
|
8159
|
+
}));
|
|
8160
|
+
var _ProductController = ProductController(_extends({}, props, {
|
|
8161
|
+
isAutoGetList: isAutoGetListProduct,
|
|
8162
|
+
params: productsParams
|
|
8163
|
+
}));
|
|
7967
8164
|
console.log("BookingForm products");
|
|
8165
|
+
var _BookingController = BookingController(props);
|
|
7968
8166
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7969
8167
|
className: "grid gap-4 rounded-lg p-6",
|
|
7970
8168
|
style: {
|
|
@@ -8013,20 +8211,19 @@ const BookingForm = props => {
|
|
|
8013
8211
|
})));
|
|
8014
8212
|
};
|
|
8015
8213
|
|
|
8016
|
-
|
|
8214
|
+
var Booking1 = function Booking1(props) {
|
|
8017
8215
|
var _data$data, _data$data$, _data$data2, _data$data2$;
|
|
8018
|
-
|
|
8019
|
-
shopConfigStyle = {},
|
|
8020
|
-
shopConfig =
|
|
8021
|
-
|
|
8022
|
-
|
|
8023
|
-
|
|
8024
|
-
|
|
8025
|
-
|
|
8026
|
-
|
|
8027
|
-
|
|
8028
|
-
background = "#fff"
|
|
8029
|
-
} = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color;
|
|
8216
|
+
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
8217
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
8218
|
+
_props$shopConfig = props.shopConfig,
|
|
8219
|
+
shopConfig = _props$shopConfig === void 0 ? {} : _props$shopConfig,
|
|
8220
|
+
_props$data = props.data,
|
|
8221
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
8222
|
+
_props$SectionTitle = props.SectionTitle,
|
|
8223
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
8224
|
+
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
8225
|
+
_shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
|
|
8226
|
+
background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
|
|
8030
8227
|
console.log("booking data", data);
|
|
8031
8228
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
8032
8229
|
className: "relative w-full px-4 xl:px-20 py-12",
|
|
@@ -8048,40 +8245,34 @@ const Booking1 = props => {
|
|
|
8048
8245
|
}, data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : _data$data2$.description))));
|
|
8049
8246
|
};
|
|
8050
8247
|
|
|
8051
|
-
|
|
8052
|
-
|
|
8053
|
-
|
|
8054
|
-
} = props;
|
|
8055
|
-
const sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
8248
|
+
var Banner1 = function Banner1(props) {
|
|
8249
|
+
var data = props.data;
|
|
8250
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
8056
8251
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
8057
8252
|
className: "w-full pt-10 px-4 xl:px-20 bg-background"
|
|
8058
8253
|
}, /*#__PURE__*/React__default.createElement("h3", {
|
|
8059
8254
|
className: "text-2xl lg:text-3xl xl:text-4xl font-semibold"
|
|
8060
8255
|
}, data === null || data === void 0 ? void 0 : data.sectionTitle), /*#__PURE__*/React__default.createElement("div", {
|
|
8061
8256
|
className: "grid grid-cols-1 sm:grid-cols-3 gap-6 mt-6"
|
|
8062
|
-
}, sectionData && sectionData.length > 0 && sectionData.map((item, index)
|
|
8257
|
+
}, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
|
|
8063
8258
|
return /*#__PURE__*/React__default.createElement("img", {
|
|
8064
8259
|
src: item === null || item === void 0 ? void 0 : item.srcImage,
|
|
8065
8260
|
alt: "",
|
|
8066
8261
|
className: "rounded-2xl",
|
|
8067
|
-
key:
|
|
8262
|
+
key: "hnfhn-" + index
|
|
8068
8263
|
});
|
|
8069
8264
|
})));
|
|
8070
8265
|
};
|
|
8071
8266
|
|
|
8072
|
-
|
|
8073
|
-
|
|
8074
|
-
|
|
8075
|
-
|
|
8076
|
-
|
|
8077
|
-
|
|
8078
|
-
|
|
8079
|
-
|
|
8080
|
-
|
|
8081
|
-
background = "#fff",
|
|
8082
|
-
bgSecondary = "#fff"
|
|
8083
|
-
} = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color;
|
|
8084
|
-
const sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
8267
|
+
var Partner1 = function Partner1(props) {
|
|
8268
|
+
var shopConfigStyle = props.shopConfigStyle,
|
|
8269
|
+
data = props.data;
|
|
8270
|
+
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
8271
|
+
_shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
|
|
8272
|
+
background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5,
|
|
8273
|
+
_shopConfigStyle$colo6 = _shopConfigStyle$colo.bgSecondary,
|
|
8274
|
+
bgSecondary = _shopConfigStyle$colo6 === void 0 ? "#fff" : _shopConfigStyle$colo6;
|
|
8275
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
8085
8276
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
8086
8277
|
className: "w-full pt-10 px-4 xl:px-20",
|
|
8087
8278
|
style: {
|
|
@@ -8094,9 +8285,9 @@ const Partner1 = props => {
|
|
|
8094
8285
|
style: {
|
|
8095
8286
|
background: bgSecondary
|
|
8096
8287
|
}
|
|
8097
|
-
}, sectionData && sectionData.length > 0 && sectionData.map((item, index)
|
|
8288
|
+
}, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
|
|
8098
8289
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
8099
|
-
key:
|
|
8290
|
+
key: "xfriidj-" + index
|
|
8100
8291
|
}, /*#__PURE__*/React__default.createElement("img", {
|
|
8101
8292
|
src: item.srcImage,
|
|
8102
8293
|
alt: ""
|
|
@@ -8104,19 +8295,17 @@ const Partner1 = props => {
|
|
|
8104
8295
|
})));
|
|
8105
8296
|
};
|
|
8106
8297
|
|
|
8107
|
-
|
|
8108
|
-
|
|
8109
|
-
|
|
8110
|
-
|
|
8111
|
-
|
|
8112
|
-
|
|
8113
|
-
|
|
8114
|
-
|
|
8115
|
-
|
|
8116
|
-
|
|
8117
|
-
|
|
8118
|
-
} = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color;
|
|
8119
|
-
const sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
8298
|
+
var Address1 = function Address1(props) {
|
|
8299
|
+
var shopConfigStyle = props.shopConfigStyle,
|
|
8300
|
+
data = props.data;
|
|
8301
|
+
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
8302
|
+
_shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
|
|
8303
|
+
textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
|
|
8304
|
+
_shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
|
|
8305
|
+
background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5,
|
|
8306
|
+
_shopConfigStyle$colo6 = _shopConfigStyle$colo.bgSecondary,
|
|
8307
|
+
bgSecondary = _shopConfigStyle$colo6 === void 0 ? "#fff" : _shopConfigStyle$colo6;
|
|
8308
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
8120
8309
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
8121
8310
|
className: "w-full pt-10 px-4 xl:px-20 ",
|
|
8122
8311
|
style: {
|
|
@@ -8127,10 +8316,10 @@ const Address1 = props => {
|
|
|
8127
8316
|
className: "text-2xl lg:text-3xl xl:text-4xl font-semibold"
|
|
8128
8317
|
}, data === null || data === void 0 ? void 0 : data.sectionTitle), /*#__PURE__*/React__default.createElement("div", {
|
|
8129
8318
|
className: "grid grid-cols-2 sm:grid-cols-3 gap-4 mt-6 "
|
|
8130
|
-
}, sectionData && sectionData.length > 0 && sectionData.map((item, index)
|
|
8319
|
+
}, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
|
|
8131
8320
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
8132
8321
|
className: "lg:leading-6 p-4 rounded-xl",
|
|
8133
|
-
key:
|
|
8322
|
+
key: "fyfoy-" + index,
|
|
8134
8323
|
style: {
|
|
8135
8324
|
background: bgSecondary
|
|
8136
8325
|
}
|
|
@@ -8148,16 +8337,14 @@ const Address1 = props => {
|
|
|
8148
8337
|
})));
|
|
8149
8338
|
};
|
|
8150
8339
|
|
|
8151
|
-
|
|
8152
|
-
|
|
8153
|
-
|
|
8154
|
-
} = props;
|
|
8155
|
-
const sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
8340
|
+
var Links1 = function Links1(props) {
|
|
8341
|
+
var data = props.data;
|
|
8342
|
+
var sectionData = data === null || data === void 0 ? void 0 : data.data;
|
|
8156
8343
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
8157
8344
|
className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 w-full pt-10 px-4 xl:px-20 bg-background"
|
|
8158
|
-
}, sectionData && sectionData.length > 0 && sectionData.map((item, index)
|
|
8345
|
+
}, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
|
|
8159
8346
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
8160
|
-
key:
|
|
8347
|
+
key: "qwikf-" + index
|
|
8161
8348
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
8162
8349
|
className: "text-lg md:text-xl lg:text-2xl font-semibold mb-4"
|
|
8163
8350
|
}, "\u0110a d\u1EA1ng thanh to\xE1n"), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -8174,17 +8361,17 @@ const Links1 = props => {
|
|
|
8174
8361
|
}));
|
|
8175
8362
|
};
|
|
8176
8363
|
|
|
8177
|
-
|
|
8178
|
-
|
|
8179
|
-
|
|
8180
|
-
|
|
8181
|
-
|
|
8182
|
-
|
|
8183
|
-
|
|
8184
|
-
|
|
8185
|
-
textButton = "#fff",
|
|
8186
|
-
|
|
8187
|
-
|
|
8364
|
+
var Footer1 = function Footer1(props) {
|
|
8365
|
+
var shopConfigStyle = props.shopConfigStyle;
|
|
8366
|
+
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
8367
|
+
_shopConfigStyle$colo2 = _shopConfigStyle$colo.primary,
|
|
8368
|
+
primary = _shopConfigStyle$colo2 === void 0 ? "#000" : _shopConfigStyle$colo2,
|
|
8369
|
+
_shopConfigStyle$colo3 = _shopConfigStyle$colo.textBody,
|
|
8370
|
+
textBody = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
|
|
8371
|
+
_shopConfigStyle$colo4 = _shopConfigStyle$colo.textButton,
|
|
8372
|
+
textButton = _shopConfigStyle$colo4 === void 0 ? "#fff" : _shopConfigStyle$colo4,
|
|
8373
|
+
_shopConfigStyle$colo5 = _shopConfigStyle$colo.bgSecondary,
|
|
8374
|
+
bgSecondary = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
|
|
8188
8375
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
8189
8376
|
className: "footer px-4 py-10 xl:px-20 ",
|
|
8190
8377
|
style: {
|
|
@@ -8271,49 +8458,49 @@ const Footer1 = props => {
|
|
|
8271
8458
|
}, "Xem \u0111i\u1EC1u kho\u1EA3n v\xE0 ch\xEDnh s\xE1ch"))));
|
|
8272
8459
|
};
|
|
8273
8460
|
|
|
8274
|
-
|
|
8275
|
-
|
|
8276
|
-
star = 5,
|
|
8277
|
-
style =
|
|
8278
|
-
|
|
8279
|
-
|
|
8280
|
-
|
|
8281
|
-
|
|
8461
|
+
var RatingStar = function RatingStar(props) {
|
|
8462
|
+
var _props$star = props.star,
|
|
8463
|
+
star = _props$star === void 0 ? 5 : _props$star,
|
|
8464
|
+
_props$style = props.style,
|
|
8465
|
+
style = _props$style === void 0 ? {} : _props$style,
|
|
8466
|
+
_props$className = props.className,
|
|
8467
|
+
className = _props$className === void 0 ? "" : _props$className;
|
|
8468
|
+
var res = [];
|
|
8469
|
+
for (var i = 1; i < star; i++) {
|
|
8282
8470
|
res.push(/*#__PURE__*/React__default.createElement(FaStar, {
|
|
8283
8471
|
color: "#E2B93B"
|
|
8284
8472
|
}));
|
|
8285
8473
|
}
|
|
8286
|
-
|
|
8474
|
+
var decimalPart = star % 1;
|
|
8287
8475
|
if (decimalPart && decimalPart >= 0.5) {
|
|
8288
8476
|
res.push(/*#__PURE__*/React__default.createElement(FaRegStarHalfStroke, {
|
|
8289
8477
|
color: "#E2B93B"
|
|
8290
8478
|
}));
|
|
8291
8479
|
}
|
|
8292
|
-
for (
|
|
8480
|
+
for (var _i = res === null || res === void 0 ? void 0 : res.length; _i < 5; _i++) {
|
|
8293
8481
|
res.push(/*#__PURE__*/React__default.createElement(FaRegStar, {
|
|
8294
8482
|
color: "#E2B93B"
|
|
8295
8483
|
}));
|
|
8296
8484
|
}
|
|
8297
8485
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
8298
|
-
className:
|
|
8486
|
+
className: "flex gap-1 " + className,
|
|
8299
8487
|
style: style
|
|
8300
8488
|
}, res);
|
|
8301
8489
|
};
|
|
8302
8490
|
|
|
8303
|
-
|
|
8491
|
+
var CustomerRating10 = function CustomerRating10(props) {
|
|
8304
8492
|
var _data$data;
|
|
8305
|
-
|
|
8306
|
-
shopConfigStyle = {},
|
|
8307
|
-
|
|
8308
|
-
data = {},
|
|
8309
|
-
SectionTitle =
|
|
8310
|
-
|
|
8311
|
-
|
|
8312
|
-
|
|
8313
|
-
secondary = "#000",
|
|
8314
|
-
|
|
8315
|
-
background = "#fff"
|
|
8316
|
-
} = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color;
|
|
8493
|
+
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
8494
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
8495
|
+
_props$data = props.data,
|
|
8496
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
8497
|
+
_props$SectionTitle = props.SectionTitle,
|
|
8498
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
8499
|
+
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
8500
|
+
_shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
|
|
8501
|
+
secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
|
|
8502
|
+
_shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
|
|
8503
|
+
background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
|
|
8317
8504
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
8318
8505
|
className: "relative w-full py-12 px-4 xl:px-20",
|
|
8319
8506
|
style: {
|
|
@@ -8324,39 +8511,40 @@ const CustomerRating10 = props => {
|
|
|
8324
8511
|
shopConfigStyle: shopConfigStyle
|
|
8325
8512
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
8326
8513
|
className: "mt-12 grid grid-cols-1 md:grid-cols-2 gap-12"
|
|
8327
|
-
}, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map((item, index)
|
|
8328
|
-
|
|
8329
|
-
|
|
8330
|
-
|
|
8331
|
-
|
|
8332
|
-
|
|
8333
|
-
|
|
8334
|
-
|
|
8335
|
-
|
|
8336
|
-
|
|
8337
|
-
|
|
8338
|
-
|
|
8339
|
-
|
|
8340
|
-
|
|
8341
|
-
|
|
8514
|
+
}, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (item, index) {
|
|
8515
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
8516
|
+
key: index,
|
|
8517
|
+
className: "flex"
|
|
8518
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
8519
|
+
src: item === null || item === void 0 ? void 0 : item.avatar,
|
|
8520
|
+
className: "w-[136px] h-[136px] rounded-2xl"
|
|
8521
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
8522
|
+
className: "ml-4"
|
|
8523
|
+
}, /*#__PURE__*/React__default.createElement(RatingStar, {
|
|
8524
|
+
star: (item === null || item === void 0 ? void 0 : item.rate) || 5
|
|
8525
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
8526
|
+
className: "text-xl md:text-2xl mt-2"
|
|
8527
|
+
}, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React__default.createElement("div", {
|
|
8528
|
+
className: "mt-2"
|
|
8529
|
+
}, item === null || item === void 0 ? void 0 : item.content)));
|
|
8530
|
+
}))), /*#__PURE__*/React__default.createElement(Dash, {
|
|
8342
8531
|
color: secondary
|
|
8343
8532
|
}));
|
|
8344
8533
|
};
|
|
8345
8534
|
|
|
8346
|
-
|
|
8535
|
+
var Employees1 = function Employees1(props) {
|
|
8347
8536
|
var _data$data;
|
|
8348
|
-
|
|
8349
|
-
shopConfigStyle = {},
|
|
8350
|
-
|
|
8351
|
-
data = {},
|
|
8352
|
-
SectionTitle =
|
|
8353
|
-
|
|
8354
|
-
|
|
8355
|
-
|
|
8356
|
-
secondary = "#000",
|
|
8357
|
-
|
|
8358
|
-
background = "#fff"
|
|
8359
|
-
} = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color;
|
|
8537
|
+
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
8538
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
8539
|
+
_props$data = props.data,
|
|
8540
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
8541
|
+
_props$SectionTitle = props.SectionTitle,
|
|
8542
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
8543
|
+
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
8544
|
+
_shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
|
|
8545
|
+
secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
|
|
8546
|
+
_shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
|
|
8547
|
+
background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
|
|
8360
8548
|
console.log("Employee data", data);
|
|
8361
8549
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
8362
8550
|
className: "relative w-full py-12 px-4 xl:px-20",
|
|
@@ -8368,37 +8556,38 @@ const Employees1 = props => {
|
|
|
8368
8556
|
shopConfigStyle: shopConfigStyle
|
|
8369
8557
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
8370
8558
|
className: "mt-12 grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 lg:gap-12"
|
|
8371
|
-
}, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map((item, index)
|
|
8372
|
-
|
|
8373
|
-
|
|
8374
|
-
|
|
8375
|
-
|
|
8376
|
-
|
|
8377
|
-
|
|
8378
|
-
|
|
8379
|
-
|
|
8380
|
-
|
|
8381
|
-
|
|
8382
|
-
|
|
8383
|
-
|
|
8559
|
+
}, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (item, index) {
|
|
8560
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
8561
|
+
key: index,
|
|
8562
|
+
className: "w-full aspect-[3/4] relative overflow-hidden rounded-2xl"
|
|
8563
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
8564
|
+
className: "absolute bottom-0 h-1/2 w-full flex flex-col justify-end p-4 bg-gradient-to-t from-black to-transparent bg-opacity-70 text-center"
|
|
8565
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
8566
|
+
className: "text-2xl text-white"
|
|
8567
|
+
}, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React__default.createElement("div", {
|
|
8568
|
+
className: "text-white mt-1"
|
|
8569
|
+
}, item === null || item === void 0 ? void 0 : item.role)), /*#__PURE__*/React__default.createElement("img", {
|
|
8570
|
+
src: item === null || item === void 0 ? void 0 : item.avatar,
|
|
8571
|
+
className: "w-full h-full"
|
|
8572
|
+
}));
|
|
8573
|
+
}))), /*#__PURE__*/React__default.createElement(Dash, {
|
|
8384
8574
|
color: secondary
|
|
8385
8575
|
}));
|
|
8386
8576
|
};
|
|
8387
8577
|
|
|
8388
|
-
|
|
8578
|
+
var Gallery1 = function Gallery1(props) {
|
|
8389
8579
|
var _data$data;
|
|
8390
|
-
|
|
8391
|
-
shopConfigStyle = {},
|
|
8392
|
-
|
|
8393
|
-
data = {},
|
|
8394
|
-
SectionTitle =
|
|
8395
|
-
|
|
8396
|
-
|
|
8397
|
-
|
|
8398
|
-
secondary = "#000",
|
|
8399
|
-
|
|
8400
|
-
background = "#fff"
|
|
8401
|
-
} = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color;
|
|
8580
|
+
var _props$shopConfigStyl = props.shopConfigStyle,
|
|
8581
|
+
shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
|
|
8582
|
+
_props$data = props.data,
|
|
8583
|
+
data = _props$data === void 0 ? {} : _props$data,
|
|
8584
|
+
_props$SectionTitle = props.SectionTitle,
|
|
8585
|
+
SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
|
|
8586
|
+
var _shopConfigStyle$colo = shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.color,
|
|
8587
|
+
_shopConfigStyle$colo3 = _shopConfigStyle$colo.secondary,
|
|
8588
|
+
secondary = _shopConfigStyle$colo3 === void 0 ? "#000" : _shopConfigStyle$colo3,
|
|
8589
|
+
_shopConfigStyle$colo5 = _shopConfigStyle$colo.background,
|
|
8590
|
+
background = _shopConfigStyle$colo5 === void 0 ? "#fff" : _shopConfigStyle$colo5;
|
|
8402
8591
|
console.log("Gallery1 data", data);
|
|
8403
8592
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
8404
8593
|
className: "relative w-full py-12 px-4 xl:px-20",
|
|
@@ -8410,11 +8599,13 @@ const Gallery1 = props => {
|
|
|
8410
8599
|
shopConfigStyle: shopConfigStyle
|
|
8411
8600
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
8412
8601
|
className: "mt-6 grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-1 md:gap-2"
|
|
8413
|
-
}, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map((it, index)
|
|
8414
|
-
|
|
8415
|
-
|
|
8416
|
-
|
|
8417
|
-
|
|
8602
|
+
}, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (it, index) {
|
|
8603
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
8604
|
+
key: index
|
|
8605
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
8606
|
+
src: it === null || it === void 0 ? void 0 : it.srcImage
|
|
8607
|
+
}));
|
|
8608
|
+
}))), /*#__PURE__*/React__default.createElement(Dash, {
|
|
8418
8609
|
color: secondary
|
|
8419
8610
|
}));
|
|
8420
8611
|
};
|