From 7ed3d0b9629f56dfdada62f8cf274b68a5db417b Mon Sep 17 00:00:00 2001 From: mihainutiu-vtex Date: Thu, 15 Jun 2023 10:39:09 +0300 Subject: [PATCH 1/5] added price with tax without unit multiplier --- react/ListPrice.tsx | 11 +++++++++++ react/SellingPrice.tsx | 12 ++++++++++++ 2 files changed, 23 insertions(+) diff --git a/react/ListPrice.tsx b/react/ListPrice.tsx index 189afb4..43e08a1 100644 --- a/react/ListPrice.tsx +++ b/react/ListPrice.tsx @@ -12,6 +12,7 @@ const CSS_HANDLES = [ 'listPrice', 'listPriceValue', 'listPriceWithTax', + 'listPriceWithTaxWithoutUnit', 'listPriceWithUnitMultiplier', 'taxPercentage', 'taxValue', @@ -78,6 +79,8 @@ function ListPrice({ const hasMeasurementUnit = measurementUnit && measurementUnit !== 'un' const hasUnitMultiplier = unitMultiplier !== 1 + const listPriceWithTaxWithoutUnit = listPriceValue + (listPriceValue * taxPercentage / unitMultiplier) + if (listPriceValue <= sellingPriceValue) { return null } @@ -111,6 +114,14 @@ function ListPrice({ ), + listPriceWithTaxWithoutUnit: ( + + + + ), listPriceWithUnitMultiplier: ( ), + sellingPriceWithTaxWithoutUnit: ( + + + + ), sellingPriceWithUnitMultiplier: ( Date: Thu, 15 Jun 2023 11:04:24 +0300 Subject: [PATCH 2/5] updated changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cbabc1e..1033d7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] - +### Added +- `sellingPriceWithTaxWithoutUnit` and `listPriceWithTaxWithoutUnit` ## [1.31.0] - 2023-03-28 ### Added From f589796bfc613354eff53b7186240bbeada8af21 Mon Sep 17 00:00:00 2001 From: mihainutiu-vtex Date: Fri, 16 Jun 2023 10:59:44 +0300 Subject: [PATCH 3/5] fix lint --- .eslintrc | 4 +--- react/package.json | 11 ++--------- react/yarn.lock | 28 ---------------------------- 3 files changed, 3 insertions(+), 40 deletions(-) diff --git a/.eslintrc b/.eslintrc index 3ccd305..9713dfd 100644 --- a/.eslintrc +++ b/.eslintrc @@ -2,8 +2,6 @@ "extends": "vtex", "root": true, "env": { - "node": true, - "es6": true, - "jest": true + "node": true } } \ No newline at end of file diff --git a/react/package.json b/react/package.json index 284c19d..3520f48 100644 --- a/react/package.json +++ b/react/package.json @@ -23,14 +23,7 @@ "@vtex/tsconfig": "^0.2.0", "apollo-cache-inmemory": "^1.6.5", "graphql": "^14.5.8", - "typescript": "3.9.7", - "vtex.css-handles": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.css-handles@1.0.0/public/@types/vtex.css-handles", - "vtex.format-currency": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.format-currency@0.3.0/public/@types/vtex.format-currency", - "vtex.native-types": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.native-types@0.7.5/public/@types/vtex.native-types", - "vtex.product-context": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.product-context@0.9.9/public/@types/vtex.product-context", - "vtex.product-price": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.product-price@1.21.0/public/@types/vtex.product-price", - "vtex.product-summary-context": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.product-summary-context@0.7.1/public/@types/vtex.product-summary-context", - "vtex.render-runtime": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.render-runtime@8.128.4/public/@types/vtex.render-runtime" + "typescript": "3.9.7" }, "version": "1.31.0" -} +} \ No newline at end of file diff --git a/react/yarn.lock b/react/yarn.lock index 339e0b7..7df2ca2 100644 --- a/react/yarn.lock +++ b/react/yarn.lock @@ -4860,34 +4860,6 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" -"vtex.css-handles@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.css-handles@1.0.0/public/@types/vtex.css-handles": - version "1.0.0" - resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.css-handles@1.0.0/public/@types/vtex.css-handles#336b23ef3a9bcb2b809529ba736783acd405d081" - -"vtex.format-currency@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.format-currency@0.3.0/public/@types/vtex.format-currency": - version "0.3.0" - resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.format-currency@0.3.0/public/@types/vtex.format-currency#1cb7360452552301237c16d32037bbac61798f20" - -"vtex.native-types@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.native-types@0.7.5/public/@types/vtex.native-types": - version "0.7.5" - resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.native-types@0.7.5/public/@types/vtex.native-types#52d8c0b675fcdf2b6b1ca93f6a99a630519f618f" - -"vtex.product-context@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.product-context@0.9.9/public/@types/vtex.product-context": - version "0.9.9" - resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.product-context@0.9.9/public/@types/vtex.product-context#d9619a3365c1b04c1110c4beb11a53eae39aac75" - -"vtex.product-price@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.product-price@1.21.0/public/@types/vtex.product-price": - version "1.21.0" - resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.product-price@1.21.0/public/@types/vtex.product-price#2281b3a522da755e21bd0c8b688f56170db98c40" - -"vtex.product-summary-context@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.product-summary-context@0.7.1/public/@types/vtex.product-summary-context": - version "0.7.1" - resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.product-summary-context@0.7.1/public/@types/vtex.product-summary-context#f42fe085cf0486a11f3e2cba6f1ea1e9680d185c" - -"vtex.render-runtime@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.render-runtime@8.128.4/public/@types/vtex.render-runtime": - version "8.128.4" - resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.render-runtime@8.128.4/public/@types/vtex.render-runtime#63491782d44910c4edc8528bc645c7c335c33128" - w3c-hr-time@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd" From ad6410ba25322575f422ffb98cb95c83b7a51ec6 Mon Sep 17 00:00:00 2001 From: mihainutiu-vtex Date: Thu, 13 Jul 2023 14:01:51 +0300 Subject: [PATCH 4/5] reverted-typings-removal --- react/package.json | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/react/package.json b/react/package.json index 3520f48..284c19d 100644 --- a/react/package.json +++ b/react/package.json @@ -23,7 +23,14 @@ "@vtex/tsconfig": "^0.2.0", "apollo-cache-inmemory": "^1.6.5", "graphql": "^14.5.8", - "typescript": "3.9.7" + "typescript": "3.9.7", + "vtex.css-handles": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.css-handles@1.0.0/public/@types/vtex.css-handles", + "vtex.format-currency": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.format-currency@0.3.0/public/@types/vtex.format-currency", + "vtex.native-types": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.native-types@0.7.5/public/@types/vtex.native-types", + "vtex.product-context": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.product-context@0.9.9/public/@types/vtex.product-context", + "vtex.product-price": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.product-price@1.21.0/public/@types/vtex.product-price", + "vtex.product-summary-context": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.product-summary-context@0.7.1/public/@types/vtex.product-summary-context", + "vtex.render-runtime": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.render-runtime@8.128.4/public/@types/vtex.render-runtime" }, "version": "1.31.0" -} \ No newline at end of file +} From 4089ba1f5ee327709af0313d611d0ffbfce8baa2 Mon Sep 17 00:00:00 2001 From: mihainutiu-vtex Date: Thu, 13 Jul 2023 14:06:12 +0300 Subject: [PATCH 5/5] restored react yarn --- react/yarn.lock | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/react/yarn.lock b/react/yarn.lock index 7df2ca2..339e0b7 100644 --- a/react/yarn.lock +++ b/react/yarn.lock @@ -4860,6 +4860,34 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" +"vtex.css-handles@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.css-handles@1.0.0/public/@types/vtex.css-handles": + version "1.0.0" + resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.css-handles@1.0.0/public/@types/vtex.css-handles#336b23ef3a9bcb2b809529ba736783acd405d081" + +"vtex.format-currency@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.format-currency@0.3.0/public/@types/vtex.format-currency": + version "0.3.0" + resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.format-currency@0.3.0/public/@types/vtex.format-currency#1cb7360452552301237c16d32037bbac61798f20" + +"vtex.native-types@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.native-types@0.7.5/public/@types/vtex.native-types": + version "0.7.5" + resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.native-types@0.7.5/public/@types/vtex.native-types#52d8c0b675fcdf2b6b1ca93f6a99a630519f618f" + +"vtex.product-context@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.product-context@0.9.9/public/@types/vtex.product-context": + version "0.9.9" + resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.product-context@0.9.9/public/@types/vtex.product-context#d9619a3365c1b04c1110c4beb11a53eae39aac75" + +"vtex.product-price@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.product-price@1.21.0/public/@types/vtex.product-price": + version "1.21.0" + resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.product-price@1.21.0/public/@types/vtex.product-price#2281b3a522da755e21bd0c8b688f56170db98c40" + +"vtex.product-summary-context@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.product-summary-context@0.7.1/public/@types/vtex.product-summary-context": + version "0.7.1" + resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.product-summary-context@0.7.1/public/@types/vtex.product-summary-context#f42fe085cf0486a11f3e2cba6f1ea1e9680d185c" + +"vtex.render-runtime@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.render-runtime@8.128.4/public/@types/vtex.render-runtime": + version "8.128.4" + resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.render-runtime@8.128.4/public/@types/vtex.render-runtime#63491782d44910c4edc8528bc645c7c335c33128" + w3c-hr-time@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd"