PageSourceSearch

https://globaltechinsider.com/chunk-UJWBNUGD.js

js globaltechinsider.com collected 2026-10-08 09:06:22 UTC 8,757 bytes, 1 lines download raw bytes

1import{a as X,b as Y}from"./chunk-GZOM34EB.js";import{c as ee,f as te}from"./chunk-P3DWJQLZ.js";import"./chunk-LP7ZHHA4.js";import"./chunk-PLIKTP2P.js";import"./chunk-OM7DKWXT.js";import"./chunk-AB3AN26M.js";import{a as W}from"./chunk-SGE4KM7J.js";import"./chunk-2VMI4FPH.js";import"./chunk-DLGVX5IJ.js";import{a as G,b as z}from"./chunk-JME5SD52.js";import{a as H,b as V}from"./chunk-XI6P7UXA.js";import"./chunk-QYS4YEEU.js";import{a as Q}from"./chunk-3SIPG3HJ.js";import{b as J,c as K}from"./chunk-YFJLGAP4.js";import"./chunk-NTZLQIYU.js";import"./chunk-OKJHMPAV.js";import"./chunk-WYVNMOBT.js";import"./chunk-7XTSVMMU.js";import"./chunk-2Q2KWVSD.js";import{a as $}from"./chunk-5QJL6KZL.js";import"./chunk-LFGMZSMV.js";import"./chunk-UV4TQKTZ.js";import"./chunk-HBT7HMJU.js";import{aa as f,ea as A}from"./chunk-CMQKVJ74.js";import"./chunk-4YRY4IP2.js";import"./chunk-427ZVM3D.js";import{m as j,o as Z,p as O,t as U}from"./chunk-LJ5YDJH6.js";import"./chunk-TAYT3DJU.js";import{$c as F,Ab as c,Eb as k,Fb as h,Gb as g,O as I,Sb as o,Tb as p,Vb as C,Xa as d,Ya as u,ba as E,cc as q,dc as N,ec as _,f as L,fc as S,gc as P,jc as R,kb as y,la as T,ma as w,na as B,nb as m,oa as M,od as D,tb as x,yb as t,zb as i}from"./chunk-TJVZQCHK.js";import"./chunk-WWX6BADO.js";var ie=n=>({"bg-gray-100 text-gray-500":n}),oe=()=>({"min-width":"50rem"}),se=()=>[10,20,30],de=()=>["/admin/categories/subcategory/countries/leads/lead"],me=(n,a,e,r,s)=>({id:n,year:a,subcategory_id:e,subcategory_name:r,category_id:s}),ne=(n,a)=>({"bg-orange-100 text-orange-600":n,"bg-green-100 text-green-600":a}),le=()=>[1,2,3,4,5];function ce(n,a){n&1&&(t(0,"tr")(1,"th",16),o(2,"Team"),i(),t(3,"th",16),o(4,"Last Template"),i(),t(5,"th",16),o(6,"Delivered"),i(),t(7,"th",16),o(8,"Payment Date"),i(),t(9,"th",16),o(10,"Profile Updated"),i(),t(11,"th",16),o(12,"Published"),i()())}function pe(n,a){if(n&1&&(t(0,"tr")(1,"td",17)(2,"a",18)(3,"span",19),o(4),i(),t(5,"span",20),o(6),i()()(),t(7,"td",21),o(8),i(),t(9,"td",21),o(10),i(),t(11,"td",21),o(12),i(),t(13,"td",21)(14,"button",22),o(15),i()(),t(16,"td",21)(17,"button",22),o(18),i()()()),n&2){let e=a.$implicit,r=g(3);d(2),m("routerLink",_(12,de))("queryParams",R(13,me,e.id,r.year,r.subcategoryId,r.subcategoryName,r.categoryId)),d(2),C("",e.first_name," ",e.last_name,""),d(2),p(e.email),d(2),p((e.last_template==null?null:e.last_template.name)||"-"),d(2),p(e.delivered||"-"),d(2),p(e.payment_date||"-"),d(2),m("ngClass",P(19,ne,!e.profile_updated,e.profile_updated)),d(),p(e.profile_updated?"Updated":"Pending"),d(2),m("ngClass",P(22,ne,!e.published,e.published)),d(),p(e.published?"Published":"Pending")}}function ue(n,a){if(n&1){let e=k();t(0,"p-table",11),y(1,ce,13,0,"ng-template",12)(2,pe,19,25,"ng-template",13),i(),t(3,"div",14)(4,"p-paginator",15),h("onPageChange",function(s){T(e);let l=g(2);return w(l.onPageChange(s))}),i()()}if(n&2){let e=g(2);m("value",e.leads)("tableStyle",_(6,oe)),d(4),m("rows",e.rowsPerPage)("totalRecords",e.totalRecords)("first",e.currentPage*e.rowsPerPage)("rowsPerPageOptions",_(7,se))}}function ge(n,a){if(n&1&&(t(0,"div",10),B(),t(1,"svg",23),c(2,"path",24),i(),M(),t(3,"p",25),o(4,"Nothing found"),i(),t(5,"p",26),o(6),i()()),n&2){let e=g(2);d(6),p(e.paidLeads?"No paid leads found":"No unpaid leads found")}}function ye(n,a){if(n&1&&y(0,ue,5,8)(1,ge,7,1,"div",10),n&2){let e=g();x(e.leads.length>0?0:1)}}function _e(n,a){n&1&&(t(0,"tr")(1,"th",16),o(2,"Team"),i(),t(3,"th",16),o(4,"Last Template"),i(),t(5,"th",16),o(6,"Delivered"),i(),t(7,"th",16),o(8,"Payment Date"),i()())}function he(n,a){n&1&&(t(0,"tr")(1,"td"),c(2,"p-skeleton",27),i(),t(3,"td"),c(4,"p-skeleton",28),i(),t(5,"td"),c(6,"p-skeleton",28),i(),t(7,"td"),c(8,"p-skeleton",28),i()())}function fe(n,a){n&1&&(t(0,"p-table",9),y(1,_e,9,0,"ng-template",12)(2,he,9,0,"ng-template",13),i()),n&2&&m("value",_(1,le))}var ae=class n{constructor(a,e,r,s,l,v){this.route=a;this.leadsService=e;this.paymentService=r;this.messageService=s;this.brandsService=l;this.router=v}countryName="";countryId="";subcategoryName="";subcategoryId="";categoryId="";year="";leads=null;paidLeads=!0;currentBrand=null;selectedLeadId=null;isUpdating=!1;breadcrumbItems=[];currentPage=0;totalRecords=0;pageCount=0;rowsPerPage=20;destroy$=new L;
1ngOnInit(){let a=this.route.snapshot.queryParamMap.get("country_name");a&&(this.countryName=a);let e=this.route.snapshot.queryParamMap.get("country_id");e&&(this.countryId=e);let r=this.route.snapshot.queryParamMap.get("subcategory_name");r&&(this.subcategoryName=r);let s=this.route.snapshot.queryParamMap.get("subcategory_id");s&&(this.subcategoryId=s);let l=this.route.snapshot.queryParamMap.get("category_id");l&&(this.categoryId=l);let v=this.route.snapshot.queryParamMap.get("year");v&&(this.year=v),this.getLeads(),this.breadcrumbItems=[{label:"Categories",routerLink:"/admin/categories",icon:"pi pi-home"},{label:"Subcategories",routerLink:["/admin/categories/subcategory"],queryParams:{id:this.categoryId,year:this.year}},{label:"Continents",routerLink:["/admin/categories/subcategory/countries"],queryParams:{category_id:this.categoryId,name:this.subcategoryName,id:this.subcategoryId,year:this.year}},{label:"Leads"}],this.brandsService.brand$.pipe(I(this.destroy$)).subscribe(b=>{if(!b)return;let ve=!this.currentBrand,re=this.currentBrand&&b!==this.currentBrand;this.currentBrand=b,re&&this.router.navigate(["/admin/categories"])})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}getLeads(a=!0,e=0){this.leads=null,this.paidLeads=a,this.currentPage=e;let r={paid:a};this.leadsService.getLeads(e,this.countryId,this.subcategoryId,r).subscribe(s=>{this.leads=s.leads,this.currentPage=s.current_page,this.totalRecords=s.total_items,this.pageCount=s.page_count,this.rowsPerPage=s.items_per_page})}onPageChange(a){this.getLeads(this.paidLeads,a.page)}setPaidStatus(a,e){this.selectedLeadId=a,this.isUpdating=!0;let r={status:e};this.paymentService.setPaidStatus(a,r).subscribe({next:s=>{this.leads&&(this.leads=this.leads.map(l=>l.id===s.id?s:l),this.isUpdating=!1,this.messageService.add({severity:"success",summary:"Success",detail:"Lead status updated successfully"}))},error:s=>{this.isUpdating=!1,this.messageService.add({severity:"error",summary:"Error",detail:s.error?.message||"Something went wrong. Please try again"})}})}static \u0275fac=function(e){return new(e||n)(u(j),u(Q),u(W),u(f),u($),u(Z))};static \u0275cmp=E({type:n,selectors:[["app-leads-by-country"]],standalone:!0,features:[q([f]),N],decls:16,vars:10,consts:[[1,"h-screen","w-screen","overflow-y-auto"],[1,"px-5","md:ml-64","lg:px-10"],[1,"mt-20","md:mt-10"],[3,"model"],[1,"md:flex","md:items-center","md:gap-10"],[1,"mb-2","text-sm","font-medium","text-gray-700"],[1,"flex","items-center"],[1,"h-11","w-40","text-sm","font-medium","border",3,"click","ngClass"],[1,"mt-10"],["responsiveLayout","scroll",3,"value"],[1,"flex","flex-col","items-center","justify-center","gap-y-2","h-[calc(100vh-400px)]"],[3,"value","tableStyle"],["pTemplate","header"],["pTemplate","body"],[1,"flex","justify-center","mt-5"],["dropdownAppendTo","body",3,"onPageChange","rows","totalRecords","first","rowsPerPageOptions"],[1,"text-sm","text-gray-700","font-medium"],[1,"py-2"],[1,"bg-gray-100","py-2","px-3","rounded-md","flex","flex-col","gap-y-1",3,"routerLink","queryParams"],[1,"text-gray-800","font-medium","text-sm"],[1,"text-gray-600","text-xs"],[1,"text-sm","text-gray-700"],[1,"text-xs","font-medium","py-2","px-4","rounded-full",3,"ngClass"],["xmlns","http://www.w3.org/2000/svg","height","30px","viewBox","0 -960 960 960","width","30px",1,"fill-gray-500"],["d","m260-520 220-360 220 360H260ZM700-80q-75 0-127.5-52.5T520-260q0-75 52.5-127.5T700-440q75 0 127.5 52.5T880-260q0 75-52.5 127.5T700-80Zm-580-20v-320h320v320H120Zm580-60q42 0 71-29t29-71q0-42-29-71t-71-29q-42 0-71 29t-29 71q0 42 29 71t71 29Zm-500-20h160v-160H200v160Zm202-420h156l-78-126-78 126Zm78 0ZM360-340Zm340 80Z"],[1,"font-medium","text-gray-800"],[1,"text-sm","text-gray-600"],["height","60px","styleClass","mb-2"],["height","30px","styleClass","mb-2"]],template:function(e,r){e&1&&(t(0,"div",0)(1,"div",1)(2,"div",2),c(3,"p-breadcrumb",3),t(4,"div",4)(5,"p",5),o(6),i(),t(7,"div",6)(8,"button",7),h("click",function(){return r.getLeads(!0)}),o(9,"Paid Leads"),i(),t(10,"button",7),h("click",function(){return r.getLeads(!1)}),o(11,"Unpaid Leads"),i()()()(),t(12,"div",8),y(13,ye,2,1)(14,fe,3,2,"p-table",9),i()()(),c(15,"p-toast")),e&2&&(d(3),m("model",r.breadcrumbItems),d(3),C("",r.subcategoryName," - ",r.countryName,""),d(2),m("ngClass",S(6,ie,!r.paidLeads)),d(2),m("ngClass",S(8,ie,r.paidLeads)),d(3),x(r.leads?13:14))},dependencies:[D,F,te,ee,A,z,G,U,O,V,H,K,J,Y,X],styles:["nav.p-breadcrumb{padding-left:0}"]})};export{ae as LeadsByCountryComponent};

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.