Replace ko_review template with new task order review

- deletes ko_review vue component
This commit is contained in:
Montana
2019-06-03 13:41:06 -04:00
parent 14a179a239
commit 67be7d99a4
5 changed files with 48 additions and 212 deletions

View File

@@ -1,52 +0,0 @@
import textinput from '../text_input'
import DateSelector from '../date_selector'
import uploadinput from '../upload_input'
import inputValidations from '../../lib/input_validations'
import FormMixin from '../../mixins/form'
const createLOA = number => ({ number })
export default {
name: 'ko-review',
mixins: [FormMixin],
components: {
textinput,
DateSelector,
uploadinput,
},
props: {
initialData: {
type: Object,
default: () => ({}),
},
modalName: String,
},
data: function() {
const loa_list = this.initialData['loas']
const loas = (loa_list.length > 0 ? loa_list : ['']).map(createLOA)
return {
loas,
}
},
mounted: function() {
this.$root.$on('onLOAAdded', this.addLOA)
},
methods: {
addLOA: function(event) {
this.loas.push(createLOA(''))
},
removeLOA: function(index) {
if (this.loas.length > 1) {
this.loas.splice(index, 1)
}
},
},
}

View File

@@ -35,7 +35,6 @@ import ConfirmationPopover from './components/confirmation_popover'
import { isNotInVerticalViewport } from './lib/viewport'
import DateSelector from './components/date_selector'
import SidenavToggler from './components/sidenav_toggler'
import KoReview from './components/forms/ko_review'
import BaseForm from './components/forms/base_form'
import DeleteConfirmation from './components/delete_confirmation'
import NewEnvironment from './components/forms/new_environment'
@@ -77,7 +76,6 @@ const app = new Vue({
DateSelector,
EditOfficerForm,
SidenavToggler,
KoReview,
BaseForm,
DeleteConfirmation,
nestedcheckboxinput,