delete bookCase images

This commit is contained in:
HolgerHatGarKeineNode
2023-02-11 21:03:37 +01:00
parent dc1edcde08
commit a9fbe7ac14
3 changed files with 37 additions and 27 deletions

View File

@@ -84,8 +84,8 @@
</style>
</head>
<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" />
<x-notifications z-index="z-[99999]" blur="md" align="center"/>
<x-dialog z-index="z-[99999]" blur="md" align="center" />
@if(auth()->user())
{{-- HIGHSCORE-CHAT --}}
<livewire:chat.highscore-chat/>

View File

@@ -143,12 +143,22 @@
#{{ $loop->iteration }} Bild
</button>
@if(auth()->user()?->hasRole('super-admin') || app()->environment('local'))
<x-button wire:click="deletePhoto({{ $image->id }})" xs
@if($bookCase->created_by === auth()->id())
<div x-data="{}">
<x-button
x-on:click="$wireui.confirmDialog({
icon: 'question',
title: '{{ __('Are your sure?') }}',
accept: {label: '{{ __('Yes') }}',
execute: () => $wire.deletePhoto({{ $image->id }})},
reject: {label: '{{ __('No, cancel') }}',
}})"
xs
x-bind="focusableWhenVisible"
class="px-4 py-2 text-sm">
Löschen
{{ __('Delete') }}
</x-button>
</div>
@endif
</li>
@endforeach