feat(marketplace): navigation link to seller profile from item page
This commit is contained in:
parent
fdefbdb23b
commit
88baf53cc1
@ -1,5 +1,12 @@
|
||||
<template>
|
||||
<p class="text-muted" v-html="header_item"></p>
|
||||
<p class="text-muted" v-if="!Array.isArray(this.header_items)" v-html="header_items"></p>
|
||||
<p class="text-muted" v-else>
|
||||
<span v-for="(header_item , index) in header_items" :key="index">
|
||||
<span v-if="index" v-html="spacer"></span>
|
||||
<span v-if="typeof(header_item) == 'string'" v-html="header_item"></span>
|
||||
<a v-else-if="typeof(header_item) == 'object'" @click="header_item.on_click(header_item.value)" v-html="header_item.value"></a>
|
||||
</span>
|
||||
</p>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -11,9 +18,8 @@ export default {
|
||||
props: ['value'],
|
||||
data() {
|
||||
return {
|
||||
header_item: Array.isArray(this.value)
|
||||
? this.value.join(spacer)
|
||||
: this.value
|
||||
header_items: this.value,
|
||||
spacer: spacer
|
||||
}
|
||||
},
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ export default {
|
||||
subtitle_items.push(rating + `<i class='fa fa-fw fa-star-o'></i>`)
|
||||
}
|
||||
|
||||
subtitle_items.push(this.item.company);
|
||||
subtitle_items.push({value:this.item.company,on_click:this.go_to_seller_profile_page});
|
||||
|
||||
return subtitle_items;
|
||||
},
|
||||
@ -169,7 +169,9 @@ export default {
|
||||
this.make_dialogs();
|
||||
});
|
||||
},
|
||||
|
||||
go_to_seller_profile_page(seller_name) {
|
||||
frappe.set_route(`marketplace/seller/${seller_name}`);
|
||||
},
|
||||
build_data() {
|
||||
this.title = this.item.item_name || this.item.name;
|
||||
this.image = this.item.image;
|
||||
|
Loading…
Reference in New Issue
Block a user