-
Interior
-
Exterior
-
Kitchen
-
Bedroom
-
Living Area
-
Parking
-
Anchor
-
Maps
+
+ None
+ Interior
+ Exterior
+ Kitchen
+ Bedroom
+ Living Area
+ Parking
+ Anchor
+ Maps
diff --git a/force-app/main/default/lwc/propertyTemplateSelector/propertyTemplateSelector.html.backup b/force-app/main/default/lwc/propertyTemplateSelector/propertyTemplateSelector.html.backup
deleted file mode 100644
index 1b8d415..0000000
--- a/force-app/main/default/lwc/propertyTemplateSelector/propertyTemplateSelector.html.backup
+++ /dev/null
@@ -1,1192 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
2
-
Property & Analysis
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
START FROM SCRATCH
-
Create your own custom property presentation with complete creative freedom and unlimited
- possibilities for unique branding.
-
-
-
FULLY CUSTOMIZABLE
-
Design every element from scratch. Perfect for unique branding, creative layouts, and
- personalized property showcases with your own design vision.
-
- CREATE NOW
-
-
-
-
-
-
- ✓
- Selected
-
-
-
-
-
-
-
-
-
-
-
-
MODERN HOME
-
Premium Location
-
$1,300,000
-
-
-
-
-
-
- 🏠 4 Beds
- 🛁 3 Baths
- 📏 2,500 sq ft
-
-
-
About this Property
-
Modern design with clean layout, contemporary styling &
- premium amenities for sophisticated living. Features open concept design with
- high-end finishes.
-
-
-
- 🏡
- Modern
-
-
- ✨
- Premium
-
-
- 🌿
- Eco-Friendly
-
-
-
-
-
-
-
- ✓
- Selected
-
-
-
-
-
-
-
-
-
-
-
Page 1: Hero Section
-
Luxury villa with stunning visuals, premium presentation, and
- elegant design elements showcasing the finest architectural details
-
-
-
Page 2: Specifications
-
Detailed specs & amenities grid with comprehensive property
- details, floor plans, and premium features for discerning buyers
-
-
-
Page 3: Location & Info
-
Nearby places, transportation options, prestigious schools,
- shopping districts, and additional details for complete lifestyle overview
-
-
-
Premium Features
-
Smart home technology, advanced security systems, luxury
- amenities, premium finishes, and exclusive lifestyle features
-
-
-
Investment Value
-
Premium location with high appreciation potential, rental
- income opportunities, and exclusive market positioning
-
-
-
-
-
- 🏰
- Luxury Villa
-
-
- 📄
- 3 Pages
-
-
- 💎
- Premium
-
-
-
-
-
-
-
- ✓
- Selected
-
-
-
-
-
-
-
-
-
-
-
Serene Living
-
Peaceful retreat with modern amenities, tranquil surroundings,
- and harmonious design elements creating perfect balance
-
- 🌿
- 🏡
- ✨
-
-
-
-
Modern Comfort
-
Beautiful surroundings & tranquility with contemporary design,
- premium materials, thoughtful layouts, and smart home integration
-
-
-
Location Benefits
-
Prime location with easy access to amenities, nature trails,
- shopping centers, excellent schools, and healthcare facilities
-
-
-
Lifestyle Features
-
Private gardens, outdoor entertainment areas, wellness spaces,
- and community amenities for complete lifestyle satisfaction
-
-
-
-
-
-
- ✓
- Selected
-
-
-
-
-
-
-
-
-
-
-
🏢 Urban Design
-
🤖 Smart Tech
-
🌆 City Center
-
🚇 Metro Access
-
-
-
Modern urban residence with smart technology integration and
- contemporary architecture for sophisticated city living
-
Convenient lifestyle in the heart of the city with premium
- amenities, concierge services, and exclusive access
-
-
-
Urban Benefits
-
Walking distance to shopping, dining, entertainment venues,
- public transport, business districts, and cultural attractions
-
-
-
Exquisite Interiors
-
Beautifully designed living spaces with premium finishes,
- smart home systems, luxury amenities, and panoramic city views
-
-
-
Investment Potential
-
High-demand urban location with strong rental yields, capital
- appreciation, and premium market positioning
-
-
-
-
-
- 🏢
- Urban
-
-
- 📄
- 3 Pages
-
-
- 🚀
- Modern
-
-
-
-
-
-
-
- ✓
- Selected
-
-
-
-
-
-
-
-
- Next Step
- →
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Select Your Property
-
Choose the property you want to create a brochure for
-
-
-
-
- Loading properties...
-
-
-
-
- Property:
-
- -- Select a Property --
-
-
- {property.Name} - {property.pcrm__Property_Type__c} -
- {property.pcrm__City_Bayut_Dubizzle__c}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Property Details Preview
-
-
-
-
-
-
-
-
Basic Information
-
-
- Property Name:
- {propertyData.propertyName}
-
-
- Property Type:
- {propertyData.propertyType}
-
-
- Status:
- {propertyData.status}
-
-
- Reference Number:
- {propertyData.referenceNumber}
-
-
-
-
-
-
-
-
-
-
-
-
-
Specifications
-
-
- Bedrooms:
- {propertyData.bedrooms}
-
-
- Bathrooms:
- {propertyData.bathrooms}
-
-
- Floor:
- {propertyData.floor}
-
-
- Size:
- {propertyData.size} {propertyData.sizeUnit}
-
-
- Build Year:
- {propertyData.buildYear}
-
-
-
-
-
-
-
Pricing Information
-
-
- Rent Price (Min):
- {propertyData.rentPriceMin}
-
-
- Rent Price (Max):
- {propertyData.rentPriceMax}
-
-
- Sale Price (Min):
- {propertyData.salePriceMin}
-
-
- Sale Price (Max):
- {propertyData.salePriceMax}
-
-
-
-
-
-
-
-
-
-
-
Property Description
-
-
- Property Title:
- {propertyData.titleEnglish}
-
-
-
Full Description:
-
{propertyData.descriptionEnglish}
-
-
-
-
-
-
-
-
-
-
Location Details
-
-
- City:
- {propertyData.city}
-
-
- Community:
- {propertyData.community}
-
-
- Sub Community:
- {propertyData.subCommunity}
-
-
- Locality:
- {propertyData.locality}
-
-
- Tower:
- {propertyData.tower}
-
-
- Unit Number:
- {propertyData.unitNumber}
-
-
-
-
-
-
-
Amenities & Features
-
-
- Parking Spaces:
- {propertyData.parkingSpaces}
-
-
- Furnished:
- {propertyData.furnished}
-
-
- Offering Type:
- {propertyData.offeringType}
-
-
-
-
-
-
-
Availability
-
-
- Available From:
- {propertyData.rentAvailableFrom}
-
-
- Available To:
- {propertyData.rentAvailableTo}
-
-
-
-
-
-
-
-
-
-
-
-
-
- Cancel
- Save Template
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
{template.name}
-
- {template.formattedDate}
- {template.pageSize}
-
-
{template.thumbnail}
-
-
- 🗑️
-
-
-
-
-
-
-
-
No saved templates found.
-
Create and save a template to see it here.
-
-
-
-
- Cancel
-
-
-
-
-
-
-
-
-
-
- Close
- Copy to Clipboard
- Download HTML
-
-
-
-
-
-
-
-
-
-
Property Images by Category
-
Review and select images for your brochure by category
-
-
-
-
- Interior
-
-
- Exterior
-
-
- Kitchen
-
-
- Bedroom
-
-
- Living Area
-
-
- Parking
-
-
- Anchor
-
-
- Maps
-
-
-
-
-
-
-
-
-
-
{currentImage.title}
-
{currentImage.category}
-
-
-
-
-
-
No images found for {selectedCategory}
-
-
-
-
-
-
-
- ←
-
-
- {displayImageIndex} of {totalImages}
-
-
- →
-
-
-
-
-
-
-
-
-
- Previous
-
-
- Next Step
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {htmlContent}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Interior
- Exterior
- Kitchen
- Bedroom
- Living
- Area
- Parking
- Anchor
- Maps
-
-
-
-
-
-
-
-
{currentImage.title}
-
{currentImage.category}
-
-
-
-
-
No images found for {selectedCategory}
-
-
-
-
-
-
-
- ← Previous
-
-
- {currentImageIndex} of {totalImages}
-
-
- Next →
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Property Images
-
-
- Upload from Device
-
-
-
-
-
-
-
- Interior
- Exterior
- Kitchen
- Bedroom
- Living Area
- Parking
- Anchor
- Maps
-
-
-
-
-
-
-
-
-
{image.title}
-
{image.category}
-
-
-
-
-
-
-
-
-
-
-
-
📁
-
-
Choose Image File
-
Click to browse or drag and drop
-
Supports: JPG, PNG, GIF, WebP
-
-
-
-
-
-
-
-
Use This Image
-
-
-
-
-
-
-
- Cancel
-
-
-
-
-
-
-
-
-
-
- Cancel
- Insert Table
-
-
-
-
-
\ No newline at end of file
diff --git a/force-app/main/default/lwc/propertyTemplateSelector/propertyTemplateSelector.js b/force-app/main/default/lwc/propertyTemplateSelector/propertyTemplateSelector.js
index 2c96f18..d3afbeb 100644
--- a/force-app/main/default/lwc/propertyTemplateSelector/propertyTemplateSelector.js
+++ b/force-app/main/default/lwc/propertyTemplateSelector/propertyTemplateSelector.js
@@ -38,7 +38,7 @@ export default class PropertyTemplateSelector extends LightningElement {
// Image review properties
@track showImageReview = false;
- @track selectedCategory = 'Interior';
+ @track selectedCategory = 'Interior'; // Will be updated when images load
@track currentImageIndex = 0;
@track totalImages = 0;
@track currentImage = null;
@@ -85,10 +85,23 @@ export default class PropertyTemplateSelector extends LightningElement {
@track showImageReplacement = false;
@track selectedImageElement = null;
@track replacementActiveTab = 'property'; // 'property' or 'upload'
- @track replacementSelectedCategory = 'Interior';
+ @track replacementSelectedCategory = 'Interior'; // Will be updated when images load
@track filteredReplacementImages = [];
@track uploadedImagePreview = null;
+ // Triple click detection for image replacement
+ @track imageClickCount = 0;
+ @track lastClickedImage = null;
+ @track clickTimeout = null;
+
+ // Undo/Redo functionality
+ @track undoStack = [];
+ @track redoStack = [];
+ @track maxUndoSteps = 20;
+
+ // Category selection tracking
+ @track initialCategorySelected = false;
+
// Template Save/Load Variables
@track showSaveDialog = false;
@track showLoadDialog = false;
@@ -103,6 +116,12 @@ export default class PropertyTemplateSelector extends LightningElement {
@track tableCols = 3;
@track includeHeader = true;
+ // Table Drag and Drop Variables
+ @track isDraggingTable = false;
+ @track draggedTableData = null;
+ @track selectorMode = false;
+ @track selectedElement = null;
+
// Undo functionality
@track undoStack = [];
@track redoStack = [];
@@ -480,6 +499,8 @@ export default class PropertyTemplateSelector extends LightningElement {
nextStep() {
if (this.currentStep < 3) {
this.currentStep++;
+ // Reset click tracking when changing steps
+ this.resetImageClickTracking();
// If moving to step 3, automatically load the template
if (this.currentStep === 3) {
this.loadTemplateInStep3();
@@ -491,6 +512,8 @@ export default class PropertyTemplateSelector extends LightningElement {
previousStep() {
if (this.currentStep > 1) {
this.currentStep--;
+ // Reset click tracking when changing steps
+ this.resetImageClickTracking();
this.scrollToTop();
}
}
@@ -498,6 +521,8 @@ export default class PropertyTemplateSelector extends LightningElement {
goToStep(event) {
const step = parseInt(event.currentTarget.dataset.step);
this.currentStep = step;
+ // Reset click tracking when changing steps
+ this.resetImageClickTracking();
// If going directly to step 3, load the template
if (this.currentStep === 3) {
this.loadTemplateInStep3();
@@ -514,15 +539,31 @@ export default class PropertyTemplateSelector extends LightningElement {
}
// Load template content into step 3 enhanced editor
- loadTemplateInStep3() {
+ async loadTemplateInStep3() {
if (this.selectedTemplateId && this.selectedPropertyId) {
try {
+ console.log('=== LOADING TEMPLATE IN STEP 3 ===');
+ console.log('Template ID:', this.selectedTemplateId);
+ console.log('Property ID:', this.selectedPropertyId);
+ console.log('Property data available:', !!this.propertyData);
+ console.log('Real property images available:', this.realPropertyImages?.length || 0);
+
+ // Ensure property images are loaded before creating template
+ if (this.realPropertyImages.length === 0) {
+ console.log('No property images loaded, loading them now...');
+ await this.loadPropertyImages();
+ }
+
const templateHTML = this.createTemplateHTML();
- console.log('Loading template into step 3:', this.selectedTemplateId);
console.log('Template HTML length:', templateHTML.length);
+ console.log('Template HTML preview:', templateHTML.substring(0, 500) + '...');
+
+ // Replace any hardcoded background-image URLs with property images
+ const processedTemplateHTML = this.replaceBackgroundImagesInHTML(templateHTML);
+ console.log('Processed template HTML length:', processedTemplateHTML.length);
// Set the HTML content for the template binding
- this.htmlContent = templateHTML;
+ this.htmlContent = processedTemplateHTML;
// Also find the enhanced editor content and load the template
const editorContent = this.template.querySelector('.enhanced-editor-content');
@@ -532,7 +573,7 @@ export default class PropertyTemplateSelector extends LightningElement {
// Create a temporary container to parse the HTML
const tempDiv = document.createElement('div');
- tempDiv.innerHTML = templateHTML;
+ tempDiv.innerHTML = processedTemplateHTML;
// Append the parsed content to the editor
while (tempDiv.firstChild) {
@@ -541,80 +582,22 @@ export default class PropertyTemplateSelector extends LightningElement {
console.log('Template loaded successfully into enhanced editor');
- // Add edit icons to ALL images (simple solution)
+ // Update any remaining CSS background-image rules
setTimeout(() => {
- const previewFrame = this.template.querySelector('.enhanced-editor-content');
- if (previewFrame) {
- const images = previewFrame.querySelectorAll('img');
- console.log(`Found ${images.length} images to add edit icons to`);
-
- images.forEach((img, index) => {
- // Skip if already has edit button
- if (img.closest('.template-image-container')) {
- console.log(`Image ${index + 1} already has edit button, skipping`);
- return;
- }
-
- console.log(`Adding edit button to image ${index + 1}:`, img.src);
-
- // Create edit button
- const editBtn = document.createElement('button');
- editBtn.className = 'template-image-edit-btn';
- editBtn.innerHTML = '✏️';
- editBtn.title = 'Edit Image';
- editBtn.style.position = 'absolute';
- editBtn.style.top = '5px';
- editBtn.style.right = '5px';
- editBtn.style.background = 'rgba(0, 123, 255, 0.9)';
- editBtn.style.border = 'none';
- editBtn.style.borderRadius = '50%';
- editBtn.style.width = '30px';
- editBtn.style.height = '30px';
- editBtn.style.cursor = 'pointer';
- editBtn.style.fontSize = '14px';
- editBtn.style.zIndex = '1001';
- editBtn.style.display = 'flex';
- editBtn.style.alignItems = 'center';
- editBtn.style.justifyContent = 'center';
- editBtn.style.transition = 'all 0.3s ease';
- editBtn.style.boxShadow = '0 2px 6px rgba(0, 0, 0, 0.2)';
-
- // Create container
- const container = document.createElement('div');
- container.className = 'template-image-container';
- container.style.position = 'relative';
- container.style.display = 'inline-block';
- container.style.width = '100%';
- container.style.height = '100%';
-
- // Replace image with container
- img.parentNode.insertBefore(container, img);
- container.appendChild(img);
- container.appendChild(editBtn);
-
- // Add hover effects
- editBtn.addEventListener('mouseenter', () => {
- editBtn.style.background = 'rgba(0, 123, 255, 1)';
- editBtn.style.transform = 'scale(1.1)';
- });
-
- editBtn.addEventListener('mouseleave', () => {
- editBtn.style.background = 'rgba(0, 123, 255, 0.9)';
- editBtn.style.transform = 'scale(1)';
- });
-
- // Add click handler with custom popup
- editBtn.addEventListener('click', (e) => {
- e.stopPropagation();
- this.showCustomImageEditModal(img);
- });
-
- console.log(`Successfully added edit button to image ${index + 1}`);
- });
-
- console.log(`Successfully processed ${images.length} images`);
- }
- }, 1000);
+ this.updateCSSBackgroundImages();
+ }, 200);
+
+ // Make images draggable and resizable
+ setTimeout(() => {
+ this.makeImagesDraggableAndResizable();
+ }, 300);
+
+ // Save initial state for undo functionality
+ setTimeout(() => {
+ this.saveUndoState();
+ }, 100);
+
+ // Images are now displayed without edit icons for clean presentation
// Set initial page size class and data attribute
this.updatePreviewFrameSize(this.selectedPageSize);
@@ -839,6 +822,7 @@ export default class PropertyTemplateSelector extends LightningElement {
async loadPropertyImages() {
if (!this.selectedPropertyId) {
this.realPropertyImages = [];
+ this.initialCategorySelected = false; // Reset flag when no property selected
return;
}
@@ -849,15 +833,35 @@ export default class PropertyTemplateSelector extends LightningElement {
const images = await getPropertyImages({ propertyId: this.selectedPropertyId });
console.log('Loaded images:', images);
- // Group images by category
- this.realPropertyImages = images;
+ // Transform the data to match expected format
+ this.realPropertyImages = images.map(img => ({
+ id: img.id,
+ name: img.name,
+ title: img.name,
+ category: img.category,
+ url: img.url
+ }));
console.log('Real property images loaded:', this.realPropertyImages);
if (this.realPropertyImages && this.realPropertyImages.length > 0) {
- const firstCategory = this.realPropertyImages[0].category;
- console.log('Auto-selecting first available category:', firstCategory);
- this.selectCategory(firstCategory);
+ // Find the first category that has images
+ const firstAvailableCategory = this.findFirstAvailableCategory();
+ console.log('Loading images, auto-selecting first available category:', firstAvailableCategory);
+ this.filterImagesByCategory(firstAvailableCategory);
+ this.selectedCategory = firstAvailableCategory;
+ this.initialCategorySelected = true;
+
+ // Update active button visually
+ setTimeout(() => {
+ const categoryButtons = this.template.querySelectorAll('.category-btn-step2');
+ categoryButtons.forEach(btn => {
+ btn.classList.remove('active');
+ if (btn.dataset.category === firstAvailableCategory) {
+ btn.classList.add('active');
+ }
+ });
+ }, 100);
}
} catch (error) {
@@ -965,7 +969,20 @@ export default class PropertyTemplateSelector extends LightningElement {
} catch (error) {
console.error('=== PDF GENERATION ERROR ===');
console.error('Error generating PDF:', error);
- this.showError('PDF generation failed: ' + error.message);
+
+ // Provide more user-friendly error messages
+ let errorMessage = 'PDF generation failed. ';
+ if (error.message && error.message.includes('timeout')) {
+ errorMessage += 'The service is taking longer than expected. Please try again.';
+ } else if (error.message && error.message.includes('unavailable')) {
+ errorMessage += 'The service is temporarily unavailable. Please try again in a few minutes.';
+ } else if (error.message && error.message.includes('connection')) {
+ errorMessage += 'Please check your internet connection and try again.';
+ } else {
+ errorMessage += error.message || 'Please try again.';
+ }
+
+ this.showError(errorMessage);
} finally {
// Reset loading state
this.isGeneratingPdf = false;
@@ -1061,15 +1078,49 @@ export default class PropertyTemplateSelector extends LightningElement {
console.log('Final HTML content to send:', htmlContent);
console.log('Final HTML content length:', htmlContent.length, 'characters');
- // Update progress message
- this.showProgress('Wait, our AI is generating report...');
+ // Update progress message with timeout information
+ this.showProgress('Wait, our AI is generating report... (This may take up to 2 minutes)');
+
+ // Start progress timer
+ const startTime = Date.now();
+ const progressInterval = setInterval(() => {
+ const elapsed = Math.floor((Date.now() - startTime) / 1000);
+ const minutes = Math.floor(elapsed / 60);
+ const seconds = elapsed % 60;
+ this.showProgress(`Generating PDF... (${minutes}:${seconds.toString().padStart(2, '0')} elapsed)`);
+ }, 1000);
// Call the Apex method with the complete HTML and page size
- const base64PDF = await generatePDFFromHTML({
+ // Set timeout to 2 minutes (120000ms) for API response
+ const base64PDF = await Promise.race([
+ generatePDFFromHTML({
htmlContent: htmlContent,
pageSize: this.selectedPageSize
+ }),
+ new Promise((_, reject) =>
+ setTimeout(() => reject(new Error('PDF generation timeout - service took too long to respond')), 120000)
+ )
+ ]).catch(error => {
+ // Clear progress timer
+ clearInterval(progressInterval);
+ console.error('Apex method error:', error);
+ console.error('Error details:', error.body?.message || error.message);
+
+ // Provide more specific error messages
+ if (error.message && error.message.includes('timeout')) {
+ throw new Error('PDF generation timed out. The service is taking longer than expected. Please try again.');
+ } else if (error.message && error.message.includes('unavailable')) {
+ throw new Error('PDF generation service is temporarily unavailable. Please try again in a few minutes.');
+ } else if (error.body && error.body.message) {
+ throw new Error(`PDF generation failed: ${error.body.message}`);
+ } else {
+ throw new Error('PDF generation failed. Please check your internet connection and try again.');
+ }
});
+ // Clear progress timer on success
+ clearInterval(progressInterval);
+
if (base64PDF) {
console.log('PDF generated successfully via Apex proxy');
console.log('PDF base64 length:', base64PDF.length, 'characters');
@@ -1346,6 +1397,8 @@ export default class PropertyTemplateSelector extends LightningElement {
console.log('=== CREATE TEMPLATE HTML DEBUG ===');
console.log('this.selectedTemplateId:', this.selectedTemplateId);
console.log('typeof this.selectedTemplateId:', typeof this.selectedTemplateId);
+ console.log('this.propertyData:', this.propertyData);
+ console.log('this.realPropertyImages:', this.realPropertyImages);
switch (this.selectedTemplateId) {
case 'blank-template':
@@ -1391,36 +1444,86 @@ export default class PropertyTemplateSelector extends LightningElement {
}
}
+ // Generate amenities HTML from property data
+ generateAmenitiesHTML(data) {
+ const amenities = [];
+
+ // Check for common amenity fields in the property data
+ const amenityFields = [
+ 'amenities', 'features', 'facilities', 'amenitiesList', 'propertyAmenities',
+ 'Amenities__c', 'Features__c', 'Facilities__c', 'Property_Amenities__c',
+ // Add the actual fields that are available in propertyData
+ 'parkingSpaces', 'furnished', 'offeringType'
+ ];
+
+ // Try to find amenities in various field formats
+ for (const field of amenityFields) {
+ if (data[field] && data[field] !== 'N/A') {
+ if (Array.isArray(data[field])) {
+ amenities.push(...data[field]);
+ } else if (typeof data[field] === 'string') {
+ // For specific fields, format them properly
+ if (field === 'parkingSpaces') {
+ amenities.push(`Parking: ${data[field]} spaces`);
+ } else if (field === 'furnished') {
+ amenities.push(`Furnished: ${data[field]}`);
+ } else if (field === 'offeringType') {
+ amenities.push(`Offering Type: ${data[field]}`);
+ } else {
+ // Split by common delimiters for other fields
+ const amenityList = data[field].split(/[,;|\n]/).map(a => a.trim()).filter(a => a);
+ amenities.push(...amenityList);
+ }
+ }
+ }
+ }
+
+ // If no amenities found, return empty string
+ if (amenities.length === 0) {
+ return '
';
+ }
+
+ // Generate HTML for amenities
+ return amenities.map(amenity =>
+ `
${amenity}
`
+ ).join('');
+ }
+
// Template methods
createBlankTemplate() {
const data = this.propertyData || {};
- const propertyName = data.propertyName || "Property Name";
- const location = data.location || "Location";
- const price = data.price || "Price";
- const bedrooms = data.bedrooms || "N/A";
- const bathrooms = data.bathrooms || "N/A";
- const size = data.size || "N/A";
+ const propertyName = data.Name || data.propertyName || "Property Name";
+ const location = data.Address__c || data.location || "Location";
+ const price = data.Price__c || data.price || "Price";
+ const bedrooms = data.Bedrooms__c || data.bedrooms || "N/A";
+ const bathrooms = data.Bathrooms__c || data.bathrooms || "N/A";
+ const size = data.Square_Feet__c || data.size || "N/A";
const sizeUnit = data.sizeUnit || "sq ft";
- const status = data.status || "Available";
- const propertyType = data.propertyType || "Property Type";
- const city = data.city || "City";
- const community = data.community || "Community";
- const subCommunity = data.subCommunity || "Sub Community";
- const furnished = data.furnished || "N/A";
- const parkingSpaces = data.parkingSpaces || "N/A";
- const buildYear = data.buildYear || "N/A";
- const titleEnglish = data.titleEnglish || "Property Title";
- const descriptionEnglish = data.descriptionEnglish || "Property Description";
- const rentPriceMin = data.rentPriceMin || "N/A";
- const salePriceMin = data.salePriceMin || "N/A";
+ const status = data.Status__c || data.status || "Available";
+ const propertyType = data.Property_Type__c || data.propertyType || "Property Type";
+ const city = data.City__c || data.city || "City";
+ const community = data.Community__c || data.community || "Community";
+ const subCommunity = data.Sub_Community__c || data.subCommunity || "Sub Community";
+ const furnished = data.Furnished__c || data.furnished || "N/A";
+ const parkingSpaces = data.Parking_Spaces__c || data.parkingSpaces || "N/A";
+ const buildYear = data.Build_Year__c || data.buildYear || "N/A";
+ const titleEnglish = data.Title_English__c || data.titleEnglish || "Property Title";
+ const descriptionEnglish = data.Description_English__c || data.descriptionEnglish || "Property Description";
+ const rentPriceMin = data.Rent_Price_Min__c || data.rentPriceMin || "N/A";
+ const salePriceMin = data.Sale_Price_Min__c || data.salePriceMin || "N/A";
return `
-
-
${propertyName}
-
${location}
-
${price}
+
+
+
+
+
${propertyName}
+
${location}
+
${price}
+
@@ -1496,13 +1599,21 @@ export default class PropertyTemplateSelector extends LightningElement {
-
Description
-
-
Title: ${titleEnglish}
+
Property Description
+
+
${titleEnglish}
-
+
${descriptionEnglish}
+
+
+
Property Type: ${propertyType}
+
Status: ${status}
+
Furnished: ${furnished}
+
Build Year: ${buildYear}
+
+
@@ -1516,6 +1627,14 @@ export default class PropertyTemplateSelector extends LightningElement {
+
+
+
Property Gallery
+
+ ${this.generatePropertyGalleryHTML()}
+
+
+
Custom Content Area
@@ -1531,37 +1650,113 @@ export default class PropertyTemplateSelector extends LightningElement {
}
createShiftTemplate() {
- const data = this.propertyData || {};
- const propertyName = data.propertyName || "SHIFT PROPERTY";
- const location = data.location || "Modern Living";
- const price = data.price || "Starting from $1,500,000";
- const referenceId = data.referenceNumber || "SP-2025-001";
+ console.log('=== CREATE SHIFT TEMPLATE CALLED ===');
+ console.log('Property data:', this.propertyData);
+ console.log('Real property images:', this.realPropertyImages);
- return `
Shift Property - Modern Living About Shift Property Experience the future of living with Shift Property, where innovation meets comfort in perfect harmony.
Contact Information Reference ID: ${referenceId}
Agent: ${data.agentName || "Innovation Specialist"}
Phone: ${data.agentPhone || "(555) 789-0123"}
`;
+ const data = this.propertyData || {};
+ const propertyName = data.Name || data.propertyName || "SHIFT PROPERTY";
+ const location = data.Address__c || data.location || "Modern Living";
+ const price = data.Price__c || data.price || "Starting from $1,500,000";
+ const referenceId = data.Reference_Number__c || data.referenceNumber || "SP-2025-001";
+ const bedrooms = data.Bedrooms__c || data.bedrooms || "N/A";
+ const bathrooms = data.Bathrooms__c || data.bathrooms || "N/A";
+ const size = data.Square_Feet__c || data.size || "N/A";
+ const propertyType = data.Property_Type__c || data.propertyType || "Property Type";
+ const description = data.Description_English__c || data.descriptionEnglish || "Modern living at its finest.";
+
+ // Get smart images - use direct method for exterior
+ const exteriorImage = this.getExteriorImageUrl();
+ const interiorImage = this.getSmartImageForSection('interior', 'https://images.unsplash.com/photo-1616486338812-3dadae4b4ace?ixlib=rb-4.0.3&q=85&fm=jpg&crop=entropy&cs=srgb&w=1200');
+ const kitchenImage = this.getSmartImageForSection('kitchen', 'https://images.unsplash.com/photo-1556909114-f6e7ad7d3136?ixlib=rb-4.0.3&q=85&fm=jpg&crop=entropy&cs=srgb&w=1200');
+
+ // Debug logging
+ console.log('=== SHIFT TEMPLATE DEBUG ===');
+ console.log('Exterior image URL:', exteriorImage);
+ console.log('Interior image URL:', interiorImage);
+ console.log('Kitchen image URL:', kitchenImage);
+
+ // Generate property gallery for uncategorized images
+ const propertyGallery = this.generatePropertyGalleryHTML();
+
+ return `
Shift Property - Modern Living EXTERIOR IMAGE TEST: ${exteriorImage}
About Shift Property Experience the future of living with Shift Property, where innovation meets comfort in perfect harmony.
Contact Information Reference ID: ${referenceId}
Agent: ${data.agentName || "Innovation Specialist"}
Phone: ${data.agentPhone || "(555) 789-0123"}
${propertyGallery}
`;
}
createSaintbartsTemplate() {
const data = this.propertyData || {};
- const propertyName = data.propertyName || "SAINT BARTS VILLA";
- const location = data.location || "Caribbean Paradise";
- const price = data.price || "Starting from $3,200,000";
- const referenceId = data.referenceNumber || "SB-2025-001";
+ const propertyName = data.Name || data.propertyName || "SAINT BARTS VILLA";
+ const location = data.Address__c || data.location || "Caribbean Paradise";
+ const price = data.Price__c || data.price || "Starting from $3,200,000";
+ const referenceId = data.Reference_Number__c || data.referenceNumber || "SB-2025-001";
+ const bedrooms = data.Bedrooms__c || data.bedrooms || "N/A";
+ const bathrooms = data.Bathrooms__c || data.bathrooms || "N/A";
+ const size = data.Square_Feet__c || data.size || "N/A";
+ const propertyType = data.Property_Type__c || data.propertyType || "Property Type";
+ const description = data.Description_English__c || data.descriptionEnglish || "Caribbean paradise awaits.";
- return `
Saint Barts Villa - Caribbean Paradise About Saint Barts Villa Discover paradise at Saint Barts Villa, where tropical luxury meets Caribbean charm in an idyllic setting.
Contact Information Reference ID: ${referenceId}
Agent: ${data.agentName || "Caribbean Specialist"}
Phone: ${data.agentPhone || "(555) 456-7890"}
`;
+ // Get smart images - use direct method for exterior
+ const exteriorImage = this.getExteriorImageUrl();
+ const interiorImage = this.getSmartImageForSection('interior', 'https://images.unsplash.com/photo-1616486338812-3dadae4b4ace?ixlib=rb-4.0.3&q=85&fm=jpg&crop=entropy&cs=srgb&w=1200');
+ const bedroomImage = this.getSmartImageForSection('bedroom', 'https://images.unsplash.com/photo-1586023492125-27b2c045efd7?ixlib=rb-4.0.3&q=85&fm=jpg&crop=entropy&cs=srgb&w=1200');
+
+ // Generate property gallery for uncategorized images
+ const propertyGallery = this.generatePropertyGalleryHTML();
+
+ return `
Saint Barts Villa - Caribbean Paradise About Saint Barts Villa Discover paradise at Saint Barts Villa, where tropical luxury meets Caribbean charm in an idyllic setting.
Contact Information Reference ID: ${referenceId}
Agent: ${data.agentName || "Caribbean Specialist"}
Phone: ${data.agentPhone || "(555) 456-7890"}
${propertyGallery}
`;
}
createLearnoyTemplate() {
const data = this.propertyData || {};
- const propertyName = data.propertyName || "LEARNOY ESTATE";
- const location = data.location || "Heritage Collection";
- const price = data.price || "Starting from $2,800,000";
- const referenceId = data.referenceNumber || "LE-2025-001";
+ const propertyName = data.Name || data.propertyName || "Property Name";
+ const location = data.Address__c || data.location || "Location";
+ const price = data.Price__c || data.price || "Price";
+ const bedrooms = data.Bedrooms__c || data.bedrooms || "N/A";
+ const bathrooms = data.Bathrooms__c || data.bathrooms || "N/A";
+ const size = data.Square_Feet__c || data.size || "N/A";
+ const propertyType = data.Property_Type__c || data.propertyType || "N/A";
+ const description = data.Description_English__c || data.descriptionEnglish || "Property description not available.";
+ const referenceId = data.Reference_Number__c || data.referenceNumber || "N/A";
- return `
Learnoy Estate - Heritage Collection About Learnoy Estate Experience timeless elegance at Learnoy Estate, where heritage meets modern luxury in perfect harmony.
Contact Information Reference ID: ${referenceId}
Agent: ${data.agentName || "Heritage Specialist"}
Phone: ${data.agentPhone || "(555) 321-6540"}
`;
+ // Get smart images - use direct method for exterior
+ const exteriorImage = this.getExteriorImageUrl();
+ const interiorImage = this.getSmartImageForSection('interior', 'https://images.unsplash.com/photo-1616486338812-3dadae4b4ace?ixlib=rb-4.0.3&q=85&fm=jpg&crop=entropy&cs=srgb&w=1200');
+ const livingImage = this.getSmartImageForSection('living', 'https://images.unsplash.com/photo-1586023492125-27b2c045efd7?ixlib=rb-4.0.3&q=85&fm=jpg&crop=entropy&cs=srgb&w=1200');
+
+ // Generate property gallery for uncategorized images
+ const propertyGallery = this.generatePropertyGalleryHTML();
+
+ // Generate amenities from property data
+ const amenitiesHTML = this.generateAmenitiesHTML(data);
+
+ return `
Learnoy Estate - Heritage Collection About ${propertyName} ${description}
Property Type: ${propertyType}
Bedrooms: ${bedrooms}
Bathrooms: ${bathrooms}
Size: ${size} sq ft
Status: ${data.Status__c || data.status || "N/A"}
Year Built: ${data.Build_Year__c || data.yearBuilt || "N/A"}
Furnished: ${data.Furnished__c || data.furnished || "N/A"}
Parking: ${data.Parking_Spaces__c || data.parking || "N/A"}
Property Features ${amenitiesHTML}
Contact Information Reference ID: ${data.Reference_Number__c || data.referenceNumber || "N/A"}
Agent: ${data.Agent_Name__c || data.agentName || "N/A"}
Phone: ${data.Agent_Phone__c || data.agentPhone || "N/A"}
Email: ${data.Agent_Email__c || data.agentEmail || "N/A"}
Property Gallery ${propertyGallery}
`;
}
createLeafampTemplate() {
- return `
Urban Properties Urban Properties Template The City Living Experience
`;
+ const data = this.propertyData || {};
+ const propertyName = data.Name || data.propertyName || "LEAFAMP URBAN";
+ const location = data.Address__c || data.location || "City Living Experience";
+ const price = data.Price__c || data.price || "Starting from $1,200,000";
+ const referenceId = data.Reference_Number__c || data.referenceNumber || "LF-2025-001";
+ const bedrooms = data.Bedrooms__c || data.bedrooms || "N/A";
+ const bathrooms = data.Bathrooms__c || data.bathrooms || "N/A";
+ const size = data.Square_Feet__c || data.size || "N/A";
+ const propertyType = data.Property_Type__c || data.propertyType || "Property Type";
+ const description = data.Description_English__c || data.descriptionEnglish || "City living experience.";
+
+ // Get smart images - use direct method for exterior
+ const exteriorImage = this.getExteriorImageUrl();
+ const interiorImage = this.getSmartImageForSection('interior', 'https://images.unsplash.com/photo-1616486338812-3dadae4b4ace?ixlib=rb-4.0.3&q=85&fm=jpg&crop=entropy&cs=srgb&w=1200');
+ const bathroomImage = this.getSmartImageForSection('bathroom', 'https://images.unsplash.com/photo-1584622650111-993a426fbf0a?ixlib=rb-4.0.3&q=85&fm=jpg&crop=entropy&cs=srgb&w=1200');
+ const mapsImage = this.getMapsImageUrl();
+
+ // Debug logging for maps image
+ console.log('=== LEAFAMP TEMPLATE MAPS DEBUG ===');
+ console.log('Maps image URL:', mapsImage);
+
+ // Generate property gallery for uncategorized images
+ const propertyGallery = this.generatePropertyGalleryHTML();
+
+ return `
Leafamp Urban - City Living Experience About Leafamp Urban Experience the pulse of city life at Leafamp Urban, where modern design meets urban convenience in the heart of the metropolis.
Floor Plan & Location Discover the strategic location and layout of Leafamp Urban, perfectly positioned for modern urban living with easy access to all city amenities.
MAPS IMAGE TEST: ${mapsImage}
Contact Information Reference ID: ${referenceId}
Agent: ${data.agentName || "Urban Specialist"}
Phone: ${data.agentPhone || "(555) 987-6543"}
${propertyGallery}
`;
}
createCoreshiftTemplate() {
@@ -1572,100 +1767,129 @@ export default class PropertyTemplateSelector extends LightningElement {
console.log("=== CREATING REAL ESTATE MODERN HOME TEMPLATE ===");
const data = this.propertyData || {};
- const propertyName = data.propertyName || "Property Name";
- const propertyType = data.propertyType || "Property Type";
- const location = data.location || "Location";
- const price = data.price || "Price on Request";
- const bedrooms = data.bedrooms || "N/A";
- const bathrooms = data.bathrooms || "N/A";
- const area = data.area || "N/A";
- const description = data.description || "This beautiful property offers exceptional value and modern amenities. Located in a prime area, it represents an excellent investment opportunity.";
+ const propertyName = data.Name || data.propertyName || "Property Name";
+ const propertyType = data.Property_Type__c || data.propertyType || "Property Type";
+ const location = data.Address__c || data.location || "Location";
+ const price = data.Price__c || data.price || "Price on Request";
+ const bedrooms = data.Bedrooms__c || data.bedrooms || "N/A";
+ const bathrooms = data.Bathrooms__c || data.bathrooms || "N/A";
+ const area = data.Square_Feet__c || data.area || "N/A";
+ const description = data.Description_English__c || data.description || "This beautiful property offers exceptional value and modern amenities. Located in a prime area, it represents an excellent investment opportunity.";
+ const referenceId = data.Reference_Number__c || data.referenceNumber || "N/A";
- return `
Property Brochure ${propertyName} ${location}
${price}
${bedrooms} Beds ${bathrooms} Baths ${area} sq. ft.
Description ${data.descriptionEnglish || data.description || "This beautiful property offers exceptional value and modern amenities. Located in a prime area, it represents an excellent investment opportunity."}
Specifications Status: ${data.status || "Available"}
Type: ${propertyType}
Floor: ${data.floor || "2 Levels"}
Parking: ${data.parking || "3-Car Garage"}
Year Built: ${data.yearBuilt || "2023"}
Furnishing: ${data.furnishing || "Partially Furnished"}
Maintenance Fee: ${data.maintenanceFee || "$1,200 / month"}
Service Charge: ${data.serviceCharge || "Included"}
Amenities & Features Infinity Pool
Private Home Theater
Gourmet Chef's Kitchen
Wine Cellar
Smart Home Automation
Spa & Sauna Room
Landscaped Gardens
Outdoor Fire Pit
Location & Nearby Landmarks: ${data.nearbyLandmarks || "Nearby Landmarks"}
Transportation: ${data.transportation || "Public Transport"}
Schools: ${data.schools || "5 min drive"}
Hospitals: ${data.hospitals || "12 min drive"}
Shopping: ${data.shoppingCenters || "10 min drive"}
Airport: ${data.airportDistance || "20 min drive"}
City: ${data.cityBayut || data.cityPropertyfinder || "City"}
Community: ${data.communityBayut || "Community"}
Sub Community: ${data.subCommunityBayut || "Sub Community"}
Locality: ${data.localityBayut || "Locality"}
Sub Locality: ${data.subLocalityBayut || "Sub Locality"}
Tower: ${data.towerBayut || "Tower"}
Beach Distance: ${data.beachDistance || "Beach Distance"}
Metro Distance: ${data.metroDistance || "Metro Distance"}
Country Club: ${data.countryClub || "Country Club"}
Additional Information Pet Friendly: ${data.petFriendly || "Pet Friendly Status"}
Smoking: ${data.smokingAllowed || "Smoking Allowed"}
Available From: ${data.availableFrom || "Available From Date"}
Minimum Contract: ${data.minimumContract || "Minimum Contract Duration"}
Security Deposit: ${data.securityDeposit || "Security Deposit"}
`;
+ // Contact information
+ const agentName = data.contactName || data.Agent_Name__c || data.agentName || "N/A";
+ const agentPhone = data.contactPhone || data.Agent_Phone__c || data.agentPhone || "N/A";
+ const agentEmail = data.contactEmail || data.Agent_Email__c || data.agentEmail || "N/A";
+
+ // Get smart images
+ const exteriorImage = this.getExteriorImageUrl();
+ const interiorImage = this.getSmartImageForSection('interior', 'https://images.unsplash.com/photo-1616486338812-3dadae4b4ace?ixlib=rb-4.0.3&q=85&fm=jpg&crop=entropy&cs=srgb&w=1200');
+ const kitchenImage = this.getSmartImageForSection('kitchen', 'https://images.unsplash.com/photo-1556909114-f6e7ad7d3136?ixlib=rb-4.0.3&q=85&fm=jpg&crop=entropy&cs=srgb&w=1200');
+
+ // Generate property gallery
+ const propertyGallery = this.generatePropertyGalleryHTML();
+
+ // Generate amenities from property data
+ const amenitiesHTML = this.generateAmenitiesHTML(data);
+
+ return `
Property Brochure ${propertyName} ${location}
${price}
${bedrooms} Beds ${bathrooms} Baths ${area} sq. ft.
Description ${data.descriptionEnglish || data.description || "This beautiful property offers exceptional value and modern amenities. Located in a prime area, it represents an excellent investment opportunity."}
Specifications Status: ${data.status || "Available"}
Type: ${propertyType}
Floor: ${data.Floor__c || data.floor || "N/A"}
Parking: ${data.Parking_Spaces__c || data.parking || "N/A"}
Year Built: ${data.Build_Year__c || data.yearBuilt || "N/A"}
Furnishing: ${data.Furnished__c || data.furnishing || "N/A"}
Maintenance Fee: ${data.Maintenance_Fee__c || data.maintenanceFee || "N/A"}
Service Charge: ${data.Service_Charge__c || data.serviceCharge || "N/A"}
Amenities & Features ${amenitiesHTML}
Location & Nearby Landmarks: ${data.Landmarks__c || data.nearbyLandmarks || "N/A"}
Transportation: ${data.Transportation__c || data.transportation || "N/A"}
Schools: ${data.Schools__c || data.schools || "N/A"}
Hospitals: ${data.Hospitals__c || data.hospitals || "N/A"}
Shopping: ${data.Shopping_Centers__c || data.shoppingCenters || "N/A"}
Airport: ${data.Airport_Distance__c || data.airportDistance || "N/A"}
City: ${data.City__c || data.cityBayut || data.cityPropertyfinder || "N/A"}
Community: ${data.Community__c || data.communityBayut || "N/A"}
Sub Community: ${data.Sub_Community__c || data.subCommunityBayut || "N/A"}
Locality: ${data.Locality__c || data.localityBayut || "N/A"}
Sub Locality: ${data.Sub_Locality__c || data.subLocalityBayut || "N/A"}
Tower: ${data.Tower__c || data.towerBayut || "N/A"}
Beach Distance: ${data.Beach_Distance__c || data.beachDistance || "N/A"}
Metro Distance: ${data.Metro_Distance__c || data.metroDistance || "N/A"}
Country Club: ${data.Country_Club__c || data.countryClub || "N/A"}
Additional Information Pet Friendly: ${data.petFriendly || "Pet Friendly Status"}
Smoking: ${data.smokingAllowed || "Smoking Allowed"}
Available From: ${data.availableFrom || "Available From Date"}
Minimum Contract: ${data.minimumContract || "Minimum Contract Duration"}
Security Deposit: ${data.securityDeposit || "Security Deposit"}
Property Gallery ${propertyGallery}
`;
}
createAsgar1Template() {
const data = this.propertyData || {};
// Basic property information
- const propertyName = data.propertyName || "The Grand Oak Villa";
- const location = data.location || "123 Luxury Lane, Prestige City, PC 45678";
- const price = data.price || "$4,500,000";
- const referenceId = data.referenceNumber || "GV-2025-001";
- const bedrooms = data.bedrooms || "5";
- const bathrooms = data.bathrooms || "6";
- const area = data.area || "6,200";
- const squareFeet = data.area || "6,200";
+ const propertyName = data.Name || data.propertyName || "Property Name";
+ const location = data.Address__c || data.location || "Location";
+ const price = data.Price__c || data.price || "Price";
+ const referenceId = data.Reference_Number__c || data.referenceNumber || "N/A";
+ const bedrooms = data.Bedrooms__c || data.bedrooms || "N/A";
+ const bathrooms = data.Bathrooms__c || data.bathrooms || "N/A";
+ const area = data.Square_Feet__c || data.area || "N/A";
+ const squareFeet = data.Square_Feet__c || data.area || "N/A";
const sizeUnit = data.sizeUnit || "sq ft";
+ const propertyType = data.Property_Type__c || data.propertyType || "N/A";
+ const description = data.Description_English__c || data.description || "Property description not available.";
+
+ // Get smart images
+ const exteriorImage = this.getExteriorImageUrl();
+ const interiorImage = this.getSmartImageForSection('interior', 'https://images.unsplash.com/photo-1616486338812-3dadae4b4ace?ixlib=rb-4.0.3&q=85&fm=jpg&crop=entropy&cs=srgb&w=1200');
+ const bedroomImage = this.getSmartImageForSection('bedroom', 'https://images.unsplash.com/photo-1586023492125-27b2c045efd7?ixlib=rb-4.0.3&q=85&fm=jpg&crop=entropy&cs=srgb&w=1200');
+
+ // Generate property gallery
+ const propertyGallery = this.generatePropertyGalleryHTML();
+
+ // Generate amenities from property data
+ const amenitiesHTML = this.generateAmenitiesHTML(data);
// Contact information
- const contactName = data.contactName || "Contact Name";
- const contactPhone = data.contactPhone || "Contact Phone";
- const contactEmail = data.contactEmail || "contact@email.com";
- const ownerName = data.ownerName || "Owner Name";
- const ownerPhone = data.ownerPhone || "Owner Phone";
- const ownerEmail = data.ownerEmail || "owner@email.com";
+ const contactName = data.Agent_Name__c || data.contactName || "N/A";
+ const contactPhone = data.Agent_Phone__c || data.contactPhone || "N/A";
+ const contactEmail = data.Agent_Email__c || data.contactEmail || "N/A";
+ const ownerName = data.Owner_Name__c || data.ownerName || "N/A";
+ const ownerPhone = data.Owner_Phone__c || data.ownerPhone || "N/A";
+ const ownerEmail = data.Owner_Email__c || data.ownerEmail || "N/A";
// Property specifications
- const status = data.status || "For Sale";
- const propertyType = data.propertyType || "Single-Family Home";
- const yearBuilt = data.yearBuilt || "2023";
- const floor = data.floor || "2 Levels";
- const parking = data.parking || "3-Car Garage";
- const furnishing = data.furnishing || "Partially Furnished";
- const maintenanceFee = data.maintenanceFee || "$1,200/month";
- const serviceCharge = data.serviceCharge || "Included";
+ const status = data.Status__c || data.status || "N/A";
+ const yearBuilt = data.Build_Year__c || data.yearBuilt || "N/A";
+ const floor = data.Floor__c || data.floor || "N/A";
+ const parking = data.Parking_Spaces__c || data.parking || "N/A";
+ const furnishing = data.Furnished__c || data.furnishing || "N/A";
+ const maintenanceFee = data.Maintenance_Fee__c || data.maintenanceFee || "N/A";
+ const serviceCharge = data.Service_Charge__c || data.serviceCharge || "N/A";
// Property details
const acres = data.acres || "0.75";
// Location details
- const cityBayut = data.cityBayut || "City";
- const cityPropertyfinder = data.cityPropertyfinder || "City";
- const communityBayut = data.communityBayut || "Community";
- const subCommunityBayut = data.subCommunityBayut || "Sub Community";
- const localityBayut = data.localityBayut || "Locality";
- const subLocalityBayut = data.subLocalityBayut || "Sub Locality";
- const towerBayut = data.towerBayut || "Tower";
+ const cityBayut = data.City__c || data.cityBayut || "N/A";
+ const cityPropertyfinder = data.City__c || data.cityPropertyfinder || "N/A";
+ const communityBayut = data.Community__c || data.communityBayut || "N/A";
+ const subCommunityBayut = data.Sub_Community__c || data.subCommunityBayut || "N/A";
+ const localityBayut = data.Locality__c || data.localityBayut || "N/A";
+ const subLocalityBayut = data.Sub_Locality__c || data.subLocalityBayut || "N/A";
+ const towerBayut = data.Tower__c || data.towerBayut || "N/A";
// Nearby amenities
- const schools = data.schools || "5 min drive";
- const shoppingCenters = data.shoppingCenters || "10 min drive";
- const hospitals = data.hospitals || "12 min drive";
- const countryClub = data.countryClub || "8 min drive";
- const airportDistance = data.airportDistance || "20 min drive";
- const nearbyLandmarks = data.nearbyLandmarks || "Nearby Landmarks";
- const transportation = data.transportation || "Public Transport";
- const beachDistance = data.beachDistance || "15 min drive";
- const metroDistance = data.metroDistance || "8 min walk";
+ const schools = data.Schools__c || data.schools || "N/A";
+ const shoppingCenters = data.Shopping_Centers__c || data.shoppingCenters || "N/A";
+ const hospitals = data.Hospitals__c || data.hospitals || "N/A";
+ const countryClub = data.Country_Club__c || data.countryClub || "N/A";
+ const airportDistance = data.Airport_Distance__c || data.airportDistance || "N/A";
+ const nearbyLandmarks = data.Landmarks__c || data.nearbyLandmarks || "N/A";
+ const transportation = data.Transportation__c || data.transportation || "N/A";
+ const beachDistance = data.Beach_Distance__c || data.beachDistance || "N/A";
+ const metroDistance = data.Metro_Distance__c || data.metroDistance || "N/A";
// Additional information
- const petFriendly = data.petFriendly || "By Approval";
- const smokingAllowed = data.smokingAllowed || "Not Permitted";
- const availableFrom = data.availableFrom || "Immediate";
- const utilitiesIncluded = data.utilitiesIncluded || "Not Included";
- const internetIncluded = data.internetIncluded || "Not Included";
- const cableIncluded = data.cableIncluded || "Not Included";
+ const petFriendly = data.Pet_Friendly__c || data.petFriendly || "N/A";
+ const smokingAllowed = data.Smoking_Allowed__c || data.smokingAllowed || "N/A";
+ const availableFrom = data.Available_From__c || data.availableFrom || "N/A";
+ const utilitiesIncluded = data.Utilities_Included__c || data.utilitiesIncluded || "N/A";
+ const internetIncluded = data.Internet_Included__c || data.internetIncluded || "N/A";
+ const cableIncluded = data.Cable_Included__c || data.cableIncluded || "N/A";
// Additional property fields
- const titleEnglish = data.titleEnglish || "Property Title";
- const descriptionEnglish = data.descriptionEnglish || "Property Description";
- const amenities = data.amenities || "No specific amenities listed.";
- const features = data.features || "No specific features listed.";
- const size = data.size || "N/A";
- const parkingSpaces = data.parkingSpaces || "N/A";
- const buildYear = data.buildYear || "N/A";
- const offeringType = data.offeringType || "N/A";
+ const titleEnglish = data.Title_English__c || data.titleEnglish || "N/A";
+ const descriptionEnglish = data.Description_English__c || data.descriptionEnglish || "N/A";
+ const amenities = data.Amenities__c || data.amenities || "N/A";
+ const features = data.Features__c || data.features || "N/A";
+ const size = data.Square_Feet__c || data.size || "N/A";
+ const parkingSpaces = data.Parking_Spaces__c || data.parkingSpaces || "N/A";
+ const buildYear = data.Build_Year__c || data.buildYear || "N/A";
+ const offeringType = data.Offering_Type__c || data.offeringType || "N/A";
// Financial and availability fields
- const rentPriceMin = data.rentPriceMin || "N/A";
- const salePriceMin = data.salePriceMin || "N/A";
- const rentAvailableFrom = data.rentAvailableFrom || "N/A";
- const rentAvailableTo = data.rentAvailableTo || "N/A";
- const minimumContract = data.minimumContract || "N/A";
- const securityDeposit = data.securityDeposit || "N/A";
+ const rentPriceMin = data.Rent_Price_Min__c || data.rentPriceMin || "N/A";
+ const salePriceMin = data.Sale_Price_Min__c || data.salePriceMin || "N/A";
+ const rentAvailableFrom = data.Rent_Available_From__c || data.rentAvailableFrom || "N/A";
+ const rentAvailableTo = data.Rent_Available_To__c || data.rentAvailableTo || "N/A";
+ const minimumContract = data.Minimum_Contract__c || data.minimumContract || "N/A";
+ const securityDeposit = data.Security_Deposit__c || data.securityDeposit || "N/A";
- return `
Prestige Real Estate Brochure - 4 Page
${propertyName} ${location}
Description ${titleEnglish ? `Title: ${titleEnglish}` : ''}
${descriptionEnglish ? `Description: ${descriptionEnglish}` : ''}
${amenities ? `Amenities: ${amenities}` : ''}
${features ? `Features: ${features}` : ''}
Specifications Reference ID: ${referenceId}
Status: ${status}
Type: ${propertyType}
Year Built: ${yearBuilt}
Floor: ${floor}
Parking: ${parking}
Furnishing: ${furnishing}
Maintenance Fee: ${maintenanceFee}
Service Charge: ${serviceCharge}
Size: ${size}
Parking Spaces: ${parkingSpaces}
Build Year: ${buildYear}
Offering Type: ${offeringType}
Bedrooms: ${bedrooms}
Bathrooms: ${bathrooms}
Area: ${area} ${sizeUnit}
Price: ${price}
Rent Price (Min): ${rentPriceMin}
Sale Price (Min): ${salePriceMin}
Rent Available From: ${rentAvailableFrom}
Rent Available To: ${rentAvailableTo}
Available From: ${availableFrom}
Minimum Contract: ${minimumContract}
Security Deposit: ${securityDeposit}
Pet Friendly: ${petFriendly}
Smoking Allowed: ${smokingAllowed}
Amenities & Features Infinity Pool Private Home Theater Gourmet Chef's Kitchen Wine Cellar Smart Home Automation Spa & Sauna Room Landscaped Gardens Outdoor Fire Pit
Shopping
${shoppingCenters}
Airport
${airportDistance}
Landmarks
${nearbyLandmarks}
Transportation
${transportation}
Additional Information Pet Friendly: ${petFriendly}
Smoking: ${smokingAllowed}
Available From: ${availableFrom}
Minimum Contract: ${minimumContract}
Security Deposit: ${securityDeposit}
Utilities Included: ${utilitiesIncluded}
Internet Included: ${internetIncluded}
Cable Included: ${cableIncluded}
`;
+ return `
Prestige Real Estate Brochure - 4 Page
${propertyName} ${location}
Description ${titleEnglish ? `Title: ${titleEnglish}` : ''}
${descriptionEnglish ? `Description: ${descriptionEnglish}` : ''}
${amenities ? `Amenities: ${amenities}` : ''}
${features ? `Features: ${features}` : ''}
Specifications Reference ID: ${referenceId}
Status: ${status}
Type: ${propertyType}
Year Built: ${yearBuilt}
Floor: ${floor}
Parking: ${parking}
Furnishing: ${furnishing}
Maintenance Fee: ${maintenanceFee}
Service Charge: ${serviceCharge}
Size: ${size}
Parking Spaces: ${parkingSpaces}
Build Year: ${buildYear}
Offering Type: ${offeringType}
Bedrooms: ${bedrooms}
Bathrooms: ${bathrooms}
Area: ${area} ${sizeUnit}
Price: ${price}
Rent Price (Min): ${rentPriceMin}
Sale Price (Min): ${salePriceMin}
Rent Available From: ${rentAvailableFrom}
Rent Available To: ${rentAvailableTo}
Available From: ${availableFrom}
Minimum Contract: ${minimumContract}
Security Deposit: ${securityDeposit}
Pet Friendly: ${petFriendly}
Smoking Allowed: ${smokingAllowed}
Amenities & Features ${amenitiesHTML}
Shopping
${shoppingCenters}
Airport
${airportDistance}
Landmarks
${nearbyLandmarks}
Transportation
${transportation}
Additional Information Pet Friendly: ${petFriendly}
Smoking: ${smokingAllowed}
Available From: ${availableFrom}
Minimum Contract: ${minimumContract}
Security Deposit: ${securityDeposit}
Utilities Included: ${utilitiesIncluded}
Internet Included: ${internetIncluded}
Cable Included: ${cableIncluded}
`;
}
createSampleTemplate() {
@@ -1688,96 +1912,113 @@ export default class PropertyTemplateSelector extends LightningElement {
const data = this.propertyData || {};
// Extract all available property data with fallbacks
- const propertyName = data.propertyName || "THE VERTICE";
- const location = data.location || "18 Skyline Avenue, Metropolis Centre, MC 90210";
- const referenceId = data.referenceNumber || "VP-2025-001";
- const agentName = data.agentName || "Alexander Valentine";
- const agentPhone = data.agentPhone || "(555) 123-9876";
- const agentEmail = data.agentEmail || "alex.v@elysian.com";
+ const propertyName = data.Name || data.propertyName || "Property Name";
+ const location = data.Address__c || data.location || "Location";
+ const referenceId = data.Reference_Number__c || data.referenceNumber || "N/A";
+ const agentName = data.contactName || data.Agent_Name__c || data.agentName || "N/A";
+ const agentPhone = data.contactPhone || data.Agent_Phone__c || data.agentPhone || "N/A";
+ const agentEmail = data.contactEmail || data.Agent_Email__c || data.agentEmail || "N/A";
// Dynamic pricing with fallbacks
- const price = data.salePriceMin || data.rentPriceMin || data.price || "Starting from $1,200,000";
+ const price = data.Sale_Price_Min__c || data.Rent_Price_Min__c || data.Price__c || data.salePriceMin || data.rentPriceMin || data.price || "Price on Request";
// Dynamic property details
- const bedrooms = data.bedrooms || "2-3";
- const bathrooms = data.bathrooms || "2-3.5";
- const squareFeet = data.squareFeet || data.area || "1,450 - 3,200";
- const propertyType = data.propertyType || "Condominium";
- const status = data.status || data.offeringType || "New Development";
- const yearBuilt = data.yearBuilt || data.buildYear || "2025";
- const furnishing = data.furnishing || "Unfurnished";
- const parking = data.parking || "2 Spaces per Unit";
+ const bedrooms = data.Bedrooms__c || data.bedrooms || "N/A";
+ const bathrooms = data.Bathrooms__c || data.bathrooms || "N/A";
+ const squareFeet = data.Square_Feet__c || data.squareFeet || data.area || "N/A";
+ const propertyType = data.Property_Type__c || data.propertyType || "N/A";
+ const status = data.Status__c || data.status || data.offeringType || "N/A";
+ const yearBuilt = data.Build_Year__c || data.yearBuilt || data.buildYear || "N/A";
+ const furnishing = data.Furnished__c || data.furnishing || "N/A";
+ const parking = data.Parking_Spaces__c || data.parking || "N/A";
// Dynamic description
- const description = data.descriptionEnglish || data.description || "A bold statement on modern urban living.";
+ const description = data.Description_English__c || data.descriptionEnglish || data.description || "Property description not available.";
+
+ // Get smart images
+ const exteriorImage = this.getExteriorImageUrl();
+ const interiorImage = this.getSmartImageForSection('interior', 'https://images.unsplash.com/photo-1616486338812-3dadae4b4ace?ixlib=rb-4.0.3&q=85&fm=jpg&crop=entropy&cs=srgb&w=1200');
+ const kitchenImage = this.getSmartImageForSection('kitchen', 'https://images.unsplash.com/photo-1556909114-f6e7ad7d3136?ixlib=rb-4.0.3&q=85&fm=jpg&crop=entropy&cs=srgb&w=1200');
+
+ // Generate property gallery
+ const propertyGallery = this.generatePropertyGalleryHTML();
+
+ // Generate amenities from property data
+ const amenitiesHTML = this.generateAmenitiesHTML(data);
// Dynamic location details
- const schools = data.schools || "Metropolis Intl. (10 min)";
- const shopping = data.shoppingCenters || "The Galleria Mall (8 min)";
- const hospitals = data.hospitals || "City Medical Center (15 min)";
- const landmarks = data.landmarks || "Central Park (5 min)";
- const transportation = data.transportation || "Metro Line A (2 min walk)";
- const airport = data.airportDistance || "25 min drive";
+ const schools = data.Schools__c || data.schools || "N/A";
+ const shopping = data.Shopping_Centers__c || data.shoppingCenters || "N/A";
+ const hospitals = data.Hospitals__c || data.hospitals || "N/A";
+ const landmarks = data.Landmarks__c || data.landmarks || "N/A";
+ const transportation = data.Transportation__c || data.transportation || "N/A";
+ const airport = data.Airport_Distance__c || data.airportDistance || "N/A";
// Dynamic additional info
- const petFriendly = data.petFriendly || "Allowed (w/ restrictions)";
- const smoking = data.smokingAllowed || "In designated areas";
- const availability = data.availableFrom || "Q4 2025";
- const utilities = data.utilitiesIncluded || "Sub-metered";
+ const petFriendly = data.Pet_Friendly__c || data.petFriendly || "N/A";
+ const smoking = data.Smoking_Allowed__c || data.smokingAllowed || "N/A";
+ const availability = data.Available_From__c || data.availableFrom || "N/A";
+ const utilities = data.Utilities_Included__c || data.utilitiesIncluded || "N/A";
- // Dynamic amenities
- const amenities = data.amenities || [
- "Rooftop Infinity Pool", "Fitness Center", "Residents' Sky Lounge",
- "Private Cinema Room", "Wellness Spa & Sauna", "Business Center",
- "24/7 Concierge", "Secure Parking"
- ];
+
- return `
Modern Urban Residences Brochure - ${propertyName}
An Urban Oasis
${propertyName} ${location}
Where Design Meets Desire. ${propertyName} is not just a building; it's a bold statement on modern urban living. ${description}
Every residence is a testament to quality, featuring panoramic city views from floor-to-ceiling windows, intelligent home systems, and finishes selected from the finest materials around the globe. This is more than a home; it's a new perspective.
Open-Concept Living Space
Master Bedroom Suite
Gourmet Chef's Kitchen
Spa-Inspired Bathroom
Private Balcony Views
An unrivaled collection of amenities offers residents a resort-style living experience. From the serene rooftop pool to the state-of-the-art wellness center, every detail is crafted for comfort, convenience, and luxury.
Lifestyle Amenities ${this.buildAmenitiesListForVertice(data)} Key Specifications Status ${status}
Property Type ${propertyType}
Year Built ${yearBuilt}
Technology Integrated Smart Home
Design Sustainable & Eco-Friendly
Bedrooms ${bedrooms}
Bathrooms ${bathrooms}
Square Feet ${squareFeet}
${bedrooms}-Bedroom Residence A thoughtfully designed space perfect for urban professionals or small families, combining comfort with panoramic city views.
Premium ${propertyType} The pinnacle of luxury living, this residence offers expansive spaces, premium finishes, and exclusive access to premium amenities.
Additional Information Availability
${availability}
Schedule a Private Viewing Experience ${propertyName} firsthand. Contact our sales executive to arrange an exclusive tour of the property and available residences.
Neighborhood Highlights Landmarks: ${landmarks} Transportation: ${transportation} Schools: ${schools} Shopping: ${shopping} Airport: ${airport}`;
+ return `
Modern Urban Residences Brochure - ${propertyName}
An Urban Oasis
${propertyName} ${location}
Where Design Meets Desire. ${propertyName} is not just a building; it's a bold statement on modern urban living. ${description}
Every residence is a testament to quality, featuring panoramic city views from floor-to-ceiling windows, intelligent home systems, and finishes selected from the finest materials around the globe. This is more than a home; it's a new perspective.
Open-Concept Living Space
Master Bedroom Suite
Gourmet Chef's Kitchen
Spa-Inspired Bathroom
Private Balcony Views
An unrivaled collection of amenities offers residents a resort-style living experience. From the serene rooftop pool to the state-of-the-art wellness center, every detail is crafted for comfort, convenience, and luxury.
Key Specifications Status ${status}
Property Type ${propertyType}
Year Built ${yearBuilt}
Floor ${data.Floor__c || "N/A"}
Maintenance Fee ${data.Maintenance_Fee__c || "N/A"}
Bedrooms ${bedrooms}
Bathrooms ${bathrooms}
Square Feet ${squareFeet}
${bedrooms}-Bedroom Residence A thoughtfully designed space perfect for urban professionals or small families, combining comfort with panoramic city views.
Premium ${propertyType} The pinnacle of luxury living, this residence offers expansive spaces, premium finishes, and exclusive access to premium amenities.
Additional Information Availability
${availability}
Schedule a Private Viewing Experience ${propertyName} firsthand. Contact our sales executive to arrange an exclusive tour of the property and available residences.
Neighborhood Highlights Landmarks: ${landmarks} Transportation: ${transportation} Schools: ${schools} Shopping: ${shopping} Airport: ${airport}`;
}
createSerenityHouseTemplate() {
const data = this.propertyData || {};
// Extract all available property data with fallbacks
- const propertyName = data.propertyName || "The Serenity House";
- const location = data.location || "123 Luxury Lane, Prestige City, PC 45678";
- const referenceId = data.referenceNumber || "ES-8821";
- const agentName = data.agentName || "Olivia Sterling";
- const agentPhone = data.agentPhone || "(555) 987-6543";
- const agentEmail = data.agentEmail || "olivia@elysianestates.com";
- const ownerName = data.ownerName || "John & Jane Doe";
- const ownerPhone = data.ownerPhone || "(555) 111-2222";
- const ownerEmail = data.ownerEmail || "owner.serenity@email.com";
+ const propertyName = data.Name || data.propertyName || "Property Name";
+ const location = data.Address__c || data.location || "Location";
+ const referenceId = data.Reference_Number__c || data.referenceNumber || "N/A";
+ const agentName = data.contactName || data.Agent_Name__c || data.agentName || "N/A";
+ const agentPhone = data.contactPhone || data.Agent_Phone__c || data.agentPhone || "N/A";
+ const agentEmail = data.contactEmail || data.Agent_Email__c || data.agentEmail || "N/A";
+ const ownerName = data.Owner_Name__c || data.ownerName || "N/A";
+ const ownerPhone = data.Owner_Phone__c || data.ownerPhone || "N/A";
+ const ownerEmail = data.Owner_Email__c || data.ownerEmail || "N/A";
// Dynamic pricing with fallbacks
- const price = data.salePriceMin || data.rentPriceMin || data.price || "Price on Request";
+ const price = data.Sale_Price_Min__c || data.Rent_Price_Min__c || data.Price__c || data.salePriceMin || data.rentPriceMin || data.price || "Price on Request";
const priceDisplay = price !== "Price on Request" ? `Offered at ${price}` : "Price on Request";
// Dynamic property details
- const bedrooms = data.bedrooms || "5";
- const bathrooms = data.bathrooms || "6";
- const squareFeet = data.squareFeet || data.area || "6,200";
- const propertyType = data.propertyType || "Single-Family Home";
- const status = data.status || data.offeringType || "For Sale";
- const yearBuilt = data.yearBuilt || data.buildYear || "2023";
- const furnishing = data.furnishing || "Partially Furnished";
- const parking = data.parking || "3-Car Garage";
+ const bedrooms = data.Bedrooms__c || data.bedrooms || "N/A";
+ const bathrooms = data.Bathrooms__c || data.bathrooms || "N/A";
+ const squareFeet = data.Square_Feet__c || data.squareFeet || data.area || "N/A";
+ const propertyType = data.Property_Type__c || data.propertyType || "N/A";
+ const status = data.Status__c || data.status || data.offeringType || "N/A";
+ const yearBuilt = data.Build_Year__c || data.yearBuilt || data.buildYear || "N/A";
+ const furnishing = data.Furnished__c || data.furnishing || "N/A";
+ const parking = data.Parking_Spaces__c || data.parking || "N/A";
// Dynamic description
- const description = data.descriptionEnglish || data.description || "An architectural marvel of curated living space.";
+ const description = data.Description_English__c || data.descriptionEnglish || data.description || "Property description not available.";
+
+ // Get smart images
+ const exteriorImage = this.getExteriorImageUrl();
+ const interiorImage = this.getSmartImageForSection('interior', 'https://images.unsplash.com/photo-1616486338812-3dadae4b4ace?ixlib=rb-4.0.3&q=85&fm=jpg&crop=entropy&cs=srgb&w=1200');
+ const bedroomImage = this.getSmartImageForSection('bedroom', 'https://images.unsplash.com/photo-1586023492125-27b2c045efd7?ixlib=rb-4.0.3&q=85&fm=jpg&crop=entropy&cs=srgb&w=1200');
+
+ // Generate property gallery
+ const propertyGallery = this.generatePropertyGalleryHTML();
+
+ // Generate amenities from property data
+ const amenitiesHTML = this.generateAmenitiesHTML(data);
// Dynamic location details
- const schools = data.schools || "5 min drive";
- const shopping = data.shoppingCenters || "10 min drive";
- const hospitals = data.hospitals || "12 min drive";
- const countryClub = data.countryClub || "8 min drive";
- const airport = data.airportDistance || "20 min drive";
+ const schools = data.Schools__c || data.schools || "N/A";
+ const shopping = data.Shopping_Centers__c || data.shoppingCenters || "N/A";
+ const hospitals = data.Hospitals__c || data.hospitals || "N/A";
+ const countryClub = data.Country_Club__c || data.countryClub || "N/A";
+ const airport = data.Airport_Distance__c || data.airportDistance || "N/A";
// Dynamic additional info
- const petFriendly = data.petFriendly || "By Approval";
- const smoking = data.smokingAllowed || "Not Permitted";
- const availability = data.availableFrom || "Immediate";
- const utilities = data.utilitiesIncluded || "Not Included";
+ const petFriendly = data.Pet_Friendly__c || data.petFriendly || "N/A";
+ const smoking = data.Smoking_Allowed__c || data.smokingAllowed || "N/A";
+ const availability = data.Available_From__c || data.availableFrom || "N/A";
+ const utilities = data.Utilities_Included__c || data.utilitiesIncluded || "N/A";
return `
@@ -2068,8 +2309,8 @@ export default class PropertyTemplateSelector extends LightningElement {
height: 280px;
background-color: var(--color-off-white);
border: 1px solid var(--color-border);
- background-image: url('https://cdn.shopify.com/s/files/1/0024/0495/3953/files/Architect_s_floor_plan_for_a_house_in_black_and_white_large.jpg');
- background-size: contain;
+ background-image: url('${this.getMapsImageUrl()}');
+ background-size: cover;
background-position: center;
background-repeat: no-repeat;
margin-bottom: 40px;
@@ -2224,11 +2465,11 @@ export default class PropertyTemplateSelector extends LightningElement {