1import{T as m,a as R,R as w}from"./recent-donations-table-CfiILtFv.js";import{_ as x,T as C,ac as T,a as I,c as k,b as l,o as c,f as t,e as n,d as _,r as s,w as p,g as B,k as y}from"./app-6TUkk-lE.js";import{O as V}from"./offline-donation-modal-CL7bkt31.js";import{D as F}from"./dashboard-donations-chart-t4SmKT7q.js";import"./donation-details-modal-u5EPBac5.js";import"./fundraiser-page-selector-D_J75dav.js";const P={name:"FundraiserDashboardPage",components:{TwCard:I,DashboardDonationsChart:F,TwLoadingSpinner:T,OfflineDonationModal:V,TwButton:C,RecentDonationsTable:w,TwDashboardRightReportBox:R,TwDashboardReportBox:m},props:{fundraiserId:{type:Number,required:!0}},data(){return{LoadingFetchingReportingData:!1,ReportingData:{lifetime_donations:1500,past_12_months:0,past_12_months_previous:0,past_30_days:0,past_30_days_previous:0,past_7_days:0,past_7_days_previous:0,past_24_hours:0,past_24_hours_previous:0,total_page_views:14210,unique_visitors:14210,total_donations:14210,average_donation:14210,highest_donation:14210}}},computed:{fundraiser(){return y().getItemById(this.fundraiserId)},fundraiserCurrency(){return this.ReportingData?.currency_metadata?.code||this.ReportingData?.currency||this.fundraiser?.currency_metadata?.code||this.fundraiser?.currency||this.fundraiser?.settings?.currency||"USD"}},mounted(){this.fundraiser||y().fetchItemById(this.fundraiserId),this.fetchReportingData()},methods:{async fetchReportingData(){try{this.ValidationErrorMessage=null,this.LoadingFetchingReportingData=!0,this.ReportingData=await y().fetchDashboardReport(this.fundraiserId),this.LoadingFetchingReportingData=!1}catch(o){throw console.error(o),this.LoadingFetchingReportingData=!1,o.response&&(this.ValidationErrorMessage=o.response.data),o}}}},L={key:0},M={class:"grid grid-cols-1 sm:grid-cols-3 lg:grid-cols-5 gap-6"},N={class:"grid grid-cols-1 md:grid-cols-8 gap-6"},q={class:"col-span-6"},E={class:"flex flex-col h-[27rem]"},O={class:"col-span-6 md:col-span-2 md:border-l-gray-200 md:border-s md:-mr-6 md:-my-6"},S={class:"w-full flex flex-col divide-y-2 divide-gray-100"},A={class:"flex gap-5 justify-between mb-5"};function H(o,a,v,U,e,r){const i=s("tw-dashboard-report-box"),g=s("dashboard-donations-chart"),u=s("tw-dashboard-right-report-box"),d=s("tw-card"),h=s("tw-button"),f=s("recent-donations-table"),D=s("offline-donation-modal"),b=s("tw-loading-spinner");return r.fundraiser?(c(),k("div",L,[t("div",M,[n(i,{title:"Lifetime Donations",value:e.ReportingData.lifetime_donations,"previous-value":e.ReportingData.lifetime_donations_previous,"values-by-currency":e.ReportingData.lifetime_donations_by_currency,currencies:e.ReportingData.currencies,currency:r.fundraiserCurrency},null,8,["value","previous-value","values-by-currency","currencies","currency"]),n(i,{title:"Past 12 Months",value:e.ReportingData.past_12_months,"previous-value":e.ReportingData.past_12_months_previous,"values-by-currency":e.ReportingData.past_12_months_by_currency,"previous-values-by-currency":e.ReportingData.past_12_months_previous_by_currency,currencies:e.ReportingData.currencies,currency:r.fundraiserCurrency},null,8,["value","previous-value","values-by-currency","previous-values-by-currency","currencies","currency"]),n(i,{title:"Past 30 Days",value:e.ReportingData.past_30_days,"previous-value":e.ReportingData.past_30_days_previous,"values-by-currency":e.ReportingData.past_30_days_by_currency,"previous-values-by-currency":e.ReportingData.past_30_days_previous_by_currency,currencies:e.ReportingData.currencies,currency:r.fundraiserCurrency},null,8,["value","previous-value","values-by-currency","previous-values-by-currency","currencies","currency"]),n(i,{title:"Past 7 Days",value:e.ReportingData.past_7_days,"previous-value":e.ReportingData.past_7_days_previous,"values-by-currency":e.ReportingData.past_7_days_by_currency,"previous-values-by-currency":e.ReportingData.past_7_days_previous_by_currency,currencies:e.ReportingData.currencies,currency:r.fundraiserCurrency},null,8,["value","previous-value","values-by-currency","previous-values-by-currency","currencies","currency"]),n(i,{title:"Past 24 Hours",value:e.ReportingData.past_24_hours,"previous-value":e.ReportingData.past_24_hours_previous,"values-by-currency":e.ReportingData.past_24_hours_by_currency,"previous-values-by-currency":e.ReportingData.past_24_hours_previous_by_currency,currencies:e.ReportingData.currencies,currency:r.fundraiserCurrency},null,8,["value","previous-value","values-by-currency","previous-values-by-currency","currencies","currency"])]),n(d,{class:"mt-6 bg-white"},{default:p(()=>[t("div",N,[t("div",q,[a[1]||(a[1]=t("h4",{class:"mb-8"}," Donations Over Time ",-1)),t("div",E,[e.ReportingData&&(e.ReportingData.donations_chart_by_currency||e.ReportingData.donations_chart)?(c(),l(g,{key:0,"report-data":e.ReportingData.donations_chart,"report-data-by-currency":e.ReportingData.donations_chart_by_currency,currencies:e.ReportingData.currencies},null,8,["report-data","report-data-by-currency","currencies"])):_("",!0)])]),t("div",O,[t("div",S,[n(u,{title:"Total Page Views",value:e.ReportingData.total_page_views},null,8,["value"]),n(u,{title:"Unique Visitors",value:e.ReportingData.unique_visitors},null,8,["value"]),n(u,{title:"Total Donations",value:e.ReportingData.total_donations},null,8,["value"]),n(u,{title:"Average Donation","value-type":"currency",value:e.ReportingData.average_donation,"values-by-currency":e.ReportingData.average_donation_by_currency,currencies:e.ReportingData.currencies,currency:r.fundraiserCurrency},null,8,["value","values-by-currency","currencies","currency"]),n(u,{title:"Highest Donation","value-type":"currency",value:e.ReportingData.highest_donation,"values-by-currency":e.ReportingData.highest_donation_by_currency,currencies:e.ReportingData.currencies,currency:r.fundraiserCurrency},null,8,["value","values-by-currency","currencies","currency"])])])])]),_:1}),n(d,{class:"bg-white mt-6"},{default:p(()=>[t("div",A,[a[3]||(a[3]=t("h4",null," Recent Donations ",-1)),n(h,{size:"sm",to:{name:"Fun
1draiserDonationsPage",params:{fundraiserId:v.fundraiserId}},variant:"secondary"},{default:p(()=>[...a[2]||(a[2]=[B(" View All ",-1)])]),_:1},8,["to"])]),r.fundraiser?(c(),l(f,{key:0,class:"mt-8",fundraiser:r.fundraiser},null,8,["fundraiser"])):_("",!0)]),_:1}),r.fundraiser?(c(),l(D,{key:0,ref:"offlineDonationModal",fundraiser:r.fundraiser,onCreated:a[0]||(a[0]=j=>r.fetchReportingData())},null,8,["fundraiser"])):_("",!0)])):(c(),l(b,{key:1}))}const X=x(P,[["render",H]]);export{X as default}; 2//# sourceMappingURL=FundraiserDashboardPage-BLU8QTNr.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.