@media (max-width: 768px) .visa-support-container padding: 15px;
.form-group label display: block; margin-bottom: 8px; font-weight: 600; color: #333; hotel visa hua hin
.visa-header text-align: center; color: white; margin-bottom: 30px; @media (max-width: 768px)
const handleSubmit = async (e) => e.preventDefault(); setLoading(true); setMessage(null); try // Generate visa letter const response = await fetch('/api/generate-visa-letter', method: 'POST', headers: 'Content-Type': 'application/json' , body: JSON.stringify(formData) ); const data = await response.json(); if (data.success) // Send to email await fetch(`/api/send-visa-letter/$data.request_id`, method: 'POST', headers: 'Content-Type': 'application/json' , body: JSON.stringify( email: formData.guest_email ) ); setMessage( type: 'success', text: 'Visa support letter generated and sent to guest email!' ); // Reset form setFormData( hotel_id: '', guest_name: '', passport_number: '', nationality: '', check_in_date: '', check_out_date: '', room_type: '', guest_email: '' ); catch (error) setMessage( type: 'error', text: 'Failed to generate visa letter. Please try again.' ); finally setLoading(false); ; .form-group label display: block
// Fetch hotel details const hotel = await db.query( 'SELECT * FROM hua_hin_hotels WHERE id = ?', [hotel_id] );
// Save request to database const result = await db.query( `INSERT INTO hotel_visa_requests (hotel_id, guest_name, guest_passport_number, guest_nationality, check_in_date, check_out_date, room_type, visa_letter_status, letter_file_path) VALUES (?, ?, ?, ?, ?, ?, ?, 'generated', ?)`, [hotel_id, guest_name, passport_number, nationality, check_in_date, check_out_date, room_type, pdfPath] );