PageSourceSearch

https://app.backstagebaton.com/app/assets/MusicUsageReportPage-3xlCRFCF.js

js backstagebaton.com collected 2026-10-07 08:49:25 UTC 6,448 bytes, 1 lines download raw bytes

1import{v,c as F,r as c,j as e,B as i,t as S,l as A}from"./index-_aijvlUq.js";import{s as R,d as B}from"./exportCsv-CZAUSrIW.js";import{P as M}from"./PageHeader-DCofr6qo.js";import{I as w}from"./Input-ysTyZFq5.js";import{E as D}from"./EmptyState-CPGKooqj.js";const N={getReport(a){return v.get("/reports/music-usage",{params:a})},exportFile(a,r){return v.get("/reports/music-usage/export",{params:{...r,format:a}})}},E={missing_composer_and_arranger:"No composer or arranger on file",missing_venue:"No venue on the performance",missing_venue_location:"Venue is missing city/state",composer_multiple_people:"Multiple composers — check the split",arranger_multiple_people:"Multiple arrangers — check the split",composer_single_token:"One-word composer — check first/last",arranger_single_token:"One-word arranger — check first/last"};function C(){return A()}function $(){const a=new Date,r=a.getFullYear();return a.getMonth()===0?{start:`${r-1}-01-01`,end:`${r-1}-12-31`}:{start:`${r}-01-01`,end:C()}}function V(){const{showError:a}=F(),r=$(),[d,m]=c.useState(r.start),[p,x]=c.useState(r.end),[n,k]=c.useState(null),[L,g]=c.useState(!1),[h,u]=c.useState(null);async function y(t=d,o=p){g(!0);try{k(await N.getReport({start:t,end:o}))}catch{a(S("music usage report"))}finally{g(!1)}}function f(t){const o=new Date().getFullYear(),l=t==="lastYear"?{start:`${o-1}-01-01`,end:`${o-1}-12-31`}:{start:`${o}-01-01`,end:C()};m(l.start),x(l.end),y(l.start,l.end)}async function b(t){u(t);try{R(await N.exportFile(t,{start:d,end:p}))}catch{a("Failed to export the report")}finally{u(null)}}function _(){B(`music-usage_${d}_${p}.csv`,["Title","Composer First","Composer Last","Arranger First","Arranger Last","Performance Group","Date (MM/DD/YY)","Concert Venue","City","State"],s.map(t=>[t.title,t.composerFirst,t.composerLast,t.arrangerFirst,t.arrangerLast,t.group,t.date,t.venue,t.city,t.state]))}const s=n?.rows||[],j=s.filter(t=>t.flags.length);return e.jsxs("div",{className:"px-4 md:px-0",children:[e.jsx(M,{title:"Music Usage Report",subtitle:"ASCAP & BMI blanket-license performance list — every piece performed in the date range, one row per performance. ACB bands send it to [email protected] by January 31.",breadcrumbs:[{label:"Reports",to:"/reports"},{label:"Music Usage Report"}],actions:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(i,{variant:"primary",size:"md",onClick:()=>b("xlsx"),disabled:!n||s.length===0,isLoading:h==="xlsx",children:"Download ACB form"}),e.jsx(i,{variant:"secondary",size:"md",onClick:()=>b("xls"),disabled:!n||s.length===0,isLoading:h==="xls",children:"Legacy .xls"}),e.jsx(i,{variant:"secondary",size:"md",onClick:_,disabled:!n||s.length===0,children:"CSV"})]})}),e.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-4 mb-4 flex flex-wrap items-end gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-semibold text-gray-500 uppercase tracking-wide mb-1",htmlFor:"mu-start",children:"From"}),e.jsx(w,{id:"mu-start",type:"date",value:d,onChange:t=>m(t.target.value)})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-semibold text-gray-500 uppercase tracking-wide mb-1",htmlFor:"mu-end",children:"To"}),e.jsx(w,{id:"mu-end",type:"date",value:p,onChange:t=>x(t.target.value)})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(i,{type:"button",variant:"ghost",size:"sm",onClick:()=>f("lastYear"),children:"Last calendar year"}),e.jsx(i,{type:"button",variant:"ghost",size:"sm",onClick:()=>f("thisYear"),children:"This year"})]}),e.jsx(i,{variant:"primary",size:"md",onClick:()=>y(),isLoading:L,children:"Run report"})]}),n&&j.length>0&&e.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-lg text-sm text-amber-800 p-3 mb-4",children:[j.length," of ",s.length," rows need review before filing — look for the amber notes below. Missing composers are fixed in the Music Library (the CSV round-trip is the fast way to backfill in bulk)."]}),n&&s.length===0&&e.jsx(D,{title:"No performed music in this range.",description:"The report lists setlist pieces on performances that already happened — cancelled and deleted performances are excluded."}),s.length>0&&e.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 overflow-x-auto",children:[e.jsxs("table",{className:"min-w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"text-left text-xs font-semibold text-gray-500 uppercase tracking-wide border-b border-gray-200",children:[e.jsx("th",{className:"px-4 py-3",children:"Title"}),e.jsx("th",{className:"px-4 py-3",children:"Composer"}),e.jsx("th",{className:"px-4 py-3",children:"Arranger"}),e.jsx("th",{className:"px-4 py-3",children:"Date"}),e.jsx("th",{className:"px-4 py-3",children:"Venue"}),e.jsx("th",{className:"px-4 py-3",children:"City"}),e.jsx("th",{className:"px-4 py-3",children:"State"})]})}),e.jsx("tbody",{children:s.map((t,o)=>e.jsxs("tr",{className:`border-b border-gray-100 last:border-0 ${t.flags.length?"bg-amber-50/50":""}`,children:[e.jsxs("td",{className:"px-4 py-2 font-medium text-gray-900",children:[t.title,t.flags.length>0&&e.jsx("span",{className:"block text-xs text-amber-700 font-normal mt-0.5",children:t.flags.map(l
1=>E[l]||l).join(" · ")})]}),e.jsx("td",{className:"px-4 py-2 text-gray-700",children:[t.composerFirst,t.composerLast].filter(Boolean).join(" ")}),e.jsx("td",{className:"px-4 py-2 text-gray-700",children:[t.arrangerFirst,t.arrangerLast].filter(Boolean).join(" ")}),e.jsx("td",{className:"px-4 py-2 text-gray-700 whitespace-nowrap",children:t.date}),e.jsx("td",{className:"px-4 py-2 text-gray-700",children:t.venue}),e.jsx("td",{className:"px-4 py-2 text-gray-700",children:t.city}),e.jsx("td",{className:"px-4 py-2 text-gray-700",children:t.state})]},o))})]}),e.jsxs("div",{className:"px-4 py-3 text-xs text-gray-400",children:[e.jsxs("p",{children:[s.length," rows · Performance group on every row: ",n.orgName]}),e.jsxs("p",{className:"mt-1",children:[e.jsx("span",{className:"font-medium text-gray-500",children:"Download ACB form"})," gives you ACB’s layout exactly — same headings, shaded header band, column widths and date format — ready to email to [email protected]. The ",e.jsx("span",{className:"font-medium text-gray-500",children:"Legacy .xls"})," copy holds the same rows in the older Excel format, without the shading."]})]})]})]})}export{V as MusicUsageReportPage};

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.