-
![]()
{
+
![]()
{
const target = e.target as HTMLImageElement
target.src = errorImg
}">
@@ -78,13 +79,13 @@
- {{ productStore.productDescription.name }}
+ {{ productStore.productDescription.name || 'Product name not provided' }}
@@ -97,9 +98,17 @@
}" />
+
+
-
+
Short description:
@@ -107,19 +116,19 @@
-
-
+
+
- {{ productStore.productDescription.available_now || 'Available now' }}
+ {{ productStore.productDescription.available_now }}
-
+
- {{ productStore.productDescription.delivery_in_stock || 'Delivery information' }}
+ {{ productStore.productDescription.delivery_in_stock }}
@@ -132,15 +141,18 @@
}">
-
+
-
+
+
diff --git a/bo/src/components/inner/CountryCurrencySwitch.vue b/bo/src/components/inner/CountryCurrencySwitch.vue
index 0b51a23..d822d83 100644
--- a/bo/src/components/inner/CountryCurrencySwitch.vue
+++ b/bo/src/components/inner/CountryCurrencySwitch.vue
@@ -7,7 +7,7 @@
Country/Currency
- {{ country?.name }} / {{ country?.ps_currency }}
+ {{ country?.name || 'Country' }} / {{ country?.ps_currency || 'Currency' }}
diff --git a/bo/src/components/inner/ProductEditor.vue b/bo/src/components/inner/ProductEditor.vue
index db9e6a0..bb1fc53 100644
--- a/bo/src/components/inner/ProductEditor.vue
+++ b/bo/src/components/inner/ProductEditor.vue
@@ -1,7 +1,7 @@
+ class="min-w-full border rounded-md bg-white! border-(--border-light)" placeholder="Write there ...">
diff --git a/bo/src/layouts/default.vue b/bo/src/layouts/default.vue
index 30958f8..1dcb598 100644
--- a/bo/src/layouts/default.vue
+++ b/bo/src/layouts/default.vue
@@ -175,6 +175,7 @@ const menu = ref(null)
async function getTopMenu() {
try {
const { items } = await useFetchJson('/api/v1/restricted/menu/get-top-menu')
+
menu.value = items
} catch (err) {
console.log(err)
diff --git a/bo/src/router/langs.ts b/bo/src/router/langs.ts
index b39e195..78dee8c 100644
--- a/bo/src/router/langs.ts
+++ b/bo/src/router/langs.ts
@@ -47,6 +47,9 @@ export async function initCountryCurrency() {
}
defCountry.value = items.find((x) => x.id === defLang.value?.id)
currentCountry.value = idfromcookie ?? defCountry.value
+ console.log(defCountry.value);
+ console.log(currentCountry.value);
+
} catch (error) {
console.error('Failed to fetch languages:', error)
}
diff --git a/i18n/migrations/20260302163100_routes.sql b/i18n/migrations/20260302163100_routes.sql
index 1f51f96..07ca0ca 100644
--- a/i18n/migrations/20260302163100_routes.sql
+++ b/i18n/migrations/20260302163100_routes.sql
@@ -10,35 +10,35 @@ CREATE TABLE IF NOT EXISTS b2b_routes (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-INSERT IGNORE INTO b2b_routes
- (name, path, component, meta, active)
-VALUES
- ('root', '', '', '{"trans": "route.root"}', 0),
- ('home', '', '/views/HomeView.vue', '{"trans": "route.home"}', 1),
- ('login', 'login', '/views/LoginView.vue', '{"guest":true}', 1),
- ('register', 'register', '/views/RegisterView.vue', '{"guest":true}', 1),
- ('password-recovery', 'password-recovery', '/views/PasswordRecoveryView.vue', '{"guest":true}', 1),
- ('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 (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);
--- INSERT INTO `b2b_routes` (`id`, `name`, `path`, `component`, `meta`, `active`) VALUES (5, 'password-recovery', 'password-recovery', '/views/PasswordRecoveryView.vue', '{"guest":true}', 1);
--- 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, '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);
--- INSERT INTO `b2b_routes` (`id`, `name`, `path`, `component`, `meta`, `active`) VALUES (11, 'customer-carts', 'carts', '/components/customer/PageCarts.vue', '{"guest":true}', 1);
--- 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, 'admin-products', 'products', '/components/admin/PageProducts.vue', '{"guest":true}', 1);
+-- INSERT IGNORE INTO b2b_routes
+-- (name, path, component, meta, active)
+-- VALUES
+-- ('root', '', '', '{"trans": "route.root"}', 0),
+-- ('home', '', '/views/HomeView.vue', '{"trans": "route.home"}', 1),
+-- ('login', 'login', '/views/LoginView.vue', '{"guest":true}', 1),
+-- ('register', 'register', '/views/RegisterView.vue', '{"guest":true}', 1),
+-- ('password-recovery', 'password-recovery', '/views/PasswordRecoveryView.vue', '{"guest":true}', 1),
+-- ('reset-password', 'reset-password', '/views/ResetPasswordView.vue', '{"guest":true}', 1),
+-- ('verify-email', 'verify-email', '/views/VerifyEmailView.vue', '{"guest":true}', 1);
+INSERT IGNORE INTO `b2b_routes` (`id`, `name`, `path`, `component`, `meta`, `active`) VALUES
+(1, 'root', '', '', '{"trans": "route.root"}', 0),
+(2, 'home', '', '/views/HomeView.vue', '{"trans": "route.home"}', 1),
+(3, 'login', 'login', '/views/LoginView.vue', '{"guest":true}', 1),
+(4, 'register', 'register', '/views/RegisterView.vue', '{"guest":true}', 1),
+(5, 'password-recovery', 'password-recovery', '/views/PasswordRecoveryView.vue', '{"guest":true}', 1),
+(6, 'reset-password', 'reset-password', '/views/ResetPasswordForm.vue', '{"guest":true}', 1),
+(7, 'verify-email', 'verify-email', '/views/VerifyEmailView.vue', '{"guest":true}', 1),
+(8, 'category', 'category/:category_id-:link_rewrite', '/views/CategoryView.vue', '{"guest":true}', 1),
+(9, 'admin-products-category', 'products/:category_id-:link_rewrite', '/components/admin/PageProducts.vue', '{
+ "guest": true
+}', 1),
+(10, 'customer-addresses', 'addresses', '/components/customer/PageAddresses.vue', '{"guest":true}', 1),
+(11, 'customer-carts', 'carts', '/components/customer/PageCarts.vue', '{"guest":true}', 1),
+(12, 'customer-orders', 'orders', '/components/customer/PageOrders.vue', '{"guest":true}', 1),
+(13, 'customer-statistic', 'statistic', '/components/customer/PageStatistic.vue', '{"guest":true}', 1),
+(14, 'customer-product-details', 'products/:product_id/:link_rewrite', '/components/admin/ProductDetailView.vue', '{"guest":true}', 1),
+(15, 'admin-products', 'products', '/components/admin/PageProducts.vue', '{"guest":true}', 1);
CREATE TABLE IF NOT EXISTS b2b_top_menu (
menu_id INT AUTO_INCREMENT NOT NULL,
@@ -54,97 +54,91 @@ CREATE TABLE IF NOT EXISTS b2b_top_menu (
INDEX FK_b2b_top_menu_parent_id_idx (parent_id ASC)
) ENGINE = InnoDB;
-
-INSERT IGNORE INTO `b2b_top_menu` (`menu_id`, `label`, `parent_id`, `params`, `active`, `position`) VALUES
-(1, JSON_COMPACT('{"name":"root","trans":{"pl":{"label":"Menu główne"},"en":{"label":"Main Menu"},"de":{"label":"Hauptmenü"}}}'),NULL,JSON_COMPACT('{}'),1,1),
-(3, JSON_COMPACT('{"name":"admin-products","trans":{"pl":{"label":"admin-products"},"en":{"label":"admin-products"},"de":{"label":"admin-products"}}}'),1,JSON_COMPACT('{}'),1,1),
-(9, JSON_COMPACT('{"name":"carts","trans":{"pl":{"label":"Koszyki"},"en":{"label":"Carts"},"de":{"label":"Warenkörbe"}}}'),3,JSON_COMPACT('{"route": {"name": "home", "params":{"locale": ""}}}'),1,1);
-
-
--- 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": "admin-products",
--- "trans": {
--- "pl": {
--- "label": "Products"
--- },
--- "en": {
--- "label": "Products"
--- },
--- "de": {
--- "label": "Products"
--- }
--- },
--- "icon" : "quill:list"
--- }', 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": {
--- "pl": {
--- "label": "Carts"
--- },
--- "en": {
--- "label": "Carts"
--- },
--- "de": {
--- "label": "Carts"
--- }
--- },
--- "icon" : "proicons:cart"
--- }', 1, '{"route":{"name":"customer-carts","params":{"locale":""}}}', 1, 1);
--- INSERT INTO `b2b_top_menu` (`menu_id`, `label`, `parent_id`, `params`, `active`, `position`) VALUES (4, '{
--- "name": "customer-addresses",
--- "trans": {
--- "pl": {
--- "label": "Addresses"
--- },
--- "en": {
--- "label": "Addresses"
--- },
--- "de": {
--- "label": "Addresses"
--- }
--- },
--- "icon" : "ph:address-book"
--- }', 1, '{"route":{"name":"customer-addresses","params":{"locale":""}}}', 1, 1);
--- INSERT INTO `b2b_top_menu` (`menu_id`, `label`, `parent_id`, `params`, `active`, `position`) VALUES (5, '{
--- "name": "customer-orders",
--- "trans": {
--- "pl": {
--- "label": "Orders"
--- },
--- "en": {
--- "label": "Orders"
--- },
--- "de": {
--- "label": "Orders"
--- }
--- },
--- "icon" : "lsicon:order-integral-outline"
--- }', 1, '{"route":{"name":"customer-orders","params":{"locale":""}}}', 1, 1);
--- INSERT INTO `b2b_top_menu` (`menu_id`, `label`, `parent_id`, `params`, `active`, `position`) VALUES (6, '{
--- "name": "customer-statistic",
--- "trans": {
--- "pl": {
--- "label": "Statistic"
--- },
--- "en": {
--- "label": "Statistic"
--- },
--- "de": {
--- "label": "Statistic"
--- }
--- },
--- "icon" : "akar-icons:statistic-up"
--- }', 1, '{
--- "route": {
--- "name": "customer-statistic",
--- "params": {
--- "locale": ""
--- }
--- }
--- }', 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);
+INSERT IGNORE 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),
+(2, '{
+ "name": "admin-products",
+ "trans": {
+ "pl": {
+ "label": "Products"
+ },
+ "en": {
+ "label": "Products"
+ },
+ "de": {
+ "label": "Products"
+ }
+ },
+ "icon" : "quill:list"
+}', 1, '{"route":{"name":"admin-products","params":{"locale":""}}}', 1, 1),
+(3, '{
+ "name": "customer-carts",
+ "trans": {
+ "pl": {
+ "label": "Carts"
+ },
+ "en": {
+ "label": "Carts"
+ },
+ "de": {
+ "label": "Carts"
+ }
+ },
+ "icon" : "proicons:cart"
+}', 1, '{"route":{"name":"customer-carts","params":{"locale":""}}}', 1, 1),
+(4, '{
+ "name": "customer-addresses",
+ "trans": {
+ "pl": {
+ "label": "Addresses"
+ },
+ "en": {
+ "label": "Addresses"
+ },
+ "de": {
+ "label": "Addresses"
+ }
+ },
+ "icon" : "ph:address-book"
+}', 1, '{"route":{"name":"customer-addresses","params":{"locale":""}}}', 1, 1),
+(5, '{
+ "name": "customer-orders",
+ "trans": {
+ "pl": {
+ "label": "Orders"
+ },
+ "en": {
+ "label": "Orders"
+ },
+ "de": {
+ "label": "Orders"
+ }
+ },
+ "icon" : "lsicon:order-integral-outline"
+}', 1, '{"route":{"name":"customer-orders","params":{"locale":""}}}', 1, 1),
+(6, '{
+ "name": "customer-statistic",
+ "trans": {
+ "pl": {
+ "label": "Statistic"
+ },
+ "en": {
+ "label": "Statistic"
+ },
+ "de": {
+ "label": "Statistic"
+ }
+ },
+ "icon" : "akar-icons:statistic-up"
+}', 1, '{
+ "route": {
+ "name": "customer-statistic",
+ "params": {
+ "locale": ""
+ }
+ }
+}', 1, 1),
+(9, '{"name":"carts","trans":{"pl":{"label":"Koszyki"},"en":{"label":"Carts"},"de":{"label":"Warenkörbe"}}}', 3, '{"route":{"name":"home","params":{"locale":""}}}', 1, 1);
diff --git a/i18n/migrations/20260302163123_create_tables_data.sql b/i18n/migrations/20260302163123_create_tables_data.sql
index 88875c5..620fbb2 100644
--- a/i18n/migrations/20260302163123_create_tables_data.sql
+++ b/i18n/migrations/20260302163123_create_tables_data.sql
@@ -11,7 +11,6 @@ INSERT INTO `b2b_roles` (`name`, `id`) VALUES ('user','1');
INSERT INTO `b2b_roles` (`name`, `id`) VALUES ('admin','2');
INSERT INTO `b2b_roles` (`name`, `id`) VALUES ('super_admin','3');
-
-- insert sample admin user admin@ma-al.com/Maal12345678
INSERT IGNORE INTO b2b_customers (id, email, password, first_name, last_name, role_id, provider, provider_id, avatar_url, is_active, email_verified, email_verification_token, email_verification_expires, password_reset_token, password_reset_expires, last_password_reset_request, last_login_at, lang_id, country_id, created_at, updated_at, deleted_at)
VALUES
@@ -30,6 +29,4 @@ VALUES
(3, '🇨🇿', 16, 2),
(4, '🇩🇪', 1, 2);
-
-
-- +goose Down
\ No newline at end of file