stc

a simple time card webapp
git clone _git@git.brennen.work:stc.git
Log | Files | Refs | README

commit 45a162c7ace2000df5d7cc8602927c8f9a466679
parent 2bda8dc704a03170cdc3306f47f472ecadd4d0d1
Author: Brennen T. Mazur <brennen@madis.cool>
Date:   Fri, 24 Feb 2023 15:43:27 -0700

finish what I started

Diffstat:
Mapp/routes.py | 10+++++-----
Mapp/templates/dashboard/punchclock/widget.html | 8++++----
2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/app/routes.py b/app/routes.py @@ -115,13 +115,13 @@ def dashboard(): fleetinform=FleetCheckinForm() currenttime=datetime.datetime.utcnow() - if clockform.validate_on_submit(): + if clockinform.validate_on_submit(): mongo.db.fleet_collection.insert_one({'clock_in' : datetime.datetime.utcnow(), 'modified_by' : [current_user.username], 'date' : datetime.datetime.today(), - 'project' : clockform.project.data, - 'lunch' : clockform.lunch.data, - 'per_diem' : clockform.perdiem.data}) + 'project' : clockinform.project.data, + 'lunch' : clockinform.lunch.data, + 'per_diem' : clockinform.perdiem.data}) return redirect(url_for('dashboard')) available_projects = {'STC Webapp':'stcapp','YEP Website':'yepsite','Volunteer Day':'volday'} #not used/not working @@ -133,7 +133,7 @@ def dashboard(): 'operator':current_user.username, 'additional_notes':fleetoutform.additionalnotes.data}) return redirect(url_for('dashboard')) - return render_template('dashboard/layout.html',currenttime=currenttime,projects=available_projects,clockform=clockform,fleetinform=fleetinform,fleetoutform=fleetoutform,ORGNAME=OrganizationName) + return render_template('dashboard/layout.html',currenttime=currenttime,projects=available_projects,clockinform=clockinform,fleetinform=fleetinform,fleetoutform=fleetoutform,ORGNAME=OrganizationName) @app.route("/admin") @login_required diff --git a/app/templates/dashboard/punchclock/widget.html b/app/templates/dashboard/punchclock/widget.html @@ -2,10 +2,10 @@ <h2 id="clock"></h2> <form class="widget-form" action="" method="POST" novalidate> <div> - <p>{{ clockform.projectsSel.label }}<br>{{ clockform.projectsSel(choices=projects) }}</p> - <p>{{ clockform.lunchBox() }} {{ clockform.lunchBox.label }} - {{ clockform.per_diemBox() }} {{ clockform.per_diemBox.label }}</p> - <p>{{ clockform.clockin() }}</p> + <p>{{ clockinform.projectsSel.label }}<br>{{ clockinform.projectsSel(choices=projects) }}</p> + <p>{{ clockinform.lunchBox() }} {{ clockinform.lunchBox.label }} + {{ clockinform.per_diemBox() }} {{ clockinform.per_diemBox.label }}</p> + <p>{{ clockinform.clockin() }}</p> </div> </form> <!-- Add iff satement for clocked_in==True