@propeller-commerce/propeller-v2-vue-ui 0.3.22 → 0.3.24
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/CHANGELOG.md +24 -0
- package/dist/composables/vue/useCheckout.d.ts +19 -0
- package/dist/index.cjs +7 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
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:
|
|
961
|
-
addPDFAttachment:
|
|
962
|
-
triggerOrderSendConfirmEvent:
|
|
963
|
-
deleteCart:
|
|
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 });
|