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:
@@ -47,10 +47,19 @@ class extends Component {
|
||||
$validated = $this->validate([
|
||||
'newCityName' => ['required', 'string', 'max:255', 'unique:cities,name'],
|
||||
'newCityCountryId' => ['required', 'exists:countries,id'],
|
||||
'newCityLatitude' => ['required', 'numeric'],
|
||||
'newCityLongitude' => ['required', 'numeric'],
|
||||
'newCityLatitude' => ['required', 'numeric', 'between:-90,90'],
|
||||
'newCityLongitude' => ['required', 'numeric', 'between:-180,180'],
|
||||
], [], [
|
||||
'newCityLatitude' => __('Breitengrad'),
|
||||
'newCityLongitude' => __('Längengrad'),
|
||||
]);
|
||||
|
||||
if ((float) $validated['newCityLatitude'] === 0.0 && (float) $validated['newCityLongitude'] === 0.0) {
|
||||
$this->addError('newCityLatitude', __('Breiten- und Längengrad dürfen nicht beide 0 sein.'));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$city = City::create([
|
||||
'name' => $validated['newCityName'],
|
||||
'country_id' => $validated['newCityCountryId'],
|
||||
|
||||
Reference in New Issue
Block a user