`).appendTo($(parent));
+
+ new Vue({
+ render: h => h(Category)
+ }).$mount('#vue-area-category');
+ }
+
+ show() {
+ $('[data-page-name="category"]').show();
+ }
+
+ hide() {
+ $('[data-page-name="category"]').hide();
+ }
+}
+
+erpnext.hub.PublishedProductsPage = class {
+ constructor(parent) {
+ this.$wrapper = $(`
`).appendTo($(parent));
+
+ new Vue({
+ render: h => h(PublishedProducts)
+ }).$mount('#vue-area-published-products');
+ }
+
+ show() {
+ $('[data-page-name="published-products"]').show();
+ }
+
+ hide() {
+ $('[data-page-name="published-products"]').hide();
+ }
+}
+
diff --git a/erpnext/public/js/hub/pages/Category.vue b/erpnext/public/js/hub/pages/Category.vue
new file mode 100644
index 00000000000..c346ca9392a
--- /dev/null
+++ b/erpnext/public/js/hub/pages/Category.vue
@@ -0,0 +1,64 @@
+
+
+
{{ page_title }}
+
+
+
+
+
+
+
+
+
diff --git a/erpnext/public/js/hub/pages/PublishedProducts.vue b/erpnext/public/js/hub/pages/PublishedProducts.vue
new file mode 100644
index 00000000000..cbebc03f018
--- /dev/null
+++ b/erpnext/public/js/hub/pages/PublishedProducts.vue
@@ -0,0 +1,60 @@
+
+
+
{{ page_title }}
+
+
+
+
+
+
+
+
+
diff --git a/erpnext/public/js/hub/pages/SavedProducts.vue b/erpnext/public/js/hub/pages/SavedProducts.vue
index a80c7ecd10d..a094a1cabe8 100644
--- a/erpnext/public/js/hub/pages/SavedProducts.vue
+++ b/erpnext/public/js/hub/pages/SavedProducts.vue
@@ -26,7 +26,6 @@ export default {
return {
page_name: frappe.get_route()[1],
items: [],
- all_items: [],
item_id_fieldname: 'hub_item_code',
// Constants
diff --git a/erpnext/public/js/hub/pages/category.js b/erpnext/public/js/hub/pages/category.js
deleted file mode 100644
index c279c1aab11..00000000000
--- a/erpnext/public/js/hub/pages/category.js
+++ /dev/null
@@ -1,26 +0,0 @@
-import SubPage from './subpage';
-import { get_item_card_container_html } from '../components/items_container';
-
-erpnext.hub.Category = class Category extends SubPage {
- refresh() {
- this.category = frappe.get_route()[2];
- this.get_items_for_category(this.category)
- .then(items => {
- this.render(items);
- });
- }
-
- get_items_for_category(category) {
- this.$wrapper.find('.hub-items-container').empty();
- return hub.call('get_items', {
- filters: {
- hub_category: category
- }
- });
- }
-
- render(items) {
- const html = get_item_card_container_html(items, __(this.category));
- this.$wrapper.append(html)
- }
-}
diff --git a/erpnext/public/js/hub/pages/published_products.js b/erpnext/public/js/hub/pages/published_products.js
deleted file mode 100644
index 17c115e70f2..00000000000
--- a/erpnext/public/js/hub/pages/published_products.js
+++ /dev/null
@@ -1,23 +0,0 @@
-import SubPage from './subpage';
-import { get_item_card_container_html } from '../components/items_container';
-
-erpnext.hub.PublishedProducts = class PublishedProducts extends SubPage {
- get_items_and_render() {
- this.$wrapper.find('.hub-items-container').empty();
- this.get_published_products()
- .then(items => this.render(items));
- }
-
- refresh() {
- this.get_items_and_render();
- }
-
- render(items) {
- const items_container = $(get_item_card_container_html(items, __('Your Published Products')));
- this.$wrapper.append(items_container);
- }
-
- get_published_products() {
- return hub.call('get_items', { hub_seller: hub.settings.company_email });
- }
-}
diff --git a/erpnext/public/js/hub/pages/register.js b/erpnext/public/js/hub/pages/register.js
deleted file mode 100644
index 36b08425f91..00000000000
--- a/erpnext/public/js/hub/pages/register.js
+++ /dev/null
@@ -1,113 +0,0 @@
-import SubPage from './subpage';
-
-erpnext.hub.Register = class Register extends SubPage {
- make_wrapper() {
- super.make_wrapper();
- this.$register_container = $(`
`)
- .appendTo(this.$wrapper);
- this.$form_container = $('