Compare commits

...

3 Commits

Author SHA1 Message Date
688ce4c6fc Merge pull request 'prefill-own-user-default-log' (#444) from prefill-own-user-default-log into staging
Some checks are pending
CI/CD Pipeline / test (push) Waiting to run
CI/CD Pipeline / deploy-staging (push) Blocked by required conditions
CI/CD Pipeline / deploy-main (push) Blocked by required conditions
Reviewed-on: #444
2024-04-26 09:59:02 +02:00
fcf86c7ff1 if user is logged in, use that user as default rower
All checks were successful
CI/CD Pipeline / test (push) Successful in 8m26s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
2024-04-26 09:50:01 +02:00
123b4bd39f Merge pull request 'no-special-treatment-with-boatname' (#442) from no-special-treatment-with-boatname into main
All checks were successful
CI/CD Pipeline / test (push) Successful in 8m10s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Successful in 5m34s
Reviewed-on: #442
2024-04-24 17:23:49 +02:00
3 changed files with 7 additions and 1 deletions

View File

@ -5,6 +5,7 @@ export interface choiceMap {
[details: string]: Choices;
}
declare var loggedin_user_id: string;
let choiceObjects: choiceMap = {};
let boat_in_ottensheim = true;
let boat_reserved_today= true;
@ -176,6 +177,8 @@ function selectBoatChange() {
/** custom code for Etsch */
choiceObjects["newrower"].setChoiceByValue("81");
}
}else if (typeof loggedin_user_id !== 'undefined'){
choiceObjects["newrower"].setChoiceByValue(loggedin_user_id);
}
const inputElement = document.getElementById(

View File

@ -18,6 +18,7 @@ test("Cox can start and cancel trip", async ({ page }, testInfo) => {
await page.getByText('2x', { exact: true }).click();
await page.getByText("Joe", { exact: true }).click();
}
await page.getByLabel('Remove item: \'6\'').click(); // remove pre-filled cox2
await page.getByPlaceholder("Ruderer auswählen").click();
await page.getByRole("option", { name: "rower2" }).click();
await page.getByRole("option", { name: "cox2" }).click();
@ -59,6 +60,7 @@ test("Cox can start and finish trip", async ({ page }, testInfo) => {
await page.getByText('2x', { exact: true }).click();
await page.getByText("Joe", { exact: true }).click();
}
await page.getByLabel('Remove item: \'6\'').click(); // remove pre-filled cox2
await page.getByPlaceholder("Ruderer auswählen").click();
await page.getByRole("option", { name: "rower2" }).click();
await page.getByRole("option", { name: "cox2" }).click();

View File

@ -38,5 +38,6 @@
</div>
</div>
</div>
{% if loggedin_user %}<script>var loggedin_user_id = "{{ loggedin_user.id }}";</script>{% endif %}
<script src="/public/logbook.js"></script>
{% endblock content %}