From 58ae0dd3cd0229a8c641e2795772b462620ecb75 Mon Sep 17 00:00:00 2001 From: yusmar Date: Sat, 13 Nov 2021 11:06:46 +0700 Subject: [PATCH] hide feature & add discount label --- api/product/product.js | 2 + api/sparepart/sparepart.js | 10 +++ components/Yamaha/Product/Accessories_Detail.js | 14 +++- components/Yamaha/Product/Apparel_Detail.js | 14 +++- components/Yamaha/Product/Helmet_Detail.js | 14 +++- components/Yamaha/Product/Motor_Detail.js | 16 ++++- components/Yamaha/Product/Sparepart.js | 95 +++++++++++++++++++++++-- components/Yamaha/Product/Yamalube_Detail.js | 14 +++- components/Yamaha/Product/Ygp_Detail.js | 14 +++- 9 files changed, 182 insertions(+), 11 deletions(-) diff --git a/api/product/product.js b/api/product/product.js index cf147e7..708d7d6 100644 --- a/api/product/product.js +++ b/api/product/product.js @@ -11,6 +11,7 @@ async function GetDetailProduct(id, token = "") { price price1 price2 + discount img{ url } @@ -72,6 +73,7 @@ async function GetProduct(token = "") { price price1 price2 + discount img { url } diff --git a/api/sparepart/sparepart.js b/api/sparepart/sparepart.js index f577f86..fbeea34 100644 --- a/api/sparepart/sparepart.js +++ b/api/sparepart/sparepart.js @@ -12,6 +12,7 @@ async function GetSparepartYGP(token="") { } price1 price2 + discount ygp_units{ name part_code @@ -36,6 +37,7 @@ async function GetSparepartYamalube(token="") { price description stock + discount img{ url } @@ -55,6 +57,7 @@ async function GetHelmet(token="") { id name price + discount img { url } @@ -73,6 +76,7 @@ async function GetApparel(token="") { id name price + discount img { url } @@ -91,6 +95,7 @@ async function GetAcc(token="") { id name price + discount img { url } @@ -112,6 +117,7 @@ async function GetYGPDetail(id, token="") { img{ url } + discount description price1 price2 @@ -142,6 +148,7 @@ async function GetYamalubeDetail(id, token="") { description price part_code + discount img { url } @@ -167,6 +174,7 @@ async function GetHelmetDetail(id, token="") { description price part_code + discount img { url } @@ -192,6 +200,7 @@ async function GetApparelDetail(id, token="") { description price part_code + discount img { url } @@ -217,6 +226,7 @@ async function GetAccDetail(id, token="") { description price part_code + discount img { url } diff --git a/components/Yamaha/Product/Accessories_Detail.js b/components/Yamaha/Product/Accessories_Detail.js index 42923de..d35d503 100644 --- a/components/Yamaha/Product/Accessories_Detail.js +++ b/components/Yamaha/Product/Accessories_Detail.js @@ -67,8 +67,20 @@ const ProductDetails = function ({ detailaccessories, backend, user, ...props })

{data.name}

- +

+
+
+ + +
+