-
-
-
-
-
-
-
-
diff --git a/bo/src/router/index.ts b/bo/src/router/index.ts
index b9bf323..800a2e7 100644
--- a/bo/src/router/index.ts
+++ b/bo/src/router/index.ts
@@ -23,34 +23,23 @@ const router = createRouter({
{
path: '/:locale',
children: [
- { path: 'category/:category_id-:link_rewrite', component: () => import('../views/CategoryView.vue'), name: 'category' },
- {
- path: '',
- component: Default,
- children: [
- { path: '', component: () => import('../views/RepoChartView.vue'), name: 'home' },
- { path: 'products', component: () => import('../components/admin/ProductsView.vue'), name: 'products' },
- { path: 'products-datail/', component: () => import('../components/admin/ProductDetailView.vue'), name: 'product-detail' },
- { path: 'product-card-full/', component: () => import('../components/customer/PageProductCardFull.vue'), name: 'product-card-full' },
- { path: 'addresses', component: () => import('../components/customer/PageAddresses.vue'), name: 'addresses' },
- { path: 'customer-data', component: () => import('../components/customer/PageCustomerData.vue'), name: 'customer-data' },
- { path: 'create-account', component: () => import('../components/customer/PageCreateAccount.vue'), name: 'create-account' },
- { path: 'cart', component: () => import('../components/customer/PageCart.vue'), name: 'cart' },
- { path: 'cart1', component: () => import('../components/customer/Cart1.vue'), name: 'cart1' },
- { path: 'products-list', component: () => import('../components/customer/PageProductsList.vue'), name: 'products-list' },
- ],
- },
+ { path: 'category/:category_id-:link_rewrite', component: () => import('@/views/CategoryView.vue'), name: 'category' },
+ { path: 'products-datail', component: () => import('@/components/admin/ProductDetailView.vue'), name: 'product-detail' },
+ { path: '', component: () => import('@/views/RepoChartView.vue'), name: 'home' },
+ { path: 'products', component: () => import('@/components/admin/ProductsView.vue'), name: 'products' },
+ { path: 'product-card-full', component: () => import('@/components/customer/PageProductCardFull.vue'), name: 'product-card-full' },
+ { path: 'addresses', component: () => import('@/components/customer/PageAddresses.vue'), name: 'addresses' },
+ { path: 'customer-data', component: () => import('@/components/customer/PageCustomerData.vue'), name: 'customer-data' },
+ { path: 'create-account', component: () => import('@/components/customer/PageCreateAccount.vue'), name: 'create-account' },
+ { path: 'cart', component: () => import('@/components/customer/PageCart.vue'), name: 'cart' },
+ { path: 'cart1', component: () => import('@/components/customer/Cart1.vue'), name: 'cart1' },
+ { path: 'products-list', component: () => import('@/components/customer/PageProductsList.vue'), name: 'products-list' },
{ path: 'login', component: () => import('@/views/LoginView.vue'), name: 'login', meta: { guest: true, } },
{ path: 'register', component: () => import('@/views/RegisterView.vue'), name: 'register', meta: { guest: true } },
{ path: 'password-recovery', component: () => import('@/views/PasswordRecoveryView.vue'), name: 'password-recovery', meta: { guest: true } },
{ path: 'reset-password', component: () => import('@/views/ResetPasswordForm.vue'), name: 'reset-password', meta: { guest: true } },
{ path: 'verify-email', component: () => import('@/views/VerifyEmailView.vue'), name: 'verify-email', meta: { guest: true } },
- // {
- // path: '',
- // component: Empty,
- // children: [
- // ],
- // },
+
{
path: '/:pathMatch(.*)*',
component: () => import('@/views/NotFoundView.vue'),
diff --git a/bo/src/stores/category.ts b/bo/src/stores/category.ts
new file mode 100644
index 0000000..1e70be4
--- /dev/null
+++ b/bo/src/stores/category.ts
@@ -0,0 +1,40 @@
+import { defineStore } from "pinia";
+import { ref } from "vue";
+
+
+const products = [
+ {name: "product name", price: 342432},
+ {name: "product name", price: 342432},
+ {name: "product name", price: 342432},
+ {name: "product name", price: 342432},
+ {name: "product name", price: 342432},
+]
+
+// type CategoryProducts = {}
+
+export const useCategoryStore = defineStore('category', () => {
+ const id_category = ref(0)
+ const categoryProducts = ref(products)
+
+
+ function setCategoryID(id: number) {
+ id_category.value = id
+ }
+
+ async function getCategoryProducts() {
+ return new Promise
((resolve) => {
+ setTimeout(() => {
+ console.log('Fetching products from category id: ', id_category.value);
+ resolve(categoryProducts.value)
+ }, 2000 * Math.random())
+ })
+ }
+ return {
+ id_category,
+ getCategoryProducts,
+ setCategoryID
+ }
+})
+
+
+
diff --git a/bo/src/views/CategoryView.vue b/bo/src/views/CategoryView.vue
index b24a8e6..44f24cf 100644
--- a/bo/src/views/CategoryView.vue
+++ b/bo/src/views/CategoryView.vue
@@ -3,8 +3,13 @@
-
Category
- {{ $route.params }}
+
Category ID: {{ $route.params.category_id }}
+
+
+ {{ p.name }}
+ {{ p.price }}
+
+
@@ -15,7 +20,23 @@
\ No newline at end of file
diff --git a/bo/src/views/RepoChartView.vue b/bo/src/views/RepoChartView.vue
index ebc8442..122d31b 100644
--- a/bo/src/views/RepoChartView.vue
+++ b/bo/src/views/RepoChartView.vue
@@ -15,6 +15,7 @@ import { useAuthStore } from '@/stores/auth'
import { i18n } from '@/plugins/02_i18n'
import type { TableColumn } from '@nuxt/ui'
import { useI18n } from 'vue-i18n'
+import Default from '@/layouts/default.vue'
ChartJS.register(Title, Tooltip, Legend, BarElement, CategoryScale, LinearScale)
@@ -181,6 +182,7 @@ const columns = computed[]>(() => [
+
{{ $t('repo_chart.repository_work_chart') }}
@@ -254,4 +256,5 @@ const columns = computed[]>(() => [
+