@open-tender/cloud 0.4.51 → 0.4.444

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.
@@ -47,11 +47,13 @@ const assembleOrder = (orderData, save = false) => {
47
47
  const { deposit = null } = check || {};
48
48
  // const defaultTip = check ? getDefaultTip(check.config) : null
49
49
  const fullAddress = Object.assign(Object.assign({}, order.address), address);
50
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
51
+ const { customer_id } = customer, customerWithoutId = tslib_1.__rest(customer, ["customer_id"]);
50
52
  const data = {
51
53
  address: (0, utils_1.isEmpty)(fullAddress) ? null : fullAddress,
52
54
  cart: cart,
53
55
  cartId: groupOrder.cartId || null,
54
- customer,
56
+ customer: customerWithoutId,
55
57
  deposit,
56
58
  details,
57
59
  deviceType,
@@ -274,7 +276,9 @@ const checkoutSlice = (0, toolkit_1.createSlice)({
274
276
  extraReducers: builder => {
275
277
  builder
276
278
  .addCase(exports.validateOrder.fulfilled, (state, action) => {
277
- return Object.assign(Object.assign(Object.assign({}, state), action.payload), { loading: 'idle', error: null });
279
+ const newState = Object.assign(Object.assign(Object.assign({}, state), action.payload), { error: null });
280
+ newState.loading === 'idle';
281
+ return newState;
278
282
  })
279
283
  .addCase(exports.validateOrder.pending, state => {
280
284
  state.loading = 'pending';
@@ -1,4 +1,4 @@
1
- import { __awaiter } from "tslib";
1
+ import { __awaiter, __rest } from "tslib";
2
2
  import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
3
3
  import { contains, handleCheckoutError, isEmpty, isString, makeCheckError, makeFormErrorsNested, prepareOrder } from '@open-tender/utils';
4
4
  import { ReducerType } from './types';
@@ -43,11 +43,13 @@ const assembleOrder = (orderData, save = false) => {
43
43
  const { deposit = null } = check || {};
44
44
  // const defaultTip = check ? getDefaultTip(check.config) : null
45
45
  const fullAddress = Object.assign(Object.assign({}, order.address), address);
46
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
47
+ const { customer_id } = customer, customerWithoutId = __rest(customer, ["customer_id"]);
46
48
  const data = {
47
49
  address: isEmpty(fullAddress) ? null : fullAddress,
48
50
  cart: cart,
49
51
  cartId: groupOrder.cartId || null,
50
- customer,
52
+ customer: customerWithoutId,
51
53
  deposit,
52
54
  details,
53
55
  deviceType,
@@ -270,7 +272,9 @@ const checkoutSlice = createSlice({
270
272
  extraReducers: builder => {
271
273
  builder
272
274
  .addCase(validateOrder.fulfilled, (state, action) => {
273
- return Object.assign(Object.assign(Object.assign({}, state), action.payload), { loading: 'idle', error: null });
275
+ const newState = Object.assign(Object.assign(Object.assign({}, state), action.payload), { error: null });
276
+ newState.loading === 'idle';
277
+ return newState;
274
278
  })
275
279
  .addCase(validateOrder.pending, state => {
276
280
  state.loading = 'pending';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/cloud",
3
- "version": "0.4.51",
3
+ "version": "0.4.444",
4
4
  "description": "A library of hooks, reducers, utility functions, and types for use with Open Tender applications that utilize our cloud-based Order API.",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",