@foreach (['all_tasks' => $all_tasks, 'pending_tasks' => $pending_tasks, 'ongoing_tasks' =>
$ongoing_tasks, 'completed_tasks' => $completed_tasks] as $taskType => $tasks)
@if($user['role'] == 'seller') Buyer @endif
Task detail
Service
Amount
Start Day
Time left
Action
@forelse ($tasks as $index => $task)
@if($user['role'] == 'seller')
{{ $task['customer']['name'] }} @endif
{{ $task['gig']['title'] }}
{{ $task['gig']['currency'] }}{{ number_format($task['agreed_amount'], 2) }}
{{ Carbon\Carbon::parse($task['start_time'])->format('l jS F Y, h:i A') }}
@if($task['remaining_days'] > 0)
{{ number_format($task['remaining_days']) }} days remaining
@elseif($task['remaining_hours'] > 0)
{{ number_format($task['remaining_hours']) }} hours remaining
@elseif($task['remaining_weeks'] > 0)
{{ number_format($task['remaining_weeks']) }} weeks remaining
@elseif($task['remaining_months'] > 0)
{{ number_format($task['remaining_months']) }} months remaining
@else
Time expired
@endif
@if($user['role'] === 'seller')
@if($task['status'] == 'ongoing')
Live
Chat
Processing ...
Mark as completed
@endif
@if ($task['status'] == 'completed')
Completed
@endif
@if ($task['status'] == 'pending')
Action
@endif
@if ($task['status'] == 'awaiting')
Awaiting response
@endif
@if ($task['status'] == 'cancelled')
Cancelled
@endif
Customer want to pay you
{{ $task['gig']['currency'] }}{{ number_format($task['agreed_amount'], 2) }},
starting from {{ formatDate($task['start_time']) }}
and get it done by
{{ formatEndDate($task['end_time']) }}.
Do you accept to this offer?
Choose an
Action
{{-- else if the role is not seller..ie. buyer --}}
@else
@if ($task['status'] == 'ongoing')
Live
Chat
Processing ...
Mark as completed
@endif
@if ($task['status'] == 'pending')
Live
Chat
@endif
@if ($task['status'] == 'cancelled')
Cancelled
@endif
@if ($task['status'] == 'completed')
Completed
@endif
@if ($task['status'] == 'awaiting')
Processing ...
Mark as completed
@endif
@endif
@empty
@endforelse
@endforeach