This commit is contained in:
philipp 2023-11-02 19:01:13 +01:00
commit a9ca715d6d
5 changed files with 43 additions and 17 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@ db.sqlite
Rocket.toml
frontend/node_modules/*
/static/
/data-ergo/

View File

@ -1,4 +1,4 @@
[default]
secret_key = "/NtVGizglEoyoxBLzsRDWTy4oAG1qDw4J4O+CWJSv+fypD7W9sam8hUY4j90EZsbZk8wEradS5zBoWtWKi3k8w=="
rss_key = "rss-key-for-ci"
limits = { file = "10 MiB"}
limits = { file = "10 MiB", data-form = "10 MiB"}

View File

@ -68,19 +68,21 @@ function selectBoatChange() {
}
function reloadPage() {
let pageTitle = document.title;
let attentionMessage = 'Riemen- und Dollenbruch';
if (!window.location.href.includes("ergo")){
let pageTitle = document.title;
let attentionMessage = 'Riemen- und Dollenbruch';
document.addEventListener('visibilitychange', function() {
let isPageActive = !document.hidden;
document.addEventListener('visibilitychange', function() {
let isPageActive = !document.hidden;
if(!isPageActive){
document.title = attentionMessage;
} else {
document.title = pageTitle;
location.reload();
}
});
if(!isPageActive){
document.title = attentionMessage;
} else {
document.title = pageTitle;
location.reload();
}
});
}
}
function setMaxAmountRowers(name: string, rowers: number) {

View File

@ -186,7 +186,7 @@ ORDER BY last_access DESC
SELECT id, name, pw, is_cox, is_admin, is_guest, deleted, last_access, is_tech, dob, weight, sex
FROM user
WHERE deleted = 0 AND dob is not null and weight is not null and sex is not null
ORDER BY last_access DESC
ORDER BY name
"
)
.fetch_all(db)

View File

@ -7,6 +7,19 @@
{% if flash %}
{{ macros::alert(message=flash.1, type=flash.0, class="sm:col-span-2 lg:col-span-3") }}
{% endif %}
<details>
<summary>Deine Daten</summary>
<p>
Folgende Daten hat der Ruderassistent von dir. Wenn diese nicht mehr aktuell sind, bitte gewünschte Änderungen an Philipp melden (Tel. nr siehe Signal, oder an it@rudernlinz.at).
<br /><br />
<ul>
<li>Geburtsdatum: {{ loggedin_user.dob }}</li>
<li>Gewicht: {{ loggedin_user.weight}} kg</li>
<li>Geschlecht: {{ loggedin_user.sex}}</li>
</ul>
</p>
</details>
<h1 class="h1">Neuer Eintrag</h1>
<details>
<summary>Dirty Thirty</summary>
@ -16,11 +29,16 @@
<label for="user-thirty" class="text-sm text-gray-600">Ergo-Fahrer</label>
<select name="user" id="user-thirty" class="input">
{% for user in users %}
<option value="{{ user.id }}">{{ user.name }}</option>
{% if user.id == loggedin_user.id %}
<option value="{{ user.id }}" selected="selected">{{ user.name }}</option>
{% else %}
<option value="{{ user.id }}">{{ user.name }}</option>
{% endif %}
{% endfor %}
</select>
{{ macros::input(label="Zeit [(hh:)mm:ss]/Distanz [m]", name="result", required=true, type="text", class="input") }}
<input type="file" name="proof" class="input">
<label for="file-thirty" class="text-sm text-gray-600">Ergebnis-Foto vom Ergo-Display</label>
<input type="file" id="file-thirty" name="proof" class="input" accept="image/*" capture="camera">
<input type="submit" value="Speichern" class="btn btn-primary w-full col-span-4 m-auto"/>
</form>
</div>
@ -36,11 +54,16 @@
<select name="user" id="user-dozen" class="input">
<option disabled="disabled">User auswählen</option>
{% for user in users %}
<option value="{{ user.id }}">{{ user.name }}</option>
{% if user.id == loggedin_user.id %}
<option value="{{ user.id }}" selected="selected">{{ user.name }}</option>
{% else %}
<option value="{{ user.id }}">{{ user.name }}</option>
{% endif %}
{% endfor %}
</select>
{{ macros::input(label="Zeit [(hh:)mm:ss]/Distanz [m]", name="result", required=true, type="text", class="input") }}
<input type="file" name="proof" class="input">
<label for="file-dozen" class="text-sm text-gray-600">Ergebnis-Foto vom Ergo-Display</label>
<input type="file" id="file-dozen" name="proof" class="input" accept="image/*" capture="camera">
<input type="submit" value="Speichern" class="btn btn-primary w-full col-span-4 m-auto"/>
</form>
</div>