antragstracker/static/_app/immutable/nodes/9.BwN-S9Xs.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
6.8 KiB
JavaScript

import{b as ee,a as g,f as $,c as le,t as ne}from"../chunks/Bkzsmr9I.js";import{o as Me}from"../chunks/trpXq522.js";import{F as N,a2 as de,ac as P,t as A,Z as ce,l as Re,ad as Te,a4 as pe,ae as $e,af as Le,ag as Pe,ah as ze,ai as Ve,aj as Ce,ak as Fe,d as He,b as r,f as D,g as e,h as Ne,e as De,c as o,a as v,s as R,$ as Oe,r as s,u as Ue}from"../chunks/Cjw4vZKn.js";import{d as je,a as T,s as S}from"../chunks/DfJQ0EIT.js";import{i as O}from"../chunks/kjB3f-xG.js";import{h as Ie,e as qe,i as Be}from"../chunks/DaCWmHjB.js";import{r as Ze,s as Ge}from"../chunks/RVjQLo13.js";import{b as We}from"../chunks/CSnrw0fY.js";import{b as Ye}from"../chunks/qS6hbb4Y.js";import{g as te}from"../chunks/3I_XkZiy.js";import{d as Je}from"../chunks/Cgke0YGN.js";import{f as Ke}from"../chunks/utcFFRIM.js";function fe(z,U,p=!1,x=!1,_=!1,V=!1){var f=z,a="";if(p){var l=z;N&&(f=de(P(l)))}A(()=>{var b=Re;if(a===(a=U()??"")){N&&ce();return}if(p&&!N){b.nodes=null,l.innerHTML=a,a!==""&&ee(P(l),l.lastChild);return}if(b.nodes!==null&&(Te(b.nodes.start,b.nodes.end),b.nodes=null),a!==""){if(N){pe.data;for(var d=ce(),E=d;d!==null&&(d.nodeType!==$e||d.data!=="");)E=d,d=Le(d);if(d===null)throw Pe(),ze;ee(pe,E),f=de(d);return}var C=x?Ce:_?Fe:void 0,M=Ve(x?"svg":_?"math":"template",C);M.innerHTML=a;var m=x||_?M:M.content;if(ee(P(m),m.lastChild),x||_)for(;P(m);)f.before(P(m));else f.before(m)}})}var Qe=$('<div class="bg-red-50 text-red-700 p-4 rounded-lg"> </div>'),Xe=$('<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>'),et=$('<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 text-sm text-gray-600 capitalize"> </td><td class="px-4 py-3 text-sm text-gray-500"> </td></tr>'),tt=$('<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>'),at=$('<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">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),rt=$('<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> <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 mt(z,U){He(U,!0);let p=R(null);function x(t,n){if(!t||!n)return t||"-";const y=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return t.replace(new RegExp(`(${y})`,"gi"),'<mark class="bg-yellow-200 rounded px-0.5">$1</mark>')}let _=R(null),V=R(!1),f=R(""),a=R(""),l=R(1);function b(){const t=new URL(window.location.href).searchParams;v(f,t.get("typ")||"",!0),v(a,t.get("suche")||"",!0),v(l,parseInt(t.get("page")||"1"),!0)}async function d(){v(V,!0);try{const t={page:String(e(l)),page_size:"50"};e(f)&&(t.typ=e(f)),e(a)&&(t.suche=e(a)),v(p,await Je(t),!0)}catch(t){v(_,t instanceof Error?t.message:"Fehler",!0)}finally{v(V,!1)}}function E(){const t=new URLSearchParams;e(f)&&t.set("typ",e(f)),e(a)&&t.set("suche",e(a)),v(l,1),t.set("page","1"),te(`/vorlagen?${t.toString()}`,{replaceState:!0}),d()}function C(t){v(l,t,!0);const n=new URLSearchParams(window.location.search);n.set("page",String(t)),te(`/vorlagen?${n.toString()}`,{replaceState:!0}),d()}Me(()=>{b(),d()});var M=rt();Ie("1oqo6v",t=>{De(()=>{Oe.title="Vorlagen - Antragstracker Hagen"})});var m=r(D(M),2),ae=o(m),j=o(ae),I=r(o(j),2);Ze(I),s(j);var q=r(j,2),F=r(o(q),2),B=o(F);B.value=B.__value="";var Z=r(B);Z.value=Z.__value="antrag";var G=r(Z);G.value=G.__value="anfrage";var W=r(G);W.value=W.__value="stellungnahme";var re=r(W);re.value=re.__value="bericht",s(F),s(q);var ue=r(q,2);s(ae),s(m);var ve=r(m,2);{var ge=t=>{var n=Qe(),y=o(n,!0);s(n),A(()=>S(y,e(_))),g(t,n)},me=t=>{var n=Xe();g(t,n)},_e=t=>{var n=at(),y=D(n),he=o(y);s(y);var Y=r(y,2),se=o(Y),oe=r(o(se));qe(oe,21,()=>e(p).items,Be,(L,c)=>{var h=et(),w=o(h),k=o(w),J=o(k);{var H=i=>{var u=le(),X=D(u);fe(X,()=>x(e(c).aktenzeichen||`#${e(c).id}`,e(a))),g(i,u)},ye=i=>{var u=ne();A(()=>S(u,e(c).aktenzeichen||`#${e(c).id}`)),g(i,u)};O(J,i=>{e(a)?i(H):i(ye,-1)})}s(k),s(w);var K=r(w),we=o(K);{var ke=i=>{var u=le(),X=D(u);fe(X,()=>x(e(c).betreff,e(a))),g(i,u)},Se=i=>{var u=ne();A(()=>S(u,e(c).betreff||"-")),g(i,u)};O(we,i=>{e(a)?i(ke):i(Se,-1)})}s(K);var Q=r(K),Ae=o(Q,!0);s(Q);var ie=r(Q),Ee=o(ie,!0);s(ie),s(h),A(i=>{Ge(k,"href",`/vorlagen/${e(c).id??""}`),S(Ae,e(c).typ||"-"),S(Ee,i)},[()=>Ke(e(c).datum_eingang)]),T("click",h,()=>te(`/vorlagen/${e(c).id}`)),g(L,h)}),s(oe),s(se),s(Y);var xe=r(Y,2);{var be=L=>{const c=Ue(()=>Math.ceil(e(p).total/e(p).page_size));var h=tt(),w=o(h),k=r(w,2),J=o(k);s(k);var H=r(k,2);s(h),A(()=>{w.disabled=e(l)<=1,S(J,`Seite ${e(l)??""} von ${e(c)??""}`),H.disabled=e(l)>=e(c)}),T("click",w,()=>C(e(l)-1)),T("click",H,()=>C(e(l)+1)),g(L,h)};O(xe,L=>{e(p).total>e(p).page_size&&L(be)})}A(()=>S(he,`${e(p).total??""} Vorlagen gefunden`)),g(t,n)};O(ve,t=>{e(_)?t(ge):e(V)&&!e(p)?t(me,1):e(p)&&t(_e,2)})}T("keydown",I,t=>{t.key==="Enter"&&E()}),We(I,()=>e(a),t=>v(a,t)),T("change",F,E),Ye(F,()=>e(f),t=>v(f,t)),T("click",ue,E),g(z,M),Ne()}je(["keydown","change","click"]);export{mt as component};