| @@ -0,0 +1,67 @@ | |||
| import React from 'react'; | |||
| import Link from 'next/link'; | |||
| import * as Icon from 'react-feather'; | |||
| const Sales = function ({ backend, sales, ...props }) { | |||
| const DataSales = sales.map((data) => { | |||
| return ( | |||
| <div className="col-lg-3 col-md-6"> | |||
| <div className="single-team"> | |||
| <img src={`${backend}${data.foto["url"]}`} alt="image" /> | |||
| <div className="team-content"> | |||
| <div className="team-info"> | |||
| <span>{data.name}</span><br/> | |||
| <span>{data.job_title}</span> | |||
| </div> | |||
| <ul> | |||
| <li> | |||
| <Link href="#"> | |||
| <a target="_blank"><Icon.Facebook /></a> | |||
| </Link> | |||
| </li> | |||
| <li> | |||
| <Link href="#"> | |||
| <a target="_blank"><Icon.Twitter /></a> | |||
| </Link> | |||
| </li> | |||
| <li> | |||
| <Link href="#"> | |||
| <a target="_blank"><Icon.Linkedin /></a> | |||
| </Link> | |||
| </li> | |||
| <li> | |||
| <Link href="#"> | |||
| <a target="_blank"><Icon.Gitlab /></a> | |||
| </Link> | |||
| </li> | |||
| </ul> | |||
| <br /><br /> | |||
| <Link href={"/Sales/Sales?s="+data.id}> | |||
| <a className="btn btn-primary">Get Started</a> | |||
| </Link> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| ) | |||
| }) | |||
| return ( | |||
| <div className="team-area repair-team-area pt-80 pb-50 bg-f9f6f6"> | |||
| <div className="container"> | |||
| <div className="section-title"> | |||
| <h2>Mercedes Benz Sales</h2> | |||
| <div className="bar"></div> | |||
| </div> | |||
| <div className="row justify-content-center"> | |||
| {DataSales} | |||
| </div> | |||
| </div> | |||
| </div> | |||
| ) | |||
| } | |||
| export default Sales; | |||
| @@ -0,0 +1,92 @@ | |||
| import React from 'react'; | |||
| import Link from 'next/link'; | |||
| import * as Icon from 'react-feather'; | |||
| // import FaWhatsapp from "react-icons/fa"; | |||
| const Sales = function ({ backend, sales, ...props }) { | |||
| const DataSales = sales.map((data) => { | |||
| return ( | |||
| <div> | |||
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" /> | |||
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> | |||
| <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script> | |||
| <div class="jumbotron" style={{ backgroundColor: "#000", marginLeft: "-15px", marginRight: "-15px" }}> | |||
| <div className="col-lg-3 col-md-6"> | |||
| <div className="single-team" style={{ backgroundColor: "#000" }}> | |||
| <img src="/images/Sales/Logo Star.png" width="200px" alt="image" style={{ marginTop: "-30px" }} /> | |||
| <div className="team-content"> | |||
| <h1 style={{ color: "#fff" }}>{data.name}</h1> | |||
| <p style={{ color: "#fff" }}><strong>{data.job_title}</strong></p> | |||
| <br /> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| <div align="center" style={{ marginTop: "-30px" }}> | |||
| <Link href={"/Sales/Sales?s=" + data.id}> | |||
| <a style={{ padding: "20px" }} className="btn btn-primary"><i class="fas fa-camera"/> Call Us</a> | |||
| </Link> | |||
| <Link href={"/Sales/Sales?s=" + data.id}> | |||
| <a style={{ padding: "20px" }} className="btn btn-primary"><Icon.Mail /> Email Us</a> | |||
| </Link> | |||
| <Link href={"/Sales/Sales?s=" + data.id}> | |||
| <a style={{ padding: "20px" }} className="btn btn-primary"><Icon.Phone /> WA Us</a> | |||
| </Link> | |||
| </div><br /> | |||
| </div> | |||
| <div class="table-responsive" align="left"> | |||
| <table class="table"> | |||
| <thead> | |||
| <tr> | |||
| <th> | |||
| <Link href="#"> | |||
| <a target="_blank"><Icon.Phone style={{ marginTop: "-20px", marginLeft: "15px" }} /></a> | |||
| </Link> | |||
| </th> | |||
| <th>{data.telp} <br /> Mobile </th> | |||
| </tr> | |||
| <tr> | |||
| <th> | |||
| <Link href="#"> | |||
| <a target="_blank"><Icon.Mail style={{ marginTop: "-20px", marginLeft: "15px" }} /></a> | |||
| </Link> | |||
| </th> | |||
| <th>{data.email} <br /> Email </th> | |||
| </tr> | |||
| <tr> | |||
| <th> | |||
| <Link href="#"> | |||
| <a target="_blank"><Icon.ShoppingBag style={{ marginTop: "-20px", marginLeft: "15px" }} /></a> | |||
| </Link> | |||
| </th> | |||
| <th>{data.company} <br /> {data.job_title} </th> | |||
| </tr> | |||
| <tr> | |||
| <th> | |||
| <Link href="#"> | |||
| <a target="_blank"><Icon.Globe style={{ marginTop: "-20px", marginLeft: "15px" }} /><br /></a> | |||
| </Link> | |||
| </th> | |||
| <th>thamrin.mercedes-benz.co.id<br /> Website </th> | |||
| </tr> | |||
| </thead> | |||
| </table> | |||
| </div> | |||
| </div> | |||
| ) | |||
| }) | |||
| return ( | |||
| <div className="container"> | |||
| <div className="row justify-content-center"> | |||
| {DataSales} | |||
| </div> | |||
| </div> | |||
| ) | |||
| } | |||
| export default Sales; | |||
| @@ -12,8 +12,7 @@ const Dealers = function ({ backend, dealers, ...props }) { | |||
| <div className="content"> | |||
| <p> | |||
| <p><b>{data.name}</b></p> | |||
| <p><b>{data.kota_dealer}</b></p> | |||
| <p><b>{data.name} - {data.kota_dealer}</b></p> | |||
| <p><b>{data.telp}</b></p> | |||
| <p><b>{data.address}</b></p> | |||
| </p> | |||
| @@ -13,7 +13,7 @@ const MainBanner = () => { | |||
| <h1><b>Exclusif Motor Untuk Anda</b></h1> | |||
| <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Quis ipsum suspendisse ultrices gravida</p> | |||
| <Link href="/contact"> | |||
| <Link href="/yamaha/Product/Motor"> | |||
| <a className="btn btn-primary">Get Started</a> | |||
| </Link> | |||
| </div> | |||
| @@ -1,4 +1,4 @@ | |||
| import React from 'react' | |||
| import React, {useState} from 'react' | |||
| //component | |||
| import PageBanner from '@/components/Common/PageBanner'; | |||
| @@ -47,6 +47,12 @@ const ProductDetails = function ({ detailproduct, backend, user, ...props }) { | |||
| const router = useRouter(); | |||
| const MotorDetail = detailproduct.map((data) => { | |||
| // handleChange = ({ target }) => { | |||
| // this.setState({ | |||
| // selectedOption: target.value, | |||
| // }); | |||
| // } | |||
| return ( | |||
| <div> | |||
| @@ -71,9 +77,11 @@ const ProductDetails = function ({ detailproduct, backend, user, ...props }) { | |||
| <div className="col-lg-7"> | |||
| <div className="products-details"> | |||
| <h3> | |||
| <NumberFormat value={data.price} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> s/d <NumberFormat value={data.price2} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> | |||
| <NumberFormat value={data.product_otrs[0].price} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> | |||
| </h3> | |||
| {/* <p>{this.state.selectedOption}</p> */} | |||
| <ul className="rating"> | |||
| <li><i className="flaticon-star-1"></i></li> | |||
| <li><i className="flaticon-star-1"></i></li> | |||
| @@ -133,6 +141,8 @@ const ProductDetails = function ({ detailproduct, backend, user, ...props }) { | |||
| product_price: e.target.value.toString(), | |||
| }) | |||
| }} | |||
| // value={this.state.selectedOption} | |||
| // onChange={this.handleChange} | |||
| > | |||
| <option value="0">- Pilih Product OTR -</option> | |||
| {detailproduct.map((option) => ( | |||
| @@ -178,15 +178,16 @@ const CartContent = function ({ backend, cart_product, ...props }) { | |||
| <td className="product-subtotal"> | |||
| <span className="subtotal-amount"> | |||
| <NumberFormat | |||
| name="product_price" | |||
| name="product_total" | |||
| value={(qty * data.product_price).toFixed(2)} | |||
| displayType={'text'} thousandSeparator={true} | |||
| prefix={'Rp.'} | |||
| onInput={(e) => { | |||
| setFormValue({ | |||
| ...formValue, | |||
| product_total: e.target.value, | |||
| product_total: e.target.value.toString(), | |||
| }) | |||
| console.log("isi target value : ", e.target.value); | |||
| }} | |||
| /> | |||
| </span> | |||
| @@ -1,5 +1,5 @@ | |||
| import React, { useState } from "react"; | |||
| import {Links} from 'react-scroll' | |||
| // import {Link} from 'react-scroll' | |||
| import Link from '@/utils/ActiveLink'; | |||
| import * as Icon from 'react-feather'; | |||
| @@ -96,8 +96,8 @@ export default function NavbarYamaha({ username, ...props }) { | |||
| </li> | |||
| <li className="nav-item"> | |||
| <Link href="/#" activeClassName="active"> | |||
| <a onClick={e => e.preventDefault()} className="nav-link"> | |||
| <Link href="/yamaha/Carrer" activeClassName="active"> | |||
| <a onClick={toggleNavbar} className="nav-link"> | |||
| Carrer | |||
| </a> | |||
| </Link> | |||
| @@ -28,6 +28,7 @@ | |||
| "react-feather": "^2.0.9", | |||
| "react-hook-form": "^6.15.4", | |||
| "react-html-parser": "^2.0.2", | |||
| "react-icons": "^4.3.1", | |||
| "react-masonry-component": "^6.2.1", | |||
| "react-number-format": "^4.7.3", | |||
| "react-owl-carousel3": "^2.2.5", | |||
| @@ -0,0 +1,29 @@ | |||
| import React from 'react'; | |||
| import TeamStyleTwo from '@/components/Sales/Sales_Detail'; | |||
| import GetSales from "api/sales/sales-mercy.js"; | |||
| const Sales = function ({ backend, sales, ...props }) { | |||
| return ( | |||
| <> | |||
| <TeamStyleTwo sales={sales} backend={backend} /> | |||
| </> | |||
| ) | |||
| } | |||
| export default Sales; | |||
| export async function getServerSideProps(context) { | |||
| var { query } = context; | |||
| var sales = []; | |||
| const backend = process.env.BACKEND_SERVER_URI; | |||
| var res = await GetSales.GetDetailSalesMerci(query.s || 0); | |||
| if (res["STATUS"] === 1) { | |||
| sales = res["DATA"]["salesMercies"]; | |||
| } | |||
| return { | |||
| props: { sales, backend }, // will be passed to the page component as props | |||
| }; | |||
| } | |||
| @@ -0,0 +1,28 @@ | |||
| import React from 'react'; | |||
| import TeamStyleTwo from '@/components/Sales/Sales'; | |||
| import GetSales from "api/sales/sales-mercy.js"; | |||
| const Sales = function ({ backend, sales, ...props }) { | |||
| return ( | |||
| <> | |||
| <TeamStyleTwo sales={sales} backend={backend} /> | |||
| </> | |||
| ) | |||
| } | |||
| export default Sales; | |||
| export async function getServerSideProps(context) { | |||
| var sales = []; | |||
| const backend = process.env.BACKEND_SERVER_URI; | |||
| var res = await GetSales.GetSalesMerci(); | |||
| if (res["STATUS"] === 1) { | |||
| sales = res["DATA"]["salesMercies"]; | |||
| } | |||
| return { | |||
| props: { sales, backend }, // will be passed to the page component as props | |||
| }; | |||
| } | |||
| @@ -0,0 +1,43 @@ | |||
| import React from 'react'; | |||
| import Navbar from "@/components/_App/NavbarYamaha"; | |||
| import Footer from "@/components/_App/FooterYamaha"; | |||
| import PageBanner from '@/components/Common/PageBanner'; | |||
| import LatestNews from '@/components/Yamaha/LatestNews/LatestNews'; | |||
| import GetLatestNews from "api/latest_news/news.js" | |||
| const News = function ({ backend, news, othernews, ...props }) { | |||
| return ( | |||
| <> | |||
| <Navbar /> | |||
| <PageBanner pageTitle="Latest News" /> | |||
| <LatestNews news={news} othernews={othernews} backend={backend} /> | |||
| <Footer /> | |||
| </> | |||
| ) | |||
| } | |||
| export default News; | |||
| export async function getServerSideProps(context) { | |||
| var news = []; | |||
| var othernews = []; | |||
| const backend = process.env.BACKEND_SERVER_URI; | |||
| var res = await GetLatestNews.GetNewsYamaha(); | |||
| if (res["STATUS"] === 1) { | |||
| news = res["DATA"]["latestNews"]; | |||
| } | |||
| var res = await GetLatestNews.GetOtherNewsYamaha(); | |||
| if (res["STATUS"] === 1) { | |||
| othernews = res["DATA"]["latestNews"]; | |||
| } | |||
| return { | |||
| props: { news, othernews, backend }, // will be passed to the page component as props | |||
| }; | |||
| } | |||
| @@ -36,7 +36,6 @@ export async function getServerSideProps(context) { | |||
| othernews = res["DATA"]["latestNews"]; | |||
| } | |||
| console.log(othernews); | |||
| return { | |||
| props: { news, othernews, backend }, // will be passed to the page component as props | |||
| }; | |||
| @@ -37,7 +37,6 @@ export async function getServerSideProps(context) { | |||
| othernews = res["DATA"]["latestNews"]; | |||
| } | |||
| console.log(othernews); | |||
| return { | |||
| props: { news, othernews, backend }, // will be passed to the page component as props | |||
| }; | |||
| @@ -49,8 +49,6 @@ export async function getServerSideProps(context) { | |||
| detailygp = res["DATA"]["ygParts"]; | |||
| } | |||
| console.log(detailygp); | |||
| return { | |||
| props: { | |||
| detailygp, backend, user, | |||
| @@ -57,9 +57,7 @@ export async function getServerSideProps(context) { | |||
| if (res["STATUS"] === 1) { | |||
| dealers = res["DATA"]["dealers"]; | |||
| } | |||
| console.log(dealers); | |||
| return { | |||
| props: { dealers, backend, user }, // will be passed to the page component as props | |||
| }; | |||
| @@ -127,7 +127,7 @@ a:hover, a:focus { | |||
| } | |||
| p { | |||
| color: #6084a4; | |||
| color: #0e314c; | |||
| line-height: 1.8; | |||
| } | |||
| @@ -2816,6 +2816,11 @@ react-html-parser@^2.0.2: | |||
| dependencies: | |||
| htmlparser2 "^3.9.0" | |||
| react-icons@^4.3.1: | |||
| version "4.3.1" | |||
| resolved "https://registry.yarnpkg.com/react-icons/-/react-icons-4.3.1.tgz#2fa92aebbbc71f43d2db2ed1aed07361124e91ca" | |||
| integrity sha512-cB10MXLTs3gVuXimblAdI71jrJx8njrJZmNMEMC+sQu5B/BIOmlsAjskdqpn81y8UBVEGuHODd7/ci5DvoSzTQ== | |||
| react-is@16.13.1, react-is@^16.13.1, react-is@^16.7.0, react-is@^16.8.1: | |||
| version "16.13.1" | |||
| resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" | |||