import{K as n,r as o,j as a,S as d}from"./app-DZfefqwY.js";/* empty css            */function m(){const{riwayat:t,filter:r}=n().props,[s,l]=o.useState(r||""),i=e=>{e.preventDefault(),d.visit(route("test.dashboard"),{method:"get",data:{filter:s},only:["riwayat"],preserveState:!0})};return a.jsxs("div",{className:"p-6",children:[a.jsx("h1",{className:"text-xl font-bold mb-4",children:"Riwayat Transaksi"}),a.jsxs("form",{onSubmit:i,className:"mb-4 space-x-2",children:[a.jsx("input",{type:"text",value:s,onChange:e=>l(e.target.value),className:"border rounded px-3 py-1",placeholder:"Cari nama transaksi..."}),a.jsx("button",{type:"submit",className:"bg-blue-600 text-white px-4 py-1 rounded",children:"Cari"})]}),a.jsxs("ul",{className:"bg-white rounded shadow p-4",children:[t.length===0&&a.jsx("li",{className:"text-gray-500",children:"Tidak ada data."}),t.map(e=>a.jsxs("li",{className:"border-b py-2",children:[e.nama," - Rp",e.total.toLocaleString()]},e.id))]})]})}export{m as default};
