From e46f668c340d67ccffa3b7d07f7a888e69e476f1 Mon Sep 17 00:00:00 2001 From: serversdwn Date: Tue, 2 Dec 2025 07:53:16 +0000 Subject: [PATCH] added frontend unit addition/editing --- backend/routers/roster_edit.py | 6 +- templates/roster.html | 203 ++++++++++++++++++++++++++++++++- 2 files changed, 206 insertions(+), 3 deletions(-) diff --git a/backend/routers/roster_edit.py b/backend/routers/roster_edit.py index ca598ec..257f00f 100644 --- a/backend/routers/roster_edit.py +++ b/backend/routers/roster_edit.py @@ -24,8 +24,10 @@ def get_or_create_roster_unit(db: Session, unit_id: str): def add_roster_unit( id: str = Form(...), unit_type: str = Form("series3"), - deployed: bool = Form(True), + deployed: bool = Form(False), note: str = Form(""), + project_id: str = Form(None), + location: str = Form(None), db: Session = Depends(get_db) ): if db.query(RosterUnit).filter(RosterUnit.id == id).first(): @@ -36,6 +38,8 @@ def add_roster_unit( unit_type=unit_type, deployed=deployed, note=note, + project_id=project_id, + location=location, last_updated=datetime.utcnow(), ) db.add(unit) diff --git a/templates/roster.html b/templates/roster.html index c26f2f5..78b8608 100644 --- a/templates/roster.html +++ b/templates/roster.html @@ -4,8 +4,26 @@ {% block content %}
-

Fleet Roster

-

Real-time status of all seismograph units

+
+
+

Fleet Roster

+

Real-time status of all seismograph units

+
+
+ + +
+
@@ -26,4 +44,185 @@ + + + + + + + + {% endblock %}