Skip to content

Commit

Permalink
fix: Bug 20240705 - Wrong company info after year selection
Browse files Browse the repository at this point in the history
  • Loading branch information
gaudinnicolas committed Jul 5, 2024
1 parent 898a29e commit 81e6664
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions app/pages/company/company.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ def update_viz(state: State):


def update_viz_company(state: State):
# print(f'update viz company : {state.selected_company}')
# print(f'update_viz_company state id : {get_state_id(state)}')
# print(f'update_viz_company state.selected_year: {state.selected_year}')
# print(f'update_viz_company state.selected_company: {state.selected_company}')

id = "company_sector"
state.viz[id] = Viz(
Expand Down Expand Up @@ -157,8 +159,9 @@ def update_viz_company(state: State):


def update_viz_year(state: State):
# # same order as previous code
# print(f'update viz financial : {state.selected_company}')
# print(f'update_viz_year state id : {get_state_id(state)}')
# print(f'update_viz_year state.selected_year: {state.selected_year}')
# print(f'update_viz_year state.selected_company: {state.selected_company}')

# Transparency
id = "fin_transparency_score"
Expand Down Expand Up @@ -280,14 +283,16 @@ def update_viz_year(state: State):

# Update data and figures when the selected company changes
def on_change_company(state: State):
# print("Chosen company: ", state.selected_company)
# print("on_change_company state.selected_company: ", state.selected_company)
# print("on_change_company state.selected_year: ", state.selected_year)
update_full(state)


# Update data and figures when the selected year changes
def on_change_year(state: State):
# print("Chosen year: ", state.selected_year)
update_viz_year(state)
# print("on_change_year state.selected_company: ", state.selected_company)
# print("on_change_year state.selected_year: ", state.selected_year)
update_viz(state)


# Generate page from Markdown file
Expand Down

0 comments on commit 81e6664

Please sign in to comment.