PageSourceSearch

https://home.co.uk/build/assets/Viewings-C2sdfTwf.js

js home.co.uk collected 2026-10-02 04:54:45 UTC 10,514 bytes, 1 lines download raw bytes

1import{h as z,l as A}from"./index.esm-C8-Okse2.js";import{_ as E}from"./ConsumerLayout-tjDWxGzL.js";import{A as H}from"./AgentPageHeader-Dt-VudZp.js";import{S as M}from"./search-DRuNnyPk.js";import{H as $}from"./house-BnH-U5r3.js";import{B as T}from"./bed-QJSSLFd_.js";import{B as F}from"./bath-BVk93Uiu.js";import{I as G}from"./info-CloN_0vb.js";import{E as j}from"./external-link-NmwK4u3x.js";import{P as v}from"./phone-_6yHEIlu.js";import{M as I}from"./LoginModal-BMeMPme8.js";import{c as D,o as s,f as n,d as i,u as d,w as N,b as o,h as m,F as c,t as a,j as P,a as S,n as V,g as l}from"./runtime-dom.esm-bundler-BFbfmLfl.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./app-Dvzl3QXw.js";/* empty css            */import"./echo-Cx0reEeH.js";import"./listingImageRemint-DdzXd0Qc.js";import"./chevron-left-BqH44XVe.js";import"./createLucideIcon-H8VPBXjN.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./x-gRRgfAF8.js";import"./piggy-bank-C2v63urG.js";import"./chevron-down-CV0HnoXa.js";import"./check-CYOYuDcY.js";import"./sparkles-B9lXBQmj.js";import"./circle-alert-ByG7DPjo.js";import"./key-round-CDOVxIO1.js";import"./shield-xlcuWJAH.js";import"./loader-circle-BOF4Rcg5.js";import"./SavePropertyModal-C2h6jxhG.js";import"./lock-BQyHxR7C.js";import"./file-text-CxktRaAP.js";import"./map-pin-7NBWNz8E.js";import"./AnimatedLogoMini-B6zedGia.js";/* empty css                                                                         */import"./house-heart-BOl5N1QW.js";import"./clipboard-check-bysH7gwo.js";import"./arrow-left-right-CgpBd7hI.js";import"./calendar-clock-BpBm_Pbs.js";import"./bell-BnmfLsAP.js";import"./shield-check-CDldKyok.js";import"./file-key-D00z6oeF.js";import"./chevron-right-DQnPt1ZE.js";import"./arrow-left-C_eslZG5.js";import"./menu-C8BKYvlP.js";import"./settings-kph8Slzw.js";import"./credit-card-Dn2M7EkH.js";import"./log-out-CydYSR5l.js";import"./ellipsis-pYE_Svwi.js";/* empty css                                                                        */const O={class:"max-w-5xl mx-auto px-4 sm:px-6 py-6 sm:py-8"},U={key:0,class:"bg-gradient-to-br from-pink-50/60 via-white to-orange-50/40 border border-pink-100/60 rounded-3xl p-8 sm:p-12 text-center"},Y={key:0,class:"mb-8"},q={class:"text-sm font-semibold text-stone-800 uppercase tracking-wide mb-3"},W={class:"space-y-3"},Z={class:"flex gap-4"},J={class:"w-20 h-20 sm:w-28 sm:h-28 rounded-xl bg-stone-100 flex-shrink-0 overflow-hidden flex items-center justify-center"},K=["src","alt"],Q={class:"min-w-0 flex-1"},R={class:"flex items-start justify-between gap-3"},X={class:"min-w-0"},tt={class:"font-semibold text-stone-800 break-words"},et={class:"text-sm text-stone-500 mt-0.5"},st={key:0,class:"flex flex-wrap items-center gap-x-4 gap-y-1 mt-2 text-xs text-stone-500"},ot={key:0,class:"font-semibold text-stone-700"},rt={key:1,class:"inline-flex items-center gap-1"},nt={key:2,class:"inline-flex items-center gap-1"},at={key:3},lt={key:1,class:"flex items-start gap-2 mt-3 text-xs text-stone-500 bg-stone-50 rounded-xl p-2.5"},it={class:"font-medium text-stone-600"},dt={class:"flex flex-wrap items-center gap-2 mt-3"},mt=["href"],pt=["href"],ct=["href"],ut={key:2,class:"text-xs text-stone-400 mt-2"},ht={key:0},xt={key:1},ft={class:"text-sm font-semibold text-stone-800 uppercase tracking-wide mb-3"},_t={class:"space-y-3"},bt={class:"flex gap-4"},yt={class:"w-16 h-16 rounded-xl bg-stone-100 flex-shrink-0 overflow-hidden flex items-center justify-center"},gt=["src","alt"],kt={class:"min-w-0 flex-1"},wt={class:"flex items-start justify-between gap-3"},Bt={class:"min-w-0"},$t={class:"font-medium text-stone-700 break-words"},jt={class:"text-xs text-stone-400 mt-0.5"},Dt={key:0,class:"text-xs text-stone-500 mt-2"},Nt={key:0},Pt={key:1,class:"text-xs text-stone-500 mt-2"},St=["href"],De={__name:"Viewings",props:{viewings:{type:Array,default:()=>[]}},setup(f){const _=f,h=D(()=>_.viewings.filter(e=>!e.is_past&&e.status!=="cancelled").slice().reverse()),x=D(()=>_.viewings.filter(e=>e.is_past||e.status==="cancelled")),b={pending:"bg-amber-50 text-amber-700 border-amber-200",confirmed:"bg-emerald-50 text-emerald-700 border-emerald-200",completed:"bg-stone-100 text-stone-600 border-stone-200",cancelled:"bg-red-50 text-red-700 border-red-200",no_show:"bg-red-50 text-red-700 border-red-200",declined:"bg-stone-100 text-stone-600 border-stone-200"},y=e=>b[e]??b.pending,C=e=>/^\d{4}-\d{2}-\d{2}$/.test(e),g=e=>{const r=e.viewing_at||e.preferred_date;if(!r)return"Date to be confirmed";const t=new Date(r).toLocaleDateString("en-GB",{weekday:"long",day:"numeric",month:"long",year:"numeric",...C(r)?{timeZone:"UTC"}:{}});if(e.viewing_at){const u=new Date(e.viewing_at).toLocaleTimeString("en-GB",{hour:"2-digit",minute:"2-digit"});return`${t} at ${u}`}return e.preferred_time?`${t} at ${e.preferred_time}`:t},L=e=>{const r=g(e);return e.status==="pending"&&!e.viewing_at&&e.preferred_date?`${r} (to be confirmed)`:r},p=e=>{var t;const r=((t=e.agent)==null?void 0:t.name)||"the agent";return e.status==="declined"?{label:"The agent couldn't take this viewing",sub:null}:e.status==="pending"&&e.accepted_at?{label:`Accepted — ${r} will contact you to arrange a time`,sub:null}:e.status==="pending"?{label:"Awaiting agent response",sub:`Your viewing isn't booked in yet — ${r} will be in touch.`}:null},k=e=>
1e?`£${Number(e).toLocaleString("en-GB")}`:null;return(e,r)=>(s(),n(c,null,[i(d(z),{title:"My viewings"}),i(E,null,{default:N(()=>[o("div",O,[i(H,{title:"Your ",shine:"viewings",subtitle:"Every viewing you've requested through Home.co.uk, with the listing and the agent's details.",class:"!pt-0 !pb-2 sm:!pb-4 mb-4"}),f.viewings.length?(s(),n(c,{key:1},[h.value.length?(s(),n("section",Y,[o("h2",q," Upcoming ("+a(h.value.length)+") ",1),o("div",W,[(s(!0),n(c,null,P(h.value,t=>{var u,w,B;return s(),n("article",{key:t.id,class:"bg-white border border-stone-100 rounded-2xl p-4 sm:p-5 hover:shadow-md hover:border-stone-200 transition-all"},[o("div",Z,[o("div",J,[t.thumbnail_url?(s(),n("img",{key:0,src:t.thumbnail_url,alt:t.address,class:"w-full h-full object-cover",loading:"lazy"},null,8,K)):(s(),S(d($),{key:1,class:"w-7 h-7 text-stone-300"}))]),o("div",Q,[o("div",R,[o("div",X,[o("h3",tt,a(t.address||"Property"),1),o("p",et,a(L(t)),1)]),o("span",{class:V(["px-2.5 py-1 text-xs font-medium rounded-full border flex-shrink-0",y(t.status)])},a(t.status_display),3)]),t.property&&Object.keys(t.property).length?(s(),n("div",st,[k(t.property.price)?(s(),n("span",ot,a(k(t.property.price)),1)):l("",!0),t.property.bedrooms?(s(),n("span",rt,[i(d(T),{class:"w-3.5 h-3.5"}),m(a(t.property.bedrooms),1)])):l("",!0),t.property.bathrooms?(s(),n("span",nt,[i(d(F),{class:"w-3.5 h-3.5"}),m(a(t.property.bathrooms),1)])):l("",!0),t.property.property_type?(s(),n("span",at,a(t.property.property_type),1)):l("",!0)])):l("",!0),p(t)?(s(),n("div",lt,[i(d(G),{class:"w-3.5 h-3.5 mt-0.5 flex-shrink-0 text-stone-400"}),o("span",null,[o("span",it,a(p(t).label),1),p(t).sub?(s(),n(c,{key:0},[r[4]||(r[4]=o("br",null,null,-1)),m(a(p(t).sub),1)],64)):l("",!0)])])):l("",!0),o("div",dt,[t.listing_url?(s(),n("a",{key:0,href:t.listing_url,class:"inline-flex items-center gap-1.5 px-3 py-2 min-h-[44px] sm:min-h-0 sm:py-1.5 text-xs font-medium text-pink-600 hover:text-pink-700 bg-pink-50 hover:bg-pink-100 rounded-lg transition-colors"},[i(d(j),{class:"w-3.5 h-3.5"}),r[5]||(r[5]=m(" View property ",-1))],8,mt)):l("",!0),(u=t.agent)!=null&&u.phone?(s(),n("a",{key:1,href:`tel:${t.agent.phone}`,class:"inline-flex items-center gap-1.5 px-3 py-2 min-h-[44px] sm:min-h-0 sm:py-1.5 text-xs font-medium text-stone-600 hover:text-stone-800 bg-stone-50 hover:bg-stone-100 rounded-lg transition-colors"},[i(d(v),{class:"w-3.5 h-3.5"}),m(" "+a(t.agent.phone),1)],8,pt)):l("",!0),(w=t.agent)!=null&&w.email?(s(),n("a",{key:2,href:`mailto:${t.agent.email}`,class:"inline-flex items-center gap-1.5 px-3 py-2 min-h-[44px] sm:min-h-0 sm:py-1.5 text-xs font-medium text-stone-600 hover:text-stone-800 bg-stone-50 hover:bg-stone-100 rounded-lg transition-colors"},[i(d(I),{class:"w-3.5 h-3.5"}),r[6]||(r[6]=m(" Email agent ",-1))],8,ct)):l("",!0)]),(B=t.agent)!=null&&B.name?(s(),n("p",ut,[m(" Booked with "+a(t.agent.name),1),t.agent.branch_location?(s(),n("span",ht,", "+a(t.agent.branch_location),1)):l("",!0)])):l("",!0)])])])}),128))])])):l("",!0),x.value.length?(s(),n("section",xt,[o("h2",ft," Past ("+a(x.value.length)+") ",1),o("div",_t,[(s(!0),n(c,null,P(x.value,t=>(s(),n("article",{key:t.id,class:"bg-white border border-stone-100 rounded-2xl p-4 hover:border-stone-200 transition-all"},[o("div",bt,[o("div",yt,[t.thumbnail_url?(s(),n("img",{key:0,src:t.thumbnail_url,alt:t.address,class:"w-full h-full object-cover",loading:"lazy"},null,8,gt)):(s(),S(d($),{key:1,class:"w-6 h-6 text-stone-300"}))]),o("div",kt,[o("div",wt,[o("div",Bt,[o("h3",$t,a(t.address||"Property"),1),o("p",jt,a(g(t)),1)]),o("span",{class:V(["px-2.5 py-1 text-xs font-medium rounded-full border flex-shrink-0",y(t.status)])},a(t.status_display),3)]),t.cancellation_reason?(s(),n("p",Dt,[r[7]||(r[7]=m(" Cancelled",-1)),t.cancelled_by?(s(),n("span",Nt," by "+a(t.cancelled_by),1)):l("",!0),m(": "+a(t.cancellation_reason),1)])):t.status==="declined"?(s(),n("p",Pt,a(p(t).label),1)):l("",!0),t.listing_url?(s(),n("a",{key:2,href:t.listing_url,class:"inline-flex items-center gap-1.5 mt-2 text-xs font-medium text-pink-600 hover:text-pink-700"},[i(d(j),{class:"w-3.5 h-3.5"}),r[8]||(r[8]=m(" View property ",-1))],8,St)):l("",!0)])])]))),128))])])):l("",!0)],64)):(s(),n("div",U,[r[1]||(r[1]=o("div",{class:"mx-auto mb-4 flex size-20 items-center justify-center overflow-hidden rounded-2xl bg-white ring-1 ring-stone-100"},[o("img",{src:"/images/icons/moments/no-viewings.webp",alt:"",class:"h-full w-full object-cover",loading:"lazy"})],-1)),r[2]||(r[2]=o("h2",{class:"text-lg font-semibold text-stone-800"},"No viewings booked yet",-1)),r[3]||(r[3]=o("p",{class:"text-sm text-stone-500 mt-2 max-w-md mx-auto"}," When you book a viewing on a property, it'll appear here with the agent's contact details so you can always find it again. ",-1)),i(d(A),{href:"/account/search",class:"inline-flex items-center justify-center gap-2 px-5 py-2.5 min-h-[44px] mt-6 bg-gradient-to-r from-pink-500 via-rose-500 to-orange-500 text-white text-sm font-medium rounded-xl hover:shadow-lg hover:shadow-
1pink-500/25 transition-all"},{default:N(()=>[i(d(M),{class:"w-4 h-4"}),r[0]||(r[0]=m(" Find a property ",-1))]),_:1})]))])]),_:1})],64))}};export{De as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.