Feat(SQL, UI): Button Icons page, Command Button Links page created with get and set functionality.

This commit is contained in:
2025-07-17 18:58:06 +01:00
parent e0805ec2ed
commit 4e214c3bde
151 changed files with 12224 additions and 463 deletions

View File

@@ -79,6 +79,16 @@ class Command(SQLAlchemy_ABC, Base):
# command.created_on = query_row[7]
command.command_category = Command_Category.from_db_dog_command_link(query_row) # this is done in datastore get many method using category dictionary
return command
@classmethod
def from_db_command_button_link(cls, query_row):
_m = f'{cls.__qualname__}.from_db_command_button_link'
command = cls()
command.id_command = query_row[3]
command.name = query_row[4]
command.active = True
command.command_category = Command_Category.from_db_command_button_link(query_row)
return command
@classmethod
def from_json(cls, json):
@@ -86,7 +96,7 @@ class Command(SQLAlchemy_ABC, Base):
command = cls()
if json is None: return command
# Helper_App.console_log(f'{_m}\njson: {json}')
command.id_command = -1
command.id_command = json.get(Command.ATTR_ID_COMMAND, -1)
command.id_command_category = json[Command_Category.ATTR_ID_COMMAND_CATEGORY]
command.name = json[cls.FLAG_NAME]
command.hand_signal_default_description = json[cls.FLAG_HAND_SIGNAL_DEFAULT_DESCRIPTION]