Upcoming Auctions

Dempsey Auction Company
232 Glenn Milner Blvd | Rome, GA 30161 | 1-800-DEMPSEY

Gavel Numbers: GAL #113 | AAL #1103 | NCAL #774 | SCAL #1278F | TAL #2174 | FLAL #AB4060

RE License Numbers: GA #4921 | AL #65553-0 | NC #C9257 | SC #8153 | TN #9142 | FL #CQ1067235

; const months = ["JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"]; const options = { // weekday: "long", year: "numeric", month: "long", day: "numeric" }; let auctionsCount = 0; if (auctions['projects'] === undefined || auctions['projects']['project'] === undefined) { auctionsCount = 0; } else if (Object.keys(auctions['projects']).length !== undefined) { if (Array.isArray(auctions['projects']['project'])) { auctionsCount = Object.keys(auctions['projects']['project']).length; } else { auctionsCount = 1 } } if (auctionsCount > 0) { document.addEventListener('DOMContentLoaded', function () { let containerCreated = createSliderContainer() if (containerCreated) { for (let $i = 0; $i < auctionsCount; $i++) { let auction; if (auctionsCount === 1) { auction = auctions['projects']['project']; } else { auction = auctions['projects']['project'][$i]; } let auctionInfo = formatAuctionData(auction); createAuctionTile(auctionInfo); } if (showAsSlider) { createSlider(); } } }) } function createSlider() { var splide = new Splide('#marknet-feed .splide', { // type: 'loop', pagination: false, perMove: 1, perPage: 4, breakpoints: { 640: { perPage: 1, }, 768: { perPage: 2, }, 1200: { perPage: 3, }, 1400: { perPage: 4, } } }); splide.mount(); } function createSliderContainer() { let feedDiv = document.querySelector('#marknet-feed') if (!feedDiv) { if(appendFeedTo === false){ return false; } createMarknetFeedDiv() feedDiv = document.querySelector('#marknet-feed') } feedDiv.textContent = ''; let container = document.createElement('section') container.classList.add('splide') container.setAttribute('aria-label', "Auction Slider") let track = document.createElement('div') track.classList.add("splide__track") let list = document.createElement('ul') list.classList.add("splide__list") container.append(track) track.append(list) document.querySelector('#marknet-feed').append(container) return true; } function createAuctionTile(auctionInfo) { let list = document.querySelector('#marknet-feed .splide__list') let singleUrl = auctionInfo['catalog_url'] ?? auctionInfo['project_url'] //Create Card Div let slide = document.createElement('li'); slide.classList.add("splide__slide"); //Create Card Div let card = document.createElement('div'); card.classList.add('marknet-auction-card'); let imageLink = document.createElement('a') imageLink.classList.add('marknet-auction-image-wrapper') imageLink.setAttribute('href', (onlyOneLink) ? singleUrl : auctionInfo['project_url']) let image = document.createElement('img') image.classList.add('marknet-auction-image') image.setAttribute('src', auctionInfo['image']) let body = document.createElement('div') body.classList.add('marknet-auction-body') let title = document.createElement('div') title.classList.add('marknet-auction-title') title.innerHTML = auctionInfo['title'] let subtype = document.createElement('div') subtype.classList.add('marknet-auction-subtype') subtype.textContent = auctionInfo['subtype'] let date = document.createElement('div') date.classList.add('marknet-auction-date') date.textContent = auctionInfo['date'] let locationContainer = document.createElement('div') locationContainer.classList.add('marknet-auction-location') if (auctionInfo['location']['city'] && auctionInfo['location']['state']) { auctionInfo['location']['city'] += ', ' } let city = document.createElement('span') city.classList.add('marknet-auction-city') city.textContent = auctionInfo['location']['city'] let state = document.createElement('span') state.classList.add('marknet-auction-state') state.textContent = auctionInfo['location']['state'] let notes = document.createElement('div') notes.classList.add('marknet-auction-notes') notes.textContent = auctionInfo['notes'] let company = document.createElement('div') company.classList.add('marknet-auction-company') company.textContent = auctionInfo['company'] let linkContainer = document.createElement('div') linkContainer.classList.add('marknet-auction-links') let projectLink = document.createElement('a') projectLink.classList.add('marknet-link', 'marknet-project-link') projectLink.setAttribute('href', auctionInfo['project_url']) projectLink.textContent = 'View ' + auctionInfo['type'] if (auctionInfo['catalog_url'] instanceof Object){ auctionInfo['catalog_url'] = false } let catalogLink = document.createElement('a') catalogLink.classList.add('marknet-link', 'marknet-catalog-link') catalogLink.setAttribute('href', auctionInfo['catalog_url']) catalogLink.textContent = 'View Catalog' let auctionDetailsContainer = document.createElement('div') auctionDetailsContainer.classList.add('marknet-auction-details') card.append(imageLink) imageLink.append(image) card.append(body) body.append(title) body.append(auctionDetailsContainer) auctionDetailsContainer.append(subtype) auctionDetailsContainer.append(date) auctionDetailsContainer.append(locationContainer) locationContainer.append(city) locationContainer.append(state) auctionDetailsContainer.append(notes) auctionDetailsContainer.append(company) auctionDetailsContainer.append(linkContainer) if (onlyOneLink && auctionInfo['catalog_url']) { linkContainer.append(catalogLink) } else { linkContainer.append(projectLink) if (auctionInfo['catalog_url']) { linkContainer.append(catalogLink) } } slide.append(card) list.append(slide) } function formatAuctionData(auction_data) { let data = { "notes": null, "image": null, "date": null, "project_url": auction_data['url'] ?? null, "catalog_url": auction_data['catalog_url'] ?? null, "title": auction_data['title'] ?? null, "type": auction_data['type'] ?? null, "subtype": auction_data['subtype'] ?? null, "company": auction_data['company'] ?? null, "location": { "city": auction_data['location'] ? auction_data['location']['city'] ?? null : null, "state": auction_data['location'] ? auction_data['location']['state'] ?? null : null, }, } data['notes'] = (auction_data instanceof Object) ? '' : auction_data['notes']; let $imageUrl = auction_data['image']; if ($imageUrl) { let pos = $imageUrl.lastIndexOf('/'); $imageUrl = $imageUrl.substring(0, pos) + '/' + $imageUrl.substring(pos + 1); data['image'] = $imageUrl; } auction_data['date'] = auction_data['date'].replace('-', '/'); let current_datetime = new Date(auction_data['date']).toLocaleDateString("en-US", options); data['date'] = auction_data['custom_date'] ?? current_datetime return data } function createMarknetFeedDiv() { let appendToElement = document.querySelector(appendFeedTo) if (appendToElement) { let marknetDiv = document.createElement('div'); marknetDiv.setAttribute('id', 'marknet-feed') appendToElement.append(marknetDiv) } }