PageSourceSearch

https://minimax.hu/build/assets/Index-BORxXid4.js

js minimax.hu collected 2026-10-02 12:37:59 UTC 3,994 bytes, 1 lines download raw bytes

1import{d,c as F,w as x,o as t,a as e,e as s,h as g,F as f,b as u,m as y,v as S,n as V,f as _,N as z,t as v,y as M,l as P,g as B,C as E,T}from"./app-GYzGmuSI.js";import{_ as U}from"./AppLayout-CWz5USgu.js";import{P as $}from"./Plus-Cn8iDiBR.js";import{C as A}from"./Cancel-Bv6wnw5l.js";import{W as D}from"./Wrench-CeKxPf48.js";import{C as W}from"./Check-ZAw-LirQ.js";import{_ as j}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./DropdownLink-DufrpttY.js";import"./Composables-BwLh971f.js";import"./RecipeList-C_W2Mw63.js";import"./Footer-CNVwS0s3.js";const J={class:"w-3/4 p-4 mx-auto mt-5 rounded w-md-1/2"},L={class:"justify-items-center"},R={class:"table-auto w-full border-collapse rounded-t-lg overflow-hidden shadow-lg glass-bg"},q={class:"text-slate-900 font-bold"},G={class:"p-2"},H={class:"p-2"},I={key:0,class:"flex gap-1"},K={class:"p-1 px-2 rounded-md bg-slate-200"},O={key:1},Q={key:0},X={colspan:"4",class:"bg-slate-800"},Y=["onSubmit"],Z={class:"flex gap-4 text-slate-300"},ee=["for"],te=["id","onUpdate:modelValue","value"],se={class:"rounded-full m-1 text-slate-100 bg-gradient-to-r from-green-500 to-green-700 text-sm w-8 h-8 p-1 drop-shadow icon",type:"submit"},oe={key:2,class:"mb-4 p-4 border border-gray-300 rounded bg-gray-100"},ae={key:0,class:"text-red-600"},le={__name:"Index",props:{roles:Array,permissions:Array},setup(b){const r=d(!1),c=d(""),m=d(!1),h=()=>{r.value=!r.value},p=d({}),i=d({}),k=a=>{p.value[a]=!p.value[a],i.value[a]||(i.value[a]=T({roleId:a,permissions:[]}))},w=a=>{i.value[a].post(route("roles.update-permissions"),{onSuccess:()=>{p.value[a]=!1}})},C=()=>{z.post(route("roles.store"),{name:c.value},{onSuccess:()=>{c.value="",r.value=!1,m.value=!1},onError:()=>{m.value=!0}})};return(a,n)=>(t(),F(U,{title:"Szerepkörök"},{default:x(()=>[e("div",J,[e("div",L,[e("table",R,[n[1]||(n[1]=e("thead",null,[e("tr",{class:"text-slate-900 bg-slate-200"},[e("th",null,"Név"),e("th",null,"Jogosultságok"),e("th",null,"Műveletek")])],-1)),e("tbody",null,[(t(!0),s(f,null,g(b.roles,o=>(t(),s(f,{key:o.name},[e("tr",q,[e("td",G,v(o.name),1),e("td",H,[o.permissions.length?(t(),s("div",I,[(t(!0),s(f,null,g(o.permissions,l=>(t(),s("span",K,v(l.name),1))),256))])):(t(),s("span",O,"-"))]),e("td",null,[u(D,{class:"rounded-full icon flex w-fit p-[6px] text-slate-100 bg-gradient-to-r from-orange-500 to-orange-700 text-sm drop-shadow",onClick:l=>k(o.id)},null,8,["onClick"])])]),u(M,{name:"fade"},{default:x(()=>[p.value[o.id]?(t(),s("tr",Q,[e("td",X,[e("form",{class:"flex flex-col",onSubmit:P(l=>w(o.id),["prevent"])},[e("div",Z,[(t(!0),s(f,null,g(b.permissions,l=>(t(),s("div",null,[e("label",{for:l.name,class:"me-1"},[B(v(l.name)+" ",1),y(e("input",{id:l.name,class:"rounded border-gray-300 text-indigo-600 shadow-sm focus:ring-indigo-500",type:"checkbox","onUpdate:modelValue":N=>i.value[o.id].permissions=N,value:l.id},null,8,te),[[E,i.value[o.id].permissions]])],8,ee)]))),256))]),e("button",se,[u(W)])],40,Y)])])):_("",!0)]),_:2},1024)],64))),128))])])]),r.value?(t(),s("button",{key:0,onClick:h,class:"rounded-full p-[6px] my-2 text-slate-100 bg-gradient-to-r from-yellow-500 to-yellow-700 text-sm w-fit drop-shadow icon"},[u(A)])):(t(),s("button",{key:1,onClick:h,class:"rounded-full p-[6px] my-2 text-slate-100 bg-gradient-to-r from-blue-500 to-blue-700 text-sm w-fit drop-shadow icon"},[u($)])),r.value?(t(),s("div",oe,[n[2]||(n[2]=e("label",{for:"roleName",class:"block text-gray-700 font-bold mb-2"},"Szerepkör neve:",-1)),y(e("input",{"onUpdate:modelValue":n[0]||(n[0]=o=>c.value=o),type:"text",id:"roleName",class:V(["w-full p-2 border rounded focus:outline-none focus:ring-2 focus:ring-blue-500",m.value?"border-red-500":"border-gray-400"])},null,2),[[S,c.value]]),m.value?(t(),s("p",ae,"Ez a mező kötelező.")):_("",!0),e("button",{onClick:C,class:"mt-2 px-4 py-2 bg-green-500 text-white rounded hover:bg-green-600 transition"}," Mentés ")])):_("",!0)])]),_:1}))}},ve=j(le,[["__scopeId","data-v-4368d27f"]]);export{ve as default};

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.