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