Funding type other input is only required if funding type is other
This commit is contained in:
41
js/components/forms/financial.js
Normal file
41
js/components/forms/financial.js
Normal file
@@ -0,0 +1,41 @@
|
||||
import optionsinput from '../options_input'
|
||||
import textinput from '../text_input'
|
||||
|
||||
export default {
|
||||
name: 'financial',
|
||||
|
||||
components: {
|
||||
optionsinput,
|
||||
textinput,
|
||||
},
|
||||
|
||||
props: {
|
||||
initialData: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
|
||||
data: function () {
|
||||
const {
|
||||
funding_type = ""
|
||||
} = this.initialData
|
||||
|
||||
return {
|
||||
funding_type
|
||||
}
|
||||
},
|
||||
|
||||
mounted: function () {
|
||||
this.$root.$on('field-change', this.handleFieldChange)
|
||||
},
|
||||
|
||||
methods: {
|
||||
handleFieldChange: function (event) {
|
||||
const { value, name } = event
|
||||
if (typeof this[name] !== undefined) {
|
||||
this[name] = value
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
@@ -7,6 +7,7 @@ import textinput from './components/text_input'
|
||||
import checkboxinput from './components/checkbox_input'
|
||||
import DetailsOfUse from './components/forms/details_of_use'
|
||||
import poc from './components/forms/poc'
|
||||
import financial from './components/forms/financial'
|
||||
|
||||
Vue.use(VTooltip)
|
||||
|
||||
@@ -19,6 +20,7 @@ const app = new Vue({
|
||||
checkboxinput,
|
||||
DetailsOfUse,
|
||||
poc,
|
||||
financial,
|
||||
},
|
||||
methods: {
|
||||
closeModal: function(name) {
|
||||
|
Reference in New Issue
Block a user