mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2026-05-18 20:34:52 +00:00
🎉 **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:
@@ -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),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user