PageSourceSearch

https://vidapeps.com/assets/AccountCompanyInvoices-C2IRP10T.js

js vidapeps.com collected 2026-10-04 08:09:39 UTC 4,091 bytes, 1 lines download raw bytes

1import{j as e}from"./vendor-query-CniT1WJL.js";import{bo as b,q as v,G as i,P as p,M as N,_ as k,t as x,V as h,bp as C}from"./index-KjAD5lCC.js";import{r as I,L as f}from"./vendor-react-69GsFwrV.js";import{a as g}from"./AccountSection-B7Ueu1lP.js";import{u as z,C as P,a as S}from"./CompanyPortalShell-S13F8qfG.js";import{a$ as j,i as y,aE as w}from"./vendor-ui-Ad3ANzF6.js";import"./vendor-forms-q6h4WU-p.js";import"./AccountNav-CGK2802V.js";function D(s){return s==="paid"?"mint":s==="overdue"?"research":s==="void"?"outline":"neutral"}function F(){const{access:s,enabled:o}=z(),[c,l]=I.useState(()=>({organizationId:s.organizationId,backStack:[]})),d=c.organizationId===s.organizationId?c:{organizationId:s.organizationId,cursor:void 0,backStack:[]},m=d.cursor,r=d.backStack,u={limit:25,cursor:m},n=b(u,{query:{enabled:o,queryKey:C(u),placeholderData:a=>a}}),t=n.data;return e.jsx(P,{title:"Invoices",children:n.isLoading?e.jsx("div",{className:"space-y-3","aria-busy":"true",children:[0,1,2].map(a=>e.jsx(v,{className:"h-32 rounded-card"},a))}):o?n.isError||!t?e.jsx(S,{message:"We could not load company invoices."}):t.invoices.length===0?e.jsx(i,{children:e.jsx(g,{icon:j,message:"No company invoices",hint:"Issued invoices and their payment history appear here.",bordered:!1})}):e.jsxs(e.Fragment,{children:[e.jsx("section",{className:"space-y-3","aria-label":"Company invoices",children:t.invoices.map(a=>e.jsxs("div",{children:[e.jsx(f,{href:`/account/company/invoices/${a.id}`,className:"block rounded-card focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:e.jsx(i,{className:"motion-safe:transition-[transform,box-shadow] hover:-translate-y-0.5 hover:shadow-lg",children:e.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h2",{className:"font-display text-t3 text-ink",children:a.invoiceNumber}),e.jsx(p,{variant:D(a.status),className:"capitalize",children:a.status.replaceAll("_"," ")}),e.jsxs(p,{variant:"outline",children:["Version ",a.currentVersion]})]}),e.jsxs("p",{className:"mt-1 text-caption text-ink-3",children:[a.issuedAt?`Issued ${N(a.issuedAt)}`:"Draft",a.dueDate?` · Due ${k(a.dueDate)}`:""]}),e.jsxs("p",{className:"mt-1 text-caption text-ink-2",children:["Order #",a.orderId,a.purchaseOrderNumber?` · PO ${a.purchaseOrderNumber}`:""]})]}),e.jsxs("div",{className:"flex items-center justify-between gap-4 sm:block sm:text-right",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-overline uppercase text-ink-3",children:"Balance due"}),e.jsx("p",{className:"font-mono text-t3 font-bold text-ink tabular-nums",children:x(a.balanceDueCents)}),a.netAppliedCents>0?e.jsxs("p",{className:"mt-0.5 text-caption text-ink-3 tabular-nums",children:[x(a.netAppliedCents)," applied"]}):null]}),e.jsx(y,{className:"size-5 text-primary sm:ml-auto sm:mt-2","aria-hidden":"true"})]})]})})}),e.jsxs(f,{href:`/account/orders/${a.orderId}`,className:"mt-1 inline-block pl-1 text-caption text-primary underline hover:text-primary/80",children:["View order #",a.orderId]})]},a.id))}),r.length>0||t.nextCursor?e.jsxs("nav",{"aria-label":"Invoice pages",className:"mt-5 flex items-center justify-between gap-3",children:[e.jsxs(h,{type:"button",size:"sm",variant:"ghost",disabled:r.length===0||n.isFetching,onClick:()=>{l({organizationId:s.organizationId,cursor:r.at(-1),backStack:r.slice(0,-1)})},children:[e.jsx(w,{className:"size-4","aria-hidden":"true"}),"Previous"]}),e.jsxs(h,{type:"button",size:"sm",variant:"ghost",disabled:!t.nextCursor||n.isFetching,onClick:()=>{t.nextCursor&&l({organizationId:s.organizationId,cursor:t.nextCursor,backStack:[...r,m]})},children:["Next",e.jsx(y,{className:"size-4","aria-hidden":"true"})]})]}):null]}):e.jsx(i,{children:e.jsx(g,{icon:j,message:"No company account",hint:"Company invoices appear here once you are a member of a business account. Your personal orders live under Orders.",bordered:!1})})})}export{F 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.