todo/resources/views/admin/tasks/index.blade.php

42 lines
1.3 KiB
PHP

@extends('layouts.layout')
@section('content')
<a href="{{ route('tasks.create') }}" class="btn btn-primary">
Создать задачу
</a>
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Отдел</th>
<th scope="col">Задача</th>
<th scope="col">Статус</th>
<th scope="col">Назначил</th>
<th scope="col">Исполнители</th>
</tr>
</thead>
<tbody>
@foreach($tasks as $task)
<tr>
<th scope="row">{{ $task->id }}</th>
<td>{{ $task->department }}</td>
<td>{{ $task->name }}
<br>
@foreach($task->labels as $label)
<span class="badge rounded-pill text-bg-warning">{{ $label->name }}</span>
@endforeach
</td>
<td>{{ $task->status->name }}</td>
<td>{{ $task->creator->name }}</td>
<td>
@foreach($task->assigned as $user)
{{ $user->name }}<br>
@endforeach
</td>
</tr>
@endforeach
</tbody>
</table>
{{ $tasks->links() }}
@endsection