diff --git a/bo/src/components/TopBar.vue b/bo/src/components/TopBar.vue index e8fa41b..e9268a4 100644 --- a/bo/src/components/TopBar.vue +++ b/bo/src/components/TopBar.vue @@ -18,6 +18,25 @@ const authStore = useAuthStore() TimeTracker + + + +
diff --git a/bo/src/router/index.ts b/bo/src/router/index.ts index 117fc76..58ebda2 100644 --- a/bo/src/router/index.ts +++ b/bo/src/router/index.ts @@ -31,6 +31,7 @@ const router = createRouter({ component: Default, children: [ { path: '', component: () => import('../views/RepoChartView.vue'), name: 'home' }, + { path: 'products', component: () => import('../views/customer/ProductsView.vue'), name: 'products' }, ], }, { diff --git a/bo/src/views/customer/ProductsView.vue b/bo/src/views/customer/ProductsView.vue new file mode 100644 index 0000000..7608633 --- /dev/null +++ b/bo/src/views/customer/ProductsView.vue @@ -0,0 +1,240 @@ + + + diff --git a/i18n/migrations/20260302163200_translations_products.sql b/i18n/migrations/20260302163200_translations_products.sql new file mode 100644 index 0000000..ff7ca6d --- /dev/null +++ b/i18n/migrations/20260302163200_translations_products.sql @@ -0,0 +1,94 @@ +-- +goose Up +-- Add translations for products and navigation + +-- Register new components +INSERT IGNORE INTO b2b_components (id, name) VALUES (304, 'products'); +INSERT IGNORE INTO b2b_components (id, name) VALUES (305, 'nav'); + +-- Component: products (component_id = 304) +INSERT IGNORE b2b_translations (lang_id, scope_id, component_id, `key`, data) VALUES +-- English (lang_id = 1) +(1, 3, 304, 'title', 'Products'), +(1, 3, 304, 'image', 'Image'), +(1, 3, 304, 'product_name', 'Product Name'), +(1, 3, 304, 'product_code', 'Product Code'), +(1, 3, 304, 'in_stock', 'In Stock'), +(1, 3, 304, 'price', 'Price'), +(1, 3, 304, 'count', 'Count'), +(1, 3, 304, 'add_to_cart', 'Add to cart'), +(1, 3, 304, 'search_by_name', 'Search by name'), +(1, 3, 304, 'search_by_code', 'Search by code'), +(1, 3, 304, 'search_name_placeholder', 'Enter product name'), +(1, 3, 304, 'search_code_placeholder', 'Enter product code'), +(1, 3, 304, 'price_from', 'From'), +(1, 3, 304, 'price_to', 'To'), +(1, 3, 304, 'clear_filters', 'Clear'), +(1, 3, 304, 'login_to_view', 'Please login to view products'), +(1, 3, 304, 'showing', 'Showing'), +(1, 3, 304, 'of', 'of'), +(1, 3, 304, 'products', 'products'), +(1, 3, 304, 'yes', 'Yes'), +(1, 3, 304, 'no', 'No'), +(1, 3, 304, 'added_to_cart', 'Added to cart'), +-- Polish (lang_id = 2) +(2, 3, 304, 'title', 'Produkty'), +(2, 3, 304, 'image', 'Obrazek'), +(2, 3, 304, 'product_name', 'Nazwa produktu'), +(2, 3, 304, 'product_code', 'Kod produktu'), +(2, 3, 304, 'in_stock', 'W magazynie'), +(2, 3, 304, 'price', 'Cena'), +(2, 3, 304, 'count', 'Ilość'), +(2, 3, 304, 'add_to_cart', 'Dodaj do koszyka'), +(2, 3, 304, 'search_by_name', 'Szukaj po nazwie'), +(2, 3, 304, 'search_by_code', 'Szukaj po kodzie'), +(2, 3, 304, 'search_name_placeholder', 'Wpisz nazwę produktu'), +(2, 3, 304, 'search_code_placeholder', 'Wpisz kod produktu'), +(2, 3, 304, 'price_from', 'Od'), +(2, 3, 304, 'price_to', 'Do'), +(2, 3, 304, 'clear_filters', 'Wyczyść'), +(2, 3, 304, 'login_to_view', 'Zaloguj się, aby zobaczyć produkty'), +(2, 3, 304, 'showing', 'Wyświetlanie'), +(2, 3, 304, 'of', 'z'), +(2, 3, 304, 'products', 'produktów'), +(2, 3, 304, 'yes', 'Tak'), +(2, 3, 304, 'no', 'Nie'), +(2, 3, 304, 'added_to_cart', 'Dodano do koszyka'), +-- Czech (lang_id = 3) +(3, 3, 304, 'title', 'Produkty'), +(3, 3, 304, 'image', 'Obrázek'), +(3, 3, 304, 'product_name', 'Název produktu'), +(3, 3, 304, 'product_code', 'Kód produktu'), +(3, 3, 304, 'in_stock', 'Skladem'), +(3, 3, 304, 'price', 'Cena'), +(3, 3, 304, 'count', 'Množství'), +(3, 3, 304, 'add_to_cart', 'Přidat do košíku'), +(3, 3, 304, 'search_by_name', 'Hledat podle názvu'), +(3, 3, 304, 'search_by_code', 'Hledat podle kódu'), +(3, 3, 304, 'search_name_placeholder', 'Zadejte název produktu'), +(3, 3, 304, 'search_code_placeholder', 'Zadejte kód produktu'), +(3, 3, 304, 'price_from', 'Od'), +(3, 3, 304, 'price_to', 'Do'), +(3, 3, 304, 'clear_filters', 'Vymazat'), +(3, 3, 304, 'login_to_view', 'Přihlaste se pro zobrazení produktů'), +(3, 3, 304, 'showing', 'Zobrazeno'), +(3, 3, 304, 'of', 'z'), +(3, 3, 304, 'products', 'produktů'), +(3, 3, 304, 'yes', 'Ano'), +(3, 3, 304, 'no', 'Ne'), +(3, 3, 304, 'added_to_cart', 'Přidáno do košíku'); + +-- Component: nav (component_id = 305) +INSERT IGNORE b2b_translations (lang_id, scope_id, component_id, `key`, data) VALUES +-- English (lang_id = 1) +(1, 3, 305, 'chart', 'Chart'), +(1, 3, 305, 'products', 'Products'), +-- Polish (lang_id = 2) +(2, 3, 305, 'chart', 'Wykres'), +(2, 3, 305, 'products', 'Produkty'), +-- Czech (lang_id = 3) +(3, 3, 305, 'chart', 'Graf'), +(3, 3, 305, 'products', 'Produkty'); + +-- +goose Down +-- Remove translations for these components +DELETE FROM b2b_translations WHERE scope_id = 3 AND component_id IN (304, 305);