diff --git a/js/components/forms/to_form.js b/js/components/forms/to_form.js index 1118f8e7..9fe18b27 100644 --- a/js/components/forms/to_form.js +++ b/js/components/forms/to_form.js @@ -31,14 +31,6 @@ export default { type: Number, default: null, }, - initialObligated: { - type: Number, - default: null, - }, - initialTotal: { - type: Number, - default: null, - }, }, data: function() { @@ -48,14 +40,10 @@ export default { return { clins, clinIndex, - obligated: this.initialObligated || 0, - total: this.initialTotal || 0, - clinChildren: {}, } }, mounted: function() { - this.$root.$on('clin-change', this.calculateClinAmounts) this.$root.$on('remove-clin', this.handleRemoveClin) }, @@ -75,24 +63,6 @@ export default { 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: {