update notification

This commit is contained in:
Mathieu Lagace
2020-07-27 16:41:28 -04:00
parent c16d1e7e95
commit 2d64d6d422
28 changed files with 1167 additions and 47 deletions

View File

@@ -0,0 +1,43 @@
@extends('layouts.admin.main')
@section('content')
<div class="row">
<div class="card">
<div class="card-header card-header-primary">
<h4 class="card-title">Mes notifications</h4>
</div>
<div class="card-body">
<div class="material-datatables">
<table id="notification-table" class="table table-striped w-100 notification-table">
<thead>
<td>Notifications</td>
</thead>
<tbody>
@foreach($notifications as $n)
<tr>
<td id="notification-{{$n->id}}" @if($n->read_at == null) class="notification-success cursor" onclick="markNotificationAsRead('{{$n->id}}')" @endif>
@if(isset($n->data['title']))
{{$n->data['title']}}
@else
<b>{{$n->data['name']}}</b><br>
{{$n->data['msg']}}
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('custom_scripts')
<script>
$(document).ready(function() {
$('#notification-table').DataTable();
} );
</script>
@endsection