1import{b as me}from"./chunk-4D5SN44G.js";import{e as J,f as Y,j as He}from"./chunk-22ACI5KU.js";import{a as Qe}from"./chunk-FXUQQQIE.js";import"./chunk-6Q5DDO7R.js";import"./chunk-RW2MVE4O.js";import{a as We,d as qe}from"./chunk-3ZVRFUA4.js";import{a as k,i as Be}from"./chunk-H4PCL6BZ.js";import{$f as Me,Ed as ke,Gb as Re,Gd as Ve,Kb as Te,Rc as $e,Sc as Ae,Wc as Ue,_f as Pe,ag as Oe,bg as Le,d as he,k as Se,kh as je,mb as Ee,qe as X,sc as Ne,xb as Ie}from"./chunk-X5J6QTCG.js";import{$ as M,$a as d,Ad as de,Db as te,E as w,Fa as s,Fb as q,Gb as ie,Ib as e,Ka as f,Kb as g,Lb as U,Lc as Ce,Ma as T,Na as O,Qb as ne,Rb as oe,Sa as E,Sb as re,Sc as xe,Th as be,U as D,W as R,Wc as fe,_ as ue,ba as pe,bb as m,be as we,cc as A,d as P,db as L,dc as ve,di as Fe,eb as j,ec as Q,fa as C,fb as B,fi as De,ga as x,gb as u,hb as r,hd as ce,ib as a,jb as S,k as v,lc as ae,mc as se,nb as K,ob as Z,pb as ee,pj as G,qb as y,qc as le,sb as h,tb as _,u as I,vd as H,wd as ye,xb as W,xd as ge,yb as N,yd as z,zb as $}from"./chunk-SMW7PHYX.js";import"./chunk-BMIYOSOG.js";var b=(()=>{let o=class o{get baseUrl(){return"admin/staff-evaluations/evaluators/evaluations"}constructor(l){this.webAPI=l,this.DefaultRows=10,this.page=1,this.rows=this.DefaultRows,this.totalRecords=0,this.evaluatees={}}getSurveysAndResponses(l,n,c){if(!l&&!n){if(this.forms?.length)return v({count:this.totalRecords,results:this.forms});l=1,n=this.DefaultRows}let p=new ce;return c&&(p=p.append("surveyID",c.toString())),p=p.append("page",l.toString()),p=p.append("rows",n.toString()),this.webAPI.getData(`${this.baseUrl}`,p)}emailUnnotifiedSubmissions(){return this.webAPI.getData(`${this.baseUrl}/${this.surveyID}/submissions/notify`)}getTeamSurveyResponses(l){let n=new ce;return n=n.append("page",l.page.toString()),n=n.append("rows",l.rows.toString()),n=n.append("includeCount",l.getTotalCount.toString()),l.orderBy&&(n=n.append("orderBy",l.orderBy)),this.webAPI.getData(`${this.baseUrl}/${this.surveyID}/submissions`,n)}getSurvey(){return this.webAPI.getData(`${this.baseUrl}/${this.surveyID}/staff/${this.clubUserID}`)}getSurveyEvaluatees(){return this.evaluatees[this.surveyID]?v(this.evaluatees[this.surveyID]):this.webAPI.getData(`${this.baseUrl}/${this.surveyID}/evaluatees`).pipe(R(l=>{this.evaluatees[this.surveyID]=l}))}getSurveyResponse(){return this.webAPI.getData(`${this.baseUrl}/${this.surveyID}/staff/${this.clubUserID}/response`)}getSurveyReview(){return this.webAPI.getData(`${this.baseUrl}/${this.surveyID}/staff/${this.clubUserID}/review`)}saveSurveyReview(l,n){return n.surveyReviewID?this.webAPI.putData(`${this.baseUrl}/${this.surveyID}/staff/${this.clubUserID}/responses/${l}/review`,n):this.webAPI.postData(`${this.baseUrl}/${this.surveyID}/staff/${this.clubUserID}/responses/${l}/review`,n)}saveSurveyResponse(l){return l.surveyResponseID?this.webAPI.putData(`${this.baseUrl}/${this.surveyID}/staff/${this.clubUserID}/responses/${l.surveyResponseID}`,l):this.webAPI.postData(`${this.baseUrl}/${this.surveyID}/staff/${this.clubUserID}/responses`,l)}getSurveyResponseDocument(l,n){return v(null)}saveSurveyResponseDocument(l,n){return v(null)}downloadSurveyResponseDocument(l,n){return v(null)}deleteSurveyResponseDocument(l,n){return v(null)}resetState(){this.page=1,this.rows=this.DefaultRows,this.totalRecords=0,this.forms=[],this.surveyID=null,this.clubUserID=null}};o.\u0275fac=function(n){return new(n||o)(pe(De))},o.\u0275prov=ue({token:o,factory:o.\u0275fac});let t=o;return t})();var Ge=(()=>{let o=class o{constructor(l){this.surveyService=l}ngOnInit(){}ngOnDestroy(){this.surveyService.resetState()}};o.\u0275fac=function(n){return new(n||o)(f(b))},o.\u0275cmp=T({type:o,selectors:[["ng-component"]],standalone:!1,decls:1,vars:0,template:function(n,c){n&1&&S(0,"router-outlet")},dependencies:[ye],encapsulation:2});let t=o;return t})();var it=["optionsMenu"],nt=(t,o)=>({"py-2":t,"pb-2":o}),Xe=(t,o)=>[t,"staff",o];function ot(t,o){t&1&&(e(0,` 2 `),S(1,"app-button-loader"),e(2,` 3 `),r(3,"span"),e(4,"Notifying..."),a(),e(5,` 4 `))}function rt(t,o){t&1&&e(0,` 5 Notify Completed Forms 6 `)}function at(t,o){if(t&1){let i=y();e(0,` 7 `),r(1,"div",15),e(2,` 8 `),r(3,"button",16),h("click",function(n){C(i);let c=_().$implicit;return _(2).notifyCompleted(c.surveyID),x(n.stopPropagation())}),e(4,` 9 `),d(5,ot,6,0)(6,rt,1,0),a(),e(7,` 10 `),a(),e(8,` 11 `)}if(t&2){let i=_().$implicit,l=_(2);s(3),q("btn-icon-paper-plane",l.notifyingSurveyID!==i.surveyID),u("disabled",l.notifyingSurveyID===i.surveyID),s(2),m(l.notifyingSurveyID===i.surveyID?5:6)}}function st(t,o){t&1&&(e(0,` 12 `),r(1,"div",17),e(2,` 13 `),S(3,"i",18),e(4,` 14 `),a(),e(5,` 15 `))}function lt(t,o){if(t&1&&(e(0,` 16 `),d(1,st,6,0)),t&2){let i=_().$implicit;s(),m(i.isComplete?1:-1)}}function ct(t,o){if(t&1&&(e(0,` 17 `),r(1,"div",19),e(2,` 18 `),r(3,"div",20),e(4,` 19 `),r(5,"strong"),e(6),a(),e(7,` 20 `),a(),e(8,` 21 `),r(9,"div",21),e(10,` 22 `),r(11,"span",22),e(12,"Coaches Notified"),a(),e(13,` 23 `),a(),e(14,` 24 `),a(),e(15,` 25 `),r(16,"div",23),e(17,` 26 `),r(18,"p-progressBar",24),e(19,` 27 `),a(),e(20,` 28 `),a(),e(21,` 29 `)),t&2){let i=_(2).$implicit;s(6),g("",i.reviewNotifiedPercentage,"%"),s(12),u("value",i.reviewNotifiedPercentage)("showValue",!1)}}function dt(t,o){if(t&1&&(e(0,` 30 `),r(1,"div",19),e(2,` 31 `),r(3,"div",20),e(4,` 32 `),r(5,"strong"),e(6),a(),e(7,` 33 `),a(),e(8,` 34 `),r(9,"div",21),e(10,` 35 `),r(11,"span",22),e(12,` 36 Coach Responses Received 37 `),a(),e(13,` 38 `),a(),e(14,` 39 `),a(),e(15,` 40 `),r(16,"div",23),e(17,` 41 `),r(18,"p-progressBar",24),e(19,` 42 `),a(),e(20,` 43 `),a(),e(21,` 44 `),r(22,"div",19),e(23,` 45 `),r(24,"div",20),e(25,` 46 `),r(26,"strong"),e(27),a(),e(28,` 47 `),a(),e(29,` 48 `),r(30,"div",21),e(31,` 49 `),r(32,"span",22),e(33,"DOC Reviews Completed"),a(),e(34,` 50 `),a(),e(35,` 51 `),a(),e(36,` 52 `),r(37,"div",23),e(38,` 53 `),r(39,"p-progressBar",24),e(40,` 54 `),a(),e(41,` 55 `),a(),e(42,` 56 `),d(43,ct,22,3)),t&2){let i=_().$implicit;s(6),g("",i.userSubmissionPercentage,"%"),s(12),u("value",i.userSubmissionPercentage)("showValue",!1),s(9),g("",i.userReviewPercentage,"%"),s(12),u("value",i.userReviewPercentage)("showValue",!1),s(4),m(i.showNotifiedStatus?43:-1)}}function mt(t,o){if(t&1&&(e(0,` 57 `),r(1,"div",19),e(2,` 58 `),r(3,"div",20),e(4,` 59 `),r(5,"strong"),e(6),a(),e(7,` 60 `),a(),e(8,` 61 `),r(9,"div",21),e(10,` 62 `),r(11,"span",22),e(12,"Coaches Notified"),a(),e(13,` 63 `),a(),e(14,` 64 `),a(),e(15,` 65 `),r(16,"div",23),e(17,` 66 `),r(18,"p-progressBar",24),e(19,` 67 `),a(),e(20,` 68 `),a(),e(21,` 69 `)),t&2){let i=_(2).$implicit;s(6),g("",i.responseNotifiedPercentage,"%"),s(12),u("value",i.responseNotifiedPercentage)("showValue",!1)}}function _t(t,o){if(t&1&&(e(0,` 70 `),r(1,"div",19),e(2,` 71 `),r(3,"div",20),e(4,` 72 `),r(5,"strong"),e(6),a(),e(7,` 73 `),a(),e(8,` 74 `),r(9,"div",21),e(10,` 75 `),r(11,"span",22),e(12,` 76 DOC Reviews Completed 77 `),a(),e(13,` 78 `),a(),e(14,` 79 `),a(),e(15,` 80 `),r(16,"div",23),e(17,` 81 `),r(18,"p-progressBar",24),e(19,` 82 `),a(),e(20,` 83 `),a(),e(21,` 84 `),d(22,mt,22,3)),t&2){let i=_().$implicit;s(6),g("",i.userSubmissionPercentage,"%"),s(12),u("value",i.userSubmissionPercentage)("showValue",!1),s(4),m(i.showNotifiedStatus?22:-1)}}function ut(t,o){t&1&&(e(0,` 85 `),r(1,"app-status-indicator",32),e(2,` 86 `),a(),e(3,` 87 `)),t&2&&(s(),u("dots",!0))}function pt(t,o){t&1&&(e(0,` 88 `),r(1,"app-status-indicator",33),e(2,` 89 `),a(),e(3,` 90 `)),t&2&&(s(),u("dots",!0))}function vt(t,o){t&1&&(e(0,` 91 `),r(1,"app-status-indicator",34),e(2,` 92 `),a(),e(3,` 93 `)),t&2&&(s(),u("dots",!0))}function Ct(t,o){if(t&1&&(e(0,` 94 `),d(1,pt,4,1),d(2,vt,4,1)),t&2){let i=_(2).$implicit;s(),m(i.responseSubmissionDate?-1:1),s(),m(i.responseSubmissionDate?2:-1)}}function xt(t,o){t&1&&(e(0,` 95 `),r(1,"app-status-indicator",35),e(2,` 96 `),a(),e(3,` 97 `)),t&2&&(s(),u("dots",!0))}function ft(t,o){t&1&&(e(0,` 98 `),r(1,"app-status-indicator",36),e(2,` 99 `),a(),e(3,` 100 `)),t&2&&(s(),u("dots",!0))}function ht(t,o){t&1&&(e(0,` 101 `),r(1,"app-status-indicator",37),e(2,` 102 `),a(),e(3,` 103 `)),t&2&&(s(),u("dots",!0))}function St(t,o){t&1&&(e(0,` 104 `),r(1,"app-status-indicator",38),e(2,` 105 `),a(),e(3,` 106 `)),t&2&&(s(),u("dots",!0))}function yt(t,o){if(t&1&&(e(0,` 107 `),d(1,ht,4,1),d(2,St,4,1)),t&2){let i=_(4).$implicit;s(),m(i.reviewNotifiedDate?-1:1),s(),m(i.reviewNotifiedDate?2:-1)}}function gt(t,o){t&1&&(e(0,` 108 `),r(1,"app-status-indicator",39),e(2,` 109 `),a(),e(3,` 110 `)),t&2&&(s(),u("dots",!0))}function wt(t,o){if(t&1&&(e(0,` 111 `),d(1,yt,3,2),d(2,gt,4,1)),t&2){let i=_(4).$implicit;s(),m(i.showNotifiedStatus?1:-1),s(),m(i.showNotifiedStatus?-1:2)}}
111function bt(t,o){if(t&1&&(e(0,` 112 `),d(1,ft,4,1),d(2,wt,3,2)),t&2){let i=_(2).$implicit;s(),m(i.reviewCompletedDate?-1:1),s(),m(i.reviewCompletedDate?2:-1)}}function Ft(t,o){if(t&1&&(e(0,` 113 `),r(1,"div"),e(2,` 114 `),r(3,"div",23),e(4,` 115 `),d(5,ut,4,1),d(6,Ct,3,2),a(),e(7,` 116 `),r(8,"div",23),e(9,` 117 `),d(10,xt,4,1),d(11,bt,3,2),a(),e(12,` 118 `),a(),e(13,` 119 `)),t&2){let i=_().$implicit;s(5),m(i.surveyResponseID?-1:5),s(),m(i.surveyResponseID?6:-1),s(4),m(i.surveyReviewID?-1:10),s(),m(i.surveyReviewID?11:-1)}}function Dt(t,o){t&1&&(e(0,` 120 `),r(1,"app-status-indicator",40),e(2,` 121 `),a(),e(3,` 122 `)),t&2&&(s(),u("dots",!0))}function Et(t,o){t&1&&(e(0,` 123 `),r(1,"app-status-indicator",41),e(2,` 124 `),a(),e(3,` 125 `)),t&2&&(s(),u("dots",!0))}function It(t,o){t&1&&(e(0,` 126 `),r(1,"app-status-indicator",42),e(2,` 127 `),a(),e(3,` 128 `)),t&2&&(s(),u("dots",!0))}function Rt(t,o){t&1&&(e(0,` 129 `),r(1,"app-status-indicator",43),e(2,` 130 `),a(),e(3,` 131 `)),t&2&&(s(),u("dots",!0))}function Tt(t,o){if(t&1&&(e(0,` 132 `),d(1,It,4,1),d(2,Rt,4,1)),t&2){let i=_(4).$implicit;s(),m(i.responseNotifiedDate?-1:1),s(),m(i.responseNotifiedDate?2:-1)}}function Nt(t,o){t&1&&(e(0,` 133 `),r(1,"app-status-indicator",44),e(2,` 134 `),a(),e(3,` 135 `)),t&2&&(s(),u("dots",!0))}function $t(t,o){if(t&1&&(e(0,` 136 `),d(1,Tt,3,2),d(2,Nt,4,1)),t&2){let i=_(4).$implicit;s(),m(i.showNotifiedStatus?1:-1),s(),m(i.showNotifiedStatus?-1:2)}}function At(t,o){if(t&1&&(e(0,` 137 `),d(1,Et,4,1),d(2,$t,3,2)),t&2){let i=_(2).$implicit;s(),m(i.responseSubmissionDate?-1:1),s(),m(i.responseSubmissionDate?2:-1)}}function Ut(t,o){if(t&1&&(e(0,` 138 `),r(1,"div"),e(2,` 139 `),r(3,"div",23),e(4,` 140 `),d(5,Dt,4,1),d(6,At,3,2),a(),e(7,` 141 `),a(),e(8,` 142 `)),t&2){let i=_().$implicit;s(5),m(i.surveyResponseID?-1:5),s(),m(i.surveyResponseID?6:-1)}}function kt(t,o){t&1&&ee(0)}function Vt(t,o){if(t&1&&(e(0,` 143 `),r(1,"a",45),e(2,` 144 `),E(3,kt,1,0,"ng-container",46),e(4,` 145 `),a(),e(5,` 146 `)),t&2){let i=_().$implicit,l=te(25),n=_().$implicit;s(),u("routerLink",Q(2,Xe,n.surveyID,i.clubUserID)),s(2),u("ngTemplateOutlet",l)}}function Pt(t,o){t&1&&ee(0)}function Mt(t,o){if(t&1&&(e(0,` 147 `),r(1,"a",45),e(2,` 148 `),E(3,Pt,1,0,"ng-container",46),e(4,` 149 `),a(),e(5,` 150 `)),t&2){let i=_().$implicit,l=te(25),n=_().$implicit;s(),u("routerLink",Q(2,Xe,n.surveyID,i.clubUserID)),s(2),u("ngTemplateOutlet",l)}}function Ot(t,o){t&1&&e(0,` 151 Edit 152 `)}function Lt(t,o){t&1&&e(0,` 153 View 154 `)}function jt(t,o){if(t&1&&(e(0,` 155 `),d(1,Ot,1,0),d(2,Lt,1,0)),t&2){let i=_(2).$implicit;s(),m(i.isActive?1:-1),s(),m(i.isActive?-1:2)}}function Bt(t,o){if(t&1&&(e(0,` 156 `),r(1,"div",25),e(2,` 157 `),r(3,"div",26),e(4,` 158 `),r(5,"span",27),e(6,` 159 `),r(7,"app-user-initials",28),e(8,` 160 `),a(),e(9,` 161 `),a(),e(10,` 162 `),r(11,"span",29),e(12),a(),e(13,` 163 `),a(),e(14,` 164 `),r(15,"div",30),e(16,` 165 `),d(17,Ft,14,4),d(18,Ut,9,2),a(),e(19,` 166 `),r(20,"div",31),e(21,` 167 `),d(22,Vt,6,5),d(23,Mt,6,5),E(24,jt,3,2,"ng-template",null,1,le),e(26,` 168 `),a(),e(27,` 169 `),a(),e(28,` 170 `)),t&2){let i=o.$implicit,l=o.$index,n=_().$implicit,c=_(2);s(),u("ngClass",Q(10,nt,l!==0,l===0)),s(6),u("firstName",i.userFirstName)("lastName",i.userLastName)("id",i.userID),s(5),U(` 171 `,i.userFirstName," ",i.userLastName,` 172 `),s(5),m(n.surveyTypeID===c.SurveyType.COACH_RESPONSE_DOC_REVIEW?17:-1),s(),m(n.surveyTypeID===c.SurveyType.DOC_COACH_ASSESSMENT?18:-1),s(4),m(i.responseSubmissionDate&&n.surveyTypeID===c.SurveyType.COACH_RESPONSE_DOC_REVIEW?22:-1),s(),m(n.surveyTypeID===c.SurveyType.DOC_COACH_ASSESSMENT?23:-1)}}
172function Wt(t,o){if(t&1&&(e(0,` 173 `),r(1,"div",7),e(2,` 174 `),r(3,"p-accordion",8),e(4,` 175 `),r(5,"p-accordion-panel",9),e(6,` 176 `),r(7,"p-accordion-header"),e(8,` 177 `),r(9,"div",10),e(10,` 178 `),r(11,"div",11),e(12,` 179 `),r(13,"div"),e(14,` 180 `),r(15,"div",12),e(16),a(),e(17,` 181 `),r(18,"div",13),e(19,` 182 `),r(20,"app-pill",14),e(21,` 183 `),a(),e(22,` 184 `),r(23,"span"),e(24),ae(25,"date"),ae(26,"date"),a(),e(27,` 185 `),a(),e(28,` 186 `),a(),e(29,` 187 `),d(30,at,9,4)(31,lt,2,1),a(),e(32,` 188 `),d(33,dt,44,7),d(34,_t,23,4),a(),e(35,` 189 `),a(),e(36,` 190 `),r(37,"p-accordion-content"),e(38,` 191 `),j(39,Bt,29,13,null,null,L),a(),e(41,` 192 `),a(),e(42,` 193 `),a(),e(43,` 194 `),a(),e(44,` 195 `)),t&2){let i=o.$implicit,l=o.$index,n=_(2);s(),u("id","form-"+i.surveyID),s(2),u("value",l===0?i.surveyID:null),s(2),u("value",i.surveyID),s(11),g(` 196 `,i.title,` 197 `),s(4),u("status",i.isActive?"active":"default")("text",i.isActive?"open":"closed")("flex",!0),s(4),U(` 198 `,se(25,12,i.startDate)," - ",se(26,14,i.endDate),` 199 `),s(6),m(i.showNotify&&i.showNotifiedStatus?30:31),s(3),m(i.surveyTypeID===n.SurveyType.COACH_RESPONSE_DOC_REVIEW?33:-1),s(),m(i.surveyTypeID===n.SurveyType.DOC_COACH_ASSESSMENT?34:-1),s(5),B(i.submissions)}}function qt(t,o){t&1&&(e(0,` 200 `),r(1,"div",47),e(2,` 201 `),S(3,"app-skeleton-template"),e(4,` 202 `),a(),e(5,` 203 `))}function Qt(t,o){if(t&1&&(e(0,` 204 `),j(1,qt,6,0,null,null,L)),t&2){let i=_(2);s(),B(i.loadingXMore)}}function Ht(t,o){t&1&&e(0,` 205 Loading... 206 `)}function zt(t,o){t&1&&e(0,` 207 Load More 208 `)}function Gt(t,o){if(t&1){let i=y();e(0,` 209 `),r(1,"div",48),e(2,` 210 `),r(3,"button",49),h("click",function(){C(i);let n=_(2);return x(n.loadMore())}),e(4,` 211 `),d(5,Ht,1,0),d(6,zt,1,0),a(),e(7,` 212 `),a(),e(8,` 213 `)}if(t&2){let i=_(2);s(3),u("disabled",i.paginating),s(2),m(i.paginating?5:-1),s(),m(i.paginating?-1:6)}}function Xt(t,o){if(t&1&&(e(0,` 214 `),j(1,Wt,45,16,null,null,L),d(3,Qt,3,0),d(4,Gt,9,3)),t&2){let i=_();s(),B(i.surveyService.forms),s(2),m(i.paginating?3:-1),s(),m(i.surveyService.totalRecords>(i.surveyService.forms==null?null:i.surveyService.forms.length)?4:-1)}}function Jt(t,o){t&1&&(e(0,` 215 `),r(1,"div",50),e(2,` 216 No forms are available 217 `),a(),e(3,` 218 `))}var Je=(()=>{let o=class o{constructor(l,n,c){this.route=l,this.siteDataService=n,this.surveyService=c,this.SurveyType=k,this.paginating=!1,this.loadingXMore=[],this.options=[],this.unsubscribe$=new P}ngOnInit(){this.route.queryParams.pipe(R(l=>{this.surveyID=+l.formID}),w(()=>I({surveys:this.surveyService.getSurveysAndResponses(),surveyToRefresh:this.surveyID?this.surveyService.getSurveysAndResponses(1,1,this.surveyID):v(null)})),D(this.unsubscribe$)).subscribe({next:l=>{if(this.surveyService.totalRecords=l?.surveys?.count,this.surveyService.forms=l?.surveys?.results,l.surveyToRefresh?.results.length){let n=this.surveyService.forms.findIndex(c=>c.surveyID===this.surveyID);this.surveyService.forms.splice(n,1,l.surveyToRefresh.results[0])}this.siteDataService.hideSiteLoader(),this.surveyID&&setTimeout(()=>{try{document.getElementById("form-"+this.surveyID).scrollIntoView({behavior:"smooth"})}catch(n){}},1e3)},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem getting data.")}})}loadMore(){let l=this.surveyService.totalRecords-this.surveyService.forms?.length;l>this.surveyService.rows&&(l=this.surveyService.rows),this.loadingXMore=[...Array(l)].map((n,c)=>c+1),this.paginating=!0,this.surveyService.getSurveysAndResponses(this.surveyService.page+1,this.surveyService.rows).pipe(D(this.unsubscribe$)).subscribe({next:n=>{n?.results.length&&(this.surveyService.forms=[...this.surveyService.forms,...n.results],this.surveyService.page+=1),this.paginating=!1},error:()=>{this.paginating=!1,this.siteDataService.showSiteErrorAlert("There was a problem getting data.")}})}notifyCompleted(l){this.notifyingSurveyID=l,this.surveyService.surveyID=l,this.surveyService.emailUnnotifiedSubmissions().pipe(w(n=>n?this.surveyService.getSurveysAndResponses(1,1,l):v(null)),D(this.unsubscribe$)).subscribe({next:n=>{if(n?.results.length){let c=this.surveyService.forms.findIndex(p=>p.surveyID===l);this.surveyService.forms.splice(c,1,n.results[0]),this.siteDataService.showSiteSuccessAlert("Completed forms notified successfully")}else this.siteDataService.showSiteErrorAlert("There was a problem notifying");this.notifyingSurveyID=null},error:()=>{this.notifyingSurveyID=null,this.siteDataService.showSiteErrorAlert("There was a problem notifying")}})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};o.\u0275fac=function(n){return new(n||o)(f(H),f(G),f(b))}
218,o.\u0275cmp=T({type:o,selectors:[["app-evaluations"]],viewQuery:function(n,c){if(n&1&&W(it,5),n&2){let p;N(p=$())&&(c.optionsMenu=p.first)}},standalone:!1,decls:18,vars:1,consts:[["noForms",""],["linkText",""],[1,"container"],[1,"row","mt-3"],[1,"col-md-12"],[1,"border-bottom","mb-3","d-flex","justify-content-center"],[1,"text-header-2"],[1,"bg-white","border-all","border-radius","mb-3",3,"id"],["expandIcon","p-icon ml-3 pr-3 fa-thin fa-square-chevron-down text-jumbo text-grey-lt align-self-start","collapseIcon","p-icon ml-3 pr-3 fa-thin fa-square-chevron-up text-jumbo text-grey-lt align-self-start",1,"mb-3","p-accordion-naked","accordion-toggle-first","bg-white",3,"value"],[3,"value"],[1,"full-width","px-3","pb-2"],[1,"full-width","form-header","d-flex","align-items-center"],[1,"text-large","fw-600","form-title"],[1,"d-flex","align-items-center"],[3,"status","text","flex"],[1,"ml-auto"],["type","button",1,"btn","btn-tertiary",3,"click","disabled"],[1,"ml-auto","text-largest","text-green"],[1,"fa","fa-circle-check"],[1,"row"],[1,"col-auto"],[1,"col","d-flex","justify-content-end","align-items-end"],[1,"text-small"],[1,"full-width"],[3,"value","showValue"],[1,"row","participant-row","align-items-center","border-top","mt-0",3,"ngClass"],[1,"col-md-8","d-flex","align-items-center"],[1,"mr-2"],[3,"firstName","lastName","id"],[1,"fw-500","text-medium"],[1,"col-md-3","text-medium"],[1,"col-md-1","d-flex","justify-content-end","text-medium"],["status","default","text","Response Not Started",3,"dots"],["status","warning","text","Response Started, Not Finished",3,"dots"],["status","active","text","Response Completed",3,"dots"],["status","default","text","Review Not Started",3,"dots"],["status","warning","text","Review Started, Not Finished",3,"dots"],["status","warning","text","Review Completed",3,"dots"],["status","active","text","Review Completed & Notified",3,"dots"],["status","active","text","Review Completed",3,"dots"],["status","default","text","Not Started",3,"dots"],["status","warning","text","Started, Not Finished",3,"dots"],["status","warning","text","Completed",3,"dots"],["status","active","text","Completed & Notified",3,"dots"],["status","active","text","Completed",3,"dots"],[1,"btn-naked","btn-icon-chevron-right-after",3,"routerLink"],[4,"ngTemplateOutlet"],[1,"mb-3"],[1,"d-flex","justify-content-center"],["type","button",1,"btn","btn-lg","btn-naked",3,"click","disabled"],[1,"card"]],template:function(n,c){n&1&&(r(0,"div",2),e(1,` 219 `),r(2,"div",3),e(3,` 220 `),r(4,"div",4),e(5,` 221 `),r(6,"div",5),e(7,` 222 `),r(8,"h1",6),e(9,"Staff Evaluations"),a(),e(10,` 223 `),a(),e(11,` 224 `),d(12,Xt,5,2),E(13,Jt,4,0,"ng-template",null,0,le),e(15,` 225 `),a(),e(16,` 226 `),a(),e(17,` 227`),a()),n&2&&(s(12),m((c.surveyService.forms==null?null:c.surveyService.forms.length)>0?12:-1))},dependencies:[Ce,xe,z,$e,Te,Ue,X,Ve,Ne,Le,Pe,Me,Oe,fe],styles:[`.p-progressbar .p-progressbar-value{background:var(--green-500)}.p-progressbar{height:7px} 228`],encapsulation:2});let t=o;return t})();var Yt=["optionsMenu"],Kt=()=>({width:"100%"}),Zt=()=>["../../.."],ei=()=>["./"],ti=t=>({formID:t}),ii=()=>({}),ni=()=>({width:"auto"});function oi(t,o){if(t&1){let i=y();e(0,` 229 `),r(1,"div",13),e(2,` 230 `),r(3,"div",14),e(4,` 231 `),r(5,"p-select",15),re("ngModelChange",function(n){C(i);let c=_(2);return oe(c.selectedEvaluateeClubUserID,n)||(c.selectedEvaluateeClubUserID=n),x(n)}),h("ngModelChange",function(n){C(i);let c=_(2);return x(c.changeEvaluatee(n,!1))}),e(6,` 232 `),a(),e(7,` 233 `),a(),e(8,` 234 `),a(),e(9,` 235 `)}if(t&2){let i=_(2);s(5),ie(A(5,Kt)),ne("ngModel",i.selectedEvaluateeClubUserID),u("options",i.evaluatees)("filter",!1)}}function ri(t,o){if(t&1){let i=y();e(0,` 236 `),r(1,"app-shared-survey-response-edit",16),h("onSave",function(n){C(i);let c=_(2);return x(c.onResponseSave(n))})("onCancel",function(){C(i);let n=_(2);return x(n.cancel())}),e(2,` 237 `),a(),e(3,` 238 `)}if(t&2){let i=_(2);s(),u("surveyID",i.surveyID)("showBackButton",!1)("showTitle",!0)("isEvaluator",!0)("clubUserID",i.clubUserID)("survey",i.survey)("surveyResponse",i.surveyResponse)("showCopy
238Feedback",!1)}}function ai(t,o){if(t&1&&(e(0,` 239 `),r(1,"app-shared-survey-response",17),e(2,` 240 `),a(),e(3,` 241 `)),t&2){let i=_(3);s(),u("isEvaluator",!0)("survey",i.survey)("surveyID",i.surveyID)("clubUserID",i.clubUserID)("surveyResponse",i.surveyResponse)("surveyReview",i.surveyReview)("editable",!i.formExpired)("showCopyFeedback",!1)}}function si(t,o){t&1&&(e(0,` 242 `),S(1,"span",22),e(2,` 243 `))}function li(t,o){if(t&1){let i=y();e(0,` 244 `),r(1,"button",20),h("click",function(n){C(i);let c=_(5);return x(c.toggleOptionsMenu(n))}),e(2,` 245 `),d(3,si,3,0),e(4),a(),e(5,` 246 `),r(6,"p-menu",21,0),e(8,` 247 `),a(),e(9,` 248 `)}if(t&2){let i=_(5);s(),u("disabled",i.loading||i.saving||i.savingFinishLater),s(2),m(i.saving?3:-1),s(),g(` 249 `,i.saving?"Saving...":"Save",` 250 `),s(2),ie(A(7,ni)),u("model",i.options)("popup",!0)}}function ci(t,o){t&1&&(e(0,` 251 `),S(1,"span",22),e(2,` 252 `))}function di(t,o){t&1&&e(0,` 253 Saving... 254 `)}function mi(t,o){t&1&&e(0,` 255 Save 256 `)}function _i(t,o){t&1&&e(0,` 257 Save & Complete 258 `)}function ui(t,o){if(t&1&&(e(0,` 259 `),d(1,mi,1,0)(2,_i,1,0)),t&2){let i=_(6);s(),m(i.surveyReview!=null&&i.surveyReview.isCompleted?1:2)}}function pi(t,o){if(t&1){let i=y();e(0,` 260 `),r(1,"button",20),h("click",function(){C(i);let n=_(5);return x(n.save(!0,!1))}),e(2,` 261 `),d(3,ci,3,0),d(4,di,1,0)(5,ui,3,1),a(),e(6,` 262 `)}if(t&2){let i=_(5);s(),u("disabled",i.loading||i.saving||i.savingFinishLater),s(2),m(i.saving?3:-1),s(),m(i.saving?4:5)}}function vi(t,o){t&1&&(e(0,` 263 `),S(1,"span",22),e(2,` 264 `))}function Ci(t,o){t&1&&e(0,` 265 Saving... 266 `)}function xi(t,o){t&1&&e(0,` 267 Save & Finish Later 268 `)}function fi(t,o){if(t&1){let i=y();e(0,` 269 `),r(1,"button",23),h("click",function(){C(i);let n=_(5);return x(n.save(!1,!1))}),e(2,` 270 `),d(3,vi,3,0),d(4,Ci,1,0),d(5,xi,1,0),a(),e(6,` 271 `)}if(t&2){let i=_(5);s(),u("disabled",i.saving||i.savingFinishLater),s(2),m(i.savingFinishLater?3:-1),s(),m(i.savingFinishLater?4:-1),s(),m(i.savingFinishLater?-1:5)}}function hi(t,o){if(t&1&&(e(0,` 272 `),d(1,li,10,8)(2,pi,7,3),d(3,fi,7,4)),t&2){let i=_(4);s(),m(i.showNotify&&(!i.surveyReview||!i.surveyReview.isNotified)?1:2),s(2),m(!i.surveyReview||!i.surveyReview.isCompleted?3:-1)}}function Si(t,o){if(t&1&&(e(0,` 273 `),r(1,"div",18),e(2,` 274 `),d(3,hi,4,2),r(4,"a",19),e(5,` 275 Cancel 276 `),a(),e(6,` 277 `),a(),e(7,` 278 `)),t&2){let i=_(3);s(3),m(i.formExpired?-1:3),s(),q("text-grey",i.saving),u("routerLink",i.saving?A(6,ei):A(5,Zt))("queryParams",i.saving?A(9,ii):ve(7,ti,i.surveyID))}}function yi(t,o){if(t&1&&(e(0,` 279 `),d(1,ai,4,8),d(2,Si,8,10)),t&2){let i=_(2);s(),m(i.survey&&i.surveyResponse?1:-1),s(),m(i.survey?2:-1)}}function gi(t,o){if(t&1&&(e(0,` 280 `),r(1,"div",3),e(2,` 281 `),r(3,"div",4),e(4,` 282 `),r(5,"div",5),e(6,` 283 `),r(7,"div",6),e(8,` 284 `),r(9,"div",7),e(10,` 285 `),r(11,"div",8),e(12,` 286 `),r(13,"span",9),e(14,` 287 `),r(15,"app-user-initials",10),e(16,` 288 `),a(),e(17,` 289 `),a(),e(18,` 290 `),a(),e(19,` 291 `),r(20,"div",11),e(21,` 292 `),r(22,"span",12),e(23),a(),e(24,` 293 `),a(),e(25,` 294 `),d(26,oi,10,6),a(),e(27,` 295 `),a(),e(28,` 296 `),a(),e(29,` 297 `),a(),e(30,` 298 `),d(31,ri,4,8),d(32,yi,3,2),a(),e(33,` 299`)),t&2){let i=_();s(15),u("firstName",i.evaluatee==null||i.evaluatee.user==null?null:i.evaluatee.user.firstName)("lastName",i.evaluatee==null||i.evaluatee.user==null?null:i.evaluatee.user.lastName)("size","large")("id",i.evaluatee==null?null:i.evaluatee.clubUserID),s(8),U("",i.evaluatee==null?null:i.evaluatee.user.firstName," ",i.evaluatee==null?null:i.evaluatee.user.lastName),s(3),m((i.evaluatees==null?null:i.evaluatees.length)>1?26:-1),s(5),m(i.survey.surveyTypeID===i.SurveyType.DOC_COACH_ASSESSMENT?31:-1),s(),m(i.survey.surveyTypeID===i.SurveyType.COACH_RESPONSE_DOC_REVIEW?32:-1)}}function wi(t,o){if(t&1){let i=y();e(0,` 300 `),r(1,"app-dialog-footer"),e(2,` 301 `),K(3,24),e(4,` 302 `),r(5,"button",25),h("click",function(){C(i);let n=_();return x(n.cancelChangeEvaluatee())}),e(6,"No"),a(),e(7,` 303 `),Z(),e(8,` 304 `),K(9,26),e(10,` 305 `),r(11,"button",27),h("click",function(){C(i);let n=_();return x(n.changeEvaluatee(n.switchEvaluateeClubUserID,!0))}),e(12,"Yes"),a(),e(13,` 306 `),Z(),e(14,` 307 `),a(),e(15,` 308 `)}}var Ye=(()=>{let o=class o{constructor(l,n,c,p,F,Ze){this.surveyService=l,this.route=n,this.siteDataService=c,this.router=p,this.authorizeService=F,this.sharedSurveyService=Ze,this.unsubscribe$=new P,this.SurveyType=k,this.loading=!0,this.saving=!1,this.savingFinishLater=!1,this.showSwitchEvaluateeConfirm=!1,this.showNotify=!1,this.Permission=be,this.options=[],this.formExpired=!1}ngOnInit(){this.authorizeService.getUser().subscribe(l=>{l&&(this.user=l)}),this.route.params.subscribe(l=>{l.surveyID&&l.clubUserID&&(this.surveyID=+l.surveyID,this.clubUserID=+l.clubUserID,this.surveyService.surveyID=this.surveyID,this.surveyService.clubUserID=this.clubUserID,I({evaluatees:this.surveyService.getSurveyEvaluatees(),survey:this.surveyService.getSurvey(),surveyResponse:this.surveyService.getSurveyResponse()}).pipe(w(n=>I({evaluatees:v(n.evaluatees),survey:v(n.survey),surveyResponse:v(n.surveyResponse),surveyReview:n.survey?.surveyTypeID===k.COACH_RESPONSE_DOC_REVIEW&&n.surveyResponse?.isCompleted?this.surveyService.getSurveyReview():v(null)})),D(this.unsubscribe$)).subscribe(n=>{n.evaluatees&&(this.evaluatee=n.evaluatees.find(c=>c.clubUserID===this.clubUserID),this.evaluatees=n.evaluatees.map(c=>({value:c.clubUserID,label:c.user.fullName})),this.selectedEvaluateeClubUserID=this.clubUserID),this.survey=n.survey,this.survey&&(this.formExpired=new Date>new Date(this.survey.endDate)),this.surveyResponse=n.surveyResponse,this.surveyResponse||(this.surveyResponse=new We,this.surveyResponse.clubUserID=this.clubUserID,this.surveyResponse.surveyID=this.surveyID),this.surveyReview=n.surveyReview,this.showNotify=this.survey?.criteriaGroups?.some(c=>
308c.surveyCriteriaGroupVisibilityOptionID===Be.EVALUATOR_AND_EVALUATEE),this.loading=!1,this.siteDataService.hideSiteLoader()}))})}changeEvaluatee(l,n){n?this.switchEvaluatee(l):this.responseComponent&&this.responseComponent.dirty||this.editComponent&&!this.editComponent.pristine?(this.switchEvaluateeClubUserID=l,this.showSwitchEvaluateeConfirm=!0):this.switchEvaluatee(l)}switchEvaluatee(l){this.selectedEvaluateeClubUserID=l,this.router.navigate(["..",l],{relativeTo:this.route}),this.loading=!0,this.showSwitchEvaluateeConfirm=!1}cancelChangeEvaluatee(){this.showSwitchEvaluateeConfirm=!1,this.selectedEvaluateeClubUserID=this.clubUserID}onResponseSave(l){this.surveyService.saveSurveyResponse(l.response).pipe(w(n=>{if(n&&(this.surveyResponse.surveyResponseID=n.surveyResponseID),l.documentsToUpload?.length){let c=[];return l.documentsToUpload.forEach(p=>{let F=this.surveyService.saveSurveyResponseDocument(this.surveyResponse.surveyResponseID,p.file);c.push(F)}),I(c)}else return v(n)}),w(()=>this.surveyService.getSurveyResponse().pipe(R(n=>{this.surveyResponse=n})))).subscribe({next:()=>{this.siteDataService.showSiteSuccessAlert("Responses saved successfully"),this.sharedSurveyService.surveyResponseSaved(this.surveyResponse),this.cancel()},error:n=>{console.error(n),this.siteDataService.showSiteErrorAlert("There was a problem saving data.")}})}save(l,n){let c=this.surveyReview||new qe;l?(this.saving=!0,c.isCompleted=!0,c.isNotified||(c.isNotified=n)):this.savingFinishLater=!0,c.surveyQuestionReviews=this.responseComponent.surveyQuestionReviews.filter(p=>p.commentText),c.surveyCriteriaReviews=this.responseComponent.surveyCriteriaReviews.filter(p=>p.commentText),c.surveyCriteriaValues=this.responseComponent.reviewSurveyCriteriaValues,c.surveyCriteriaGroupComments=this.responseComponent.reviewSurveyCriteriaGroupComments.filter(p=>p.comments),this.surveyService.saveSurveyReview(this.surveyResponse.surveyResponseID,c).pipe(w(()=>this.surveyService.getSurveyReview()),D(this.unsubscribe$)).subscribe({next:p=>{this.surveyReview=p,this.saving=!1,this.savingFinishLater=!1,this.siteDataService.showSiteSuccessAlert("Responses saved successfully")},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem saving the responses."),this.saving=!1,this.savingFinishLater=!1}})}toggleOptionsMenu(l){this.options=[{label:this.surveyResponse?.isCompleted?"Save":"Save & Complete",icon:"fa fa-check",command:()=>{this.save(!0,!1)}},{label:"Save & Notify",icon:"fa fa-paper-plane",command:()=>{this.save(!0,!0)}}],this.optionsMenu.toggle(l)}cancel(){this.router.navigate(["../../../"],{relativeTo:this.route,queryParams:{formID:this.surveyID}})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};o.\u0275fac=function(n){return new(n||o)(f(b),f(H),f(G),f(ge),f(Fe),f(Qe))},o.\u0275cmp=T({type:o,selectors:[["app-form-review"]],viewQuery:function(n,c){if(n&1&&W(J,5)(Y,5)(Yt,5),n&2){let p;N(p=$())&&(c.responseComponent=p.first),N(p=$())&&(c.editComponent=p.first),N(p=$())&&(c.optionsMenu=p.first)}},standalone:!1,decls:5,vars:3,consts:[["optionsMenu",""],["header","Confirm Switch User",3,"visibleChange","visible","modal"],["pTemplate","footer"],[1,"container","mb-3"],[1,"my-3"],[1,"card-content"],[1,"player-section"],[1,"row","no-gutters","border-bottom","pb-3"],[1,"col-auto"],[1,"profile-image","align-self-center","mr-2"],[3,"firstName","lastName","size","id"],[1,"player-info","justify-content-start","d-flex","align-items-center","col"],[1,"player-name"],[1,"col-auto","d-flex","align-items-center"],[1,"full-width"],[3,"ngModelChange","ngModel","options","filter"],[3,"onSave","onCancel","surveyID","showBackButton","showTitle","isEvaluator","clubUserID","survey","surveyResponse","showCopyFeedback"],[3,"isEvaluator","survey","surveyID","clubUserID","surveyResponse","surveyReview","editable","showCopyFeedback"],["appStickyFormButtons","",1,"sticky-buttons"],[1,"btn","btn-naked","btn-lg",3,"routerLink","queryParams"],["type","button",1,"btn","btn-lg","btn-primary",3,"click","disabled"],["appendTo","body",3,"model","popup"],["role","status","aria-hidden","true",1,"spinner-border","spinner-border-sm"],["type","button",1,"btn","btn-lg",3,"click","disabled"],["slot","secondary"],[1,"btn",3,"click"],["slot","primary"],[1,"btn","btn-primary",3,"click"]],template:function(n,c){n&1&&(d(0,gi,34,9),r(1,"p-dialog",1),re("visibleChange",function(F){return oe(c.showSwitchEvaluateeConfirm,F)||(c.showSwitchEvaluateeConfirm=F),F}),e(2,` 309 This form has unsaved changes. Are you sure you want to abandon those changes? 310 `),E(3,wi,16,0,"ng-template",2),e(4,` 311`),a()),n&2&&(m(c.loading?-1:0),s(),ne("visible",c.showSwitchEvaluateeConfirm),u("modal",!0))},dependencies:[he,Se,z,we,X,Ae,ke,Re,Ie,Ee,Y,J],styles:[".player-info[_ngcontent-%COMP%]{font-size:1.4rem}
311.player-name[_ngcontent-%COMP%]{font-weight:700}.sticky-buttons[_ngcontent-%COMP%]{z-index:5}"]});let t=o;return t})();var Ke=(()=>{let o=class o{};o.\u0275fac=function(n){return new(n||o)},o.\u0275mod=O({type:o}),o.\u0275inj=M({imports:[de.forChild([{path:"",component:Ge,children:[{path:"",canActivate:[me],component:Je,data:{metaTitle:"Staff Forms"}},{path:":surveyID/staff/:clubUserID",canActivate:[me],component:Ye,data:{metaTitle:"Staff Form Review"}}]}]),de]});let t=o;return t})();var Pn=(()=>{let o=class o{};o.\u0275fac=function(n){return new(n||o)},o.\u0275mod=O({type:o}),o.\u0275inj=M({providers:[b],imports:[je,He,Ke]});let t=o;return t})();export{Pn as FormsModule};
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.