Temukan Properti Impian Anda

Rumah, tanah, kos, dan berbagai properti pilihan terbaik dengan harga terjangkau dan lokasi strategis

Jelajahi Properti

Properti Pilihan

Memuat properti...

Tambah Properti

Masuk

Belum punya akun? Daftar di sini

Daftar

Sudah punya akun? Masuk di sini

Tentang TirShop

TirShop adalah platform properti terpercaya yang menghubungkan pembeli dan penjual properti di Indonesia. Kami menyediakan layanan jual beli rumah, tanah, kos, dan berbagai jenis properti lainnya.

Dengan teknologi terdepan dan tim yang berpengalaman, kami berkomitmen untuk memberikan pengalaman terbaik dalam mencari dan menjual properti impian Anda.

Mengapa Memilih TirShop?

  • βœ… Platform yang aman dan terpercaya
  • βœ… Ribuan pilihan properti berkualitas
  • βœ… Lokasi GPS dan peta interaktif
  • βœ… Integrasi WhatsApp langsung
  • βœ… Proses yang mudah dan cepat
  • βœ… Dukungan pelanggan 24/7
formatPrice(price) { if (price >= 1000000000) { return (price / 1000000000).toFixed(1) + ' Miliar'; } else if (price >= 1000000) { return (price / 1000000).toFixed(0) + ' Juta'; } else { return new Intl.NumberFormat('id-ID').format(price); } } function showAlert(message, type = 'success') { document.querySelectorAll('.alert').forEach(alert => alert.remove()); const alertDiv = document.createElement('div'); alertDiv.className = `alert alert-${type}`; alertDiv.textContent = message; document.body.appendChild(alertDiv); setTimeout(() => { alertDiv.remove(); }, 5000); } // API Functions async function apiCall(endpoint, options = {}) { const url = `${API_BASE_URL}/${endpoint}`; const defaultOptions = { headers: { 'Content-Type': 'application/json', } }; if (authToken) { defaultOptions.headers['Authorization'] = `Bearer ${authToken}`; } const response = await fetch(url, { ...defaultOptions, ...options }); const data = await response.json(); if (!response.ok) { throw new Error(data.message || 'Terjadi kesalahan'); } return data; } // Page Navigation function showPage(pageId) { document.querySelectorAll('.page').forEach(page => { page.classList.remove('active'); }); document.getElementById(pageId).classList.add('active'); currentPage = pageId; if (pageId === 'properties') { loadProperties(); } else if (pageId === 'add-property') { initAddPropertyPage(); } } // Property Detail Functions async function loadPropertyDetail(propertyId) { try { showLoadingDetail(); const response = await fetch(`${API_BASE_URL}/property_detail.php?id=${propertyId}`); const data = await response.json(); if (!data.success) { throw new Error(data.message); } currentPropertyDetail = data; renderPropertyDetail(data); initializeDetailMap(data.property); hideLoadingDetail(); } catch (error) { hideLoadingDetail(); showAlert('Gagal memuat detail properti: ' + error.message, 'error'); console.error('Error loading property detail:', error); } } function renderPropertyDetail(data) { const detailContent = document.getElementById('propertyDetailContent'); const property = data.property; // Create image gallery HTML let imageGalleryHtml = ''; if (data.images && data.images.length > 0) { imageGallery = data.images; imageGalleryHtml = `
${data.images[0].alt} ${data.images.length > 1 ? `
πŸ“Έ ${data.images.length} Foto
` : ''}
${data.images.length > 1 ? `
${data.images.map((img, index) => ` ${img.alt} `).join('')}
` : ''}
`; } else { imageGalleryHtml = `
🏠
Tidak ada foto tersedia
`; } // Create features HTML let featuresHtml = ''; const features = []; if (property.bedrooms) { features.push({ icon: 'πŸ›οΈ', label: 'Kamar Tidur', value: property.bedrooms }); } if (property.bathrooms) { features.push({ icon: '🚿', label: 'Kamar Mandi', value: property.bathrooms }); } if (property.area) { features.push({ icon: 'πŸ“', label: 'Luas', value: property.area + ' mΒ²' }); } if (features.length > 0) { featuresHtml = `
${features.map(feature => `
${feature.icon}
${feature.label}
${feature.value}
`).join('')}
`; } // Create nearby properties HTML let nearbyHtml = ''; if (data.nearby_properties && data.nearby_properties.length > 0) { nearbyHtml = `

Properti Serupa

${data.nearby_properties.map(prop => `
No Image'}" alt="${prop.title}" style="width: 100%; height: 100%; object-fit: cover;"> ${prop.is_vip ? '
⭐ VIP
' : ''}

${prop.title}

Rp ${prop.formatted_price}

`).join('')}
`; } // Main detail HTML detailContent.innerHTML = `
${imageGalleryHtml}

${property.title} ${property.is_vip ? '⭐ VIP' : ''}

${property.type.toUpperCase()}
${property.formatted_price}
${featuresHtml}

Deskripsi

${property.description}

πŸ“ Lokasi Properti

${property.latitude && property.longitude ? `

Koordinat: ${property.latitude.toFixed(6)}, ${property.longitude.toFixed(6)}

` : '

Lokasi tidak tersedia

'}
${data.statistics ? `

Statistik

${data.statistics.total_views}
Total Views
${data.statistics.unique_days_viewed}
Hari Dilihat
` : ''}

Hubungi Pemilik

Nama: ${data.owner.name}

Telepon: ${property.contact_number}

Diposting: ${property.created_date}

${nearbyHtml}
`; } function initializeDetailMap(property) { if (!property.latitude || !property.longitude) return; setTimeout(() => { const mapContainer = document.getElementById('propertyDetailMap'); if (!mapContainer) return; if (detailMap) { detailMap.remove(); } detailMap = L.map('propertyDetailMap').setView([property.latitude, property.longitude], 15); L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { attribution: 'Β© OpenStreetMap contributors' }).addTo(detailMap); const marker = L.marker([property.latitude, property.longitude]) .addTo(detailMap) .bindPopup(`${property.title}
Lokasi Properti`) .openPopup(); L.circle([property.latitude, property.longitude], { color: '#667eea', fillColor: '#667eea', fillOpacity: 0.1, radius: 500 }).addTo(detailMap); }, 100); } // Image Gallery Functions function changeMainImage(direction) { if (!imageGallery || imageGallery.length <= 1) return; currentImageIndex = (currentImageIndex + direction + imageGallery.length) % imageGallery.length; setMainImage(currentImageIndex); } function