DONE: centralize theme color, interactive dashboard, increase winner result, refer TODO

This commit is contained in:
ISMAIL MASSERAN
2026-05-10 11:51:19 +08:00
parent 654a0c9fea
commit fd1baf34c8
47 changed files with 2680 additions and 932 deletions
+13
View File
@@ -2,6 +2,7 @@
namespace App\Http\Controllers;
use App\Election;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
@@ -37,6 +38,18 @@ class Util extends Controller
return \App\Election::find(Util::getCurrentElection())->status;
}
/**
* When the latest election has finished (status 3), the next setup actions
* must attach to a new draft row. Call before writes that bind to getCurrentElection().
*/
public static function ensureDraftElectionAfterCompletedCycle(): void
{
if (self::getElectionStatus() !== 3) {
return;
}
Election::create();
}
/**
* Upload image and return it's path
* @param {Request} $request