auditionadmin/resources/views/admin/rooms/index-room-card.blade.php

31 lines
1.2 KiB
PHP

<x-card.card>
<x-card.heading>
{{ $room->name }}
<x-slot:subheading>{{ $room->description }}</x-slot:subheading>
<x-slot:right_side>
@if($room->entries->count() === 0 and $room->id != '0')
<div class="flex justify-end">
<x-form.form method="DELETE"
action="{{ route('admin.rooms.destroy', ['room'=>$room->id]) }}"
class="!px-0 -mr-6 -mt-2"
id="deleteResource">
<x-form.red-trash-button/>
</x-form.form>
</div>
@else
<x-badge_pill>{{ $room->entries->count() }}</x-badge_pill>
@endif
</x-slot:right_side>
</x-card.heading>
<x-card.list.body id="room-{{ $room->id }}" class="audition-list">
@foreach($room->auditions as $audition)
<x-card.list.row class="!py-3" data-id="{{ $audition->id }}">
<x-badge_pill>{{ $audition->entries->count() }}</x-badge_pill>
<x-card.list.row-text-subtext>{{ $audition->name }}</x-card.list.row-text-subtext>
</x-card.list.row>
@endforeach
</x-card.list.body>
</x-card.card>