import{a as B}from"./chunk-OMYRNWA7.js";import{a as M}from"./chunk-BAEZMG5T.js";import{a as U}from"./chunk-C72E7DYO.js";import"./chunk-WIPHIZE3.js";import"./chunk-VUFRXBL5.js";import"./chunk-AG5UR6GS.js";import{q as C}from"./chunk-HKLJ6VPZ.js";import"./chunk-MQ46LYK7.js";import{b,c as P}from"./chunk-PQ5Q7HJL.js";import"./chunk-72CHOCZD.js";import{Ab as I,Cb as h,Db as S,Eb as t,Fb as i,G as v,Gb as y,O as x,Qb as E,Ra as g,Ua as e,Y as u,ac as n,bc as p,cc as r,f,gb as D,mb as _,tb as c,vc as l,wc as s}from"./chunk-56X5LYJH.js";import"./chunk-TSRGIXR5.js";function T(d,o){d&1&&(t(0,"span"),n(1,", "),i())}function $(d,o){if(d&1&&(n(0),_(1,T,2,0,"span",11)),d&2){let m=o.$implicit,a=o.$index,w=E();r(" ",m.name,""),e(),c("if",a<w.userDetail.role.length-1)}}var O=class d{ngOnInit(){this.loadDetail()}userDetail;destroy$=new f;_apiService=u(U);route=u(C);loading=!0;userId=this.route.snapshot.params.id;loadDetail(){this.userId&&(this.loading=!1,this._apiService.GetById("employees/showData",this.userId).pipe(x(this.destroy$),v(()=>this.loading=!0)).subscribe({next:o=>{this.userDetail=o.data},error:o=>{console.error("Error fetching user permission details",o)}}))}static \u0275fac=function(m){return new(m||d)};static \u0275cmp=D({type:d,selectors:[["app-user-details"]],decls:62,vars:41,consts:[["Translationprefix","userDetail",3,"title","imageSrc"],["appShowLoaderUntilPageLoaded","",1,"",3,"isReady"],[1,"card","p-4","shadow-sm"],[1,"fields","gy-3"],[1,"field"],["href","#",1,"text-decoration-none"],[1,"text-success"],[1,"mt-4"],[1,"action"],["href","#"],[3,"href"],[4,"if"]],template:function(m,a){m&1&&(y(0,"app-page-title",0),t(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"strong"),n(6),l(7,"translate"),i(),t(8,"span"),n(9),i()(),t(10,"div",4)(11,"strong"),n(12),l(13,"translate"),i(),t(14,"span"),n(15),i()(),t(16,"div",4)(17,"strong"),n(18),l(19,"translate"),i(),t(20,"a",5),n(21),i()(),t(22,"div",4)(23,"strong"),n(24),l(25,"translate"),i(),t(26,"span"),n(27),i()(),t(28,"div",4)(29,"strong"),n(30),l(31,"translate"),i(),t(32,"span"),h(33,$,2,2,null,null,I),i()(),t(35,"div",4)(36,"strong"),n(37),l(38,"translate"),i(),t(39,"span"),n(40),i()(),t(41,"div",4)(42,"strong"),n(43),l(44,"translate"),i(),t(45,"span"),n(46),i()(),t(47,"div",4)(48,"strong"),n(49),l(50,"translate"),i(),t(51,"span",6),n(52),i()()(),t(53,"div",7)(54,"h5",8)(55,"a",9),n(56),l(57,"translate"),i()(),t(58,"h5",8)(59,"a",10),n(60),l(61,"translate"),i()()()()()),m&2&&(c("title","showUser")("imageSrc","assets/images/entry.png"),e(),c("isReady",a.loading),e(5),r("",s(7,21,"userDetail.full_name_label"),":"),e(3),p(a.userDetail.full_name),e(3),r("",s(13,23,"userDetail.employee_code_label"),":"),e(3),p(a.userDetail.employee_code),e(3),r("",s(19,25,"userDetail.department_label"),":"),e(3),p(a.userDetail.department),e(3),r("",s(25,27,"userDetail.position_label"),":"),e(3),p(a.userDetail.position),e(3),r("",s(31,29,"userDetail.role_label"),":"),e(3),S(a.userDetail.role),e(4),r("",s(38,31,"userDetail.facility_label"),":"),e(3),p(a.userDetail.facility),e(3),r("",s(44,33,"userDetail.last_login_label"),":"),e(3),p(a.userDetail.last_log),e(3),r("",s(50,35,"userDetail.status_label"),":"),e(3),p(a.userDetail.status),e(4),r("",s(57,37,"userDetail.activity_log")," (Hold BE)"),e(3),c("href","/home/userAndPermissions/userPermission/"+a.userId,g),e(),r(" ",s(61,39,"userDetail.permissions")," "))},dependencies:[M,B,P,b],styles:[".card[_ngcontent-%COMP%]{border-radius:8px;background:#fff}h4[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{color:#f7941d;margin-left:8px}.action[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{font-weight:500;font-size:24px;text-decoration:underline;color:var(--black)}.fields[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:20px 30px}.field[_ngcontent-%COMP%]{display:flex;align-items:center;gap:20px}"]})};export{O as UserDetailsComponent};
