diff --git a/force-app/main/default/lwc/propertyTemplateSelector/propertyTemplateSelector.html b/force-app/main/default/lwc/propertyTemplateSelector/propertyTemplateSelector.html
index 148998b..c7923d2 100644
--- a/force-app/main/default/lwc/propertyTemplateSelector/propertyTemplateSelector.html
+++ b/force-app/main/default/lwc/propertyTemplateSelector/propertyTemplateSelector.html
@@ -1188,13 +1188,9 @@
-
@@ -1246,20 +1242,36 @@
← Back
-
-
-
-
@@ -1280,15 +1292,6 @@
-
-
-
@@ -1304,21 +1307,6 @@
-
-
-
-
-
-
@@ -1605,9 +1593,6 @@
-
diff --git a/force-app/main/default/lwc/propertyTemplateSelector/propertyTemplateSelector.js b/force-app/main/default/lwc/propertyTemplateSelector/propertyTemplateSelector.js
index a06eab8..cdcb8e7 100644
--- a/force-app/main/default/lwc/propertyTemplateSelector/propertyTemplateSelector.js
+++ b/force-app/main/default/lwc/propertyTemplateSelector/propertyTemplateSelector.js
@@ -91,7 +91,7 @@ export default class PropertyTemplateSelector extends LightningElement {
@track selectedPageSize = "A4"; // Default page size
@track zoom = 1.0; // Step 3 viewport zoom
@track isGeneratingPdf = false; // Loading state for PDF generation
- @track previewPages = []; // Array of pages for viewport display
+ @track previewPages = null; // Array of pages for viewport display
@track showPrice = true; // Toggle for showing price vs "Price on Request"
cachedTemplateContent = null; // Cache template content to prevent regeneration
@@ -1271,7 +1271,7 @@ export default class PropertyTemplateSelector extends LightningElement {
if (this.htmlContent) {
this.previewPages = this.splitContentIntoPages(this.htmlContent);
} else {
- this.previewPages = [];
+ this.previewPages = null;
}
this.updatePageCount();
@@ -2270,64 +2270,6 @@ export default class PropertyTemplateSelector extends LightningElement {
this.newSectionContent = event.target.value;
}
- insertNewSection() {
- if (!this.selectedSectionType || !this.newSectionTitle.trim()) {
- return;
- }
-
- const editor = this.template.querySelector(".enhanced-editor-content");
- if (!editor) {
- console.error("Editor not found");
- return;
- }
-
- // Debug: Check logoUrl availability
- console.log("LogoUrl in insertNewSection:", this.logoUrl);
- console.log("LogoUrl type:", typeof this.logoUrl);
-
- // Store logoUrl in a local variable to avoid template string issues
- const logoUrl = this.logoUrl;
- console.log("Local logoUrl:", logoUrl);
-
- // Generate the new section HTML based on type
- const sectionHTML = this.generateSectionHTML(this.selectedSectionType, this.newSectionTitle, this.newSectionContent);
-
- // Create a new page container
- const newPageHTML = `
-
- `;
-
- // Insert the new section at the end of the editor
- editor.insertAdjacentHTML('beforeend', newPageHTML);
-
- // Update the page count
- this.updatePageCount();
-
- // Close the modal
- this.closeNewSectionModal();
-
- // Show success message
- this.showSuccess(`New ${this.selectedSectionType} section added successfully!`);
-
- console.log("New section inserted:", {
- type: this.selectedSectionType,
- title: this.newSectionTitle,
- content: this.newSectionContent
- });
- }
generateSectionHTML(type, title, content) {
const data = this.propertyData || {};
@@ -4927,21 +4869,21 @@ export default class PropertyTemplateSelector extends LightningElement {
// First image gets half height, others get standard height
const imageHeight = idx === 0 ? '100px' : '150px';
- return `
-

+ return `
+
`;
})
.join("");
galleryPagesHTML += `
-
-
-
Property Gallery
-
-
- ${chunkHTML}
-
+