PageSourceSearch

https://app.bloccpay.com/_next/static/chunks/pages/talent/dashboard/receipts-d744ea836f282434.js

js bloccpay.com collected 2026-10-05 06:13:31 UTC 7,939 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="caeb6d1c-6073-48f5-adf9-bdde6bcb168a",e._sentryDebugIdIdentifier="sentry-dbid-caeb6d1c-6073-48f5-adf9-bdde6bcb168a")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9399],{31483:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/talent/dashboard/receipts",function(){return t(31247)}])},42501:function(e,n,t){"use strict";t.d(n,{F:function(){return l}});var r=t(67294),i=t(21878),a=t(13556);let l=()=>{let[e,n]=r.useState(!1),[t,l]=r.useState("");return{copyToClipBoard:(e,r)=>{s(e).catch(()=>c(e)).then(()=>{l("".concat(r||""," Copied!")),n(!0),(0,i.Am)({description:"".concat(r||"Text"," copied to clipboard"),variant:(0,a.yv)(a.pC.SUCCESS)})}).catch(()=>{l("Couldn't copy ".concat(r||"Text","!!!"))}).finally(()=>(setTimeout(()=>n(!1),1e3),t))},copied:e,copiedText:t}},s=async e=>navigator.clipboard.writeText(e),c=e=>new Promise((n,t)=>{var r=document.createElement("textarea");r.value=e,r.style.top="0",r.style.left="0",r.style.position="fixed",document.body.appendChild(r),r.focus(),r.select();try{document.execCommand("copy")}catch(e){t(e)}document.body.removeChild(r),n(e)})},19069:function(e,n,t){"use strict";t.d(n,{Z:function(){return r}});let r=(0,t(31134).Z)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]])},31247:function(e,n,t){"use strict";t.r(n),t.d(n,{__N_SSP:function(){return l},default:function(){return s}});var r=t(85893);t(67294);var i=t(83387),a=t(20793),l=!0;function s(){return(0,r.jsx)(a.Z,{children:(0,r.jsx)(i.Z,{})})}},83387:function(e,n,t){"use strict";t.d(n,{Z:function(){return P}});var r=t(85893),i=t(67294),a=t(30202),l=t(33934),s=t(98029),c=t(98132),o=t(20753),d=t(82570),u=t(83320),h=t(78968),p=t(21878),f=t(13556),x=t(84225),m=t(13322),y=t(21266),v=t(68538),g=t(1698),j=t(63757),b=t(38278),w=t(19069),N=t(11163),_=t(73434),C=t(66740),k=t(4921),S=t(5236);function P(){var e,n;let t=(0,a.NL)(),{isBusiness:P,activeBusinessId:Z}=(0,x.S)(),{push:E,query:D}=(0,N.useRouter)();(0,m.I)({heading:"Receipts"});let[L,T]=i.useState(!1),[F,I]=i.useState(null),K=P?Z:void 0,O="/".concat(P?"business":"talent","/dashboard/receipts"),R=(0,y.h)(),{data:H,isLoading:X,isFetching:q,isError:A}=(0,l.a)({queryKey:["receipts",K,R],queryFn:()=>(0,u.td)({business_id:K,...R}),enabled:!P||!!K}),{mutate:W}=(0,s.D)({mutationFn:u._Z}),{mutate:B}=(0,s.D)({mutationFn:h.R7,onError:async e=>{(0,p.Am)({description:await (0,h.iB)(e,"receipt"),variant:(0,f.yv)(f.pC.ERROR)})}}),M=e=>({Paid:(0,r.jsx)("span",{className:"base-tag--success",children:"Paid"}),Processing:(0,r.jsx)("span",{className:"base-tag--warn",children:"Processing"}),Partial:(0,r.jsx)("span",{className:"base-tag--warn",children:"Partial"}),Canceled:(0,r.jsx)("span",{className:"base-tag--muted",children:"Cancelled"}),Failed:(0,r.jsx)("span",{className:"base-tag--failed",children:"Failed"}),Draft:(0,r.jsx)("span",{className:"base-tag--warn",children:"Draft"}),Overdue:(0,r.jsx)("span",{className:"base-tag--failed",children:"Overdue"})})[e],z=[{accessorKey:"client",header:e=>{let{column:n}=e;return(0,r.jsx)(o.p,{column:n,title:"Client"})},cell:e=>{var n,t;let{row:i}=e;return(0,r.jsx)("div",{className:"base-table__client-info",children:(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{children:null===(n=i.original.client)||void 0===n?void 0:n.company}),(0,r.jsx)("small",{children:null===(t=i.original.client)||void 0===t?void 0:t.country})]})})},enableSorting:!1,enableHiding:!0},{accessorKey:"amount",header:e=>{let{column:n}=e;return(0,r.jsx)(o.p,{column:n,title:"Amount"})},cell:e=>{let{row:n}=e;return(0,r.jsx)("span",{children:(0,d.xG)(n.original.amount,n.original.currency)})},enableSorting:!0,enableHiding:!0},{accessorKey:"updated_at",header:e=>{let{column:n}=e;return(0,r.jsx)(o.p,{column:n,title:"Date"})},cell:e=>{let{row:n}=e;return(0,r.jsx)("p",{className:"invoices-and-receipts-page__faint-text",children:(0,v.Ny)(n.original.updated_at)})},enableSorting:!0,enableHiding:!0},{accessorKey:"status",header:e=>{let{column:n}=e;return(0,r.jsx)(o.p,{column:n,title:"Status"})},cell:e=>{let{row:n}=e;return M(n.original.status)},enableSorting:!0,enableHiding:!0},{accessorKey:"reference",header:e=>{let{column:n}=e;return(0,r.jsx)(o.p,{column:n,title:"Reference"})},cell:e=>{let{row:n}=e,t=n.original.reference,i=t.length>8?"".concat(t.slice(0,6),"...").concat(t.slice(-4)):t;return(0,r.jsx)("button",{onClick:()=>{E("".concat(O,"?reference=").concat(t),void 0,{shallow:!0}),T(!0)},className:"font-mono text-sm text-primary underline underline-offset-4 hover:underline-offset-2 cursor-pointer transition-all",title:t,children:i})},enableSorting:!0,enableHiding:!0},{id:"actions",cell:e=>{let{row:n}=e,t=n.original;return(0,r.jsxs)(j.h_,{open:F===t.reference,onOpenChange:e=>{I(e?t.reference:null),e||E(O)},children:[(0,r.jsx)(j.$F,{asChild:!0,children:(0,r.jsxs)(b.zx,{variant:"ghost",className:"h-8 w-8 p-0",children:[(0,r.jsx)("span",{className:"sr-only",children:"Open menu"}),(0,r.jsx)(w.Z,{className:"h-4 w-4"})]})}),(0,r.jsxs)(j.AW,{children:[(0,r.jsx)(j.Xi,{onClick:()=>{E("".concat(O,"?reference=").concat(null==t?void 0:t.reference)),T(!0),I(null)},children:"Preview"}),(0,r.jsx)(j.Xi,{onClick:()=>{B(null==t?void 0:t.reference),I(null)},children:"Download receipt"}),(0,r.jsx)(j.Xi,{onClick:()=>{W(null==t?void 0:t.reference),I(null)},children:"Download invoice"})]})]})}}];return i.useEffect(()=>{let e=D.reference;e&&"string"==typeof e&&T(!0)},[D.reference]),(0,r.jsxs)(g.Z,{children:[X?(0,r.jsx)(S.Z,{height:400,className:"m-4"}):H&&(null==H?void 0:null===(e=H.data)||void 0===e?void 0:e.length)>0?(0,r.jsx)(c.w,{columns:z,data:(null==H?void 0:H.data)||[],toolbar:[],refetch:()=>
1t.invalidateQueries({queryKey:["receipts",K]}),total:(null==H?void 0:null===(n=H.pagination)||void 0===n?void 0:n.total)||0,isLoading:X,isFetching:q,isError:A,noPagination:!1,noResultsText:"receipts",tableContext:"receipt"}):(0,r.jsx)(k.Z,{title:"No receipts yet",description:"You do not have any receipts yet."}),(0,r.jsx)(_.Vq,{open:L,onOpenChange:T,children:(0,r.jsxs)(_.cZ,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[(0,r.jsx)(_.fK,{children:(0,r.jsx)(_.$N,{children:"Preview Invoice"})}),(0,r.jsx)(C.Z,{viewer:"vendor",closeInvoicePreviewModal:()=>{T(!1),E(O)}})]})})]})}},4921:function(e,n,t){"use strict";var r=t(85893),i=t(67294),a=t(1571);n.Z=e=>{let{title:n,description:t,hasImage:l=!0,image:s,children:c}=e,{theme:o,systemTheme:d}=(0,a.F)(),[u,h]=i.useState(!1);i.useEffect(()=>{h(!0)},[]);let p=u?"system"===o?d:o:"light";return(0,r.jsxs)("div",{className:"empty-state",children:[l&&(0,r.jsx)("div",{className:"empty-state-icon",children:(0,r.jsxs)("svg",{width:"200",height:"200",viewBox:"0 0 200 200",fill:"none",className:"empty-state-svg ".concat("dark"===p?"dark-theme":"light-theme"),children:[(0,r.jsx)("rect",{x:"40",y:"60",width:"120",height:"100",rx:"8",stroke:"currentColor",strokeWidth:"2",fill:"dark"===p?"hsl(var(--card))":"transparent"}),(0,r.jsx)("path",{d:"M60 40 L80 60 L160 60 L160 50 C160 44.4772 155.523 40 150 40 L60 40 Z",fill:"hsl(var(--primary))",opacity:"dark"===p?"0.6":"0.3"}),(0,r.jsx)("circle",{cx:"100",cy:"110",r:"20",stroke:"currentColor",strokeWidth:"2",fill:"dark"===p?"none":"transparent"}),(0,r.jsx)("path",{d:"M90 110 L98 118 L110 100",stroke:"hsl(var(--primary))",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})}),n&&(0,r.jsx)("h3",{children:n}),t&&(0,r.jsx)("p",{children:t}),c]})}}},function(e){e.O(0,[9317,7409,5675,1226,1664,9306,3934,3956,5155,7426,5872,3278,4836,847,1733,2,4225,299,793,286,4329,2888,9774,179],function(){return e(e.s=31483)}),_N_E=e.O()}]);

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.