1import{a as Ye,b as ei}from"./chunk-S4KZFP6D.js";import{a as Xe,b as Ze}from"./chunk-QTPEYOBK.js";import{a as Ke,b as We}from"./chunk-JAW6X6QT.js";import{b as Je}from"./chunk-B73O2JXS.js";import"./chunk-MOV3SWGJ.js";import"./chunk-IIL5ULVK.js";import{a as K}from"./chunk-HUAQNSI3.js";import"./chunk-3CBEWH77.js";import"./chunk-JL5JJMSL.js";import{a as He}from"./chunk-MCU24RQK.js";import"./chunk-V2ZNI7PU.js";import"./chunk-HSJ2CSTO.js";import"./chunk-MSSEBO72.js";import"./chunk-FP3J5B6H.js";import{a as ze}from"./chunk-BQRBWX66.js";import"./chunk-L5ZOOU2J.js";import"./chunk-KOPGZV6B.js";import"./chunk-BTQPKA7U.js";import"./chunk-RESNPHP2.js";import"./chunk-AF6G7XUW.js";import"./chunk-5MLCZDLN.js";import"./chunk-XTQNEHPV.js";import"./chunk-HETGIIFW.js";import"./chunk-QNNPLEYM.js";import"./chunk-VSK3DNK7.js";import"./chunk-6F4SDY22.js";import{a as pe,c as Ge}from"./chunk-XAXLMUF6.js";import"./chunk-ADMKBOBN.js";import"./chunk-LCPPMNQ3.js";import"./chunk-RF4ESXXV.js";import"./chunk-IN6JNWJL.js";import"./chunk-GT2RX7V4.js";import"./chunk-WZTRTKC4.js";import"./chunk-NTPMZIRS.js";import"./chunk-DBNHDKST.js";import"./chunk-CHFQMRFX.js";import"./chunk-4CVZBQNN.js";import"./chunk-N5PZSBUY.js";import"./chunk-4T73AMAL.js";import"./chunk-G2OHGTWE.js";import"./chunk-NAW6KKAQ.js";import"./chunk-GNX3F6NH.js";import{d as Ve}from"./chunk-QQKJHWTF.js";import{$b as Qe,Pb as de,Rb as J,Sb as F,_b as me,ac as Oe,bc as qe,c as U}from"./chunk-PXZNPNHI.js";import"./chunk-KWNDGQWR.js";import"./chunk-2ZFY6MCW.js";import"./chunk-KQ7PEKEE.js";import"./chunk-KVMIYEBS.js";import{c as Le}from"./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"./chunk-CYDDDATF.js";import"./chunk-GWQPV7EH.js";import"./chunk-RQ74XYI3.js";import"./chunk-3IFGWXMA.js";import"./chunk-EME7BUOO.js";import"./chunk-JKMNVQUA.js";import"./chunk-QH3IRCHN.js";import"./chunk-PLEH3NAH.js";import"./chunk-GXCJ5QS4.js";import{b as H}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{a as Ne}from"./chunk-B6XXRKU5.js";import"./chunk-6Q5DDO7R.js";import"./chunk-RW2MVE4O.js";import"./chunk-3ZVRFUA4.js";import"./chunk-H4PCL6BZ.js";import{a as ke}from"./chunk-NXTJBJRP.js";import"./chunk-U22BTVEZ.js";import{$b as M,$e as Be,Gd as z,Hd as le,Kb as je,Mb as Me,Vc as $e,Wc as re,kd as ae,kh as Pe,ve as ce}from"./chunk-X5J6QTCG.js";import{$ as te,$a as u,$c as we,Ad as Ce,E as Ue,Fa as c,Fb as Y,Ib as i,Ka as m,Kb as N,Ma as E,Na as ne,Ni as Re,Q as be,Sa as Ae,T as Te,U as f,W as q,_ as ie,ba as P,bb as S,cc as De,d as x,db as Se,eb as he,fa as b,fb as fe,ga as T,gb as g,hb as a,ib as l,jb as h,jj as Fe,k as Z,lc as ge,lh as oe,mh as se,oc as ve,pj as y,qb as j,qc as ye,r as _e,sb as _,sh as Ee,tb as p,u as ee,vd as R,wd as Ie,xb as V,xd as G,yb as A,z as I,zb as D}from"./chunk-SMW7PHYX.js";import{a as B,b as xe}from"./chunk-BMIYOSOG.js";var w=(()=>{let s=class s extends Fe{constructor(e,o,r){super(),this.siteDataService=e,this.scheduleSignUpService=o,this.clubService=r,this.unsubscribe$=new x,this.toggleParentAdminHeaderSubj=new x,this.toggleParentAdminHeaderVisability$=this.toggleParentAdminHeaderSubj.asObservable()}initialize(e){this.reset(),this.set(o=>{o.loading=!0,o.scheduleSignUpID=e}),ee({session:this.scheduleSignUpService.getScheduleSignUp(e),staffAssignments:this.scheduleSignUpService.getScheduleSignUpStaffAssignments(e),club:this.clubService.getCurrentClub()}).pipe(f(this.unsubscribe$)).subscribe({next:o=>{this.set(r=>{r.signUp=xe(B({},o.session),{staffAssignments:o.staffAssignments,staffIDs:o.staffAssignments?.map(d=>d.clubUserID)}),r.club=o.club,r.loading=!1})},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem getting data")}})}updateScheduleSignUp(e){this.set(o=>{o.signUp=B(B({},o.signUp),e)})}loadRecipients(){this.set(e=>{e.recipients=null,e.loading=!0}),this.scheduleSignUpService.getScheduleSignUpRecipients(this.state.scheduleSignUpID).pipe(f(this.unsubscribe$)).subscribe(e=>{this.set(o=>{o.loading=!1,o.recipients=e})})}loadStaffAssignments(){this.set(e=>{e.staffAssignments=null,e.loading=!0}),this.scheduleSignUpService.getScheduleSignUpStaffAssignments(this.state.scheduleSignUpID).pipe(f(this.unsubscribe$)).subscribe(e=>{this.set(o=>{o.loading=!1,o.staffAssignments=e})})}toggleParentAdminHeader(e){this.toggleParentAdminHeaderSubj.next(e)}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};s.\u0275fac=function(o){return new(o||s)(P(y),P(F),P(ke))},s.\u0275prov=ie({token:s,factory:s.\u0275fac});let t=s;return t})();var hi=()=>["Facilitate a no-cost, conference-style setup that allows clubs to organize appointments and members to
1sign up for specific times","Allow your members to sign up for a single appointment, multiple or recurring appointments (i.e., scheduling private lessons)","Create calendar events for these users so their team events and private lessons are consolidated on one Sprocket calendar"];function fi(t,s){if(t&1&&(i(0,` 2 `),a(1,"app-admin-header",1),i(2,` 3 `),l(),i(3,` 4 `)),t&2){let n=p(2);c(),g("pageTitle",n.scheduleSignUp?n.scheduleSignUp.scheduleSignUpName:"Edit Sign Up")("parentLinkText",n.programName?n.programName:"Sign Ups")("showBackButton",!0)}}function gi(t,s){if(t&1&&(i(0,` 5 `),h(1,"app-schedule-sign-up-navigation",2),i(2,` 6 `)),t&2){let n=p(2);c(),Y("mt-0",n.embedded),g("scheduleSignUp",n.scheduleSignUp)("signUpTypeID",n.scheduleSignUp.signUpTypeID)}}function vi(t,s){if(t&1&&(i(0,` 7 `),a(1,"main",0),i(2,` 8 `),u(3,fi,4,3),u(4,gi,3,4),h(5,"router-outlet"),i(6,` 9`),l(),i(7,` 10`)),t&2){let n=p();c(3),S(n.showAdminHeader&&!n.embedded?3:-1),c(),S(n.scheduleSignUpID&&n.scheduleSignUp&&n.showAdminHeader?4:-1)}}function Ci(t,s){t&1&&(i(0,` 11 `),h(1,"app-promo-card",3),i(2,` 12`)),t&2&&(c(),g("title","Sign Ups")("description","Schedule appointments of all kinds, ranging from coach-parent meetings to private training sessions")("features",De(4,hi))("image","https://sprocketsports.com/images/10-sessions.png"))}var ti=(()=>{let s=class s{constructor(e,o,r,d,v,C){this.route=e,this.store=o,this.registrationStore=r,this.siteDataService=d,this.registrationService=v,this.shellChrome=C,this.showAdminHeader=!0,this.moduleEnabled=!1,this.unsubscribe$=new x,this.embedded=!1}ngOnInit(){this.embedded=!!this.shellChrome,this.siteDataService.getClubSettings().pipe(f(this.unsubscribe$)).subscribe({next:e=>{this.moduleEnabled=e.clubOptions.find(o=>o.optionID===Re.APPOINTMENT_SCHEDULING)?.boolValue},error:()=>{this.siteDataService.showSiteErrorAlertDefaultGET()}}),this.route.params.pipe(f(this.unsubscribe$)).subscribe({next:e=>{if(!e.id)return;let o=+e.id;o!==this.scheduleSignUpID&&(this.loadedALaCarteRegistration=!1),this.scheduleSignUpID=o,this.store.initialize(this.scheduleSignUpID);let r=this.route;for(;r;){let d=r.snapshot.paramMap.get("id");if(d&&+d!==this.scheduleSignUpID){this.programID=+d;break}r=r.parent}},error:e=>{se("ScheduleSignUpEditComponent: route params failed",e)}}),this.store.select(e=>({loading:e.loading})).pipe(f(this.unsubscribe$)).subscribe({next:e=>{e.loading||this.siteDataService.hideSiteLoader()},error:()=>{this.siteDataService.showSiteErrorAlertDefaultGET()}}),this.store.select(e=>({scheduleSignUp:e.signUp})).pipe(f(this.unsubscribe$)).subscribe({next:e=>{this.scheduleSignUp=e.scheduleSignUp,this.scheduleSignUp&&this.scheduleSignUp.signUpTypeID===U.PAID&&!this.loadedALaCarteRegistration&&(this.loadALaCarteRegistration(),this.loadedALaCarteRegistration=!0),this.publishShellChrome()},error:()=>{this.siteDataService.showSiteErrorAlertDefaultGET()}}),this.store.toggleParentAdminHeaderVisability$.pipe(f(this.unsubscribe$)).subscribe({next:e=>{this.showAdminHeader=e,e?this.publishShellChrome():this.shellChrome?.clear(this)}})}publishShellChrome(){this.showAdminHeader&&this.shellChrome?.set(this,{crumbs:[{text:this.scheduleSignUp?this.scheduleSignUp.scheduleSignUpName:"Edit Sign Up"}]})}loadALaCarteRegistration(){if(!this.programID){se("ScheduleSignUpEditComponent: programID not available");return}this.registrationService.filters||(this.registrationService.filters=new Je,this.registrationService.filters.rows=10,this.registrationService.filters.getTotalCount=!1),this.registrationService.searchRegistrations(this.programID).pipe(f(this.unsubscribe$)).subscribe({next:e=>{let o=(e.results||[]).find(r=>r.programID===this.programID&&r.registrationCostTypeID===Ve.VARIABLE);o?(this.programName=o.programName,this.registrationStore.initialize(o.registrationID,this.programID)):oe("ScheduleSignUpEditComponent: no a la carte registration for programID",this.programID)},error:e=>{se("ScheduleSignUpEditComponent: Error searching registrations",e)}})}ngOnDestroy(){this.shellChrome?.clear(this),this.unsubscribe$.next(),this.unsubscribe$.complete()}};s.\u0275fac=function(o){return new(o||s)(m(R),m(w),m(Ke),m(y),m(He),m(K,8))},s.\u0275cmp=E({type:s,selectors:[["ng-component"]],standalone:!1,decls:2,vars:1,consts:[["role","main"],["parentLinkUrl","../",3,"pageTitle","parentLinkText","showBackButton"],[3,"scheduleSignUp","signUpTypeID"],[3,"title","description","features","image"]],template:function(o,r){o&1&&u(0,vi,8,2)(1,Ci,3,5),o&2&&S(r.moduleEnabled?0:1)},dependencies:[Ie,ce,Be,Xe],encapsulation:2});let t=s;return t})();var k=(()=>{let s=class s{constructor(e,o){this.router=e,this.shellChrome=o}exit(e){if(this.shellChrome?.overviewUrl){this.router.navigateByUrl(this.shellChrome.overviewUrl);return}this.router.navigate(["../.."],{relativeTo:e})}};s.\u0275fac=function(o){return new(o||s)(P(G),P(K,8))},s.\u0275prov=ie({token:s,factory:s.\u0275fac});let t=s;return t})();var bi=["basicInfo"];function Ti(t,s){t&1&&(i(0,` 13 `),h(1,"hr",9),i(2,` 14 `),a(3,"h4"),i(4,"Pricing and Checkout"),l(),i(5,` 15 `),h(6,"app-dynamic-form-field",10),i(7,` 16 17 `),i(8,` 18 `),h(9,"hr",9),i(10,` 19 `),a(11,"h4"),i(12,"Capacity"),l(),i(13,` 20 `),h(14,"app-dynamic-form-field",11),i(15,` 21 22 `),h(16,"hr",9),i(17,` 23 `),a(18,"h4"),i(19,"Staff"),l(),i(20,` 24 `),a(21,"div",12),i(22,` 25 `),a(23,"div",13),i(24,` 26 Choose which staff can be assigned to this Time Slot Group. You'll be able to select specific staff for each time slot during scheduling.
27 `),l(),i(25,` 28 `),l(),i(26,` 29 `),h(27,"app-dynamic-form-field",14),i(28,` 30 `))}function Ai(t,s){if(t&1){let n=j();i(0,` 31`),a(1,"div",1),i(2,` 32 `),a(3,"app-dynamic-form",2,0),_("onSubmit",function(o){b(n);let r=p();return T(r.save(o))})("onCancel",function(){b(n);let o=p();return T(o.cancel())}),i(5,` 33 `),h(6,"app-dynamic-form-field",3),i(7,` 34 `),h(8,"app-dynamic-form-field",4),i(9,` 35 `),h(10,"app-dynamic-form-field",5),i(11,` 36 `),h(12,"app-dynamic-form-field",6),i(13,` 37 `),h(14,"app-dynamic-form-field",7),i(15,` 38 `),i(16,` 39 `),h(17,"app-dynamic-form-field",8),i(18,` 40 `),u(19,Ti,29,0),l(),i(20,` 41`),l(),i(21,` 42`)}if(t&2){let n=p();c(3),g("fields",n.fields)("entity",n.signUp)("horizontalForm",!0)("contentFieldsMode",!0)("showSaveAndAddButton",!1)("showSubmitButton",!0)("showCancelButton",!0),c(16),S(n.paidV2Enabled&&n.signUp.signUpTypeID===n.SignUpType.PAID?19:-1)}}function Di(t,s){t&1&&(i(0,` 43`),h(1,"app-skeleton-template",15),i(2,` 44`))}var ni=(()=>{let s=class s{constructor(e,o,r,d,v,C){this.route=e,this.siteDataService=o,this.scheduleSignUpService=r,this.formService=d,this.store=v,this.exitService=C,this.SignUpType=U,this.loading=!0,this.paidV2Enabled=!1,this.unsubscribe$=new x}ngOnInit(){let e=this.store.select(r=>({session:r.signUp,scheduleSignUpID:r.scheduleSignUpID})).pipe(I(r=>r.scheduleSignUpID!==null&&r.session!==void 0),q(r=>{let d=this.scheduleSignUpID!==r.scheduleSignUpID;this.signUp=r.session,this.scheduleSignUpID=r.scheduleSignUpID,d&&(this.fields=void 0)}),be({bufferSize:1,refCount:!0}));_e([e,this.siteDataService.isPaidSignupsV2Enabled$()]).pipe(Te(([,r])=>(this.paidV2Enabled=r,this.fields?Z({fields:this.fields}):this.scheduleSignUpService.getScheduleSignUpBasicInfoMetadata())),q(r=>{this.fields=r.fields||this.fields,this.applyScheduleSignUpFieldRules()}),f(this.unsubscribe$)).pipe(f(this.unsubscribe$)).subscribe({next:()=>{this.loading=!1,this.siteDataService.hideSiteLoader()},error:()=>{this.siteDataService.showSiteErrorAlertDefaultGET()}})}save(e){let o=e.startDate?new Date(e.startDate):null,r=e.endDate?new Date(e.endDate):null;if(o&&r&&r<o){this.formService.hideFormLoader(),this.formService.showFormErrorMessage("Start date must be before end date");return}e.scheduleSignUpID=this.scheduleSignUpID,e=B(B({},this.signUp),e);let d=this.form?.form?.get("staffIDs");d&&this.signUp?.signUpTypeID===U.PAID&&(e.staffIDs=d.value??[]),oe("ScheduleSignUpBasicInfoComponent: Saving session",e),this.scheduleSignUpService.updateScheduleSignUpBasicInfo(e).pipe(f(this.unsubscribe$)).subscribe({next:()=>{this.siteDataService.showSiteSuccessAlert("Basic info saved successfully"),this.formService.hideFormLoader(),this.store.updateScheduleSignUp(e)},error:()=>{this.formService.hideFormLoader(),this.siteDataService.showSiteErrorAlertDefaultGET()}})}cancel(){this.exitService.exit(this.route)}applyScheduleSignUpFieldRules(){if(!this.fields||!this.signUp)return;this.fields.forEach(v=>{v.controlName==="startDate"&&(v.value=this.signUp.startDate?new Date(this.signUp.startDate):null)});let e=null,o=null,r=null,d=null;for(let v of this.fields)v.controlName==="endDate"&&(o=v),v.controlName==="startDate"&&(e=v),v.controlName==="multipleSignUpsPerPlayer"&&(r=v),v.controlName==="coachesCanSubmitAvailability"&&(d=v);if(this.signUp.signUpTypeID===U.PAID){r&&(r.hidden=!0),e&&(e.hidden=!0,e.required=!1),o&&(o.hidden=!0,o.required=!1),d&&this.paidV2Enabled&&(d.label="Require Coaches to Accept Time Slot Assignments",d.tooltipText="If enabled, coaches must accept time slots assigned to them before they become available for purchase. Existing time slots retain the setting that was in effect when they were created, even if this setting is changed later.");let v=this.fields.find(C=>C.controlName==="staffIDs");v&&(v.value=this.signUp.staffAssignments?.map(C=>C.clubUserID)??[])}else this.signUp.signUpTypeID===U.VOLUNTEER_TRACKING?(e&&(e.required=!0),o&&(o.required=!0),r&&(r.hidden=!0),d&&(d.hidden=!0)):(e&&(e.required=!0),o&&(o.required=!0))}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};s.\u0275fac=function(o){return new(o||s)(m(R),m(y),m(F),m(M),m(w),m(k))},s.\u0275cmp=E({type:s,selectors:[["ng-component"]],viewQuery:function(o,r){if(o&1&&V(bi,5),o&2){let d;A(d=D())&&(r.form=d.first)}},standalone:!1,decls:2,vars:1,consts:[["basicInfo",""],[1,"col-xl-9"],["buttonsPosition","left",3,"onSubmit","onCancel","fields","entity","horizontalForm","contentFieldsMode","showSaveAndAddButton","showSubmitButton","showCancelButton"],["fieldName","scheduleSignUpName"],["fieldName","scheduleSignUpDescription"],["fieldName","startDate"],["fieldName","endDate"],["fieldName","multipleSignUpsPerPlayer"],["fieldName","coachesCanSubmitAvailability"],[1,"form-section"],["fieldName","timeSlotPrice"],["fieldName","defaultCapacity"],[1,"row","mb-3"],[1,"col-md-12","text-medium","text-grey"],["fieldName","staffIDs"],["skeletonType","form"]],template:function(o,r){o&1&&u(0,Ai,22,8)(1,Di,3,0),o&2&&S(!r.loading&&r.fields?0:1)},dependencies:[le,ae,re],encapsulation:2});let t=s;return t})();var wi=["messageToRecipients"],Ii=["messageToStaff"];function Ei(t,s){if(t&1&&(i(0,` 45 `),a(1,"span",16),i(2),l(),i(3,` 46 `)),t&2){let n=p(3);c(2),N(` 47 (`,n.recipients.length,`) 48 `)}}function Ri(t,s){if(t&1&&(i(0,` 49 `),h(1,"app-pill",17),i(2,` 50 `)),t&2){let n=s.$implicit;c(),g("text",n.firstName?n.firstName+" "+(n.lastName||""):n.emailAddress??n.teamName)("clickable",!1)}}function Fi(t,s){if(t&1&&i(0),t&2){let n=p(5);N(` 51 `,n.recipients.length-n.visibleSelectionLimit,` more 52 `)}}function Vi(t,s){t&1&&i(0,` 53 Collapse 54 `)}function ki(t,s){if(t&1){let n=j();i(0,` 55 `),a(1,"button",18),_("click",function(){b(n);let o=p(4);return T(o.selectionExpanded=!o.selectionExpanded)}),i(2,` 56 `),u(3,Fi,1,1),u(4,Vi,1,0),l(),i(5,` 57 `)}if(t&2){let n=p(4);c(),Y("btn-icon-chevron-down",!n.selectionExpanded)("btn-icon-chevron-up",n.selectionExpanded),c(2),S(n.selectionExpanded?-1:3),c(),S(n.selectionExpanded?4:-1)}}function ji(t,s){if(t&1&&(i(0,` 58 `),a(1,"span",19),i(2),l(),i(3,` 59 `)),t&2){let n=p(5);c(2),N(` 60 + `,n.recipients.length-n.visibleSelectionLimit,` more 61 `)}}function Mi(t,s){if(t&1&&(i(0,` 62 `),u(1,ji,4,1)),t&2){let n=p(4);c(),S(n.recipients.length>n.visibleSelectionLimit?1:-1)}}function $i(t,s){if(t&1&&(i(0,` 63 `),he(1,Ri,3,2,null,null,Se),ge(3,"slice"),u(4,ki,6,6)(5,Mi,2,1)),t&2){let n=p(3);c(),fe(ve(3,1,n.recipients,0,n.selectionExpanded?n.recipients.length:n.visibleSelectionLimit)),c(3),S((n.recipients==null?null:n.recipients.length)>n.visibleSelectionLimit&&n.recipients.length<1e3?4:5)}}function Bi(t,s){if(t&1&&(i(0,` 64 `),a(1,"div",13),i(2,` 65 `),a(3,"div",14),i(4,` 66 `),a(5,"span"),i(6,"Recipients"),l(),i(7,` 67 `),u(8,Ei,4,1),l(),i(9,` 68 `),a(10,"div",15),i(11,` 69 `),u(12,$i,6,5),l(),i(13,`
70 `),l(),i(14,` 71 `)),t&2){let n=p(2);c(8),S(n.recipients!=null&&n.recipients.length?8:-1),c(4),S(n.recipients!=null&&n.recipients.length?12:-1)}}function Pi(t,s){t&1&&(i(0,` 72 `),h(1,"app-skeleton-template",20),i(2,` 73 `))}function Ni(t,s){if(t&1&&(i(0,` 74 `),a(1,"section",4),i(2,` 75 `),a(3,"h2",5),i(4,"Recipients"),l(),i(5,` 76 `),a(6,"div",12),i(7,` 77 `),u(8,Bi,15,2)(9,Pi,3,0),l(),i(10,` 78 `),l(),i(11,` 79`)),t&2){let n=p();c(8),S(n.loading?9:8)}}function Li(t,s){if(t&1&&(i(0,` 80 `),a(1,"div",21),i(2,` 81 `),h(3,"app-time-slot",22,0),i(5,` 82 `),l(),i(6,` 83 `)),t&2){let n=p();c(3),g("scheduleSignUpID",n.scheduleSignUpID)("initialScheduleSignUp",n.session)("componentView",n.TimeSlotComponentView.ADMIN_OVERVIEW)("fixedHeight",!1)("isAdmin",!0)}}function Qi(t,s){if(t&1&&(i(0,` 84 `),a(1,"span",16),i(2),l(),i(3,` 85 `)),t&2){let n=p(2);c(2),N(` 86 (`,n.staffAssignments.length,`) 87 `)}}function Oi(t,s){if(t&1&&(i(0,` 88 `),h(1,"app-pill",24),i(2,` 89 `)),t&2){let n=s.$implicit;c(),g("text",n.firstName?n.firstName+" "+(n.lastName||""):n.emailAddress??n.teamName)}}function qi(t,s){if(t&1&&i(0),t&2){let n=p(4);N(` 90 `,n.staffAssignments.length-n.visibleSelectionLimit,` more 91 `)}}function Gi(t,s){t&1&&i(0,` 92 Collapse 93 `)}function Hi(t,s){if(t&1){let n=j();i(0,` 94 `),a(1,"button",18),_("click",function(){b(n);let o=p(3);return T(o.selectionExpanded=!o.selectionExpanded)}),i(2,` 95 `),u(3,qi,1,1),u(4,Gi,1,0),l(),i(5,` 96 `)}if(t&2){let n=p(3);c(),Y("btn-icon-chevron-down",!n.selectionExpanded)("btn-icon-chevron-up",n.selectionExpanded),c(2),S(n.selectionExpanded?-1:3),c(),S(n.selectionExpanded?4:-1)}}function zi(t,s){if(t&1&&(i(0,` 97 `),a(1,"span",19),i(2),l(),i(3,` 98 `)),t&2){let n=p(4);c(2),N(` 99 + `,n.staffAssignments.length-n.visibleSelectionLimit,` more 100 `)}}function Ji(t,s){if(t&1&&(i(0,` 101 `),u(1,zi,4,1)),t&2){let n=p(3);c(),S(n.staffAssignments.length>n.visibleSelectionLimit?1:-1)}}function Ki(t,s){if(t&1&&(i(0,` 102 `),he(1,Oi,3,1,null,null,Se),ge(3,"slice"),u(4,Hi,6,6)(5,Ji,2,1)),t&2){let n=p(2);c(),fe(ve(3,1,n.staffAssignments,0,n.selectionExpanded?n.staffAssignments.length:n.visibleSelectionLimit)),c(3),S(n.staffAssignments.length>n.visibleSelectionLimit&&n.staffAssignments.length<1e3?4:5)}}function Wi(t,s){if(t&1&&(i(0,` 103 `),a(1,"section",4),i(2,` 104 `),a(3,"h2",5),i(4,"Coach Assignments"),l(),i(5,` 105 `),a(6,"div",12),i(7,` 106 `),a(8,"div",23),i(9,` 107 `),a(10,"div",14),i(11,` 108 `),a(12,"span"),i(13,"Coach Assignments"),l(),i(14,` 109 `),u(15,Qi,4,1),l(),i(16,` 110 `),a(17,"div",15),i(18,` 111 `),u(19,Ki,6,5),l(),i(20,` 112 `),l(),i(21,` 113 `),l(),i(22,` 114 `),l(),i(23,` 115`)),t&2){let n=p();c(15),S(n.staffAssignments.length?15:-1),c(4),S(n.staffAssignments.length?19:-1)}}function Yi(t,s){if(t&1&&(i(0,` 116 `),a(1,"app-dynamic-form",26,1),i(3,` 117 `),h(4,"app-dynamic-form-field",27),i(5,` 118 `),h(6,"app-dynamic-form-field",28),i(7,` 119 `),l(),i(8,` 120 `)),t&2){let n=p(2);c(),g("fields",n.fields)("entity",n.session)("horizontalForm",!0)("contentFieldsMode",!0)("showSaveAndAddButton",!1)("showSubmitButton",!1)("showCancelButton",!1),c(5),g("tinySettings",n.getContentTinySettings())}}function Xi(t,s){t&1&&(i(0,` 121 `),h(1,"app-skeleton-template",29),i(2,` 122 `))}function Zi(t,s){if(t&1&&(i(0,` 123 `),a(1,"div",25),i(2,` 124 `),u(3,Yi,9,8)(4,Xi,3,0),l(),i(5,` 125 `)),t&2){let n=p();c(3),S(!n.loading&&n.fields?3:4)}}function et(t,s){if(t&1&&(i(0,` 126 `),a(1,"app-dynamic-form",26,3),i(3,` 127 `),h(4,"app-dynamic-form-field",27),i(5,` 128 `),h(6,"app-dynamic-form-field",28),i(7,` 129 `),l(),i(8,` 130 `)),t&2){let n=p(2);c(),g("fields",n.staffFields)("entity",n.session)("horizontalForm",!0)("contentFieldsMode",!0)("showSaveAndAddButton",!1)("showSubmitButton",!1)("showCancelButton",!1),c(5),g("tinySettings",n.getStaffContentTinySettings())}}function it(t,s){t&1&&(i(0,` 131 `),h(1,"app-skeleton-template",29),i(2,` 132 `))}function tt(t,s){t&1&&(i(0,` 133 `),h(1,"app-skeleton-template",29),i(2,` 134 `))}function nt(t,s){if(t&1&&(i(0,` 135 `),a(1,"div",25),i(2,` 136 `),u(3,et,9,8)(4,it,3,0),Ae(5,tt,3,0,"ng-template",null,2,ye),i(7,`
137 `),l(),i(8,` 138 `)),t&2){let n=p();c(3),S(!n.loading&&n.staffFields?3:4)}}function ot(t,s){t&1&&(i(0,` 139 `),h(1,"app-button-loader"),i(2,` 140 Sending... 141 `))}function st(t,s){t&1&&i(0,` 142 Send 143 `)}var si=(()=>{let s=class s{constructor(e,o,r,d,v,C){this.route=e,this.siteDataService=o,this.scheduleSignUpService=r,this.formService=d,this.store=v,this.exitService=C,this.loading=!0,this.visibleSelectionLimit=7,this.selectionExpanded=!1,this.saving=!1,this.TimeSlotComponentView=J,this.SignUpType=U,this.unsubscribe$=new x}ngOnInit(){this.store.select(e=>({session:e.signUp,scheduleSignUpID:e.scheduleSignUpID})).pipe(I(e=>e.scheduleSignUpID!==null&&e.session!==void 0),q(e=>{this.session=e.session,this.scheduleSignUpID=e.scheduleSignUpID}),Ue(()=>{if(this.fields)return Z(this.fields);{let e={fields:this.scheduleSignUpService.getScheduleSignUpMessageToRecipientsMetadata(),staffFields:this.scheduleSignUpService.getScheduleSignUpMessageToStaffMetadata()};return ee(e).pipe(q(o=>{this.fields=o.fields.fields,this.staffFields=o.staffFields.fields}))}}),f(this.unsubscribe$)).subscribe({next:()=>{this.store.loadRecipients(),this.store.loadStaffAssignments(),this.siteDataService.hideSiteLoader()},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem getting teams")}}),this.store.select(e=>({recipients:e.recipients,staffAssignments:e.staffAssignments})).pipe(I(e=>e.recipients!==null&&e.recipients!==void 0&&e.staffAssignments!==null&&e.staffAssignments!==void 0),f(this.unsubscribe$)).subscribe({next:e=>{this.recipients=e.recipients,this.staffAssignments=e.staffAssignments,this.loading=!1,this.siteDataService.hideSiteLoader()},error:()=>{this.siteDataService.showSiteErrorAlertDefaultGET()}})}getContentTinySettings(){return this.scheduleSignUpService.messageContentTinySettings.readonly=!0,this.scheduleSignUpService.messageContentTinySettings}getStaffContentTinySettings(){return this.scheduleSignUpService.staffMessageContentTinySettings.readonly=!0,this.scheduleSignUpService.staffMessageContentTinySettings}sendRecipientsMessage(){if(this.form){if(!this.form.isValid){this.form.submitForm();return}this.store.updateScheduleSignUp(this.form.validFieldsValue)}this.saving=!0,this.scheduleSignUpService.sendSessionMessage(this.session).pipe(f(this.unsubscribe$)).subscribe({next:()=>{this.siteDataService.showSiteSuccessAlert("Message sent successfully"),this.formService.hideFormLoader(),this.saving=!1},error:()=>{this.formService.hideFormLoader(),this.siteDataService.showSiteErrorAlert("There was a problem sending your message"),this.saving=!1}})}send(){this.session.coachesCanSubmitAvailability?this.sendStaffMessage():this.sendRecipientsMessage()}sendStaffMessage(){if(this.staffMessageForm){if(!this.staffMessageForm.isValid){this.staffMessageForm.submitForm();return}this.store.updateScheduleSignUp(this.staffMessageForm.validFieldsValue)}
143this.saving=!0,this.scheduleSignUpService.sendSignUpStaffMessage(this.session).pipe(f(this.unsubscribe$)).subscribe({next:()=>{this.siteDataService.showSiteSuccessAlert("Message sent successfully"),this.formService.hideFormLoader(),this.saving=!1},error:()=>{this.formService.hideFormLoader(),this.siteDataService.showSiteErrorAlert("There was a problem sending your message"),this.saving=!1}})}cancel(){this.exitService.exit(this.route)}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};s.\u0275fac=function(o){return new(o||s)(m(R),m(y),m(F),m(M),m(w),m(k))},s.\u0275cmp=E({type:s,selectors:[["ng-component"]],viewQuery:function(o,r){if(o&1&&V(wi,5)(Ii,5),o&2){let d;A(d=D())&&(r.form=d.first),A(d=D())&&(r.staffMessageForm=d.first)}},standalone:!1,decls:32,vars:8,consts:[["timeSlotReview",""],["messageToRecipients",""],["skeleton_2",""],["messageToStaff",""],[1,"mb-3","p-4"],[1,"text-header-4"],[1,"p-4"],[1,"row","form-action","no-gutters"],[1,"col","left-buttons"],["type","button",1,"btn","btn-primary","btn-lg",3,"click","disabled"],[1,"btn","btn-lg",3,"click"],[1,"col","right-buttons"],[1,"row","no-gutters"],[1,"d-flex","align-items-center","recipients","border-all","p-4"],[1,"text-uppercase","nowrap"],[1,"ml-3"],[1,"fw-800"],["status","success","styleClass","pill-success-lt",3,"text","clickable"],["type","button",1,"btn","btn-sm","btn-naked",3,"click"],[1,"text-small","text-grey"],["skeletonType","form-single-checkbox"],[1,"bg-primary","p-4"],[3,"scheduleSignUpID","initialScheduleSignUp","componentView","fixedHeight","isAdmin"],[1,"d-flex","align-items-center","recipients","border-all","p-3"],["status","success","styleClass","pill-success-lt",3,"text"],[1,"card"],[3,"fields","entity","horizontalForm","contentFieldsMode","showSaveAndAddButton","showSubmitButton","showCancelButton"],["fieldName","emailSubjectForRecipients"],["fieldName","messageToRecipients",3,"tinySettings"],["skeletonType","form-no-buttons"]],template:function(o,r){o&1&&(u(0,Ni,12,1),a(1,"section",4),i(2,` 144 `),a(3,"h2",5),i(4,"Time Slots"),l(),i(5,` 145 `),u(6,Li,7,5),l(),i(7,` 146`),u(8,Wi,24,2),a(9,"section",6),i(10,` 147 `),a(11,"h2",5),i(12,"Notification Email Settings"),l(),i(13,` 148 `),u(14,Zi,6,1),u(15,nt,9,1),l(),i(16,` 149`),a(17,"div",7),i(18,` 150 `),a(19,"div",8),i(20,` 151 `),a(21,"button",9),_("click",function(){return r.send()}),i(22,` 152 `),u(23,ot,3,0),u(24,st,1,0),l(),i(25,` 153 `),a(26,"button",10),_("click",function(){return r.cancel()}),i(27,` 154 Cancel 155 `),l(),i(28,` 156 `),l(),i(29,` 157 `),h(30,"div",11),i(31,` 158`),l()),o&2&&(S(r.session.signUpTypeID!==r.SignUpType.PAID?0:-1),c(6),S(r.scheduleSignUpID?6:-1),c(2),S(r.session.coachesCanSubmitAvailability?8:-1),c(6),S(r.session.signUpTypeID!==r.SignUpType.PAID?14:-1),c(),S(r.session.coachesCanSubmitAvailability?15:-1),c(6),g("disabled",r.loading||r.saving),c(2),S(r.saving?23:-1),c(),S(r.saving?-1:24))},dependencies:[le,ae,je,re,z,me,we],encapsulation:2});let t=s;return t})();var rt=["timeSlotAddDialog"],at=["timeSlotAddForm"],lt=["timeSlotComponent"];function ct(t,s){if(t&1){let n=j();i(0,` 159 `),a(1,"app-time-slot-add-dialog",4,0),_("confirmInitiated",function(o){b(n);let r=p();return T(r.addTimeSlot(o.timeSlots))}),l(),i(3,` 160 `)}if(t&2){let n=p();c(),g("scheduleSignUp",n.scheduleSignUp)("signUpTypeID",n.scheduleSignUp.signUpTypeID)("calendarEventDetails",n.calendarEventDetails)("signUpDateTime",n.signUpDateTime)}}function dt(t,s){if(t&1){let n=j();i(0,` 161 `),a(1,"app-time-slot-add-form",5,1),_("saveInitiated",function(o){b(n);let r=p();return T(r.addTimeSlotFromForm(o))})("importTimeSlots",function(){b(n);let o=p();return T(o.goToImport())}),l(),i(3,` 162 `)}if(t&2){let n=p();c(),g("scheduleSignUp",n.scheduleSignUp)("showHeader",!1)("calendarEventDetails",n.calendarEventDetails)("signUpDateTime",n.signUpDateTime)("showImportBtn",!0)}}function mt(t,s){t&1&&(i(0,` 163 `),a(1,"app-inline-alert",6),i(2,` 164 Coaches must accept time slots assigned to them before they will become available for purchase. If you do not wish this 165 to be the case, please disable the 'Require Coaches to Accept Time Slot Assignments' setting in the Basic Info tab
166 `),l(),i(3,` 167`)),t&2&&(c(),g("isInline",!0))}function pt(t,s){if(t&1){let n=j();i(0,` 168 `),a(1,"section"),i(2,` 169 `),a(3,"app-time-slot",7,2),_("onTimeSlotsAdded",function(o){b(n);let r=p();return T(r.timeSlotsAdded(o))})("onAddRequested",function(){b(n);let o=p();return T(o.openAddTimeSlotsDialog())})("onImportRequested",function(){b(n);let o=p();return T(o.goToImport())}),i(5,` 170 `),l(),i(6,` 171 `),l(),i(7,` 172`)}if(t&2){let n=p();c(3),g("scheduleSignUpID",n.scheduleSignUpID)("initialScheduleSignUp",n.scheduleSignUp)("signUpTypeID",n.scheduleSignUp==null?null:n.scheduleSignUp.signUpTypeID)("componentView",n.TimeSlotComponentView.ADMIN_EDIT)("isAdmin",!0)("showAddButtons",!0)("showImportBtn",!0)("showAssignPlayerAction",!0)}}var ri=(()=>{let s=class s{constructor(e,o,r,d,v,C){this.route=e,this.router=o,this.siteDataService=r,this.scheduleSignUpService=d,this.store=v,this.exitService=C,this.signUpDateTime=new de,this.loading=!0,this.saving=!1,this.addingTimeSlot=!1,this.SignUpType=U,this.TimeSlotComponentView=J,this.paidV2Enabled=!1,this.unsubscribe$=new x}ngOnInit(){this.store.select(e=>({session:e.signUp,scheduleSignUpID:e.scheduleSignUpID,club:e.club})).pipe(I(e=>e.scheduleSignUpID!==null&&e.session!==void 0),f(this.unsubscribe$)).subscribe({next:e=>{this.scheduleSignUp=e.session,this.scheduleSignUpID=e.scheduleSignUpID,this.club=e.club,this.loading=!1,this.siteDataService.hideSiteLoader()},error:()=>{this.siteDataService.showSiteErrorAlertDefaultGET()}}),this.siteDataService.isPaidSignupsV2Enabled$().pipe(f(this.unsubscribe$)).subscribe({next:e=>this.paidV2Enabled=e,error:()=>this.paidV2Enabled=!1}),this.store.toggleParentAdminHeader(!0)}addTimeSlot(e){this.timeSlotComponent.commitTimeSlots(e)}addTimeSlotFromForm(e){this.timeSlotComponent.addTimeSlot(e.signUpDateTime,e.calendarEventDetails)}timeSlotsAdded(e){let o=this.scheduleSignUp?.signUpTypeID===U.PAID?this.timeSlotAddDialogComponent:this.timeSlotAddFormComponent;if(!e){this.addingTimeSlot=!1,o?.cancelSave();return}this.addingTimeSlot=!1,o?.saveComplete()}cancel(){this.exitService.exit(this.route)}goToImport(){this.router.navigate(["import"],{relativeTo:this.route})}openAddTimeSlotsDialog(){if(this.scheduleSignUp?.signUpTypeID===U.PAID){this.timeSlotAddDialogComponent?.openDialog();return}Ee()}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};s.\u0275fac=function(o){return new(o||s)(m(R),m(G),m(y),m(F),m(w),m(k))},s.\u0275cmp=E({type:s,selectors:[["ng-component"]],viewQuery:function(o,r){if(o&1&&V(rt,5)(at,5)(lt,5),o&2){let d;A(d=D())&&(r.timeSlotAddDialogComponent=d.first),A(d=D())&&(r.timeSlotAddFormComponent=d.first),A(d=D())&&(r.timeSlotComponent=d.first)}},standalone:!1,decls:7,vars:3,consts:[["timeSlotAddDialog",""],["timeSlotAddForm",""],["timeSlotComponent",""],[1,"mb-3"],[3,"confirmInitiated","scheduleSignUp","signUpTypeID","calendarEventDetails","signUpDateTime"],[3,"saveInitiated","importTimeSlots","scheduleSignUp","showHeader","calendarEventDetails","signUpDateTime","showImportBtn"],["alertType","info",3,"isInline"],[3,"onTimeSlotsAdded","onAddRequested","onImportRequested","scheduleSignUpID","initialScheduleSignUp","signUpTypeID","componentView","isAdmin","showAddButtons","showImportBtn","showAssignPlayerAction"]],template:function(o,r){o&1&&(a(0,"section",3),i(1,` 173 `),u(2,ct,4,4)(3,dt,4,5),l(),i(4,` 174`),u(5,mt,4,1),u(6,pt,8,8)),o&2&&(c(2),S((r.scheduleSignUp==null?null:r.scheduleSignUp.signUpTypeID)===r.SignUpType.PAID?2:3),c(3),S(r.paidV2Enabled&&(r.scheduleSignUp!=null&&r.scheduleSignUp.coachesCanSubmitAvailability)?5:-1),c(),S(r.scheduleSignUpID?6:-1))},dependencies:[Me,me,Qe,Oe],encapsulation:2});let t=s;return t})();var St=["recipients"];function ht(t,s){t&1&&(i(0,` 175 `),h(1,"app-button-loader"),i(2,` 176 Saving... 177 `))}function ft(t,s){t&1&&i(0,` 178 Save 179 `)}function gt(t,s){if(t&1){let n=j();i(0,` 180 `),a(1,"section"),i(2,` 181 `),a(3,"app-recipients",1,0),i(5,` 182 `),l(),i(6,` 183 `),a(7,"div",2),i(8,` 184 `),a(9,"div",3),i(10,` 185 `),a(11,"button",4),_("click",function(){b(n);let o=p();return T(o.save())}),i(12,` 186 `),u(13,ht,3,0),u(14,ft,1,0),l(),i(15,` 187 `),a(16,"button",5),_("click",function(){b(n);let o=p();return T(o.cancel())}),i(17,` 188 Cancel
189 `),l(),i(18,` 190 `),l(),i(19,` 191 `),h(20,"div",6),i(21,` 192 `),l(),i(22,` 193 `),l(),i(23,` 194`)}if(t&2){let n=p();c(3),g("includeClubsFilter",!1)("selection",n.selectedRecipients)("additionalRecipients",n.additionalRecipients)("modalVersion",!1)("showTeamSearch",!0)("showClubUserSearch",n.showClubUserRecipients)("includeUserGroups",!1)("showRegistrationSearch",!0)("includeClubContactsInUserGroups",!1),c(8),g("disabled",n.loading),c(2),S(n.loading?13:-1),c(),S(n.loading?-1:14)}}var ai=(()=>{let s=class s{constructor(e,o,r,d,v,C){this.route=e,this.siteDataService=o,this.scheduleSignUpService=r,this.formService=d,this.store=v,this.exitService=C,this.loading=!0,this.selectedRecipients=[],this.additionalRecipients="",this.showClubUserRecipients=!0,this.unsubscribe$=new x}ngOnInit(){this.store.select(e=>({session:e.signUp,scheduleSignUpID:e.scheduleSignUpID})).pipe(I(e=>e.scheduleSignUpID!==null&&e.session!==void 0),f(this.unsubscribe$)).subscribe({next:e=>{this.currentSignUp=e.session,this.scheduleSignUpID=e.scheduleSignUpID,this.store.loadRecipients(),this.currentSignUp.signUpTypeID===U.VOLUNTEER_TRACKING&&(this.showClubUserRecipients=!1)},error:()=>{this.siteDataService.showSiteErrorAlertDefaultGET()}}),this.store.select(e=>({recipients:e.recipients})).pipe(I(e=>e.recipients!==null&&e.recipients!==void 0),f(this.unsubscribe$)).subscribe({next:e=>{this.selectedRecipients=e.recipients,this.loading=!1,this.siteDataService.hideSiteLoader()},error:()=>{this.siteDataService.showSiteErrorAlertDefaultGET()}})}save(){let e=this.recipientsComponent.selectRecipients();this.currentSignUp.recipients=e.recipients.concat(e.additionalRecipients),this.loading=!0,this.scheduleSignUpService.updateScheduleSignUpRecipients(this.currentSignUp).pipe(f(this.unsubscribe$)).subscribe({next:()=>{this.siteDataService.showSiteSuccessAlert("Recipients saved successfully"),this.store.loadRecipients(),this.loading=!1},error:()=>{this.loading=!1,this.siteDataService.showSiteErrorAlert("There was a problem updating the recipients")}})}cancel(){this.exitService.exit(this.route)}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};s.\u0275fac=function(o){return new(o||s)(m(R),m(y),m(F),m(M),m(w),m(k))},s.\u0275cmp=E({type:s,selectors:[["ng-component"]],viewQuery:function(o,r){if(o&1&&V(St,5),o&2){let d;A(d=D())&&(r.recipientsComponent=d.first)}},standalone:!1,decls:1,vars:1,consts:[["recipients",""],[3,"includeClubsFilter","selection","additionalRecipients","modalVersion","showTeamSearch","showClubUserSearch","includeUserGroups","showRegistrationSearch","includeClubContactsInUserGroups"],[1,"row","form-action","no-gutters"],[1,"col","left-buttons"],["type","button",1,"btn","btn-primary","btn-lg",3,"click","disabled"],[1,"btn","btn-lg",3,"click"],[1,"col","right-buttons"]],template:function(o,r){o&1&&u(0,gt,24,12),o&2&&S(r.currentSignUp?0:-1)},dependencies:[z,pe],encapsulation:2});let t=s;return t})();var vt=["recipients"];function Ct(t,s){t&1&&(i(0,` 195 `),h(1,"app-button-loader"),i(2,` 196 Saving... 197 `))}function xt(t,s){t&1&&i(0,` 198 Save 199 `)}var li=(()=>{let s=class s{constructor(e,o,r,d,v,C){this.route=e,this.siteDataService=o,this.scheduleSignUpService=r,this.formService=d,this.store=v,this.exitService=C,this.loading=!0,this.selectedRecipients=[],this.additionalRecipients="",this.unsubscribe$=new x}ngOnInit(){this.store.select(e=>({session:e.signUp,scheduleSignUpID:e.scheduleSignUpID})).pipe(I(e=>e.scheduleSignUpID!==null&&e.session!==void 0),f(this.unsubscribe$)).subscribe({next:e=>{this.session=e.session,this.scheduleSignUpID=e.scheduleSignUpID,this.store.loadStaffAssignments()},error:()=>{this.siteDataService.showSiteErrorAlertDefaultGET()}}),this.store.select(e=>({staffAssignments:e.staffAssignments})).pipe(I(e=>e.staffAssignments!==null&&e.staffAssignments!==void 0),f(this.unsubscribe$)).subscribe({next:e=>{this.selectedRecipients=e.staffAssignments,this.loading=!1,this.siteDataService.hideSiteLoader()},error:()=>{this.siteDataService.showSiteErrorAlertDefaultGET()}})}save(){let e=this.recipientsComponent.selectRecipients();
199this.session.staffAssignments=e.recipients.concat(e.additionalRecipients),this.loading=!0,this.scheduleSignUpService.updateScheduleSignUpStaffAssignments(this.session).pipe(f(this.unsubscribe$)).subscribe({next:()=>{this.siteDataService.showSiteSuccessAlert("Staff saved successfully"),this.store.loadRecipients(),this.loading=!1},error:()=>{this.loading=!1,this.siteDataService.showSiteErrorAlert("There was a problem updating the Staff")}})}cancel(){this.exitService.exit(this.route)}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};s.\u0275fac=function(o){return new(o||s)(m(R),m(y),m(F),m(M),m(w),m(k))},s.\u0275cmp=E({type:s,selectors:[["ng-component"]],viewQuery:function(o,r){if(o&1&&V(vt,5),o&2){let d;A(d=D())&&(r.recipientsComponent=d.first)}},standalone:!1,decls:19,vars:14,consts:[["recipients",""],[3,"includeClubsFilter","selection","showAdditionalRecipients","showHeader","modalVersion","showTeamSearch","showClubUserSearch","showPlayerSearch","includeUserGroups","includeClubContactsInUserGroups","showSignupEligibleStaff"],[1,"row","form-action","no-gutters"],[1,"col","left-buttons"],["type","button",1,"btn","btn-primary","btn-lg",3,"click","disabled"],[1,"btn","btn-lg",3,"click"],[1,"col","right-buttons"]],template:function(o,r){o&1&&(a(0,"app-recipients",1,0),i(2,` 200`),l(),i(3,` 201`),a(4,"div",2),i(5,` 202 `),a(6,"div",3),i(7,`
203 `),a(8,"button",4),_("click",function(){return r.save()}),i(9,` 204 `),u(10,Ct,3,0),u(11,xt,1,0),l(),i(12,` 205 `),a(13,"button",5),_("click",function(){return r.cancel()}),i(14,` 206 Cancel 207 `),l(),i(15,` 208 `),l(),i(16,` 209 `),h(17,"div",6),i(18,` 210`),l()),o&2&&(g("includeClubsFilter",!1)("selection",r.selectedRecipients)("showAdditionalRecipients",!1)("showHeader",!1)("modalVersion",!1)("showTeamSearch",!1)("showClubUserSearch",!1)("showPlayerSearch",!1)("includeUserGroups",!1)("includeClubContactsInUserGroups",!1)("showSignupEligibleStaff",!0),c(8),g("disabled",r.loading),c(2),S(r.loading?10:-1),c(),S(r.loading?-1:11))},dependencies:[z,pe],encapsulation:2});let t=s;return t})();var _t=["timeSlotAddForm"],Ut=["timeSlotComponent"];function bt(t,s){if(t&1&&(i(0,` 211 `),a(1,"app-admin-header",2),i(2,` 212 `),l(),i(3,` 213`)),t&2){let n=p();c(),g("pageTitle","Import")("parentLinkText",n.scheduleSignUp?n.scheduleSignUp.scheduleSignUpName:"Edit Sign Up")("grandParentLinkText","Sign Ups")("showBackButton",!0)}}var ci=(()=>{let s=class s{constructor(e,o,r,d,v,C,mi,pi,ui){this.route=e,this.router=o,this.siteDataService=r,this.scheduleSignUpService=d,this.formService=v,this.store=C,this.practiceFacilityService=mi,this.adminProgramService=pi,this.shellChrome=ui,this.signUpDateTime=new de,this.loading=!0,this.saving=!1,this.addingTimeSlot=!1,this.SignUpType=U,this.TimeSlotComponentView=J,this.embedded=!1,this.unsubscribe$=new x}ngOnInit(){this.embedded=!!this.shellChrome,this.store.toggleParentAdminHeader(!1),this.publishShellChrome(),this.store.select(e=>({session:e.signUp,scheduleSignUpID:e.scheduleSignUpID,club:e.club})).pipe(I(e=>e.scheduleSignUpID!==null&&e.session!==void 0),f(this.unsubscribe$)).subscribe({next:e=>{this.scheduleSignUp=e.session,this.scheduleSignUpID=e.scheduleSignUpID,this.club=e.club,this.loading=!1,this.publishShellChrome(),this.siteDataService.hideSiteLoader()},error:()=>{this.siteDataService.showSiteErrorAlertDefaultGET()}})}publishShellChrome(){this.shellChrome?.set(this,{crumbs:[{text:this.scheduleSignUp?this.scheduleSignUp.scheduleSignUpName:"Edit Sign Up",url:this.router.createUrlTree([".."],{relativeTo:this.route}).toString()},{text:"Import"}]})}addTimeSlot(e){this.addingTimeSlot=!0,this.timeSlotComponent.addTimeSlot(e.signUpDateTime,e.calendarEventDetails)}timeSlotsAdded(e){if(!e){this.addingTimeSlot=!1,this.timeSlotAddFormComponent.cancelSave();return}this.addingTimeSlot=!1,this.timeSlotAddFormComponent.saveComplete()}cancel(){this.router.navigate([".."],{relativeTo:this.route})}ngOnDestroy(){this.shellChrome?.clear(this),this.unsubscribe$.next(),this.unsubscribe$.complete()}};s.\u0275fac=function(o){return new(o||s)(m(R),m(G),m(y),m(F),m(M),m(w),m(Le),m(Ne),m(K,8))},s.\u0275cmp=E({type:s,selectors:[["ng-component"]],viewQuery:function(o,r){if(o&1&&V(_t,5)(Ut,5),o&2){let d;A(d=D())&&(r.timeSlotAddFormComponent=d.first),A(d=D())&&(r.timeSlotComponent=d.first)}},standalone:!1,decls:7,vars:2,consts:[[1,"mb-3"],[3,"scheduleSignUp"],["parentLinkUrl","../","grandParentLinkUrl","../../../",3,"pageTitle","parentLinkText","grandParentLinkText","showBackButton"]],template:function(o,r){o&1&&(u(0,bt,4,4),a(1,"section",0),i(2,` 214 `),a(3,"app-schedule-sign-up-time-slots-import",1),i(4,` 215 `),l(),i(5,` 216`),l(),i(6,` 217`)),o&2&&(S(r.embedded?-1:0),c(3),g("scheduleSignUp",r.scheduleSignUp))},dependencies:[ce,Ye],encapsulation:2});let t=s;return t})();var di=(()=>{let s=class s{};s.\u0275fac=function(o){return new(o||s)},s.\u0275mod=ne({type:s}),s.\u0275inj=te({imports:[Ce.forChild([{path:"",component:ti,children:[{path:"basic-info",canActivate:[H],component:ni,data:{metaTitle:"Session Basic Info Edit"}},{path:"recipients",canActivate:[H],component:ai,data:{metaTitle:"Session Recipients Edit"}},{path:"coaches",canActivate:[H],component:li,data:{metaTitle:"Session Staff Assignments Edit"}},{path:"dates-times",children:[{path:"import",canActivate:[H],component:ci,data:{pageTitleAddendum:"Import Time Slots"}},{path:"",component:ri,data:{metaTitle:"Session Dates/Times Edit"}}]},{path:"review",canActivate:[H],component:si,data:{metaTitle:"Review & Send"}},{path:"",redirectTo:"basic-info",pathMatch:"full"}]}]),Ce]});let t=s;return t})();var Ks=(()=>{let s=class s{};s.\u0275fac=function(o){return new(o||s)},s.\u0275mod=ne({type:s}),s.\u0275inj=te({providers:[w,k],imports:[Pe,di,Ze,ei,Ge,ze,$e,qe,We]}
217);let t=s;return t})();export{Ks as ScheduleSignUpEditModule};
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.