brotherton-erpnext/erpnext/public/js/hub/pages/Selling.vue

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

67 lines
1.6 KiB
Vue
Raw Normal View History

<template>
<div>
<section-header>
<h4>{{ __('Selling') }}</h4>
</section-header>
<div class="row" v-if="items && items.length">
<div class="col-md-7"
style="margin-bottom: 30px;"
v-for="item of items"
:key="item.name"
>
<item-list-card
:item="item"
>
<div slot="subtitle">
<span class="text-muted">{{ __('{0} conversations', [item.received_messages.length]) }}</span>
</div>
</item-list-card>
<div class="hub-list-item" v-for="(message, index) in item.received_messages" :key="index"
2018-09-03 12:19:11 +00:00
v-route="'marketplace/selling/' + message.buyer + '/' + item.name"
>
<div class="hub-list-left">
<div class="hub-list-body">
<div class="hub-list-title">
2018-09-03 12:19:11 +00:00
{{ message.buyer_name }}
</div>
<div class="hub-list-subtitle">
2018-09-03 12:19:11 +00:00
{{ message.sender }}: {{ message.message | striphtml }}
</div>
</div>
</div>
</div>
</div>
</div>
2018-08-27 14:27:12 +00:00
<empty-state v-else :message="__('This page keeps track of your items in which buyers have showed some interest.')" :centered="false" />
</div>
</template>
<script>
2018-08-27 14:27:12 +00:00
import EmptyState from '../components/EmptyState.vue';
import SectionHeader from '../components/SectionHeader.vue';
import ItemListCard from '../components/ItemListCard.vue';
export default {
components: {
SectionHeader,
2018-08-27 14:27:12 +00:00
ItemListCard,
EmptyState
},
data() {
return {
2018-08-27 14:27:12 +00:00
items: null
}
},
created() {
this.get_items_for_messages()
.then(items => {
this.items = items;
});
},
methods: {
get_items_for_messages() {
return hub.call('get_selling_items_for_messages');
}
}
}
</script>