All mock reporting data was moved to a JSON file. The concept of what JEDI CLIN a particular environment drew money from was added to the data. This change had a cascade effect to the reporting class methods, templates, and Vue components that ingested that reporting data. Many of these files were modified to adapt to these changes. This also included modifying the obligated funding bar graphs to reflect new design changes.
37 lines
766 B
JavaScript
37 lines
766 B
JavaScript
import { set } from 'vue/dist/vue'
|
|
import { formatDollars } from '../../lib/dollars'
|
|
import { set as _set } from 'lodash'
|
|
|
|
export default {
|
|
name: 'spend-table',
|
|
|
|
props: {
|
|
applications: Array,
|
|
},
|
|
|
|
data: function() {
|
|
return {
|
|
applicationsState: this.applications,
|
|
}
|
|
},
|
|
|
|
created: function() {
|
|
this.applicationsState.forEach(application => {
|
|
application.isVisible = false
|
|
})
|
|
},
|
|
|
|
methods: {
|
|
toggle: function(e, applicationIndex) {
|
|
set(this.applicationsState, applicationIndex, {
|
|
...this.applicationsState[applicationIndex],
|
|
isVisible: !this.applicationsState[applicationIndex].isVisible,
|
|
})
|
|
},
|
|
|
|
formatDollars: function(value) {
|
|
return formatDollars(value, false)
|
|
},
|
|
},
|
|
}
|