antragstracker/static/_app/immutable/nodes/7.BtrismLT.js
Dotty Dotter 9d8a73e2a9 feat: Parteien-Filter, Klassifikation, Umsetzungsbewertung, KI-Neubewertung
- 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
2026-04-01 10:36:22 +02:00

2 lines
7.8 KiB
JavaScript

import{a as h,f as w}from"../chunks/DCPIP6Ym.js";import{o as Vt}from"../chunks/DDErvS7v.js";import{d as jt,s as u,p as qt,b as a,f as _t,g as t,h as It,e as Mt,c as o,a as i,$ as Zt,r,t as $,u as Dt}from"../chunks/DAfY0XTB.js";import{d as Gt,a as g,s as v}from"../chunks/D2u1A_4g.js";import{i as mt}from"../chunks/Br6sCvve.js";import{h as Ht,e as xt,i as bt}from"../chunks/CBOKTDOo.js";import{r as Ot,s as Wt}from"../chunks/DVOkFnep.js";import{b as Ct}from"../chunks/BCXcTGin.js";import{b as st}from"../chunks/yhBelVs6.js";import{g as it}from"../chunks/CTIvq_GE.js";import{f as Jt,a as Nt}from"../chunks/Cgke0YGN.js";import{f as Qt}from"../chunks/utcFFRIM.js";import{S as Xt}from"../chunks/DxJV8wOg.js";var Yt=w("<option> </option>"),te=w('<div class="bg-red-50 text-red-700 p-4 rounded-lg"> </div>'),ee=w('<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>'),ae=w('<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>'),re=w('<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">&laquo; 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 &raquo;</button></div>'),oe=w('<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),se=w('<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> <div><label for="partei" class="block text-xs font-medium text-gray-500 mb-1">Partei</label> <select id="partei" class="border border-gray-300 rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-green-500"><option>Alle</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 be(yt,ht){jt(ht,!0);let d=u(null),T=u(null),U=u(!1),f=u(""),_=u(""),m=u(""),x=u(""),p=u(1),nt=u(qt([]));function wt(){const e=new URL(window.location.href).searchParams;i(f,e.get("status")||"",!0),i(_,e.get("typ")||"",!0),i(m,e.get("suche")||"",!0),i(x,e.get("partei")||"",!0),i(p,parseInt(e.get("page")||"1"),!0)}async function B(){i(U,!0);try{const e={page:String(t(p)),page_size:"30"};t(f)&&(e.status=t(f)),t(_)&&(e.typ=t(_)),t(m)&&(e.suche=t(m)),t(x)&&(e.partei=t(x)),i(d,await Nt(e),!0)}catch(e){i(T,e instanceof Error?e.message:"Fehler",!0)}finally{i(U,!1)}}function z(){const e=new URLSearchParams;t(f)&&e.set("status",t(f)),t(_)&&e.set("typ",t(_)),t(m)&&e.set("suche",t(m)),t(x)&&e.set("partei",t(x)),i(p,1),e.set("page","1"),it(`/ketten?${e.toString()}`,{replaceState:!0}),B()}function lt(e){i(p,e,!0);const s=new URLSearchParams(window.location.search);s.set("page",String(e)),it(`/ketten?${s.toString()}`,{replaceState:!0}),B()}Vt(async()=>{i(nt,await Jt(),!0),wt(),B()});var dt=se();Ht("1cwhw9o",e=>{Mt(()=>{Zt.title="Ketten - Antragstracker Hagen"})});var L=a(_t(dt),2),pt=o(L),E=o(pt),R=a(o(E),2);Ot(R),r(E);var V=a(E,2),P=a(o(V),2),j=o(P);j.value=j.__value="";var q=a(j);q.value=q.__value="eingereicht";var I=a(q);I.value=I.__value="in_beratung";var M=a(I);M.value=M.__value="vertagt";var Z=a(M);Z.value=Z.__value="beschlossen";var D=a(Z);D.value=D.__value="umgesetzt";var G=a(D);G.value=G.__value="abgelehnt";var H=a(G);H.value=H.__value="versandet";var O=a(H);O.value=O.__value="angefragt";var W=a(O);W.value=W.__value="beantwortet";var C=a(W);C.value=C.__value="offen";var ut=a(C);ut.value=ut.__value="abgewiegelt",r(P),r(V);var J=a(V,2),F=a(o(J),2),N=o(F);N.value=N.__value="";var Q=a(N);Q.value=Q.__value="antrag";var vt=a(Q);vt.value=vt.__value="anfrage",r(F),r(J);var X=a(J,2),K=a(o(X),2),Y=o(K);Y.value=Y.__value="";var kt=a(Y);xt(kt,17,()=>t(nt),bt,(e,s)=>{var l=Yt(),tt=o(l);r(l);var k={};$(()=>{v(tt,`${t(s).kuerzel??""} (${t(s).anzahl??""})`),k!==(k=t(s).kuerzel)&&(l.value=(l.__value=t(s).kuerzel)??"")}),h(e,l)}),r(K),r(X);var St=a(X,2);r(pt),r(L);var zt=a(L,2);{var At=e=>{var s=te(),l=o(s,!0);r(s),$(()=>v(l,t(T))),h(e,s)},$t=e=>{var s=ee();h(e,s)},Pt=e=>{var s=oe(),l=_t(s),tt=o(l);r(l);var k=a(l,2),ct=o(k),gt=a(o(ct));xt(gt,21,()=>t(d).items,bt,(A,n)=>{var c=ae(),b=o(c),y=o(b),et=o(y,!0);r(y),r(b);var S=a(b),Tt=o(S,!0);r(S);var at=a(S),Ut=o(at,!0);r(at);var rt=a(at),Bt=o(rt);Xt(Bt,{get status(){return t(n).status}}),r(rt);var ot=a(rt),Lt=o(ot,!0);r(ot);var ft=a(ot),Et=o(ft,!0);r(ft),r(c),$(Rt=>{Wt(y,"href",`/ketten/${t(n).id??""}`),v(et,t(n).ursprung?.aktenzeichen||`#${t(n).id}`),v(Tt,t(n).thema||"-"),v(Ut,t(n).typ||"-"),v(Lt,t(n).glieder_count),v(Et,Rt)},[()=>Qt(t(n).letzte_aktivitaet)]),g("click",c,()=>it(`/ketten/${t(n).id}`)),h(A,c)}),r(gt),r(ct),r(k);var Ft=a(k,2);{var Kt=A=>{const n=Dt(()=>Math.ceil(t(d).total/t(d).page_size));var c=re(),b=o(c),y=a(b,2),et=o(y);r(y);var S=a(y,2);r(c),$(()=>{b.disabled=t(p)<=1,v(et,`Seite ${t(p)??""} von ${t(n)??""}`),S.disabled=t(p)>=t(n)}),g("click",b,()=>lt(t(p)-1)),g("click",S,()=>lt(t(p)+1)),h(A,c)};mt(Ft,A=>{t(d).total>t(d).page_size&&A(Kt)})}$(()=>v(tt,`${t(d).total??""} Ketten gefunden`)),h(e,s)};mt(zt,e=>{t(T)?e(At):t(U)&&!t(d)?e($t,1):t(d)&&e(Pt,2)})}g("keydown",R,e=>{e.key==="Enter"&&z()}),Ct(R,()=>t(m),e=>i(m,e)),g("change",P,z),st(P,()=>t(f),e=>i(f,e)),g("change",F,z),st(F,()=>t(_),e=>i(_,e)),g("change",K,z),st(K,()=>t(x),e=>i(x,e)),g("click",St,z),h(yt,dt),It()}Gt(["keydown","change","click"]);export{be as component};