Merge branch 'currencies' of ssh://git.ma-al.com:8822/goc_daniel/b2b into currencies
This commit is contained in:
@@ -10,17 +10,70 @@ 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 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),
|
||||
(9, 'admin-products-category', 'products/:category_id-:link_rewrite', '/components/admin/PageProducts.vue', '{
|
||||
"guest":true,
|
||||
"name": "Products Category"
|
||||
}', 1),
|
||||
(10, 'customer-addresses', 'addresses', '/components/customer/PageAddresses.vue', '{
|
||||
"guest":true,
|
||||
"name": "Addresses"
|
||||
}', 1),
|
||||
(11, 'customer-cart', 'cart/:id', '/components/customer/PageCart.vue', '{
|
||||
"guest":true,
|
||||
"name": "Cart"
|
||||
}', 1),
|
||||
(12, 'customer-orders', 'orders', '/components/customer/PageOrders.vue', '{
|
||||
"guest":true,
|
||||
"name": "Order"
|
||||
}', 1),
|
||||
(13, 'customer-statistic', 'statistic', '/components/customer/PageStatistic.vue', '{
|
||||
"guest":true,
|
||||
"name": "Statistic"
|
||||
}
|
||||
', 1),
|
||||
(14, 'admin-product-details', 'products/:product_id', '/components/admin/ProductDetailView.vue', '{
|
||||
"guest":true,
|
||||
"name": "Products"
|
||||
}
|
||||
', 1),
|
||||
(15, 'admin-products', 'products', '/components/admin/PageProducts.vue', '{
|
||||
"guest":true,
|
||||
"name": "Products"
|
||||
}
|
||||
', 1),
|
||||
(16, 'admin-users-list', 'users-list', '/components/admin/UsersList.vue', '{
|
||||
"guest":true,
|
||||
"name": "Client List"
|
||||
}
|
||||
', 1),
|
||||
(17, 'customer-management-profile', ':user_id/profile', '/components/customer-management/Profile.vue', '{
|
||||
"guest":true,
|
||||
"name": "Profile",
|
||||
"layout": "management"
|
||||
}
|
||||
', 1),
|
||||
(18, 'admin-users-search', 'users-search', '/components/admin/UsersSearch.vue', '{
|
||||
"guest":true,
|
||||
"name": "Search Clients"
|
||||
}
|
||||
', 1),
|
||||
(19, 'customer-storage-file', 'file-storage', '/components/customer/StorageFileBrowser.vue', '{
|
||||
"guest":true,
|
||||
"name": "File Storage"
|
||||
}', 1),
|
||||
(20, 'customer-products', 'products', '/components/customer/PageProducts.vue', '{ "guest":true, "name": "Products" }', 1),
|
||||
(21, 'customer-product-details', 'products/:product_id', '/components/customer/PageProduct.vue', '{ "guest":true, "name": "Products" }', 1),
|
||||
(22, 'customer-page-carts', 'carts', '/components/customer/PageCarts.vue', '{ "guest":true, "name": "Carts" }', 1),
|
||||
(24, 'customer-search-products', 'search-products', '/components/customer/PageSearchProducts.vue', '{ "guest":true, "name": "Carts" }', 1),
|
||||
(25, 'admin-add-product', 'add-product', '/components/admin/AddProduct.vue', '{ "guest":true, "name": "Add Product" }', 1);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS b2b_top_menu (
|
||||
menu_id INT AUTO_INCREMENT NOT NULL,
|
||||
@@ -36,11 +89,251 @@ 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 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),
|
||||
(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),
|
||||
(10, '{
|
||||
"name": "customer-storage-file",
|
||||
"trans": {
|
||||
"pl": {
|
||||
"label": "File Storage"
|
||||
},
|
||||
"en": {
|
||||
"label": "File Storage"
|
||||
},
|
||||
"de": {
|
||||
"label": "File Storage"
|
||||
}
|
||||
},
|
||||
"icon": "carbon:volume-file-storage"
|
||||
}', 1, '{
|
||||
"route": {
|
||||
"name": "customer-storage-file",
|
||||
"params": {
|
||||
"locale": ""
|
||||
}
|
||||
}
|
||||
}', 1, 1),
|
||||
(12, '{
|
||||
"name": "admin-users-list",
|
||||
"trans": {
|
||||
"pl": {
|
||||
"label": "Client List"
|
||||
},
|
||||
"en": {
|
||||
"label": "Client List"
|
||||
},
|
||||
"de": {
|
||||
"label": "Client List"
|
||||
}
|
||||
},
|
||||
"icon": "tdesign:user-list"
|
||||
}', 1, '{
|
||||
"route": {
|
||||
"name": "admin-users-list",
|
||||
"params": {
|
||||
"locale": ""
|
||||
}
|
||||
}
|
||||
}', 1, 1),
|
||||
(13, '{
|
||||
"name": "admin-users-search",
|
||||
"trans": {
|
||||
"pl": {
|
||||
"label": "Search Clients"
|
||||
},
|
||||
"en": {
|
||||
"label": "Search Clients"
|
||||
},
|
||||
"de": {
|
||||
"label": "Search Clients"
|
||||
}
|
||||
},
|
||||
"icon": "material-symbols:search"
|
||||
}', 1, '{
|
||||
"route": {
|
||||
"name": "admin-users-search",
|
||||
"params": {
|
||||
"locale": ""
|
||||
}
|
||||
}
|
||||
}', 1, 1),
|
||||
(14, '{
|
||||
"name": "customer-management-profile",
|
||||
"trans": {
|
||||
"pl": {
|
||||
"label": "Profile"
|
||||
},
|
||||
"en": {
|
||||
"label": "Profile"
|
||||
},
|
||||
"de": {
|
||||
"label": "Profile"
|
||||
}
|
||||
},
|
||||
"icon": "akar-icons:statistic-up"
|
||||
}', 1, '{
|
||||
"route": {
|
||||
"name": "customer-management-profile",
|
||||
"params": {
|
||||
"locale": ""
|
||||
}
|
||||
}
|
||||
}', 1, 1),
|
||||
(15, '{
|
||||
"name": "customer-products",
|
||||
"trans": {
|
||||
"pl": {
|
||||
"label": "Products"
|
||||
},
|
||||
"en": {
|
||||
"label": "Products"
|
||||
},
|
||||
"de": {
|
||||
"label": "Products"
|
||||
}
|
||||
},
|
||||
"icon": "akar-icons:statistic-up"
|
||||
}', 1, '{
|
||||
"route": {
|
||||
"name": "customer-products",
|
||||
"params": {
|
||||
"locale": ""
|
||||
}
|
||||
}
|
||||
}', 1, 1),
|
||||
(16, '{
|
||||
"name": "customer-page-carts",
|
||||
"trans": {
|
||||
"pl": {
|
||||
"label": "Carts"
|
||||
},
|
||||
"en": {
|
||||
"label": "Carts"
|
||||
},
|
||||
"de": {
|
||||
"label": "Carts"
|
||||
}
|
||||
},
|
||||
"icon": "proicons:cart1"
|
||||
}', 1, '{
|
||||
"route": {
|
||||
"name": "customer-page-carts",
|
||||
"params": {
|
||||
"locale": ""
|
||||
}
|
||||
}
|
||||
}', 1, 1),
|
||||
(17, '{
|
||||
"name": "customer-search-products",
|
||||
"trans": {
|
||||
"pl": {
|
||||
"label": "Search-Products"
|
||||
},
|
||||
"en": {
|
||||
"label": "Search-Products"
|
||||
},
|
||||
"de": {
|
||||
"label": "Search-Products"
|
||||
}
|
||||
},
|
||||
"icon": "proicons:cart1"
|
||||
}', 1, '{
|
||||
"route": {
|
||||
"name": "customer-search-products",
|
||||
"params": {
|
||||
"locale": ""
|
||||
}
|
||||
}
|
||||
}', 1, 1),
|
||||
(18, '{
|
||||
"name": "admin-add-product",
|
||||
"trans": {
|
||||
"pl": {
|
||||
"label": "Dodaj produkt"
|
||||
},
|
||||
"en": {
|
||||
"label": "Add Product"
|
||||
},
|
||||
"de": {
|
||||
"label": "Produkt hinzufügen"
|
||||
}
|
||||
},
|
||||
"icon": "proicons:cart1"
|
||||
}', 1, '{
|
||||
"route": {
|
||||
"name": "admin-add-product",
|
||||
"params": {
|
||||
"locale": ""
|
||||
}
|
||||
}
|
||||
}', 1, 1);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS b2b_customer_management_menu (
|
||||
menu_id INT AUTO_INCREMENT NOT NULL,
|
||||
@@ -60,11 +353,6 @@ INSERT IGNORE INTO `b2b_customer_management_menu` (`menu_id`, `label`, `parent_i
|
||||
(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_customer_management_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_customer_management_menu` (`menu_id`, `label`, `parent_id`, `params`, `active`, `position`) VALUES (3, '{"name":"admin-products","trans":{"pl":{"label":"admin-products"},"en":{"label":"admin-products"},"de":{"label":"admin-products"}}}', 1, '{}', 1, 1);
|
||||
INSERT INTO `b2b_customer_management_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
|
||||
|
||||
DROP TABLE IF EXISTS b2b_routes;
|
||||
|
||||
@@ -13,18 +13,25 @@ INSERT INTO `b2b_roles` (`name`, `id`) VALUES ('super_admin','3');
|
||||
INSERT INTO `b2b_roles` (`name`, `id`) VALUES ('unlogged','4');
|
||||
|
||||
INSERT INTO `b2b_top_menu_roles` (`top_menu_id`, `role_id`) VALUES (1, '1');
|
||||
INSERT INTO `b2b_top_menu_roles` (`top_menu_id`, `role_id`) VALUES (3, '1');
|
||||
INSERT INTO `b2b_top_menu_roles` (`top_menu_id`, `role_id`) VALUES (9, '1');
|
||||
INSERT INTO `b2b_top_menu_roles` (`top_menu_id`, `role_id`) VALUES (4, '1');
|
||||
INSERT INTO `b2b_top_menu_roles` (`top_menu_id`, `role_id`) VALUES (5, '1');
|
||||
INSERT INTO `b2b_top_menu_roles` (`top_menu_id`, `role_id`) VALUES (6, '1');
|
||||
INSERT INTO `b2b_top_menu_roles` (`top_menu_id`, `role_id`) VALUES (10, '1');
|
||||
INSERT INTO `b2b_top_menu_roles` (`top_menu_id`, `role_id`) VALUES (15, '1');
|
||||
INSERT INTO `b2b_top_menu_roles` (`top_menu_id`, `role_id`) VALUES (16, '1');
|
||||
INSERT INTO `b2b_top_menu_roles` (`top_menu_id`, `role_id`) VALUES (1, '2');
|
||||
INSERT INTO `b2b_top_menu_roles` (`top_menu_id`, `role_id`) VALUES (3, '2');
|
||||
INSERT INTO `b2b_top_menu_roles` (`top_menu_id`, `role_id`) VALUES (9, '2');
|
||||
INSERT INTO `b2b_top_menu_roles` (`top_menu_id`, `role_id`) VALUES (2, '2');
|
||||
INSERT INTO `b2b_top_menu_roles` (`top_menu_id`, `role_id`) VALUES (12, '2');
|
||||
INSERT INTO `b2b_top_menu_roles` (`top_menu_id`, `role_id`) VALUES (13, '2');
|
||||
INSERT INTO `b2b_top_menu_roles` (`top_menu_id`, `role_id`) VALUES (14, '2');
|
||||
INSERT INTO `b2b_top_menu_roles` (`top_menu_id`, `role_id`) VALUES (1, '3');
|
||||
INSERT INTO `b2b_top_menu_roles` (`top_menu_id`, `role_id`) VALUES (3, '3');
|
||||
INSERT INTO `b2b_top_menu_roles` (`top_menu_id`, `role_id`) VALUES (9, '3');
|
||||
INSERT INTO `b2b_top_menu_roles` (`top_menu_id`, `role_id`) VALUES (1, '4');
|
||||
INSERT INTO `b2b_top_menu_roles` (`top_menu_id`, `role_id`) VALUES (3, '4');
|
||||
INSERT INTO `b2b_top_menu_roles` (`top_menu_id`, `role_id`) VALUES (9, '4');
|
||||
|
||||
INSERT INTO `b2b_top_menu_roles` (`top_menu_id`, `role_id`) VALUES (2, '3');
|
||||
INSERT INTO `b2b_top_menu_roles` (`top_menu_id`, `role_id`) VALUES (12, '3');
|
||||
INSERT INTO `b2b_top_menu_roles` (`top_menu_id`, `role_id`) VALUES (13, '3');
|
||||
INSERT INTO `b2b_top_menu_roles` (`top_menu_id`, `role_id`) VALUES (14, '3');
|
||||
INSERT INTO `b2b_top_menu_roles` (`top_menu_id`, `role_id`) VALUES (17, '1');
|
||||
INSERT INTO `b2b_top_menu_roles` (`top_menu_id`, `role_id`) VALUES (18, '2');
|
||||
INSERT INTO `b2b_top_menu_roles` (`top_menu_id`, `role_id`) VALUES (18, '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)
|
||||
@@ -112,5 +119,28 @@ INSERT INTO `b2b_route_roles` (`route_id`, `role_id`) VALUES
|
||||
(7, '1'),
|
||||
(7, '2'),
|
||||
(7, '3'),
|
||||
(7, '4');
|
||||
(7, '4'),
|
||||
(9, '2'),
|
||||
(9, '3'),
|
||||
(10, '1'),
|
||||
(11, '1'),
|
||||
(12, '1'),
|
||||
(13, '1'),
|
||||
(14, '2'),
|
||||
(14, '3'),
|
||||
(15, '2'),
|
||||
(15, '3'),
|
||||
(16, '2'),
|
||||
(16, '3'),
|
||||
(17, '2'),
|
||||
(17, '3'),
|
||||
(18, '2'),
|
||||
(18, '3'),
|
||||
(19, '1'),
|
||||
(20, '1'),
|
||||
(21, '1'),
|
||||
(22, '1'),
|
||||
(24, '1'),
|
||||
(25, '2'),
|
||||
(25, '3');
|
||||
-- +goose Down
|
||||
Reference in New Issue
Block a user