Skip to content

Commit

Permalink
Converte defenseDateStatus booleano no combo box
Browse files Browse the repository at this point in the history
  • Loading branch information
lubien committed Jun 27, 2019
1 parent 494399d commit 6a9c7e5
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions components/studentComboBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@
<strong>Orientador:</strong> <span>{{ studentData.advisor }}</span>
<br />
<strong>Status:</strong> <span>{{ displayStatus }}</span> <br />
<strong>{{ defenseDateStatus }}</strong
<strong>{{ hasDefended ? 'Defendeu em' : 'Data da defesa' }}</strong
><br />
<b-field>
<Datepicker
v-model="studentData.defenseDate"
:max-date="
defenseDateStatus === 'Defendeu em' ? new Date() : undefined
"
:max-date="hasDefended ? new Date() : undefined"
:disabled="!canEdit"
/>
</b-field>
Expand Down Expand Up @@ -222,14 +220,11 @@ export default {
return this.getStatus(this.studentData)
},
defenseDateStatus() {
hasDefended() {
const isGraduating = this.studentData.isGraduating === 1
const isForming = this.studentData.isForming
const isForming = this.studentData.isForming === 1
if (isGraduating || isForming === 1) {
return 'Defendeu em'
}
return 'Data de Defesa'
return isGraduating || isForming
},
cdCheck: {
Expand Down

0 comments on commit 6a9c7e5

Please sign in to comment.