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

42 lines
1.3 KiB
PHP
Raw Normal View History

2024-05-02 16:54:51 +03:00
@extends('layouts.layout')
2024-05-02 10:06:39 +03:00
@section('content')
2024-05-08 16:16:00 +03:00
<a href="{{ route('tasks.create') }}" class="btn btn-primary">
Создать задачу
</a>
2024-05-02 16:54:51 +03:00
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
2024-05-07 10:35:04 +03:00
<th scope="col">Отдел</th>
2024-05-02 16:54:51 +03:00
<th scope="col">Задача</th>
<th scope="col">Статус</th>
<th scope="col">Назначил</th>
<th scope="col">Исполнители</th>
</tr>
</thead>
<tbody>
2024-05-07 10:35:04 +03:00
@foreach($tasks as $task)
<tr>
<th scope="row">{{ $task->id }}</th>
<td>{{ $task->department->name }}</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->users as $user)
{{ $user->name }}<br>
@endforeach
</td>
</tr>
@endforeach
2024-05-02 16:54:51 +03:00
</tbody>
2024-05-07 10:35:04 +03:00
</table>
{{ $tasks->links() }}
2024-05-02 10:06:39 +03:00
@endsection