@salesgenterp/ui-components 0.4.526 → 0.4.527

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
@@ -12840,7 +12840,8 @@ var Step4 = function Step4(_ref) {
12840
12840
  orderTotal = _ref.orderTotal,
12841
12841
  paymentWithPaypal = _ref.paymentWithPaypal,
12842
12842
  selectedPaymentMethod = _ref.selectedPaymentMethod,
12843
- doNotShowPrice = _ref.doNotShowPrice;
12843
+ doNotShowPrice = _ref.doNotShowPrice,
12844
+ doNotPlaceOrder = _ref.doNotPlaceOrder;
12844
12845
  var _React$useState = React__default.useState(false),
12845
12846
  checked = _React$useState[0],
12846
12847
  setChecked = _React$useState[1];
@@ -13157,8 +13158,12 @@ var Step4 = function Step4(_ref) {
13157
13158
  onClick: function onClick(e) {
13158
13159
  try {
13159
13160
  e.preventDefault();
13160
- var _temp2 = function () {
13161
+ return Promise.resolve(function () {
13161
13162
  if (checked) {
13163
+ if (doNotPlaceOrder) {
13164
+ alert('Cannot place the order, please contact the support.');
13165
+ return;
13166
+ }
13162
13167
  var _temp = function (_customer$customerDto) {
13163
13168
  if (taxExempt && !(customer !== null && customer !== void 0 && (_customer$customerDto = customer.customerDto) !== null && _customer$customerDto !== void 0 && _customer$customerDto.taxable) && shippingInformation !== null && shippingInformation !== void 0 && shippingInformation.id) {
13164
13169
  setOpenConsentForm(true);
@@ -13170,8 +13175,7 @@ var Step4 = function Step4(_ref) {
13170
13175
  } else {
13171
13176
  alert('please accept the privacy policy');
13172
13177
  }
13173
- }();
13174
- return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
13178
+ }());
13175
13179
  } catch (e) {
13176
13180
  return Promise.reject(e);
13177
13181
  }
@@ -13239,7 +13243,9 @@ var CheckoutPageComponentWrapper = function CheckoutPageComponentWrapper(_ref) {
13239
13243
  placeQuotation = _ref$placeQuotation === void 0 ? false : _ref$placeQuotation,
13240
13244
  _ref$disabledAddAddre = _ref.disabledAddAddressOption,
13241
13245
  disabledAddAddressOption = _ref$disabledAddAddre === void 0 ? false : _ref$disabledAddAddre,
13242
- beforeAddNewCardText = _ref.beforeAddNewCardText;
13246
+ beforeAddNewCardText = _ref.beforeAddNewCardText,
13247
+ _ref$doNotPlaceOrder = _ref.doNotPlaceOrder,
13248
+ doNotPlaceOrder = _ref$doNotPlaceOrder === void 0 ? false : _ref$doNotPlaceOrder;
13243
13249
  var _useAllSystemFeatureV = useAllSystemFeatureValues({
13244
13250
  apiEndPoint: apiEndPoint,
13245
13251
  token: token
@@ -14024,7 +14030,8 @@ var CheckoutPageComponentWrapper = function CheckoutPageComponentWrapper(_ref) {
14024
14030
  orderTotal: orderTotal,
14025
14031
  paymentWithPaypal: paymentWithPaypal,
14026
14032
  selectedPaymentMethod: selectedPaymentMethod,
14027
- doNotShowPrice: doNotShowPrice
14033
+ doNotShowPrice: doNotShowPrice,
14034
+ doNotPlaceOrder: doNotPlaceOrder
14028
14035
  })));
14029
14036
  }))))), /*#__PURE__*/React__default.createElement(CheckoutSummary, {
14030
14037
  billingInformation: customer === null || customer === void 0 ? void 0 : (_customer$customerDto13 = customer.customerDto) === null || _customer$customerDto13 === void 0 ? void 0 : (_customer$customerDto14 = _customer$customerDto13.customerStoreAddressList) === null || _customer$customerDto14 === void 0 ? void 0 : _customer$customerDto14.find(function (item) {