diff --git a/app/Console/Commands/Database/MigrateMeetupSlugs.php b/app/Console/Commands/Database/MigrateMeetupSlugs.php new file mode 100644 index 00000000..709c901c --- /dev/null +++ b/app/Console/Commands/Database/MigrateMeetupSlugs.php @@ -0,0 +1,35 @@ +slug = str($item->name)->slug('-', 'de'); + $item->save(); + } + + return Command::SUCCESS; + } +} diff --git a/app/Http/Livewire/BookCase/BookCaseTable.php b/app/Http/Livewire/BookCase/BookCaseTable.php index 7ca905c6..d8f8d5e2 100644 --- a/app/Http/Livewire/BookCase/BookCaseTable.php +++ b/app/Http/Livewire/BookCase/BookCaseTable.php @@ -18,18 +18,19 @@ class BookCaseTable extends Component public function render() { return view('livewire.book-case.book-case-table', [ - 'markers' => BookCase::when($this->table['filters']['byids'] ?? false, - fn($query) => $query->whereIn('id', str($this->table['filters']['byids'] ?? '')->explode(','))) - ->get() - ->map(fn($b) => [ - 'title' => $b->title, - 'lat' => $b->latitude, - 'lng' => $b->longitude, - 'url' => 'https://gonoware.com', - 'icon' => asset('img/btc-logo-6219386_1280.png'), - 'icon_size' => [42, 42], - ]) - ->toArray(), + 'markers' => !isset($this->table['filters']['byids']) ? [] + : BookCase::query() + ->whereIn('id', str($this->table['filters']['byids'] ?? '')->explode(',')) + ->get() + ->map(fn($b) => [ + 'title' => $b->title, + 'lat' => $b->latitude, + 'lng' => $b->longitude, + 'url' => 'https://gonoware.com', + 'icon' => asset('img/btc-logo-6219386_1280.png'), + 'icon_size' => [42, 42], + ]) + ->toArray(), 'bookCases' => BookCase::get(), 'countries' => Country::query() ->select(['code', 'name']) diff --git a/app/Http/Livewire/Meetup/LandingPage.php b/app/Http/Livewire/Meetup/LandingPage.php new file mode 100644 index 00000000..29a046cb --- /dev/null +++ b/app/Http/Livewire/Meetup/LandingPage.php @@ -0,0 +1,46 @@ + MeetupEvent::query() + ->with([ + 'meetup.city.country', + ]) + ->where('meetup_events.meetup_id', $this->meetup->id) + ->where('meetup_events.start', '>=', now()) + ->get() + ->map(fn($event) => [ + 'id' => $event->id, + 'startDate' => $event->start, + 'endDate' => $event->start->addHours(1), + 'location' => $event->location, + 'description' => $event->description, + ]), + ]) + ->layout('layouts.guest', [ + 'SEOData' => new SEOData( + title: $this->meetup->name, + description: __('Bitcoiner Meetups are a great way to meet other Bitcoiners in your area. You can learn from each other, share ideas, and have fun!'), + image: asset($this->meetup->getFirstMediaUrl('logo')), + ) + ]); + } +} diff --git a/app/Models/Meetup.php b/app/Models/Meetup.php index a2d9a10d..745648b5 100644 --- a/app/Models/Meetup.php +++ b/app/Models/Meetup.php @@ -10,18 +10,20 @@ use Spatie\Image\Manipulations; use Spatie\MediaLibrary\HasMedia; use Spatie\MediaLibrary\InteractsWithMedia; use Spatie\MediaLibrary\MediaCollections\Models\Media; +use Spatie\Sluggable\HasSlug; +use Spatie\Sluggable\SlugOptions; class Meetup extends Model implements HasMedia { use HasFactory; use InteractsWithMedia; + use HasSlug; /** * The attributes that aren't mass assignable. * @var array */ protected $guarded = []; - /** * The attributes that should be cast to native types. * @var array @@ -40,6 +42,14 @@ class Meetup extends Model implements HasMedia }); } + public function getSlugOptions(): SlugOptions + { + return SlugOptions::create() + ->generateSlugsFrom(['name']) + ->saveSlugsTo('slug') + ->usingLanguage('de'); + } + public function registerMediaConversions(Media $media = null): void { $this diff --git a/composer.json b/composer.json index cef12e13..dd1134e4 100644 --- a/composer.json +++ b/composer.json @@ -27,6 +27,7 @@ "nova/start": "*", "oneduo/nova-time-field": "^1.0", "podcastindex/podcastindex-php": "^1.0", + "qcod/laravel-gamify": "^1.0", "ralphjsmit/laravel-seo": "^1.2", "rappasoft/laravel-livewire-tables": "^2.8", "sentry/sentry-laravel": "^3.1", diff --git a/composer.lock b/composer.lock index 047c2066..225429c2 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d570d40413edbe29a499759d99b8584c", + "content-hash": "5ff6a604d24b926e66423e09d07edd78", "packages": [ { "name": "akuechler/laravel-geoly", @@ -7054,6 +7054,74 @@ }, "time": "2022-12-23T17:47:18+00:00" }, + { + "name": "qcod/laravel-gamify", + "version": "1.0.6", + "source": { + "type": "git", + "url": "https://github.com/qcod/laravel-gamify.git", + "reference": "e642db7b77f52980606f4037a9bddde896c12cb4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/qcod/laravel-gamify/zipball/e642db7b77f52980606f4037a9bddde896c12cb4", + "reference": "e642db7b77f52980606f4037a9bddde896c12cb4", + "shasum": "" + }, + "require": { + "laravel/framework": "~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0|^9.0", + "php": "^7.3|^8.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4 || ~1.0", + "orchestra/testbench": "~3.8|^4.0|^5.0|^7.0", + "phpunit/phpunit": "~8.5|^9.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "QCod\\Gamify\\GamifyServiceProvider" + ] + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "QCod\\Gamify\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mohd Saqueib Ansari", + "email": "saquibweb@gmail.com" + } + ], + "description": "Add gamification in laravel app with reputation point and badges support", + "homepage": "https://github.com/qcod/laravel-gamify", + "keywords": [ + "Gamification", + "achivement", + "badge", + "gamify", + "laravel", + "points", + "qcod", + "reputation", + "reward" + ], + "support": { + "issues": "https://github.com/qcod/laravel-gamify/issues", + "source": "https://github.com/qcod/laravel-gamify/tree/1.0.6" + }, + "time": "2022-02-09T10:01:08+00:00" + }, { "name": "ralouphie/getallheaders", "version": "3.0.3", diff --git a/config/gamify.php b/config/gamify.php new file mode 100644 index 00000000..b40050ac --- /dev/null +++ b/config/gamify.php @@ -0,0 +1,37 @@ + '\App\User', + + // Reputation model + 'reputation_model' => '\QCod\Gamify\Reputation', + + // Allow duplicate reputation points + 'allow_reputation_duplicate' => true, + + // Broadcast on private channel + 'broadcast_on_private_channel' => true, + + // Channel name prefix, user id will be suffixed + 'channel_name' => 'user.reputation.', + + // Badge model + 'badge_model' => '\QCod\Gamify\Badge', + + // Where all badges icon stored + 'badge_icon_folder' => 'images/badges/', + + // Extention of badge icons + 'badge_icon_extension' => '.svg', + + // All the levels for badge + 'badge_levels' => [ + 'beginner' => 1, + 'intermediate' => 2, + 'advanced' => 3, + ], + + // Default level + 'badge_default_level' => 1 +]; diff --git a/database/migrations/2023_01_14_185805_add_reputation_field_on_user_table.php b/database/migrations/2023_01_14_185805_add_reputation_field_on_user_table.php new file mode 100644 index 00000000..25213db6 --- /dev/null +++ b/database/migrations/2023_01_14_185805_add_reputation_field_on_user_table.php @@ -0,0 +1,32 @@ +unsignedInteger('reputation')->default(0)->after('remember_token'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('users', function (Blueprint $table) { + $table->dropColumn('reputation'); + }); + } +} diff --git a/database/migrations/2023_01_14_185805_create_gamify_tables.php b/database/migrations/2023_01_14_185805_create_gamify_tables.php new file mode 100644 index 00000000..d1f05af2 --- /dev/null +++ b/database/migrations/2023_01_14_185805_create_gamify_tables.php @@ -0,0 +1,58 @@ +increments('id'); + $table->string('name'); + $table->mediumInteger('point', false)->default(0); + $table->integer('subject_id')->nullable(); + $table->string('subject_type')->nullable(); + $table->unsignedInteger('payee_id')->nullable(); + $table->text('meta')->nullable(); + $table->timestamps(); + }); + + // badges table + Schema::create('badges', function (Blueprint $table) { + $table->increments('id'); + $table->string('name'); + $table->string('description')->nullable(); + $table->string('icon')->nullable(); + $table->tinyInteger('level')->default(config('gamify.badge_default_level', 1)); + $table->timestamps(); + }); + + // user_badges pivot + Schema::create('user_badges', function (Blueprint $table) { + $table->primary(['user_id', 'badge_id']); + $table->unsignedInteger('user_id'); + $table->unsignedInteger('badge_id'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('user_badges'); + Schema::dropIfExists('badges'); + Schema::dropIfExists('reputations'); + } +} diff --git a/database/migrations/2023_01_14_191356_add_slug_column_to_meetups_table.php b/database/migrations/2023_01_14_191356_add_slug_column_to_meetups_table.php new file mode 100644 index 00000000..2411bc61 --- /dev/null +++ b/database/migrations/2023_01_14_191356_add_slug_column_to_meetups_table.php @@ -0,0 +1,31 @@ +string('slug') + ->nullable() + ->after('id'); + }); + } + + /** + * Reverse the migrations. + * @return void + */ + public function down() + { + Schema::table('meetups', function (Blueprint $table) { + // + }); + } +}; diff --git a/resources/views/columns/meetups/action.blade.php b/resources/views/columns/meetups/action.blade.php index dc280ab1..cf282ee2 100644 --- a/resources/views/columns/meetups/action.blade.php +++ b/resources/views/columns/meetups/action.blade.php @@ -25,4 +25,11 @@ {{ __('Show dates') }} ({{ $row->meetup_events_count }}) @endif + + + {{ __('Show landing page') }} + diff --git a/resources/views/livewire/book-case/book-case-table.blade.php b/resources/views/livewire/book-case/book-case-table.blade.php index b3265cc2..0b5c2314 100644 --- a/resources/views/livewire/book-case/book-case-table.blade.php +++ b/resources/views/livewire/book-case/book-case-table.blade.php @@ -11,11 +11,11 @@ class="w-full text-transparent bg-clip-text bg-gradient-to-r from-amber-400 via-amber-500 to-amber-200 lg:inline">{{ __('Bookcases') }} -

- {{ __('Search out a public bookcase') }} -

+

+ {{ __('Search out a public bookcase') }} +

@if($markers[0] ?? false) +
+
+
+
+ + {{-- FOOTER --}} + +
diff --git a/resources/views/vendor/livewire-tables/.gitkeep b/resources/views/vendor/livewire-tables/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/resources/views/vendor/livewire-tables/components/pagination.blade.php b/resources/views/vendor/livewire-tables/components/pagination.blade.php new file mode 100644 index 00000000..411b4a2d --- /dev/null +++ b/resources/views/vendor/livewire-tables/components/pagination.blade.php @@ -0,0 +1,139 @@ +@aware(['component']) +@props(['rows']) + +@php + $theme = $component->getTheme(); +@endphp + +@if ($component->hasConfigurableAreaFor('before-pagination')) + @include($component->getConfigurableAreaFor('before-pagination'), $component->getParametersForConfigurableArea('before-pagination')) +@endif + +@if ($theme === 'tailwind') +
+ @if ($component->paginationVisibilityIsEnabled()) +
+
+ @if ($component->paginationIsEnabled() && $component->isPaginationMethod('standard') && $rows->lastPage() > 1) +

+ @lang('Showing') + {{ $rows->firstItem() }} + @lang('to') + {{ $rows->lastItem() }} + @lang('of') + {{ $rows->total() }} + @lang('results') +

+ @elseif ($component->paginationIsEnabled() && $component->isPaginationMethod('simple')) +

+ @lang('Showing') + {{ $rows->firstItem() }} + @lang('to') + {{ $rows->lastItem() }} +

+ @else +

+ @lang('Showing') + {{ $rows->count() }} + @lang('results') +

+ @endif +
+ + @if ($component->paginationIsEnabled()) + {{ $rows->links('livewire-tables::specific.tailwind.pagination') }} + @endif +
+ @endif +
+@elseif ($theme === 'bootstrap-4') +
+ @if ($component->paginationVisibilityIsEnabled()) + @if ($component->paginationIsEnabled() && $component->isPaginationMethod('standard') && $rows->lastPage() > 1) +
+
+ {{ $rows->links('livewire-tables::specific.bootstrap-4.pagination') }} +
+ +
+ @lang('Showing') + {{ $rows->count() ? $rows->firstItem() : 0 }} + @lang('to') + {{ $rows->count() ? $rows->lastItem() : 0 }} + @lang('of') + {{ $rows->total() }} + @lang('results') +
+
+ @elseif ($component->paginationIsEnabled() && $component->isPaginationMethod('simple')) +
+
+ {{ $rows->links('livewire-tables::specific.bootstrap-4.pagination') }} +
+ +
+ @lang('Showing') + {{ $rows->count() ? $rows->firstItem() : 0 }} + @lang('to') + {{ $rows->count() ? $rows->lastItem() : 0 }} +
+
+ @else +
+
+ @lang('Showing') + {{ $rows->count() }} + @lang('results') +
+
+ @endif + @endif +
+@elseif ($theme === 'bootstrap-5') +
+ @if ($component->paginationVisibilityIsEnabled()) + @if ($component->paginationIsEnabled() && $component->isPaginationMethod('standard') && $rows->lastPage() > 1) +
+
+ {{ $rows->links('livewire-tables::specific.bootstrap-4.pagination') }} +
+ +
+ @lang('Showing') + {{ $rows->count() ? $rows->firstItem() : 0 }} + @lang('to') + {{ $rows->count() ? $rows->lastItem() : 0 }} + @lang('of') + {{ $rows->total() }} + @lang('results') +
+
+ @elseif ($component->paginationIsEnabled() && $component->isPaginationMethod('simple')) +
+
+ {{ $rows->links('livewire-tables::specific.bootstrap-4.pagination') }} +
+ +
+ @lang('Showing') + {{ $rows->count() ? $rows->firstItem() : 0 }} + @lang('to') + {{ $rows->count() ? $rows->lastItem() : 0 }} +
+
+ @else +
+
+ @lang('Showing') + {{ $rows->count() }} + @lang('results') +
+
+ @endif + @endif +
+@endif + +@if ($component->hasConfigurableAreaFor('after-pagination')) + @include($component->getConfigurableAreaFor('after-pagination'), $component->getParametersForConfigurableArea('after-pagination')) +@endif diff --git a/resources/views/vendor/livewire-tables/components/table.blade.php b/resources/views/vendor/livewire-tables/components/table.blade.php new file mode 100644 index 00000000..5e5f5ac4 --- /dev/null +++ b/resources/views/vendor/livewire-tables/components/table.blade.php @@ -0,0 +1,97 @@ +@aware(['component']) + +@php + $theme = $component->getTheme(); + + $customAttributes = [ + 'wrapper' => $this->getTableWrapperAttributes(), + 'table' => $this->getTableAttributes(), + 'thead' => $this->getTheadAttributes(), + 'tbody' => $this->getTbodyAttributes(), + ]; +@endphp + +@if ($theme === 'tailwind') +
merge($customAttributes['wrapper']) + ->class(['shadow overflow-y-scroll border-b border-gray-200 dark:border-gray-700 sm:rounded-lg' => $customAttributes['wrapper']['default'] ?? true]) + ->except('default') + }}> + merge($customAttributes['table']) + ->class(['min-w-full divide-y divide-gray-200 dark:divide-none' => $customAttributes['table']['default'] ?? true]) + ->except('default') + }}> + merge($customAttributes['thead']) + ->class(['bg-gray-50' => $customAttributes['thead']['default'] ?? true]) + ->except('default') + }}> + + {{ $thead }} + + + reorderIsEnabled()) + wire:sortable="{{ $component->getReorderMethod() }}" + @endif + + {{ + $attributes->merge($customAttributes['tbody']) + ->class(['bg-white divide-y divide-gray-200 dark:bg-gray-800 dark:divide-none' => $customAttributes['tbody']['default'] ?? true]) + ->except('default') + }} + > + {{ $slot }} + + + @if (isset($tfoot)) + + {{ $tfoot }} + + @endif +
+
+@elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5') +
merge($customAttributes['wrapper']) + ->class(['table-responsive' => $customAttributes['wrapper']['default'] ?? true]) + ->except('default') + }}> + merge($customAttributes['table']) + ->class(['table table-striped' => $customAttributes['table']['default'] ?? true]) + ->except('default') + }}> + merge($customAttributes['thead']) + ->class(['' => $customAttributes['thead']['default'] ?? true]) + ->except('default') + }}> + + {{ $thead }} + + + + reorderIsEnabled()) + wire:sortable="{{ $component->getReorderMethod() }}" + @endif + + {{ + $attributes->merge($customAttributes['tbody']) + ->class(['' => $customAttributes['tbody']['default'] ?? true]) + ->except('default') + }} + > + {{ $slot }} + + + @if (isset($tfoot)) + + {{ $tfoot }} + + @endif +
+
+@endif diff --git a/resources/views/vendor/livewire-tables/components/table/empty.blade.php b/resources/views/vendor/livewire-tables/components/table/empty.blade.php new file mode 100644 index 00000000..54823e1a --- /dev/null +++ b/resources/views/vendor/livewire-tables/components/table/empty.blade.php @@ -0,0 +1,22 @@ +@aware(['component']) + +@php + $attributes = $attributes->merge(['wire:key' => 'empty-message-'.$component->id]); + $theme = $component->getTheme(); +@endphp + +@if ($theme === 'tailwind') + + +
+ {{ $component->getEmptyMessage() }} +
+ + +@elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5') + + + {{ $component->getEmptyMessage() }} + + +@endif diff --git a/resources/views/vendor/livewire-tables/components/table/row-contents.blade.php b/resources/views/vendor/livewire-tables/components/table/row-contents.blade.php new file mode 100644 index 00000000..1d37b8cc --- /dev/null +++ b/resources/views/vendor/livewire-tables/components/table/row-contents.blade.php @@ -0,0 +1,66 @@ +@aware(['component']) +@props(['row', 'rowIndex']) + +@if ($component->collapsingColumnsAreEnabled() && $component->hasCollapsedColumns()) + @php + $theme = $component->getTheme(); + $columns = collect([]); + + if ($component->shouldCollapseOnMobile() && $component->shouldCollapseOnTablet()) { + $columns->push($component->getCollapsedMobileColumns()); + $columns->push($component->getCollapsedTabletColumns()); + } elseif ($component->shouldCollapseOnTablet() && ! $component->shouldCollapseOnMobile()) { + $columns->push($component->getCollapsedTabletColumns()); + } elseif ($component->shouldCollapseOnMobile() && ! $component->shouldCollapseOnTablet()) { + $columns->push($component->getCollapsedMobileColumns()); + } + + $columns = $columns->collapse(); + + // TODO: Column count + $colspan = $columns->count() + 1; + @endphp + + @if ($theme === 'tailwind') + + +
+ @foreach($columns as $colIndex => $column) + @continue($column->isHidden()) + @continue($this->columnSelectIsEnabled() && ! $this->columnSelectIsEnabledForColumn($column)) + +

+ {{ $column->getTitle() }}: {{ $column->renderContents($row) }} +

+ @endforeach +
+ + + @elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5') + + +
+ @foreach($columns as $colIndex => $column) + @continue($column->isHidden()) + @continue($this->columnSelectIsEnabled() && ! $this->columnSelectIsEnabledForColumn($column)) + +

+ {{ $column->getTitle() }}: {{ $column->renderContents($row) }} +

+ @endforeach +
+ + + @endif +@endif diff --git a/resources/views/vendor/livewire-tables/components/table/td.blade.php b/resources/views/vendor/livewire-tables/components/table/td.blade.php new file mode 100644 index 00000000..1c3357f8 --- /dev/null +++ b/resources/views/vendor/livewire-tables/components/table/td.blade.php @@ -0,0 +1,43 @@ +@aware(['component', 'row', 'rowIndex']) +@props(['column', 'colIndex']) + +@php + $attributes = $attributes->merge(['wire:key' => 'cell-'.$rowIndex.'-'.$colIndex.'-'.$component->id]); + $theme = $component->getTheme(); + $customAttributes = $component->getTdAttributes($column, $row, $colIndex, $rowIndex) +@endphp + +@if ($theme === 'tailwind') + isClickable()) + onclick="window.open('{{ $component->getTableRowUrl($row) }}', '{{ $component->getTableRowUrlTarget($row) ?? '_self' }}')" + @endif + + {{ + $attributes->merge($customAttributes) + ->class(['px-6 py-4 whitespace-nowrap text-sm font-medium dark:text-white' => $customAttributes['default'] ?? true]) + ->class(['hidden sm:table-cell' => $column && $column->shouldCollapseOnMobile()]) + ->class(['hidden md:table-cell' => $column && $column->shouldCollapseOnTablet()]) + ->except('default') + }} + > + {{ $slot }} + +@elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5') + isClickable()) + onclick="window.open('{{ $component->getTableRowUrl($row) }}', '{{ $component->getTableRowUrlTarget($row) ?? '_self' }}')" + style="cursor:pointer" + @endif + + {{ + $attributes->merge($customAttributes) + ->class(['' => $customAttributes['default'] ?? true]) + ->class(['d-none d-sm-table-cell' => $column && $column->shouldCollapseOnMobile()]) + ->class(['d-none d-md-table-cell' => $column && $column->shouldCollapseOnTablet()]) + ->except('default') + }} + > + {{ $slot }} + +@endif diff --git a/resources/views/vendor/livewire-tables/components/table/td/bulk-actions.blade.php b/resources/views/vendor/livewire-tables/components/table/td/bulk-actions.blade.php new file mode 100644 index 00000000..3fa48404 --- /dev/null +++ b/resources/views/vendor/livewire-tables/components/table/td/bulk-actions.blade.php @@ -0,0 +1,43 @@ +@aware(['component']) +@props(['row']) + +@if ($component->bulkActionsAreEnabled() && $component->hasBulkActions()) + @php + $theme = $component->getTheme(); + @endphp + + @if ($theme === 'tailwind') + +
+ +
+
+ @elseif ($theme === 'bootstrap-4') + + + + @elseif ($theme === 'bootstrap-5') + +
+ +
+
+ @endif +@endif diff --git a/resources/views/vendor/livewire-tables/components/table/td/plain.blade.php b/resources/views/vendor/livewire-tables/components/table/td/plain.blade.php new file mode 100644 index 00000000..3ad6acc4 --- /dev/null +++ b/resources/views/vendor/livewire-tables/components/table/td/plain.blade.php @@ -0,0 +1,24 @@ +@aware(['component']) +@props(['column' => null, 'customAttributes' => []]) + +@php + $theme = $component->getTheme(); +@endphp + +@if ($theme === 'tailwind') + merge($customAttributes) + ->class(['px-6 py-4 whitespace-nowrap text-sm font-medium dark:text-white' => $customAttributes['default'] ?? true]) + ->class(['hidden sm:table-cell' => $column && $column->shouldCollapseOnMobile()]) + ->class(['hidden md:table-cell' => $column && $column->shouldCollapseOnTablet()]) + ->except('default') + }}>{{ $slot }} +@elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5') + merge($customAttributes) + ->class(['' => $customAttributes['default'] ?? true]) + ->class(['d-none d-sm-table-cell' => $column && $column->shouldCollapseOnMobile()]) + ->class(['d-none d-md-table-cell' => $column && $column->shouldCollapseOnTablet()]) + ->except('default') + }}>{{ $slot }} +@endif diff --git a/resources/views/vendor/livewire-tables/components/table/td/reorder.blade.php b/resources/views/vendor/livewire-tables/components/table/td/reorder.blade.php new file mode 100644 index 00000000..222fef58 --- /dev/null +++ b/resources/views/vendor/livewire-tables/components/table/td/reorder.blade.php @@ -0,0 +1,21 @@ +@aware(['component']) + +@php + $theme = $component->getTheme(); +@endphp + +@if ($this->currentlyReorderingIsEnabled()) + @if ($theme === 'tailwind') + + + + + + @elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5') + + + + + + @endif +@endif diff --git a/resources/views/vendor/livewire-tables/components/table/td/row-contents.blade.php b/resources/views/vendor/livewire-tables/components/table/td/row-contents.blade.php new file mode 100644 index 00000000..db155fa0 --- /dev/null +++ b/resources/views/vendor/livewire-tables/components/table/td/row-contents.blade.php @@ -0,0 +1,67 @@ +@aware(['component']) +@props(['rowIndex', 'hidden' => false]) + +@if ($component->collapsingColumnsAreEnabled() && $component->hasCollapsedColumns()) + @php + $theme = $component->getTheme(); + @endphp + + @if ($theme === 'tailwind') + merge(['class' => 'p-3 table-cell text-center']) + ->class([ + 'md:hidden' => + (($component->shouldCollapseOnMobile() && $component->shouldCollapseOnTablet()) || + ($component->shouldCollapseOnTablet() && ! $component->shouldCollapseOnMobile())) + ]) + ->class(['sm:hidden' => $component->shouldCollapseOnMobile() && ! $component->shouldCollapseOnTablet()]) + }} + > + @if (! $hidden) + + @endif + + @elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5') + class([ + 'd-md-none' => + (($component->shouldCollapseOnMobile() && $component->shouldCollapseOnTablet()) || + ($component->shouldCollapseOnTablet() && ! $component->shouldCollapseOnMobile())) + ]) + ->class(['d-sm-none' => $component->shouldCollapseOnMobile() && ! $component->shouldCollapseOnTablet()]) + }} + > + @if (! $hidden) + + @endif + + @endif +@endif diff --git a/resources/views/vendor/livewire-tables/components/table/th.blade.php b/resources/views/vendor/livewire-tables/components/table/th.blade.php new file mode 100644 index 00000000..6875e908 --- /dev/null +++ b/resources/views/vendor/livewire-tables/components/table/th.blade.php @@ -0,0 +1,95 @@ +@aware(['component']) +@props(['column', 'index']) + +@php + $attributes = $attributes->merge(['wire:key' => 'header-col-'.$index.'-'.$component->id]); + $theme = $component->getTheme(); + $customAttributes = $component->getThAttributes($column); + $customSortButtonAttributes = $component->getThSortButtonAttributes($column); + $direction = $column->hasField() ? $component->getSort($column->getColumnSelectName()) : null; +@endphp + +@if ($theme === 'tailwind') + merge($customAttributes) + ->class(['px-6 py-3 text-left text-xs font-medium whitespace-nowrap text-gray-500 uppercase tracking-wider dark:bg-gray-800 dark:text-gray-400' => $customAttributes['default'] ?? true]) + ->class(['hidden sm:table-cell' => $column->shouldCollapseOnMobile()]) + ->class(['hidden md:table-cell' => $column->shouldCollapseOnTablet()]) + ->except('default') + }}> + @unless ($component->sortingIsEnabled() && $column->isSortable()) + {{ $column->getTitle() }} + @else + + @endunless + +@elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5') + merge($customAttributes) + ->class(['' => $customAttributes['default'] ?? true]) + ->class(['d-none d-sm-table-cell' => $column->shouldCollapseOnMobile()]) + ->class(['d-none d-md-table-cell' => $column->shouldCollapseOnTablet()]) + ->except('default') + }}> + @unless ($component->sortingIsEnabled() && $column->isSortable()) + {{ $column->getTitle() }} + @else +
+ {{ $column->getTitle() }} + + + @if ($direction === 'asc') + + + + @elseif ($direction === 'desc') + + + + @else + + + + @endif + +
+ @endunless + +@endif diff --git a/resources/views/vendor/livewire-tables/components/table/th/bulk-actions.blade.php b/resources/views/vendor/livewire-tables/components/table/th/bulk-actions.blade.php new file mode 100644 index 00000000..3e61f8a9 --- /dev/null +++ b/resources/views/vendor/livewire-tables/components/table/th/bulk-actions.blade.php @@ -0,0 +1,36 @@ +@aware(['component']) + +@if ($component->bulkActionsAreEnabled() && $component->hasBulkActions()) + @php + $theme = $component->getTheme(); + @endphp + + @if ($theme === 'tailwind') + +
+ +
+
+ @elseif ($theme === 'bootstrap-4') + + + + @elseif ($theme === 'bootstrap-5') + +
+ +
+
+ @endif +@endif diff --git a/resources/views/vendor/livewire-tables/components/table/th/plain.blade.php b/resources/views/vendor/livewire-tables/components/table/th/plain.blade.php new file mode 100644 index 00000000..f7fd637e --- /dev/null +++ b/resources/views/vendor/livewire-tables/components/table/th/plain.blade.php @@ -0,0 +1,11 @@ +@aware(['component']) + +@php + $theme = $component->getTheme(); +@endphp + +@if ($theme === 'tailwind') + merge(['class' => 'table-cell px-3 py-2 md:px-6 md:py-3 text-center md:text-left bg-gray-50 dark:bg-gray-800']) }}>{{ $slot }} +@elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5') + {{ $slot }} +@endif diff --git a/resources/views/vendor/livewire-tables/components/table/th/reorder.blade.php b/resources/views/vendor/livewire-tables/components/table/th/reorder.blade.php new file mode 100644 index 00000000..85108625 --- /dev/null +++ b/resources/views/vendor/livewire-tables/components/table/th/reorder.blade.php @@ -0,0 +1,5 @@ +@aware(['component']) + +@if ($this->currentlyReorderingIsEnabled()) + +@endif diff --git a/resources/views/vendor/livewire-tables/components/table/th/row-contents.blade.php b/resources/views/vendor/livewire-tables/components/table/th/row-contents.blade.php new file mode 100644 index 00000000..b39b5dd1 --- /dev/null +++ b/resources/views/vendor/livewire-tables/components/table/th/row-contents.blade.php @@ -0,0 +1,37 @@ +@aware(['component']) + +@if ($component->collapsingColumnsAreEnabled() && $component->hasCollapsedColumns()) + @php + $theme = $component->getTheme(); + @endphp + + @if ($theme === 'tailwind') + merge(['class' => 'table-cell dark:bg-gray-800']) + ->class([ + 'md:hidden' => + (($component->shouldCollapseOnMobile() && $component->shouldCollapseOnTablet()) || + ($component->shouldCollapseOnTablet() && ! $component->shouldCollapseOnMobile())) + ]) + ->class(['sm:hidden' => $component->shouldCollapseOnMobile() && ! $component->shouldCollapseOnTablet()]) + }} + > + @elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5') + merge(['class' => 'd-table-cell']) + ->class([ + 'd-md-none' => + (($component->shouldCollapseOnMobile() && $component->shouldCollapseOnTablet()) || + ($component->shouldCollapseOnTablet() && ! $component->shouldCollapseOnMobile())) + ]) + ->class(['d-sm-none' => $component->shouldCollapseOnMobile() && ! $component->shouldCollapseOnTablet()]) + }} + > + @endif +@endif diff --git a/resources/views/vendor/livewire-tables/components/table/tr.blade.php b/resources/views/vendor/livewire-tables/components/table/tr.blade.php new file mode 100644 index 00000000..d35b8b90 --- /dev/null +++ b/resources/views/vendor/livewire-tables/components/table/tr.blade.php @@ -0,0 +1,45 @@ +@aware(['component']) +@props(['row', 'rowIndex']) + +@php + $attributes = $attributes->merge(['wire:key' => 'row-'.$rowIndex.'-'.$component->id]); + $theme = $component->getTheme(); + $customAttributes = $this->getTrAttributes($row, $rowIndex); +@endphp + +@if ($theme === 'tailwind') + reorderIsEnabled() && $component->currentlyReorderingIsEnabled()) + wire:sortable.item="{{ $row->getKey() }}" + @endif + + {{ + $attributes->merge($customAttributes) + ->class(['bg-white dark:bg-gray-700 dark:text-white' => ($customAttributes['default'] ?? true) && $rowIndex % 2 === 0]) + ->class(['bg-gray-50 dark:bg-gray-800 dark:text-white' => ($customAttributes['default'] ?? true) && $rowIndex % 2 !== 0]) + ->class(['cursor-pointer' => $component->hasTableRowUrl()]) + ->except('default') + }} + > + {{ $slot }} + +@elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5') + reorderIsEnabled() && $component->currentlyReorderingIsEnabled()) + wire:sortable.item="{{ $row->getKey() }}" + @endif + + {{ + $attributes->merge($customAttributes) + ->class(['' => ($customAttributes['default'] ?? true) && $rowIndex % 2 === 0]) + ->class(['' => ($customAttributes['default'] ?? true) && $rowIndex % 2 !== 0]) + ->except('default') + }} + > + {{ $slot }} + +@endif diff --git a/resources/views/vendor/livewire-tables/components/table/tr/bulk-actions.blade.php b/resources/views/vendor/livewire-tables/components/table/tr/bulk-actions.blade.php new file mode 100644 index 00000000..744fd3cc --- /dev/null +++ b/resources/views/vendor/livewire-tables/components/table/tr/bulk-actions.blade.php @@ -0,0 +1,119 @@ +@aware(['component']) +@props(['rows']) + +@if ($component->bulkActionsAreEnabled() && $component->hasBulkActions() && $component->hasSelected()) + @php + $table = $component->getTableName(); + $theme = $component->getTheme(); + $colspan = $component->getColspanCount(); + $selected = $component->getSelectedCount(); + $selectAll = $component->selectAllIsEnabled(); + @endphp + + @if ($theme === 'tailwind') + + + @if ($selectAll) +
+ + @lang('You are currently selecting all') + {{ number_format($rows->total()) }} + @lang('rows'). + + + +
+ @else +
+ + @lang('You have selected') + {{ $selected }} + @lang('rows, do you want to select all') + {{ number_format($rows->total()) }}? + + + + + +
+ @endif +
+
+ @elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5') + + + @if ($selectAll) +
+ + @lang('You are currently selecting all') + {{ number_format($rows->total()) }} + @lang('rows'). + + + +
+ @else +
+ + @lang('You have selected') + {{ $selected }} + @lang('rows, do you want to select all') + {{ number_format($rows->total()) }}? + + + + + +
+ @endif +
+
+ @endif +@endif diff --git a/resources/views/vendor/livewire-tables/components/table/tr/footer.blade.php b/resources/views/vendor/livewire-tables/components/table/tr/footer.blade.php new file mode 100644 index 00000000..43bbd5a4 --- /dev/null +++ b/resources/views/vendor/livewire-tables/components/table/tr/footer.blade.php @@ -0,0 +1,30 @@ +@aware(['component']) +@props(['rows']) + + + + @if ($this->currentlyReorderingIsEnabled()) + + @endif + + @if ($this->bulkActionsAreEnabled() && $this->hasBulkActions()) + + @endif + + @if ($this->collapsingColumnsAreEnabled() && $this->hasCollapsedColumns()) + + @endif + + @foreach($this->getColumns() as $colIndex => $column) + @continue($column->isHidden()) + @continue($this->columnSelectIsEnabled() && ! $this->columnSelectIsEnabledForColumn($column)) + @continue($this->currentlyReorderingIsDisabled() && $column->isReorderColumn() && $this->hideReorderColumnUnlessReorderingIsEnabled()) + + + {{ $column->getFooterContents($rows) }} + + @endforeach + \ No newline at end of file diff --git a/resources/views/vendor/livewire-tables/components/table/tr/plain.blade.php b/resources/views/vendor/livewire-tables/components/table/tr/plain.blade.php new file mode 100644 index 00000000..91038e60 --- /dev/null +++ b/resources/views/vendor/livewire-tables/components/table/tr/plain.blade.php @@ -0,0 +1,24 @@ +@aware(['component']) +@props(['customAttributes' => []]) + +@php + $theme = $component->getTheme(); +@endphp + +@if ($theme === 'tailwind') + merge($customAttributes) + ->class(['bg-white dark:bg-gray-700 dark:text-white' => $customAttributes['default'] ?? true]) + ->except('default') + }}> + {{ $slot }} + +@elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5') + merge($customAttributes) + ->class(['' => $customAttributes['default'] ?? true]) + ->except('default') + }}> + {{ $slot }} + +@endif diff --git a/resources/views/vendor/livewire-tables/components/table/tr/secondary-header.blade.php b/resources/views/vendor/livewire-tables/components/table/tr/secondary-header.blade.php new file mode 100644 index 00000000..b34e35e6 --- /dev/null +++ b/resources/views/vendor/livewire-tables/components/table/tr/secondary-header.blade.php @@ -0,0 +1,30 @@ +@aware(['component']) +@props(['rows']) + + + + @if ($this->currentlyReorderingIsEnabled()) + + @endif + + @if ($this->bulkActionsAreEnabled() && $this->hasBulkActions()) + + @endif + + @if ($this->collapsingColumnsAreEnabled() && $this->hasCollapsedColumns()) + + @endif + + @foreach($this->getColumns() as $colIndex => $column) + @continue($column->isHidden()) + @continue($this->columnSelectIsEnabled() && ! $this->columnSelectIsEnabledForColumn($column)) + @continue($this->currentlyReorderingIsDisabled() && $column->isReorderColumn() && $this->hideReorderColumnUnlessReorderingIsEnabled()) + + + {{ $column->getSecondaryHeaderContents($rows) }} + + @endforeach + \ No newline at end of file diff --git a/resources/views/vendor/livewire-tables/components/tools.blade.php b/resources/views/vendor/livewire-tables/components/tools.blade.php new file mode 100644 index 00000000..24c3c0e0 --- /dev/null +++ b/resources/views/vendor/livewire-tables/components/tools.blade.php @@ -0,0 +1,15 @@ +@aware(['component']) + +@php + $theme = $component->getTheme(); +@endphp + +@if ($theme === 'tailwind') +
+ {{ $slot }} +
+@elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5') +
+ {{ $slot }} +
+@endif diff --git a/resources/views/vendor/livewire-tables/components/tools/filter-pills.blade.php b/resources/views/vendor/livewire-tables/components/tools/filter-pills.blade.php new file mode 100644 index 00000000..15443ac6 --- /dev/null +++ b/resources/views/vendor/livewire-tables/components/tools/filter-pills.blade.php @@ -0,0 +1,137 @@ +@aware(['component']) + +@php + $theme = $component->getTheme(); +@endphp + +@if ($theme === 'tailwind') +
+ @if ($component->filtersAreEnabled() && $component->filterPillsAreEnabled() && $component->hasAppliedVisibleFiltersForPills()) +
+ @lang('Applied Filters'): + + @foreach($component->getAppliedFiltersWithValues() as $filterSelectName => $value) + @php + $filter = $component->getFilterByKey($filterSelectName); + @endphp + + @continue(is_null($filter)) + @continue($filter->isHiddenFromPills()) + + + {{ $filter->getFilterPillTitle() }}: {{ $filter->getFilterPillValue($value) }} + + + + @endforeach + + +
+ @endif +
+@elseif ($theme === 'bootstrap-4') +
+ @if ($component->filtersAreEnabled() && $component->filterPillsAreEnabled() && $component->hasAppliedVisibleFiltersForPills()) +
+ @lang('Applied Filters'): + + @foreach($component->getAppliedFiltersWithValues() as $filterSelectName => $value) + @php + $filter = $component->getFilterByKey($filterSelectName); + @endphp + + @continue(is_null($filter)) + @continue($filter->isHiddenFromPills()) + + + {{ $filter->getFilterPillTitle() }}: {{ $filter->getFilterPillValue($value) }} + + + @lang('Remove filter option') + + + + + + @endforeach + + + @lang('Clear') + +
+ @endif +
+@elseif ($theme === 'bootstrap-5') +
+ @if ($component->filtersAreEnabled() && $component->filterPillsAreEnabled() && $component->hasAppliedVisibleFiltersForPills()) +
+ @lang('Applied Filters'): + + @foreach($component->getAppliedFiltersWithValues() as $filterSelectName => $value) + @php + $filter = $component->getFilterByKey($filterSelectName); + @endphp + + @continue(is_null($filter)) + @continue($filter->isHiddenFromPills()) + + + {{ $filter->getFilterPillTitle() }}: {{ $filter->getFilterPillValue($value) }} + + + @lang('Remove filter option') + + + + + + @endforeach + + + @lang('Clear') + +
+ @endif +
+@endif diff --git a/resources/views/vendor/livewire-tables/components/tools/filters/date.blade.php b/resources/views/vendor/livewire-tables/components/tools/filters/date.blade.php new file mode 100644 index 00000000..15411674 --- /dev/null +++ b/resources/views/vendor/livewire-tables/components/tools/filters/date.blade.php @@ -0,0 +1,29 @@ +@php + $theme = $component->getTheme(); +@endphp + +@if ($theme === 'tailwind') +
+ hasConfig('min')) min="{{ $filter->getConfig('min') }}" @endif + @if($filter->hasConfig('max')) max="{{ $filter->getConfig('max') }}" @endif + class="block w-full border-gray-300 rounded-md shadow-sm transition duration-150 ease-in-out focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 dark:bg-gray-800 dark:text-white dark:border-gray-600" + /> +
+@elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5') +
+ hasConfig('min')) min="{{ $filter->getConfig('min') }}" @endif + @if($filter->hasConfig('max')) max="{{ $filter->getConfig('max') }}" @endif + class="form-control" + /> +
+@endif diff --git a/resources/views/vendor/livewire-tables/components/tools/filters/datetime.blade.php b/resources/views/vendor/livewire-tables/components/tools/filters/datetime.blade.php new file mode 100644 index 00000000..74a57b1c --- /dev/null +++ b/resources/views/vendor/livewire-tables/components/tools/filters/datetime.blade.php @@ -0,0 +1,29 @@ +@php + $theme = $component->getTheme(); +@endphp + +@if ($theme === 'tailwind') +
+ hasConfig('min')) min="{{ $filter->getConfig('min') }}" @endif + @if($filter->hasConfig('max')) max="{{ $filter->getConfig('max') }}" @endif + class="block w-full border-gray-300 rounded-md shadow-sm transition duration-150 ease-in-out focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 dark:bg-gray-800 dark:text-white dark:border-gray-600" + /> +
+@elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5') +
+ hasConfig('min')) min="{{ $filter->getConfig('min') }}" @endif + @if($filter->hasConfig('max')) max="{{ $filter->getConfig('max') }}" @endif + class="form-control" + /> +
+@endif diff --git a/resources/views/vendor/livewire-tables/components/tools/filters/multi-select.blade.php b/resources/views/vendor/livewire-tables/components/tools/filters/multi-select.blade.php new file mode 100644 index 00000000..01f42d47 --- /dev/null +++ b/resources/views/vendor/livewire-tables/components/tools/filters/multi-select.blade.php @@ -0,0 +1,60 @@ +@php + $theme = $component->getTheme(); +@endphp + +@if ($theme === 'tailwind') +
+
+ getAppliedFilterWithValue($filter->getKey()) ?? []) === count($filter->getOptions()) ? 'checked' : ''}} + + class="text-indigo-600 rounded border-gray-300 shadow-sm transition duration-150 ease-in-out focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 dark:bg-gray-900 dark:text-white dark:border-gray-600 dark:hover:bg-gray-600 dark:focus:bg-gray-600 disabled:opacity-50 disabled:cursor-wait" + > + +
+ + @foreach($filter->getOptions() as $key => $value) +
+ getAppliedFilterWithValue($filter->getKey()) ?? []) === count($filter->getOptions()) ? 'disabled' : ''}} + :class="{'disabled:bg-gray-400 disabled:hover:bg-gray-400' : {{ count($component->getAppliedFilterWithValue($filter->getKey()) ?? []) === count($filter->getOptions()) ? 'true' : 'false' }}}" + class="text-indigo-600 rounded border-gray-300 shadow-sm transition duration-150 ease-in-out focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 dark:bg-gray-900 dark:text-white dark:border-gray-600 dark:hover:bg-gray-600 dark:focus:bg-gray-600 disabled:opacity-50 disabled:cursor-wait" + > + +
+ @endforeach +
+@elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5') +
+ getAppliedFilterWithValue($filter->getKey()) ?? []) === count($filter->getOptions()) ? 'checked' : ''}} + class="form-check-input" + > + +
+ + @foreach($filter->getOptions() as $key => $value) +
+ + +
+ @endforeach +@endif diff --git a/resources/views/vendor/livewire-tables/components/tools/filters/number.blade.php b/resources/views/vendor/livewire-tables/components/tools/filters/number.blade.php new file mode 100644 index 00000000..eba2665e --- /dev/null +++ b/resources/views/vendor/livewire-tables/components/tools/filters/number.blade.php @@ -0,0 +1,29 @@ +@php + $theme = $component->getTheme(); +@endphp + +@if ($theme === 'tailwind') +
+ hasConfig('min')) min="{{ $filter->getConfig('min') }}" @endif + @if($filter->hasConfig('max')) max="{{ $filter->getConfig('max') }}" @endif + class="block w-full border-gray-300 rounded-md shadow-sm transition duration-150 ease-in-out focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 dark:bg-gray-800 dark:text-white dark:border-gray-600" + /> +
+@elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5') +
+ hasConfig('min')) min="{{ $filter->getConfig('min') }}" @endif + @if($filter->hasConfig('max')) max="{{ $filter->getConfig('max') }}" @endif + class="form-control" + /> +
+@endif diff --git a/resources/views/vendor/livewire-tables/components/tools/filters/select.blade.php b/resources/views/vendor/livewire-tables/components/tools/filters/select.blade.php new file mode 100644 index 00000000..f4b4fb4c --- /dev/null +++ b/resources/views/vendor/livewire-tables/components/tools/filters/select.blade.php @@ -0,0 +1,45 @@ +@php + $theme = $component->getTheme(); +@endphp + +@if ($theme === 'tailwind') +
+ +
+@elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5') + +@endif diff --git a/resources/views/vendor/livewire-tables/components/tools/filters/text-field.blade.php b/resources/views/vendor/livewire-tables/components/tools/filters/text-field.blade.php new file mode 100644 index 00000000..73edc449 --- /dev/null +++ b/resources/views/vendor/livewire-tables/components/tools/filters/text-field.blade.php @@ -0,0 +1,29 @@ +@php + $theme = $component->getTheme(); +@endphp + +@if ($theme === 'tailwind') +
+ hasConfig('placeholder')) placeholder="{{ $filter->getConfig('placeholder') }}" @endif + @if($filter->hasConfig('maxlength')) maxlength="{{ $filter->getConfig('maxlength') }}" @endif + class="block w-full border-gray-300 rounded-md shadow-sm transition duration-150 ease-in-out focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 dark:bg-gray-800 dark:text-white dark:border-gray-600" + /> +
+@elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5') +
+ hasConfig('placeholder')) placeholder="{{ $filter->getConfig('placeholder') }}" @endif + @if($filter->hasConfig('maxlength')) maxlength="{{ $filter->getConfig('maxlength') }}" @endif + class="form-control" + /> +
+@endif diff --git a/resources/views/vendor/livewire-tables/components/tools/sorting-pills.blade.php b/resources/views/vendor/livewire-tables/components/tools/sorting-pills.blade.php new file mode 100644 index 00000000..4310df09 --- /dev/null +++ b/resources/views/vendor/livewire-tables/components/tools/sorting-pills.blade.php @@ -0,0 +1,140 @@ +@aware(['component']) + +@php + $theme = $component->getTheme(); +@endphp + +@if ($theme === 'tailwind') +
+ @if ($component->sortingPillsAreEnabled() && $component->hasSorts()) +
+ @lang('Applied Sorting'): + + @foreach($component->getSorts() as $columnSelectName => $direction) + @php + $column = $component->getColumnBySelectName($columnSelectName); + @endphp + + @continue(is_null($column)) + @continue($column->isHidden()) + @continue($this->columnSelectIsEnabled() && ! $this->columnSelectIsEnabledForColumn($column)) + + + {{ $column->getSortingPillTitle() }}: {{ $column->getSortingPillDirection($component, $direction) }} + + + + @endforeach + + +
+ @endif +
+@elseif ($theme === 'bootstrap-4') +
+ @if ($component->sortingPillsAreEnabled() && $component->hasSorts()) +
+ @lang('Applied Sorting'): + + @foreach($component->getSorts() as $columnSelectName => $direction) + @php + $column = $component->getColumnBySelectName($columnSelectName); + @endphp + + @continue(is_null($column)) + @continue($column->isHidden()) + @continue($this->columnSelectIsEnabled() && ! $this->columnSelectIsEnabledForColumn($column)) + + + {{ $column->getSortingPillTitle() }}: {{ $column->getSortingPillDirection($component, $direction) }} + + + @lang('Remove sort option') + + + + + + @endforeach + + + @lang('Clear') + +
+ @endif +
+@elseif ($theme === 'bootstrap-5') +
+ @if ($component->sortingPillsAreEnabled() && $component->hasSorts()) +
+ @lang('Applied Sorting'): + + @foreach($component->getSorts() as $columnSelectName => $direction) + @php + $column = $component->getColumnBySelectName($columnSelectName); + @endphp + + @continue(is_null($column)) + @continue($column->isHidden()) + @continue($this->columnSelectIsEnabled() && ! $this->columnSelectIsEnabledForColumn($column)) + + + {{ $column->getSortingPillTitle() }}: {{ $column->getSortingPillDirection($component, $direction) }} + + + @lang('Remove sort option') + + + + + + @endforeach + + + @lang('Clear') + +
+ @endif +
+@endif diff --git a/resources/views/vendor/livewire-tables/components/tools/toolbar.blade.php b/resources/views/vendor/livewire-tables/components/tools/toolbar.blade.php new file mode 100644 index 00000000..be4a95f6 --- /dev/null +++ b/resources/views/vendor/livewire-tables/components/tools/toolbar.blade.php @@ -0,0 +1,878 @@ +@aware(['component']) + +@php + $theme = $component->getTheme(); +@endphp + +@if ($component->hasConfigurableAreaFor('before-toolbar')) + @include($component->getConfigurableAreaFor('before-toolbar'), $component->getParametersForConfigurableArea('before-toolbar')) +@endif + +@if ($theme === 'tailwind') +
+
+ @if ($component->hasConfigurableAreaFor('toolbar-left-start')) + @include($component->getConfigurableAreaFor('toolbar-left-start'), $component->getParametersForConfigurableArea('toolbar-left-start')) + @endif + + @if ($component->reorderIsEnabled()) + + @endif + + @if ($component->searchIsEnabled() && $component->searchVisibilityIsEnabled()) +
+ getSearchOptions() }}="{{ $component->getTableName() }}.search" + placeholder="{{ __('Search') }}" + type="text" + class="block w-full border-gray-300 rounded-md shadow-sm transition duration-150 ease-in-out sm:text-sm sm:leading-5 dark:bg-gray-700 dark:text-white dark:border-gray-600 @if ($component->hasSearch()) rounded-none rounded-l-md focus:ring-0 focus:border-gray-300 @else focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 rounded-md @endif" + /> + + @if ($component->hasSearch()) + + + + + + @endif +
+ @endif + + @if ($component->filtersAreEnabled() && $component->filtersVisibilityIsEnabled() && $component->hasVisibleFilters()) +
isFilterLayoutPopover()) + x-data="{ open: false }" + x-on:keydown.escape.stop="open = false" + x-on:mousedown.away="open = false" + @endif + + class="relative block md:inline-block text-left" + > +
+ +
+ + @if ($component->isFilterLayoutPopover()) + + @endif +
+ @endif + + @if ($component->hasConfigurableAreaFor('toolbar-left-end')) + @include($component->getConfigurableAreaFor('toolbar-left-end'), $component->getParametersForConfigurableArea('toolbar-left-end')) + @endif +
+ +
+ @if ($component->hasConfigurableAreaFor('toolbar-right-start')) + @include($component->getConfigurableAreaFor('toolbar-right-start'), $component->getParametersForConfigurableArea('toolbar-right-start')) + @endif + + @if ($component->showBulkActionsDropdown()) +
+
+
+ + + +
+ +
+
+ +
+
+
+
+ @endif + + @if ($component->columnSelectIsEnabled()) +
+
+
+ + + +
+ +
+
+ +
+
+
+
+ @endif + + @if ($component->paginationIsEnabled() && $component->perPageVisibilityIsEnabled()) +
+ +
+ @endif + + @if ($component->hasConfigurableAreaFor('toolbar-right-end')) + @include($component->getConfigurableAreaFor('toolbar-right-end'), $component->getParametersForConfigurableArea('toolbar-right-end')) + @endif +
+
+ + @if ($component->filtersAreEnabled() && $component->filtersVisibilityIsEnabled() && $component->hasVisibleFilters() && $component->isFilterLayoutSlideDown()) +
+
+ @foreach($component->getFilters() as $filter) + @if($filter->isVisibleInMenus()) +
+ + + {{ $filter->render($component) }} +
+ @endif + @endforeach +
+
+ @endif +@elseif ($theme === 'bootstrap-4') +
+
+ @if ($component->hasConfigurableAreaFor('toolbar-left-start')) + @include($component->getConfigurableAreaFor('toolbar-left-start'), $component->getParametersForConfigurableArea('toolbar-left-start')) + @endif + + @if ($component->reorderIsEnabled()) +
+ +
+ @endif + + @if ($component->searchIsEnabled() && $component->searchVisibilityIsEnabled()) +
+ getSearchOptions() }}="{{ $component->getTableName() }}.search" + placeholder="{{ __('Search') }}" + type="text" + class="form-control" + > + + @if ($component->hasSearch()) +
+ +
+ @endif +
+ @endif + + @if ($component->filtersAreEnabled() && $component->filtersVisibilityIsEnabled() && $component->hasVisibleFilters()) +
+
isFilterLayoutPopover()) + x-data="{ open: false }" + x-on:keydown.escape.stop="open = false" + x-on:mousedown.away="open = false" + @endif + + class="btn-group d-block d-md-inline" + > +
+ +
+ + @if ($component->isFilterLayoutPopover()) + + @endif +
+
+ @endif + + @if ($component->hasConfigurableAreaFor('toolbar-left-end')) + @include($component->getConfigurableAreaFor('toolbar-left-end'), $component->getParametersForConfigurableArea('toolbar-left-end')) + @endif +
+ +
+ @if ($component->hasConfigurableAreaFor('toolbar-right-start')) + @include($component->getConfigurableAreaFor('toolbar-right-start'), $component->getParametersForConfigurableArea('toolbar-right-start')) + @endif + + @if ($component->showBulkActionsDropdown()) +
+ +
+ @endif + + @if ($component->columnSelectIsEnabled()) +
+ +
+ @endif + + @if ($component->paginationIsEnabled() && $component->perPageVisibilityIsEnabled()) +
+ +
+ @endif + + @if ($component->hasConfigurableAreaFor('toolbar-right-end')) + @include($component->getConfigurableAreaFor('toolbar-right-end'), $component->getParametersForConfigurableArea('toolbar-right-end')) + @endif +
+
+ + @if ($component->filtersAreEnabled() && $component->filtersVisibilityIsEnabled() && $component->hasVisibleFilters() && $component->isFilterLayoutSlideDown()) +
+
+
+ @foreach($component->getFilters() as $filter) + @if($filter->isVisibleInMenus()) +
+ + + {{ $filter->render($component) }} +
+ @endif + @endforeach +
+
+
+ @endif +@elseif ($theme === 'bootstrap-5') +
+
+ @if ($component->hasConfigurableAreaFor('toolbar-left-start')) + @include($component->getConfigurableAreaFor('toolbar-left-start'), $component->getParametersForConfigurableArea('toolbar-left-start')) + @endif + + @if ($component->reorderIsEnabled()) +
+ +
+ @endif + + @if ($component->searchIsEnabled() && $component->searchVisibilityIsEnabled()) +
+ getSearchOptions() }}="{{ $component->getTableName() }}.search" + placeholder="{{ __('Search') }}" + type="text" + class="form-control" + > + + @if ($component->hasSearch()) + + @endif +
+ @endif + + @if ($component->filtersAreEnabled() && $component->filtersVisibilityIsEnabled() && $component->hasVisibleFilters()) +
+
isFilterLayoutPopover()) + x-data="{ open: false }" + x-on:keydown.escape.stop="open = false" + x-on:mousedown.away="open = false" + @endif + + class="btn-group d-block d-md-inline" + > +
+ +
+ + @if ($component->isFilterLayoutPopover()) + + @endif +
+
+ @endif + + @if ($component->hasConfigurableAreaFor('toolbar-left-end')) + @include($component->getConfigurableAreaFor('toolbar-left-end'), $component->getParametersForConfigurableArea('toolbar-left-end')) + @endif +
+ +
+ @if ($component->hasConfigurableAreaFor('toolbar-right-start')) + @include($component->getConfigurableAreaFor('toolbar-right-start'), $component->getParametersForConfigurableArea('toolbar-right-start')) + @endif + + @if ($component->showBulkActionsDropdown()) +
+ +
+ @endif + + @if ($component->columnSelectIsEnabled()) +
+ +
+ @endif + + @if ($component->paginationIsEnabled() && $component->perPageVisibilityIsEnabled()) +
+ +
+ @endif + + @if ($component->hasConfigurableAreaFor('toolbar-right-end')) + @include($component->getConfigurableAreaFor('toolbar-right-end'), $component->getParametersForConfigurableArea('toolbar-righ-end')) + @endif +
+
+ + @if ($component->filtersAreEnabled() && $component->filtersVisibilityIsEnabled() && $component->hasVisibleFilters() && $component->isFilterLayoutSlideDown()) +
+
+
+ @foreach($component->getFilters() as $filter) + @if($filter->isVisibleInMenus()) +
+ + + {{ $filter->render($component) }} +
+ @endif + @endforeach +
+
+
+ @endif +@endif + +@if ($component->hasConfigurableAreaFor('after-toolbar')) + @include($component->getConfigurableAreaFor('after-toolbar'), $component->getParametersForConfigurableArea('after-toolbar')) +@endif diff --git a/resources/views/vendor/livewire-tables/components/wrapper.blade.php b/resources/views/vendor/livewire-tables/components/wrapper.blade.php new file mode 100644 index 00000000..d9886135 --- /dev/null +++ b/resources/views/vendor/livewire-tables/components/wrapper.blade.php @@ -0,0 +1,23 @@ +@props(['component']) + +@php + $refresh = $this->getRefreshStatus(); + $theme = $component->getTheme(); +@endphp + +
merge($this->getComponentWrapperAttributes()) }} + + @if ($component->hasRefresh()) + wire:poll{{ $component->getRefreshOptions() }} + @endif + + @if ($component->isFilterLayoutSlideDown()) + x-data="{ filtersOpen: false }" + @endif +> + @include('livewire-tables::includes.debug') + @include('livewire-tables::includes.offline') + + {{ $slot }} +
diff --git a/resources/views/vendor/livewire-tables/datatable.blade.php b/resources/views/vendor/livewire-tables/datatable.blade.php new file mode 100644 index 00000000..65cdb6b9 --- /dev/null +++ b/resources/views/vendor/livewire-tables/datatable.blade.php @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + @foreach($columns as $index => $column) + @continue($column->isHidden()) + @continue($this->columnSelectIsEnabled() && ! $this->columnSelectIsEnabledForColumn($column)) + @continue($this->currentlyReorderingIsDisabled() && $column->isReorderColumn() && $this->hideReorderColumnUnlessReorderingIsEnabled()) + + + @endforeach + + + @if($this->secondaryHeaderIsEnabled() && $this->hasColumnsWithSecondaryHeader()) + + @endif + + + + @forelse ($rows as $rowIndex => $row) + + + + + + @foreach($columns as $colIndex => $column) + @continue($column->isHidden()) + @continue($this->columnSelectIsEnabled() && ! $this->columnSelectIsEnabledForColumn($column)) + @continue($this->currentlyReorderingIsDisabled() && $column->isReorderColumn() && $this->hideReorderColumnUnlessReorderingIsEnabled()) + + + {{ $column->renderContents($row) }} + + @endforeach + + + + @empty + + @endforelse + + @if ($this->footerIsEnabled() && $this->hasColumnsWithFooter()) + + @if ($this->useHeaderAsFooterIsEnabled()) + + @else + + @endif + + @endif + + + + + @isset($customView) + @include($customView) + @endisset + diff --git a/resources/views/vendor/livewire-tables/includes/columns/boolean.blade.php b/resources/views/vendor/livewire-tables/includes/columns/boolean.blade.php new file mode 100644 index 00000000..f959f22d --- /dev/null +++ b/resources/views/vendor/livewire-tables/includes/columns/boolean.blade.php @@ -0,0 +1,57 @@ +@php + $theme = $component->getTheme(); +@endphp + +@if ($theme === 'tailwind') + @if ($status) + @if ($type === 'icons') + + + + @elseif ($type === 'yes-no') + @if ($successValue === true) + Yes + @else + No + @endif + @endif + @else + @if ($type === 'icons') + + + + @elseif ($type === 'yes-no') + @if ($successValue === false) + Yes + @else + No + @endif + @endif + @endif +@elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5') + @if ($status) + @if ($type === 'icons') + + + + @elseif ($type === 'yes-no') + @if ($successValue === true) + Yes + @else + No + @endif + @endif + @else + @if ($type === 'icons') + + + + @elseif ($type === 'yes-no') + @if ($successValue === false) + Yes + @else + No + @endif + @endif + @endif +@endif diff --git a/resources/views/vendor/livewire-tables/includes/columns/button-group.blade.php b/resources/views/vendor/livewire-tables/includes/columns/button-group.blade.php new file mode 100644 index 00000000..78596117 --- /dev/null +++ b/resources/views/vendor/livewire-tables/includes/columns/button-group.blade.php @@ -0,0 +1,5 @@ +
arrayToAttributes($attributes) : '' !!}> + @foreach($buttons as $button) + {!! $button->getContents($row) !!} + @endforeach +
\ No newline at end of file diff --git a/resources/views/vendor/livewire-tables/includes/columns/image.blade.php b/resources/views/vendor/livewire-tables/includes/columns/image.blade.php new file mode 100644 index 00000000..ab680db0 --- /dev/null +++ b/resources/views/vendor/livewire-tables/includes/columns/image.blade.php @@ -0,0 +1 @@ +arrayToAttributes($attributes) : '' !!} /> \ No newline at end of file diff --git a/resources/views/vendor/livewire-tables/includes/columns/link.blade.php b/resources/views/vendor/livewire-tables/includes/columns/link.blade.php new file mode 100644 index 00000000..60333174 --- /dev/null +++ b/resources/views/vendor/livewire-tables/includes/columns/link.blade.php @@ -0,0 +1 @@ +arrayToAttributes($attributes) : '' !!}>{{ $title }} \ No newline at end of file diff --git a/resources/views/vendor/livewire-tables/includes/debug.blade.php b/resources/views/vendor/livewire-tables/includes/debug.blade.php new file mode 100644 index 00000000..d5e295df --- /dev/null +++ b/resources/views/vendor/livewire-tables/includes/debug.blade.php @@ -0,0 +1,20 @@ +
+ @if ($component->debugIsEnabled()) + @php + $debuggable = [ + 'query' => $component->getQuerySql(), + 'filters' => $component->getAppliedFilters(), + 'sorts' => $component->getSorts(), + 'search' => $component->getSearch(), + 'select-all' => $component->getSelectAllStatus(), + 'selected' => $component->getSelected(), + ]; + @endphp + +

@lang('Debugging Values'):

+ + @if (! app()->runningInConsole()) +
@dump($debuggable)
+ @endif + @endif +
diff --git a/resources/views/vendor/livewire-tables/includes/offline.blade.php b/resources/views/vendor/livewire-tables/includes/offline.blade.php new file mode 100644 index 00000000..30c9ad6a --- /dev/null +++ b/resources/views/vendor/livewire-tables/includes/offline.blade.php @@ -0,0 +1,30 @@ +@if ($component->offlineIndicatorIsEnabled()) + @if ($theme === 'tailwind') + + @elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5') +
+
+ + + + + @lang('You are not connected to the internet.') +
+
+ @endif +@endif diff --git a/resources/views/vendor/livewire-tables/specific/bootstrap-4/pagination.blade.php b/resources/views/vendor/livewire-tables/specific/bootstrap-4/pagination.blade.php new file mode 100644 index 00000000..35f76cd5 --- /dev/null +++ b/resources/views/vendor/livewire-tables/specific/bootstrap-4/pagination.blade.php @@ -0,0 +1,52 @@ +
+ @if ($paginator->hasPages()) + @php(isset($this->numberOfPaginatorsRendered[$paginator->getPageName()]) ? $this->numberOfPaginatorsRendered[$paginator->getPageName()]++ : $this->numberOfPaginatorsRendered[$paginator->getPageName()] = 1) + + + @endif +
diff --git a/resources/views/vendor/livewire-tables/specific/tailwind/pagination.blade.php b/resources/views/vendor/livewire-tables/specific/tailwind/pagination.blade.php new file mode 100644 index 00000000..a44b8a18 --- /dev/null +++ b/resources/views/vendor/livewire-tables/specific/tailwind/pagination.blade.php @@ -0,0 +1,106 @@ +
+ @if ($paginator->hasPages()) + @php(isset($this->numberOfPaginatorsRendered[$paginator->getPageName()]) ? $this->numberOfPaginatorsRendered[$paginator->getPageName()]++ : $this->numberOfPaginatorsRendered[$paginator->getPageName()] = 1) + + + @endif +
diff --git a/resources/views/vendor/livewire-tables/stubs/custom.blade.php b/resources/views/vendor/livewire-tables/stubs/custom.blade.php new file mode 100644 index 00000000..e69de29b diff --git a/routes/web.php b/routes/web.php index 940a70f9..9c64b937 100644 --- a/routes/web.php +++ b/routes/web.php @@ -92,6 +92,8 @@ Route::middleware([]) ->name('table.meetup'); Route::get('/meetup-events', \App\Http\Livewire\Meetup\MeetupEventTable::class) ->name('table.meetupEvent'); + Route::get('/{meetup:slug}', \App\Http\Livewire\Meetup\LandingPage::class) + ->name('landing'); }); /*