Initial commit BIJ CI4

This commit is contained in:
BIJ Dev
2026-04-21 05:49:17 +07:00
commit fa38ac6b24
13170 changed files with 866701 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
<?php
declare(strict_types=1);
namespace App\Controllers\Api\Admin;
use CodeIgniter\HTTP\ResponseInterface;
class DashboardController extends BaseAdminApiController
{
public function index(): ResponseInterface
{
$auth = $this->requireAdminApiAccess('dashboard');
if ($auth['response'] !== null) {
return $auth['response'];
}
$cb = $this->cabangKantorAfterAuth($auth['actor']);
if ($cb['response'] !== null) {
return $cb['response'];
}
$this->auditAuthorized('api.admin.dashboard.index', $auth['actor'], [
'request' => $this->auditRequestParams(),
]);
$soloPegawaiId = null;
if (! rbac_enforce_ion()) {
$soloPegawaiId = (int) ($auth['actor']['id_pegawai'] ?? 0);
if ($soloPegawaiId <= 0) {
$soloPegawaiId = null;
}
}
return $this->respond($this->adminApi->dashboardHome($cb['kid'], $soloPegawaiId));
}
}