@open-tender/store 1.0.1 → 1.0.2
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/.DS_Store +0 -0
- package/dist/cjs/slices/checkout.js +10 -9
- package/dist/esm/slices/checkout.js +10 -9
- package/package.json +1 -1
package/dist/.DS_Store
CHANGED
|
Binary file
|
|
@@ -625,15 +625,16 @@ var checkoutSlice = (0, toolkit_1.createSlice)({
|
|
|
625
625
|
state.error = action.payload;
|
|
626
626
|
})
|
|
627
627
|
.addCase(exports.submitPosOrder.fulfilled, function (state, action) {
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
628
|
+
if (action.payload) {
|
|
629
|
+
return tslib_1.__assign(tslib_1.__assign({}, initialState), { completedOrder: action.payload });
|
|
630
|
+
}
|
|
631
|
+
else {
|
|
632
|
+
state.check = null;
|
|
633
|
+
state.error = null;
|
|
634
|
+
state.loading = 'idle';
|
|
635
|
+
state.submitting = 'idle';
|
|
636
|
+
return;
|
|
637
|
+
}
|
|
637
638
|
})
|
|
638
639
|
.addCase(exports.submitPosOrder.pending, function (state) {
|
|
639
640
|
state.loading = 'pending';
|
|
@@ -622,15 +622,16 @@ var checkoutSlice = createSlice({
|
|
|
622
622
|
state.error = action.payload;
|
|
623
623
|
})
|
|
624
624
|
.addCase(submitPosOrder.fulfilled, function (state, action) {
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
625
|
+
if (action.payload) {
|
|
626
|
+
return __assign(__assign({}, initialState), { completedOrder: action.payload });
|
|
627
|
+
}
|
|
628
|
+
else {
|
|
629
|
+
state.check = null;
|
|
630
|
+
state.error = null;
|
|
631
|
+
state.loading = 'idle';
|
|
632
|
+
state.submitting = 'idle';
|
|
633
|
+
return;
|
|
634
|
+
}
|
|
634
635
|
})
|
|
635
636
|
.addCase(submitPosOrder.pending, function (state) {
|
|
636
637
|
state.loading = 'pending';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/store",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
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",
|