PageSourceSearch

https://congressointercontinental.com.br/_next/static/chunks/37709.aee4c3e80517ee44.js

js congressointercontinental.com.br collected 2026-10-08 22:39:32 UTC 10,005 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[37709],{13041:function(e,a,s){"use strict";s.d(a,{Z:function(){return t}});let t=(0,s(43664).Z)("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]])},80625:function(e,a,s){"use strict";s.r(a),s.d(a,{default:function(){return C}});var t=s(57437),n=s(2265),l=s(29827),i=s(71632),r=s(21770),o=s(24453),c=s(45728),d=s(50086),u=s(89820),h=s(14232),p=s(40698),m=s(17666),x=s(4948),b=s(58896),j=s(31047),v=s(92369),N=s(91723),f=s(65698),y=s(48736);s(75248),s(75220),s(20782);let g=[{key:"PROSPECTING",label:"Prospec\xe7\xe3o",tone:"inf"},{key:"QUALIFICATION",label:"Qualifica\xe7\xe3o",tone:"inf"},{key:"PROPOSAL",label:"Proposta",tone:"warn"},{key:"NEGOTIATION",label:"Negocia\xe7\xe3o",tone:"warn"},{key:"WON",label:"Ganho",tone:"ok"},{key:"LOST",label:"Perdido",tone:"dgr"}],k=e=>new Date(e).toLocaleDateString("pt-BR");function C(e){let{dealId:a,onClose:s}=e,d=(0,h.pm)(),[C,S]=(0,n.useState)(""),[w,q]=(0,n.useState)("NOTE"),[L,z]=(0,n.useState)("notes"),F=(0,l.NL)(),R=(0,c.y)("ops.crm"),O=!R||R.canEdit,E=!R||R.canInteract,{data:Z,isLoading:I,error:T,refetch:D}=(0,i.a)({queryKey:["deal-detail",a],queryFn:async()=>(await o.authApi.get("/crm/deals/".concat(a))).data}),K=(0,r.D)({mutationFn:e=>o.authApi.patch("/crm/deals/".concat(a),{stage:e}),onSuccess:()=>{F.invalidateQueries({queryKey:["deal-detail",a]}),F.invalidateQueries({queryKey:["crm-deals"]}),d.success("Etapa atualizada")}});(0,r.D)({mutationFn:e=>o.authApi.patch("/crm/deals/".concat(a),e),onSuccess:()=>{F.invalidateQueries({queryKey:["deal-detail",a]}),F.invalidateQueries({queryKey:["crm-deals"]}),d.success("Negocia\xe7\xe3o atualizada")}});let Q=(0,r.D)({mutationFn:e=>o.authApi.post("/crm/notes",e),onSuccess:()=>{F.invalidateQueries({queryKey:["deal-detail",a]}),S(""),d.success("Nota adicionada")}}),B=(0,r.D)({mutationFn:e=>o.authApi.post("/crm/proposals",e),onSuccess:()=>{F.invalidateQueries({queryKey:["deal-detail",a]}),d.success("Proposta criada")}});if(I)return(0,t.jsx)(A,{onClose:s,title:"Negocia\xe7\xe3o",children:(0,t.jsxs)("div",{"aria-busy":"true","aria-label":"Carregando",className:"blk",children:[(0,t.jsx)("span",{className:"sk t",style:{width:"40%"}}),(0,t.jsx)("span",{className:"sk sk-cx"}),(0,t.jsx)("span",{className:"sk sk-cx"}),(0,t.jsx)("span",{className:"sk sk-cx"})]})});if(!Z)return(0,t.jsx)(A,{onClose:s,title:"Negocia\xe7\xe3o",children:T?(0,t.jsx)(u.Tv,{msg:(0,u.z2)(T,"A ficha da negocia\xe7\xe3o n\xe3o respondeu."),onRetry:()=>D()}):(0,t.jsx)(u.cs,{icon:(0,t.jsx)(x.Z,{size:26}),title:"Negocia\xe7\xe3o n\xe3o encontrada",action:(0,t.jsx)("button",{type:"button",className:"btn soft",onClick:s,children:"Fechar"})})});let W=Math.max(0,g.findIndex(e=>e.key===Z.stage)),M=g[W],_=Number(Z.value||0),G=Z.notes||[],V=Z.proposals||[];return(0,t.jsxs)(A,{onClose:s,title:Z.title,children:[(0,t.jsxs)("div",{className:"topo",children:[(0,t.jsx)("span",{className:"st ".concat(M.tone),children:M.label}),_>0&&(0,t.jsxs)("span",{className:"vlr",children:["R$ ",_.toLocaleString("pt-BR")]})]}),(0,t.jsxs)("div",{className:"blk",children:[(0,t.jsx)("span",{className:"lb",children:"Pipeline"}),(0,t.jsxs)("div",{className:"prog",children:[(0,t.jsx)("span",{className:"trk",role:"progressbar","aria-valuemin":1,"aria-valuemax":g.length,"aria-valuenow":W+1,"aria-label":"Etapa do funil",children:(0,t.jsx)("span",{className:"fill".concat("WON"===Z.stage?" ok":"LOST"===Z.stage?" dgr":""),style:{width:"".concat((W+1)/g.length*100,"%")}})}),(0,t.jsxs)("span",{className:"tx",children:["etapa ",(0,t.jsx)("span",{className:"num",children:W+1})," de ",(0,t.jsx)("span",{className:"num",children:g.length})]})]}),(0,t.jsx)("div",{className:"sal-chips",role:"group","aria-label":"Trocar etapa",children:g.map(e=>(0,t.jsx)("button",{type:"button",disabled:!O,className:"nu-chip".concat(e.key===Z.stage?" on":""),"aria-pressed":e.key===Z.stage,onClick:()=>O&&K.mutate(e.key),children:e.label},e.key))})]}),(0,t.jsxs)("div",{className:"blk",children:[(0,t.jsx)("span",{className:"lb",children:"Detalhes"}),(0,t.jsxs)("div",{className:"infos",children:[(0,t.jsx)(P,{icon:(0,t.jsx)(b.Z,{size:14}),label:"Probabilidade",value:"".concat(Z.probability||0,"%"),mono:!0}),(0,t.jsx)(P,{icon:(0,t.jsx)(j.Z,{size:14}),label:"Previs\xe3o",value:Z.expectedClose?k(Z.expectedClose):"—",mono:!!Z.expectedClose}),(0,t.jsx)(P,{icon:(0,t.jsx)(v.Z,{size:14}),label:"Fonte",value:Z.source||"—"}),(0,t.jsx)(P,{icon:(0,t.jsx)(N.Z,{size:14}),label:"Criada em",value:k(Z.createdAt),mono:!0})]})]}),(0,t.jsxs)("div",{className:"blk",children:[(0,t.jsx)(m.C,{as:"tabs",ariaLabel:"Notas e propostas",current:L,onSelect:e=>z("proposals"===e?"proposals":"notes"),items:[{key:"notes",label:(0,t.jsxs)(t.Fragment,{children:["Notas ",(0,t.jsx)("span",{className:"num",children:G.length})]}),icon:f.Z},{key:"proposals",label:(0,t.jsxs)(t.Fragment,{children:["Propostas ",(0,t.jsx)("span",{className:"num",children:V.length})]}),icon:y.Z}]}),"notes"===L&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.SeletorTipoNota,{value:w,onChange:q}),(0,t.jsx)("textarea",{value:C,onChange:e=>S(e.target.value),placeholder:"Adicionar nota...","aria-label":"Nota sobre esta negocia\xe7\xe3o",className:"in"}),(0,t.jsx)("button",{type:"button",onClick:()=>Q.mutate({dealId:a,content:C,type:w}),disabled:!C.trim()||Q.isPending||!E,className:"btn pri btnw",children:Q.isPending?"Adicionando…":"Adicionar nota"}),(0,t.jsxs)("div",{className:"lista",children:[G.map(e=>(0,t.jsx)(p.CartaoNota,{note:e},e.id)),0===G.length&&(0,t.jsx)("p",{className:"vazio",children:"Nenhuma nota adicionada"})]})]}),"proposals"===L&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",onClick:()=>B.mutate({dealId:a,title:"Proposta - ".concat(Z.title),value:Z.value}),disabled:B.isPending||!O,className:"btn pri btnw",children:B.isPending?"Criando…":"Criar proposta para esta negocia\xe7\xe3o"}),(0,t.jsxs)("div",{className:"lista",children:[V.map(e=>(0,t.jsxs)("div",{className:"nota prop",children:[(0,t.jsx)(y.Z,{size:18}),(0,t.jsxs)("span",{className:"tx",children:[(0,t.jsx)("b",{children:e.title}),(0,t.jsxs)("i",{children:[e.value&&(0,t.jsxs)("span",{className:"num ok",children:["R$ ",Number(e.value).toLocaleStr
1ing("pt-BR")]}),(0,t.jsx)("span",{children:e.status}),(0,t.jsx)("span",{className:"num",children:k(e.createdAt)})]})]})]},e.id)),0===V.length&&(0,t.jsx)("p",{className:"vazio",children:"Nenhuma proposta vinculada"})]})]})]})]})}function A(e){let{children:a,onClose:s,title:n}=e;return(0,t.jsx)(d.d,{open:!0,onClose:s,size:"lg",title:n,children:(0,t.jsx)("div",{className:"fcd sal-gav",children:a})})}function P(e){let{icon:a,label:s,value:n,mono:l}=e;return(0,t.jsxs)("div",{className:"info",children:[(0,t.jsxs)("i",{children:[a,s]}),(0,t.jsx)("b",{className:l?"num":void 0,children:n})]})}},17666:function(e,a,s){"use strict";s.d(a,{C:function(){return r}});var t=s(57437),n=s(2265),l=s(92451),i=s(10407);function r(e){let{items:a,current:s,ariaLabel:r,as:o="nav",onSelect:c,className:d}=e,u=n.useRef(null),[h,p]=n.useState({transborda:!1,esq:!1,dir:!1}),m=n.useCallback(()=>{let e=u.current;if(!e)return;let a=e.scrollWidth-e.clientWidth,s={transborda:a>1,esq:e.scrollLeft>1,dir:e.scrollLeft<a-1};p(e=>e.transborda===s.transborda&&e.esq===s.esq&&e.dir===s.dir?e:s)},[]);n.useEffect(()=>{let e=u.current;if(!e)return;let a=e.querySelector(".on"),s=requestAnimationFrame(()=>{if(a){let s=e.getBoundingClientRect(),t=a.getBoundingClientRect();t.left<s.left?e.scrollLeft+=t.left-s.left-24:t.right>s.right&&(e.scrollLeft+=t.right-s.right+24)}m()});return()=>cancelAnimationFrame(s)},[s,m]),n.useEffect(()=>{var e;let a=u.current;if(!a)return;a.addEventListener("scroll",m,{passive:!0});let s="undefined"!=typeof ResizeObserver?new ResizeObserver(m):null;s&&(s.observe(a),Array.from(a.children).forEach(e=>s.observe(e))),m();let t=document.fonts;return null==t||null===(e=t.ready)||void 0===e||e.then(m).catch(()=>{}),()=>{a.removeEventListener("scroll",m),null==s||s.disconnect()}},[m,a.length]);let x=e=>{var a,s;let t=u.current;if(!t)return;let n=!(null===(a=(s=window).matchMedia)||void 0===a?void 0:a.call(s,"(prefers-reduced-motion: reduce)").matches);t.scrollBy({left:e*Math.round(.7*t.clientWidth),behavior:n?"smooth":"auto"})},b=e=>{let a=e.icon;return(0,t.jsxs)(t.Fragment,{children:[a?(0,t.jsx)(a,{"aria-hidden":!0}):null,(0,t.jsx)("span",{children:e.label})]})},j="tabs"===o?(0,t.jsx)("div",{ref:u,className:"ftab",role:"tablist","aria-label":r,children:a.map(e=>{let n=e.key===s;return(0,t.jsx)("button",{type:"button",role:"tab","aria-selected":n,tabIndex:n?0:-1,className:n?"on":void 0,onClick:()=>null==c?void 0:c(e.key),onKeyDown:e=>{var t;if("ArrowRight"!==e.key&&"ArrowLeft"!==e.key)return;e.preventDefault();let n=a.findIndex(e=>e.key===s),l=a[(n+("ArrowRight"===e.key?1:a.length-1))%a.length];null==c||c(l.key);let i=null===(t=u.current)||void 0===t?void 0:t.querySelectorAll("button")[a.indexOf(l)];null==i||i.focus()},children:b(e)},e.key)})}):(0,t.jsx)("nav",{ref:u,className:"ftab","aria-label":r,children:a.map(e=>{let a=e.key===s;return(0,t.jsx)("a",{href:e.href,"aria-current":a?"page":void 0,className:a?"on":void 0,children:b(e)},e.key)})});return(0,t.jsxs)("div",{className:["ftab-box",h.transborda?"has-nav":"",d].filter(Boolean).join(" "),children:[j,h.transborda&&(0,t.jsxs)("div",{className:"ftab-nav",children:[(0,t.jsx)("button",{type:"button","aria-label":"Ver abas anteriores",title:"Anteriores",disabled:!h.esq,onClick:()=>x(-1),children:(0,t.jsx)(l.Z,{"aria-hidden":!0})}),(0,t.jsx)("button",{type:"button","aria-label":"Ver pr\xf3ximas abas",title:"Pr\xf3ximas",disabled:!h.dir,onClick:()=>x(1),children:(0,t.jsx)(i.Z,{"aria-hidden":!0})})]})]})}s(54163)},54163:function(){}}]);

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.