feat: Phase 2 - page CRUD, subscriber management, user management

This commit is contained in:
2026-04-03 21:15:40 +02:00
parent 78e1be3e3b
commit cf026f46b0
33 changed files with 1135 additions and 82 deletions

View File

@@ -74,6 +74,7 @@ class PreregistrationPage extends Model
public function isActive(): bool
{
$now = Carbon::now();
return $now->gte($this->start_date) && $now->lte($this->end_date);
}
@@ -86,4 +87,20 @@ class PreregistrationPage extends Model
{
return $query->where('is_active', true);
}
/**
* Lifecycle label for admin tables: before registration opens, open window, or after end.
*/
public function statusKey(): string
{
if ($this->isBeforeStart()) {
return 'before_start';
}
if ($this->isExpired()) {
return 'expired';
}
return 'active';
}
}