25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 

607 satır
27 KiB

  1. import React from "react";
  2. import classNames from "classnames";
  3. import { makeStyles } from "@material-ui/core/styles";
  4. import GridContainer from "components/Grid/GridContainer.js";
  5. import GridItem from "components/Grid/GridItem.js";
  6. import NavPills from "components/NavPills/NavPills.js";
  7. import Card from "components/Card/Card.js";
  8. import CardBody from "components/Card/CardBody.js";
  9. import CardHeader from "components/Card/CardHeader.js";
  10. import Button from "components/CustomButtons/Button.js";
  11. import styles from "assets/jss/nextjs-material-kit/pages/profilePage.js";
  12. import Icon from "@material-ui/core/Icon";
  13. import { Motorcycle } from "@material-ui/icons";
  14. import NumberFormat from 'react-number-format';
  15. import SnackbarContent from "components/Snackbar/SnackbarContent.js";
  16. const useStyles = makeStyles(styles);
  17. const DataProduct = function ({
  18. backend,
  19. ygp,
  20. yamalube,
  21. rconcept,
  22. mtx,
  23. extreme,
  24. ranger,
  25. fighter,
  26. swirl,
  27. classic,
  28. uno,
  29. apparel,
  30. asia,
  31. basic,
  32. merchand,
  33. maxi,
  34. rainsuit,
  35. motogp,
  36. offroad,
  37. accessories, ...props }) {
  38. const classes = useStyles();
  39. const { ...rest } = props;
  40. const imageClasses = classNames(
  41. classes.imgRaised,
  42. classes.imgRoundedCircle,
  43. classes.imgFluid
  44. );
  45. const navImageClasses = classNames(classes.imgRounded, classes.imgGallery);
  46. const YGP = ygp.map((data) => {
  47. return (
  48. <div style={{padding: "20px", marginTop:"-40px"}}>
  49. <Card className={classes.textCenter} align="center" style={{width:"300px"}}>
  50. <CardBody>
  51. <div align="center" style={{padding:"10px"}}>
  52. <img style={{ width: "150px", display: "block" }} src={`${backend}${data.img["url"]}`} className={navImageClasses}
  53. />
  54. <div align="center">
  55. <h5><b>{data.name}</b></h5>
  56. <h5>
  57. <b><NumberFormat value={data.price} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /></b>
  58. </h5><br/>
  59. <Button
  60. color="info" round
  61. href={"/yamaha/product/ygp_detail?s="+data.id}
  62. >
  63. <Icon className={classes.icons}>open_in_new</Icon>Detail Product
  64. </Button>
  65. </div>
  66. </div>
  67. </CardBody>
  68. </Card>
  69. </div>
  70. );
  71. })
  72. const Yamalube = yamalube.map((data) => {
  73. return (
  74. <div style={{padding: "20px", marginTop:"-40px"}}>
  75. <Card className={classes.textCenter} align="center" style={{width:"300px", height:"350px"}}>
  76. <CardBody>
  77. <div align="center" style={{padding:"10px"}}>
  78. <img style={{ width: "100px", height:"100px", display: "block" }} src={`${backend}${data.img["url"]}`} className={navImageClasses}
  79. />
  80. <div align="center">
  81. <h5><b>{data.name}</b></h5>
  82. <h5>
  83. <b><NumberFormat value={data.price} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /></b>
  84. </h5><br/>
  85. <Button
  86. color="info" round
  87. href={"/yamaha/product/yamalube_detail?s="+data.id}
  88. >
  89. <Icon className={classes.icons}>open_in_new</Icon>Detail Product
  90. </Button>
  91. </div>
  92. </div>
  93. </CardBody>
  94. </Card>
  95. </div>
  96. );
  97. })
  98. const HelmetRConcepts = rconcept.map((data) => {
  99. return (
  100. <div style={{padding: "20px", marginTop:"-40px"}}>
  101. <Card className={classes.textCenter} align="center" style={{width:"300px"}}>
  102. <CardBody>
  103. <div align="center" style={{padding:"10px"}}>
  104. <img style={{ width: "150px", display: "block" }} src={`${backend}${data.img["url"]}`} className={navImageClasses}
  105. />
  106. <div align="center">
  107. <h5><b>{data.name}</b></h5>
  108. <h5>
  109. <b><NumberFormat value={data.price} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /></b>
  110. </h5>
  111. <Button
  112. color="info" round
  113. href={"/yamaha/product/helmet_details?s="+data.id}
  114. >
  115. <Icon className={classes.icons}>open_in_new</Icon>Detail Product
  116. </Button>
  117. </div>
  118. </div>
  119. </CardBody>
  120. </Card>
  121. </div>
  122. );
  123. })
  124. const HelmetMTX = mtx.map((data) => {
  125. return (
  126. <div style={{padding: "20px", marginTop:"-40px"}}>
  127. <Card className={classes.textCenter} align="center" style={{width:"300px"}}>
  128. <CardBody>
  129. <div align="center" style={{padding:"10px"}}>
  130. <img style={{ width: "100px", display: "block" }} src={`${backend}${data.img["url"]}`} className={navImageClasses}
  131. />
  132. <div align="center">
  133. <h5><b>{data.name}</b></h5>
  134. <h5>
  135. <b><NumberFormat value={data.price} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /></b>
  136. </h5>
  137. <Button
  138. color="info" round
  139. href={"/yamaha/product/helmet_details?s="+data.id}
  140. >
  141. <Icon className={classes.icons}>open_in_new</Icon>Detail Product
  142. </Button>
  143. </div>
  144. </div>
  145. </CardBody>
  146. </Card>
  147. </div>
  148. );
  149. })
  150. const HelmetExtreme = extreme.map((data) => {
  151. return (
  152. <div style={{padding: "20px", marginTop:"-40px"}}>
  153. <Card className={classes.textCenter} align="center" style={{width:"300px"}}>
  154. <CardBody>
  155. <div align="center" style={{padding:"10px"}}>
  156. <img style={{ width: "100px", display: "block" }} src={`${backend}${data.img["url"]}`} className={navImageClasses}
  157. />
  158. <div align="center">
  159. <h5><b>{data.name}</b></h5>
  160. <h5>
  161. <b><NumberFormat value={data.price} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /></b>
  162. </h5>
  163. <Button
  164. color="info" round
  165. href={"/yamaha/product/helmet_details?s="+data.id}
  166. >
  167. <Icon className={classes.icons}>open_in_new</Icon>Detail Product
  168. </Button>
  169. </div>
  170. </div>
  171. </CardBody>
  172. </Card>
  173. </div>
  174. );
  175. })
  176. const HelmetRanger = ranger.map((data) => {
  177. return (
  178. <div style={{padding: "20px", marginTop:"-40px"}}>
  179. <Card className={classes.textCenter} align="center" style={{width:"300px"}}>
  180. <CardBody>
  181. <div align="center" style={{padding:"10px"}}>
  182. <img style={{ width: "100px", display: "block" }} src={`${backend}${data.img["url"]}`} className={navImageClasses}
  183. />
  184. <div align="center">
  185. <h5><b>{data.name}</b></h5>
  186. <h5>
  187. <b><NumberFormat value={data.price} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /></b>
  188. </h5>
  189. <Button
  190. color="info" round
  191. href={"/yamaha/product/helmet_details?s="+data.id}
  192. >
  193. <Icon className={classes.icons}>open_in_new</Icon>Detail Product
  194. </Button>
  195. </div>
  196. </div>
  197. </CardBody>
  198. </Card>
  199. </div>
  200. );
  201. })
  202. const HelmetFighter = fighter.map((data) => {
  203. return (
  204. <div style={{padding: "20px", marginTop:"-40px"}}>
  205. <Card className={classes.textCenter} align="center" style={{width:"300px"}}>
  206. <CardBody>
  207. <div align="center" style={{padding:"10px"}}>
  208. <img style={{ width: "100px", display: "block" }} src={`${backend}${data.img["url"]}`} className={navImageClasses}
  209. />
  210. <div align="center">
  211. <h5><b>{data.name}</b></h5>
  212. <h5>
  213. <b><NumberFormat value={data.price} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /></b>
  214. </h5>
  215. <Button
  216. color="info" round
  217. href={"/yamaha/product/helmet_details?s="+data.id}
  218. >
  219. <Icon className={classes.icons}>open_in_new</Icon>Detail Product
  220. </Button>
  221. </div>
  222. </div>
  223. </CardBody>
  224. </Card>
  225. </div>
  226. );
  227. })
  228. const HelmetSwirl = swirl.map((data) => {
  229. return (
  230. <div style={{padding: "20px", marginTop:"-40px"}}>
  231. <Card className={classes.textCenter} align="center" style={{width:"300px"}}>
  232. <CardBody>
  233. <div align="center" style={{padding:"10px"}}>
  234. <img style={{ width: "100px", display: "block" }} src={`${backend}${data.img["url"]}`} className={navImageClasses}
  235. />
  236. <div align="center">
  237. <h5><b>{data.name}</b></h5>
  238. <h5>
  239. <b><NumberFormat value={data.price} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /></b>
  240. </h5>
  241. <Button
  242. color="info" round
  243. href={"/yamaha/product/helmet_details?s="+data.id}
  244. >
  245. <Icon className={classes.icons}>open_in_new</Icon>Detail Product
  246. </Button>
  247. </div>
  248. </div>
  249. </CardBody>
  250. </Card>
  251. </div>
  252. );
  253. })
  254. const HelmetClassic = classic.map((data) => {
  255. return (
  256. <div style={{padding: "20px", marginTop:"-40px"}}>
  257. <Card className={classes.textCenter} align="center" style={{width:"300px"}}>
  258. <CardBody>
  259. <div align="center" style={{padding:"10px"}}>
  260. <img style={{ width: "100px", display: "block" }} src={`${backend}${data.img["url"]}`} className={navImageClasses}
  261. />
  262. <div align="center">
  263. <h5><b>{data.name}</b></h5>
  264. <h5>
  265. <b><NumberFormat value={data.price} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /></b>
  266. </h5>
  267. <Button
  268. color="info" round
  269. href={"/yamaha/product/helmet_details?s="+data.id}
  270. >
  271. <Icon className={classes.icons}>open_in_new</Icon>Detail Product
  272. </Button>
  273. </div>
  274. </div>
  275. </CardBody>
  276. </Card>
  277. </div>
  278. );
  279. })
  280. const HelmetUno = uno.map((data) => {
  281. return (
  282. <div style={{padding: "20px", marginTop:"-40px"}}>
  283. <Card className={classes.textCenter} align="center" style={{width:"300px"}}>
  284. <CardBody>
  285. <div align="center" style={{padding:"10px"}}>
  286. <img style={{ width: "100px", display: "block" }} src={`${backend}${data.img["url"]}`} className={navImageClasses}
  287. />
  288. <div align="center">
  289. <h5><b>{data.name}</b></h5>
  290. <h5>
  291. <b><NumberFormat value={data.price} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /></b>
  292. </h5>
  293. <Button
  294. color="info" round
  295. href={"/yamaha/product/helmet_details?s="+data.id}
  296. >
  297. <Icon className={classes.icons}>open_in_new</Icon>Detail Product
  298. </Button>
  299. </div>
  300. </div>
  301. </CardBody>
  302. </Card>
  303. </div>
  304. );
  305. })
  306. const ApparelRConcept = apparel.map((data) => {
  307. return (
  308. <div style={{padding: "20px", marginTop:"-40px"}}>
  309. <Card className={classes.textCenter} align="center" style={{width:"300px"}}>
  310. <CardBody>
  311. <div align="center" style={{padding:"10px"}}>
  312. <img style={{ width: "100px", display: "block" }} src={`${backend}${data.img["url"]}`} className={navImageClasses}
  313. />
  314. <div align="center">
  315. <h5><b>{data.name}</b></h5>
  316. <h5>
  317. <b><NumberFormat value={data.price} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /></b>
  318. </h5>
  319. <Button
  320. color="info" round
  321. href={"/yamaha/product/helmet_details?s="+data.id}
  322. >
  323. <Icon className={classes.icons}>open_in_new</Icon>Detail Product
  324. </Button>
  325. </div>
  326. </div>
  327. </CardBody>
  328. </Card>
  329. </div>
  330. );
  331. })
  332. const ApparelAsia = asia.map((data) => {
  333. return (
  334. <div style={{padding: "20px", marginTop:"-40px"}}>
  335. <Card className={classes.textCenter} align="center" style={{width:"350px"}}>
  336. <CardBody>
  337. <div style={{padding:"10px"}}>
  338. <img style={{ width: "100px", display: "block" }} src={`${backend}${data.img["url"]}`} className={navImageClasses}
  339. />
  340. <div align="center">
  341. <h5><b>{data.name}</b></h5>
  342. <h5>
  343. <b><NumberFormat value={data.price} displayType={'text'} thousandSeparator={true} prefix={'Rp.'}/></b>
  344. </h5>
  345. <Button
  346. color="info" round
  347. href={"/yamaha/product/apparel_details?s="+data.id}
  348. >
  349. <Icon className={classes.icons}>open_in_new</Icon>Detail Product
  350. </Button>
  351. </div>
  352. </div>
  353. </CardBody>
  354. </Card>
  355. </div>
  356. );
  357. })
  358. const Accessories = accessories.map((data) => {
  359. return (
  360. <div style={{padding: "20px", marginTop:"-40px"}}>
  361. <Card className={classes.textCenter} align="center" style={{width:"300px"}}>
  362. <CardBody>
  363. <div align="center" style={{padding:"10px"}}>
  364. <img style={{ width: "100px", display: "block" }} src={`${backend}${data.img["url"]}`} className={navImageClasses}
  365. />
  366. <div align="center">
  367. <h5><b>{data.name}</b></h5>
  368. <h5>
  369. <b><NumberFormat value={data.price} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /></b>
  370. </h5>
  371. <Button
  372. color="info" round
  373. href={"/yamaha/product/helmet_details?s="+data.id}
  374. >
  375. <Icon className={classes.icons}>open_in_new</Icon>Detail Product
  376. </Button>
  377. </div>
  378. </div>
  379. </CardBody>
  380. </Card>
  381. </div>
  382. );
  383. })
  384. return (
  385. <Card className={classes.textCenter}>
  386. <div align="center">
  387. <CardHeader color="info">Product</CardHeader>
  388. </div>
  389. <CardBody>
  390. <div align="center">
  391. <h2><b>Sparepart & Accessories</b></h2>
  392. </div>
  393. <GridContainer justify="center">
  394. <GridItem>
  395. <NavPills
  396. alignCenter
  397. color="primary"
  398. tabs={[
  399. {
  400. tabButton: "YGP",
  401. tabIcon: Motorcycle,
  402. tabContent: (
  403. <GridContainer justify="center">
  404. {YGP}
  405. </GridContainer>
  406. ),
  407. },
  408. {
  409. tabButton: "Yamalube",
  410. tabIcon: Motorcycle,
  411. tabContent: (
  412. <GridContainer justify="center">
  413. {Yamalube}
  414. </GridContainer>
  415. ),
  416. },
  417. {
  418. tabButton: "Helmet",
  419. tabIcon: Motorcycle,
  420. tabContent: (
  421. <div>
  422. <div align="center">
  423. <div align="center" className={classes.section} id="notifications">
  424. <SnackbarContent
  425. message={
  426. <h4><b>R CONCEPT</b></h4>
  427. }
  428. align="center"
  429. color="info"
  430. />
  431. </div>
  432. <GridContainer justify="center" style={{padding:"40px", marginTop:"-50px"}}>
  433. {HelmetRConcepts}
  434. </GridContainer>
  435. </div><br></br><br></br>
  436. <div align="center" style={{marginTop:"-50px"}}>
  437. <div align="center" className={classes.section} id="notifications">
  438. <SnackbarContent
  439. message={
  440. <h4><b>MTX</b></h4>
  441. }
  442. align="center"
  443. color="info"
  444. />
  445. </div>
  446. <GridContainer justify="center" style={{padding:"40px", marginTop:"-50px"}}>
  447. {HelmetMTX}
  448. </GridContainer>
  449. </div><br></br><br></br>
  450. <div align="center" style={{marginTop:"-50px"}}>
  451. <div align="center" className={classes.section} id="notifications">
  452. <SnackbarContent
  453. message={
  454. <h4><b>Extreme</b></h4>
  455. }
  456. align="center"
  457. color="info"
  458. />
  459. </div>
  460. <GridContainer justify="center" style={{padding:"40px", marginTop:"-50px"}}>
  461. {HelmetExtreme}
  462. </GridContainer>
  463. </div><br></br><br></br>
  464. <div align="center" style={{marginTop:"-50px"}}>
  465. <div align="center" className={classes.section} id="notifications">
  466. <SnackbarContent
  467. message={
  468. <h4><b>Ranger</b></h4>
  469. }
  470. align="center"
  471. color="info"
  472. />
  473. </div>
  474. <GridContainer justify="center" style={{padding:"40px", marginTop:"-50px"}}>
  475. {HelmetRanger}
  476. </GridContainer>
  477. </div><br></br><br></br>
  478. <div align="center" style={{marginTop:"-50px"}}>
  479. <div align="center" className={classes.section} id="notifications">
  480. <SnackbarContent
  481. message={
  482. <h4><b>Fighter</b></h4>
  483. }
  484. align="center"
  485. color="info"
  486. />
  487. </div>
  488. <GridContainer justify="center" style={{padding:"40px", marginTop:"-50px"}}>
  489. {HelmetFighter}
  490. </GridContainer>
  491. </div><br></br><br></br>
  492. <div align="center" style={{marginTop:"-50px"}}>
  493. <div align="center" className={classes.section} id="notifications">
  494. <SnackbarContent
  495. message={
  496. <h4><b>Swirl</b></h4>
  497. }
  498. align="center"
  499. color="info"
  500. />
  501. </div>
  502. <GridContainer justify="center" style={{padding:"40px", marginTop:"-50px"}}>
  503. {HelmetSwirl}
  504. </GridContainer>
  505. </div><br></br><br></br>
  506. <div align="center" style={{marginTop:"-50px"}}>
  507. <div align="center" className={classes.section} id="notifications">
  508. <SnackbarContent
  509. message={
  510. <h4><b>Classic</b></h4>
  511. }
  512. align="center"
  513. color="info"
  514. />
  515. </div>
  516. <GridContainer justify="center" style={{padding:"40px", marginTop:"-50px"}}>
  517. {HelmetClassic}
  518. </GridContainer>
  519. </div><br></br><br></br>
  520. <div align="center" style={{marginTop:"-50px"}}>
  521. <div align="center" className={classes.section} id="notifications">
  522. <SnackbarContent
  523. message={
  524. <h4><b>Uno</b></h4>
  525. }
  526. align="center"
  527. color="info"
  528. />
  529. </div>
  530. <GridContainer justify="center" style={{padding:"40px", marginTop:"-50px"}}>
  531. {HelmetUno}
  532. </GridContainer>
  533. </div><br></br><br></br>
  534. </div>
  535. ),
  536. },
  537. {
  538. tabButton: "Apparel",
  539. tabIcon: Motorcycle,
  540. tabContent: (
  541. <div>
  542. <div align="center">
  543. <div align="center" className={classes.section} id="notifications">
  544. <SnackbarContent
  545. message={
  546. <h4><b>R Concept Apprael</b></h4>
  547. }
  548. align="center"
  549. color="info"
  550. />
  551. </div>
  552. <GridContainer justify="center" style={{padding:"40px", marginTop:"-50px"}}>
  553. {ApparelRConcept}
  554. </GridContainer>
  555. </div><br></br><br></br>
  556. <div align="center">
  557. <div align="center" className={classes.section} id="notifications">
  558. <SnackbarContent
  559. message={
  560. <h4><b>46 Asia</b></h4>
  561. }
  562. align="center"
  563. color="info"
  564. />
  565. </div>
  566. <GridContainer justify="center" style={{padding:"40px", marginTop:"-50px"}}>
  567. {ApparelAsia}
  568. </GridContainer>
  569. </div><br></br><br></br>
  570. </div>
  571. ),
  572. },
  573. {
  574. tabButton: "Accessories",
  575. tabIcon: Motorcycle,
  576. tabContent: (
  577. <GridContainer justify="center">
  578. {Accessories}
  579. </GridContainer>
  580. ),
  581. },
  582. ]}
  583. />
  584. </GridItem>
  585. </GridContainer>
  586. </CardBody>
  587. </Card>
  588. );
  589. }
  590. export default DataProduct;