Feat(SQL, UI): 1. Calc and Get Many Stored Procedures created for Weather, Lighting Level, Assessment, Distraction Type, Distraction Intensity Level, Distraction, Bribe, Assessment Command Modality Link, Response Quality Metric, Obedience Level, and Assessment Response. \n 2. Assessments and Assessment pages created with data loading and hooked up, but not saving.

This commit is contained in:
2025-07-24 16:48:18 +01:00
parent 6bb3a77a34
commit fad5336cc4
137 changed files with 10442 additions and 1116 deletions

View File

@@ -0,0 +1,113 @@
{% extends 'layouts/layout.html' %}
{% block page_body %}
<link rel="stylesheet" href="{{ url_for('static', filename='dist/css/dog_assessments.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_WEATHER }}">
{{ model.form_filters.id_weather.label }}
{{ model.form_filters.id_weather() }}
{% for error in model.form_filters.id_weather.errors %}
<p class="error">{{ error }}</p>
{% endfor %}
</div>
<div class="{{ model.FLAG_CONTAINER_INPUT }} {{ model.FLAG_COLUMN }} {{ model.FLAG_FILTER }} {{ model.ATTR_ID_LIGHTING_LEVEL }}">
{{ model.form_filters.id_lighting_level.label }}
{{ model.form_filters.id_lighting_level() }}
{% for error in model.form_filters.id_lighting_level.errors %}
<p class="error">{{ error }}</p>
{% endfor %}
</div>
<div class="{{ model.FLAG_CONTAINER_INPUT }} {{ model.FLAG_COLUMN }} {{ model.FLAG_FILTER }} {{ model.ATTR_ID_LOCATION }}">
{{ model.form_filters.id_location.label }}
{{ model.form_filters.id_location() }}
{% for error in model.form_filters.id_location.errors %}
<p class="error">{{ error }}</p>
{% endfor %}
</div>
<div class="{{ model.FLAG_CONTAINER_INPUT }} {{ model.FLAG_COLUMN }} {{ model.FLAG_FILTER }} {{ model.FLAG_USER_HANDLER }}">
{{ model.form_filters.id_user_handler.label }}
{{ model.form_filters.id_user_handler() }}
{% for error in model.form_filters.id_user_handler.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_TABLE_MAIN }} {{ model.FLAG_ROW }} {{ model.FLAG_CARD }} {{ model.FLAG_ASSESSMENT }}">
<thead>
<tr class="{{ model.FLAG_ASSESSMENT }}">
<th class="{{ model.FLAG_DETAIL }}">Detail</th>
<th class="{{ model.FLAG_WEATHER }} {{ model.FLAG_DDL_PREVIEW }}">Weather</th>
<th class="{{ model.FLAG_LIGHTING_LEVEL }} {{ model.FLAG_DDL_PREVIEW }}">Lighting Level</th>
<th class="{{ model.FLAG_TEMPERATURE_CELCIUS }}">Temperature (&deg;C)</th>
<th class="{{ model.FLAG_LOCATION }} {{ model.FLAG_DDL_PREVIEW }}">Location</th>
<th class="{{ model.FLAG_USER_HANDLER }}">Handler</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 assessment in model.assessments %}
{% include 'components/dog/_row_assessment.html' %}
{% endfor %}
{% set is_blank_row = True %}
{% include 'components/dog/_row_assessment.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 assessments = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.assessments) | tojson | safe }};
var filterLightingLevels = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.filter_lighting_levels) | tojson | safe }};
var filterLocations = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.filter_locations) | tojson | safe }};
var filterUserHandlers = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.filter_user_handlers) | tojson | safe }};
var filterWeathers = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.filter_weathers) | tojson | safe }};
var flagTemperatureCelcius = "{{ model.FLAG_TEMPERATURE_CELCIUS }}";
var flagUserHandler = "{{ model.FLAG_USER_HANDLER }}";
</script>
{% endblock %}