Add schedule and unit list templates for project management

- Created `schedule_list.html` to display scheduled actions with execution status, location, and timestamps.
- Implemented buttons for executing and canceling schedules, along with a details view placeholder.
- Created `unit_list.html` to show assigned units with their status, location, model, and session/file counts.
- Added conditional rendering for active sessions and links to view unit and location details.
This commit is contained in:
serversdwn
2026-01-13 08:37:02 +00:00
parent 98ee9d7cea
commit d93785c230
8 changed files with 935 additions and 172 deletions

View File

@@ -460,8 +460,12 @@ async def get_nrl_files(
"""
from backend.models import DataFile, RecordingSession
files = db.query(DataFile).filter_by(
location_id=location_id
# Join DataFile with RecordingSession to filter by location_id
files = db.query(DataFile).join(
RecordingSession,
DataFile.session_id == RecordingSession.id
).filter(
RecordingSession.location_id == location_id
).order_by(DataFile.created_at.desc()).all()
# Enrich with session details