PageSourceSearch

https://operadora.app.br/_next/static/chunks/8609.2de3506bba6cb686.js

js operadora.app.br collected 2026-10-02 00:48:19 UTC 12,890 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8609],{15885:function(e,o,r){r.d(o,{Kj:function(){return i},N0:function(){return t},fS:function(){return a},i3:function(){return n},yY:function(){return s}});var l=r(65648);async function n(e){return(await l.Z.post("/api/protocoloManual/inserir",e)).data}async function t(e){return(await l.Z.post("/api/protocoloManual/listar",e)).data}async function i(e){let{id:o,payload:r}=e;return(await l.Z.post("/api/protocoloManual/abrirProtocolo/".concat(o),r)).data}async function a(e){let{id:o,payload:r}=e;return(await l.Z.post("/api/protocoloManual/editar/".concat(o),r)).data}async function s(e){let{id:o,payload:r}=e;return(await l.Z.post("/api/protocoloManual/excluir/".concat(o),r)).data}},98609:function(e,o,r){r.r(o),r.d(o,{default:function(){return _}});var l=r(11670),n=r(56905),t=r(55646),i=r(99803),a=r(3845),s=r(43089),c=r(73584),d=r(56250),u=r(51666),p=r(81081),m=r(14539),x=r(15362),v=r(12229),f=r(77585),h=r(18818),j=r(77377),S=r(17213),y=r(98426),b=r(72322),g=r(43558),Z=r(95568),C=r(97952),E=r(93487),w=r(502),k=r(80426),I=r(15885),A=r(93677),N=r(70791),P=r(84084),D=e=>{let{protocolo:o,dadosLinha:r,dadosOperadora:t,dadosUser:i,setValue:a,control:s,isLoadingProtool:c}=e,d=e=>{var o,l,n;if(!e)return"";let a=e.split("."),s=a[0],c=a[1];switch(s){case"user":return null!==(o=null==i?void 0:i[c])&&void 0!==o?o:"";case"operadora":return null!==(l=null==t?void 0:t[c])&&void 0!==l?l:"";case"linha":return null!==(n=null==r?void 0:r[c])&&void 0!==n?n:"";default:return""}},u=e=>e&&Array.isArray(e.campos)?e.campos.map(e=>{let o=e.label||"Campo ".concat(e.id);if("string"===e.fieldType){let r=e.CustomValueStringManual&&null!==e.CustomValueStringManual?e.CustomValueStringManual:e.CustomValueString?d(e.CustomValueString):"";return"".concat(o,": ").concat(r)}if("radio"===e.fieldType){let r=(e.options||[]).map(o=>{let r=o===e.CustomValueRadio?"X":" ";return"(".concat(r,") ").concat(o)});return"".concat(o,": ").concat(r.join(" "))}return"".concat(o,":")}).join("\n"):"",p=(0,n.useMemo)(()=>{var e,r;if(null===o)return"";let l=u(o),n=null!==(r=null==o?void 0:null===(e=o.nome)||void 0===e?void 0:e.toUpperCase())&&void 0!==r?r:"";return"".concat(n,"\n\n").concat(l)},[o]);(0,n.useEffect)(()=>{p?a("descricaoGerada",p):a("descricaoGerada","")},[p,a]);let m=(0,n.useMemo)(()=>o&&Array.isArray(o.campos)?Math.max(4,2+o.campos.length):4,[o]);return(0,l.jsx)(N.Z,{className:"flex flex-col",sx:{position:"relative"},children:(0,l.jsx)(g.Qr,{name:"descricaoGerada",control:s,render:e=>{let{field:o}=e;return(0,l.jsxs)(N.Z,{sx:{position:"relative"},children:[(0,l.jsx)(x.Z,{...o,label:"Descri\xe7\xe3o",multiline:!0,fullWidth:!0,disabled:c,rows:m,InputLabelProps:{shrink:!0}}),c&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(N.Z,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,bgcolor:"rgba(255,255,255,0.6)",display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"}}),(0,l.jsx)(P.Z,{size:15,sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:2}})]})]})}})})}
1,M=r(4142),R=r(4367),L=r(14831),G=r(88669),W=e=>{let{dadosLinha:o,dadosOperadora:r,dadosUser:N,userData:P,protocolNumber:W}=e,[_,F]=(0,n.useState)([]),{user:V}=(0,A.Z)(),z=(0,j.Z)(),[T,U]=(0,n.useState)(null),{updateProtocol:O}=(0,L.useProtocols)(),{control:q,handleSubmit:Q,setValue:B,reset:$}=(0,g.cI)({defaultValues:{protocoloSelecionado:"",linkSurf:"",mvno:"",numSpec:"",msisdn:"",descricaoGerada:""}}),{mutateAsync:J}=(0,y.D)({mutationFn:M.if,onSuccess:()=>{var e,o;b.Am.success("Protocolo atualizado!"),$(),W&&O({protocolo:W,descricaoproto:"Gerou um protocolo manual para a linha: ".concat((0,R.eW)(null!==(e=null==P?void 0:P.msisdn)&&void 0!==e?e:"")),usuario_atual:null!==(o=null==V?void 0:V.cpf)&&void 0!==o?o:""})},onError:e=>{console.error(e),b.Am.error("Erro ao adicionar protocolo")}});(0,n.useEffect)(()=>{var e;(null==P?void 0:P.msisdn)&&(null==P?void 0:P.parceiro)&&(B("msisdn",(0,w.mask)(null==P?void 0:null===(e=P.msisdn)||void 0===e?void 0:e.slice(2),"(99) 99999-9999")),B("mvno",null==P?void 0:P.parceiro))},[null==P?void 0:P.msisdn,null==P?void 0:P.parceiro]);let X=async e=>{var o,r;console.log("\uD83D\uDCCC Dados do formul\xe1rio:"),console.log(e);let l={anotacao:e.descricaoGerada?e.descricaoGerada:"",editado:"Chamado ".concat(null==T?void 0:T.origem),endereco_legacy:e.linkSurf?e.linkSurf:"",msisdn:e.msisdn?e.msisdn:"",newlog:"Chamado ".concat(null==T?void 0:T.origem),protocolo:null!=W?W:"",protocolo_legacy:e.numSpec?e.numSpec:"",servico:(null==T?void 0:T.nome)?null==T?void 0:T.nome:"",sla:"",status:1,usuario_atual:null!==(o=null==V?void 0:V.cpf)&&void 0!==o?o:"",usuario_editado:(null==P?void 0:P.cpf)?null==P?void 0:P.cpf:null!==(r=null==P?void 0:P.cnpj)&&void 0!==r?r:""};await J(l)},{mutateAsync:K}=(0,y.D)({mutationFn:I.N0,onSuccess:e=>F(e||[]),onError:e=>{console.error(e),b.Am.error("Erro ao buscar protocolos")}});(0,n.useEffect)(()=>{V&&K({token:V.token})},[V]);let Y=_.reduce((e,o)=>(e[o.origem]||(e[o.origem]=[]),e[o.origem].push(o),e),{}),H=e=>{switch(e.toUpperCase()){case"SURF":return(0,l.jsx)(Z.Z,{fontSize:"small",color:"primary"});case"TELECAL":return(0,l.jsx)(C.Z,{fontSize:"small",color:"primary"});default:return(0,l.jsx)(E.Z,{fontSize:"small",color:"primary"})}},{mutateAsync:ee,isPending:eo}=(0,y.D)({mutationFn:I.Kj,onSuccess:e=>U(e),onError:e=>{console.error(e),b.Am.error("Erro ao buscar protocolos")}}),er=async e=>{let o={token:null==V?void 0:V.token};await ee({id:e,payload:o})},el=()=>{let e=[(0,l.jsx)(t.Z,{value:"",disabled:!0,children:"Selecione um protocolo"},"default")];return Object.entries(Y).sort((e,o)=>{let[r]=e,[l]=o;return r.localeCompare(l,"pt-BR")}).forEach(o=>{let[r,n]=o,a=[...n].sort((e,o)=>e.nome.localeCompare(o.nome,"pt-BR"));e.push((0,l.jsxs)(i.Z,{disableSticky:!0,sx:{fontWeight:600,fontSize:"16px",color:z.palette.primary.main,display:"flex",alignItems:"center",gap:1,bgcolor:(0,S.Fq)(z.palette.primary.light,.05)},children:[H(r),r.toUpperCase()]},r)),a.forEach(o=>{e.push((0,l.jsx)(t.Z,{value:String(o.id),children:o.nome},o.id))})}),e};return(0,l.jsxs)(a.Z,{className:"border-none shadow-none",children:[(0,l.jsx)(s.Z,{title:(0,l.jsx)("div",{className:"flex w-full justify-between",children:(0,l.jsxs)("div",{className:"flex flex-row gap-1 items-center",children:[(0,l.jsx)(c.Z,{variant:"h5",children:"Protocolo Manual"}),(0,l.jsx)(G.Z,{delay:0,frase:"Selecione o servi\xe7o e preencha as informa\xe7\xf5es necess\xe1rias.",children:(0,l.jsx)("i",{className:"ri-information-line text-base cursor-pointer"})})]})})}),(0,l.jsx)(d.Z,{}),(0,l.jsx)(u.Z,{component:"form",onSubmit:Q(X),children:(0,l.jsxs)(p.ZP,{container:!0,spacing:6,children:[(0,l.jsx)(p.ZP,{item:!0,xs:12,md:6,children:(0,l.jsx)(g.Qr,{name:"mvno",disabled:null!=P&&!!P.parceiro,control:q,rules:{required:"Informe o MVNO"},render:e=>{var o;let{field:r,fieldState:n}=e;return(0,l.jsxs)(m.Z,{fullWidth:!0,error:!!n.error,children:[(0,l.jsx)(c.Z,{variant:"subtitle2",sx:{mb:1},children:"MVNO*"}),(0,l.jsx)(x.Z,{...r,fullWidth:!0,placeholder:"Digite o MVNO",error:!!n.error,helperText:null===(o=n.error)||void 0===o?void 0:o.message})]})}})}),(0,l.jsx)(p.ZP,{item:!0,xs:12,md:6,children:(0,l.jsx)(g.Qr,{name:"msisdn",disabled:null!=P&&!!P.msisdn,control:q,rules:{required:"Informe o MSISDN"},render:e=>{var o;let{field:r,fieldState:n}=e;return(0,l.jsxs)(m.Z,{fullWidth:!0,error:!!n.error,children:[(0,l.jsx)(c.Z,{variant:"subtitle2",sx:{mb:1},children:"MSISDN*"}),(0,l.jsx)(x.Z,{...r,fullWidth:!0,placeholder:"Digite o MSISDN",error:!!n.error,helperText:null===(o=n.error)||void 0===o?void 0:o.message})]})}})}),(0,l.jsx)(p.ZP,{item:!0,xs:12,children:(0,l.jsx)(g.Qr,{name:"protocoloSelecionado",control:q,rules:{required:"Servi\xe7o"},render:e=>{let{field:o,fieldState:r}=e;return(0,l.jsxs)(m.Z,{fullWidth:!0,error:!!r.error,children:[(0,l.jsx)(v.Z,{id:"select-protocolo-label",children:"Servi\xe7o*"}),(0,l.jsx)(f.Z,{...o,labelId:"select-protocolo-label",label:"Servi\xe7o*",onChange:e=>{o.onChange(e.target.value),er(Number(e.target.value))},value:o.value||"",children:el()}),r.error&&(0,l.jsx)(h.Z,{children:r.error.message})]})}})}),(0,l.jsx)(p.ZP,{item:!0,xs:12,children:(0,l.jsx)(D,{protocolo:T,dadosLinha:o,dadosOperadora:r,dadosUser:N,setValue:B,control:q,isLoadingProtool:eo})}),(0,l.jsx)(p.ZP,{item:!0,xs:12,md:6,children:(0,l.jsx)(g.Qr,{name:"numSpec",control:q,rules:{required:"Informe o n\xfamero (SPEC/JIRA/SISGER)"},render:e=>{var o;let{field:r,fieldState:n}=e;return(0,l.jsxs)(m.Z,{fullWidth:!0,error:!!n.error,children:[(0,l.jsx)(c.Z,{variant:"subtitle2",sx:{mb:1},children:"N\xfamero do Chamado – (SPEC/JIRA/SISGER)*"}),(0,l.jsx)(x.Z,{...r,fullWidth:!0,placeholder:"Digite o n\xfamero do chamado (SPEC/JIRA/SISGER)",error:!!n.error,helperText:null===(o=n.error)||void 0===o?void 0:o.message})]})}})}),(0,l.jsx)(p.ZP,{item:!0,xs:12,md:6,children:(0,l.jsx)(g.Qr,{name:"linkSurf",control:q,rules:{required:"Informe o link (SURF/TELECALL/SISGER)",pattern:{value:/^https?:\/\/[^\s$.?#].[^\s]*$/i,message:"Informe um link v\xe1lido"}},render:e=>{var o;let{field:r,fieldState:n}=e;return(0,l.jsxs)(m.Z,{fullWidth:!0,error:!!n.error,children:[(0,l.jsx)(c.Z,{variant:"subtitle2",sx:{mb:1},children:"Link (SURF/TELECALL/SISGER)*"}),(0,l.jsx)(x.Z,{...r,fullWidth:!0,placeholder:"Digite o link (SURF/TELECALL/SISGER)",error:!!n.error,helperText:null===(o=n.error)||void 0===o?void 0:o.message})]})}})}),(0,l.jsx)(p.ZP,{item:!0,xs:12,children:(0,l.jsx)(k.Z,{variant:"contained",type:"submit",children:"Salvar"})})]})})]})},_=e=>{let{userData:o,visualizaData:r,protocolNumber:n}=e,t=e=>e.replace(/[_\-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").toUpperCase(),i=e=>{let o={};
1return Object.entries(e).forEach(e=>{let[r,l]=e;null!=l&&(o[t(r)]=l)}),o},a=e=>(null!=e?e:"")+"";console.log("userData",r);let s=i({email:a(null==o?void 0:o.email),cpf:a(null==o?void 0:o.cpf),nome:a(null==o?void 0:o.name),endereco:"".concat((null==r?void 0:r.district)?(null==r?void 0:r.district)+" ":"").concat((null==r?void 0:r.street)?(null==r?void 0:r.street)+" ":"").concat((null==r?void 0:r.number)?"N\xfamero "+(null==r?void 0:r.number)+" ":""," - ").concat((null==r?void 0:r.city)&&(null==r?void 0:r.uf)?(null==r?void 0:r.city)+"-"+(null==r?void 0:r.uf):""," ").concat((null==r?void 0:r.cep)?"CEP: ".concat((0,R.ao)(null==r?void 0:r.cep)):"")}),c=i({parceiro:a(null==o?void 0:o.parceiro),companyid:a(null==o?void 0:o.companyid),cnpj_operadora:a(null==o?void 0:o.cnpj)}),d=i({esim:a((null==o?void 0:o.esim)?"Sim":"N\xe3o"),ddd:a(null==o?void 0:o.ddd),iccid:a(null==o?void 0:o.iccid),msisdn:a(null==o?void 0:o.msisdn),plano:a(null==o?void 0:o.plandescription),valor_plano:a(null==o?void 0:o.planvalue),rede:a(null==o?void 0:o.rede),whatsapp:a(null==o?void 0:o.whatsapp)});return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(W,{userData:o,dadosLinha:d,dadosOperadora:c,dadosUser:s,protocolNumber:n})})}},88669:function(e,o,r){var l=r(11670),n=r(56905),t=r(75758),i=r(66563),a=r(9730),s=r(4256);o.Z=e=>{let{delay:o,frase:r,children:c,position:d="top",dinamicWrite:u=!1,font:p=13,minWidth:m=10,maxWidth:x=250,overflow:v=!1,...f}=e,[h,j]=(0,n.useState)(!1),S={top:{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10}},bottom:{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:10}},left:{initial:{opacity:0,x:10},animate:{opacity:1,x:0},exit:{opacity:0,x:-10}},right:{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},exit:{opacity:0,x:10}}},y=d.split("-")[0],b="string"==typeof r,g=b?[r]:[""];return(0,l.jsx)(t.Z,{open:h,onOpen:()=>j(!0),onClose:()=>j(!1),enterDelay:o,placement:d,title:(0,l.jsx)(i.M,{children:h&&(0,l.jsx)(a.E.div,{initial:S[y].initial,animate:S[y].animate,exit:S[y].exit,transition:{duration:.25,ease:"easeInOut"},style:{display:"flex",justifyContent:"flex-start",alignItems:"flex-start",flexDirection:"column",textAlign:"left",maxWidth:x,minWidth:m,paddingInline:4,paddingBlock:1,whiteSpace:"normal",wordBreak:"break-word",overflowX:"hidden"},children:u&&b?(0,l.jsx)(s.rf,{words:Array.isArray(g)?g:[g],cursor:!0,cursorStyle:"",typeSpeed:40,deleteSpeed:50,delaySpeed:1500}):r},b?r:"tooltip-content")}),arrow:!0,slotProps:{tooltip:{sx:{border:"1px solid",borderColor:e=>e.palette.primary.main,borderRadius:"10px",fontSize:p,fontWeight:450,px:2,py:1.25,backdropFilter:"blur(4px)",bgcolor:"rgb(0, 0, 0,0.7)",color:"white",boxShadow:"0 0 8px rgba(0,0,0,0.2)",...v&&{maxHeight:400,overflowY:"auto",overflowX:"hidden",scrollBehavior:"smooth","&::-webkit-scrollbar":{width:6},"&::-webkit-scrollbar-thumb":{backgroundColor:e=>e.palette.primary.main,borderRadius:10},"&::-webkit-scrollbar-track":{backgroundColor:"rgba(255,255,255,0.05)"}}}},arrow:{sx:{color:e=>e.palette.primary.main,fontSize:15,"&::before":{border:"1px solid",borderColor:e=>e.palette.primary.main}}}},children:(0,n.cloneElement)(c,{...f,...c.props})})}}}]);

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.