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-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" x-bind="focusableWhenVisible"
class="px-4 py-2 text-sm"> class="px-4 py-2 text-sm">
Löschen {{ __('Delete') }}
</x-button> </x-button>
</div>
@endif @endif
</li> </li>
@endforeach @endforeach