- Vorlagen + Ketten: Partei-Dropdown-Filter mit Badges (#9) - Vorlagen-Detail: Ketten-Klassifikation mit Begründung anzeigen - Vorlagen-Detail: Umsetzungsbewertungen mit Score + Begründung - SPA-Routing: Catch-All für direkten URL-Zugriff - Status-Engine: Begründungen für alle Ketten-Status generieren - Kurze Beschlusstexte (<=5 Zeichen) nicht mehr als Beschluss werten - POST /api/bewertung/vorlagen/{id} + /ketten/{id} für KI-Neubewertung - Frontend: 'Neu bewerten' Button + Kommentarfeld auf beiden Detailseiten - Job-Status-Polling mit Spinner - ALLRIS-Rescrape vor Bewertung noch offen (#10) Closes #9
2 lines
7.0 KiB
JavaScript
2 lines
7.0 KiB
JavaScript
import{a as y,f as h}from"../chunks/Bkzsmr9I.js";import{o as Kt}from"../chunks/trpXq522.js";import{d as Tt,b as a,f as dt,g as t,h as Ut,e as Bt,c as o,s as x,$ as Ft,r,a as s,t as $,u as Lt}from"../chunks/Cjw4vZKn.js";import{d as Et,a as _,s as u}from"../chunks/DfJQ0EIT.js";import{i as pt}from"../chunks/kjB3f-xG.js";import{h as Rt,e as Vt,i as jt}from"../chunks/DaCWmHjB.js";import{r as qt,s as It}from"../chunks/RVjQLo13.js";import{b as Mt}from"../chunks/CSnrw0fY.js";import{b as ut}from"../chunks/qS6hbb4Y.js";import{g as tt}from"../chunks/3I_XkZiy.js";import{a as Zt}from"../chunks/Cgke0YGN.js";import{f as Dt}from"../chunks/utcFFRIM.js";import{S as Gt}from"../chunks/CMkOXag5.js";var Ht=h('<div class="bg-red-50 text-red-700 p-4 rounded-lg"> </div>'),Ot=h('<div class="flex justify-center py-20"><div class="animate-spin rounded-full h-12 w-12 border-b-2 border-green-600"></div></div>'),Wt=h('<tr class="hover:bg-gray-50 transition-colors cursor-pointer"><td class="px-4 py-3"><a class="font-mono text-sm font-medium text-green-700 hover:underline"> </a></td><td class="px-4 py-3 text-sm text-gray-700 max-w-md truncate"> </td><td class="px-4 py-3 text-sm text-gray-600 capitalize"> </td><td class="px-4 py-3"><!></td><td class="px-4 py-3 text-sm text-gray-600"> </td><td class="px-4 py-3 text-sm text-gray-500"> </td></tr>'),Ct=h('<div class="flex justify-center mt-6 space-x-2"><button class="px-3 py-2 rounded-lg text-sm border border-gray-300 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">« Zurück</button> <span class="px-3 py-2 text-sm text-gray-600"> </span> <button class="px-3 py-2 rounded-lg text-sm border border-gray-300 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">Weiter »</button></div>'),Jt=h('<div class="text-sm text-gray-500 mb-3"> </div> <div class="bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden"><table class="w-full"><thead class="bg-gray-50"><tr><th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Aktenzeichen</th><th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Thema</th><th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Typ</th><th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Status</th><th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Glieder</th><th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Letzte Akt.</th></tr></thead><tbody class="divide-y divide-gray-100"></tbody></table></div> <!>',1),Nt=h('<div class="mb-6"><h1 class="text-2xl font-bold text-gray-900">Ketten</h1> <p class="text-gray-500 text-sm mt-1">Zusammengehörige Vorlagen als Ketten nachverfolgen</p></div> <div class="bg-white rounded-xl shadow-sm border border-gray-200 p-4 mb-6"><div class="flex flex-wrap gap-3 items-end"><div><label for="suche" class="block text-xs font-medium text-gray-500 mb-1">Suche</label> <input id="suche" type="text" placeholder="Thema suchen..." class="border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-green-500 focus:border-green-500"/></div> <div><label for="status" class="block text-xs font-medium text-gray-500 mb-1">Status</label> <select id="status" class="border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-green-500"><option>Alle</option><option>Eingereicht</option><option>In Beratung</option><option>Vertagt</option><option>Beschlossen</option><option>Umgesetzt</option><option>Abgelehnt</option><option>Versandet</option><option>Angefragt</option><option>Beantwortet</option><option>Offen</option><option>Abgewiegelt</option></select></div> <div><label for="typ" class="block text-xs font-medium text-gray-500 mb-1">Typ</label> <select id="typ" class="border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-green-500"><option>Alle</option><option>Antrag</option><option>Anfrage</option></select></div> <button class="bg-green-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-green-700 transition-colors">Filtern</button></div></div> <!>',1);function pe(vt,ct){Tt(ct,!0);let l=x(null),P=x(null),K=x(!1),v=x(""),c=x(""),g=x(""),d=x(1);function gt(){const e=new URL(window.location.href).searchParams;s(v,e.get("status")||"",!0),s(c,e.get("typ")||"",!0),s(g,e.get("suche")||"",!0),s(d,parseInt(e.get("page")||"1"),!0)}async function T(){s(K,!0);try{const e={page:String(t(d)),page_size:"30"};t(v)&&(e.status=t(v)),t(c)&&(e.typ=t(c)),t(g)&&(e.suche=t(g)),s(l,await Zt(e),!0)}catch(e){s(P,e instanceof Error?e.message:"Fehler",!0)}finally{s(K,!1)}}function k(){const e=new URLSearchParams;t(v)&&e.set("status",t(v)),t(c)&&e.set("typ",t(c)),t(g)&&e.set("suche",t(g)),s(d,1),e.set("page","1"),tt(`/ketten?${e.toString()}`,{replaceState:!0}),T()}function et(e){s(d,e,!0);const n=new URLSearchParams(window.location.search);n.set("page",String(e)),tt(`/ketten?${n.toString()}`,{replaceState:!0}),T()}Kt(()=>{gt(),T()});var at=Nt();Rt("1cwhw9o",e=>{Bt(()=>{Ft.title="Ketten - Antragstracker Hagen"})});var U=a(dt(at),2),rt=o(U),B=o(rt),F=a(o(B),2);qt(F),r(B);var L=a(B,2),z=a(o(L),2),E=o(z);E.value=E.__value="";var R=a(E);R.value=R.__value="eingereicht";var V=a(R);V.value=V.__value="in_beratung";var j=a(V);j.value=j.__value="vertagt";var q=a(j);q.value=q.__value="beschlossen";var I=a(q);I.value=I.__value="umgesetzt";var M=a(I);M.value=M.__value="abgelehnt";var Z=a(M);Z.value=Z.__value="versandet";var D=a(Z);D.value=D.__value="angefragt";var G=a(D);G.value=G.__value="beantwortet";var H=a(G);H.value=H.__value="offen";var ot=a(H);ot.value=ot.__value="abgewiegelt",r(z),r(L);var O=a(L,2),A=a(o(O),2),W=o(A);W.value=W.__value="";var C=a(W);C.value=C.__value="antrag";var st=a(C);st.value=st.__value="anfrage",r(A),r(O);var mt=a(O,2);r(rt),r(U);var ft=a(U,2);{var xt=e=>{var n=Ht(),w=o(n,!0);r(n),$(()=>u(w,t(P))),y(e,n)},_t=e=>{var n=Ot();y(e,n)},bt=e=>{var n=Jt(),w=dt(n),yt=o(w);r(w);var J=a(w,2),it=o(J),nt=a(o(it));Vt(nt,21,()=>t(l).items,jt,(S,i)=>{var p=Wt(),m=o(p),f=o(m),N=o(f,!0);r(f),r(m);var b=a(m),St=o(b,!0);r(b);var Q=a(b),kt=o(Q,!0);r(Q);var X=a(Q),zt=o(X);Gt(zt,{get status(){return t(i).status}}),r(X);var Y=a(X),At=o(Y,!0);r(Y);var lt=a(Y),$t=o(lt,!0);r(lt),r(p),$(Pt=>{It(f,"href",`/ketten/${t(i).id??""}`),u(N,t(i).ursprung?.aktenzeichen||`#${t(i).id}`),u(St,t(i).thema||"-"),u(kt,t(i).typ||"-"),u(At,t(i).glieder_count),u($t,Pt)},[()=>Dt(t(i).letzte_aktivitaet)]),_("click",p,()=>tt(`/ketten/${t(i).id}`)),y(S,p)}),r(nt),r(it),r(J);var ht=a(J,2);{var wt=S=>{const i=Lt(()=>Math.ceil(t(l).total/t(l).page_size));var p=Ct(),m=o(p),f=a(m,2),N=o(f);r(f);var b=a(f,2);r(p),$(()=>{m.disabled=t(d)<=1,u(N,`Seite ${t(d)??""} von ${t(i)??""}`),b.disabled=t(d)>=t(i)}),_("click",m,()=>et(t(d)-1)),_("click",b,()=>et(t(d)+1)),y(S,p)};pt(ht,S=>{t(l).total>t(l).page_size&&S(wt)})}$(()=>u(yt,`${t(l).total??""} Ketten gefunden`)),y(e,n)};pt(ft,e=>{t(P)?e(xt):t(K)&&!t(l)?e(_t,1):t(l)&&e(bt,2)})}_("keydown",F,e=>{e.key==="Enter"&&k()}),Mt(F,()=>t(g),e=>s(g,e)),_("change",z,k),ut(z,()=>t(v),e=>s(v,e)),_("change",A,k),ut(A,()=>t(c),e=>s(c,e)),_("click",mt,k),y(vt,at),Ut()}Et(["keydown","change","click"]);export{pe as component};
|