PageSourceSearch

https://app.maxcredible.com/assets/index-gnn9BWV8.js

js maxcredible.com collected 2026-09-29 15:05:52 UTC 7,940 bytes, 2 lines download raw bytes

1import{d as G,r as l,b as Z,j as t,$ as v,bK as z,K,w as p,x as Q,M as Y,Q as u,bN as q,bL as J}from"./index-Csf1K8Hn.js";import{c as U,u as W,a as X}from"./features-XcY3iFj6.js";import{a as P}from"./arrow_down-BkAwCwmz.js";import{u as ee}from"./settledPaymentApiSlice-DRR4X6nS.js";import{V as te}from"./VirtualizedTable-C1-z6DW9.js";import{V as re}from"./VirtualizedTableSkeleton-vtmtQHWd.js";import{u as ae}from"./useTableLoadingStates-bTz8jMai.js";import{T as se}from"./TableStateContextProvider-C7TsEdku.js";import{u as oe}from"./usePanelSystem-7UN5BtP4.js";import{f as le}from"./date-BJ3TgLaO.js";import{P as ne}from"./PanelsLayout-pylogYkq.js";import{P as ce}from"./ProOnlyGuard-ynCwewQD.js";import"./index-D5LC4Js3.js";import"./core.esm-BNxjAYRD.js";import"./sortable.esm-C4aEYdnN.js";import"./modifiers.esm-DNN_E-0z.js";import"./useTableStateContext-DBVVdKfm.js";import"./TableStateContext-lCyz3YDi.js";import"./fqlBuilder-e5IKrC9k.js";import"./tableIndexedDb-Crh3Y2Z9.js";import"./useLocation-BnpXo5_e.js";import"./useAdministrationTier-iQuLokHg.js";import"./administrationsApiSlice-QOJlgS2T.js";const i=U(),b={SETTLEMENT_DATE_BEFORE:"settlement_date_before",SETTLEMENT_DATE_AFTER:"settlement_date_after",ID:"id"},ie=()=>{var y,h,C;const d=G(),[a,N]=l.useState(""),[s,g]=l.useState(""),{openPanel:w}=oe(),{t:k}=Z("translation"),e=k("settledPayments",{returnObjects:!0})||{},S=()=>{if(a.includes("date")&&s){const r=new Date(s);return r.setHours(0,0,0,0),r.toISOString()}return s},_=l.useMemo(()=>{const r={administrationId:d,"sort-by":"settlement-date","sort-order":"desc"};return a&&s&&(r[a]=S()),r},[d,a,s]),{data:n,isLoading:D,isFetching:$,isError:L,error:o}=ee(_),f=l.useMemo(()=>{var r,c,T,j;return[i.accessor("id",{header:((r=e==null?void 0:e.table)==null?void 0:r[0])||"ID"}),i.accessor("settlement-date",{header:((c=e==null?void 0:e.table)==null?void 0:c[1])||"Settlement Date",cell:B=>{var E;return t.jsx("div",{className:"text-gray-500 dark:text-gray-400 whitespace-normal",children:le((E=B.row.original)==null?void 0:E["settlement-date"])})}}),i.accessor("number-of-invoices",{header:((T=e==null?void 0:e.table)==null?void 0:T[2])||"Number of Invoices"}),i.accessor("number-of-payments",{header:((j=e==null?void 0:e.table)==null?void 0:j[3])||"Number of Payments"})]},[e]),m=l.useMemo(()=>(n==null?void 0:n.items)||[],[n]),A=W({features:X,data:m,columns:f}),x=r=>{N(r),g("")},F=r=>{g(r.target.value)},M=r=>{r&&w("OPEN_SETTLED_PAYMENTS",{settledId:r},{replace:!0})},I=()=>{var r;return a?a.replace(/_/g," "):((r=e==null?void 0:e.filters)==null?void 0:r.type)||"Type"},{initialLoading:V,refreshing:R}=ae({isLoading:D,isFetching:$,rowCount:m.length}),O=()=>{var r;return L?t.jsx(q,{error:(o==null?void 0:o.status)||500,message:(r=o==null?void 0:o.data)==null?void 0:r.message}):V?t.jsx(re,{height:"calc(100vh - 208px)",columnCount:f.length}):m.length?t.jsx("div",{className:p(R&&"opacity-70"),children:t.jsx(te,{table:A,height:"calc(100vh - 208px)",onRowClick:c=>M(c.original.id),"aria-label":(e==null?void 0:e.tableAriaLabel)||"Settled Payments Table"})}):t.jsx("div",{className:"flex items-center justify-center",style:{height:"calc(100vh - 208px)"},children:t.jsx("div",{className:"text-[20px] font-medium text-gray-800 dark:text-gray-200",children:(e==null?void 0:e.noPaymentsFound)||"Payment details not found"})})},H=()=>{const r=J("/settled-payments");r&&window.open(r,"_blank")};return t.jsx(se,{tableName:"settled-payments-table",children:t.jsxs("section",{className:"bg-white dark:bg-neutral-950 rounded-xl p-4 col-span-7",children:[t.jsxs("header",{className:"mb-6 flex flex-col sm:flex-row gap-2 items-center justify-between",children:[t.jsxs("div",{className:"flex gap-2 items-center",children:[t.jsxs("h1",{className:"text-xl text-gray-900 dark:text-gray-50 font-medium flex items-center gap-2",children:[t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M8 7.69226C7.0375 7.69226 6.21358 7.34959 5.52825 6.66426C4.84275 5.97876 4.5 5.15476 4.5 4.19226C4.5 3.22976 4.84275 2.40584 5.52825 1.72051C6.21358 1.03501 7.0375 0.692261 8 0.692261C8.9625 0.692261 9.78642 1.03501 10.4718 1.72051C11.1573 2.40584 
111.5 3.22976 11.5 4.19226C11.5 5.15476 11.1573 5.97876 10.4718 6.66426C9.78642 7.34959 8.9625 7.69226 8 7.69226ZM0.5 13.7885V13.0845C0.5 12.5948 0.633 12.1413 0.899 11.724C1.165 11.3067 1.5205 10.9858 1.9655 10.7615C2.95383 10.277 3.95092 9.91359 4.95675 9.67126C5.96258 9.42893 6.977 9.30776 8 9.30776C9.023 9.30776 10.0374 9.42893 11.0433 9.67126C12.0491 9.91359 13.0462 10.277 14.0345 10.7615C14.4795 10.9858 14.835 11.3067 15.101 11.724C15.367 12.1413 15.5 12.5948 15.5 13.0845V13.7885C15.5 14.2102 15.3523 14.5688 15.0568 14.8645C14.7613 15.16 14.4026 15.3078 13.9808 15.3078H2.01925C1.59742 15.3078 1.23875 15.16 0.94325 14.8645C0.64775 14.5688 0.5 14.2102 0.5 13.7885ZM2 13.8078H14V13.0845C14 12.882 13.9413 12.6945 13.824 12.522C13.7067 12.3497 13.5474 12.209 13.3462 12.1C12.4846 11.6757 11.6061 11.3542 10.7107 11.1355C9.81525 10.917 8.91167 10.8078 8 10.8078C7.08833 10.8078 6.18475 10.917 5.28925 11.1355C4.39392 11.3542 3.51542 11.6757 2.65375 12.1C2.45258 12.209 2.29333 12.3497 2.176 12.522C2.05867 12.6945 2 12.882 2 13.0845V13.8078ZM8 6.19226C8.55 6.19226 9.02083 5.99643 9.4125 5.60476C9.80417 5.21309 10 4.74226 10 4.19226C10 3.64226 9.80417 3.17143 9.4125 2.77976C9.02083 2.38809 8.55 2.19226 8 2.19226C7.45 2.19226 6.97917 2.38809 6.5875 2.77976C6.19583 3.17143 6 3.64226 6 4.19226C6 4.74226 6.19583 5.21309 6.5875 5.60476C6.97917 5.99643 7.45 6.19226 8 6.19226Z",fill:"#D4D4D4"})}),(e==null?void 0:e.title)||"Settled Payments"]}),t.jsx(v,{onPress:()=>H(),className:"cursor-pointer",children:t.jsx(z,{})})]}),t.jsxs("div",{className:"flex gap-4 flex-row",children:[t.jsxs(K,{children:[t.jsxs(v,{className:"flex justify-between p-[4px] hover:bg-gray-200 dark:hover:bg-neutral-800 w-[200px] border-b border-gray-200 dark:border-neutral-800 items-center","aria-label":(e==null?void 0:e.filterTypeAriaLabel)||"Select filter type",children:[t.jsx("span",{className:p("text-[13px] leading-[18px] font-medium",a?"text-black dark:text-gray-50":"text-gray-400 dark:text-gray-500"),children:I()}),t.jsx("img",{src:P,alt:"","aria-hidden":"true",className:p("w-4 h-4 transition-transform ps-2","group-data-[open]:rotate-180")})]}),t.jsx(Q,{className:"w-[--trigger-width] border-b border-gray-200 dark:border-neutral-800 shadow-lg",children:t.jsxs(Y,{className:"bg-white dark:bg-neutral-950",children:[t.jsx(u,{onAction:()=>x(b.SETTLEMENT_DATE_BEFORE),className:"flex items-center p-2 hover:bg-gray-200 dark:hover:bg-neutral-800 cursor-pointer text-[13px] text-gray-400 dark:text-gray-500 hover:text-gray-800 dark:hover:text-gray-200",children:((y=e==null?void 0:e.table)==null?void 0:y[4])||"Settlement Date Before"}),t.jsx(u,{onAction:()=>x(b.SETTLEMENT_DATE_AFTER),className:"flex items-center p-2 hover:bg-gray-200 dark:hover:bg-neutral-800 cursor-pointer text-[13px] text-gray-400 dark:text-gray-500 hover:text-gray-800 dark:hover:text-gray-200",children:((h=e==null?void 0:e.table)==null?void 0:h[5])||"Settlement Date After"}),t.jsx(u,{onAction:()=>x(b.ID),className:"flex items-center p-2 hover:bg-gray-200 dark:hover:bg-neutral-800 cursor-pointer text-[13px] text-gray-400 dark:text-gray-500 hover:text-gray-800 dark:hover:text-gray-200",children:((C=e==null?void 0:e.table)==null?void 0:C[6])||"ID"})]})})]}),t.jsx("input",{type:a.includes("date")?"date":"text",value:s,onChange:F,className:"p-[4px] border-b border-gray-200 dark:border-neutral-800 text-[13px] leading-[18px] w-[200px] dark:bg-neutral-950 dark:text-gray-50",placeholder:a?`Enter ${a.replace(/_/g," ")}`:"","aria-label":`Enter ${a.replace(/_/g," ")||"filter value"}`,disabled:!a})]})]}),O()]})})},Ae=function(){return t.jsx(ce,{children:t.jsx(ne,{children:t.jsx(ie,{})})})};export{Ae as component};
2//# sourceMappingURL=index-gnn9BWV8.js.map

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.