mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2026-05-03 16:24:55 +00:00
✨ **Tests & Nullable Fixes:** Added tests to ensure no crashes when nullable Livewire properties are explicitly set to null. Updated several Livewire components to handle nullable properties gracefully. 🚀
This commit is contained in:
@@ -14,8 +14,8 @@ class extends Component {
|
||||
public $country = 'de';
|
||||
public string $name = '';
|
||||
public ?int $country_id = null;
|
||||
public float $latitude = 0;
|
||||
public float $longitude = 0;
|
||||
public ?float $latitude = null;
|
||||
public ?float $longitude = null;
|
||||
public ?int $population = null;
|
||||
public ?string $population_date = null;
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ class extends Component {
|
||||
public City $city;
|
||||
public string $name = '';
|
||||
public ?int $country_id = null;
|
||||
public float $latitude = 0;
|
||||
public float $longitude = 0;
|
||||
public ?float $latitude = null;
|
||||
public ?float $longitude = null;
|
||||
public ?int $population = null;
|
||||
public ?string $population_date = null;
|
||||
|
||||
|
||||
@@ -21,10 +21,10 @@ class extends Component {
|
||||
#[Locked]
|
||||
public $country = 'de';
|
||||
|
||||
public string $fromDate = '';
|
||||
public string $fromTime = '';
|
||||
public string $toDate = '';
|
||||
public string $toTime = '';
|
||||
public ?string $fromDate = null;
|
||||
public ?string $fromTime = null;
|
||||
public ?string $toDate = null;
|
||||
public ?string $toTime = null;
|
||||
|
||||
#[Validate('required|exists:venues,id')]
|
||||
public ?int $venue_id = null;
|
||||
|
||||
@@ -20,14 +20,14 @@ class extends Component {
|
||||
#[Locked]
|
||||
public $country = 'de';
|
||||
|
||||
public string $startDate = '';
|
||||
public string $startTime = '';
|
||||
public ?string $startDate = null;
|
||||
public ?string $startTime = null;
|
||||
|
||||
// Explicitly track timezone for reactivity
|
||||
public string $userTimezone = '';
|
||||
|
||||
public bool $seriesMode = false;
|
||||
public string $endDate = '';
|
||||
public ?string $endDate = null;
|
||||
|
||||
public ?RecurrenceType $recurrenceType = null;
|
||||
public ?string $recurrenceDayOfWeek = null;
|
||||
|
||||
@@ -39,8 +39,8 @@ class extends Component {
|
||||
// New City Modal
|
||||
public string $newCityName = '';
|
||||
public ?int $newCityCountryId = null;
|
||||
public float $newCityLatitude = 0;
|
||||
public float $newCityLongitude = 0;
|
||||
public ?float $newCityLatitude = null;
|
||||
public ?float $newCityLongitude = null;
|
||||
|
||||
public function createCity(): void
|
||||
{
|
||||
|
||||
@@ -56,8 +56,8 @@ class extends Component {
|
||||
// New City Modal
|
||||
public string $newCityName = '';
|
||||
public ?int $newCityCountryId = null;
|
||||
public float $newCityLatitude = 0;
|
||||
public float $newCityLongitude = 0;
|
||||
public ?float $newCityLatitude = null;
|
||||
public ?float $newCityLongitude = null;
|
||||
|
||||
public function createCity(): void
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user