antragstracker/static/_app/immutable/nodes/3.Cw03XrzI.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.3 KiB
JavaScript

import{a as n,f as i,c as ft}from"../chunks/Bkzsmr9I.js";import{o as ht}from"../chunks/trpXq522.js";import{d as yt,s as E,p as V,b as s,f as J,h as _t,e as bt,a as K,$ as wt,g as t,c as a,r as e,t as $,n as kt,u as X}from"../chunks/Cjw4vZKn.js";import{s as p}from"../chunks/DfJQ0EIT.js";import{i as M}from"../chunks/kjB3f-xG.js";import{h as jt,e as P,i as B}from"../chunks/DaCWmHjB.js";import{s as $t}from"../chunks/RVjQLo13.js";import{s as At}from"../chunks/CWOupeSg.js";import{s as Ft}from"../chunks/QfvBL-nR.js";var qt=i('<div class="bg-red-50 text-red-700 p-4 rounded-lg mb-6"> </div>'),St=i('<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>'),Nt=i('<tr class="hover:bg-gray-50"><td class="px-4 py-3 font-medium text-gray-900"> </td><td class="px-4 py-3 text-center text-green-600 font-medium"> </td><td class="px-4 py-3 text-center text-red-600 font-medium"> </td><td class="px-4 py-3 text-center text-yellow-600 font-medium"> </td><td class="px-4 py-3 text-center text-gray-600"> </td><td class="px-4 py-3"><div class="flex items-center gap-2"><div class="flex-1 bg-gray-200 rounded-full h-2 max-w-24"><div class="bg-green-500 h-2 rounded-full"></div></div> <span class="text-sm text-gray-600"> </span></div></td></tr>'),Rt=i('<th class="p-2 text-center writing-mode-vertical" style="writing-mode: vertical-lr; transform: rotate(180deg); height: 100px;"> </th>'),Ct=i('<td class="p-1"><div class="w-10 h-10 bg-gray-300 rounded flex items-center justify-center text-gray-500">—</div></td>'),Et=i('<td class="p-1"><div> </div></td>'),Jt=i('<td class="p-1"><div class="w-10 h-10 bg-gray-100 rounded flex items-center justify-center text-gray-400">-</div></td>'),Kt=i('<tr><td class="p-2 font-medium text-right pr-3 whitespace-nowrap"> </td><!></tr>'),Mt=i('<div class="overflow-x-auto"><table class="text-xs"><thead><tr><th class="p-2 text-left"></th><!></tr></thead><tbody></tbody></table></div> <div class="mt-4 flex items-center gap-4 text-xs text-gray-500"><span>Legende:</span> <span class="flex items-center gap-1"><span class="w-4 h-4 bg-green-500 rounded"></span> 90-100%</span> <span class="flex items-center gap-1"><span class="w-4 h-4 bg-green-400 rounded"></span> 70-90%</span> <span class="flex items-center gap-1"><span class="w-4 h-4 bg-yellow-400 rounded"></span> 50-70%</span> <span class="flex items-center gap-1"><span class="w-4 h-4 bg-orange-400 rounded"></span> 30-50%</span> <span class="flex items-center gap-1"><span class="w-4 h-4 bg-red-400 rounded"></span> &lt;30%</span></div>',1),Pt=i('<p class="text-gray-500">Noch keine Koalitionsdaten verfügbar.</p>'),Bt=i('<section class="bg-white rounded-xl shadow-sm border border-gray-200 p-6 mb-8"><h2 class="text-lg font-semibold text-gray-900 mb-4">📊 Stimmverhalten nach Fraktion</h2> <div class="overflow-x-auto"><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">Fraktion</th><th class="px-4 py-3 text-center text-xs font-medium text-gray-500 uppercase">Ja</th><th class="px-4 py-3 text-center text-xs font-medium text-gray-500 uppercase">Nein</th><th class="px-4 py-3 text-center text-xs font-medium text-gray-500 uppercase">Enthaltung</th><th class="px-4 py-3 text-center text-xs font-medium text-gray-500 uppercase">Gesamt</th><th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Zustimmungsquote</th></tr></thead><tbody class="divide-y divide-gray-100"></tbody></table></div></section> <section class="bg-white rounded-xl shadow-sm border border-gray-200 p-6"><h2 class="text-lg font-semibold text-gray-900 mb-4">🤝 Koalitionsmatrix</h2> <p class="text-sm text-gray-500 mb-4">Wie oft stimmen Fraktionen gleich ab? (nur Ja/Nein-Stimmen)</p> <!></section>',1),Gt=i('<div class="mb-6"><h1 class="text-2xl font-bold text-gray-900">Abstimmungsverhalten</h1> <p class="text-gray-500 text-sm mt-1">Analyse des Stimmverhaltens der Ratsfraktionen</p></div> <!> <!>',1);function Qt(Y,tt){yt(tt,!0);let L=E(V([])),A=E(V([])),T=E(!0),G=E("");const W=typeof window<"u"&&window.location.port==="5173"?`http://${window.location.hostname}:8099/api`:"/api";ht(async()=>{try{const[r,d]=await Promise.all([fetch(`${W}/abstimmungen/fraktionen`),fetch(`${W}/abstimmungen/koalitionsmatrix`)]);r.ok&&K(L,await r.json(),!0),d.ok&&K(A,await d.json(),!0)}catch(r){K(G,`Fehler: ${r}`)}finally{K(T,!1)}});function et(r){return r>=90?"bg-green-500":r>=70?"bg-green-400":r>=50?"bg-yellow-400":r>=30?"bg-orange-400":"bg-red-400"}function at(r){return r>=50?"text-white":"text-gray-900"}var Z=Gt();jt("hpy8l9",r=>{bt(()=>{wt.title="Abstimmungen - Antragstracker Hagen"})});var z=s(J(Z),2);{var rt=r=>{var d=qt(),b=a(d,!0);e(d),$(()=>p(b,t(G))),n(r,d)};M(z,r=>{t(G)&&r(rt)})}var st=s(z,2);{var nt=r=>{var d=St();n(r,d)},ot=r=>{var d=Bt(),b=J(d),D=s(a(b),2),O=a(D),Q=s(a(O));P(Q,21,()=>t(L),B,(g,o)=>{var h=Nt(),y=a(h),F=a(y,!0);e(y);var u=s(y),q=a(u,!0);e(u);var w=s(u),S=a(w,!0);e(w);var v=s(w),m=a(v,!0);e(v);var l=s(v),f=a(l,!0);e(l);var N=s(l),R=a(N),k=a(R),_=a(k);e(k);var j=s(k,2),H=a(j);e(j),e(R),e(N),e(h),$(()=>{p(F,t(o).fraktion),p(q,t(o).ja),p(S,t(o).nein),p(m,t(o).enthaltung),p(f,t(o).gesamt),Ft(_,`width: ${t(o).ja_quote??""}%`),p(H,`${t(o).ja_quote??""}%`)}),n(g,h)}),e(Q),e(O),e(D),e(b);var U=s(b,2),it=s(a(U),4);{var dt=g=>{const o=X(()=>t(A).map(v=>v.fraktion).sort());var h=Mt(),y=J(h),F=a(y),u=a(F),q=a(u),w=s(a(q));P(w,17,()=>t(o),B,(v,m)=>{var l=Rt(),f=a(l,!0);e(l),$(()=>p(f,t(m))),n(v,l)}),e(q),e(u);var S=s(u);P(S,21,()=>t(A),B,(v,m)=>{var l=Kt(),f=a(l),N=a(f,!0);e(f);var R=s(f);P(R,17,()=>t(o),B,(k,_)=>{var j=ft(),H=J(j);{var ct=x=>{var c=Ct();n(x,c)},pt=x=>{const c=X(()=>t(m).uebereinstimmung[t(_)]);var I=Et(),C=a(I),mt=a(C,!0);e(C),e(I),$((xt,gt,ut)=>{At(C,1,`w-10 h-10 ${xt??""} ${gt??""} rounded flex items-center justify-center font-medium`),$t(C,"title",`${t(m).fraktion??""} & ${t(_)??""}: ${t(c).gleich??""}/${t(c).gesamt??""} (${t(c).quote??""}%)`),p(mt,ut)},[()=>et(t(c).quote),()=>at(t(c).quote),()=>Math.round(t(c).quote)]),n(x,I)},vt=x=>{var c=Jt();n(x,c)};M(H,x=>{t(m).fraktion===t(_)?x(ct):t(m).uebereinstimmung[t(_)]?x(pt,1):x(vt,-1)})}n(k,j)}),e(l),$(()=>p(N,t(m).fraktion)),n(v,l)}),e(S),e(F),e(y),kt(2),n(g,h)},lt=g=>{var o=Pt();n(g,o)};M(it,g=>{t(A).length>0?g(dt):g(lt,-1)})}e(U),n(r,d)};M(st,r=>{t(T)?r(nt):r(ot,-1)})}n(Y,Z),_t()}export{Qt as component};