diff --git a/app/routes/dashboard.py b/app/routes/dashboard.py index c0030d8..075b10b 100644 --- a/app/routes/dashboard.py +++ b/app/routes/dashboard.py @@ -110,9 +110,14 @@ def index(): recent_inspections = recent_q.limit(5).all() # ── Pending follow-up inspections ──────────────────────────────────── + # follow_ups is a lazy='dynamic' relationship — comparing it to None does + # NOT produce a "has no rows" predicate for dynamic relationships. The + # correct idiom is ~.any(), which generates EXISTS (SELECT 1 FROM inspections + # WHERE parent_inspection_id = inspections.id). This matches the identical + # filter used in routes/inspections.py:follow_up_filter. followup_q = Inspection.query.filter_by( follow_up_required=True, status='completed' - ).filter(Inspection.follow_ups == None) # noqa: E711 — SQLAlchemy usage + ).filter(~Inspection.follow_ups.any()) if is_inspector: followup_q = followup_q.filter(Inspection.inspector_id == current_user.id) elif is_customer: @@ -286,4 +291,10 @@ def facility_trend(): 'labels': [str(r.day) for r in rows], 'data': [round(float(r.avg), 2) for r in rows], 'facility': facility.name, - }) \ No newline at end of file + }) + + +@bp.route('/support') +def support(): + """Public support page — no login required. Used as App Store Connect Support URL.""" + return render_template('support.html', current_year=datetime.utcnow().year) \ No newline at end of file diff --git a/app/templates/support.html b/app/templates/support.html new file mode 100644 index 0000000..734cdaa --- /dev/null +++ b/app/templates/support.html @@ -0,0 +1,39 @@ + + + + + + JQC App Support — LT Services Inc. + + + + +
+

JQC — Janitorial Quality Control

+

LT Services Inc. — Internal Operations App

+ +

Support

+

This app is an internal tool for LT Services Inc. employees and staff. It is not available for public download or use.

+

If you are an LT Services Inc. employee experiencing an issue with the app, contact your IT administrator:

+ + + +

About This App

+

App name: JQC — Janitorial Quality Control

+

Developer: LT Services Inc.

+

Platform: iPadOS

+

Purpose: Facility inspection management, issue tracking, and quality reporting for internal janitorial operations staff.

+ +

© {{ current_year }} LT Services Inc. All rights reserved.

+
+ + +