Starting teilnehmen modal
This commit is contained in:
parent
e80863fbaf
commit
bbfceddbc4
2 changed files with 37 additions and 4 deletions
|
|
@ -159,8 +159,10 @@ class TourController extends Controller
|
||||||
u.id as user_id,
|
u.id as user_id,
|
||||||
u.name as user_name,
|
u.name as user_name,
|
||||||
qry.capacity,
|
qry.capacity,
|
||||||
COALESCE(qry.room_name,'Ungebucht') room_name,
|
qry.free_slots,
|
||||||
COALESCE(qry.room_name,'ZZZZZZZZZ') room_sort_order
|
|
||||||
|
COALESCE(qry.room_name,'Ungebucht') as room_name,
|
||||||
|
COALESCE(qry.room_name,'ZZZZZZZZZ') as room_sort_order
|
||||||
FROM
|
FROM
|
||||||
(
|
(
|
||||||
SELECT
|
SELECT
|
||||||
|
|
@ -168,7 +170,8 @@ class TourController extends Controller
|
||||||
tr.id as room_id,
|
tr.id as room_id,
|
||||||
tr.capacity,
|
tr.capacity,
|
||||||
tr.name as room_name,
|
tr.name as room_name,
|
||||||
b.user_id
|
b.user_id,
|
||||||
|
(SELECT tr.capacity - count(*) from bookings where tour_id=tr.tour_id and room_id=tr.id) as free_slots
|
||||||
FROM
|
FROM
|
||||||
tour_rooms tr
|
tour_rooms tr
|
||||||
LEFT JOIN bookings as b
|
LEFT JOIN bookings as b
|
||||||
|
|
@ -188,6 +191,7 @@ class TourController extends Controller
|
||||||
b.user_id,
|
b.user_id,
|
||||||
u.name as user_name,
|
u.name as user_name,
|
||||||
tr.capacity,
|
tr.capacity,
|
||||||
|
'0' as free_slots,
|
||||||
COALESCE(tr.name,'Ungebucht') as room_name,
|
COALESCE(tr.name,'Ungebucht') as room_name,
|
||||||
COALESCE(tr.name,'ZZZZZZZZZ') as room_sort_order
|
COALESCE(tr.name,'ZZZZZZZZZ') as room_sort_order
|
||||||
FROM
|
FROM
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,34 @@
|
||||||
<!-- Modal content -->
|
<!-- Modal content -->
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<span class="close">×</span>
|
<span class="close">×</span>
|
||||||
<p>Some text in the Modal..</p>
|
<h2>Bitte Zimmer auswählen</h2>
|
||||||
|
<!-- Teilnehmer+Raum Anzeige/Auswahl: Nur buchbare -->
|
||||||
|
<div class="card-body">
|
||||||
|
<ul>
|
||||||
|
<!-- Intentional Assignment ! -->
|
||||||
|
@if ($room_id="") @endif
|
||||||
|
@foreach($rooms as $room)
|
||||||
|
@if( $room->room_id != 0) <!-- Dont show "Ungebucht", room_id=0 -->
|
||||||
|
@if ($room_id != $room->room_id)
|
||||||
|
@if(strlen($room_id))
|
||||||
|
<hr/>
|
||||||
|
@endif
|
||||||
|
<li style="list-style-type: none;"><b>[{{$room->room_id}}] <a href="#">{{$room->room_name}}</a> {{$room->free_slots}}</b></li>
|
||||||
|
|
||||||
|
<!-- Intentional Assignment ! -->
|
||||||
|
@if ($room_id=$room->room_id) @endif
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@if(strlen($room->user_name))
|
||||||
|
<li> {{ $room->user_name}}
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -106,6 +133,7 @@
|
||||||
<div class="card mt-4">
|
<div class="card mt-4">
|
||||||
<div class="card-header"><h5>Teilnehmer</h5></div>
|
<div class="card-header"><h5>Teilnehmer</h5></div>
|
||||||
|
|
||||||
|
<!-- Teilnehmer+Raum Anzeige -->
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<ul>
|
<ul>
|
||||||
<!-- Intentional Assignment ! -->
|
<!-- Intentional Assignment ! -->
|
||||||
|
|
@ -132,6 +160,7 @@
|
||||||
@endforeach
|
@endforeach
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue