PageSourceSearch

https://transparencia.aguasgrancanaria.com/_next/static/chunks/pag…/users/delete/[id]-b52d533d581d3a82.js

js aguasgrancanaria.com collected 2026-09-24 22:33:04 UTC 6,745 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6551],{42498:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});var n=s(91696);let l=(0,n.Z)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},4801:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/users/delete/[id]",function(){return s(58722)}])},63534:function(e,t,s){"use strict";var n=s(52676),l=s(75271),a=s(1629),r=s(78619),i=s(31985),c=s.n(i),d=s(82187),o=s.n(d),u=s(52073),h=s(75018),x=s(90394);t.Z=e=>{var t,s;let{navClass:i="",inactiveClass:d="",activeClass:f="text-ogovOrange font-bold text-xs",routes:m,isPublicView:p,portalInfo:v,skipSegments:g=[]}=e,b=(0,a.useRouter)(),{t:j,i18n:N}=(0,r.$G)(),y=null==v?void 0:null===(s=v.customization)||void 0===s?void 0:null===(t=s.config)||void 0===t?void 0:t.primary_color,w=y?(0,x.k8)(y):void 0,[_,k]=(0,l.useState)(null);return(0,l.useEffect)(()=>{if(b){let e=b.asPath.split("/");e.shift();let t=[];e.forEach((e,s)=>{isNaN(parseInt(e))?t.push(e):t[s-1]="".concat(t[s-1],"/").concat(e)});let s=t.filter(e=>"dashboard"!==e),n=s.map((e,s)=>({breadcrumb:"dashboard"===e.split("/")[0]?t[s]:e.split("/")[0],href:"/"+t.slice(0,s+2).join("/"),hidden:g.includes(e.split("/")[0])})),l=n.reduceRight((e,t,s)=>-1!==e||t.hidden?e:s,-1);k(n.map((e,t)=>({...e,active:t===l})))}},[b]),(0,n.jsxs)("nav",{"aria-label":"breadcrumbs",className:o()("flex flex-col sm:flex-row align-middle font-ptSans text-gray-600 text-xs",i),children:[!p&&(0,n.jsx)(c(),{href:"/dashboard",children:j("common.home")}),m&&m.length>0?(0,n.jsx)(n.Fragment,{children:null==m?void 0:m.map((e,t)=>(0,n.jsxs)("div",{className:"flex items-center",children:[(!p||t>0)&&(0,n.jsx)("span",{className:"inline-flex items-center px-1","aria-hidden":"true",children:(0,n.jsx)(u.Z,{className:"w-3.5 h-3.5 text-gray-400"})}),(0,n.jsx)(c(),{href:e.href,className:o()(t===m.length-1?f:o()(d,"hover:text-gray-900 hover:underline transition-colors")),style:{color:t===m.length-1?w:void 0},children:(0,h.QN)(e.title)})]},t))}):null==_?void 0:_.filter(e=>!e.hidden).map(e=>{var t,s;let l=null===(t=_[0])||void 0===t?void 0:t.breadcrumb.split("?")[0],a=null==e?void 0:e.breadcrumb.split("?")[0],r="".concat(l,".").concat(a,".pageTitle"),i=_.indexOf(e);if(i>=1){let e=null===(s=_[i-1])||void 0===s?void 0:s.breadcrumb.split("?")[0],t="".concat(l,".").concat(e,".").concat(a,".pageTitle");N.exists(t)&&(r=t)}return(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("span",{className:"inline-flex items-center px-1","aria-hidden":"true",children:(0,n.jsx)(u.Z,{className:"w-3.5 h-3.5 text-gray-400"})}),(0,n.jsx)(c(),{href:null==e?void 0:e.href,className:o()(e.active?f:o()(d,"hover:text-gray-900 hover:underline transition-colors"),"capitalize"),style:{color:e.active?w:void 0},children:j(r)})]},i)})]})}},50924:function(e,t,s){"use strict";var n=s(52676),l=s(75271);let a=(0,l.forwardRef)(function(e,t){let{type:s="submit",className:l,...a}=e;return(0,n.jsx)("button",{ref:t,type:s,className:"\n        ".concat(l,"\n      inline-flex \n      items-center\n      px-3\n      py-3\n      border \n      border-transparent \n      rounded-md \n      font-semibold \n      text-xs\n      text-white\n      uppercase\n      tracking-widest\n      focus:outline-none\n      focus:ring\n      disabled:opacity-25\n      transition  \n      ease-in-out\n      duration-150"),...a})});t.Z=a},55100:function(e,t,s){"use strict";s.d(t,{Z:function(){return useFetchUser}});var n=s(78446),l=s(75271);function useFetchUser(e){let{id:t}=e,[s,a]=(0,l.useState)({}),[r,i]=(0,l.useState)(),[c,d]=(0,l.useState)(!0),fetchUser=e=>{n.W.show(e).then(e=>a(e.data.data)).catch(e=>i(e)).finally(()=>d(!1))};return(0,l.useEffect)(()=>{fetchUser(t)},[]),{user:s,error:r,isFetching:c}}},58722:function(e,t,s){"use strict";s.r(t),s.d(t,{__N_SSP:function(){return N}});var n=s(52676),l=s(63534),a=s(50924),r=s(23940),i=s(19719),c=s(34090),d=s(91750),o=s(41501),u=s(42474),h=s(55100),x=s(78446),f=s(90394),m=s(78619),p=s(57394),v=s.n(p),g=s(1629),b=s(75271),j=s(31785);let DeleteUser=()=>{let{handlePermission:e}=(0,u.a)({middleware:["auth"]}),{t}=(0,m.$G)(),s=(0,g.useRouter)(),{id:c}=s.query,{user:p,isFetching:N,error:y}=(0,h.Z)({id:c}),{alert:w,isOpen:_,showAlert:k}=(0,o.ZP)(),[Z,E]=(0,b.useState)(!1),[S,C]=(0,b.useState)(!0),{newNotification:U}=(0,b.useContext)(j.u),checkEmail=e=>{e.target.value===p.email?C(!1):C(!0)};return(0,b.useEffect)(()=>{e(["user.destroy"])||s.push("/dashboard")},[]),(0,b.useEffect)(()=>y&&(0,f.xg)(y,null,k),[y]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(v(),{children:(0,n.jsx)("title",{children:t("users.delete.pageTitle")})}),(0,n.jsx)("div",{className:"max-w-screen-2xl mx-auto",children:(0,n.jsxs)("div",{className:"bg-white overflow-hidden shadow-sm rounded-lg",children:[(0,n.jsxs)("div",{className:"flex flex-col pt-6 pl-6",children:[(0,n.jsx)("div",{className:"bg-white font-bold text-xl sm:text-2xl text-black",children:t("users.delete.pageTitle")}),(0,n.jsx)("div",{children:(0,n.jsx)(l.Z,{})})]}),(0,n.jsxs)("div",{className:"p-6",children:[_&&w(),y?"":N?(0,n.jsx)("div",{className:"flex justify-center",children:(0,n.jsx)(d.g,{})}):(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:"max-w-sm flex flex-col items-center mx-auto 
1space-y-2",children:[(0,n.jsxs)("div",{className:"flex flex-col items-center",children:[p.email,(0,n.jsx)("span",{className:"text-sm text-gray-400",children:p.username})]}),(0,n.jsxs)("div",{className:"w-full",children:[(0,n.jsx)(i.Z,{htmlFor:"email",children:t("users.delete.deleteRequest")}),(0,n.jsx)(r.Z,{id:"email",type:"text",className:"form-input block mt-1 w-full",autoComplete:"off",onChange:e=>checkEmail(e)})]}),!p.deleted_at&&(0,n.jsx)("button",{className:"border-1 border-red-600 text-red-600 px-2 py-2 rounded-md justify-center w-full",onClick:()=>{E(!0),x.W.destroy(c).then(()=>{U("success",t("common.successOperation")),s.push("/dashboard/users")}).catch(e=>(0,f.xg)(e,null,k)).finally(()=>E(!1))},disabled:S||Z||(null==p?void 0:p.deleted_at),children:Z?(0,n.jsx)(d.g,{width:5,height:5}):t("common.delete")}),(0,n.jsx)(a.Z,{className:"bg-red-500 hover:bg-red-600 active:bg-red-900 focus:bg-red-900 justify-center w-full",onClick:()=>{E(!0),x.W.forceDelete(c).then(()=>s.push("/dashboard/users")).catch(e=>(0,f.xg)(e,null,k)).finally(()=>E(!1))},disabled:Z||S,children:Z?(0,n.jsx)(d.g,{width:5,height:5}):t("common.permanentlyDelete")})]})})]})]})})]})};DeleteUser.getLayout=function(e){return(0,n.jsx)(c.Z,{children:e})};var N=!0;t.default=DeleteUser}},function(e){e.O(0,[3043,4090,9774,2888,179],function(){return e(e.s=4801)}),_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.