@extends('layouts.app') @php $pageTitle = 'Edit Employee'; $pageHeading = 'Employee Editor'; $pageDescription = 'Edit data employee sekaligus cek apakah template sidik jari sudah terdaftar di database biometrik.'; @endphp @section('content')

Edit employee dan cek registrasi sidik jari.

Halaman ini menggabungkan master data employee dengan status template fingerprint dari `iclock_biodata`, jadi kita bisa cepat lihat apakah user sudah punya template di device atau belum.

@if (session('status'))
Berhasil disimpan
{{ session('status') }}
@endif @if ($errors->any())
Beberapa input perlu diperbaiki
@endif

Edit Employee

{{ trim(($employee->first_name ?? '').' '.($employee->last_name ?? '')) ?: '-' }} - Emp Code {{ $employee->emp_code }}
@csrf @method('DELETE')
Kembali ke directory
@csrf @method('PUT')
@foreach ($editableFields as $field => $meta) @endforeach
Opsi update mesin
Gunakan tombol Simpan Database Saja jika perubahan hanya ingin disimpan ke MySQL. Gunakan tombol Simpan + Update Mesin jika ingin sekaligus membuat command ke device. User aktif akan memakai command DATA UPDATE USERINFO ..., sedangkan user nonaktif akan memakai DATA DELETE USERINFO ....
Preview target mesin
Memuat target mesin...

Fingerprint Registration

Total template sidik jari: @if ($fingerprints->count() > 0) {{ $fingerprints->count() }} template @else belum ada template @endif
Peta FID Sidik Jari
@foreach ($fingerMap as $fid => $fingerName) @php $existingTemplate = $fingerprints->first(fn ($fingerprint) => (int) ($fingerprint->bio_no ?? -1) === (int) $fid); $latestEnroll = $enrollHistory->first(fn ($history) => (int) ($history->fid ?? -1) === (int) $fid); $tileStyle = $existingTemplate ? 'background: rgba(45, 106, 79, 0.22); border: 1px solid rgba(45, 106, 79, 0.35); color: #d1fae5;' : 'background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); color: #eff6ff;'; @endphp
{{ $fid }}
{{ $fingerName }}
{{ $existingTemplate ? 'Sudah ada' : 'Kosong' }}
@if ($latestEnroll)
{{ $latestEnroll->result_label }}
@endif
@endforeach
Enroll Sidik Jari Baru
Pilih mesin target dan nomor FID, lalu queue command enroll sidik jari ke mesin. Status callback akan masuk ke history enroll di bawah.
@csrf
Ringkasan Callback
Sukses berarti template baru sudah benar-benar diterima dari mesin. Kalau masih Waiting Callback, command sudah di-queue tapi template baru belum masuk balik ke database.
@forelse ($fingerprints as $fingerprint) @empty @endforelse
Bio No Nama Jari Index Version Valid Device SN Preview Updated
{{ $fingerprint->bio_no ?? '-' }} {{ $fingerprint->finger_label ?? '-' }} {{ $fingerprint->bio_index ?? '-' }} {{ trim(($fingerprint->major_ver ?? '').' '.($fingerprint->minor_ver ?? '')) ?: '-' }} {{ (int) $fingerprint->valid === 1 ? 'Yes' : 'No' }} {{ $fingerprint->sn ?: '-' }} Download SVG {{ $fingerprint->update_time ?: '-' }}
Belum ada template sidik jari untuk employee ini.

Enroll Finger History

@forelse ($enrollHistory as $history) @empty @endforelse
ID Terminal FID Nama Jari Queued Status Callback
{{ $history->id }} {{ $history->terminal_alias ?: $history->terminal_sn }} {{ $history->fid }} {{ $history->finger_label }} {{ $history->commit_time ?: '-' }} {{ $history->result_label }} {{ $history->callback_time ?: $history->result_detail ?: '-' }}
Belum ada history enroll finger untuk employee ini.

Employee Snapshot

Emp Code{{ $employee->emp_code }}
Department{{ $employee->department_name ?: ($employee->department_id ?: '-') }}
Position{{ $employee->position_name ?: ($employee->position_id ?: '-') }}
Enroll SN{{ $employee->enroll_sn ?: '-' }}
Card Number{{ $employee->card_no ?: '-' }}
Verify Mode{{ $employee->verify_mode ?? '-' }}
Active{{ (int) $employee->is_active === 1 ? 'Yes' : 'No' }}
App Status{{ $employee->app_status ?? '-' }}

Command History

@forelse ($commandHistory as $command) @empty @endforelse
ID Terminal Command Queued Result
{{ $command->id }} {{ $command->terminal_alias ?: $command->terminal_sn }} {{ $command->content }} {{ $command->commit_time }} result_detail)) title="{{ $command->result_detail }}" @endif style="@if(($command->result_class ?? '') === 'success-operlog') background: rgba(14, 116, 144, 0.14); color: #0f5f73; border: 1px solid rgba(14, 116, 144, 0.22); @endif" > {{ $command->result_label ?? ($command->return_time ? (($command->return_value ?? '-') . ' @ ' . $command->return_time) : 'Pending') }} @if (($command->result_class ?? '') === 'success-operlog')
ACK source: OPERLOG
@elseif (!empty($command->result_detail))
{{ $command->result_detail }}
@endif
Belum ada history command sync untuk employee ini.
@endsection @push('scripts') @php $terminalPreviewPayload = $terminals->map(function ($terminal) { return [ 'id' => $terminal->id, 'sn' => $terminal->sn, 'alias' => $terminal->alias, 'status' => (int) $terminal->status, ]; })->values(); @endphp @endpush