Your IP : 216.73.217.77


Current Path : /home/users/unlimited/www/whatsapp-crm/public/build/assets/
Upload File :
Current File : /home/users/unlimited/www/whatsapp-crm/public/build/assets/Dashboard-af332d0f.js

import v from"./App-ad5f7ecb.js";import{m as f,h as y,f as n,p as b,o as i,a as e,t,e as a,k as p,u as l,l as d,c as r,F as k,d as C,K as j}from"./app-43851608.js";import"./Sidebar-7bb6d772.js";import"./Menu-4221d61f.js";import"./ProfileModal-628e5b7c.js";import"./FormInput-4a309017.js";import"./LangToggle-8d05b0dc.js";import"./MobileSidebar-b73cd192.js";import"./index-99011d5f.js";/* empty css              */const $={class:"bg-white md:bg-inherit p-4 md:p-8 rounded-[5px] text-[#000] h-full overflow-y-auto"},B={class:"flex justify-between mt-3 md:mt-0"},M={class:"md:block hidden text-xl mb-1"},N={class:"mb-6 flex items-center leading-6"},V={class:"mt-1 font-semibold md:font-normal text-xl"},z={class:"md:flex space-x-2 md:space-x-2 mt-4 md:mt-0 mb-8 text-xl md:text-sm hidden"},L={class:"grid grid-cols-2 md:grid-cols-4 gap-x-4 gap-y-2 md:space-y-0"},O={class:"bg-slate-100 md:bg-white col-span-2 md:col-span-1 rounded-lg p-3"},T={class:"flex justify-between items-center"},R={class:"text-slate-600"},Z={class:"text-xl text-gray-600"},A=e("div",{class:"flex"},[e("span",{class:"bg-secondary/10 p-3 rounded-full self-start"},[e("svg",{class:"text-secondary",xmlns:"http://www.w3.org/2000/svg",width:"36",height:"36",viewBox:"0 0 24 24"},[e("g",{fill:"none",stroke:"currentColor","stroke-width":"1.5"},[e("path",{d:"M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Z"}),e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m7 14l2.293-2.293a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 0 1.414 0L17 10m0 0v2.5m0-2.5h-2.5"})])])])],-1),D={class:"text-sm space-x-1 md:block hidden"},F=e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[e("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m8 16l8-8m0 0h-6m6 0v6"})],-1),S={class:"bg-slate-100 md:bg-white col-span-1 rounded-lg p-3"},H={class:"flex justify-between items-center"},U={class:"text-slate-600"},E={class:"text-xl text-gray-600"},I=e("div",{class:"flex"},[e("span",{class:"bg-secondary/10 p-3 rounded-full self-start"},[e("svg",{class:"text-secondary",xmlns:"http://www.w3.org/2000/svg",width:"36",height:"36",viewBox:"0 0 24 24"},[e("g",{fill:"none",stroke:"currentColor","stroke-width":"1.5"},[e("path",{d:"M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Z"}),e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m7 14l2.293-2.293a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 0 1.414 0L17 10m0 0v2.5m0-2.5h-2.5"})])])])],-1),K={class:"text-sm space-x-1 md:block hidden"},W=e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[e("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m8 16l8-8m0 0h-6m6 0v6"})],-1),Y={class:"bg-slate-100 md:bg-white rounded-lg p-3"},q={class:"flex justify-between items-center"},G={class:"text-slate-600"},J={class:"text-xl text-gray-600"},P=e("div",{class:"flex"},[e("span",{class:"bg-secondary/10 p-3 rounded-full self-start"},[e("svg",{class:"text-secondary",xmlns:"http://www.w3.org/2000/svg",width:"36",height:"36",viewBox:"0 0 24 24"},[e("g",{fill:"none",stroke:"currentColor","stroke-width":"1.5"},[e("path",{d:"M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Z"}),e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m7 14l2.293-2.293a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 0 1.414 0L17 10m0 0v2.5m0-2.5h-2.5"})])])])],-1),Q={class:"text-sm space-x-1 md:block hidden"},X=e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[e("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m8 16l8-8m0 0h-6m6 0v6"})],-1),ee={class:"bg-slate-100 col-span-2 md:col-span-1 md:bg-white rounded-lg p-3"},te={class:"flex justify-between items-center"},se={class:"text-slate-600"},oe={class:"text-xl text-gray-600"},ne=e("div",{class:"flex"},[e("span",{class:"bg-secondary/10 p-3 rounded-full self-start"},[e("svg",{class:"text-secondary",xmlns:"http://www.w3.org/2000/svg",width:"36",height:"36",viewBox:"0 0 24 24"},[e("g",{fill:"none",stroke:"currentColor","stroke-width":"1.5"},[e("path",{d:"M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Z"}),e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m7 14l2.293-2.293a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 0 1.414 0L17 10m0 0v2.5m0-2.5h-2.5"})])])])],-1),ae={class:"md:grid md:grid-cols-2 gap-x-4 mt-8"},le={id:"chart",class:"md:block hidden"},de={class:"bg-white rounded-lg py-4 md:px-4 h-[fit-content]"},ie={class:"text-sm"},re={key:0,class:"md:p-5 border-2 border-dashed mt-4"},ce={class:"text-sm text-center"},he={key:1,class:"space-y-1"},pe={class:"capitalize"},me={class:"self-end"},ue={class:"bg-[#ffe5b4] p-1 rounded-md text-xs px-2 capitalize"},ge=e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[e("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m8 16l8-8m0 0h-6m6 0v6"})],-1),Be={__name:"Dashboard",props:{title:{type:String},payments:{type:Object},totalRevenue:{type:String},userCount:{type:Number},openTickets:{type:Number},totalMessages:{type:Number},period:{type:Object},newUsers:{type:Object},revenue:{type:Object}},setup(m){const u=f(()=>j().props.auth.user),o=m,g={chart:{height:350,type:"area",toolbar:{show:!1},zoom:{enabled:!1}},colors:["#418207"],fill:{type:"gradient",gradient:{shadeIntensity:1,opacityFrom:.7,opacityTo:.9,stops:[0,90,100]}},dataLabels:{enabled:!1},stroke:{width:1,curve:"smooth"},xaxis:{type:"datetime",categories:o.period},tooltip:{x:{format:"dd/MM/yy HH:mm"}}},_=[{name:"New Customers",data:o.newUsers},{name:"Revenue",data:o.revenue}];return(s,_e)=>{const x=b("apexchart");return i(),y(v,null,{default:n(()=>{var c;return[e("div",$,[e("div",B,[e("div",null,[e("h2",M,t(s.$t("Dashboard")),1),e("p",N,[e("span",V,t(s.$t("Welcome back"))+", "+t((c=u.value)==null?void 0:c.first_name)+" 👋",1)])])]),e("div",z,[a(l(d),{href:"/admin/organizations/create",class:"bg-primary py-2 px-3 rounded-lg text-white text-center"},{default:n(()=>[p(t(s.$t("Add organization")),1)]),_:1}),a(l(d),{href:"/admin/users/create",class:"bg-primary py-2 px-3 rounded-lg text-white text-center"},{default:n(()=>[p(t(s.$t("Add user")),1)]),_:1})]),e("div",L,[e("div",O,[e("div",T,[e("div",null,[e("h2",R,t(s.$t("Total revenue")),1),e("h1",Z,t(o.totalRevenue),1)]),A]),e("div",D,[a(l(d),{href:"/admin/payment-logs",class:"flex items-center space-x-1 underline"},{default:n(()=>[e("span",null,t(s.$t("View all")),1),F]),_:1})])]),e("div",S,[e("div",H,[e("div",null,[e("h2",U,t(s.$t("Active users")),1),e("h1",E,t(o.userCount),1)]),I]),e("div",K,[a(l(d),{href:"/admin/users",class:"flex items-center space-x-1 underline"},{default:n(()=>[e("span",null,t(s.$t("View all")),1),W]),_:1})])]),e("div",Y,[e("div",q,[e("div",null,[e("h2",G,t(s.$t("Open tickets")),1),e("h1",J,t(o.openTickets),1)]),P]),e("div",Q,[a(l(d),{href:"/admin/support",class:"flex items-center space-x-1 underline"},{default:n(()=>[e("span",null,t(s.$t("View all")),1),X]),_:1})])]),e("div",ee,[e("div",te,[e("div",null,[e("h2",se,t(s.$t("Total messages")),1),e("h1",oe,t(o.totalMessages),1)]),ne])])]),e("div",ae,[e("div",null,[e("div",le,[a(x,{type:"area",height:"350",options:g,series:_})])]),e("div",de,[e("h1",null,t(s.$t("Recent transactions")),1),e("p",ie,t(s.$t("Below are your most recent transactions")),1),o.payments.length===0?(i(),r("div",re,[e("p",ce,t(s.$t("You do not have any transactions")),1)])):(i(),r("div",he,[(i(!0),r(k,null,C(o.payments.data,(h,w)=>(i(),r("div",{key:w,class:"mt-4 border-l-4 bg-gray-50 flex justify-between p-2 text-sm"},[e("div",pe,t(h.organization.name),1),e("div",me,[e("span",ue,t(h.amount),1)])]))),128)),a(l(d),{href:"/admin/payment-logs",class:"flex items-center space-x-1 underline pt-3 text-sm"},{default:n(()=>[e("span",null,t(s.$t("View all")),1),ge]),_:1})]))])])])]}),_:1})}}};export{Be as default};