v1.5.19b - Fixed MultipleEvents
Updated DomPDF
This commit is contained in:
@@ -32,39 +32,39 @@
|
||||
</div>
|
||||
<table class="tbl mt-2 letterSpaceTable fixOverflow" id="table_id">
|
||||
<thead>
|
||||
<th>Aktivitets Navn</th>
|
||||
<th>Aktivitets Ansvarlig</th>
|
||||
<th>Aktivitets Dato</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>
|
||||
@if(auth()->user()->can('event.edit'))
|
||||
<th class="w-1em"><img class="w-100" src="{{ asset('/images/icons/pencil.svg') }}" alt="Update"></th>
|
||||
@endif
|
||||
@if(auth()->user()->can('event.delete'))
|
||||
<th class="w-1em"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||
@endif
|
||||
<th>Aktivitets Navn</th>
|
||||
<th>Aktivitets Ansvarlig</th>
|
||||
<th>Aktivitets Dato</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>
|
||||
@if(auth()->user()->can('event.edit'))
|
||||
<th class="w-1em"><img class="w-100" src="{{ asset('/images/icons/pencil.svg') }}" alt="Update"></th>
|
||||
@endif
|
||||
@if(auth()->user()->can('event.delete'))
|
||||
<th class="w-1em"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||
@endif
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($events as $event)
|
||||
@if (date('Y-m-d H:i', strtotime('-1 day')) < date('Y-m-d H:i', strtotime($event->date)))
|
||||
<tr id="row_{{ $event->id }}">
|
||||
<td>{{ $event->name }}</td>
|
||||
<td>{{ $event->accountable }}</td>
|
||||
<td>{{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime($event->date))->format('d/m/Y \k\l\. H:i') }}</td>
|
||||
<td><a href="{{ route("events.signups", [ "event" => $event ]) }}"><img class="w-100" src="{{ asset('/images/icons/eye-dark.svg') }}" alt="Show"></a></td>
|
||||
<td><a id="preview" onclick="modalEventContent({{$event->id}})" style="cursor: pointer" ><img class="w-100" src="{{ asset('/images/icons/preview-dark.svg') }}" alt="preview"></a></td>
|
||||
@if(auth()->user()->can('event.edit'))
|
||||
<td><a href="{{ route("events.edit", [ "event" => $event ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
@endif
|
||||
@if(auth()->user()->can('event.delete'))
|
||||
<td>
|
||||
@csrf
|
||||
<a class="w-100 nostyle" onclick="delete_event({{ $event->id }})"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></a>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
@foreach($events as $event)
|
||||
@if (date('Y-m-d H:i', strtotime('-1 day')) < date('Y-m-d H:i', strtotime($event->date)))
|
||||
<tr id="row_{{ $event->id }}">
|
||||
<td>{{ $event->name }}</td>
|
||||
<td>{{ $event->accountable }}</td>
|
||||
<td>{{ \Illuminate\Support\Facades\Date::createFromTimeStamp(strtotime($event->date))->format('d/m/Y \k\l\. H:i') }}</td>
|
||||
<td><a href="{{ route("events.signups", [ "event" => $event ]) }}"><img class="w-100" src="{{ asset('/images/icons/eye-dark.svg') }}" alt="Show"></a></td>
|
||||
<td><a id="preview" onclick="modalEventContent({{$event->id}})" style="cursor: pointer" ><img class="w-100" src="{{ asset('/images/icons/preview-dark.svg') }}" alt="preview"></a></td>
|
||||
@if(auth()->user()->can('event.edit'))
|
||||
<td><a href="{{ route("events.edit", [ "event" => $event ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
@endif
|
||||
@if(auth()->user()->can('event.delete'))
|
||||
<td>
|
||||
@csrf
|
||||
<a class="w-100 nostyle" onclick="delete_event({{ $event->id }})"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></a>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -85,9 +85,9 @@
|
||||
<tr id="row2_{{ $event->id }}">
|
||||
<td>{{ $event->week}}</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>
|
||||
@if(auth()->user()->can('event.edit'))
|
||||
<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("multiple-events.edit", [ "multiEvent" => $event->id ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
@if(auth()->user()->can('event.edit'))
|
||||
<td><a href="{{ route("multiple-events.edit", $event->id) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
@endif
|
||||
@if(auth()->user()->can('event.delete'))
|
||||
<td>
|
||||
@@ -246,23 +246,23 @@
|
||||
cancelButtonText: 'Annuller'
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "events/"+id,
|
||||
data:{'_token':token, _method: 'DELETE'},
|
||||
success: function () {
|
||||
$('#table_id').DataTable().row($('#row_'+id)[0]).remove().draw();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "events/"+id,
|
||||
data:{'_token':token, _method: 'DELETE'},
|
||||
success: function () {
|
||||
$('#table_id').DataTable().row($('#row_'+id)[0]).remove().draw();
|
||||
|
||||
Swal.fire(
|
||||
'Aktiviteten er slettet!',
|
||||
'',
|
||||
'success'
|
||||
)
|
||||
},
|
||||
error:function (data) {
|
||||
console.log(data);
|
||||
}
|
||||
});
|
||||
Swal.fire(
|
||||
'Aktiviteten er slettet!',
|
||||
'',
|
||||
'success'
|
||||
)
|
||||
},
|
||||
error:function (data) {
|
||||
console.log(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user