[hub] UI and empty state in 'your products' to guide on publishing
This commit is contained in:
parent
47f5f0e608
commit
bff2bdc858
@ -3,8 +3,9 @@
|
|||||||
<empty-state
|
<empty-state
|
||||||
v-if="items.length === 0"
|
v-if="items.length === 0"
|
||||||
:message="empty_state_message"
|
:message="empty_state_message"
|
||||||
|
:action="empty_state_action"
|
||||||
:bordered="true"
|
:bordered="true"
|
||||||
:height="80"
|
:height="empty_state_height"
|
||||||
/>
|
/>
|
||||||
<item-card
|
<item-card
|
||||||
v-for="item in items"
|
v-for="item in items"
|
||||||
@ -36,6 +37,7 @@ export default {
|
|||||||
editable: Boolean,
|
editable: Boolean,
|
||||||
|
|
||||||
empty_state_message: String,
|
empty_state_message: String,
|
||||||
|
empty_state_action: Object,
|
||||||
empty_state_height: Number,
|
empty_state_height: Number,
|
||||||
empty_state_bordered: Boolean
|
empty_state_bordered: Boolean
|
||||||
},
|
},
|
||||||
|
|||||||
@ -3,7 +3,23 @@
|
|||||||
class="marketplace-page"
|
class="marketplace-page"
|
||||||
:data-page-name="page_name"
|
:data-page-name="page_name"
|
||||||
>
|
>
|
||||||
|
<section-header>
|
||||||
|
<div>
|
||||||
<h5>{{ page_title }}</h5>
|
<h5>{{ page_title }}</h5>
|
||||||
|
<p v-if="items.length"
|
||||||
|
class="text-muted margin-bottom">
|
||||||
|
{{ published_items_message }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button v-if="items.length"
|
||||||
|
class="btn btn-default btn-xs publish-items"
|
||||||
|
v-route="'marketplace/publish'"
|
||||||
|
>
|
||||||
|
<span>{{ publish_button_text }}</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
</section-header>
|
||||||
|
|
||||||
<item-cards-container
|
<item-cards-container
|
||||||
:container_name="page_title"
|
:container_name="page_title"
|
||||||
@ -11,6 +27,7 @@
|
|||||||
:item_id_fieldname="item_id_fieldname"
|
:item_id_fieldname="item_id_fieldname"
|
||||||
:on_click="go_to_item_details_page"
|
:on_click="go_to_item_details_page"
|
||||||
:empty_state_message="empty_state_message"
|
:empty_state_message="empty_state_message"
|
||||||
|
:empty_state_action="publish_page_action"
|
||||||
>
|
>
|
||||||
</item-cards-container>
|
</item-cards-container>
|
||||||
</div>
|
</div>
|
||||||
@ -25,8 +42,17 @@ export default {
|
|||||||
items: [],
|
items: [],
|
||||||
item_id_fieldname: 'name',
|
item_id_fieldname: 'name',
|
||||||
|
|
||||||
|
publish_page_action: {
|
||||||
|
label: __('Publish Your First Items'),
|
||||||
|
on_click: () => {
|
||||||
|
frappe.set_route(`marketplace/home`);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
page_title: __('Published Products'),
|
page_title: __('Published Items'),
|
||||||
|
publish_button_text: __('Publish More Items'),
|
||||||
|
published_items_message: __('You can publish upto 200 items.'),
|
||||||
// TODO: Add empty state action
|
// TODO: Add empty state action
|
||||||
empty_state_message: __(`You haven't published any products yet. Publish.`)
|
empty_state_message: __(`You haven't published any products yet. Publish.`)
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user