61 lines
2.6 KiB
PHP
61 lines
2.6 KiB
PHP
@extends('portal::layouts.customer')
|
|
|
|
@section('title', __('assetexchange::lang.notifications'))
|
|
|
|
@section('content')
|
|
<section class="portal-page-header">
|
|
<h1>@lang('assetexchange::lang.notifications')</h1>
|
|
<div>
|
|
<span class="label label-warning">@lang('assetexchange::lang.unread'): {{ $unread_count }}</span>
|
|
<form method="POST" action="{{ route('supplier.asset_exchange.notifications.read_all') }}" style="display:inline;margin-right:6px;">
|
|
@csrf
|
|
<button class="btn btn-success btn-sm">@lang('assetexchange::lang.mark_all_read')</button>
|
|
</form>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="content">
|
|
<div class="box box-primary">
|
|
<div class="box-body table-responsive">
|
|
<table class="table table-bordered table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>@lang('assetexchange::lang.status')</th>
|
|
<th>@lang('assetexchange::lang.title')</th>
|
|
<th>@lang('assetexchange::lang.message')</th>
|
|
<th>@lang('assetexchange::lang.created_at')</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@forelse($notifications as $n)
|
|
<tr class="{{ $n->read_at ? '' : 'bg-warning' }}">
|
|
<td>
|
|
@if($n->read_at)
|
|
<span class="label label-success">@lang('assetexchange::lang.read')</span>
|
|
@else
|
|
<span class="label label-warning">@lang('assetexchange::lang.unread')</span>
|
|
@endif
|
|
</td>
|
|
<td>{{ $n->title }}</td>
|
|
<td>{{ $n->message }}</td>
|
|
<td>{{ $aexUtil->formatDateTime($n->created_at) }}</td>
|
|
<td>
|
|
<form method="POST" action="{{ route('supplier.asset_exchange.notifications.read', $n->id) }}">
|
|
@csrf
|
|
<button class="btn btn-xs btn-primary">@lang('assetexchange::lang.open')</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
<tr><td colspan="5" class="text-center text-muted">@lang('assetexchange::lang.no_records')</td></tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
{{ $notifications->links() }}
|
|
</div>
|
|
</div>
|
|
</section>
|
|
@endsection
|
|
|