Pull out unecessary events from clin_fields
This commit is contained in:
parent
8b0d9fb9d2
commit
5d3aa41431
@ -68,8 +68,8 @@ export default {
|
|||||||
: undefined
|
: undefined
|
||||||
const fundingValidation =
|
const fundingValidation =
|
||||||
this.initialObligated && this.initialTotal
|
this.initialObligated && this.initialTotal
|
||||||
? false
|
? this.initialObligated <= this.initialTotal
|
||||||
: this.initialObligated <= this.initialTotal
|
: true
|
||||||
const popValidation = !this.initialStartDate ? false : start < end
|
const popValidation = !this.initialStartDate ? false : start < end
|
||||||
const clinNumber = !!this.initialClinNumber
|
const clinNumber = !!this.initialClinNumber
|
||||||
? this.initialClinNumber
|
? this.initialClinNumber
|
||||||
@ -118,6 +118,7 @@ export default {
|
|||||||
|
|
||||||
mounted: function() {
|
mounted: function() {
|
||||||
this.$root.$on('field-change', this.handleFieldChange)
|
this.$root.$on('field-change', this.handleFieldChange)
|
||||||
|
this.validateFunding()
|
||||||
},
|
},
|
||||||
|
|
||||||
created: function() {
|
created: function() {
|
||||||
@ -131,16 +132,6 @@ export default {
|
|||||||
name: 'clins-' + this.clinIndex + '-' + POP,
|
name: 'clins-' + this.clinIndex + '-' + POP,
|
||||||
valid: this.checkPopValid(),
|
valid: this.checkPopValid(),
|
||||||
})
|
})
|
||||||
emitEvent('field-mount', this, {
|
|
||||||
optional: false,
|
|
||||||
name: TOTAL_AMOUNT,
|
|
||||||
valid: this.checkFundingValid(),
|
|
||||||
})
|
|
||||||
emitEvent('field-mount', this, {
|
|
||||||
optional: false,
|
|
||||||
name: OBLIGATED_AMOUNT,
|
|
||||||
valid: this.checkFundingValid(),
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
@ -204,11 +195,6 @@ export default {
|
|||||||
if (this.totalAmount && this.obligatedAmount) {
|
if (this.totalAmount && this.obligatedAmount) {
|
||||||
this.fundingValid = this.checkFundingValid()
|
this.fundingValid = this.checkFundingValid()
|
||||||
}
|
}
|
||||||
|
|
||||||
emitEvent('field-change', this, {
|
|
||||||
name: OBLIGATED_AMOUNT,
|
|
||||||
valid: this.checkFundingValid(),
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
handleFieldChange: function(event) {
|
handleFieldChange: function(event) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user