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

View File

@@ -143,12 +143,22 @@
#{{ $loop->iteration }} Bild #{{ $loop->iteration }} Bild
</button> </button>
@if(auth()->user()?->hasRole('super-admin') || app()->environment('local')) @if($bookCase->created_by === auth()->id())
<x-button wire:click="deletePhoto({{ $image->id }})" xs <div x-data="{}">
x-bind="focusableWhenVisible" <x-button
class="px-4 py-2 text-sm"> x-on:click="$wireui.confirmDialog({
Löschen icon: 'question',
</x-button> 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 @endif
</li> </li>
@endforeach @endforeach
@@ -181,19 +191,19 @@
<div class="rounded" wire:ignore> <div class="rounded" wire:ignore>
@map([ @map([
'lat' => $bookCase->latitude, 'lat' => $bookCase->latitude,
'lng' => $bookCase->longitude, 'lng' => $bookCase->longitude,
'zoom' => 24, 'zoom' => 24,
'markers' => [ 'markers' => [
[ [
'title' => $bookCase->title, 'title' => $bookCase->title,
'lat' => $bookCase->latitude, 'lat' => $bookCase->latitude,
'lng' => $bookCase->longitude, 'lng' => $bookCase->longitude,
'url' => 'https://gonoware.com', 'url' => 'https://gonoware.com',
'icon' => asset('img/btc-logo-6219386_1280.png'), 'icon' => asset('img/btc-logo-6219386_1280.png'),
'icon_size' => [42, 42], 'icon_size' => [42, 42],
], ],
], ],
]) ])
</div> </div>

View File

@@ -172,12 +172,12 @@
<div x-data="{}"> <div x-data="{}">
<x-button <x-button
x-on:click="$wireui.confirmDialog({ x-on:click="$wireui.confirmDialog({
icon: 'question', icon: 'question',
title: '{{ __('Are you sure you want to cancel your participation?') }}', title: '{{ __('Are you sure you want to cancel your participation?') }}',
accept: {label: '{{ __('Yes') }}', accept: {label: '{{ __('Yes') }}',
execute: () => $wire.cannotCome()}, execute: () => $wire.cannotCome()},
reject: {label: '{{ __('No, cancel') }}', reject: {label: '{{ __('No, cancel') }}',
}})" }})"
lg primary> lg primary>
<i class="fa fa-thin fa-face-frown mr-2"></i> <i class="fa fa-thin fa-face-frown mr-2"></i>
{{ __('Unfortunately I cannot come') }} {{ __('Unfortunately I cannot come') }}