const objGlobalApplycard = { template: `

Request Your Homebuyer Consultation Today!

* By submitting this form you opt-in to recieve text messages and emails.
{{ message }}
` , data(){ return { form: { firstname: '', lastname: '', phone: '', email: '' }, submittingForm: false, showingMessage: false, messageColor: { 'text-danger': true }, message: '' } }, methods: { async submitContact(event) { event.preventDefault() if (this.validateForm()) { this.submittingForm = true let method; if(this.$root.isConnect){ method = 'contactConnectAgent' } else{ method = 'contactAgent' } const response = await fetch(`/api/backend.cfc?method=${method}&userId=${this.$root.$route.params.userId}${this.$root.isDevelopment?'&development=1':''}`, { method: 'POST', body: JSON.stringify(this.form) }) let data = await response.json() if (data.success === true) { this.messageColor = { 'text-success': true } this.submittingForm = false this.message = 'Thank you! Your information has been received.' this.showingMessage = true setTimeout(() => { this.showingMessage = false }, 5000) let firstName = this.form.firstname let lastName = this.form.lastname let phone = this.extractNumber(this.form.phone) let email = this.form.email this.clearForm() // this.$root.showToast({message: 'Thank you! Your information has been received.', color: 'success'}) this.$root.submitForm(firstName, lastName, phone, email) } else { this.messageColor = { 'text-danger': true } this.submittingForm = false this.message = 'Failed to send communincation please try again.' this.showingMessage = true setTimeout(() => { this.showingMessage = false }, 5000) // this.$root.showToast({message: 'Failed to send communincation please try again.', color: 'danger'}) } } }, extractNumber(phone){ let numberPattern = /\d+/g; let numbersArray = phone.match(numberPattern); let extractedNumbers = numbersArray ? numbersArray.join('') : ''; return extractedNumbers; }, validateForm() { let isValid = false; if ( this.form.firstname !== '' && this.form.lastname !== '' && this.form.phone !== '' && this.form.email !== '' ){ let phoneRegex = /^(1?)(-| ?)(\()?([0-9]{3})(\)|-| |\)-|\) )?([0-9]{3})(-| )?([0-9]{4}|[0-9]{4})$/; if(!phoneRegex.test(this.form.phone)){ this.messageColor = { 'text-danger': true } this.submittingForm = false this.message = 'Please Enter a Valid Phone Number!' this.showingMessage = true setTimeout(() => { this.showingMessage = false }, 2000) return false; } let emailRegex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ if(emailRegex.test(this.form.emailRegex)){ this.messageColor = { 'text-danger': true } this.submittingForm = false this.message = 'Please Enter a Valid Email Address!' this.showingMessage = true; setTimeout(() => { this.showingMessage = false; }, 2000) return false; } return true; } else return false }, clearForm() { this.form.firstname = '' this.form.lastname = '' this.form.phone = '' this.form.email = '' } } } app.component('global-applycard', objGlobalApplycard); const objGlobalFooter = { template: `` , } app.component('global-footer', objGlobalFooter); const objGlobalLeadpopup = { template: `
` , data(){ return { form: { fullname: '', email: '' }, submittingForm: false, showingMessage: false, messageColor: { 'text-danger': true }, message: '' } }, methods: { async saveLead(event) { event.preventDefault() let data; if (this.validateForm()) { this.submittingForm = true if(this.$route.path.includes('connect')){ const response = await fetch(`/api/backend.cfc?method=saveDigitalLead&propertyId=${this.$root.$route.params.propertyId}&appUserId=${this.$root.$route.params.userId}${this.$root.isDevelopment?'&development=1':''}`, { method: 'POST', body: JSON.stringify(this.form) }) data = await response.json() } if (data.success == true) { this.message = 'Submitted Successfully'; this.messageColor = { 'text-success': true }; this.submittingForm = false; this.showingMessage = true; setTimeout(() => { this.$root.hideModalById('leadModal') }, 1000) let names = this.form.fullname.split(' '); let firstName = names[0]; let lastName = names.length > 1 ? names[names.length-1] : ''; let email = this.form.email; this.clearForm(); }else { this.messageColor = { 'text-danger': true } this.showingMessage = true; this.submittingForm = false this.message = 'Failed to submit.' this.showingMessage = true setTimeout(() => { this.showingMessage = false }, 1000) } } }, validateForm() { if ( this.form.fullname !== '' && this.form.email !== '' ) { return true } else return false }, clearForm() { this.form.fullname = '' this.form.email = '' } } } app.component('global-leadpopup', objGlobalLeadpopup); const objGlobalMap = { template: `
` , props: { properties: { type: Array, required: true, default: [] }, property: { type: Object, required: false, default: {} }, width: { type: String, required: false, default: '100%' }, height: { type: String, required: false, default: '350px' }, showAllProperties: { type: Boolean, required: false, default: false } }, data() { return { accessToken: this.$root.MAPBOX_ACCESS_TOKEN, propertyLng: 0, propertyLat: 0 }; }, computed: { map: function(){ return new mapboxgl.Map({ container: 'mapContainer', // container ID style: 'mapbox://styles/mapbox/light-v9', // style URL center: [this.propertyLng,this.propertyLat], // starting position [lng, lat] zoom: 10 // starting zoom }); }, nav: function() { return new mapboxgl.NavigationControl(); }, popup: function() { return new mapboxgl.Popup({ closeButton: true, closeOnClick: false }); }, renderMap: function() { return this.createMap(this.map, this.nav, this.popup) } }, methods: { createMap(map, nav, popup) { let layer = { id: '', // set dynamically below type: 'symbol', source: { type: 'geojson', data: { type: 'FeatureCollection', features: [] } }, layout: { 'icon-image': '', // set dynamically below 'icon-allow-overlap': true, 'icon-size': 0.5 }, paint: { 'icon-color': '#1469ab' } } let homeLayer = JSON.parse(JSON.stringify(layer)) // deep clone homeLayer.id = 'home' homeLayer.layout['icon-image'] = 'listedHomeMarker' let pointsLayer = JSON.parse(JSON.stringify(layer)) // deep clone pointsLayer.id = 'points' pointsLayer.layout['icon-image'] = 'listedMarker' for (var i = 0; i < this.properties.length; i++) { let path = '' if (this.$root.isConnect) { path = `${this.$root.user.appUserId}/property/${this.properties[i].propertyId}` } else { path = `${this.$root.user.userId}/property/${this.properties[i].propertyId}` } let htmlTemplate = `
$${this.$root.numberWithCommas(this.properties[i].price)}
${this.properties[i].bedrooms} bd, ${this.properties[i].bathrooms} ba
${this.properties[i].sqft} sqft
${this.properties[i].address}
` let feature = { type: 'Feature', properties: { description: htmlTemplate, url: `${this.$root.localUrlHrefBase}#/${this.$root.user.userId}/property/${this.properties[i].propertyId}`, icon: '' // set dynamically below }, geometry: { type: 'Point', coordinates: [parseFloat(this.properties[i].lng), parseFloat(this.properties[i].lat)] } } if (!this.showAllProperties) { if (this.properties[i].propertyId == this.property.propertyId) { feature.properties.icon = 'listedHomeMarker' homeLayer.source.data.features.push(feature) } else { feature.properties.icon = 'listedMarker' pointsLayer.source.data.features.push(feature) } } else { if (this.properties[i].soldDate == '') { feature.properties.icon = 'listedHomeMarker' homeLayer.source.data.features.push(feature) } else { feature.properties.icon = 'listedMarker' pointsLayer.source.data.features.push(feature) } } } let showAllProperties = this.showAllProperties map.on('load', function() { map.addControl(nav, "top-left"); map.loadImage('/assets/images/rounded-dark.png', (error, image) => { if (error) throw error; map.addImage('listedMarker', image); map.addLayer(pointsLayer); }); map.loadImage('/assets/images/house.png', (error, image) => { if (error) throw error; // Add the loaded image to the style's sprite with the ID 'kitten'. map.addImage('listedHomeMarker', image); map.addLayer(homeLayer); }); map.on('mouseenter', 'points', (e) => { map.getCanvas().style.cursor = 'pointer' var features = map.queryRenderedFeatures(e.point, { layers: ['points'] }) if (!features.length) { return } var coordinates = e.features[0].geometry.coordinates.slice(); var description = e.features[0].properties.description; while (Math.abs(e.lngLat.lng - coordinates[0]) > 180) { coordinates[0] += e.lngLat.lng > coordinates[0] ? 360 : -360; } popup.setLngLat(coordinates) .setHTML(description) .addTo(map); }); map.on('mouseleave', 'points', function() { map.getCanvas().style.cursor = '' }); if (showAllProperties) { map.on('mouseenter', 'home', (e) => { map.getCanvas().style.cursor = 'pointer' var features = map.queryRenderedFeatures(e.point, { layers: ['home'] }) if (!features.length) { return } var coordinates = e.features[0].geometry.coordinates.slice(); var description = e.features[0].properties.description; while (Math.abs(e.lngLat.lng - coordinates[0]) > 180) { coordinates[0] += e.lngLat.lng > coordinates[0] ? 360 : -360; } popup.setLngLat(coordinates) .setHTML(description) .addTo(map); }); map.on('mouseleave', 'home', function() { map.getCanvas().style.cursor = '' }); } }); } }, created() { if (!this.property.propertyId) { this.propertyLng = this.properties[0] && this.properties[0].lng ? this.properties[0].lng : 0 this.propertyLat = this.properties[0] && this.properties[0].lat ? this.properties[0].lat : 0 } else { this.propertyLng = this.property.lng ? this.property.lng : 0 this.propertyLat = this.property.lat ? this.property.lat : 0 } }, mounted() { mapboxgl.accessToken = this.accessToken this.renderMap } } app.component('global-map', objGlobalMap); const objGlobalNavbar = { template: `
` , data(){ return { searchString: '', dataLoaded: false } }, props: { logo: { type: String, required: true, default: '' } }, methods: { startSearch() { let parsedSearchString = this.searchString.trim() parsedSearchString = parsedSearchString.replaceAll(/[^A-Za-z0-9\s]/g, '') parsedSearchString = parsedSearchString.replaceAll(/\s+/g, '%20') if(!this.$root.isConnect){ let path = `${this.$root.user.userId}/search/${parsedSearchString}` this.$root.goToRoute('/'+path) } else if(this.$root.isConnect){ let path = `${this.$root.user.appUserId}/search/${parsedSearchString}` this.$root.goToRoute('/'+path) } } }, mounted(){ this.dataLoaded = true; } } app.component('global-navbar', objGlobalNavbar); const objGlobalSeparator = { template: `
` , } app.component('global-separator', objGlobalSeparator); const objGlobalSimilarCard = { template: `
{{property.soldDate == '' ? 'For Sale' : 'Sold' }}
{{ property.bedrooms }} bd
{{ property.bathrooms }} ba
{{ property.sqft }} sq ft
` , props: { property: { type: Object, required: true, default: {} } }, data(){ return{ fileStackBaseUrl: 'https://process.filestackapi.com', fileStackKey: this.$root.fileStackKey, resizeWidth: 600, resizeHeight: 380 } }, methods:{ handleRoute(propertyId){ if(this.$root.isConnect){ this.$root.goToRoute('/'+this.$root.user.appUserId+'/property/'+propertyId) } else{ this.$root.goToRoute('/'+this.$root.user.userId+'/property/'+propertyId) } } }, computed: { formattedPrice() { return `$${this.$root.numberWithCommas(this.property.price)}` }, bannerMarkerSource() { if (this.$root.$route.params.propertyId) return '/assets/images/rounded-dark.png' else if (this.property.soldDate == '') return '/assets/images/house.png' else return '/assets/images/rounded-dark.png' }, propertyImagesResized(){ let arr = []; for(var i = 0; i
` , props: { forPropertyPage: { type: Boolean, required: false, default: false } }, computed: { filteredProperties() { let propertyId = this.$root.property.propertyId ? this.$root.property.propertyId : this.$root.property.marketingPropertyId if (this.$root.property.propertyId && this.$root.properties[0]) { return this.$root.properties.filter(function(item) { return item.propertyId !== propertyId }) } else if(this.$root.property.marketingPropertyId && this.$root.properties[0]){ return this.$root.properties.filter(function(item) { return item.propertyId !== propertyId }) } else return [] } } } app.component('global-similar-container', objGlobalSimilarContainer); const objGlobalToastAlert = { template: `
` , data(){ return { colors: [ 'primary', 'success', 'danger' ] } } } app.component('global-toast-alert', objGlobalToastAlert); const objGlobalToastContainer = { template: `
` , } app.component('global-toast-container', objGlobalToastContainer); const objLayouts404 = { template: `

Looks like you are lost. Check URL again.

` , } app.component('layouts-404', objLayouts404); const objLayoutsHome = { template: `
logo

Digital Marketing Done Right!

In today's competitive market, the modern real estate agent must be ready to present a comprehensive digital marketing strategy that goes above and beyond the MLS. When a potential client asks what your plan to market their home online is, what are you going to say?

With listinginfo.co's Listing Exposure Digital Campaign, you will receive:

-5 Property-Specific Digital Ads

All ads are designed to feature the seller's home and directs people to your listing's unique website, where every click represents a lead that doesn't have to be shared with any other listing.

-2 Weeks of Geotargeting

Each digital ad you run will advertise your seller's home on every device within a 15-mile radius of the property. For maximum exposure, all of our marketing is optimized to be mobile-friendly.

-2 Weeks of Follow-Up Retargeting

Our campaigns use tracking pixels to retarget your ads and register approximately 10 impressions per user, building property recognition through repetition.

-Easy to Read Infographic Reports

Reports show how many ads were shown, how many times they were displayed, how many websites they were shown on—everything you need to show sellers the full scope of your successful marketing plan.

All campaigns guaranteed to register a minimum of 75 clicks and 15,000 impressions!

*Because this campaign targets non real-estate related websites it is NOT designed to capture leads.

1400 S International Parkway Suite 1020, Lake Mary, FL 32746

Privacy Policy
` , } app.component('layouts-home', objLayoutsHome); const objLayoutsPrivacy = { template: `
Go Back

Privacy Policy

Last updated: November 21, 2016

Listing Power Tools Inc. ("us", "we", or "our") operates the listinginfo.com website (the "Service").

This page informs you of our policies regarding the collection, use and disclosure of Personal Information when you use our Service.

We will not use or share your information with anyone except as described in this Privacy Policy.

We use your Personal Information for providing and improving the Service. By using the Service, you agree to the collection and use of information in accordance with this policy. Unless otherwise defined in this Privacy Policy, terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, accessible at listinginfo.com

Information Collection And Use

While using our Service, we may ask you to provide us with certain personally identifiable information that can be used to contact or identify you. Personally identifiable information may include, but is not limited to, your email address, name, phone number, postal address ("Personal Information"). We collect this information for the purpose of providing the Service, identifying and communicating with you, responding to your requests/inquiries, servicing your purchase orders, and improving our services.

Log Data

We may also collect information that your browser sends whenever you visit our Service ("Log Data"). This Log Data may include information such as your computer's Internet Protocol ("IP") address, browser type, browser version, the pages of our Service that you visit, the time and date of your visit, the time spent on those pages and other statistics.

In addition, we may use third party services such as Google Analytics that collect, monitor and analyze this type of information in order to increase our Service's functionality. These third party service providers have their own privacy policies addressing how they use such information.

Cookies

Cookies are files with a small amount of data, which may include an anonymous unique identifier. Cookies are sent to your browser from a web site and transferred to your device. We use cookies to collect information in order to improve our services for you.

You can instruct your browser to refuse all cookies or to indicate when a cookie is being sent. The Help feature on most browsers provide information on how to accept cookies, disable cookies or to notify you when receiving a new cookie.

If you do not accept cookies, you may not be able to use some features of our Service and we recommend that you leave them turned on.

Behavioral Remarketing

Listing Power Tools Inc. uses remarketing services to advertise on third party web sites to you after you visited our Service. We, and our third party vendors, use cookies to inform, optimize and serve ads based on your past visits to our Service.

  • Google

    Google AdWords remarketing service is provided by Google Inc.

    You can opt-out of Google Analytics for Display Advertising and customize the Google Display Network ads by visiting the Google Ads Settings page: http://www.google.com/settings/ads

    Google also recommends installing the Google Analytics Opt-out Browser Add-on - https://tools.google.com/dlpage/gaoptout - for your web browser. Google Analytics Opt-out Browser Add-on provides visitors with the ability to prevent their data from being collected and used by Google Analytics.

    For more information on the privacy practices of Google, please visit the Google Privacy & Terms web page: http://www.google.com/intl/en/policies/privacy/

  • Twitter

    Twitter remarketing service is provided by Twitter Inc.

    You can opt-out from Twitter's interest-based ads by following their instructions: https://support.twitter.com/articles/20170405

    You can learn more about the privacy practices and policies of Twitter by visiting their Privacy Policy page: https://twitter.com/privacy

  • Facebook

    Facebook remarketing service is provided by Facebook Inc.

    You can learn more about interest-based advertising from Facebook by visiting this page: https://www.facebook.com/help/164968693837950

    To opt-out from Facebook's interest-based ads follow these instructions from Facebook: https://www.facebook.com/about/ads/#568137493302217

    Facebook adheres the Self-Regulatory Principles for Online Behavioral Advertising established by the Digital Advertising Alliance. You can also opt-out from Facebook and other participating companies through the Digital Advertising Alliance in the USA http://www.aboutads.info/choices/, the Digital Advertising Alliance of Canada in Canada http://youradchoices.ca/ or the European Interactive Digital Advertising Alliance in Europe http://www.youronlinechoices.eu/, or opt-out using your mobile device settings.

    For more information on the privacy practices of Facebook, please visit Facebook's Data Policy: https://www.facebook.com/privacy/explanation

  • Pinterest

    Pinterest remarketing service is provided by Pinterest Inc.

    You can opt-out from Pinterest's interest-based ads by enabling the "Do Not Track" functionality of your web browser or by following Pinterest instructions: http://help.pinterest.com/en/articles/personalization-and-data

    You can learn more about the privacy practices and policies of Pinterest by visiting their Privacy Policy page: https://about.pinterest.com/en/privacy-policy

  • AdRoll

    AdRoll remarketing service is provided by Semantic Sugar, Inc.

    You can opt-out of AdRoll remarketing by visiting this AdRoll Advertising Preferences web page: http://info.evidon.com/pub_info/573?v=1&nt=1&nw=false

    For more information on the privacy practices of AdRoll, please visit the AdRoll Privacy Policy web page: http://www.adroll.com/about/privacy

  • Perfect Audience

    Perfect Audience remarketing service is provided by NowSpots Inc.

    You can opt-out of Perfect Audience remarketing by visiting these pages: Platform Opt-out (http://pixel.prfct.co/coo) and Partner Opt-out (http://ib.adnxs.com/optout).

    For more information on the privacy practices of Perfect Audience, please visit the Perfect Audience Privacy Policy & Opt-out web page: https://www.perfectaudience.com/privacy/index.html

  • AppNexus

    AppNexus remarketing service is provided by AppNexus Inc.

    You can opt-out of AppNexus remarketing by visiting the Privacy & the AppNexus Platform web page: http://www.appnexus.com/platform-policy#choices

    For more information on the privacy practices of AppNexus, please visit the AppNexus Platform Privacy Policy web page: http://www.appnexus.com/platform-policy

Do Not Track Disclosure

We support Do Not Track ("DNT"). Do Not Track is a preference you can set in your web browser to inform websites that you do not want to be tracked.

You can enable or disable Do Not Track by visiting the Preferences or Settings page of your web browser.

Service Providers

We may employ third party companies and individuals to facilitate our Service, to provide the Service on our behalf, to perform Service-related services and/or to assist us in analyzing how our Service is used.

These third parties have access to your Personal Information only to perform specific tasks on our behalf and are obligated not to disclose or use your information for any other purpose.

Compliance With Laws

We will disclose your Personal Information where required to do so by law or subpoena or if we believe that such action is necessary to comply with the law and the reasonable requests of law enforcement or to protect the security or integrity of our Service.

Security

The security of your Personal Information is important to us, and we strive to implement and maintain reasonable, commercially acceptable security procedures and practices appropriate to the nature of the information we store, in order to protect it from unauthorized access, destruction, use, modification, or disclosure.

However, please be aware that no method of transmission over the internet, or method of electronic storage is 100% secure and we are unable to guarantee the absolute security of the Personal Information we have collected from you.

Links To Other Sites

Our Service may contain links to other sites that are not operated by us. If you click on a third party link, you will be directed to that third party's site. We strongly advise you to review the Privacy Policy of every site you visit.

We have no control over, and assume no responsibility for the content, privacy policies or practices of any third party sites or services.

Children's Privacy

Only persons age 18 or older have permission to access our Service. Our Service does not address anyone under the age of 13 ("Children").

We do not knowingly collect personally identifiable information from children under 13. If you are a parent or guardian and you learn that your Children have provided us with Personal Information, please contact us. If we become aware that we have collected Personal Information from a children under age 13 without verification of parental consent, we take steps to remove that information from our servers.

Changes To This Privacy Policy

This Privacy Policy is effective as of November 21, 2016 and will remain in effect except with respect to any changes in its provisions in the future, which will be in effect immediately after being posted on this page.

We reserve the right to update or change our Privacy Policy at any time and you should check this Privacy Policy periodically. Your continued use of the Service after we post any modifications to the Privacy Policy on this page will constitute your acknowledgment of the modifications and your consent to abide and be bound by the modified Privacy Policy.

If we make any material changes to this Privacy Policy, we will notify you either through the email address you have provided us, or by placing a prominent notice on our website.

Contact Us

If you have any questions about this Privacy Policy, please contact us.

` , } app.component('layouts-privacy', objLayoutsPrivacy); const objLayoutsProfile = { template: `
` , data(){ return { s3BaseUrl: 'https://lptprint.s3.amazonaws.com/' } }, methods: { }, created() { this.$root.getAllProperties(this.$root.$route.params.userId) } } app.component('layouts-profile', objLayoutsProfile); const objLayoutsProperty = { template: `
SIMILAR HOMES
` , data(){ }, methods: { openHouseInFuture(openhouse){ const openHouseDate = new Date(openhouse); const currentDate = new Date(); if (openHouseDate > currentDate) { return true; } else { return false; } } }, async created() { await this.$root.getProperty(this.$root.$route.params.propertyId) this.$root.getAllProperties(this.$root.$route.params.userId) }, mounted() { if (this.$root.getCookie('ca') !== '') { this.$root.updatePropertyWebsiteVisits(this.$root.getCookie('ca')) } const queryParams = new URLSearchParams(window.location.search); if (queryParams.get('capture') === 'yes') { let myModal = new bootstrap.Modal(document.getElementById('leadModal'), { keyboard: false }); myModal.show(); } } } app.component('layouts-property', objLayoutsProperty); const objLayoutsSearch = { template: `` , data(){ return { } }, methods: { }, async created() { if (this.$root.$route.params.searchString == 'all') { await this.$root.getAllProperties(this.$root.$route.params.userId) } else { await this.$root.getPropertiesBySearchString(this.$root.$route.params.userId, this.$root.$route.params.searchString) } } } app.component('layouts-search', objLayoutsSearch); const objProfileAgentbio = { template: `

Agent Bio:

{{ agentBio }}

` , props: { agentBio: { type: String, required: true, default: '' } }, data(){ return { } }, mounted(){ } } app.component('profile-agentbio', objProfileAgentbio); const objProfileAgentdetails = { template: `

{{ fullName }}

{{ user.brokerageName }}

{{ user.userTitle ? user.userTitle : user.title }}

{{user.userBio}}
` , props: { user: { type: Object, required: true, default: {} }, isProperty : { type: Boolean, required: false, default: false }, propertyCount : { type: Number, required: false, default: 0 }, }, data(){ return { s3BaseUrl: 'https://lptprint.s3.amazonaws.com/' } }, computed: { fullName: function() { if(typeof this.user.userFirstName !== 'undefined'){ return `${this.user.userFirstName} ${this.user.userLastName}` } else{ return `${this.user.firstName} ${this.user.lastName}` } }, userId(){ if(typeof this.user.appUserId === 'undefined'){ return this.user.userId } else{ return this.user.appUserId } }, img(){ if(typeof this.user.userPhoto !== 'undefined' && this.user.userPhoto != ''){ return this.s3BaseUrl + this.user.userPhoto; } else if(typeof this.user.imgurl !=='undefined' && this.user.imgurl != 'https://cdn.filestackcontent.com/' && this.user.imgurl != ''){ return this.user.imgurl; } else{ return '/assets/images/default-profile-image.jpg' } } }, mounted(){ } } app.component('profile-agentdetails', objProfileAgentdetails); const objProfileCitycontainer = { template: `

Cities

` , props: { properties: { type: Array, required: true, default: [] } }, computed: { filteredCities() { let cities = this.properties.map(property => property.city); return cities.filter(function(item, pos) { return cities.indexOf(item) == pos }) } }, methods: { startSearch(city) { let userId = '' let pathRoute = 'search' if (typeof this.$root.user.appUserId === 'undefined') { userId = `${this.$root.user.userId}` } else { userId = `${this.$root.user.appUserId}` } let parsedSearchString = city.trim() parsedSearchString = parsedSearchString.replaceAll(/[^A-Za-z0-9\s]/g, '') parsedSearchString = parsedSearchString.replaceAll(/\s+/g, '%20') let path = `${userId}/${pathRoute}/${parsedSearchString}` this.$root.goToRoute('/'+path); } } } app.component('profile-citycontainer', objProfileCitycontainer); const objProfileMaplistcontainer = { template: `
For Sale Sold
` , data(){ return { activeTab: 'map' } }, methods: { toggleTab(tabName) { this.activeTab = tabName } } } app.component('profile-maplistcontainer', objProfileMaplistcontainer); const objPropertyAppointment = { template: `
Schedule an Appointment
` , data(){ return { datetime:{ selectedDate: '1900-01-01', selectedTime: '12:15 PM' }, intervals: [], intervalStart: 45, selectedIndex: 4, } }, methods: { setInitialDate() { let today = new Date() let day = String(today.getDate()).padStart(2, '0') let month = String(today.getMonth() + 1).padStart(2, '0') //January is 0! let year = today.getFullYear() let date = `${year}-${month}-${day}` this.datetime.selectedDate = date if (document.getElementById("selectedDate")) document.getElementById("selectedDate").value = date }, setSelectedTime(value, event) { this.datetime.selectedTime = value let index = this.intervals.indexOf(value); this.intervalStart = index-4; var timeButtons = document.getElementsByClassName('time-button'); for (const button of timeButtons) { button.classList.remove('selected-time-button') } event.target.classList.add('selected-time-button'); }, triggerPropUpdate() { // trick an update to the child component with .sync this.datetime.selectedDate = '' if (document.getElementById("selectedDate")) this.datetime.selectedDate = document.getElementById("selectedDate").value }, getIntervals(){ let currentTime = new Date(); currentTime.setHours(0,0,0,0); for(i = 0; i < 96; i++){ let hours = currentTime.getHours(); let minutes = currentTime.getMinutes(); let ampm = hours >= 12 ? 'PM' : 'AM'; hours = hours % 12; hours = hours ? hours : 12; minutes = minutes < 10 ? '0' + minutes : minutes; let interval = hours + ':' + minutes + ' ' + ampm; this.intervals.push(interval); currentTime.setTime(currentTime.getTime() + 15 * 60 * 1000); } }, selectInerval(){ } }, mounted() { this.setInitialDate(); this.getIntervals(); }, computed:{ intervalPeriod(){ if(this.intervalStart < 0){ let temparr1; let temparr2; temparr1 = this.intervals.slice(this.intervals.length + this.intervalStart) temparr2 = this.intervals.slice(0, this.intervalStart + 9); let combinedarr = temparr1.concat(temparr2) return combinedarr; } else if(this.intervalStart > 86){ let temparr1; let temparr2; temparr1 = this.intervals.slice(this.intervalStart, this.intervals.length) temparr2 = this.intervals.slice(0, 9 - temparr1.length); let combinedarr = temparr1.concat(temparr2) return combinedarr; } else{ return this.intervals.slice(this.intervalStart, this.intervalStart+9); } }, intervalRows(){ let row1 = [] let row2 = [] let row3 = [] for(let i = 0; i<9; i++){ if(i<3){ row1.push(this.intervalPeriod[i]); } else if(i<6){ row2.push(this.intervalPeriod[i]); } else{ row3.push(this.intervalPeriod[i]); } } let rows = [row1,row2,row3]; return rows; } } } app.component('property-appointment', objPropertyAppointment); const objPropertyAppointmentmodal = { template: `