@wearejh/m2-pwa-checkout 0.31.2 → 0.31.4
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
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.31.4](https://github.com/WeareJH/mage-mono/compare/v0.31.3...v0.31.4) (2025-06-03)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @wearejh/m2-pwa-checkout
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.31.3](https://github.com/WeareJH/mage-mono/compare/v0.31.2...v0.31.3) (2025-05-29)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **WOOD-1420:** Returning the entity id from the checkout epic ([df55a5b](https://github.com/WeareJH/mage-mono/commit/df55a5ba4d9ef184751c764111d93f181474fa56))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [0.31.2](https://github.com/WeareJH/mage-mono/compare/v0.31.1...v0.31.2) (2025-03-07)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @wearejh/m2-pwa-checkout
|
package/lib/checkout.actions.ts
CHANGED
|
@@ -85,7 +85,7 @@ type Messages = {
|
|
|
85
85
|
* The final action dispatched to show the
|
|
86
86
|
* checkout has completed.
|
|
87
87
|
*/
|
|
88
|
-
['Checkout.Complete']: { orderId: string };
|
|
88
|
+
['Checkout.Complete']: { orderId: string; entityId?: string };
|
|
89
89
|
|
|
90
90
|
['Checkout.SetPendingPayment']: PaymentPendingParams;
|
|
91
91
|
['Checkout.AttemptPaymentProcess']: { [index: string]: any };
|
package/lib/checkout.reducer.ts
CHANGED
|
@@ -44,6 +44,7 @@ export type CheckoutState = {
|
|
|
44
44
|
tempShippingAddress: CustomerDataAddressInterface | null;
|
|
45
45
|
messages: Message[];
|
|
46
46
|
orderId?: string | number | null;
|
|
47
|
+
entityId?: string | number | null;
|
|
47
48
|
pendingPayment: PaymentPendingParams | null;
|
|
48
49
|
totals: QuoteDataTotalsInterface | null;
|
|
49
50
|
};
|
|
@@ -216,6 +217,7 @@ export function checkoutReducer(state = initialState, action: Handler): Checkout
|
|
|
216
217
|
return {
|
|
217
218
|
...state,
|
|
218
219
|
orderId: action.payload.orderId,
|
|
220
|
+
entityId: action.payload.entityId,
|
|
219
221
|
};
|
|
220
222
|
}
|
|
221
223
|
|
|
@@ -39,7 +39,7 @@ export function getOrderIncrementId(action$: Observable<any>, state$: any, deps:
|
|
|
39
39
|
/**
|
|
40
40
|
* Payload OrderID as a number.
|
|
41
41
|
*/
|
|
42
|
-
const
|
|
42
|
+
const entityId = parseInt(payload.orderId);
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
45
|
* The Order increment ID for
|
|
@@ -54,17 +54,17 @@ export function getOrderIncrementId(action$: Observable<any>, state$: any, deps:
|
|
|
54
54
|
* - the same order id that the user receives in
|
|
55
55
|
* the order confirmation email.
|
|
56
56
|
*/
|
|
57
|
-
return getJHOrderIDQuery({ orderId }, deps).pipe(
|
|
57
|
+
return getJHOrderIDQuery({ orderId: entityId }, deps).pipe(
|
|
58
58
|
/**
|
|
59
59
|
* Handle the success response from the
|
|
60
60
|
* API query.
|
|
61
61
|
*/
|
|
62
62
|
mergeMap((response: any) => {
|
|
63
|
-
const
|
|
63
|
+
const incrementId = response.increment_id ?? null;
|
|
64
64
|
|
|
65
65
|
return of(
|
|
66
66
|
CheckoutMsg('Checkout.Complete', {
|
|
67
|
-
orderId,
|
|
67
|
+
orderId: incrementId,
|
|
68
68
|
}),
|
|
69
69
|
);
|
|
70
70
|
}),
|
|
@@ -85,7 +85,7 @@ export function getOrderIncrementId(action$: Observable<any>, state$: any, deps:
|
|
|
85
85
|
* The Order increment ID for
|
|
86
86
|
* Guest users.
|
|
87
87
|
*/
|
|
88
|
-
return getGuestJHOrderIDQuery({ entityId
|
|
88
|
+
return getGuestJHOrderIDQuery({ entityId }, deps).pipe(
|
|
89
89
|
/**
|
|
90
90
|
* Handle the success response from the
|
|
91
91
|
* API query.
|
|
@@ -100,6 +100,7 @@ export function getOrderIncrementId(action$: Observable<any>, state$: any, deps:
|
|
|
100
100
|
return of(
|
|
101
101
|
CheckoutMsg('Checkout.Complete', {
|
|
102
102
|
orderId: orderId ?? payload.orderId,
|
|
103
|
+
entityId: String(entityId),
|
|
103
104
|
}),
|
|
104
105
|
);
|
|
105
106
|
}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wearejh/m2-pwa-checkout",
|
|
3
|
-
"version": "0.31.
|
|
3
|
+
"version": "0.31.4",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "Shane Osbourne <shane.osbourne8@gmail.com>",
|
|
6
6
|
"homepage": "",
|
|
@@ -18,15 +18,15 @@
|
|
|
18
18
|
],
|
|
19
19
|
"scripts": {},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@wearejh/m2-pwa-addresses": "^0.31.
|
|
22
|
-
"@wearejh/m2-pwa-cart": "^0.31.
|
|
23
|
-
"@wearejh/m2-pwa-engine": "^0.31.
|
|
24
|
-
"@wearejh/m2-pwa-user": "^0.31.
|
|
25
|
-
"@wearejh/rx-form": "^0.31.
|
|
26
|
-
"@wearejh/swagger-rxjs": "^0.31.
|
|
21
|
+
"@wearejh/m2-pwa-addresses": "^0.31.4",
|
|
22
|
+
"@wearejh/m2-pwa-cart": "^0.31.4",
|
|
23
|
+
"@wearejh/m2-pwa-engine": "^0.31.4",
|
|
24
|
+
"@wearejh/m2-pwa-user": "^0.31.4",
|
|
25
|
+
"@wearejh/rx-form": "^0.31.4",
|
|
26
|
+
"@wearejh/swagger-rxjs": "^0.31.4"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@reach/dialog": "0.8.2"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "c27eb1e25a1dcead4870e3335562df3a9c2508c2"
|
|
32
32
|
}
|