2018-08-26 07:39:19 +00:00
|
|
|
<template>
|
|
|
|
<div
|
|
|
|
class="marketplace-page"
|
|
|
|
:data-page-name="page_name"
|
2018-08-26 12:36:25 +00:00
|
|
|
v-if="init || profile"
|
2018-08-26 07:39:19 +00:00
|
|
|
>
|
|
|
|
|
2018-08-26 12:36:25 +00:00
|
|
|
<detail-view
|
2018-08-26 07:39:19 +00:00
|
|
|
:title="title"
|
|
|
|
:subtitles="subtitles"
|
|
|
|
:image="image"
|
|
|
|
:sections="sections"
|
2018-08-26 12:36:25 +00:00
|
|
|
:show_skeleton="init"
|
2018-08-26 07:39:19 +00:00
|
|
|
>
|
|
|
|
</detail-view>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
2018-08-26 10:59:32 +00:00
|
|
|
name: 'profile-page',
|
2018-08-26 07:39:19 +00:00
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
page_name: frappe.get_route()[1],
|
2018-08-26 12:36:25 +00:00
|
|
|
|
|
|
|
init: true,
|
|
|
|
|
2018-08-26 07:39:19 +00:00
|
|
|
profile: null,
|
|
|
|
title: null,
|
|
|
|
subtitles: [],
|
|
|
|
image: null,
|
|
|
|
sections: []
|
|
|
|
};
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
this.get_profile();
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
get_profile() {
|
|
|
|
hub.call(
|
|
|
|
'get_hub_seller_profile',
|
|
|
|
{ hub_seller: hub.settings.company_email }
|
|
|
|
).then(profile => {
|
2018-08-26 12:36:25 +00:00
|
|
|
this.init = false;
|
|
|
|
|
2018-08-26 07:39:19 +00:00
|
|
|
this.profile = profile;
|
|
|
|
this.title = profile.company;
|
|
|
|
this.subtitles = [
|
|
|
|
__(profile.country),
|
|
|
|
__(profile.site_name),
|
|
|
|
__(`Joined ${comment_when(profile.creation)}`)
|
|
|
|
];
|
|
|
|
this.image = profile.logo;
|
|
|
|
this.sections = [
|
|
|
|
{
|
|
|
|
title: __('About the Company'),
|
|
|
|
content: profile.company_description
|
|
|
|
? __(profile.company_description)
|
|
|
|
: __('No description')
|
|
|
|
}
|
|
|
|
];
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped></style>
|