diff --git a/.gitignore b/.gitignore index d17d371..6b4b2c7 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ db.sqlite Rocket.toml frontend/node_modules/* /static/ +/data-ergo/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3899fda..abe4f88 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,7 +42,7 @@ deploy-staging: - scp -r templates $SSH_USER@$SSH_HOST:/home/k004373/rowing-staging/ - scp -r svelte $SSH_USER@$SSH_HOST:/home/k004373/rowing-staging/ - ssh $SSH_USER@$SSH_HOST 'sudo systemctl stop rotstaging' - - ssh $SSH_USER@$SSH_HOST 'rm /home/k004373/rowing-staging/db.sqlite && cp /home/k004373/rowing/db.sqlite /home/k004373/rowing-staging/db.sqlite && mkdir -p /home/k004373/rowing-staging/svelte/build && sqlite3 /home/k004373/rowing-staging/db.sqlite < /home/k004373/rowing-staging/staging-diff.sql' + - ssh $SSH_USER@$SSH_HOST 'rm /home/k004373/rowing-staging/db.sqlite && cp /home/k004373/rowing/db.sqlite /home/k004373/rowing-staging/db.sqlite && mkdir -p /home/k004373/rowing-staging/svelte/build && mkdir -p /home/k004373/rowing-staging/data-ergo/thirty && mkdir -p /home/k004373/rowing-staging/data-ergo/dozen && sqlite3 /home/k004373/rowing-staging/db.sqlite < /home/k004373/rowing-staging/staging-diff.sql' - ssh $SSH_USER@$SSH_HOST 'mv /home/k004373/rowing-staging/rot-updating /home/k004373/rowing-staging/rot' - ssh $SSH_USER@$SSH_HOST 'sudo systemctl start rotstaging' only: @@ -62,7 +62,7 @@ deploy-main: - scp -r static $SSH_USER@$SSH_HOST:/home/k004373/rowing/ - scp -r templates $SSH_USER@$SSH_HOST:/home/k004373/rowing/ - scp -r svelte $SSH_USER@$SSH_HOST:/home/k004373/rowing/ - - ssh $SSH_USER@$SSH_HOST 'mkdir -p /home/k004373/rowing/svelte/build' + - ssh $SSH_USER@$SSH_HOST 'mkdir -p /home/k004373/rowing/svelte/build && mkdir -p /home/k004373/rowing/data-ergo/thirty && mkdir -p /home/k004373/rowing/data-ergo/dozen' - ssh $SSH_USER@$SSH_HOST 'sudo systemctl stop rot' - ssh $SSH_USER@$SSH_HOST 'mv /home/k004373/rowing/rot-updating /home/k004373/rowing/rot' - ssh $SSH_USER@$SSH_HOST 'sudo systemctl start rot' diff --git a/Rocket.toml b/Rocket.toml index f774acf..e572218 100644 --- a/Rocket.toml +++ b/Rocket.toml @@ -1,3 +1,4 @@ [default] secret_key = "/NtVGizglEoyoxBLzsRDWTy4oAG1qDw4J4O+CWJSv+fypD7W9sam8hUY4j90EZsbZk8wEradS5zBoWtWKi3k8w==" rss_key = "rss-key-for-ci" +limits = { file = "10 MiB", data-form = "10 MiB"} diff --git a/db.sqlite.bkp b/db.sqlite.bkp deleted file mode 100644 index 0ff20bc..0000000 Binary files a/db.sqlite.bkp and /dev/null differ diff --git a/frontend/main.ts b/frontend/main.ts index f65bfe0..625abd6 100644 --- a/frontend/main.ts +++ b/frontend/main.ts @@ -22,14 +22,23 @@ document.addEventListener('DOMContentLoaded', function() { function setCurrentdate(input: HTMLInputElement) { if(input) { - const inputElement = document.getElementById("departure") as HTMLInputElement; const now = new Date(); const formattedDateTime = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}-${String(now.getDate()).padStart(2, '0')}T${String(now.getHours()).padStart(2, '0')}:${String(now.getMinutes()).padStart(2, '0')}`; - inputElement.value = formattedDateTime; + input.value = formattedDateTime; } } +interface ChoiceBoatEvent extends Event{ + detail: { + value: string; + label: string, + customProperties: { + amount_seats: number, + } + }; +} + function selectBoatChange() { const boatSelect = document.querySelector('#boat_id'); @@ -39,106 +48,111 @@ function selectBoatChange() { noResultsText: 'Keine Ergebnisse gefunden', noChoicesText: 'Keine Ergebnisse gefunden', itemSelectText: 'Zum Auswählen klicken', - callbackOnCreateTemplates: function () { - return { - option: ({ label, value, customProperties, active, disabled, }: any) => { - const opt: HTMLOptionElement = Choices.defaults.templates.option.call( - this, - { label, value, customProperties, active, disabled } - ); - - // We get the original