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/CHANGELOG.md b/CHANGELOG.md index f9753c1..a417f59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +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` ### Fixed 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: (