@extends('layouts.app') @section('title', 'Pengaturan WhatsApp') @section('content')

Pengaturan / WhatsApp Notification

@if (session('success')) @endif @if (session('error')) @endif
Konfigurasi WhatsApp
{{ $setting->is_enabled ? 'Aktif' : 'Nonaktif' }}
@csrf
Get your API key from Fonnte Dashboard. Free 100 messages/month!
@error('api_key')
{{ $message }}
@enderror
Format: 628xxx (optional, untuk tracking purposes)
@error('sender')
{{ $message }}
@enderror
Nomor WhatsApp admin yang akan menerima notifikasi pengajuan cuti
@error('admin_phone')
{{ $message }}
@enderror

is_enabled ? 'checked' : '' }}>
Notifikasi Absensi
notify_checkin ? 'checked' : '' }}>
send_checkin_photo ? 'checked' : '' }}>
notify_checkout ? 'checked' : '' }}>
send_checkout_photo ? 'checked' : '' }}>
Notifikasi Cuti/Izin
notify_leave_request ? 'checked' : '' }}>
notify_leave_approved ? 'checked' : '' }}>
notify_leave_rejected ? 'checked' : '' }}>
Template Pesan
@csrf @if ($setting->is_enabled) @endif @if ($setting->notify_checkin) @endif @if ($setting->notify_checkout) @endif @if ($setting->send_checkin_photo) @endif @if ($setting->send_checkout_photo) @endif @if ($setting->notify_leave_request) @endif @if ($setting->notify_leave_approved) @endif @if ($setting->notify_leave_rejected) @endif
Template Absensi
Variabel tersedia: {name}, {time}, {status}, {location}
@error('checkin_template')
{{ $message }}
@enderror
Variabel tersedia: {name}, {time}, {duration}, {location}
@error('checkout_template')
{{ $message }}
@enderror
Template Cuti/Izin
Variabel tersedia: {employee_name}, {employee_nip} (Kode Karyawan), {leave_type}, {start_date}, {end_date}, {total_days}, {reason}
@error('leave_request_template')
{{ $message }}
@enderror
Variabel tersedia: {employee_name}, {leave_type}, {start_date}, {end_date}, {total_days}, {approved_by}, {approved_at}
@error('leave_approved_template')
{{ $message }}
@enderror
Variabel tersedia: {employee_name}, {leave_type}, {start_date}, {end_date}, {total_days}, {rejection_reason}, {approved_by}
@error('leave_rejected_template')
{{ $message }}
@enderror
Status Sistem
WhatsApp Notification
{{ $setting->is_enabled ? 'Aktif' : 'Nonaktif' }}

Provider: Fonnte
API Key: {{ $setting->api_key ? '••••••••' . substr($setting->api_key, -4) : 'Belum diset' }}
Check-in Notification: {{ $setting->notify_checkin ? 'Ya' : 'Tidak' }}
Check-out Notification: {{ $setting->notify_checkout ? 'Ya' : 'Tidak' }}
Setup Guide
  1. Daftar di fonnte.com
  2. Verifikasi akun Anda via email
  3. Login ke dashboard Fonnte
  4. Scan QR Code WhatsApp di halaman dashboard
  5. Copy API Key dari dashboard
  6. Paste API Key di field "Fonnte API Key" di atas
  7. Klik tombol "Test" untuk verifikasi koneksi
  8. Aktifkan toggle "Aktifkan Notifikasi WhatsApp"
  9. Klik "Simpan Pengaturan"
Paket Gratis:
100 pesan per bulan • Unlimited devices
Tips: Pastikan nomor WhatsApp Anda sudah terverifikasi dan aktif di Fonnte sebelum mengirim pesan.
Variabel Template

Gunakan variabel berikut dalam template pesan:

Absensi
Check-in:
  • {name} - Nama karyawan
  • {time} - Waktu check-in
  • {status} - Status (Hadir/Terlambat)
  • {location} - Lokasi check-in
Check-out:
  • {name} - Nama karyawan
  • {time} - Waktu check-out
  • {duration} - Durasi kerja
  • {location} - Lokasi check-out
Cuti/Izin
Pengajuan (ke Admin):
  • {employee_name} - Nama karyawan
  • {employee_nip} - Kode Karyawan
  • {leave_type} - Jenis (Cuti/Izin/Sakit)
  • {start_date} - Tanggal mulai
  • {end_date} - Tanggal selesai
  • {total_days} - Total hari
  • {reason} - Alasan
Disetujui (ke Karyawan):
  • {employee_name} - Nama karyawan
  • {leave_type} - Jenis
  • {start_date} - Tanggal mulai
  • {end_date} - Tanggal selesai
  • {total_days} - Total hari
  • {approved_by} - Disetujui oleh
  • {approved_at} - Tanggal approval
Ditolak (ke Karyawan):
  • {employee_name} - Nama karyawan
  • {leave_type} - Jenis
  • {start_date} - Tanggal mulai
  • {end_date} - Tanggal selesai
  • {total_days} - Total hari
  • {rejection_reason} - Alasan ditolak
  • {approved_by} - Ditolak oleh
@endsection @push('scripts') @endpush