fix: Rename 'Product' to 'Item'
This commit is contained in:
parent
6b695d32b2
commit
8e04487253
@ -9,8 +9,8 @@
|
||||
import Home from './pages/Home.vue';
|
||||
import Search from './pages/Search.vue';
|
||||
import Category from './pages/Category.vue';
|
||||
import SavedProducts from './pages/SavedProducts.vue';
|
||||
import PublishedProducts from './pages/PublishedProducts.vue';
|
||||
import SavedItems from './pages/SavedItems.vue';
|
||||
import PublishedItems from './pages/PublishedItems.vue';
|
||||
import Item from './pages/Item.vue';
|
||||
import Seller from './pages/Seller.vue';
|
||||
import Publish from './pages/Publish.vue';
|
||||
@ -30,9 +30,9 @@ const route_map = {
|
||||
|
||||
// Registered seller routes
|
||||
'marketplace/profile': Profile,
|
||||
'marketplace/saved-products': SavedProducts,
|
||||
'marketplace/saved-items': SavedItems,
|
||||
'marketplace/publish': Publish,
|
||||
'marketplace/my-products': PublishedProducts,
|
||||
'marketplace/published-items': PublishedItems,
|
||||
'marketplace/buying': Buying,
|
||||
'marketplace/buying/:item': Messages,
|
||||
'marketplace/selling': Selling,
|
||||
|
@ -26,8 +26,8 @@ export default {
|
||||
route: 'marketplace/home'
|
||||
},
|
||||
{
|
||||
label: __('Saved Products'),
|
||||
route: 'marketplace/saved-products',
|
||||
label: __('Saved Items'),
|
||||
route: 'marketplace/saved-items',
|
||||
condition: () => this.hub_registered
|
||||
},
|
||||
{
|
||||
@ -36,12 +36,12 @@ export default {
|
||||
condition: () => this.hub_registered
|
||||
},
|
||||
{
|
||||
label: __('Your Products'),
|
||||
route: 'marketplace/my-products',
|
||||
label: __('Your Items'),
|
||||
route: 'marketplace/published-items',
|
||||
condition: () => this.hub_registered
|
||||
},
|
||||
{
|
||||
label: __('Publish Products'),
|
||||
label: __('Publish Items'),
|
||||
route: 'marketplace/publish',
|
||||
condition: () => this.hub_registered
|
||||
},
|
||||
|
@ -3,7 +3,7 @@
|
||||
<div class="media timeline-item notification-content">
|
||||
<div class="small">
|
||||
<i class="octicon octicon-bookmark fa-fw"></i>
|
||||
<span title="Administrator"><b>4 weeks ago</b> Published 1 product to Marketplace</span>
|
||||
<span title="Administrator"><b>4 weeks ago</b> Published 1 item to Marketplace</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -94,7 +94,7 @@ function get_detail_view_html(item, allow_edit) {
|
||||
</div>
|
||||
<div class="row hub-item-description">
|
||||
<h6 class="col-md-12 margin-top">
|
||||
<b class="text-muted">Product Description</b>
|
||||
<b class="text-muted">Item Description</b>
|
||||
</h6>
|
||||
<p class="col-md-12">
|
||||
${description ? description : __('No details')}
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'saved-products-page',
|
||||
data() {
|
||||
return {
|
||||
page_name: frappe.get_route()[1],
|
||||
@ -27,7 +26,7 @@ export default {
|
||||
item_id_fieldname: 'name',
|
||||
|
||||
// Constants
|
||||
empty_state_message: __(`No products in this category yet.`)
|
||||
empty_state_message: __(`No items in this category yet.`)
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
@ -60,7 +60,7 @@ export default {
|
||||
action: this.add_to_saved_items
|
||||
},
|
||||
{
|
||||
label: __('Report this Product'),
|
||||
label: __('Report this Item'),
|
||||
condition: !this.is_own_item,
|
||||
action: this.report_item
|
||||
},
|
||||
@ -70,7 +70,7 @@ export default {
|
||||
action: this.report_item
|
||||
},
|
||||
{
|
||||
label: __('Unpublish Product'),
|
||||
label: __('Unpublish Item'),
|
||||
condition: this.is_own_item,
|
||||
action: this.report_item
|
||||
}
|
||||
@ -170,7 +170,7 @@ export default {
|
||||
|
||||
this.sections = [
|
||||
{
|
||||
title: __('Product Description'),
|
||||
title: __('Item Description'),
|
||||
content: this.item.description
|
||||
? __(this.item.description)
|
||||
: __('No description')
|
||||
@ -192,7 +192,7 @@ export default {
|
||||
hub_seller: hub.settings.company_email
|
||||
})
|
||||
.then(() => {
|
||||
const saved_items_link = `<b><a href="#marketplace/saved-products">${__('Saved')}</a></b>`
|
||||
const saved_items_link = `<b><a href="#marketplace/saved-items">${__('Saved')}</a></b>`
|
||||
frappe.show_alert(saved_items_link);
|
||||
erpnext.hub.trigger('action:item_save');
|
||||
})
|
||||
|
@ -34,7 +34,7 @@
|
||||
>
|
||||
</item-cards-container>
|
||||
|
||||
<p class="text-muted">{{ valid_products_instruction }}</p>
|
||||
<p class="text-muted">{{ valid_items_instruction }}</p>
|
||||
|
||||
<search-input
|
||||
:placeholder="search_placeholder"
|
||||
@ -73,16 +73,16 @@ export default {
|
||||
|
||||
// Constants
|
||||
// TODO: multiline translations don't work
|
||||
page_title: __('Publish Products'),
|
||||
page_title: __('Publish Items'),
|
||||
search_placeholder: __('Search Items ...'),
|
||||
empty_state_message: __(`No Items selected yet. Browse and click on products below to publish.`),
|
||||
valid_products_instruction: __(`Only products with an image and description can be published. Please update them if an item in your inventory does not appear.`),
|
||||
empty_state_message: __(`No Items selected yet. Browse and click on items below to publish.`),
|
||||
valid_items_instruction: __(`Only items with an image and description can be published. Please update them if an item in your inventory does not appear.`),
|
||||
last_sync_message: (hub.settings.last_sync_datetime)
|
||||
? __(`Last sync was
|
||||
<a href="#marketplace/profile">
|
||||
${comment_when(hub.settings.last_sync_datetime)}</a>.
|
||||
<a href="#marketplace/my-products">
|
||||
See your Published Products</a>.`)
|
||||
<a href="#marketplace/published-items">
|
||||
See your Published Items</a>.`)
|
||||
: ''
|
||||
};
|
||||
},
|
||||
@ -93,14 +93,14 @@ export default {
|
||||
|
||||
publish_button_text() {
|
||||
const number = this.selected_items.length;
|
||||
let text = 'Publish';
|
||||
let text = __('Publish');
|
||||
if(number === 1) {
|
||||
text = 'Publish 1 Product';
|
||||
text = __('Publish 1 Item');
|
||||
}
|
||||
if(number > 1) {
|
||||
text = `Publish ${number} Products`;
|
||||
text = __('Publish {0} Items', [number]);
|
||||
}
|
||||
return __(text);
|
||||
return text;
|
||||
},
|
||||
|
||||
items_dict() {
|
||||
@ -150,8 +150,8 @@ export default {
|
||||
this.last_sync_message = __(`Last sync was
|
||||
<a href="#marketplace/profile">
|
||||
${comment_when(hub.settings.last_sync_datetime)}</a>.
|
||||
<a href="#marketplace/my-products">
|
||||
See your Published Products</a>.`);
|
||||
<a href="#marketplace/published-items">
|
||||
See your Published Items</a>.`);
|
||||
},
|
||||
|
||||
clear_last_sync_message() {
|
||||
|
@ -35,7 +35,6 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'saved-products-page',
|
||||
data() {
|
||||
return {
|
||||
page_name: frappe.get_route()[1],
|
||||
@ -54,7 +53,7 @@ export default {
|
||||
publish_button_text: __('Publish More Items'),
|
||||
published_items_message: __('You can publish upto 200 items.'),
|
||||
// TODO: Add empty state action
|
||||
empty_state_message: __(`You haven't published any products yet. Publish.`)
|
||||
empty_state_message: __('You haven\'t published any items yet.')
|
||||
};
|
||||
},
|
||||
created() {
|
@ -20,7 +20,7 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'saved-products-page',
|
||||
name: 'saved-items-page',
|
||||
data() {
|
||||
return {
|
||||
page_name: frappe.get_route()[1],
|
||||
@ -28,8 +28,8 @@ export default {
|
||||
item_id_fieldname: 'name',
|
||||
|
||||
// Constants
|
||||
page_title: __('Saved Products'),
|
||||
empty_state_message: __(`You haven't favourited any items yet.`)
|
||||
page_title: __('Saved Items'),
|
||||
empty_state_message: __(`You haven't saved any items yet.`)
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -76,12 +76,12 @@ export default {
|
||||
|
||||
setTimeout(() => {
|
||||
if(!reverted) {
|
||||
this.remove_item_from_saved_products(hub_item_name);
|
||||
this.remove_item_from_saved_items(hub_item_name);
|
||||
}
|
||||
}, grace_period);
|
||||
},
|
||||
|
||||
remove_item_from_saved_products(hub_item_name) {
|
||||
remove_item_from_saved_items(hub_item_name) {
|
||||
erpnext.hub.trigger('action:item_save');
|
||||
hub.call('remove_item_from_seller_saved_items', {
|
||||
hub_item_name,
|
@ -25,7 +25,6 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'saved-products-page',
|
||||
data() {
|
||||
return {
|
||||
page_name: frappe.get_route()[1],
|
||||
@ -42,7 +41,7 @@ export default {
|
||||
page_title() {
|
||||
return this.items.length
|
||||
? __(`Results for "${this.search_value}"`)
|
||||
: __(`No Products found.`);
|
||||
: __('No Items found.');
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
@ -61,7 +61,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
item_container_heading() {
|
||||
return __('Products by ' + this.seller_company);
|
||||
return __('Items by ' + this.seller_company);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -48,7 +48,7 @@ erpnext.hub.Item = class Item extends SubPage {
|
||||
edit_details() {
|
||||
if (!this.edit_dialog) {
|
||||
this.edit_dialog = new frappe.ui.Dialog({
|
||||
title: "Edit Your Product",
|
||||
title: "Edit Your Item",
|
||||
fields: []
|
||||
});
|
||||
}
|
||||
@ -59,7 +59,7 @@ erpnext.hub.Item = class Item extends SubPage {
|
||||
unpublish_item() {
|
||||
if (!this.unpublish_dialog) {
|
||||
this.unpublish_dialog = new frappe.ui.Dialog({
|
||||
title: "Edit Your Product",
|
||||
title: "Edit Your Item",
|
||||
fields: []
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user