PageSourceSearch

https://parnaiba.pi.gov.br/build/assets/Index-poKumJ9I.js

js parnaiba.pi.gov.br collected 2026-10-02 06:30:43 UTC 5,565 bytes, 2 lines download raw bytes

1import{j as c,k as _,l as v,c as w,o as l,w as x,a as e,b as r,d as a,m as y,i as C,f as P,g as n,h as f,v as V,F as N,p as T,t as b}from"./app-DQxO7r3K.js";import{A as S}from"./AdminLayout-BwHnHM_V.js";import{_ as $}from"./Pagination-CUczRtj-.js";import{_ as j}from"./ConfirmDeleteModal-BY-i8XcJ.js";import{K as B}from"./key-round-DoINrSu6.js";import{P as D}from"./plus-MXmsGgWq.js";import{S as A}from"./search-C4AzObEe.js";import{X as F}from"./x-gnfwQ4g6.js";import{P as L}from"./pencil-D9s_-Z23.js";import{T as M}from"./trash-2-49h2bOXt.js";/* empty css            */import"./Logo PMP BRANCO V-BbmQex8o.js";import"./users-D7ZoY6u6.js";import"./createLucideIcon-Bm1i9NFz.js";import"./user-4BPNvKSF.js";import"./chevron-down--EGeFbjX.js";import"./log-out-DTzvWm53.js";import"./house-BJZSQ99g.js";import"./newspaper-ZrpseLGS.js";import"./image-Bgh0fdDX.js";import"./file-text-DAr43Ltb.js";import"./clipboard-list-G2k3rzGC.js";import"./calendar-PYB0jEA3.js";import"./chevron-right-DWFKZAU1.js";import"./music-2-B7w9yktt.js";import"./key-ScmRPUrt.js";import"./menu-BCwfqCTb.js";const K={class:"p-6 lg:p-8 space-y-6"},O={class:"flex flex-col sm:flex-row sm:justify-between sm:items-center gap-4"},U={class:"flex items-center gap-3"},E={class:"p-2.5 bg-admin-primary/10 rounded-xl"},G={class:"bg-white dark:bg-slate-900 rounded-xl border border-gray-200 dark:border-slate-700 p-4 shadow-sm"},I={class:"flex flex-col sm:flex-row gap-3"},R={class:"flex-1 relative"},X={class:"bg-white dark:bg-slate-900 rounded-xl border border-gray-100 dark:border-slate-700 overflow-hidden shadow-sm"},q={class:"overflow-x-auto"},z={class:"w-full"},H={class:"divide-y divide-gray-100 dark:divide-slate-700/40"},J={class:"py-4 px-4 font-medium text-gray-900 dark:text-slate-100"},Q={class:"py-4 px-4 text-sm text-gray-600 dark:text-slate-400"},W={class:"py-4 px-4"},Y={class:"flex justify-center gap-2"},Z=["onClick"],ee={key:0},te={key:0,class:"px-4 py-4 bg-gray-50 dark:bg-slate-800/50 border-t border-gray-200 dark:border-slate-700"},je={__name:"Index",props:{permissions:Object,filters:{type:Object,default:()=>({})}},setup(i){const o=c(i.filters.search||""),d=c(!1),m=c(null),u=c(!1);let g=null;_(o,()=>{clearTimeout(g),g=setTimeout(()=>{v.get(route("cpanel.acl.permissoes.index"),{search:o.value},{preserveState:!0,preserveScroll:!0,only:["permissions"]})},400)});const h=p=>{m.value=p,d.value=!0},k=()=>{u.value=!0,v.delete(route("cpanel.acl.permissoes.destroy",m.value.id),{onSuccess:()=>{d.value=!1,m.value=null},onFinish:()=>u.value=!1})};return(p,t)=>(l(),w(S,{title:"Permissões - ACL"},{default:x(()=>[e("div",K,[e("div",O,[e("div",U,[e("div",E,[r(a(B),{class:"w-6 h-6 text-admin-primary"})]),t[4]||(t[4]=e("div",null,[e("h1",{class:"text-2xl font-bold text-admin-primary"},"Permissões"),e("p",{class:"text-sm text-gray-500 dark:text-slate-400"}," Controle as permissões disponíveis para os papéis ")],-1))]),r(a(y),{href:p.route("cpanel.acl.permissoes.create"),class:"inline-flex items-center gap-2 px-4 py-2.5 bg-admin-primary hover:bg-admin-primary-dark text-white text-sm font-medium rounded-xl transition-colors shadow-md"},{default:x(()=>[r(a(D),{class:"w-4 h-4"}),t[5]||(t[5]=C(" Nova Permissão ",-1))]),_:1},8,["href"])]),e("div",G,[e("div",I,[e("div",R,[r(a(A),{class:"absolute left-3.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 pointer-events-none"}),P(e("input",{"onUpdate:modelValue":t[0]||(t[0]=s=>o.value=s),type:"text",placeholder:"Buscar por nome...",class:"w-full pl-10 pr-10 py-2.5 text-sm bg-gray-50 dark:bg-slate-800 border border-gray-200 dark:border-slate-600 rounded-xl text-gray-900 dark:text-slate-100 focus:outline-none focus:ring-2 focus:ring-admin-primary/20 focus:border-admin-primary"},null,512),[[V,o.value]]),o.value?(l(),n("button",{key:0,onClick:t[1]||(t[1]=s=>o.value=""),class:"absolute right-3.5 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600"},[r(a(F),{class:"w-4 h-4"})])):f("",!0)])])]),e("div",X,[e("div",q,[e("table",z,[t[7]||(t[7]=e("thead",null,[e("tr",{class:"bg-gray-50 dark:bg-slate-800/70 border-b border-gray-200 dark:border-slate-700 text-left text-xs font-bold text-admin-primary uppercase tracking-wider"},[e("th",{class:"py-4 px-4"},"Nome"),e("th",{class:"py-4 px-4"},"Guard"),e("th",{class:"py-4 px-4 text-center w-28"},"Ações")])],-1)),e("tbody",H,[(l(!0),n(N,null,T(i.permissions.data,s=>(l(),n("tr",{key:s.id,class:"hover:bg-gray-50 dark:hover:bg-slate-800/60"}
1,[e("td",J,b(s.name),1),e("td",Q,b(s.guard_name),1),e("td",W,[e("div",Y,[r(a(y),{href:p.route("cpanel.acl.permissoes.edit",s.id),class:"p-1.5 text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/30 rounded-lg transition-colors"},{default:x(()=>[r(a(L),{class:"w-4 h-4"})]),_:1},8,["href"]),e("button",{onClick:re=>h(s),class:"p-1.5 text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/30 rounded-lg transition-colors"},[r(a(M),{class:"w-4 h-4"})],8,Z)])])]))),128)),i.permissions.data.length===0?(l(),n("tr",ee,[...t[6]||(t[6]=[e("td",{colspan:"3",class:"py-12 text-center text-gray-500 dark:text-slate-400"}," Nenhuma permissão encontrada ",-1)])])):f("",!0)])])]),i.permissions.data.length>0?(l(),n("div",te,[r($,{links:i.permissions.links},null,8,["links"])])):f("",!0)])]),r(j,{modelValue:d.value,"onUpdate:modelValue":t[2]||(t[2]=s=>d.value=s),"item-name":`a permissão '${m.value?.name||"..."}'`,processing:u.value,onConfirm:k,onCancel:t[3]||(t[3]=s=>d.value=!1)},null,8,["modelValue","
1item-name","processing"])]),_:1}))}};export{je as default};
2//# sourceMappingURL=Index-poKumJ9I.js.map

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.