PageSourceSearch

https://grouprev.com/build/assets/ReportsPage-DRkh-9qT.js

js grouprev.com collected 2026-09-26 00:49:23 UTC 22,189 bytes, 2 lines download raw bytes

1import{D as w}from"./dashboard-donations-chart-t4SmKT7q.js";import{_ as L,T as M,a as Y,l as S,c as l,o as i,f as r,e as h,b as C,t as d,w as f,g as b,r as x,F as g,h as m,m as D,d as R,p as T,v as V,q as K,u as q,k as F,i as I}from"./app-6TUkk-lE.js";const A={name:"ReportsPage",components:{TwDate:S,TwCard:Y,TwButton:M,DashboardDonationsChart:w},data(){return{LoadingFetchingReportFundraisers:!1,LoadingFetchingReportsData:!0,ReportsDataLoadFailed:!1,ReportingData:null,ShowFundraiserFilter:!1,SelectedReportFundraiserIds:[],ActiveRangeMacroKey:null,NextComparisonRangeId:1,ComparisonRanges:[],ReportCriteria:{date_from:null,date_to:null}}},computed:{user(){return I().user},organization(){return this.user?.organization},reportLocale(){return this.organization?.locale||this.organization?.date_locale||this.organization?.currency_locale||this.organization?.settings?.locale||this.organization?.currency_metadata?.locale||this.currencyLocale(this.organization?.currency)||this.currencyLocale(this.organization?.settings?.currency)||this.primaryReportCurrencyLocale||navigator.language},primaryReportCurrencyLocale(){const t=Object.values(this.ReportingData?.currencies||{}).find(o=>o?.locale||o?.code||o?.id);return t?t.locale||this.currencyLocale(t.code||t.id):null},reportFundraisers(){return F("dashboardReports").getItems},report(){return this.ReportingData?.report},reportCurrent(){return this.report?.current},reportComparison(){return this.reportComparisons[0]?.summary},reportComparisons(){return this.report?.comparisons||[]},rangeMacros(){const e=new Date,t=this.yearRange(e.getFullYear()),o=this.yearToDateRange(e.getFullYear(),e),u=this.monthRange(e.getFullYear(),e.getMonth()),n=this.quarterRange(e.getFullYear(),Math.floor(e.getMonth()/3)),a=this.namedRange("Last 12 months",this.addDays(e,-365),e),p=this.namedRange("Last 90 days",this.addDays(e,-90),e),y=this.namedRange("Last 30 days",this.addDays(e,-30),e),_=this.namedRange("Last 7 days",this.addDays(e,-7),e);return[{key:"current_year_vs_previous_year",group:"Years",label:"Current year vs previous year",detail:"Full calendar years",current:t,comparisons:this.previousYearRanges(e.getFullYear(),1)},{key:"current_year_vs_previous_4_years",group:"Years",label:"Current year vs previous 4 years",detail:"Full calendar years",current:t,comparisons:this.previousYearRanges(e.getFullYear(),4)},{key:"current_year_vs_previous_2_years",group:"Years",label:"Current year vs previous 2 years",detail:"Full calendar years",current:t,comparisons:this.previousYearRanges(e.getFullYear(),2)},{key:"ytd_vs_previous_4_ytds",group:"Years",label:"YTD vs previous 4 YTDs",detail:"Same day each year",current:o,comparisons:this.previousYearToDateRanges(e,4)},{key:"ytd_vs_previous_2_ytds",group:"Years",label:"YTD vs previous 2 YTDs",detail:"Same day each year",current:o,comparisons:this.previousYearToDateRanges(e,2)},{key:"last_12_months_vs_previous_4_years",group:"Rolling",label:"Last 12 months vs same period previous 4 years",detail:"Rolling annual view",current:a,comparisons:this.previousSamePeriodYearRanges(a.from,a.to,4)},{key:"last_90_days_vs_previous_3_years",group:"Rolling",label:"Last 90 days vs same period previous 3 years",detail:"Seasonal comparison",current:p,comparisons:this.previousSamePeriodYearRanges(p.from,p.to,3)},{key:"current_month_vs_previous_month",group:"Months",label:"Current month vs previous month",detail:"Month over month",current:u,comparisons:this.previousMonthRanges(e,1)},{key:"current_month_vs_previous_5_months",group:"Months",label:"Current month vs previous 5 months",detail:"Recent monthly trend",current:u,comparisons:this.previousMonthRanges(e,5)},{key:"current_quarter_vs_previous_quarter",group:"Quarters",label:"Current quarter vs previous quarter",detail:"Quarter over quarter",current:n,comparisons:this.previousQuarterRanges(n.from,1)},{key:"current_quarter_vs_previous_4_quarters",group:"Quarters",label:"Current quarter vs previous 4 quarters",detail:"Last four quarters",current:n,comparisons:this.previousQuarterRanges(n.from,4)},{key:"last_30_vs_previous_3_periods",group:"Rolling",label:"Last 30 days vs previous 3 periods",detail
1:"Sequential 30-day blocks",current:y,comparisons:this.previousSequentialDayRanges(e,30,3)},{key:"last_7_vs_previous_4_weeks",group:"Rolling",label:"Last 7 days vs previous 4 weeks",detail:"Weekly pulse",current:_,comparisons:this.previousSequentialDayRanges(e,7,4)}]},macroGroups(){return["Years","Quarters","Months","Rolling"].map(e=>({key:e.toLowerCase(),label:e,macros:this.rangeMacros.filter(t=>t.group===e)})).filter(e=>e.macros.length>0)},reportRangesValid(){return this.ReportCriteria.date_from&&this.ReportCriteria.date_to&&this.ComparisonRanges.length>0&&this.ComparisonRanges.every(e=>e.date_from&&e.date_to)},selectedReportFundraisersLabel(){return this.SelectedReportFundraiserIds.length===0?"All fundraisers":`${this.SelectedReportFundraiserIds.length} selected`},metricRows(){return this.reportCurrent?[{label:"Donation Amount",type:"currency",valueKey:"donations_amount",currencyKey:"donations_amount_by_currency"},{label:"Total Donations",type:"number",valueKey:"total_donations"},{label:"Average Donation",type:"currency",valueKey:"average_donation",currencyKey:"average_donation_by_currency"},{label:"Highest Donation",type:"currency",valueKey:"highest_donation",currencyKey:"highest_donation_by_currency"}]:[]},chartComparisonSeries(){return this.reportComparisons.map(e=>({label:this.formatReportDateLabel(e.timeframe_label),data:e.donations_chart}))},formattedReportTimeframeLabel(){return this.formatReportDateLabel(this.report?.timeframe_label)},formattedSelectedDateRange(){return this.formatDateRange(this.ReportCriteria.date_from,this.ReportCriteria.date_to)}},mounted(){this.applyRangeMacro(this.rangeMacros[0]),this.fetchReportsData()},methods:{async showFundraiserFilter(){this.ShowFundraiserFilter=!0,this.reportFundraisers.length===0&&await this.fetchReportFundraisers()},async fetchReportFundraisers(){try{this.LoadingFetchingReportFundraisers=!0,await F("dashboardReports").fetchItems({clear:!0,not_paginated:!0,order_by:"title",order_direction:"asc"})}catch(e){console.error(e)}finally{this.LoadingFetchingReportFundraisers=!1}}
1,reportRequestParams(){return{date_from:this.ReportCriteria.date_from,date_to:this.ReportCriteria.date_to,comparison_ranges:this.ComparisonRanges.map((e,t)=>({date_from:e.date_from,date_to:e.date_to,label:e.label||`Comparison Range ${t+1}`})),...this.SelectedReportFundraiserIds.length>0&&{fundraiser_ids:this.SelectedReportFundraiserIds}}},async fetchReportsData(){if(this.reportRangesValid)try{this.ReportsDataLoadFailed=!1,this.LoadingFetchingReportsData=!0,this.ReportingData=await q().fetchDashboardReport(this.user.id,this.reportRequestParams())}catch(e){console.error(e),this.ReportsDataLoadFailed=!0,e.response?.data?.message&&this.$notify(e.response.data.message,"danger")}finally{this.LoadingFetchingReportsData=!1}},clearReportFundraisers(){this.SelectedReportFundraiserIds=[],this.ShowFundraiserFilter=!1},applyRangeMacro(e){this.ActiveRangeMacroKey=e.key,this.ReportCriteria.date_from=this.dateInputValue(e.current.from),this.ReportCriteria.date_to=this.dateInputValue(e.current.to);const t=e.comparisons||(e.comparison?[e.comparison]:[]);this.ComparisonRanges=t.map(o=>({id:this.NextComparisonRangeId++,date_from:this.dateInputValue(o.from),date_to:this.dateInputValue(o.to),label:o.label||null}))},addComparisonRange(){this.ActiveRangeMacroKey=null,this.ComparisonRanges.push({id:this.NextComparisonRangeId++,date_from:null,date_to:null,label:null})},removeComparisonRange(e){this.ActiveRangeMacroKey=null,this.ComparisonRanges=this.ComparisonRanges.filter(t=>t.id!==e)},macroComparisonCount(e){return e.comparisons?.length||(e.comparison?1:0)},currencyLocale(e){return e?K(e):null},addDays(e,t){const o=new Date(e);return o.setDate(o.getDate()+t),o},namedRange(e,t,o){return{label:e,from:t,to:o}},yearRange(e){return this.namedRange(String(e),new Date(e,0,1),new Date(e,11,31))},previousYearRanges(e,t){return Array.from({length:t},(o,u)=>this.yearRange(e-u-1))},yearToDateRange(e,t){return this.namedRange(`${e} YTD`,new Date(e,0,1),this.clampedDate(e,t.getMonth(),t.getDate()))},previousYearToDateRanges(e,t){return Array.from({length:t},(o,u)=>this.yearToDateRange(e.getFullYear()-u-1,e))},monthRange(e,t){const o=new Date(e,t,1),u=new Date(e,t+1,0);return this.namedRange(this.formatMonthRangeLabel(o),o,u)},previousMonthRanges(e,t){return Array.from({length:t},(o,u)=>this.monthRange(e.getFullYear(),e.getMonth()-u-1))},quarterRange(e,t){const o=new Date(e,t*3,1),u=new Date(e,t*3+3,0);return this.namedRange(this.formatQuarterRangeLabel(o),o,u)},previousQuarterRanges(e,t){return Array.from({length:t},(o,u)=>{const n=new Date(e.getFullYear(),e.getMonth()-(u+1)*3,1),a=new Date(n.getFullYear(),n.getMonth()+3,0);return this.namedRange(this.formatQuarterRangeLabel(n),n,a)})},previousSequentialDayRanges(e,t,o){return Array.from({length:o},(u,n)=>{const a=this.addDays(e,-(n*t+1)),p=this.addDays(a,-t);return this.namedRange(`Previous period ${n+1}`,p,a)})},previousSamePeriodYearRanges(e,t,o){return Array.from({length:o},(u,n)=>{const a=n+1,p=this.clampedDate(e.getFullYear()-a,e.getMonth(),e.getDate()),y=this.clampedDate(t.getFullYear()-a,t.getMonth(),t.getDate());return this.namedRange(`${p.getFullYear()} same period`,p,y)})},clampedDate(e,t,o){const u=new Date(e,t,o);return u.getMonth()!==t?new Date(e,t+1,0):u},formatMonthRangeLabel(e){return new Intl.DateTimeFormat(this.reportLocale,{month:"short",year:"numeric"}).format(e)},formatQuarterRangeLabel(e){return`Q${Math.floor(e.getMonth()/3)+1} ${e.getFullYear()}`},dateInputValue(e){return new Date(e.getTime()-e.getTimezoneOffset()*6e4).toISOString().slice(0,10)},formatRegionalDate(e){return this.$filters.formatDateOnlyRegional(e,this.reportLocale)},formatDateRange(e,t){return!e||!t?null:`${this.formatRegionalDate(e)} - ${this.formatRegionalDate(t)}`},formatComparisonDateRange(e){return this.formatDateRange(e.date_from,e.date_to)},formatReportDateLabel(e){return e?e.replace(/\d{4}-\d{2}-\d{2}/g,t=>this.formatRegionalDate(t)):null},formatMetric(e,t){const o=t?.[e.valueKey],u=t?.[e.currencyKey];return e.type==="currency"?this.formatCurrencyValue(o,u):this.$filters.formatNumber(o)},formatCurrencyValue(e,t){const o=Object.keys(t||{});return o.length>0?o.map(u=>this.$filters.formatCurrency(t[u],u)).join(" | "):this.$filters.formatCurrency(e)},percentageDifference(e,t){return t==null||Number(t)===0||e===null||e===void 0?null:(Number(e)-Number(t))/Number(t)*100},percentageDifferenceClasses(e){return e===null?"text-gray-500":e>0?"text-green-600":"text-red-600"}}},z={class:"flex flex-col gap-2 sm:flex-row sm:items-end sm:justify-between"},N={class:"text-sm text-gray-500 mt-1"},j={class:"flex flex-col gap-2 lg:flex-row lg:items-start lg:justify-between"},Q={class:"inline-flex w-fit items-center rounded-full bg-gray-100 px-3 py-1 text-xs font-medium text-gray-600"},U={class:"mt-5 grid grid-cols-1 gap-4 2xl:grid-cols-4"},P={class:"px-1 text-xs font-semibold uppercase text-gray-500"},O={class:"mt-3 grid grid-cols-1 gap-2 sm:grid-cols-2 2xl:grid-cols-1"},B=["onClick"],G={class:"min-w-0"},E={class:"block text-sm font-medium leading-5 text-gray-900"},H={class:"mt-1 block text-xs leading-4 text-gray-500"},W={class:"grid grid-cols-1 xl:grid-cols-3 gap-6 mt-6"},J={class:"xl:col-span-1"},X={class:"rounded-lg border border-gray-200 p-4"},Z={class:"flex items-center justify-between gap-3"},$={class:"text-sm text-gray-500 mt-1"},ee={key:1,class:"rounded-md border border-gray-200 max-h-72 overflow-y-auto divide-y divide-gray-100 mt-4"},te={key:0,class:"p-4 space-y-3"},re=["for"],ae=["id","value"],se={class:"text-sm text-gray-900"},oe={key:2,class:"p-4 text-sm text-gray-500"},ne={class:"grid grid-cols-1 gap-6 xl:col-span-2"},ie={class:"rounded-lg border border-gray-200 p-4"},le={class:"grid grid-cols-1 sm:grid-cols-2 gap-4 mt-4"},de={key:0,class:"mt-3 rounded-md bg-green-50 px-3 py-2 text-sm font-medium text-green-800"},ue={class:"rounded-lg border border-gray-200 p-4"},ce={class:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between"},ge={class:"mt-4 grid grid-cols-1 gap-3 lg:grid-cols-2"},me={class:"mb-3 flex items-start justify-between gap-3"},pe={class:"min-w-0"},he={class:"flex items-center gap-2"},ye={class:"inline-flex size-6 shrink-0 items-center justify-center rounded-full bg-white text-xs font-semibold text-gray-700 ring-1 ring-gray-200"},_e={class:"truncate text-sm font-semibold text-gray-900"},fe=["onClick"],ve={class:"grid grid-cols-1 gap-3 sm:grid-cols-2"},Re={key:0,class:"mt-3 text-xs font-medium text-gray-600"},be={key:1,class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6 mt-6"},xe={class:"grid grid-cols-1 lg:grid-cols-4 gap-6 mt-6"},Ce={class:"text-sm text-gray-500"},De={class:"mt-3 text-2xl font-semibold text-gray-900"},Fe={class:"mt-2 text-sm text-gray-500"},ke={class:"flex flex-col gap-1 sm:flex-row sm:items-center sm:justify-between"},we={class:"text-sm text-gray-500"},Le={class:"mt-6 h-[27rem]"},Me={class:"mt-5 overflow-x-auto"},Ye={class:"min-w-full divide-y divide-gray-200 text-sm"},Se={class:"text-left text-xs font-medium text-gray-500"},Te={class:"py-3 pr-6"},Ve={class:"divide-y divide-gray-100"},Ke={class:"py-4 pr-6 font-medium text-gray-900"},qe={class:"py-4 pr-6 text-gray-700"},Ie={key:0},Ae={key:1};function ze(e,t,o,u,n,a){const p=x("tw-button"),y=x("tw-date"),_=x("tw-card"),k=x("dashboard-donations-chart");return i(),l("div",null,[r("div",z,[r("div",null,[t[5]||(t[5]=r("h2",null," Reports ",-1)),r("p",N,d(a.selectedReportFundraisersLabel),1)]),h(p,{size:"lg",variant:"amber",loading:n.LoadingFetchingReportsData,disabled:!a.reportRangesValid,onClick:a.fetchReportsData},{default:f(()=>[...t[6]||(t[6]=[b(" Run Report ",-1)])]),_:1},8,["loading","disabled","onClick"])]),h(_,{class:"bg-white mt-6"},{default:f(()=>[r("div",j,[t[7]||(t[7]=r("div",null,[r("div",{class:"text-sm font-semibold text-gray-900"}," Quick date ranges ")],-1)),r("div",Q,d(n.ComparisonRanges.length)+" comparison "+d(n.ComparisonRanges.length===1?"range":"ranges"),1)]),r("div",U,[(i(!0),l(g,null,m(a.macroGroups,s=>(i(),l("div",{key:"report-range-macro-group-"+s.key,class:"rounded-lg border border-gray-200 bg-gray-50/70 p-3"},[r("div",P,d(s.label),1),r("div",O,[(i(!0),l(g,null,m(s.macros,c=>(i(),l("button",{key:"report-range-macro-"+c.key,type:"button",class:D(["group flex min-h-[4.5rem] w-full items-start justify-between gap-3 rounded-md border px-3 py-2.5 text-left transition",n.ActiveRangeMacroKey===c.key?"border-green-500 bg-white shadow-sm ring-1 ring-green-500/20":"border-gray-200 bg-white hover:border-green-300 hover:bg-green-50/40"]),onClick:v=>a.applyRangeMacro(c)},[r("span",G,[r("span",E,d(c.label),1),r("span",H,d(c.detail),1)]),r("span",{class:D(["shrink-0 rounded-full px-2 py-0.5 text-xs font-medium",n.ActiveRangeMacroKey===c.key?"bg-green-100 text-green-700":"bg-gray-100 text-gray-600 group-hover:bg-white"])},d(a.macroComparisonCount(c)),3)],10,B))),128))])]))),128))]),r("div",W,[r("div",J,[r("div",X,[r("div",Z,[r("div",null,[t[8]||(t[8]=r("div",{class:"text-sm font-semibold text-gray-900"}
1," Fundraisers ",-1)),r("div",$,d(a.selectedReportFundraisersLabel),1)]),n.ShowFundraiserFilter||n.SelectedReportFundraiserIds.length>0?(i(),l("button",{key:0,type:"button",class:"text-sm font-medium text-blue-600 hover:underline",onClick:t[0]||(t[0]=(...s)=>a.clearReportFundraisers&&a.clearReportFundraisers(...s))}," Use all ")):R("",!0)]),!n.ShowFundraiserFilter&&n.SelectedReportFundraiserIds.length===0?(i(),C(p,{key:0,class:"mt-4",size:"sm",variant:"outline",onClick:a.showFundraiserFilter},{default:f(()=>[...t[9]||(t[9]=[b(" Filter by specific fundraiser ",-1)])]),_:1},8,["onClick"])):(i(),l("div",ee,[n.LoadingFetchingReportFundraisers?(i(),l("div",te,[(i(),l(g,null,m(5,s=>r("div",{key:"report-fundraiser-selector-skeleton-"+s,class:"animate-pulse flex items-center gap-3"},[...t[10]||(t[10]=[r("div",{class:"size-5 rounded bg-gray-200"},null,-1),r("div",{class:"h-4 w-40 rounded bg-gray-200"},null,-1)])])),64))])):(i(!0),l(g,{key:1},m(a.reportFundraisers,s=>(i(),l("label",{key:"report-fundraiser-"+s.id,for:"report-fundraiser-"+s.id,class:"flex cursor-pointer items-start gap-3 p-3 hover:bg-gray-50"},[T(r("input",{id:"report-fundraiser-"+s.id,"onUpdate:modelValue":t[1]||(t[1]=c=>n.SelectedReportFundraiserIds=c),type:"checkbox",value:s.id,class:"mt-0.5 size-5 rounded border-gray-300 text-green-600 focus:ring-0"},null,8,ae),[[V,n.SelectedReportFundraiserIds]]),r("span",se,d(s.title),1)],8,re))),128)),!n.LoadingFetchingReportFundraisers&&a.reportFundraisers.length===0?(i(),l("div",oe," No fundraisers available. ")):R("",!0)]))])]),r("div",ne,[r("div",ie,[t[11]||(t[11]=r("div",{class:"flex flex-col gap-1 sm:flex-row sm:items-start sm:justify-between"},[r("div",null,[r("div",{class:"text-sm font-semibold text-gray-900"}," Selected Range ")]),r("span",{class:"w-fit rounded-full bg-green-50 px-2.5 py-1 text-xs font-medium text-green-700"}," Current ")],-1)),r("div",le,[h(y,{id:"report-date-from",modelValue:n.ReportCriteria.date_from,"onUpdate:modelValue":t[2]||(t[2]=s=>n.ReportCriteria.date_from=s),label:"From",required:""},null,8,["modelValue"]),h(y,{id:"report-date-to",modelValue:n.ReportCriteria.date_to,"onUpdate:modelValue":t[3]||(t[3]=s=>n.ReportCriteria.date_to=s),label:"To",required:""},null,8,["modelValue"])]),a.formattedSelectedDateRange?(i(),l("div",de,d(a.formattedSelectedDateRange),1)):R("",!0)]),r("div",ue,[r("div",ce,[t[13]||(t[13]=r("div",null,[r("div",{class:"text-sm font-semibold text-gray-900"}," Comparison Ranges ")],-1)),r("button",{type:"button",class:"inline-flex w-fit items-center gap-2 rounded-md border border-gray-300 bg-white px-3 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50",onClick:t[4]||(t[4]=(...s)=>a.addComparisonRange&&a.addComparisonRange(...s))},[...t[12]||(t[12]=[r("i",{class:"pi pi-plus text-xs"},null,-1),b(" Add Range ",-1)])])]),r("div",ge,[(i(!0),l(g,null,m(n.ComparisonRanges,(s,c)=>(i(),l("div",{key:"comparison-range-"+s.id,class:"rounded-md border border-gray-200 bg-gray-50 p-3"},[r("div",me,[r("div",pe,[r("div",he,[r("span",ye,d(c+1),1),r("div",_e,d(s.label||`Range ${c+1}`),1)])]),n.ComparisonRanges.length>1?(i(),l("button",{key:0,type:"button",class:"rounded-md p-1.5 text-gray-400 hover:bg-white hover:text-red-600","aria-label":"Remove comparison range",onClick:v=>a.removeComparisonRange(s.id)},[...t[14]||(t[14]=[r("i",{class:"pi pi-times text-xs"},null,-1)])],8,fe)):R("",!0)]),r("div",ve,[h(y,{id:"report-comparison-date-from-"+s.id,modelValue:s.date_from,"onUpdate:modelValue":v=>s.date_from=v,label:"From",required:""},null,8,["id","modelValue","onUpdate:modelValue"]),h(y,{id:"report-comparison-date-to-"+s.id,modelValue:s.date_to,"onUpdate:modelValue":v=>s.date_to=v,label:"To",required:""},null,8,["id","modelValue","onUpdate:modelValue"])]),a.formatComparisonDateRange(s)?(i(),l("div",Re,d(a.formatComparisonDateRange(s)),1)):R("",!0)]))),128))])])])])]),_:1}),n.ReportsDataLoadFailed?(i(),C(_,{key:0,class:"mt-6 bg-red-50 text-red-700"},{default:f(()=>[...t[15]||(t[15]=[b(" Unable to load report data. ",-1)])]),_:1})):n.LoadingFetchingReportsData||!a.report?(i(),l("div",be,[(i(),l(g,null,m(4,s=>h(_,{key:"reports-summary-skeleton-"+s,class:"bg-white"},{default:f(()=>[...t[16]||(t[16]=[r("div",{class:"animate-pulse"},[r("div",{class:"h-4 w-24 rounded bg-gray-200 mb-4"}),r("div",{class:"h-7 w-28 rounded bg-gray-200"}),r("div",{class:"h-3 w-20 rounded bg-gray-100 mt-3"})],-1)])]),_:1})),64))])):(i(),l(g,{key:2},[r("div",xe,[(i(!0),l(g,null,m(a.metricRows,s=>(i(),C(_,{key:"report-metric-"+s.label,class:"bg-white"},{default:f(()=>[r("div",Ce,d(s.label),1),r("div",De,d(a.formatMetric(s,a.reportCurrent)),1),r("div",Fe,d(a.reportComparisons.length)+" comparison "+d(a.reportComparisons.length===1?"range":"ranges"),1)]),_:2},1024))),128))]),h(_,{class:"bg-white mt-6"},{default:f(()=>[r("div",ke,[t[17]||(t[17]=r("h4",null," Donations Over Time ",-1)),r("div",we,d(a.formattedReportTimeframeLabel)+" vs "+d(a.reportComparisons.length)+" comparison "+d(a.reportComparisons.length===1?"range":"ranges"),1)]),r("div",Le,[h(k,{"report-data":a.report.donations_chart,"report-data-comparisons":a.chartComparisonSeries,criteria:{timeframe_string:a.report.chart_group_by==="monthly"?"year_to_date":"custom"},"date-locale":a.reportLocale},null,8,["report-data","report-data-comparisons","criteria","date-locale"])])]),_:1}),h(_,{class:"bg-white mt-6"},{default:f(()=>[t[19]||(t[19]=r("h4",null," Comparison ",-1)),r("div",Me,[r("table",Ye,[r("thead",null,[r("tr",Se,[t[18]||(t[18]=r("th",{class:"py-3 pr-6"}
1," Metric ",-1)),r("th",Te,d(a.formattedReportTimeframeLabel),1),(i(!0),l(g,null,m(a.reportComparisons,s=>(i(),l("th",{key:"report-comparison-header-"+s.timeframe_label,class:"py-3 pr-6"},d(a.formatReportDateLabel(s.timeframe_label)),1))),128)),(i(!0),l(g,null,m(a.reportComparisons,s=>(i(),l("th",{key:"report-change-header-"+s.timeframe_label,class:"py-3 pr-6"}," Change "))),128))])]),r("tbody",Ve,[(i(!0),l(g,null,m(a.metricRows,s=>(i(),l("tr",{key:"report-comparison-row-"+s.label},[r("td",Ke,d(s.label),1),r("td",qe,d(a.formatMetric(s,a.reportCurrent)),1),(i(!0),l(g,null,m(a.reportComparisons,c=>(i(),l("td",{key:"report-comparison-value-"+c.timeframe_label+"-"+s.label,class:"py-4 pr-6 text-gray-700"},d(a.formatMetric(s,c.summary)),1))),128)),(i(!0),l(g,null,m(a.reportComparisons,c=>(i(),l("td",{key:"report-comparison-change-"+c.timeframe_label+"-"+s.label,class:D(["py-4 pr-6",a.percentageDifferenceClasses(a.percentageDifference(a.reportCurrent[s.valueKey],c.summary[s.valueKey]))])},[a.percentageDifference(a.reportCurrent[s.valueKey],c.summary[s.valueKey])!==null?(i(),l("span",Ie,d(a.percentageDifference(a.reportCurrent[s.valueKey],c.summary[s.valueKey])>0?"+":"")+d(e.$filters.formatPercentageRounded(a.percentageDifference(a.reportCurrent[s.valueKey],c.summary[s.valueKey]))),1)):(i(),l("span",Ae,"No comparison"))],2))),128))]))),128))])])])]),_:1})],64))])}const Qe=L(A,[["render",ze]]);export{Qe as default};
2//# sourceMappingURL=ReportsPage-DRkh-9qT.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.