Built Student Profile Page

This commit is contained in:
scmmishra
2018-11-26 19:16:54 +05:30
committed by Aditya Hase
parent 308f235859
commit 2955851867
5 changed files with 131 additions and 62 deletions

View File

@@ -20,12 +20,11 @@
</div>
<div class='course-buttons text-center col-xs-5 col-sm-4 col-md-3'>
<a-button
v-if="programData.name == 'ECP2018'"
:type="'success'"
:type="buttonType"
size="sm btn-block"
:route="{name: 'home'}"
:route="programRoute"
>
Download Certificate
{{ buttonName }}
</a-button>
</div>
</div>
@@ -53,6 +52,30 @@ export default {
})
},
},
computed: {
programRoute() {
return {name: 'program', params: {program_name: this.program}}
},
buttonType() {
if (this.programData.percentage == 100 ){
return "success"
}
else if (this.programData.percentage == "0" ) {
return "secondary"
}
else {
return "info"
}
},
buttonName() {
if (this.programData.percentage == 100 ){
return "Program Complete"
}
else {
return `${this.programData.percentage}% Completed`
}
}
},
components: {
AButton
},