PageSourceSearch

https://app.playmetrics.com/assets/v2/ViewForm-B0i1CK6F.js

js playmetrics.com collected 2026-09-24 09:45:59 UTC 17,485 bytes, 2 lines download raw bytes

1import{u as O,D as A,F as S,a as k,z as q,e as L}from"./main-Bs_lHNW0.js";import{F}from"./Form-CW84BtNo.js";import{C as B}from"./CustomTemplate-Rae3iAZl.js";import{D as z}from"./DigitalDocumentPrintView-B4garQfI.js";import{F as H}from"./FormApproveReject-zwSMwlQS.js";import{F as J}from"./FormStatus-TE412JIe.js";import{D as Y}from"./DepthChart-C29q4YC0.js";import{b as W,T as G,P as K,a as Q,F as X}from"./PlayerFormHeader-Bs7Ikv4K.js";import{M as Z}from"./MobileFooterCtas-CdP_AQD4.js";import{_ as $,m as u,a as r,c as d,F as P,e as i,z as f,p as l,x as n,y as b,q as w,f as p,v as y,J as ee,n as te,r as T,at as se}from"./vendor-BlynvCoC.js";import{_ as x}from"./config-DrDySPH_.js";import"./FormField-DHCnjKgb.js";import"./FormField-CyzUpzTx.js";import"./Season-DAeIOQeH.js";import"./ProgramType-BJV7rEJG.js";import"./ResourceTag-8n2mNBNe.js";import"./ResourceVideoModal-DW02jaGE.js";import"./VideoPlayer-C_7IxvhM.js";import"./youtube-CIV-x1-M.js";import"./WaiverModal-k8ORFeCR.js";import"./PaginationView-Bzk55ADP.js";import"./useClubDetails-CNGiqYfu.js";import"./DateFormField-DuliB-bI.js";import"./DepthChart-Bs7x97ar.js";import"./DepthChartRankChange-CCLJ19n0.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};s.SENTRY_RELEASE={id:"c27e83a969462e61a866326f8ee6cc37a4feab4d"};var e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="ff7e8151-3573-4bd1-8bd3-ee403471970b",s._sentryDebugIdIdentifier="sentry-dbid-ff7e8151-3573-4bd1-8bd3-ee403471970b")}catch(m){}})();const oe={props:{form:{type:Object,required:!0},hideCta:{type:Boolean,required:!0},numCompletedDigitalDocuments:{type:Number,required:!0}},emits:["printForm"],setup(){const{formatDate:s}=O();return{pluralize:A,formatDate:s}},data(){return{collapsed:!1}},computed:{isMobile(){return this.$store.getters.isMobile},team(){return this.teamById(this.form.team_id)},teamName(){return this.form.context_type==="Coach"?this.team&&this.team.id>0?this.team.name:"":this.team?this.team.name:""},coachName(){return this.form.context_type==="Coach"?this.form.context_name:this.team?"".concat(this.team.coach_first_name||""," ").concat(this.team.coach_last_name||""):""},playerPosition(){return $.get(this.form,"player.team.position","")},statusClass(){return F.statusClass(this.form.status)},isForPlayer(){return this.form.context_type==="Player"},isForTeam(){return this.form.context_type==="Team"},requiresApproval(){return this.form.form_template&&this.form.form_template.require_approval},contextTypeName(){const s=this.form.context_type;return s==="User"?"Staff Member":s}},methods:{teamById(s){return this.$store.getters.clubTeamByID(s)},toggleCollapsed(){this.collapsed=!this.collapsed}}},ie={class:"view-form-header"},re={class:"title__page"},ne={class:"level is-mobile"},le={class:"level-left"},ae={class:"form-details-container"},me={key:0,class:"form-details-label"},de={key:0,class:"details-container column is-half-mobile"},ue={class:"label is-uppercase"},ce={class:"data"},fe={key:1,class:"details-container column is-half-mobile"},pe={class:"data"},he={key:2,class:"details-container column is-half-mobile"},ye={class:"data"},be={key:3,class:"details-container column is-half-mobile"},_e={class:"data"},ge={key:4,class:"details-container column is-half-mobile"},ve={class:"data"},Fe={key:5,class:"details-container column is-half-mobile"},De={class:"data"},we={class:"details-container column is-half-mobile"},Ce={class:"data"},ke={key:6,class:"details-container column is-half-mobile"},Pe={key:7,class:"details-container column is-half-mobile"},Re={class:"has-text-grey-light",style:{width:"1.5em"}},Te={class:"has-text-grey-light",style:{width:"1.5em"}},Ae={style:{"margin-left":"0.25rem"}};function xe(s,e,m,c,o,t){const D=u("b-tag"),_=u("fa-icon"),C=u("b-button"),g=u("b-dropdown-item"),h=u("b-dropdown");return r(),d("div",ie,[t.isMobile?(r(),d(P,{key:0},[i("h1",re,f(m.form.context_name),1),i("div",ne,[i("div",le,[l(D,{class:w([t.statusClass,"form-status"]),style:{"-webkit-print-color-adjust":"exact"},rounded:""},{default:n(()=>[b(f(m.form.status),1)]),_:1},8,["class"])])])],64)):p("",!0),i("div",ae,[t.isMobile?(r(),d("div",me,[e[4]||(e[4]=i("span",{class:"title__aside"},"Form Details",-1)),i("span",{class:"button is-outlined is-borderless is-small has-text-dark is-hidden-tablet",onClick:e[0]||(e[0]=(...v)=>t.toggleCollapsed&&t.toggleCollapsed(...v))},[o.collapsed?(r(),y(_,{key:0,icon:["fas","angle-down"]})):(r(),y(_,{key:1,icon:["fas","angle-up"]}))])])):p("",!0),!o.collapsed||!t.isMobile?(r(),d("div",{key:1,class:w([{"is-multiline":t.isMobile},"form-details columns is-mobile"])},[t.isMobile?p("",!0):(r(),d("div",de,[i("div",ue,f(t.contextTypeName),1),i("div",ce,f(m.form.context_name),1)])),t.isForPlayer?(r(),d("div",fe,[e[5]||
1(e[5]=i("span",{class:"label"},"TEAM",-1)),i("span",pe,f(t.teamName),1)])):p("",!0),t.isForPlayer||t.isForTeam?(r(),d("div",he,[e[6]||(e[6]=i("span",{class:"label"},"COACH",-1)),i("span",ye,f(t.coachName),1)])):p("",!0),t.isForPlayer?(r(),d("div",be,[e[7]||(e[7]=i("span",{class:"label"},"POSITION",-1)),i("span",_e,f(t.playerPosition),1)])):p("",!0),t.isForPlayer||t.isForTeam?(r(),d("div",ge,[e[8]||(e[8]=i("span",{class:"label"},"SUBMITTED BY",-1)),i("span",ve,f(m.form.submitted_by_name),1)])):p("",!0),t.requiresApproval?(r(),d("div",Fe,[e[9]||(e[9]=i("span",{class:"label"},"REVIEWED BY",-1)),i("span",De,f(m.form.approved_by_name),1)])):p("",!0),i("div",we,[e[10]||(e[10]=i("span",{class:"label"},"DATE COMPLETED",-1)),i("span",Ce,f(c.formatDate(m.form.approved_at,"ll")),1)]),t.isMobile?p("",!0):(r(),d("div",ke,[e[11]||(e[11]=i("span",{class:"label"},"STATUS",-1)),l(D,{class:w([t.statusClass,"form-status"]),style:{"-webkit-print-color-adjust":"exact"},rounded:""},{default:n(()=>[b(f(m.form.status),1)]),_:1},8,["class"])])),!m.hideCta&&!t.isMobile?(r(),d("div",Pe,[m.numCompletedDigitalDocuments===0?(r(),d("button",{key:0,class:"button is-outlined",style:{background:"transparent","margin-top":".75rem"},onClick:e[1]||(e[1]=v=>s.$emit("printForm",!1))},[l(_,{icon:["far","print"]}),e[12]||(e[12]=i("span",{style:{"margin-left":"0.5rem"}},"Print",-1))])):(r(),y(h,{key:1,"aria-role":"list",position:"is-bottom-left"},{trigger:n(()=>[l(C,{class:"is-outlined mt-3",style:{background:"transparent"},"icon-left":s.print},{default:n(()=>[...e[13]||(e[13]=[i("span",{style:{"margin-left":"0.5rem"}},"Print",-1)])]),_:1},8,["icon-left"])]),default:n(()=>[l(g,{"aria-role":"listitem",class:"v-align is-text-size-6",style:{"padding-right":"1.5rem"},onClick:e[2]||(e[2]=v=>s.$emit("printForm",!1))},{default:n(()=>[i("span",Re,[l(_,{icon:["far","file"]})]),e[14]||(e[14]=i("span",{style:{"margin-left":"0.25rem"}},"Form Only",-1))]),_:1}),l(g,{"aria-role":"listitem",class:"v-align is-text-size-6",style:{"padding-right":"1.5rem"},onClick:e[3]||(e[3]=v=>s.$emit("printForm",!0))},{default:n(()=>[i("span",Te,[l(_,{icon:["far","copy"]})]),i("span",Ae,"Form and "+f(c.pluralize(m.numCompletedDigitalDocuments,"Digital Document")),1)]),_:1})]),_:1}))])):p("",!0)],2)):p("",!0)])])}const je=x(oe,[["render",xe],["__scopeId","data-v-d36f1192"]]),Me={components:{FormCollapsible:X,"app-form-custom-template":B,"app-form-depth-chart":Y,"app-form-player-evaluation":Q,"app-form-practice-request":K,"app-form-train-up":G,FormApproveReject:H,FormModalHeader:S,MobileFooterCtas:Z,ViewFormDetails:je,PlayerFormHeader:W,FormStatus:J,DigitalDocumentPrintView:z},setup(){const s="Undo Approval",e="Undo Rejection",m=L();return{pluralize:A,UNDO_APPROVAL:s,UNDO_REJECTION:e,toast:m}},data(){return{form:null,formInvalid:!0,saving:!1,isPrintView:!1,context:null,isLoadingForPrint:!1,includeDigitalDocuments:!1,documentsToDisplay:null,numDocumentsLoaded:0}},computed:{loading(){return this.form==null},isFromFormRequest(){return this.$store.getters.isFrom("ViewFormRequest")},isFromPlayer(){return this.$route.params.player!=null},ctas(){const s=[];return!this.isMobile&&this.isForPlayer&&s.push("Print"),this.canModifyForm&&(this.form.approved_at?s.push("Undo Approval"):this.form.status==="Rejected"?s.push("Undo Rejection"):this.form.status==="Submitted"&&(s.push("Approve"),s.push("Reject"))),s},invalid(){return this.formInvalid},formComponent(){return F.componentFor(this.form)},isPerCoach(){return this.form&&this.form.form_request.form_template_context_type==="Coach"},canModifyForm(){return F.canModifyForm(this.form)},isDepthChart(){return F.componentFor(this.form)==="app-form-depth-chart"},otherFormsToShow(){return F.otherFormsToShow(this.form)},isMobile(){return this.$store.getters.isMobile},isForPlayer(){return this.form.context_type==="Player"},fromEditForm(){return this.$store.getters.isFrom("EditForm")},notificationMessage(){let s="This form has been ".concat(this.form.status);return this.form.status==="Canceled"?s=s.concat(" and is no longer available"):s=s.concat(" and can no longer be edited"),s},completedDigitalDocuments(){const s=[],e=this.form?this.form.form_request.form_template_json:[],m=this.form?this.form.values_json:{};
1return(e||[]).forEach(c=>{(c.elements||[]).forEach(o=>{o.type==="digital-document"&&m[o.id]&&(o.document_id=m[o.id],s.push(o)),(o.elements||[]).forEach(t=>{t.type==="digital-document"&&m[t.id]&&(t.document_id=m[t.id],s.push(t))})})}),s},numCompletedDigitalDocuments(){return this.completedDigitalDocuments.length}},watch:{numDocumentsLoaded(){this.documentsToDisplay&&this.numDocumentsLoaded===this.documentsToDisplay.length&&this.startPrint()}},created(){this.loadForm(),window.onafterprint=()=>{this.isPrintView=!1,this.numDocumentsLoaded=0},this.context=this.$route.params.context},methods:{loadForm(){this.form=null;const e=q({child:"users",depthchart:"players",form_request:{created_by:!0,field_plan:!0,stages:!0},other_forms:!0,player:{digital_documents:"user",teams:!0},team:"players",users:!0}),m="/forms/".concat(this.$route.params.form,"?populate=").concat(e);k({showError:!1}).get(m).then(c=>{this.form=F.fillInForm(c.data),this.fetchDigitalDocumentDisplays()}).catch(()=>{this.toast.error("The form you are trying to access has been closed and is no longer available for you to complete."),this.$router.replace({name:"Dashboard"})})},cta(s){s==="Approve"?this.$refs.formApproveReject.confirmApproveForms([this.form]):s==="Reject"?this.$refs.formApproveReject.confirmRejectForms([this.form]):(s==="Undo Approval"||s==="Undo Rejection")&&this.confirmUndo(this.form)},gotoBack(){this.$router.back()},confirmUndo(s){const e=s.approved_at?"Approval":"Rejection",m="Are you sure you want to undo the ".concat(e," for ").concat(s.context_name,"?");this.$confirm.confirm({title:"Undo ".concat(e),message:m,confirmText:"Undo ".concat(e),icon:"undo",onConfirm:()=>this.undo(s)})},undo(s){const e=[s.id];return this.saving=!0,k().post("/forms/admin/undo",{ids:e}).then(()=>{this.loadForm(),this.saving=!1})},printForm(s){this.isLoadingForPrint=!0,this.isPrintView=!0,this.includeDigitalDocuments=s,s||this.startPrint()},startPrint(){setTimeout(()=>{window.print()},1500),this.isLoadingForPrint=!1},fetchDigitalDocumentDisplays(){const s=this.completedDigitalDocuments.map(e=>k().serverURL("forms/digital_documents/".concat(e.document_id,"/display")));Promise.all(s).then(e=>{const m=[];(e||[]).forEach((c,o)=>{c&&m.push({id:this.completedDigitalDocuments[o].document_id,url:c})}),this.documentsToDisplay=m})}}},Ue={key:1},Ve={class:"icon"},Ee={class:"has-text-grey-light",style:{width:"1.5em"}},Ie={class:"has-text-grey-light",style:{width:"1.5em"}},Ne={class:"ml-1"},Oe={key:2,class:"centered-tool wide-form cannot-edit-notification"},Se={class:"has-text-danger is-text-size-5 mr-6",style:{"padding-top":".2rem"}},qe={class:"custom-section"},Le={key:0},Be={key:2};function ze(s,e,m,c,o,t){const D=u("spinner"),_=u("b-loading"),C=u("FormStatus"),g=u("fa-icon"),h=u("b-button"),v=u("b-dropdown-item"),j=u("b-dropdown"),M=u("FormModalHeader"),U=u("PlayerFormHeader"),V=u("ViewFormDetails"),R=u("FormCollapsible"),E=u("DigitalDocumentPrintView"),I=u("MobileFooterCtas"),N=u("FormApproveReject");return r(),d("div",null,[t.loading?(r(),y(D,{key:0,ref:"spinner"},null,512)):(r(),d("div",Ue,[l(_,{"model-value":o.isLoadingForPrint},null,8,["model-value"]),l(M,{actions:!t.isMobile&&!o.isPrintView?t.ctas:[],title:o.form.form_request.title,"hide-button":o.isPrintView,"wide-form":!0,"custom-title":t.fromEditForm,"is-fixed-header":!o.isPrintView,onDismiss:t.gotoBack},ee({Print:n(()=>[t.numCompletedDigitalDocuments===0?(r(),d("button",{key:0,class:"button is-outlined",onClick:e[0]||(e[0]=a=>t.printForm(!1))},[i("span",Ve,[l(g,{icon:["far","print"]})]),e[17]||(e[17]=i("span",null,"Print",-1))])):(r(),y(j,{key:1,"aria-role":"list",position:"is-bottom-left"},{trigger:n(()=>[l(h,{"icon-left":s.print,class:"is-outlined"},{default:n(()=>[...e[18]||(e[18]=[i("span",null,"Print",-1)])]),_:1},8,["icon-left"])]),default:n(()=>[l(v,{"aria-role":"listitem",class:"v-align is-text-size-6 pr-5",onClick:e[1]||(e[1]=a=>t.printForm(!1))},{default:n(()=>[i("span",Ee,[l(g,{icon:["far","file"]})]),e[19]||(e[19]=i("span",{class:"ml-1"},"Form Only",-1))]),_:1}),l(v,{"aria-role":"listitem",class:"v-align is-text-size-6 pr-5",onClick:e[2]||(e[2]=a=>t.printForm(!0))},{default:n(()=>[i("span",Ie,[l(g,{icon:["far","copy"]})]),i("span",Ne,"Form and "+f(c.pluralize(t.numCompletedDigitalDocuments,"Digital Document")),1)]),_:1})]),_:1}))]),Approve:n(()=>[l(h,{disabled:o.saving,type:"is-primary",class:"is-outlined is-wide",onClick:e[3]||(e[3]=a=>t.cta("Approve"))},{default:n(()=>[...e[20]||(e[20]=[b(" Approve ",-1)])]),_:1},8,["disabled"])]),Reject:n(()=>
1[l(h,{disabled:t.invalid||o.saving,type:"is-danger",class:"is-wide",onClick:e[4]||(e[4]=a=>t.cta("Reject"))},{default:n(()=>[...e[21]||(e[21]=[b(" Reject ",-1)])]),_:1},8,["disabled"])]),[c.UNDO_APPROVAL]:n(()=>[l(h,{disabled:o.saving,type:"is-primary",class:"is-wide",onClick:e[5]||(e[5]=a=>t.cta("Undo Approval"))},{default:n(()=>[...e[22]||(e[22]=[b(" Undo Approval ",-1)])]),_:1},8,["disabled"])]),[c.UNDO_REJECTION]:n(()=>[l(h,{disabled:o.saving,type:"is-danger",class:"is-outlined is-wide",onClick:e[6]||(e[6]=a=>t.cta("Undo Rejection"))},{default:n(()=>[...e[23]||(e[23]=[b(" Undo Rejection ",-1)])]),_:1},8,["disabled"])]),_:2},[t.fromEditForm?{name:"customTitle",fn:n(()=>[l(C,{form:o.form},null,8,["form"])]),key:"0"}:void 0]),1032,["actions","title","hide-button","custom-title","is-fixed-header","onDismiss"]),i("div",{class:w({"has-fixed-header":!o.isPrintView,"has-cta-footer":t.isMobile&&t.ctas.length>0})},[t.isForPlayer?(r(),y(U,{key:0,form:o.form,"is-completed":!0,class:"form-header"},null,8,["form"])):(r(),y(V,{key:1,form:o.form,"hide-cta":o.isPrintView,"num-completed-digital-documents":t.numCompletedDigitalDocuments,class:"form-header",onPrintForm:e[7]||(e[7]=a=>t.printForm(a))},null,8,["form","hide-cta","num-completed-digital-documents"])),t.fromEditForm?(r(),d("div",Oe,[i("span",Se,[l(g,{icon:["fas","info-circle"]})]),i("span",null,f(t.notificationMessage),1)])):p("",!0),i("div",{style:te(t.isDepthChart?"max-width: 100%":""),class:"centered-tool wide-form"},[i("section",qe,[t.otherFormsToShow.length>0?(r(),d("div",Le,[(r(!0),d(P,null,T(t.otherFormsToShow,a=>(r(),d("div",{key:a.id},[l(R,{"form-in":a,readonly:!0},null,8,["form-in"])]))),128)),l(R,{"form-in":o.form,"onUpdate:formIn":e[8]||(e[8]=a=>o.form=a),open:!0,readonly:!0,onInvalid:e[9]||(e[9]=a=>o.formInvalid=a)},null,8,["form-in"])])):(r(),y(se(t.formComponent),{key:1,modelValue:o.form.values_json,"onUpdate:modelValue":e[10]||(e[10]=a=>o.form.values_json=a),form:o.form,readonly:!0,"is-print-view":o.isPrintView,"completed-date":o.form.submitted_at,"completed-by":o.form.submitted_by_name,onInvalid:e[11]||(e[11]=a=>o.formInvalid=a)},null,40,["modelValue","form","is-print-view","completed-date","completed-by"])),o.isPrintView&&o.includeDigitalDocuments?(r(),d("div",Be,[(r(!0),d(P,null,T(o.documentsToDisplay,a=>(r(),d("div",{key:a.id},[l(E,{"document-url":a.url,onLoaded:e[12]||(e[12]=He=>o.numDocumentsLoaded+=1)},null,8,["document-url"])]))),128))])):p("",!0)])],4)],2),t.isMobile?(r(),y(I,{key:0,actions:o.isPrintView?[]:t.ctas.map(a=>({name:a}))},{Approve:n(()=>[l(h,{disabled:o.saving,type:"is-primary",class:"is-outlined larger-mobile",style:{width:"100%"},"icon-left":s.check,onClick:e[13]||(e[13]=a=>t.cta("Approve"))},{default:n(()=>[...e[24]||(e[24]=[i("span",null,"Approve",-1)])]),_:1},8,["disabled","icon-left"])]),Reject:n(()=>[l(h,{disabled:t.invalid||o.saving,type:"is-danger",class:"is-outlined larger-mobile",style:{width:"100%"},"icon-left":s.ban,onClick:e[14]||(e[14]=a=>t.cta("Reject"))},{default:n(()=>[...e[25]||(e[25]=[i("span",null,"Reject",-1)])]),_:1},8,["disabled","icon-left"])]),[c.UNDO_APPROVAL]:n(()=>[l(h,{disabled:o.saving,type:"is-primary",class:"larger-mobile",style:{width:"100%"},onClick:e[15]||(e[15]=a=>t.cta("Undo Approval"))},{default:n(()=>[...e[26]||(e[26]=[b(" Undo Approval ",-1)])]),_:1},8,["disabled"])]),[c.UNDO_REJECTION]:n(()=>[l(h,{disabled:o.saving,type:"is-danger",class:"larger-mobile",style:{width:"100%"},onClick:e[16]||(e[16]=a=>t.cta("Undo Rejection"))},{default:n(()=>[...e[27]||(e[27]=[b(" Undo Rejection ",-1)])]),_:1},8,["disabled"])]),_:2},1032,["actions"])):p("",!0)])),l(N,{ref:"formApproveReject",onRefreshFormRequest:t.gotoBack},null,8,["onRefreshFormRequest"])])}const yt=x(Me,[["render",ze],["__scopeId","data-v-b8640c70"]]);export{yt as default};
2//# sourceMappingURL=ViewForm-B0i1CK6F.js.map

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.