@accounter/client
Version:
Accounter client application
1 lines • 1.63 kB
JavaScript
import{s as e}from"./dist-BmACi7k_.js";import{i as t,o as n}from"./utils-BxkqV8PM.js";import{li as r,zo as i}from"./error-handling-sQ-z99nE.js";import{dt as a}from"./select-KYQbDWZT.js";import{t as o}from"./charges-table-Chk7ojHj.js";import{Sr as s,W as c,ct as l,xr as u}from"./common-DtK-TFhT.js";import{c as d}from"./separator-CNv9f_S5.js";import{t as f}from"./button-BZ6z_NAl.js";import{t as p}from"./use-url-query-DXFemxIX.js";import{t as m}from"./page-layout-jrXvjrbd.js";var h=e(n(),1),g=t(),_=()=>{let{setFiltersContext:e}=(0,h.useContext)(d),[t,n]=(0,h.useState)(!1),[_,v]=(0,h.useState)({}),{get:y}=p(),[b,x]=(0,h.useState)(y(`page`)?Number(y(`page`)):1),[{data:S,fetching:C},w]=i({query:r,variables:{page:b,limit:100}}),T=(0,h.useMemo)(()=>Object.entries(_).filter(([,e])=>e).map(([e])=>({id:e,onChange:()=>{w({requestPolicy:`network-only`})}})),[_,w]);function E(){v({})}return(0,h.useEffect)(()=>{e((0,g.jsxs)(`div`,{className:`flex flex-row gap-x-5`,children:[(0,g.jsx)(l,{content:`Expand all accounts`,children:(0,g.jsx)(f,{variant:`outline`,size:`icon`,className:`size-7.5`,onClick:()=>n(e=>!e),children:t?(0,g.jsx)(s,{className:`size-5`}):(0,g.jsx)(u,{className:`size-5`})})}),(0,g.jsx)(c,{selected:T,resetMergeList:E})]}))},[S,C,b,t,e,x,n,T]),(0,g.jsx)(m,{title:`Missing Info Charges`,description:`Review charges with missing required details`,children:!S?.chargesWithMissingRequiredInfo.nodes||C?(0,g.jsx)(a,{className:`h-10 w-10 animate-spin mr-2 self-center`}):(0,g.jsx)(o,{rowSelection:_,onRowSelectionChange:v,data:S?.chargesWithMissingRequiredInfo?.nodes,isAllOpened:t})})};export{_ as MissingInfoCharges};