1import{a as Qe,b as Je,c as Xe,d as Ze,e as et}from"./chunk-RHFYWNHQ.js";import{a as tt}from"./chunk-ZB44PIZA.js";import"./chunk-YBFQQSLW.js";import{a as Ve}from"./chunk-PUWYUIPV.js";import{a as be}from"./chunk-4CVZBQNN.js";import{c as He,f as Ge}from"./chunk-KWNDGQWR.js";import{q as Ye}from"./chunk-QH3IRCHN.js";import"./chunk-PLEH3NAH.js";import"./chunk-GXCJ5QS4.js";import{b as De}from"./chunk-4D5SN44G.js";import"./chunk-22ACI5KU.js";import"./chunk-FXUQQQIE.js";import"./chunk-FSUBAQYH.js";import{a as ze}from"./chunk-7CVCGK4Q.js";import"./chunk-FWW3IJT2.js";import"./chunk-B6LCWWQX.js";import"./chunk-HYGNXZJR.js";import{a as Ke}from"./chunk-B6XXRKU5.js";import{a as Te}from"./chunk-6Q5DDO7R.js";import"./chunk-RW2MVE4O.js";import"./chunk-3ZVRFUA4.js";import"./chunk-H4PCL6BZ.js";import{a as ye}from"./chunk-NXTJBJRP.js";import"./chunk-U22BTVEZ.js";import{Ec as Ae,Gc as Pe,Hc as Fe,Jc as ke,Kb as we,Wc as Ne,Xc as Le,Xe as qe,Zc as Ue,b as de,cc as Ie,d as me,gd as We,jb as Se,jc as Me,jd as Oe,k as ce,kh as je,lc as Re,le as $e,ua as ve,xb as Ee,ye as Be}from"./chunk-X5J6QTCG.js";import{$ as P,$a as g,Ac as re,Ad as z,Fa as s,Fb as q,G as X,Ge as xe,Ib as e,Jb as h,Ka as I,Kb as S,Lb as A,Lc as le,Ma as Z,Na as F,Nb as ae,Ni as H,Qb as V,Rb as b,Sa as M,Sb as T,Si as G,Th as Ce,Wc as se,Xa as ee,bb as C,be as _e,bg as ge,cc as U,d as O,db as k,dc as R,di as he,eb as N,fa as _,fb as L,ga as x,gb as u,hb as a,ib as o,jb as v,lc as y,mc as j,nb as $,nc as D,ob as B,pj as fe,qb as w,qc as oe,ri as K,sb as f,tb as m,u as J,vd as pe,xb as te,yb as ne,yd as ue,zb as ie}from"./chunk-SMW7PHYX.js";import{d as Y,e as Q}from"./chunk-BMIYOSOG.js";var lt=["optionsMenu"],st=()=>["/account/manage/requests"],it=r=>({"border-green bg-green-lt":r}),dt=()=>[0,1,2,3,4,5,6],mt=()=>({"min-width":"100%"}),W=r=>({"col-md-7":r});function ct(r,d){if(r&1&&(e(0,` 2 `),a(1,"div",14),e(2,` 3 `),a(3,"span"),e(4,`Scheduled 4 `),v(5,"i",34),e(6,` 5 `),o(),e(7,` 6 `),a(8,"span")(9,"strong"),e(10),o()(),e(11,` 7 `),o(),e(12,` 8 `)),r&2){let t=m(2);s(10),h(t.getClubScheduledVolutneering())}}function pt(r,d){if(r&1&&(e(0,` 9 `),a(1,"div",14),e(2,` 10 `),a(3,"span"),e(4,` 11 Scheduled 12 `),v(5,"i",34),e(6,` 13 `),o(),e(7,` 14 `),a(8,"span"),e(9,` 15 `),a(10,"strong"),e(11),o(),e(12,` 16 `),o(),e(13,` 17 `),o(),e(14,` 18 `)),r&2){let t=m().$implicit,n=m(3);s(11),S(` 19 `,n.getProgramTeamScheduledPoints(t.programID,t.teamID,t.playerID),` 20 `)}}function ut(r,d){if(r&1){let t=w();e(0,` 21 `),a(1,"div",9),e(2,` 22 `),a(3,"p-checkbox",35),T("ngModelChange",function(i){_(t);let l=m(3);return b(l.criteria.teamId,i)||(l.criteria.teamId=i),x(i)}),f("ngModelChange",function(i){let l=_(t).$implicit,c=m(3);return x(c.onAssignmentChange(i,l))}),e(4,` 23 `),o(),e(5,` 24 `),a(6,"label",36),e(7,` 25 `),a(8,"span",37),e(9),o(),e(10,` 26 `),a(11,"span",38),e(12),o(),e(13,` 27 `),v(14,"hr",39),e(15,` 28 `),a(16,"div",13),e(17,` 29 `),a(18,"span"),e(19),o(),e(20,` 30 `),a(21,"span")(22,"strong"),e(23),o()(),e(24,` 31 `),o(),e(25,` 32 `),g(26,pt,15,1),a(27,"div",14),e(28,` 33 `),a(29,"span"),e(30,"Completed"),o(),e(31,` 34 `),a(32,"span")(33,"strong"),e(34),o()(),e(35,` 35 `),o(),e(36,` 36 `),o(),e(37,` 37 `),o(),e(38,` 38 `)}if(r&2){let t=d.$implicit,n=d.$index,i=d.$count,l=m(3);s(),q("mb-3",n!==i-1),u("ngClass",R(14,it,l.criteria.teamId==null?null:l.criteria.teamId.includes(t.teamID))),s(2),u("inputId","assignmentCheck-"+t.teamID),V("ngModel",l.criteria.teamId),u("value",t.teamID)("styleClass",l.criteria.teamId!=null&&l.criteria.teamId.includes(t.teamID)?"highlight-green":""),s(3),u("for","assignmentCheck-"+t.teamID),s(3),h(t.programName),s(3),h(t.teamName),s(7),S("",t.firstName,"'s Required Points"),s(4),h(t.requiredHours),s(3),C(t.autoAwardPoints?-1:26),s(8),h(t.completedVolunteering)}}function _t(r,d){if(r&1&&(e(0,` 39 `),a(1,"div",8),e(2,"Team Volunteer Requirements"),o(),e(3,` 40 `),N(4,ut,39,16,null,null,k)),r&2){let t=m(2);s(4),L(t.volunteerStatuses.programTeamSummaries)}}function xt(r,d){if(r&1){let t=w();e(0,` 41 `),a(1,"p-checkbox",41),T("ngModelChange",function(i){_(t);let l=m(3);return b(l.criteria.eventTypeId,i)||(l.criteria.eventTypeId=i),x(i)}),f("ngModelChange",function(){_(t);let i=m(3);return x(i.onFilterChange())}),e(2,` 42 `),o(),a(3,"label",42),e(4),o(),e(5,` 43 `)}if(r&2){let t=m().$implicit,n=m(2);s(),u("inputId","eventType_"+t.value),V("ngModel",n.criteria.eventTypeId),u("value",t.value),s(3),h(t.label)}}
43function gt(r,d){if(r&1&&(e(0,` 44 `),a(1,"div",40),e(2,` 45 `),g(3,xt,6,4),o(),e(4,` 46 `)),r&2){let t=d.$implicit;s(3),C(t.disabled?-1:3)}}function Ct(r,d){if(r&1){let t=w();e(0,` 47 `),a(1,"div",40),e(2,` 48 `),a(3,"p-checkbox",41),T("ngModelChange",function(i){_(t);let l=m(2);return b(l.criteria.daysOfWeek,i)||(l.criteria.daysOfWeek=i),x(i)}),f("ngModelChange",function(){_(t);let i=m(2);return x(i.onFilterChange())}),e(4,` 49 `),o(),a(5,"label",42),e(6),o(),e(7,` 50 `),o(),e(8,` 51 `)}if(r&2){let t=d.$implicit,n=m(2);s(3),u("inputId","dow_"+t),V("ngModel",n.criteria.daysOfWeek),u("value",t),s(3),h(n.getDayName(t))}}function ht(r,d){if(r&1){let t=w();e(0,` 52 `),a(1,"tr"),e(2,` 53 `),a(3,"th",47),e(4,"Date "),v(5,"p-sortIcon",48),e(6,` 54 `),o(),e(7,` 55 `),a(8,"th",47),e(9,"Time "),v(10,"p-sortIcon",49),e(11,` 56 `),o(),e(12,` 57 `),a(13,"th",50),e(14,"Event "),v(15,"p-sortIcon",51),o(),e(16,` 58 `),e(17,` 59 `),a(18,"th",52),e(19,"Volunteer Requirement"),v(20,"p-sortIcon",53),o(),e(21,` 60 `),a(22,"th"),e(23,"Filled/Needed"),o(),e(24,` 61 `),a(25,"th"),e(26,` 62 `),a(27,"i",54),f("click",function(){_(t);let i=m(3);return x(i.setAllExpanded(!i.allExpanded))}),o(),e(28,` 63 `),a(29,"span",55),e(30,` 64 Expand All 65 `),o(),e(31,` 66 `),o(),e(32,` 67 `),o(),e(33,` 68 `)}if(r&2){let t=m(3);s(27),u("ngClass",t.allExpanded?"fa-rotate-180":"")}}function ft(r,d){r&1&&e(0,` 69 Time TBD 70 `)}function vt(r,d){if(r&1&&(e(0,` 71 `),a(1,"div",60),e(2),y(3,"date"),y(4,"date"),o(),e(5,` 72 `)),r&2){let t=m(2).$implicit;s(),u("ngClass",R(9,W,t.clubEventType==null?null:t.clubEventType.shortDescription)),s(),A(` 73 `,D(3,3,t.startDate,"h:mmaaaaa"),` - 74 `,D(4,6,t.endDate,"h:mmaaaaa"),` 75 `)}}function St(r,d){if(r&1&&(e(0,` 76 `),a(1,"div",60),e(2),y(3,"date"),o(),e(4,` 77 `)),r&2){let t=m(2).$implicit;s(),u("ngClass",R(5,W,t.clubEventType==null?null:t.clubEventType.shortDescription)),s(),S(` 78 `,D(3,2,t.startDate,"E M/d"),` 79 `)}}function yt(r,d){if(r&1&&(e(0,` 80 `),a(1,"div",60),e(2),y(3,"date"),y(4,"date"),y(5,"date"),y(6,"date"),o(),e(7,` 81 `)),r&2){let t=m(2).$implicit;s(),u("ngClass",R(17,W,t.clubEventType==null?null:t.clubEventType.shortDescription)),s(),ae(` 82 `,D(3,5,t.startDate,"E M/d"),` - 83 `,D(4,8,t.endDate,"E M/d"),`, 84 `,D(5,11,t.startDate,"h:mmaaaaa"),` - 85 `,D(6,14,t.endDate,"h:mmaaaaa"),` 86 `)}}function Et(r,d){if(r&1&&(e(0,` 87 `),a(1,"div",60),e(2),y(3,"date"),y(4,"date"),o(),e(5,` 88 `)),r&2){let t=m(2).$implicit;s(),u("ngClass",R(9,W,t.clubEventType==null?null:t.clubEventType.shortDe
88scription)),s(),A(` 89 `,D(3,3,t.startDate,"E M/d"),` - 90 `,D(4,6,t.endDate,"E M/d"),` 91 `)}}function wt(r,d){if(r&1&&(e(0,` 92 `),e(1,` 93 `),g(2,vt,6,11),g(3,St,5,7),g(4,yt,8,19),g(5,Et,6,11)),r&2){let t=m().$implicit,n=m(3);s(2),C(n.sameDay(t.endDate,t.startDate)&&!t.isAllDayEvent?2:-1),s(),C(n.sameDay(t.endDate,t.startDate)&&t.isAllDayEvent?3:-1),s(),C(!n.sameDay(t.endDate,t.startDate)&&!t.isAllDayEvent?4:-1),s(),C(!n.sameDay(t.endDate,t.startDate)&&t.isAllDayEvent?5:-1)}}function Vt(r,d){if(r&1&&(e(0),a(1,"span",29),e(2),o(),e(3,` 94 `)),r&2){let t=m(2).$implicit;S(` 95 `,t.team.name,` 96 `),s(2),S("@ ",t.opponent)}}function bt(r,d){if(r&1&&(e(0),a(1,"span",29),e(2),o(),e(3,` 97 `)),r&2){let t=m(2).$implicit;S(` 98 `,t.team.name,` 99 `),s(2),S("vs ",t.opponent)}}function Tt(r,d){if(r&1&&(e(0,` 100 `),g(1,Vt,4,2)(2,bt,4,2)),r&2){let t=m().$implicit;s(),C(t.awayGame?1:2)}}function Dt(r,d){if(r&1&&e(0),r&2){let t=m().$implicit;A(` 101 `,t==null||t.team==null?null:t.team.name," ",t.title,` 102 `)}}function It(r,d){if(r&1&&(e(0,` 103 `),v(1,"app-pill",61),e(2,` 104 `)),r&2){let t=m().$implicit;s(),u("text",t.tag)}}function Mt(r,d){r&1&&(e(0,` 105 `),v(1,"app-pill",62),e(2,` 106 `)),r&2&&(s(),u("text","CANCELLED")("status","error"))}function Rt(r,d){r&1&&(e(0,` 107 `),v(1,"app-pill",63),e(2,` 108 `)),r&2&&(s(),u("text","DRAFT"))}function At(r,d){r&1&&e(0,` 109 Club 110 Volunteering 111 `)}function Pt(r,d){if(r&1&&(e(0,` 112 `),a(1,"tr"),e(2,` 113 `),a(3,"td"),e(4,` 114 `),v(5,"app-calendar-card",56),e(6,` 115 `),o(),e(7,` 116 `),a(8,"td",57),e(9,` 117 `),g(10,ft,1,0)(11,wt,6,4),o(),e(12,` 118 `),a(13,"td",57),e(14,` 119 `),g(15,Tt,3,1)(16,Dt,1,2),g(17,It,3,1),g(18,Mt,3,2),g(19,Rt,3,1),o(),e(20,` 120 `),e(21,` 121 `),a(22,"td",57),e(23,` 122 `),g(24,At,1,0),e(25),a(26,"b"),e(27),o(),e(28,` 123 `),o(),e(29,` 124 `),a(30,"td"),e(31),o(),e(32,` 125 `),a(33,"td"),e(34,` 126 `),a(35,"button",58),e(36,` 127 View 128 `),v(37,"i",59),e(38,` 129 `),a(39,"span",55),e(40,` 130 Expand 131 `),o(),e(41,` 132 `),o(),e(42,` 133 `),o(),e(43,` 134 `),e(44,` 135 `),o(),e(45,` 136 `)),r&2){let t=d.$implicit,n=d.expanded,i=m(3);s(),q("bg-grey-lt",t.isDraft),s(4),u("startDate",t.startDate)("endDate",t.endDate)("clubEventTypeID",t.clubEventTypeID),s(5),C(t.showTimeTBD?10:11),s(5),C(t.clubEventTypeID===i.CalendarEventType.GAME?15:16),s(2),C(t.tag?17:-1),s(),C(t.isCancelled?18:-1),s(),C(t.isDraft?19:-1),s(5),C((t==null?null:t.clubEventTypeID)===i.CalendarEventType.CLUB?24:-1),s(),S(` 137 `,t==null||t.program==null?null:t.program.name," "),s(2),h(t==null||t.team==null?null:t.team.name),s(4),A(` 138 `,i.getFilledRoleCount(t)," / ",t.calendarVolunteerRoles==null?null:t.calendarVolunteerRoles.length,` 139 `),s(4),u("pRowToggler",t),s(2),u("ngClass",n?"fa-rotate-180":"")}}function Ft(r,d){r&1&&(e(0,` 140 `),a(1,"tr"),e(2,` 141 `),a(3,"th"),e(4,"Task"),o(),e(5,` 142 `),a(6,"th"),e(7,"Points"),o(),e(8,` 143 `),a(9,"th"),e(10,"Description"),o(),e(11,` 144 `),a(12,"th"),e(13,"Start Time"),o(),e(14,` 145 `),a(15,"th"),e(16,"End Time"),o(),e(17,` 146 `),a(18,"th"),e(19,"Assigned Volunteer"),o(),e(20,` 147 `),o(),e(21,` 148 `))}function kt(r,d){if(r&1&&e(0),r&2){let t=m(2).$implicit;S(` 149 `,t.calendarEventVolunteer.volunteerPlayer.user.firstName+" "+t.calendarEventVolunteer.volunteerPlayer.user.lastName,` 150 `)}}function Nt(r,d){if(r&1&&e(0),r&2){let t=m(2).$implicit;S(` 151 `,(t.calendarEventVolunteer.volunteerClubUser==null||t.calendarEventVolunteer.volunteerClubUser.user==null?null:t.calendarEventVolunteer.volunteerClubUser.user.firstName)+" "+(t.calendarEventVolunteer.volunteerClubUser==null||t.calendarEventVolunteer.volunteerClubUser.user==null?null:t.calendarEventVolunteer.volunteerClubUser.user.lastName),` 152 `)}}function Lt(r,d){if(r&1){let t=w();e(0,` 153 `),a(1,"button",68),f("click",function(){_(t);let i=m(2).$implicit,l=m().$implicit,c=m(3);return x(c.unassignVolunteer(i,l))}),e(2,` 154 `),v(3,"i",69),e(4,` 155 `),a(5,"span",55),e(6,"Unassign"),o(),e(7,` 156 `),o(),e(8,` 157 `)}}function Ut(r,d){if(r&1&&(e(0,` 158 `),g(1,kt,1,1)(2,Nt,1,1),g(3,Lt,9,0)),r&2){let t=m().$implicit,n=m(4);s(),C(t.calendarEventVolunteer.volunteerPlayer?1:2),s(2),C(n.volunteerIsPartOfFamily(t.calendarEventVolunteer)?3:-1)}}
158function Wt(r,d){if(r&1){let t=w();e(0,` 159 `),a(1,"button",70),f("click",function(){_(t);let i=m().$implicit,l=m(4);return x(l.showSignUpID?l.showSignUpID=void 0:l.showSignUpID=i.calendarVolunteerRoleID)}),e(2),o(),e(3,` 160 `)}if(r&2){let t=m(5);s(2),S(` 161 `,t.showSignUpID?"Cancel":"Sign up",` 162 `)}}function Ot(r,d){if(r&1){let t=w();e(0,` 163 `),a(1,"tr"),e(2,` 164 `),a(3,"td"),e(4,"Select Volunteer:"),o(),e(5,` 165 `),a(6,"td",71),e(7,` 166 `),a(8,"div",72),e(9,` 167 `),a(10,"p-select",73),f("onChange",function(i){_(t);let l=m().$implicit,c=m().$implicit,p=m(3);return x(p.assignVolunteer(l,c,void 0,i.value.clubUserID))}),e(11,` 168 `),o(),e(12,` 169 `),a(13,"p-select",74),f("onChange",function(i){_(t);let l=m().$implicit,c=m().$implicit,p=m(3);return x(p.assignVolunteer(l,c,i.value.playerID))}),e(14,` 170 `),o(),e(15,` 171 `),o(),e(16,` 172 `),o(),e(17,` 173 `),o(),e(18,` 174 `)}if(r&2){let t=m(2).$implicit,n=m(3);s(10),u("options",n.family.parents),s(3),u("options",n.getEligiblePlayers(t.programID,t.teamID))}}function $t(r,d){if(r&1&&(e(0,` 175 `),a(1,"tr"),e(2,` 176 `),a(3,"td"),e(4),o(),e(5,` 177 `),a(6,"td"),e(7),o(),e(8,` 178 `),a(9,"td"),e(10),o(),e(11,` 179 `),a(12,"td"),e(13),y(14,"timeOnly"),o(),e(15,` 180 `),a(16,"td"),e(17),y(18,"timeOnly"),o(),e(19,` 181 `),a(20,"td"),e(21,` 182 `),g(22,Ut,4,2)(23,Wt,4,1),o(),e(24,` 183 `),o(),e(25,` 184 `),g(26,Ot,19,2)),r&2){let t=d.$implicit,n=m(4);s(4),h(t.roleName),s(3),h(t.points),s(3),h(t.description),s(3),h(j(14,7,t.startTime)),s(4),h(j(18,9,t.endTime)),s(5),C(t.calendarEventVolunteer?22:23),s(4),C(n.showSignUpID===t.calendarVolunteerRoleID?26:-1)}}function Bt(r,d){if(r&1&&(e(0,` 185 `),a(1,"tr",64),e(2,` 186 `),a(3,"td",65),e(4,` 187 `),a(5,"div",66),e(6,` 188 `),a(7,"p-table",67),e(8,` 189 `),M(9,Ft,22,0,"ng-template",44),e(10,` 190 `),M(11,$t,27,11,"ng-template",45),e(12,` 191 `),o(),e(13,` 192 `),o(),e(14,` 193 `),o(),e(15,` 194 `),o(),e(16,` 195 `)),r&2){let t=d.$implicit;s(7),u("value",t.calendarVolunteerRoles)}}function qt(r,d){r&1&&(e(0,` 196 `),a(1,"tr"),e(2,` 197 `),a(3,"td",75),e(4,` 198 No Events Match The Currently Selected Filters 199 `),o(),e(5,` 200 `),o(),e(6,` 201 `)),r&2&&(s(3),ee("colspan",7))}function jt(r,d){if(r&1){let t=w();e(0,` 202 `),a(1,"p-table",43),f("onLazyLoad",function(i){_(t);let l=m(2);return x(l.onPageChange(i))})("onRowExpand",function(i){_(t);let l=m(2);return x(l.onRowExpand(i))})("onRowCollapse",function(i){_(t);let l=m(2);return x(l.onRowCollapse(i))}),e(2,` 203 `),M(3,ht,34,1,"ng-template",44),e(4,` 204 `),M(5,Pt,46,17,"ng-template",45),e(6,` 205 `),M(7,Bt,17,1,"ng-template",null,0,oe),e(9,` 206 `),M(10,qt,7,1,"ng-template",46),e(11,` 207 `),o(),e(12,` 208 `)}if(r&2){let t=m(2);s(),u("value",t.events)("paginator",!0)("rows",t.pageSize)("totalRecords",t.totalRecords)("lazy",!0)("dataKey","id")("rowHover",!1)("expandedRowKeys",t.expandedRowKeys)("tableStyle",U(9,mt))}}function zt(r,d){r&1&&(e(0,` 209 `),v(1,"app-skeleton-template",76),e(2,` 210 `)),r&2&&(s(),u("wrapInCard",!0))}function Kt(r,d){if(r&1){let t=w();e(0,` 211 `),a(1,"section"),e(2,` 212 `),a(3,"div",2),e(4,` 213 `),a(5,"h1",3),e(6,"Volunteer Openings"),o(),e(7,` 214 `),a(8,"span"),e(9,` 215 `),a(10,"a",4),e(11,`See Your Completed/Scheduled 216 Volunteer Tasks`),o(),e(12,` 217 `),o(),e(13,` 218 `),o(),e(14,` 219 `),a(15,"div",5),e(16,` 220 `),a(17,"div",6),e(18,` 221 `),a(19,"div",7),e(20,` 222 `),a(21,"div",8),e(22,`Household Volunteer Requirements 223 `),o(),e(23,` 224 `),a(24,"div",9),e(25,` 225 `),a(26,"p-checkbox",10),T("ngModelChange",function(i){_(t);let l=m();return b(l.criteria.eventTypeId,i)||(l.criteria.eventTypeId=i),x(i)}),f("ngModelChange",function(){_(t);let i=m();return x(i.onFilterChange())}),e(27,` 226 `),o(),e(28,` 227 `),a(29,"label",11),e(30,` 228 `),a(31,"span",12),e(32,"Household Volunteering"),o(),e(33,` 229 `),a(34,"div",13),e(35,` 230 `),a(36,"span"),e(37,"Required Points"),o(),e(38,` 231 `),a(39,"span")(40,"strong"),e(41),o()(),e(42,` 232 `),o(),e(43,` 233 `),g(44,ct,13,1),a(45,"div",14),e(46,` 234 `),a(47,"span"),e(48,"Completed"),o(),e(49,` 235 `),a(50,"span")(51,"strong"),e(52),o()(),e(53,` 236 `),o(),e(54,` 237 `),o(),e(55,` 238 `),o(),e(56,` 239 `),g(57,_t,6,0),o(),e(58,` 240 `),o(),e(59,` 241 `),a(60,"div",15),e(61,` 242 `),a(62,"app-admin-filter",16),f("adminFilterReset",function(){_(t);let i=m();return x(i.resetFilters())})("adminFilterSearch",function(){_(t);let i=m();return x(i.loadEvents())}),e(63,` 243 `),$(64,17),e(65,` 244 `),a(66,"div",18),e(67,` 245 `),a(68,"input",19),T("ngModelChange",function(i){_(t);let l=m();return b(l.criteria.title,i)||(l.criteria.title=i),x(i)}),f("ngModelChange",function(){_(t);let i=m();return x(i.onFilterChange())}),o(),e(69,` 246 `),a(70,"label",20),e(71,`Search by event title, task, or task 247 description`),o(),e(72,` 248 `),o(),e(73,` 249 `),B(),e(74,` 250 `),$(75,21),e(76,` 251 `),e(77,` 252 `),a(78,"div",22),e(79,` 253 `),a(80,"label"),e(81,"Time Range"),o(),e(82,` 254 `),a(83,"p-slider",23),T("ngModelChange",function(i){_(t);let l=m();return b(l.criteria.timeRange,i)||(l.criteria.timeRange=i),x(i)}),f("onChange",function(){_(t);let i=m();return x(i.onFilterChange())}),e(84,` 255 `),o(),e(85,` 256 `),a(86,"div",24),e(87,` 257 `),a(88,"span"),e(89),o(),e(90,` 258 `),a(91,"span"),e(92),o(),e(93,` 259 `),o(),e(94,` 260 `),o(),e(95,` 261 `),a(96,"div",25),e(97,` 262 `),e(98,` 263 `),a(99,"div",6),e(100,` 264 `),a(101,"div",26),e(102,` 265 `),a(103,"label"),e(104,"Event Types"),o(),e(105,` 266 `),N(106,gt,5,1,null,null,k),o(),e(108,` 267 `),o(),e(109,` 268 `),e(110,` 269 `),a(111,"div",6),e(112,` 270 `),a(113,"div",26),e(114,` 271 `),a(115,"label"),e(116,"Days of the Week"),o(),e(117,` 272 `),N(118,Ct,9,4,null,null,k),o(),e(120,` 273 `),o(),e(121,` 274 `),e(122,` 275 `),a(123,"div",15),e(124,` 276 `),a(125,"div",27),e(126,` 277 `),a(127,"div",28),e(128,` 278 `),a(129,"label",29),e(130,"Date Range"),o(),e(131,` 279 `),a(132,"p-inputgroup"),e(133,` 280 `),a(134,"p-datepicker",30),T("ngModelChange",function(i){_(t);let l=m();return b(l.criteria.startDate,i)||(l.criteria.startDate=i),x(i)}),f("ngModelChange",function(){_(t);let i=m();return x(i.onFilterChange())}),e(135,` 281 `),o(),e(136,` 282 `),a(137,"p-inputgroup-addon"),e(138,"to"),o(),e(139,` 283 `),a(140,"p-datepicker",30),T("ngModelChange",function(i){_(t);let l=m();return b(l.criteria.endDate,i)||(l.criteria.endDate=i),x(i)}),f("ngModelChange",function(){_(t);let i=m();return x(i.onFilterChange())}),e(141,` 284 `),o(),e(142,` 285 `),o(),e(143,` 286 `),o(),e(144,` 287 `),o(),e(145,` 288 `),e(146,` 289 `),a(147,"div",26),e(148,` 290 `),a(149,"label",31),e(150,"Facilities"),o(),e(151,` 291 `),a(152,"p-multiSelect",32),T("ngModelChange",function(i){_(t);let l=m();return b(l.criteria.facilityId,i)||(l.criteria.facilityId=i),x(i)}),f("onChange",function(){_(t);let i=m();return x(i.onFilterChange())}),e(153,` 292 `),o(),e(154,` 293 `),o(),e(155,` 294 `),o(),e(156,` 295 `),o(),e(157,` 296 `),B(),e(158,` 297 `),o(),e(159,` 298 `),a(160,"div",33),e(161,` 299 `),g(162,jt,13,10)(163,zt,3,1),o(),e(164,` 300 `),o(),e(165,` 301 `),o(),e(166,` 302 `),o(),e(167,` 303 `)}if(r&2){let t=m();s(10),u("routerLink",U(27,st)),s(14),u("ngClass",R(28,it,t.criteria.eventTypeId==null?null:t.criteria.eventTypeId.includes(1))),s(2),u("inputId","eventType_club"),V("ngModel",t.criteria.eventTypeId),u("value",1),s(15),h(t.volunteerStatuses.clubSummary.requiredHours),s(3),C(t.doesClubAutoAwardPoints?-1:44),s(8),h(t.volunteerStatuses.clubSummary.completedVolunteering),s(5),C(!(t.volunteerStatuses==null||t.volunteerStatuses.programTeamSummaries==null)&&t.volunteerStatuses.programTeamSummaries.length?57:-1),s(5),u("showAdvanced",!0)("showLabels",!1)("hideSearch",!0)("marginTop",!1),s(6),V("ngModel",t.criteria.title),s(15),V("ngModel",t.criteria.timeRange),u("range",!0)("min",300)("max",1380)("step",30),s(6),h(t.formatTime(t.criteria.timeRange==null?null:t.criteria.timeRange[0])),s(3),h(t.formatTime(t.criteria.timeRange==null?null:t.criteria.timeRange[1])),s(14),L(t.eventTypeOptions),s(12),L(U(30,dt)),s(16),V("ngModel",t.criteria.startDate),s(6),V("ngModel",t.criteria.endDate),s(12),u("options",t.facilities),V("ngModel",t.criteria.facilityId),u("filter",!0),s(10),C(t.loading?163:162)}}function Ht(r,d){r&1&&(e(0,` 304 `),v(1,"app-skeleton-template",76),e(2,` 305 `)),r&2&&(s(),u("wrapInCard",!0))}var at=(()=>{let d=class d{constructor(n,i,l,c,p,E,rt){this.cd=n,this.siteDataService=i,this.authorizeService=l,this.volunteerService=c,this.clubCalendarService=p,this.userService=E,this.route=rt,this.unsubscribe$=new O,this.filterChange$=new O,this.expandedRowKeys={},this.expandAllState=!0,this.loading=!0,this.loadingEvents=!0,this.AriaLabels=ge,this.VolunteerRequestStatus=xe,this.showAssignDialog=!1,this.saving=!1,this.options=[],this.showDetail
305sDialog=!1,this.criteria=new G,this.endDateMinDate=null,this.endTimeMinDate=null,this.eventTypeOptions=[],this.facilities=[],this.fields=[],this.events=[],this.totalRecords=0,this.totalDraftRecords=0,this.pageNumber=1,this.pageSize=25,this.CalendarEventType=K,this.columns=[{field:"programName",header:"Program"},{field:"roleName",header:"Requested Role"},{field:"optionName",header:"Volunteer Option Value"},{field:"playerName",header:"Player"},{field:"volunteerRequestStatus",header:"Status"},{field:"savedOn",header:"Saved Date"}]}ngOnInit(){this.criteria.timeRange=[300,1380],this.route.queryParamMap.subscribe(n=>{let i=n.get("programID"),l=n.get("teamID");i&&l&&(this.criteria.programId=[Number(i)],this.criteria.teamId=[Number(l)])}),this.authorizeService.getUser().subscribe(n=>{n&&(this.isPlayer=n.playerID||this.authorizeService.isPlayer(n.role),this.fullAccess=this.authorizeService.userHasPermissions(n,[Ce.FullMemberAccess]))}),J({clubOption:this.siteDataService.getClubOptions([H.ENABLE_VOLUNTEER_MANAGEMENT]),requests:this.userService.getVolunteerRequests(),parents:this.userService.getParentClubUsers(!0),volunteerStatus:this.volunteerService.getCurrentClubUserVolunteeringStatus(),searchMeta:this.volunteerService.getVolunteerEventSearchCriteriaMetaData()}).subscribe({next:n=>{n.clubOption&&n.clubOption.find(i=>i.optionID===H.ENABLE_VOLUNTEER_MANAGEMENT)?.boolValue&&(this.showRequests=!0),this.volunteerStatuses&&this.volunteerStatuses.programTeamSummaries?.length===0?this.eventTypeOptions=n.searchMeta.eventTypes:this.eventTypeOptions=n.searchMeta.eventTypes,this.family=n.searchMeta.family,this.facilities=n.searchMeta.practiceFacilities,this.volunteerStatuses=n.volunteerStatus,this.requests=n.requests,this.parents=n.parents.filter(i=>i.clubUserID!==this.userService.loggedInClubUser.clubUserID),this.parents.forEach(i=>i.fullName=`${i.firstName} ${i.lastName}`),this.loadEvents(),this.loading=!1,this.siteDataService.hideSiteLoader()},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem getting data.")}}),this.filterChangeSubscription=this.filterChange$.pipe(X(500)).subscribe(()=>{console.log("Filter changed"),this.loadEvents()})}get allExpanded(){return this.events?.length>0&&Object.keys(this.expandedRowKeys).length===this.events.length}get doesClubAutoAwardPoints(){return this.volunteerStatuses?.clubSummary.autoAwardPoints}getClubScheduledVolutneering(){return this.volunteerStatuses.clubSummary.completedRoles?.length>0&&this.volunteerStatuses.clubSummary.completedRoles.some(n=>!n.isVerifiedAsCompleted)?this.volunteerStatuses.clubSummary.completedRoles.filter(n=>!n.isVerifiedAsCompleted).reduce((n,i)=>n+i.points,0):0}getAutoAwardStatus(n,i){return(this.volunteerStatuses?.programTeamSummaries.find(c=>c.programID===n&&c.teamID===i)).autoAwardPoints}getProgramTeamScheduledPoints(n,i,l){let c=this.volunteerStatuses?.programTeamSummaries.find(p=>p.programID===n&&p.teamID===i&&p.playerID===l);return c.completedRoles?.length>0&&c.completedRoles.some(p=>!p.isVerifiedAsCompleted)?c.completedRoles.filter(p=>!p.isVerifiedAsCompleted).reduce((p,E)=>p+E.points,0):0}getProgramTeamRequiredPoints(n,i){let l=this.volunteerStatuses?.programTeamSummaries.find(c=>c.programID===n&&c.teamID===i);return l?l.requiredHours:0}getProgramTeamCompletedPoints(n,i){let l=this.volunteerStatuses?.programTeamSummaries.find(c=>c.programID===n&&c.teamID===i);return l?l.completedVolunteering:0}setAllExpanded(n){if(this.expandAllState=n,this.expandedRowKeys={},n)for(let i of this.events)this.expandedRowKeys[i.id]=!0}onRowExpand(n){this.expandedRowKeys[n.data.id]=!0}onRowCollapse(n){let i=n.data.id;if(this.expandedRowKeys.hasOwnProperty(i)){let l=this.expandedRowKeys,{[i]:c}=l,p=Q(l,[Y(i)]);this.expandedRowKeys=p}}refreshStatus(){this.volunteerService.getCurrentClubUserVolunteeringStatus().subscribe({next:n=>{this.volunteerStatuses=n,this.cd.detectChanges()}})}updateSignUpEventTypeAvailability(){let n=!!this.criteria.teamId;this.eventTypeOptions?.forEach(i=>{i.value===K.SIGN_UP&&(i.disabled=n)})}loadEvents(){this.criteria.pageNumber=this.pageNumber,this.criteria.pageSize=this.pageSize,this.updateSignUpEventTypeAvailability(),this.volunteerService.searchEvents(this.criteria).subscribe({next:n=>{this.events=n.events,this.totalRecords=n.total,this.totalDraftRecords=n.totalDraftCount,this.setAllExpanded(!0),this.loadingEvents=!1,this.siteDataService.hide
305SiteLoader()},error:()=>{this.siteDataService.showSiteErrorAlert("Failed to load events!")}})}onPageChange(n){this.pageNumber=n.first/n.rows+1,this.pageNumber=n.first/n.rows+1,this.pageSize=n.rows,n.sortField?(this.criteria.sortField=Array.isArray(n.sortField)?n.sortField[0]:n.sortField,this.criteria.sortOrder=n.sortOrder):(this.criteria.sortField="startDate",this.criteria.sortOrder=1),this.loadEvents()}formatTime(n){if(n===null)return"";let i=Math.floor(n/60),l=n%60,c=i>=12?"PM":"AM",p=i%12===0?12:i%12,E=l.toString().padStart(2,"0");return`${p}:${E} ${c}`}getDayName(n){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][n]}volunteerIsPartOfFamily(n){return this.family.parents&&this.family.parents.some(i=>i.clubUserID===n.volunteerClubUserID)||this.family.players&&this.family.players.some(i=>i.playerID===n.volunteerPlayerID)}canCancelVolunteering(n,i){let l=n?.canellationPeriodDays;if(!l||l===0)return!0;let c=new Date,p=new Date(c);return p.setDate(p.getDate()+l),p<new Date(i.startDate)}isAlreadySignedUp(n,i,l){let c=this.events.find(p=>p.id===n.clubCalendarEventID);return c?i!==void 0?c.calendarVolunteerRoles.some(p=>p.calendarEventVolunteer&&p.calendarEventVolunteer.volunteerPlayerID===i):c.calendarVolunteerRoles.some(p=>p.calendarEventVolunteer&&p.calendarEventVolunteer.volunteerClubUserID===l):!1}assignVolunteer(n,i,l,c){this.isAlreadySignedUp(n,l,c)&&this.siteDataService.showSiteWarnAlert("You are already signed up for this event. Please check your volunteer tasks, and make sure you can complete multiple tasks.");let p=new He;p.calendarVolunteerRoleID=n.calendarVolunteerRoleID,c?p.volunteerClubUserID=c:p.volunteerPlayerID=l,console.log("signing up volunteer: ",p),this.clubCalendarService.assignVolunteer(p).subscribe({next:E=>{n.calendarEventVolunteer=E,this.showSignUpID=void 0,this.refreshStatus(),this.siteDataService.showSiteSuccessAlert("Thanks for signing up to Volunteer!")},error:E=>{this.showSignUpID=void 0,E.status===409?(this.siteDataService.showSiteErrorAlert(E.error?.message||"This volunteer role has already been assigned. Refreshing the volunteer opportunities..."),this.loadEvents()):this.siteDataService.showSiteErrorAlert("There was an error with your request. Please try again later.")}})}unassignVolunteer(n,i){this.canCancelVolunteering(n,i)?this.clubCalendarService.unassignVolunteer(n.calendarEventVolunteer.calendarEventVolunteerID).subscribe({next:()=>{n.calendarEventVolunteer=null,this.refreshStatus(),this.siteDataService.showSiteSuccessAlert("Volunteer unassigned successfully.")},error:l=>{l.status===404?(this.siteDataService.showSiteWarnAlert("This volunteer assignment has already been removed. Refreshing the page to show current assignments."),this.refreshStatus()):this.siteDataService.showSiteErrorAlert("There was an error issueing your request. Please try again later.")}}):this.siteDataService.showSiteWarnAlert("The cancellation period has passed. You can no longer cancel your volunteering. If there is an issue, please contact the club.")}resetFilters(){this.criteria=new G,this.criteria.timeRange=[300,1380],this.loadEvents()}onFilterChange(){this.pageNumber=1,this.filterChange$.next()}disableIncludePastEvents(){let n=new Date;return(this.criteria.startDate||this.criteria.endDate||this.criteria.startTime||this.criteria.endTime)&&(this.criteria.startDate<=n||this.criteria.endDate<=n||this.criteria.startTime<=n||this.criteria.endTime<=n)?(this.criteria.includePastEvents=!1,!0):!1}onStartDateChange(){this.criteria.startDate?(this.endDateMinDate=this.criteria.startDate,this.criteria.endDate&&this.criteria.endDate<this.criteria.startDate&&(this.criteria.endDate=null)):this.endDateMinDate=null,this.disableIncludePastEvents()}getFilledRoleCount(n){return n.calendarVolunteerRoles?n.calendarVolunteerRoles.filter(i=>i.calendarEventVolunteer?.calendarEventVolunteerID).length:0}sameDay(n,i){return new Date(n).getDate()===new Date(i).getDate()}formatMinutes(n){let i=Math.floor(n/60),l=n%60,c=i>=12?"PM":"AM";return`${i%12||12}:${l.toString().padStart(2,"0")} ${c}`}onAssignmentChange(n,i){this.criteria.teamId=n;let l=new Set;
305this.volunteerStatuses.programTeamSummaries.forEach(c=>{n.includes(c.teamID)&&l.add(c.programID)}),this.criteria.programId=Array.from(l),this.onFilterChange()}getEligiblePlayers(n,i){if(this.family.players)if(n&&i){let l=this.volunteerStatuses?.programTeamSummaries.filter(c=>c.programID===n&&c.teamID===i).map(c=>c.playerID);if(l?.length>0)return this.family.players.filter(c=>l.includes(c.playerID))}else return this.family.players;return[]}ngOnDestroy(){this.filterChangeSubscription.unsubscribe(),this.unsubscribe$.next(),this.unsubscribe$.complete()}};d.\u0275fac=function(i){return new(i||d)(I(re),I(fe),I(he),I(Ge),I($e),I(ve),I(pe))},d.\u0275cmp=Z({type:d,selectors:[["app-volunteering"]],viewQuery:function(i,l){if(i&1&&te(lt,5),i&2){let c;ne(c=ie())&&(l.optionsMenu=c.first)}},standalone:!1,decls:7,vars:1,consts:[["expandedrow",""],[1,"container"],[1,"d-flex","justify-content-between","align-items-center","mb-3"],[1,"text-h2","flex-grow-1","mb-0"],[1,"text-small",3,"routerLink"],[1,"row"],[1,"col-auto"],[1,"card","filters-card"],[1,"border-bottom","text-uppercase","text-medium","mb-3"],[1,"border-all","border-radius-sm","mx-1","p-2","full-width","d-flex","align-ites-center","mb-3",3,"ngClass"],[1,"highlight-green",3,"ngModelChange","inputId","ngModel","value"],["for","eventType_club",1,"ml-2","full-width"],[1,"text-medium","fw-600"],[1,"d-flex","full-width","justify-content-between","text-small","text-grey","line-height-3"],[1,"d-flex","full-width","text-green","justify-content-between","text-small","text-grey","line-height-3"],[1,"col"],["searchLabel","Apply Filters",3,"adminFilterReset","adminFilterSearch","showAdvanced","showLabels","hideSearch","marginTop"],["primary",""],[1,"col","pr-0"],["type","text","id","search","pInputText","","placeholder","Search by event title, task, or task description",1,"full-width",3,"ngModelChange","ngModel"],["for","search",1,"sr-only"],["advanced",""],[1,"form-group","col-12"],[1,"mt-3","d-block",3,"ngModelChange","onChange","ngModel","range","min","max","step"],[1,"d-flex","justify-content-between","text-small","mt-2"],[1,"row","mt-3"],[1,"form-group"],[1,"form-group","d-flex","align-items-end","mb-3"],[1,"flex-grow-1"],[1,"d-block"],["dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["for","facilitySelect"],["id","facilitySelect","optionLabel","label","optionValue","value","display","chip","placeholder","Select facilities","panelStyleClass","form-dropdown-panel","styleClass","form-dropdown-container","appendTo","body",3,"ngModelChange","onChange","options","ngModel","filter"],[1,"report-table","table-responsive"],["pTooltip","Points not awarded until an admin records your attendance at the event.","tooltipPosition","right",1,"far","fa-info-circle","ml-1","text-smallest"],[3,"ngModelChange","inputId","ngModel","value","styleClass"],[1,"ml-2","full-width",3,"for"],[1,"text-medium","fw-600","d-block"],[1,"text-small"],[1,"my-1"],[1,"nowrap"],[3,"ngModelChange","inputId","ngModel","value"],[1,"ml-2","d-inline"],[1,"table","table-striped","table-sm",3,"onLazyLoad","onRowExpand","onRowCollapse","value","paginator","rows","totalRecords","lazy","dataKey","rowHover","expandedRowKeys","tableStyle"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],["pSortableColumn","startDate"],["field","startDate"],["field","startTime"],["pSortableColumn","title"],["field","title"],["pSortableColumn","team"],["field","team"],[1,"fas","fa-chevron-down","ml-2",3,"click","ngClass"],[1,"sr-only"],[3,"startDate","endDate","clubEventTypeID"],[1,"text-medium"],["type","button",1,"btn","btn-tertiary","btn-sm","ml-2",3,"pRowToggler"],[1,"fas","fa-chevron-down","ml-2",3,"ngClass"],[1,"event-date",3,"ngClass"],["status","event",3,"text"],[3,"text","status"],["status","secondary",3,"text"],[1,"bg-grey-lt"],["colspan","12"],[1,"p-2"],[3,"value"],[1,"btn","btn-sm","btn-secondary",3,"click"],[1,"fa-solid","fa-ban"],["type","button",1,"btn","btn-sm","btn-tertiary",3,"click"],["colspan","5"],[1,"d-flex","align-items-center","gap-3"],["appendTo","body","optionLabel","user.firstName","placeholder","Available Parents",3,"onChange","options"],["appendTo","body","optionLabel","user.firstName","placeholder","Available Players",3,"onChange","options"],["td","",2,"text-align","left"],["skeletonType","table",3,"wrapInCard"]],template:function(i,l){i&1&&(a(0,"main"),e(1,` 306 `),a(2,"div",1),e(3,` 307 `),g(4,Kt,168,31)(5,Ht,3,1),o(),e(6,` 308`),o()),i&2&&(s(4),C(l.loadingEvents?5:4))},dependencies:[le,de,me,ce,ue,_e,we,Ne,Be,qe,Le,Ue,Ae,Pe,ke,Fe,Me,Ie,Ee,Re,Se,We,se,Oe],encapsulation:2});let r=d;return r})();var ot=(()=>{let d=class d{};d.\u0275fac=function(i){return new(i||d)},d.\u0275mod=F({type:d}),d.\u0275inj=P({imports:[z.forChild([{path:"",component:at,canActivate:[be,De],data:{metaTitle:"Volunteering"}}]),z]});let r=d;return r})();var ii=(()=>{let d=class d{};d.\u0275fac=function(i){return new(i||d)},d.\u0275mod=F({type:d}),d.\u0275inj=P({providers:[Je,et,Qe,Ve,Xe,Ze,ye,Te,tt,Ke,ze],imports:[je,Ye,ot]});let r=d;return r})();export{ii as VolunteeringModule};
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.