import{u as B,m as j,h as k,q as C,z as N,t as h,v as S,H as L,r as s,o as c,k as f,l,f as R,a as V,d as o,y as t,x as q,b as _}from"./app-44623493.js";const M={key:0,class:"mb-4"},U=o("img",{class:"h-32 w-full object-cover lg:h-48",src:"/images/user-cover.jpeg",alt:""},null,-1),D={class:"-mt-12 flex w-full justify-center sm:-mt-16"},O=["src"],z={class:"mt-4 text-center text-white"},H={class:"font-bold"},Q=o("i",{class:"fas fa-mobile-alt"},null,-1),T={name:"EmployeeShow"},I=Object.assign(T,{setup(A){const g=B(),y=j(),v=k(),i=C("emitter"),b=[{name:"EmployeeShowBasic",icon:"fas fa-chevron-right",label:"general.basic"},{name:"EmployeeShowContact",icon:"fas fa-chevron-right",label:"contact.contact"},{name:"EmployeeRecord",icon:"fas fa-chevron-right",label:"employee.record.record"},{name:"EmployeeShowLogin",icon:"fas fa-chevron-right",label:"contact.login.login"},{name:"EmployeeQualification",icon:"fas fa-chevron-right",label:"employee.qualification.qualification"},{name:"EmployeeDocument",icon:"fas fa-chevron-right",label:"employee.document.document"},{name:"EmployeeExperience",icon:"fas fa-chevron-right",label:"employee.experience.experience"}],a=N(!1),e=h({contact:{}});h([]);const r=async()=>{a.value=!0,await v.dispatch("employee/get",{uuid:g.params.uuid}).then(n=>{Object.assign(e,n),a.value=!1}).catch(n=>{a.value=!1,y.push({name:"EmployeeList"})})};return S(async()=>{i.on("employeeUpdated",()=>{r()}),await r()}),L(()=>{i.all.delete("employeeUpdated")}),(n,F)=>{const w=s("BaseLoader"),E=s("router-view"),x=s("ModuleConfig");return c(),f(x,{navigations:b,"use-uuid":""},{header:l(()=>[R(w,null,{default:l(()=>{var m,u,d,p;return[e.uuid?(c(),V("div",M,[U,o("div",D,[o("img",{class:"h-24 w-24 rounded-full ring-4 ring-white sm:h-32 sm:w-32",src:e.contact.photo,alt:""},null,8,O)]),o("div",z,[o("p",null,t(e.codeNumber),1),o("h1",H,t(e.contact.name),1),o("p",null,t((u=(m=e.lastRecord)==null?void 0:m.department)==null?void 0:u.name)+" "+t((p=(d=e.lastRecord)==null?void 0:d.designation)==null?void 0:p.name),1),o("p",null,[Q,q(" "+t(e.contact.contactNumber),1)])])])):_("",!0)]}),_:1})]),default:l(()=>[e.uuid?(c(),f(E,{key:0,employee:e},null,8,["employee"])):_("",!0)]),_:1})}}});export{I as default};
