Refactor .gitignore; add patterns for SQLite database files and improve ignored file management

Enhance app initialization; set secret key from environment variable for better security practices

Update work_log model import; change User import path for improved module structure

Refactor routes; add new inventory item creation route and enhance settings handling with JSON form state

Improve ComboBoxWidget; add handleComboAdd function for better option management and integrate with render_combobox macro

Revamp settings template; implement form state management and improve modal functionality for room creation

Add error template; create a new error handling page for better user feedback
This commit is contained in:
Yaro Kasear 2025-06-23 10:05:31 -05:00
parent 142e909a88
commit c6fc1a4795
9 changed files with 269 additions and 113 deletions

View file

@ -21,13 +21,19 @@
</select>
</div>
<script>
document.addEventListener('DOMContentLoaded', () => {
ComboBoxWidget.initComboBox("{{ id }}", {
{% if onAdd %}onAdd: function(newItem, list, createOption) { {{ onAdd | safe }} },{% endif %}
{% if onRemove %}onRemove: function(option) { {{ onRemove | safe }} },{% endif %}
{% if onEdit %}onEdit: function(option) { {{ onEdit | safe }} }{% endif %}
});
<script>
document.addEventListener('DOMContentLoaded', () => {
ComboBoxWidget.initComboBox("{{ id }}", {
onAdd: function(newItem, list, createOption) {
{% if onAdd %}
{{ onAdd | safe }}
{% else %}
ComboBoxWidget.handleComboAdd('{{ id }}-input', '{{ id }}-list', '{{ id }}s', '{{ label or id }}');
{% endif %}
},
{% if onRemove %}onRemove: function(option) { {{ onRemove | safe }} },{% endif %}
{% if onEdit %}onEdit: function(option) { {{ onEdit | safe }} }{% endif %}
});
</script>
});
</script>
{% endmacro %}