@propeller-commerce/propeller-v2-vue-ui 0.3.22 → 0.3.23

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
@@ -946,7 +946,9 @@ function useCheckout(options) {
946
946
  language
947
947
  });
948
948
  }
949
- const orderStatus = opts.isQuoteMode ? "REQUEST" : "NEW";
949
+ const orderStatus = opts.orderStatus ?? (opts.isQuoteMode ? "REQUEST" : "NEW");
950
+ const finalizeOrder = opts.finalizeOrder ?? true;
951
+ const sendConfirmation = finalizeOrder && !opts.isQuoteMode;
950
952
  const response = await cartService.processCart({
951
953
  id: cartId,
952
954
  input: { orderStatus, language }
@@ -957,10 +959,10 @@ function useCheckout(options) {
957
959
  orderId,
958
960
  status: orderStatus,
959
961
  payStatus: PaymentStatuses.OPEN,
960
- sendOrderConfirmationEmail: !opts.isQuoteMode,
961
- addPDFAttachment: !opts.isQuoteMode,
962
- triggerOrderSendConfirmEvent: !opts.isQuoteMode,
963
- deleteCart: true
962
+ sendOrderConfirmationEmail: sendConfirmation,
963
+ addPDFAttachment: sendConfirmation,
964
+ triggerOrderSendConfirmEvent: sendConfirmation,
965
+ deleteCart: finalizeOrder
964
966
  });
965
967
  if (opts.isQuoteMode) {
966
968
  await orderService.triggerQuoteSendRequest?.({ orderId, language });