Default Vite base to /admin/ (ADMIN_PANEL_BASE) so Dokploy Path+/admin + Strip Path resolves assets instead of the user app root. Co-authored-by: Cursor <cursoragent@cursor.com>
2 lines
1.7 KiB
JavaScript
2 lines
1.7 KiB
JavaScript
import{o as V}from"./select--BgT6D7O.js";import{b as T}from"./filters-OZN7JLpr.js";import{d as z,x as F,y as m,a as p,w as t,m as c,r as o,o as r,c as n,p as S,b as f,e as D,f as v,t as u,F as g,h as E,i as L}from"./index-BpoVO8sC.js";import"./index-B_k8FJMA.js";const M={class:"grid-2"},G=z({__name:"index",setup(O){const i=c(!1),_=c([]),l=c(void 0),d=c([]),x=[{title:"عملیات",dataIndex:"action"},{title:"جزئیات",dataIndex:"detail"},{title:"تاریخ",dataIndex:"caj"}];function y(e,s){return V(s).includes(e)}async function b(){if(!l.value){d.value=[];return}try{i.value=!0;const{data:e}=await m.get(`log/ago/${l.value}`);d.value=e}catch(e){console.log(e)}finally{i.value=!1}}return F(async()=>{try{const{data:e}=await m.get("log/list/customer");_.value=e}catch(e){console.log(e)}}),(e,s)=>{const h=o("a-select-option"),w=o("a-select"),k=o("a-form-item"),C=o("a-form"),j=o("a-table"),B=o("a-card"),I=o("a-spin");return r(),p(I,{spinning:i.value},{default:t(()=>[n(B,{title:"آمار",class:"page-card table-scroll"},{default:t(()=>[n(C,{layout:"vertical"},{default:t(()=>[S("div",M,[n(k,{label:"مشتری"},{default:t(()=>[n(w,{value:l.value,"onUpdate:value":s[0]||(s[0]=a=>l.value=a),"show-search":"","allow-clear":"",placeholder:"انتخاب کنید","filter-option":y,onChange:b},{default:t(()=>[(r(!0),f(g,null,D(_.value,a=>(r(),p(h,{key:a.id,value:a.id},{default:t(()=>[v(u(a.name)+" - "+u(a.mobile),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})])]),_:1}),n(j,{"data-source":d.value,columns:x,pagination:{pageSize:20},size:"small","row-key":"id"},{bodyCell:t(({column:a,record:N})=>[a.dataIndex==="caj"?(r(),f(g,{key:0},[v(u(E(T)(N.caj)),1)],64)):L("",!0)]),_:1},8,["data-source"])]),_:1})]),_:1},8,["spinning"])}}});export{G as default};
|