🎉 **Introduce meetup activity management**

- Added `is_active` and `last_event_at` fields to meetups with migration.
- Enhanced UI: Display `Aktiv`/`Inaktiv` badges and last event dates across dashboard, tables, and maps.
- Introduced `/meetups:update-activity` command to manage activity flags and timestamps.
- Validated latitude/longitude to prevent `0,0` inputs in city creation and updates.
- Updated factories and tests to include meetup activity states (`active`, `inactive`).
This commit is contained in:
HolgerHatGarKeineNode
2026-05-17 17:57:16 +02:00
parent bf9654de87
commit 71a4898303
16 changed files with 343 additions and 11 deletions
+18
View File
@@ -38,6 +38,24 @@ class MeetupFactory extends Factory
'nostr' => NostrHelper::randomNpub(),
'nostr_status' => NostrHelper::fakeNostrEventStatus(),
'created_by' => User::factory(),
'is_active' => false,
'last_event_at' => null,
];
}
public function active(): static
{
return $this->state(fn (array $attrs) => [
'is_active' => true,
'last_event_at' => now()->subDays(30),
]);
}
public function inactive(): static
{
return $this->state(fn (array $attrs) => [
'is_active' => false,
'last_event_at' => now()->subYears(2),
]);
}
}
@@ -0,0 +1,23 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('meetups', function (Blueprint $table) {
$table->boolean('is_active')->default(false)->after('visible_on_map');
$table->timestamp('last_event_at')->nullable()->after('is_active');
});
}
public function down(): void
{
Schema::table('meetups', function (Blueprint $table) {
$table->dropColumn(['is_active', 'last_event_at']);
});
}
};