From 62ff5f0c2e1b66a4399a28d45998b8972df1c944 Mon Sep 17 00:00:00 2001 From: philipp Date: Mon, 4 Mar 2024 14:25:14 +0100 Subject: [PATCH] fix spacing issues --- frontend/tests/cox.spec.ts | 2 +- frontend/tests/log.spec.ts | 4 ++-- templates/includes/forms/log.html.tera | 8 ++++---- templates/planned.html.tera | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/frontend/tests/cox.spec.ts b/frontend/tests/cox.spec.ts index c66783f..54f8f1f 100644 --- a/frontend/tests/cox.spec.ts +++ b/frontend/tests/cox.spec.ts @@ -15,7 +15,7 @@ test("cox can create and delete trip", async ({ page }) => { await page.locator("#sidebar #planned_starting_time").press("Tab"); await page.getByRole("spinbutton").fill("5"); await page.getByRole("button", { name: "Erstellen", exact: true }).click(); - await expect(page.locator("body")).toContainText("18:00 Uhr (cox ) Details"); + await expect(page.locator("body")).toContainText("18:00 Uhr (cox) Details"); await page.goto("http://localhost:8000/planned"); await page.getByRole("link", { name: "Details" }).click(); diff --git a/frontend/tests/log.spec.ts b/frontend/tests/log.spec.ts index 3e491af..221d26a 100644 --- a/frontend/tests/log.spec.ts +++ b/frontend/tests/log.spec.ts @@ -87,7 +87,7 @@ test("Cox can start and finish trip", async ({ page }, testInfo) => { await expect(page.locator('body')).toContainText('Joe'); await expect(page.locator('body')).toContainText('(cox2 )'); await expect(page.locator('body')).toContainText('Ottensheim (25 km)'); - await expect(page.locator('body')).toContainText('Ruderer: cox2 , rower2'); + await expect(page.locator('body')).toContainText('Ruderer: cox2, rower2'); }); test("Kiosk can start and cancel trip", async ({ page }, testInfo) => { @@ -162,5 +162,5 @@ test("Kiosk can start and finish trip", async ({ page }, testInfo) => { await expect(page.locator('body')).toContainText('Joe'); await expect(page.locator('body')).toContainText('(cox2 )'); await expect(page.locator('body')).toContainText('Ottensheim (25 km)'); - await expect(page.locator('body')).toContainText('Ruderer: cox2 , rower2'); + await expect(page.locator('body')).toContainText('Ruderer: cox2, rower2'); }); diff --git a/templates/includes/forms/log.html.tera b/templates/includes/forms/log.html.tera index 7206bbc..d8fbddf 100644 --- a/templates/includes/forms/log.html.tera +++ b/templates/includes/forms/log.html.tera @@ -180,8 +180,8 @@ {% endif %}
- {{ log.boat.name }} ({{ log.shipmaster_user.name }} - {% if log.shipmaster_only_steering %}- handgesteuert{% endif %} + {{ log.boat.name }} ({{ log.shipmaster_user.name -}} + {% if log.shipmaster_only_steering %}- handgesteuert{% endif -%} ) {% if state == "completed" and log.departure | date(format='%d.%m.%Y') == log.arrival | date(format='%d.%m.%Y') %} @@ -208,8 +208,8 @@ {% if amount_guests > 0 or log.rowers | length > 0 %}
Ruderer: - {% for rower in log.rowers %} - {{ rower.name }} + {% for rower in log.rowers -%} + {{ rower.name -}} {% if not loop.last or amount_guests > 0 and log.boat.name != 'Externes Boot' %},{% endif %} {% endfor %} {% if amount_guests > 0 and log.boat.name != 'Externes Boot' %} diff --git a/templates/planned.html.tera b/templates/planned.html.tera index c66f5bb..7f61482 100644 --- a/templates/planned.html.tera +++ b/templates/planned.html.tera @@ -228,17 +228,17 @@ {{ trip.planned_starting_time }} Uhr (Absage - {{ trip.cox_name }} + {{ trip.cox_name -}} {% if trip.trip_type %} - {{ trip.trip_type.icon | safe }}{{ trip.trip_type.name }} - {% endif %} + {% endif -%} ) {% else %} {{ trip.planned_starting_time }} Uhr - ({{ trip.cox_name }} - {% if trip.trip_type %}- {{ trip.trip_type.icon | safe }} {{ trip.trip_type.name }}{% endif %} + ({{ trip.cox_name -}} + {% if trip.trip_type %}- {{ trip.trip_type.icon | safe }} {{ trip.trip_type.name }}{% endif -%} ) {% endif %}