@open-tender/utils 0.5.51 → 0.5.52
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/cjs/utils/cart.js +2 -0
- package/dist/esm/utils/cart.js +2 -0
- package/package.json +1 -1
package/dist/cjs/utils/cart.js
CHANGED
|
@@ -746,6 +746,7 @@ const validateCart = (cart, categories, soldOut, requestedAt) => {
|
|
|
746
746
|
const missingOptions = [];
|
|
747
747
|
const invalidOptions = [];
|
|
748
748
|
const newGroups = makeGroupsLookup(newItem);
|
|
749
|
+
console.log('newGroups');
|
|
749
750
|
// check if any required groups for the new item are missing from the old item
|
|
750
751
|
const newRequiredGroups = Object.values(newGroups).filter(i => i.min > 0);
|
|
751
752
|
const oldGroupIds = (_a = oldItem.groups) === null || _a === void 0 ? void 0 : _a.map(i => i.id);
|
|
@@ -771,6 +772,7 @@ const validateCart = (cart, categories, soldOut, requestedAt) => {
|
|
|
771
772
|
else {
|
|
772
773
|
const updatedOptions = group.options.map(option => {
|
|
773
774
|
let newOption = newGroup.options[option.id];
|
|
775
|
+
console.log('newOption', newOption);
|
|
774
776
|
if (!newOption) {
|
|
775
777
|
console.log('checking pos_ext_id for option match');
|
|
776
778
|
const allOptions = Object.values(newGroup.options);
|
package/dist/esm/utils/cart.js
CHANGED
|
@@ -710,6 +710,7 @@ export const validateCart = (cart, categories, soldOut, requestedAt) => {
|
|
|
710
710
|
const missingOptions = [];
|
|
711
711
|
const invalidOptions = [];
|
|
712
712
|
const newGroups = makeGroupsLookup(newItem);
|
|
713
|
+
console.log('newGroups');
|
|
713
714
|
// check if any required groups for the new item are missing from the old item
|
|
714
715
|
const newRequiredGroups = Object.values(newGroups).filter(i => i.min > 0);
|
|
715
716
|
const oldGroupIds = (_a = oldItem.groups) === null || _a === void 0 ? void 0 : _a.map(i => i.id);
|
|
@@ -735,6 +736,7 @@ export const validateCart = (cart, categories, soldOut, requestedAt) => {
|
|
|
735
736
|
else {
|
|
736
737
|
const updatedOptions = group.options.map(option => {
|
|
737
738
|
let newOption = newGroup.options[option.id];
|
|
739
|
+
console.log('newOption', newOption);
|
|
738
740
|
if (!newOption) {
|
|
739
741
|
console.log('checking pos_ext_id for option match');
|
|
740
742
|
const allOptions = Object.values(newGroup.options);
|
package/package.json
CHANGED