diff --git a/api/carrer/carrer.js b/api/carrer/carrer.js index 1422a25..61b8da9 100644 --- a/api/carrer/carrer.js +++ b/api/carrer/carrer.js @@ -134,6 +134,60 @@ async function GetCarrerSMASuzuki(token="") { return res; } +async function GetCarrerS1Honda(token="") { + var res = await apollo.query( + ` + query { + carrers(where: {category: "S1" business_partner:"3"}) + { + id + name + start_regis + until_regis + name_description + } + }`, + token + ); + return res; +} + +async function GetCarrerD3Honda(token="") { + var res = await apollo.query( + ` + query { + carrers(where: {category: "D3" business_partner:"3"}) + { + id + name + start_regis + until_regis + name_description + } + }`, + token + ); + return res; +} + +async function GetCarrerSMAHonda(token="") { + var res = await apollo.query( + ` + query { + carrers(where: {category: "SMA" business_partner:"3"}) + { + id + name + start_regis + until_regis + name_description + } + }`, + token + ); + return res; +} + module.exports = { //yamaha GetCarrerS1Yamaha:GetCarrerS1Yamaha, @@ -144,5 +198,11 @@ module.exports = { GetCarrerS1Suzuki:GetCarrerS1Suzuki, GetCarrerD3Suzuki:GetCarrerD3Suzuki, GetCarrerSMASuzuki:GetCarrerSMASuzuki, + + //honda + GetCarrerS1Honda:GetCarrerS1Honda, + GetCarrerD3Honda:GetCarrerD3Honda, + GetCarrerSMAHonda:GetCarrerSMAHonda, + GetDetailCarrer:GetDetailCarrer, }; \ No newline at end of file diff --git a/api/home/carousel.js b/api/home/carousel.js index ee4d44a..a3e59d6 100644 --- a/api/home/carousel.js +++ b/api/home/carousel.js @@ -34,7 +34,25 @@ async function GetCarouselsSuzuki(token="") { return res; } +async function GetCarouselsHonda(token="") { + var res = await apollo.query( + ` + query { + carousels(where: { business_partner: "3" }) { + id + img { + url + } + } + } + `, + token + ); + return res; +} + module.exports = { GetCarouselsYamaha:GetCarouselsYamaha, GetCarouselsSuzuki:GetCarouselsSuzuki, + GetCarouselsHonda:GetCarouselsHonda, }; \ No newline at end of file diff --git a/api/latest_news/news.js b/api/latest_news/news.js index 21a0e66..3de1a49 100644 --- a/api/latest_news/news.js +++ b/api/latest_news/news.js @@ -96,6 +96,54 @@ async function GetOtherNewsSuzuki(token="", start = 0) { return res; } +async function GetNewsHonda(token="", start = 0) { + var res = await apollo.query( + ` + query{ + latestNews(where: { business_partner: "3" }) + { + id + title + description + img{ + url + } + published_at + } + } + `, + token, + { + start: start, + } + ); + return res; +} + +async function GetOtherNewsHonda(token="", start = 0) { + var res = await apollo.query( + ` + query{ + latestNews(where: { business_partner: "3" }) + { + id + title + description + img{ + url + } + published_at + } + } + `, + token, + { + start: start, + } + ); + return res; +} + async function GetDetailNews(id, token="") { var res = await apollo.query( ` @@ -125,5 +173,7 @@ module.exports = { GetOtherNewsYamaha:GetOtherNewsYamaha, GetNewsSuzuki:GetNewsSuzuki, GetOtherNewsSuzuki:GetOtherNewsSuzuki, + GetNewsHonda:GetNewsHonda, + GetOtherNewsHonda:GetOtherNewsHonda, GetDetailNews: GetDetailNews, }; \ No newline at end of file diff --git a/api/product/product.js b/api/product/product.js index 376bb31..1ebd814 100644 --- a/api/product/product.js +++ b/api/product/product.js @@ -223,6 +223,24 @@ async function GetProductSuzuki(token = "") { return res; } +async function GetProductHonda(token = "") { + var res = await apollo.query( + ` + query { + products(where: { business_partner: "3" }) { + id + name + price + img { + url + } + } + }`, + token + ); + return res; +} + module.exports = { //yamaha GetProductMatic: GetProductMatic, @@ -239,6 +257,9 @@ module.exports = { //suzuki GetProductSuzuki:GetProductSuzuki, + //honda + GetProductHonda:GetProductHonda, + //detail GetDetailProduct: GetDetailProduct, }; \ No newline at end of file diff --git a/assets/img/honda.jpg b/assets/img/honda.jpg new file mode 100644 index 0000000..c11ce33 Binary files /dev/null and b/assets/img/honda.jpg differ diff --git a/components/Footer/FooterHonda.js b/components/Footer/FooterHonda.js new file mode 100644 index 0000000..6613b05 --- /dev/null +++ b/components/Footer/FooterHonda.js @@ -0,0 +1,131 @@ +/*eslint-disable*/ +import React from "react"; +// nodejs library to set properties for components +import PropTypes from "prop-types"; +// nodejs library that concatenates classes +import classNames from "classnames"; +// material-ui core components +import { List, ListItem } from "@material-ui/core"; +import { makeStyles } from "@material-ui/core/styles"; + +// @material-ui/icons +import Favorite from "@material-ui/icons/Favorite"; + +import GridContainer from "components/Grid/GridContainer.js"; +import Grid from '@material-ui/core/Grid'; +import Paper from '@material-ui/core/Paper'; +import Card from "components/Card/Card.js"; +import styles from "assets/jss/nextjs-material-kit/components/footerStyle.js"; +import NSCB from "assets/img/nscb.png"; + +const useStyles = makeStyles(styles); + +export default function Footer(props) { + const classes = useStyles(); + const { whiteFont } = props; + const footerClasses = classNames({ + [classes.footer]: true, + [classes.footerWhiteFont]: whiteFont + }); + const aClasses = classNames({ + [classes.a]: true, + [classes.footerWhiteFont]: whiteFont + }); + return ( +

+ + + + + + + + + + + + + + + +
+ +
+
+
+ + +
+ © {1900 + new Date().getYear()} , All Right Reserved{" "} by{" "} @Thamrin Group Company +
+
+
+
+ ); +} + +Footer.propTypes = { + whiteFont: PropTypes.bool +}; diff --git a/components/Header/HeaderHonda.js b/components/Header/HeaderHonda.js new file mode 100644 index 0000000..b5cfb40 --- /dev/null +++ b/components/Header/HeaderHonda.js @@ -0,0 +1,266 @@ +/*eslint-disable*/ +import React from "react"; +import Link from "next/link"; + +// @material-ui/core components +import { makeStyles } from "@material-ui/core/styles"; +import List from "@material-ui/core/List"; +import ListItem from "@material-ui/core/ListItem"; +import Icon from "@material-ui/core/Icon"; +import Chart from "@material-ui/icons/LocalGroceryStore"; + +// @material-ui/icons +import { Apps, ShareTwoTone, Person } from "@material-ui/icons"; + +// core components +import CustomDropdown from "components/CustomDropdown/CustomDropdown.js"; +import Button from "components/CustomButtons/Button.js"; +import styles from "assets/jss/nextjs-material-kit/components/headerLinksStyle.js"; + +const useStyles = makeStyles(styles); + +export default function HeaderLinks({ username, ...props }) { + const classes = useStyles(); + return ( + + + + + + + + + + + + + + + + + {/* + + Motor + , + + YGP + , + + Yamalube + , + + Helmet + , + + Apparel + , + + Accessories + , + + Service + , + + Dealers + , + ]} + /> + */} + + + + + + + + + {/* + + honda + , + + Suzuki + , + + Honda + , + + Hino + , + + + Mercedes-Benz + + , + + + BPR Berkat Sejati + + , + + + Palembang Indah Mall + + , + + Hotel Emilia + , + + Thamrin Home + , + + Ketty Resto + , + ]} + /> + */} + + + + + + + + + + + {!username || username == "" ? ( + + ) : ( + 12 + ? username.substring(0, 9) + ".." + : username + } + buttonProps={{ + className: classes.navLink, + color: "transparent", + }} + buttonIcon={Person} + dropdownList={[ +
{ + e.preventDefault(); + fetch("/api/auth/logout", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ p: "SUZUKI" }), + }).then((res) => { + //if (res.ok) { + window.location.href = "../honda/home"; + /*} + else{ + + }*/ + }); + }} + > + + + exit_to_app + {" "} + Logout + +
, + ]} + /> + )} +
+
+ ); +} diff --git a/pages-sections/home/Businees-Partner.js b/pages-sections/home/Businees-Partner.js index 15f7cdf..f59d4d9 100644 --- a/pages-sections/home/Businees-Partner.js +++ b/pages-sections/home/Businees-Partner.js @@ -55,7 +55,12 @@ export default function WorkSection() { - + +
+ Snow + +
+
diff --git a/pages-sections/honda/carrer/carrer.js b/pages-sections/honda/carrer/carrer.js new file mode 100644 index 0000000..d9966df --- /dev/null +++ b/pages-sections/honda/carrer/carrer.js @@ -0,0 +1,156 @@ +import React from "react"; +import classNames from "classnames"; + +import { makeStyles } from "@material-ui/core/styles"; +import Dashboard from "@material-ui/icons/Dashboard"; + +import GridContainer from "components/Grid/GridContainer.js"; +import GridItem from "components/Grid/GridItem.js"; +import NavPills from "components/NavPills/NavPills.js"; +import Card from "components/Card/Card.js"; +import CardBody from "components/Card/CardBody.js"; +import CardHeader from "components/Card/CardHeader.js"; +import Quote from "components/Typography/Quote.js" +import Grid from '@material-ui/core/Grid'; +import Button from "components/CustomButtons/Button.js"; +import styles from "assets/jss/nextjs-material-kit/pages/profilePage.js"; +import Icon from "@material-ui/core/Icon"; + +const useStyles = makeStyles(styles); + +const DataCarrers = function ({ backend, s1, d3, sma, ...props }) { + const classes = useStyles(); + const { ...rest } = props; + const imageClasses = classNames( + classes.imgRaised, + classes.imgRoundedCircle, + classes.imgFluid + ); + const navImageClasses = classNames(classes.imgRounded, classes.imgGallery); + const CarrerS1 = s1.map((data) => { + return ( + + +
{data.name}
+ + + Masa Pendaftaran : {data.start_regis} s/d {data.until_regis} + + +
+
+ ); + }) + const CarrerD3 = d3.map((data) => { + return ( + + + {data.name} + + + Masa Pendaftaran : {data.start_regis} s/d {data.until_regis} + + + + + ); + }) + const CarrerSMA = sma.map((data) => { + return ( + + + {data.name} + + + Masa Pendaftaran : {data.start_regis} s/d {data.until_regis} + + + + + ); + }) + return ( + +
+ Product +
+ +
+

Carrer & Job Vacancies

+
+ + + + {CarrerS1} + + ), + }, + { + tabButton: "D3", + tabIcon: Dashboard, + tabContent: ( + + {CarrerD3} + + ), + }, + { + tabButton: "SMA / SMK ", + tabIcon: Dashboard, + tabContent: ( + + {CarrerSMA} + + ), + }, + { + tabButton: "Recruitment Process", + tabIcon: Dashboard, + tabContent: ( + + +
+ ... +
+
+
+ ), + }, + ]} + /> + + +
+
+ ); +} + +export default DataCarrers; \ No newline at end of file diff --git a/pages-sections/honda/carrer/carrer_details.js b/pages-sections/honda/carrer/carrer_details.js new file mode 100644 index 0000000..4feb2ab --- /dev/null +++ b/pages-sections/honda/carrer/carrer_details.js @@ -0,0 +1,69 @@ +import React from 'react'; +import ReactHtmlParser from "react-html-parser"; +import { makeStyles } from "@material-ui/core/styles"; + +import classNames from "classnames"; +import GridContainer from "components/Grid/GridContainer.js"; +import Grid from '@material-ui/core/Grid'; +import GridItem from "components/Grid/GridItem.js"; +import Card from "components/Card/Card.js"; +import Carousel from "react-slick"; +import styles from "assets/jss/nextjs-material-kit/pages/componentsSections/notificationsStyles.js"; + +const useStyles = makeStyles(styles); +const DataCarrer = function ({ backend, detailcarrer, ...props }) { + const classes = useStyles(); + const imageClasses = classNames( + classes.imgRaised, + classes.imgRoundedCircle, + classes.imgFluid + ); + const settings = { + dots: true, + infinite: true, + speed: 500, + slidesToShow: 1, + slidesToScroll: 1, + autoplay: true, + time: 5 + }; + const navImageClasses = classNames(classes.imgRounded, classes.imgGallery); + const carrer = detailcarrer.map((data) => { + return ( + + +
+
+
+ + + + + First slide + + + + +
+
+
+
+ +

{data.name}

+

{data.published_at}

+
+
+

{ReactHtmlParser(data.description)}

+
+
+
+ ); + }) + return ( +
+ {carrer} +
+ ); +} + +export default DataCarrer; \ No newline at end of file diff --git a/pages-sections/honda/home/carousel.js b/pages-sections/honda/home/carousel.js new file mode 100644 index 0000000..d206385 --- /dev/null +++ b/pages-sections/honda/home/carousel.js @@ -0,0 +1,61 @@ +import React from "react"; +import { makeStyles } from "@material-ui/core/styles"; + +import GridContainer from "components/Grid/GridContainer.js"; +import GridItem from "components/Grid/GridItem.js"; +import Card from "components/Card/Card.js"; +import styles from "assets/jss/nextjs-material-kit/pages/componentsSections/notificationsStyles.js"; +import Carousel from "react-slick"; +import Grid from '@material-ui/core/Grid'; + +const useStyles = makeStyles(styles); +const DataCarousel = function ({ backend, carousel, ...props }) { + const classes = useStyles(); + const settings = { + dots: true, + infinite: true, + speed: 500, + slidesToShow: 1, + slidesToScroll: 1, + autoplay: true, + time: 5 + }; + const Carousels = carousel.map((data) => { + return ( +
+ First slide +
+ ); + }) + return ( +
+
+
+ + + + + {Carousels} + + + + + + + + + + + + + + + + +
+
+
+ ); +} + +export default DataCarousel; \ No newline at end of file diff --git a/pages-sections/honda/home/feature.js b/pages-sections/honda/home/feature.js new file mode 100644 index 0000000..897d3df --- /dev/null +++ b/pages-sections/honda/home/feature.js @@ -0,0 +1,119 @@ +import React, { Component } from "react"; +import { makeStyles } from "@material-ui/core/styles"; +import Button from "components/CustomButtons/Button.js"; +import Icon from "@material-ui/core/Icon"; + +import GridContainer from "components/Grid/GridContainer.js"; +import Grid from '@material-ui/core/Grid'; +import Card from "components/Card/Card.js"; +import SnackbarContent from "components/Snackbar/SnackbarContent.js"; + +import imagesStyles from "assets/jss/nextjs-material-kit/imagesStyles.js"; +import { cardTitle } from "assets/jss/nextjs-material-kit.js"; + +const styles = { + ...imagesStyles, + cardTitle, +}; + +const useStyles = makeStyles(styles); +const DataFeature = function ({ backend, service, ...props }) { + const classes = useStyles(); + return ( +
+
+ Feature Product + } + align="center" + color="danger" + /> +
+ + + + Card-img + {/*
+
+ +
+
*/} +
+
+ + + Card-img + {/*
+
+ +
+
*/} +
+
+ + +
+ Card-img +
+ {/*
+
+ +
+
*/} +
+
+ + +
+ Card-img +
+ {/*
+
+ +
+
*/} +
+
+ + +
+ Card-img +
+ {/*
+
+ +
+
*/} +
+
+ + +
+ Card-img +
+ {/*
+
+ +
+
*/} +
+
+
+
+ ); +} + +export default DataFeature; \ No newline at end of file diff --git a/pages-sections/honda/home/service.js b/pages-sections/honda/home/service.js new file mode 100644 index 0000000..e9a4d25 --- /dev/null +++ b/pages-sections/honda/home/service.js @@ -0,0 +1,46 @@ +import React from "react"; +import { makeStyles } from "@material-ui/core/styles"; + +import GridContainer from "components/Grid/GridContainer.js"; +import Grid from '@material-ui/core/Grid'; +import Paper from '@material-ui/core/Paper'; +import Card from "components/Card/Card.js"; +import styles from "assets/jss/nextjs-material-kit/pages/componentsSections/notificationsStyles.js"; +import SnackbarContent from "components/Snackbar/SnackbarContent.js"; + +const useStyles = makeStyles(styles); +const DataService = function ({ backend, service, ...props }) { + const classes = useStyles(); + const services = service.map((data, index) => ( + + +
+ +
+
+
+ )); + return ( +
+
+
+ Our Service + } + align="center" + color="danger" + /> +
+
+
+ + {services} + +
+
+ ); +} + +export default DataService; \ No newline at end of file diff --git a/pages-sections/honda/latest_news/news.js b/pages-sections/honda/latest_news/news.js new file mode 100644 index 0000000..2198ef6 --- /dev/null +++ b/pages-sections/honda/latest_news/news.js @@ -0,0 +1,66 @@ +import React from 'react'; + +import { makeStyles } from "@material-ui/core/styles"; + +import styles from "assets/jss/nextjs-material-kit/pages/componentsSections/notificationsStyles.js"; +import Grid from '@material-ui/core/Grid'; +import GridContainer from "components/Grid/GridContainer.js"; +import Card from "components/Card/Card.js"; +import CardBody from "components/Card/CardBody.js"; +import Button from "components/CustomButtons/Button.js"; +import Paginations from "components/Pagination/Pagination.js"; +import Icon from "@material-ui/core/Icon"; + +const useStyles = makeStyles(styles); + +const DataLatestNews = function ({ backend, news, ...props }) { + const classes = useStyles(); + const latnews = news.map((data) => { + return ( + + + + +

{data.title}

+

{data.published_at}

+ +
+
+
+ ); + }) + return ( +
+
+

Latest News

+
+
+ + {latnews} + +
+
+ +
+
+ ); +} + +export default DataLatestNews; diff --git a/pages-sections/honda/latest_news/news_details.js b/pages-sections/honda/latest_news/news_details.js new file mode 100644 index 0000000..aa2655d --- /dev/null +++ b/pages-sections/honda/latest_news/news_details.js @@ -0,0 +1,96 @@ +import React, { useState, useEffect } from "react"; +import ReactHtmlParser from "react-html-parser"; +// @material-ui/core components +import { makeStyles } from "@material-ui/core/styles"; +import ReactPaginate from "react-paginate"; + +import classNames from "classnames"; +import GridContainer from "components/Grid/GridContainer.js"; +import Grid from '@material-ui/core/Grid'; +import GridItem from "components/Grid/GridItem.js"; +import Card from "components/Card/Card.js"; +import Carousel from "react-slick"; +import CardBody from "components/Card/CardBody.js"; +import Button from "components/CustomButtons/Button.js"; +import Icon from "@material-ui/core/Icon"; +import styles from "assets/jss/nextjs-material-kit/pages/componentsSections/notificationsStyles.js"; + +const useStyles = makeStyles(styles); + +const DataLatestNews = function ({ backend, news, othernews,...props }) { + const classes = useStyles(); + const imageClasses = classNames( + classes.imgRaised, + classes.imgRoundedCircle, + classes.imgFluid + ); + const settings = { + dots: true, + infinite: true, + speed: 500, + slidesToShow: 1, + slidesToScroll: 1, + autoplay: true, + time: 5 + }; + const navImageClasses = classNames(classes.imgRounded, classes.imgGallery); + const otherlatnews = othernews.map((data) => { + return ( + + + + +

{data.title}

+ +
+
+
+ ); + }) + const latnews = news.map((data) => { + return ( + + + +
+
+
+ + + + + First slide + + +
+
+

Other Latest News

+

{otherlatnews}

+
+
+
+
+
+
+
+ +

{data.title}

+

{data.published_at}

+
+
+

{ReactHtmlParser(data.description)}

+
+
+
+ ); + }); + return
{latnews}
; +}; + +export default DataLatestNews; diff --git a/pages-sections/honda/product/product.js b/pages-sections/honda/product/product.js new file mode 100644 index 0000000..e10c5f0 --- /dev/null +++ b/pages-sections/honda/product/product.js @@ -0,0 +1,92 @@ +import React from "react"; +import classNames from "classnames"; + +import { makeStyles } from "@material-ui/core/styles"; +import Dashboard from "@material-ui/icons/Dashboard"; + +import GridContainer from "components/Grid/GridContainer.js"; +import GridItem from "components/Grid/GridItem.js"; +import NavPills from "components/NavPills/NavPills.js"; +import Card from "components/Card/Card.js"; +import CardBody from "components/Card/CardBody.js"; +import CardHeader from "components/Card/CardHeader.js"; +import CardFooter from "components/Card/CardFooter.js"; +import Button from "components/CustomButtons/Button.js"; +import styles from "assets/jss/nextjs-material-kit/pages/profilePage.js"; +import Icon from "@material-ui/core/Icon"; +import { Motorcycle } from "@material-ui/icons"; + +const useStyles = makeStyles(styles); +const DataProduct = function ({ backend, car, ...props }) { + const classes = useStyles(); + const { ...rest } = props; + const imageClasses = classNames( + classes.imgRaised, + classes.imgRoundedCircle, + classes.imgFluid + ); + const navImageClasses = classNames(classes.imgRounded, classes.imgGallery); + const ProductSuzuki = car.map((data) => { + return ( +
+ + +
+ +
+
{data.name}
+
Rp.{data.price}
+ + +
+
+
+
+
+ ); + }) + return ( + +
+ Product +
+ +
+

Product & Facilities

+
+ + + + {ProductSuzuki} + + ), + }, + ]} + /> + + +
+
+ ); +} + +export default DataProduct; \ No newline at end of file diff --git a/pages-sections/honda/profile/profile.js b/pages-sections/honda/profile/profile.js new file mode 100644 index 0000000..1c2687e --- /dev/null +++ b/pages-sections/honda/profile/profile.js @@ -0,0 +1,388 @@ +import React from "react"; +import classNames from "classnames"; +import {makeStyles} from "@material-ui/core/styles"; +import Select from 'react-select'; + +import People from "@material-ui/icons/People"; +import LocationOn from "@material-ui/icons/LocationOn"; +import Lock from "@material-ui/icons/Lock"; +import image1 from "assets/img/mail.png" + +import CustomInput from "components/CustomInput/CustomInput.js"; +import InputAdornment from "@material-ui/core/InputAdornment"; +import Button from "components/CustomButtons/Button.js"; +import Icon from "@material-ui/core/Icon"; +import Card from "components/Card/Card.js"; +import CardBody from "components/Card/CardBody.js"; +import GridContainer from "components/Grid/GridContainer.js"; +import SnackbarContent from "components/Snackbar/SnackbarContent.js"; +import NavPills from "components/NavPills/NavPills.js"; +import styles from "assets/jss/nextjs-material-kit/pages/componentsSections/pillsStyle.js"; +import Grid from '@material-ui/core/Grid'; +import Paper from '@material-ui/core/Paper'; + +const useStyles = makeStyles((theme) => ({ + root: { + flexGrow: 1 + }, + paper: { + padding: theme.spacing(2), + textAlign: 'center', + color: theme.palette.text.secondary + } +})); + +const DataApparel = function ({ + profile, + user, + ...props +}) { + const [pass, setPass] = React.useState(""); + const classes = useStyles(); + const { + ...rest + } = props; + const imageClasses = classNames( + classes.imgRaised, + classes.imgRoundedCircle, + classes.imgFluid + ); + const navImageClasses = classNames(classes.imgRounded, classes.imgGallery); + const Profile = profile.map((data) => { + return ( + + +
+

Profile Saya

+ Kelola informasi profil Anda untuk mengontrol, melindungi dan mengamankan akun +
+
+
+ + +
+ Username +
+
+ +
+ : {data.username} +
+
+ +
+ + +
+ Nama +
+
+ +
+ : {data.firstName} +
+
+ +
+ + +
+ Email +
+
+ +
+ : {data.email} +
+
+ +
+ + +
+ Nomer Telpon +
+
+ +
+ : {data.telp} +
+
+ +
+ +
+ ) + }, { + tabButton: "Alamat", + tabIcon: LocationOn, + tabContent: ( + + +
+

Alamat Saya

+ Kelola informasi Alamat Anda untuk Proses Pengirim Barang +
+
+
+ +

+ + +
+ Nama +
+
+ +
+ : {data.firstName} +
+
+ +
+ + +
+ Telpon +
+
+ +
+ : {data.telp} +
+
+ +
+ + +
+ Alamat +
+
+ +
+ : {data.address} +
+
+ +
+ +
+ ) + }, { + tabButton: "Ubah Password", + tabIcon: Lock, + tabContent: ( + + +
+

Ubah Password

+ Untuk keamanan akun Anda, mohon untuk tidak menyebarkan password Anda ke + orang lain +
+
+
+ + +
+

+ Password Saat Ini +
+
+ +
+ setPass(event.target.value), + type: "password", + endAdornment: ( + + + lock_outline + + + ), + autoComplete: "off" + }}/> +
+
+ +
+ + +
+

+ Password Baru +
+
+ +
+ setPass(event.target.value), + type: "password", + endAdornment: ( + + + lock_outline + + + ), + autoComplete: "off" + }}/> +
+
+ +
+ + +
+

+ Konfirmasi Password +
+
+ +
+ setPass(event.target.value), + type: "password", + endAdornment: ( + + + lock_outline + + + ), + autoComplete: "off" + }}/> +
+
+ +
+ +
+ ) + } + ]}/> + ); + }) + return ( +
+ + +
+
+ Profile} align="center" color="info"/> +
+ + {Profile} + +
+

+

+
+
+
+ ); +} + +export default DataApparel; \ No newline at end of file diff --git a/pages-sections/suzuki/product/product.js b/pages-sections/suzuki/product/product.js index 0cfad43..d807b81 100644 --- a/pages-sections/suzuki/product/product.js +++ b/pages-sections/suzuki/product/product.js @@ -43,6 +43,12 @@ const DataProduct = function ({ backend, car, ...props }) { > open_in_newDetail Product + @@ -66,7 +72,7 @@ const DataProduct = function ({ backend, car, ...props }) { color="primary" tabs={[ { - tabButton: "Passenger Car", + tabButton: "XL7", tabIcon: Motorcycle, tabContent: ( diff --git a/pages-sections/yamaha/product/product.js b/pages-sections/yamaha/product/product.js index a79105f..46ce08f 100644 --- a/pages-sections/yamaha/product/product.js +++ b/pages-sections/yamaha/product/product.js @@ -253,10 +253,10 @@ const DataProduct = function ({ backend, maxi, matic, naked, sport, offroad, mop > open_in_newDetail Product - {/* diff --git a/pages/honda/about_us/about_us.js b/pages/honda/about_us/about_us.js new file mode 100644 index 0000000..4485257 --- /dev/null +++ b/pages/honda/about_us/about_us.js @@ -0,0 +1,41 @@ +import React from "react"; +import { makeStyles } from "@material-ui/core/styles"; + +import styles from "assets/jss/nextjs-material-kit/pages/componentsSections/notificationsStyles.js"; +import Card from "components/Card/Card.js"; +import CardBody from "components/Card/CardBody.js"; +import CardHeader from "components/Card/CardHeader.js"; +import CompanyLink from "components/Header/LinkCompany.js"; + +const useStyles = makeStyles(styles); + +const DataAboutUS = function ({ backend, businessPartners, service, carousel, ...props }) { + const classes = useStyles(); + return ( +
+ +
+ + + +
+ +
+ +
+

About Us

+

Thamrin Group adalah perusahaan terkemuka di Sumatera Selatan & Bengkulu dengan fokus bisnis pada sektor otomotif dan properti

+

Visi

+

Berdampak bagi masyarakat melalui SDM yang dimiliki, pelayanan prima & pengembangan usaha secara berkelanjutan dengan membangun perusahaan yang terpercaya & memiliki reputasi yang baik

+

Misi

+

1. Melayani 21,7 juta pelanggan di tahun 2022

+

2. Mengembangkan pemimpin yang sukses

+

3. Mengelola proses administrasi yang simple & excellent

+

4. Mendukung continuous improvement

+
+
+
+ ); +} + +export default DataAboutUS; \ No newline at end of file diff --git a/pages/honda/about_us/penghargaan.js b/pages/honda/about_us/penghargaan.js new file mode 100644 index 0000000..d5f9b5d --- /dev/null +++ b/pages/honda/about_us/penghargaan.js @@ -0,0 +1,41 @@ +import React from "react"; +import { makeStyles } from "@material-ui/core/styles"; + +import styles from "assets/jss/nextjs-material-kit/pages/componentsSections/notificationsStyles.js"; +import Card from "components/Card/Card.js"; +import CardBody from "components/Card/CardBody.js"; +import CardHeader from "components/Card/CardHeader.js"; +import CompanyLink from "components/Header/LinkCompany.js"; + +const useStyles = makeStyles(styles); + +const DataPenghargaan = function ({ backend, businessPartners, service, carousel, ...props }) { + const classes = useStyles(); + return ( +
+ +
+ + + +
+ +
+ +
+

Penghargaan Thamrin Group

+

Thamrin Group adalah perusahaan terkemuka di Sumatera Selatan & Bengkulu dengan fokus bisnis pada sektor otomotif dan properti

+

Visi

+

Berdampak bagi masyarakat melalui SDM yang dimiliki, pelayanan prima & pengembangan usaha secara berkelanjutan dengan membangun perusahaan yang terpercaya & memiliki reputasi yang baik

+

Misi

+

1. Melayani 21,7 juta pelanggan di tahun 2022

+

2. Mengembangkan pemimpin yang sukses

+

3. Mengelola proses administrasi yang simple & excellent

+

4. Mendukung continuous improvement

+
+
+
+ ); +} + +export default DataPenghargaan; \ No newline at end of file diff --git a/pages/honda/about_us/profile.js b/pages/honda/about_us/profile.js new file mode 100644 index 0000000..9531757 --- /dev/null +++ b/pages/honda/about_us/profile.js @@ -0,0 +1,41 @@ +import React from "react"; +import { makeStyles } from "@material-ui/core/styles"; + +import styles from "assets/jss/nextjs-material-kit/pages/componentsSections/notificationsStyles.js"; +import Card from "components/Card/Card.js"; +import CardBody from "components/Card/CardBody.js"; +import CardHeader from "components/Card/CardHeader.js"; +import CompanyLink from "components/Header/LinkCompany.js"; + +const useStyles = makeStyles(styles); + +const DataProfile = function ({ backend, businessPartners, service, carousel, ...props }) { + const classes = useStyles(); + return ( +
+ +
+ + + +
+ +
+ +
+

Profile Thamrin Group

+

Thamrin Group adalah perusahaan terkemuka di Sumatera Selatan & Bengkulu dengan fokus bisnis pada sektor otomotif dan properti

+

Visi

+

Berdampak bagi masyarakat melalui SDM yang dimiliki, pelayanan prima & pengembangan usaha secara berkelanjutan dengan membangun perusahaan yang terpercaya & memiliki reputasi yang baik

+

Misi

+

1. Melayani 21,7 juta pelanggan di tahun 2022

+

2. Mengembangkan pemimpin yang sukses

+

3. Mengelola proses administrasi yang simple & excellent

+

4. Mendukung continuous improvement

+
+
+
+ ); +} + +export default DataProfile; \ No newline at end of file diff --git a/pages/honda/about_us/saham.js b/pages/honda/about_us/saham.js new file mode 100644 index 0000000..ce6e7f3 --- /dev/null +++ b/pages/honda/about_us/saham.js @@ -0,0 +1,41 @@ +import React from "react"; +import { makeStyles } from "@material-ui/core/styles"; + +import styles from "assets/jss/nextjs-material-kit/pages/componentsSections/notificationsStyles.js"; +import Card from "components/Card/Card.js"; +import CardBody from "components/Card/CardBody.js"; +import CardHeader from "components/Card/CardHeader.js"; +import CompanyLink from "components/Header/LinkCompany.js"; + +const useStyles = makeStyles(styles); + +const DataSaham = function ({ backend, businessPartners, service, carousel, ...props }) { + const classes = useStyles(); + return ( +
+ +
+ + + +
+ +
+ +
+

Kepemilikan Saham Thamrin Group

+

Thamrin Group adalah perusahaan terkemuka di Sumatera Selatan & Bengkulu dengan fokus bisnis pada sektor otomotif dan properti

+

Visi

+

Berdampak bagi masyarakat melalui SDM yang dimiliki, pelayanan prima & pengembangan usaha secara berkelanjutan dengan membangun perusahaan yang terpercaya & memiliki reputasi yang baik

+

Misi

+

1. Melayani 21,7 juta pelanggan di tahun 2022

+

2. Mengembangkan pemimpin yang sukses

+

3. Mengelola proses administrasi yang simple & excellent

+

4. Mendukung continuous improvement

+
+
+
+ ); +} + +export default DataSaham; \ No newline at end of file diff --git a/pages/honda/about_us/sejarah.js b/pages/honda/about_us/sejarah.js new file mode 100644 index 0000000..cb57d58 --- /dev/null +++ b/pages/honda/about_us/sejarah.js @@ -0,0 +1,41 @@ +import React from "react"; +import { makeStyles } from "@material-ui/core/styles"; + +import styles from "assets/jss/nextjs-material-kit/pages/componentsSections/notificationsStyles.js"; +import Card from "components/Card/Card.js"; +import CardBody from "components/Card/CardBody.js"; +import CardHeader from "components/Card/CardHeader.js"; +import CompanyLink from "components/Header/LinkCompany.js"; + +const useStyles = makeStyles(styles); + +const DataSejarah = function ({ backend, businessPartners, service, carousel, ...props }) { + const classes = useStyles(); + return ( +
+ +
+ + + +
+ +
+ +
+

Sejarah Thamrin Group

+

Thamrin Group adalah perusahaan terkemuka di Sumatera Selatan & Bengkulu dengan fokus bisnis pada sektor otomotif dan properti

+

Visi

+

Berdampak bagi masyarakat melalui SDM yang dimiliki, pelayanan prima & pengembangan usaha secara berkelanjutan dengan membangun perusahaan yang terpercaya & memiliki reputasi yang baik

+

Misi

+

1. Melayani 21,7 juta pelanggan di tahun 2022

+

2. Mengembangkan pemimpin yang sukses

+

3. Mengelola proses administrasi yang simple & excellent

+

4. Mendukung continuous improvement

+
+
+
+ ); +} + +export default DataSejarah; \ No newline at end of file diff --git a/pages/honda/about_us/struktur_organisasi.js b/pages/honda/about_us/struktur_organisasi.js new file mode 100644 index 0000000..8eac41d --- /dev/null +++ b/pages/honda/about_us/struktur_organisasi.js @@ -0,0 +1,41 @@ +import React from "react"; +import { makeStyles } from "@material-ui/core/styles"; + +import styles from "assets/jss/nextjs-material-kit/pages/componentsSections/notificationsStyles.js"; +import Card from "components/Card/Card.js"; +import CardBody from "components/Card/CardBody.js"; +import CardHeader from "components/Card/CardHeader.js"; +import CompanyLink from "components/Header/LinkCompany.js"; + +const useStyles = makeStyles(styles); + +const DataStrukturOrganisasi = function ({ backend, businessPartners, service, carousel, ...props }) { + const classes = useStyles(); + return ( +
+ +
+ + + +
+ +
+ +
+

Struktur Organisasi Thamrin Group

+

Thamrin Group adalah perusahaan terkemuka di Sumatera Selatan & Bengkulu dengan fokus bisnis pada sektor otomotif dan properti

+

Visi

+

Berdampak bagi masyarakat melalui SDM yang dimiliki, pelayanan prima & pengembangan usaha secara berkelanjutan dengan membangun perusahaan yang terpercaya & memiliki reputasi yang baik

+

Misi

+

1. Melayani 21,7 juta pelanggan di tahun 2022

+

2. Mengembangkan pemimpin yang sukses

+

3. Mengelola proses administrasi yang simple & excellent

+

4. Mendukung continuous improvement

+
+
+
+ ); +} + +export default DataStrukturOrganisasi; \ No newline at end of file diff --git a/pages/honda/about_us/tata_kelola.js b/pages/honda/about_us/tata_kelola.js new file mode 100644 index 0000000..952475c --- /dev/null +++ b/pages/honda/about_us/tata_kelola.js @@ -0,0 +1,41 @@ +import React from "react"; +import { makeStyles } from "@material-ui/core/styles"; + +import styles from "assets/jss/nextjs-material-kit/pages/componentsSections/notificationsStyles.js"; +import Card from "components/Card/Card.js"; +import CardBody from "components/Card/CardBody.js"; +import CardHeader from "components/Card/CardHeader.js"; +import CompanyLink from "components/Header/LinkCompany.js"; + +const useStyles = makeStyles(styles); + +const DataTataKelola = function ({ backend, businessPartners, service, carousel, ...props }) { + const classes = useStyles(); + return ( +
+ +
+ + + +
+ +
+ +
+

Tata Kelola Thamrin Group

+

Thamrin Group adalah perusahaan terkemuka di Sumatera Selatan & Bengkulu dengan fokus bisnis pada sektor otomotif dan properti

+

Visi

+

Berdampak bagi masyarakat melalui SDM yang dimiliki, pelayanan prima & pengembangan usaha secara berkelanjutan dengan membangun perusahaan yang terpercaya & memiliki reputasi yang baik

+

Misi

+

1. Melayani 21,7 juta pelanggan di tahun 2022

+

2. Mengembangkan pemimpin yang sukses

+

3. Mengelola proses administrasi yang simple & excellent

+

4. Mendukung continuous improvement

+
+
+
+ ); +} + +export default DataTataKelola; \ No newline at end of file diff --git a/pages/honda/about_us/tugas_fungsi.js b/pages/honda/about_us/tugas_fungsi.js new file mode 100644 index 0000000..4f65e2d --- /dev/null +++ b/pages/honda/about_us/tugas_fungsi.js @@ -0,0 +1,41 @@ +import React from "react"; +import { makeStyles } from "@material-ui/core/styles"; + +import styles from "assets/jss/nextjs-material-kit/pages/componentsSections/notificationsStyles.js"; +import Card from "components/Card/Card.js"; +import CardBody from "components/Card/CardBody.js"; +import CardHeader from "components/Card/CardHeader.js"; +import CompanyLink from "components/Header/LinkCompany.js"; + +const useStyles = makeStyles(styles); + +const DataTugasFungsi = function ({ backend, businessPartners, service, carousel, ...props }) { + const classes = useStyles(); + return ( +
+ +
+ + + +
+ +
+ +
+

Tugas & Fungsi Thamrin Group

+

Thamrin Group adalah perusahaan terkemuka di Sumatera Selatan & Bengkulu dengan fokus bisnis pada sektor otomotif dan properti

+

Visi

+

Berdampak bagi masyarakat melalui SDM yang dimiliki, pelayanan prima & pengembangan usaha secara berkelanjutan dengan membangun perusahaan yang terpercaya & memiliki reputasi yang baik

+

Misi

+

1. Melayani 21,7 juta pelanggan di tahun 2022

+

2. Mengembangkan pemimpin yang sukses

+

3. Mengelola proses administrasi yang simple & excellent

+

4. Mendukung continuous improvement

+
+
+
+ ); +} + +export default DataTugasFungsi; \ No newline at end of file diff --git a/pages/honda/carrer/carrer.js b/pages/honda/carrer/carrer.js new file mode 100644 index 0000000..0e0e5ba --- /dev/null +++ b/pages/honda/carrer/carrer.js @@ -0,0 +1,82 @@ +import React from "react"; +import classNames from "classnames"; +import { makeStyles } from "@material-ui/core/styles"; + +import Header from "components/Header/Header.js"; +import HeaderLinks from "components/Header/HeaderHonda.js"; +import Footer from "components/Footer/FooterHonda.js"; +import Parallax from "components/Parallax/Parallax.js"; +import styles from "assets/jss/nextjs-material-kit/pages/components.js"; + +import SectionCarrer from "pages-sections/honda/carrer/carrer.js"; +import Getcarrer from "api/carrer/carrer.js" +import Cookies from "cookies"; + +const useStyles = makeStyles(styles); + +const Carrer = function ({ user, backend, s1, d3, sma, ...props }) { + const classes = useStyles(); + const { ...rest } = props; + return ( +
+
} + fixed + color="info" + changeColorOnScroll={{ + height: 400, + color: "white" + }} + {...rest} + /> + +
+ +
+
+
+ ); +} + +export default Carrer; + +export async function getServerSideProps(context) { + var s1 = []; + var d3 = []; + var sma = []; + const backend = process.env.BACKEND_SERVER_URI; + + var { req, resp } = context; + const cookies = new Cookies(req, resp); + var user = ""; + var userObj = (await cookies.get("user")) + ? JSON.parse(await cookies.get("user")) + : null; + if (userObj) { + let sessionId = userObj["partners_login_states"].filter(function (i) { + return ( + i.business_partner && i.business_partner.name.toUpperCase() == "YAMAHA" + ); + }); + if (sessionId.length != 0) user = userObj["username"]; + } + + var res = await Getcarrer.GetCarrerS1Honda(); + if (res["STATUS"] === 1) { + s1 = res["DATA"]["carrers"]; + } + + var res = await Getcarrer.GetCarrerD3Honda(); + if (res["STATUS"] === 1) { + d3 = res["DATA"]["carrers"]; + } + + var res = await Getcarrer.GetCarrerSMAHonda(); + if (res["STATUS"] === 1) { + sma = res["DATA"]["carrers"]; + } + + return { + props: { user, s1, d3, sma, backend }, // will be passed to the page component as props + }; +} \ No newline at end of file diff --git a/pages/honda/carrer/carrer_details.js b/pages/honda/carrer/carrer_details.js new file mode 100644 index 0000000..6982f06 --- /dev/null +++ b/pages/honda/carrer/carrer_details.js @@ -0,0 +1,72 @@ +import React from "react"; +import classNames from "classnames"; +import { makeStyles } from "@material-ui/core/styles"; + +import Header from "components/Header/Header.js"; +import HeaderLinks from "components/Header/HeaderHonda.js"; +import Footer from "components/Footer/FooterHonda.js"; +import CarrerDetail from "pages-sections/honda/carrer/carrer_details.js"; +import Parallax from "components/Parallax/Parallax.js"; +import styles from "assets/jss/nextjs-material-kit/pages/components.js"; +import GetDetailcarrer from "api/carrer/carrer.js" +import Cookies from "cookies"; + +const useStyles = makeStyles(styles); + +const CarrerDetails = function ({ user, backend, detailcarrer, ...props }) { + const classes = useStyles(); + const { ...rest } = props; + return ( +
+
} + fixed + color="info" + changeColorOnScroll={{ + height: 400, + color: "white" + }} + {...rest} + /> + +
+ +
+
+
+ ); +} + +export default CarrerDetails; + +export async function getServerSideProps(context) { + var {query} = context; + var detailcarrer = []; + const backend = process.env.BACKEND_SERVER_URI; + + var { req, resp } = context; + const cookies = new Cookies(req, resp); + var user = ""; + var userObj = (await cookies.get("user")) + ? JSON.parse(await cookies.get("user")) + : null; + if (userObj) { + let sessionId = userObj["partners_login_states"].filter(function (i) { + return ( + i.business_partner && i.business_partner.name.toUpperCase() == "YAMAHA" + ); + }); + if (sessionId.length != 0) user = userObj["username"]; + } + + var res = await GetDetailcarrer.GetDetailCarrer(query.s||0); + if (res["STATUS"] === 1) { + detailcarrer = res["DATA"]["carrers"]; + } + + console.log(res); + + return { + props: { user, detailcarrer, backend }, // will be passed to the page component as props + }; +} \ No newline at end of file diff --git a/pages/honda/home.js b/pages/honda/home.js index e69de29..f17c440 100644 --- a/pages/honda/home.js +++ b/pages/honda/home.js @@ -0,0 +1,108 @@ +import React from "react"; +import classNames from "classnames"; +import { makeStyles } from "@material-ui/core/styles"; + +import Header from "components/Header/Header.js"; +import HeaderLinks from "components/Header/HeaderHonda.js"; +import Parallax from "components/Parallax/Parallax.js"; +import styles from "assets/jss/nextjs-material-kit/pages/components.js"; +import Footer from "components/Footer/FooterHonda.js"; + +import GetbusinessPartners from "api/home/businessPartner.js"; +import Getservices from "api/home/service.js"; +import Getcarousels from "api/home/carousel.js"; +import DataSnackbarContent from "pages-sections/yamaha/snackbar.js"; +import DataCarousel from "pages-sections/honda/home/carousel.js"; +import DataService from "pages-sections/honda/home/service.js"; +import DataFeature from "pages-sections/honda/home/feature.js"; +import Cookies from "cookies"; + +const useStyles = makeStyles(styles); +const Home = function ({ + backend, + businessPartners, + service, + carousel, + user, + ...props + }) { + const classes = useStyles(); + const { ...rest } = props; + ; + + return ( +
+
} + fixed + color="info" + changeColorOnScroll={{ + height: 400, + color: "white", + }} + {...rest} + /> + +
+ + {/* */} + + + + {/* */} + {/* */} +
+
+
+ ); +}; + +export async function getServerSideProps(context) { + var businessPartners = []; + var service = []; + var carousel = []; + const backend = process.env.BACKEND_SERVER_URI; + + var { req, resp } = context; + const cookies = new Cookies(req, resp); + var user = ""; + var userObj = (await cookies.get("user")) + ? JSON.parse(await cookies.get("user")) + : null; + if (userObj) { + let sessionId = userObj["partners_login_states"].filter(function (i) { + return ( + i.business_partner && i.business_partner.name.toUpperCase() == "YAMAHA" + ); + }); + if (sessionId.length != 0) user = userObj["username"]; + } + + var res = await GetbusinessPartners.GetbusinessPartners(); + if (res["STATUS"] === 1) { + businessPartners = res["DATA"]["businessPartners"]; + } + + var res = await Getservices.GetservicesYamaha(); + if (res["STATUS"] === 1) { + service = res["DATA"]["services"]; + } + + var res = await Getcarousels.GetCarouselsHonda(); + if (res["STATUS"] === 1) { + carousel = res["DATA"]["carousels"]; + } + + console.log(carousel); + return { + props: { businessPartners, service, carousel, backend, user }, // will be passed to the page component as props + }; +} + +export default Home; diff --git a/pages/honda/latest_news/latestnews.js b/pages/honda/latest_news/latestnews.js new file mode 100644 index 0000000..23a8de8 --- /dev/null +++ b/pages/honda/latest_news/latestnews.js @@ -0,0 +1,56 @@ +import React from "react"; +import classNames from "classnames"; +import { makeStyles } from "@material-ui/core/styles"; + +import Header from "components/Header/Header.js"; +import HeaderHonda from "components/Header/HeaderHonda.js"; +import FooterHonda from "components/Footer/FooterHonda.js"; +import Parallax from "components/Parallax/Parallax.js"; +import styles from "assets/jss/nextjs-material-kit/pages/components.js"; + +import GetLatestNews from "api/latest_news/news.js" +import DataSnackbarContent from "pages-sections/suzuki/snackbar.js"; +import DataLatestNews from "pages-sections/honda/latest_news/news.js"; + +const useStyles = makeStyles(styles); + +const LatestNews = function ({ backend, news, ...props }) { + const classes = useStyles(); + const { ...rest } = props; + + return ( +
+
} + fixed + color="info" + changeColorOnScroll={{ + height: 400, + color: "white" + }} + {...rest} + /> + +
+ + +
+ +
+ ); +} + +export default LatestNews; + +export async function getServerSideProps(context) { + var news = []; + const backend = process.env.BACKEND_SERVER_URI; + + var res = await GetLatestNews.GetNewsHonda(); + if (res["STATUS"] === 1) { + news = res["DATA"]["latestNews"]; + } + return { + props: { news, backend }, // will be passed to the page component as props + }; +} \ No newline at end of file diff --git a/pages/honda/latest_news/latestnews_details.js b/pages/honda/latest_news/latestnews_details.js new file mode 100644 index 0000000..d6bb09f --- /dev/null +++ b/pages/honda/latest_news/latestnews_details.js @@ -0,0 +1,63 @@ +import React from "react"; +import classNames from "classnames"; +import { makeStyles } from "@material-ui/core/styles"; + +import Header from "components/Header/Header.js"; +import HeaderSuzuki from "components/Header/HeaderSuzuki.js"; +import FooterSuzuki from "components/Footer/FooterSuzuki.js"; +import Parallax from "components/Parallax/Parallax.js"; +import styles from "assets/jss/nextjs-material-kit/pages/components.js"; + +import GetLatestNews from "api/latest_news/news.js" +import DataSnackbarContent from "pages-sections/suzuki/snackbar.js"; +import DetailLatestNews from "pages-sections/honda/latest_news/news_details.js"; + +const useStyles = makeStyles(styles); + +const detailLatestNews = function ({ backend, news, othernews, ...props }) { + const classes = useStyles(); + const { ...rest } = props; + + return ( +
+
} + fixed + color="info" + changeColorOnScroll={{ + height: 400, + color: "white" + }} + {...rest} + /> + +
+ + +
+ +
+ ); +} + +export default detailLatestNews; + +export async function getServerSideProps(context) { + var {query} = context; + var news = []; + var othernews = []; + const backend = process.env.BACKEND_SERVER_URI; + + var res = await GetLatestNews.GetDetailNews(query.s||0); + if (res["STATUS"] === 1) { + news = res["DATA"]["latestNews"]; + } + + var res = await GetLatestNews.GetOtherNewsHonda(); + if (res["STATUS"] === 1) { + othernews = res["DATA"]["latestNews"]; + } + return { + props: { othernews, news, backend }, // will be passed to the page component as props + }; +} \ No newline at end of file diff --git a/pages/honda/product/product.js b/pages/honda/product/product.js new file mode 100644 index 0000000..b3fe780 --- /dev/null +++ b/pages/honda/product/product.js @@ -0,0 +1,82 @@ +import React from "react"; +import classNames from "classnames"; +import { makeStyles } from "@material-ui/core/styles"; + +import Header from "components/Header/Header.js"; +import HeaderHonda from "components/Header/HeaderHonda.js"; +import FooterHonda from "components/Footer/FooterHonda.js"; +import DataProduct from "pages-sections/honda/product/product.js"; +import Parallax from "components/Parallax/Parallax.js"; +import styles from "assets/jss/nextjs-material-kit/pages/components.js"; + +import Getproduct from "api/product/product.js"; +import Cookies from "cookies"; + +const useStyles = makeStyles(styles); + +const Product = function ({ + backend, + car, + user, + ...props + }) { + const classes = useStyles(); + const { ...rest } = props; + return ( +
+
} + fixed + color="info" + changeColorOnScroll={{ + height: 400, + color: "white", + }} + {...rest} + /> + +
+ +
+ +
+ ); +}; + +export default Product; + +export async function getServerSideProps(context) { + var car = []; + const backend = process.env.BACKEND_SERVER_URI; + + var { req, resp } = context; + const cookies = new Cookies(req, resp); + var user = ""; + var userObj = (await cookies.get("user")) + ? JSON.parse(await cookies.get("user")) + : null; + if (userObj) { + let sessionId = userObj["partners_login_states"].filter(function (i) { + return ( + i.business_partner && i.business_partner.name.toUpperCase() == "SUZUKI" + ); + }); + if (sessionId.length != 0) user = userObj["username"]; + } + + var res = await Getproduct.GetProductHonda(); + if (res["STATUS"] === 1) { + car = res["DATA"]["products"]; + } + + return { + props: { + car, + backend, + user, + }, // will be passed to the page component as props + }; +} diff --git a/pages/honda/profile/edit-profile.js b/pages/honda/profile/edit-profile.js new file mode 100644 index 0000000..e69de29 diff --git a/pages/honda/profile/profile.js b/pages/honda/profile/profile.js new file mode 100644 index 0000000..dc273b7 --- /dev/null +++ b/pages/honda/profile/profile.js @@ -0,0 +1,68 @@ +import React from "react"; +import classNames from "classnames"; +import { makeStyles } from "@material-ui/core/styles"; + +import Header from "components/Header/Header.js"; +import HeaderLinks from "components/Header/HeaderHonda.js"; +import Parallax from "components/Parallax/Parallax.js"; +import styles from "assets/jss/nextjs-material-kit/pages/components.js"; +import Footer from "components/Footer/FooterHonda.js"; +import GetProfile from "api/profile/profile.js" +import DataProfile from "pages-sections/honda/profile/profile.js" +import Cookies from "cookies"; + +const useStyles = makeStyles(styles); +const Profile = function ({ user, profile, ...props }) { + const classes = useStyles(); + const { ...rest } = props; + return ( +
+
} + fixed + color="info" + changeColorOnScroll={{ + height: 400, + color: "white", + }} + {...rest} + /> + +
+ +
+
+ ); +}; + +export async function getServerSideProps(context) { + var profile = []; + var res = await GetProfile.profile(); + if (res["STATUS"] === 1) { + profile = res["DATA"]["users"]; + } + + var { req, resp } = context; + const cookies = new Cookies(req, resp); + var user = ""; + var userObj = (await cookies.get("user")) + ? JSON.parse(await cookies.get("user")) + : null; + if (userObj) { + let sessionId = userObj["partners_login_states"].filter(function (i) { + return ( + i.business_partner && i.business_partner.name.toUpperCase() == "YAMAHA" + ); + }); + if (sessionId.length != 0) user = userObj["username"]; + } + + return { + props: { profile, user }, // will be passed to the page component as props + }; +} +export default Profile; diff --git a/pages/suzuki/checkout/checkout.js b/pages/suzuki/checkout/checkout.js new file mode 100644 index 0000000..e69de29