ソースを参照

hide feature & add discount label

undefined
yusmar 3年前
コミット
58ae0dd3cd
9個のファイルの変更182行の追加11行の削除
  1. +2
    -0
      api/product/product.js
  2. +10
    -0
      api/sparepart/sparepart.js
  3. +13
    -1
      components/Yamaha/Product/Accessories_Detail.js
  4. +13
    -1
      components/Yamaha/Product/Apparel_Detail.js
  5. +13
    -1
      components/Yamaha/Product/Helmet_Detail.js
  6. +15
    -1
      components/Yamaha/Product/Motor_Detail.js
  7. +90
    -5
      components/Yamaha/Product/Sparepart.js
  8. +13
    -1
      components/Yamaha/Product/Yamalube_Detail.js
  9. +13
    -1
      components/Yamaha/Product/Ygp_Detail.js

+ 2
- 0
api/product/product.js ファイルの表示

@@ -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
} }


+ 10
- 0
api/sparepart/sparepart.js ファイルの表示

@@ -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
} }


+ 13
- 1
components/Yamaha/Product/Accessories_Detail.js ファイルの表示

@@ -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>


+ 13
- 1
components/Yamaha/Product/Apparel_Detail.js ファイルの表示

@@ -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>


+ 13
- 1
components/Yamaha/Product/Helmet_Detail.js ファイルの表示

@@ -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>


+ 15
- 1
components/Yamaha/Product/Motor_Detail.js ファイルの表示

@@ -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> */}




+ 90
- 5
components/Yamaha/Product/Sparepart.js ファイルの表示

@@ -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>


+ 13
- 1
components/Yamaha/Product/Yamalube_Detail.js ファイルの表示

@@ -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>


+ 13
- 1
components/Yamaha/Product/Ygp_Detail.js ファイルの表示

@@ -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>


読み込み中…
キャンセル
保存