@faststore/core 3.44.2 → 3.45.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 +122 -57
- 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 +66 -74
- package/.next/routes-manifest.json +1 -1
- package/.next/server/chunks/129.js +1 -0
- package/.next/server/chunks/1506.js +1 -1
- package/.next/server/chunks/1999.js +1 -0
- package/.next/server/chunks/2091.js +1 -0
- package/.next/server/chunks/2230.js +1 -0
- package/.next/server/chunks/2773.js +1 -0
- package/.next/server/chunks/2880.js +1 -1
- package/.next/server/chunks/3006.js +1 -0
- package/.next/server/chunks/4289.js +2 -2
- package/.next/server/chunks/4559.js +16 -3
- package/.next/server/chunks/4746.js +1 -1
- package/.next/server/chunks/5636.js +2 -0
- package/.next/server/chunks/5772.js +1 -0
- package/.next/server/chunks/6594.js +1 -1
- package/.next/server/chunks/674.js +1 -1
- package/.next/server/chunks/7228.js +1 -1
- package/.next/server/chunks/8038.js +1 -0
- package/.next/server/chunks/804.js +1 -1
- package/.next/server/chunks/8307.js +1 -0
- package/.next/server/chunks/831.js +1 -1
- package/.next/server/chunks/8562.js +1 -1
- package/.next/server/chunks/8646.js +1 -1
- package/.next/server/chunks/9559.js +9 -0
- package/.next/server/chunks/9664.js +1 -0
- package/.next/server/chunks/UIBannerText.js +1 -1
- 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/404.js +1 -1
- package/.next/server/pages/404.js.nft.json +1 -1
- package/.next/server/pages/500.js +1 -1
- package/.next/server/pages/500.js.nft.json +1 -1
- package/.next/server/pages/[...slug].js +1 -1
- package/.next/server/pages/[...slug].js.nft.json +1 -1
- package/.next/server/pages/[slug]/p.js +1 -1
- package/.next/server/pages/[slug]/p.js.nft.json +1 -1
- package/.next/server/pages/_app.js.nft.json +1 -1
- package/.next/server/pages/_document.js.nft.json +1 -1
- package/.next/server/pages/_error.js.nft.json +1 -1
- package/.next/server/pages/account/403.js +1 -0
- package/.next/server/pages/account/403.js.nft.json +1 -0
- package/.next/server/pages/account/404.js +1 -0
- package/.next/server/pages/account/404.js.nft.json +1 -0
- package/.next/server/pages/account/[...unknown].js +1 -0
- package/.next/server/pages/account/[...unknown].js.nft.json +1 -0
- package/.next/server/pages/account/orders/[id].js +1 -0
- package/.next/server/pages/account/orders/[id].js.nft.json +1 -0
- package/.next/server/pages/account/orders.js +1 -0
- package/.next/server/pages/account/orders.js.nft.json +1 -0
- package/.next/server/pages/account/profile.js +1 -1
- package/.next/server/pages/account/profile.js.nft.json +1 -1
- package/.next/server/pages/account/security.js +1 -0
- package/.next/server/pages/account/security.js.nft.json +1 -0
- package/.next/server/pages/account/user-details.js +1 -0
- package/.next/server/pages/account/user-details.js.nft.json +1 -0
- package/.next/server/pages/account.js +1 -1
- package/.next/server/pages/account.js.nft.json +1 -1
- package/.next/server/pages/api/graphql.js +2 -2
- package/.next/server/pages/api/graphql.js.nft.json +1 -1
- package/.next/server/pages/api/health/live.js.nft.json +1 -1
- package/.next/server/pages/api/health/ready.js.nft.json +1 -1
- package/.next/server/pages/api/preview.js.nft.json +1 -1
- package/.next/server/pages/checkout.js +1 -1
- package/.next/server/pages/checkout.js.nft.json +1 -1
- 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 +28 -0
- package/.next/server/pages/en-US/account/403.json +1 -0
- package/.next/server/pages/en-US/account/404.html +28 -0
- package/.next/server/pages/en-US/account/404.json +1 -0
- 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/index.js +1 -1
- package/.next/server/pages/index.js.nft.json +1 -1
- package/.next/server/pages/login.js +1 -1
- package/.next/server/pages/login.js.nft.json +1 -1
- package/.next/server/pages/s.js +1 -1
- package/.next/server/pages/s.js.nft.json +1 -1
- package/.next/server/pages-manifest.json +1 -1
- package/.next/static/chunks/{1552.8751332da83cadc5.js → 1552.2705dd1ff3aee879.js} +1 -1
- package/.next/static/chunks/4349-e6912711a345e5b6.js +1 -0
- package/.next/static/chunks/4625-a77d5db94b3a2b8f.js +1 -0
- package/.next/static/chunks/4746.f94ab461c31311bb.js +1 -0
- package/.next/static/chunks/4774.0450cb0efbfe76f4.js +1 -0
- package/.next/static/chunks/5836.92639eae2107d7af.js +1 -0
- package/.next/static/chunks/630.a3bf6c7cd8c945e1.js +6 -0
- package/.next/static/chunks/6335-580edc7c2c0fb418.js +1 -0
- package/.next/static/chunks/{2004.a778e11dd3802b72.js → 6410.bd3fa399df59cc80.js} +1 -1
- package/.next/static/chunks/6536.be112cd4a3efe253.js +1 -0
- package/.next/static/chunks/6867.27c1cb57ed76dd02.js +1 -0
- package/.next/static/chunks/7498-9b4ed9d4a65914cc.js +1 -0
- package/.next/static/chunks/7959.df78bb2e81b8d29c.js +1 -0
- package/.next/static/chunks/{9.89f24163370f3a22.js → 9.1db9e34673fbd5c9.js} +1 -1
- package/.next/static/chunks/9540.19d844fec8517602.js +1 -0
- package/.next/static/chunks/{1418-e86227bcf9a5d486.js → 9770-6f30493e3f7ab51b.js} +3 -3
- package/.next/static/chunks/BannerNewsletter.3031c9944928c34a.js +1 -0
- package/.next/static/chunks/BannerText.ca4ae220fed6bdd6.js +1 -0
- package/.next/static/chunks/CartSidebar.3d23093834f2c79a.js +1 -0
- package/.next/static/chunks/{Dropdown.7fe839c5ffce4687.js → Dropdown.534482865327310f.js} +1 -1
- package/.next/static/chunks/{DropdownButton.3991a37657e1d194.js → DropdownButton.90e7cb14e5866e74.js} +1 -1
- package/.next/static/chunks/{DropdownItem.0b3c39f881ca0832.js → DropdownItem.e74df13f69f8c3aa.js} +1 -1
- package/.next/static/chunks/{DropdownMenu.943b2d11ffa50ff6.js → DropdownMenu.56cde48e9fbbefe5.js} +1 -1
- package/.next/static/chunks/{Footer.1f83637df0884013.js → Footer.4bb5645e731073e7.js} +1 -1
- package/.next/static/chunks/Newsletter.f87cd1eca34af5e1.js +1 -0
- package/.next/static/chunks/ProductShelf.9b64813b3d1f4c9a.js +1 -0
- package/.next/static/chunks/ProductTiles.ebf02b46a32f5a53.js +1 -0
- package/.next/static/chunks/RegionModal.cdf4facd086a88e0.js +1 -0
- package/.next/static/chunks/Toast.fbfeced8149ed940.js +1 -0
- package/.next/static/chunks/{UIBannerText.45cf608e46cde628.js → UIBannerText.ef0582cb5cb01720.js} +1 -1
- package/.next/static/chunks/UISKUMatrixSidebar.64a50464062c77e9.js +1 -0
- package/.next/static/chunks/UIToast.22fea5cca8ee2b21.js +1 -0
- package/.next/static/chunks/pages/{404-6300c433469b7262.js → 404-e89b928faf6b9125.js} +1 -1
- package/.next/static/chunks/pages/{500-2d1dd344c8a8827f.js → 500-604704ba70e1e80a.js} +1 -1
- package/.next/static/chunks/pages/[...slug]-f80d7d8c8c7948a4.js +1 -0
- package/.next/static/chunks/pages/[slug]/p-748d6a1dbe59a2c8.js +1 -0
- package/.next/static/chunks/pages/_app-1be58ebde3e0b964.js +1 -0
- package/.next/static/chunks/pages/account/403-e4e6145815eeef01.js +1 -0
- package/.next/static/chunks/pages/account/404-ecfebfad41d655e9.js +1 -0
- package/.next/static/chunks/pages/account/[...unknown]-b233f92b64bd80cb.js +1 -0
- package/.next/static/chunks/pages/account/orders/[id]-8ab11c6c528911e9.js +1 -0
- package/.next/static/chunks/pages/account/orders-41bc5ef76c592a64.js +1 -0
- package/.next/static/chunks/pages/account/profile-2f501aabce910508.js +1 -0
- package/.next/static/chunks/pages/account/security-10e9e41318110950.js +1 -0
- package/.next/static/chunks/pages/account/user-details-5a7f30c290c25ec9.js +1 -0
- package/.next/static/chunks/pages/{checkout-93b647fc45454d97.js → checkout-cf3d3c3669a5e50b.js} +1 -1
- package/.next/static/chunks/pages/{index-07bc320fc045538c.js → index-e79b4e1ce52a8ea0.js} +1 -1
- package/.next/static/chunks/pages/{login-2454f1cd309c27d2.js → login-013b1f7a2b4bb9e0.js} +1 -1
- package/.next/static/chunks/pages/s-deeb7a0bdb02aaa9.js +1 -0
- package/.next/static/chunks/webpack-72d55466bef693ae.js +1 -0
- package/.next/static/css/2557aa3eaecf6ef0.css +1 -0
- package/.next/static/css/5347dbc8b71de47d.css +1 -0
- package/.next/static/css/84d35f475d0dc928.css +1 -0
- package/.next/static/css/9d1abf05f9ffaf8f.css +1 -0
- package/.next/static/css/b7bba8fce075688b.css +1 -0
- package/.next/static/css/{b8945ac5f5327c34.css → ec42ef906960d09f.css} +1 -1
- package/.next/static/iXgIvAYuYuXvEl83Xy7jT/_buildManifest.js +1 -0
- package/.next/static/iXgIvAYuYuXvEl83Xy7jT/_ssgManifest.js +1 -0
- package/.next/trace +129 -112
- package/.turbo/turbo-build.log +40 -30
- package/.turbo/turbo-test.log +5 -5
- package/@generated/gql.ts +34 -2
- package/@generated/graphql.ts +1566 -2
- package/@generated/persisted-documents.json +4 -1
- package/@generated/schema.graphql +748 -0
- package/CHANGELOG.md +6 -0
- package/discovery.config.default.js +1 -1
- package/package.json +7 -8
- package/public/icons.svg +106 -0
- package/src/components/account/MyAccountDrawer/OrganizationDrawer/OrganizationDrawer.tsx +68 -0
- package/src/components/account/MyAccountDrawer/OrganizationDrawer/OrganizationDrawerBody.tsx +21 -0
- package/src/components/account/MyAccountDrawer/OrganizationDrawer/OrganizationDrawerHeader.tsx +39 -0
- package/src/components/account/MyAccountDrawer/OrganizationDrawer/index.ts +3 -0
- package/src/components/account/MyAccountDrawer/OrganizationDrawer/section.module.scss +121 -0
- package/src/components/account/MyAccountDrawer/OrganizationSignInButton/OrganizationSignInButton.tsx +50 -0
- package/src/components/account/MyAccountDrawer/OrganizationSignInButton/index.ts +1 -0
- package/src/components/account/MyAccountDrawer/ProfileSummary/ProfileSummary.tsx +67 -0
- package/src/components/account/MyAccountDrawer/ProfileSummary/profile-summary.scss +91 -0
- package/src/components/account/MyAccountLayout/MyAccountLayout.tsx +2 -2
- package/src/components/account/MyAccountLayout/styles.scss +8 -4
- package/src/components/account/MyAccountMenu/styles.scss +3 -2
- package/src/components/account/components/BottomSheet/BottomSheet.tsx +58 -0
- package/src/components/account/components/BottomSheet/styles.scss +35 -0
- package/src/components/account/components/MyAccountAccordion/MyAccountAccordion.tsx +13 -0
- package/src/components/account/components/MyAccountAccordion/MyAccountAccordionButton.tsx +35 -0
- package/src/components/account/components/MyAccountAccordion/MyAccountAccordionItem.tsx +21 -0
- package/src/components/account/components/MyAccountAccordion/MyAccountAccordionPanel.tsx +16 -0
- package/src/components/account/components/MyAccountAccordion/index.ts +4 -0
- package/src/components/account/components/MyAccountAccordion/styles.scss +88 -0
- package/src/components/account/components/MyAccountCard/MyAccountCard.tsx +13 -0
- package/src/components/account/components/MyAccountCard/index.ts +1 -0
- package/src/components/account/components/MyAccountCard/styles.scss +23 -0
- package/src/components/account/components/MyAccountStatusBadge/MyAccountStatusBadge.tsx +28 -0
- package/src/components/account/components/MyAccountStatusBadge/index.ts +1 -0
- package/src/components/account/components/MyAccountStatusBadge/styles.scss +54 -0
- package/src/components/account/orders/MyAccountListOrders/MyAccountFilterSlider/MyAccountFilterFacetDateRange/MyAccountFilterFacetDateRange.tsx +113 -0
- package/src/components/account/orders/MyAccountListOrders/MyAccountFilterSlider/MyAccountFilterFacetDateRange/index.ts +2 -0
- package/src/components/account/orders/MyAccountListOrders/MyAccountFilterSlider/MyAccountFilterFacetDateRange/styles.scss +43 -0
- package/src/components/account/orders/MyAccountListOrders/MyAccountFilterSlider/MyAccountFilterSlider.tsx +209 -0
- package/src/components/account/orders/MyAccountListOrders/MyAccountFilterSlider/index.ts +1 -0
- package/src/components/account/orders/MyAccountListOrders/MyAccountFilterSlider/section.module.scss +24 -0
- package/src/components/account/orders/MyAccountListOrders/MyAccountListOrders.tsx +296 -0
- package/src/components/account/orders/MyAccountListOrders/MyAccountListOrdersEmptyState/MyAccountListOrdersEmptyState.tsx +20 -0
- package/src/components/account/orders/MyAccountListOrders/MyAccountListOrdersEmptyState/index.ts +1 -0
- package/src/components/account/orders/MyAccountListOrders/MyAccountListOrdersEmptyState/styles.scss +43 -0
- package/src/components/account/orders/MyAccountListOrders/MyAccountListOrdersTable/MyAccountListOrdersTable.tsx +210 -0
- package/src/components/account/orders/MyAccountListOrders/MyAccountListOrdersTable/index.ts +1 -0
- package/src/components/account/orders/MyAccountListOrders/MyAccountListOrdersTable/styles.scss +153 -0
- package/src/components/account/orders/MyAccountListOrders/MyAccountSelectedTags/MyAccountSelectedTags.tsx +119 -0
- package/src/components/account/orders/MyAccountListOrders/MyAccountSelectedTags/index.ts +1 -0
- package/src/components/account/orders/MyAccountListOrders/MyAccountSelectedTags/styles.scss +69 -0
- package/src/components/account/orders/MyAccountListOrders/index.ts +1 -0
- package/src/components/account/orders/MyAccountListOrders/styles.module.scss +100 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountDeliveryCard/MyAccountDeliveryCard.tsx +47 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountDeliveryCard/index.ts +1 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountDeliveryCard/styles.scss +44 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountDeliveryOptionAccordion/MyAccountDeliveryOptionAccordion.tsx +93 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountDeliveryOptionAccordion/MyAccountDeliveryOptionAccordionDeliveryInfo.tsx +86 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountDeliveryOptionAccordion/MyAccountDeliveryOptionAccordionProducts.tsx +74 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountDeliveryOptionAccordion/index.ts +6 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountDeliveryOptionAccordion/styles.scss +193 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountMoreInformationCard/MyAccountMoreInformationCard.tsx +31 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountMoreInformationCard/index.ts +1 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountMoreInformationCard/styles.scss +22 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderActionModal/MyAccountOrderActionModal.tsx +121 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderActionModal/index.ts +2 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderActionModal/styles.module.scss +40 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderActionModal/useOrderActionModal.ts +38 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderActions/MyAccountOrderActions.tsx +154 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderActions/index.ts +1 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderActions/styles.scss +33 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderDetails.tsx +106 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderedByCard/MyAccountOrderedByCard.tsx +54 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderedByCard/index.ts +1 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderedByCard/styles.scss +65 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountPaymentCard/MyAccountPaymentCard.tsx +157 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountPaymentCard/MyAccountPaymentFlagsIcon.tsx +106 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountPaymentCard/index.ts +1 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountPaymentCard/styles.scss +76 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountStatusCard/MyAccountStatusCard.tsx +276 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountStatusCard/index.ts +1 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountStatusCard/styles.scss +205 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountStatusCard/useConnectorPositioning.ts +74 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountSummaryCard/MyAccountSummaryCard.tsx +92 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountSummaryCard/index.ts +1 -0
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountSummaryCard/styles.scss +45 -0
- package/src/components/account/orders/MyAccountOrderDetails/index.ts +1 -0
- package/src/components/account/orders/MyAccountOrderDetails/section.module.scss +114 -0
- package/src/components/account/utils/useFormatPrice.ts +18 -0
- package/src/components/cms/RenderSections.tsx +1 -1
- package/src/components/navigation/Navbar/Navbar.tsx +16 -1
- package/src/components/navigation/NavbarSlider/NavbarSlider.tsx +18 -3
- package/src/customizations/src/myAccount/extensions/orders/[id]/after.tsx +7 -0
- package/src/customizations/src/myAccount/extensions/orders/[id]/before.tsx +7 -0
- package/src/customizations/src/myAccount/extensions/orders/after.tsx +7 -0
- package/src/customizations/src/myAccount/extensions/orders/before.tsx +7 -0
- package/src/customizations/src/myAccount/extensions/profile/after.tsx +7 -0
- package/src/customizations/src/myAccount/extensions/profile/before.tsx +7 -0
- package/src/customizations/src/myAccount/extensions/security/after.tsx +7 -0
- package/src/customizations/src/myAccount/extensions/security/before.tsx +7 -0
- package/src/customizations/src/myAccount/extensions/user-details/after.tsx +7 -0
- package/src/customizations/src/myAccount/extensions/user-details/before.tsx +7 -0
- package/src/experimental/myAccountSeverSideProps.ts +12 -1
- package/src/pages/account/403.tsx +103 -0
- package/src/pages/account/404.tsx +95 -0
- package/src/pages/account/[...unknown].tsx +39 -0
- package/src/pages/account/index.tsx +8 -16
- package/src/pages/account/orders/[id].tsx +764 -0
- package/src/pages/account/orders/index.tsx +273 -0
- package/src/pages/account/orders/styles.module.scss +35 -0
- package/src/pages/account/profile.tsx +62 -17
- package/src/pages/account/security.tsx +94 -0
- package/src/pages/account/user-details.tsx +94 -0
- package/src/sdk/account/getMyAccountRoutes.ts +13 -12
- package/src/sdk/account/useApproveOrder.ts +53 -0
- package/src/sdk/account/useCancelOrder.ts +34 -0
- package/src/sdk/account/useDebounce.ts +23 -0
- package/src/sdk/account/useRejectOrder.ts +53 -0
- package/src/sdk/search/useMyAccountFilter.ts +157 -0
- package/src/sdk/session/index.ts +8 -0
- package/src/utils/myAccountRedirect.tsx +36 -0
- package/src/utils/userOrderStatus.ts +141 -0
- package/src/utils/utilities.ts +35 -3
- package/test/server/index.test.ts +9 -1
- package/.next/server/chunks/1246.js +0 -1
- package/.next/server/chunks/2443.js +0 -1
- package/.next/server/chunks/4725.js +0 -1
- package/.next/server/chunks/563.js +0 -1
- package/.next/server/chunks/6968.js +0 -10
- package/.next/server/chunks/7468.js +0 -1
- package/.next/server/chunks/8355.js +0 -1
- package/.next/static/chunks/1173.ca14a5bc4e1264f4.js +0 -1
- package/.next/static/chunks/2206.44239ce81a09bc17.js +0 -1
- package/.next/static/chunks/4349-87a956a73b97519c.js +0 -1
- package/.next/static/chunks/4625-553d20c86b0ca577.js +0 -1
- package/.next/static/chunks/4746.2e16ec0663a3873f.js +0 -1
- package/.next/static/chunks/4774.8e70c01dcd0ed4b3.js +0 -1
- package/.next/static/chunks/4865.4017be0f8e7c8cf0.js +0 -1
- package/.next/static/chunks/5259-90f7ef92cf24e49a.js +0 -1
- package/.next/static/chunks/5836.48126b7866819f9e.js +0 -1
- package/.next/static/chunks/630.13d3dd939b789798.js +0 -6
- package/.next/static/chunks/6335-6eb4ff84af184b88.js +0 -1
- package/.next/static/chunks/6536.d5260107222db13c.js +0 -1
- package/.next/static/chunks/7498-72289e704e7c7056.js +0 -1
- package/.next/static/chunks/7959.7c721505286572c0.js +0 -1
- package/.next/static/chunks/BannerNewsletter.8982f42e60ed8828.js +0 -1
- package/.next/static/chunks/BannerText.5b250db1cf67e44f.js +0 -1
- package/.next/static/chunks/CartSidebar.aa9e43be37034654.js +0 -1
- package/.next/static/chunks/Newsletter.9db4df2d4fb33227.js +0 -1
- package/.next/static/chunks/ProductShelf.9cea36116836c161.js +0 -1
- package/.next/static/chunks/ProductTiles.059a4a6360e1d4ea.js +0 -1
- package/.next/static/chunks/RegionModal.4594b707a1092551.js +0 -1
- package/.next/static/chunks/Toast.01d4ac8bf14c1be5.js +0 -1
- package/.next/static/chunks/UIButton.3186f933c0ecfb31.js +0 -1
- package/.next/static/chunks/UISKUMatrixSidebar.9ac3980a60cfc358.js +0 -1
- package/.next/static/chunks/UIToast.221eb10681d2f642.js +0 -1
- package/.next/static/chunks/pages/[...slug]-c1a62d58f5940747.js +0 -1
- package/.next/static/chunks/pages/[slug]/p-555dc09a5e78260e.js +0 -1
- package/.next/static/chunks/pages/_app-d5641120092ee13b.js +0 -1
- package/.next/static/chunks/pages/account/profile-23b2e9fbbd95a30b.js +0 -1
- package/.next/static/chunks/pages/s-9901e6857f517b8b.js +0 -1
- package/.next/static/chunks/webpack-f338de6955d58a39.js +0 -1
- package/.next/static/css/249b9deaabc0d32d.css +0 -1
- package/.next/static/t5v5T1mAjzrYWEKaMk8mu/_buildManifest.js +0 -1
- package/.next/static/t5v5T1mAjzrYWEKaMk8mu/_ssgManifest.js +0 -1
|
@@ -0,0 +1,764 @@
|
|
|
1
|
+
import type { Locator } from '@vtex/client-cms'
|
|
2
|
+
import type { GetServerSideProps } from 'next'
|
|
3
|
+
import { NextSeo } from 'next-seo'
|
|
4
|
+
import type { ComponentType } from 'react'
|
|
5
|
+
import { MyAccountLayout } from 'src/components/account'
|
|
6
|
+
import MyAccountOrderDetails from 'src/components/account/orders/MyAccountOrderDetails'
|
|
7
|
+
import RenderSections from 'src/components/cms/RenderSections'
|
|
8
|
+
import { default as GLOBAL_COMPONENTS } from 'src/components/cms/global/Components'
|
|
9
|
+
import CUSTOM_COMPONENTS from 'src/customizations/src/components'
|
|
10
|
+
import type { MyAccountProps } from 'src/experimental/myAccountSeverSideProps'
|
|
11
|
+
|
|
12
|
+
import { gql } from '@generated'
|
|
13
|
+
import type {
|
|
14
|
+
ServerOrderDetailsQueryQuery,
|
|
15
|
+
ServerOrderDetailsQueryQueryVariables,
|
|
16
|
+
} from '@generated/graphql'
|
|
17
|
+
import { getGlobalSectionsData } from 'src/components/cms/GlobalSections'
|
|
18
|
+
import { default as AfterSection } from 'src/customizations/src/myAccount/extensions/orders/[id]/after'
|
|
19
|
+
import { default as BeforeSection } from 'src/customizations/src/myAccount/extensions/orders/[id]/before'
|
|
20
|
+
import { execute } from 'src/server'
|
|
21
|
+
import { injectGlobalSections } from 'src/server/cms/global'
|
|
22
|
+
import { getMyAccountRedirect } from 'src/utils/myAccountRedirect'
|
|
23
|
+
|
|
24
|
+
const COMPONENTS: Record<string, ComponentType<any>> = {
|
|
25
|
+
...GLOBAL_COMPONENTS,
|
|
26
|
+
...CUSTOM_COMPONENTS,
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
type OrderDetailsPageProps = {
|
|
30
|
+
order: ServerOrderDetailsQueryQuery['userOrder']
|
|
31
|
+
} & MyAccountProps
|
|
32
|
+
|
|
33
|
+
export default function OrderDetailsPage({
|
|
34
|
+
globalSections,
|
|
35
|
+
order,
|
|
36
|
+
}: OrderDetailsPageProps) {
|
|
37
|
+
return (
|
|
38
|
+
<RenderSections
|
|
39
|
+
globalSections={globalSections.sections}
|
|
40
|
+
components={COMPONENTS}
|
|
41
|
+
>
|
|
42
|
+
<NextSeo noindex nofollow />
|
|
43
|
+
|
|
44
|
+
<MyAccountLayout>
|
|
45
|
+
<BeforeSection />
|
|
46
|
+
<MyAccountOrderDetails order={order} />
|
|
47
|
+
<AfterSection />
|
|
48
|
+
</MyAccountLayout>
|
|
49
|
+
</RenderSections>
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export const fragment = gql(`
|
|
54
|
+
fragment UserOrderItemsFragment on UserOrderItems {
|
|
55
|
+
id
|
|
56
|
+
name
|
|
57
|
+
quantity
|
|
58
|
+
sellingPrice
|
|
59
|
+
unitMultiplier
|
|
60
|
+
measurementUnit
|
|
61
|
+
imageUrl
|
|
62
|
+
detailUrl
|
|
63
|
+
refId
|
|
64
|
+
rewardValue
|
|
65
|
+
}
|
|
66
|
+
`)
|
|
67
|
+
|
|
68
|
+
const query = gql(`
|
|
69
|
+
query ServerOrderDetailsQuery($orderId: String!) {
|
|
70
|
+
userOrder(orderId: $orderId) {
|
|
71
|
+
orderId
|
|
72
|
+
sequence
|
|
73
|
+
marketplaceOrderId
|
|
74
|
+
marketplaceServicesEndpoint
|
|
75
|
+
sellerOrderId
|
|
76
|
+
origin
|
|
77
|
+
affiliateId
|
|
78
|
+
salesChannel
|
|
79
|
+
merchantName
|
|
80
|
+
status
|
|
81
|
+
workflowIsInError
|
|
82
|
+
statusDescription
|
|
83
|
+
value
|
|
84
|
+
creationDate
|
|
85
|
+
lastChange
|
|
86
|
+
orderGroup
|
|
87
|
+
giftRegistryData
|
|
88
|
+
marketingData
|
|
89
|
+
callCenterOperatorData
|
|
90
|
+
followUpEmail
|
|
91
|
+
lastMessage
|
|
92
|
+
hostname
|
|
93
|
+
invoiceData
|
|
94
|
+
changesAttachment
|
|
95
|
+
openTextField
|
|
96
|
+
roundingError
|
|
97
|
+
orderFormId
|
|
98
|
+
commercialConditionData
|
|
99
|
+
isCompleted
|
|
100
|
+
customData {
|
|
101
|
+
customApps {
|
|
102
|
+
fields {
|
|
103
|
+
cartEtag
|
|
104
|
+
}
|
|
105
|
+
id
|
|
106
|
+
major
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
allowCancellation
|
|
110
|
+
allowEdition
|
|
111
|
+
isCheckedIn
|
|
112
|
+
authorizedDate
|
|
113
|
+
invoicedDate
|
|
114
|
+
cancelReason
|
|
115
|
+
subscriptionData
|
|
116
|
+
taxData
|
|
117
|
+
checkedInPickupPointId
|
|
118
|
+
cancellationData {
|
|
119
|
+
RequestedByUser
|
|
120
|
+
RequestedBySystem
|
|
121
|
+
RequestedBySellerNotification
|
|
122
|
+
RequestedByPaymentNotification
|
|
123
|
+
Reason
|
|
124
|
+
CancellationDate
|
|
125
|
+
}
|
|
126
|
+
cancellationRequests {
|
|
127
|
+
id
|
|
128
|
+
reason
|
|
129
|
+
cancellationRequestDate
|
|
130
|
+
requestedByUser
|
|
131
|
+
deniedBySeller
|
|
132
|
+
deniedBySellerReason
|
|
133
|
+
cancellationRequestDenyDate
|
|
134
|
+
}
|
|
135
|
+
clientPreferencesData {
|
|
136
|
+
locale
|
|
137
|
+
optinNewsLetter
|
|
138
|
+
}
|
|
139
|
+
itemMetadata {
|
|
140
|
+
Items {
|
|
141
|
+
Id
|
|
142
|
+
Seller
|
|
143
|
+
Name
|
|
144
|
+
SkuName
|
|
145
|
+
ProductId
|
|
146
|
+
RefId
|
|
147
|
+
Ean
|
|
148
|
+
ImageUrl
|
|
149
|
+
DetailUrl
|
|
150
|
+
AssemblyOptions {
|
|
151
|
+
Id
|
|
152
|
+
Name
|
|
153
|
+
Required
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
marketplace {
|
|
158
|
+
baseURL
|
|
159
|
+
isCertified
|
|
160
|
+
name
|
|
161
|
+
}
|
|
162
|
+
storePreferencesData {
|
|
163
|
+
countryCode
|
|
164
|
+
currencyCode
|
|
165
|
+
currencyLocale
|
|
166
|
+
currencySymbol
|
|
167
|
+
timeZone
|
|
168
|
+
currencyFormatInfo {
|
|
169
|
+
CurrencyDecimalDigits
|
|
170
|
+
CurrencyDecimalSeparator
|
|
171
|
+
CurrencyGroupSeparator
|
|
172
|
+
CurrencyGroupSize
|
|
173
|
+
StartsWithCurrencySymbol
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
sellers {
|
|
177
|
+
id
|
|
178
|
+
name
|
|
179
|
+
logo
|
|
180
|
+
fulfillmentEndpoint
|
|
181
|
+
}
|
|
182
|
+
packageAttachment {
|
|
183
|
+
packages {
|
|
184
|
+
courier
|
|
185
|
+
courierStatus {
|
|
186
|
+
data {
|
|
187
|
+
city
|
|
188
|
+
description
|
|
189
|
+
lastChange
|
|
190
|
+
state
|
|
191
|
+
}
|
|
192
|
+
finished
|
|
193
|
+
status
|
|
194
|
+
}
|
|
195
|
+
invoiceNumber
|
|
196
|
+
invoiceUrl
|
|
197
|
+
invoiceValue
|
|
198
|
+
extraValue
|
|
199
|
+
issuanceDate
|
|
200
|
+
items {
|
|
201
|
+
description
|
|
202
|
+
itemIndex
|
|
203
|
+
price
|
|
204
|
+
quantity
|
|
205
|
+
}
|
|
206
|
+
trackingNumber
|
|
207
|
+
trackingUrl
|
|
208
|
+
invoiceKey
|
|
209
|
+
type
|
|
210
|
+
restitutions {
|
|
211
|
+
Refund {
|
|
212
|
+
value
|
|
213
|
+
items {
|
|
214
|
+
useFreight
|
|
215
|
+
isCompensation
|
|
216
|
+
compensationValue
|
|
217
|
+
itemIndex
|
|
218
|
+
id
|
|
219
|
+
quantity
|
|
220
|
+
price
|
|
221
|
+
description
|
|
222
|
+
unitMultiplier
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
GiftCard {
|
|
226
|
+
value
|
|
227
|
+
items {
|
|
228
|
+
useFreight
|
|
229
|
+
isCompensation
|
|
230
|
+
compensationValue
|
|
231
|
+
itemIndex
|
|
232
|
+
id
|
|
233
|
+
quantity
|
|
234
|
+
price
|
|
235
|
+
description
|
|
236
|
+
unitMultiplier
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
paymentData {
|
|
243
|
+
transactions {
|
|
244
|
+
isActive
|
|
245
|
+
transactionId
|
|
246
|
+
merchantName
|
|
247
|
+
payments {
|
|
248
|
+
id
|
|
249
|
+
paymentSystem
|
|
250
|
+
paymentSystemName
|
|
251
|
+
value
|
|
252
|
+
installments
|
|
253
|
+
referenceValue
|
|
254
|
+
cardHolder
|
|
255
|
+
cardNumber
|
|
256
|
+
firstDigits
|
|
257
|
+
lastDigits
|
|
258
|
+
cvv2
|
|
259
|
+
expireMonth
|
|
260
|
+
expireYear
|
|
261
|
+
url
|
|
262
|
+
giftCardId
|
|
263
|
+
giftCardName
|
|
264
|
+
giftCardCaption
|
|
265
|
+
redemptionCode
|
|
266
|
+
group
|
|
267
|
+
tid
|
|
268
|
+
dueDate
|
|
269
|
+
connectorResponses {
|
|
270
|
+
Message
|
|
271
|
+
ReturnCode
|
|
272
|
+
Tid
|
|
273
|
+
authId
|
|
274
|
+
}
|
|
275
|
+
giftCardProvider
|
|
276
|
+
giftCardAsDiscount
|
|
277
|
+
koinUrl
|
|
278
|
+
accountId
|
|
279
|
+
parentAccountId
|
|
280
|
+
bankIssuedInvoiceIdentificationNumber
|
|
281
|
+
bankIssuedInvoiceIdentificationNumberFormatted
|
|
282
|
+
bankIssuedInvoiceBarCodeNumber
|
|
283
|
+
bankIssuedInvoiceBarCodeType
|
|
284
|
+
billingAddress
|
|
285
|
+
paymentOrigin
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
giftCards
|
|
289
|
+
}
|
|
290
|
+
shippingData {
|
|
291
|
+
id
|
|
292
|
+
trackingHints
|
|
293
|
+
contactInformation {
|
|
294
|
+
id
|
|
295
|
+
email
|
|
296
|
+
firstName
|
|
297
|
+
lastName
|
|
298
|
+
document
|
|
299
|
+
documentType
|
|
300
|
+
phone
|
|
301
|
+
}
|
|
302
|
+
availableAddresses {
|
|
303
|
+
addressId
|
|
304
|
+
versionId
|
|
305
|
+
entityId
|
|
306
|
+
addressType
|
|
307
|
+
receiverName
|
|
308
|
+
street
|
|
309
|
+
number
|
|
310
|
+
complement
|
|
311
|
+
neighborhood
|
|
312
|
+
postalCode
|
|
313
|
+
city
|
|
314
|
+
state
|
|
315
|
+
country
|
|
316
|
+
reference
|
|
317
|
+
geoCoordinates
|
|
318
|
+
}
|
|
319
|
+
selectedAddresses {
|
|
320
|
+
addressId
|
|
321
|
+
versionId
|
|
322
|
+
entityId
|
|
323
|
+
addressType
|
|
324
|
+
receiverName
|
|
325
|
+
street
|
|
326
|
+
number
|
|
327
|
+
complement
|
|
328
|
+
neighborhood
|
|
329
|
+
postalCode
|
|
330
|
+
city
|
|
331
|
+
state
|
|
332
|
+
country
|
|
333
|
+
reference
|
|
334
|
+
geoCoordinates
|
|
335
|
+
}
|
|
336
|
+
logisticsInfo {
|
|
337
|
+
itemIndex
|
|
338
|
+
itemId
|
|
339
|
+
selectedDeliveryChannel
|
|
340
|
+
selectedSla
|
|
341
|
+
lockTTL
|
|
342
|
+
price
|
|
343
|
+
listPrice
|
|
344
|
+
sellingPrice
|
|
345
|
+
deliveryWindow {
|
|
346
|
+
startDateUtc
|
|
347
|
+
endDateUtc
|
|
348
|
+
price
|
|
349
|
+
}
|
|
350
|
+
deliveryCompany
|
|
351
|
+
shippingEstimate
|
|
352
|
+
shippingEstimateDate
|
|
353
|
+
deliveryChannel
|
|
354
|
+
addressId
|
|
355
|
+
versionId
|
|
356
|
+
entityId
|
|
357
|
+
polygonName
|
|
358
|
+
pickupPointId
|
|
359
|
+
transitTime
|
|
360
|
+
pickupStoreInfo {
|
|
361
|
+
additionalInfo
|
|
362
|
+
address {
|
|
363
|
+
addressType
|
|
364
|
+
receiverName
|
|
365
|
+
addressId
|
|
366
|
+
versionId
|
|
367
|
+
entityId
|
|
368
|
+
postalCode
|
|
369
|
+
city
|
|
370
|
+
state
|
|
371
|
+
country
|
|
372
|
+
street
|
|
373
|
+
number
|
|
374
|
+
neighborhood
|
|
375
|
+
complement
|
|
376
|
+
reference
|
|
377
|
+
geoCoordinates
|
|
378
|
+
}
|
|
379
|
+
dockId
|
|
380
|
+
friendlyName
|
|
381
|
+
isPickupStore
|
|
382
|
+
}
|
|
383
|
+
deliveryChannels {
|
|
384
|
+
id
|
|
385
|
+
stockBalance
|
|
386
|
+
}
|
|
387
|
+
deliveryIds {
|
|
388
|
+
courierId
|
|
389
|
+
courierName
|
|
390
|
+
dockId
|
|
391
|
+
quantity
|
|
392
|
+
warehouseId
|
|
393
|
+
accountCarrierName
|
|
394
|
+
kitItemDetails
|
|
395
|
+
}
|
|
396
|
+
shipsTo
|
|
397
|
+
slas {
|
|
398
|
+
id
|
|
399
|
+
name
|
|
400
|
+
shippingEstimate
|
|
401
|
+
shippingEstimateDate
|
|
402
|
+
deliveryWindow {
|
|
403
|
+
startDateUtc
|
|
404
|
+
endDateUtc
|
|
405
|
+
price
|
|
406
|
+
}
|
|
407
|
+
listPrice
|
|
408
|
+
price
|
|
409
|
+
deliveryChannel
|
|
410
|
+
polygonName
|
|
411
|
+
lockTTL
|
|
412
|
+
pickupPointId
|
|
413
|
+
transitTime
|
|
414
|
+
pickupDistance
|
|
415
|
+
pickupStoreInfo {
|
|
416
|
+
additionalInfo
|
|
417
|
+
address {
|
|
418
|
+
addressType
|
|
419
|
+
receiverName
|
|
420
|
+
addressId
|
|
421
|
+
versionId
|
|
422
|
+
entityId
|
|
423
|
+
postalCode
|
|
424
|
+
city
|
|
425
|
+
state
|
|
426
|
+
country
|
|
427
|
+
street
|
|
428
|
+
number
|
|
429
|
+
neighborhood
|
|
430
|
+
complement
|
|
431
|
+
reference
|
|
432
|
+
geoCoordinates
|
|
433
|
+
}
|
|
434
|
+
dockId
|
|
435
|
+
friendlyName
|
|
436
|
+
isPickupStore
|
|
437
|
+
}
|
|
438
|
+
deliveryIds {
|
|
439
|
+
courierId
|
|
440
|
+
courierName
|
|
441
|
+
dockId
|
|
442
|
+
quantity
|
|
443
|
+
warehouseId
|
|
444
|
+
accountCarrierName
|
|
445
|
+
kitItemDetails
|
|
446
|
+
}
|
|
447
|
+
availableDeliveryWindows {
|
|
448
|
+
startDateUtc
|
|
449
|
+
endDateUtc
|
|
450
|
+
price
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
address {
|
|
455
|
+
addressType
|
|
456
|
+
receiverName
|
|
457
|
+
addressId
|
|
458
|
+
versionId
|
|
459
|
+
entityId
|
|
460
|
+
postalCode
|
|
461
|
+
city
|
|
462
|
+
state
|
|
463
|
+
country
|
|
464
|
+
street
|
|
465
|
+
number
|
|
466
|
+
neighborhood
|
|
467
|
+
complement
|
|
468
|
+
reference
|
|
469
|
+
geoCoordinates
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
ratesAndBenefitsData {
|
|
473
|
+
id
|
|
474
|
+
rateAndBenefitsIdentifiers {
|
|
475
|
+
id
|
|
476
|
+
additionalInfo
|
|
477
|
+
description
|
|
478
|
+
featured
|
|
479
|
+
name
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
clientProfileData {
|
|
483
|
+
id
|
|
484
|
+
email
|
|
485
|
+
firstName
|
|
486
|
+
lastName
|
|
487
|
+
documentType
|
|
488
|
+
document
|
|
489
|
+
phone
|
|
490
|
+
corporateName
|
|
491
|
+
tradeName
|
|
492
|
+
corporateDocument
|
|
493
|
+
stateInscription
|
|
494
|
+
corporatePhone
|
|
495
|
+
isCorporate
|
|
496
|
+
userProfileId
|
|
497
|
+
userProfileVersion
|
|
498
|
+
customerClass
|
|
499
|
+
customerCode
|
|
500
|
+
}
|
|
501
|
+
items {
|
|
502
|
+
uniqueId
|
|
503
|
+
id
|
|
504
|
+
productId
|
|
505
|
+
ean
|
|
506
|
+
lockId
|
|
507
|
+
quantity
|
|
508
|
+
seller
|
|
509
|
+
name
|
|
510
|
+
refId
|
|
511
|
+
price
|
|
512
|
+
listPrice
|
|
513
|
+
manualPrice
|
|
514
|
+
manualPriceAppliedBy
|
|
515
|
+
imageUrl
|
|
516
|
+
detailUrl
|
|
517
|
+
sellerSku
|
|
518
|
+
priceValidUntil
|
|
519
|
+
commission
|
|
520
|
+
tax
|
|
521
|
+
preSaleDate
|
|
522
|
+
measurementUnit
|
|
523
|
+
unitMultiplier
|
|
524
|
+
sellingPrice
|
|
525
|
+
isGift
|
|
526
|
+
shippingPrice
|
|
527
|
+
rewardValue
|
|
528
|
+
freightCommission
|
|
529
|
+
taxCode
|
|
530
|
+
parentItemIndex
|
|
531
|
+
parentAssemblyBinding
|
|
532
|
+
callCenterOperator
|
|
533
|
+
serialNumbers
|
|
534
|
+
costPrice
|
|
535
|
+
assemblies
|
|
536
|
+
priceDefinition {
|
|
537
|
+
calculatedSellingPrice
|
|
538
|
+
total
|
|
539
|
+
reason
|
|
540
|
+
sellingPrices {
|
|
541
|
+
value
|
|
542
|
+
quantity
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
additionalInfo {
|
|
546
|
+
brandName
|
|
547
|
+
brandId
|
|
548
|
+
categoriesIds
|
|
549
|
+
productClusterId
|
|
550
|
+
commercialConditionId
|
|
551
|
+
offeringInfo
|
|
552
|
+
offeringType
|
|
553
|
+
offeringTypeId
|
|
554
|
+
dimension {
|
|
555
|
+
cubicweight
|
|
556
|
+
height
|
|
557
|
+
length
|
|
558
|
+
weight
|
|
559
|
+
width
|
|
560
|
+
}
|
|
561
|
+
categories {
|
|
562
|
+
id
|
|
563
|
+
name
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
attachmentOfferings {
|
|
567
|
+
name
|
|
568
|
+
required
|
|
569
|
+
}
|
|
570
|
+
offerings {
|
|
571
|
+
type
|
|
572
|
+
id
|
|
573
|
+
name
|
|
574
|
+
price
|
|
575
|
+
}
|
|
576
|
+
params
|
|
577
|
+
bundleItems {
|
|
578
|
+
...UserOrderItemsFragment
|
|
579
|
+
attachments {
|
|
580
|
+
name
|
|
581
|
+
content
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
components {
|
|
585
|
+
...UserOrderItemsFragment
|
|
586
|
+
}
|
|
587
|
+
priceTags {
|
|
588
|
+
name
|
|
589
|
+
value
|
|
590
|
+
rawValue
|
|
591
|
+
isPercentual
|
|
592
|
+
}
|
|
593
|
+
attachments {
|
|
594
|
+
name
|
|
595
|
+
content
|
|
596
|
+
}
|
|
597
|
+
itemAttachment {
|
|
598
|
+
name
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
totals {
|
|
602
|
+
id
|
|
603
|
+
name
|
|
604
|
+
value
|
|
605
|
+
}
|
|
606
|
+
deliveryOptionsData {
|
|
607
|
+
deliveryOptions {
|
|
608
|
+
selectedSla
|
|
609
|
+
deliveryChannel
|
|
610
|
+
deliveryCompany
|
|
611
|
+
deliveryWindow {
|
|
612
|
+
startDateUtc
|
|
613
|
+
endDateUtc
|
|
614
|
+
price
|
|
615
|
+
}
|
|
616
|
+
shippingEstimate
|
|
617
|
+
shippingEstimateDate
|
|
618
|
+
friendlyShippingEstimate
|
|
619
|
+
friendlyDeliveryOptionName
|
|
620
|
+
seller
|
|
621
|
+
address {
|
|
622
|
+
addressType
|
|
623
|
+
receiverName
|
|
624
|
+
addressId
|
|
625
|
+
versionId
|
|
626
|
+
entityId
|
|
627
|
+
postalCode
|
|
628
|
+
city
|
|
629
|
+
state
|
|
630
|
+
country
|
|
631
|
+
street
|
|
632
|
+
number
|
|
633
|
+
neighborhood
|
|
634
|
+
complement
|
|
635
|
+
reference
|
|
636
|
+
geoCoordinates
|
|
637
|
+
}
|
|
638
|
+
pickupStoreInfo {
|
|
639
|
+
additionalInfo
|
|
640
|
+
address {
|
|
641
|
+
addressType
|
|
642
|
+
receiverName
|
|
643
|
+
addressId
|
|
644
|
+
versionId
|
|
645
|
+
entityId
|
|
646
|
+
postalCode
|
|
647
|
+
city
|
|
648
|
+
state
|
|
649
|
+
country
|
|
650
|
+
street
|
|
651
|
+
number
|
|
652
|
+
neighborhood
|
|
653
|
+
complement
|
|
654
|
+
reference
|
|
655
|
+
geoCoordinates
|
|
656
|
+
}
|
|
657
|
+
dockId
|
|
658
|
+
friendlyName
|
|
659
|
+
isPickupStore
|
|
660
|
+
}
|
|
661
|
+
quantityOfDifferentItems
|
|
662
|
+
total
|
|
663
|
+
items {
|
|
664
|
+
id
|
|
665
|
+
name
|
|
666
|
+
quantity
|
|
667
|
+
price
|
|
668
|
+
imageUrl
|
|
669
|
+
tax
|
|
670
|
+
total
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
contact {
|
|
674
|
+
email
|
|
675
|
+
phone
|
|
676
|
+
name
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
customFields {
|
|
680
|
+
type
|
|
681
|
+
id
|
|
682
|
+
fields {
|
|
683
|
+
name
|
|
684
|
+
value
|
|
685
|
+
refId
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
`)
|
|
691
|
+
|
|
692
|
+
export const getServerSideProps: GetServerSideProps<
|
|
693
|
+
OrderDetailsPageProps,
|
|
694
|
+
Record<string, string>,
|
|
695
|
+
Locator
|
|
696
|
+
> = async (context) => {
|
|
697
|
+
// TODO validate permissions here
|
|
698
|
+
|
|
699
|
+
const { isFaststoreMyAccountEnabled, redirect } = getMyAccountRedirect({
|
|
700
|
+
query: context.query,
|
|
701
|
+
})
|
|
702
|
+
|
|
703
|
+
if (!isFaststoreMyAccountEnabled) {
|
|
704
|
+
return { redirect }
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
const {
|
|
708
|
+
previewData,
|
|
709
|
+
params: { id },
|
|
710
|
+
} = context
|
|
711
|
+
const [
|
|
712
|
+
globalSectionsPromise,
|
|
713
|
+
globalSectionsHeaderPromise,
|
|
714
|
+
globalSectionsFooterPromise,
|
|
715
|
+
] = getGlobalSectionsData(previewData)
|
|
716
|
+
|
|
717
|
+
const [
|
|
718
|
+
orderDetails,
|
|
719
|
+
globalSections,
|
|
720
|
+
globalSectionsHeader,
|
|
721
|
+
globalSectionsFooter,
|
|
722
|
+
] = await Promise.all([
|
|
723
|
+
execute<
|
|
724
|
+
ServerOrderDetailsQueryQueryVariables,
|
|
725
|
+
ServerOrderDetailsQueryQuery
|
|
726
|
+
>(
|
|
727
|
+
{
|
|
728
|
+
variables: { orderId: id },
|
|
729
|
+
operation: query,
|
|
730
|
+
},
|
|
731
|
+
{ headers: { ...context.req.headers } }
|
|
732
|
+
),
|
|
733
|
+
globalSectionsPromise,
|
|
734
|
+
globalSectionsHeaderPromise,
|
|
735
|
+
globalSectionsFooterPromise,
|
|
736
|
+
])
|
|
737
|
+
|
|
738
|
+
if (orderDetails.errors) {
|
|
739
|
+
const statusCode: number = (orderDetails.errors[0] as any)?.extensions
|
|
740
|
+
?.status
|
|
741
|
+
const destination: string =
|
|
742
|
+
statusCode === 403 ? '/account/403' : '/account/404'
|
|
743
|
+
|
|
744
|
+
return {
|
|
745
|
+
redirect: {
|
|
746
|
+
destination,
|
|
747
|
+
permanent: false,
|
|
748
|
+
},
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
const globalSectionsResult = injectGlobalSections({
|
|
753
|
+
globalSections,
|
|
754
|
+
globalSectionsHeader,
|
|
755
|
+
globalSectionsFooter,
|
|
756
|
+
})
|
|
757
|
+
|
|
758
|
+
return {
|
|
759
|
+
props: {
|
|
760
|
+
globalSections: globalSectionsResult,
|
|
761
|
+
order: orderDetails.data.userOrder,
|
|
762
|
+
},
|
|
763
|
+
}
|
|
764
|
+
}
|