Add CLINs to Task Order

This commit is contained in:
leigh-mil
2019-06-05 19:11:33 -04:00
parent 36200e01ad
commit cca101b50c
4 changed files with 167 additions and 3 deletions

View File

@@ -0,0 +1,40 @@
import ClinFields from '../clin_fields'
import DateSelector from '../date_selector'
import FormMixin from '../../mixins/form'
import optionsinput from '../options_input'
import textinput from '../text_input'
export default {
name: 'to-form',
mixins: [FormMixin],
components: {
ClinFields,
DateSelector,
optionsinput,
textinput,
},
props: {
initialClinCount: String,
},
data: function() {
const clins = this.initialClinCount == 0 ? [''] : []
return {
clins,
clinCount: this.initalClinCount - 1,
}
// pass initialCLINIndex in props and add one each time a clin is added...
// this way we can keep track of the clin id for the html name/id/etc
},
methods: {
addClin: function(event) {
this.clins.push('')
this.clinCount = this.clinCount + 1
},
},
}