@extends('layouts.index') @section('title') Event @endsection @section('css') @endsection @section('content')

Event

List of Event

@php $increment = 1; @endphp @foreach($team as $data) @endforeach
No Name Person In Charge Assignee Type Action
{{ $increment++ }} {{ $data->name }}

@php $totalActionPlan = \App\Models\TeamActionPlan::where('team_initiation_id', $data->id)->count(); if ($totalActionPlan >= 1) { $completedActionPlan = \App\Models\Team::whereHas('action_plan', function ($q) { $q->whereHas("activity", function ($s) { $s->where('status', '=', 'verified'); }); })->where('id', $data->id)->count(); $completionPercentage = ($completedActionPlan / $totalActionPlan) * 100; $total_progress = round($completionPercentage, 2); } else { $total_progress = 0; } @endphp
{{ $total_progress }}%
@if(isset($data->user->photos) && Storage::exists($data->user->photos)) {{ $data->person_in_charge_relation ? $data->person_in_charge_relation->nama_lengkap : '-'}} @else {{ $data->person_in_charge_relation ? $data->person_in_charge_relation->nama_lengkap : '-'}} @endif
@foreach($data->member_limit as $item) @if(Storage::exists($item->pegawai->user->photos)) @if($data->member->count() > 4) @if ($loop->last) {{ $data->member->count() - 4 }} @endif @endif @else @if($data->member->count() > 4) @if ($loop->last) {{ $data->member->count() - 4 }} @endif @endif @endif @endforeach

Total Assigne : {{ $data->member->count() }}

{{ isset($data->type) ? ucwords($data->type) : '-'}} Detail
@endsection @section('js') @endsection