@thecb/components 7.11.0-beta.2 → 7.11.0-beta.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": "@thecb/components",
3
- "version": "7.11.0-beta.2",
3
+ "version": "7.11.0-beta.3",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -41,12 +41,15 @@ const PartialAmountForm = ({
41
41
  const getPartialAmountFormErrors = (maximum, itemAmount) => {
42
42
  let errorMessages = amountErrors;
43
43
  if (blockPartialPaymentOverpay) {
44
+ console.log("item amount in form is", itemAmount);
44
45
  let maxAmount = !maximum || itemAmount < maximum ? itemAmount : maximum;
45
46
  const maxAmountError = `There is a maximum payment of ${displayCurrency(
46
47
  maxAmount
47
48
  )}`;
49
+ console.log("max amount in form is", maxAmount);
48
50
  errorMessages[numberLessThanOrEqualTo.error] = maxAmountError;
49
51
  }
52
+ console.log("error messages are", errorMessages);
50
53
  return errorMessages;
51
54
  };
52
55
 
@@ -21,6 +21,7 @@ export const createPartialAmountFormState = (
21
21
  if (blockPartialPaymentOverpay) {
22
22
  paymentMax = !maximum || item.amount < maximum ? item.amount : maximum;
23
23
  }
24
+ console.log("payment max is", paymentMax);
24
25
  const validators = [
25
26
  required(),
26
27
  validateSum(