@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,252 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import GovernanceCostCenterModal from "./GovernanceCostCenterModal.vue";
|
|
3
|
+
import type { TableColumn } from "@nuxt/ui";
|
|
4
|
+
|
|
5
|
+
import type { CostCenter } from "../../../interfaces/b2b";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Cost centers of the organization (account pattern): data table with an
|
|
9
|
+
* Add button opening the create modal; edit per row, again as a modal.
|
|
10
|
+
* Search and sortable columns per the datatable-ux baseline.
|
|
11
|
+
*/
|
|
12
|
+
const { icon } = useIcons();
|
|
13
|
+
const { t } = useI18n();
|
|
14
|
+
const localePath = useLocalePath();
|
|
15
|
+
const { costCenters, role, status, refresh } = useB2BContext();
|
|
16
|
+
const { formatCurrency } = useCartSummaryFormatting();
|
|
17
|
+
const { tableUi } = useDataTable();
|
|
18
|
+
|
|
19
|
+
const canManage = computed(() => role.value !== null && role.value !== "requester");
|
|
20
|
+
const modalOpen = ref(false);
|
|
21
|
+
const editing = ref<CostCenter | null>(null);
|
|
22
|
+
|
|
23
|
+
function add(): void {
|
|
24
|
+
editing.value = null;
|
|
25
|
+
modalOpen.value = true;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function edit(costCenter: CostCenter): void {
|
|
29
|
+
editing.value = costCenter;
|
|
30
|
+
modalOpen.value = true;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* ---- search ---------------------------------------------------------- */
|
|
34
|
+
const search = ref("");
|
|
35
|
+
|
|
36
|
+
const filtered = computed(() => {
|
|
37
|
+
const query = search.value.trim().toLowerCase();
|
|
38
|
+
if (!query) {
|
|
39
|
+
return costCenters.value;
|
|
40
|
+
}
|
|
41
|
+
return costCenters.value.filter(costCenter =>
|
|
42
|
+
[costCenter.code, costCenter.label, costCenter.limit?.approval.approverName ?? ""]
|
|
43
|
+
.some(value => value.toLowerCase().includes(query)),
|
|
44
|
+
);
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
/* ---- columns + sorting ------------------------------------------------ */
|
|
48
|
+
const sorting = ref([{ id: "code", desc: false }]);
|
|
49
|
+
|
|
50
|
+
const columns = computed<TableColumn<CostCenter>[]>(() => [
|
|
51
|
+
{ accessorKey: "code", header: t("governance.costCenters.columns.code") },
|
|
52
|
+
{ accessorKey: "label", header: t("governance.costCenters.columns.label") },
|
|
53
|
+
{
|
|
54
|
+
id: "budget",
|
|
55
|
+
accessorFn: row => row.limit?.totalBudget ?? -1,
|
|
56
|
+
header: t("governance.costCenters.columns.budget"),
|
|
57
|
+
meta: { class: { th: "text-right", td: "text-right" } },
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: "available",
|
|
61
|
+
accessorFn: row => row.limit?.availableBudget ?? -1,
|
|
62
|
+
header: t("governance.costCenters.columns.available"),
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: "approver",
|
|
66
|
+
header: t("governance.costCenters.columns.approver"),
|
|
67
|
+
enableSorting: false,
|
|
68
|
+
},
|
|
69
|
+
{ id: "actions", header: "", enableSorting: false },
|
|
70
|
+
]);
|
|
71
|
+
|
|
72
|
+
function utilization(cc: CostCenter): number | null {
|
|
73
|
+
const limit = cc.limit;
|
|
74
|
+
if (!limit?.totalBudget || limit.availableBudget === undefined) {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
return Math.min(100, Math.round(((limit.totalBudget - limit.availableBudget) / limit.totalBudget) * 100));
|
|
78
|
+
}
|
|
79
|
+
</script>
|
|
80
|
+
|
|
81
|
+
<template>
|
|
82
|
+
<div>
|
|
83
|
+
<UiTableToolbar
|
|
84
|
+
v-model:search="search"
|
|
85
|
+
:search-placeholder="t('governance.costCenters.searchPlaceholder')"
|
|
86
|
+
>
|
|
87
|
+
<template
|
|
88
|
+
v-if="canManage"
|
|
89
|
+
#actions
|
|
90
|
+
>
|
|
91
|
+
<UButton
|
|
92
|
+
color="primary"
|
|
93
|
+
tabindex="0"
|
|
94
|
+
:icon="icon('plus')"
|
|
95
|
+
:label="t('governance.costCenters.add')"
|
|
96
|
+
@click="add"
|
|
97
|
+
/>
|
|
98
|
+
</template>
|
|
99
|
+
</UiTableToolbar>
|
|
100
|
+
|
|
101
|
+
<UTable
|
|
102
|
+
v-model:sorting="sorting"
|
|
103
|
+
:data="filtered"
|
|
104
|
+
:columns="columns"
|
|
105
|
+
:loading="status === 'pending'"
|
|
106
|
+
:ui="tableUi"
|
|
107
|
+
>
|
|
108
|
+
<template #code-header="{ column }">
|
|
109
|
+
<UiTableSortButton
|
|
110
|
+
:column="column"
|
|
111
|
+
:label="t('governance.costCenters.columns.code')"
|
|
112
|
+
/>
|
|
113
|
+
</template>
|
|
114
|
+
<template #label-header="{ column }">
|
|
115
|
+
<UiTableSortButton
|
|
116
|
+
:column="column"
|
|
117
|
+
:label="t('governance.costCenters.columns.label')"
|
|
118
|
+
/>
|
|
119
|
+
</template>
|
|
120
|
+
<template #budget-header="{ column }">
|
|
121
|
+
<UiTableSortButton
|
|
122
|
+
:column="column"
|
|
123
|
+
:label="t('governance.costCenters.columns.budget')"
|
|
124
|
+
/>
|
|
125
|
+
</template>
|
|
126
|
+
<template #available-header="{ column }">
|
|
127
|
+
<UiTableSortButton
|
|
128
|
+
:column="column"
|
|
129
|
+
:label="t('governance.costCenters.columns.available')"
|
|
130
|
+
/>
|
|
131
|
+
</template>
|
|
132
|
+
|
|
133
|
+
<template #label-cell="{ row }">
|
|
134
|
+
<ULink
|
|
135
|
+
class="font-semibold text-highlighted hover:text-primary transition-colors"
|
|
136
|
+
:to="localePath(`/account/cost-centers/${row.original.id}`)"
|
|
137
|
+
>
|
|
138
|
+
{{ row.original.label }}
|
|
139
|
+
</ULink>
|
|
140
|
+
</template>
|
|
141
|
+
<template #budget-cell="{ row }">
|
|
142
|
+
<span
|
|
143
|
+
v-if="row.original.limit?.totalBudget !== undefined"
|
|
144
|
+
class="tabular-nums"
|
|
145
|
+
>
|
|
146
|
+
{{ formatCurrency(row.original.limit.totalBudget) }}
|
|
147
|
+
</span>
|
|
148
|
+
<span
|
|
149
|
+
v-else
|
|
150
|
+
class="text-dimmed"
|
|
151
|
+
>—</span>
|
|
152
|
+
</template>
|
|
153
|
+
<template #available-cell="{ row }">
|
|
154
|
+
<div
|
|
155
|
+
v-if="row.original.limit?.availableBudget !== undefined"
|
|
156
|
+
class="flex items-center gap-2 min-w-32"
|
|
157
|
+
>
|
|
158
|
+
<span class="tabular-nums shrink-0">
|
|
159
|
+
{{ formatCurrency(row.original.limit.availableBudget) }}
|
|
160
|
+
</span>
|
|
161
|
+
<div class="h-1.5 flex-1 rounded-full bg-elevated overflow-hidden">
|
|
162
|
+
<div
|
|
163
|
+
class="h-full rounded-full"
|
|
164
|
+
:class="(utilization(row.original) ?? 0) >= 90 ? 'bg-warning' : 'bg-primary'"
|
|
165
|
+
:style="{ width: `${utilization(row.original) ?? 0}%` }"
|
|
166
|
+
/>
|
|
167
|
+
</div>
|
|
168
|
+
</div>
|
|
169
|
+
<span
|
|
170
|
+
v-else
|
|
171
|
+
class="text-dimmed"
|
|
172
|
+
>—</span>
|
|
173
|
+
</template>
|
|
174
|
+
<template #approver-cell="{ row }">
|
|
175
|
+
<span v-if="row.original.limit?.approval.approverName">
|
|
176
|
+
{{ row.original.limit.approval.approverName }}
|
|
177
|
+
<UBadge
|
|
178
|
+
v-if="row.original.limit.approval.required"
|
|
179
|
+
color="warning"
|
|
180
|
+
variant="subtle"
|
|
181
|
+
size="sm"
|
|
182
|
+
class="ml-1.5"
|
|
183
|
+
:label="t('governance.approvalRequired')"
|
|
184
|
+
/>
|
|
185
|
+
</span>
|
|
186
|
+
<span
|
|
187
|
+
v-else
|
|
188
|
+
class="text-dimmed"
|
|
189
|
+
>—</span>
|
|
190
|
+
</template>
|
|
191
|
+
<template #actions-cell="{ row }">
|
|
192
|
+
<div class="flex items-center justify-end gap-1">
|
|
193
|
+
<UTooltip :text="t('governance.requisitions.details')">
|
|
194
|
+
<UButton
|
|
195
|
+
color="neutral"
|
|
196
|
+
variant="ghost"
|
|
197
|
+
size="sm"
|
|
198
|
+
tabindex="0"
|
|
199
|
+
:icon="icon('eye')"
|
|
200
|
+
:aria-label="t('governance.requisitions.details')"
|
|
201
|
+
:to="localePath(`/account/cost-centers/${row.original.id}`)"
|
|
202
|
+
/>
|
|
203
|
+
</UTooltip>
|
|
204
|
+
<UTooltip
|
|
205
|
+
v-if="canManage"
|
|
206
|
+
:text="t('governance.edit')"
|
|
207
|
+
>
|
|
208
|
+
<UButton
|
|
209
|
+
:icon="icon('edit')"
|
|
210
|
+
color="neutral"
|
|
211
|
+
variant="ghost"
|
|
212
|
+
size="sm"
|
|
213
|
+
tabindex="0"
|
|
214
|
+
:aria-label="t('governance.edit')"
|
|
215
|
+
@click="edit(row.original)"
|
|
216
|
+
/>
|
|
217
|
+
</UTooltip>
|
|
218
|
+
</div>
|
|
219
|
+
</template>
|
|
220
|
+
|
|
221
|
+
<template #loading>
|
|
222
|
+
<div class="space-y-3 py-2">
|
|
223
|
+
<USkeleton
|
|
224
|
+
v-for="index in 5"
|
|
225
|
+
:key="index"
|
|
226
|
+
class="h-9 w-full"
|
|
227
|
+
/>
|
|
228
|
+
</div>
|
|
229
|
+
</template>
|
|
230
|
+
<template #empty>
|
|
231
|
+
<UiFeedbackEmptyState
|
|
232
|
+
v-if="search"
|
|
233
|
+
:icon="icon('no-results')"
|
|
234
|
+
:title="t('table.noResults.title')"
|
|
235
|
+
:description="t('table.noResults.description')"
|
|
236
|
+
/>
|
|
237
|
+
<UiFeedbackEmptyState
|
|
238
|
+
v-else
|
|
239
|
+
:icon="icon('empty')"
|
|
240
|
+
:title="t('governance.costCenters.empty.title')"
|
|
241
|
+
:description="t('governance.costCenters.empty.description')"
|
|
242
|
+
/>
|
|
243
|
+
</template>
|
|
244
|
+
</UTable>
|
|
245
|
+
|
|
246
|
+
<GovernanceCostCenterModal
|
|
247
|
+
v-model:open="modalOpen"
|
|
248
|
+
:cost-center="editing"
|
|
249
|
+
@saved="refresh"
|
|
250
|
+
/>
|
|
251
|
+
</div>
|
|
252
|
+
</template>
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { Requisition, RequisitionStatus, WorkflowHistoryAction } from "../../../interfaces/b2b";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Detail page content of one requisition: head facts, positions with
|
|
6
|
+
* images and cost centers, delivery address and the workflow audit trail
|
|
7
|
+
* as a timeline — the full compliance picture of one order request.
|
|
8
|
+
*/
|
|
9
|
+
const props = defineProps<{
|
|
10
|
+
requisitionId: string;
|
|
11
|
+
}>();
|
|
12
|
+
|
|
13
|
+
const { icon } = useIcons();
|
|
14
|
+
const { t, d } = useI18n();
|
|
15
|
+
const { to } = useAppUrl();
|
|
16
|
+
const toast = useToast();
|
|
17
|
+
const cart = useCartStore();
|
|
18
|
+
const { role, costCenterById } = useB2BContext();
|
|
19
|
+
const { getImage } = useProductImage();
|
|
20
|
+
const { formatCurrency } = useCartSummaryFormatting();
|
|
21
|
+
|
|
22
|
+
const { data: requisition, status, error } = useFetch<Requisition>(
|
|
23
|
+
`/api/account/requisitions/${props.requisitionId}`,
|
|
24
|
+
{ key: `account-requisition:${props.requisitionId}` },
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
const statusColors: Record<RequisitionStatus, "warning" | "success" | "error"> = {
|
|
28
|
+
open: "warning",
|
|
29
|
+
ordered: "success",
|
|
30
|
+
cancelled: "error",
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const actionColors: Record<WorkflowHistoryAction, "neutral" | "info" | "success" | "warning" | "error"> = {
|
|
34
|
+
submitted: "info",
|
|
35
|
+
forwarded: "info",
|
|
36
|
+
approved: "success",
|
|
37
|
+
escalated: "warning",
|
|
38
|
+
rejected: "error",
|
|
39
|
+
ordered: "success",
|
|
40
|
+
cancelled: "error",
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/** Timeline dot colors matching the action badge palette. */
|
|
44
|
+
const actionDots: Record<WorkflowHistoryAction, string> = {
|
|
45
|
+
submitted: "bg-info",
|
|
46
|
+
forwarded: "bg-info",
|
|
47
|
+
approved: "bg-success",
|
|
48
|
+
escalated: "bg-warning",
|
|
49
|
+
rejected: "bg-error",
|
|
50
|
+
ordered: "bg-success",
|
|
51
|
+
cancelled: "bg-error",
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const canLoad = computed(() =>
|
|
55
|
+
role.value !== null && role.value !== "requester"
|
|
56
|
+
&& requisition.value?.status === "open"
|
|
57
|
+
&& !cart.requisitions.some(r => r.id === props.requisitionId),
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
const costCenterLabel = (id?: string): string | null =>
|
|
61
|
+
id ? (costCenterById.value.get(id)?.label ?? id) : null;
|
|
62
|
+
|
|
63
|
+
const addressLines = computed(() => {
|
|
64
|
+
const address = requisition.value?.deliveryAddress;
|
|
65
|
+
if (!address) {
|
|
66
|
+
return [];
|
|
67
|
+
}
|
|
68
|
+
return [
|
|
69
|
+
address.company,
|
|
70
|
+
address.street,
|
|
71
|
+
`${address.postalCode} ${address.city}`.trim(),
|
|
72
|
+
address.country,
|
|
73
|
+
].filter(Boolean);
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
const formatDate = (value: string) =>
|
|
77
|
+
d(new Date(value), { dateStyle: "medium" });
|
|
78
|
+
|
|
79
|
+
const formatDateTime = (value: string) =>
|
|
80
|
+
d(new Date(value), { dateStyle: "medium", timeStyle: "short" });
|
|
81
|
+
|
|
82
|
+
async function loadIntoCart(): Promise<void> {
|
|
83
|
+
if (!requisition.value) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
const added = cart.addRequisition(requisition.value);
|
|
87
|
+
if (!added) {
|
|
88
|
+
toast.add({
|
|
89
|
+
title: t("cart.requisition.mergeRejected"),
|
|
90
|
+
description: t("cart.requisition.mergeRejectedDescription"),
|
|
91
|
+
color: "warning",
|
|
92
|
+
icon: icon("warning"),
|
|
93
|
+
});
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
await navigateTo(to("/cart"));
|
|
97
|
+
}
|
|
98
|
+
</script>
|
|
99
|
+
|
|
100
|
+
<template>
|
|
101
|
+
<div>
|
|
102
|
+
<USkeleton
|
|
103
|
+
v-if="status === 'pending'"
|
|
104
|
+
class="h-64 w-full rounded-xl"
|
|
105
|
+
/>
|
|
106
|
+
|
|
107
|
+
<UiFeedbackErrorBoundary
|
|
108
|
+
v-else-if="error || !requisition"
|
|
109
|
+
:title="t('governance.requisitions.notFound')"
|
|
110
|
+
:show-retry="false"
|
|
111
|
+
/>
|
|
112
|
+
|
|
113
|
+
<div
|
|
114
|
+
v-else
|
|
115
|
+
class="space-y-6"
|
|
116
|
+
>
|
|
117
|
+
<!-- Head -->
|
|
118
|
+
<div
|
|
119
|
+
class="border border-(--ui-border) rounded-xl p-4 sm:p-5
|
|
120
|
+
flex flex-wrap items-center gap-x-8 gap-y-3"
|
|
121
|
+
>
|
|
122
|
+
<div>
|
|
123
|
+
<p class="text-xs text-muted">
|
|
124
|
+
{{ t('governance.requisitions.columns.workflow') }}
|
|
125
|
+
</p>
|
|
126
|
+
<p class="text-sm font-medium text-highlighted">
|
|
127
|
+
{{ requisition.workflowName }}
|
|
128
|
+
</p>
|
|
129
|
+
</div>
|
|
130
|
+
<div>
|
|
131
|
+
<p class="text-xs text-muted">
|
|
132
|
+
{{ t('governance.requisitions.columns.requestedBy') }}
|
|
133
|
+
</p>
|
|
134
|
+
<p class="text-sm font-medium text-highlighted">
|
|
135
|
+
{{ requisition.requestedBy.name }}
|
|
136
|
+
</p>
|
|
137
|
+
</div>
|
|
138
|
+
<div>
|
|
139
|
+
<p class="text-xs text-muted">
|
|
140
|
+
{{ t('governance.requisitions.requestedAtShort') }}
|
|
141
|
+
</p>
|
|
142
|
+
<p class="text-sm font-medium text-highlighted">
|
|
143
|
+
{{ formatDate(requisition.requestedAt) }}
|
|
144
|
+
</p>
|
|
145
|
+
</div>
|
|
146
|
+
<div>
|
|
147
|
+
<p class="text-xs text-muted">
|
|
148
|
+
{{ t('governance.requisitions.columns.totalValue') }}
|
|
149
|
+
</p>
|
|
150
|
+
<p class="text-sm font-semibold text-highlighted tabular-nums">
|
|
151
|
+
{{ formatCurrency(requisition.totalValue) }}
|
|
152
|
+
</p>
|
|
153
|
+
</div>
|
|
154
|
+
<div class="flex items-center gap-3 ms-auto">
|
|
155
|
+
<UBadge
|
|
156
|
+
:color="statusColors[requisition.status]"
|
|
157
|
+
variant="subtle"
|
|
158
|
+
:label="t(`governance.requisitions.status.${requisition.status}`)"
|
|
159
|
+
/>
|
|
160
|
+
<UButton
|
|
161
|
+
v-if="canLoad"
|
|
162
|
+
color="primary"
|
|
163
|
+
size="sm"
|
|
164
|
+
tabindex="0"
|
|
165
|
+
:icon="icon('cart')"
|
|
166
|
+
:label="t('cart.requisition.load')"
|
|
167
|
+
@click="loadIntoCart"
|
|
168
|
+
/>
|
|
169
|
+
</div>
|
|
170
|
+
</div>
|
|
171
|
+
|
|
172
|
+
<!-- Positions -->
|
|
173
|
+
<section class="border border-(--ui-border) rounded-xl overflow-hidden">
|
|
174
|
+
<h2 class="px-4 sm:px-5 py-3 text-sm font-semibold text-highlighted bg-elevated/60 border-b border-(--ui-border)">
|
|
175
|
+
{{ t('governance.requisitions.positionsTitle') }}
|
|
176
|
+
</h2>
|
|
177
|
+
<ul class="divide-y divide-(--ui-border) px-4 sm:px-5">
|
|
178
|
+
<li
|
|
179
|
+
v-for="item in requisition.items"
|
|
180
|
+
:key="`${requisition.id}-${item.id}`"
|
|
181
|
+
class="flex items-center gap-3 py-3"
|
|
182
|
+
>
|
|
183
|
+
<span
|
|
184
|
+
class="w-14 h-14 shrink-0 flex items-center justify-center rounded-lg
|
|
185
|
+
bg-elevated/60 ring-1 ring-(--ui-border) p-1.5"
|
|
186
|
+
>
|
|
187
|
+
<img
|
|
188
|
+
v-if="item.image"
|
|
189
|
+
:src="getImage(item.image)"
|
|
190
|
+
:alt="item.name"
|
|
191
|
+
class="max-h-full max-w-full object-contain"
|
|
192
|
+
>
|
|
193
|
+
</span>
|
|
194
|
+
<div class="min-w-0 flex-1">
|
|
195
|
+
<p class="text-sm font-medium text-highlighted truncate">
|
|
196
|
+
{{ item.name }}
|
|
197
|
+
</p>
|
|
198
|
+
<p class="text-xs text-muted">
|
|
199
|
+
{{ item.sku }} · {{ item.quantity }}× {{ formatCurrency(item.price) }}
|
|
200
|
+
<template v-if="costCenterLabel(item.costCenterId)">
|
|
201
|
+
· {{ costCenterLabel(item.costCenterId) }}
|
|
202
|
+
</template>
|
|
203
|
+
</p>
|
|
204
|
+
<p
|
|
205
|
+
v-for="text in item.positionTexts ?? []"
|
|
206
|
+
:key="text"
|
|
207
|
+
class="text-xs text-muted italic truncate"
|
|
208
|
+
>
|
|
209
|
+
{{ text }}
|
|
210
|
+
</p>
|
|
211
|
+
</div>
|
|
212
|
+
<span class="text-sm tabular-nums text-highlighted shrink-0">
|
|
213
|
+
{{ formatCurrency(item.price * item.quantity) }}
|
|
214
|
+
</span>
|
|
215
|
+
</li>
|
|
216
|
+
</ul>
|
|
217
|
+
<div
|
|
218
|
+
class="flex justify-between px-4 sm:px-5 py-3 border-t border-(--ui-border)
|
|
219
|
+
text-sm font-semibold text-highlighted"
|
|
220
|
+
>
|
|
221
|
+
<span>{{ t('governance.requisitions.columns.totalValue') }}</span>
|
|
222
|
+
<span class="tabular-nums">{{ formatCurrency(requisition.totalValue) }}</span>
|
|
223
|
+
</div>
|
|
224
|
+
</section>
|
|
225
|
+
|
|
226
|
+
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6 items-start">
|
|
227
|
+
<!-- Audit trail -->
|
|
228
|
+
<section
|
|
229
|
+
v-if="requisition.history?.length"
|
|
230
|
+
class="border border-(--ui-border) rounded-xl overflow-hidden"
|
|
231
|
+
>
|
|
232
|
+
<h2 class="px-4 sm:px-5 py-3 text-sm font-semibold text-highlighted bg-elevated/60 border-b border-(--ui-border)">
|
|
233
|
+
{{ t('governance.requisitions.historyTitle') }}
|
|
234
|
+
</h2>
|
|
235
|
+
<ol class="p-4 sm:p-5">
|
|
236
|
+
<li
|
|
237
|
+
v-for="(entry, index) in requisition.history"
|
|
238
|
+
:key="entry.id"
|
|
239
|
+
class="relative flex gap-4 pb-6 last:pb-0"
|
|
240
|
+
>
|
|
241
|
+
<span
|
|
242
|
+
v-if="index < (requisition.history?.length ?? 0) - 1"
|
|
243
|
+
aria-hidden="true"
|
|
244
|
+
class="absolute left-1.5 top-4 -bottom-1 w-px bg-(--ui-border)"
|
|
245
|
+
/>
|
|
246
|
+
<span
|
|
247
|
+
aria-hidden="true"
|
|
248
|
+
class="relative mt-1.5 size-3 shrink-0 rounded-full ring-4 ring-default"
|
|
249
|
+
:class="actionDots[entry.action]"
|
|
250
|
+
/>
|
|
251
|
+
<div class="min-w-0 text-sm">
|
|
252
|
+
<div class="flex flex-wrap items-center gap-x-2 gap-y-1">
|
|
253
|
+
<UBadge
|
|
254
|
+
:color="actionColors[entry.action]"
|
|
255
|
+
variant="subtle"
|
|
256
|
+
size="sm"
|
|
257
|
+
:label="t(`governance.requisitions.actions.${entry.action}`)"
|
|
258
|
+
/>
|
|
259
|
+
<span class="font-medium text-highlighted">{{ entry.actorName }}</span>
|
|
260
|
+
</div>
|
|
261
|
+
<p class="text-xs text-muted mt-1">
|
|
262
|
+
{{ t('governance.requisitions.step', { step: entry.stepSequence }) }}
|
|
263
|
+
· {{ formatDateTime(entry.actionDate) }}
|
|
264
|
+
</p>
|
|
265
|
+
<p
|
|
266
|
+
v-if="entry.comment"
|
|
267
|
+
class="text-xs text-muted italic mt-1 border-s-2 border-(--ui-border) ps-2"
|
|
268
|
+
>
|
|
269
|
+
{{ entry.comment }}
|
|
270
|
+
</p>
|
|
271
|
+
</div>
|
|
272
|
+
</li>
|
|
273
|
+
</ol>
|
|
274
|
+
</section>
|
|
275
|
+
|
|
276
|
+
<!-- Delivery address -->
|
|
277
|
+
<section
|
|
278
|
+
v-if="addressLines.length"
|
|
279
|
+
class="border border-(--ui-border) rounded-xl overflow-hidden"
|
|
280
|
+
>
|
|
281
|
+
<h2 class="px-4 sm:px-5 py-3 text-sm font-semibold text-highlighted bg-elevated/60 border-b border-(--ui-border)">
|
|
282
|
+
{{ t('orders.deliveryAddress') }}
|
|
283
|
+
</h2>
|
|
284
|
+
<address class="not-italic p-4 sm:p-5 text-sm text-muted">
|
|
285
|
+
<span
|
|
286
|
+
v-for="line in addressLines"
|
|
287
|
+
:key="line"
|
|
288
|
+
class="block"
|
|
289
|
+
>{{ line }}</span>
|
|
290
|
+
</address>
|
|
291
|
+
</section>
|
|
292
|
+
</div>
|
|
293
|
+
</div>
|
|
294
|
+
</div>
|
|
295
|
+
</template>
|