@revenexx/cover 0.1.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/LICENSE +21 -0
- package/README.md +39 -0
- package/app/api/account.ts +8 -0
- package/app/api/categories.ts +3 -0
- package/app/api/checkout.ts +6 -0
- package/app/api/images.ts +4 -0
- package/app/api/markets.ts +3 -0
- package/app/api/product.ts +3 -0
- package/app/api/products.ts +4 -0
- package/app/api/search.ts +4 -0
- package/app/app.config.ts +29 -0
- package/app/assets/css/cover.css +25 -0
- package/app/components/account/AccountMenu.vue +30 -0
- package/app/components/account/AccountShell.vue +18 -0
- package/app/components/account/AccountSidebar.vue +90 -0
- package/app/components/account/address/AccountAddressCard.vue +287 -0
- package/app/components/account/carts/AccountCartsTable.vue +284 -0
- package/app/components/account/dashboard/AccountDashboard.vue +351 -0
- package/app/components/account/directorder/AccountDirectOrder.vue +512 -0
- package/app/components/account/governance/AccountApprovalLimitsTable.vue +221 -0
- package/app/components/account/governance/AccountCostCenterDetail.vue +276 -0
- package/app/components/account/governance/AccountCostCentersTable.vue +252 -0
- package/app/components/account/governance/AccountRequisitionDetail.vue +295 -0
- package/app/components/account/governance/AccountRequisitionsTable.vue +255 -0
- package/app/components/account/governance/AccountWorkflowDetail.vue +215 -0
- package/app/components/account/governance/AccountWorkflowsTable.vue +168 -0
- package/app/components/account/governance/GovernanceApprovalLimitModal.vue +183 -0
- package/app/components/account/governance/GovernanceCostCenterModal.vue +188 -0
- package/app/components/account/governance/GovernanceWorkflowModal.vue +191 -0
- package/app/components/account/orderlists/AccountOrderListDetail.vue +349 -0
- package/app/components/account/orderlists/AccountOrderListsTable.vue +352 -0
- package/app/components/account/orders/AccountOrderDetail.vue +376 -0
- package/app/components/account/orders/AccountOrdersTable.vue +281 -0
- package/app/components/account/preferences/AccountPreferences.vue +50 -0
- package/app/components/auth/AuthForgotPasswordPanel.vue +88 -0
- package/app/components/auth/AuthLoginPanel.vue +103 -0
- package/app/components/auth/AuthLoginTeaser.vue +24 -0
- package/app/components/auth/AuthPageHeader.vue +21 -0
- package/app/components/auth/AuthRegisterPanel.vue +431 -0
- package/app/components/auth/AuthRegisterTeaser.vue +24 -0
- package/app/components/auth/AuthResetPasswordPanel.vue +115 -0
- package/app/components/cart/CartButton.vue +42 -0
- package/app/components/cart/actions/CartCostCenterModal.vue +110 -0
- package/app/components/cart/actions/CartExportModal.vue +82 -0
- package/app/components/cart/actions/CartPositionTextsModal.vue +92 -0
- package/app/components/cart/actions/CartSaveToListModal.vue +177 -0
- package/app/components/cart/actions/CartWorkflowPickerModal.vue +64 -0
- package/app/components/cart/drawer/CartDrawer.vue +49 -0
- package/app/components/cart/item/CartItem.vue +318 -0
- package/app/components/cart/manage/CartNameModal.vue +68 -0
- package/app/components/cart/position/CartPosition.vue +369 -0
- package/app/components/cart/quickadd/CartQuickAdd.vue +145 -0
- package/app/components/cart/recommend/CartCrossSell.vue +102 -0
- package/app/components/cart/recommend/CartRecommendCard.vue +59 -0
- package/app/components/cart/recommend/CartReorderStrip.vue +108 -0
- package/app/components/cart/requisition/CartRequisitionGroup.vue +74 -0
- package/app/components/cart/skeleton/CartSkeleton.vue +18 -0
- package/app/components/cart/summary/CartSummary.vue +25 -0
- package/app/components/cart/summary/CartSummaryBreakdown.vue +35 -0
- package/app/components/cart/switcher/CartSwitcher.vue +147 -0
- package/app/components/cart/target/CartTargetModal.vue +129 -0
- package/app/components/cart/view/CartApprovalsPanel.vue +89 -0
- package/app/components/cart/view/CartListHeader.vue +86 -0
- package/app/components/cart/view/CartPositionList.vue +94 -0
- package/app/components/cart/view/CartSummaryPanel.vue +254 -0
- package/app/components/cart/view/CartView.vue +310 -0
- package/app/components/category/info/CategoryPrice.vue +47 -0
- package/app/components/category/info/CategorySku.vue +15 -0
- package/app/components/category/info/CategoryStock.vue +25 -0
- package/app/components/category/list/CategoryItemCount.vue +27 -0
- package/app/components/category/list/CategoryListPagination.vue +81 -0
- package/app/components/category/skeleton/CategoryDetailSkeleton.vue +12 -0
- package/app/components/category/skeleton/CategoryListSkeleton.vue +65 -0
- package/app/components/category/view/CategoryViewToggle.vue +33 -0
- package/app/components/category/view/GridView.vue +78 -0
- package/app/components/category/view/ListView.vue +80 -0
- package/app/components/checkout/confirmation/CheckoutConfirmationView.vue +289 -0
- package/app/components/checkout/form/CheckoutSchemaForm.vue +72 -0
- package/app/components/checkout/onepage/CheckoutAddressPickerModal.vue +260 -0
- package/app/components/checkout/onepage/CheckoutAddressSection.vue +186 -0
- package/app/components/checkout/onepage/CheckoutDeliverySection.vue +158 -0
- package/app/components/checkout/onepage/CheckoutGate.vue +67 -0
- package/app/components/checkout/onepage/CheckoutGuestDetailsSection.vue +154 -0
- package/app/components/checkout/onepage/CheckoutNotesSection.vue +62 -0
- package/app/components/checkout/onepage/CheckoutOnePageView.vue +77 -0
- package/app/components/checkout/onepage/CheckoutPaymentSection.vue +181 -0
- package/app/components/checkout/onepage/CheckoutSectionTitle.vue +18 -0
- package/app/components/checkout/onepage/CheckoutSummarySection.vue +211 -0
- package/app/components/checkout/onepage/CheckoutWorkflowPanel.vue +38 -0
- package/app/components/layout/AppLogo.vue +21 -0
- package/app/components/layout/footer/Footer.vue +148 -0
- package/app/components/layout/header/AppBar.vue +75 -0
- package/app/components/layout/header/CategoryNav.vue +93 -0
- package/app/components/layout/header/HeaderActionItem.vue +81 -0
- package/app/components/layout/header/LocaleSwitcher.vue +123 -0
- package/app/components/layout/header/MainNav.vue +61 -0
- package/app/components/layout/header/MobileMenu.vue +81 -0
- package/app/components/layout/header/TopBar.vue +63 -0
- package/app/components/listing/ListingView.vue +227 -0
- package/app/components/product/detail/ProductDetailAddToCart.vue +188 -0
- package/app/components/product/detail/ProductDetailDescription.vue +20 -0
- package/app/components/product/detail/ProductDetailImageGallery.vue +58 -0
- package/app/components/product/detail/ProductDetailPricing.vue +108 -0
- package/app/components/product/detail/ProductDetailSaveToList.vue +291 -0
- package/app/components/product/detail/ProductDetailSpecifications.vue +33 -0
- package/app/components/product/detail/ProductDetailStock.vue +36 -0
- package/app/components/search/filter/SearchFacets.vue +256 -0
- package/app/components/search/filter/SearchFacetsDrawer.vue +58 -0
- package/app/components/ui/AppShell.vue +7 -0
- package/app/components/ui/debug/PiniaStateCard.vue +106 -0
- package/app/components/ui/feedback/EmptyState.vue +30 -0
- package/app/components/ui/feedback/ErrorBoundary.vue +44 -0
- package/app/components/ui/feedback/NotFound.vue +34 -0
- package/app/components/ui/forms/CountrySelection.vue +14 -0
- package/app/components/ui/forms/FormKitDatePicker.vue +124 -0
- package/app/components/ui/forms/PasswordInput.vue +136 -0
- package/app/components/ui/forms/SearchInput.vue +213 -0
- package/app/components/ui/table/TableSortButton.vue +51 -0
- package/app/components/ui/table/TableToolbar.vue +66 -0
- package/app/composables/useAccount.ts +27 -0
- package/app/composables/useAccountAddresses.ts +116 -0
- package/app/composables/useAccountOrders.ts +18 -0
- package/app/composables/useAppUrl.ts +38 -0
- package/app/composables/useAuthStore.ts +202 -0
- package/app/composables/useB2BContext.ts +23 -0
- package/app/composables/useCartActions.ts +25 -0
- package/app/composables/useCartCalculation.ts +90 -0
- package/app/composables/useCartSelection.ts +46 -0
- package/app/composables/useCartStore.ts +837 -0
- package/app/composables/useCartSummaryFormatting.ts +28 -0
- package/app/composables/useCategories.ts +29 -0
- package/app/composables/useCheckoutOnePage.ts +438 -0
- package/app/composables/useCheckoutProfileSource.ts +8 -0
- package/app/composables/useCheckoutSchema.ts +28 -0
- package/app/composables/useDataTable.ts +14 -0
- package/app/composables/useFormValidation.ts +29 -0
- package/app/composables/useIcons.ts +17 -0
- package/app/composables/useLocalePreferences.ts +45 -0
- package/app/composables/useMarkets.ts +15 -0
- package/app/composables/useProduct.ts +89 -0
- package/app/composables/useProductCard.ts +8 -0
- package/app/composables/useProductCardActions.ts +106 -0
- package/app/composables/useProductImage.ts +12 -0
- package/app/composables/useProductListing.ts +210 -0
- package/app/composables/useProductUrl.ts +17 -0
- package/app/composables/useProducts.ts +130 -0
- package/app/composables/useSearch.ts +12 -0
- package/app/composables/useThemeStore.ts +81 -0
- package/app/composables/useViewMode.ts +18 -0
- package/app/config/countries.ts +74 -0
- package/app/config/icons.ts +283 -0
- package/app/config/navigation.ts +191 -0
- package/app/config/palette.ts +13 -0
- package/app/config/themes.ts +20 -0
- package/app/formkit.config.ts +50 -0
- package/app/interfaces/account/address-list.ts +34 -0
- package/app/interfaces/account/order-list.ts +47 -0
- package/app/interfaces/account/order-lists.ts +35 -0
- package/app/interfaces/account/profile.ts +17 -0
- package/app/interfaces/account.ts +3 -0
- package/app/interfaces/address.ts +9 -0
- package/app/interfaces/auth.ts +104 -0
- package/app/interfaces/b2b.ts +234 -0
- package/app/interfaces/cart-calculation.ts +131 -0
- package/app/interfaces/cart-item.ts +45 -0
- package/app/interfaces/checkout-draft.ts +4 -0
- package/app/interfaces/checkout.ts +43 -0
- package/app/interfaces/delivery.ts +13 -0
- package/app/interfaces/market.ts +24 -0
- package/app/interfaces/payment.ts +19 -0
- package/app/interfaces/persisted-cart.ts +10 -0
- package/app/interfaces/product-detail.ts +54 -0
- package/app/interfaces/product-list.ts +33 -0
- package/app/interfaces/search-facets.ts +14 -0
- package/app/interfaces/validation.ts +14 -0
- package/app/layouts/default.vue +78 -0
- package/app/layouts/focus.vue +80 -0
- package/app/plugins/formkit-locale.client.ts +23 -0
- package/app/shared/constants.ts +1 -0
- package/app/validations/companyName.ts +18 -0
- package/app/validations/emailFormat.ts +10 -0
- package/app/validations/formValidationConfig.ts +50 -0
- package/app/validations/maxLength.ts +12 -0
- package/app/validations/minLength.ts +9 -0
- package/app/validations/optionalCompanyName.ts +23 -0
- package/app/validations/passwordsMatch.ts +5 -0
- package/app/validations/phoneNumber.ts +19 -0
- package/app/validations/required.ts +11 -0
- package/app/validations/termsRequired.ts +4 -0
- package/app/validations/types.ts +10 -0
- package/app/validations/zipCode.ts +15 -0
- package/i18n/locales/de/account.json +458 -0
- package/i18n/locales/de/auth.json +155 -0
- package/i18n/locales/de/cart.json +263 -0
- package/i18n/locales/de/checkout.json +217 -0
- package/i18n/locales/de/common.json +80 -0
- package/i18n/locales/de/cover.json +33 -0
- package/i18n/locales/de/order.json +1 -0
- package/i18n/locales/de/product.json +71 -0
- package/i18n/locales/de/search.json +54 -0
- package/i18n/locales/de/validation.json +12 -0
- package/i18n/locales/en/account.json +458 -0
- package/i18n/locales/en/auth.json +155 -0
- package/i18n/locales/en/cart.json +263 -0
- package/i18n/locales/en/checkout.json +217 -0
- package/i18n/locales/en/common.json +80 -0
- package/i18n/locales/en/cover.json +33 -0
- package/i18n/locales/en/order.json +1 -0
- package/i18n/locales/en/product.json +71 -0
- package/i18n/locales/en/search.json +54 -0
- package/i18n/locales/en/validation.json +12 -0
- package/nuxt.config.ts +109 -0
- package/package.json +65 -0
- package/public/img/product-placeholder.svg +8 -0
- package/public/templates/direct-order-template.csv +3 -0
- package/public/templates/direct-order-template.xlsx +0 -0
- package/server/api/account/address/[id].delete.ts +51 -0
- package/server/api/account/address/[id].put.ts +83 -0
- package/server/api/account/address/index.post.ts +60 -0
- package/server/api/account/addresses.get.ts +25 -0
- package/server/api/account/context.get.ts +16 -0
- package/server/api/account/governance/[domain]/[id].put.ts +57 -0
- package/server/api/account/governance/[domain].post.ts +111 -0
- package/server/api/account/order-lists/[id].delete.ts +22 -0
- package/server/api/account/order-lists/[id].get.ts +17 -0
- package/server/api/account/order-lists/[id].put.ts +46 -0
- package/server/api/account/order-lists/index.get.ts +14 -0
- package/server/api/account/order-lists/index.post.ts +38 -0
- package/server/api/account/orders/[id].get.ts +35 -0
- package/server/api/account/orders.get.ts +35 -0
- package/server/api/account/profile.get.ts +56 -0
- package/server/api/account/profile.put.ts +128 -0
- package/server/api/account/requisitions/[id].get.ts +15 -0
- package/server/api/account/requisitions.get.ts +23 -0
- package/server/api/auth/login.post.ts +37 -0
- package/server/api/auth/logout.post.ts +4 -0
- package/server/api/auth/me.get.ts +3 -0
- package/server/api/auth/personas.get.ts +7 -0
- package/server/api/auth/recovery.post.ts +32 -0
- package/server/api/auth/recovery.put.ts +37 -0
- package/server/api/auth/register.post.ts +126 -0
- package/server/api/cart/calculate.post.ts +25 -0
- package/server/api/cart/export.post.ts +81 -0
- package/server/api/cart/index.delete.ts +10 -0
- package/server/api/cart/index.get.ts +10 -0
- package/server/api/cart/sync.post.ts +14 -0
- package/server/api/carts/[id]/activate.post.ts +18 -0
- package/server/api/carts/[id]/index.delete.ts +18 -0
- package/server/api/carts/[id]/index.put.ts +19 -0
- package/server/api/carts/[id]/items.post.ts +21 -0
- package/server/api/carts/index.get.ts +14 -0
- package/server/api/carts/index.post.ts +14 -0
- package/server/api/categories/[slug].get.ts +22 -0
- package/server/api/categories/index.get.ts +11 -0
- package/server/api/checkout/profile.get.ts +21 -0
- package/server/api/checkout/schema/[key].get.ts +19 -0
- package/server/api/checkout/session.post.ts +8 -0
- package/server/api/images/detail/[filename].get.ts +18 -0
- package/server/api/images/list/[filename].get.ts +17 -0
- package/server/api/markets.get.ts +9 -0
- package/server/api/orders/index.post.ts +376 -0
- package/server/api/payment/methods.post.ts +65 -0
- package/server/api/product/[id].get.ts +29 -0
- package/server/api/products/[id].get.ts +30 -0
- package/server/api/products/index.get.ts +21 -0
- package/server/api/requisitions/index.post.ts +67 -0
- package/server/api/shipping/rates.post.ts +70 -0
- package/server/api/themes/index.get.ts +9 -0
- package/server/api/typesense/drop.get.ts +22 -0
- package/server/api/typesense/health.get.ts +9 -0
- package/server/api/typesense/search.post.ts +199 -0
- package/server/api/typesense/seed.get.ts +112 -0
- package/server/api/typesense/suggest.post.ts +69 -0
- package/server/config/account/organization.json +146 -0
- package/server/config/account/personas.json +169 -0
- package/server/config/account/user.json +8 -0
- package/server/config/account/workflows.json +19 -0
- package/server/data/account/address-list.json +103 -0
- package/server/data/account/order-list.json +491 -0
- package/server/data/account/order-lists.json +149 -0
- package/server/data/account/profile.json +9 -0
- package/server/data/account/registration-requests.json +3 -0
- package/server/data/account/requisitions.json +686 -0
- package/server/data/categories.json +186 -0
- package/server/data/forms/checkout/add-address.json +24 -0
- package/server/data/list/5137-1.png +0 -0
- package/server/data/list/5498-1.png +0 -0
- package/server/data/list/5498-2.png +0 -0
- package/server/data/list/5498-3.png +0 -0
- package/server/data/list/5498-4.png +0 -0
- package/server/data/list/5498-5.png +0 -0
- package/server/data/list/5498-6.png +0 -0
- package/server/data/list/5519-1.png +0 -0
- package/server/data/list/5713-1.png +0 -0
- package/server/data/list/5789-1.png +0 -0
- package/server/data/list/5930-1.png +0 -0
- package/server/data/list/6127-1.png +0 -0
- package/server/data/list/6234-1.png +0 -0
- package/server/data/list/6238-1.png +0 -0
- package/server/data/list/6246-1.png +0 -0
- package/server/data/list/6270-1.png +0 -0
- package/server/data/list/6330-1.png +0 -0
- package/server/data/list/6336-1.png +0 -0
- package/server/data/list/6360-1.png +0 -0
- package/server/data/list/6363-1.png +0 -0
- package/server/data/list/6375-1.png +0 -0
- package/server/data/list/6385-1.png +0 -0
- package/server/data/list/6413-1.png +0 -0
- package/server/data/list/6418-1.png +0 -0
- package/server/data/list/6465-1.png +0 -0
- package/server/data/list/6477-1.png +0 -0
- package/server/data/list/6509-1.png +0 -0
- package/server/data/list/6545-1.png +0 -0
- package/server/data/list/6548-1.png +0 -0
- package/server/data/list/6566-1.png +0 -0
- package/server/data/list/6581-1.png +0 -0
- package/server/data/list/6609-1.png +0 -0
- package/server/data/list/6611-1.png +0 -0
- package/server/data/list/6641-1.png +0 -0
- package/server/data/list/6659-1.png +0 -0
- package/server/data/list/6662-1.png +0 -0
- package/server/data/list/6689-1.png +0 -0
- package/server/data/list/6698-1.png +0 -0
- package/server/data/list/6701-1.png +0 -0
- package/server/data/list/6752-1.png +0 -0
- package/server/data/list/6755-1.png +0 -0
- package/server/data/list/6837-1.png +0 -0
- package/server/data/list/6841-1.png +0 -0
- package/server/data/list/6844-1.png +0 -0
- package/server/data/list/6846-1.png +0 -0
- package/server/data/list/6886-1.png +0 -0
- package/server/data/list/6895-1.png +0 -0
- package/server/data/list/6897-1.png +0 -0
- package/server/data/list/6919-1.png +0 -0
- package/server/data/list/6977-1.png +0 -0
- package/server/data/list/6983-1.png +0 -0
- package/server/data/list/6984-1.png +0 -0
- package/server/data/list/6985-1.png +0 -0
- package/server/data/list/6986-1.png +0 -0
- package/server/data/list/6989-1.png +0 -0
- package/server/data/list/6995-1.png +0 -0
- package/server/data/list/6998-1.png +0 -0
- package/server/data/markets.json +24 -0
- package/server/data/product-detail.json +2450 -0
- package/server/data/product-list.json +2450 -0
- package/server/data/themes.json +8 -0
- package/server/interfaces/account.ts +20 -0
- package/server/interfaces/auth.ts +32 -0
- package/server/interfaces/b2bContext.ts +23 -0
- package/server/interfaces/cart.ts +46 -0
- package/server/interfaces/cartCalculation.ts +17 -0
- package/server/interfaces/category.ts +12 -0
- package/server/interfaces/checkoutProfile.ts +5 -0
- package/server/interfaces/log.ts +3 -0
- package/server/interfaces/market.ts +10 -0
- package/server/interfaces/product.ts +21 -0
- package/server/interfaces/schema.ts +20 -0
- package/server/interfaces/theme.ts +10 -0
- package/server/services/ApiAuthService.ts +138 -0
- package/server/services/ApiCartService.ts +254 -0
- package/server/services/ApiCategoryService.ts +25 -0
- package/server/services/ApiMarketService.ts +71 -0
- package/server/services/ApiProductService.ts +53 -0
- package/server/services/LocalFileCategoryService.ts +23 -0
- package/server/services/LocalFileCheckoutProfileService.ts +117 -0
- package/server/services/LocalFileProductService.ts +128 -0
- package/server/services/LocalFileSchemaService.ts +70 -0
- package/server/services/LocalFileThemeService.ts +18 -0
- package/server/services/LogService.ts +28 -0
- package/server/services/MockAccountService.ts +58 -0
- package/server/services/MockAuthService.ts +105 -0
- package/server/services/MockB2BContextService.ts +149 -0
- package/server/services/MockCartCalculationService.ts +395 -0
- package/server/services/MockMarketService.ts +18 -0
- package/server/services/SdkAccountService.ts +56 -0
- package/server/services/SdkAuthService.ts +83 -0
- package/server/services/SessionCartService.ts +31 -0
- package/server/utils/accountService.ts +30 -0
- package/server/utils/authCookie.ts +13 -0
- package/server/utils/authService.ts +43 -0
- package/server/utils/b2bService.ts +49 -0
- package/server/utils/cartService.ts +59 -0
- package/server/utils/categoryService.ts +19 -0
- package/server/utils/checkoutProfileService.ts +9 -0
- package/server/utils/checkoutSession.ts +38 -0
- package/server/utils/coverData.ts +84 -0
- package/server/utils/governanceStore.ts +38 -0
- package/server/utils/i18n.ts +76 -0
- package/server/utils/inventoryService.ts +14 -0
- package/server/utils/liveCatalog.ts +234 -0
- package/server/utils/liveInventories.ts +76 -0
- package/server/utils/liveOrders.ts +139 -0
- package/server/utils/livePrices.ts +93 -0
- package/server/utils/locale.ts +39 -0
- package/server/utils/logService.ts +19 -0
- package/server/utils/marketService.ts +24 -0
- package/server/utils/orderService.ts +14 -0
- package/server/utils/paymentService.ts +14 -0
- package/server/utils/priceService.ts +14 -0
- package/server/utils/productService.ts +28 -0
- package/server/utils/productsSchema.ts +30 -0
- package/server/utils/revenexxApi.ts +136 -0
- package/server/utils/schemaService.ts +25 -0
- package/server/utils/serviceMode.ts +70 -0
- package/server/utils/shippingService.ts +14 -0
- package/server/utils/shopSdk.ts +88 -0
- package/server/utils/themeService.ts +16 -0
- package/server/utils/typesense.ts +27 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ForgotPasswordFormState } from "../../interfaces/auth";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Password recovery request panel in the focus-page design. Requests a
|
|
6
|
+
* recovery mail via the auth store; the consuming page handles success
|
|
7
|
+
* feedback via the success emit.
|
|
8
|
+
*/
|
|
9
|
+
const emit = defineEmits<{
|
|
10
|
+
(e: "success"): void;
|
|
11
|
+
}>();
|
|
12
|
+
|
|
13
|
+
const { t } = useI18n();
|
|
14
|
+
const localePath = useLocalePath();
|
|
15
|
+
const auth = useAuthStore();
|
|
16
|
+
const { loading, error } = storeToRefs(auth);
|
|
17
|
+
|
|
18
|
+
const state = reactive<ForgotPasswordFormState>({
|
|
19
|
+
email: "",
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const { validate } = useFormValidation<ForgotPasswordFormState>("forgotPassword");
|
|
23
|
+
|
|
24
|
+
async function onSubmit(): Promise<void> {
|
|
25
|
+
try {
|
|
26
|
+
const url = new URL(localePath("/reset-password"), window.location.origin).toString();
|
|
27
|
+
await auth.requestRecovery(state.email, url);
|
|
28
|
+
emit("success");
|
|
29
|
+
}
|
|
30
|
+
catch {
|
|
31
|
+
// error is set on the store and rendered by UAlert
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<template>
|
|
37
|
+
<div class="bg-elevated py-6 px-8 rounded-lg">
|
|
38
|
+
<h2 class="text-xl font-semibold text-highlighted">
|
|
39
|
+
{{ t('auth.forgotPassword.title') }}
|
|
40
|
+
</h2>
|
|
41
|
+
|
|
42
|
+
<UForm
|
|
43
|
+
:state="state"
|
|
44
|
+
:validate="validate"
|
|
45
|
+
class="space-y-4 pt-6"
|
|
46
|
+
@submit="onSubmit"
|
|
47
|
+
>
|
|
48
|
+
<UFormField
|
|
49
|
+
:label="t('auth.forgotPassword.fields.email')"
|
|
50
|
+
name="email"
|
|
51
|
+
required
|
|
52
|
+
>
|
|
53
|
+
<UInput
|
|
54
|
+
v-model="state.email"
|
|
55
|
+
type="email"
|
|
56
|
+
autocomplete="email"
|
|
57
|
+
class="w-full"
|
|
58
|
+
:placeholder="t('auth.forgotPassword.fields.emailPlaceholder')"
|
|
59
|
+
/>
|
|
60
|
+
</UFormField>
|
|
61
|
+
|
|
62
|
+
<UAlert
|
|
63
|
+
v-if="error"
|
|
64
|
+
color="error"
|
|
65
|
+
variant="soft"
|
|
66
|
+
:title="t(error)"
|
|
67
|
+
/>
|
|
68
|
+
|
|
69
|
+
<UButton
|
|
70
|
+
type="submit"
|
|
71
|
+
color="primary"
|
|
72
|
+
variant="solid"
|
|
73
|
+
block
|
|
74
|
+
:loading="loading"
|
|
75
|
+
:label="t('auth.forgotPassword.submit')"
|
|
76
|
+
/>
|
|
77
|
+
|
|
78
|
+
<div class="text-center">
|
|
79
|
+
<NuxtLink
|
|
80
|
+
:to="localePath('/login')"
|
|
81
|
+
class="text-sm text-primary hover:underline"
|
|
82
|
+
>
|
|
83
|
+
{{ t('auth.forgotPassword.backToLogin') }}
|
|
84
|
+
</NuxtLink>
|
|
85
|
+
</div>
|
|
86
|
+
</UForm>
|
|
87
|
+
</div>
|
|
88
|
+
</template>
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { LoginFormState } from "../../interfaces/auth";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* "I already have an account" panel of the split login page. Owns the login
|
|
6
|
+
* form against the auth store; the consuming page decides where to navigate
|
|
7
|
+
* after a successful sign-in via the redirect emit.
|
|
8
|
+
*/
|
|
9
|
+
const emit = defineEmits<{
|
|
10
|
+
(e: "success"): void;
|
|
11
|
+
}>();
|
|
12
|
+
|
|
13
|
+
const { t } = useI18n();
|
|
14
|
+
const localePath = useLocalePath();
|
|
15
|
+
const auth = useAuthStore();
|
|
16
|
+
const { loading, error } = storeToRefs(auth);
|
|
17
|
+
|
|
18
|
+
const state = reactive<LoginFormState>({
|
|
19
|
+
email: "",
|
|
20
|
+
password: "",
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const { validate } = useFormValidation<LoginFormState>("login");
|
|
24
|
+
|
|
25
|
+
async function onSubmit(): Promise<void> {
|
|
26
|
+
try {
|
|
27
|
+
await auth.login({
|
|
28
|
+
email: state.email,
|
|
29
|
+
password: state.password,
|
|
30
|
+
});
|
|
31
|
+
emit("success");
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
// error is set on the store and rendered by UAlert
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<div class="bg-elevated py-6 px-8 rounded-lg">
|
|
41
|
+
<h2 class="text-xl font-semibold text-highlighted">
|
|
42
|
+
{{ t('auth.login.existingCustomer') }}
|
|
43
|
+
</h2>
|
|
44
|
+
|
|
45
|
+
<UForm
|
|
46
|
+
:state="state"
|
|
47
|
+
:validate="validate"
|
|
48
|
+
class="space-y-4 pt-6"
|
|
49
|
+
@submit="onSubmit"
|
|
50
|
+
>
|
|
51
|
+
<UFormField
|
|
52
|
+
:label="t('auth.login.fields.email')"
|
|
53
|
+
name="email"
|
|
54
|
+
required
|
|
55
|
+
>
|
|
56
|
+
<UInput
|
|
57
|
+
v-model="state.email"
|
|
58
|
+
type="email"
|
|
59
|
+
autocomplete="email"
|
|
60
|
+
class="w-full"
|
|
61
|
+
:placeholder="t('auth.login.fields.emailPlaceholder')"
|
|
62
|
+
/>
|
|
63
|
+
</UFormField>
|
|
64
|
+
|
|
65
|
+
<UFormField
|
|
66
|
+
:label="t('auth.login.fields.password')"
|
|
67
|
+
name="password"
|
|
68
|
+
required
|
|
69
|
+
>
|
|
70
|
+
<UiFormsPasswordInput
|
|
71
|
+
v-model="state.password"
|
|
72
|
+
autocomplete="current-password"
|
|
73
|
+
:placeholder="t('auth.login.fields.passwordPlaceholder')"
|
|
74
|
+
/>
|
|
75
|
+
</UFormField>
|
|
76
|
+
|
|
77
|
+
<UAlert
|
|
78
|
+
v-if="error"
|
|
79
|
+
color="error"
|
|
80
|
+
variant="soft"
|
|
81
|
+
:title="t(error)"
|
|
82
|
+
/>
|
|
83
|
+
|
|
84
|
+
<UButton
|
|
85
|
+
type="submit"
|
|
86
|
+
color="primary"
|
|
87
|
+
variant="solid"
|
|
88
|
+
block
|
|
89
|
+
:loading="loading"
|
|
90
|
+
:label="t('auth.login.submit')"
|
|
91
|
+
/>
|
|
92
|
+
|
|
93
|
+
<div class="text-center">
|
|
94
|
+
<NuxtLink
|
|
95
|
+
:to="localePath('/forgot-password')"
|
|
96
|
+
class="text-sm text-primary hover:underline"
|
|
97
|
+
>
|
|
98
|
+
{{ t('auth.login.forgotPassword') }}
|
|
99
|
+
</NuxtLink>
|
|
100
|
+
</div>
|
|
101
|
+
</UForm>
|
|
102
|
+
</div>
|
|
103
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/** "I already have an account" panel of the split register page. */
|
|
3
|
+
const { t } = useI18n();
|
|
4
|
+
const localePath = useLocalePath();
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<div class="border border-default py-6 px-8 rounded-lg flex flex-col self-start">
|
|
9
|
+
<h2 class="text-xl font-semibold text-highlighted">
|
|
10
|
+
{{ t('auth.login.existingCustomer') }}
|
|
11
|
+
</h2>
|
|
12
|
+
<p class="pt-6 text-sm text-muted flex-1">
|
|
13
|
+
{{ t('auth.register.loginTeaserText') }}
|
|
14
|
+
</p>
|
|
15
|
+
<UButton
|
|
16
|
+
:to="localePath('/login')"
|
|
17
|
+
color="neutral"
|
|
18
|
+
variant="outline"
|
|
19
|
+
block
|
|
20
|
+
class="mt-6"
|
|
21
|
+
:label="t('auth.login.submit')"
|
|
22
|
+
/>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/** Page intro of the focus auth pages — mirrors the login hero typography. */
|
|
3
|
+
defineProps<{
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
}>();
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<div class="pt-10 flex flex-col">
|
|
11
|
+
<h1 class="text-3xl font-semibold text-highlighted pb-3">
|
|
12
|
+
{{ title }}
|
|
13
|
+
</h1>
|
|
14
|
+
<p
|
|
15
|
+
v-if="description"
|
|
16
|
+
class="text-muted"
|
|
17
|
+
>
|
|
18
|
+
{{ description }}
|
|
19
|
+
</p>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
@@ -0,0 +1,431 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { COUNTRIES } from "../../config/countries";
|
|
3
|
+
import { required } from "../../validations/required";
|
|
4
|
+
import { zipCode } from "../../validations/zipCode";
|
|
5
|
+
import type { FormError } from "@nuxt/ui";
|
|
6
|
+
|
|
7
|
+
import type { RegisterFormState, RegistrationMode, RegistrationProfile } from "../../interfaces/auth";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* B2B registration panel (BRW/IS8 pattern): two paths — new customers
|
|
11
|
+
* register their company with billing address, existing customers link
|
|
12
|
+
* their access via customer number. Owns the register + auto-login flow;
|
|
13
|
+
* the consuming page handles success feedback and navigation.
|
|
14
|
+
*/
|
|
15
|
+
const emit = defineEmits<{
|
|
16
|
+
(e: "success"): void;
|
|
17
|
+
}>();
|
|
18
|
+
|
|
19
|
+
const { icon } = useIcons();
|
|
20
|
+
const { t } = useI18n();
|
|
21
|
+
const auth = useAuthStore();
|
|
22
|
+
const { loading, error } = storeToRefs(auth);
|
|
23
|
+
|
|
24
|
+
const state = reactive<RegisterFormState>({
|
|
25
|
+
mode: "new",
|
|
26
|
+
company: "",
|
|
27
|
+
vatId: "",
|
|
28
|
+
customerNumber: "",
|
|
29
|
+
street: "",
|
|
30
|
+
streetNumber: "",
|
|
31
|
+
zip: "",
|
|
32
|
+
city: "",
|
|
33
|
+
country: "Deutschland",
|
|
34
|
+
salutation: "",
|
|
35
|
+
firstName: "",
|
|
36
|
+
lastName: "",
|
|
37
|
+
jobTitle: "",
|
|
38
|
+
phone: "",
|
|
39
|
+
email: "",
|
|
40
|
+
password: "",
|
|
41
|
+
passwordConfirm: "",
|
|
42
|
+
acceptTerms: false,
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
const modes: { value: RegistrationMode; icon: string }[] = [
|
|
46
|
+
{ value: "new", icon: "company" },
|
|
47
|
+
{ value: "existing", icon: "key" },
|
|
48
|
+
];
|
|
49
|
+
|
|
50
|
+
const salutationItems = computed(() =>
|
|
51
|
+
(["mr", "ms", "none"] as const).map(value => ({
|
|
52
|
+
value,
|
|
53
|
+
label: t(`auth.register.fields2.salutations.${value}`),
|
|
54
|
+
})));
|
|
55
|
+
|
|
56
|
+
const countryItems = COUNTRIES;
|
|
57
|
+
|
|
58
|
+
/* ---- validation: static base + mode-dependent fields ------------------- */
|
|
59
|
+
const { validate: validateBase } = useFormValidation<RegisterFormState>("register");
|
|
60
|
+
|
|
61
|
+
function validate(formState: RegisterFormState): FormError[] {
|
|
62
|
+
const errors = validateBase(formState);
|
|
63
|
+
const push = (name: string, key: string | null) => {
|
|
64
|
+
if (key !== null) {
|
|
65
|
+
errors.push({ name, message: t(key) });
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
if (formState.mode === "new") {
|
|
69
|
+
push("street", required(formState.street));
|
|
70
|
+
push("streetNumber", required(formState.streetNumber));
|
|
71
|
+
push("zip", required(formState.zip) ?? zipCode(formState.zip));
|
|
72
|
+
push("city", required(formState.city));
|
|
73
|
+
push("country", required(formState.country));
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
push("customerNumber", required(formState.customerNumber));
|
|
77
|
+
}
|
|
78
|
+
return errors;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function buildProfile(): RegistrationProfile {
|
|
82
|
+
return {
|
|
83
|
+
mode: state.mode,
|
|
84
|
+
company: state.company.trim(),
|
|
85
|
+
...(state.vatId.trim() ? { vatId: state.vatId.trim() } : {}),
|
|
86
|
+
...(state.mode === "existing" && state.customerNumber.trim()
|
|
87
|
+
? { customerNumber: state.customerNumber.trim() }
|
|
88
|
+
: {}),
|
|
89
|
+
...(state.mode === "new"
|
|
90
|
+
? {
|
|
91
|
+
address: {
|
|
92
|
+
street: state.street.trim(),
|
|
93
|
+
streetNumber: state.streetNumber.trim(),
|
|
94
|
+
zip: state.zip.trim(),
|
|
95
|
+
city: state.city.trim(),
|
|
96
|
+
country: state.country,
|
|
97
|
+
},
|
|
98
|
+
}
|
|
99
|
+
: {}),
|
|
100
|
+
...(state.salutation ? { salutation: state.salutation } : {}),
|
|
101
|
+
...(state.jobTitle.trim() ? { jobTitle: state.jobTitle.trim() } : {}),
|
|
102
|
+
...(state.phone.trim() ? { phone: state.phone.trim() } : {}),
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
async function onSubmit(): Promise<void> {
|
|
107
|
+
try {
|
|
108
|
+
await auth.register({
|
|
109
|
+
email: state.email,
|
|
110
|
+
password: state.password,
|
|
111
|
+
name: `${state.firstName} ${state.lastName}`.trim(),
|
|
112
|
+
profile: buildProfile(),
|
|
113
|
+
});
|
|
114
|
+
await auth.login({
|
|
115
|
+
email: state.email,
|
|
116
|
+
password: state.password,
|
|
117
|
+
});
|
|
118
|
+
emit("success");
|
|
119
|
+
}
|
|
120
|
+
catch {
|
|
121
|
+
// error is set on the store and rendered by UAlert
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
</script>
|
|
125
|
+
|
|
126
|
+
<template>
|
|
127
|
+
<div class="bg-elevated py-6 px-6 sm:px-8 rounded-lg">
|
|
128
|
+
<h2 class="text-xl font-semibold text-highlighted">
|
|
129
|
+
{{ t('auth.register.title') }}
|
|
130
|
+
</h2>
|
|
131
|
+
|
|
132
|
+
<!-- Path selection (new vs. existing customer) -->
|
|
133
|
+
<fieldset class="pt-6">
|
|
134
|
+
<legend class="text-sm font-medium text-highlighted">
|
|
135
|
+
{{ t('auth.register.modes.title') }}
|
|
136
|
+
</legend>
|
|
137
|
+
<div class="mt-3 grid grid-cols-1 sm:grid-cols-2 gap-3">
|
|
138
|
+
<button
|
|
139
|
+
v-for="option in modes"
|
|
140
|
+
:key="option.value"
|
|
141
|
+
type="button"
|
|
142
|
+
tabindex="0"
|
|
143
|
+
class="text-left rounded-lg border p-4 transition-colors cursor-pointer"
|
|
144
|
+
:class="state.mode === option.value
|
|
145
|
+
? 'border-(--ui-primary) bg-primary/5 ring-1 ring-(--ui-primary)'
|
|
146
|
+
: 'border-(--ui-border) hover:border-(--ui-border-accented)'"
|
|
147
|
+
:aria-pressed="state.mode === option.value"
|
|
148
|
+
@click="state.mode = option.value"
|
|
149
|
+
>
|
|
150
|
+
<span class="flex items-center gap-2">
|
|
151
|
+
<UIcon
|
|
152
|
+
:name="icon(option.icon)"
|
|
153
|
+
class="size-5"
|
|
154
|
+
:class="state.mode === option.value ? 'text-primary' : 'text-muted'"
|
|
155
|
+
/>
|
|
156
|
+
<span class="text-sm font-semibold text-highlighted">
|
|
157
|
+
{{ t(`auth.register.modes.${option.value}.title`) }}
|
|
158
|
+
</span>
|
|
159
|
+
</span>
|
|
160
|
+
<span class="mt-1.5 block text-xs text-muted">
|
|
161
|
+
{{ t(`auth.register.modes.${option.value}.description`) }}
|
|
162
|
+
</span>
|
|
163
|
+
</button>
|
|
164
|
+
</div>
|
|
165
|
+
</fieldset>
|
|
166
|
+
|
|
167
|
+
<UForm
|
|
168
|
+
:state="state"
|
|
169
|
+
:validate="validate"
|
|
170
|
+
class="space-y-7 pt-7"
|
|
171
|
+
@submit="onSubmit"
|
|
172
|
+
>
|
|
173
|
+
<!-- Company -->
|
|
174
|
+
<section class="space-y-4">
|
|
175
|
+
<h3 class="text-xs font-semibold uppercase tracking-wide text-muted">
|
|
176
|
+
{{ t('auth.register.sections.company') }}
|
|
177
|
+
</h3>
|
|
178
|
+
<UFormField
|
|
179
|
+
:label="t('auth.register.fields.company')"
|
|
180
|
+
name="company"
|
|
181
|
+
required
|
|
182
|
+
:hint="t('auth.register.companyRequiredHint')"
|
|
183
|
+
>
|
|
184
|
+
<UInput
|
|
185
|
+
v-model="state.company"
|
|
186
|
+
autocomplete="organization"
|
|
187
|
+
class="w-full"
|
|
188
|
+
/>
|
|
189
|
+
</UFormField>
|
|
190
|
+
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
|
191
|
+
<UFormField
|
|
192
|
+
v-if="state.mode === 'existing'"
|
|
193
|
+
:label="t('auth.register.fields2.customerNumber')"
|
|
194
|
+
name="customerNumber"
|
|
195
|
+
required
|
|
196
|
+
:hint="t('auth.register.fields2.customerNumberHint')"
|
|
197
|
+
>
|
|
198
|
+
<UInput
|
|
199
|
+
v-model="state.customerNumber"
|
|
200
|
+
class="w-full"
|
|
201
|
+
/>
|
|
202
|
+
</UFormField>
|
|
203
|
+
<UFormField
|
|
204
|
+
:label="t('auth.register.fields2.vatId')"
|
|
205
|
+
name="vatId"
|
|
206
|
+
:hint="t('auth.register.fields2.vatIdHint')"
|
|
207
|
+
>
|
|
208
|
+
<UInput
|
|
209
|
+
v-model="state.vatId"
|
|
210
|
+
class="w-full"
|
|
211
|
+
placeholder="DE123456789"
|
|
212
|
+
/>
|
|
213
|
+
</UFormField>
|
|
214
|
+
</div>
|
|
215
|
+
</section>
|
|
216
|
+
|
|
217
|
+
<!-- Billing address (new customers) -->
|
|
218
|
+
<section
|
|
219
|
+
v-if="state.mode === 'new'"
|
|
220
|
+
class="space-y-4"
|
|
221
|
+
>
|
|
222
|
+
<h3 class="text-xs font-semibold uppercase tracking-wide text-muted">
|
|
223
|
+
{{ t('auth.register.sections.address') }}
|
|
224
|
+
</h3>
|
|
225
|
+
<div class="grid grid-cols-3 gap-4">
|
|
226
|
+
<UFormField
|
|
227
|
+
:label="t('auth.register.fields2.street')"
|
|
228
|
+
name="street"
|
|
229
|
+
required
|
|
230
|
+
class="col-span-2"
|
|
231
|
+
>
|
|
232
|
+
<UInput
|
|
233
|
+
v-model="state.street"
|
|
234
|
+
autocomplete="address-line1"
|
|
235
|
+
class="w-full"
|
|
236
|
+
/>
|
|
237
|
+
</UFormField>
|
|
238
|
+
<UFormField
|
|
239
|
+
:label="t('auth.register.fields2.streetNumber')"
|
|
240
|
+
name="streetNumber"
|
|
241
|
+
required
|
|
242
|
+
>
|
|
243
|
+
<UInput
|
|
244
|
+
v-model="state.streetNumber"
|
|
245
|
+
autocomplete="address-line2"
|
|
246
|
+
class="w-full"
|
|
247
|
+
/>
|
|
248
|
+
</UFormField>
|
|
249
|
+
</div>
|
|
250
|
+
<div class="grid grid-cols-3 gap-4">
|
|
251
|
+
<UFormField
|
|
252
|
+
:label="t('auth.register.fields2.zip')"
|
|
253
|
+
name="zip"
|
|
254
|
+
required
|
|
255
|
+
>
|
|
256
|
+
<UInput
|
|
257
|
+
v-model="state.zip"
|
|
258
|
+
autocomplete="postal-code"
|
|
259
|
+
class="w-full"
|
|
260
|
+
/>
|
|
261
|
+
</UFormField>
|
|
262
|
+
<UFormField
|
|
263
|
+
:label="t('auth.register.fields2.city')"
|
|
264
|
+
name="city"
|
|
265
|
+
required
|
|
266
|
+
class="col-span-2"
|
|
267
|
+
>
|
|
268
|
+
<UInput
|
|
269
|
+
v-model="state.city"
|
|
270
|
+
autocomplete="address-level2"
|
|
271
|
+
class="w-full"
|
|
272
|
+
/>
|
|
273
|
+
</UFormField>
|
|
274
|
+
</div>
|
|
275
|
+
<UFormField
|
|
276
|
+
:label="t('auth.register.fields2.country')"
|
|
277
|
+
name="country"
|
|
278
|
+
required
|
|
279
|
+
>
|
|
280
|
+
<USelect
|
|
281
|
+
v-model="state.country"
|
|
282
|
+
:items="countryItems"
|
|
283
|
+
class="w-full"
|
|
284
|
+
/>
|
|
285
|
+
</UFormField>
|
|
286
|
+
</section>
|
|
287
|
+
|
|
288
|
+
<!-- Contact person -->
|
|
289
|
+
<section class="space-y-4">
|
|
290
|
+
<h3 class="text-xs font-semibold uppercase tracking-wide text-muted">
|
|
291
|
+
{{ t('auth.register.sections.contact') }}
|
|
292
|
+
</h3>
|
|
293
|
+
<div class="grid grid-cols-1 sm:grid-cols-3 gap-4">
|
|
294
|
+
<UFormField
|
|
295
|
+
:label="t('auth.register.fields2.salutation')"
|
|
296
|
+
name="salutation"
|
|
297
|
+
>
|
|
298
|
+
<USelect
|
|
299
|
+
v-model="state.salutation"
|
|
300
|
+
:items="salutationItems"
|
|
301
|
+
class="w-full"
|
|
302
|
+
/>
|
|
303
|
+
</UFormField>
|
|
304
|
+
<UFormField
|
|
305
|
+
:label="t('auth.register.fields.firstName')"
|
|
306
|
+
name="firstName"
|
|
307
|
+
required
|
|
308
|
+
>
|
|
309
|
+
<UInput
|
|
310
|
+
v-model="state.firstName"
|
|
311
|
+
autocomplete="given-name"
|
|
312
|
+
class="w-full"
|
|
313
|
+
/>
|
|
314
|
+
</UFormField>
|
|
315
|
+
<UFormField
|
|
316
|
+
:label="t('auth.register.fields.lastName')"
|
|
317
|
+
name="lastName"
|
|
318
|
+
required
|
|
319
|
+
>
|
|
320
|
+
<UInput
|
|
321
|
+
v-model="state.lastName"
|
|
322
|
+
autocomplete="family-name"
|
|
323
|
+
class="w-full"
|
|
324
|
+
/>
|
|
325
|
+
</UFormField>
|
|
326
|
+
</div>
|
|
327
|
+
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
|
328
|
+
<UFormField
|
|
329
|
+
:label="t('auth.register.fields2.jobTitle')"
|
|
330
|
+
name="jobTitle"
|
|
331
|
+
:hint="t('auth.register.fields2.jobTitleHint')"
|
|
332
|
+
>
|
|
333
|
+
<UInput
|
|
334
|
+
v-model="state.jobTitle"
|
|
335
|
+
autocomplete="organization-title"
|
|
336
|
+
class="w-full"
|
|
337
|
+
/>
|
|
338
|
+
</UFormField>
|
|
339
|
+
<UFormField
|
|
340
|
+
:label="t('auth.register.fields2.phone')"
|
|
341
|
+
name="phone"
|
|
342
|
+
:hint="t('auth.register.fields2.phoneHint')"
|
|
343
|
+
>
|
|
344
|
+
<UInput
|
|
345
|
+
v-model="state.phone"
|
|
346
|
+
type="tel"
|
|
347
|
+
autocomplete="tel"
|
|
348
|
+
class="w-full"
|
|
349
|
+
/>
|
|
350
|
+
</UFormField>
|
|
351
|
+
</div>
|
|
352
|
+
</section>
|
|
353
|
+
|
|
354
|
+
<!-- Account credentials -->
|
|
355
|
+
<section class="space-y-4">
|
|
356
|
+
<h3 class="text-xs font-semibold uppercase tracking-wide text-muted">
|
|
357
|
+
{{ t('auth.register.sections.account') }}
|
|
358
|
+
</h3>
|
|
359
|
+
<UFormField
|
|
360
|
+
:label="t('auth.register.fields.email')"
|
|
361
|
+
name="email"
|
|
362
|
+
required
|
|
363
|
+
>
|
|
364
|
+
<UInput
|
|
365
|
+
v-model="state.email"
|
|
366
|
+
type="email"
|
|
367
|
+
autocomplete="email"
|
|
368
|
+
class="w-full"
|
|
369
|
+
:placeholder="t('auth.register.fields.emailPlaceholder')"
|
|
370
|
+
/>
|
|
371
|
+
</UFormField>
|
|
372
|
+
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
|
373
|
+
<UFormField
|
|
374
|
+
:label="t('auth.register.fields.password')"
|
|
375
|
+
name="password"
|
|
376
|
+
required
|
|
377
|
+
>
|
|
378
|
+
<UiFormsPasswordInput
|
|
379
|
+
v-model="state.password"
|
|
380
|
+
autocomplete="new-password"
|
|
381
|
+
:placeholder="t('auth.register.fields.passwordPlaceholder')"
|
|
382
|
+
show-strength
|
|
383
|
+
/>
|
|
384
|
+
</UFormField>
|
|
385
|
+
<UFormField
|
|
386
|
+
:label="t('auth.register.fields.passwordConfirm')"
|
|
387
|
+
name="passwordConfirm"
|
|
388
|
+
required
|
|
389
|
+
>
|
|
390
|
+
<UiFormsPasswordInput
|
|
391
|
+
v-model="state.passwordConfirm"
|
|
392
|
+
autocomplete="new-password"
|
|
393
|
+
:placeholder="t('auth.register.fields.passwordConfirmPlaceholder')"
|
|
394
|
+
/>
|
|
395
|
+
</UFormField>
|
|
396
|
+
</div>
|
|
397
|
+
</section>
|
|
398
|
+
|
|
399
|
+
<UFormField name="acceptTerms">
|
|
400
|
+
<UCheckbox
|
|
401
|
+
v-model="state.acceptTerms"
|
|
402
|
+
:label="t('auth.register.fields.acceptTerms')"
|
|
403
|
+
:description="t('auth.register.fields.acceptTermsDescription')"
|
|
404
|
+
/>
|
|
405
|
+
</UFormField>
|
|
406
|
+
|
|
407
|
+
<UAlert
|
|
408
|
+
color="info"
|
|
409
|
+
variant="soft"
|
|
410
|
+
:icon="icon('info')"
|
|
411
|
+
:description="t('auth.register.vettingNotice')"
|
|
412
|
+
/>
|
|
413
|
+
|
|
414
|
+
<UAlert
|
|
415
|
+
v-if="error"
|
|
416
|
+
color="error"
|
|
417
|
+
variant="soft"
|
|
418
|
+
:title="t(error)"
|
|
419
|
+
/>
|
|
420
|
+
|
|
421
|
+
<UButton
|
|
422
|
+
type="submit"
|
|
423
|
+
color="primary"
|
|
424
|
+
variant="solid"
|
|
425
|
+
block
|
|
426
|
+
:loading="loading"
|
|
427
|
+
:label="t('auth.register.submit')"
|
|
428
|
+
/>
|
|
429
|
+
</UForm>
|
|
430
|
+
</div>
|
|
431
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/** "I am a new customer" panel of the split login page. */
|
|
3
|
+
const { t } = useI18n();
|
|
4
|
+
const localePath = useLocalePath();
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<div class="border border-default py-6 px-8 rounded-lg flex flex-col">
|
|
9
|
+
<h2 class="text-xl font-semibold text-highlighted">
|
|
10
|
+
{{ t('auth.login.newCustomer') }}
|
|
11
|
+
</h2>
|
|
12
|
+
<p class="pt-6 text-sm text-muted flex-1">
|
|
13
|
+
{{ t('auth.login.newCustomerText') }}
|
|
14
|
+
</p>
|
|
15
|
+
<UButton
|
|
16
|
+
:to="localePath('/register')"
|
|
17
|
+
color="neutral"
|
|
18
|
+
variant="outline"
|
|
19
|
+
block
|
|
20
|
+
class="mt-6"
|
|
21
|
+
:label="t('auth.login.registerCta')"
|
|
22
|
+
/>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|