filters added

This commit is contained in:
Benjamin Takats
2022-12-04 13:34:44 +01:00
parent a4734bcdc5
commit 7152446895
16 changed files with 901 additions and 83 deletions

View File

@@ -37,6 +37,9 @@ class Header extends Component
'cities' => City::query() 'cities' => City::query()
->select(['latitude', 'longitude']) ->select(['latitude', 'longitude'])
->get(), ->get(),
'countries' => Country::query()
->select(['code', 'name'])
->get(),
]); ]);
} }
} }

View File

@@ -66,4 +66,17 @@ class CourseTable extends DataTableComponent
->whereHas('events.venue.city.country', ->whereHas('events.venue.city.country',
fn($query) => $query->where('countries.code', $this->country)); fn($query) => $query->where('countries.code', $this->country));
} }
public function courseSearch($id)
{
return to_route('search.event', [
'#table',
'country' => $this->country,
'table' => [
'filters' => [
'course_id' => $id,
],
]
]);
}
} }

View File

@@ -4,10 +4,12 @@ namespace App\Http\Livewire\Tables;
use App\Models\Category; use App\Models\Category;
use App\Models\Event; use App\Models\Event;
use App\Models\Lecturer;
use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Builder;
use Rappasoft\LaravelLivewireTables\DataTableComponent; use Rappasoft\LaravelLivewireTables\DataTableComponent;
use Rappasoft\LaravelLivewireTables\Views\Column; use Rappasoft\LaravelLivewireTables\Views\Column;
use Rappasoft\LaravelLivewireTables\Views\Filters\MultiSelectFilter; use Rappasoft\LaravelLivewireTables\Views\Filters\MultiSelectFilter;
use Rappasoft\LaravelLivewireTables\Views\Filters\SelectFilter;
use Rappasoft\LaravelLivewireTables\Views\Filters\TextFilter; use Rappasoft\LaravelLivewireTables\Views\Filters\TextFilter;
class EventTable extends DataTableComponent class EventTable extends DataTableComponent
@@ -54,15 +56,35 @@ class EventTable extends DataTableComponent
$builder $builder
->whereHas('venue.city', ->whereHas('venue.city',
function ($query) use ($value) { function ($query) use ($value) {
foreach (str($value)->explode(',') as $item) { $query->whereIn('cities.name', str($value)->explode(','));
$query->orWhere('cities.name', 'ilike', "%$item%");
}
}); });
} else { } else {
$builder->whereHas('venue.city', $builder->whereHas('venue.city',
fn($query) => $query->where('cities.name', 'ilike', "%$value%")); fn($query) => $query->where('cities.name', 'ilike', "%$value%"));
} }
}), }),
TextFilter::make('Veranstaltungs-Ort', 'venue')
->config([
'placeholder' => __('Suche Veranstaltungs-Ort'),
])
->filter(function (Builder $builder, string $value) {
$builder->whereHas('venue',
fn($query) => $query->where('venues.name', 'ilike', "%$value%"));
}),
TextFilter::make('Kurs')
->config([
'placeholder' => __('Suche Kurs'),
])
->filter(function (Builder $builder, string $value) {
$builder->whereHas('course',
fn($query) => $query->where('courses.name', 'ilike', "%$value%"));
}),
TextFilter::make('Kurs by ID', 'course_id')
->hiddenFromMenus()
->filter(function (Builder $builder, string $value) {
$builder->whereHas('course',
fn($query) => $query->where('courses.id', '=', $value));
}),
MultiSelectFilter::make('Art') MultiSelectFilter::make('Art')
->options( ->options(
Category::query() Category::query()
@@ -73,6 +95,16 @@ class EventTable extends DataTableComponent
$builder->whereHas('course.categories', $builder->whereHas('course.categories',
fn($query) => $query->whereIn('categories.id', $values)); fn($query) => $query->whereIn('categories.id', $values));
}), }),
SelectFilter::make('Dozent')
->options(
Lecturer::query()
->pluck('name', 'id')
->toArray()
)
->filter(function (Builder $builder, string $value) {
$builder->whereHas('course.lecturer',
fn($query) => $query->where('lecturers.id', $value));
}),
]; ];
} }

View File

@@ -11,6 +11,7 @@ use Rappasoft\LaravelLivewireTables\Views\Columns\ImageColumn;
class LecturerTable extends DataTableComponent class LecturerTable extends DataTableComponent
{ {
public string $country;
protected $model = Lecturer::class; protected $model = Lecturer::class;
public function configure(): void public function configure(): void
@@ -66,4 +67,19 @@ class LecturerTable extends DataTableComponent
'courses', 'courses',
]); ]);
} }
public function lecturerSearch($id)
{
$lecturer = Lecturer::query()->find($id);
return to_route('search.event', [
'#table',
'country' => $this->country,
'table' => [
'filters' => [
'dozent' => $lecturer->id,
],
]
]);
}
} }

View File

@@ -67,4 +67,19 @@ class VenueTable extends DataTableComponent
]) ])
->whereHas('city.country', fn($query) => $query->where('code', $this->country)); ->whereHas('city.country', fn($query) => $query->where('code', $this->country));
} }
public function venueSearch($id)
{
$venue = Venue::query()->find($id);
return to_route('search.event', [
'#table',
'country' => $this->country,
'table' => [
'filters' => [
'venue' => $venue->name,
],
]
]);
}
} }

View File

@@ -16,7 +16,7 @@ class BasePolicy
*/ */
public function before(User $user, $ability) public function before(User $user, $ability)
{ {
if ($user->hasRole('super-admin')) { if ($user->hasRole('super-admin') || app()->environment('local')) {
return true; return true;
} }
} }

View File

@@ -27,6 +27,8 @@ class AppServiceProvider extends ServiceProvider
*/ */
public function boot() public function boot()
{ {
ray()->newScreen('bitcoin');
Stringable::macro('initials', function () { Stringable::macro('initials', function () {
$words = preg_split("/\s+/", $this); $words = preg_split("/\s+/", $this);
$initials = ""; $initials = "";

View File

@@ -28,6 +28,7 @@
"spatie/laravel-google-fonts": "^1.2", "spatie/laravel-google-fonts": "^1.2",
"spatie/laravel-markdown": "^2.2", "spatie/laravel-markdown": "^2.2",
"spatie/laravel-medialibrary": "^10.0.0", "spatie/laravel-medialibrary": "^10.0.0",
"spatie/laravel-ray": "^1.31",
"spatie/laravel-sluggable": "^3.4", "spatie/laravel-sluggable": "^3.4",
"staudenmeir/eloquent-has-many-deep": "^1.7", "staudenmeir/eloquent-has-many-deep": "^1.7",
"stijnvanouplines/blade-country-flags": "^1.0", "stijnvanouplines/blade-country-flags": "^1.0",

734
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "568870ac3cd35dadcdbedcc3bd76c682", "content-hash": "6af863a20aa17f527c2cf8e0c7de11b6",
"packages": [ "packages": [
{ {
"name": "akuechler/laravel-geoly", "name": "akuechler/laravel-geoly",
@@ -4838,6 +4838,59 @@
], ],
"time": "2022-07-30T15:51:26+00:00" "time": "2022-07-30T15:51:26+00:00"
}, },
{
"name": "pimple/pimple",
"version": "v3.5.0",
"source": {
"type": "git",
"url": "https://github.com/silexphp/Pimple.git",
"reference": "a94b3a4db7fb774b3d78dad2315ddc07629e1bed"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/silexphp/Pimple/zipball/a94b3a4db7fb774b3d78dad2315ddc07629e1bed",
"reference": "a94b3a4db7fb774b3d78dad2315ddc07629e1bed",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"psr/container": "^1.1 || ^2.0"
},
"require-dev": {
"symfony/phpunit-bridge": "^5.4@dev"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.4.x-dev"
}
},
"autoload": {
"psr-0": {
"Pimple": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
}
],
"description": "Pimple, a simple Dependency Injection Container",
"homepage": "https://pimple.symfony.com",
"keywords": [
"container",
"dependency injection"
],
"support": {
"source": "https://github.com/silexphp/Pimple/tree/v3.5.0"
},
"time": "2021-10-28T11:13:42+00:00"
},
{ {
"name": "pragmarx/google2fa", "name": "pragmarx/google2fa",
"version": "v8.0.1", "version": "v8.0.1",
@@ -6204,6 +6257,68 @@
}, },
"time": "2022-08-12T19:00:25+00:00" "time": "2022-08-12T19:00:25+00:00"
}, },
{
"name": "spatie/backtrace",
"version": "1.2.1",
"source": {
"type": "git",
"url": "https://github.com/spatie/backtrace.git",
"reference": "4ee7d41aa5268107906ea8a4d9ceccde136dbd5b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/backtrace/zipball/4ee7d41aa5268107906ea8a4d9ceccde136dbd5b",
"reference": "4ee7d41aa5268107906ea8a4d9ceccde136dbd5b",
"shasum": ""
},
"require": {
"php": "^7.3|^8.0"
},
"require-dev": {
"ext-json": "*",
"phpunit/phpunit": "^9.3",
"symfony/var-dumper": "^5.1"
},
"type": "library",
"autoload": {
"psr-4": {
"Spatie\\Backtrace\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Freek Van de Herten",
"email": "freek@spatie.be",
"homepage": "https://spatie.be",
"role": "Developer"
}
],
"description": "A better backtrace",
"homepage": "https://github.com/spatie/backtrace",
"keywords": [
"Backtrace",
"spatie"
],
"support": {
"issues": "https://github.com/spatie/backtrace/issues",
"source": "https://github.com/spatie/backtrace/tree/1.2.1"
},
"funding": [
{
"url": "https://github.com/sponsors/spatie",
"type": "github"
},
{
"url": "https://spatie.be/open-source/support-us",
"type": "other"
}
],
"time": "2021-11-09T10:57:15+00:00"
},
{ {
"name": "spatie/commonmark-shiki-highlighter", "name": "spatie/commonmark-shiki-highlighter",
"version": "2.1.1", "version": "2.1.1",
@@ -6791,6 +6906,90 @@
], ],
"time": "2022-11-23T07:01:37+00:00" "time": "2022-11-23T07:01:37+00:00"
}, },
{
"name": "spatie/laravel-ray",
"version": "1.31.0",
"source": {
"type": "git",
"url": "https://github.com/spatie/laravel-ray.git",
"reference": "7394694afd89d05879e7a69c54abab73c1199acd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/laravel-ray/zipball/7394694afd89d05879e7a69c54abab73c1199acd",
"reference": "7394694afd89d05879e7a69c54abab73c1199acd",
"shasum": ""
},
"require": {
"ext-json": "*",
"illuminate/contracts": "^7.20|^8.19|^9.0",
"illuminate/database": "^7.20|^8.19|^9.0",
"illuminate/queue": "^7.20|^8.19|^9.0",
"illuminate/support": "^7.20|^8.19|^9.0",
"php": "^7.3|^8.0",
"spatie/backtrace": "^1.0",
"spatie/ray": "^1.33",
"symfony/stopwatch": "4.2|^5.1|^6.0",
"zbateson/mail-mime-parser": "^1.3.1|^2.0"
},
"require-dev": {
"guzzlehttp/guzzle": "^7.3",
"laravel/framework": "^7.20|^8.19|^9.0",
"orchestra/testbench-core": "^5.0|^6.0|^7.0",
"phpstan/phpstan": "^0.12.93",
"phpunit/phpunit": "^9.3",
"spatie/phpunit-snapshot-assertions": "^4.2"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.29.x-dev"
},
"laravel": {
"providers": [
"Spatie\\LaravelRay\\RayServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"Spatie\\LaravelRay\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Freek Van der Herten",
"email": "freek@spatie.be",
"homepage": "https://spatie.be",
"role": "Developer"
}
],
"description": "Easily debug Laravel apps",
"homepage": "https://github.com/spatie/laravel-ray",
"keywords": [
"laravel-ray",
"spatie"
],
"support": {
"issues": "https://github.com/spatie/laravel-ray/issues",
"source": "https://github.com/spatie/laravel-ray/tree/1.31.0"
},
"funding": [
{
"url": "https://github.com/sponsors/spatie",
"type": "github"
},
{
"url": "https://spatie.be/open-source/support-us",
"type": "other"
}
],
"time": "2022-09-20T13:13:22+00:00"
},
{ {
"name": "spatie/laravel-sluggable", "name": "spatie/laravel-sluggable",
"version": "3.4.0", "version": "3.4.0",
@@ -6851,6 +7050,56 @@
], ],
"time": "2022-03-28T11:21:33+00:00" "time": "2022-03-28T11:21:33+00:00"
}, },
{
"name": "spatie/macroable",
"version": "2.0.0",
"source": {
"type": "git",
"url": "https://github.com/spatie/macroable.git",
"reference": "ec2c320f932e730607aff8052c44183cf3ecb072"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/macroable/zipball/ec2c320f932e730607aff8052c44183cf3ecb072",
"reference": "ec2c320f932e730607aff8052c44183cf3ecb072",
"shasum": ""
},
"require": {
"php": "^8.0"
},
"require-dev": {
"phpunit/phpunit": "^8.0|^9.3"
},
"type": "library",
"autoload": {
"psr-4": {
"Spatie\\Macroable\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Freek Van der Herten",
"email": "freek@spatie.be",
"homepage": "https://spatie.be",
"role": "Developer"
}
],
"description": "A trait to dynamically add methods to a class",
"homepage": "https://github.com/spatie/macroable",
"keywords": [
"macroable",
"spatie"
],
"support": {
"issues": "https://github.com/spatie/macroable/issues",
"source": "https://github.com/spatie/macroable/tree/2.0.0"
},
"time": "2021-03-26T22:39:02+00:00"
},
{ {
"name": "spatie/once", "name": "spatie/once",
"version": "3.1.0", "version": "3.1.0",
@@ -6913,6 +7162,81 @@
], ],
"time": "2022-04-21T12:23:20+00:00" "time": "2022-04-21T12:23:20+00:00"
}, },
{
"name": "spatie/ray",
"version": "1.36.0",
"source": {
"type": "git",
"url": "https://github.com/spatie/ray.git",
"reference": "4a4def8cda4806218341b8204c98375aa8c34323"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/ray/zipball/4a4def8cda4806218341b8204c98375aa8c34323",
"reference": "4a4def8cda4806218341b8204c98375aa8c34323",
"shasum": ""
},
"require": {
"ext-curl": "*",
"ext-json": "*",
"php": "^7.3|^8.0",
"ramsey/uuid": "^3.0|^4.1",
"spatie/backtrace": "^1.1",
"spatie/macroable": "^1.0|^2.0",
"symfony/stopwatch": "^4.0|^5.1|^6.0",
"symfony/var-dumper": "^4.2|^5.1|^6.0"
},
"require-dev": {
"illuminate/support": "6.x|^8.18|^9.0",
"nesbot/carbon": "^2.43",
"phpstan/phpstan": "^0.12.92",
"phpunit/phpunit": "^9.5",
"spatie/phpunit-snapshot-assertions": "^4.2",
"spatie/test-time": "^1.2"
},
"type": "library",
"autoload": {
"files": [
"src/helpers.php"
],
"psr-4": {
"Spatie\\Ray\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Freek Van der Herten",
"email": "freek@spatie.be",
"homepage": "https://spatie.be",
"role": "Developer"
}
],
"description": "Debug with Ray to fix problems faster",
"homepage": "https://github.com/spatie/ray",
"keywords": [
"ray",
"spatie"
],
"support": {
"issues": "https://github.com/spatie/ray/issues",
"source": "https://github.com/spatie/ray/tree/1.36.0"
},
"funding": [
{
"url": "https://github.com/sponsors/spatie",
"type": "github"
},
{
"url": "https://spatie.be/open-source/support-us",
"type": "other"
}
],
"time": "2022-08-11T14:04:18+00:00"
},
{ {
"name": "spatie/shiki-php", "name": "spatie/shiki-php",
"version": "1.3.0", "version": "1.3.0",
@@ -8442,6 +8766,89 @@
], ],
"time": "2022-11-03T14:55:06+00:00" "time": "2022-11-03T14:55:06+00:00"
}, },
{
"name": "symfony/polyfill-iconv",
"version": "v1.27.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-iconv.git",
"reference": "927013f3aac555983a5059aada98e1907d842695"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/927013f3aac555983a5059aada98e1907d842695",
"reference": "927013f3aac555983a5059aada98e1907d842695",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"provide": {
"ext-iconv": "*"
},
"suggest": {
"ext-iconv": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Iconv\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for the Iconv extension",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"iconv",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-iconv/tree/v1.27.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2022-11-03T14:55:06+00:00"
},
{ {
"name": "symfony/polyfill-intl-grapheme", "name": "symfony/polyfill-intl-grapheme",
"version": "v1.27.0", "version": "v1.27.0",
@@ -9506,6 +9913,68 @@
], ],
"time": "2022-05-30T19:18:58+00:00" "time": "2022-05-30T19:18:58+00:00"
}, },
{
"name": "symfony/stopwatch",
"version": "v6.2.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/stopwatch.git",
"reference": "266636bb8f3fbdccc302491df7b3a1b9a8c238a7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/stopwatch/zipball/266636bb8f3fbdccc302491df7b3a1b9a8c238a7",
"reference": "266636bb8f3fbdccc302491df7b3a1b9a8c238a7",
"shasum": ""
},
"require": {
"php": ">=8.1",
"symfony/service-contracts": "^1|^2|^3"
},
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\Stopwatch\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Provides a way to profile code",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/stopwatch/tree/v6.2.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2022-09-28T16:00:52+00:00"
},
{ {
"name": "symfony/string", "name": "symfony/string",
"version": "v6.2.0", "version": "v6.2.0",
@@ -10276,6 +10745,207 @@
], ],
"time": "2022-11-28T17:38:50+00:00" "time": "2022-11-28T17:38:50+00:00"
}, },
{
"name": "zbateson/mail-mime-parser",
"version": "2.2.3",
"source": {
"type": "git",
"url": "https://github.com/zbateson/mail-mime-parser.git",
"reference": "295c7f82a8c44af685680d9df6714beb812e90ff"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zbateson/mail-mime-parser/zipball/295c7f82a8c44af685680d9df6714beb812e90ff",
"reference": "295c7f82a8c44af685680d9df6714beb812e90ff",
"shasum": ""
},
"require": {
"guzzlehttp/psr7": "^1.7.0|^2.0",
"php": ">=5.4",
"pimple/pimple": "^3.0",
"zbateson/mb-wrapper": "^1.0.1",
"zbateson/stream-decorators": "^1.0.6"
},
"require-dev": {
"mikey179/vfsstream": "^1.6.0",
"sanmai/phpunit-legacy-adapter": "^6.3 || ^8.2"
},
"suggest": {
"ext-iconv": "For best support/performance",
"ext-mbstring": "For best support/performance"
},
"type": "library",
"autoload": {
"psr-4": {
"ZBateson\\MailMimeParser\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-2-Clause"
],
"authors": [
{
"name": "Zaahid Bateson"
},
{
"name": "Contributors",
"homepage": "https://github.com/zbateson/mail-mime-parser/graphs/contributors"
}
],
"description": "MIME email message parser",
"homepage": "https://mail-mime-parser.org",
"keywords": [
"MimeMailParser",
"email",
"mail",
"mailparse",
"mime",
"mimeparse",
"parser",
"php-imap"
],
"support": {
"docs": "https://mail-mime-parser.org/#usage-guide",
"issues": "https://github.com/zbateson/mail-mime-parser/issues",
"source": "https://github.com/zbateson/mail-mime-parser"
},
"funding": [
{
"url": "https://github.com/zbateson",
"type": "github"
}
],
"time": "2022-09-28T16:31:49+00:00"
},
{
"name": "zbateson/mb-wrapper",
"version": "1.1.2",
"source": {
"type": "git",
"url": "https://github.com/zbateson/mb-wrapper.git",
"reference": "5d9d190ef18ce6d424e3ac6f5ebe13901f92b74a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zbateson/mb-wrapper/zipball/5d9d190ef18ce6d424e3ac6f5ebe13901f92b74a",
"reference": "5d9d190ef18ce6d424e3ac6f5ebe13901f92b74a",
"shasum": ""
},
"require": {
"php": ">=5.4",
"symfony/polyfill-iconv": "^1.9",
"symfony/polyfill-mbstring": "^1.9"
},
"require-dev": {
"sanmai/phpunit-legacy-adapter": "^6.3 || ^8"
},
"suggest": {
"ext-iconv": "For best support/performance",
"ext-mbstring": "For best support/performance"
},
"type": "library",
"autoload": {
"psr-4": {
"ZBateson\\MbWrapper\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-2-Clause"
],
"authors": [
{
"name": "Zaahid Bateson"
}
],
"description": "Wrapper for mbstring with fallback to iconv for encoding conversion and string manipulation",
"keywords": [
"charset",
"encoding",
"http",
"iconv",
"mail",
"mb",
"mb_convert_encoding",
"mbstring",
"mime",
"multibyte",
"string"
],
"support": {
"issues": "https://github.com/zbateson/mb-wrapper/issues",
"source": "https://github.com/zbateson/mb-wrapper/tree/1.1.2"
},
"funding": [
{
"url": "https://github.com/zbateson",
"type": "github"
}
],
"time": "2022-05-26T15:55:05+00:00"
},
{
"name": "zbateson/stream-decorators",
"version": "1.0.7",
"source": {
"type": "git",
"url": "https://github.com/zbateson/stream-decorators.git",
"reference": "8f8ca208572963258b7e6d91106181706deacd10"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zbateson/stream-decorators/zipball/8f8ca208572963258b7e6d91106181706deacd10",
"reference": "8f8ca208572963258b7e6d91106181706deacd10",
"shasum": ""
},
"require": {
"guzzlehttp/psr7": "^1.7.0|^2.0",
"php": ">=5.4",
"zbateson/mb-wrapper": "^1.0.0"
},
"require-dev": {
"sanmai/phpunit-legacy-adapter": "^6.3 || ^8"
},
"type": "library",
"autoload": {
"psr-4": {
"ZBateson\\StreamDecorators\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-2-Clause"
],
"authors": [
{
"name": "Zaahid Bateson"
}
],
"description": "PHP psr7 stream decorators for mime message part streams",
"keywords": [
"base64",
"charset",
"decorators",
"mail",
"mime",
"psr7",
"quoted-printable",
"stream",
"uuencode"
],
"support": {
"issues": "https://github.com/zbateson/stream-decorators/issues",
"source": "https://github.com/zbateson/stream-decorators/tree/1.0.7"
},
"funding": [
{
"url": "https://github.com/zbateson",
"type": "github"
}
],
"time": "2022-09-08T15:44:55+00:00"
},
{ {
"name": "ziffmedia/nova-select-plus", "name": "ziffmedia/nova-select-plus",
"version": "v2.0.0", "version": "v2.0.0",
@@ -13445,68 +14115,6 @@
], ],
"time": "2020-09-28T06:39:44+00:00" "time": "2020-09-28T06:39:44+00:00"
}, },
{
"name": "spatie/backtrace",
"version": "1.2.1",
"source": {
"type": "git",
"url": "https://github.com/spatie/backtrace.git",
"reference": "4ee7d41aa5268107906ea8a4d9ceccde136dbd5b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/backtrace/zipball/4ee7d41aa5268107906ea8a4d9ceccde136dbd5b",
"reference": "4ee7d41aa5268107906ea8a4d9ceccde136dbd5b",
"shasum": ""
},
"require": {
"php": "^7.3|^8.0"
},
"require-dev": {
"ext-json": "*",
"phpunit/phpunit": "^9.3",
"symfony/var-dumper": "^5.1"
},
"type": "library",
"autoload": {
"psr-4": {
"Spatie\\Backtrace\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Freek Van de Herten",
"email": "freek@spatie.be",
"homepage": "https://spatie.be",
"role": "Developer"
}
],
"description": "A better backtrace",
"homepage": "https://github.com/spatie/backtrace",
"keywords": [
"Backtrace",
"spatie"
],
"support": {
"issues": "https://github.com/spatie/backtrace/issues",
"source": "https://github.com/spatie/backtrace/tree/1.2.1"
},
"funding": [
{
"url": "https://github.com/sponsors/spatie",
"type": "github"
},
{
"url": "https://spatie.be/open-source/support-us",
"type": "other"
}
],
"time": "2021-11-09T10:57:15+00:00"
},
{ {
"name": "spatie/flare-client-php", "name": "spatie/flare-client-php",
"version": "1.3.1", "version": "1.3.1",

View File

@@ -107,6 +107,11 @@ class DatabaseSeeder extends Seeder
'name' => 'Markus Turm', 'name' => 'Markus Turm',
'active' => true, 'active' => true,
]); ]);
Lecturer::create([
'team_id' => 1,
'name' => 'Beppo',
'active' => true,
]);
$category = Category::create([ $category = Category::create([
'name' => 'Präsenzunterricht', 'name' => 'Präsenzunterricht',
'slug' => str('Präsenzunterricht')->slug('-', 'de'), 'slug' => str('Präsenzunterricht')->slug('-', 'de'),
@@ -125,6 +130,12 @@ class DatabaseSeeder extends Seeder
'lecturer_id' => 1, 'lecturer_id' => 1,
'name' => 'Bitcoin <> Crypto', 'name' => 'Bitcoin <> Crypto',
]); ]);
$course->categories()
->attach($categoryOnline);
$course = Course::create([
'lecturer_id' => 2,
'name' => 'Bitcoin Lightning Network',
]);
$course->categories() $course->categories()
->attach($categoryOnline); ->attach($categoryOnline);
Participant::create([ Participant::create([
@@ -167,6 +178,18 @@ class DatabaseSeeder extends Seeder
->startOfDay() ->startOfDay()
->addHour(), ->addHour(),
]); ]);
Event::create([
'course_id' => 3,
'venue_id' => 3,
'link' => 'https://einundzwanzig.space',
'from' => now()
->addDays(4)
->startOfDay(),
'to' => now()
->addDays(4)
->startOfDay()
->addHour(),
]);
Registration::create([ Registration::create([
'event_id' => 1, 'event_id' => 1,
'participant_id' => 1, 'participant_id' => 1,

108
ray.php Normal file
View File

@@ -0,0 +1,108 @@
<?php
return [
/*
* This setting controls whether data should be sent to Ray.
*
* By default, `ray()` will only transmit data in non-production environments.
*/
'enable' => env('RAY_ENABLED', true),
/*
* When enabled, all cache events will automatically be sent to Ray.
*/
'send_cache_to_ray' => env('SEND_CACHE_TO_RAY', false),
/*
* When enabled, all things passed to `dump` or `dd`
* will be sent to Ray as well.
*/
'send_dumps_to_ray' => env('SEND_DUMPS_TO_RAY', true),
/*
* When enabled all job events will automatically be sent to Ray.
*/
'send_jobs_to_ray' => env('SEND_JOBS_TO_RAY', false),
/*
* When enabled, all things logged to the application log
* will be sent to Ray as well.
*/
'send_log_calls_to_ray' => env('SEND_LOG_CALLS_TO_RAY', true),
/*
* When enabled, all queries will automatically be sent to Ray.
*/
'send_queries_to_ray' => env('SEND_QUERIES_TO_RAY', false),
/**
* When enabled, all duplicate queries will automatically be sent to Ray.
*/
'send_duplicate_queries_to_ray' => env('SEND_DUPLICATE_QUERIES_TO_RAY', false),
/*
* When enabled, slow queries will automatically be sent to Ray.
*/
'send_slow_queries_to_ray' => env('SEND_SLOW_QUERIES_TO_RAY', false),
/**
* Queries that are longer than this number of milliseconds will be regarded as slow.
*/
'slow_query_threshold_in_ms' => env('RAY_SLOW_QUERY_THRESHOLD_IN_MS', 500),
/*
* When enabled, all requests made to this app will automatically be sent to Ray.
*/
'send_requests_to_ray' => env('SEND_REQUESTS_TO_RAY', false),
/**
* When enabled, all Http Client requests made by this app will be automatically sent to Ray.
*/
'send_http_client_requests_to_ray' => env('SEND_HTTP_CLIENT_REQUESTS_TO_RAY', false),
/*
* When enabled, all views that are rendered automatically be sent to Ray.
*/
'send_views_to_ray' => env('SEND_VIEWS_TO_RAY', false),
/*
* When enabled, all exceptions will be automatically sent to Ray.
*/
'send_exceptions_to_ray' => env('SEND_EXCEPTIONS_TO_RAY', true),
/*
* When enabled, all deprecation notices will be automatically sent to Ray.
*/
'send_deprecated_notices_to_ray' => env('SEND_DEPRECATED_NOTICES_TO_RAY', false),
/*
* The host used to communicate with the Ray app.
* When using Docker on Mac or Windows, you can replace localhost with 'host.docker.internal'
* When using Docker on Linux, you can replace localhost with '172.17.0.1'
* When using Homestead with the VirtualBox provider, you can replace localhost with '10.0.2.2'
* When using Homestead with the Parallels provider, you can replace localhost with '10.211.55.2'
*/
'host' => env('RAY_HOST', 'host.docker.internal'),
/*
* The port number used to communicate with the Ray app.
*/
'port' => env('RAY_PORT', 23517),
/*
* Absolute base path for your sites or projects in Homestead,
* Vagrant, Docker, or another remote development server.
*/
'remote_path' => env('RAY_REMOTE_PATH', null),
/*
* Absolute base path for your sites or projects on your local
* computer where your IDE or code editor is running on.
*/
'local_path' => env('RAY_LOCAL_PATH', null),
/*
* When this setting is enabled, the package will not try to format values sent to Ray.
*/
'always_send_raw_values' => false,
];

View File

@@ -1 +1 @@
<x-button amber>Termine anzeigen</x-button> <x-button amber wire:click="courseSearch({{ $row->id }})">Termine anzeigen</x-button>

View File

@@ -1 +1 @@
<x-button amber>Termine anzeigen</x-button> <x-button amber wire:click="lecturerSearch({{ $row->id }})">Termine anzeigen</x-button>

View File

@@ -1 +1 @@
<x-button amber>Termine anzeigen</x-button> <x-button amber wire:click="venueSearch({{ $row->id }})">Termine anzeigen</x-button>

View File

@@ -8,15 +8,13 @@
bottom: 4%; bottom: 4%;
left: 13%; left: 13%;
right: 13%; right: 13%;
background: radial-gradient(ellipse at center, rgba(247, 147, 26, 0.7) 0%, rgba(247, 147, 26, 0.55) 20%, rgba(247, 147, 26, 0.2) 40%, rgba(247, 147, 26, 0.1) 50%, rgba(247, 147, 26, 0.02) 60%, rgba(247, 147, 26, 0) 70%, rgba(247, 147, 26, 0) 100%);
} }
</style> </style>
<section class="w-full"> <section class="w-full">
<div class="max-w-screen-2xl mx-auto px-10"> <div class="max-w-screen-2xl mx-auto px-10">
<div class="flex flex-col flex-wrap items-center justify-between py-7 mx-auto md:flex-row max-w-screen-2xl"> <div class="flex flex-col flex-wrap items-center justify-between py-7 mx-auto md:flex-row max-w-screen-2xl">
<div class="relative flex flex-col md:flex-row"> <div class="relative flex flex-col md:flex-row">
<a href="#_" <a href="{{ route('search.city', ['country' => $c]) }}"
class="flex items-center mb-5 font-medium text-gray-900 lg:w-auto lg:items-center lg:justify-center md:mb-0"> class="flex items-center mb-5 font-medium text-gray-900 lg:w-auto lg:items-center lg:justify-center md:mb-0">
<img src="{{ asset('img/einundzwanzig-horizontal-inverted.svg') }}"> <img src="{{ asset('img/einundzwanzig-horizontal-inverted.svg') }}">
</a> </a>
@@ -65,12 +63,11 @@
wire:model="c" wire:model="c"
:clearable="false" :clearable="false"
> >
<x-select.user-option src="{{ asset('vendor/blade-country-flags/4x3-de.svg') }}" @foreach($countries as $country)
label="Deutschland" value="de"/> <x-select.user-option
<x-select.user-option src="{{ asset('vendor/blade-country-flags/4x3-at.svg') }}" src="{{ asset('vendor/blade-country-flags/4x3-'.$country->code.'.svg') }}"
label="Österreich" value="at"/> label="{{ $country->name }}" value="{{ $country->code }}"/>
<x-select.user-option src="{{ asset('vendor/blade-country-flags/4x3-ch.svg') }}" @endforeach
label="Schweiz" value="ch"/>
</x-select> </x-select>
</div> </div>
<p class="text-gray-500 sm:text-lg md:text-xl xl:text-2xl lg:max-w-none max-w-2xl md:text-center lg:text-left lg:pr-32 mt-6"> <p class="text-gray-500 sm:text-lg md:text-xl xl:text-2xl lg:max-w-none max-w-2xl md:text-center lg:text-left lg:pr-32 mt-6">

View File

@@ -5,7 +5,7 @@
<section class="w-full mb-12"> <section class="w-full mb-12">
<div class="max-w-screen-2xl mx-auto px-10" id="table"> <div class="max-w-screen-2xl mx-auto px-10" id="table">
<livewire:frontend.search-tabs :country="$country->code"/> <livewire:frontend.search-tabs :country="$country->code"/>
<livewire:tables.lecturer-table/> <livewire:tables.lecturer-table :country="$country->code"/>
</div> </div>
</section> </section>
{{-- FOOTER --}} {{-- FOOTER --}}