PageSourceSearch

https://pouchpay.io/build/assets/list-app-DL0sgfzE.js

js pouchpay.io collected 2026-10-02 01:57:54 UTC 4,168 bytes, 1 lines download raw bytes

1import{r as a,j as e,a as x}from"./app-CZXmoS2b.js";import{A as k}from"./AppHead-3v-wai9g.js";import{u as y,T as M,a as v,b as c,c as N,f as g,d as T,e as h,P,g as F,h as I,i as H,j as E,E as K}from"./index-Cm_kb5Di.js";import{T as V,A as B,a as L,b as O,c as _,d as z,e as $,f as q,g as G}from"./alert-dialog-CeTWxbex.js";import{B as u}from"./button-DKNsD8o4.js";import{C as m}from"./checkbox-DbCl3_j2.js";import{D as J,a as Q,b as U,c as W}from"./app-sidebar-header-BchwWZ3h.js";import{A as X}from"./app-layout-DZz2eUl-.js";/* empty css            */import"./index-DroZaziI.js";import"./index-BBIZTMjr.js";import"./index-DqvabXEY.js";const Y=[{title:"Apps",href:"/admin/app"}],p=[{id:"select",header:({table:s})=>e.jsx(m,{checked:s.getIsAllPageRowsSelected()||s.getIsSomePageRowsSelected()&&"indeterminate",onCheckedChange:i=>s.toggleAllPageRowsSelected(!!i),"aria-label":"Select all"}),cell:({row:s})=>e.jsx(m,{checked:s.getIsSelected(),onCheckedChange:i=>s.toggleSelected(!!i),"aria-label":"Select row"}),enableSorting:!1,enableHiding:!1},{accessorKey:"name",header:"Name",cell:({row:s})=>e.jsx("div",{children:s.original.name})},{accessorKey:"link",header:"Link",cell:({row:s})=>e.jsx("a",{href:s.original.link,target:"_blank",children:s.original.link})},{accessorKey:"icon",header:"Icon",cell:({row:s})=>e.jsx("div",{children:e.jsx("img",{src:`/storage/${s.original.app_icon}`,alt:"icon",className:"h-[60px]"})})},{accessorKey:"status",header:"Status",cell:({row:s})=>e.jsx("div",{children:s.original.status===1?"Active":"Disable"})},{id:"actions",enableHiding:!1,cell:({row:s})=>e.jsxs(J,{children:[e.jsx(Q,{asChild:!0,children:e.jsxs(u,{variant:"outline",className:"h-8 w-8 p-0",children:[e.jsx("span",{className:"sr-only",children:"Open menu"}),e.jsx(K,{})]})}),e.jsx(U,{align:"end",children:e.jsx(W,{onClick:()=>x.get(route("admin.app.edit",{id:s.original.id})),className:"cursor-pointer",children:"Edit"})})]})}];function ge({apps:s}){const[i,j]=a.useState([]),[f,w]=a.useState([]),[C,S]=a.useState({}),[n,d]=a.useState({}),[b,A]=a.useState({pageIndex:0,pageSize:20}),[R,r]=a.useState(!1),o=y({data:s.data,columns:p,onSortingChange:j,onColumnFiltersChange:w,getCoreRowModel:E(),getPaginationRowModel:H(),getSortedRowModel:I(),getFilteredRowModel:F(),onColumnVisibilityChange:S,onRowSelectionChange:d,getRowId:t=>t.id.toString(),onPaginationChange:A,state:{sorting:i,columnFilters:f,columnVisibility:C,rowSelection:n,pagination:b}}),D=()=>{const t=Object.keys(n);x.post(route("admin.app.delete"),{ids:t}),r(!1),d({})};return e.jsxs(X,{breadcrumbs:Y,children:[e.jsx(k,{title:"Apps"}),e.jsx("div",{className:"flex h-full flex-1 flex-col gap-4 roun
1ded-xl p-4",children:e.jsxs("div",{className:"w-full",children:[e.jsx("div",{className:"flex items-center justify-end py-4",children:e.jsx(u,{onClick:()=>r(!0),title:"Delete",variant:"destructive",disabled:Object.keys(n).length===0,children:e.jsx(V,{})})}),e.jsx("div",{className:"rounded-md border",children:e.jsxs(M,{children:[e.jsx(v,{children:o.getHeaderGroups().map(t=>e.jsx(c,{children:t.headers.map(l=>e.jsx(N,{children:l.isPlaceholder?null:g(l.column.columnDef.header,l.getContext())},l.id))},t.id))}),e.jsx(T,{children:o.getRowModel().rows?.length?o.getRowModel().rows.map(t=>e.jsx(c,{"data-state":t.getIsSelected()&&"selected",children:t.getVisibleCells().map(l=>e.jsx(h,{children:g(l.column.columnDef.cell,l.getContext())},l.id))},t.id)):e.jsx(c,{children:e.jsx(h,{colSpan:p.length,className:"h-24 text-center",children:"No results."})})})]})}),e.jsxs("div",{className:"flex items-center justify-end space-x-2 py-4",children:[e.jsxs("div",{className:"text-muted-foreground flex-1 text-sm",children:[o.getFilteredSelectedRowModel().rows.length," of ",o.getFilteredRowModel().rows.length," row(s) selected."]}),e.jsx(P,{links:s.links,currentPage:s.current_page})]})]})}),e.jsx(B,{open:R,children:e.jsxs(L,{children:[e.jsxs(O,{children:[e.jsx(_,{children:"Do you want to remove this app?"}),e.jsx(z,{children:"Deleting this app is impossible to return."})]}),e.jsxs($,{children:[e.jsx(q,{onClick:()=>r(!1),children:"Cancel"}),e.jsx(G,{onClick:()=>D(),children:"Delete"})]})]})})]})}export{ge 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.