New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

orderiom-api-package

Package Overview
Dependencies
Maintainers
1
Versions
230
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

orderiom-api-package - npm Package Compare versions

Comparing version 0.2.57 to 0.2.58

2

package.json
{
"name": "orderiom-api-package",
"version": "0.2.57",
"version": "0.2.58",
"description": "This package will install all necessary API calls for every orderiom restaurant",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -41,19 +41,19 @@ export const restaurantId = parseInt(process.env.VUE_APP_RESTAURANT_ID) || null;

export function updateBasket({commit}, basketId, res){
export function updateBasket({commit, basketId, res, isOutsideProduct}){
const basketInfo = res.data.data;
commit('product/setBasketInfo', basketInfo);
commit(`${isOutsideProduct ? 'product/' : ''}setBasketInfo`, basketInfo);
// TODO: why two separate states use same value?
commit('product/SetSubtotalPrice', basketInfo.totalPrice);
commit('product/SetTotalPrice', basketInfo.totalPrice);
commit(`${isOutsideProduct ? 'product/' : ''}SetSubtotalPrice`, basketInfo.totalPrice);
commit(`${isOutsideProduct ? 'product/' : ''}SetTotalPrice`, basketInfo.totalPrice);
commit('product/SetShoppingCart', basketInfo.products);
commit('product/setDeliveryTime', basketInfo.deliveryTime);
commit('product/setVoucherCode', basketInfo.voucher_code);
commit('product/setVoucherValue', basketInfo.voucherValue);
commit('product/setTotalWithDiscount', basketInfo.totalWithDiscount);
commit('product/setDelivertType', basketInfo.deliveryType);
commit('product/setPostalCode', basketInfo.postalCode);
commit('product/setTip', basketInfo.tip);
commit('product/setshippingPrice', basketInfo.shipping_price);
commit(`${isOutsideProduct ? 'product/' : ''}SetShoppingCart`, basketInfo.products);
commit(`${isOutsideProduct ? 'product/' : ''}setDeliveryTime`, basketInfo.deliveryTime);
commit(`${isOutsideProduct ? 'product/' : ''}setVoucherCode`, basketInfo.voucher_code);
commit(`${isOutsideProduct ? 'product/' : ''}setVoucherValue`, basketInfo.voucherValue);
commit(`${isOutsideProduct ? 'product/' : ''}setTotalWithDiscount`, basketInfo.totalWithDiscount);
commit(`${isOutsideProduct ? 'product/' : ''}setDelivertType`, basketInfo.deliveryType);
commit(`${isOutsideProduct ? 'product/' : ''}setPostalCode`, basketInfo.postalCode);
commit(`${isOutsideProduct ? 'product/' : ''}setTip`, basketInfo.tip);
commit(`${isOutsideProduct ? 'product/' : ''}setshippingPrice`, basketInfo.shipping_price);

@@ -71,4 +71,4 @@ if (parseInt(basketInfo.id) !== parseInt(basketId)) {

commit('product/basketLoadedOnce');
commit(`${isOutsideProduct ? 'product/' : ''}basketLoadedOnce`);
return true;
}

@@ -697,3 +697,3 @@ import axios from "axios";

},
editCartProductExtraInfo({rootState, commit}, {basketProductId, extraInfo}){
editCartProductExtraInfo({rootState, commit}, data){
let basketId = undefined;

@@ -709,6 +709,5 @@ try{

basketId,
basketProductId,
extraInfo
...data
}).then(res =>
updateBasket({commit}, basketId, res)
updateBasket({commit, basketId, res, isOutsideProduct: true})
).catch(

@@ -715,0 +714,0 @@ commonErrorCallback()

@@ -276,3 +276,3 @@ import axios from "axios";

}).then(res =>
updateBasket({commit}, basketId, res)
updateBasket({commit, basketId, res, isOutsideProduct: false})
).catch(error => {

@@ -279,0 +279,0 @@ console.error(error);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc