atst/js/components/forms/ccpo_approval.js
2018-09-28 09:48:41 -04:00

35 lines
612 B
JavaScript

import textinput from '../text_input'
import LocalDatetime from '../local_datetime'
export default {
name: 'ccpo-approval',
components: {
textinput,
LocalDatetime
},
props: {
initialState: String
},
data: function () {
return {
approving: this.initialState === 'approving',
denying: this.initialState === 'denying'
}
},
methods: {
setReview: function (e) {
if (e.target.value === 'approving') {
this.approving = true
this.denying = false
} else {
this.approving = false
this.denying = true
}
},
}
}