T.ME/BIBIL_0DAY
CasperSecurity


Server : Apache/2
System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64
User : gositeme ( 1004)
PHP Version : 8.2.29
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Directory :  /home/gositeme/domains/lavocat.quebec/public_html/_next/static/chunks/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/gositeme/domains/lavocat.quebec/public_html/_next/static/chunks/6746-297ce48c2a6a40ea.js
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6746],{6746:(e,s,t)=>{t.d(s,{A:()=>u});var l=t(37876),n=t(14232),a=t(89099);t(498);var d=t(20710),r=t(86739),i=t(59116),c=t(42341),m=t(43846),x=t(47137),o=t(65104);let u=e=>{var s,t,u,h,v,p,g,j,N,y,b,f;let{userId:w,userRole:A,compact:P=!1}=e,k=(0,a.useRouter)(),[S,C]=(0,n.useState)(null),[I,M]=(0,n.useState)(!0);(0,n.useEffect)(()=>{V()},[w]);let V=async()=>{try{M(!0);let e=await fetch("/api/user/financial-summary");if(e.ok){let s=await e.json();C({totalSpent:s.totalSpent||0,thisMonthSpent:s.thisMonthSpent||0,pendingPayments:s.pendingPayments||0,overdueInvoices:s.overdueInvoices||0,recentPayments:[]})}}catch(e){console.error("Error fetching payment summary:",e)}finally{M(!1)}},E=function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"CAD";return new Intl.NumberFormat("en-CA",{style:"currency",currency:s}).format(e)};return I?(0,l.jsx)("div",{className:"bg-white rounded-lg shadow p-4",children:(0,l.jsxs)("div",{className:"animate-pulse",children:[(0,l.jsx)("div",{className:"h-4 bg-gray-200 rounded w-1/3 mb-2"}),(0,l.jsx)("div",{className:"h-8 bg-gray-200 rounded w-1/2 mb-4"}),(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)("div",{className:"h-3 bg-gray-200 rounded"}),(0,l.jsx)("div",{className:"h-3 bg-gray-200 rounded w-2/3"})]})]})}):P?(0,l.jsxs)("div",{className:"bg-white rounded-lg shadow p-4",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,l.jsxs)("h3",{className:"text-lg font-semibold text-gray-900 flex items-center",children:[(0,l.jsx)(i.A,{className:"h-5 w-5 text-green-600 mr-2"}),"Payments"]}),(0,l.jsx)("button",{onClick:()=>k.push("/user/payments"),className:"text-sm text-blue-600 hover:text-blue-800",children:"View All"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,l.jsxs)("div",{className:"text-center",children:[(0,l.jsx)("div",{className:"text-2xl font-bold text-gray-900",children:E((null==S?void 0:S.totalSpent)||0)}),(0,l.jsx)("div",{className:"text-xs text-gray-500",children:"Total Spent"})]}),(0,l.jsxs)("div",{className:"text-center",children:[(0,l.jsx)("div",{className:"text-2xl font-bold text-gray-900",children:E((null==S?void 0:S.thisMonthSpent)||0)}),(0,l.jsx)("div",{className:"text-xs text-gray-500",children:"This Month"})]})]}),(0,l.jsxs)("div",{className:"space-y-2",children:[(null!=(s=null==S?void 0:S.pendingPayments)?s:0)>0&&(0,l.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,l.jsx)("span",{className:"text-yellow-600",children:"Pending Payments"}),(0,l.jsx)("span",{className:"font-medium",children:null!=(t=null==S?void 0:S.pendingPayments)?t:0})]}),(null!=(u=null==S?void 0:S.overdueInvoices)?u:0)>0&&(0,l.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,l.jsx)("span",{className:"text-red-600",children:"Overdue Invoices"}),(0,l.jsx)("span",{className:"font-medium",children:null!=(h=null==S?void 0:S.overdueInvoices)?h:0})]})]}),(0,l.jsxs)("div",{className:"mt-4 flex space-x-2",children:[(0,l.jsxs)("button",{onClick:()=>k.push("/user/payments"),className:"flex-1 bg-blue-600 text-white text-sm py-2 px-3 rounded-md hover:bg-blue-700 transition-colors",children:[(0,l.jsx)(c.A,{className:"h-4 w-4 mr-1"}),"View Payments"]}),(0,l.jsxs)("button",{onClick:()=>k.push("/user/subscription"),className:"flex-1 bg-green-600 text-white text-sm py-2 px-3 rounded-md hover:bg-green-700 transition-colors",children:[(0,l.jsx)(m.A,{className:"h-4 w-4 mr-1"}),"Subscription"]})]})]}):(0,l.jsx)("div",{className:"bg-white rounded-lg shadow",children:(0,l.jsxs)("div",{className:"p-6",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,l.jsxs)("h3",{className:"text-xl font-semibold text-gray-900 flex items-center",children:[(0,l.jsx)(i.A,{className:"h-6 w-6 text-green-600 mr-2"}),"Payment Overview"]}),(0,l.jsx)("button",{onClick:()=>k.push("/user/payments"),className:"text-sm text-blue-600 hover:text-blue-800 font-medium",children:"View All Payments →"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4 mb-6",children:[(0,l.jsx)("div",{className:"bg-gradient-to-r from-green-50 to-green-100 rounded-lg p-4",children:(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(i.A,{className:"h-8 w-8 text-green-600"}),(0,l.jsxs)("div",{className:"ml-3",children:[(0,l.jsx)("p",{className:"text-sm font-medium text-green-800",children:"Total Spent"}),(0,l.jsx)("p",{className:"text-2xl font-bold text-green-900",children:E((null==S?void 0:S.totalSpent)||0)})]})]})}),(0,l.jsx)("div",{className:"bg-gradient-to-r from-blue-50 to-blue-100 rounded-lg p-4",children:(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(x.A,{className:"h-8 w-8 text-blue-600"}),(0,l.jsxs)("div",{className:"ml-3",children:[(0,l.jsx)("p",{className:"text-sm font-medium text-blue-800",children:"This Month"}),(0,l.jsx)("p",{className:"text-2xl font-bold text-blue-900",children:E((null==S?void 0:S.thisMonthSpent)||0)})]})]})}),(0,l.jsx)("div",{className:"bg-gradient-to-r from-yellow-50 to-yellow-100 rounded-lg p-4",children:(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(d.A,{className:"h-8 w-8 text-yellow-600"}),(0,l.jsxs)("div",{className:"ml-3",children:[(0,l.jsx)("p",{className:"text-sm font-medium text-yellow-800",children:"Pending"}),(0,l.jsx)("p",{className:"text-2xl font-bold text-yellow-900",children:(null==S?void 0:S.pendingPayments)||0})]})]})}),(0,l.jsx)("div",{className:"bg-gradient-to-r from-red-50 to-red-100 rounded-lg p-4",children:(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(r.A,{className:"h-8 w-8 text-red-600"}),(0,l.jsxs)("div",{className:"ml-3",children:[(0,l.jsx)("p",{className:"text-sm font-medium text-red-800",children:"Overdue"}),(0,l.jsx)("p",{className:"text-2xl font-bold text-red-900",children:(null==S?void 0:S.overdueInvoices)||0})]})]})})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-6",children:[(0,l.jsxs)("button",{onClick:()=>k.push("/user/payments"),className:"flex items-center p-4 bg-gray-50 rounded-lg hover:bg-gray-100 transition-colors",children:[(0,l.jsx)(c.A,{className:"h-6 w-6 text-blue-600 mr-3"}),(0,l.jsxs)("div",{className:"text-left",children:[(0,l.jsx)("p",{className:"font-medium text-gray-900",children:"View Payments"}),(0,l.jsx)("p",{className:"text-sm text-gray-500",children:"See all transactions"})]})]}),(0,l.jsxs)("button",{onClick:()=>k.push("/user/subscription"),className:"flex items-center p-4 bg-gray-50 rounded-lg hover:bg-gray-100 transition-colors",children:[(0,l.jsx)(m.A,{className:"h-6 w-6 text-green-600 mr-3"}),(0,l.jsxs)("div",{className:"text-left",children:[(0,l.jsx)("p",{className:"font-medium text-gray-900",children:"Subscription"}),(0,l.jsx)("p",{className:"text-sm text-gray-500",children:"Manage your plan"})]})]}),(0,l.jsxs)("button",{onClick:()=>k.push("/user/payments?tab=methods"),className:"flex items-center p-4 bg-gray-50 rounded-lg hover:bg-gray-100 transition-colors",children:[(0,l.jsx)(o.A,{className:"h-6 w-6 text-purple-600 mr-3"}),(0,l.jsxs)("div",{className:"text-left",children:[(0,l.jsx)("p",{className:"font-medium text-gray-900",children:"Payment Methods"}),(0,l.jsx)("p",{className:"text-sm text-gray-500",children:"Add or update cards"})]})]})]}),((null!=(v=null==S?void 0:S.pendingPayments)?v:0)>0||(null!=(p=null==S?void 0:S.overdueInvoices)?p:0)>0)&&(0,l.jsxs)("div",{className:"space-y-3",children:[(null!=(g=null==S?void 0:S.pendingPayments)?g:0)>0&&(0,l.jsxs)("div",{className:"flex items-center p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:[(0,l.jsx)(d.A,{className:"h-5 w-5 text-yellow-600 mr-3"}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsxs)("p",{className:"text-sm font-medium text-yellow-800",children:[null!=(j=null==S?void 0:S.pendingPayments)?j:0," pending payment",(null!=(N=null==S?void 0:S.pendingPayments)?N:0)>1?"s":""]}),(0,l.jsx)("p",{className:"text-xs text-yellow-600",children:"Review and complete pending transactions"})]}),(0,l.jsx)("button",{onClick:()=>k.push("/user/payments?status=pending"),className:"text-sm text-yellow-800 hover:text-yellow-900 font-medium",children:"View"})]}),(null!=(y=null==S?void 0:S.overdueInvoices)?y:0)>0&&(0,l.jsxs)("div",{className:"flex items-center p-3 bg-red-50 border border-red-200 rounded-lg",children:[(0,l.jsx)(r.A,{className:"h-5 w-5 text-red-600 mr-3"}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsxs)("p",{className:"text-sm font-medium text-red-800",children:[null!=(b=null==S?void 0:S.overdueInvoices)?b:0," overdue invoice",(null!=(f=null==S?void 0:S.overdueInvoices)?f:0)>1?"s":""]}),(0,l.jsx)("p",{className:"text-xs text-red-600",children:"Please review and settle overdue amounts"})]}),(0,l.jsx)("button",{onClick:()=>k.push("/user/payments?status=overdue"),className:"text-sm text-red-800 hover:text-red-900 font-medium",children:"View"})]})]})]})})}},47137:(e,s,t)=>{t.d(s,{A:()=>l});let l=(0,t(11713).A)("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]])}}]);

CasperSecurity Mini