PageSourceSearch

https://meetborderless.com/build/assets/index-DYP2tC2Z.js

js meetborderless.com collected 2026-10-09 22:42:56 UTC 8,134 bytes, 1 lines download raw bytes

1import{j as e}from"./app-C1iegf7Q.js";import{h as y,b as h,H as N,L as b,f as m}from"./inertia-BpyZy4w-.js";import{B as u}from"./button-BE4q1_FS.js";import{C as w}from"./case-shell-EPUgGCr1.js";import{a as l}from"./utils-BiuKVCuu.js";import{I as _}from"./inbox-EL5oFErb.js";import{V as C}from"./video-CJHgxwGi.js";import{M as S}from"./map-pin-CrQmCnbd.js";import{C as D}from"./calendar-C9IvR7oY.js";import{C as $}from"./chevron-right-ymZwGCJO.js";/* empty css            */import"./index-CGXdj8xB.js";import"./mobile-chrome-C0ug21w9.js";import"./shield-alert-CGX6PHoz.js";import"./createLucideIcon-wqc1LSWg.js";import"./menu-BR3Nc3Gr.js";import"./x-DQSeRCcH.js";import"./message-circle-c43k_fjC.js";import"./app-logo-Dz0wogSq.js";import"./logo-light-DU4bWymm.js";import"./flash-toast-C6O0iVL1.js";import"./info-D2ZN_yLm.js";import"./triangle-alert-C7AVwNi-.js";import"./circle-x-Bp6Mbpgt.js";import"./circle-check-BMWvzPMx.js";import"./site-announcement-fVSM8f3a.js";import"./use-funnel-tracking-DZvQDmiU.js";import"./journey-labels-D75PCX0v.js";import"./bell-BvDZckLh.js";import"./plus-BJl-aJiX.js";const P={enquiry:{label:"Enquiry",tint:"bg-amber/10 text-amber-ink"},quoted:{label:"Quoted",tint:"bg-amber/10 text-amber-ink"},pending_payment:{label:"Payment due",tint:"bg-amber/10 text-amber-ink"},payment_requested:{label:"Payment requested",tint:"bg-amber/10 text-amber-ink"},confirmed:{label:"Confirmed",tint:"bg-green/10 text-green-ink"},scheduled:{label:"Scheduled",tint:"bg-green/10 text-green-ink"},completed:{label:"Completed",tint:"bg-bg-2 text-ink-3"},cancelled:{label:"Cancelled",tint:"bg-red/10 text-red"},declined:{label:"Declined",tint:"bg-red/10 text-red"},provider_declined:{label:"Declined",tint:"bg-red/10 text-red"},refunded:{label:"Refunded",tint:"bg-bg-2 text-ink-3"}},B=[{key:"",label:"All",statKey:"total"},{key:"confirmed",label:"Confirmed",statKey:"confirmed"},{key:"scheduled",label:"Scheduled",statKey:"scheduled"},{key:"completed",label:"Completed",statKey:"completed"}];function f(o){return o.split(" ").map(r=>r[0]).join("").slice(0,2).toUpperCase()}function M(o,r){if(!o)return null;const n=new Date(o),a=Math.ceil((n.getTime()-r)/864e5),s=n.toLocaleTimeString("en-GB",{hour:"2-digit",minute:"2-digit"});return a===0?`today, ${s}`:a===1?`tomorrow, ${s}`:a>1&&a<7?`${n.toLocaleDateString("en-GB",{weekday:"short"})}, ${s}`:`${n.toLocaleDateString("en-GB",{day:"numeric",month:"short"})}, ${s}`}function de(){const{props:o}=y(),{bookings:r,stats:n,providers:a,filters:s}=o,[x]=h.useState(()=>Date.now()),[k]=h.useState(()=>new Date().toDateString()),p=t=>{const i={};(t.status??s.status)!=null&&(i.status=t.status??s.status),(t.provider??s.provider)!=null&&(i.provider=t.provider??s.provider),m.get("/my-bookings",i,{preserveState:!0,preserveScroll:!0})},v=()=>{const t={};s.status&&(t.status=s.status),m.get("/my-bookings",t,{preserveState:!0,preserveScroll:!0})};return e.jsxs(w,{children:[e.jsx(N,{title:"My bookings"}),e.jsxs("div",{className:"mx-auto w-full max-w-4xl space-y-4 px-4 py-8",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-semibold text-ink",children:"My bookings"}),e.jsx("p",{className:"text-sm text-ink-2 mt-0.5",children:n.total===0?"You haven't booked a specialist yet.":`${n.total} ${n.total===1?"booking":"bookings"} · ${n.scheduled+n.confirmed} upcoming`})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:B.map(t=>{const i=t.statKey?n[t.statKey]:null,d=(s.status??"")===t.key;return e.jsxs("button",{type:"button",onClick:()=>p({status:t.key||void 0}),className:l("flex items-center gap-1.5 rounded-full border px-3 py-1.5 text-xs font-medium whitespace-nowrap transition-colors",d?"border-ink bg-ink text-white":"border-line bg-surface text-ink-2 hover:bg-bg"),children:[t.label,i!=null&&i>0&&e.jsx("span",{className:l("text-2xs px-1.5 py-0.5 rounded-full tabular-nums",d?"bg-white/20 text-white":"bg-line text-ink-3"),children:i})]},t.key)})}),a.length>1&&e.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[e.jsx("span",{className:"text-xs text-ink-3 mr-1",children:"Provider:"}),e.jsx("button",{onClick:v,className:l("px-3 py-1 rounded-full text-xs border transition-colors",s.provider?"bg-surface border-line hover:bg-bg":"bg-ink text-surface border-ink"),children:"All"}),a.map(t=>{const i=s.provider===String(t.id);return e.jsxs("button",{onClick:()=>p({provider:String(t.id)}),className:l("flex items-center gap-1.5 px-3 py-1 rounded-full text-xs border transition-colors",i?"bg-ink text-surface border-ink":"bg-surface border-line hover:bg-bg"),children:[t.avatar?e.jsx("img",{src:t.avatar,alt:"",className:"h-4 w-4 roun
1ded-full object-cover"}):e.jsx("span",{className:"h-4 w-4 rounded-full bg-bg-2 text-ink-2 text-3xs flex items-center justify-center font-medium",children:f(t.name)}),t.name]},t.id)})]}),r.data.length===0?e.jsxs("div",{className:"rounded-card border border-dashed border-line-strong p-10 text-center space-y-3",children:[e.jsx(_,{className:"h-10 w-10 mx-auto text-ink-3"}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-medium text-ink",children:s.provider?"No bookings with this provider":s.status==="confirmed"?"No confirmed bookings":s.status==="scheduled"?"Nothing scheduled":s.status==="completed"?"Nothing completed yet":"No bookings yet"}),!s.status&&!s.provider&&e.jsx("p",{className:"text-sm text-ink-2 mt-1 max-w-md mx-auto",children:"Your bookings with specialists will appear here."})]}),!s.status&&!s.provider&&e.jsx(u,{asChild:!0,size:"sm",children:e.jsx(b,{href:"/specialists",children:"Browse specialists"})})]}):e.jsx("div",{className:"divide-y divide-line rounded-card border border-line bg-surface",children:r.data.map(t=>{const i=P[t.status]??{label:t.status,tint:"bg-bg-2 text-ink-3"},d=M(t.scheduled_at,x),c=t.scheduled_at?new Date(t.scheduled_at):null,j=c!=null&&c.getTime()>x,g=c!=null&&c.toDateString()===k;return e.jsxs(b,{href:`/bookings/${t.uuid}`,className:l("flex items-center gap-3 p-3 hover:bg-bg transition-colors",g&&"border-l-2 border-l-green"),children:[t.provider.avatar?e.jsx("img",{src:t.provider.avatar,alt:t.provider.name,className:"h-10 w-10 rounded-full object-cover shrink-0"}):e.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-bg-2 text-ink-2 font-medium text-sm",children:f(t.provider.name)}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("p",{className:"font-medium text-ink truncate",children:t.service.title}),e.jsx("span",{className:l("text-2xs px-1.5 py-0.5 rounded-tag uppercase tracking-pill font-medium",i.tint),children:i.label})]}),e.jsxs("p",{className:"text-xs text-ink-3 mt-0.5 flex items-center gap-2 flex-wrap",children:[e.jsxs("span",{children:["with ",t.provider.name]}),t.service.duration&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{className:"flex items-center gap-1",children:[t.service.service_type==="virtual"?e.jsx(C,{className:"h-3 w-3"}):e.jsx(S,{className:"h-3 w-3"}),t.service.duration]})]})]})]}),e.jsxs("div",{className:"hidden sm:flex flex-col items-end gap-1 shrink-0",children:[d&&e.jsxs("span",{className:l("text-xs flex items-center gap-1 font-medium",g?"text-green":j?"text-ink":"text-ink-3"),children:[e.jsx(D,{className:"h-3 w-3"})," ",d]}),t.payment?.amount!=null&&e.jsxs("span",{className:"text-xs text-ink-3 tabular-nums",children:[t.payment.currency==="GBP"?"£":"$",Number(t.payment.amount).toFixed(2)]})]}),e.jsx($,{className:"h-4 w-4 text-ink-3 shrink-0"})]},t.uuid)})}),r.last_page>1&&e.jsxs("div",{className:"flex items-center justify-between pt-2",children:[e.jsx(u,{variant:"outline",size:"sm",onClick:()=>r.current_page>1&&m.get("/my-bookings",{...s,page:r.current_page-1}),disabled:r.current_page<=1,children:"Previous"}),e.jsxs("span",{className:"text-sm text-ink-2",children:["Page ",r.current_page," of ",r.last_page]}),e.jsx(u,{variant:"outline",size:"sm",onClick:()=>r.current_page<r.last_page&&m.get("/my-bookings",{...s,page:r.current_page+1}),disabled:r.current_page>=r.last_page,children:"Next"})]})]})]})}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.