Create upload macro
This commit is contained in:
@@ -4,6 +4,7 @@ import { conformToMask } from 'vue-text-mask'
|
||||
import FormMixin from '../../mixins/form'
|
||||
import textinput from '../text_input'
|
||||
import optionsinput from '../options_input'
|
||||
import uploadinput from '../upload_input'
|
||||
|
||||
export default {
|
||||
name: 'funding',
|
||||
@@ -13,6 +14,7 @@ export default {
|
||||
components: {
|
||||
textinput,
|
||||
optionsinput,
|
||||
uploadinput,
|
||||
},
|
||||
|
||||
props: {
|
||||
@@ -32,7 +34,6 @@ export default {
|
||||
clin_02 = 0,
|
||||
clin_03 = 0,
|
||||
clin_04 = 0,
|
||||
csp_estimate,
|
||||
} = this.initialData
|
||||
|
||||
return {
|
||||
@@ -40,7 +41,6 @@ export default {
|
||||
clin_02,
|
||||
clin_03,
|
||||
clin_04,
|
||||
showUpload: !csp_estimate || this.uploadErrors.length > 0,
|
||||
}
|
||||
},
|
||||
|
||||
@@ -63,9 +63,6 @@ export default {
|
||||
},
|
||||
|
||||
methods: {
|
||||
showUploadInput: function() {
|
||||
this.showUpload = true
|
||||
},
|
||||
updateBudget: function() {
|
||||
document.querySelector('#to-target').innerText = this.totalBudgetStr
|
||||
},
|
||||
|
@@ -6,7 +6,7 @@ import textinput from './text_input'
|
||||
import optionsinput from './options_input'
|
||||
|
||||
export default {
|
||||
name: 'upload',
|
||||
name: 'uploadinput',
|
||||
|
||||
mixins: [FormMixin],
|
||||
|
||||
@@ -17,8 +17,7 @@ export default {
|
||||
|
||||
props: {
|
||||
initialData: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
type: String,
|
||||
},
|
||||
uploadErrors: {
|
||||
type: Array,
|
||||
@@ -27,7 +26,7 @@ export default {
|
||||
},
|
||||
|
||||
data: function() {
|
||||
const { pdf } = this.initialData
|
||||
const pdf = this.initialData
|
||||
|
||||
return {
|
||||
showUpload: !pdf || this.uploadErrors.length > 0,
|
@@ -20,7 +20,7 @@ import NewApplication from './components/forms/new_application'
|
||||
import EditEnvironmentRole from './components/forms/edit_environment_role'
|
||||
import EditApplicationRoles from './components/forms/edit_application_roles'
|
||||
import funding from './components/forms/funding'
|
||||
import upload from './components/upload'
|
||||
import uploadinput from './components/upload_input'
|
||||
import Modal from './mixins/modal'
|
||||
import selector from './components/selector'
|
||||
import BudgetChart from './components/charts/budget_chart'
|
||||
@@ -65,7 +65,7 @@ const app = new Vue({
|
||||
RequestsList,
|
||||
ConfirmationPopover,
|
||||
funding,
|
||||
upload,
|
||||
uploadinput,
|
||||
DateSelector,
|
||||
EditOfficerForm,
|
||||
},
|
||||
|
Reference in New Issue
Block a user