14 Commits

Author SHA1 Message Date
gitea-actions 7635dd1649 Update Cargo dependencies
CI/CD Pipeline / test (push) Successful in 39m18s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
2026-05-15 02:13:41 +00:00
philipp e65c34688f Merge pull request 'Merge pull request 'fix ci' (#1210) from fix-cii into main' (#1211) from clean-families into staging
CI/CD Pipeline / test (push) Successful in 22m30s
CI/CD Pipeline / deploy-staging (push) Successful in 10m22s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1211
2026-05-03 12:10:05 +02:00
philipp 987feacbbe Merge pull request 'clean /log by only showing boat reservation for the next 3 days' (#1209) from fix-cii into staging
CI/CD Pipeline / test (push) Successful in 25m7s
CI/CD Pipeline / deploy-staging (push) Successful in 39m56s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1209
2026-05-02 22:56:39 +02:00
philipp c1fc75b187 Merge pull request 'fix ci' (#1207) from fix-ci into staging
CI/CD Pipeline / test (push) Failing after 26m35s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1207
2026-05-01 08:35:29 +02:00
philipp c2d8427e1a Merge pull request 'Merge pull request 'be able to delete nomembership user' (#1198) from delete-no-membership-user into main' (#1204) from clean-log into staging
CI/CD Pipeline / test (push) Failing after 31m5s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1204
2026-04-30 11:40:46 +02:00
philipp 45f595e147 Merge pull request 'delete-no-membership-user' (#1197) from delete-no-membership-user into staging
CI/CD Pipeline / test (push) Failing after 28m51s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
Update Cargo Dependencies / update-dependencies (push) Successful in 1m44s
Reviewed-on: #1197
2026-03-20 08:39:58 +01:00
philipp de357c3db3 Merge pull request 'fix-user' (#1193) from fix-user into staging
CI/CD Pipeline / test (push) Failing after 29m32s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
Update Cargo Dependencies / update-dependencies (push) Successful in 2m14s
Reviewed-on: #1193
2026-03-16 10:00:56 +01:00
philipp b2157a31c5 Merge pull request 'user merging should only be done by admins' (#1182) from user-upd into staging
CI/CD Pipeline / test (push) Successful in 17m44s
CI/CD Pipeline / deploy-staging (push) Successful in 7m57s
CI/CD Pipeline / deploy-main (push) Has been skipped
Update Cargo Dependencies / update-dependencies (push) Successful in 1m43s
Reviewed-on: #1182
2026-01-08 20:23:08 +01:00
philipp bfb3ae4b6e Merge pull request 'user-upd' (#1180) from user-upd into staging
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: #1180
2026-01-08 20:15:41 +01:00
philipp 88a3e5f2d0 Merge pull request 'Merge pull request 'force an action on important notifications' (#1177) from force-action-on-important-notifications into main' (#1178) from new-sort-option into staging
CI/CD Pipeline / test (push) Successful in 17m44s
CI/CD Pipeline / deploy-staging (push) Successful in 7m49s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1178
2026-01-05 13:09:12 +01:00
philipp 32c250536d Merge pull request 'force-action-on-important-notifications' (#1176) from force-action-on-important-notifications into staging
CI/CD Pipeline / test (push) Successful in 17m51s
CI/CD Pipeline / deploy-staging (push) Successful in 7m56s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1176
2026-01-03 22:11:55 +01:00
philipp b9d0e2a2dc Merge pull request 'show-full-stats' (#1172) from show-full-stats into staging
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: #1172
2026-01-03 21:49:14 +01:00
philipp b597898bdf Merge pull request 'manual-deploy' (#1174) from manual-deploy into staging
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: #1174
2026-01-03 21:43:02 +01:00
philipp e90555214a Merge pull request 'No need to pay for deleted boats' (#1169) from handle-deleted-boats into staging
CI/CD Pipeline / test (push) Successful in 19m20s
CI/CD Pipeline / deploy-staging (push) Successful in 26m29s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #1169
2026-01-03 14:04:39 +01:00
5 changed files with 796 additions and 916 deletions
Generated
+792 -839
View File
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -23,11 +23,11 @@ tera = { version = "1.20", features = ["date-locale"], optional = true}
ics = "0.5"
futures = "0.3"
lettre = "0.11"
csv = "1.3"
csv = "1.4"
itertools = "0.14"
job_scheduler_ng = "2.2"
ureq = { version = "3.0", features = ["json"] }
regex = "1.11"
job_scheduler_ng = "2.4"
ureq = { version = "3.3", features = ["json"] }
regex = "1.12"
urlencoding = "2.1"
[target.'cfg(not(windows))'.dependencies]
-46
View File
@@ -271,52 +271,6 @@ ORDER BY created_at DESC
Ok(())
}
pub async fn unfix(&self, db: &SqlitePool, tech_user: &User) -> Result<(), String> {
if self.user_id_verified.is_some() {
return Err("Reparatur wurde bereits verifiziert und kann nicht mehr rückgängig gemacht werden.".into());
}
if self.user_id_fixed.is_none() {
return Err("Reparatur wurde noch nicht eingetragen.".into());
}
let boat = Boat::find_by_id(db, self.boat_id as i32)
.await
.ok_or("Boot gibt's ned")?;
Log::create(
db,
format!("Unfix boat damage id={} by user {:?}", self.id, tech_user),
)
.await;
sqlx::query!(
"UPDATE boat_damage SET user_id_fixed=NULL, fixed_at=NULL WHERE id=?",
self.id
)
.execute(db)
.await
.map_err(|e| e.to_string())?;
let technicals =
User::all_with_role(db, &Role::find_by_name(db, "tech").await.unwrap()).await;
for technical in technicals {
Notification::create(
db,
&technical,
&format!(
"{} hat die Reparatur des Bootschadens '{}' beim Boot '{}' als fehlerhaft eingetragen zurückgesetzt.",
tech_user.name, self.desc, boat.name,
),
"Bootsschaden-Reparatur rückgängig gemacht",
None,
None,
)
.await;
}
Ok(())
}
pub async fn verified(
&self,
db: &SqlitePool,
-20
View File
@@ -152,25 +152,6 @@ pub struct FormBoatDamageVerified<'r> {
desc: &'r str,
}
#[post("/<boatdamage_id>/unfix")]
async fn unfix(
db: &State<SqlitePool>,
boatdamage_id: i32,
techuser: TechUser,
) -> Flash<Redirect> {
let Some(boatdamage) = BoatDamage::find_by_id(db, boatdamage_id).await else {
return Flash::error(Redirect::to("/boatdamage"), "Bootsschaden nicht gefunden.");
};
let user: User = techuser.into_inner();
match boatdamage.unfix(db, &user).await {
Ok(_) => Flash::success(
Redirect::to("/boatdamage"),
"Reparatur wurde zurückgesetzt.",
),
Err(e) => Flash::error(Redirect::to("/boatdamage"), format!("Fehler: {e}")),
}
}
#[post("/<boatdamage_id>/verified", data = "<data>")]
async fn verified<'r>(
db: &State<SqlitePool>,
@@ -195,7 +176,6 @@ pub fn routes() -> Vec<Route> {
index_kiosk,
create,
fixed,
unfix,
verified,
create_from_kiosk
]
-7
View File
@@ -55,13 +55,6 @@
</small>
{% if boatdamage.fixed_at %}
<small class="block text-gray-600 dark:text-gray-100">Repariert von {{ boatdamage.user_fixed.name }} am/um {{ boatdamage.fixed_at | date(format='%d.%m.%Y (%H:%M)') }}</small>
{% if loggedin_user and "tech" in loggedin_user.roles and not boatdamage.verified_at %}
<form action="/boatdamage/{{ boatdamage.id }}/unfix" method="post" class="mt-1">
<input type="submit"
class="btn btn-dark text-sm"
value="Reparatur rückgängig" />
</form>
{% endif %}
{% else %}
{% if loggedin_user and loggedin_user.allowed_to_steer %}
<form action="/boatdamage/{{ boatdamage.id }}/fixed"