1import{a as A,E as H}from"./BHKgj5r4.js";import{_ as U}from"./C5rmOvJo.js";import{E as $,a as j}from"./DExxwGSN.js";import{E as F}from"./B0eHvu8h.js";import{u as q}from"./Cua5bpza.js";/* empty css */import"./BQm0S9Gs.js";import"./D1uZie_T.js";import{l as z,m as G,u as R,c as W,r as x,I as J,q as K,a as i,b as t,t as o,g as a,f as _,d as E,e as g,E as O,j as f,F as u,i as h,h as Q,o as s}from"./6IIxn3OZ.js";import{u as X,n as Y}from"./DeERfVqQ.js";import{s as Z}from"./CqWVj-YM.js";import"./D6m1_92R.js";import"./DQ2I2Ovm.js";import"./F7sx1R8b.js";import"./BV0VNZHr.js";import"./Dp09WBWk.js";import"./CzPHhKso.js";import"./CelxogyL.js";import"./DdLWuqla.js";import"./sUvVD9-T.js";import"./C9IjlZSK.js";import"./CJycbbzu.js";import"./Dbl9yNlp.js";import"./DsUEs2r5.js";import"./CC6Ll0MO.js";import"./C3JIWPxk.js";const tt={class:"user-tabs-content-title"},et={class:"total-order"},ot={class:"donor-select my-2"},at={class:"w-52"},rt={key:1,class:"relative overflow-x-auto rounded-md"},nt={class:"w-full text-base text-left text-gray-500"},lt={class:"uppercase bg-transparent text-text-elGray border-b border-gray-400"},st={scope:"row",class:"px-3 py-2.5 font-medium text-gray-900 whitespace-nowrap"},dt={class:"px-3 py-2.5"},it={class:"px-3 py-2.5"},pt={class:"px-3 py-2.5"},ut={class:"px-3 py-2.5"},Ut={__name:"total-orders",setup(ct){const{t:r}=z(),y=G(),{memberApi:v}=X(),V=q(),C=R(),N=W(()=>C.isMobile),I=[{link:y("/"),name:r("home")},{link:y("/user/info"),name:r("member")},{name:r("userTotalOrder")}],P=[r("donorNo"),r("donorName"),r("paidDate"),r("price"),r("orderNo")],m=x(),b=x(),k=x([]),l=J({loading:!1,tableData:[],pageIndex:1,total:0});K(()=>{Z({title:r("userOnlineOrder")}),v.getMemberDonors().then(d=>{if(d.status==="success"){const n=d.data.filter(p=>p.no!==null);k.value=n}}),V.setBreadcrumb(I)});const D=(d,n)=>{l.loading=!0,v.getTotalOrder(d,n).then(p=>{p.status==="success"&&(p.data.data.forEach(c=>{c.amount=`$ ${Y(c.amount)}`,c.transferred_at=c.transferred_at.split(" ")[0]}),l.loading=!1,l.total=p.data.total,l.tableData=p.data.data)})},B=d=>{D(m.value,d),l.pageIndex=d},L=d=>{l.pageIndex=1,m.value=d,D(d,1)};return(d,n)=>{const p=H,w=A,c=U,M=j,S=$,T=F;return s(),i(u,null,[t("div",tt,[t("h2",null,o(a(r)("userTotalOrder")),1)]),t("div",et,[t("p",null,o(a(r)("totalOrderMessage")),1),t("small",null,[_(o(a(r)("needAnotherHelp"))+" ",1),n[3]||(n[3]=t("a",{class:"text-primary-normal",href:"mailto:[email protected]","auto-tracked":"true"}," [email protected] ",-1)),_(" "+o(a(r)("or"))+" ",1),n[4]||(n[4]=t("a",{class:"text-primary-normal",href:"tel:+886-2-81953005","auto-tracked":"true"}," 02-8195-3005 ",-1)),_(" "+o(a(r)("ccHelp")),1)]),t("div",ot,[t("p",null,o(a(r)("totalOrderDonor"))+"ï¼",1),t("div",at,[E(w,{modelValue:a(m),"onUpdate:modelValue":n[0]||(n[0]=e=>O(m)?m.value=e:null),placeholder:a(r)("totalOrderDonor"),onChange:L},{default:g(()=>[(s(!0),i(u,null,h(a(k),e=>(s(),f(p,{key:e.no,label:e.name,value:e.no},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])]),a(l).loading?(s(),f(c,{key:0,text:"donationDataLoading",class:"h-52"})):(s(),i(u,{key:1},[a(l).tableData.length>0?(s(),i(u,{key:0},[a(N)?(s(),f(S,{key:0,modelValue:a(b),"onUpdate:modelValue":n[1]||(n[1]=e=>O(b)?b.value=e:null),accordion:""},{default:g(()=>[(s(!0),i(u,null,h(a(l).tableData,e=>(s(),f(M,{key:e.id,title:"title",name:e.id},{title:g(()=>[_(o(a(r)("date"))+"ï¼"+o(e.transferred_at)+" - "+o(a(r)("price"))+"ï¼"+o(e.amount),1)]),default:g(()=>[t("div",null,o(a(r)("donorNo"))+"ï¼"+o(e.donor_id),1),t("div",null,o(a(r)("donorName"))+"ï¼"+o(e.donor_name),1),t("div",null,o(a(r)("paidDate"))+"ï¼"+o(e.transferred_at),1),t("div",null,o(a(r)("price"))+"ï¼"+o(e.amount),1),t("div",null,o(a(r)("orderNo"))+"ï¼"+o(e.order_no),1)]),_:2},1032,["name"]))),128))]),_:1},8,["modelValue"])):(s(),i("div",rt,[t("table",nt,[t("thead",lt,[t("tr",null,[(s(),i(u,null,h(P,e=>t("th",{scope:"col",key:e,class:"px-3 py-2.5"},o(e),1)),64))])]),t("tbody",null,[(s(!0),i(u,null,h(a(l).tableData,e=>(s(),i("tr",{class:"bg-transparent border-b hover:bg-slate-100",key:e},[t("th",st,[t("span",null,o(e.donor_id),1)]),t("td",dt,[t("span",null,o(e.donor_name),1)]),t("td",it,[t("span",null,o(e.transferred_at),1)]),t("td",pt,[t("span",null,o(e.amount),1)]),t("td",ut,[t("span",null,o(e.order_no),1)])]))),128))])])])),E(T,{currentPage:a(l).pageIndex,"onUpdate:currentPage":n[2]||(n[2]=e=>a(l).pageIndex=e),class:"justify-center mt-5","page-size":15,layout:"total, prev, pager, next",total:a(l).total,"hide-on-single-page":"",onCurrentChange:B},null,8,["currentPage","total"])],64)):Q("",!0)],64))])],64)}}};export{Ut 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.