refactor: rename hub-card-container to hub-items-container
This commit is contained in:
parent
460e2798cd
commit
aa46567439
@ -3,13 +3,13 @@ import { get_item_card_html } from './item_card';
|
||||
function get_item_card_container_html(items, title='', get_item_html = get_item_card_html, action='') {
|
||||
const items_html = (items || []).map(item => get_item_html(item)).join('');
|
||||
const title_html = title
|
||||
? `<div class="hub-card-container-header col-sm-12 margin-bottom flex">
|
||||
? `<div class="hub-items-header col-sm-12 margin-bottom flex">
|
||||
<h4>${title}</h4>
|
||||
${action}
|
||||
</div>`
|
||||
: '';
|
||||
|
||||
const html = `<div class="row hub-card-container">
|
||||
const html = `<div class="row hub-items-container">
|
||||
${title_html}
|
||||
${items_html}
|
||||
</div>`;
|
||||
|
@ -11,7 +11,7 @@ erpnext.hub.Category = class Category extends SubPage {
|
||||
}
|
||||
|
||||
get_items_for_category(category) {
|
||||
this.$wrapper.find('.hub-card-container').empty();
|
||||
this.$wrapper.find('.hub-items-container').empty();
|
||||
return hub.call('get_items', {
|
||||
filters: {
|
||||
hub_category: category
|
||||
|
@ -20,7 +20,7 @@ erpnext.hub.Home = class Home extends SubPage {
|
||||
}
|
||||
|
||||
get_items_and_render() {
|
||||
this.$wrapper.find('.hub-card-container').empty();
|
||||
this.$wrapper.find('.hub-items-container').empty();
|
||||
this.get_data()
|
||||
.then(data => {
|
||||
this.render(data);
|
||||
|
@ -3,7 +3,7 @@ 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-card-container').empty();
|
||||
this.$wrapper.find('.hub-items-container').empty();
|
||||
this.get_published_products()
|
||||
.then(items => this.render(items));
|
||||
}
|
||||
|
@ -223,15 +223,10 @@ body[data-route^="marketplace/"] {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.hub-card-container {
|
||||
.hub-card-container-header {
|
||||
margin-top: 32px;
|
||||
.hub-items-container {
|
||||
.hub-items-header {
|
||||
justify-content: space-between;
|
||||
align-items: baseline;
|
||||
|
||||
h4 {
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user