import{r as n,o as N,g as E,w as s,h as t,i as u,j as d,p as C,t as _}from"./vendor-cf98dd49.js";import{_ as w}from"./_plugin-vue_export-helper-c27b6911.js";const A={data:()=>({tableLoading:!0,assingDepartmentModal:!1,requestId:"",selectedDepartment:"",departments:[],requests:[],headers:[{align:"start",key:"id",title:"ID"},{key:"name",title:"Name"},{key:"email",title:"E-Mail"},{key:"setupDone",title:"Status"},{key:"action",title:"Actions"}],breadcrumbs:[{title:"Home",disabled:!1,href:"/"},{title:"Access Manager",disabled:!0}]}),mounted(){this.loadRequests()},methods:{openUserAccess(e){window.location.href="/access-manager-process-usser/"+e},loadRequests(){this.tableLoading=!0,this.$root.axiosGet("/access-manager-requests").then(e=>{this.requests=e.response.data.data,this.tableLoading=!1})},getColor(e){return e===0||e===3?"yellow":e===1?"green":e===2?"red":"grey"},getText(e){return e===0?"INCOMPLETED":e===1?"COMPLETED":e===2?"PENDING DELETE":e===3?"PENDING UPDATE":"UNKNOWN"}}},M={style:{"font-size":"24px"}},q=u("strong",null,"Access Manager",-1);function L(e,T,z,P,I,o){const r=n("v-icon"),p=n("v-spacer"),m=n("v-breadcrumbs"),c=n("v-row"),l=n("v-divider"),v=n("v-avatar"),g=n("v-hover"),i=n("v-col"),f=n("v-chip"),h=n("v-data-table"),b=n("v-card-text"),y=n("v-card"),D=n("v-container");return N(),E(D,null,{default:s(()=>[t(c,null,{default:s(()=>[u("span",M,[t(r,{"x-small":"",class:"pb-2",icon:"mdi-security"}),d(),q]),t(p),t(m,{items:e.breadcrumbs,style:{"font-size":"12px"}},null,8,["items"])]),_:1}),t(l,{class:"pb-7"}),t(c,null,{default:s(()=>[t(i,{cols:"12",class:"pt-0 pb-0"},{default:s(()=>[t(y,{elevation:"5",style:{width:"100%",height:"auto"},title:"Access Manager",subtitle:"Controls creating, editing, deleting users access."},{prepend:s(()=>[t(v,{color:"blue-darken-2",size:"45"},{default:s(()=>[t(r,{size:"large",icon:"mdi-security"})]),_:1})]),default:s(()=>[t(l),t(b,null,{default:s(()=>[t(h,{headers:e.headers,items:e.requests,loading:e.tableLoading},{"item.action":s(({item:a})=>[t(g,null,{default:s(({isHovering:k,props:x})=>[t(r,C({size:"large"},x,{color:k?"blue-grey-darken-1":"blue-grey-darken-4",variant:"plain",icon:"mdi-cog-outline",onClick:U=>{o.openUserAccess(a.id)}}),null,16,["color","onClick"])]),_:2},1024)]),"item.name":s(({item:a})=>[t(i,{cols:"auto"},{default:s(()=>[d(_(a.firstname)+" "+_(a.lastname),1)]),_:2},1024)]),"item.setupDone":s(({item:a})=>[t(f,{color:o.getColor(a.setupDone),text:o.getText(a.setupDone),class:"text-uppercase",label:"",size:"small"},null,8,["color","text"])]),_:1},8,["headers","items","loading"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}const O=w(A,[["render",L]]);export{O as default};
