import{a as h}from"./chunk-ABXDWOZI.js";import"./chunk-4NGHU5PZ.js";import"./chunk-NWOU67BD.js";import"./chunk-TBSUMTHM.js";import"./chunk-CKJJI5MU.js";import"./chunk-TAT3HGQ4.js";import"./chunk-4SWKWV3M.js";import"./chunk-DY645AKB.js";import"./chunk-5I5ZFUTL.js";import"./chunk-QN66BDDM.js";import"./chunk-JBNKEIUX.js";import"./chunk-5SW267PH.js";import"./chunk-PU7DBJLZ.js";import"./chunk-3DDBG3AR.js";import"./chunk-5MLUVH77.js";import"./chunk-SMMBZMNL.js";import"./chunk-S5GA3KRV.js";import"./chunk-EFONMPAR.js";import"./chunk-YQXLYYOT.js";import"./chunk-6RITFGP2.js";import"./chunk-HGXDKXJP.js";import"./chunk-WQUXAKOL.js";import"./chunk-LYNKRDJC.js";import"./chunk-SKY4LXUD.js";import"./chunk-BZT47AWD.js";import"./chunk-5WQBRAHK.js";import"./chunk-4FTRQKHH.js";import"./chunk-BYXBJQAS.js";import"./chunk-TTWRMELT.js";import"./chunk-EMJ4QQUL.js";import"./chunk-QPCAJSKO.js";import"./chunk-QV67LFVX.js";import"./chunk-4O3FVBGX.js";import"./chunk-TGWIHQDX.js";import"./chunk-Q5KZV54I.js";import"./chunk-YHVRQUSB.js";import"./chunk-N7PBPSN6.js";import"./chunk-3Z7PXZF3.js";import"./chunk-43BLBOSI.js";import"./chunk-IWSLIKCG.js";import"./chunk-2DXJE6G7.js";import"./chunk-7RP244JU.js";import"./chunk-LHGSJXTX.js";import"./chunk-ZKNPBXGB.js";import{b as c}from"./chunk-S3ADKFO2.js";import"./chunk-I5MYHHJE.js";import{Fb as r,Gb as l,Hb as n,Wb as u,Xb as d,gb as a,lb as o}from"./chunk-CKLXM6EG.js";import"./chunk-TSRGIXR5.js";var m=[[["","test",""]]],f=["[test]"],p=class i{constructor(s){this.translate=s;this.buildHighlightStyles(),this.translate.onLangChange.subscribe(()=>{this.buildHighlightStyles()})}itemss;usersHeaders=["id","full_name","department.name","role","last_update","is_active.value"];tableHighlightedFields={};filterSearchField=[];activeStyle={color:"#1D8702",backgroundColor:"#1D870214",fontWeight:"bold",padding:"10px",borderRadius:"5px",whiteSpace:"nowrap"};inactiveStyle={color:"red",backgroundColor:"#DA303014",fontWeight:"bold",padding:"10px",borderRadius:"5px",whiteSpace:"nowrap"};otherStyle={color:"grey",backgroundColor:"#1f028709",fontWeight:"bold",padding:"10px",borderRadius:"5px",whiteSpace:"nowrap"};fields=[{type:"input",title:"code",controlName:"code"},{type:"input",title:"name",controlName:"name"}];titlesOfMenu=[{label:"show",action:"show",routerLink:"/users/show-user",permission:"view purchase_employees_accounts"},{label:"edit",action:"edit",routerLink:"/users/edit-user",permission:"changeStatusAccess purchase_employees"},{label:"delete",action:"delete",permission:"delete purchase_employees_accounts"}];buildHighlightStyles(){let s=this.translate.instant("status.active"),e=this.translate.instant("status.Not Active");this.tableHighlightedFields={"is_active.value":{fieldToCheck:"is_active.value",stylesByValue:{[s]:this.activeStyle,[e]:this.inactiveStyle,__other__:this.otherStyle}}}}ngOnInit(){this.filterSearchField=[{type:"dateWithOptions",title:"date_range",controlName:"date",fromControlName:"from",toControlName:"to",showQuickButtons:!0,class:"col-6",parentClass:"col-6"},{type:"select",title:"status",class:"col-md-4",controlName:"is_active",options:[{id:"1",name:this.translate.instant("users.active")},{id:"7",name:this.translate.instant("users.inactive")},{id:"5",name:this.translate.instant("users.suspended")}]}]}static \u0275fac=function(e){return new(e||i)(a(c))};static \u0275cmp=o({type:i,selectors:[["app-users-list"]],ngContentSelectors:f,decls:2,vars:18,consts:[["routeOfButton2","/users/add-user","titleOfButton2","add_user","url","procurement/employees/list?is_user=1","translationPrefixx","users","title","users","deleteRowUrl","procurement/employees/deleteuser","classesForTable","designOne","iconOfBtn2","fa-solid fa-plus","translationPrefix","users",3,"ShowButton","Menu","showIconORTITLE","filterKeyData","ShowModal","menuList","headers","titleOfPage","showMenubar","ShowButton3","showFilter","filterSearchField","tableHighlightedFields","showTitle","showBreadcrumb","useCustomStatusStyling","titleOfTable"]],template:function(e,t){e&1&&(u(m),l(0,"app-page-body",0),d(1),n()),e&2&&r("ShowButton",!1)("Menu",t.titlesOfMenu)("showIconORTITLE",!0)("filterKeyData",t.usersHeaders)("ShowModal",!1)("menuList",t.itemss)("headers",t.usersHeaders)("titleOfPage","system_roles")("showMenubar",!0)("ShowButton3",!0)("showFilter",!0)("filterSearchField",t.filterSearchField)("ShowButton",!0)("tableHighlightedFields",t.tableHighlightedFields)("showTitle",!0)("showBreadcrumb",!0)("useCustomStatusStyling",!1)("titleOfTable",!0)},dependencies:[h],encapsulation:2})};export{p as UsersList};
