Remove unused code from the totals box functionality that has been since removed
This commit is contained in:
parent
f5ce35187b
commit
46345657c7
@ -31,14 +31,6 @@ export default {
|
|||||||
type: Number,
|
type: Number,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
initialObligated: {
|
|
||||||
type: Number,
|
|
||||||
default: null,
|
|
||||||
},
|
|
||||||
initialTotal: {
|
|
||||||
type: Number,
|
|
||||||
default: null,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
|
||||||
data: function() {
|
data: function() {
|
||||||
@ -48,14 +40,10 @@ export default {
|
|||||||
return {
|
return {
|
||||||
clins,
|
clins,
|
||||||
clinIndex,
|
clinIndex,
|
||||||
obligated: this.initialObligated || 0,
|
|
||||||
total: this.initialTotal || 0,
|
|
||||||
clinChildren: {},
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted: function() {
|
mounted: function() {
|
||||||
this.$root.$on('clin-change', this.calculateClinAmounts)
|
|
||||||
this.$root.$on('remove-clin', this.handleRemoveClin)
|
this.$root.$on('remove-clin', this.handleRemoveClin)
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -75,24 +63,6 @@ export default {
|
|||||||
|
|
||||||
this.validateForm()
|
this.validateForm()
|
||||||
},
|
},
|
||||||
|
|
||||||
calculateClinAmounts: function(event) {
|
|
||||||
this.clinChildren[event.id] = {
|
|
||||||
amount: event.amount,
|
|
||||||
type: event.clinType,
|
|
||||||
}
|
|
||||||
|
|
||||||
let newTotal = 0
|
|
||||||
let newObligated = 0
|
|
||||||
Object.values(this.clinChildren).forEach(function(clin) {
|
|
||||||
newTotal += clin.amount
|
|
||||||
if (clin.type.includes('1') || clin.type.includes('3')) {
|
|
||||||
newObligated += clin.amount
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.total = newTotal
|
|
||||||
this.obligated = newObligated
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
|
||||||
directives: {
|
directives: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user