import{r as o,j as a}from"./login-aN2dRsX6.js";import{D as u}from"./DataTable-D2rA17vR.js";import{P as g}from"./page_header-wdV8ucix.js";import{f as l,b as s}from"./index-26bvdVY4.js";import{t as h}from"./query-c3dDncii.js";import{u as x}from"./app-gmlkJjeD.js";import"./search-4uBqei5W.js";import"./createLucideIcon-C44k9nIN.js";import"./delete-PVCdpT-9.js";function P(){var i;const{id:c}=x(),[t,r]=o.useState({tgl_awal:l(new Date),tgl_akhir:l(new Date),rekening:c}),m=h(t);let n=0;const d=[{label:a.jsx("center",{children:"Tanggal"}),width:100,align:"center",value:e=>l(e.trans_tglbuku)},{label:a.jsx("center",{children:"Kode"}),width:100,align:"center",value:e=>e.trans_kode},{label:"Keterangan",value:e=>e.keterangan},{label:a.jsx("center",{children:"Masuk"}),width:120,align:"right",value:e=>s(e.setor)},{label:a.jsx("center",{children:"Keluar"}),width:120,align:"right",value:e=>s(e.tarik)},{label:a.jsx("center",{children:"Saldo Akhir"}),width:120,align:"right",value:e=>(n+=((e==null?void 0:e.setor)??0)-((e==null?void 0:e.tarik)??0),s(n))}];return a.jsx(a.Fragment,{children:a.jsxs("div",{className:"container",children:[a.jsx(g,{title:"Statement Transaksi Tabungan",breadcrumb:[]}),a.jsx("div",{className:"row mb-2",children:a.jsx("div",{className:"col-md-6",children:a.jsxs("div",{className:"row",children:[a.jsx("label",{className:"col-form-label col-md-2",children:"Periode"}),a.jsx("div",{className:"col-md-8",children:a.jsxs("div",{className:"input-group",children:[a.jsx("input",{className:"form-control",type:"date",value:t.tgl_awal,onChange:e=>r({...t,tgl_awal:e.target.value})}),a.jsx("span",{className:"input-group-text",children:"Sampai"}),a.jsx("input",{className:"form-control",type:"date",value:t.tgl_akhir,onChange:e=>r({...t,tgl_akhir:e.target.value})})]})}),a.jsx("div",{className:"col-md-2",children:a.jsx("div",{className:"d-flex",children:a.jsx("button",{className:"btn btn-primary flex-grow-1",children:"Preview"})})})]})})}),a.jsx("div",{className:"mb-2",children:a.jsx(u,{data:((i=m.data)==null?void 0:i.filter(e=>e.status==1))||[],column:d,pagination:!1,height:500})})]})})}export{P as default};
