diff --git a/js/components/accordion/accordion.js b/js/components/accordion/accordion.js index 7636c74..d3060a7 100644 --- a/js/components/accordion/accordion.js +++ b/js/components/accordion/accordion.js @@ -4,15 +4,17 @@ import { DATA_ROOT } from "../../init.js"; import { Fund } from "../../utils/data_utils/local_storage_handlers.js"; import { cleanString, formatCurrency } from "../../utils/common_utils.js"; import Table from "../table/table.js"; +import { FundLookupTable } from "../../utils/data_utils/budget_data_handlers.js"; const FundTable = { - table_id : (fund) => { return `table-${cleanString(fund)}` }, + table_id : (fund) => { return `table-${fund}` }, init : function(fund) { // create empty table and put it in the accordion var table = document.createElement('table'); table.id = this.table_id(fund); table.classList.add('accordion-table'); - var parent = document.querySelector(`#${cleanString(fund)}_content .accordion-body`); + console.log(document.querySelector('.accordion')); + var parent = document.querySelector(`#fund_${fund}_content .accordion-body`); parent.appendChild(table); }, createNewCell : function(content, row) { @@ -47,14 +49,14 @@ const FundTable = { const Item = { html : function(fund) { - var id = cleanString(fund); - return `