PageSourceSearch

https://rakontur.com/assets/_admin.admin.films.index-Dla9RLH-.js

js rakontur.com collected 2026-09-24 22:04:39 UTC 2,887 bytes, 1 lines download raw bytes

1import{y as u,r as a,j as t,L as f,M as g}from"./index-DTiY3O-B.js";import{a as y}from"./useQuery-CYwuTSBS.js";import{B as j}from"./badge-BjynsbRs.js";import{u as N}from"./useEditorStatus-CIz8NN-B.js";import{S}from"./SourceListShell-D8fU-MZM.js";import{d as b}from"./admin-sources.functions-Pd3SlS0J.js";import"./index-LHNt3CwB.js";import"./utils-BQHNewu7.js";import"./button-BglpFu9j.js";import"./index-U0-XPCwl.js";import"./input-CSBqAUuc.js";import"./select-DH1mbsd5.js";import"./index-CX6Bza9E.js";import"./index-CvpCf7DC.js";import"./index-DPPSNpWs.js";import"./index-pq4NgQ4v.js";import"./index-Dqa5LGsd.js";import"./chevron-down-DPIblOKu.js";import"./createLucideIcon-ClmxC8cr.js";import"./check-DYqwORxb.js";import"./refresh-cw-BdKb2wr-.js";import"./plus-BqW0QRbi.js";import"./chevron-left-BFSSnbWe.js";import"./chevron-right-C2mIVAPQ.js";function $(){const m=u(),{role:p}=N(),d=p==="admin",[r,x]=a.useState(""),[l,i]=a.useState(1),[o,h]=a.useState(50),n={search:r.trim()||null,page:l,page_size:o},s=y({queryKey:["admin-films",n],queryFn:()=>b({data:n}),placeholderData:g}),c=s.data?.rows??[];return t.jsx(S,{title:"Films (lite editor)",subtitle:"Identity + Timeline-relationship fields only. JSONB blocks (credits, clips, watch_links, etc.) remain read-only this phase.",newHref:"/admin/films/new",search:r,onSearch:e=>{x(e),i(1)},page:l,pageCount:s.data?.page_count??1,pageSize:o,total:s.data?.total??0,onPage:i,onPageSize:e=>{h(e),i(1)},onRefresh:()=>m.invalidateQueries({queryKey:["admin-films"]}),isFetching:s.isFetching,isLoading:s.isLoading,isAdmin:d,children:t.jsxs("table",{className:"w-full text-sm",children:[t.jsx("thead",{className:"bg-zinc-950 text-xs uppercase tracking-wider text-zinc-400",children:t.jsxs("tr",{children:[t.jsx("th",{className:"text-left px-3 py-2",children:"Title"}),t.jsx("th",{className:"text-left px-3 py-2 w-48",children:"Slug"}),t.jsx("th",{className:"text-left px-3 py-2 w-20",children:"Year"}),t.jsx("th",{className:"text-left px-3 py-2 w-24",children:"Status"})]})}),t.jsxs("tbody",{children:[c.map(e=>t.jsxs("tr",{className:"border-t border-zinc-900 hover:bg-zinc-950/50",children:[t.jsxs("td",{className:"px-3 py-2",children:[t.jsx(f,{to:"/admin/films/$id",params:{id:e.id},className:"font-medium hover:text-primary",children:e.title}),e.subtitle&&t.jsx("div",{className:"text-xs text-zinc-500",children:e.subt
1itle})]}),t.jsx("td",{className:"px-3 py-2 text-zinc-400 font-mono text-xs",children:e.slug}),t.jsx("td",{className:"px-3 py-2 text-zinc-400",children:e.year??"—"}),t.jsx("td",{className:"px-3 py-2",children:t.jsx(j,{variant:e.status==="published"?"default":"outline",className:"text-[10px] uppercase",children:e.status})})]},e.id)),!s.isLoading&&c.length===0&&t.jsx("tr",{children:t.jsx("td",{colSpan:4,className:"px-3 py-8 text-center text-muted-foreground",children:"No films found."})})]})]})})}export{$ as component};

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.