bofregistry module¶
- class BofInformation(label=None, variableselector_foretak_name=None)¶
Bases:
ABC
Module for displaying and managing information from BoF.
This component: - Displays detailed information about selected foretak using cards and ag-grids. - Interacts with sqlite files to display information for the currently selected foretak. - The sqlite files can be accessed from the oracle-hns shared bucket from the vof team.
- Parameters:
label (str | None)
variableselector_foretak_name (str | None)
- label¶
Label for the tab, displayed as “BoF Foretak”.
- Type:
str
- generate_card(title, component_id, var_type)¶
Generates a Dash Bootstrap card for displaying information.
- Parameters:
title (str)
component_id (str)
var_type (str)
- Return type:
Card
- layout()¶
Abstract method, needs to generate the layout for the BoF Foretak module.
- Return type:
Div | Tab
- callbacks()¶
Registers Dash callbacks for handling user interactions.
- generate_card(title, component_id, var_type)¶
Generate a Dash Bootstrap card for displaying data.
- Parameters:
title (str) – Title displayed in the card header.
component_id (str) – ID assigned to the input component inside the card.
var_type (str) – Input type for the component (e.g., “text”).
- Returns:
A styled card containing an input field.
- Return type:
dbc.Card
- abstract layout()¶
Define the layout for the BofInformation module.
This is an abstract method that must be implemented by subclasses to define the module’s layout.
- Returns:
A Dash HTML Div component representing the layout of the module or a dbc.Tab to be displayed directly.
- Return type:
html.Div | dbc.Tab
- module_callbacks()¶
Register Dash callbacks for the BoF Foretak tab.
- Return type:
None
Notes
The bof_data callback fetches and updates data in the cards based on the selected foretak.
- class BofInformationTab(label=None, variableselector_foretak_name=None)¶
Bases:
TabImplementation
,BofInformation
A class to implement a bof information module as a tab.
- Parameters:
label (str)
variableselector_foretak_name (str | None)
- class BofInformationWindow(label=None, variableselector_foretak_name=None)¶
Bases:
WindowImplementation
,BofInformation
A class to implement a bof information module as a window.
- Parameters:
label (str)
variableselector_foretak_name (str | None)
- ssb_bedrift_modal()¶
Create a modal for displaying bof data.
- Returns:
A modal component containing an AgGrid table for bof data.
- Return type:
dbc.Modal
- ssb_foretak_modal()¶
Create a modal for displaying bof data.
- Returns:
A modal component containing an AgGrid table for bof data.
- Return type:
dbc.Modal