@@ -11,6 +11,7 @@ async function GetDetailProduct(id, token = "") { | |||||
price | price | ||||
price1 | price1 | ||||
price2 | price2 | ||||
discount | |||||
img{ | img{ | ||||
url | url | ||||
} | } | ||||
@@ -72,6 +73,7 @@ async function GetProduct(token = "") { | |||||
price | price | ||||
price1 | price1 | ||||
price2 | price2 | ||||
discount | |||||
img { | img { | ||||
url | url | ||||
} | } | ||||
@@ -12,6 +12,7 @@ async function GetSparepartYGP(token="") { | |||||
} | } | ||||
price1 | price1 | ||||
price2 | price2 | ||||
discount | |||||
ygp_units{ | ygp_units{ | ||||
name | name | ||||
part_code | part_code | ||||
@@ -36,6 +37,7 @@ async function GetSparepartYamalube(token="") { | |||||
price | price | ||||
description | description | ||||
stock | stock | ||||
discount | |||||
img{ | img{ | ||||
url | url | ||||
} | } | ||||
@@ -55,6 +57,7 @@ async function GetHelmet(token="") { | |||||
id | id | ||||
name | name | ||||
price | price | ||||
discount | |||||
img { | img { | ||||
url | url | ||||
} | } | ||||
@@ -73,6 +76,7 @@ async function GetApparel(token="") { | |||||
id | id | ||||
name | name | ||||
price | price | ||||
discount | |||||
img { | img { | ||||
url | url | ||||
} | } | ||||
@@ -91,6 +95,7 @@ async function GetAcc(token="") { | |||||
id | id | ||||
name | name | ||||
price | price | ||||
discount | |||||
img { | img { | ||||
url | url | ||||
} | } | ||||
@@ -112,6 +117,7 @@ async function GetYGPDetail(id, token="") { | |||||
img{ | img{ | ||||
url | url | ||||
} | } | ||||
discount | |||||
description | description | ||||
price1 | price1 | ||||
price2 | price2 | ||||
@@ -142,6 +148,7 @@ async function GetYamalubeDetail(id, token="") { | |||||
description | description | ||||
price | price | ||||
part_code | part_code | ||||
discount | |||||
img { | img { | ||||
url | url | ||||
} | } | ||||
@@ -167,6 +174,7 @@ async function GetHelmetDetail(id, token="") { | |||||
description | description | ||||
price | price | ||||
part_code | part_code | ||||
discount | |||||
img { | img { | ||||
url | url | ||||
} | } | ||||
@@ -192,6 +200,7 @@ async function GetApparelDetail(id, token="") { | |||||
description | description | ||||
price | price | ||||
part_code | part_code | ||||
discount | |||||
img { | img { | ||||
url | url | ||||
} | } | ||||
@@ -217,6 +226,7 @@ async function GetAccDetail(id, token="") { | |||||
description | description | ||||
price | price | ||||
part_code | part_code | ||||
discount | |||||
img { | img { | ||||
url | url | ||||
} | } | ||||
@@ -67,8 +67,20 @@ const ProductDetails = function ({ detailaccessories, backend, user, ...props }) | |||||
<div className="products-details"> | <div className="products-details"> | ||||
<h3>{data.name}</h3> | <h3>{data.name}</h3> | ||||
<h3> | <h3> | ||||
<NumberFormat value={data.price1} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> | |||||
<NumberFormat value={data.price - data.price * data.discount} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> | |||||
</h3> | </h3> | ||||
<h5> | |||||
<div className="price" style={{marginTop:"20px"}}> | |||||
<NumberFormat | |||||
style={{ color: "#EB1928" }} | |||||
displayType={'text'} | |||||
prefix={'%'} | |||||
decimalScale={2} | |||||
value={data.discount * 100} | |||||
/> | |||||
<NumberFormat value={data.price} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> | |||||
</div> | |||||
</h5> | |||||
<ul className="rating"> | <ul className="rating"> | ||||
<li><i className="flaticon-star-1"></i></li> | <li><i className="flaticon-star-1"></i></li> | ||||
@@ -67,8 +67,20 @@ const ProductDetails = function ({ detailapparel, backend, user, ...props }) { | |||||
<div className="products-details"> | <div className="products-details"> | ||||
<h3>{data.name}</h3> | <h3>{data.name}</h3> | ||||
<h3> | <h3> | ||||
<NumberFormat value={data.price1} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> | |||||
<NumberFormat value={data.price - data.price * data.discount} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> | |||||
</h3> | </h3> | ||||
<h5> | |||||
<div className="price" style={{marginTop:"20px"}}> | |||||
<NumberFormat | |||||
style={{ color: "#EB1928" }} | |||||
displayType={'text'} | |||||
prefix={'%'} | |||||
decimalScale={2} | |||||
value={data.discount * 100} | |||||
/> | |||||
<NumberFormat value={data.price} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> | |||||
</div> | |||||
</h5> | |||||
<ul className="rating"> | <ul className="rating"> | ||||
<li><i className="flaticon-star-1"></i></li> | <li><i className="flaticon-star-1"></i></li> | ||||
@@ -67,8 +67,20 @@ const ProductDetails = function ({ detailhelmet, backend, user, ...props }) { | |||||
<div className="products-details"> | <div className="products-details"> | ||||
<h3>{data.name}</h3> | <h3>{data.name}</h3> | ||||
<h3> | <h3> | ||||
<NumberFormat value={data.price1} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> | |||||
<NumberFormat value={data.price - data.price * data.discount} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> | |||||
</h3> | </h3> | ||||
<h5> | |||||
<div className="price" style={{marginTop:"20px"}}> | |||||
<NumberFormat | |||||
style={{ color: "#EB1928" }} | |||||
displayType={'text'} | |||||
prefix={'%'} | |||||
decimalScale={2} | |||||
value={data.discount * 100} | |||||
/> | |||||
<NumberFormat value={data.price} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> | |||||
</div> | |||||
</h5> | |||||
<ul className="rating"> | <ul className="rating"> | ||||
<li><i className="flaticon-star-1"></i></li> | <li><i className="flaticon-star-1"></i></li> | ||||
@@ -55,6 +55,8 @@ const ProductDetails = function ({ detailproduct, backend, user, ...props }) { | |||||
// }); | // }); | ||||
// } | // } | ||||
return ( | return ( | ||||
<div> | <div> | ||||
<PageBanner pageTitle={data.name} /> | <PageBanner pageTitle={data.name} /> | ||||
@@ -79,8 +81,20 @@ const ProductDetails = function ({ detailproduct, backend, user, ...props }) { | |||||
<div className="col-lg-7"> | <div className="col-lg-7"> | ||||
<div className="products-details"> | <div className="products-details"> | ||||
<h3> | <h3> | ||||
<NumberFormat value={data.product_otrs[0].price} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> | |||||
<NumberFormat value={data.product_otrs[0].price - data.product_otrs[0].price * data.discount} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> | |||||
</h3> | </h3> | ||||
<h5> | |||||
<div className="price" style={{marginTop:"20px"}}> | |||||
<NumberFormat | |||||
style={{ color: "#EB1928" }} | |||||
displayType={'text'} | |||||
prefix={'%'} | |||||
decimalScale={2} | |||||
value={data.discount * 100} | |||||
/> | |||||
<NumberFormat value={data.product_otrs[0].price} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> | |||||
</div> | |||||
</h5> | |||||
{/* <p>{this.state.selectedOption}</p> */} | {/* <p>{this.state.selectedOption}</p> */} | ||||
@@ -50,7 +50,24 @@ const ProductCard = function ({ ygp, yamalube, helmet, apparel, accessories, bac | |||||
<a>{data.name}</a> | <a>{data.name}</a> | ||||
</Link> | </Link> | ||||
</h3> | </h3> | ||||
<span><NumberFormat value={data.price1} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /></span> | |||||
<span> | |||||
<NumberFormat value={data.price1 - data.price1 * data.discount} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> | |||||
</span><br /> | |||||
<span></span> | |||||
<span> | |||||
<div className="products-details"> | |||||
<div className="price"> | |||||
<NumberFormat | |||||
style={{ color: "#EB1928" }} | |||||
displayType={'text'} | |||||
prefix={'%'} | |||||
decimalScale={2} | |||||
value={data.discount * 100} | |||||
/> | |||||
<NumberFormat value={data.price1} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> | |||||
</div> | |||||
</div> | |||||
</span> | |||||
<ul> | <ul> | ||||
<li><i className="flaticon-star-1"></i></li> | <li><i className="flaticon-star-1"></i></li> | ||||
<li><i className="flaticon-star-1"></i></li> | <li><i className="flaticon-star-1"></i></li> | ||||
@@ -102,7 +119,24 @@ const ProductCard = function ({ ygp, yamalube, helmet, apparel, accessories, bac | |||||
<a>{data.name}</a> | <a>{data.name}</a> | ||||
</Link> | </Link> | ||||
</h3> | </h3> | ||||
<span><NumberFormat value={data.price} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /></span> | |||||
<span> | |||||
<NumberFormat value={data.price - data.price * data.discount} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> | |||||
</span><br /> | |||||
<span></span> | |||||
<span> | |||||
<div className="products-details"> | |||||
<div className="price"> | |||||
<NumberFormat | |||||
style={{ color: "#EB1928" }} | |||||
displayType={'text'} | |||||
prefix={'%'} | |||||
decimalScale={2} | |||||
value={data.discount * 100} | |||||
/> | |||||
<NumberFormat value={data.price} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> | |||||
</div> | |||||
</div> | |||||
</span> | |||||
<ul> | <ul> | ||||
<li><i className="flaticon-star-1"></i></li> | <li><i className="flaticon-star-1"></i></li> | ||||
<li><i className="flaticon-star-1"></i></li> | <li><i className="flaticon-star-1"></i></li> | ||||
@@ -154,7 +188,24 @@ const ProductCard = function ({ ygp, yamalube, helmet, apparel, accessories, bac | |||||
<a>{data.name}</a> | <a>{data.name}</a> | ||||
</Link> | </Link> | ||||
</h3> | </h3> | ||||
<span><NumberFormat value={data.price} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /></span> | |||||
<span> | |||||
<NumberFormat value={data.price - data.price * data.discount} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> | |||||
</span><br /> | |||||
<span></span> | |||||
<span> | |||||
<div className="products-details"> | |||||
<div className="price"> | |||||
<NumberFormat | |||||
style={{ color: "#EB1928" }} | |||||
displayType={'text'} | |||||
prefix={'%'} | |||||
decimalScale={2} | |||||
value={data.discount * 100} | |||||
/> | |||||
<NumberFormat value={data.price} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> | |||||
</div> | |||||
</div> | |||||
</span> | |||||
<ul> | <ul> | ||||
<li><i className="flaticon-star-1"></i></li> | <li><i className="flaticon-star-1"></i></li> | ||||
<li><i className="flaticon-star-1"></i></li> | <li><i className="flaticon-star-1"></i></li> | ||||
@@ -206,7 +257,24 @@ const ProductCard = function ({ ygp, yamalube, helmet, apparel, accessories, bac | |||||
<a>{data.name}</a> | <a>{data.name}</a> | ||||
</Link> | </Link> | ||||
</h3> | </h3> | ||||
<span><NumberFormat value={data.price} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /></span> | |||||
<span> | |||||
<NumberFormat value={data.price - data.price * data.discount} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> | |||||
</span><br /> | |||||
<span></span> | |||||
<span> | |||||
<div className="products-details"> | |||||
<div className="price"> | |||||
<NumberFormat | |||||
style={{ color: "#EB1928" }} | |||||
displayType={'text'} | |||||
prefix={'%'} | |||||
decimalScale={2} | |||||
value={data.discount * 100} | |||||
/> | |||||
<NumberFormat value={data.price} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> | |||||
</div> | |||||
</div> | |||||
</span> | |||||
<ul> | <ul> | ||||
<li><i className="flaticon-star-1"></i></li> | <li><i className="flaticon-star-1"></i></li> | ||||
<li><i className="flaticon-star-1"></i></li> | <li><i className="flaticon-star-1"></i></li> | ||||
@@ -258,7 +326,24 @@ const ProductCard = function ({ ygp, yamalube, helmet, apparel, accessories, bac | |||||
<a>{data.name}</a> | <a>{data.name}</a> | ||||
</Link> | </Link> | ||||
</h3> | </h3> | ||||
<span><NumberFormat value={data.price} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /></span> | |||||
<span> | |||||
<NumberFormat value={data.price - data.price * data.discount} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> | |||||
</span><br /> | |||||
<span></span> | |||||
<span> | |||||
<div className="products-details"> | |||||
<div className="price"> | |||||
<NumberFormat | |||||
style={{ color: "#EB1928" }} | |||||
displayType={'text'} | |||||
prefix={'%'} | |||||
decimalScale={2} | |||||
value={data.discount * 100} | |||||
/> | |||||
<NumberFormat value={data.price} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> | |||||
</div> | |||||
</div> | |||||
</span> | |||||
<ul> | <ul> | ||||
<li><i className="flaticon-star-1"></i></li> | <li><i className="flaticon-star-1"></i></li> | ||||
<li><i className="flaticon-star-1"></i></li> | <li><i className="flaticon-star-1"></i></li> | ||||
@@ -67,8 +67,20 @@ const ProductDetails = function ({ detailyamalube, backend, user, ...props }) { | |||||
<div className="products-details"> | <div className="products-details"> | ||||
<h3>{data.name}</h3> | <h3>{data.name}</h3> | ||||
<h3> | <h3> | ||||
<NumberFormat value={data.price1} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> | |||||
<NumberFormat value={data.price - data.price * data.discount} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> | |||||
</h3> | </h3> | ||||
<h5> | |||||
<div className="price" style={{marginTop:"20px"}}> | |||||
<NumberFormat | |||||
style={{ color: "#EB1928" }} | |||||
displayType={'text'} | |||||
prefix={'%'} | |||||
decimalScale={2} | |||||
value={data.discount * 100} | |||||
/> | |||||
<NumberFormat value={data.price} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> | |||||
</div> | |||||
</h5> | |||||
<ul className="rating"> | <ul className="rating"> | ||||
<li><i className="flaticon-star-1"></i></li> | <li><i className="flaticon-star-1"></i></li> | ||||
@@ -68,8 +68,20 @@ const ProductDetails = function ({ detailygp, backend, user, ...props }) { | |||||
<div className="products-details"> | <div className="products-details"> | ||||
<h3>{data.name}</h3> | <h3>{data.name}</h3> | ||||
<h3> | <h3> | ||||
<NumberFormat value={data.price1} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> | |||||
<NumberFormat value={data.price1 - data.price1 * data.discount} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> | |||||
</h3> | </h3> | ||||
<h5> | |||||
<div className="price" style={{marginTop:"20px"}}> | |||||
<NumberFormat | |||||
style={{ color: "#EB1928" }} | |||||
displayType={'text'} | |||||
prefix={'%'} | |||||
decimalScale={2} | |||||
value={data.discount * 100} | |||||
/> | |||||
<NumberFormat value={data.price1} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> | |||||
</div> | |||||
</h5> | |||||
<ul className="rating"> | <ul className="rating"> | ||||
<li><i className="flaticon-star-1"></i></li> | <li><i className="flaticon-star-1"></i></li> | ||||