@extends('layouts.backend') @section('title', 'Attendance API Integration') @section('content')

{{ __('Attendance API Integration') }}

{{ __('Back') }}
@include('partials.flash')
@if($latestPlainToken)
{{ __('New API Token (copy now):') }}
{{ $latestPlainToken }}
{{ __('This token will not be shown again.') }}
@endif @if($canManageAttendance)
{{ __('Create API Client') }}
@csrf
@endif
{{ __('Endpoint') }}
{{ __('POST /api/v1/attendance/logs/bulk') }}
{{ __('Headers') }}
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json
{{ __('Payload Example') }}
{
  "entries": [
    {
      "employee_code": "EMP0001",
      "attendance_date": "2026-03-01",
      "entry_type": "checkin",
      "entry_time": "09:01 AM",
      "remarks": "Device punch in"
    },
    {
      "employee_code": "EMP0001",
      "attendance_date": "2026-03-01",
      "entry_type": "checkout",
      "entry_time": "06:05 PM",
      "remarks": "Device punch out"
    }
  ]
}
{{ __('API Clients') }}
@forelse($apiClients as $client) @empty @endforelse
{{ __('Name') }} {{ __('Allowed IPs') }} {{ __('Status') }} {{ __('Last Used') }} {{ __('Action') }}
{{ $client->name }} {{ $client->allowed_ips ?: '-' }} {{ $client->is_active ? __('Active') : __('Disabled') }} {{ $client->last_used_at ? $client->last_used_at->format('Y-m-d H:i:s') : '-' }} @if($canManageAttendance)
@csrf @method('PATCH')
@else - @endif
{{ __('No API clients configured.') }}
@endsection