diff --git a/frontend/main.ts b/frontend/main.ts index a7497fd..8a71157 100644 --- a/frontend/main.ts +++ b/frontend/main.ts @@ -154,8 +154,15 @@ function selectBoatChange() { if (event.detail.customProperties.owner) { choiceObjects["newrower"].setChoiceByValue( - event.detail.customProperties.owner + "", + event.detail.customProperties.owner.toString(), ); + + if(event.detail.value === '36') { + /** custom code for Etsch */ + choiceObjects["newrower"].setChoiceByValue( + "81", + ); + } } const inputElement = document.getElementById( diff --git a/frontend/scss/components/_sidebar.scss b/frontend/scss/components/_sidebar.scss index 619753f..26aba05 100644 --- a/frontend/scss/components/_sidebar.scss +++ b/frontend/scss/components/_sidebar.scss @@ -10,6 +10,7 @@ &.open { display: block; + height: 100dvh; height: 100vh; right: 0; top: 0; diff --git a/frontend/tests/log.spec.ts b/frontend/tests/log.spec.ts index 7692ed1..64d2c09 100644 --- a/frontend/tests/log.spec.ts +++ b/frontend/tests/log.spec.ts @@ -15,6 +15,7 @@ test("Cox can start and cancel trip", async ({ page }, testInfo) => { await page.getByText("Kaputtes Boot :-( (7 x)").nth(1).click(); await page.getByRole("option", { name: "Joe" }).click(); } else { + await page.getByText('2x').click(); await page.getByText("Joe", { exact: true }).click(); } await page.getByPlaceholder("Ruderer auswählen").click(); @@ -55,6 +56,7 @@ test("Cox can start and finish trip", async ({ page }, testInfo) => { await page.getByText("Kaputtes Boot :-( (7 x)").nth(1).click(); await page.getByRole("option", { name: "Joe" }).click(); } else { + await page.getByText('2x').click(); await page.getByText("Joe", { exact: true }).click(); } await page.getByPlaceholder("Ruderer auswählen").click(); @@ -106,6 +108,7 @@ test("Kiosk can start and cancel trip", async ({ page }, testInfo) => { await page.getByText("Kaputtes Boot :-( (7 x)").nth(1).click(); await page.getByRole("option", { name: "Joe" }).click(); } else { + await page.getByText('2x').click(); await page.getByText("Joe", { exact: true }).click(); } await page.getByPlaceholder("Ruderer auswählen").click(); @@ -139,6 +142,7 @@ test("Kiosk can start and finish trip", async ({ page }, testInfo) => { await page.getByText("Kaputtes Boot :-( (7 x)").nth(1).click(); await page.getByRole("option", { name: "Joe" }).click(); } else { + await page.getByText('2x').click(); await page.getByText("Joe", { exact: true }).click(); } await page.getByPlaceholder("Ruderer auswählen").click(); diff --git a/templates/includes/forms/log.html.tera b/templates/includes/forms/log.html.tera index fc5e78c..ca71edd 100644 --- a/templates/includes/forms/log.html.tera +++ b/templates/includes/forms/log.html.tera @@ -4,24 +4,38 @@ #} {% macro show_boats() %} {% for amount_seats, grouped_boats in boats | group_by(attribute="amount_seats") %} -
-
- {{ amount_seats }}x +
+ + + {% if grouped_boats[0].amount_seats < 9 or grouped_boats[0].amount_seats == 24 %} + {{ amount_seats }}x + {% elif grouped_boats[0].amount_seats == 9 %} + {{ grouped_boats[0].amount_seats - 1 }}+ + {% else %} + Vereinsfremde Boote + {% endif %} + + + ({{ grouped_boats | length }}) + + +
+ {% for boat in grouped_boats | sort(attribute="name") %} +
+ + {{ boat.name }} + {% if boat.owner %}(privat){% endif %} + +
+ {% endfor %}
- {% for boat in grouped_boats | sort(attribute="name") %} -
- - {{ boat.name }} - {% if boat.owner %}(privat){% endif %} - -
- {% endfor %} -
+ {% endfor %} {% endmacro show_boats %} + {# Shows the form for creating a new logbook entry. #} {% macro new(shipmaster) %}
Boote
{{ log::show_boats(only_ones=false) }}
+ -
-

Neue Ausfahrt

-
{{ log::new(only_ones=false, shipmaster=-1) }}
+
+
+

Neue Ausfahrt

+
{{ log::new(only_ones=false, shipmaster=-1) }}
+
diff --git a/templates/log.html.tera b/templates/log.html.tera index 11fac2d..741186c 100644 --- a/templates/log.html.tera +++ b/templates/log.html.tera @@ -6,14 +6,16 @@

Logbuch

- -
-

Neue Ausfahrt

-
{{ log::new(shipmaster=loggedin_user.id) }}
+
+
+

Neue Ausfahrt

+
{{ log::new(shipmaster=loggedin_user.id) }}
+