@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
@foreach ($errors->all() as $error)
{{ $error }}
@endforeach
@endif
Edit Employee
{{ trim(($employee->first_name ?? '').' '.($employee->last_name ?? '')) ?: '-' }} - Emp Code {{ $employee->emp_code }}
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.
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.
Bio No
Nama Jari
Index
Version
Valid
Device SN
Preview
Updated
@forelse ($fingerprints as $fingerprint)
{{ $fingerprint->bio_no ?? '-' }}
{{ $fingerprint->finger_label ?? '-' }}
{{ $fingerprint->bio_index ?? '-' }}
{{ trim(($fingerprint->major_ver ?? '').' '.($fingerprint->minor_ver ?? '')) ?: '-' }}
{{ (int) $fingerprint->valid === 1 ? 'Yes' : 'No' }}
{{ $fingerprint->sn ?: '-' }}
Preview
Download SVG
{{ $fingerprint->update_time ?: '-' }}
@empty
Belum ada template sidik jari untuk employee ini.
@endforelse
Enroll Finger History
ID
Terminal
FID
Nama Jari
Queued
Status
Callback
@forelse ($enrollHistory as $history)
{{ $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 ?: '-' }}
@empty
Belum ada history enroll finger untuk employee ini.
@endforelse
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
ID
Terminal
Command
Queued
Result
@forelse ($commandHistory as $command)
{{ $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
@empty
Belum ada history command sync untuk employee ini.
@endforelse
Preview Template Fingerprint
×
@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