@open-tender/store 1.1.275 → 1.1.276
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.
|
@@ -521,13 +521,17 @@ var checkoutSlice = (0, toolkit_1.createSlice)({
|
|
|
521
521
|
var id = action.payload.id;
|
|
522
522
|
var discountIndex = action.payload.index;
|
|
523
523
|
var discount = state.check
|
|
524
|
-
? state.check.discounts.find(function (item
|
|
524
|
+
? state.check.discounts.find(function (item) {
|
|
525
|
+
return item.id === id && item.index === discountIndex;
|
|
526
|
+
})
|
|
525
527
|
: null;
|
|
526
528
|
if (discount && discount.discount_type === 'LOYALTY') {
|
|
527
529
|
state.points = [];
|
|
528
530
|
}
|
|
529
531
|
else {
|
|
530
|
-
state.discounts = state.discounts.filter(function (item
|
|
532
|
+
state.discounts = state.discounts.filter(function (item) {
|
|
533
|
+
return item.id !== id && item.index !== discountIndex;
|
|
534
|
+
});
|
|
531
535
|
}
|
|
532
536
|
},
|
|
533
537
|
addTax: function (state, action) {
|
|
@@ -517,13 +517,17 @@ var checkoutSlice = createSlice({
|
|
|
517
517
|
var id = action.payload.id;
|
|
518
518
|
var discountIndex = action.payload.index;
|
|
519
519
|
var discount = state.check
|
|
520
|
-
? state.check.discounts.find(function (item
|
|
520
|
+
? state.check.discounts.find(function (item) {
|
|
521
|
+
return item.id === id && item.index === discountIndex;
|
|
522
|
+
})
|
|
521
523
|
: null;
|
|
522
524
|
if (discount && discount.discount_type === 'LOYALTY') {
|
|
523
525
|
state.points = [];
|
|
524
526
|
}
|
|
525
527
|
else {
|
|
526
|
-
state.discounts = state.discounts.filter(function (item
|
|
528
|
+
state.discounts = state.discounts.filter(function (item) {
|
|
529
|
+
return item.id !== id && item.index !== discountIndex;
|
|
530
|
+
});
|
|
527
531
|
}
|
|
528
532
|
},
|
|
529
533
|
addTax: function (state, action) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/store",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.276",
|
|
4
4
|
"description": "A library of hooks, reducers, utility functions, and types for use with Open Tender applications that utilize our in-store POS API",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|