Merge branch 'master' into ui/reports-spend-table
This commit is contained in:
46
js/components/forms/new_project.js
Normal file
46
js/components/forms/new_project.js
Normal file
@@ -0,0 +1,46 @@
|
||||
import textinput from '../text_input'
|
||||
|
||||
export default {
|
||||
name: 'new-project',
|
||||
|
||||
components: {
|
||||
textinput
|
||||
},
|
||||
|
||||
props: {
|
||||
initialData: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
|
||||
data: function () {
|
||||
const {
|
||||
name,
|
||||
description,
|
||||
environments = ['']
|
||||
} = this.initialData
|
||||
|
||||
return {
|
||||
name,
|
||||
description,
|
||||
environments,
|
||||
}
|
||||
},
|
||||
|
||||
mounted: function () {
|
||||
this.$root.$on('onEnvironmentAdded', this.addEnvironment)
|
||||
},
|
||||
|
||||
methods: {
|
||||
addEnvironment: function (event) {
|
||||
this.environments.push('')
|
||||
},
|
||||
|
||||
removeEnvironment: function (index) {
|
||||
if (this.environments.length > 1) {
|
||||
this.environments.splice(index, 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -9,6 +9,7 @@ import DetailsOfUse from './components/forms/details_of_use'
|
||||
import poc from './components/forms/poc'
|
||||
import financial from './components/forms/financial'
|
||||
import toggler from './components/toggler'
|
||||
import NewProject from './components/forms/new_project'
|
||||
|
||||
Vue.use(VTooltip)
|
||||
|
||||
@@ -22,6 +23,7 @@ const app = new Vue({
|
||||
DetailsOfUse,
|
||||
poc,
|
||||
financial,
|
||||
NewProject
|
||||
},
|
||||
methods: {
|
||||
closeModal: function(name) {
|
||||
|
Reference in New Issue
Block a user