/* Reset & Base Styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: ‘Segoe UI’, system-ui, -apple-system, sans-serif;
}
body {
background-color: #f8fafc;
color: #1e293b;
line-height: 1.6;
margin: 0 auto;
padding: 20px;
}
/* Modern Container */
.article-container {
background: white;
border-radius: 20px;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
overflow: hidden;
margin-bottom: 40px;
position: relative;
}
/* Header Styles */
.article-header {
background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
color: white;
padding: 60px 40px;
position: relative;
overflow: hidden;
}
.article-header::before {
content: ”;
position: absolute;
top: 0;
right: 0;
width: 300px;
height: 300px;
background: url(“data:image/svg+xml,%3Csvg xmlns=’http://www.w3.org/2000/svg’ viewBox=’0 0 100 100’%3E%3Cpath fill=’%23ffffff’ opacity=’0.05′ d=’M11,18c-4,8-4,14,0,22s12,12,22,8s19-17,17-28S41,6,31,9S15,10,11,18z’/%3E%3C/svg%3E”) no-repeat;
background-size: contain;
}
h1 {
font-size: 2.8rem;
font-weight: 800;
margin-bottom: 15px;
line-height: 1.2;
max-width: 800px;
}
.article-meta {
font-size: 1rem;
opacity: 0.9;
margin-top: 10px;
display: flex;
align-items: center;
}
.date-badge {
background: rgba(255, 255, 255, 0.2);
padding: 5px 15px;
border-radius: 20px;
font-size: 0.9rem;
margin-right: 15px;
}
/* Content Styles */
.article-content {
padding: 40px;
}
h2 {
color: #1e3c72;
font-size: 1.8rem;
margin: 40px 0 20px;
padding-bottom: 10px;
border-bottom: 3px solid #e2e8f0;
position: relative;
}
h2::after {
content: ”;
position: absolute;
bottom: -3px;
left: 0;
width: 80px;
height: 3px;
background: #3b82f6;
}
p {
margin-bottom: 20px;
font-size: 1.1rem;
}
/* Checklist Styles with FontAwesome */
.checklist-container {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
gap: 25px;
margin: 30px 0;
}
.checklist-card {
background: #f8fafc;
border-radius: 15px;
padding: 25px;
border-left: 5px solid #3b82f6;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
transition: transform 0.3s;
}
.checklist-card:hover {
transform: translateY(-5px);
}
.checklist-title {
color: #1e3c72;
font-size: 1.3rem;
margin-bottom: 15px;
display: flex;
align-items: center;
}
.checklist-title i {
margin-right: 10px;
color: #3b82f6;
}
.checklist-item {
display: flex;
align-items: flex-start;
margin-bottom: 12px;
padding-bottom: 12px;
border-bottom: 1px dashed #e2e8f0;
}
.checklist-item:last-child {
border-bottom: none;
margin-bottom: 0;
}
.checklist-checkbox {
width: 20px;
height: 20px;
margin-right: 12px;
margin-top: 2px;
flex-shrink: 0;
cursor: pointer;
transition: all 0.2s;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
}
.checklist-checkbox .fa-square {
color: #cbd5e1;
}
.checklist-checkbox .fa-square-check {
color: #3b82f6;
display: none;
}
.checklist-checkbox.checked .fa-square {
display: none;
}
.checklist-checkbox.checked .fa-square-check {
display: block;
}
.checklist-text {
flex: 1;
}
.checklist-note {
font-size: 0.85rem;
color: #64748b;
margin-top: 3px;
font-style: italic;
}
.checklist-urgent {
display: inline-block;
background: #fee2e2;
color: #991b1b;
font-size: 0.75rem;
padding: 2px 8px;
border-radius: 10px;
margin-left: 8px;
font-weight: 600;
}
/* CTA & Download Section */
.download-section {
background: linear-gradient(to right, #f0f9ff, #e0f2fe);
border-radius: 15px;
padding: 40px;
margin: 50px 0;
text-align: center;
border: 2px dashed #3b82f6;
}
.download-section h2 {
color: #1e3c72;
border: none;
text-align: center;
}
.download-section h2::after {
left: 50%;
transform: translateX(-50%);
}
.lead-form {
max-width: 600px;
margin: 30px auto;
}
.form-row {
display: flex;
gap: 15px;
margin-bottom: 20px;
}
.form-group {
margin-bottom: 20px;
flex: 1;
}
.form-group.full-width {
flex: 0 0 100%;
}
.form-group label {
display: block;
margin-bottom: 8px;
font-weight: 600;
color: #334155;
text-align: left;
}
.form-control {
width: 100%;
padding: 15px;
border: 2px solid #cbd5e1;
border-radius: 10px;
font-size: 1rem;
transition: all 0.3s;
}
.form-control:focus {
outline: none;
border-color: #3b82f6;
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}
.whatsapp-note {
font-size: 0.9rem;
color: #64748b;
margin-top: 5px;
display: flex;
align-items: center;
gap: 5px;
}
.whatsapp-note i {
color: #25D366;
}
.btn {
display: inline-block;
background: linear-gradient(to right, #1e3c72, #2a5298);
color: white;
padding: 16px 40px;
border: none;
border-radius: 10px;
font-size: 1.1rem;
font-weight: 600;
cursor: pointer;
transition: all 0.3s;
text-decoration: none;
box-shadow: 0 5px 15px rgba(30, 60, 114, 0.2);
}
.btn:hover {
transform: translateY(-3px);
box-shadow: 0 8px 20px rgba(30, 60, 114, 0.3);
}
.btn:active {
transform: translateY(0);
}
.btn-download {
background: linear-gradient(to right, #059669, #10b981);
margin-top: 20px;
}
.btn-download:hover {
box-shadow: 0 8px 20px rgba(5, 150, 105, 0.3);
}
.btn-whatsapp {
background: linear-gradient(to right, #25D366, #128C7E);
margin-left: 10px;
}
/* Success Message */
.success-message {
display: none;
background: #dcfce7;
border: 2px solid #86efac;
border-radius: 10px;
padding: 25px;
margin-top: 20px;
text-align: center;
}
.success-message h3 {
color: #166534;
margin-bottom: 10px;
}
/* Progress Bar */
.progress-container {
margin: 30px 0;
background: #e2e8f0;
border-radius: 10px;
height: 12px;
overflow: hidden;
}
.progress-bar {
height: 100%;
background: linear-gradient(to right, #3b82f6, #1d4ed8);
width: 0%;
transition: width 0.5s ease;
border-radius: 10px;
}
.progress-text {
text-align: center;
font-weight: 600;
color: #475569;
margin-top: 10px;
}
/* Loading Spinner */
.spinner {
display: none;
border: 3px solid #f3f3f3;
border-top: 3px solid #3b82f6;
border-radius: 50%;
width: 30px;
height: 30px;
animation: spin 1s linear infinite;
margin: 0 auto 20px;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* Google Apps Script Status */
.script-status {
display: none;
padding: 15px;
border-radius: 10px;
margin-top: 20px;
text-align: center;
}
.script-status.success {
background-color: #dcfce7;
border: 2px solid #86efac;
color: #166534;
}
.script-status.error {
background-color: #fee2e2;
border: 2px solid #fecaca;
color: #991b1b;
}
/* Responsive Design */
@media (max-width: 768px) {
body {
padding: 10px;
}
.article-header {
padding: 40px 20px;
}
h1 {
font-size: 2.2rem;
}
.article-content {
padding: 25px;
}
h2 {
font-size: 1.5rem;
}
.checklist-container {
grid-template-columns: 1fr;
}
.download-section {
padding: 30px 20px;
}
.form-row {
flex-direction: column;
gap: 0;
}
}
@media print {
.download-section, .btn, .article-footer {
display: none;
}
.article-container {
box-shadow: none;
}
}
Checklist Dokumen Pengajuan Visa Kerja Australia (PDF)
Download checklist lengkap untuk persiapan visa kerja Australia dengan timeline terencana. Update informasi 2026.
Checklist berikut mencakup semua dokumen yang diperlukan untuk pengajuan visa kerja Australia berdasarkan tipe visa yang Anda tuju. Gunakan checklist ini untuk memastikan tidak ada dokumen yang terlewat.
Checklist Dokumen Dasar (Wajib Semua Visa)
Dokumen-dokumen berikut harus disiapkan terlepas dari tipe visa kerja yang Anda ajukan.
Timeline Persiapan Dokumen (8-12 Minggu)
Download Checklist PDF (Email Capture)
Dapatkan checklist lengkap dalam format PDF yang bisa dicetak dan dilacak progressnya. Gratis!
Pilih tipe visa
Visa 189 – Skilled Independent
Visa 190 – Skilled Nominated
Visa 482 – Temporary Skill Shortage
Visa 462 – Work and Holiday
Belum menentukan
Preview Checklist PDF
Checklist PDF ini berisi:
- Daftar lengkap 18+ dokumen yang diperlukan
- Kolom checklist untuk menandai progress
- Timeline 12 minggu persiapan dokumen
- Catatan penting untuk setiap dokumen
- Ruang untuk mencatat tanggal penyelesaian
- Tips dari konsultan migrasi bersertifikat
document.addEventListener(‘DOMContentLoaded’, function() {
// Initialize jsPDF
const { jsPDF } = window.jspdf;
// Google Apps Script Web App URL – GANTI DENGAN URL ANDA SENDIRI
const GOOGLE_SCRIPT_URL = “https://script.google.com/macros/s/AKfycbyKoIEvss686JCikvlHCg502FBSlYeIoTZw5NsOTtQUYrFwARmujhlKzCkrgm7PJKow0g/exec”;
// Elements
const downloadBtn = document.getElementById(‘download-btn’);
const whatsappBtn = document.getElementById(‘whatsapp-btn’);
const successMessage = document.getElementById(‘success-message’);
const progressBar = document.getElementById(‘progressBar’);
const progressText = document.getElementById(‘progressText’);
const loadingSpinner = document.getElementById(‘loadingSpinner’);
const scriptStatus = document.getElementById(‘scriptStatus’);
// Track checked items
let checkedItems = new Set();
const totalItems = document.querySelectorAll(‘.checklist-checkbox’).length;
// Update progress function
function updateProgress() {
const percentage = Math.round((checkedItems.size / totalItems) * 100);
progressBar.style.width = `${percentage}%`;
progressText.textContent = `${percentage}% dokumen disiapkan`;
// Change color based on progress
if (percentage < 30) {
progressBar.style.background = 'linear-gradient(to right, #ef4444, #dc2626)';
} else if (percentage {
checkbox.addEventListener(‘click’, function() {
const id = this.getAttribute(‘data-id’);
if (checkedItems.has(id)) {
checkedItems.delete(id);
this.classList.remove(‘checked’);
} else {
checkedItems.add(id);
this.classList.add(‘checked’);
}
updateProgress();
saveCheckboxState();
});
});
// Send data to Google Apps Script
async function sendToGoogleScript(name, email, whatsapp, visaType) {
const formData = new FormData();
formData.append(‘timestamp’, new Date().toISOString());
formData.append(‘name’, name);
formData.append(’email’, email);
formData.append(‘whatsapp’, whatsapp || ”);
formData.append(‘visa_type’, visaType);
formData.append(‘progress’, `${checkedItems.size}/${totalItems}`);
formData.append(‘progress_percentage’, Math.round((checkedItems.size / totalItems) * 100));
formData.append(‘source’, ‘Checklist Visa Australia’);
formData.append(‘page_url’, window.location.href);
try {
const response = await fetch(GOOGLE_SCRIPT_URL, {
method: ‘POST’,
mode: ‘no-cors’, // Important for Google Apps Script
body: formData
});
// Since we use no-cors, we can’t read the response
// But we assume it succeeded
return { success: true, message: ‘Data berhasil dikirim ke Google Spreadsheet’ };
} catch (error) {
console.error(‘Error sending to Google Script:’, error);
return { success: false, message: ‘Gagal mengirim data ke spreadsheet’ };
}
}
// Generate PDF function with FontAwesome checkboxes
function generatePDF(name, email, whatsapp, visaType) {
const doc = new jsPDF();
// Add header
doc.setFillColor(30, 60, 114);
doc.rect(0, 0, 210, 40, ‘F’);
doc.setTextColor(255, 255, 255);
doc.setFontSize(24);
doc.setFont(‘helvetica’, ‘bold’);
doc.text(‘CHECKLIST DOKUMEN VISA AUSTRALIA’, 105, 20, { align: ‘center’ });
doc.setFontSize(10);
doc.text(`Dibuat untuk: ${name} | Visa: ${getVisaName(visaType)} | Tanggal: ${new Date().toLocaleDateString(‘id-ID’)}`, 105, 30, { align: ‘center’ });
// Reset color
doc.setTextColor(0, 0, 0);
// Add user info
doc.setFontSize(12);
doc.text(‘Informasi Pengguna:’, 15, 50);
doc.setFontSize(10);
doc.text(`Nama: ${name}`, 15, 58);
doc.text(`Email: ${email}`, 15, 64);
if (whatsapp) {
doc.text(`WhatsApp: ${whatsapp}`, 15, 70);
doc.text(`Tipe Visa: ${getVisaName(visaType)}`, 15, 76);
doc.text(`Progress: ${checkedItems.size}/${totalItems} dokumen siap`, 15, 82);
} else {
doc.text(`Tipe Visa: ${getVisaName(visaType)}`, 15, 70);
doc.text(`Progress: ${checkedItems.size}/${totalItems} dokumen siap`, 15, 76);
}
// Add checklist sections
let yPosition = whatsapp ? 90 : 85;
// Document checklist – Using simple box symbols
doc.setFontSize(14);
doc.setFont(‘helvetica’, ‘bold’);
doc.text(‘CHECKLIST DOKUMEN VISA KERJA AUSTRALIA’, 15, yPosition);
yPosition += 10;
doc.setFontSize(10);
doc.setFont(‘helvetica’, ‘normal’);
// Create table data with simple checkbox symbols
const tableData = [];
// Dokumen Identitas
tableData.push([
{ content: ‘DOKUMEN IDENTITAS’, colSpan: 2, styles: { fillColor: [241, 245, 249], fontStyle: ‘bold’ } }
]);
tableData.push([‘☐’, ‘Paspor asli – Minimal masa berlaku 6 bulan setelah rencana kepulangan’]);
tableData.push([‘☐’, ‘KTP asli – Kartu Tanda Penduduk yang masih berlaku’]);
tableData.push([‘☐’, ‘Kartu Keluarga – Untuk melengkapi data keluarga’]);
tableData.push([‘☐’, ‘Akte Kelahiran – Dokumen asli atau legalisir’]);
// Dokumen Pendidikan
tableData.push([
{ content: ‘DOKUMEN PENDIDIKAN’, colSpan: 2, styles: { fillColor: [241, 245, 249], fontStyle: ‘bold’ } }
]);
tableData.push([‘☐’, ‘Ijazah terakhir – Asli dan legalisir’]);
tableData.push([‘☐’, ‘Transkrip nilai – Diterjemahkan dan disahkan’]);
tableData.push([‘☐’, ‘Sertifikat keahlian – Jika memiliki sertifikasi profesional’]);
// Dokumen Pekerjaan
tableData.push([
{ content: ‘DOKUMEN PEKERJAAN’, colSpan: 2, styles: { fillColor: [241, 245, 249], fontStyle: ‘bold’ } }
]);
tableData.push([‘☐’, ‘CV/Résumé terbaru – Format Australia, maksimal 3 halaman’]);
tableData.push([‘☐’, ‘Surat referensi kerja – Dari perusahaan sebelumnya/sekarang’]);
tableData.push([‘☐’, ‘Slip gaji 3 bulan terakhir – Bukti penghasilan’]);
tableData.push([‘☐’, ‘Surat pengalaman kerja – Dari HRD perusahaan’]);
// Dokumen Bahasa Inggris
tableData.push([
{ content: ‘DOKUMEN BAHASA INGGRIS’, colSpan: 2, styles: { fillColor: [241, 245, 249], fontStyle: ‘bold’ } }
]);
tableData.push([‘☐’, ‘Sertifikat IELTS/PTE/TOEFL – Skor sesuai persyaratan visa’]);
tableData.push([‘☐’, ‘Bukti pendidikan berbahasa Inggris – Jika kuliah dalam bahasa Inggris’]);
// Dokumen Kesehatan & Keamanan
tableData.push([
{ content: ‘DOKUMEN KESEHATAN & KEAMANAN’, colSpan: 2, styles: { fillColor: [241, 245, 249], fontStyle: ‘bold’ } }
]);
tableData.push([‘☐’, ‘Medical check-up – Dari panel dokter yang ditunjuk’]);
tableData.push([‘☐’, ‘Police clearance certificate – Dari Polri dan negara tempat tinggal >12 bulan’]);
// Dokumen Pendukung Lainnya
tableData.push([
{ content: ‘DOKUMEN PENDUKUNG LAINNYA’, colSpan: 2, styles: { fillColor: [241, 245, 249], fontStyle: ‘bold’ } }
]);
tableData.push([‘☐’, ‘Foto paspor terbaru – 45mm x 35mm, latar belakang putih’]);
tableData.push([‘☐’, ‘Bukti asuransi kesehatan – OVHC untuk visa temporer’]);
tableData.push([‘☐’, ‘Bukti dana – Rekening bank 3 bulan terakhir’]);
// Create table
doc.autoTable({
startY: yPosition,
head: [[‘Check’, ‘Dokumen yang Diperlukan’]],
body: tableData,
theme: ‘grid’,
headStyles: { fillColor: [30, 60, 114], textColor: [255, 255, 255], fontStyle: ‘bold’ },
columnStyles: {
0: { cellWidth: 15, halign: ‘center’ },
1: { cellWidth: 165 }
},
margin: { left: 15, right: 15 },
styles: { font: ‘helvetica’, fontSize: 10 }
});
// Add timeline section
const finalY = doc.lastAutoTable.finalY + 15;
doc.setFontSize(14);
doc.setFont(‘helvetica’, ‘bold’);
doc.text(‘TIMELINE PERSIAPAN (8-12 MINGGU)’, 15, finalY);
const timelineData = [
[‘Minggu 1-4’, ‘Persiapan Awal’, ‘Verifikasi paspor, kumpulkan dokumen pendidikan, buat CV format Australia’],
[‘Minggu 5-8’, ‘Pengurusan Dokumen’, ‘Tes bahasa Inggris, skill assessment, medical check-up’],
[‘Minggu 9-12’, ‘Finalisasi’, ‘Police clearance, terjemahan bersertifikat, scan semua dokumen’]
];
doc.autoTable({
startY: finalY + 10,
head: [[‘Periode’, ‘Fase’, ‘Aktivitas’]],
body: timelineData,
theme: ‘grid’,
headStyles: { fillColor: [59, 130, 246], textColor: [255, 255, 255], fontStyle: ‘bold’ },
columnStyles: {
0: { cellWidth: 30 },
1: { cellWidth: 40 },
2: { cellWidth: 120 }
},
margin: { left: 15, right: 15 }
});
// Add notes section
const notesY = doc.lastAutoTable.finalY + 15;
doc.setFontSize(12);
doc.setFont(‘helvetica’, ‘bold’);
doc.text(‘CATATAN PENTING:’, 15, notesY);
doc.setFontSize(10);
doc.setFont(‘helvetica’, ‘normal’);
const notes = [
‘1. Semua dokumen non-bahasa Inggris harus diterjemahkan oleh penerjemah bersertifikat’,
‘2. Scan semua dokumen dalam format PDF dengan ukuran maksimal 5MB per file’,
‘3. Simpan salinan digital dan fisik semua dokumen’,
‘4. Periksa kembali persyaratan di website resmi Home Affairs Australia’,
‘5. Konsultasikan dengan agen migrasi bersertifikat jika diperlukan’
];
let noteY = notesY + 8;
notes.forEach(note => {
doc.text(note, 20, noteY);
noteY += 6;
});
// Add footer with updated text
const pageCount = doc.internal.getNumberOfPages();
for (let i = 1; i <= pageCount; i++) {
doc.setPage(i);
doc.setFontSize(8);
doc.setTextColor(100, 100, 100);
doc.text(`Checklist Dokumen Visa Australia – Halaman ${i} dari ${pageCount}`, 105, 290, { align: 'center' });
doc.text(`© 2026 – Starship Education 2026`, 105, 295, { align: 'center' });
}
// Save PDF
const fileName = `Checklist-Visa-Australia-${name.replace(/s+/g, '-')}.pdf`;
doc.save(fileName);
return fileName;
}
// Helper function to get visa name
function getVisaName(code) {
const visas = {
'189': 'Visa 189 – Skilled Independent',
'190': 'Visa 190 – Skilled Nominated',
'482': 'Visa 482 – Temporary Skill Shortage',
'462': 'Visa 462 – Work and Holiday',
'other': 'Belum menentukan'
};
return visas[code] || 'Visa Kerja Australia';
}
// Format WhatsApp number
function formatWhatsAppNumber(number) {
if (!number) return '';
// Remove non-digits
let cleaned = number.replace(/D/g, '');
// If starts with 0, convert to international format
if (cleaned.startsWith('0')) {
cleaned = '62' + cleaned.substring(1);
}
// If doesn't start with country code, add 62
if (!cleaned.startsWith('62')) {
cleaned = '62' + cleaned;
}
return cleaned;
}
// Download button click event
downloadBtn.addEventListener('click', async function() {
const name = document.getElementById('name').value;
const email = document.getElementById('email').value;
const whatsapp = document.getElementById('whatsapp').value;
const visaType = document.getElementById('visa-type').value;
const newsletter = document.getElementById('newsletter').checked;
// Validation
if (!name || !email || !visaType) {
alert('Harap lengkapi semua field yang wajib diisi (bertanda *).');
return;
}
// Email validation
const emailPattern = /^[^s@]+@[^s@]+.[^s@]+$/;
if (!emailPattern.test(email)) {
alert('Harap masukkan alamat email yang valid.');
return;
}
// Format WhatsApp number
const formattedWhatsApp = whatsapp ? formatWhatsAppNumber(whatsapp) : '';
// Show loading
loadingSpinner.style.display = 'block';
scriptStatus.style.display = 'none';
downloadBtn.disabled = true;
downloadBtn.innerHTML = ' Mengirim data…’;
try {
// Send data to Google Apps Script
const scriptResult = await sendToGoogleScript(name, email, formattedWhatsApp, visaType);
// Show script status
loadingSpinner.style.display = ‘none’;
scriptStatus.style.display = ‘block’;
if (scriptResult.success) {
scriptStatus.className = ‘script-status success’;
scriptStatus.innerHTML = ‘ Data berhasil dikirim ke spreadsheet’;
} else {
scriptStatus.className = ‘script-status error’;
scriptStatus.innerHTML = ‘ ‘ + scriptResult.message;
}
// Simulate lead capture
const leadData = {
name,
email,
whatsapp: formattedWhatsApp,
visaType,
newsletter,
date: new Date().toISOString(),
progress: checkedItems.size,
source: ‘Checklist Visa Australia’
};
console.log(‘Lead Data Captured:’, leadData);
// Generate and download PDF
const fileName = generatePDF(name, email, formattedWhatsApp, visaType);
// Show success message
successMessage.style.display = ‘block’;
downloadBtn.textContent = ‘✔ Checklist Terunduh’;
downloadBtn.style.background = ‘linear-gradient(to right, #059669, #10b981)’;
// Scroll to success message
successMessage.scrollIntoView({ behavior: ‘smooth’ });
// Save lead to localStorage (simulating database)
const leads = JSON.parse(localStorage.getItem(‘visaLeads’) || ‘[]’);
leads.push(leadData);
localStorage.setItem(‘visaLeads’, JSON.stringify(leads));
// Save download history
const downloads = JSON.parse(localStorage.getItem(‘visaChecklistDownloads’) || ‘[]’);
downloads.push(leadData);
localStorage.setItem(‘visaChecklistDownloads’, JSON.stringify(downloads));
// Show confirmation after delay
setTimeout(() => {
alert(`✅ Checklist “${fileName}” berhasil diunduh!nn📧 Data Anda telah tercatat di sistemnn📊 Total Leads: ${leads.length} orang`);
}, 1000);
} catch (error) {
// Handle errors
loadingSpinner.style.display = ‘none’;
scriptStatus.style.display = ‘block’;
scriptStatus.className = ‘script-status error’;
scriptStatus.innerHTML = ‘ Terjadi kesalahan saat mengirim data’;
downloadBtn.disabled = false;
downloadBtn.innerHTML = ‘ Coba Lagi Download PDF’;
console.error(‘Error in download process:’, error);
// Still generate PDF even if Google Script fails
generatePDF(name, email, formattedWhatsApp, visaType);
}
});
// WhatsApp button click event
whatsappBtn.addEventListener(‘click’, function() {
const whatsapp = document.getElementById(‘whatsapp’).value;
const name = document.getElementById(‘name’).value;
const visaType = document.getElementById(‘visa-type’).value;
if (!whatsapp) {
alert(‘Harap masukkan nomor WhatsApp untuk konsultasi.’);
document.getElementById(‘whatsapp’).focus();
return;
}
const formattedNumber = formatWhatsAppNumber(whatsapp);
const message = `Halo, saya ${name || ‘calon aplikant visa’}. Saya tertarik dengan visa Australia tipe ${getVisaName(visaType) || ‘umum’}. Bisa dibantu konsultasi?`;
const encodedMessage = encodeURIComponent(message);
window.open(`https://wa.me/${formattedNumber}?text=${encodedMessage}`, ‘_blank’);
});
// Save checkbox state to localStorage
function saveCheckboxState() {
const state = {};
document.querySelectorAll(‘.checklist-checkbox’).forEach(checkbox => {
const id = checkbox.getAttribute(‘data-id’);
state[id] = checkbox.classList.contains(‘checked’);
});
localStorage.setItem(‘visaChecklistState’, JSON.stringify(state));
}
// Load checkbox state from localStorage
function loadCheckboxState() {
const savedState = JSON.parse(localStorage.getItem(‘visaChecklistState’) || ‘{}’);
document.querySelectorAll(‘.checklist-checkbox’).forEach(checkbox => {
const id = checkbox.getAttribute(‘data-id’);
if (savedState[id]) {
checkbox.classList.add(‘checked’);
checkedItems.add(id);
}
});
updateProgress();
}
// Save state periodically
setInterval(saveCheckboxState, 2000);
// Load saved state on page load
loadCheckboxState();
// Display total leads count (for admin)
const leads = JSON.parse(localStorage.getItem(‘visaLeads’) || ‘[]’);
if (leads.length > 0) {
console.log(`Total Leads yang terkumpul: ${leads.length} orang`);
}
});
Australia
Inggris
USA
Canada
Singapore
Malaysia