1import{h as g,_ as Y}from"./pZmmwSy7.js";import{_ as V}from"./DYbbRoDQ.js";import{_ as A}from"./B8p4Ji5G.js";import{_ as B}from"./D2UA8SDQ.js";import{t as v}from"./MhJBWScX.js";import{e as F,r as l,f as M,m as b,c as d,a as t,b as _,h as s,t as r,F as N,g as $,z as y,j as C,o as c}from"#entry";import"./DlAUqK2U.js";import"./xSwuPe9q.js";import"./DrTqWemw.js";const E={class:"container mx-auto mb-10"},S={class:"p-10s bg-white mt-10 rounded shadow-lg"},L={class:"flex flex-col gap-4 mb-10 p-6 px-8 border-b sm:flex-row sm:items-start sm:justify-between"},j={class:"w-full shrink-0 sm:w-auto sm:min-w-[420px]"},R={key:0,class:"grid sm:grid-cols-2 md:grid-cols-4 gap-3 -mt-4 px-8"},z={class:"flex flex-col ss p-5 rounded-2xl bg-[#6E44FF] text-white shadow"},P={class:"flex mb-10"},T={class:"ml-auto px-2 py-1 bg-[#593C8F] text-white rounded-full"},q={class:"text-xs"},G={class:"text-4xl"},H={class:"flex mb-10"},I={class:"ml-auto px-2 py-1 bg-[#21A179] text-white rounded-full"},J={class:"text-xs"},K={class:"text-4xl"},O={key:1,class:"grid grid-cols-1 gap-3 mt-10 px-8"},nt=F({__name:"index",setup(Q){const a=l(!0),i=l([]),x=l([]),f=l([]),p=l({start:g().format("YYYY-MM-DD"),end:g().format("YYYY-MM-DD")}),h=async()=>{try{const{start:e,end:o}=p.value,n=await C(`/company/dashboard?date_start=${e}&date_end=${o}`);i.value=n.items_summary,x.value=n.products_ranking,f.value=n.clients_by_district.map(u=>({value:u.count,name:u.district}))}catch(e){console.log(e)}a.value=!1};M(()=>{h()});const w=b(()=>i.value.reduce((e,o)=>e+o.total,0)),D=b(()=>i.value.reduce((e,o)=>e+o.amount,0)),k=e=>{p.value.start=e.start,p.value.end=e.end,a.value=!0,h()};return(e,o)=>{const n=Y,u=V;return c(),d("div",E,[t("div",S,[t("div",L,[o[0]||(o[0]=t("div",null,[t("h1",{class:"text-2xl"},"Dashboard")],-1)),t("div",j,[_(n,{onChange:k})])]),_(u,{loading:s(a)},null,8,["loading"]),s(a)?y("",!0):(c(),d("div",R,[t("div",z,[t("div",P,[o[1]||(o[1]=t("h3",null,"Total de vendas",-1)),t("div",T,[t("p",q,r(s(D))+" VENDAS",1)])]),t("p",G,r(s(v)(s(w))),1)]),(c(!0),d(N,null,$(s(i),m=>(c(),d("div",{key:m.id,class:"flex flex-col ss p-5 rounded-2xl bg-slate-100 shadow"},[t("div",H,[t("h3",null,r(m.name),1),t("div",I,[t("p",J,r(m.amount)+" VENDAS",1)])]),t("p",K,r(s(v)(m.total)),1)]))),128))])),s(a)?y("",!0):(c(),d("div",O,[_(s(B),{data:s(x)},null,8,["data"]),_(s(A),{data:s(f)},null,8,["data"])]))])])}}});export{nt 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.