@@ -24,7 +24,23 @@ | |||
"static/runtime/polyfills.js", | |||
"static/runtime/polyfills.js.map" | |||
], | |||
"/yamaha/cart/checkout": [ | |||
"/suzuki/home": [ | |||
"static/runtime/webpack.js", | |||
"static/runtime/main.js" | |||
], | |||
"/suzuki/latest_news/latestnews_details": [ | |||
"static/runtime/webpack.js", | |||
"static/runtime/main.js" | |||
], | |||
"/suzuki/product/product": [ | |||
"static/runtime/webpack.js", | |||
"static/runtime/main.js" | |||
], | |||
"/suzuki/product/product_detail": [ | |||
"static/runtime/webpack.js", | |||
"static/runtime/main.js" | |||
], | |||
"/yamaha/latest_news/latestnews": [ | |||
"static/runtime/webpack.js", | |||
"static/runtime/main.js" | |||
] | |||
@@ -1 +1 @@ | |||
{"/_app":"static/development/pages/_app.js","/_document":"static/development/pages/_document.js","/_error":"static/development/pages/_error.js","/yamaha/cart/checkout":"static/development/pages/yamaha/cart/checkout.js"} | |||
{"/_app":"static/development/pages/_app.js","/_document":"static/development/pages/_document.js","/_error":"static/development/pages/_error.js","/suzuki/home":"static/development/pages/suzuki/home.js","/suzuki/latest_news/latestnews_details":"static/development/pages/suzuki/latest_news/latestnews_details.js","/suzuki/product/product":"static/development/pages/suzuki/product/product.js","/suzuki/product/product_detail":"static/development/pages/suzuki/product/product_detail.js","/yamaha/latest_news/latestnews":"static/development/pages/yamaha/latest_news/latestnews.js"} |
@@ -1,6 +1,6 @@ | |||
import apollo from "../../lib/apollo.js"; | |||
async function GetCarrerS1(token="") { | |||
async function GetCarrerS1Yamaha(token="") { | |||
var res = await apollo.query( | |||
` | |||
query { | |||
@@ -18,7 +18,7 @@ async function GetCarrerS1(token="") { | |||
return res; | |||
} | |||
async function GetCarrerD3(token="") { | |||
async function GetCarrerD3Yamaha(token="") { | |||
var res = await apollo.query( | |||
` | |||
query { | |||
@@ -36,7 +36,7 @@ async function GetCarrerD3(token="") { | |||
return res; | |||
} | |||
async function GetCarrerSMA(token="") { | |||
async function GetCarrerSMAYamaha(token="") { | |||
var res = await apollo.query( | |||
` | |||
query { | |||
@@ -80,9 +80,69 @@ async function GetDetailCarrer(id, token="") { | |||
return res; | |||
} | |||
async function GetCarrerS1Suzuki(token="") { | |||
var res = await apollo.query( | |||
` | |||
query { | |||
carrers(where: {category: "S1" business_partner:"2"}) | |||
{ | |||
id | |||
name | |||
start_regis | |||
until_regis | |||
name_description | |||
} | |||
}`, | |||
token | |||
); | |||
return res; | |||
} | |||
async function GetCarrerD3Suzuki(token="") { | |||
var res = await apollo.query( | |||
` | |||
query { | |||
carrers(where: {category: "D3" business_partner:"2"}) | |||
{ | |||
id | |||
name | |||
start_regis | |||
until_regis | |||
name_description | |||
} | |||
}`, | |||
token | |||
); | |||
return res; | |||
} | |||
async function GetCarrerSMASuzuki(token="") { | |||
var res = await apollo.query( | |||
` | |||
query { | |||
carrers(where: {category: "SMA" business_partner:"2"}) | |||
{ | |||
id | |||
name | |||
start_regis | |||
until_regis | |||
name_description | |||
} | |||
}`, | |||
token | |||
); | |||
return res; | |||
} | |||
module.exports = { | |||
GetCarrerS1:GetCarrerS1, | |||
GetCarrerD3:GetCarrerD3, | |||
GetCarrerSMA:GetCarrerSMA, | |||
//yamaha | |||
GetCarrerS1Yamaha:GetCarrerS1Yamaha, | |||
GetCarrerD3Yamaha:GetCarrerD3Yamaha, | |||
GetCarrerSMAYamaha:GetCarrerSMAYamaha, | |||
//suzuki | |||
GetCarrerS1Suzuki:GetCarrerS1Suzuki, | |||
GetCarrerD3Suzuki:GetCarrerD3Suzuki, | |||
GetCarrerSMASuzuki:GetCarrerSMASuzuki, | |||
GetDetailCarrer:GetDetailCarrer, | |||
}; |
@@ -1,6 +1,6 @@ | |||
import apollo from "../../lib/apollo.js"; | |||
async function GetCarousels(token="") { | |||
async function GetCarouselsYamaha(token="") { | |||
var res = await apollo.query( | |||
` | |||
query{ | |||
@@ -17,6 +17,24 @@ async function GetCarousels(token="") { | |||
return res; | |||
} | |||
async function GetCarouselsSuzuki(token="") { | |||
var res = await apollo.query( | |||
` | |||
query { | |||
carousels(where: { business_partner: "2" }) { | |||
id | |||
img { | |||
url | |||
} | |||
} | |||
} | |||
`, | |||
token | |||
); | |||
return res; | |||
} | |||
module.exports = { | |||
GetCarousels: GetCarousels, | |||
GetCarouselsYamaha:GetCarouselsYamaha, | |||
GetCarouselsSuzuki:GetCarouselsSuzuki, | |||
}; |
@@ -1,6 +1,24 @@ | |||
import apollo from "../../lib/apollo.js"; | |||
async function Getservices(token="") { | |||
async function GetservicesYamaha(token="") { | |||
var res = await apollo.query( | |||
` | |||
query{ | |||
services | |||
{ | |||
name | |||
img{ | |||
url | |||
} | |||
} | |||
} | |||
`, | |||
token | |||
); | |||
return res; | |||
} | |||
async function GetservicesSuzuki(token="") { | |||
var res = await apollo.query( | |||
` | |||
query{ | |||
@@ -19,5 +37,6 @@ async function Getservices(token="") { | |||
} | |||
module.exports = { | |||
Getservices: Getservices, | |||
GetservicesYamaha: GetservicesYamaha, | |||
GetservicesSuzuki:GetservicesSuzuki, | |||
}; |
@@ -1,6 +1,6 @@ | |||
import apollo from "../../lib/apollo.js"; | |||
async function GetNews(token="", start = 0) { | |||
async function GetNewsYamaha(token="", start = 0) { | |||
var res = await apollo.query( | |||
` | |||
query($start: Int!) { | |||
@@ -24,7 +24,7 @@ async function GetNews(token="", start = 0) { | |||
return res; | |||
} | |||
async function GetOtherNews(token="", start = 0) { | |||
async function GetOtherNewsYamaha(token="", start = 0) { | |||
var res = await apollo.query( | |||
` | |||
query($start: Int!) { | |||
@@ -48,6 +48,54 @@ async function GetOtherNews(token="", start = 0) { | |||
return res; | |||
} | |||
async function GetNewsSuzuki(token="", start = 0) { | |||
var res = await apollo.query( | |||
` | |||
query{ | |||
latestNews(where: { business_partner: "2" }) | |||
{ | |||
id | |||
title | |||
description | |||
img{ | |||
url | |||
} | |||
published_at | |||
} | |||
} | |||
`, | |||
token, | |||
{ | |||
start: start, | |||
} | |||
); | |||
return res; | |||
} | |||
async function GetOtherNewsSuzuki(token="", start = 0) { | |||
var res = await apollo.query( | |||
` | |||
query{ | |||
latestNews(where: { business_partner: "2" }) | |||
{ | |||
id | |||
title | |||
description | |||
img{ | |||
url | |||
} | |||
published_at | |||
} | |||
} | |||
`, | |||
token, | |||
{ | |||
start: start, | |||
} | |||
); | |||
return res; | |||
} | |||
async function GetDetailNews(id, token="") { | |||
var res = await apollo.query( | |||
` | |||
@@ -73,7 +121,9 @@ async function GetDetailNews(id, token="") { | |||
} | |||
module.exports = { | |||
GetNews: GetNews, | |||
GetNewsYamaha: GetNewsYamaha, | |||
GetOtherNewsYamaha:GetOtherNewsYamaha, | |||
GetNewsSuzuki:GetNewsSuzuki, | |||
GetOtherNewsSuzuki:GetOtherNewsSuzuki, | |||
GetDetailNews: GetDetailNews, | |||
GetOtherNews:GetOtherNews, | |||
}; |
@@ -205,8 +205,26 @@ async function GetProductPowerProduct(token = "") { | |||
return res; | |||
} | |||
async function GetProductSuzuki(token = "") { | |||
var res = await apollo.query( | |||
` | |||
query { | |||
products(where: { business_partner: "2" }) { | |||
id | |||
name | |||
price | |||
img { | |||
url | |||
} | |||
} | |||
}`, | |||
token | |||
); | |||
return res; | |||
} | |||
module.exports = { | |||
GetDetailProduct: GetDetailProduct, | |||
//yamaha | |||
GetProductMatic: GetProductMatic, | |||
GetProductMaxi: GetProductMaxi, | |||
GetProductNaked: GetProductNaked, | |||
@@ -217,4 +235,10 @@ module.exports = { | |||
GetProductCBU: GetProductCBU, | |||
GetProductATV: GetProductATV, | |||
GetProductPowerProduct: GetProductPowerProduct, | |||
//suzuki | |||
GetProductSuzuki:GetProductSuzuki, | |||
//detail | |||
GetDetailProduct: GetDetailProduct, | |||
}; |
@@ -1,88 +0,0 @@ | |||
import apollo from "../../../lib/apollo.js"; | |||
async function GetCarrerS1(token="") { | |||
var res = await apollo.query( | |||
` | |||
query { | |||
carrers(where: {category: "S1" business_partner:"2"}) | |||
{ | |||
id | |||
name | |||
start_regis | |||
until_regis | |||
name_description | |||
} | |||
}`, | |||
token | |||
); | |||
return res; | |||
} | |||
async function GetCarrerD3(token="") { | |||
var res = await apollo.query( | |||
` | |||
query { | |||
carrers(where: {category: "D3" business_partner:"2"}) | |||
{ | |||
id | |||
name | |||
start_regis | |||
until_regis | |||
name_description | |||
} | |||
}`, | |||
token | |||
); | |||
return res; | |||
} | |||
async function GetCarrerSMA(token="") { | |||
var res = await apollo.query( | |||
` | |||
query { | |||
carrers(where: {category: "SMA" business_partner:"2"}) | |||
{ | |||
id | |||
name | |||
start_regis | |||
until_regis | |||
name_description | |||
} | |||
}`, | |||
token | |||
); | |||
return res; | |||
} | |||
async function GetDetailCarrer(id, token="") { | |||
var res = await apollo.query( | |||
` | |||
query($input: ID!){ | |||
carrers(where:{id:$input}) | |||
{ | |||
name | |||
description | |||
category | |||
img{ | |||
url | |||
} | |||
start_regis | |||
until_regis | |||
name_description | |||
} | |||
} | |||
`, | |||
token, | |||
{ | |||
"input": id | |||
} | |||
); | |||
return res; | |||
} | |||
module.exports = { | |||
GetCarrerS1:GetCarrerS1, | |||
GetCarrerD3:GetCarrerD3, | |||
GetCarrerSMA:GetCarrerSMA, | |||
GetDetailCarrer:GetDetailCarrer, | |||
}; |
@@ -1,26 +0,0 @@ | |||
import apollo from "../../lib/apollo.js"; | |||
async function GetDealers(filter, token="") { | |||
var res = await apollo.query( | |||
` | |||
query { ${(filter!="")?`name: "${filter}"`:""} | |||
dealers | |||
{ | |||
id | |||
name | |||
kota_dealer | |||
address | |||
telp | |||
location | |||
} | |||
} | |||
`, | |||
token | |||
); | |||
return res; | |||
} | |||
module.exports = { | |||
GetDealers: GetDealers, | |||
}; |
@@ -1,23 +0,0 @@ | |||
import apollo from "../../../lib/apollo.js"; | |||
async function GetbusinessPartners(token = "") { | |||
var res = await apollo.query( | |||
` | |||
query{ | |||
businessPartners | |||
{ | |||
name | |||
img{ | |||
url | |||
} | |||
} | |||
} | |||
`, | |||
token | |||
); | |||
return res; | |||
} | |||
module.exports = { | |||
GetbusinessPartners: GetbusinessPartners, | |||
}; |
@@ -1,22 +0,0 @@ | |||
import apollo from "../../../lib/apollo.js"; | |||
async function GetCarousels(token="") { | |||
var res = await apollo.query( | |||
` | |||
query { | |||
carousels(where: { business_partner: "2" }) { | |||
id | |||
img { | |||
url | |||
} | |||
} | |||
} | |||
`, | |||
token | |||
); | |||
return res; | |||
} | |||
module.exports = { | |||
GetCarousels: GetCarousels, | |||
}; |
@@ -1,23 +0,0 @@ | |||
import apollo from "../../../lib/apollo.js"; | |||
async function Getservices(token="") { | |||
var res = await apollo.query( | |||
` | |||
query{ | |||
services | |||
{ | |||
name | |||
img{ | |||
url | |||
} | |||
} | |||
} | |||
`, | |||
token | |||
); | |||
return res; | |||
} | |||
module.exports = { | |||
Getservices: Getservices, | |||
}; |
@@ -1,79 +0,0 @@ | |||
import apollo from "../../../lib/apollo.js"; | |||
async function GetNews(token="", start = 0) { | |||
var res = await apollo.query( | |||
` | |||
query{ | |||
latestNews(where: { business_partner: "2" }) | |||
{ | |||
id | |||
title | |||
description | |||
img{ | |||
url | |||
} | |||
published_at | |||
} | |||
} | |||
`, | |||
token, | |||
{ | |||
start: start, | |||
} | |||
); | |||
return res; | |||
} | |||
async function GetOtherNews(token="", start = 0) { | |||
var res = await apollo.query( | |||
` | |||
query{ | |||
latestNews(where: { business_partner: "2" }) | |||
{ | |||
id | |||
title | |||
description | |||
img{ | |||
url | |||
} | |||
published_at | |||
} | |||
} | |||
`, | |||
token, | |||
{ | |||
start: start, | |||
} | |||
); | |||
return res; | |||
} | |||
async function GetDetailNews(id, token="") { | |||
var res = await apollo.query( | |||
` | |||
query($input: ID!) { | |||
latestNews(where:{id:$input}) | |||
{ | |||
id | |||
title | |||
description | |||
img{ | |||
url | |||
} | |||
published_at | |||
} | |||
} | |||
`, | |||
token, | |||
{ | |||
"input": id | |||
} | |||
); | |||
return res; | |||
} | |||
module.exports = { | |||
GetNews: GetNews, | |||
GetDetailNews: GetDetailNews, | |||
GetOtherNews:GetOtherNews, | |||
}; |
@@ -1,48 +0,0 @@ | |||
import apollo from "../../../lib/apollo.js"; | |||
async function GetDetailProduct(id, token = "") { | |||
var res = await apollo.query( | |||
` | |||
query($input: ID!){ | |||
products(where:{id:$input}) | |||
{ | |||
name | |||
price | |||
description | |||
img{ | |||
url | |||
} | |||
overview | |||
specification | |||
film | |||
stock | |||
} | |||
} `, | |||
token, { | |||
"input": id | |||
} | |||
); | |||
return res; | |||
} | |||
async function GetProductSuzuki(token = "") { | |||
var res = await apollo.query( | |||
` | |||
query { | |||
products(where: { business_partner: "2" }) { | |||
id | |||
name | |||
price | |||
img { | |||
url | |||
} | |||
} | |||
}`, | |||
token | |||
); | |||
return res; | |||
} | |||
module.exports = { | |||
GetProductSuzuki: GetProductSuzuki, | |||
GetDetailProduct:GetDetailProduct, | |||
}; |
@@ -57,19 +57,19 @@ export default function HeaderLinks(props) { | |||
<a href="/yamaha/product/apparel" className={classes.dropdownLink}>Apparel</a>, | |||
<a href="/yamaha/product/accessories" className={classes.dropdownLink}>Accessories</a>, | |||
<a href="https://booking.thamrin.co.id/" className={classes.dropdownLink}>Service</a>, | |||
<a href="/yamaha/dealers" className={classes.dropdownLink}>Dealers</a>, | |||
<a href="/yamaha/dealer/dealers" className={classes.dropdownLink}>Dealers</a>, | |||
]} | |||
/> | |||
</ListItem> | |||
<ListItem className={classes.listItem} style={{marginTop:"10px"}}> | |||
<Link href="/yamaha/latestnews"> | |||
<Link href="/yamaha/latest_news/latestnews"> | |||
<Button color="transparent" className={classes.navLink}> | |||
<Icon className={classes.icons}>event</Icon> Latest News | |||
</Button> | |||
</Link> | |||
</ListItem> | |||
<ListItem className={classes.listItem} style={{marginTop:"10px"}}> | |||
<Button href="/yamaha/carrer" color="transparent" className={classes.navLink}> | |||
<Button href="/yamaha/carrer/carrer" color="transparent" className={classes.navLink}> | |||
<Icon className={classes.icons}>wallet_travel</Icon> Career | |||
</Button> | |||
</ListItem> | |||
@@ -85,14 +85,14 @@ export default function HeaderLinks(props) { | |||
/> | |||
</ListItem> */} | |||
<ListItem className={classes.listItem} style={{marginTop:"10px"}}> | |||
<Link href="/suzuki/latestnews"> | |||
<Link href="/suzuki/latest_news/latestnews"> | |||
<Button color="transparent" className={classes.navLink}> | |||
<Icon className={classes.icons}>event</Icon> Latest News | |||
</Button> | |||
</Link> | |||
</ListItem> | |||
<ListItem className={classes.listItem} style={{marginTop:"10px"}}> | |||
<Button href="/suzuki/carrer" color="transparent" className={classes.navLink}> | |||
<Button href="/suzuki/carrer/carrer" color="transparent" className={classes.navLink}> | |||
<Icon className={classes.icons}>wallet_travel</Icon> Career | |||
</Button> | |||
</ListItem> | |||
@@ -27,7 +27,7 @@ const DataLatestNews = function ({ backend, news, ...props }) { | |||
<CardBody> | |||
<p>{data.title}</p> | |||
<p>{data.published_at}</p> | |||
<Button color="info" round href={"/suzuki/latestnews_details?s="+data.id}> | |||
<Button color="info" round href={"/suzuki/latest_news/latestnews_details?s="+data.id}> | |||
<Icon className={classes.icons}>open_in_new</Icon>Read More | |||
</Button> | |||
</CardBody> | |||
@@ -17,6 +17,7 @@ import Icon from "@material-ui/core/Icon"; | |||
import MenuItem from '@material-ui/core/MenuItem'; | |||
import FormControl from '@material-ui/core/FormControl'; | |||
import Select from '@material-ui/core/Select'; | |||
import TextField from '@material-ui/core/TextField'; | |||
const useStyles = makeStyles({ | |||
table: { | |||
@@ -79,28 +80,16 @@ import Select from '@material-ui/core/Select'; | |||
<TableCell align="center">Rp.{data.price}</TableCell> | |||
<TableCell align="center"> | |||
<FormControl className={classes.formControl}> | |||
<Select | |||
labelId="demo-simple-select-placeholder-label-label" | |||
id="demo-simple-select-placeholder-label" | |||
onChange={handleChange} | |||
displayEmpty | |||
className={classes.selectEmpty} | |||
> | |||
<MenuItem value=""> | |||
<em>None</em> | |||
</MenuItem> | |||
<MenuItem value={1}>1</MenuItem> | |||
<MenuItem value={2}>2</MenuItem> | |||
<MenuItem value={3}>3</MenuItem> | |||
<MenuItem value={4}>4</MenuItem> | |||
<MenuItem value={5}>5</MenuItem> | |||
<MenuItem value={6}>6</MenuItem> | |||
<MenuItem value={7}>7</MenuItem> | |||
<MenuItem value={8}>8</MenuItem> | |||
<MenuItem value={9}>9</MenuItem> | |||
<MenuItem value={10}>10</MenuItem> | |||
</Select> | |||
</FormControl></TableCell> | |||
<TextField | |||
id="outlined-number" | |||
type="number" | |||
align="center" | |||
InputLabelProps={{ | |||
shrink: true, | |||
}} | |||
/> | |||
</FormControl> | |||
</TableCell> | |||
<TableCell align="center">Rp.{data.price}</TableCell> | |||
<TableCell align="center"><a href="#">Hapus</a></TableCell> | |||
</TableRow> | |||
@@ -1,5 +1,6 @@ | |||
import React from 'react'; | |||
import { makeStyles } from '@material-ui/core/styles'; | |||
import clsx from 'clsx'; | |||
import SnackbarContent from "components/Snackbar/SnackbarContent.js"; | |||
import Button1 from "components/CustomButtons/Button.js"; | |||
@@ -28,6 +29,12 @@ import IconButton from '@material-ui/core/IconButton'; | |||
import Typography from '@material-ui/core/Typography'; | |||
import CloseIcon from '@material-ui/icons/Close'; | |||
import Slide from '@material-ui/core/Slide'; | |||
import Radio from '@material-ui/core/Radio'; | |||
import RadioGroup from '@material-ui/core/RadioGroup'; | |||
import FormControlLabel from '@material-ui/core/FormControlLabel'; | |||
import FormControl from '@material-ui/core/FormControl'; | |||
import FormLabel from '@material-ui/core/FormLabel'; | |||
import value from '@material-ui/core/FormLabel'; | |||
const useStyles = makeStyles((theme) => ({ | |||
root: { | |||
@@ -46,16 +53,68 @@ const useStyles = makeStyles((theme) => ({ | |||
appBar: { | |||
position: 'relative', | |||
}, | |||
title: { | |||
title: { | |||
marginLeft: theme.spacing(2), | |||
flex: 1, | |||
}, | |||
root: { | |||
'&:hover': { | |||
backgroundColor: 'transparent', | |||
}, | |||
}, | |||
icon: { | |||
borderRadius: '50%', | |||
width: 16, | |||
height: 16, | |||
boxShadow: 'inset 0 0 0 1px rgba(16,22,26,.2), inset 0 -1px 0 rgba(16,22,26,.1)', | |||
backgroundColor: '#f5f8fa', | |||
backgroundImage: 'linear-gradient(180deg,hsla(0,0%,100%,.8),hsla(0,0%,100%,0))', | |||
'$root.Mui-focusVisible &': { | |||
outline: '2px auto rgba(19,124,189,.6)', | |||
outlineOffset: 2, | |||
}, | |||
'input:hover ~ &': { | |||
backgroundColor: '#ebf1f5', | |||
}, | |||
'input:disabled ~ &': { | |||
boxShadow: 'none', | |||
background: 'rgba(206,217,224,.5)', | |||
}, | |||
}, | |||
checkedIcon: { | |||
backgroundColor: '#137cbd', | |||
backgroundImage: 'linear-gradient(180deg,hsla(0,0%,100%,.1),hsla(0,0%,100%,0))', | |||
'&:before': { | |||
display: 'block', | |||
width: 16, | |||
height: 16, | |||
backgroundImage: 'radial-gradient(#fff,#fff 28%,transparent 32%)', | |||
content: '""', | |||
}, | |||
'input:hover ~ &': { | |||
backgroundColor: '#106ba3', | |||
}, | |||
}, | |||
})); | |||
function getSteps() { | |||
return ['Alamat Pengiriman', 'Pesanan Produk', 'Metode Pembayaran']; | |||
} | |||
function StyledRadio(props) { | |||
const classes = useStyles(); | |||
return ( | |||
<Radio | |||
className={classes.root} | |||
disableRipple | |||
color="default" | |||
checkedIcon={<span className={clsx(classes.icon, classes.checkedIcon)} />} | |||
icon={<span className={classes.icon} />} | |||
{...props} | |||
/> | |||
); | |||
} | |||
const Transition = React.forwardRef(function Transition(props, ref) { | |||
return <Slide direction="up" ref={ref} {...props} />; | |||
}); | |||
@@ -205,18 +264,92 @@ const DataCheckout = function ({ backend, checkoutproduct, ...props }) { | |||
const CartMetodePembayaran = checkoutproduct.map((data) => { | |||
return ( | |||
<div align="center"> | |||
<img src={image1} style={{width:"1100px"}}/><br></br> | |||
<h4>Alamat Pengiriman</h4> | |||
<hr></hr> | |||
<h5>Yusmar</h5> | |||
<h5>087797315685</h5> | |||
<h5>Thamrin Indrapura Jl.Aipda Karel Satsuit Tubun,17 Ilir, Kec.Ilir Tim.I, Palembang, KOTA PALEMBANG - ILIR TIMUR II, SUMATERA SELATAN, ID 30114</h5> | |||
<Button1 color="info" href={"/yamaha/cart/checkout?s="+data.id}> | |||
<Icon className={classes.icons}>cached</Icon> | |||
Ubah Alamat | |||
</Button1> | |||
<div> | |||
<div align="center"> | |||
<Typography variant="h6" className={classes.title}> | |||
Pilih Metode Pembayaran | |||
</Typography><br></br> | |||
<FormControl component="fieldset"> | |||
<RadioGroup defaultValue="female" aria-label="gender"> | |||
<GridContainer justify="center" style={{marginTop:"-50px"}}> | |||
<Grid style={{padding:"25px"}}> | |||
<Card style={{width: "200px"}}> | |||
<div align="center"> | |||
<FormControlLabel value="1" style={{marginLeft:"20px"}} control={<StyledRadio />} /><br></br> | |||
<img src="https://1.bp.blogspot.com/-ghcXZfSaQBI/X6I02Zg-NfI/AAAAAAAAHaY/OxF9Klx83zQGKNETJ9qEnZCCmjsJ1DifQCLcBGAsYHQ/s1000/logo%2Bbank%2Bbca-01.png" width="100px"/> | |||
<h4>Bank BCA</h4> | |||
</div> | |||
</Card> | |||
</Grid> | |||
<Grid style={{padding:"25px"}}> | |||
<Card style={{width: "200px"}}> | |||
<div align="center"> | |||
<FormControlLabel value="2" style={{marginLeft:"20px"}} control={<StyledRadio />} /><br></br> | |||
<img src="https://cdn.ayobandung.com/images-bandung/post/articles/2020/02/03/78361/logo-bri-bank-rakyat-indonesia-png-terbaru.png" width="120px"/> | |||
<h4>Bank BRI</h4> | |||
</div> | |||
</Card> | |||
</Grid> | |||
<Grid style={{padding:"25px"}}> | |||
<Card style={{width: "200px"}}> | |||
<div align="center"> | |||
<FormControlLabel value="3" style={{marginLeft:"20px"}} control={<StyledRadio />} /><br></br> | |||
<img src="https://cdn3.iconfinder.com/data/icons/banks-in-indonesia-logo-badge/100/Mandiri-512.png" width="140px"/> | |||
<h4>Bank Mandiri</h4> | |||
</div> | |||
</Card> | |||
</Grid> | |||
<Grid style={{padding:"25px"}}> | |||
<Card style={{width: "200px"}}> | |||
<div align="center"> | |||
<FormControlLabel value="4" style={{marginLeft:"20px"}} control={<StyledRadio />} /><br></br> | |||
<img src="https://cdn3.iconfinder.com/data/icons/banks-in-indonesia-logo-badge/100/BNI-512.png" width="140px"/> | |||
<h4>Bank BNI</h4> | |||
</div> | |||
</Card> | |||
</Grid> | |||
</GridContainer> | |||
<GridContainer justify="center" style={{marginTop:"-50px"}}> | |||
<Grid style={{padding:"25px"}}> | |||
<Card style={{width: "200px"}}> | |||
<div align="center"> | |||
<FormControlLabel value="5" style={{marginLeft:"20px"}} control={<StyledRadio />} /><br></br> | |||
<img src="https://statik.tempo.co/?id=997833&width=650" width="140px"/> | |||
<h4>Bank BSI</h4> | |||
</div> | |||
</Card> | |||
</Grid> | |||
<Grid style={{padding:"25px"}}> | |||
<Card style={{width: "200px"}}> | |||
<div align="center"> | |||
<FormControlLabel value="6" style={{marginLeft:"20px"}} control={<StyledRadio />} /><br></br> | |||
<img src="https://internationalinvestorclub.com/wp-content/uploads/2020/10/BNLI-Bank-Permata.jpg" width="150px"/> | |||
<h4>Bank Permata</h4> | |||
</div> | |||
</Card> | |||
</Grid> | |||
<Grid style={{padding:"25px"}}> | |||
<Card style={{width: "200px"}}> | |||
<div align="center"> | |||
<FormControlLabel value="7" style={{marginLeft:"20px"}} control={<StyledRadio />} /><br></br> | |||
<img src="https://cdn.ayobandung.com/images-bandung/post/articles/2018/11/10/40370/images.png" width="135px"/> | |||
<h4>Bank Danamon</h4> | |||
</div> | |||
</Card> | |||
</Grid> | |||
<Grid style={{padding:"25px"}}> | |||
<Card style={{width: "200px"}}> | |||
<div align="center"> | |||
<FormControlLabel value="8" style={{marginLeft:"20px"}} control={<StyledRadio />} /><br></br> | |||
<img src="https://seekvectorlogo.com/wp-content/uploads/2020/04/maybank-vector-logo.png" width="145px"/> | |||
<h4>Bank Maybank</h4> | |||
</div> | |||
</Card> | |||
</Grid> | |||
</GridContainer> | |||
</RadioGroup> | |||
</FormControl> | |||
</div> | |||
</div> | |||
); | |||
}) | |||
@@ -237,7 +370,7 @@ const DataCheckout = function ({ backend, checkoutproduct, ...props }) { | |||
<Step key={label}> | |||
<StepLabel>{label}</StepLabel> | |||
<StepContent> | |||
<Typography>{CartProdukPesanan}</Typography> | |||
<Typography>{CartMetodePembayaran}</Typography> | |||
<div className={classes.actionsContainer}> | |||
<div> | |||
<Button | |||
@@ -27,7 +27,7 @@ const DataLatestNews = function ({ backend, news, ...props }) { | |||
<CardBody> | |||
<p>{data.title}</p> | |||
<p>{data.published_at}</p> | |||
<Button color="info" round href={"/yamaha/latestnews_details?s="+data.id}> | |||
<Button color="info" round href={"/yamaha/latest_news/latestnews_details?s="+data.id}> | |||
<Icon className={classes.icons}>open_in_new</Icon>Read More | |||
</Button> | |||
</CardBody> | |||
@@ -3,7 +3,7 @@ import Router from "next/router"; | |||
export default class _error extends Component { | |||
componentDidMount = () => { | |||
Router.push("/suzuki/home"); | |||
Router.push("/yamaha/home"); | |||
}; | |||
render() { | |||
@@ -9,7 +9,7 @@ import Parallax from "components/Parallax/Parallax.js"; | |||
import styles from "assets/jss/nextjs-material-kit/pages/components.js"; | |||
import SectionCarrer from "pages-sections/suzuki/carrer/carrer.js"; | |||
import Getcarrer from "../../api/suzuki/carrer/carrer.js" | |||
import Getcarrer from "../../../api/carrer/carrer.js" | |||
const useStyles = makeStyles(styles); | |||
@@ -45,17 +45,17 @@ export async function getServerSideProps(context) { | |||
var sma = []; | |||
const backend = process.env.BACKEND_SERVER_URI; | |||
var res = await Getcarrer.GetCarrerS1(); | |||
var res = await Getcarrer.GetCarrerS1Suzuki(); | |||
if (res["STATUS"] === 1) { | |||
s1 = res["DATA"]["carrers"]; | |||
} | |||
var res = await Getcarrer.GetCarrerD3(); | |||
var res = await Getcarrer.GetCarrerD3Suzuki(); | |||
if (res["STATUS"] === 1) { | |||
d3 = res["DATA"]["carrers"]; | |||
} | |||
var res = await Getcarrer.GetCarrerSMA(); | |||
var res = await Getcarrer.GetCarrerSMASuzuki(); | |||
if (res["STATUS"] === 1) { | |||
sma = res["DATA"]["carrers"]; | |||
} |
@@ -8,7 +8,7 @@ import FooterSuzuki from "components/Footer/FooterSuzuki.js"; | |||
import CarrerDetail from "pages-sections/suzuki/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 GetDetailcarrer from "../../../api/carrer/carrer.js" | |||
const useStyles = makeStyles(styles); | |||
@@ -1,74 +0,0 @@ | |||
import React from "react"; | |||
import classNames from "classnames"; | |||
import { makeStyles } from "@material-ui/core/styles"; | |||
import Router from 'next/router' | |||
import Header from "components/Header/Header.js"; | |||
import HeaderLinks from "components/Header/HeaderLinks.js"; | |||
import Parallax from "components/Parallax/Parallax.js"; | |||
import styles from "assets/jss/nextjs-material-kit/pages/components.js"; | |||
import Footer from "components/Footer/Footer.js"; | |||
import Getdealer from "../../api/dealer/dealer.js"; | |||
import DataSnackbarContent from "../../pages-sections/yamaha/snackbar.js"; | |||
import DataDealers from "../../pages-sections/yamaha/dealers/dealers.js"; | |||
import { QueryClient, QueryClientProvider, useQuery } from 'react-query' | |||
const queryClient = new QueryClient() | |||
const handleName = values => { | |||
Router.push({ | |||
pathname: 'yamaha/dealers', | |||
query: (values&&values.length!=0)?{ filter: values[0]["name"] }:{}, | |||
}) | |||
} | |||
const useStyles = makeStyles(styles); | |||
const Dealers = function ({ selected, backend, dealers, ...props }) { | |||
const classes = useStyles(); | |||
const { ...rest } = props; | |||
return ( | |||
<div> | |||
<Header | |||
rightLinks={<HeaderLinks/>} | |||
fixed | |||
color="info" | |||
changeColorOnScroll={{ | |||
height: 400, | |||
color: "white", | |||
}} | |||
{...rest} | |||
/> | |||
<Parallax image={require("assets/img/dealers.png")}styles={{ marginTop: "50px" }}/> | |||
<div className={classNames(classes.main, classes.mainRaised)}> | |||
<QueryClientProvider client={queryClient}> | |||
<DataSnackbarContent /> | |||
<DataDealers selected={(selected=="")?null:selected[0]["id"]} handleName={handleName} dealers={dealers} backend={backend} /> | |||
</QueryClientProvider> | |||
</div> | |||
<Footer /> | |||
</div> | |||
); | |||
}; | |||
export default Dealers; | |||
export async function getServerSideProps(context) { | |||
var dealers = []; | |||
var filter = context.query.filter||""; | |||
var selected = ""; | |||
const backend = process.env.BACKEND_SERVER_URI; | |||
var res = await Getdealer.GetDealers(filter); | |||
if (res["STATUS"] === 1) { | |||
dealers = res["DATA"]["dealers"]; | |||
if (filter !=""){ | |||
selected = dealers.filter((i)=>i.name==filter); | |||
} | |||
} | |||
return { | |||
props: { selected, dealers, backend, }, // will be passed to the page component as props | |||
}; | |||
} |
@@ -8,9 +8,9 @@ import Parallax from "components/Parallax/Parallax.js"; | |||
import styles from "assets/jss/nextjs-material-kit/pages/components.js"; | |||
import FooterSuzuki from "components/Footer/FooterSuzuki.js"; | |||
import GetbusinessPartners from "../../api/suzuki/home/businessPartner.js"; | |||
import Getservices from "../../api/suzuki/home/service.js"; | |||
import Getcarousels from "../../api/suzuki/home/carousel.js"; | |||
import Getservices from "../../api/home/service.js"; | |||
import Getcarousels from "../../api/home/carousel.js"; | |||
import DataSnackbarContent from "../../pages-sections/suzuki/snackbar.js"; | |||
import DataCarousel from "../../pages-sections/suzuki/home/carousel.js"; | |||
import DataService from "../../pages-sections/suzuki/home/service.js"; | |||
@@ -22,7 +22,6 @@ import DataFeature from "../../pages-sections/suzuki/home/feature.js"; | |||
const useStyles = makeStyles(styles); | |||
const Home = function ({ | |||
backend, | |||
businessPartners, | |||
service, | |||
carousels, | |||
...props | |||
@@ -63,23 +62,18 @@ export async function getServerSideProps(context) { | |||
var carousels = []; | |||
const backend = process.env.BACKEND_SERVER_URI; | |||
var res = await GetbusinessPartners.GetbusinessPartners(); | |||
if (res["STATUS"] === 1) { | |||
businessPartners = res["DATA"]["businessPartners"]; | |||
} | |||
var res = await Getservices.Getservices(); | |||
var res = await Getservices.GetservicesSuzuki(); | |||
if (res["STATUS"] === 1) { | |||
service = res["DATA"]["services"]; | |||
} | |||
var res = await Getcarousels.GetCarousels(); | |||
var res = await Getcarousels.GetCarouselsSuzuki(); | |||
if (res["STATUS"] === 1) { | |||
carousels = res["DATA"]["carousels"]; | |||
} | |||
return { | |||
props: { businessPartners, service, carousels, backend }, // will be passed to the page component as props | |||
props: { service, carousels, backend }, // will be passed to the page component as props | |||
}; | |||
} | |||
@@ -8,9 +8,9 @@ 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/suzuki/latest_news/news.js" | |||
import DataSnackbarContent from "../../pages-sections/suzuki/snackbar.js"; | |||
import DataLatestNews from "../../pages-sections/suzuki/latest_news/news.js"; | |||
import GetLatestNews from "../../../api/latest_news/news.js" | |||
import DataSnackbarContent from "../../../pages-sections/suzuki/snackbar.js"; | |||
import DataLatestNews from "../../../pages-sections/suzuki/latest_news/news.js"; | |||
const useStyles = makeStyles(styles); | |||
@@ -46,7 +46,7 @@ export async function getServerSideProps(context) { | |||
var news = []; | |||
const backend = process.env.BACKEND_SERVER_URI; | |||
var res = await GetLatestNews.GetNews(); | |||
var res = await GetLatestNews.GetNewsSuzuki(); | |||
if (res["STATUS"] === 1) { | |||
news = res["DATA"]["latestNews"]; | |||
} |
@@ -8,9 +8,9 @@ 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/suzuki/latest_news/news.js" | |||
import DataSnackbarContent from "../../pages-sections/suzuki/snackbar.js"; | |||
import DetailLatestNews from "../../pages-sections/suzuki/latest_news/news_details.js"; | |||
import GetLatestNews from "../../../api/latest_news/news.js" | |||
import DataSnackbarContent from "../../../pages-sections/suzuki/snackbar.js"; | |||
import DetailLatestNews from "../../../pages-sections/suzuki/latest_news/news_details.js"; | |||
const useStyles = makeStyles(styles); | |||
@@ -53,7 +53,7 @@ export async function getServerSideProps(context) { | |||
news = res["DATA"]["latestNews"]; | |||
} | |||
var res = await GetLatestNews.GetOtherNews(); | |||
var res = await GetLatestNews.GetOtherNewsSuzuki(); | |||
if (res["STATUS"] === 1) { | |||
othernews = res["DATA"]["latestNews"]; | |||
} |
@@ -9,7 +9,7 @@ import DataProduct from "pages-sections/suzuki/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/suzuki/product/product.js"; | |||
import Getproduct from "../../../api/product/product.js"; | |||
const useStyles = makeStyles(styles); | |||
@@ -9,7 +9,7 @@ import Parallax from "components/Parallax/Parallax.js"; | |||
import styles from "assets/jss/nextjs-material-kit/pages/components.js"; | |||
import SectionCarrer from "pages-sections/yamaha/carrer/carrer.js"; | |||
import Getcarrer from "../../api/carrer/carrer.js" | |||
import Getcarrer from "../../../api/carrer/carrer.js" | |||
const useStyles = makeStyles(styles); | |||
@@ -45,17 +45,17 @@ export async function getServerSideProps(context) { | |||
var sma = []; | |||
const backend = process.env.BACKEND_SERVER_URI; | |||
var res = await Getcarrer.GetCarrerS1(); | |||
var res = await Getcarrer.GetCarrerS1Yamaha(); | |||
if (res["STATUS"] === 1) { | |||
s1 = res["DATA"]["carrers"]; | |||
} | |||
var res = await Getcarrer.GetCarrerD3(); | |||
var res = await Getcarrer.GetCarrerD3Yamaha(); | |||
if (res["STATUS"] === 1) { | |||
d3 = res["DATA"]["carrers"]; | |||
} | |||
var res = await Getcarrer.GetCarrerSMA(); | |||
var res = await Getcarrer.GetCarrerSMAYamaha(); | |||
if (res["STATUS"] === 1) { | |||
sma = res["DATA"]["carrers"]; | |||
} |
@@ -8,7 +8,7 @@ import Footer from "components/Footer/Footer.js"; | |||
import CarrerDetail from "pages-sections/yamaha/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 GetDetailcarrer from "../../../api/carrer/carrer.js.js" | |||
const useStyles = makeStyles(styles); | |||
@@ -11,6 +11,7 @@ import Footer from "components/Footer/Footer.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/yamaha/home/carousel.js"; | |||
import DataService from "../../pages-sections/yamaha/home/service.js"; | |||
@@ -69,12 +70,12 @@ export async function getServerSideProps(context) { | |||
businessPartners = res["DATA"]["businessPartners"]; | |||
} | |||
var res = await Getservices.Getservices(); | |||
var res = await Getservices.GetservicesYamaha(); | |||
if (res["STATUS"] === 1) { | |||
service = res["DATA"]["services"]; | |||
} | |||
var res = await Getcarousels.GetCarousels(); | |||
var res = await Getcarousels.GetCarouselsYamaha(); | |||
if (res["STATUS"] === 1) { | |||
carousel = res["DATA"]["carousels"]; | |||
} | |||
@@ -8,9 +8,9 @@ import Footer from "components/Footer/Footer.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/yamaha/snackbar.js"; | |||
import DataLatestNews from "../../pages-sections/yamaha/latest_news/news.js"; | |||
import GetLatestNews from "../../../api/latest_news/news.js" | |||
import DataSnackbarContent from "../../../pages-sections/yamaha/snackbar.js"; | |||
import DataLatestNews from "../../../pages-sections/yamaha/latest_news/news.js"; | |||
const useStyles = makeStyles(styles); | |||
@@ -46,7 +46,7 @@ export async function getServerSideProps(context) { | |||
var news = []; | |||
const backend = process.env.BACKEND_SERVER_URI; | |||
var res = await GetLatestNews.GetNews(); | |||
var res = await GetLatestNews.GetNewsYamaha(); | |||
if (res["STATUS"] === 1) { | |||
news = res["DATA"]["latestNews"]; | |||
} |
@@ -8,9 +8,9 @@ import Footer from "components/Footer/Footer.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/yamaha/snackbar.js"; | |||
import DetailLatestNews from "../../pages-sections/yamaha/latest_news/news_details.js"; | |||
import GetLatestNews from "../../../api/latest_news/news.js" | |||
import DataSnackbarContent from "../../../pages-sections/yamaha/snackbar.js"; | |||
import DetailLatestNews from "../../../pages-sections/yamaha/latest_news/news_details.js"; | |||
const useStyles = makeStyles(styles); | |||
@@ -53,7 +53,7 @@ export async function getServerSideProps(context) { | |||
news = res["DATA"]["latestNews"]; | |||
} | |||
var res = await GetLatestNews.GetOtherNews(); | |||
var res = await GetLatestNews.GetOtherNewsYamaha(); | |||
if (res["STATUS"] === 1) { | |||
othernews = res["DATA"]["latestNews"]; | |||
} |