1import{b as k}from"./chunk-Y6ZMX77D.js";import"./chunk-XGEV72WQ.js";import"./chunk-Y7YXHVH2.js";import"./chunk-EYKL3RAX.js";import"./chunk-V6QIODXI.js";import"./chunk-KWVGBJ52.js";import"./chunk-TCXEDDWJ.js";import"./chunk-YXVEZVJ4.js";import"./chunk-WE6WJZ3L.js";import{a as O}from"./chunk-U7FGWDOD.js";import"./chunk-JDU64GG4.js";import"./chunk-TWF5VCMV.js";import"./chunk-2KVE2375.js";import{a as g}from"./chunk-Z6CEOJWW.js";import"./chunk-ODETFN7W.js";import"./chunk-PC7KDAWZ.js";import"./chunk-YF7KRSY6.js";import{a as P}from"./chunk-QGMGIOFS.js";import"./chunk-N4RVYKTA.js";import"./chunk-4ZAG3HXC.js";import"./chunk-Q3O4UTRX.js";import"./chunk-MLMGL4QO.js";import"./chunk-GEYULVKP.js";import"./chunk-R2XRE5BH.js";import"./chunk-HVX6FQEA.js";import"./chunk-OMPJBGJV.js";import"./chunk-IG7BCB22.js";import{a as F}from"./chunk-7Z2AZHJW.js";import"./chunk-CL627EQA.js";import"./chunk-MR4J3GAE.js";import"./chunk-GO5C3RZZ.js";import"./chunk-7TIQMJNK.js";import"./chunk-75TNSU2R.js";import"./chunk-BZ4JX7CX.js";import"./chunk-GYW5LQLV.js";import"./chunk-LCF3QRKX.js";import"./chunk-DHWVOWFC.js";import"./chunk-FPUQYHPI.js";import"./chunk-MKHCCJED.js";import"./chunk-EN7FUT6O.js";import{f as S,g as C}from"./chunk-MP3B4MPU.js";import"./chunk-4PP2FJCQ.js";import"./chunk-EKD2LGHF.js";import"./chunk-JHKO534Q.js";import"./chunk-LMRDRJSO.js";import"./chunk-LKXFT5TF.js";import{b as L,c as T}from"./chunk-3T3PFJSX.js";import{Gc as u,Hc as h,Jb as c,Mb as m,R as d,Za as b,ba as i,d as v,mb as y,ta as f}from"./chunk-UJIV47FO.js";import{a as s,b as p}from"./chunk-VB56BUGO.js";var o=class t{destroy$=new v;leadService=i(P);formService=i(O);authService=i(S);translate=i(L);currentUserId=null;isStandManager=this.authService.getRoles()?.includes(C.STAND_MANAGER)??!1;leadFilters=f([]);applyTranslations(){let e=a=>this.translate.instant(a);this.leadFilters.set([null,{type:"input",placeholder:e("pages.lead.lead-table.columns.leadId")},{type:"date",placeholder:e("pages.lead.lead-table.columns.capturedOn")},{type:"date",placeholder:e("pages.lead.lead-table.columns.changedOn")},{type:"input",placeholder:e("pages.lead.lead-table.columns.changedBy")},{type:"date",placeholder:e("pages.lead.lead-table.columns.syncOn")},{type:"single-select",key:"form",placeholder:e("pages.lead.lead-table.columns.form"),options:[]},{type:"single-select",placeholder:e("pages.lead.lead-table.columns.checked"),options:[{value:!0,label:e("pages.lead.lead-table.columns.checked")},{value:"false",label:"Not Checked"}]},{type:"single-select",placeholder:e("pages.lead.lead-table.columns.internalEmails"),options:[{value:!0,label:"Sent"},{value:"false",label:"Not Sent"},{value:"error",label:"Error"}]},{type:"single-select",placeholder:e("pages.lead.lead-table.columns.followUpEmails"),options:[{value:!0,label:"Sent"},{value:"false",label:"Not Sent"},{value:"error",label:"Error"}]},{type:"single-select",placeholder:e("pages.lead.lead-table.columns.syncStatus"),options:[{value:!0,label:"Synced"},{value:"false",label:"Not Synced"}]},null])}ngOnInit(){this.applyTranslations(),this.leadService.isPlatformBrwsr()&&(this.currentUserId=Number(this.authService.getUserId())||null,this.loadData()),this.translate.onLangChange.pipe(d(this.destroy$)).subscribe(()=>{this.applyTranslations(),this.leadService.isPlatformBrwsr()&&(this.currentUserId=Number(this.authService.getUserId())||null,this.loadData())})}loadData(){(this.isStandManager&&this.currentUserId?this.formService.getFormsPickList(this.currentUserId):this.formService.getPickList()).pipe(d(this.destroy$)).subscribe(a=>{let r=(a?.data||[]).map(l=>p(s({},l),{value:l.id,name:l.name??l.label,label:l.name??l.label}));this.leadFilters.update(l=>l.map(n=>n?.key==="form"?p(s({},n),{options:r}):n))})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}static \u0275fac=function(a){return new(a||t)};static \u0275cmp=y({type:t,selectors:[["app-leads"]],decls:4,vars:14,consts:[[3,"title","mainPage"],[3,"filters","pageTitle","isAddButtonShow","isH1Title","isExportButtonShow","isTopFilters","isTopFilterByEvent","isLeadForForm"]],template:function(a,r){a&1&&(m(0,"app-page-header",0),u(1,"translate"),m(2,"app-leads-table",1),u(3,"translate")),a&2&&(c("title",h(1,10,"pages.lead.title"))("mainPage",!0),b(2),c("filters",r.leadFilters())("pageTitle",h(3,12,"pages.lead.title"))("isAddButtonShow",!0)("isH1Title",!1)("isExportButtonShow",!0)("isTopFilters",!0)("isTopFilterByEvent",!0)("isLeadForForm",!1))},dependencies:[k,F,T],styles:[".import-result-card[_ngcontent-%COMP%]{margin-top:20px}.dark-theme[_nghost-%COMP%] .import-result-card[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .import-result-card[_ngcontent-%COMP%]{background:#0f1217;border:1px solid #1f2937;border-radius:8px;padding:16px;color:#e2e8f0}"]})};var z=[{path:"",component:o},{path:"add",loadComponent:()=>import("./chunk-NIEVIXSX.js").then(t=>t.AddEditLeadComponent),canDeactivate:[g]},{path:"edit/:id",loadComponent:()=>import("./chunk-NIEVIXSX.js").then(t=>t.AddEditLeadComponent),data:{renderMode:"client"},canDeactivate:[g]},{path:"view/:id",loadComponent:()=>import("./chunk-MZTY5F5N.js").then(t=>t.LeadsViewComponent),data:{renderMode:"client"}},{path:"emails/:id",loadComponent:()=>import("./chunk-LZANHGE2.js").then(t=>t.EmailLogComponent),data:{renderMode:"client"}}];export{z as LEADS_ROUTES};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.