Skip to content
PURELive tracking
Your home journeyLoading…

Progress

Powered by PURE · Reply HELP for help, STOP to stop

 var BASE="https://mbnakfrkfwxinhxlisyq.supabase.co/rest/v1"; function H(x){return Object.assign({"Content-Type":"application/json"},window.PureAuth&&PureAuth.authedHeaders?PureAuth.authedHeaders(x||{}):{});} function esc(s){return String(s==null?"":s).replace(/[<>&]/g,function(c){return{"<":"<",">":">","&":"&"}[c];});} var q=new URLSearchParams(location.search),tok=q.get('t'),aid=q.get('a')||'LB-000147'; // resolve by track token (notice) or asset id; demo-friendly fallback to the seeded asset trail function loadByAsset(id){ fetch(BASE+"/pure_assets?id=eq."+id+"&select=*&limit=1",{headers:H()}).then(function(r){return r.ok?r.json():[];}).then(function(a){ var as=a&&a[0]||{label:"8146 County Road 860",listing_id:"PURE-8146",location:"McKinney TX"}; document.getElementById("title").textContent=as.listing_id||"Your home journey"; document.getElementById("addr").textContent=(as.location||"")+(as.label?" \u00b7 "+as.label:""); fetch(BASE+"/pure_asset_events?asset_id=eq."+id+"&select=*&order=created_at.asc&limit=30",{headers:H()}).then(function(r){return r.ok?r.json():[];}).then(function(evs){ var future=["Final walkthrough","Closing & funding"]; var html=evs.map(function(e,i){var last=i===evs.length-1;return '
'+(last?'':'')+'
'+esc(e.stage)+''+(e.created_at||'').slice(0,10)+(e.location?' \u00b7 '+esc(e.location):'')+'
';}).join(''); html+=future.map(function(f){return '
'+f+'upcoming
';}).join(''); document.getElementById("steps").innerHTML=html; if(evs.length){document.getElementById("now").textContent="Now: "+evs[evs.length-1].stage;} }); }); } if(tok){fetch(BASE+"/pure_stage_notices?track_token=eq."+encodeURIComponent(tok)+"&select=*&limit=1",{headers:H()}).then(function(r){return r.ok?r.json():[];}).then(function(n){if(n&&n[0]&&n[0].subject_id){loadByAsset(n[0].subject_id);}else{loadByAsset(aid);}}).catch(function(){loadByAsset(aid);});} else{loadByAsset(aid);}