altinn_editor module

class AltinnSkjemadataEditor(time_units, variable_connection, conn)

Bases: AltinnComponents

A tab for editing skjemadata.

This module provides: - A sidebar what contains information about the enhet - How many forms the enhet has sent to SSB, with a unique version ID and a datetime. - An editable table that contains the skjemadata. - Kontrollutslag, kontaktinformasjon etc-

Parameters:
  • time_units (list[str])

  • variable_connection (dict)

  • conn (object)

label

The label for the tab, set to “🗊 skjemadata_viewer”.

Type:

str

conn

EimerDB

Type:

eimerdb

layout()

Generates the layout for the skjemadataViewer tab.

callbacks()

Registers the Dash callbacks for handling user interactions.

Return type:

None

callbacks()

Register Dash callbacks for the Pi memorizer tab.

Return type:

None

Notes

  • The update_input callback handles the interaction between the numeric keypad and the current sequence, score, and high score.

create_callback_components(input_type='Input')

Generates a list of dynamic Dash Input or State components.

create_partition_select(skjema=None, **kwargs)
get_skjemadata_table_names()

Retrieves the names of all the skjemadata-tables in the eimerdb.

update_partition_select(partition_dict, key_to_update)

Updates the dictionary by adding the previous value (N-1) to the list for a single specified key.

Parameters:
  • partition_dict – Dictionary containing lists of values

  • key_to_update – Key to update by appending (N-1)

Returns:

Updated dictionary