PageSourceSearch

https://transparencia.portsdebalears.com/_next/static/chunks/pages…/modules/delete/[id]-1a63bc479ba0e6fc.js

js portsdebalears.com collected 2026-09-24 18:38:58 UTC 6,835 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5035],{42498:function(e,t,l){"use strict";l.d(t,{Z:function(){return n}});var a=l(91696);let n=(0,a.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"}]])},76218:function(e,t,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/modules/delete/[id]",function(){return l(80406)}])},63534:function(e,t,l){"use strict";var a=l(52676),n=l(75271),s=l(1629),i=l(78619),d=l(31985),r=l.n(d),c=l(82187),o=l.n(c),u=l(52073),h=l(75018),f=l(90394);t.Z=e=>{var t,l;let{navClass:d="",inactiveClass:c="",activeClass:x="text-ogovOrange font-bold text-xs",routes:m,isPublicView:p,portalInfo:v,skipSegments:g=[]}=e,b=(0,s.useRouter)(),{t:j,i18n:N}=(0,i.$G)(),w=null==v?void 0:null===(l=v.customization)||void 0===l?void 0:null===(t=l.config)||void 0===t?void 0:t.primary_color,y=w?(0,f.k8)(w):void 0,[_,k]=(0,n.useState)(null);return(0,n.useEffect)(()=>{if(b){let e=b.asPath.split("/");e.shift();let t=[];e.forEach((e,l)=>{isNaN(parseInt(e))?t.push(e):t[l-1]="".concat(t[l-1],"/").concat(e)});let l=t.filter(e=>"dashboard"!==e),a=l.map((e,l)=>({breadcrumb:"dashboard"===e.split("/")[0]?t[l]:e.split("/")[0],href:"/"+t.slice(0,l+2).join("/"),hidden:g.includes(e.split("/")[0])})),n=a.reduceRight((e,t,l)=>-1!==e||t.hidden?e:l,-1);k(a.map((e,t)=>({...e,active:t===n})))}},[b]),(0,a.jsxs)("nav",{"aria-label":"breadcrumbs",className:o()("flex flex-col sm:flex-row align-middle font-ptSans text-gray-600 text-xs",d),children:[!p&&(0,a.jsx)(r(),{href:"/dashboard",children:j("common.home")}),m&&m.length>0?(0,a.jsx)(a.Fragment,{children:null==m?void 0:m.map((e,t)=>(0,a.jsxs)("div",{className:"flex items-center",children:[(!p||t>0)&&(0,a.jsx)("span",{className:"inline-flex items-center px-1","aria-hidden":"true",children:(0,a.jsx)(u.Z,{className:"w-3.5 h-3.5 text-gray-400"})}),(0,a.jsx)(r(),{href:e.href,className:o()(t===m.length-1?x:o()(c,"hover:text-gray-900 hover:underline transition-colors")),style:{color:t===m.length-1?y:void 0},children:(0,h.QN)(e.title)})]},t))}):null==_?void 0:_.filter(e=>!e.hidden).map(e=>{var t,l;let n=null===(t=_[0])||void 0===t?void 0:t.breadcrumb.split("?")[0],s=null==e?void 0:e.breadcrumb.split("?")[0],i="".concat(n,".").concat(s,".pageTitle"),d=_.indexOf(e);if(d>=1){let e=null===(l=_[d-1])||void 0===l?void 0:l.breadcrumb.split("?")[0],t="".concat(n,".").concat(e,".").concat(s,".pageTitle");N.exists(t)&&(i=t)}return(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("span",{className:"inline-flex items-center px-1","aria-hidden":"true",children:(0,a.jsx)(u.Z,{className:"w-3.5 h-3.5 text-gray-400"})}),(0,a.jsx)(r(),{href:null==e?void 0:e.href,className:o()(e.active?x:o()(c,"hover:text-gray-900 hover:underline transition-colors"),"capitalize"),style:{color:e.active?y:void 0},children:j(i)})]},d)})]})}},50924:function(e,t,l){"use strict";var a=l(52676),n=l(75271);let s=(0,n.forwardRef)(function(e,t){let{type:l="submit",className:n,...s}=e;return(0,a.jsx)("button",{ref:t,type:l,className:"\n        ".concat(n,"\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"),...s})});t.Z=s},50824:function(e,t,l){"use strict";l.d(t,{Z:function(){return useFetchModule}});var a=l(60845),n=l(75271);function useFetchModule(e){let{id:t}=e,[l,s]=(0,n.useState)({}),[i,d]=(0,n.useState)(),[r,c]=(0,n.useState)(!0),fetchModule=e=>{a.p.show(e).then(e=>s(e.data.data)).catch(e=>d(e)).finally(()=>c(!1))};return(0,n.useEffect)(()=>{fetchModule(t)},[]),{module:l,error:i,isFetching:r}}},80406:function(e,t,l){"use strict";l.r(t),l.d(t,{__N_SSP:function(){return g}});var a=l(52676),n=l(63534),s=l(50924),i=l(34090),d=l(91750),r=l(50824),c=l(41501),o=l(42474),u=l(60845),h=l(90394),f=l(78619),x=l(57394),m=l.n(x),p=l(1629),v=l(75271);let DeleteModule=()=>{let{handlePermission:e}=(0,o.a)({middleware:["auth"]}),{t}=(0,f.$G)(),l=(0,p.useRouter)(),{locale:i}=l,{id:x}=l.query,{module:g,isFetching:b,error:j}=(0,r.Z)({id:x}),{alert:N,isOpen:w,showAlert:y}=(0,c.ZP)(),[_,k]=(0,v.useState)(!1);return(0,v.useEffect)(()=>j&&(0,h.xg)(j,null,y),[j]),(0,v.useEffect)(()=>{e(["module.destroy"])||l.push("/dashboard")},[]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(m(),{children:(0,a.jsx)("title",{children:t("modules.delete.pageTitle")})}),(0,a.jsx)("div",{className:"max-w-screen-2xl mx-auto",children:(0,a.jsxs)("div",{className:"bg-white overflow-hidden shadow-sm rounded-lg",children:[(0,a.jsxs)("div",{className:"flex flex-col pt-6 pl-6",children:[(0,a.jsx)("div",{className:"bg-white font-bold text-xl sm:text-2xl text-black",children:t("modules.delete.pageTitle")}),(0,a.jsx)("div",{children:(0,a.jsx)(n.Z,{})})]}),(0,a.jsxs)("div",{className:"p-6",children:[w&&N(),j?null:b?(0,a.jsx)("div",{className:"flex justify-center",children:(0,a.jsx)(d.g,{})}):(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:"max-w-lg flex flex-col items-center mx-auto 
1space-y-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{className:"text-center",children:[t("common.deactivate")," ",(0,a.jsx)("span",{className:"font-bold",children:g.name[i]}),"?"]}),(0,a.jsx)("p",{className:"mt-2",children:t("modules.delete.deactivateInfoRecover")})]}),(0,a.jsx)(s.Z,{className:"max-w-sm bg-red-500 hover:bg-red-600 active:bg-red-900 focus:bg-red-900 justify-center w-full",onClick:()=>{k(!0),u.p.destroy(x).then(()=>l.push("/dashboard/modules")).catch(e=>(0,h.xg)(e,null,y)).finally(()=>k(!1))},disabled:_,children:_?(0,a.jsx)(d.g,{width:5,height:5}):t("common.deactivate")})]})})]})]})})]})};DeleteModule.getLayout=function(e){return(0,a.jsx)(i.Z,{children:e})};var g=!0;t.default=DeleteModule},60845:function(e,t,l){"use strict";l.d(t,{p:function(){return n}});var a=l(129);let n={list:(e,t,l)=>a.default.get("/api/v1/modules",{params:{page:e,per_page:t,...l}}),create:e=>a.default.post("/api/v1/modules",e),update:(e,t)=>a.default.post("/api/v1/modules/".concat(t),e),destroy:e=>a.default.delete("/api/v1/modules/".concat(e)),restore:e=>a.default.put("/api/v1/modules/".concat(e,"/restore")),show:e=>a.default.get("/api/v1/modules/".concat(e)),all:()=>a.default.get("/api/v1/modules/index-all"),externalModules:()=>a.default.get("/api/v1/external-module-types/index-all"),maintenance:(e,t)=>a.default.post("/api/v1/modules/".concat(t,"/maintenance"),e),updatePortal:(e,t)=>a.default.post("/api/v1/modules/".concat(t,"/update-portal"),e)}}},function(e){e.O(0,[3043,4090,9774,2888,179],function(){return e(e.s=76218)}),_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.