Feat(SQL, UI): 1. Dog Command Links page completed with get + set functionality. \n 2. Commands page and Command Categories page completed with get + set functionality.

This commit is contained in:
2025-07-09 17:42:43 +01:00
parent 660b15cb8f
commit 28158cb0c4
68 changed files with 3302 additions and 3926 deletions

View File

@@ -0,0 +1,73 @@
{% extends 'layouts/layout.html' %}
{% block page_body %}
<link rel="stylesheet" href="{{ url_for('static', filename='dist/css/dog_command_categories.bundle.css') }}">
<form id="{{ model.ID_FORM_FILTERS }}" class="{{ model.FLAG_FILTER }} {{ model.FLAG_ROW }} {{ model.FLAG_CARD }}">
{{ model.form_filters.hidden_tag() }}
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_COLUMN }}">
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}">
<div class="{{ model.FLAG_CONTAINER_INPUT }} {{ model.FLAG_COLUMN }} {{ model.FLAG_FILTER }} {{ model.FLAG_SEARCH }}">
{{ model.form_filters.search.label }}
{{ model.form_filters.search() }}
{% for error in model.form_filters.search.errors %}
<p class="error">{{ error }}</p>
{% endfor %}
</div>
<div class="{{ model.FLAG_CONTAINER_INPUT }} {{ model.FLAG_COLUMN }} {{ model.FLAG_FILTER }} {{ model.FLAG_ACTIVE_ONLY }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ model.form_filters.active_only.data }}">
{{ model.form_filters.active_only.label }}
{{ model.form_filters.active_only() }}
{% for error in model.form_filters.active_only.errors %}
<p class="error">{{ error }}</p>
{% endfor %}
{% set class_name = model.FLAG_FILTER + ' ' + model.FLAG_ACTIVE_ONLY + ' ' + model.FLAG_CHECKBOX %}
{% include 'components/common/buttons/_icon_checkbox.html' %}
</div>
</div>
</div>
{% set block_id = 'buttons_table_default' %}
{% include 'components/common/buttons/_buttons_save_cancel.html' %}
</form>
<table id="{{ model.ID_TABLE_MAIN }}" class="{{ model.FLAG_ROW }} {{ model.FLAG_CARD }} {{ model.FLAG_COMMAND_CATEGORY }}">
<thead>
<tr class="{{ model.FLAG_COMMAND_CATEGORY }}">
<th class="{{ model.FLAG_CODE }}">Code</th>
<th class="{{ model.FLAG_NAME }}">Name</th>
<th class="{{ model.FLAG_ACTIVE }}">
{% set class_name = model.FLAG_ACTIVE %}
{% set attribute_text = '' %}
{% include 'components/common/buttons/_icon_add.html' %}
</th>
</tr>
</thead>
<tbody>
{% set is_blank_row = False %}
{% for command_category in model.command_categories %}
{% include 'components/dog/_row_command_category.html' %}
{% endfor %}
{% set is_blank_row = True %}
{% include 'components/dog/_row_command_category.html' %}
</tbody>
</table>
{% include 'components/common/temporary/_overlay_confirm.html' %}
{% include 'components/common/temporary/_overlay_error.html' %}
<div id="{{ model.ID_CONTAINER_TEMPLATE_ELEMENTS }}">
<!-- Active column -->
<!-- Delete -->
{% set class_name = '' %}
{% include 'components/common/buttons/_icon_trash.html' %}
<!-- Undelete -->
{% set class_name = model.FLAG_ACTIVE %}
{% set attribute_text = '' %}
{% include 'components/common/buttons/_icon_add.html' %}
</div>
<script src="{{ url_for('routes_dog.scripts_section_dog') }}"></script>
<script>
</script>
{% endblock %}

View File

@@ -0,0 +1,89 @@
{% extends 'layouts/layout.html' %}
{% block page_body %}
<link rel="stylesheet" href="{{ url_for('static', filename='dist/css/dog_commands.bundle.css') }}">
<form id="{{ model.ID_FORM_FILTERS }}" class="{{ model.FLAG_FILTER }} {{ model.FLAG_ROW }} {{ model.FLAG_CARD }}">
{{ model.form_filters.hidden_tag() }}
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_COLUMN }}">
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}">
<div class="{{ model.FLAG_CONTAINER_INPUT }} {{ model.FLAG_COLUMN }} {{ model.FLAG_FILTER }} {{ model.FLAG_SEARCH }}">
{{ model.form_filters.search.label }}
{{ model.form_filters.search() }}
{% for error in model.form_filters.search.errors %}
<p class="error">{{ error }}</p>
{% endfor %}
</div>
<div class="{{ model.FLAG_CONTAINER_INPUT }} {{ model.FLAG_COLUMN }} {{ model.FLAG_FILTER }} {{ model.ATTR_ID_COMMAND_CATEGORY }}">
{{ model.form_filters.id_command_category.label }}
{{ model.form_filters.id_command_category() }}
{% for error in model.form_filters.id_command_category.errors %}
<p class="error">{{ error }}</p>
{% endfor %}
</div>
<div class="{{ model.FLAG_CONTAINER_INPUT }} {{ model.FLAG_COLUMN }} {{ model.FLAG_FILTER }} {{ model.FLAG_ACTIVE_ONLY }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ model.form_filters.active_only.data }}">
{{ model.form_filters.active_only.label }}
{{ model.form_filters.active_only() }}
{% for error in model.form_filters.active_only.errors %}
<p class="error">{{ error }}</p>
{% endfor %}
{% set class_name = model.FLAG_FILTER + ' ' + model.FLAG_ACTIVE_ONLY + ' ' + model.FLAG_CHECKBOX %}
{% include 'components/common/buttons/_icon_checkbox.html' %}
</div>
</div>
</div>
{% set block_id = 'buttons_table_default' %}
{% include 'components/common/buttons/_buttons_save_cancel.html' %}
</form>
<table id="{{ model.ID_TABLE_MAIN }}" class="{{ model.FLAG_ROW }} {{ model.FLAG_CARD }} {{ model.FLAG_COMMAND }}">
<thead>
<tr class="{{ model.FLAG_COMMAND }}">
<th class="{{ model.FLAG_COMMAND_CATEGORY }}">Command Category</th>
<th class="{{ model.FLAG_NAME }}">Command</th>
<th class="{{ model.FLAG_HAND_SIGNAL_DEFAULT_DESCRIPTION }}">Default Hand Signal</th>
<th class="{{ model.FLAG_CAN_HAVE_BUTTON }}">Can Have Button?</th>
<th class="{{ model.FLAG_NOTES }}">Notes</th>
<th class="{{ model.FLAG_ACTIVE }}">
{% set class_name = model.FLAG_ACTIVE %}
{% set attribute_text = '' %}
{% include 'components/common/buttons/_icon_add.html' %}
</th>
</tr>
</thead>
<tbody>
{% set is_blank_row = False %}
{% for command in model.commands %}
{% include 'components/dog/_row_command.html' %}
{% endfor %}
{% set is_blank_row = True %}
{% include 'components/dog/_row_command.html' %}
</tbody>
</table>
{% include 'components/common/temporary/_overlay_confirm.html' %}
{% include 'components/common/temporary/_overlay_error.html' %}
<div id="{{ model.ID_CONTAINER_TEMPLATE_ELEMENTS }}">
<!-- Active column -->
<!-- Delete -->
{% set class_name = '' %}
{% include 'components/common/buttons/_icon_trash.html' %}
<!-- Undelete -->
{% set class_name = model.FLAG_ACTIVE %}
{% set attribute_text = '' %}
{% include 'components/common/buttons/_icon_add.html' %}
</div>
<script src="{{ url_for('routes_dog.scripts_section_dog') }}"></script>
<script>
{#
var dogCommandLinks = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.dog_command_links) | tojson | safe }};
#}
var filterCommandCategories = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.filter_command_categories) | tojson | safe }};
var flagCanHaveButton = "{{ model.FLAG_CAN_HAVE_BUTTON }}";
var flagHandSignalDefaultDescription = "{{ model.FLAG_HAND_SIGNAL_DEFAULT_DESCRIPTION }}";
</script>
{% endblock %}

View File

@@ -93,15 +93,12 @@
<script src="{{ url_for('routes_dog.scripts_section_dog') }}"></script>
<script>
{#
var dogCommandLinks = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.dog_command_links) | tojson | safe }};
#}
var filterCommandCategories = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.filter_command_categories) | tojson | safe }};
var filterCommands = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.filter_commands) | tojson | safe }};
var filterDogCommandLinks = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.filter_dog_command_links) | tojson | safe }};
var filterDogs = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.filter_dogs) | tojson | safe }};
var flagHandSignalDescription = "{{ model.FLAG_HAND_SIGNAL_DESCRIPTION }}";
{#
var accessLevels = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.access_levels) | tojson | safe }};
var flagIsNotEmpty = "{{ model.FLAG_IS_NOT_EMPTY }}";
#}
</script>
{% endblock %}

View File

@@ -9,13 +9,16 @@
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_COLUMN }}">
<h2>Dog</h2>
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}">
<button class="{{ model.FLAG_NAV_DOG_DOGS }}">Dogs</button>
<button class="{{ model.FLAG_NAV_DOG_DOGS }} {{ model.FLAG_BUTTON }} {{ model.FLAG_BUTTON_PRIMARY }}">Dogs</button>
</div>
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}">
<button class="{{ model.FLAG_NAV_DOG_COMMANDS }}">Commands</button>
<button class="{{ model.FLAG_NAV_DOG_COMMAND_CATEGORIES }} {{ model.FLAG_BUTTON }} {{ model.FLAG_BUTTON_PRIMARY }}">Command Categories</button>
</div>
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}">
<button class="{{ model.FLAG_NAV_DOG_DOG_COMMAND_LINKS }}">Dog Command Links</button>
<button class="{{ model.FLAG_NAV_DOG_COMMANDS }} {{ model.FLAG_BUTTON }} {{ model.FLAG_BUTTON_PRIMARY }}">Commands</button>
</div>
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}">
<button class="{{ model.FLAG_NAV_DOG_DOG_COMMAND_LINKS }} {{ model.FLAG_BUTTON }} {{ model.FLAG_BUTTON_PRIMARY }}">Dog Command Links</button>
</div>
</div>
</div>