@extends('layouts.index') @section('title') Dashboard @endsection @section('css') @php $pegawai_hari_ini = $pegawai_hadir_hari_ini_count->toJson(); $yesterday = Carbon\Carbon::yesterday(); if ($yesterday->format('l') == 'Sunday') { $yesterday = Carbon\Carbon::now()->subDays(3)->format('Y-m-d'); }elseif ($yesterday->format('l') == 'Saturday') { $yesterday = Carbon\Carbon::now()->subDays(2)->format('Y-m-d'); }else{ $yesterday->format('Y-m-d'); } @endphp @endsection @section('content')

Dashboard

Employee

{{$pegawai_count}}

Total Employee

{{$jabatan_count ?: 0}}

Total Position

{{$unit_kerja_count ?: 0}}

Division

Attendance Chart

In this year
  • Present
  • Leave

Attendance Status

In this year
{{-- --}}
  • Present
  • Leave

Leave Chart

In this year
{{-- --}}

Today's Attendance Map (Start Work)

Today's Attendance Map (End Work)

Gender

Employee Status

Leave Request

List of Employees submitting Leave
{{--
--}}
@if ($leave_request->isNotEmpty()) @foreach ($leave_request as $item) @php $colorImportant = null; if ($item->status == 'periksa') { $labelPengajuan = 'On Process'; $colorPengajuan = 'warning'; }else if ($item->status == 'verif'){ $labelPengajuan = 'Approved'; $colorPengajuan = 'primary'; }else if ($item->status == 'tolak'){ $labelPengajuan = 'Rejected'; $colorPengajuan = 'danger'; $colorImportant = 'style=background-color:#961331!important;'; }else { $labelPengajuan = 'Cancelled'; $colorPengajuan = 'secondary'; } $path = asset('back/images/users/3.jpg'); if ($item->pegawai) { if ($item->pegawai->user) { if (Storage::exists($item->pegawai->user->photos)) { $path = Storage::url($item->pegawai->user->photos); } } } @endphp @endforeach @else @endif
Name Request Date of Request Status
flexy
{{$item->pegawai ? $item->pegawai->nama_lengkap : '-'}}
{{$item->pegawai ? (($item->pegawai->jabatan) ? $item->pegawai->jabatan->nama : '-') : '-'}}
{{$item->absen->nama}} {{ date('d M Y', strtotime($item->tanggal_awal)) }} - {{ date('d M Y', strtotime($item->tanggal_akhir)) }} {{$labelPengajuan}}
No data yet

Log Acitivity

Last
@php $dateAttendance = null; @endphp @forelse ($log as $item) @if ($loop->first || date('Y-m-d', strtotime($item->created_at)) != date('Y-m-d', strtotime($log[$loop->index - 1]->created_at)))
{{Carbon\Carbon::create(date('Y-m-d', strtotime($item->created_at)))->isoFormat('D MMM YYYY')}}
@endif
    @php $color = ['primary','success','danger','info','warning']; @endphp
  • {{date('H:i', strtotime($item->created_at))}}
    @php $models = $item->subject_type; $normalizedString = ''; if ($models) { $models = explode("\\", $item->subject_type); $words = preg_split('/(?=[A-Z])/', $models[2], -1, PREG_SPLIT_NO_EMPTY); $normalizedString = implode(' ', array_map('ucfirst', $words)); } @endphp {{$item->causer->name.' '.$item->description.' '.$normalizedString}}
@empty No activity yet @endforelse
@endsection @section('js') @endsection