we can now delete meetup events

This commit is contained in:
HolgerHatGarKeineNode
2023-02-07 15:53:58 +01:00
parent a93598ef2e
commit 8e00da34a4
6 changed files with 62 additions and 18 deletions

View File

@@ -74,6 +74,33 @@ class MeetupEventForm extends Component
} }
} }
public function deleteMe()
{
$this->dialog()
->confirm(
[
'title' => __('Delete event'),
'description' => __('Are you sure you want to delete this event? This action cannot be undone.'),
'icon' => 'warning',
'accept' => [
'label' => __('Yes, delete'),
'method' => 'deleteEvent',
],
'reject' => [
'label' => __('No, cancel'),
'method' => 'cancel',
],
]
);
}
public function deleteEvent()
{
$this->meetupEvent->delete();
return to_route('meetup.table.meetupEvent', ['country' => $this->country]);
}
public function submit() public function submit()
{ {
$this->validate(); $this->validate();

View File

@@ -96,6 +96,8 @@
], ],
"post-update-cmd": [ "post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force", "@php artisan vendor:publish --tag=laravel-assets --ansi --force",
"@php artisan vendor:publish --tag='wireui.resources'",
"@php artisan vendor:publish --tag='wireui.lang'",
"@php artisan nova:publish" "@php artisan nova:publish"
], ],
"post-root-package-install": [ "post-root-package-install": [

28
composer.lock generated
View File

@@ -7454,16 +7454,16 @@
}, },
{ {
"name": "sentry/sentry", "name": "sentry/sentry",
"version": "3.12.1", "version": "3.13.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/getsentry/sentry-php.git", "url": "https://github.com/getsentry/sentry-php.git",
"reference": "155bb9b78438999de4529d6f051465be15a58bc5" "reference": "a046ff5a37f5a0a0c285a6543dc17a7fc93b47f8"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/getsentry/sentry-php/zipball/155bb9b78438999de4529d6f051465be15a58bc5", "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/a046ff5a37f5a0a0c285a6543dc17a7fc93b47f8",
"reference": "155bb9b78438999de4529d6f051465be15a58bc5", "reference": "a046ff5a37f5a0a0c285a6543dc17a7fc93b47f8",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -7508,7 +7508,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "3.12.x-dev" "dev-master": "3.13.x-dev"
} }
}, },
"autoload": { "autoload": {
@@ -7542,7 +7542,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.12.1" "source": "https://github.com/getsentry/sentry-php/tree/3.13.0"
}, },
"funding": [ "funding": [
{ {
@@ -7554,7 +7554,7 @@
"type": "custom" "type": "custom"
} }
], ],
"time": "2023-01-12T12:24:27+00:00" "time": "2023-02-03T10:03:13+00:00"
}, },
{ {
"name": "sentry/sentry-laravel", "name": "sentry/sentry-laravel",
@@ -9055,16 +9055,16 @@
}, },
{ {
"name": "spatie/laravel-permission", "name": "spatie/laravel-permission",
"version": "5.8.0", "version": "5.9.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/spatie/laravel-permission.git", "url": "https://github.com/spatie/laravel-permission.git",
"reference": "9f5a74f858d22ecefd9ee44a0ac64a95fd0bf755" "reference": "a88ed98c8937442737e0c50163682e832d608f13"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/spatie/laravel-permission/zipball/9f5a74f858d22ecefd9ee44a0ac64a95fd0bf755", "url": "https://api.github.com/repos/spatie/laravel-permission/zipball/a88ed98c8937442737e0c50163682e832d608f13",
"reference": "9f5a74f858d22ecefd9ee44a0ac64a95fd0bf755", "reference": "a88ed98c8937442737e0c50163682e832d608f13",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -9072,7 +9072,7 @@
"illuminate/container": "^7.0|^8.0|^9.0|^10.0", "illuminate/container": "^7.0|^8.0|^9.0|^10.0",
"illuminate/contracts": "^7.0|^8.0|^9.0|^10.0", "illuminate/contracts": "^7.0|^8.0|^9.0|^10.0",
"illuminate/database": "^7.0|^8.0|^9.0|^10.0", "illuminate/database": "^7.0|^8.0|^9.0|^10.0",
"php": "^7.3|^8.0|^8.1" "php": "^7.3|^8.0"
}, },
"require-dev": { "require-dev": {
"orchestra/testbench": "^5.0|^6.0|^7.0|^8.0", "orchestra/testbench": "^5.0|^6.0|^7.0|^8.0",
@@ -9125,7 +9125,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/spatie/laravel-permission/issues", "issues": "https://github.com/spatie/laravel-permission/issues",
"source": "https://github.com/spatie/laravel-permission/tree/5.8.0" "source": "https://github.com/spatie/laravel-permission/tree/5.9.1"
}, },
"funding": [ "funding": [
{ {
@@ -9133,7 +9133,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-01-14T05:16:37+00:00" "time": "2023-02-06T21:37:02+00:00"
}, },
{ {
"name": "spatie/laravel-ray", "name": "spatie/laravel-ray",

View File

@@ -31,7 +31,7 @@
<script src="https://kit.fontawesome.com/03bc14bd1e.js" crossorigin="anonymous"></script> <script src="https://kit.fontawesome.com/03bc14bd1e.js" crossorigin="anonymous"></script>
@mapstyles @mapstyles
@mapscripts @mapscripts
<wireui:scripts/> @wireUiScripts
<x-comments::scripts/> <x-comments::scripts/>
@vite(['resources/css/app.css', 'resources/js/app.js']) @vite(['resources/css/app.css', 'resources/js/app.js'])
<!-- Styles --> <!-- Styles -->
@@ -79,12 +79,13 @@
</style> </style>
</head> </head>
<body class="font-sans antialiased bg-21gray dark"> <body class="font-sans antialiased bg-21gray dark">
<x-notifications z-index="z-50" blur="md" align="center"/>
<x-dialog z-index="z-50" blur="md" align="center" />
@if(auth()->user()) @if(auth()->user())
{{-- HIGHSCORE-CHAT --}} {{-- HIGHSCORE-CHAT --}}
<livewire:chat.highscore-chat/> <livewire:chat.highscore-chat/>
@endif @endif
<livewire:laravel-echo/> <livewire:laravel-echo/>
<x-notifications z-index="z-50" blur="md" align="center"/>
<x-jet-banner/> <x-jet-banner/>
<div class="min-h-screen"> <div class="min-h-screen">
@auth @auth

View File

@@ -80,6 +80,7 @@
<body class="font-sans antialiased bg-21gray dark"> <body class="font-sans antialiased bg-21gray dark">
<livewire:laravel-echo/> <livewire:laravel-echo/>
<x-notifications z-index="z-50" blur="md" align="center"/> <x-notifications z-index="z-50" blur="md" align="center"/>
<x-dialog z-index="z-50" blur="md" align="center" />
{{ $slot }} {{ $slot }}
@stack('modals') @stack('modals')
@livewireScripts @livewireScripts

View File

@@ -2,8 +2,21 @@
<div class="pb-5 flex flex-row justify-between"> <div class="pb-5 flex flex-row justify-between">
<h3 class="text-lg font-medium leading-6 text-gray-200">{{ __('Meetup Event') }}</h3> <h3 class="text-lg font-medium leading-6 text-gray-200">{{ __('Meetup Event') }}</h3>
<div class="flex flex-row space-x-2 items-center">
<div> <div>
<x-button :href="route('meetup.table.meetupEvent', ['country' => $country])">{{ __('Back') }}</x-button> @if($meetupEvent->id)
<x-button negative wire:click="deleteMe">
<i class="fa fa-thin fa-trash"></i>
{{ __('Delete') }}
</x-button>
@endif
</div>
<div>
<x-button :href="route('meetup.table.meetupEvent', ['country' => $country])">
<i class="fa fa-thin fa-arrow-left"></i>
{{ __('Back') }}
</x-button>
</div>
</div> </div>
</div> </div>