From 8d40c7ac580a199689e8dc8c69bca3804db970b7 Mon Sep 17 00:00:00 2001 From: w3bdesign <45217974+w3bdesign@users.noreply.github.com> Date: Fri, 12 Feb 2021 03:25:47 +0100 Subject: [PATCH 1/2] Remove empty lines --- components/Cart/ShowCartContents.vue | 3 --- 1 file changed, 3 deletions(-) diff --git a/components/Cart/ShowCartContents.vue b/components/Cart/ShowCartContents.vue index 123b1085..6c0d6fea 100644 --- a/components/Cart/ShowCartContents.vue +++ b/components/Cart/ShowCartContents.vue @@ -78,7 +78,6 @@ export default { query: GET_CART_QUERY, result({ data, loading, networkStatus }) { const cartIsReady = data && networkStatus === 7 - if (cartIsReady && !loading) { this.loading = false this.remoteCart = data @@ -101,13 +100,11 @@ export default { methods: { async handleRemoveProduct(products) { this.removingCartItem = true - const updatedItems = [] updatedItems.push({ key: products.key, quantity: 0, }) - try { await this.$apollo .mutate({ From 5faee6568c64345649966636e6e640280ef879eb Mon Sep 17 00:00:00 2001 From: w3bdesign <45217974+w3bdesign@users.noreply.github.com> Date: Sat, 13 Feb 2021 00:28:41 +0100 Subject: [PATCH 2/2] Show if on sale for individual products --- apollo/queries/GET_SINGLE_PRODUCT_QUERY.gql | 5 + components/Products/ShowSingleProduct.vue | 6 -- package-lock.json | 111 +++++++++++--------- package.json | 4 +- 4 files changed, 70 insertions(+), 56 deletions(-) diff --git a/apollo/queries/GET_SINGLE_PRODUCT_QUERY.gql b/apollo/queries/GET_SINGLE_PRODUCT_QUERY.gql index 1ef2c25e..3d6c3cd4 100644 --- a/apollo/queries/GET_SINGLE_PRODUCT_QUERY.gql +++ b/apollo/queries/GET_SINGLE_PRODUCT_QUERY.gql @@ -4,6 +4,7 @@ query Product($id: ID!) { averageRating slug description + onSale image { databaseId uri @@ -14,10 +15,14 @@ query Product($id: ID!) { name ... on SimpleProduct { price + salePrice + regularPrice databaseId } ... on VariableProduct { price + salePrice + regularPrice databaseId paColors { nodes { diff --git a/components/Products/ShowSingleProduct.vue b/components/Products/ShowSingleProduct.vue index 47f4c858..e9ef149c 100644 --- a/components/Products/ShowSingleProduct.vue +++ b/components/Products/ShowSingleProduct.vue @@ -20,10 +20,8 @@ :alt="product.name" :src="process.env.placeholderSmallImage" /> -

{{ product.name }}

-

{{ product.salePrice }} @@ -32,16 +30,13 @@ {{ product.regularPrice }}

-

{{ product.price }}

-

{{ stripHTML(product.description) }}

-

-
diff --git a/package-lock.json b/package-lock.json index 44118ce3..1e9a101d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1474,6 +1474,39 @@ "integrity": "sha512-kwOXw8fZ0Lt1QmeOOrd+o4Ibvp4UTEBFQbzvWldjlKv5n+G9sXfIPn1hh63IQIL8K8vbvv1oYMJiIUbuy9bGaA==", "requires": { "purgecss": "^3.1.3" + }, + "dependencies": { + "commander": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==" + }, + "nanoid": { + "version": "3.1.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", + "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==" + }, + "postcss": { + "version": "8.2.6", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.6.tgz", + "integrity": "sha512-xpB8qYxgPuly166AGlpRjUdEYtmOWx2iCwGmrv4vqZL9YPVviDVPZPRXxnXr6xPZOdxQ9lp3ZBFCRgWJ7LE3Sg==", + "requires": { + "colorette": "^1.2.1", + "nanoid": "^3.1.20", + "source-map": "^0.6.1" + } + }, + "purgecss": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/purgecss/-/purgecss-3.1.3.tgz", + "integrity": "sha512-hRSLN9mguJ2lzlIQtW4qmPS2kh6oMnA9RxdIYK8sz18QYqd6ePp4GNDl18oWHA1f2v2NEQIh51CO8s/E3YGckQ==", + "requires": { + "commander": "^6.0.0", + "glob": "^7.0.0", + "postcss": "^8.2.1", + "postcss-selector-parser": "^6.0.2" + } + } } }, "@graphql-codegen/cli": { @@ -9598,12 +9631,12 @@ } }, "eslint": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.19.0.tgz", - "integrity": "sha512-CGlMgJY56JZ9ZSYhJuhow61lMPPjUzWmChFya71Z/jilVos7mR/jPgaEfVGgMBY5DshbKdG8Ezb8FDCHcoMEMg==", + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.20.0.tgz", + "integrity": "sha512-qGi0CTcOGP2OtCQBgWZlQjcTuP0XkIpYFj25XtRTQSHC+umNnp7UMshr2G8SLsRFYDdAPFeHOsiteadmMH02Yw==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", + "@babel/code-frame": "7.12.11", "@eslint/eslintrc": "^0.3.0", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -9615,7 +9648,7 @@ "eslint-utils": "^2.1.0", "eslint-visitor-keys": "^2.0.0", "espree": "^7.3.1", - "esquery": "^1.2.0", + "esquery": "^1.4.0", "esutils": "^2.0.2", "file-entry-cache": "^6.0.0", "functional-red-black-tree": "^1.0.1", @@ -9670,6 +9703,21 @@ } } }, + "esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + } + }, + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + }, "globals": { "version": "12.4.0", "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", @@ -16887,39 +16935,6 @@ "escape-goat": "^2.0.0" } }, - "purgecss": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/purgecss/-/purgecss-3.1.3.tgz", - "integrity": "sha512-hRSLN9mguJ2lzlIQtW4qmPS2kh6oMnA9RxdIYK8sz18QYqd6ePp4GNDl18oWHA1f2v2NEQIh51CO8s/E3YGckQ==", - "requires": { - "commander": "^6.0.0", - "glob": "^7.0.0", - "postcss": "^8.2.1", - "postcss-selector-parser": "^6.0.2" - }, - "dependencies": { - "commander": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", - "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==" - }, - "nanoid": { - "version": "3.1.20", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", - "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==" - }, - "postcss": { - "version": "8.2.5", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.5.tgz", - "integrity": "sha512-wMcb7BpDcm3gxQOQx46NDNT36Kk0Ao6PJLLI2ed5vehbbbxCEuslSQzbQ2sfSKy+gkYxhWcGWSeaK+gwm4KIZg==", - "requires": { - "colorette": "^1.2.1", - "nanoid": "^3.1.20", - "source-map": "^0.6.1" - } - } - } - }, "q": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", @@ -18960,9 +18975,9 @@ }, "dependencies": { "ajv": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.0.3.tgz", - "integrity": "sha512-R50QRlXSxqXcQP5SvKUrw8VZeypvo12i2IX0EeR5PiZ7bEKeHWgzgo264LDadUsCU42lTJVhFikTqJwNeH34gQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.1.0.tgz", + "integrity": "sha512-svS9uILze/cXbH0z2myCK2Brqprx/+JJYK5pHicT/GQiBfzzhUVAIT6MwqJg8y4xV/zoGsUeuPuwtoiKSGE15g==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -19049,23 +19064,23 @@ } }, "tailwindcss": { - "version": "npm:@tailwindcss/postcss7-compat@2.0.2", - "resolved": "https://registry.npmjs.org/@tailwindcss/postcss7-compat/-/postcss7-compat-2.0.2.tgz", - "integrity": "sha512-KM8kjG5dd8qoXBX2a6r3r1TOqhFh8NtFBheG9qpVPwSjrD8wRdoM7s+Xz56HEA1XmeN64gEKqjmY6vm55DiS3Q==", + "version": "npm:@tailwindcss/postcss7-compat@2.0.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/postcss7-compat/-/postcss7-compat-2.0.3.tgz", + "integrity": "sha512-R43aiSzwlybDMhDld8vkSIKPSLXxbbmotZ+I2GIrX+IzFNy9JAByC7Ncf9A81Dg0JLBWHY5m769lBbBnJCF8cw==", "requires": { - "@fullhuman/postcss-purgecss": "^3.0.0", + "@fullhuman/postcss-purgecss": "^3.1.3", "autoprefixer": "^9", "bytes": "^3.0.0", "chalk": "^4.1.0", "color": "^3.1.3", "detective": "^5.2.0", "didyoumean": "^1.2.1", - "fs-extra": "^9.0.1", + "fs-extra": "^9.1.0", "html-tags": "^3.1.0", "lodash": "^4.17.20", "modern-normalize": "^1.0.0", "node-emoji": "^1.8.1", - "object-hash": "^2.0.3", + "object-hash": "^2.1.1", "postcss": "^7", "postcss-functions": "^3", "postcss-js": "^2", @@ -19073,7 +19088,7 @@ "postcss-selector-parser": "^6.0.4", "postcss-value-parser": "^4.1.0", "pretty-hrtime": "^1.0.3", - "reduce-css-calc": "^2.1.6", + "reduce-css-calc": "^2.1.8", "resolve": "^1.19.0" }, "dependencies": { diff --git a/package.json b/package.json index fb5788a9..83f8a94c 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "graphql-tag": "^2.11.0", "nuxt": "^2.14.12", "swiper": "^6.4.11", - "tailwindcss": "npm:@tailwindcss/postcss7-compat@2.0.2", + "tailwindcss": "npm:@tailwindcss/postcss7-compat@2.0.3", "uid": "^2.0.0", "vue": "^2.6.12", "vue-awesome-swiper": "^4.1.1", @@ -41,7 +41,7 @@ "babel-core": "7.0.0-bridge.0", "babel-eslint": "^10.1.0", "babel-jest": "^26.6.3", - "eslint": "^7.19.0", + "eslint": "^7.20.0", "eslint-config-prettier": "^7.2.0", "eslint-loader": "^4.0.2", "eslint-plugin-nuxt": "^2.0.0",