diff --git a/app/Http/Controllers/DashboardController.php b/app/Http/Controllers/DashboardController.php index e95d037..cc93465 100644 --- a/app/Http/Controllers/DashboardController.php +++ b/app/Http/Controllers/DashboardController.php @@ -228,7 +228,7 @@ class DashboardController extends Controller 'Unit', 'Sub Unit', 'Tanggal Terbit', - 'Tanggal Expired', + 'Tanggal Kedaluwarsa Dokumen', 'Tanggal Upload', 'Pengunggah' ]; @@ -370,8 +370,8 @@ class DashboardController extends Controller $katArray = $kategori ? explode(',', $kategori) : []; $katDok = MasterKategori::when($katArray, fn($q) => $q->whereIn('master_kategori_directory_id', $katArray))->where('statusenabled', true)->select('master_kategori_directory_id', 'nama_kategori_directory')->get(); - $applyFileFilters = function ($q) use ($keyword, $katArray, $subArray, $entryPegawaiId) { - $q->where(function($subQuery) use ($entryPegawaiId){ + $applyFileFilters = function ($q) use ($keyword, $katArray, $subArray) { + $q->where(function($subQuery){ $subQuery->where('status_action', '!=', 'rejected')->whereNotNull('status_action'); }) ->when($subArray, fn($sq) => $sq->whereIn('id_sub_unit_kerja', $subArray)) @@ -598,41 +598,59 @@ class DashboardController extends Controller 'message' => 'File tidak ditemukan' ]); } - $oldPath= public_path('file/' . $data->file); $fileInfo = pathinfo($data->file); - $newFileName = $fileInfo['filename'] . '_deleted.' . $fileInfo['extension']; - $newPath = public_path('file/' . $fileInfo['dirname'] . '/' . $newFileName); - if (file_exists($oldPath)) { - // pastikan folder tujuan ada - if (!is_dir(dirname($newPath))) { - mkdir(dirname($newPath), 0777, true); - } - rename($oldPath, $newPath); - } + $newFileName = $fileInfo['filename'] . '_deleted.' . ($fileInfo['extension'] ?? ''); + $dirName = $fileInfo['dirname'] ?? ''; + $newPath = ($dirName && $dirName !== '.') ? ($dirName . '/' . $newFileName) : $newFileName; + $disk = Storage::disk('s3'); + if ($disk->exists($data->file)) { + // S3 tidak bisa rename langsung, jadi copy lalu delete + $disk->copy($data->file, $newPath); + $disk->delete($data->file); + } - $data->update(['statusenabled' => false, 'file' => $fileInfo['dirname'].'/'. $newFileName]); + $data->update([ + 'statusenabled' => false, + 'file' => $newPath + ]); - $uploaderName = auth()->user()?->dataUser?->namalengkap ?? 'Pengguna'; - $docNumber = $data->no_dokumen ? 'nomor '. $data->no_dokumen : $data->nama_dokumen; - $payloadNotification = [ - 'created_at' => now(), - 'text_notifikasi' => "Dokumen {$docNumber} . dihapus oleh {$uploaderName}.", - 'url' => '/pending-file', - 'is_read' => false, - 'pegawai_id' => $mapping?->objectatasanlangsungfk, - ]; + $uploaderName = auth()->user()?->dataUser?->namalengkap ?? 'Pengguna'; + $docNumber = $data->no_dokumen ? 'nomor '. $data->no_dokumen : $data->nama_dokumen; + $payloadNotification = [ + 'created_at' => now(), + 'text_notifikasi' => "Dokumen {$docNumber} . dihapus oleh {$uploaderName}.", + 'url' => '/pending-file', + 'is_read' => false, + 'pegawai_id' => $mapping?->objectatasanlangsungfk, + ]; - Notifkasi::create($payloadNotification); - if($mapping->objectpejabatpenilaifk){ - $payloadNotification = [ - 'created_at' => now(), - 'text_notifikasi' => "Dokumen {$docNumber}. dihapus oleh {$uploaderName}.", - 'url' => '/pending-file', - 'is_read' => false, - 'pegawai_id' => $mapping?->objectpejabatpenilaifk, - ]; - Notifkasi::create($payloadNotification); - } + Notifkasi::create($payloadNotification); + if($mapping->objectpejabatpenilaifk){ + $payloadNotification = [ + 'created_at' => now(), + 'text_notifikasi' => "Dokumen {$docNumber}. dihapus oleh {$uploaderName}.", + 'url' => '/pending-file', + 'is_read' => false, + 'pegawai_id' => $mapping?->objectpejabatpenilaifk, + ]; + Notifkasi::create($payloadNotification); + } + + $payloadLog = [ + 'file_directory_id' => $data->file_directory_id, + 'pegawai_id_entry' => $data->pegawai_id_entry, + 'pegawai_nama_entry' => $data->pegawai_nama_entry, + 'entry_at' => now(), + 'file' => $data->file, + 'statusenabled' => true, + 'nama_dokumen' => $data->nama_dokumen ?? null, + 'no_dokumen' => $data->nama_dokumen ?? null, + 'mod_change' => null, + 'id_unit_kerja' => $data ? $data->id_unit_kerja : null, + 'id_sub_unit_kerja' => $data ? $data->id_sub_unit_kerja : null, + 'action_type' => 'Menghapus Dokumen', + ]; + LogActivity::create($payloadLog); DB::connection('dbDirectory')->commit(); return response()->json([ 'success' => true, @@ -644,7 +662,6 @@ class DashboardController extends Controller 'success' => false, 'message' => 'Gagal menghapus data' ]); - //throw $th; } } @@ -742,20 +759,35 @@ class DashboardController extends Controller $zipPath = public_path('zip/' . $zipName); $zip = new ZipArchive; $tempFiles = []; + $tempDownloads = []; + $disk = Storage::disk('s3'); + $tempDir = storage_path('app/temp'); + if (!is_dir($tempDir)) { + @mkdir($tempDir, 0777, true); + } + if (!is_dir(public_path('zip'))) { + @mkdir(public_path('zip'), 0777, true); + } if($zip->open($zipPath, ZipArchive::CREATE) === TRUE){ foreach ($paths as $path) { - $fullPath = public_path('file/' . $path); - if(!file_exists($fullPath)){ + if(!$disk->exists($path)){ throw new \Exception("File tidak ditemukan: " . $path); } $relativePathInZip = $path; - $fileToAdd = $this->prepareFileWithWatermark($fullPath, $tempFiles); + $ext = pathinfo($path, PATHINFO_EXTENSION); + $ext = $ext ? strtolower($ext) : 'bin'; + $localPath = $tempDir . '/' . uniqid('s3_') . '.' . $ext; + file_put_contents($localPath, $disk->get($path)); + $tempDownloads[] = $localPath; + + $fileToAdd = $this->prepareFileWithWatermark($localPath, $tempFiles); $zip->addFile($fileToAdd, $relativePathInZip); } $zip->close(); } $this->cleanupTempFiles($tempFiles); + $this->cleanupTempFiles($tempDownloads); return response()->download(public_path('zip/' . $zipName))->deleteFileAfterSend(true); //code... } catch (\Throwable $th) { @@ -814,9 +846,8 @@ class DashboardController extends Controller if (!$data) { abort(404, 'File tidak ditemukan'); } - - $filePath = public_path('file/' . $data->file); - if (!file_exists($filePath)) { + $disk = Storage::disk('s3'); + if (!$data->file || !$disk->exists($data->file)) { abort(404, 'File tidak ditemukan'); } @@ -838,16 +869,34 @@ class DashboardController extends Controller 'id_sub_unit_kerja' => $mapping ? $mapping->objectsubunitkerjapegawaifk : null, ]); + $tempDir = storage_path('app/temp'); + if (!is_dir($tempDir)) { + @mkdir($tempDir, 0777, true); + } + $ext = pathinfo((string) $data->file, PATHINFO_EXTENSION); + $ext = $ext ? strtolower($ext) : 'bin'; + $localPath = $tempDir . '/' . uniqid('s3_') . '.' . $ext; + file_put_contents($localPath, $disk->get($data->file)); + $tempFiles = []; - $fileToSend = $this->prepareFileWithWatermark($filePath, $tempFiles); + $fileToSend = $this->prepareFileWithWatermark($localPath, $tempFiles); $downloadName = basename($data->file); $response = response()->download($fileToSend, $downloadName); - if ($fileToSend !== $filePath) { - $response->deleteFileAfterSend(true); - } else { - $this->cleanupTempFiles($tempFiles); - } + $response->deleteFileAfterSend(true); + $cleanup = array_merge($tempFiles, [$localPath]); + $cleanup = array_values(array_unique(array_filter($cleanup))); + // cleanup after response is sent + register_shutdown_function(function () use ($cleanup, $fileToSend) { + foreach ($cleanup as $file) { + if ($file === $fileToSend) { + continue; + } + if (is_string($file) && $file !== '' && file_exists($file)) { + @unlink($file); + } + } + }); return $response; } @@ -870,9 +919,7 @@ class DashboardController extends Controller public function datatableDataUmum(){ $perPage = (int) request('per_page', 10); - // $authUnitId = auth()->user()->dataUser?->mappingUnitKerjaPegawai[0]?->objectunitkerjapegawaifk; $user = auth()->user()?->dataUser; - // $entryPegawaiId = auth()->user()?->objectpegawaifk; $akses = AksesFile::where(['pegawai_id' => $user->id, 'statusenabled' => true])->first(); $keyword = request('keyword'); $unitId = request('unit'); @@ -883,21 +930,6 @@ class DashboardController extends Controller $kategoriIds = is_array($kategori) ? array_values(array_filter($kategori)) : array_values(array_filter(explode(',', (string) $kategori))); - $mapping = MappingUnitKerjaPegawai::where('statusenabled', true) - ->where('objectpegawaifk', $user->id) - ->get(['objectunitkerjapegawaifk', 'objectsubunitkerjapegawaifk']); - - // $unitIds = $mapping->pluck('objectunitkerjapegawaifk') - // ->filter() // buang null - // ->unique() - // ->values() - // ->all(); - - // $subUnitIds = $mapping->pluck('objectsubunitkerjapegawaifk') - // ->filter() - // ->unique() - // ->values() - // ->all(); $query = FileDirectory::where('statusenabled', true)->where('status_action', 'approved') ->when(!empty($unitIds), function ($q) use ($unitIds) { $q->whereIn('id_unit_kerja', $unitIds); @@ -959,7 +991,7 @@ class DashboardController extends Controller 'Unit', 'Sub Unit', 'Tanggal Terbit', - 'Tanggal Expired', + 'Tanggal Kedaluwarsa Dokumen', 'Tanggal Upload', ]; $sheet->fromArray($headers, null, 'A4'); @@ -1058,10 +1090,17 @@ class DashboardController extends Controller $imageName = $ext ? (Str::uuid()->toString() . '.' . $ext) : Str::uuid()->toString(); } $path = "{$nama_unit_kerja}/{$nama_sub_unit_kerja}/{$nama_kategori}"; - $disk = Storage::disk('file_directory'); - $disk->makeDirectory($path); - $disk->putFileAs($path, $uploadedFile, $imageName); - $payload['file'] =$path .'/' .$imageName; + $disk = Storage::disk('s3'); + + $disk->putFileAs( + $path, + $uploadedFile, + $imageName, + ['visibility' => 'private'] // atau 'public' + ); + + $payload['file'] = $path . '/' . $imageName; + $fd = FileDirectory::create($payload); @@ -1114,6 +1153,9 @@ class DashboardController extends Controller public function dataPdf($fileDirectoryId) { $data = FileDirectory::where('file_directory_id', $fileDirectoryId)->first(); + if (!$data) { + abort(404, 'PDF Tidak ditemukan'); + } $user = auth()->user()->dataUser; $mapping = MappingUnitKerjaPegawai::where('statusenabled', true) ->where('objectpegawaifk', $user->id)->where('isprimary', true) @@ -1134,38 +1176,48 @@ class DashboardController extends Controller LogActivity::create($payloadLog); - $filePath = public_path('file/' . $data->file); - - if (!file_exists($filePath)) { + $fileInfo = get_file_s3($data->file); + if (!$fileInfo || empty($fileInfo['file'])) { abort(404, 'PDF Tidak ditemukan'); } + $mime = $fileInfo['mime'] ?? 'application/pdf'; + $tempDir = storage_path('app/temp'); + if (!is_dir($tempDir)) { + @mkdir($tempDir, 0777, true); + } + $ext = pathinfo((string) $data->file, PATHINFO_EXTENSION); + $ext = $ext ? strtolower($ext) : 'pdf'; + $localPath = $tempDir . '/' . uniqid('s3_') . '.' . $ext; + file_put_contents($localPath, $fileInfo['file']); $stampFile = public_path('assets/copy.png'); - if (!file_exists($stampFile)) { - // kalau watermark tidak ada, tampilkan file asli - return response()->file($filePath, [ - 'Content-Type' => 'application/pdf', - 'Content-Disposition' => 'inline; filename="preview.pdf"', - 'Cache-Control' => 'no-store, no-cache, must-revalidate, max-age=0', - ]); - } - - $tempConverted = storage_path('app/temp/' . uniqid('conv_') . '.pdf'); - + $tempConverted = $tempDir . '/' . uniqid('conv_') . '.pdf'; + $resp = null; try { - // coba watermark langsung - return $this->watermarkCenterAndStream($filePath, $stampFile); - - } catch (\Throwable $e) { - // kalau gagal (PDF modern) -> convert dulu - // dd($e); - $this->convertWithGhostscript($filePath, $tempConverted); - - $resp = $this->watermarkCenterAndStream($tempConverted, $stampFile); - - @unlink($tempConverted); - return $resp; + if (!file_exists($stampFile)) { + // kalau watermark tidak ada, tampilkan file asli + $resp = response($fileInfo['file'], 200, [ + 'Content-Type' => $mime, + 'Content-Disposition' => 'inline; filename="preview.pdf"', + 'Cache-Control' => 'no-store, no-cache, must-revalidate, max-age=0', + ]); + } else { + try { + // coba watermark langsung + $resp = $this->watermarkCenterAndStream($localPath, $stampFile); + } catch (\Throwable $e) { + // kalau gagal (PDF modern) -> convert dulu + $this->convertWithGhostscript($localPath, $tempConverted); + $resp = $this->watermarkCenterAndStream($tempConverted, $stampFile); + } + } + } finally { + @unlink($localPath); + if (file_exists($tempConverted)) { + @unlink($tempConverted); + } } + return $resp; } private function watermarkCenterAndStream(string $pdfPath, string $stampFile) @@ -1433,7 +1485,7 @@ class DashboardController extends Controller return [ 'file_directory_id' => $item->file_directory_id, 'pegawai_nama_entry' => $item->pegawai_nama_entry, - 'part' => $dataSlice[0] . '/' . $dataSlice[1], + 'part' => $dataSlice[0], 'folder' => $dataSlice[2], 'fileName' =>$dataSlice[3], 'file' => $item->file, @@ -1490,6 +1542,22 @@ class DashboardController extends Controller ]; Notifkasi::create($payloadNotification); + + $payloadLog = [ + 'file_directory_id' => $data->file_directory_id, + 'pegawai_id_entry' => $data->pegawai_id_entry, + 'pegawai_nama_entry' => $data->pegawai_nama_entry, + 'entry_at' => now(), + 'file' => $data->file, + 'statusenabled' => true, + 'nama_dokumen' => $data->nama_dokumen ?? null, + 'no_dokumen' => $data->nama_dokumen ?? null, + 'mod_change' => null, + 'id_unit_kerja' => $data ? $data->id_unit_kerja : null, + 'id_sub_unit_kerja' => $data ? $data->id_sub_unit_kerja : null, + 'action_type' => 'Approved Dokumen', + ]; + LogActivity::create($payloadLog); DB::connection('dbDirectory')->commit(); return response()->json([ 'status' => true, @@ -1609,6 +1677,21 @@ class DashboardController extends Controller ]; Notifkasi::create($payloadNotification); + $payloadLog = [ + 'file_directory_id' => $data->file_directory_id, + 'pegawai_id_entry' => $data->pegawai_id_entry, + 'pegawai_nama_entry' => $data->pegawai_nama_entry, + 'entry_at' => now(), + 'file' => $data->file, + 'statusenabled' => true, + 'nama_dokumen' => $data->nama_dokumen ?? null, + 'no_dokumen' => $data->nama_dokumen ?? null, + 'mod_change' => null, + 'id_unit_kerja' => $data ? $data->id_unit_kerja : null, + 'id_sub_unit_kerja' => $data ? $data->id_sub_unit_kerja : null, + 'action_type' => 'Rejected Dokumen', + ]; + LogActivity::create($payloadLog); DB::connection('dbDirectory')->commit(); return response()->json([ 'status' => true, @@ -1752,11 +1835,18 @@ class DashboardController extends Controller $keyword = request('keyword'); $start = request('start_date'); $end = request('end_date'); - $query = FileDirectory::where('statusenabled', true)->where('pegawai_id_entry', auth()->user()->objectpegawaifk) - ->where(function($q){ - $q->where('status_action', '!=', 'approved') - ->orWhereNull('status_action'); - })->orderBy('entry_at','desc'); + $isHistory = filter_var(request('history'), FILTER_VALIDATE_BOOLEAN); + $query = FileDirectory::where('statusenabled', true) + ->where('pegawai_id_entry', auth()->user()->objectpegawaifk) + ->when($isHistory, function($q){ + $q->where('status_action', 'approved'); + }, function($q){ + $q->where(function($sub){ + $sub->where('status_action', '!=', 'approved') + ->orWhereNull('status_action'); + }); + }) + ->orderBy('entry_at','desc'); if($keyword){ $query->where(function($q) use ($keyword){ $q->where('file', 'ILIKE', "%{$keyword}%") @@ -1896,8 +1986,18 @@ class DashboardController extends Controller } $imageName = $uploadedFile->getClientOriginalName(); $path = $folderPath ? "{$folderPath}" : ''; - $uploadedFile->storeAs($path, $imageName, 'file_directory'); + $disk = Storage::disk('s3'); + $oldFile = $data->file; + $disk->putFileAs( + $path, + $uploadedFile, + $imageName, + ['visibility' => 'private'] + ); $payload['file'] = ($path ? $path . '/' : '') . $imageName; + if ($oldFile && $oldFile !== $payload['file'] && $disk->exists($oldFile)) { + $disk->delete($oldFile); + } } $payload['status_action'] = 'revised'; @@ -1932,7 +2032,23 @@ class DashboardController extends Controller ]; Notifkasi::create($payloadNotification); - } + } + + $payloadLog = [ + 'file_directory_id' => $data->file_directory_id, + 'pegawai_id_entry' => $data->pegawai_nama_entry, + 'pegawai_nama_entry' => $data->pegawai_nama_entry, + 'entry_at' => now(), + 'file' => $data->file, + 'statusenabled' => true, + 'nama_dokumen' => $data->nama_dokumen ?? null, + 'no_dokumen' => $data->nama_dokumen ?? null, + 'mod_change' => null, + 'id_unit_kerja' => $data ? $data->id_unit_kerja : null, + 'id_sub_unit_kerja' => $data ? $data->id_sub_unit_kerja : null, + 'action_type' => 'Revisi Dokumen', + ]; + LogActivity::create($payloadLog); DB::connection('dbDirectory')->commit(); return response()->json([ @@ -1947,4 +2063,109 @@ class DashboardController extends Controller ], 500); } } + + // public function historyPengajuan(){ + // $data = FileDirectory::where('statusenabled', true)->where('pegawai_id_entry', auth()->user()->objectpegawaifk)->get(); + // return $data; + // } + + public function logDokumen() + { + $perPage = (int) request('per_page', 10); + $keyword = request('keyword'); + $start = request('start_date'); + $end = request('end_date'); + + $queryIsAtasan = MappingUnitKerjaPegawai::where('statusenabled', true) + ->where(function ($q) { + $q->where('objectatasanlangsungfk', auth()->user()?->dataUser?->id) + ->orWhere('objectpejabatpenilaifk', auth()->user()->objectpegawaifk); + }); + $isAtasan = $queryIsAtasan->exists(); + + $query = LogActivity::query() + ->from('logging.log_activity_file_directory as log') + ->leftJoin('public.file_directory as fd', 'fd.file_directory_id', '=', 'log.file_directory_id') + ->where('log.statusenabled', true) + ->whereNotIn('log.action_type', ['Membuka Dokumen', 'Download Dokumen']) + ->select([ + 'log.file_directory_id', + 'log.pegawai_nama_entry', + 'log.file', + 'log.no_dokumen', + 'log.nama_dokumen', + 'log.entry_at', + 'log.action_type', + 'log.id_unit_kerja', + 'log.id_sub_unit_kerja', + 'fd.permission_file', + 'fd.tanggal_terbit', + 'fd.tgl_expired', + ]); + + if ($isAtasan) { + $unitIds = $queryIsAtasan + ->get(['objectunitkerjapegawaifk']) + ->pluck('objectunitkerjapegawaifk') + ->filter() + ->unique() + ->values() + ->all(); + if (!empty($unitIds)) { + $query->whereIn('log.id_unit_kerja', $unitIds); + } else { + $query->whereRaw('1 = 0'); + } + } else { + $query->where('log.pegawai_id_entry', auth()->user()->objectpegawaifk); + } + + if ($keyword) { + $query->where(function ($q) use ($keyword) { + $q->where('log.file', 'ILIKE', "%{$keyword}%") + ->orWhere('log.no_dokumen', 'ILIKE', "%{$keyword}%") + ->orWhere('log.nama_dokumen', 'ILIKE', "%{$keyword}%") + ->orWhere('log.action_type', 'ILIKE', "%{$keyword}%"); + }); + } + if ($start) { + $query->whereDate('log.entry_at', '>=', $start); + } + if ($end) { + $query->whereDate('log.entry_at', '<=', $end); + } + + $paginated = $query->orderBy('log.entry_at', 'desc')->paginate($perPage); + $data = $paginated->getCollection()->map(function ($item) { + $parts = array_values(array_filter(explode('/', (string) $item->file))); + return [ + 'file_directory_id' => $item->file_directory_id, + 'pegawai_nama_entry' => $item->pegawai_nama_entry, + 'part' => $parts[0] ?? '-', + 'folder' => $parts[2] ?? '-', + 'fileName' => $parts[3] ?? '-', + 'file' => $item->file, + 'no_dokumen' => $item->no_dokumen, + 'nama_dokumen' => $item->nama_dokumen, + 'entry_at' => $item->entry_at, + 'tanggal_terbit' => $item->tanggal_terbit, + 'tgl_expired' => $item->tgl_expired, + 'permission_file' => $item->permission_file, + 'action_type' => $item->action_type, + ]; + }); + + return response()->json([ + 'status' => true, + 'data' => $data, + 'pagination' => [ + 'current_page' => $paginated->currentPage(), + 'next_page' => $paginated->hasMorePages() ? $paginated->currentPage() + 1 : null, + 'has_more' => $paginated->hasMorePages(), + 'last_page' => $paginated->lastPage(), + 'per_page' => $paginated->perPage(), + 'total' => $paginated->total(), + ] + ]); + } } diff --git a/app/Http/Controllers/LogActivityController.php b/app/Http/Controllers/LogActivityController.php index 2707254..2abab99 100644 --- a/app/Http/Controllers/LogActivityController.php +++ b/app/Http/Controllers/LogActivityController.php @@ -120,4 +120,6 @@ class LogActivityController extends Controller ] ]); } + + } diff --git a/app/helpers.php b/app/helpers.php index 066a9bf..00ef2b5 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -1,8 +1,26 @@ exists($path)) { + return false; + } + + $file = Storage::disk('s3')->get($path); + $mime = Storage::disk('s3')->mimeType($path); + + return [ + 'file' => $file, + 'mime' => $mime + ]; + } +} diff --git a/composer.json b/composer.json index de16786..c942af2 100644 --- a/composer.json +++ b/composer.json @@ -9,6 +9,7 @@ "php": "^8.2", "laravel/framework": "^12.0", "laravel/tinker": "^2.10.1", + "league/flysystem-aws-s3-v3": "3.0", "phpoffice/phpspreadsheet": "^5.4", "setasign/fpdf": "^1.8", "setasign/fpdi": "^2.6" diff --git a/composer.lock b/composer.lock index a3ae3ee..f14ee38 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,159 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "08bd514ba1ce7ebc80cd60f3bb76e101", + "content-hash": "127440b3f9ffff6fa5a355be4bb0a3fb", "packages": [ + { + "name": "aws/aws-crt-php", + "version": "v1.2.7", + "source": { + "type": "git", + "url": "https://github.com/awslabs/aws-crt-php.git", + "reference": "d71d9906c7bb63a28295447ba12e74723bd3730e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/awslabs/aws-crt-php/zipball/d71d9906c7bb63a28295447ba12e74723bd3730e", + "reference": "d71d9906c7bb63a28295447ba12e74723bd3730e", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35||^5.6.3||^9.5", + "yoast/phpunit-polyfills": "^1.0" + }, + "suggest": { + "ext-awscrt": "Make sure you install awscrt native extension to use any of the functionality." + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "AWS SDK Common Runtime Team", + "email": "aws-sdk-common-runtime@amazon.com" + } + ], + "description": "AWS Common Runtime for PHP", + "homepage": "https://github.com/awslabs/aws-crt-php", + "keywords": [ + "amazon", + "aws", + "crt", + "sdk" + ], + "support": { + "issues": "https://github.com/awslabs/aws-crt-php/issues", + "source": "https://github.com/awslabs/aws-crt-php/tree/v1.2.7" + }, + "time": "2024-10-18T22:15:13+00:00" + }, + { + "name": "aws/aws-sdk-php", + "version": "3.369.26", + "source": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-php.git", + "reference": "ad0916c6595d98f9052f60e1d7204f4740369e94" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/ad0916c6595d98f9052f60e1d7204f4740369e94", + "reference": "ad0916c6595d98f9052f60e1d7204f4740369e94", + "shasum": "" + }, + "require": { + "aws/aws-crt-php": "^1.2.3", + "ext-json": "*", + "ext-pcre": "*", + "ext-simplexml": "*", + "guzzlehttp/guzzle": "^7.4.5", + "guzzlehttp/promises": "^2.0", + "guzzlehttp/psr7": "^2.4.5", + "mtdowling/jmespath.php": "^2.8.0", + "php": ">=8.1", + "psr/http-message": "^1.0 || ^2.0", + "symfony/filesystem": "^v5.4.45 || ^v6.4.3 || ^v7.1.0 || ^v8.0.0" + }, + "require-dev": { + "andrewsville/php-token-reflection": "^1.4", + "aws/aws-php-sns-message-validator": "~1.0", + "behat/behat": "~3.0", + "composer/composer": "^2.7.8", + "dms/phpunit-arraysubset-asserts": "^0.4.0", + "doctrine/cache": "~1.4", + "ext-dom": "*", + "ext-openssl": "*", + "ext-sockets": "*", + "phpunit/phpunit": "^9.6", + "psr/cache": "^2.0 || ^3.0", + "psr/simple-cache": "^2.0 || ^3.0", + "sebastian/comparator": "^1.2.3 || ^4.0 || ^5.0", + "yoast/phpunit-polyfills": "^2.0" + }, + "suggest": { + "aws/aws-php-sns-message-validator": "To validate incoming SNS notifications", + "doctrine/cache": "To use the DoctrineCacheAdapter", + "ext-curl": "To send requests using cURL", + "ext-openssl": "Allows working with CloudFront private distributions and verifying received SNS messages", + "ext-pcntl": "To use client-side monitoring", + "ext-sockets": "To use client-side monitoring" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Aws\\": "src/" + }, + "exclude-from-classmap": [ + "src/data/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Amazon Web Services", + "homepage": "http://aws.amazon.com" + } + ], + "description": "AWS SDK for PHP - Use Amazon Web Services in your PHP project", + "homepage": "http://aws.amazon.com/sdkforphp", + "keywords": [ + "amazon", + "aws", + "cloud", + "dynamodb", + "ec2", + "glacier", + "s3", + "sdk" + ], + "support": { + "forum": "https://github.com/aws/aws-sdk-php/discussions", + "issues": "https://github.com/aws/aws-sdk-php/issues", + "source": "https://github.com/aws/aws-sdk-php/tree/3.369.26" + }, + "time": "2026-02-03T19:16:42+00:00" + }, { "name": "brick/math", "version": "0.13.1", @@ -1807,6 +1958,62 @@ }, "time": "2025-06-25T13:29:59+00:00" }, + { + "name": "league/flysystem-aws-s3-v3", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem-aws-s3-v3.git", + "reference": "f8ba6a92a5c1fdcbdd89dede009a1e6e1b93ba8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem-aws-s3-v3/zipball/f8ba6a92a5c1fdcbdd89dede009a1e6e1b93ba8c", + "reference": "f8ba6a92a5c1fdcbdd89dede009a1e6e1b93ba8c", + "shasum": "" + }, + "require": { + "aws/aws-sdk-php": "^3.132.4", + "league/flysystem": "^2.0.0 || ^3.0.0", + "league/mime-type-detection": "^1.0.0", + "php": "^8.0.2" + }, + "conflict": { + "guzzlehttp/guzzle": "<7.0", + "guzzlehttp/ringphp": "<1.1.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Flysystem\\AwsS3V3\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "AWS S3 filesystem adapter for Flysystem.", + "keywords": [ + "Flysystem", + "aws", + "file", + "files", + "filesystem", + "s3", + "storage" + ], + "support": { + "issues": "https://github.com/thephpleague/flysystem-aws-s3-v3/issues", + "source": "https://github.com/thephpleague/flysystem-aws-s3-v3/tree/3.0.0" + }, + "time": "2022-01-13T21:11:49+00:00" + }, { "name": "league/flysystem-local", "version": "3.30.0", @@ -2374,6 +2581,72 @@ ], "time": "2025-03-24T10:02:05+00:00" }, + { + "name": "mtdowling/jmespath.php", + "version": "2.8.0", + "source": { + "type": "git", + "url": "https://github.com/jmespath/jmespath.php.git", + "reference": "a2a865e05d5f420b50cc2f85bb78d565db12a6bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/a2a865e05d5f420b50cc2f85bb78d565db12a6bc", + "reference": "a2a865e05d5f420b50cc2f85bb78d565db12a6bc", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "symfony/polyfill-mbstring": "^1.17" + }, + "require-dev": { + "composer/xdebug-handler": "^3.0.3", + "phpunit/phpunit": "^8.5.33" + }, + "bin": [ + "bin/jp.php" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "files": [ + "src/JmesPath.php" + ], + "psr-4": { + "JmesPath\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Declaratively specify how to extract elements from a JSON document", + "keywords": [ + "json", + "jsonpath" + ], + "support": { + "issues": "https://github.com/jmespath/jmespath.php/issues", + "source": "https://github.com/jmespath/jmespath.php/tree/2.8.0" + }, + "time": "2024-09-04T18:46:31+00:00" + }, { "name": "nesbot/carbon", "version": "3.10.2", @@ -4310,6 +4583,76 @@ ], "time": "2024-09-25T14:21:43+00:00" }, + { + "name": "symfony/filesystem", + "version": "v7.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "d551b38811096d0be9c4691d406991b47c0c630a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/d551b38811096d0be9c4691d406991b47c0c630a", + "reference": "d551b38811096d0be9c4691d406991b47c0c630a", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8" + }, + "require-dev": { + "symfony/process": "^6.4|^7.0|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v7.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-11-27T13:27:24+00:00" + }, { "name": "symfony/finder", "version": "v7.3.2", diff --git a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/ChatGPT Image Sep 3, 2025, 10_03_15 AM_deleted.png b/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/ChatGPT Image Sep 3, 2025, 10_03_15 AM_deleted.png deleted file mode 100644 index b493792..0000000 Binary files a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/ChatGPT Image Sep 3, 2025, 10_03_15 AM_deleted.png and /dev/null differ diff --git a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/Invoice 1 (10)_deleted.pdf b/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/Invoice 1 (10)_deleted.pdf deleted file mode 100644 index eedcb69..0000000 Binary files a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/Invoice 1 (10)_deleted.pdf and /dev/null differ diff --git a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/Invoice 1 (5)_deleted.pdf b/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/Invoice 1 (5)_deleted.pdf deleted file mode 100644 index eedcb69..0000000 Binary files a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/Invoice 1 (5)_deleted.pdf and /dev/null differ diff --git a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/Invoice 1_deleted.pdf b/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/Invoice 1_deleted.pdf deleted file mode 100644 index eedcb69..0000000 Binary files a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/Invoice 1_deleted.pdf and /dev/null differ diff --git a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/PAKET 1 (NASI PUTIH, AYAM TALIWANG, TUMIS KANGKUNG, SAMBAL) (1)_deleted_deleted.jpg b/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/PAKET 1 (NASI PUTIH, AYAM TALIWANG, TUMIS KANGKUNG, SAMBAL) (1)_deleted_deleted.jpg deleted file mode 100644 index 03dee42..0000000 Binary files a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/PAKET 1 (NASI PUTIH, AYAM TALIWANG, TUMIS KANGKUNG, SAMBAL) (1)_deleted_deleted.jpg and /dev/null differ diff --git a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/PAKET 1 (NASI PUTIH, AYAM TALIWANG, TUMIS KANGKUNG, SAMBAL) (4)_deleted.jpg b/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/PAKET 1 (NASI PUTIH, AYAM TALIWANG, TUMIS KANGKUNG, SAMBAL) (4)_deleted.jpg deleted file mode 100644 index 03dee42..0000000 Binary files a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/PAKET 1 (NASI PUTIH, AYAM TALIWANG, TUMIS KANGKUNG, SAMBAL) (4)_deleted.jpg and /dev/null differ diff --git a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/PAKET 1 (NASI PUTIH, AYAM TALIWANG, TUMIS KANGKUNG, SAMBAL) (9)_deleted.jpg b/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/PAKET 1 (NASI PUTIH, AYAM TALIWANG, TUMIS KANGKUNG, SAMBAL) (9)_deleted.jpg deleted file mode 100644 index 03dee42..0000000 Binary files a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/PAKET 1 (NASI PUTIH, AYAM TALIWANG, TUMIS KANGKUNG, SAMBAL) (9)_deleted.jpg and /dev/null differ diff --git a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/PAKET 1 (NASI PUTIH, AYAM TALIWANG, TUMIS KANGKUNG, SAMBAL)_deleted.jpg b/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/PAKET 1 (NASI PUTIH, AYAM TALIWANG, TUMIS KANGKUNG, SAMBAL)_deleted.jpg deleted file mode 100644 index 03dee42..0000000 Binary files a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/PAKET 1 (NASI PUTIH, AYAM TALIWANG, TUMIS KANGKUNG, SAMBAL)_deleted.jpg and /dev/null differ diff --git a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/WhatsApp Image 2025-08-19 at 15.44.52_d205d6d4_deleted.jpg b/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/WhatsApp Image 2025-08-19 at 15.44.52_d205d6d4_deleted.jpg deleted file mode 100644 index f25ae56..0000000 Binary files a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/WhatsApp Image 2025-08-19 at 15.44.52_d205d6d4_deleted.jpg and /dev/null differ diff --git a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/WhatsApp Image 2025-09-02 at 13.53.14_88d2e96e_deleted.jpg b/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/WhatsApp Image 2025-09-02 at 13.53.14_88d2e96e_deleted.jpg deleted file mode 100644 index 9c6c511..0000000 Binary files a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/WhatsApp Image 2025-09-02 at 13.53.14_88d2e96e_deleted.jpg and /dev/null differ diff --git a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/default_deleted.png b/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/default_deleted.png deleted file mode 100644 index a4f6704..0000000 Binary files a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/default_deleted.png and /dev/null differ diff --git a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/pesanan-selesai20250825-144604 (2)_deleted.xlsx b/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/pesanan-selesai20250825-144604 (2)_deleted.xlsx deleted file mode 100644 index ee3d358..0000000 Binary files a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/pesanan-selesai20250825-144604 (2)_deleted.xlsx and /dev/null differ diff --git a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/Главная страница в 2024 г _ Дизайн веб-сайтов, Портфолио веб-дизайн, Интерактивный дизайн (10)_deleted.jpg b/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/Главная страница в 2024 г _ Дизайн веб-сайтов, Портфолио веб-дизайн, Интерактивный дизайн (10)_deleted.jpg deleted file mode 100644 index 838a91d..0000000 Binary files a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/Главная страница в 2024 г _ Дизайн веб-сайтов, Портфолио веб-дизайн, Интерактивный дизайн (10)_deleted.jpg and /dev/null differ diff --git a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/Главная страница в 2024 г _ Дизайн веб-сайтов, Портфолио веб-дизайн, Интерактивный дизайн (13)_deleted.jpg b/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/Главная страница в 2024 г _ Дизайн веб-сайтов, Портфолио веб-дизайн, Интерактивный дизайн (13)_deleted.jpg deleted file mode 100644 index 838a91d..0000000 Binary files a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/Главная страница в 2024 г _ Дизайн веб-сайтов, Портфолио веб-дизайн, Интерактивный дизайн (13)_deleted.jpg and /dev/null differ diff --git a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/Главная страница в 2024 г _ Дизайн веб-сайтов, Портфолио веб-дизайн, Интерактивный дизайн (14)_deleted.jpg b/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/Главная страница в 2024 г _ Дизайн веб-сайтов, Портфолио веб-дизайн, Интерактивный дизайн (14)_deleted.jpg deleted file mode 100644 index 838a91d..0000000 Binary files a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/Главная страница в 2024 г _ Дизайн веб-сайтов, Портфолио веб-дизайн, Интерактивный дизайн (14)_deleted.jpg and /dev/null differ diff --git a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/Главная страница в 2024 г _ Дизайн веб-сайтов, Портфолио веб-дизайн, Интерактивный дизайн (4)_deleted.jpg b/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/Главная страница в 2024 г _ Дизайн веб-сайтов, Портфолио веб-дизайн, Интерактивный дизайн (4)_deleted.jpg deleted file mode 100644 index 838a91d..0000000 Binary files a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/Главная страница в 2024 г _ Дизайн веб-сайтов, Портфолио веб-дизайн, Интерактивный дизайн (4)_deleted.jpg and /dev/null differ diff --git a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/Главная страница в 2024 г _ Дизайн веб-сайтов, Портфолио веб-дизайн, Интерактивный дизайн (5)_deleted.jpg b/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/Главная страница в 2024 г _ Дизайн веб-сайтов, Портфолио веб-дизайн, Интерактивный дизайн (5)_deleted.jpg deleted file mode 100644 index 838a91d..0000000 Binary files a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/Главная страница в 2024 г _ Дизайн веб-сайтов, Портфолио веб-дизайн, Интерактивный дизайн (5)_deleted.jpg and /dev/null differ diff --git a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/Главная страница в 2024 г _ Дизайн веб-сайтов, Портфолио веб-дизайн, Интерактивный дизайн (6)_deleted.jpg b/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/Главная страница в 2024 г _ Дизайн веб-сайтов, Портфолио веб-дизайн, Интерактивный дизайн (6)_deleted.jpg deleted file mode 100644 index 838a91d..0000000 Binary files a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/Главная страница в 2024 г _ Дизайн веб-сайтов, Портфолио веб-дизайн, Интерактивный дизайн (6)_deleted.jpg and /dev/null differ diff --git a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/Главная страница в 2024 г _ Дизайн веб-сайтов, Портфолио веб-дизайн, Интерактивный дизайн (7)_deleted.jpg b/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/Главная страница в 2024 г _ Дизайн веб-сайтов, Портфолио веб-дизайн, Интерактивный дизайн (7)_deleted.jpg deleted file mode 100644 index 838a91d..0000000 Binary files a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/Главная страница в 2024 г _ Дизайн веб-сайтов, Портфолио веб-дизайн, Интерактивный дизайн (7)_deleted.jpg and /dev/null differ diff --git a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/Главная страница в 2024 г _ Дизайн веб-сайтов, Портфолио веб-дизайн, Интерактивный дизайн_deleted.jpg b/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/Главная страница в 2024 г _ Дизайн веб-сайтов, Портфолио веб-дизайн, Интерактивный дизайн_deleted.jpg deleted file mode 100644 index 838a91d..0000000 Binary files a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Medis/Главная страница в 2024 г _ Дизайн веб-сайтов, Портфолио веб-дизайн, Интерактивный дизайн_deleted.jpg and /dev/null differ diff --git a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Non Medis/WhatsApp Image 2025-09-03 at 08.52.46_5778b407_deleted.jpg b/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Non Medis/WhatsApp Image 2025-09-03 at 08.52.46_5778b407_deleted.jpg deleted file mode 100644 index e6f004d..0000000 Binary files a/public/file/Instalasi Sistem Informasi Manajemen Rumah Sakit/Instalasi Sistem Informasi Manajemen Rumah Sakit/Juknis/Non Medis/WhatsApp Image 2025-09-03 at 08.52.46_5778b407_deleted.jpg and /dev/null differ diff --git a/public/js/pendingFile/index.js b/public/js/pendingFile/index.js index f12d699..e46cda1 100644 --- a/public/js/pendingFile/index.js +++ b/public/js/pendingFile/index.js @@ -1,7 +1,11 @@ document.addEventListener('DOMContentLoaded', () => { - const tableState = { data: [], page: 1, pageSize: 10, search: '', lastPage: 1, total: 0, startDate: '', endDate: '' }; - const tbody = document.getElementById('tablePendingFile'); - const paginationEl = document.getElementById('paginationControls'); + const tableState = { data: [], page: 1, pageSize: 10, search: '', lastPage: 1, total: 0, startDate: '', endDate: '', mode: 'pengajuan' }; + const historyState = { data: [], page: 1, pageSize: 10, search: '', lastPage: 1, total: 0, startDate: '', endDate: '', mode: 'history' }; + + const tbodyPending = document.getElementById('tablePendingFile'); + const tbodyHistory = document.getElementById('tableHistoryFile'); + const paginationPendingEl = document.getElementById('paginationControls'); + const paginationHistoryEl = document.getElementById('paginationHistory'); const summaryEl = document.getElementById('tableSummary'); const pageSizeSelect = document.getElementById('tablePageSize'); const startDateInput = document.getElementById('startDate'); @@ -10,26 +14,42 @@ document.addEventListener('DOMContentLoaded', () => { const bulkApproveBtn = document.getElementById('bulkApproveBtn'); const clearSelectionBtn = document.getElementById('clearSelectionBtn'); const selectedCountEl = document.getElementById('selectedCount'); + const pendingBulkActionsEl = document.getElementById('pendingBulkActions'); + const tabsEl = document.getElementById('pengajuanTabs'); + const titleEl = document.getElementById('pendingTitle'); + const tabPendingEl = document.getElementById('tabPengajuan'); + const tabHistoryEl = document.getElementById('tabHistory'); + const csrfToken = document.querySelector('meta[name="csrf-token"]')?.getAttribute('content'); const selectedIds = new Set(); if (pageSizeSelect) { const initialSize = parseInt(pageSizeSelect.value); - if (!isNaN(initialSize)) tableState.pageSize = initialSize; + if (!isNaN(initialSize)) { + tableState.pageSize = initialSize; + historyState.pageSize = initialSize; + } pageSizeSelect.addEventListener('change', (e) => { const val = parseInt(e.target.value); if (!isNaN(val) && val > 0) { tableState.pageSize = val; + historyState.pageSize = val; tableState.page = 1; + historyState.page = 1; fetchData(); } }); } window.applyDateFilter = function(){ - tableState.startDate = startDateInput.value || ''; - tableState.endDate = endDateInput.value || ''; + const start = startDateInput.value || ''; + const end = endDateInput.value || ''; + tableState.startDate = start; + tableState.endDate = end; + historyState.startDate = start; + historyState.endDate = end; tableState.page = 1; + historyState.page = 1; fetchData(); } @@ -48,12 +68,12 @@ document.addEventListener('DOMContentLoaded', () => { if (status === 'revised') return 'Revised'; return 'Pending'; } + function aksesBadge(akses){ if (akses){ return 'Umum'; - } else{ - return 'Internal Unit'; } + return 'Internal Unit'; } function safeText(val){ @@ -72,6 +92,13 @@ document.addEventListener('DOMContentLoaded', () => { function updateSelectAllState(){ if (!selectAllCheckbox) return; + if (tableState.mode === 'history') { + selectAllCheckbox.checked = false; + selectAllCheckbox.indeterminate = false; + selectAllCheckbox.disabled = true; + return; + } + const selectableIds = getSelectableIdsOnPage(); if (selectableIds.length === 0) { selectAllCheckbox.checked = false; @@ -88,12 +115,12 @@ document.addEventListener('DOMContentLoaded', () => { function updateSelectionUI(){ const count = selectedIds.size; if (selectedCountEl) selectedCountEl.textContent = String(count); - if (bulkApproveBtn) bulkApproveBtn.disabled = count === 0; - if (clearSelectionBtn) clearSelectionBtn.disabled = count === 0; + if (bulkApproveBtn) bulkApproveBtn.disabled = count === 0 || tableState.mode === 'history'; + if (clearSelectionBtn) clearSelectionBtn.disabled = count === 0 || tableState.mode === 'history'; updateSelectAllState(); } - function buildRow(item){ + function buildPendingRow(item){ const tanggal = item.entry_at ? formatTanggal(item.entry_at) : '-'; const tanggalExp = item.tgl_expired ? formatTanggal(item.tgl_expired) : '-'; const tanggalTerbit = item.tanggal_terbit ? formatTanggal(item.tanggal_terbit) : '-'; @@ -102,6 +129,15 @@ document.addEventListener('DOMContentLoaded', () => { const checked = selectedIds.has(id); const aksi = `
+ @@ -140,67 +176,106 @@ document.addEventListener('DOMContentLoaded', () => { `; } + function buildHistoryRow(item){ + const tanggal = item.entry_at ? formatTanggal(item.entry_at) : '-'; + const tanggalExp = item.tgl_expired ? formatTanggal(item.tgl_expired) : '-'; + const tanggalTerbit = item.tanggal_terbit ? formatTanggal(item.tanggal_terbit) : '-'; + const actionType = item?.action_type || '-'; + return ` + + ${safeText(item.no_dokumen)} + ${aksesBadge(item?.permission_file)} + ${safeText(item.nama_dokumen)} + ${safeText(item.folder)} + ${safeText(item.part)} + ${actionType} + ${tanggalTerbit} + ${tanggalExp} + ${tanggal} + + `; + } + function renderPagination(totalPages){ + const activeState = tableState.mode === 'history' ? historyState : tableState; + const paginationEl = tableState.mode === 'history' ? paginationHistoryEl : paginationPendingEl; if (!paginationEl) return; if (totalPages <= 1) { paginationEl.innerHTML = ''; return; } const maxButtons = 5; - let start = Math.max(1, tableState.page - Math.floor(maxButtons/2)); + let start = Math.max(1, activeState.page - Math.floor(maxButtons/2)); let end = Math.min(totalPages, start + maxButtons - 1); start = Math.max(1, end - maxButtons + 1); let buttons = ''; - buttons += ``; + buttons += ``; for (let i = start; i <= end; i++) { - buttons += ``; + buttons += ``; } - buttons += ``; + buttons += ``; paginationEl.innerHTML = `
${buttons}
- Halaman ${tableState.page} dari ${totalPages} + Halaman ${activeState.page} dari ${totalPages}
`; } - if (paginationEl) { + function bindPagination(paginationEl, state){ + if (!paginationEl) return; paginationEl.addEventListener('click', (e) => { const page = e.target.getAttribute('data-page'); if (!page) return; - if (page === 'prev' && tableState.page > 1) tableState.page--; + if (page === 'prev' && state.page > 1) state.page--; else if (page === 'next') { - if (tableState.page < tableState.lastPage) tableState.page++; + if (state.page < state.lastPage) state.page++; } else { - tableState.page = parseInt(page); + state.page = parseInt(page); } fetchData(); }); } + bindPagination(paginationPendingEl, tableState); + bindPagination(paginationHistoryEl, historyState); function renderTable(){ - const pageData = tableState.data || []; + const isHistoryMode = tableState.mode === 'history'; + const activeState = isHistoryMode ? historyState : tableState; + const pageData = activeState.data || []; + const targetBody = isHistoryMode ? tbodyHistory : tbodyPending; + const rowBuilder = isHistoryMode ? buildHistoryRow : buildPendingRow; + const colSpan = isHistoryMode ? 9 : 12; + + if (!targetBody) return; + if (pageData.length === 0) { - tbody.innerHTML = ` + targetBody.innerHTML = ` - + Tidak ada data `; } else { - tbody.innerHTML = pageData.map(buildRow).join(''); + targetBody.innerHTML = pageData.map(rowBuilder).join(''); } - const from = tableState.total === 0 ? 0 : ((tableState.page - 1) * tableState.pageSize) + 1; - const to = Math.min(((tableState.page - 1) * tableState.pageSize) + pageData.length, tableState.total); + const from = activeState.total === 0 ? 0 : ((activeState.page - 1) * activeState.pageSize) + 1; + const to = Math.min(((activeState.page - 1) * activeState.pageSize) + pageData.length, activeState.total); if (summaryEl) { - summaryEl.textContent = tableState.total ? `Menampilkan ${from} - ${to} dari ${tableState.total} data` : 'Tidak ada data'; + summaryEl.textContent = activeState.total ? `Menampilkan ${from} - ${to} dari ${activeState.total} data` : 'Tidak ada data'; } - renderPagination(tableState.lastPage || 1); + renderPagination(activeState.lastPage || 1); updateSelectionUI(); } @@ -208,8 +283,11 @@ document.addEventListener('DOMContentLoaded', () => { window.debouncedTableSearch = function(value){ clearTimeout(searchDebounce); searchDebounce = setTimeout(() => { - tableState.search = value.trim(); + const keyword = value.trim(); + tableState.search = keyword; + historyState.search = keyword; tableState.page = 1; + historyState.page = 1; fetchData(); }, 250); } @@ -218,29 +296,77 @@ document.addEventListener('DOMContentLoaded', () => { tableState.search = ''; tableState.startDate = ''; tableState.endDate = ''; - document.getElementById('tableSearch').value = ''; - startDateInput.value = ''; - endDateInput.value = ''; + historyState.search = ''; + historyState.startDate = ''; + historyState.endDate = ''; + const tableSearch = document.getElementById('tableSearch'); + if (tableSearch) tableSearch.value = ''; + if (startDateInput) startDateInput.value = ''; + if (endDateInput) endDateInput.value = ''; selectedIds.clear(); tableState.page = 1; + historyState.page = 1; fetchData(); } + function updateTabUI(){ + if (tabsEl) { + tabsEl.querySelectorAll('.nav-link').forEach((btn) => { + btn.classList.toggle('active', btn.getAttribute('data-mode') === tableState.mode); + }); + } + if (titleEl) { + titleEl.textContent = tableState.mode === 'history' ? 'Log History' : 'Data Pending'; + } + if (tabPendingEl && tabHistoryEl) { + tabPendingEl.classList.toggle('d-none', tableState.mode === 'history'); + tabHistoryEl.classList.toggle('d-none', tableState.mode !== 'history'); + } + if (pendingBulkActionsEl) { + pendingBulkActionsEl.classList.toggle('d-none', tableState.mode === 'history'); + } + updateSelectionUI(); + } + + if (tabsEl) { + tabsEl.addEventListener('click', (e) => { + const btn = e.target.closest('[data-mode]'); + if (!btn) return; + const mode = btn.getAttribute('data-mode'); + if (!mode || mode === tableState.mode) return; + tableState.mode = mode; + if (mode === 'history') { + historyState.page = 1; + } else { + tableState.page = 1; + } + updateTabUI(); + fetchData(); + }); + } + function fetchData(){ if (summaryEl) summaryEl.textContent = 'Memuat data...'; + + const activeState = tableState.mode === 'history' ? historyState : tableState; const params = new URLSearchParams({ - page: tableState.page, - per_page: tableState.pageSize, - keyword: tableState.search || '', - start_date: tableState.startDate || '', - end_date: tableState.endDate || '' + page: activeState.page, + per_page: activeState.pageSize, + keyword: activeState.search || '', + start_date: activeState.startDate || '', + end_date: activeState.endDate || '' }); - fetch(`/datatable/pending-file?${params.toString()}`) + + const endpoint = tableState.mode === 'history' + ? `/data/log-dokumen?${params.toString()}` + : `/datatable/pending-file?${params.toString()}`; + + fetch(endpoint) .then(res => res.json()) .then(data => { - tableState.data = data?.data || []; - tableState.lastPage = data?.pagination?.last_page || 1; - tableState.total = data?.pagination?.total || 0; + activeState.data = data?.data || []; + activeState.lastPage = data?.pagination?.last_page || 1; + activeState.total = data?.pagination?.total || 0; renderTable(); }) .catch(err => { @@ -278,7 +404,7 @@ document.addEventListener('DOMContentLoaded', () => { showConfirmButton: false }); selectedIds.delete(String(id)); - countData() + countData(); fetchData(); }).catch((err) => { Swal.fire({ @@ -335,7 +461,7 @@ document.addEventListener('DOMContentLoaded', () => { showConfirmButton: false }); selectedIds.delete(String(id)); - countData() + countData(); fetchData(); }).catch((err) => { Swal.fire({ @@ -346,19 +472,41 @@ document.addEventListener('DOMContentLoaded', () => { }); }); } - window.infoReject = function(id, fileName){ - const item = id; - const revision = item?.revision ? String(item.revision) : 'Tidak ada catatan revisi.'; - Swal.fire({ - title: 'Catatan Revisi', - text: revision, - icon: 'info', - confirmButtonText: 'Tutup' - }); + + window.infoDok = function(e){ + let fileUrl =$(e).data('file'); + let noDokumen = $(e).data('no_dokumen'); + let tanggalTerbit = $(e).data('tanggal_terbit'); + let permissionFile = $(e).data('permission_file'); + let fileName = $(e).data('fileName'); + currentFile = fileUrl; + idDirectory = $(e).data('id'); + + const titleEl = document.getElementById('confirm_preview_file'); + if (titleEl) titleEl.textContent = fileName; + + const noEl = document.getElementById('confirm-upload-dokumen'); + if (noEl) noEl.textContent = noDokumen; + + const tglEl = document.getElementById('confirm-time-dokumen'); + if (tglEl) tglEl.textContent = tanggalTerbit; + + const permEl = document.getElementById('confirm-permission'); + if (permEl) { + const publicDoc = isPublic(permissionFile); + permEl.textContent = publicDoc ? 'Umum' : 'Internal Unit'; + permEl.className = 'badge ' + (publicDoc ? 'bg-success' : 'bg-secondary'); + } + let previewBox = document.getElementById('file-preview'); + previewBox.innerHTML = `
+
+
`; + openPreview(idDirectory); + $("#previewModal").modal('show'); } - if (tbody) { - tbody.addEventListener('change', (e) => { + if (tbodyPending) { + tbodyPending.addEventListener('change', (e) => { const target = e.target; if (!target.classList.contains('row-select')) return; const id = target.getAttribute('data-id'); @@ -424,7 +572,7 @@ document.addEventListener('DOMContentLoaded', () => { timer: 1500, showConfirmButton: false }); - countData() + countData(); fetchData(); }).catch((err) => { Swal.fire({ @@ -437,57 +585,51 @@ document.addEventListener('DOMContentLoaded', () => { }); } + updateTabUI(); fetchData(); - - }); + document.addEventListener('click', function(e){ - if(e.target.matches('.file-link')){ + if(e.target.matches('.file-link')){ + e.preventDefault(); + let fileUrl = e.target.getAttribute('data-file'); + let noDokumen = e.target.getAttribute('data-no_dokumen'); + let tanggalTerbit = e.target.getAttribute('data-tanggal_terbit'); + let permissionFile = e.target.getAttribute('data-permission_file'); + let fileName = e.target.getAttribute('data-fileName'); + currentFile = fileUrl; + idDirectory = e.target.getAttribute('data-id'); - e.preventDefault(); - let fileUrl = e.target.getAttribute('data-file'); - let noDokumen = e.target.getAttribute('data-no_dokumen') - let tanggalTerbit = e.target.getAttribute('data-tanggal_terbit') - let permissionFile = e.target.getAttribute('data-permission_file') - let fileName = e.target.getAttribute('data-fileName') - currentFile = fileUrl; - idDirectory = e.target.getAttribute('data-id'); + const titleEl = document.getElementById('confirm_preview_file'); + if (titleEl) titleEl.textContent = fileName; + const noEl = document.getElementById('confirm-upload-dokumen'); + if (noEl) noEl.textContent = noDokumen; - const titleEl = document.getElementById('confirm_preview_file'); - if (titleEl) titleEl.textContent = fileName; + const tglEl = document.getElementById('confirm-time-dokumen'); + if (tglEl) tglEl.textContent = tanggalTerbit; - // set footer info - const noEl = document.getElementById('confirm-upload-dokumen'); - if (noEl) noEl.textContent = noDokumen; - - const tglEl = document.getElementById('confirm-time-dokumen'); - - if (tglEl) tglEl.textContent = tanggalTerbit; - - const permEl = document.getElementById('confirm-permission'); - if (permEl) { - const publicDoc = isPublic(permissionFile); - permEl.textContent = publicDoc ? 'Umum' : 'Internal Unit'; - permEl.className = 'badge ' + (publicDoc ? 'bg-success' : 'bg-secondary'); - } - let previewBox = document.getElementById('file-preview'); - previewBox.innerHTML = `
-
-
- `; - openPreview(idDirectory); - $("#previewModal").modal('show') - } - - - if(e.target.matches('#btn-view-full')){ - window.open(`/full-preview/${idDirectory}`, '_blank'); - } - }) - - function isPublic(permissionVal){ - if(permissionVal === null || permissionVal === undefined) return false; - const val = String(permissionVal).toLowerCase(); - return val === '1' || val === 'true' || val === 'iya' || val === 'yes'; + const permEl = document.getElementById('confirm-permission'); + if (permEl) { + const publicDoc = isPublic(permissionFile); + permEl.textContent = publicDoc ? 'Umum' : 'Internal Unit'; + permEl.className = 'badge ' + (publicDoc ? 'bg-success' : 'bg-secondary'); } + let previewBox = document.getElementById('file-preview'); + previewBox.innerHTML = `
+
+
`; + openPreview(idDirectory); + $("#previewModal").modal('show'); + } + + if(e.target.matches('#btn-view-full')){ + window.open(`/full-preview/${idDirectory}`, '_blank'); + } +}); + +function isPublic(permissionVal){ + if(permissionVal === null || permissionVal === undefined) return false; + const val = String(permissionVal).toLowerCase(); + return val === '1' || val === 'true' || val === 'iya' || val === 'yes'; +} diff --git a/public/js/pengajuanFile/index.js b/public/js/pengajuanFile/index.js index 9a3ce2f..a246db7 100644 --- a/public/js/pengajuanFile/index.js +++ b/public/js/pengajuanFile/index.js @@ -1,11 +1,21 @@ document.addEventListener('DOMContentLoaded', () => { - const tableState = { data: [], page: 1, pageSize: 10, search: '', lastPage: 1, total: 0, startDate: '', endDate: '' }; - const tbody = document.getElementById('tablePengajuanFile'); - const paginationEl = document.getElementById('paginationControls'); + const tableState = { data: [], page: 1, pageSize: 10, search: '', lastPage: 1, total: 0, startDate: '', endDate: '', mode: 'pengajuan' }; + const historyState = { data: [], page: 1, pageSize: 10, search: '', lastPage: 1, total: 0, startDate: '', endDate: '', mode: 'history' }; + const tbodyPengajuan = document.getElementById('tablePengajuanFile'); + const tbodyHistory = document.getElementById('tableHistoryFile'); + const paginationPengajuan = document.getElementById('paginationPengajuan'); + const paginationHistory = document.getElementById('paginationHistory'); const summaryEl = document.getElementById('tableSummary'); const pageSizeSelect = document.getElementById('tablePageSize'); const startDateInput = document.getElementById('startDate'); const endDateInput = document.getElementById('endDate'); + const tabsEl = document.getElementById('pengajuanTabs'); + const titleEl = document.getElementById('pengajuanTitle'); + const tabPengajuanEl = document.getElementById('tabPengajuan'); + const tabHistoryEl = document.getElementById('tabHistory'); + const formCreate = document.getElementById('formFile'); + const modalCreate = document.getElementById('modalCreateFile'); + let colCount = 1; const csrfToken = document.querySelector('meta[name="csrf-token"]')?.getAttribute('content'); const editForm = document.getElementById('formEditPengajuanFile'); const editUnitSelect = $('#edit_id_unit_kerja'); @@ -13,21 +23,31 @@ document.addEventListener('DOMContentLoaded', () => { if (pageSizeSelect) { const initialSize = parseInt(pageSizeSelect.value); - if (!isNaN(initialSize)) tableState.pageSize = initialSize; + if (!isNaN(initialSize)) { + tableState.pageSize = initialSize; + historyState.pageSize = initialSize; + } pageSizeSelect.addEventListener('change', (e) => { const val = parseInt(e.target.value); if (!isNaN(val) && val > 0) { tableState.pageSize = val; + historyState.pageSize = val; tableState.page = 1; + historyState.page = 1; fetchData(); } }); } window.applyDateFilter = function(){ - tableState.startDate = startDateInput.value || ''; - tableState.endDate = endDateInput.value || ''; + const start = startDateInput.value || ''; + const end = endDateInput.value || ''; + tableState.startDate = start; + tableState.endDate = end; + historyState.startDate = start; + historyState.endDate = end; tableState.page = 1; + historyState.page = 1; fetchData(); } @@ -45,6 +65,10 @@ document.addEventListener('DOMContentLoaded', () => { let tanggal = item.entry_at ? formatTanggal(item.entry_at) : '-'; let tanggalExp = item.tgl_expired ? formatTanggal(item.tgl_expired) : '-'; let tanggalTerbit = item.tanggal_terbit ? formatTanggal(item.tanggal_terbit) : '-'; + const isApproved = item?.status_action === 'approved'; + const isRejected = item?.status_action === 'rejected'; + const showEdit = !isApproved; + const showInfo = isRejected; const aksi = `
- - - + ${showInfo ? ` + + ` : ''} + ${showEdit ? ` + + ` : ''}
`; return ` @@ -71,10 +98,12 @@ document.addEventListener('DOMContentLoaded', () => { ${item.no_dokumen || '-'} @@ -96,6 +125,32 @@ document.addEventListener('DOMContentLoaded', () => { `; } + function buildHistoryRow(item){ + const tanggal = item.entry_at ? formatTanggal(item.entry_at) : '-'; + const tanggalExp = item.tgl_expired ? formatTanggal(item.tgl_expired) : '-'; + const tanggalTerbit = item.tanggal_terbit ? formatTanggal(item.tanggal_terbit) : '-'; + const actionType = item?.action_type || '-'; + return ` + + ${item.no_dokumen || '-'} + ${aksesBadge(item?.permission_file)} + ${item.nama_dokumen || '-'} + ${item.folder || '-'} + ${item.part || '-'} + ${item.action_type} + ${tanggalTerbit} + ${tanggalExp} + ${tanggal} + + `; + } + function aksesBadge(akses){ if (akses){ return 'Umum'; @@ -109,74 +164,87 @@ document.addEventListener('DOMContentLoaded', () => { } function renderPagination(totalPages){ + const activeState = tableState.mode === 'history' ? historyState : tableState; + const paginationEl = tableState.mode === 'history' ? paginationHistory : paginationPengajuan; if (!paginationEl) return; if (totalPages <= 1) { paginationEl.innerHTML = ''; return; } const maxButtons = 5; - let start = Math.max(1, tableState.page - Math.floor(maxButtons/2)); + let start = Math.max(1, activeState.page - Math.floor(maxButtons/2)); let end = Math.min(totalPages, start + maxButtons - 1); start = Math.max(1, end - maxButtons + 1); let buttons = ''; - buttons += ``; + buttons += ``; for (let i = start; i <= end; i++) { - buttons += ``; + buttons += ``; } - buttons += ``; + buttons += ``; paginationEl.innerHTML = `
${buttons}
- Halaman ${tableState.page} dari ${totalPages} + Halaman ${activeState.page} dari ${totalPages}
`; } - if (paginationEl) { + function bindPagination(paginationEl, state){ + if (!paginationEl) return; paginationEl.addEventListener('click', (e) => { const page = e.target.getAttribute('data-page'); if (!page) return; - if (page === 'prev' && tableState.page > 1) tableState.page--; + if (page === 'prev' && state.page > 1) state.page--; else if (page === 'next') { - if (tableState.page < tableState.lastPage) tableState.page++; + if (state.page < state.lastPage) state.page++; } else { - tableState.page = parseInt(page); + state.page = parseInt(page); } fetchData(); }); } + bindPagination(paginationPengajuan, tableState); + bindPagination(paginationHistory, historyState); function renderTable(){ - const pageData = tableState.data || []; + const isHistoryMode = tableState.mode === 'history'; + const activeState = isHistoryMode ? historyState : tableState; + const pageData = activeState.data || []; + const targetBody = isHistoryMode ? tbodyHistory : tbodyPengajuan; + const colSpan = isHistoryMode ? 9 : 10; + const rowBuilder = isHistoryMode ? buildHistoryRow : buildRow; if (pageData.length === 0) { - tbody.innerHTML = ` + targetBody.innerHTML = ` - + Tidak ada data `; } else { - tbody.innerHTML = pageData.map(buildRow).join(''); + targetBody.innerHTML = pageData.map(rowBuilder).join(''); } - const from = tableState.total === 0 ? 0 : ((tableState.page - 1) * tableState.pageSize) + 1; - const to = Math.min(((tableState.page - 1) * tableState.pageSize) + pageData.length, tableState.total); + const from = activeState.total === 0 ? 0 : ((activeState.page - 1) * activeState.pageSize) + 1; + const to = Math.min(((activeState.page - 1) * activeState.pageSize) + pageData.length, activeState.total); if (summaryEl) { - summaryEl.textContent = tableState.total ? `Menampilkan ${from} - ${to} dari ${tableState.total} data` : 'Tidak ada data'; + summaryEl.textContent = activeState.total ? `Menampilkan ${from} - ${to} dari ${activeState.total} data` : 'Tidak ada data'; } - renderPagination(tableState.lastPage || 1); + renderPagination(activeState.lastPage || 1); } let searchDebounce; window.debouncedTableSearch = function(value){ clearTimeout(searchDebounce); searchDebounce = setTimeout(() => { - tableState.search = value.trim(); + const keyword = value.trim(); + tableState.search = keyword; + historyState.search = keyword; tableState.page = 1; + historyState.page = 1; fetchData(); }, 250); } @@ -185,28 +253,64 @@ document.addEventListener('DOMContentLoaded', () => { tableState.search = ''; tableState.startDate = ''; tableState.endDate = ''; + historyState.search = ''; + historyState.startDate = ''; + historyState.endDate = ''; document.getElementById('tableSearch').value = ''; startDateInput.value = ''; endDateInput.value = ''; tableState.page = 1; + historyState.page = 1; fetchData(); } + function updateTabUI(){ + if (tabsEl) { + tabsEl.querySelectorAll('.nav-link').forEach((btn) => { + btn.classList.toggle('active', btn.getAttribute('data-mode') === tableState.mode); + }); + } + if (titleEl) { + titleEl.textContent = tableState.mode === 'history' ? 'Log History' : 'Data Pengajuan'; + } + if (tabPengajuanEl && tabHistoryEl) { + tabPengajuanEl.classList.toggle('d-none', tableState.mode === 'history'); + tabHistoryEl.classList.toggle('d-none', tableState.mode !== 'history'); + } + } + + if (tabsEl) { + tabsEl.addEventListener('click', (e) => { + const btn = e.target.closest('[data-mode]'); + if (!btn) return; + const mode = btn.getAttribute('data-mode'); + if (!mode || mode === tableState.mode) return; + tableState.mode = mode; + tableState.page = 1; + updateTabUI(); + fetchData(); + }); + } + function fetchData(){ if (summaryEl) summaryEl.textContent = 'Memuat data...'; + const activeState = tableState.mode === 'history' ? historyState : tableState; const params = new URLSearchParams({ - page: tableState.page, - per_page: tableState.pageSize, - keyword: tableState.search || '', - start_date: tableState.startDate || '', - end_date: tableState.endDate || '' + page: activeState.page, + per_page: activeState.pageSize, + keyword: activeState.search || '', + start_date: activeState.startDate || '', + end_date: activeState.endDate || '' }); - fetch(`/datatable/pengajuan-file?${params.toString()}`) + const endpoint = tableState.mode === 'history' + ? `/data/log-dokumen?${params.toString()}` + : `/datatable/pengajuan-file?${params.toString()}`; + fetch(endpoint) .then(res => res.json()) .then(data => { - tableState.data = data?.data || []; - tableState.lastPage = data?.pagination?.last_page || 1; - tableState.total = data?.pagination?.total || 0; + activeState.data = data?.data || []; + activeState.lastPage = data?.pagination?.last_page || 1; + activeState.total = data?.pagination?.total || 0; renderTable(); }) .catch(err => { @@ -339,7 +443,6 @@ document.addEventListener('DOMContentLoaded', () => { const tglEl = document.getElementById('edit_tanggal_terbit'); const tglExpiredEl = document.getElementById('edit_tgl_expired'); const hasExpiredEl = document.getElementById('edit_has_expired'); - const expiredFieldEl = document.getElementById('edit_expired_field'); const currentFileEl = document.getElementById('edit_current_file'); const permYes = document.getElementById('edit_perm_yes'); const permNo = document.getElementById('edit_perm_no'); @@ -355,10 +458,10 @@ document.addEventListener('DOMContentLoaded', () => { permYes.checked = isPublic; permNo.checked = !isPublic; } - if (hasExpiredEl && expiredFieldEl) { + if (hasExpiredEl && tglExpiredEl) { const hasExpired = !!item.tgl_expired; hasExpiredEl.checked = hasExpired; - expiredFieldEl.classList.toggle('d-none', !hasExpired); + syncEditExpiredField(); } if (currentFileEl) { const displayName = item.fileName || (item.file ? String(item.file).split('/').pop() : ''); @@ -393,19 +496,19 @@ document.addEventListener('DOMContentLoaded', () => { } } + function syncEditExpiredField() { + const editHasExpired = document.getElementById('edit_has_expired'); + const editExpiredInput = document.getElementById('edit_tgl_expired'); + if (!editHasExpired || !editExpiredInput) return; + editExpiredInput.disabled = !editHasExpired.checked; + if (!editHasExpired.checked) { + editExpiredInput.value = ''; + } + } + const editHasExpired = document.getElementById('edit_has_expired'); if (editHasExpired) { - editHasExpired.addEventListener('change', () => { - const targetId = editHasExpired.getAttribute('data-target'); - const container = targetId ? document.getElementById(targetId) : null; - if (container) { - container.classList.toggle('d-none', !editHasExpired.checked); - if (!editHasExpired.checked) { - const input = container.querySelector('input[type="date"]'); - if (input) input.value = ''; - } - } - }); + editHasExpired.addEventListener('change', syncEditExpiredField); } if (editForm) { @@ -449,7 +552,270 @@ document.addEventListener('DOMContentLoaded', () => { } initEditSelects(); + updateTabUI(); fetchData(); + + // ===== Upload baru (seperti dataUnit) ===== + document.addEventListener('change', function(e){ + if(!e.target.classList.contains('toggle-expired')) return; + const targetId = e.target.getAttribute('data-target'); + if(!targetId) return; + const fieldWrap = document.getElementById(targetId); + const input = fieldWrap?.querySelector('input'); + if (input) input.disabled = !e.target.checked; + }); + + function resetCreateForm(){ + colCount = 1; + const colAdd = document.getElementById('col_add_fileV2'); + if (colAdd) colAdd.innerHTML = ''; + if (formCreate) { + formCreate.reset(); + $(formCreate).find('select').val(null).trigger('change'); + $(formCreate).find('input[type="file"]').val(''); + $(formCreate).find('.file-name').addClass('d-none').text(''); + } + } + + function selectOptionUnitKerjaV1(localCol){ + const selectUnit = $(`#select_id_unit_kerja_${localCol}`); + const selectSubUnit = $(`#select_id_sub_unit_kerja_${localCol}`); + + selectUnit.select2({ + placeholder: '-- Pilih Unit Kerja --', + allowClear:true, + width: '100%', + dropdownParent: selectUnit.parent(), + ajax:{ + url : '/select-unit-kerja-mapping', + dataType: 'json', + delay: 250, + data: function(params){ + return { q: params.term } + }, + processResults: function(data){ + return { + results : (data?.data || []).map(item => ({ + id: item.id+'/'+item.name, + text: item.name, + sub_units: item.sub_unit_kerja + })) + } + }, + cache: true, + }, + minimumInputLength: 0, + }); + + selectSubUnit.select2({ + placeholder: '-- Pilih Sub Unit Kerja --', + allowClear: true, + width: '100%', + dropdownParent: selectSubUnit.parent() + }); + + selectUnit.on('select2:select', function (e) { + const data = e.params.data; + selectSubUnit.empty().append(''); + if (data.sub_units && data.sub_units.length > 0) { + data.sub_units.forEach(sub => { + selectSubUnit.append(``); + }); + } + }); + } + + window.addFormV2 = function(){ + const col = document.getElementById('col_add_fileV2'); + if (!col) return; + const katDok = Array.isArray(window.katDok) ? window.katDok : []; + const katOptions = katDok.map(k => ``).join(''); + + let html = ` +
+
+
+ +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ +
+ # + +
+
+
+ + +
+ +
+ + +
+
+
+ + +
+
+ +
+ + +
+ +
+ +
+
+ + +
+ +
+ + +
+
+
+ +
+ +
+ +
+
+
Format yang didukung: PDF.
+
+
`; + col.insertAdjacentHTML('beforeend', html); + selectOptionUnitKerjaV1(colCount); + colCount++; + } + + window.removeCol = function(count){ + const el = document.getElementById(`col-${count}`); + if (el) el.remove(); + } + + if (formCreate) { + const select0 = $('#select_id_unit_kerja_0'); + if (select0.length) selectOptionUnitKerjaV1(0); + + formCreate.addEventListener('submit', (e) => { + e.preventDefault(); + const submitBtn = formCreate.querySelector('button[type="submit"]'); + if (submitBtn) submitBtn.disabled = true; + if (submitBtn) submitBtn.textContent = 'menyimpan...'; + const formData = new FormData(formCreate); + + fetch(`/uploadv2`, { + method: 'POST', + headers: { + 'X-CSRF-TOKEN': document.querySelector('input[name="_token"]')?.value || '' + }, + body: formData + }).then(async(res) => { + const responseData = await res.json(); + if(responseData.status){ + Swal.fire({ + icon: 'success', + title: 'Berhasil', + text: responseData.message || 'Data berhasil disimpan.', + timer: 1500, + showConfirmButton: false + }); + const modalInstance = bootstrap.Modal.getInstance(modalCreate); + modalInstance?.hide(); + resetCreateForm(); + fetchData(); + if(responseData.status_action === null || responseData.status_action === undefined){ + Swal.fire({ + icon: 'info', + title: 'Perlu Persetujuan', + text: 'Dokumen yang Anda upload butuh persetujuan dari atasan.', + confirmButtonText: 'Tutup' + }); + } + } else { + throw new Error(responseData.message || 'Terjadi kesalahan saat menyimpan data.'); + } + }).catch(err => { + Swal.fire({ + icon: 'error', + title: 'Gagal', + text: err.message || 'Terjadi kesalahan.' + }); + }).finally(() => { + if (submitBtn) submitBtn.disabled = false; + if (submitBtn) submitBtn.textContent = 'Simpan'; + }); + }); + } }); document.addEventListener('click', function(e){ if(e.target.matches('.file-link')){ diff --git a/resources/views/dashboard/index.blade.php b/resources/views/dashboard/index.blade.php index 93b798c..cccb179 100644 --- a/resources/views/dashboard/index.blade.php +++ b/resources/views/dashboard/index.blade.php @@ -114,7 +114,7 @@
diff --git a/resources/views/dataUmum/index.blade.php b/resources/views/dataUmum/index.blade.php index bffbecf..bbf255f 100644 --- a/resources/views/dataUmum/index.blade.php +++ b/resources/views/dataUmum/index.blade.php @@ -73,7 +73,7 @@ 0 dipilih - + {{-- --}} @@ -500,9 +500,7 @@ return d.toLocaleDateString('id-ID', { day: '2-digit', month: 'short', - year: 'numeric', - hour: '2-digit', - minute: '2-digit' + year: 'numeric' }); } fetchData() @@ -600,37 +598,7 @@ }); } - document.addEventListener('click', function (e) { - const btn = e.target.closest('.folder-prefill'); - if (!btn) return; - e.preventDefault(); - const payload = { - unitId: btn.getAttribute('data-unit_id') || '', - subId: btn.getAttribute('data-sub_id') || '', - kategoriId: btn.getAttribute('data-kategori_id') || '', - unitName: btn.getAttribute('data-unit_name') || '', - subName: btn.getAttribute('data-sub_name') || '', - kategoriName: btn.getAttribute('data-kategori_name') || '', - }; - - fetch('/dashboard/prefill', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - 'X-CSRF-TOKEN': document.querySelector('meta[name="csrf-token"]').content, - 'X-Requested-With': 'XMLHttpRequest' - }, - body: JSON.stringify(payload) - }) - .then(res => { - if (!res.ok) throw new Error('Gagal set filter'); - window.location.href = '/'; - }) - .catch(() => { - Swal.fire({ icon: 'error', title: 'Gagal', text: 'Tidak bisa buka folder' }); - }); - }); let colCount = 1; $(document).ready(function() { @@ -796,7 +764,7 @@
- +
diff --git a/resources/views/dataUmum/modal/create.blade.php b/resources/views/dataUmum/modal/create.blade.php index 6a8d705..7ff649f 100644 --- a/resources/views/dataUmum/modal/create.blade.php +++ b/resources/views/dataUmum/modal/create.blade.php @@ -64,7 +64,7 @@
- +
diff --git a/resources/views/dataUnit/index.blade.php b/resources/views/dataUnit/index.blade.php index 84f7dd4..29377bc 100644 --- a/resources/views/dataUnit/index.blade.php +++ b/resources/views/dataUnit/index.blade.php @@ -71,7 +71,7 @@ 0 dipilih - + @@ -183,14 +183,8 @@ const targetId = e.target.getAttribute('data-target'); if(!targetId) return; const fieldWrap = document.getElementById(targetId); - if(!fieldWrap) return; - if(e.target.checked){ - fieldWrap.classList.remove('d-none'); - }else{ - fieldWrap.classList.add('d-none'); - const input = fieldWrap.querySelector('input[type="date"]'); - if(input) input.value = ''; - } + const input = fieldWrap.querySelector('input'); + input.disabled = !e.target.checked; }); if(pageSizeSelect){ @@ -487,13 +481,10 @@ function formatTanggal(dateString) { const d = new Date(dateString); - return d.toLocaleDateString('id-ID', { day: '2-digit', month: 'short', - year: 'numeric', - hour: '2-digit', - minute: '2-digit' + year: 'numeric' }); } fetchData() @@ -591,37 +582,7 @@ }); } - document.addEventListener('click', function (e) { - const btn = e.target.closest('.folder-prefill'); - if (!btn) return; - e.preventDefault(); - const payload = { - unitId: btn.getAttribute('data-unit_id') || '', - subId: btn.getAttribute('data-sub_id') || '', - kategoriId: btn.getAttribute('data-kategori_id') || '', - unitName: btn.getAttribute('data-unit_name') || '', - subName: btn.getAttribute('data-sub_name') || '', - kategoriName: btn.getAttribute('data-kategori_name') || '', - }; - - fetch('/dashboard/prefill', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - 'X-CSRF-TOKEN': document.querySelector('meta[name="csrf-token"]').content, - 'X-Requested-With': 'XMLHttpRequest' - }, - body: JSON.stringify(payload) - }) - .then(res => { - if (!res.ok) throw new Error('Gagal set filter'); - window.location.href = '/'; - }) - .catch(() => { - Swal.fire({ icon: 'error', title: 'Gagal', text: 'Tidak bisa buka folder' }); - }); - }); let colCount = 1; $(document).ready(function() { @@ -661,12 +622,6 @@ width: '100%', }); - // // --- isi default unit kerja --- - // if(authUnitKerja){ - // let option = new Option(authUnitKerja.name, authUnitKerja.id, true, true); - // $('.unit_kerja').append(option).trigger('change'); - // } - let initialUnit = $('.unit_kerja').val(); if(initialUnit){ loadSubUnitKerja(initialUnit); @@ -778,21 +733,21 @@ type="date" name="data[${colCount}][date_active]"> -
+
- +
- + + name="data[${colCount}][tgl_expired]" disabled>
@@ -946,7 +901,7 @@ const deleteWrapper = document.getElementById('deleteData'); if (Number(pegawai_id_entry) === Number(authPegawai)) { - deleteWrapper.classList.remove('d-none'); + deleteWrapper.remove('d-none'); } else { deleteWrapper.classList.add('d-none'); } @@ -961,14 +916,6 @@ } if(e.target.id === 'delete-file'){ - if(!currentFile){ - Swal.fire({ - text: "Tidak ada file yang dipilih!", - icon: "warning", - confirmButtonText: "OK" - }); - return; - } Swal.fire({ title: 'Yakin ingin menghapus file ini?', text: "File akan dihapus", diff --git a/resources/views/dataUnit/modal/create.blade.php b/resources/views/dataUnit/modal/create.blade.php index 0af6ece..effcccd 100644 --- a/resources/views/dataUnit/modal/create.blade.php +++ b/resources/views/dataUnit/modal/create.blade.php @@ -57,16 +57,15 @@
-
+
- +
- - - + +
diff --git a/resources/views/layout/partials/sidenav.blade.php b/resources/views/layout/partials/sidenav.blade.php index b5cc4a6..f45d4cd 100644 --- a/resources/views/layout/partials/sidenav.blade.php +++ b/resources/views/layout/partials/sidenav.blade.php @@ -45,15 +45,7 @@ {{-- AKTIVITAS --}} - + @php $isAtasan = \App\Models\MappingUnitKerjaPegawai::where('statusenabled', true)->where('objectatasanlangsungfk', auth()->user()->objectpegawaifk)->exists(); @endphp @@ -82,6 +74,15 @@ @endif + {{-- RECAP --}} {{-- diff --git a/resources/views/logActivity/index.blade.php b/resources/views/logActivity/index.blade.php index da1348d..936548c 100644 --- a/resources/views/logActivity/index.blade.php +++ b/resources/views/logActivity/index.blade.php @@ -15,7 +15,7 @@
@@ -45,7 +45,7 @@ No Dokumen - File + Nama Dokumen Kategori Unit Pengunggah diff --git a/resources/views/pendingFile/index.blade.php b/resources/views/pendingFile/index.blade.php index d4f7a2a..d8eb804 100644 --- a/resources/views/pendingFile/index.blade.php +++ b/resources/views/pendingFile/index.blade.php @@ -1,54 +1,21 @@ @extends('layout.main') @section('body_main') - +
-

Data Pending

+

Data Pending

+
@@ -77,7 +44,7 @@
-
+
@@ -90,32 +57,57 @@
-
- - - - - - - - - - - - - - - - - - - - -
- - AksiNo. DokumenStatusAksesNamaKategoriUnit / Sub UnitTanggal TerbitTanggal ExpiredTanggal UploadPengunggah
+
+
+ + + + + + + + + + + + + + + + + + + + +
+ + AksiNo. DokumenStatusAksesNamaKategoriUnitTanggal TerbitTanggal Kedaluwarsa DokumenTanggal UploadPengunggah
+
+
+
+
+
+ + + + + + + + + + + + + + + + + +
No DokumenAksesNamaKategoriUnitAksiTanggal TerbitTanggal Kedaluwarsa DokumenTanggal Upload
+
+
-
diff --git a/resources/views/pengajuanFile/index.blade.php b/resources/views/pengajuanFile/index.blade.php index 6a43948..2f5ac04 100644 --- a/resources/views/pengajuanFile/index.blade.php +++ b/resources/views/pengajuanFile/index.blade.php @@ -1,12 +1,55 @@ @extends('layout.main') + @section('body_main')
-

Data Pending

+

Data Pengajuan

+
+
@@ -15,7 +58,7 @@
@@ -40,28 +83,53 @@
-
- - - - - - - - - - - - - - - - - - -
AksiNo DokumenStatusAksesNamaKategoriUnitTanggal TerbitTanggal ExpiredTanggal Upload
+
+
+ + + + + + + + + + + + + + + + + + +
AksiNo DokumenStatusAksesNamaKategoriUnitTanggal TerbitTanggal Kedaluwarsa DokumenTanggal Upload
+
+
+
+
+
+ + + + + + + + + + + + + + + + + +
No DokumenAksesNamaKategoriUnitAksiTanggal TerbitTanggal Kedaluwarsa DokumenTanggal Upload
+
+
-
@@ -69,5 +137,9 @@
@include('pendingFile.modal.view') @include('pengajuanFile.modal.edit') + @include('dataUnit.modal.create') + @endsection diff --git a/resources/views/pengajuanFile/modal/edit.blade.php b/resources/views/pengajuanFile/modal/edit.blade.php index 6bcfb85..e5c7a44 100644 --- a/resources/views/pengajuanFile/modal/edit.blade.php +++ b/resources/views/pengajuanFile/modal/edit.blade.php @@ -61,9 +61,9 @@
-
- - +
+ +
diff --git a/routes/web.php b/routes/web.php index 5d80830..8f53a9a 100644 --- a/routes/web.php +++ b/routes/web.php @@ -22,10 +22,10 @@ Route::middleware(['auth'])->group(function(){ Route::get('/file-download/{id}', [DashboardController::class, 'downloadFile']); Route::get('/full-preview/{id}', [DashboardController::class, 'dataPdfV2']); Route::post('/upload', [DashboardController::class, 'store']); - Route::get('/data-unit-kerja', [DashboardController::class, 'dataUnitKerja']); - Route::post('/dashboard/prefill', [DashboardController::class, 'setDashboardPrefill']); + // Route::get('/data-unit-kerja', [DashboardController::class, 'dataUnitKerja']); + // Route::post('/dashboard/prefill', [DashboardController::class, 'setDashboardPrefill']); - Route::get('/select-pegawai', [AksesFileController::class, 'optionPegawai']); + // Route::get('/select-pegawai', [AksesFileController::class, 'optionPegawai']); Route::get('/select-unit-kerja-option', [AksesFileController::class, 'optionUnitKerja']); Route::middleware(['akses.master'])->group(function () { Route::resource('/akses', AksesFileController::class); @@ -42,8 +42,10 @@ Route::middleware(['auth'])->group(function(){ Route::get('/select-unit-kerja-mapping', [DashboardController::class, 'OptionUnitKerjaByMapping']); Route::get('/select-sub-unit-kerja/{id}', [DashboardController::class, 'optionSubUnitKerja']); Route::get('/select-sub-unit-kerja-mapping/{id}', [DashboardController::class, 'optionSubUnitKerjaByMapping']); + + Route::delete('/delete-file/{id}', [DashboardController::class, 'deleteFile']); - Route::get('/getFile/{id_unit_kerja}/{id_sub_unit_kerja}/{master_kategori_directory_id}', [DashboardController::class, 'getFile']); + // Route::get('/getFile/{id_unit_kerja}/{id_sub_unit_kerja}/{master_kategori_directory_id}', [DashboardController::class, 'getFile']); Route::post('/download-multiple', [DashboardController::class, 'downloadDataMultiple']); Route::post('/download-byfolder', [DashboardController::class, 'downloadDataFolder']); @@ -51,6 +53,7 @@ Route::middleware(['auth'])->group(function(){ Route::get('/log-activity', [LogActivityController::class, 'index']); Route::get('/datatable/log-activity', [LogActivityController::class, 'datatable']); Route::get('/datatable/log-activity/{fileDirectoryId}', [LogActivityController::class, 'detailByFile']); + Route::get('/datatable/log-activity-pengajuan', [LogActivityController::class, 'datatableHistoryPengajuan']); Route::get('/recap', [DashboardController::class, 'recapView']); Route::get('/data/recap', [DashboardController::class, 'recapData']); @@ -71,6 +74,8 @@ Route::middleware(['auth'])->group(function(){ // }); Route::get('/data/notifications', [DashboardController::class, 'notifkasiList']); Route::post('/data/notifications/read', [DashboardController::class, 'notifkasiMarkRead']); + + Route::get('/data/log-dokumen', [DashboardController::class, 'logDokumen']); }); Route::get('/login', [AuthController::class, 'index'])->name('login');