From 46345657c7d53440938c10f0b2c3802c852b0fff Mon Sep 17 00:00:00 2001 From: leigh-mil Date: Wed, 4 Sep 2019 14:01:17 -0400 Subject: [PATCH] Remove unused code from the totals box functionality that has been since removed --- js/components/forms/to_form.js | 30 ------------------------------ 1 file changed, 30 deletions(-) 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: {