1import{O as i,s as l,j as e}from"./index-BNrdOJig.js";import{C as o,a as x,b as h,c as j}from"./card-BiTQ_Rx7.js";import{T as u,a as m,b as d,c as a,d as p,e as r}from"./table-Dk8irwvM.js";import{B as y}from"./badge-6dbaoSJl.js";function w(){const{data:n}=i({queryKey:["release_schedule"],queryFn:async()=>{const{data:{user:s}}=await l.auth.getUser();if(!s)return[];const{data:t}=await l.from("release_schedule").select("*").eq("owner_id",s.id).order("release_at",{ascending:!0});return t??[]}}),{data:c}=i({queryKey:["territory_conflicts"],queryFn:async()=>{const{data:s}=await l.from("territory_conflicts").select("*").limit(50);return s??[]}});return e.jsxs("div",{className:"container py-8 space-y-6",children:[e.jsxs("header",{children:[e.jsx("h1",{className:"text-3xl font-bold",children:"Windowed Release Scheduler"}),e.jsx("p",{className:"text-muted-foreground",children:"Per-territory release dates, exclusives, and pre-saves."})]}),e.jsxs(o,{children:[e.jsx(x,{children:e.jsx(h,{children:"Scheduled releases"})}),e.jsx(j,{children:e.jsxs(u,{children:[e.jsx(m,{children:e.jsxs(d,{children:[e.jsx(a,{children:"Territory"}),e.jsx(a,{children:"Release"}),e.jsx(a,{children:"Pre-save"}),e.jsx(a,{children:"Window"}),e.jsx(a,{children:"Status"})]})}),e.jsx(p,{children:n?.length?n.map(s=>e.jsxs(d,{children:[e.jsx(r,{children:s.territory_code}),e.jsx(r,{children:new Date(s.release_at).toLocaleString()}),e.jsx(r,{children:s.presave_open_at?new Date(s.presave_open_at).toLocaleString():"â"}),e.jsxs(r,{children:[s.window_type,s.exclusive_dsp?` (${s.exclusive_dsp})`:""]}),e.jsx(r,{children:e.jsx(y,{children:s.status})})]},s.id)):e.jsx(d,{children:e.jsx(r,{colSpan:5,className:"text-center text-muted-foreground",children:"No scheduled releases."})})})]})})]}),e.jsxs(o,{children:[e.jsx(x,{children:e.jsx(h,{children:"Territory conflicts"})}),e.jsx(j,{children:c?.length?e.jsx("ul",{className:"space-y-2 text-sm",children:c.map((s,t)=>e.jsxs("li",{className:"border rounded p-2",children:[e.jsx("span",{className:"font-medium",children:s.conflict_type})," in ",s.territory_code," â release ",s.release_id?.slice(0,8),"â¦"]},t))}):e.jsx("p",{className:"text-sm text-muted-foreground",children:"No conflicts detected."})})]})]})}export{w 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.