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"
|
|
|
|
:image="image"
|
|
|
|
:sections="sections"
|
2018-08-26 12:36:25 +00:00
|
|
|
:show_skeleton="init"
|
2018-08-26 07:39:19 +00:00
|
|
|
>
|
2018-08-27 05:19:42 +00:00
|
|
|
|
|
|
|
<detail-header-item slot="detail-header-item"
|
|
|
|
:value="country"
|
|
|
|
></detail-header-item>
|
|
|
|
<detail-header-item slot="detail-header-item"
|
|
|
|
:value="site_name"
|
|
|
|
></detail-header-item>
|
|
|
|
<detail-header-item slot="detail-header-item"
|
|
|
|
:value="joined_when"
|
|
|
|
></detail-header-item>
|
|
|
|
|
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,
|
|
|
|
image: null,
|
2018-08-27 05:19:42 +00:00
|
|
|
sections: [],
|
|
|
|
|
|
|
|
country: '',
|
|
|
|
site_name: '',
|
|
|
|
joined_when: '',
|
2018-08-26 07:39:19 +00:00
|
|
|
};
|
|
|
|
},
|
|
|
|
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;
|
2018-08-27 05:19:42 +00:00
|
|
|
|
|
|
|
this.country = __(profile.country);
|
|
|
|
this.site_name = __(profile.site_name);
|
|
|
|
this.joined_when = __(`Joined ${comment_when(profile.creation)}`);
|
|
|
|
|
2018-08-26 07:39:19 +00:00
|
|
|
this.image = profile.logo;
|
|
|
|
this.sections = [
|
|
|
|
{
|
|
|
|
title: __('About the Company'),
|
|
|
|
content: profile.company_description
|
|
|
|
? __(profile.company_description)
|
|
|
|
: __('No description')
|
|
|
|
}
|
|
|
|
];
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped></style>
|