notification.blade.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. @extends('admin.table_layouts')
  2. @section('content')
  3. <div class="page-content container-fluid">
  4. <x-admin.table-panel :title="trans('admin.menu.log.notify')" :theads="[
  5. '#',
  6. trans('model.common.type'),
  7. trans('model.notification.address'),
  8. ucfirst(trans('validation.attributes.title')),
  9. ucfirst(trans('validation.attributes.content')),
  10. trans('model.notification.created_at'),
  11. trans('model.notification.status'),
  12. ]" :count="trans('admin.logs.counts', ['num' => $notificationLogs->total()])" :pagination="$notificationLogs->links()">
  13. <x-slot:filters>
  14. <x-admin.filter.input class="col-lg-3 col-sm-4" name="username" :placeholder="trans('common.account')" />
  15. <x-admin.filter.selectpicker class="col-lg-2 col-sm-4" name="type" :title="trans('model.common.type')" :options="collect(config('common.notification.labels'))->mapWithKeys(
  16. fn($value, $key) => [$key => trans('admin.system.notification.channel.' . $value)],
  17. )" />
  18. </x-slot:filters>
  19. <x-slot:tbody>
  20. @foreach ($notificationLogs as $log)
  21. <tr>
  22. <td> {{ $log->id }} </td>
  23. <td> {{ $log->type_label }} </td>
  24. <td> {{ $log->address }} </td>
  25. <td> {{ $log->title }} </td>
  26. <td class="text-break"> {{ $log->content }} </td>
  27. <td> {{ $log->created_at }} </td>
  28. <td>
  29. @if ($log->status < 0)
  30. <p class="badge badge-danger text-break font-size-14"> {{ $log->error }} </p>
  31. @elseif($log->status > 0)
  32. <labe class="badge badge-success">{{ trans('common.success') }}</labe>
  33. @else
  34. <span class="badge badge-default"> {{ trans('common.status.pending_dispatch') }} </span>
  35. @endif
  36. </td>
  37. </tr>
  38. @endforeach
  39. </x-slot:tbody>
  40. </x-admin.table-panel>
  41. </div>
  42. @endsection