PageSourceSearch

https://ksd.moerfelden-walldorf.de/components/PetitionOverview-R-Au22M7.js

js moerfelden-walldorf.de collected 2026-10-02 16:24:30 UTC 5,170 bytes, 1 lines download raw bytes

1import{d as j,u as l,c as i,h as o,e as v,L as g,w as P,b as S,F as k,r as V,a as E,j as d,W as I,a2 as R,o as n,aq as Y,am as q,t as $,a5 as D,l as O,R as K,bc as G,av as H,g as s,f as T,_ as J}from"./index-BGDZ9R_9.js";import{P as Q,g as U}from"./Petition-BNxZmBRN.js";import{u as X,P as Z}from"./PetitionForm-98Fp2bAr.js";import"./getPetitionProgressStatus-C3_VTA1q.js";import"./Editor-DSdb5OhM.js";import"./FileList--HZ-EAWM.js";import"./SignatureInput-DpgIDXVX.js";import"./SelectEntityModal-IBZDFDMn.js";import"./User-fW8IwOA_.js";import"./Organization-BFtR8Gbx.js";import"./Faction-wuA9vanK.js";const ee={key:0,class:"loading-wrapper"},te={key:1,class:"petition-overview-wrapper"},ae={key:0,class:"petition-overview-header"},le={class:"petition-overview-header-filters"},ne=["value"],ie=["value"],oe=["value"],re={class:"petition-overview-petitions"},se={key:0,class:"petition-overview-placeholder"},ue={key:0,class:"petition-overview-petition-relation-title-wrapper"},de=j({__name:"PetitionOverview",props:{calledFromDashboard:{type:Boolean,default:!1},passedPetitions:{default:()=>[]}},setup(c){const L=X(),m=d([]),p=d(1),u=d(""),w=d(null),h=d(null),y=d(null),F=d(!1),_=s(()=>c.calledFromDashboard?99999:window.settings[1068]),b=s(()=>m.value.map(e=>{if(!e.relation||!e.relation[0])return{...e,petitionStatus:U(e)};let a="",t="";return e.relation[0]&&(e.relation[0].topnummer||e.relation[0].topnummer===""?(a=`${e.relation[0].title} - ${T(e.relation[0].meeting.datum,"dd.MM.yyyy")} - ${e.relation[0].meeting.titel}`,t=`/meeting?id=${e.relation[0].meeting.nummer}&agenda_item=${e.relation[0].id}`):(a=`${T(e.relation[0].datum,"dd.MM.yyyy")} - ${e.relation[0].titel}`,t=`/meeting?id=${e.relation[0].nummer}`)),{...e,relationTitle:a,relationUrl:t,petitionStatus:U(e)}})),x=s(()=>{let e=b.value.filter(r=>r.betreff.toLowerCase().includes(u.value.toLowerCase())||r.relationTitle?.toLowerCase().includes(u.value.toLowerCase()));const a=h.value;a&&(e=e.filter(r=>r.created_at.split("-")[0]===a));const t=y.value;t&&(e=e.filter(r=>r.type?.bezeichnung===t));const f=w.value;return f&&(e=e.filter(r=>r.petitionStatus===f)),e}),C=s(()=>x.value.slice().sort((e,a)=>{const t=new Date(e.created_at),f=new Date(a.created_at);return t>f?-1:t<f?1:0})),B=s(()=>[...new Set(b.value.map(e=>e.created_at.split("-")[0]))].sort((e,a)=>parseInt(a,10)-parseInt(e,10))),z=s(()=>[...new Set(b.value.map(e=>e.type?.bezeichnung).filter(e=>e))].sort()),M=s(()=>[...new Set(b.value.map(e=>e.petitionStatus))].sort()),A=s(()=>C.value.slice((p.value-1)*_.value,p.value*_.value));async function N(){F.value=!0;const{data:e}=await I.get({id:"petitions",action:"all"});m.value=e,F.value=!1}function W(e=null,a=null){L.setPetitionForm({relation:e,relationType:a,visible:!0,petition:{}})}return c.passedPetitions.length&&!m.value.length&&(m.value=c.passedPetitions),R().name==="petitions"&&N(),(e,a)=>l(F)?(n(),i("div",ee,[o(l(Y),{size:40})])):(n(),i("div",te,[o(Z,{onAddPetition:a[0]||(a[0]=t=>l(m).push(t))}),c.calledFromDashboard?S("",!0):(n(),i("div",ae,[v("div",le,[o(l(q),{modelValue:l(u),"onUpdate:modelValue":a[1]||(a[1]=t=>g(u)?u.value=t:null),placeholder:"Suche",icon:"search"},null,8,["modelValue"]),o(l(D),{modelValue:l(w),"onUpdate:modelValue":a[2]||(a[2]=t=>g(w)?w.value=t:null),placeholder:"Status","aria-label":"Status auswählen"},{default:P(()=>[a[6]||(a[6]=v("option",{value:""},null,-1)),(n(!0),i(k,null,V(l(M),t=>(n(),i("option",{key:t,value:t},$(t),9,ne))),128))]),_:1},8,["modelValue"]),o(l(D),{modelValue:l(h),"onUpdate:modelValue":a[3]||(a[3]=t=>g(h)?h.value=t:null),placeholder:"Erstellungsjahr",class:"petition-overview-header-filters-years","aria-label":"Erstellungsjahr auswählen"},{default:P(()=>[a[7]||(a[7]=v("option",{value:""},null,-1)),(n(!0),i(k,null,V(l(B),t=>(n(),i("option",{key:t,value:t},$(t),9,ie))),128))]),_:1},8,["modelValue"]),o(l(D),{modelValue:l(y),"onUpdate:modelValue":a[4]||(a[4]=t=>g(y)?y.value=t:null),placeholder:"Antragsart","aria-label":"Antragsart auswählen"},{default:P(()=>[a[8]||(a[8]=v("option",{value:""},null,-1)),(n(!0),i(k,null,V(l(z),t=>(n(),i("option",{key:t,value:t},$(t),9,oe))),128))]),_:1},8,["modelValue"]),o(l(K),{onClick:W,class:"add-button"},{default:P(()=>[...a[9]||(a[9]=[O(" Antrag hinzufügen ",-1)])]),_:1})])])),v("div",re,[l(A).length===0?(n(),i("div",se," Keine Anträge mit diesen Sucheinstellungen gefunden ")):S("",!0),(n(!0),i(k,null,V(l(A),t=>(n(),i("div",{key:t.id,class:"petition-overview-petition"},[o(Q,{petition:t,"search-term":l(u)},null,8,["petition","search-term"]),t.relation?(n(),i("div",ue,[a[10]||(a[10]=v("div",{class:"petition-overview-petition-relation-border"},null,-1)),o(G,{haystack:t.relationTitle,needle:l(u),class:"petition-overview-petition-relation-title",link:t.relationUrl},null,8,["haystack","needle","link"])])):S("",!0)]))),128))]),l(C).length>0&&!c.calledFromDashboard?(n(),E(l(H),{key:1,class:"gray-on-gray-bg","initial-page":l(p),"onUpdate:initialPage":a[5]||(a[5]=t=>g(p)?p.value=t:null),"data-count":l(C).length,"entries-per-page":l(_)},null,8,["initial-page","data-count","entries-per-page"])):S("",!0)]))}}),ke=J(de,[["__scopeId","data-v-0ca53bd7"]]);export{ke as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.