Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

979 wiersze
33 KiB

  1. (function() {
  2. var exports = {};
  3. exports.id = 5891;
  4. exports.ids = [5891];
  5. exports.modules = {
  6. /***/ 3920:
  7. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  8. "use strict";
  9. var _apollo = _interopRequireDefault(__webpack_require__(6371));
  10. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  11. async function GetSparepartYGP(token = "") {
  12. var res = await _apollo.default.query(`
  13. query{
  14. ygParts{
  15. id
  16. name
  17. img{
  18. url
  19. }
  20. price1
  21. price2
  22. ygp_units{
  23. name
  24. part_code
  25. price
  26. }
  27. }
  28. }
  29. `, token);
  30. return res;
  31. }
  32. async function GetSparepartYamalube(token = "") {
  33. var res = await _apollo.default.query(`
  34. query {
  35. yamalubes {
  36. id
  37. name
  38. part_code
  39. price
  40. description
  41. stock
  42. img{
  43. url
  44. }
  45. }
  46. }
  47. `, token);
  48. return res;
  49. }
  50. async function GetHelmet(token = "") {
  51. var res = await _apollo.default.query(`
  52. query {
  53. helmets{
  54. id
  55. name
  56. price
  57. img {
  58. url
  59. }
  60. }
  61. }`, token);
  62. return res;
  63. }
  64. async function GetApparel(token = "") {
  65. var res = await _apollo.default.query(`
  66. query {
  67. apparels{
  68. id
  69. name
  70. price
  71. img {
  72. url
  73. }
  74. }
  75. }`, token);
  76. return res;
  77. }
  78. async function GetAcc(token = "") {
  79. var res = await _apollo.default.query(`
  80. query {
  81. accessories{
  82. id
  83. name
  84. price
  85. img {
  86. url
  87. }
  88. }
  89. }`, token);
  90. return res;
  91. }
  92. async function GetYGPDetail(id, token = "") {
  93. var res = await _apollo.default.query(`
  94. query($input: ID!){
  95. ygParts(where:{id:$input})
  96. {
  97. id
  98. name
  99. img{
  100. url
  101. }
  102. description
  103. price1
  104. price2
  105. ygp_units{
  106. name
  107. part_code
  108. price
  109. description
  110. }
  111. }
  112. } `, token, {
  113. "input": id
  114. });
  115. return res;
  116. }
  117. async function GetYamalubeDetail(id, token = "") {
  118. var res = await _apollo.default.query(`
  119. query($input: ID!){
  120. yamalubes(where:{id:$input})
  121. {
  122. id
  123. name
  124. description
  125. price
  126. part_code
  127. img {
  128. url
  129. }
  130. stock
  131. }
  132. } `, token, {
  133. "input": id
  134. });
  135. return res;
  136. }
  137. async function GetHelmetDetail(id, token = "") {
  138. var res = await _apollo.default.query(`
  139. query($input: ID!){
  140. helmets(where:{id:$input})
  141. {
  142. id
  143. name
  144. description
  145. price
  146. part_code
  147. img {
  148. url
  149. }
  150. stock
  151. }
  152. } `, token, {
  153. "input": id
  154. });
  155. return res;
  156. }
  157. async function GetApparelDetail(id, token = "") {
  158. var res = await _apollo.default.query(`
  159. query($input: ID!){
  160. apparels(where:{id:$input})
  161. {
  162. id
  163. name
  164. description
  165. price
  166. part_code
  167. img {
  168. url
  169. }
  170. stock
  171. }
  172. } `, token, {
  173. "input": id
  174. });
  175. return res;
  176. }
  177. async function GetAccDetail(id, token = "") {
  178. var res = await _apollo.default.query(`
  179. query($input: ID!){
  180. accessories(where:{id:$input})
  181. {
  182. id
  183. name
  184. description
  185. price
  186. part_code
  187. img {
  188. url
  189. }
  190. stock
  191. }
  192. } `, token, {
  193. "input": id
  194. });
  195. return res;
  196. }
  197. module.exports = {
  198. //collection type YGP
  199. GetSparepartYGP: GetSparepartYGP,
  200. GetSparepartYamalube: GetSparepartYamalube,
  201. GetHelmet: GetHelmet,
  202. GetApparel: GetApparel,
  203. GetAcc: GetAcc,
  204. //Detail
  205. GetYGPDetail: GetYGPDetail,
  206. GetYamalubeDetail: GetYamalubeDetail,
  207. GetHelmetDetail: GetHelmetDetail,
  208. GetApparelDetail: GetApparelDetail,
  209. GetAccDetail: GetAccDetail
  210. };
  211. /***/ }),
  212. /***/ 9280:
  213. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  214. "use strict";
  215. // ESM COMPAT FLAG
  216. __webpack_require__.r(__webpack_exports__);
  217. // EXPORTS
  218. __webpack_require__.d(__webpack_exports__, {
  219. "default": function() { return /* binding */ Product_Sparepart; },
  220. "getServerSideProps": function() { return /* binding */ getServerSideProps; }
  221. });
  222. // EXTERNAL MODULE: external "react/jsx-runtime"
  223. var jsx_runtime_ = __webpack_require__(5282);
  224. // EXTERNAL MODULE: external "react"
  225. var external_react_ = __webpack_require__(9297);
  226. // EXTERNAL MODULE: ./components/_App/NavbarYamaha.js
  227. var NavbarYamaha = __webpack_require__(2478);
  228. // EXTERNAL MODULE: ./components/_App/FooterYamaha.js
  229. var FooterYamaha = __webpack_require__(362);
  230. // EXTERNAL MODULE: ./components/Common/PageBanner.js
  231. var PageBanner = __webpack_require__(1288);
  232. // EXTERNAL MODULE: ./node_modules/next/link.js
  233. var next_link = __webpack_require__(1664);
  234. // EXTERNAL MODULE: external "react-feather"
  235. var external_react_feather_ = __webpack_require__(9337);
  236. // EXTERNAL MODULE: external "react-redux"
  237. var external_react_redux_ = __webpack_require__(79);
  238. // EXTERNAL MODULE: ./components/Shop/AddToCartBtn.js
  239. var AddToCartBtn = __webpack_require__(2337);
  240. // EXTERNAL MODULE: external "react-tabs"
  241. var external_react_tabs_ = __webpack_require__(7659);
  242. // EXTERNAL MODULE: external "react-number-format"
  243. var external_react_number_format_ = __webpack_require__(3230);
  244. var external_react_number_format_default = /*#__PURE__*/__webpack_require__.n(external_react_number_format_);
  245. ;// CONCATENATED MODULE: ./components/Yamaha/Product/Sparepart.js
  246. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
  247. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
  248. function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
  249. function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
  250. function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
  251. //addon library
  252. (0,external_react_tabs_.resetIdCounter)(); //yarn library
  253. const ProductCard = function (_ref) {
  254. let {
  255. ygp,
  256. yamalube,
  257. helmet,
  258. apparel,
  259. accessories,
  260. backend
  261. } = _ref,
  262. props = _objectWithoutProperties(_ref, ["ygp", "yamalube", "helmet", "apparel", "accessories", "backend"]);
  263. const products = (0,external_react_redux_.useSelector)(state => state.products);
  264. console.log(ygp);
  265. const YGP = ygp.map(data => {
  266. return /*#__PURE__*/jsx_runtime_.jsx("div", {
  267. className: "col-lg-3 col-md-6 col-sm-6",
  268. children: /*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
  269. className: "single-products",
  270. children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
  271. className: "products-image",
  272. children: [/*#__PURE__*/jsx_runtime_.jsx("img", {
  273. src: `${backend}${data.img["url"]}`
  274. }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("ul", {
  275. children: [/*#__PURE__*/jsx_runtime_.jsx("li", {
  276. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  277. href: "#",
  278. children: /*#__PURE__*/jsx_runtime_.jsx(external_react_feather_.Search, {})
  279. })
  280. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  281. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  282. href: "#",
  283. children: /*#__PURE__*/jsx_runtime_.jsx(external_react_feather_.Heart, {})
  284. })
  285. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  286. children: /*#__PURE__*/jsx_runtime_.jsx(next_link.default, {
  287. href: "/products/[id]",
  288. as: `/products/${ygp.id}`,
  289. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  290. children: /*#__PURE__*/jsx_runtime_.jsx(external_react_feather_.Link, {})
  291. })
  292. })
  293. })]
  294. })]
  295. }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
  296. className: "products-content",
  297. children: [/*#__PURE__*/jsx_runtime_.jsx("h3", {
  298. children: /*#__PURE__*/jsx_runtime_.jsx(next_link.default, {
  299. href: "/yamaha/Product/Motor_Detail?s=" + data.id,
  300. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  301. children: data.name
  302. })
  303. })
  304. }), /*#__PURE__*/jsx_runtime_.jsx("span", {
  305. children: /*#__PURE__*/jsx_runtime_.jsx((external_react_number_format_default()), {
  306. value: data.price2,
  307. displayType: 'text',
  308. thousandSeparator: true,
  309. prefix: 'Rp.'
  310. })
  311. }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("ul", {
  312. children: [/*#__PURE__*/jsx_runtime_.jsx("li", {
  313. children: /*#__PURE__*/jsx_runtime_.jsx("i", {
  314. className: "flaticon-star-1"
  315. })
  316. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  317. children: /*#__PURE__*/jsx_runtime_.jsx("i", {
  318. className: "flaticon-star-1"
  319. })
  320. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  321. children: /*#__PURE__*/jsx_runtime_.jsx("i", {
  322. className: "flaticon-star-1"
  323. })
  324. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  325. children: /*#__PURE__*/jsx_runtime_.jsx("i", {
  326. className: "flaticon-star-1"
  327. })
  328. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  329. children: /*#__PURE__*/jsx_runtime_.jsx("i", {
  330. className: "flaticon-star-1"
  331. })
  332. })]
  333. }), /*#__PURE__*/jsx_runtime_.jsx(AddToCartBtn/* default */.Z, _objectSpread({}, ygp))]
  334. })]
  335. })
  336. }, ygp.id);
  337. });
  338. const Yamalube = yamalube.map(data => {
  339. return /*#__PURE__*/jsx_runtime_.jsx("div", {
  340. className: "col-lg-3 col-md-6 col-sm-6",
  341. children: /*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
  342. className: "single-products",
  343. children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
  344. className: "products-image",
  345. children: [/*#__PURE__*/jsx_runtime_.jsx("img", {
  346. src: `${backend}${data.img["url"]}`
  347. }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("ul", {
  348. children: [/*#__PURE__*/jsx_runtime_.jsx("li", {
  349. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  350. href: "#",
  351. children: /*#__PURE__*/jsx_runtime_.jsx(external_react_feather_.Search, {})
  352. })
  353. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  354. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  355. href: "#",
  356. children: /*#__PURE__*/jsx_runtime_.jsx(external_react_feather_.Heart, {})
  357. })
  358. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  359. children: /*#__PURE__*/jsx_runtime_.jsx(next_link.default, {
  360. href: "/products/[id]",
  361. as: `/products/${ygp.id}`,
  362. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  363. children: /*#__PURE__*/jsx_runtime_.jsx(external_react_feather_.Link, {})
  364. })
  365. })
  366. })]
  367. })]
  368. }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
  369. className: "products-content",
  370. children: [/*#__PURE__*/jsx_runtime_.jsx("h3", {
  371. children: /*#__PURE__*/jsx_runtime_.jsx(next_link.default, {
  372. href: "/yamaha/Product/Motor_Detail?s=" + data.id,
  373. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  374. children: data.name
  375. })
  376. })
  377. }), /*#__PURE__*/jsx_runtime_.jsx("span", {
  378. children: /*#__PURE__*/jsx_runtime_.jsx((external_react_number_format_default()), {
  379. value: data.price2,
  380. displayType: 'text',
  381. thousandSeparator: true,
  382. prefix: 'Rp.'
  383. })
  384. }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("ul", {
  385. children: [/*#__PURE__*/jsx_runtime_.jsx("li", {
  386. children: /*#__PURE__*/jsx_runtime_.jsx("i", {
  387. className: "flaticon-star-1"
  388. })
  389. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  390. children: /*#__PURE__*/jsx_runtime_.jsx("i", {
  391. className: "flaticon-star-1"
  392. })
  393. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  394. children: /*#__PURE__*/jsx_runtime_.jsx("i", {
  395. className: "flaticon-star-1"
  396. })
  397. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  398. children: /*#__PURE__*/jsx_runtime_.jsx("i", {
  399. className: "flaticon-star-1"
  400. })
  401. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  402. children: /*#__PURE__*/jsx_runtime_.jsx("i", {
  403. className: "flaticon-star-1"
  404. })
  405. })]
  406. }), /*#__PURE__*/jsx_runtime_.jsx(AddToCartBtn/* default */.Z, _objectSpread({}, ygp))]
  407. })]
  408. })
  409. }, ygp.id);
  410. });
  411. const Helmet = helmet.map(data => {
  412. return /*#__PURE__*/jsx_runtime_.jsx("div", {
  413. className: "col-lg-3 col-md-6 col-sm-6",
  414. children: /*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
  415. className: "single-products",
  416. children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
  417. className: "products-image",
  418. children: [/*#__PURE__*/jsx_runtime_.jsx("img", {
  419. src: `${backend}${data.img["url"]}`
  420. }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("ul", {
  421. children: [/*#__PURE__*/jsx_runtime_.jsx("li", {
  422. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  423. href: "#",
  424. children: /*#__PURE__*/jsx_runtime_.jsx(external_react_feather_.Search, {})
  425. })
  426. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  427. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  428. href: "#",
  429. children: /*#__PURE__*/jsx_runtime_.jsx(external_react_feather_.Heart, {})
  430. })
  431. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  432. children: /*#__PURE__*/jsx_runtime_.jsx(next_link.default, {
  433. href: "/products/[id]",
  434. as: `/products/${ygp.id}`,
  435. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  436. children: /*#__PURE__*/jsx_runtime_.jsx(external_react_feather_.Link, {})
  437. })
  438. })
  439. })]
  440. })]
  441. }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
  442. className: "products-content",
  443. children: [/*#__PURE__*/jsx_runtime_.jsx("h3", {
  444. children: /*#__PURE__*/jsx_runtime_.jsx(next_link.default, {
  445. href: "/yamaha/Product/Motor_Detail?s=" + data.id,
  446. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  447. children: data.name
  448. })
  449. })
  450. }), /*#__PURE__*/jsx_runtime_.jsx("span", {
  451. children: /*#__PURE__*/jsx_runtime_.jsx((external_react_number_format_default()), {
  452. value: data.price2,
  453. displayType: 'text',
  454. thousandSeparator: true,
  455. prefix: 'Rp.'
  456. })
  457. }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("ul", {
  458. children: [/*#__PURE__*/jsx_runtime_.jsx("li", {
  459. children: /*#__PURE__*/jsx_runtime_.jsx("i", {
  460. className: "flaticon-star-1"
  461. })
  462. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  463. children: /*#__PURE__*/jsx_runtime_.jsx("i", {
  464. className: "flaticon-star-1"
  465. })
  466. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  467. children: /*#__PURE__*/jsx_runtime_.jsx("i", {
  468. className: "flaticon-star-1"
  469. })
  470. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  471. children: /*#__PURE__*/jsx_runtime_.jsx("i", {
  472. className: "flaticon-star-1"
  473. })
  474. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  475. children: /*#__PURE__*/jsx_runtime_.jsx("i", {
  476. className: "flaticon-star-1"
  477. })
  478. })]
  479. }), /*#__PURE__*/jsx_runtime_.jsx(AddToCartBtn/* default */.Z, _objectSpread({}, helmet))]
  480. })]
  481. })
  482. }, helmet.id);
  483. });
  484. const Apparel = apparel.map(data => {
  485. return /*#__PURE__*/jsx_runtime_.jsx("div", {
  486. className: "col-lg-3 col-md-6 col-sm-6",
  487. children: /*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
  488. className: "single-products",
  489. children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
  490. className: "products-image",
  491. children: [/*#__PURE__*/jsx_runtime_.jsx("img", {
  492. src: `${backend}${data.img["url"]}`
  493. }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("ul", {
  494. children: [/*#__PURE__*/jsx_runtime_.jsx("li", {
  495. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  496. href: "#",
  497. children: /*#__PURE__*/jsx_runtime_.jsx(external_react_feather_.Search, {})
  498. })
  499. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  500. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  501. href: "#",
  502. children: /*#__PURE__*/jsx_runtime_.jsx(external_react_feather_.Heart, {})
  503. })
  504. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  505. children: /*#__PURE__*/jsx_runtime_.jsx(next_link.default, {
  506. href: "/products/[id]",
  507. as: `/products/${ygp.id}`,
  508. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  509. children: /*#__PURE__*/jsx_runtime_.jsx(external_react_feather_.Link, {})
  510. })
  511. })
  512. })]
  513. })]
  514. }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
  515. className: "products-content",
  516. children: [/*#__PURE__*/jsx_runtime_.jsx("h3", {
  517. children: /*#__PURE__*/jsx_runtime_.jsx(next_link.default, {
  518. href: "/yamaha/Product/Motor_Detail?s=" + data.id,
  519. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  520. children: data.name
  521. })
  522. })
  523. }), /*#__PURE__*/jsx_runtime_.jsx("span", {
  524. children: /*#__PURE__*/jsx_runtime_.jsx((external_react_number_format_default()), {
  525. value: data.price2,
  526. displayType: 'text',
  527. thousandSeparator: true,
  528. prefix: 'Rp.'
  529. })
  530. }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("ul", {
  531. children: [/*#__PURE__*/jsx_runtime_.jsx("li", {
  532. children: /*#__PURE__*/jsx_runtime_.jsx("i", {
  533. className: "flaticon-star-1"
  534. })
  535. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  536. children: /*#__PURE__*/jsx_runtime_.jsx("i", {
  537. className: "flaticon-star-1"
  538. })
  539. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  540. children: /*#__PURE__*/jsx_runtime_.jsx("i", {
  541. className: "flaticon-star-1"
  542. })
  543. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  544. children: /*#__PURE__*/jsx_runtime_.jsx("i", {
  545. className: "flaticon-star-1"
  546. })
  547. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  548. children: /*#__PURE__*/jsx_runtime_.jsx("i", {
  549. className: "flaticon-star-1"
  550. })
  551. })]
  552. }), /*#__PURE__*/jsx_runtime_.jsx(AddToCartBtn/* default */.Z, _objectSpread({}, apparel))]
  553. })]
  554. })
  555. }, apparel.id);
  556. });
  557. const Accessories = accessories.map(data => {
  558. return /*#__PURE__*/jsx_runtime_.jsx("div", {
  559. className: "col-lg-3 col-md-6 col-sm-6",
  560. children: /*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
  561. className: "single-products",
  562. children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
  563. className: "products-image",
  564. children: [/*#__PURE__*/jsx_runtime_.jsx("img", {
  565. src: `${backend}${data.img["url"]}`
  566. }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("ul", {
  567. children: [/*#__PURE__*/jsx_runtime_.jsx("li", {
  568. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  569. href: "#",
  570. children: /*#__PURE__*/jsx_runtime_.jsx(external_react_feather_.Search, {})
  571. })
  572. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  573. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  574. href: "#",
  575. children: /*#__PURE__*/jsx_runtime_.jsx(external_react_feather_.Heart, {})
  576. })
  577. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  578. children: /*#__PURE__*/jsx_runtime_.jsx(next_link.default, {
  579. href: "/products/[id]",
  580. as: `/products/${ygp.id}`,
  581. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  582. children: /*#__PURE__*/jsx_runtime_.jsx(external_react_feather_.Link, {})
  583. })
  584. })
  585. })]
  586. })]
  587. }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
  588. className: "products-content",
  589. children: [/*#__PURE__*/jsx_runtime_.jsx("h3", {
  590. children: /*#__PURE__*/jsx_runtime_.jsx(next_link.default, {
  591. href: "/yamaha/Product/Motor_Detail?s=" + data.id,
  592. children: /*#__PURE__*/jsx_runtime_.jsx("a", {
  593. children: data.name
  594. })
  595. })
  596. }), /*#__PURE__*/jsx_runtime_.jsx("span", {
  597. children: /*#__PURE__*/jsx_runtime_.jsx((external_react_number_format_default()), {
  598. value: data.price2,
  599. displayType: 'text',
  600. thousandSeparator: true,
  601. prefix: 'Rp.'
  602. })
  603. }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("ul", {
  604. children: [/*#__PURE__*/jsx_runtime_.jsx("li", {
  605. children: /*#__PURE__*/jsx_runtime_.jsx("i", {
  606. className: "flaticon-star-1"
  607. })
  608. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  609. children: /*#__PURE__*/jsx_runtime_.jsx("i", {
  610. className: "flaticon-star-1"
  611. })
  612. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  613. children: /*#__PURE__*/jsx_runtime_.jsx("i", {
  614. className: "flaticon-star-1"
  615. })
  616. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  617. children: /*#__PURE__*/jsx_runtime_.jsx("i", {
  618. className: "flaticon-star-1"
  619. })
  620. }), /*#__PURE__*/jsx_runtime_.jsx("li", {
  621. children: /*#__PURE__*/jsx_runtime_.jsx("i", {
  622. className: "flaticon-star-1"
  623. })
  624. })]
  625. }), /*#__PURE__*/jsx_runtime_.jsx(AddToCartBtn/* default */.Z, _objectSpread({}, accessories))]
  626. })]
  627. })
  628. }, accessories.id);
  629. });
  630. return /*#__PURE__*/jsx_runtime_.jsx("div", {
  631. className: "shop-area ptb-80",
  632. children: /*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
  633. className: "container",
  634. children: [/*#__PURE__*/jsx_runtime_.jsx("div", {
  635. className: "woocommerce-topbar",
  636. children: /*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
  637. className: "row align-items-center",
  638. children: [/*#__PURE__*/jsx_runtime_.jsx("div", {
  639. className: "col-lg-9 col-md-7 col-sm-7",
  640. children: /*#__PURE__*/jsx_runtime_.jsx("div", {
  641. className: "woocommerce-result-count",
  642. children: /*#__PURE__*/jsx_runtime_.jsx("p", {
  643. children: "Showing 1-8 of 14 results"
  644. })
  645. })
  646. }), /*#__PURE__*/jsx_runtime_.jsx("div", {
  647. className: "col-lg-3 col-md-5 col-sm-5",
  648. children: /*#__PURE__*/jsx_runtime_.jsx("div", {
  649. className: "woocommerce-topbar-ordering",
  650. children: /*#__PURE__*/(0,jsx_runtime_.jsxs)("select", {
  651. className: "form-select",
  652. children: [/*#__PURE__*/jsx_runtime_.jsx("option", {
  653. value: "1",
  654. children: "Sort by Popularity"
  655. }), /*#__PURE__*/jsx_runtime_.jsx("option", {
  656. value: "2",
  657. children: "Sort by Average Rating"
  658. }), /*#__PURE__*/jsx_runtime_.jsx("option", {
  659. value: "3",
  660. children: "Sort by Latest"
  661. }), /*#__PURE__*/jsx_runtime_.jsx("option", {
  662. value: "4",
  663. children: "Sort by price: Low to High"
  664. }), /*#__PURE__*/jsx_runtime_.jsx("option", {
  665. value: "5",
  666. children: "Sort by price: High to Low"
  667. }), /*#__PURE__*/jsx_runtime_.jsx("option", {
  668. value: "6",
  669. children: "Sort by New"
  670. })]
  671. })
  672. })
  673. })]
  674. })
  675. }), /*#__PURE__*/jsx_runtime_.jsx("div", {
  676. width: "fullwidth",
  677. children: /*#__PURE__*/jsx_runtime_.jsx("div", {
  678. className: "products-details-tabs",
  679. children: /*#__PURE__*/(0,jsx_runtime_.jsxs)(external_react_tabs_.Tabs, {
  680. children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(external_react_tabs_.TabList, {
  681. children: [/*#__PURE__*/jsx_runtime_.jsx(external_react_tabs_.Tab, {
  682. children: "YGP"
  683. }), /*#__PURE__*/jsx_runtime_.jsx(external_react_tabs_.Tab, {
  684. children: "Yamalube"
  685. }), /*#__PURE__*/jsx_runtime_.jsx(external_react_tabs_.Tab, {
  686. children: "helmet"
  687. }), /*#__PURE__*/jsx_runtime_.jsx(external_react_tabs_.Tab, {
  688. children: "Apparel"
  689. }), /*#__PURE__*/jsx_runtime_.jsx(external_react_tabs_.Tab, {
  690. children: "Accessories"
  691. })]
  692. }), /*#__PURE__*/jsx_runtime_.jsx(external_react_tabs_.TabPanel, {
  693. children: /*#__PURE__*/jsx_runtime_.jsx("div", {
  694. className: "row justify-content-md-center",
  695. children: YGP
  696. })
  697. }), /*#__PURE__*/jsx_runtime_.jsx(external_react_tabs_.TabPanel, {
  698. children: /*#__PURE__*/jsx_runtime_.jsx("div", {
  699. className: "row justify-content-md-center",
  700. children: Yamalube
  701. })
  702. }), /*#__PURE__*/jsx_runtime_.jsx(external_react_tabs_.TabPanel, {
  703. children: /*#__PURE__*/jsx_runtime_.jsx("div", {
  704. className: "row justify-content-md-center",
  705. children: Helmet
  706. })
  707. }), /*#__PURE__*/jsx_runtime_.jsx(external_react_tabs_.TabPanel, {
  708. children: /*#__PURE__*/jsx_runtime_.jsx("div", {
  709. className: "row justify-content-md-center",
  710. children: Apparel
  711. })
  712. }), /*#__PURE__*/jsx_runtime_.jsx(external_react_tabs_.TabPanel, {
  713. children: /*#__PURE__*/jsx_runtime_.jsx("div", {
  714. className: "row justify-content-md-center",
  715. children: Accessories
  716. })
  717. })]
  718. })
  719. })
  720. })]
  721. })
  722. });
  723. };
  724. /* harmony default export */ var Sparepart = (ProductCard);
  725. // EXTERNAL MODULE: ./api/sparepart/sparepart.js
  726. var sparepart = __webpack_require__(3920);
  727. var sparepart_default = /*#__PURE__*/__webpack_require__.n(sparepart);
  728. // EXTERNAL MODULE: external "cookies"
  729. var external_cookies_ = __webpack_require__(9038);
  730. ;// CONCATENATED MODULE: ./pages/yamaha/Product/Sparepart.js
  731. function Sparepart_objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = Sparepart_objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
  732. function Sparepart_objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
  733. const Shop = function (_ref) {
  734. let {
  735. ygp,
  736. yamalube,
  737. helmet,
  738. apparel,
  739. accessories,
  740. backend
  741. } = _ref,
  742. props = Sparepart_objectWithoutProperties(_ref, ["ygp", "yamalube", "helmet", "apparel", "accessories", "backend"]);
  743. return /*#__PURE__*/(0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
  744. children: [/*#__PURE__*/jsx_runtime_.jsx(NavbarYamaha/* default */.Z, {}), /*#__PURE__*/jsx_runtime_.jsx(PageBanner/* default */.Z, {
  745. pageTitle: "Sparepart"
  746. }), /*#__PURE__*/jsx_runtime_.jsx(Sparepart, {
  747. ygp: ygp,
  748. yamalube: yamalube,
  749. helmet: helmet,
  750. apparel: apparel,
  751. accessories: accessories,
  752. backend: backend
  753. }), /*#__PURE__*/jsx_runtime_.jsx(FooterYamaha/* default */.Z, {})]
  754. });
  755. };
  756. /* harmony default export */ var Product_Sparepart = (Shop);
  757. async function getServerSideProps(context) {
  758. var ygp = [];
  759. var yamalube = [];
  760. var helmet = [];
  761. var apparel = [];
  762. var accessories = [];
  763. const backend = process.env.BACKEND_SERVER_URI;
  764. var res = await sparepart_default().GetSparepartYGP();
  765. if (res["STATUS"] === 1) {
  766. ygp = res["DATA"]["ygParts"];
  767. }
  768. var res = await sparepart_default().GetSparepartYamalube();
  769. if (res["STATUS"] === 1) {
  770. yamalube = res["DATA"]["yamalubes"];
  771. }
  772. var res = await sparepart_default().GetHelmet();
  773. if (res["STATUS"] === 1) {
  774. helmet = res["DATA"]["helmets"];
  775. }
  776. var res = await sparepart_default().GetApparel();
  777. if (res["STATUS"] === 1) {
  778. apparel = res["DATA"]["apparels"];
  779. }
  780. var res = await sparepart_default().GetAcc();
  781. if (res["STATUS"] === 1) {
  782. accessories = res["DATA"]["accessories"];
  783. }
  784. return {
  785. props: {
  786. ygp,
  787. yamalube,
  788. helmet,
  789. apparel,
  790. accessories,
  791. backend
  792. } // will be passed to the page component as props
  793. };
  794. }
  795. /***/ }),
  796. /***/ 8074:
  797. /***/ (function(module) {
  798. "use strict";
  799. module.exports = require("@apollo/client");;
  800. /***/ }),
  801. /***/ 9038:
  802. /***/ (function(module) {
  803. "use strict";
  804. module.exports = require("cookies");;
  805. /***/ }),
  806. /***/ 1683:
  807. /***/ (function(module) {
  808. "use strict";
  809. module.exports = require("cross-fetch");;
  810. /***/ }),
  811. /***/ 8417:
  812. /***/ (function(module) {
  813. "use strict";
  814. module.exports = require("next/dist/next-server/lib/router-context.js");;
  815. /***/ }),
  816. /***/ 2238:
  817. /***/ (function(module) {
  818. "use strict";
  819. module.exports = require("next/dist/next-server/lib/router/utils/get-asset-path-from-route.js");;
  820. /***/ }),
  821. /***/ 6731:
  822. /***/ (function(module) {
  823. "use strict";
  824. module.exports = require("next/router");;
  825. /***/ }),
  826. /***/ 9297:
  827. /***/ (function(module) {
  828. "use strict";
  829. module.exports = require("react");;
  830. /***/ }),
  831. /***/ 9337:
  832. /***/ (function(module) {
  833. "use strict";
  834. module.exports = require("react-feather");;
  835. /***/ }),
  836. /***/ 3230:
  837. /***/ (function(module) {
  838. "use strict";
  839. module.exports = require("react-number-format");;
  840. /***/ }),
  841. /***/ 79:
  842. /***/ (function(module) {
  843. "use strict";
  844. module.exports = require("react-redux");;
  845. /***/ }),
  846. /***/ 7659:
  847. /***/ (function(module) {
  848. "use strict";
  849. module.exports = require("react-tabs");;
  850. /***/ }),
  851. /***/ 9614:
  852. /***/ (function(module) {
  853. "use strict";
  854. module.exports = require("react-toast-notifications");;
  855. /***/ }),
  856. /***/ 5282:
  857. /***/ (function(module) {
  858. "use strict";
  859. module.exports = require("react/jsx-runtime");;
  860. /***/ })
  861. };
  862. ;
  863. // load runtime
  864. var __webpack_require__ = require("../../../webpack-runtime.js");
  865. __webpack_require__.C(exports);
  866. var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
  867. var __webpack_exports__ = __webpack_require__.X(0, [1664,4755,6371,7798,6120], function() { return __webpack_exec__(9280); });
  868. module.exports = __webpack_exports__;
  869. })();