diff --git a/bo/src/layouts/default.vue b/bo/src/layouts/default.vue index 147aed6..d1431c8 100644 --- a/bo/src/layouts/default.vue +++ b/bo/src/layouts/default.vue @@ -183,7 +183,7 @@ const menuItems = computed(() => { if (!menu.value?.length) return [] return transformMenu( - menu.value[0]?.children || [], + menu.value || [], currentLang.value?.iso_code ) }) diff --git a/i18n/migrations/20260302163100_routes.sql b/i18n/migrations/20260302163100_routes.sql index c2f7c69..1f51f96 100644 --- a/i18n/migrations/20260302163100_routes.sql +++ b/i18n/migrations/20260302163100_routes.sql @@ -21,7 +21,7 @@ VALUES ('reset-password', 'reset-password', '/views/ResetPasswordView.vue', '{"guest":true}', 1), ('verify-email', 'verify-email', '/views/VerifyEmailView.vue', '{"guest":true}', 1); --- INSERT INTO `b2b_routes` (`id`, `name`, `path`, `component`, `meta`, `active`) VALUES (1, 'root', '', '', '{"trans": "route.root"}', 0); +-- INSERT INTO `b2b_routes` (`id`, `name`, `path`, `component`, `meta`, `active`) VALUES (1, 'root', '', '', '{"trans": "route.root"}', 0); -- INSERT INTO `b2b_routes` (`id`, `name`, `path`, `component`, `meta`, `active`) VALUES (2, 'home', '', '/views/HomeView.vue', '{"trans": "route.home"}', 1); -- INSERT INTO `b2b_routes` (`id`, `name`, `path`, `component`, `meta`, `active`) VALUES (3, 'login', 'login', '/views/LoginView.vue', '{"guest":true}', 1); -- INSERT INTO `b2b_routes` (`id`, `name`, `path`, `component`, `meta`, `active`) VALUES (4, 'register', 'register', '/views/RegisterView.vue', '{"guest":true}', 1); @@ -29,7 +29,7 @@ VALUES -- INSERT INTO `b2b_routes` (`id`, `name`, `path`, `component`, `meta`, `active`) VALUES (6, 'reset-password', 'reset-password', '/views/ResetPasswordForm.vue', '{"guest":true}', 1); -- INSERT INTO `b2b_routes` (`id`, `name`, `path`, `component`, `meta`, `active`) VALUES (7, 'verify-email', 'verify-email', '/views/VerifyEmailView.vue', '{"guest":true}', 1); -- INSERT INTO `b2b_routes` (`id`, `name`, `path`, `component`, `meta`, `active`) VALUES (8, 'category', 'category/:category_id-:link_rewrite', '/views/CategoryView.vue', '{"guest":true}', 1); --- INSERT INTO `b2b_routes` (`id`, `name`, `path`, `component`, `meta`, `active`) VALUES (9, 'customer-products-category', 'products/:category_id-:link_rewrite', '/components/admin/PageProducts.vue', '{ +-- INSERT INTO `b2b_routes` (`id`, `name`, `path`, `component`, `meta`, `active`) VALUES (9, 'admin-products-category', 'products/:category_id-:link_rewrite', '/components/admin/PageProducts.vue', '{ -- "guest": true -- }', 1); -- INSERT INTO `b2b_routes` (`id`, `name`, `path`, `component`, `meta`, `active`) VALUES (10, 'customer-addresses', 'addresses', '/components/customer/PageAddresses.vue', '{"guest":true}', 1); @@ -37,7 +37,7 @@ VALUES -- INSERT INTO `b2b_routes` (`id`, `name`, `path`, `component`, `meta`, `active`) VALUES (12, 'customer-orders', 'orders', '/components/customer/PageOrders.vue', '{"guest":true}', 1); -- INSERT INTO `b2b_routes` (`id`, `name`, `path`, `component`, `meta`, `active`) VALUES (13, 'customer-statistic', 'statistic', '/components/customer/PageStatistic.vue', '{"guest":true}', 1); -- INSERT INTO `b2b_routes` (`id`, `name`, `path`, `component`, `meta`, `active`) VALUES (14, 'customer-product-details', 'products/:product_id', '/components/admin/ProductDetailView.vue', '{"guest":true}', 1); --- INSERT INTO `b2b_routes` (`id`, `name`, `path`, `component`, `meta`, `active`) VALUES (15, 'customer-products', 'products', '/components/admin/PageProducts.vue', '{"guest":true}', 1); +-- INSERT INTO `b2b_routes` (`id`, `name`, `path`, `component`, `meta`, `active`) VALUES (15, 'admin-products', 'products', '/components/admin/PageProducts.vue', '{"guest":true}', 1); CREATE TABLE IF NOT EXISTS b2b_top_menu ( @@ -63,7 +63,7 @@ INSERT IGNORE INTO `b2b_top_menu` (`menu_id`, `label`, `parent_id`, `params`, `a -- INSERT INTO `b2b_top_menu` (`menu_id`, `label`, `parent_id`, `params`, `active`, `position`) VALUES (1, '{"name":"root","trans":{"pl":{"label":"Menu główne"},"en":{"label":"Main Menu"},"de":{"label":"Hauptmenü"}}}', NULL, '{}', 1, 1); -- INSERT INTO `b2b_top_menu` (`menu_id`, `label`, `parent_id`, `params`, `active`, `position`) VALUES (2, '{ --- "name": "customer-products", +-- "name": "admin-products", -- "trans": { -- "pl": { -- "label": "Products" @@ -76,7 +76,7 @@ INSERT IGNORE INTO `b2b_top_menu` (`menu_id`, `label`, `parent_id`, `params`, `a -- } -- }, -- "icon" : "quill:list" --- }', 1, '{"route":{"name":"customer-products","params":{"locale":""}}}', 1, 1); +-- }', 1, '{"route":{"name":"admin-products","params":{"locale":""}}}', 1, 1); -- INSERT INTO `b2b_top_menu` (`menu_id`, `label`, `parent_id`, `params`, `active`, `position`) VALUES (3, '{ -- "name": "customer-carts", -- "trans": { @@ -144,6 +144,8 @@ INSERT IGNORE INTO `b2b_top_menu` (`menu_id`, `label`, `parent_id`, `params`, `a -- } -- } -- }', 1, 1); +-- INSERT INTO `b2b_top_menu` (`menu_id`, `label`, `parent_id`, `params`, `active`, `position`) VALUES (9, '{"name":"carts","trans":{"pl":{"label":"Koszyki"},"en":{"label":"Carts"},"de":{"label":"Warenkörbe"}}}', 3, '{"route":{"name":"home","params":{"locale":""}}}', 1, 1); + -- +goose Down