1import{d as O,u as P,c as S,D as m,M as n,e as T,A,f as H,g as N}from"./index-CkbxFzmV.js";import{_ as F}from"./AdvancedScoutReportForm.vue_vue_type_script_setup_true_lang-K4IU4W4f.js";import{g as L}from"./getReportScheme-DaLwgPqf.js";import{_ as j}from"./PageWrapper.vue_vue_type_style_index_0_lang-C-agqOPr.js";import{_ as q}from"./SecondPageWrapper.vue_vue_type_style_index_0_lang-BNDqmb3T.js";import{u as U}from"./reports-JIhFpz68.js";import{d as z,ac as K,o as G,E as u,f as g,j as d,H as a,c as _,A as e,k,F as J,a5 as p,a6 as w,aK as Q,b as W,ad as X,q as Y,l as Z,r as v,R as C}from"./vendor-vuetify-DaY1MzuL.js";import{b as R}from"./route-block-BIO7NrfO.js";import"./vendor-sentry-CdlvO8A5.js";import"./fetcher-BYH-xuyS.js";import"./LastMatchCard.vue_vue_type_script_setup_true_lang-DqN54l8O.js";try{let l=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new l.Error().stack;r&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[r]="e98e5441-9304-4856-8381-d6fad45d9f90",l._sentryDebugIdIdentifier="sentry-dbid-e98e5441-93
104-4856-8381-d6fad45d9f90")}catch{}const ee={key:1},oe={key:0,class:"d-flex justify-center assignment-form-wrapper"},te=z({__name:"[reportId]",setup(l){const{mdAndUp:r}=K(),y=v(!1),{confirm:B}=N(),V=O(),b=P(),$=U(),E=C(()=>V.params.reportId),o=v(null),I=C(()=>o.value?L(o.value.type):null),s=v(!1);async function h(){if(!o.value)return;await B("Are you sure you want to delete the report?")&&A.players.reports.delete(m.MATCHES,o.value.id).then(()=>{b.push({name:"Admin Matches Reports"})}).catch()}const c=v(!1);async function M(){if(!o.value)return;c.value=!0;const i=o.value;A.players.reports.download(m.MATCHES,o.value.id).then(t=>{H.downloadBlob(t,`${i.targetInfo.baseInfo.teams.home.name??""}_vs_${i.targetInfo.baseInfo.teams.away.name??""}_${i.type}_report`)}).finally(()=>c.value=!1)}function D(){if(!o.value)return;const i=b.resolve({name:"Pdf reports / Matches / scout report",params:{matchId:o.value.targetInfo.id,reportId:o.value.id},query:{design:o.value.targetClub}});window.open(i.href,"_blank")}const x=C(()=>[{key:"delete",title:"Delete report",icon:n.delete,color:"error",onClick:h},{key:"download",title:"Download",icon:n.download,disabled:c.value,loading:c.value,onClick:()=>M()},{key:"open",title:"Open pdf",icon:n.filePdfBox,onClick:()=>D()}]);return G(async()=>{S().appLoading=!0,o.value=await $.getReportById(m.MATCHES,E.value),S().appLoading=!1}),(i,t)=>(u(),g(j,null,{default:d(()=>[a(q,null,{header:d(()=>[...t[4]||(t[4]=[Z("h2",{class:"tx-subtitle-1 mr-auto"},"Match report",-1)])]),actions:d(()=>[e(r)?(u(),_(J,{key:0},[a(p,{variant:"outlined",density:"comfortable",rounded:"",color:"error",icon:e(n).delete,onClick:h},null,8,["icon"]),a(p,{variant:"outlined",density:"comfortable",rounded:"",color:"primary",icon:e(n).download,loading:c.value,onClick:M},null,8,["icon","loading"]),a(p,{variant:"outlined",density:"comfortable",rounded:"",color:"primary",icon:e(n).filePdfBox,onClick:D},null,8,["icon"])],64)):(u(),g(p,{key:1,color:"primary",variant:"outlined",class:"icon-btn",disabled:s.value,onClick:t[0]||(t[0]=f=>y.value=!0)},{default:d(()=>[a(w,{icon:e(n).dotsVertical},null,8,["icon"])]),_:1},8,["disabled"])),a(Q,{vertical:"",class:"my-1"}),a(p,{color:"primary",class:W({"icon-btn":!e(r)}),onClick:t[1]||(t[1]=f=>s.value=!s.value)},X({default:d(()=>[e(r)?k("",!0):(u(),g(w,{key:0,icon:s.value?e(n).pencilOffOutline:e(n).pencil},null,8,["icon"])),e(r)?(u(),_("span",ee,Y(s.value?"Finish":"Edit"),1)):k("",!0)]),_:2},[e(r)?{name:"prepend",fn:d(()=>[a(w,{icon:s.value?e(n).pencilOffOutline:e(n).pencil},null,8,["icon"])]),key:"0"}:void 0]),1032,["class"])]),default:d(()=>[o.value&&I.value?(u(),_("div",oe,[a(F,{section:e(m).MATCHES,report:o.value,"edit-mode":s.value,fields:I.value,onReportSubmitted:t[2]||(t[2]=f=>e(b).push({name:"Admin Matches Reports"}))},null,8,["section","report","edit-mode","fields"])])):k("",!0)]),_:1}),a(T,{modelValue:y.value,"onUpdate:modelValue":t[3]||(t[3]=f=>y.value=f),actions:x.value,"close-on-action":""},null,8,["modelValue","actions"])]),_:1}))}});typeof R=="function"&&R(te);export{te as default}; 2//# sourceMappingURL=_reportId_-CQyyCgvx.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.