bofregistry module¶
- class BofInformation(label=None, variableselector_foretak_name=None)¶
Bases:
ABCModule 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)
- 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
- abstractmethod 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,BofInformationA 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,BofInformationA 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