Browse Source

cleaning console.log

Former-commit-id: 3a75a8a1e4
master
yusmardianto 3 years ago
parent
commit
4c2d6f860c
11 changed files with 29 additions and 27 deletions
  1. +3
    -3
      components/Yamaha/Product/Accessories_Detail.js
  2. +3
    -3
      components/Yamaha/Product/Apparel_Detail.js
  3. +3
    -3
      components/Yamaha/Product/Helmet_Detail.js
  4. +1
    -1
      components/Yamaha/Product/Motor.js
  5. +3
    -3
      components/Yamaha/Product/Motor_Detail.js
  6. +1
    -1
      components/Yamaha/Product/Sparepart.js
  7. +3
    -3
      components/Yamaha/Product/Yamalube_Detail.js
  8. +4
    -4
      components/Yamaha/Product/Ygp_Detail.js
  9. +5
    -3
      components/Yamaha/Shop/Cart.js
  10. +2
    -2
      components/Yamaha/Shop/Checkout.js
  11. +1
    -1
      pages/yamaha/index.js

+ 3
- 3
components/Yamaha/Product/Accessories_Detail.js View File

@@ -101,7 +101,7 @@ const ProductDetails = function ({ detailaccessories, backend, user, ...props })
product_name: detailproduct[0].name,
}
setFormValue(newformValue)
console.log(JSON.stringify(newformValue));
// console.log(JSON.stringify(newformValue));
const response = await fetch(
"/api/transaction/AddToCart",
{
@@ -114,7 +114,7 @@ const ProductDetails = function ({ detailaccessories, backend, user, ...props })
);
if (response.ok) {
var res = await response.json();
console.log("cek response :", res);
// console.log("cek response :", res);
if (res["STATUS"] === 1) {
res["DATA"]["cart"];
swal("Produk Berhasil Ditambah ke Keranjang", "Silahkan Cek Keranjang Belanja Anda", "success");
@@ -181,7 +181,7 @@ const ProductDetails = function ({ detailaccessories, backend, user, ...props })
</div>
<br /> */}

<button type="submit">Add to Cart</button>
{/* <button type="submit">Add to Cart</button> */}

<a href="#" className="add-to-wishlist-btn" title="Add to Wishlist">
<Icon.Heart />


+ 3
- 3
components/Yamaha/Product/Apparel_Detail.js View File

@@ -101,7 +101,7 @@ const ProductDetails = function ({ detailapparel, backend, user, ...props }) {
product_name: detailproduct[0].name,
}
setFormValue(newformValue)
console.log(JSON.stringify(newformValue));
// console.log(JSON.stringify(newformValue));
const response = await fetch(
"/api/transaction/AddToCart",
{
@@ -114,7 +114,7 @@ const ProductDetails = function ({ detailapparel, backend, user, ...props }) {
);
if (response.ok) {
var res = await response.json();
console.log("cek response :", res);
// console.log("cek response :", res);
if (res["STATUS"] === 1) {
res["DATA"]["cart"];
swal("Produk Berhasil Ditambah ke Keranjang", "Silahkan Cek Keranjang Belanja Anda", "success");
@@ -181,7 +181,7 @@ const ProductDetails = function ({ detailapparel, backend, user, ...props }) {
</div>
<br /> */}

<button type="submit">Add to Cart</button>
{/* <button type="submit">Add to Cart</button> */}

<a href="#" className="add-to-wishlist-btn" title="Add to Wishlist">
<Icon.Heart />


+ 3
- 3
components/Yamaha/Product/Helmet_Detail.js View File

@@ -101,7 +101,7 @@ const ProductDetails = function ({ detailhelmet, backend, user, ...props }) {
product_name: detailproduct[0].name,
}
setFormValue(newformValue)
console.log(JSON.stringify(newformValue));
// console.log(JSON.stringify(newformValue));
const response = await fetch(
"/api/transaction/AddToCart",
{
@@ -114,7 +114,7 @@ const ProductDetails = function ({ detailhelmet, backend, user, ...props }) {
);
if (response.ok) {
var res = await response.json();
console.log("cek response :", res);
// console.log("cek response :", res);
if (res["STATUS"] === 1) {
res["DATA"]["cart"];
swal("Produk Berhasil Ditambah ke Keranjang", "Silahkan Cek Keranjang Belanja Anda", "success");
@@ -181,7 +181,7 @@ const ProductDetails = function ({ detailhelmet, backend, user, ...props }) {
</div>
<br /> */}

<button type="submit">Add to Cart</button>
{/* <button type="submit">Add to Cart</button> */}

<a href="#" className="add-to-wishlist-btn" title="Add to Wishlist">
<Icon.Heart />


+ 1
- 1
components/Yamaha/Product/Motor.js View File

@@ -9,7 +9,7 @@ import NumberFormat from 'react-number-format';
const ProductCard = function ({ product, backend, user, ...props }) {
const products = useSelector((state) => state.products)

console.log(product)
// console.log(product)

const Product = product.map((data) => {
return (


+ 3
- 3
components/Yamaha/Product/Motor_Detail.js View File

@@ -119,7 +119,7 @@ const ProductDetails = function ({ detailproduct, backend, user, ...props }) {
// product_img: detailproduct[0].backend.img[0],
}
setFormValue(newformValue)
console.log(JSON.stringify(newformValue));
// console.log(JSON.stringify(newformValue));
const response = await fetch(
"/api/transaction/AddToCart",
{
@@ -132,7 +132,7 @@ const ProductDetails = function ({ detailproduct, backend, user, ...props }) {
);
if (response.ok) {
var res = await response.json();
console.log("cek response :", res);
// console.log("cek response :", res);
if (res["STATUS"] === 1) {
res["DATA"]["cart"];
swal("Produk Berhasil Ditambah ke Keranjang", "Silahkan Cek Keranjang Belanja Anda", "success");
@@ -188,7 +188,7 @@ const ProductDetails = function ({ detailproduct, backend, user, ...props }) {
</div>
<br />

<button type="submit">Add to Cart</button>
{/* <button type="submit">Add to Cart</button> */}

<a href="#" className="add-to-wishlist-btn" title="Add to Wishlist">
<Icon.Heart />


+ 1
- 1
components/Yamaha/Product/Sparepart.js View File

@@ -14,7 +14,7 @@ import NumberFormat from 'react-number-format';
const ProductCard = function ({ ygp, yamalube, helmet, apparel, accessories, backend, ...props }) {
const products = useSelector((state) => state.products)

console.log(ygp)
// console.log(ygp)

const YGP = ygp.map((data) => {
return (


+ 3
- 3
components/Yamaha/Product/Yamalube_Detail.js View File

@@ -101,7 +101,7 @@ const ProductDetails = function ({ detailyamalube, backend, user, ...props }) {
product_name: detailproduct[0].name,
}
setFormValue(newformValue)
console.log(JSON.stringify(newformValue));
// console.log(JSON.stringify(newformValue));
const response = await fetch(
"/api/transaction/AddToCart",
{
@@ -114,7 +114,7 @@ const ProductDetails = function ({ detailyamalube, backend, user, ...props }) {
);
if (response.ok) {
var res = await response.json();
console.log("cek response :", res);
// console.log("cek response :", res);
if (res["STATUS"] === 1) {
res["DATA"]["cart"];
swal("Produk Berhasil Ditambah ke Keranjang", "Silahkan Cek Keranjang Belanja Anda", "success");
@@ -181,7 +181,7 @@ const ProductDetails = function ({ detailyamalube, backend, user, ...props }) {
</div>
<br /> */}

<button type="submit">Add to Cart</button>
{/* <button type="submit">Add to Cart</button> */}

<a href="#" className="add-to-wishlist-btn" title="Add to Wishlist">
<Icon.Heart />


+ 4
- 4
components/Yamaha/Product/Ygp_Detail.js View File

@@ -36,7 +36,7 @@ const options = {
};

const ProductDetails = function ({ detailygp, backend, user, ...props }) {
console.log(detailygp);
// console.log(detailygp);

const [formValue, setFormValue] = React.useState({
product_img: "",
@@ -102,7 +102,7 @@ const ProductDetails = function ({ detailygp, backend, user, ...props }) {
product_name: detailproduct[0].name,
}
setFormValue(newformValue)
console.log(JSON.stringify(newformValue));
// console.log(JSON.stringify(newformValue));
const response = await fetch(
"/api/transaction/AddToCart",
{
@@ -115,7 +115,7 @@ const ProductDetails = function ({ detailygp, backend, user, ...props }) {
);
if (response.ok) {
var res = await response.json();
console.log("cek response :", res);
// console.log("cek response :", res);
if (res["STATUS"] === 1) {
res["DATA"]["cart"];
swal("Produk Berhasil Ditambah ke Keranjang", "Silahkan Cek Keranjang Belanja Anda", "success");
@@ -182,7 +182,7 @@ const ProductDetails = function ({ detailygp, backend, user, ...props }) {
</div>
<br /> */}

<button type="submit">Add to Cart</button>
{/* <button type="submit">Add to Cart</button> */}

<a href="#" className="add-to-wishlist-btn" title="Add to Wishlist">
<Icon.Heart />


+ 5
- 3
components/Yamaha/Shop/Cart.js View File

@@ -65,6 +65,8 @@ const CartContent = function ({ backend, cart_product, ...props }) {
return uuid;
}

// console.log(GenerateID());

return (
<form
onSubmit={async (e) => {
@@ -75,7 +77,7 @@ const CartContent = function ({ backend, cart_product, ...props }) {
product_color: cart_product[0].product_color,
}
setFormValue(newformValue)
console.log(JSON.stringify(newformValue));
// console.log(JSON.stringify(newformValue));
const response = await fetch(
"/api/transaction/AddToCheckout",
{
@@ -88,7 +90,7 @@ const CartContent = function ({ backend, cart_product, ...props }) {
);
if (response.ok) {
var res = await response.json();
console.log("cek response :", res);
// console.log("cek response :", res);
if (res["STATUS"] === 1) {
res["DATA"]["checkout"];
swal("Produk Berhasil Ditambah ke Keranjang", "Silahkan Cek Keranjang Belanja Anda", "success");
@@ -187,7 +189,7 @@ const CartContent = function ({ backend, cart_product, ...props }) {
...formValue,
product_total: e.target.value.toString(),
})
console.log("isi target value : ", e.target.value);
// console.log("isi target value : ", e.target.value);
}}
/>
</span>


+ 2
- 2
components/Yamaha/Shop/Checkout.js View File

@@ -60,7 +60,7 @@ const CheckoutContent = function ({ backend, checkout_product, user, provinces,
product_price: checkout_product[0].product_total,
}
setFormValue(newformValue)
console.log(JSON.stringify(newformValue));
// console.log(JSON.stringify(newformValue));
const response = await fetch(
"/api/transaction/create",
{
@@ -73,7 +73,7 @@ const CheckoutContent = function ({ backend, checkout_product, user, provinces,
);
if (response.ok) {
var res = await response.json();
console.log("cek response :", res);
// console.log("cek response :", res);
if (res["STATUS"] === 1) {
res["DATA"]["transaction"];
swal("Produk Berhasil Ditambah ke Keranjang", "Silahkan Cek Keranjang Belanja Anda", "success");


+ 1
- 1
pages/yamaha/index.js View File

@@ -58,7 +58,7 @@ export async function getServerSideProps(context) {
if (res["STATUS"] === 1) {
dealers = res["DATA"]["dealers"];
}
console.log(userObj);
// console.log(userObj);
return {
props: { dealers, backend, user }, // will be passed to the page component as props


Loading…
Cancel
Save