v1.5.19c only bugs 2

This commit is contained in:
Neerholt 2021-04-29 10:43:35 +02:00
parent 99a29094d8
commit 125ea424e3
3 changed files with 20 additions and 6 deletions

View File

@ -228,5 +228,17 @@ class MultipleEventsController extends Controller
} }
public function signups(Request $request)
{
dd("K");
// Find every event you have clicked on. And find all users to that event, and the event name itself.
$multiEvents = MultipleEvents::join('users', 'users.id', '=', 'user_events.user_id')->join('multiple_event', 'multiple_event_id.id', '=', 'user_events.multiple_event_id')->where('multiple_event_id', $request->event)->get();
if (count($multiEvents) == 0)
$multiEvents = MultipleEvents::where('id', $request->event)->get();
return Response::detect("multiple-events.signups", [ "multiEvent" => $multiEvents ]);
}
} }

View File

@ -71,6 +71,7 @@
<table class="tbl mt-2 letterSpaceTable fixOverflow" id="table_id2"> <table class="tbl mt-2 letterSpaceTable fixOverflow" id="table_id2">
<thead> <thead>
<th>Uge</th> <th>Uge</th>
<th class="w-1em"><img class="w-100" src="{{ asset('/images/icons/eye.svg') }}" alt="Show"></th>
<th class="w-1em"><img class="w-100" src="{{ asset('/images/icons/preview.svg') }}" alt="preview"></th> <th class="w-1em"><img class="w-100" src="{{ asset('/images/icons/preview.svg') }}" alt="preview"></th>
@if(auth()->user()->can('event.edit')) @if(auth()->user()->can('event.edit'))
<th class="w-1em"><img class="w-100" src="{{ asset('/images/icons/print-hvid.svg') }}" alt="Print"></th> <th class="w-1em"><img class="w-100" src="{{ asset('/images/icons/print-hvid.svg') }}" alt="Print"></th>
@ -84,6 +85,7 @@
@foreach(\App\MultipleEventsParent::query()->orderBY('id' , 'desc')->get() as $event) @foreach(\App\MultipleEventsParent::query()->orderBY('id' , 'desc')->get() as $event)
<tr id="row2_{{ $event->id }}"> <tr id="row2_{{ $event->id }}">
<td>{{ $event->week}}</td> <td>{{ $event->week}}</td>
<td><a href="{{ route("multiple-events.signups", $event->id) }}"><img class="w-100" src="{{ asset('/images/icons/eye-dark.svg') }}" alt="Show"></a></td>
<td><a id="preview" onclick="modalMultiEventContent({{$event->id}})" style="cursor: pointer"><img class="w-100" src="{{ asset('/images/icons/preview-dark.svg') }}" alt="preview"></a></td> <td><a id="preview" onclick="modalMultiEventContent({{$event->id}})" style="cursor: pointer"><img class="w-100" src="{{ asset('/images/icons/preview-dark.svg') }}" alt="preview"></a></td>
<td><a href="{{ route("multiPdf.genPDF", [ "multiEvent" => $event->id ]) }}" target="_blank"><img class="w-100" src="{{ asset('/images/icons/print.svg') }}" alt="Print"></a></td> <td><a href="{{ route("multiPdf.genPDF", [ "multiEvent" => $event->id ]) }}" target="_blank"><img class="w-100" src="{{ asset('/images/icons/print.svg') }}" alt="Print"></a></td>
@if(auth()->user()->can('event.edit')) @if(auth()->user()->can('event.edit'))
@ -227,7 +229,7 @@
$('#table_id2').DataTable({ $('#table_id2').DataTable({
columnDefs: [ columnDefs: [
{ orderable: false, targets: [-1, -2, -3, -4] } { orderable: false, targets: [-1, -2, -3, -4, -5] }
] ]
}); });
}); });

View File

@ -2,11 +2,11 @@
@extends("admin.layout.header") @extends("admin.layout.header")
@section("title") @section("title")
Events - Tilmeldte ugentlige aktiviteter - Tilmeldte
@endsection @endsection
@section("path") @section("path")
<a href="{{ route("events.index") }}" class="text-white">Vis Events</a> / <a href="" class="text-white">Vis Tilmeldte - {{ $events[0]->name }}</a> / <a href="{{ route("multiple-events.index") }}" class="text-white">Vis Events</a> / <a href="" class="text-white">Vis Tilmeldte - {{ $multiEvent[0]->name }}</a> /
@endsection @endsection
@section("content") @section("content")
@ -18,13 +18,13 @@
<th class="w-1em"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th> <th class="w-1em"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
</thead> </thead>
<tbody> <tbody>
@foreach($events as $event) @foreach($multiEvent as $event)
@if ($event->name_first != null && $event->name_last != null && $event->phone != null && $event->event_id != null && $event->user_id != null) @if ($event->name_first != null && $event->name_last != null && $event->phone != null && $event->multiple_event_id != null && $event->user_id != null)
<tr> <tr>
<td>{{ $event->name_first }}</td> <td>{{ $event->name_first }}</td>
<td>{{ $event->name_last }}</td> <td>{{ $event->name_last }}</td>
<td>{{ $event->phone }}</td> <td>{{ $event->phone }}</td>
<td><form method="post" action="{{ route("events.destroy", [ "event" => $event->event_id ]) }}" class="w-100 nostyle"> <td><form method="post" action="{{ route("multiple-events.destroy", [ "multiEvent" => $event->event_id ]) }}" class="w-100 nostyle">
@csrf @csrf
@method("delete") @method("delete")