1import{a as b}from"./chunk-U6ICIR6E.js";import{a as J}from"./chunk-BUCWAJRJ.js";import{a as E}from"./chunk-VE5CXONE.js";import{H as q,x as H,y as Y}from"./chunk-JLQQPUG2.js";import{H as $,a as D,d as L,f as h}from"./chunk-JLTXE2K3.js";import{Gc as A,Hb as s,Ib as l,Ja as d,La as v,Ma as P,Ob as B,Ra as f,Sc as V,Ub as N,V as x,ab as m,ba as S,bb as n,ca as _,cb as r,db as k,dd as z,ed as G,fd as U,gd as K,hb as y,ib as F,id as w,nb as O,sb as g,tc as j,ua as R,ub as u,uc as C,vc as M,ya as c}from"./chunk-Y66N7V4O.js";import"./chunk-7CEBWOAQ.js";var W=(()=>{let e=class e{constructor(){this.env=h}};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=v({type:e,selectors:[["ng-component"]],standalone:!1,decls:8,vars:2,consts:[[1,"bnppf-container"],[1,"container"],[1,"row"],[1,"col-12"],[1,"text-center","logo"],["routerLink","/custom/bnppf/events"],["width","200",3,"src"]],template:function(i,p){i&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"a",5),k(6,"img",6),r()()()()(),k(7,"router-outlet"),r()),i&2&&(c(6),m("src",B(p.env.CDN+"custom/bnppf/logo.jpg"),R))},dependencies:[G,K],styles:[`.bnppf-container[_ngcontent-%COMP%]{min-height:100%;background:#fff} .row{margin-bottom:15px!important} .kpi-container{padding:5px;background:green;color:#fff;border-radius:5px} .kpi-container .kpi-number{font-size:24px;font-weight:700} .kpi-container .kpi-text{font-size:14px} .bnppf-nav li{margin-right:10px;cursor:pointer} .bnppf-nav li a{color:#222} .bnppf-nav li a.active{color:#e63d24} 2/*# sourceMappingURL=bnppf.component-YAP73TVD.css.map */`]});let t=e;return t})();function re(t,e){if(t&1&&(n(0,"option",7),s(1),r()),t&2){let a=e.$implicit;m("value",a.url),c(),l(a.title)}}var X=(()=>{let e=class e{constructor(o,i,p,T){this.api=o,this.router=i,this.toast=p,this.userService=T,this.allowedOrganizations=[{organization_id:49,survey_group_id:259},{organization_id:259,survey_group_id:1375}],this.events=[]}ngOnInit(){let o=this.userService.getUser(),i=this.allowedOrganizations.filter(p=>p.organization_id===o.organization_id);if(i.length===0){this.toast.error(`Could not fetch event list for your user ${o.username}. Please login with your BNPPF credentials`);return}this.getEvents(i[0].survey_group_id)}onEventSelected(o){this.router.navigate(["/custom/bnppf/results/"+o])}getEvents(o){this.api.getSurveysBySurveyGroup(o,new D({limit:100})).subscribe(i=>{this.events=i.surveys})}};e.\u0275fac=function(i){return new(i||e)(d(b),d(U),d(L),d($))},e.\u0275cmp=v({type:e,selectors:[["ng-component"]],standalone:!1,decls:9,vars:1,consts:[[1,"container"],[1,"row"],[1,"col-12"],[1,"text-center","lead"],[1,"form-control",3,"change"],["selected","","disabled","","value",""],[3,"value",4,"ngFor","ngForOf"],[3,"value"]],template:function(i,p){i&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"p",3),s(4,"Select Event"),r(),n(5,"select",4),g("change",function(ie){return p.onEventSelected(ie.target.value)}),n(6,"option",5),s(7,"Select"),r(),f(8,re,2,2,"option",6),r()()()()),i&2&&(c(8),m("ngForOf",p.events))},dependencies:[C,H,Y],encapsulation:2});let t=e;return t})();var Z=t=>({active:t});function oe(t,e){if(t&1&&(y(0),n(1,"div",2)(2,"div",10)(3,"div",11)(4,"div",12),s(5),r(),n(6,"p",13),s(7,"Clients Inscrits / Ingeschreven"),r()()(),n(8,"div",10)(9,"div",11)(10,"div",12),s(11),r(),n(12,"p",13),s(13,"Personnes Inscrites / Personen Ingeschreven"),r()()(),n(14,"div",14)(15,"div",11)(16,"div",12),s(17),r(),n(18,"p",13),s(19,"Pr\xE9sence / Present"),r()()()(),n(20,"div",2)(21,"div",10)(22,"div",11)(23,"div",12),s(24),r(),n(25,"p",13),s(26,"Clients Ingecheckt / Enr\xE9gistr\xE9s"),r()()(),n(27,"div",10)(28,"div",11)(29,"div",12),s(30),r(),n(31,"p",13),s(32,"Personen Ingecheckt / Personnes enr\xE9gistr\xE9s"),r()()(),n(33,"div",14)(34,"div",11)(35,"div",12),s(36),r(),n(37,"p",13),s(38,"Present / Pr\xE9sence"),r()()()(),F()),t&2){let a=u(2);c(5),l(a.kpi.clients.expected),c(6),l(a.kpi.invitees.expected),c(6),l(a.getPercentageOfClientsPresent()),c(7),l(a.kpi.clients.present),c(6),l(a.kpi.invitees.present),c(6),l(a.getPercentageOfInviteesPresent())}}function se(t,e){if(t&1&&(n(0,"tr")(1,"td"),s(2),r(),n(3,"td"),s(4),r(),n(5,"td"),s(6),r(),n(7,"td"),s(8),r()()),t&2){let a=e.$implicit;c(2),l(a[0]),c(2),l(a[1]),c(2),l(a[2]),c(2),l(a[3])}}function ae(t,e){if(t&1&&(y(0),n(1,"div",2)(2,"div",15)(3,"div",16)(4,"table",17)(5,"thead")(6,"th"),s(7,"Naam / Nom Client"),r(),n(8,"th"),s(9,"Familienaam / Nom de famille Client"),r(),n(10,"th"),s(11,"Personnes inscrites / Personen ingeschreven"),r(),n(12,"th"),s(13,"Client ID"),r()(),n(14,"tbody"),f(15,se,9,4,"tr",18),r()()()()(),F()),t&2){let a=u(2);c(15),m("ngForOf",a.kpi.attendees)}}function ce(t,e){if(t&1){let a=O();n(0,"div",1)(1,"div",2)(2,"div",3)(3,"ul",4)(4,"li",5),g("click",function(){S(a);let i=u();return _(i.currentTab="kpi")}),n(5,"a",6),s(6," Samenvatting / R\xE9sum\xE9 "),r()(),n(7,"li",5),g("click",function(){S(a);let i=u();return _(i.currentTab="list")}),n(8,"a",7),s(9," Liste de Clients / Klantenlijst "),r()(),n(10,"li",5),g("click",function(){S(a);let i=u();return _(i.downloadCSV())}),n(11,"a",8),s(12," Download "),r()()()()(),f(13,oe,39,6,"ng-container",9)(14,ae,16,1,"ng-container",9),r()}if(t&2){let a=u();c(5),m("ngClass",N(4,Z,a.currentTab=="kpi")),c(3),m("ngClass",N(6,Z,a.currentTab=="list")),c(5),m("ngIf",a.currentTab==="kpi"),
2c(),m("ngIf",a.currentTab==="list")}}var ee=(()=>{let e=class e{constructor(o,i,p){this.http=o,this.route=i,this.screen=p,this.kpi={clients:{expected:0,present:0},invitees:{expected:0,present:0},attendees:[]},this.currentTab="kpi",this.isLoading=!0}ngOnInit(){this.route.params.subscribe(o=>{this.event=o.url,this.getKPI()})}getPercentageOfClientsPresent(){return(this.kpi.clients.present/this.kpi.clients.expected*100).toFixed(0)+"%"}getPercentageOfInviteesPresent(){return(this.kpi.invitees.present/this.kpi.invitees.expected*100).toFixed(0)+"%"}downloadCSV(){let o=this.screen.openTab();this.fetchCSV().subscribe({next:i=>{this.screen.changeTabLocation(o,i.url)},error:()=>{alert("An error occurred. Please contact support if the problem persists.")}})}getKPI(){this.fetchKpi().subscribe({next:o=>{this.kpi=o,this.isLoading=!1},error:o=>{alert(o.error.error?o.error.error:"An error occurred. Please contact support if the problem persists.")}})}fetchKpi(){return this.http.get(h.apiBaseURL+"custom/bnppf/"+this.event+"/kpi")}fetchCSV(){return this.http.get(h.apiBaseURL+"surveys/"+this.event+"/reports/bnppf")}};e.\u0275fac=function(i){return new(i||e)(d(V),d(z),d(J))},e.\u0275cmp=v({type:e,selectors:[["ng-component"]],standalone:!1,decls:1,vars:1,consts:[["class","container",4,"ngIf"],[1,"container"],[1,"row"],[1,"col-12","text-center"],[1,"list-inline","bnppf-nav"],[1,"list-inline-item",3,"click"],["title","Samenvatting / R\xE9sum\xE9",3,"ngClass"],["title","Liste de Clients / Klantenlijst",3,"ngClass"],["title","Download",2,"color","#222"],[4,"ngIf"],[1,"col-5"],[1,"well","text-center","kpi-container"],[1,"kpi-number"],[1,"kpi-text"],[1,"col-2"],[1,"col-12"],[1,"table-responsive"],[1,"table","table-striped"],[4,"ngFor","ngForOf"]],template:function(i,p){i&1&&f(0,ce,15,8,"div",0),i&2&&m("ngIf",!p.isLoading)},dependencies:[j,C,M],encapsulation:2});let t=e;return t})();var le=[{path:"",component:W,canActivate:[E],children:[{path:"",pathMatch:"full",redirectTo:"events"},{path:"events",component:X},{path:"results/:url",component:ee}]}],te=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=P({type:e}),e.\u0275inj=x({imports:[w.forChild(le),w]});let t=e;return t})();var Ye=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=P({type:e}),e.\u0275inj=x({providers:[E,b],imports:[A,q,te]});let t=e;return t})();export{Ye as BnppfModule}; 3//# sourceMappingURL=chunk-46NXGYVX.js.map
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.