| Current Path : /home/users/unlimited/www/whatsapp-crm/public/build/assets/ |
| Current File : /home/users/unlimited/www/whatsapp-crm/public/build/assets/Dashboard-eac6495a.js |
import _ from"./App-6e8cb8a8.js";import{m as y,i as b,g as l,p as k,o as r,a as e,t,f as a,k as h,u as i,l as d,c,F as C,e as j,K as $}from"./app-f1493ab2.js";import"./Sidebar-b962a0c1.js";import"./Menu-45912eaa.js";import"./ProfileModal-09ae28bb.js";import"./FormInput-b3450213.js";import"./tabs-80627b62.js";import"./hidden-f79cef22.js";import"./micro-task-89dcd6af.js";import"./transition-f32a8133.js";import"./use-outside-click-92c6377f.js";import"./LangToggle-d2b58a25.js";import"./MobileSidebar-5b51f786.js";import"./index-114bea05.js";/* empty css */const B={class:"bg-white md:bg-inherit p-4 md:p-8 rounded-[5px] text-[#000] h-full overflow-y-auto"},M={class:"flex justify-between mt-3 md:mt-0"},N={class:"md:block hidden text-xl mb-1"},V={class:"mb-6 flex items-center leading-6"},z={class:"mt-1 font-semibold md:font-normal text-xl"},L={class:"md:flex space-x-2 md:space-x-2 mt-4 md:mt-0 mb-8 text-xl md:text-sm hidden"},O={class:"grid grid-cols-2 md:grid-cols-4 gap-x-4 gap-y-2 md:space-y-0"},T={class:"bg-slate-100 md:bg-white col-span-2 md:col-span-1 rounded-lg p-3"},R={class:"flex justify-between items-center"},Z={class:"text-slate-600"},A={class:"text-xl text-gray-600"},D={class:"text-sm space-x-1 md:block hidden"},F={class:"bg-slate-100 md:bg-white col-span-1 rounded-lg p-3"},S={class:"flex justify-between items-center"},H={class:"text-slate-600"},U={class:"text-xl text-gray-600"},E={class:"text-sm space-x-1 md:block hidden"},I={class:"bg-slate-100 md:bg-white rounded-lg p-3"},K={class:"flex justify-between items-center"},W={class:"text-slate-600"},Y={class:"text-xl text-gray-600"},q={class:"text-sm space-x-1 md:block hidden"},G={class:"bg-slate-100 col-span-2 md:col-span-1 md:bg-white rounded-lg p-3"},J={class:"flex justify-between items-center"},P={class:"text-slate-600"},Q={class:"text-xl text-gray-600"},X={class:"md:grid md:grid-cols-2 gap-x-4 mt-8"},ee={id:"chart",class:"md:block hidden"},te={class:"bg-white rounded-lg py-4 md:px-4 h-[fit-content]"},se={class:"text-sm"},oe={key:0,class:"md:p-5 border-2 border-dashed mt-4"},ne={class:"text-sm text-center"},le={key:1,class:"space-y-1"},ae={class:"capitalize"},ie={class:"self-end"},de={class:"bg-[#ffe5b4] p-1 rounded-md text-xs px-2 capitalize"},Ce={__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(u){const g=y(()=>$().props.auth.user),n=u,x={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:n.period},tooltip:{x:{format:"dd/MM/yy HH:mm"}}},w=[{name:"New Customers",data:n.newUsers},{name:"Revenue",data:n.revenue}];return(o,s)=>{const v=k("apexchart");return r(),b(_,null,{default:l(()=>{var p;return[e("div",B,[e("div",M,[e("div",null,[e("h2",N,t(o.$t("Dashboard")),1),e("p",V,[e("span",z,t(o.$t("Welcome back"))+", "+t((p=g.value)==null?void 0:p.first_name)+" 👋",1)])])]),e("div",L,[a(i(d),{href:"/admin/organizations/create",class:"bg-primary py-2 px-3 rounded-lg text-white text-center"},{default:l(()=>[h(t(o.$t("Add organization")),1)]),_:1}),a(i(d),{href:"/admin/users/create",class:"bg-primary py-2 px-3 rounded-lg text-white text-center"},{default:l(()=>[h(t(o.$t("Add user")),1)]),_:1})]),e("div",O,[e("div",T,[e("div",R,[e("div",null,[e("h2",Z,t(o.$t("Total revenue")),1),e("h1",A,t(n.totalRevenue),1)]),s[0]||(s[0]=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))]),e("div",D,[a(i(d),{href:"/admin/payment-logs",class:"flex items-center space-x-1 underline"},{default:l(()=>[e("span",null,t(o.$t("View all")),1),s[1]||(s[1]=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))]),_:1})])]),e("div",F,[e("div",S,[e("div",null,[e("h2",H,t(o.$t("Active users")),1),e("h1",U,t(n.userCount),1)]),s[2]||(s[2]=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))]),e("div",E,[a(i(d),{href:"/admin/users",class:"flex items-center space-x-1 underline"},{default:l(()=>[e("span",null,t(o.$t("View all")),1),s[3]||(s[3]=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))]),_:1})])]),e("div",I,[e("div",K,[e("div",null,[e("h2",W,t(o.$t("Open tickets")),1),e("h1",Y,t(n.openTickets),1)]),s[4]||(s[4]=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))]),e("div",q,[a(i(d),{href:"/admin/support",class:"flex items-center space-x-1 underline"},{default:l(()=>[e("span",null,t(o.$t("View all")),1),s[5]||(s[5]=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))]),_:1})])]),e("div",G,[e("div",J,[e("div",null,[e("h2",P,t(o.$t("Total messages")),1),e("h1",Q,t(n.totalMessages),1)]),s[6]||(s[6]=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))])])]),e("div",X,[e("div",null,[e("div",ee,[a(v,{type:"area",height:"350",options:x,series:w})])]),e("div",te,[e("h1",null,t(o.$t("Recent transactions")),1),e("p",se,t(o.$t("Below are your most recent transactions")),1),n.payments.length===0?(r(),c("div",oe,[e("p",ne,t(o.$t("You do not have any transactions")),1)])):(r(),c("div",le,[(r(!0),c(C,null,j(n.payments.data,(m,f)=>(r(),c("div",{key:f,class:"mt-4 border-l-4 bg-gray-50 flex justify-between p-2 text-sm"},[e("div",ae,t(m.organization.name),1),e("div",ie,[e("span",de,t(m.amount),1)])]))),128)),a(i(d),{href:"/admin/payment-logs",class:"flex items-center space-x-1 underline pt-3 text-sm"},{default:l(()=>[e("span",null,t(o.$t("View all")),1),s[7]||(s[7]=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))]),_:1})]))])])])]}),_:1})}}};export{Ce as default};