🎉 **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
+34
View File
@@ -86,6 +86,40 @@ it('rejects city creation with non-existent country', function () {
->assertHasErrors(['country_id' => 'exists']);
});
it('rejects city creation when latitude and longitude are both zero', function () {
actingAsUser();
Livewire::test('cities.create')
->set('name', 'Null Island')
->set('country_id', $this->country->id)
->set('latitude', 0)
->set('longitude', 0)
->call('createCity')
->assertHasErrors(['latitude']);
expect(City::query()->where('name', 'Null Island')->exists())->toBeFalse();
});
it('rejects city update when latitude and longitude are both zero', function () {
$city = City::factory()->create([
'name' => 'Berlin Test',
'country_id' => $this->country->id,
'latitude' => 52.52,
'longitude' => 13.405,
]);
actingAsUser();
Livewire::test('cities.edit', ['city' => $city])
->set('name', 'Berlin Test')
->set('country_id', $this->country->id)
->set('latitude', 0)
->set('longitude', 0)
->call('updateCity')
->assertHasErrors(['latitude']);
expect($city->refresh()->latitude)->toEqual(52.52);
});
it('updates an existing city', function () {
$city = City::factory()->create(['name' => 'Old Name', 'country_id' => $this->country->id]);
actingAsUser();