@akinon/next 1.60.0-rc.19 → 1.60.0-rc.21
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 +12 -0
- package/data/client/account.ts +3 -2
- package/data/urls.ts +9 -3
- package/package.json +2 -2
- package/redux/middlewares/checkout.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @akinon/next
|
|
2
2
|
|
|
3
|
+
## 1.60.0-rc.21
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 663bda9b: ZERO-2990: Refactor account API to include shipping option slug in getOrders query
|
|
8
|
+
|
|
9
|
+
## 1.60.0-rc.20
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- Revert ZERO-2938
|
|
14
|
+
|
|
3
15
|
## 1.60.0-rc.19
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/data/client/account.ts
CHANGED
|
@@ -21,6 +21,7 @@ interface GetOrdersParams {
|
|
|
21
21
|
page?: number;
|
|
22
22
|
createdDate?: string;
|
|
23
23
|
endDate?: string;
|
|
24
|
+
shipping_option_slug?: string;
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
export interface GetQuotationsResponse {
|
|
@@ -114,9 +115,9 @@ const accountApi = api.injectEndpoints({
|
|
|
114
115
|
query: (id) => buildClientRequestUrl(account.orderId(id))
|
|
115
116
|
}),
|
|
116
117
|
getOrders: builder.query<GetOrdersResponse, GetOrdersParams>({
|
|
117
|
-
query: ({ page, limit, createdDate, endDate } = {}) =>
|
|
118
|
+
query: ({ page, limit, createdDate, endDate, shipping_option_slug } = {}) =>
|
|
118
119
|
buildClientRequestUrl(
|
|
119
|
-
account.getOrders({ page, limit, createdDate, endDate })
|
|
120
|
+
account.getOrders({ page, limit, createdDate, endDate, shipping_option_slug })
|
|
120
121
|
)
|
|
121
122
|
}),
|
|
122
123
|
getQuotations: builder.query<GetQuotationsResponse, GetQuotationsParams>({
|
package/data/urls.ts
CHANGED
|
@@ -17,16 +17,22 @@ export const account = {
|
|
|
17
17
|
page,
|
|
18
18
|
limit,
|
|
19
19
|
createdDate,
|
|
20
|
-
endDate
|
|
20
|
+
endDate,
|
|
21
|
+
shipping_option_slug
|
|
21
22
|
}: {
|
|
22
23
|
page?: number;
|
|
23
24
|
limit?: number;
|
|
24
25
|
createdDate?: string;
|
|
25
26
|
endDate?: string;
|
|
27
|
+
shipping_option_slug?: string;
|
|
26
28
|
}) =>
|
|
27
|
-
`/users/orders/?page=${page || 1}&limit=${limit || 12}
|
|
29
|
+
`/users/orders/?page=${page || 1}&limit=${limit || 12}${
|
|
28
30
|
createdDate ? `&created_date__gte=${createdDate}` : ''
|
|
29
|
-
}
|
|
31
|
+
}${endDate ? `&created_date__lte=${endDate}` : ''}${
|
|
32
|
+
shipping_option_slug
|
|
33
|
+
? `&shipping_option_slug=${shipping_option_slug}`
|
|
34
|
+
: ''
|
|
35
|
+
}`,
|
|
30
36
|
getQuotations: (page?: number, status?: string, limit?: number) =>
|
|
31
37
|
`/b2b/my-quotations/?page=${page || 1}` +
|
|
32
38
|
(status ? `&status=${status}` : '') +
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akinon/next",
|
|
3
3
|
"description": "Core package for Project Zero Next",
|
|
4
|
-
"version": "1.60.0-rc.
|
|
4
|
+
"version": "1.60.0-rc.21",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"bin": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"set-cookie-parser": "2.6.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@akinon/eslint-plugin-projectzero": "1.60.0-rc.
|
|
33
|
+
"@akinon/eslint-plugin-projectzero": "1.60.0-rc.21",
|
|
34
34
|
"@types/react-redux": "7.1.30",
|
|
35
35
|
"@types/set-cookie-parser": "2.4.7",
|
|
36
36
|
"@typescript-eslint/eslint-plugin": "6.7.4",
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
import { RootState, TypedDispatch } from 'redux/store';
|
|
25
25
|
import { checkoutApi } from '../../data/client/checkout';
|
|
26
26
|
import { CheckoutContext, PreOrder } from '../../types';
|
|
27
|
-
import { getCookie } from '../../utils';
|
|
27
|
+
import { getCookie, setCookie } from '../../utils';
|
|
28
28
|
import settings from 'settings';
|
|
29
29
|
import { LocaleUrlStrategy } from '../../localization';
|
|
30
30
|
import { showMobile3dIframe } from '../../utils/mobile-3d-iframe';
|