antragstracker/static/_app/immutable/nodes/9.CTwKRSNc.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
8.3 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{b as ne,a as v,f as _,c as xe,t as be}from"../chunks/DCPIP6Ym.js";import{o as Be}from"../chunks/DDErvS7v.js";import{F as q,W as he,a5 as C,t as b,R as ye,l as We,a6 as Ye,Y as we,a7 as Ge,a8 as Ze,a9 as Je,aa as Ke,ab as Qe,ac as Xe,ad as et,d as tt,s as S,p as at,b as s,f as B,g as e,h as rt,e as st,c as o,a as f,$ as ot,r as a,u as it}from"../chunks/DAfY0XTB.js";import{d as lt,a as A,s as x}from"../chunks/D2u1A_4g.js";import{i as H}from"../chunks/Br6sCvve.js";import{h as nt,e as de,i as ce}from"../chunks/CBOKTDOo.js";import{r as dt,s as ke}from"../chunks/DVOkFnep.js";import{s as ct}from"../chunks/C-x9yHfs.js";import{b as pt}from"../chunks/BCXcTGin.js";import{b as Se}from"../chunks/yhBelVs6.js";import{g as pe}from"../chunks/CTIvq_GE.js";import{d as vt,f as ft}from"../chunks/Cgke0YGN.js";import{f as ut}from"../chunks/utcFFRIM.js";function Ae(N,W,m=!1,z=!1,$=!1,D=!1){var h=N,p="";if(m){var d=N;q&&(h=he(C(d)))}b(()=>{var u=We;if(p===(p=W()??"")){q&&ye();return}if(m&&!q){u.nodes=null,d.innerHTML=p,p!==""&&ne(C(d),d.lastChild);return}if(u.nodes!==null&&(Ye(u.nodes.start,u.nodes.end),u.nodes=null),p!==""){if(q){we.data;for(var i=ye(),O=i;i!==null&&(i.nodeType!==Ge||i.data!=="");)O=i,i=Ze(i);if(i===null)throw Je(),Ke;ne(we,O),h=he(i);return}var T=z?Xe:$?et:void 0,y=Qe(z?"svg":$?"math":"template",T);y.innerHTML=p;var w=z||$?y:y.content;if(ne(C(w),w.lastChild),z||$)for(;C(w);)h.before(C(w));else h.before(w)}})}var gt=_("<option> </option>"),mt=_('<div class="bg-red-50 text-red-700 p-4 rounded-lg"> </div>'),_t=_('<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>'),xt=_('<a class="inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium hover:opacity-80"> </a>'),bt=_('<div class="flex flex-wrap gap-1"></div>'),ht=_('<span class="text-gray-400 text-xs"></span>'),yt=_('<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-lg truncate"><!></td><td class="px-4 py-3"><!></td><td class="px-4 py-3 text-sm text-gray-600 capitalize"> </td><td class="px-4 py-3 text-sm text-gray-500"> </td></tr>'),wt=_('<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>'),kt=_('<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">Betreff</th><th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Partei</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">Datum</th></tr></thead><tbody class="divide-y divide-gray-100"></tbody></table></div> <!>',1),St=_('<div class="mb-6"><h1 class="text-2xl font-bold text-gray-900">Vorlagen</h1> <p class="text-gray-500 text-sm mt-1">Alle importierten Vorlagen aus dem ALLRIS-System</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="Volltextsuche..." 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="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><option>Stellungnahme</option><option>Bericht</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 Nt(N,W){tt(W,!0);let m=S(null),z=S(at([]));function $(t,l){if(!t||!l)return t||"-";const g=l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return t.replace(new RegExp(`(${g})`,"gi"),'<mark class="bg-yellow-200 rounded px-0.5">$1</mark>')}let D=S(null),h=S(!1),p=S(""),d=S(""),u=S(""),i=S(1);function O(){const t=new URL(window.location.href).searchParams;f(p,t.get("typ")||"",!0),f(d,t.get("suche")||"",!0),f(u,t.get("partei")||"",!0),f(i,parseInt(t.get("page")||"1"),!0)}async function T(){f(h,!0);try{const t={page:String(e(i)),page_size:"50"};e(p)&&(t.typ=e(p)),e(d)&&(t.suche=e(d)),e(u)&&(t.partei=e(u)),f(m,await vt(t),!0)}catch(t){f(D,t instanceof Error?t.message:"Fehler",!0)}finally{f(h,!1)}}function y(){const t=new URLSearchParams;e(p)&&t.set("typ",e(p)),e(d)&&t.set("suche",e(d)),e(u)&&t.set("partei",e(u)),f(i,1),t.set("page","1"),pe(`/vorlagen?${t.toString()}`,{replaceState:!0}),T()}function w(t){f(i,t,!0);const l=new URLSearchParams(window.location.search);l.set("page",String(t)),pe(`/vorlagen?${l.toString()}`,{replaceState:!0}),T()}Be(async()=>{f(z,await ft(),!0),O(),T()});var ve=St();nt("1oqo6v",t=>{st(()=>{ot.title="Vorlagen - Antragstracker Hagen"})});var Y=s(B(ve),2),fe=o(Y),G=o(fe),Z=s(o(G),2);dt(Z),a(G);var J=s(G,2),U=s(o(J),2),K=o(U);K.value=K.__value="";var Q=s(K);Q.value=Q.__value="antrag";var X=s(Q);X.value=X.__value="anfrage";var ee=s(X);ee.value=ee.__value="stellungnahme";var ue=s(ee);ue.value=ue.__value="bericht",a(U),a(J);var te=s(J,2),I=s(o(te),2),ae=o(I);ae.value=ae.__value="";var ze=s(ae);de(ze,17,()=>e(z),ce,(t,l)=>{var g=gt(),re=o(g);a(g);var M={};b(()=>{x(re,`${e(l).kuerzel??""} (${e(l).anzahl??""})`),M!==(M=e(l).kuerzel)&&(g.value=(g.__value=e(l).kuerzel)??"")}),v(t,g)}),a(I),a(te);var $e=s(te,2);a(fe),a(Y);var Pe=s(Y,2);{var Ee=t=>{var l=mt(),g=o(l,!0);a(l),b(()=>x(g,e(D))),v(t,l)},Me=t=>{var l=_t();v(t,l)},Re=t=>{var l=kt(),g=B(l),re=o(g);a(g);var M=s(g,2),ge=o(M),me=s(o(ge));de(me,21,()=>e(m).items,ce,(L,c)=>{var k=yt(),P=o(k),E=o(P),se=o(E);{var j=r=>{var n=xe(),V=B(n);Ae(V,()=>$(e(c).aktenzeichen||`#${e(c).id}`,e(d))),v(r,n)},Ve=r=>{var n=be();b(()=>x(n,e(c).aktenzeichen||`#${e(c).id}`)),v(r,n)};H(se,r=>{e(d)?r(j):r(Ve,-1)})}a(E),a(P);var oe=s(P),Fe=o(oe);{var Ce=r=>{var n=xe(),V=B(n);Ae(V,()=>$(e(c).betreff,e(d))),v(r,n)},He=r=>{var n=be();b(()=>x(n,e(c).betreff||"-")),v(r,n)};H(Fe,r=>{e(d)?r(Ce):r(He,-1)})}a(oe);var ie=s(oe),Ne=o(ie);{var De=r=>{var n=bt();de(n,21,()=>e(c).antragsteller,ce,(V,F)=>{var R=xt(),je=o(R,!0);a(R),b(()=>{ke(R,"href",`/vorlagen?partei=${e(F).kuerzel??""}`),ct(R,`background-color: ${(e(F).farbe||"#6b7280")??""}20; color: ${(e(F).farbe||"#6b7280")??""}; border: 1px solid ${(e(F).farbe||"#6b7280")??""}40;`),x(je,e(F).kuerzel)}),A("click",R,qe=>qe.stopPropagation()),v(V,R)}),a(n),v(r,n)},Oe=r=>{var n=ht();v(r,n)};H(Ne,r=>{e(c).antragsteller?.length?r(De):r(Oe,-1)})}a(ie);var le=s(ie),Ue=o(le,!0);a(le);var _e=s(le),Ie=o(_e,!0);a(_e),a(k),b(r=>{ke(E,"href",`/vorlagen/${e(c).id??""}`),x(Ue,e(c).typ||"-"),x(Ie,r)},[()=>ut(e(c).datum_eingang)]),A("click",k,()=>pe(`/vorlagen/${e(c).id}`)),v(L,k)}),a(me),a(ge),a(M);var Te=s(M,2);{var Le=L=>{const c=it(()=>Math.ceil(e(m).total/e(m).page_size));var k=wt(),P=o(k),E=s(P,2),se=o(E);a(E);var j=s(E,2);a(k),b(()=>{P.disabled=e(i)<=1,x(se,`Seite ${e(i)??""} von ${e(c)??""}`),j.disabled=e(i)>=e(c)}),A("click",P,()=>w(e(i)-1)),A("click",j,()=>w(e(i)+1)),v(L,k)};H(Te,L=>{e(m).total>e(m).page_size&&L(Le)})}b(()=>x(re,`${e(m).total??""} Vorlagen gefunden`)),v(t,l)};H(Pe,t=>{e(D)?t(Ee):e(h)&&!e(m)?t(Me,1):e(m)&&t(Re,2)})}A("keydown",Z,t=>{t.key==="Enter"&&y()}),pt(Z,()=>e(d),t=>f(d,t)),A("change",U,y),Se(U,()=>e(p),t=>f(p,t)),A("change",I,y),Se(I,()=>e(u),t=>f(u,t)),A("click",$e,y),v(N,ve),rt()}lt(["keydown","change","click"]);export{Nt as component};