@if($targets->isEmpty())
No Target Assign Yet!
@else
{{-- --}}
{{-- @foreach($departments as $department)--}}
{{--
--}}
{{--
--}}
{{--
--}}
{{--
--}}
{{--
Department : {{ $department->name ?? 'No Department Assigned' }}
--}}
{{-- --}}
{{--
--}}
{{--
--}}
{{--
--}}
{{--
--}}
{{--
--}}
{{--
--}}
{{--
--}}
{{--
--}}
{{-- --}}
{{-- --}}
{{-- | Category | --}}
{{-- Target/Product | --}}
{{-- Total Points | --}}
{{-- Redeemed | --}}
{{-- Last Date | --}}
{{-- Status | --}}
{{-- Action | --}}
{{--
--}}
{{-- --}}
{{-- @foreach($targets as $target)--}}
{{-- @if($target->department_id == $department->id)--}}
{{-- --}}
{{-- --}}
{{-- | {{ $target->category }} | --}}
{{-- @if($target->product_id)--}}
{{-- {{ $products->firstWhere('id', $target->product_id)->name }} | --}}
{{-- @else--}}
{{-- {{ Str::limit($target->custom ?? 'No Custom', 50) }} | --}}
{{-- @endif--}}
{{-- {{ $target->quantity }} | --}}
{{-- {{ $target->progress ?? "Nothing Yet" }} | --}}
{{-- {{ \Carbon\Carbon::parse($target->last_date)->format('m-d-y') }} | --}}
{{-- --}}
{{-- @if($target->status === '2')--}}
{{-- Active--}}
{{-- @elseif($target->status === '1')--}}
{{-- Inactive--}}
{{-- @else--}}
{{-- Pending--}}
{{-- @endif--}}
{{-- | --}}
{{-- --}}
{{-- --}}
{{-- --}}
{{-- --}}
{{-- --}}
{{-- --}}
{{-- --}}
{{-- | --}}
{{--
--}}
{{-- --}}
{{-- @endif--}}
{{-- @endforeach--}}
{{--
--}}
{{--
--}}
{{--
--}}
{{--
--}}
{{-- @endforeach--}}
{{-- --}}
@foreach($departments as $department)
| Category |
Target/Product |
Total Points |
Redeemed |
Last Date |
Status |
Action |
@foreach($targets as $target)
@if($target->department_id == $department->id)
parent_target === 'parent') style="display: none;" @endif>
| {{ $target->category }} |
@if($target->product_id)
{{ $products->firstWhere('id', $target->product_id)->name }} |
@else
{{ Str::limit($target->custom ?? 'No Custom', 50) }} |
@endif
{{ $target->quantity }} |
{{ $target->progress ?? "Nothing Yet" }} |
{{ \Carbon\Carbon::parse($target->last_date)->format('m-d-y') }} |
@if($target->status === '2')
Active
@elseif($target->status === '1')
Inactive
@else
Pending
@endif
|
|
@endif
@endforeach
@endforeach
@endif