Skip to content

Commit

Permalink
fix all imports
Browse files Browse the repository at this point in the history
  • Loading branch information
katrina-cityofdetroit committed Jul 29, 2024
1 parent d97d4e4 commit 3ac5db4
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 16 deletions.
7 changes: 5 additions & 2 deletions src/js/components/accordion/accordion.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import './accordion.css'

import { Baseline, CurrentFund, Fund, Supplemental } from "../../utils/data_utils/local_storage_handlers.js";
import Baseline from '../../models/baseline.js';
import CurrentFund from '../../models/current_fund.js';
import Fund from '../../models/fund.js';
import Supplemental from '../../models/supplemental.js';
import { formatCurrency, cleanString } from "../../utils/common_utils.js";
import Table from "../table/table.js";
import { FundLookupTable } from "../../utils/data_utils/budget_data_handlers.js";
import FundLookupTable from '../../models/fund_lookup_table.js';
import { visitPage } from '../../views/view_logic.js';
import { TARGET } from '../../init.js';

Expand Down
5 changes: 2 additions & 3 deletions src/js/components/table/subcomponents/data.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FundLookupTable } from "../../../utils/data_utils/budget_data_handlers.js";
import FundLookupTable from '../../../models/fund_lookup_table.js';
import CurrentFund from '../../../models/current_fund.js'
import CurrentPage from '../../../models/current_page.js'

Expand Down Expand Up @@ -45,9 +45,8 @@ async function loadFromStorage(){
}
// load from local storage
const data = localStorage.getItem(key);

// if nothing in storage, return a zero
if ( data == '' || data == '[]' ) {
if ( !data ) {
return 0;
};
// otherwise, fill table in HTML and return success (1)
Expand Down
3 changes: 2 additions & 1 deletion src/js/components/tooltip/tooltip.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { FISCAL_YEAR } from '../../init';
import Cell from '../table/subcomponents/cells';
import { formatCurrency } from '../../utils/common_utils';
import CurrentPage from '../../models/current_page';

import './tooltip.css'
import { CurrentFund, CurrentPage } from '../../utils/data_utils/local_storage_handlers';

function hideTooltip() {
document.getElementById('tooltip').style.visibility = 'hidden';
Expand Down
3 changes: 2 additions & 1 deletion src/js/models/fund.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@

import { colSum } from "../utils/common_utils";
import { FISCAL_YEAR } from "../init";

// Class to hold information on a specific fund and table
class StoredTable {
constructor(page, fund){
this.name = `${page}_${fund}`;
this.page = page;
this.table = loadTableData(this.name);
this.table = JSON.parse(localStorage.getItem(this.name));
}

totalCol() {
Expand Down
3 changes: 2 additions & 1 deletion src/js/models/supplemental.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@

import Initiative from "./initiative.js";
import { colSum } from "../utils/common_utils.js";

// data structure to hold supplemental requests
export class Supplemental {
constructor() {
this.table = loadTableData('new-inits');
this.table = JSON.parse(localStorage.getItem(this.name));
this.initiatives = [];
if(this.table){
this.table.forEach((row) => {
Expand Down
3 changes: 2 additions & 1 deletion src/js/utils/data_utils/XLSX_handlers.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@


import { SHEETS } from '../../init.js';
import { FundLookupTable, Services } from './budget_data_handlers.js';
import FundLookupTable from '../../models/fund_lookup_table.js';
import { Services } from './budget_data_handlers.js';
import { removeNewLines } from '../common_utils.js';
import { Baseline } from './local_storage_handlers.js';

Expand Down
2 changes: 1 addition & 1 deletion src/js/views/02_baseline_landing.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import NavButtons from "../components/nav_buttons/nav_buttons.js";
import Table from "../components/table/table.js";
import { View, ViewTable } from './view_class.js'
import { CurrentFund } from "../utils/data_utils/local_storage_handlers.js";
import CurrentFund from "../models/current_fund.js";

export class FundView extends View {

Expand Down
3 changes: 2 additions & 1 deletion src/js/views/04_personnel.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { View, ViewTable } from './view_class.js'
import Table from "../components/table/table.js";
import Form from "../components/form/form.js";

import { Services, FundLookupTable } from "../utils/data_utils/budget_data_handlers.js";
import { Services } from "../utils/data_utils/budget_data_handlers.js";
import FundLookupTable from '../models/fund_lookup_table.js';
import { unformatCurrency } from "../utils/common_utils.js";

export class PersonnelView extends View {
Expand Down
4 changes: 3 additions & 1 deletion src/js/views/05_overtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import { View, ViewTable } from './view_class.js'
import Table from '../components/table/table.js';
import Form from '../components/form/form.js';

import { FundLookupTable, Services } from '../utils/data_utils/budget_data_handlers.js';
import FundLookupTable from '../models/fund_lookup_table.js';

import { Services } from '../utils/data_utils/budget_data_handlers.js';
import { unformatCurrency } from '../utils/common_utils.js';

export class OvertimeView extends View {
Expand Down
2 changes: 1 addition & 1 deletion src/js/views/06_nonpersonnel.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { View, ViewTable } from './view_class.js'
import Form from '../components/form/form.js';
import Table from '../components/table/table.js';
import { FundLookupTable } from '../utils/data_utils/budget_data_handlers.js';
import FundLookupTable from '../models/fund_lookup_table.js';
import { ObjectCategories, Services } from '../utils/data_utils/budget_data_handlers.js';
import { unformatCurrency } from '../utils/common_utils.js';

Expand Down
2 changes: 1 addition & 1 deletion src/js/views/07_new_initiatives.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { View, ViewTable } from './view_class.js'
import Table from "../components/table/table.js";
import Form from "../components/form/form.js";
import { FundLookupTable } from "../utils/data_utils/budget_data_handlers.js";
import FundLookupTable from '../models/fund_lookup_table.js';
import { FISCAL_YEAR } from "../init.js";


Expand Down
3 changes: 2 additions & 1 deletion src/js/views/08_summary.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { CurrentFund, Baseline } from "../utils/data_utils/local_storage_handlers.js";
import CurrentFund from '../models/current_fund.js';
import Baseline from '../models/baseline.js';
import { TARGET } from '../init.js';
import { Accordion } from "../components/accordion/accordion.js";
import { visitPage } from "./view_logic.js";
Expand Down
2 changes: 1 addition & 1 deletion src/js/views/view_logic.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import NonPersonnelView from './06_nonpersonnel.js';
import InitiativesView from './07_new_initiatives.js';
import SummaryView from './08_summary.js';

import { FundLookupTable } from '../utils/data_utils/budget_data_handlers.js';
import FundLookupTable from '../models/fund_lookup_table.js';
import CurrentFund from '../models/current_fund.js';
import CurrentPage from '../models/current_page.js';
import { FISCAL_YEAR } from '../init.js';
Expand Down

0 comments on commit 3ac5db4

Please sign in to comment.