@meeovi/layer-commerce 1.0.10 → 1.0.13
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/app/components/catalog/product/ProductAccordion/ProductAccordion.vue +39 -0
- package/app/components/catalog/product/ProductAccordion/__tests__/ProductAccordion.spec.ts +15 -0
- package/app/components/catalog/product/ProductAccordion/types.ts +5 -0
- package/app/components/catalog/product/ProductProperties/ProductProperties.vue +50 -0
- package/app/components/catalog/product/ProductProperties/__tests__/ProductProperties.spec.ts +15 -0
- package/app/components/catalog/product/ProductProperties/types.ts +5 -0
- package/app/components/catalog/product/ProductSlider/ProductSlider.vue +28 -0
- package/app/components/catalog/product/ProductSlider/__tests__/ProductSlider.spec.ts +14 -0
- package/app/components/catalog/product/ProductSlider/types.ts +7 -0
- package/app/components/catalog/product/RecommendedProducts/RecommendedProducts.vue +12 -0
- package/app/components/catalog/product/RecommendedProducts/types.ts +5 -0
- package/app/components/catalog/product/RenderContentProductSlider/RenderContentProductSlider.vue +11 -0
- package/app/components/catalog/product/add-attribute.vue +54 -0
- package/app/components/catalog/product/add-product-type.vue +54 -0
- package/app/components/catalog/product/add-product.vue +53 -0
- package/app/components/catalog/product/add-showcase.vue +52 -0
- package/app/components/catalog/product/add-station.vue +54 -0
- package/app/components/catalog/product/bestsellers.vue +57 -0
- package/app/components/catalog/product/bidding.vue +93 -0
- package/app/components/catalog/product/colorOptions.vue +58 -0
- package/app/components/catalog/product/deals.vue +46 -0
- package/app/components/catalog/product/exclusives.vue +56 -0
- package/app/components/catalog/product/featuredproducts.vue +57 -0
- package/app/components/catalog/product/giftCard.vue +63 -0
- package/app/components/catalog/product/latestproducts.vue +46 -0
- package/app/components/catalog/product/productCard.vue +105 -0
- package/app/components/catalog/product/productCompare.vue +60 -0
- package/app/components/catalog/product/productCompareTable.vue +441 -0
- package/app/components/catalog/product/productDetails.vue +126 -0
- package/app/components/catalog/product/productFaqs.vue +17 -0
- package/app/components/catalog/product/productGallery.vue +16 -0
- package/app/components/catalog/product/productQty.vue +54 -0
- package/app/components/catalog/product/productReviews.vue +56 -0
- package/app/components/catalog/product/productSpecs.vue +116 -0
- package/app/components/catalog/product/radiostation.vue +36 -0
- package/app/components/catalog/product/recentlyviewed.vue +43 -0
- package/app/components/catalog/product/relatedbrands.vue +54 -0
- package/app/components/catalog/product/relatedproducts.vue +43 -0
- package/app/components/catalog/product/relatedstations.vue +40 -0
- package/app/components/catalog/product/shippingOptions.vue +41 -0
- package/app/components/catalog/product/sizeOptions.vue +42 -0
- package/app/components/catalog/product/update-attribute-set.vue +209 -0
- package/app/components/catalog/product/update-attribute.vue +118 -0
- package/app/components/catalog/product/update-product.vue +372 -0
- package/app/components/catalog/product/update-showcase.vue +153 -0
- package/app/components/catalog/shops/relatedstores.vue +37 -0
- package/app/components/catalog/shops/restaurant.vue +66 -0
- package/app/components/catalog/shops/stores.vue +44 -0
- package/app/components/catalog/vendor/README.md +3 -0
- package/app/components/catalog/vendor/blocks/biggestcustomers.vue +33 -0
- package/app/components/catalog/vendor/blocks/lowestselling.vue +33 -0
- package/app/components/catalog/vendor/blocks/topcategories.vue +33 -0
- package/app/components/catalog/vendor/blocks/topproducts.vue +27 -0
- package/app/components/catalog/vendor/pages/attributes.vue +43 -0
- package/app/components/catalog/vendor/pages/commissions.vue +43 -0
- package/app/components/catalog/vendor/pages/crm.vue +67 -0
- package/app/components/catalog/vendor/pages/dashboard.vue +46 -0
- package/app/components/catalog/vendor/pages/emails.vue +43 -0
- package/app/components/catalog/vendor/pages/enquiries.vue +43 -0
- package/app/components/catalog/vendor/pages/invoices.vue +43 -0
- package/app/components/catalog/vendor/pages/orders.vue +68 -0
- package/app/components/catalog/vendor/pages/products.vue +55 -0
- package/app/components/catalog/vendor/pages/reviews.vue +48 -0
- package/app/components/catalog/vendor/pages/shipments.vue +43 -0
- package/app/components/catalog/vendor/pages/stores.vue +43 -0
- package/app/components/categories/chart/[id].vue +200 -0
- package/app/components/categories/chart/add-chart.vue +142 -0
- package/app/components/categories/chart/chart.vue +82 -0
- package/app/components/categories/chart/monthlyChart.vue +46 -0
- package/app/components/categories/chart/weeklyChart.vue +46 -0
- package/app/components/categories/chart/yearlyChart.vue +46 -0
- package/app/components/categories/charts.vue +118 -0
- package/app/components/categories/deals.vue +101 -0
- package/app/components/categories/eats.vue +49 -0
- package/app/components/categories/restaurants.vue +26 -0
- package/app/components/categories/station/[id].vue +72 -0
- package/app/components/categories/stations.vue +124 -0
- package/app/components/categories/time/time.vue +63 -0
- package/app/components/categories/travel.vue +75 -0
- package/app/components/categories/weather/weather.vue +44 -0
- package/app/components/content/blocks/breadcrumbs.vue +0 -0
- package/app/components/content/blocks/currencySwitcher.vue +0 -0
- package/app/components/content/blocks/languageSwitcher.vue +0 -0
- package/app/components/content/blocks/videoproduct.vue +9 -0
- package/app/components/content/pages/checkout.vue +118 -0
- package/app/components/content/pages/meeoviGlobal.vue +68 -0
- package/app/components/content/pages/pickup-locations.vue +238 -0
- package/app/components/content/pages/showcases.vue +90 -0
- package/app/components/content/pages/success.vue +60 -0
- package/app/components/marketing/add-brand.vue +54 -0
- package/app/components/marketing/add-incentive.vue +54 -0
- package/app/components/marketing/promotions/giftcards.vue +102 -0
- package/app/components/marketing/promotions/subscriptions.vue +121 -0
- package/app/components/marketing/update-incentive.vue +326 -0
- package/app/components/menus/lowernav.vue +78 -0
- package/app/components/partials/LocaleSelector.vue +24 -0
- package/app/components/partials/ShoppingCart.vue +128 -0
- package/app/components/partials/StripePayment.vue +149 -0
- package/app/components/partials/addToCartBtn.vue +40 -0
- package/app/components/partials/cartItem.vue +124 -0
- package/app/components/partials/checkoutButton.vue +44 -0
- package/app/components/partials/compareBtn.vue +68 -0
- package/app/components/partials/ratings.vue +13 -0
- package/app/components/partials/store/CurrencySelector.vue +133 -0
- package/app/components/partials/store/StoreSwitcher.vue +13 -0
- package/app/components/placeholders/Comments.vue +15 -0
- package/app/components/placeholders/CreateListBtn.vue +7 -0
- package/app/components/placeholders/Event.vue +9 -0
- package/app/components/placeholders/ListShowcases.vue +9 -0
- package/app/components/placeholders/Short.vue +9 -0
- package/app/components/placeholders/Space.vue +9 -0
- package/app/components/placeholders/Tag.vue +7 -0
- package/app/components/related/brandCard.vue +41 -0
- package/app/components/related/incentiveCard.vue +44 -0
- package/app/components/related/invoiceCard.vue +43 -0
- package/app/components/related/orderCard.vue +43 -0
- package/app/components/related/relatedproducts.vue +17 -0
- package/app/components/sales/CartPageContent/CartPageContent.vue +37 -0
- package/app/components/sales/CheckoutAddress/CheckoutAddress.vue +50 -0
- package/app/components/sales/CheckoutAddress/__tests__/CheckoutAddress.spec.ts +16 -0
- package/app/components/sales/CheckoutAddress/types.ts +16 -0
- package/app/components/sales/CheckoutPayment/CheckoutPayment.vue +68 -0
- package/app/components/sales/CheckoutPayment/__tests__/CheckoutPayment.spec.ts +14 -0
- package/app/components/sales/CheckoutPayment/types.ts +12 -0
- package/app/components/sales/OrderSummary/OrderSummary.vue +57 -0
- package/app/components/sales/OrderSummary/__tests__/ContactInformation.spec.ts +52 -0
- package/app/components/sales/OrderSummary/types.ts +5 -0
- package/app/components/sales/incentives.vue +223 -0
- package/app/components/sales/invoices.vue +107 -0
- package/app/components/sales/orders.vue +378 -0
- package/app/components/sales/shipments.vue +65 -0
- package/app/components/sales/transactions.vue +109 -0
- package/app/components/shop/add-shop.vue +54 -0
- package/app/components/shop/cart/cartItem.vue +182 -0
- package/app/components/shop/cart/checkout.vue +415 -0
- package/app/components/shop/checkout/StripeCardElement.vue +206 -0
- package/app/components/shop/checkout/StripeCheckout.vue +49 -0
- package/app/components/shop/checkout/addressBilling.vue +263 -0
- package/app/components/shop/checkout/addressShipping.vue +175 -0
- package/app/components/shop/checkout/cart/ProductItem.vue +56 -0
- package/app/components/shop/checkout/cart/PromotionItem.vue +53 -0
- package/app/composables/_types.ts +18 -0
- package/app/composables/adapters/abstract/cartAdapter.ts +0 -0
- package/app/composables/adapters/abstract/categoryAdapter.ts +0 -0
- package/app/composables/adapters/abstract/customerAdapter.ts +0 -0
- package/app/composables/adapters/abstract/inventoryAdapter.ts +0 -0
- package/app/composables/adapters/abstract/orderAdapter.ts +0 -0
- package/app/composables/adapters/abstract/productAdapter.ts +7 -0
- package/app/composables/cart/registry.ts +20 -0
- package/app/composables/cart/types.ts +18 -0
- package/app/composables/cart/useCart.ts +15 -0
- package/app/composables/config.ts +19 -0
- package/app/composables/defs/apiDefinitions.ts +55 -0
- package/app/composables/defs/extension.feature +40 -0
- package/app/composables/defs/extension.mocks.ts +39 -0
- package/app/composables/defs/extension.test.ts +280 -0
- package/app/composables/defs/extension.ts +236 -0
- package/app/composables/defs/index.ts +3 -0
- package/app/composables/defs/types.ts +136 -0
- package/app/composables/domain/cart.ts +0 -0
- package/app/composables/domain/category.ts +0 -0
- package/app/composables/domain/order.ts +0 -0
- package/app/composables/domain/price.ts +0 -0
- package/app/composables/domain/product.ts +8 -0
- package/app/composables/domain/reward.ts +0 -0
- package/app/composables/domain/transactions.ts +0 -0
- package/app/composables/helpers/contextualizedNormalizers.feature +14 -0
- package/app/composables/helpers/contextualizedNormalizers.test.ts +85 -0
- package/app/composables/helpers/contextualizedNormalizers.ts +20 -0
- package/app/composables/helpers/index.ts +1 -0
- package/app/composables/index.ts +6 -0
- package/app/composables/methods/auth.ts +83 -0
- package/app/composables/methods/cart.ts +119 -0
- package/app/composables/methods/category.ts +27 -0
- package/app/composables/methods/checkout.ts +54 -0
- package/app/composables/methods/customer.ts +52 -0
- package/app/composables/methods/helpers.ts +5 -0
- package/app/composables/methods/index.ts +75 -0
- package/app/composables/methods/order.ts +39 -0
- package/app/composables/methods/product.ts +95 -0
- package/app/composables/methods/settings.ts +16 -0
- package/app/composables/models/cart.ts +95 -0
- package/app/composables/models/category.ts +13 -0
- package/app/composables/models/checkout.ts +17 -0
- package/app/composables/models/customer.ts +16 -0
- package/app/composables/models/facets.ts +25 -0
- package/app/composables/models/index.ts +94 -0
- package/app/composables/models/order.ts +43 -0
- package/app/composables/models/product.ts +73 -0
- package/app/composables/models/shared.ts +75 -0
- package/app/composables/products/registry.ts +20 -0
- package/app/composables/products/types.ts +13 -0
- package/app/composables/products/useEvents.ts +0 -0
- package/app/composables/products/useGiftCards.ts +0 -0
- package/app/composables/products/useProducts.ts +12 -0
- package/app/composables/products/useSubscriptions.ts +0 -0
- package/app/composables/registry.ts +21 -0
- package/app/composables/stores/cart.ts +218 -0
- package/app/composables/stores/cartStore.ts +300 -0
- package/app/composables/stores/checkout.ts +19 -0
- package/app/composables/stores/compare.ts +65 -0
- package/app/composables/stores/currency.js +29 -0
- package/app/composables/stores/digital-products.js +11 -0
- package/app/composables/stores/index.js +0 -0
- package/app/composables/stores/orders.ts +161 -0
- package/app/composables/stores/product.ts +26 -0
- package/app/composables/stores/productList.ts +0 -0
- package/app/composables/stores/productListInfo.ts +0 -0
- package/app/composables/stores/products.ts +112 -0
- package/app/composables/stores/recentlyViewedProducts.ts +0 -0
- package/app/composables/stores/review.ts +25 -0
- package/app/composables/stores/storeInPickUp.ts +22 -0
- package/app/composables/stores/user.ts +20 -0
- package/app/composables/stores/wishlist.ts +19 -0
- package/app/composables/types/Order.type.ts +181 -0
- package/app/composables/types/index.ts +285 -0
- package/app/composables/types/product.ts +14 -0
- package/app/composables/useBreakpoints/index.ts +1 -0
- package/app/composables/useBreakpoints/useBreakpoints.ts +28 -0
- package/app/composables/useCart/__tests__/useCart.spec.ts +11 -0
- package/app/composables/useCart/index.ts +1 -0
- package/app/composables/useCart/types.ts +17 -0
- package/app/composables/useCart/useCart.ts +46 -0
- package/app/composables/useCartShippingMethods/__tests__/useCartShippingMethods.spec.ts +11 -0
- package/app/composables/useCartShippingMethods/index.ts +1 -0
- package/app/composables/useCartShippingMethods/types.ts +17 -0
- package/app/composables/useCartShippingMethods/useCartShippingMethods.ts +47 -0
- package/app/composables/useCatalog.ts +64 -0
- package/app/composables/useContent/index.ts +1 -0
- package/app/composables/useContent/types.ts +44 -0
- package/app/composables/useContent/useContent.ts +45 -0
- package/app/composables/useContent.ts +57 -0
- package/app/composables/useCustomer/__tests__/useCustomer.spec.ts +25 -0
- package/app/composables/useCustomer/index.ts +2 -0
- package/app/composables/useCustomer/types.ts +17 -0
- package/app/composables/useCustomer/useCustomer.ts +40 -0
- package/app/composables/useCustomerAddress/__tests__/useCustomerAddress.spec.ts +11 -0
- package/app/composables/useCustomerAddress/index.ts +2 -0
- package/app/composables/useCustomerAddress/types.ts +17 -0
- package/app/composables/useCustomerAddress/useCustomerAddress.ts +55 -0
- package/app/composables/useCustomerOrder/__tests__/useCustomerOrder.spec.ts +11 -0
- package/app/composables/useCustomerOrder/adress.ts +10 -0
- package/app/composables/useCustomerOrder/index.ts +2 -0
- package/app/composables/useCustomerOrder/product.ts +37 -0
- package/app/composables/useCustomerOrder/types.ts +40 -0
- package/app/composables/useCustomerOrder/useCustomerOrder.ts +63 -0
- package/app/composables/useCustomerOrders/__tests__/useCustomerOrders.spec.ts +11 -0
- package/app/composables/useCustomerOrders/index.ts +2 -0
- package/app/composables/useCustomerOrders/types.ts +20 -0
- package/app/composables/useCustomerOrders/useCustomerOrders.ts +56 -0
- package/app/composables/useCustomerReturns/__tests__/useCustomerReturns.spec.ts +11 -0
- package/app/composables/useCustomerReturns/index.ts +2 -0
- package/app/composables/useCustomerReturns/types.ts +17 -0
- package/app/composables/useCustomerReturns/useCustomerReturns.ts +41 -0
- package/app/composables/useHandleError/index.ts +1 -0
- package/app/composables/useHandleError/types.ts +11 -0
- package/app/composables/useHandleError/useHandleError.ts +27 -0
- package/app/composables/usePageTitle.ts +16 -0
- package/app/composables/useProduct/index.ts +2 -0
- package/app/composables/useProduct/types.ts +17 -0
- package/app/composables/useProduct/useProduct.ts +42 -0
- package/app/composables/useProductAttribute/__tests__/useProduct.mock.ts +31 -0
- package/app/composables/useProductAttribute/__tests__/useProductAttribute.spec.ts +14 -0
- package/app/composables/useProductAttribute/index.ts +1 -0
- package/app/composables/useProductAttribute/useProductAttribute.ts +37 -0
- package/app/composables/useProductRecommended/__tests__/useProductRecommended.spec.ts +12 -0
- package/app/composables/useProductRecommended/index.ts +1 -0
- package/app/composables/useProductRecommended/types.ts +17 -0
- package/app/composables/useProductRecommended/useProductRecommended.ts +43 -0
- package/app/composables/useProductReviews/__tests__/productReviews.mock.ts +20 -0
- package/app/composables/useProductReviews/__tests__/useProductReviews.spec.ts +22 -0
- package/app/composables/useProductReviews/index.ts +2 -0
- package/app/composables/useProductReviews/types.ts +17 -0
- package/app/composables/useProductReviews/useProductReviews.ts +46 -0
- package/app/composables/useProducts/__tests__/useProducts.spec.ts +11 -0
- package/app/composables/useProducts/types.ts +22 -0
- package/app/composables/useProducts/useProducts.ts +41 -0
- package/app/composables/utils/countryList.ts +14 -0
- package/app/composables/utils/currency.js +56 -0
- package/app/composables/utils/glossary.ts +0 -0
- package/app/composables/utils/importExport.ts +0 -0
- package/app/composables/utils/index.js +0 -0
- package/app/composables/utils/print.ts +0 -0
- package/app/composables/utils/shopThemes.ts +0 -0
- package/app/composables/utils/statistics.ts +0 -0
- package/app/composables/utils/stock.ts +0 -0
- package/app/composables/utils/stripe.ts +16 -0
- package/app/composables/utils/taxation.ts +0 -0
- package/app/composables/utils/tellFriends.ts +0 -0
- package/app/composables/validationRules/index.ts +1 -0
- package/app/composables/validationRules/password.feature +67 -0
- package/app/composables/validationRules/password.test.ts +89 -0
- package/app/composables/validationRules/password.ts +25 -0
- package/app/composables/vendors/index.ts +0 -0
- package/app/composables/vendors/registry.ts +0 -0
- package/app/composables/vendors/useAffiliates.ts +0 -0
- package/app/composables/vendors/useCommission.ts +0 -0
- package/app/modules/vue-head/composables/useHead.ts +3 -0
- package/app/pages/brand/[...slug].vue +92 -0
- package/app/pages/brands.vue +90 -0
- package/app/pages/cart.vue +142 -0
- package/app/pages/compare.vue +166 -0
- package/app/pages/departments/[...slug].vue +385 -0
- package/app/pages/departments/category/[...slug].vue +135 -0
- package/app/pages/incentive/[...id].vue +66 -0
- package/app/pages/invoice/[id].vue +309 -0
- package/app/pages/order/[id].vue +327 -0
- package/app/pages/product/[...id].vue +309 -0
- package/app/pages/product/showcases/index.vue +86 -0
- package/app/pages/shipment/[...id].vue +176 -0
- package/app/pages/shop/[...slug].vue +158 -0
- package/app/pages/shops.vue +76 -0
- package/app/pages/subscription/[...id].vue +147 -0
- package/app/pages/transaction/[...id].vue +74 -0
- package/app/types/shims-imports.d.ts +13 -0
- package/app/utils/client.ts +26 -0
- package/app/utils/index.ts +53 -0
- package/app/utils/normalizer.ts +23 -0
- package/app/utils/normalizers/magento.ts +29 -0
- package/app/utils/normalizers/shopify.ts +29 -0
- package/global.d.ts +149 -0
- package/index.js +3 -0
- package/package.json +3 -9
- package/tsconfig.json +31 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<!---->
|
|
4
|
+
<v-row>
|
|
5
|
+
<v-col cols="12">
|
|
6
|
+
<v-sheet class="mx-auto sliderProducts row align-items-stretch items-row justify-content-center">
|
|
7
|
+
<h4 style="left: 15px; position: relative;">{{ callouts?.menus?.[0]?.name }}</h4>
|
|
8
|
+
<v-slide-group v-model="model" class="pa-4" selected-class="bg-success" show-arrows>
|
|
9
|
+
<v-slide-group-item v-slot="{ isSelected, toggle, selectedClass }"
|
|
10
|
+
v-for="products in mycards" :key="products">
|
|
11
|
+
<productCard :product="products" :class="['ma-4', selectedClass]"
|
|
12
|
+
@click="toggle" />
|
|
13
|
+
<div class="d-flex fill-height align-center justify-center">
|
|
14
|
+
<v-scale-transition>
|
|
15
|
+
<v-icon v-if="isSelected" color="white" icon="mdi-close-circle-outline"
|
|
16
|
+
size="48"></v-icon>
|
|
17
|
+
</v-scale-transition>
|
|
18
|
+
</div>
|
|
19
|
+
</v-slide-group-item>
|
|
20
|
+
</v-slide-group>
|
|
21
|
+
</v-sheet>
|
|
22
|
+
</v-col>
|
|
23
|
+
|
|
24
|
+
<v-col cols="12">
|
|
25
|
+
<v-sheet class="mx-auto sliderProducts row align-items-stretch items-row justify-content-center">
|
|
26
|
+
<h4 style="left: 15px; position: relative;">{{ callouts?.menus?.[1]?.name }}</h4>
|
|
27
|
+
<v-slide-group v-model="model" class="pa-4" selected-class="bg-success" show-arrows>
|
|
28
|
+
<v-slide-group-item v-slot="{ isSelected, toggle, selectedClass }"
|
|
29
|
+
v-for="products in cards" :key="products">
|
|
30
|
+
<productCard :product="products" :class="['ma-4', selectedClass]"
|
|
31
|
+
@click="toggle" />
|
|
32
|
+
<div class="d-flex fill-height align-center justify-center">
|
|
33
|
+
<v-scale-transition>
|
|
34
|
+
<v-icon v-if="isSelected" color="white" icon="mdi-close-circle-outline"
|
|
35
|
+
size="48"></v-icon>
|
|
36
|
+
</v-scale-transition>
|
|
37
|
+
</div>
|
|
38
|
+
</v-slide-group-item>
|
|
39
|
+
</v-slide-group>
|
|
40
|
+
</v-sheet>
|
|
41
|
+
</v-col>
|
|
42
|
+
</v-row>
|
|
43
|
+
</div>
|
|
44
|
+
</template>
|
|
45
|
+
|
|
46
|
+
<script setup>
|
|
47
|
+
import productCard from '~/components/catalog/product/productCard.vue'
|
|
48
|
+
import {
|
|
49
|
+
ref,
|
|
50
|
+
onMounted,
|
|
51
|
+
computed
|
|
52
|
+
} from 'vue';
|
|
53
|
+
import {
|
|
54
|
+
useUserStore
|
|
55
|
+
} from '#auth/app/stores/user'
|
|
56
|
+
|
|
57
|
+
const model = ref(null);
|
|
58
|
+
const userStore = useUserStore()
|
|
59
|
+
|
|
60
|
+
const userDisplayName = computed(() => {
|
|
61
|
+
return userStore.name || userStore.username || 'User'
|
|
62
|
+
})
|
|
63
|
+
|
|
64
|
+
const { $commerce } = useNuxtApp()
|
|
65
|
+
import { useCatalogFallback } from '../../../composables/useCatalog'
|
|
66
|
+
const catalog = useCatalogFallback()
|
|
67
|
+
|
|
68
|
+
const {
|
|
69
|
+
data: cards
|
|
70
|
+
} = await useAsyncData('cards', async () => {
|
|
71
|
+
return await catalog.listProducts({
|
|
72
|
+
fields: ['*', 'image.*', 'currency.currency_id.*'],
|
|
73
|
+
filter: { product_types: { product_types_id: { name: { _eq: 'Gift Card' } } } }
|
|
74
|
+
})
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
const {
|
|
78
|
+
data: mycards
|
|
79
|
+
} = await useAsyncData('mycards', async () => {
|
|
80
|
+
// user-specific filtering may not map directly to adapters; fall back handled by composable
|
|
81
|
+
return await catalog.listProducts({
|
|
82
|
+
fields: ['*', 'image.*', 'currency.currency_id.*'],
|
|
83
|
+
filter: { product_types: { product_types_id: { name: { _eq: 'Gift Card' } } }, user: { directus_users: { _eq: `${userDisplayName.user.displayName}` } } }
|
|
84
|
+
})
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
const {
|
|
88
|
+
data: callouts
|
|
89
|
+
} = await useAsyncData('callouts', async () => {
|
|
90
|
+
// callouts remain stored in Directus; use Nuxt runtime for these CMS pieces
|
|
91
|
+
const nuxtApp = useNuxtApp() as any
|
|
92
|
+
return nuxtApp.$directus ? await nuxtApp.$directus.request(nuxtApp.$readItem('callouts', '4')) : null
|
|
93
|
+
})
|
|
94
|
+
|
|
95
|
+
useHead({
|
|
96
|
+
title: 'Gift Cards',
|
|
97
|
+
})
|
|
98
|
+
|
|
99
|
+
definePageMeta({
|
|
100
|
+
middleware: ['authenticated'],
|
|
101
|
+
})
|
|
102
|
+
</script>
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<v-row>
|
|
4
|
+
<v-col cols="12">
|
|
5
|
+
<v-toolbar title="Your Subscriptions" subtitle=""></v-toolbar>
|
|
6
|
+
<v-row class="accountRow">
|
|
7
|
+
<v-col cols="3" v-for="(subscriptions, index) in mySubscriptions" :key="index">
|
|
8
|
+
<v-card class="mx-auto" max-width="400">
|
|
9
|
+
<img loading="lazy" class="align-end text-white" height="200"
|
|
10
|
+
:src="subscriptions?.image?.filename_disk" :alt="subscriptions?.name" cover />
|
|
11
|
+
<v-card-title>{{subscriptions?.name}}</v-card-title>
|
|
12
|
+
<v-card-subtitle class="pt-4">
|
|
13
|
+
Status: {{ subscriptions?.status }}
|
|
14
|
+
</v-card-subtitle>
|
|
15
|
+
|
|
16
|
+
<v-card-text>
|
|
17
|
+
<div>Start Date: {{ subscriptions?.start_date }}</div>
|
|
18
|
+
|
|
19
|
+
<div>End Date: {{ subscriptions?.end_date }}</div>
|
|
20
|
+
</v-card-text>
|
|
21
|
+
|
|
22
|
+
<v-card-actions>
|
|
23
|
+
<v-btn color="red" :href="`/commerce/subscriptions/${subscriptions?.id}`">
|
|
24
|
+
Manage subscription
|
|
25
|
+
</v-btn>
|
|
26
|
+
</v-card-actions>
|
|
27
|
+
</v-card>
|
|
28
|
+
</v-col>
|
|
29
|
+
</v-row>
|
|
30
|
+
</v-col>
|
|
31
|
+
|
|
32
|
+
<v-col cols="12">
|
|
33
|
+
<v-toolbar title="Available Subscriptions" subtitle=""></v-toolbar>
|
|
34
|
+
<v-row class="accountRow">
|
|
35
|
+
<v-col cols="3" v-for="(subscriptions, index) in subscriptions" :key="index">
|
|
36
|
+
<v-card class="mx-auto" max-width="400">
|
|
37
|
+
<NuxtImg loading="lazy" class="align-end text-white" height="200"
|
|
38
|
+
:src="subscriptions?.image?.filename_disk" :alt="subscriptions?.name" cover />
|
|
39
|
+
<v-card-title>{{subscriptions?.name}}</v-card-title>
|
|
40
|
+
|
|
41
|
+
<v-card-subtitle class="pt-4">
|
|
42
|
+
Status: {{ subscriptions?.status }}
|
|
43
|
+
</v-card-subtitle>
|
|
44
|
+
|
|
45
|
+
<v-card-text>
|
|
46
|
+
<div>Start Date: {{ subscriptions?.start_date }}</div>
|
|
47
|
+
|
|
48
|
+
<div>End Date: {{ subscriptions?.end_date }}</div>
|
|
49
|
+
</v-card-text>
|
|
50
|
+
|
|
51
|
+
<v-card-actions>
|
|
52
|
+
<v-btn color="red">
|
|
53
|
+
Add to Cart
|
|
54
|
+
</v-btn>
|
|
55
|
+
</v-card-actions>
|
|
56
|
+
</v-card>
|
|
57
|
+
</v-col>
|
|
58
|
+
</v-row>
|
|
59
|
+
</v-col>
|
|
60
|
+
</v-row>
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
63
|
+
|
|
64
|
+
<script setup>
|
|
65
|
+
import productCard from '~/components/related/post.vue'
|
|
66
|
+
import { computed, unref } from 'vue'
|
|
67
|
+
// BetterAuth `useAuth()` fallback
|
|
68
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
69
|
+
const auth: any = (globalThis as any).$useAuth ?? (typeof useAuth !== 'undefined' ? useAuth() : null)
|
|
70
|
+
const user = computed(() => {
|
|
71
|
+
if (!auth) return null
|
|
72
|
+
if (auth.user) return unref(auth.user) || null
|
|
73
|
+
if (auth.session) return unref(auth.session)?.user || null
|
|
74
|
+
return null
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
const { $commerce } = useNuxtApp()
|
|
78
|
+
import { useCatalogFallback } from '../../../composables/useCatalog'
|
|
79
|
+
const catalog = useCatalogFallback()
|
|
80
|
+
const tab = ref(null);
|
|
81
|
+
|
|
82
|
+
const {
|
|
83
|
+
data: incentiveBar
|
|
84
|
+
} = await useAsyncData('incentiveBar', async () => {
|
|
85
|
+
const resp = await $directus.request($readItem('navigation', '118', {
|
|
86
|
+
fields: ['*', {
|
|
87
|
+
'*': ['*']
|
|
88
|
+
}]
|
|
89
|
+
}))
|
|
90
|
+
return resp?.data ?? resp ?? null
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
const {
|
|
94
|
+
data: incentivePage
|
|
95
|
+
} = await useAsyncData('incentivePage', () => {
|
|
96
|
+
return $directus.request($readItem('pages', '86', {
|
|
97
|
+
fields: ['*', {
|
|
98
|
+
'*': ['*']
|
|
99
|
+
}]
|
|
100
|
+
}))
|
|
101
|
+
})
|
|
102
|
+
|
|
103
|
+
const {
|
|
104
|
+
data: subscriptions
|
|
105
|
+
} = await useAsyncData('subscriptions', async () => {
|
|
106
|
+
const resp = await catalog.listProducts({
|
|
107
|
+
fields: ['*', { '*': ['*'] }],
|
|
108
|
+
filter: { user_id: { _eq: user?.id }, type: { name: { _eq: 'Subscription' } } }
|
|
109
|
+
})
|
|
110
|
+
return resp || []
|
|
111
|
+
})
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
useHead({
|
|
115
|
+
title: 'Subscriptions',
|
|
116
|
+
})
|
|
117
|
+
|
|
118
|
+
definePageMeta({
|
|
119
|
+
middleware: ['authenticated'],
|
|
120
|
+
})
|
|
121
|
+
</script>
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
<!-- modify-rewards.vue -->
|
|
2
|
+
<template>
|
|
3
|
+
<div class="rewards-dashboard">
|
|
4
|
+
<v-row>
|
|
5
|
+
<!-- Header -->
|
|
6
|
+
<v-col cols="12">
|
|
7
|
+
<v-toolbar color="primary">
|
|
8
|
+
<v-toolbar-title>Modify Rewards</v-toolbar-title>
|
|
9
|
+
</v-toolbar>
|
|
10
|
+
</v-col>
|
|
11
|
+
|
|
12
|
+
<!-- Current Balance Card -->
|
|
13
|
+
<v-col cols="12" md="6">
|
|
14
|
+
<v-card class="mb-4">
|
|
15
|
+
<v-card-title>Current Balance</v-card-title>
|
|
16
|
+
<v-card-text>
|
|
17
|
+
<div class="text-h4 text-primary">
|
|
18
|
+
{{ currentBalance }} Points
|
|
19
|
+
</div>
|
|
20
|
+
</v-card-text>
|
|
21
|
+
</v-card>
|
|
22
|
+
</v-col>
|
|
23
|
+
|
|
24
|
+
<!-- Active Rewards Card -->
|
|
25
|
+
<v-col cols="12" md="6">
|
|
26
|
+
<v-card class="mb-4">
|
|
27
|
+
<v-card-title>Active Cart Rewards</v-card-title>
|
|
28
|
+
<v-card-text>
|
|
29
|
+
<v-list v-if="activeRewards.length">
|
|
30
|
+
<v-list-item v-for="reward in activeRewards" :key="reward.cartId">
|
|
31
|
+
<v-list-item-content>
|
|
32
|
+
<v-list-item-title>Cart ID: {{ reward.cartId }}</v-list-item-title>
|
|
33
|
+
<v-list-item-subtitle>Points: {{ reward.points }}</v-list-item-subtitle>
|
|
34
|
+
</v-list-item-content>
|
|
35
|
+
<v-list-item-action>
|
|
36
|
+
<v-btn color="error" small @click="removeReward(reward.cartId)"
|
|
37
|
+
:loading="removingReward === reward.cartId">
|
|
38
|
+
Remove
|
|
39
|
+
</v-btn>
|
|
40
|
+
</v-list-item-action>
|
|
41
|
+
</v-list-item>
|
|
42
|
+
</v-list>
|
|
43
|
+
<v-alert v-else type="info" text="No active rewards"></v-alert>
|
|
44
|
+
</v-card-text>
|
|
45
|
+
</v-card>
|
|
46
|
+
</v-col>
|
|
47
|
+
|
|
48
|
+
<!-- Modify Rewards Form -->
|
|
49
|
+
<v-col cols="12">
|
|
50
|
+
<v-card>
|
|
51
|
+
<v-card-title>Modify Rewards</v-card-title>
|
|
52
|
+
<v-card-text>
|
|
53
|
+
<v-form ref="form" v-model="valid" @submit.prevent="handleModify">
|
|
54
|
+
<v-row>
|
|
55
|
+
<v-col cols="12" md="6">
|
|
56
|
+
<v-select v-model="formData.cartId" :items="activeRewards" item-text="cartId"
|
|
57
|
+
item-value="cartId" label="Select Cart" required
|
|
58
|
+
:rules="[v => !!v || 'Cart is required']"></v-select>
|
|
59
|
+
</v-col>
|
|
60
|
+
|
|
61
|
+
<v-col cols="12" md="6">
|
|
62
|
+
<v-text-field v-model="formData.points" label="New Points Amount" type="number"
|
|
63
|
+
required :rules="[
|
|
64
|
+
v => !!v || 'Points are required',
|
|
65
|
+
v => v >= 0 || 'Points must be non-negative'
|
|
66
|
+
]"></v-text-field>
|
|
67
|
+
</v-col>
|
|
68
|
+
|
|
69
|
+
<v-col cols="12">
|
|
70
|
+
<v-textarea v-model="formData.reason" label="Modification Reason" rows="3" required
|
|
71
|
+
:rules="[v => !!v || 'Reason is required']"></v-textarea>
|
|
72
|
+
</v-col>
|
|
73
|
+
</v-row>
|
|
74
|
+
|
|
75
|
+
<!-- Action Buttons -->
|
|
76
|
+
<v-row>
|
|
77
|
+
<v-col cols="12" class="text-right">
|
|
78
|
+
<v-btn color="error" class="mr-4" @click="resetForm">
|
|
79
|
+
Reset
|
|
80
|
+
</v-btn>
|
|
81
|
+
<v-btn color="primary" type="submit" :loading="loading" :disabled="!valid">
|
|
82
|
+
Update Rewards
|
|
83
|
+
</v-btn>
|
|
84
|
+
</v-col>
|
|
85
|
+
</v-row>
|
|
86
|
+
</v-form>
|
|
87
|
+
</v-card-text>
|
|
88
|
+
</v-card>
|
|
89
|
+
</v-col>
|
|
90
|
+
|
|
91
|
+
<!-- Modification History -->
|
|
92
|
+
<v-col cols="12">
|
|
93
|
+
<v-card>
|
|
94
|
+
<v-card-title>Modification History</v-card-title>
|
|
95
|
+
<v-card-text>
|
|
96
|
+
<v-data-table :headers="historyHeaders" :items="modificationHistory" :loading="loadingHistory"
|
|
97
|
+
class="elevation-1">
|
|
98
|
+
<template v-slot:item.points_change="{ item }">
|
|
99
|
+
<span :class="item.points_change > 0 ? 'success--text' : 'error--text'">
|
|
100
|
+
{{ item.points_change > 0 ? '+' : '' }}{{ item.points_change }}
|
|
101
|
+
</span>
|
|
102
|
+
</template>
|
|
103
|
+
<template v-slot:item.modified_at="{ item }">
|
|
104
|
+
{{ formatDate(item.modified_at) }}
|
|
105
|
+
</template>
|
|
106
|
+
</v-data-table>
|
|
107
|
+
</v-card-text>
|
|
108
|
+
</v-card>
|
|
109
|
+
</v-col>
|
|
110
|
+
</v-row>
|
|
111
|
+
|
|
112
|
+
<!-- Snackbar for notifications -->
|
|
113
|
+
<v-snackbar v-model="snackbar.show" :color="snackbar.color">
|
|
114
|
+
{{ snackbar.message }}
|
|
115
|
+
<template v-slot:action="{ attrs }">
|
|
116
|
+
<v-btn text v-bind="attrs" @click="snackbar.show = false">
|
|
117
|
+
Close
|
|
118
|
+
</v-btn>
|
|
119
|
+
</template>
|
|
120
|
+
</v-snackbar>
|
|
121
|
+
</div>
|
|
122
|
+
</template>
|
|
123
|
+
|
|
124
|
+
<script setup>
|
|
125
|
+
import {
|
|
126
|
+
ref,
|
|
127
|
+
onMounted
|
|
128
|
+
} from 'vue';
|
|
129
|
+
import {
|
|
130
|
+
getRewardBalance,
|
|
131
|
+
useRewardPoints,
|
|
132
|
+
removeRewardPoints,
|
|
133
|
+
getRewardHistory
|
|
134
|
+
} from '#commerce/app/composables/commerce/marketing/useReward';
|
|
135
|
+
|
|
136
|
+
// State
|
|
137
|
+
const currentBalance = ref(0);
|
|
138
|
+
const activeRewards = ref([]);
|
|
139
|
+
const modificationHistory = ref([]);
|
|
140
|
+
const loading = ref(false);
|
|
141
|
+
const loadingHistory = ref(false);
|
|
142
|
+
const removingReward = ref(null);
|
|
143
|
+
const valid = ref(false);
|
|
144
|
+
const form = ref(null);
|
|
145
|
+
|
|
146
|
+
const formData = ref({
|
|
147
|
+
cartId: '',
|
|
148
|
+
points: '',
|
|
149
|
+
reason: ''
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
const snackbar = ref({
|
|
153
|
+
show: false,
|
|
154
|
+
message: '',
|
|
155
|
+
color: 'success'
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
// Table headers for history
|
|
159
|
+
const historyHeaders = [{
|
|
160
|
+
text: 'Date',
|
|
161
|
+
value: 'modified_at'
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
text: 'Cart ID',
|
|
165
|
+
value: 'cart_id'
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
text: 'Points Change',
|
|
169
|
+
value: 'points_change'
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
text: 'Reason',
|
|
173
|
+
value: 'reason'
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
text: 'Modified By',
|
|
177
|
+
value: 'modified_by'
|
|
178
|
+
}
|
|
179
|
+
];
|
|
180
|
+
|
|
181
|
+
// Methods
|
|
182
|
+
const loadInitialData = async () => {
|
|
183
|
+
try {
|
|
184
|
+
// Load balance
|
|
185
|
+
const balance = await getRewardBalance();
|
|
186
|
+
currentBalance.value = balance;
|
|
187
|
+
|
|
188
|
+
// Load active rewards
|
|
189
|
+
await loadActiveRewards();
|
|
190
|
+
|
|
191
|
+
// Load modification history
|
|
192
|
+
await loadHistory();
|
|
193
|
+
} catch (error) {
|
|
194
|
+
showError('Error loading initial data');
|
|
195
|
+
console.error('Error loading initial data:', error);
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
const loadActiveRewards = async () => {
|
|
200
|
+
// Implementation depends on your API structure
|
|
201
|
+
// This is a placeholder
|
|
202
|
+
activeRewards.value = [];
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
const loadHistory = async () => {
|
|
206
|
+
loadingHistory.value = true;
|
|
207
|
+
try {
|
|
208
|
+
const history = await getRewardHistory({
|
|
209
|
+
pageSize: 10,
|
|
210
|
+
currentPage: 1,
|
|
211
|
+
filters: [{
|
|
212
|
+
field: 'type',
|
|
213
|
+
value: 'modification',
|
|
214
|
+
conditionType: 'eq'
|
|
215
|
+
}]
|
|
216
|
+
});
|
|
217
|
+
modificationHistory.value = history.items || [];
|
|
218
|
+
} catch (error) {
|
|
219
|
+
showError('Error loading modification history');
|
|
220
|
+
console.error('Error loading history:', error);
|
|
221
|
+
} finally {
|
|
222
|
+
loadingHistory.value = false;
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
const handleModify = async () => {
|
|
227
|
+
if (!valid.value) return;
|
|
228
|
+
|
|
229
|
+
loading.value = true;
|
|
230
|
+
try {
|
|
231
|
+
// Remove existing rewards
|
|
232
|
+
await removeRewardPoints(formData.value.cartId);
|
|
233
|
+
|
|
234
|
+
// Add new rewards if points > 0
|
|
235
|
+
if (formData.value.points > 0) {
|
|
236
|
+
await useRewardPoints(formData.value.cartId);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// Refresh data
|
|
240
|
+
await loadInitialData();
|
|
241
|
+
|
|
242
|
+
showSuccess('Rewards modified successfully');
|
|
243
|
+
resetForm();
|
|
244
|
+
} catch (error) {
|
|
245
|
+
showError('Error modifying rewards');
|
|
246
|
+
console.error('Error modifying rewards:', error);
|
|
247
|
+
} finally {
|
|
248
|
+
loading.value = false;
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
const removeReward = async (cartId) => {
|
|
253
|
+
removingReward.value = cartId;
|
|
254
|
+
try {
|
|
255
|
+
await removeRewardPoints(cartId);
|
|
256
|
+
await loadInitialData();
|
|
257
|
+
showSuccess('Rewards removed successfully');
|
|
258
|
+
} catch (error) {
|
|
259
|
+
showError('Error removing rewards');
|
|
260
|
+
console.error('Error removing rewards:', error);
|
|
261
|
+
} finally {
|
|
262
|
+
removingReward.value = null;
|
|
263
|
+
}
|
|
264
|
+
};
|
|
265
|
+
|
|
266
|
+
const resetForm = () => {
|
|
267
|
+
if (form.value) {
|
|
268
|
+
form.value.reset();
|
|
269
|
+
}
|
|
270
|
+
formData.value = {
|
|
271
|
+
cartId: '',
|
|
272
|
+
points: '',
|
|
273
|
+
reason: ''
|
|
274
|
+
};
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
const showSuccess = (message) => {
|
|
278
|
+
snackbar.value = {
|
|
279
|
+
show: true,
|
|
280
|
+
message,
|
|
281
|
+
color: 'success'
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
|
|
285
|
+
const showError = (message) => {
|
|
286
|
+
snackbar.value = {
|
|
287
|
+
show: true,
|
|
288
|
+
message,
|
|
289
|
+
color: 'error'
|
|
290
|
+
};
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
const formatDate = (date) => {
|
|
294
|
+
return new Date(date).toLocaleDateString('en-US', {
|
|
295
|
+
year: 'numeric',
|
|
296
|
+
month: 'short',
|
|
297
|
+
day: 'numeric',
|
|
298
|
+
hour: '2-digit',
|
|
299
|
+
minute: '2-digit'
|
|
300
|
+
});
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
// Lifecycle
|
|
304
|
+
onMounted(() => {
|
|
305
|
+
loadInitialData();
|
|
306
|
+
});
|
|
307
|
+
|
|
308
|
+
// Meta
|
|
309
|
+
definePageMeta({
|
|
310
|
+
layout: 'dashboard'
|
|
311
|
+
});
|
|
312
|
+
|
|
313
|
+
useHead({
|
|
314
|
+
title: 'Modify Rewards',
|
|
315
|
+
});
|
|
316
|
+
</script>
|
|
317
|
+
|
|
318
|
+
<style scoped>
|
|
319
|
+
.rewards-dashboard {
|
|
320
|
+
padding: 20px;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.v-data-table {
|
|
324
|
+
background: transparent !important;
|
|
325
|
+
}
|
|
326
|
+
</style>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<v-card variant="text" class="lowerBar">
|
|
4
|
+
<v-tabs v-model="tab" :bg-color="lowerbar?.color" :color="lowerbar?.colortext" align-tabs="center">
|
|
5
|
+
<v-tab>
|
|
6
|
+
<NuxtLink style="color: black;" to="/">{{ lowerbar?.name }}</NuxtLink>
|
|
7
|
+
</v-tab>
|
|
8
|
+
<div v-for="(menu, index) in lowerbar?.menus" :key="index">
|
|
9
|
+
<v-tab :value="menu?.value">
|
|
10
|
+
<v-btn variant="text" :style="`color: ${lowerbar?.colortext} !important`"
|
|
11
|
+
:href="menu?.slug">{{ menu?.name }}</v-btn>
|
|
12
|
+
</v-tab>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<v-btn variant="text" prepend-icon="fas fa-plus" class="lowerBarBtn">
|
|
16
|
+
Add
|
|
17
|
+
|
|
18
|
+
<v-menu activator="parent">
|
|
19
|
+
<v-list lines="two">
|
|
20
|
+
<v-list-item>
|
|
21
|
+
<!--<addList />-->
|
|
22
|
+
</v-list-item>
|
|
23
|
+
|
|
24
|
+
<v-list-item>
|
|
25
|
+
<!--<addBookmark />-->
|
|
26
|
+
</v-list-item>
|
|
27
|
+
</v-list>
|
|
28
|
+
</v-menu>
|
|
29
|
+
</v-btn>
|
|
30
|
+
</v-tabs>
|
|
31
|
+
</v-card>
|
|
32
|
+
|
|
33
|
+
<!--<v-tabs-window v-model="tab">
|
|
34
|
+
<v-tabs-window-item :value="lowerbar?.menus?.[0]?.value">
|
|
35
|
+
<myLists />
|
|
36
|
+
</v-tabs-window-item>
|
|
37
|
+
<v-tabs-window-item :value="lowerbar?.menus?.[1]?.value">
|
|
38
|
+
<bookmarks />
|
|
39
|
+
</v-tabs-window-item>
|
|
40
|
+
<v-tabs-window-item :value="lowerbar?.menus?.[2]?.value">
|
|
41
|
+
<starredLists />
|
|
42
|
+
</v-tabs-window-item>
|
|
43
|
+
<v-tabs-window-item :value="lowerbar?.menus?.[3]?.value">
|
|
44
|
+
<archivedLists />
|
|
45
|
+
</v-tabs-window-item>
|
|
46
|
+
</v-tabs-window>-->
|
|
47
|
+
</div>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<script setup>
|
|
51
|
+
import {
|
|
52
|
+
ref
|
|
53
|
+
} from 'vue'
|
|
54
|
+
//import addList from '~/components/related/add-list.vue'
|
|
55
|
+
//import addBookmark from '~/components/related/add-bookmark.vue'
|
|
56
|
+
//import myLists from '~/components/features/lists.vue'
|
|
57
|
+
//import bookmarks from '~/components/features/bookmarks.vue'
|
|
58
|
+
//import starredLists from '~/components/features/starred.vue'
|
|
59
|
+
//import archivedLists from '~/components/features/archived.vue'
|
|
60
|
+
|
|
61
|
+
const tab = ref(null);
|
|
62
|
+
|
|
63
|
+
const {
|
|
64
|
+
$directus,
|
|
65
|
+
$readItem
|
|
66
|
+
} = useNuxtApp()
|
|
67
|
+
const route = useRoute()
|
|
68
|
+
|
|
69
|
+
const {
|
|
70
|
+
data: lowerbar
|
|
71
|
+
} = await useAsyncData('lowerbar', () => {
|
|
72
|
+
return $directus.request($readItem('navigation', '46', {
|
|
73
|
+
fields: ['*', {
|
|
74
|
+
'*': ['*']
|
|
75
|
+
}]
|
|
76
|
+
}))
|
|
77
|
+
})
|
|
78
|
+
</script>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<select aria-label="Select language"
|
|
3
|
+
class="mt-1 block w-full p-2.5 border border-secondary-300 text-secondary-900 text-sm rounded-md shadow-sm focus:ring-brand-light focus:border-light"
|
|
4
|
+
@change="onChangeHandler">
|
|
5
|
+
<option v-for="locale in availableLocales" :key="locale" :value="locale"
|
|
6
|
+
:selected="currentLocale === locale" :label="locale">
|
|
7
|
+
{{ locale }}
|
|
8
|
+
</option>
|
|
9
|
+
</select>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script setup lang="ts">
|
|
13
|
+
import { useI18n } from 'vue-i18n';
|
|
14
|
+
import { ref, computed } from 'vue';
|
|
15
|
+
|
|
16
|
+
const { locale, availableLocales, t } = useI18n();
|
|
17
|
+
const currentLocale = computed(() => locale.value);
|
|
18
|
+
|
|
19
|
+
const onChangeHandler = (event: Event) => {
|
|
20
|
+
const lang = (event.target as HTMLSelectElement).value;
|
|
21
|
+
locale.value = lang as typeof locale.value;
|
|
22
|
+
window.location.reload();
|
|
23
|
+
};
|
|
24
|
+
</script>
|