45 lines
1.1 KiB
PHP
45 lines
1.1 KiB
PHP
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>S.N</th>
|
|
<th>Task</th>
|
|
<th>Product</th>
|
|
<th>Start Date</th>
|
|
<th>Deadline</th>
|
|
<th>Assigned</th>
|
|
<th>Priority</th>
|
|
<th>Status</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@forelse ($tasks as $key => $task)
|
|
<tr>
|
|
<td>{{ $key + 1 }}</td>
|
|
<td>{{ $task->title }}</td>
|
|
<td>{{ $task->product?->name }}</td>
|
|
<td>{{ $task->start_date }}</td>
|
|
@php
|
|
$status = $task->status_name['status'];
|
|
@endphp
|
|
<td class="{{ $status === 'Completed' ? 'text-success' : ($status === 'Incomplete' ? 'text-danger' : '') }}">
|
|
{{ $task->due_date }}
|
|
</td>
|
|
<td>
|
|
@isset($task->assignedUser)
|
|
@foreach ($task->assignedUser as $assignedId)
|
|
<li>
|
|
{{ $assignedId->full_name }} ,
|
|
</li>
|
|
@endforeach
|
|
@endisset
|
|
</td>
|
|
<td>{!! $task->priority_status !!}</td>
|
|
<td>
|
|
{!! $task->status_name['status'] !!}
|
|
</td>
|
|
</tr>
|
|
@empty
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|