112 Commits

Author SHA1 Message Date
a59d8c0331 Merge pull request 'enable self-enrollment to ergo challenge' (#1147) from allow-ergo-entry into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 18m23s
CI/CD Pipeline / deploy-staging (push) Successful in 10m49s
CI/CD Pipeline / deploy-main (push) Has been skipped
Update Cargo Dependencies / update-dependencies (push) Successful in 1m52s
Reviewed-on: #1147
2025-10-07 19:08:49 +02:00
567f31dd3d enable self-enrollment to ergo challenge
Some checks failed
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
2025-10-07 19:08:20 +02:00
71760a500f Merge pull request 'allow-ergo-entry' (#1145) from allow-ergo-entry into staging
Some checks failed
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
CI/CD Pipeline / test (push) Has been cancelled
Reviewed-on: #1145
2025-10-07 18:53:41 +02:00
b48b689aeb allow ergo entry
Some checks failed
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
CI/CD Pipeline / test (push) Has been cancelled
2025-10-07 18:53:13 +02:00
9f57cbaa71 Merge pull request 'add-ergo-role' (#1143) from add-ergo-role into main
All checks were successful
CI/CD Pipeline / test (push) Successful in 15m49s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Successful in 8m49s
Reviewed-on: #1143
2025-10-07 16:53:06 +02:00
a1b18d6f92 Merge pull request 'nicer formatting' (#1144) from add-ergo-role into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 19m13s
CI/CD Pipeline / deploy-staging (push) Successful in 9m6s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1144
2025-10-07 16:52:57 +02:00
Philipp Hofer
284a853344 nicer formatting
Some checks failed
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
2025-10-07 16:52:01 +02:00
465a42acac Merge pull request 'also show button again' (#1142) from add-ergo-role into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 17m8s
CI/CD Pipeline / deploy-staging (push) Successful in 9m6s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1142
2025-10-07 16:24:37 +02:00
Philipp Hofer
ebce600356 also show button again
All checks were successful
CI/CD Pipeline / test (push) Successful in 19m25s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
2025-10-07 16:04:44 +02:00
6e418b6f2f Merge pull request 'fix-cii' (#1140) from fix-cii into staging
Some checks failed
Update Cargo Dependencies / update-dependencies (push) Successful in 2m19s
CI/CD Pipeline / test (push) Has started running
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
Reviewed-on: #1140
2025-10-02 09:02:39 +02:00
328a8e3e35 Merge pull request 'fix-cii' (#1139) from fix-cii into main
Some checks failed
CI/CD Pipeline / test (push) Failing after 41m48s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1139
2025-10-02 09:02:28 +02:00
bfb95610f6 fix ci?
All checks were successful
CI/CD Pipeline / test (push) Successful in 32m54s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
2025-10-02 08:40:46 +02:00
68674dd1c5 debug
Some checks failed
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
CI/CD Pipeline / test (push) Has been cancelled
2025-10-02 08:38:03 +02:00
9a16ce0c21 Merge pull request 'restore-fix-ci' (#1138) from restore-fix-ci into staging
Some checks failed
CI/CD Pipeline / test (push) Failing after 17m53s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1138
2025-10-02 00:35:29 +02:00
16689318eb Merge pull request 'Restore content from fix-ci-finally' (#1137) from restore-fix-ci into main
Some checks failed
CI/CD Pipeline / test (push) Failing after 21m49s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1137
2025-10-02 00:35:21 +02:00
b12ea81bbf Restore content from fix-ci-finally
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
2025-10-02 00:34:12 +02:00
49a638d595 Merge pull request 'replace-main-with-fix' (#1136) from replace-main-with-fix into main
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
Reviewed-on: #1136
2025-10-02 00:32:24 +02:00
452d257c7a Merge pull request 'replace-main-with-fix' (#1135) from replace-main-with-fix into staging
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
Reviewed-on: #1135
2025-10-02 00:32:15 +02:00
599eec0e43 Replace main content with fix-ci-finally
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
2025-10-02 00:29:28 +02:00
433c914c4a fix ci
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
2025-10-02 00:25:43 +02:00
0338351eef reduce npm warnings 2025-10-01 23:46:49 +02:00
e1803aea3e Merge pull request 'update deps, fix ci' (#1134) from no-ergo into main
Some checks failed
CI/CD Pipeline / test (push) Failing after 51m37s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1134
2025-10-01 22:41:40 +02:00
6f491e20e5 Merge pull request 'update deps, fix ci' (#1133) from no-ergo into staging
Some checks failed
CI/CD Pipeline / test (push) Failing after 44m35s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1133
2025-10-01 22:41:32 +02:00
7f26710a40 fix ci?
Some checks failed
CI/CD Pipeline / test (push) Has started running
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
2025-10-01 22:24:13 +02:00
9203c61541 fix ci?
Some checks failed
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
CI/CD Pipeline / test (push) Has been cancelled
2025-10-01 22:07:21 +02:00
3a57a1334d update npm mods
Some checks failed
CI/CD Pipeline / test (push) Failing after 17m54s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
2025-10-01 21:44:24 +02:00
72c19d7a75 Merge pull request 'no ergo yet' (#1132) from no-ergo into main
Some checks failed
CI/CD Pipeline / test (push) Failing after 16m2s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1132
2025-10-01 20:25:08 +02:00
8b25076599 Merge pull request 'no-ergo' (#1131) from no-ergo into staging
Some checks failed
CI/CD Pipeline / test (push) Failing after 17m9s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1131
2025-10-01 20:24:26 +02:00
a44f8b445c no ergo yet
Some checks failed
CI/CD Pipeline / test (push) Failing after 25m9s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
2025-10-01 20:23:09 +02:00
5ec457fea7 Merge pull request 'log-frontend-test-logs' (#1119) from log-frontend-test-logs into main
Some checks failed
CI/CD Pipeline / test (push) Failing after 16m52s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1119
2025-07-24 11:51:49 +02:00
3ce95ecb49 Merge pull request 'log-frontend-test-logs' (#1118) from log-frontend-test-logs into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 21m14s
CI/CD Pipeline / deploy-staging (push) Successful in 9m52s
CI/CD Pipeline / deploy-main (push) Has been skipped
Update Cargo Dependencies / update-dependencies (push) Successful in 1m38s
Reviewed-on: #1118
2025-07-24 11:46:53 +02:00
4fcd34cfa9 generate html report
Some checks failed
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
CI/CD Pipeline / test (push) Has been cancelled
2025-07-24 11:23:39 +02:00
d64f6f61ba reduce useless compiler warnings 2025-07-24 11:23:32 +02:00
5934bbe666 Merge pull request 'get errors' (#1117) from log-frontend-test-logs into main
All checks were successful
CI/CD Pipeline / test (push) Successful in 21m13s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Successful in 8m6s
Reviewed-on: #1117
2025-07-24 11:01:53 +02:00
f08764c3d1 Merge pull request 'get errors' (#1116) from log-frontend-test-logs into staging
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
Reviewed-on: #1116
2025-07-24 11:01:33 +02:00
b7cc01ff1c get errors
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
2025-07-24 11:00:49 +02:00
e9a78db048 Merge pull request 'families only have to pay einschriebgebuehr once + half price applies' (#1115) from fix-family-fees into main
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
Reviewed-on: #1115
2025-07-24 08:55:43 +02:00
b52e3160d5 Merge pull request 'fix-family-fees' (#1114) from fix-family-fees into staging
Some checks failed
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
CI/CD Pipeline / test (push) Failing after 33m18s
Reviewed-on: #1114
2025-07-24 08:55:30 +02:00
0996a81d52 families only have to pay einschriebgebuehr once + half price applies
Some checks failed
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
2025-07-24 08:52:26 +02:00
25df7a935c Merge pull request '[BUGFIX] set max items in choices.js after searching' (#1113) from show-daniels into main
All checks were successful
CI/CD Pipeline / test (push) Successful in 24m12s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Successful in 15m49s
Reviewed-on: #1113
2025-07-20 12:02:13 +02:00
6f7077adf4 Merge pull request 'show-daniels' (#1112) from show-daniels into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 23m33s
CI/CD Pipeline / deploy-staging (push) Successful in 11m40s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1112
2025-07-20 12:01:55 +02:00
Marie Birner
55c0647b55 [BUGFIX] set max items in choices.js after searching
Some checks failed
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
2025-07-20 11:57:45 +02:00
4b2107d0f6 Merge pull request 'upda' (#1109) from upda into staging
Some checks failed
CI/CD Pipeline / test (push) Has started running
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
Reviewed-on: #1109
2025-07-20 11:33:04 +02:00
de544b9c98 Merge pull request 'fix path' (#1107) from new-server into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 22m37s
CI/CD Pipeline / deploy-staging (push) Successful in 10m55s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1107
2025-07-19 13:23:56 +02:00
302ff3c8a3 Merge pull request 'it's okay to not have this already' (#1105) from new-server into staging
Some checks failed
CI/CD Pipeline / test (push) Successful in 19m38s
CI/CD Pipeline / deploy-staging (push) Failing after 8m29s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1105
2025-07-19 10:53:26 +02:00
657b378169 Merge pull request 'fix path' (#1103) from new-server into staging
Some checks failed
CI/CD Pipeline / test (push) Successful in 22m21s
CI/CD Pipeline / deploy-staging (push) Failing after 7m53s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1103
2025-07-19 07:04:28 +02:00
cb65f24f67 Merge pull request 'new-server' (#1101) from new-server into staging
Some checks failed
CI/CD Pipeline / test (push) Successful in 23m30s
CI/CD Pipeline / deploy-staging (push) Failing after 6m50s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1101
2025-07-18 18:57:33 +02:00
2bb2942a0f Merge pull request 'fix-tetss' (#1098) from fix-tetss into staging
Some checks failed
CI/CD Pipeline / test (push) Successful in 21m41s
CI/CD Pipeline / deploy-staging (push) Failing after 7m1s
CI/CD Pipeline / deploy-main (push) Has been skipped
Update Cargo Dependencies / update-dependencies (push) Successful in 1m28s
Reviewed-on: #1098
2025-07-17 21:49:09 +02:00
6b78f31aa4 Merge pull request 'kiosk-allow-foerdernde' (#1096) from kiosk-allow-foerdernde into staging
Some checks failed
CI/CD Pipeline / test (push) Failing after 26m22s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1096
2025-07-13 21:42:09 +02:00
c7f1702663 Merge pull request 'foerderne-user-can-do-trips' (#1093) from foerderne-user-can-do-trips into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 25m49s
CI/CD Pipeline / deploy-staging (push) Successful in 35m1s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1093
2025-07-13 09:54:48 +02:00
ccff9a3752 Merge pull request 'bootsman-to-cox' (#1089) from bootsman-to-cox into staging
All checks were successful
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
CI/CD Pipeline / test (push) Successful in 39m55s
Update Cargo Dependencies / update-dependencies (push) Successful in 1m27s
Reviewed-on: #1089
2025-07-03 11:03:40 +02:00
aac99c86fa Merge pull request 'updates-meeting' (#1084) from updates-meeting into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 19m45s
CI/CD Pipeline / deploy-staging (push) Successful in 10m17s
CI/CD Pipeline / deploy-main (push) Has been skipped
Update Cargo Dependencies / update-dependencies (push) Successful in 1m33s
Reviewed-on: #1084
2025-06-17 22:53:07 +02:00
2e13acc0b0 Merge pull request 'fix-ci' (#1079) from fix-ci into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 18m8s
CI/CD Pipeline / deploy-staging (push) Successful in 25m26s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1079
2025-06-13 11:07:48 +02:00
6a59634de3 Merge pull request 'log-trip-creation' (#1075) from log-trip-creation into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 19m20s
CI/CD Pipeline / deploy-staging (push) Successful in 25m7s
CI/CD Pipeline / deploy-main (push) Has been skipped
Update Cargo Dependencies / update-dependencies (push) Successful in 1m30s
Reviewed-on: #1075
2025-06-09 08:35:22 +02:00
63a32f02bf Merge pull request 'add license' Fixes #1064' (#1070) from upd into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 14m11s
CI/CD Pipeline / deploy-staging (push) Successful in 7m2s
CI/CD Pipeline / deploy-main (push) Has been skipped
Update Cargo Dependencies / update-dependencies (push) Successful in 1m7s
Reviewed-on: #1070
2025-05-29 16:06:28 +02:00
429f0c1ddc Merge pull request 'upd' (#1068) from upd into staging
Some checks failed
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
Reviewed-on: #1068
2025-05-29 16:02:37 +02:00
0354e4e190 Merge pull request 'fix tests' (#1067) from use-proper-role into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 13m46s
CI/CD Pipeline / deploy-staging (push) Successful in 14m1s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1067
2025-05-29 12:12:39 +02:00
7935d1837f Merge pull request 'use-proper-role' (#1065) from use-proper-role into staging
Some checks failed
CI/CD Pipeline / test (push) Has started running
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
Reviewed-on: #1065
2025-05-29 12:11:13 +02:00
f769af279b Merge pull request 'fix-uppercase-non-ascii-name' (#1062) from fix-uppercase-non-ascii-name into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 14m10s
CI/CD Pipeline / deploy-staging (push) Successful in 7m2s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1062
2025-05-27 08:54:45 +02:00
de62585b64 Merge pull request 'nicer-text' (#1060) from nicer-text into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 14m8s
CI/CD Pipeline / deploy-staging (push) Successful in 7m32s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1060
2025-05-26 23:42:42 +02:00
ac24be6c5e Merge pull request 'add docs' (#1056) from docs into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 13m21s
CI/CD Pipeline / deploy-staging (push) Successful in 6m36s
CI/CD Pipeline / deploy-main (push) Has been skipped
Update Cargo Dependencies / update-dependencies (push) Successful in 1m23s
Reviewed-on: #1056
2025-05-22 13:25:53 +02:00
13976b02d8 Merge pull request 'add planned mod' (#1053) from restructure into staging
Some checks failed
CI/CD Pipeline / test (push) Successful in 15m55s
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
Reviewed-on: #1053
2025-05-22 13:07:46 +02:00
3aef4fa971 Merge pull request 'reservation-border' (#1049) from reservation-border into staging
Some checks failed
CI/CD Pipeline / test (push) Successful in 15m8s
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
Reviewed-on: #1049
2025-05-22 12:42:54 +02:00
29e9911653 Merge pull request 'restructure' (#1050) from restructure into staging
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
Reviewed-on: #1050
2025-05-22 12:41:49 +02:00
eca711e572 Merge pull request 'board members can delete trips, proper notification + succ message is created' (#1047) from board-can-delete-trips into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 14m8s
CI/CD Pipeline / deploy-staging (push) Successful in 24m25s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1047
2025-05-21 09:58:14 +02:00
09aa0fc136 Merge pull request 'allow scheckbuch finances editing via /user/fees' (#1045) from consistent-user-management into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 15m13s
CI/CD Pipeline / deploy-staging (push) Successful in 7m46s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1045
2025-05-17 16:35:57 +02:00
cc9505ca1e Merge pull request 'dont-repeatedly-get-price' (#1043) from dont-repeatedly-get-price into staging
Some checks failed
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
Reviewed-on: #1043
2025-05-17 16:24:00 +02:00
22f70f533a Merge pull request 'language-improvement' (#1041) from language-improvement into staging
Some checks failed
CI/CD Pipeline / test (push) Successful in 15m21s
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
Reviewed-on: #1041
2025-05-17 15:59:51 +02:00
6df029b4a7 Merge pull request 'default duration in cal of trips with type Lange Ausfahrt -> 6 hrs (instead of 3); Fixes #939' (#1040) from longer-long-trips into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 15m39s
CI/CD Pipeline / deploy-staging (push) Successful in 7m41s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1040
2025-05-17 10:08:58 +02:00
1d4d59842b Merge pull request 'nx-link' (#1037) from nx-link into staging
Some checks failed
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
Reviewed-on: #1037
2025-05-17 09:55:22 +02:00
a63d29a42a Merge pull request 'more-activities' (#1035) from more-activities into staging
Some checks failed
CI/CD Pipeline / test (push) Has started running
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
Reviewed-on: #1035
2025-05-17 09:50:01 +02:00
1f4ebc31ed Merge pull request 'use formatted_names in roles' (#1033) from format-roles into staging
Some checks failed
CI/CD Pipeline / test (push) Successful in 14m58s
CI/CD Pipeline / deploy-main (push) Has been cancelled
CI/CD Pipeline / deploy-staging (push) Has been cancelled
Reviewed-on: #1033
2025-05-17 09:13:43 +02:00
50cd3c2d75 Merge pull request 'already-in-db' (#1031) from already-in-db into staging
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
Reviewed-on: #1031
2025-05-17 09:07:40 +02:00
0edd796f73 Merge pull request 'new-fee-structure' (#1028) from new-fee-structure into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 15m35s
CI/CD Pipeline / deploy-staging (push) Successful in 8m3s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1028
2025-05-16 23:19:20 +02:00
e883c0e6e2 Merge pull request 'auto-update-both-branches' (#1025) from auto-update-both-branches into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 17m11s
CI/CD Pipeline / deploy-staging (push) Successful in 8m36s
CI/CD Pipeline / deploy-main (push) Has been skipped
Update Cargo Dependencies / update-dependencies (push) Successful in 1m10s
Reviewed-on: #1025
2025-05-15 22:26:24 +02:00
d2390ca5c2 Merge pull request 'fix/ci' (#1023) from fix/ci into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 16m21s
CI/CD Pipeline / deploy-staging (push) Successful in 7m52s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1023
2025-05-14 23:45:29 +02:00
4906b757b8 Merge pull request 'improve logging' (#1021) from improve-logging into staging
Some checks failed
CI/CD Pipeline / test (push) Failing after 10m26s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1021
2025-05-14 23:01:12 +02:00
0b62f59d19 Merge pull request 'add auto-update; Progress at #503' (#1019) from auto-update into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 13m56s
CI/CD Pipeline / deploy-staging (push) Successful in 22m28s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1019
2025-05-14 08:31:42 +02:00
924683511c Merge pull request 'nicer-notes' (#1016) from nicer-notes into staging
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
Reviewed-on: #1016
2025-05-14 08:15:46 +02:00
d7d6eb2b43 Merge pull request 'start replacing activitybuilder' (#1014) from acitvities-adaption into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 18m10s
CI/CD Pipeline / deploy-staging (push) Successful in 8m37s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1014
2025-05-12 23:09:27 +02:00
4859890389 Merge pull request 'prepare to remove old log, in favor of activities' (#1012) from acitvities-adaption into staging
Some checks failed
CI/CD Pipeline / test (push) Successful in 17m57s
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
Reviewed-on: #1012
2025-05-12 22:32:04 +02:00
4f34cc180c Merge pull request 'clean-backend-code' (#1008) from clean-backend-code into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 17m23s
CI/CD Pipeline / deploy-staging (push) Successful in 9m43s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1008
2025-05-11 20:55:49 +02:00
3c26381901 Merge pull request 'fix-notification' (#1006) from fix-notification into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 16m6s
CI/CD Pipeline / deploy-staging (push) Successful in 8m22s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1006
2025-05-10 15:48:34 +02:00
e01f9806bd Merge pull request 'inform new cox about things' (#1003) from informat-new-cox into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 16m25s
CI/CD Pipeline / deploy-staging (push) Successful in 8m17s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1003
2025-05-09 13:05:31 +02:00
71087af0df Merge pull request 'remove-notes' (#1001) from remove-notes into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 18m4s
CI/CD Pipeline / deploy-staging (push) Successful in 9m50s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1001
2025-05-09 08:45:15 +02:00
6efcaaccf9 Merge pull request 'show-all-activities' (#999) from show-all-activities into staging
Some checks failed
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
Reviewed-on: #999
2025-05-09 08:32:14 +02:00
60578dfaba Merge pull request 'fix-diamond-text' (#997) from fix-diamond-text into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 15m37s
CI/CD Pipeline / deploy-staging (push) Successful in 9m29s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #997
2025-05-07 13:44:43 +02:00
addf0f437b Merge pull request 'improve-role-view' (#995) from improve-role-view into staging
Some checks failed
CI/CD Pipeline / test (push) Successful in 15m40s
CI/CD Pipeline / deploy-main (push) Has been cancelled
CI/CD Pipeline / deploy-staging (push) Has been cancelled
Reviewed-on: #995
2025-05-07 13:06:33 +02:00
51df7f2d1e Merge pull request 'upd' (#993) from upd into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 30m10s
CI/CD Pipeline / deploy-staging (push) Successful in 24m9s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #993
2025-05-06 22:51:06 +02:00
78faf1b0db Merge pull request 'single-user-edit-page' (#991) from single-user-edit-page into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 15m12s
CI/CD Pipeline / deploy-staging (push) Successful in 7m17s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #991
2025-05-06 13:40:59 +02:00
e3fc756b3f Merge pull request 'single-user-edit-page' (#990) from single-user-edit-page into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 14m43s
CI/CD Pipeline / deploy-staging (push) Successful in 13m5s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #990
2025-05-06 10:14:55 +02:00
7083d27644 Merge pull request 'single-user-edit-page' (#986) from single-user-edit-page into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 16m24s
CI/CD Pipeline / deploy-staging (push) Successful in 8m23s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #986
2025-05-05 20:37:12 +02:00
8277ef6af8 Merge pull request 'allow to create users' (#978) from single-user-edit-page into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 14m29s
CI/CD Pipeline / deploy-staging (push) Successful in 7m14s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #978
2025-05-05 12:05:47 +02:00
67d5df9c18 Merge pull request 'Fill acitivites from various activities; Fixes #972' (#977) from single-user-edit-page into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 15m29s
CI/CD Pipeline / deploy-staging (push) Successful in 7m49s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #977
2025-05-04 19:05:38 +02:00
3ffc44a5a2 Merge pull request 'single-user-edit-page' (#975) from single-user-edit-page into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 15m18s
CI/CD Pipeline / deploy-staging (push) Successful in 7m57s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #975
2025-05-04 10:48:41 +02:00
bd2686fa9c Merge pull request 'add notes' (#973) from single-user-edit-page into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 14m2s
CI/CD Pipeline / deploy-staging (push) Successful in 7m5s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #973
2025-05-03 21:37:31 +02:00
495ee666cd Merge pull request 'single-user-edit-page' (#971) from single-user-edit-page into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 15m33s
CI/CD Pipeline / deploy-staging (push) Successful in 7m46s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #971
2025-05-03 19:20:17 +02:00
5296b6a6c1 Merge pull request 'single-user-edit-page' (#970) from single-user-edit-page into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 13m54s
CI/CD Pipeline / deploy-staging (push) Successful in 7m8s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #970
2025-05-03 13:46:39 +02:00
49e657ab54 Merge pull request 'single-user-edit-page' (#968) from single-user-edit-page into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 13m27s
CI/CD Pipeline / deploy-staging (push) Successful in 6m34s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #968
2025-05-02 18:16:53 +02:00
25bbaca0d3 Merge pull request 'show payment status in user view; Fixes #965' (#967) from single-user-edit-page into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 14m54s
CI/CD Pipeline / deploy-staging (push) Successful in 8m6s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #967
2025-04-30 23:32:36 +02:00
26038eabe4 Merge pull request 'single-user-edit-page' (#966) from single-user-edit-page into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 14m39s
CI/CD Pipeline / deploy-staging (push) Successful in 7m3s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #966
2025-04-30 22:32:46 +02:00
57acd92e7c Merge pull request 'fix-list-scheckbuch' (#960) from fix-list-scheckbuch into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 14m37s
CI/CD Pipeline / deploy-staging (push) Successful in 7m3s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #960
2025-04-29 23:01:50 +02:00
c136c60e62 Merge pull request 'separate-scheckbuch-user' (#948) from separate-scheckbuch-user into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 14m17s
CI/CD Pipeline / deploy-staging (push) Successful in 6m45s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #948
2025-04-29 21:06:00 +02:00
a5e90ea014 Merge pull request 'log-event-updates' (#946) from log-event-updates into staging
Some checks failed
CI/CD Pipeline / test (push) Failing after 10m29s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #946
2025-04-29 20:37:11 +02:00
f0f3909239 Merge pull request 'format-cal-according-to-standard' (#944) from format-cal-according-to-standard into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 14m35s
CI/CD Pipeline / deploy-staging (push) Successful in 21m47s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #944
2025-04-28 22:20:39 +02:00
1438bbe3a8 Merge pull request 'hide-box' (#935) from hide-box into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 16m53s
CI/CD Pipeline / deploy-staging (push) Successful in 7m59s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #935
2025-04-19 21:30:20 +02:00
a910cd745d Merge pull request 'document nextcloud integration, for future nextcloud setups' (#933) from doc-nextcloud-integration into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 15m47s
CI/CD Pipeline / deploy-staging (push) Successful in 7m25s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #933
2025-04-19 09:19:58 +02:00
6265440288 Merge pull request 'zero-rower-events' (#931) from zero-rower-events into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 16m10s
CI/CD Pipeline / deploy-staging (push) Successful in 7m42s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #931
2025-04-19 00:22:27 +02:00
3baed66ebc Merge pull request 'also be able to cancel trips (not only events)' (#929) from zero-rower-events into staging
Some checks failed
CI/CD Pipeline / test (push) Failing after 13m39s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #929
2025-04-18 23:32:34 +02:00
499ce06438 Merge pull request 'zero-rower-events; Fixes #913' (#927) from zero-rower-events into staging
Some checks failed
CI/CD Pipeline / test (push) Has started running
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
Reviewed-on: #927
2025-04-18 23:12:41 +02:00
67e5277c62 Merge pull request 'remove unused dep; cargo clippy' (#925) from simple-nx-auth into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 15m20s
CI/CD Pipeline / deploy-staging (push) Successful in 7m38s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #925
2025-04-18 17:45:44 +02:00
ce154bf060 Merge pull request 'simple-nx-auth' (#923) from simple-nx-auth into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 16m3s
CI/CD Pipeline / deploy-staging (push) Successful in 7m41s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #923
2025-04-18 17:10:44 +02:00
10 changed files with 176 additions and 116 deletions

View File

@@ -17,6 +17,9 @@ jobs:
- name: Run Test DB Script
run: ./test_db.sh
- name: Test
run: npm --version
- name: Cache Cargo dependencies
uses: Swatinem/rust-cache@v2
@@ -25,15 +28,15 @@ jobs:
cargo build
cd frontend && npm install && npm run build
- name: Frontend tests
run: cd frontend && npx playwright install && npx playwright test --workers 1 --reporter line
run: cd frontend && npx playwright install && npx playwright test --workers 1 --reporter html,line
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: frontend/playwright-report/
retention-days: 30
- name: Backend tests
run: cargo test --verbose
#- uses: actions/upload-artifact@v3
# if: always()
# with:
# name: playwright-report
# path: frontend/playwright-report/
# retention-days: 30
deploy-staging:
runs-on: ubuntu-latest

View File

@@ -413,7 +413,7 @@ function initNewChoice(select: HTMLInputElement) {
steering_person.setAttribute("required", "required");
}
const choice = new Choices(select, {
searchResultLimit: -1,
searchResultLimit: 100,
searchFields: ["label", "value", "customProperties.searchableText"],
removeItemButton: true,
loadingText: "Wird geladen...",
@@ -426,7 +426,6 @@ function initNewChoice(select: HTMLInputElement) {
return `Nur ${maxItemCount} Ruderer können hinzugefügt werden`;
},
callbackOnInit: function () {
console.log(this);
this._currentState.items.forEach(function (obj) {
if (boat_in_ottensheim && obj.customProperties) {
if (obj.customProperties.is_racing) {

View File

@@ -16,12 +16,12 @@
"postcss": "^8.4.21",
"sass": "^1.60.0",
"tailwindcss": "^3.3.1",
"typescript": "^4.9.5",
"typescript": "^5.9.3",
"vite": "^4.2.0",
"vite-plugin-static-copy": "^0.13.1"
},
"dependencies": {
"choices.js": "^11.1.0",
"choices.js": "^10.2.0",
"d3": "^7.8.5",
"terser": "^5.21.0"
}

6
package-lock.json generated Normal file
View File

@@ -0,0 +1,6 @@
{
"name": "rowt",
"lockfileVersion": 3,
"requires": true,
"packages": {}
}

View File

@@ -8,7 +8,7 @@ use crate::model::{
notification::Notification,
role::Role,
};
use chrono::NaiveDate;
use chrono::{Datelike, Local, NaiveDate};
use rocket::{fs::TempFile, tokio::io::AsyncReadExt};
use sqlx::SqlitePool;
@@ -578,4 +578,32 @@ impl User {
Ok(())
}
pub(crate) async fn has_to_pay_einschreibgebuehr_this_year(&self, db: &SqlitePool) -> bool {
if !self.has_role(db, "schnupperant").await {
if let Some(member_since_date) = &self.member_since_date {
if let Ok(member_since_date) =
NaiveDate::parse_from_str(member_since_date, "%Y-%m-%d")
{
if member_since_date.year() == Local::now().year()
&& !self.has_role(db, "no-einschreibgebuehr").await
{
return true;
}
}
}
}
false
}
pub(crate) fn has_to_pay_only_half(&self) -> bool {
if let Some(member_since_date) = &self.member_since_date {
if let Ok(member_since_date) = NaiveDate::parse_from_str(member_since_date, "%Y-%m-%d")
{
let halfprice_startdate =
NaiveDate::from_ymd_opt(Local::now().year(), 7, 1).unwrap();
return member_since_date >= halfprice_startdate;
}
}
false
}
}

View File

@@ -1,10 +1,9 @@
use super::User;
use crate::{
BOAT_STORAGE, DUAL_MEMBERSHIP, EINSCHREIBGEBUEHR, FAMILY_THREE_OR_MORE, FAMILY_TWO, FOERDERND,
REGULAR, RENNRUDERBEITRAG, SCHECKBUCH, STUDENT_OR_PUPIL, TRIAL_ROWING, TRIAL_ROWING_REDUCED,
UNTERSTUETZEND, model::family::Family,
model::family::Family, BOAT_STORAGE, DUAL_MEMBERSHIP, EINSCHREIBGEBUEHR, FAMILY_THREE_OR_MORE,
FAMILY_TWO, FOERDERND, REGULAR, RENNRUDERBEITRAG, SCHECKBUCH, STUDENT_OR_PUPIL, TRIAL_ROWING,
TRIAL_ROWING_REDUCED, UNTERSTUETZEND,
};
use chrono::{Datelike, Local, NaiveDate};
use serde::Serialize;
use sqlx::SqlitePool;
@@ -81,30 +80,52 @@ impl User {
let mut fee = Fee::new();
if let Some(family) = Family::find_by_opt_id(db, self.family_id).await {
let mut einschreibgebuehr = false;
let mut half_price = true;
for member in family.members(db).await {
fee.add_person(&member);
if member.has_role(db, "paid").await {
fee.paid();
}
fee.merge(member.fee_without_families(db).await);
fee.merge(member.fee_without_families(db, true).await);
if member.has_to_pay_einschreibgebuehr_this_year(db).await {
einschreibgebuehr = true;
}
if !member.has_to_pay_only_half() {
half_price = false;
}
}
if family.amount_family_members(db).await > 2 {
fee.add("Familie 3+ Personen".into(), FAMILY_THREE_OR_MORE);
if half_price {
fee.add(
"Familie 3+ Personen (Halbpreis)".into(),
FAMILY_THREE_OR_MORE / 2,
);
} else {
fee.add("Familie 3+ Personen".into(), FAMILY_THREE_OR_MORE);
}
} else {
fee.add("Familie 2 Personen".into(), FAMILY_TWO);
if half_price {
fee.add("Familie 2 Personen (Halbpreis)".into(), FAMILY_TWO / 2);
} else {
fee.add("Familie 2 Personen".into(), FAMILY_TWO);
}
}
if einschreibgebuehr {
fee.add("Einschreibgebühr (Familie)".into(), EINSCHREIBGEBUEHR);
}
} else {
fee.add_person(self);
if self.has_role(db, "paid").await {
fee.paid();
}
fee.merge(self.fee_without_families(db).await);
fee.merge(self.fee_without_families(db, false).await);
}
Some(fee)
}
async fn fee_without_families(&self, db: &SqlitePool) -> Fee {
async fn fee_without_families(&self, db: &SqlitePool, entry_fee_paid_with_family: bool) -> Fee {
let mut fee = Fee::new();
if !self.has_role(db, "Donau Linz").await
@@ -125,38 +146,24 @@ impl User {
let amount_boats = self.amount_boats(db).await;
if amount_boats > 0 {
fee.add(
format!("{}x Bootsplatz", amount_boats),
amount_boats * BOAT_STORAGE,
);
}
if !self.has_role(db, "schnupperant").await {
if let Some(member_since_date) = &self.member_since_date {
if let Ok(member_since_date) =
NaiveDate::parse_from_str(member_since_date, "%Y-%m-%d")
{
if member_since_date.year() == Local::now().year()
&& !self.has_role(db, "no-einschreibgebuehr").await
{
fee.add("Einschreibgebühr".into(), EINSCHREIBGEBUEHR);
}
}
if self.has_to_pay_only_half() {
fee.add(
format!("{}x Bootsplatz (Halbpreis)", amount_boats),
amount_boats * BOAT_STORAGE / 2,
);
} else {
fee.add(
format!("{}x Bootsplatz", amount_boats),
amount_boats * BOAT_STORAGE,
);
}
}
let halfprice = if let Some(member_since_date) = &self.member_since_date {
match NaiveDate::parse_from_str(member_since_date, "%Y-%m-%d") {
Ok(member_since_date) => {
let halfprice_startdate =
NaiveDate::from_ymd_opt(Local::now().year(), 7, 1).unwrap();
member_since_date >= halfprice_startdate
}
Err(_) => false,
}
} else {
false
};
if self.has_to_pay_einschreibgebuehr_this_year(db).await && !entry_fee_paid_with_family {
fee.add("Einschreibgebühr".into(), EINSCHREIBGEBUEHR);
}
let halfprice = self.has_to_pay_only_half();
if self.has_role(db, "schnupperant").await {
if self.has_role(db, "Student").await || self.has_role(db, "Schüler").await {

View File

@@ -795,6 +795,7 @@ macro_rules! special_user {
}
impl $name {
#[allow(dead_code)]
pub fn into_inner(self) -> User {
self.user
}
@@ -859,6 +860,7 @@ special_user!(AllowedForPlannedTripsUser, +"Donau Linz", +"scheckbuch", +"Förde
special_user!(DonauLinzUser, +"Donau Linz", +"Förderndes Mitglied", -"Unterstützend"); // TODO:
// remove ->
// RegularUser
special_user!(ErgoAdminUser, +"ergo-admin", +"admin");
special_user!(SchnupperBetreuerUser, +"schnupper-betreuer");
special_user!(VorstandUser, +"admin", +"Vorstand");
special_user!(EventUser, +"manage_events");

View File

@@ -1,8 +1,7 @@
use std::env;
use chrono::Utc;
use chrono::{Datelike, Utc};
use rocket::{
FromForm, Route, State,
form::Form,
fs::TempFile,
get,
@@ -10,18 +9,19 @@ use rocket::{
post,
request::FlashMessage,
response::{Flash, Redirect},
routes,
routes, FromForm, Route, State,
};
use rocket_dyn_templates::{Template, context};
use rocket_dyn_templates::{context, Template};
use serde::Serialize;
use sqlx::SqlitePool;
use tera::Context;
use crate::model::{
activity::ActivityBuilder,
log::Log,
notification::Notification,
role::Role,
user::{AdminUser, User, UserWithDetails},
user::{AdminUser, ErgoAdminUser, User, UserWithDetails},
};
#[derive(Serialize)]
@@ -59,7 +59,7 @@ async fn send(db: &State<SqlitePool>, _user: AdminUser) -> Template {
}
#[get("/reset")]
async fn reset(db: &State<SqlitePool>, _user: AdminUser) -> Flash<Redirect> {
async fn reset(db: &State<SqlitePool>, _user: ErgoAdminUser) -> Flash<Redirect> {
sqlx::query!("UPDATE user SET dirty_thirty = NULL, dirty_dozen = NULL;")
.execute(db.inner())
.await
@@ -74,7 +74,7 @@ async fn reset(db: &State<SqlitePool>, _user: AdminUser) -> Flash<Redirect> {
#[get("/<challenge>/user/<user_id>/new?<new>")]
async fn update(
db: &State<SqlitePool>,
_admin: AdminUser,
_admin: ErgoAdminUser,
challenge: &str,
user_id: i64,
new: &str,
@@ -146,47 +146,61 @@ pub struct UserAdd {
sex: String,
}
//#[post("/set-data", data = "<data>")]
//async fn new_user(db: &State<SqlitePool>, data: Form<UserAdd>, user: User) -> Flash<Redirect> {
// if user.has_role(db, "ergo").await {
// return Flash::error(Redirect::to("/ergo"), "Du hast deine Daten schon eingegeben. Wenn du sie updaten willst, melde dich bitte bei it@rudernlinz.at");
// }
//
// // check data
// if data.birthyear < 1900 || data.birthyear > chrono::Utc::now().year() - 5 {
// return Flash::error(Redirect::to("/ergo"), "Bitte überprüfe dein Geburtsjahr...");
// }
// if data.weight < 20 || data.weight > 200 {
// return Flash::error(Redirect::to("/ergo"), "Bitte überprüfe dein Gewicht...");
// }
// if &data.sex != "f" && &data.sex != "m" {
// return Flash::error(Redirect::to("/ergo"), "Bitte überprüfe dein Geschlecht...");
// }
//
// // set data
// user.update_ergo(db, data.birthyear, data.weight, &data.sex)
// .await;
//
// // inform all other `ergo` users
// let ergo = Role::find_by_name(db, "ergo").await.unwrap();
// Notification::create_for_role(
// db,
// &ergo,
// &format!("{} nimmt heuer an der Ergochallenge teil 💪", user.name),
// "Ergo Challenge",
// None,
// None,
// )
// .await;
//
// // add to `ergo` group
// user.add_role(db, &ergo).await.unwrap();
//
// Flash::success(
// Redirect::to("/ergo"),
// "Du hast deine Daten erfolgreich eingegeben. Viel Spaß beim Schwitzen :-)",
// )
//}
#[post("/set-data", data = "<data>")]
async fn new_user(db: &State<SqlitePool>, data: Form<UserAdd>, user: User) -> Flash<Redirect> {
if user.has_role(db, "ergo").await {
return Flash::error(Redirect::to("/ergo"), "Du hast deine Daten schon eingegeben. Wenn du sie updaten willst, melde dich bitte bei info@rudernlinz.at");
}
// check data
if data.birthyear < 1900 || data.birthyear > chrono::Utc::now().year() - 5 {
return Flash::error(Redirect::to("/ergo"), "Bitte überprüfe dein Geburtsjahr...");
}
if data.weight < 20 || data.weight > 200 {
return Flash::error(Redirect::to("/ergo"), "Bitte überprüfe dein Gewicht...");
}
if &data.sex != "f" && &data.sex != "m" {
return Flash::error(Redirect::to("/ergo"), "Bitte überprüfe dein Geschlecht...");
}
// set data
user.update_ergo(db, data.birthyear, data.weight, &data.sex)
.await;
// inform all other `ergo` users
let ergo = Role::find_by_name(db, "ergo").await.unwrap();
Notification::create_for_role(
db,
&ergo,
&format!("{} nimmt heuer an der Ergochallenge teil 💪", user.name),
"Ergo Challenge",
None,
None,
)
.await;
// add to `ergo` group
sqlx::query!(
"INSERT INTO user_role(user_id, role_id) VALUES (?, ?)",
user.id,
ergo.id
)
.execute(db.inner())
.await
.unwrap();
ActivityBuilder::new(&format!(
"{user} nimmt an der Ergo-Challenge teil und hat gerade die Daten eingegeben."
))
.user(&user)
.save(db)
.await;
Flash::success(
Redirect::to("/ergo"),
"Du hast deine Daten erfolgreich eingegeben. Viel Spaß beim Schwitzen :-)",
)
}
#[derive(FromForm, Debug)]
pub struct ErgoToAdd<'a> {
@@ -359,10 +373,7 @@ async fn new_dozen(
}
pub fn routes() -> Vec<Route> {
routes![
index, new_thirty, new_dozen, send, reset, update,
// new_user
]
routes![index, new_thirty, new_dozen, send, reset, update, new_user]
}
#[cfg(test)]

View File

@@ -2,7 +2,7 @@ use std::{fs::OpenOptions, io::Write};
use chrono::{Datelike, Local};
use rocket::{
Build, Data, FromForm, Request, Rocket, State, catch, catchers,
catch, catchers,
fairing::{AdHoc, Fairing, Info, Kind},
form::Form,
fs::FileServer,
@@ -13,6 +13,7 @@ use rocket::{
response::{Flash, Redirect},
routes,
time::{Duration, OffsetDateTime},
Build, Data, FromForm, Request, Rocket, State,
};
use rocket_dyn_templates::Template;
use serde::Deserialize;
@@ -20,7 +21,6 @@ use sqlx::SqlitePool;
use tera::Context;
use crate::{
SCHECKBUCH,
model::{
logbook::Logbook,
notification::Notification,
@@ -28,6 +28,7 @@ use crate::{
role::Role,
user::{User, UserWithDetails},
},
SCHECKBUCH,
};
pub(crate) mod admin;
@@ -330,13 +331,11 @@ mod test {
assert_eq!(response.status(), Status::Ok);
assert!(
response
.into_string()
.await
.unwrap()
.contains("Ruderassistent")
);
assert!(response
.into_string()
.await
.unwrap()
.contains("Ruderassistent"));
}
#[sqlx::test]

View File

@@ -15,10 +15,7 @@
class="link-primary">Überblick der Challenges</a>
</li>
<li class="py-1">
Eintragung ist jederzeit möglich, alle Daten die bis Sonntag 23:59 hier hochgeladen wurden, werden gesammelt an die Ister Ergo Challenge geschickt
<li class="py-1">
Montag &rarr; gemeinsames Training; bitte um <a href="/planned" class="link-primary">Anmeldung</a>, damit jeder einen Ergo hat
</li>
Eintragung ist jederzeit möglich, wenn du sie auch an die offizielle Liste schicken willst, kannst du das <a href="https://data.ergochallenge.at/" target="_blank" style="text-decoration: underline">hier</a> machen
<li class="py-1">
<a href="https://data.ergochallenge.at"
target="_blank"
@@ -194,7 +191,7 @@
</div>
</details>
</div>
{% if "admin" in loggedin_user.roles %}
{% if "admin" in loggedin_user.roles or "ergo-admin" in loggedin_user.roles %}
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow grid gap-3">
<h2 class="h2">Update</h2>
<details class="p-2">
@@ -233,6 +230,14 @@
</ol>
</div>
</details>
<div class="mt-3 text-right">
<a href="/ergo/reset"
class="w-28 btn btn-alert"
onclick="return confirm('Willst du wirklich alle Ergo-Eingaben löschen?');">
{% include "includes/delete-icon" %}
Einträge löschen
</a>
</div>
</div>
</div>
{% endif %}