From: Daniel Karbach Date: Sat, 29 Nov 2025 11:53:07 +0000 (+0100) Subject: result changes recalculation X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=cc1b7d748b05c2ec87f4f57210882d2f62d6b5bc;p=alttp.git result changes recalculation --- diff --git a/app/Console/Commands/RecalculateResultChanges.php b/app/Console/Commands/RecalculateResultChanges.php new file mode 100644 index 0000000..71061a5 --- /dev/null +++ b/app/Console/Commands/RecalculateResultChanges.php @@ -0,0 +1,41 @@ +round->protocols() + ->where('type', '=', 'result.report') + ->where('user_id', '=', $result->user_id) + ->count(); + if ($reports > 1) { + $result->changed = $reports - 1; + $result->save(); + } + } + } +}