@akinon/projectzero 2.0.0-beta.9 → 2.0.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/CHANGELOG.md +183 -17
- package/app-template/.env.example +3 -0
- package/app-template/.github/instructions/account.instructions.md +749 -0
- package/app-template/.github/instructions/checkout.instructions.md +678 -0
- package/app-template/.github/instructions/default.instructions.md +279 -0
- package/app-template/.github/instructions/edge-cases.instructions.md +73 -0
- package/app-template/.github/instructions/routing.instructions.md +603 -0
- package/app-template/.github/instructions/settings.instructions.md +338 -0
- package/app-template/.gitignore +3 -0
- package/app-template/AGENTS.md +7 -0
- package/app-template/CHANGELOG.md +2033 -232
- package/app-template/Procfile +1 -1
- package/app-template/akinon.json +1 -4
- package/app-template/build.sh +10 -0
- package/app-template/docs/advanced-usage.md +111 -0
- package/app-template/docs/plugins.md +60 -25
- package/app-template/docs/sentry-usage.md +35 -0
- package/app-template/jest.config.ts +2 -2
- package/app-template/next-env.d.ts +1 -0
- package/app-template/{next.config.ts → next.config.mjs} +6 -7
- package/app-template/package.json +58 -50
- package/app-template/postcss.config.mjs +1 -4
- package/app-template/public/amex.svg +12 -0
- package/app-template/public/apple-pay.svg +16 -0
- package/app-template/public/assets/images/product-placeholder-1.jpg +0 -0
- package/app-template/public/assets/images/product-placeholder-2.jpg +0 -0
- package/app-template/public/assets/images/product-placeholder-3.jpg +0 -0
- package/app-template/public/assets/images/product-placeholder-4.jpg +0 -0
- package/app-template/public/google-pay.svg +16 -0
- package/app-template/public/locales/en/account.json +9 -4
- package/app-template/public/locales/en/auth.json +6 -7
- package/app-template/public/locales/en/basket.json +6 -6
- package/app-template/public/locales/en/blog.json +7 -0
- package/app-template/public/locales/en/category.json +3 -1
- package/app-template/public/locales/en/checkout.json +17 -4
- package/app-template/public/locales/en/common.json +61 -3
- package/app-template/public/locales/en/forgot_password.json +6 -7
- package/app-template/public/locales/en/product.json +84 -4
- package/app-template/public/locales/tr/account.json +9 -4
- package/app-template/public/locales/tr/auth.json +16 -17
- package/app-template/public/locales/tr/basket.json +4 -4
- package/app-template/public/locales/tr/blog.json +7 -0
- package/app-template/public/locales/tr/category.json +3 -1
- package/app-template/public/locales/tr/checkout.json +48 -36
- package/app-template/public/locales/tr/common.json +60 -2
- package/app-template/public/locales/tr/forgot_password.json +12 -13
- package/app-template/public/locales/tr/product.json +82 -0
- package/app-template/public/logo.svg +3 -27
- package/app-template/public/mastercard.svg +14 -0
- package/app-template/public/masterpass-javascript-sdk-web.min.js +1 -0
- package/app-template/public/promotion-banner.jpg +0 -0
- package/app-template/public/shop-pay.svg +12 -0
- package/app-template/public/visa.svg +12 -0
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/[...prettyurl]/page.tsx +11 -11
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/layout.tsx +4 -3
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/orders/[id]/cancellation/page.tsx +13 -10
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/orders/[id]/page.tsx +73 -51
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/page.tsx +1 -1
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/profile/page.tsx +2 -2
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/address/stores/page.tsx +2 -2
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/auth/page.tsx +1 -1
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/basket/page.tsx +2 -2
- package/app-template/src/app/[pz]/blog/[slug]/page.tsx +120 -0
- package/app-template/src/app/[pz]/category/[pk]/page.tsx +37 -0
- package/app-template/src/app/[pz]/flat-page/[pk]/page.tsx +23 -0
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/forms/[pk]/generate/page.tsx +2 -3
- package/app-template/src/app/[pz]/group-product/[pk]/page.tsx +93 -0
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/landing-page/[pk]/page.tsx +2 -4
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/layout.tsx +6 -11
- package/app-template/src/app/[pz]/list/page.tsx +26 -0
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/not-found.tsx +5 -7
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/orders/completed/[token]/page.tsx +6 -4
- package/app-template/src/app/[pz]/page.tsx +28 -0
- package/app-template/src/app/[pz]/pages/[slug]/page.tsx +19 -0
- package/app-template/src/app/[pz]/product/[pk]/page.tsx +102 -0
- package/app-template/src/app/[pz]/special-page/[pk]/page.tsx +35 -0
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/users/email-set-primary/[[...id]]/page.tsx +3 -4
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/users/registration/account-confirm-email/[[...id]]/page.tsx +3 -3
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/users/reset/[[...id]]/page.tsx +41 -5
- package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/xml-sitemap/[node]/route.ts +8 -6
- package/app-template/src/app/api/auth/[...nextauth]/route.ts +3 -0
- package/app-template/src/app/api/barcode-search/route.ts +1 -0
- package/app-template/src/app/api/cache/route.ts +1 -1
- package/app-template/src/app/api/form/[...id]/route.ts +1 -7
- package/app-template/src/app/api/image-proxy/route.ts +1 -0
- package/app-template/src/app/api/logout/route.ts +1 -1
- package/app-template/src/app/api/product-categories/route.ts +1 -0
- package/app-template/src/app/api/similar-product-list/route.ts +1 -0
- package/app-template/src/app/api/similar-products/route.ts +1 -0
- package/app-template/src/app/api/theme-settings/route.ts +12 -0
- package/app-template/src/app/api/virtual-try-on/limited-categories/route.ts +1 -0
- package/app-template/src/app/api/virtual-try-on/route.ts +1 -0
- package/app-template/src/app/api/web-vitals/route.ts +1 -1
- package/app-template/src/assets/fonts/pz-icon.css +211 -49
- package/app-template/src/assets/fonts/pz-icon.eot +0 -0
- package/app-template/src/assets/fonts/pz-icon.html +486 -0
- package/app-template/src/assets/fonts/pz-icon.scss +373 -49
- package/app-template/src/assets/fonts/pz-icon.svg +215 -53
- package/app-template/src/assets/fonts/pz-icon.ttf +0 -0
- package/app-template/src/assets/fonts/pz-icon.woff +0 -0
- package/app-template/src/assets/fonts/pz-icon.woff2 +0 -0
- package/app-template/src/assets/globals.scss +8 -133
- package/app-template/src/assets/icons/arrow-right.svg +3 -0
- package/app-template/src/assets/icons/cart.svg +4 -12
- package/app-template/src/assets/icons/check.svg +2 -18
- package/app-template/src/assets/icons/chevron-down.svg +2 -7
- package/app-template/src/assets/icons/delete.svg +3 -0
- package/app-template/src/assets/icons/facebook.svg +2 -8
- package/app-template/src/assets/icons/fav-off.svg +5 -0
- package/app-template/src/assets/icons/fav-on.svg +5 -0
- package/app-template/src/assets/icons/filter-and-sort.svg +3 -0
- package/app-template/src/assets/icons/heart.svg +3 -0
- package/app-template/src/assets/icons/instagram.svg +2 -13
- package/app-template/src/assets/icons/materials.svg +3 -0
- package/app-template/src/assets/icons/person.svg +4 -0
- package/app-template/src/assets/icons/pinterest.svg +5 -11
- package/app-template/src/assets/icons/ruler.svg +3 -0
- package/app-template/src/assets/icons/search.svg +8 -11
- package/app-template/src/assets/icons/share.svg +2 -9
- package/app-template/src/assets/icons/snapchat.svg +3 -0
- package/app-template/src/assets/icons/tiktok.svg +3 -0
- package/app-template/src/assets/icons/tumblr.svg +6 -0
- package/app-template/src/assets/icons/twitter.svg +2 -10
- package/app-template/src/assets/icons/vimeo.svg +3 -0
- package/app-template/src/assets/icons/youtube.svg +3 -0
- package/app-template/src/assets/icons/zoom.svg +8 -0
- package/app-template/src/auth.ts +3 -0
- package/app-template/src/components/__tests__/badge.test.tsx +2 -2
- package/app-template/src/components/__tests__/link.test.tsx +2 -0
- package/app-template/src/components/accordion.tsx +48 -23
- package/app-template/src/components/action-tooltip.tsx +160 -0
- package/app-template/src/components/button.tsx +1 -1
- package/app-template/src/components/carousel-core.tsx +4 -11
- package/app-template/src/components/checkbox.tsx +2 -1
- package/app-template/src/components/currency-select.tsx +150 -4
- package/app-template/src/components/file-input.tsx +27 -7
- package/app-template/src/components/generate-form-fields.tsx +49 -10
- package/app-template/src/components/icon.tsx +5 -6
- package/app-template/src/components/index.ts +4 -1
- package/app-template/src/components/input.tsx +11 -5
- package/app-template/src/components/language-select.tsx +88 -2
- package/app-template/src/components/modal.tsx +34 -16
- package/app-template/src/components/pagination.tsx +133 -20
- package/app-template/src/components/price.tsx +1 -1
- package/app-template/src/components/pwa-tags.tsx +1 -0
- package/app-template/src/components/quantity-input.tsx +63 -0
- package/app-template/src/components/quantity-selector.tsx +215 -0
- package/app-template/src/components/route-handler.tsx +50 -0
- package/app-template/src/components/select.tsx +86 -54
- package/app-template/src/components/shimmer.tsx +1 -1
- package/app-template/src/components/types/index.ts +51 -1
- package/app-template/src/components/widget-content.tsx +323 -0
- package/app-template/src/data/server/theme.ts +70 -0
- package/app-template/src/hooks/use-fav-button.tsx +9 -10
- package/app-template/src/hooks/use-product-cart.ts +80 -0
- package/app-template/src/hooks/use-stock-alert.ts +74 -0
- package/app-template/src/hooks/use-theme-settings.ts +42 -0
- package/app-template/src/lib/fonts.ts +149 -0
- package/app-template/src/plugins.js +12 -2
- package/app-template/src/{middleware.ts → proxy.ts} +3 -3
- package/app-template/src/redux/middlewares/category.ts +5 -4
- package/app-template/src/redux/store.ts +21 -1
- package/app-template/src/routes/index.ts +8 -7
- package/app-template/src/settings.js +6 -3
- package/app-template/src/types/hookform-resolvers-yup.d.ts +28 -0
- package/app-template/src/types/index.ts +74 -3
- package/app-template/src/types/next-auth.d.ts +2 -2
- package/app-template/src/types/widget.ts +169 -0
- package/app-template/src/utils/__tests__/theme-page-context.test.ts +145 -0
- package/app-template/src/utils/formatDate.ts +48 -0
- package/app-template/src/utils/styles.ts +71 -0
- package/app-template/src/utils/theme-page-context.ts +309 -0
- package/app-template/src/utils/variant-validation.ts +41 -0
- package/app-template/src/views/account/address-form.tsx +8 -4
- package/app-template/src/views/account/contact-form.tsx +148 -131
- package/app-template/src/views/account/content-header.tsx +4 -3
- package/app-template/src/views/account/faq/faq-tabs.tsx +8 -2
- package/app-template/src/views/account/favorite-item.tsx +1 -1
- package/app-template/src/views/account/order.tsx +11 -9
- package/app-template/src/views/account/orders/order-cancellation-item.tsx +1 -1
- package/app-template/src/views/account/orders/order-detail-header.tsx +1 -1
- package/app-template/src/views/anonymous-tracking/order-detail/index.tsx +45 -38
- package/app-template/src/views/basket/basket-item.tsx +6 -1
- package/app-template/src/views/basket/summary.tsx +16 -0
- package/app-template/src/views/breadcrumb.tsx +2 -2
- package/app-template/src/views/category/category-banner.tsx +4 -23
- package/app-template/src/views/category/category-info.tsx +2 -1
- package/app-template/src/views/category/filters/filter-item.tsx +138 -42
- package/app-template/src/views/category/filters/index.tsx +1 -1
- package/app-template/src/views/category/layout.tsx +1 -0
- package/app-template/src/views/checkout/auth.tsx +64 -40
- package/app-template/src/views/checkout/layout/header.tsx +10 -6
- package/app-template/src/views/checkout/steps/payment/options/credit-card/index.tsx +22 -6
- package/app-template/src/views/checkout/steps/payment/options/funds-transfer.tsx +25 -5
- package/app-template/src/views/checkout/steps/payment/options/loyalty.tsx +21 -2
- package/app-template/src/views/checkout/steps/payment/options/redirection.tsx +27 -5
- package/app-template/src/views/checkout/steps/payment/options/store-credit.tsx +464 -0
- package/app-template/src/views/checkout/steps/payment/payment-option-buttons.tsx +4 -4
- package/app-template/src/views/checkout/steps/shipping/address-box.tsx +33 -20
- package/app-template/src/views/checkout/steps/shipping/addresses.tsx +2 -2
- package/app-template/src/views/checkout/summary.tsx +12 -2
- package/app-template/src/views/find-in-store/index.tsx +2 -2
- package/app-template/src/views/guest-login/index.tsx +62 -58
- package/app-template/src/views/header/action-menu.tsx +1 -1
- package/app-template/src/views/header/band.tsx +2 -2
- package/app-template/src/views/header/index.tsx +1 -1
- package/app-template/src/views/header/mini-basket.tsx +3 -3
- package/app-template/src/views/header/mobile-hamburger-button.tsx +5 -8
- package/app-template/src/views/header/mobile-menu.tsx +18 -6
- package/app-template/src/views/header/navbar.tsx +1 -1
- package/app-template/src/views/header/pwa-back-button.tsx +1 -1
- package/app-template/src/views/header/search/index.tsx +13 -3
- package/app-template/src/views/header/search/results.tsx +1 -1
- package/app-template/src/views/header/user-menu.tsx +1 -3
- package/app-template/src/views/login/index.tsx +66 -57
- package/app-template/src/views/otp-login/index.tsx +11 -6
- package/app-template/src/views/product/index.ts +1 -0
- package/app-template/src/views/product/layout.tsx +26 -6
- package/app-template/src/views/product/price-wrapper.tsx +3 -24
- package/app-template/src/views/product/product-actions.tsx +165 -0
- package/app-template/src/views/product/product-info.tsx +76 -238
- package/app-template/src/views/product/product-share.tsx +58 -0
- package/app-template/src/views/product/product-variants.tsx +26 -0
- package/app-template/src/views/product/slider.tsx +22 -1
- package/app-template/src/views/product/variant.tsx +69 -41
- package/app-template/src/views/product-pointer-banner-item.tsx +1 -1
- package/app-template/src/views/register/index.tsx +31 -46
- package/app-template/src/views/sales-contract-modal/index.tsx +17 -17
- package/app-template/src/views/share/index.tsx +9 -6
- package/app-template/src/views/widgets/home-hero-slider-content.tsx +41 -39
- package/app-template/src/widgets/flatpages/about-us/index.tsx +78 -0
- package/app-template/src/widgets/flatpages/blog-list/index.tsx +129 -0
- package/app-template/src/widgets/footer-info.tsx +1 -1
- package/app-template/src/widgets/footer-menu.tsx +7 -3
- package/app-template/src/widgets/footer-subscription/footer-subscription-form.tsx +17 -14
- package/app-template/src/widgets/footer-subscription/index.tsx +1 -1
- package/app-template/src/widgets/home-stories-eng.tsx +43 -35
- package/app-template/src/widgets/index.ts +7 -0
- package/app-template/src/widgets/schemas/about-us.json +46 -0
- package/app-template/src/widgets/schemas/blog-list.json +37 -0
- package/app-template/src/widgets/schemas/blog.json +29 -0
- package/app-template/tailwind.config.js +155 -7
- package/app-template/tsconfig.json +29 -11
- package/codemods/migrate-auth-v5/index.js +339 -0
- package/codemods/migrate-auth-v5/transform.js +86 -0
- package/codemods/migrate-segments/index.js +591 -0
- package/codemods/update-tailwind-config/index.js +30 -0
- package/codemods/update-tailwind-config/transform.js +102 -0
- package/codemods/upgrade-to-2/index.js +549 -0
- package/commands/codemod.ts +0 -1
- package/commands/plugins.ts +111 -46
- package/dist/commands/codemod.js +0 -1
- package/dist/commands/plugins.js +104 -36
- package/package.json +3 -2
- package/app-template/src/app/[commerce]/[locale]/[currency]/category/[pk]/page.tsx +0 -22
- package/app-template/src/app/[commerce]/[locale]/[currency]/flat-page/[pk]/page.tsx +0 -20
- package/app-template/src/app/[commerce]/[locale]/[currency]/group-product/[pk]/page.tsx +0 -74
- package/app-template/src/app/[commerce]/[locale]/[currency]/list/page.tsx +0 -18
- package/app-template/src/app/[commerce]/[locale]/[currency]/page.tsx +0 -50
- package/app-template/src/app/[commerce]/[locale]/[currency]/product/[pk]/page.tsx +0 -84
- package/app-template/src/app/[commerce]/[locale]/[currency]/special-page/[pk]/page.tsx +0 -27
- package/app-template/src/pages/api/auth/[...nextauth].ts +0 -3
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/address/page.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/change-email/page.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/change-password/page.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/contact/page.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/coupons/page.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/email-verification/page.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/faq/page.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/favourite-products/page.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/my-quotations/page.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/orders/[id]/layout.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/orders/page.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/anonymous-tracking/page.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/auth/oauth-login/page.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/basket-b2b/page.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/category/[pk]/loading.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/client-root.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/contact-us/page.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/error.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/flat-page/[pk]/loading.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/group-product/[pk]/loading.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/landing-page/[pk]/loading.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/list/loading.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/orders/checkout/page.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/orders/completed/[token]/layout.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/special-page/[pk]/loading.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/template.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/users/password/reset/page.tsx +0 -0
- /package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/xml-sitemap/route.ts +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg width="38" height="24" viewBox="0 0 38 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#2mu4dnqfla)">
|
|
3
|
+
<path opacity=".07" d="M35 0H3C1.3 0 0 1.3 0 3v18c0 1.7 1.4 3 3 3h32c1.7 0 3-1.3 3-3V3c0-1.7-1.4-3-3-3z" fill="#000"/>
|
|
4
|
+
<path d="M35 1c1.1 0 2 .9 2 2v18c0 1.1-.9 2-2 2H3c-1.1 0-2-.9-2-2V3c0-1.1.9-2 2-2h32z" fill="#5A31F4"/>
|
|
5
|
+
<path d="M21.382 9.713c0 1.668-1.177 2.858-2.82 2.858h-1.55a.132.132 0 0 0-.13.13v2.191a.13.13 0 0 1-.08.12.13.13 0 0 1-.05.01h-1.084a.13.13 0 0 1-.13-.13V6.985a.127.127 0 0 1 .08-.12.129.129 0 0 1 .05-.01h2.9c1.637 0 2.814 1.19 2.814 2.858zm-1.352 0c0-.958-.658-1.658-1.55-1.658h-1.468a.13.13 0 0 0-.12.08.13.13 0 0 0-.01.05v3.05a.127.127 0 0 0 .038.092.13.13 0 0 0 .092.038h1.468c.892.005 1.55-.695 1.55-1.652zm1.674 3.791a1.528 1.528 0 0 1 .647-1.317c.423-.316 1.084-.48 2.055-.514l1.033-.036v-.303c0-.607-.41-.863-1.068-.863-.658 0-1.075.231-1.17.61a.127.127 0 0 1-.125.09h-1.022a.13.13 0 0 1-.126-.092.125.125 0 0 1-.004-.055c.152-.898.904-1.58 2.494-1.58 1.692 0 2.303.783 2.303 2.276v3.172a.13.13 0 0 1-.132.13h-1.03a.13.13 0 0 1-.13-.13v-.237a.096.096 0 0 0-.118-.096.1.1 0 0 0-.05.027c-.31.334-.808.575-1.607.575-1.175 0-1.95-.607-1.95-1.657zm3.735-.687v-.246l-1.339.07c-.705.036-1.115.326-1.115.816 0 .444.376.69 1.034.69.893 0 1.42-.48 1.42-1.33zm2.316 4.6v-.919a.13.13 0 0 1 .1-.125.13.13 0 0 1 .057-.002c.158.03.318.044.48.044a1.23 1.23 0 0 0 1.244-.876l.067-.21a.133.133 0 0 0 0-.089L27.558 9.77a.13.13 0 0 1 .122-.18h1.04a.132.132 0 0 1 .123.085l1.456 3.86a.131.131 0 0 0 .125.087.133.133 0 0 0 .125-.088l1.265-3.848a.13.13 0 0 1 .126-.09h1.076a.134.134 0 0 1 .132.116.134.134 0 0 1-.008.063l-2.295 6.076c-.528 1.413-1.433 1.773-2.43 1.773a1.963 1.963 0 0 1-.56-.066.132.132 0 0 1-.1-.14zM8.57 6.4a5.363 5.363 0 0 0-3.683 1.427.231.231 0 0 0-.029.31l.618.84a.236.236 0 0 0 .362.027 3.823 3.823 0 0 1 2.738-1.11c2.12 0 3.227 1.584 3.227 3.15 0 1.7-1.163 2.898-2.835 2.921-1.292 0-2.266-.85-2.266-1.974a1.908 1.908 0 0 1 .713-1.48.231.231 0 0 0 .033-.324l-.65-.815a.236.236 0 0 0-.339-.034 3.43 3.43 0 0 0-.942 1.183 3.39 3.39 0 0 0-.337 1.47c0 1.935 1.655 3.452 3.775 3.464h.03c2.517-.032 4.337-1.884 4.337-4.415 0-2.247-1.667-4.64-4.752-4.64z" fill="#fff"/>
|
|
6
|
+
</g>
|
|
7
|
+
<defs>
|
|
8
|
+
<clipPath id="2mu4dnqfla">
|
|
9
|
+
<path fill="#fff" d="M0 0h38v24H0z"/>
|
|
10
|
+
</clipPath>
|
|
11
|
+
</defs>
|
|
12
|
+
</svg>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg width="38" height="24" viewBox="0 0 38 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#ezvyrlvp0a)">
|
|
3
|
+
<path opacity=".07" d="M35 0H3C1.3 0 0 1.3 0 3v18c0 1.7 1.4 3 3 3h32c1.7 0 3-1.3 3-3V3c0-1.7-1.4-3-3-3z" fill="#000"/>
|
|
4
|
+
<path d="M35 1c1.1 0 2 .9 2 2v18c0 1.1-.9 2-2 2H3c-1.1 0-2-.9-2-2V3c0-1.1.9-2 2-2h32z" fill="#fff"/>
|
|
5
|
+
<path d="M28.3 10.1H28c-.4 1-.7 1.5-1 3h1.9c-.3-1.5-.3-2.2-.6-3zm2.9 5.9h-1.7c-.1 0-.1 0-.2-.1l-.2-.9-.1-.2h-2.4c-.1 0-.2 0-.2.2l-.3.9c0 .1-.1.1-.1.1h-2.1l.2-.5L27 8.7c0-.5.3-.7.8-.7h1.5c.1 0 .2 0 .2.2l1.4 6.5c.1.4.2.7.2 1.1.1.1.1.1.1.2zm-13.4-.3.4-1.8c.1 0 .2.1.2.1.7.3 1.4.5 2.1.4.2 0 .5-.1.7-.2.5-.2.5-.7.1-1.1-.2-.2-.5-.3-.8-.5-.4-.2-.8-.4-1.1-.7-1.2-1-.8-2.4-.1-3.1.6-.4.9-.8 1.7-.8 1.2 0 2.5 0 3.1.2h.1c-.1.6-.2 1.1-.4 1.7-.5-.2-1-.4-1.5-.4-.3 0-.6 0-.9.1-.2 0-.3.1-.4.2-.2.2-.2.5 0 .7l.5.4c.4.2.8.4 1.1.6.5.3 1 .8 1.1 1.4.2.9-.1 1.7-.9 2.3-.5.4-.7.6-1.4.6-1.4 0-2.5.1-3.4-.2-.1.2-.1.2-.2.1zm-3.5.3c.1-.7.1-.7.2-1 .5-2.2 1-4.5 1.4-6.7.1-.2.1-.3.3-.3H18c-.2 1.2-.4 2.1-.7 3.2-.3 1.5-.6 3-1 4.5 0 .2-.1.2-.3.2l-1.7.1zM5 8.2c0-.1.2-.2.3-.2h3.4c.5 0 .9.3 1 .8l.9 4.4c0 .1 0 .1.1.2 0-.1.1-.1.1-.1l2.1-5.1c-.1-.1 0-.2.1-.2h2.1c0 .1 0 .1-.1.2l-3.1 7.3c-.1.2-.1.3-.2.4-.1.1-.3 0-.5 0H9.7c-.1 0-.2 0-.2-.2L7.9 9.5c-.2-.2-.5-.5-.9-.6-.6-.3-1.7-.5-1.9-.5L5 8.2z" fill="#142688"/>
|
|
6
|
+
</g>
|
|
7
|
+
<defs>
|
|
8
|
+
<clipPath id="ezvyrlvp0a">
|
|
9
|
+
<path fill="#fff" d="M0 0h38v24H0z"/>
|
|
10
|
+
</clipPath>
|
|
11
|
+
</defs>
|
|
12
|
+
</svg>
|
package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/[...prettyurl]/page.tsx
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { URLS } from '@akinon/next/data/urls';
|
|
2
|
-
import { Metadata,
|
|
2
|
+
import { Metadata, AsyncPageProps } from '@akinon/next/types';
|
|
3
3
|
import logger from '@akinon/next/utils/log';
|
|
4
4
|
import { notFound } from 'next/navigation';
|
|
5
5
|
|
|
@@ -56,7 +56,7 @@ const resolvePrettyUrlHandler =
|
|
|
56
56
|
return prettyUrlResult;
|
|
57
57
|
};
|
|
58
58
|
|
|
59
|
-
export async function generateMetadata(props:
|
|
59
|
+
export async function generateMetadata(props: AsyncPageProps) {
|
|
60
60
|
const params = await props.params;
|
|
61
61
|
let result: Metadata = {};
|
|
62
62
|
const { prettyurl } = params;
|
|
@@ -78,41 +78,41 @@ export async function generateMetadata(props: PageProps) {
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
const commonProps = {
|
|
81
|
-
params: {
|
|
81
|
+
params: Promise.resolve({
|
|
82
82
|
...params,
|
|
83
83
|
pk: prettyUrlResult.pk
|
|
84
|
-
},
|
|
84
|
+
}),
|
|
85
85
|
searchParams: Promise.resolve(searchParams)
|
|
86
86
|
};
|
|
87
87
|
|
|
88
88
|
try {
|
|
89
89
|
if (prettyUrlResult.path.startsWith('/product/')) {
|
|
90
90
|
await import('@product/[pk]/page').then(async (module) => {
|
|
91
|
-
result = await module['generateMetadata']?.(commonProps);
|
|
91
|
+
result = await module['generateMetadata']?.(commonProps as any);
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
if (prettyUrlResult.path.startsWith('/group-product/')) {
|
|
96
96
|
await import('@group-product/[pk]/page').then(async (module) => {
|
|
97
|
-
result = await module['generateMetadata']?.(commonProps);
|
|
97
|
+
result = await module['generateMetadata']?.(commonProps as any);
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
if (prettyUrlResult.path.startsWith('/category/')) {
|
|
102
102
|
await import('@category/[pk]/page').then(async (module) => {
|
|
103
|
-
result = await module['generateMetadata']?.(commonProps);
|
|
103
|
+
result = await module['generateMetadata']?.(commonProps as any);
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
if (prettyUrlResult.path.startsWith('/special-page/')) {
|
|
108
108
|
await import('@special-page/[pk]/page').then(async (module) => {
|
|
109
|
-
result = await module['generateMetadata']?.(commonProps);
|
|
109
|
+
result = await module['generateMetadata']?.(commonProps as any);
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
if (prettyUrlResult.path.startsWith('/flat-page/')) {
|
|
114
114
|
await import('@flat-page/[pk]/page').then(async (module) => {
|
|
115
|
-
result = await module['generateMetadata']?.(commonProps);
|
|
115
|
+
result = await module['generateMetadata']?.(commonProps as any);
|
|
116
116
|
});
|
|
117
117
|
}
|
|
118
118
|
// eslint-disable-next-line no-empty
|
|
@@ -161,8 +161,8 @@ export default async function Page(props) {
|
|
|
161
161
|
...params,
|
|
162
162
|
pk: result.pk
|
|
163
163
|
},
|
|
164
|
-
searchParams:
|
|
165
|
-
};
|
|
164
|
+
searchParams: urlSearchParams
|
|
165
|
+
} as any;
|
|
166
166
|
|
|
167
167
|
if (result.path.startsWith('/category/')) {
|
|
168
168
|
const CategoryPage = (await import('@category/[pk]/page')).default;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import AccountBackButton from '@theme/views/account/back-button';
|
|
2
2
|
import AccountMenu from '@theme/views/account/account-menu';
|
|
3
|
-
import
|
|
3
|
+
import ThemePlaceholder from '@akinon/pz-theme/src/theme-placeholder';
|
|
4
|
+
import { auth } from 'auth';
|
|
4
5
|
import { ROUTES } from 'routes';
|
|
5
6
|
import { redirect } from '@akinon/next/utils/redirect';
|
|
6
7
|
|
|
@@ -9,7 +10,7 @@ export default async function AccountLayout({
|
|
|
9
10
|
}: {
|
|
10
11
|
children: React.ReactNode;
|
|
11
12
|
}) {
|
|
12
|
-
const session = await
|
|
13
|
+
const session = await auth();
|
|
13
14
|
|
|
14
15
|
if (!session?.user) {
|
|
15
16
|
return redirect(ROUTES.AUTH);
|
|
@@ -20,7 +21,7 @@ export default async function AccountLayout({
|
|
|
20
21
|
<AccountMenu />
|
|
21
22
|
<div className="w-full flex-1">
|
|
22
23
|
<AccountBackButton />
|
|
23
|
-
|
|
24
|
+
<ThemePlaceholder slug="account-page-body" />
|
|
24
25
|
{children}
|
|
25
26
|
</div>
|
|
26
27
|
</div>
|
|
@@ -18,7 +18,8 @@ import {
|
|
|
18
18
|
Link,
|
|
19
19
|
FileInput
|
|
20
20
|
} from '@theme/components';
|
|
21
|
-
import { useState
|
|
21
|
+
import { useState } from 'react';
|
|
22
|
+
import { useParams } from 'next/navigation';
|
|
22
23
|
import { OrderDetailHeader } from '@theme/views/account/orders/order-detail-header';
|
|
23
24
|
import { OrderCancellationItem } from '@theme/views/account/orders/order-cancellation-item';
|
|
24
25
|
import { useLocalization } from '@akinon/next/hooks';
|
|
@@ -27,9 +28,8 @@ const accountOrderCancellationSchema = yup.object().shape({
|
|
|
27
28
|
return_policy: yup.boolean().oneOf([true], 'This field is required.')
|
|
28
29
|
});
|
|
29
30
|
|
|
30
|
-
const AccountOrderCancellation = (
|
|
31
|
-
const
|
|
32
|
-
|
|
31
|
+
const AccountOrderCancellation = () => {
|
|
32
|
+
const params = useParams<{ id: string }>();
|
|
33
33
|
const { t } = useLocalization();
|
|
34
34
|
const {
|
|
35
35
|
register,
|
|
@@ -50,7 +50,7 @@ const AccountOrderCancellation = ({ params }) => {
|
|
|
50
50
|
data: order,
|
|
51
51
|
isLoading,
|
|
52
52
|
isSuccess: orderSuccess
|
|
53
|
-
} = useGetOrderQuery(
|
|
53
|
+
} = useGetOrderQuery(params.id);
|
|
54
54
|
|
|
55
55
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
56
56
|
const [responseMessage, setResponseMessage] = useState({
|
|
@@ -237,13 +237,13 @@ const AccountOrderCancellation = ({ params }) => {
|
|
|
237
237
|
<div>
|
|
238
238
|
<div className="pb-2 mb-3 text-lg border-gray border-b">
|
|
239
239
|
<span data-testid="account-orders-return-order-count">
|
|
240
|
-
{order
|
|
240
|
+
{order?.orderitem_set?.length}
|
|
241
241
|
</span>{' '}
|
|
242
242
|
<span>{t('account.my_orders.detail.products')}</span>
|
|
243
243
|
</div>
|
|
244
244
|
|
|
245
245
|
<form onSubmit={handleSubmit(onSubmit)}>
|
|
246
|
-
{order
|
|
246
|
+
{order?.orderitem_set?.map((item, index: number) => (
|
|
247
247
|
<Controller
|
|
248
248
|
defaultValue={[]}
|
|
249
249
|
control={control}
|
|
@@ -254,7 +254,7 @@ const AccountOrderCancellation = ({ params }) => {
|
|
|
254
254
|
return cancelItem.order_item === item.id;
|
|
255
255
|
});
|
|
256
256
|
|
|
257
|
-
const cancellationType = item
|
|
257
|
+
const cancellationType = item?.is_refundable
|
|
258
258
|
? 'refund'
|
|
259
259
|
: 'cancel';
|
|
260
260
|
|
|
@@ -270,7 +270,10 @@ const AccountOrderCancellation = ({ params }) => {
|
|
|
270
270
|
onChange={onChange}
|
|
271
271
|
value={value}
|
|
272
272
|
selectOption={selectOption}
|
|
273
|
-
fileInput={fileInputCondition(
|
|
273
|
+
fileInput={fileInputCondition(
|
|
274
|
+
item,
|
|
275
|
+
item?.product?.name
|
|
276
|
+
)}
|
|
274
277
|
/>
|
|
275
278
|
);
|
|
276
279
|
}}
|
|
@@ -297,7 +300,7 @@ const AccountOrderCancellation = ({ params }) => {
|
|
|
297
300
|
</label>
|
|
298
301
|
{errors.return_policy && (
|
|
299
302
|
<div className="text-sm text-error">
|
|
300
|
-
{errors.return_policy.message}
|
|
303
|
+
{String(errors.return_policy.message)}
|
|
301
304
|
</div>
|
|
302
305
|
)}
|
|
303
306
|
</div>
|
package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/orders/[id]/page.tsx
RENAMED
|
@@ -5,7 +5,8 @@ import { Image } from '@akinon/next/components/image';
|
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { SalesContractModal } from '@theme/views/sales-contract-modal';
|
|
7
7
|
import { useGetOrderQuery } from '@akinon/next/data/client/account';
|
|
8
|
-
import { useEffect, useState
|
|
8
|
+
import { useEffect, useState } from 'react';
|
|
9
|
+
import { useParams } from 'next/navigation';
|
|
9
10
|
|
|
10
11
|
import { OrderDetailHeader } from '@theme/views/account/orders/order-detail-header';
|
|
11
12
|
import { ROUTES } from '@theme/routes';
|
|
@@ -13,9 +14,8 @@ import { useLocalization } from '@akinon/next/hooks';
|
|
|
13
14
|
import settings from 'settings';
|
|
14
15
|
import { getOrderStatus } from 'utils';
|
|
15
16
|
|
|
16
|
-
const AccountOrderDetail = (
|
|
17
|
-
const
|
|
18
|
-
|
|
17
|
+
const AccountOrderDetail = () => {
|
|
18
|
+
const { id } = useParams<{ id: string }>();
|
|
19
19
|
const { locale, t } = useLocalization();
|
|
20
20
|
|
|
21
21
|
const localeValue = settings.localization.locales.find(
|
|
@@ -27,20 +27,21 @@ const AccountOrderDetail = ({ params }) => {
|
|
|
27
27
|
isLoading,
|
|
28
28
|
isSuccess,
|
|
29
29
|
isFetching
|
|
30
|
-
} = useGetOrderQuery(
|
|
30
|
+
} = useGetOrderQuery(id);
|
|
31
31
|
const [orderDate, setOrderDate] = useState('');
|
|
32
32
|
|
|
33
33
|
const groupedOrder = [];
|
|
34
34
|
|
|
35
35
|
if (order) {
|
|
36
|
-
const groupedData =
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
groups[tracking_number]
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
const groupedData =
|
|
37
|
+
order?.orderitem_set?.reduce((groups, item) => {
|
|
38
|
+
const { tracking_number } = item;
|
|
39
|
+
if (!groups[tracking_number]) {
|
|
40
|
+
groups[tracking_number] = [];
|
|
41
|
+
}
|
|
42
|
+
groups[tracking_number].push(item);
|
|
43
|
+
return groups;
|
|
44
|
+
}, {}) || {};
|
|
44
45
|
|
|
45
46
|
const result = Object.values(groupedData);
|
|
46
47
|
|
|
@@ -62,7 +63,26 @@ const AccountOrderDetail = ({ params }) => {
|
|
|
62
63
|
}, [order, isSuccess, localeValue]);
|
|
63
64
|
|
|
64
65
|
if (isLoading && isFetching) {
|
|
65
|
-
return
|
|
66
|
+
return (
|
|
67
|
+
<div className="flex flex-col items-center justify-center h-96">
|
|
68
|
+
<LoaderSpinner />
|
|
69
|
+
</div>
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (!order) {
|
|
74
|
+
return (
|
|
75
|
+
<div className="flex flex-col items-center justify-center h-96">
|
|
76
|
+
<p className="mt-5 text-start text-lg mb-4">
|
|
77
|
+
{t('account.my_orders.detail.no_orders_found')}
|
|
78
|
+
</p>
|
|
79
|
+
<Link href={`/account/orders/`}>
|
|
80
|
+
<Button className="px-4" appearance="filled">
|
|
81
|
+
{t('account.my_orders.detail.back_to_orders')}
|
|
82
|
+
</Button>
|
|
83
|
+
</Link>
|
|
84
|
+
</div>
|
|
85
|
+
);
|
|
66
86
|
}
|
|
67
87
|
|
|
68
88
|
return (
|
|
@@ -77,8 +97,8 @@ const AccountOrderDetail = ({ params }) => {
|
|
|
77
97
|
|
|
78
98
|
<div>
|
|
79
99
|
<span className="text-base font-bold">
|
|
80
|
-
{order?.orderitem_set
|
|
81
|
-
{t('account.my_orders.detail.products')} {groupedOrder
|
|
100
|
+
{order?.orderitem_set?.length}{' '}
|
|
101
|
+
{t('account.my_orders.detail.products')} {groupedOrder?.length}{' '}
|
|
82
102
|
{t('account.my_orders.detail.packages')}
|
|
83
103
|
</span>
|
|
84
104
|
</div>
|
|
@@ -88,16 +108,17 @@ const AccountOrderDetail = ({ params }) => {
|
|
|
88
108
|
className="break-words"
|
|
89
109
|
>
|
|
90
110
|
<span>{t('account.my_orders.detail.delivery_address')}</span>:{' '}
|
|
91
|
-
{order
|
|
92
|
-
{order
|
|
93
|
-
{order
|
|
111
|
+
{order?.shipping_address?.line}{' '}
|
|
112
|
+
{order?.shipping_address?.district?.name}{' '}
|
|
113
|
+
{order?.shipping_address?.township?.name}{' '}
|
|
114
|
+
{order?.shipping_address?.city?.name}
|
|
94
115
|
</div>
|
|
95
116
|
</OrderDetailHeader>
|
|
96
117
|
|
|
97
118
|
<div>
|
|
98
119
|
{groupedOrder.map((group, i) => {
|
|
99
120
|
const orderStatus = getOrderStatus(
|
|
100
|
-
group[0]
|
|
121
|
+
group[0]?.status?.value?.toString(),
|
|
101
122
|
t
|
|
102
123
|
);
|
|
103
124
|
|
|
@@ -121,8 +142,8 @@ const AccountOrderDetail = ({ params }) => {
|
|
|
121
142
|
<div className="flex justify-between items-center lg:gap-x-12">
|
|
122
143
|
<div className="text-base">{orderStatus.label}</div>
|
|
123
144
|
|
|
124
|
-
{group[0]
|
|
125
|
-
<Link href={group[0]
|
|
145
|
+
{group[0]?.tracking_number && group[0]?.tracking_url && (
|
|
146
|
+
<Link href={group[0]?.tracking_url}>
|
|
126
147
|
<Button className="px-7" appearance="filled">
|
|
127
148
|
{t('account.my_orders.detail.track_shipment')}
|
|
128
149
|
</Button>
|
|
@@ -134,7 +155,7 @@ const AccountOrderDetail = ({ params }) => {
|
|
|
134
155
|
<div className="px-4 lg:px-7">
|
|
135
156
|
{group.map((item, index) => {
|
|
136
157
|
const itemStatus = getOrderStatus(
|
|
137
|
-
item
|
|
158
|
+
item?.status?.value?.toString(),
|
|
138
159
|
t
|
|
139
160
|
);
|
|
140
161
|
|
|
@@ -144,18 +165,18 @@ const AccountOrderDetail = ({ params }) => {
|
|
|
144
165
|
key={index}
|
|
145
166
|
>
|
|
146
167
|
<div className="flex gap-3 mb-5 lg:mb-0">
|
|
147
|
-
<div className="shrink-0">
|
|
168
|
+
<div className="flex-shrink-0">
|
|
148
169
|
<Link
|
|
149
170
|
className="block"
|
|
150
|
-
href={item
|
|
171
|
+
href={item?.product?.absolute_url}
|
|
151
172
|
>
|
|
152
173
|
<Image
|
|
153
174
|
src={
|
|
154
|
-
item
|
|
175
|
+
item?.product?.image
|
|
155
176
|
? item.product.image
|
|
156
177
|
: '/noimage.jpg'
|
|
157
178
|
}
|
|
158
|
-
alt={item
|
|
179
|
+
alt={item?.product?.name}
|
|
159
180
|
width={112}
|
|
160
181
|
height={150}
|
|
161
182
|
/>
|
|
@@ -164,33 +185,33 @@ const AccountOrderDetail = ({ params }) => {
|
|
|
164
185
|
|
|
165
186
|
<div className="flex flex-col justify-between lg:max-w-48">
|
|
166
187
|
<div className="text-sm">
|
|
167
|
-
<Link href={item
|
|
168
|
-
{item
|
|
188
|
+
<Link href={item?.product?.absolute_url}>
|
|
189
|
+
{item?.product?.name}
|
|
169
190
|
</Link>
|
|
170
191
|
</div>
|
|
171
192
|
|
|
172
193
|
<div className="text-gray-900 text-xs">
|
|
173
|
-
{item
|
|
194
|
+
{item?.product?.attributes?.filterable_color && (
|
|
174
195
|
<div>
|
|
175
196
|
<span>
|
|
176
197
|
{t('account.my_orders.detail.color')}
|
|
177
198
|
</span>
|
|
178
|
-
: {item
|
|
199
|
+
: {item?.product?.attributes?.filterable_color}
|
|
179
200
|
</div>
|
|
180
201
|
)}
|
|
181
202
|
|
|
182
|
-
{item
|
|
203
|
+
{item?.product?.attributes?.size && (
|
|
183
204
|
<div>
|
|
184
205
|
<span>
|
|
185
206
|
{t('account.my_orders.detail.size')}
|
|
186
207
|
</span>
|
|
187
|
-
:{item
|
|
208
|
+
:{item?.product?.attributes?.size}
|
|
188
209
|
</div>
|
|
189
210
|
)}
|
|
190
211
|
|
|
191
212
|
<div>
|
|
192
213
|
<span>{t('account.my_orders.detail.code')}</span>:{' '}
|
|
193
|
-
{item
|
|
214
|
+
{item?.product?.base_code}
|
|
194
215
|
</div>
|
|
195
216
|
</div>
|
|
196
217
|
</div>
|
|
@@ -207,11 +228,11 @@ const AccountOrderDetail = ({ params }) => {
|
|
|
207
228
|
{itemStatus.label}
|
|
208
229
|
</div>
|
|
209
230
|
|
|
210
|
-
{(item
|
|
211
|
-
order
|
|
231
|
+
{(item?.is_cancellable || item?.is_refundable) &&
|
|
232
|
+
order?.is_cancellable && (
|
|
212
233
|
<div className="lg:ml-24">
|
|
213
234
|
<Link
|
|
214
|
-
href={`${ROUTES.ACCOUNT_ORDERS}/${order
|
|
235
|
+
href={`${ROUTES.ACCOUNT_ORDERS}/${order?.id}/cancellation`}
|
|
215
236
|
>
|
|
216
237
|
<Button
|
|
217
238
|
className="px-4 uppercase font-bold h-7"
|
|
@@ -227,21 +248,21 @@ const AccountOrderDetail = ({ params }) => {
|
|
|
227
248
|
)}
|
|
228
249
|
</div>
|
|
229
250
|
<div className="flex flex-col justify-center items-end lg:ml-6 lg:min-w-[7rem]">
|
|
230
|
-
{parseFloat(item
|
|
231
|
-
parseFloat(item
|
|
251
|
+
{parseFloat(item?.retail_price || '0') >
|
|
252
|
+
parseFloat(item?.price || '0') && (
|
|
232
253
|
<Price
|
|
233
254
|
className="font-normal line-through"
|
|
234
|
-
value={item
|
|
255
|
+
value={item?.retail_price}
|
|
235
256
|
/>
|
|
236
257
|
)}
|
|
237
258
|
|
|
238
259
|
<Price
|
|
239
260
|
className={clsx('font-normal', {
|
|
240
261
|
'text-secondary-600':
|
|
241
|
-
parseFloat(item
|
|
242
|
-
parseFloat(item
|
|
262
|
+
parseFloat(item?.retail_price || '0') >
|
|
263
|
+
parseFloat(item?.price || '0')
|
|
243
264
|
})}
|
|
244
|
-
value={item
|
|
265
|
+
value={item?.price}
|
|
245
266
|
/>
|
|
246
267
|
</div>
|
|
247
268
|
</div>
|
|
@@ -325,29 +346,29 @@ const AccountOrderDetail = ({ params }) => {
|
|
|
325
346
|
<div className="flex justify-between text-sm text-black-700 mb-2">
|
|
326
347
|
<p>
|
|
327
348
|
<span>{t('account.my_orders.detail.subtotal')}</span> (
|
|
328
|
-
{order
|
|
349
|
+
{order?.orderitem_set?.length}{' '}
|
|
329
350
|
<span>{t('account.my_orders.detail.items')}</span>)
|
|
330
351
|
</p>
|
|
331
352
|
|
|
332
353
|
<Price
|
|
333
354
|
className="font-normal min-w-max"
|
|
334
355
|
value={
|
|
335
|
-
parseFloat(order
|
|
336
|
-
parseFloat(order
|
|
356
|
+
parseFloat(order?.amount_without_discount || '0') -
|
|
357
|
+
parseFloat(order?.shipping_amount || '0')
|
|
337
358
|
}
|
|
338
359
|
/>
|
|
339
360
|
</div>
|
|
340
361
|
|
|
341
|
-
{order
|
|
342
|
-
order
|
|
362
|
+
{order?.discountitem_set &&
|
|
363
|
+
order?.discountitem_set?.map((item, index) => (
|
|
343
364
|
<div
|
|
344
365
|
className="flex justify-between text-sm text-black-700 mb-2"
|
|
345
366
|
key={index}
|
|
346
367
|
>
|
|
347
|
-
<p>{item
|
|
368
|
+
<p>{item?.name}</p>
|
|
348
369
|
<Price
|
|
349
370
|
className="font-normal min-w-max"
|
|
350
|
-
value={item
|
|
371
|
+
value={item?.amount}
|
|
351
372
|
useNegative
|
|
352
373
|
/>
|
|
353
374
|
</div>
|
|
@@ -360,7 +381,8 @@ const AccountOrderDetail = ({ params }) => {
|
|
|
360
381
|
className="font-normal min-w-max"
|
|
361
382
|
data-testid="account-orders-detail-total"
|
|
362
383
|
value={
|
|
363
|
-
parseFloat(order
|
|
384
|
+
parseFloat(order?.amount || '0') -
|
|
385
|
+
parseFloat(order?.shipping_amount || '0')
|
|
364
386
|
}
|
|
365
387
|
/>
|
|
366
388
|
</div>
|
|
@@ -53,7 +53,7 @@ export default function Page() {
|
|
|
53
53
|
<div className="hidden lg:block">
|
|
54
54
|
<div className="bg-gray-150">
|
|
55
55
|
{orderLoading && (
|
|
56
|
-
<SkeletonWrapper className="w-full px-6 mb-12 h-28 items-center justify-center flex-row
|
|
56
|
+
<SkeletonWrapper className="w-full px-6 mb-12 h-28 items-center justify-center !flex-row xl:h-[5.5rem]">
|
|
57
57
|
<Skeleton className="w-[11.375rem] h-16 mr-4 xl:w-[16rem] xl:h-10" />
|
|
58
58
|
<Skeleton className="w-56 h-10 mr-4" />
|
|
59
59
|
<Skeleton className="w-[12.75rem] h-10 xl:w-56" />
|
package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/account/profile/page.tsx
RENAMED
|
@@ -288,9 +288,9 @@ export default function Page() {
|
|
|
288
288
|
/>
|
|
289
289
|
</div>
|
|
290
290
|
</div>
|
|
291
|
-
{errors && (
|
|
291
|
+
{errors?.birthdate?.message && (
|
|
292
292
|
<div className="mt-1 text-sm text-error">
|
|
293
|
-
{errors.birthdate
|
|
293
|
+
{String(errors.birthdate.message)}
|
|
294
294
|
</div>
|
|
295
295
|
)}
|
|
296
296
|
</div>
|
package/app-template/src/app/{[commerce]/[locale]/[currency] → [pz]}/address/stores/page.tsx
RENAMED
|
@@ -122,7 +122,7 @@ export default function Stores() {
|
|
|
122
122
|
|
|
123
123
|
<div className="flex gap-6 mt-4 flex-col md:flex-row">
|
|
124
124
|
{city && (
|
|
125
|
-
<div className="w-full shrink-0 md:w-60 overflow-y-scroll max-h-[36rem]">
|
|
125
|
+
<div className="w-full flex-shrink-0 md:w-60 overflow-y-scroll max-h-[36rem]">
|
|
126
126
|
{cityLoading && (
|
|
127
127
|
<SkeletonWrapper>
|
|
128
128
|
<Skeleton className="w-full h-20" />
|
|
@@ -174,7 +174,7 @@ export default function Stores() {
|
|
|
174
174
|
title={store.name}
|
|
175
175
|
titleClassName="text-xs font-bold"
|
|
176
176
|
iconSize={12}
|
|
177
|
-
className="relative py-3 border-b
|
|
177
|
+
className="relative py-3 border-b justify-center mb-0"
|
|
178
178
|
>
|
|
179
179
|
<div className="text-xs">
|
|
180
180
|
{store.address && (
|
|
@@ -51,7 +51,7 @@ export default function Auth() {
|
|
|
51
51
|
{t('auth.register.mobile_title')}
|
|
52
52
|
</Button>
|
|
53
53
|
</div>
|
|
54
|
-
<div className="w-full flex flex-wrap border
|
|
54
|
+
<div className="w-full flex flex-wrap border md:border-0">
|
|
55
55
|
<div
|
|
56
56
|
className={twMerge(
|
|
57
57
|
clsx('w-full md:block md:w-1/2', {
|
|
@@ -25,7 +25,7 @@ export default function Page() {
|
|
|
25
25
|
}, [basket, isSuccess]);
|
|
26
26
|
|
|
27
27
|
return (
|
|
28
|
-
<div className="max-w-
|
|
28
|
+
<div className="max-w-screen-xl p-4 flex flex-col text-primary-800 lg:p-8 xl:flex-row xl:mx-auto">
|
|
29
29
|
{isLoading && (
|
|
30
30
|
<div className="flex justify-center w-full">
|
|
31
31
|
<LoaderSpinner />
|
|
@@ -62,7 +62,7 @@ export default function Page() {
|
|
|
62
62
|
<Summary basket={basket} />
|
|
63
63
|
</>
|
|
64
64
|
) : (
|
|
65
|
-
<div className="flex flex-col items-center container max-w-
|
|
65
|
+
<div className="flex flex-col items-center container max-w-screen-sm py-4 px-4 xs:py-6 xs:px-6 sm:py-8 sm:px-8 lg:max-w-screen-xl">
|
|
66
66
|
<h1
|
|
67
67
|
className="w-full text-xl font-light text-secondary text-center sm:text-2xl"
|
|
68
68
|
data-testid="basket-empty"
|