PageSourceSearch

https://www.aptechproconnect.com/assets/BookList-Mui5j08y.js

js aptechproconnect.com collected 2026-10-09 04:41:39 UTC 1,987 bytes, 9 lines download raw bytes

1import{u as S,bR as T,b6 as k,am as B,j as e,T as i,I as m,b,b7 as v,M as A,n as h,R as p,bu as I,g as d}from"./index-QgM5GAdg.js";import{F as P,S as R,a as F}from"./LearningCircleStyles-ChbN-OFh.js";import{b as N}from"./digitalContentListPageStyles-Ci2o4E6t.js";import{C as M}from"./CourseCard-BC86s2GW.js";import{g as E}from"./adminBooksApi-CqMQFaAT.js";import{S as U}from"./ScrollInfinite-DiIq--I-.js";const q=d.img`
2  height: 64px;
3  width: 64px;
4`,w=d.div`
5  display: flex;
6  justify-content: center;
7  align-items: center;
8  gap: 6px;
9`;function K(){const r=S(s=>s.profile),[x,o]=T(),[t,g,l]=k(x.get("search")??""),u={page:1,limit:10,search:t},{data:n,status:j,fetchNextPage:f,isFetchingNextPage:y}=B({queryKey:["getAdminBooksApi",g],queryFn:E,initialPageParam:u,getNextPageParam:(s,c,C)=>{if(s!=null&&s.nextPage)return{search:t,page:C.page+1,limit:10}}}),a=(n==null?void 0:n.pages.flatMap(s=>s.items))||[];return e.jsxs(e.Fragment,{children:[e.jsxs(P,{children:[e.jsx(i,{type:"h3",children:"Books"}),e.jsxs(R,{children:[e.jsxs("div",{style:{display:"flex"},children:[e.jsx(m,{name:"search"}),e.jsx(N,{placeholder:"Book name, Book Id",value:t,onChange:s=>{l(s.target.value),s.target.value===""?o({}):o({search:s.target.value})}})]}),t&&e.jsx(F,{onClick:()=>{l(""),o({})},children:e.jsx(m,{name:"cross",color:"black"})})]})]}),j=="pending"?e.jsxs(b,{horizontalalign:"center",verticalalign:"center",children:[e.jsx(q,{src:v}),e.jsxs(w,{children:[e.jsx(i,{type:"button",children:"Hang Tight!"}),e.jsx(i,{type:"small",children:"We're putting the final touches on your page."})]})]}):e.jsx(U,{onScroll:f,children:a.length>0?e.jsxs(A,{gap:"30px",itemMinWidth:"220px",children:[a==null?void 0:a.map((s,c)=>e.jsx(M,{showOption:(r==null?void 0:r.role)===p.Moderator||(r==null?void 0:r.role)===p.Admin,course:s,detailUrl:h.AdminBookDetailRoute,editUrl:h.AdminBookEditRoute},c)),y&&e.jsx("p",{children:"Loading more..."})]}):e.jsx(I,{textContent:"No Book Found!"})})]})}export{K 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.