From 69c3ade2969b1ecb68e04127b83b3778e5163c32 Mon Sep 17 00:00:00 2001 From: HolgerHatGarKeineNode Date: Thu, 16 Mar 2023 15:08:42 +0100 Subject: [PATCH] add attendees export --- app/Exports/MeetupEventAttendeesExport.php | 61 ++ .../MeetupEventAttendeesExportController.php | 19 + app/Http/Livewire/Meetup/LandingPageEvent.php | 87 ++- app/Providers/AppServiceProvider.php | 63 ++ composer.json | 1 + composer.lock | 563 ++++++++++++++---- resources/lang/de.json | 4 +- resources/lang/en.json | 5 +- resources/lang/es.json | 5 +- resources/lang/fr.json | 5 +- resources/lang/hr.json | 5 +- resources/lang/it.json | 5 +- resources/lang/mk.json | 5 +- resources/lang/pl.json | 5 +- resources/lang/pt.json | 5 +- resources/lang/sv.json | 5 +- resources/lang/tr.json | 5 +- .../exports/meetupEventsAttendees.blade.php | 16 + .../meetup/landing-page-event.blade.php | 48 +- routes/web.php | 13 + 20 files changed, 784 insertions(+), 141 deletions(-) create mode 100644 app/Exports/MeetupEventAttendeesExport.php create mode 100644 app/Http/Controllers/Export/MeetupEventAttendeesExportController.php create mode 100644 resources/views/exports/meetupEventsAttendees.blade.php diff --git a/app/Exports/MeetupEventAttendeesExport.php b/app/Exports/MeetupEventAttendeesExport.php new file mode 100644 index 00000000..896ea4fb --- /dev/null +++ b/app/Exports/MeetupEventAttendeesExport.php @@ -0,0 +1,61 @@ +map(function ($value) use ($status) { + if (str($value)->contains('anon_')) { + $id = -1; + } else { + $id = str($value) + ->before('|') + ->after('id_') + ->toString(); + } + + return [ + 'id' => $id, + 'status' => $status, + 'user' => $id > 0 ? User::withoutEvents(static fn() => User::query() + ->select([ + 'id', + 'name', + 'profile_photo_path', + ]) + ->find($id) + ?->append('profile_photo_url') + ->toArray()) + : null, + 'name' => str($value) + ->after('|') + ->toString(), + ]; + }) + ->toArray(); + } + + public function view(): View + { + $attendees = $this->mapAttendees(collect($this->meetupEvent->attendees), __('Participation confirmed')); + $mightAttendees = $this->mapAttendees(collect($this->meetupEvent->might_attendees), __('Perhaps')); + + return view('exports.meetupEventsAttendees', [ + 'attendees' => array_merge($attendees, $mightAttendees), + ]); + } +} diff --git a/app/Http/Controllers/Export/MeetupEventAttendeesExportController.php b/app/Http/Controllers/Export/MeetupEventAttendeesExportController.php new file mode 100644 index 00000000..60516ca5 --- /dev/null +++ b/app/Http/Controllers/Export/MeetupEventAttendeesExportController.php @@ -0,0 +1,19 @@ +download($meetupEvent->start->toDateString().'_'.$meetupEvent->meetup->slug.'.xlsx'); + } +} diff --git a/app/Http/Livewire/Meetup/LandingPageEvent.php b/app/Http/Livewire/Meetup/LandingPageEvent.php index 9414a677..4087dc75 100644 --- a/app/Http/Livewire/Meetup/LandingPageEvent.php +++ b/app/Http/Livewire/Meetup/LandingPageEvent.php @@ -5,6 +5,7 @@ namespace App\Http\Livewire\Meetup; use App\Models\Country; use App\Models\Meetup; use App\Models\MeetupEvent; +use App\Models\User; use App\Rules\UniqueAttendeeName; use Livewire\Component; use RalphJSmit\Laravel\SEO\Support\SEOData; @@ -23,6 +24,9 @@ class LandingPageEvent extends Component public string $name = ''; + public array $attendees = []; + public array $mightAttendees = []; + public function rules() { return [ @@ -37,6 +41,7 @@ class LandingPageEvent extends Component { $this->meetupEvent->load('meetup.users'); $this->meetup = $this->meetupEvent->meetup; + $this->name = auth()->check() ? auth()->user()->name : ''; $this->checkShowUp(); } @@ -45,38 +50,72 @@ class LandingPageEvent extends Component $attendees = collect($this->meetupEvent->attendees); $mightAttendees = collect($this->meetupEvent->might_attendees); - if (auth()->check() && $attendees->contains(fn ($value) => str($value)->contains('id_'.auth()->id()))) { - $this->name = str($attendees->filter(fn ($value) => str($value)->contains('id_'.auth()->id())) + if (auth()->check() && $attendees->contains(fn($value) => str($value)->contains('id_'.auth()->id()))) { + $this->name = str($attendees->filter(fn($value) => str($value)->contains('id_'.auth()->id())) ->first()) ->after('|') ->toString(); $this->willShowUp = true; } - if (! auth()->check() && $attendees->contains(fn ($value) => str($value)->contains('anon_'.session()->getId()))) { - $this->name = str($attendees->filter(fn ($value) => str($value)->contains('anon_'.session()->getId())) + if (!auth()->check() && $attendees->contains(fn($value) => str($value)->contains('anon_'.session()->getId()))) { + $this->name = str($attendees->filter(fn($value) => str($value)->contains('anon_'.session()->getId())) ->first()) ->after('|') ->toString(); $this->willShowUp = true; } - if (auth()->check() && $mightAttendees->contains(fn ($value) => str($value)->contains('id_'.auth()->id()))) { - $this->name = str($mightAttendees->filter(fn ($value) => str($value)->contains('id_'.auth()->id())) + if (auth()->check() && $mightAttendees->contains(fn($value) => str($value)->contains('id_'.auth()->id()))) { + $this->name = str($mightAttendees->filter(fn($value) => str($value)->contains('id_'.auth()->id())) ->first()) ->after('|') ->toString(); $this->perhapsShowUp = true; } - if (! auth()->check() && $mightAttendees->contains(fn ($value + if (!auth()->check() && $mightAttendees->contains(fn($value ) => str($value)->contains('anon_'.session()->getId()))) { - $this->name = str($mightAttendees->filter(fn ($value) => str($value)->contains('anon_'.session()->getId())) + $this->name = str($mightAttendees->filter(fn($value) => str($value)->contains('anon_'.session()->getId())) ->first()) ->after('|') ->toString(); $this->perhapsShowUp = true; } + + $this->attendees = $this->mapAttendees($attendees); + $this->mightAttendees = $this->mapAttendees($mightAttendees); + } + + private function mapAttendees($collection) { + return $collection->map(function ($value) { + if (str($value)->contains('anon_')) { + $id = -1; + } else { + $id = str($value) + ->before('|') + ->after('id_') + ->toString(); + } + + return [ + 'id' => $id, + 'user' => $id > 0 ? User::withoutEvents(static fn() => User::query() + ->select([ + 'id', + 'name', + 'profile_photo_path', + ]) + ->find($id) + ?->append('profile_photo_url') + ->toArray()) + : null, + 'name' => str($value) + ->after('|') + ->toString(), + ]; + }) + ->toArray(); } public function cannotCome() @@ -84,31 +123,33 @@ class LandingPageEvent extends Component $attendees = collect($this->meetupEvent->attendees); $mightAttendees = collect($this->meetupEvent->might_attendees); - if (auth()->check() && $attendees->contains(fn ($value) => str($value)->contains('id_'.auth()->id()))) { - $attendees = $attendees->filter(fn ($value) => ! str($value)->contains('id_'.auth()->id())); + if (auth()->check() && $attendees->contains(fn($value) => str($value)->contains('id_'.auth()->id()))) { + $attendees = $attendees->filter(fn($value) => !str($value)->contains('id_'.auth()->id())); $this->willShowUp = false; } - if (! auth()->check() && $attendees->contains(fn ($value) => str($value)->contains('anon_'.session()->getId()))) { - $attendees = $attendees->filter(fn ($value) => ! str($value)->contains('anon_'.session()->getId())); + if (!auth()->check() && $attendees->contains(fn($value) => str($value)->contains('anon_'.session()->getId()))) { + $attendees = $attendees->filter(fn($value) => !str($value)->contains('anon_'.session()->getId())); $this->willShowUp = false; } - if (auth()->check() && $mightAttendees->contains(fn ($value) => str($value)->contains('id_'.auth()->id()))) { - $mightAttendees = $mightAttendees->filter(fn ($value) => ! str($value)->contains('id_'.auth()->id())); + if (auth()->check() && $mightAttendees->contains(fn($value) => str($value)->contains('id_'.auth()->id()))) { + $mightAttendees = $mightAttendees->filter(fn($value) => !str($value)->contains('id_'.auth()->id())); $this->perhapsShowUp = false; } - if (! auth()->check() && $mightAttendees->contains(fn ($value + if (!auth()->check() && $mightAttendees->contains(fn($value ) => str($value)->contains('anon_'.session()->getId()))) { - $mightAttendees = $mightAttendees->filter(fn ($value) => ! str($value)->contains('anon_'.session()->getId())); + $mightAttendees = $mightAttendees->filter(fn($value) => !str($value)->contains('anon_'.session()->getId())); $this->perhapsShowUp = false; } $this->meetupEvent->update([ - 'attendees' => $attendees->toArray(), + 'attendees' => $attendees->toArray(), 'might_attendees' => $mightAttendees->toArray(), ]); + + $this->checkShowUp(); } public function attend() @@ -116,12 +157,12 @@ class LandingPageEvent extends Component $this->validate(); $attendees = collect($this->meetupEvent->attendees); - if (auth()->check() && ! $attendees->contains('id_'.auth()->id().'|'.$this->name)) { + if (auth()->check() && !$attendees->contains('id_'.auth()->id().'|'.$this->name)) { $attendees->push('id_'.auth()->id().'|'.$this->name); $this->willShowUp = true; } - if (! auth()->check() && ! $attendees->contains('anon_'.session()->getId().'|'.$this->name)) { + if (!auth()->check() && !$attendees->contains('anon_'.session()->getId().'|'.$this->name)) { $attendees->push('anon_'.session()->getId().'|'.$this->name); $this->willShowUp = true; } @@ -129,6 +170,8 @@ class LandingPageEvent extends Component $this->meetupEvent->update([ 'attendees' => $attendees->toArray(), ]); + + $this->checkShowUp(); } public function mightAttend() @@ -136,12 +179,12 @@ class LandingPageEvent extends Component $this->validate(); $mightAttendees = collect($this->meetupEvent->might_attendees); - if (auth()->check() && ! $mightAttendees->contains('id_'.auth()->id().'|'.$this->name)) { + if (auth()->check() && !$mightAttendees->contains('id_'.auth()->id().'|'.$this->name)) { $mightAttendees->push('id_'.auth()->id().'|'.$this->name); $this->perhapsShowUp = true; } - if (! auth()->check() && ! $mightAttendees->contains('anon_'.session()->getId().'|'.$this->name)) { + if (!auth()->check() && !$mightAttendees->contains('anon_'.session()->getId().'|'.$this->name)) { $mightAttendees->push('anon_'.session()->getId().'|'.$this->name); $this->perhapsShowUp = true; } @@ -149,6 +192,8 @@ class LandingPageEvent extends Component $this->meetupEvent->update([ 'might_attendees' => $mightAttendees->toArray(), ]); + + $this->checkShowUp(); } public function render() diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 9071adb7..4ac0fb01 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -9,6 +9,12 @@ use Illuminate\Support\ServiceProvider; use Illuminate\Support\Str; use Illuminate\Support\Stringable; use Spatie\Translatable\Facades\Translatable; +use Maatwebsite\Excel\Events\AfterSheet; +use Maatwebsite\Excel\Events\BeforeExport; +use Maatwebsite\Excel\Events\BeforeSheet; +use Maatwebsite\Excel\Events\BeforeWriting; +use Maatwebsite\Excel\Sheet; +use Maatwebsite\Excel\Writer; class AppServiceProvider extends ServiceProvider { @@ -20,6 +26,63 @@ class AppServiceProvider extends ServiceProvider Date::use( Carbon::class ); + + // excel config + Sheet::macro( + 'styleCells', + function ( + Sheet $sheet, + string $cellRange, + array $style + ) { + $sheet + ->getDelegate() + ->getStyle($cellRange) + ->applyFromArray($style); + } + ); + Sheet::macro( + 'setAutofilter', + function ( + Sheet $sheet, + $cellRange + ) { + $sheet->getDelegate() + ->setAutoFilter($cellRange); + } + ); + Writer::listen( + BeforeExport::class, + function () { + } + ); + Writer::listen( + BeforeWriting::class, + function () { + } + ); + Sheet::listen( + BeforeSheet::class, + function () { + } + ); + Sheet::listen( + AfterSheet::class, + function ($event) { + $event->sheet->freezePane('A2'); + $event->sheet->setAutofilter( + $event->sheet->calculateWorksheetDimension() + ); + $event->sheet->styleCells( + 'A1:'.$event->sheet->getHighestColumn().'1', + [ + 'font' => [ + 'bold' => true, + ], + ] + ); + } + ); } /** diff --git a/composer.json b/composer.json index 500be761..37b991c3 100644 --- a/composer.json +++ b/composer.json @@ -29,6 +29,7 @@ "laravel/tinker": "^2.8", "league/glide-laravel": "^1.0", "livewire/livewire": "^2.11", + "maatwebsite/excel": "^3.1", "nova/start": "*", "oneduo/nova-time-field": "^1.0", "podcastindex/podcastindex-php": "^1.0", diff --git a/composer.lock b/composer.lock index 4d0b9868..c1dfa786 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": "82090857f80131ea826eeac73a9f26dd", + "content-hash": "d7cd13f2c5935a6f3e1df6119e3b70ba", "packages": [ { "name": "akuechler/laravel-geoly", @@ -551,6 +551,87 @@ ], "time": "2022-02-21T13:15:14+00:00" }, + { + "name": "composer/semver", + "version": "3.3.2", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.4", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.3.2" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-04-01T19:23:25+00:00" + }, { "name": "dasprid/enum", "version": "1.0.4", @@ -1408,6 +1489,67 @@ }, "time": "2022-05-08T12:55:38+00:00" }, + { + "name": "ezyang/htmlpurifier", + "version": "v4.16.0", + "source": { + "type": "git", + "url": "https://github.com/ezyang/htmlpurifier.git", + "reference": "523407fb06eb9e5f3d59889b3978d5bfe94299c8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/523407fb06eb9e5f3d59889b3978d5bfe94299c8", + "reference": "523407fb06eb9e5f3d59889b3978d5bfe94299c8", + "shasum": "" + }, + "require": { + "php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0" + }, + "require-dev": { + "cerdic/css-tidy": "^1.7 || ^2.0", + "simpletest/simpletest": "dev-master" + }, + "suggest": { + "cerdic/css-tidy": "If you want to use the filter 'Filter.ExtractStyleBlocks'.", + "ext-bcmath": "Used for unit conversion and imagecrash protection", + "ext-iconv": "Converts text to and from non-UTF-8 encodings", + "ext-tidy": "Used for pretty-printing HTML" + }, + "type": "library", + "autoload": { + "files": [ + "library/HTMLPurifier.composer.php" + ], + "psr-0": { + "HTMLPurifier": "library/" + }, + "exclude-from-classmap": [ + "/library/HTMLPurifier/Language/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-or-later" + ], + "authors": [ + { + "name": "Edward Z. Yang", + "email": "admin@htmlpurifier.org", + "homepage": "http://ezyang.com" + } + ], + "description": "Standards compliant HTML filter written in PHP", + "homepage": "http://htmlpurifier.org/", + "keywords": [ + "html" + ], + "support": { + "issues": "https://github.com/ezyang/htmlpurifier/issues", + "source": "https://github.com/ezyang/htmlpurifier/tree/v4.16.0" + }, + "time": "2022-09-18T07:06:19+00:00" + }, { "name": "fgrosse/phpasn1", "version": "v2.5.0", @@ -4462,6 +4604,86 @@ ], "time": "2023-03-03T20:12:38+00:00" }, + { + "name": "maatwebsite/excel", + "version": "3.1.48", + "source": { + "type": "git", + "url": "https://github.com/SpartnerNL/Laravel-Excel.git", + "reference": "6d0fe2a1d195960c7af7bf0de760582da02a34b9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/SpartnerNL/Laravel-Excel/zipball/6d0fe2a1d195960c7af7bf0de760582da02a34b9", + "reference": "6d0fe2a1d195960c7af7bf0de760582da02a34b9", + "shasum": "" + }, + "require": { + "composer/semver": "^3.3", + "ext-json": "*", + "illuminate/support": "5.8.*|^6.0|^7.0|^8.0|^9.0|^10.0", + "php": "^7.0|^8.0", + "phpoffice/phpspreadsheet": "^1.18", + "psr/simple-cache": "^1.0|^2.0|^3.0" + }, + "require-dev": { + "orchestra/testbench": "^6.0|^7.0|^8.0", + "predis/predis": "^1.1" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Maatwebsite\\Excel\\ExcelServiceProvider" + ], + "aliases": { + "Excel": "Maatwebsite\\Excel\\Facades\\Excel" + } + } + }, + "autoload": { + "psr-4": { + "Maatwebsite\\Excel\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Patrick Brouwers", + "email": "patrick@spartner.nl" + } + ], + "description": "Supercharged Excel exports and imports in Laravel", + "keywords": [ + "PHPExcel", + "batch", + "csv", + "excel", + "export", + "import", + "laravel", + "php", + "phpspreadsheet" + ], + "support": { + "issues": "https://github.com/SpartnerNL/Laravel-Excel/issues", + "source": "https://github.com/SpartnerNL/Laravel-Excel/tree/3.1.48" + }, + "funding": [ + { + "url": "https://laravel-excel.com/commercial-support", + "type": "custom" + }, + { + "url": "https://github.com/patrickbrouwers", + "type": "github" + } + ], + "time": "2023-02-22T21:01:38+00:00" + }, { "name": "maennchen/zipstream-php", "version": "v2.4.0", @@ -4540,6 +4762,113 @@ ], "time": "2022-12-08T12:29:14+00:00" }, + { + "name": "markbaker/complex", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPComplex.git", + "reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/95c56caa1cf5c766ad6d65b6344b807c1e8405b9", + "reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "dev-master", + "phpcompatibility/php-compatibility": "^9.3", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "squizlabs/php_codesniffer": "^3.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "Complex\\": "classes/src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "description": "PHP Class for working with complex numbers", + "homepage": "https://github.com/MarkBaker/PHPComplex", + "keywords": [ + "complex", + "mathematics" + ], + "support": { + "issues": "https://github.com/MarkBaker/PHPComplex/issues", + "source": "https://github.com/MarkBaker/PHPComplex/tree/3.0.2" + }, + "time": "2022-12-06T16:21:08+00:00" + }, + { + "name": "markbaker/matrix", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPMatrix.git", + "reference": "728434227fe21be27ff6d86621a1b13107a2562c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/728434227fe21be27ff6d86621a1b13107a2562c", + "reference": "728434227fe21be27ff6d86621a1b13107a2562c", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "dev-master", + "phpcompatibility/php-compatibility": "^9.3", + "phpdocumentor/phpdocumentor": "2.*", + "phploc/phploc": "^4.0", + "phpmd/phpmd": "2.*", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "sebastian/phpcpd": "^4.0", + "squizlabs/php_codesniffer": "^3.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "Matrix\\": "classes/src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@demon-angel.eu" + } + ], + "description": "PHP Class for working with matrices", + "homepage": "https://github.com/MarkBaker/PHPMatrix", + "keywords": [ + "mathematics", + "matrix", + "vector" + ], + "support": { + "issues": "https://github.com/MarkBaker/PHPMatrix/issues", + "source": "https://github.com/MarkBaker/PHPMatrix/tree/3.0.1" + }, + "time": "2022-12-02T22:17:43+00:00" + }, { "name": "masterminds/html5", "version": "2.7.6", @@ -6270,6 +6599,111 @@ }, "time": "2020-07-07T09:29:14+00:00" }, + { + "name": "phpoffice/phpspreadsheet", + "version": "1.28.0", + "source": { + "type": "git", + "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", + "reference": "6e81cf39bbd93ebc3a4e8150444c41e8aa9b769a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/6e81cf39bbd93ebc3a4e8150444c41e8aa9b769a", + "reference": "6e81cf39bbd93ebc3a4e8150444c41e8aa9b769a", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-dom": "*", + "ext-fileinfo": "*", + "ext-gd": "*", + "ext-iconv": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "ext-xml": "*", + "ext-xmlreader": "*", + "ext-xmlwriter": "*", + "ext-zip": "*", + "ext-zlib": "*", + "ezyang/htmlpurifier": "^4.15", + "maennchen/zipstream-php": "^2.1", + "markbaker/complex": "^3.0", + "markbaker/matrix": "^3.0", + "php": "^7.4 || ^8.0", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0", + "psr/simple-cache": "^1.0 || ^2.0 || ^3.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "dev-main", + "dompdf/dompdf": "^1.0 || ^2.0", + "friendsofphp/php-cs-fixer": "^3.2", + "mitoteam/jpgraph": "^10.2.4", + "mpdf/mpdf": "^8.1.1", + "phpcompatibility/php-compatibility": "^9.3", + "phpstan/phpstan": "^1.1", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^8.5 || ^9.0", + "squizlabs/php_codesniffer": "^3.7", + "tecnickcom/tcpdf": "^6.5" + }, + "suggest": { + "dompdf/dompdf": "Option for rendering PDF with PDF Writer", + "ext-intl": "PHP Internationalization Functions", + "mitoteam/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers", + "mpdf/mpdf": "Option for rendering PDF with PDF Writer", + "tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer" + }, + "type": "library", + "autoload": { + "psr-4": { + "PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Maarten Balliauw", + "homepage": "https://blog.maartenballiauw.be" + }, + { + "name": "Mark Baker", + "homepage": "https://markbakeruk.net" + }, + { + "name": "Franck Lefevre", + "homepage": "https://rootslabs.net" + }, + { + "name": "Erik Tilt" + }, + { + "name": "Adrien Crivelli" + } + ], + "description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", + "homepage": "https://github.com/PHPOffice/PhpSpreadsheet", + "keywords": [ + "OpenXML", + "excel", + "gnumeric", + "ods", + "php", + "spreadsheet", + "xls", + "xlsx" + ], + "support": { + "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues", + "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.28.0" + }, + "time": "2023-02-25T12:24:49+00:00" + }, { "name": "phpoption/phpoption", "version": "1.9.1", @@ -7755,16 +8189,16 @@ }, { "name": "sentry/sentry", - "version": "3.15.0", + "version": "3.16.0", "source": { "type": "git", "url": "https://github.com/getsentry/sentry-php.git", - "reference": "c6a0e24d2f8da8d8f57cdcc87ca635248c1a91c5" + "reference": "5326a8786b8c7c3a51ea0c6d06e6cb6a9dfa6779" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/c6a0e24d2f8da8d8f57cdcc87ca635248c1a91c5", - "reference": "c6a0e24d2f8da8d8f57cdcc87ca635248c1a91c5", + "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/5326a8786b8c7c3a51ea0c6d06e6cb6a9dfa6779", + "reference": "5326a8786b8c7c3a51ea0c6d06e6cb6a9dfa6779", "shasum": "" }, "require": { @@ -7843,7 +8277,7 @@ ], "support": { "issues": "https://github.com/getsentry/sentry-php/issues", - "source": "https://github.com/getsentry/sentry-php/tree/3.15.0" + "source": "https://github.com/getsentry/sentry-php/tree/3.16.0" }, "funding": [ { @@ -7855,20 +8289,20 @@ "type": "custom" } ], - "time": "2023-03-13T11:45:26+00:00" + "time": "2023-03-16T10:37:16+00:00" }, { "name": "sentry/sentry-laravel", - "version": "3.2.0", + "version": "3.3.0", "source": { "type": "git", "url": "https://github.com/getsentry/sentry-laravel.git", - "reference": "55ad9bd47766cec2d8978b8487c40e81a5a87d76" + "reference": "e9c87d6580fc56147f580e1d714d8eb4e06d2752" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getsentry/sentry-laravel/zipball/55ad9bd47766cec2d8978b8487c40e81a5a87d76", - "reference": "55ad9bd47766cec2d8978b8487c40e81a5a87d76", + "url": "https://api.github.com/repos/getsentry/sentry-laravel/zipball/e9c87d6580fc56147f580e1d714d8eb4e06d2752", + "reference": "e9c87d6580fc56147f580e1d714d8eb4e06d2752", "shasum": "" }, "require": { @@ -7876,7 +8310,7 @@ "nyholm/psr7": "^1.0", "php": "^7.2 | ^8.0", "sentry/sdk": "^3.3", - "sentry/sentry": "^3.12", + "sentry/sentry": "^3.16", "symfony/psr-http-message-bridge": "^1.0 | ^2.0" }, "conflict": { @@ -7914,7 +8348,7 @@ }, "notification-url": "https://packagist.org/downloads/", "license": [ - "Apache-2.0" + "MIT" ], "authors": [ { @@ -7936,7 +8370,7 @@ ], "support": { "issues": "https://github.com/getsentry/sentry-laravel/issues", - "source": "https://github.com/getsentry/sentry-laravel/tree/3.2.0" + "source": "https://github.com/getsentry/sentry-laravel/tree/3.3.0" }, "funding": [ { @@ -7948,7 +8382,7 @@ "type": "custom" } ], - "time": "2023-02-01T10:56:52+00:00" + "time": "2023-03-16T12:25:43+00:00" }, { "name": "simplesoftwareio/simple-qrcode", @@ -13895,87 +14329,6 @@ } ], "packages-dev": [ - { - "name": "composer/semver", - "version": "3.3.2", - "source": { - "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.4", - "symfony/phpunit-bridge": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Semver\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - }, - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" - } - ], - "description": "Semver library that offers utilities, version constraint parsing and validation.", - "keywords": [ - "semantic", - "semver", - "validation", - "versioning" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.3.2" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-04-01T19:23:25+00:00" - }, { "name": "doctrine/instantiator", "version": "2.0.0", @@ -14493,23 +14846,23 @@ }, { "name": "jasonmccreary/laravel-test-assertions", - "version": "v2.2.0", + "version": "v2.3", "source": { "type": "git", "url": "https://github.com/jasonmccreary/laravel-test-assertions.git", - "reference": "7bef0bf655b67264177ecd2ca0054a53e863a4c0" + "reference": "77d1812dce4438c294e281acade9d52adf4ce0a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jasonmccreary/laravel-test-assertions/zipball/7bef0bf655b67264177ecd2ca0054a53e863a4c0", - "reference": "7bef0bf655b67264177ecd2ca0054a53e863a4c0", + "url": "https://api.github.com/repos/jasonmccreary/laravel-test-assertions/zipball/77d1812dce4438c294e281acade9d52adf4ce0a0", + "reference": "77d1812dce4438c294e281acade9d52adf4ce0a0", "shasum": "" }, "require": { - "illuminate/testing": "^8.0|^9.0|^10.0", + "illuminate/testing": "^9.0|^10.0", "mockery/mockery": "^1.4.2", - "php": ">=7.3|^8.0", - "phpunit/phpunit": "^9.3.3" + "php": "^8.0", + "phpunit/phpunit": "^9.3.3|^10.0" }, "type": "library", "extra": { @@ -14537,9 +14890,9 @@ "description": "A set of helpful assertions when testing Laravel applications.", "support": { "issues": "https://github.com/jasonmccreary/laravel-test-assertions/issues", - "source": "https://github.com/jasonmccreary/laravel-test-assertions/tree/v2.2.0" + "source": "https://github.com/jasonmccreary/laravel-test-assertions/tree/v2.3" }, - "time": "2023-02-13T14:52:08+00:00" + "time": "2023-03-15T16:29:35+00:00" }, { "name": "laracasts/generators", diff --git a/resources/lang/de.json b/resources/lang/de.json index cd4ba11d..8266a751 100644 --- a/resources/lang/de.json +++ b/resources/lang/de.json @@ -854,5 +854,7 @@ "Reset filtering": "Filter zurücksetzen", "News articles writer": "News-Artikel-Autoren", "Click on any of the authors to see their articles.": "Klicke auf einen der Autoren, um die Artikel zu lesen.", - "articles": "Artikel" + "articles": "Artikel", + "Participation confirmed": "Teilnahme bestätigt", + "There was an error on row :row. :message": "Es gab einen Fehler in Zeile :row. :message" } diff --git a/resources/lang/en.json b/resources/lang/en.json index 33181cb8..7ae02df2 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -852,5 +852,8 @@ "Reset filtering": "", "News articles writer": "", "Click on any of the authors to see their articles.": "", - "articles": "" + "articles": "", + "Participation confirmed": "", + "Perhabs": "", + "There was an error on row :row. :message": "" } \ No newline at end of file diff --git a/resources/lang/es.json b/resources/lang/es.json index 5d3c259a..25e790e1 100644 --- a/resources/lang/es.json +++ b/resources/lang/es.json @@ -852,5 +852,8 @@ "Reset filtering": "", "News articles writer": "", "Click on any of the authors to see their articles.": "", - "articles": "" + "articles": "", + "Participation confirmed": "", + "Perhabs": "", + "There was an error on row :row. :message": "" } \ No newline at end of file diff --git a/resources/lang/fr.json b/resources/lang/fr.json index 04d9fac0..0e6893f7 100644 --- a/resources/lang/fr.json +++ b/resources/lang/fr.json @@ -853,5 +853,8 @@ "Reset filtering": "", "News articles writer": "", "Click on any of the authors to see their articles.": "", - "articles": "" + "articles": "", + "Participation confirmed": "", + "Perhabs": "", + "There was an error on row :row. :message": "" } \ No newline at end of file diff --git a/resources/lang/hr.json b/resources/lang/hr.json index 36352c4e..8ac542e5 100644 --- a/resources/lang/hr.json +++ b/resources/lang/hr.json @@ -853,5 +853,8 @@ "Reset filtering": "", "News articles writer": "", "Click on any of the authors to see their articles.": "", - "articles": "" + "articles": "", + "Participation confirmed": "", + "Perhabs": "", + "There was an error on row :row. :message": "" } \ No newline at end of file diff --git a/resources/lang/it.json b/resources/lang/it.json index 0f8e3d26..0dcf3d55 100644 --- a/resources/lang/it.json +++ b/resources/lang/it.json @@ -853,5 +853,8 @@ "Reset filtering": "", "News articles writer": "", "Click on any of the authors to see their articles.": "", - "articles": "" + "articles": "", + "Participation confirmed": "", + "Perhabs": "", + "There was an error on row :row. :message": "" } \ No newline at end of file diff --git a/resources/lang/mk.json b/resources/lang/mk.json index cdde6919..c25dd5f7 100644 --- a/resources/lang/mk.json +++ b/resources/lang/mk.json @@ -853,5 +853,8 @@ "Reset filtering": "", "News articles writer": "", "Click on any of the authors to see their articles.": "", - "articles": "" + "articles": "", + "Participation confirmed": "", + "Perhabs": "", + "There was an error on row :row. :message": "" } \ No newline at end of file diff --git a/resources/lang/pl.json b/resources/lang/pl.json index 04c6e68e..4cb1383d 100644 --- a/resources/lang/pl.json +++ b/resources/lang/pl.json @@ -853,5 +853,8 @@ "Reset filtering": "", "News articles writer": "", "Click on any of the authors to see their articles.": "", - "articles": "" + "articles": "", + "Participation confirmed": "", + "Perhabs": "", + "There was an error on row :row. :message": "" } \ No newline at end of file diff --git a/resources/lang/pt.json b/resources/lang/pt.json index f5a8f81b..33198ec7 100644 --- a/resources/lang/pt.json +++ b/resources/lang/pt.json @@ -853,5 +853,8 @@ "Reset filtering": "", "News articles writer": "", "Click on any of the authors to see their articles.": "", - "articles": "" + "articles": "", + "Participation confirmed": "", + "Perhabs": "", + "There was an error on row :row. :message": "" } \ No newline at end of file diff --git a/resources/lang/sv.json b/resources/lang/sv.json index 100241c9..5136f958 100644 --- a/resources/lang/sv.json +++ b/resources/lang/sv.json @@ -815,5 +815,8 @@ "Reset filtering": "", "News articles writer": "", "Click on any of the authors to see their articles.": "", - "articles": "" + "articles": "", + "Participation confirmed": "", + "Perhabs": "", + "There was an error on row :row. :message": "" } \ No newline at end of file diff --git a/resources/lang/tr.json b/resources/lang/tr.json index 4a1b0bf5..b7e0b595 100644 --- a/resources/lang/tr.json +++ b/resources/lang/tr.json @@ -827,5 +827,8 @@ "Reset filtering": "", "News articles writer": "", "Click on any of the authors to see their articles.": "", - "articles": "" + "articles": "", + "Participation confirmed": "", + "Perhabs": "", + "There was an error on row :row. :message": "" } \ No newline at end of file diff --git a/resources/views/exports/meetupEventsAttendees.blade.php b/resources/views/exports/meetupEventsAttendees.blade.php new file mode 100644 index 00000000..bcd6eeb5 --- /dev/null +++ b/resources/views/exports/meetupEventsAttendees.blade.php @@ -0,0 +1,16 @@ + + + + + + + + + @foreach($attendees as $a) + + + + + @endforeach + +
NameStatus
{{ $a['name'] }}{{ $a['status'] }}
diff --git a/resources/views/livewire/meetup/landing-page-event.blade.php b/resources/views/livewire/meetup/landing-page-event.blade.php index 58c26285..453ab634 100644 --- a/resources/views/livewire/meetup/landing-page-event.blade.php +++ b/resources/views/livewire/meetup/landing-page-event.blade.php @@ -19,11 +19,51 @@

{{ $meetup->intro }}

- - + + + + {{ __('Download') }} + + +
+

{{ __('Confirmations') }}

+
+ + +
+

{{ __('Perhaps') }}

+
+
diff --git a/routes/web.php b/routes/web.php index e21bd8fb..0039b83f 100644 --- a/routes/web.php +++ b/routes/web.php @@ -43,6 +43,19 @@ Route::middleware([ ->name('form'); }); +/* + * Exports + * */ +Route::middleware([ + 'auth', +]) + ->as('export.') + ->prefix('/export') + ->group(function () { + Route::get('/meetup-event/{meetupEvent}', \App\Http\Controllers\Export\MeetupEventAttendeesExportController::class) + ->name('meetupEvent'); + }); + /* * Content Creator * */