PageSourceSearch

https://app.adesampa.com.br/_next/static/chunks/pages/%5Bmaster_unit_slug%5D-89161f21dfc86d80.js

js adesampa.com.br collected 2026-09-24 10:22:47 UTC 3,110 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2514],{62129:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/[master_unit_slug]",function(){return s(85654)}])},85654:function(e,t,s){"use strict";s.r(t);var i=s(85893),n=s(67294),a=s(11163),l=s(58597),r=s(32038),c=s(69534),d=s(21870),u=s(70770),h=s(4759),o=s(7867),m=s(41743),j=s(30213),x=s(46988),f=s(30350),p=s(25664),y=s(19814),w=s(42491),g=s(6525),_=s(64711),N=s(54568),b=s(30743);let MasterUnitPage=()=>{let e=(0,a.useRouter)(),{master_unit_slug:t}=e.query,{token:s,me:d}=(0,n.useContext)(c.V),{loadAllScheduling:u,all:h}=(0,n.useContext)(x.R),[o,m]=(0,n.useState)(!1),[j,f]=(0,n.useState)(),[p,y]=(0,n.useState)(null),[g,_]=(0,n.useState)(!0),[v,S]=(0,n.useState)(!0),[E,C]=(0,n.useState)(!1),[U,k]=(0,n.useState)(!1),A=Array.isArray(t)?t[0]:t;(0,n.useEffect)(()=>{let fetchMasterUnit=async()=>{if(A&&s)try{_(!0);let t=await b.Z.get("/master-units/active",{},s);if(t.success&&Array.isArray(t.data)){let s=t.data.find(e=>e.slug===A);s?y(s):e.push("/welcome")}else e.push("/welcome")}catch(t){e.push("/welcome")}finally{_(!1)}};fetchMasterUnit()},[A,s,e]),(0,n.useEffect)(()=>{let e=!1;if(!p||!s||!d)return()=>{e=!0};let load=async()=>{let t={master_unit_id:p.id};"master"===d.type&&(t.search=1),C(!0),k(!1),await u(t,s),e||k(!0)};return load(),()=>{e=!0}},[p,u,s,d]);let M=(0,n.useCallback)(()=>{d.document&&d.phone&&d.name&&d.email&&d.birthday&&d.neighborhood&&d.zipcode&&d.find_adesampa&&d.street&&d.number&&d.city||"user"!==d.type||m(!0)},[d]);return((0,n.useEffect)(()=>{if(void 0!==h&&p){if(h.length>0){var e;f((null===(e=h[0])||void 0===e?void 0:e.client)||{})}else f(null)}M()},[h,p,M]),g)?(0,i.jsx)("div",{className:"bg-white d-flex align-items-center justify-content-center",style:{width:"100%",paddingTop:40,paddingBottom:40},children:(0,i.jsx)(r.$j,{})}):p?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"row",children:(0,i.jsx)("div",{className:"col-12 col-md-12 mb-4",children:(0,i.jsx)("span",{className:"subtitle",children:(0,i.jsx)("span",{children:p.name})})})}),(0,i.jsxs)("div",{className:"card",children:[!o&&(0,i.jsx)("div",{className:"card-body",children:j?(0,i.jsx)(w.Z,{isCreate:!0,client:j,unities:h,isSampaCast:!0,masterUnit:p}):(0,i.jsx)("div",{className:"bg-white d-flex align-items-center justify-content-center",style:{width:"100%",paddingTop:40,paddingBottom:40},children:U&&Array.isArray(h)&&0===h.length?(0,i.jsx)("h2",{className:"text-center mb-0",children:(0,l.Iu)("notification.noData")}):(0,i.jsx)(r.$j,{})})}),(0,i.jsx)(N.Z,{show:o})]})]}):null};t.default=()=>(0,i.jsx)(g.U,{children:(0,i.jsx)(d.k,{children:(0,i.jsx)(_.U,{children:(0,i.jsx)(y.d,{children:(0,i.jsx)(x.d,{children:(0,i.jsx)(m.m,{children:(0,i.jsx)(j.X,{children:(0,i.jsx)(h.e,{children:(0,i.jsx)(o.j,{children:(0,i.jsx)(u.G,{children:(0,i.jsx)(f.S,{children:(0,i.jsxs)(p.O,{children:[(0,i.jsx)(r.aG,{items:[{name:(0,l.Iu)("actions.addNew")}]}),(0,i.jsx)(MasterUnitPage,{})]})})})})})})})})})})})})}},function(e){e.O(0,[5763,3001,3849,3917,8775,6493,2491,9774,2888,179],function(){return e(e.s=62129)}),_N_E=e.O()}]);

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.