@extends('layouts.app') @section('content') @php $expiryState = $credential->expiryState(); $actionLabels = [ 'create' => 'Tambah', 'update' => 'Ubah', 'delete' => 'Hapus (Trash)', 'restore' => 'Pulihkan', 'purge' => 'Hapus permanen', 'reveal' => 'Tampilkan password', 'import' => 'Impor', ]; $fieldLabels = [ 'category_id' => 'Kategori', 'sbu' => 'SBU', 'legacy_no' => 'No. lama', 'asset_name' => 'Nama aset', 'label' => 'Label', 'username' => 'Username', 'ip_address' => 'IP address', 'ip_public' => 'IP public', 'host' => 'Host', 'url' => 'URL/domain', 'contact_email' => 'Email', 'expired_at' => 'Tanggal expired', 'notes' => 'Catatan', 'is_active' => 'Status', 'owner_user_id' => 'Pemilik', ]; @endphp
{{ $credential->category?->name ?? 'Kredensial' }}

{{ $credential->asset_name }}

{{ $credential->label ?: 'Tanpa label' }} @if ($credential->sbu) · SBU {{ $credential->sbu }} @endif @if ($credential->legacy_no) · No. lama {{ $credential->legacy_no }} @endif @if ($credential->is_active) Aktif @else Nonaktif @endif @if ($expiryState === 'expired') Kedaluwarsa {{ $credential->expired_at->format('d-m-Y') }} @elseif ($expiryState === 'soon') Akan kedaluwarsa {{ $credential->expired_at->format('d-m-Y') }} @elseif ($expiryState === 'ok') Expired {{ $credential->expired_at->format('d-m-Y') }} @endif
Kembali Ubah @if (auth()->user()->is_admin || $credential->created_by === auth()->id())
@csrf @method('DELETE')
@endif

Informasi

@php $info = [ 'Username' => $credential->username, 'SBU' => $credential->sbu, 'Label / pemilik' => $credential->label, 'Email kontak' => $credential->contact_email, 'IP address' => $credential->ip_address, 'IP public' => $credential->ip_public, 'Host / koneksi' => $credential->host, 'URL / domain' => $credential->url, 'Pemilik data' => $credential->owner?->name, 'Tanggal expired' => $credential->expired_at?->format('d-m-Y'), 'Dibuat' => $credential->created_at?->format('d-m-Y H:i'), 'Terakhir diubah' => $credential->updated_at?->format('d-m-Y H:i'), ]; @endphp @foreach ($info as $label => $value)
{{ $label }} {{ $value ?: '—' }}
@endforeach
Catatan

{{ $credential->notes ?: '—' }}

Rahasia

Password akun
••••••••
@if ($credential->hasPassword()) @else Belum disimpan @endif
Terakhir diubah: {{ $credential->password_updated_at?->format('d-m-Y H:i') ?? 'belum pernah' }}
Management password
••••••••
@if ($credential->hasManagementPassword()) @else Belum disimpan @endif
Password panel administrasi perangkat.

Setiap aksi tampil/salin meminta konfirmasi password login Anda dan tercatat di audit log. Nilai disembunyikan otomatis setelah 30 detik.

Riwayat password

Nilai password lama tidak pernah ditampilkan.

@forelse ($histories as $history)
{{ $history->field === 'management_password' ? 'Management password' : 'Password' }}
Diganti {{ $history->changed_at?->format('d-m-Y H:i') }} · {{ $history->changer?->name ?? 'sistem' }}
@empty

Belum ada riwayat penggantian password.

@endforelse

Aktivitas terakhir

@forelse ($recentAudits as $audit) @php $changed = []; if ($audit->action === 'update' && is_array($audit->before_json) && is_array($audit->after_json)) { foreach ($audit->after_json as $key => $newValue) { if (in_array($key, ['category', 'owner', 'has_password', 'has_management_password'], true)) { continue; } if (($audit->before_json[$key] ?? null) !== $newValue) { $changed[] = $fieldLabels[$key] ?? $key; } } if (($audit->before_json['has_password'] ?? false) !== ($audit->after_json['has_password'] ?? false)) { $changed[] = 'Password'; } if (($audit->before_json['has_management_password'] ?? false) !== ($audit->after_json['has_management_password'] ?? false)) { $changed[] = 'Management password'; } } @endphp
{{ $actionLabels[$audit->action] ?? $audit->action }} · {{ $audit->user?->name ?? 'sistem' }} · {{ $audit->created_at?->format('d-m-Y H:i') }} @if ($changed !== [])
Field: {{ implode(', ', $changed) }}
@elseif ($audit->action === 'reveal')
Field: {{ $audit->after_json['field'] ?? 'password' }}
@endif
@empty

Belum ada aktivitas tercatat.

@endforelse

Konfirmasi password login

Masukkan password akun aplikasi Anda untuk membuka nilai rahasia.

@endsection