Updated export configuration, displaying project name
This commit is contained in:
@@ -5979,6 +5979,18 @@ def export_configuration():
|
|||||||
}
|
}
|
||||||
|
|
||||||
print(f"📊 Filters: {filters}")
|
print(f"📊 Filters: {filters}")
|
||||||
|
|
||||||
|
# Get project name if project filter is applied
|
||||||
|
project_name = None
|
||||||
|
if filters.get('project_filter'):
|
||||||
|
try:
|
||||||
|
from models.project import Project
|
||||||
|
project = Project.query.get(int(filters['project_filter']))
|
||||||
|
if project:
|
||||||
|
project_name = project.name
|
||||||
|
print(f"📊 Project filter: ID={filters['project_filter']}, Name={project_name}")
|
||||||
|
except Exception as e:
|
||||||
|
print(f"⚠️ Error fetching project name: {e}")
|
||||||
|
|
||||||
# Check if location accuracy feature exists
|
# Check if location accuracy feature exists
|
||||||
try:
|
try:
|
||||||
@@ -6019,6 +6031,7 @@ def export_configuration():
|
|||||||
return render_template('export_configuration.html',
|
return render_template('export_configuration.html',
|
||||||
available_columns=available_columns,
|
available_columns=available_columns,
|
||||||
filters=filters,
|
filters=filters,
|
||||||
|
project_name=project_name,
|
||||||
has_location_accuracy_feature=has_location_accuracy)
|
has_location_accuracy_feature=has_location_accuracy)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
{% if filters.project_filter %}
|
{% if filters.project_filter %}
|
||||||
<span class="filter-tag">
|
<span class="filter-tag">
|
||||||
<i class="fas fa-project-diagram"></i>
|
<i class="fas fa-project-diagram"></i>
|
||||||
Project: {{ filters.project_filter }}
|
Project: {% if project_name %}{{ project_name }}{% else %}{{ filters.project_filter }}{% endif %}
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user