PageSourceSearch

https://eigdo.com/build/assets/Show-DvzuF0TL.js

js eigdo.com collected 2026-10-02 01:28:35 UTC 14,893 bytes, 11 lines download raw bytes

vendor: 5,165 bytes, lines 1-11
1import{E as U,c as l,b as r,u as a,h as G,w as x,s as Q,e as c,f as i,t as n,g as u,d as s,i as g,j as L,F as f,l as b,k as D,A as z,n as A,r as w,H as I,x as Y}from"./app-DGg9yO0A.js";import{_ as J}from"./AdminLayout-C124mma3.js";import{_}from"./Button-BzgrTa0j.js";import{A as K}from"./arrow-left-m7RSYxQ4.js";import{C as v}from"./circle-check-BuErEPi2.js";import{M as W}from"./mail-DRh1LadS.js";import{F as M}from"./file-text-BABPrHef.js";import{S as X}from"./sparkles-BTNB7eSU.js";import{S as V}from"./shield-check-4E2-RW5h.js";import{S as N}from"./search-CXB2woOa.js";import{E as ee}from"./external-link-2UCHzzj8.js";import{D as q}from"./download-DQIlmuny.js";import{P as C}from"./paperclip-CxkYhM2D.js";import{B as te}from"./building-2-BxI1ookC.js";/* empty css            */import"./EigdoLogo-Crwv6Up3.js";import"./ticket-B4ytzU_q.js";import"./trash-2-BfQk6oQM.js";import"./users-BNxC0kcH.js";import"./package-B41T9BkD.js";import"./credit-card-t266ijNQ.js";import"./message-square-14lOIAYY.js";import"./webhook-fSBlWWej.js";import"./globe-BtnyxAaG.js";import"./log-out-BMSJiKet.js";import"./menu-D5d11qbY.js";/**
2 * @license lucide-vue-next v1.0.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 se=U("mail-open",[["path",{d:"M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z",key:"1jhwl8"}],["path",{d:"m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10",key:"1qfld7"}]]);/**
7 * @license lucide-vue-next v1.0.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const ie=U("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),ae={key:0,class:"mb-4 rounded-lg border border-emerald-200 bg-emerald-50 px-4 py-2 text-sm text-emerald-800 flex items-center gap-2"},le={class:"grid grid-cols-1 lg:grid-cols-3 gap-5"},oe={class:"lg:col-span-2 space-y-5"},ne={class:"bg-white border rounded-lg p-5"},re={class:"flex items-start justify-between gap-3"},de={class:"text-xl font-semibold text-slate-900"},ce={class:"mt-3 text-sm text-slate-600 space-y-1"},me={class:"bg-white border rounded-lg p-5"},ue={class:"whitespace-pre-wrap break-words text-sm text-slate-700 font-sans"},pe={class:"space-y-5"},xe={key:0,class:"bg-white border rounded-lg p-5"},ge={class:"text-sm font-semibold text-slate-700 mb-3 flex items-center gap-1"},fe={class:"text-xs font-normal text-slate-400"},he={class:"space-y-4"},be={class:"text-sm font-medium text-slate-800 break-words"},_e={key:0,class:"text-xs text-slate-500 flex items-center gap-1 mt-0.5"},ve={key:1,class:"rounded-md bg-emerald-50 border border-emerald-200 p-2 mt-2"},ye={class:"text-xs text-emerald-700 flex items-center gap-1"},ke={class:"text-sm font-medium text-emerald-900"},we={key:0,class:"text-xs text-emerald-600 mt-0.5"},Ce={key:2,class:"rounded-md bg-slate-50 border p-2 mt-2"},Se={class:"text-xs text-slate-500"},je={class:"text-sm font-medium text-slate-800"},De={class:"text-xs text-slate-400 mt-0.5"},ze={key:3,class:"rounded-md bg-indigo-50 border border-indigo-200 p-2 mt-2"},Ae={class:"text-xs font-semibold text-indigo-700 flex items-center gap-1"},Me=["onUpdate:modelValue","onInput"],Ve={key:4,class:"rounded-md bg-slate-50 border border-slate-200 p-2 mt-2"},qe={class:"text-[11px] text-slate-600 flex items-start gap-1"},Ee={class:"font-medium text-slate-700"},$e={class:"mt-2"},Be={class:"relative"},Fe=["onUpdate:modelValue","onInput","placeholder"],Pe={key:0,class:"mt-1 border rounded-md divide-y max-h-48 overflow-y-auto"},Le=["onClick"],Ie={class:"mt-2"},Ne=["href"],Ue=["href"],Oe={key:0,class:"mt-4 pt-3 border-t"},Re={class:"text-xs font-medium text-slate-400 mb-2 flex items-center gap-1"},Te={class:"space-y-1.5"},He={class:"text-slate-600 flex items-center gap-1 min-w-0"},Ze={class:"truncate"},Ge=["href"],Qe={class:"bg-white border rounded-lg p-5"},Ye={class:"text-sm font-semibold text-slate-700 mb-3 flex items-center gap-1"},Je={key:0,class:"text-sm text-slate-400"},Ke={key:1,class:"space-y-2"},We={class:"min-w-0"},Xe={class:"text-sm text-slate-800 truncate flex items-center gap-1"},et={class:"text-xs text-slate-400"},tt={key:0},st=["href"],it={class:"bg-white border rounded-lg p-5"},at={class:"text-sm font-semibold text-slate-700 mb-3 flex items-center gap-1"},lt={key:0,class:"rounded-md bg-emerald-50 border border-emerald-200 p-3 mb-3"},ot={class:"text-xs text-emerald-700 flex items-center gap-1"},nt={class:"text-sm font-medium text-emerald-900"},rt={key:0,class:"text-xs text-emerald-600 mt-0.5"},dt={key:1,class:"rounded-md bg-slate-50 border p-3 mb-3"},ct={class:"text-xs text-slate-500"},mt={class:"text-sm font-medium text-slate-800"},ut={class:"text-xs text-slate-400 mt-0.5"},pt={class:"relative"},xt={key:0,class:"mt-1 border rounded-md divide-y max-h-56 overflow-y-auto"},gt=["onClick"],ft={key:1,class:"mt-1 text-xs text-slate-400"},Tt={__name:"Show",props:{email:Object},setup(d){const y=d,O=Y(),E=A(()=>{var o;return(o=O.props.flash)==null?void 0:o.status}),S=o=>
11o?new Date(o).toLocaleString("es-DO",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):"—",R=()=>{w.post(route("admin.certificate-mailbox.toggle-read",y.email.id),{},{preserveScroll:!0})},$=o=>{w.post(route("admin.certificate-mailbox.assign",y.email.id),{company_id:o},{preserveScroll:!0})},B=(o,t)=>{w.post(o.assign_url,{company_id:t},{preserveScroll:!0})},h=I({}),T=o=>(o||"").replace(/[^A-Za-z0-9]/g,"").slice(0,18),H=o=>{const t=(h[o]||"").trim();confirm("¿Marcar el certificado como solicitado? El cliente recibe aviso para subir su .p12. Si dejas la contraseña vacía se reutiliza la que eligió el cliente.")&&w.post(route("admin.companies.certificate-requested",o),{certificate_password:t},{preserveScroll:!0,onSuccess:()=>{h[o]=""}})},Z=o=>({pending:"Onboarding inicial pendiente",legal_data:"Completando datos legales",plan_selected:"Plan seleccionado",awaiting_issuance:"Esperando que eigDo solicite el certificado",certificate_requested:"Certificado solicitado · el cliente debe subir su .p12",certificate_uploaded:"Certificado subido · en proceso",provisioned:"Aprovisionado",qbo_connected:"QuickBooks conectado",tested:"Prueba e-CF realizada",certified:"Certificado ante DGII"})[o]||o,j=I({}),p=o=>(j[o]||(j[o]={term:"",results:[],searching:!1,timer:null}),j[o]),F=o=>{const t=p(o);clearTimeout(t.timer);const e=t.term.trim();if(e.length<2){t.results=[];return}t.timer=setTimeout(async()=>{t.searching=!0;try{const m=await fetch(route("admin.certificate-mailbox.companies-search",{q:e}),{headers:{Accept:"application/json"},credentials:"same-origin"});t.results=m.ok?await m.json():[]}catch{t.results=[]}finally{t.searching=!1}},300)},P=A(()=>(y.email.attachments||[]).filter(o=>o.is_link)),k=A(()=>(y.email.attachments||[]).filter(o=>!o.is_link));return(o,t)=>(i(),l(f,null,[r(a(G),{title:d.email.subject||"Correo"},null,8,["title"]),r(J,null,{default:x(()=>[r(a(Q),{href:o.route("admin.certificate-mailbox.index"),class:"inline-flex items-center gap-1 text-sm text-slate-500 hover:text-slate-700 mb-4"},{default:x(()=>[r(a(K),{class:"h-4 w-4"}),t[3]||(t[3]=c(" Volver al buzón ",-1))]),_:1},8,["href"]),E.value?(i(),l("div",ae,[r(a(v),{class:"h-4 w-4"}),c(" "+n(E.value),1)])):u("",!0),s("div",le,[s("div",oe,[s("div",ne,[s("div",re,[s("h1",de,n(d.email.subject||"(sin asunto)"),1),r(a(_),{variant:"outline",size:"sm",onClick:R},{default:x(()=>[(i(),g(L(d.email.is_read?a(W):a(se)),{class:"h-4 w-4 mr-1"})),c(" "+n(d.email.is_read?"Marcar no leído":"Marcar leído"),1)]),_:1})]),s("div",ce,[s("div",null,[t[4]||(t[4]=s("span",{class:"text-slate-400"},"De:",-1)),c(" "+n(d.email.from_name)+" <"+n(d.email.from_email)+">",1)]),s("div",null,[t[5]||(t[5]=s("span",{class:"text-slate-400"},"Recibido:",-1)),c(" "+n(S(d.email.received_at)),1)]),s("div",null,[t[6]||(t[6]=s("span",{class:"text-slate-400"},"Carpeta:",-1)),c(" "+n(d.email.folder),1)])])]),s("div",me,[t[7]||(t[7]=s("h2",{class:"text-sm font-semibold text-slate-700 mb-2"},"Contenido",-1)),s("pre",ue,n(d.email.body_text||"(sin cuerpo de texto)"),1)])]),s("div",pe,[d.email.has_cartas?(i(),l("div",xe,[s("h2",ge,[r(a(M),{class:"h-4 w-4 text-red-600"}),t[8]||(t[8]=c(" Cartas aval ",-1)),s("span",fe,"("+n(P.value.length)+")",1)]),s("div",he,[(i(!0),l(f,null,b(P.value,e=>(i(),l("div",{key:e.id,class:"border rounded-md p-3"},[s("div",be,n(e.company_label||"(empresa no indicada)"),1),e.rep_name?(i(),l("div",_e,[r(a(ie),{class:"h-3 w-3"}),c(" "+n(e.rep_name),1)])):u("",!0),e.assigned?(i(),l("div",ve,[s("div",ye,[(i(),g(L(e.assigned.by?a(v):a(X)),{class:"h-3 w-3"})),c(" "+n(e.assigned.by?"Asignada":"Asignada automáticamente"),1)]),s("div",ke,n(e.assigned.label),1),e.assigned.by?(i(),l("div",we,"por "+n(e.assigned.by)+" · "+n(S(e.assigned.at)),1)):u("",!0)])):e.suggestion?(i(),l("div",Ce,[s("div",Se,"Sugerencia ("+n(e.suggestion.confidence)+"%)",1),s("div",je,n(e.suggestion.label),1),s("div",De,n(e.suggestion.reason),1),r(a(_),{size:"sm",class:"mt-2",onClick:m=>B(e,e.suggestion.company_id)},{default:x(()=>[r(a(v),{class:"h-4 w-4 mr-1"}),t[9]||(t[9]=c(" Confirmar empresa ",-1))]),_:1},8,["onClick"])])):u("",!0),e.assigned&&e.assigned.certification_status==="awaiting_issuance"?(i(),l("div",ze,[s("div",Ae,[r(a(V),{class:"h-3.5 w-3.5"}),t[10]||(t[10]=c(" Solicitar certificado al cliente",-1))]),t[12]||(t[12]=s("p",{class:"text-[11px] text-indigo-600/80 mt-0.5 mb-1.5"},"Ya pediste el .p12 al proveedor con este aval. El cliente pasa a «subir certificado» y se le notifica. Si el cliente ya eligió su contraseña, deja el campo vacío para reutilizarla; si la tecleas, usa 8–18 caracteres, solo letras y números.",-1)),D(s("input",{"onUpdate:modelValue":m=>h[e.assigned.company_id]=m,onInput:m=>h[e.assigned.company_id]=T(h[e.assigned.company_id]),type:"text",maxlength:"18",pattern:"[A-Za-z0-9]+",title:"Solo letras y números, sin espacios ni caracteres especiales.",placeholder:"Contraseña (vacío = la del cliente · 8–18 alfanumérica)",class:"w-full border-slate-200 rounded-md text-sm mb-1.5"},null,40,Me),[[z,h[e.assigned.company_id]]]),r(a(_),{size:"sm",onClick:m=>H(e.assigned.company_id)},{default:x(()=>[r(a(V),{class:"h-4 w-4 mr-1"}),t[11]||(t[11]=c(" Marcar certificado solicitado ",-1))]),_:1},8,["onClick"])])):e.assigned?(i(),l("div",Ve,[s("div",qe,[r(a(V),{class:"h-3.5 w-3.5 text-slate-400 shrink-0 mt-px"}
11),s("span",null,[t[13]||(t[13]=c("Etapa: ",-1)),s("span",Ee,n(Z(e.assigned.certification_status)),1)])]),t[14]||(t[14]=s("p",{class:"text-[11px] text-slate-400 mt-0.5"},"«Marcar certificado solicitado» solo aplica cuando la empresa espera que eigDo solicite el certificado.",-1))])):u("",!0),s("div",$e,[s("div",Be,[r(a(N),{class:"h-4 w-4 absolute left-2 top-2.5 text-slate-400"}),D(s("input",{"onUpdate:modelValue":m=>p(e.id).term=m,onInput:m=>F(e.id),type:"text",placeholder:e.assigned?"Cambiar empresa…":"RNC o razón social…",class:"w-full pl-8 border-slate-200 rounded-md text-sm"},null,40,Fe),[[z,p(e.id).term]])]),p(e.id).results.length?(i(),l("ul",Pe,[(i(!0),l(f,null,b(p(e.id).results,m=>(i(),l("li",{key:m.id},[s("button",{type:"button",onClick:ht=>B(e,m.id),class:"w-full text-left px-3 py-2 text-sm hover:bg-indigo-50"},n(m.label),9,Le)]))),128))])):u("",!0)]),s("div",Ie,[e.source_url?(i(),l("a",{key:0,href:e.source_url,target:"_blank",rel:"noopener noreferrer",class:"inline-flex items-center gap-1 text-sm text-indigo-600 hover:text-indigo-800"},[r(a(ee),{class:"h-4 w-4"}),t[15]||(t[15]=c(" Abrir PDF ",-1))],8,Ne)):e.download_url?(i(),l("a",{key:1,href:e.download_url,class:"inline-flex items-center gap-1 text-sm text-indigo-600 hover:text-indigo-800"},[r(a(q),{class:"h-4 w-4"}),t[16]||(t[16]=c(" Descargar ",-1))],8,Ue)):u("",!0)])]))),128))]),k.value.length?(i(),l("div",Oe,[s("div",Re,[r(a(C),{class:"h-3.5 w-3.5"}),t[17]||(t[17]=c(" Otros adjuntos del correo",-1))]),s("ul",Te,[(i(!0),l(f,null,b(k.value,e=>(i(),l("li",{key:e.id,class:"flex items-center justify-between gap-2 text-xs"},[s("span",He,[e.is_pdf?(i(),g(a(M),{key:0,class:"h-3.5 w-3.5 text-slate-400 shrink-0"})):(i(),g(a(C),{key:1,class:"h-3.5 w-3.5 text-slate-400 shrink-0"})),s("span",Ze,n(e.filename),1)]),e.download_url?(i(),l("a",{key:0,href:e.download_url,class:"shrink-0 text-indigo-600 hover:text-indigo-800"},[r(a(q),{class:"h-4 w-4"})],8,Ge)):u("",!0)]))),128))])])):u("",!0)])):(i(),l(f,{key:1},[s("div",Qe,[s("h2",Ye,[r(a(C),{class:"h-4 w-4"}),t[18]||(t[18]=c(" Adjuntos",-1))]),k.value.length?(i(),l("ul",Ke,[(i(!0),l(f,null,b(k.value,e=>(i(),l("li",{key:e.id,class:"flex items-center justify-between gap-2 border rounded-md p-2"},[s("div",We,[s("div",Xe,[e.is_pdf?(i(),g(a(M),{key:0,class:"h-4 w-4 text-red-600 shrink-0"})):(i(),g(a(C),{key:1,class:"h-4 w-4 text-slate-400 shrink-0"})),c(" "+n(e.filename),1)]),s("div",et,[c(n(e.size),1),e.is_pdf?(i(),l("span",tt," · PDF")):u("",!0)])]),s("a",{href:e.download_url,class:"shrink-0"},[r(a(_),{variant:"outline",size:"sm"},{default:x(()=>[r(a(q),{class:"h-4 w-4"})]),_:1})],8,st)]))),128))])):(i(),l("div",Je,"Sin adjuntos."))]),s("div",it,[s("h2",at,[r(a(te),{class:"h-4 w-4"}),t[19]||(t[19]=c(" Empresa",-1))]),d.email.assigned?(i(),l("div",lt,[s("div",ot,[r(a(v),{class:"h-3 w-3"}),t[20]||(t[20]=c(" Asignada",-1))]),s("div",nt,n(d.email.assigned.label),1),d.email.assigned.by?(i(),l("div",rt,"por "+n(d.email.assigned.by)+" · "+n(S(d.email.assigned.at)),1)):u("",!0)])):u("",!0),d.email.suggestion?(i(),l("div",dt,[s("div",ct,"Sugerencia ("+n(d.email.suggestion.confidence)+"%)",1),s("div",mt,n(d.email.suggestion.label),1),s("div",ut,n(d.email.suggestion.reason),1),!d.email.assigned||d.email.assigned.company_id!==d.email.suggestion.company_id?(i(),g(a(_),{key:0,size:"sm",class:"mt-2",onClick:t[0]||(t[0]=e=>$(d.email.suggestion.company_id))},{default:x(()=>[r(a(v),{class:"h-4 w-4 mr-1"}),t[21]||(t[21]=c(" Confirmar esta empresa ",-1))]),_:1})):u("",!0)])):u("",!0),s("div",null,[t[22]||(t[22]=s("label",{class:"block text-xs font-medium text-slate-500 mb-1"},"Buscar / cambiar empresa",-1)),s("div",pt,[r(a(N),{class:"h-4 w-4 absolute left-2 top-2.5 text-slate-400"}),D(s("input",{"onUpdate:modelValue":t[1]||(t[1]=e=>p("email").term=e),onInput:t[2]||(t[2]=e=>F("email")),type:"text",placeholder:"RNC o razón social…",class:"w-full pl-8 border-slate-200 rounded-md text-sm"},null,544),[[z,p("email").term]])]),p("email").results.length?(i(),l("ul",xt,[(i(!0),l(f,null,b(p("email").results,e=>(i(),l("li",{key:e.id},[s("button",{type:"button",onClick:m=>$(e.id),class:"w-full text-left px-3 py-2 text-sm hover:bg-indigo-50"},n(e.label),9,gt)]))),128))])):p("email").term.length>=2&&!p("email").searching?(i(),l("div",ft,"Sin resultados.")):u("",!0)])])],64))])])]),_:1})],64))}};export{Tt 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.