Feat: Assessment page completed with save method combining Assessment, Distraction, Assessment Command Modality Link, and Assessment Response save for creating new complete Assessnent.

This commit is contained in:
2025-07-28 22:41:38 +01:00
parent 1bbe6f0040
commit 574d60442a
122 changed files with 3261 additions and 1057 deletions

View File

@@ -75,7 +75,7 @@ class Dog_Command_Link(SQLAlchemy_ABC, Base):
dog_command_link.id_command = json[Command.ATTR_ID_COMMAND]
dog_command_link.hand_signal_description = json[cls.FLAG_HAND_SIGNAL_DESCRIPTION]
dog_command_link.notes = json[cls.FLAG_NOTES]
dog_command_link.active = json[cls.FLAG_ACTIVE]
dog_command_link.active = av.input_bool(json[cls.FLAG_ACTIVE], cls.FLAG_ACTIVE, _m)
dog_command_link.created_on = json.get(cls.FLAG_CREATED_ON, None)
# dog_command_link.id_command_category = json[Command_Category.FLAG_COMMAND_CATEGORY]
# Helper_App.console_log(f'Dog Command Link: {dog_command_link}')
@@ -221,21 +221,13 @@ class Parameters_Dog_Command_Link(Get_Many_Parameters_Base):
@classmethod
def from_form_filters_dog_command_link(cls, form):
_m = f'{cls.__qualname__}.from_form_filters_dog_command_link'
Helper_App.console_log(_m)
Helper_App.console_log(f'Filters: {form}')
av.val_instance(form, 'form', _m, Filters_Dog_Command_Link)
has_filter_search_text = not (form.search.data == '' or form.search.data is None)
has_filter_dog = not (form.id_dog.data == '0' or form.id_dog.data == '' or form.id_dog.data is None)
has_filter_command_category = not (form.id_command_category.data == '0' or form.id_command_category.data == '' or form.id_command_category.data is None)
has_filter_command = not (form.id_command.data == '0' or form.id_command.data == '' or form.id_command.data is None)
active_only = av.input_bool(form.active_only.data, "active", _m)
Helper_App.console_log(f'''
has_filter_search_text: {has_filter_search_text}
has_filter_dog: {has_filter_dog}
has_filter_command_category: {has_filter_command_category}
has_filter_command: {has_filter_command}
active_only: {active_only}
''')
filters = cls.get_default()
filters.get_all_link = True
filters.get_inactive_link = not active_only