2018-11-26 13:46:54 +00:00
|
|
|
<template>
|
2019-05-16 11:08:13 +00:00
|
|
|
<div class="py-5">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-12">
|
|
|
|
<div>
|
|
|
|
<h3>{{ fullName }}</h3>
|
|
|
|
<ul>
|
|
|
|
<li class="row">
|
|
|
|
<div class="col-md-3 col-sm-4 pr-0 text-muted">Email:</div>
|
|
|
|
<div class="col-md-9 col-sm-8">{{ email }}</div>
|
|
|
|
</li>
|
|
|
|
<li v-if="joiningDate" class="row">
|
|
|
|
<div class="col-md-3 col-sm-4 pr-0 text-muted">Date of Joining:</div>
|
|
|
|
<div class="col-md-9 col-sm-8">{{ joiningDate }}</div>
|
|
|
|
</li>
|
|
|
|
<li class="row">
|
|
|
|
<div class="col-md-3 col-sm-4 pr-0 text-muted">Programs Enrolled:</div>
|
|
|
|
<div class="col-md-9 col-sm-8">
|
|
|
|
<ul v-if="enrolledPrograms">
|
|
|
|
<li v-for="program in enrolledPrograms" :key="program">{{ program }}</li>
|
|
|
|
</ul>
|
|
|
|
<span v-else>None</span>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
2018-11-26 13:46:54 +00:00
|
|
|
</div>
|
2019-05-16 11:08:13 +00:00
|
|
|
<a href="/update-profile" class="edit-button text-muted">Edit Profile</a>
|
2018-11-26 13:46:54 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-05-16 11:08:13 +00:00
|
|
|
<div ></div>
|
|
|
|
</div>
|
2018-11-26 13:46:54 +00:00
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
|
|
|
|
export default {
|
|
|
|
props: ['enrolledPrograms'],
|
|
|
|
name: "ProfileInfo",
|
|
|
|
data() {
|
|
|
|
return {
|
2018-12-11 05:28:14 +00:00
|
|
|
avatar: frappe.user_image,
|
|
|
|
fullName: frappe.full_name,
|
2018-11-26 13:46:54 +00:00
|
|
|
abbr: frappe.get_abbr(frappe.get_cookie("full_name")),
|
|
|
|
email: frappe.session.user,
|
2019-03-28 09:17:22 +00:00
|
|
|
joiningDate: ''
|
2018-11-26 13:46:54 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
mounted(){
|
2019-03-28 09:17:22 +00:00
|
|
|
this.getJoiningDate().then(data => {
|
|
|
|
if(data) {
|
|
|
|
this.joiningDate = lms.moment(String(data)).format('D MMMM YYYY')
|
|
|
|
}
|
|
|
|
})
|
2018-11-26 13:46:54 +00:00
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
avatarStyle() {
|
|
|
|
return `background-image: url("${this.avatar}")`
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
getJoiningDate() {
|
|
|
|
return lms.call("get_joining_date")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<style scoped>
|
2019-02-28 12:41:46 +00:00
|
|
|
.edit-button {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
right: 0;
|
2018-11-26 13:46:54 +00:00
|
|
|
}
|
2019-02-28 12:41:46 +00:00
|
|
|
|
2018-11-26 13:46:54 +00:00
|
|
|
.standard-image {
|
|
|
|
font-size: 72px;
|
|
|
|
border-radius: 6px;
|
|
|
|
}
|
2019-02-28 12:41:46 +00:00
|
|
|
|
2018-11-26 13:46:54 +00:00
|
|
|
ul {
|
2019-02-28 12:41:46 +00:00
|
|
|
list-style-type: none;
|
|
|
|
padding: 0;
|
2018-11-26 13:46:54 +00:00
|
|
|
margin: 0
|
2019-02-28 12:41:46 +00:00
|
|
|
}
|
2018-11-26 13:46:54 +00:00
|
|
|
</style>
|