diff --git a/erpnext/public/js/hub/components/DetailView.vue b/erpnext/public/js/hub/components/DetailView.vue
index 1a2207e4fa5..b86468b83bf 100644
--- a/erpnext/public/js/hub/components/DetailView.vue
+++ b/erpnext/public/js/hub/components/DetailView.vue
@@ -5,32 +5,53 @@
-
+
+
-
-
![]()
-
+
-
{{ title }}
+
Name
-
-
+
Details
+
Ratings
+
+
+
-
-
-
- {{ section.title }}
-
-
-
+
+
+
+
+
+
![]()
+
+
+
+
+
+
+ {{ section.title }}
+
+
+
+
@@ -40,7 +61,7 @@
export default {
name: 'detail-view',
- props: ['title', 'subtitles', 'image', 'sections'],
+ props: ['title', 'subtitles', 'image', 'sections', 'show_skeleton'],
data() {
return {
back_to_home_text: __('Back to Home')
diff --git a/erpnext/public/js/hub/components/profile_dialog.js b/erpnext/public/js/hub/components/profile_dialog.js
index 800e8c66f03..e76abfaa0fd 100644
--- a/erpnext/public/js/hub/components/profile_dialog.js
+++ b/erpnext/public/js/hub/components/profile_dialog.js
@@ -1,75 +1,75 @@
const ProfileDialog = (title = __('Edit Profile'), action={}, initial_values={}) => {
- const fields = [
- {
- fieldtype: 'Link',
- fieldname: 'company',
- label: __('Company'),
- options: 'Company',
- onchange: () => {
- const value = dialog.get_value('company');
+ const fields = [
+ {
+ fieldtype: 'Link',
+ fieldname: 'company',
+ label: __('Company'),
+ options: 'Company',
+ onchange: () => {
+ const value = dialog.get_value('company');
- if (value) {
- frappe.db.get_doc('Company', value)
- .then(company => {
- dialog.set_values({
- country: company.country,
- company_email: company.email,
- currency: company.default_currency
- });
- });
- }
- }
- },
- {
- fieldname: 'company_email',
- label: __('Email'),
- fieldtype: 'Data'
- },
- {
- fieldname: 'country',
- label: __('Country'),
- fieldtype: 'Read Only'
- },
- {
- fieldname: 'currency',
- label: __('Currency'),
- fieldtype: 'Read Only'
- },
- {
- fieldtype: 'Text',
- label: __('About your Company'),
- fieldname: 'company_description'
- }
- ];
+ if (value) {
+ frappe.db.get_doc('Company', value)
+ .then(company => {
+ dialog.set_values({
+ country: company.country,
+ company_email: company.email,
+ currency: company.default_currency
+ });
+ });
+ }
+ }
+ },
+ {
+ fieldname: 'company_email',
+ label: __('Email'),
+ fieldtype: 'Data'
+ },
+ {
+ fieldname: 'country',
+ label: __('Country'),
+ fieldtype: 'Read Only'
+ },
+ {
+ fieldname: 'currency',
+ label: __('Currency'),
+ fieldtype: 'Read Only'
+ },
+ {
+ fieldtype: 'Text',
+ label: __('About your Company'),
+ fieldname: 'company_description'
+ }
+ ];
- let dialog = new frappe.ui.Dialog({
- title: title,
- fields: fields,
- primary_action_label: action.label || __('Update'),
- primary_action: () => {
- const form_values = dialog.get_values();
- let values_filled = true;
- const mandatory_fields = ['company', 'company_email', 'company_description'];
- mandatory_fields.forEach(field => {
- const value = form_values[field];
- if (!value) {
- dialog.set_df_property(field, 'reqd', 1);
- values_filled = false;
- }
- });
- if (!values_filled) return;
+ let dialog = new frappe.ui.Dialog({
+ title: title,
+ fields: fields,
+ primary_action_label: action.label || __('Update'),
+ primary_action: () => {
+ const form_values = dialog.get_values();
+ let values_filled = true;
+ const mandatory_fields = ['company', 'company_email', 'company_description'];
+ mandatory_fields.forEach(field => {
+ const value = form_values[field];
+ if (!value) {
+ dialog.set_df_property(field, 'reqd', 1);
+ values_filled = false;
+ }
+ });
+ if (!values_filled) return;
- action.on_submit(form_values);
- }
- });
+ action.on_submit(form_values);
+ }
+ });
- dialog.set_values(initial_values);
+ dialog.set_values(initial_values);
- // Post create
- const default_company = frappe.defaults.get_default('company');
- dialog.set_value('company', default_company);
+ // Post create
+ const default_company = frappe.defaults.get_default('company');
+ dialog.set_value('company', default_company);
- return dialog;
+ return dialog;
}
export {
diff --git a/erpnext/public/js/hub/components/skeleton_state.js b/erpnext/public/js/hub/components/skeleton_state.js
deleted file mode 100644
index 7c6880224c5..00000000000
--- a/erpnext/public/js/hub/components/skeleton_state.js
+++ /dev/null
@@ -1,27 +0,0 @@
-function get_detail_skeleton_html() {
- const skeleton = `
`;
-
- return skeleton;
-}
-
-export {
- get_detail_skeleton_html
-}
diff --git a/erpnext/public/js/hub/pages/Profile.vue b/erpnext/public/js/hub/pages/Profile.vue
index 394136e53e0..1767796d616 100644
--- a/erpnext/public/js/hub/pages/Profile.vue
+++ b/erpnext/public/js/hub/pages/Profile.vue
@@ -2,13 +2,15 @@
-
@@ -25,6 +27,9 @@ export default {
data() {
return {
page_name: frappe.get_route()[1],
+
+ init: true,
+
profile: null,
title: null,
subtitles: [],
@@ -41,6 +46,8 @@ export default {
'get_hub_seller_profile',
{ hub_seller: hub.settings.company_email }
).then(profile => {
+ this.init = false;
+
this.profile = profile;
this.title = profile.company;
this.subtitles = [
diff --git a/erpnext/public/js/hub/pages/Seller.vue b/erpnext/public/js/hub/pages/Seller.vue
index d4aa2a235f5..5a35812ccbc 100644
--- a/erpnext/public/js/hub/pages/Seller.vue
+++ b/erpnext/public/js/hub/pages/Seller.vue
@@ -2,17 +2,18 @@
-
-
-
{{ item_container_heading }}
+ {{ item_container_heading }}
{
+ this.init = false;
this.profile = data.profile;
this.items = data.items;
diff --git a/erpnext/public/js/hub/pages/item.js b/erpnext/public/js/hub/pages/item.js
index 618c9585a81..f15d1be6351 100644
--- a/erpnext/public/js/hub/pages/item.js
+++ b/erpnext/public/js/hub/pages/item.js
@@ -1,6 +1,6 @@
import SubPage from './subpage';
import { get_detail_view_html } from '../components/detail_view';
-import { get_detail_skeleton_html } from '../components/skeleton_state';
+// import { get_detail_skeleton_html } from '../components/skeleton_state';
import { get_review_html } from '../components/reviews';
erpnext.hub.Item = class Item extends SubPage {
@@ -20,7 +20,7 @@ erpnext.hub.Item = class Item extends SubPage {
show_skeleton() {
- this.$wrapper.html(get_detail_skeleton_html());
+ // this.$wrapper.html(get_detail_skeleton_html());
}