Compare commits
6 Commits
live
...
b853fd80ff
| Author | SHA1 | Date | |
|---|---|---|---|
| b853fd80ff | |||
| eec13b7962 | |||
| 8867f3c7d2 | |||
| cdde09eee9 | |||
| ec132b3e7a | |||
| b8f532d5c2 |
@@ -164,7 +164,7 @@ class Consumable(db.Model):
|
|||||||
name = db.Column(db.String(255), unique=True)
|
name = db.Column(db.String(255), unique=True)
|
||||||
unit = db.Column(db.String(255))
|
unit = db.Column(db.String(255))
|
||||||
|
|
||||||
vehicles = db.relationship("Vehicle", secondary=vehicles_consumables, viewonly=True)
|
vehicles = db.relationship("Vehicle", secondary=vehicles_consumables)
|
||||||
|
|
||||||
def __init__(self, name, unit):
|
def __init__(self, name, unit):
|
||||||
self.name = name
|
self.name = name
|
||||||
|
|||||||
@@ -138,3 +138,24 @@ def delete_account():
|
|||||||
|
|
||||||
return render_template("deleteAccountForm.html", form=form)
|
return render_template("deleteAccountForm.html", form=form)
|
||||||
|
|
||||||
|
|
||||||
|
@app.route("/account/home", methods=["GET"])
|
||||||
|
@login_required
|
||||||
|
def get_users_home():
|
||||||
|
return jsonify(
|
||||||
|
{
|
||||||
|
"lat": float(current_user.home_lat),
|
||||||
|
"long": float(current_user.home_long),
|
||||||
|
"zoom": current_user.home_zoom,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@app.route("/account/home", methods=["POST"])
|
||||||
|
@login_required
|
||||||
|
def set_users_home():
|
||||||
|
current_user.home_lat = request.json["lat"]
|
||||||
|
current_user.home_long = request.json["long"]
|
||||||
|
current_user.home_zoom = request.json["zoom"]
|
||||||
|
db.session.commit()
|
||||||
|
return jsonify({})
|
||||||
|
|||||||
@@ -226,6 +226,5 @@ def get_pit_stops():
|
|||||||
"regulars": vehicle.regulars,
|
"regulars": vehicle.regulars,
|
||||||
}
|
}
|
||||||
user["vehicles"].append(v)
|
user["vehicles"].append(v)
|
||||||
user["vehicles"].sort(key=lambda v: (v["data"][-1].date, v["data"][-1].odometer or 0 ), reverse=True)
|
|
||||||
|
|
||||||
return render_template("pitstops.html", user=user)
|
return render_template("pitstops.html", user=user)
|
||||||
|
|||||||
BIN
app/static/img/filling_station_favourite_marker.png
Normal file
|
After Width: | Height: | Size: 725 B |
BIN
app/static/img/filling_station_marker.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
app/static/logos/agip.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
app/static/logos/aral.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
app/static/logos/avia.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
app/static/logos/bft.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
app/static/logos/esso.png
Normal file
|
After Width: | Height: | Size: 51 KiB |
BIN
app/static/logos/hem.png
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
BIN
app/static/logos/jet.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
app/static/logos/omv.png
Normal file
|
After Width: | Height: | Size: 9.0 KiB |
BIN
app/static/logos/shell.png
Normal file
|
After Width: | Height: | Size: 7.6 KiB |
BIN
app/static/logos/total.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
app/static/logos/zg raiffeisen energie.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
@@ -183,7 +183,7 @@
|
|||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<a href="https://lusiardi.de/pages/impressum.html" target="_new">Impressum</a> - <a href="https://lusiardi.de/pages/datenschutzerklaerung.html" target="_new">Datenschutzerklärung</a>
|
<a href="https://www.lusiardi.de/impressum/" target="_new">Impressum</a> - <a href="https://www.lusiardi.de/datenschutzerklaerung/" target="_new">Datenschutzerklärung</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||