PageSourceSearch

https://agenceweb-proenvue.lovable.app/assets/DcVerifyPage-Dlayat8S.js

js agenceweb-proenvue.lovable.app collected 2026-10-03 03:18:56 UTC 6,299 bytes, 1 lines download raw bytes

1import{aE as p,aF as u,j as e,b as l,c as d,aG as m,aK as f,y as h,o as g,ak as b,aH as j,aI as n,S as N,aM as y,aJ as i,s as w}from"./index-D3v-3Oo3.js";const v={3:{label:"Professionnels Approuvés",stars:"★★★☆☆",bg:"from-amber-50 to-orange-50 dark:from-amber-950/30 dark:to-orange-950/30",text:"text-amber-700 dark:text-amber-300",ring:"ring-amber-300"},4:{label:"Experts Certifiés",stars:"★★★★☆",bg:"from-slate-50 to-zinc-50 dark:from-slate-900/40 dark:to-zinc-900/40",text:"text-slate-700 dark:text-slate-200",ring:"ring-slate-400"},5:{label:"Élite des Déménageurs",stars:"★★★★★",bg:"from-yellow-50 to-amber-50 dark:from-yellow-950/30 dark:to-amber-950/30",text:"text-yellow-700 dark:text-yellow-300",ring:"ring-yellow-400"}};function C(){const{siret:r}=p(),{data:s,isLoading:o}=u({queryKey:["dc-verify",r],enabled:!!r,queryFn:async()=>{const{data:a,error:c}=await w.rpc("check_dc_certification",{_siret:r});if(c)throw c;return(Array.isArray(a)?a[0]:a)||null}});if(o)return e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-background to-muted",children:e.jsx("div",{className:"h-8 w-8 border-2 border-primary border-t-transparent rounded-full animate-spin"})});if(!s||!s.grade)return e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-background to-muted p-4",children:e.jsx(l,{className:"max-w-md w-full",children:e.jsxs(d,{className:"p-8 text-center space-y-4",children:[e.jsx(m,{className:"h-16 w-16 text-destructive mx-auto"}),e.jsx("h1",{className:"text-2xl font-bold",children:"Pas de certification DC"}),e.jsxs("p",{className:"text-muted-foreground text-sm",children:["Le SIRET ",e.jsx("span",{className:"font-mono",children:r})," n'a pas de certification Déménageurs Certifiés active."]}),e.jsx("a",{href:"https://demenageurs-certifies.com",className:"inline-block text-primary hover:underline text-sm",children:"En savoir plus sur les certifications DC →"})]})})});const t=v[s.grade],x=s.expires_at&&new Date(s.expires_at)<new Date;return e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-background to-muted p-4",children:e.jsxs(l,{className:`max-w-lg w-full overflow-hidden ring-2 ${t.ring}`,children:[e.jsxs("div",{className:`bg-gradient-to-br ${t.bg} p-8 text-center border-b`,children:[e.jsx(f,{className:`h-14 w-14 mx-auto mb-3 ${t.text}`}),e.jsx("p",{className:"text-5xl mb-3 tracking-widest",children:t.stars}),e.jsx("h1",{className:"text-2xl font-bold",children:"Déménageur Certifié"}),e.jsx("p",{className:`text-lg font-semibold ${t.text} mt-1`,children:t.label})]}),e.jsxs(d,{className:"p-6 space-y-6",children:[x?e.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-lg bg-destructive/10 text-destructive",children:[e.jsx(m,{className:"h-5 w-5"}),e.jsx("span",{className:"text-sm font-medium",children:"Cette certification a expiré"})]}):e.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-lg bg-green-50 dark:bg-green-950/20 text-green-700 dark:text-green-400",children:[e.jsx(h,{className:"h-5 w-5"}),e.jsx("span",{className:"text-sm font-medium",children:"Certification active et vérifiée"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-start justify-between py-2 border-b gap-3",children:[e.jsxs("span",{className:"text-sm text-muted-foreground flex items-center gap-2 shrink-0",children:[e.jsx(g,{className:"h-4 w-4"})," Entreprise"]}),e.jsx("span",{className:"text-sm font-medium text-right",children:s.company_name})]}),e.jsxs("div",{className:"flex items-center justify-between py-2 border-b",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"SIRET"}),e.jsx("span",{className:"text-sm font-mono",children:r})]}),s.zone&&e.jsxs("div",{className:"flex items-center justify-between py-2 border-b",children:[e.jsxs("span",{className:"text-sm text-muted-foreground flex items-center gap-2",children:[e.jsx(b,{className:"h-4 w-4"})," Zone"]}),e.jsxs("span",{className:"text-sm",children:[s.zone,s.country?` • ${s.country}`:""]})]}),s.certified_at&&e.jsxs("div",{className:"flex items-center justify-between py-2 border-b",children:[e.jsxs("span",{className:"text-sm text-muted-foreground flex items-center gap-2",children:[e.jsx(j,{className:"h-4 w-4"})," Certifié depuis"]}),e.jsx("span",{className:"text-sm",children:n(new Date(s.certified_at),"dd MMMM yyyy",{locale:i})})]}),s.expires_at&&e.jsxs("div",{className:"flex items-center justify-between py-2",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"Valide jusqu'au"}),e.jsx("span",{className:"text-sm",children:n(new Date(s.expires_at),"dd MMMM yyyy",{locale:i})})]})]}),(s.transport_license_status||s.transport_license_checked_at)&&e.jsxs("div",{className:`flex items-start gap-2 p-3 rounded-lg text-xs ${s.transport_license_status==="valid"?"bg-green-50 dark:bg-green-950/20 text-green-700 dark:text-green-400":"bg-amber-50 dark:bg-amber-950/20 text-amber-700 dark:text-amber-400"}`,children:[s.transport_license_status==="valid"?e.jsx(N,{className:"h-4 w-4 mt-0.5 shrink-0"}):e.jsx(y,{className:"h-4 w-4 mt-0.5 shrink-0"}),e.jsxs("div",{children:[e.jsxs("p",{className:"font-semibold",children:["Registre des transporteurs :"," ",s.transport_license_status==="valid"?"inscription confirmée":s.transport_license_status==="not_found"?"non trouvée":s.transport_license_status==="expired"?"expirée":"à vérifier"]}),s.transport_license_checked_at&&e.jsxs("p",{className:"opacity-80 mt-0.5",children:["Dernier contrôle : ",n(new Date(s.transport_license_checked_at),"dd MMMM yyyy",{locale:i}),s.country==="FR"?" (DGITM/Pappers)":s.country==="PT"?" (IMT)":""]})]})]}),e.jsxs("div",{className:"text-center pt-4 border-t",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Label délivré par"}),e.jsx("a",{href:"https://demenageurs-certifies.com",target:"_blank",rel:"noopener noreferrer",className:"text-sm font-semibold text-primary hover:underline",children:"🚛 Déménageurs Certifiés"}),e.jsx("p",{className:"text-[10px] text-muted-foreground mt-2",children:"Certification métier vérifiée — KBIS, assurance, licence transport, contrôle BODACC à jour"})]})]})]})})}export{C 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.