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

@@ -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
x-bind="focusableWhenVisible"
class="px-4 py-2 text-sm">
Löschen
</x-button>
@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">
{{ __('Delete') }}
</x-button>
</div>
@endif
</li>
@endforeach
@@ -181,19 +191,19 @@
<div class="rounded" wire:ignore>
@map([
'lat' => $bookCase->latitude,
'lng' => $bookCase->longitude,
'zoom' => 24,
'markers' => [
[
'title' => $bookCase->title,
'lat' => $bookCase->latitude,
'lng' => $bookCase->longitude,
'url' => 'https://gonoware.com',
'icon' => asset('img/btc-logo-6219386_1280.png'),
'icon_size' => [42, 42],
],
],
'lat' => $bookCase->latitude,
'lng' => $bookCase->longitude,
'zoom' => 24,
'markers' => [
[
'title' => $bookCase->title,
'lat' => $bookCase->latitude,
'lng' => $bookCase->longitude,
'url' => 'https://gonoware.com',
'icon' => asset('img/btc-logo-6219386_1280.png'),
'icon_size' => [42, 42],
],
],
])
</div>