@extends('SuperAdmin.layout.layout') @section('title',"Targets") @section('page-name',"Targets") @section('page-detail',"All Assigned Targets Information") @section('pagelink', 'target') @section('body')

@if($targets->isEmpty())

No Target Assign Yet!

@else {{-- --}} {{-- @foreach($departments as $department)--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--

Department : {{ $department->name ?? 'No Department Assigned' }}

--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- @foreach($targets as $target)--}} {{-- @if($target->department_id == $department->id)--}} {{-- --}} {{-- --}} {{-- --}} {{-- @if($target->product_id)--}} {{-- --}} {{-- @else--}} {{-- --}} {{-- @endif--}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- @endif--}} {{-- @endforeach--}} {{--
CategoryTarget/ProductTotal PointsRedeemedLast DateStatusAction
{{ $target->category }}{{ $products->firstWhere('id', $target->product_id)->name }}{{ Str::limit($target->custom ?? 'No Custom', 50) }}{{ $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--}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{--
--}} {{--
--}} {{--
--}} {{--
--}} {{-- @endforeach--}} {{-- --}} @foreach($departments as $department)

Department: {{ $department->name ?? 'No Department Assigned' }}


@foreach($targets as $target) @if($target->department_id == $department->id) parent_target === 'parent') style="display: none;" @endif> @if($target->product_id) @else @endif @endif @endforeach
Category Target/Product Total Points Redeemed Last Date Status Action
{{ $target->category }}{{ $products->firstWhere('id', $target->product_id)->name }}{{ Str::limit($target->custom ?? 'No Custom', 50) }}{{ $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
@endforeach @endif
@endsection @section('custom-scripts') @endsection