PageSourceSearch

https://equipagesolidaire.fr/_nuxt/DI-hWyxm.js

js equipagesolidaire.fr collected 2026-10-04 12:34:09 UTC 8,958 bytes, 1 lines download raw bytes

1import{D as a,E as f,Kt as g,On as r,_ as e,b as n,bt as b,g as N,k as M,mt as l,nr as i,o as w,qt as d,y as v}from"./DJsGfdon.js";import{n as U}from"./BPDX6Ger.js";import{a as $}from"./cJd6e4C6.js";import{t as y}from"./Bh5REn69.js";import{t as B}from"./DXdVgrJb.js";import{t as L}from"./C9WxONJa.js";import{_ as P,t as z}from"./BGe74o_12.js";import{t as O}from"./Df6PFzGg.js";import{t as F}from"./C_hbRtw3.js";import{t as H}from"./Bstvga7R.js";import{t as G}from"./Y7Qq3Qq-.js";import{t as J}from"./C-tZILqt2.js";import{n as K,t as Q}from"./aF9yiybw.js";(function(){try{var _=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new _.Error().stack;o&&(_._sentryDebugIds=_._sentryDebugIds||{},_._sentryDebugIds[o]="77c797c8-f84d-4dbe-a055-23e5c543fffc",_._sentryDebugIdIdentifier="sentry-dbid-77c797c8-f84d-4dbe-a055-23e5c543fffc")}catch{}})();var W={class:"h-full overflow-hidden"},X={class:"flex-1 overflow-y-auto p-4"},Y={class:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-6"},Z={class:"flex items-center justify-between"},ee={class:"text-2xl font-bold text-gray-900"},te={class:"w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center"},se={class:"flex items-center justify-between"},ae={class:"text-2xl font-bold text-gray-900"},re={class:"w-12 h-12 bg-red-100 rounded-lg flex items-center justify-center"},oe={class:"flex items-center justify-between"},ie={class:"text-2xl font-bold text-gray-900"},ne={class:"w-12 h-12 bg-purple-100 rounded-lg flex items-center justify-center"},le={class:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-6"},de={class:"flex items-center justify-between p-4 bg-green-50 rounded-lg"},ce={class:"text-2xl font-bold text-gray-900"},ue={class:"w-12 h-12 bg-green-100 rounded-lg flex items-center justify-center"},me={class:"flex items-center justify-between p-4 bg-blue-50 rounded-lg"},fe={class:"text-2xl font-bold text-gray-900"},_e={class:"w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center"},xe={class:"flex items-center justify-between p-4 bg-purple-50 rounded-lg"},pe={class:"text-2xl font-bold text-gray-900"},ge={class:"w-12 h-12 bg-purple-100 rounded-lg flex items-center justify-center"},ve={key:0},ye={class:"space-y-3"},he={class:"flex items-start justify-between"},be={class:"flex-1"},we={class:"font-medium text-gray-900"},De={class:"text-sm text-gray-600"},je={key:0,class:"ml-2 font-medium text-blue-600"},ke={class:"text-xs text-gray-500 mt-1"},qe={class:"text-right"},Re={class:"text-xs text-gray-500"},Ie={class:"flex items-center justify-between"},Ee={key:0,class:"flex justify-center py-8"},Te={key:1,class:"text-center py-8 text-gray-500"},Ae={key:2,class:"space-y-4"},Ve={class:"flex-1"},Ce={class:"flex items-center space-x-3"},Se={class:"flex-1"},Ne={class:"font-medium text-gray-900"},Me={class:"text-sm text-gray-600"},Ue={key:0,class:"ml-2 font-medium text-red-600"},$e={class:"flex items-center justify-between"},Be={key:0,class:"flex justify-center py-8"},Le={key:1,class:"text-center py-8 text-gray-500"},Pe={key:2,class:"space-y-4"},ze={class:"flex items-center space-x-3"},Oe={class:"w-10 h-10 bg-purple-100 rounded-lg flex items-center justify-center"},Fe={class:"font-medium text-gray-900"},He={class:"text-sm text-gray-600"},Ge={key:0,class:"ml-2 font-medium text-red-600"},Je=M({__name:"merchant",async setup(_){let o,c;G({layout:"back-office",middleware:[L(["DONATOR_MERCHANT"])]});const R=B(),{data:I}=$(R),{t:h}=U(),{data:u,pending:Ke}=([o,c]=g(()=>y("/api/donator/analytics")),o=await o,c(),o),{data:D,pending:E}=([o,c]=g(()=>y("/api/donator/requests",{query:{page:1,limit:5}})),o=await o,c(),o),{data:j,pending:T}=([o,c]=g(()=>y("/api/donator/fiscal-receipts",{query:{page:1,limit:3}})),o=await o,c(),o),{data:k}=([o,c]=g(()=>y("/api/donator/impacts/recent")),o=await o,c(),o),q=new Date().getHours(),A=N(()=>q<12?h("frontend.dashboard.home.goodMorning"):q<18?h("frontend.dashboard.home.goodAfternoon"):h("frontend.dashboard.home.goodEvening"));return(Qe,t)=>{const p=z,V=J,m=P,x=H,C=O,S=F;return l(),n("div",W,[a(S,{grow:""},{default:d(()=>[a(V,{title:`${r(A)}, ${r(I)?.firstName} !`},{right:d(()=>[a(p,{to:"/dashboard/donator/requests/create",icon:"i-heroicons-plus",size:"sm",color:"error",variant:"solid",label:"Créer une demande",trailing:!1})]),_:1},8,["title"]),e("div",X,[e("div",Y,[a(x,null,{default:d(()=>[e("div",Z,[e("div",null,[t[0]||(t[0]=e("p",{class:"text-sm font-medium text-gray-600"},"Total des demandes",-1)),e("p",ee,i(r(u)?.statistics?.totalRequests||0),1)]),e("div",te,[a(m,{name:"i-heroicons-gift",class:"text-blue-600 text-xl"})])])]),_:1}),a(x,null,{default:d(()=>[e("div",se,[e("div",null,[t[1]||(t[1]=e("p",{class:"text-sm font-medium text-gray-600"},"Valeur moyenne",-1)),e("p",ae,i(Math.round(r(u)?.statistics?.averageValue||0))+"€ ",1)]),e("div",re,[a(m,{name:"i-heroicons-currency-euro",class:"text-red-600 text-xl"})])])]),_:1}),a(x,null,{default:d(()=>[e("div",oe,[e("div",null,[t[2]||(t[2]=e("p",{class:"text-sm font-medium text-gray-600"},"Reçus fiscaux",-1)),e("p",ie,i(r(u)?.statistics?.fiscalReceiptsGenerated||0),1)]),e("div",ne,[a(m,{name:"i-heroicons-document-text",class:"text-purple-600 text-xl"})])])]),_:1})]),a(x,{class:"mb-6"},{header:d(()=>[...t[3]||(t[3]=[e("h2",{class:"text-lg font-semibold text-gray-900"},"Mon impact",-1)])]),default:d(()=>[e("div",le,[e("div",de,[e("div",null,[t[4]||(t[4]=e("p",{class:"text-sm font-medium text-gray-600"},"Valeur totale",-1)),e("p",ce,i(r(u)?.statistics?.totalValue||0)+"€ ",1)]),e("div",ue,[a(m,{name:"i-heroicons-heart",class:"text-green-600 text-xl"})])]),e("div",me,[e("div",null,[t[5]||(t[5]=e("p",{class:"text-sm font-medium text-gray-600"},"Impacts créés",-1)),e("p",fe,i(r(u)?.statistics?.totalImpacts||0),1)]),e("div",_e,[a(m,{name:"i-heroicons-sparkles",class:"text-blue-600 text-xl"})])]),e("div",xe,[e("div",null,[t[6]||(t[6]=e("p",{class:"text-sm font-medium text-gray-600"},"Taux de réussite",-1)),e("p",pe,i(Math.round((r(u)?.statistics?.totalRequests>0?(r(u)?.statistics?.totalRequests-(r(u)?.statusBreakdown?.REJECTED||0))/r(u)?.statistics?.totalRequests:0)*100))+"% ",1)]),e("div",ge,[a(m,{name:"i-heroicons-chart-bar",class:"text-purple-600 text-xl"})])])]),r(k)?.impacts?.length>0?(l(),n("div",ve,[t[7]||(t[7]=e("h3",{class:"text-md font-semibold text-gray-900 mb-4"},"Derniers impacts",-1)),e("div",ye,[(l(!0),n(w,null,b(r(k).impacts,s=>(l(),n("div",{key:s.id,class:"p-4 bg-gray-50 rounded-lg"},[e("div",he,[e("div",be,[e("p",we,i(s.description),1),e("p",De,[f(i(new Date(s.impactDate).toLocaleDateString())+" ",1),s.quantity?(l(),n("span",je,i(s.quantity)+" "+i(s.unit),1)):v("",!0)]),e("p",ke," Demande: "+i(s.requestDescription),1)]),e("div",qe,[e("div",Re,i(new Date(s.createdAt).toLocaleDateString()),1)])])]))),128))])])):v("",!0)]),_:1}),a(x,{class:"mb-6"},{header:d(()=>[e("div",Ie,[t[9]||(t[9]=e("h2",{class:"text-lg font-semibold text-gray-900"},"Mes demandes récentes",-1)),a(p,{to:"/dashboard/donator/requests",color:"error",variant:"soft",size:"sm"},{default:d(()=>[...t[8]||(t[8]=[f(" Voir toutes ",-1)])]),_:1})])]),default:d(()=>[r(E)?(l(),n("div",Ee,[a(m,{name:"i-heroicons-arrow-path",class:"animate-spin text-2xl text-gray-400"})])):r(D)?.requests?.length===0?(l(),n("div",Te," Aucune demande pour le moment ")):(l(),n("div",Ae,[(l(!0),n(w,null,b(r(D)?.requests,s=>(l(),n("div",{key:s.id,class:"flex items-center justify-between p-4 bg-gray-50 rounded-lg"},[e("div",Ve,[e("div",Ce,[e("div",Se,[e("p",Ne,i(s.description),1),e("p",Me,[f(i(new Date(s.createdAt).toLocaleDateString())+" ",1),s.valueInEuros?(l(),n("span",Ue,i(s.valueInEuros)+"€ ",1)):v("",!0)])]),a(C,{color:r(Q)[s.status],variant:"soft"},{default:d(()=>[f(i(r(K)(s.status)),1)]),_:2},1032,["color"])])])]))),128))]))]),_:1}),a(x,null,{header:d(()=>[e("div",$e,[t[11]||(t[11]=e("h2",{class:"text-lg font-semibold text-gray-900"},"Reçus fiscaux récents",-1)),a(p,{to:"/dashboard/donator/fiscal-receipts",color:"error",variant:"soft",size:"sm"},{default:d(()=>[...t[10]||(t[10]=[f(" Voir tous ",-1)])]),_:1})])]),default:d(()=>[r(T)?(l(),n("div",Be,[a(m,{name:"i-heroicons-arrow-path",class:"animate-spin text-2xl text-gray-400"})])):r(j)?.receipts?.length===0?(l(),n("div",Le," Aucun reçu fiscal pour le moment ")):(l(),n("div",Pe,[(l(!0),n(w,null,b(r(j)?.receipts,s=>(l(),n("div",{key:s.id,class:"flex items-center justify-between p-4 bg-gray-50 rounded-lg"},[e("div",ze,[e("div",Oe,[a(m,{name:"i-heroicons-document-text",class:"text-purple-600"})]),e("div",null,[e("p",Fe," Reçu fiscal - "+i(s.request?.description),1),e("p",He,[f(i(new Date(s.createdAt).toLocaleDateString())+" ",1),s.request?.valueInEuros?(l(),n("span",Ge,i(s.request.valueInEuros)+"€ ",1)):v("",!0)])])]),a(p,{to:"/dashboard/donator/fiscal-receipts",color:"primary",variant:"soft",size:"sm"},{default:d(()=>[...t[12]||(t[12]=[f(" Télécharger ",-1)])]),_:1})]))),128))]))]),_:1})])]),_:1})])}}}),dt=Je;export{dt as default};

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.