atst/js/components/forms/financial.js
2018-10-23 11:45:09 -04:00

47 lines
811 B
JavaScript

import FormMixin from '../../mixins/form'
import optionsinput from '../options_input'
import textinput from '../text_input'
export default {
name: 'financial',
mixins: [FormMixin],
components: {
optionsinput,
textinput,
},
props: {
initialData: {
type: Object,
default: () => ({})
}
},
data: function () {
const {
funding_type = ""
} = this.initialData
return {
funding_type,
shouldForceShowTaskOrder: false
}
},
computed: {
showTaskOrder: function() {
return this.initialData.task_order.number || this.shouldForceShowTaskOrder
}
},
methods: {
forceShowTaskOrder: function(e) {
console.log("forceShowTaskOrder", e)
e.preventDefault()
this.shouldForceShowTaskOrder = true
}
}
}