import{a as p}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 d}from"./chunk-S3ADKFO2.js";import{n}from"./chunk-I5MYHHJE.js";import{Fb as i,Ib as l,gb as o,lb as a}from"./chunk-CKLXM6EG.js";import"./chunk-TSRGIXR5.js";var u=class r{constructor(s){this.translate=s;this.buildHighlightStyles(),this.buildMenuBasedOnStatus(),this.translate.onLangChange.subscribe(()=>{this.buildHighlightStyles(),this.buildMenuBasedOnStatus()})}translationPrefix="supply-orders";Field;tableHighlightedFields={};buildHighlightStyles(){let s=this.translate.instant("status.draft"),t=this.translate.instant("status.submitted"),e="\u0645\u0642\u062F\u0645\u0629";this.tableHighlightedFields={"supply_order.status.value":{mainStyle:{fontWeight:"bold",padding:"10px",borderRadius:"5px",whiteSpace:"nowrap"},stylesByValue:{[s]:{borderRadius:"8px",border:" 1px solid #BF9300",background:"rgba(191, 147, 0, 0.04)",display:"flex",padding:"4px 8px",gap:"10px",color:"#BF9300",justifyContent:"center"},[t]:{borderRadius:"8px",border:" 1px solid #1D8702",background:"rgba(191, 147, 0, 0.04)",display:"flex",padding:"4px 8px",gap:"10px",color:"#1D8702",justifyContent:"center"},[e]:{borderRadius:"8px",border:" 1px solid #1D8702",background:"rgba(191, 147, 0, 0.04)",display:"flex",padding:"4px 8px",gap:"10px",color:"#1D8702",justifyContent:"center"},Draft:{borderRadius:"8px",border:" 1px solid #BF9300",background:"rgba(191, 147, 0, 0.04)",display:"flex",padding:"4px 8px",color:"#BF9300",textAlign:"center",justifyContent:"center"},Submitted:{borderRadius:"8px",border:" 1px solid #1D8702",background:"rgba(191, 147, 0, 0.04)",display:"flex",padding:"4px 8px",gap:"10px",color:"#1D8702",justifyContent:"center"}}}}}Menu=[];buildMenuBasedOnStatus(){this.Menu=[{label:"view",action:"show",routerLink:"/supply-order/show",permission:"view supply_orders"},{label:"edit",action:"draft",routerLink:"/supply-order/edit",permission:"update supply_orders"}]}floorsHeaders=["id","name","po_number","vendor_name","supply_order.delivery_info.from_department","supply_order.delivery_info.to_department","created_at","updated_at","supply_order.status.value"];ngOnInit(){this.Field=[{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-4",controlName:"status",options:[{id:"draft",name:this.translate.instant("status.draft")},{id:"submitted",name:this.translate.instant("status.submit")}]}]}static \u0275fac=function(t){return new(t||r)(o(d))};static \u0275cmp=a({type:r,selectors:[["app-supply-orders-list"]],decls:1,vars:18,consts:[["classesForTable","designOne","routeAfterSuccess","/supply-order","url","procurement/supply_orders","titleOfPage","supply-orders",3,"showCheckboxes","ShowModal","showSearch","showIconBtn2","headers","translationPrefixx","showMenubar","Menu","showBreadcrumb","showFilter","filterKeyData","filterSearchField","ShowButton","ShowButton2","ApplyTheFunctionOfDraft","useCustomStatusStyling","tableHighlightedFields","removeBulkDelete"]],template:function(t,e){t&1&&l(0,"app-page-body",0),t&2&&i("showCheckboxes",!0)("ShowModal",!1)("showSearch",!0)("showIconBtn2",!1)("headers",e.floorsHeaders)("translationPrefixx",e.translationPrefix)("showMenubar",!0)("Menu",e.Menu)("showBreadcrumb",!0)("showFilter",!0)("filterKeyData",e.floorsHeaders)("filterSearchField",e.Field)("ShowButton",!1)("ShowButton2",!1)("ApplyTheFunctionOfDraft",!0)("useCustomStatusStyling",!1)("tableHighlightedFields",e.tableHighlightedFields)("removeBulkDelete",!0)},dependencies:[p,n],encapsulation:2})};export{u as SupplyOrdersList};
