atst/js/components/forms/ccpo_approval.js
2019-01-24 09:38:43 -05:00

35 lines
614 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
}
},
},
}