PageSourceSearch

https://midlandsoccerclub.com/chunk-MM42CXSH.js

js midlandsoccerclub.com collected 2026-10-09 22:40:09 UTC 49,206 bytes, 274 lines download raw bytes

1import{a as Pe}from"./chunk-YSLSSDP3.js";import{b as Me}from"./chunk-N5PZSBUY.js";import{Lb as De,Mb as Ae,d as H,gc as Ie,hc as ke}from"./chunk-PXZNPNHI.js";import"./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"./chunk-ZB64W4XA.js";import"./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{b as Se}from"./chunk-4D5SN44G.js";import"./chunk-FSUBAQYH.js";import"./chunk-7CVCGK4Q.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{Cc as fe,Ce as K,Ec as be,Gb as xe,Ia as Ce,Mb as j,Wc as Te,bf as we,d as pe,k as de,kh as Ee,le as M,mb as Y,qe as ve,ve as ye}from"./chunk-X5J6QTCG.js";import{$ as R,$a as _,Ad as G,C as te,Fa as c,Fb as B,H as V,Ib as e,Jb as y,Ka as D,Kb as I,L as A,Lb as k,Ma as L,Na as N,Ni as J,Qb as ae,Rb as oe,Sa as E,Sb as se,Th as F,U as T,Wc as re,Xa as P,_c as ce,bb as u,be as _e,d as U,di as ue,eb as ie,fa as g,fb as ne,ga as h,gb as m,hb as o,ib as s,jb as b,k as X,lc as v,ma as W,mc as Q,nc as w,pj as z,qb as S,qc as le,sb as x,tb as p,u as ee,vd as me,xb as $,xd as ge,yb as O,
1yd as he,zb as q}from"./chunk-SMW7PHYX.js";import"./chunk-BMIYOSOG.js";var ze=["cancelActionsMenu"];function Ye(a,r){return this.attendeeKey(r)}function je(a,r){a&1&&(e(0,`
2        `),o(1,"app-loader"),e(2,"Loading participants..."),s(),e(3,`
3    `))}function Ke(a,r){if(a&1){let i=S();e(0,`
4        `),o(1,"app-inline-alert",3),e(2,`
5            `),o(3,"span"),e(4,"Unable to load participants."),s(),e(5,`
6        `),s(),e(6,`
7        `),o(7,"div",4),e(8,`
8            `),o(9,"button",5),x("click",function(){g(i);let n=p();return h(n.retry())}),e(10,"Try Again"),s(),e(11,`
9        `),s(),e(12,`
10    `)}}function He(a,r){a&1&&(e(0,`
11        `),o(1,"p",6),e(2,"No one is booked on this session yet."),s(),e(3,`
12    `))}function We(a,r){a&1&&(e(0,`
13                                `),o(1,"div",15),e(2),s(),e(3,`
14                            `)),a&2&&(c(2),y(r))}function Qe(a,r){if(a&1&&(e(0,`
15                                `),o(1,"a",16),e(2,"View Profile"),s(),e(3,`
16                            `)),a&2){let i=p().$implicit,t=p(2);c(),m("routerLink",t.profileLink(i))}}function Ge(a,r){if(a&1){let i=S();e(0,`
17                                    `),o(1,"button",18),x("click",function(n){g(i);let l=p(2).$implicit,d=p(2);return h(d.openCancelMenu(l,n))}),e(2,`
18                                        `),b(3,"i",19),e(4,`Cancel
19                                        `),b(5,"i",20),e(6,`
20                                    `),s(),e(7,`
21                                `)}if(a&2){let i=p(2).$implicit,t=p(2);c(),m("disabled",t.isCancelling),P("aria-label","Cancel "+t.attendeeName(i)+"'s booking")}}function Je(a,r){if(a&1){let i=S();e(0,`
22                                    `),o(1,"button",21),x("click",function(){g(i);let n=p(2).$implicit,l=p(2);return h(l.cancelAttendee(n))}),e(2,`
23                                        `),b(3,"i",19),e(4,`Cancel
24                                    `),s(),e(5,`
25                                `)}if(a&2){let i=p(4);c(),m("disabled",i.isCancelling)}}function Ze(a,r){if(a&1&&(e(0,`
26                            `),o(1,"div",17),e(2,`
27                                `),_(3,Ge,8,2)(4,Je,6,1),s(),e(5,`
28                        `)),a&2){let i=p().$implicit;c(3),u(i.offersRefundOrCredit?3:i.showCancel?4:-1)}}function Xe(a,r){if(a&1&&(e(0,`
29            `),o(1,"div",8),e(2,`
30                `),o(3,"div",9),e(4,`
31                    `),o(5,"div",10),e(6,`
32                        `),o(7,"app-user-initials",11),e(8,`
33                        `),s(),e(9,`
34                        `),o(10,"div",12),e(11),_(12,We,4,1),s(),e(13,`
35                    `),s(),e(14,`
36                    `),o(15,"div",13),e(16,`
37                        `),o(17,"div",14),e(18,`
38                            `),_(19,Qe,4,1),s(),e(20,`
39                        `),_(21,Ze,6,1),s(),e(22,`
40                `),s(),e(23,`
41            `),s(),e(24,`
42        `)),a&2){let i,t=r.$implicit,n=p(2);c(7),m("firstName",t.firstName)("lastName",t.lastName)("id",t.playerID)("showCircle",!0),c(4),I(`
43                            `,n.attendeeName(t),`
44                            `),c(),u((i=n.slotSummary(t))?12:-1,i),c(7),u(t.playerID?19:-1),c(2),u(n.canCancel?21:-1)}}function et(a,r){if(a&1&&(e(0,`
45        `),o(1,"app-inline-alert",7),e(2,`
46            `),o(3,"span"),e(4),s(),e(5,`
47        `),s(),e(6,`
48        `),ie(7,Xe,25,8,null,null,Ye,!0)),a&2){let i=p();c(),m("alertType","info"),c(3),k("",i.totalCount," Participant",i.totalCount!==1?"s":""," Registered"),c(3),ne(i.attendees)}}function tt(a,r){if(a&1){let i=S();e(0,`
49    `),o(1,"app-yes-no-modal",22),x("onYesSelect",function(){g(i);let n=p();return h(n.confirmCancelAttendee())})("onNoSelect",function(){g(i);let n=p();return h(n.dismissCancel())}),e(2,`
50    `),s(),e(3,`
51`)}if(a&2){let i=p();c(),m("headerText",i.cancelConfirmHeader)("modalText",i.cancelConfirmText)("yesButtonText",i.cancelConfirmYesText)("loading",i.isCancelling)}}var it=500,Ue=(()=>{let r=class r{constructor(t,n){this.clubCalendarService=t,this.siteDataService=n,this.canCancel=!1,this.closed=new W,this.participantCancelled=new W,this.visible=!0,this.loading=!0,this.error=!1,this.attendees=[],this.totalCount=0,this.attendeePendingCancel=null,this.pendingCancelIssueCredit=!1,this.isCancelling=!1,this.cancelMenuItems=[],this.pageSize=it,this.unsubscribe$=new U}ngOnInit(){this.load()}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}get headerText(){return this.signUpTimeSlot?.timeSlotName||"Participants"}load(){if(!this.signUpTimeSlot?.clubCalendarEventID){this.error=!0,this.loading=!1;return}this.error=!1,this.loading=!0,this.clubCalendarService.getTimeSlotAttendance(this.signUpTimeSlot.clubCalendarEventID,1,this.pageSize).pipe(T(this.unsubscribe$),A(()=>{this.loading=!1})).subscribe({next:t=>
51{this.attendees=t?.attendees??[],this.attendees.forEach(n=>this.applyCancelAffordances(n)),this.totalCount=t?.totalCount??this.attendees.length},error:()=>{this.error=!0}})}retry(){this.load()}attendeeKey(t){return`${t?.playerID??""}-${t?.clubUserID??""}`}canCancelAttendee(t){return this.canCancel&&!!t?.playerID&&!!this.signUpTimeSlot?.scheduleSignUpID&&!!this.signUpTimeSlot?.signUpTimeSlotID}canChooseRefundOrCredit(t){return this.canCancelAttendee(t)&&!!t?.entityRegistrationID&&!t?.isBundleSession&&t?.hasRefundablePayment===!0}applyCancelAffordances(t){t.showCancel=this.canCancelAttendee(t),t.offersRefundOrCredit=this.canChooseRefundOrCredit(t)}attendeeName(t){return t?.fullName||`${t?.firstName??""} ${t?.lastName??""}`.trim()}slotSummary(t){let n=t?.registrationName;return n&&n!==this.headerText?n:null}profileLink(t){return["/admin/players",t.playerID,"overview"]}openCancelMenu(t,n){!this.canChooseRefundOrCredit(t)||this.isCancelling||(this.cancelMenuItems=[{label:"Issue Refund",icon:"fa-regular fa-credit-card",command:()=>this.cancelAttendee(t,!1)},{label:"Issue Credit",icon:"fa-regular fa-wallet",command:()=>this.cancelAttendee(t,!0)}],this.cancelActionsMenu.toggle(n))}cancelAttendee(t,n=!1){!this.canCancelAttendee(t)||this.isCancelling||(this.attendeePendingCancel=t,this.pendingCancelIssueCredit=n&&this.canChooseRefundOrCredit(t))}dismissCancel(){this.isCancelling||(this.attendeePendingCancel=null)}get cancelConfirmHeader(){return this.canChooseRefundOrCredit(this.attendeePendingCancel)?this.pendingCancelIssueCredit?"Cancel and issue a credit?":"Cancel and issue a refund?":"Cancel this booking?"}get cancelConfirmText(){let t=this.attendeeName(this.attendeePendingCancel);return this.canChooseRefundOrCredit(this.attendeePendingCancel)?this.pendingCancelIssueCredit?`This cancels ${t}'s booking on this session and issues them account credit instead of a refund. This cannot be undone.`:`This cancels ${t}'s booking on this session and refunds them to their original payment method. This cannot be undone.`:`This cancels ${t}'s booking on this session. This cannot be undone.`}get cancelConfirmYesText(){return this.canChooseRefundOrCredit(this.attendeePendingCancel)?this.pendingCancelIssueCredit?"Cancel & Issue Credit":"Cancel & Refund":"Cancel Booking"}confirmCancelAttendee(){let t=this.attendeePendingCancel;!t||this.isCancelling||(this.isCancelling=!0,this.clubCalendarService.cancelSignUpTimeSlotForPlayer(this.signUpTimeSlot.scheduleSignUpID,this.signUpTimeSlot.signUpTimeSlotID,t.playerID,this.pendingCancelIssueCredit).pipe(T(this.unsubscribe$),A(()=>{this.isCancelling=!1,this.attendeePendingCancel=null})).subscribe({next:n=>{if(n?.isSuccess===!1){this.siteDataService.showSiteErrorAlert(n.failures?.[0]?.reason||"There was a problem cancelling that booking.");return}this.siteDataService.showSiteSuccessAlert(this.cancelledMessage(t,n?.wasCredit,n?.wasRefunded)),this.attendees=this.attendees.filter(l=>l!==t),this.totalCount=Math.max(0,this.totalCount-1),this.participantCancelled.emit()},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem cancelling that booking.")}}))}cancelledMessage(t,n,l){let d=this.attendeeName(t);return n?`${d}'s booking was cancelled and a credit was issued.`:l?`${d}'s booking was cancelled and a refund was issued.`:`${d}'s booking was cancelled.`}close(){this.visible=!1,this.closed.emit()}};r.\u0275fac=function(n){return new(n||r)(D(M),D(z))},r.\u0275cmp=L({type:r,selectors:[["app-session-participants-dialog"]],viewQuery:function(n,l){if(n&1&&$(ze,5),n&2){let d;O(d=q())&&(l.cancelActionsMenu=d.first)}},inputs:{signUpTimeSlot:"signUpTimeSlot",canCancel:"canCancel"},outputs:{closed:"closed",participantCancelled:"participantCancelled"},standalone:!1,decls:11,vars:9,consts:[["cancelActionsMenu",""],["styleClass","standardWidthDialog","appendTo","body",3,"visibleChange","onHide","header","visible","modal","closable","draggable"],["appendTo","body",3,"popup","model"],["alertType","error",1,"mb-3"],[1,"text-center"],["type","button",1,"btn","btn-secondary",3,"click"],[1,"text-center","text-grey-lt","my-4"],[1,"d-block","mb-3",3,"alertType"],[1,"border-all","border-radius","px-3","mb-2"],[1,"list-row","py-2","text-medium"],[1,"list-row-body","d-flex","align-items-center"],["size","small",3,"firstName","lastName","
51id","showCircle"],[1,"text-default","pl-2"],[1,"list-row-meta"],[1,"list-row-item","list-row-item-lg"],[1,"text-smallest"],[1,"btn","btn-naked","btn-sm",3,"routerLink"],[1,"list-row-item","list-row-item-md"],["type","button","aria-haspopup","true",1,"btn","btn-red","btn-sm",3,"click","disabled"],[1,"fa-regular","fa-ban","mr-1"],[1,"fa-regular","fa-chevron-down","ml-1"],["type","button",1,"btn","btn-red","btn-sm",3,"click","disabled"],["alertType","error","yesButtonLoadingText","Cancelling","noButtonText","Keep Booking","dialogClass","standardWidthDialog",3,"onYesSelect","onNoSelect","headerText","modalText","yesButtonText","loading"]],template:function(n,l){if(n&1){let d=S();o(0,"p-dialog",1),se("visibleChange",function(f){return g(d),oe(l.visible,f)||(l.visible=f),h(f)}),x("onHide",function(){return l.close()}),e(1,`
52
53    `),_(2,je,4,0)(3,Ke,13,0)(4,He,4,0)(5,et,9,3),s(),e(6,`
54
55`),b(7,"p-menu",2,0),e(9,`
56
57`),_(10,tt,4,4)}n&2&&(m("header",l.headerText),ae("visible",l.visible),m("modal",!0)("closable",!0)("draggable",!1),c(2),u(l.loading?2:l.error?3:l.attendees.length?5:4),c(5),m("popup",!0)("model",l.cancelMenuItems),c(3),u(l.attendeePendingCancel?10:-1))},dependencies:[Ce,he,j,ve,K,xe,Y],encapsulation:2});let a=r;return a})();var at=["rowActionsMenu"];function ot(a,r){if(a&1&&e(0),a&2){let i=r.$implicit,t=p();k(`
58                `,i.label," (",t.countFor(i.value),`)
59            `)}}function st(a,r){a&1&&(e(0,`
60        `),b(1,"app-skeleton-template",7),e(2,`
61    `))}function lt(a,r){if(a&1){let i=S();e(0,`
62        `),o(1,"app-inline-alert",8),e(2,`
63            `),o(3,"span"),e(4,"Unable to load sessions. Please try again later."),s(),e(5,`
64        `),s(),e(6,`
65        `),o(7,"div",9),e(8,`
66            `),o(9,"button",10),x("click",function(){g(i);let n=p();return h(n.retryLoad())}),e(10,"Try Again"),s(),e(11,`
67        `),s(),e(12,`
68    `)}}function rt(a,r){if(a&1){let i=S();e(0,`
69            `),o(1,"app-inline-alert",11),e(2,`
70                `),o(3,"span",12),e(4,"Couldn't reach the server \u2014 showing what we have."),s(),e(5,`
71                `),o(6,"button",13),x("click",function(){g(i);let n=p(2);return h(n.retryLoad())}),e(7,"Retry"),s(),e(8,`
72            `),s(),e(9,`
73        `)}a&2&&(c(),m("isInline",!0))}function ct(a,r){if(a&1){let i=S();e(0,`
74                    `),o(1,"div",20),e(2,`
75                        `),e(3,`
76                        `),o(4,"button",21),x("click",function(){g(i);let n=p(3);return h(n.acceptAll())}),e(5,`
77                            `),b(6,"i",22),e(7),s(),e(8,`
78                    `),s(),e(9,`
79                `)}if(a&2){let i=p(3);c(4),m("disabled",!i.canAcceptAll||i.isAcceptingAll),c(3),I("Accept All (",i.acceptAllCount,`)
80                        `)}}function pt(a,r){a&1&&(e(0,`
81                        `),o(1,"tr"),e(2,`
82                            `),o(3,"th"),e(4,"Date"),s(),e(5,`
83                            `),o(6,"th"),e(7,"Time"),s(),e(8,`
84                            `),o(9,"th"),e(10,"Details"),s(),e(11,`
85                            `),o(12,"th"),e(13,"Price"),s(),e(14,`
86                            `),o(15,"th")(16,"span",23),e(17,"Actions"),s()(),e(18,`
87                        `),s(),e(19,`
88                    `))}function dt(a,r){if(a&1&&(e(0,`
89                                    `),o(1,"div"),e(2),s(),e(3,`
90                                `)),a&2){let i=p().$implicit;c(2),y(i.timeSlotName)}}function mt(a,r){if(a&1&&(e(0,`
91                                    `),o(1,"span"),e(2),s(),e(3,`
92                                `)),a&2){let i=p().$implicit;c(2),y(i.locationName)}}function gt(a,r){if(a&1&&(e(0,`
93                                    `),o(1,"span"),e(2),s(),e(3,`
94                                `)),a&2){let i=p().$implicit;c(2),I(" - ",i.facilityFieldName)}}function ht(a,r){if(a&1&&(e(0),v(1,"currency")),a&2){let i=p().$implicit;I(`
95                                    `,Q(1,1,i.price),`
96                                `)}}function _t(a,r){a&1&&e(0,`
97                                    \u2014
98                                `)}function ut(a,r){if(a&1){let i=S();e(0,`
99                        `),o(1,"tr",24),e(2,`
100                            `),o(3,"td"),e(4),v(5,"date"),s(),e(6,`
101                            `),o(7,"td"),e(8),v(9,"date"),v(10,"date"),s(),e(11,`
102                            `),o(12,"td"),e(13,`                                  
103                                `),_(14,dt,4,1),_(15,mt,4,1),_(16,gt,4,1),s(),e(17,`
104                            `),o(18,"td"),e(19,`
105                                `),_(20,ht,2,3)(21,_t,1,0),s(),e(22,`
106                            `),o(23,"td"),e(24,`
107                                `),o(25,"button",25),x("click",function(){let n=g(i).$implicit,l=p(3);return h(l.declineTimeSlot(n))}),e(26,`
108                                    `),b(27,"i",26),e(28,`Decline
109                                `),s(),e(29,`
110                                `),o(30,"button",27),x("click",function(){let n=g(i).$implicit,l=p(3);return h(l.acceptTimeSlot(n))}),e(31,`
111                                    `),b(32,"i",22),e(33,`Accept
112                                `),s(),e(34,`
113                            `),s(),e(35,`
114                        `),s(),e(36,`
115                    `)}if(a&2){let i=r.$implicit,t=p(3);c(),B("slot-highlighted",i.signUpTimeSlotID===t.highlightedTimeSlotID),m("id","signup-slot-"+i.signUpTimeSlotID),c(3),y(w(5,12,i.startDate,"EEE, MMM d, y")),c(4),k(`
116                                `,w(9,15,i.startDate,"h:mm aaaa"),` \xA0\u2013\xA0
117                                `,w(10,18,i.endDate,"h:mm aaaa"),`
118                            `),c(6),u(i.timeSlotName?14:-1),c(),u(i.locationName?15:-1),c(),u(i.facilityFieldName?16:-1),c(4),u(i.price!=null?20:21),c(5),m("disabled",i.isResponding||t.isAcceptingAll),c(5),m("disabled",i.isResponding||t.isAcceptingAll)}}function Ct(a,r){a&1&&(e(0,`
119                        `),o(1,"tr"),e(2,`
120                            `),o(3,"td",28),e(4,`
121                                `),b(5,"app-null-card",29),e(6,`
122                            `),s(),e(7,`
123                        `),s(),e(8,`
124                    `)),a&2&&(c(5),m("text","No sessions are waiting on your response."))}function xt(a,r){if(a&1&&(e(0,`
125                `),o(1,"h2",14),e(2,"Review Requests"),s(),e(3,`
126                `),o(4,"div",15),e(5,"The sessions below are waiting for your response. Accept the ones you can coach, or decline to release them to another coach."),s(),e(6,`
127                `),e(7,`
128                `),_(8,ct,10,2),o(9,"p-table",16),e(10,`
129                    `),E(11,pt,20,0,"ng-template",17),e(12,`
130                    `),E(13,ut,37,21,"ng-template",18),e(14,`
131                    `),E(15,Ct,9,1,"ng-template",19),e(16,`
132                `),s(),e(17,`
133            `)),a&2){let i=p(2);c(8),u(i.availabilityTimeSlots!=null&&i.availabilityTimeSlots.length?8:-1),c(),m("dataKey","signUpTimeSlotID")("value",i.availabilityTimeSlots)("paginator",!0)("alwaysShowPaginator",!1)("rows",20)("rowsPerPageOptions",i.rowsPerPageOptions)("responsiveLayout","scroll")}}function St(a,r){a&1&&(e(0,`
134                        `),o(1,"tr"),e(2,`
135                            `),o(3,"th"),e(4,"Date"),s(),e(5,`
136                            `),o(6,"th"),e(7,"Time"),s(),e(8,`
137                            `),o(9,"th"),e(10,"Details"),s(),e(11,`
138                            `),o(12,"th")(13,"span",23),e(14,"Actions"),s()(),e(15,`
139                        `),s(),e(16,`
140                    `))}function ft(a,r){if(a&1&&(e(0,`
141                                    `),o(1,"div"),e(2),s(),e(3,`
142                                `)),a&2){let i=p().$implicit;c(2),y(i.timeSlotName)}}function bt(a,r){if(a&1&&(e(0,`
143                                    `),o(1,"span"),e(2),s(),e(3,`
144                                `)),a&2){let i=p().$implicit;c(2),y(i.locationName)}}function Tt(a,r){if(a&1&&(e(0,`
145                                    `),o(1,"span"),e(2),s(),e(3,`
146                                `)),a&2){let i=p().$implicit;c(2),I(" - ",i.facilityFieldName)}}function vt(a,r){if(a&1){let i=S();e(0,`
147                        `),o(1,"tr",24),e(2,`
148                            `),o(3,"td"),e(4),v(5,"date"),s(),e(6,`
149                            `),o(7,"td"),e(8),v(9,"date"),v(10,"date"),s(),e(11,`
150                            `),o(12,"td"),e(13,`
151                                `),_(14,ft,4,1),_(15,bt,4,1),_(16,Tt,4,1),s(),e(17,`
152                            `),o(18,"td"),e(19,`
153                                `),o(20,"button",31),x("click",function(){let n=g(i).$implicit,l=p(3);return h(l.removeOpenTimeSlot(n))}),e(21,"Remove"),s(),e(22,`
154                            `),s(),e(23,`
155                        `),s(),e(24,`
156                    `)}if(a&2){let i=r.$implicit,t=p(3);c(),B("slot-highlighted",i.signUpTimeSlotID===t.highlightedTimeSlotID),m("id","signup-slot-"+i.signUpTimeSlotID),c(3),y(w(5,10,i.startDate,"EEE, MMM d, y")),c(4),k(`
157                                `,w(9,13,i.startDate,"h:mm aaaa"),` \xA0\u2013\xA0
158                                `,w(10,16,i.endDate,"h:mm aaaa"),`
159                            `),c(6),u(i.timeSlotName?14:-1),c(),u(i.locationName?15:-1),c(),u(i.facilityFieldName?16:-1),c(4),m("disabled",i.isResponding)}}function yt(a,r){a&1&&(e(0,`
160                        `),o(1,"tr"),e(2,`
161                            `),o(3,"td",32),e(4,`
162                                `),b(5,"app-null-card",29),e(6,`
163                            `),s(),e(7,`
164                        `),s(),e(8,`
165                    `)),a&2&&(c(5),m("text","No sessions are waiting on participant enrollment."))}function wt(a,r){if(a&1){let i=S();e(0,`
166                `),o(1,"h2",14),e(2,"Sessions Waiting on Participant Registration"),s(),e(3,`
167                `),o(4,"div",15),e(5,"You've confirmed you're available for these sessions, but no player has signed up yet. If another coach is also confirmed for the same time slot, only one of you will be assigned once someone books it."),s(),e(6,`
168                `),e(7,`
169                `),o(8,"p-table",30),x("onLazyLoad",function(n){g(i);let l=p(2);return h(l.onPageChange("open",n))})("firstChange",function(n){g(i);let l=p(2);return h(l.onFirstChange("open",n))}),e(9,`
170                    `),E(10,St,17,0,"ng-template",17),e(11,`
171                    `),E(12,vt,25,19,"ng-template",18),e(13,`
172                    `),E(14,yt,9,1,"ng-template",19),e(15,`
173                `),s(),e(16,`
174            `)}if(a&2){let i=p(2);c(8),m("dataKey","signUpTimeSlotID")("value",i.openTimeSlots)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",i.countFor("open"))("rows",i.rowsFor("open"))("first",i.firstFor("open"))("rowsPerPageOptions",i.rowsPerPageOptions)("loading",i.isRefreshing)("responsiveLayout","scroll")}}function Et(a,r){a&1&&(e(0,`
175                                `),o(1,"th"),e(2,"Attendance"),s(),e(3,`
176                            `))}function Dt(a,r){if(a&1&&(e(0,`
177                        `),o(1,"tr"),e(2,`
178                            `),o(3,"th"),e(4,"Date"),s(),e(5,`
179                            `),o(6,"th"),e(7,"Time"),s(),e(8,`
180                            `),o(9,"th"),e(10,"Details"),s(),e(11,`
181                            `),o(12,"th"),e(13,"Participants"),s(),e(14,`
182                            `),_(15,Et,4,0),o(16,"th"),e(17,"Price"),s(),e(18,`
183                            `),o(19,"th")(20,"span",23),e(21,"Actions"),s()(),e(22,`
184                        `),s(),e(23,`
185                    `)),a&2){let i=p(3);c(15),u(i.canTakeAttendance?15:-1)}}function At(a,r){if(a&1&&(e(0,`
186                                    `),o(1,"div"),e(2),s(),e(3,`
187                                `)),a&2){let i=p().$implicit;c(2),y(i.timeSlotName)}}function It(a,r){if(a&1&&(e(0,`
188                                    `),o(1,"span"),e(2),s(),e(3,`
189                                `)),a&2){let i=p().$implicit;c(2),y(i.locationName)}}function kt(a,r){if(a&1&&(e(0,`
190                                    `),o(1,"span"),e(2),s(),e(3,`
191                                `)),a&2){let i=p().$implicit;c(2),I(" - ",i.facilityFieldName)}}function Mt(a,r){if(a&1&&e(0),a&2){let i=p().$implicit;k(`
192                                        `,i.attendeeCount??0," / ",i.capacity??"\u2013",`
193                                    `)}}function Pt(a,r){a&1&&e(0,`
194                                        View participants
195                                    `)}function Ut(a,r){if(a&1){let i=S();e(0,`
196                                `),o(1,"td"),e(2,`
197                                    `),o(3,"button",36),x("click",function(){g(i);let n=p().$implicit,l=p(3);return h(l.openAttendance(n))}),e(4,"Take Attendance"),s(),e(5,`
198                                `),s(),e(6,`
199                            `)}if(a&2){let i=p(4);c(3),m("disabled",i.isOpeningAttendance)}}function Vt(a,r){if(a&1&&(e(0),v(1,"currency")),a&2){let i=p().$implicit;I(`
200                                    `,Q(1,1,i.price),`
201                                `)}}function Rt(a,r){a&1&&e(0,`
202                                    \u2014
203                                `)}function Lt(a,r){if(a&1){let i=S();e(0,`
204                        `),o(1,"tr",24),e(2,`
205                            `),o(3,"td"),e(4),v(5,"date"),s(),e(6,`
206                            `),o(7,"td"),e(8),v(9,"date"),v(10,"date"),s(),e(11,`
207                            `),o(12,"td"),e(13,`                                   
208                                `),_(14,At,4,1),_(15,It,4,1),_(16,kt,4,1),s(),e(17,`
209                            `),o(18,"td"),e(19,`
210                                `),e(20,`
211                                `),o(21,"button",33),x("click",function(){let n=g(i).$implicit,l=p(3);return h(l.openParticipants(n))}),e(22,`
212                                    `),_(23,Mt,1,2)(24,Pt,1,0),s(),e(25,`
213                            `),s(),e(26,`
214                            `),_(27,Ut,7,1),o(28,"td"),e(29,`
215                                `),_(30,Vt,2,3)(31,Rt,1,0),s(),e(32,`
216                            `),o(33,"td"),e(34,`
217                                `),o(35,"button",34),v(36,"date"),v(37,"date"),x("click",function(n){let l=g(i).$implicit,d=p(3);return h(d.openRowMenu(l,n))}),e(38,`
218                                    `),b(39,"i",35),e(40,`
219                                `),s(),e(41,`
220                            `),s(),e(42,`
221                        `),s(),e(43,`
222                    `)}if(a&2){let i=r.$implicit,t=p(3);c(),B("slot-highlighted",i.signUpTimeSlotID===t.highlightedTimeSlotID),m("id","signup-slot-"+i.signUpTimeSlotID),c(3),y(w(5,13,i.startDate,"EEE, MMM d, y")),c(4),k(`
223                                `,w(9,16,i.startDate,"h:mm aaaa"),` \xA0\u2013\xA0
224                                `,w(10,19,i.endDate,"h:mm aaaa"),`
225                            `),c(6),u(i.timeSlotName?14:-1),c(),u(i.locationName?15:-1),c(),u(i.facilityFieldName?16:-1),c(7),u(i.attendeeCount||i.capacity?23:24),c(4),u(t.canTakeAttendance?27:-1),c(3),u(i.price!=null?30:31),c(5),P("aria-label","Actions for "+w(36,22,i.startDate,"EEE, MMM d, y")+" at "+w(37,25,i.startDate,"h:mm aaaa"))}}function Nt(a,r){if(a&1&&(e(0,`
226                        `),o(1,"tr"),e(2,`
227                            `),o(3,"td"),e(4,`
228                                `),b(5,"app-null-card",29),e(6,`
229                            `),s(),e(7,`
230                        `),s(),e(8,`
231                    `)),a&2){let i=p(3);c(3),P("colspan",i.canTakeAttendance?7:6),c(2),m("text","No booked sessions yet.")}}function $t(a,r){if(a&1){let i=S();e(0,`
232                `),o(1,"h2",14),e(2,"Booked Sessions"),s(),e(3,`
233                `),o(4,"div",15),e(5,"Sessions players have booked with you."),s(),e(6,`
234                `),o(7,"p-table",30),x("onLazyLoad",function(n){g(i);let l=p(2);return h(l.onPageChange("bookings",n))})("firstChange",function(n){g(i);let l=p(2);return h(l.onFirstChange("bookings",n))}),e(8,`
235                    `),E(9,Dt,24,1,"ng-template",17),e(10,`
236                    `),E(11,Lt,44,28,"ng-template",18),e(12,`
237                    `),E(13,Nt,9,2,"ng-template",19),e(14,`
238                `),s(),e(15,`
239            `)}if(a&2){let i=p(2);c(7),m("dataKey","signUpTimeSlotID")("value",i.bookedTimeSlots)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",i.countFor("bookings"))("rows",i.rowsFor("bookings"))("first",i.firstFor("bookings"))("rowsPerPageOptions",i.rowsPerPageOptions)("loading",i.isRefreshing)("responsiveLayout","scroll")}}function Ot(a,r){if(a&1&&(e(0,`
240        `),e(1,`
241        `),_(2,rt,10,1),_(3,xt,18,8)(4,wt,17,11)(5,$t,16,11),e(6,`
242    `)),a&2){let i,t=p();c(2),u(t.showError?2:-1),c(),u((i=t.activeTab)==="availability"?3:i==="open"?4:i==="bookings"?5:-1)}}function qt(a,r){if(a&1){let i=S();e(0,`
243    `),o(1,"app-yes-no-modal",37),x("onYesSelect",function(){g(i);let n=p();return h(n.confirmCancelTimeSlot())})("onNoSelect",function(){g(i);let n=p();return h(n.cancelCancelTimeSlot())}),e(2,`
244    `),s(),e(3,`
245`)}if(a&2){let i=p();c(),m("loading",i.isCancelling)}}function Bt(a,r){if(a&1){let i=S();e(0,`
246    `),o(1,"app-yes-no-modal",38),x("onYesSelect",function(){g(i);let n=p();return h(n.confirmRemoveOpenTimeSlot())})("onNoSelect",function(){g(i);let n=p();return h(n.cancelRemoveOpenTimeSlot())}),e(2,`
247    `),s(),e(3,`
248`)}if(a&2){let i=p();c(),m("loading",i.slotPendingRemoval.isResponding)}}function Ft(a,r){if(a&1){let i=S();e(0,`
249    `),o(1,"app-session-participants-dialog",39),x("closed",function(){g(i);let n=p();return h(n.closeParticipants())})("participantCancelled",function(){g(i);let n=p();return h(n.onParticipantCancelled())}),e(2,`
250    `),s(),e(3,`
251`)}if(a&2){let i=p();c(),m("signUpTimeSlot",i.participantsSlot)("canCancel",i.canCancelSlot(i.participantsSlot))}}function zt(a,r){if(a&1){let i=S();e(0,`
252    `),o(1,"app-event-messaging-panel",40),x("visibleChange",function(n){g(i);let l=p();return h(l.onMessagingVisibleChange(n))}),e(2,`
253    `),s(),e(3,`
254`)}if(a&2){let i=p();c(),m("visible",i.showMessaging)("eventID",i.messagingSlot.clubCalendarEventID)("eventTitle",i.messagingSlot.timeSlotName||"Session Messages")("eventDate",i.messagingSlot.startDate)("currentClubUserID",i.currentClubUserID)}}function Yt(a,r){if(a&1){let i=S();e(0,`
255    `),o(1,"app-registration-attendance-tracking",41),x("modalClosed",function(){g(i);let n=p();return h(n.closeAttendance())})("attendanceChanged",function(){g(i);let n=p();return h(n.onAttendanceChanged())}),e(2,`
256    `),s(),e(3,`
257`)}if(a&2){let i=p();c(),m("calEvent",i.attendanceEvent)("triggerDialog",!0)}}function jt(a,r){if(a&1){let i=S();e(0,`
258    `),o(1,"app-yes-no-modal",42),x("onYesSelect",function(){g(i);let n=p();return h(n.confirmAcceptAll())})("onNoSelect",function(){g(i);let n=p();return h(n.cancelAcceptAll())}),e(2,`
259    `),s(),e(3,`
260`)}if(a&2){let i=p();c(),m("loading",i.isAcceptingAll)}}var Ve=(()=>
260{let r=class r{countFor(t){return this.tabState[t].total}constructor(t,n,l,d,C,f){this.clubCalendarService=t,this.router=n,this.route=l,this.siteDataService=d,this.authorizeService=C,this.pageVisibilityService=f,this.isAcceptingAll=!1,this.showAcceptAllConfirm=!1,this.activeTab="bookings",this.availabilityTimeSlots=[],this.bookedTimeSlots=[],this.openTimeSlots=[],this.tabOptions=[{label:"Booked",value:"bookings"},{label:"Waiting on Participant",value:"open"},{label:"Review Requests",value:"availability"}],this.canCancelTimeSlot=!1,this.hasSignUpsPermission=!1,this.canTakeAttendance=!1,this.moduleEnabled=!1,this.slotPendingCancel=null,this.isCancelling=!1,this.slotPendingRemoval=null,this.attendanceEvent=null,this.isOpeningAttendance=!1,this.participantsSlot=null,this.messagingSlot=null,this.showMessaging=!1,this.rowMenuItems=[],this.targetTimeSlotID=null,this.targetTab=null,this.targetRequestSeq=null,this.highlightedTimeSlotID=null,this.highlightTimers=[],this.pageSize=20,this.availabilityPageSize=100,this.rowsPerPageOptions=[20,50,100],this.tabState={availability:{page:0,pageSize:this.availabilityPageSize,first:0,total:0,pendingPage:null,loading:!1,loaded:!1,stale:!1,showError:!1,requestSeq:0,type:H.AVAILABILITY},open:{page:0,pageSize:this.pageSize,first:0,total:0,pendingPage:null,loading:!1,loaded:!1,stale:!1,showError:!1,requestSeq:0,type:H.OPEN},bookings:{page:0,pageSize:this.pageSize,first:0,total:0,pendingPage:null,loading:!1,loaded:!1,stale:!1,showError:!1,requestSeq:0,type:H.BOOKINGS}},this.appliedDeepLinkKey="",this.lastCountsReadAt=0,this.unsubscribe$=new U}ngOnInit(){this.applyDeepLinkParams(this.route.snapshot.queryParamMap),this.listenForDeepLinkChanges(),this.checkAccess(),this.loadTabForDeepLink(),this.readCounts(),this.refreshCountsOnReturnToPage()}readCounts(t=!1){this.lastCountsReadAt=Date.now();let n=Object.keys(this.tabState),l=new Map(n.map(d=>[d,this.tabState[d].requestSeq]));this.clubCalendarService.getCoachAssignedScheduleSignUpTimeSlotCounts().pipe(T(this.unsubscribe$)).subscribe({next:d=>{n.forEach(C=>this.applyCount(C,this.countFromResponse(d,C),l.get(C),t))},error:()=>{}})}applyCount(t,n,l,d){let C=this.tabState[t];C.requestSeq!==l||n===C.total||(C.total=n,!(!d||!C.loaded||C.loading)&&(t===this.activeTab?this.reloadCurrentPage(t):this.markTabStale(t)))}countFromResponse(t,n){switch(n){case"availability":return t?.availability??0;case"open":return t?.open??0;case"bookings":return t?.bookings??0}}refreshCountsOnReturnToPage(){this.pageVisibilityService.returnedToPage$.pipe(T(this.unsubscribe$)).subscribe({next:()=>{Date.now()-this.lastCountsReadAt>=r.CountsRefreshThrottleMs&&this.readCounts(!0)},error:()=>{}})}checkAccess(){ee({user:this.authorizeService.getUser().pipe(V(1)),options:this.siteDataService.getClubOptions([J.APPOINTMENT_SCHEDULING]).pipe(V(1)),calendarSettings:this.clubCalendarService.getClubCalendarSettings().pipe(V(1),te(()=>X(null)))}).pipe(T(this.unsubscribe$)).subscribe({next:({user:t,options:n,calendarSettings:l})=>{this.hasSignUpsPermission=!!t?.[F.SignUps],this.canTakeAttendance=!!t?.[F.ClubCalendar]&&l?.isAttendanceTrackingEnabled===!0,this.canCancelTimeSlot=!!t?.[F.Refunds],this.currentClubUserID=+t?.userID,this.moduleEnabled=n?.find(d=>d.optionID===J.APPOINTMENT_SCHEDULING)?.boolValue===!0,(!this.hasSignUpsPermission||!this.moduleEnabled)&&this.redirectToDashboard()},error:()=>{this.canCancelTimeSlot=!1,this.canTakeAttendance=!1,this.redirectToDashboard()}})}redirectToDashboard(){this.router.navigate(["/admin/dashboard"])}rowsFor(t){return this.tabState[t].pageSize}firstFor(t){return this.tabState[t].first}onFirstChange(t,n){this.tabState[t].first=n}pageAtPaginator(t){let n=this.tabState[t];return Math.floor(n.first/n.pageSize)+1}keepRespondingRows(t,n){let l=new Map(this.getList(t).filter(d=>d.isResponding).map(d=>[d.signUpTimeSlotID,d]));return l.size===0?n:n.map(d=>l.get(d.signUpTimeSlotID)??d)}applyDeepLinkParams(t){this.appliedDeepLinkKey=this.deepLinkKey(t);let n=t.get("tab");(n==="availability"||n==="open"||n==="bookings")&&(this.activeTab=n);let l=Number(t.get("timeSlotID"));this.targetTimeSlotID=Number.isInteger(l)&&l>0?l:null,this.targetTab=this.targetTimeSlotID===null?null:this.activeTab}listenForDeepLinkChanges(){this.route.queryParamMap.pipe(T(this.unsubscribe$)).subscribe({next:t=>{this.handleDeepLinkChange(t)}
260,error:()=>{this.siteDataService.showSiteErrorAlertDefaultGET()}})}handleDeepLinkChange(t){this.deepLinkKey(t)!==this.appliedDeepLinkKey&&(this.applyDeepLinkParams(t),this.loadTabForDeepLink())}loadTabForDeepLink(){this.loadTab(this.activeTab,!0),this.maybeHighlightTargetSlot(this.activeTab)}clearTarget(){this.targetTimeSlotID=null,this.targetTab=null,this.targetRequestSeq=null}deepLinkKey(t){return`${t.get("tab")??""}|${t.get("timeSlotID")??""}`}ngOnDestroy(){this.highlightTimers.forEach(clearTimeout),this.highlightTimers=[],this.unsubscribe$.next(),this.unsubscribe$.complete()}removeTimeSlot(t,n){let l=this.tabState[t],d=this.getList(t).length;if(this.setList(t,this.getList(t).filter(Le=>Le.signUpTimeSlotID!==n)),l.showError=!1,this.getList(t).length===d)return;l.total=Math.max(0,l.total-1);let C=l.loading;l.requestSeq++,l.pendingPage=null,l.loading=!1,(C||l.total>this.getList(t).length)&&(t===this.activeTab?this.reloadCurrentPage(t):(l.loaded=!1,l.stale=!0))}maybeHighlightTargetSlot(t,n=!1){if(this.targetTimeSlotID===null||t!==this.targetTab)return;if(t!==this.activeTab){this.clearTarget();return}if(this.targetRequestSeq!==null&&this.tabState[t].requestSeq!==this.targetRequestSeq){this.clearTarget();return}let l=this.targetTimeSlotID;if(!this.getList(t).some(f=>f.signUpTimeSlotID===l)){n&&(this.clearTarget(),this.siteDataService.showSiteWarnAlert("That session is no longer pending."));return}this.clearTarget(),this.highlightedTimeSlotID=l;let d=setTimeout(()=>{document.getElementById(`signup-slot-${l}`)?.scrollIntoView({behavior:"smooth",block:"center"}),this.forgetHighlightTimer(d)},300);this.highlightTimers.push(d);let C=setTimeout(()=>{this.highlightedTimeSlotID===l&&(this.highlightedTimeSlotID=null),this.forgetHighlightTimer(C)},4e3);this.highlightTimers.push(C)}forgetHighlightTimer(t){this.highlightTimers=this.highlightTimers.filter(n=>n!==t)}markTabStale(t){let n=this.tabState[t];n.requestSeq++,n.loading=!1,n.pendingPage=null,n.loaded=!1,n.stale=!0}invalidateOtherTabs(t){Object.keys(this.tabState).forEach(n=>{n!==t&&this.markTabStale(n)}),this.activeTab!==t&&this.reloadCurrentPage(this.activeTab)}refresh(){this.reloadCurrentPage(this.activeTab),this.readCounts()}reloadCurrentPage(t){this.loadPage(t,this.tabState[t].page||1,{restart:!0})}loadTab(t,n=!1){this.loadPage(t,1,{restart:!0,armTarget:n})}loadPage(t,n,l={}){let d=this.tabState[t],C=l.restart?++d.requestSeq:d.requestSeq;l.armTarget&&(this.targetRequestSeq=C),d.pendingPage=n,l.restart&&(d.first=(n-1)*d.pageSize),d.loading=!0,d.showError=!1,this.clubCalendarService.getCoachAssignedScheduleSignUpTimeSlots({page:n,pageSize:d.pageSize,timeSlotType:d.type}).pipe(T(this.unsubscribe$)).subscribe({next:f=>{if(this.siteDataService.hideSiteLoader(),!(d.requestSeq!==C||d.pendingPage!==n)){if(f.results.length===0&&n>1){this.loadPage(t,1,{restart:!0});return}d.pendingPage=null,this.setList(t,this.keepRespondingRows(t,f.results)),d.page=n,d.first=(n-1)*d.pageSize,d.total=f.count,d.loaded=!0,d.loading=!1,d.stale=!1,this.maybeHighlightTargetSlot(t,this.getList(t).length>=f.count)}},error:()=>{this.siteDataService.hideSiteLoader(),!(d.requestSeq!==C||d.pendingPage!==n)&&(d.pendingPage=null,d.loading=!1,d.showError=!0,this.siteDataService.showSiteErrorAlert("Unable to load sessions."))}})}onPageChange(t,n){let l=this.tabState[t],d=n.rows||l.pageSize,C=Math.floor((n.first??0)/d)+1,f=d===l.pageSize;f&&(l.pendingPage===C||l.loaded&&!l.stale&&l.page===C)||(l.pageSize=d,this.loadPage(t,C,{restart:!f}))}get isTabLoading(){let t=this.tabState[this.activeTab];return t.loading&&!t.loaded}get isRefreshing(){let t=this.tabState[this.activeTab];return t.loading&&t.loaded}get showError(){return this.tabState[this.activeTab]?.showError??!1}get activeTabHasContent(){return this.getList(this.activeTab).length>0}retryLoad(){if(this.targetTimeSlotID!==null&&this.targetTab===this.activeTab){this.loadTabForDeepLink();return}this.loadPage(this.activeTab,this.pageAtPaginator(this.activeTab),{restart:!0})}get canAcceptAll(){return this.tabState.availability.loaded&&this.availabilityTimeSlots.length>0&&!this.availabilityTimeSlots.some(t=>t.isResponding)}get acceptAllCount(){return Math.max(this.tabState.availability.total,this.availabilityTimeSlots.length)}getList(t){switch(t){case"availability":return this.availabilityTimeSlots;case"open":return this.openTimeSlots;case"bookings":return this.bookedTimeSlots}}
260setList(t,n){switch(t){case"availability":this.availabilityTimeSlots=n;break;case"open":this.openTimeSlots=n;break;case"bookings":this.bookedTimeSlots=n;break}}setTab(t){this.activeTab=t;let n=this.targetTab?this.tabState[this.targetTab]:null;this.targetTimeSlotID!==null&&t!==this.targetTab&&n&&!n.loading&&this.clearTarget();let l=this.tabState[t];(!l.loaded||l.stale)&&!l.loading&&this.loadTab(t)}acceptAll(){!this.canAcceptAll||this.isAcceptingAll||(this.showAcceptAllConfirm=!0)}cancelAcceptAll(){this.showAcceptAllConfirm=!1}confirmAcceptAll(){if(!this.canAcceptAll||this.isAcceptingAll)return;this.isAcceptingAll=!0;let t=this.tabState.availability;this.clubCalendarService.acceptAllScheduleSignUpTimeSlotAssignments().pipe(T(this.unsubscribe$),A(()=>{this.isAcceptingAll=!1,this.showAcceptAllConfirm=!1})).subscribe({next:()=>{this.siteDataService.showSiteSuccessAlert("All sessions accepted."),this.availabilityTimeSlots=this.availabilityTimeSlots.filter(n=>n.isResponding),t.page=0,t.total=0,this.markTabStale("availability"),this.invalidateOtherTabs("availability"),this.activeTab==="availability"&&this.loadTab("availability"),this.readCounts()},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem accepting sessions.")}})}canRespondTo(t){return!!t?.signUpTimeSlotID&&!t.isResponding&&!this.isAcceptingAll}acceptTimeSlot(t){this.respondToTimeSlot(t,!0)}declineTimeSlot(t){this.respondToTimeSlot(t,!1)}respondToTimeSlot(t,n){if(!this.canRespondTo(t))return;t.isResponding=!0;let l={timeSlotID:t.signUpTimeSlotID,isAccepted:n};this.clubCalendarService.respondToScheduleSignUpTimeSlotAssignment(l).pipe(T(this.unsubscribe$),A(()=>{t.isResponding=!1})).subscribe({next:()=>{this.siteDataService.showSiteSuccessAlert(n?"Session accepted.":"Session declined."),this.removeTimeSlot("availability",t.signUpTimeSlotID),this.invalidateOtherTabs("availability"),this.readCounts()},error:()=>{this.siteDataService.showSiteErrorAlert(n?"There was a problem accepting the session.":"There was a problem declining the session.")}})}removeOpenTimeSlot(t){this.canRespondTo(t)&&(this.slotPendingRemoval=t)}cancelRemoveOpenTimeSlot(){this.slotPendingRemoval?.isResponding||(this.slotPendingRemoval=null)}confirmRemoveOpenTimeSlot(){let t=this.slotPendingRemoval;if(!t||!this.canRespondTo(t))return;t.isResponding=!0;let n={timeSlotID:t.signUpTimeSlotID,isAccepted:!1};this.clubCalendarService.respondToScheduleSignUpTimeSlotAssignment(n).pipe(T(this.unsubscribe$),A(()=>{t.isResponding=!1,this.slotPendingRemoval=null})).subscribe({next:()=>{this.siteDataService.showSiteSuccessAlert("Your availability was removed."),this.removeTimeSlot("open",t.signUpTimeSlotID),this.invalidateOtherTabs("open"),this.readCounts()},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem removing your availability.")}})}openRowMenu(t,n){this.rowMenuItems=[{label:"Message participants",icon:"fa-regular fa-envelope",command:()=>this.openMessaging(t)}],this.canCancelSlot(t)&&this.rowMenuItems.push({label:"Cancel Session",icon:"fa-regular fa-trash",disabled:this.isCancelling,command:()=>this.cancelTimeSlot(t)}),this.rowActionsMenu.toggle(n)}canCancelSlot(t){return this.canCancelTimeSlot&&!!t?.scheduleSignUpID&&!!t?.signUpTimeSlotID}cancelTimeSlot(t){if(!(!this.canCancelTimeSlot||this.isCancelling)){if(!t?.scheduleSignUpID||!t?.signUpTimeSlotID){this.siteDataService.showSiteErrorAlert("Unable to cancel this session.");return}this.slotPendingCancel=t}}cancelCancelTimeSlot(){this.isCancelling||(this.slotPendingCancel=null)}confirmCancelTimeSlot(){let t=this.slotPendingCancel;!t||this.isCancelling||(this.isCancelling=!0,this.clubCalendarService.cancelEntireSignUpTimeSlot(t.scheduleSignUpID,t.signUpTimeSlotID).pipe(T(this.unsubscribe$),A(()=>{this.isCancelling=!1,this.slotPendingCancel=null})).subscribe({next:n=>{n?.participantResults?.some(d=>!d.isSuccess)?this.siteDataService.showSiteWarnAlert("Session cancelled, but some participants could not be refunded."):this.siteDataService.showSiteSuccessAlert("Session cancelled."),this.removeTimeSlot("bookings",t.signUpTimeSlotID),this.invalidateOtherTabs("bookings"),this.readCounts()},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem cancelling the session.")}}))}openAttendance(t){if(!this.isOpeningAttendance){if(!t?.clubCalendarEventID){this.siteDataService.showSiteErrorAlert("This session has no calendar event to track attendance on.");return}this.isOpeningAttendance=!0,this.clubCalendarService.getClubCalendarEvent(t.clubCalendarEventID).pipe(T(this.unsubscribe$),A(()=>{this.isOpeningAttendance=!1})).subscribe({next:n=>{this.attendanceEvent=n},error:()=>
260{this.siteDataService.showSiteErrorAlert("Unable to load this session's participants.")}})}}openParticipants(t){if(!t?.clubCalendarEventID){this.siteDataService.showSiteErrorAlert("This session has no calendar event to list participants from.");return}this.participantsSlot=t}closeParticipants(){this.participantsSlot=null}openMessaging(t){if(!t?.clubCalendarEventID){this.siteDataService.showSiteErrorAlert("This session has no calendar event to message participants on.");return}this.messagingSlot=t,this.showMessaging=!0}onMessagingVisibleChange(t){this.showMessaging=t,t||(this.messagingSlot=null)}onParticipantCancelled(){this.markTabStale("bookings"),this.readCounts()}goToTimeSlot(t){t?.scheduleSignUpID&&this.router.navigate(["/admin/calendar/sign-ups/coach",t.scheduleSignUpID])}closeAttendance(){this.attendanceEvent=null}onAttendanceChanged(){this.markTabStale("bookings")}};r.CountsRefreshThrottleMs=6e4,r.\u0275fac=function(n){return new(n||r)(D(M),D(ge),D(me),D(z),D(ue),D(Pe))},r.\u0275cmp=L({type:r,selectors:[["app-coach-manage-sign-ups"]],viewQuery:function(n,l){if(n&1&&$(at,5),n&2){let d;O(d=q())&&(l.rowActionsMenu=d.first)}},standalone:!1,decls:27,vars:14,consts:[["item",""],["rowActionsMenu",""],["role","main"],["pageTitle","Manage Sessions",3,"showBackButton","parentLinkUrl"],[1,"mt-3","mb-4","d-inline-flex","justify-content-center","full-width"],["optionLabel","label","optionValue","value","data-testid","manage-sessions-tabs",3,"onChange","options","ngModel","allowEmpty"],["appendTo","body",3,"popup","model"],["skeletonType","calendar-row"],["alertType","error",1,"mb-3"],[1,"text-center","mb-3"],["type","button",1,"btn","btn-secondary",3,"click"],["alertType","warning",1,"mb-3",3,"isInline"],[1,"mr-2"],["type","button",1,"btn","btn-naked","btn-sm",3,"click"],[1,"text-large","fw-500","mb-1"],[1,"text-medium","mb-3"],[3,"dataKey","value","paginator","alwaysShowPaginator","rows","rowsPerPageOptions","responsiveLayout"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],[1,"d-flex","justify-content-end","mb-3"],["type","button","data-testid","accept-all",1,"btn","btn-primary",3,"click","disabled"],[1,"fa-regular","fa-check","mr-1"],[1,"sr-only"],[3,"id"],["type","button",1,"btn","btn-sm","mr-3",3,"click","disabled"],[1,"fa-regular","fa-times","mr-1"],["type","button",1,"btn","btn-sm","btn-primary",3,"click","disabled"],["colspan","5"],[3,"text"],[3,"onLazyLoad","firstChange","dataKey","value","lazy","paginator","alwaysShowPaginator","totalRecords","rows","first","rowsPerPageOptions","loading","responsiveLayout"],["type","button",1,"btn","btn-sm","btn-icon-trash",3,"click","disabled"],["colspan","4"],[1,"btn-a11y","text-small","text-primary-link",3,"click"],["type","button","aria-haspopup","true",1,"btn","btn-tertiary","btn-sm",3,"click"],[1,"fa-regular","fa-ellipsis-vertical"],[1,"btn","btn-sm",3,"click","disabled"],["headerText","Cancel this session?","modalText","This cancels the entire session for every participant and refunds them. This cannot be undone.","alertType","error","yesButtonText","Cancel Session","yesButtonLoadingText","Cancelling","noButtonText","Keep Session","dialogClass","standardWidthDialog",3,"onYesSelect","onNoSelect","loading"],["headerText","Remove your availability?","modalText","By selecting remove, you'll no longer be available for this session. If you're the only coach assigned, players will no longer be able to book the session. If another coach is assigned, the session will remain available and they'll stay assigned.","alertType","warning","yesButtonText","Remove","yesButtonLoadingText","Removing","noButtonText","Keep It","dialogClass","standardWidthDialog",3,"onYesSelect","onNoSelect","loading"],[3,"closed","participantCancelled","signUpTimeSlot","canCancel"],[3,"visibleChange","visible","eventID","eventTitle","eventDate","currentClubUserID"],[3,"modalClosed","attendanceChanged","calEvent","triggerDialog"],["headerText","Accept all sessions?","modalText","This accepts every pending session assigned to you, including any not shown in this list.","alertType","warning","yesButtonText","Accept All","yesButtonLoadingText","Accepting","noButtonText","Cancel","dialogClass","standardWidthDialog",3,"onYesSelect","onNoSelect","loading"]],template:function(n,l){n&1&&(o(0,"main",2),e(1,`
261    `),o(2,"app-admin-header",3),e(3,`
262    `),s(),e(4,`
263
264    `),o(5,"div",4),e(6,`
265        `),o(7,"p-selectButton",5),x("onChange",function(C){return l.setTab(C.value)}),e(8,`
266            `),E(9,ot,1,2,"ng-template",null,0,le),e(11,`
267        `),s(),e(12,`
268    `),s(),e(13,`
269
270    `),_(14,st,3,0)(15,lt,13,0)(16,Ot,7,2),s(),e(17,`
271
272`),b(18,"p-menu",6,1),e(20,`
273
274`),_(21,qt,4,1),_(22,Bt,4,1),_(23,Ft,4,2),_(24,zt,4,5),_(25,Yt,4,2),_(26,jt,4,1)),n&2&&(c(2),m("showBackButton",!0)("parentLinkUrl","/admin/dashboard"),c(5),m("options",l.tabOptions)("ngModel",l.activeTab)("allowEmpty",!1),c(7),u(l.isTabLoading?14:l.showError&&!l.activeTabHasContent?15:16),c(4),m("popup",!0)("model",l.rowMenuItems),c(3),u(l.slotPendingCancel?21:-1),c(),u(l.slotPendingRemoval?22:-1),c(),u(l.participantsSlot?23:-1),c(),u(l.messagingSlot?24:-1),c(),u(l.attendanceEvent?25:-1),c(),u(l.showAcceptAllConfirm?26:-1))},dependencies:[pe,de,_e,Te,j,ye,K,we,be,Y,fe,Ae,De,Ue,ce,re],styles:[".slot-highlighted[_ngcontent-%COMP%]{border:2px solid var(--primary-link);animation:_ngcontent-%COMP%_slot-highlight-pulse 1s ease-in-out 0s 2}@keyframes _ngcontent-%COMP%_slot-highlight-pulse{0%,to{box-shadow:0 0 color-mix(in srgb,var(--primary-link) 0%,transparent)}50%{box-shadow:0 0 0 4px color-mix(in srgb,var(--primary-link) 35%,transparent)}}"]});let a=r;return a})();var Re=(()=>{let r=class r{};r.\u0275fac=function(n){return new(n||r)},r.\u0275mod=N({type:r}),r.\u0275inj=R({imports:[G.forChild([{path:"",component:Ve,canActivate:[Se],data:{admin:!0,metaTitle:"Manage Sessions"}}]),G]});let a=r;return a})();var Wi=(()=>{let r=class r{};r.\u0275fac=function(n){return new(n||r)},r.\u0275mod=N({type:r}),r.\u0275inj=R({providers:[M],imports:[Ee,Re,Me,ke,Ie]});let a=r;return a})();export{Wi as CoachManageSignUpsModule};

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.