@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
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Revenexx GmbH
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# @revenexx/cover
|
|
2
|
+
|
|
3
|
+
The Cover design system, distributed as a **Nuxt layer**.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
// nuxt.config.ts
|
|
9
|
+
export default defineNuxtConfig({
|
|
10
|
+
extends: ["@revenexx/cover"],
|
|
11
|
+
});
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
The consuming app must provide the modules the layer relies on:
|
|
15
|
+
`@nuxt/ui`, `@pinia/nuxt` and `@nuxtjs/i18n` (register the `de` and `en`
|
|
16
|
+
locales so the layer's messages merge).
|
|
17
|
+
|
|
18
|
+
## What the layer contributes
|
|
19
|
+
|
|
20
|
+
| Area | Contents |
|
|
21
|
+
|---|---|
|
|
22
|
+
| `app/components/ui/**` | Generic UI components, auto-imported as `Ui*` (`UiFormsPasswordInput`, `UiFeedbackEmptyState`, `UiFeedbackErrorBoundary`, `UiFeedbackNotFound`, `UiFormsCountrySelection`, `UiDebugPiniaStateCard`, `UiAppShell`) |
|
|
23
|
+
| `app/config/` | `themes.ts` (theme definitions), `palette.ts` (color tokens), `countries.ts` |
|
|
24
|
+
| `app/composables/useThemeStore.ts` | Pinia store applying Nuxt UI color tokens + `--ui-radius`, persisted under `cover-theme` |
|
|
25
|
+
| `i18n/locales/{de,en}/cover.json` | Component messages, merged into the consuming app by @nuxtjs/i18n layer support |
|
|
26
|
+
|
|
27
|
+
Non-auto-imported files are reachable via package exports:
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import type { Theme } from "@revenexx/cover/config/themes";
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Authoring rules
|
|
34
|
+
|
|
35
|
+
- **Internal imports must be relative** — `~/` resolves to the consuming app's
|
|
36
|
+
`srcDir`, not the layer.
|
|
37
|
+
- Components must not depend on app domain composables (`useProducts` etc.);
|
|
38
|
+
domain-coupled components stay in their app.
|
|
39
|
+
- New user-visible strings go into `i18n/locales/{de,en}/cover.json`.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export const accountApi = {
|
|
2
|
+
profile: () => "/api/account/profile",
|
|
3
|
+
orders: () => "/api/account/orders",
|
|
4
|
+
addresses: () => "/api/account/addresses",
|
|
5
|
+
addressUpdate: (id: string) => `/api/account/address/${id}`,
|
|
6
|
+
addressCreate: () => "/api/account/address",
|
|
7
|
+
addressDelete: (id: string) => `/api/account/address/${id}`,
|
|
8
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { DEFAULT_ICON_WEIGHT, nuxtUiIcons } from "./config/icons";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Layer defaults for the BFF service registry. Every server data domain is
|
|
5
|
+
* resolved through a registry key — `mock` serves the bundled demo data.
|
|
6
|
+
* Consuming apps override individual keys in their own app.config.ts to
|
|
7
|
+
* switch a domain to a live implementation (e.g. accountService: "sdk").
|
|
8
|
+
*
|
|
9
|
+
* `ui.icons` maps Nuxt UI's built-in icons to Solar in the default weight;
|
|
10
|
+
* the theme store re-applies them with the active theme's weight at runtime.
|
|
11
|
+
*/
|
|
12
|
+
export default defineAppConfig({
|
|
13
|
+
schemaService: "local-file",
|
|
14
|
+
accountService: "mock",
|
|
15
|
+
authService: "mock",
|
|
16
|
+
productService: "mock",
|
|
17
|
+
categoryService: "mock",
|
|
18
|
+
marketService: "mock",
|
|
19
|
+
cartService: "mock",
|
|
20
|
+
paymentService: "mock",
|
|
21
|
+
shippingService: "mock",
|
|
22
|
+
priceService: "mock",
|
|
23
|
+
orderService: "mock",
|
|
24
|
+
inventoryService: "mock",
|
|
25
|
+
themeService: "mock",
|
|
26
|
+
ui: {
|
|
27
|
+
icons: nuxtUiIcons(DEFAULT_ICON_WEIGHT),
|
|
28
|
+
},
|
|
29
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Cover design system base styles, shipped with the layer.
|
|
3
|
+
*
|
|
4
|
+
* Container width: the storefront uses a wide layout on large screens
|
|
5
|
+
* (adopted from the relation prototype). --ui-container drives Nuxt UI's
|
|
6
|
+
* <UContainer>; the header bars reference the same variable.
|
|
7
|
+
*/
|
|
8
|
+
:root {
|
|
9
|
+
--ui-container: 1536px;
|
|
10
|
+
/* Main header bar: roomier than the Nuxt UI default (4rem) — raised
|
|
11
|
+
to 5rem, then +15% breathing room top/bottom (Michael, 2026-06-10). */
|
|
12
|
+
--ui-header-height: 5.75rem;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* Warning text on light surfaces needs a darker shade than the Nuxt UI
|
|
16
|
+
default (500) — yellow-500 text on a yellow-tinted badge is barely
|
|
17
|
+
readable. 600 keeps the hue, fixes the contrast. The doubled selector
|
|
18
|
+
outweighs Nuxt UI's own :root declaration regardless of CSS order. */
|
|
19
|
+
:root:root {
|
|
20
|
+
--ui-warning: var(--ui-color-warning-600);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.dark.dark {
|
|
24
|
+
--ui-warning: var(--ui-color-warning-400);
|
|
25
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const { icon } = useIcons();
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Header account action. Logged in it links straight to the account
|
|
6
|
+
* dashboard (logout and the full navigation live in the account area);
|
|
7
|
+
* logged out it links to the login page.
|
|
8
|
+
*/
|
|
9
|
+
const { t } = useI18n();
|
|
10
|
+
const { user } = useAccount();
|
|
11
|
+
const auth = useAuthStore();
|
|
12
|
+
const localePath = useLocalePath();
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<LayoutHeaderActionItem
|
|
17
|
+
v-if="auth.isLoggedIn"
|
|
18
|
+
:icon="icon('users')"
|
|
19
|
+
:label="user.name"
|
|
20
|
+
:aria-label="t('menu.accountAriaLabel')"
|
|
21
|
+
:to="localePath('/account')"
|
|
22
|
+
/>
|
|
23
|
+
|
|
24
|
+
<LayoutHeaderActionItem
|
|
25
|
+
v-else
|
|
26
|
+
:icon="icon('users')"
|
|
27
|
+
:label="t('header.signIn')"
|
|
28
|
+
:to="localePath('/login')"
|
|
29
|
+
/>
|
|
30
|
+
</template>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* Account area shell: sidebar with the full B2B navigation tree next to the
|
|
4
|
+
* page content. Account pages wrap their content in this component.
|
|
5
|
+
*/
|
|
6
|
+
defineSlots<{ default(): unknown }>();
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<UContainer class="py-6 lg:py-8">
|
|
11
|
+
<div class="flex flex-col lg:flex-row gap-6">
|
|
12
|
+
<AccountSidebar />
|
|
13
|
+
<div class="flex-1 min-w-0">
|
|
14
|
+
<slot />
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</UContainer>
|
|
18
|
+
</template>
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { accountNavigation } from "../../config/navigation";
|
|
3
|
+
|
|
4
|
+
const { icon } = useIcons();
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The full B2B account navigation tree (structure from the relation
|
|
8
|
+
* prototype). Implemented entries route to real pages, the rest leads to the
|
|
9
|
+
* coming-soon catch-all — making the product roadmap explorable.
|
|
10
|
+
*/
|
|
11
|
+
const { t } = useI18n();
|
|
12
|
+
const localePath = useLocalePath();
|
|
13
|
+
const route = useRoute();
|
|
14
|
+
const auth = useAuthStore();
|
|
15
|
+
const toast = useToast();
|
|
16
|
+
|
|
17
|
+
async function onLogout(): Promise<void> {
|
|
18
|
+
await auth.logout();
|
|
19
|
+
toast.add({
|
|
20
|
+
title: t("auth.logout.success"),
|
|
21
|
+
color: "primary",
|
|
22
|
+
icon: icon("check"),
|
|
23
|
+
duration: 1000,
|
|
24
|
+
});
|
|
25
|
+
await navigateTo(localePath("/login"));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function isActive(to: string): boolean {
|
|
29
|
+
const localized = localePath(to);
|
|
30
|
+
if (to === "/account") {
|
|
31
|
+
return route.path === localized;
|
|
32
|
+
}
|
|
33
|
+
return route.path === localized || route.path.startsWith(`${localized}/`);
|
|
34
|
+
}
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<template>
|
|
38
|
+
<nav
|
|
39
|
+
:aria-label="t('account.nav.groups.account')"
|
|
40
|
+
class="w-full lg:w-72 shrink-0 bg-elevated rounded-lg px-6 py-2"
|
|
41
|
+
>
|
|
42
|
+
<ul class="divide-y divide-default">
|
|
43
|
+
<li
|
|
44
|
+
v-for="group in accountNavigation"
|
|
45
|
+
:key="group.labelKey"
|
|
46
|
+
class="py-4"
|
|
47
|
+
>
|
|
48
|
+
<div class="font-semibold text-highlighted pb-1">
|
|
49
|
+
{{ t(group.labelKey) }}
|
|
50
|
+
</div>
|
|
51
|
+
<ul>
|
|
52
|
+
<li
|
|
53
|
+
v-for="link in group.links"
|
|
54
|
+
:key="link.to"
|
|
55
|
+
>
|
|
56
|
+
<NuxtLink
|
|
57
|
+
:to="localePath(link.to)"
|
|
58
|
+
class="flex items-center gap-2.5 py-1.5 text-sm transition-colors"
|
|
59
|
+
:class="isActive(link.to)
|
|
60
|
+
? 'text-primary font-medium'
|
|
61
|
+
: 'text-muted hover:text-highlighted'"
|
|
62
|
+
>
|
|
63
|
+
<UIcon
|
|
64
|
+
:name="icon(link.icon)"
|
|
65
|
+
class="size-4 shrink-0"
|
|
66
|
+
:class="isActive(link.to) ? 'text-primary' : 'text-primary/70'"
|
|
67
|
+
/>
|
|
68
|
+
{{ t(link.labelKey) }}
|
|
69
|
+
</NuxtLink>
|
|
70
|
+
</li>
|
|
71
|
+
</ul>
|
|
72
|
+
</li>
|
|
73
|
+
<li class="py-4">
|
|
74
|
+
<button
|
|
75
|
+
type="button"
|
|
76
|
+
tabindex="0"
|
|
77
|
+
class="flex items-center gap-2 py-1 text-sm text-error
|
|
78
|
+
hover:text-highlighted transition-colors cursor-pointer"
|
|
79
|
+
@click="onLogout"
|
|
80
|
+
>
|
|
81
|
+
<UIcon
|
|
82
|
+
:name="icon('logout')"
|
|
83
|
+
class="size-4 shrink-0"
|
|
84
|
+
/>
|
|
85
|
+
{{ t('menu.logout') }}
|
|
86
|
+
</button>
|
|
87
|
+
</li>
|
|
88
|
+
</ul>
|
|
89
|
+
</nav>
|
|
90
|
+
</template>
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { AccountAddress, AccountAddressFormState } from "../../../interfaces/account/address-list";
|
|
3
|
+
|
|
4
|
+
const { icon } = useIcons();
|
|
5
|
+
|
|
6
|
+
const props = defineProps<{
|
|
7
|
+
address: AccountAddress;
|
|
8
|
+
isDefaultLocked: boolean;
|
|
9
|
+
isDeleteDisabled: boolean;
|
|
10
|
+
isEditing: boolean;
|
|
11
|
+
isSaving: boolean;
|
|
12
|
+
saveError: string | null;
|
|
13
|
+
typeOptions: { label: string; value: string }[];
|
|
14
|
+
}>();
|
|
15
|
+
|
|
16
|
+
const formState = defineModel<AccountAddressFormState>("formState", { required: true });
|
|
17
|
+
|
|
18
|
+
const emit = defineEmits<{
|
|
19
|
+
"toggle-edit": [];
|
|
20
|
+
"submit": [];
|
|
21
|
+
"is-default-change": [value: boolean];
|
|
22
|
+
"delete": [];
|
|
23
|
+
}>();
|
|
24
|
+
|
|
25
|
+
const { t } = useI18n();
|
|
26
|
+
const { validate: validateAddress } = useFormValidation<AccountAddressFormState>("accountAddress");
|
|
27
|
+
|
|
28
|
+
const confirmDeleteOpen = ref(false);
|
|
29
|
+
|
|
30
|
+
const typeLabel = computed(() =>
|
|
31
|
+
props.address.type === "billing"
|
|
32
|
+
? t("addresses.type.billing")
|
|
33
|
+
: t("addresses.type.shipping"),
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
function confirmDelete() {
|
|
37
|
+
confirmDeleteOpen.value = false;
|
|
38
|
+
emit("delete");
|
|
39
|
+
}
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<template>
|
|
43
|
+
<UCard>
|
|
44
|
+
<template #header>
|
|
45
|
+
<div class="flex items-start justify-between">
|
|
46
|
+
<div>
|
|
47
|
+
<div class="inline-flex items-center gap-1.5">
|
|
48
|
+
<p class="text-base font-semibold text-highlighted">
|
|
49
|
+
{{ address.label }}
|
|
50
|
+
</p>
|
|
51
|
+
<UTooltip
|
|
52
|
+
v-if="address.isDefault"
|
|
53
|
+
:text="t('addresses.defaultTooltip')"
|
|
54
|
+
>
|
|
55
|
+
<UIcon
|
|
56
|
+
:name="icon('success')"
|
|
57
|
+
class="size-4 text-success"
|
|
58
|
+
:aria-label="t('addresses.defaultAriaLabel')"
|
|
59
|
+
/>
|
|
60
|
+
</UTooltip>
|
|
61
|
+
</div>
|
|
62
|
+
<p class="mt-1 text-xs uppercase tracking-wide text-muted">
|
|
63
|
+
{{ typeLabel }}
|
|
64
|
+
</p>
|
|
65
|
+
</div>
|
|
66
|
+
<div class="flex items-center gap-1">
|
|
67
|
+
<UTooltip :text="t('actions.edit')">
|
|
68
|
+
<UButton
|
|
69
|
+
:icon="icon('edit')"
|
|
70
|
+
variant="ghost"
|
|
71
|
+
color="primary"
|
|
72
|
+
:aria-label="t('actions.edit')"
|
|
73
|
+
@click="emit('toggle-edit')"
|
|
74
|
+
/>
|
|
75
|
+
</UTooltip>
|
|
76
|
+
<UTooltip
|
|
77
|
+
v-if="!isDeleteDisabled"
|
|
78
|
+
:text="t('addresses.actions.delete')"
|
|
79
|
+
>
|
|
80
|
+
<UButton
|
|
81
|
+
:icon="icon('delete')"
|
|
82
|
+
variant="ghost"
|
|
83
|
+
color="error"
|
|
84
|
+
:aria-label="t('addresses.actions.delete')"
|
|
85
|
+
@click="confirmDeleteOpen = true"
|
|
86
|
+
/>
|
|
87
|
+
</UTooltip>
|
|
88
|
+
<UButton
|
|
89
|
+
v-else
|
|
90
|
+
:icon="icon('delete')"
|
|
91
|
+
variant="ghost"
|
|
92
|
+
color="neutral"
|
|
93
|
+
disabled
|
|
94
|
+
class="text-gray-300 dark:text-gray-600"
|
|
95
|
+
:aria-label="t('addresses.actions.delete')"
|
|
96
|
+
/>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
</template>
|
|
100
|
+
|
|
101
|
+
<address
|
|
102
|
+
v-if="!isEditing"
|
|
103
|
+
class="not-italic text-sm text-toned leading-6"
|
|
104
|
+
>
|
|
105
|
+
<div
|
|
106
|
+
v-if="address.company"
|
|
107
|
+
class="font-medium text-highlighted"
|
|
108
|
+
>
|
|
109
|
+
{{ address.company }}
|
|
110
|
+
</div>
|
|
111
|
+
<div
|
|
112
|
+
v-else
|
|
113
|
+
aria-hidden="true"
|
|
114
|
+
>
|
|
115
|
+
|
|
116
|
+
</div>
|
|
117
|
+
<div>{{ address.firstName }} {{ address.lastName }}</div>
|
|
118
|
+
<div>{{ address.street }} {{ address.streetNumber }}</div>
|
|
119
|
+
<div>{{ address.zip }} {{ address.city }}</div>
|
|
120
|
+
<div>{{ address.country }}</div>
|
|
121
|
+
</address>
|
|
122
|
+
|
|
123
|
+
<UForm
|
|
124
|
+
v-else
|
|
125
|
+
:state="formState"
|
|
126
|
+
:validate="validateAddress"
|
|
127
|
+
class="space-y-4"
|
|
128
|
+
@submit="emit('submit')"
|
|
129
|
+
>
|
|
130
|
+
<div class="grid grid-cols-1 sm:grid-cols-2 gap-3">
|
|
131
|
+
<UFormField
|
|
132
|
+
:label="t('addresses.fields.label')"
|
|
133
|
+
name="label"
|
|
134
|
+
class="sm:col-span-2"
|
|
135
|
+
>
|
|
136
|
+
<UInput
|
|
137
|
+
v-model="formState.label"
|
|
138
|
+
class="w-full"
|
|
139
|
+
/>
|
|
140
|
+
</UFormField>
|
|
141
|
+
<UFormField
|
|
142
|
+
:label="t('addresses.fields.company')"
|
|
143
|
+
name="company"
|
|
144
|
+
class="sm:col-span-2"
|
|
145
|
+
>
|
|
146
|
+
<UInput
|
|
147
|
+
v-model="formState.company"
|
|
148
|
+
autocomplete="organization"
|
|
149
|
+
class="w-full"
|
|
150
|
+
/>
|
|
151
|
+
</UFormField>
|
|
152
|
+
<UFormField
|
|
153
|
+
:label="t('addresses.fields.firstName')"
|
|
154
|
+
name="firstName"
|
|
155
|
+
>
|
|
156
|
+
<UInput
|
|
157
|
+
v-model="formState.firstName"
|
|
158
|
+
autocomplete="given-name"
|
|
159
|
+
class="w-full"
|
|
160
|
+
/>
|
|
161
|
+
</UFormField>
|
|
162
|
+
<UFormField
|
|
163
|
+
:label="t('addresses.fields.lastName')"
|
|
164
|
+
name="lastName"
|
|
165
|
+
>
|
|
166
|
+
<UInput
|
|
167
|
+
v-model="formState.lastName"
|
|
168
|
+
autocomplete="family-name"
|
|
169
|
+
class="w-full"
|
|
170
|
+
/>
|
|
171
|
+
</UFormField>
|
|
172
|
+
<UFormField
|
|
173
|
+
:label="t('addresses.fields.street')"
|
|
174
|
+
name="street"
|
|
175
|
+
>
|
|
176
|
+
<UInput
|
|
177
|
+
v-model="formState.street"
|
|
178
|
+
autocomplete="street-address"
|
|
179
|
+
class="w-full"
|
|
180
|
+
/>
|
|
181
|
+
</UFormField>
|
|
182
|
+
<UFormField
|
|
183
|
+
:label="t('addresses.fields.streetNumber')"
|
|
184
|
+
name="streetNumber"
|
|
185
|
+
>
|
|
186
|
+
<UInput
|
|
187
|
+
v-model="formState.streetNumber"
|
|
188
|
+
class="w-full"
|
|
189
|
+
/>
|
|
190
|
+
</UFormField>
|
|
191
|
+
<UFormField
|
|
192
|
+
:label="t('addresses.fields.zip')"
|
|
193
|
+
name="zip"
|
|
194
|
+
>
|
|
195
|
+
<UInput
|
|
196
|
+
v-model="formState.zip"
|
|
197
|
+
autocomplete="postal-code"
|
|
198
|
+
class="w-full"
|
|
199
|
+
/>
|
|
200
|
+
</UFormField>
|
|
201
|
+
<UFormField
|
|
202
|
+
:label="t('addresses.fields.city')"
|
|
203
|
+
name="city"
|
|
204
|
+
>
|
|
205
|
+
<UInput
|
|
206
|
+
v-model="formState.city"
|
|
207
|
+
autocomplete="address-level2"
|
|
208
|
+
class="w-full"
|
|
209
|
+
/>
|
|
210
|
+
</UFormField>
|
|
211
|
+
<UFormField
|
|
212
|
+
:label="t('addresses.fields.country')"
|
|
213
|
+
name="country"
|
|
214
|
+
class="sm:col-span-2"
|
|
215
|
+
>
|
|
216
|
+
<UiFormsCountrySelection
|
|
217
|
+
v-model="formState.country"
|
|
218
|
+
class="w-full"
|
|
219
|
+
/>
|
|
220
|
+
</UFormField>
|
|
221
|
+
<UFormField
|
|
222
|
+
:label="t('addresses.fields.type')"
|
|
223
|
+
name="type"
|
|
224
|
+
class="sm:col-span-2"
|
|
225
|
+
>
|
|
226
|
+
<USelect
|
|
227
|
+
v-model="formState.type"
|
|
228
|
+
:items="typeOptions"
|
|
229
|
+
value-key="value"
|
|
230
|
+
class="w-full"
|
|
231
|
+
/>
|
|
232
|
+
</UFormField>
|
|
233
|
+
<div class="sm:col-span-2">
|
|
234
|
+
<UCheckbox
|
|
235
|
+
:model-value="formState.isDefault"
|
|
236
|
+
:disabled="isDefaultLocked"
|
|
237
|
+
:label="isDefaultLocked
|
|
238
|
+
? t('addresses.fields.isDefaultSet')
|
|
239
|
+
: t('addresses.fields.isDefault')"
|
|
240
|
+
@update:model-value="emit('is-default-change', $event)"
|
|
241
|
+
/>
|
|
242
|
+
</div>
|
|
243
|
+
</div>
|
|
244
|
+
|
|
245
|
+
<UAlert
|
|
246
|
+
v-if="saveError"
|
|
247
|
+
color="error"
|
|
248
|
+
variant="soft"
|
|
249
|
+
:title="saveError"
|
|
250
|
+
/>
|
|
251
|
+
|
|
252
|
+
<div class="flex justify-end">
|
|
253
|
+
<UButton
|
|
254
|
+
type="submit"
|
|
255
|
+
:loading="isSaving"
|
|
256
|
+
:label="t('addresses.actions.save')"
|
|
257
|
+
/>
|
|
258
|
+
</div>
|
|
259
|
+
</UForm>
|
|
260
|
+
</UCard>
|
|
261
|
+
|
|
262
|
+
<UModal
|
|
263
|
+
v-model:open="confirmDeleteOpen"
|
|
264
|
+
:title="t('addresses.delete.title')"
|
|
265
|
+
>
|
|
266
|
+
<template #body>
|
|
267
|
+
<p class="text-sm text-muted">
|
|
268
|
+
{{ t('addresses.delete.confirm', { label: address.label }) }}
|
|
269
|
+
</p>
|
|
270
|
+
</template>
|
|
271
|
+
<template #footer>
|
|
272
|
+
<UButton
|
|
273
|
+
color="neutral"
|
|
274
|
+
variant="ghost"
|
|
275
|
+
@click="confirmDeleteOpen = false"
|
|
276
|
+
>
|
|
277
|
+
{{ t('addresses.delete.cancel') }}
|
|
278
|
+
</UButton>
|
|
279
|
+
<UButton
|
|
280
|
+
color="error"
|
|
281
|
+
@click="confirmDelete"
|
|
282
|
+
>
|
|
283
|
+
{{ t('addresses.delete.submit') }}
|
|
284
|
+
</UButton>
|
|
285
|
+
</template>
|
|
286
|
+
</UModal>
|
|
287
|
+
</template>
|