PageSourceSearch

https://sistema.yacamba.com/assets/MainCrmDashboardMob-sAzx05mJ.js

js yacamba.com collected 2026-09-24 11:06:09 UTC 4,521 bytes, 1 lines download raw bytes

1import{jc as E,j1 as F,iV as L,hH as a,iU as T,iZ as _,i_ as I,eI as O,gT as e,b6 as N,e7 as z,bi as R,y as w,de as $,aQ as G,bF as M}from"./index-DfEzlclk.js";import{D as U,g as Q,b as V,e as Z,f as q,c as y}from"./drawer-Ch_49rYl.js";import{functionUpdateSelectedProcess as J,getSelectedProcess as K}from"./utils-CRdGQaGq.js";function se(){var j,v;const{t:r}=E(),c=F();L();const[n,h]=a.useState(!1),{process:D,selected:k,user:f}=T(),C=_(),i=I(),[S,W]=a.useState(D.data),[P,B]=a.useState(k.data),b=(v=(j=f==null?void 0:f.data)==null?void 0:j.user)==null?void 0:v.id,u=O();a.useEffect(()=>{u.subscribe(`private-get-user-selected-process-crm.${b}`),u.bind("fill-user-selected-process-crm",({user_id:t})=>{s()});async function s(){let t=await K();B(t.data)}return()=>{u.unsubscribe(`private-get-user-selected-process-crm.${b}`)}},[]);const o=[];H(S,o);function H(s,t){for(let l=0;l<s.length;l++){const x=s[l];t.push({label:x.name,value:x.id})}}const[g,m]=a.useState(""),[d,p]=a.useState([]);a.useEffect(()=>{n||m("")},[n]),a.useEffect(()=>{i.state==="idle"&&(h(!1),m(""),p([]))},[i.state]);const A=(o==null?void 0:o.filter(s=>s.label.toLowerCase().includes(g.toLowerCase())))||[];return e.jsxs("div",{className:"flex h-full w-full flex-col gap-2 overflow-hidden rounded-t-[30px] bg-surface p-4",children:[e.jsxs("div",{className:"flex items-center justify-start gap-3 pt-5 font-poppins text-[16px] font-medium text-grisHeading",children:[e.jsx(N,{icon:z,className:"size-7 text-grisText",onClick:()=>C(-1)}),"CRM"]}),e.jsx("div",{className:"my-2 flex items-center gap-4",children:e.jsx("div",{children:e.jsx("h2",{className:"font-poppins text-sm font-medium text-grisHeading",children:r("LEADS DASHBOARD")})})}),e.jsxs("div",{className:"flex items-center gap-x-2",children:[e.jsx("div",{className:"flex min-w-0 flex-1 gap-2 overflow-x-auto",children:P.map((s,t)=>e.jsx(R,{to:`/crm-mobile/dashboard/${s.process_id}`,className:c.id==s.process_id?"w-fit shrink-0 rounded-lg bg-grisHeading px-6 py-2 font-semibold text-white dark:bg-violetBlue":"w-fit shrink-0 rounded-lg bg-blancoBox px-6 py-2 font-normal text-softBlack",children:e.jsx("p",{className:"font-roboto text-xs",children:s.name})},t))}),e.jsx("div",{children:e.jsxs(U,{open:n,onOpenChange:h,children:[e.jsx(Q,{asChild:!0,children:e.jsx(w,{variant:"ghost",children:e.jsx(N,{icon:$,size:32,className:"text-3xl text-grisHeading"})})}),e.jsxs(V,{className:"h-[60%]",children:[e.jsxs(Z,{className:"w-full border-b border-blancoBox p-4",children:[e.jsxs(q,{className:"mb-2 mt-[-15px] flex flex-col items-center justify-center",children:[e.jsx("span",{className:"font-poppins text-[14px] font-semibold text-grisHeading",children:r("Procesos Comerciales")}),e.jsx("div",{className:"absolute right-4",children:e.jsx(w,{type:"submit",form:"process-form",className:"bg-transparent font-roboto text-[13px] font-medium text-brandBlue hover:bg-transparent",disabled:d.length===0||i.state==="submitting",children:i.state==="submitting"?r("Guardando..."):r("Guardar")})})]}),e.jsx(y,{className:"hidden"})]}),e.jsx(y,{className:"hidden"}),e.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:e.jsxs(G,{id:"process-form",action:"/crm-mobile/dashboard",method:"post",className:"flex h-full flex-col",children:[e.jsx("input",{type:"hidden",value:"set-process",name:"action"}),e.jsx("div",{className:"mb-4",children:e.jsx("input",{type:"text",placeholder:r("Buscar"),className:"h-10 w-full rounded-xl bg-blancoForms px-4",value:g,onChange:s=>m(s.target.value)})}),e.jsx("div",{className:"flex-1 space-y-2",children:A.map((s,t)=>e.jsxs("div",{className:"flex w-full items-center justify-between gap-2 border-b p-4",children:[e.jsx("label",{htmlFor:s.value,className:"font-roboto text-[12px] font-normal text-grisText",children:s.label}),e.jsx("input",{type:"checkbox",id:s.value,name:"process_ids",className:"relative size-6 appearance-none rounded-full border-2 border-grisDisabled after:absolute after:left-1/2 after:top-1/2 after:h-[10px] after:w-[6px] after:-translate-x-1/2 after:-translate-y-1/2 after:rotate-45 after:border-b-2 after:border-r-2 after:border-white after:opacity-0 checked:border-green-400 checked:bg-green-400 checked:after:opacity-100",value:s.value,checked:d.includes(s.value),onChange:l=>{l.target.checked?p([...d,s.value]):p(d.filter(x=>x!==s.value))}})]},t))})]})})]})]})})]}),e.jsx(M,{})]})}async function te({request:r}){const c=await r.formData();switch(c.get("action")){case"set-process":return await J(c),"1"}}export{te as Action,se 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.