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

@@ -1,15 +1,15 @@
{% if block_id == 'button_save' %}
<button id="{{ model.ID_BUTTON_SAVE }}" type="button" class="{{ model.FLAG_SUBMIT }} {{ model.FLAG_SAVE }}">Save</button>
<button id="{{ model.ID_BUTTON_SAVE }}" type="button" class="{{ model.FLAG_SUBMIT }} {{ model.FLAG_SAVE }} {{ model.FLAG_BUTTON }} {{ model.FLAG_BUTTON_PRIMARY }}">Save</button>
{% elif block_id == 'button_cancel' %}
<button id="{{ model.ID_BUTTON_CANCEL }}" type="button" class="{{ model.FLAG_CANCEL }}">Cancel</button>
<button id="{{ model.ID_BUTTON_CANCEL }}" type="button" class="{{ model.FLAG_CANCEL }} {{ model.FLAG_BUTTON }} {{ model.FLAG_BUTTON_PRIMARY }}">Cancel</button>
{% elif block_id == 'button_add' %}
<button type="button" class="{{ model.FLAG_ACTIVE }} {{ model.FLAG_ADD }}">+</button>
<button type="button" class="{{ model.FLAG_ACTIVE }} {{ model.FLAG_ADD }} {{ model.FLAG_BUTTON }} {{ model.FLAG_BUTTON_PRIMARY }}">+</button>
{% elif block_id == 'button_confirm' %}
<button id="{{ model.ID_BUTTON_CONFIRM }}" type="button" class="{{ model.FLAG_SUBMIT }}">Confirm</button>
<button id="{{ model.ID_BUTTON_CONFIRM }}" type="button" class="{{ model.FLAG_SUBMIT }} {{ model.FLAG_BUTTON }} {{ model.FLAG_BUTTON_PRIMARY }}">Confirm</button>
{% elif block_id == 'button_get_in_touch' %}
<button class="{{ model.FLAG_NAV_CONTACT }}" alt="Get in touch" aria-label="Get in touch">Get in touch</button>
<button class="{{ model.FLAG_NAV_CONTACT }} {{ model.FLAG_BUTTON }} {{ model.FLAG_BUTTON_PRIMARY }}" alt="Get in touch" aria-label="Get in touch">Get in touch</button>
{% elif block_id == 'button_apply_filters' %}
<button id="{{ model.ID_BUTTON_APPLY_FILTERS }}" type="button" class="{{ model.FLAG_SUBMIT }}">Apply filters</button>
<button id="{{ model.ID_BUTTON_APPLY_FILTERS }}" type="button" class="{{ model.FLAG_SUBMIT }} {{ model.FLAG_BUTTON }} {{ model.FLAG_BUTTON_PRIMARY }}">Apply filters</button>
{% elif block_id == 'button_clear_filters' %}
{% elif block_id == 'buttons_table_default' %}
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_COLUMN }}">

View File

@@ -1,4 +1,4 @@
<div class="{{ model.FLAG_OVERLAY }} {{ model.FLAG_COLLAPSED }} {{ model.FLAG_CARD }}" id="{{ model.ID_OVERLAY_CONFIRM }}" style="visibility: hidden;" z-index="2">
<div class="{{ model.FLAG_OVERLAY }} {{ model.FLAG_COLLAPSED }} {{ model.FLAG_CARD }} {{ model.FLAG_COLUMN }}" id="{{ model.ID_OVERLAY_CONFIRM }}" style="visibility: hidden;" z-index="2">
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}">
<h2>Are you sure?</h2>
</div>

View File

@@ -12,7 +12,7 @@
<h2>{{ overlay_title }}</h2>
</div>
<div class="{{ model.flag_container }} {{ model.flag_column }}">
<button class="{{ model.flag_btn_overlay_close }}">Close</button>
<button class="{{ model.FLAG_BUTTON }} {{ model.FLAG_BUTTON_PRIMARY }} {{ model.flag_btn_overlay_close }}">Close</button>
</div>
</div>
<div class="{{ model.flag_container }} {{ model.flag_row }}">

View File

@@ -0,0 +1,61 @@
{% if is_blank_row %}
<tr class="{{ model.FLAG_ROW_NEW }} {{ model.FLAG_COMMAND }}" {{ model.ATTR_ID_COMMAND }}>
<td class="{{ model.FLAG_COMMAND_CATEGORY }}">
{% include 'components/dog/_preview_DDL_command_category.html' %}
</td>
<td class="{{ model.FLAG_NAME }}">
<input type="text"
class="{{ model.FLAG_NAME }}"
{{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }} />
</td>
<td class="{{ model.FLAG_HAND_SIGNAL_DEFAULT_DESCRIPTION }}">
<input type="text"
class="{{ model.FLAG_HAND_SIGNAL_DEFAULT_DESCRIPTION }}"
{{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }} />
</td>
<td class="{{ model.FLAG_CAN_HAVE_BUTTON }}">
<input type="checkbox" checked class="{{ model.FLAG_CAN_HAVE_BUTTON }}" {{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }} />
</td>
<td class="{{ model.FLAG_NOTES }}">
<input type="text"
class="{{ model.FLAG_NOTES }}"
{{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }} />
</td>
{% set active = True %}
{% include 'components/dog/_td_active.html' %}
</tr>
{% else %}
<tr class="{{ model.FLAG_COMMAND }}" {{ model.ATTR_ID_COMMAND }}="{{ command.id_command }}">
{% set command_category = command.command_category %}
<td class="{{ model.FLAG_COMMAND_CATEGORY }}">
{% include 'components/dog/_preview_DDL_command_category.html' %}
</td>
<td class="{{ model.FLAG_NAME }}">
<input type="text"
class="{{ model.FLAG_NAME }}"
{{ model.ATTR_VALUE_CURRENT }}="{{ model.format_null_string_as_blank(command.name)|escape }}"
{{ model.ATTR_VALUE_PREVIOUS }}="{{ model.format_null_string_as_blank(command.name)|escape }}"
value="{{ model.format_null_string_as_blank(command.name) }}" />
</td>
<td class="{{ model.FLAG_HAND_SIGNAL_DEFAULT_DESCRIPTION }}">
<input type="text"
class="{{ model.FLAG_HAND_SIGNAL_DEFAULT_DESCRIPTION }}"
{{ model.ATTR_VALUE_CURRENT }}="{{ model.format_null_string_as_blank(command.hand_signal_default_description)|escape }}"
{{ model.ATTR_VALUE_PREVIOUS }}="{{ model.format_null_string_as_blank(command.hand_signal_default_description)|escape }}"
value="{{ model.format_null_string_as_blank(command.hand_signal_default_description) }}" />
</td>
<td class="{{ model.FLAG_CAN_HAVE_BUTTON }}">
<input type="checkbox" {% if command.can_have_button %}checked{% endif %} class="{{ model.FLAG_CAN_HAVE_BUTTON }}" {{ model.ATTR_VALUE_CURRENT }}="{{ command.can_have_button|lower }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ command.can_have_button|lower }}" />
</td>
<td class="{{ model.FLAG_NOTES }}">
<input type="text"
class="{{ model.FLAG_NOTES }}"
{{ model.ATTR_VALUE_CURRENT }}="{{ model.format_null_string_as_blank(command.notes)|escape }}"
{{ model.ATTR_VALUE_PREVIOUS }}="{{ model.format_null_string_as_blank(command.notes)|escape }}"
value="{{ model.format_null_string_as_blank(command.notes) }}" />
</td>
{% set active = command.active %}
{% include 'components/dog/_td_active.html' %}
</tr>
{% endif %}

View File

@@ -0,0 +1,32 @@
{% if is_blank_row %}
<tr class="{{ model.FLAG_ROW_NEW }} {{ model.FLAG_COMMAND_CATEGORY }}" {{ model.ATTR_ID_COMMAND_CATEGORY }}>
<td class="{{ model.FLAG_CODE }}">
<input type="text" class="{{ model.FLAG_CODE }}"
{{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }} />
</td>
<td class="{{ model.FLAG_NAME }}">
<input type="text" class="{{ model.FLAG_NAME }}"
{{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }} />
</td>
{% set active = True %}
{% include 'components/dog/_td_active.html' %}
</tr>
{% else %}
<tr class="{{ model.FLAG_COMMAND_CATEGORY }}" {{ model.ATTR_ID_COMMAND_CATEGORY }}="{{ command_category.id_command_category }}">
<td class="{{ model.FLAG_CODE }}">
<input type="text" class="{{ model.FLAG_CODE }}"
value="{{ model.format_null_string_as_blank(command_category.code)|escape }}"
{{ model.ATTR_VALUE_CURRENT }}="{{ model.format_null_string_as_blank(command_category.code)|escape }}"
{{ model.ATTR_VALUE_PREVIOUS }}="{{ model.format_null_string_as_blank(command_category.code)|escape }}" />
</td>
<td class="{{ model.FLAG_NAME }}">
<input type="text" class="{{ model.FLAG_NAME }}"
{{ model.ATTR_VALUE_CURRENT }}="{{ model.format_null_string_as_blank(command_category.name)|escape }}"
{{ model.ATTR_VALUE_PREVIOUS }}="{{ model.format_null_string_as_blank(command_category.name)|escape }}"
value="{{ model.format_null_string_as_blank(command_category.name) }}" />
</td>
{% set active = command_category.active %}
{% include 'components/dog/_td_active.html' %}
</tr>
{% endif %}

View File

@@ -10,11 +10,15 @@
<td class="{{ model.FLAG_COMMAND }}">
{% include 'components/dog/_preview_DDL_command.html' %}
</td>
<td class="{{ model.FLAG_HAND_SIGNAL_DESCRIPTION}}">
<textarea class="{{ model.FLAG_HAND_SIGNAL_DESCRIPTION }}" {{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }}></textarea>
<td class="{{ model.FLAG_HAND_SIGNAL_DESCRIPTION }}">
<input type="text"
class="{{ model.FLAG_HAND_SIGNAL_DESCRIPTION }}"
{{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }} />
</td>
<td class="{{ model.FLAG_NOTES}}">
<textarea class="{{ model.FLAG_NOTES }}" {{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }}></textarea>
<td class="{{ model.FLAG_NOTES }}">
<input type="text"
class="{{ model.FLAG_NOTES }}"
{{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }} />
</td>
{% set active = True %}
{% include 'components/dog/_td_active.html' %}
@@ -33,11 +37,19 @@
<td class="{{ model.FLAG_COMMAND }}">
{% include 'components/dog/_preview_DDL_command.html' %}
</td>
<td class="{{ model.FLAG_HAND_SIGNAL_DESCRIPTION}}">
<textarea class="{{ model.FLAG_HAND_SIGNAL_DESCRIPTION }}" {{ model.ATTR_VALUE_CURRENT }}="{{ link.hand_signal_description|escape }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ link.hand_signal_description|escape }}">{{ link.hand_signal_description }}</textarea>
<td class="{{ model.FLAG_HAND_SIGNAL_DESCRIPTION }}">
<input type="text"
class="{{ model.FLAG_HAND_SIGNAL_DESCRIPTION }}"
{{ model.ATTR_VALUE_CURRENT }}="{{ model.format_null_string_as_blank(link.hand_signal_description)|escape }}"
{{ model.ATTR_VALUE_PREVIOUS }}="{{ model.format_null_string_as_blank(link.hand_signal_description)|escape }}"
value="{{ model.format_null_string_as_blank(link.hand_signal_description) }}" />
</td>
<td class="{{ model.FLAG_NOTES}}">
<textarea class="{{ model.FLAG_NOTES }}" {{ model.ATTR_VALUE_CURRENT }}="{{ link.notes|escape }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ link.notes|escape }}">{{ link.notes }}</textarea>
<td class="{{ model.FLAG_NOTES }}">
<input type="text"
class="{{ model.FLAG_NOTES }}"
{{ model.ATTR_VALUE_CURRENT }}="{{ model.format_null_string_as_blank(link.notes)|escape }}"
{{ model.ATTR_VALUE_PREVIOUS }}="{{ model.format_null_string_as_blank(link.notes)|escape }}"
value="{{ model.format_null_string_as_blank(link.notes) }}" />
</td>
{% set active = link.active %}
{% include 'components/dog/_td_active.html' %}