add attendees export

This commit is contained in:
HolgerHatGarKeineNode
2023-03-16 15:08:42 +01:00
parent fae97b39b6
commit 69c3ade296
20 changed files with 784 additions and 141 deletions

View File

@@ -0,0 +1,61 @@
<?php
namespace App\Exports;
use App\Models\MeetupEvent;
use App\Models\User;
use Illuminate\Contracts\View\View;
use Maatwebsite\Excel\Concerns\Exportable;
use Maatwebsite\Excel\Concerns\FromView;
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
class MeetupEventAttendeesExport implements FromView, ShouldAutoSize
{
use Exportable;
public function __construct(public MeetupEvent $meetupEvent)
{
}
private function mapAttendees($collection, $status) {
return $collection->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),
]);
}
}

View File

@@ -0,0 +1,19 @@
<?php
namespace App\Http\Controllers\Export;
use App\Exports\MeetupEventAttendeesExport;
use App\Http\Controllers\Controller;
use App\Models\MeetupEvent;
use Illuminate\Http\Request;
class MeetupEventAttendeesExportController extends Controller
{
/**
* Handle the incoming request.
*/
public function __invoke(Request $request, MeetupEvent $meetupEvent)
{
return (new MeetupEventAttendeesExport($meetupEvent))->download($meetupEvent->start->toDateString().'_'.$meetupEvent->meetup->slug.'.xlsx');
}
}

View File

@@ -5,6 +5,7 @@ namespace App\Http\Livewire\Meetup;
use App\Models\Country; use App\Models\Country;
use App\Models\Meetup; use App\Models\Meetup;
use App\Models\MeetupEvent; use App\Models\MeetupEvent;
use App\Models\User;
use App\Rules\UniqueAttendeeName; use App\Rules\UniqueAttendeeName;
use Livewire\Component; use Livewire\Component;
use RalphJSmit\Laravel\SEO\Support\SEOData; use RalphJSmit\Laravel\SEO\Support\SEOData;
@@ -23,6 +24,9 @@ class LandingPageEvent extends Component
public string $name = ''; public string $name = '';
public array $attendees = [];
public array $mightAttendees = [];
public function rules() public function rules()
{ {
return [ return [
@@ -37,6 +41,7 @@ class LandingPageEvent extends Component
{ {
$this->meetupEvent->load('meetup.users'); $this->meetupEvent->load('meetup.users');
$this->meetup = $this->meetupEvent->meetup; $this->meetup = $this->meetupEvent->meetup;
$this->name = auth()->check() ? auth()->user()->name : '';
$this->checkShowUp(); $this->checkShowUp();
} }
@@ -45,38 +50,72 @@ class LandingPageEvent extends Component
$attendees = collect($this->meetupEvent->attendees); $attendees = collect($this->meetupEvent->attendees);
$mightAttendees = collect($this->meetupEvent->might_attendees); $mightAttendees = collect($this->meetupEvent->might_attendees);
if (auth()->check() && $attendees->contains(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())) $this->name = str($attendees->filter(fn($value) => str($value)->contains('id_'.auth()->id()))
->first()) ->first())
->after('|') ->after('|')
->toString(); ->toString();
$this->willShowUp = true; $this->willShowUp = true;
} }
if (! auth()->check() && $attendees->contains(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())) $this->name = str($attendees->filter(fn($value) => str($value)->contains('anon_'.session()->getId()))
->first()) ->first())
->after('|') ->after('|')
->toString(); ->toString();
$this->willShowUp = true; $this->willShowUp = true;
} }
if (auth()->check() && $mightAttendees->contains(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())) $this->name = str($mightAttendees->filter(fn($value) => str($value)->contains('id_'.auth()->id()))
->first()) ->first())
->after('|') ->after('|')
->toString(); ->toString();
$this->perhapsShowUp = true; $this->perhapsShowUp = true;
} }
if (! auth()->check() && $mightAttendees->contains(fn ($value if (!auth()->check() && $mightAttendees->contains(fn($value
) => str($value)->contains('anon_'.session()->getId()))) { ) => 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()) ->first())
->after('|') ->after('|')
->toString(); ->toString();
$this->perhapsShowUp = true; $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() public function cannotCome()
@@ -84,31 +123,33 @@ class LandingPageEvent extends Component
$attendees = collect($this->meetupEvent->attendees); $attendees = collect($this->meetupEvent->attendees);
$mightAttendees = collect($this->meetupEvent->might_attendees); $mightAttendees = collect($this->meetupEvent->might_attendees);
if (auth()->check() && $attendees->contains(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())); $attendees = $attendees->filter(fn($value) => !str($value)->contains('id_'.auth()->id()));
$this->willShowUp = false; $this->willShowUp = false;
} }
if (! auth()->check() && $attendees->contains(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())); $attendees = $attendees->filter(fn($value) => !str($value)->contains('anon_'.session()->getId()));
$this->willShowUp = false; $this->willShowUp = false;
} }
if (auth()->check() && $mightAttendees->contains(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())); $mightAttendees = $mightAttendees->filter(fn($value) => !str($value)->contains('id_'.auth()->id()));
$this->perhapsShowUp = false; $this->perhapsShowUp = false;
} }
if (! auth()->check() && $mightAttendees->contains(fn ($value if (!auth()->check() && $mightAttendees->contains(fn($value
) => str($value)->contains('anon_'.session()->getId()))) { ) => 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->perhapsShowUp = false;
} }
$this->meetupEvent->update([ $this->meetupEvent->update([
'attendees' => $attendees->toArray(), 'attendees' => $attendees->toArray(),
'might_attendees' => $mightAttendees->toArray(), 'might_attendees' => $mightAttendees->toArray(),
]); ]);
$this->checkShowUp();
} }
public function attend() public function attend()
@@ -116,12 +157,12 @@ class LandingPageEvent extends Component
$this->validate(); $this->validate();
$attendees = collect($this->meetupEvent->attendees); $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); $attendees->push('id_'.auth()->id().'|'.$this->name);
$this->willShowUp = true; $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); $attendees->push('anon_'.session()->getId().'|'.$this->name);
$this->willShowUp = true; $this->willShowUp = true;
} }
@@ -129,6 +170,8 @@ class LandingPageEvent extends Component
$this->meetupEvent->update([ $this->meetupEvent->update([
'attendees' => $attendees->toArray(), 'attendees' => $attendees->toArray(),
]); ]);
$this->checkShowUp();
} }
public function mightAttend() public function mightAttend()
@@ -136,12 +179,12 @@ class LandingPageEvent extends Component
$this->validate(); $this->validate();
$mightAttendees = collect($this->meetupEvent->might_attendees); $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); $mightAttendees->push('id_'.auth()->id().'|'.$this->name);
$this->perhapsShowUp = true; $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); $mightAttendees->push('anon_'.session()->getId().'|'.$this->name);
$this->perhapsShowUp = true; $this->perhapsShowUp = true;
} }
@@ -149,6 +192,8 @@ class LandingPageEvent extends Component
$this->meetupEvent->update([ $this->meetupEvent->update([
'might_attendees' => $mightAttendees->toArray(), 'might_attendees' => $mightAttendees->toArray(),
]); ]);
$this->checkShowUp();
} }
public function render() public function render()

View File

@@ -9,6 +9,12 @@ use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Str; use Illuminate\Support\Str;
use Illuminate\Support\Stringable; use Illuminate\Support\Stringable;
use Spatie\Translatable\Facades\Translatable; 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 class AppServiceProvider extends ServiceProvider
{ {
@@ -20,6 +26,63 @@ class AppServiceProvider extends ServiceProvider
Date::use( Date::use(
Carbon::class 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,
],
]
);
}
);
} }
/** /**

View File

@@ -29,6 +29,7 @@
"laravel/tinker": "^2.8", "laravel/tinker": "^2.8",
"league/glide-laravel": "^1.0", "league/glide-laravel": "^1.0",
"livewire/livewire": "^2.11", "livewire/livewire": "^2.11",
"maatwebsite/excel": "^3.1",
"nova/start": "*", "nova/start": "*",
"oneduo/nova-time-field": "^1.0", "oneduo/nova-time-field": "^1.0",
"podcastindex/podcastindex-php": "^1.0", "podcastindex/podcastindex-php": "^1.0",

563
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "82090857f80131ea826eeac73a9f26dd", "content-hash": "d7cd13f2c5935a6f3e1df6119e3b70ba",
"packages": [ "packages": [
{ {
"name": "akuechler/laravel-geoly", "name": "akuechler/laravel-geoly",
@@ -551,6 +551,87 @@
], ],
"time": "2022-02-21T13:15:14+00:00" "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", "name": "dasprid/enum",
"version": "1.0.4", "version": "1.0.4",
@@ -1408,6 +1489,67 @@
}, },
"time": "2022-05-08T12:55:38+00:00" "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", "name": "fgrosse/phpasn1",
"version": "v2.5.0", "version": "v2.5.0",
@@ -4462,6 +4604,86 @@
], ],
"time": "2023-03-03T20:12:38+00:00" "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", "name": "maennchen/zipstream-php",
"version": "v2.4.0", "version": "v2.4.0",
@@ -4540,6 +4762,113 @@
], ],
"time": "2022-12-08T12:29:14+00:00" "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", "name": "masterminds/html5",
"version": "2.7.6", "version": "2.7.6",
@@ -6270,6 +6599,111 @@
}, },
"time": "2020-07-07T09:29:14+00:00" "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", "name": "phpoption/phpoption",
"version": "1.9.1", "version": "1.9.1",
@@ -7755,16 +8189,16 @@
}, },
{ {
"name": "sentry/sentry", "name": "sentry/sentry",
"version": "3.15.0", "version": "3.16.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/getsentry/sentry-php.git", "url": "https://github.com/getsentry/sentry-php.git",
"reference": "c6a0e24d2f8da8d8f57cdcc87ca635248c1a91c5" "reference": "5326a8786b8c7c3a51ea0c6d06e6cb6a9dfa6779"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/getsentry/sentry-php/zipball/c6a0e24d2f8da8d8f57cdcc87ca635248c1a91c5", "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/5326a8786b8c7c3a51ea0c6d06e6cb6a9dfa6779",
"reference": "c6a0e24d2f8da8d8f57cdcc87ca635248c1a91c5", "reference": "5326a8786b8c7c3a51ea0c6d06e6cb6a9dfa6779",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -7843,7 +8277,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/getsentry/sentry-php/issues", "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": [ "funding": [
{ {
@@ -7855,20 +8289,20 @@
"type": "custom" "type": "custom"
} }
], ],
"time": "2023-03-13T11:45:26+00:00" "time": "2023-03-16T10:37:16+00:00"
}, },
{ {
"name": "sentry/sentry-laravel", "name": "sentry/sentry-laravel",
"version": "3.2.0", "version": "3.3.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/getsentry/sentry-laravel.git", "url": "https://github.com/getsentry/sentry-laravel.git",
"reference": "55ad9bd47766cec2d8978b8487c40e81a5a87d76" "reference": "e9c87d6580fc56147f580e1d714d8eb4e06d2752"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/getsentry/sentry-laravel/zipball/55ad9bd47766cec2d8978b8487c40e81a5a87d76", "url": "https://api.github.com/repos/getsentry/sentry-laravel/zipball/e9c87d6580fc56147f580e1d714d8eb4e06d2752",
"reference": "55ad9bd47766cec2d8978b8487c40e81a5a87d76", "reference": "e9c87d6580fc56147f580e1d714d8eb4e06d2752",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -7876,7 +8310,7 @@
"nyholm/psr7": "^1.0", "nyholm/psr7": "^1.0",
"php": "^7.2 | ^8.0", "php": "^7.2 | ^8.0",
"sentry/sdk": "^3.3", "sentry/sdk": "^3.3",
"sentry/sentry": "^3.12", "sentry/sentry": "^3.16",
"symfony/psr-http-message-bridge": "^1.0 | ^2.0" "symfony/psr-http-message-bridge": "^1.0 | ^2.0"
}, },
"conflict": { "conflict": {
@@ -7914,7 +8348,7 @@
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
"license": [ "license": [
"Apache-2.0" "MIT"
], ],
"authors": [ "authors": [
{ {
@@ -7936,7 +8370,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/getsentry/sentry-laravel/issues", "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": [ "funding": [
{ {
@@ -7948,7 +8382,7 @@
"type": "custom" "type": "custom"
} }
], ],
"time": "2023-02-01T10:56:52+00:00" "time": "2023-03-16T12:25:43+00:00"
}, },
{ {
"name": "simplesoftwareio/simple-qrcode", "name": "simplesoftwareio/simple-qrcode",
@@ -13895,87 +14329,6 @@
} }
], ],
"packages-dev": [ "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", "name": "doctrine/instantiator",
"version": "2.0.0", "version": "2.0.0",
@@ -14493,23 +14846,23 @@
}, },
{ {
"name": "jasonmccreary/laravel-test-assertions", "name": "jasonmccreary/laravel-test-assertions",
"version": "v2.2.0", "version": "v2.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/jasonmccreary/laravel-test-assertions.git", "url": "https://github.com/jasonmccreary/laravel-test-assertions.git",
"reference": "7bef0bf655b67264177ecd2ca0054a53e863a4c0" "reference": "77d1812dce4438c294e281acade9d52adf4ce0a0"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/jasonmccreary/laravel-test-assertions/zipball/7bef0bf655b67264177ecd2ca0054a53e863a4c0", "url": "https://api.github.com/repos/jasonmccreary/laravel-test-assertions/zipball/77d1812dce4438c294e281acade9d52adf4ce0a0",
"reference": "7bef0bf655b67264177ecd2ca0054a53e863a4c0", "reference": "77d1812dce4438c294e281acade9d52adf4ce0a0",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"illuminate/testing": "^8.0|^9.0|^10.0", "illuminate/testing": "^9.0|^10.0",
"mockery/mockery": "^1.4.2", "mockery/mockery": "^1.4.2",
"php": ">=7.3|^8.0", "php": "^8.0",
"phpunit/phpunit": "^9.3.3" "phpunit/phpunit": "^9.3.3|^10.0"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
@@ -14537,9 +14890,9 @@
"description": "A set of helpful assertions when testing Laravel applications.", "description": "A set of helpful assertions when testing Laravel applications.",
"support": { "support": {
"issues": "https://github.com/jasonmccreary/laravel-test-assertions/issues", "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", "name": "laracasts/generators",

View File

@@ -854,5 +854,7 @@
"Reset filtering": "Filter zurücksetzen", "Reset filtering": "Filter zurücksetzen",
"News articles writer": "News-Artikel-Autoren", "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.", "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"
} }

View File

@@ -852,5 +852,8 @@
"Reset filtering": "", "Reset filtering": "",
"News articles writer": "", "News articles writer": "",
"Click on any of the authors to see their articles.": "", "Click on any of the authors to see their articles.": "",
"articles": "" "articles": "",
"Participation confirmed": "",
"Perhabs": "",
"There was an error on row :row. :message": ""
} }

View File

@@ -852,5 +852,8 @@
"Reset filtering": "", "Reset filtering": "",
"News articles writer": "", "News articles writer": "",
"Click on any of the authors to see their articles.": "", "Click on any of the authors to see their articles.": "",
"articles": "" "articles": "",
"Participation confirmed": "",
"Perhabs": "",
"There was an error on row :row. :message": ""
} }

View File

@@ -853,5 +853,8 @@
"Reset filtering": "", "Reset filtering": "",
"News articles writer": "", "News articles writer": "",
"Click on any of the authors to see their articles.": "", "Click on any of the authors to see their articles.": "",
"articles": "" "articles": "",
"Participation confirmed": "",
"Perhabs": "",
"There was an error on row :row. :message": ""
} }

View File

@@ -853,5 +853,8 @@
"Reset filtering": "", "Reset filtering": "",
"News articles writer": "", "News articles writer": "",
"Click on any of the authors to see their articles.": "", "Click on any of the authors to see their articles.": "",
"articles": "" "articles": "",
"Participation confirmed": "",
"Perhabs": "",
"There was an error on row :row. :message": ""
} }

View File

@@ -853,5 +853,8 @@
"Reset filtering": "", "Reset filtering": "",
"News articles writer": "", "News articles writer": "",
"Click on any of the authors to see their articles.": "", "Click on any of the authors to see their articles.": "",
"articles": "" "articles": "",
"Participation confirmed": "",
"Perhabs": "",
"There was an error on row :row. :message": ""
} }

View File

@@ -853,5 +853,8 @@
"Reset filtering": "", "Reset filtering": "",
"News articles writer": "", "News articles writer": "",
"Click on any of the authors to see their articles.": "", "Click on any of the authors to see their articles.": "",
"articles": "" "articles": "",
"Participation confirmed": "",
"Perhabs": "",
"There was an error on row :row. :message": ""
} }

View File

@@ -853,5 +853,8 @@
"Reset filtering": "", "Reset filtering": "",
"News articles writer": "", "News articles writer": "",
"Click on any of the authors to see their articles.": "", "Click on any of the authors to see their articles.": "",
"articles": "" "articles": "",
"Participation confirmed": "",
"Perhabs": "",
"There was an error on row :row. :message": ""
} }

View File

@@ -853,5 +853,8 @@
"Reset filtering": "", "Reset filtering": "",
"News articles writer": "", "News articles writer": "",
"Click on any of the authors to see their articles.": "", "Click on any of the authors to see their articles.": "",
"articles": "" "articles": "",
"Participation confirmed": "",
"Perhabs": "",
"There was an error on row :row. :message": ""
} }

View File

@@ -815,5 +815,8 @@
"Reset filtering": "", "Reset filtering": "",
"News articles writer": "", "News articles writer": "",
"Click on any of the authors to see their articles.": "", "Click on any of the authors to see their articles.": "",
"articles": "" "articles": "",
"Participation confirmed": "",
"Perhabs": "",
"There was an error on row :row. :message": ""
} }

View File

@@ -827,5 +827,8 @@
"Reset filtering": "", "Reset filtering": "",
"News articles writer": "", "News articles writer": "",
"Click on any of the authors to see their articles.": "", "Click on any of the authors to see their articles.": "",
"articles": "" "articles": "",
"Participation confirmed": "",
"Perhabs": "",
"There was an error on row :row. :message": ""
} }

View File

@@ -0,0 +1,16 @@
<table>
<thead>
<tr>
<th>Name</th>
<th>Status</th>
</tr>
</thead>
<tbody>
@foreach($attendees as $a)
<tr>
<td>{{ $a['name'] }}</td>
<td>{{ $a['status'] }}</td>
</tr>
@endforeach
</tbody>
</table>

View File

@@ -19,11 +19,51 @@
<div class="relative text-lg font-medium text-gray-200 md:flex-grow"> <div class="relative text-lg font-medium text-gray-200 md:flex-grow">
<p class="relative">{{ $meetup->intro }}</p> <p class="relative">{{ $meetup->intro }}</p>
</div> </div>
<footer class="mt-4">
<p class="text-base font-semibold text-gray-200">{{ $meetup->users->count() }} {{ __('Plebs') }}</p>
</footer>
</blockquote> </blockquote>
<x-button black target="_blank" class="mb-6"
:href="route('export.meetupEvent', ['meetupEvent' => $meetupEvent])">
<i class="fa-thin fa-file-excel"></i>
{{ __('Download') }}
</x-button>
<div class="border-b border-gray-200 pb-5">
<h3 class="text-base font-semibold leading-6 text-gray-200">{{ __('Confirmations') }}</h3>
</div>
<ul role="list" class="divide-y divide-gray-200">
@foreach($attendees as $a)
<li class="flex py-4">
<img class="h-10 w-10 rounded-full"
src="{{ $a['user']['profile_photo_url'] ?? 'https://ui-avatars.com/api/?name='.urlencode($a['name']).'&color=7F9CF5&background=EBF4FF' }}"
alt="{{ $a['name'] }}">
<div class="ml-3">
<p class="text-sm font-medium text-gray-200">{{ $a['name'] }}</p>
<p class="text-sm text-green-300">{{ __('Participation confirmed') }}</p>
</div>
</li>
@endforeach
</ul>
<div class="border-b border-gray-200 pb-5 mt-6">
<h3 class="text-base font-semibold leading-6 text-gray-200">{{ __('Perhaps') }}</h3>
</div>
<ul role="list" class="divide-y divide-gray-200">
@foreach($mightAttendees as $a)
<li class="flex py-4">
<img class="h-10 w-10 rounded-full"
src="{{ $a['user']['profile_photo_url'] ?? 'https://ui-avatars.com/api/?name='.urlencode($a['name']).'&color=7F9CF5&background=EBF4FF' }}"
alt="{{ $a['name'] }}">
<div class="ml-3">
<p class="text-sm font-medium text-gray-200">{{ $a['name'] }}</p>
<p class="text-sm text-yellow-300">{{ __('Perhaps') }}</p>
</div>
</li>
@endforeach
</ul>
</div> </div>
<div class="relative mx-auto max-w-md px-6 sm:max-w-3xl lg:px-0"> <div class="relative mx-auto max-w-md px-6 sm:max-w-3xl lg:px-0">

View File

@@ -43,6 +43,19 @@ Route::middleware([
->name('form'); ->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 * Content Creator
* */ * */