@open-tender/store 1.0.0 → 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 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
- state.check = null;
629
- state.completedOrder = action.payload || null;
630
- state.loading = 'idle';
631
- state.submitting = 'idle';
632
- state.error = null;
633
- // return {
634
- // ...initialState,
635
- // completedOrder: action.payload
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
- state.check = null;
626
- state.completedOrder = action.payload || null;
627
- state.loading = 'idle';
628
- state.submitting = 'idle';
629
- state.error = null;
630
- // return {
631
- // ...initialState,
632
- // completedOrder: action.payload
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.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",
@@ -58,7 +58,7 @@
58
58
  },
59
59
  "peerDependencies": {
60
60
  "@emotion/react": "^11.11.1",
61
- "@open-tender/types": "^0.4.19",
61
+ "@open-tender/types": "^0.4.20",
62
62
  "@open-tender/ui": "^0.1.21",
63
63
  "@open-tender/utils": "^0.4.6",
64
64
  "@reduxjs/toolkit": "^2.0.1",