PageSourceSearch

https://app.skillsyncer.com/build/assets/index-BKEiZpJX.js

js skillsyncer.com collected 2026-10-03 21:58:42 UTC 3,109 bytes, 1 lines download raw bytes

1import{f as _,m as f,x as t,j as e,v as a,y as c,t as d,u as k,k as r,c as B,r as C}from"./vue.esm-bundler-D4OLlPop.js";import{u as D}from"./vuex.esm-bundler-CP9yGIBU.js";const R={class:"max-w-7xl mx-auto grid grid-cols-1 sm:px-6 lg:grid-flow-col-dense"},I={class:"space-y-6 lg:col-start-1 lg:col-span-2"},N={class:"lg:flex lg:items-center lg:justify-between"},P={class:"mt-5 flex lg:mt-0 lg:ml-4"},V={class:"sm:ml-3"},T={"aria-labelledby":"roles-title"},$={class:"flex flex-col"},j={class:"-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"},z={class:"py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8"},M={__name:"index",setup(L){const m=D(),u=C(null),g=B(()=>[{key:"name",label:"Role",sortable:!1},{key:"userCount",label:"Number of Users",sortable:!1},{key:"actions",label:"",tdClass:"text-right text-sm font-medium pl-0",thClass:"text-right pl-0",sortable:!1}]);async function x({page:s,sort:l}){let i={page:s},n=await m.dispatch("adminRoles/fetchRoles",i);return{data:n.data.data,pagination:{totalPages:n.data.last_page,currentPage:s,totalCount:n.data.total,limit:20}}}const b=async s=>await m.dispatch("dialog/openDialog",s),h=async s=>{await b({title:"Are you sure?",message:"You will not be able to recover this role.",yesLabel:"Delete",noLabel:"Cancel",variant:"danger",hideNoButton:!1,size:"lg"})&&(await m.dispatch("adminRoles/removeRole",s),u.value.refresh())};return(s,l)=>{const i=r("BaseIcon"),n=r("router-link"),p=r("BaseDropdownItem"),y=r("BaseDropdown"),v=r("BaseTable"),w=r("BasePage");return _(),f(w,null,{default:t(()=>[e("main",R,[e("div",I,[e("div",N,[l[2]||(l[2]=e("div",{class:"flex-1 min-w-0"},[e("h2",{class:"text-2xl font-semibold leading-7 text-gray-900 sm:text-3xl"}," Role Managment ")],-1)),e("div",P,[l[1]||(l[1]=e("span",{class:"hidden sm:block ml-3"},null,-1)),e("span",V,[a(n,{to:{name:"admin.roles.create"},type:"button",class:"inline-flex items-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none"},{default:t(()=>[a(i,{name:"PlusIcon",class:"sm:-ml-1 sm:mr-2 text-white"}),l[0]||(l[0]=c(" Create Role ",-1))]),_:1})])])]),e("section",T,[e("div",$,[e("div",j,[e("div",z,[a(v,{ref_key:"table",ref:u,data:x,columns:g.value},{"cell-name":t(({row:o})=>[a(n,{to:{name:"admin.roles.edit",params:{id:o.data.id}},class:"font-medium capitalize text-primary-500"},{default:t(()=>[c(d(o.data.name),1)]),_:2},1032,["to"])]),"cell-userCount":t(({row:o})=>[c(d(o.data.users_count),1)]),"cell-actions":t(({row:o})=>[o.data.id>1?(_(),f(y,{key:0},{activator:t(()=>[a(i,{name:"EllipsisVerticalIcon",class:"mr-3 h-5 w-5 text-gray-500"})]),default:t(()=>[a(n,{to:`roles/${o.data.id}/edit`},{default:t(()=>[a(p,null,{default:t(()=>[a(i,{name:"PencilIcon",class:"mr-3 h-5 w-5 text-gray-500"}),c(" "+d(s.$t("general.edit")),1)]),_:1})]),_:1},8,["to"]),a(p,{onClick:S=>h(o.data.id)},{default:t(()=>[a(i,{name:"TrashIcon",class:"mr-3 h-5 w-5 text-gray-500"}),c(" "+d(s.$t("general.delete")),1)]),_:1},8,["onClick"])]),_:2},1024)):k("",!0)]),_:1},8,["columns"])])])])])])])]),_:1})}}};export{M 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.