1import{a as xe,c as si,e as ci,f as mi,g as fe,h as di,i as pi,j as Ci}from"./chunk-IJCOGGVP.js";import"./chunk-PHZJLURG.js";import{b as Je,c as _i}from"./chunk-ZLBN6FZV.js";import{a as li}from"./chunk-5QYJ3SBW.js";import"./chunk-OVWSJLKC.js";import"./chunk-QLS2HGKB.js";import"./chunk-BTQPKA7U.js";import"./chunk-D5WNKLON.js";import"./chunk-FLFERWGO.js";import"./chunk-QUG4HHXZ.js";import{c as oi,d as ri}from"./chunk-I2Y7UB4V.js";import{a as ni,b as ai}from"./chunk-PSOULVZL.js";import"./chunk-XAXLMUF6.js";import{a as Jt,b as ti}from"./chunk-D2XWWPO3.js";import{a as ei,e as ii}from"./chunk-RXHK7XE4.js";import{a as Xt,b as Ie,c as Ye,d as Ee,f as ot,g as Ae,h as at,i as rt,j as ce,k as P}from"./chunk-O3BD2LYL.js";import"./chunk-6ORYOOUQ.js";import"./chunk-ZB44PIZA.js";import{c as Kt,f as Zt}from"./chunk-YBFQQSLW.js";import"./chunk-MB6YAV2B.js";import"./chunk-BT6MT7GL.js";import{c as ui}from"./chunk-OBZUIDEP.js";import{a as je}from"./chunk-4CVZBQNN.js";import"./chunk-IAGBH4HM.js";import"./chunk-MJKUV2I5.js";import"./chunk-4T73AMAL.js";import"./chunk-G2OHGTWE.js";import"./chunk-NAW6KKAQ.js";import"./chunk-GNX3F6NH.js";import"./chunk-VFXJ4ZBD.js";import{Nb as zt,hc as Gt}from"./chunk-PXZNPNHI.js";import{d as nt,f as Qt}from"./chunk-KWNDGQWR.js";import"./chunk-2ZFY6MCW.js";import"./chunk-KQ7PEKEE.js";import"./chunk-KVMIYEBS.js";import"./chunk-DLHY2JKF.js";import"./chunk-WLMRFXCZ.js";import"./chunk-WN3UI2QV.js";import"./chunk-YVLOHBDK.js";import"./chunk-Z3AXU4EF.js";import"./chunk-TP3A6IN2.js";import"./chunk-XNFXA3ZT.js";import"./chunk-QLTRNXEK.js";import"./chunk-TEFEWVO6.js";import{a as Wt}from"./chunk-ZB64W4XA.js";import{a as Ht}from"./chunk-SVABVB5X.js";import"./chunk-CMY6WAF3.js";import"./chunk-FUY7HSJY.js";import"./chunk-JTYXZXFU.js";import"./chunk-7MK6I7GJ.js";import"./chunk-3HFTO6XY.js";import"./chunk-XNSH6ILV.js";import"./chunk-IZKA562T.js";import"./chunk-BROSYERN.js";import"./chunk-Y2KCFOCP.js";import"./chunk-Z52L74DH.js";import{a as Yt}from"./chunk-CYDDDATF.js";import{a as qt,b as $t,c as jt}from"./chunk-GWQPV7EH.js";import"./chunk-RQ74XYI3.js";import"./chunk-3IFGWXMA.js";import{l as Pt}from"./chunk-EME7BUOO.js";import{a as He}from"./chunk-JKMNVQUA.js";import"./chunk-QH3IRCHN.js";import"./chunk-PLEH3NAH.js";import"./chunk-GXCJ5QS4.js";import{b as A}from"./chunk-4D5SN44G.js";import"./chunk-22ACI5KU.js";import"./chunk-FXUQQQIE.js";import"./chunk-VVVN3YIZ.js";import"./chunk-FSUBAQYH.js";import"./chunk-7CVCGK4Q.js";import"./chunk-FWW3IJT2.js";import"./chunk-B6LCWWQX.js";import"./chunk-HYGNXZJR.js";import"./chunk-B6XXRKU5.js";import"./chunk-6Q5DDO7R.js";import"./chunk-RW2MVE4O.js";import"./chunk-3ZVRFUA4.js";import"./chunk-H4PCL6BZ.js";import"./chunk-NXTJBJRP.js";import"./chunk-U22BTVEZ.js";import{$b as ee,Ec as pe,Gb as $e,Gc as Ce,Hc as _e,Hd as j,Ia as Tt,Kb as Vt,Mb as Ft,Sc as ze,Ue as Lt,Wc as Qe,b as ht,cc as Rt,d as ge,id as he,jb as It,jd as kt,k as ye,kd as se,kh as Bt,lc as We,le as Mt,mb as qe,qe as Ut,rf as Ot,ve as H,xb as At,ye as Nt,ze as Ge}from"./chunk-X5J6QTCG.js";import{$ as ke,$a as u,Ad as it,Db as Se,E as ve,Fa as c,Gb as ut,Ge as Te,Hg as Dt,Ib as e,Jb as g,Ka as b,Kb as T,Lb as me,Lc as Le,Ma as y,Na as Ue,Ni as le,Pf as Oe,Qb as M,Rb as U,Sa as E,Sb as N,Sc as Ct,Th as we,U as D,Wc as ue,Xa as oe,_c as _t,bb as p,be as re,bg as K,cc as De,d as L,db as O,dc as J,di as Be,eb as B,ec as tt,fa as C,fb as q,fc as pt,ga as _,gb as d,hb as r,ib as a,jb as h,k as et,lc as I,lf as St,mc as Z,me as bt,mf as gt,nb as R,nc as $,nf as yt,ob as k,pj as F,qb as v,qc as Ne,re as vt,sb as f,tb as m,u as z,ua as Me,vd as V,wd as xt,wh as de,xb as Q,xd as X,xf as wt,yb as G,yd as ae,yf as Et,zb as Y,zd as ft}from"./chunk-SMW7PHYX.js";import{a as Xe}from"./chunk-BMIYOSOG.js";var hi=(()=>{let s=class s{run(){this.searchComponent.run()}};s.\u0275fac=function(o){return new(o||s)},s.\u0275cmp=y({type:s,selectors:[["ng-component"]],viewQuery:function(o,l){if(o&1&&Q(xe,5),o&2){let x;G(x=Y())&&(l.searchComponent=x.first)}},standalone:!1,decls:4,vars:0,consts:[["role","main",3,"keydown.enter"]],template:function(o,l){o&1&&(r(0,"main",0),f("keydown.enter",function(){return l.run()}),e(1,` 2 `),h(2,"app-user-search"),e(3,`
3`),a())},dependencies:[xe],encapsulation:2});let i=s;return i})();function Mi(i,s){if(i&1&&(e(0,` 4 `),r(1,"div",2),e(2,` 5 `),r(3,"div",3),e(4,` 6 `),r(5,"h1",4),h(6,"i",5),e(7),a(),e(8,` 7 `),a(),e(9,` 8 `),r(10,"div",6),e(11,` 9 `),r(12,"span",7),e(13,"ID#"),a(),e(14),a(),e(15,` 10 `),a(),e(16,` 11`)),i&2){let t=m();c(7),me("",t.clubUser==null?null:t.clubUser.user.firstName,` 12 `,t.clubUser==null?null:t.clubUser.user.lastName),c(7),T(" ",t.clubUser==null?null:t.clubUser.clubUserID,` 13 `)}}function Ui(i,s){i&1&&(e(0,` 14 `),r(1,"li",10),e(2,` 15 `),r(3,"a",11),e(4,"Profile"),a(),e(5,` 16 `),a(),e(6,` 17 `))}function Ni(i,s){i&1&&(e(0,` 18 `),r(1,"li",10),e(2,` 19 `),r(3,"a",12),e(4,`Account 20 History`),a(),e(5,` 21 `),a(),e(6,` 22 `))}function Li(i,s){i&1&&(e(0,` 23 `),r(1,"li",10),e(2,` 24 `),r(3,"a",13),e(4,"Programs"),a(),e(5,` 25 `),a(),e(6,` 26 `))}function Oi(i,s){i&1&&(e(0,` 27 `),r(1,"li",10),e(2,` 28 `),r(3,"a",14),e(4,"Payments"),a(),e(5,` 29 `),a(),e(6,` 30 `))}function Bi(i,s){i&1&&(e(0,` 31 `),r(1,"li",10),e(2,` 32 `),r(3,"a",15),e(4,"Roles & Permissions"),a(),e(5,` 33 `),a(),e(6,` 34 `))}function qi(i,s){i&1&&(e(0,` 35 `),r(1,"li",10),e(2,` 36 `),r(3,"a",16),e(4,"Volunteering"),a(),e(5,` 37 `),a(),e(6,` 38 `))}function $i(i,s){if(i&1&&(e(0,` 39 `),r(1,"div",8),e(2,` 40 `),r(3,"ul",9),e(4,` 41 `),u(5,Ui,7,0),u(6,Ni,7,0),u(7,Li,7,0),u(8,Oi,7,0),u(9,Bi,7,0),u(10,qi,7,0),a(),e(11,` 42`),a(),e(12,` 43`)),i&2){let t=m();c(5),p(t.profile[t.Permission.UserProfile]?5:-1),c(),p(t.profile[t.Permission.AccountHistory]?6:-1),c(),p(t.profile[t.Permission.UserPrograms]?7:-1),c(),p(t.profile[t.Permission.UserPayments]?8:-1),c(),p(t.profile&&(t.profile[t.Permission.PermissionsAdmin]&&+t.profile.userID!=+t.userID||+t.profile.clubID==0)?9:-1),c(),p(t.profile[t.Permission.UserProfile]&&(t.enableVolunteerTasks||t.enableVolunteerManagement)?10:-1)}}var xi=(()=>{let s=class s{constructor(n,o,l,x){this.userService=n,this.authorizeService=o,this.route=l,this.siteDataService=x,this.Permission=we,this.enableVolunteerTasks=!1,this.enableVolunteerManagement=!1,this.unsubscribe$=new L}ngOnInit(){this.route.params.pipe(D(this.unsubscribe$)).subscribe(n=>{n.id&&(this.userID=n.id,this.userID==="new"||isNaN(+this.userID)?this.clubUser=void 0:z({user:this.userService.getUser(+this.userID),clubOptions:this.siteDataService.getClubOptions([le.ENABLE_VOLUNTEER_MANAGEMENT,le.ENABLE_VOLUNTEER_TASKS])}).subscribe(o=>{this.clubUser=o.user,this.enableVolunteerTasks=o.clubOptions?.find(l=>l.optionID===le.ENABLE_VOLUNTEER_TASKS)?.boolValue??!1,this.enableVolunteerManagement=o.clubOptions?.find(l=>l.optionID===le.ENABLE_VOLUNTEER_MANAGEMENT)?.boolValue??!1}))}),this.userService.currentUserIsAdmin$.pipe(D(this.unsubscribe$)).subscribe(n=>{this.clubUser&&(this.clubUser.isAdmin=n)}),this.authorizeService.getUser().pipe(D(this.unsubscribe$)).subscribe(n=>{n&&(this.profile=n)})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};s.\u0275fac=function(o){return new(o||s)(b(P),b(Be),b(V),b(F))},s.\u0275cmp=y({type:s,selectors:[["ng-component"]],standalone:!1,decls:8,vars:4,consts:[["role","main"],["parentLinkUrl","../","parentLinkText","Manage Users",3,"pageTitle","showBackButton"],[1,"row"],[1,"col-md-8"],[1,"my-2","text-header-2"],[1,"fa-duotone","fa-circle-user","mr-2"],[1,"col-md-4","align-right"],[1,"small-label"],[1,"tabs"],["role","tablist",1,"tab-nav","no-bullets","inline-list"],["routerLinkActive","active",1,"nav-item"],["routerLink","profile","role","tab","aria-controls","home","aria-selected","true",1,"nav-link"],["routerLink","account-history","role","tab","aria-controls","home",1,"nav-link"],["routerLink","programs","role","tab","aria-controls","home",1,"nav-link"],["routerLink","payments","role","tab","aria-controls","home",1,"nav-link"],["routerLink","roles","role","tab","aria-controls","home",1,"nav-link"],["routerLink","volunteering","role","tab","aria-controls","home",1,"nav-link"]],template:function(o,l){o&1&&(r(0,"main",0),e(1,` 44 `),h(2,"app-admin-header",1),e(3,` 45 46 `),u(4,Mi,17,3),u(5,$i,13,6),h(6,"router-outlet"),e(7,` 47`),a()),o&2&&(c(2),d("pageTitle",l.userID==="new"?"New User":"User Detail")("showBackButton",!0),c(2),p(l.userID!=="new"?4:-1),c(),p(l.userID!=="new"?5:-1))},dependencies:[xt,ae,ft,H],encapsulation:2});let i=s;return i})();var ji=i=>({negative:i}),Hi=(i,s)=>({green:i,red:s}),Wi=(i,s)=>[i,s];function zi(i,s){if(i&1&&(e(0,` 48 `),r(1,"th",7),e(2),h(3,"p-sortIcon",8),e(4,` 49 `),a(),e(5,` 50 `)),i&2){let t=s.$implicit,n=m(2);c(),d("pSortableColumn",t.field),oe("aria-label",n.AriaLabels.ACTIVATE_SORT),c(),T(` 51 `,t.header,` 52 `),c(),d("field",t.field)}}function Qi(i,s){if(i&1&&(e(0,` 53 `),r(1,"tr"),e(2,` 54 `),r(3,"th"),e(4,"Description"),a(),e(5,` 55 `),B(6,zi,6,4,null,null,O),a(),e(8,` 56 `)),i&2){let t=m();c(6),q(t.userService.accountHistoryColumns)}}function Gi(i,s){if(i&1&&(e(0,` 57 `),r(1,"td"),e(2),a(),e(3,` 58 `)),i&2){let t=m().$implicit;c(2),g(t.description)}}function Yi(i,s){if(i&1&&(e(0,` 59 `),r(1,"td"),e(2,` 60 `),r(3,"a",10),e(4),a(),e(5,` 61 `),a(),e(6,` 62 `)),i&2){let t=m().$implicit,n=m();
62c(3),d("routerLink",tt(2,Wi,t.entityTypeID===n.EntityType.PLAYER?"/admin/players/"+t.playerID+"/programs/programs/registrations":"../programs/team-registrations",t.entityRegistrationID)),c(),T(` 63 `,t.description,` 64 `)}}function Ji(i,s){if(i&1&&(e(0,` 65 `),r(1,"tr"),e(2,` 66 `),u(3,Gi,4,1)(4,Yi,7,5),r(5,"td"),e(6),I(7,"date"),a(),e(8,` 67 `),r(9,"td"),e(10),I(11,"currency"),a(),e(12,` 68 `),r(13,"td"),e(14),I(15,"utcDate"),a(),e(16,` 69 `),r(17,"td"),e(18),I(19,"currency"),a(),e(20,` 70 `),r(21,"td"),e(22),I(23,"currency"),a(),e(24,` 71 `),r(25,"td"),e(26),I(27,"currency"),a(),e(28,` 72 `),r(29,"td"),e(30),I(31,"currency"),a(),e(32,` 73 `),r(33,"td",9),e(34),a(),e(35,` 74 `),a(),e(36,` 75 `)),i&2){let t=s.$implicit;c(3),p(t.playerRegistrationID===null?3:4),c(3),g($(7,10,t.dueDate,"M/d/y")),c(4),g(Z(11,13,t.amountDue)),c(4),g($(15,15,t.submittedDate,"M/d/y")),c(4),g(Z(19,18,t.paymentAmount)),c(4),g(Z(23,20,t.creditAmountUsed)),c(4),g(Z(27,22,t.financialAidUsed)),c(4),g(t.overdue>0?Z(31,24,t.overdue):""),c(3),d("ngClass",tt(26,Hi,t.status==="Paid",t.status!=="Paid")),c(),T(` 76 `,t.status)}}function Ki(i,s){if(i&1&&(e(0,` 77 `),r(1,"th",7),e(2),h(3,"p-sortIcon",8),e(4,` 78 `),a(),e(5,` 79 `)),i&2){let t=s.$implicit,n=m(3);c(),d("pSortableColumn",t.field),oe("aria-label",n.AriaLabels.ACTIVATE_SORT),c(),T(` 80 `,t.header,` 81 `),c(),d("field",t.field)}}function Zi(i,s){if(i&1&&(e(0,` 82 `),r(1,"tr"),e(2,` 83 `),r(3,"th"),e(4,"Description"),a(),e(5,` 84 `),B(6,Ki,6,4,null,null,O),a(),e(8,` 85 `)),i&2){let t=m(2);c(6),q(t.userService.donationsColumns)}}function Xi(i,s){if(i&1&&(e(0,` 86 `),r(1,"tr"),e(2,` 87 `),r(3,"td"),e(4),a(),e(5,` 88 `),r(6,"td"),e(7),I(8,"utcDate"),a(),e(9,` 89 `),r(10,"td"),e(11),I(12,"currency"),a(),e(13,` 90 `),a(),e(14,` 91 `)),i&2){let t=s.$implicit;c(4),g(t.title),c(3),g($(8,3,t.submittedDate,"M/d/y")),c(4),g(Z(12,6,t.paymentAmount))}}function en(i,s){if(i&1&&(e(0,` 92 `),r(1,"section",3),e(2,` 93 `),r(3,"h3"),e(4,"Donations"),a(),e(5,` 94 `),r(6,"p-table",11),e(7,` 95 `),E(8,Zi,9,0,"ng-template",5),e(9,` 96 `),E(10,Xi,15,8,"ng-template",6),e(11,` 97 `),a(),e(12,` 98 `),a(),e(13,` 99`)),i&2){let t=m();c(6),d("columns",t.userService.donationsColumns)("value",t.donations)("sortOrder",-1)}}var fi=(()=>{let s=class s{constructor(n,o,l){this.userService=n,this.siteDataService=o,this.route=l,this.AriaLabels=K,this.EntityType=Ot,this.totalRecords=0,this.loading=!0}ngOnInit(){this.userID=+this.route.snapshot.parent.params.id,z(this.userService.getAccountBalance(this.userID),this.userService.getUserDonations(this.userID)).subscribe(n=>{this.balance=n[0]?n[0]:0,this.donations=n[1],this.siteDataService.hideSiteLoader()},()=>{this.siteDataService.showSiteErrorAlert("There was a problem getting data.")}),(!this.userService.historyFilters||!this.userService.historyFilters.page)&&(this.userService.historyFilters=new Xt)}search(n){let o=this.userService.historyFilters;n&&n.sortField&&(o.orderBy=n.sortField+" "+(n.sortOrder===1?"ASC":"DESC"),o.page=n.first/o.rows+1),o.getTotalCount=this.totalRecords===0,this.loading=!0,this.userService.getAccountHistoryData(this.userID).subscribe(l=>{this.searchResults=l.results,o.getTotalCount&&(this.totalRecords=l.count),this.loading=!1,this.siteDataService.hideSiteLoader()},()=>{this.siteDataService.showSiteErrorAlert("There was a problem getting data.")})}};s.\u0275fac=function(o){return new(o||s)(b(P),b(F),b(V))},s.\u0275cmp=y({type:s,selectors:[["ng-component"]],standalone:!1,decls:27,vars:16,consts:[[1,"card","horizontal-form"],[1,"account-balance"],[1,"big-number",3,"ngClass"],[1,"card","report-table"],["sortField","submittedDate",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","rows","sortOrder","loading"],["pTemplate","header"],["pTemplate","body"],[3,"pSortableColumn"],[3,"field"],[3,"ngClass"],[3,"routerLink"],["sortField","
99submittedDate",1,"table","table-striped","table-sm",3,"columns","value","sortOrder"]],template:function(o,l){o&1&&(r(0,"section",0),e(1,` 100 `),r(2,"h3"),e(3,"Account Overview"),a(),e(4,` 101 `),r(5,"div",1),e(6,` 102 Balance: `),r(7,"span",2),e(8),I(9,"currency"),a(),e(10,` 103 `),a(),e(11,` 104`),a(),e(12,` 105`),r(13,"section",3),e(14,` 106 `),r(15,"h3"),e(16,"Payment History"),a(),e(17,` 107 `),r(18,"p-table",4),f("onLazyLoad",function(w){return l.search(w)}),e(19,` 108 `),E(20,Qi,9,0,"ng-template",5),e(21,` 109 `),E(22,Ji,37,29,"ng-template",6),e(23,` 110 `),a(),e(24,` 111`),a(),e(25,` 112 113`),u(26,en,14,3)),o&2&&(c(7),d("ngClass",J(14,ji,l.balance<0)),c(),g(Z(9,12,l.balance)),c(10),d("columns",l.userService.accountHistoryColumns)("value",l.searchResults)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",l.totalRecords)("rows",100)("sortOrder",-1)("loading",l.loading),c(8),p(l.donations&&l.donations.length>0?26:-1))},dependencies:[Le,ae,re,pe,Ce,_e,_t,ue,he],encapsulation:2});let i=s;return i})();var tn=i=>[i];function nn(i,s){if(i&1&&(e(0,` 114 `),r(1,"tr"),e(2,` 115 `),r(3,"th",5),e(4,` 116 Saved Date `),h(5,"p-sortIcon",6),e(6,` 117 `),a(),e(7,` 118 `),r(8,"th",5),e(9,` 119 Saved By `),h(10,"p-sortIcon",6),e(11,` 120 `),a(),e(12,` 121 `),r(13,"th",7),e(14,"Notes"),a(),e(15,` 122 `),a(),e(16,` 123 `)),i&2){let t=m();c(3),d("pSortableColumn","savedOn"),oe("aria-label",t.AriaLabels.ACTIVATE_SORT),c(2),d("field","savedOn"),c(3),d("pSortableColumn","savedByName"),oe("aria-label",t.AriaLabels.ACTIVATE_SORT),c(2),d("field","savedByName")}}function on(i,s){if(i&1&&(e(0,` 124 `),r(1,"tr"),e(2,` 125 `),r(3,"td")(4,"a",8),e(5),I(6,"date"),a(),e(7,` 126 `),a(),e(8,` 127 `),r(9,"td"),e(10),a(),e(11,` 128 `),r(12,"td",7),e(13),a(),e(14,` 129 `),a(),e(15,` 130 `)),i&2){let t=s.$implicit;c(4),d("routerLink",J(7,tn,t.clubUserNoteID)),c(),T(` 131 `,$(6,4,t.savedOn,"MM/dd/y"),` 132 `),c(5),g(t.savedByFirstName+" "+t.savedByLastName),c(3),g(t.notes)}}var bi=(()=>{let s=class s{constructor(n,o,l){this.userService=n,this.siteDataService=o,this.route=l,this.AriaLabels=K,this.totalRecords=0,this.loading=!0,this.columns=[{field:"savedOn",header:"Saved Date"},{field:"savedByName",header:"Saved By"},{field:"notes",header:"Notes"}]}ngOnInit(){this.userID=+de(this.route,"id"),(!this.userService.notesFilters||!this.userService.notesFilters.page)&&(this.userService.notesFilters=new Ye)}search(n){let o=this.userService.notesFilters;n&&n.sortField&&(o.orderBy=n.sortField+" "+(n.sortOrder===1?"ASC":"DESC"),o.page=n.first/o.rows+1),o.getTotalCount=this.totalRecords===0,this.loading=!0,this.userService.getNotesData(this.userID).subscribe(l=>{this.notes=l.results,o.getTotalCount&&(this.totalRecords=l.count),this.loading=!1,this.siteDataService.hideSiteLoader()},()=>{this.siteDataService.showSiteErrorAlert("There was a problem getting data.")})}};s.\u0275fac=function(o){return new(o||s)(b(P),b(F),b(V))},s.\u0275cmp=y({type:s,selectors:[["ng-component"]],standalone:!1,decls:14,vars:9,consts:[[1,""],["sortField","savedOn",1,"table","table-striped","table-sm",3,"onLazyLoad","value","sortOrder","columns","lazy","paginator","alwaysShowPaginator","totalRecords","rows","loading"],["pTemplate","header"],["pTemplate","body"],["routerLink","new",1,"btn","btn-add"],[3,"pSortableColumn"],[3,"field"],[1,"align-left"],[3,"routerLink"]],template:function(o,l){o&1&&(r(0,"section",0),e(1,` 133 `),r(2,"p-table",1),f("onLazyLoad",function(w){return l.search(w)}),e(3,` 134 `),E(4,nn,17,6,"ng-template",2),e(5,` 135 `),E(6,on,16,9,"ng-template",3),e(7,` 136 `),a(),e(8,` 137 `),h(9,"br"),e(10,` 138 `),r(11,"button",4),e(12,"Create a new Note"),a(),e(13,` 139`),a()),o&2&&(c(2),d("value",l.notes)("sortOrder",-1)("columns",l.columns)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",l.totalRecords)("rows",100)("loading",l.loading))},dependencies:[ae,re,pe,Ce,_e,ue],encapsulation:2});let i=s;return i})();function an(i,s){if(i&1){let t=v();e(0,` 140 `),r(1,"app-dynamic-form",1),f("onCancel",function(){C(t);let o=m();return _(o.cancel())})("onSubmit",function(o){C(t);let l=m();return _(l.save(o,!1))})("onSaveAndAdd",function(o){C(t);let l=m();return _(l.save(o,!0))}),e(2,` 141 `),h(3,"app-dynamic-form-field",2),e(4,` 142 `),a(),e(5,` 143 `)}if(i&2){let t=m();
143c(),d("fields",t.fields)("entity",t.clubUserNote)("horizontalForm",!0)("contentFieldsMode",!0)("showSaveAndAddButton",!0)("buttonsPosition","left")}}var vi=(()=>{let s=class s{constructor(n,o,l,x,w){this.route=n,this.router=o,this.siteDataService=l,this.userService=x,this.formService=w,this.unsubscribe$=new L}ngOnInit(){this.userID=+de(this.route,"id"),this.route.params.subscribe(n=>{n.noteID&&(n.noteID==="new"?this.userService.getUserNoteMetadata().pipe(D(this.unsubscribe$)).subscribe(o=>{this.clubUserNote=new Ee,this.fields=o.fields,this.siteDataService.hideSiteLoader()}):(this.noteID=+n.noteID,z([this.userService.getUserNoteMetadata(),this.userService.getUserNote(this.userID,this.noteID)]).pipe(D(this.unsubscribe$)).subscribe(o=>{this.fields=o[0].fields,this.clubUserNote=o[1],this.siteDataService.hideSiteLoader()})))})}save(n,o){this.userService.saveUserNote(this.userID,this.noteID,n).pipe(D(this.unsubscribe$)).subscribe(()=>{this.siteDataService.showSiteSuccessAlert("Note saved successfully"),this.formService.hideFormLoader(),o?(this.noteID=void 0,this.clubUserNote=new Ee,this.router.navigate(["../new"],{relativeTo:this.route})):this.router.navigate([".."],{relativeTo:this.route})},l=>{this.formService.hideFormLoader(),this.siteDataService.showSiteErrorAlert("There was a problem saving this note")})}cancel(){this.router.navigate([".."],{relativeTo:this.route})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};s.\u0275fac=function(o){return new(o||s)(b(V),b(X),b(F),b(P),b(ee))},s.\u0275cmp=y({type:s,selectors:[["ng-component"]],viewQuery:function(o,l){if(o&1&&Q(j,5),o&2){let x;G(x=Y())&&(l.form=x.first)}},standalone:!1,decls:3,vars:1,consts:[[1,"horizontal-form"],[3,"onCancel","onSubmit","onSaveAndAdd","fields","entity","horizontalForm","contentFieldsMode","showSaveAndAddButton","buttonsPosition"],["fieldName","notes"]],template:function(o,l){o&1&&(r(0,"section",0),e(1,` 144 `),u(2,an,6,6),a()),o&2&&(c(2),p(l.fields?2:-1))},dependencies:[j,se],encapsulation:2});let i=s;return i})();var Pe=class{constructor(){this.receiveClubEmailCommunications=!0,this.receiveClubSMSCommunications=!0}};function rn(i,s){if(i&1){let t=v();e(0,` 145 `),r(1,"app-dynamic-form",1),f("onCancel",function(){C(t);let o=m();return _(o.cancel())})("onSubmit",function(o){C(t);let l=m();return _(l.save(o,!1))})("onSaveAndAdd",function(o){C(t);let l=m();return _(l.save(o,!0))}),e(2,` 146 `),h(3,"app-dynamic-form-field",2),e(4,` 147 `),h(5,"app-dynamic-form-field",3),e(6,` 148 `),h(7,"app-dynamic-form-field",4),e(8,` 149 `),h(9,"app-dynamic-form-field",5),e(10,` 150 `),h(11,"app-dynamic-form-field",6),e(12,` 151 `),h(13,"app-dynamic-form-field",7),e(14,` 152 `),h(15,"app-dynamic-form-field",8),e(16,` 153 `),e(17,` 154 `),e(18,` 155 `),a(),e(19,` 156 `)}if(i&2){let t=m();c(),d("fields",t.fields)("entity",t.parent)("horizontalForm",!0)("showDeleteButton",!!t.parentID)("contentFieldsMode",!0)("showSaveAndAddButton",!0)("buttonsPosition","left")}}var Si=(()=>{let s=class s{constructor(n,o,l,x,w){this.route=n,this.router=o,this.siteDataService=l,this.userService=x,this.formService=w}ngOnInit(){this.userID=+this.route.snapshot.parent.params.id,this.route.params.subscribe(n=>{n.parentID&&(n.parentID==="new"?this.userService.getParentMetadata().subscribe(o=>{this.parent=new Pe,this.fields=o.fields,this.siteDataService.hideSiteLoader()}):(this.parentID=+n.parentID,z([this.userService.getParentMetadata(),this.userService.getParent(this.userID,this.parentID)]).subscribe(o=>{this.fields=o[0].fields,this.parent=o[1],this.siteDataService.hideSiteLoader()})))})}save(n,o){this.userService.saveParent(this.userID,this.parentID,n).subscribe({next:()=>{this.siteDataService.showSiteSuccessAlert("Parent/Legal Guardian saved successfully"),this.formService.hideFormLoader(),o?(this.parentID=void 0,this.parent=new Pe,this.router.navigate(["../new"],{relativeTo:this.route})):this.router.navigate(["../../profile"],{relativeTo:this.route})},error:l=>{this.formService.hideFormLoader(),this.siteDataService.showSiteErrorAlert(`There was a problem saving this Parent/Legal Guardian. ${l.error}`)}})}cancel(){this.router.navigate(["../../profile"],{relativeTo:this.route})}};s.\u0275fac=function(o){return new(o||s)(b(V),b(X),b(F),b(P),b(ee))},s.\u0275cmp=y({type:s,selectors:[["ng-component"]],standalone:!1,decls:6,vars:1,consts:[[1,"card","horizontal-form"],[3,"onCancel","onSubmit","onSaveAndAdd","fields","entity","horizontalForm","showDeleteButton","contentFieldsMode","showSaveAndAddButton","buttonsPosition"],["fieldName","firstName"],["fieldName","lastName"],["fieldName","email"],["fieldName","secondaryEmail"],["fieldName","cellPhone"],["fieldName","homePhone"],["fieldName","workPhone"]],template:function(o,l){o&1&&(r(0,"section",0),e(1,` 157 `),r(2,"h3"),e(3,"Parent/Legal Guardian"),a(),e(4,` 158 `),u(5,rn,20,7),a()),o&2&&(c(5),p(l.fields?5:-1))},dependencies:[j,se],encapsulation:2});let i=s;return i})();function ln(i,s){if(i&1){let t=v();e(0,` 159 `),r(1,"app-user-file-cabinet",0),f("download",function(o){C(t);let l=m();return _(l.downloadUserDocument(o))}),a(),e(2,` 160`)}if(i&2){let t=m();c(),d("clubUserID",t.clubUserID)("isAdmin",!0)}}function sn(i,s){if(i&1){let t=v();e(0,` 161 `),r(1,"main",1),e(2,` 162 `),h(3,"app-admin-header",2),e(4,` 163 `),r(5,"app-user-file-cabinet",3),f("download",function(o){C(t);let l=m();return _(l.downloadUserDocument(o))}),a(),e(6,` 164 `),a(),e(7,` 165`)}i&2&&(c(3),d("pageTitle","Files"),c(2),d("isAdmin",!0))}var mt=(()=>{let s=class s{constructor(n,o,l){this.siteDataService=n,this.route=o,this.userService=l,this.userMode=!1,this.AriaLabels=K,this.unsubscribe$=new L}ngOnInit(){this.clubUserID=+de(this.route,"id"),this.clubUserID&&(this.userMode=!0),this.siteDataService.hide
165SiteLoader()}downloadUserDocument(n){this.userService.downloadUserDocument(n.clubUserID,n.userDocumentID).pipe(D(this.unsubscribe$)).subscribe({next:o=>{Oe(o)},error:()=>{this.siteDataService.showSiteErrorAlert("The requested file could not be found.")}})}ngOnDestroy(){this.unsubscribe$.next(null),this.unsubscribe$.complete()}};s.\u0275fac=function(o){return new(o||s)(b(F),b(V),b(P))},s.\u0275cmp=y({type:s,selectors:[["app-file-cabinet"]],standalone:!1,decls:2,vars:2,consts:[[3,"download","clubUserID","isAdmin"],["role","main"],[3,"pageTitle"],[3,"download","isAdmin"]],template:function(o,l){o&1&&(u(0,ln,3,2),u(1,sn,8,2)),o&2&&(p(l.userMode?0:-1),c(),p(l.userMode?-1:1))},dependencies:[H,Jt],encapsulation:2});let i=s;return i})();var gi=(()=>{let s=class s{run(){this.searchComponent.run()}};s.\u0275fac=function(o){return new(o||s)},s.\u0275cmp=y({type:s,selectors:[["app-club-contact-convert-player"]],viewQuery:function(o,l){if(o&1&&Q(xe,5),o&2){let x;G(x=Y())&&(l.searchComponent=x.first)}},standalone:!1,decls:6,vars:2,consts:[["role","main"],["parentLinkUrl","../../","parentLinkText","Club Contact Profile",3,"pageTitle","showBackButton"]],template:function(o,l){o&1&&(r(0,"main",0),e(1,` 166 `),h(2,"app-admin-header",1),e(3,` 167 `),h(4,"app-user-search"),e(5,` 168`),a()),o&2&&(c(2),d("pageTitle","Convert Club Contact to Parent")("showBackButton",!0))},dependencies:[H,xe],encapsulation:2});let i=s;return i})();var dn=i=>["/admin/users/club-contacts",i,"profile"],un=i=>["/admin/users",i,"profile"];function pn(i,s){if(i&1&&(e(0,` 169 `),r(1,"div",15),e(2,` 170 `),r(3,"div",16),e(4,` 171 `),r(5,"span",17),e(6,"Players"),a(),e(7,` 172 `),r(8,"div",18),e(9),a(),e(10,` 173 `),a(),e(11,` 174 `),r(12,"div",16),e(13,` 175 `),r(14,"span",17),e(15,"Parents"),a(),e(16,` 176 `),r(17,"div",18),e(18),a(),e(19,` 177 `),a(),e(20,` 178 `),r(21,"div",19),e(22,` 179 `),r(23,"span"),e(24,` 180 `),h(25,"app-star-rating",20),e(26,` 181 `),a(),e(27,` 182 `),r(28,"div",18),e(29),a(),e(30,` 183 `),a(),e(31,` 184 `),r(32,"div",19),e(33,` 185 `),r(34,"span"),e(35,` 186 `),h(36,"app-star-rating",20),e(37,` 187 `),a(),e(38,` 188 `),r(39,"div",18),e(40),a(),e(41,` 189 `),a(),e(42,` 190 `),a(),e(43,` 191 `)),i&2){let t=m(2);c(9),g(t.clubContactMetrics.playerCount),c(9),g(t.clubContactMetrics.parentCount),c(7),d("rating",5)("fullWidth",!1)("circleStars",!0),c(4),g(t.clubContactMetrics.fiveStar),c(7),d("rating",4)("fullWidth",!1)("circleStars",!0),c(4),g(t.clubContactMetrics.fourStar)}}function Cn(i,s){if(i&1&&(e(0,` 192 `),r(1,"th",24),e(2),h(3,"p-sortIcon",25),e(4,` 193 `),a(),e(5,` 194 `)),i&2){let t=s.$implicit,n=m(4);c(),d("pSortableColumn",t.field),oe("aria-label",n.AriaLabels.ACTIVATE_SORT),c(),T(` 195 `,t.header,` 196 `),c(),d("field",t.field)}}function _n(i,s){if(i&1&&(e(0,` 197 `),r(1,"tr"),e(2,` 198 `),B(3,Cn,6,4,null,null,O),a(),e(5,` 199 `)),i&2){let t=m(3);c(3),q(t.userService.clubContactColumns)}}function hn(i,s){if(i&1&&e(0),i&2){let t=m().$implicit;T(` 200 `,t.parentLastName+(t.parentFirstName?", "+t.parentFirstName:""),` 201 `)}}function xn(i,s){if(i&1&&e(0),i&2){let t=m().$implicit;T(` 202 `,t.playerLastName+(t.playerFirstName?", "+t.playerFirstName:""),` 203 `)}}function fn(i,s){if(i&1&&(e(0,` 204 `),r(1,"div",27),e(2,` 205 `),h(3,"app-star-rating",28),e(4,` 206 `),a(),e(5,` 207 `)),i&2){let t=m().$implicit;c(3),d("rating",t.leadRating)("blackStar",!0)("fullWidth",!1)("circleStars",!0)}}function bn(i,s){i&1&&(e(0,` 208 `),h(1,"app-pill",29),e(2,` 209 `))}function vn(i,s){i&1&&(e(0,` 210 `),r(1,"app-pill",30),e(2,` 211 `),a(),e(3,` 212 `))}function Sn(i,s){i&1&&(e(0,` 213 `),r(1,"app-pill",31),e(2,` 214 `),a(),e(3,` 215 `))}function gn(i,s){if(i&1&&(e(0,` 216 `),r(1,"a",26),e(2,` 217 `),h(3,"app-pill",32),e(4,` 218 `),a(),e(5,` 219 `)),i&2){let t=m().$implicit;c(),d("routerLink",J(1,un,t.clubUserID))}}function yn(i,s){if(i&1&&(e(0),I(1,"utcDate")),i&2){let t=m().$implicit;T(` 220 `,$(1,1,t.createdOn,"MM/dd/y"),` 221 `)}}function wn(i,s){if(i&1&&(e(0),I(1,"utcDate")),i&2){let t=m().$implicit;T(`
222 `,$(1,1,t.lastActionDate,"MM/dd/y"),` 223 `)}}function En(i,s){if(i&1&&e(0),i&2){let t=m().$implicit;T(` 224 `,t.lastAction,` 225 `)}}function Dn(i,s){if(i&1&&(e(0,` 226 `),r(1,"tr"),e(2,` 227 `),r(3,"td"),e(4,` 228 `),r(5,"a",26),e(6),a(),e(7,` 229 `),a(),e(8,` 230 `),r(9,"td"),e(10,` 231 `),u(11,hn,1,1),a(),e(12,` 232 `),r(13,"td"),e(14,` 233 `),u(15,xn,1,1),a(),e(16,` 234 `),r(17,"td"),e(18,` 235 `),u(19,fn,6,4),a(),e(20,` 236 `),r(21,"td"),e(22,` 237 `),u(23,bn,3,0),u(24,vn,4,0),u(25,Sn,4,0),u(26,gn,6,3),a(),e(27,` 238 `),r(28,"td"),e(29,` 239 `),u(30,yn,2,4),a(),e(31,` 240 `),r(32,"td"),e(33,` 241 `),u(34,wn,2,4),a(),e(35,` 242 `),r(36,"td"),e(37,` 243 `),u(38,En,1,1),a(),e(39,` 244 `),a(),e(40,` 245 `)),i&2){let t=s.$implicit,n=m(3);c(5),d("routerLink",J(12,dn,t.clubContactFamilyID)),c(),T(` 246 `,t.parentEmail,` 247 `),c(5),p(t.parentLastName?11:-1),c(4),p(t.playerLastName?15:-1),c(4),p(t.leadRating?19:-1),c(4),p(t.status===n.ClubContactStatus.CLUB_CONTACT?23:-1),c(),p(t.status===n.ClubContactStatus.CONVERTED?24:-1),c(),p(t.status===n.ClubContactStatus.INACTIVE?25:-1),c(),p(t.status===n.ClubContactStatus.HAS_PROFILE?26:-1),c(4),p(t.createdOn?30:-1),c(4),p(t.lastActionDate?34:-1),c(4),p(t.lastAction?38:-1)}}function Tn(i,s){if(i&1){let t=v();e(0,` 248 `),r(1,"p-table",21),f("onLazyLoad",function(o){C(t);let l=m(2);return _(l.search(o))}),e(2,` 249 `),E(3,_n,6,0,"ng-template",22),e(4,` 250 `),E(5,Dn,41,14,"ng-template",23),e(6,` 251 `),a(),e(7,` 252 `)}if(i&2){let t=m(2);c(),d("columns",t.userService.clubContactColumns)("value",t.searchResults)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",t.totalRecords)("rows",100)("loading",t.loading)}}function In(i,s){if(i&1){let t=v();e(0,` 253 `),r(1,"app-admin-header",1),e(2,` 254 `),a(),e(3,` 255 `),u(4,pn,44,10),r(5,"app-admin-filter",2),f("adminFilterReset",function(){C(t);let o=m();return _(o.resetFilters())})("adminFilterSearch",function(){C(t);let o=m();return _(o.run())}),e(6,` 256 `),R(7,3),e(8,` 257 `),r(9,"div",4),e(10,` 258 `),r(11,"input",5),N("ngModelChange",function(o){C(t);let l=m();return U(l.userService.clubContactsFilters.name,o)||(l.userService.clubContactsFilters.name=o),_(o)}),a(),e(12,` 259 `),h(13,"label",6),e(14,` 260 `),a(),e(15,` 261 `),r(16,"div",4),e(17,` 262 `),r(18,"input",7),N("ngModelChange",function(o){C(t);let l=m();return U(l.userService.clubContactsFilters.parentEmail,o)||(l.userService.clubContactsFilters.parentEmail=o),_(o)}),a(),e(19,` 263 `),h(20,"label",6),e(21,` 264 `),a(),e(22,` 265 `),k(),e(23,` 266 `),R(24,8),e(25,` 267 `),r(26,"div",9),e(27,` 268 `),r(28,"div",10),e(29,` 269 `),r(30,"div",11),e(31,` 270 `),r(32,"label"),e(33,"Engagement"),a(),e(34,` 271 `),r(35,"p-multiSelect",12),N("ngModelChange",function(o){C(t);let l=m();return U(l.userService.clubContactsFilters.clubContactLeadRatings,o)||(l.userService.clubContactsFilters.clubContactLeadRatings=o),_(o)}),e(36,` 272 `),a(),e(37,` 273 `),a(),e(38,` 274 `),a(),e(39,` 275 `),r(40,"div",10),e(41,` 276 `),r(42,"div",11),e(43,` 277 `),r(44,"label"),e(45,"Status"),a(),e(46,` 278 `),r(47,"p-multiSelect",12),N("ngModelChange",function(o){C(t);let l=m();return U(l.userService.clubContactsFilters.clubContactPlayerStatuses,o)||(l.userService.clubContactsFilters.clubContactPlayerStatuses=o),_(o)}),e(48,` 279 `),a(),e(49,` 280 `),a(),e(50,` 281 `),a(),e(51,` 282 `),a(),e(52,` 283 `),e(53,` 284 `),k(),e(54,` 285 `),a(),e(55,` 286 `),r(56,"section",13),e(57,` 287 `),r(58,"div",14),e(59,` 288 `),u(60,Tn,8,8),a(),e(61,` 289 `),a(),e(62,` 290 `)}if(i&2){let t=m();c(4),p(t.clubContactMetrics?4:-1),c(),d("showAdvanced",!0),c(6),M("ngModel",t.userService.clubContactsFilters.name),c(
2907),M("ngModel",t.userService.clubContactsFilters.parentEmail),c(17),d("autofocusFilter",!0),M("ngModel",t.userService.clubContactsFilters.clubContactLeadRatings),d("options",t.userService.leadRatings)("filter",!0)("showToggleAll",!1)("maxSelectedLabels",1)("selectedItemsLabel","{0} ratings selected"),c(12),d("autofocusFilter",!0),M("ngModel",t.userService.clubContactsFilters.clubContactPlayerStatuses),d("options",t.userService.playerStatuses)("filter",!0)("showToggleAll",!1)("maxSelectedLabels",1)("selectedItemsLabel","{0} statuses selected"),c(13),p(t.showTable?60:-1)}}var wi=(()=>{let s=class s{constructor(n,o,l,x){this.userService=n,this.siteDataService=o,this.route=l,this.formService=x,this.unsubscribe$=new L,this.ClubContactStatus=ce,this.AriaLabels=K,this.loading=!0,this.adminView=!1,this.saving=!1,this.saveButtonClicked=!1,this.showTable=!1,this.totalRecords=0,this.genderOptions=Dt,this.minBirthYear=St,this.maxBirthYear=gt,this.forms=new Me}ngOnInit(){this.dobSelect=this.userService.dobYears(),this.yearTypes=this.userService.yearTypes(),this.route.snapshot.parent.params.clubContactID?this.clubContactID=+this.route.snapshot.parent.params.clubContactID:this.clubContactID=void 0,this.userService.clubContactsFilters&&this.userService.clubContactsFilters.page?(this.showTable=!0,this.userService.getClubContactMetrics().pipe(D(this.unsubscribe$)).subscribe(n=>{this.clubContactMetrics=n})):(this.userService.clubContactsFilters=new Ie,z([this.userService.getLeadRatings(),this.userService.getClubContactMetrics(),this.userService.getClubContactPlayerStatuses()]).pipe(D(this.unsubscribe$)).subscribe(n=>{this.userService.leadRatings=n[0],this.clubContactMetrics=n[1],this.userService.playerStatuses=n[2],this.userService.clubContactDobYears=this.userService.dobYears(),this.siteDataService.hideSiteLoader(),this.loading=!1,this.run()})),this.adminView=this.route.snapshot.parent?.parent?.parent.data?.adminView,this.siteDataService.hideSiteLoader(),this.loading=!1}resetFilters(){this.userService.clubContactsFilters=new Ie(this.userService.clubContactsFilters.orderBy)}validate(){}run(){this.userService.clubContactsFilters.page=1,this.totalRecords=0,this.showTable?this.search():this.showTable=!0}setToDateToEOY(n){return yt(n)}search(n=null){let o=this.userService.clubContactsFilters;n&&n.sortField&&(o.orderBy=n.sortField+" "+(n.sortOrder===1?"ASC":"DESC"),o.page=n.first/o.rows+1),o.getTotalCount=this.totalRecords===0,this.loading=!0,this.userService.getClubContacts().subscribe({next:l=>{this.searchResults=l.results,o.getTotalCount&&(this.totalRecords=l.count),this.loading=!1},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem getting data.")}})}};s.\u0275fac=function(o){return new(o||s)(b(P),b(F),b(V),b(ee))},s.\u0275cmp=y({type:s,selectors:[["ng-component"]],viewQuery:function(o,l){if(o&1&&Q(j,5),o&2){let x;G(x=Y())&&(l.forms=x)}},standalone:!1,decls:3,vars:1,consts:[["role","main"],["pageTitle","Club Contacts","primaryBtnText","Add Contact","primaryBtnUrl","./new","secondaryBtnText","Import/Export Contacts","secondaryBtnUrl","./import"],[3,"adminFilterReset","adminFilterSearch","showAdvanced"],["primary",""],[1,"col","pr-0"],["type","text","id","last","pInputText","","placeholder","First or Last Name",1,"full-width",3,"ngModelChange","ngModel"],["for","search",1,"sr-only"],["type","text","id","email","pInputText","","placeholder","Parent Email",1,"full-width",3,"ngModelChange","ngModel"],["advanced",""],[1,"row","align-bottom"],[1,"col-md-2"],[1,"form-group"],["optionLabel","label","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],[1,""],[1,"table-responsive"],[1,"row","mx-1","mb-4","clubContact-stats"],[1,"col-6","col-md-3","p-3","bg-navy","text-center"],[1,"text-small","text-grey-lt","text-uppercase"],[1,"text-jumbo"],[1,"col-6","col-md-3","p-3","bg-green","text-center"],[3,"rating","fullWidth","circleStars"],["sortField","parentName",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","rows","loading"],["pTemplate","header"],["pTemplate","body"],[3,"pSortableColumn"],[3,"field"],[3,"routerLink"],[1,"text-large"],[3,"rating","blackStar","fullWidth","circleStars"],["text","Active Club Contact","status","primary"],["text","Converted","status","success"],["text","Inactive","status","warning"],["text","Has Profile","status","secondary"]],template:function(o,l){o&1&&(r(0,"main",0),e(1,`
291 `),u(2,In,63,19),a()),o&2&&(c(2),p(l.adminView?-1:2))},dependencies:[ht,ge,ye,ae,re,Vt,H,Nt,Ge,pe,Ce,_e,We,he],styles:[".clubContact-stats[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{border:var(--border)}.clubContact-stats[_ngcontent-%COMP%] .bg-navy[_ngcontent-%COMP%]{background-color:var(--blue-900)}.clubContact-stats[_ngcontent-%COMP%] .bg-green[_ngcontent-%COMP%]{background-color:var(--green-700)}.clubContact-stats[_ngcontent-%COMP%] .text-jumbo[_ngcontent-%COMP%]{line-height:3rem}"]});let i=s;return i})();var Ei=(()=>{let s=class s{run(){this.searchComponent.run()}};s.\u0275fac=function(o){return new(o||s)},s.\u0275cmp=y({type:s,selectors:[["app-club-contact-convert-player"]],viewQuery:function(o,l){if(o&1&&Q(Je,5),o&2){let x;G(x=Y())&&(l.searchComponent=x.first)}},standalone:!1,decls:6,vars:3,consts:[["role","main"],["parentLinkUrl","../../","parentLinkText","Club Contact Profile",3,"pageTitle","showBackButton"],[3,"clubContactAdminView"]],template:function(o,l){o&1&&(r(0,"main",0),e(1,` 292 `),h(2,"app-admin-header",1),e(3,` 293 `),h(4,"app-player-search",2),e(5,` 294`),a()),o&2&&(c(2),d("pageTitle","Convert Club Contact to Player")("showBackButton",!0),c(2),d("clubContactAdminView",!0))},dependencies:[H,Je],encapsulation:2});let i=s;return i})();function An(i,s){if(i&1&&(e(0,` 295 `),r(1,"div",7),e(2,` 296 `),r(3,"h4"),e(4),a(),e(5,` 297 `),a(),e(6,` 298 `)),i&2){let t=m().$index,n=m();c(4),T("Parent/Guardian ",t+1+n.existingParents)}}function Vn(i,s){if(i&1){let t=v();e(0,` 299 `),r(1,"div",8),e(2,` 300 `),r(3,"button",9),f("click",function(){C(t);let o=m().$index,l=m();return _(l.removeParent(o))}),e(4,` 301 `),h(5,"i",10),e(6,` 302 Remove 303 `),a(),e(7,` 304 `),a(),e(8,` 305 `)}}function Fn(i,s){if(i&1&&(e(0,` 306 `),r(1,"app-dynamic-form",11),e(2,` 307 `),a(),e(3,` 308 `)),i&2){let t=m().$index,n=m();c(),d("fields",n.parentFields)("entity",n.clubContactFamily.parents[t])("showSubmitButton",!1)("showCancelButton",!1)("horizontalForm",!0)("formID","parent-form-"+t)("enableSavingOverlay",!1)}}function Pn(i,s){if(i&1&&(e(0,` 309 `),r(1,"app-dynamic-form",11),e(2,` 310 `),a(),e(3,` 311 `)),i&2){let t=m(2);c(),d("fields",t.familyFields)("entity",t.clubContactFamily)("showSubmitButton",!1)("showCancelButton",!1)("horizontalForm",!0)("formID","family-form")("enableSavingOverlay",!1)}}function Rn(i,s){if(i&1&&(e(0,` 312 `),h(1,"hr",12),e(2,` 313 `)),i&2){let t=m().$index;c(),d("id","form-section-"+t)}}function kn(i,s){if(i&1&&(e(0,` 314 `),r(1,"div",5),e(2,` 315 `),r(3,"div",6),e(4,` 316 `),u(5,An,7,1),u(6,Vn,9,0),a(),e(7,` 317 `),u(8,Fn,4,7),u(9,Pn,4,7),u(10,Rn,3,1),a(),e(11,` 318 `)),i&2){let t=s.$implicit,n=s.$index,o=s.$count,l=m();c(),d("id","parent-form-container-"+n),c(4),p(!l.addParentView||n>0?5:-1),c(),p(!t.clubContactID&&n>0?6:-1),c(2),p(l.loading?-1:8),c(),p(!l.loading&&n===0&&!l.editView&&!l.addPlayerView&&!l.addParentView?9:-1),c(),p(n!==o-1?10:-1)}}function Mn(i,s){i&1&&(e(0,` 319 `),h(1,"hr"),e(2,` 320 `))}function Un(i,s){if(i&1&&(e(0,` 321 `),r(1,"div",7),e(2,` 322 `),r(3,"h4"),e(4),a(),e(5,` 323 `),a(),e(6,` 324 `)),i&2){let t=m().$index,n=m();c(4),T("Player ",t+1+n.existingPlayers)}}function Nn(i,s){if(i&1){let t=v();e(0,` 325 `),r(1,"div",8),e(2,` 326 `),r(3,"button",13),f("click",function(){C(t);let o=m().$index,l=m();return _(l.removePlayer(o))}),e(4,` 327 `),h(5,"i",10),e(6,` 328 Remove 329 `),a(),e(7,` 330 `),a(),e(8,` 331 `)}}function Ln(i,s){if(i&1&&(e(0,` 332 `),r(1,"app-dynamic-form",11),e(2,` 333 `),a(),e(3,` 334 `)),i&2){let t=m().$index,n=m();c(),d("fields",n.playerFields)("entity",n.clubContactFamily.players[t])("showSubmitButton",!1)("showCancelButton",!1)("horizontalForm",!0)("formID","player-form-"+t)("enableSavingOverlay",!1)}}function On(i,s){if(i&1&&(e(0,` 335 `),h(1,"hr",12),e(2,` 336 `)),i&2){let t=m().$index;c(),d("id","player-form-section-"+t)}}function Bn(i,s){if(i&1&&(e(0,` 337 `),r(1,"div",5),e(2,` 338 `),u(3,Mn,3,0),r(4,"div",6),e(5,` 339 `),u(6,Un,7,1),u(7,Nn,9,0),a(),e(8,` 340 `),u(9,Ln,4,7),u(10,On,3,1),a(),e(11,` 341 `)),i&2){let t=s.$implicit,n=s.$index,o=s.$count,l=m();c(),d("id","player-form-container-"+n),c(2),p(n===0&&!l.addPlayerView?3:-1),c(3),p(!l.addPlayerView||n>0?6:-1),c(),p(!t.clubContactID&&(n>0||!l.addPlayerView)?7:-1),c(2),p(l.loading?-1:9),c(),p(n!==o-1?10:-1)}}function qn(i,s){if(i&1){let t=v();e(0,` 342 `),r(1,"button",15),f("click",function(){C(t);let o=m(2);return _(o.addParent())}),e(2,"Add Parent"),a(),e(3,` 343 `)}}function $n(i,s){if(i&1){let t=v();e(0,` 344 `),r(1,"button",15),f("click",function(){C(t);let o=m(2);return _(o.addPlayer())}),e(2,"Add Player"),a(),e(3,` 345 `)}}function jn(i,s){if(i&1&&(e(0,` 346 `),r(1,"div",14),e(2,` 347 `),u(3,qn,4,0),u(4,$n,4,0),a(),e(5,` 348 `)),i&2){let t=m();c(3),p(!t.editView&&!t.addPlayerView?3:-1),c(),p(!t.editView&&!t.addParentView?4:-1)}}function Hn(i,s){i&1&&(e(0,` 349 `),r(1,"button",16),e(2,` 350 `),h(3,"span",17),e(4,` 351 Saving 352 `),a(),e(5,` 353 `))}function Wn(i,s){if(i&1){let t=v();e(0,` 354 `),r(1,"button",18),f("click",function(){C(t);let o=m();return o.save(),_(o.saveButtonClicked=!0)}),e(2,` 355 Save 356 `),a(),e(3,` 357 `)}}var Re=(()=>{let s=class s{constructor(n,o,l,x,w){this.userService=n,this.siteDataService=o,this.route=l,this.formService=x,this.router=w,this.unsubscribe$=new L,this.AriaLabels=K,this.loading=!0,this.editView=!1,this.saving=!1,this.saveButtonClicked=!1,this.showTable=!1,this.totalRecords=0,this.addPlayerView=!1,this.addParentView=!1,this.existingParents=0,this.existingPlayers=0,this.forms=new Me}
357ngOnInit(){this.addPlayerView=this.route.snapshot.data.addPlayerView,this.addParentView=this.route.snapshot.data.addParentView,this.editView=!!(!this.addPlayerView&&!this.addParentView&&this.route.snapshot.params.id),this.clubContactFamilyID=+this.route.snapshot.params.id,this.clubContactFamily=new Ae,this.pageTitle=this.editView?"Edit Club Contact":this.addPlayerView?"Add Player":this.addParentView?"Add Parent":"New Club Contact";let n=[this.userService.getClubContactMetadata(),this.userService.getPlayerClubContactMetadata(),this.userService.getFamilyClubContactMetadata()];this.clubContactFamilyID&&n.push(this.userService.getClubContactFamily(this.clubContactFamilyID)),z(n).pipe(D(this.unsubscribe$)).subscribe(o=>{this.parentFields=o[0].fields,this.playerFields=o[1].fields,this.familyFields=o[2].fields,this.editView?this.clubContactFamily=o[3]:(this.clubContactFamily.parents=[],this.clubContactFamily.players=[],this.addPlayerView?(this.existingPlayers=o[3].players.length,this.addPlayer()):(this.addParentView&&(this.existingParents=o[3].parents.length),this.addParent())),this.siteDataService.hideSiteLoader(),this.loading=!1})}isParentForm(n){return n.formID.includes("parent")}isPlayerForm(n){return n.formID.includes("player")}addParent(){this.clubContactFamily.parents.push(new at),setTimeout(()=>{let n=document.getElementById("form-section-"+(this.clubContactFamily.parents.length-2));n&&n.scrollIntoView({behavior:"smooth"})},0)}removeParent(n){this.clubContactFamily.parents.splice(n,1)}addPlayer(){this.clubContactFamily.players.push(new rt),setTimeout(()=>{let n=document.getElementById("player-form-section-"+(this.clubContactFamily.players.length-2));n&&n.scrollIntoView({behavior:"smooth"})},0)}removePlayer(n){this.clubContactFamily.players.splice(n,1)}showValidationMessages(){this.forms.forEach(n=>{n.submitForm()})}save(){let n=new Ae;if(this.formService.showFormLoader(),this.saving=!0,n.clubContactFamilyID=this.clubContactFamilyID,this.forms.forEach(o=>{o.isValid&&(this.isParentForm(o)?n.parents.push(this.createParentFromForm(o,n.parents.length)):this.isPlayerForm(o)?n.players.push(this.createPlayerFromForm(o,n.players.length)):this.createFamilyFromForm(o,n))}),this.forms.some(o=>!o.isValid)){this.showValidationMessages(),this.saving=!1,this.saveButtonClicked=!1;return}this.userService.saveClubContact(n,this.addPlayerView||this.addParentView).subscribe(o=>{o&&(n.clubContactFamilyID=o.clubContactFamilyID),this.siteDataService.showSiteSuccessAlert("Club Contact was saved successfully"),this.editView||this.addPlayerView||this.addParentView?this.navigateToProfile():this.navigateToNewProfile(n.clubContactFamilyID),this.formService.hideFormLoader(),this.saving=!1,this.saveButtonClicked=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem saving the Club Contact"),this.formService.hideFormLoader(),this.saving=!1,this.saveButtonClicked=!1})}createParentFromForm(n,o){let l=new at;return l.clubContactID=this.clubContactFamily.parents[o].clubContactID,l.clubUserID=this.clubContactFamily.parents[o].clubUserID,Object.keys(n.value).forEach(x=>{switch(x){case"firstName":l.firstName=n.value[x];break;case"lastName":l.lastName=n.value[x];break;case"email":l.email=n.value[x];break}}),l.email||(l.email=this.clubContactFamily.parents[o].email),l}createPlayerFromForm(n,o){let l=new rt;return l.clubContactID=this.clubContactFamily.players[o].clubContactID,Object.keys(n.value).forEach(x=>{switch(x){case"firstName":l.firstName=n.value[x];break;case"lastName":l.lastName=n.value[x];break;case"dob":l.dob=n.value[x];break;case"genderID":l.genderID=n.value[x];break;case"tryoutNumber":l.tryoutNumber=n.value[x];break}}),l}createFamilyFromForm(n,o){Object.keys(n.value).forEach(l=>{switch(l){case"clubContactLeadRatingID":o.clubContactLeadRatingID=n.value[l];break;case"notes":o.notes=n.value[l];break;case"clubContactInterestAreasDD":o.clubContactInterestAreas=n.value[l];break}})}navigateToSearch(){this.router.navigate([".."],{relativeTo:this.route})}navigateToNewProfile(n){this.router.navigate(["..",n,"profile"],{relativeTo:this.route})}navigateToProfile(){this.router.navigate([".."],{relativeTo:this.route})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};s.\u0275fac=function(o){return new(o||s)(b(P),b(F),b(V),b(ee),b(X))},s.\u0275cmp=y({type:s,selectors:[["app-club-contact-edit"]],viewQuery:function(o,l){if(o&1&&Q(j,5),o&2){let x;G(x=Y())&&(l.forms=x)}},standalone:!1,decls:20,vars:5,consts:[["role","main"],["parentLinkUrl","../","parentLinkText","Club Contact Profile",3,"pageTitle","showBackButton"],[1,"form-action"],[1,"left-buttons"],["type","button",1,"btn","btn-lg","btn-blank",3,"click"],[3,"id"],[1,"row"],[1,"col","col-9"],[1,"col","col-3",2,"text-align","right"],[1,"btn","btn-sm",3,"click"],[1,"fal","fa-times"],[3,"fields","entity","showSubmitButton","showCancelButton","horizontalForm","formID","enableSavingOverlay"],[1,"form-section",3,"id"],[1,"btn",3,"click"],[1,"my-3","border-top"],[1,"btn","btn-icon-plus",3,"click"],["type","button","disabled","true",1,"btn","btn-primary","btn-lg","btn-arrow"],["role","status","aria-hidden","true",1,"spinner-border","spinner-border-sm"],["type","button",1,"btn","btn-primary","btn-lg","btn-arrow",3,"click"]],template:function(o,l){o&1&&(r(0,"main",0),e(1,` 358 `),h(2,"app-admin-header",1),e(3,` 359 `),B(4,kn,12,6,null,null,O),B(6,Bn,12,6,null,null,O),u(8,jn,6,2),r(9,"div",2),e(10,` 360 `),r(11,"div",3),e(12,` 361 362 `),u(13,Hn,6,0),u(14,Wn,4,0),r(15,"button",4),f("click",function(){return l.navigateToSearch()}),e(16,` 363 Cancel 364 `),a(),e(17,` 365 `),a(),e(18,` 366 `),a(),e(19,` 367 `),a()),o&2&&(c(2),d("pageTitle",l.pageTitle)("showBackButton",!0),c(2),q(l.clubContactFamily.parents),c(2),q(l.clubContactFamily.players),c(2),p(!l.editView&&(!l.addPlayerView||!l.addParentView)?8:-1),c(5),p(l.saving&&l.saveButtonClicked?13:-1),c(),p(!l.saving||!l.saveButtonClicked?14:-1))},dependencies:[j,H],encapsulation:2});let i=s;return i})();function zn(i,s){if(i&1){let t=v();e(0,` 368 `),r(1,"app-email-compose",2),f("send",function(){C(t);let o=m();return _(o.navigateToProfile())})("cancel",function(){C(t);let o=m();return _(o.navigateToProfile())}),e(2,` 369 `),a(),e(3,` 370 `)}if(i&2){let t=m();c(),d("recipients",t.clubContactRecipients)("clubContactView",!0)("emailTemplateType",t.EmailTemplateType.GENERAL)("showHeader",!1)("showSteps",!1)("emailCategoryID",t.EmailCategoryLV.MARKETING)("hideSearch",!0)("lockRecipients",!0)("selectRecipientsButtonText","Continue")}}var Di=(()=>{let s=class s{constructor(n,o,l,x){this.userService=n,this.siteDataService=o,this.route=l,this.router=x,this.unsubscribe$=new L,this.EmailTemplateType=Zt,this.EmailCategoryLV=Kt}
370ngOnInit(){this.clubContactFamilyID=+this.route.snapshot.params.id,this.clubContactFamily=new Ae,this.userService.getClubContactFamily(this.clubContactFamilyID).pipe(D(this.unsubscribe$)).subscribe({next:n=>{this.clubContactFamily=n,this.clubContactFamily&&(this.clubContactRecipients=this.clubContactFamily.parents.filter(o=>o.clubContactStatus!==ce.INACTIVE).map(o=>({firstName:o.firstName,lastName:o.lastName,clubContactID:o.clubContactID,emailAddress:o.email,player:void 0,clubUser:void 0,recipientType:bt.CLUB_CONTACT,selectAll:void 0,expandedRecipientType:void 0,isCC:!1})))}})}navigateToProfile(){this.router.navigate([".."],{relativeTo:this.route})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};s.\u0275fac=function(o){return new(o||s)(b(P),b(F),b(V),b(X))},s.\u0275cmp=y({type:s,selectors:[["app-club-contact-email"]],standalone:!1,decls:5,vars:3,consts:[["role","main"],["parentLinkUrl","../","parentLinkText","Club Contact Profile",3,"pageTitle","showBackButton"],["defaultEmailSubject","Re: Let's connect",3,"send","cancel","recipients","clubContactView","emailTemplateType","showHeader","showSteps","emailCategoryID","hideSearch","lockRecipients","selectRecipientsButtonText"]],template:function(o,l){o&1&&(r(0,"main",0),e(1,` 371 `),h(2,"app-admin-header",1),e(3,` 372 373 `),u(4,zn,4,9),a()),o&2&&(c(2),d("pageTitle","Email")("showBackButton",!0),c(2),p(l.clubContactRecipients?4:-1))},dependencies:[H,ni],encapsulation:2});let i=s;return i})();var Kn=()=>["./edit"],Zn=()=>["./email"],Ti=i=>({"mb-3":i});function Xn(i,s){if(i&1&&(e(0,` 374 `),h(1,"app-user-initials",32),e(2,` 375 `)),i&2){let t=m().$implicit;c(),d("firstName",t.firstName)("lastName",t.lastName)("id",t.clubContactID)}}function eo(i,s){if(i&1&&(e(0,` 376 `),r(1,"app-user-initials",33),e(2,` 377 `),a(),e(3,` 378 `)),i&2){let t=m().$implicit;c(),d("iconClass","fa fa-user")("id",t.clubContactID)}}function to(i,s){if(i&1&&e(0),i&2){let t=m().$implicit;me(` 379 `,t.firstName," ",t.lastName,` 380 `)}}function io(i,s){if(i&1&&e(0),i&2){let t=m().$implicit;T(` 381 `,t.email,` 382 `)}}function no(i,s){if(i&1&&(e(0,` 383 `),r(1,"span"),e(2),a(),e(3,` 384 `)),i&2){let t=m().$implicit;c(2),g(t.email)}}function oo(i,s){i&1&&(e(0,` 385 `),r(1,"span",34),e(2,"\u2022"),a(),e(3,` 386 `))}function ao(i,s){if(i&1&&(e(0,` 387 `),u(1,oo,4,0),r(2,"span"),e(3),I(4,"utcDate"),a(),e(5,` 388 `)),i&2){let t=m().$implicit;c(),p(t.firstName&&t.lastName?1:-1),c(2),T("Has Profile since: ",$(4,2,t.clubUserCreatedOn,"M/d/y"))}}function ro(i,s){i&1&&(e(0,` 389 `),r(1,"span",34),e(2,"\u2022"),a(),e(3,` 390 `))}function lo(i,s){if(i&1&&(e(0,` 391 `),u(1,ro,4,0),r(2,"span"),e(3,"Converted"),a(),e(4,` 392 `)),i&2){let t=m().$implicit;c(),p(t.firstName&&t.lastName?1:-1)}}function so(i,s){i&1&&(e(0,` 393 `),r(1,"span",34),e(2,"\u2022"),a(),e(3,` 394 `))}function co(i,s){if(i&1&&(e(0,` 395 `),u(1,so,4,0),r(2,"span"),e(3,"Inactive"),a(),e(4,` 396 `)),i&2){let t=m().$implicit;c(),p(t.firstName&&t.lastName?1:-1)}}function mo(i,s){if(i&1){let t=v();e(0,` 397 `),r(1,"div",5),e(2,` 398 `),r(3,"div",25),e(4,` 399 `),r(5,"div",26),e(6,` 400 `),r(7,"div",17),e(8,` 401 `),u(9,Xn,3,3)(10,eo,4,2),a(),e(11,` 402 `),r(12,"div",25),e(13,` 403 `),r(14,"div",27),e(15,`Parent 404 `),r(16,"p-menu",28,2),e(18,` 405 `),a(),e(19,` 406 `),r(20,"button",29),f("click",function(o){C(t);let l=Se(17);return _(l.toggle(o))}),e(21,` 407 `),a(),e(22,` 408 `),a(),e(23,` 409 `),r(24,"div",30),e(25,` 410 `),u(26,to,1,2)(27,io,1,1),a(),e(28,` 411 `),r(29,"div",31),e(30,` 412 `),u(31,no,4,1),u(32,ao,6,5),u(33,lo,5,1),u(34,co,5,1),a(),e(35,` 413 `),a(),e(36,` 414 `),a(),e(37,` 415 `),a(),e(38,` 416 `),a(),e(39,` 417 `)}if(i&2){let t=s.$implicit,n=m(2);c(9),p(t.firstName&&t.lastName?9:10),c(7),d("popup",!0)("model",n.clubContactMenuItems[t.clubContactID]),c(10),p(t.firstName&&t.lastName?26:27),c(5),p(t.firstName&&t.lastName?31:-1),c(),p(t.clubContactStatus===n.ClubContactStatus.HAS_PROFILE?32:-1),c(),p(t.clubContactStatus===n.ClubContactStatus.CONVERTED?33:-1),c(),p(t.clubContactStatus===n.ClubContactStatus.INACTIVE?34:-1)}}function uo(i,s){if(i&1&&e(0),i&2){let t=m().$implicit;me(`
418 `,t.firstName," ",t.lastName,` 419 `)}}function po(i,s){if(i&1&&(e(0,` 420 `),r(1,"span"),e(2),I(3,"utcDate"),a(),e(4,` 421 `)),i&2){let t=m().$implicit;c(2),g($(3,1,t.dob,"M/d/y"))}}function Co(i,s){i&1&&(e(0,` 422 `),r(1,"span",34),e(2,"\u2022"),a(),e(3,` 423 `))}function _o(i,s){if(i&1&&(e(0,` 424 `),r(1,"span"),e(2),a(),e(3,` 425 `)),i&2){let t=m().$implicit;c(2),g(t.genderID===1?"Male":t.genderID===2?"Female":"Other")}}function ho(i,s){i&1&&(e(0,` 426 `),r(1,"span",34),e(2,"\u2022"),a(),e(3,` 427 `))}function xo(i,s){if(i&1&&(e(0,` 428 `),u(1,ho,4,0),r(2,"span"),e(3,"Converted"),a(),e(4,` 429 `)),i&2){let t=m().$implicit;c(),p(t.dob||t.genderID?1:-1)}}function fo(i,s){i&1&&(e(0,` 430 `),r(1,"span",34),e(2,"\u2022"),a(),e(3,` 431 `))}function bo(i,s){if(i&1&&(e(0,` 432 `),u(1,fo,4,0),r(2,"span"),e(3,"Inactive"),a(),e(4,` 433 `)),i&2){let t=m().$implicit;c(),p(t.dob||t.genderID?1:-1)}}function vo(i,s){if(i&1){let t=v();e(0,` 434 `),r(1,"div",5),e(2,` 435 `),r(3,"div",25),e(4,` 436 `),r(5,"div",26),e(6,` 437 `),r(7,"div",17),e(8,` 438 `),h(9,"app-user-initials",32),e(10,` 439 `),a(),e(11,` 440 `),r(12,"div",25),e(13,` 441 `),r(14,"div",27),e(15,`player 442 `),r(16,"p-menu",28,2),e(18,` 443 `),a(),e(19,` 444 `),r(20,"button",29),f("click",function(o){C(t);let l=Se(17);return _(l.toggle(o))}),e(21,` 445 `),a(),e(22,` 446 `),a(),e(23,` 447 `),r(24,"div",30),e(25,` 448 `),u(26,uo,1,2),a(),e(27,` 449 `),r(28,"div",31),e(29,` 450 `),u(30,po,5,4),u(31,Co,4,0),u(32,_o,4,1),u(33,xo,5,1),u(34,bo,5,1),a(),e(35,` 451 `),a(),e(36,` 452 `),a(),e(37,` 453 `),a(),e(38,` 454 `),a(),e(39,` 455 `)}if(i&2){let t=s.$implicit,n=m(3);c(9),d("firstName",t.firstName)("lastName",t.lastName)("id",t.clubContactID),c(7),d("popup",!0)("model",n.clubContactMenuItems[t.clubContactID]),c(10),p(t.firstName&&t.lastName?26:-1),c(4),p(t.dob?30:-1),c(),p(t.dob&&t.genderID?31:-1),c(),p(t.genderID?32:-1),c(),p(t.clubContactStatus===2?33:-1),c(),p(t.clubContactStatus===3?34:-1)}}function So(i,s){if(i&1&&(e(0,` 456 `),B(1,vo,40,11,null,null,O)),i&2){let t=m(2);c(),q(t.clubContactFamily.players)}}function go(i,s){i&1&&(e(0,` 457 `),r(1,"a",22),e(2,` 458 `),h(3,"i",35),e(4,` Email 459 `),a(),e(5,` 460 `)),i&2&&(c(),d("routerLink",De(1,Zn)))}function yo(i,s){if(i&1){let t=v();e(0,` 461 `),e(1,` 462 `),r(2,"div",5),e(3,` 463 `),r(4,"div",14),e(5,` 464 `),e(6,` 465 `),B(7,mo,40,8,null,null,O),u(9,So,3,0),a(),e(10,` 466 `),r(11,"div",15),e(12,` 467 `),r(13,"div",16),e(14,` 468 `),r(15,"div",17),e(16,` 469 `),r(17,"div",18),e(18,"Engagement"),a(),e(19,` 470 `),r(20,"span",19),e(21,` 471 `),r(22,"app-star-rating",20),f("updateRating",function(o){C(t);let l=m();return _(l.updateClubContactLeadRating(o))}),e(23,` 472 `),a(),e(24,` 473 `),a(),e(25,` 474 `),a(),e(26,` 475 `),e(27,` 476 `),r(28,"div",21),e(29,` 477 `),u(30,go,6,2),r(31,"a",22),e(32,` 478 `),h(33,"i",23),e(34,` Edit Profile 479 `),a(),e(35,` 480 `),r(36,"app-split-button",24,1),e(38,` 481 `),a(),e(39,` 482 `),a(),e(40,` 483 `),a(),e(41,` 484 `),a(),e(42,` 485 `),a(),e(43,` 486 `)}if(i&2){let t=m();c(7),q(t.clubContactFamily.parents),c(2),p(t.clubContactFamily.players.length>0?9:-1),c(13),d("rating",t.clubContactFamily.clubContactLeadRatingID)("editable",!0)("circleStars",!0),c(8),p(t.emailEnabled()?30:-1),c(),d("routerLink",De(7,Kn)),c(5),d("menuItems",t.actionMenuItems)}}function wo(i,s){if(i&1){let t=v();e(0,` 487 `),r(1,"div",39),e(2,` 488 `),r(3,"div",26),e(4,` 489 `),r(5,"div",25)(6,"span",40),e(7),I(8,"date"),a()(),e(9,` 490 `),r(10,"div",17),e(11,` 491 `),r(12,"a",41),f("click",function(){let o=C(t).$implicit,l=m(2);return _(l.openActivityDialog(o.clubContactActivityID))}),e(13,` 492 `),h(14,"i",42),e(15,` Edit 493 `),a(),e(16,` 494 `),a(),e(17,` 495 `),a(),e(18,` 496 `),r(19,"div",43),e(20),a(),e(21,` 497 `),r(22,"div")(23,"em"),e(24),a()(),e(25,` 498 `),a(),e(26,` 499 `)}if(i&2){let t=s.$implicit;c(7),g($(8,4,t.savedOn+"Z","MMM d,y")),c(12),d("ngClass",J(7,Ti,t.notes)),c(),T(` 500 `,t.clubContactActivityCategory,` 501 `),c(4),g(t.notes)}}function Eo(i,s){i&1&&(e(0,` 502 `),r(1,"div",44),e(2,` 503 `),r(3,"em"),e(4,"No Activities have been recorded yet"),a(),e(5,` 504 `),a(),e(6,` 505 `))}function Do(i,s){if(i&1){let t=v();e(0,` 506 `),r(1,"div",36),e(2,` 507 `),r(3,"h3"),e(4,"Activity"),a(),e(5,` 508 `),r(6,"div",37),e(7,` 509 `),B(8,wo,27,9,null,null,O),u(10,Eo,7,0),a(),e(11,` 510 `),r(12,"button",38),f("click",function(){C(t);let o=m();return _(o.openActivityDialog())}),e(13,"+ Add Activity"),a(),e(14,` 511 `),a(),e(15,` 512 `)}if(i&2){let t=m();c(8),q(t.activities),c(2),p(t.activities.length===0?10:-1)}}function To(i,s){if(i&1){let t=v();e(0,` 513 `),r(1,"div",46),e(2,` 514 `),r(3,"div",25),e(4,` 515 `),r(5,"div",37)(6,"em"),e(7),a()(),e(8,` 516 `),r(9,"span",47),e(10),I(11,"date"),a(),e(12,` 517 `),a(),e(13,` 518 `),r(14,"div",17),e(15,` 519 `),r(16,"a",48),f("click",function(){let o=C(t).$implicit,l=m(2);return _(l.openNoteDialog(o.clubContactNoteID))}),e(17,` 520 `),h(18,"i",42),e(19,` Edit 521 `),a(),e(20,` 522 `),a(),e(21,` 523 `),a(),e(22,` 524 `)}if(i&2){let t=s.$implicit;c(7),g(t.notes),c(3),me(`
525 `,t.savedByFirstName+" "+t.savedByLastName,` - 526 `,$(11,3,t.savedOn+"Z","MM/dd/y"),` 527 `)}}function Io(i,s){i&1&&(e(0,` 528 `),r(1,"div",49),e(2,` 529 `),r(3,"em"),e(4,"No notes have been added"),a(),e(5,` 530 `),a(),e(6,` 531 `))}function Ao(i,s){if(i&1){let t=v();e(0,` 532 `),r(1,"div"),e(2,` 533 `),r(3,"h3"),e(4,"Notes"),a(),e(5,` 534 `),r(6,"div",45),e(7,` 535 `),B(8,To,23,6,null,null,O),u(10,Io,7,0),r(11,"button",38),f("click",function(){C(t);let o=m();return _(o.openNoteDialog())}),e(12,"+ Add Note"),a(),e(13,` 536 `),a(),e(14,` 537 `),a(),e(15,` 538 `)}if(i&2){let t=m();c(8),q(t.notes),c(2),p(t.notes.length===0?10:-1)}}function Vo(i,s){if(i&1&&(e(0,` 539 `),r(1,"div",52),e(2,` 540 `),r(3,"span",53),e(4,"\u25CF"),a(),e(5),a(),e(6,` 541 `)),i&2){let t=s.$implicit;c(5),T("",t.label,` 542 `)}}function Fo(i,s){if(i&1&&(e(0,` 543 `),r(1,"div",51),e(2,` 544 `),B(3,Vo,7,1,null,null,O),a(),e(5,` 545 `)),i&2){let t=m(2);c(3),q(t.clubContactFamily.clubContactInterestAreasDD)}}function Po(i,s){if(i&1){let t=v();e(0,` 546 `),r(1,"p-multiSelect",54),N("ngModelChange",function(o){C(t);let l=m(2);return U(l.clubContactFamily.clubContactInterestAreasDD,o)||(l.clubContactFamily.clubContactInterestAreasDD=o),_(o)}),f("onChange",function(){C(t);let o=m(2);return _(o.interestAreasChanged=!0)})("onPanelHide",function(){C(t);let o=m(2);return _(o.saveInterestAreas())}),e(2,` 547 `),a(),e(3,` 548 `)}if(i&2){let t=m(2);c(),M("ngModel",t.clubContactFamily.clubContactInterestAreasDD),d("options",t.interestAreaTypes)("filter",!1)("showToggleAll",!1)("maxSelectedLabels",0)("selectedItemsLabel","{0} interest areas selected")}}function Ro(i,s){if(i&1&&(e(0,` 549 `),r(1,"div",50),e(2,` 550 `),r(3,"h3"),e(4,"Interest Areas"),a(),e(5,` 551 `),u(6,Fo,6,0),r(7,"div"),e(8,` 552 `),u(9,Po,4,6),a(),e(10,` 553 `),a(),e(11,` 554 `)),i&2){let t=m();c(6),p(t.clubContactFamily.clubContactInterestAreasDD.length>0?6:-1),c(3),p(t.clubContactFamily?9:-1)}}function ko(i,s){if(i&1&&(e(0,` 555 `),r(1,"div",39),e(2,` 556 `),r(3,"div",26),e(4,` 557 `),r(5,"div",25)(6,"span",40),e(7),I(8,"date"),a(),e(9,` 558 `),a(),e(10,` 559 `),a(),e(11,` 560 `),r(12,"div",43),e(13),a(),e(14,` 561 `),a(),e(15,` 562 `)),i&2){let t=s.$implicit;c(7),g($(8,3,t.sentDate+"Z","MMM d, y")),c(5),d("ngClass",J(6,Ti,t.subject)),c(),T(` 563 `,t.subject,` 564 `)}}function Mo(i,s){i&1&&(e(0,` 565 `),r(1,"div",44),e(2,` 566 `),r(3,"em"),e(4,"No emails have been sent yet"),a(),e(5,` 567 `),a(),e(6,` 568 `))}function Uo(i,s){if(i&1){let t=v();e(0,` 569 `),r(1,"button",38),f("click",function(){C(t);let o=m(2);return _(o.openSendEmail())}),e(2,`+ Send 570 Email`),a(),e(3,` 571 `)}}function No(i,s){if(i&1&&(e(0,` 572 `),r(1,"div",55),e(2,` 573 `),r(3,"h3"),e(4,"Emails"),a(),e(5,` 574 `),r(6,"div",37),e(7,` 575 `),B(8,ko,16,8,null,null,O),u(10,Mo,7,0),u(11,Uo,4,0),a(),e(12,` 576 `),a(),e(13,` 577 `)),i&2){let t=m();c(8),q(t.emails),c(2),p(t.emails.length===0?10:-1),c(),p(t.emailEnabled()?11:-1)}}function Lo(i,s){i&1&&(e(0,` 578 `),h(1,"app-skeleton-template",56),e(2,` 579`))}function Oo(i,s){if(i&1){let t=v();e(0,` 580 `),r(1,"app-dynamic-form",57),f("onCancel",function(){C(t);let o=m();return _(o.cancel())})("onSubmit",function(o){C(t);let l=m();return _(l.saveNote(o,!1))})("onSaveAndAdd",function(o){C(t);let l=m();return _(l.saveNote(o,!0))}),e(2,` 581 `),h(3,"app-dynamic-form-field",58),e(4,` 582 `),a(),e(5,` 583 `)}if(i&2){let t=m();c(),d("fields",t.fields)("entity",t.clubUserNote)("horizontalForm",!0)("contentFieldsMode",!0)("showSaveAndAddButton",!0)("buttonsPosition","left")("modalContent",!0)}}function Bo(i,s){if(i&1){let t=v();e(0,` 584 `),r(1,"app-dynamic-form",57),f("onCancel",function(){C(t);let o=m();return _(o.cancel())})("onSubmit",function(o){C(t);let l=m();return _(l.saveActivity(o,!1))})("onSaveAndAdd",function(o){C(t);let l=m();return _(l.saveActivity(o,!0))}),e(2,` 585 `),h(3,"app-dynamic-form-field",58),e(4,` 586 `),h(5,"app-dynamic-form-field",59),e(6,` 587 `),a(),e(7,` 588 `)}if(i&2){let t=m();c(),d("fields",t.activityFields)("entity",t.clubContactActivity)("horizontalForm",!0)("contentFieldsMode",!0)("showSaveAndAddButton",!0)("buttonsPosition","left")("modalContent",!0)}}function qo(i,s){i&1&&(e(0,` 589 `),r(1,"p",12),e(2,"This will also mark the players in this family as inactive."),a(),e(3,` 590 `))}function $o(i,s){if(i&1){let t=v();e(0,` 591 `),r(1,"app-dialog-footer"),e(2,` 592 `),R(3,60),e(4,` 593 `),r(5,"button",61),f("click",function(){C(t);let o=m();return _(o.showParentConfirmInactiveModal=!1)}),e(6,"Cancel"),a(),e(7,` 594 `),k(),e(8,` 595 `),R(9,62),e(10,` 596 `),r(11,"button",63),f("click",function(){C(t);let o=m();return _(o.markParentAsInactive())}),e(12,"Save"),a(),e(13,` 597 `),k(),e(14,` 598 `),a(),e(15,` 599 `)}}function jo(i,s){if(i&1){let t=v();e(0,` 600 `),r(1,"app-dialog-footer"),e(2,` 601 `),R(3,60),e(4,` 602 `),r(5,"button",61),f("click",function(){C(t);let o=m();return _(o.showPlayerConfirmInactiveModal=!1)}),e(6,"Cancel"),a(),e(7,` 603 `),k(),e(8,` 604 `),R(9,62),e(10,` 605 `),r(11,"button",63),f("click",function(){C(t);let o=m();return _(o.markClubContactAsInactive())}),e(12,"Save"),a(),e(13,` 606 `),k(),e(14,` 607 `),a(),e(15,` 608 `)}}function Ho(i,s){if(i&1){let t=v();e(0,` 609 `),r(1,"app-dialog-footer"),e(2,` 610 `),R(3,60),e(4,` 611 `),r(5,"button",61),f("click",function(){C(t);let o=m();return _(o.showParentConfirmActiveModal=!1)}),e(6,"Cancel"),a(),e(7,` 612 `),k(),e(8,` 613 `),R(9,62),e(10,` 614 `),r(11,"button",63),f("click",function(){C(t);let o=m();return _(o.markClubContactAsActive())}),e(12,"Save"),a(),e(13,` 615 `),k(),e(14,` 616 `),a(),e(15,` 617 `)}}function Wo(i,s){if(i&1){let t=v();e(0,` 618 `),r(1,"app-dialog-footer"),e(2,` 619 `),R(3,60),e(4,` 620 `),r(5,"button",61),f("click",function(){C(t);let o=m();return _(o.showPlayerConfirmActiveModal=!1)}),e(6,"Cancel"),a(),e(7,` 621 `),k(),e(8,` 622 `),R(9,62),e(10,` 623 `),r(11,"button",63),f("click",function(){C(t);let o=m();return _(o.markClubContactAsActive())}),e(12,"Save"),a(),e(13,` 624 `),k(),e(14,` 625 `),a(),e(15,` 626 `)}}function zo(i,s){if(i&1){let t=v();e(0,` 627 `),r(1,"app-dialog-footer"),e(2,` 628 `),R(3,60),e(4,` 629 `),r(5,"button",61),f("click",function(){C(t);let o=m();
629return _(o.showConvertParentModal=!1)}),e(6,"Cancel"),a(),e(7,` 630 `),k(),e(8,` 631 `),R(9,62),e(10,` 632 `),r(11,"button",63),f("click",function(){C(t);let o=m();return _(o.convertParent())}),e(12,"Save"),a(),e(13,` 633 `),k(),e(14,` 634 `),a(),e(15,` 635 `)}}var Ii=(()=>{let s=class s{constructor(n,o,l,x,w,S){this.userService=n,this.siteDataService=o,this.formService=l,this.route=x,this.authorizeService=w,this.router=S,this.unsubscribe$=new L,this.interestAreasChanged=!1,this.AriaLabels=K,this.showParentConfirmInactiveModal=!1,this.showPlayerConfirmInactiveModal=!1,this.singleActiveParentFlag=!1,this.showParentConfirmActiveModal=!1,this.showPlayerConfirmActiveModal=!1,this.showConvertParentModal=!1,this.noteDialogOpen=!1,this.saving=!1,this.saveButtonClicked=!1,this.loading=!1,this.totalRecords=0,this.totalActivityRecords=0,this.activityDialogOpen=!1,this.ClubContactStatus=ce,this.columns=[{field:"notes",header:"Notes"},{field:"savedOn",header:"Saved Date"},{field:"savedByName",header:"Saved By"}],this.activityColumns=[{field:"activityCategory",header:"Activity Category"},{field:"notes",header:"Notes"},{field:"savedOn",header:"Saved Date"},{field:"savedByName",header:"Saved By"}],this.clubContactMenuItems={}}ngOnInit(){this.siteDataService.hideSiteLoader(),this.clubContactFamilyID=+this.route.snapshot.params.id,(!this.userService.clubContactsNotesFilters||!this.userService.clubContactsNotesFilters.page)&&(this.userService.clubContactsNotesFilters=new Ye,this.userService.clubContactsNotesFilters.page=1),(!this.userService.clubContactsFilters||!this.userService.clubContactsFilters.page)&&(this.userService.clubContactsFilters=new Ie,this.userService.clubContactsFilters.page=1),z([this.userService.getClubContactsNoteMetadata(),this.userService.getClubContactActivityMetadata(),this.userService.getFamilyClubContactMetadata(),this.userService.getClubContactFamily(this.clubContactFamilyID)]).subscribe(n=>{this.fields=n[0].fields,this.activityFields=n[1].fields,this.familyFields=n[2].fields,this.interestAreaTypes=this.familyFields.find(o=>o.name==="clubContactInterestAreasDD").options,this.clubContactFamily=n[3],this.siteDataService.hideSiteLoader(),this.createActionMenu(),this.createClubContactMenu(),this.search(null),this.searchActivities(null),this.searchEmails()})}emailEnabled(){return this.clubContactFamily.parents.some(n=>n.clubContactStatus!==ce.INACTIVE)}createActionMenu(){this.actionMenuItems=[],this.actionMenuItems.push({label:"Add Player",routerLink:["./add-player"]}),this.actionMenuItems.push({label:"Add Parent",routerLink:["./add-parent"]})}createClubContactMenu(){this.clubContactMenuItems={},this.clubContactFamily.parents.forEach(n=>{this.clubContactMenuItems[n.clubContactID]=[],n.clubUserID&&this.clubContactMenuItems[n.clubContactID].push({label:"Go to Club User Profile",routerLink:["/admin/users",n.clubUserID,"profile"]}),this.clubContactFamily.players.length<1&&this.clubContactMenuItems[n.clubContactID].push({label:"Convert Club Contact",command:()=>
635{this.showConvertParentModal=!0,this.selectedClubContactID=n.clubContactID}}),n.clubContactStatus!==ce.INACTIVE?this.clubContactMenuItems[n.clubContactID].push({label:"Mark Club Contact as Inactive",command:()=>{this.singleActiveParentFlag=this.clubContactFamily.parents.filter(o=>o.clubContactStatus!==ce.INACTIVE).length<2,this.showParentConfirmInactiveModal=!0,this.selectedClubContactID=n.clubContactID}}):this.clubContactMenuItems[n.clubContactID].push({label:"Mark Club Contact as Active",command:()=>{this.showParentConfirmActiveModal=!0,this.selectedClubContactID=n.clubContactID}})}),this.clubContactFamily.players.forEach(n=>{this.clubContactMenuItems[n.clubContactID]=[],n.playerID?this.clubContactMenuItems[n.clubContactID].push({label:"Go to Player Profile",routerLink:["/admin/players",n.playerID,"overview"]}):this.clubContactMenuItems[n.clubContactID].push({label:"Convert Club Contact to Player",routerLink:[`./${n.clubContactID}/convert-player`]}),n.clubContactStatus!==ce.INACTIVE?this.clubContactMenuItems[n.clubContactID].push({label:"Mark Player as Inactive",command:()=>{this.showPlayerConfirmInactiveModal=!0,this.selectedClubContactID=n.clubContactID}}):this.clubContactMenuItems[n.clubContactID].push({label:"Mark Player as Active",command:()=>{this.showPlayerConfirmActiveModal=!0,this.selectedClubContactID=n.clubContactID}})})}markParentAsInactive(){let n;this.singleActiveParentFlag?n=this.userService.markClubContactFamilyAsInactive(this.clubContactFamily):n=this.userService.markClubContactAsInactive(this.selectedClubContactID),n.pipe(ve(()=>this.userService.getClubContactFamily(this.clubContactFamilyID)),D(this.unsubscribe$)).subscribe({next:o=>{this.clubContactFamily=o,this.siteDataService.showSiteSuccessAlert("Club Contact updated successfully"),this.formService.hideFormLoader(),this.showParentConfirmInactiveModal=!1,this.showPlayerConfirmInactiveModal=!1,this.createClubContactMenu()},error:()=>{this.formService.hideFormLoader(),this.siteDataService.showSiteErrorAlert("There was a problem saving")}})}convertParent(){this.userService.convertParentClubContact(this.selectedClubContactID,new vt).pipe(ve(()=>this.userService.getClubContactFamily(this.clubContactFamilyID)),D(this.unsubscribe$)).subscribe({next:n=>{this.clubContactFamily=n,this.siteDataService.showSiteSuccessAlert("Club Contact updated successfully"),this.formService.hideFormLoader(),this.showConvertParentMod
635al=!1,this.createClubContactMenu()},error:()=>{this.formService.hideFormLoader(),this.siteDataService.showSiteErrorAlert("There was a problem saving")}})}markClubContactAsInactive(){this.userService.markClubContactAsInactive(this.selectedClubContactID).pipe(ve(()=>this.userService.getClubContactFamily(this.clubContactFamilyID)),D(this.unsubscribe$)).subscribe({next:n=>{this.clubContactFamily=n,this.siteDataService.showSiteSuccessAlert("Club Contact updated successfully"),this.formService.hideFormLoader(),this.showParentConfirmInactiveModal=!1,this.showPlayerConfirmInactiveModal=!1,this.createClubContactMenu()},error:()=>{this.formService.hideFormLoader(),this.siteDataService.showSiteErrorAlert("There was a problem saving")}})}markClubContactAsActive(){this.userService.markClubContactAsActive(this.selectedClubContactID).pipe(ve(()=>this.userService.getClubContactFamily(this.clubContactFamilyID)),D(this.unsubscribe$)).subscribe({next:n=>{this.clubContactFamily=n,this.siteDataService.showSiteSuccessAlert("Club Contact updated successfully"),this.formService.hideFormLoader(),this.showPlayerConfirmActiveModal=!1,this.showParentConfirmActiveModal=!1,this.createClubContactMenu()},error:()=>{this.formService.hideFormLoader(),this.siteDataService.showSiteErrorAlert("There was a problem saving")}})}openNoteDialog(n){this.clubUserNote=new Ee,this.noteID=void 0,n?(this.noteID=n,this.userService.getClubContactsNote(this.clubContactFamilyID,this.noteID).subscribe(o=>{o&&(this.clubUserNote=o)}),this.noteDialogOpen=!0):this.noteDialogOpen=!0}openSendEmail(){this.router.navigate(["./email"],{relativeTo:this.route})}saveNote(n,o){this.userService.saveClubContactsNote(this.clubContactFamilyID,this.noteID,n).pipe(D(this.unsubscribe$)).subscribe({next:()=>{this.search(null),this.siteDataService.showSiteSuccessAlert("Note saved successfully"),this.formService.hideFormLoader(),o?(this.noteID=void 0,this.clubUserNote=new Ee):this.noteDialogOpen=!1},error:()=>{this.formService.hideFormLoader(),this.siteDataService.showSiteErrorAlert("There was a problem saving this note")}})}saveInterestAreas(){this.interestAreasChanged&&(this.userService.saveInterestAreas(this.clubContactFamilyID,this.clubContactFamily.clubContactInterestAreasDD.map(n=>n.value)).pipe(D(this.unsubscribe$)).subscribe({next:()=>{this.siteDataService.showSiteSuccessAlert("Interest areas saved successfully"),this.formService.hideFormLoader()},error:()=>{this.formService.hideFormLoader(),this.siteDataService.showSiteErrorAlert("There was a problem saving these interest areas")}}),this.interestAreasChanged=!1)}search(n){let o=this.userService.clubContactsNotesFilters;n&&n.sortField&&(o.orderBy=n.sortField+" "+(n.sortOrder===1?"ASC":"DESC"),o.page=n.first/o.rows+1),o.getTotalCount=this.totalRecords===0,this.loading=!0,this.userService.getClubContactsNotesData(this.clubContactFamilyID).subscribe({next:l=>{this.notes=l.results,o.getTotalCount&&(this.totalRecords=l.count),this.loading=!1,this.siteDataService.hideSiteLoader()},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem getting data.")}})}updateClubContactLeadRating(n){this.userService.saveClubContactLeadRating(this.clubContactFamilyID,{clubContactLeadRatingID:n}).pipe(D(this.unsubscribe$)).subscribe({next:()=>{this.siteDataService.showSiteSuccessAlert("Club Contact updated successfully."),this.clubContactFamily.clubContactLeadRatingID=n,this.formService.hideFormLoader()},error:()=>{this.formService.hideFormLoader(),this.siteDataService.showSiteErrorAlert("There was a problem updating this clubContact.")}})}openActivityDialog(n){this.clubContactActivity=new ot,this.activityID=void 0,n?(this.formService.showFormLoader(),this.activityID=n,this.userService.getClubContactActivity(this.clubContactFamilyID,this.activityID).subscribe(o=>{o&&(this.clubContactActivity=o),this.activityDialogOpen=!0,this.formService.hideFormLoader()},()=>{this.formService.hideFormLoader(),this.siteDataService.showSiteErrorAlert("There was a problem getting data.")})):this.activityDialogOpen=!0}saveActivity(n,o){this.userService.saveClubContactActivity(this.clubContactFamilyID,this.activityID,n).pipe(D(this.unsubscribe$)).subscribe(()=>{this.searchActivities(null),this.siteDataService.showSiteSuccessAlert("Note saved successfully"),this.formService.hideFormLoader(),o?(this.activityID=void 0,this.clubContactActivity=new ot):this.activityDialogOpen=!1},()=>{this.formService.hideFormLoader(),this.siteDataService.showSiteErrorAlert("There was a problem saving this note")})}searchActivities(n){let o=this.userService.clubContactsNotesFilters;n&&n.sortField&&(o.orderBy=n.sortField+" "+(n.sortOrder===1?"ASC":"DESC"),o.page=n.first/o.rows+1),o.getTotalCount=this.totalRecords===0,this.loading=!0,this.userService.getClubContactActivityData(this.clubContactFamilyID).subscribe(l=>{this.activities=l.results,o.getTotalCount&&(this.totalRecords=l.count),this.loading=!1,this.siteDataService.hide
635SiteLoader()},()=>{this.siteDataService.showSiteErrorAlert("There was a problem getting data.")})}searchEmails(){this.loading=!0,this.userService.getClubContactEmails(this.clubContactFamilyID).subscribe({next:n=>{this.emails=n.results,this.loading=!1,this.siteDataService.hideSiteLoader()},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem getting data.")}})}cancel(){this.noteDialogOpen=!1,this.activityDialogOpen=!1}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};s.\u0275fac=function(o){return new(o||s)(b(P),b(F),b(ee),b(V),b(Be),b(X))},s.\u0275cmp=y({type:s,selectors:[["ng-component"]],standalone:!1,decls:77,vars:45,consts:[["skeleton",""],["ua",""],["menu",""],["role","main"],["parentLinkUrl","/admin/users/club-contacts","parentLinkText","Club Contacts",3,"pageTitle","showBackButton"],[1,"row","mb-3"],[1,"col-md-7","pl-0"],[1,"p-3"],[1,"col-md-5"],["header","Add Note","styleClass","standardWidthDialog",3,"visibleChange","visible","showHeader","closable","modal","draggable"],["header","Add Activity","styleClass","standardWidthDialog",3,"visibleChange","visible","showHeader","closable","modal","draggable"],["header","Confirm","styleClass","standardWidthDialog",3,"visibleChange","visible","showHeader","closable","modal","draggable"],[1,"mb-4"],["pTemplate","footer"],[1,"col-12","col-xl"],[1,"col-12","col-xl-auto"],[1,"row","no-gutters","full-width","justify-content-between","align-items-end"],[1,"col-auto"],[1,"fw-100","text-grey","text-uppercase"],[1,"text-jumbo"],[3,"updateRating","rating","editable","circleStars"],[1,"col-auto","ml-4"],[1,"btn","btn-secondary","mr-3",3,"routerLink"],[1,"fal","fa-pencil"],["buttonText","Add Club Contact",3,"menuItems"],[1,"col"],[1,"row"],[1,"fw-100","text-grey-lt","text-uppercase"],["appendTo","body",3,"popup","model"],[1,"btn","btn-sm","btn-icon-fal-cog","btn-naked","text-grey","px-0",3,"click"],[1,"fw-600","text-largest","line-height-xl","text-navy"],[1,"text-small","text-grey"],["size","large",3,"firstName","lastName","id"],["size","large",3,"iconClass","id"],[1,"mx-1"],[1,"fal","fa-at"],[1,"mb-5"],[1,"mb-2"],[1,"btn","btn-naked","pl-1",3,"click"],[1,"border-left-lg","border-all","p-2","mb-2"],[1,"fw-800"],["href","javascript:void(0);",1,"btn","btn-sm","btn-naked",3,"click"],["aria-hidden","true",1,"fa","fa-pencil"],[3,"ngClass"],[1,"bg-gray","px-3","py-2"],[1,"px-3"],[1,"row","bg-grey-lt","p-2","mb-2"],[1,"text-small"],[1,"btn","btn-sm","btn-naked",3,"click"],[1,"bg-gray"],[1,"mb-5","bg-grey-lt","p-3"],[1,"border-bottom","mb-3"],[1,"d-flex","align-items-center","mb-3"],[1,"text-green","mr-2","text-small"],["optionLabel","label","placeholder","No interest areas selected","appendTo","body",3,"ngModelChange","onChange","onPanelHide","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],[1,"mb-5","px-3"],["skeletonType","form"],[3,"onCancel","onSubmit","onSaveAndAdd","fields","entity","horizontalForm","contentFieldsMode","showSaveAndAddButton","buttonsPosition","modalContent"],["fieldName","notes"],["fieldName","clubContactActivityCategoryID"],["slot","secondary"],[1,"btn",3,"click"],["slot","primary"],[1,"btn","btn-primary",3,"click"]],template:function(o,l){if(o&1){let x=v();r(0,"main",3),e(1,` 636 `),r(2,"app-admin-header",4),e(3,` 637 `),a(),e(4,` 638 639 `),u(5,yo,44,8),r(6,"div",5),e(7,` 640 `),r(8,"div",6),e(9,` 641 `),r(10,"div",7),e(11,` 642 `),u(12,Do,16,1),u(13,Ao,16,1),a(),e(14,` 643 `),a(),e(15,` 644 `),r(16,"div",8),e(17,` 645 `),u(18,Ro,12,2),u(19,No,14,2),a(),e(20,` 646`),a(),e(21,` 647 648`),E(22,Lo,3,0,"ng-template",null,0,Ne),e(24,` 649 650`),a(),e(25,` 651 652`),r(26,"p-dialog",9),N("visibleChange",function(S){return C(x),U(l.noteDialogOpen,S)||(l.noteDialogOpen=S),_(S)}),e(27,` 653 `),u(28,Oo,6,7),a(),e(29,` 654 655`),r(30,"p-dialog",10),N("visibleChange",function(S){return C(x),U(l.activityDialogOpen,S)||(l.activityDialogOpen=S),_(S)}),e(31,` 656 `),u(32,Bo,8,7),a(),e(33,` 657 658`),r(34,"p-dialog",11),N("visibleChange",function(S){return C(x),U(l.showParentConfirmInactiveModal,S)||(l.showParentConfirmInactiveModal=S),_(S)}),e(35,` 659 `),r(36,"p",12),e(37,"You are about to mark this parent as inactive. They will be removed from all club communication."),a(),e(38,` 660 `),u(39,qo,4,0),r(40,"p"),e(41,"Click Save to mark them as inactive. Click Cancel to go back."),a(),e(42,` 661 662 `),E(43,$o,16,0,"ng-template",13),e(44,` 663`),a(),e(45,` 664 665`),r(46,"p-dialog",11),N("visibleChange",function(S){return C(x),U(l.showPlayerConfirmInactiveModal,S)||(l.showPlayerConfirmInactiveModal=S),_(S)}),e(47,` 666 `),r(48,"p",12),e(49,`You are about to mark this player as inactive. They will be removed from all club communication. 667 Click Save to mark them as inactive. Click Cancel to go back.`),a(),e(50,` 668 669 `),E(51,jo,16,0,"ng-template",13),e(52,` 670`),a(),e(53,` 671 672`),r(54,"p-dialog",11),N("visibleChange",function(S){return C(x),U(l.showParentConfirmActiveModal,S)||(l.showParentConfirmActiveModal=S),_(S)}),e(55,` 673 `),r(56,"p",12),e(57,`You are about to mark this parent as active. Click Save to mark them as active. Click Cancel to go 674 back.`),a(),e(58,` 675 `),E(59,Ho,16,0,"ng-template",13),e(60,` 676`),a(),e(61,` 677 678`),r(62,"p-dialog",11),N("visibleChange",function(S){return C(x),U(l.showPlayerConfirmActiveModal,S)||(l.showPlayerConfirmActiveModal=S),_(S)}),e(63,` 679 `),r(64,"p",12),e(65,`You are about to mark this player as active. Click Save to mark them as active. Click Cancel to go 680 back.`),a(),e(66,` 681 `),E(67,Wo,16,0,"ng-template",13),e(68,` 682`),a(),e(69,` 683 684`),r(70,"p-dialog",11),N("visibleChange",function(S){return C(x),U(l.showConvertParentMod
684al,S)||(l.showConvertParentModal=S),_(S)}),e(71,` 685 `),r(72,"p",12),e(73,`You are about to mark this parent as converted. Click Save to mark them as converted. Click Cancel 686 to 687 go back.`),a(),e(74,` 688 `),E(75,zo,16,0,"ng-template",13),e(76,` 689`),a()}o&2&&(c(2),d("pageTitle","Contact")("showBackButton",!0),c(3),p(l.clubContactFamily?5:-1),c(7),p(l.activities?12:-1),c(),p(l.notes?13:-1),c(5),p(l.interestAreaTypes?18:-1),c(),p(l.emails?19:-1),c(7),M("visible",l.noteDialogOpen),d("showHeader",!0)("closable",!0)("modal",!0)("draggable",!1),c(2),p(l.fields?28:-1),c(2),M("visible",l.activityDialogOpen),d("showHeader",!0)("closable",!0)("modal",!0)("draggable",!1),c(2),p(l.fields?32:-1),c(2),M("visible",l.showParentConfirmInactiveModal),d("showHeader",!0)("closable",!0)("modal",!0)("draggable",!1),c(5),p(l.singleActiveParentFlag?39:-1),c(7),M("visible",l.showPlayerConfirmInactiveModal),d("showHeader",!0)("closable",!0)("modal",!0)("draggable",!1),c(8),M("visible",l.showParentConfirmActiveModal),d("showHeader",!0)("closable",!0)("modal",!0)("draggable",!1),c(8),M("visible",l.showPlayerConfirmActiveModal),d("showHeader",!0)("closable",!0)("modal",!0)("draggable",!1),c(8),M("visible",l.showConvertParentMod
689al),d("showHeader",!0)("closable",!0)("modal",!0)("draggable",!1))},dependencies:[Le,j,se,ge,ye,ae,re,Qe,Ut,H,Ge,Lt,ze,$e,We,qe,ue,he],styles:[".line-height-xl[_ngcontent-%COMP%]{line-height:1.8rem}.border-left-lg[_ngcontent-%COMP%]{border-color:var(--green-25);border-left-color:var(--border-green);border-right-width:2px;border-top-width:2px;border-bottom-width:2px}"]});let i=s;return i})();var Qo=["fileUploadField"];function Go(i,s){if(i&1){let t=v();e(0,` 690 `),r(1,"app-dynamic-form",7),f("onCancel",function(){C(t);let o=m(2);return _(o.cancel())})("onSubmit",function(o){C(t);let l=m(2);return _(l.import(o))}),e(2,` 691 `),r(3,"app-dynamic-form-field",8,0),f("onChange",function(o){C(t);let l=m(2);return _(l.file=o?o.target.files[0]:void 0)}),e(5,` 692 `),a(),e(6,` 693 `),a(),e(7,` 694 `)}if(i&2){let t=m(2);c(),d("fields",t.importFields)("entity",t.importEntity)("horizontalForm",!0)("contentFieldsMode",!0),c(2),d("acceptType",t.acceptedTypes)("acceptedFileExtensions",t.acceptedFileExtensions)}}function Yo(i,s){if(i&1&&(e(0,` 695 `),r(1,"section",3),e(2,` 696 `),r(3,"h2",4),e(4,"Import Club Contacts"),a(),e(5,` 697 `),r(6,"h3",5),e(7,`Add Club Contacts using the 698 `),r(8,"a",6),e(9,` 699 Club Contact Upload Template 700 `),a(),e(10,` 701 `),a(),e(11,` 702 `),u(12,Go,8,6),a(),e(13,` 703 `)),i&2){let t=m();c(12),p(!t.loading&&t.importFields?12:-1)}}function Jo(i,s){i&1&&(e(0,` 704 `),h(1,"app-skeleton-template",9),e(2,` 705 `)),i&2&&(c(),d("wrapInCard",!0))}function Ko(i,s){if(i&1){let t=v();e(0,` 706 `),r(1,"section",3),e(2,` 707 `),r(3,"h2",4),e(4," Export Club Contacts "),a(),e(5,` 708 `),r(6,"h3",5),e(7,"Export to download the existing club contacts"),a(),e(8,` 709 `),r(9,"div",10),e(10,` 710 `),r(11,"button",11),f("click",function(){C(t);let o=m();return _(o.export())}),e(12,"Export"),a(),e(13,` 711 `),r(14,"button",12),f("click",function(){C(t);let o=m();return _(o.cancel())}),e(15,"Cancel"),a(),e(16,` 712 `),a(),e(17,` 713 `),a(),e(18,` 714 `)}}function Zo(i,s){i&1&&(e(0,` 715 `),h(1,"app-skeleton-template",9),e(2,` 716 `)),i&2&&(c(),d("wrapInCard",!0))}var Ai=(()=>{let s=class s{constructor(n,o,l,x,w){this.siteDataService=n,this.router=o,this.route=l,this.formService=x,this.userService=w,this.loading=!0,this.unsubscribe$=new L,this.acceptedFileExtensions=wt,this.acceptedTypes=Et}ngOnInit(){this.userService.getClubContactImportMetaData().subscribe(n=>{this.importFields=n.fields,this.loading=!1,this.siteDataService.hideSiteLoader()})}import(n){this.fileUploadField.hasFileChanged&&this.file?this.userService.importClubContacts(this.file).subscribe({next:o=>{o&&o.length>0?this.siteDataService.showSiteErrorAlert("Completed With errors: "+JSON.stringify(o)):this.siteDataService.showSiteSuccessAlert("Import Complete"),this.fileUploadField.hasFileChanged=!1,this.formService.hideFormLoader()},error:o=>{console.log(o),this.fileUploadField.hasFileChanged=!1,this.formService.hideFormLoader(),this.siteDataService.showSiteErrorAlert("There was a problem saving.")}}):(this.formService.hideFormLoader(),this.siteDataService.showSiteErrorAlert("Please select a file and try again."))}export(){this.userService.exportClubContacts().subscribe(n=>{Oe(n),this.formService.hideFormLoader()})}cancel(){this.router.navigate([".."],{relativeTo:this.route})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};s.\u0275fac=function(o){return new(o||s)(b(F),b(X),b(V),b(ee),b(P))},s.\u0275cmp=y({type:s,selectors:[["ng-component"]],viewQuery:function(o,l){if(o&1&&Q(Qo,5),o&2){let x;G(x=Y())&&(l.fileUploadField=x.first)}},standalone:!1,decls:9,vars:3,consts:[["fileUploadField",""],["role","main"],["pageTitle","Import","parentLinkUrl","../","parentLinkText","Club Contacts",3,"showBackButton"],[1,"card"],[1,"card-heading"],[1,"card-subheading","mb-4"],["href","https://ssprodst.blob.core.windows.net/import-templates/Club Contact Import Template.xlsx","target","_blank","rel","noopener noreferrer"],["buttonsPosition","left","submitButtonSavingText","Importing","submitButtonText","Import",3,"onCancel","onSubmit","fields","entity","horizontalForm","contentFieldsMode"],["fieldName","clubContactImportFile",3,"onChange","acceptType","acceptedFileExtensions"],["skeletonType","form",3,"wrapInCard"],[1,"form-action"],[1,"btn","btn-lg","btn-primary",3,"click"],[1,"btn","btn-lg","btn-naked",3,"click"]],template:function(o,l){o&1&&(r(0,"main",1),e(1,` 717 `),r(2,"app-admin-header",2),e(3,` 718 `),a(),e(4,` 719 `),u(5,Yo,14,1)(6,Jo,3,1),u(7,Ko,19,0)(8,Zo,3,1),a()),o&2&&(c(2),d("showBackButton",!0),c(3),p(l.loading?6:5),c(2),p(l.loading?8:7))},dependencies:[j,se,Qe,H],encapsulation:2});let i=s;return i})();var Xo=["optionsMenu"],ea=()=>({width:"auto"}),Vi=i=>({roles:i}),ta=(i,s,t)=>[i,s,t],ia=i=>[i];function na(i,s){i&1&&(R(0),e(1,` 720 `),k())}function oa(i,s){if(i&1&&(e(0,` 721 `),r(1,"div"),e(2,` 722 `),E(3,na,2,0,"ng-container",20),e(4,` 723 `),a(),e(5,` 724 `)),i&2){let t=m(2),n=Se(5);c(3),d("ngTemplateOutlet",n)("ngTemplateOutletContext",J(2,Vi,t.volunteerStatuses.clubSummary.completedRoles))}}function aa(i,s){if(i&1){let t=v();e(0,` 725 `),r(1,"section",15),e(2,` 726 `),h(3,"app-volunteer-tracking",16),e(4,` 727 `),r(5,"h4",17),e(6,"Completed Tasks"),a(),e(7,` 728 `),u(8,oa,6,4),r(9,"div",18),e(10,` 729 `),r(11,"a",19),f("click",function(){C(t);let o=m();return _(o.addCustomClubVolunteerRole())}),e(12,"+ Adjust Volunteer Points"),a(),e(13,` 730 `),a(),e(14,` 731 `),a(),e(15,` 732`)}if(i&2){let t=m();c(3),d("volunteerTitle","Household Volunteer Status")("requiredPoints",t.volunteerStatuses.clubSummary.requiredHours)("requiredPointsNote",t.volunteerStatuses.clubSummary.requiredHoursNote)("scheduledPoints",t.getClubScheduledPoints(t.volunteerStatuses.clubSummary))("pointsEarned",t.volunteerStatuses.clubSummary.completedVolunteering)("showBreakdown",!1)("volunteerSummary",t.volunteerStatuses.clubSummary),c(5
732),p(t.volunteerStatuses.clubSummary.completedRoles!=null&&t.volunteerStatuses.clubSummary.completedRoles.length?8:-1)}}function ra(i,s){i&1&&(R(0),e(1,` 733 `),k())}function la(i,s){if(i&1&&(e(0,` 734 `),r(1,"div"),e(2,` 735 `),E(3,ra,2,0,"ng-container",20),e(4,` 736 `),a(),e(5,` 737 `)),i&2){let t=m().$implicit;m(2);let n=Se(5);c(3),d("ngTemplateOutlet",n)("ngTemplateOutletContext",J(2,Vi,t.completedRoles))}}function sa(i,s){if(i&1){let t=v();e(0,` 738 `),r(1,"section",15),e(2,` 739 `),h(3,"app-volunteer-tracking",21),e(4,` 740 `),r(5,"h4",17),e(6,"Completed Tasks"),a(),e(7,` 741 `),u(8,la,6,4),r(9,"div",22),e(10,` 742 `),r(11,"a",19),f("click",function(){let o=C(t).$implicit,l=m(2);return _(l.addCustomPlayerVolunteerRole(o.playerID,o.programID,o.teamID))}),e(12,`+ 743 Adjust Volunteer Points`),a(),e(13,` 744 `),a(),e(14,` 745 `),a(),e(15,` 746 `)}if(i&2){let t=s.$implicit,n=m(2);c(3),d("volunteerTitle",t.programName+" "+t.teamName)("volunteerName",t.firstName+" "+t.lastName)("requiredPoints",t.requiredHours)("scheduledPoints",n.getTeamScheduledPoints(t))("pointsEarned",t.completedVolunteering),c(5),p(t.completedRoles!=null&&t.completedRoles.length?8:-1)}}function ca(i,s){if(i&1&&(e(0,` 747 `),B(1,sa,16,6,null,null,O)),i&2){let t=m();c(),q(t.volunteerStatuses==null?null:t.volunteerStatuses.programTeamSummaries)}}function ma(i,s){if(i&1&&(e(0,` 748 `),h(1,"p-sortIcon",26),e(2,` 749 `)),i&2){let t=m().$implicit;c(),d("field",t.field)}}function da(i,s){if(i&1&&(e(0,` 750 `),r(1,"th",25),e(2),u(3,ma,3,1),a(),e(4,` 751 `)),i&2){let t=s.$implicit,n=m(3);c(),d("pSortableColumn",t.field),oe("aria-label",n.AriaLabels.ACTIVATE_SORT),c(),T(` 752 `,t.header,` 753 `),c(),p(t.field?3:-1)}}function ua(i,s){if(i&1&&(e(0,` 754 `),r(1,"tr"),e(2,` 755 `),B(3,da,5,4,null,null,O),h(5,"th"),e(6,` 756 `),a(),e(7,` 757 `)),i&2){let t=m(2);c(3),q(t.columns)}}function pa(i,s){if(i&1){let t=v();e(0,` 758 `),r(1,"button",27),f("click",function(o){C(t);let l=m().$implicit,x=m(2);return _(x.toggleOptionsMenu(l,o))}),e(2,` 759 `),h(3,"i",28),e(4,` 760 `),r(5,"div",29),e(6,"Options"),a(),e(7,` 761 `),a(),e(8,` 762 `)}}function Ca(i,s){if(i&1&&(e(0,` 763 `),r(1,"tr"),e(2,` 764 `),r(3,"td"),e(4),a(),e(5,` 765 `),r(6,"td"),e(7),a(),e(8,` 766 `),r(9,"td"),e(10),a(),e(11,` 767 `),r(12,"td"),e(13),a(),e(14,` 768 `),r(15,"td"),e(16),a(),e(17,` 769 `),r(18,"td"),e(19),a(),e(20,` 770 `),r(21,"td"),e(22),a(),e(23,` 771 `),r(24,"td"),e(25),I(26,"utcDate"),a(),e(27,` 772 `),r(28,"td"),e(29,` 773 `),u(30,pa,9,0),a(),e(31,` 774 `),a(),e(32,` 775 `)),i&2){let t=s.$implicit,n=m(2);c(4),g(t.programName),c(3),g(t.registrationName),c(3),g(t.roleName),c(3),g(t.optionName),c(3),g(t.optionValue),c(3),g(t.playerName),c(3),g(t.volunteerRequestStatus),c(3),g($(26,9,t.savedOn,"MM/dd/y")),c(5),p(pt(12,ta,n.VolunteerRequestStatus.REQUESTED,n.VolunteerRequestStatus.PENDING_VERIFICATION,n.VolunteerRequestStatus.VERIFIED).includes(t.volunteerRequestStatusID)?30:-1)}}function _a(i,s){i&1&&(e(0,` 776 `),r(1,"tr"),e(2,` 777 `),r(3,"td",30),e(4,` 778 This user does not have any requests. 779 `),a(),e(5,` 780 `),a(),e(6,` 781 `))}function ha(i,s){if(i&1&&(e(0,` 782 `),r(1,"section",15),e(2,` 783 `),r(3,"h3"),e(4,"Volunteer Requests"),a(),e(5,` 784 `),r(6,"p-table",23),e(7,` 785 `),E(8,ua,8,0,"ng-template",12),e(9,` 786 `),E(10,Ca,33,16,"ng-template",13),e(11,` 787 `),E(12,_a,7,0,"ng-template",24),e(13,` 788 `),a(),e(14,` 789 `),a(),e(15,` 790`)),i&2){let t=m();c(6),d("value",t.requests)("sortOrder",-1)("columns",t.columns)("loading",t.loading)("tableStyleClass","settings-table")}}function xa(i,s){i&1&&(e(0,` 791 `),r(1,"tr"),e(2,` 792 `),r(3,"th"),e(4,"Task"),a(),e(5,` 793 `),r(6,"th"),e(7,"Description"),a(),e(8,` 794 `),r(9,"th"),e(10,"Points"),a(),e(11,` 795 `),r(12,"th"),e(13,"Event Details"),a(),e(14,` 796 `),r(15,"th"),e(16,"Completed By"),a(),e(17,` 797 `),r(18,"th"),e(19,"Date"),a(),e(20,` 798 `),r(21,"th"),e(22,"Time"),a(),e(23,` 799 `),r(24,"th",32),e(25,` 800 Attendance 801 `),h(26,"i",33),e(27,` 802 `),a(),e(28,` 803 `),r(29,"th"),e(30,"Description"),a(),e(31,` 804 `),r(32,"th"),e(33,"Notes"),a(),e(34,` 805 `),r(35,"th"),e(36,"Type"),a(),e(37,` 806 `),h(38,"th"),e(39,` 807 `),a(),e(40,` 808 `)),i&2&&(c(24),d("pTooltip","When attendance tracking is enabled, you can confirm volunteer attendance with checkboxes. When disabled, volunteers are automatically marked as completed."))}function fa(i,s){if(i&1){let t=v();e(0,` 809 `),r(1,"a",34),f("click",function(){C(t);let o=m().$implicit,l=m(2);return _(l.editRole(o))}),e(2),a(),e(3,` 810 `)}if(i&2){let t=m().$implicit;c(2),g(t.roleName)}}function ba(i,s){if(i&1&&(e(0,` 811 `),r(1,"span"),e(2),a(),e(3,` 812 `)),i&2){let t=m().$implicit;c(2),g(t.roleName)}}function va(i,s){if(i&1){let t=v();e(0,` 813 `),r(1,"a",35),f("click",function(){C(t);let o=m().$implicit,l=m(2);return _(l.eventClicked(o.clubCalendarEventID))}),e(2,"View Event"),a(),e(3,` 814 `)}}function Sa(i,s){i&1&&(e(0,` 815 `),r(1,"span"),e(2,"No Event"),a(),e(3,` 816 `))}function ga(i,s){if(i&1){let t=v();e(0,` 817 `),r(1,"p-checkbox",36),f("ngModelChange",function(){C(t);let o=m().$implicit,l=m(2);return _(l.toggleVolunteerAttendance(o,o.calendarEventVolunteerID))}),e(2,` 818 `),a(),e(3,` 819 `)}if(i&2){let t=m().$implicit;c(),d("ngModel",t.isVerifiedAsCompleted)("binary",!0)("disabled",!t.calendarEventVolunteerID)("pTooltip",t.isVerifiedAsCompleted?"Attendance confirmed":"Mark attendance as confirmed")}}function ya(i,s){if(i&1&&(e(0,` 820 `),r(1,"p-checkbox",37),e(2,` 821 `),a(),e(3,` 822 `)),i&2){let t=m().$implicit;c(),d("ngModel",t.isVerifiedAsCompleted)("binary",!0)("disabled",!0)("pTooltip","Attendance tracking is disabled - volunteers are automatically marked as completed")}}function wa(i,s){if(i&1&&(e(0,` 823 `),h(1,"i",38),e(2,` 824 `)),i&2){let t=m().$implicit;c(),d("pTooltip",t.description)}}function Ea(i,s){if(i&1&&(e(0,` 825 `),h(1,"i",39),e(2,` 826 `)),i&2){let t=m().$implicit;c(),d("pTooltip",t.notes)}}function Da(i,s){i&1&&(e(0,` 827 `),r(1,"span"),e(2,"Custom"),a(),e(3,` 828 `))}function Ta(i,s){i&1&&(e(0,` 829 `),r(1,"span"),e(2,"Event"),a(),e(3,` 830 `))}function Ia(i,s){if(i&1){let t=v();e(0,` 831 `),r(1,"button",27),f("click",function(){C(t);let o=m().$implicit,l=m(2);return _(l.deleteRole(o))}),e(2,` 832 `),h(3,"i",40),e(4,` 833 `),r(5,"div",29),e(6,"Delete"),a(),e(7,` 834 `),a(),e(8,` 835 `)}}function Aa(i,s){if(i&1&&(e(0,` 836 `),r(1,"tr"),e(2,` 837 `),r(3,"td"),e(4,` 838 `),u(5,fa,4,1),u(6,ba,4,1),a(),e(7,` 839 `),r(8,"td"),e(9),a(),e(10,` 840 `),r(11,"td"),e(12),a(),e(13,` 841 `),r(14,"td"),e(15,`
842 `),u(16,va,4,0),u(17,Sa,4,0),a(),e(18,` 843 `),r(19,"td"),e(20),a(),e(21,` 844 `),r(22,"td"),e(23),I(24,"date"),a(),e(25,` 845 `),r(26,"td"),e(27),I(28,"timeOnly"),I(29,"timeOnly"),a(),e(30,` 846 `),r(31,"td"),e(32,` 847 `),u(33,ga,4,4)(34,ya,4,4),a(),e(35,` 848 `),r(36,"td"),e(37,` 849 `),u(38,wa,3,1),a(),e(39,` 850 `),r(40,"td"),e(41,` 851 `),u(42,Ea,3,1),a(),e(43,` 852 `),r(44,"td"),e(45,` 853 `),u(46,Da,4,0),u(47,Ta,4,0),a(),e(48,` 854 `),r(49,"td"),e(50,` 855 `),u(51,Ia,9,0),a(),e(52,` 856 `),a(),e(53,` 857 `)),i&2){let t=s.$implicit,n=m(2);c(5),p(t.customVolunteerID?5:-1),c(),p(t.customVolunteerID?-1:6),c(3),g(t.description),c(3),g(t.points),c(4),p(t.clubCalendarEventID?16:-1),c(),p(t.clubCalendarEventID?-1:17),c(3),g(t.completedBy),c(3),g($(24,16,t.startDate,"MMM d, y")),c(4),me("",Z(28,19,t.startTime)," - ",Z(29,21,t.endTime)),c(6),p(n.shouldShowAttendanceTracking(t)?33:34),c(5),p(t.description?38:-1),c(4),p(t.notes?42:-1),c(4),p(t.customVolunteerID?46:-1),c(),p(t.customVolunteerID?-1:47),c(4),p(t.customVolunteerID?51:-1)}}function Va(i,s){if(i&1&&(e(0,` 858 `),r(1,"p-table",31),e(2,` 859 `),E(3,xa,41,1,"ng-template",12),e(4,` 860 `),E(5,Aa,54,23,"ng-template",13),e(6,` 861 `),a(),e(7,` 862`)),i&2){let t=s.roles;c(),d("value",t)}}function Fa(i,s){if(i&1){let t=v();e(0,` 863 `),r(1,"app-dialog-footer"),e(2,` 864 `),R(3,41),e(4,` 865 `),r(5,"button",42),f("click",function(){C(t);let o=m();return _(o.showAssignDialog=!1)}),e(6,"Cancel"),a(),e(7,` 866 `),k(),e(8,` 867 `),R(9,43),e(10,` 868 `),r(11,"button",44),f("click",function(){C(t);let o=m();return _(o.assignRequest())}),e(12,"Assign"),a(),e(13,` 869 `),k(),e(14,` 870 `),a(),e(15,` 871 `)}if(i&2){let t=m();c(5),d("disabled",t.saving),c(6),d("disabled",t.saving)}}function Pa(i,s){if(i&1){let t=v();e(0,` 872 `),r(1,"app-calendar-event-row",45),f("volunteerChangeEvent",function(){C(t);let o=m();return _(o.volunteerChanged())}),a(),e(2,` 873 `)}if(i&2){let t=m();c(),d("events",J(4,ia,t.eventToView))("showEdit",!0)("clubVolunteerSettings",t.clubVolunteerSettings)("showSomeDetails",!0)}}function Ra(i,s){if(i&1){let t=v();e(0,` 874 `),r(1,"app-dynamic-form",46),f("onSubmit",function(o){C(t);let l=m();return _(l.saveCustomVolunteer(o))})("onCancel",function(){C(t);let o=m();return _(o.closeCustomVolunteerModal())}),e(2,` 875 `),h(3,"app-dynamic-form-field",47),e(4,` 876 `),h(5,"app-dynamic-form-field",48),e(6,` 877 `),h(7,"app-dynamic-form-field",49),e(8,` 878 `),h(9,"app-dynamic-form-field",50),e(10,` 879 `),a(),e(11,` 880 `)}if(i&2){let t=m();c(),d("entity",t.entity)("fields",t.fields)("contentFieldsMode",!0)("showCancelButton",!0)("showSubmitButton",!0)("buttonsPosition","left")("modalContent",!0)}}function ka(i,s){i&1&&(e(0,` 881 `),r(1,"tr"),e(2,` 882 `),r(3,"th"),e(4,"Player"),a(),e(5,` 883 `),r(6,"th"),e(7,"Program"),a(),e(8,` 884 `),r(9,"th"),e(10,"Registration"),a(),e(11,` 885 `),r(12,"th"),e(13,"Date Registered"),a(),e(14,` 886 `),h(15,"th"),e(16,` 887 `),a(),e(17,` 888 `))}function Ma(i,s){if(i&1){let t=v();e(0,` 889 `),r(1,"tr"),e(2,` 890 `),r(3,"td"),e(4),a(),e(5,` 891 `),r(6,"td"),e(7),a(),e(8,` 892 `),r(9,"td"),e(10),a(),e(11,` 893 `),r(12,"td"),e(13),I(14,"date"),a(),e(15,` 894 `),r(16,"td"),e(17,` 895 `),r(18,"button",51),f("click",function(){let o=C(t).$implicit,l=m();return _(l.chooseRegistration(o))}),e(19,"Choose"),a(),e(20,` 896 `),a(),e(21,` 897 `),a(),e(22,` 898 `)}if(i&2){let t=s.$implicit;c(4),me("",t.player.user.firstName," ",t.player.user.lastName),c(3),g(t.registration.program.name),c(3),g(t.registration.name),c(3),g(Z(14,5,t.completedOn))}}function Ua(i,s){if(i&1){let t=v();e(0,` 899 `),r(1,"app-club-donation-options",52),f("donationSelectionChange",function(o){C(t);let l=m();return _(l.selectedOptionValue=o)}),e(2,` 900 `),a(),e(3,` 901 `)}if(i&2){let t=m();c(),d("registrationSectionID",t.RegistrationSectionID.VOLUNTEER_OPPORTUNITIES)("clubVolunteerOptionID",t.selectedRequest.clubDonationOptionID)("showHeader",!1)("showPageTitle",!1)("isModalContent",!0)("addBlank",!1)("selectedDonation",t.preselectedDonation)}}function Na(i,s){if(i&1){let t=v();e(0,` 902 `),r(1,"app-dialog-footer"),e(2,` 903 `),R(3,41),e(4,` 904 `),r(5,"button",42),f("click",function(){C(t);let o=m();return _(o.showChangeRoleDialog=!1)}),e(6,"Cancel"),a(),e(7,` 905 `),k(),e(8,` 906 `),R(9,43),e(10,` 907 `),r(11,"button",44),f("click",function(){C(t);let o=m();return _(o.saveChangeRole())}),e(12,"Save"),a(),e(13,` 908 `),k(),e(14,` 909 `),a(),e(15,` 910 `)}if(i&2){let t=m();c(5),d("disabled",t.changeRoleSaving),c(6),d("disabled",t.changeRoleSaving||!(!(t.selectedOptionValue==null||t.selectedOptionValue.userClubDonationOptions==null)&&t.selectedOptionValue.userClubDonationOptions.length))}}var dt=(()=>{let s=class s{constructor(n,o,l,x,w){this.userService=n,this.clubCalendarService=o,this.siteDataService=l,this.volunteerService=x,this.route=w,this.unsubscribe$=new L,this.showAssociateModal=!1,this.AriaLabels=K,this.VolunteerRequestStatus=Te,this.totalRecords=0,this.loading=!0,this.showAssignDialog=!1,this.saving=!1,this.showRequests=!1,this.enableVolunteerTasks=!1,this.showDetail
910sDialog=!1,this.showEditDialog=!1,this.showChangeRoleDialog=!1,this.changeRoleSaving=!1,this.RegistrationSectionID=Pt,this.options=[],this.columns=[{field:"programName",header:"Program"},{field:"registrationName",header:"Registration"},{field:"roleName",header:"Requested Role"},{field:"optionName",header:"Volunteer Option Name"},{field:"optionValue",header:"Volunteer Option Value"},{field:"playerName",header:"Player"},{field:"volunteerRequestStatus",header:"Status"},{field:"savedOn",header:"Saved Date"}]}ngOnInit(){this.userID=+this.route.snapshot.parent.params.id,this.siteDataService.getClubOptions([le.ENABLE_VOLUNTEER_MANAGEMENT,le.ENABLE_VOLUNTEER_TASKS]).pipe(ve(n=>(n&&n.find(o=>o.optionID===le.ENABLE_VOLUNTEER_MANAGEMENT)?.boolValue&&(this.showRequests=!0),this.enableVolunteerTasks=n?.find(o=>o.optionID===le.ENABLE_VOLUNTEER_TASKS)?.boolValue??!1,z({requests:this.showRequests?this.userService.getVolunteerRequests(this.userID):et(void 0),parents:this.userService.getParents(this.userID),volunteerStatus:this.enableVolunteerTasks?this.volunteerService.getClubUserVolunteeringStatus(this.userID):et(void 0),metaData:this.volunteerService.getCustomVolunteerMetaData(),clubVolunteerSettings:this.clubCalendarService.getAllClubVolunteerSettings()}))),D(this.unsubscribe$)).subscribe({next:n=>{this.volunteerStatuses=n.volunteerStatus,this.requests=n.requests,this.parents=n.parents.filter(o=>o.clubUserID!==this.userID),this.fields=n.metaData.fields,this.clubVolunteerSettings=n.clubVolunteerSettings,this.loading=!1,this.siteDataService.hideSiteLoader(),this.requests?.some(o=>!o.playerName)&&this.userService.getPlayerRegistrationsForUser(this.userID).subscribe({next:o=>{this.playerRegistrations=o.filter(l=>l.completed&&!l.isCancelled)}})},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem getting data.")}})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}refresh(){this.volunteerService.getClubUserVolunteeringStatus(this.userID).subscribe({next:n=>{this.volunteerStatuses=n,this.loading=!1},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem getting data.")}})}volunteerChanged(){this.refresh()}getClubScheduledPoints(n){if(n.completedRoles&&n.completedRoles.some(o=>!o.isVerifiedAsCompleted))return n.completedRoles.filter(o=>!o.isVerifiedAsCompleted).reduce((o,l)=>o+l.points,0)}getTeamScheduledPoints(n){if(n.completedRoles&&n.completedRoles.some(o=>!o.isVerifiedAsCompleted))return n.completedRoles.filter(o=>!o.isVerifiedAsCompleted).reduce((o,l)=>o+l.points,0)}cancelRequest(){this.userService.deleteVolunteerRequest(this.userID,this.selectedRequest.volunteerRequestID).subscribe({next:()=>{this.requests=this.requests.filter(n=>n.volunteerRequestID!==this.selectedRequest.volunteerRequestID),this.siteDataService.showSiteSuccessAlert("Request was cancelled successfully")},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem cancelling this request.")}})}assignRequest(){this.saving=!0,this.userService.assignVolunteerRequest(this.userID,this.selectedRequest.volunteerRequestID,this.assignToClubUserID).subscribe({next:()=>{this.requests=this.requests.filter(n=>n.volunteerRequestID!==this.selectedRequest.volunteerRequestID),this.siteDataService.showSiteSuccessAlert("Request was assigned successfully"),this.showAssignDialog=!1,this.saving=!1},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem assigning this request."),this.saving=!1}})}
910eventClicked(n){this.showDetailsDialog=!0,this.clubCalendarService.getClubCalendarEventDetails(n).subscribe({next:o=>{this.eventToView=o},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem getting event details. It may have been removed"),this.showDetailsDialog=!1}})}addCustomClubVolunteerRole(){this.entity=new nt,this.entity.points=1,this.entity.volunteerClubUserID=this.userID,this.showEditDialog=!0}addCustomPlayerVolunteerRole(n,o,l){this.entity=new nt,this.entity.points=1,this.entity.volunteerPlayerID=n,this.entity.programID=o,this.entity.teamID=l,this.showEditDialog=!0}editRole(n){console.log("editing: ",n),this.entity=n,this.showEditDialog=!0}closeCustomVolunteerModal(){this.entity=void 0,this.showEditDialog=!1}saveCustomVolunteer(n){console.log("formData: ",n),console.log("entity: ",this.entity);let o=Xe(Xe({},this.entity),n);console.log("saving: ",o),this.volunteerService.createOrUpdateCustomVolunteer(o).subscribe({next:l=>{this.refresh(),this.showEditDialog=!1,this.entity=void 0},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem saving the custom volunteer task.")}})}deleteRole(n){this.loading=!0,this.volunteerService.deleteCustomVolunteer(n.customVolunteerID).subscribe({next:()=>{this.refresh()},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem deleting the custom volunteer task.")}})}toggleOptionsMenu(n,o){this.selectedRequest=n;let l=[];n.volunteerRequestStatusID===Te.REQUESTED?(l.push({label:"Cancel Request",command:()=>{this.cancelRequest()}}),this.parents?.length&&l.push({label:"Assign Request",command:()=>{this.showAssignDialog=!0}}),n.playerName||l.push({label:"Associate with Registration",command:()=>{this.openAssociateModal()}})):(n.volunteerRequestStatusID===Te.PENDING_VERIFICATION||n.volunteerRequestStatusID===Te.VERIFIED)&&l.push({label:"Change Role",command:()=>{this.openChangeRoleModal()}}),this.options=[{label:"Options",items:l}],this.optionsMenu.toggle(o)}openAssociateModal(){this.showAssociateModal=!0}openChangeRoleModal(){if(this.selectedOptionValue=void 0,this.selectedRequest?.clubDonationOptionID&&this.selectedRequest?.clubDonationOptionValueID){let n=new $t;n.clubDonationOptionID=this.selectedRequest.clubDonationOptionID,n.clubDonationOptionValueID=this.selectedRequest.clubDonationOptionValueID;let o=new qt;o.userClubDonationOptions=[n],this.preselectedDonation=o}else this.preselectedDonation=void 0;this.showChangeRoleDialog=!0}saveChangeRole(){let n=this.selectedOptionValue?.userClubDonationOptions?.[0]?.clubDonationOptionValueID;n&&(this.changeRoleSaving=!0,this.userService.changeVolunteerRequestOption(this.userID,this.selectedRequest.volunteerRequestID,n).subscribe({next:()=>{this.userService.getVolunteerRequests(this.userID).subscribe({next:o=>{this.requests=o,this.showChangeRoleDialog=!1,this.changeRoleSaving=!1,this.siteDataService.showSiteSuccessAlert("Volunteer role option updated successfully.")},error:()=>{this.showChangeRoleDialog=!1,this.changeRoleSaving=!1,this.siteDataService.showSiteErrorAlert("There was a problem refreshing requests.")}})},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem changing the volunteer role option."),this.changeRoleSaving=!1}}))}chooseRegistration(n){this.userService.associateVolunteerRequestWithRegistration(this.userID,this.selectedRequest.volunteerRequestID,n.entityRegistrationID).subscribe({next:()=>{this.selectedRequest.playerName=`${n.player.user.firstName} ${n.player.user.lastName}`,this.siteDataService.showSiteSuccessAlert("Request was associated successfully"),this.showAssociateModal=!1},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem associating this request with a registration.")}})}shouldShowAttendanceTracking(n){return!this.clubVolunteerSettings||n.customVolunteerID||!n.clubCalendarEventID?!1:n.programID===null||n.programID===void 0?this.clubVolunteerSettings.clubSettings?.enableVolunteerAttendanceTracking||!1:this.clubVolunteerSettings.programTeamSettings?.find(l=>l.programID===n.programID&&(!l.teamID||l.teamID===n.teamID))?.enableVolunteerAttendanceTracking||!1}toggleVolunteerAttendance(n,o){if(!o){this.siteDataService.showSiteErrorAlert("Unable to update attendance: Missing volunteer assignment ID.");return}let l=n.isVerifiedAsCompleted;(l?this.volunteerService.denyVolunteerAttendance(o):this.volunteerService.confirmVolunteerAttendance(o)).subscribe({next:()=>{n.isVerifiedAsCompleted=!l,this.siteDataService.showSiteSuccessAlert(`Volunteer attendance ${l?"denied":"confirmed"} successfully.`),this.refresh()},error:()=>{this.siteDataService.showSiteErrorAlert("There was an error updating volunteer attendance. Please try again later.")}})}};s.\u0275fac=function(o){return new(o||s)(b(P),b(Mt),b(F),b(Qt),b(V))},s.\u0275cmp=y({type:s,selectors:[["ng-component"]],viewQuery:function(o,l){if(o&1&&Q(Xo,5),o&2){let x;G(x=Y())&&(l.optionsMenu=x.first)}},standalone:!1,decls:53,vars:40,consts:[["completedRolesTable",""],["optionsMenu",""],["appendTo","body",3,"model","popup"],["header","Assign Volunteer Task","styleClass","standardWidthDialog",3,"visibleChange","visible","showHeader","closable","modal","draggable"],[1,"col-md-6"],[1,"form-group"],["styleClass","full-width","optionValue","clubUserID","optionLabel","user.fullName",3,"ngModelChange","ngModel","options"],["pTemplate","footer"],["header","Event Details","styleClass","standardWidthDialog",3,"visibleChange","onHide","visible","showHeader","closable","modal","draggable"],["header","Add Custom Volunteer Task","styleClass","standardWidthDialog",3,"visibleChange","onHide","visible","showHeader","closable","modal","draggable"],["header","Associate with Registration","styleClass","largeDialog",3,"visibleChange","visible","showHeader","closable","modal","draggable"],[3,"value","loading"],["pTemplate","header"],["pTemplate","body"],["header","Change Role Option","styleClass","standardWidthDialog",3,"visibleChange","onHide","visible","showHeader","closable","modal","draggable"],[1,"card"],[3,"volunteerTitle","requiredPoints","requiredPointsNote","scheduledPoints","pointsEarned","showBreakdown","volunteerSummary"],[1,"mt-3"],[1,"card-footer","border-none"],[1,"text-medium",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"volunteerTitle","volunteerName","requiredPoints","scheduledPoints","pointsEarned"],[1,"card-footer"],["sortField","
910savedOn",1,"table","table-striped","table-sm",3,"value","sortOrder","columns","loading","tableStyleClass"],["pTemplate","emptymessage"],[3,"pSortableColumn"],[3,"field"],["type","button",1,"btn","btn-sm","btn-tertiary",3,"click"],[1,"fa-solid","fa-ellipsis"],[1,"sr-only"],[1,"align-left"],[3,"value"],["tooltipPosition","top",3,"pTooltip"],[1,"fa","fa-info-circle","ml-1"],["href","javascript:void(0);",3,"click"],[3,"click"],["tooltipPosition","top",3,"ngModelChange","ngModel","binary","disabled","pTooltip"],["tooltipPosition","top",3,"ngModel","binary","disabled","pTooltip"],["tooltipStyleClass","sp-tooltip",1,"fa","fa-info-circle",3,"pTooltip"],["tooltipStyleClass","sp-tooltip",1,"fa","fa-sticky-note",3,"pTooltip"],[1,"fa-solid","fa-trash"],["slot","secondary"],[1,"btn","btn-secondary",3,"click","disabled"],["slot","primary"],[1,"btn","btn-primary",3,"click","disabled"],[3,"volunteerChangeEvent","events","showEdit","clubVolunteerSettings","showSomeDetails"],["formID","volunteer-role-form",3,"onSubmit","onCancel","entity","fields","contentFieldsMode","showCancelButton","showSubmitButton","buttonsPosition","modalContent"],["fieldName","roleName"],["fieldName","description"],["fieldName","points"],["fieldName","notes"],["type","button",1,"btn","btn-sm","btn-primary",3,"click"],[3,"donationSelectionChange","registrationSectionID","clubVolunteerOptionID","showHeader","showPageTitle","isModalContent","addBlank","selectedDonation"]],template:function(o,l){if(o&1){let x=v();e(0,` 911`),u(1,aa,16,8),u(2,ca,3,0),u(3,ha,16,5),E(4,Va,8,1,"ng-template",null,0,Ne),e(6,` 912 913`),r(7,"p-menu",2,1),e(9,` 914`),a(),e(10,` 915 916`),r(11,"p-dialog",3),N("visibleChange",function(S){return C(x),U(l.showAssignDialog,S)||(l.showAssignDialog=S),_(S)}),e(12,` 917 `),r(13,"p"),e(14,"Select a Family Member below to be the owner of the volunteer task."),a(),e(15,` 918 `),r(16,"div",4),e(17,` 919 `),r(18,"div",5),e(19,` 920 `),r(20,"label"),e(21,"Family Members:"),a(),e(22,` 921 `),r(23,"p-select",6),N("ngModelChange",function(S){return C(x),U(l.assignToClubUserID,S)||(l.assignToClubUserID=S),_(S)}),a(),e(24,` 922 `),a(),e(25,` 923 `),a(),e(26,` 924 `),E(27,Fa,16,2,"ng-template",7),e(28,` 925`),a(),e(29,` 926 927`),r(30,"p-dialog",8),N("visibleChange",function(S){return C(x),U(l.showDetailsDialog,S)||(l.showDetailsDialog=S),_(S)}),f("onHide",function(){return l.eventToView=void 0}),e(31,` 928 `),u(32,Pa,3,6),a(),e(33,` 929 930`),r(34,"p-dialog",9),N("visibleChange",function(S){return C(x),U(l.showEditDialog,S)||(l.showEditDialog=S),_(S)}),f("onHide",function(){return l.showEditDialog=void 0}),e(35,` 931 `),u(36,Ra,12,7),a(),e(37,` 932 933`),r(38,"p-dialog",10),N("visibleChange",function(S){return C(x),U(l.showAssociateModal,S)||(l.showAssociateModal=S),_(S)}),e(39,` 934 `),r(40,"p-table",11),e(41,` 935 `),E(42,ka,18,0,"ng-template",12),e(43,` 936 `),E(44,Ma,23,7,"ng-template",13),e(45,` 937 `),a(),e(46,` 938`),a(),e(47,` 939 940`),r(48,"p-dialog",14),N("visibleChange",function(S){return C(x),U(l.showChangeRoleDialog,S)||(l.showChangeRoleDialog=S),_(S)}),f("onHide",function(){return l.selectedOptionValue=void 0}),e(49,` 941 `),u(50,Ua,4,7),E(51,Na,16,2,"ng-template",7),e(52,` 942`),a()}o&2&&(c(),p(l.enableVolunteerTasks&&(l.volunteerStatuses!=null&&l.volunteerStatuses.clubSummary)?1:-1),c(),p(l.enableVolunteerTasks?2:-1),c(),p(l.showRequests?3:-1),c(4),ut(De(39,ea)),d("model",l.options)("popup",!0),c(4),M("visible",l.showAssignDialog),d("showHeader",!0)("closable",!1)("modal",!0)("draggable",!1),c(12),M("ngModel",l.assignToClubUserID),d("options",l.parents),c(7),M("visible",l.showDetailsDialog),d("showHeader",!0)("closable",!0)("modal",!0)("draggable",!1),c(2),p(l.eventToView?32:-1),c(2),M("visible",l.showEditDialog),d("showHeader",!0)("closable",!0)("modal",!0)("draggable",!1),c(2),p(l.fields&&l.entity?36:-1),c(2),M("visible",l.showAssociateModal),d("showHeader",!0)("closable",!0)("modal",!0)("draggable",!1),c(2),d("value",l.playerRegistrations)("loading",!l.playerRegistrations),c(8),M("visible",l.showChangeRoleDialog),d("showHeader",!0)("closable",!0)("modal",!0)("draggable",!1),c(2),p(l.showChangeRoleDialog&&(l.selectedRequest!=null&&l.selectedRequest.clubDonationOptionID)?50:-1))},dependencies:[Ct,j,se,ge,ye,re,ze,pe,Ce,_e,$e,Rt,At,It,qe,zt,ei,jt,ue,he,kt],encapsulation:2});let i=s;return i})();function La(i,s){if(i&1&&(e(0,` 943 `),r(1,"app-inline-alert",1),e(2),a(),e(3,` 944 `)),i&2){let t=m();c(2),g(t.error)}}function Oa(i,s){i&1&&(e(0,` 945 `),r(1,"app-loader"),e(2,"Loading moderation history..."),a(),e(3,` 946 `))}function Ba(i,s){if(i&1){let t=v();e(0,` 947 `),r(1,"app-user-moderation-history",2),f("actionTaken",function(o){C(t);let l=m();return _(l.onActionTaken(o))}),e(2,` 948 `),a(),e(3,` 949 `)}if(i&2){let t=m();c(),d("clubUserID",t.clubUserID)("embedded",!0)("showQuickActions",!0)}}var Fi=(()=>{let s=class s{constructor(n,o){this.route=n,this.siteDataService=o,this.unsubscribe$=new L,this.clubUserID=null,this.loading=!0,this.error=""}ngOnInit(){let n=de(this.route,"clubUserID")||de(this.route,"id");n?(this.clubUserID=+n,this.loading=!1):(this.error="No user ID provided.",this.loading=!1),this.siteDataService.hide
949SiteLoader()}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}onActionTaken(n){console.log("Moderation action taken:",n)}};s.\u0275fac=function(o){return new(o||s)(b(V),b(F))},s.\u0275cmp=y({type:s,selectors:[["app-user-moderation-history-embedded"]],standalone:!1,decls:7,vars:3,consts:[["aria-label","Moderation history content",1,"user-moderation-history-embedded"],["alertType","error",1,"d-block","mb-3"],[3,"actionTaken","clubUserID","embedded","showQuickActions"]],template:function(o,l){o&1&&(r(0,"section",0),e(1,` 950 `),e(2,` 951 `),u(3,La,4,1),u(4,Oa,4,0),u(5,Ba,4,3),a(),e(6,` 952`)),o&2&&(c(3),p(l.error?3:-1),c(),p(l.loading&&!l.error?4:-1),c(),p(l.clubUserID&&!l.loading?5:-1))},dependencies:[Tt,Ft,oi],encapsulation:2});let i=s;return i})();var Pi=(()=>{let s=class s{};s.\u0275fac=function(o){return new(o||s)},s.\u0275mod=Ue({type:s}),s.\u0275inj=ke({imports:[it.forChild([{path:"",children:[{path:"files",canActivate:[je],component:mt},{path:"club-contacts",component:wi,canActivate:[A],data:{metaTitle:"Club Contacts"}},{path:"club-contacts/import",component:Ai,canActivate:[A],data:{metaTitle:"Import Club Contacts"}},{path:"club-contacts/new",component:Re,canActivate:[A],data:{metaTitle:"Add Club Contact"}},{path:"club-contacts/:id/profile",component:Ii,canActivate:[A],data:{metaTitle:"Club Contact"}},{path:"club-contacts/:id/profile/edit",component:Re,canActivate:[A],data:{metaTitle:"Edit Club Contact"}},{path:"club-contacts/:id/profile/add-player",component:Re,canActivate:[A],data:{metaTitle:"Add Player Club Contact",addPlayerView:!0}},{path:"club-contacts/:id/profile/add-parent",component:Re,canActivate:[A],data:{metaTitle:"Add Parent Club Contact",addParentView:!0}},{path:"club-contacts/:id/profile/email",component:Di,canActivate:[A],data:{metaTitle:"Email"}},{path:"club-contacts/:id/profile/:clubContactID/convert-player",component:Ei,canActivate:[A],data:{metaTitle:"Convert Club Contact to Player"}},{path:"club-contacts/:id/profile/:clubContactID/convert-parent",component:gi,canActivate:[A],data:{metaTitle:"Convert Club Contact to Parent"}},{path:"club-contacts/:id",redirectTo:"club-contacts/:id/profile",pathMatch:"full"},{path:":id",component:xi,canActivateChild:[je],children:[{path:"profile",component:fe,canActivate:[A],data:{metaTitle:"Profile"},children:[{path:"",component:ci}]},{path:"household",component:fe,canActivate:[A],data:{metaTitle:"Household"},children:[{path:"",component:mi}]},{path:"moderation-history",component:fe,canActivate:[A],data:{metaTitle:"Moderation History"},children:[{path:"",component:Fi}]},{path:"requests",component:dt,canActivate:[A],data:{metaTitle:"Volunteer Requests"}},{path:"volunteering",component:dt,canActivate:[A],data:{metaTitle:"Volunteering"}},{path:"account-history",component:fi,canActivate:[A],data:{metaTitle:"Account History"}},{path:"payments",loadChildren:()=>import("./chunk-D4VYV2SK.js").then(n=>n.UserPaymentsModule),canActivate:[A],data:{metaTitle:"Payments"}},{path:"programs",loadChildren:()=>import("./chunk-T6C6QPR5.js").then(n=>n.SharedAdminProgramsModule),canActivate:[A],data:{metaTitle:"Programs",player:!1}},{path:"programs/registrations",loadChildren:()=>import("./chunk-QLEDSX3U.js").then(n=>n.EntityRegistrationsModule),canActivate:[A],data:{admin:!0,metaTitle:"Registration",player:!0}},{path:"programs/team-registrations",loadChildren:()=>import("./chunk-QLEDSX3U.js").then(n=>n.EntityRegistrationsModule),canActivate:[A],data:{admin:!0,metaTitle:"Registration",player:!1}},{path:"roles",component:pi,canActivate:[He,A],data:{permissions:[we.PermissionsAdmin],metaTitle:"Roles & Permissions"}},{path:"options",component:fe,canActivate:[He,A],data:{permissions:[we.AccountOptions],metaTitle:"Account Options"},children:[{path:"",component:di}]},{path:"notes",component:fe,canActivate:[A],data:{metaTitle:"Notes"},children:[{path:"",component:bi}]},{path:"notes/:noteID",component:fe,canActivate:[A],data:{metaTitle:"Edit Note"},children:[{path:"",component:vi}]},{path:"parents/:parentID",component:Si,canActivate:[A],data:{metaTitle:"Parent/Legal Guardian"}},{path:"file-cabinet",component:fe,canActivate:[He,A],data:{permissions:[we.UserFileCabinet],metaTitle:"User File Cabinet"}
952,children:[{path:"",component:mt}]},{path:"",component:si,canActivate:[A],data:{metaTitle:"Add User"}}]},{path:"",canActivate:[je],component:hi}]}]),it]});let i=s;return i})();var f0=(()=>{let s=class s{};s.\u0275fac=function(o){return new(o||s)},s.\u0275mod=Ue({type:s}),s.\u0275inj=ke({providers:[P,Ht,Wt],imports:[Bt,Pi,ui,ti,Ci,_i,ai,li,Gt,ii,Yt,ri]});let i=s;return i})();export{f0 as UserModule};
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.