@woosmap/ui 4.226.1 → 4.226.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@woosmap/ui",
3
- "version": "4.226.1",
3
+ "version": "4.226.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/WebGeoServices/ui.git"
@@ -15,7 +15,7 @@ export default class PricingSlider extends Component {
15
15
 
16
16
  displayAmount = (amount) => {
17
17
  const { currency } = this.props;
18
- return currency === '€' ? `${amount}${currency}` : `${currency}${amount}`;
18
+ return currency === '€' ? `${amount.toFixed(2)}${currency}` : `${currency}${amount.toFixed(2)}`;
19
19
  };
20
20
 
21
21
  computeAmount = (pricing, queries) => {
@@ -38,7 +38,7 @@ export default class PricingSlider extends Component {
38
38
  } else {
39
39
  const valueToRemove = Math.min(tier[0], q);
40
40
  q -= valueToRemove;
41
- return amount + (valueToRemove / 1000) * tier[1] * coef;
41
+ return amount + ((valueToRemove / 1000) * tier[1]) / coef;
42
42
  }
43
43
  return Math.floor(amount);
44
44
  }, 0);
@@ -180,14 +180,14 @@ export default class PricingSlider extends Component {
180
180
  return (
181
181
  <tr>
182
182
  <td>{`${numeral(lower).format('0.[0]a')}+`}</td>
183
- <td>{this.displayAmount(tier[1]) / coef}</td>
183
+ <td>{this.displayAmount(tier[1] / coef)}</td>
184
184
  </tr>
185
185
  );
186
186
  }
187
187
  return (
188
188
  <tr>
189
189
  <td>{`${numeral(lower).format('0.[0]a')} to ${numeral(tier[0]).format('0.[0]a')}`}</td>
190
- <td>{this.displayAmount(tier[1])}</td>
190
+ <td>{this.displayAmount(tier[1] / coef)}</td>
191
191
  </tr>
192
192
  );
193
193
  })}