mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
show_worldwide added
This commit is contained in:
@@ -61,6 +61,7 @@ class BitcoinEventTable extends DataTableComponent
|
||||
public function builder(): Builder
|
||||
{
|
||||
return BitcoinEvent::query()
|
||||
->whereHas('venue.city.country', fn($query) => $query->where('code', $this->country));
|
||||
->whereHas('venue.city.country', fn($query) => $query->where('code', $this->country))
|
||||
->orWhere('show_worldwide', true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ use Ebess\AdvancedNovaMediaLibrary\Fields\Images;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Http\Request;
|
||||
use Laravel\Nova\Fields\BelongsTo;
|
||||
use Laravel\Nova\Fields\Boolean;
|
||||
use Laravel\Nova\Fields\DateTime;
|
||||
use Laravel\Nova\Fields\ID;
|
||||
use Laravel\Nova\Fields\Text;
|
||||
@@ -61,6 +62,9 @@ class BitcoinEvent extends Resource
|
||||
Images::make(__('Logo'), 'logo')
|
||||
->conversionOnIndexView('thumb'),
|
||||
|
||||
Boolean::make(__('Show worldwide'), 'show_worldwide')
|
||||
->help(__('If checked, the event will be shown everywhere.')),
|
||||
|
||||
DateTime::make(__('From'), 'from')
|
||||
->step(CarbonInterval::minutes(15))
|
||||
->displayUsing(fn($value) => $value->asDateTime())
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('bitcoin_events', function (Blueprint $table) {
|
||||
$table->boolean('show_worldwide')
|
||||
->default(false);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('bitcoin_events', function (Blueprint $table) {
|
||||
//
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -1,4 +1,6 @@
|
||||
{
|
||||
"Show worldwide": "Länderunabhängig anzeigen",
|
||||
"If checked, the event will be shown everywhere.": "Wenn aktiviert, wird das Event überall angezeigt.",
|
||||
"Orange Pill Book Case": "Wie viele Bitcoin-Bücher hast du hinzu gefügt?",
|
||||
"Title": "Titel",
|
||||
"Book": "Buch",
|
||||
|
||||
Reference in New Issue
Block a user