@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-100']) @section('content') @include('layouts.navbars.auth.topnav', ['title' => '']) @php $departments = []; $categories = []; foreach ($listapp as $filterApp) { $appParts = array_map('trim', explode(' - ', (string) $filterApp->appname, 2)); $departments[] = $appParts[0] ?: 'Lainnya'; $categories[] = $appParts[1] ?? ($filterApp->title ?: 'Lainnya'); } $departments = array_values(array_unique($departments)); $categories = array_values(array_unique($categories)); sort($departments); sort($categories); @endphp
Total Aplikasi {{ $listapp->count() }} Applications
{{-- --}} {{-- --}} {{-- {{ $listapp->count() }} aplikasi --}}
@foreach ($listapp as $list) @php $startDate = $list->start_at ? new DateTime($list->start_at) : null; $months = [ 'Jan' => 'Jan', 'Feb' => 'Feb', 'Mar' => 'Mar', 'Apr' => 'Apr', 'May' => 'Mei', 'Jun' => 'Jun', 'Jul' => 'Jul', 'Aug' => 'Agu', 'Sep' => 'Sep', 'Oct' => 'Okt', 'Nov' => 'Nov', 'Dec' => 'Des', ]; $dateLabel = $startDate ? strtr($startDate->format('M Y'), $months) : '-'; $appParts = array_map('trim', explode(' - ', (string) $list->appname, 2)); $department = strtolower($appParts[0] ?: 'Lainnya'); $category = strtolower($appParts[1] ?? ($list->title ?: 'Lainnya')); $status = $list->flag_access == '1' ? 'online' : 'offline'; $searchText = strtolower(trim($list->title . ' ' . $list->appname . ' ' . $dateLabel)); $versionUrl = substr($list->url, 0, 4) === 'http' ? $list->url . '/api/laravel-version?token=' . env('APPVERSION') : URL::to($list->url . '/api/laravel-version?token=' . env('APPVERSION')); $accessUrl = substr($list->url, 0, 4) === 'http' ? $list->url . '/api/today-access-summary?token=' . env('APPVERSION') : URL::to($list->url . '/api/today-access-summary?token=' . env('APPVERSION')); $token = openssl_encrypt( $list->username_app . ',' . $list->remember_token . ',' . date('d-m-Y'), env('ALG'), env('KEY'), 0, env('SCR'), ); $token = str_replace(['+', '/', '='], ['-', '_', '@'], $token); if ($list->appid === 'msjapp') { $versionUrl = URL::to('/api/laravel-version?token=' . env('APPVERSION')); $accessUrl = URL::to('/api/today-access-summary?token=' . env('APPVERSION')); } if ($list->flag_access == '0') { $versionUrl = ''; $accessUrl = ''; } $appUrl = $list->appid === 'msjapp' ? URL::to('/dashboard') : (substr($list->url, 0, 4) === 'http' ? $list->url . '/auth/' . $token : URL::to($list->url . '/auth/' . $token)); @endphp @endforeach
@endsection @push('js') @endpush