PageSourceSearch

https://arratreeni.fi/_next/static/chunks/pages/invoices-42b133b46c2dc9f0.js

js arratreeni.fi collected 2026-10-02 01:02:39 UTC 5,265 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9936],{17822:(e,r,t)=>{"use strict";t.d(r,{$g:()=>l,B9:()=>b,C:()=>g,H0:()=>u,Lz:()=>o,PW:()=>h,TF:()=>m,US:()=>p,YB:()=>d,de:()=>x,el:()=>f,s6:()=>s,up:()=>c});var i=t(3251),n=t(89700);let a={sek:{minimumFractionDigits:0,maximumFractionDigits:2}},s={idle:"",checking:"!border-amber-400 !ring-1 !ring-amber-400 focus:!border-amber-400 focus:!ring-amber-400",invalid:"!border-red-500 !ring-1 !ring-red-500 focus:!border-red-500 focus:!ring-red-500",expired:"!border-red-500 !ring-1 !ring-red-500 focus:!border-red-500 focus:!ring-red-500",valid:"!border-emerald-500 !ring-1 !ring-emerald-500 focus:!border-emerald-500 focus:!ring-emerald-500"};function c(e,r){let{currency:t,value:i}=r,n={style:"currency",currency:t};return a[t]&&Object.assign(n,a[t]),Intl.NumberFormat(e,n).format(i/100)}function l(e,r,t,i){let n=c(r,t);return i?[n,e("subscription:for-each-short"),e(`subscription:interval_short-${i.interval}`,{count:i.intervalCount})]:[n,"",""]}function o(e){return Intl.DateTimeFormat(e??"fi",{day:"numeric",month:"numeric",year:"numeric"})}function u(e){let r=Math.floor(e/3600),t=Math.floor((e-3600*r)/60);return`${r}h ${t}min`}function d(e){let{locale:r}=(0,n.useRouter)();return(0,i.jsx)(i.Fragment,{children:e.date?new Date(e.date).toLocaleDateString(r??"fi"):e.alternative})}function m(e){let{locale:r}=(0,n.useRouter)();return(0,i.jsx)(i.Fragment,{children:e.date?new Date(e.date).toLocaleString(r??"fi"):e.alternative})}function h(e){return e.charAt(0).toUpperCase()+e.substring(1)}function x(e){let r="Purple";if("string"==typeof e)switch(e.toLowerCase()){case"arratreeni":r="Purple";break;case"assatreeni":r="Orange";break;case"allatreeni":r="Yellow";break;case"kootreeni":r="Blue";break;case"pro":r="Green"}else r=e?.data.product_color??"Purple";switch(r){case"Orange":r="#f97516";break;case"Yellow":r="#facc15";break;case"Blue":r="#0ea4e9";break;case"Green":r="#334839";break;default:r="#7c3aed"}return r}function f(e,r=2){let t=Math.pow(10,r);return Math.round(e*t)/t}function g(e){navigator.clipboard.writeText(e)}let p=["Tammikuu","Helmikuu","Maaliskuu","Huhtikuu","Toukokuu","Kes\xe4kuu","Hein\xe4kuu","Elokuu","Syyskuu","Lokakuu","Marraskuu","Joulukuu"],v=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function b(e){return!!e&&v.test(e.trim())}},32202:(e,r,t)=>{"use strict";t.r(r),t.d(r,{__N_SSG:()=>f,default:()=>g});var i=t(3251),n=t(86290),a=t(53461),s=t(86553),c=t(87895),l=t(20422),o=t(97088),u=t(17822),d=t(55246),m=t.n(d),h=t(8309),x=t.n(h),f=!0;function g(e){let{t:r,lang:t}=(0,c.B)(),{user:d}=(0,n.As)(),{data:h,loading:f}=(0,l.EFG)({variables:{input:{limit:10}},skip:!d});function g(e){function n(e){let r=new Date(e);return`${r.getDate()}.${r.getMonth()+1}`}return(0,i.jsxs)("div",{className:"p-1 mt-1 mb-1",children:[(0,i.jsxs)("div",{className:"flex",children:[(0,i.jsxs)("p",{className:"flex-1 text-gray-400 font-bold",children:["#",e.invoice.invoiceNumber]}),(0,i.jsx)("span",{className:"w-96"}),(0,i.jsx)("p",{className:"flex-1 text-right",children:(0,i.jsx)("b",{children:new Date(e.invoice.createdAt).toLocaleDateString(t)})})]}),(0,i.jsxs)("div",{className:"flex",children:[(0,i.jsxs)("div",{className:"flex-1 mt-2 align-center",children:[e.invoice.lines?.map(e=>{let{description:r,period:t,quantity:a,price:s,product:c}=e;return c?(0,i.jsxs)("div",{className:"flex gap-2 mb-2",children:[(0,i.jsx)(m(),{className:"rounded",src:c.icon,alt:c.name,width:24,height:24}),(0,i.jsx)("div",{className:"items-center justify-center",children:(0,i.jsx)("p",{children:`${a}x ${c?.name} (${n(t.start)} - ${n(t.end)})`})})]},e.id):(0,i.jsxs)("div",{className:"flex gap-1 mb-2",children:[(0,i.jsx)("div",{style:{width:"28px"},children:(0,i.jsx)(m(),{style:{margin:"auto"},src:"/images/DUDE_transparent.png",alt:"DUDE_transparent.png",width:14,height:28})}),(0,i.jsx)("div",{className:"items-center justify-center",children:(0,i.jsx)("p",{className:"",children:`${r} ${a}kk`})})]},e.id)}),e.invoice.discounts?.map(e=>(0,i.jsxs)("p",{className:"md:ml-8",children:[e.coupon.name,": -",e.coupon.percentOff,"%"]},e.id)),(0,i.jsx)("div",{className:"flex-1",children:(0,i.jsxs)("p",{className:"flex-1",children:[r("common:text_total")," ",(0,u.up)(t,e.invoice.total)]})})]}),(0,i.jsx)("div",{className:"relative w-36",children:(0,i.jsx)("div",{className:"absolute",style:{bottom:"0px",right:"0px"},children:e.invoice.charge?.receiptUrl?(0,i.jsx)(x(),{className:"float-right mt-2 px-4 py-2 text-sm font-bold rounded-lg border text-white bg-violet-600 hover:bg-violet-700 border-transparent ring-violet-600 hover:ring-violet-700",target:"_blank",href:e.invoice.charge.re
1ceiptUrl??"",children:r("common:text_receipt")}):null})})]})]})}return(0,i.jsx)(a.A,{...e,children:(0,i.jsxs)(s.A,{children:[f&&(0,i.jsx)(o.A,{overlay:!0}),(0,i.jsx)("h1",{className:"text-4xl font-bold mb-4",children:r("my-account:headline-invoices")}),(0,i.jsxs)("div",{className:"divide-y",children:[h?.me.invoices.map(e=>(0,i.jsx)(g,{invoice:e},e.id)),h?.me.invoices.length==0&&(0,i.jsx)("p",{children:r("my-account:text-no-invoices")})]})]})})}},49837:(e,r,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/invoices",function(){return t(32202)}])}},e=>{e.O(0,[2995,5246,9820,1674,3461,636,6593,8792],()=>e(e.s=49837)),_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.