@salesgenterp/ui-components 0.4.447 → 0.4.448

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/index.js CHANGED
@@ -12574,11 +12574,8 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
12574
12574
  styles = _ref.styles,
12575
12575
  cartData = _ref.cartData,
12576
12576
  handleLogin = _ref.handleLogin,
12577
- placeOrder = _ref.placeOrder,
12578
12577
  clickRedirect = _ref.clickRedirect,
12579
- shippingText = _ref.shippingText,
12580
- _ref$enableSalesOrder = _ref.enableSalesOrder,
12581
- enableSalesOrder = _ref$enableSalesOrder === void 0 ? false : _ref$enableSalesOrder;
12578
+ shippingText = _ref.shippingText;
12582
12579
  var _useAllSystemFeatureV = useAllSystemFeatureValues({
12583
12580
  apiEndPoint: apiEndPoint,
12584
12581
  token: token
@@ -12794,7 +12791,7 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
12794
12791
  var _taxAmount2 = 0;
12795
12792
  var _couponDiscountTotal = 0;
12796
12793
  var _temp12 = function (_cartData$cartLineIte) {
12797
- if (taxExempt && shippingAddressId && (cartData === null || cartData === void 0 ? void 0 : (_cartData$cartLineIte = cartData.cartLineItemDtoList) === null || _cartData$cartLineIte === void 0 ? void 0 : _cartData$cartLineIte.length) > 0) {
12794
+ if (shippingAddressId && (cartData === null || cartData === void 0 ? void 0 : (_cartData$cartLineIte = cartData.cartLineItemDtoList) === null || _cartData$cartLineIte === void 0 ? void 0 : _cartData$cartLineIte.length) > 0) {
12798
12795
  var _temp9 = _catch(function () {
12799
12796
  return Promise.resolve(API({
12800
12797
  apiEndPoint: apiEndPoint,
@@ -12943,11 +12940,11 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
12943
12940
  };
12944
12941
  var onPlaceOrder = function onPlaceOrder(note, transactionId) {
12945
12942
  try {
12946
- var _temp21 = function _temp21() {
12943
+ var _temp20 = function _temp20() {
12947
12944
  setOrdering(false);
12948
12945
  };
12949
12946
  setOrdering(true);
12950
- var _temp20 = _catch(function () {
12947
+ var _temp19 = _catch(function () {
12951
12948
  var authorizeCustomerCardData = {
12952
12949
  authorizeDotNetCustomerProfileId: selectedPaymentMethod === null || selectedPaymentMethod === void 0 ? void 0 : selectedPaymentMethod.authorizeDotNetCustomerProfileId,
12953
12950
  authorizeDotNetCustomerPaymentProfileId: selectedPaymentMethod === null || selectedPaymentMethod === void 0 ? void 0 : selectedPaymentMethod.authorizeDotNetCustomerPaymentProfileId
@@ -13024,29 +13021,17 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
13024
13021
  }, authorizeCustomerCardData)];
13025
13022
  }
13026
13023
  var paymentDtoList = orderPaymentList;
13027
- var body = {
13028
- orderDto: orderDto,
13029
- paymentDtoList: paymentDtoList,
13030
- discountCouponList: discountCoupons
13031
- };
13032
13024
  var salesOrderDtoBody = {
13033
13025
  salesOrderDto: orderDto,
13034
13026
  salesOrderPaymentDtoList: paymentDtoList,
13035
13027
  discountCouponList: discountCoupons
13036
13028
  };
13037
13029
  if (ecommerceCustomPaymentDto) {
13038
- body.ecommerceCustomPaymentDto;
13030
+ salesOrderDtoBody.ecommerceCustomPaymentDto;
13039
13031
  }
13040
- var _temp19 = function () {
13041
- if (enableSalesOrder) {
13042
- return Promise.resolve(createSalesOrder(salesOrderDtoBody)).then(function () {});
13043
- } else {
13044
- return Promise.resolve(placeOrder(body)).then(function () {});
13045
- }
13046
- }();
13047
- if (_temp19 && _temp19.then) return _temp19.then(function () {});
13032
+ return Promise.resolve(createSalesOrder(salesOrderDtoBody)).then(function () {});
13048
13033
  }, function () {});
13049
- return Promise.resolve(_temp20 && _temp20.then ? _temp20.then(_temp21) : _temp21(_temp20));
13034
+ return Promise.resolve(_temp19 && _temp19.then ? _temp19.then(_temp20) : _temp20(_temp19));
13050
13035
  } catch (e) {
13051
13036
  return Promise.reject(e);
13052
13037
  }