1import{a as U,b as Fe}from"./chunk-JL5JJMSL.js";import"./chunk-MCU24RQK.js";import{a as Re,b as Ge}from"./chunk-V2ZNI7PU.js";import"./chunk-HSJ2CSTO.js";import"./chunk-MSSEBO72.js";import"./chunk-FP3J5B6H.js";import"./chunk-BQRBWX66.js";import{a as Z}from"./chunk-L5ZOOU2J.js";import"./chunk-KOPGZV6B.js";import"./chunk-BTQPKA7U.js";import{a as Ie,b as we,e as Ee}from"./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"./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"./chunk-QQKJHWTF.js";import"./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{a as w}from"./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-QH3IRCHN.js";import"./chunk-PLEH3NAH.js";import"./chunk-GXCJ5QS4.js";import{b as P}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 ye}from"./chunk-B6XXRKU5.js";import"./chunk-6Q5DDO7R.js";import"./chunk-RW2MVE4O.js";import"./chunk-3ZVRFUA4.js";import"./chunk-H4PCL6BZ.js";import"./chunk-NXTJBJRP.js";import"./chunk-U22BTVEZ.js";import{$b as $,Gb as Se,Hd as Q,Mb as j,Sc as De,Wc as M,Yb as _e,Zb as ve,d as ce,k as de,kd as O,kh as Te,lc as Ce,ve as be}from"./chunk-X5J6QTCG.js";import{$ as L,$a as S,Ad as J,Fa as p,Fb as me,Gb as pe,Ib as e,Ka as g,Kb as k,Ma as T,Mh as X,Na as N,Nh as xe,Qb as W,Rb as H,Sa as oe,Sb as Y,T as re,U as x,bb as _,be as he,cc as A,d as b,db as ae,eb as se,fa as f,fb as le,ga as h,gb as u,hb as n,ib as r,jb as c,k as ne,nb as q,ob as z,pj as I,qb as D,rf as K,sb as v,tb as d,u as R,vd as y,wd as ge,xb as E,xd as B,yb as G,yd as ue,zb as F,zd as fe}from"./chunk-SMW7PHYX.js";import"./chunk-BMIYOSOG.js";var je=()=>["basic-info"],Pe=()=>["email-settings"],$e=()=>["registration-form"];function Oe(a,s){if(a&1&&(e(0,` 2 `),n(1,"main",0),e(2,` 3 `),n(3,"app-admin-header",1),e(4,` 4 `),r(),e(5,` 5 `),n(6,"div",2),e(7,` 6 `),n(8,"ul",3),e(9,` 7 `),n(10,"li",4),e(11,` 8 `),n(12,"a",5),e(13,` 9 Basic Info 10 `),r(),e(14,` 11 `),r(),e(15,` 12 `),n(16,"li",4),e(17,` 13 `),n(18,"a",5),e(19,` 14 Email Settings 15 `),r(),e(20,` 16 `),r(),e(21,` 17 `),n(22,"li",4),e(23,` 18 `),n(24,"a",5),e(25,` 19 Registration Form 20 `),r(),e(26,` 21 `),r(),e(27,` 22 `),r(),e(28,` 23 `),r(),e(29,` 24 `),c(30,"router-outlet"),e(31,` 25 `),r(),e(32,` 26`)),a&2){let l=d();p(3),u("pageTitle",l.registrationGroup==null?null:l.registrationGroup.name)("parentLinkUrl","../../registrations")("parentLinkText",l.programName)("showBackButton",!0)("grandParentLinkUrl","/admin/programs"),p(9),u("routerLink",A(8,je)),p(6),u("routerLink",A(9,Pe)),p(6),u("routerLink",A(10,$e))}}function Qe(a,s){a&1&&(e(0,` 27 `),c(1,"app-skeleton-template",6),e(2,` 28`))}var Ae=(()=>{let s=class s{constructor(t,i,o,m){this.route=t,this.router=i,this.programService=o,this.siteDataService=m,this.loading=!0,this.unsubscribe$=new b}ngOnInit(){this.programID=+this.route.parent.snapshot.params.id,this.registrationGroupID=+this.route.
28snapshot.params.registrationGroupID,this.loadData()}loadData(){R({program:this.programService.getProgram(this.programID),registrationGroup:this.programService.getRegistrationGroup(this.programID,this.registrationGroupID)}).pipe(x(this.unsubscribe$)).subscribe({next:t=>{this.programName=t.program.name,this.registrationGroup=t.registrationGroup,this.loading=!1},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem loading data."),this.loading=!1}})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};s.\u0275fac=function(i){return new(i||s)(g(y),g(B),g(w),g(I))},s.\u0275cmp=T({type:s,selectors:[["app-registration-group-edit"]],standalone:!1,decls:2,vars:2,consts:[["role","main"],["grandParentLinkText","Programs",3,"pageTitle","parentLinkUrl","parentLinkText","showBackButton","grandParentLinkUrl"],[1,"tabs"],["role","tablist",1,"tab-nav","no-bullets","inline-list"],["routerLinkActive","active",1,"nav-item"],["role","tab","aria-controls","home","aria-selected","true",1,"nav-link",3,"routerLink"],["skeletonType","form-no-buttons"]],template:function(i,o){i&1&&(S(0,Oe,33,11),S(1,Qe,3,0)),i&2&&(_(o.loading?-1:0),p(),_(o.loading?1:-1))},dependencies:[ge,ue,fe,M,be],encapsulation:2});let a=s;return a})();var We=["basicInfoForm"],He=()=>({width:"100%"});function Ye(a,s){if(a&1){let l=D();e(0,` 29 `),n(1,"app-dynamic-form",7,0),v("onCancel",function(){f(l);let i=d();return h(i.cancel())})("onSubmit",function(i){f(l);let o=d();return h(o.save(i))})("onDelete",function(){f(l);let i=d();return h(i.delete())}),e(3,` 30 `),c(4,"app-dynamic-form-field",8),e(5,` 31 `),c(6,"hr",9),e(7,` 32 `),n(8,"h4"),e(9,"Eligibility Settings"),r(),e(10,` 33 `),c(11,"app-dynamic-form-field",10),e(12,` 34 `),c(13,"app-dynamic-form-field",11),e(14,` 35 `),c(15,"app-dynamic-form-field",12),e(16,` 36 `),c(17,"app-dynamic-form-field",13),e(18,` 37 `),n(19,"app-dynamic-form-field",14),v("onChange",function(i){f(l);let o=d();return h(o.genderChange(i))}),r(),e(20,` 38 `),c(21,"app-dynamic-form-field",15),e(22,` 39 `),c(23,"app-dynamic-form-field",16),e(24,` 40 `),c(25,"app-dynamic-form-field",17),e(26,` 41 `),c(27,"app-dynamic-form-field",18),e(28,` 42 `),c(29,"app-dynamic-form-field",19),e(30,` 43 `),c(31,"hr",9),e(32,` 44 `),n(33,"h4"),e(34,"Pre-Conditions"),r(),e(35,` 45 `),n(36,"div",20),e(37,` 46 `),n(38,"div",21),e(39,` 47 Utilize the options below to require a user to be registered in the selected Program(s), 48 Registration(s), and/or Team(s), in order to be eligible to register for this Registration Group. 49 `),r(),e(40,` 50 `),r(),e(41,` 51 `),n(42,"app-dynamic-form-field",22),v("onChange",function(i){f(l);let o=d();return h(o.programContingencyChange(i.value))}),r(),e(43,` 52 `),c(44,"app-dynamic-form-field",23),e(45,` 53 `),c(46,"app-dynamic-form-field",24),e(47,` 54 `),r(),e(48,` 55`)}if(a&2){let l=d();p(),u("fields",l.fields)("entity",l.registrationGroup)("horizontalForm",!0)("showSaveAndAddButton",!1)("contentFieldsMode",!0)("showDeleteButton",!0),p(10),u("showTime",!0),p(2),u("showTime",!0)("defaultTime","23:59")}}function Je(a,s){a&1&&(e(0,` 56 `),c(1,"app-skeleton-template",25),e(2,` 57`))}function Ke(a,s){if(a&1){let l=D();e(0,` 58 `),n(1,"app-dialog-footer"),e(2,` 59 `),q(3,26),e(4,` 60 `),n(5,"button",27),v("click",function(){f(l);let i=d();return h(i.cancelSave())}),e(6,"Cancel"),r(),e(7,` 61 `),z(),e(8,` 62 `),q(9,28),e(10,` 63 `),n(11,"button",29),v("click",function(){f(l);let i=d();return h(i.confirmSave())}),e(12,"Save"),r(),e(13,` 64 `),z(),e(14,` 65 `),r(),e(15,` 66 `)}}var Me=(()=>{let s=class s{constructor(t,i,o,m,C,Be){this.route=t,this.router=i,this.programService=o,this.siteDataService=m,this.formService=C,this.adminProgramService=Be,this.loading=!0,this.submitting=!1,this.programs=[],this.registrationOptions=[],this.showSaveConfirmModal=!1,this.selectedRegistrations=[],this.unsubscribe$=new b}ngOnInit(){this.programID=+this.route.parent.parent.snapshot.params.id,this.registrationGroupID=+this.route.parent.snapshot.params.registrationGroupID,this.loadData()}loadData(){R({metadata:this.programService.getRegistrationGroupMetadata(!1,this.programID,this.registrationGroupID),group:this.programService.getRegistrationGroup(this.programID,this.registrationGroupID),programs:this.adminProgramService.getPrograms({includeTeams:!0})}).pipe(x(this.unsubscribe$)).subscribe({next:t=>{this.fields=t.metadata.fields,this.registrationGroup=t.group,this.programs=t.programs,this.genderChange(this.registrationGroup.genderID);let i=this.fields.find(m=>m.key==="registrationID");i&&i.options&&(this.registrationOptions=i.options),this.loading=!1;let o=this.fields.find(m=>m.key==="signUps");o&&(o.hidden=!0),this.registrationGroup.programContingencies?.length&&this.programContingencyChange(this.registrationGroup.programContingencies),this.siteDataService.hide
66SiteLoader()},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem getting data."),this.loading=!1}})}save(t){if(xe(this.programID,t.programContingencies,t.registrationContingencies)){this.formService.showFormErrorMessage(X(this.programs.find(i=>i.programID===this.programID)?.name)),this.formService.hideFormLoader();return}this.registrationOptions&&this.registrationOptions.length>0?(this.pendingGroupData=t,this.showSaveConfirmModal=!0):this.performSave(t)}confirmSave(){this.showSaveConfirmModal=!1,this.performSave(this.pendingGroupData)}cancelSave(){this.showSaveConfirmModal=!1,this.selectedRegistrations=[],this.pendingGroupData=null,this.formService.hideFormLoader()}performSave(t){t.registrationGroupID=this.registrationGroupID,t.startDate&&(t.startDate=K(t.startDate)),t.endDate&&(t.endDate=K(t.endDate)),this.programService.saveRegistrationGroup(this.programID,t,!1,this.selectedRegistrations,!1).pipe(x(this.unsubscribe$)).subscribe({next:()=>{this.siteDataService.showSiteSuccessAlert("Registration Group updated successfully."),this.formService.hideFormLoader(),this.selectedRegistrations=[],this.pendingGroupData=null},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem saving this group."),this.formService.hideFormLoader(),this.selectedRegistrations=[],this.pendingGroupData=null}})}delete(){this.programService.deleteRegistrationGroup(this.programID,this.registrationGroupID).pipe(x(this.unsubscribe$)).subscribe({next:()=>{this.siteDataService.showSiteSuccessAlert("Registration Group deleted successfully."),this.formService.hideFormLoader(),this.router.navigate(["../../../registrations"],{relativeTo:this.route})},error:t=>{let i=t?.error||"There was a problem deleting this group.";this.siteDataService.showSiteErrorAlert(i),this.formService.hideFormLoader()}})}genderChange(t){if(this.fields?.length){let i=this.fields.find(o=>o.controlName==="includeOtherGender");t===Z.FEMALE||t===Z.MALE?i.hidden=!1:i.hidden=!0,this.fields=Array.from(this.fields)}}programContingencyChange(t){(t?.length?this.programService.getRegistrations(t):ne([])).pipe(x(this.unsubscribe$)).subscribe(i=>{let o=this.fields.find(m=>m.key==="registrationContingencies");o.options=i,this.fields.find(m=>m.key==="teamContingencies").options=Array.from(new Set(this.programs.filter(m=>t.includes(m.programID)).flatMap(m=>m.teams).map(m=>({value:m.teamID,label:m.name})))),t?.includes(this.programID)?(_e(o),o.note=X(this.programs.find(m=>m.programID===this.programID)?.name),this.form?.requireControl("registrationContingencies")):(ve(o),o.note=null,this.form?.unRequireControl("registrationContingencies")),this.fields=Array.from(this.fields)})}cancel(){this.router.navigate(["../../../registrations"],{relativeTo:this.route})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};s.\u0275fac=function(i){return new(i||s)(g(y),g(B),g(w),g(I),g($),g(ye))},s.\u0275cmp=T({type:s,selectors:[["app-registration-group-basic-info"]],viewQuery:function(i,o){if(i&1&&E(We,5),i&2){let m;G(m=F())&&(o.form=m.first)}},standalone:!1,decls:39,vars:15,consts:[["basicInfoForm",""],["header","Apply Changes to Registrations?","styleClass","standardWidthDialog",3,"visibleChange","modal","closable","visible"],[1,"mb-3"],[1,"form-group"],["for","selectedRegs"],["inputId","selectedRegs","placeholder","None","optionLabel","label","optionValue","value","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","maxSelectedLabels","selectedItemsLabel","filter","showToggleAll"],["pTemplate","footer"],[3,"onCancel","onSubmit","onDelete","fields","entity","horizontalForm","showSaveAndAddButton","contentFieldsMode","showDeleteButton"],["fieldName","name","formID","group-form"],[1,"form-section"],["fieldName","startDate","formID","group-form",3,"showTime"],["fieldName","endDate","formID","group-form",3,"showTime","defaultTime"],["fieldName","birthDateFrom","formID","group-form"],["fieldName","birthDateTo","formID","group-form"],["fieldName","genderID","formID","group-form",3,"onChange"],["fieldName","includeOtherGender","formID","group-form"],["fieldName","gradeID","formID","group-form"],["fieldName","ageClass","formID","group-form"],["fieldName","graduationYearFrom","formID","group-form"],["fieldName","graduationYearTo","formID","group-form"],[1,"row","mb-3"],[1,"col-md-12","text-medium","text-grey"],["fieldName","programContingencies","formID","group-form",3,"onChange"],["fieldName","registrationContingencies","formID","group-form"],["fieldName","teamContingencies","formID","group-form"],["skeletonType","form"],["slot","secondary"],["type","button",1,"btn","btn-secondary",3,"click"],["slot","primary"],["type","button",1,"btn","btn-primary",3,"click"]],template:function(i,o){i&1&&(S(0,Ye,49,9)(1,Je,3,0),n(2,"p-dialog",1),Y("visibleChange",function(C){return H(o.showSaveConfirmModal,C)||(o.showSaveConfirmModal=C),C}),e(3,` 67 `),n(4,"div",2),e(5,` 68 `),n(6,"p"),e(7),r(),e(8,` 69 `),n(9,"p"),e(10,"Select which registrations should receive these eligibility changes."),r(),e(11,` 70 `),n(12,"p"),e(13,"This will replace the following fields on all selected registrations with the selected values:"),r(),e(14,` 71 `),n(15,"ul"),e(16,` 72 `),n(17,"li"),e(18,"Name"),r(),e(19,` 73 `),n(20,"li"),e(21,"Eligibility settings"),r(),e(22,` 74 `),n(23,"li"),e(24,"Pre-conditions"),r(),e(25,` 75 `),r(),e(26,` 76 `),r(),e(27,` 77 `),n(28,"div",3),e(29,` 78 `),n(30,"label",4),e(31,"Registrations"),r(),e(32,` 79 `),n(33,"p-multiSelect",5),Y("ngModelChange",function(C){return H(o.selectedRegistrations,C)||(o.selectedRegistrations=C),C}),e(34,` 80 `),r(),e(35,` 81 `),r(),e(36,` 82 `),oe(37,Ke,16,0,"ng-template",6),e(38,` 83`),r()),i&2&&(_(!o.loading&&o.fields&&o.registrationGroup?0:1),p(2),u("modal",!0)("closable",!1),W("visible",o.showSaveConfirmModal),p(5),k("This registration group has ",o.registrationOptions.length," registration(s) associated with it."),p(26),pe(A(14,He)),u("autofocusFilter",!0),W("ngModel",o.selectedRegistrations),u("options",o.registrationOptions)("maxSelectedLabels",1)("selectedItemsLabel","{0} registrations selected")("filter",!0)("showToggleAll",!0))},dependencies:[Q,O,ce,de,he,M,De,Se,Ce],encapsulation:2});let a=s;return a})();var et=["templateSettings"];function tt(a,s){if(a&1){let l=D();e(0,` 84 `),n(1,"app-registration-template-settings",4,0),v("clone",function(i){f(l);let o=d();return h(o.onTemplateClone(i))}),r(),e(3,` 85 `)}if(a&2){let l=d();p(),u("registrationTemplateID",l.registrationGroup.registrationTemplateID)}}var Ve=(()=>{let s=class s{constructor(t,i,o){this.route=t,this.programService=i,this.siteDataService=o,this.unsubscribe$=new b,this.loading=!1}ngOnInit(){this.programID=+this.route.parent.parent.snapshot.params.id,this.registrationGroupID=+this.route.parent.snapshot.params.registrationGroupID,this.loadData()}loadData(){this.programService.getRegistrationGroup(this.programID,this.registrationGroupID).pipe(x(this.unsubscribe$)).subscribe({next:t=>
85{this.registrationGroup=t,this.siteDataService.hideSiteLoader()},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem loading the registration group.")}})}onTemplateClone(t){this.loading=!0,this.templateSettings.setLoader(!0),this.programService.updateRegistrationGroupTemplateID(this.programID,this.registrationGroupID,t.registrationTemplateID).pipe(x(this.unsubscribe$)).subscribe({next:()=>{this.registrationGroup.registrationTemplateID=t.registrationTemplateID,this.templateSettings.setLoader(!1),this.loading=!1,this.siteDataService.showSiteSuccessAlert("Registration form changed successfully.")},error:()=>{this.templateSettings.setLoader(!1),this.loading=!1,this.siteDataService.showSiteErrorAlert("There was a problem changing the registration form.")}})}onRegistrationTemplateChange(t){this.loading=!0,this.programService.updateRegistrationGroupTemplateID(this.programID,this.registrationGroupID,t).pipe(x(this.unsubscribe$)).subscribe({next:()=>{this.registrationGroup.registrationTemplateID=t,this.loading=!1,this.siteDataService.showSiteSuccessAlert("Registration form updated successfully.")},error:()=>{this.loading=!1,this.siteDataService.showSiteErrorAlert("There was a problem updating the registration form.")}})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};s.\u0275fac=function(i){return new(i||s)(g(y),g(w),g(I))},s.\u0275cmp=T({type:s,selectors:[["app-registration-group-registration-form"]],viewQuery:function(i,o){if(i&1&&E(et,5),i&2){let m;G(m=F())&&(o.templateSettings=m.first)}},standalone:!1,decls:16,vars:4,consts:[["templateSettings",""],["alertType","note",1,"mb-3","d-block"],[1,"card"],[3,"change","registrationTemplateID","isInline","showIcon"],[3,"clone","registrationTemplateID"]],template:function(i,o){i&1&&(n(0,"app-inline-alert",1),e(1,` 86 `),n(2,"span"),e(3,` 87 `),n(4,"strong"),e(5,"Default Form for This Registration Group"),r(),c(6,"br"),e(7,` 88 This form will be used for all registrations in this registration group. You can customize it later for 89 individual 90 registrations. 91 `),r(),e(8,` 92`),r(),e(9,` 93 94 95`),n(10,"div",2),e(11,` 96 `),n(12,"app-registration-template-change",3),v("change",function(C){return o.onRegistrationTemplateChange(C)}),r(),e(13,` 97 `),S(14,tt,4,1),r(),e(15,` 98 99`)),i&2&&(p(12),u("registrationTemplateID",o.registrationGroup==null?null:o.registrationGroup.registrationTemplateID)("isInline",!0)("showIcon",!1),p(2),_(o.registrationGroup!=null&&o.registrationGroup.registrationTemplateID?14:-1))},dependencies:[j,Re,U],encapsulation:2});let a=s;return a})();var it=["emailSettingsForm"];function nt(a,s){a&1&&e(0,` 100 Hide 101 `)}function rt(a,s){a&1&&e(0,` 102 View 103 `)}function ot(a,s){if(a&1&&(e(0,` 104 `),n(1,"span",18),e(2,` 105 `),n(3,"span"),e(4,"Program:"),r(),e(5,` 106 `),n(6,"span",19),e(7),r(),e(8,` 107 `),r(),e(9,` 108 `)),a&2){let l=d().$implicit;p(7),k(` 109 `,l.program.name,` 110 `)}}function at(a,s){if(a&1&&(e(0,` 111 `),n(1,"div",16),e(2,` 112 `),n(3,"div"),e(4,` 113 `),n(5,"span",17),e(6),r(),e(7,` 114 `),S(8,ot,10,1),r(),e(9,` 115 `),r(),e(10,` 116 `)),a&2){let l=s.$implicit;p(6),k(` 117 `,l.name,` 118 `),p(2),_(l.program?8:-1)}}function st(a,s){if(a&1&&(e(0,` 119 `),n(1,"div",14),e(2,` 120 `),n(3,"div",15),e(4,` 121 `),se(5,at,11,2,null,null,ae),r(),e(7,` 122 `),r(),e(8,` 123 `)),a&2){let l=d(2);p(5),le(l.assignedRegistrations)}}function lt(a,s){if(a&1){let l=D();e(0,` 124 `),n(1,"div",5),e(2,` 125 `),n(3,"app-inline-alert",6),e(4,` 126 `),n(5,"div",7),e(6,` 127 `),n(7,"div",8),e(8,` 128 `),n(9,"div",9),e(10,` 129 `),n(11,"strong",10),e(12),r(),e(13,` 130 `),n(14,"span",11),e(15,`To customize safely, duplicate this form for this registration 131 group.`),r(),e(16,` 132 `),n(17,"button",12),v("click",function(){f(l);let i=d();return h(i.registrationsExpanded=!i.registrationsExpanded)}),e(18,`
133 `),S(19,nt,1,0),S(20,rt,1,0),e(21,` 134 impacted registrations 135 `),r(),e(22,` 136 `),r(),e(23,` 137 `),n(24,"div"),e(25,` 138 `),n(26,"button",13),v("click",function(){f(l);let i=d();return h(i.showClone=!0)}),e(27,` 139 Duplicate this Form 140 `),r(),e(28,` 141 `),r(),e(29,` 142 `),r(),e(30,` 143 `),S(31,st,9,0),r(),e(32,` 144 `),r(),e(33,` 145 `),r(),e(34,` 146 `)}if(a&2){let l=d();p(12),k("This form is shared across ",l.assignedRegistrations.length,` 147 registrations. Editing it will update all of them.`),p(5),me("btn-icon-chevron-down",!l.registrationsExpanded)("btn-icon-chevron-up",l.registrationsExpanded),p(2),_(l.registrationsExpanded?19:-1),p(),_(l.registrationsExpanded?-1:20),p(11),_(l.registrationsExpanded?31:-1)}}function mt(a,s){if(a&1){let l=D();e(0,` 148 `),n(1,"app-registration-template-clone",20),v("cancel",function(){f(l);let i=d();return h(i.showClone=!1)})("clone",function(i){f(l);let o=d();return h(o.onClone(i))}),e(2,` 149 `),r(),e(3,` 150 `)}if(a&2){let l=d();p(),u("registrationTemplateID",l.registrationTemplateID)}}function pt(a,s){if(a&1){let l=D();e(0,` 151 `),n(1,"app-dynamic-form",21,0),v("onSubmit",function(i){f(l);let o=d();return h(o.save(i))}),e(3,` 152 `),n(4,"h4",5),e(5,"Registration Receipt Email Settings"),r(),e(6,` 153 `),c(7,"app-dynamic-form-field",22),e(8,` 154 `),c(9,"app-dynamic-form-field",23),e(10,` 155 `),c(11,"app-dynamic-form-field",24),e(12,` 156 `),c(13,"app-dynamic-form-field",25),e(14,` 157 `),n(15,"h4",26),e(16,"Incomplete Registration Reminder Email Settings"),r(),e(17,` 158 `),n(18,"app-dynamic-form-field",27),v("onChange",function(i){f(l);let o=d();return h(o.setFields(i))}),r(),e(19,` 159 `),c(20,"app-dynamic-form-field",28),e(21,` 160 `),c(22,"app-dynamic-form-field",29),e(23,` 161 `),c(24,"app-dynamic-form-field",30),e(25,` 162 `),n(26,"h4",26),e(27,"Display Options"),r(),e(28,` 163 `),c(29,"app-dynamic-form-field",31),e(30,` 164 `),r(),e(31,` 165 `)}if(a&2){let l=d();p(),u("fields",l.activeFields)("entity",l.registrationTemplate)("horizontalForm",!0)("contentFieldsMode",!0)("showSaveAndAddButton",!1)("showDeleteButton",!1)("showCancelButton",!1)}}function ct(a,s){a&1&&(e(0,` 166 `),c(1,"app-skeleton-template",32),e(2,` 167`))}var Le=(()=>{let s=class s{constructor(t,i,o,m,C){this.route=t,this.programService=i,this.registrationTemplateService=o,this.siteDataService=m,this.formService=C,this.assignedRegistrations=[],this.isSharedForm=!1,this.registrationsExpanded=!1,this.showClone=!1,this.loading=!0,this.unsubscribe$=new b}ngOnInit(){this.programID=+this.route.parent.parent.snapshot.params.id,this.registrationGroupID=+this.route.parent.snapshot.params.registrationGroupID,this.loadData()}loadData(){this.programService.getRegistrationGroup(this.programID,this.registrationGroupID).pipe(re(t=>(this.registrationGroup=t,this.registrationTemplateID=t.registrationTemplateID,this.registrationTemplateID?R({metadata:this.registrationTemplateService.getRegistrationTemplateEmailSettingsMetadata(),template:this.registrationTemplateService.getRegistrationTemplate(this.registrationTemplateID),assignedRegistrations:this.registrationTemplateService.getAssignedRegistrations(this.registrationTemplateID)}):(this.loading=!1,this.siteDataService.hideSiteLoader(),[]))),x(this.unsubscribe$)).subscribe({next:t=>{t.metadata&&t.template&&(this.fields=t.metadata.fields,this.registrationTemplate=t.template,this.setFields(this.registrationTemplate.sendIncompleteRegistrationEmail),this.assignedRegistrations=t.assignedRegistrations??[],this.isSharedForm=this.assignedRegistrations.length>1),this.loading=!1,this.siteDataService.hideSiteLoader()},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem getting data."),this.loading=!1}})}save(t){t.registrationTemplateID=this.registrationTemplateID,this.registrationTemplateService.saveRegistrationTemplateEmailSettings(t).pipe(x(this.unsubscribe$)).subscribe({next:i=>{i&&(this.registrationTemplate=i),this.siteDataService.showSiteSuccessAlert("Email settings saved successfully."),this.formService.hideFormLoader()},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem saving email settings."),this.formService.hideFormLoader()}})}setFields(t){t?this.activeFields=this.fields:this.activeFields=this.fields.filter(i=>i.controlName!=="incompleteRegistrationEmailSubject"&&i.controlName!=="incompleteRegistrationEmailHeader"&&i.controlName!=="incompleteRegistrationEmailText"),this.activeFields=[...this.activeFields]}onClone(t){this.showClone=!1,this.programService.updateRegistrationGroupTemplateID(this.programID,this.registrationGroupID,t.registrationTemplateID).pipe(x(this.unsubscribe$)).subscribe({next:()=>{this.registrationTemplateID=t.registrationTemplateID,this.loadData(),this.siteDataService.showSiteSuccessAlert("Registration form changed successfully.")},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem updating the registration form.")}})}onRegistrationTemplateChange(t){this.loading=!0,this.programService.updateRegistrationGroupTemplateID(this.programID,this.registrationGroupID,t).pi
167pe(x(this.unsubscribe$)).subscribe({next:()=>{this.registrationTemplateID=t,this.loadData(),this.siteDataService.showSiteSuccessAlert("Registration form updated successfully.")},error:()=>{this.loading=!1,this.siteDataService.showSiteErrorAlert("There was a problem updating the registration form.")}})}cancel(){}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};s.\u0275fac=function(i){return new(i||s)(g(y),g(w),g(Ie),g(I),g($))},s.\u0275cmp=T({type:s,selectors:[["app-registration-group-email-settings"]],viewQuery:function(i,o){if(i&1&&E(it,5),i&2){let m;G(m=F())&&(o.form=m.first)}},standalone:!1,decls:22,vars:5,consts:[["emailSettingsForm",""],[1,""],["alertType","note",1,"mb-3","d-block"],[1,"card"],[3,"change","registrationTemplateID"],[1,"mb-3"],["alertType","warning"],[1,"full-width"],[1,"d-flex","full-width","justify-content-between","align-items-center"],[1,"flex-grow-1"],[1,"d-block"],[1,"d-block","mb-3"],["type","button",1,"btn","btn-a11y","text-primary-link","d-block",3,"click"],["type","button",1,"btn","btn-naked","btn-icon-clone",3,"click"],[1,"mt-3"],[1,"d-flex","flex-row","flex-wrap","full-width"],[1,"col-6","d-flex","align-items-center","mb-3"],[1,"registration-name","d-block"],[1,"text-small","d-block"],[1,"ml-1"],[3,"cancel","clone","registrationTemplateID"],["buttonsPosition","left",3,"onSubmit","fields","entity","horizontalForm","contentFieldsMode","showSaveAndAddButton","showDeleteButton","showCancelButton"],["fieldName","emailSubject"],["fieldName","emailHeader"],["fieldName","emailText"],["fieldName","emailIncludeReceipt"],[1,"mb-3","mt-4"],["fieldName","sendIncompleteRegistrationEmail",3,"onChange"],["fieldName","incompleteRegistrationEmailSubject"],["fieldName","incompleteRegistrationEmailHeader"],["fieldName","incompleteRegistrationEmailText"],["fieldName","confirmationText"],["skeletonType","form"]],template:function(i,o){i&1&&(n(0,"section",1),e(1,` 168 `),n(2,"app-inline-alert",2),e(3,` 169 `),n(4,"span"),e(5,` 170 `),n(6,"strong"),e(7,"Default Form for This Registration Group"),r(),c(8,"br"),e(9,` 171 This form will be used for all registrations in this registration group. You can customize it later for 172 individual registrations. 173 `),r(),e(10,` 174 `),r(),e(11,` 175 `),n(12,"div",3),e(13,` 176 `),n(14,"app-registration-template-change",4),v("change",function(C){return o.onRegistrationTemplateChange(C)}),r(),e(15,` 177 `),S(16,lt,35,8),S(17,mt,4,1),S(18,pt,32,7),r(),e(19,` 178`),r(),e(20,` 179 180`),S(21,ct,3,0)),i&2&&(p(14),u("registrationTemplateID",o.registrationTemplateID),p(2),_(!o.loading&&o.isSharedForm&&o.registrationTemplateID?16:-1),p(),_(o.registrationTemplateID&&o.showClone?17:-1),p(),_(o.activeFields&&!o.loading&&o.registrationTemplate?18:-1),p(3),_(o.loading?21:-1))},dependencies:[Q,O,M,j,U,we],encapsulation:2});let a=s;return a})();var Ne=(()=>{let s=class s{};s.\u0275fac=function(i){return new(i||s)},s.\u0275mod=N({type:s}),s.\u0275inj=L({imports:[J.forChild([{path:"",component:Ae,children:[{path:"basic-info",canActivate:[P],component:Me,data:{metaTitle:"Registration Group Basic Info Edit"}},{path:"registration-form",canActivate:[P],component:Ve,data:{metaTitle:"Registration Group Form"}},{path:"email-settings",canActivate:[P],component:Le,data:{metaTitle:"Registration Group Email Settings"}},{path:"",redirectTo:"basic-info",pathMatch:"full"}]}]),J]});let a=s;return a})();var Ai=(()=>{let s=class s{};s.\u0275fac=function(i){return new(i||s)},s.\u0275mod=N({type:s}),s.\u0275inj=L({imports:[Te,Ne,Ge,Fe,Ee]});let a=s;return a})();export{Ai as RegistrationGroupEditModule};
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.