PageSourceSearch

https://arcanes.be/assets/ProFacturation-Bhtz31wu.js

js arcanes.be collected 2026-09-25 12:39:51 UTC 9,559 bytes, 11 lines download raw bytes

1import{p as y,a as j,u as v,r as n,s as d,j as e,c as w,i as k,a5 as S,bG as B,ar as A,ac as z}from"./index-DrUUimuw.js";import{P as R}from"./ProHeader-CgTBsN4-.js";import{A as F}from"./arrow-left-V7CrFsJW.js";import{A as _}from"./arrow-up-right-B8Ce5D0y.js";import"./useQuery-DwWUaKo1.js";import"./useTranslation-DrxfdMzy.js";import"./rotate-ccw-D161T2jj.js";import"./maximize-2-D7WzHWnW.js";import"./index-BDYaNOtB.js";import"./copy-DrC_A2m3.js";import"./send-q88PUeoO.js";import"./key-DP5dv30E.js";/**
2 * @license lucide-react v0.462.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const E=y("ArrowDownRight",[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]),r={teal:"#0F4C4C",gold:"#D4AF37",border:"#E8E4DE",cream:"#F7F5F2",muted:"#7A7670"};function q(){const l=j(),{language:s}=v(),t=(i,a,c)=>s==="nl"?a:s==="en"?c:i,g=s==="nl"?"nl-BE":s==="en"?"en-GB":"fr-BE",[o,h]=n.useState(null),[p,u]=n.useState([]),[m,x]=n.useState(!0);n.useEffect(()=>{(async()=>{const{data:{user:i}}=await d.auth.getUser();if(!i){l("/login");return}const{data:a}=await d.from("agent_profiles").select("id, agency_id").eq("user_id",i.id).maybeSingle();if(!a){x(!1);return}const{data:c}=await d.rpc("get_pro_credits",{p_user_id:i.id});h(c||0);const{data:f}=await d.from("credit_transactions").select("id, action_key, amount, description, created_at").eq("agent_id",a.id).order("created_at",{ascending:!1}).limit(50);u(f||[]),x(!1)})()},[l]);const b=(i,a)=>{if(a>0)return t("Recharge","Oplading","Top-up");switch(i){case"publish_bien":return t("Annonce + page acheteur","Advertentie + koperspagina","Listing + buyer page");case"generate_report":return t("Rapport 4 pages","Rapport 4 pagina's","4-page report");case"trial_bonus":return t("Bonus essai","Proefbonus","Trial bonus");default:return i.replace(/_/g," ")}};return e.jsxs(e.Fragment,{children:[e.jsx(w,{title:t("Facturation | Arcanes Pro","Facturatie | Arcanes Pro","Billing | Arcanes Pro"),description:t("Gérez vos crédits et votre historique.","Beheer uw credits en geschiedenis.","Manage your credits and history."),noIndex:!0}),e.jsxs("div",{className:"min-h-screen",style:{background:r.cream,fontFamily:"'Outfit', sans-serif"},children:[e.jsx(R,{}),e.jsx("style",{children:`
7          .pro-wrap { padding-top: 64px; position: relative; }
8          .pro-retour { position: sticky; top: 64px; z-index: 20; padding: 6px 24px; margin-bottom: -40px; }
9          .pro-retour button { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 8px; background: rgba(255,255,255,0.9); border: 1px solid rgba(15,76,76,0.08); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: rgba(15,76,76,0.45); font-size: 11px; font-weight: 600; cursor: pointer; font-family: 'Outfit', sans-serif; box-shadow: 0 1px 4px rgba(0,0,0,0.04); transition: all 0.15s; }
10          .pro-retour button:hover { background: white; color: #0F4C4C; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
11        `}),e.jsxs("div",{className:"pro-wrap",children:[e.jsx("div",{className:"pro-retour",children:e.jsxs("button",{onClick:()=>l("/pro/dashboard"),children:[e.jsx(F,{size:12})," ",t("Retour au portail","Terug naar portaal","Back to portal")]})}),e.jsxs("section",{style:{background:r.cream,paddingTop:"40px",paddingBottom:"0",position:"relative",overflow:"hidden"},children:[e.jsx("div",{"aria-hidden":"true",style:{position:"absolute",inset:0,backgroundImage:"radial-gradient(circle, rgba(15,76,76,0.05) 1px, transparent 1px)",backgroundSize:"42px 42px",pointerEvents:"none",maskImage:"radial-gradient(ellipse 60% 60% at 50% 0%, black 0%, transparent 100%)",WebkitMaskImage:"radial-gradient(ellipse 60% 60% at 50% 0%, black 0%, transparent 100%)"}}),e.jsxs("div",{style:{maxWidth:"800px",margin:"0 auto",padding:"0 28px",position:"relative"},children:[e.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:"10px",marginBottom:"14px"},children:[e.jsx("span",{style:{display:"block",width:"32px",height:"2px",background:r.gold,borderRadius:"2px"}}),e.jsx("span",{style:{fontSize:"10px",fontWeight:700,letterSpacing:"2.5px",textTransform:"uppercase",color:"#B88A2E"},children:t("Facturation","Facturatie","Billing")}),e.jsx("span",{style:{display:"block",width:"32px",height:"2px",background:r.gold,borderRadius:"2px"}})]}),e.jsxs("h1",{style:{fontFamily:"'Outfit', sans-serif",fontSize:"clamp(32px, 5vw, 48px)",fontWeight:800,lineHeight:1.1,letterSpacing:"-1.5px",color:"#0D1109",marginBottom:"16
11px"},children:[t("Vos crédits et","Uw credits en","Your credits and"),e.jsx("br",{}),e.jsx("span",{style:{color:r.teal},children:t("historique.","geschiedenis.","history.")})]})]}),e.jsx("div",{style:{maxWidth:"800px",margin:"0 auto",padding:"24px 28px 60px"},children:m?e.jsxs("div",{style:{textAlign:"center",padding:"60px 0"},children:[e.jsx(k,{style:{width:"32px",height:"32px",animation:"spin 1s linear infinite",color:r.teal,margin:"0 auto"}}),e.jsx("style",{children:"@keyframes spin{to{transform:rotate(360deg)}}"})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"12px",marginBottom:"24px"},children:[e.jsxs("div",{style:{padding:"24px",borderRadius:"16px",background:"white",border:`1.5px solid ${r.border}`},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"12px"},children:[e.jsx(S,{style:{width:18,height:18,color:r.gold}}),e.jsx("span",{style:{fontSize:"12px",fontWeight:700,color:r.muted,textTransform:"uppercase",letterSpacing:"0.5px"},children:t("Solde actuel","Huidig saldo","Current balance")})]}),e.jsx("div",{style:{fontSize:"36px",fontWeight:800,color:"#0D1109",letterSpacing:"-1px"},children:o}),e.jsx("div",{style:{fontSize:"12px",color:r.muted,marginTop:"4px"},children:t(`crédit${o!==1?"s":""} disponible${o!==1?"s":""}`,`beschikbare credit${o!==1?"s":""}`,`available credit${o!==1?"s":""}`)})]}),e.jsxs("div",{style:{padding:"24px",borderRadius:"16px",background:"white",border:`1.5px solid ${r.border}`,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"12px"},children:[e.jsx(B,{style:{width:24,height:24,color:r.muted}}),e.jsx("div",{style:{fontSize:"14px",fontWeight:600,color:r.muted,textAlign:"center"},children:t("Recharge disponible bientôt","Oplading binnenkort beschikbaar","Top-up available soon")}),e.jsx("div",{style:{fontSize:"11px",color:"#B8B4AE"},children:t("Paiement Stripe — en préparation","Stripe betaling — in voorbereiding","Stripe payment — coming soon")})]})]}),e.jsx("div",{style:{display:"flex",gap:"8px",marginBottom:"24px",flexWrap:"wrap"},children:[{label:t("Annonce + page acheteur + fiche 1p","Advertentie + koperspagina + fiche 1p","Listing + buyer page + 1p sheet"),cost:t("1 crédit","1 credit","1 credit")},{label:t("Rapport prospection 4 pages","Prospectie rapport 4 pagina's","4-page prospecting report"),cost:t("+1 crédit","+1 credit","+1 credit")},{label:t("Regénération","Hergeneratie","Regeneration"),cost:t("Gratuit","Gratis","Free")},{label:t("Estimation","Schatting","Estimation"),cost:t("Gratuit","Gratis","Free")}].map(i=>e.jsxs("div",{style:{padding:"8px 14px",borderRadius:"10px",background:"white",border:`1px solid ${r.border}`,fontSize:"12px",display:"flex",gap:"8px",alignItems:"center"},children:[e.jsx("span",{style:{color:"#0D1109",fontWeight:500},children:i.label}),e.jsx("span",{style:{color:i.cost===t("Gratuit","Gratis","Free")?"#22c55e":r.gold,fontWeight:700,fontSize:"11px"},children:i.cost})]},i.label))}),e.jsx("div",{style:{marginBottom:"12px"},children:e.jsx("h2",{style:{fontSize:"14px",fontWeight:700,color:"#0D1109",marginBottom:"12px"},children:t("Historique","Geschiedenis","History")})}),p.length===0?e.jsxs("div",{style:{textAlign:"center",padding:"40px",background:"white",borderRadius:"14px",border:`1.5px solid ${r.border}`},children:[e.jsx(A,{style:{width:24,height:24,color:"#B8B4AE",margin:"0 auto 8px"}}),e.jsx("div",{style:{fontSize:"14px",color:r.muted},children:t("Aucune transaction pour le moment","Nog geen transacties","No transactions yet")})]}):e.jsx("div",{style:{background:"white",borderRadius:"14px",border:`1.5px solid ${r.border}`,overflow:"hidden"},children:p.map((i,a)=>e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",padding:"14px 18px",borderBottom:a<p.length-1?`1px solid ${r.border}`:"none"},children:[e.jsx("div",{style:{width:"32px",height:"32px",borderRadius:"8px",background:i.amount>0?"rgba(34,197,94,0.08)":"rgba(239,68,68,0.06)",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:i.amount>0?e.jsx(E,{style:{width:14,height:14,color:"#22c55e"}}):e.jsx(_,{style:{width:14,height:14,color:"#ef4444"}})}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontSize:"13px",fontWeight:600,color:"#0D1109"},children:b(i.action_key,i.amount)}),i.description&&e.jsx("div",{style:{fontSize:"11px",color:r.muted,marginTop:"1px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:i.description})]}),e.jsxs("div",{style:{textAlign:"right",flexShrink:0},children:[e.jsxs("div",{style:{fontSize:"14px",fontWeight:700,color:i.amount>0?"#22c55e":"#ef4444"},children:[i.amount>0?"+":"",i.amount]}),e.jsx("div",{style:{fontSize:"10px",color:"#B8B4AE"},children:new Date(i.created_at).toLocaleDateString(g,{day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"})})]})]},i.id))})]})})]})]})]}),e.jsx(z,{})]})}
11export{q 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.