@thecb/components 7.11.0-beta.2 → 7.11.0-beta.4
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/dist/index.cjs.js +5 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +5 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/partial-amount-form/PartialAmountForm.js +7 -1
- package/src/components/molecules/partial-amount-form/PartialAmountForm.state.js +1 -0
package/dist/index.cjs.js
CHANGED
|
@@ -46529,11 +46529,14 @@ var PartialAmountForm = function PartialAmountForm(_ref) {
|
|
|
46529
46529
|
var errorMessages = amountErrors;
|
|
46530
46530
|
|
|
46531
46531
|
if (blockPartialPaymentOverpay) {
|
|
46532
|
+
console.log("item amount in form is", itemAmount);
|
|
46532
46533
|
var maxAmount = !maximum || itemAmount < maximum ? itemAmount : maximum;
|
|
46533
46534
|
var maxAmountError = "There is a maximum payment of ".concat(displayCurrency(maxAmount));
|
|
46534
|
-
|
|
46535
|
+
console.log("max amount in form is", maxAmount);
|
|
46536
|
+
return _objectSpread2(_objectSpread2({}, errorMessages), {}, _defineProperty({}, numberLessThanOrEqualTo.error, maxAmountError));
|
|
46535
46537
|
}
|
|
46536
46538
|
|
|
46539
|
+
console.log("error messages are", errorMessages);
|
|
46537
46540
|
return errorMessages;
|
|
46538
46541
|
};
|
|
46539
46542
|
|
|
@@ -46585,6 +46588,7 @@ var createPartialAmountFormState = function createPartialAmountFormState(lineIte
|
|
|
46585
46588
|
paymentMax = !maximum || item.amount < maximum ? item.amount : maximum;
|
|
46586
46589
|
}
|
|
46587
46590
|
|
|
46591
|
+
console.log("payment max is", paymentMax);
|
|
46588
46592
|
var validators = [required(), validateSum(numberGreaterThanOrEqualTo(minimum), lineItems.filter(function (lineItem) {
|
|
46589
46593
|
return lineItem != item;
|
|
46590
46594
|
}).reduce(function (acc, curr) {
|