@faststore/core 3.50.4 → 3.51.0
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/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +23 -23
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/cache/config.json +3 -3
- package/.next/cache/webpack/client-production/0.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/prerender-manifest.js +1 -1
- package/.next/prerender-manifest.json +1 -1
- package/.next/react-loadable-manifest.json +1 -1
- package/.next/routes-manifest.json +1 -1
- package/.next/server/chunks/6011.js +1 -1
- package/.next/server/chunks/9563.js +2 -2
- package/.next/server/functions-config-manifest.json +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/account/orders.js +1 -1
- package/.next/server/pages/api/graphql.js +2 -2
- package/.next/server/pages/en-US/404.html +2 -2
- package/.next/server/pages/en-US/500.html +2 -2
- package/.next/server/pages/en-US/account/403.html +2 -2
- package/.next/server/pages/en-US/account/404.html +2 -2
- package/.next/server/pages/en-US/checkout.html +2 -2
- package/.next/server/pages/en-US/login.html +2 -2
- package/.next/server/pages/en-US/s.html +2 -2
- package/.next/server/pages/en-US.html +2 -2
- package/.next/server/pages-manifest.json +1 -1
- package/.next/static/chunks/{1552.2705dd1ff3aee879.js → 1552.8751332da83cadc5.js} +1 -1
- package/.next/static/chunks/pages/account/orders-d4751ce0296dd64c.js +1 -0
- package/.next/static/chunks/{webpack-17a0c2c20bc27381.js → webpack-100cd28c010132c0.js} +1 -1
- package/.next/static/css/24ae9ad548165362.css +1 -0
- package/.next/static/{EjyPo46Od95M3lhE5NxOK → l_OKvtuRMknVS0oTb5aLb}/_buildManifest.js +1 -1
- package/.next/trace +129 -129
- package/.turbo/turbo-build.log +10 -10
- package/.turbo/turbo-test.log +5 -6
- package/@generated/gql.ts +2 -2
- package/@generated/graphql.ts +10 -14
- package/@generated/persisted-documents.json +1 -1
- package/@generated/schema.graphql +5 -7
- package/CHANGELOG.md +6 -0
- package/package.json +3 -3
- package/src/components/account/orders/MyAccountListOrders/MyAccountListOrdersTable/MyAccountListOrdersTable.tsx +145 -88
- package/src/components/account/orders/MyAccountListOrders/MyAccountListOrdersTable/styles.scss +29 -21
- package/src/pages/account/orders/index.tsx +2 -4
- package/.next/static/chunks/pages/account/orders-300ed6a6b5a819d8.js +0 -1
- package/.next/static/css/3aa693541804727c.css +0 -1
- /package/.next/static/{EjyPo46Od95M3lhE5NxOK → l_OKvtuRMknVS0oTb5aLb}/_ssgManifest.js +0 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
|
|
2
|
-
> @faststore/core@3.50.
|
|
2
|
+
> @faststore/core@3.50.4 prebuild /home/runner/work/faststore/faststore/packages/core
|
|
3
3
|
> na run partytown && na run generate
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @faststore/core@3.50.
|
|
6
|
+
> @faststore/core@3.50.4 partytown /home/runner/work/faststore/faststore/packages/core
|
|
7
7
|
> partytown copylib ./public/~partytown
|
|
8
8
|
|
|
9
9
|
Partytown lib copied to: /home/runner/work/faststore/faststore/packages/core/public/~partytown
|
|
10
10
|
|
|
11
|
-
> @faststore/core@3.50.
|
|
11
|
+
> @faststore/core@3.50.4 generate /home/runner/work/faststore/faststore/packages/core
|
|
12
12
|
> na run generate:schema && na run generate:codegen && na run format:generated
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
> @faststore/core@3.50.
|
|
15
|
+
> @faststore/core@3.50.4 generate:schema /home/runner/work/faststore/faststore/packages/core
|
|
16
16
|
> tsx src/server/generator/generateGraphQLSchemaFile.ts
|
|
17
17
|
|
|
18
18
|
Schema GraphQL file generated successfully
|
|
19
19
|
|
|
20
|
-
> @faststore/core@3.50.
|
|
20
|
+
> @faststore/core@3.50.4 generate:codegen /home/runner/work/faststore/faststore/packages/core
|
|
21
21
|
> graphql-codegen
|
|
22
22
|
|
|
23
23
|
[STARTED] Parse Configuration
|
|
@@ -37,11 +37,11 @@ Running lifecycle hook "afterStart" scripts...
|
|
|
37
37
|
[CLI] Loading Documents
|
|
38
38
|
[CLI] Generating output
|
|
39
39
|
|
|
40
|
-
> @faststore/core@3.50.
|
|
40
|
+
> @faststore/core@3.50.4 format:generated /home/runner/work/faststore/faststore/packages/core
|
|
41
41
|
> prettier --write "@generated/**/*.{ts,js,tsx,jsx,json}" --loglevel error
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
> @faststore/core@3.50.
|
|
44
|
+
> @faststore/core@3.50.4 build /home/runner/work/faststore/faststore/packages/core
|
|
45
45
|
> next build
|
|
46
46
|
|
|
47
47
|
⚠ No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
|
|
@@ -83,8 +83,8 @@ Route (pages) Size First Load JS
|
|
|
83
83
|
├ └ css/b7bba8fce075688b.css 4.2 kB
|
|
84
84
|
├ ● /account/404 2.03 kB 130 kB
|
|
85
85
|
├ └ css/5347dbc8b71de47d.css 4.25 kB
|
|
86
|
-
├ λ /account/orders 8.
|
|
87
|
-
├ └ css/
|
|
86
|
+
├ λ /account/orders 8.71 kB 137 kB
|
|
87
|
+
├ └ css/24ae9ad548165362.css 11.8 kB
|
|
88
88
|
├ λ /account/orders/[id] 10.1 kB 138 kB
|
|
89
89
|
├ └ css/506442c818624bd2.css 11.5 kB
|
|
90
90
|
├ λ /account/profile 1.27 kB 129 kB
|
|
@@ -101,7 +101,7 @@ Route (pages) Size First Load JS
|
|
|
101
101
|
├ chunks/framework-807b0f81cbc129f0.js 45.4 kB
|
|
102
102
|
├ chunks/main-f658704b53a96ab1.js 33.1 kB
|
|
103
103
|
├ chunks/pages/_app-eb6edb0ba4b4be67.js 16.3 kB
|
|
104
|
-
├ chunks/webpack-
|
|
104
|
+
├ chunks/webpack-100cd28c010132c0.js 3.7 kB
|
|
105
105
|
└ css/0a57ee6c7a57788c.css 3.49 kB
|
|
106
106
|
|
|
107
107
|
λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
|
|
2
|
-
> @faststore/core@3.50.
|
|
2
|
+
> @faststore/core@3.50.4 test /home/runner/work/faststore/faststore/packages/core
|
|
3
3
|
> jest
|
|
4
4
|
|
|
5
|
-
PASS test/
|
|
6
|
-
PASS test/
|
|
5
|
+
PASS test/utils/multipleTemplates.test.ts (24.95 s)
|
|
6
|
+
PASS test/server/cms/global.test.ts (25.773 s)
|
|
7
7
|
PASS test/server/cms/index.test.ts
|
|
8
|
-
PASS test/server/index.test.ts (
|
|
9
|
-
A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find leaks. Active timers can also cause this, ensure that .unref() was called on them.
|
|
8
|
+
PASS test/server/index.test.ts (30.782 s)
|
|
10
9
|
|
|
11
10
|
Test Suites: 4 passed, 4 total
|
|
12
11
|
Tests: 22 passed, 22 total
|
|
13
12
|
Snapshots: 0 total
|
|
14
|
-
Time:
|
|
13
|
+
Time: 32.091 s
|
|
15
14
|
Ran all test suites.
|
package/@generated/gql.ts
CHANGED
|
@@ -44,7 +44,7 @@ const documents = {
|
|
|
44
44
|
types.UserOrderItemsFragmentFragmentDoc,
|
|
45
45
|
'\n query ServerOrderDetailsQuery($orderId: String!) {\n userOrder(orderId: $orderId) {\n orderId\n status\n statusDescription\n allowCancellation\n storePreferencesData {\n currencyCode\n }\n clientProfileData {\n firstName\n lastName\n email\n phone\n corporateName\n isCorporate\n }\n customFields {\n type\n id\n fields {\n name\n value\n refId\n }\n }\n deliveryOptionsData {\n deliveryOptions {\n selectedSla\n deliveryChannel\n deliveryCompany\n deliveryWindow {\n startDateUtc\n endDateUtc\n price\n }\n shippingEstimate\n shippingEstimateDate\n friendlyShippingEstimate\n friendlyDeliveryOptionName\n seller\n address {\n addressType\n receiverName\n addressId\n versionId\n entityId\n postalCode\n city\n state\n country\n street\n number\n neighborhood\n complement\n reference\n geoCoordinates\n }\n pickupStoreInfo {\n additionalInfo\n address {\n addressType\n receiverName\n addressId\n versionId\n entityId\n postalCode\n city\n state\n country\n street\n number\n neighborhood\n complement\n reference\n geoCoordinates\n }\n dockId\n friendlyName\n isPickupStore\n }\n quantityOfDifferentItems\n total\n items {\n id\n name\n quantity\n price\n imageUrl\n tax\n total\n }\n }\n contact {\n email\n phone\n name\n }\n }\n paymentData {\n transactions {\n isActive\n payments {\n id\n paymentSystemName\n value\n installments\n referenceValue\n lastDigits\n url\n group\n tid\n connectorResponses {\n authId\n }\n bankIssuedInvoiceIdentificationNumber\n redemptionCode\n paymentOrigin\n }\n }\n }\n totals {\n id\n name\n value\n }\n }\n }\n':
|
|
46
46
|
types.ServerOrderDetailsQueryDocument,
|
|
47
|
-
'\n query ServerListOrdersQuery ($page: Int,$perPage: Int, $status: [String], $dateInitial: String, $dateFinal: String, $text: String, $clientEmail: String) {\n listUserOrders (page: $page, perPage: $perPage, status: $status, dateInitial: $dateInitial, dateFinal: $dateFinal, text: $text, clientEmail: $clientEmail) {\n list {\n orderId\n creationDate\n clientName\n items {\n seller\n quantity\n description\n ean\n refId\n id\n productId\n sellingPrice\n price\n }\n totalValue\n status\n statusDescription\n ShippingEstimatedDate\n currencyCode\n customFields {\n
|
|
47
|
+
'\n query ServerListOrdersQuery ($page: Int,$perPage: Int, $status: [String], $dateInitial: String, $dateFinal: String, $text: String, $clientEmail: String) {\n listUserOrders (page: $page, perPage: $perPage, status: $status, dateInitial: $dateInitial, dateFinal: $dateFinal, text: $text, clientEmail: $clientEmail) {\n list {\n orderId\n creationDate\n clientName\n items {\n seller\n quantity\n description\n ean\n refId\n id\n productId\n sellingPrice\n price\n }\n totalValue\n status\n statusDescription\n ShippingEstimatedDate\n currencyCode\n customFields {\n type\n value\n }\n }\n paging {\n total\n pages\n currentPage\n perPage\n }\n }\n }\n':
|
|
48
48
|
types.ServerListOrdersQueryDocument,
|
|
49
49
|
'\n mutation CancelOrderMutation($data: IUserOrderCancel!) {\n cancelOrder(data: $data) {\n data\n }\n }\n':
|
|
50
50
|
types.CancelOrderMutationDocument,
|
|
@@ -176,7 +176,7 @@ export function gql(
|
|
|
176
176
|
* The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
177
177
|
*/
|
|
178
178
|
export function gql(
|
|
179
|
-
source: '\n query ServerListOrdersQuery ($page: Int,$perPage: Int, $status: [String], $dateInitial: String, $dateFinal: String, $text: String, $clientEmail: String) {\n listUserOrders (page: $page, perPage: $perPage, status: $status, dateInitial: $dateInitial, dateFinal: $dateFinal, text: $text, clientEmail: $clientEmail) {\n list {\n orderId\n creationDate\n clientName\n items {\n seller\n quantity\n description\n ean\n refId\n id\n productId\n sellingPrice\n price\n }\n totalValue\n status\n statusDescription\n ShippingEstimatedDate\n currencyCode\n customFields {\n
|
|
179
|
+
source: '\n query ServerListOrdersQuery ($page: Int,$perPage: Int, $status: [String], $dateInitial: String, $dateFinal: String, $text: String, $clientEmail: String) {\n listUserOrders (page: $page, perPage: $perPage, status: $status, dateInitial: $dateInitial, dateFinal: $dateFinal, text: $text, clientEmail: $clientEmail) {\n list {\n orderId\n creationDate\n clientName\n items {\n seller\n quantity\n description\n ean\n refId\n id\n productId\n sellingPrice\n price\n }\n totalValue\n status\n statusDescription\n ShippingEstimatedDate\n currencyCode\n customFields {\n type\n value\n }\n }\n paging {\n total\n pages\n currentPage\n perPage\n }\n }\n }\n'
|
|
180
180
|
): typeof import('./graphql').ServerListOrdersQueryDocument
|
|
181
181
|
/**
|
|
182
182
|
* The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
package/@generated/graphql.ts
CHANGED
|
@@ -1555,7 +1555,7 @@ export type UserOrderFromList = {
|
|
|
1555
1555
|
clientName: Maybe<Scalars['String']['output']>
|
|
1556
1556
|
creationDate: Maybe<Scalars['String']['output']>
|
|
1557
1557
|
currencyCode: Maybe<Scalars['String']['output']>
|
|
1558
|
-
customFields: Maybe<UserOrderFromListCustomFields
|
|
1558
|
+
customFields: Maybe<Array<Maybe<UserOrderFromListCustomFields>>>
|
|
1559
1559
|
deliveryDates: Maybe<Array<Maybe<Scalars['String']['output']>>>
|
|
1560
1560
|
giftCardProviders: Maybe<Array<Maybe<Scalars['String']['output']>>>
|
|
1561
1561
|
hostname: Maybe<Scalars['String']['output']>
|
|
@@ -1587,10 +1587,8 @@ export type UserOrderFromList = {
|
|
|
1587
1587
|
}
|
|
1588
1588
|
|
|
1589
1589
|
export type UserOrderFromListCustomFields = {
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
poNumber: Maybe<Array<Maybe<Scalars['String']['output']>>>
|
|
1593
|
-
release: Maybe<Array<Maybe<Scalars['String']['output']>>>
|
|
1590
|
+
type: Maybe<Scalars['String']['output']>
|
|
1591
|
+
value: Maybe<Array<Maybe<Scalars['String']['output']>>>
|
|
1594
1592
|
}
|
|
1595
1593
|
|
|
1596
1594
|
export type UserOrderFromListMinimal = {
|
|
@@ -1598,7 +1596,7 @@ export type UserOrderFromListMinimal = {
|
|
|
1598
1596
|
clientName: Maybe<Scalars['String']['output']>
|
|
1599
1597
|
creationDate: Maybe<Scalars['String']['output']>
|
|
1600
1598
|
currencyCode: Maybe<Scalars['String']['output']>
|
|
1601
|
-
customFields: Maybe<UserOrderFromListCustomFields
|
|
1599
|
+
customFields: Maybe<Array<Maybe<UserOrderFromListCustomFields>>>
|
|
1602
1600
|
items: Maybe<Array<Maybe<UserOrderItemsSummarized>>>
|
|
1603
1601
|
orderId: Maybe<Scalars['String']['output']>
|
|
1604
1602
|
status: Maybe<Scalars['String']['output']>
|
|
@@ -1702,7 +1700,7 @@ export type UserOrderListPaging = {
|
|
|
1702
1700
|
|
|
1703
1701
|
export type UserOrderListResult = {
|
|
1704
1702
|
facets: Maybe<Array<Maybe<Scalars['String']['output']>>>
|
|
1705
|
-
list: Maybe<Array<
|
|
1703
|
+
list: Maybe<Array<UserOrderFromList>>
|
|
1706
1704
|
paging: Maybe<UserOrderListPaging>
|
|
1707
1705
|
reportRecordsLimit: Maybe<Scalars['Int']['output']>
|
|
1708
1706
|
stats: Maybe<UserOrderListStats>
|
|
@@ -2415,12 +2413,10 @@ export type ServerListOrdersQueryQuery = {
|
|
|
2415
2413
|
sellingPrice: number | null
|
|
2416
2414
|
price: number | null
|
|
2417
2415
|
} | null> | null
|
|
2418
|
-
customFields: {
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
desktop: Array<string | null> | null
|
|
2423
|
-
} | null
|
|
2416
|
+
customFields: Array<{
|
|
2417
|
+
type: string | null
|
|
2418
|
+
value: Array<string | null> | null
|
|
2419
|
+
} | null> | null
|
|
2424
2420
|
} | null> | null
|
|
2425
2421
|
paging: {
|
|
2426
2422
|
total: number | null
|
|
@@ -3475,7 +3471,7 @@ export const ServerOrderDetailsQueryDocument = {
|
|
|
3475
3471
|
export const ServerListOrdersQueryDocument = {
|
|
3476
3472
|
__meta__: {
|
|
3477
3473
|
operationName: 'ServerListOrdersQuery',
|
|
3478
|
-
operationHash: '
|
|
3474
|
+
operationHash: '867fff060c5b7726220ed8a10a115b1484762fcf',
|
|
3479
3475
|
},
|
|
3480
3476
|
} as unknown as TypedDocumentString<
|
|
3481
3477
|
ServerListOrdersQueryQuery,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"4b33c5c07f440dc7489e55619dc2211a13786e72": "fragment ServerCollectionPage on Query { collection(slug: $slug) { id } } query ServerCollectionPageQuery($slug: String!) { collection(slug: $slug) { breadcrumbList { itemListElement { item name position } } meta { selectedFacets { key value } } seo { description title } } ...ServerCollectionPage }",
|
|
3
3
|
"46103bee661405bde706d72126fdbf9b0a0c9e6e": "fragment CartProductItem on StoreProduct { additionalProperty { name propertyID value valueReference } brand { name } gtin image { alternateName url } isVariantOf { name productGroupID skuVariants { activeVariations availableVariations slugsMap } } name sku unitMultiplier } fragment ProductDetailsFragment_product on StoreProduct { additionalProperty { name propertyID value valueReference } brand { name } description gtin image { alternateName url } isVariantOf { name productGroupID skuVariants { activeVariations availableVariations slugsMap } } name offers { lowPrice lowPriceWithTaxes offers { availability listPrice listPriceWithTaxes price priceWithTaxes seller { identifier } } } id: productID sku unitMultiplier ...CartProductItem } fragment ServerProduct on Query { product(locator: $locator) { id: productID } } query ServerProductQuery($locator: [IStoreSelectedFacet!]!) { product(locator: $locator) { brand { name } breadcrumbList { itemListElement { item name position } } description gtin image { alternateName url } isVariantOf { productGroupID } name offers { highPrice lowPrice lowPriceWithTaxes offers { availability itemCondition price priceCurrency priceValidUntil seller { identifier } } priceCurrency } id: productID releaseDate seo { canonical description title } sku ...ProductDetailsFragment_product } ...ServerProduct }",
|
|
4
4
|
"8b9b9c7703b0b9af12f47cb86dd3d2e8eb40c8fd": "query ServerOrderDetailsQuery($orderId: String!) { userOrder(orderId: $orderId) { allowCancellation clientProfileData { corporateName email firstName isCorporate lastName phone } customFields { fields { name refId value } id type } deliveryOptionsData { contact { email name phone } deliveryOptions { address { addressId addressType city complement country entityId geoCoordinates neighborhood number postalCode receiverName reference state street versionId } deliveryChannel deliveryCompany deliveryWindow { endDateUtc price startDateUtc } friendlyDeliveryOptionName friendlyShippingEstimate items { id imageUrl name price quantity tax total } pickupStoreInfo { additionalInfo address { addressId addressType city complement country entityId geoCoordinates neighborhood number postalCode receiverName reference state street versionId } dockId friendlyName isPickupStore } quantityOfDifferentItems selectedSla seller shippingEstimate shippingEstimateDate total } } orderId paymentData { transactions { isActive payments { bankIssuedInvoiceIdentificationNumber connectorResponses { authId } group id installments lastDigits paymentOrigin paymentSystemName redemptionCode referenceValue tid url value } } } status statusDescription storePreferencesData { currencyCode } totals { id name value } } }",
|
|
5
|
-
"
|
|
5
|
+
"867fff060c5b7726220ed8a10a115b1484762fcf": "query ServerListOrdersQuery($clientEmail: String, $dateFinal: String, $dateInitial: String, $page: Int, $perPage: Int, $status: [String], $text: String) { listUserOrders( page: $page perPage: $perPage status: $status dateInitial: $dateInitial dateFinal: $dateFinal text: $text clientEmail: $clientEmail ) { list { ShippingEstimatedDate clientName creationDate currencyCode customFields { type value } items { description ean id price productId quantity refId seller sellingPrice } orderId status statusDescription totalValue } paging { currentPage pages perPage total } } }",
|
|
6
6
|
"e2b06da6840614d3c72768e56579b9d3b8e80802": "mutation CancelOrderMutation($data: IUserOrderCancel!) { cancelOrder(data: $data) { data } }",
|
|
7
7
|
"c2b3f8bff73ebf6ac79d758c66cabbc21ba9fcc0": "fragment CartItem on StoreOffer { itemOffered { ...CartProductItem } listPrice listPriceWithTaxes price priceWithTaxes quantity seller { identifier } } fragment CartMessage on StoreCartMessage { status text } fragment CartProductItem on StoreProduct { additionalProperty { name propertyID value valueReference } brand { name } gtin image { alternateName url } isVariantOf { name productGroupID skuVariants { activeVariations availableVariations slugsMap } } name sku unitMultiplier } mutation ValidateCartMutation($cart: IStoreCart!, $session: IStoreSession!) { validateCart(cart: $cart, session: $session) { messages { ...CartMessage } order { acceptedOffer { ...CartItem } orderNumber shouldSplitItem } } }",
|
|
8
8
|
"feb7005103a859e2bc8cf2360d568806fd88deba": "mutation SubscribeToNewsletter($data: IPersonNewsletter!) { subscribeToNewsletter(data: $data) { id } }",
|
|
@@ -1288,7 +1288,7 @@ type UserOrderResult {
|
|
|
1288
1288
|
}
|
|
1289
1289
|
|
|
1290
1290
|
type UserOrderListResult {
|
|
1291
|
-
list: [UserOrderFromList]
|
|
1291
|
+
list: [UserOrderFromList!]
|
|
1292
1292
|
paging: UserOrderListPaging
|
|
1293
1293
|
stats: UserOrderListStats
|
|
1294
1294
|
facets: [String]
|
|
@@ -1361,7 +1361,7 @@ type UserOrderFromList {
|
|
|
1361
1361
|
paymentApprovedDate: String
|
|
1362
1362
|
readyForHandlingDate: String
|
|
1363
1363
|
deliveryDates: [String]
|
|
1364
|
-
customFields: UserOrderFromListCustomFields
|
|
1364
|
+
customFields: [UserOrderFromListCustomFields]
|
|
1365
1365
|
}
|
|
1366
1366
|
|
|
1367
1367
|
type UserOrderCustomData {
|
|
@@ -1936,10 +1936,8 @@ type UserOrderCustomFieldsGrouped {
|
|
|
1936
1936
|
}
|
|
1937
1937
|
|
|
1938
1938
|
type UserOrderFromListCustomFields {
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
release: [String]
|
|
1942
|
-
desktop: [String]
|
|
1939
|
+
type: String
|
|
1940
|
+
value: [String]
|
|
1943
1941
|
}
|
|
1944
1942
|
|
|
1945
1943
|
type UserOrderListMinimalResult {
|
|
@@ -1956,6 +1954,6 @@ type UserOrderFromListMinimal {
|
|
|
1956
1954
|
status: String
|
|
1957
1955
|
statusDescription: String
|
|
1958
1956
|
ShippingEstimatedDate: String
|
|
1959
|
-
customFields: UserOrderFromListCustomFields
|
|
1957
|
+
customFields: [UserOrderFromListCustomFields]
|
|
1960
1958
|
currencyCode: String
|
|
1961
1959
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
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
|
+
# [3.51.0](https://github.com/vtex/faststore/compare/v3.50.4...v3.51.0) (2025-06-04)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- list orders custom fields new structure and layout ([#2871](https://github.com/vtex/faststore/issues/2871)) ([6842899](https://github.com/vtex/faststore/commit/68428999e0651a5754164bca41f03e7c1c7d2ed3))
|
|
11
|
+
|
|
6
12
|
## [3.50.4](https://github.com/vtex/faststore/compare/v3.50.3...v3.50.4) (2025-06-03)
|
|
7
13
|
|
|
8
14
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.51.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": "vtex/faststore",
|
|
6
6
|
"browserslist": "supports es6-module and not dead",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@envelop/graphql-jit": "^8.0.3",
|
|
45
45
|
"@envelop/parser-cache": "^6.0.2",
|
|
46
46
|
"@envelop/validation-cache": "^6.0.2",
|
|
47
|
-
"@faststore/api": "^3.
|
|
47
|
+
"@faststore/api": "^3.51.0",
|
|
48
48
|
"@faststore/graphql-utils": "^3.50.3",
|
|
49
49
|
"@faststore/lighthouse": "^3.50.3",
|
|
50
50
|
"@faststore/sdk": "^3.50.3",
|
|
@@ -105,5 +105,5 @@
|
|
|
105
105
|
"ts-jest": "29.1.1",
|
|
106
106
|
"typescript": "5.3.2"
|
|
107
107
|
},
|
|
108
|
-
"gitHead": "
|
|
108
|
+
"gitHead": "29d0474fbc2826c2a5d1af94eec0c90bf8fca36d"
|
|
109
109
|
}
|
|
@@ -104,6 +104,14 @@ export default function MyAccountListOrdersTable({
|
|
|
104
104
|
perPage,
|
|
105
105
|
filters,
|
|
106
106
|
}: MyAccountListOrdersTableProps) {
|
|
107
|
+
const hasOrderOrItemCustomFields =
|
|
108
|
+
listOrders?.list?.some(
|
|
109
|
+
(order) =>
|
|
110
|
+
order?.customFields
|
|
111
|
+
?.filter((field) => field.type === 'order' || field.type === 'item')
|
|
112
|
+
.flatMap((field) => field.value).length > 0
|
|
113
|
+
) || false
|
|
114
|
+
|
|
107
115
|
const router = useRouter()
|
|
108
116
|
const { isDesktop } = useScreenResize()
|
|
109
117
|
const { locale } = useSession()
|
|
@@ -126,33 +134,16 @@ export default function MyAccountListOrdersTable({
|
|
|
126
134
|
return (
|
|
127
135
|
<>
|
|
128
136
|
<table data-fs-list-orders-table>
|
|
129
|
-
<thead data-fs-list-orders-table-header>
|
|
130
|
-
<tr
|
|
131
|
-
data-fs-list-orders-table-header-row
|
|
132
|
-
data-fs-list-orders-table-row
|
|
133
|
-
>
|
|
134
|
-
{isDesktop && (
|
|
135
|
-
<>
|
|
136
|
-
<th data-fs-list-orders-table-header-cell>Order</th>
|
|
137
|
-
<th data-fs-list-orders-table-header-cell>Ordered by</th>
|
|
138
|
-
<th data-fs-list-orders-table-header-cell>Release</th>
|
|
139
|
-
<th data-fs-list-orders-table-header-cell>PO number</th>
|
|
140
|
-
<th data-fs-list-orders-table-header-cell>Cost Center</th>
|
|
141
|
-
</>
|
|
142
|
-
)}
|
|
143
|
-
<th data-fs-list-orders-table-header-cell>
|
|
144
|
-
{isDesktop && <>Status</>}
|
|
145
|
-
</th>
|
|
146
|
-
</tr>
|
|
147
|
-
</thead>
|
|
148
137
|
<tbody data-fs-list-orders-table-body>
|
|
149
138
|
{listOrders.list.map((item) => {
|
|
150
|
-
const
|
|
139
|
+
const itemLevel =
|
|
140
|
+
item?.customFields?.find(({ type }) => type === 'item')?.value ||
|
|
141
|
+
[]
|
|
151
142
|
const isExpanded = expandedRows[item.orderId]
|
|
152
|
-
const shouldShowButton =
|
|
153
|
-
const
|
|
154
|
-
?
|
|
155
|
-
:
|
|
143
|
+
const shouldShowButton = itemLevel.length > MAX_COST_CENTERS
|
|
144
|
+
const displayedItemLevel = isExpanded
|
|
145
|
+
? itemLevel
|
|
146
|
+
: itemLevel.slice(0, 5)
|
|
156
147
|
return (
|
|
157
148
|
// biome-ignore lint/a11y/useKeyWithClickEvents: <explanation>
|
|
158
149
|
<tr
|
|
@@ -163,28 +154,10 @@ export default function MyAccountListOrdersTable({
|
|
|
163
154
|
role="button"
|
|
164
155
|
>
|
|
165
156
|
<td data-fs-list-orders-table-cell>
|
|
166
|
-
<div data-fs-list-orders-table-product-info>
|
|
157
|
+
<div data-fs-list-orders-table-product-info-main>
|
|
167
158
|
<p data-fs-list-orders-table-product-info-order-id>
|
|
168
159
|
{item.orderId || '-'}
|
|
169
160
|
</p>
|
|
170
|
-
<p data-fs-list-orders-table-product-info-order-date>
|
|
171
|
-
Placed on{' '}
|
|
172
|
-
{item.creationDate
|
|
173
|
-
? formatShippingDate(item.creationDate, locale)
|
|
174
|
-
: '-'}
|
|
175
|
-
</p>
|
|
176
|
-
{isDesktop && (
|
|
177
|
-
<p data-fs-list-orders-table-product-info-order-delivery>
|
|
178
|
-
Delivery by{' '}
|
|
179
|
-
{item.ShippingEstimatedDate
|
|
180
|
-
? formatShippingDate(
|
|
181
|
-
item.ShippingEstimatedDate,
|
|
182
|
-
locale
|
|
183
|
-
)
|
|
184
|
-
: '-'}
|
|
185
|
-
</p>
|
|
186
|
-
)}
|
|
187
|
-
|
|
188
161
|
<p data-fs-list-orders-table-product-info-order-total>
|
|
189
162
|
Total: {formatPrice(item.totalValue, item.currencyCode)}
|
|
190
163
|
</p>
|
|
@@ -193,54 +166,138 @@ export default function MyAccountListOrdersTable({
|
|
|
193
166
|
|
|
194
167
|
{isDesktop && (
|
|
195
168
|
<>
|
|
196
|
-
<td data-fs-list-orders-table-cell>{item?.clientName}</td>
|
|
197
|
-
<td data-fs-list-orders-table-cell>
|
|
198
|
-
{item?.customFields?.release?.map((field) => (
|
|
199
|
-
<p key={field}>{field}</p>
|
|
200
|
-
))}
|
|
201
|
-
</td>
|
|
202
169
|
<td data-fs-list-orders-table-cell>
|
|
203
|
-
|
|
204
|
-
<p
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
{isExpanded ? 'View less' : 'View all'}
|
|
241
|
-
</Button>
|
|
170
|
+
<div data-fs-list-orders-table-product-info>
|
|
171
|
+
<p data-fs-list-orders-table-product-info-label>
|
|
172
|
+
Placed on
|
|
173
|
+
</p>
|
|
174
|
+
<p data-fs-list-orders-table-product-info-value>
|
|
175
|
+
{item.creationDate
|
|
176
|
+
? formatShippingDate(item.creationDate, locale)
|
|
177
|
+
: '-'}
|
|
178
|
+
</p>
|
|
179
|
+
</div>
|
|
180
|
+
{hasOrderOrItemCustomFields && (
|
|
181
|
+
<>
|
|
182
|
+
<div data-fs-list-orders-table-product-info>
|
|
183
|
+
<p data-fs-list-orders-table-product-info-label>
|
|
184
|
+
Delivery by
|
|
185
|
+
</p>
|
|
186
|
+
<p data-fs-list-orders-table-product-info-value>
|
|
187
|
+
{item.ShippingEstimatedDate
|
|
188
|
+
? formatShippingDate(
|
|
189
|
+
item.ShippingEstimatedDate,
|
|
190
|
+
locale
|
|
191
|
+
)
|
|
192
|
+
: '-'}
|
|
193
|
+
</p>
|
|
194
|
+
</div>
|
|
195
|
+
<div data-fs-list-orders-table-product-info>
|
|
196
|
+
<p data-fs-list-orders-table-product-info-label>
|
|
197
|
+
Placed by
|
|
198
|
+
</p>
|
|
199
|
+
<p data-fs-list-orders-table-product-info-value>
|
|
200
|
+
{item?.clientName}
|
|
201
|
+
</p>
|
|
202
|
+
<p data-fs-list-orders-table-product-info-value>
|
|
203
|
+
{/* {item?.clientOrgName} */}
|
|
204
|
+
</p>
|
|
205
|
+
</div>
|
|
206
|
+
</>
|
|
242
207
|
)}
|
|
243
208
|
</td>
|
|
209
|
+
{!hasOrderOrItemCustomFields && (
|
|
210
|
+
<>
|
|
211
|
+
<td data-fs-list-orders-table-cell>
|
|
212
|
+
<div data-fs-list-orders-table-product-info>
|
|
213
|
+
<p data-fs-list-orders-table-product-info-label>
|
|
214
|
+
Delivery by
|
|
215
|
+
</p>
|
|
216
|
+
<p data-fs-list-orders-table-product-info-value>
|
|
217
|
+
{item.ShippingEstimatedDate
|
|
218
|
+
? formatShippingDate(
|
|
219
|
+
item.ShippingEstimatedDate,
|
|
220
|
+
locale
|
|
221
|
+
)
|
|
222
|
+
: '-'}
|
|
223
|
+
</p>
|
|
224
|
+
</div>
|
|
225
|
+
</td>
|
|
226
|
+
<td data-fs-list-orders-table-cell>
|
|
227
|
+
<div data-fs-list-orders-table-product-info>
|
|
228
|
+
<p data-fs-list-orders-table-product-info-label>
|
|
229
|
+
Placed by
|
|
230
|
+
</p>
|
|
231
|
+
<p data-fs-list-orders-table-product-info-value>
|
|
232
|
+
{item?.clientName}
|
|
233
|
+
</p>
|
|
234
|
+
<p data-fs-list-orders-table-product-info-value>
|
|
235
|
+
{/* {item?.clientOrgName} */}
|
|
236
|
+
</p>
|
|
237
|
+
</div>
|
|
238
|
+
</td>
|
|
239
|
+
</>
|
|
240
|
+
)}
|
|
241
|
+
{hasOrderOrItemCustomFields && (
|
|
242
|
+
<>
|
|
243
|
+
<td data-fs-list-orders-table-cell>
|
|
244
|
+
{item?.customFields
|
|
245
|
+
?.find(({ type }) => type === 'order')
|
|
246
|
+
?.value?.map((field: string, idx: number) => (
|
|
247
|
+
<p
|
|
248
|
+
key={field + idx}
|
|
249
|
+
data-fs-list-orders-table-product-info-order
|
|
250
|
+
>
|
|
251
|
+
{field}
|
|
252
|
+
</p>
|
|
253
|
+
))}
|
|
254
|
+
</td>
|
|
255
|
+
<td data-fs-list-orders-table-cell>
|
|
256
|
+
{displayedItemLevel.map(
|
|
257
|
+
(field: string, idx: number) => (
|
|
258
|
+
<p
|
|
259
|
+
key={field + idx}
|
|
260
|
+
data-fs-list-orders-table-product-info-item
|
|
261
|
+
>
|
|
262
|
+
{field}
|
|
263
|
+
</p>
|
|
264
|
+
)
|
|
265
|
+
)}
|
|
266
|
+
{shouldShowButton && (
|
|
267
|
+
<Button
|
|
268
|
+
data-fs-list-orders-table-expand-button
|
|
269
|
+
size="small"
|
|
270
|
+
variant="primary"
|
|
271
|
+
inverse
|
|
272
|
+
iconPosition="right"
|
|
273
|
+
icon={
|
|
274
|
+
isExpanded ? (
|
|
275
|
+
<Icon
|
|
276
|
+
width={16}
|
|
277
|
+
height={16}
|
|
278
|
+
name="CaretUp"
|
|
279
|
+
aria-label="Collapse"
|
|
280
|
+
/>
|
|
281
|
+
) : (
|
|
282
|
+
<Icon
|
|
283
|
+
width={16}
|
|
284
|
+
height={16}
|
|
285
|
+
name="CaretDown"
|
|
286
|
+
aria-label="Expand"
|
|
287
|
+
/>
|
|
288
|
+
)
|
|
289
|
+
}
|
|
290
|
+
onClick={(e) => {
|
|
291
|
+
e.stopPropagation()
|
|
292
|
+
handleToggleExpand(item.orderId)
|
|
293
|
+
}}
|
|
294
|
+
>
|
|
295
|
+
{isExpanded ? 'View less' : 'View all'}
|
|
296
|
+
</Button>
|
|
297
|
+
)}
|
|
298
|
+
</td>
|
|
299
|
+
</>
|
|
300
|
+
)}
|
|
244
301
|
</>
|
|
245
302
|
)}
|
|
246
303
|
|
package/src/components/account/orders/MyAccountListOrders/MyAccountListOrdersTable/styles.scss
CHANGED
|
@@ -8,12 +8,13 @@
|
|
|
8
8
|
--fs-list-orders-table-header-font-weight : var(--fs-text-weight-medium);
|
|
9
9
|
--fs-list-orders-table-header-line-height : var(--fs-text-size-1);
|
|
10
10
|
--fs-list-orders-table-header-color : var(--fs-color-neutral-6);
|
|
11
|
-
--fs-list-orders-table-first-child-width :
|
|
12
|
-
--fs-list-orders-table-first-child-width-mobile :
|
|
13
|
-
--fs-list-orders-table-last-child-width :
|
|
11
|
+
--fs-list-orders-table-first-child-width : 40%;
|
|
12
|
+
--fs-list-orders-table-first-child-width-mobile : auto;
|
|
13
|
+
--fs-list-orders-table-last-child-width : auto;
|
|
14
14
|
--fs-list-orders-table-gap : 1.2rem;
|
|
15
15
|
--fs-list-orders-table-product-info-text-size : var(--fs-text-size-base);
|
|
16
16
|
--fs-list-orders-table-product-info-font-weight : var(--fs-text-weight-semibold);
|
|
17
|
+
--fs-list-orders-table-product-info-margin-top-first : var(--fs-spacing-0);
|
|
17
18
|
--fs-list-orders-table-product-info-margin-top : var(--fs-spacing-1);
|
|
18
19
|
--fs-list-orders-table-product-info-line-height : var(--fs-text-size-1);
|
|
19
20
|
--fs-list-orders-table-cell-padding : var(--fs-spacing-4) var(--fs-spacing-2) var(--fs-spacing-3);
|
|
@@ -33,19 +34,7 @@
|
|
|
33
34
|
border-collapse: collapse;
|
|
34
35
|
border: none;
|
|
35
36
|
|
|
36
|
-
[data-fs-list-orders-table-
|
|
37
|
-
@include media("<notebook") {
|
|
38
|
-
padding: 0;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
padding: var(--fs-list-orders-table-header-padding);
|
|
42
|
-
font-weight: var(--fs-list-orders-table-header-font-weight);
|
|
43
|
-
line-height: var(--fs-list-orders-table-header-line-height);
|
|
44
|
-
color: var(--fs-list-orders-table-header-color);
|
|
45
|
-
cursor: default;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
[data-fs-list-orders-table-header-cell]:first-child, [data-fs-list-orders-table-cell]:first-child {
|
|
37
|
+
[data-fs-list-orders-table-cell]:first-child {
|
|
49
38
|
width: var(--fs-list-orders-table-first-child-width);
|
|
50
39
|
|
|
51
40
|
@include media("<notebook") {
|
|
@@ -55,7 +44,7 @@
|
|
|
55
44
|
}
|
|
56
45
|
}
|
|
57
46
|
|
|
58
|
-
[data-fs-list-orders-table-
|
|
47
|
+
[data-fs-list-orders-table-cell]:last-child {
|
|
59
48
|
width: var(--fs-list-orders-table-last-child-width);
|
|
60
49
|
text-align: end;
|
|
61
50
|
|
|
@@ -69,24 +58,36 @@
|
|
|
69
58
|
}
|
|
70
59
|
}
|
|
71
60
|
|
|
72
|
-
[data-fs-list-orders-table-product-info-order-id], [data-fs-list-orders-table-product-info-order-
|
|
61
|
+
[data-fs-list-orders-table-product-info-order-id], [data-fs-list-orders-table-product-info-order-total], [data-fs-list-orders-table-product-info-value] {
|
|
73
62
|
overflow: hidden;
|
|
74
63
|
text-overflow: ellipsis;
|
|
75
64
|
white-space: nowrap;
|
|
76
65
|
}
|
|
77
66
|
|
|
67
|
+
[data-fs-list-orders-table-product-info]:first-child, [data-fs-list-orders-table-product-info-value] {
|
|
68
|
+
margin-top: var(--fs-list-orders-table-product-info-margin-top-first);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
[data-fs-list-orders-table-product-info-label] {
|
|
72
|
+
font-weight: var(--fs-list-orders-table-product-info-font-weight);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
[data-fs-list-orders-table-product-info] {
|
|
76
|
+
margin-top: var(--fs-list-orders-table-product-info-margin-top);
|
|
77
|
+
}
|
|
78
|
+
|
|
78
79
|
[data-fs-list-orders-table-product-info-order-id] {
|
|
79
80
|
font-size: var(--fs-list-orders-table-product-info-text-size);
|
|
80
81
|
font-weight: var(--fs-list-orders-table-product-info-font-weight);
|
|
81
82
|
vertical-align: middle;
|
|
82
83
|
}
|
|
83
84
|
|
|
84
|
-
[data-fs-list-orders-table-product-info-order-
|
|
85
|
-
margin-top: var(--fs-list-orders-table-product-info-margin-top);
|
|
85
|
+
[data-fs-list-orders-table-product-info-order-total] {
|
|
86
|
+
margin-top: var(--fs-list-orders-table-product-info-margin-top-first);
|
|
86
87
|
line-height: var(--fs-list-orders-table-product-info-line-height);
|
|
87
88
|
}
|
|
88
89
|
|
|
89
|
-
[data-fs-list-orders-table-
|
|
90
|
+
[data-fs-list-orders-table-cell] {
|
|
90
91
|
padding: var(--fs-list-orders-table-cell-padding);
|
|
91
92
|
text-align: left;
|
|
92
93
|
vertical-align: top;
|
|
@@ -97,6 +98,13 @@
|
|
|
97
98
|
}
|
|
98
99
|
}
|
|
99
100
|
|
|
101
|
+
[data-fs-list-orders-table-product-info-order], [data-fs-list-orders-table-product-info-item] {
|
|
102
|
+
margin-top: var(--fs-list-orders-table-product-info-margin-top-first);
|
|
103
|
+
overflow: hidden;
|
|
104
|
+
text-overflow: ellipsis;
|
|
105
|
+
white-space: nowrap;
|
|
106
|
+
}
|
|
107
|
+
|
|
100
108
|
[data-fs-list-orders-table-cell]:not(:first-child):not(:last-child) {
|
|
101
109
|
padding-top: calc(var(--fs-spacing-4) + var(--fs-spacing-0));
|
|
102
110
|
color: var(--fs-list-orders-table-cell-color);
|